commit 29dcea88779c856c7dc92040a0c01233263101d4 Author: Linus Torvalds Date: Sun Jun 3 14:15:21 2018 -0700 Linux 4.17 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 325e14f97e0c92735d10d9922cbb73ad521de4c4 Merge: 874cd33 af04fad Author: Linus Torvalds Date: Sun Jun 3 11:01:28 2018 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro. - fix io_destroy()/aio_complete() race - the vfs_open() change to get rid of open_check_o_direct() boilerplate was nice, but buggy. Al has a patch avoiding a revert, but that's definitely not a last-day fodder, so for now revert it is... * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: Revert "fs: fold open_check_o_direct into do_dentry_open" fix io_destroy()/aio_complete() race commit af04fadcaa932d2d804699409d9d96dd5d85ce7f Author: Al Viro Date: Sat Jun 2 01:31:02 2018 -0400 Revert "fs: fold open_check_o_direct into do_dentry_open" This reverts commit cab64df194667dc5d9d786f0a895f647f5501c0d. Having vfs_open() in some cases drop the reference to struct file combined with error = vfs_open(path, f, cred); if (error) { put_filp(f); return ERR_PTR(error); } return f; is flat-out wrong. It used to be error = vfs_open(path, f, cred); if (!error) { /* from now on we need fput() to dispose of f */ error = open_check_o_direct(f); if (error) { fput(f); f = ERR_PTR(error); } } else { put_filp(f); f = ERR_PTR(error); } and sure, having that open_check_o_direct() boilerplate gotten rid of is nice, but not that way... Worse, another call chain (via finish_open()) is FUBAR now wrt FILE_OPENED handling - in that case we get error returned, with file already hit by fput() *AND* FILE_OPENED not set. Guess what happens in path_openat(), when it hits if (!(opened & FILE_OPENED)) { BUG_ON(!error); put_filp(file); } The root cause of all that crap is that the callers of do_dentry_open() have no way to tell which way did it fail; while that could be fixed up (by passing something like int *opened to do_dentry_open() and have it marked if we'd called ->open()), it's probably much too late in the cycle to do so right now. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds fs/internal.h | 1 + fs/namei.c | 7 ++++++- fs/open.c | 44 ++++++++++++++++++++++++++------------------ 3 files changed, 33 insertions(+), 19 deletions(-) commit 874cd339acdfe734b5418e36e3ad40fd4c573155 Merge: 26bdace 595058b Author: Linus Torvalds Date: Sun Jun 3 09:01:41 2018 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: - two patches addressing the problem that the scheduler allows under certain conditions user space tasks to be scheduled on CPUs which are not yet fully booted which causes a few subtle and hard to debug issue - add a missing runqueue clock update in the deadline scheduler which triggers a warning under certain circumstances - fix a silly typo in the scheduler header file * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/headers: Fix typo sched/deadline: Fix missing clock update sched/core: Require cpu_active() in select_task_rq(), for user tasks sched/core: Fix rules for running on online && !active CPUs commit 26bdace74c857ce370ca23344e79b0b7cc17e9b3 Merge: 918fe1b 6497bbc Author: Linus Torvalds Date: Sun Jun 3 08:58:59 2018 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tooling fixes from Thomas Gleixner: - fix 'perf test Session topology' segfault on s390 (Thomas Richter) - fix NULL return handling in bpf__prepare_load() (YueHaibing) - fix indexing on Coresight ETM packet queue decoder (Mathieu Poirier) - fix perf.data format description of NRCPUS header (Arnaldo Carvalho de Melo) - update perf.data documentation section on cpu topology - handle uncore event aliases in small groups properly (Kan Liang) - add missing perf_sample.addr into python sample dictionary (Leo Yan) * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf tools: Fix perf.data format description of NRCPUS header perf script python: Add addr into perf sample dict perf data: Update documentation section on cpu topology perf cs-etm: Fix indexing for decoder packet queue perf bpf: Fix NULL return handling in bpf__prepare_load() perf test: "Session topology" dumps core on s390 perf parse-events: Handle uncore event aliases in small groups properly commit 918fe1b3157978ada4267468008c5f89ef101e7d Merge: e0255aec cd075ce Author: Linus Torvalds Date: Sat Jun 2 17:35:53 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Infinite loop in _decode_session6(), from Eric Dumazet. 2) Pass correct argument to nla_strlcpy() in netfilter, also from Eric Dumazet. 3) Out of bounds memory access in ipv6 srh code, from Mathieu Xhonneux. 4) NULL deref in XDP_REDIRECT handling of tun driver, from Toshiaki Makita. 5) Incorrect idr release in cls_flower, from Paul Blakey. 6) Probe error handling fix in davinci_emac, from Dan Carpenter. 7) Memory leak in XPS configuration, from Alexander Duyck. 8) Use after free with cloned sockets in kcm, from Kirill Tkhai. 9) MTU handling fixes fo ip_tunnel and ip6_tunnel, from Nicolas Dichtel. 10) Fix UAPI hole in bpf data structure for 32-bit compat applications, from Daniel Borkmann. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (33 commits) bpf: fix uapi hole for 32 bit compat applications net: usb: cdc_mbim: add flag FLAG_SEND_ZLP ip6_tunnel: remove magic mtu value 0xFFF8 ip_tunnel: restore binding to ifaces with a large mtu net: dsa: b53: Add BCM5389 support kcm: Fix use-after-free caused by clonned sockets net-sysfs: Fix memory leak in XPS configuration ixgbe: fix parsing of TC actions for HW offload net: ethernet: davinci_emac: fix error handling in probe() net/ncsi: Fix array size in dumpit handler cls_flower: Fix incorrect idr release when failing to modify rule net/sonic: Use dma_mapping_error() xfrm Fix potential error pointer dereference in xfrm_bundle_create. vhost_net: flush batched heads before trying to busy polling tun: Fix NULL pointer dereference in XDP redirect be2net: Fix error detection logic for BE3 net: qmi_wwan: Add Netgear Aircard 779S mlxsw: spectrum: Forbid creation of VLAN 1 over port/LAG atm: zatm: fix memcmp casting iwlwifi: pcie: compare with number of IRQs requested for, not number of CPUs ... commit e0255aec66a156b4062a486878d8bb0355a4abc5 Merge: ada7339 c9ddf73 Author: Linus Torvalds Date: Sat Jun 2 15:54:49 2018 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "Eve of merge window fix: The original code was so bogus as to be casting the wrong generic device to an rport and proceeding to take actions based on the bogus values it found. Fortunately it seems the location that is dereferenced always exists, so the code hasn't oopsed yet, but it certainly annoys the memory checkers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: scsi_transport_srp: Fix shost to rport translation commit ada7339efeb94690a7ad15de69a3af186b9a55b5 Merge: 4277e6b 012cfac Author: Linus Torvalds Date: Sat Jun 2 15:24:45 2018 -0700 Merge tag 'drm-fixes-for-v4.17-rc8' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "A few final fixes: i915: - fix for potential Spectre vector in the new query uAPI - fix NULL pointer deref (FDO #106559) - DMI fix to hide LVDS for Radiant P845 (FDO #105468) amdgpu: - suspend/resume DC regression fix - underscan flicker fix on fiji - gamma setting fix after dpms omap: - fix oops regression core: - fix PSR timing dw-hdmi: - fix oops regression" * tag 'drm-fixes-for-v4.17-rc8' of git://people.freedesktop.org/~airlied/linux: drm/amd/display: Update color props when modeset is required drm/amd/display: Make atomic-check validate underscan changes drm/bridge/synopsys: dw-hdmi: fix dw_hdmi_setup_rx_sense drm/amd/display: Fix BUG_ON during CRTC atomic check update drm/i915/query: nospec expects no more than an unsigned long drm/i915/query: Protect tainted function pointer lookup drm/i915/lvds: Move acpi lid notification registration to registration phase drm/i915: Disable LVDS on Radiant P845 drm/omap: fix NULL deref crash with SDI displays drm/psr: Fix missed entry in PSR setup time table. commit 012cfaced00b7a9498227504c4d37a1c4619403d Merge: 0e33375 bc13f2f Author: Dave Airlie Date: Sun Jun 3 06:13:57 2018 +1000 Merge branch 'drm-fixes-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Two last minute DC fixes for 4.17. A fix for underscan on fiji and a fix for gamma settings getting after dpms. * 'drm-fixes-4.17' of git://people.freedesktop.org/~agd5f/linux: drm/amd/display: Update color props when modeset is required drm/amd/display: Make atomic-check validate underscan changes commit 4277e6b9fd44a42d13f1c47fb403167718e9bed4 Merge: 7172a69 c7e8146 Author: Linus Torvalds Date: Sat Jun 2 10:12:23 2018 -0700 Merge tag 'mips_fixes_4.17_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from James Hogan: "A final few MIPS fixes for 4.17: - drop Lantiq gphy reboot/remove reset (4.14) - prctl(PR_SET_FP_MODE): Disallow PRE without FR (4.0) - ptrace(PTRACE_PEEKUSR): Fix 64-bit FGRs (3.15)" * tag 'mips_fixes_4.17_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: ptrace: Fix PTRACE_PEEKUSR requests for 64-bit FGRs MIPS: prctl: Disallow FRE without FR with PR_SET_FP_MODE requests MIPS: lantiq: gphy: Drop reboot/remove reset asserts commit 7172a69c10466966499730b4e870700abdb63be8 Merge: 6ac9f42 89c29de Author: Linus Torvalds Date: Sat Jun 2 10:08:45 2018 -0700 Merge tag 'vfio-v4.17' of git://github.com/awilliam/linux-vfio Pull VFIO fix from Alex Williamson: "Revert a pfn page mapping optimization identified as introducing a bad page state regression (Alex Williamson)" * tag 'vfio-v4.17' of git://github.com/awilliam/linux-vfio: Revert "vfio/type1: Improve memory pinning process for raw PFN mapping" commit 6ac9f42cda9449dbd7f07a0bf7819d1dccd46ae8 Merge: 34a8e64 806e308 Author: Linus Torvalds Date: Sat Jun 2 10:05:45 2018 -0700 Merge tag 'char-misc-4.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are four small bugfixes for some char/misc drivers. Well, really three fixes and one fix for one of those fixes due to problems found by 0-day. This resolves some reported issues with the hwtracing drivers, and a reported regression for the thunderbolt subsystem. All of these have been in linux-next for a while now with no reported problems" * tag 'char-misc-4.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: hwtracing: stm: fix build error on some arches intel_th: Use correct device when freeing buffers stm class: Use vmalloc for the master map thunderbolt: Handle NULL boot ACL entries properly commit 34a8e640d1eaaea99d79bb7f75bc3d7e336da167 Merge: 7fdf3e8 9d569b1 Author: Linus Torvalds Date: Sat Jun 2 10:02:14 2018 -0700 Merge tag 'staging-4.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull IIO driver fixes from Greg KH: "Here are some old IIO driver fixes that were sitting in my tree for a few weeks. Sorry about not getting them to you sooner. They fix a number of small IIO driver issues that have been reported. All of these have been in linux-next for a while with no reported problems" * tag 'staging-4.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio: adc: select buffer for at91-sama5d2_adc iio: hid-sensor-trigger: Fix sometimes not powering up the sensor after resume iio: adc: at91-sama5d2_adc: fix channel configuration for differential channels iio:kfifo_buf: check for uint overflow iio:buffer: make length types match kfifo types iio: adc: stm32-dfsdm: fix sample rate for div2 spi clock iio: adc: stm32-dfsdm: fix successive oversampling settings iio: ad7793: implement IIO_CHAN_INFO_SAMP_FREQ commit 7fdf3e8616c5c2622b13120fc14328d58792abf3 Merge: a36b796 a840c93 Author: Linus Torvalds Date: Sat Jun 2 09:55:44 2018 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Just three small last minute regressions that were found in the last week. The Broadcom fix is a bit big for rc7, but since it is fixing driver crash regressions that were merged via netdev into rc1, I am sending it. - bnxt netdev changes merged this cycle caused the bnxt RDMA driver to crash under certain situations - Arnd found (several, unfortunately) kconfig problems with the patches adding INFINIBAND_ADDR_TRANS. Reverting this last part, will fix it more fully outside -rc. - Subtle change in error code for a uapi function caused breakage in userspace. This was bug was subtly introduced cycle" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: IB/core: Fix error code for invalid GID entry IB: Revert "remove redundant INFINIBAND kconfig dependencies" RDMA/bnxt_re: Fix broken RoCE driver due to recent L2 driver changes commit a36b7968909627d83af03d24a45e2d5f966cacff Merge: 0938a8f a0ccb6b Author: Linus Torvalds Date: Sat Jun 2 09:52:22 2018 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "A documentation bugfix and a MAINTAINERS addition" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: ocores: update HDL sources URL i2c: xlp9xx: Add MAINTAINERS entry commit 0938a8f52d10fc917eecc5c1b2fb7d3a7dedfa41 Merge: 0512e01 145e1a7 Author: Linus Torvalds Date: Sat Jun 2 09:44:15 2018 -0700 Merge branch 'akpm' (patches from Andrew) Merge two fixes from Andrew Morton. * emailed patches from Andrew Morton : mm: fix the NULL mapping case in __isolate_lru_page() mm/huge_memory.c: __split_huge_page() use atomic ClearPageDirty() commit 145e1a71e090575c74969e3daa8136d1e5b99fc8 Author: Hugh Dickins Date: Fri Jun 1 16:50:50 2018 -0700 mm: fix the NULL mapping case in __isolate_lru_page() George Boole would have noticed a slight error in 4.16 commit 69d763fc6d3a ("mm: pin address_space before dereferencing it while isolating an LRU page"). Fix it, to match both the comment above it, and the original behaviour. Although anonymous pages are not marked PageDirty at first, we have an old habit of calling SetPageDirty when a page is removed from swap cache: so there's a category of ex-swap pages that are easily migratable, but were inadvertently excluded from compaction's async migration in 4.16. Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1805302014001.12558@eggly.anvils Fixes: 69d763fc6d3a ("mm: pin address_space before dereferencing it while isolating an LRU page") Signed-off-by: Hugh Dickins Acked-by: Minchan Kim Acked-by: Mel Gorman Reported-by: Ivan Kalvachev Cc: "Huang, Ying" Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d077d4b59924acd1f5180c6fb73b57f4771fde6 Author: Hugh Dickins Date: Fri Jun 1 16:50:45 2018 -0700 mm/huge_memory.c: __split_huge_page() use atomic ClearPageDirty() Swapping load on huge=always tmpfs (with khugepaged tuned up to be very eager, but I'm not sure that is relevant) soon hung uninterruptibly, waiting for page lock in shmem_getpage_gfp()'s find_lock_entry(), most often when "cp -a" was trying to write to a smallish file. Debug showed that the page in question was not locked, and page->mapping NULL by now, but page->index consistent with having been in a huge page before. Reproduced in minutes on a 4.15 kernel, even with 4.17's 605ca5ede764 ("mm/huge_memory.c: reorder operations in __split_huge_page_tail()") added in; but took hours to reproduce on a 4.17 kernel (no idea why). The culprit proved to be the __ClearPageDirty() on tails beyond i_size in __split_huge_page(): the non-atomic __bitoperation may have been safe when 4.8's baa355fd3314 ("thp: file pages support for split_huge_page()") introduced it, but liable to erase PageWaiters after 4.10's 62906027091f ("mm: add PageWaiters indicating tasks are waiting for a page bit"). Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1805291841070.3197@eggly.anvils Fixes: 62906027091f ("mm: add PageWaiters indicating tasks are waiting for a page bit") Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Nicholas Piggin Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89c29def6b0101fff66a3d74d0178b844f88d732 Author: Alex Williamson Date: Sat Jun 2 08:41:44 2018 -0600 Revert "vfio/type1: Improve memory pinning process for raw PFN mapping" Bisection by Amadeusz Sławiński implicates this commit leading to bad page state issues after VM shutdown, likely due to unbalanced page references. The original commit was intended only as a performance improvement, therefore revert for offline rework. Link: https://lkml.org/lkml/2018/6/2/97 Fixes: 356e88ebe447 ("vfio/type1: Improve memory pinning process for raw PFN mapping") Cc: Jason Cai (Xiang Feng) Reported-by: Amadeusz Sławiński Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_type1.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit cd075ce4679ca7797734c4f6c5aa23878c8e2208 Merge: 9f7c728 36f9814 Author: David S. Miller Date: Sat Jun 2 08:07:52 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-06-02 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) BPF uapi fix in struct bpf_prog_info and struct bpf_map_info in order to fix offsets on 32 bit archs. This will have a minor merge conflict with net-next which has the __u32 gpl_compatible:1 bitfield in struct bpf_prog_info at this location. Resolution is to use the gpl_compatible member. ==================== Signed-off-by: David S. Miller commit 36f9814a494a874d5a0f44843544b4b2539022db Author: Daniel Borkmann Date: Sat Jun 2 05:21:59 2018 +0200 bpf: fix uapi hole for 32 bit compat applications In 64 bit, we have a 4 byte hole between ifindex and netns_dev in the case of struct bpf_map_info but also struct bpf_prog_info. In net-next commit b85fab0e67b ("bpf: Add gpl_compatible flag to struct bpf_prog_info") added a bitfield into it to expose some flags related to programs. Thus, add an unnamed __u32 bitfield for both so that alignment keeps the same in both 32 and 64 bit cases, and can be naturally extended from there as in b85fab0e67b. Before: # file test.o test.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped # pahole test.o struct bpf_map_info { __u32 type; /* 0 4 */ __u32 id; /* 4 4 */ __u32 key_size; /* 8 4 */ __u32 value_size; /* 12 4 */ __u32 max_entries; /* 16 4 */ __u32 map_flags; /* 20 4 */ char name[16]; /* 24 16 */ __u32 ifindex; /* 40 4 */ __u64 netns_dev; /* 44 8 */ __u64 netns_ino; /* 52 8 */ /* size: 64, cachelines: 1, members: 10 */ /* padding: 4 */ }; After (same as on 64 bit): # file test.o test.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped # pahole test.o struct bpf_map_info { __u32 type; /* 0 4 */ __u32 id; /* 4 4 */ __u32 key_size; /* 8 4 */ __u32 value_size; /* 12 4 */ __u32 max_entries; /* 16 4 */ __u32 map_flags; /* 20 4 */ char name[16]; /* 24 16 */ __u32 ifindex; /* 40 4 */ /* XXX 4 bytes hole, try to pack */ __u64 netns_dev; /* 48 8 */ __u64 netns_ino; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ /* size: 64, cachelines: 1, members: 10 */ /* sum members: 60, holes: 1, sum holes: 4 */ }; Reported-by: Dmitry V. Levin Reported-by: Eugene Syromiatnikov Fixes: 52775b33bb507 ("bpf: offload: report device information about offloaded maps") Fixes: 675fc275a3a2d ("bpf: offload: report device information for offloaded programs") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov include/uapi/linux/bpf.h | 2 ++ tools/include/uapi/linux/bpf.h | 2 ++ 2 files changed, 4 insertions(+) commit 9f7c728332e8966084242fcd951aa46583bc308c Author: Daniele Palmas Date: Thu May 31 11:18:29 2018 +0200 net: usb: cdc_mbim: add flag FLAG_SEND_ZLP Testing Telit LM940 with ICMP packets > 14552 bytes revealed that the modem needs FLAG_SEND_ZLP to properly work, otherwise the cdc mbim data interface won't be anymore responsive. Signed-off-by: Daniele Palmas Acked-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/cdc_mbim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a118015816f82c16b446e6599d35d483883d238 Merge: ccfde6e f7ff1fd Author: David S. Miller Date: Fri Jun 1 13:56:31 2018 -0400 Merge branch 'tunnel-mtus' Nicolas Dichtel says: ==================== ip[6] tunnels: fix mtu calculations The first patch restores the possibility to bind an ip4 tunnel to an interface whith a large mtu. The second patch was spotted after the first fix. I also target it to net because it fixes the max mtu value that can be used for ipv6 tunnels. v2: remove the 0xfff8 in ip_tunnel_newlink() ==================== Signed-off-by: David S. Miller commit f7ff1fde9441b4fcc8ffb6e66e6e5a00d008937e Author: Nicolas Dichtel Date: Thu May 31 10:59:33 2018 +0200 ip6_tunnel: remove magic mtu value 0xFFF8 I don't know where this value comes from (probably a copy and paste and paste and paste ...). Let's use standard values which are a bit greater. Link: https://git.kernel.org/pub/scm/linux/kernel/git/davem/netdev-vger-cvs.git/commit/?id=e5afd356a411a Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 11 ++++++++--- net/ipv6/sit.c | 5 +++-- 2 files changed, 11 insertions(+), 5 deletions(-) commit 82612de1c98e610d194e34178bde3cca7dedce41 Author: Nicolas Dichtel Date: Thu May 31 10:59:32 2018 +0200 ip_tunnel: restore binding to ifaces with a large mtu After commit f6cc9c054e77, the following conf is broken (note that the default loopback mtu is 65536, ie IP_MAX_MTU + 1): $ ip tunnel add gre1 mode gre local 10.125.0.1 remote 10.125.0.2 dev lo add tunnel "gre0" failed: Invalid argument $ ip l a type dummy $ ip l s dummy1 up $ ip l s dummy1 mtu 65535 $ ip tunnel add gre1 mode gre local 10.125.0.1 remote 10.125.0.2 dev dummy1 add tunnel "gre0" failed: Invalid argument dev_set_mtu() doesn't allow to set a mtu which is too large. First, let's cap the mtu returned by ip_tunnel_bind_dev(). Second, remove the magic value 0xFFF8 and use IP_MAX_MTU instead. 0xFFF8 seems to be there for ages, I don't know why this value was used. With a recent kernel, it's also possible to set a mtu > IP_MAX_MTU: $ ip l s dummy1 mtu 66000 After that patch, it's also possible to bind an ip tunnel on that kind of interface. CC: Petr Machata CC: Ido Schimmel Link: https://git.kernel.org/pub/scm/linux/kernel/git/davem/netdev-vger-cvs.git/commit/?id=e5afd356a411a Fixes: f6cc9c054e77 ("ip_tunnel: Emit events for post-register MTU changes") Signed-off-by: Nicolas Dichtel Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller net/ipv4/ip_tunnel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ccfde6e27d9566bee596d41a2cc6f158af8595d5 Merge: a95691b 38369f5 Author: David S. Miller Date: Fri Jun 1 13:25:41 2018 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2018-05-31 1) Avoid possible overflow of the offset variable in _decode_session6(), this fixes an infinite lookp there. From Eric Dumazet. 2) We may use an error pointer in the error path of xfrm_bundle_create(). Fix this by returning this pointer directly to the caller. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit a95691bc54af1ac4b12c354f91e9cabf1cb068df Author: Damien Thébault Date: Thu May 31 07:04:01 2018 +0000 net: dsa: b53: Add BCM5389 support This patch adds support for the BCM5389 switch connected through MDIO. Signed-off-by: Damien Thébault Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/dsa/b53.txt | 1 + drivers/net/dsa/b53/b53_common.c | 13 +++++++++++++ drivers/net/dsa/b53/b53_mdio.c | 5 ++++- drivers/net/dsa/b53/b53_priv.h | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) commit eb7f54b90bd8f469834c5e86dcf72ebf9a629811 Author: Kirill Tkhai Date: Fri Jun 1 14:30:38 2018 +0300 kcm: Fix use-after-free caused by clonned sockets (resend for properly queueing in patchwork) kcm_clone() creates kernel socket, which does not take net counter. Thus, the net may die before the socket is completely destructed, i.e. kcm_exit_net() is executed before kcm_done(). Reported-by: syzbot+5f1a04e374a635efc426@syzkaller.appspotmail.com Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/kcm/kcmsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 664088f8d68178809b848ca450f2797efb34e8e7 Author: Alexander Duyck Date: Thu May 31 15:59:46 2018 -0400 net-sysfs: Fix memory leak in XPS configuration This patch reorders the error cases in showing the XPS configuration so that we hold off on memory allocation until after we have verified that we can support XPS on a given ring. Fixes: 184c449f91fe ("net: Add support for XPS with QoS via traffic classes") Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller net/core/net-sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 16e6653c8259ca5383126e1c6bcf7fe062af87fc Author: Ondřej Hlavatý Date: Thu May 31 23:21:04 2018 +0200 ixgbe: fix parsing of TC actions for HW offload The previous code was optimistic, accepting the offload of whole action chain when there was a single known action (drop/redirect). This results in offloading a rule which should not be offloaded, because its behavior cannot be reproduced in the hardware. For example: $ tc filter add dev eno1 parent ffff: protocol ip \ u32 ht 800: order 1 match tcp src 42 FFFF \ action mirred egress mirror dev enp1s16 pipe \ drop The controller is unable to mirror the packet to a VF, but still offloads the rule by dropping the packet. Change the approach of the function to a pessimistic one, rejecting the chain when an unknown action is found. This is better suited for future extensions. Note that both recognized actions always return TC_ACT_SHOT, therefore it is safe to ignore actions behind them. Signed-off-by: Ondřej Hlavatý Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 0512e0134582ef85dee77d51aae77dcd1edec495 Merge: dd52cb8 829bc787 Author: Linus Torvalds Date: Thu May 31 16:23:07 2018 -0500 Merge tag 'xfs-4.17-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fix from Darrick Wong: "Clear out i_mapping error state when we're reinitializing inodes. This last minute fix prevents writeback error state from persisting past the end of the in-core inode lifecycle and causing EIO errors to be reported to userspace when no error has occurred. This fix for the behavioral regression has been soaking in for-next for a while, but various fs developers persuaded me to try to get it upstream for 4.17 because the patch that broke things was introduced in 4.17-rc4" * tag 'xfs-4.17-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: fs: clear writeback errors in inode_init_always commit 8005b09d99fac78e6f5fb9da30b5ae94840af03b Author: Dan Carpenter Date: Thu May 31 09:44:49 2018 +0300 net: ethernet: davinci_emac: fix error handling in probe() The current error handling code has an issue where it does: if (priv->txchan) cpdma_chan_destroy(priv->txchan); The problem is that ->txchan is either valid or an error pointer (which would lead to an Oops). I've changed it to use multiple error labels so that the test can be removed. Also there were some missing calls to netif_napi_del(). Fixes: 3ef0fdb2342c ("net: davinci_emac: switch to new cpdma layer") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_emac.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 0f51f3582f22e543b78c4e113220ed1c35acbd97 Author: Samuel Mendoza-Jonas Date: Thu May 31 14:10:04 2018 +1000 net/ncsi: Fix array size in dumpit handler With CONFIG_CC_STACKPROTECTOR enabled the kernel panics as below when parsing a NCSI_CMD_PKG_INFO command: [ 150.149711] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: 805cff08 [ 150.149711] [ 150.159919] CPU: 0 PID: 1301 Comm: ncsi-netlink Not tainted 4.13.16-468cbec6d2c91239332cb91b1f0a73aafcb6f0c6 #1 [ 150.170004] Hardware name: Generic DT based system [ 150.174852] [<80109930>] (unwind_backtrace) from [<80106bc4>] (show_stack+0x20/0x24) [ 150.182641] [<80106bc4>] (show_stack) from [<805d36e4>] (dump_stack+0x20/0x28) [ 150.189888] [<805d36e4>] (dump_stack) from [<801163ac>] (panic+0xdc/0x278) [ 150.196780] [<801163ac>] (panic) from [<801162cc>] (__stack_chk_fail+0x20/0x24) [ 150.204111] [<801162cc>] (__stack_chk_fail) from [<805cff08>] (ncsi_pkg_info_all_nl+0x244/0x258) [ 150.212912] [<805cff08>] (ncsi_pkg_info_all_nl) from [<804f939c>] (genl_lock_dumpit+0x3c/0x54) [ 150.221535] [<804f939c>] (genl_lock_dumpit) from [<804f873c>] (netlink_dump+0xf8/0x284) [ 150.229550] [<804f873c>] (netlink_dump) from [<804f8d44>] (__netlink_dump_start+0x124/0x17c) [ 150.237992] [<804f8d44>] (__netlink_dump_start) from [<804f9880>] (genl_rcv_msg+0x1c8/0x3d4) [ 150.246440] [<804f9880>] (genl_rcv_msg) from [<804f9174>] (netlink_rcv_skb+0xd8/0x134) [ 150.254361] [<804f9174>] (netlink_rcv_skb) from [<804f96a4>] (genl_rcv+0x30/0x44) [ 150.261850] [<804f96a4>] (genl_rcv) from [<804f7790>] (netlink_unicast+0x198/0x234) [ 150.269511] [<804f7790>] (netlink_unicast) from [<804f7ffc>] (netlink_sendmsg+0x368/0x3b0) [ 150.277783] [<804f7ffc>] (netlink_sendmsg) from [<804abea4>] (sock_sendmsg+0x24/0x34) [ 150.285625] [<804abea4>] (sock_sendmsg) from [<804ac1dc>] (___sys_sendmsg+0x244/0x260) [ 150.293556] [<804ac1dc>] (___sys_sendmsg) from [<804ad98c>] (__sys_sendmsg+0x5c/0x9c) [ 150.301400] [<804ad98c>] (__sys_sendmsg) from [<804ad9e4>] (SyS_sendmsg+0x18/0x1c) [ 150.308984] [<804ad9e4>] (SyS_sendmsg) from [<80102640>] (ret_fast_syscall+0x0/0x3c) [ 150.316743] ---[ end Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: 805cff08 This turns out to be because the attrs array in ncsi_pkg_info_all_nl() is initialised to a length of NCSI_ATTR_MAX which is the maximum attribute number, not the number of attributes. Fixes: 955dc68cb9b2 ("net/ncsi: Add generic netlink family") Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller net/ncsi/ncsi-netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be20f28fbd1a3f09fb16398b304a7a4546f9f97a Merge: 8258d2d ab1068d Author: David S. Miller Date: Thu May 31 15:27:39 2018 -0400 Merge tag 'wireless-drivers-for-davem-2018-05-30' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.17 Two last minute fixes, hopefully they make it to 4.17 still. rt2x00 * revert a fix which caused even more problems iwlwifi * fix a crash when there are 16 or more logical CPUs ==================== Signed-off-by: David S. Miller commit 8258d2da9f9f521dce7019e018360c28d116354e Author: Paul Blakey Date: Wed May 30 11:29:15 2018 +0300 cls_flower: Fix incorrect idr release when failing to modify rule When we fail to modify a rule, we incorrectly release the idr handle of the unmodified old rule. Fix that by checking if we need to release it. Fixes: fe2502e49b58 ("net_sched: remove cls_flower idr on failure") Reported-by: Vlad Buslov Reviewed-by: Roi Dayan Acked-by: Jiri Pirko Signed-off-by: Paul Blakey Signed-off-by: David S. Miller net/sched/cls_flower.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26de0b76d9ba3200f09c6cb9d9618bda338be5f7 Author: Finn Thain Date: Wed May 30 13:03:51 2018 +1000 net/sonic: Use dma_mapping_error() With CONFIG_DMA_API_DEBUG=y, calling sonic_open() produces the message, "DMA-API: device driver failed to check map error". Add the missing dma_mapping_error() call. Cc: Thomas Bogendoerfer Signed-off-by: Finn Thain Acked-by: Thomas Bogendoerfer Signed-off-by: David S. Miller drivers/net/ethernet/natsemi/sonic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc13f2f88eae63af943ab967cb14bb602f8f2eeb Author: Leo (Sunpeng) Li Date: Thu May 31 10:23:37 2018 -0400 drm/amd/display: Update color props when modeset is required This fixes issues where color management properties don't persist over DPMS on/off, or when the CRTC is moved across connectors. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a9e8d27574f26700575473011cb607d4abdbda5f Author: David Francis Date: Thu May 31 13:48:31 2018 -0400 drm/amd/display: Make atomic-check validate underscan changes When the underscan state was changed, atomic-check was triggering a validation but passing the old underscan values. This change adds a somewhat hacky check in dm_update_crtcs_state that will update the stream if old and newunderscan values are different. This was causing 4k on Fiji to allow underscan when it wasn't permitted. Signed-off-by: David Francis Reviewed-by: David Francis Acked-by: Harry Wentland Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit dd52cb879063ca5470d5a093c32180ba74fa528e Merge: 88a8676 32ffd6e Author: Linus Torvalds Date: Thu May 31 09:39:57 2018 -0500 Merge tag 'platform-drivers-x86-v4.17-4' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver fix from Andy Shevchenko: "Fix NULL pointer dereference in asus-wmi on rfkill cleanup. The effective change is just one new condition - two lines of code. But it required moving one static helper function, which is why the diff looks a bit bigger" * tag 'platform-drivers-x86-v4.17-4' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: asus-wmi: Fix NULL pointer dereference commit 32ffd6e8d1f6cef94bedca15dfcdebdeb590499d Author: João Paulo Rechi Vita Date: Tue May 22 14:30:15 2018 -0700 platform/x86: asus-wmi: Fix NULL pointer dereference Do not perform the rfkill cleanup routine when (asus->driver->wlan_ctrl_by_user && ashs_present()) is true, since nothing is registered with the rfkill subsystem in that case. Doing so leads to the following kernel NULL pointer dereference: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] __mutex_lock_slowpath+0x98/0x120 PGD 1a3aa8067 PUD 1a3b3d067 PMD 0 Oops: 0002 [#1] PREEMPT SMP Modules linked in: bnep ccm binfmt_misc uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core hid_a4tech videodev x86_pkg_temp_thermal intel_powerclamp coretemp ath3k btusb btrtl btintel bluetooth kvm_intel snd_hda_codec_hdmi kvm snd_hda_codec_realtek snd_hda_codec_generic irqbypass crc32c_intel arc4 i915 snd_hda_intel snd_hda_codec ath9k ath9k_common ath9k_hw ath i2c_algo_bit snd_hwdep mac80211 ghash_clmulni_intel snd_hda_core snd_pcm snd_timer cfg80211 ehci_pci xhci_pci drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm xhci_hcd ehci_hcd asus_nb_wmi(-) asus_wmi sparse_keymap r8169 rfkill mxm_wmi serio_raw snd mii mei_me lpc_ich i2c_i801 video soundcore mei i2c_smbus wmi i2c_core mfd_core CPU: 3 PID: 3275 Comm: modprobe Not tainted 4.9.34-gentoo #34 Hardware name: ASUSTeK COMPUTER INC. K56CM/K56CM, BIOS K56CM.206 08/21/2012 task: ffff8801a639ba00 task.stack: ffffc900014cc000 RIP: 0010:[] [] __mutex_lock_slowpath+0x98/0x120 RSP: 0018:ffffc900014cfce0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff8801a54315b0 RCX: 00000000c0000100 RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8801a54315b4 RBP: ffffc900014cfd30 R08: 0000000000000000 R09: 0000000000000002 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801a54315b4 R13: ffff8801a639ba00 R14: 00000000ffffffff R15: ffff8801a54315b8 FS: 00007faa254fb700(0000) GS:ffff8801aef80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000001a3b1b000 CR4: 00000000001406e0 Stack: ffff8801a54315b8 0000000000000000 ffffffff814733ae ffffc900014cfd28 ffffffff8146a28c ffff8801a54315b0 0000000000000000 ffff8801a54315b0 ffff8801a66f3820 0000000000000000 ffffc900014cfd48 ffffffff816c73e7 Call Trace: [] ? acpi_ut_release_mutex+0x5d/0x61 [] ? acpi_ns_get_node+0x49/0x52 [] mutex_lock+0x17/0x30 [] asus_rfkill_hotplug+0x24/0x1a0 [asus_wmi] [] asus_wmi_rfkill_exit+0x61/0x150 [asus_wmi] [] asus_wmi_remove+0x61/0xb0 [asus_wmi] [] platform_drv_remove+0x28/0x40 [] __device_release_driver+0xa1/0x160 [] device_release_driver+0x23/0x30 [] bus_remove_device+0xfd/0x170 [] device_del+0x139/0x270 [] platform_device_del+0x28/0x90 [] platform_device_unregister+0x12/0x30 [] asus_wmi_unregister_driver+0x19/0x30 [asus_wmi] [] asus_nb_wmi_exit+0x10/0xf26 [asus_nb_wmi] [] SyS_delete_module+0x192/0x270 [] ? exit_to_usermode_loop+0x92/0xa0 [] entry_SYSCALL_64_fastpath+0x13/0x94 Code: e8 5e 30 00 00 8b 03 83 f8 01 0f 84 93 00 00 00 48 8b 43 10 4c 8d 7b 08 48 89 63 10 41 be ff ff ff ff 4c 89 3c 24 48 89 44 24 08 <48> 89 20 4c 89 6c 24 10 eb 1d 4c 89 e7 49 c7 45 08 02 00 00 00 RIP [] __mutex_lock_slowpath+0x98/0x120 RSP CR2: 0000000000000000 ---[ end trace 8d484233fa7cb512 ]--- note: modprobe[3275] exited with preempt_count 2 https://bugzilla.kernel.org/show_bug.cgi?id=196467 Reported-by: red.f0xyz@gmail.com Signed-off-by: João Paulo Rechi Vita Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wmi.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 6497bbc35ac5efce3bccd31d3719bae020282da6 Merge: 786b71f 18a7057 Author: Ingo Molnar Date: Thu May 31 12:37:07 2018 +0200 Merge tag 'perf-urgent-for-mingo-4.17-20180531' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: - Fix 'perf test Session topology' segfault on s390 (Thomas Richter) - Fix NULL return handling in bpf__prepare_load() (YueHaibing) - Fix indexing on Coresight ETM packet queue decoder (Mathieu Poirier) - Fix perf.data format description of NRCPUS header (Arnaldo Carvalho de Melo) - Update perf.data documentation section on cpu topology - Handle uncore event aliases in small groups properly (Kan Liang) - Add missing perf_sample.addr into python sample dictionary (Leo Yan) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 595058b6675e4d2a70dcd867c84d922975f9d22b Author: Davidlohr Bueso Date: Wed May 30 15:49:40 2018 -0700 sched/headers: Fix typo I cannot spell 'throttling'. Signed-off-by: Davidlohr Bueso Signed-off-by: Peter Zijlstra (Intel) Cc: Davidlohr Bueso Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180530224940.17839-1-dave@stgolabs.net Signed-off-by: Ingo Molnar kernel/sched/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecda2b66e263dfd6c1d6113add19150f4e235bb3 Author: Juri Lelli Date: Wed May 30 18:08:09 2018 +0200 sched/deadline: Fix missing clock update A missing clock update is causing the following warning: rq->clock_update_flags < RQCF_ACT_SKIP WARNING: CPU: 10 PID: 0 at kernel/sched/sched.h:963 inactive_task_timer+0x5d6/0x720 Call Trace: __hrtimer_run_queues+0x10f/0x530 hrtimer_interrupt+0xe5/0x240 smp_apic_timer_interrupt+0x79/0x2b0 apic_timer_interrupt+0xf/0x20 do_idle+0x203/0x280 cpu_startup_entry+0x6f/0x80 start_secondary+0x1b0/0x200 secondary_startup_64+0xa5/0xb0 hardirqs last enabled at (793919): [] cpuidle_enter_state+0x9e/0x360 hardirqs last disabled at (793920): [] interrupt_entry+0xce/0xe0 softirqs last enabled at (793922): [] irq_enter+0x68/0x70 softirqs last disabled at (793921): [] irq_enter+0x4d/0x70 This happens because inactive_task_timer() calls sub_running_bw() (if TASK_DEAD and non_contending) that might trigger a schedutil update, which might access the clock. Clock is however currently updated only later in inactive_task_timer() function. Fix the problem by updating the clock right after task_rq_lock(). Reported-by: kernel test robot Signed-off-by: Juri Lelli Signed-off-by: Peter Zijlstra (Intel) Cc: Claudio Scordino Cc: Linus Torvalds Cc: Luca Abeni Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180530160809.9074-1-juri.lelli@redhat.com Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7af443ee1697607541c6346c87385adab2214743 Author: Paul Burton Date: Sat May 26 08:46:47 2018 -0700 sched/core: Require cpu_active() in select_task_rq(), for user tasks select_task_rq() is used in a few paths to select the CPU upon which a thread should be run - for example it is used by try_to_wake_up() & by fork or exec balancing. As-is it allows use of any online CPU that is present in the task's cpus_allowed mask. This presents a problem because there is a period whilst CPUs are brought online where a CPU is marked online, but is not yet fully initialized - ie. the period where CPUHP_AP_ONLINE_IDLE <= state < CPUHP_ONLINE. Usually we don't run any user tasks during this window, but there are corner cases where this can happen. An example observed is: - Some user task A, running on CPU X, forks to create task B. - sched_fork() calls __set_task_cpu() with cpu=X, setting task B's task_struct::cpu field to X. - CPU X is offlined. - Task A, currently somewhere between the __set_task_cpu() in copy_process() and the call to wake_up_new_task(), is migrated to CPU Y by migrate_tasks() when CPU X is offlined. - CPU X is onlined, but still in the CPUHP_AP_ONLINE_IDLE state. The scheduler is now active on CPU X, but there are no user tasks on the runqueue. - Task A runs on CPU Y & reaches wake_up_new_task(). This calls select_task_rq() with cpu=X, taken from task B's task_struct, and select_task_rq() allows CPU X to be returned. - Task A enqueues task B on CPU X's runqueue, via activate_task() & enqueue_task(). - CPU X now has a user task on its runqueue before it has reached the CPUHP_ONLINE state. In most cases, the user tasks that schedule on the newly onlined CPU have no idea that anything went wrong, but one case observed to be problematic is if the task goes on to invoke the sched_setaffinity syscall. The newly onlined CPU reaches the CPUHP_AP_ONLINE_IDLE state before the CPU that brought it online calls stop_machine_unpark(). This means that for a portion of the window of time between CPUHP_AP_ONLINE_IDLE & CPUHP_ONLINE the newly onlined CPU's struct cpu_stopper has its enabled field set to false. If a user thread is executed on the CPU during this window and it invokes sched_setaffinity with a CPU mask that does not include the CPU it's running on, then when __set_cpus_allowed_ptr() calls stop_one_cpu() intending to invoke migration_cpu_stop() and perform the actual migration away from the CPU it will simply return -ENOENT rather than calling migration_cpu_stop(). We then return from the sched_setaffinity syscall back to the user task that is now running on a CPU which it just asked not to run on, and which is not present in its cpus_allowed mask. This patch resolves the problem by having select_task_rq() enforce that user tasks run on CPUs that are active - the same requirement that select_fallback_rq() already enforces. This should ensure that newly onlined CPUs reach the CPUHP_AP_ACTIVE state before being able to schedule user tasks, and also implies that bringup_wait_for_ap() will have called stop_machine_unpark() which resolves the sched_setaffinity issue above. I haven't yet investigated them, but it may be of interest to review whether any of the actions performed by hotplug states between CPUHP_AP_ONLINE_IDLE & CPUHP_AP_ACTIVE could have similar unintended effects on user tasks that might schedule before they are reached, which might widen the scope of the problem from just affecting the behaviour of sched_setaffinity. Signed-off-by: Paul Burton Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180526154648.11635-2-paul.burton@mips.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 175f0e25abeaa2218d431141ce19cf1de70fa82d Author: Peter Zijlstra Date: Tue Jul 25 18:58:21 2017 +0200 sched/core: Fix rules for running on online && !active CPUs As already enforced by the WARN() in __set_cpus_allowed_ptr(), the rules for running on an online && !active CPU are stricter than just being a kthread, you need to be a per-cpu kthread. If you're not strictly per-CPU, you have better CPUs to run on and don't need the partially booted one to get your work done. The exception is to allow smpboot threads to bootstrap the CPU itself and get kernel 'services' initialized before we allow userspace on it. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Tejun Heo Cc: Thomas Gleixner Fixes: 955dbdf4ce87 ("sched: Allow migrating kthreads into online but inactive CPUs") Link: http://lkml.kernel.org/r/20170725165821.cejhb7v2s3kecems@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/sched/core.c | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) commit 38369f54d97dd7dc50c73a2797bfeb53c2e87d2d Author: Steffen Klassert Date: Thu May 31 09:45:18 2018 +0200 xfrm Fix potential error pointer dereference in xfrm_bundle_create. We may derference an invalid pointer in the error path of xfrm_bundle_create(). Fix this by returning this error pointer directly instead of assigning it to xdst0. Fixes: 45b018beddb6 ("ipsec: Create and use new helpers for dst child access.") Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 829bc787c1a0403e4d886296dd4d90c5f9c1744a Author: Darrick J. Wong Date: Wed May 30 19:43:53 2018 -0700 fs: clear writeback errors in inode_init_always In inode_init_always(), we clear the inode mapping flags, which clears any retained error (AS_EIO, AS_ENOSPC) bits. Unfortunately, we do not also clear wb_err, which means that old mapping errors can leak through to new inodes. This is crucial for the XFS inode allocation path because we recycle old in-core inodes and we do not want error state from an old file to leak into the new file. This bug was discovered by running generic/036 and generic/047 in a loop and noticing that the EIOs generated by the collision of direct and buffered writes in generic/036 would survive the remount between 036 and 047, and get reported to the fsyncs (on different files!) in generic/047. Signed-off-by: Darrick J. Wong Reviewed-by: Jeff Layton Reviewed-by: Brian Foster fs/inode.c | 1 + 1 file changed, 1 insertion(+) commit 0e333751cff1dd7383be15372960a1be6e2b4e47 Merge: 2b85352 c32048d Author: Dave Airlie Date: Thu May 31 08:35:47 2018 +1000 Merge tag 'drm-misc-fixes-2018-05-30' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes dw-hdmi: Fix Oops regression from rc1 (Neil) Cc: Neil Armstrong * tag 'drm-misc-fixes-2018-05-30' of git://anongit.freedesktop.org/drm/drm-misc: drm/bridge/synopsys: dw-hdmi: fix dw_hdmi_setup_rx_sense commit 88a867653065dc14b0fdeeb626efb8d7ebe39be5 Merge: 943cf9f 43b4d1e Author: Linus Torvalds Date: Wed May 30 16:37:59 2018 -0500 Merge tag 'for-linus-20180530' of git://git.kernel.dk/linux-block Pull block fix from Jens Axboe: "Just a single fix that should make it into this release, fixing a regression with T10-DIF on NVMe" * tag 'for-linus-20180530' of git://git.kernel.dk/linux-block: nvme: fix extended data LBA supported setting commit 943cf9f3ca16133dbd00f9a4cbfea46512fcb0e8 Merge: c462f16 efe3de7 Author: Linus Torvalds Date: Wed May 30 16:35:07 2018 -0500 Merge tag 'selinux-pr-20180530' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull SELinux fix from Paul Moore: "One more small fix for SELinux: a small string length fix found by KASAN. I dislike sending patches this late in the release cycle, but this patch fixes a legitimate problem, is very small, limited in scope, and well understood. There are two threads with more information on the problem, the latest is linked below: https://marc.info/?t=152723737400001&r=1&w=2 Stephen points out in the thread linked above: 'Such a setxattr() call can only be performed by a process with CAP_MAC_ADMIN that is also allowed mac_admin permission in SELinux policy. Consequently, this is never possible on Android (no process is allowed mac_admin permission, always enforcing) and is only possible in Fedora/RHEL for a few domains (if enforcing)'" * tag 'selinux-pr-20180530' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: KASAN: slab-out-of-bounds in xattr_getsecurity commit c462f16b1a319991c59747e65837924a5ff17755 Merge: d60d61f bf4407f Author: Linus Torvalds Date: Wed May 30 16:33:22 2018 -0500 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "This fixes a potential kernel panic in the inside-secure driver" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: inside-secure - do not use memset on MMIO commit 18a7057420f8b67f15d17087bf5c0863db752c8b Author: Arnaldo Carvalho de Melo Date: Fri May 25 16:37:36 2018 -0300 perf tools: Fix perf.data format description of NRCPUS header In the perf.data HEADER_CPUDESC feadure header we store first the number of available CPUs in the system, then the number of CPUs at the time of writing the header, not the other way around. Reported-by: Thomas-Mich Richter Acked-by: Andi Kleen Cc: Adrian Hunter Cc: David Ahern Cc: He Kuang Cc: Hendrik Brueckner Cc: Jin Yao Cc: Jiri Olsa Cc: Kim Phillips Cc: Lakshman Annadorai Cc: Namhyung Kim Cc: Simon Que Cc: Stephane Eranian Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-j7o92acm2vnxjv70y4o3swoc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf.data-file-format.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 943f32a0e8a4ea513dc68b00720a6c65842135e8 Author: Leo Yan Date: Mon May 28 16:45:01 2018 +0800 perf script python: Add addr into perf sample dict ARM CoreSight auxtrace uses 'sample->addr' to record the target address for branch instructions, so the data of 'sample->addr' is required for tracing data analysis. This commit collects data of 'sample->addr' into perf sample dict, finally can be used for python script for parsing event. Signed-off-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Jonathan Corbet Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Robert Walker Cc: Tor Jeremiassen Cc: coresight@lists.linaro.org Cc: kim.phillips@arm.co Cc: linux-arm-kernel@lists.infradead.org Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/1527497103-3593-3-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/scripting-engines/trace-event-python.c | 2 ++ 1 file changed, 2 insertions(+) commit 0c711138fa61188aa379210e9e08ac76838dea03 Author: Thomas Richter Date: Mon May 28 09:44:33 2018 +0200 perf data: Update documentation section on cpu topology Add an explanation of each cpu's core and socket identifier to the perf.data file format documentation. Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180528074433.16652-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf.data-file-format.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit e2ab28521a588785c3e053098ffe607b5ff54634 Author: Mathieu Poirier Date: Fri May 25 17:10:54 2018 -0600 perf cs-etm: Fix indexing for decoder packet queue The tail of a queue is supposed to be pointing to the next available slot in a queue. In this implementation the tail is incremented before it is used and as such points to the last used element, something that has the immense advantage of centralizing tail management at a single location and eliminating a lot of redundant code. But this needs to be taken into consideration on the dequeueing side where the head also needs to be incremented before it is used, or the first available element of the queue will be skipped. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Robert Walker Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1527289854-10755-1-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit ab4e32ff5aa797eaea551dbb67946e2fcb56cc7e Author: YueHaibing Date: Fri May 11 19:21:42 2018 +0800 perf bpf: Fix NULL return handling in bpf__prepare_load() bpf_object__open()/bpf_object__open_buffer can return error pointer or NULL, check the return values with IS_ERR_OR_NULL() in bpf__prepare_load and bpf__prepare_load_buffer Signed-off-by: YueHaibing Acked-by: Daniel Borkmann Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: netdev@vger.kernel.org Link: https://lkml.kernel.org/n/tip-psf4xwc09n62al2cb9s33v9h@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf-loader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c32048d9e93a5ab925d745396c63e7b912147f0a Author: Neil Armstrong Date: Wed May 30 11:43:58 2018 +0200 drm/bridge/synopsys: dw-hdmi: fix dw_hdmi_setup_rx_sense The dw_hdmi_setup_rx_sense exported function should not use struct device to recover the dw-hdmi context using drvdata, but take struct dw_hdmi directly like other exported functions. This caused a regression using Meson DRM on S905X since v4.17-rc1 : Internal error: Oops: 96000007 [#1] PREEMPT SMP [...] CPU: 0 PID: 124 Comm: irq/32-dw_hdmi_ Not tainted 4.17.0-rc7 #2 Hardware name: Libre Technology CC (DT) [...] pc : osq_lock+0x54/0x188 lr : __mutex_lock.isra.0+0x74/0x530 [...] Process irq/32-dw_hdmi_ (pid: 124, stack limit = 0x00000000adf418cb) Call trace: osq_lock+0x54/0x188 __mutex_lock_slowpath+0x10/0x18 mutex_lock+0x30/0x38 __dw_hdmi_setup_rx_sense+0x28/0x98 dw_hdmi_setup_rx_sense+0x10/0x18 dw_hdmi_top_thread_irq+0x2c/0x50 irq_thread_fn+0x28/0x68 irq_thread+0x10c/0x1a0 kthread+0x128/0x130 ret_from_fork+0x10/0x18 Code: 34000964 d00050a2 51000484 9135c042 (f864d844) ---[ end trace 945641e1fbbc07da ]--- note: irq/32-dw_hdmi_[124] exited with preempt_count 1 genirq: exiting task "irq/32-dw_hdmi_" (124) is an active IRQ thread (irq 32) Fixes: eea034af90c6 ("drm/bridge/synopsys: dw-hdmi: don't clobber drvdata") Signed-off-by: Neil Armstrong Tested-by: Koen Kooi Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1527673438-20643-1-git-send-email-narmstrong@baylibre.com drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 15 ++++----------- drivers/gpu/drm/meson/meson_dw_hdmi.c | 2 +- include/drm/bridge/dw_hdmi.h | 2 +- 3 files changed, 6 insertions(+), 13 deletions(-) commit f5a4941aa6d190e676065e8f4ed35999f52a01c3 Author: Jason Wang Date: Tue May 29 14:18:19 2018 +0800 vhost_net: flush batched heads before trying to busy polling After commit e2b3b35eb989 ("vhost_net: batch used ring update in rx"), we tend to batch updating used heads. But it doesn't flush batched heads before trying to do busy polling, this will cause vhost to wait for guest TX which waits for the used RX. Fixing by flush batched heads before busy loop. 1 byte TCP_RR performance recovers from 13107.83 to 50402.65. Fixes: e2b3b35eb989 ("vhost_net: batch used ring update in rx") Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/vhost/net.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) commit d60d61f36b8f8d3f67c3fe49ee35cfd54b3bc49b Merge: 0044cde f0f59a2 Author: Linus Torvalds Date: Wed May 30 10:30:30 2018 -0500 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: - a missing -msoft-float for the compile of the kexec purgatory - a fix for the dasd driver to avoid the double use of a field in the 'struct request' [ That latter one is being discussed, and Christoph asked for something cleaner, but for now it's a fix ] * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/dasd: use blk_mq_rq_from_pdu for per request data s390/purgatory: Fix endless interrupt loop commit d121109100bda84bbbb199dab97f9d56432ab235 Author: Thomas Richter Date: Mon May 28 09:36:57 2018 +0200 perf test: "Session topology" dumps core on s390 The "perf test Session topology" entry fails with core dump on s390. The root cause is a NULL pointer dereference in function check_cpu_topology() line 76 (or line 82 without -v). The session->header.env.cpu variable is NULL because on s390 function process_cpu_topology() returns with error: socket_id number is too big. You may need to upgrade the perf tool. and releases the env.cpu variable via zfree() and sets it to NULL. Here is the gdb output: (gdb) n 76 pr_debug("CPU %d, core %d, socket %d\n", i, (gdb) n Program received signal SIGSEGV, Segmentation fault. 0x00000000010f4d9e in check_cpu_topology (path=0x3ffffffd6c8 "/tmp/perf-test-J6CHMa", map=0x14a1740) at tests/topology.c:76 76 pr_debug("CPU %d, core %d, socket %d\n", i, (gdb) Make sure the env.cpu variable is not used when its NULL. Test for NULL pointer and return TEST_SKIP if so. Output before: [root@p23lp27 perf]# ./perf test -F 39 39: Session topology :Segmentation fault (core dumped) [root@p23lp27 perf]# Output after: [root@p23lp27 perf]# ./perf test -vF 39 39: Session topology : --- start --- templ file: /tmp/perf-test-Ajx59D socket_id number is too big.You may need to upgrade the perf tool. ---- end ---- Session topology: Skip [root@p23lp27 perf]# Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180528073657.11743-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/topology.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit 369b230806a9f3ff691466d54795e5e3ff3f8f5c Author: Kan Liang Date: Mon May 7 14:13:43 2018 -0700 perf parse-events: Handle uncore event aliases in small groups properly Perf stat doesn't count the uncore event aliases from the same uncore block in a group, for example: perf stat -e '{unc_m_cas_count.all,unc_m_clockticks}' -a -I 1000 # time counts unit events 1.000447342 unc_m_cas_count.all 1.000447342 unc_m_clockticks 2.000740654 unc_m_cas_count.all 2.000740654 unc_m_clockticks The output is very misleading. It gives a wrong impression that the uncore event doesn't work. An uncore block could be composed by several PMUs. An uncore event alias is a joint name which means the same event runs on all PMUs of a block. Perf doesn't support mixed events from different PMUs in the same group. It is wrong to put uncore event aliases in a big group. The right way is to split the big group into multiple small groups which only include the events from the same PMU. Only uncore event aliases from the same uncore block should be specially handled here. It doesn't make sense to mix the uncore events with other uncore events from different blocks or even core events in a group. With the patch: # time counts unit events 1.001557653 140,833 unc_m_cas_count.all 1.001557653 1,330,231,332 unc_m_clockticks 2.002709483 85,007 unc_m_cas_count.all 2.002709483 1,429,494,563 unc_m_clockticks Reported-by: Andi Kleen Signed-off-by: Kan Liang Acked-by: Jiri Olsa Cc: Agustin Vega-Frias Cc: Ganapatrao Kulkarni Cc: Jin Yao Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Link: http://lkml.kernel.org/r/1525727623-19768-1-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.h | 1 + tools/perf/util/parse-events.c | 130 ++++++++++++++++++++++++++++++++++++++++- tools/perf/util/parse-events.h | 7 ++- tools/perf/util/parse-events.y | 8 +-- 4 files changed, 137 insertions(+), 9 deletions(-) commit 0044cdeb731313f20b63cb5644de7588731de32b Merge: 91fc957 40f7090 Author: Linus Torvalds Date: Tue May 29 22:22:15 2018 -0500 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "We are switching a bunch of Lenovo devices with Synaptics touchpads from PS/2 emulation over to native RMI/SMbus. Given that all commits are marked for stable there is no point delaying them till next release" [ Also fix a too-small stack array for i2c communication in elan driver ] * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elan_i2c_smbus - fix corrupted stack Input: synaptics - add Lenovo 80 series ids to SMBus Input: synaptics - add Intertouch support on X1 Carbon 6th and X280 Input: synaptics - Lenovo Thinkpad X1 Carbon G5 (2017) with Elantech trackpoints should use RMI Input: synaptics - Lenovo Carbon X1 Gen5 (2017) devices should use RMI commit 2b85352e3b08159c9d5c82144d05767a00169f9d Merge: ebb442b 20fa2ff Author: Dave Airlie Date: Wed May 30 10:58:31 2018 +1000 Merge branch 'drm-fixes-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-fixes One last fix for 4.17. Fix a suspend regression in DC. * 'drm-fixes-4.17' of git://people.freedesktop.org/~agd5f/linux: drm/amd/display: Fix BUG_ON during CRTC atomic check update commit ebb442bb35e8c35eb765b04423b28392b4df7a04 Merge: 801dff4 2bc5ff0 Author: Dave Airlie Date: Wed May 30 10:57:57 2018 +1000 Merge tag 'drm-misc-fixes-2018-05-29' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes core: Add 220us psr setup time (Dhinakaran) omap: Fix NULL deref (Tomi) Cc: Dhinakaran Pandiyan Cc: Tomi Valkeinen * tag 'drm-misc-fixes-2018-05-29' of git://anongit.freedesktop.org/drm/drm-misc: drm/omap: fix NULL deref crash with SDI displays drm/psr: Fix missed entry in PSR setup time table. commit efe3de79e0b52ca281ef6691480c8c68c82a4657 Author: Sachin Grover Date: Fri May 25 14:01:39 2018 +0530 selinux: KASAN: slab-out-of-bounds in xattr_getsecurity Call trace: [] dump_backtrace+0x0/0x428 [] show_stack+0x28/0x38 [] dump_stack+0xd4/0x124 [] print_address_description+0x68/0x258 [] kasan_report.part.2+0x228/0x2f0 [] kasan_report+0x5c/0x70 [] check_memory_region+0x12c/0x1c0 [] memcpy+0x34/0x68 [] xattr_getsecurity+0xe0/0x160 [] vfs_getxattr+0xc8/0x120 [] getxattr+0x100/0x2c8 [] SyS_fgetxattr+0x64/0xa0 [] el0_svc_naked+0x24/0x28 If user get root access and calls security.selinux setxattr() with an embedded NUL on a file and then if some process performs a getxattr() on that file with a length greater than the actual length of the string, it would result in a panic. To fix this, add the actual length of the string to the security context instead of the length passed by the userspace process. Signed-off-by: Sachin Grover Cc: stable@vger.kernel.org Signed-off-by: Paul Moore security/selinux/ss/services.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 801dff41ba482dc539c8ecab73192bcd8665bb29 Merge: b04e217 65b3bdc Author: Dave Airlie Date: Wed May 30 10:00:01 2018 +1000 Merge tag 'drm-intel-fixes-2018-05-29' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix for potential Spectre vector in the new query uAPI - Fix NULL pointer deref (FDO #106559) - DMI fix to hide LVDS for Radiant P845 (FDO #105468) * tag 'drm-intel-fixes-2018-05-29' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915/query: nospec expects no more than an unsigned long drm/i915/query: Protect tainted function pointer lookup drm/i915/lvds: Move acpi lid notification registration to registration phase drm/i915: Disable LVDS on Radiant P845 commit 91fc957a61fac43f05dfbe1877bc371271f4dd5f Merge: 3d661e2 1fba586 Author: Linus Torvalds Date: Tue May 29 15:30:16 2018 -0500 Merge tag 'afs-fixes-20180529' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS fixes from David Howells: - fix a BUG triggerable from faccessat() - fix the mounting of backup volumes * tag 'afs-fixes-20180529' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Fix mounting of backup volumes afs: Fix directory permissions check commit 20fa2ff0441eabc8e6263b428191228d9599ea9d Author: Leo (Sunpeng) Li Date: Tue May 29 09:51:51 2018 -0400 drm/amd/display: Fix BUG_ON during CRTC atomic check update For cases where the CRTC is inactive (DPMS off), where a modeset is not required, yet the CRTC is still in the atomic state, we should not attempt to update anything on it. Previously, we were relying on the modereset_required() helper to check the above condition. However, the function returns false immediately if a modeset is not required, ignoring the CRTC's enable/active state flags. The correct way to filter is by looking at these flags instead. Fixes: e277adc5a06c "drm/amd/display: Hookup color management functions" Bugzilla: https://bugs.freedesktop.org/106194 Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Tested-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 43b4d1e122914c87e26bd83f6c0a1c50ddf31178 Merge: eedffa2 c97f414 Author: Jens Axboe Date: Tue May 29 12:54:12 2018 -0600 Merge branch 'nvme-4.17' of git://git.infradead.org/nvme into for-linus Pull NVMe fix from Christoph: "Below is a one-liner fix from Max that unbreaks T10-DIF support, which got broken in 4.15." * 'nvme-4.17' of git://git.infradead.org/nvme: nvme: fix extended data LBA supported setting commit c97f414c54a255f4f05a50a2625efaeee406e134 Author: Max Gurtovoy Date: Sun May 27 18:50:10 2018 +0300 nvme: fix extended data LBA supported setting This value depands on the metadata support value, so reorder the initialization to fit. Fixes: b5be3b392 ("nvme: always unregister the integrity profile in __nvme_revalidate_disk") Signed-off-by: Max Gurtovoy Signed-off-by: Christoph Hellwig Cc: stable@vger.kernel.org drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0ccb6b54bdde16885ac99f49ee8031cf1c71abe Author: Federico Vaga Date: Mon May 28 10:59:14 2018 +0200 i2c: ocores: update HDL sources URL The URL is broken. This patch fixes it. Signed-off-by: Federico Vaga [wsa: shortened the URL a bit] Signed-off-by: Wolfram Sang Documentation/i2c/busses/i2c-ocores | 2 +- drivers/i2c/busses/i2c-ocores.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a840c93ca7582bb6c88df2345a33f979b7a67874 Author: Parav Pandit Date: Sun May 27 14:49:16 2018 +0300 IB/core: Fix error code for invalid GID entry When a GID entry is invalid EAGAIN is returned. This is an incorrect error code, there is nothing that will make this GID entry valid again in bounded time. Some user space tools fail incorrectly if EAGAIN is returned here, and this represents a small ABI change from earlier kernels. The first patch in the Fixes list makes entries that were valid before to become invalid, allowing this code to trigger, while the second patch in the Fixes list introduced the wrong EAGAIN. Therefore revert the return result to EINVAL which matches the historical expectations of the ibv_query_gid_type() API of the libibverbs user space library. Cc: Fixes: 598ff6bae689 ("IB/core: Refactor GID modify code for RoCE") Fixes: 03db3a2d81e6 ("IB/core: Add RoCE GID table management") Reviewed-by: Daniel Jurgens Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6547e387d7f52f2ba681a229de3c13e5b9e01ee1 Author: Toshiaki Makita Date: Mon May 28 19:37:49 2018 +0900 tun: Fix NULL pointer dereference in XDP redirect Calling XDP redirection requires bh disabled. Softirq can call another XDP function and redirection functions, then the percpu static variable ri->map can be overwritten to NULL. This is a generic XDP case called from tun. [ 3535.736058] BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 [ 3535.743974] PGD 0 P4D 0 [ 3535.746530] Oops: 0000 [#1] SMP PTI [ 3535.750049] Modules linked in: vhost_net vhost tap tun bridge stp llc ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter sunrpc vfat fat ext4 mbcache jbd2 intel_rapl skx_edac nfit libnvdimm x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm ipmi_ssif irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc ses aesni_intel crypto_simd cryptd enclosure hpwdt hpilo glue_helper ipmi_si pcspkr wmi mei_me ioatdma mei ipmi_devintf shpchp dca ipmi_msghandler lpc_ich acpi_power_meter sch_fq_codel ip_tables xfs libcrc32c sd_mod mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm smartpqi i40e crc32c_intel scsi_transport_sas tg3 i2c_core ptp pps_core [ 3535.813456] CPU: 5 PID: 1630 Comm: vhost-1614 Not tainted 4.17.0-rc4 #2 [ 3535.820127] Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 11/14/2017 [ 3535.828732] RIP: 0010:__xdp_map_lookup_elem+0x5/0x30 [ 3535.833740] RSP: 0018:ffffb4bc47bf7c58 EFLAGS: 00010246 [ 3535.839009] RAX: ffff9fdfcfea1c40 RBX: 0000000000000000 RCX: ffff9fdf27fe3100 [ 3535.846205] RDX: ffff9fdfca769200 RSI: 0000000000000000 RDI: 0000000000000000 [ 3535.853402] RBP: ffffb4bc491d9000 R08: 00000000000045ad R09: 0000000000000ec0 [ 3535.860597] R10: 0000000000000001 R11: ffff9fdf26c3ce4e R12: ffff9fdf9e72c000 [ 3535.867794] R13: 0000000000000000 R14: fffffffffffffff2 R15: ffff9fdfc82cdd00 [ 3535.874990] FS: 0000000000000000(0000) GS:ffff9fdfcfe80000(0000) knlGS:0000000000000000 [ 3535.883152] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3535.888948] CR2: 0000000000000018 CR3: 0000000bde724004 CR4: 00000000007626e0 [ 3535.896145] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 3535.903342] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 3535.910538] PKRU: 55555554 [ 3535.913267] Call Trace: [ 3535.915736] xdp_do_generic_redirect+0x7a/0x310 [ 3535.920310] do_xdp_generic.part.117+0x285/0x370 [ 3535.924970] tun_get_user+0x5b9/0x1260 [tun] [ 3535.929279] tun_sendmsg+0x52/0x70 [tun] [ 3535.933237] handle_tx+0x2ad/0x5f0 [vhost_net] [ 3535.937721] vhost_worker+0xa5/0x100 [vhost] [ 3535.942030] kthread+0xf5/0x130 [ 3535.945198] ? vhost_dev_ioctl+0x3b0/0x3b0 [vhost] [ 3535.950031] ? kthread_bind+0x10/0x10 [ 3535.953727] ret_from_fork+0x35/0x40 [ 3535.957334] Code: 0e 74 15 83 f8 10 75 05 e9 49 aa b3 ff f3 c3 0f 1f 80 00 00 00 00 f3 c3 e9 29 9d b3 ff 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 <8b> 47 18 83 f8 0e 74 0d 83 f8 10 75 05 e9 49 a9 b3 ff 31 c0 c3 [ 3535.976387] RIP: __xdp_map_lookup_elem+0x5/0x30 RSP: ffffb4bc47bf7c58 [ 3535.982883] CR2: 0000000000000018 [ 3535.987096] ---[ end trace 383b299dd1430240 ]--- [ 3536.131325] Kernel panic - not syncing: Fatal exception [ 3536.137484] Kernel Offset: 0x26a00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) [ 3536.281406] ---[ end Kernel panic - not syncing: Fatal exception ]--- And a kernel with generic case fixed still panics in tun driver XDP redirect, because it disabled only preemption, but not bh. [ 2055.128746] BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 [ 2055.136662] PGD 0 P4D 0 [ 2055.139219] Oops: 0000 [#1] SMP PTI [ 2055.142736] Modules linked in: vhost_net vhost tap tun bridge stp llc ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter sunrpc vfat fat ext4 mbcache jbd2 intel_rapl skx_edac nfit libnvdimm x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc ses aesni_intel ipmi_ssif crypto_simd enclosure cryptd hpwdt glue_helper ioatdma hpilo wmi dca pcspkr ipmi_si acpi_power_meter ipmi_devintf shpchp mei_me ipmi_msghandler mei lpc_ich sch_fq_codel ip_tables xfs libcrc32c sd_mod mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm i40e smartpqi tg3 scsi_transport_sas crc32c_intel i2c_core ptp pps_core [ 2055.206142] CPU: 6 PID: 1693 Comm: vhost-1683 Tainted: G W 4.17.0-rc5-fix-tun+ #1 [ 2055.215011] Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 11/14/2017 [ 2055.223617] RIP: 0010:__xdp_map_lookup_elem+0x5/0x30 [ 2055.228624] RSP: 0018:ffff998b07607cc0 EFLAGS: 00010246 [ 2055.233892] RAX: ffff8dbd8e235700 RBX: ffff8dbd8ff21c40 RCX: 0000000000000004 [ 2055.241089] RDX: ffff998b097a9000 RSI: 0000000000000000 RDI: 0000000000000000 [ 2055.248286] RBP: 0000000000000000 R08: 00000000000065a8 R09: 0000000000005d80 [ 2055.255483] R10: 0000000000000040 R11: ffff8dbcf0100000 R12: ffff998b097a9000 [ 2055.262681] R13: ffff8dbd8c98c000 R14: 0000000000000000 R15: ffff998b07607d78 [ 2055.269879] FS: 0000000000000000(0000) GS:ffff8dbd8ff00000(0000) knlGS:0000000000000000 [ 2055.278039] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2055.283834] CR2: 0000000000000018 CR3: 0000000c0c8cc005 CR4: 00000000007626e0 [ 2055.291030] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2055.298227] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2055.305424] PKRU: 55555554 [ 2055.308153] Call Trace: [ 2055.310624] xdp_do_redirect+0x7b/0x380 [ 2055.314499] tun_get_user+0x10fe/0x12a0 [tun] [ 2055.318895] tun_sendmsg+0x52/0x70 [tun] [ 2055.322852] handle_tx+0x2ad/0x5f0 [vhost_net] [ 2055.327337] vhost_worker+0xa5/0x100 [vhost] [ 2055.331646] kthread+0xf5/0x130 [ 2055.334813] ? vhost_dev_ioctl+0x3b0/0x3b0 [vhost] [ 2055.339646] ? kthread_bind+0x10/0x10 [ 2055.343343] ret_from_fork+0x35/0x40 [ 2055.346950] Code: 0e 74 15 83 f8 10 75 05 e9 e9 aa b3 ff f3 c3 0f 1f 80 00 00 00 00 f3 c3 e9 c9 9d b3 ff 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 <8b> 47 18 83 f8 0e 74 0d 83 f8 10 75 05 e9 e9 a9 b3 ff 31 c0 c3 [ 2055.366004] RIP: __xdp_map_lookup_elem+0x5/0x30 RSP: ffff998b07607cc0 [ 2055.372500] CR2: 0000000000000018 [ 2055.375856] ---[ end trace 2a2dcc5e9e174268 ]--- [ 2055.523626] Kernel panic - not syncing: Fatal exception [ 2055.529796] Kernel Offset: 0x2e000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) [ 2055.677539] ---[ end Kernel panic - not syncing: Fatal exception ]--- v2: - Removed preempt_disable/enable since local_bh_disable will prevent preemption as well, feedback from Jason Wang. Fixes: 761876c857cb ("tap: XDP support") Signed-off-by: Toshiaki Makita Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/tun.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit d2c2725c2cdbcc108a191f50953d31c7b6556761 Author: Suresh Reddy Date: Mon May 28 01:26:06 2018 -0400 be2net: Fix error detection logic for BE3 Check for 0xE00 (RECOVERABLE_ERR) along with ARMFW UE (0x0) in be_detect_error() to know whether the error is valid error or not Fixes: 673c96e5a ("be2net: Fix UE detection logic for BE3") Signed-off-by: Suresh Reddy Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2415f3bd059fe050eb98aedf93664d000ceb4e92 Author: Josh Hill Date: Sun May 27 20:10:41 2018 -0400 net: qmi_wwan: Add Netgear Aircard 779S Add support for Netgear Aircard 779S Signed-off-by: Josh Hill Acked-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit 47bf9df2e8201d07c40670e093629f8dfd1b5d9f Author: Petr Machata Date: Sun May 27 09:48:41 2018 +0300 mlxsw: spectrum: Forbid creation of VLAN 1 over port/LAG VLAN 1 is internally used for untagged traffic. Prevent creation of explicit netdevice for that VLAN, because that currently isn't supported and leads to the NULL pointer dereference cited below. Fix by preventing creation of VLAN devices with VID of 1 over mlxsw devices or LAG devices that involve mlxsw devices. [ 327.175816] ================================================================================ [ 327.184544] UBSAN: Undefined behaviour in drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c:200:12 [ 327.193667] member access within null pointer of type 'const struct mlxsw_sp_fid' [ 327.201226] CPU: 0 PID: 8983 Comm: ip Not tainted 4.17.0-rc4-petrm_net_ip6gre_headroom-custom-140 #11 [ 327.210496] Hardware name: Mellanox Technologies Ltd. "MSN2410-CB2F"/"SA000874", BIOS 4.6.5 03/08/2016 [ 327.219872] Call Trace: [ 327.222384] dump_stack+0xc3/0x12b [ 327.234007] ubsan_epilogue+0x9/0x49 [ 327.237638] ubsan_type_mismatch_common+0x1f9/0x2d0 [ 327.255769] __ubsan_handle_type_mismatch+0x90/0xa7 [ 327.264716] mlxsw_sp_fid_type+0x35/0x50 [mlxsw_spectrum] [ 327.270255] mlxsw_sp_port_vlan_router_leave+0x46/0xc0 [mlxsw_spectrum] [ 327.277019] mlxsw_sp_inetaddr_port_vlan_event+0xe1/0x340 [mlxsw_spectrum] [ 327.315031] mlxsw_sp_netdevice_vrf_event+0xa8/0x100 [mlxsw_spectrum] [ 327.321626] mlxsw_sp_netdevice_event+0x276/0x430 [mlxsw_spectrum] [ 327.367863] notifier_call_chain+0x4c/0x150 [ 327.372128] __netdev_upper_dev_link+0x1b3/0x260 [ 327.399450] vrf_add_slave+0xce/0x170 [vrf] [ 327.403703] do_setlink+0x658/0x1d70 [ 327.508998] rtnl_newlink+0x908/0xf20 [ 327.559128] rtnetlink_rcv_msg+0x50c/0x720 [ 327.571720] netlink_rcv_skb+0x16a/0x1f0 [ 327.583450] netlink_unicast+0x2ca/0x3e0 [ 327.599305] netlink_sendmsg+0x3e2/0x7f0 [ 327.616655] sock_sendmsg+0x76/0xc0 [ 327.620207] ___sys_sendmsg+0x494/0x5d0 [ 327.666117] __sys_sendmsg+0xc2/0x130 [ 327.690953] do_syscall_64+0x66/0x370 [ 327.694677] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 327.699782] RIP: 0033:0x7f4c2f3f8037 [ 327.703393] RSP: 002b:00007ffe8c389708 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 327.711035] RAX: ffffffffffffffda RBX: 000000005b03f53e RCX: 00007f4c2f3f8037 [ 327.718229] RDX: 0000000000000000 RSI: 00007ffe8c389760 RDI: 0000000000000003 [ 327.725431] RBP: 00007ffe8c389760 R08: 0000000000000000 R09: 00007f4c2f443630 [ 327.732632] R10: 00000000000005eb R11: 0000000000000246 R12: 0000000000000000 [ 327.739833] R13: 00000000006774e0 R14: 00007ffe8c3897e8 R15: 0000000000000000 [ 327.747096] ================================================================================ Fixes: 9589a7b5d7d9 ("mlxsw: spectrum: Handle VLAN devices linking / unlinking") Suggested-by: Ido Schimmel Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 5 +++++ 1 file changed, 5 insertions(+) commit f9c6442a8f0b1dde9e755eb4ff6fa22bcce4eabc Author: Ivan Bornyakov Date: Fri May 25 20:49:52 2018 +0300 atm: zatm: fix memcmp casting memcmp() returns int, but eprom_try_esi() cast it to unsigned char. One can lose significant bits and get 0 from non-0 value returned by the memcmp(). Signed-off-by: Ivan Bornyakov Signed-off-by: David S. Miller drivers/atm/zatm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3d661e2a2d1cf0ad1ce54d690f05e755da59e6c9 Merge: 786b71f 2824f50 Author: Linus Torvalds Date: Tue May 29 07:28:48 2018 -0500 Merge tag 'trace-v4.17-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "While writing selftests for a new feature, I triggered two existing bugs that deal with triggers and instances. - a generic trigger bug where the triggers are not removed from a linked list properly when deleting an instance. - a bug specific to snapshots, where the snapshot is done in the top level buffer, when it is supposed to snapshot the buffer associated to the instance the snapshot trigger exists in" * tag 'trace-v4.17-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Make the snapshot trigger work with instances tracing: Fix crash when freeing instances with event triggers commit 65b3bdc807ac7bd83f5b27bc2c29a3c631eed7dd Author: Chris Wilson Date: Tue May 22 13:10:18 2018 +0100 drm/i915/query: nospec expects no more than an unsigned long nospec quite reasonably asserts that it will never be used with an index larger than unsigned long (that being the largest possibly index into an C array). However, our ubi uses the convention of u64 for any large integer, running afoul of the assertion on 32b. Reduce our index to an unsigned long, checking for type overflow first. drivers/gpu/drm/i915/i915_query.c: In function 'i915_query_ioctl': include/linux/compiler.h:339:38: error: call to '__compiletime_assert_119' declared with attribute error: BUILD_BUG_ON failed: sizeof(_s) > sizeof(long) Reported-by: kbuild-all@01.org Fixes: 84b510e22da7 ("drm/i915/query: Protect tainted function pointer lookup") Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20180522121018.15199-1-chris@chris-wilson.co.uk (cherry picked from commit a33b1dc8a732144e11cb4bf067d24ba51e6b8ab0) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_query.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ab1068d6866e28bf6427ceaea681a381e5870a4a Author: Hao Wei Tee Date: Tue May 29 10:25:17 2018 +0300 iwlwifi: pcie: compare with number of IRQs requested for, not number of CPUs When there are 16 or more logical CPUs, we request for `IWL_MAX_RX_HW_QUEUES` (16) IRQs only as we limit to that number of IRQs, but later on we compare the number of IRQs returned to nr_online_cpus+2 instead of max_irqs, the latter being what we actually asked for. This ends up setting num_rx_queues to 17 which causes lots of out-of-bounds array accesses later on. Compare to max_irqs instead, and also add an assertion in case num_rx_queues > IWM_MAX_RX_HW_QUEUES. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=199551 Fixes: 2e5d4a8f61dc ("iwlwifi: pcie: Add new configuration to enable MSIX") Signed-off-by: Hao Wei Tee Tested-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 52a192362932f333a7ebafd581c4d9b81da2fec8 Author: Stanislaw Gruszka Date: Mon May 28 13:25:06 2018 +0200 Revert "rt2800: use TXOP_BACKOFF for probe frames" This reverts commit fb47ada8dc3c30c8e7b415da155742b49536c61e. In some situations when we set TXOP_BACKOFF, the probe frame is not sent at all. What it worse then sending probe frame as part of AMPDU and can degrade 11n performance to 11g rates. Cc: stable@vger.kernel.org Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 312564269535892cc082bc80592150cd1f5e8ec3 Author: Ard Biesheuvel Date: Fri May 25 14:50:37 2018 +0200 net: netsec: reduce DMA mask to 40 bits The netsec network controller IP can drive 64 address bits for DMA, and the DMA mask is set accordingly in the driver. However, the SynQuacer SoC, which is the only silicon incorporating this IP at the moment, integrates this IP in a manner that leaves address bits [63:40] unconnected. Up until now, this has not resulted in any problems, given that the DDR controller doesn't decode those bits to begin with. However, recent firmware updates for platforms incorporating this SoC allow the IOMMU to be enabled, which does decode address bits [47:40], and allocates top down from the IOVA space, producing DMA addresses that have bits set that have been left unconnected. Both the DT and ACPI (IORT) descriptions of the platform take this into account, and only describe a DMA address space of 40 bits (using either dma-ranges DT properties, or DMA address limits in IORT named component nodes). However, even though our IOMMU and bus layers may take such limitations into account by setting a narrower DMA mask when creating the platform device, the netsec probe() entrypoint follows the common practice of setting the DMA mask uncondionally, according to the capabilities of the IP block itself rather than to its integration into the chip. It is currently unclear what the correct fix is here. We could hack around it by only setting the DMA mask if it deviates from its default value of DMA_BIT_MASK(32). However, this makes it impossible for the bus layer to use DMA_BIT_MASK(32) as the bus limit, and so it appears that a more comprehensive approach is required to take DMA limits imposed by the SoC as a whole into account. In the mean time, let's limit the DMA mask to 40 bits. Given that there is currently only one SoC that incorporates this IP, this is a reasonable approach that can be backported to -stable and buys us some time to come up with a proper fix going forward. Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver") Cc: Robin Murphy Cc: Jassi Brar Cc: Masahisa Kojima Cc: Ilias Apalodimas Signed-off-by: Ard Biesheuvel Reviewed-by: Robin Murphy Acked-by: Jassi Brar Signed-off-by: David S. Miller drivers/net/ethernet/socionext/netsec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bbb40a0b75209734ff9286f3326171638c9f6569 Author: Mathieu Xhonneux Date: Fri May 25 13:29:41 2018 +0100 ipv6: sr: fix memory OOB access in seg6_do_srh_encap/inline seg6_do_srh_encap and seg6_do_srh_inline can possibly do an out-of-bounds access when adding the SRH to the packet. This no longer happen when expanding the skb not only by the size of the SRH (+ outer IPv6 header), but also by skb->mac_len. [ 53.793056] BUG: KASAN: use-after-free in seg6_do_srh_encap+0x284/0x620 [ 53.794564] Write of size 14 at addr ffff88011975ecfa by task ping/674 [ 53.796665] CPU: 0 PID: 674 Comm: ping Not tainted 4.17.0-rc3-ARCH+ #90 [ 53.796670] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-20171110_100015-anatol 04/01/2014 [ 53.796673] Call Trace: [ 53.796679] [ 53.796689] dump_stack+0x71/0xab [ 53.796700] print_address_description+0x6a/0x270 [ 53.796707] kasan_report+0x258/0x380 [ 53.796715] ? seg6_do_srh_encap+0x284/0x620 [ 53.796722] memmove+0x34/0x50 [ 53.796730] seg6_do_srh_encap+0x284/0x620 [ 53.796741] ? seg6_do_srh+0x29b/0x360 [ 53.796747] seg6_do_srh+0x29b/0x360 [ 53.796756] seg6_input+0x2e/0x2e0 [ 53.796765] lwtunnel_input+0x93/0xd0 [ 53.796774] ipv6_rcv+0x690/0x920 [ 53.796783] ? ip6_input+0x170/0x170 [ 53.796791] ? eth_gro_receive+0x2d0/0x2d0 [ 53.796800] ? ip6_input+0x170/0x170 [ 53.796809] __netif_receive_skb_core+0xcc0/0x13f0 [ 53.796820] ? netdev_info+0x110/0x110 [ 53.796827] ? napi_complete_done+0xb6/0x170 [ 53.796834] ? e1000_clean+0x6da/0xf70 [ 53.796845] ? process_backlog+0x129/0x2a0 [ 53.796853] process_backlog+0x129/0x2a0 [ 53.796862] net_rx_action+0x211/0x5c0 [ 53.796870] ? napi_complete_done+0x170/0x170 [ 53.796887] ? run_rebalance_domains+0x11f/0x150 [ 53.796891] __do_softirq+0x10e/0x39e [ 53.796894] do_softirq_own_stack+0x2a/0x40 [ 53.796895] [ 53.796898] do_softirq.part.16+0x54/0x60 [ 53.796900] __local_bh_enable_ip+0x5b/0x60 [ 53.796903] ip6_finish_output2+0x416/0x9f0 [ 53.796906] ? ip6_dst_lookup_flow+0x110/0x110 [ 53.796909] ? ip6_sk_dst_lookup_flow+0x390/0x390 [ 53.796911] ? __rcu_read_unlock+0x66/0x80 [ 53.796913] ? ip6_mtu+0x44/0xf0 [ 53.796916] ? ip6_output+0xfc/0x220 [ 53.796918] ip6_output+0xfc/0x220 [ 53.796921] ? ip6_finish_output+0x2b0/0x2b0 [ 53.796923] ? memcpy+0x34/0x50 [ 53.796926] ip6_send_skb+0x43/0xc0 [ 53.796929] rawv6_sendmsg+0x1216/0x1530 [ 53.796932] ? __orc_find+0x6b/0xc0 [ 53.796934] ? rawv6_rcv_skb+0x160/0x160 [ 53.796937] ? __rcu_read_unlock+0x66/0x80 [ 53.796939] ? __rcu_read_unlock+0x66/0x80 [ 53.796942] ? is_bpf_text_address+0x1e/0x30 [ 53.796944] ? kernel_text_address+0xec/0x100 [ 53.796946] ? __kernel_text_address+0xe/0x30 [ 53.796948] ? unwind_get_return_address+0x2f/0x50 [ 53.796950] ? __save_stack_trace+0x92/0x100 [ 53.796954] ? save_stack+0x89/0xb0 [ 53.796956] ? kasan_kmalloc+0xa0/0xd0 [ 53.796958] ? kmem_cache_alloc+0xd2/0x1f0 [ 53.796961] ? prepare_creds+0x23/0x160 [ 53.796963] ? __x64_sys_capset+0x252/0x3e0 [ 53.796966] ? do_syscall_64+0x69/0x160 [ 53.796968] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 53.796971] ? __alloc_pages_nodemask+0x170/0x380 [ 53.796973] ? __alloc_pages_slowpath+0x12c0/0x12c0 [ 53.796977] ? tty_vhangup+0x20/0x20 [ 53.796979] ? policy_nodemask+0x1a/0x90 [ 53.796982] ? __mod_node_page_state+0x8d/0xa0 [ 53.796986] ? __check_object_size+0xe7/0x240 [ 53.796989] ? __sys_sendto+0x229/0x290 [ 53.796991] ? rawv6_rcv_skb+0x160/0x160 [ 53.796993] __sys_sendto+0x229/0x290 [ 53.796996] ? __ia32_sys_getpeername+0x50/0x50 [ 53.796999] ? commit_creds+0x2de/0x520 [ 53.797002] ? security_capset+0x57/0x70 [ 53.797004] ? __x64_sys_capset+0x29f/0x3e0 [ 53.797007] ? __x64_sys_rt_sigsuspend+0xe0/0xe0 [ 53.797011] ? __do_page_fault+0x664/0x770 [ 53.797014] __x64_sys_sendto+0x74/0x90 [ 53.797017] do_syscall_64+0x69/0x160 [ 53.797019] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 53.797022] RIP: 0033:0x7f43b7a6714a [ 53.797023] RSP: 002b:00007ffd891bd368 EFLAGS: 00000246 ORIG_RAX: 000000000000002c [ 53.797026] RAX: ffffffffffffffda RBX: 00000000006129c0 RCX: 00007f43b7a6714a [ 53.797028] RDX: 0000000000000040 RSI: 00000000006129c0 RDI: 0000000000000004 [ 53.797029] RBP: 00007ffd891be640 R08: 0000000000610940 R09: 000000000000001c [ 53.797030] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000040 [ 53.797032] R13: 000000000060e6a0 R14: 0000000000008004 R15: 000000000040b661 [ 53.797171] Allocated by task 642: [ 53.797460] kasan_kmalloc+0xa0/0xd0 [ 53.797463] kmem_cache_alloc+0xd2/0x1f0 [ 53.797465] getname_flags+0x40/0x210 [ 53.797467] user_path_at_empty+0x1d/0x40 [ 53.797469] do_faccessat+0x12a/0x320 [ 53.797471] do_syscall_64+0x69/0x160 [ 53.797473] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 53.797607] Freed by task 642: [ 53.797869] __kasan_slab_free+0x130/0x180 [ 53.797871] kmem_cache_free+0xa8/0x230 [ 53.797872] filename_lookup+0x15b/0x230 [ 53.797874] do_faccessat+0x12a/0x320 [ 53.797876] do_syscall_64+0x69/0x160 [ 53.797878] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 53.798014] The buggy address belongs to the object at ffff88011975e600 which belongs to the cache names_cache of size 4096 [ 53.799043] The buggy address is located 1786 bytes inside of 4096-byte region [ffff88011975e600, ffff88011975f600) [ 53.800013] The buggy address belongs to the page: [ 53.800414] page:ffffea000465d600 count:1 mapcount:0 mapping:0000000000000000 index:0x0 compound_mapcount: 0 [ 53.801259] flags: 0x17fff0000008100(slab|head) [ 53.801640] raw: 017fff0000008100 0000000000000000 0000000000000000 0000000100070007 [ 53.803147] raw: dead000000000100 dead000000000200 ffff88011b185a40 0000000000000000 [ 53.803787] page dumped because: kasan: bad access detected [ 53.804384] Memory state around the buggy address: [ 53.804788] ffff88011975eb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.805384] ffff88011975ec00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.805979] >ffff88011975ec80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.806577] ^ [ 53.807165] ffff88011975ed00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.807762] ffff88011975ed80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.808356] ================================================================== [ 53.808949] Disabling lock debugging due to kernel taint Fixes: 6c8702c60b88 ("ipv6: sr: add support for SRH encapsulation and injection with lwtunnels") Signed-off-by: David Lebrun Signed-off-by: Mathieu Xhonneux Signed-off-by: David S. Miller net/ipv6/seg6_iptunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 513acc5b746b8b86eb4f97efe2d874fd3087ff99 Merge: bc2dbc5 bbb8c61 Author: David S. Miller Date: Mon May 28 22:39:09 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS fixes for net The following patchset contains Netfilter/IPVS fixes for your net tree: 1) Null pointer dereference when dumping conntrack helper configuration, from Taehee Yoo. 2) Missing sanitization in ebtables extension name through compat, from Paolo Abeni. 3) Broken fetch of tracing value, from Taehee Yoo. 4) Incorrect arithmetics in packet ratelimiting. 5) Buffer overflow in IPVS sync daemon, from Julian Anastasov. 6) Wrong argument to nla_strlcpy() in nfnetlink_{acct,cthelper}, from Eric Dumazet. 7) Fix splat in nft_update_chain_stats(). 8) Null pointer dereference from object netlink dump path, from Taehee Yoo. 9) Missing static_branch_inc() when enabling counters in existing chain, from Taehee Yoo. ==================== Signed-off-by: David S. Miller commit c9ddf73476ff4fffb7a87bd5107a0705bf2cf64b Author: Bart Van Assche Date: Mon May 21 11:17:29 2018 -0700 scsi: scsi_transport_srp: Fix shost to rport translation Since an SRP remote port is attached as a child to shost->shost_gendev and as the only child, the translation from the shost pointer into an rport pointer must happen by looking up the shost child that is an rport. This patch fixes the following KASAN complaint: BUG: KASAN: slab-out-of-bounds in srp_timed_out+0x57/0x110 [scsi_transport_srp] Read of size 4 at addr ffff880035d3fcc0 by task kworker/1:0H/19 CPU: 1 PID: 19 Comm: kworker/1:0H Not tainted 4.16.0-rc3-dbg+ #1 Workqueue: kblockd blk_mq_timeout_work Call Trace: dump_stack+0x85/0xc7 print_address_description+0x65/0x270 kasan_report+0x231/0x350 srp_timed_out+0x57/0x110 [scsi_transport_srp] scsi_times_out+0xc7/0x3f0 [scsi_mod] blk_mq_terminate_expired+0xc2/0x140 bt_iter+0xbc/0xd0 blk_mq_queue_tag_busy_iter+0x1c7/0x350 blk_mq_timeout_work+0x325/0x3f0 process_one_work+0x441/0xa50 worker_thread+0x76/0x6c0 kthread+0x1b2/0x1d0 ret_from_fork+0x24/0x30 Fixes: e68ca75200fe ("scsi_transport_srp: Reduce failover time") Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Laurence Oberman Cc: stable@vger.kernel.org Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_srp.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit bbb8c61f97e3a2dd91b30d3e57b7964a67569d11 Author: Taehee Yoo Date: Tue May 29 01:14:12 2018 +0900 netfilter: nf_tables: increase nft_counters_enabled in nft_chain_stats_replace() When a chain is updated, a counter can be attached. if so, the nft_counters_enabled should be increased. test commands: %nft add table ip filter %nft add chain ip filter input { type filter hook input priority 4\; } %iptables-compat -Z input %nft delete chain ip filter input we can see below messages. [ 286.443720] jump label: negative count! [ 286.448278] WARNING: CPU: 0 PID: 1459 at kernel/jump_label.c:197 __static_key_slow_dec_cpuslocked+0x6f/0xf0 [ 286.449144] Modules linked in: nf_tables nfnetlink ip_tables x_tables [ 286.449144] CPU: 0 PID: 1459 Comm: nft Tainted: G W 4.17.0-rc2+ #12 [ 286.449144] RIP: 0010:__static_key_slow_dec_cpuslocked+0x6f/0xf0 [ 286.449144] RSP: 0018:ffff88010e5176f0 EFLAGS: 00010286 [ 286.449144] RAX: 000000000000001b RBX: ffffffffc0179500 RCX: ffffffffb8a82522 [ 286.449144] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffff88011b7e5eac [ 286.449144] RBP: 0000000000000000 R08: ffffed00236fce5c R09: ffffed00236fce5b [ 286.449144] R10: ffffffffc0179503 R11: ffffed00236fce5c R12: 0000000000000000 [ 286.449144] R13: ffff88011a28e448 R14: ffff88011a28e470 R15: dffffc0000000000 [ 286.449144] FS: 00007f0384328700(0000) GS:ffff88011b600000(0000) knlGS:0000000000000000 [ 286.449144] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 286.449144] CR2: 00007f038394bf10 CR3: 0000000104a86000 CR4: 00000000001006f0 [ 286.449144] Call Trace: [ 286.449144] static_key_slow_dec+0x6a/0x70 [ 286.449144] nf_tables_chain_destroy+0x19d/0x210 [nf_tables] [ 286.449144] nf_tables_commit+0x1891/0x1c50 [nf_tables] [ 286.449144] nfnetlink_rcv+0x1148/0x13d0 [nfnetlink] [ ... ] Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 360cc79d9d299ce297b205508276285ceffc5fa8 Author: Taehee Yoo Date: Tue May 29 01:13:45 2018 +0900 netfilter: nf_tables: fix NULL-ptr in nf_tables_dump_obj() The table field in nft_obj_filter is not an array. In order to check tablename, we should check if the pointer is set. Test commands: %nft add table ip filter %nft add counter ip filter ct1 %nft reset counters Splat looks like: [ 306.510504] kasan: CONFIG_KASAN_INLINE enabled [ 306.516184] kasan: GPF could be caused by NULL-ptr deref or user memory access [ 306.524775] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 306.528284] Modules linked in: nft_objref nft_counter nf_tables nfnetlink ip_tables x_tables [ 306.528284] CPU: 0 PID: 1488 Comm: nft Not tainted 4.17.0-rc4+ #17 [ 306.528284] Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/08/2015 [ 306.528284] RIP: 0010:nf_tables_dump_obj+0x52c/0xa70 [nf_tables] [ 306.528284] RSP: 0018:ffff8800b6cb7520 EFLAGS: 00010246 [ 306.528284] RAX: 0000000000000000 RBX: ffff8800b6c49820 RCX: 0000000000000000 [ 306.528284] RDX: 0000000000000000 RSI: dffffc0000000000 RDI: ffffed0016d96e9a [ 306.528284] RBP: ffff8800b6cb75c0 R08: ffffed00236fce7c R09: ffffed00236fce7b [ 306.528284] R10: ffffffff9f6241e8 R11: ffffed00236fce7c R12: ffff880111365108 [ 306.528284] R13: 0000000000000000 R14: ffff8800b6c49860 R15: ffff8800b6c49860 [ 306.528284] FS: 00007f838b007700(0000) GS:ffff88011b600000(0000) knlGS:0000000000000000 [ 306.528284] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 306.528284] CR2: 00007ffeafabcf78 CR3: 00000000b6cbe000 CR4: 00000000001006f0 [ 306.528284] Call Trace: [ 306.528284] netlink_dump+0x470/0xa20 [ 306.528284] __netlink_dump_start+0x5ae/0x690 [ 306.528284] ? nf_tables_getobj+0x1b3/0x740 [nf_tables] [ 306.528284] nf_tables_getobj+0x2f5/0x740 [nf_tables] [ 306.528284] ? nft_obj_notify+0x100/0x100 [nf_tables] [ 306.528284] ? nf_tables_getobj+0x740/0x740 [nf_tables] [ 306.528284] ? nf_tables_dump_flowtable_done+0x70/0x70 [nf_tables] [ 306.528284] ? nft_obj_notify+0x100/0x100 [nf_tables] [ 306.528284] nfnetlink_rcv_msg+0x8ff/0x932 [nfnetlink] [ 306.528284] ? nfnetlink_rcv_msg+0x216/0x932 [nfnetlink] [ 306.528284] netlink_rcv_skb+0x1c9/0x2f0 [ 306.528284] ? nfnetlink_bind+0x1d0/0x1d0 [nfnetlink] [ 306.528284] ? debug_check_no_locks_freed+0x270/0x270 [ 306.528284] ? netlink_ack+0x7a0/0x7a0 [ 306.528284] ? ns_capable_common+0x6e/0x110 [ ... ] Fixes: e46abbcc05aa8 ("netfilter: nf_tables: Allow table names of up to 255 chars") Signed-off-by: Taehee Yoo Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ad9d9e85072b668731f356be0a3750a3ba22a607 Author: Pablo Neira Ayuso Date: Sun May 27 21:08:13 2018 +0200 netfilter: nf_tables: disable preemption in nft_update_chain_stats() This patch fixes the following splat. [118709.054937] BUG: using smp_processor_id() in preemptible [00000000] code: test/1571 [118709.054970] caller is nft_update_chain_stats.isra.4+0x53/0x97 [nf_tables] [118709.054980] CPU: 2 PID: 1571 Comm: test Not tainted 4.17.0-rc6+ #335 [...] [118709.054992] Call Trace: [118709.055011] dump_stack+0x5f/0x86 [118709.055026] check_preemption_disabled+0xd4/0xe4 Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2824f5033248600673e3e126a4d135363cbfd9ac Author: Steven Rostedt (VMware) Date: Mon May 28 10:56:36 2018 -0400 tracing: Make the snapshot trigger work with instances The snapshot trigger currently only affects the main ring buffer, even when it is used by the instances. This can be confusing as the snapshot trigger is listed in the instance. > # cd /sys/kernel/tracing > # mkdir instances/foo > # echo snapshot > instances/foo/events/syscalls/sys_enter_fchownat/trigger > # echo top buffer > trace_marker > # echo foo buffer > instances/foo/trace_marker > # touch /tmp/bar > # chown rostedt /tmp/bar > # cat instances/foo/snapshot # tracer: nop # # # * Snapshot is freed * # # Snapshot commands: # echo 0 > snapshot : Clears and frees snapshot buffer # echo 1 > snapshot : Allocates snapshot buffer, if not already allocated. # Takes a snapshot of the main buffer. # echo 2 > snapshot : Clears snapshot buffer (but does not allocate or free) # (Doesn't have to be '2' works with any number that # is not a '0' or '1') > # cat snapshot # tracer: nop # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / delay # TASK-PID CPU# |||| TIMESTAMP FUNCTION # | | | |||| | | bash-1189 [000] .... 111.488323: tracing_mark_write: top buffer Not only did the snapshot occur in the top level buffer, but the instance snapshot buffer should have been allocated, and it is still free. Cc: stable@vger.kernel.org Fixes: 85f2b08268c01 ("tracing: Add basic event trigger framework") Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 12 ++++++------ kernel/trace/trace.h | 11 +++++++++++ kernel/trace/trace_events_trigger.c | 10 ++++++++-- 3 files changed, 25 insertions(+), 8 deletions(-) commit 533d1daea8d8a389b37207ad7b50c4e750969231 Author: Arnd Bergmann Date: Fri May 25 23:29:59 2018 +0200 IB: Revert "remove redundant INFINIBAND kconfig dependencies" Several subsystems depend on INFINIBAND_ADDR_TRANS, which in turn depends on INFINIBAND. However, when with CONFIG_INIFIBAND=m, this leads to a link error when another driver using it is built-in. The INFINIBAND_ADDR_TRANS dependency is insufficient here as this is a 'bool' symbol that does not force anything to be a module in turn. fs/cifs/smbdirect.o: In function `smbd_disconnect_rdma_work': smbdirect.c:(.text+0x1e4): undefined reference to `rdma_disconnect' net/9p/trans_rdma.o: In function `rdma_request': trans_rdma.c:(.text+0x7bc): undefined reference to `rdma_disconnect' net/9p/trans_rdma.o: In function `rdma_destroy_trans': trans_rdma.c:(.text+0x830): undefined reference to `ib_destroy_qp' trans_rdma.c:(.text+0x858): undefined reference to `ib_dealloc_pd' Fixes: 9533b292a7ac ("IB: remove redundant INFINIBAND kconfig dependencies") Signed-off-by: Arnd Bergmann Acked-by: Greg Thelen Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/srpt/Kconfig | 2 +- drivers/nvme/host/Kconfig | 2 +- drivers/nvme/target/Kconfig | 2 +- drivers/staging/lustre/lnet/Kconfig | 2 +- fs/cifs/Kconfig | 2 +- net/9p/Kconfig | 2 +- net/rds/Kconfig | 2 +- net/sunrpc/Kconfig | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit 786b71f5b754273ccef6d9462e52062b3e1f9877 Merge: b04e217 a30e7d1 Author: Linus Torvalds Date: Mon May 28 05:25:57 2018 -0700 Merge tag 'nds32-for-linus-4.17-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux Pull nds32 fixes from Greentime Hu: "Bug fixes and build error fixes for nds32" * tag 'nds32-for-linus-4.17-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux: nds32: Fix compiler warning, Wstringop-overflow, in vdso.c nds32: Disable local irq before calling cpu_dcache_wb_page in copy_user_highpage nds32: Flush the cache of the page at vmaddr instead of kaddr in flush_anon_page nds32: Correct flush_dcache_page function nds32: Fix the unaligned access handler nds32: Renaming the file for unaligned access nds32: To fix a cache inconsistency issue by setting correct cacheability of NTC nds32: To refine readability of INT_MASK_INITAIAL_VAL nds32: Fix the virtual address may map too much range by tlbop issue. nds32: Fix the allmodconfig build. To make sure CONFIG_CPU_LITTLE_ENDIAN is default y nds32: Fix build failed because arch_trace_hardirqs_off is changed to trace_hardirqs_off. nds32: Fix the unknown type u8 issue. nds32: Fix the symbols undefined issue by exporting them. nds32: Fix xfs_buf built failed by export invalidate_kernel_vmap_range and flush_kernel_vmap_range nds32: Fix drivers/gpu/drm/udl/udl_fb.c building error by defining PAGE_SHARED nds32: Fix building error of crypto/xor.c by adding xor.h nds32: Fix building error when CONFIG_FREEZE is enabled. nds32: lib: To use generic lib instead of libgcc to prevent the symbol undefined issue. commit 540ead8c5a0e2910fc7bf0839982921c8f11b31c Author: Chris Wilson Date: Mon May 21 22:05:30 2018 +0100 drm/i915/query: Protect tainted function pointer lookup Smatch identifies i915_query_ioctl() as being a potential victim of Spectre due to its use of a tainted user index into a function pointer array. Use array_index_nospec() to defang the user index before using it to lookup the function pointer. Fixes: a446ae2c6e65 ("drm/i915: add query uAPI") Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20180521210530.26008-1-chris@chris-wilson.co.uk (cherry picked from commit 84b510e22da7926522a257cfe295d3695346a0bd) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_query.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit b9eb9c92899a509fe258d38dd6c214b1de69eee0 Author: Chris Wilson Date: Fri May 18 08:48:40 2018 +0100 drm/i915/lvds: Move acpi lid notification registration to registration phase Delay registering ourselves with the acpi lid notification mechanism until we are registering the connectors after initialisation is complete. This prevents a possibility of trying to handle the lid notification before we are ready with the danger of chasing uninitialised function pointers. BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 IP: (null) PGD 0 P4D 0 Oops: 0010 [#1] PREEMPT SMP PTI Modules linked in: arc4(+) iwldvm(+) i915(+) mac80211 i2c_algo_bit coretemp mei_wdt iwlwifi drm_kms_helper kvm_intel wmi_bmof iTCO_wdt iTCO_vendor_support kvm snd_hda_codec_conexant snd_hda_codec_generic drm psmouse cfg80211 irqbypass input_leds pcspkr i2c_i801 snd_hda_intel snd_hda_codec thinkpad_acpi snd_hda_core mei_me lpc_ich snd_hwdep e1000e wmi nvram snd_pcm mei snd_timer shpchp ptp pps_core rfkill syscopyarea snd intel_agp sysfillrect intel_gtt soundcore sysimgblt battery led_class fb_sys_fops ac rtc_cmos agpgart evdev mac_hid acpi_cpufreq ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 fscrypto crypto_simd glue_helper cryptd aes_x86_64 xts algif_skcipher af_alg dm_crypt dm_mod sd_mod uas usb_storage serio_raw atkbd libps2 ahci libahci uhci_hcd libata scsi_mod ehci_pci ehci_hcd usbcore usb_common i8042 serio CPU: 1 PID: 378 Comm: systemd-logind Not tainted 4.16.8-1-ARCH #1 Hardware name: LENOVO 7454CTO/7454CTO, BIOS 6DET72WW (3.22 ) 10/25/2012 RIP: 0010: (null) RSP: 0018:ffffaf4580c33a18 EFLAGS: 00010287 RAX: 0000000000000000 RBX: ffff947533558000 RCX: 000000000000003e RDX: ffffffffc0aa80c0 RSI: ffffaf4580c33a3c RDI: ffff947534e4c000 RBP: ffff947533558338 R08: ffff947534598930 R09: ffffffffc0a928b1 R10: ffffd8f181d5fd40 R11: 0000000000000000 R12: ffffffffc0a928b1 R13: ffff947533558368 R14: ffffffffc0a928a9 R15: ffff947534e4c000 FS: 00007f3dc4ddb940(0000) GS:ffff947539280000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000006e214000 CR4: 00000000000406e0 Call Trace: ? intel_modeset_setup_hw_state+0x385/0xf60 [i915] ? __intel_display_resume+0x1e/0xc0 [i915] ? intel_display_resume+0xcc/0x120 [i915] ? intel_lid_notify+0xbc/0xc0 [i915] ? notifier_call_chain+0x47/0x70 ? blocking_notifier_call_chain+0x3e/0x60 ? acpi_lid_notify_state+0x8f/0x1d0 ? acpi_lid_update_state+0x49/0x70 ? acpi_lid_input_open+0x60/0x90 ? input_open_device+0x5d/0xa0 ? evdev_open+0x1ba/0x1e0 [evdev] ? chrdev_open+0xa3/0x1b0 ? cdev_put.part.0+0x20/0x20 ? do_dentry_open+0x14c/0x300 ? path_openat+0x30c/0x1240 ? current_time+0x16/0x60 ? do_filp_open+0x93/0x100 ? __check_object_size+0xfb/0x180 ? do_sys_open+0x186/0x210 ? do_syscall_64+0x74/0x190 ? entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Code: Bad RIP value. RIP: (null) RSP: ffffaf4580c33a18 CR2: 0000000000000000 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106559 Fixes: c1c7af608920 ("drm/i915: force mode set at lid open time") Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: Ville Syrjälä Cc: Daniel Vetter Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180518074840.16194-1-chris@chris-wilson.co.uk Cc: stable@vger.kernel.org (cherry picked from commit e578a570dc7c20475774d1ff993825e3bd7a7011) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_lvds.c | 43 +++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 11 deletions(-) commit b3fb22733ae61050f8d10a1d6a8af176c5c5db1a Author: Ondrej Zary Date: Fri Mar 9 23:22:04 2018 +0100 drm/i915: Disable LVDS on Radiant P845 Radiant P845 does not have LVDS, only VGA. Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105468 Signed-off-by: Ondrej Zary Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180309222204.4771-1-linux@rainbow-software.org (cherry picked from commit 7f7105f99b75aca4f8c2a748ed6b82c7f8be3293) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_lvds.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 86b389ff22bd6ad8fd3cb98e41cd271886c6d023 Author: Steven Rostedt (VMware) Date: Sun May 27 20:54:44 2018 -0400 tracing: Fix crash when freeing instances with event triggers If a instance has an event trigger enabled when it is freed, it could cause an access of free memory. Here's the case that crashes: # cd /sys/kernel/tracing # mkdir instances/foo # echo snapshot > instances/foo/events/initcall/initcall_start/trigger # rmdir instances/foo Would produce: general protection fault: 0000 [#1] PREEMPT SMP PTI Modules linked in: tun bridge ... CPU: 5 PID: 6203 Comm: rmdir Tainted: G W 4.17.0-rc4-test+ #933 Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v03.03 07/14/2016 RIP: 0010:clear_event_triggers+0x3b/0x70 RSP: 0018:ffffc90003783de0 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 6b6b6b6b6b6b6b2b RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8800c7130ba0 RBP: ffffc90003783e00 R08: ffff8801131993f8 R09: 0000000100230016 R10: ffffc90003783d80 R11: 0000000000000000 R12: ffff8800c7130ba0 R13: ffff8800c7130bd8 R14: ffff8800cc093768 R15: 00000000ffffff9c FS: 00007f6f4aa86700(0000) GS:ffff88011eb40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f6f4a5aed60 CR3: 00000000cd552001 CR4: 00000000001606e0 Call Trace: event_trace_del_tracer+0x2a/0xc5 instance_rmdir+0x15c/0x200 tracefs_syscall_rmdir+0x52/0x90 vfs_rmdir+0xdb/0x160 do_rmdir+0x16d/0x1c0 __x64_sys_rmdir+0x17/0x20 do_syscall_64+0x55/0x1a0 entry_SYSCALL_64_after_hwframe+0x49/0xbe This was due to the call the clears out the triggers when an instance is being deleted not removing the trigger from the link list. Cc: stable@vger.kernel.org Fixes: 85f2b08268c01 ("tracing: Add basic event trigger framework") Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_trigger.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b04e217704b7f879c6b91222b066983a44a7a09f Author: Linus Torvalds Date: Sun May 27 13:01:47 2018 -0700 Linux 4.17-rc7 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 861d9dd375269c695be8860387b4bb522f8b490a Merge: 7fbb615 8438ee7 Author: Linus Torvalds Date: Sun May 27 09:27:27 2018 -0700 Merge tag 'kbuild-fixes-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull more Kbuild fixes from Masahiro Yamada: - enable '-fno-tree-loop-im' only when supported - add '-fno-PIE' option before the asm-goto test * tag 'kbuild-fixes-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: Makefile: disable PIE before testing asm goto kbuild: gcov: enable -fno-tree-loop-im if supported commit 7fbb6157630f2ba6ee355689061f9596b84373ef Merge: b2096a5 e5dd615 Author: Linus Torvalds Date: Sat May 26 14:05:16 2018 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "A few more fixes for v4.17: - a fix for a crash in scm_call_atomic on qcom platforms - display fix for Allwinner A10 - a fix that re-enables ethernet on Allwinner H3 (C.H.I.P et al) - a fix for eMMC corruption on hikey - i2c-gpio descriptor tables for ixp4xx ... plus a small typo fix" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: Fix i2c-gpio GPIO descriptor tables arm64: dts: hikey: Fix eMMC corruption regression firmware: qcom: scm: Fix crash in qcom_scm_call_atomic1() ARM: sun8i: v3s: fix spelling mistake: "disbaled" -> "disabled" ARM: dts: sun4i: Fix incorrect clocks for displays ARM: dts: sun8i: h3: Re-enable EMAC on Orange Pi One commit b2096a5e071ab9e9856375d1da2c6209cc57690f Merge: cc71efd 8ecc497 Author: Linus Torvalds Date: Sat May 26 13:24:16 2018 -0700 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 store buffer fixes from Thomas Gleixner: "Two fixes for the SSBD mitigation code: - expose SSBD properly to guests. This got broken when the CPU feature flags got reshuffled. - simplify the CPU detection logic to avoid duplicate entries in the tables" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/speculation: Simplify the CPU bug detection logic KVM/VMX: Expose SSBD properly to guests commit cc71efda829413b734a2349ed4b9de1ac012bbc2 Merge: ec30dcf 4ff648d Author: Linus Torvalds Date: Sat May 26 13:10:16 2018 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "Three fixes for scheduler and kthread code: - allow calling kthread_park() on an already parked thread - restore the sched_pi_setprio() tracepoint behaviour - clarify the unclear string for the scheduling domain debug output" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched, tracing: Fix trace_sched_pi_setprio() for deboosting kthread: Allow kthread_park() on a parked kthread sched/topology: Clarify root domain(s) debug string commit e5dd61546a777d19d4fe35e2d0a2b664ca49f6b2 Merge: f59c303 9c6d26d Author: Olof Johansson Date: Sat May 26 12:12:44 2018 -0700 Merge tag 'hisi-fixes-for-4.17v2' of git://github.com/hisilicon/linux-hisi into fixes ARM64: hisi fixes for 4.17 - Remove eMMC max-frequency property to fix eMMC corruption on hikey board * tag 'hisi-fixes-for-4.17v2' of git://github.com/hisilicon/linux-hisi: arm64: dts: hikey: Fix eMMC corruption regression Signed-off-by: Olof Johansson commit f59c303b59b7404e5da70b80b6340b199cb95650 Author: Linus Walleij Date: Sat May 26 18:37:34 2018 +0200 ARM: Fix i2c-gpio GPIO descriptor tables I used bad names in my clumsiness when rewriting many board files to use GPIO descriptors instead of platform data. A few had the platform_device ID set to -1 which would indeed give the device name "i2c-gpio". But several had it set to >=0 which gives the names "i2c-gpio.0", "i2c-gpio.1" ... Fix the offending instances in the ARM tree. Sorry for the mess. Fixes: b2e63555592f ("i2c: gpio: Convert to use descriptors") Cc: Wolfram Sang Cc: Simon Guinot Reported-by: Simon Guinot Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/mach-ep93xx/core.c | 2 +- arch/arm/mach-ixp4xx/avila-setup.c | 2 +- arch/arm/mach-ixp4xx/dsmg600-setup.c | 2 +- arch/arm/mach-ixp4xx/fsg-setup.c | 2 +- arch/arm/mach-ixp4xx/ixdp425-setup.c | 2 +- arch/arm/mach-ixp4xx/nas100d-setup.c | 2 +- arch/arm/mach-ixp4xx/nslu2-setup.c | 2 +- arch/arm/mach-pxa/palmz72.c | 2 +- arch/arm/mach-pxa/viper.c | 4 ++-- arch/arm/mach-sa1100/simpad.c | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) commit ec30dcf7f425dc811ac365b5c4b0f097f98e569f Merge: bc2dbc5 696ca77 Author: Linus Torvalds Date: Sat May 26 10:46:57 2018 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "PPC: - Close a hole which could possibly lead to the host timebase getting out of sync. - Three fixes relating to PTEs and TLB entries for radix guests. - Fix a bug which could lead to an interrupt never getting delivered to the guest, if it is pending for a guest vCPU when the vCPU gets offlined. s390: - Fix false negatives in VSIE validity check (Cc stable) x86: - Fix time drift of VMX preemption timer when a guest uses LAPIC timer in periodic mode (Cc stable) - Unconditionally expose CPUID.IA32_ARCH_CAPABILITIES to allow migration from hosts that don't need retpoline mitigation (Cc stable) - Fix guest crashes on reboot by properly coupling CR4.OSXSAVE and CPUID.OSXSAVE (Cc stable) - Report correct RIP after Hyper-V hypercall #UD (introduced in -rc6)" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: fix #UD address of failed Hyper-V hypercalls kvm: x86: IA32_ARCH_CAPABILITIES is always supported KVM: x86: Update cpuid properly when CR4.OSXAVE or CR4.PKE is changed x86/kvm: fix LAPIC timer drift when guest uses periodic mode KVM: s390: vsie: fix < 8k check for the itdba KVM: PPC: Book 3S HV: Do ptesync in radix guest exit path KVM: PPC: Book3S HV: XIVE: Resend re-routed interrupts on CPU priority change KVM: PPC: Book3S HV: Make radix clear pte when unmapping KVM: PPC: Book3S HV: Make radix use correct tlbie sequence in kvmppc_radix_tlbie_page KVM: PPC: Book3S HV: Snapshot timebase offset on guest entry commit 9c6d26df1fae6ad4718d51c48e6517913304ed27 Author: John Stultz Date: Fri May 25 20:10:47 2018 -0700 arm64: dts: hikey: Fix eMMC corruption regression This patch is a partial revert of commit abd7d0972a19 ("arm64: dts: hikey: Enable HS200 mode on eMMC") which has been causing eMMC corruption on my HiKey board. Symptoms usually looked like: mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) ... mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) mmc0: new HS200 MMC card at address 0001 ... dwmmc_k3 f723d000.dwmmc0: Unexpected command timeout, state 3 mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) print_req_error: I/O error, dev mmcblk0, sector 8810504 Aborting journal on device mmcblk0p10-8. mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) mmc_host mmc0: Bus speed (slot 0) = 24800000Hz (slot req 400000Hz, actual 400000HZ div = 31) mmc_host mmc0: Bus speed (slot 0) = 148800000Hz (slot req 150000000Hz, actual 148800000HZ div = 0) EXT4-fs error (device mmcblk0p10): ext4_journal_check_start:61: Detected aborted journal EXT4-fs (mmcblk0p10): Remounting filesystem read-only And quite often this would result in a disk that wouldn't properly boot even with older kernels. It seems the max-frequency property added by the above patch is causing the problem, so remove it. Cc: Ryan Grachek Cc: Wei Xu Cc: Arnd Bergmann Cc: Ulf Hansson Cc: YongQin Liu Cc: Leo Yan Signed-off-by: John Stultz Tested-by: Leo Yan Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 - 1 file changed, 1 deletion(-) commit bf4407f081f33466ef0b06e213c04264d356aa35 Author: Antoine Tenart Date: Thu May 17 15:22:14 2018 +0200 crypto: inside-secure - do not use memset on MMIO This patch fixes the Inside Secure driver which uses a memtset() call to set an MMIO area from the cryptographic engine to 0. This is wrong as memset() isn't guaranteed to work on MMIO for many reasons. This led to kernel paging request panics in certain cases. Use memset_io() instead. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Reported-by: Ofer Heifetz Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 806e30873f0e74d9d41b0ef761bd4d3e55c7d510 Author: Greg Kroah-Hartman Date: Sat May 26 08:49:24 2018 +0200 hwtracing: stm: fix build error on some arches Commit b5e2ced9bf81 ("stm class: Use vmalloc for the master map") caused a build error on some arches as vmalloc.h was not explicitly included. Fix that by adding it to the list of includes. Fixes: b5e2ced9bf81 ("stm class: Use vmalloc for the master map") Reported-by: kbuild test robot Cc: Alexander Shishkin Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/stm/core.c | 1 + 1 file changed, 1 insertion(+) commit bc2dbc5420e82560e650f8531ceca597441ca171 Merge: 03250e10 3f19597 Author: Linus Torvalds Date: Fri May 25 20:24:28 2018 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "16 fixes" * emailed patches from Andrew Morton : kasan: fix memory hotplug during boot kasan: free allocated shadow memory on MEM_CANCEL_ONLINE checkpatch: fix macro argument precedence test init/main.c: include kernel/sys.c: fix potential Spectre v1 issue mm/memory_hotplug: fix leftover use of struct page during hotplug proc: fix smaps and meminfo alignment mm: do not warn on offline nodes unless the specific node is explicitly requested mm, memory_hotplug: make has_unmovable_pages more robust mm/kasan: don't vfree() nonexistent vm_area MAINTAINERS: change hugetlbfs maintainer and update files ipc/shm: fix shmat() nil address after round-down when remapping Revert "ipc/shm: Fix shmat mmap nil-page protection" idr: fix invalid ptr dereference on item delete ocfs2: revert "ocfs2/o2hb: check len for bio_add_page() to avoid getting incorrect bio" mm: fix nr_rotate_swap leak in swapon() error case commit 03250e1028057173b212341015d5fbf53327042c Merge: 62d18ec eb11041 Author: Linus Torvalds Date: Fri May 25 19:54:42 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "Let's begin the holiday weekend with some networking fixes: 1) Whoops need to restrict cfg80211 wiphy names even more to 64 bytes. From Eric Biggers. 2) Fix flags being ignored when using kernel_connect() with SCTP, from Xin Long. 3) Use after free in DCCP, from Alexey Kodanev. 4) Need to check rhltable_init() return value in ipmr code, from Eric Dumazet. 5) XDP handling fixes in virtio_net from Jason Wang. 6) Missing RTA_TABLE in rtm_ipv4_policy[], from Roopa Prabhu. 7) Need to use IRQ disabling spinlocks in mlx4_qp_lookup(), from Jack Morgenstein. 8) Prevent out-of-bounds speculation using indexes in BPF, from Daniel Borkmann. 9) Fix regression added by AF_PACKET link layer cure, from Willem de Bruijn. 10) Correct ENIC dma mask, from Govindarajulu Varadarajan. 11) Missing config options for PMTU tests, from Stefano Brivio" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (48 commits) ibmvnic: Fix partial success login retries selftests/net: Add missing config options for PMTU tests mlx4_core: allocate ICM memory in page size chunks enic: set DMA mask to 47 bit ppp: remove the PPPIOCDETACH ioctl ipv4: remove warning in ip_recv_error net : sched: cls_api: deal with egdev path only if needed vhost: synchronize IOTLB message with dev cleanup packet: fix reserve calculation net/mlx5: IPSec, Fix a race between concurrent sandbox QP commands net/mlx5e: When RXFCS is set, add FCS data into checksum calculation bpf: properly enforce index mask to prevent out-of-bounds speculation net/mlx4: Fix irq-unsafe spinlock usage net: phy: broadcom: Fix bcm_write_exp() net: phy: broadcom: Fix auxiliary control register reads net: ipv4: add missing RTA_TABLE to rtm_ipv4_policy net/mlx4: fix spelling mistake: "Inrerface" -> "Interface" and rephrase message ibmvnic: Only do H_EOI for mobility events tuntap: correctly set SOCKWQ_ASYNC_NOSPACE virtio-net: fix leaking page for gso packet during mergeable XDP ... commit 3f1959721558a976aaf9c2024d5bc884e6411bf7 Author: David Hildenbrand Date: Fri May 25 14:48:11 2018 -0700 kasan: fix memory hotplug during boot Using module_init() is wrong. E.g. ACPI adds and onlines memory before our memory notifier gets registered. This makes sure that ACPI memory detected during boot up will not result in a kernel crash. Easily reproducible with QEMU, just specify a DIMM when starting up. Link: http://lkml.kernel.org/r/20180522100756.18478-3-david@redhat.com Fixes: 786a8959912e ("kasan: disable memory hotplug") Signed-off-by: David Hildenbrand Acked-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/kasan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed1596f9ab958dd156a66c9ff1029d3761c1786a Author: David Hildenbrand Date: Fri May 25 14:48:08 2018 -0700 kasan: free allocated shadow memory on MEM_CANCEL_ONLINE We have to free memory again when we cancel onlining, otherwise a later onlining attempt will fail. Link: http://lkml.kernel.org/r/20180522100756.18478-2-david@redhat.com Fixes: fa69b5989bb0 ("mm/kasan: add support for memory hotplug") Signed-off-by: David Hildenbrand Acked-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/kasan.c | 1 + 1 file changed, 1 insertion(+) commit d41362ed12b6402f0bba044037653f916757c3b2 Author: Joe Perches Date: Fri May 25 14:48:04 2018 -0700 checkpatch: fix macro argument precedence test checkpatch's macro argument precedence test is broken so fix it. Link: http://lkml.kernel.org/r/5dd900e9197febc1995604bb33c23c136d8b33ce.camel@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae67d58d0546ad3e1ef323d69de6c3708022791f Author: Mathieu Malaterre Date: Fri May 25 14:48:00 2018 -0700 init/main.c: include In commit c7753208a94c ("x86, swiotlb: Add memory encryption support") a call to function `mem_encrypt_init' was added. Include prototype defined in header to prevent a warning reported during compilation with W=1: init/main.c:494:20: warning: no previous prototype for `mem_encrypt_init' [-Wmissing-prototypes] Link: http://lkml.kernel.org/r/20180522195533.31415-1-malat@debian.org Signed-off-by: Mathieu Malaterre Reviewed-by: Andrew Morton Acked-by: Steven Rostedt (VMware) Cc: Tom Lendacky Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Kees Cook Cc: Laura Abbott Cc: Dominik Brodowski Cc: Gargi Sharma Cc: Josh Poimboeuf Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/main.c | 1 + 1 file changed, 1 insertion(+) commit 23d6aef74da86a33fa6bb75f79565e0a16ee97c2 Author: Gustavo A. R. Silva Date: Fri May 25 14:47:57 2018 -0700 kernel/sys.c: fix potential Spectre v1 issue `resource' can be controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: kernel/sys.c:1474 __do_compat_sys_old_getrlimit() warn: potential spectre issue 'get_current()->signal->rlim' (local cap) kernel/sys.c:1455 __do_sys_old_getrlimit() warn: potential spectre issue 'get_current()->signal->rlim' (local cap) Fix this by sanitizing *resource* before using it to index current->signal->rlim Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Link: http://lkml.kernel.org/r/20180515030038.GA11822@embeddedor.com Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andrew Morton Cc: Alexei Starovoitov Cc: Dan Williams Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/sys.c | 5 +++++ 1 file changed, 5 insertions(+) commit a21558618c5dfc55b6086743a88ce5a9c1588f0a Author: Jonathan Cameron Date: Fri May 25 14:47:53 2018 -0700 mm/memory_hotplug: fix leftover use of struct page during hotplug The case of a new numa node got missed in avoiding using the node info from page_struct during hotplug. In this path we have a call to register_mem_sect_under_node (which allows us to specify it is hotplug so don't change the node), via link_mem_sections which unfortunately does not. Fix is to pass check_nid through link_mem_sections as well and disable it in the new numa node path. Note the bug only 'sometimes' manifests depending on what happens to be in the struct page structures - there are lots of them and it only needs to match one of them. The result of the bug is that (with a new memory only node) we never successfully call register_mem_sect_under_node so don't get the memory associated with the node in sysfs and meminfo for the node doesn't report it. It came up whilst testing some arm64 hotplug patches, but appears to be universal. Whilst I'm triggering it by removing then reinserting memory to a node with no other elements (thus making the node disappear then appear again), it appears it would happen on hotplugging memory where there was none before and it doesn't seem to be related the arm64 patches. These patches call __add_pages (where most of the issue was fixed by Pavel's patch). If there is a node at the time of the __add_pages call then all is well as it calls register_mem_sect_under_node from there with check_nid set to false. Without a node that function returns having not done the sysfs related stuff as there is no node to use. This is expected but it is the resulting path that fails... Exact path to the problem is as follows: mm/memory_hotplug.c: add_memory_resource() The node is not online so we enter the 'if (new_node)' twice, on the second such block there is a call to link_mem_sections which calls into drivers/node.c: link_mem_sections() which calls drivers/node.c: register_mem_sect_under_node() which calls get_nid_for_pfn and keeps trying until the output of that matches the expected node (passed all the way down from add_memory_resource) It is effectively the same fix as the one referred to in the fixes tag just in the code path for a new node where the comments point out we have to rerun the link creation because it will have failed in register_new_memory (as there was no node at the time). (actually that comment is wrong now as we don't have register_new_memory any more it got renamed to hotplug_memory_register in Pavel's patch). Link: http://lkml.kernel.org/r/20180504085311.1240-1-Jonathan.Cameron@huawei.com Fixes: fc44f7f9231a ("mm/memory_hotplug: don't read nid from struct page during hotplug") Signed-off-by: Jonathan Cameron Reviewed-by: Pavel Tatashin Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/node.c | 5 +++-- include/linux/node.h | 8 +++++--- mm/memory_hotplug.c | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) commit 6c04ab0eddc9a38e6c14ae4b6217db1e34436b8c Author: Hugh Dickins Date: Fri May 25 14:47:50 2018 -0700 proc: fix smaps and meminfo alignment The 4.17-rc /proc/meminfo and /proc//smaps look ugly: single-digit numbers (commonly 0) are misaligned. Remove seq_put_decimal_ull_width()'s leftover optimization for single digits: it's wrong now that num_to_str() takes care of the width. Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1805241554210.1326@eggly.anvils Fixes: d1be35cb6f96 ("proc: add seq_put_decimal_ull_width to speed up /proc/pid/smaps") Signed-off-by: Hugh Dickins Cc: Andrei Vagin Cc: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/seq_file.c | 5 ----- 1 file changed, 5 deletions(-) commit 8addc2d00fe171c89b5fcbafe583c2b90574d301 Author: Michal Hocko Date: Fri May 25 14:47:46 2018 -0700 mm: do not warn on offline nodes unless the specific node is explicitly requested Oscar has noticed that we splat WARNING: CPU: 0 PID: 64 at ./include/linux/gfp.h:467 vmemmap_alloc_block+0x4e/0xc9 [...] CPU: 0 PID: 64 Comm: kworker/u4:1 Tainted: G W E 4.17.0-rc5-next-20180517-1-default+ #66 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014 Workqueue: kacpi_hotplug acpi_hotplug_work_fn Call Trace: vmemmap_populate+0xf2/0x2ae sparse_mem_map_populate+0x28/0x35 sparse_add_one_section+0x4c/0x187 __add_pages+0xe7/0x1a0 add_pages+0x16/0x70 add_memory_resource+0xa3/0x1d0 add_memory+0xe4/0x110 acpi_memory_device_add+0x134/0x2e0 acpi_bus_attach+0xd9/0x190 acpi_bus_scan+0x37/0x70 acpi_device_hotplug+0x389/0x4e0 acpi_hotplug_work_fn+0x1a/0x30 process_one_work+0x146/0x340 worker_thread+0x47/0x3e0 kthread+0xf5/0x130 ret_from_fork+0x35/0x40 when adding memory to a node that is currently offline. The VM_WARN_ON is just too loud without a good reason. In this particular case we are doing alloc_pages_node(node, GFP_KERNEL|__GFP_RETRY_MAYFAIL|__GFP_NOWARN, order) so we do not insist on allocating from the given node (it is more a hint) so we can fall back to any other populated node and moreover we explicitly ask to not warn for the allocation failure. Soften the warning only to cases when somebody asks for the given node explicitly by __GFP_THISNODE. Link: http://lkml.kernel.org/r/20180523125555.30039-3-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Oscar Salvador Tested-by: Oscar Salvador Reviewed-by: Pavel Tatashin Cc: Vlastimil Babka Cc: Reza Arbab Cc: Igor Mammedov Cc: Vitaly Kuznetsov Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15c30bc0908514b4a72fadc3995d32313500393a Author: Michal Hocko Date: Fri May 25 14:47:42 2018 -0700 mm, memory_hotplug: make has_unmovable_pages more robust Oscar has reported: : Due to an unfortunate setting with movablecore, memblocks containing bootmem : memory (pages marked by get_page_bootmem()) ended up marked in zone_movable. : So while trying to remove that memory, the system failed in do_migrate_range : and __offline_pages never returned. : : This can be reproduced by running : qemu-system-x86_64 -m 6G,slots=8,maxmem=8G -numa node,mem=4096M -numa node,mem=2048M : and movablecore=4G kernel command line : : linux kernel: BIOS-provided physical RAM map: : linux kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable : linux kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved : linux kernel: BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved : linux kernel: BIOS-e820: [mem 0x0000000000100000-0x00000000bffdffff] usable : linux kernel: BIOS-e820: [mem 0x00000000bffe0000-0x00000000bfffffff] reserved : linux kernel: BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved : linux kernel: BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved : linux kernel: BIOS-e820: [mem 0x0000000100000000-0x00000001bfffffff] usable : linux kernel: NX (Execute Disable) protection: active : linux kernel: SMBIOS 2.8 present. : linux kernel: DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org : linux kernel: Hypervisor detected: KVM : linux kernel: e820: update [mem 0x00000000-0x00000fff] usable ==> reserved : linux kernel: e820: remove [mem 0x000a0000-0x000fffff] usable : linux kernel: last_pfn = 0x1c0000 max_arch_pfn = 0x400000000 : : linux kernel: SRAT: PXM 0 -> APIC 0x00 -> Node 0 : linux kernel: SRAT: PXM 1 -> APIC 0x01 -> Node 1 : linux kernel: ACPI: SRAT: Node 0 PXM 0 [mem 0x00000000-0x0009ffff] : linux kernel: ACPI: SRAT: Node 0 PXM 0 [mem 0x00100000-0xbfffffff] : linux kernel: ACPI: SRAT: Node 0 PXM 0 [mem 0x100000000-0x13fffffff] : linux kernel: ACPI: SRAT: Node 1 PXM 1 [mem 0x140000000-0x1bfffffff] : linux kernel: ACPI: SRAT: Node 0 PXM 0 [mem 0x1c0000000-0x43fffffff] hotplug : linux kernel: NUMA: Node 0 [mem 0x00000000-0x0009ffff] + [mem 0x00100000-0xbfffffff] -> [mem 0x0 : linux kernel: NUMA: Node 0 [mem 0x00000000-0xbfffffff] + [mem 0x100000000-0x13fffffff] -> [mem 0 : linux kernel: NODE_DATA(0) allocated [mem 0x13ffd6000-0x13fffffff] : linux kernel: NODE_DATA(1) allocated [mem 0x1bffd3000-0x1bfffcfff] : : zoneinfo shows that the zone movable is placed into both numa nodes: : Node 0, zone Movable : pages free 160140 : min 1823 : low 2278 : high 2733 : spanned 262144 : present 262144 : managed 245670 : Node 1, zone Movable : pages free 448427 : min 3827 : low 4783 : high 5739 : spanned 524288 : present 524288 : managed 515766 Note how only Node 0 has a hutplugable memory region which would rule it out from the early memblock allocations (most likely memmap). Node1 will surely contain memmaps on the same node and those would prevent offlining to succeed. So this is arguably a configuration issue. Although one could argue that we should be more clever and rule early allocations from the zone movable. This would be correct but probably not worth the effort considering what a hack movablecore is. Anyway, We could do better for those cases though. We rely on start_isolate_page_range resp. has_unmovable_pages to do their job. The first one isolates the whole range to be offlined so that we do not allocate from it anymore and the later makes sure we are not stumbling over non-migrateable pages. has_unmovable_pages is overly optimistic, however. It doesn't check all the pages if we are withing zone_movable because we rely that those pages will be always migrateable. As it turns out we are still not perfect there. While bootmem pages in zonemovable sound like a clear bug which should be fixed let's remove the optimization for now and warn if we encounter unmovable pages in zone_movable in the meantime. That should help for now at least. Btw. this wasn't a real problem until commit 72b39cfc4d75 ("mm, memory_hotplug: do not fail offlining too early") because we used to have a small number of retries and then failed. This turned out to be too fragile though. Link: http://lkml.kernel.org/r/20180523125555.30039-2-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Oscar Salvador Tested-by: Oscar Salvador Reviewed-by: Pavel Tatashin Cc: Vlastimil Babka Cc: Reza Arbab Cc: Igor Mammedov Cc: Vitaly Kuznetsov Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 0f901dcbc31f88ae41a2aaa365f7802b5d520a28 Author: Andrey Ryabinin Date: Fri May 25 14:47:38 2018 -0700 mm/kasan: don't vfree() nonexistent vm_area KASAN uses different routines to map shadow for hot added memory and memory obtained in boot process. Attempt to offline memory onlined by normal boot process leads to this: Trying to vfree() nonexistent vm area (000000005d3b34b9) WARNING: CPU: 2 PID: 13215 at mm/vmalloc.c:1525 __vunmap+0x147/0x190 Call Trace: kasan_mem_notifier+0xad/0xb9 notifier_call_chain+0x166/0x260 __blocking_notifier_call_chain+0xdb/0x140 __offline_pages+0x96a/0xb10 memory_subsys_offline+0x76/0xc0 device_offline+0xb8/0x120 store_mem_state+0xfa/0x120 kernfs_fop_write+0x1d5/0x320 __vfs_write+0xd4/0x530 vfs_write+0x105/0x340 SyS_write+0xb0/0x140 Obviously we can't call vfree() to free memory that wasn't allocated via vmalloc(). Use find_vm_area() to see if we can call vfree(). Unfortunately it's a bit tricky to properly unmap and free shadow allocated during boot, so we'll have to keep it. If memory will come online again that shadow will be reused. Matthew asked: how can you call vfree() on something that isn't a vmalloc address? vfree() is able to free any address returned by __vmalloc_node_range(). And __vmalloc_node_range() gives you any address you ask. It doesn't have to be an address in [VMALLOC_START, VMALLOC_END] range. That's also how the module_alloc()/module_memfree() works on architectures that have designated area for modules. [aryabinin@virtuozzo.com: improve comments] Link: http://lkml.kernel.org/r/dabee6ab-3a7a-51cd-3b86-5468718e0390@virtuozzo.com [akpm@linux-foundation.org: fix typos, reflow comment] Link: http://lkml.kernel.org/r/20180201163349.8700-1-aryabinin@virtuozzo.com Fixes: fa69b5989bb0 ("mm/kasan: add support for memory hotplug") Signed-off-by: Andrey Ryabinin Reported-by: Paul Menzel Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Matthew Wilcox Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/kasan.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) commit b9ddff9b85036292f8b6d4ac37e21fc229fedea1 Author: Mike Kravetz Date: Fri May 25 14:47:35 2018 -0700 MAINTAINERS: change hugetlbfs maintainer and update files The current hugetlbfs maintainer has not been active for more than a few years. I have been been active in this area for more than two years and plan to remain active in the foreseeable future. Also, update the hugetlbfs entry to include linux-mm mail list and additional hugetlbfs related files. hugetlb.c and hugetlb.h are not 100% hugetlbfs, but a majority of their content is hugetlbfs related. Link: http://lkml.kernel.org/r/20180518225236.19079-1-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Naoya Horiguchi Acked-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Nadia Yvette Chambers Cc: "Aneesh Kumar K . V" Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 8f89c007b6dec16a1793cb88de88fcc02117bbbc Author: Davidlohr Bueso Date: Fri May 25 14:47:30 2018 -0700 ipc/shm: fix shmat() nil address after round-down when remapping shmat()'s SHM_REMAP option forbids passing a nil address for; this is in fact the very first thing we check for. Andrea reported that for SHM_RND|SHM_REMAP cases we can end up bypassing the initial addr check, but we need to check again if the address was rounded down to nil. As of this patch, such cases will return -EINVAL. Link: http://lkml.kernel.org/r/20180503204934.kk63josdu6u53fbd@linux-n805 Signed-off-by: Davidlohr Bueso Reported-by: Andrea Arcangeli Cc: Joe Lawrence Cc: Manfred Spraul Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/shm.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit a73ab244f0dad8fffb3291b905f73e2d3eaa7c00 Author: Davidlohr Bueso Date: Fri May 25 14:47:27 2018 -0700 Revert "ipc/shm: Fix shmat mmap nil-page protection" Patch series "ipc/shm: shmat() fixes around nil-page". These patches fix two issues reported[1] a while back by Joe and Andrea around how shmat(2) behaves with nil-page. The first reverts a commit that it was incorrectly thought that mapping nil-page (address=0) was a no no with MAP_FIXED. This is not the case, with the exception of SHM_REMAP; which is address in the second patch. I chose two patches because it is easier to backport and it explicitly reverts bogus behaviour. Both patches ought to be in -stable and ltp testcases need updated (the added testcase around the cve can be modified to just test for SHM_RND|SHM_REMAP). [1] lkml.kernel.org/r/20180430172152.nfa564pvgpk3ut7p@linux-n805 This patch (of 2): Commit 95e91b831f87 ("ipc/shm: Fix shmat mmap nil-page protection") worked on the idea that we should not be mapping as root addr=0 and MAP_FIXED. However, it was reported that this scenario is in fact valid, thus making the patch both bogus and breaks userspace as well. For example X11's libint10.so relies on shmat(1, SHM_RND) for lowmem initialization[1]. [1] https://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/os-support/linux/int10/linux.c#n347 Link: http://lkml.kernel.org/r/20180503203243.15045-2-dave@stgolabs.net Fixes: 95e91b831f87 ("ipc/shm: Fix shmat mmap nil-page protection") Signed-off-by: Davidlohr Bueso Reported-by: Joe Lawrence Reported-by: Andrea Arcangeli Cc: Manfred Spraul Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/shm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 7a4deea1aa8bddfed4ef1b35fc2b6732563d8ad5 Author: Matthew Wilcox Date: Fri May 25 14:47:24 2018 -0700 idr: fix invalid ptr dereference on item delete If the radix tree underlying the IDR happens to be full and we attempt to remove an id which is larger than any id in the IDR, we will call __radix_tree_delete() with an uninitialised 'slot' pointer, at which point anything could happen. This was easiest to hit with a single entry at id 0 and attempting to remove a non-0 id, but it could have happened with 64 entries and attempting to remove an id >= 64. Roman said: The syzcaller test boils down to opening /dev/kvm, creating an eventfd, and calling a couple of KVM ioctls. None of this requires superuser. And the result is dereferencing an uninitialized pointer which is likely a crash. The specific path caught by syzbot is via KVM_HYPERV_EVENTD ioctl which is new in 4.17. But I guess there are other user-triggerable paths, so cc:stable is probably justified. Matthew added: We have around 250 calls to idr_remove() in the kernel today. Many of them pass an ID which is embedded in the object they're removing, so they're safe. Picking a few likely candidates: drivers/firewire/core-cdev.c looks unsafe; the ID comes from an ioctl. drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c is similar drivers/atm/nicstar.c could be taken down by a handcrafted packet Link: http://lkml.kernel.org/r/20180518175025.GD6361@bombadil.infradead.org Fixes: 0a835c4f090a ("Reimplement IDR and IDA using the radix tree") Reported-by: Debugged-by: Roman Kagan Signed-off-by: Matthew Wilcox Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/radix-tree.c | 4 +++- tools/testing/radix-tree/idr-test.c | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) commit 3373de209cb123462954740f41c324d03ecfb6d0 Author: Changwei Ge Date: Fri May 25 14:47:20 2018 -0700 ocfs2: revert "ocfs2/o2hb: check len for bio_add_page() to avoid getting incorrect bio" This reverts commit ba16ddfbeb9d ("ocfs2/o2hb: check len for bio_add_page() to avoid getting incorrect bio"). In my testing, this patch introduces a problem that mkfs can't have slots more than 16 with 4k block size. And the original logic is safe actually with the situation it mentions so revert this commit. Attach test log: (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 0, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 1, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 2, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 3, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 4, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 5, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 6, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 7, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 8, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 9, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 10, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 11, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 12, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 13, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 14, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 15, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:463 page 16, vec_len = 4096, vec_start = 0 (mkfs.ocfs2,27479,2):o2hb_setup_one_bio:471 ERROR: Adding page[16] to bio failed, page ffffea0002d7ed40, len 0, vec_len 4096, vec_start 0,bi_sector 8192 (mkfs.ocfs2,27479,2):o2hb_read_slots:500 ERROR: status = -5 (mkfs.ocfs2,27479,2):o2hb_populate_slot_data:1911 ERROR: status = -5 (mkfs.ocfs2,27479,2):o2hb_region_dev_write:2012 ERROR: status = -5 Link: http://lkml.kernel.org/r/SIXPR06MB0461721F398A5A92FC68C39ED5920@SIXPR06MB0461.apcprd06.prod.outlook.com Signed-off-by: Changwei Ge Cc: Jun Piao Cc: Yiwen Jiang Cc: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/cluster/heartbeat.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 7cbf319234adaa4518a28c8c523d3330e06638f0 Author: Omar Sandoval Date: Fri May 25 14:47:17 2018 -0700 mm: fix nr_rotate_swap leak in swapon() error case If swapon() fails after incrementing nr_rotate_swap, we don't decrement it and thus effectively leak it. Make sure we decrement it if we incremented it. Link: http://lkml.kernel.org/r/b6fe6b879f17fa68eee6cbd876f459f6e5e33495.1526491581.git.osandov@fb.com Fixes: 81a0298bdfab ("mm, swap: don't use VMA based swap readahead if HDD is used as swap") Signed-off-by: Omar Sandoval Reviewed-by: Rik van Riel Reviewed-by: "Huang, Ying" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 0ec46ab6425dfd4592989ca53fb6d8492e5d15dd Merge: f2c56aa 5ec3444 Author: Olof Johansson Date: Fri May 25 15:00:26 2018 -0700 Merge tag 'qcom-fixes-for-4.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into fixes Qualcomm Fixes for 4.17-rc7 * Fix crash in qcom_scm_call_atomic1() * tag 'qcom-fixes-for-4.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: firmware: qcom: scm: Fix crash in qcom_scm_call_atomic1() Signed-off-by: Olof Johansson commit f2c56aac9573c1bcb54d5c06f4a0d0f23532aad1 Merge: 771c577 d89ad4f Author: Olof Johansson Date: Fri May 25 14:03:53 2018 -0700 Merge tag 'sunxi-fixes-for-4.17' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into fixes Allwinner fixes for 4.17 Here is a bunch of fixes for merge issues, typos and wrong clocks being described for simplefb, resulting in non-working displays. * tag 'sunxi-fixes-for-4.17' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: sun8i: v3s: fix spelling mistake: "disbaled" -> "disabled" ARM: dts: sun4i: Fix incorrect clocks for displays ARM: dts: sun8i: h3: Re-enable EMAC on Orange Pi One Signed-off-by: Olof Johansson commit eb110410b9f6477726026669f3f0c0567e8241e6 Author: Thomas Falcon Date: Thu May 24 14:37:53 2018 -0500 ibmvnic: Fix partial success login retries In its current state, the driver will handle backing device login in a loop for a certain number of retries while the device returns a partial success, indicating that the driver may need to try again using a smaller number of resources. The variable it checks to continue retrying may change over the course of operations, resulting in reallocation of resources but exits without sending the login attempt. Guard against this by introducing a boolean variable that will retain the state indicating that the driver needs to reattempt login with backing device firmware. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit d2f30f5172603bacaf34f0fdb021c25ad1915b05 Merge: 24e4b07 c93552c Author: David S. Miller Date: Fri May 25 15:37:41 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-05-24 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix a bug in the original fix to prevent out of bounds speculation when multiple tail call maps from different branches or calls end up at the same tail call helper invocation, from Daniel. 2) Two selftest fixes, one in reuseport_bpf_numa where test is skipped in case of missing numa support and another one to update kernel config to properly support xdp_meta.sh test, from Anders. ... Would be great if you have a chance to merge net into net-next after that. The verifier fix would be needed later as a dependency in bpf-next for upcomig work there. When you do the merge there's a trivial conflict on BPF side with 849fa50662fb ("bpf/verifier: refine retval R0 state for bpf_get_stack helper"): Resolution is to keep both functions, the do_refine_retval_range() and record_func_map(). ==================== Signed-off-by: David S. Miller commit 696ca779a928d0e93d61c38ffc3a4d8914a9b9a0 Author: Radim Krčmář Date: Thu May 24 17:50:56 2018 +0200 KVM: x86: fix #UD address of failed Hyper-V hypercalls If the hypercall was called from userspace or real mode, KVM injects #UD and then advances RIP, so it looks like #UD was caused by the following instruction. This probably won't cause more than confusion, but could give an unexpected access to guest OS' instruction emulator. Also, refactor the code to count hv hypercalls that were handled by the virt userspace. Fixes: 6356ee0c9602 ("x86: Delay skip of emulated hypercall instruction") Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/hyperv.c | 19 +++++++++++-------- arch/x86/kvm/x86.c | 12 ++++-------- 2 files changed, 15 insertions(+), 16 deletions(-) commit 24e4b075d899e5376dfa39fecd1dbc12bddc1e98 Author: Stefano Brivio Date: Thu May 24 16:10:12 2018 +0200 selftests/net: Add missing config options for PMTU tests PMTU tests in pmtu.sh need support for VTI, VTI6 and dummy interfaces: add them to config file. Reported-by: Naresh Kamboju Fixes: d1f1b9cbf34c ("selftests: net: Introduce first PMTU test") Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/config | 5 +++++ 1 file changed, 5 insertions(+) commit e3ffec48b22f3427a576ab6ca58ba5e9c46923f2 Merge: 1383cb8 16116da Author: David S. Miller Date: Fri May 25 14:54:19 2018 -0400 Merge tag 'batadv-net-for-davem-20180524' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are some batman-adv bugfixes: - prevent hardif_put call with NULL parameter, by Colin Ian King - Avoid race in Translation Table allocator, by Sven Eckelmann - Fix Translation Table sync flags for intermediate Responses, by Linus Luessing - prevent sending inconsistent Translation Table TVLVs, by Marek Lindner ==================== Signed-off-by: David S. Miller commit 6e04b103568983bd699fac96b80a9b96ede68118 Author: Devesh Sharma Date: Fri May 25 12:01:21 2018 -0400 RDMA/bnxt_re: Fix broken RoCE driver due to recent L2 driver changes The recent changes in Broadcom's ethernet driver(L2 driver) broke RoCE functionality in terms of MSIx vector allocation and de-allocation. There is a possibility that L2 driver would initiate MSIx vector reallocation depending upon the requests coming from administrator. In such cases L2 driver needs to free up all the MSIx vectors allocated previously and reallocate/initialize those. If RoCE driver is loaded and reshuffling is attempted, there will be kernel crashes because RoCE driver would still be holding the MSIx vectors but L2 driver would attempt to free in-use vectors. Thus leading to a kernel crash. Making changes in roce driver to fix crashes described above. As part of solution L2 driver tells RoCE driver to release the MSIx vector whenever there is a need. When RoCE driver get message it sync up with all the running tasklets and IRQ handlers and releases the vectors. L2 driver send one more message to RoCE driver to resume the MSIx vectors. L2 driver guarantees that RoCE vector do not change during reshuffling. Fixes: ec86f14ea506 ("bnxt_en: Add ULP calls to stop and restart IRQs.") Fixes: 08654eb213a8 ("bnxt_en: Change IRQ assignment for RDMA driver.") Signed-off-by: Devesh Sharma Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/bnxt_re/main.c | 55 ++++++++++++++++- drivers/infiniband/hw/bnxt_re/qplib_fp.c | 94 +++++++++++++++++++----------- drivers/infiniband/hw/bnxt_re/qplib_fp.h | 3 + drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 61 +++++++++++++------ drivers/infiniband/hw/bnxt_re/qplib_rcfw.h | 3 + 5 files changed, 163 insertions(+), 53 deletions(-) commit 62d18ecfa64137349fac9c5817784fbd48b54f48 Merge: b133ef6 82034c2 Author: Linus Torvalds Date: Fri May 25 09:35:11 2018 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull more arm64 fixes from Will Deacon: - fix application of read-only permissions to kernel section mappings - sanitise reported ESR values for signals delivered on a kernel address - ensure tishift GCC helpers are exported to modules - fix inline asm constraints for some LSE atomics * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Make sure permission updates happen for pmd/pud arm64: fault: Don't leak data in ESR context for user fault on kernel VA arm64: export tishift functions to modules arm64: lse: Add early clobbers to some input/output asm operands commit b133ef6ea4c918bb70f40e6c522f1a474eecd589 Merge: f287fe3 faf37c4 Author: Linus Torvalds Date: Fri May 25 09:32:00 2018 -0700 Merge tag 'powerpc-4.17-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fix from Michael Ellerman: "Just one fix, to make sure the PCR (Processor Compatibility Register) is reset on boot. Otherwise if we're running in compat mode in a guest (eg. pretending a Power9 is a Power8) and the host kernel oopses and kdumps then the kdump kernel's userspace will be running in Power8 mode, and will SIGILL if it uses Power9-only instructions. Thanks to Michael Neuling" * tag 'powerpc-4.17-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s: Clear PCR on boot commit f287fe35ded1f07c42fc8d21476fa9a7d64e89b7 Merge: b9f5701 3de06d5 Author: Linus Torvalds Date: Fri May 25 09:29:17 2018 -0700 Merge tag 'mmc-v4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Propagate correct error code for RPMB requests MMC host: - sdhci-iproc: Drop hard coded cap for 1.8v - sdhci-iproc: Fix 32bit writes for transfer mode - sdhci-iproc: Enable SDHCI_QUIRK2_HOST_OFF_CARD_ON for cygnus" * tag 'mmc-v4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-iproc: add SDHCI_QUIRK2_HOST_OFF_CARD_ON for cygnus mmc: sdhci-iproc: fix 32bit writes for TRANSFER_MODE register mmc: sdhci-iproc: remove hard coded mmc cap 1.8v mmc: block: propagate correct returned value in mmc_rpmb_ioctl commit b9f57019a9ec74f4c6f0b475e9d6bfdd6fa38f37 Merge: a1a9f53 4bc6f77 Author: Linus Torvalds Date: Fri May 25 09:15:13 2018 -0700 Merge tag 'drm-fixes-for-v4.17-rc7' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Only two sets of drivers fixes: one rcar-du lvds regression fix, and a group of fixes for vmwgfx" * tag 'drm-fixes-for-v4.17-rc7' of git://people.freedesktop.org/~airlied/linux: drm/vmwgfx: Schedule an fb dirty update after resume drm/vmwgfx: Fix host logging / guestinfo reading error paths drm/vmwgfx: Fix 32-bit VMW_PORT_HB_[IN|OUT] macros drm: rcar-du: lvds: Fix crash in .atomic_check when disabling connector commit a1a9f537aa44862a14c00c52f934b79fb725292d Merge: b506943 009f8c9 Author: Linus Torvalds Date: Fri May 25 09:13:34 2018 -0700 Merge tag 'sound-4.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Two fixes: - a timer pause event notification was garbled upon the recent hardening work; corrected now - HD-audio runtime PM regression fix due to the incorrect return type" * tag 'sound-4.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix runtime PM ALSA: timer: Fix pause event notification commit 0ed2424b911f3a058dfea01b78817abed767433d Author: Alexander Shishkin Date: Thu May 24 11:27:27 2018 +0300 intel_th: Use correct device when freeing buffers Commit d5c435df4a890 ("intel_th: msu: Use the real device in case of IOMMU domain allocation") changes dma buffer allocation to use the actual underlying device, but forgets to change the deallocation path, which leads to (if you've got CAP_SYS_RAWIO): > # echo 0,0 > /sys/bus/intel_th/devices/0-msc0/nr_pages > ------------[ cut here ]------------ > kernel BUG at ../linux/drivers/iommu/intel-iommu.c:3670! > CPU: 3 PID: 231 Comm: sh Not tainted 4.17.0-rc1+ #2729 > RIP: 0010:intel_unmap+0x11e/0x130 ... > Call Trace: > intel_free_coherent+0x3e/0x60 > msc_buffer_win_free+0x100/0x160 [intel_th_msu] This patch fixes the buffer deallocation code to use the correct device. Signed-off-by: Alexander Shishkin Fixes: d5c435df4a890 ("intel_th: msu: Use the real device in case of IOMMU domain allocation") Reported-by: Baofeng Tian CC: stable@vger.kernel.org # v4.14+ Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/msu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b5e2ced9bf81393034072dd4d372f6b430bc1f0a Author: Alexander Shishkin Date: Thu May 24 11:27:26 2018 +0300 stm class: Use vmalloc for the master map Fengguang is running into a warning from the buddy allocator: > swapper/0: page allocation failure: order:9, mode:0x14040c0(GFP_KERNEL|__GFP_COMP), nodemask=(null) > CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.17.0-rc1 #262 > Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 > Call Trace: ... > __kmalloc+0x14b/0x180: ____cache_alloc at mm/slab.c:3127 > stm_register_device+0xf3/0x5c0: stm_register_device at drivers/hwtracing/stm/core.c:695 ... Which is basically a result of the stm class trying to allocate ~512kB for the dummy_stm with its default parameters. There's no reason, however, for it not to be vmalloc()ed instead, which is what this patch does. Reported-by: Fengguang Wu Signed-off-by: Alexander Shishkin CC: stable@vger.kernel.org # v4.4+ Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/stm/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1383cb8103bb166e50cbab1543bb3b5118fccf82 Author: Qing Huang Date: Wed May 23 16:22:46 2018 -0700 mlx4_core: allocate ICM memory in page size chunks When a system is under memory presure (high usage with fragments), the original 256KB ICM chunk allocations will likely trigger kernel memory management to enter slow path doing memory compact/migration ops in order to complete high order memory allocations. When that happens, user processes calling uverb APIs may get stuck for more than 120s easily even though there are a lot of free pages in smaller chunks available in the system. Syslog: ... Dec 10 09:04:51 slcc03db02 kernel: [397078.572732] INFO: task oracle_205573_e:205573 blocked for more than 120 seconds. ... With 4KB ICM chunk size on x86_64 arch, the above issue is fixed. However in order to support smaller ICM chunk size, we need to fix another issue in large size kcalloc allocations. E.g. Setting log_num_mtt=30 requires 1G mtt entries. With the 4KB ICM chunk size, each ICM chunk can only hold 512 mtt entries (8 bytes for each mtt entry). So we need a 16MB allocation for a table->icm pointer array to hold 2M pointers which can easily cause kcalloc to fail. The solution is to use kvzalloc to replace kcalloc which will fall back to vmalloc automatically if kmalloc fails. Signed-off-by: Qing Huang Acked-by: Daniel Jurgens Reviewed-by: Zhu Yanjun Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/icm.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 4ff648decf4712d39f184fc2df3163f43975575a Author: Sebastian Andrzej Siewior Date: Thu May 24 15:26:48 2018 +0200 sched, tracing: Fix trace_sched_pi_setprio() for deboosting Since the following commit: b91473ff6e97 ("sched,tracing: Update trace_sched_pi_setprio()") the sched_pi_setprio trace point shows the "newprio" during a deboost: |futex sched_pi_setprio: comm=futex_requeue_p pid"34 oldprio˜ newprio=3D98 |futex sched_switch: prev_comm=futex_requeue_p prev_pid"34 prev_prio=120 This patch open codes __rt_effective_prio() in the tracepoint as the 'newprio' to get the old behaviour back / the correct priority: |futex sched_pi_setprio: comm=futex_requeue_p pid"20 oldprio˜ newprio=3D120 |futex sched_switch: prev_comm=futex_requeue_p prev_pid"20 prev_prio=120 Peter suggested to open code the new priority so people using tracehook could get the deadline data out. Reported-by: Mansky Christian Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Fixes: b91473ff6e97 ("sched,tracing: Update trace_sched_pi_setprio()") Link: http://lkml.kernel.org/r/20180524132647.gg6ziuogczdmjjzu@linutronix.de Signed-off-by: Ingo Molnar include/trace/events/sched.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b1f5b378e126133521df668379249fb8265121f1 Author: Peter Zijlstra Date: Fri May 4 11:11:42 2018 +0200 kthread: Allow kthread_park() on a parked kthread The following commit: 85f1abe0019f ("kthread, sched/wait: Fix kthread_parkme() completion issue") added a WARN() in the case where we call kthread_park() on an already parked thread, because the old code wasn't doing the right thing there and it wasn't at all clear that would happen. It turns out, this does in fact happen, so we have to deal with it. Instead of potentially returning early, also wait for the completion. This does however mean we have to use complete_all() and re-initialize the completion on re-use. Reported-by: LKP Tested-by: Meelis Roos Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: kernel test robot Cc: wfg@linux.intel.com Cc: Thomas Gleixner Fixes: 85f1abe0019f ("kthread, sched/wait: Fix kthread_parkme() completion issue") Link: http://lkml.kernel.org/r/20180504091142.GI12235@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/kthread.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit bf5015a50f1fdb248b48405b67cae24dc02605d6 Author: Juri Lelli Date: Thu May 24 17:29:36 2018 +0200 sched/topology: Clarify root domain(s) debug string When scheduler debug is enabled, building scheduling domains outputs information about how the domains are laid out and to which root domain each CPU (or sets of CPUs) belongs, e.g.: CPU0 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 0:{ span=0 }, 1:{ span=1 }, 2:{ span=2 }, 3:{ span=3 }, 4:{ span=4 }, 5:{ span=5 } CPU1 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 1:{ span=1 }, 2:{ span=2 }, 3:{ span=3 }, 4:{ span=4 }, 5:{ span=5 }, 0:{ span=0 } [...] span: 0-5 (max cpu_capacity = 1024) The fact that latest line refers to CPUs 0-5 root domain doesn't however look immediately obvious to me: one might wonder why span 0-5 is reported "again". Make it more clear by adding "root domain" to it, as to end with the following: CPU0 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 0:{ span=0 }, 1:{ span=1 }, 2:{ span=2 }, 3:{ span=3 }, 4:{ span=4 }, 5:{ span=5 } CPU1 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 1:{ span=1 }, 2:{ span=2 }, 3:{ span=3 }, 4:{ span=4 }, 5:{ span=5 }, 0:{ span=0 } [...] root domain span: 0-5 (max cpu_capacity = 1024) Signed-off-by: Juri Lelli Signed-off-by: Peter Zijlstra (Intel) Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Patrick Bellasi Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180524152936.17611-1-juri.lelli@redhat.com Signed-off-by: Ingo Molnar kernel/sched/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ec3444c8346c922316f4effafa8afc17defda0e Author: Niklas Cassel Date: Mon Apr 9 23:40:15 2018 +0200 firmware: qcom: scm: Fix crash in qcom_scm_call_atomic1() qcom_scm_call_atomic1() can crash with a NULL pointer dereference at qcom_scm_call_atomic1+0x30/0x48. disassembly of qcom_scm_call_atomic1(): ... <0xc08d73b0 <+12>: ldr r3, [r12] ... (no instruction explicitly modifies r12) 0xc08d73cc <+40>: smc 0 ... (no instruction explicitly modifies r12) 0xc08d73d4 <+48>: ldr r3, [r12] <- crashing instruction ... Since the first ldr is successful, and since r12 isn't explicitly modified by any instruction between the first and the second ldr, it must have been modified by the smc call, which is ok, since r12 is caller save according to the AAPCS. Add r12 to the clobber list so that the compiler knows that the callee potentially overwrites the value in r12. Clobber descriptions may not in any way overlap with an input or output operand. Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Andy Gross drivers/firmware/qcom_scm-32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 322eaa06d55ebc1402a4a8d140945cff536638b4 Author: Govindarajulu Varadarajan Date: Wed May 23 11:17:39 2018 -0700 enic: set DMA mask to 47 bit In commit 624dbf55a359b ("driver/net: enic: Try DMA 64 first, then failover to DMA") DMA mask was changed from 40 bits to 64 bits. Hardware actually supports only 47 bits. Fixes: 624dbf55a359b ("driver/net: enic: Try DMA 64 first, then failover to DMA") Signed-off-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit af8d3c7c001ae7df1ed2b2715f058113efc86187 Author: Eric Biggers Date: Wed May 23 14:37:38 2018 -0700 ppp: remove the PPPIOCDETACH ioctl The PPPIOCDETACH ioctl effectively tries to "close" the given ppp file before f_count has reached 0, which is fundamentally a bad idea. It does check 'f_count < 2', which excludes concurrent operations on the file since they would only be possible with a shared fd table, in which case each fdget() would take a file reference. However, it fails to account for the fact that even with 'f_count == 1' the file can still be linked into epoll instances. As reported by syzbot, this can trivially be used to cause a use-after-free. Yet, the only known user of PPPIOCDETACH is pppd versions older than ppp-2.4.2, which was released almost 15 years ago (November 2003). Also, PPPIOCDETACH apparently stopped working reliably at around the same time, when the f_count check was added to the kernel, e.g. see https://lkml.org/lkml/2002/12/31/83. Also, the current 'f_count < 2' check makes PPPIOCDETACH only work in single-threaded applications; it always fails if called from a multithreaded application. All pppd versions released in the last 15 years just close() the file descriptor instead. Therefore, instead of hacking around this bug by exporting epoll internals to modules, and probably missing other related bugs, just remove the PPPIOCDETACH ioctl and see if anyone actually notices. Leave a stub in place that prints a one-time warning and returns EINVAL. Reported-by: syzbot+16363c99d4134717c05b@syzkaller.appspotmail.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Biggers Acked-by: Paul Mackerras Reviewed-by: Guillaume Nault Tested-by: Guillaume Nault Signed-off-by: David S. Miller Documentation/networking/ppp_generic.txt | 6 ------ drivers/net/ppp/ppp_generic.c | 27 +++++---------------------- include/uapi/linux/ppp-ioctl.h | 2 +- 3 files changed, 6 insertions(+), 29 deletions(-) commit 730c54d59403658a62af6517338fa8d4922c1b28 Author: Willem de Bruijn Date: Wed May 23 14:29:52 2018 -0400 ipv4: remove warning in ip_recv_error A precondition check in ip_recv_error triggered on an otherwise benign race. Remove the warning. The warning triggers when passing an ipv6 socket to this ipv4 error handling function. RaceFuzzer was able to trigger it due to a race in setsockopt IPV6_ADDRFORM. --- CPU0 do_ipv6_setsockopt sk->sk_socket->ops = &inet_dgram_ops; --- CPU1 sk->sk_prot->recvmsg udp_recvmsg ip_recv_error WARN_ON_ONCE(sk->sk_family == AF_INET6); --- CPU0 do_ipv6_setsockopt sk->sk_family = PF_INET; This socket option converts a v6 socket that is connected to a v4 peer to an v4 socket. It updates the socket on the fly, changing fields in sk as well as other structs. This is inherently non-atomic. It races with the lockless udp_recvmsg path. No other code makes an assumption that these fields are updated atomically. It is benign here, too, as ip_recv_error cares only about the protocol of the skbs enqueued on the error queue, for which sk_family is not a precise predictor (thanks to another isue with IPV6_ADDRFORM). Link: http://lkml.kernel.org/r/20180518120826.GA19515@dragonet.kaist.ac.kr Fixes: 7ce875e5ecb8 ("ipv4: warn once on passing AF_INET6 socket to ip_recv_error") Reported-by: DaeRyong Jeong Suggested-by: Eric Dumazet Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/ipv4/ip_sockglue.c | 2 -- 1 file changed, 2 deletions(-) commit f8f4bef322e4600c5856911c7a632c0e3da920d6 Author: Or Gerlitz Date: Wed May 23 19:24:48 2018 +0300 net : sched: cls_api: deal with egdev path only if needed When dealing with ingress rule on a netdev, if we did fine through the conventional path, there's no need to continue into the egdev route, and we can stop right there. Not doing so may cause a 2nd rule to be added by the cls api layer with the ingress being the egdev. For example, under sriov switchdev scheme, a user rule of VFR A --> VFR B will end up with two HW rules (1) VF A --> VF B and (2) uplink --> VF B Fixes: 208c0f4b5237 ('net: sched: use tc_setup_cb_call to call per-block callbacks') Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller net/sched/cls_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b15ad683ab42a203f98b67045b40720e99d0e9a Author: Jason Wang Date: Tue May 22 19:58:57 2018 +0800 vhost: synchronize IOTLB message with dev cleanup DaeRyong Jeong reports a race between vhost_dev_cleanup() and vhost_process_iotlb_msg(): Thread interleaving: CPU0 (vhost_process_iotlb_msg) CPU1 (vhost_dev_cleanup) (In the case of both VHOST_IOTLB_UPDATE and VHOST_IOTLB_INVALIDATE) ===== ===== vhost_umem_clean(dev->iotlb); if (!dev->iotlb) { ret = -EFAULT; break; } dev->iotlb = NULL; The reason is we don't synchronize between them, fixing by protecting vhost_process_iotlb_msg() with dev mutex. Reported-by: DaeRyong Jeong Fixes: 6b1e6cc7855b0 ("vhost: new device IOTLB API") Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/vhost/vhost.c | 3 +++ 1 file changed, 3 insertions(+) commit d681bc027a133f5c19e037f1bd3a142cffc566b4 Merge: 9aad13b 1dcbc01 Author: David S. Miller Date: Thu May 24 22:01:06 2018 -0400 Merge tag 'mlx5-fixes-2018-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2018-05-24 This series includes two mlx5 fixes. 1) add FCS data to checksum complete when required, from Eran Ben Elisha. 2) Fix A race in IPSec sandbox QP commands, from Yossi Kuperman. Please pull and let me know if there's any problem. for -stable v4.15 ("net/mlx5e: When RXFCS is set, add FCS data into checksum calculation") ==================== Signed-off-by: David S. Miller commit 9aad13b087ab0a588cd68259de618f100053360e Author: Willem de Bruijn Date: Thu May 24 18:10:30 2018 -0400 packet: fix reserve calculation Commit b84bbaf7a6c8 ("packet: in packet_snd start writing at link layer allocation") ensures that packet_snd always starts writing the link layer header in reserved headroom allocated for this purpose. This is needed because packets may be shorter than hard_header_len, in which case the space up to hard_header_len may be zeroed. But that necessary padding is not accounted for in skb->len. The fix, however, is buggy. It calls skb_push, which grows skb->len when moving skb->data back. But in this case packet length should not change. Instead, call skb_reserve, which moves both skb->data and skb->tail back, without changing length. Fixes: b84bbaf7a6c8 ("packet: in packet_snd start writing at link layer allocation") Reported-by: Tariq Toukan Signed-off-by: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/packet/af_packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bc6f777952cf2d5b39e0c5a97a18caa743f03b7 Merge: 35904d6 6a93cea Author: Dave Airlie Date: Fri May 25 09:47:56 2018 +1000 Merge branch 'vmwgfx-fixes-4.17' of git://people.freedesktop.org/~thomash/linux into drm-fixes Three fixes for vmwgfx. Two are cc'd stable and fix host logging and its error paths on 32-bit VMs. One is a fix for a hibernate flaw introduced with the 4.17 merge window. * 'vmwgfx-fixes-4.17' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: Schedule an fb dirty update after resume drm/vmwgfx: Fix host logging / guestinfo reading error paths drm/vmwgfx: Fix 32-bit VMW_PORT_HB_[IN|OUT] macros commit b50694381cfc22dce3a60a291cdae294a5e5777c Merge: 34b48b8 4855c92 Author: Linus Torvalds Date: Thu May 24 14:42:43 2018 -0700 Merge branch 'stable/for-linus-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb Pull swiotlb fix from Konrad Rzeszutek Wilk: "One single fix in here: under Xen the DMA32 heap (in the hypervisor) would end up looking like swiss cheese. The reason being that for every coherent DMA allocation we didn't do the proper hypercall to tell Xen to return the page back to the DMA32 heap. End result was (eventually) no DMA32 space if you (for example) continously unloaded and loaded modules" * 'stable/for-linus-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb: xen-swiotlb: fix the check condition for xen_swiotlb_free_coherent commit 1dcbc01f73f9abc4779f71eae5e6dc61bee37229 Author: Yossi Kuperman Date: Tue Oct 17 20:39:17 2017 +0300 net/mlx5: IPSec, Fix a race between concurrent sandbox QP commands Sandbox QP Commands are retired in the order they are sent. Outstanding commands are stored in a linked-list in the order they appear. Once a response is received and the callback gets called, we pull the first element off the pending list, assuming they correspond. Sending a message and adding it to the pending list is not done atomically, hence there is an opportunity for a race between concurrent requests. Bind both send and add under a critical section. Fixes: bebb23e6cb02 ("net/mlx5: Accel, Add IPSec acceleration interface") Signed-off-by: Yossi Kuperman Signed-off-by: Adi Nissim Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 902a545904c71d719ed144234d67df75f31db63b Author: Eran Ben Elisha Date: Tue May 1 16:25:07 2018 +0300 net/mlx5e: When RXFCS is set, add FCS data into checksum calculation When RXFCS feature is enabled, the HW do not strip the FCS data, however it is not present in the checksum calculated by the HW. Fix that by manually calculating the FCS checksum and adding it to the SKB checksum field. Add helper function to find the FCS data for all SKB forms (linear, one fragment or more). Fixes: 102722fc6832 ("net/mlx5e: Add support for RXFCS feature flag") Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 34b48b8789adf344d1012fda5d796994d4ddfc14 Merge: d7b66b4 55ba49c Author: Linus Torvalds Date: Thu May 24 14:12:05 2018 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "This is pretty much just the usual array of smallish driver bugs. - remove bouncing addresses from the MAINTAINERS file - kernel oops and bad error handling fixes for hfi, i40iw, cxgb4, and hns drivers - various small LOC behavioral/operational bugs in mlx5, hns, qedr and i40iw drivers - two fixes for patches already sent during the merge window - a long-standing bug related to not decreasing the pinned pages count in the right MM was found and fixed" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (28 commits) RDMA/hns: Move the location for initializing tmp_len RDMA/hns: Bugfix for cq record db for kernel IB/uverbs: Fix uverbs_attr_get_obj RDMA/qedr: Fix doorbell bar mapping for dpi > 1 IB/umem: Use the correct mm during ib_umem_release iw_cxgb4: Fix an error handling path in 'c4iw_get_dma_mr()' RDMA/i40iw: Avoid panic when reading back the IRQ affinity hint RDMA/i40iw: Avoid reference leaks when processing the AEQ RDMA/i40iw: Avoid panic when objects are being created and destroyed RDMA/hns: Fix the bug with NULL pointer RDMA/hns: Set NULL for __internal_mr RDMA/hns: Enable inner_pa_vld filed of mpt RDMA/hns: Set desc_dma_addr for zero when free cmq desc RDMA/hns: Fix the bug with rq sge RDMA/hns: Not support qp transition from reset to reset for hip06 RDMA/hns: Add return operation when configured global param fail RDMA/hns: Update convert function of endian format RDMA/hns: Load the RoCE dirver automatically RDMA/hns: Bugfix for rq record db for kernel RDMA/hns: Add rq inline flags judgement ... commit d7b66b4ab0344dcc4bf169e0bbfda6234cdf6966 Merge: d883c6c d501473 Author: Linus Torvalds Date: Thu May 24 11:47:43 2018 -0700 Merge tag 'for-4.17-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "A one-liner that prevents leaking an internal error value 1 out of the ftruncate syscall. This has been observed in practice. The steps to reproduce make a common pattern (open/write/fync/ftruncate) but also need the application to not check only for negative values and happens only for compressed inlined files. The conditions are narrow but as this could break userspace I think it's better to merge it now and not wait for the merge window" * tag 'for-4.17-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: fix error handling in btrfs_truncate() commit 009f8c90f571d87855914dbc20e6c0ea2a3b19ae Author: Lukas Wunner Date: Thu May 24 19:01:07 2018 +0200 ALSA: hda - Fix runtime PM Before commit 3b5b899ca67d ("ALSA: hda: Make use of core codec functions to sync power state"), hda_set_power_state() returned the response to the Get Power State verb, a 32-bit unsigned integer whose expected value is 0x233 after transitioning a codec to D3, and 0x0 after transitioning it to D0. The response value is significant because hda_codec_runtime_suspend() does not clear the codec's bit in the codec_powered bitmask unless the AC_PWRST_CLK_STOP_OK bit (0x200) is set in the response value. That in turn prevents the HDA controller from runtime suspending because azx_runtime_idle() checks that the codec_powered bitmask is zero. Since commit 3b5b899ca67d, hda_set_power_state() only returns 0x0 or 0x1, thereby breaking runtime PM for any HDA controller. That's because an inline function introduced by the commit returns a bool instead of a 32-bit unsigned int. The change was likely erroneous and resulted from copying and pasting snd_hda_check_power_state(), which is immediately preceding the newly introduced inline function. Fix it. Link: https://bugs.freedesktop.org/show_bug.cgi?id=106597 Fixes: 3b5b899ca67d ("ALSA: hda: Make use of core codec functions to sync power state") Cc: Alex Deucher Cc: Abhijeet Kumar Reported-and-tested-by: Gunnar Krüger Signed-off-by: Lukas Wunner Acked-by: Alex Deucher Signed-off-by: Takashi Iwai sound/pci/hda/hda_local.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d883c6cf3b39f1f42506e82ad2779fb88004acf3 Author: Joonsoo Kim Date: Wed May 23 10:18:21 2018 +0900 Revert "mm/cma: manage the memory of the CMA area by using the ZONE_MOVABLE" This reverts the following commits that change CMA design in MM. 3d2054ad8c2d ("ARM: CMA: avoid double mapping to the CMA area if CONFIG_HIGHMEM=y") 1d47a3ec09b5 ("mm/cma: remove ALLOC_CMA") bad8c6c0b114 ("mm/cma: manage the memory of the CMA area by using the ZONE_MOVABLE") Ville reported a following error on i386. Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) microcode: microcode updated early to revision 0x4, date = 2013-06-28 Initializing CPU#0 Initializing HighMem for node 0 (000377fe:00118000) Initializing Movable for node 0 (00000001:00118000) BUG: Bad page state in process swapper pfn:377fe page:f53effc0 count:0 mapcount:-127 mapping:00000000 index:0x0 flags: 0x80000000() raw: 80000000 00000000 00000000 ffffff80 00000000 00000100 00000200 00000001 page dumped because: nonzero mapcount Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 4.17.0-rc5-elk+ #145 Hardware name: Dell Inc. Latitude E5410/03VXMC, BIOS A15 07/11/2013 Call Trace: dump_stack+0x60/0x96 bad_page+0x9a/0x100 free_pages_check_bad+0x3f/0x60 free_pcppages_bulk+0x29d/0x5b0 free_unref_page_commit+0x84/0xb0 free_unref_page+0x3e/0x70 __free_pages+0x1d/0x20 free_highmem_page+0x19/0x40 add_highpages_with_active_regions+0xab/0xeb set_highmem_pages_init+0x66/0x73 mem_init+0x1b/0x1d7 start_kernel+0x17a/0x363 i386_start_kernel+0x95/0x99 startup_32_smp+0x164/0x168 The reason for this error is that the span of MOVABLE_ZONE is extended to whole node span for future CMA initialization, and, normal memory is wrongly freed here. I submitted the fix and it seems to work, but, another problem happened. It's so late time to fix the later problem so I decide to reverting the series. Reported-by: Ville Syrjälä Acked-by: Laura Abbott Acked-by: Michal Hocko Cc: Andrew Morton Signed-off-by: Joonsoo Kim Signed-off-by: Linus Torvalds arch/arm/mm/dma-mapping.c | 16 +------- include/linux/memory_hotplug.h | 3 ++ include/linux/mm.h | 1 - mm/cma.c | 83 ++++++------------------------------------ mm/compaction.c | 4 +- mm/internal.h | 4 +- mm/page_alloc.c | 83 +++++++++++++++--------------------------- 7 files changed, 49 insertions(+), 145 deletions(-) commit 1eaafe91a0df4157521b6417b3dd8430bf5f52f0 Author: Jim Mattson Date: Wed May 9 14:29:35 2018 -0700 kvm: x86: IA32_ARCH_CAPABILITIES is always supported If there is a possibility that a VM may migrate to a Skylake host, then the hypervisor should report IA32_ARCH_CAPABILITIES.RSBA[bit 2] as being set (future work, of course). This implies that CPUID.(EAX=7,ECX=0):EDX.ARCH_CAPABILITIES[bit 29] should be set. Therefore, kvm should report this CPUID bit as being supported whether or not the host supports it. Userspace is still free to clear the bit if it chooses. For more information on RSBA, see Intel's white paper, "Retpoline: A Branch Target Injection Mitigation" (Document Number 337131-001), currently available at https://bugzilla.kernel.org/show_bug.cgi?id=199511. Since the IA32_ARCH_CAPABILITIES MSR is emulated in kvm, there is no dependency on hardware support for this feature. Signed-off-by: Jim Mattson Reviewed-by: Konrad Rzeszutek Wilk Fixes: 28c1c9fabf48 ("KVM/VMX: Emulate MSR_IA32_ARCH_CAPABILITIES") Cc: stable@vger.kernel.org Signed-off-by: Radim Krčmář arch/x86/kvm/cpuid.c | 5 +++++ 1 file changed, 5 insertions(+) commit 577e75e0c9da98b898d2dbe94c30b40eec5b9c99 Merge: b68ea0e 4544e40 Author: Linus Torvalds Date: Thu May 24 09:36:16 2018 -0700 Merge branch 'for-4.17-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: "Nothing too interesting. Four patches to update the blacklist and add a controller ID" * 'for-4.17-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: ahci: Add PCI ID for Cannon Lake PCH-LP AHCI libata: blacklist Micron 500IT SSD with MU01 firmware libata: Apply NOLPM quirk for SAMSUNG PM830 CXM13D1Q. libata: Blacklist some Sandisk SSDs for NCQ commit 2bc5ff0bdc00d81d719dad74589317a260d583ed Author: Tomi Valkeinen Date: Thu May 24 10:58:25 2018 +0300 drm/omap: fix NULL deref crash with SDI displays Fix a NULL deref bug introduced in commit 24aac6011f70 ("drm: omapdrm: sdi: Allocate the sdi private data structure dynamically"). Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/2f803bfc-3ffe-332a-7b9a-d59a39db4630@ti.com Fixes: 24aac6011f70 ("drm: omapdrm: sdi: Allocate the sdi private data structure dynamically") Reported-by: Tony Lindgren Tested-by: Tony Lindgren Reviewed-by: Benoit Parrot drivers/gpu/drm/omapdrm/dss/sdi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c4d2188206bafa177ea58e9a25b952baa0bf7712 Author: Wei Huang Date: Tue May 1 09:49:54 2018 -0500 KVM: x86: Update cpuid properly when CR4.OSXAVE or CR4.PKE is changed The CPUID bits of OSXSAVE (function=0x1) and OSPKE (func=0x7, leaf=0x0) allows user apps to detect if OS has set CR4.OSXSAVE or CR4.PKE. KVM is supposed to update these CPUID bits when CR4 is updated. Current KVM code doesn't handle some special cases when updates come from emulator. Here is one example: Step 1: guest boots Step 2: guest OS enables XSAVE ==> CR4.OSXSAVE=1 and CPUID.OSXSAVE=1 Step 3: guest hot reboot ==> QEMU reset CR4 to 0, but CPUID.OSXAVE==1 Step 4: guest os checks CPUID.OSXAVE, detects 1, then executes xgetbv Step 4 above will cause an #UD and guest crash because guest OS hasn't turned on OSXAVE yet. This patch solves the problem by comparing the the old_cr4 with cr4. If the related bits have been changed, kvm_update_cpuid() needs to be called. Signed-off-by: Wei Huang Reviewed-by: Bandan Das Cc: stable@vger.kernel.org Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b68ea0ee0362e935a7b4627b9728f6cee95286d7 Merge: 9ca5a2a eedffa2 Author: Linus Torvalds Date: Thu May 24 08:53:20 2018 -0700 Merge tag 'for-linus-20180524' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Two fixes that should go into this release: - a loop writeback error clearing fix from Jeff - the sr sense fix from myself" * tag 'for-linus-20180524' of git://git.kernel.dk/linux-block: loop: clear wb_err in bd_inode when detaching backing file sr: pass down correctly sized SCSI sense buffer commit 9ca5a2ae4259e7aec8efb0db0f6ec721a6854c54 Merge: bee7975 c62ec46 Author: Linus Torvalds Date: Thu May 24 08:49:56 2018 -0700 Merge tag 'pm-4.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Fix a regression from the 4.15 cycle that caused the system suspend and resume overhead to increase on many systems and triggered more serious problems on some of them (Rafael Wysocki)" * tag 'pm-4.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / core: Fix direct_complete handling for devices with no callbacks commit c93552c443ebc63b14e26e46d2e76941c88e0d71 Author: Daniel Borkmann Date: Thu May 24 02:32:53 2018 +0200 bpf: properly enforce index mask to prevent out-of-bounds speculation While reviewing the verifier code, I recently noticed that the following two program variants in relation to tail calls can be loaded. Variant 1: # bpftool p d x i 15 0: (15) if r1 == 0x0 goto pc+3 1: (18) r2 = map[id:5] 3: (05) goto pc+2 4: (18) r2 = map[id:6] 6: (b7) r3 = 7 7: (35) if r3 >= 0xa0 goto pc+2 8: (54) (u32) r3 &= (u32) 255 9: (85) call bpf_tail_call#12 10: (b7) r0 = 1 11: (95) exit # bpftool m s i 5 5: prog_array flags 0x0 key 4B value 4B max_entries 4 memlock 4096B # bpftool m s i 6 6: prog_array flags 0x0 key 4B value 4B max_entries 160 memlock 4096B Variant 2: # bpftool p d x i 20 0: (15) if r1 == 0x0 goto pc+3 1: (18) r2 = map[id:8] 3: (05) goto pc+2 4: (18) r2 = map[id:7] 6: (b7) r3 = 7 7: (35) if r3 >= 0x4 goto pc+2 8: (54) (u32) r3 &= (u32) 3 9: (85) call bpf_tail_call#12 10: (b7) r0 = 1 11: (95) exit # bpftool m s i 8 8: prog_array flags 0x0 key 4B value 4B max_entries 160 memlock 4096B # bpftool m s i 7 7: prog_array flags 0x0 key 4B value 4B max_entries 4 memlock 4096B In both cases the index masking inserted by the verifier in order to control out of bounds speculation from a CPU via b2157399cc98 ("bpf: prevent out-of-bounds speculation") seems to be incorrect in what it is enforcing. In the 1st variant, the mask is applied from the map with the significantly larger number of entries where we would allow to a certain degree out of bounds speculation for the smaller map, and in the 2nd variant where the mask is applied from the map with the smaller number of entries, we get buggy behavior since we truncate the index of the larger map. The original intent from commit b2157399cc98 is to reject such occasions where two or more different tail call maps are used in the same tail call helper invocation. However, the check on the BPF_MAP_PTR_POISON is never hit since we never poisoned the saved pointer in the first place! We do this explicitly for map lookups but in case of tail calls we basically used the tail call map in insn_aux_data that was processed in the most recent path which the verifier walked. Thus any prior path that stored a pointer in insn_aux_data at the helper location was always overridden. Fix it by moving the map pointer poison logic into a small helper that covers both BPF helpers with the same logic. After that in fixup_bpf_calls() the poison check is then hit for tail calls and the program rejected. Latter only happens in unprivileged case since this is the *only* occasion where a rewrite needs to happen, and where such rewrite is specific to the map (max_entries, index_mask). In the privileged case the rewrite is generic for the insn->imm / insn->code update so multiple maps from different paths can be handled just fine since all the remaining logic happens in the instruction processing itself. This is similar to the case of map lookups: in case there is a collision of maps in fixup_bpf_calls() we must skip the inlined rewrite since this will turn the generic instruction sequence into a non- generic one. Thus the patch_call_imm will simply update the insn->imm location where the bpf_map_lookup_elem() will later take care of the dispatch. Given we need this 'poison' state as a check, the information of whether a map is an unpriv_array gets lost, so enforcing it prior to that needs an additional state. In general this check is needed since there are some complex and tail call intensive BPF programs out there where LLVM tends to generate such code occasionally. We therefore convert the map_ptr rather into map_state to store all this w/o extra memory overhead, and the bit whether one of the maps involved in the collision was from an unpriv_array thus needs to be retained as well there. Fixes: b2157399cc98 ("bpf: prevent out-of-bounds speculation") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov include/linux/bpf_verifier.h | 2 +- kernel/bpf/verifier.c | 86 ++++++++++++++++++++++++++++++++------------ 2 files changed, 65 insertions(+), 23 deletions(-) commit d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc Author: David Vrabel Date: Fri May 18 16:55:46 2018 +0100 x86/kvm: fix LAPIC timer drift when guest uses periodic mode Since 4.10, commit 8003c9ae204e (KVM: LAPIC: add APIC Timer periodic/oneshot mode VMX preemption timer support), guests using periodic LAPIC timers (such as FreeBSD 8.4) would see their timers drift significantly over time. Differences in the underlying clocks and numerical errors means the periods of the two timers (hv and sw) are not the same. This difference will accumulate with every expiry resulting in a large error between the hv and sw timer. This means the sw timer may be running slow when compared to the hv timer. When the timer is switched from hv to sw, the now active sw timer will expire late. The guest VCPU is reentered and it switches to using the hv timer. This timer catches up, injecting multiple IRQs into the guest (of which the guest only sees one as it does not get to run until the hv timer has caught up) and thus the guest's timer rate is low (and becomes increasing slower over time as the sw timer lags further and further behind). I believe a similar problem would occur if the hv timer is the slower one, but I have not observed this. Fix this by synchronizing the deadlines for both timers to the same time source on every tick. This prevents the errors from accumulating. Fixes: 8003c9ae204e21204e49816c5ea629357e283b06 Cc: Wanpeng Li Signed-off-by: David Vrabel Cc: stable@vger.kernel.org Reviewed-by: Paolo Bonzini Reviewed-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/kvm/lapic.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit b09efdc250f0df1bea73f83ef8fb9e9a16229fc5 Merge: e20ac8b df15818 Author: Radim Krčmář Date: Thu May 24 16:48:05 2018 +0200 Merge tag 'kvm-ppc-fixes-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc Fixes for PPC KVM: - Close a hole which could possibly lead to the host timebase getting out of sync. - Three fixes relating to PTEs and TLB entries for radix guests. - Fix a bug which could lead to an interrupt never getting delivered to the guest, if it is pending for a guest vCPU when the vCPU gets offlined. commit 4544e403eb25552aed7f0ee181a7a506b8800403 Author: Mika Westerberg Date: Thu May 24 11:12:16 2018 +0300 ahci: Add PCI ID for Cannon Lake PCH-LP AHCI This one should be using the default LPM policy for mobile chipsets so add the PCI ID to the driver list of supported revices. Signed-off-by: Mika Westerberg Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org drivers/ata/ahci.c | 1 + 1 file changed, 1 insertion(+) commit bdcc02cf1bb508fc700df7662f55058f651f2621 Author: Dhinakaran Pandiyan Date: Fri May 11 12:51:42 2018 -0700 drm/psr: Fix missed entry in PSR setup time table. Entry corresponding to 220 us setup time was missing. I am not aware of any specific bug this fixes, but this could potentially result in enabling PSR on a panel with a higher setup time requirement than supported by the hardware. I verified the value is present in eDP spec versions 1.3, 1.4 and 1.4a. Fixes: 6608804b3d7f ("drm/dp: Add drm_dp_psr_setup_time()") Cc: stable@vger.kernel.org Cc: Ville Syrjälä Cc: Jose Roberto de Souza Cc: dri-devel@lists.freedesktop.org Reviewed-by: José Roberto de Souza Reviewed-by: Tarun Vyas Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180511195145.3829-3-dhinakaran.pandiyan@intel.com drivers/gpu/drm/drm_dp_helper.c | 1 + 1 file changed, 1 insertion(+) commit c7e814628df65f424fe197dde73bfc67e4a244d7 Author: Maciej W. Rozycki Date: Wed May 16 16:39:58 2018 +0100 MIPS: ptrace: Fix PTRACE_PEEKUSR requests for 64-bit FGRs Use 64-bit accesses for 64-bit floating-point general registers with PTRACE_PEEKUSR, removing the truncation of their upper halves in the FR=1 mode, caused by commit bbd426f542cb ("MIPS: Simplify FP context access"), which inadvertently switched them to using 32-bit accesses. The PTRACE_POKEUSR side is fine as it's never been broken and continues using 64-bit accesses. Fixes: bbd426f542cb ("MIPS: Simplify FP context access") Signed-off-by: Maciej W. Rozycki Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: # 3.15+ Patchwork: https://patchwork.linux-mips.org/patch/19334/ Signed-off-by: James Hogan arch/mips/kernel/ptrace.c | 2 +- arch/mips/kernel/ptrace32.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 28e4213dd331e944e7fca1954a946829162ed9d4 Author: Maciej W. Rozycki Date: Tue May 15 23:04:44 2018 +0100 MIPS: prctl: Disallow FRE without FR with PR_SET_FP_MODE requests Having PR_FP_MODE_FRE (i.e. Config5.FRE) set without PR_FP_MODE_FR (i.e. Status.FR) is not supported as the lone purpose of Config5.FRE is to emulate Status.FR=0 handling on FPU hardware that has Status.FR=1 hardwired[1][2]. Also we do not handle this case elsewhere, and assume throughout our code that TIF_HYBRID_FPREGS and TIF_32BIT_FPREGS cannot be set both at once for a task, leading to inconsistent behaviour if this does happen. Return unsuccessfully then from prctl(2) PR_SET_FP_MODE calls requesting PR_FP_MODE_FRE to be set with PR_FP_MODE_FR clear. This corresponds to modes allowed by `mips_set_personality_fp'. References: [1] "MIPS Architecture For Programmers, Vol. III: MIPS32 / microMIPS32 Privileged Resource Architecture", Imagination Technologies, Document Number: MD00090, Revision 6.02, July 10, 2015, Table 9.69 "Config5 Register Field Descriptions", p. 262 [2] "MIPS Architecture For Programmers, Volume III: MIPS64 / microMIPS64 Privileged Resource Architecture", Imagination Technologies, Document Number: MD00091, Revision 6.03, December 22, 2015, Table 9.72 "Config5 Register Field Descriptions", p. 288 Fixes: 9791554b45a2 ("MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options for MIPS") Signed-off-by: Maciej W. Rozycki Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: # 4.0+ Patchwork: https://patchwork.linux-mips.org/patch/19327/ Signed-off-by: James Hogan arch/mips/kernel/process.c | 4 ++++ 1 file changed, 4 insertions(+) commit 32795631e67e16141aa5e065c28ba03bf17abb90 Author: Mathias Kresin Date: Sun Apr 8 10:30:03 2018 +0200 MIPS: lantiq: gphy: Drop reboot/remove reset asserts While doing a global software reset, these bits are not cleared and let some bootloader fail to initialise the GPHYs. The bootloader don't expect the GPHYs in reset, as they aren't during power on. The asserts were a workaround for a wrong syscon-reboot mask. With a mask set which includes the GPHY resets, these resets aren't required any more. Fixes: 126534141b45 ("MIPS: lantiq: Add a GPHY driver which uses the RCU syscon-mfd") Signed-off-by: Mathias Kresin Acked-by: Martin Blumenstingl Acked-by: Hauke Mehrtens Cc: John Crispin Cc: linux-mips@linux-mips.org Cc: # 4.14+ Patchwork: https://patchwork.linux-mips.org/patch/19003/ [jhogan@kernel.org: Fix build warnings] Signed-off-by: James Hogan drivers/soc/lantiq/gphy.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) commit 82034c23fcbc2389c73d97737f61fa2dd6526413 Author: Laura Abbott Date: Wed May 23 11:43:46 2018 -0700 arm64: Make sure permission updates happen for pmd/pud Commit 15122ee2c515 ("arm64: Enforce BBM for huge IO/VMAP mappings") disallowed block mappings for ioremap since that code does not honor break-before-make. The same APIs are also used for permission updating though and the extra checks prevent the permission updates from happening, even though this should be permitted. This results in read-only permissions not being fully applied. Visibly, this can occasionaly be seen as a failure on the built in rodata test when the test data ends up in a section or as an odd RW gap on the page table dump. Fix this by using pgattr_change_is_safe instead of p*d_present for determining if the change is permitted. Reviewed-by: Kees Cook Tested-by: Peter Robinson Reported-by: Peter Robinson Fixes: 15122ee2c515 ("arm64: Enforce BBM for huge IO/VMAP mappings") Signed-off-by: Laura Abbott Signed-off-by: Will Deacon arch/arm64/mm/mmu.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit d50147381aa0c9725d63a677c138c47f55d6d3bc Author: Omar Sandoval Date: Tue May 22 09:47:58 2018 -0700 Btrfs: fix error handling in btrfs_truncate() Jun Wu at Facebook reported that an internal service was seeing a return value of 1 from ftruncate() on Btrfs in some cases. This is coming from the NEED_TRUNCATE_BLOCK return value from btrfs_truncate_inode_items(). btrfs_truncate() uses two variables for error handling, ret and err. When btrfs_truncate_inode_items() returns non-zero, we set err to the return value. However, NEED_TRUNCATE_BLOCK is not an error. Make sure we only set err if ret is an error (i.e., negative). To reproduce the issue: mount a filesystem with -o compress-force=zstd and the following program will encounter return value of 1 from ftruncate: int main(void) { char buf[256] = { 0 }; int ret; int fd; fd = open("test", O_CREAT | O_WRONLY | O_TRUNC, 0666); if (fd == -1) { perror("open"); return EXIT_FAILURE; } if (write(fd, buf, sizeof(buf)) != sizeof(buf)) { perror("write"); close(fd); return EXIT_FAILURE; } if (fsync(fd) == -1) { perror("fsync"); close(fd); return EXIT_FAILURE; } ret = ftruncate(fd, 128); if (ret) { printf("ftruncate() returned %d\n", ret); close(fd); return EXIT_FAILURE; } close(fd); return EXIT_SUCCESS; } Fixes: ddfae63cc8e0 ("btrfs: move btrfs_truncate_block out of trans handle") CC: stable@vger.kernel.org # 4.15+ Reported-by: Jun Wu Signed-off-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4faa99965e027cc057c5145ce45fa772caa04e8d Author: Al Viro Date: Wed May 23 22:53:22 2018 -0400 fix io_destroy()/aio_complete() race If io_destroy() gets to cancelling everything that can be cancelled and gets to kiocb_cancel() calling the function driver has left in ->ki_cancel, it becomes vulnerable to a race with IO completion. At that point req is already taken off the list and aio_complete() does *NOT* spin until we (in free_ioctx_users()) releases ->ctx_lock. As the result, it proceeds to kiocb_free(), freing req just it gets passed to ->ki_cancel(). Fix is simple - remove from the list after the call of kiocb_cancel(). All instances of ->ki_cancel() already have to cope with the being called with iocb still on list - that's what happens in io_cancel(2). Cc: stable@kernel.org Fixes: 0460fef2a921 "aio: use cancellation list lazily" Signed-off-by: Al Viro fs/aio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4b83a9049a983b20b1ec2757727c5e39f5847ad2 Author: Eric Dumazet Date: Mon May 21 16:35:24 2018 -0700 netfilter: provide correct argument to nla_strlcpy() Recent patch forgot to remove nla_data(), upsetting syzkaller a bit. BUG: KASAN: slab-out-of-bounds in nla_strlcpy+0x13d/0x150 lib/nlattr.c:314 Read of size 1 at addr ffff8801ad1f4fdd by task syz-executor189/4509 CPU: 1 PID: 4509 Comm: syz-executor189 Not tainted 4.17.0-rc6+ #62 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:430 nla_strlcpy+0x13d/0x150 lib/nlattr.c:314 nfnl_acct_new+0x574/0xc50 net/netfilter/nfnetlink_acct.c:118 nfnetlink_rcv_msg+0xdb5/0xff0 net/netfilter/nfnetlink.c:212 netlink_rcv_skb+0x172/0x440 net/netlink/af_netlink.c:2448 nfnetlink_rcv+0x1fe/0x1ba0 net/netfilter/nfnetlink.c:513 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x58b/0x740 net/netlink/af_netlink.c:1336 netlink_sendmsg+0x9f0/0xfa0 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:639 sock_write_iter+0x35a/0x5a0 net/socket.c:908 call_write_iter include/linux/fs.h:1784 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x64d/0x960 fs/read_write.c:487 vfs_write+0x1f8/0x560 fs/read_write.c:549 ksys_write+0xf9/0x250 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 Fixes: 4e09fc873d92 ("netfilter: prefer nla_strlcpy for dealing with NLA_STRING attributes") Signed-off-by: Eric Dumazet Acked-by: Florian Westphal Reported-by: syzbot Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_acct.c | 2 +- net/netfilter/nfnetlink_cthelper.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 55ba49cbcef37053d973f9a45bc58818c333fe13 Author: oulijun Date: Tue May 22 20:47:15 2018 +0800 RDMA/hns: Move the location for initializing tmp_len When posted work request, it need to compute the length of all sges of every wr and fill it into the msg_len field of send wqe. Thus, While posting multiple wr, tmp_len should be reinitialized to zero. Fixes: 8b9b8d143b46 ("RDMA/hns: Fix the endian problem for hns") Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 05d6a4ddb654ef6f2fbbcf9dcb3b263184baa8e4 Author: oulijun Date: Tue May 22 20:47:14 2018 +0800 RDMA/hns: Bugfix for cq record db for kernel When use cq record db for kernel, it needs to set the hr_cq->db_en to 1 and configure the dma address of record cq db of qp context. Fixes: 86188a8810ed ("RDMA/hns: Support cq record doorbell for kernel space") Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_cq.c | 1 + 1 file changed, 1 insertion(+) commit f4602cbb0a2478dda8238a4f382867da425daa8e Author: Jason Gunthorpe Date: Tue May 22 15:56:51 2018 -0600 IB/uverbs: Fix uverbs_attr_get_obj The err pointer comes from uverbs_attr_get, not from the uobject member, which does not store an ERR_PTR. Fixes: be934cca9e98 ("IB/uverbs: Add device memory registration ioctl support") Signed-off-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky include/rdma/uverbs_ioctl.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 30bf066cd9989fef34aeeef9080368867fe42be7 Author: Kalderon, Michal Date: Tue May 15 15:13:33 2018 +0300 RDMA/qedr: Fix doorbell bar mapping for dpi > 1 Each user_context receives a separate dpi value and thus a different address on the doorbell bar. The qedr_mmap function needs to validate the address and map the doorbell bar accordingly. The current implementation always checked against dpi=0 doorbell range leading to a wrong mapping for doorbell bar. (It entered an else case that mapped the address differently). qedr_mmap should only be used for doorbells, so the else was actually wrong in the first place. This only has an affect on arm architecture and not an issue on a x86 based architecture. This lead to doorbells not occurring on arm based systems and left applications that use more than one dpi (or several applications run simultaneously ) to hang. Fixes: ac1b36e55a51 ("qedr: Add support for user context verbs") Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/qedr/verbs.c | 60 ++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 31 deletions(-) commit d546b67cda015fb92bfee93d5dc0ceadb91deaee Author: Jack Morgenstein Date: Wed May 23 10:41:59 2018 +0300 net/mlx4: Fix irq-unsafe spinlock usage spin_lock/unlock was used instead of spin_un/lock_irq in a procedure used in process space, on a spinlock which can be grabbed in an interrupt. This caused the stack trace below to be displayed (on kernel 4.17.0-rc1 compiled with Lock Debugging enabled): [ 154.661474] WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected [ 154.668909] 4.17.0-rc1-rdma_rc_mlx+ #3 Tainted: G I [ 154.675856] ----------------------------------------------------- [ 154.682706] modprobe/10159 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: [ 154.690254] 00000000f3b0e495 (&(&qp_table->lock)->rlock){+.+.}, at: mlx4_qp_remove+0x20/0x50 [mlx4_core] [ 154.700927] and this task is already holding: [ 154.707461] 0000000094373b5d (&(&cq->lock)->rlock/1){....}, at: destroy_qp_common+0x111/0x560 [mlx4_ib] [ 154.718028] which would create a new lock dependency: [ 154.723705] (&(&cq->lock)->rlock/1){....} -> (&(&qp_table->lock)->rlock){+.+.} [ 154.731922] but this new dependency connects a SOFTIRQ-irq-safe lock: [ 154.740798] (&(&cq->lock)->rlock){..-.} [ 154.740800] ... which became SOFTIRQ-irq-safe at: [ 154.752163] _raw_spin_lock_irqsave+0x3e/0x50 [ 154.757163] mlx4_ib_poll_cq+0x36/0x900 [mlx4_ib] [ 154.762554] ipoib_tx_poll+0x4a/0xf0 [ib_ipoib] ... to a SOFTIRQ-irq-unsafe lock: [ 154.815603] (&(&qp_table->lock)->rlock){+.+.} [ 154.815604] ... which became SOFTIRQ-irq-unsafe at: [ 154.827718] ... [ 154.827720] _raw_spin_lock+0x35/0x50 [ 154.833912] mlx4_qp_lookup+0x1e/0x50 [mlx4_core] [ 154.839302] mlx4_flow_attach+0x3f/0x3d0 [mlx4_core] Since mlx4_qp_lookup() is called only in process space, we can simply replace the spin_un/lock calls with spin_un/lock_irq calls. Fixes: 6dc06c08bef1 ("net/mlx4: Fix the check in attaching steering rules") Signed-off-by: Jack Morgenstein Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/qp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 79fb218d97980d4fee9a64f4c8ff05289364ba25 Author: Florian Fainelli Date: Tue May 22 17:04:49 2018 -0700 net: phy: broadcom: Fix bcm_write_exp() On newer PHYs, we need to select the expansion register to write with setting bits [11:8] to 0xf. This was done correctly by bcm7xxx.c prior to being migrated to generic code under bcm-phy-lib.c which unfortunately used the older implementation from the BCM54xx days. Fix this by creating an inline stub: bcm_write_exp_sel() which adds the correct value (MII_BCM54XX_EXP_SEL_ER) and update both the Cygnus PHY and BCM7xxx PHY drivers which require setting these bits. broadcom.c is unchanged because some PHYs even use a different selector method, so let them specify it directly (e.g: SerDes secondary selector). Fixes: a1cba5613edf ("net: phy: Add Broadcom phy library for common interfaces") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/bcm-cygnus.c | 6 +++--- drivers/net/phy/bcm-phy-lib.h | 7 +++++++ drivers/net/phy/bcm7xxx.c | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) commit 733a969a7ed14fc5786bcc59c1bdda83c7ddb46e Author: Florian Fainelli Date: Tue May 22 16:22:26 2018 -0700 net: phy: broadcom: Fix auxiliary control register reads We are currently doing auxiliary control register reads with the shadow register value 0b111 (0x7) which incidentally is also the selector value that should be present in bits [2:0]. Fix this by using the appropriate selector mask which is defined (MII_BCM54XX_AUXCTL_SHDWSEL_MASK). This does not have a functional impact yet because we always access the MII_BCM54XX_AUXCTL_SHDWSEL_MISC (0x7) register in the current code. This might change at some point though. Fixes: 5b4e29005123 ("net: phy: broadcom: add bcm54xx_auxctl_read") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/bcm-phy-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2eabd764cb5512f1338d06ffc054c8bc9fbe9104 Author: Roopa Prabhu Date: Tue May 22 13:44:51 2018 -0700 net: ipv4: add missing RTA_TABLE to rtm_ipv4_policy Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 1 + 1 file changed, 1 insertion(+) commit 4f7f56b6b11296909897696c0ad09d420b34208a Author: Colin Ian King Date: Tue May 22 16:42:51 2018 +0100 net/mlx4: fix spelling mistake: "Inrerface" -> "Interface" and rephrase message Trivial fix to spelling mistake in mlx4_dbg debug message and also change the phrasing of the message so that is is more readable Signed-off-by: Colin Ian King Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73f9d36440a3bbaa034013e17d2032a905552ab2 Author: Nathan Fontenot Date: Tue May 22 11:21:10 2018 -0500 ibmvnic: Only do H_EOI for mobility events When enabling the sub-CRQ IRQ a previous update sent a H_EOI prior to the enablement to clear any pending interrupts that may be present across a partition migration. This fixed a firmware bug where a migration could erroneously indicate that a H_EOI was pending. The H_EOI should only be sent when enabling during a mobility event though. Doing so at other time could wrong and can produce extra driver output when IRQs are enabled when doing TX completion. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 40f7090bb1b4ec327ea1e1402ff5783af5b35195 Author: Benjamin Tissoires Date: Tue May 22 17:19:57 2018 -0700 Input: elan_i2c_smbus - fix corrupted stack New ICs (like the one on the Lenovo T480s) answer to ETP_SMBUS_IAP_VERSION_CMD 4 bytes instead of 3. This corrupts the stack as i2c_smbus_read_block_data() uses the values returned by the i2c device to know how many data it need to return. i2c_smbus_read_block_data() can read up to 32 bytes (I2C_SMBUS_BLOCK_MAX) and there is no safeguard on how many bytes are provided in the return value. Ensure we always have enough space for any future firmware. Also 0-initialize the values to prevent any access to uninitialized memory. Cc: # v4.4.x, v4.9.x, v4.14.x, v4.15.x, v4.16.x Signed-off-by: Benjamin Tissoires Acked-by: KT Liao Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_smbus.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit ad8fb554f04e38f155c9bc34bbf521fc592ceee7 Author: Benjamin Tissoires Date: Tue May 22 17:16:08 2018 -0700 Input: synaptics - add Lenovo 80 series ids to SMBus This time, Lenovo decided to go with different pieces in its latest series of Thinkpads. For those we have been able to test: - the T480 is using Synaptics with an IBM trackpoint -> it behaves properly with or without intertouch, there is no point not using RMI4 - the X1 Carbon 6th gen is using Synaptics with an IBM trackpoint -> the touchpad doesn't behave properly under PS/2 so we have to switch it to RMI4 if we do not want to have disappointed users - the X280 is using Synaptics with an ALPS trackpoint -> the recent fixes in the trackpoint handling fixed it so upstream now works fine with or without RMI4, and there is no point not using RMI4 - the T480s is using an Elan touchpad, so that's a different story Cc: # v4.14.x, v4.15.x, v4.16.x Signed-off-by: Benjamin Tissoires Acked-by: KT Liao Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 2 ++ 1 file changed, 2 insertions(+) commit 5717a09aeaf62d197deba1fc7ccd6bc45f3a9dcc Author: Aaron Ma Date: Sat Feb 3 11:49:22 2018 -0800 Input: synaptics - add Intertouch support on X1 Carbon 6th and X280 Synaptics devices reported it has Intertouch support, and it fails via PS/2 as following logs: psmouse serio2: Failed to reset mouse on synaptics-pt/serio0 psmouse serio2: Failed to enable mouse on synaptics-pt/serio0 Set these new devices to use SMBus to fix this issue, then they report SMBus version 3 is using, patch: https://patchwork.kernel.org/patch/9989547/ enabled SMBus ver 3 and makes synaptics devices work fine on SMBus mode. Signed-off-by: Aaron Ma Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 2 ++ 1 file changed, 2 insertions(+) commit 15e2cffec3aa0d47a8d75ae80e1b136bfb5dff30 Author: Edvard Holst Date: Sat Feb 3 11:46:15 2018 -0800 Input: synaptics - Lenovo Thinkpad X1 Carbon G5 (2017) with Elantech trackpoints should use RMI Lenovo use two different trackpoints in the fifth generation Thinkpad X1 Carbon. Both are accessible over SMBUS/RMI but the pnpIDs are missing. This patch is for the Elantech trackpoint specifically which also reports SMB version 3 so rmi_smbus needs to be updated in order to handle it. For the record, I was not the first one to come up with this patch as it has been floating around the internet for a while now. However, I have spent significant time with testing and my efforts to find the original author of the patch have been unsuccessful. Signed-off-by: Edvard Holst Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 1 + 1 file changed, 1 insertion(+) commit ab1f1786baa32bbe8eaa9d1463395a6da1bd7795 Merge: 2f3ab62 813477a Author: David S. Miller Date: Wed May 23 14:45:42 2018 -0400 Merge tag 'wireless-drivers-for-davem-2018-05-22' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.17 Hopefully the last fixes for 4.17. ssb is again causing problems so we had to revert a commit and fix it better. Also a small fix to bcma and some MAINTAINERS file updates. ssb * fix regression with all module PCI cards, for example using b43 and b44 drivers * try again fixing a MIPS linker error bcma * fix truncated info log messages ==================== Signed-off-by: David S. Miller commit 9b2071028f8def49971a3b213ab6efd02a7e56e8 Author: Dmitry Torokhov Date: Fri Aug 18 12:08:13 2017 -0700 Input: synaptics - Lenovo Carbon X1 Gen5 (2017) devices should use RMI The touchpad on Lenovo Carbon X1 Gen 5 (2017 - Kabylake) is accessible over SMBUS/RMI, so let's activate it by default. Cc: stable@vger.kernel.org Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 1 + 1 file changed, 1 insertion(+) commit 2f3ab6221e4c87960347d65c7cab9bd917d1f637 Author: Jason Wang Date: Tue May 22 14:21:04 2018 +0800 tuntap: correctly set SOCKWQ_ASYNC_NOSPACE When link is down, writes to the device might fail with -EIO. Userspace needs an indication when the status is resolved. As a fix, tun_net_open() attempts to wake up writers - but that is only effective if SOCKWQ_ASYNC_NOSPACE has been set in the past. This is not the case of vhost_net which only poll for EPOLLOUT after it meets errors during sendmsg(). This patch fixes this by making sure SOCKWQ_ASYNC_NOSPACE is set when socket is not writable or device is down to guarantee EPOLLOUT will be raised in either tun_chr_poll() or tun_sock_write_space() after device is up. Cc: Hannes Frederic Sowa Cc: Eric Dumazet Fixes: 1bd4978a88ac2 ("tun: honor IFF_UP in tun_get_user()") Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/tun.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit a43ad59a908055d288e524e559494805a6c7299e Merge: 419fc88 3d62b2a Author: David S. Miller Date: Wed May 23 13:36:19 2018 -0400 Merge branch 'virtio_net-mergeable-XDP' Jason Wang says: ==================== Fix several issues of virtio-net mergeable XDP Please review the patches that tries to fix several issues of virtio-net mergeable XDP. Changes from V1: - check against 1 before decreasing instead of resetting to 1 - typoe fixes ==================== Signed-off-by: David S. Miller commit 3d62b2a0db505bbf9ed0755f254e45d775f9807f Author: Jason Wang Date: Tue May 22 11:44:31 2018 +0800 virtio-net: fix leaking page for gso packet during mergeable XDP We need to drop refcnt to xdp_page if we see a gso packet. Otherwise it will be leaked. Fixing this by moving the check of gso packet above the linearizing logic. While at it, remove useless comment as well. Cc: John Fastabend Fixes: 72979a6c3590 ("virtio_net: xdp, add slowpath case for non contiguous buffers") Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 850e088d5bbb333342fd4def08d0a4035f2b7126 Author: Jason Wang Date: Tue May 22 11:44:30 2018 +0800 virtio-net: correctly check num_buf during err path If we successfully linearize the packet, num_buf will be set to zero which may confuse error handling path which assumes num_buf is at least 1 and this can lead the code tries to pop the descriptor of next buffer. Fixing this by checking num_buf against 1 before decreasing. Fixes: 4941d472bf95 ("virtio-net: do not reset during XDP set") Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d458a13dd59d04b4d6658a6d5b94d42732b15ae Author: Jason Wang Date: Tue May 22 11:44:29 2018 +0800 virtio-net: correctly transmit XDP buff after linearizing We should not go for the error path after successfully transmitting a XDP buffer after linearizing. Since the error path may try to pop and drop next packet and increase the drop counters. Fixing this by simply drop the refcnt of original page and go for xmit path. Fixes: 72979a6c3590 ("virtio_net: xdp, add slowpath case for non contiguous buffers") Cc: John Fastabend Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6890418bbb780f0ee9cf124055afa79777f1b4f1 Author: Jason Wang Date: Tue May 22 11:44:28 2018 +0800 virtio-net: correctly redirect linearized packet After a linearized packet was redirected by XDP, we should not go for the err path which will try to pop buffers for the next packet and increase the drop counter. Fixing this by just drop the page refcnt for the original page. Fixes: 186b3c998c50 ("virtio-net: support XDP_REDIRECT") Reported-by: David Ahern Tested-by: David Ahern Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 419fc888e5396968620bb8f85beb7ab55293f04f Merge: d7db318 fed4825 Author: David S. Miller Date: Wed May 23 11:50:05 2018 -0400 Merge tag 'mac80211-for-davem-2018-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== A handful of fixes: * hwsim radio dump wasn't working for the first radio * mesh was updating statistics incorrectly * a netlink message allocation was possibly too short * wiphy name limit was still too long * in certain cases regdb query could find a NULL pointer ==================== Signed-off-by: David S. Miller commit bee797529d7c1ea4e2803fda067d20edbc00bc3d Merge: 9ce8654 1179956 Author: Linus Torvalds Date: Wed May 23 08:20:49 2018 -0700 Merge tag 'mfd-fixes-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD fix from Lee Jones: "A single cros_ec_spi fix correcting the handling for long-running commands" * tag 'mfd-fixes-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: mfd: cros_ec: Retry commands when EC is known to be busy commit 9ce8654323d69273b4977f76f11c9e2d345ab130 Merge: a048a07 92d7223 Author: Linus Torvalds Date: Wed May 23 08:18:33 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha Pull alpha fixes from Matt Turner: "A few small changes for alpha" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha: alpha: io: reorder barriers to guarantee writeX() and iowriteX() ordering #2 alpha: simplify get_arch_dma_ops alpha: use dma_direct_ops for jensen commit 6a93cea15ed38e2dba4a0552483d28b7a87a03bd Author: Thomas Hellstrom Date: Wed May 23 16:14:54 2018 +0200 drm/vmwgfx: Schedule an fb dirty update after resume We have had problems displaying fbdev after a resume and as a workaround we have had to call vmw_fb_refresh(). This has had a number of unwanted side-effects. The root of the problem was, however that the coalesced fbdev dirty region was not empty on the first dirty_mark() after a resume, so a flush was never scheduled. Fix this by force scheduling an fbdev flush after resume, and remove the workaround. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Deepak Rawat drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 5 ----- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 22 +++++++--------------- 3 files changed, 7 insertions(+), 21 deletions(-) commit f37230c0ad481091bc136788ff8b37dc86300c6d Author: Thomas Hellstrom Date: Wed May 23 16:13:20 2018 +0200 drm/vmwgfx: Fix host logging / guestinfo reading error paths The error paths were leaking opened channels. Fix by using dedicated error paths. Cc: Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 48 ++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 17 deletions(-) commit 938ae7259c908ad031da35d551da297640bb640c Author: Thomas Hellstrom Date: Wed May 23 16:11:24 2018 +0200 drm/vmwgfx: Fix 32-bit VMW_PORT_HB_[IN|OUT] macros Depending on whether the kernel is compiled with frame-pointer or not, the temporary memory location used for the bp parameter in these macros is referenced relative to the stack pointer or the frame pointer. Hence we can never reference that parameter when we've modified either the stack pointer or the frame pointer, because then the compiler would generate an incorrect stack reference. Fix this by pushing the temporary memory parameter on a known location on the stack before modifying the stack- and frame pointers. Cc: Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_msg.h | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 1a2b80ecc7ad374e9ef6a3de6fdd032d94be2270 Author: Anders Roxell Date: Sat May 19 00:27:37 2018 +0200 selftests: net: reuseport_bpf_numa: don't fail if no numa support The reuseport_bpf_numa test case fails there's no numa support. The test shouldn't fail if there's no support it should be skipped. Fixes: 3c2c3c16aaf6 ("reuseport, bpf: add test case for bpf_get_numa_node_id") Signed-off-by: Anders Roxell Signed-off-by: Daniel Borkmann tools/testing/selftests/net/reuseport_bpf_numa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 52f96757905bbf0edef47f3ee6c7c784e7f8ff8a Author: Julian Anastasov Date: Sat May 19 18:22:35 2018 +0300 ipvs: fix buffer overflow with sync daemon and service syzkaller reports for buffer overflow for interface name when starting sync daemons [1] What we do is that we copy user structure into larger stack buffer but later we search NUL past the stack buffer. The same happens for sched_name when adding/editing virtual server. We are restricted by IP_VS_SCHEDNAME_MAXLEN and IP_VS_IFNAME_MAXLEN being used as size in include/uapi/linux/ip_vs.h, so they include the space for NUL. As using strlcpy is wrong for unsafe source, replace it with strscpy and add checks to return EINVAL if source string is not NUL-terminated. The incomplete strlcpy fix comes from 2.6.13. For the netlink interface reduce the len parameter for IPVS_DAEMON_ATTR_MCAST_IFN and IPVS_SVC_ATTR_SCHED_NAME, so that we get proper EINVAL. [1] kernel BUG at lib/string.c:1052! invalid opcode: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 373 Comm: syz-executor936 Not tainted 4.17.0-rc4+ #45 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:fortify_panic+0x13/0x20 lib/string.c:1051 RSP: 0018:ffff8801c976f800 EFLAGS: 00010282 RAX: 0000000000000022 RBX: 0000000000000040 RCX: 0000000000000000 RDX: 0000000000000022 RSI: ffffffff8160f6f1 RDI: ffffed00392edef6 RBP: ffff8801c976f800 R08: ffff8801cf4c62c0 R09: ffffed003b5e4fb0 R10: ffffed003b5e4fb0 R11: ffff8801daf27d87 R12: ffff8801c976fa20 R13: ffff8801c976fae4 R14: ffff8801c976fae0 R15: 000000000000048b FS: 00007fd99f75e700(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000200001c0 CR3: 00000001d6843000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: strlen include/linux/string.h:270 [inline] strlcpy include/linux/string.h:293 [inline] do_ip_vs_set_ctl+0x31c/0x1d00 net/netfilter/ipvs/ip_vs_ctl.c:2388 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x7d/0xd0 net/netfilter/nf_sockopt.c:115 ip_setsockopt+0xd8/0xf0 net/ipv4/ip_sockglue.c:1253 udp_setsockopt+0x62/0xa0 net/ipv4/udp.c:2487 ipv6_setsockopt+0x149/0x170 net/ipv6/ipv6_sockglue.c:917 tcp_setsockopt+0x93/0xe0 net/ipv4/tcp.c:3057 sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:3046 __sys_setsockopt+0x1bd/0x390 net/socket.c:1903 __do_sys_setsockopt net/socket.c:1914 [inline] __se_sys_setsockopt net/socket.c:1911 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1911 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x447369 RSP: 002b:00007fd99f75dda8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00000000006e39e4 RCX: 0000000000447369 RDX: 000000000000048b RSI: 0000000000000000 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000018 R09: 0000000000000000 R10: 00000000200001c0 R11: 0000000000000246 R12: 00000000006e39e0 R13: 75a1ff93f0896195 R14: 6f745f3168746576 R15: 0000000000000001 Code: 08 5b 41 5c 41 5d 41 5e 41 5f 5d c3 0f 0b 48 89 df e8 d2 8f 48 fa eb de 55 48 89 fe 48 c7 c7 60 65 64 88 48 89 e5 e8 91 dd f3 f9 <0f> 0b 90 90 90 90 90 90 90 90 90 90 90 55 48 89 e5 41 57 41 56 RIP: fortify_panic+0x13/0x20 lib/string.c:1051 RSP: ffff8801c976f800 Reported-and-tested-by: syzbot+aac887f77319868646df@syzkaller.appspotmail.com Fixes: e4ff67513096 ("ipvs: add sync_maxlen parameter for the sync daemon") Fixes: 4da62fc70d7c ("[IPVS]: Fix for overflows") Signed-off-by: Julian Anastasov Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_ctl.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 8ecc4979b1bd9c94168e6fc92960033b7a951336 Author: Dominik Brodowski Date: Tue May 22 11:05:39 2018 +0200 x86/speculation: Simplify the CPU bug detection logic Only CPUs which speculate can speculate. Therefore, it seems prudent to test for cpu_no_speculation first and only then determine whether a specific speculating CPU is susceptible to store bypass speculation. This is underlined by all CPUs currently listed in cpu_no_speculation were present in cpu_no_spec_store_bypass as well. Signed-off-by: Dominik Brodowski Signed-off-by: Thomas Gleixner Cc: bp@suse.de Cc: konrad.wilk@oracle.com Link: https://lkml.kernel.org/r/20180522090539.GA24668@light.dominikbrodowski.net arch/x86/kernel/cpu/common.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit 0aa48468d00959c8a37cd3ac727284f4f7359151 Author: Konrad Rzeszutek Wilk Date: Mon May 21 17:54:49 2018 -0400 KVM/VMX: Expose SSBD properly to guests The X86_FEATURE_SSBD is an synthetic CPU feature - that is it bit location has no relevance to the real CPUID 0x7.EBX[31] bit position. For that we need the new CPU feature name. Fixes: 52817587e706 ("x86/cpufeatures: Disentangle SSBD enumeration") Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner Cc: kvm@vger.kernel.org Cc: "Radim Krčmář" Cc: stable@vger.kernel.org Cc: "H. Peter Anvin" Cc: Paolo Bonzini Link: https://lkml.kernel.org/r/20180521215449.26423-2-konrad.wilk@oracle.com arch/x86/kvm/cpuid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3e0f64b7dd3149f75e8652ff1df56cffeedc8fc1 Author: Pablo Neira Ayuso Date: Wed May 16 22:58:33 2018 +0200 netfilter: nft_limit: fix packet ratelimiting Credit calculations for the packet ratelimiting are not correct, as per the applied ratelimit of 25/second and burst 8, a total of 33 packets should have been accepted. This is true in iptables(33) but not in nftables (~65). For packet ratelimiting, use: div_u64(limit->nsecs, limit->rate) * limit->burst; to calculate credit, just like in iptables' xt_limit does. Moreover, use default burst in iptables, users are expecting similar behaviour. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_limit.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit 97a0549b15a0b466c47f6a0143a490a082c64b4e Author: Taehee Yoo Date: Thu May 17 22:49:49 2018 +0900 netfilter: nft_meta: fix wrong value dereference in nft_meta_set_eval In the nft_meta_set_eval, nftrace value is dereferenced as u32 from sreg. But correct type is u8. so that sometimes incorrect value is dereferenced. Steps to reproduce: %nft add table ip filter %nft add chain ip filter input { type filter hook input priority 4\; } %nft add rule ip filter input nftrace set 0 %nft monitor Sometimes, we can see trace messages. trace id 16767227 ip filter input packet: iif "enp2s0" ether saddr xx:xx:xx:xx:xx:xx ether daddr xx:xx:xx:xx:xx:xx ip saddr 192.168.0.1 ip daddr 255.255.255.255 ip dscp cs0 ip ecn not-ect ip trace id 16767227 ip filter input rule nftrace set 0 (verdict continue) trace id 16767227 ip filter input verdict continue trace id 16767227 ip filter input Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_meta.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit f0f59a2fab8e52b9d582b39da39f22230ca80aee Author: Sebastian Ott Date: Tue May 15 14:05:13 2018 +0200 s390/dasd: use blk_mq_rq_from_pdu for per request data Dasd uses completion_data from struct request to store per request private data - this is problematic since this member is part of a union which is also used by IO schedulers. Let the block layer maintain space for per request data behind each struct request. Fixes crashes on block layer timeouts like this one: Unable to handle kernel pointer dereference in virtual kernel address space Failing address: 0000000000000000 TEID: 0000000000000483 Fault in home space mode while using kernel ASCE. AS:0000000001308007 R3:00000000fffc8007 S:00000000fffcc000 P:000000000000013d Oops: 0004 ilc:2 [#1] PREEMPT SMP Modules linked in: [...] CPU: 0 PID: 1480 Comm: kworker/0:2H Not tainted 4.17.0-rc4-00046-gaa3bcd43b5af #203 Hardware name: IBM 3906 M02 702 (LPAR) Workqueue: kblockd blk_mq_timeout_work Krnl PSW : 0000000067ac406b 00000000b6960308 (do_raw_spin_trylock+0x30/0x78) R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 RI:0 EA:3 Krnl GPRS: 0000000000000c00 0000000000000000 0000000000000000 0000000000000001 0000000000b9d3c8 0000000000000000 0000000000000001 00000000cf9639d8 0000000000000000 0700000000000000 0000000000000000 000000000099f09e 0000000000000000 000000000076e9d0 000000006247bb08 000000006247bae0 Krnl Code: 00000000001c159c: b90400c2 lgr %r12,%r2 00000000001c15a0: a7180000 lhi %r1,0 #00000000001c15a4: 583003a4 l %r3,932 >00000000001c15a8: ba132000 cs %r1,%r3,0(%r2) 00000000001c15ac: a7180001 lhi %r1,1 00000000001c15b0: a784000b brc 8,1c15c6 00000000001c15b4: c0e5004e72aa brasl %r14,b8fb08 00000000001c15ba: 1812 lr %r1,%r2 Call Trace: ([<0700000000000000>] 0x700000000000000) [<0000000000b9d3d2>] _raw_spin_lock_irqsave+0x7a/0xb8 [<000000000099f09e>] dasd_times_out+0x46/0x278 [<000000000076ea6e>] blk_mq_terminate_expired+0x9e/0x108 [<000000000077497a>] bt_for_each+0x102/0x130 [<0000000000774e54>] blk_mq_queue_tag_busy_iter+0x74/0xd8 [<000000000076fea0>] blk_mq_timeout_work+0x260/0x320 [<0000000000169dd4>] process_one_work+0x3bc/0x708 [<000000000016a382>] worker_thread+0x262/0x408 [<00000000001723a8>] kthread+0x160/0x178 [<0000000000b9e73a>] kernel_thread_starter+0x6/0xc [<0000000000b9e734>] kernel_thread_starter+0x0/0xc INFO: lockdep is turned off. Last Breaking-Event-Address: [<0000000000b9d3cc>] _raw_spin_lock_irqsave+0x74/0xb8 Kernel panic - not syncing: Fatal exception: panic_on_oops Signed-off-by: Sebastian Ott Reviewed-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 11799564fc7eedff50801950090773928f867996 Author: Brian Norris Date: Tue May 22 17:23:10 2018 -0700 mfd: cros_ec: Retry commands when EC is known to be busy Commit 001dde9400d5 ("mfd: cros ec: spi: Fix "in progress" error signaling") pointed out some bad code, but its analysis and conclusion was not 100% correct. It *is* correct that we should not propagate result==EC_RES_IN_PROGRESS for transport errors, because this has a special meaning -- that we should follow up with EC_CMD_GET_COMMS_STATUS until the EC is no longer busy. This is definitely the wrong thing for many commands, because among other problems, EC_CMD_GET_COMMS_STATUS doesn't actually retrieve any RX data from the EC, so commands that expected some data back will instead start processing junk. For such commands, the right answer is to either propagate the error (and return that error to the caller) or resend the original command (*not* EC_CMD_GET_COMMS_STATUS). Unfortunately, commit 001dde9400d5 forgets a crucial point: that for some long-running operations, the EC physically cannot respond to commands any more. For example, with EC_CMD_FLASH_ERASE, the EC may be re-flashing its own code regions, so it can't respond to SPI interrupts. Instead, the EC prepares us ahead of time for being busy for a "long" time, and fills its hardware buffer with EC_SPI_PAST_END. Thus, we expect to see several "transport" errors (or, messages filled with EC_SPI_PAST_END). So we should really translate that to a retryable error (-EAGAIN) and continue sending EC_CMD_GET_COMMS_STATUS until we get a ready status. IOW, it is actually important to treat some of these "junk" values as retryable errors. Together with commit 001dde9400d5, this resolves bugs like the following: 1. EC_CMD_FLASH_ERASE now works again (with commit 001dde9400d5, we would abort the first time we saw EC_SPI_PAST_END) 2. Before commit 001dde9400d5, transport errors (e.g., EC_SPI_RX_BAD_DATA) seen in other commands (e.g., EC_CMD_RTC_GET_VALUE) used to yield junk data in the RX buffer; they will now yield -EAGAIN return values, and tools like 'hwclock' will simply fail instead of retrieving and re-programming undefined time values Fixes: 001dde9400d5 ("mfd: cros ec: spi: Fix "in progress" error signaling") Signed-off-by: Brian Norris Signed-off-by: Lee Jones drivers/mfd/cros_ec_spi.c | 24 ++++++++++++++++++++---- drivers/platform/chrome/cros_ec_proto.c | 2 ++ 2 files changed, 22 insertions(+), 4 deletions(-) commit a30e7d1e37e8acc37c25420d93af218166cca3ae Author: Vincent Chen Date: Mon May 21 14:36:22 2018 +0800 nds32: Fix compiler warning, Wstringop-overflow, in vdso.c Getting a compiler warning, Wstringop-overflow, in arch/nds32/kernel/vdso.c when kernel is built by gcc-8. Declaring vdso_start and vdso_end as a pointer to fix this compiler warning. Signed-off-by: Vincent Chen Reviewed-by: Greentime Hu Signed-off-by: Greentime Hu arch/nds32/kernel/vdso.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit aaaaba57509526ce924f997d8690ee9e0c93945a Author: Vincent Chen Date: Mon May 14 18:56:35 2018 +0800 nds32: Disable local irq before calling cpu_dcache_wb_page in copy_user_highpage In order to ensure that all data in source page has been written back to memory before copy_page, the local irq shall be disabled before calling cpu_dcache_wb_page(). In addition, removing unneeded page invalidation for 'to' page. Signed-off-by: Vincent Chen Reviewed-by: Greentime Hu Signed-off-by: Greentime Hu arch/nds32/mm/cacheflush.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5b9f95699b2166e06b7d7820c8173fdbff0ddf35 Author: Vincent Chen Date: Mon May 14 16:56:53 2018 +0800 nds32: Flush the cache of the page at vmaddr instead of kaddr in flush_anon_page According to Documentation/cachetlb.txt, the cache of the page at vmaddr shall be flushed in flush_anon_page instead of the cache of the page at page_address(page). Signed-off-by: Vincent Chen Reviewed-by: Greentime Hu Signed-off-by: Greentime Hu arch/nds32/mm/cacheflush.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit efcc4ea872edaeded28245d9b2ca8b9d8181b7cf Author: Vincent Chen Date: Tue Apr 24 15:08:46 2018 +0800 nds32: Correct flush_dcache_page function 1. Disable local irq before d-cache write-back and invalidate. The cpu_dcache_wbinval_page function is composed of d-cache write-back and invalidate. If the local irq is enabled when calling cpu_dcache_wbinval_page, the content of d-cache is possibly updated between write-back and invalidate. In this case, the updated data will be dropped due to the following d-cache invalidation. Therefore, we disable the local irq before calling cpu_dcache_wbinval_page. 2. Correct the data write-back for page aliasing case. Only the page whose (page->index << PAGE_SHIFT) is located at the same page color as page_address(page) needs to execute data write-back in flush_dcache_page function. Signed-off-by: Vincent Chen Reviewed-by: Greentime Hu Signed-off-by: Greentime Hu arch/nds32/mm/cacheflush.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 1613de8a785d21b3aac73d2a2e640b66d514393b Author: Nickhu Date: Thu May 3 10:15:56 2018 +0800 nds32: Fix the unaligned access handler If the kernel config 'CONFIG_ALIGNMENT_TRAP' and the file '/proc/sys/nds32/unaligned_access/enable' are set, the kernel unaligned access handler does not handle correctly when the value of immediate field is negative. This commit fixes the unaligned access handler in kernel. Signed-off-by: Nickhu Reviewed-by: Greentime Hu Signed-off-by: Greentime Hu arch/nds32/mm/alignment.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b3a75846a5cfbea137e2810b2bf9407141e70feb Author: Nickhu Date: Fri May 4 16:40:11 2018 +0800 nds32: Renaming the file for unaligned access Change the name of the file '/proc/sys/nds32/unaligned_acess' to '/proc/sys/nds32/unaligned_access' Signed-off-by: Nickhu Reviewed-by: Greentime Hu Signed-off-by: Greentime Hu arch/nds32/mm/alignment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abb90a24eade1f612324de0e6920041ef64795cb Author: Greentime Hu Date: Mon Apr 30 15:02:27 2018 +0800 nds32: To fix a cache inconsistency issue by setting correct cacheability of NTC The nds32 architecture will use physical memory when interrupt or exception comes and it will use the setting of NTC0-4. The original implementation didn't consider the DRAM start address may start from 1GB, 2GB or 3GB to cause this issue. It will write the data to DRAM if it is running in physical address however kernel will read the data with virtaul address through data cache. In this case, the data of DRAM is latest. This fix will set the correct cacheability to let kernel write/read the latest data in cache instead of DRAM. Signed-off-by: Greentime Hu arch/nds32/include/asm/bitfield.h | 1 + arch/nds32/kernel/head.S | 28 +++++++++++++++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) commit 8769c223491a7fbb345021e7004cbdffe024eaf8 Author: Greentime Hu Date: Mon Apr 30 11:32:47 2018 +0800 nds32: To refine readability of INT_MASK_INITAIAL_VAL Refine readability of INT_MASK_INITAIAL_VAL with meaningful macro instead of magic number. Signed-off-by: Greentime Hu arch/nds32/include/asm/bitfield.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ff2228dcea4e5c9b517375bd3aa9e3a1a3f29a0 Author: Greentime Hu Date: Mon Apr 30 11:21:18 2018 +0800 nds32: Fix the virtual address may map too much range by tlbop issue. We use tlbop to map virtual address in the first beginning, however it may map too much if DRAM size is not that big. We have to invalidate the mapping when the page table is created. Signed-off-by: Greentime Hu arch/nds32/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) commit b3b112bb06eb26ce44af63d599aaf5fe54de0699 Author: Greentime Hu Date: Thu Apr 19 16:26:43 2018 +0800 nds32: Fix the allmodconfig build. To make sure CONFIG_CPU_LITTLE_ENDIAN is default y This way we can build kernel with CONFIG_CPU_LITTLE_ENDIAN=y. Build allmodconfig and allnoconfig are available too. It also fixes the endian mismatch issue because AFLAGS and LDFLAGS is not passed correctly. Signed-off-by: Vincent Ren-Wei Chen Signed-off-by: Greentime Hu arch/nds32/Kconfig.cpu | 5 +++-- arch/nds32/Makefile | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit c8c20f9c162da25ea0893d5c5ded3a89382a2b5e Author: Greentime Hu Date: Thu Apr 19 16:04:36 2018 +0800 nds32: Fix build failed because arch_trace_hardirqs_off is changed to trace_hardirqs_off. It broke the 'allmodconfig' build when CONFIG_TRACE_IRQFLAGS is enabled. Signed-off-by: Nick Chun-Ming Hu Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/kernel/ex-entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb912671e36552e11352a6b749dcf68b0df6ad01 Author: Greentime Hu Date: Thu Apr 19 15:59:38 2018 +0800 nds32: Fix the unknown type u8 issue. It broke the 'allmodconfig' build. We need to include to make sure the type is defined before using it. Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/io.h | 2 ++ 1 file changed, 2 insertions(+) commit e3f4624388731eb475ef7494b43440b3ad9269e1 Author: Greentime Hu Date: Thu Apr 19 15:45:45 2018 +0800 nds32: Fix the symbols undefined issue by exporting them. It broke the 'allmodconfig' build. LD vmlinux SYSMAP System.map Building modules, stage 2. MODPOST 5028 modules ERROR: "flush_dcache_page" [net/sunrpc/xprtrdma/rpcrdma.ko] undefined! ERROR: "empty_zero_page" [net/ceph/libceph.ko] undefined! ERROR: "save_stack_trace" [kernel/backtracetest.ko] undefined! ERROR: "clear_page" [fs/ocfs2/dlm/ocfs2_dlm.ko] undefined! ERROR: "copy_page" [fs/nilfs2/nilfs2.ko] undefined! ... Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/Kbuild | 1 + arch/nds32/include/asm/page.h | 3 +++ arch/nds32/kernel/stacktrace.c | 2 ++ arch/nds32/lib/copy_page.S | 3 +++ arch/nds32/mm/cacheflush.c | 22 ++++++++++++++++++++++ arch/nds32/mm/init.c | 1 + 6 files changed, 32 insertions(+) commit 03969d0b3a3f6a7cd2c731eed1c4ccf76da88586 Author: Greentime Hu Date: Thu Apr 19 15:38:58 2018 +0800 nds32: Fix xfs_buf built failed by export invalidate_kernel_vmap_range and flush_kernel_vmap_range It broke the 'allmodconfig' build. fs/xfs/xfs_buf.c: In function 'xfs_buf_bio_end_io': fs/xfs/xfs_buf.c:1242:3: error: implicit declaration of function 'invalidate_kernel_vmap_range' [-Werror=implicit-function-declaration] invalidate_kernel_vmap_range(bp->b_addr, xfs_buf_vmap_len(bp)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/xfs/xfs_buf.c: In function 'xfs_buf_ioapply_map': fs/xfs/xfs_buf.c:1312:4: error: implicit declaration of function 'flush_kernel_vmap_range' [-Werror=implicit-function-declaration] flush_kernel_vmap_range(bp->b_addr, ^~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/cacheflush.h | 2 ++ arch/nds32/mm/cacheflush.c | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) commit 8cedb78fdf82468020a2f3b24ef63ccd397662a2 Author: Greentime Hu Date: Thu Apr 19 11:33:01 2018 +0800 nds32: Fix drivers/gpu/drm/udl/udl_fb.c building error by defining PAGE_SHARED It broke the 'allmodconfig' build. drivers/gpu/drm/udl/udl_fb.c: In function 'udl_fb_mmap': drivers/gpu/drm/udl/udl_fb.c:183:52: error: 'PAGE_SHARED' undeclared (first use in this function) if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) ^~~~~~~~~~~ drivers/gpu/drm/udl/udl_fb.c:183:52: note: each undeclared identifier is reported only once for each function it appears in make[4]: *** [drivers/gpu/drm/udl/udl_fb.o] Error 1 Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/pgtable.h | 1 + 1 file changed, 1 insertion(+) commit 81560e011a3420db03f7b021d1bc37a2242634f7 Author: Greentime Hu Date: Thu Apr 19 11:27:59 2018 +0800 nds32: Fix building error of crypto/xor.c by adding xor.h When I compiled with allmodconfig, it caused this building failed. crypto/xor.c:25:21: fatal error: asm/xor.h: No such file or directory #include ^ compilation terminated. Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) commit 6ca4b262dbc94b3ed5fd4c8c1ad4d86616286779 Author: Greentime Hu Date: Thu Apr 19 11:17:35 2018 +0800 nds32: Fix building error when CONFIG_FREEZE is enabled. To include kernel/Kconfig.freezer to make sure the dependency between CONFIG_CGROUP_FREEZER and CONFIG_FREEZER It will cause building error when I make allmodconfig. kernel/cgroup/freezer.c: In function 'freezer_css_online': kernel/cgroup/freezer.c:116:15: error: 'system_freezing_cnt' undeclared (first use in this function) atomic_inc(&system_freezing_cnt); ^~~~~~~~~~~~~~~~~~~ kernel/cgroup/freezer.c:116:15: note: each undeclared identifier is reported only once for each function it appears in kernel/cgroup/freezer.c: In function 'freezer_css_offline': kernel/cgroup/freezer.c:137:15: error: 'system_freezing_cnt' undeclared (first use in this function) atomic_dec(&system_freezing_cnt); ^~~~~~~~~~~~~~~~~~~ kernel/cgroup/freezer.c: In function 'freezer_attach': kernel/cgroup/freezer.c:181:4: error: implicit declaration of function 'freeze_task' [-Werror=implicit-function-declaration] freeze_task(task); ^~~~~~~~~~~ kernel/cgroup/freezer.c: In function 'freezer_apply_state': kernel/cgroup/freezer.c:360:16: error: 'system_freezing_cnt' undeclared (first use in this function) atomic_inc(&system_freezing_cnt); ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/Kconfig | 1 + 1 file changed, 1 insertion(+) commit aeaa7af744fadf5fa03bdea2d12ecc0fa2a41542 Author: Greentime Hu Date: Thu Apr 19 11:06:31 2018 +0800 nds32: lib: To use generic lib instead of libgcc to prevent the symbol undefined issue. We can use the generic lib to fix these error because the symbol of libgcc in toolchain is not exported. ERROR: "__ucmpdi2" [fs/xfs/xfs.ko] undefined! ERROR: "__ashrdi3" [fs/xfs/xfs.ko] undefined! ERROR: "__lshrdi3" [fs/xfs/xfs.ko] undefined! ERROR: "__ashldi3" [fs/ntfs/ntfs.ko] undefined! ... Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/Kconfig | 6 ++++++ arch/nds32/Makefile | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) commit 92d7223a74235054f2aa7227d207d9c57f84dca0 Author: Sinan Kaya Date: Mon Apr 16 18:16:56 2018 -0400 alpha: io: reorder barriers to guarantee writeX() and iowriteX() ordering #2 memory-barriers.txt has been updated with the following requirement. "When using writel(), a prior wmb() is not needed to guarantee that the cache coherent memory writes have completed before writing to the MMIO region." Current writeX() and iowriteX() implementations on alpha are not satisfying this requirement as the barrier is after the register write. Move mb() in writeX() and iowriteX() functions to guarantee that HW observes memory changes before performing register operations. Signed-off-by: Sinan Kaya Reported-by: Arnd Bergmann Signed-off-by: Matt Turner arch/alpha/kernel/io.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit f5e82fa26063e6fad10624ff600457d878fa6e41 Author: Christoph Hellwig Date: Wed May 9 16:04:52 2018 +0200 alpha: simplify get_arch_dma_ops Remove the dma_ops indirection. Signed-off-by: Christoph Hellwig Signed-off-by: Matt Turner arch/alpha/include/asm/dma-mapping.h | 4 ++-- arch/alpha/kernel/pci_iommu.c | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) commit 6db615431a21b6057f68ed87583a663ee69f7601 Author: Christoph Hellwig Date: Wed May 9 16:04:51 2018 +0200 alpha: use dma_direct_ops for jensen The generic dma_direct implementation does the same thing as the alpha pci-noop implementation, just with more bells and whistles. And unlike the current code it at least has a theoretical chance to actually compile. Signed-off-by: Christoph Hellwig Signed-off-by: Matt Turner arch/alpha/Kconfig | 1 + arch/alpha/include/asm/dma-mapping.h | 4 ++++ arch/alpha/kernel/pci-noop.c | 33 --------------------------------- 3 files changed, 5 insertions(+), 33 deletions(-) commit d7db318651d5430eb79eceef1e6aa9b084ae78e6 Author: Bo Chen Date: Mon May 21 14:44:49 2018 -0700 pcnet32: add an error handling path in pcnet32_probe_pci() Make sure to invoke pci_disable_device() when errors occur in pcnet32_probe_pci(). Signed-off-by: Bo Chen Signed-off-by: David S. Miller drivers/net/ethernet/amd/pcnet32.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit fdd13dd350dda1826579eb5c333d76b14513b812 Author: Shahed Shaikh Date: Mon May 21 12:31:47 2018 -0700 qed: Fix mask for physical address in ILT entry ILT entry requires 12 bit right shifted physical address. Existing mask for ILT entry of physical address i.e. ILT_ENTRY_PHY_ADDR_MASK is not sufficient to handle 64bit address because upper 8 bits of 64 bit address were getting masked which resulted in completer abort error on PCIe bus due to invalid address. Fix that mask to handle 64bit physical address. Fixes: fe56b9e6a8d9 ("qed: Add module with basic common support") Signed-off-by: Shahed Shaikh Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66fb33254f45df4b049f487aff1cbde1ef919390 Author: Eric Dumazet Date: Mon May 21 10:51:53 2018 -0700 ipmr: properly check rhltable_init() return value commit 8fb472c09b9d ("ipmr: improve hash scalability") added a call to rhltable_init() without checking its return value. This problem was then later copied to IPv6 and factorized in commit 0bbbf0e7d0e7 ("ipmr, ip6mr: Unite creation of new mr_table") kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 31552 Comm: syz-executor7 Not tainted 4.17.0-rc5+ #60 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:rht_key_hashfn include/linux/rhashtable.h:277 [inline] RIP: 0010:__rhashtable_lookup include/linux/rhashtable.h:630 [inline] RIP: 0010:rhltable_lookup include/linux/rhashtable.h:716 [inline] RIP: 0010:mr_mfc_find_parent+0x2ad/0xbb0 net/ipv4/ipmr_base.c:63 RSP: 0018:ffff8801826aef70 EFLAGS: 00010203 RAX: 0000000000000001 RBX: 0000000000000001 RCX: ffffc90001ea0000 RDX: 0000000000000079 RSI: ffffffff8661e859 RDI: 000000000000000c RBP: ffff8801826af1c0 R08: ffff8801b2212000 R09: ffffed003b5e46c2 R10: ffffed003b5e46c2 R11: ffff8801daf23613 R12: dffffc0000000000 R13: ffff8801826af198 R14: ffff8801cf8225c0 R15: ffff8801826af658 FS: 00007ff7fa732700(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000003ffffff9c CR3: 00000001b0210000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ip6mr_cache_find_parent net/ipv6/ip6mr.c:981 [inline] ip6mr_mfc_delete+0x1fe/0x6b0 net/ipv6/ip6mr.c:1221 ip6_mroute_setsockopt+0x15c6/0x1d70 net/ipv6/ip6mr.c:1698 do_ipv6_setsockopt.isra.9+0x422/0x4660 net/ipv6/ipv6_sockglue.c:163 ipv6_setsockopt+0xbd/0x170 net/ipv6/ipv6_sockglue.c:922 rawv6_setsockopt+0x59/0x140 net/ipv6/raw.c:1060 sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:3039 __sys_setsockopt+0x1bd/0x390 net/socket.c:1903 __do_sys_setsockopt net/socket.c:1914 [inline] __se_sys_setsockopt net/socket.c:1911 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1911 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: 8fb472c09b9d ("ipmr: improve hash scalability") Fixes: 0bbbf0e7d0e7 ("ipmr, ip6mr: Unite creation of new mr_table") Signed-off-by: Eric Dumazet Cc: Nikolay Aleksandrov Cc: Yuval Mintz Reported-by: syzbot Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/ipv4/ipmr_base.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2677d20677314101293e6da0094ede7b5526d2b1 Author: Alexey Kodanev Date: Mon May 21 19:28:44 2018 +0300 dccp: don't free ccid2_hc_tx_sock struct in dccp_disconnect() Syzbot reported the use-after-free in timer_is_static_object() [1]. This can happen because the structure for the rto timer (ccid2_hc_tx_sock) is removed in dccp_disconnect(), and ccid2_hc_tx_rto_expire() can be called after that. The report [1] is similar to the one in commit 120e9dabaf55 ("dccp: defer ccid_hc_tx_delete() at dismantle time"). And the fix is the same, delay freeing ccid2_hc_tx_sock structure, so that it is freed in dccp_sk_destruct(). [1] ================================================================== BUG: KASAN: use-after-free in timer_is_static_object+0x80/0x90 kernel/time/timer.c:607 Read of size 8 at addr ffff8801bebb5118 by task syz-executor2/25299 CPU: 1 PID: 25299 Comm: syz-executor2 Not tainted 4.17.0-rc5+ #54 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 timer_is_static_object+0x80/0x90 kernel/time/timer.c:607 debug_object_activate+0x2d9/0x670 lib/debugobjects.c:508 debug_timer_activate kernel/time/timer.c:709 [inline] debug_activate kernel/time/timer.c:764 [inline] __mod_timer kernel/time/timer.c:1041 [inline] mod_timer+0x4d3/0x13b0 kernel/time/timer.c:1102 sk_reset_timer+0x22/0x60 net/core/sock.c:2742 ccid2_hc_tx_rto_expire+0x587/0x680 net/dccp/ccids/ccid2.c:147 call_timer_fn+0x230/0x940 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x79e/0xc50 kernel/time/timer.c:1666 run_timer_softirq+0x4c/0x70 kernel/time/timer.c:1692 __do_softirq+0x2e0/0xaf5 kernel/softirq.c:285 invoke_softirq kernel/softirq.c:365 [inline] irq_exit+0x1d1/0x200 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:525 [inline] smp_apic_timer_interrupt+0x17e/0x710 arch/x86/kernel/apic/apic.c:1052 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:863 ... Allocated by task 25374: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3554 ccid_new+0x25b/0x3e0 net/dccp/ccid.c:151 dccp_hdlr_ccid+0x27/0x150 net/dccp/feat.c:44 __dccp_feat_activate+0x184/0x270 net/dccp/feat.c:344 dccp_feat_activate_values+0x3a7/0x819 net/dccp/feat.c:1538 dccp_create_openreq_child+0x472/0x610 net/dccp/minisocks.c:128 dccp_v4_request_recv_sock+0x12c/0xca0 net/dccp/ipv4.c:408 dccp_v6_request_recv_sock+0x125d/0x1f10 net/dccp/ipv6.c:415 dccp_check_req+0x455/0x6a0 net/dccp/minisocks.c:197 dccp_v4_rcv+0x7b8/0x1f3f net/dccp/ipv4.c:841 ip_local_deliver_finish+0x2e3/0xd80 net/ipv4/ip_input.c:215 NF_HOOK include/linux/netfilter.h:288 [inline] ip_local_deliver+0x1e1/0x720 net/ipv4/ip_input.c:256 dst_input include/net/dst.h:450 [inline] ip_rcv_finish+0x81b/0x2200 net/ipv4/ip_input.c:396 NF_HOOK include/linux/netfilter.h:288 [inline] ip_rcv+0xb70/0x143d net/ipv4/ip_input.c:492 __netif_receive_skb_core+0x26f5/0x3630 net/core/dev.c:4592 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:4657 process_backlog+0x219/0x760 net/core/dev.c:5337 napi_poll net/core/dev.c:5735 [inline] net_rx_action+0x7b7/0x1930 net/core/dev.c:5801 __do_softirq+0x2e0/0xaf5 kernel/softirq.c:285 Freed by task 25374: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x86/0x2d0 mm/slab.c:3756 ccid_hc_tx_delete+0xc3/0x100 net/dccp/ccid.c:190 dccp_disconnect+0x130/0xc66 net/dccp/proto.c:286 dccp_close+0x3bc/0xe60 net/dccp/proto.c:1045 inet_release+0x104/0x1f0 net/ipv4/af_inet.c:427 inet6_release+0x50/0x70 net/ipv6/af_inet6.c:460 sock_release+0x96/0x1b0 net/socket.c:594 sock_close+0x16/0x20 net/socket.c:1149 __fput+0x34d/0x890 fs/file_table.c:209 ____fput+0x15/0x20 fs/file_table.c:243 task_work_run+0x1e4/0x290 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x2bd/0x310 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:265 [inline] do_syscall_64+0x6ac/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801bebb4cc0 which belongs to the cache ccid2_hc_tx_sock of size 1240 The buggy address is located 1112 bytes inside of 1240-byte region [ffff8801bebb4cc0, ffff8801bebb5198) The buggy address belongs to the page: page:ffffea0006faed00 count:1 mapcount:0 mapping:ffff8801bebb41c0 index:0xffff8801bebb5240 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801bebb41c0 ffff8801bebb5240 0000000100000003 raw: ffff8801cdba3138 ffffea0007634120 ffff8801cdbaab40 0000000000000000 page dumped because: kasan: bad access detected ... ================================================================== Reported-by: syzbot+5d47e9ec91a6f15dbd6f@syzkaller.appspotmail.com Signed-off-by: Alexey Kodanev Signed-off-by: David S. Miller net/dccp/proto.c | 2 -- 1 file changed, 2 deletions(-) commit 6009d1fe6ba3bb2dab55921da60465329cc1cd89 Author: Wenwen Wang Date: Mon May 21 01:58:07 2018 -0500 isdn: eicon: fix a missing-check bug In divasmain.c, the function divas_write() firstly invokes the function diva_xdi_open_adapter() to open the adapter that matches with the adapter number provided by the user, and then invokes the function diva_xdi_write() to perform the write operation using the matched adapter. The two functions diva_xdi_open_adapter() and diva_xdi_write() are located in diva.c. In diva_xdi_open_adapter(), the user command is copied to the object 'msg' from the userspace pointer 'src' through the function pointer 'cp_fn', which eventually calls copy_from_user() to do the copy. Then, the adapter number 'msg.adapter' is used to find out a matched adapter from the 'adapter_queue'. A matched adapter will be returned if it is found. Otherwise, NULL is returned to indicate the failure of the verification on the adapter number. As mentioned above, if a matched adapter is returned, the function diva_xdi_write() is invoked to perform the write operation. In this function, the user command is copied once again from the userspace pointer 'src', which is the same as the 'src' pointer in diva_xdi_open_adapter() as both of them are from the 'buf' pointer in divas_write(). Similarly, the copy is achieved through the function pointer 'cp_fn', which finally calls copy_from_user(). After the successful copy, the corresponding command processing handler of the matched adapter is invoked to perform the write operation. It is obvious that there are two copies here from userspace, one is in diva_xdi_open_adapter(), and one is in diva_xdi_write(). Plus, both of these two copies share the same source userspace pointer, i.e., the 'buf' pointer in divas_write(). Given that a malicious userspace process can race to change the content pointed by the 'buf' pointer, this can pose potential security issues. For example, in the first copy, the user provides a valid adapter number to pass the verification process and a valid adapter can be found. Then the user can modify the adapter number to an invalid number. This way, the user can bypass the verification process of the adapter number and inject inconsistent data. This patch reuses the data copied in diva_xdi_open_adapter() and passes it to diva_xdi_write(). This way, the above issues can be avoided. Signed-off-by: Wenwen Wang Signed-off-by: David S. Miller drivers/isdn/hardware/eicon/diva.c | 22 +++++++++++++++------- drivers/isdn/hardware/eicon/diva.h | 5 +++-- drivers/isdn/hardware/eicon/divasmain.c | 18 +++++++++++------- 3 files changed, 29 insertions(+), 16 deletions(-) commit 1f508124e987fac97ac1765e3fbb83da36f47107 Author: Fabio Estevam Date: Sun May 20 13:55:19 2018 -0300 net: fec: Add a SPDX identifier Currently there is no license information in the header of this file. The MODULE_LICENSE field contains ("GPL"), which means GNU Public License v2 or later, so add a corresponding SPDX license identifier. Signed-off-by: Fabio Estevam Acked-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 1 + 1 file changed, 1 insertion(+) commit 9fcca5effcc02088a956f367b3c8d564c4b45450 Author: Fabio Estevam Date: Sun May 20 13:55:18 2018 -0300 net: fec: ptp: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam Acked-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_ptp.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 644fbdeacf1d3edd366e44b8ba214de9d1dd66a9 Author: Xin Long Date: Sun May 20 16:39:10 2018 +0800 sctp: fix the issue that flags are ignored when using kernel_connect Now sctp uses inet_dgram_connect as its proto_ops .connect, and the flags param can't be passed into its proto .connect where this flags is really needed. sctp works around it by getting flags from socket file in __sctp_connect. It works for connecting from userspace, as inherently the user sock has socket file and it passes f_flags as the flags param into the proto_ops .connect. However, the sock created by sock_create_kern doesn't have a socket file, and it passes the flags (like O_NONBLOCK) by using the flags param in kernel_connect, which calls proto_ops .connect later. So to fix it, this patch defines a new proto_ops .connect for sctp, sctp_inet_connect, which calls __sctp_connect() directly with this flags param. After this, the sctp's proto .connect can be removed. Note that sctp_inet_connect doesn't need to do some checks that are not needed for sctp, which makes thing better than with inet_dgram_connect. Suggested-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner Reviewed-by: Michal Kubecek Signed-off-by: David S. Miller include/net/sctp/sctp.h | 2 ++ net/sctp/ipv6.c | 2 +- net/sctp/protocol.c | 2 +- net/sctp/socket.c | 51 +++++++++++++++++++++++++++++++++---------------- 4 files changed, 39 insertions(+), 18 deletions(-) commit cc19846079a70abcfd91b5a0791a5f17d69458a5 Author: Peter Maydell Date: Tue May 22 17:11:20 2018 +0100 arm64: fault: Don't leak data in ESR context for user fault on kernel VA If userspace faults on a kernel address, handing them the raw ESR value on the sigframe as part of the delivered signal can leak data useful to attackers who are using information about the underlying hardware fault type (e.g. translation vs permission) as a mechanism to defeat KASLR. However there are also legitimate uses for the information provided in the ESR -- notably the GCC and LLVM sanitizers use this to report whether wild pointer accesses by the application are reads or writes (since a wild write is a more serious bug than a wild read), so we don't want to drop the ESR information entirely. For faulting addresses in the kernel, sanitize the ESR. We choose to present userspace with the illusion that there is nothing mapped in the kernel's part of the address space at all, by reporting all faults as level 0 translation faults taken to EL1. These fields are safe to pass through to userspace as they depend only on the instruction that userspace used to provoke the fault: EC IL (always) ISV CM WNR (for all data aborts) All the other fields in ESR except DFSC are architecturally RES0 for an L0 translation fault taken to EL1, so can be zeroed out without confusing userspace. The illusion is not entirely perfect, as there is a tiny wrinkle where we will report an alignment fault that was not due to the memory type (for instance a LDREX to an unaligned address) as a translation fault, whereas if you do this on real unmapped memory the alignment fault takes precedence. This is not likely to trip anybody up in practice, as the only users we know of for the ESR information who care about the behaviour for kernel addresses only really want to know about the WnR bit. Signed-off-by: Peter Maydell Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit c62ec4610c40bcc44f2d3d5ed1c312737279e2f3 Author: Rafael J. Wysocki Date: Tue May 22 13:02:17 2018 +0200 PM / core: Fix direct_complete handling for devices with no callbacks Commit 08810a4119aa (PM / core: Add NEVER_SKIP and SMART_PREPARE driver flags) inadvertently prevented the power.direct_complete flag from being set for devices without PM callbacks and with disabled runtime PM which also prevents power.direct_complete from being set for their parents. That led to problems including a resume crash on HP ZBook 14u. Restore the previous behavior by causing power.direct_complete to be set for those devices again, but do that in a more direct way to avoid overlooking that case in the future. Link: https://bugzilla.kernel.org/show_bug.cgi?id=199693 Fixes: 08810a4119aa (PM / core: Add NEVER_SKIP and SMART_PREPARE driver flags) Reported-by: Thomas Martitz Tested-by: Thomas Martitz Cc: 4.15+ # 4.15+ Signed-off-by: Rafael J. Wysocki Reviewed-by: Ulf Hansson Reviewed-by: Johan Hovold drivers/base/power/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 813477aa49aac5deba04eb4956360dde58a0e807 Author: Kalle Valo Date: Fri May 18 19:08:13 2018 +0300 MAINTAINERS: change Kalle as wcn36xx maintainer Eugene hasn't worked on wcn36xx for some time now. Signed-off-by: Kalle Valo MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b561290995b2704cfc92bea6996818a3be36c592 Author: Kalle Valo Date: Fri May 18 19:08:12 2018 +0300 MAINTAINERS: change Kalle as ath.ko maintainer Luis hasn't worked on ath.ko for some time now. Acked-by: Luis R. Rodriguez Signed-off-by: Kalle Valo MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c76700ab337a022cbd620d6e36ac6bd1342331dd Author: Kalle Valo Date: Fri May 18 19:08:11 2018 +0300 MAINTAINERS: update Kalle's email address I switched to use my codeaurora.org address. Signed-off-by: Kalle Valo MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f3c6a2cfa5d74fb527b95d842e0a949e95845cea Author: George Cherian Date: Wed May 16 00:00:19 2018 -0700 i2c: xlp9xx: Add MAINTAINERS entry The i2c XLP9xx driver is maintained by Cavium. Add George Cherian and Jan Glauber as the Maintainers. Signed-off-by: George Cherian Acked-by: Jan Glauber Signed-off-by: Wolfram Sang MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit fed4825096cfbbfd654cb292ab6eb193911aef01 Author: Andrew Zaborowski Date: Tue May 22 02:43:56 2018 +0200 mac80211_hwsim: Fix radio dump for radio idx 0 Since 6335698e24ec11e1324b916177da6721df724dd8 the radio with idx of 0 will not get dumped in HWSIM_CMD_GET_RADIO because of the last_idx checks. Offset cb->args[0] by 1 similarly to what is done in nl80211.c. Fixes: 6335698e24ec ("mac80211_hwsim: add generation count for netlink dump operation") Signed-off-by: Andrew Zaborowski Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5247a77ced2d3396a32679c7480e8bcd5b26e471 Author: Haim Dreyfuss Date: Mon May 21 23:34:57 2018 +0300 cfg80211: fix NULL pointer derference when querying regdb Some drivers may call this function when regdb is not initialized yet, so we need to make sure regdb is valid before trying to access it. Make sure regdb is initialized before trying to access it in reg_query_regdb_wmm() and query_regdb(). Reported-by: Eric Biggers Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/wireless/reg.c | 3 +++ 1 file changed, 3 insertions(+) commit a048a07d7f4535baa4cbad6bc024f175317ab938 Author: Nicholas Piggin Date: Tue May 22 09:00:00 2018 +1000 powerpc/64s: Add support for a store forwarding barrier at kernel entry/exit On some CPUs we can prevent a vulnerability related to store-to-load forwarding by preventing store forwarding between privilege domains, by inserting a barrier in kernel entry and exit paths. This is known to be the case on at least Power7, Power8 and Power9 powerpc CPUs. Barriers must be inserted generally before the first load after moving to a higher privilege, and after the last store before moving to a lower privilege, HV and PR privilege transitions must be protected. Barriers are added as patch sections, with all kernel/hypervisor entry points patched, and the exit points to lower privilge levels patched similarly to the RFI flush patching. Firmware advertisement is not implemented yet, so CPU flush types are hard coded. Thanks to Michal Suchánek for bug fixes and review. Signed-off-by: Nicholas Piggin Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Michael Neuling Signed-off-by: Michal Suchánek Signed-off-by: Michael Ellerman Signed-off-by: Linus Torvalds arch/powerpc/include/asm/exception-64s.h | 29 ++++++ arch/powerpc/include/asm/feature-fixups.h | 19 ++++ arch/powerpc/include/asm/security_features.h | 11 ++ arch/powerpc/kernel/exceptions-64s.S | 19 +++- arch/powerpc/kernel/security.c | 149 +++++++++++++++++++++++++++ arch/powerpc/kernel/vmlinux.lds.S | 14 +++ arch/powerpc/lib/feature-fixups.c | 115 +++++++++++++++++++++ arch/powerpc/platforms/powernv/setup.c | 1 + arch/powerpc/platforms/pseries/setup.c | 1 + 9 files changed, 356 insertions(+), 2 deletions(-) commit 35904d6e9683e8d0ea742d6889d93bea2e79888a Merge: 771c577 643ca19 Author: Dave Airlie Date: Tue May 22 10:54:50 2018 +1000 Merge branch 'drm/du/fixes' of git://linuxtv.org/pinchartl/media into drm-fixes Single regression fix for rcar-du lvds * 'drm/du/fixes' of git://linuxtv.org/pinchartl/media: drm: rcar-du: lvds: Fix crash in .atomic_check when disabling connector commit c85061e6e0ee07e131b929e6a17bb2e20d19b321 Merge: 5997aab a45b599 Author: Linus Torvalds Date: Mon May 21 17:39:32 2018 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two driver fixes (zfcp and target core), one information leak in sg and one build clean up" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sg: allocate with __GFP_ZERO in sg_build_indirect() scsi: core: clean up generated file scsi_devinfo_tbl.c scsi: target: tcmu: fix error resetting qfull_time_out to default scsi: zfcp: fix infinite iteration on ERP ready list commit 5997aab0a11ea27ee8e520ecc551ed18fd3e8296 Merge: 3b78ce4 baf1056 Author: Linus Torvalds Date: Mon May 21 11:54:57 2018 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "Assorted fixes all over the place" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: aio: fix io_destroy(2) vs. lookup_ioctx() race ext2: fix a block leak nfsd: vfs_mkdir() might succeed leaving dentry negative unhashed cachefiles: vfs_mkdir() might succeed leaving dentry negative unhashed unfuck sysfs_mount() kernfs: deal with kernfs_fill_super() failures cramfs: Fix IS_ENABLED typo befs_lookup(): use d_splice_alias() affs_lookup: switch to d_splice_alias() affs_lookup(): close a race with affs_remove_link() fix breakage caused by d_find_alias() semantics change fs: don't scan the inode cache before SB_BORN is set do d_instantiate/unlock_new_inode combinations safely iov_iter: fix memory leak in pipe_get_pages_alloc() iov_iter: fix return type of __pipe_get_pages() commit eedffa28c9b00ca2dcb4d541b5a530f4c917052d Author: Jeff Layton Date: Mon May 21 14:35:03 2018 -0400 loop: clear wb_err in bd_inode when detaching backing file When a loop block device encounters a writeback error, that error will get propagated to the bd_inode's wb_err field. If we then detach the backing file from it, attach another and fsync it, we'll get back the writeback error that we had from the previous backing file. This is a bit of a grey area as POSIX doesn't cover loop devices, but it is somewhat counterintuitive. If we detach a backing file from the loopdev while there are still unreported errors, take it as a sign that we're no longer interested in the previous file, and clear out the wb_err in the loop blockdev. Reported-and-Tested-by: Theodore Y. Ts'o Signed-off-by: Jeff Layton Signed-off-by: Jens Axboe drivers/block/loop.c | 1 + 1 file changed, 1 insertion(+) commit baf10564fbb66ea222cae66fbff11c444590ffd9 Author: Al Viro Date: Sun May 20 16:46:23 2018 -0400 aio: fix io_destroy(2) vs. lookup_ioctx() race kill_ioctx() used to have an explicit RCU delay between removing the reference from ->ioctx_table and percpu_ref_kill() dropping the refcount. At some point that delay had been removed, on the theory that percpu_ref_kill() itself contained an RCU delay. Unfortunately, that was the wrong kind of RCU delay and it didn't care about rcu_read_lock() used by lookup_ioctx(). As the result, we could get ctx freed right under lookup_ioctx(). Tejun has fixed that in a6d7cff472e ("fs/aio: Add explicit RCU grace period when freeing kioctx"); however, that fix is not enough. Suppose io_destroy() from one thread races with e.g. io_setup() from another; CPU1 removes the reference from current->mm->ioctx_table[...] just as CPU2 has picked it (under rcu_read_lock()). Then CPU1 proceeds to drop the refcount, getting it to 0 and triggering a call of free_ioctx_users(), which proceeds to drop the secondary refcount and once that reaches zero calls free_ioctx_reqs(). That does INIT_RCU_WORK(&ctx->free_rwork, free_ioctx); queue_rcu_work(system_wq, &ctx->free_rwork); and schedules freeing the whole thing after RCU delay. In the meanwhile CPU2 has gotten around to percpu_ref_get(), bumping the refcount from 0 to 1 and returned the reference to io_setup(). Tejun's fix (that queue_rcu_work() in there) guarantees that ctx won't get freed until after percpu_ref_get(). Sure, we'd increment the counter before ctx can be freed. Now we are out of rcu_read_lock() and there's nothing to stop freeing of the whole thing. Unfortunately, CPU2 assumes that since it has grabbed the reference, ctx is *NOT* going away until it gets around to dropping that reference. The fix is obvious - use percpu_ref_tryget_live() and treat failure as miss. It's not costlier than what we currently do in normal case, it's safe to call since freeing *is* delayed and it closes the race window - either lookup_ioctx() comes before percpu_ref_kill() (in which case ctx->users won't reach 0 until the caller of lookup_ioctx() drops it) or lookup_ioctx() fails, ctx->users is unaffected and caller of lookup_ioctx() doesn't see the object in question at all. Cc: stable@kernel.org Fixes: a6d7cff472e "fs/aio: Add explicit RCU grace period when freeing kioctx" Signed-off-by: Al Viro fs/aio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5aa1437d2d9a068c0334bd7c9dafa8ec4f97f13b Author: Al Viro Date: Thu May 17 17:18:30 2018 -0400 ext2: fix a block leak open file, unlink it, then use ioctl(2) to make it immutable or append only. Now close it and watch the blocks *not* freed... Immutable/append-only checks belong in ->setattr(). Note: the bug is old and backport to anything prior to 737f2e93b972 ("ext2: convert to use the new truncate convention") will need these checks lifted into ext2_setattr(). Cc: stable@kernel.org Signed-off-by: Al Viro fs/ext2/inode.c | 10 ---------- 1 file changed, 10 deletions(-) commit 3819bb0d79f50b05910db5bdc6d9ef512184e3b1 Author: Al Viro Date: Fri May 11 17:03:19 2018 -0400 nfsd: vfs_mkdir() might succeed leaving dentry negative unhashed That can (and does, on some filesystems) happen - ->mkdir() (and thus vfs_mkdir()) can legitimately leave its argument negative and just unhash it, counting upon the lookup to pick the object we'd created next time we try to look at that name. Some vfs_mkdir() callers forget about that possibility... Acked-by: J. Bruce Fields Signed-off-by: Al Viro fs/nfsd/vfs.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 9c3e9025a3f7ed25c99a0add8af65431c8043800 Author: Al Viro Date: Thu May 10 22:59:45 2018 -0400 cachefiles: vfs_mkdir() might succeed leaving dentry negative unhashed That can (and does, on some filesystems) happen - ->mkdir() (and thus vfs_mkdir()) can legitimately leave its argument negative and just unhash it, counting upon the lookup to pick the object we'd created next time we try to look at that name. Some vfs_mkdir() callers forget about that possibility... Signed-off-by: Al Viro fs/cachefiles/namei.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7b745a4e4051e1bbce40e0b1c2cf636c70583aa4 Author: Al Viro Date: Mon May 14 00:03:34 2018 -0400 unfuck sysfs_mount() new_sb is left uninitialized in case of early failures in kernfs_mount_ns(), and while IS_ERR(root) is true in all such cases, using IS_ERR(root) || !new_sb is not a solution - IS_ERR(root) is true in some cases when new_sb is true. Make sure new_sb is initialized (and matches the reality) in all cases and fix the condition for dropping kobj reference - we want it done precisely in those situations where the reference has not been transferred into a new super_block instance. Signed-off-by: Al Viro fs/sysfs/mount.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 82382acec0c97b91830fff7130d0acce4ac4f3f3 Author: Al Viro Date: Tue Apr 3 00:22:29 2018 -0400 kernfs: deal with kernfs_fill_super() failures make sure that info->node is initialized early, so that kernfs_kill_sb() can list_del() it safely. Signed-off-by: Al Viro fs/kernfs/mount.c | 1 + 1 file changed, 1 insertion(+) commit 08a8f3086880325433d66b2dc9cdfb3f095adddf Author: Joe Perches Date: Sun May 13 15:05:47 2018 -0700 cramfs: Fix IS_ENABLED typo There's an extra C here... Fixes: 99c18ce580c6 ("cramfs: direct memory access support") Acked-by: Nicolas Pitre Signed-off-by: Joe Perches Signed-off-by: Al Viro fs/cramfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4e4d434fe3f5eceea470bf821683677dabe39c4 Author: Al Viro Date: Mon Apr 30 19:02:02 2018 -0400 befs_lookup(): use d_splice_alias() RTFS(Documentation/filesystems/nfs/Exporting) if you try to make something exportable. Fixes: ac632f5b6301 "befs: add NFS export support" Signed-off-by: Al Viro fs/befs/linuxvfs.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 87fbd639c02ec96d67738e40b6521fb070ed7168 Author: Al Viro Date: Sun May 6 12:20:40 2018 -0400 affs_lookup: switch to d_splice_alias() Making something exportable takes more than providing ->s_export_ops. In particular, ->lookup() *MUST* use d_splice_alias() instead of d_add(). Reading Documentation/filesystems/nfs/Exporting would've been a good idea; as it is, exporting AFFS is badly (and exploitably) broken. Partially-Fixes: ed4433d72394 "fs/affs: make affs exportable" Acked-by: David Sterba Signed-off-by: Al Viro fs/affs/namei.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 30da870ce4a4e007c901858a96e9e394a1daa74a Author: Al Viro Date: Sun May 6 12:15:20 2018 -0400 affs_lookup(): close a race with affs_remove_link() we unlock the directory hash too early - if we are looking at secondary link and primary (in another directory) gets removed just as we unlock, we could have the old primary moved in place of the secondary, leaving us to look into freed entry (and leaving our dentry with ->d_fsdata pointing to a freed entry). Cc: stable@vger.kernel.org # 2.4.4+ Acked-by: David Sterba Signed-off-by: Al Viro fs/affs/namei.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 3b78ce4a34b761c7fe13520de822984019ff1a8f Merge: 6741c4b af86ca4 Author: Linus Torvalds Date: Mon May 21 11:23:26 2018 -0700 Merge branch 'speck-v20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Merge speculative store buffer bypass fixes from Thomas Gleixner: - rework of the SPEC_CTRL MSR management to accomodate the new fancy SSBD (Speculative Store Bypass Disable) bit handling. - the CPU bug and sysfs infrastructure for the exciting new Speculative Store Bypass 'feature'. - support for disabling SSB via LS_CFG MSR on AMD CPUs including Hyperthread synchronization on ZEN. - PRCTL support for dynamic runtime control of SSB - SECCOMP integration to automatically disable SSB for sandboxed processes with a filter flag for opt-out. - KVM integration to allow guests fiddling with SSBD including the new software MSR VIRT_SPEC_CTRL to handle the LS_CFG based oddities on AMD. - BPF protection against SSB .. this is just the core and x86 side, other architecture support will come separately. * 'speck-v20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (49 commits) bpf: Prevent memory disambiguation attack x86/bugs: Rename SSBD_NO to SSB_NO KVM: SVM: Implement VIRT_SPEC_CTRL support for SSBD x86/speculation, KVM: Implement support for VIRT_SPEC_CTRL/LS_CFG x86/bugs: Rework spec_ctrl base and mask logic x86/bugs: Remove x86_spec_ctrl_set() x86/bugs: Expose x86_spec_ctrl_base directly x86/bugs: Unify x86_spec_ctrl_{set_guest,restore_host} x86/speculation: Rework speculative_store_bypass_update() x86/speculation: Add virtualized speculative store bypass disable support x86/bugs, KVM: Extend speculation control for VIRT_SPEC_CTRL x86/speculation: Handle HT correctly on AMD x86/cpufeatures: Add FEATURE_ZEN x86/cpufeatures: Disentangle SSBD enumeration x86/cpufeatures: Disentangle MSR_SPEC_CTRL enumeration from IBRS x86/speculation: Use synthetic bits for IBRS/IBPB/STIBP KVM: SVM: Move spec control call after restore of GS x86/cpu: Make alternative_msr_write work for 32-bit code x86/bugs: Fix the parameters alignment and missing void x86/bugs: Make cpu_show_common() static ... commit f7068114d45ec55996b9040e98111afa56e010fe Author: Jens Axboe Date: Mon May 21 12:21:14 2018 -0600 sr: pass down correctly sized SCSI sense buffer We're casting the CDROM layer request_sense to the SCSI sense buffer, but the former is 64 bytes and the latter is 96 bytes. As we generally allocate these on the stack, we end up blowing up the stack. Fix this by wrapping the scsi_execute() call with a properly sized sense buffer, and copying back the bits for the CDROM layer. Cc: stable@vger.kernel.org Reported-by: Piotr Gabriel Kosinski Reported-by: Daniel Shapira Tested-by: Kees Cook Fixes: 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Jens Axboe drivers/scsi/sr_ioctl.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 255845fc43a3aaf806852a1d3bc89bff1411ebe3 Author: Jason A. Donenfeld Date: Sat Apr 28 00:42:52 2018 +0200 arm64: export tishift functions to modules Otherwise modules that use these arithmetic operations will fail to link. We accomplish this with the usual EXPORT_SYMBOL, which on most architectures goes in the .S file but the ARM64 maintainers prefer that insead it goes into arm64ksyms. While we're at it, we also fix this up to use SPDX, and I personally choose to relicense this as GPL2||BSD so that these symbols don't need to be export_symbol_gpl, so all modules can use the routines, since these are important general purpose compiler-generated function calls. Signed-off-by: Jason A. Donenfeld Reported-by: PaX Team Cc: stable@vger.kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/arm64ksyms.c | 8 ++++++++ arch/arm64/lib/tishift.S | 15 ++------------- 2 files changed, 10 insertions(+), 13 deletions(-) commit 32c3fa7cdf0c4a3eb8405fc3e13398de019e828b Author: Will Deacon Date: Mon May 21 17:44:57 2018 +0100 arm64: lse: Add early clobbers to some input/output asm operands For LSE atomics that read and write a register operand, we need to ensure that these operands are annotated as "early clobber" if the register is written before all of the input operands have been consumed. Failure to do so can result in the compiler allocating the same register to both operands, leading to splats such as: Unable to handle kernel paging request at virtual address 11111122222221 [...] x1 : 1111111122222222 x0 : 1111111122222221 Process swapper/0 (pid: 1, stack limit = 0x000000008209f908) Call trace: test_atomic64+0x1360/0x155c where x0 has been allocated as both the value to be stored and also the atomic_t pointer. This patch adds the missing clobbers. Cc: Cc: Dave Martin Cc: Robin Murphy Reported-by: Mark Salter Signed-off-by: Will Deacon arch/arm64/include/asm/atomic_lse.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 6741c4bb389da103c0d79ad1961884628900bfe6 Merge: 5aef268 9a3a92c Author: Linus Torvalds Date: Mon May 21 08:58:00 2018 -0700 Merge tag 'mips_fixes_4.17_2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips Pull MIPS fixes from James Hogan: - fix build with DEBUG_ZBOOT and MACH_JZ4770 (4.16) - include xilfpga FDT in fitImage and stop generating dtb.o (4.15) - fix software IO coherence on CM SMP systems (4.8) - ptrace: Fix PEEKUSR/POKEUSR to o32 FGRs (3.14) - ptrace: Expose FIR register through FP regset (3.13) - fix typo in KVM debugfs file name (3.10) * tag 'mips_fixes_4.17_2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips: MIPS: Fix ptrace(2) PTRACE_PEEKUSR and PTRACE_POKEUSR accesses to o32 FGRs MIPS: xilfpga: Actually include FDT in fitImage MIPS: xilfpga: Stop generating useless dtb.o KVM: Fix spelling mistake: "cop_unsuable" -> "cop_unusable" MIPS: ptrace: Expose FIR register through FP regset MIPS: Fix build with DEBUG_ZBOOT and MACH_JZ4770 MIPS: c-r4k: Fix data corruption related to cache coherence commit 5aef268ace7436d8a25d41ee3837ecadb0115917 Merge: 771c577 b80d0b9 Author: Linus Torvalds Date: Mon May 21 08:37:48 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix refcounting bug for connections in on-packet scheduling mode of IPVS, from Julian Anastasov. 2) Set network header properly in AF_PACKET's packet_snd, from Willem de Bruijn. 3) Fix regressions in 3c59x by converting to generic DMA API. It was relying upon the hack that the PCI DMA interfaces would accept NULL for EISA devices. From Christoph Hellwig. 4) Remove RDMA devices before unregistering netdev in QEDE driver, from Michal Kalderon. 5) Use after free in TUN driver ptr_ring usage, from Jason Wang. 6) Properly check for missing netlink attributes in SMC_PNETID requests, from Eric Biggers. 7) Set DMA mask before performaing any DMA operations in vmxnet3 driver, from Regis Duchesne. 8) Fix mlx5 build with SMP=n, from Saeed Mahameed. 9) Classifier fixes in bcm_sf2 driver from Florian Fainelli. 10) Tuntap use after free during release, from Jason Wang. 11) Don't use stack memory in scatterlists in tls code, from Matt Mullins. 12) Not fully initialized flow key object in ipv4 routing code, from David Ahern. 13) Various packet headroom bug fixes in ip6_gre driver, from Petr Machata. 14) Remove queues from XPS maps using correct index, from Amritha Nambiar. 15) Fix use after free in sock_diag, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (64 commits) net: ip6_gre: fix tunnel metadata device sharing. cxgb4: fix offset in collecting TX rate limit info net: sched: red: avoid hashing NULL child sock_diag: fix use-after-free read in __sk_free sh_eth: Change platform check to CONFIG_ARCH_RENESAS net: dsa: Do not register devlink for unused ports net: Fix a bug in removing queues from XPS map bpf: fix truncated jump targets on heavy expansions bpf: parse and verdict prog attach may race with bpf map update bpf: sockmap update rollback on error can incorrectly dec prog refcnt net: test tailroom before appending to linear skb net: ip6_gre: Fix ip6erspan hlen calculation net: ip6_gre: Split up ip6gre_changelink() net: ip6_gre: Split up ip6gre_newlink() net: ip6_gre: Split up ip6gre_tnl_change() net: ip6_gre: Split up ip6gre_tnl_link_config() net: ip6_gre: Fix headroom request in ip6erspan_tunnel_xmit() net: ip6_gre: Request headroom in __gre6_xmit() selftests/bpf: check return value of fopen in test_verifier.c erspan: fix invalid erspan version. ... commit 136d769e0b3475d71350aa3648a116a6ee7a8f6c Author: Sudip Mukherjee Date: Sat May 19 22:29:36 2018 +0100 libata: blacklist Micron 500IT SSD with MU01 firmware While whitelisting Micron M500DC drives, the tweaked blacklist entry enabled queued TRIM from M500IT variants also. But these do not support queued TRIM. And while using those SSDs with the latest kernel we have seen errors and even the partition table getting corrupted. Some part from the dmesg: [ 6.727384] ata1.00: ATA-9: Micron_M500IT_MTFDDAK060MBD, MU01, max UDMA/133 [ 6.727390] ata1.00: 117231408 sectors, multi 16: LBA48 NCQ (depth 31/32), AA [ 6.741026] ata1.00: supports DRM functions and may not be fully accessible [ 6.759887] ata1.00: configured for UDMA/133 [ 6.762256] scsi 0:0:0:0: Direct-Access ATA Micron_M500IT_MT MU01 PQ: 0 ANSI: 5 and then for the error: [ 120.860334] ata1.00: exception Emask 0x1 SAct 0x7ffc0007 SErr 0x0 action 0x6 frozen [ 120.860338] ata1.00: irq_stat 0x40000008 [ 120.860342] ata1.00: failed command: SEND FPDMA QUEUED [ 120.860351] ata1.00: cmd 64/01:00:00:00:00/00:00:00:00:00/a0 tag 0 ncq dma 512 out res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x5 (timeout) [ 120.860353] ata1.00: status: { DRDY } [ 120.860543] ata1: hard resetting link [ 121.166128] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 121.166376] ata1.00: supports DRM functions and may not be fully accessible [ 121.186238] ata1.00: supports DRM functions and may not be fully accessible [ 121.204445] ata1.00: configured for UDMA/133 [ 121.204454] ata1.00: device reported invalid CHS sector 0 [ 121.204541] sd 0:0:0:0: [sda] tag#18 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08 [ 121.204546] sd 0:0:0:0: [sda] tag#18 Sense Key : 0x5 [current] [ 121.204550] sd 0:0:0:0: [sda] tag#18 ASC=0x21 ASCQ=0x4 [ 121.204555] sd 0:0:0:0: [sda] tag#18 CDB: opcode=0x93 93 08 00 00 00 00 00 04 28 80 00 00 00 30 00 00 [ 121.204559] print_req_error: I/O error, dev sda, sector 272512 After few reboots with these errors, and the SSD is corrupted. After blacklisting it, the errors are not seen and the SSD does not get corrupted any more. Fixes: 243918be6393 ("libata: Do not blacklist Micron M500DC") Cc: Martin K. Petersen Cc: stable@vger.kernel.org Signed-off-by: Sudip Mukherjee Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 2 ++ 1 file changed, 2 insertions(+) commit 3de06d5a1f05c11c94cbb68af14dbfa7fb81d78b Author: Corneliu Doban Date: Fri May 18 15:03:57 2018 -0700 mmc: sdhci-iproc: add SDHCI_QUIRK2_HOST_OFF_CARD_ON for cygnus The SDHCI_QUIRK2_HOST_OFF_CARD_ON is needed for the driver to properly reset the host controller (reset all) on initialization after exiting deep sleep. Signed-off-by: Corneliu Doban Signed-off-by: Scott Branden Reviewed-by: Ray Jui Reviewed-by: Srinath Mannam Fixes: c833e92bbb60 ("mmc: sdhci-iproc: support standard byte register accesses") Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-iproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f651b870485ee60f5abbbd85195a6852978894a Author: Corneliu Doban Date: Fri May 18 15:03:56 2018 -0700 mmc: sdhci-iproc: fix 32bit writes for TRANSFER_MODE register When the host controller accepts only 32bit writes, the value of the 16bit TRANSFER_MODE register, that has the same 32bit address as the 16bit COMMAND register, needs to be saved and it will be written in a 32bit write together with the command as this will trigger the host to send the command on the SD interface. When sending the tuning command, TRANSFER_MODE is written and then sdhci_set_transfer_mode reads it back to clear AUTO_CMD12 bit and write it again resulting in wrong value to be written because the initial write value was saved in a shadow and the read-back returned a wrong value, from the register. Fix sdhci_iproc_readw to return the saved value of TRANSFER_MODE when a saved value exist. Same fix for read of BLOCK_SIZE and BLOCK_COUNT registers, that are saved for a different reason, although a scenario that will cause the mentioned problem on this registers is not probable. Fixes: b580c52d58d9 ("mmc: sdhci-iproc: add IPROC SDHCI driver") Signed-off-by: Corneliu Doban Signed-off-by: Scott Branden Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-iproc.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) commit 4c94238f37af87a2165c3fb491b4a8b50e90649c Author: Srinath Mannam Date: Fri May 18 15:03:55 2018 -0700 mmc: sdhci-iproc: remove hard coded mmc cap 1.8v Remove hard coded mmc cap 1.8v from platform data as it is board specific. The 1.8v DDR mmc caps can be enabled using DTS property for those boards that support it. Fixes: b17b4ab8ce38 ("mmc: sdhci-iproc: define MMC caps in platform data") Signed-off-by: Srinath Mannam Signed-off-by: Scott Branden Reviewed-by: Ray Jui Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-iproc.c | 1 - 1 file changed, 1 deletion(-) commit b25b750df99bcba29317d3f9d9f93c4ec58890e6 Author: Mathieu Malaterre Date: Wed May 16 21:20:20 2018 +0200 mmc: block: propagate correct returned value in mmc_rpmb_ioctl In commit 97548575bef3 ("mmc: block: Convert RPMB to a character device") a new function `mmc_rpmb_ioctl` was added. The final return is simply returning a value of `0` instead of propagating the correct return code. Discovered during a compilation with W=1, silence the following gcc warning drivers/mmc/core/block.c:2470:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Signed-off-by: Mathieu Malaterre Reviewed-by: Shawn Lin Fixes: 97548575bef3 ("mmc: block: Convert RPMB to a character device") Cc: stable@vger.kernel.org # v4.15+ Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 771c577c23bac90597c685971d7297ea00f99d11 Author: Linus Torvalds Date: Sun May 20 15:31:38 2018 -0700 Linux 4.17-rc6 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fd5a36a46c0caf288f3acd90d608ffefa17f234 Merge: e5e03ad 8a92281 Author: Linus Torvalds Date: Sun May 20 12:44:07 2018 -0700 Merge branch 'parisc-4.17-5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixlets from Helge Deller: "Three small section mismatch fixes, one of them was found by 0-day test infrastructure" * 'parisc-4.17-5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Move ccio_cujo20_fixup() into init section parisc: Move setup_profiling_timer() out of init section parisc: Move find_pa_parent_type() out of init section commit e5e03ad9e0f04cb3f478b914a3bf9c8f77ee9e94 Merge: 132ce5d 02ee654 Author: Linus Torvalds Date: Sun May 20 12:04:27 2018 -0700 Merge tag 'for-4.17-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "We've accumulated some fixes during the last week, some of them were in the works for a longer time but there are some newer ones too. Most of the fixes have a reproducer and fix user visible problems, also candidates for stable kernels. They IMHO qualify for a late rc, though I did not expect that many" * tag 'for-4.17-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix crash when trying to resume balance without the resume flag btrfs: Fix delalloc inodes invalidation during transaction abort btrfs: Split btrfs_del_delalloc_inode into 2 functions btrfs: fix reading stale metadata blocks after degraded raid1 mounts btrfs: property: Set incompat flag if lzo/zstd compression is set Btrfs: fix duplicate extents after fsync of file with prealloc extents Btrfs: fix xattr loss after power failure Btrfs: send, fix invalid access to commit roots due to concurrent snapshotting commit 132ce5d43adfd9b5da27ad17cc28a01cd2310f0a Merge: 8a6bd2f 92d44a4 Author: Linus Torvalds Date: Sun May 20 11:50:27 2018 -0700 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: - Łukasz Stelmach spotted a couple of issues with the decompressor. - a couple of kdump fixes found while testing kdump - replace some perl with shell code - resolve SIGFPE breakage - kprobes fixes * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: fix kill( ,SIGFPE) breakage ARM: 8772/1: kprobes: Prohibit kprobes on get_user functions ARM: 8771/1: kprobes: Prohibit kprobes on do_undefinstr ARM: 8770/1: kprobes: Prohibit probing on optimized_callback ARM: 8769/1: kprobes: Fix to use get_kprobe_ctlblk after irq-disabed ARM: replace unnecessary perl with sed and the shell $(( )) operator ARM: kexec: record parent context registers for non-crash CPUs ARM: kexec: fix kdump register saving on panic() ARM: 8758/1: decompressor: restore r1 and r2 just before jumping to the kernel ARM: 8753/1: decompressor: add a missing parameter to the addruart macro commit 8a6bd2f40e96fb4d96749ab029c61f0df218b003 Merge: b9aad92 acf4602 Author: Linus Torvalds Date: Sun May 20 11:28:32 2018 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "An unfortunately larger set of fixes, but a large portion is selftests: - Fix the missing clusterid initializaiton for x2apic cluster management which caused boot failures due to IPIs being sent to the wrong cluster - Drop TX_COMPAT when a 64bit executable is exec()'ed from a compat task - Wrap access to __supported_pte_mask in __startup_64() where clang compile fails due to a non PC relative access being generated. - Two fixes for 5 level paging fallout in the decompressor: - Handle GOT correctly for paging_prepare() and cleanup_trampoline() - Fix the page table handling in cleanup_trampoline() to avoid page table corruption. - Stop special casing protection key 0 as this is inconsistent with the manpage and also inconsistent with the allocation map handling. - Override the protection key wen moving away from PROT_EXEC to prevent inaccessible memory. - Fix and update the protection key selftests to address breakage and to cover the above issue - Add a MOV SS self test" [ Part of the x86 fixes were in the earlier core pull due to dependencies ] * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits) x86/mm: Drop TS_COMPAT on 64-bit exec() syscall x86/apic/x2apic: Initialize cluster ID properly x86/boot/compressed/64: Fix moving page table out of trampoline memory x86/boot/compressed/64: Set up GOT for paging_prepare() and cleanup_trampoline() x86/pkeys: Do not special case protection key 0 x86/pkeys/selftests: Add a test for pkey 0 x86/pkeys/selftests: Save off 'prot' for allocations x86/pkeys/selftests: Fix pointer math x86/pkeys: Override pkey when moving away from PROT_EXEC x86/pkeys/selftests: Fix pkey exhaustion test off-by-one x86/pkeys/selftests: Add PROT_EXEC test x86/pkeys/selftests: Factor out "instruction page" x86/pkeys/selftests: Allow faults on unknown keys x86/pkeys/selftests: Avoid printf-in-signal deadlocks x86/pkeys/selftests: Remove dead debugging code, fix dprint_in_signal x86/pkeys/selftests: Stop using assert() x86/pkeys/selftests: Give better unexpected fault error messages x86/selftests: Add mov_to_ss test x86/mpx/selftests: Adjust the self-test to fresh distros that export the MPX ABI x86/pkeys/selftests: Adjust the self-test to fresh distros that export the pkeys ABI ... commit b9aad92236391f681083fa4045083d5b846b59e0 Merge: 441cab9 5596fe3 Author: Linus Torvalds Date: Sun May 20 11:25:54 2018 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull UP timer fix from Thomas Gleixner: "Work around the for_each_cpu() oddity on UP kernels in the tick broadcast code which causes boot failures because the CPU0 bit is always reported as set independent of the cpumask content" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tick/broadcast: Use for_each_cpu() specially on UP kernels commit 441cab960d991897ec0e739dffee018bb2479c45 Merge: 74cce52 cd33d88 Author: Linus Torvalds Date: Sun May 20 11:23:34 2018 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixlets from Thomas Gleixner: "Three trivial fixlets for the scheduler: - move print_rt_rq() and print_dl_rq() declarations to the right place - make grub_reclaim() static - fix the bogus documentation reference in Kconfig" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix documentation file path sched/deadline: Make the grub_reclaim() function static sched/debug: Move the print_rt_rq() and print_dl_rq() declarations to kernel/sched/sched.h commit 74cce52f9f92b64febd7c84ed68f5a5607c779b6 Merge: 95bcce4 78ce241 Author: Linus Torvalds Date: Sun May 20 11:20:40 2018 -0700 Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS fix from Thomas Gleixner: "Fix a regression in the new AMD SMCA code which issues an SMP function call from the early interrupt disabled region of CPU hotplug. To avoid that, use cached block addresses which can be used directly" * 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/MCE/AMD: Cache SMCA MISC block addresses commit 95bcce4d42400d136060daadc56e1564200c3713 Merge: 4b65f45 f3903c9 Author: Linus Torvalds Date: Sun May 20 11:18:42 2018 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tooling fixes from Thomas Gleixner: - fix segfault when processing unknown threads in cs-etm - fix "perf test inet_pton" on s390 failing due to missing inline - display all available events on 'perf annotate --stdio' - add missing newline when parsing an empty BPF program * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf tools: Add missing newline when parsing empty BPF proggie perf cs-etm: Remove redundant space perf cs-etm: Support unknown_thread in cs_etm_auxtrace perf annotate: Display all available events on --stdio perf test: "probe libc's inet_pton" fails on s390 due to missing inline commit 4b65f455c787eeca1a6eb8cc8f590ade6cecb179 Merge: 056ad12 5a81764 Author: Linus Torvalds Date: Sun May 20 10:43:27 2018 -0700 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Thomas Gleixner: "Two fixes to address shortcomings of the rwsem/percpu-rwsem lock debugging code which emits false positive warnings when the rwsem is anonymously locked and unlocked" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/percpu-rwsem: Annotate rwsem ownership transfer by setting RWSEM_OWNER_UNKNOWN locking/rwsem: Add a new RWSEM_ANONYMOUSLY_OWNED flag commit 056ad121c26db1cfc8253222e2297fb7b7577fe8 Merge: 583dbad 4f74d72 Author: Linus Torvalds Date: Sun May 20 10:36:52 2018 -0700 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Thomas Gleixner: - Use explicitely sized type for the romimage pointer in the 32bit EFI protocol struct so a 64bit kernel does not expand it to 64bit. Ditto for the 64bit struct to avoid the reverse issue on 32bit kernels. - Handle randomized tex offset correctly in the ARM64 EFI stub to avoid unaligned data resulting in stack corruption and other hard to diagnose wreckage. * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/libstub/arm64: Handle randomized TEXT_OFFSET efi: Avoid potential crashes, fix the 'struct efi_pci_io_protocol_32' definition for mixed mode commit 583dbad34098fd2891dcc850744e7c80063dd8a4 Merge: 203ec2f 7dec80c Author: Linus Torvalds Date: Sun May 20 10:01:38 2018 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core fixes from Thomas Gleixner: - Unbreak the BPF compilation which got broken by the unconditional requirement of asm-goto, which is not supported by clang. - Prevent probing on exception masking instructions in uprobes and kprobes to avoid the issues of the delayed exceptions instead of having an ugly workaround. - Prevent a double free_page() in the error path of do_kexec_load() - A set of objtool updates addressing various issues mostly related to switch tables and the noreturn detection for recursive sibling calls - Header sync for tools. * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Detect RIP-relative switch table references, part 2 objtool: Detect RIP-relative switch table references objtool: Support GCC 8 switch tables objtool: Support GCC 8's cold subfunctions objtool: Fix "noreturn" detection for recursive sibling calls objtool, kprobes/x86: Sync the latest header with tools/objtool/arch/x86/include/asm/insn.h x86/cpufeature: Guard asm_volatile_goto usage for BPF compilation uprobes/x86: Prohibit probing on MOV SS instruction kprobes/x86: Prohibit probing on exception masking instructions x86/kexec: Avoid double free_page() upon do_kexec_load() failure commit 643ca198aacc671f32ef7c0c2783f0b539070a36 Author: Laurent Pinchart Date: Fri Apr 27 22:40:21 2018 +0300 drm: rcar-du: lvds: Fix crash in .atomic_check when disabling connector The connector .atomic_check() handler can be called with a NULL crtc pointer in the connector state when the connector gets disabled explicitly (through performing a legacy mode set or setting the connector's CRTC_ID property to 0). This causes a crash as the crtc pointer is dereferenced without any check. Fix it by returning from the .atomic_check() handler when then crtc pointer is NULL, as there is no check to be performed when the connector gets disabled. Fixes: c6a27fa41fab ("drm: rcar-du: Convert LVDS encoder code to bridge driver") Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham drivers/gpu/drm/rcar-du/rcar_lvds.c | 3 +++ 1 file changed, 3 insertions(+) commit b80d0b93b991e551a32157e0d9d38fc5bc9348a7 Author: William Tu Date: Fri May 18 19:22:28 2018 -0700 net: ip6_gre: fix tunnel metadata device sharing. Currently ip6gre and ip6erspan share single metadata mode device, using 'collect_md_tun'. Thus, when doing: ip link add dev ip6gre11 type ip6gretap external ip link add dev ip6erspan12 type ip6erspan external RTNETLINK answers: File exists simply fails due to the 2nd tries to create the same collect_md_tun. The patch fixes it by adding a separate collect md tunnel device for the ip6erspan, 'collect_md_tun_erspan'. As a result, a couple of places need to refactor/split up in order to distinguish ip6gre and ip6erspan. First, move the collect_md check at ip6gre_tunnel_{unlink,link} and create separate function {ip6gre,ip6ersapn}_tunnel_{link_md,unlink_md}. Then before link/unlink, make sure the link_md/unlink_md is called. Finally, a separate ndo_uninit is created for ip6erspan. Tested it using the samples/bpf/test_tunnel_bpf.sh. Fixes: ef7baf5e083c ("ip6_gre: add ip6 erspan collect_md mode") Signed-off-by: William Tu Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 101 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 79 insertions(+), 22 deletions(-) commit 203ec2fed17ade9582277570eb234be52085f8c5 Merge: 0b449a4 709f490 Author: Linus Torvalds Date: Sat May 19 19:56:15 2018 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "A handful of fixes. I've been queuing them up a bit too long so the list is longer than it otherwise would have been spread out across a few -rcs. In general, it's a scattering of fixes across several platforms, nothing truly serious enough to point out. There's a slightly larger batch of them for the Davinci platforms due to work to bring them back to life after some time, so there's a handful of regressions, some of them going back very far, others more recent. There's also a few patches fixing DT on Renesas platforms since they changed some bindings without remaining backwards compatible, splitting up describing LVDS as a proper bridge instead of having it as part of the display unit. We could push for them to be backwards compatible with old device trees, but it's likely to regress eventually if nobody's actually using said compatibility" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (36 commits) ARM: davinci: board-dm646x-evm: set VPIF capture card name ARM: davinci: board-dm646x-evm: pass correct I2C adapter id for VPIF ARM: davinci: dm646x: fix timer interrupt generation ARM: keystone: fix platform_domain_notifier array overrun arm64: dts: exynos: Fix interrupt type for I2S1 device on Exynos5433 ARM: dts: imx51-zii-rdu1: fix touchscreen bindings firmware: arm_scmi: Use after free in scmi_create_protocol_device() ARM: dts: cygnus: fix irq type for arm global timer Revert "ARM: dts: logicpd-som-lv: Fix pinmux controller references" tee: check shm references are consistent in offset/size tee: shm: fix use-after-free via temporarily dropped reference ARM: dts: imx7s: Pass the 'fsl,sec-era' property ARM: dts: tegra20: Revert "Fix ULPI regression on Tegra20" ARM: dts: correct missing "compatible" entry for ti81xx SoCs ARM: OMAP1: ams-delta: fix deferred_fiq handler arm64: tegra: Make BCM89610 PHY interrupt as active low ARM: davinci: fix GPIO lookup for I2C ARM: dts: logicpd-som-lv: Fix pinmux controller references ARM: dts: logicpd-som-lv: Fix Audio Mute ARM: dts: logicpd-som-lv: Fix WL127x Startup Issues ... commit 709f490d5b594b9548577d2285ffeaad8a278b10 Merge: a7be67b 9df50ba Author: Olof Johansson Date: Sat May 19 17:58:32 2018 -0700 Merge tag 'tegra-for-4.17-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into fixes arm64: tegra: Device tree fixes for v4.17 This contains a one-line update to the device tree of the Tegra186 P3310 processor module, fixing the polarity of the PHY interrupt. Originally, this was queued to go into v4.18, but the PHY ID matching patch has now found its way into v4.17-rc5, which means that the PHY driver will know how to identify the PHY on this board and try to use the interrupt. This will unfortunately cause networking to break on P3310, hence why I think this should go into v4.17. * tag 'tegra-for-4.17-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Make BCM89610 PHY interrupt as active low Signed-off-by: Olof Johansson commit af86ca4e3088fe5eacf2f7e58c01fa68ca067672 Author: Alexei Starovoitov Date: Tue May 15 09:27:05 2018 -0700 bpf: Prevent memory disambiguation attack Detect code patterns where malicious 'speculative store bypass' can be used and sanitize such patterns. 39: (bf) r3 = r10 40: (07) r3 += -216 41: (79) r8 = *(u64 *)(r7 +0) // slow read 42: (7a) *(u64 *)(r10 -72) = 0 // verifier inserts this instruction 43: (7b) *(u64 *)(r8 +0) = r3 // this store becomes slow due to r8 44: (79) r1 = *(u64 *)(r6 +0) // cpu speculatively executes this load 45: (71) r2 = *(u8 *)(r1 +0) // speculatively arbitrary 'load byte' // is now sanitized Above code after x86 JIT becomes: e5: mov %rbp,%rdx e8: add $0xffffffffffffff28,%rdx ef: mov 0x0(%r13),%r14 f3: movq $0x0,-0x48(%rbp) fb: mov %rdx,0x0(%r14) ff: mov 0x0(%rbx),%rdi 103: movzbq 0x0(%rdi),%rsi Signed-off-by: Alexei Starovoitov Signed-off-by: Thomas Gleixner include/linux/bpf_verifier.h | 1 + kernel/bpf/verifier.c | 59 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 57 insertions(+), 3 deletions(-) commit 92d44a42af81e850a038c38278ff4f434b2871df Author: Russell King Date: Fri Apr 13 00:22:47 2018 +0100 ARM: fix kill( ,SIGFPE) breakage Commit 7771c6645700 ("signal/arm: Document conflicts with SI_USER and SIGFPE") broke the siginfo structure for userspace triggered signals, causing the strace testsuite to regress. Fix this by eliminating the FPE_FIXME definition (which is at the root of the breakage) and use FPE_FLTINV instead for the case where the hardware appears to be reporting nonsense. Fixes: 7771c6645700 ("signal/arm: Document conflicts with SI_USER and SIGFPE") Suggested-by: Linus Torvalds Signed-off-by: Russell King arch/arm/include/uapi/asm/siginfo.h | 13 ------------- arch/arm/vfp/vfpmodule.c | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) commit 0b449a441dac919444face9e3b6ca6aaec30791d Merge: 423913a dbad41e Author: Linus Torvalds Date: Sat May 19 09:54:02 2018 -0700 Merge tag 'dmaengine-fix-4.17-rc6' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fix from Vinod Koul: - qcom bam runtime_pm fix - email update for Vinod * tag 'dmaengine-fix-4.17-rc6' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: qcom: bam_dma: check if the runtime pm enabled dmaengine: Update email address for Vinod commit 423913ad4ae5b3e8fb8983f70969fb522261ba26 Author: Linus Torvalds Date: Sat May 19 09:29:11 2018 -0700 mmap: relax file size limit for regular files Commit be83bbf80682 ("mmap: introduce sane default mmap limits") was introduced to catch problems in various ad-hoc character device drivers doing mmap and getting the size limits wrong. In the process, it used "known good" limits for the normal cases of mapping regular files and block device drivers. It turns out that the "s_maxbytes" limit was less "known good" than I thought. In particular, /proc doesn't set it, but exposes one regular file to mmap: /proc/vmcore. As a result, that file got limited to the default MAX_INT s_maxbytes value. This went unnoticed for a while, because apparently the only thing that needs it is the s390 kernel zfcpdump, but there might be other tools that use this too. Vasily suggested just changing s_maxbytes for all of /proc, which isn't wrong, but makes me nervous at this stage. So instead, just make the new mmap limit always be MAX_LFS_FILESIZE for regular files, which won't affect anything else. It wasn't the regular file case I was worried about. I'd really prefer for maxsize to have been per-inode, but that is not how things are today. Fixes: be83bbf80682 ("mmap: introduce sane default mmap limits") Reported-by: Vasily Gorbik Cc: Al Viro Signed-off-by: Linus Torvalds mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78ce241099bb363b19dbd0245442e66c8de8f567 Author: Borislav Petkov Date: Thu May 17 10:46:26 2018 +0200 x86/MCE/AMD: Cache SMCA MISC block addresses ... into a global, two-dimensional array and service subsequent reads from that cache to avoid rdmsr_on_cpu() calls during CPU hotplug (IPIs with IRQs disabled). In addition, this fixes a KASAN slab-out-of-bounds read due to wrong usage of the bank->blocks pointer. Fixes: 27bd59502702 ("x86/mce/AMD: Get address from already initialized block") Reported-by: Johannes Hirte Tested-by: Johannes Hirte Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: Yazen Ghannam Link: http://lkml.kernel.org/r/20180414004230.GA2033@probook arch/x86/kernel/cpu/mcheck/mce_amd.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 0d73c3f8e7f6ee2aab1bb350f60c180f5ae21a2c Author: Masami Hiramatsu Date: Sun May 13 05:04:29 2018 +0100 ARM: 8772/1: kprobes: Prohibit kprobes on get_user functions Since do_undefinstr() uses get_user to get the undefined instruction, it can be called before kprobes processes recursive check. This can cause an infinit recursive exception. Prohibit probing on get_user functions. Fixes: 24ba613c9d6c ("ARM kprobes: core code") Signed-off-by: Masami Hiramatsu Cc: stable@vger.kernel.org Signed-off-by: Russell King arch/arm/include/asm/assembler.h | 10 ++++++++++ arch/arm/lib/getuser.S | 10 ++++++++++ 2 files changed, 20 insertions(+) commit eb0146daefdde65665b7f076fbff7b49dade95b9 Author: Masami Hiramatsu Date: Sun May 13 05:04:16 2018 +0100 ARM: 8771/1: kprobes: Prohibit kprobes on do_undefinstr Prohibit kprobes on do_undefinstr because kprobes on arm is implemented by undefined instruction. This means if we probe do_undefinstr(), it can cause infinit recursive exception. Fixes: 24ba613c9d6c ("ARM kprobes: core code") Signed-off-by: Masami Hiramatsu Cc: stable@vger.kernel.org Signed-off-by: Russell King arch/arm/kernel/traps.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 70948c05fdde0aac32f9667856a88725c192fa40 Author: Masami Hiramatsu Date: Sun May 13 05:04:10 2018 +0100 ARM: 8770/1: kprobes: Prohibit probing on optimized_callback Prohibit probing on optimized_callback() because it is called from kprobes itself. If we put a kprobes on it, that will cause a recursive call loop. Mark it NOKPROBE_SYMBOL. Fixes: 0dc016dbd820 ("ARM: kprobes: enable OPTPROBES for ARM 32") Signed-off-by: Masami Hiramatsu Cc: stable@vger.kernel.org Signed-off-by: Russell King arch/arm/probes/kprobes/opt-arm.c | 1 + 1 file changed, 1 insertion(+) commit 69af7e23a6870df2ea6fa79ca16493d59b3eebeb Author: Masami Hiramatsu Date: Sun May 13 05:03:54 2018 +0100 ARM: 8769/1: kprobes: Fix to use get_kprobe_ctlblk after irq-disabed Since get_kprobe_ctlblk() uses smp_processor_id() to access per-cpu variable, it hits smp_processor_id sanity check as below. [ 7.006928] BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1 [ 7.007859] caller is debug_smp_processor_id+0x20/0x24 [ 7.008438] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.16.0-rc1-00192-g4eb17253e4b5 #1 [ 7.008890] Hardware name: Generic DT based system [ 7.009917] [] (unwind_backtrace) from [] (show_stack+0x20/0x24) [ 7.010473] [] (show_stack) from [] (dump_stack+0x84/0x98) [ 7.010990] [] (dump_stack) from [] (check_preemption_disabled+0x138/0x13c) [ 7.011592] [] (check_preemption_disabled) from [] (debug_smp_processor_id+0x20/0x24) [ 7.012214] [] (debug_smp_processor_id) from [] (optimized_callback+0x2c/0xe4) [ 7.013077] [] (optimized_callback) from [] (0xbf0021b0) To fix this issue, call get_kprobe_ctlblk() right after irq-disabled since that disables preemption. Fixes: 0dc016dbd820 ("ARM: kprobes: enable OPTPROBES for ARM 32") Signed-off-by: Masami Hiramatsu Cc: stable@vger.kernel.org Signed-off-by: Russell King arch/arm/probes/kprobes/opt-arm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6cea14f55474ec71f1098228e0ae5dd2a8f22c0a Author: Russell King Date: Mon Apr 16 13:21:54 2018 +0100 ARM: replace unnecessary perl with sed and the shell $(( )) operator You can build a kernel in a cross compiling environment that doesn't have perl in the $PATH. Commit 429f7a062e3b broke that for 32 bit ARM. Fix it. As reported by Stephen Rothwell, it appears that the symbols can be either part of the BSS section or absolute symbols depending on the binutils version. When they're an absolute symbol, the $(( )) operator errors out and the build fails. Fix this as well. Fixes: 429f7a062e3b ("ARM: decompressor: fix BSS size calculation") Reported-by: Rob Landley Reported-by: Stephen Rothwell Acked-by: Rob Landley Signed-off-by: Russell King arch/arm/boot/compressed/Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 1c37963b1a1600b9686c4a99857ddcb6028be884 Author: Russell King Date: Wed Apr 11 19:35:19 2018 +0100 ARM: kexec: record parent context registers for non-crash CPUs How we got to machine_crash_nonpanic_core() (iow, from an IPI, etc) is not interesting for debugging a crash. The more interesting context is the parent context prior to the IPI being received. Record the parent context register state rather than the register state in machine_crash_nonpanic_core(), which is more relevant to the failing condition. Signed-off-by: Russell King arch/arm/kernel/machine_kexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d7b3c64431245c95b05a441669c074da10db943 Author: Russell King Date: Wed Apr 11 18:24:01 2018 +0100 ARM: kexec: fix kdump register saving on panic() When a panic() occurs, the kexec code uses smp_send_stop() to stop the other CPUs, but this results in the CPU register state not being saved, and gdb is unable to inspect the state of other CPUs. Commit 0ee59413c967 ("x86/panic: replace smp_send_stop() with kdump friendly version in panic path") addressed the issue on x86, but ignored other architectures. Address the issue on ARM by splitting out the crash stop implementation to crash_smp_send_stop() and adding the necessary protection. Signed-off-by: Russell King arch/arm/kernel/machine_kexec.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit f2ae9de019e4e2807d812ec4fe1df7c34788a0a0 Author: Łukasz Stelmach Date: Wed Apr 4 08:46:58 2018 +0100 ARM: 8758/1: decompressor: restore r1 and r2 just before jumping to the kernel The hypervisor setup before __enter_kernel destroys the value sotred in r1. The value needs to be restored just before the jump. Fixes: 6b52f7bdb888 ("ARM: hyp-stub: Use r1 for the soft-restart address") Signed-off-by: Łukasz Stelmach Signed-off-by: Russell King arch/arm/boot/compressed/head.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e07e3c33b9c0b5751ade624f44325c9bf2487ea6 Author: Łukasz Stelmach Date: Tue Apr 3 09:04:57 2018 +0100 ARM: 8753/1: decompressor: add a missing parameter to the addruart macro In commit 639da5ee374b ("ARM: add an extra temp register to the low level debugging addruart macro") an additional temporary register was added to the addruart macro, but the decompressor code wasn't updated. Fixes: 639da5ee374b ("ARM: add an extra temp register to the low level debugging addruart macro") Signed-off-by: Łukasz Stelmach Signed-off-by: Russell King arch/arm/boot/compressed/head.S | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit acf46020012ccbca1172e9c7aeab399c950d9212 Author: Dmitry Safonov Date: Fri May 18 00:35:10 2018 +0100 x86/mm: Drop TS_COMPAT on 64-bit exec() syscall The x86 mmap() code selects the mmap base for an allocation depending on the bitness of the syscall. For 64bit sycalls it select mm->mmap_base and for 32bit mm->mmap_compat_base. exec() calls mmap() which in turn uses in_compat_syscall() to check whether the mapping is for a 32bit or a 64bit task. The decision is made on the following criteria: ia32 child->thread.status & TS_COMPAT x32 child->pt_regs.orig_ax & __X32_SYSCALL_BIT ia64 !ia32 && !x32 __set_personality_x32() was dropping TS_COMPAT flag, but set_personality_64bit() has kept compat syscall flag making in_compat_syscall() return true during the first exec() syscall. Which in result has user-visible effects, mentioned by Alexey: 1) It breaks ASAN $ gcc -fsanitize=address wrap.c -o wrap-asan $ ./wrap32 ./wrap-asan true ==1217==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING. ==1217==ASan shadow was supposed to be located in the [0x00007fff7000-0x10007fff7fff] range. ==1217==Process memory map follows: 0x000000400000-0x000000401000 /home/izbyshev/test/gcc/asan-exec-from-32bit/wrap-asan 0x000000600000-0x000000601000 /home/izbyshev/test/gcc/asan-exec-from-32bit/wrap-asan 0x000000601000-0x000000602000 /home/izbyshev/test/gcc/asan-exec-from-32bit/wrap-asan 0x0000f7dbd000-0x0000f7de2000 /lib64/ld-2.27.so 0x0000f7fe2000-0x0000f7fe3000 /lib64/ld-2.27.so 0x0000f7fe3000-0x0000f7fe4000 /lib64/ld-2.27.so 0x0000f7fe4000-0x0000f7fe5000 0x7fed9abff000-0x7fed9af54000 0x7fed9af54000-0x7fed9af6b000 /lib64/libgcc_s.so.1 [snip] 2) It doesn't seem to be great for security if an attacker always knows that ld.so is going to be mapped into the first 4GB in this case (the same thing happens for PIEs as well). The testcase: $ cat wrap.c int main(int argc, char *argv[]) { execvp(argv[1], &argv[1]); return 127; } $ gcc wrap.c -o wrap $ LD_SHOW_AUXV=1 ./wrap ./wrap true |& grep AT_BASE AT_BASE: 0x7f63b8309000 AT_BASE: 0x7faec143c000 AT_BASE: 0x7fbdb25fa000 $ gcc -m32 wrap.c -o wrap32 $ LD_SHOW_AUXV=1 ./wrap32 ./wrap true |& grep AT_BASE AT_BASE: 0xf7eff000 AT_BASE: 0xf7cee000 AT_BASE: 0x7f8b9774e000 Fixes: 1b028f784e8c ("x86/mm: Introduce mmap_compat_base() for 32-bit mmap()") Fixes: ada26481dfe6 ("x86/mm: Make in_compat_syscall() work during exec") Reported-by: Alexey Izbyshev Bisected-by: Alexander Monakov Investigated-by: Andy Lutomirski Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Reviewed-by: Cyrill Gorcunov Cc: Borislav Petkov Cc: Alexander Monakov Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: stable@vger.kernel.org Cc: linux-mm@kvack.org Cc: Andy Lutomirski Cc: "H. Peter Anvin" Cc: Cyrill Gorcunov Cc: "Kirill A. Shutemov" Link: https://lkml.kernel.org/r/20180517233510.24996-1-dima@arista.com arch/x86/kernel/process_64.c | 1 + 1 file changed, 1 insertion(+) commit 7dec80ccbe310fb7e225bf21c48c672bb780ce7b Author: Josh Poimboeuf Date: Fri May 18 15:10:34 2018 -0500 objtool: Detect RIP-relative switch table references, part 2 With the following commit: fd35c88b7417 ("objtool: Support GCC 8 switch tables") I added a "can't find switch jump table" warning, to stop covering up silent failures if add_switch_table() can't find anything. That warning found yet another bug in the objtool switch table detection logic. For cases 1 and 2 (as described in the comments of find_switch_table()), the find_symbol_containing() check doesn't adjust the offset for RIP-relative switch jumps. Incidentally, this bug was already fixed for case 3 with: 6f5ec2993b1f ("objtool: Detect RIP-relative switch table references") However, that commit missed the fix for cases 1 and 2. The different cases are now starting to look more and more alike. So fix the bug by consolidating them into a single case, by checking the original dynamic jump instruction in the case 3 loop. This also simplifies the code and makes it more robust against future switch table detection issues -- of which I'm sure there will be many... Switch table detection has been the most fragile area of objtool, by far. I long for the day when we'll have a GCC plugin for annotating switch tables. Linus asked me to delay such a plugin due to the flakiness of the plugin infrastructure in older versions of GCC, so this rickety code is what we're stuck with for now. At least the code is now a little simpler than it was. Reported-by: kbuild test robot Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/f400541613d45689086329432f3095119ffbc328.1526674218.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/check.c | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) commit 4f74d72aa7067e75af92fbab077e6d7d0210be66 Author: Mark Rutland Date: Fri May 18 16:08:41 2018 +0200 efi/libstub/arm64: Handle randomized TEXT_OFFSET When CONFIG_RANDOMIZE_TEXT_OFFSET=y, TEXT_OFFSET is an arbitrary multiple of PAGE_SIZE in the interval [0, 2MB). The EFI stub does not account for the potential misalignment of TEXT_OFFSET relative to EFI_KIMG_ALIGN, and produces a randomized physical offset which is always a round multiple of EFI_KIMG_ALIGN. This may result in statically allocated objects whose alignment exceeds PAGE_SIZE to appear misaligned in memory. This has been observed to result in spurious stack overflow reports and failure to make use of the IRQ stacks, and theoretically could result in a number of other issues. We can OR in the low bits of TEXT_OFFSET to ensure that we have the necessary offset (and hence preserve the misalignment of TEXT_OFFSET relative to EFI_KIMG_ALIGN), so let's do that. Reported-by: Kim Phillips Tested-by: Kim Phillips [ardb: clarify comment and commit log, drop unneeded parens] Signed-off-by: Mark Rutland Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Fixes: 6f26b3671184c36d ("arm64: kaslr: increase randomization granularity") Link: http://lkml.kernel.org/r/20180518140841.9731-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/libstub/arm64-stub.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 73fcb1a370c76b202d406e95d9dabb76eaccf484 Merge: 10a2f87 66072c29 Author: Linus Torvalds Date: Fri May 18 21:24:26 2018 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "10 fixes" * emailed patches from Andrew Morton : hfsplus: stop workqueue when fill_super() failed mm: don't allow deferred pages with NEED_PER_CPU_KM MAINTAINERS: add Q: entry to kselftest for patchwork project radix tree: fix multi-order iteration race radix tree test suite: multi-order iteration race radix tree test suite: add item_delete_rcu() radix tree test suite: fix compilation issue radix tree test suite: fix mapshift build target include/linux/mm.h: add new inline function vmf_error() lib/test_bitmap.c: fix bitmap optimisation tests to report errors correctly commit 10a2f87485b9fb7bec1a50305d4a3ec74aa8058c Merge: f65cfec 54940fa Author: Linus Torvalds Date: Fri May 18 21:22:16 2018 -0700 Merge tag 'platform-drivers-x86-v4.17-3' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver fix from Darren Hart: "Remove the last of the "select DELL_SMBIOS" references in the Kconfig" * tag 'platform-drivers-x86-v4.17-3' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: DELL_WMI use depends on instead of select for DELL_SMBIOS commit f65cfecfa1181232cd7298243bcb3c535f09c4da Merge: 6d16db0 9a16060 Author: Linus Torvalds Date: Fri May 18 21:19:02 2018 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: - a modified revert of a patch that made new choices come out for a couple stm32 clk drivers that really always need to be there when that particular machine is compiled in - boot fix on i.MX for Stefan who noticed odd behavior from the critical flag patch that came in during the merge window * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: stm32: fix: stm32 clock drivers are not compiled by default clk: imx6ull: use OSC clock during AXI rate change commit 6d16db0093936c382f74ed3d076fc7d025671297 Merge: 2c71d33 22aac3e Author: Linus Torvalds Date: Fri May 18 18:02:01 2018 -0700 Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "A bunch of driver bugfixes and a MAINTAINERS addition" * 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: MAINTAINERS: add entry for STM32 I2C driver i2c: viperboard: return message count on master_xfer success i2c: pmcmsp: fix error return from master_xfer i2c: pmcmsp: return message count on master_xfer success i2c: designware: fix poll-after-enable regression eeprom: at24: fix retrieving the at24_chip_data structure i2c: core: ACPI: Log device not acking errors at dbg loglevel i2c: core: ACPI: Improve OpRegion read errors commit 66072c29328717072fd84aaff3e070e3f008ba77 Author: Tetsuo Handa Date: Fri May 18 16:09:16 2018 -0700 hfsplus: stop workqueue when fill_super() failed syzbot is reporting ODEBUG messages at hfsplus_fill_super() [1]. This is because hfsplus_fill_super() forgot to call cancel_delayed_work_sync(). As far as I can see, it is hfsplus_mark_mdb_dirty() from hfsplus_new_inode() in hfsplus_fill_super() that calls queue_delayed_work(). Therefore, I assume that hfsplus_new_inode() does not fail if queue_delayed_work() was called, and the out_put_hidden_dir label is the appropriate location to call cancel_delayed_work_sync(). [1] https://syzkaller.appspot.com/bug?id=a66f45e96fdbeb76b796bf46eb25ea878c42a6c9 Link: http://lkml.kernel.org/r/964a8b27-cd69-357c-fe78-76b066056201@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Reported-by: syzbot Cc: Al Viro Cc: David Howells Cc: Ernesto A. Fernandez Cc: Vyacheslav Dubeyko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hfsplus/super.c | 1 + 1 file changed, 1 insertion(+) commit ab1e8d8960b68f54af42b6484b5950bd13a4054b Author: Pavel Tatashin Date: Fri May 18 16:09:13 2018 -0700 mm: don't allow deferred pages with NEED_PER_CPU_KM It is unsafe to do virtual to physical translations before mm_init() is called if struct page is needed in order to determine the memory section number (see SECTION_IN_PAGE_FLAGS). This is because only in mm_init() we initialize struct pages for all the allocated memory when deferred struct pages are used. My recent fix in commit c9e97a1997 ("mm: initialize pages on demand during boot") exposed this problem, because it greatly reduced number of pages that are initialized before mm_init(), but the problem existed even before my fix, as Fengguang Wu found. Below is a more detailed explanation of the problem. We initialize struct pages in four places: 1. Early in boot a small set of struct pages is initialized to fill the first section, and lower zones. 2. During mm_init() we initialize "struct pages" for all the memory that is allocated, i.e reserved in memblock. 3. Using on-demand logic when pages are allocated after mm_init call (when memblock is finished) 4. After smp_init() when the rest free deferred pages are initialized. The problem occurs if we try to do va to phys translation of a memory between steps 1 and 2. Because we have not yet initialized struct pages for all the reserved pages, it is inherently unsafe to do va to phys if the translation itself requires access of "struct page" as in case of this combination: CONFIG_SPARSE && !CONFIG_SPARSE_VMEMMAP The following path exposes the problem: start_kernel() trap_init() setup_cpu_entry_areas() setup_cpu_entry_area(cpu) get_cpu_gdt_paddr(cpu) per_cpu_ptr_to_phys(addr) pcpu_addr_to_page(addr) virt_to_page(addr) pfn_to_page(__pa(addr) >> PAGE_SHIFT) We disable this path by not allowing NEED_PER_CPU_KM with deferred struct pages feature. The problems are discussed in these threads: http://lkml.kernel.org/r/20180418135300.inazvpxjxowogyge@wfg-t540p.sh.intel.com http://lkml.kernel.org/r/20180419013128.iurzouiqxvcnpbvz@wfg-t540p.sh.intel.com http://lkml.kernel.org/r/20180426202619.2768-1-pasha.tatashin@oracle.com Link: http://lkml.kernel.org/r/20180515175124.1770-1-pasha.tatashin@oracle.com Fixes: 3a80a7fa7989 ("mm: meminit: initialise a subset of struct pages if CONFIG_DEFERRED_STRUCT_PAGE_INIT is set") Signed-off-by: Pavel Tatashin Acked-by: Michal Hocko Reviewed-by: Andrew Morton Cc: Steven Sistare Cc: Daniel Jordan Cc: Mel Gorman Cc: Fengguang Wu Cc: Dennis Zhou Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit f3d8d3cfc1c00d1ebdb53ee96aa53aa822209003 Author: Shuah Khan (Samsung OSG) Date: Fri May 18 16:09:09 2018 -0700 MAINTAINERS: add Q: entry to kselftest for patchwork project A new patchwork project is created to track kselftest patches. Update the kselftest entry in the MAINTAINERS file adding 'Q:' entry: https://patchwork.kernel.org/project/linux-kselftest/list/ Link: http://lkml.kernel.org/r/20180515164427.12201-1-shuah@kernel.org Signed-off-by: Shuah Khan (Samsung OSG) Cc: David S. Miller Cc: Mauro Carvalho Chehab Cc: Greg Kroah-Hartman Cc: Linus Walleij Cc: Randy Dunlap Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 9f418224e8114156d995b98fa4e0f4fd21f685fe Author: Ross Zwisler Date: Fri May 18 16:09:06 2018 -0700 radix tree: fix multi-order iteration race Fix a race in the multi-order iteration code which causes the kernel to hit a GP fault. This was first seen with a production v4.15 based kernel (4.15.6-300.fc27.x86_64) utilizing a DAX workload which used order 9 PMD DAX entries. The race has to do with how we tear down multi-order sibling entries when we are removing an item from the tree. Remember for example that an order 2 entry looks like this: struct radix_tree_node.slots[] = [entry][sibling][sibling][sibling] where 'entry' is in some slot in the struct radix_tree_node, and the three slots following 'entry' contain sibling pointers which point back to 'entry.' When we delete 'entry' from the tree, we call : radix_tree_delete() radix_tree_delete_item() __radix_tree_delete() replace_slot() replace_slot() first removes the siblings in order from the first to the last, then at then replaces 'entry' with NULL. This means that for a brief period of time we end up with one or more of the siblings removed, so: struct radix_tree_node.slots[] = [entry][NULL][sibling][sibling] This causes an issue if you have a reader iterating over the slots in the tree via radix_tree_for_each_slot() while only under rcu_read_lock()/rcu_read_unlock() protection. This is a common case in mm/filemap.c. The issue is that when __radix_tree_next_slot() => skip_siblings() tries to skip over the sibling entries in the slots, it currently does so with an exact match on the slot directly preceding our current slot. Normally this works: V preceding slot struct radix_tree_node.slots[] = [entry][sibling][sibling][sibling] ^ current slot This lets you find the first sibling, and you skip them all in order. But in the case where one of the siblings is NULL, that slot is skipped and then our sibling detection is interrupted: V preceding slot struct radix_tree_node.slots[] = [entry][NULL][sibling][sibling] ^ current slot This means that the sibling pointers aren't recognized since they point all the way back to 'entry', so we think that they are normal internal radix tree pointers. This causes us to think we need to walk down to a struct radix_tree_node starting at the address of 'entry'. In a real running kernel this will crash the thread with a GP fault when you try and dereference the slots in your broken node starting at 'entry'. We fix this race by fixing the way that skip_siblings() detects sibling nodes. Instead of testing against the preceding slot we instead look for siblings via is_sibling_entry() which compares against the position of the struct radix_tree_node.slots[] array. This ensures that sibling entries are properly identified, even if they are no longer contiguous with the 'entry' they point to. Link: http://lkml.kernel.org/r/20180503192430.7582-6-ross.zwisler@linux.intel.com Fixes: 148deab223b2 ("radix-tree: improve multiorder iterators") Signed-off-by: Ross Zwisler Reported-by: CR, Sapthagirish Reviewed-by: Jan Kara Cc: Matthew Wilcox Cc: Christoph Hellwig Cc: Dan Williams Cc: Dave Chinner Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/radix-tree.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit fd8f58c40b703e47697c9f12bc16c31f14c161f1 Author: Ross Zwisler Date: Fri May 18 16:09:01 2018 -0700 radix tree test suite: multi-order iteration race Add a test which shows a race in the multi-order iteration code. This test reliably hits the race in under a second on my machine, and is the result of a real bug report against kernel a production v4.15 based kernel (4.15.6-300.fc27.x86_64). With a real kernel this issue is hit when using order 9 PMD DAX radix tree entries. The race has to do with how we tear down multi-order sibling entries when we are removing an item from the tree. Remember that an order 2 entry looks like this: struct radix_tree_node.slots[] = [entry][sibling][sibling][sibling] where 'entry' is in some slot in the struct radix_tree_node, and the three slots following 'entry' contain sibling pointers which point back to 'entry.' When we delete 'entry' from the tree, we call : radix_tree_delete() radix_tree_delete_item() __radix_tree_delete() replace_slot() replace_slot() first removes the siblings in order from the first to the last, then at then replaces 'entry' with NULL. This means that for a brief period of time we end up with one or more of the siblings removed, so: struct radix_tree_node.slots[] = [entry][NULL][sibling][sibling] This causes an issue if you have a reader iterating over the slots in the tree via radix_tree_for_each_slot() while only under rcu_read_lock()/rcu_read_unlock() protection. This is a common case in mm/filemap.c. The issue is that when __radix_tree_next_slot() => skip_siblings() tries to skip over the sibling entries in the slots, it currently does so with an exact match on the slot directly preceding our current slot. Normally this works: V preceding slot struct radix_tree_node.slots[] = [entry][sibling][sibling][sibling] ^ current slot This lets you find the first sibling, and you skip them all in order. But in the case where one of the siblings is NULL, that slot is skipped and then our sibling detection is interrupted: V preceding slot struct radix_tree_node.slots[] = [entry][NULL][sibling][sibling] ^ current slot This means that the sibling pointers aren't recognized since they point all the way back to 'entry', so we think that they are normal internal radix tree pointers. This causes us to think we need to walk down to a struct radix_tree_node starting at the address of 'entry'. In a real running kernel this will crash the thread with a GP fault when you try and dereference the slots in your broken node starting at 'entry'. In the radix tree test suite this will be caught by the address sanitizer: ==27063==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60c0008ae400 at pc 0x00000040ce4f bp 0x7fa89b8fcad0 sp 0x7fa89b8fcac0 READ of size 8 at 0x60c0008ae400 thread T3 #0 0x40ce4e in __radix_tree_next_slot /home/rzwisler/project/linux/tools/testing/radix-tree/radix-tree.c:1660 #1 0x4022cc in radix_tree_next_slot linux/../../../../include/linux/radix-tree.h:567 #2 0x4022cc in iterator_func /home/rzwisler/project/linux/tools/testing/radix-tree/multiorder.c:655 #3 0x7fa8a088d50a in start_thread (/lib64/libpthread.so.0+0x750a) #4 0x7fa8a03bd16e in clone (/lib64/libc.so.6+0xf516e) Link: http://lkml.kernel.org/r/20180503192430.7582-5-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Cc: Christoph Hellwig Cc: CR, Sapthagirish Cc: Dan Williams Cc: Dave Chinner Cc: Jan Kara Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/radix-tree/multiorder.c | 63 +++++++++++++++++++++++++++++++++++ tools/testing/radix-tree/test.h | 1 + 2 files changed, 64 insertions(+) commit 3e252fa7d4f711798e7a3f5ff2d7b62f0e2987ce Author: Ross Zwisler Date: Fri May 18 16:08:58 2018 -0700 radix tree test suite: add item_delete_rcu() Currently the lifetime of "struct item" entries in the radix tree are not controlled by RCU, but are instead deleted inline as they are removed from the tree. In the following patches we add a test which has threads iterating over items pulled from the tree and verifying them in an rcu_read_lock()/rcu_read_unlock() section. This means that though an item has been removed from the tree it could still be being worked on by other threads until the RCU grace period expires. So, we need to actually free the "struct item" structures at the end of the grace period, just as we do with "struct radix_tree_node" items. Link: http://lkml.kernel.org/r/20180503192430.7582-4-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Cc: Christoph Hellwig Cc: CR, Sapthagirish Cc: Dan Williams Cc: Dave Chinner Cc: Jan Kara Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/radix-tree/test.c | 19 +++++++++++++++++++ tools/testing/radix-tree/test.h | 2 ++ 2 files changed, 21 insertions(+) commit dcbbf25adb31410c95ce844f80d372ed38b68b24 Author: Ross Zwisler Date: Fri May 18 16:08:54 2018 -0700 radix tree test suite: fix compilation issue Pulled from a patch from Matthew Wilcox entitled "xarray: Add definition of struct xarray": > From: Matthew Wilcox > Signed-off-by: Matthew Wilcox https://patchwork.kernel.org/patch/10341249/ These defines fix this compilation error: In file included from ./linux/radix-tree.h:6:0, from ./linux/../../../../include/linux/idr.h:15, from ./linux/idr.h:1, from idr.c:4: ./linux/../../../../include/linux/idr.h: In function `idr_init_base': ./linux/../../../../include/linux/radix-tree.h:129:2: warning: implicit declaration of function `spin_lock_init'; did you mean `spinlock_t'? [-Wimplicit-function-declaration] spin_lock_init(&(root)->xa_lock); \ ^ ./linux/../../../../include/linux/idr.h:126:2: note: in expansion of macro `INIT_RADIX_TREE' INIT_RADIX_TREE(&idr->idr_rt, IDR_RT_MARKER); ^~~~~~~~~~~~~~~ by providing a spin_lock_init() wrapper for the v4.17-rc* version of the radix tree test suite. Link: http://lkml.kernel.org/r/20180503192430.7582-3-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Cc: Christoph Hellwig Cc: CR, Sapthagirish Cc: Dan Williams Cc: Dave Chinner Cc: Jan Kara Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/include/linux/spinlock.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8d9fa88edd5e360b71765feeadb915d4066c9684 Author: Ross Zwisler Date: Fri May 18 16:08:51 2018 -0700 radix tree test suite: fix mapshift build target Commit c6ce3e2fe3da ("radix tree test suite: Add config option for map shift") introduced a phony makefile target called 'mapshift' that ends up generating the file generated/map-shift.h. This phony target was then added as a dependency of the top level 'targets' build target, which is what is run when you go to tools/testing/radix-tree and just type 'make'. Unfortunately, this phony target doesn't actually work as a dependency, so you end up getting: $ make make: *** No rule to make target 'generated/map-shift.h', needed by 'main.o'. Stop. make: *** Waiting for unfinished jobs.... Fix this by making the file generated/map-shift.h our real makefile target, and add this a dependency of the top level build target. Link: http://lkml.kernel.org/r/20180503192430.7582-2-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Cc: Christoph Hellwig Cc: CR, Sapthagirish Cc: Dan Williams Cc: Dave Chinner Cc: Jan Kara Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/radix-tree/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d97baf9470b0668904aa96865abe7db4000dc3ba Author: Souptick Joarder Date: Fri May 18 16:08:47 2018 -0700 include/linux/mm.h: add new inline function vmf_error() Many places in drivers/ file systems, error was handled in a common way like below: ret = (ret == -ENOMEM) ? VM_FAULT_OOM : VM_FAULT_SIGBUS; vmf_error() will replace this and return vm_fault_t type err. A lot of drivers and filesystems currently have a rather complex mapping of errno-to-VM_FAULT code. We have been able to eliminate a lot of it by just returning VM_FAULT codes directly from functions which are called exclusively from the fault handling path. Some functions can be called both from the fault handler and other context which are expecting an errno, so they have to continue to return an errno. Some users still need to choose different behaviour for different errnos, but vmf_error() captures the essential error translation that's common to all users, and those that need to handle additional errors can handle them first. Link: http://lkml.kernel.org/r/20180510174826.GA14268@jordon-HP-15-Notebook-PC Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 1e3054b98c5415d5cb5f8824fc33b548ae5644c3 Author: Matthew Wilcox Date: Fri May 18 16:08:44 2018 -0700 lib/test_bitmap.c: fix bitmap optimisation tests to report errors correctly I had neglected to increment the error counter when the tests failed, which made the tests noisy when they fail, but not actually return an error code. Link: http://lkml.kernel.org/r/20180509114328.9887-1-mpe@ellerman.id.au Fixes: 3cc78125a081 ("lib/test_bitmap.c: add optimisation tests") Signed-off-by: Matthew Wilcox Signed-off-by: Michael Ellerman Reported-by: Michael Ellerman Tested-by: Michael Ellerman Reviewed-by: Kees Cook Cc: Yury Norov Cc: Andy Shevchenko Cc: Geert Uytterhoeven Cc: [4.13+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_bitmap.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 54940fa60ad3728c592f62dadb558165495a6938 Author: Darren Hart Date: Sat May 12 12:10:07 2018 -0700 platform/x86: DELL_WMI use depends on instead of select for DELL_SMBIOS If DELL_WMI "select"s DELL_SMBIOS, the DELL_SMBIOS dependencies are ignored and it is still possible to end up with unmet direct dependencies. Change the select to a depends on. Tested-by: Randy Dunlap Signed-off-by: Darren Hart (VMware) drivers/platform/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6837d26674afd2ccb789fe666b4aff7095dc3d2 Author: Anders Roxell Date: Fri May 18 20:23:24 2018 +0200 selftests: bpf: config: enable NET_SCH_INGRESS for xdp_meta.sh When running bpf's selftest test_xdp_meta.sh it fails: ./test_xdp_meta.sh Error: Specified qdisc not found. selftests: test_xdp_meta [FAILED] Need to enable CONFIG_NET_SCH_INGRESS and CONFIG_NET_CLS_ACT to get the test to pass. Fixes: 22c8852624fc ("bpf: improve selftests and add tests for meta pointer") Signed-off-by: Anders Roxell Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/config | 2 ++ 1 file changed, 2 insertions(+) commit 4855c92dbb7b3b85c23e88ab7ca04f99b9677b41 Author: Joe Jin Date: Thu May 17 12:33:28 2018 -0700 xen-swiotlb: fix the check condition for xen_swiotlb_free_coherent When run raidconfig from Dom0 we found that the Xen DMA heap is reduced, but Dom Heap is increased by the same size. Tracing raidconfig we found that the related ioctl() in megaraid_sas will call dma_alloc_coherent() to apply memory. If the memory allocated by Dom0 is not in the DMA area, it will exchange memory with Xen to meet the requiment. Later drivers call dma_free_coherent() to free the memory, on xen_swiotlb_free_coherent() the check condition (dev_addr + size - 1 <= dma_mask) is always false, it prevents calling xen_destroy_contiguous_region() to return the memory to the Xen DMA heap. This issue introduced by commit 6810df88dcfc2 "xen-swiotlb: When doing coherent alloc/dealloc check before swizzling the MFNs.". Signed-off-by: Joe Jin Tested-by: John Sobecki Reviewed-by: Rzeszutek Wilk Cc: stable@vger.kernel.org Signed-off-by: Konrad Rzeszutek Wilk drivers/xen/swiotlb-xen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d775f26b295a0a303f7a73d7da46e04296484fe7 Author: Rahul Lakkireddy Date: Fri May 18 19:13:37 2018 +0530 cxgb4: fix offset in collecting TX rate limit info Correct the indirect register offsets in collecting TX rate limit info in UP CIM logs. Also, T5 doesn't support these indirect register offsets, so remove them from collection logic. Fixes: be6e36d916b1 ("cxgb4: collect TX rate limit info in UP CIM logs") Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 28 ++++++++--------------- 1 file changed, 9 insertions(+), 19 deletions(-) commit 44a63b137f7b6e4c7bd6c9cc21615941cb36509d Author: Paolo Abeni Date: Fri May 18 14:51:44 2018 +0200 net: sched: red: avoid hashing NULL child Hangbin reported an Oops triggered by the syzkaller qdisc rules: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN PTI Modules linked in: sch_red CPU: 0 PID: 28699 Comm: syz-executor5 Not tainted 4.17.0-rc4.kcov #1 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 RIP: 0010:qdisc_hash_add+0x26/0xa0 RSP: 0018:ffff8800589cf470 EFLAGS: 00010203 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff824ad971 RDX: 0000000000000007 RSI: ffffc9000ce9f000 RDI: 000000000000003c RBP: 0000000000000001 R08: ffffed000b139ea2 R09: ffff8800589cf4f0 R10: ffff8800589cf50f R11: ffffed000b139ea2 R12: ffff880054019fc0 R13: ffff880054019fb4 R14: ffff88005c0af600 R15: ffff880054019fb0 FS: 00007fa6edcb1700(0000) GS:ffff88005ce00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000740 CR3: 000000000fc16000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: red_change+0x2d2/0xed0 [sch_red] qdisc_create+0x57e/0xef0 tc_modify_qdisc+0x47f/0x14e0 rtnetlink_rcv_msg+0x6a8/0x920 netlink_rcv_skb+0x2a2/0x3c0 netlink_unicast+0x511/0x740 netlink_sendmsg+0x825/0xc30 sock_sendmsg+0xc5/0x100 ___sys_sendmsg+0x778/0x8e0 __sys_sendmsg+0xf5/0x1b0 do_syscall_64+0xbd/0x3b0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x450869 RSP: 002b:00007fa6edcb0c48 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fa6edcb16b4 RCX: 0000000000450869 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000008778 R14: 0000000000702838 R15: 00007fa6edcb1700 Code: e9 0b fe ff ff 0f 1f 44 00 00 55 53 48 89 fb 89 f5 e8 3f 07 f3 fe 48 8d 7b 3c 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 51 RIP: qdisc_hash_add+0x26/0xa0 RSP: ffff8800589cf470 When a red qdisc is updated with a 0 limit, the child qdisc is left unmodified, no additional scheduler is created in red_change(), the 'child' local variable is rightfully NULL and must not add it to the hash table. This change addresses the above issue moving qdisc_hash_add() right after the child qdisc creation. It additionally removes unneeded checks for noop_qdisc. Reported-by: Hangbin Liu Fixes: 49b499718fa1 ("net: sched: make default fifo qdiscs appear in the dump") Signed-off-by: Paolo Abeni Acked-by: Jiri Kosina Signed-off-by: David S. Miller net/sched/sch_red.c | 5 +++-- net/sched/sch_tbf.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 9709020c86f6bf8439ca3effc58cfca49a5de192 Author: Eric Dumazet Date: Fri May 18 04:47:55 2018 -0700 sock_diag: fix use-after-free read in __sk_free We must not call sock_diag_has_destroy_listeners(sk) on a socket that has no reference on net structure. BUG: KASAN: use-after-free in sock_diag_has_destroy_listeners include/linux/sock_diag.h:75 [inline] BUG: KASAN: use-after-free in __sk_free+0x329/0x340 net/core/sock.c:1609 Read of size 8 at addr ffff88018a02e3a0 by task swapper/1/0 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.17.0-rc5+ #54 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 sock_diag_has_destroy_listeners include/linux/sock_diag.h:75 [inline] __sk_free+0x329/0x340 net/core/sock.c:1609 sk_free+0x42/0x50 net/core/sock.c:1623 sock_put include/net/sock.h:1664 [inline] reqsk_free include/net/request_sock.h:116 [inline] reqsk_put include/net/request_sock.h:124 [inline] inet_csk_reqsk_queue_drop_and_put net/ipv4/inet_connection_sock.c:672 [inline] reqsk_timer_handler+0xe27/0x10e0 net/ipv4/inet_connection_sock.c:739 call_timer_fn+0x230/0x940 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x79e/0xc50 kernel/time/timer.c:1666 run_timer_softirq+0x4c/0x70 kernel/time/timer.c:1692 __do_softirq+0x2e0/0xaf5 kernel/softirq.c:285 invoke_softirq kernel/softirq.c:365 [inline] irq_exit+0x1d1/0x200 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:525 [inline] smp_apic_timer_interrupt+0x17e/0x710 arch/x86/kernel/apic/apic.c:1052 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:863 RIP: 0010:native_safe_halt+0x6/0x10 arch/x86/include/asm/irqflags.h:54 RSP: 0018:ffff8801d9ae7c38 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: 1ffff1003b35cf8a RCX: 0000000000000000 RDX: 1ffffffff11a30d0 RSI: 0000000000000001 RDI: ffffffff88d18680 RBP: ffff8801d9ae7c38 R08: ffffed003b5e46c3 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001 R13: ffff8801d9ae7cf0 R14: ffffffff897bef20 R15: 0000000000000000 arch_safe_halt arch/x86/include/asm/paravirt.h:94 [inline] default_idle+0xc2/0x440 arch/x86/kernel/process.c:354 arch_cpu_idle+0x10/0x20 arch/x86/kernel/process.c:345 default_idle_call+0x6d/0x90 kernel/sched/idle.c:93 cpuidle_idle_call kernel/sched/idle.c:153 [inline] do_idle+0x395/0x560 kernel/sched/idle.c:262 cpu_startup_entry+0x104/0x120 kernel/sched/idle.c:368 start_secondary+0x426/0x5b0 arch/x86/kernel/smpboot.c:269 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:242 Allocated by task 4557: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3554 kmem_cache_zalloc include/linux/slab.h:691 [inline] net_alloc net/core/net_namespace.c:383 [inline] copy_net_ns+0x159/0x4c0 net/core/net_namespace.c:423 create_new_namespaces+0x69d/0x8f0 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xc3/0x1f0 kernel/nsproxy.c:206 ksys_unshare+0x708/0xf90 kernel/fork.c:2408 __do_sys_unshare kernel/fork.c:2476 [inline] __se_sys_unshare kernel/fork.c:2474 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:2474 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 69: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x86/0x2d0 mm/slab.c:3756 net_free net/core/net_namespace.c:399 [inline] net_drop_ns.part.14+0x11a/0x130 net/core/net_namespace.c:406 net_drop_ns net/core/net_namespace.c:405 [inline] cleanup_net+0x6a1/0xb20 net/core/net_namespace.c:541 process_one_work+0xc1e/0x1b50 kernel/workqueue.c:2145 worker_thread+0x1cc/0x1440 kernel/workqueue.c:2279 kthread+0x345/0x410 kernel/kthread.c:240 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 The buggy address belongs to the object at ffff88018a02c140 which belongs to the cache net_namespace of size 8832 The buggy address is located 8800 bytes inside of 8832-byte region [ffff88018a02c140, ffff88018a02e3c0) The buggy address belongs to the page: page:ffffea0006280b00 count:1 mapcount:0 mapping:ffff88018a02c140 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff88018a02c140 0000000000000000 0000000100000001 raw: ffffea00062a1320 ffffea0006268020 ffff8801d9bdde40 0000000000000000 page dumped because: kasan: bad access detected Fixes: b922622ec6ef ("sock_diag: don't broadcast kernel sockets") Signed-off-by: Eric Dumazet Cc: Craig Gallek Reported-by: syzbot Signed-off-by: David S. Miller net/core/sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b16a960ddbf0d4fd6aaabee42d7ec4c4c3ec836d Author: Geert Uytterhoeven Date: Fri May 18 12:52:51 2018 +0200 sh_eth: Change platform check to CONFIG_ARCH_RENESAS Since commit 9b5ba0df4ea4f940 ("ARM: shmobile: Introduce ARCH_RENESAS") is CONFIG_ARCH_RENESAS a more appropriate platform check than the legacy CONFIG_ARCH_SHMOBILE, hence use the former. Renesas SuperH SH-Mobile SoCs are still covered by the CONFIG_CPU_SH4 check. This will allow to drop ARCH_SHMOBILE on ARM and ARM64 in the near future. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Acked-by: Sergei Shtylyov Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c71d338bef2cc8a2e5f8ebe70788eeff246fcd8 Merge: d315482 c1d2a31 Author: Linus Torvalds Date: Fri May 18 10:24:03 2018 -0700 Merge tag 'powerpc-4.17-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Just three commits. The two cxl ones are not fixes per se, but they modify code that was added this cycle so that it will work with a recent firmware change. And then a fix for a recent commit that added sleeps in the NVRAM code, which needs to be more careful and not sleep if eg. we're called in the panic() path. Thanks to Nicholas Piggin, Philippe Bergheaud, Christophe Lombard" * tag 'powerpc-4.17-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/powernv: Fix NVRAM sleep in invalid context when crashing cxl: Report the tunneled operations status cxl: Set the PBCQ Tunnel BAR register when enabling capi mode commit d3154821686531964735a17ee0466c832e69d6d5 Merge: 477e2c6 7b34c0f Author: Linus Torvalds Date: Fri May 18 10:21:03 2018 -0700 Merge tag 'acpi-4.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Fix an ACPICA regression introduced in this cycle and related to the handling of package objects loaded by the Load and loadTable AML operators that are not initialized properly after recent changes (Bob Moore)" * tag 'acpi-4.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPICA: Add deferred package support for the Load and loadTable operators commit 477e2c6f34a4c7c6dd9d796420979214c5b4ade7 Merge: 0e273f9 0cf442c Author: Linus Torvalds Date: Fri May 18 10:14:42 2018 -0700 Merge tag 'pm-4.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Fix Kconfig dependencies of the armada-37xx cpufreq driver (Miquel Raynal)" * tag 'pm-4.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: armada-37xx: driver relies on cpufreq-dt commit 0e273f9edcea9b6893aed90b4ccf8b400dd838ea Merge: 61c2ad9 c171654 Author: Linus Torvalds Date: Fri May 18 10:12:30 2018 -0700 Merge tag 'usb-4.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some USB driver fixes fro 4.17-rc6. They resolve some reported bugs in the musb driver, the xhci driver, and a number of small fixes for the usbip driver. All of these have been in linux-next with no reported issues" * tag 'usb-4.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usbip: usbip_host: fix bad unlock balance during stub_probe() usbip: usbip_host: fix NULL-ptr deref and use-after-free errors usbip: usbip_host: run rebind from exit when module is removed usbip: usbip_host: delete device from busid_table after rebind usbip: usbip_host: refine probe and disconnect debug msgs to be useful usb: musb: fix remote wakeup racing with suspend xhci: Fix USB3 NULL pointer dereference at logical disconnect. commit 61c2ad9a2e223962735b6ff6a5de85f1adcc892b Merge: 8ccaecd 1c1a2ee Author: Linus Torvalds Date: Fri May 18 10:10:43 2018 -0700 Merge tag 'for-linus-20180518' of git://git.kernel.dk/linux-block Pull block fix from Jens Axboe: "Single fix this time, from Coly, fixing a failure case when CONFIG_DEBUGFS isn't enabled" * tag 'for-linus-20180518' of git://git.kernel.dk/linux-block: bcache: return 0 from bch_debug_init() if CONFIG_DEBUG_FS=n commit 8ccaecd014bcb52cd6651fb8be15dca6e6b9e04f Merge: 163ced6 bc519d9 Author: Linus Torvalds Date: Fri May 18 10:09:20 2018 -0700 Merge tag 'spi-fix-v4.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A small collection of fixes accumilated since the merge window, all fairly small and driver specific" * tag 'spi-fix-v4.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: bcm2835aux: ensure interrupts are enabled for shared handler spi: bcm-qspi: Always read and set BSPI_MAST_N_BOOT_CTRL spi: bcm-qspi: Avoid setting MSPI_CDRAM_PCS for spi-nor master spi: pxa2xx: Allow 64-bit DMA spi: cadence: Add usleep_range() for cdns_spi_fill_tx_fifo() spi: sh-msiof: Fix bit field overflow writes to TSCR/RSCR spi: imx: Update MODULE_DESCRIPTION to "SPI Controller driver" commit 163ced613c37a504f8ed94676fd21c85183d8e8c Merge: d90eb18 9f825e7 Author: Linus Torvalds Date: Fri May 18 09:58:29 2018 -0700 Merge tag 'mtd/fixes-for-4.17-rc6' of git://git.infradead.org/linux-mtd Pull mtd fixes from Boris Brezillon: "NAND fixes: - Fix read path of the Marvell NAND driver - Make sure we don't pass a u64 to ndelay() CFI fix: - Fix the map_word_andequal() implementation" * tag 'mtd/fixes-for-4.17-rc6' of git://git.infradead.org/linux-mtd: mtd: rawnand: Fix return type of __DIVIDE() when called with 32-bit mtd: rawnand: marvell: Fix read logic for layouts with ->nchunks > 2 mtd: Fix comparison in map_word_andequal() commit d90eb183e3d1ee82563a5f46db7ddfd73dbfbff9 Merge: 3acf4e3 1827cad Author: Linus Torvalds Date: Fri May 18 09:24:52 2018 -0700 Merge tag 'drm-fixes-for-v4.17-rc6' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Pretty quiet week again: one vmwgfx regression fix, one core buffer overflow fix, one vc4 leak fix and three i915 fixes" * tag 'drm-fixes-for-v4.17-rc6' of git://people.freedesktop.org/~airlied/linux: drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl() drm/i915/gen9: Add WaClearHIZ_WM_CHICKEN3 for bxt and glk drm/vmwgfx: Set dmabuf_size when vmw_dmabuf_init is successful drm/vc4: Fix leak of the file_priv that stored the perfmon. drm/i915/execlists: Use rmb() to order CSB reads drm/i915/userptr: reject zero user_size drm: Match sysfs name in link removal to link creation commit 5447d78623da2eded06d4cd9469d1a71eba43bc4 Author: Florian Fainelli Date: Thu May 17 16:55:39 2018 -0700 net: dsa: Do not register devlink for unused ports Even if commit 1d27732f411d ("net: dsa: setup and teardown ports") indicated that registering a devlink instance for unused ports is not a problem, and this is true, this can be confusing nonetheless, so let's not do it. Fixes: 1d27732f411d ("net: dsa: setup and teardown ports") Reported-by: Jiri Pirko Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 6358d49ac23995fdfe157cc8747ab0f274d3954b Author: Amritha Nambiar Date: Thu May 17 14:50:44 2018 -0700 net: Fix a bug in removing queues from XPS map While removing queues from the XPS map, the individual CPU ID alone was used to index the CPUs map, this should be changed to also factor in the traffic class mapping for the CPU-to-queue lookup. Fixes: 184c449f91fe ("net: Add support for XPS with QoS via traffic classes") Signed-off-by: Amritha Nambiar Acked-by: Alexander Duyck Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a45b599ad808c3c982fdcdc12b0b8611c2f92824 Author: Alexander Potapenko Date: Fri May 18 16:23:18 2018 +0200 scsi: sg: allocate with __GFP_ZERO in sg_build_indirect() This shall help avoid copying uninitialized memory to the userspace when calling ioctl(fd, SG_IO) with an empty command. Reported-by: syzbot+7d26fc1eea198488deab@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Alexander Potapenko Acked-by: Douglas Gilbert Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a922814ccfed70d35a725f47c0bf12b50fd223c Author: Helge Deller Date: Fri May 18 16:16:34 2018 +0200 parisc: Move ccio_cujo20_fixup() into init section ccio_cujo20_fixup() is called by dino_probe() only, which is in init section already. Signed-off-by: Helge Deller drivers/parisc/ccio-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01f56832cfb6fcc204e7203f46841b6185ebd574 Author: Helge Deller Date: Fri May 18 16:12:12 2018 +0200 parisc: Move setup_profiling_timer() out of init section No other architecture has setup_profiling_timer() in the init section, thus on parisc we face this section mismatch warning: Reference from the function devm_device_add_group() to the function .init.text:setup_profiling_timer() Signed-off-by: Helge Deller arch/parisc/kernel/smp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3faf5246f0cd2c1fe82a2c4ba5ad857fa6941909 Author: Helge Deller Date: Fri May 18 16:08:10 2018 +0200 parisc: Move find_pa_parent_type() out of init section The 0-DAY kernel test infrastructure reported that inet_put_port() may reference the find_pa_parent_type() function, so it can't be moved into the init section. Fixes: b86db40e1ecc ("parisc: Move various functions and strings to init section") Signed-off-by: Helge Deller arch/parisc/kernel/drivers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 240da953fcc6a9008c92fae5b1f727ee5ed167ab Author: Konrad Rzeszutek Wilk Date: Wed May 16 23:18:09 2018 -0400 x86/bugs: Rename SSBD_NO to SSB_NO The "336996 Speculative Execution Side Channel Mitigations" from May defines this as SSB_NO, hence lets sync-up. Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner arch/x86/include/asm/msr-index.h | 2 +- arch/x86/kernel/cpu/common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1d6741d86429a294f51f2773c751c8f7662e7ca2 Author: Bob Copeland Date: Thu May 17 09:09:28 2018 -0400 mac80211: mesh: fix premature update of rc stats The mesh_neighbour_update() function, queued via beacon rx, can race with userspace creating the same station. If the station already exists by the time mesh_neighbour_update() is called, the function wrongly assumes rate control has been initialized and calls rate_control_rate_update(), which in turn calls into the driver. Updating the rate control before it has been initialized can cause a crash in some drivers, for example this firmware crash in ath10k due to sta->rx_nss being 0: [ 3078.088247] mesh0: Inserted STA 5c:e2:8c:f1:ab:ba [ 3078.258407] ath10k_pci 0000:0d:00.0: firmware crashed! (uuid d6ed5961-93cc-4d61-803f-5eda55bb8643) [ 3078.258421] ath10k_pci 0000:0d:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000 [ 3078.258426] ath10k_pci 0000:0d:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 0 testmode 0 [ 3078.258608] ath10k_pci 0000:0d:00.0: firmware ver 10.2.4.70.59-2 api 5 features no-p2p,raw-mode,mfp crc32 4159f498 [ 3078.258613] ath10k_pci 0000:0d:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08 [ 3078.258617] ath10k_pci 0000:0d:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1 [ 3078.260627] ath10k_pci 0000:0d:00.0: firmware register dump: [ 3078.260640] ath10k_pci 0000:0d:00.0: [00]: 0x4100016C 0x000015B3 0x009A31BB 0x00955B31 [ 3078.260647] ath10k_pci 0000:0d:00.0: [04]: 0x009A31BB 0x00060130 0x00000008 0x00000007 [ 3078.260652] ath10k_pci 0000:0d:00.0: [08]: 0x00000000 0x00955B31 0x00000000 0x0040F89E [ 3078.260656] ath10k_pci 0000:0d:00.0: [12]: 0x00000009 0xFFFFFFFF 0x009580F5 0x00958117 [ 3078.260660] ath10k_pci 0000:0d:00.0: [16]: 0x00958080 0x0094085D 0x00000000 0x00000000 [ 3078.260664] ath10k_pci 0000:0d:00.0: [20]: 0x409A31BB 0x0040AA84 0x00000002 0x00000001 [ 3078.260669] ath10k_pci 0000:0d:00.0: [24]: 0x809A2B8D 0x0040AAE4 0x00000088 0xC09A31BB [ 3078.260673] ath10k_pci 0000:0d:00.0: [28]: 0x809898C8 0x0040AB04 0x0043F91C 0x009C6458 [ 3078.260677] ath10k_pci 0000:0d:00.0: [32]: 0x809B66AC 0x0040AB34 0x009C6458 0x0043F91C [ 3078.260686] ath10k_pci 0000:0d:00.0: [36]: 0x809B2824 0x0040ADA4 0x00400000 0x00416EB4 [ 3078.260692] ath10k_pci 0000:0d:00.0: [40]: 0x809C07D9 0x0040ADE4 0x0040AE08 0x00412028 [ 3078.260696] ath10k_pci 0000:0d:00.0: [44]: 0x809486FA 0x0040AE04 0x00000001 0x00000000 [ 3078.260700] ath10k_pci 0000:0d:00.0: [48]: 0x80948E2C 0x0040AEA4 0x0041F4F0 0x00412634 [ 3078.260704] ath10k_pci 0000:0d:00.0: [52]: 0x809BFC39 0x0040AEC4 0x0041F4F0 0x00000001 [ 3078.260709] ath10k_pci 0000:0d:00.0: [56]: 0x80940F18 0x0040AF14 0x00000010 0x00403AC0 [ 3078.284130] ath10k_pci 0000:0d:00.0: failed to to request monitor vdev 1 stop: -108 Fix this by checking whether the sta has already initialized rate control using the flag for that purpose. We can also drop the unnecessary insert parameter here. Signed-off-by: Bob Copeland Signed-off-by: Johannes Berg net/mac80211/mesh_plink.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1039d08100e58f016a814347baadb77bf8dd21ab Author: Dedy Lansky Date: Thu May 17 16:25:03 2018 +0300 nl80211: fix nlmsg allocation in cfg80211_ft_event Allocation size of nlmsg in cfg80211_ft_event is based on ric_ies_len and doesn't take into account ies_len. This leads to NL80211_CMD_FT_EVENT message construction failure in case ft_event contains large enough ies buffer. Add ies_len to the nlmsg allocation size. Signed-off-by: Dedy Lansky Signed-off-by: Johannes Berg net/wireless/nl80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 814596495dd2b9d4aab92d8f89cf19060d25d2ea Author: Eric Biggers Date: Mon May 14 20:09:24 2018 -0700 cfg80211: further limit wiphy names to 64 bytes wiphy names were recently limited to 128 bytes by commit a7cfebcb7594 ("cfg80211: limit wiphy names to 128 bytes"). As it turns out though, this isn't sufficient because dev_vprintk_emit() needs the syslog header string "SUBSYSTEM=ieee80211\0DEVICE=+ieee80211:$devname" to fit into 128 bytes. This triggered the "device/subsystem name too long" WARN when the device name was >= 90 bytes. As before, this was reproduced by syzbot by sending an HWSIM_CMD_NEW_RADIO command to the MAC80211_HWSIM generic netlink family. Fix it by further limiting wiphy names to 64 bytes. Reported-by: syzbot+e64565577af34b3768dc@syzkaller.appspotmail.com Fixes: a7cfebcb7594 ("cfg80211: limit wiphy names to 128 bytes") Signed-off-by: Eric Biggers Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd33d8803bfa3f5e6e5d7a4bb03fc8cc32c40fb6 Author: Sebastian Andrzej Siewior Date: Tue May 15 18:53:28 2018 +0200 sched/fair: Fix documentation file path The 'tip' prefix probably referred to the -tip tree and is not required, remove it. Signed-off-by: Sebastian Andrzej Siewior Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Paul Turner Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180515165328.24899-1-bigeasy@linutronix.de Signed-off-by: Ingo Molnar init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3febfc8a219a036633b57a34c6678e21b6a0580d Author: Mathieu Malaterre Date: Wed May 16 22:09:02 2018 +0200 sched/deadline: Make the grub_reclaim() function static Since the grub_reclaim() function can be made static, make it so. Silences the following GCC warning (W=1): kernel/sched/deadline.c:1120:5: warning: no previous prototype for ‘grub_reclaim’ [-Wmissing-prototypes] Signed-off-by: Mathieu Malaterre Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180516200902.959-1-malat@debian.org Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6a3463063f42d9fb2c78f386437a822e0ad1792 Author: Mathieu Malaterre Date: Wed May 16 21:53:47 2018 +0200 sched/debug: Move the print_rt_rq() and print_dl_rq() declarations to kernel/sched/sched.h In the following commit: 6b55c9654fcc ("sched/debug: Move print_cfs_rq() declaration to kernel/sched/sched.h") the print_cfs_rq() prototype was added to , right next to the prototypes for print_cfs_stats(), print_rt_stats() and print_dl_stats(). Finish this previous commit and also move related prototypes for print_rt_rq() and print_dl_rq(). Remove existing extern declarations now that they not needed anymore. Silences the following GCC warning, triggered by W=1: kernel/sched/debug.c:573:6: warning: no previous prototype for ‘print_rt_rq’ [-Wmissing-prototypes] kernel/sched/debug.c:603:6: warning: no previous prototype for ‘print_dl_rq’ [-Wmissing-prototypes] Signed-off-by: Mathieu Malaterre Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Srikar Dronamraju Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180516195348.30426-1-malat@debian.org Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 2 -- kernel/sched/rt.c | 2 -- kernel/sched/sched.h | 5 +++-- 3 files changed, 3 insertions(+), 6 deletions(-) commit 3ae180972564846e6d794e3615e1ab0a1e6c4ef9 Author: Ben Hutchings Date: Thu May 17 22:34:39 2018 +0100 ALSA: timer: Fix pause event notification Commit f65e0d299807 ("ALSA: timer: Call notifier in the same spinlock") combined the start/continue and stop/pause functions, and in doing so changed the event code for the pause case to SNDRV_TIMER_EVENT_CONTINUE. Change it back to SNDRV_TIMER_EVENT_PAUSE. Fixes: f65e0d299807 ("ALSA: timer: Call notifier in the same spinlock") Signed-off-by: Ben Hutchings Cc: stable@vger.kernel.org Signed-off-by: Takashi Iwai sound/core/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit faf37c44a105f3608115785f17cbbf3500f8bc71 Author: Michael Neuling Date: Fri May 18 11:37:42 2018 +1000 powerpc/64s: Clear PCR on boot Clear the PCR (Processor Compatibility Register) on boot to ensure we are not running in a compatibility mode. We've seen this cause problems when a crash (and kdump) occurs while running compat mode guests. The kdump kernel then runs with the PCR set and causes problems. The symptom in the kdump kernel (also seen in petitboot after fast-reboot) is early userspace programs taking sigills on newer instructions (seen in libc). Signed-off-by: Michael Neuling Cc: stable@vger.kernel.org Signed-off-by: Michael Ellerman arch/powerpc/kernel/cpu_setup_power.S | 6 ++++++ arch/powerpc/kernel/dt_cpu_ftrs.c | 1 + 2 files changed, 7 insertions(+) commit d8de7565735af5a95057c83eedb38e36cfaa04b5 Author: Philipp Rudo Date: Wed May 16 14:06:32 2018 +0200 s390/purgatory: Fix endless interrupt loop New compilers use the floating-point registers as spill registers when there is high register pressure. In the purgatory however, the afp control bit is not set. This leads to an exception whenever a floating-point instruction is used, which again causes an interrupt loop. Forbid the compiler to use floating-point instructions by adding -msoft-float to KBUILD_CFLAGS. Signed-off-by: Philipp Rudo Fixes: 840798a1f529 (s390/kexec_file: Add purgatory) Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/purgatory/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6caf9fb3bda17df59de4ed6ed4950c43ca1361e3 Merge: 113f99c 050fad7 Author: David S. Miller Date: Thu May 17 23:33:52 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-05-18 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix two bugs in sockmap, a use after free in sockmap's error path from sock_map_ctx_update_elem() where we mistakenly drop a reference we didn't take prior to that, and in the same function fix a race in bpf_prog_inc_not_zero() where we didn't use the progs from prior READ_ONCE(), from John. 2) Reject program expansions once we figure out that their jump target which crosses patchlet boundaries could otherwise get truncated in insn->off space, from Daniel. 3) Check the return value of fopen() in BPF selftest's test_verifier where we determine whether unpriv BPF is disabled, and iff we do fail there then just assume it is disabled. This fixes a segfault when used with older kernels, from Jesper. ==================== Signed-off-by: David S. Miller commit 1827cad96d624ec127853a71cb931c74024e57d6 Merge: bc91d18 b579f92 Author: Dave Airlie Date: Fri May 18 12:01:49 2018 +1000 Merge tag 'drm-intel-fixes-2018-05-17' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Userptr IOCTL zero size check (Matt) - Two hardware quirk fixes (Michel & Chris) * tag 'drm-intel-fixes-2018-05-17' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915/gen9: Add WaClearHIZ_WM_CHICKEN3 for bxt and glk drm/i915/execlists: Use rmb() to order CSB reads drm/i915/userptr: reject zero user_size commit 050fad7c4534c13c8eb1d9c2ba66012e014773cb Author: Daniel Borkmann Date: Thu May 17 01:44:11 2018 +0200 bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_verifier Tainted: G W 4.17.0-rc3+ #7 [ 207.974956] Hardware name: FOXCONN R2-1221R-A4/C2U4N_MB, BIOS G31FB18A 03/31/2017 [ 207.982428] pstate: 60400005 (nZCv daif +PAN -UAO) [ 207.987214] pc : bpf_skb_load_helper_8_no_cache+0x34/0xc0 [ 207.992603] lr : 0xffff000000bdb754 [ 207.996080] sp : ffff000013703ca0 [ 207.999384] x29: ffff000013703ca0 x28: 0000000000000001 [ 208.004688] x27: 0000000000000001 x26: 0000000000000000 [ 208.009992] x25: ffff000013703ce0 x24: ffff800fb4afcb00 [ 208.015295] x23: ffff00007d2f5038 x22: ffff00007d2f5000 [ 208.020599] x21: fffffffffeff2a6f x20: 000000000000000a [ 208.025903] x19: ffff000009578000 x18: 0000000000000a03 [ 208.031206] x17: 0000000000000000 x16: 0000000000000000 [ 208.036510] x15: 0000ffff9de83000 x14: 0000000000000000 [ 208.041813] x13: 0000000000000000 x12: 0000000000000000 [ 208.047116] x11: 0000000000000001 x10: ffff0000089e7f18 [ 208.052419] x9 : fffffffffeff2a6f x8 : 0000000000000000 [ 208.057723] x7 : 000000000000000a x6 : 00280c6160000000 [ 208.063026] x5 : 0000000000000018 x4 : 0000000000007db6 [ 208.068329] x3 : 000000000008647a x2 : 19868179b1484500 [ 208.073632] x1 : 0000000000000000 x0 : ffff000009578c08 [ 208.078938] Process test_verifier (pid: 2256, stack limit = 0x0000000049ca7974) [ 208.086235] Call trace: [ 208.088672] bpf_skb_load_helper_8_no_cache+0x34/0xc0 [ 208.093713] 0xffff000000bdb754 [ 208.096845] bpf_test_run+0x78/0xf8 [ 208.100324] bpf_prog_test_run_skb+0x148/0x230 [ 208.104758] sys_bpf+0x314/0x1198 [ 208.108064] el0_svc_naked+0x30/0x34 [ 208.111632] Code: 91302260 f9400001 f9001fa1 d2800001 (29500680) [ 208.117717] ---[ end trace 263cb8a59b5bf29f ]--- The program itself which caused this had a long jump over the whole instruction sequence where all of the inner instructions required heavy expansions into multiple BPF instructions. Additionally, I also had BPF hardening enabled which requires once more rewrites of all constant values in order to blind them. Each time we rewrite insns, bpf_adj_branches() would need to potentially adjust branch targets which cross the patchlet boundary to accommodate for the additional delta. Eventually that lead to the case where the target offset could not fit into insn->off's upper 0x7fff limit anymore where then offset wraps around becoming negative (in s16 universe), or vice versa depending on the jump direction. Therefore it becomes necessary to detect and reject any such occasions in a generic way for native eBPF and cBPF to eBPF migrations. For the latter we can simply check bounds in the bpf_convert_filter()'s BPF_EMIT_JMP helper macro and bail out once we surpass limits. The bpf_patch_insn_single() for native eBPF (and cBPF to eBPF in case of subsequent hardening) is a bit more complex in that we need to detect such truncations before hitting the bpf_prog_realloc(). Thus the latter is split into an extra pass to probe problematic offsets on the original program in order to fail early. With that in place and carefully tested I no longer hit the panic and the rewrites are rejected properly. The above example panic I've seen on bpf-next, though the issue itself is generic in that a guard against this issue in bpf seems more appropriate in this case. Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov kernel/bpf/core.c | 100 ++++++++++++++++++++++++++++++++++++++++-------------- net/core/filter.c | 11 ++++-- 2 files changed, 84 insertions(+), 27 deletions(-) commit 3acf4e395260e3bd30a6fa29ba7eada4bf7566ca Merge: 58ddfe6 3b03162 Author: Linus Torvalds Date: Thu May 17 15:58:12 2018 -0700 Merge tag 'hwmon-for-linus-v4.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "Two k10temp fixes: - fix race condition when accessing System Management Network registers - fix reading critical temperatures on F15h M60h and M70h Also add PCI ID's for the AMD Raven Ridge root bridge" * tag 'hwmon-for-linus-v4.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (k10temp) Use API function to access System Management Network x86/amd_nb: Add support for Raven Ridge CPUs hwmon: (k10temp) Fix reading critical temperature register commit 9617456054a6160f5e11e892b713fade78aea2e9 Author: John Fastabend Date: Thu May 17 14:06:40 2018 -0700 bpf: parse and verdict prog attach may race with bpf map update In the sockmap design BPF programs (SK_SKB_STREAM_PARSER, SK_SKB_STREAM_VERDICT and SK_MSG_VERDICT) are attached to the sockmap map type and when a sock is added to the map the programs are used by the socket. However, sockmap updates from both userspace and BPF programs can happen concurrently with the attach and detach of these programs. To resolve this we use the bpf_prog_inc_not_zero and a READ_ONCE() primitive to ensure the program pointer is not refeched and possibly NULL'd before the refcnt increment. This happens inside a RCU critical section so although the pointer reference in the map object may be NULL (by a concurrent detach operation) the reference from READ_ONCE will not be free'd until after grace period. This ensures the object returned by READ_ONCE() is valid through the RCU criticl section and safe to use as long as we "know" it may be free'd shortly. Daniel spotted a case in the sock update API where instead of using the READ_ONCE() program reference we used the pointer from the original map, stab->bpf_{verdict|parse|txmsg}. The problem with this is the logic checks the object returned from the READ_ONCE() is not NULL and then tries to reference the object again but using the above map pointer, which may have already been NULL'd by a parallel detach operation. If this happened bpf_porg_inc_not_zero could dereference a NULL pointer. Fix this by using variable returned by READ_ONCE() that is checked for NULL. Fixes: 2f857d04601a ("bpf: sockmap, remove STRPARSER map_flags and add multi-map support") Reported-by: Daniel Borkmann Signed-off-by: John Fastabend Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann kernel/bpf/sockmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a593f70831b68740fb7db69e0556ca72dac8c7a8 Author: John Fastabend Date: Thu May 17 14:06:35 2018 -0700 bpf: sockmap update rollback on error can incorrectly dec prog refcnt If the user were to only attach one of the parse or verdict programs then it is possible a subsequent sockmap update could incorrectly decrement the refcnt on the program. This happens because in the rollback logic, after an error, we have to decrement the program reference count when its been incremented. However, we only increment the program reference count if the user has both a verdict and a parse program. The reason for this is because, at least at the moment, both are required for any one to be meaningful. The problem fixed here is in the rollback path we decrement the program refcnt even if only one existing. But we never incremented the refcnt in the first place creating an imbalance. This patch fixes the error path to handle this case. Fixes: 2f857d04601a ("bpf: sockmap, remove STRPARSER map_flags and add multi-map support") Reported-by: Daniel Borkmann Signed-off-by: John Fastabend Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann kernel/bpf/sockmap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 113f99c3358564a0647d444c2ae34e8b1abfd5b9 Author: Willem de Bruijn Date: Thu May 17 13:13:29 2018 -0400 net: test tailroom before appending to linear skb Device features may change during transmission. In particular with corking, a device may toggle scatter-gather in between allocating and writing to an skb. Do not unconditionally assume that !NETIF_F_SG at write time implies that the same held at alloc time and thus the skb has sufficient tailroom. This issue predates git history. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Eric Dumazet Signed-off-by: Willem de Bruijn Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ip_output.c | 3 ++- net/ipv6/ip6_output.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 374edea4aaedb92964d35f68318c094b6d5c0f63 Merge: 02f99df 2d66503 Author: David S. Miller Date: Thu May 17 16:50:20 2018 -0400 Merge branch 'ip6_gre-Fixes-in-headroom-handling' Petr Machata says: ==================== net: ip6_gre: Fixes in headroom handling This series mends some problems in headroom management in ip6_gre module. The current code base has the following three closely-related problems: - ip6gretap tunnels neglect to ensure there's enough writable headroom before pushing GRE headers. - ip6erspan does this, but assumes that dev->needed_headroom is primed. But that doesn't happen until ip6_tnl_xmit() is called later. Thus for the first packet, ip6erspan actually behaves like ip6gretap above. - ip6erspan shares some of the code with ip6gretap, including calculations of needed header length. While there is custom ERSPAN-specific code for calculating the headroom, the computed values are overwritten by the ip6gretap code. The first two issues lead to a kernel panic in situations where a packet is mirrored from a veth device to the device in question. They are fixed, respectively, in patches #1 and #2, which include the full panic trace and a reproducer. The rest of the patchset deals with the last issue. In patches #3 to #6, several functions are split up into reusable parts. Finally in patch #7 these blocks are used to compose ERSPAN-specific callbacks where necessary to fix the hlen calculation. ==================== Signed-off-by: David S. Miller commit 2d665034f239412927b1e71329f20f001c92da09 Author: Petr Machata Date: Thu May 17 16:36:51 2018 +0200 net: ip6_gre: Fix ip6erspan hlen calculation Even though ip6erspan_tap_init() sets up hlen and tun_hlen according to what ERSPAN needs, it goes ahead to call ip6gre_tnl_link_config() which overwrites these settings with GRE-specific ones. Similarly for changelink callbacks, which are handled by ip6gre_changelink() calls ip6gre_tnl_change() calls ip6gre_tnl_link_config() as well. The difference ends up being 12 vs. 20 bytes, and this is generally not a problem, because a 12-byte request likely ends up allocating more and the extra 8 bytes are thus available. However correct it is not. So replace the newlink and changelink callbacks with an ERSPAN-specific ones, reusing the newly-introduced _common() functions. Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support") Signed-off-by: Petr Machata Acked-by: William Tu Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 65 insertions(+), 9 deletions(-) commit c8632fc30bb03aa0c3bd7bcce85355a10feb8149 Author: Petr Machata Date: Thu May 17 16:36:45 2018 +0200 net: ip6_gre: Split up ip6gre_changelink() Extract from ip6gre_changelink() a reusable function ip6gre_changelink_common(). This will allow introduction of ERSPAN-specific _changelink() function with not a lot of code duplication. Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support") Signed-off-by: Petr Machata Acked-by: William Tu Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit 7fa38a7c852ec99e3a7fc375eb2c21c50c2e46b8 Author: Petr Machata Date: Thu May 17 16:36:39 2018 +0200 net: ip6_gre: Split up ip6gre_newlink() Extract from ip6gre_newlink() a reusable function ip6gre_newlink_common(). The ip6gre_tnl_link_config() call needs to be made customizable for ERSPAN, thus reorder it with calls to ip6_tnl_change_mtu() and dev_hold(), and extract the whole tail to the caller, ip6gre_newlink(). Thus enable an ERSPAN-specific _newlink() function without a lot of duplicity. Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support") Signed-off-by: Petr Machata Acked-by: William Tu Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit a6465350ef495f5cbd76a3e505d25a01d648477e Author: Petr Machata Date: Thu May 17 16:36:33 2018 +0200 net: ip6_gre: Split up ip6gre_tnl_change() Split a reusable function ip6gre_tnl_copy_tnl_parm() from ip6gre_tnl_change(). This will allow ERSPAN-specific code to reuse the common parts while customizing the behavior for ERSPAN. Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support") Signed-off-by: Petr Machata Acked-by: William Tu Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit a483373ead61e6079bc8ebe27e2dfdb2e3c1559f Author: Petr Machata Date: Thu May 17 16:36:27 2018 +0200 net: ip6_gre: Split up ip6gre_tnl_link_config() The function ip6gre_tnl_link_config() is used for setting up configuration of both ip6gretap and ip6erspan tunnels. Split the function into the common part and the route-lookup part. The latter then takes the calculated header length as an argument. This split will allow the patches down the line to sneak in a custom header length computation for the ERSPAN tunnel. Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support") Signed-off-by: Petr Machata Acked-by: William Tu Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) commit 5691484df961aff897d824bcc26cd1a2aa036b5b Author: Petr Machata Date: Thu May 17 16:36:15 2018 +0200 net: ip6_gre: Fix headroom request in ip6erspan_tunnel_xmit() dev->needed_headroom is not primed until ip6_tnl_xmit(), so it starts out zero. Thus the call to skb_cow_head() fails to actually make sure there's enough headroom to push the ERSPAN headers to. That can lead to the panic cited below. (Reproducer below that). Fix by requesting either needed_headroom if already primed, or just the bare minimum needed for the header otherwise. [ 190.703567] kernel BUG at net/core/skbuff.c:104! [ 190.708384] invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI [ 190.714007] Modules linked in: act_mirred cls_matchall ip6_gre ip6_tunnel tunnel6 gre sch_ingress vrf veth x86_pkg_temp_thermal mlx_platform nfsd e1000e leds_mlxcpld [ 190.728975] CPU: 1 PID: 959 Comm: kworker/1:2 Not tainted 4.17.0-rc4-net_master-custom-139 #10 [ 190.737647] Hardware name: Mellanox Technologies Ltd. "MSN2410-CB2F"/"SA000874", BIOS 4.6.5 03/08/2016 [ 190.747006] Workqueue: ipv6_addrconf addrconf_dad_work [ 190.752222] RIP: 0010:skb_panic+0xc3/0x100 [ 190.756358] RSP: 0018:ffff8801d54072f0 EFLAGS: 00010282 [ 190.761629] RAX: 0000000000000085 RBX: ffff8801c1a8ecc0 RCX: 0000000000000000 [ 190.768830] RDX: 0000000000000085 RSI: dffffc0000000000 RDI: ffffed003aa80e54 [ 190.776025] RBP: ffff8801bd1ec5a0 R08: ffffed003aabce19 R09: ffffed003aabce19 [ 190.783226] R10: 0000000000000001 R11: ffffed003aabce18 R12: ffff8801bf695dbe [ 190.790418] R13: 0000000000000084 R14: 00000000000006c0 R15: ffff8801bf695dc8 [ 190.797621] FS: 0000000000000000(0000) GS:ffff8801d5400000(0000) knlGS:0000000000000000 [ 190.805786] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 190.811582] CR2: 000055fa929aced0 CR3: 0000000003228004 CR4: 00000000001606e0 [ 190.818790] Call Trace: [ 190.821264] [ 190.823314] ? ip6erspan_tunnel_xmit+0x5e4/0x1982 [ip6_gre] [ 190.828940] ? ip6erspan_tunnel_xmit+0x5e4/0x1982 [ip6_gre] [ 190.834562] skb_push+0x78/0x90 [ 190.837749] ip6erspan_tunnel_xmit+0x5e4/0x1982 [ip6_gre] [ 190.843219] ? ip6gre_tunnel_ioctl+0xd90/0xd90 [ip6_gre] [ 190.848577] ? debug_check_no_locks_freed+0x210/0x210 [ 190.853679] ? debug_check_no_locks_freed+0x210/0x210 [ 190.858783] ? print_irqtrace_events+0x120/0x120 [ 190.863451] ? sched_clock_cpu+0x18/0x210 [ 190.867496] ? cyc2ns_read_end+0x10/0x10 [ 190.871474] ? skb_network_protocol+0x76/0x200 [ 190.875977] dev_hard_start_xmit+0x137/0x770 [ 190.880317] ? do_raw_spin_trylock+0x6d/0xa0 [ 190.884624] sch_direct_xmit+0x2ef/0x5d0 [ 190.888589] ? pfifo_fast_dequeue+0x3fa/0x670 [ 190.892994] ? pfifo_fast_change_tx_queue_len+0x810/0x810 [ 190.898455] ? __lock_is_held+0xa0/0x160 [ 190.902422] __qdisc_run+0x39e/0xfc0 [ 190.906041] ? _raw_spin_unlock+0x29/0x40 [ 190.910090] ? pfifo_fast_enqueue+0x24b/0x3e0 [ 190.914501] ? sch_direct_xmit+0x5d0/0x5d0 [ 190.918658] ? pfifo_fast_dequeue+0x670/0x670 [ 190.923047] ? __dev_queue_xmit+0x172/0x1770 [ 190.927365] ? preempt_count_sub+0xf/0xd0 [ 190.931421] __dev_queue_xmit+0x410/0x1770 [ 190.935553] ? ___slab_alloc+0x605/0x930 [ 190.939524] ? print_irqtrace_events+0x120/0x120 [ 190.944186] ? memcpy+0x34/0x50 [ 190.947364] ? netdev_pick_tx+0x1c0/0x1c0 [ 190.951428] ? __skb_clone+0x2fd/0x3d0 [ 190.955218] ? __copy_skb_header+0x270/0x270 [ 190.959537] ? rcu_read_lock_sched_held+0x93/0xa0 [ 190.964282] ? kmem_cache_alloc+0x344/0x4d0 [ 190.968520] ? cyc2ns_read_end+0x10/0x10 [ 190.972495] ? skb_clone+0x123/0x230 [ 190.976112] ? skb_split+0x820/0x820 [ 190.979747] ? tcf_mirred+0x554/0x930 [act_mirred] [ 190.984582] tcf_mirred+0x554/0x930 [act_mirred] [ 190.989252] ? tcf_mirred_act_wants_ingress.part.2+0x10/0x10 [act_mirred] [ 190.996109] ? __lock_acquire+0x706/0x26e0 [ 191.000239] ? sched_clock_cpu+0x18/0x210 [ 191.004294] tcf_action_exec+0xcf/0x2a0 [ 191.008179] tcf_classify+0xfa/0x340 [ 191.011794] __netif_receive_skb_core+0x8e1/0x1c60 [ 191.016630] ? debug_check_no_locks_freed+0x210/0x210 [ 191.021732] ? nf_ingress+0x500/0x500 [ 191.025458] ? process_backlog+0x347/0x4b0 [ 191.029619] ? print_irqtrace_events+0x120/0x120 [ 191.034302] ? lock_acquire+0xd8/0x320 [ 191.038089] ? process_backlog+0x1b6/0x4b0 [ 191.042246] ? process_backlog+0xc2/0x4b0 [ 191.046303] process_backlog+0xc2/0x4b0 [ 191.050189] net_rx_action+0x5cc/0x980 [ 191.053991] ? napi_complete_done+0x2c0/0x2c0 [ 191.058386] ? mark_lock+0x13d/0xb40 [ 191.062001] ? clockevents_program_event+0x6b/0x1d0 [ 191.066922] ? print_irqtrace_events+0x120/0x120 [ 191.071593] ? __lock_is_held+0xa0/0x160 [ 191.075566] __do_softirq+0x1d4/0x9d2 [ 191.079282] ? ip6_finish_output2+0x524/0x1460 [ 191.083771] do_softirq_own_stack+0x2a/0x40 [ 191.087994] [ 191.090130] do_softirq.part.13+0x38/0x40 [ 191.094178] __local_bh_enable_ip+0x135/0x190 [ 191.098591] ip6_finish_output2+0x54d/0x1460 [ 191.102916] ? ip6_forward_finish+0x2f0/0x2f0 [ 191.107314] ? ip6_mtu+0x3c/0x2c0 [ 191.110674] ? ip6_finish_output+0x2f8/0x650 [ 191.114992] ? ip6_output+0x12a/0x500 [ 191.118696] ip6_output+0x12a/0x500 [ 191.122223] ? ip6_route_dev_notify+0x5b0/0x5b0 [ 191.126807] ? ip6_finish_output+0x650/0x650 [ 191.131120] ? ip6_fragment+0x1a60/0x1a60 [ 191.135182] ? icmp6_dst_alloc+0x26e/0x470 [ 191.139317] mld_sendpack+0x672/0x830 [ 191.143021] ? igmp6_mcf_seq_next+0x2f0/0x2f0 [ 191.147429] ? __local_bh_enable_ip+0x77/0x190 [ 191.151913] ipv6_mc_dad_complete+0x47/0x90 [ 191.156144] addrconf_dad_completed+0x561/0x720 [ 191.160731] ? addrconf_rs_timer+0x3a0/0x3a0 [ 191.165036] ? mark_held_locks+0xc9/0x140 [ 191.169095] ? __local_bh_enable_ip+0x77/0x190 [ 191.173570] ? addrconf_dad_work+0x50d/0xa20 [ 191.177886] ? addrconf_dad_work+0x529/0xa20 [ 191.182194] addrconf_dad_work+0x529/0xa20 [ 191.186342] ? addrconf_dad_completed+0x720/0x720 [ 191.191088] ? __lock_is_held+0xa0/0x160 [ 191.195059] ? process_one_work+0x45d/0xe20 [ 191.199302] ? process_one_work+0x51e/0xe20 [ 191.203531] ? rcu_read_lock_sched_held+0x93/0xa0 [ 191.208279] process_one_work+0x51e/0xe20 [ 191.212340] ? pwq_dec_nr_in_flight+0x200/0x200 [ 191.216912] ? get_lock_stats+0x4b/0xf0 [ 191.220788] ? preempt_count_sub+0xf/0xd0 [ 191.224844] ? worker_thread+0x219/0x860 [ 191.228823] ? do_raw_spin_trylock+0x6d/0xa0 [ 191.233142] worker_thread+0xeb/0x860 [ 191.236848] ? process_one_work+0xe20/0xe20 [ 191.241095] kthread+0x206/0x300 [ 191.244352] ? process_one_work+0xe20/0xe20 [ 191.248587] ? kthread_stop+0x570/0x570 [ 191.252459] ret_from_fork+0x3a/0x50 [ 191.256082] Code: 14 3e ff 8b 4b 78 55 4d 89 f9 41 56 41 55 48 c7 c7 a0 cf db 82 41 54 44 8b 44 24 2c 48 8b 54 24 30 48 8b 74 24 20 e8 16 94 13 ff <0f> 0b 48 c7 c7 60 8e 1f 85 48 83 c4 20 e8 55 ef a6 ff 89 74 24 [ 191.275327] RIP: skb_panic+0xc3/0x100 RSP: ffff8801d54072f0 [ 191.281024] ---[ end trace 7ea51094e099e006 ]--- [ 191.285724] Kernel panic - not syncing: Fatal exception in interrupt [ 191.292168] Kernel Offset: disabled [ 191.295697] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]--- Reproducer: ip link add h1 type veth peer name swp1 ip link add h3 type veth peer name swp3 ip link set dev h1 up ip address add 192.0.2.1/28 dev h1 ip link add dev vh3 type vrf table 20 ip link set dev h3 master vh3 ip link set dev vh3 up ip link set dev h3 up ip link set dev swp3 up ip address add dev swp3 2001:db8:2::1/64 ip link set dev swp1 up tc qdisc add dev swp1 clsact ip link add name gt6 type ip6erspan \ local 2001:db8:2::1 remote 2001:db8:2::2 oseq okey 123 ip link set dev gt6 up sleep 1 tc filter add dev swp1 ingress pref 1000 matchall skip_hw \ action mirred egress mirror dev gt6 ping -I h1 192.0.2.2 Fixes: e41c7c68ea77 ("ip6erspan: make sure enough headroom at xmit.") Signed-off-by: Petr Machata Acked-by: William Tu Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01b8d064d58b4c1f0eff47f8fe8a8508cb3b3840 Author: Petr Machata Date: Thu May 17 16:36:10 2018 +0200 net: ip6_gre: Request headroom in __gre6_xmit() __gre6_xmit() pushes GRE headers before handing over to ip6_tnl_xmit() for generic IP-in-IP processing. However it doesn't make sure that there is enough headroom to push the header to. That can lead to the panic cited below. (Reproducer below that). Fix by requesting either needed_headroom if already primed, or just the bare minimum needed for the header otherwise. [ 158.576725] kernel BUG at net/core/skbuff.c:104! [ 158.581510] invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI [ 158.587174] Modules linked in: act_mirred cls_matchall ip6_gre ip6_tunnel tunnel6 gre sch_ingress vrf veth x86_pkg_temp_thermal mlx_platform nfsd e1000e leds_mlxcpld [ 158.602268] CPU: 1 PID: 16 Comm: ksoftirqd/1 Not tainted 4.17.0-rc4-net_master-custom-139 #10 [ 158.610938] Hardware name: Mellanox Technologies Ltd. "MSN2410-CB2F"/"SA000874", BIOS 4.6.5 03/08/2016 [ 158.620426] RIP: 0010:skb_panic+0xc3/0x100 [ 158.624586] RSP: 0018:ffff8801d3f27110 EFLAGS: 00010286 [ 158.629882] RAX: 0000000000000082 RBX: ffff8801c02cc040 RCX: 0000000000000000 [ 158.637127] RDX: 0000000000000082 RSI: dffffc0000000000 RDI: ffffed003a7e4e18 [ 158.644366] RBP: ffff8801bfec8020 R08: ffffed003aabce19 R09: ffffed003aabce19 [ 158.651574] R10: 000000000000000b R11: ffffed003aabce18 R12: ffff8801c364de66 [ 158.658786] R13: 000000000000002c R14: 00000000000000c0 R15: ffff8801c364de68 [ 158.666007] FS: 0000000000000000(0000) GS:ffff8801d5400000(0000) knlGS:0000000000000000 [ 158.674212] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 158.680036] CR2: 00007f4b3702dcd0 CR3: 0000000003228002 CR4: 00000000001606e0 [ 158.687228] Call Trace: [ 158.689752] ? __gre6_xmit+0x246/0xd80 [ip6_gre] [ 158.694475] ? __gre6_xmit+0x246/0xd80 [ip6_gre] [ 158.699141] skb_push+0x78/0x90 [ 158.702344] __gre6_xmit+0x246/0xd80 [ip6_gre] [ 158.706872] ip6gre_tunnel_xmit+0x3bc/0x610 [ip6_gre] [ 158.711992] ? __gre6_xmit+0xd80/0xd80 [ip6_gre] [ 158.716668] ? debug_check_no_locks_freed+0x210/0x210 [ 158.721761] ? print_irqtrace_events+0x120/0x120 [ 158.726461] ? sched_clock_cpu+0x18/0x210 [ 158.730572] ? sched_clock_cpu+0x18/0x210 [ 158.734692] ? cyc2ns_read_end+0x10/0x10 [ 158.738705] ? skb_network_protocol+0x76/0x200 [ 158.743216] ? netif_skb_features+0x1b2/0x550 [ 158.747648] dev_hard_start_xmit+0x137/0x770 [ 158.752010] sch_direct_xmit+0x2ef/0x5d0 [ 158.755992] ? pfifo_fast_dequeue+0x3fa/0x670 [ 158.760460] ? pfifo_fast_change_tx_queue_len+0x810/0x810 [ 158.765975] ? __lock_is_held+0xa0/0x160 [ 158.770002] __qdisc_run+0x39e/0xfc0 [ 158.773673] ? _raw_spin_unlock+0x29/0x40 [ 158.777781] ? pfifo_fast_enqueue+0x24b/0x3e0 [ 158.782191] ? sch_direct_xmit+0x5d0/0x5d0 [ 158.786372] ? pfifo_fast_dequeue+0x670/0x670 [ 158.790818] ? __dev_queue_xmit+0x172/0x1770 [ 158.795195] ? preempt_count_sub+0xf/0xd0 [ 158.799313] __dev_queue_xmit+0x410/0x1770 [ 158.803512] ? ___slab_alloc+0x605/0x930 [ 158.807525] ? ___slab_alloc+0x605/0x930 [ 158.811540] ? memcpy+0x34/0x50 [ 158.814768] ? netdev_pick_tx+0x1c0/0x1c0 [ 158.818895] ? __skb_clone+0x2fd/0x3d0 [ 158.822712] ? __copy_skb_header+0x270/0x270 [ 158.827079] ? rcu_read_lock_sched_held+0x93/0xa0 [ 158.831903] ? kmem_cache_alloc+0x344/0x4d0 [ 158.836199] ? skb_clone+0x123/0x230 [ 158.839869] ? skb_split+0x820/0x820 [ 158.843521] ? tcf_mirred+0x554/0x930 [act_mirred] [ 158.848407] tcf_mirred+0x554/0x930 [act_mirred] [ 158.853104] ? tcf_mirred_act_wants_ingress.part.2+0x10/0x10 [act_mirred] [ 158.860005] ? __lock_acquire+0x706/0x26e0 [ 158.864162] ? mark_lock+0x13d/0xb40 [ 158.867832] tcf_action_exec+0xcf/0x2a0 [ 158.871736] tcf_classify+0xfa/0x340 [ 158.875402] __netif_receive_skb_core+0x8e1/0x1c60 [ 158.880334] ? nf_ingress+0x500/0x500 [ 158.884059] ? process_backlog+0x347/0x4b0 [ 158.888241] ? lock_acquire+0xd8/0x320 [ 158.892050] ? process_backlog+0x1b6/0x4b0 [ 158.896228] ? process_backlog+0xc2/0x4b0 [ 158.900291] process_backlog+0xc2/0x4b0 [ 158.904210] net_rx_action+0x5cc/0x980 [ 158.908047] ? napi_complete_done+0x2c0/0x2c0 [ 158.912525] ? rcu_read_unlock+0x80/0x80 [ 158.916534] ? __lock_is_held+0x34/0x160 [ 158.920541] __do_softirq+0x1d4/0x9d2 [ 158.924308] ? trace_event_raw_event_irq_handler_exit+0x140/0x140 [ 158.930515] run_ksoftirqd+0x1d/0x40 [ 158.934152] smpboot_thread_fn+0x32b/0x690 [ 158.938299] ? sort_range+0x20/0x20 [ 158.941842] ? preempt_count_sub+0xf/0xd0 [ 158.945940] ? schedule+0x5b/0x140 [ 158.949412] kthread+0x206/0x300 [ 158.952689] ? sort_range+0x20/0x20 [ 158.956249] ? kthread_stop+0x570/0x570 [ 158.960164] ret_from_fork+0x3a/0x50 [ 158.963823] Code: 14 3e ff 8b 4b 78 55 4d 89 f9 41 56 41 55 48 c7 c7 a0 cf db 82 41 54 44 8b 44 24 2c 48 8b 54 24 30 48 8b 74 24 20 e8 16 94 13 ff <0f> 0b 48 c7 c7 60 8e 1f 85 48 83 c4 20 e8 55 ef a6 ff 89 74 24 [ 158.983235] RIP: skb_panic+0xc3/0x100 RSP: ffff8801d3f27110 [ 158.988935] ---[ end trace 5af56ee845aa6cc8 ]--- [ 158.993641] Kernel panic - not syncing: Fatal exception in interrupt [ 159.000176] Kernel Offset: disabled [ 159.003767] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]--- Reproducer: ip link add h1 type veth peer name swp1 ip link add h3 type veth peer name swp3 ip link set dev h1 up ip address add 192.0.2.1/28 dev h1 ip link add dev vh3 type vrf table 20 ip link set dev h3 master vh3 ip link set dev vh3 up ip link set dev h3 up ip link set dev swp3 up ip address add dev swp3 2001:db8:2::1/64 ip link set dev swp1 up tc qdisc add dev swp1 clsact ip link add name gt6 type ip6gretap \ local 2001:db8:2::1 remote 2001:db8:2::2 ip link set dev gt6 up sleep 1 tc filter add dev swp1 ingress pref 1000 matchall skip_hw \ action mirred egress mirror dev gt6 ping -I h1 192.0.2.2 Fixes: c12b395a4664 ("gre: Support GRE over IPv6") Signed-off-by: Petr Machata Acked-by: William Tu Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 3 +++ 1 file changed, 3 insertions(+) commit deea81228ba1c6e77722f534a3d63c50e1757877 Author: Jesper Dangaard Brouer Date: Thu May 17 19:39:31 2018 +0200 selftests/bpf: check return value of fopen in test_verifier.c Commit 0a6748740368 ("selftests/bpf: Only run tests if !bpf_disabled") forgot to check return value of fopen. This caused some confusion, when running test_verifier (from tools/testing/selftests/bpf/) on an older kernel (< v4.4) as it will simply seqfault. This fix avoids the segfault and prints an error, but allow program to continue. Given the sysctl was introduced in 1be7f75d1668 ("bpf: enable non-root eBPF programs"), we know that the running kernel cannot support unpriv, thus continue with unpriv_disabled = true. Fixes: 0a6748740368 ("selftests/bpf: Only run tests if !bpf_disabled") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_verifier.c | 5 +++++ 1 file changed, 5 insertions(+) commit 02f99df1875c11330cd0be69a40fa8ccd14749b2 Author: William Tu Date: Wed May 16 17:24:32 2018 -0700 erspan: fix invalid erspan version. ERSPAN only support version 1 and 2. When packets send to an erspan device which does not have proper version number set, drop the packet. In real case, we observe multicast packets sent to the erspan pernet device, erspan0, which does not have erspan version configured. Reported-by: Greg Rose Signed-off-by: William Tu Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 4 +++- net/ipv6/ip6_gre.c | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit fed71f7d98795ed0fa1d431910787f0f4a68324f Author: Thomas Gleixner Date: Thu May 17 14:36:39 2018 +0200 x86/apic/x2apic: Initialize cluster ID properly Rick bisected a regression on large systems which use the x2apic cluster mode for interrupt delivery to the commit wich reworked the cluster management. The problem is caused by a missing initialization of the clusterid field in the shared cluster data structures. So all structures end up with cluster ID 0 which only allows sharing between all CPUs which belong to cluster 0. All other CPUs with a cluster ID > 0 cannot share the data structure because they cannot find existing data with their cluster ID. This causes malfunction with IPIs because IPIs are sent to the wrong cluster and the caller waits for ever that the target CPU handles the IPI. Add the missing initialization when a upcoming CPU is the first in a cluster so that the later booting CPUs can find the data and share it for proper operation. Fixes: 023a611748fd ("x86/apic/x2apic: Simplify cluster management") Reported-by: Rick Warner Bisected-by: Rick Warner Signed-off-by: Thomas Gleixner Tested-by: Rick Warner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1805171418210.1947@nanos.tec.linutronix.de arch/x86/kernel/apic/x2apic_cluster.c | 1 + 1 file changed, 1 insertion(+) commit d13d170cba8a68b7f25b4a01193b7014b7bc7a72 Merge: 5a847a6 0718421 Author: David S. Miller Date: Thu May 17 14:57:20 2018 -0400 Merge branch 'ibmvnic-Fix-bugs-and-memory-leaks' Thomas Falcon says: ==================== ibmvnic: Fix bugs and memory leaks This is a small patch series fixing up some bugs and memory leaks in the ibmvnic driver. The first fix frees up previously allocated memory that should be freed in case of an error. The second fixes a reset case that was failing due to TX/RX queue IRQ's being erroneously disabled without being enabled again. The final patch fixes incorrect reallocated of statistics buffers during a device reset, resulting in loss of statistics information and a memory leak. ==================== Signed-off-by: David S. Miller commit 0718421389da3d4352f4538449e83316fbed4389 Author: Thomas Falcon Date: Wed May 16 15:49:05 2018 -0500 ibmvnic: Fix statistics buffers memory leak Move initialization of statistics buffers from ibmvnic_init function into ibmvnic_probe. In the current state, ibmvnic_init will be called again during a device reset, resulting in the allocation of new buffers without freeing the old ones. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 134bbe7f21f4455c8be64f945b8b67094f768de0 Author: Thomas Falcon Date: Wed May 16 15:49:04 2018 -0500 ibmvnic: Fix non-fatal firmware error reset It is not necessary to disable interrupt lines here during a reset to handle a non-fatal firmware error. Move that call within the code block that handles the other cases that do require interrupts to be disabled and re-enabled. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4cf2ddf3e329d4ec1e3edda3465a202b5665be0e Author: Thomas Falcon Date: Wed May 16 15:49:03 2018 -0500 ibmvnic: Free coherent DMA memory if FW map failed If the firmware map fails for whatever reason, remember to free up the memory after. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 1 + 1 file changed, 1 insertion(+) commit 5a847a6e1477be5bd3f94cc1b7708d7d4a7cd94c Author: David Ahern Date: Wed May 16 13:36:40 2018 -0700 net/ipv4: Initialize proto and ports in flow struct Updating the FIB tracepoint for the recent change to allow rules using the protocol and ports exposed a few places where the entries in the flow struct are not initialized. For __fib_validate_source add the call to fib4_rules_early_flow_dissect since it is invoked for the input path. For netfilter, add the memset on the flow struct to avoid future problems like this. In ip_route_input_slow need to set the fields if the skb dissection does not happen. Fixes: bfff4862653b ("net: fib_rules: support for match on ip_proto, sport and dport") Signed-off-by: David Ahern Acked-by: Roopa Prabhu Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 8 +++++++- net/ipv4/netfilter/ipt_rpfilter.c | 2 +- net/ipv4/route.c | 7 ++++++- 3 files changed, 14 insertions(+), 3 deletions(-) commit 8ab6ffba14a466c7298cb3fd5066d774d2977ad1 Author: Matt Mullins Date: Wed May 16 10:48:40 2018 -0700 tls: don't use stack memory in a scatterlist scatterlist code expects virt_to_page() to work, which fails with CONFIG_VMAP_STACK=y. Fixes: c46234ebb4d1e ("tls: RX path for ktls") Signed-off-by: Matt Mullins Signed-off-by: David S. Miller include/net/tls.h | 3 +++ net/tls/tls_sw.c | 9 ++++----- 2 files changed, 7 insertions(+), 5 deletions(-) commit 58ddfe6c3af91d320cf5d0aba33143e7c1d8dc35 Merge: 7c9a0fc 633711e Author: Linus Torvalds Date: Thu May 17 10:23:36 2018 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: - ARM/ARM64 locking fixes - x86 fixes: PCID, UMIP, locking - improved support for recent Windows version that have a 2048 Hz APIC timer - rename KVM_HINTS_DEDICATED CPUID bit to KVM_HINTS_REALTIME - better behaved selftests * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm: rename KVM_HINTS_DEDICATED to KVM_HINTS_REALTIME KVM: arm/arm64: VGIC/ITS save/restore: protect kvm_read_guest() calls KVM: arm/arm64: VGIC/ITS: protect kvm_read_guest() calls with SRCU lock KVM: arm/arm64: VGIC/ITS: Promote irq_lock() in update_affinity KVM: arm/arm64: Properly protect VGIC locks from IRQs KVM: X86: Lower the default timer frequency limit to 200us KVM: vmx: update sec exec controls for UMIP iff emulating UMIP kvm: x86: Suppress CR3_PCID_INVD bit only when PCIDs are enabled KVM: selftests: exit with 0 status code when tests cannot be run KVM: hyperv: idr_find needs RCU protection x86: Delay skip of emulated hypercall instruction KVM: Extend MAX_IRQ_ROUTES to 4096 for all archs commit e20ac8b11b0f06ebae63c56062123b62b0c64c2b Merge: 633711e f4a551b Author: Paolo Bonzini Date: Thu May 17 19:22:59 2018 +0200 Merge tag 'kvm-s390-master-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-master KVM: s390: Fix vsie handling for transactional diagnostic block vsie (nested KVM) might reject a valid input. Fix it. commit 7c9a0fc79f6c5bd7e8e3198c97acf6363da3832f Merge: 3e9245c c99f080 Author: Linus Torvalds Date: Thu May 17 10:13:44 2018 -0700 Merge tag 'sound-4.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "We have a core fix in the compat code for covering a potential race (double references), but it's a very minor change. The rest are all small device-specific quirks, as well as a correction of the new UAC3 support code" * tag 'sound-4.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Use Class Specific EP for UAC3 devices. ALSA: hda/realtek - Clevo P950ER ALC1220 Fixup ALSA: usb: mixer: volume quirk for CM102-A+/102S+ ALSA: hda: Add Lenovo C50 All in one to the power_save blacklist ALSA: control: fix a redundant-copy issue commit 633711e82878dc29083fc5d2605166755e25b57a Author: Michael S. Tsirkin Date: Thu May 17 17:54:24 2018 +0300 kvm: rename KVM_HINTS_DEDICATED to KVM_HINTS_REALTIME KVM_HINTS_DEDICATED seems to be somewhat confusing: Guest doesn't really care whether it's the only task running on a host CPU as long as it's not preempted. And there are more reasons for Guest to be preempted than host CPU sharing, for example, with memory overcommit it can get preempted on a memory access, post copy migration can cause preemption, etc. Let's call it KVM_HINTS_REALTIME which seems to better match what guests expect. Also, the flag most be set on all vCPUs - current guests assume this. Note so in the documentation. Signed-off-by: Michael S. Tsirkin Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/cpuid.txt | 6 +++--- arch/x86/include/uapi/asm/kvm_para.h | 2 +- arch/x86/kernel/kvm.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) commit 3e9245c5fa3092de19b95f03817b02469bcf146c Merge: 305bb55 2e68adc Author: Linus Torvalds Date: Thu May 17 10:11:44 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: - a fix for the vfio ccw translation code - update an incorrect email address in the MAINTAINERS file - fix a division by zero oops in the cpum_sf code found by trinity - two fixes for the error handling of the qdio code - several spectre related patches to convert all left-over indirect branches in the kernel to expoline branches - update defconfigs to avoid warnings due to the netfilter Kconfig changes - avoid several compiler warnings in the kexec_file code for s390 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/qdio: don't release memory in qdio_setup_irq() s390/qdio: fix access to uninitialized qdio_q fields s390/cpum_sf: ensure sample frequency of perf event attributes is non-zero s390: use expoline thunks in the BPF JIT s390: extend expoline to BC instructions s390: remove indirect branch from do_softirq_own_stack s390: move spectre sysfs attribute code s390/kernel: use expoline for indirect branches s390/ftrace: use expoline for indirect branches s390/lib: use expoline for indirect branches s390/crc32-vx: use expoline for indirect branches s390: move expoline assembler macros to a header vfio: ccw: fix cleanup if cp_prefetch fails s390/kexec_file: add declaration of purgatory related globals s390: update defconfigs MAINTAINERS: update s390 zcrypt maintainers email address commit 305bb55212822f13ddbfcb7518d999c6369942ba Merge: 7f7ccc2 4152dc9 Author: Linus Torvalds Date: Thu May 17 10:02:19 2018 -0700 Merge tag 'selinux-pr-20180516' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull SELinux fixes from Paul Moore: "A small pull request to fix a few regressions in the SELinux/SCTP code with applications that call bind() with AF_UNSPEC/INADDR_ANY. The individual commit descriptions have more information, but the commits themselves should be self explanatory" * tag 'selinux-pr-20180516' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: correctly handle sa_family cases in selinux_sctp_bind_connect() selinux: fix address family in bind() and connect() to match address/port selinux: add AF_UNSPEC and INADDR_ANY checks to selinux_socket_bind() commit 7f7ccc2ccc2e70c6054685f5e3522efa81556830 Author: Willy Tarreau Date: Fri May 11 08:11:44 2018 +0200 proc: do not access cmdline nor environ from file-backed areas proc_pid_cmdline_read() and environ_read() directly access the target process' VM to retrieve the command line and environment. If this process remaps these areas onto a file via mmap(), the requesting process may experience various issues such as extra delays if the underlying device is slow to respond. Let's simply refuse to access file-backed areas in these functions. For this we add a new FOLL_ANON gup flag that is passed to all calls to access_remote_vm(). The code already takes care of such failures (including unmapped areas). Accesses via /proc/pid/mem were not changed though. This was assigned CVE-2018-1120. Note for stable backports: the patch may apply to kernels prior to 4.11 but silently miss one location; it must be checked that no call to access_remote_vm() keeps zero as the last argument. Reported-by: Qualys Security Advisory Cc: Linus Torvalds Cc: Andy Lutomirski Cc: Oleg Nesterov Cc: stable@vger.kernel.org Signed-off-by: Willy Tarreau Signed-off-by: Linus Torvalds fs/proc/base.c | 8 ++++---- include/linux/mm.h | 1 + mm/gup.c | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) commit 1c1a2ee1b53b006754073eefc65d2b2cedb5264b Author: Coly Li Date: Thu May 17 23:33:26 2018 +0800 bcache: return 0 from bch_debug_init() if CONFIG_DEBUG_FS=n Commit 539d39eb2708 ("bcache: fix wrong return value in bch_debug_init()") returns the return value of debugfs_create_dir() to bcache_init(). When CONFIG_DEBUG_FS=n, bch_debug_init() always returns 1 and makes bcache_init() failedi. This patch makes bch_debug_init() always returns 0 if CONFIG_DEBUG_FS=n, so bcache can continue to work for the kernels which don't have debugfs enanbled. Changelog: v4: Add Acked-by from Kent Overstreet. v3: Use IS_ENABLED(CONFIG_DEBUG_FS) to replace #ifdef DEBUG_FS. v2: Remove a warning information v1: Initial version. Fixes: Commit 539d39eb2708 ("bcache: fix wrong return value in bch_debug_init()") Cc: stable@vger.kernel.org Signed-off-by: Coly Li Reported-by: Massimo B. Reported-by: Kai Krakow Tested-by: Kai Krakow Acked-by: Kent Overstreet Signed-off-by: Jens Axboe drivers/md/bcache/debug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bc226f07dcd3c9ef0b7f6236fe356ea4a9cb4769 Author: Tom Lendacky Date: Thu May 10 22:06:39 2018 +0200 KVM: SVM: Implement VIRT_SPEC_CTRL support for SSBD Expose the new virtualized architectural mechanism, VIRT_SSBD, for using speculative store bypass disable (SSBD) under SVM. This will allow guests to use SSBD on hardware that uses non-architectural mechanisms for enabling SSBD. [ tglx: Folded the migration fixup from Paolo Bonzini ] Signed-off-by: Tom Lendacky Signed-off-by: Thomas Gleixner arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kernel/cpu/common.c | 3 ++- arch/x86/kvm/cpuid.c | 11 +++++++++-- arch/x86/kvm/svm.c | 21 +++++++++++++++++++-- arch/x86/kvm/vmx.c | 18 +++++++++++++++--- arch/x86/kvm/x86.c | 13 ++++--------- 6 files changed, 50 insertions(+), 18 deletions(-) commit 47c61b3955cf712cadfc25635bf9bc174af030ea Author: Thomas Gleixner Date: Thu May 10 20:42:48 2018 +0200 x86/speculation, KVM: Implement support for VIRT_SPEC_CTRL/LS_CFG Add the necessary logic for supporting the emulated VIRT_SPEC_CTRL MSR to x86_virt_spec_ctrl(). If either X86_FEATURE_LS_CFG_SSBD or X86_FEATURE_VIRT_SPEC_CTRL is set then use the new guest_virt_spec_ctrl argument to check whether the state must be modified on the host. The update reuses speculative_store_bypass_update() so the ZEN-specific sibling coordination can be reused. Signed-off-by: Thomas Gleixner arch/x86/include/asm/spec-ctrl.h | 6 ++++++ arch/x86/kernel/cpu/bugs.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) commit be6fcb5478e95bb1c91f489121238deb3abca46a Author: Thomas Gleixner Date: Sat May 12 20:10:00 2018 +0200 x86/bugs: Rework spec_ctrl base and mask logic x86_spec_ctrL_mask is intended to mask out bits from a MSR_SPEC_CTRL value which are not to be modified. However the implementation is not really used and the bitmask was inverted to make a check easier, which was removed in "x86/bugs: Remove x86_spec_ctrl_set()" Aside of that it is missing the STIBP bit if it is supported by the platform, so if the mask would be used in x86_virt_spec_ctrl() then it would prevent a guest from setting STIBP. Add the STIBP bit if supported and use the mask in x86_virt_spec_ctrl() to sanitize the value which is supplied by the guest. Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov arch/x86/kernel/cpu/bugs.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 4b59bdb569453a60b752b274ca61f009e37f4dae Author: Thomas Gleixner Date: Sat May 12 20:53:14 2018 +0200 x86/bugs: Remove x86_spec_ctrl_set() x86_spec_ctrl_set() is only used in bugs.c and the extra mask checks there provide no real value as both call sites can just write x86_spec_ctrl_base to MSR_SPEC_CTRL. x86_spec_ctrl_base is valid and does not need any extra masking or checking. Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Konrad Rzeszutek Wilk arch/x86/include/asm/nospec-branch.h | 2 -- arch/x86/kernel/cpu/bugs.c | 13 ++----------- 2 files changed, 2 insertions(+), 13 deletions(-) commit fa8ac4988249c38476f6ad678a4848a736373403 Author: Thomas Gleixner Date: Sat May 12 20:49:16 2018 +0200 x86/bugs: Expose x86_spec_ctrl_base directly x86_spec_ctrl_base is the system wide default value for the SPEC_CTRL MSR. x86_spec_ctrl_get_default() returns x86_spec_ctrl_base and was intended to prevent modification to that variable. Though the variable is read only after init and globaly visible already. Remove the function and export the variable instead. Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Konrad Rzeszutek Wilk arch/x86/include/asm/nospec-branch.h | 16 +++++----------- arch/x86/include/asm/spec-ctrl.h | 3 --- arch/x86/kernel/cpu/bugs.c | 11 +---------- 3 files changed, 6 insertions(+), 24 deletions(-) commit cc69b34989210f067b2c51d5539b5f96ebcc3a01 Author: Borislav Petkov Date: Sat May 12 00:14:51 2018 +0200 x86/bugs: Unify x86_spec_ctrl_{set_guest,restore_host} Function bodies are very similar and are going to grow more almost identical code. Add a bool arg to determine whether SPEC_CTRL is being set for the guest or restored to the host. No functional changes. Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Reviewed-by: Konrad Rzeszutek Wilk arch/x86/include/asm/spec-ctrl.h | 33 +++++++++++++++++++--- arch/x86/kernel/cpu/bugs.c | 60 ++++++++++------------------------------ 2 files changed, 44 insertions(+), 49 deletions(-) commit 0270be3e34efb05a88bc4c422572ece038ef3608 Author: Thomas Gleixner Date: Thu May 10 20:31:44 2018 +0200 x86/speculation: Rework speculative_store_bypass_update() The upcoming support for the virtual SPEC_CTRL MSR on AMD needs to reuse speculative_store_bypass_update() to avoid code duplication. Add an argument for supplying a thread info (TIF) value and create a wrapper speculative_store_bypass_update_current() which is used at the existing call site. Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Konrad Rzeszutek Wilk arch/x86/include/asm/spec-ctrl.h | 7 ++++++- arch/x86/kernel/cpu/bugs.c | 2 +- arch/x86/kernel/process.c | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) commit 11fb0683493b2da112cd64c9dada221b52463bf7 Author: Tom Lendacky Date: Thu May 17 17:09:18 2018 +0200 x86/speculation: Add virtualized speculative store bypass disable support Some AMD processors only support a non-architectural means of enabling speculative store bypass disable (SSBD). To allow a simplified view of this to a guest, an architectural definition has been created through a new CPUID bit, 0x80000008_EBX[25], and a new MSR, 0xc001011f. With this, a hypervisor can virtualize the existence of this definition and provide an architectural method for using SSBD to a guest. Add the new CPUID feature, the new MSR and update the existing SSBD support to use this MSR when present. Signed-off-by: Tom Lendacky Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/msr-index.h | 2 ++ arch/x86/kernel/cpu/bugs.c | 4 +++- arch/x86/kernel/process.c | 13 ++++++++++++- 4 files changed, 18 insertions(+), 2 deletions(-) commit ccbcd2674472a978b48c91c1fbfb66c0ff959f24 Author: Thomas Gleixner Date: Wed May 9 23:01:01 2018 +0200 x86/bugs, KVM: Extend speculation control for VIRT_SPEC_CTRL AMD is proposing a VIRT_SPEC_CTRL MSR to handle the Speculative Store Bypass Disable via MSR_AMD64_LS_CFG so that guests do not have to care about the bit position of the SSBD bit and thus facilitate migration. Also, the sibling coordination on Family 17H CPUs can only be done on the host. Extend x86_spec_ctrl_set_guest() and x86_spec_ctrl_restore_host() with an extra argument for the VIRT_SPEC_CTRL MSR. Hand in 0 from VMX and in SVM add a new virt_spec_ctrl member to the CPU data structure which is going to be used in later patches for the actual implementation. Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Konrad Rzeszutek Wilk arch/x86/include/asm/spec-ctrl.h | 9 ++++++--- arch/x86/kernel/cpu/bugs.c | 20 ++++++++++++++++++-- arch/x86/kvm/svm.c | 11 +++++++++-- arch/x86/kvm/vmx.c | 4 ++-- 4 files changed, 35 insertions(+), 9 deletions(-) commit 1f50ddb4f4189243c05926b842dc1a0332195f31 Author: Thomas Gleixner Date: Wed May 9 21:53:09 2018 +0200 x86/speculation: Handle HT correctly on AMD The AMD64_LS_CFG MSR is a per core MSR on Family 17H CPUs. That means when hyperthreading is enabled the SSBD bit toggle needs to take both cores into account. Otherwise the following situation can happen: CPU0 CPU1 disable SSB disable SSB enable SSB <- Enables it for the Core, i.e. for CPU0 as well So after the SSB enable on CPU1 the task on CPU0 runs with SSB enabled again. On Intel the SSBD control is per core as well, but the synchronization logic is implemented behind the per thread SPEC_CTRL MSR. It works like this: CORE_SPEC_CTRL = THREAD0_SPEC_CTRL | THREAD1_SPEC_CTRL i.e. if one of the threads enables a mitigation then this affects both and the mitigation is only disabled in the core when both threads disabled it. Add the necessary synchronization logic for AMD family 17H. Unfortunately that requires a spinlock to serialize the access to the MSR, but the locks are only shared between siblings. Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Konrad Rzeszutek Wilk arch/x86/include/asm/spec-ctrl.h | 6 ++ arch/x86/kernel/process.c | 125 +++++++++++++++++++++++++++++++++++++-- arch/x86/kernel/smpboot.c | 5 ++ 3 files changed, 130 insertions(+), 6 deletions(-) commit d1035d971829dcf80e8686ccde26f94b0a069472 Author: Thomas Gleixner Date: Thu May 10 16:26:00 2018 +0200 x86/cpufeatures: Add FEATURE_ZEN Add a ZEN feature bit so family-dependent static_cpu_has() optimizations can be built for ZEN. Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Konrad Rzeszutek Wilk arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/amd.c | 1 + 2 files changed, 2 insertions(+) commit 52817587e706686fcdb27f14c1b000c92f266c96 Author: Thomas Gleixner Date: Thu May 10 20:21:36 2018 +0200 x86/cpufeatures: Disentangle SSBD enumeration The SSBD enumeration is similarly to the other bits magically shared between Intel and AMD though the mechanisms are different. Make X86_FEATURE_SSBD synthetic and set it depending on the vendor specific features or family dependent setup. Change the Intel bit to X86_FEATURE_SPEC_CTRL_SSBD to denote that SSBD is controlled via MSR_SPEC_CTRL and fix up the usage sites. Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Konrad Rzeszutek Wilk arch/x86/include/asm/cpufeatures.h | 7 +++---- arch/x86/kernel/cpu/amd.c | 7 +------ arch/x86/kernel/cpu/bugs.c | 10 +++++----- arch/x86/kernel/cpu/common.c | 3 +++ arch/x86/kernel/cpu/intel.c | 1 + arch/x86/kernel/process.c | 2 +- 6 files changed, 14 insertions(+), 16 deletions(-) commit 7eb8956a7fec3c1f0abc2a5517dada99ccc8a961 Author: Thomas Gleixner Date: Thu May 10 19:13:18 2018 +0200 x86/cpufeatures: Disentangle MSR_SPEC_CTRL enumeration from IBRS The availability of the SPEC_CTRL MSR is enumerated by a CPUID bit on Intel and implied by IBRS or STIBP support on AMD. That's just confusing and in case an AMD CPU has IBRS not supported because the underlying problem has been fixed but has another bit valid in the SPEC_CTRL MSR, the thing falls apart. Add a synthetic feature bit X86_FEATURE_MSR_SPEC_CTRL to denote the availability on both Intel and AMD. While at it replace the boot_cpu_has() checks with static_cpu_has() where possible. This prevents late microcode loading from exposing SPEC_CTRL, but late loading is already very limited as it does not reevaluate the mitigation options and other bits and pieces. Having static_cpu_has() is the simplest and least fragile solution. Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Konrad Rzeszutek Wilk arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/bugs.c | 18 +++++++++++------- arch/x86/kernel/cpu/common.c | 9 +++++++-- arch/x86/kernel/cpu/intel.c | 1 + 4 files changed, 20 insertions(+), 9 deletions(-) commit e7c587da125291db39ddf1f49b18e5970adbac17 Author: Borislav Petkov Date: Wed May 2 18:15:14 2018 +0200 x86/speculation: Use synthetic bits for IBRS/IBPB/STIBP Intel and AMD have different CPUID bits hence for those use synthetic bits which get set on the respective vendor's in init_speculation_control(). So that debacles like what the commit message of c65732e4f721 ("x86/cpu: Restore CPUID_8000_0008_EBX reload") talks about don't happen anymore. Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Reviewed-by: Konrad Rzeszutek Wilk Tested-by: Jörg Otte Cc: Linus Torvalds Cc: "Kirill A. Shutemov" Link: https://lkml.kernel.org/r/20180504161815.GG9257@pd.tnic arch/x86/include/asm/cpufeatures.h | 10 ++++++---- arch/x86/kernel/cpu/common.c | 14 ++++++++++---- arch/x86/kvm/cpuid.c | 10 +++++----- arch/x86/kvm/svm.c | 6 +++--- arch/x86/kvm/vmx.c | 9 ++------- 5 files changed, 26 insertions(+), 23 deletions(-) commit 15e6c22fd8e5a42c5ed6d487b7c9fe44c2517765 Author: Thomas Gleixner Date: Fri May 11 15:21:01 2018 +0200 KVM: SVM: Move spec control call after restore of GS svm_vcpu_run() invokes x86_spec_ctrl_restore_host() after VMEXIT, but before the host GS is restored. x86_spec_ctrl_restore_host() uses 'current' to determine the host SSBD state of the thread. 'current' is GS based, but host GS is not yet restored and the access causes a triple fault. Move the call after the host GS restore. Fixes: 885f82bfbc6f x86/process: Allow runtime control of Speculative Store Bypass Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Paolo Bonzini arch/x86/kvm/svm.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit c1d2a31397ec51f0370f6bd17b19b39152c263cb Author: Nicholas Piggin Date: Tue May 15 01:59:47 2018 +1000 powerpc/powernv: Fix NVRAM sleep in invalid context when crashing Similarly to opal_event_shutdown, opal_nvram_write can be called in the crash path with irqs disabled. Special case the delay to avoid sleeping in invalid context. Fixes: 3b8070335f75 ("powerpc/powernv: Fix OPAL NVRAM driver OPAL_BUSY loops") Cc: stable@vger.kernel.org # v3.2 Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-nvram.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 22aac3eb0c465dd9ea7f06ee1ed8ad933890f2a3 Author: Pierre-Yves MORDRET Date: Fri May 11 10:22:39 2018 +0200 MAINTAINERS: add entry for STM32 I2C driver Add I2C/SMBUS Driver entry for STM32 family from ST Microelectronics. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 8438ee76b004ef66d125ade64c91fc128047d244 Author: Michal Kubecek Date: Wed May 16 07:51:36 2018 +0200 Makefile: disable PIE before testing asm goto Since commit e501ce957a78 ("x86: Force asm-goto"), aarch64 build on distributions which enable PIE by default (e.g. openSUSE Tumbleweed) does not detect support for asm goto correctly. The problem is that ARM specific part of scripts/gcc-goto.sh fails with PIE even with recent gcc versions. Moving the asm goto detection up in Makefile put it before the place where we disable PIE. As a result, kernel is built without jump label support. Move the lines disabling PIE before the asm goto test to make it work. Fixes: e501ce957a78 ("x86: Force asm-goto") Reported-by: Andreas Faerber Signed-off-by: Michal Kubecek Acked-by: Peter Zijlstra (Intel) Signed-off-by: Masahiro Yamada Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c64ba044ed57ea72cc1c7b14a8dcfb6ded5a759c Author: Nick Desaulniers Date: Thu Apr 26 14:28:07 2018 -0700 kbuild: gcov: enable -fno-tree-loop-im if supported Clang does not recognize this compiler option. Reported-by: Prasad Sodagudi Signed-off-by: Nick Desaulniers Signed-off-by: Masahiro Yamada Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 02ee654d3a04563c67bfe658a05384548b9bb105 Author: Anand Jain Date: Thu May 17 15:16:51 2018 +0800 btrfs: fix crash when trying to resume balance without the resume flag We set the BTRFS_BALANCE_RESUME flag in the btrfs_recover_balance() only, which isn't called during the remount. So when resuming from the paused balance we hit the bug: kernel: kernel BUG at fs/btrfs/volumes.c:3890! :: kernel: balance_kthread+0x51/0x60 [btrfs] kernel: kthread+0x111/0x130 :: kernel: RIP: btrfs_balance+0x12e1/0x1570 [btrfs] RSP: ffffba7d0090bde8 Reproducer: On a mounted filesystem: btrfs balance start --full-balance /btrfs btrfs balance pause /btrfs mount -o remount,ro /dev/sdb /btrfs mount -o remount,rw /dev/sdb /btrfs To fix this set the BTRFS_BALANCE_RESUME flag in btrfs_resume_balance_async(). CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit fe816d0f1d4c31c4c31d42ca78a87660565fc800 Author: Nikolay Borisov Date: Fri Apr 27 12:21:53 2018 +0300 btrfs: Fix delalloc inodes invalidation during transaction abort When a transaction is aborted btrfs_cleanup_transaction is called to cleanup all the various in-flight bits and pieces which migth be active. One of those is delalloc inodes - inodes which have dirty pages which haven't been persisted yet. Currently the process of freeing such delalloc inodes in exceptional circumstances such as transaction abort boiled down to calling btrfs_invalidate_inodes whose sole job is to invalidate the dentries for all inodes related to a root. This is in fact wrong and insufficient since such delalloc inodes will likely have pending pages or ordered-extents and will be linked to the sb->s_inode_list. This means that unmounting a btrfs instance with an aborted transaction could potentially lead inodes/their pages visible to the system long after their superblock has been freed. This in turn leads to a "use-after-free" situation once page shrink is triggered. This situation could be simulated by running generic/019 which would cause such inodes to be left hanging, followed by generic/176 which causes memory pressure and page eviction which lead to touching the freed super block instance. This situation is additionally detected by the unmount code of VFS with the following message: "VFS: Busy inodes after unmount of Self-destruct in 5 seconds. Have a nice day..." Additionally btrfs hits WARN_ON(!RB_EMPTY_ROOT(&root->inode_tree)); in free_fs_root for the same reason. This patch aims to rectify the sitaution by doing the following: 1. Change btrfs_destroy_delalloc_inodes so that it calls invalidate_inode_pages2 for every inode on the delalloc list, this ensures that all the pages of the inode are released. This function boils down to calling btrfs_releasepage. During test I observed cases where inodes on the delalloc list were having an i_count of 0, so this necessitates using igrab to be sure we are working on a non-freed inode. 2. Since calling btrfs_releasepage might queue delayed iputs move the call out to btrfs_cleanup_transaction in btrfs_error_commit_super before calling run_delayed_iputs for the last time. This is necessary to ensure that delayed iputs are run. Note: this patch is tagged for 4.14 stable but the fix applies to older versions too but needs to be backported manually due to conflicts. CC: stable@vger.kernel.org # 4.14.x: 2b8773313494: btrfs: Split btrfs_del_delalloc_inode into 2 functions CC: stable@vger.kernel.org # 4.14.x Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ add comment to igrab ] Signed-off-by: David Sterba fs/btrfs/disk-io.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 2b8773313494ede83a26fb372466e634564002ed Author: Nikolay Borisov Date: Fri Apr 27 12:21:51 2018 +0300 btrfs: Split btrfs_del_delalloc_inode into 2 functions This is in preparation of fixing delalloc inodes leakage on transaction abort. Also export the new function. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 ++ fs/btrfs/inode.c | 13 ++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) commit 02a3307aa9c20b4f6626255b028f07f6cfa16feb Author: Liu Bo Date: Wed May 16 01:37:36 2018 +0800 btrfs: fix reading stale metadata blocks after degraded raid1 mounts If a btree block, aka. extent buffer, is not available in the extent buffer cache, it'll be read out from the disk instead, i.e. btrfs_search_slot() read_block_for_search() # hold parent and its lock, go to read child btrfs_release_path() read_tree_block() # read child Unfortunately, the parent lock got released before reading child, so commit 5bdd3536cbbe ("Btrfs: Fix block generation verification race") had used 0 as parent transid to read the child block. It forces read_tree_block() not to check if parent transid is different with the generation id of the child that it reads out from disk. A simple PoC is included in btrfs/124, 0. A two-disk raid1 btrfs, 1. Right after mkfs.btrfs, block A is allocated to be device tree's root. 2. Mount this filesystem and put it in use, after a while, device tree's root got COW but block A hasn't been allocated/overwritten yet. 3. Umount it and reload the btrfs module to remove both disks from the global @fs_devices list. 4. mount -odegraded dev1 and write some data, so now block A is allocated to be a leaf in checksum tree. Note that only dev1 has the latest metadata of this filesystem. 5. Umount it and mount it again normally (with both disks), since raid1 can pick up one disk by the writer task's pid, if btrfs_search_slot() needs to read block A, dev2 which does NOT have the latest metadata might be read for block A, then we got a stale block A. 6. As parent transid is not checked, block A is marked as uptodate and put into the extent buffer cache, so the future search won't bother to read disk again, which means it'll make changes on this stale one and make it dirty and flush it onto disk. To avoid the problem, parent transid needs to be passed to read_tree_block(). In order to get a valid parent transid, we need to hold the parent's lock until finishing reading child. This patch needs to be slightly adapted for stable kernels, the &first_key parameter added to read_tree_block() is from 4.16+ (581c1760415c4). The fix is to replace 0 by 'gen'. Fixes: 5bdd3536cbbe ("Btrfs: Fix block generation verification race") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Liu Bo Reviewed-by: Filipe Manana Reviewed-by: Qu Wenruo [ update changelog ] Signed-off-by: David Sterba fs/btrfs/ctree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1a63c198ddb810c790101d693c7071cca703b3c7 Author: Misono Tomohiro Date: Tue May 15 16:51:26 2018 +0900 btrfs: property: Set incompat flag if lzo/zstd compression is set Incompat flag of LZO/ZSTD compression should be set at: 1. mount time (-o compress/compress-force) 2. when defrag is done 3. when property is set Currently 3. is missing and this commit adds this. This could lead to a filesystem that uses ZSTD but is not marked as such. If a kernel without a ZSTD support encounteres a ZSTD compressed extent, it will handle that but this could be confusing to the user. Typically the filesystem is mounted with the ZSTD option, but the discrepancy can arise when a filesystem is never mounted with ZSTD and then the property on some file is set (and some new extents are written). A simple mount with -o compress=zstd will fix that up on an unpatched kernel. Same goes for LZO, but this has been around for a very long time (2.6.37) so it's unlikely that a pre-LZO kernel would be used. Fixes: 5c1aab1dd544 ("btrfs: Add zstd support") CC: stable@vger.kernel.org # 4.14+ Signed-off-by: Tomohiro Misono Reviewed-by: Anand Jain Reviewed-by: David Sterba [ add user visible impact ] Signed-off-by: David Sterba fs/btrfs/props.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 31d11b83b96faaee4bb514d375a09489117c3e8d Author: Filipe Manana Date: Wed May 9 16:01:46 2018 +0100 Btrfs: fix duplicate extents after fsync of file with prealloc extents In commit 471d557afed1 ("Btrfs: fix loss of prealloc extents past i_size after fsync log replay"), on fsync, we started to always log all prealloc extents beyond an inode's i_size in order to avoid losing them after a power failure. However under some cases this can lead to the log replay code to create duplicate extent items, with different lengths, in the extent tree. That happens because, as of that commit, we can now log extent items based on extent maps that are not on the "modified" list of extent maps of the inode's extent map tree. Logging extent items based on extent maps is used during the fast fsync path to save time and for this to work reliably it requires that the extent maps are not merged with other adjacent extent maps - having the extent maps in the list of modified extents gives such guarantee. Consider the following example, captured during a long run of fsstress, which illustrates this problem. We have inode 271, in the filesystem tree (root 5), for which all of the following operations and discussion apply to. A buffered write starts at offset 312391 with a length of 933471 bytes (end offset at 1245862). At this point we have, for this inode, the following extent maps with the their field values: em A, start 0, orig_start 0, len 40960, block_start 18446744073709551613, block_len 0, orig_block_len 0 em B, start 40960, orig_start 40960, len 376832, block_start 1106399232, block_len 376832, orig_block_len 376832 em C, start 417792, orig_start 417792, len 782336, block_start 18446744073709551613, block_len 0, orig_block_len 0 em D, start 1200128, orig_start 1200128, len 835584, block_start 1106776064, block_len 835584, orig_block_len 835584 em E, start 2035712, orig_start 2035712, len 245760, block_start 1107611648, block_len 245760, orig_block_len 245760 Extent map A corresponds to a hole and extent maps D and E correspond to preallocated extents. Extent map D ends where extent map E begins (1106776064 + 835584 = 1107611648), but these extent maps were not merged because they are in the inode's list of modified extent maps. An fsync against this inode is made, which triggers the fast path (BTRFS_INODE_NEEDS_FULL_SYNC is not set). This fsync triggers writeback of the data previously written using buffered IO, and when the respective ordered extent finishes, btrfs_drop_extents() is called against the (aligned) range 311296..1249279. This causes a split of extent map D at btrfs_drop_extent_cache(), replacing extent map D with a new extent map D', also added to the list of modified extents, with the following values: em D', start 1249280, orig_start of 1200128, block_start 1106825216 (= 1106776064 + 1249280 - 1200128), orig_block_len 835584, block_len 786432 (835584 - (1249280 - 1200128)) Then, during the fast fsync, btrfs_log_changed_extents() is called and extent maps D' and E are removed from the list of modified extents. The flag EXTENT_FLAG_LOGGING is also set on them. After the extents are logged clear_em_logging() is called on each of them, and that makes extent map E to be merged with extent map D' (try_merge_map()), resulting in D' being deleted and E adjusted to: em E, start 1249280, orig_start 1200128, len 1032192, block_start 1106825216, block_len 1032192, orig_block_len 245760 A direct IO write at offset 1847296 and length of 360448 bytes (end offset at 2207744) starts, and at that moment the following extent maps exist for our inode: em A, start 0, orig_start 0, len 40960, block_start 18446744073709551613, block_len 0, orig_block_len 0 em B, start 40960, orig_start 40960, len 270336, block_start 1106399232, block_len 270336, orig_block_len 376832 em C, start 311296, orig_start 311296, len 937984, block_start 1112842240, block_len 937984, orig_block_len 937984 em E (prealloc), start 1249280, orig_start 1200128, len 1032192, block_start 1106825216, block_len 1032192, orig_block_len 245760 The dio write results in drop_extent_cache() being called twice. The first time for a range that starts at offset 1847296 and ends at offset 2035711 (length of 188416), which results in a double split of extent map E, replacing it with two new extent maps: em F, start 1249280, orig_start 1200128, block_start 1106825216, block_len 598016, orig_block_len 598016 em G, start 2035712, orig_start 1200128, block_start 1107611648, block_len 245760, orig_block_len 1032192 It also creates a new extent map that represents a part of the requested IO (through create_io_em()): em H, start 1847296, len 188416, block_start 1107423232, block_len 188416 The second call to drop_extent_cache() has a range with a start offset of 2035712 and end offset of 2207743 (length of 172032). This leads to replacing extent map G with a new extent map I with the following values: em I, start 2207744, orig_start 1200128, block_start 1107783680, block_len 73728, orig_block_len 1032192 It also creates a new extent map that represents the second part of the requested IO (through create_io_em()): em J, start 2035712, len 172032, block_start 1107611648, block_len 172032 The dio write set the inode's i_size to 2207744 bytes. After the dio write the inode has the following extent maps: em A, start 0, orig_start 0, len 40960, block_start 18446744073709551613, block_len 0, orig_block_len 0 em B, start 40960, orig_start 40960, len 270336, block_start 1106399232, block_len 270336, orig_block_len 376832 em C, start 311296, orig_start 311296, len 937984, block_start 1112842240, block_len 937984, orig_block_len 937984 em F, start 1249280, orig_start 1200128, len 598016, block_start 1106825216, block_len 598016, orig_block_len 598016 em H, start 1847296, orig_start 1200128, len 188416, block_start 1107423232, block_len 188416, orig_block_len 835584 em J, start 2035712, orig_start 2035712, len 172032, block_start 1107611648, block_len 172032, orig_block_len 245760 em I, start 2207744, orig_start 1200128, len 73728, block_start 1107783680, block_len 73728, orig_block_len 1032192 Now do some change to the file, like adding a xattr for example and then fsync it again. This triggers a fast fsync path, and as of commit 471d557afed1 ("Btrfs: fix loss of prealloc extents past i_size after fsync log replay"), we use the extent map I to log a file extent item because it's a prealloc extent and it starts at an offset matching the inode's i_size. However when we log it, we create a file extent item with a value for the disk byte location that is wrong, as can be seen from the following output of "btrfs inspect-internal dump-tree": item 1 key (271 EXTENT_DATA 2207744) itemoff 3782 itemsize 53 generation 22 type 2 (prealloc) prealloc data disk byte 1106776064 nr 1032192 prealloc data offset 1007616 nr 73728 Here the disk byte value corresponds to calculation based on some fields from the extent map I: 1106776064 = block_start (1107783680) - 1007616 (extent_offset) extent_offset = 2207744 (start) - 1200128 (orig_start) = 1007616 The disk byte value of 1106776064 clashes with disk byte values of the file extent items at offsets 1249280 and 1847296 in the fs tree: item 6 key (271 EXTENT_DATA 1249280) itemoff 3568 itemsize 53 generation 20 type 2 (prealloc) prealloc data disk byte 1106776064 nr 835584 prealloc data offset 49152 nr 598016 item 7 key (271 EXTENT_DATA 1847296) itemoff 3515 itemsize 53 generation 20 type 1 (regular) extent data disk byte 1106776064 nr 835584 extent data offset 647168 nr 188416 ram 835584 extent compression 0 (none) item 8 key (271 EXTENT_DATA 2035712) itemoff 3462 itemsize 53 generation 20 type 1 (regular) extent data disk byte 1107611648 nr 245760 extent data offset 0 nr 172032 ram 245760 extent compression 0 (none) item 9 key (271 EXTENT_DATA 2207744) itemoff 3409 itemsize 53 generation 20 type 2 (prealloc) prealloc data disk byte 1107611648 nr 245760 prealloc data offset 172032 nr 73728 Instead of the disk byte value of 1106776064, the value of 1107611648 should have been logged. Also the data offset value should have been 172032 and not 1007616. After a log replay we end up getting two extent items in the extent tree with different lengths, one of 835584, which is correct and existed before the log replay, and another one of 1032192 which is wrong and is based on the logged file extent item: item 12 key (1106776064 EXTENT_ITEM 835584) itemoff 3406 itemsize 53 refs 2 gen 15 flags DATA extent data backref root 5 objectid 271 offset 1200128 count 2 item 13 key (1106776064 EXTENT_ITEM 1032192) itemoff 3353 itemsize 53 refs 1 gen 22 flags DATA extent data backref root 5 objectid 271 offset 1200128 count 1 Obviously this leads to many problems and a filesystem check reports many errors: (...) checking extents Extent back ref already exists for 1106776064 parent 0 root 5 owner 271 offset 1200128 num_refs 1 extent item 1106776064 has multiple extent items ref mismatch on [1106776064 835584] extent item 2, found 3 Incorrect local backref count on 1106776064 root 5 owner 271 offset 1200128 found 2 wanted 1 back 0x55b1d0ad7680 Backref 1106776064 root 5 owner 271 offset 1200128 num_refs 0 not found in extent tree Incorrect local backref count on 1106776064 root 5 owner 271 offset 1200128 found 1 wanted 0 back 0x55b1d0ad4e70 Backref bytes do not match extent backref, bytenr=1106776064, ref bytes=835584, backref bytes=1032192 backpointer mismatch on [1106776064 835584] checking free space cache block group 1103101952 has wrong amount of free space failed to load free space cache for block group 1103101952 checking fs roots (...) So fix this by logging the prealloc extents beyond the inode's i_size based on searches in the subvolume tree instead of the extent maps. Fixes: 471d557afed1 ("Btrfs: fix loss of prealloc extents past i_size after fsync log replay") CC: stable@vger.kernel.org # 4.14+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/tree-log.c | 137 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 112 insertions(+), 25 deletions(-) commit 94c752f99954797da583a84c4907ff19e92550a4 Author: Paolo Abeni Date: Fri Apr 27 10:45:31 2018 +0200 netfilter: ebtables: handle string from userspace with care strlcpy() can't be safely used on a user-space provided string, as it can try to read beyond the buffer's end, if the latter is not NULL terminated. Leveraging the above, syzbot has been able to trigger the following splat: BUG: KASAN: stack-out-of-bounds in strlcpy include/linux/string.h:300 [inline] BUG: KASAN: stack-out-of-bounds in compat_mtw_from_user net/bridge/netfilter/ebtables.c:1957 [inline] BUG: KASAN: stack-out-of-bounds in ebt_size_mwt net/bridge/netfilter/ebtables.c:2059 [inline] BUG: KASAN: stack-out-of-bounds in size_entry_mwt net/bridge/netfilter/ebtables.c:2155 [inline] BUG: KASAN: stack-out-of-bounds in compat_copy_entries+0x96c/0x14a0 net/bridge/netfilter/ebtables.c:2194 Write of size 33 at addr ffff8801b0abf888 by task syz-executor0/4504 CPU: 0 PID: 4504 Comm: syz-executor0 Not tainted 4.17.0-rc2+ #40 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 memcpy+0x37/0x50 mm/kasan/kasan.c:303 strlcpy include/linux/string.h:300 [inline] compat_mtw_from_user net/bridge/netfilter/ebtables.c:1957 [inline] ebt_size_mwt net/bridge/netfilter/ebtables.c:2059 [inline] size_entry_mwt net/bridge/netfilter/ebtables.c:2155 [inline] compat_copy_entries+0x96c/0x14a0 net/bridge/netfilter/ebtables.c:2194 compat_do_replace+0x483/0x900 net/bridge/netfilter/ebtables.c:2285 compat_do_ebt_set_ctl+0x2ac/0x324 net/bridge/netfilter/ebtables.c:2367 compat_nf_sockopt net/netfilter/nf_sockopt.c:144 [inline] compat_nf_setsockopt+0x9b/0x140 net/netfilter/nf_sockopt.c:156 compat_ip_setsockopt+0xff/0x140 net/ipv4/ip_sockglue.c:1279 inet_csk_compat_setsockopt+0x97/0x120 net/ipv4/inet_connection_sock.c:1041 compat_tcp_setsockopt+0x49/0x80 net/ipv4/tcp.c:2901 compat_sock_common_setsockopt+0xb4/0x150 net/core/sock.c:3050 __compat_sys_setsockopt+0x1ab/0x7c0 net/compat.c:403 __do_compat_sys_setsockopt net/compat.c:416 [inline] __se_compat_sys_setsockopt net/compat.c:413 [inline] __ia32_compat_sys_setsockopt+0xbd/0x150 net/compat.c:413 do_syscall_32_irqs_on arch/x86/entry/common.c:323 [inline] do_fast_syscall_32+0x345/0xf9b arch/x86/entry/common.c:394 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7fb3cb9 RSP: 002b:00000000fff0c26c EFLAGS: 00000282 ORIG_RAX: 000000000000016e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000000000 RDX: 0000000000000080 RSI: 0000000020000300 RDI: 00000000000005f4 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the page: page:ffffea0006c2afc0 count:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x2fffc0000000000() raw: 02fffc0000000000 0000000000000000 0000000000000000 00000000ffffffff raw: 0000000000000000 ffffea0006c20101 0000000000000000 0000000000000000 page dumped because: kasan: bad access detected Fix the issue replacing the unsafe function with strscpy() and taking care of possible errors. Fixes: 81e675c227ec ("netfilter: ebtables: add CONFIG_COMPAT support") Reported-and-tested-by: syzbot+4e42a04e0bc33cb6c087@syzkaller.appspotmail.com Signed-off-by: Paolo Abeni Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebtables.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b71534583f22d08c3e3563bf5100aeb5f5c9fbe5 Author: Taehee Yoo Date: Wed May 16 22:10:37 2018 +0900 netfilter: nf_tables: fix NULL pointer dereference on nft_ct_helper_obj_dump() In the nft_ct_helper_obj_dump(), always priv->helper4 is dereferenced. But if family is ipv6, priv->helper6 should be dereferenced. Steps to reproduces: #test.nft table ip6 filter { ct helper ftp { type "ftp" protocol tcp } chain input { type filter hook input priority 4; ct helper set "ftp" } } %nft -f test.nft %nft list ruleset we can see the below messages: [ 916.286233] kasan: GPF could be caused by NULL-ptr deref or user memory access [ 916.294777] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 916.302613] Modules linked in: nft_objref nf_conntrack_sip nf_conntrack_snmp nf_conntrack_broadcast nf_conntrack_ftp nft_ct nf_conntrack nf_tables nfnetlink [last unloaded: nfnetlink] [ 916.318758] CPU: 1 PID: 2093 Comm: nft Not tainted 4.17.0-rc4+ #181 [ 916.326772] Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/08/2015 [ 916.338773] RIP: 0010:strlen+0x1a/0x90 [ 916.342781] RSP: 0018:ffff88010ff0f2f8 EFLAGS: 00010292 [ 916.346773] RAX: dffffc0000000000 RBX: ffff880119b26ee8 RCX: ffff88010c150038 [ 916.354777] RDX: 0000000000000002 RSI: ffff880119b26ee8 RDI: 0000000000000010 [ 916.362773] RBP: 0000000000000010 R08: 0000000000007e88 R09: ffff88010c15003c [ 916.370773] R10: ffff88010c150037 R11: ffffed002182a007 R12: ffff88010ff04040 [ 916.378779] R13: 0000000000000010 R14: ffff880119b26f30 R15: ffff88010ff04110 [ 916.387265] FS: 00007f57a1997700(0000) GS:ffff88011b800000(0000) knlGS:0000000000000000 [ 916.394785] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 916.402778] CR2: 00007f57a0ac80f0 CR3: 000000010ff02000 CR4: 00000000001006e0 [ 916.410772] Call Trace: [ 916.414787] nft_ct_helper_obj_dump+0x94/0x200 [nft_ct] [ 916.418779] ? nft_ct_set_eval+0x560/0x560 [nft_ct] [ 916.426771] ? memset+0x1f/0x40 [ 916.426771] ? __nla_reserve+0x92/0xb0 [ 916.434774] ? memcpy+0x34/0x50 [ 916.434774] nf_tables_fill_obj_info+0x484/0x860 [nf_tables] [ 916.442773] ? __nft_release_basechain+0x600/0x600 [nf_tables] [ 916.450779] ? lock_acquire+0x193/0x380 [ 916.454771] ? lock_acquire+0x193/0x380 [ 916.458789] ? nf_tables_dump_obj+0x148/0xcb0 [nf_tables] [ 916.462777] nf_tables_dump_obj+0x5f0/0xcb0 [nf_tables] [ 916.470769] ? __alloc_skb+0x30b/0x500 [ 916.474779] netlink_dump+0x752/0xb50 [ 916.478775] __netlink_dump_start+0x4d3/0x750 [ 916.482784] nf_tables_getobj+0x27a/0x930 [nf_tables] [ 916.490774] ? nft_obj_notify+0x100/0x100 [nf_tables] [ 916.494772] ? nf_tables_getobj+0x930/0x930 [nf_tables] [ 916.502579] ? nf_tables_dump_flowtable_done+0x70/0x70 [nf_tables] [ 916.506774] ? nft_obj_notify+0x100/0x100 [nf_tables] [ 916.514808] nfnetlink_rcv_msg+0x8ab/0xa86 [nfnetlink] [ 916.518771] ? nfnetlink_rcv_msg+0x550/0xa86 [nfnetlink] [ 916.526782] netlink_rcv_skb+0x23e/0x360 [ 916.530773] ? nfnetlink_bind+0x200/0x200 [nfnetlink] [ 916.534778] ? debug_check_no_locks_freed+0x280/0x280 [ 916.542770] ? netlink_ack+0x870/0x870 [ 916.546786] ? ns_capable_common+0xf4/0x130 [ 916.550765] nfnetlink_rcv+0x172/0x16c0 [nfnetlink] [ 916.554771] ? sched_clock_local+0xe2/0x150 [ 916.558774] ? sched_clock_cpu+0x144/0x180 [ 916.566575] ? lock_acquire+0x380/0x380 [ 916.570775] ? sched_clock_local+0xe2/0x150 [ 916.574765] ? nfnetlink_net_init+0x130/0x130 [nfnetlink] [ 916.578763] ? sched_clock_cpu+0x144/0x180 [ 916.582770] ? lock_acquire+0x193/0x380 [ 916.590771] ? lock_acquire+0x193/0x380 [ 916.594766] ? lock_acquire+0x380/0x380 [ 916.598760] ? netlink_deliver_tap+0x262/0xa60 [ 916.602766] ? lock_acquire+0x193/0x380 [ 916.606766] netlink_unicast+0x3ef/0x5a0 [ 916.610771] ? netlink_attachskb+0x630/0x630 [ 916.614763] netlink_sendmsg+0x72a/0xb00 [ 916.618769] ? netlink_unicast+0x5a0/0x5a0 [ 916.626766] ? _copy_from_user+0x92/0xc0 [ 916.630773] __sys_sendto+0x202/0x300 [ 916.634772] ? __ia32_sys_getpeername+0xb0/0xb0 [ 916.638759] ? lock_acquire+0x380/0x380 [ 916.642769] ? lock_acquire+0x193/0x380 [ 916.646761] ? finish_task_switch+0xf4/0x560 [ 916.650763] ? __schedule+0x582/0x19a0 [ 916.655301] ? __sched_text_start+0x8/0x8 [ 916.655301] ? up_read+0x1c/0x110 [ 916.655301] ? __do_page_fault+0x48b/0xaa0 [ 916.655301] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe [ 916.655301] __x64_sys_sendto+0xdd/0x1b0 [ 916.655301] do_syscall_64+0x96/0x3d0 [ 916.655301] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 916.655301] RIP: 0033:0x7f57a0ff5e03 [ 916.655301] RSP: 002b:00007fff6367e0a8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c [ 916.655301] RAX: ffffffffffffffda RBX: 00007fff6367f1e0 RCX: 00007f57a0ff5e03 [ 916.655301] RDX: 0000000000000020 RSI: 00007fff6367e110 RDI: 0000000000000003 [ 916.655301] RBP: 00007fff6367e100 R08: 00007f57a0ce9160 R09: 000000000000000c [ 916.655301] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff6367e110 [ 916.655301] R13: 0000000000000020 R14: 00007f57a153c610 R15: 0000562417258de0 [ 916.655301] Code: ff ff ff 0f 1f 40 00 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 fa 53 48 c1 ea 03 48 b8 00 00 00 00 00 fc ff df 48 89 fd 48 83 ec 08 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f [ 916.655301] RIP: strlen+0x1a/0x90 RSP: ffff88010ff0f2f8 [ 916.771929] ---[ end trace 1065e048e72479fe ]--- [ 916.777204] Kernel panic - not syncing: Fatal exception [ 916.778158] Kernel Offset: 0x14000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) Signed-off-by: Taehee Yoo Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_ct.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit dbad41e7bb5f4b9949ff5ea1d76c20711f326308 Author: Srinivas Kandagatla Date: Thu May 17 10:42:32 2018 +0100 dmaengine: qcom: bam_dma: check if the runtime pm enabled Disabling pm runtime at probe is not sufficient to get BAM working on remotely controller instances. pm_runtime_get_sync() would return -EACCES in such cases. So check if runtime pm is enabled before returning error from bam functions. Fixes: 5b4a68952a89 ("dmaengine: qcom: bam_dma: disable runtime pm on remote controlled") Signed-off-by: Srinivas Kandagatla Signed-off-by: Vinod Koul drivers/dma/qcom/bam_dma.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit f4a551b72358facbbe5714248dff78404272feee Author: David Hildenbrand Date: Wed May 9 16:12:17 2018 +0200 KVM: s390: vsie: fix < 8k check for the itdba By missing an "L", we might detect some addresses to be <8k, although they are not. e.g. for itdba = 100001fff !(gpa & ~0x1fffU) -> 1 !(gpa & ~0x1fffUL) -> 0 So we would report a SIE validity intercept although everything is fine. Fixes: 166ecb3 ("KVM: s390: vsie: support transactional execution") Reported-by: Dan Carpenter Reviewed-by: Christian Borntraeger Reviewed-by: Janosch Frank Reviewed-by: Cornelia Huck Signed-off-by: David Hildenbrand Signed-off-by: Janosch Frank Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Christian Borntraeger arch/s390/kvm/vsie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df158189dbcc2e0ee29dc4b917d45ee5bf25a35e Author: Paul Mackerras Date: Thu May 17 14:47:59 2018 +1000 KVM: PPC: Book 3S HV: Do ptesync in radix guest exit path A radix guest can execute tlbie instructions to invalidate TLB entries. After a tlbie or a group of tlbies, it must then do the architected sequence eieio; tlbsync; ptesync to ensure that the TLB invalidation has been processed by all CPUs in the system before it can rely on no CPU using any translation that it just invalidated. In fact it is the ptesync which does the actual synchronization in this sequence, and hardware has a requirement that the ptesync must be executed on the same CPU thread as the tlbies which it is expected to order. Thus, if a vCPU gets moved from one physical CPU to another after it has done some tlbies but before it can get to do the ptesync, the ptesync will not have the desired effect when it is executed on the second physical CPU. To fix this, we do a ptesync in the exit path for radix guests. If there are any pending tlbies, this will wait for them to complete. If there aren't, then ptesync will just do the same as sync. Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_rmhandlers.S | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9dc81d6b0f1e3c40bdf97671dd26a24f128e1182 Author: Benjamin Herrenschmidt Date: Thu May 10 13:06:42 2018 +1000 KVM: PPC: Book3S HV: XIVE: Resend re-routed interrupts on CPU priority change When a vcpu priority (CPPR) is set to a lower value (masking more interrupts), we stop processing interrupts already in the queue for the priorities that have now been masked. If those interrupts were previously re-routed to a different CPU, they might still be stuck until the older one that has them in its queue processes them. In the case of guest CPU unplug, that can be never. To address that without creating additional overhead for the normal interrupt processing path, this changes H_CPPR handling so that when such a priority change occurs, we scan the interrupt queue for that vCPU, and for any interrupt in there that has been re-routed, we replace it with a dummy and force a re-trigger. Signed-off-by: Benjamin Herrenschmidt Tested-by: Alexey Kardashevskiy Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_xive_template.c | 108 +++++++++++++++++++++++++++++--- 1 file changed, 101 insertions(+), 7 deletions(-) commit 7e3d9a1d0f2c681456a2e04b8ba9a2fb448fe515 Author: Nicholas Piggin Date: Wed May 9 12:20:15 2018 +1000 KVM: PPC: Book3S HV: Make radix clear pte when unmapping The current partition table unmap code clears the _PAGE_PRESENT bit out of the pte, which leaves pud_huge/pmd_huge true and does not clear pud_present/pmd_present. This can confuse subsequent page faults and possibly lead to the guest looping doing continual hypervisor page faults. Signed-off-by: Nicholas Piggin Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_radix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2560b108fb1375b5fab196c1ec0d910bbe8a38b Author: Nicholas Piggin Date: Wed May 9 12:20:14 2018 +1000 KVM: PPC: Book3S HV: Make radix use correct tlbie sequence in kvmppc_radix_tlbie_page The standard eieio ; tlbsync ; ptesync must follow tlbie to ensure it is ordered with respect to subsequent operations. Signed-off-by: Nicholas Piggin Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_radix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 57b8daa70a179bc23cc4240420ab6fbcdd7faf77 Author: Paul Mackerras Date: Fri Apr 20 22:51:11 2018 +1000 KVM: PPC: Book3S HV: Snapshot timebase offset on guest entry Currently, the HV KVM guest entry/exit code adds the timebase offset from the vcore struct to the timebase on guest entry, and subtracts it on guest exit. Which is fine, except that it is possible for userspace to change the offset using the SET_ONE_REG interface while the vcore is running, as there is only one timebase offset per vcore but potentially multiple VCPUs in the vcore. If that were to happen, KVM would subtract a different offset on guest exit from that which it had added on guest entry, leading to the timebase being out of sync between cores in the host, which then leads to bad things happening such as hangs and spurious watchdog timeouts. To fix this, we add a new field 'tb_offset_applied' to the vcore struct which stores the offset that is currently applied to the timebase. This value is set from the vcore tb_offset field on guest entry, and is what is subtracted from the timebase on guest exit. Since it is zero when the timebase offset is not applied, we can simplify the logic in kvmhv_start_timing and kvmhv_accumulate_time. In addition, we had secondary threads reading the timebase while running concurrently with code on the primary thread which would eventually add or subtract the timebase offset from the timebase. This occurred while saving or restoring the DEC register value on the secondary threads. Although no specific incorrect behaviour has been observed, this is a race which should be fixed. To fix it, we move the DEC saving code to just before we call kvmhv_commence_exit, and the DEC restoring code to after the point where we have waited for the primary thread to switch the MMU context and add the timebase offset. That way we are sure that the timebase contains the guest timebase value in both cases. Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_book3s.h | 1 + arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kvm/book3s_hv.c | 1 + arch/powerpc/kvm/book3s_hv_rmhandlers.S | 89 ++++++++++++++++----------------- 4 files changed, 47 insertions(+), 45 deletions(-) commit bc91d1810f70ed0b31df1c5ac879c43e35b9e330 Merge: 3d3aa96 91ba9f2 Author: Dave Airlie Date: Thu May 17 12:00:53 2018 +1000 Merge branch 'vmwgfx-fixes-4.17' of git://people.freedesktop.org/~thomash/linux into drm-fixes A single fix for a recent regression. * 'vmwgfx-fixes-4.17' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: Set dmabuf_size when vmw_dmabuf_init is successful commit 3d3aa969cbb4f0a5586798de7885309c6550af18 Merge: 76ef6b2 2b62072 Author: Dave Airlie Date: Thu May 17 12:00:17 2018 +1000 Merge tag 'drm-misc-fixes-2018-05-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes - core: Fix regression in dev node offsets (Haneen) - vc4: Fix memory leak on driver close (Eric) - dumb-buffers: Prevent overflow in DIV_ROUND_UP() (Dan) Cc: Haneen Mohammed Cc: Eric Anholt Cc: Dan Carpenter * tag 'drm-misc-fixes-2018-05-16' of git://anongit.freedesktop.org/drm/drm-misc: drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl() drm/vc4: Fix leak of the file_priv that stored the perfmon. drm: Match sysfs name in link removal to link creation commit e6506eb241871d68647c53cb6d0a16299550ae97 Merge: 9d38cd0 45dd9b0 Author: Linus Torvalds Date: Wed May 16 16:45:23 2018 -0700 Merge tag 'trace-v4.17-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Some of the ftrace internal events use a zero for a data size of a field event. This is increasingly important for the histogram trigger work that is being extended. While auditing trace events, I found that a couple of the xen events were used as just marking that a function was called, by creating a static array of size zero. This can play havoc with the tracing features if these events are used, because a zero size of a static array is denoted as a special nul terminated dynamic array (this is what the trace_marker code uses). But since the xen events have no size, they are not nul terminated, and unexpected results may occur. As trace events were never intended on being a marker to denote that a function was hit or not, especially since function tracing and kprobes can trivially do the same, the best course of action is to simply remove these events" * tag 'trace-v4.17-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing/x86/xen: Remove zero data size trace events trace_xen_mmu_flush_tlb{_all} commit 1fba5868eed82766fb374c7d367166706f9269d5 Author: Marc Dionne Date: Wed May 16 11:04:23 2018 -0300 afs: Fix mounting of backup volumes In theory the AFS_VLSF_BACKVOL flag for a server in a vldb entry would indicate the presence of a backup volume on that server. In practice however, this flag is never set, and the presence of a backup volume is implied by the entry having AFS_VLF_BACKEXISTS set, for the server that hosts the read-write volume (has AFS_VLSF_RWVOL). Signed-off-by: Marc Dionne Signed-off-by: David Howells fs/afs/vlclient.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 378831e4daec75fbba6d3612bcf3b4dd00ddbf08 Author: David Howells Date: Wed May 16 21:25:46 2018 +0100 afs: Fix directory permissions check Doing faccessat("/afs/some/directory", 0) triggers a BUG in the permissions check code. Fix this by just removing the BUG section. If no permissions are asked for, just return okay if the file exists. Also: (1) Split up the directory check so that it has separate if-statements rather than if-else-if (e.g. checking for MAY_EXEC shouldn't skip the check for MAY_READ and MAY_WRITE). (2) Check for MAY_CHDIR as MAY_EXEC. Without the main fix, the following BUG may occur: kernel BUG at fs/afs/security.c:386! invalid opcode: 0000 [#1] SMP PTI ... RIP: 0010:afs_permission+0x19d/0x1a0 [kafs] ... Call Trace: ? inode_permission+0xbe/0x180 ? do_faccessat+0xdc/0x270 ? do_syscall_64+0x60/0x1f0 ? entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: 00d3b7a4533e ("[AFS]: Add security support.") Reported-by: Jonathan Billings Signed-off-by: David Howells fs/afs/security.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 7063efd33bb15abc0160347f89eb5aba6b7d000e Author: Jason Wang Date: Wed May 16 20:39:33 2018 +0800 tuntap: fix use after free during release After commit b196d88aba8a ("tun: fix use after free for ptr_ring") we need clean up tx ring during release(). But unfortunately, it tries to do the cleanup blindly after socket were destroyed which will lead another use-after-free. Fix this by doing the cleanup before dropping the last reference of the socket in __tun_detach(). Reported-by: Andrei Vagin Acked-by: Andrei Vagin Fixes: b196d88aba8a ("tun: fix use after free for ptr_ring") Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fee8fb952d1e1c1a60e2017878a16cf83c92c154 Merge: 5a4931ae 490068d Author: David S. Miller Date: Wed May 16 14:52:30 2018 -0400 Merge branch 'qed-LL2-fixes' Michal Kalderon says: ==================== qed: LL2 fixes This series fixes some issues in ll2 related to synchronization and resource freeing ==================== Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 490068deaef0c76e47bf89c457de899b7d3995c7 Author: Michal Kalderon Date: Wed May 16 14:44:40 2018 +0300 qed: Fix LL2 race during connection terminate Stress on qedi/qedr load unload lead to list_del corruption. This is due to ll2 connection terminate freeing resources without verifying that no more ll2 processing will occur. This patch unregisters the ll2 status block before terminating the connection to assure this race does not occur. Fixes: 1d6cff4fca4366 ("qed: Add iSCSI out of order packet handling") Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit ffd2c0d12752a69e480366031ec7a7d723dd2510 Author: Michal Kalderon Date: Wed May 16 14:44:39 2018 +0300 qed: Fix possibility of list corruption during rmmod flows The ll2 flows of flushing the txq/rxq need to be synchronized with the regular fp processing. Caused list corruption during load/unload stress tests. Fixes: 0a7fb11c23c0f ("qed: Add Light L2 support") Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit f9bcd60274a565751abef622f9018badd01a17c8 Author: Michal Kalderon Date: Wed May 16 14:44:38 2018 +0300 qed: LL2 flush isles when connection is closed Driver should free all pending isles once it gets a FLUSH cqe from FW. Part of iSCSI out of order flow. Fixes: 1d6cff4fca4366 ("qed: Add iSCSI out of order packet handling") Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 5a4931ae0193f8a4a97e8260fd0df1d705d83299 Author: Davide Caratti Date: Wed May 16 12:54:29 2018 +0200 net/sched: fix refcnt leak in the error path of tcf_vlan_init() Similarly to what was done with commit a52956dfc503 ("net sched actions: fix refcnt leak in skbmod"), fix the error path of tcf_vlan_init() to avoid refcnt leaks when wrong value of TCA_VLAN_PUSH_VLAN_PROTOCOL is given. Fixes: 5026c9b1bafc ("net sched: vlan action fix late binding") CC: Roman Mashak Signed-off-by: Davide Caratti Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_vlan.c | 2 ++ 1 file changed, 2 insertions(+) commit e49ac9679eeb30abeb462cb459cc3ea8c81fbd1f Author: Geert Uytterhoeven Date: Wed May 16 11:18:01 2018 +0200 net: 8390: ne: Fix accidentally removed RBTX4927 support The configuration settings for RBTX4927 were accidentally removed, leading to a silently broken network interface. Re-add the missing settings to fix this. Fixes: 8eb97ff5a4ec941d ("net: 8390: remove m32r specific bits") Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/8390/ne.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ac22bfb15c83636c28df2754456fb0a00c6e82da Merge: e1b505a 1942adf Author: David S. Miller Date: Wed May 16 14:11:23 2018 -0400 Merge branch 'dsa-bcm_sf2-CFP-fixes' Florian Fainelli says: ==================== net: dsa: bcm_sf2: CFP fixes This patch series fixes a number of usability issues with the SF2 Compact Field Processor code: - we would not be properly bound checking the location when we let the kernel automatically place rules with RX_CLS_LOC_ANY - when using IPv6 rules and user space specifies a location identifier we would be off by one in what the chain ID (within the Broadcom tag) indicates - it would be possible to delete one of the two slices of an IPv6 while leaving the other one programming leading to various problems ==================== Signed-off-by: David S. Miller commit 1942adf64214df370350aa46954ba27654456f68 Author: Florian Fainelli Date: Tue May 15 16:01:25 2018 -0700 net: dsa: bcm_sf2: Fix IPv6 rule half deletion It was possible to delete only one half of an IPv6, which would leave the second half still programmed and possibly in use. Instead of checking for the unused bitmap, we need to check the unique bitmap, and refuse any deletion that does not match that criteria. We also need to move that check from bcm_sf2_cfp_rule_del_one() into its caller: bcm_sf2_cfp_rule_del() otherwise we would not be able to delete second halves anymore that would not pass the first test. Fixes: ba0696c22e7c ("net: dsa: bcm_sf2: Add support for IPv6 CFP rules") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2_cfp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 6c05561c541843b2bec2189f680bed6d20afc25b Author: Florian Fainelli Date: Tue May 15 16:01:24 2018 -0700 net: dsa: bcm_sf2: Fix IPv6 rules and chain ID We had several issues that would make the programming of IPv6 rules both inconsistent and error prone: - the chain ID that we would be asking the hardware to put in the packet's Broadcom tag would be off by one, it would return one of the two indexes, but not the one user-space specified - when an user specified a particular location to insert a CFP rule at, we would not be returning the same index, which would be confusing if nothing else - finally, like IPv4, it would be possible to overflow the last entry by re-programming it Fix this by swapping the usage of rule_index[0] and rule_index[1] where relevant in order to return a consistent and correct user-space experience. Fixes: ba0696c22e7c ("net: dsa: bcm_sf2: Add support for IPv6 CFP rules") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2_cfp.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 43a5e00f38fe8933a1c716bfe5b30e97f749d94b Author: Florian Fainelli Date: Tue May 15 16:01:23 2018 -0700 net: dsa: bcm_sf2: Fix RX_CLS_LOC_ANY overwrite for last rule When we let the kernel pick up a rule location with RX_CLS_LOC_ANY, we would be able to overwrite the last rules because of a number of issues. The IPv4 code path would not be checking that rule_index is within bounds, and it would also only be allowed to pick up rules from range 0..126 instead of the full 0..127 range. This would lead us to allow overwriting the last rule when we let the kernel pick-up the location. Fixes: 3306145866b6 ("net: dsa: bcm_sf2: Move IPv4 CFP processing to specific functions") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2_cfp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9d38cd06c3e332093da2c486307395b302e2e31f Merge: 21b9f1c 85f4f12 Author: Linus Torvalds Date: Wed May 16 11:02:54 2018 -0700 Merge tag 'trace-v4.17-rc5-vsprintf' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull memory barrier for from Steven Rostedt: "The memory barrier usage in updating the random ptr hash for %p in vsprintf is incorrect. Instead of adding the read memory barrier into vsprintf() which will cause a slight degradation to a commonly used function in the kernel just to solve a very unlikely race condition that can only happen at boot up, change the code from using a variable branch to a static_branch. Not only does this solve the race condition, it actually will improve the performance of vsprintf() by removing the conditional branch that is only needed at boot" * tag 'trace-v4.17-rc5-vsprintf' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: vsprintf: Replace memory barrier with static_key for random_ptr_key update commit c171654caa875919be3c533d3518da8be5be966e Author: Shuah Khan (Samsung OSG) Date: Tue May 15 17:57:23 2018 -0600 usbip: usbip_host: fix bad unlock balance during stub_probe() stub_probe() calls put_busid_priv() in an error path when device isn't found in the busid_table. Fix it by making put_busid_priv() safe to be called with null struct bus_id_priv pointer. This problem happens when "usbip bind" is run without loading usbip_host driver and then running modprobe. The first failed bind attempt unbinds the device from the original driver and when usbip_host is modprobed, stub_probe() runs and doesn't find the device in its busid table and calls put_busid_priv(0 with null bus_id_priv pointer. usbip-host 3-10.2: 3-10.2 is not in match_busid table... skip! [ 367.359679] ===================================== [ 367.359681] WARNING: bad unlock balance detected! [ 367.359683] 4.17.0-rc4+ #5 Not tainted [ 367.359685] ------------------------------------- [ 367.359688] modprobe/2768 is trying to release lock ( [ 367.359689] ================================================================== [ 367.359696] BUG: KASAN: null-ptr-deref in print_unlock_imbalance_bug+0x99/0x110 [ 367.359699] Read of size 8 at addr 0000000000000058 by task modprobe/2768 [ 367.359705] CPU: 4 PID: 2768 Comm: modprobe Not tainted 4.17.0-rc4+ #5 Fixes: 22076557b07c ("usbip: usbip_host: fix NULL-ptr deref and use-after-free errors") in usb-linus Signed-off-by: Shuah Khan (Samsung OSG) Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e1b505a60366399d735312ca38b0a6753a684123 Author: Markus Niebel Date: Tue May 15 10:18:56 2018 +0200 net: phy: micrel: add 125MHz reference clock workaround The micrel KSZ9031 phy has a optional clock pin (CLK125_NDO) which can be used as reference clock for the MAC unit. The clock signal must meet the RGMII requirements to ensure the correct data transmission between the MAC and the PHY. The KSZ9031 phy does not fulfill the duty cycle requirement if the phy is configured as slave. For a complete describtion look at the errata sheets: DS80000691D or DS80000692D. The errata sheet recommends to force the phy into master mode whenever there is a 1000Base-T link-up as work around. Only set the "micrel,force-master" property if you use the phy reference clock provided by CLK125_NDO pin as MAC reference clock in your application. Attenation, this workaround is only usable if the link partner can be configured to slave mode for 1000Base-T. Signed-off-by: Markus Niebel [m.felsch@pengutronix.de: fix dt-binding documentation] [m.felsch@pengutronix.de: use already existing result var for read/write] [m.felsch@pengutronix.de: add error handling] [m.felsch@pengutronix.de: add more comments] Signed-off-by: Marco Felsch Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller .../devicetree/bindings/net/micrel-ksz90x1.txt | 7 +++++ drivers/net/phy/micrel.c | 31 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit 7f582b248d0a86bae5788c548d7bb5bca6f7691a Author: Eric Dumazet Date: Mon May 14 21:14:26 2018 -0700 tcp: purge write queue in tcp_connect_init() syzkaller found a reliable way to crash the host, hitting a BUG() in __tcp_retransmit_skb() Malicous MSG_FASTOPEN is the root cause. We need to purge write queue in tcp_connect_init() at the point we init snd_una/write_seq. This patch also replaces the BUG() by a less intrusive WARN_ON_ONCE() kernel BUG at net/ipv4/tcp_output.c:2837! invalid opcode: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 5276 Comm: syz-executor0 Not tainted 4.17.0-rc3+ #51 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__tcp_retransmit_skb+0x2992/0x2eb0 net/ipv4/tcp_output.c:2837 RSP: 0000:ffff8801dae06ff8 EFLAGS: 00010206 RAX: ffff8801b9fe61c0 RBX: 00000000ffc18a16 RCX: ffffffff864e1a49 RDX: 0000000000000100 RSI: ffffffff864e2e12 RDI: 0000000000000005 RBP: ffff8801dae073a0 R08: ffff8801b9fe61c0 R09: ffffed0039c40dd2 R10: ffffed0039c40dd2 R11: ffff8801ce206e93 R12: 00000000421eeaad R13: ffff8801ce206d4e R14: ffff8801ce206cc0 R15: ffff8801cd4f4a80 FS: 0000000000000000(0000) GS:ffff8801dae00000(0063) knlGS:00000000096bc900 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 0000000020000000 CR3: 00000001c47b6000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tcp_retransmit_skb+0x2e/0x250 net/ipv4/tcp_output.c:2923 tcp_retransmit_timer+0xc50/0x3060 net/ipv4/tcp_timer.c:488 tcp_write_timer_handler+0x339/0x960 net/ipv4/tcp_timer.c:573 tcp_write_timer+0x111/0x1d0 net/ipv4/tcp_timer.c:593 call_timer_fn+0x230/0x940 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x79e/0xc50 kernel/time/timer.c:1666 run_timer_softirq+0x4c/0x70 kernel/time/timer.c:1692 __do_softirq+0x2e0/0xaf5 kernel/softirq.c:285 invoke_softirq kernel/softirq.c:365 [inline] irq_exit+0x1d1/0x200 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:525 [inline] smp_apic_timer_interrupt+0x17e/0x710 arch/x86/kernel/apic/apic.c:1052 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:863 Fixes: cf60af03ca4e ("net-tcp: Fast Open client - sendmsg(MSG_FASTOPEN)") Signed-off-by: Eric Dumazet Cc: Yuchung Cheng Cc: Neal Cardwell Reported-by: syzbot Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e3ca34880652250f524022ad89e516f8ba9a805b Author: Saeed Mahameed Date: Mon May 14 15:38:10 2018 -0700 net/mlx5: Fix build break when CONFIG_SMP=n Avoid using the kernel's irq_descriptor and return IRQ vector affinity directly from the driver. This fixes the following build break when CONFIG_SMP=n include/linux/mlx5/driver.h: In function ‘mlx5_get_vector_affinity_hint’: include/linux/mlx5/driver.h:1299:13: error: ‘struct irq_desc’ has no member named ‘affinity_hint’ Fixes: 6082d9c9c94a ("net/mlx5: Fix mlx5_get_vector_affinity function") Signed-off-by: Saeed Mahameed CC: Randy Dunlap CC: Guenter Roeck CC: Thomas Gleixner Tested-by: Israel Rukshin Reported-by: kbuild test robot Reported-by: Randy Dunlap Tested-by: Randy Dunlap Acked-by: Thomas Gleixner Tested-by: Guenter Roeck Signed-off-by: David S. Miller include/linux/mlx5/driver.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit ab452c3ce7bacb27ffe2fc0144aecd0c399e1e24 Author: Keefe Liu Date: Mon May 14 19:38:09 2018 +0800 ipvlan: call netdevice notifier when master mac address changed When master device's mac has been changed, the commit 32c10bbfe914 ("ipvlan: always use the current L2 addr of the master") makes the IPVlan devices's mac changed also, but it doesn't do related works such as flush the IPVlan devices's arp table. Signed-off-by: Keefe Liu Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2b6207291b7b277a5df9d1aab44b56815a292dba Author: Dan Carpenter Date: Wed May 16 17:00:26 2018 +0300 drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl() There is a comment here which says that DIV_ROUND_UP() and that's where the problem comes from. Say you pick: args->bpp = UINT_MAX - 7; args->width = 4; args->height = 1; The integer overflow in DIV_ROUND_UP() means "cpp" is UINT_MAX / 8 and because of how we picked args->width that means cpp < UINT_MAX / 4. I've fixed it by preventing the integer overflow in DIV_ROUND_UP(). I removed the check for !cpp because it's not possible after this change. I also changed all the 0xffffffffU references to U32_MAX. Signed-off-by: Dan Carpenter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180516140026.GA19340@mwanda drivers/gpu/drm/drm_dumb_buffers.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 85f4f12d51397f1648e1f4350f77e24039b82d61 Author: Steven Rostedt (VMware) Date: Tue May 15 22:24:52 2018 -0400 vsprintf: Replace memory barrier with static_key for random_ptr_key update Reviewing Tobin's patches for getting pointers out early before entropy has been established, I noticed that there's a lone smp_mb() in the code. As with most lone memory barriers, this one appears to be incorrectly used. We currently basically have this: get_random_bytes(&ptr_key, sizeof(ptr_key)); /* * have_filled_random_ptr_key==true is dependent on get_random_bytes(). * ptr_to_id() needs to see have_filled_random_ptr_key==true * after get_random_bytes() returns. */ smp_mb(); WRITE_ONCE(have_filled_random_ptr_key, true); And later we have: if (unlikely(!have_filled_random_ptr_key)) return string(buf, end, "(ptrval)", spec); /* Missing memory barrier here. */ hashval = (unsigned long)siphash_1u64((u64)ptr, &ptr_key); As the CPU can perform speculative loads, we could have a situation with the following: CPU0 CPU1 ---- ---- load ptr_key = 0 store ptr_key = random smp_mb() store have_filled_random_ptr_key load have_filled_random_ptr_key = true BAD BAD BAD! (you're so bad!) Because nothing prevents CPU1 from loading ptr_key before loading have_filled_random_ptr_key. But this race is very unlikely, but we can't keep an incorrect smp_mb() in place. Instead, replace the have_filled_random_ptr_key with a static_branch not_filled_random_ptr_key, that is initialized to true and changed to false when we get enough entropy. If the update happens in early boot, the static_key is updated immediately, otherwise it will have to wait till entropy is filled and this happens in an interrupt handler which can't enable a static_key, as that requires a preemptible context. In that case, a work_queue is used to enable it, as entropy already took too long to establish in the first place waiting a little more shouldn't hurt anything. The benefit of using the static key is that the unlikely branch in vsprintf() now becomes a nop. Link: http://lkml.kernel.org/r/20180515100558.21df515e@gandalf.local.home Cc: stable@vger.kernel.org Fixes: ad67b74d2469d ("printk: hash addresses printed with %p") Acked-by: Linus Torvalds Signed-off-by: Steven Rostedt (VMware) lib/vsprintf.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 589bb62be316401603453c7d2d3c60ad8b9c3cf3 Author: Kirill A. Shutemov Date: Wed May 16 11:01:29 2018 +0300 x86/boot/compressed/64: Fix moving page table out of trampoline memory cleanup_trampoline() relocates the top-level page table out of trampoline memory. We use 'top_pgtable' as our new top-level page table. But if the 'top_pgtable' would be referenced from C in a usual way, the address of the table will be calculated relative to RIP. After kernel gets relocated, the address will be in the middle of decompression buffer and the page table may get overwritten. This leads to a crash. We calculate the address of other page tables relative to the relocation address. It makes them safe. We should do the same for 'top_pgtable'. Calculate the address of 'top_pgtable' in assembly and pass down to cleanup_trampoline(). Move the page table to .pgtable section where the rest of page tables are. The section is @nobits so we save 4k in kernel image. Signed-off-by: Kirill A. Shutemov Reviewed-by: Thomas Gleixner Cc: Hugh Dickins Cc: Linus Torvalds Cc: Peter Zijlstra Fixes: e9d0e6330eb8 ("x86/boot/compressed/64: Prepare new top-level page table for trampoline") Link: http://lkml.kernel.org/r/20180516080131.27913-3-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/head_64.S | 11 +++++++++++ arch/x86/boot/compressed/pgtable_64.c | 14 +++----------- 2 files changed, 14 insertions(+), 11 deletions(-) commit 5c9b0b1c49881c680d4a56b9d9e03dfb3160fd4d Author: Kirill A. Shutemov Date: Wed May 16 11:01:28 2018 +0300 x86/boot/compressed/64: Set up GOT for paging_prepare() and cleanup_trampoline() Eric and Hugh have reported instant reboot due to my recent changes in decompression code. The root cause is that I didn't realize that we need to adjust GOT to be able to run C code that early. The problem is only visible with an older toolchain. Binutils >= 2.24 is able to eliminate GOT references by replacing them with RIP-relative address loads: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=80d873266dec We need to adjust GOT two times: - before calling paging_prepare() using the initial load address - before calling C code from the relocated kernel Reported-by: Eric Dumazet Reported-by: Hugh Dickins Signed-off-by: Kirill A. Shutemov Reviewed-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Fixes: 194a9749c73d ("x86/boot/compressed/64: Handle 5-level paging boot if kernel is above 4G") Link: http://lkml.kernel.org/r/20180516080131.27913-2-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/head_64.S | 68 ++++++++++++++++++++++++++++++-------- 1 file changed, 55 insertions(+), 13 deletions(-) commit 5a817641f68a6399a5fac8b7d2da67a73698ffed Author: Waiman Long Date: Tue May 15 17:49:51 2018 -0400 locking/percpu-rwsem: Annotate rwsem ownership transfer by setting RWSEM_OWNER_UNKNOWN The filesystem freezing code needs to transfer ownership of a rwsem embedded in a percpu-rwsem from the task that does the freezing to another one that does the thawing by calling percpu_rwsem_release() after freezing and percpu_rwsem_acquire() before thawing. However, the new rwsem debug code runs afoul with this scheme by warning that the task that releases the rwsem isn't the one that acquires it, as reported by Amir Goldstein: DEBUG_LOCKS_WARN_ON(sem->owner != get_current()) WARNING: CPU: 1 PID: 1401 at /home/amir/build/src/linux/kernel/locking/rwsem.c:133 up_write+0x59/0x79 Call Trace: percpu_up_write+0x1f/0x28 thaw_super_locked+0xdf/0x120 do_vfs_ioctl+0x270/0x5f1 ksys_ioctl+0x52/0x71 __x64_sys_ioctl+0x16/0x19 do_syscall_64+0x5d/0x167 entry_SYSCALL_64_after_hwframe+0x49/0xbe To work properly with the rwsem debug code, we need to annotate that the rwsem ownership is unknown during the tranfer period until a brave soul comes forward to acquire the ownership. During that period, optimistic spinning will be disabled. Reported-by: Amir Goldstein Tested-by: Amir Goldstein Signed-off-by: Waiman Long Acked-by: Peter Zijlstra Cc: Andrew Morton Cc: Davidlohr Bueso Cc: Jan Kara Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Oleg Nesterov Cc: Paul E. McKenney Cc: Theodore Y. Ts'o Cc: Thomas Gleixner Cc: Will Deacon Cc: linux-fsdevel@vger.kernel.org Link: http://lkml.kernel.org/r/1526420991-21213-3-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar include/linux/percpu-rwsem.h | 6 +++++- include/linux/rwsem.h | 6 ++++++ kernel/locking/rwsem-xadd.c | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) commit d7d760efad70c7a030725499bf9f342f04af24dd Author: Waiman Long Date: Tue May 15 17:49:50 2018 -0400 locking/rwsem: Add a new RWSEM_ANONYMOUSLY_OWNED flag There are use cases where a rwsem can be acquired by one task, but released by another task. In thess cases, optimistic spinning may need to be disabled. One example will be the filesystem freeze/thaw code where the task that freezes the filesystem will acquire a write lock on a rwsem and then un-owns it before returning to userspace. Later on, another task will come along, acquire the ownership, thaw the filesystem and release the rwsem. Bit 0 of the owner field was used to designate that it is a reader owned rwsem. It is now repurposed to mean that the owner of the rwsem is not known. If only bit 0 is set, the rwsem is reader owned. If bit 0 and other bits are set, it is writer owned with an unknown owner. One such value for the latter case is (-1L). So we can set owner to 1 for reader-owned, -1 for writer-owned. The owner is unknown in both cases. To handle transfer of rwsem ownership, the higher level code should set the owner field to -1 to indicate a write-locked rwsem with unknown owner. Optimistic spinning will be disabled in this case. Once the higher level code figures who the new owner is, it can then set the owner field accordingly. Tested-by: Amir Goldstein Signed-off-by: Waiman Long Acked-by: Peter Zijlstra Cc: Andrew Morton Cc: Davidlohr Bueso Cc: Jan Kara Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Oleg Nesterov Cc: Paul E. McKenney Cc: Theodore Y. Ts'o Cc: Thomas Gleixner Cc: Will Deacon Cc: linux-fsdevel@vger.kernel.org Link: http://lkml.kernel.org/r/1526420991-21213-2-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/rwsem-xadd.c | 17 +++++++---------- kernel/locking/rwsem.c | 2 -- kernel/locking/rwsem.h | 30 +++++++++++++++++++++--------- 3 files changed, 28 insertions(+), 21 deletions(-) commit b579f924a90f42fa561afd8201514fc216b71949 Author: Michel Thierry Date: Mon May 14 09:54:45 2018 -0700 drm/i915/gen9: Add WaClearHIZ_WM_CHICKEN3 for bxt and glk Factor in clear values wherever required while updating destination min/max. References: HSDES#1604444184 Signed-off-by: Michel Thierry Cc: mesa-dev@lists.freedesktop.org Cc: Mika Kuoppala Cc: Oscar Mateo Reviewed-by: Mika Kuoppala Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180510200708.18097-1-michel.thierry@intel.com Cc: stable@vger.kernel.org Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180514165445.9198-1-michel.thierry@intel.com (backported from commit 0c79f9cb77eae28d48a4f9fc1b3341aacbbd260c) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++++ 2 files changed, 7 insertions(+) commit 91ba9f28a3de97761c2b5fd5df5d88421268e507 Author: Deepak Rawat Date: Tue May 15 15:39:09 2018 +0200 drm/vmwgfx: Set dmabuf_size when vmw_dmabuf_init is successful SOU primary plane prepare_fb hook depends upon dmabuf_size to pin up BO (and not call a new vmw_dmabuf_init) when a new fb size is same as current fb. This was changed in a recent commit which is causing page_flip to fail on VM with low display memory and multi-mon failure when cycle monitors from secondary display. Cc: # 4.14, 4.16 Fixes: 20fb5a635a0c ("drm/vmwgfx: Unpin the screen object backup buffer when not used") Signed-off-by: Deepak Rawat Reviewed-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 2 ++ 1 file changed, 2 insertions(+) commit 8e907ed4882714fd13cfe670681fc6cb5284c780 Author: Lidong Chen Date: Tue May 8 16:50:16 2018 +0800 IB/umem: Use the correct mm during ib_umem_release User-space may invoke ibv_reg_mr and ibv_dereg_mr in different threads. If ibv_dereg_mr is called after the thread which invoked ibv_reg_mr has exited, get_pid_task will return NULL and ib_umem_release will not decrease mm->pinned_vm. Instead of using threads to locate the mm, use the overall tgid from the ib_ucontext struct instead. This matches the behavior of ODP and disassociate in handling the mm of the process that called ibv_reg_mr. Cc: Fixes: 87773dd56d54 ("IB: ib_umem_release() should decrement mm->pinned_vm from ib_umem_get") Signed-off-by: Lidong Chen Signed-off-by: Jason Gunthorpe drivers/infiniband/core/umem.c | 7 +------ include/rdma/ib_umem.h | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) commit 9a160601f3fb6ffa196b87d1b5643646be486405 Author: Gabriel Fernandez Date: Thu May 3 08:40:09 2018 +0200 clk: stm32: fix: stm32 clock drivers are not compiled by default Clock driver is mandatory if the machine is selected. Then don't use 'bool' and 'depends on' commands, but 'def_bool' with the machine(s). Fixes: da32d3539fca ("clk: stm32: add configuration flags for each of the stm32 drivers") Signed-off-by: Gabriel Fernandez Acked-by: Alexandre TORGUE Signed-off-by: Stephen Boyd drivers/clk/Kconfig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2e5be528ab0182ad4b42b9feea3b80f85f37179b Author: Stefan Agner Date: Wed Apr 18 14:49:08 2018 +0200 clk: imx6ull: use OSC clock during AXI rate change On i.MX6 ULL using PLL3 seems to cause a freeze when setting the parent to IMX6UL_CLK_PLL3_USB_OTG. This only seems to appear since commit 6f9575e55632 ("clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux"), probably because the clock is now forced to be on. Fixes: 6f9575e55632("clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux") Signed-off-by: Stefan Agner Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx6ul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7be67b381ade36bf190601bdc5d6f44bae3cefe Merge: ae93870 bb7298a Author: Olof Johansson Date: Tue May 15 13:49:55 2018 -0700 Merge tag 'davinci-fixes-for-v4.17-part-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes Second set of fixes for TI DaVinci. They are needed for DM6467 EVM to work. The first patch fixes an issue with timer interrupt and the second two are needed for video driver to probe successfully. * tag 'davinci-fixes-for-v4.17-part-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: board-dm646x-evm: set VPIF capture card name ARM: davinci: board-dm646x-evm: pass correct I2C adapter id for VPIF ARM: davinci: dm646x: fix timer interrupt generation Signed-off-by: Olof Johansson commit 5596fe34495cf0f645f417eb928ef224df3e3cb4 Author: Dexuan Cui Date: Tue May 15 19:52:50 2018 +0000 tick/broadcast: Use for_each_cpu() specially on UP kernels for_each_cpu() unintuitively reports CPU0 as set independent of the actual cpumask content on UP kernels. This causes an unexpected PIT interrupt storm on a UP kernel running in an SMP virtual machine on Hyper-V, and as a result, the virtual machine can suffer from a strange random delay of 1~20 minutes during boot-up, and sometimes it can hang forever. Protect if by checking whether the cpumask is empty before entering the for_each_cpu() loop. [ tglx: Use !IS_ENABLED(CONFIG_SMP) instead of #ifdeffery ] Signed-off-by: Dexuan Cui Signed-off-by: Thomas Gleixner Cc: Josh Poulson Cc: "Michael Kelley (EOSG)" Cc: Peter Zijlstra Cc: Frederic Weisbecker Cc: stable@vger.kernel.org Cc: Rakib Mullick Cc: Jork Loeser Cc: Greg Kroah-Hartman Cc: Andrew Morton Cc: KY Srinivasan Cc: Linus Torvalds Cc: Alexey Dobriyan Cc: Dmitry Vyukov Link: https://lkml.kernel.org/r/KL1P15301MB000678289FE55BA365B3279ABF990@KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM Link: https://lkml.kernel.org/r/KL1P15301MB0006FA63BC22BEB64902EAA0BF930@KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM kernel/time/tick-broadcast.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 21b9f1c7e319f654de3b2574fe8d4e4114c9143f Merge: eeba2df 4776cab Author: Linus Torvalds Date: Tue May 15 10:48:36 2018 -0700 Merge tag 'afs-fixes-20180514' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS fixes from David Howells: "Here's a set of patches that fix a number of bugs in the in-kernel AFS client, including: - Fix directory locking to not use individual page locks for directory reading/scanning but rather to use a semaphore on the afs_vnode struct as the directory contents must be read in a single blob and data from different reads must not be mixed as the entire contents may be shuffled about between reads. - Fix address list parsing to handle port specifiers correctly. - Only give up callback records on a server if we actually talked to that server (we might not be able to access a server). - Fix some callback handling bugs, including refcounting, whole-volume callbacks and when callbacks actually get broken in response to a CB.CallBack op. - Fix some server/address rotation bugs, including giving up if we can't probe a server; giving up if a server says it doesn't have a volume, but there are more servers to try. - Fix the decoding of fetched statuses to be OpenAFS compatible. - Fix the handling of server lookups in Cache Manager ops (such as CB.InitCallBackState3) to use a UUID if possible and to handle no server being found. - Fix a bug in server lookup where not all addresses are compared. - Fix the non-encryption of calls that prevents some servers from being accessed (this also requires an AF_RXRPC patch that has already gone in through the net tree). There's also a patch that adds tracepoints to log Cache Manager ops that don't find a matching server, either by UUID or by address" * tag 'afs-fixes-20180514' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Fix the non-encryption of calls afs: Fix CB.CallBack handling afs: Fix whole-volume callback handling afs: Fix afs_find_server search loop afs: Fix the handling of an unfound server in CM operations afs: Add a tracepoint to record callbacks from unlisted servers afs: Fix the handling of CB.InitCallBackState3 to find the server by UUID afs: Fix VNOVOL handling in address rotation afs: Fix AFSFetchStatus decoder to provide OpenAFS compatibility afs: Fix server rotation's handling of fileserver probe failure afs: Fix refcounting in callback registration afs: Fix giving up callbacks on server destruction afs: Fix address list parsing afs: Fix directory page locking commit eeba2dfa6a0d1cf40056e3a00ec21206c640eeca Merge: ee4b65c 7d3af7d Author: Linus Torvalds Date: Tue May 15 10:15:48 2018 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two small driver fixes: aacraid to fix an unknown IU type on task management functions which causes a firmware fault and vmw_pvscsi to change a return code to retry the operation instead of causing an immediate error" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: aacraid: Correct hba_send to include iu_type scsi: vmw-pvscsi: return DID_BUS_BUSY for adapter-initated aborts commit ee4b65c2e820161455d1ae1ccf7a219397f32ae6 Merge: 67b8d5c 76ef6b2 Author: Linus Torvalds Date: Tue May 15 09:58:01 2018 -0700 Merge tag 'drm-fixes-for-v4.17-rc6-urgent' of git://people.freedesktop.org/~airlied/linux Pull drm fix from Dave Airlie: "This fixes the mmap regression reported to me on irc by an i686 kernel user today, he's tested the fix works, and I've audited all the drm drivers for the bad mmap usage and since we use the mmap offset as a lookup in a table we aren't inclined to have anything bad in there" [ See commit be83bbf80682 ("mmap: introduce sane default mmap limits") for details and the note on why the GPU drivers were expected to be a special case. - Linus ] * tag 'drm-fixes-for-v4.17-rc6-urgent' of git://people.freedesktop.org/~airlied/linux: drm: set FMODE_UNSIGNED_OFFSET for drm files commit dd010bd7af6248b40ab31640a6e31fbebea5aa22 Author: Mika Westerberg Date: Tue May 15 16:04:25 2018 +0300 thunderbolt: Handle NULL boot ACL entries properly If the boot ACL entry is already NULL we should not fill in the upper two DWs with 0xfffffffff. Otherwise they are not shown as empty entries when the sysfs attribute is read. Fixes: 9aaa3b8b4c56 ("thunderbolt: Add support for preboot ACL") Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/icm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f825e74d761c13b0cfaa5f65344d64ff970e252 Author: Geert Uytterhoeven Date: Mon May 14 12:49:37 2018 +0200 mtd: rawnand: Fix return type of __DIVIDE() when called with 32-bit The __DIVIDE() macro checks whether it is called with a 32-bit or 64-bit dividend, to select the appropriate divide-and-round-up routine. As the check uses the ternary operator, the result will always be promoted to a type that can hold both results, i.e. unsigned long long. When using this result in a division on a 32-bit system, this may lead to link errors like: ERROR: "__udivdi3" [drivers/mtd/nand/raw/nand.ko] undefined! Fix this by casting the result of the division to the type of the dividend. Fixes: 8878b126df769831 ("mtd: nand: add ->exec_op() implementation") Signed-off-by: Geert Uytterhoeven Signed-off-by: Boris Brezillon include/linux/mtd/rawnand.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 711702b57cc3c50b84bd648de0f1ca0a378805be Author: Andre Przywara Date: Fri May 11 15:20:15 2018 +0100 KVM: arm/arm64: VGIC/ITS save/restore: protect kvm_read_guest() calls kvm_read_guest() will eventually look up in kvm_memslots(), which requires either to hold the kvm->slots_lock or to be inside a kvm->srcu critical section. In contrast to x86 and s390 we don't take the SRCU lock on every guest exit, so we have to do it individually for each kvm_read_guest() call. Use the newly introduced wrapper for that. Cc: Stable # 4.12+ Reported-by: Jan Glauber Signed-off-by: Andre Przywara Acked-by: Christoffer Dall Signed-off-by: Paolo Bonzini virt/kvm/arm/vgic/vgic-its.c | 4 ++-- virt/kvm/arm/vgic/vgic-v3.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit bf308242ab98b5d1648c3663e753556bef9bec01 Author: Andre Przywara Date: Fri May 11 15:20:14 2018 +0100 KVM: arm/arm64: VGIC/ITS: protect kvm_read_guest() calls with SRCU lock kvm_read_guest() will eventually look up in kvm_memslots(), which requires either to hold the kvm->slots_lock or to be inside a kvm->srcu critical section. In contrast to x86 and s390 we don't take the SRCU lock on every guest exit, so we have to do it individually for each kvm_read_guest() call. Provide a wrapper which does that and use that everywhere. Note that ending the SRCU critical section before returning from the kvm_read_guest() wrapper is safe, because the data has been *copied*, so we don't need to rely on valid references to the memslot anymore. Cc: Stable # 4.8+ Reported-by: Jan Glauber Signed-off-by: Andre Przywara Acked-by: Christoffer Dall Signed-off-by: Paolo Bonzini arch/arm/include/asm/kvm_mmu.h | 16 ++++++++++++++++ arch/arm64/include/asm/kvm_mmu.h | 16 ++++++++++++++++ virt/kvm/arm/vgic/vgic-its.c | 15 ++++++++------- 3 files changed, 40 insertions(+), 7 deletions(-) commit 9c4188762f7fee032abf8451fd9865a9abfc5516 Author: Andre Przywara Date: Fri May 11 15:20:13 2018 +0100 KVM: arm/arm64: VGIC/ITS: Promote irq_lock() in update_affinity Apparently the development of update_affinity() overlapped with the promotion of irq_lock to be _irqsave, so the patch didn't convert this lock over. This will make lockdep complain. Fix this by disabling IRQs around the lock. Cc: stable@vger.kernel.org Fixes: 08c9fd042117 ("KVM: arm/arm64: vITS: Add a helper to update the affinity of an LPI") Reported-by: Jan Glauber Signed-off-by: Andre Przywara Acked-by: Christoffer Dall Signed-off-by: Paolo Bonzini virt/kvm/arm/vgic/vgic-its.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 388d4359680b56dba82fe2ffca05871e9fd2b73e Author: Andre Przywara Date: Fri May 11 15:20:12 2018 +0100 KVM: arm/arm64: Properly protect VGIC locks from IRQs As Jan reported [1], lockdep complains about the VGIC not being bullet proof. This seems to be due to two issues: - When commit 006df0f34930 ("KVM: arm/arm64: Support calling vgic_update_irq_pending from irq context") promoted irq_lock and ap_list_lock to _irqsave, we forgot two instances of irq_lock. lockdeps seems to pick those up. - If a lock is _irqsave, any other locks we take inside them should be _irqsafe as well. So the lpi_list_lock needs to be promoted also. This fixes both issues by simply making the remaining instances of those locks _irqsave. One irq_lock is addressed in a separate patch, to simplify backporting. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2018-May/575718.html Cc: stable@vger.kernel.org Fixes: 006df0f34930 ("KVM: arm/arm64: Support calling vgic_update_irq_pending from irq context") Reported-by: Jan Glauber Acked-by: Christoffer Dall Signed-off-by: Andre Przywara Signed-off-by: Paolo Bonzini virt/kvm/arm/vgic/vgic-debug.c | 5 +++-- virt/kvm/arm/vgic/vgic-its.c | 10 ++++++---- virt/kvm/arm/vgic/vgic.c | 22 ++++++++++++++-------- 3 files changed, 23 insertions(+), 14 deletions(-) commit 497a0790e2c604366b9e35dcb41310319e9bca13 Author: Philippe Bergheaud Date: Mon May 14 10:27:36 2018 +0200 cxl: Report the tunneled operations status Failure to synchronize the tunneled operations does not prevent the initialization of the cxl card. This patch reports the tunneled operations status via /sys. Signed-off-by: Philippe Bergheaud Signed-off-by: Michael Ellerman Documentation/ABI/testing/sysfs-class-cxl | 8 ++++++++ drivers/misc/cxl/cxl.h | 1 + drivers/misc/cxl/pci.c | 7 ++++++- drivers/misc/cxl/sysfs.c | 10 ++++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) commit 401dca8cbd14fc4b32d93499dcd12a1711a73ecc Author: Philippe Bergheaud Date: Mon May 14 10:27:35 2018 +0200 cxl: Set the PBCQ Tunnel BAR register when enabling capi mode Skiboot used to set the default Tunnel BAR register value when capi mode was enabled. This approach was ok for the cxl driver, but prevented other drivers from choosing different values. Skiboot versions > 5.11 will not set the default value any longer. This patch modifies the cxl driver to set/reset the Tunnel BAR register when entering/exiting the cxl mode, with pnv_pci_set_tunnel_bar(). That should work with old skiboot (since we are re-writing the value already set) and new skiboot. mpe: The tunnel support was only merged into Linux recently, in commit d6a90bb83b50 ("powerpc/powernv: Enable tunneled operations") (v4.17-rc1), so with new skiboot kernels between that commit and this will not work correctly. Fixes: d6a90bb83b50 ("powerpc/powernv: Enable tunneled operations") Signed-off-by: Philippe Bergheaud Reviewed-by: Christophe Lombard Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/pci.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 72cb0d893343cd33e6ab62cf26f2625d5d3532c9 Author: Eric Anholt Date: Mon Apr 9 13:58:13 2018 -0700 drm/vc4: Fix leak of the file_priv that stored the perfmon. Signed-off-by: Eric Anholt Fixes: 65101d8c9108 ("drm/vc4: Expose performance counters to userspace") Link: https://patchwork.freedesktop.org/patch/msgid/20180409205813.7077-1-eric@anholt.net Reviewed-by: Boris Brezillon Signed-off-by: Maarten Lankhorst drivers/gpu/drm/vc4/vc4_drv.c | 1 + 1 file changed, 1 insertion(+) commit 4c27625b7a67eb9006963ed2bcf8e53b259b43af Author: Wanpeng Li Date: Sat May 5 04:02:32 2018 -0700 KVM: X86: Lower the default timer frequency limit to 200us Anthoine reported: The period used by Windows change over time but it can be 1 milliseconds or less. I saw the limit_periodic_timer_frequency print so 500 microseconds is sometimes reached. As suggested by Paolo, lower the default timer frequency limit to a smaller interval of 200 us (5000 Hz) to leave some headroom. This is required due to Windows 10 changing the scheduler tick limit from 1024 Hz to 2048 Hz. Reported-by: Anthoine Bourgeois Suggested-by: Paolo Bonzini Reviewed-by: Darren Kenny Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Anthoine Bourgeois Cc: Darren Kenny Cc: Jan Kiszka Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb7298a7e87cf3430eb62be8746e5d7a07ca9d7c Author: Sekhar Nori Date: Fri May 11 20:51:36 2018 +0530 ARM: davinci: board-dm646x-evm: set VPIF capture card name VPIF capture driver expects card name to be set since it uses it without checking for NULL. The commit which introduced VPIF display and capture support added card name only for display, not for capture. Set it in platform data to probe driver successfully. While at it, also fix the display card name to something more appropriate. Fixes: 85609c1ccda6 ("DaVinci: DM646x - platform changes for vpif capture and display drivers") Signed-off-by: Sekhar Nori arch/arm/mach-davinci/board-dm646x-evm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7d46899d57f8b61eb28701d9a4043b71e3392c26 Author: Sekhar Nori Date: Fri May 11 20:51:35 2018 +0530 ARM: davinci: board-dm646x-evm: pass correct I2C adapter id for VPIF commit a16cb91ad9c4 ("[media] media: vpif: use a configurable i2c_adapter_id for vpif display") removed hardcoded I2C adaptor setting in VPIF driver, but missed updating platform data passed from DM646x board. Fix it. Fixes: a16cb91ad9c4 ("[media] media: vpif: use a configurable i2c_adapter_id for vpif display") Signed-off-by: Sekhar Nori arch/arm/mach-davinci/board-dm646x-evm.c | 2 ++ 1 file changed, 2 insertions(+) commit 73d4337ed9ceddef4b2f0e226634d5f985aa2d1c Author: Sekhar Nori Date: Fri May 11 20:51:34 2018 +0530 ARM: davinci: dm646x: fix timer interrupt generation commit b38434145b34 ("ARM: davinci: irqs: Correct McASP1 TX interrupt definition for DM646x") inadvertently removed priority setting for timer0_12 (bottom half of timer0). This timer is used as clockevent. When INTPRIn register setting for an interrupt is left at 0, it is mapped to FIQ by the AINTC causing the timer interrupt to not get generated. Fix it by including an entry for timer0_12 in interrupt priority map array. While at it, move the clockevent comment to the right place. Fixes: b38434145b34 ("ARM: davinci: irqs: Correct McASP1 TX interrupt definition for DM646x") Signed-off-by: Sekhar Nori arch/arm/mach-davinci/dm646x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 22076557b07c12086eeb16b8ce2b0b735f7a27e7 Author: Shuah Khan (Samsung OSG) Date: Mon May 14 20:49:58 2018 -0600 usbip: usbip_host: fix NULL-ptr deref and use-after-free errors usbip_host updates device status without holding lock from stub probe, disconnect and rebind code paths. When multiple requests to import a device are received, these unprotected code paths step all over each other and drive fails with NULL-ptr deref and use-after-free errors. The driver uses a table lock to protect the busid array for adding and deleting busids to the table. However, the probe, disconnect and rebind paths get the busid table entry and update the status without holding the busid table lock. Add a new finer grain lock to protect the busid entry. This new lock will be held to search and update the busid entry fields from get_busid_idx(), add_match_busid() and del_match_busid(). match_busid_show() does the same to access the busid entry fields. get_busid_priv() changed to return the pointer to the busid entry holding the busid lock. stub_probe(), stub_disconnect() and stub_device_rebind() call put_busid_priv() to release the busid lock before returning. This changes fixes the unprotected code paths eliminating the race conditions in updating the busid entries. Reported-by: Jakub Jirasek Signed-off-by: Shuah Khan (Samsung OSG) Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub.h | 2 ++ drivers/usb/usbip/stub_dev.c | 33 +++++++++++++++++++++++---------- drivers/usb/usbip/stub_main.c | 40 +++++++++++++++++++++++++++++++++++----- 3 files changed, 60 insertions(+), 15 deletions(-) commit 7510df3f29d44685bab7b1918b61a8ccd57126a9 Author: Shuah Khan (Samsung OSG) Date: Mon Apr 30 16:17:20 2018 -0600 usbip: usbip_host: run rebind from exit when module is removed After removing usbip_host module, devices it releases are left without a driver. For example, when a keyboard or a mass storage device are bound to usbip_host when it is removed, these devices are no longer bound to any driver. Fix it to run device_attach() from the module exit routine to restore the devices to their original drivers. This includes cleanup changes and moving device_attach() code to a common routine to be called from rebind_store() and usbip_host_exit(). Signed-off-by: Shuah Khan (Samsung OSG) Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_dev.c | 6 +---- drivers/usb/usbip/stub_main.c | 60 ++++++++++++++++++++++++++++++++++++------- 2 files changed, 52 insertions(+), 14 deletions(-) commit 1e180f167d4e413afccbbb4a421b48b2de832549 Author: Shuah Khan (Samsung OSG) Date: Mon Apr 30 16:17:19 2018 -0600 usbip: usbip_host: delete device from busid_table after rebind Device is left in the busid_table after unbind and rebind. Rebind initiates usb bus scan and the original driver claims the device. After rescan the device should be deleted from the busid_table as it no longer belongs to usbip_host. Fix it to delete the device after device_attach() succeeds. Signed-off-by: Shuah Khan (Samsung OSG) Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_main.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 28b68acc4a88dcf91fd1dcf2577371dc9bf574cc Author: Shuah Khan Date: Wed Apr 11 18:13:30 2018 -0600 usbip: usbip_host: refine probe and disconnect debug msgs to be useful Refine probe and disconnect debug msgs to be useful and say what is in progress. Signed-off-by: Shuah Khan Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 35cd67a0caf767aba472452865dcb4471fcce2b1 Author: Peter Rosin Date: Wed May 9 21:47:48 2018 +0200 i2c: viperboard: return message count on master_xfer success Returning zero is wrong in this case. Signed-off-by: Peter Rosin Signed-off-by: Wolfram Sang Fixes: 174a13aa8669 ("i2c: Add viperboard i2c master driver") drivers/i2c/busses/i2c-viperboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12d9bbc5a7f347eaa65ff2a9d34995cadc05eb1b Author: Peter Rosin Date: Wed May 9 21:46:30 2018 +0200 i2c: pmcmsp: fix error return from master_xfer Returning -1 (-EPERM) is not appropriate here, go with -EIO. Signed-off-by: Peter Rosin Signed-off-by: Wolfram Sang Fixes: 1b144df1d7d6 ("i2c: New PMC MSP71xx TWI bus driver") drivers/i2c/busses/i2c-pmcmsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de9a8634f1cb4560a35696d472cc7f1383d9b866 Author: Peter Rosin Date: Wed May 9 21:46:29 2018 +0200 i2c: pmcmsp: return message count on master_xfer success Returning zero is wrong in this case. Signed-off-by: Peter Rosin Signed-off-by: Wolfram Sang Fixes: 1b144df1d7d6 ("i2c: New PMC MSP71xx TWI bus driver") drivers/i2c/busses/i2c-pmcmsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3903c9161f0d636a7b0ff03841628928457e64c Merge: 67b8d5c c23080a Author: Ingo Molnar Date: Tue May 15 08:20:45 2018 +0200 Merge tag 'perf-urgent-for-mingo-4.17-20180514' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: - Fix segfault when processing unknown threads in cs-etm (Leo Yan) - Fix "perf test inet_pton" on s390 failing due to missing inline (Thomas Richter) - Display all available events on 'perf annotate --stdio' (Jin Yao) - Add missing newline when parsing empty BPF proggie (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 2e68adcd2fb21b7188ba449f0fab3bee2910e500 Author: Julian Wiedmann Date: Wed May 2 08:28:34 2018 +0200 s390/qdio: don't release memory in qdio_setup_irq() Calling qdio_release_memory() on error is just plain wrong. It frees the main qdio_irq struct, when following code still uses it. Also, no other error path in qdio_establish() does this. So trust callers to clean up via qdio_free() if some step of the QDIO initialization fails. Fixes: 779e6e1c724d ("[S390] qdio: new qdio driver.") Cc: #v2.6.27+ Signed-off-by: Julian Wiedmann Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_setup.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit e521813468f786271a87e78e8644243bead48fad Author: Julian Wiedmann Date: Wed May 2 08:48:43 2018 +0200 s390/qdio: fix access to uninitialized qdio_q fields Ever since CQ/QAOB support was added, calling qdio_free() straight after qdio_alloc() results in qdio_release_memory() accessing uninitialized memory (ie. q->u.out.use_cq and q->u.out.aobs). Followed by a kmem_cache_free() on the random AOB addresses. For older kernels that don't have 6e30c549f6ca, the same applies if qdio_establish() fails in the DEV_STATE_ONLINE check. While initializing q->u.out.use_cq would be enough to fix this particular bug, the more future-proof change is to just zero-alloc the whole struct. Fixes: 104ea556ee7f ("qdio: support asynchronous delivery of storage blocks") Cc: #v3.2+ Signed-off-by: Julian Wiedmann Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f5ec2993b1f39aed12fa6fd56e8dc2272ee8a33 Author: Josh Poimboeuf Date: Mon May 14 08:53:24 2018 -0500 objtool: Detect RIP-relative switch table references Typically a switch table can be found by detecting a .rodata access followed an indirect jump: 1969: 4a 8b 0c e5 00 00 00 mov 0x0(,%r12,8),%rcx 1970: 00 196d: R_X86_64_32S .rodata+0x438 1971: e9 00 00 00 00 jmpq 1976 1972: R_X86_64_PC32 __x86_indirect_thunk_rcx-0x4 Randy Dunlap reported a case (seen with GCC 4.8) where the .rodata access uses RIP-relative addressing: 19bd: 48 8b 3d 00 00 00 00 mov 0x0(%rip),%rdi # 19c4 19c0: R_X86_64_PC32 .rodata+0x45c 19c4: e9 00 00 00 00 jmpq 19c9 19c5: R_X86_64_PC32 __x86_indirect_thunk_rdi-0x4 In this case the relocation addend needs to be adjusted accordingly in order to find the location of the switch table. The fix is for case 3 (as described in the comments), but also make the existing case 1 & 2 checks more precise by only adjusting the addend for R_X86_64_PC32 relocations. This fixes the following warnings: drivers/video/fbdev/omap2/omapfb/dss/dispc.o: warning: objtool: dispc_runtime_suspend()+0xbb8: sibling call from callable instruction with modified stack frame drivers/video/fbdev/omap2/omapfb/dss/dispc.o: warning: objtool: dispc_runtime_resume()+0xcc5: sibling call from callable instruction with modified stack frame Reported-by: Randy Dunlap Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/b6098294fd67afb69af8c47c9883d7a68bf0f8ea.1526305958.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/check.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit c99f0802e42fcd38e84ee4d306691805ebed204f Author: Jorge Sanjuan Date: Fri May 11 16:25:35 2018 +0100 ALSA: usb-audio: Use Class Specific EP for UAC3 devices. bmAtributes offset doesn't exist in the UAC3 CS_EP descriptor. Hence, checking for pitch control as if it was UAC2 doesn't make any sense. Use the defined UAC3 offsets instead. Fixes: 9a2fe9b801f5 ("ALSA: usb: initial USB Audio Device Class 3.0 support") Signed-off-by: Jorge Sanjuan Reviewed-by: Ruslan Bilovol Signed-off-by: Takashi Iwai sound/usb/stream.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 76ef6b28ea4f81c3d511866a9b31392caa833126 Author: Dave Airlie Date: Tue May 15 13:38:15 2018 +1000 drm: set FMODE_UNSIGNED_OFFSET for drm files Since we have the ttm and gem vma managers using a subset of the file address space for objects, and these start at 0x100000000 they will overflow the new mmap checks. I've checked all the mmap routines I could see for any bad behaviour but overall most people use GEM/TTM VMA managers even the legacy drivers have a hashtable. Reported-and-Tested-by: Arthur Marsh (amarsh04 on #radeon) Fixes: be83bbf8068 (mmap: introduce sane default mmap limits) Signed-off-by: Dave Airlie drivers/gpu/drm/drm_file.c | 1 + 1 file changed, 1 insertion(+) commit a406b0a0693eafc6f6b3a633d25749370bf40d8c Author: Randy Dunlap Date: Sun May 13 17:10:52 2018 -0700 scsi: core: clean up generated file scsi_devinfo_tbl.c "make clean" should remove the generated file "scsi_devinfo_tbl.c", so list it in the clean-files variable so that the file gets cleaned up. Fixes: 345e29608b4b ("scsi: scsi: Export blacklist flags to sysfs") Cc: Hannes Reinecke Signed-off-by: Randy Dunlap Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 125966db1fea12575ee21b2b3fc95a59032406f0 Author: Prasanna Kumar Kalever Date: Thu May 10 19:12:18 2018 +0530 scsi: target: tcmu: fix error resetting qfull_time_out to default Problem: $ cat /sys/kernel/config/target/core/user_0/block/attrib/qfull_time_out -1 $ echo "-1" > /sys/kernel/config/target/core/user_0/block/attrib/qfull_time_out -bash: echo: write error: Invalid argument Fix: This patch will help reset qfull_time_out to its default i.e. qfull_time_out=-1. Signed-off-by: Prasanna Kumar Kalever Acked-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_user.c | 2 ++ 1 file changed, 2 insertions(+) commit f3002c1374fb2367c9d8dbb28852791ef90d2bac Author: hpreg@vmware.com Date: Mon May 14 08:14:49 2018 -0400 vmxnet3: use DMA memory barriers where required The gen bits must be read first from (resp. written last to) DMA memory. The proper way to enforce this on Linux is to call dma_rmb() (resp. dma_wmb()). Signed-off-by: Regis Duchesne Acked-by: Ronak Doshi Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 22 ++++++++++++++++++++++ drivers/net/vmxnet3/vmxnet3_int.h | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) commit 61aeecea40afb2b89933e27cd4adb10fc2e75cfd Author: hpreg@vmware.com Date: Mon May 14 08:14:34 2018 -0400 vmxnet3: set the DMA mask before the first DMA map operation The DMA mask must be set before, not after, the first DMA map operation, or the first DMA map operation could in theory fail on some systems. Fixes: b0eb57cb97e78 ("VMXNET3: Add support for virtual IOMMU") Signed-off-by: Regis Duchesne Acked-by: Ronak Doshi Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 50 +++++++++++++++++++-------------------- drivers/net/vmxnet3/vmxnet3_int.h | 8 ++++--- 2 files changed, 30 insertions(+), 28 deletions(-) commit 849a742c59a3d597473c0232f9c2506c69eeef14 Author: Kumar Sanghvi Date: Mon May 14 16:27:34 2018 +0530 cxgb4: Correct ntuple mask validation for hash filters Earlier code of doing bitwise AND with field width bits was wrong. Instead, simplify code to calculate ntuple_mask based on supplied fields and then compare with mask configured in hw - which is the correct and simpler way to validate ntuple mask. Fixes: 3eb8b62d5a26 ("cxgb4: add support to create hash-filters via tc-flower offload") Signed-off-by: Kumar Sanghvi Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 88 ++++++++--------------- 1 file changed, 30 insertions(+), 58 deletions(-) commit 9a3a92ccfe3620743d4ae57c987dc8e9c5f88996 Author: Maciej W. Rozycki Date: Mon May 14 16:49:43 2018 +0100 MIPS: Fix ptrace(2) PTRACE_PEEKUSR and PTRACE_POKEUSR accesses to o32 FGRs Check the TIF_32BIT_FPREGS task setting of the tracee rather than the tracer in determining the layout of floating-point general registers in the floating-point context, correcting access to odd-numbered registers for o32 tracees where the setting disagrees between the two processes. Fixes: 597ce1723e0f ("MIPS: Support for 64-bit FP with O32 binaries") Signed-off-by: Maciej W. Rozycki Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: # 3.14+ Signed-off-by: James Hogan arch/mips/kernel/ptrace.c | 4 ++-- arch/mips/kernel/ptrace32.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 947bc875116042d5375446aa29bc1073c2d38977 Author: Alexandre Belloni Date: Wed Apr 25 23:10:36 2018 +0200 MIPS: xilfpga: Actually include FDT in fitImage Commit b35565bb16a5 ("MIPS: generic: Add support for MIPSfpga") added and its.S file for xilfpga but forgot to add it to arch/mips/generic/Platform so it is never used. Fixes: b35565bb16a5 ("MIPS: generic: Add support for MIPSfpga") Signed-off-by: Alexandre Belloni Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: # 4.15+ Patchwork: https://patchwork.linux-mips.org/patch/19245/ Signed-off-by: James Hogan arch/mips/generic/Platform | 1 + 1 file changed, 1 insertion(+) commit a5a92abbce56c41ff121db41a33b9c0a0ff39365 Author: Alexandre Belloni Date: Wed Apr 25 23:10:35 2018 +0200 MIPS: xilfpga: Stop generating useless dtb.o A dtb.o is generated from nexys4ddr.dts but this is never used since it has been moved to mips/generic with commit b35565bb16a5 ("MIPS: generic: Add support for MIPSfpga"). Fixes: b35565bb16a5 ("MIPS: generic: Add support for MIPSfpga") Signed-off-by: Alexandre Belloni Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: # 4.15+ Patchwork: https://patchwork.linux-mips.org/patch/19244/ Signed-off-by: James Hogan arch/mips/boot/dts/xilfpga/Makefile | 2 -- 1 file changed, 2 deletions(-) commit ba3696e94d9d590d9a7e55f68e81c25dba515191 Author: Colin Ian King Date: Mon May 14 18:23:50 2018 +0100 KVM: Fix spelling mistake: "cop_unsuable" -> "cop_unusable" Trivial fix to spelling mistake in debugfs_entries text. Fixes: 669e846e6c4e ("KVM/MIPS32: MIPS arch specific APIs for KVM") Signed-off-by: Colin Ian King Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kernel-janitors@vger.kernel.org Cc: # 3.10+ Signed-off-by: James Hogan arch/mips/kvm/mips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71e909c0cdad28a1df1fa14442929e68615dee45 Author: Maciej W. Rozycki Date: Mon Apr 30 15:56:47 2018 +0100 MIPS: ptrace: Expose FIR register through FP regset Correct commit 7aeb753b5353 ("MIPS: Implement task_user_regset_view.") and expose the FIR register using the unused 4 bytes at the end of the NT_PRFPREG regset. Without that register included clients cannot use the PTRACE_GETREGSET request to retrieve the complete FPU register set and have to resort to one of the older interfaces, either PTRACE_PEEKUSR or PTRACE_GETFPREGS, to retrieve the missing piece of data. Also the register is irreversibly missing from core dumps. This register is architecturally hardwired and read-only so the write path does not matter. Ignore data supplied on writes then. Fixes: 7aeb753b5353 ("MIPS: Implement task_user_regset_view.") Signed-off-by: James Hogan Signed-off-by: Maciej W. Rozycki Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: # 3.13+ Patchwork: https://patchwork.linux-mips.org/patch/19273/ Signed-off-by: James Hogan arch/mips/kernel/ptrace.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit c60128ce97674fd05adb8b5ae79eb6745a03192e Author: Paul Cercueil Date: Wed Mar 28 17:38:12 2018 +0200 MIPS: Fix build with DEBUG_ZBOOT and MACH_JZ4770 The debug definitions were missing for MACH_JZ4770, resulting in a build failure when DEBUG_ZBOOT was set. Since the UART addresses are the same across all Ingenic SoCs, we just use a #ifdef CONFIG_MACH_INGENIC instead of checking for individual Ingenic SoCs. Additionally, I added a #define for the UART0 address in-code and dropped the include, for the reason that this include file is slowly being phased out as the whole platform is being moved to devicetree. Fixes: 9be5f3e92ed5 ("MIPS: ingenic: Initial JZ4770 support") Signed-off-by: Paul Cercueil Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: # 4.16 Patchwork: https://patchwork.linux-mips.org/patch/18957/ Signed-off-by: James Hogan arch/mips/boot/compressed/uart-16550.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 55a2aa08b3af519a9693f99cdf7fa6d8b62d9f65 Author: NeilBrown Date: Fri Apr 27 09:28:34 2018 +1000 MIPS: c-r4k: Fix data corruption related to cache coherence When DMA will be performed to a MIPS32 1004K CPS, the L1-cache for the range needs to be flushed and invalidated first. The code currently takes one of two approaches. 1/ If the range is less than the size of the dcache, then HIT type requests flush/invalidate cache lines for the particular addresses. HIT-type requests a globalised by the CPS so this is safe on SMP. 2/ If the range is larger than the size of dcache, then INDEX type requests flush/invalidate the whole cache. INDEX type requests affect the local cache only. CPS does not propagate them in any way. So this invalidation is not safe on SMP CPS systems. Data corruption due to '2' can quite easily be demonstrated by repeatedly "echo 3 > /proc/sys/vm/drop_caches" and then sha1sum a file that is several times the size of available memory. Dropping caches means that large contiguous extents (large than dcache) are more likely. This was not a problem before Linux-4.8 because option 2 was never used if CONFIG_MIPS_CPS was defined. The commit which removed that apparently didn't appreciate the full consequence of the change. We could, in theory, globalize the INDEX based flush by sending an IPI to other cores. These cache invalidation routines can be called with interrupts disabled and synchronous IPI require interrupts to be enabled. Asynchronous IPI may not trigger writeback soon enough. So we cannot use IPI in practice. We can already test if IPI would be needed for an INDEX operation with r4k_op_needs_ipi(R4K_INDEX). If this is true then we mustn't try the INDEX approach as we cannot use IPI. If this is false (e.g. when there is only one core and hence one L1 cache) then it is safe to use the INDEX approach without IPI. This patch avoids options 2 if r4k_op_needs_ipi(R4K_INDEX), and so eliminates the corruption. Fixes: c00ab4896ed5 ("MIPS: Remove cpu_has_safe_index_cacheops") Signed-off-by: NeilBrown Cc: Ralf Baechle Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: # 4.8+ Patchwork: https://patchwork.linux-mips.org/patch/19259/ Signed-off-by: James Hogan arch/mips/mm/c-r4k.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 45dd9b0666a162f8e4be76096716670cf1741f0e Author: Steven Rostedt (VMware) Date: Wed May 9 14:36:09 2018 -0400 tracing/x86/xen: Remove zero data size trace events trace_xen_mmu_flush_tlb{_all} Doing an audit of trace events, I discovered two trace events in the xen subsystem that use a hack to create zero data size trace events. This is not what trace events are for. Trace events add memory footprint overhead, and if all you need to do is see if a function is hit or not, simply make that function noinline and use function tracer filtering. Worse yet, the hack used was: __array(char, x, 0) Which creates a static string of zero in length. There's assumptions about such constructs in ftrace that this is a dynamic string that is nul terminated. This is not the case with these tracepoints and can cause problems in various parts of ftrace. Nuke the trace events! Link: http://lkml.kernel.org/r/20180509144605.5a220327@gandalf.local.home Cc: stable@vger.kernel.org Fixes: 95a7d76897c1e ("xen/mmu: Use Xen specific TLB flush instead of the generic one.") Reviewed-by: Juergen Gross Signed-off-by: Steven Rostedt (VMware) arch/x86/xen/mmu.c | 4 +--- arch/x86/xen/mmu_pv.c | 4 +--- include/trace/events/xen.h | 16 ---------------- 3 files changed, 2 insertions(+), 22 deletions(-) commit d49baa7e12ee70c0a7b821d088a770c94c02e494 Author: Eric Biggers Date: Sun May 13 17:01:30 2018 -0700 net/smc: check for missing nlattrs in SMC_PNETID messages It's possible to crash the kernel in several different ways by sending messages to the SMC_PNETID generic netlink family that are missing the expected attributes: - Missing SMC_PNETID_NAME => null pointer dereference when comparing names. - Missing SMC_PNETID_ETHNAME => null pointer dereference accessing smc_pnetentry::ndev. - Missing SMC_PNETID_IBNAME => null pointer dereference accessing smc_pnetentry::smcibdev. - Missing SMC_PNETID_IBPORT => out of bounds array access to smc_ib_device::pattr[-1]. Fix it by validating that all expected attributes are present and that SMC_PNETID_IBPORT is nonzero. Reported-by: syzbot+5cd61039dc9b8bfa6e47@syzkaller.appspotmail.com Fixes: 6812baabf24d ("smc: establish pnet table management") Cc: # v4.11+ Signed-off-by: Eric Biggers Signed-off-by: David S. Miller net/smc/smc_pnet.c | 71 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 31 deletions(-) commit 57f6f99fdad9984801cde05c1db68fe39b474a10 Author: Tarick Bedeir Date: Sun May 13 16:38:45 2018 -0700 net/mlx4_core: Fix error handling in mlx4_init_port_info. Avoid exiting the function with a lingering sysfs file (if the first call to device_create_file() fails while the second succeeds), and avoid calling devlink_port_unregister() twice. In other words, either mlx4_init_port_info() succeeds and returns zero, or it fails, returns non-zero, and requires no cleanup. Fixes: 096335b3f983 ("mlx4_core: Allow dynamic MTU configuration for IB ports") Signed-off-by: Tarick Bedeir Reviewed-by: Leon Romanovsky Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0cf442c6bcf572e04f5690340d5b8e62afcee2ca Author: Miquel Raynal Date: Tue Apr 24 17:45:06 2018 +0200 cpufreq: armada-37xx: driver relies on cpufreq-dt Armada-37xx driver registers a cpufreq-dt driver. Not having CONFIG_CPUFREQ_DT selected leads to a silent abort during the probe. Prevent that situation by having the former depending on the latter. Fixes: 92ce45fb875d7 (cpufreq: Add DVFS support for Armada 37xx) Cc: 4.16+ # 4.16+ Signed-off-by: Miquel Raynal Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b34c0fb1b51a6377752fc971e57577eeb102d60 Author: Bob Moore Date: Tue May 8 14:06:15 2018 -0700 ACPICA: Add deferred package support for the Load and loadTable operators Completes the support and fixes a regression introduced in version 20180209. The regression caused package objects that were loaded by the Load and loadTable operators. This created an error message like the following: [ 0.251922] ACPI Error: No pointer back to namespace node in package 00000000fd2a44cd (20180313/dsargs-303) Link: https://bugzilla.kernel.org/show_bug.cgi?id=199413 Fixes: 5a8361f7ecce (ACPICA: Integrate package handling with module-level code) Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acnamesp.h | 4 +++ drivers/acpi/acpica/exconfig.c | 14 ++++++++ drivers/acpi/acpica/nsinit.c | 76 +++++++++++++++++++++++++++++++----------- 3 files changed, 74 insertions(+), 20 deletions(-) commit 4152dc91b5932e7fe49a5afed62a068b2f31d196 Author: Alexey Kodanev Date: Fri May 11 20:15:13 2018 +0300 selinux: correctly handle sa_family cases in selinux_sctp_bind_connect() Allow to pass the socket address structure with AF_UNSPEC family for compatibility purposes. selinux_socket_bind() will further check it for INADDR_ANY and selinux_socket_connect_helper() should return EINVAL. For a bad address family return EINVAL instead of AFNOSUPPORT error, i.e. what is expected from SCTP protocol in such case. Fixes: d452930fd3b9 ("selinux: Add SCTP support") Suggested-by: Paul Moore Signed-off-by: Alexey Kodanev Signed-off-by: Paul Moore security/selinux/hooks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 88b7d370bb4b1280717ebdacd6748456f9ba484f Author: Alexey Kodanev Date: Fri May 11 20:15:12 2018 +0300 selinux: fix address family in bind() and connect() to match address/port Since sctp_bindx() and sctp_connectx() can have multiple addresses, sk_family can differ from sa_family. Therefore, selinux_socket_bind() and selinux_socket_connect_helper(), which process sockaddr structure (address and port), should use the address family from that structure too, and not from the socket one. The initialization of the data for the audit record is moved above, in selinux_socket_bind(), so that there is no duplicate changes and code. Fixes: d452930fd3b9 ("selinux: Add SCTP support") Suggested-by: Paul Moore Signed-off-by: Alexey Kodanev Signed-off-by: Paul Moore security/selinux/hooks.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 0f8db8cc73df60b3de9a5eebd8f117b56eff5b03 Author: Alexey Kodanev Date: Fri May 11 20:15:11 2018 +0300 selinux: add AF_UNSPEC and INADDR_ANY checks to selinux_socket_bind() Commit d452930fd3b9 ("selinux: Add SCTP support") breaks compatibility with the old programs that can pass sockaddr_in structure with AF_UNSPEC and INADDR_ANY to bind(). As a result, bind() returns EAFNOSUPPORT error. This was found with LTP/asapi_01 test. Similar to commit 29c486df6a20 ("net: ipv4: relax AF_INET check in bind()"), which relaxed AF_INET check for compatibility, add AF_UNSPEC case to AF_INET and make sure that the address is INADDR_ANY. Fixes: d452930fd3b9 ("selinux: Add SCTP support") Signed-off-by: Alexey Kodanev Signed-off-by: Paul Moore security/selinux/hooks.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit b196d88aba8ac72b775137854121097f4c4c6862 Author: Jason Wang Date: Fri May 11 10:49:25 2018 +0800 tun: fix use after free for ptr_ring We used to initialize ptr_ring during TUNSETIFF, this is because its size depends on the tx_queue_len of netdevice. And we try to clean it up when socket were detached from netdevice. A race were spotted when trying to do uninit during a read which will lead a use after free for pointer ring. Solving this by always initialize a zero size ptr_ring in open() and do resizing during TUNSETIFF, and then we can safely do cleanup during close(). With this, there's no need for the workaround that was introduced by commit 4df0bfc79904 ("tun: fix a memory leak for tfile->tx_array"). Reported-by: syzbot+e8b902c3c3fadf0a9dba@syzkaller.appspotmail.com Cc: Eric Dumazet Cc: Cong Wang Cc: Michael S. Tsirkin Fixes: 1576d9860599 ("tun: switch to use skb array for tx") Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/tun.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit ae93870f73d373953d3e2eb090828cf64816568e Merge: 99ffa8b e691436 Author: Olof Johansson Date: Mon May 14 09:27:33 2018 -0700 Merge tag 'reset-fixes-for-4.17' of git://git.pengutronix.de/pza/linux into fixes Reset controller fixes for v4.17 Fix the USB3 reset (offset 0x200c, bit 5) on Uniphier LD20. It was incorrectly labeled as GIO reset. This reset line is not yet used in uniphier-ld20.dtsi. * tag 'reset-fixes-for-4.17' of git://git.pengutronix.de/pza/linux: reset: uniphier: fix USB clock line for LD20 Signed-off-by: Olof Johansson commit 99ffa8b0e7ee13410dd60498129ba1b52ce26f80 Merge: 9954b80 f43194c Author: Olof Johansson Date: Mon May 14 09:25:14 2018 -0700 Merge tag 'mvebu-fixes-4.17-1' of git://git.infradead.org/linux-mvebu into fixes mvebu fixes for 4.17 (part 1) Declare missing clocks needed for network on Armada 8040 base boards (such as the McBin) * tag 'mvebu-fixes-4.17-1' of git://git.infradead.org/linux-mvebu: ARM64: dts: marvell: armada-cp110: Add mg_core_clk for ethernet node ARM64: dts: marvell: armada-cp110: Add clocks for the xmdio node Signed-off-by: Olof Johansson commit 9954b80b8c0e8abc98e17bba0fccd9876211ceaa Author: Russell King Date: Thu May 10 14:24:20 2018 +0100 ARM: keystone: fix platform_domain_notifier array overrun platform_domain_notifier contains a variable sized array, which the pm_clk_notify() notifier treats as a NULL terminated array: for (con_id = clknb->con_ids; *con_id; con_id++) pm_clk_add(dev, *con_id); Omitting the initialiser for con_ids means that the array is zero sized, and there is no NULL terminator. This leads to pm_clk_notify() overrunning into what ever structure follows, which may not be NULL. This leads to an oops: Unable to handle kernel NULL pointer dereference at virtual address 0000008c pgd = c0003000 [0000008c] *pgd=80000800004003c, *pmd=00000000c Internal error: Oops: 206 [#1] PREEMPT SMP ARM Modules linked in:c CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.16.0+ #9 Hardware name: Keystone PC is at strlen+0x0/0x34 LR is at kstrdup+0x18/0x54 pc : [] lr : [] psr: 20000013 sp : eec73dc0 ip : eed780c0 fp : 00000001 r10: 00000000 r9 : 00000000 r8 : eed71e10 r7 : 0000008c r6 : 0000008c r5 : 014000c0 r4 : c03a6ff4 r3 : c09445d0 r2 : 00000000 r1 : 014000c0 r0 : 0000008c Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 30c5387d Table: 00003000 DAC: fffffffd Process swapper/0 (pid: 1, stack limit = 0xeec72210) Stack: (0xeec73dc0 to 0xeec74000) ... [] (strlen) from [] (kstrdup+0x18/0x54) [] (kstrdup) from [] (__pm_clk_add+0x58/0x120) [] (__pm_clk_add) from [] (pm_clk_notify+0x64/0xa8) [] (pm_clk_notify) from [] (notifier_call_chain+0x44/0x84) [] (notifier_call_chain) from [] (__blocking_notifier_call_chain+0x48/0x60) [] (__blocking_notifier_call_chain) from [] (blocking_notifier_call_chain+0x18/0x20) [] (blocking_notifier_call_chain) from [] (device_add+0x36c/0x534) [] (device_add) from [] (of_platform_device_create_pdata+0x70/0xa4) [] (of_platform_device_create_pdata) from [] (of_platform_bus_create+0xf0/0x1ec) [] (of_platform_bus_create) from [] (of_platform_populate+0x5c/0xac) [] (of_platform_populate) from [] (of_platform_default_populate_init+0x8c/0xa8) [] (of_platform_default_populate_init) from [] (do_one_initcall+0x3c/0x164) [] (do_one_initcall) from [] (kernel_init_freeable+0x10c/0x1d0) [] (kernel_init_freeable) from [] (kernel_init+0x8/0xf0) [] (kernel_init) from [] (ret_from_fork+0x14/0x3c) Exception stack(0xeec73fb0 to 0xeec73ff8) 3fa0: 00000000 00000000 00000000 00000000 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 Code: e3520000 1afffff7 e12fff1e c0801730 (e5d02000) ---[ end trace cafa8f148e262e80 ]--- Fix this by adding the necessary initialiser. Fixes: fc20ffe1213b ("ARM: keystone: add PM domain support for clock management") Signed-off-by: Russell King Acked-by: Santosh Shilimkar Signed-off-by: Olof Johansson arch/arm/mach-keystone/pm_domain.c | 1 + 1 file changed, 1 insertion(+) commit 76936e9a6df17b89481bd2655c8684291afbe656 Author: François Cami Date: Sun May 13 20:11:15 2018 +0200 libata: Apply NOLPM quirk for SAMSUNG PM830 CXM13D1Q. Without this patch the drive errors out regularly: [ 1.090154] ata1.00: ATA-8: SAMSUNG SSD PM830 mSATA 256GB, CXM13D1Q, max UDMA/133 (...) [ 345.154996] ata1.00: exception Emask 0x40 SAct 0x0 SErr 0xc0800 action 0x6 [ 345.155006] ata1.00: irq_stat 0x40000001 [ 345.155013] ata1: SError: { HostInt CommWake 10B8B } [ 345.155018] ata1.00: failed command: SET FEATURES [ 345.155032] ata1.00: cmd ef/05:e1:00:00:00/00:00:00:00:00/40 tag 7 res 51/04:e1:00:00:00/00:00:00:00:00/40 Emask 0x41 (internal error) [ 345.155038] ata1.00: status: { DRDY ERR } [ 345.155042] ata1.00: error: { ABRT } [ 345.155051] ata1: hard resetting link [ 345.465661] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300) [ 345.466955] ata1.00: configured for UDMA/133 [ 345.467085] ata1: EH complete Signed-off-by: François Cami Acked-by: Hans de Goede Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ebc3dd688cd988754a304147753b13e58de1b5a1 Author: Daniel Glöckner Date: Mon May 14 09:40:05 2018 -0500 usb: musb: fix remote wakeup racing with suspend It has been observed that writing 0xF2 to the power register while it reads as 0xF4 results in the register having the value 0xF0, i.e. clearing RESUME and setting SUSPENDM in one go does not work. It might also violate the USB spec to transition directly from resume to suspend, especially when not taking T_DRSMDN into account. But this is what happens when a remote wakeup occurs between SetPortFeature USB_PORT_FEAT_SUSPEND on the root hub and musb_bus_suspend being called. This commit returns -EBUSY when musb_bus_suspend is called while remote wakeup is signalled and thus avoids to reset the RESUME bit. Ignoring this error when musb_port_suspend is called from musb_hub_control is ok. Signed-off-by: Daniel Glöckner Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_host.c | 5 ++++- drivers/usb/musb/musb_host.h | 7 +++++-- drivers/usb/musb/musb_virthub.c | 25 +++++++++++++++---------- 3 files changed, 24 insertions(+), 13 deletions(-) commit 9a8fca62aacc1599fea8e813d01e1955513e4fad Author: Filipe Manana Date: Fri May 11 16:42:42 2018 +0100 Btrfs: fix xattr loss after power failure If a file has xattrs, we fsync it, to ensure we clear the flags BTRFS_INODE_NEEDS_FULL_SYNC and BTRFS_INODE_COPY_EVERYTHING from its inode, the current transaction commits and then we fsync it (without either of those bits being set in its inode), we end up not logging all its xattrs. This results in deleting all xattrs when replying the log after a power failure. Trivial reproducer $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt $ touch /mnt/foobar $ setfattr -n user.xa -v qwerty /mnt/foobar $ xfs_io -c "fsync" /mnt/foobar $ sync $ xfs_io -c "pwrite -S 0xab 0 64K" /mnt/foobar $ xfs_io -c "fsync" /mnt/foobar $ mount /dev/sdb /mnt $ getfattr --absolute-names --dump /mnt/foobar $ So fix this by making sure all xattrs are logged if we log a file's inode item and neither the flags BTRFS_INODE_NEEDS_FULL_SYNC nor BTRFS_INODE_COPY_EVERYTHING were set in the inode. Fixes: 36283bf777d9 ("Btrfs: fix fsync xattr loss in the fast fsync path") Cc: # 4.2+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/tree-log.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6f2f0b394b54e2b159ef969a0b5274e9bbf82ff2 Author: Robbie Ko Date: Mon May 14 10:51:34 2018 +0800 Btrfs: send, fix invalid access to commit roots due to concurrent snapshotting [BUG] btrfs incremental send BUG happens when creating a snapshot of snapshot that is being used by send. [REASON] The problem can happen if while we are doing a send one of the snapshots used (parent or send) is snapshotted, because snapshoting implies COWing the root of the source subvolume/snapshot. 1. When doing an incremental send, the send process will get the commit roots from the parent and send snapshots, and add references to them through extent_buffer_get(). 2. When a snapshot/subvolume is snapshotted, its root node is COWed (transaction.c:create_pending_snapshot()). 3. COWing releases the space used by the node immediately, through: __btrfs_cow_block() --btrfs_free_tree_block() ----btrfs_add_free_space(bytenr of node) 4. Because send doesn't hold a transaction open, it's possible that the transaction used to create the snapshot commits, switches the commit root and the old space used by the previous root node gets assigned to some other node allocation. Allocation of a new node will use the existing extent buffer found in memory, which we previously got a reference through extent_buffer_get(), and allow the extent buffer's content (pages) to be modified: btrfs_alloc_tree_block --btrfs_reserve_extent ----find_free_extent (get bytenr of old node) --btrfs_init_new_buffer (use bytenr of old node) ----btrfs_find_create_tree_block ------alloc_extent_buffer --------find_extent_buffer (get old node) 5. So send can access invalid memory content and have unpredictable behaviour. [FIX] So we fix the problem by copying the commit roots of the send and parent snapshots and use those copies. CallTrace looks like this: ------------[ cut here ]------------ kernel BUG at fs/btrfs/ctree.c:1861! invalid opcode: 0000 [#1] SMP CPU: 6 PID: 24235 Comm: btrfs Tainted: P O 3.10.105 #23721 ffff88046652d680 ti: ffff88041b720000 task.ti: ffff88041b720000 RIP: 0010:[] read_node_slot+0x108/0x110 [btrfs] RSP: 0018:ffff88041b723b68 EFLAGS: 00010246 RAX: ffff88043ca6b000 RBX: ffff88041b723c50 RCX: ffff880000000000 RDX: 000000000000004c RSI: ffff880314b133f8 RDI: ffff880458b24000 RBP: 0000000000000000 R08: 0000000000000001 R09: ffff88041b723c66 R10: 0000000000000001 R11: 0000000000001000 R12: ffff8803f3e48890 R13: ffff8803f3e48880 R14: ffff880466351800 R15: 0000000000000001 FS: 00007f8c321dc8c0(0000) GS:ffff88047fcc0000(0000) CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 R2: 00007efd1006d000 CR3: 0000000213a24000 CR4: 00000000003407e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffff88041b723c50 ffff8803f3e48880 ffff8803f3e48890 ffff8803f3e48880 ffff880466351800 0000000000000001 ffffffffa08dd9d7 ffff88041b723c50 ffff8803f3e48880 ffff88041b723c66 ffffffffa08dde85 a9ff88042d2c4400 Call Trace: [] ? tree_move_down.isra.33+0x27/0x50 [btrfs] [] ? tree_advance+0xb5/0xc0 [btrfs] [] ? btrfs_compare_trees+0x2d4/0x760 [btrfs] [] ? finish_inode_if_needed+0x870/0x870 [btrfs] [] ? btrfs_ioctl_send+0xeda/0x1050 [btrfs] [] ? btrfs_ioctl+0x1e3d/0x33f0 [btrfs] [] ? handle_pte_fault+0x373/0x990 [] ? atomic_notifier_call_chain+0x16/0x20 [] ? set_task_cpu+0xb6/0x1d0 [] ? handle_mm_fault+0x143/0x2a0 [] ? __do_page_fault+0x1d0/0x500 [] ? check_preempt_curr+0x57/0x90 [] ? do_vfs_ioctl+0x4aa/0x990 [] ? do_fork+0x113/0x3b0 [] ? trace_hardirqs_off_thunk+0x3a/0x6c [] ? SyS_ioctl+0x88/0xa0 [] ? system_call_fastpath+0x16/0x1b ---[ end trace 29576629ee80b2e1 ]--- Fixes: 7069830a9e38 ("Btrfs: add btrfs_compare_trees function") CC: stable@vger.kernel.org # 3.6+ Signed-off-by: Robbie Ko Reviewed-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/ctree.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 4776cab43fd3111618112737a257dc3ef368eddd Author: David Howells Date: Thu May 10 23:10:40 2018 +0100 afs: Fix the non-encryption of calls Some AFS servers refuse to accept unencrypted traffic, so can't be accessed with kAFS. Set the AF_RXRPC security level to encrypt client calls to deal with this. Note that incoming service calls are set by the remote client and so aren't affected by this. This requires an AF_RXRPC patch to pass the value set by setsockopt to calls begun by the kernel. Signed-off-by: David Howells fs/afs/rxrpc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 428edade4e6c70e5b51fcd4188d944fbb744d84c Author: David Howells Date: Sat May 12 00:28:58 2018 +0100 afs: Fix CB.CallBack handling The handling of CB.CallBack messages sent by the fileserver to the client is broken in that they are currently being processed after the reply has been transmitted. This is not what the fileserver expects, however. It holds up change visibility until the reply comes so as to maintain cache coherency, and so expects the client to have to refetch the state on the affected files. Fix CB.CallBack handling to perform the callback break before sending the reply. The fileserver is free to hold up status fetches issued by other threads on the same client that occur in reponse to the callback until any pending changes have been committed. Fixes: d001648ec7cf ("rxrpc: Don't expose skbs to in-kernel users [ver #2]") Signed-off-by: David Howells fs/afs/cmservice.c | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) commit 68251f0a6818f3be19b1471f36c956ca97c1427d Author: David Howells Date: Sat May 12 22:31:33 2018 +0100 afs: Fix whole-volume callback handling It's possible for an AFS file server to issue a whole-volume notification that callbacks on all the vnodes in the file have been broken. This is done for R/O and backup volumes (which don't have per-file callbacks) and for things like a volume being taken offline. Fix callback handling to detect whole-volume notifications, to track it across operations and to check it during inode validation. Fixes: c435ee34551e ("afs: Overhaul the callback handling") Signed-off-by: David Howells fs/afs/callback.c | 28 +++++++++++++++++++++------- fs/afs/dir.c | 18 +++++++++--------- fs/afs/file.c | 2 +- fs/afs/flock.c | 6 +++--- fs/afs/fsclient.c | 2 +- fs/afs/inode.c | 13 ++++++++----- fs/afs/internal.h | 15 +++++++++++++++ fs/afs/security.c | 7 +++---- fs/afs/super.c | 2 +- fs/afs/write.c | 2 +- 10 files changed, 63 insertions(+), 32 deletions(-) commit f9c1bba3d392843f046d2ee27b4dfcec989d8a4b Author: Marc Dionne Date: Fri May 11 21:35:06 2018 -0300 afs: Fix afs_find_server search loop The code that looks up servers by addresses makes the assumption that the list of addresses for a server is sorted. It exits the loop if it finds that the target address is larger than the current candidate. As the list is not currently sorted, this can lead to a failure to find a matching server, which can cause callbacks from that server to be ignored. Remove the early exit case so that the complete list is searched. Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Signed-off-by: Marc Dionne Signed-off-by: David Howells fs/afs/server.c | 13 ------------- 1 file changed, 13 deletions(-) commit a86b06d1ccd218a6a50d6a3a88fbd2abcd0eaa94 Author: David Howells Date: Fri May 11 23:45:40 2018 +0100 afs: Fix the handling of an unfound server in CM operations If the client cache manager operations that need the server record (CB.Callback, CB.InitCallBackState, and CB.InitCallBackState3) can't find the server record, they abort the call from the file server with RX_CALL_DEAD when they should return okay. Fixes: c35eccb1f614 ("[AFS]: Implement the CB.InitCallBackState3 operation.") Signed-off-by: David Howells fs/afs/cmservice.c | 34 ++++++++++++---------------------- fs/afs/rxrpc.c | 5 ----- 2 files changed, 12 insertions(+), 27 deletions(-) commit 3709a399c15e4273d9a94b123374f12e5664318c Author: David Howells Date: Fri May 11 22:59:42 2018 +0100 afs: Add a tracepoint to record callbacks from unlisted servers Add a tracepoint to record callbacks from servers for which we don't have a record. Signed-off-by: David Howells fs/afs/cmservice.c | 12 +++++++++--- include/trace/events/afs.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 3 deletions(-) commit 001ab5a67ee5d191c64aebf4b4ef8c7a0dcfd2bc Author: David Howells Date: Fri May 11 23:21:35 2018 +0100 afs: Fix the handling of CB.InitCallBackState3 to find the server by UUID Fix the handling of the CB.InitCallBackState3 service call to find the record of a server that we're using by looking it up by the UUID passed as the parameter rather than by its address (of which it might have many, and which may change). Fixes: c35eccb1f614 ("[AFS]: Implement the CB.InitCallBackState3 operation.") Signed-off-by: David Howells fs/afs/cmservice.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3d9fa91161387ee629e7a07c47934d119910c8ae Author: David Howells Date: Fri May 11 22:55:59 2018 +0100 afs: Fix VNOVOL handling in address rotation If a volume location record lists multiple file servers for a volume, then it's possible that due to a misconfiguration or a changing configuration that one of the file servers doesn't know about it yet and will abort VNOVOL. Currently, the rotation algorithm will stop with EREMOTEIO. Fix this by moving on to try the next server if VNOVOL is returned. Once all the servers have been tried and the record rechecked, the algorithm will stop with EREMOTEIO or ENOMEDIUM. Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Reported-by: Marc Dionne Signed-off-by: David Howells fs/afs/rotate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 684b0f68cf1c1cf4a40834818653491c5cad4435 Author: David Howells Date: Thu May 10 21:51:47 2018 +0100 afs: Fix AFSFetchStatus decoder to provide OpenAFS compatibility The OpenAFS server's RXAFS_InlineBulkStatus implementation has a bug whereby if an error occurs on one of the vnodes being queried, then the errorCode field is set correctly in the corresponding status, but the interfaceVersion field is left unset. Fix kAFS to deal with this by evaluating the AFSFetchStatus blob against the following cases when called from FS.InlineBulkStatus delivery: (1) If InterfaceVersion == 0 then: (a) If errorCode != 0 then it indicates the abort code for the corresponding vnode. (b) If errorCode == 0 then the status record is invalid. (2) If InterfaceVersion == 1 then: (a) If errorCode != 0 then it indicates the abort code for the corresponding vnode. (b) If errorCode == 0 then the status record is valid and can be parsed. (3) If InterfaceVersion is anything else then the status record is invalid. Fixes: dd9fbcb8e103 ("afs: Rearrange status mapping") Reported-by: Jeffrey Altman Signed-off-by: David Howells fs/afs/fsclient.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 90d617633368ab97a2c7571c6e66dad54f39228d Author: Boris Brezillon Date: Wed May 9 09:13:58 2018 +0200 mtd: rawnand: marvell: Fix read logic for layouts with ->nchunks > 2 The code is doing monolithic reads for all chunks except the last one which is wrong since a monolithic read will issue the READ0+ADDRS+READ_START sequence. It not only takes longer because it forces the NAND chip to reload the page content into its internal cache, but by doing that we also reset the column pointer to 0, which means we'll always read the first chunk instead of moving to the next one. Rework the code to do a monolithic read only for the first chunk, then switch to naked reads for all intermediate chunks and finally issue a last naked read for the last chunk. Fixes: 02f26ecf8c77 mtd: nand: add reworked Marvell NAND controller driver Cc: stable@vger.kernel.org Reported-by: Chris Packham Signed-off-by: Boris Brezillon Tested-by: Chris Packham Acked-by: Miquel Raynal drivers/mtd/nand/raw/marvell_nand.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ea739a287f4f16d6250bea779a1026ead79695f2 Author: Ben Hutchings Date: Thu May 10 19:20:54 2018 +0100 mtd: Fix comparison in map_word_andequal() Commit 9e343e87d2c4 ("mtd: cfi: convert inline functions to macros") changed map_word_andequal() into a macro, but also changed the right hand side of the comparison from val3 to val2. Change it back to use val3 on the right hand side. Thankfully this did not cause a regression because all callers currently pass the same argument for val2 and val3. Fixes: 9e343e87d2c4 ("mtd: cfi: convert inline functions to macros") Signed-off-by: Ben Hutchings Signed-off-by: Boris Brezillon include/linux/mtd/map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec5a3b4b507efca903d848518dcf2ebf7b04b466 Author: David Howells Date: Thu May 10 14:22:38 2018 +0100 afs: Fix server rotation's handling of fileserver probe failure The server rotation algorithm just gives up if it fails to probe a fileserver. Fix this by rotating to the next fileserver instead. Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Signed-off-by: David Howells fs/afs/rotate.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit d4a96bec7a7362834ef5c31d7b2cc9bf36eb0570 Author: David Howells Date: Thu May 10 08:43:04 2018 +0100 afs: Fix refcounting in callback registration The refcounting on afs_cb_interest struct objects in afs_register_server_cb_interest() is wrong as it uses the server list entry's call back interest pointer without regard for the fact that it might be replaced at any time and the object thrown away. Fix this by: (1) Put a lock on the afs_server_list struct that can be used to mediate access to the callback interest pointers in the servers array. (2) Keep a ref on the callback interest that we get from the entry. (3) Dropping the old reference held by vnode->cb_interest if we replace the pointer. Fixes: c435ee34551e ("afs: Overhaul the callback handling") Signed-off-by: David Howells fs/afs/callback.c | 56 +++++++++++++++++++++++++++++++++++++--------------- fs/afs/internal.h | 7 +++++-- fs/afs/rotate.c | 4 ++-- fs/afs/server_list.c | 7 +++++-- 4 files changed, 52 insertions(+), 22 deletions(-) commit f2686b09269ec1a6f23028b5675d87c3b4579a4c Author: David Howells Date: Thu May 10 14:12:50 2018 +0100 afs: Fix giving up callbacks on server destruction When a server record is destroyed, we want to send a message to the server telling it that we're giving up all the callbacks it has promised us. Apply two fixes to this: (1) Only send the FS.GiveUpAllCallBacks message if we actually got a callback from that server. We assume this to be the case if we performed at least one successful FS operation on that server. (2) Send it to the address last used for that server rather than always picking the first address in the list (which might be unreachable). Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Signed-off-by: David Howells fs/afs/internal.h | 1 + fs/afs/rxrpc.c | 6 +++++- fs/afs/server.c | 8 +++++--- 3 files changed, 11 insertions(+), 4 deletions(-) commit 01fd79e6de74a447c5657913a335d9ce6508cdb1 Author: David Howells Date: Wed May 9 22:03:18 2018 +0100 afs: Fix address list parsing The parsing of port specifiers in the address list obtained from the DNS resolution upcall doesn't work as in4_pton() and in6_pton() will fail on encountering an unexpected delimiter (in this case, the '+' marking the port number). However, in*_pton() can't be given multiple specifiers. Fix this by finding the delimiter in advance and not relying on in*_pton() to find the end of the address for us. Fixes: 8b2a464ced77 ("afs: Add an address list concept") Signed-off-by: David Howells fs/afs/addr_list.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit b61f7dcf4eb2653e870c9079b02d11a0834cfe39 Author: David Howells Date: Fri Apr 27 20:46:22 2018 +0100 afs: Fix directory page locking The afs directory loading code (primarily afs_read_dir()) locks all the pages that hold a directory's content blob to defend against getdents/getdents races and getdents/lookup races where the competitors issue conflicting reads on the same data. As the reads will complete consecutively, they may retrieve different versions of the data and one may overwrite the data that the other is busy parsing. Fix this by not locking the pages at all, but rather by turning the validation lock into an rwsem and getting an exclusive lock on it whilst reading the data or validating the attributes and a shared lock whilst parsing the data. Sharing the attribute validation lock should be fine as the data fetch will retrieve the attributes also. The individual page locks aren't needed at all as the only place they're being used is to serialise data loading. Without this patch, the: if (!test_bit(AFS_VNODE_DIR_VALID, &dvnode->flags)) { ... } part of afs_read_dir() may be skipped, leaving the pages unlocked when we hit the success: clause - in which case we try to unlock the not-locked pages, leading to the following oops: page:ffffe38b405b4300 count:3 mapcount:0 mapping:ffff98156c83a978 index:0x0 flags: 0xfffe000001004(referenced|private) raw: 000fffe000001004 ffff98156c83a978 0000000000000000 00000003ffffffff raw: dead000000000100 dead000000000200 0000000000000001 ffff98156b27c000 page dumped because: VM_BUG_ON_PAGE(!PageLocked(page)) page->mem_cgroup:ffff98156b27c000 ------------[ cut here ]------------ kernel BUG at mm/filemap.c:1205! ... RIP: 0010:unlock_page+0x43/0x50 ... Call Trace: afs_dir_iterate+0x789/0x8f0 [kafs] ? _cond_resched+0x15/0x30 ? kmem_cache_alloc_trace+0x166/0x1d0 ? afs_do_lookup+0x69/0x490 [kafs] ? afs_do_lookup+0x101/0x490 [kafs] ? key_default_cmp+0x20/0x20 ? request_key+0x3c/0x80 ? afs_lookup+0xf1/0x340 [kafs] ? __lookup_slow+0x97/0x150 ? lookup_slow+0x35/0x50 ? walk_component+0x1bf/0x490 ? path_lookupat.isra.52+0x75/0x200 ? filename_lookup.part.66+0xa0/0x170 ? afs_end_vnode_operation+0x41/0x60 [kafs] ? __check_object_size+0x9c/0x171 ? strncpy_from_user+0x4a/0x170 ? vfs_statx+0x73/0xe0 ? __do_sys_newlstat+0x39/0x70 ? __x64_sys_getdents+0xc9/0x140 ? __x64_sys_getdents+0x140/0x140 ? do_syscall_64+0x5b/0x160 ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: f3ddee8dc4e2 ("afs: Fix directory handling") Reported-by: Marc Dionne Signed-off-by: David Howells fs/afs/dir.c | 36 +++++++++++++++++------------------- fs/afs/inode.c | 6 +++--- fs/afs/internal.h | 2 +- fs/afs/super.c | 2 +- 4 files changed, 22 insertions(+), 24 deletions(-) commit cd078bf95df29d827daca0274a9a13821c11eedb Author: Chris Wilson Date: Fri May 11 13:11:45 2018 +0100 drm/i915/execlists: Use rmb() to order CSB reads We assume that the CSB is written using the normal ringbuffer coherency protocols, as outlined in kernel/events/ring_buffer.c: * (HW) (DRIVER) * * if (LOAD ->data_tail) { LOAD ->data_head * (A) smp_rmb() (C) * STORE $data LOAD $data * smp_wmb() (B) smp_mb() (D) * STORE ->data_head STORE ->data_tail * } So we assume that the HW fulfils its ordering requirements (B), and so we should use a complimentary rmb (C) to ensure that our read of its WRITE pointer is completed before we start accessing the data. The final mb (D) is implied by the uncached mmio we perform to inform the HW of our READ pointer. References: https://bugs.freedesktop.org/show_bug.cgi?id=105064 References: https://bugs.freedesktop.org/show_bug.cgi?id=105888 References: https://bugs.freedesktop.org/show_bug.cgi?id=106185 Fixes: 767a983ab255 ("drm/i915/execlists: Read the context-status HEAD from the HWSP") References: 61bf9719fa17 ("drm/i915/cnl: Use mmio access to context status buffer") Suggested-by: Mika Kuoppala Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Michał Winiarski Cc: Rafael Antognolli Cc: Michel Thierry Cc: Timo Aaltonen Tested-by: Timo Aaltonen Acked-by: Michel Thierry Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180511121147.31915-1-chris@chris-wilson.co.uk (cherry picked from commit 77dfedb5be03779f9a5d83e323a1b36e32090105) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_lrc.c | 1 + 1 file changed, 1 insertion(+) commit 20943f984967477c906522112d2b6b5a29f94684 Author: Matthew Auld Date: Wed May 2 20:50:21 2018 +0100 drm/i915/userptr: reject zero user_size Operating on a zero sized GEM userptr object will lead to explosions. Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl") Testcase: igt/gem_userptr_blits/input-checking Signed-off-by: Matthew Auld Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180502195021.30900-1-matthew.auld@intel.com (cherry picked from commit c11c7bfd213495784b22ef82a69b6489f8d0092f) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_userptr.c | 3 +++ 1 file changed, 3 insertions(+) commit 2fa9d1cfaf0e02f8abef0757002bff12dfcfa4e6 Author: Dave Hansen Date: Wed May 9 10:13:58 2018 -0700 x86/pkeys: Do not special case protection key 0 mm_pkey_is_allocated() treats pkey 0 as unallocated. That is inconsistent with the manpages, and also inconsistent with mm->context.pkey_allocation_map. Stop special casing it and only disallow values that are actually bad (< 0). The end-user visible effect of this is that you can now use mprotect_pkey() to set pkey=0. This is a bit nicer than what Ram proposed[1] because it is simpler and removes special-casing for pkey 0. On the other hand, it does allow applications to pkey_free() pkey-0, but that's just a silly thing to do, so we are not going to protect against it. The scenario that could happen is similar to what happens if you free any other pkey that is in use: it might get reallocated later and used to protect some other data. The most likely scenario is that pkey-0 comes back from pkey_alloc(), an access-disable or write-disable bit is set in PKRU for it, and the next stack access will SIGSEGV. It's not horribly different from if you mprotect()'d your stack or heap to be unreadable or unwritable, which is generally very foolish, but also not explicitly prevented by the kernel. 1. http://lkml.kernel.org/r/1522112702-27853-1-git-send-email-linuxram@us.ibm.com Signed-off-by: Dave Hansen Cc: Andrew Morton p Cc: Dave Hansen Cc: Linus Torvalds Cc: Michael Ellermen Cc: Peter Zijlstra Cc: Ram Pai Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-mm@kvack.org Cc: stable@vger.kernel.org Fixes: 58ab9a088dda ("x86/pkeys: Check against max pkey to avoid overflows") Link: http://lkml.kernel.org/r/20180509171358.47FD785E@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/mmu_context.h | 2 +- arch/x86/include/asm/pkeys.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 3488a600d90bcaf061b104dbcfbdc8d99b398312 Author: Dave Hansen Date: Wed May 9 10:13:56 2018 -0700 x86/pkeys/selftests: Add a test for pkey 0 Protection key 0 is the default key for all memory and will not normally come back from pkey_alloc(). But, you might still want pass it to mprotect_pkey(). This check ensures that you can use pkey 0. Signed-off-by: Dave Hansen Cc: Andrew Morton Cc: Dave Hansen Cc: Linus Torvalds Cc: Michael Ellermen Cc: Peter Zijlstra Cc: Ram Pai Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180509171356.9E40B254@viggo.jf.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/protection_keys.c | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit acb25d761d6f2f64e785ccefc71e54f244f1eda4 Author: Dave Hansen Date: Wed May 9 10:13:54 2018 -0700 x86/pkeys/selftests: Save off 'prot' for allocations This makes it possible to to tell what 'prot' a given allocation is supposed to have. That way, if we want to change just the pkey, we know what 'prot' to pass to mprotect_pkey(). Also, keep a record of the most recent allocation so the tests can easily find it. Signed-off-by: Dave Hansen Cc: Andrew Morton Cc: Dave Hansen Cc: Linus Torvalds Cc: Michael Ellermen Cc: Peter Zijlstra Cc: Ram Pai Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180509171354.AA23E228@viggo.jf.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/protection_keys.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 3d64f4ed15c3c53dba4c514bf59c334464dee373 Author: Dave Hansen Date: Wed May 9 10:13:52 2018 -0700 x86/pkeys/selftests: Fix pointer math We dump out the entire area of the siginfo where the si_pkey_ptr is supposed to be. But, we do some math on the poitner, which is a u32. We intended to do byte math, not u32 math on the pointer. Cast it over to a u8* so it works. Also, move this block of code to below th si_code check. It doesn't hurt anything, but the si_pkey field is gibberish for other signal types. Signed-off-by: Dave Hansen Cc: Andrew Morton Cc: Dave Hansen Cc: Linus Torvalds Cc: Michael Ellermen Cc: Peter Zijlstra Cc: Ram Pai Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180509171352.9BE09819@viggo.jf.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/protection_keys.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 0a0b152083cfc44ec1bb599b57b7aab41327f998 Author: Dave Hansen Date: Wed May 9 10:13:51 2018 -0700 x86/pkeys: Override pkey when moving away from PROT_EXEC I got a bug report that the following code (roughly) was causing a SIGSEGV: mprotect(ptr, size, PROT_EXEC); mprotect(ptr, size, PROT_NONE); mprotect(ptr, size, PROT_READ); *ptr = 100; The problem is hit when the mprotect(PROT_EXEC) is implicitly assigned a protection key to the VMA, and made that key ACCESS_DENY|WRITE_DENY. The PROT_NONE mprotect() failed to remove the protection key, and the PROT_NONE-> PROT_READ left the PTE usable, but the pkey still in place and left the memory inaccessible. To fix this, we ensure that we always "override" the pkee at mprotect() if the VMA does not have execute-only permissions, but the VMA has the execute-only pkey. We had a check for PROT_READ/WRITE, but it did not work for PROT_NONE. This entirely removes the PROT_* checks, which ensures that PROT_NONE now works. Reported-by: Shakeel Butt Signed-off-by: Dave Hansen Cc: Andrew Morton Cc: Dave Hansen Cc: Linus Torvalds Cc: Michael Ellermen Cc: Peter Zijlstra Cc: Ram Pai Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-mm@kvack.org Cc: stable@vger.kernel.org Fixes: 62b5f7d013f ("mm/core, x86/mm/pkeys: Add execute-only protection keys support") Link: http://lkml.kernel.org/r/20180509171351.084C5A71@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/pkeys.h | 12 +++++++++++- arch/x86/mm/pkeys.c | 21 +++++++++++---------- 2 files changed, 22 insertions(+), 11 deletions(-) commit f50b4878329ab61d8e05796f655adeb6f5fb57c6 Author: Dave Hansen Date: Wed May 9 10:13:50 2018 -0700 x86/pkeys/selftests: Fix pkey exhaustion test off-by-one In our "exhaust all pkeys" test, we make sure that there is the expected number available. Turns out that the test did not cover the execute-only key, but discussed it anyway. It did *not* discuss the test-allocated key. Now that we have a test for the mprotect(PROT_EXEC) case, this off-by-one issue showed itself. Correct the off-by- one and add the explanation for the case we missed. Signed-off-by: Dave Hansen Cc: Andrew Morton Cc: Dave Hansen Cc: Linus Torvalds Cc: Michael Ellermen Cc: Peter Zijlstra Cc: Ram Pai Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180509171350.E1656B95@viggo.jf.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/protection_keys.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 6af17cf89e99b64cf1f660bf848755442ab2f047 Author: Dave Hansen Date: Wed May 9 10:13:48 2018 -0700 x86/pkeys/selftests: Add PROT_EXEC test Under the covers, implement executable-only memory with protection keys when userspace calls mprotect(PROT_EXEC). But, we did not have a selftest for that. Now we do. Signed-off-by: Dave Hansen Cc: Andrew Morton Cc: Dave Hansen Cc: Linus Torvalds Cc: Michael Ellermen Cc: Peter Zijlstra Cc: Ram Pai Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180509171348.9EEE4BEF@viggo.jf.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/protection_keys.c | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 3fcd2b2d928904cbf30b01e2c5e4f1dd2f9ab262 Author: Dave Hansen Date: Wed May 9 10:13:47 2018 -0700 x86/pkeys/selftests: Factor out "instruction page" We currently have an execute-only test, but it is for the explicit mprotect_pkey() interface. We will soon add a test for the implicit mprotect(PROT_EXEC) enterface. We need this code in both tests. Signed-off-by: Dave Hansen Cc: Andrew Morton Cc: Dave Hansen Cc: Linus Torvalds Cc: Michael Ellermen Cc: Peter Zijlstra Cc: Ram Pai Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180509171347.C64AB733@viggo.jf.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/protection_keys.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 7e7fd67ca39335a49619729821efb7cbdd674eb0 Author: Dave Hansen Date: Wed May 9 10:13:46 2018 -0700 x86/pkeys/selftests: Allow faults on unknown keys The exec-only pkey is allocated inside the kernel and userspace is not told what it is. So, allow PK faults to occur that have an unknown key. Signed-off-by: Dave Hansen Cc: Andrew Morton Cc: Dave Hansen Cc: Linus Torvalds Cc: Michael Ellermen Cc: Peter Zijlstra Cc: Ram Pai Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180509171345.7FC7DA00@viggo.jf.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/protection_keys.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit caf9eb6b4c82fc6cbd03697052ff22d97b0c377b Author: Dave Hansen Date: Wed May 9 10:13:44 2018 -0700 x86/pkeys/selftests: Avoid printf-in-signal deadlocks printf() and friends are unusable in signal handlers. They deadlock. The pkey selftest does not do any normal printing in signal handlers, only extra debugging. So, just print the format string so we get *some* output when debugging. Signed-off-by: Dave Hansen Cc: Andrew Morton Cc: Dave Hansen Cc: Linus Torvalds Cc: Michael Ellermen Cc: Peter Zijlstra Cc: Ram Pai Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180509171344.C53FD2F3@viggo.jf.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/pkey-helpers.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit a50093d60464dd51d1ae0c2267b0abe9e1de77f3 Author: Dave Hansen Date: Wed May 9 10:13:42 2018 -0700 x86/pkeys/selftests: Remove dead debugging code, fix dprint_in_signal There is some noisy debug code at the end of the signal handler. It was disabled by an early, unconditional "return". However, that return also hid a dprint_in_signal=0, which kept dprint_in_signal=1 and effectively locked us into permanent dprint_in_signal=1 behavior. Remove the return and the dead code, fixing dprint_in_signal. Signed-off-by: Dave Hansen Cc: Andrew Morton Cc: Dave Hansen Cc: Linus Torvalds Cc: Michael Ellermen Cc: Peter Zijlstra Cc: Ram Pai Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180509171342.846B9B2E@viggo.jf.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/protection_keys.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 86b9eea230edf4c67d4d4a70fba9b74505867a25 Author: Dave Hansen Date: Wed May 9 10:13:40 2018 -0700 x86/pkeys/selftests: Stop using assert() If we use assert(), the program "crashes". That can be scary to users, so stop doing it. Just exit with a >0 exit code instead. Signed-off-by: Dave Hansen Cc: Andrew Morton Cc: Dave Hansen Cc: Linus Torvalds Cc: Michael Ellermen Cc: Peter Zijlstra Cc: Ram Pai Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180509171340.E63EF7DA@viggo.jf.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/protection_keys.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 55556b0b2016806b2e16a20b62d143383983a34a Author: Dave Hansen Date: Wed May 9 10:13:38 2018 -0700 x86/pkeys/selftests: Give better unexpected fault error messages do_not_expect_pk_fault() is a helper that we call when we do not expect a PK fault to have occurred. But, it is a function, which means that it obscures the line numbers from pkey_assert(). It also gives no details. Replace it with an implementation that gives nice line numbers and also lets callers pass in a more descriptive message about what happened that caused the unexpected fault. Signed-off-by: Dave Hansen Cc: Andrew Morton Cc: Dave Hansen Cc: Linus Torvalds Cc: Michael Ellermen Cc: Peter Zijlstra Cc: Ram Pai Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180509171338.55D13B64@viggo.jf.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/protection_keys.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 59c2a7226fc5130032021c99f05ad5c0a56551cd Author: Andy Lutomirski Date: Tue May 8 10:28:35 2018 -0700 x86/selftests: Add mov_to_ss test This exercises a nasty corner case of the x86 ISA. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/67e08b69817171da8026e0eb3af0214b06b4d74f.1525800455.git.luto@kernel.org Signed-off-by: Ingo Molnar tools/testing/selftests/x86/Makefile | 2 +- tools/testing/selftests/x86/mov_ss_trap.c | 285 ++++++++++++++++++++++++++++++ 2 files changed, 286 insertions(+), 1 deletion(-) commit 73bb4d6cd192b8629c5125aaada9892d9fc986b6 Author: Ingo Molnar Date: Mon May 14 10:59:08 2018 +0200 x86/mpx/selftests: Adjust the self-test to fresh distros that export the MPX ABI Fix this warning: mpx-mini-test.c:422:0: warning: "SEGV_BNDERR" redefined Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akpm@linux-foundation.org Cc: dave.hansen@intel.com Cc: linux-mm@kvack.org Cc: linuxram@us.ibm.com Cc: mpe@ellerman.id.au Cc: shakeelb@google.com Cc: shuah@kernel.org Link: http://lkml.kernel.org/r/20180514085908.GA12798@gmail.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/mpx-mini-test.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0fb96620dce351608aa82eed5942e2f58b07beda Author: Ingo Molnar Date: Mon May 14 10:56:23 2018 +0200 x86/pkeys/selftests: Adjust the self-test to fresh distros that export the pkeys ABI Ubuntu 18.04 started exporting pkeys details in header files, resulting in build failures and warnings in the pkeys self-tests: protection_keys.c:232:0: warning: "SEGV_BNDERR" redefined protection_keys.c:387:5: error: conflicting types for ‘pkey_get’ protection_keys.c:409:5: error: conflicting types for ‘pkey_set’ ... Fix these namespace conflicts and double definitions, plus also clean up the ABI definitions to make it all a bit more readable ... Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akpm@linux-foundation.org Cc: dave.hansen@intel.com Cc: linux-mm@kvack.org Cc: linuxram@us.ibm.com Cc: mpe@ellerman.id.au Cc: shakeelb@google.com Cc: shuah@kernel.org Link: http://lkml.kernel.org/r/20180514085623.GB7094@gmail.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/protection_keys.c | 67 ++++++++++++++++----------- 1 file changed, 41 insertions(+), 26 deletions(-) commit 4a09f0210c8b1221aae8afda8bd3a603fece0986 Author: Alexander Potapenko Date: Wed May 9 11:18:22 2018 +0200 x86/boot/64/clang: Use fixup_pointer() to access '__supported_pte_mask' Clang builds with defconfig started crashing after the following commit: fb43d6cb91ef ("x86/mm: Do not auto-massage page protections") This was caused by introducing a new global access in __startup_64(). Code in __startup_64() can be relocated during execution, but the compiler doesn't have to generate PC-relative relocations when accessing globals from that function. Clang actually does not generate them, which leads to boot-time crashes. To work around this problem, every global pointer must be adjusted using fixup_pointer(). Signed-off-by: Alexander Potapenko Reviewed-by: Dave Hansen Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: dvyukov@google.com Cc: kirill.shutemov@linux.intel.com Cc: linux-mm@kvack.org Cc: md@google.com Cc: mka@chromium.org Fixes: fb43d6cb91ef ("x86/mm: Do not auto-massage page protections") Link: http://lkml.kernel.org/r/20180509091822.191810-1-glider@google.com Signed-off-by: Ingo Molnar arch/x86/kernel/head64.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 2278446e2b7cd33ad894b32e7eb63afc7db6c86e Author: Mathias Nyman Date: Mon May 14 11:57:23 2018 +0300 xhci: Fix USB3 NULL pointer dereference at logical disconnect. Hub driver will try to disable a USB3 device twice at logical disconnect, racing with xhci_free_dev() callback from the first port disable. This can be triggered with "udisksctl power-off --block-device " or by writing "1" to the "remove" sysfs file for a USB3 device in 4.17-rc4. USB3 devices don't have a similar disabled link state as USB2 devices, and use a U3 suspended link state instead. In this state the port is still enabled and connected. hub_port_connect() first disconnects the device, then later it notices that device is still enabled (due to U3 states) it will try to disable the port again (set to U3). The xhci_free_dev() called during device disable is async, so checking for existing xhci->devs[i] when setting link state to U3 the second time was successful, even if device was being freed. The regression was caused by, and whole thing revealed by, Commit 44a182b9d177 ("xhci: Fix use-after-free in xhci_free_virt_device") which sets xhci->devs[i]->udev to NULL before xhci_virt_dev() returned. and causes a NULL pointer dereference the second time we try to set U3. Fix this by checking xhci->devs[i]->udev exists before setting link state. The original patch went to stable so this fix needs to be applied there as well. Fixes: 44a182b9d177 ("xhci: Fix use-after-free in xhci_free_virt_device") Cc: Reported-by: Jordan Glover Tested-by: Jordan Glover Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f2b745f5e1304f438f9b2cd03ebc8120b6e0d3b Author: Jim Mattson Date: Sun May 13 17:33:57 2018 -0400 x86/cpu: Make alternative_msr_write work for 32-bit code Cast val and (val >> 32) to (u32), so that they fit in a general-purpose register in both 32-bit and 64-bit code. [ tglx: Made it u32 instead of uintptr_t ] Fixes: c65732e4f721 ("x86/cpu: Restore CPUID_8000_0008_EBX reload") Signed-off-by: Jim Mattson Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner Acked-by: Linus Torvalds arch/x86/include/asm/nospec-branch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fd35c88b74170d9335530d9abf271d5d73eb5401 Author: Josh Poimboeuf Date: Thu May 10 17:48:49 2018 -0500 objtool: Support GCC 8 switch tables With GCC 8, some issues were found with the objtool switch table detection. 1) In the .rodata section, immediately after the switch table, there can be another object which contains a pointer to the function which had the switch statement. In this case objtool wrongly considers the function pointer to be part of the switch table. Fix it by: a) making sure there are no pointers to the beginning of the function; and b) making sure there are no gaps in the switch table. Only the former was needed, the latter adds additional protection for future optimizations. 2) In find_switch_table(), case 1 and case 2 are missing the check to ensure that the .rodata switch table data is anonymous, i.e. that it isn't already associated with an ELF symbol. Fix it by adding the same find_symbol_containing() check which is used for case 3. This fixes the following warnings with GCC 8: drivers/block/virtio_blk.o: warning: objtool: virtio_queue_rq()+0x0: stack state mismatch: cfa1=7+8 cfa2=7+72 net/ipv6/icmp.o: warning: objtool: icmpv6_rcv()+0x0: stack state mismatch: cfa1=7+8 cfa2=7+64 drivers/usb/core/quirks.o: warning: objtool: quirks_param_set()+0x0: stack state mismatch: cfa1=7+8 cfa2=7+48 drivers/mtd/nand/raw/nand_hynix.o: warning: objtool: hynix_nand_decode_id()+0x0: stack state mismatch: cfa1=7+8 cfa2=7+24 drivers/mtd/nand/raw/nand_samsung.o: warning: objtool: samsung_nand_decode_id()+0x0: stack state mismatch: cfa1=7+8 cfa2=7+32 drivers/gpu/drm/nouveau/nvkm/subdev/top/gk104.o: warning: objtool: gk104_top_oneinit()+0x0: stack state mismatch: cfa1=7+8 cfa2=7+64 Reported-by: Arnd Bergmann Reported-by: kbuild test robot Signed-off-by: Josh Poimboeuf Acked-by: Peter Zijlstra (Intel) Cc: David Laight Cc: Greg KH Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Randy Dunlap Cc: Thomas Gleixner Cc: damian Link: http://lkml.kernel.org/r/20180510224849.xwi34d6tzheb5wgw@treble Signed-off-by: Ingo Molnar tools/objtool/check.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 13810435b9a7014fb92eb715f77da488f3b65b99 Author: Josh Poimboeuf Date: Wed May 9 22:39:15 2018 -0500 objtool: Support GCC 8's cold subfunctions GCC 8 moves a lot of unlikely code out of line to "cold" subfunctions in .text.unlikely. Properly detect the new subfunctions and treat them as extensions of the original functions. This fixes a bunch of warnings like: kernel/cgroup/cgroup.o: warning: objtool: parse_cgroup_root_flags()+0x33: sibling call from callable instruction with modified stack frame kernel/cgroup/cgroup.o: warning: objtool: cgroup_addrm_files()+0x290: sibling call from callable instruction with modified stack frame kernel/cgroup/cgroup.o: warning: objtool: cgroup_apply_control_enable()+0x25b: sibling call from callable instruction with modified stack frame kernel/cgroup/cgroup.o: warning: objtool: rebind_subsystems()+0x325: sibling call from callable instruction with modified stack frame Reported-and-tested-by: damian Reported-by: Arnd Bergmann Signed-off-by: Josh Poimboeuf Acked-by: Peter Zijlstra (Intel) Cc: David Laight Cc: Greg KH Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Randy Dunlap Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/0965e7fcfc5f31a276f0c7f298ff770c19b68706.1525923412.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/check.c | 93 ++++++++++++++++++++++++++++----------------------- tools/objtool/elf.c | 42 +++++++++++++++++++++-- tools/objtool/elf.h | 2 ++ 3 files changed, 93 insertions(+), 44 deletions(-) commit 0afd0d9e0e7879d666c1df2fa1bea4d8716909fe Author: Josh Poimboeuf Date: Wed May 9 22:39:14 2018 -0500 objtool: Fix "noreturn" detection for recursive sibling calls Objtool has some crude logic for detecting static "noreturn" functions (aka "dead ends"). This is necessary for being able to correctly follow GCC code flow when such functions are called. It's remotely possible for two functions to call each other via sibling calls. If they don't have RET instructions, objtool's noreturn detection logic goes into a recursive loop: drivers/char/ipmi/ipmi_ssif.o: warning: objtool: return_hosed_msg()+0x0: infinite recursion (objtool bug!) drivers/char/ipmi/ipmi_ssif.o: warning: objtool: deliver_recv_msg()+0x0: infinite recursion (objtool bug!) Instead of reporting an error in this case, consider the functions to be non-dead-ends. Reported-and-tested-by: Randy Dunlap Signed-off-by: Josh Poimboeuf Acked-by: Peter Zijlstra (Intel) Cc: Arnd Bergmann Cc: David Laight Cc: Greg KH Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: damian Link: http://lkml.kernel.org/r/7cc156408c5781a1f62085d352ced1fe39fe2f91.1525923412.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/check.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 4fe875e4bd3cae85ae6f6eaf77f63fabe613b66e Author: Ingo Molnar Date: Mon May 14 10:15:54 2018 +0200 objtool, kprobes/x86: Sync the latest header with tools/objtool/arch/x86/include/asm/insn.h The following commit: ee6a7354a362: kprobes/x86: Prohibit probing on exception masking instructions Modified , adding the insn_masking_exception() function. Sync the tooling version of the header to it, to fix this warning: Warning: synced file at 'tools/objtool/arch/x86/include/asm/insn.h' differs from latest kernel version at 'arch/x86/include/asm/insn.h' Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Masami Hiramatsu Cc: Thomas Gleixner Cc: Ricardo Neri Cc: Francis Deslauriers Cc: Oleg Nesterov Cc: Alexei Starovoitov Cc: Steven Rostedt Cc: Andy Lutomirski Cc: "H . Peter Anvin" Cc: Yonghong Song Cc: Borislav Petkov Cc: Linus Torvalds Cc: "David S . Miller" Signed-off-by: Ingo Molnar tools/objtool/arch/x86/include/asm/insn.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 115c93e5000b6ae6921348172e0124eb09f0a584 Merge: 16145ff 6d3299a Author: Olof Johansson Date: Mon May 14 01:05:30 2018 -0700 Merge tag 'imx-fixes-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes i.MX fixes for 4.17: - Add missing 'fsl,sec-era' property for i.MX7S device tree CAAM node, as the era information is used in various places inside CAAM driver. - There are a few errors in imx51-zii-rdu1 device tree touchscreen node. Fix them to get touchscreen actually work. * tag 'imx-fixes-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx51-zii-rdu1: fix touchscreen bindings ARM: dts: imx7s: Pass the 'fsl,sec-era' property Signed-off-by: Olof Johansson commit 16145fff375011ac7e82930aeb4dfa3b23a52ebe Merge: 602a424 31c6085 Author: Olof Johansson Date: Mon May 14 01:05:00 2018 -0700 Merge tag 'scmi-fixes-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into fixes SCMI fix for v4.17 A single patch to ensure that the scmi device is not used for setting up scmi handle after it's freed(fixes use after free). * tag 'scmi-fixes-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Use after free in scmi_create_protocol_device() Signed-off-by: Olof Johansson commit 602a42420ef791c896f01cd0e6f91e6b44d9067d Merge: 51dff16 41bd6ad Author: Olof Johansson Date: Mon May 14 01:03:47 2018 -0700 Merge tag 'omap-for-v17/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Fixes for omap variants for v4.17 This series of patches contains one BUG fix for trace if CONFIG_DEBUG_PREEMPT is enabled and a regression fix for omap1 FIQ handling on ams-delta. Then there's a dts fix for missing SoC compatible on ti81xx board dts files that did matter until we added the clkctrl clocks and without that some clocks are now not found. Then there are two logicpd-som-lv specific dts fixes that fix misconfigured pins for WLAN and audio. Turns out we had to revert the third one because it caused another regression for USB. * tag 'omap-for-v17/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: Revert "ARM: dts: logicpd-som-lv: Fix pinmux controller references" ARM: dts: correct missing "compatible" entry for ti81xx SoCs ARM: OMAP1: ams-delta: fix deferred_fiq handler ARM: dts: logicpd-som-lv: Fix pinmux controller references ARM: dts: logicpd-som-lv: Fix Audio Mute ARM: dts: logicpd-som-lv: Fix WL127x Startup Issues ARM: OMAP2+: powerdomain: use raw_smp_processor_id() for trace Signed-off-by: Olof Johansson commit 51dff16576b377f6cde47a6b4dd33ec02a7d3b84 Merge: c1c6fe6 675c721 Author: Olof Johansson Date: Mon May 14 01:03:01 2018 -0700 Merge tag 'arm-soc/for-4.17/devicetree-fixes' of https://github.com/Broadcom/stblinux into fixes This pull request contains Broadcom ARM-basec SoCs Device Tree fixes for 4.17, please pull the following: - Clement fixes in an incorrect trigger type for the ARM global timers on the Cygnus platforms * tag 'arm-soc/for-4.17/devicetree-fixes' of https://github.com/Broadcom/stblinux: ARM: dts: cygnus: fix irq type for arm global timer Signed-off-by: Olof Johansson commit c1c6fe6c66c193023865a312af06df5216b82ac8 Merge: 0d463d8 ab9d3db Author: Olof Johansson Date: Mon May 14 01:02:11 2018 -0700 Merge tag 'tee-drv-fixes-for-4.17' of git://git.linaro.org/people/jens.wiklander/linux-tee into fixes Small fixes for tee subsystem * Fixes for use-after-free via temporarily dropped reference * Checks that passed shm references are consistent in offset/size with regards to the shm object * tag 'tee-drv-fixes-for-4.17' of git://git.linaro.org/people/jens.wiklander/linux-tee: tee: check shm references are consistent in offset/size tee: shm: fix use-after-free via temporarily dropped reference Signed-off-by: Olof Johansson commit 0d463d8449010347b2bd8723cf32298bd07cfc57 Author: Marek Szyprowski Date: Sun May 6 16:55:24 2018 +0200 arm64: dts: exynos: Fix interrupt type for I2S1 device on Exynos5433 All interrupts from SoC internal modules are level triggered, so fix incorrect trigger type for I2S1 device on Exynos5433 SoCs. This fixes following kernel warning: WARNING: CPU: 2 PID: 1 at drivers/irqchip/irq-gic.c:1016 gic_irq_domain_translate+0xb0/0xb8 Modules linked in: CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.16.0-rc7-next-20180329 #646 Hardware name: Samsung TM2 board (DT) pstate: 20000005 (nzCv daif -PAN -UAO) pc : gic_irq_domain_translate+0xb0/0xb8 lr : irq_create_fwspec_mapping+0x64/0x328 sp : ffff0000098b38d0 ... Call trace: gic_irq_domain_translate+0xb0/0xb8 irq_create_of_mapping+0x78/0xa0 of_irq_get+0x6c/0xa0 of_irq_to_resource+0x38/0x108 of_irq_to_resource_table+0x50/0x78 of_device_alloc+0x118/0x1b8 of_platform_device_create_pdata+0x54/0xe0 of_platform_bus_create+0x118/0x340 of_platform_bus_create+0x17c/0x340 of_platform_populate+0x74/0xd8 of_platform_default_populate_init+0xb0/0xcc do_one_initcall+0x50/0x158 kernel_init_freeable+0x184/0x22c kernel_init+0x10/0x108 ret_from_fork+0x10/0x18 ---[ end trace 6decb2b3078d73f0 ]--- Fixes: d8d579c316e8 ("ARM: dts: exynos: Add I2S1 device node to exynos5433") Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Signed-off-by: Olof Johansson arch/arm64/boot/dts/exynos/exynos5433.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e68f92f24a009e8948ccb75cf96b40509dc13a2 Merge: 8ee7424 9bf4e37 Author: Olof Johansson Date: Mon May 14 01:00:17 2018 -0700 Merge tag 'tegra-for-4.17-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into fixes ARM: tegra: Device tree fixes for v4.17 This contains a single revert for a patch that was merged in v4.17-rc1 and that turns out to cause a regression on some boards. Further, the original issue that the patch was supposed to fix seems to have disappeared. * tag 'tegra-for-4.17-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: dts: tegra20: Revert "Fix ULPI regression on Tegra20" Signed-off-by: Olof Johansson commit 8ee742488a87d4b68de69b4f59a4fb95c084dbb2 Merge: 1e61f54 9411ac0 Author: Olof Johansson Date: Mon May 14 00:59:02 2018 -0700 Merge tag 'davinci-fixes-for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes DaVinci fixes for v4.17 * W=1 warning fixes in device-tree files * GPIO look-up fixes for legacy boot on several platforms * tag 'davinci-fixes-for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: fix GPIO lookup for I2C ARM: davinci: board-dm355-evm: fix broken networking ARM: davinci: board-omapl138-hawk: fix GPIO numbers for MMC/SD lookup ARM: davinci: board-da850-evm: fix GPIO lookup for MMC/SD ARM: davinci: board-da830-evm: fix GPIO lookup for MMC/SD ARM: dts: da850: fix W=1 warnings with pinmux node ARM: dts: da850-lcdk: add unit name for memory node ARM: dts: da850: get rid of skeleton.dtsi Signed-off-by: Olof Johansson commit 1e61f54716d646eaf79238f491af17406842796b Merge: bd37d15 edb0c3a Author: Olof Johansson Date: Mon May 14 00:58:07 2018 -0700 Merge tag 'renesas-fixes-for-v4.17' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Renesas ARM Based SoC Fixes for v4.17 Fix LVDS output on Gen2 boards Laurent Pincart says "This patch series fixes LVDS output support on the Lager, Koelsh, Porter and Gose boards that broke in v4.17-rc1 due to the combination of the R-Car DU LVDS driver rework and the DT move of all on-SoC peripherals to a /soc node. We could handle the problem in the R-Car DU LVDS DT backward compatibility code, but that fix would only be used for v4.17 as in v4.18 the Gen2 DT will move to the new LVDS DT bindings. I thus propose merging these three patches in v4.17 already to fix the problem as this is the simplest solution." * tag 'renesas-fixes-for-v4.17' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: dts: r8a7793: Convert to new LVDS DT bindings ARM: dts: r8a7791: Convert to new LVDS DT bindings ARM: dts: r8a7790: Convert to new LVDS DT bindings Signed-off-by: Olof Johansson commit bd37d1560b6ce1ade34bc35e6157bfb538eed73e Merge: 67b8d5c 8b82b66 Author: Olof Johansson Date: Mon May 14 00:57:39 2018 -0700 Merge tag 'uniphier-fixes-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into fixes UniPhier ARM SoC fixes for v4.17 - Fix input delay parameter of eMMC PHY - Weaken drive-strength of ethernet PHY pins of LD20 reference board * tag 'uniphier-fixes-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: arm64: dts: uniphier: stabilize ethernet of LD20 reference board arm64: dts: uniphier: fix input delay value for legacy mode of eMMC Signed-off-by: Olof Johansson commit d9f92772e8ec388d070752ee8f187ef8fa18621f Author: Eric Dumazet Date: Sat May 12 02:49:30 2018 -0700 xfrm6: avoid potential infinite loop in _decode_session6() syzbot found a way to trigger an infinitie loop by overflowing @offset variable that has been forced to use u16 for some very obscure reason in the past. We probably want to look at NEXTHDR_FRAGMENT handling which looks wrong, in a separate patch. In net-next, we shall try to use skb_header_pointer() instead of pskb_may_pull(). watchdog: BUG: soft lockup - CPU#1 stuck for 134s! [syz-executor738:4553] Modules linked in: irq event stamp: 13885653 hardirqs last enabled at (13885652): [] restore_regs_and_return_to_kernel+0x0/0x2b hardirqs last disabled at (13885653): [] interrupt_entry+0xb5/0xf0 arch/x86/entry/entry_64.S:625 softirqs last enabled at (13614028): [] tun_napi_alloc_frags drivers/net/tun.c:1478 [inline] softirqs last enabled at (13614028): [] tun_get_user+0x1dd9/0x4290 drivers/net/tun.c:1825 softirqs last disabled at (13614032): [] tun_get_user+0x313f/0x4290 drivers/net/tun.c:1942 CPU: 1 PID: 4553 Comm: syz-executor738 Not tainted 4.17.0-rc3+ #40 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:check_kcov_mode kernel/kcov.c:67 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x20/0x50 kernel/kcov.c:101 RSP: 0018:ffff8801d8cfe250 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: ffff8801d88a8080 RBX: ffff8801d7389e40 RCX: 0000000000000006 RDX: 0000000000000000 RSI: ffffffff868da4ad RDI: ffff8801c8a53277 RBP: ffff8801d8cfe250 R08: ffff8801d88a8080 R09: ffff8801d8cfe3e8 R10: ffffed003b19fc87 R11: ffff8801d8cfe43f R12: ffff8801c8a5327f R13: 0000000000000000 R14: ffff8801c8a4e5fe R15: ffff8801d8cfe3e8 FS: 0000000000d88940(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffff600400 CR3: 00000001acab3000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: _decode_session6+0xc1d/0x14f0 net/ipv6/xfrm6_policy.c:150 __xfrm_decode_session+0x71/0x140 net/xfrm/xfrm_policy.c:2368 xfrm_decode_session_reverse include/net/xfrm.h:1213 [inline] icmpv6_route_lookup+0x395/0x6e0 net/ipv6/icmp.c:372 icmp6_send+0x1982/0x2da0 net/ipv6/icmp.c:551 icmpv6_send+0x17a/0x300 net/ipv6/ip6_icmp.c:43 ip6_input_finish+0x14e1/0x1a30 net/ipv6/ip6_input.c:305 NF_HOOK include/linux/netfilter.h:288 [inline] ip6_input+0xe1/0x5e0 net/ipv6/ip6_input.c:327 dst_input include/net/dst.h:450 [inline] ip6_rcv_finish+0x29c/0xa10 net/ipv6/ip6_input.c:71 NF_HOOK include/linux/netfilter.h:288 [inline] ipv6_rcv+0xeb8/0x2040 net/ipv6/ip6_input.c:208 __netif_receive_skb_core+0x2468/0x3650 net/core/dev.c:4646 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:4711 netif_receive_skb_internal+0x126/0x7b0 net/core/dev.c:4785 napi_frags_finish net/core/dev.c:5226 [inline] napi_gro_frags+0x631/0xc40 net/core/dev.c:5299 tun_get_user+0x3168/0x4290 drivers/net/tun.c:1951 tun_chr_write_iter+0xb9/0x154 drivers/net/tun.c:1996 call_write_iter include/linux/fs.h:1784 [inline] do_iter_readv_writev+0x859/0xa50 fs/read_write.c:680 do_iter_write+0x185/0x5f0 fs/read_write.c:959 vfs_writev+0x1c7/0x330 fs/read_write.c:1004 do_writev+0x112/0x2f0 fs/read_write.c:1039 __do_sys_writev fs/read_write.c:1112 [inline] __se_sys_writev fs/read_write.c:1109 [inline] __x64_sys_writev+0x75/0xb0 fs/read_write.c:1109 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Cc: Steffen Klassert Cc: Nicolas Dichtel Reported-by: syzbot+0053c8...@syzkaller.appspotmail.com Signed-off-by: Steffen Klassert net/ipv6/xfrm6_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b3225ab9407f557a8e20f23f37aa7236c10a9b1 Author: Ard Biesheuvel Date: Fri May 4 07:59:58 2018 +0200 efi: Avoid potential crashes, fix the 'struct efi_pci_io_protocol_32' definition for mixed mode Mixed mode allows a kernel built for x86_64 to interact with 32-bit EFI firmware, but requires us to define all struct definitions carefully when it comes to pointer sizes. 'struct efi_pci_io_protocol_32' currently uses a 'void *' for the 'romimage' field, which will be interpreted as a 64-bit field on such kernels, potentially resulting in bogus memory references and subsequent crashes. Tested-by: Hans de Goede Signed-off-by: Ard Biesheuvel Cc: Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180504060003.19618-13-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/boot/compressed/eboot.c | 6 ++++-- include/linux/efi.h | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) commit 9d6b4bfb59a036d0da6406295481cdb3a5f4ffba Merge: 4f6b15c 3597683 Author: David S. Miller Date: Sun May 13 21:07:02 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-05-14 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix nfp to allow zero-length BPF capabilities, meaning the nfp capability parsing loop will otherwise exit early if the last capability is zero length and therefore driver will fail to probe with an error such as: nfp: BPF capabilities left after parsing, parsed:92 total length:100 nfp: invalid BPF capabilities at offset:92 Fix from Jakub. 2) libbpf's bpf_object__open() may return IS_ERR_OR_NULL() and not just an error. Fix libbpf's bpf_prog_load_xattr() to handle that case as well, also from Jakub. ==================== Signed-off-by: David S. Miller commit 4f6b15c3a604c0addf1607c5482c46a0a5123066 Merge: 91dfd02 f0dfd7a Author: David S. Miller Date: Sun May 13 20:28:47 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS fixes for net The following patchset contains Netfilter/IPVS fixes for your net tree, they are: 1) Fix handling of simultaneous open TCP connection in conntrack, from Jozsef Kadlecsik. 2) Insufficient sanitify check of xtables extension names, from Florian Westphal. 3) Skip unnecessary synchronize_rcu() call when transaction log is already empty, from Florian Westphal. 4) Incorrect destination mac validation in ebt_stp, from Stephen Hemminger. 5) xtables module reference counter leak in nft_compat, from Florian Westphal. 6) Incorrect connection reference counting logic in IPVS one-packet scheduler, from Julian Anastasov. 7) Wrong stats for 32-bits CPU in IPVS, also from Julian. 8) Calm down sparse error in netfilter core, also from Florian. 9) Use nla_strlcpy to fix compilation warning in nfnetlink_acct and nfnetlink_cthelper, again from Florian. 10) Missing module alias in icmp and icmp6 xtables extensions, from Florian Westphal. 11) Base chain statistics in nf_tables may be unset/null, from Florian. 12) Fix handling of large matchinfo size in nft_compat, this includes one preparation for before this fix. From Florian. 13) Fix bogus EBUSY error when deleting chains due to incorrect reference counting from the preparation phase of the two-phase commit protocol. ==================== Signed-off-by: David S. Miller commit 91dfd02b23006e7cc557bcb3a40aeb740f66fb52 Author: Michal Kalderon Date: Sun May 13 20:54:06 2018 +0300 qede: Fix ref-cnt usage count Rebooting while qedr is loaded with a VLAN interface present results in unregister_netdevice waiting for the usage count to become free. The fix is that rdma devices should be removed before unregistering the netdevice, to assure all references to ndev are decreased. Fixes: cee9fbd8e2e9 ("qede: Add qedr framework") Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 55c82617c3e82210b7471e9334e8fc5df6a9961f Author: Christoph Hellwig Date: Sat May 12 12:16:50 2018 +0200 3c59x: convert to generic DMA API This driver supports EISA devices in addition to PCI devices, and relied on the legacy behavior of the pci_dma* shims to pass on a NULL pointer to the DMA API, and the DMA API being able to handle that. When the NULL forwarding broke the EISA support got broken. Fix this by converting to the DMA API instead of the legacy PCI shims. Fixes: 4167b2ad ("PCI: Remove NULL device handling from PCI DMA API") Reported-by: tedheadster Tested-by: tedheadster Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller drivers/net/ethernet/3com/3c59x.c | 104 +++++++++++++++++++------------------- 1 file changed, 51 insertions(+), 53 deletions(-) commit b84bbaf7a6c8cca24f8acf25a2c8e46913a947ba Author: Willem de Bruijn Date: Fri May 11 13:24:25 2018 -0400 packet: in packet_snd start writing at link layer allocation Packet sockets allow construction of packets shorter than dev->hard_header_len to accommodate protocols with variable length link layer headers. These packets are padded to dev->hard_header_len, because some device drivers interpret that as a minimum packet size. packet_snd reserves dev->hard_header_len bytes on allocation. SOCK_DGRAM sockets call skb_push in dev_hard_header() to ensure that link layer headers are stored in the reserved range. SOCK_RAW sockets do the same in tpacket_snd, but not in packet_snd. Syzbot was able to send a zero byte packet to a device with massive 116B link layer header, causing padding to cross over into skb_shinfo. Fix this by writing from the start of the llheader reserved range also in the case of packet_snd/SOCK_RAW. Update skb_set_network_header to the new offset. This also corrects it for SOCK_DGRAM, where it incorrectly double counted reserve due to the skb_push in dev_hard_header. Fixes: 9ed988cd5915 ("packet: validate variable length ll headers") Reported-by: syzbot+71d74a5406d02057d559@syzkaller.appspotmail.com Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/packet/af_packet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 67b8d5c7081221efa252e111cd52532ec6d4266f Author: Linus Torvalds Date: Sun May 13 16:15:17 2018 -0700 Linux 4.17-rc5 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0dfd7a2b35b02030949100247d851b793cb275f Author: Colin Ian King Date: Wed May 9 13:22:56 2018 +0100 netfilter: nf_tables: fix memory leak on error exit return Currently the -EBUSY error return path is not free'ing resources allocated earlier, leaving a memory leak. Fix this by exiting via the error exit label err5 that performs the necessary resource clean up. Detected by CoverityScan, CID#1432975 ("Resource leak") Fixes: 9744a6fcefcb ("netfilter: nf_tables: check if same extensions are set when adding elements") Signed-off-by: Colin Ian King Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b1ae32dbab50ed19cfc16d225b0fb0114fb13025 Author: Alexei Starovoitov Date: Sun May 13 12:32:22 2018 -0700 x86/cpufeature: Guard asm_volatile_goto usage for BPF compilation Workaround for the sake of BPF compilation which utilizes kernel headers, but clang does not support ASM GOTO and fails the build. Fixes: d0266046ad54 ("x86: Remove FAST_FEATURE_TESTS") Suggested-by: Thomas Gleixner Signed-off-by: Alexei Starovoitov Signed-off-by: Thomas Gleixner Cc: daniel@iogearbox.net Cc: peterz@infradead.org Cc: netdev@vger.kernel.org Cc: bp@alien8.de Cc: yhs@fb.com Cc: kernel-team@fb.com Cc: torvalds@linux-foundation.org Cc: davem@davemloft.net Link: https://lkml.kernel.org/r/20180513193222.1997938-1-ast@kernel.org arch/x86/include/asm/cpufeature.h | 15 +++++++++++++++ samples/bpf/Makefile | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) commit b127125d9db23e4856156a7c909a3c8e18b69f99 Author: Al Viro Date: Wed Apr 25 10:28:38 2018 -0400 fix breakage caused by d_find_alias() semantics change "VFS: don't keep disconnected dentries on d_anon" had a non-trivial side-effect - d_unhashed() now returns true for those dentries, making d_find_alias() skip them altogether. For most of its callers that's fine - we really want a connected alias there. However, there is a codepath where we relied upon picking such aliases if nothing else could be found - selinux delayed initialization of contexts for inodes on already mounted filesystems used to rely upon that. Cc: stable@kernel.org # f1ee616214cb "VFS: don't keep disconnected dentries on d_anon" Signed-off-by: Al Viro security/selinux/hooks.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 66e1c94db3cd4e094de66a6be68c3ab6d17e0c52 Merge: 86a4ac4 e0f6d1a Author: Linus Torvalds Date: Sun May 13 10:53:08 2018 -0700 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86/pti updates from Thomas Gleixner: "A mixed bag of fixes and updates for the ghosts which are hunting us. The scheduler fixes have been pulled into that branch to avoid conflicts. - A set of fixes to address a khread_parkme() race which caused lost wakeups and loss of state. - A deadlock fix for stop_machine() solved by moving the wakeups outside of the stopper_lock held region. - A set of Spectre V1 array access restrictions. The possible problematic spots were discuvered by Dan Carpenters new checks in smatch. - Removal of an unused file which was forgotten when the rest of that functionality was removed" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vdso: Remove unused file perf/x86/cstate: Fix possible Spectre-v1 indexing for pkg_msr perf/x86/msr: Fix possible Spectre-v1 indexing in the MSR driver perf/x86: Fix possible Spectre-v1 indexing for x86_pmu::event_map() perf/x86: Fix possible Spectre-v1 indexing for hw_perf_event cache_* perf/core: Fix possible Spectre-v1 indexing for ->aux_pages[] sched/autogroup: Fix possible Spectre-v1 indexing for sched_prio_to_weight[] sched/core: Fix possible Spectre-v1 indexing for sched_prio_to_weight[] sched/core: Introduce set_special_state() kthread, sched/wait: Fix kthread_parkme() completion issue kthread, sched/wait: Fix kthread_parkme() wait-loop sched/fair: Fix the update of blocked load when newly idle stop_machine, sched: Fix migrate_swap() vs. active_balance() deadlock commit 13ebe18c94f5b0665c01ae7fad2717ae959f4212 Author: Masami Hiramatsu Date: Wed May 9 21:58:45 2018 +0900 uprobes/x86: Prohibit probing on MOV SS instruction Since MOV SS and POP SS instructions will delay the exceptions until the next instruction is executed, single-stepping on it by uprobes must be prohibited. uprobe already rejects probing on POP SS (0x1f), but allows probing on MOV SS (0x8e and reg == 2). This checks the target instruction and if it is MOV SS or POP SS, returns -ENOTSUPP to reject probing. Signed-off-by: Masami Hiramatsu Signed-off-by: Thomas Gleixner Acked-by: Oleg Nesterov Cc: Ricardo Neri Cc: Francis Deslauriers Cc: Alexei Starovoitov Cc: Steven Rostedt Cc: Andy Lutomirski Cc: "H . Peter Anvin" Cc: Yonghong Song Cc: Borislav Petkov Cc: Linus Torvalds Cc: "David S . Miller" Link: https://lkml.kernel.org/r/152587072544.17316.5950935243917346341.stgit@devbox arch/x86/kernel/uprobes.c | 4 ++++ 1 file changed, 4 insertions(+) commit ee6a7354a3629f9b65bc18dbe393503e9440d6f5 Author: Masami Hiramatsu Date: Wed May 9 21:58:15 2018 +0900 kprobes/x86: Prohibit probing on exception masking instructions Since MOV SS and POP SS instructions will delay the exceptions until the next instruction is executed, single-stepping on it by kprobes must be prohibited. However, kprobes usually executes those instructions directly on trampoline buffer (a.k.a. kprobe-booster), except for the kprobes which has post_handler. Thus if kprobe user probes MOV SS with post_handler, it will do single-stepping on the MOV SS. This means it is safe that if it is used via ftrace or perf/bpf since those don't use the post_handler. Anyway, since the stack switching is a rare case, it is safer just rejecting kprobes on such instructions. Signed-off-by: Masami Hiramatsu Signed-off-by: Thomas Gleixner Cc: Ricardo Neri Cc: Francis Deslauriers Cc: Oleg Nesterov Cc: Alexei Starovoitov Cc: Steven Rostedt Cc: Andy Lutomirski Cc: "H . Peter Anvin" Cc: Yonghong Song Cc: Borislav Petkov Cc: Linus Torvalds Cc: "David S . Miller" Link: https://lkml.kernel.org/r/152587069574.17316.3311695234863248641.stgit@devbox arch/x86/include/asm/insn.h | 18 ++++++++++++++++++ arch/x86/kernel/kprobes/core.c | 4 ++++ 2 files changed, 22 insertions(+) commit a466ef76b815b86748d9870ef2a430af7b39c710 Author: Tetsuo Handa Date: Wed May 9 19:42:20 2018 +0900 x86/kexec: Avoid double free_page() upon do_kexec_load() failure >From ff82bedd3e12f0d3353282054ae48c3bd8c72012 Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Wed, 9 May 2018 12:12:39 +0900 Subject: [PATCH v3] x86/kexec: avoid double free_page() upon do_kexec_load() failure. syzbot is reporting crashes after memory allocation failure inside do_kexec_load() [1]. This is because free_transition_pgtable() is called by both init_transition_pgtable() and machine_kexec_cleanup() when memory allocation failed inside init_transition_pgtable(). Regarding 32bit code, machine_kexec_free_page_tables() is called by both machine_kexec_alloc_page_tables() and machine_kexec_cleanup() when memory allocation failed inside machine_kexec_alloc_page_tables(). Fix this by leaving the error handling to machine_kexec_cleanup() (and optionally setting NULL after free_page()). [1] https://syzkaller.appspot.com/bug?id=91e52396168cf2bdd572fe1e1bc0bc645c1c6b40 Fixes: f5deb79679af6eb4 ("x86: kexec: Use one page table in x86_64 machine_kexec") Fixes: 92be3d6bdf2cb349 ("kexec/i386: allocate page table pages dynamically") Reported-by: syzbot Signed-off-by: Tetsuo Handa Signed-off-by: Thomas Gleixner Acked-by: Baoquan He Cc: thomas.lendacky@amd.com Cc: prudo@linux.vnet.ibm.com Cc: Huang Ying Cc: syzkaller-bugs@googlegroups.com Cc: takahiro.akashi@linaro.org Cc: H. Peter Anvin Cc: akpm@linux-foundation.org Cc: dyoung@redhat.com Cc: kirill.shutemov@linux.intel.com Link: https://lkml.kernel.org/r/201805091942.DGG12448.tMFVFSJFQOOLHO@I-love.SAKURA.ne.jp arch/x86/kernel/machine_kexec_32.c | 6 +++++- arch/x86/kernel/machine_kexec_64.c | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) commit 86a4ac433b927a610c09aa6cfb1926d94a6b37b7 Merge: baeda71 789ba28 Author: Linus Torvalds Date: Sun May 13 10:46:53 2018 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Thomas Gleixner: "Revert the new NUMA aware placement approach which turned out to create more problems than it solved" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "sched/numa: Delay retrying placement for automatic NUMA balance after wake_affine()" commit baeda7131f54e71e916c43d7a88cb68fcace37da Merge: 0503fd6 49cf4a4b Author: Linus Torvalds Date: Sun May 13 10:44:32 2018 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tooling fixes from Thomas Gleixner: "Another small set of perf tooling fixes and updates: - Revert "perf pmu: Fix pmu events parsing rule", as it broke Intel PT event description parsing (Arnaldo Carvalho de Melo) - Sync x86's cpufeatures.h and kvm UAPI headers with the kernel sources, suppressing the ABI drift warnings (Arnaldo Carvalho de Melo) - Remove duplicated entry for westmereep-dp in Intel's mapfile.csv (William Cohen) - Fix typo in 'perf bench numa' options description (Yisheng Xie)" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "perf pmu: Fix pmu events parsing rule" tools headers kvm: Sync ARM UAPI headers with the kernel sources tools headers kvm: Sync uapi/linux/kvm.h with the kernel sources tools headers: Sync x86 cpufeatures.h with the kernel sources perf vendor events intel: Remove duplicated entry for westmereep-dp in mapfile.csv perf bench numa: Fix typo in options commit 0503fd658d47503a9bad67aced45c46b1ecfaace Merge: ccda3c4 05e13bb Author: Linus Torvalds Date: Sun May 13 10:28:53 2018 -0700 Merge tag 'dma-mapping-4.17-5' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: "Just one little fix from Jean to avoid a harmless but very annoying warning, especially for the drm code" * tag 'dma-mapping-4.17-5' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: silent unwanted warning "buffer is full" commit 2f0d520a1a73555ac51c19cd494493f60b4c1cea Author: Jeremy Soller Date: Mon May 7 09:28:45 2018 -0600 ALSA: hda/realtek - Clevo P950ER ALC1220 Fixup This adds support for the P950ER, which has the same required fixup as the P950HR, but has a different PCI ID. Signed-off-by: Jeremy Soller Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 21493316a3c4598f308d5a9fa31cc74639c4caff Author: Federico Cuello Date: Wed May 9 00:13:38 2018 +0200 ALSA: usb: mixer: volume quirk for CM102-A+/102S+ Currently it's not possible to set volume lower than 26% (it just mutes). Also fixes this warning: Warning! Unlikely big volume range (=9472), cval->res is probably wrong. [13] FU [PCM Playback Volume] ch = 2, val = -9473/-1/1 , and volume works fine for full range. Signed-off-by: Federico Cuello Cc: Signed-off-by: Takashi Iwai sound/usb/mixer.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3b031622f598481970400519bd5abc2a16708282 Author: Guenter Roeck Date: Fri May 4 13:01:33 2018 -0700 hwmon: (k10temp) Use API function to access System Management Network The SMN (System Management Network) on Family 17h AMD CPUs is also accessed from other drivers, specifically EDAC. Accessing it directly is racy. On top of that, accessing the SMN through root bridge 00:00 is wrong on multi-die CPUs and may result in reading the temperature from the wrong die. Use available API functions to fix the problem. For this to work, add dependency on AMD_NB. Also change the Raven Ridge PCI device ID to point to Data Fabric Function 3, since this ID is used by the API functions to find the CPU node. Cc: stable@vger.kernel.org # v4.16+ Tested-by: Gabriel Craciunescu Signed-off-by: Guenter Roeck drivers/hwmon/Kconfig | 2 +- drivers/hwmon/k10temp.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) commit f9bc6b2dd9cf025f827f471769e1d88b527bfb91 Author: Guenter Roeck Date: Fri May 4 13:01:32 2018 -0700 x86/amd_nb: Add support for Raven Ridge CPUs Add Raven Ridge root bridge and data fabric PCI IDs. This is required for amd_pci_dev_to_node_id() and amd_smn_read(). Cc: stable@vger.kernel.org # v4.16+ Tested-by: Gabriel Craciunescu Acked-by: Thomas Gleixner Signed-off-by: Guenter Roeck arch/x86/kernel/amd_nb.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c8beccc19b92f5172994c0732db689c08f4f98e5 Author: Hans de Goede Date: Tue May 8 09:27:46 2018 +0200 ALSA: hda: Add Lenovo C50 All in one to the power_save blacklist Power-saving is causing loud plops on the Lenovo C50 All in one, add it to the blacklist. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1572975 Signed-off-by: Hans de Goede Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 2 ++ 1 file changed, 2 insertions(+) commit 3f12888dfae2a48741c4caa9214885b3aaf350f9 Author: Wenwen Wang Date: Sat May 5 13:38:03 2018 -0500 ALSA: control: fix a redundant-copy issue In snd_ctl_elem_add_compat(), the fields of the struct 'data' need to be copied from the corresponding fields of the struct 'data32' in userspace. This is achieved by invoking copy_from_user() and get_user() functions. The problem here is that the 'type' field is copied twice. One is by copy_from_user() and one is by get_user(). Given that the 'type' field is not used between the two copies, the second copy is *completely* redundant and should be removed for better performance and cleanup. Also, these two copies can cause inconsistent data: as the struct 'data32' resides in userspace and a malicious userspace process can race to change the 'type' field between the two copies to cause inconsistent data. Depending on how the data is used in the future, such an inconsistency may cause potential security risks. For above reasons, we should take out the second copy. Signed-off-by: Wenwen Wang Cc: Signed-off-by: Takashi Iwai sound/core/control_compat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ccda3c4b77777f66aeb3c531352bb40d59501c59 Merge: 427fbe8 6e70c26 Author: Linus Torvalds Date: Sat May 12 18:49:53 2018 -0700 Merge tag '4.17-rc4-SMB3-Fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Some small SMB3 fixes for 4.17-rc5, some for stable" * tag '4.17-rc4-SMB3-Fixes' of git://git.samba.org/sfrench/cifs-2.6: smb3: directory sync should not return an error cifs: smb2ops: Fix listxattr() when there are no EAs cifs: smbd: Enable signing with smbdirect cifs: Allocate validate negotiation request through kmalloc commit 427fbe89261d8f11cd20b5a4ba94e977061f69d6 Merge: 0d4cafd 60abce9 Author: Linus Torvalds Date: Sat May 12 10:58:57 2018 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal fixes from Zhang Rui: - fix NULL pointer dereference on module load/probe for int3403_thermal driver - fix an emergency shutdown issue on exynos thermal driver * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal: exynos: Propagate error value from tmu_read() thermal: exynos: Reading temperature makes sense only when TMU is turned on thermal: int3403_thermal: Fix NULL pointer deref on module load / probe commit 0d4cafd12f4c67a3cce83fd0dd2e416080900615 Merge: f0ab773 9abd68e Author: Linus Torvalds Date: Sat May 12 10:55:48 2018 -0700 Merge tag 'for-linus-20180511' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Just a few NVMe fixes this round - one fixing a use-after-free, one fixes the return value after controller reset, and the last one fixes an issue where some drives will spuriously EIO. We should get these into 4.17" * tag 'for-linus-20180511' of git://git.kernel.dk/linux-block: nvme: add quirk to force medium priority for SQ creation nvme: Fix sync controller reset return nvme: fix use-after-free in nvme_free_ns_head commit 16116dac23396e73c01eeee97b102e4833a4b205 Author: Marek Lindner Date: Sat May 12 00:23:07 2018 +0800 batman-adv: prevent TT request storms by not sending inconsistent TT TLVLs A translation table TVLV changset sent with an OGM consists of a number of headers (one per VLAN) plus the changeset itself (addition and/or deletion of entries). The per-VLAN headers are used by OGM recipients for consistency checks. Said consistency check might determine that a full translation table request is needed to restore consistency. If the TT sender adds per-VLAN headers of empty VLANs into the OGM, recipients are led to believe to have reached an inconsistent state and thus request a full table update. The full table does not contain empty VLANs (due to missing entries) the cycle restarts when the next OGM is issued. Consequently, when the translation table TVLV headers are composed, empty VLANs are to be excluded. Fixes: 21a57f6e7a3b ("batman-adv: make the TT CRC logic VLAN specific") Signed-off-by: Marek Lindner Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/translation-table.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 7072337e52b3e9d5460500d8dc9cbc1ba2db084c Author: Linus Lüssing Date: Thu May 10 19:44:28 2018 +0200 batman-adv: Fix TT sync flags for intermediate TT responses The previous TT sync fix so far only fixed TT responses issued by the target node directly. So far, TT responses issued by intermediate nodes still lead to the wrong flags being added, leading to CRC mismatches. This behaviour was observed at Freifunk Hannover in a 800 nodes setup where a considerable amount of nodes were still infected with 'WI' TT flags even with (most) nodes having the previous TT sync fix applied. I was able to reproduce the issue with intermediate TT responses in a four node test setup and this patch fixes this issue by ensuring to use the per originator instead of the summarized, OR'd ones. Fixes: e9c00136a475 ("batman-adv: fix tt_global_entries flags update") Reported-by: Leonardo Mörlein Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/translation-table.c | 61 +++++++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 10 deletions(-) commit 05e13bb57e6f181d7605f8608181c7e6fb7f591d Author: Jean Delvare Date: Sat May 12 11:57:37 2018 +0200 swiotlb: silent unwanted warning "buffer is full" If DMA_ATTR_NO_WARN is passed to swiotlb_alloc_buffer(), it should be passed further down to swiotlb_tbl_map_single(). Otherwise we escape half of the warnings but still log the other half. This is one of the multiple causes of spurious warnings reported at: https://bugs.freedesktop.org/show_bug.cgi?id=104082 Signed-off-by: Jean Delvare Fixes: 0176adb00406 ("swiotlb: refactor coherent buffer allocation") Cc: Christoph Hellwig Cc: Christian König Cc: Michel Dänzer Cc: Takashi Iwai Cc: stable@vger.kernel.org # v4.16 lib/swiotlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffed645e3be0e32f8e9ab068d257aee8d0fe8eec Author: Konrad Rzeszutek Wilk Date: Fri May 11 16:50:35 2018 -0400 x86/bugs: Fix the parameters alignment and missing void Fixes: 7bb4d366c ("x86/bugs: Make cpu_show_common() static") Fixes: 24f7fc83b ("x86/bugs: Provide boot parameters for the spec_store_bypass_disable mitigation") Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/bugs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ebd27d3317c6521a9511f779ea96dc943c4e8003 Author: Rafał Miłecki Date: Fri May 11 11:17:15 2018 +0200 ssb: make SSB_PCICORE_HOSTMODE depend on SSB = y SSB_PCICORE_HOSTMODE protects MIPS specific code that calls not exported symbols pcibios_enable_device and register_pci_controller. This code is supposed to be compiled only with ssb builtin. This fixes: ERROR: "pcibios_enable_device" [drivers/ssb/ssb.ko] undefined! ERROR: "register_pci_controller" [drivers/ssb/ssb.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1 Reported-by: Matt Redfearn Signed-off-by: Rafał Miłecki Reviewed-by: Larry Finger Signed-off-by: Kalle Valo drivers/ssb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36910d82a80c1c0c61e505c6d3ecaa901ee13a26 Author: Rafał Miłecki Date: Fri May 11 11:17:14 2018 +0200 Revert "ssb: Prevent build of PCI host features in module" This reverts commit 882164a4a928bcaa53280940436ca476e6b1db8e. Above commit added "SSB = y" dependency to the wrong symbol SSB_DRIVER_PCICORE_POSSIBLE and prevented SSB_DRIVER_PCICORE from being selected when needed. PCI core driver for core running in clienthost mode is important for bus initialization. It's perfectly valid scenario to have ssb built as module and use it with buses on PCI cards. This fixes regression that affected all *module* users with PCI cards. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1572349 Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo drivers/ssb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 361de091a4b97aa9081d304d742f80d486ab7125 Author: Rafał Miłecki Date: Tue May 8 11:31:04 2018 +0200 bcma: fix buffer size caused crash in bcma_core_mips_print_irq() Used buffer wasn't big enough to hold whole strings. Example output of this function is: [ 0.180892] bcma: bus0: core 0x0800, irq: 2(S)* 3 4 5 6 D I [ 0.180948] bcma: bus0: core 0x0812, irq: 2(S) 3* 4 5 6 D I [ 0.180998] bcma: bus0: core 0x082d, irq: 2(S) 3 4* 5 6 D I [ 0.181046] bcma: bus0: core 0x082c, irq: 2(S) 3 4 5 6 D I* which means we need to store up to 24 chars. Fixes: 758f7e06063a8 ("bcma: Use bcma_debug and not pr_cont in MIPS driver") Signed-off-by: Rafał Miłecki Cc: stable@vger.kernel.org # v4.15+ Signed-off-by: Kalle Valo drivers/bcma/driver_mips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 789ba28013ce23dbf5e9f5f014f4233b35523bf3 Author: Mel Gorman Date: Wed May 9 17:31:15 2018 +0100 Revert "sched/numa: Delay retrying placement for automatic NUMA balance after wake_affine()" This reverts commit 7347fc87dfe6b7315e74310ee1243dc222c68086. Srikar Dronamra pointed out that while the commit in question did show a performance improvement on ppc64, it did so at the cost of disabling active CPU migration by automatic NUMA balancing which was not the intent. The issue was that a serious flaw in the logic failed to ever active balance if SD_WAKE_AFFINE was disabled on scheduler domains. Even when it's enabled, the logic is still bizarre and against the original intent. Investigation showed that fixing the patch in either the way he suggested, using the correct comparison for jiffies values or introducing a new numa_migrate_deferred variable in task_struct all perform similarly to a revert with a mix of gains and losses depending on the workload, machine and socket count. The original intent of the commit was to handle a problem whereby wake_affine, idle balancing and automatic NUMA balancing disagree on the appropriate placement for a task. This was particularly true for cases where a single task was a massive waker of tasks but where wake_wide logic did not apply. This was particularly noticeable when a futex (a barrier) woke all worker threads and tried pulling the wakees to the waker nodes. In that specific case, it could be handled by tuning MPI or openMP appropriately, but the behavior is not illogical and was worth attempting to fix. However, the approach was wrong. Given that we're at rc4 and a fix is not obvious, it's better to play safe, revert this commit and retry later. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Srikar Dronamraju Cc: Linus Torvalds Cc: Thomas Gleixner Cc: efault@gmx.de Cc: ggherdovich@suse.cz Cc: hpa@zytor.com Cc: matt@codeblueprint.co.uk Cc: mpe@ellerman.id.au Link: http://lkml.kernel.org/r/20180509163115.6fnnyeg4vdm2ct4v@techsingularity.net Signed-off-by: Ingo Molnar kernel/sched/fair.c | 57 +---------------------------------------------------- 1 file changed, 1 insertion(+), 56 deletions(-) commit f0ab773f5c96c29a5227234c4b5a820f5591b74d Merge: 4bc8719 2075b16 Author: Linus Torvalds Date: Fri May 11 18:04:12 2018 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "13 fixes" * emailed patches from Andrew Morton : rbtree: include rcu.h scripts/faddr2line: fix error when addr2line output contains discriminator ocfs2: take inode cluster lock before moving reflinked inode from orphan dir mm, oom: fix concurrent munlock and oom reaper unmap, v3 mm: migrate: fix double call of radix_tree_replace_slot() proc/kcore: don't bounds check against address 0 mm: don't show nr_indirectly_reclaimable in /proc/vmstat mm: sections are not offlined during memory hotremove z3fold: fix reclaim lock-ups init: fix false positives in W+X checking lib/find_bit_benchmark.c: avoid soft lockup in test_find_first_bit() KASAN: prohibit KASAN+STRUCTLEAK combination MAINTAINERS: update Shuah's email address commit 2075b16e32c26e4031b9fd3cbe26c54676a8fcb5 Author: Sebastian Andrzej Siewior Date: Fri May 11 16:02:14 2018 -0700 rbtree: include rcu.h Since commit c1adf20052d8 ("Introduce rb_replace_node_rcu()") rbtree_augmented.h uses RCU related data structures but does not include the header file. It works as long as it gets somehow included before that and fails otherwise. Link: http://lkml.kernel.org/r/20180504103159.19938-1-bigeasy@linutronix.de Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Andrew Morton Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rbtree_augmented.h | 1 + include/linux/rbtree_latch.h | 1 + 2 files changed, 2 insertions(+) commit 78eb0c6356cda285c6ee6e29bea0c0188368103e Author: Changbin Du Date: Fri May 11 16:02:11 2018 -0700 scripts/faddr2line: fix error when addr2line output contains discriminator When addr2line output contains discriminator, the current awk script cannot parse it. This patch fixes it by extracting key words using regex which is more reliable. $ scripts/faddr2line vmlinux tlb_flush_mmu_free+0x26 tlb_flush_mmu_free+0x26/0x50: tlb_flush_mmu_free at mm/memory.c:258 (discriminator 3) scripts/faddr2line: eval: line 173: unexpected EOF while looking for matching `)' Link: http://lkml.kernel.org/r/1525323379-25193-1-git-send-email-changbin.du@intel.com Fixes: 6870c0165feaa5 ("scripts/faddr2line: show the code context") Signed-off-by: Changbin Du Cc: Thomas Gleixner Cc: Greg Kroah-Hartman Cc: Philippe Ombredanne Cc: NeilBrown Cc: Richard Weinberger Cc: Kate Stewart Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/faddr2line | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e4383029201470523c3ffe339bd7d57e9b4a7d65 Author: Ashish Samant Date: Fri May 11 16:02:07 2018 -0700 ocfs2: take inode cluster lock before moving reflinked inode from orphan dir While reflinking an inode, we create a new inode in orphan directory, then take EX lock on it, reflink the original inode to orphan inode and release EX lock. Once the lock is released another node could request it in EX mode from ocfs2_recover_orphans() which causes downconvert of the lock, on this node, to NL mode. Later we attempt to initialize security acl for the orphan inode and move it to the reflink destination. However, while doing this we dont take EX lock on the inode. This could potentially cause problems because we could be starting transaction, accessing journal and modifying metadata of the inode while holding NL lock and with another node holding EX lock on the inode. Fix this by taking orphan inode cluster lock in EX mode before initializing security and moving orphan inode to reflink destination. Use the __tracker variant while taking inode lock to avoid recursive locking in the ocfs2_init_security_and_acl() call chain. Link: http://lkml.kernel.org/r/1523475107-7639-1-git-send-email-ashish.samant@oracle.com Signed-off-by: Ashish Samant Reviewed-by: Joseph Qi Reviewed-by: Junxiao Bi Acked-by: Jun Piao Cc: Mark Fasheh Cc: Joel Becker Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/refcounttree.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 27ae357fa82be5ab73b2ef8d39dcb8ca2563483a Author: David Rientjes Date: Fri May 11 16:02:04 2018 -0700 mm, oom: fix concurrent munlock and oom reaper unmap, v3 Since exit_mmap() is done without the protection of mm->mmap_sem, it is possible for the oom reaper to concurrently operate on an mm until MMF_OOM_SKIP is set. This allows munlock_vma_pages_all() to concurrently run while the oom reaper is operating on a vma. Since munlock_vma_pages_range() depends on clearing VM_LOCKED from vm_flags before actually doing the munlock to determine if any other vmas are locking the same memory, the check for VM_LOCKED in the oom reaper is racy. This is especially noticeable on architectures such as powerpc where clearing a huge pmd requires serialize_against_pte_lookup(). If the pmd is zapped by the oom reaper during follow_page_mask() after the check for pmd_none() is bypassed, this ends up deferencing a NULL ptl or a kernel oops. Fix this by manually freeing all possible memory from the mm before doing the munlock and then setting MMF_OOM_SKIP. The oom reaper can not run on the mm anymore so the munlock is safe to do in exit_mmap(). It also matches the logic that the oom reaper currently uses for determining when to set MMF_OOM_SKIP itself, so there's no new risk of excessive oom killing. This issue fixes CVE-2018-1000200. Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1804241526320.238665@chino.kir.corp.google.com Fixes: 212925802454 ("mm: oom: let oom_reap_task and exit_mmap run concurrently") Signed-off-by: David Rientjes Suggested-by: Tetsuo Handa Acked-by: Michal Hocko Cc: Andrea Arcangeli Cc: [4.14+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/oom.h | 2 ++ mm/mmap.c | 44 +++++++++++++++++------------ mm/oom_kill.c | 81 ++++++++++++++++++++++++++++------------------------- 3 files changed, 71 insertions(+), 56 deletions(-) commit 013567be19761e2d14fc2a2676fe7686ac54c9ac Author: Naoya Horiguchi Date: Fri May 11 16:02:00 2018 -0700 mm: migrate: fix double call of radix_tree_replace_slot() radix_tree_replace_slot() is called twice for head page, it's obviously a bug. Let's fix it. Link: http://lkml.kernel.org/r/20180423072101.GA12157@hori1.linux.bs1.fc.nec.co.jp Fixes: e71769ae5260 ("mm: enable thp migration for shmem thp") Signed-off-by: Naoya Horiguchi Reported-by: Matthew Wilcox Reviewed-by: Andrew Morton Cc: Michal Hocko Cc: "Kirill A. Shutemov" Cc: Zi Yan Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3955333df9a50e8783d115613a397ae55d905080 Author: Laura Abbott Date: Fri May 11 16:01:57 2018 -0700 proc/kcore: don't bounds check against address 0 The existing kcore code checks for bad addresses against __va(0) with the assumption that this is the lowest address on the system. This may not hold true on some systems (e.g. arm64) and produce overflows and crashes. Switch to using other functions to validate the address range. It's currently only seen on arm64 and it's not clear if anyone wants to use that particular combination on a stable release. So this is not urgent for stable. Link: http://lkml.kernel.org/r/20180501201143.15121-1-labbott@redhat.com Signed-off-by: Laura Abbott Tested-by: Dave Anderson Cc: Kees Cook Cc: Ard Biesheuvel Cc: Ingo Molnar Cc: Andi Kleen Cc: Alexey Dobriyan a Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/kcore.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 7aaf7727235870f497eb928f728f7773d6df3b40 Author: Roman Gushchin Date: Fri May 11 16:01:53 2018 -0700 mm: don't show nr_indirectly_reclaimable in /proc/vmstat Don't show nr_indirectly_reclaimable in /proc/vmstat, because there is no need to export this vm counter to userspace, and some changes are expected in reclaimable object accounting, which can alter this counter. Link: http://lkml.kernel.org/r/20180425191422.9159-1-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: Vlastimil Babka Reviewed-by: Andrew Morton Cc: Matthew Wilcox Cc: Alexander Viro Cc: Michal Hocko Cc: Johannes Weiner Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmstat.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 27227c733852f71008e9bf165950bb2edaed3a90 Author: Pavel Tatashin Date: Fri May 11 16:01:50 2018 -0700 mm: sections are not offlined during memory hotremove Memory hotplug and hotremove operate with per-block granularity. If the machine has a large amount of memory (more than 64G), the size of a memory block can span multiple sections. By mistake, during hotremove we set only the first section to offline state. The bug was discovered because kernel selftest started to fail: https://lkml.kernel.org/r/20180423011247.GK5563@yexl-desktop After commit, "mm/memory_hotplug: optimize probe routine". But, the bug is older than this commit. In this optimization we also added a check for sections to be in a proper state during hotplug operation. Link: http://lkml.kernel.org/r/20180427145257.15222-1-pasha.tatashin@oracle.com Fixes: 2d070eab2e82 ("mm: consider zone which is not fully populated to have holes") Signed-off-by: Pavel Tatashin Acked-by: Michal Hocko Reviewed-by: Andrew Morton Cc: Vlastimil Babka Cc: Steven Sistare Cc: Daniel Jordan Cc: "Kirill A. Shutemov" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/sparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6098d7e136692f9c6e23ae362c62ec822343e4d5 Author: Vitaly Wool Date: Fri May 11 16:01:46 2018 -0700 z3fold: fix reclaim lock-ups Do not try to optimize in-page object layout while the page is under reclaim. This fixes lock-ups on reclaim and improves reclaim performance at the same time. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20180430125800.444cae9706489f412ad12621@gmail.com Signed-off-by: Vitaly Wool Reported-by: Guenter Roeck Tested-by: Guenter Roeck Cc: Cc: Matthew Wilcox Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) commit ae646f0b9ca135b87bc73ff606ef996c3029780a Author: Jeffrey Hugo Date: Fri May 11 16:01:42 2018 -0700 init: fix false positives in W+X checking load_module() creates W+X mappings via __vmalloc_node_range() (from layout_and_allocate()->move_module()->module_alloc()) by using PAGE_KERNEL_EXEC. These mappings are later cleaned up via "call_rcu_sched(&freeinit->rcu, do_free_init)" from do_init_module(). This is a problem because call_rcu_sched() queues work, which can be run after debug_checkwx() is run, resulting in a race condition. If hit, the race results in a nasty splat about insecure W+X mappings, which results in a poor user experience as these are not the mappings that debug_checkwx() is intended to catch. This issue is observed on multiple arm64 platforms, and has been artificially triggered on an x86 platform. Address the race by flushing the queued work before running the arch-defined mark_rodata_ro() which then calls debug_checkwx(). Link: http://lkml.kernel.org/r/1525103946-29526-1-git-send-email-jhugo@codeaurora.org Fixes: e1a58320a38d ("x86/mm: Warn on W^X mappings") Signed-off-by: Jeffrey Hugo Reported-by: Timur Tabi Reported-by: Jan Glauber Acked-by: Kees Cook Acked-by: Ingo Molnar Acked-by: Will Deacon Acked-by: Laura Abbott Cc: Mark Rutland Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Stephen Smalley Cc: Thomas Gleixner Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/main.c | 7 +++++++ kernel/module.c | 5 +++++ 2 files changed, 12 insertions(+) commit 4ba281d5bd9907355e6b79fb72049c9ed50cc670 Author: Yury Norov Date: Fri May 11 16:01:39 2018 -0700 lib/find_bit_benchmark.c: avoid soft lockup in test_find_first_bit() test_find_first_bit() is intentionally sub-optimal, and may cause soft lockup due to long time of run on some systems. So decrease length of bitmap to traverse to avoid lockup. With the change below, time of test execution doesn't exceed 0.2 seconds on my testing system. Link: http://lkml.kernel.org/r/20180420171949.15710-1-ynorov@caviumnetworks.com Fixes: 4441fca0a27f5 ("lib: test module for find_*_bit() functions") Signed-off-by: Yury Norov Reviewed-by: Andrew Morton Reported-by: Fengguang Wu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/find_bit_benchmark.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c9cf87ea6a4725bc586cc5776c3fb6042a264b7d Author: Dmitry Vyukov Date: Fri May 11 16:01:35 2018 -0700 KASAN: prohibit KASAN+STRUCTLEAK combination Currently STRUCTLEAK inserts initialization out of live scope of variables from KASAN point of view. This leads to KASAN false positive reports. Prohibit this combination for now. Link: http://lkml.kernel.org/r/20180419172451.104700-1-dvyukov@google.com Signed-off-by: Dmitry Vyukov Acked-by: Kees Cook Cc: Fengguang Wu Cc: Sergey Senozhatsky Cc: Andrey Ryabinin Cc: Dennis Zhou Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 1d1c8e5f0d95c2c97f29122741aed7d0dfb2b391 Author: Shuah Khan (Samsung OSG) Date: Fri May 11 16:01:32 2018 -0700 MAINTAINERS: update Shuah's email address Update email address in MAINTAINERS file due to IT infrastructure changes at Samsung. Link: http://lkml.kernel.org/r/20180501212815.25911-1-shuah@kernel.org Signed-off-by: Shuah Khan (Samsung OSG) Cc: Mauro Carvalho Chehab Cc: David S. Miller Cc: Greg Kroah-Hartman Cc: Linus Walleij Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 3 --- 1 file changed, 3 deletions(-) commit 4bc871984f7cb5b2dec3ae64b570cb02f9ce2227 Merge: a1f45ef a52956d Author: Linus Torvalds Date: Fri May 11 14:14:46 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Verify lengths of keys provided by the user is AF_KEY, from Kevin Easton. 2) Add device ID for BCM89610 PHY. Thanks to Bhadram Varka. 3) Add Spectre guards to some ATM code, courtesy of Gustavo A. R. Silva. 4) Fix infinite loop in NSH protocol code. To Eric Dumazet we are most grateful for this fix. 5) Line up /proc/net/netlink headers properly. This fix from YU Bo, we do appreciate. 6) Use after free in TLS code. Once again we are blessed by the honorable Eric Dumazet with this fix. 7) Fix regression in TLS code causing stalls on partial TLS records. This fix is bestowed upon us by Andrew Tomt. 8) Deal with too small MTUs properly in LLC code, another great gift from Eric Dumazet. 9) Handle cached route flushing properly wrt. MTU locking in ipv4, to Hangbin Liu we give thanks for this. 10) Fix regression in SO_BINDTODEVIC handling wrt. UDP socket demux. Paolo Abeni, he gave us this. 11) Range check coalescing parameters in mlx4 driver, thank you Moshe Shemesh. 12) Some ipv6 ICMP error handling fixes in rxrpc, from our good brother David Howells. 13) Fix kexec on mlx5 by freeing IRQs in shutdown path. Daniel Juergens, you're the best! 14) Don't send bonding RLB updates to invalid MAC addresses. Debabrata Benerjee saved us! 15) Uh oh, we were leaking in udp_sendmsg and ping_v4_sendmsg. The ship is now water tight, thanks to Andrey Ignatov. 16) IPSEC memory leak in ixgbe from Colin Ian King, man we've got holes everywhere! 17) Fix error path in tcf_proto_create, Jiri Pirko what would we do without you! * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (92 commits) net sched actions: fix refcnt leak in skbmod net: sched: fix error path in tcf_proto_create() when modules are not configured net sched actions: fix invalid pointer dereferencing if skbedit flags missing ixgbe: fix memory leak on ipsec allocation ixgbevf: fix ixgbevf_xmit_frame()'s return type ixgbe: return error on unsupported SFP module when resetting ice: Set rq_last_status when cleaning rq ipv4: fix memory leaks in udp_sendmsg, ping_v4_sendmsg mlxsw: core: Fix an error handling path in 'mlxsw_core_bus_device_register()' bonding: send learning packets for vlans on slave bonding: do not allow rlb updates to invalid mac net/mlx5e: Err if asked to offload TC match on frag being first net/mlx5: E-Switch, Include VF RDMA stats in vport statistics net/mlx5: Free IRQs in shutdown path rxrpc: Trace UDP transmission failure rxrpc: Add a tracepoint to log ICMP/ICMP6 and error messages rxrpc: Fix the min security level for kernel calls rxrpc: Fix error reception on AF_INET6 sockets rxrpc: Fix missing start of call timeout qed: fix spelling mistake: "taskelt" -> "tasklet" ... commit a1f45efbb90cce436bde335f8ce78538634951c8 Merge: ac42803 04ac6fd Author: Linus Torvalds Date: Fri May 11 13:56:43 2018 -0700 Merge tag 'nfs-for-4.17-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: "These patches fix both a possible corruption during NFSoRDMA MR recovery, and a sunrpc tracepoint crash. Additionally, Trond has a new email address to put in the MAINTAINERS file" * tag 'nfs-for-4.17-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: Change Trond's email address in MAINTAINERS sunrpc: Fix latency trace point crashes xprtrdma: Fix list corruption / DMAR errors during MR recovery commit a52956dfc503f8cc5cfe6454959b7049fddb4413 Author: Roman Mashak Date: Fri May 11 14:35:33 2018 -0400 net sched actions: fix refcnt leak in skbmod When application fails to pass flags in netlink TLV when replacing existing skbmod action, the kernel will leak refcnt: $ tc actions get action skbmod index 1 total acts 0 action order 0: skbmod pipe set smac 00:11:22:33:44:55 index 1 ref 1 bind 0 For example, at this point a buggy application replaces the action with index 1 with new smac 00:aa:22:33:44:55, it fails because of zero flags, however refcnt gets bumped: $ tc actions get actions skbmod index 1 total acts 0 action order 0: skbmod pipe set smac 00:11:22:33:44:55 index 1 ref 2 bind 0 $ Tha patch fixes this by calling tcf_idr_release() on existing actions. Fixes: 86da71b57383d ("net_sched: Introduce skbmod action") Signed-off-by: Roman Mashak Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_skbmod.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ac42803695e73d5d32b1976aee837d9672382a2a Merge: 3f5f859 fc21854 Author: Linus Torvalds Date: Fri May 11 13:36:06 2018 -0700 Merge tag 'ceph-for-4.17-rc5' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "These patches fix two long-standing bugs in the DIO code path, one of which is a crash trivially triggerable with splice()" * tag 'ceph-for-4.17-rc5' of git://github.com/ceph/ceph-client: ceph: fix iov_iter issues in ceph_direct_read_write() libceph: add osd_req_op_extent_osd_data_bvecs() ceph: fix rsize/wsize capping in ceph_direct_read_write() commit d68d75fdc34b0253c2bded7ed18cd60eb5a9599b Author: Jiri Pirko Date: Fri May 11 17:45:32 2018 +0200 net: sched: fix error path in tcf_proto_create() when modules are not configured In case modules are not configured, error out when tp->ops is null and prevent later null pointer dereference. Fixes: 33a48927c193 ("sched: push TC filter protocol creation into a separate function") Signed-off-by: Jiri Pirko Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f5f8596ed0aeeb0d707ef9375161c4ee0caf611 Merge: 7404bc2 ac21fc2 Author: Linus Torvalds Date: Fri May 11 13:14:24 2018 -0700 Merge tag 'sh-for-4.17-fixes' of git://git.libc.org/linux-sh Pull arch/sh fixes from Rich Felker: "Fixes for critical regressions and a build failure. The regressions were introduced in 4.15 and 4.17-rc1 and prevented booting on affected systems" * tag 'sh-for-4.17-fixes' of git://git.libc.org/linux-sh: sh: switch to NO_BOOTMEM sh: mm: Fix unprotected access to struct device sh: fix build failure for J2 cpu with SMP disabled commit 7404bc27731f7213c8a747e8f392cd0e0a27ec63 Merge: 5c6b546 0583a4e Author: Linus Torvalds Date: Fri May 11 13:09:04 2018 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "There's a small memblock accounting problem when freeing the initrd and a Spectre-v2 mitigation for NVIDIA Denver CPUs which just requires a match on the CPU ID register. Summary: - Mitigate Spectre-v2 for NVIDIA Denver CPUs - Free memblocks corresponding to freed initrd area" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: capabilities: Add NVIDIA Denver CPU to bp_harden list arm64: Add MIDR encoding for NVIDIA CPUs arm64: To remove initrd reserved area entry from memblock commit 5c6b54600dd390a355a0e91ffd7998382908e178 Merge: c110a8b 6c0a8f6 Author: Linus Torvalds Date: Fri May 11 13:07:22 2018 -0700 Merge tag 'powerpc-4.17-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "One fix for an actual regression, the change to the SYSCALL_DEFINE wrapper broke FTRACE_SYSCALLS for us due to a name mismatch. There's also another commit to the same code to make sure we match all our syscalls with various prefixes. And then just one minor build fix, and the removal of an unused variable that was removed and then snuck back in due to some rebasing. Thanks to: Naveen N. Rao" * tag 'powerpc-4.17-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/pseries: Fix CONFIG_NUMA=n build powerpc/trace/syscalls: Update syscall name matching logic to account for ppc_ prefix powerpc/trace/syscalls: Update syscall name matching logic powerpc/64: Remove unused paca->soft_enabled commit c110a8b792533fc1180188b91b856bb2b3390f8b Merge: 84c3a09 dc432c3 Author: Linus Torvalds Date: Fri May 11 13:04:35 2018 -0700 Merge tag 'trace-v4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Working on some new updates to trace filtering, I noticed that the regex_match_front() test was updated to be limited to the size of the pattern instead of the full test string. But as the test string is not guaranteed to be nul terminated, it still needs to consider the size of the test string" * tag 'trace-v4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix regex_match_front() to not over compare the test string commit f4d641a2288504d7761e715a922fc675ddc2e594 Merge: f010089 c89ebb9 Author: David S. Miller Date: Fri May 11 15:57:23 2018 -0400 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2018-05-11 This series contains fixes to the ice, ixgbe and ixgbevf drivers. Jeff Shaw provides a fix to ensure rq_last_status gets set, whether or not the hardware responds with an error in the ice driver. Emil adds a check for unsupported module during the reset routine for ixgbe. Luc Van Oostenryck fixes ixgbevf_xmit_frame() where it was not using the correct return value (int). Colin Ian King fixes a potential resource leak in ixgbe, where we were not freeing ipsec in our cleanup path. ==================== Signed-off-by: David S. Miller commit f01008916f1a4b7e238bf124d13d5c509e8cc362 Merge: af5d018 6b47fe1 Author: David S. Miller Date: Fri May 11 15:55:57 2018 -0400 Merge tag 'rxrpc-fixes-20180510' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Fixes Here are three fixes for AF_RXRPC and two tracepoints that were useful for finding them: (1) Fix missing start of expect-Rx-by timeout on initial packet transmission so that calls will time out if the peer doesn't respond. (2) Fix error reception on AF_INET6 sockets by using the correct family of sockopts on the UDP transport socket. (3) Fix setting the minimum security level on kernel calls so that they can be encrypted. (4) Add a tracepoint to log ICMP/ICMP6 and other error reports from the transport socket. (5) Add a tracepoint to log UDP sendmsg failure so that we can find out if transmission failure occurred on the UDP socket. ==================== Signed-off-by: David S. Miller commit af5d01842fe1fbfb9f5e1c1d957ba02ab6f4569a Author: Roman Mashak Date: Fri May 11 10:55:09 2018 -0400 net sched actions: fix invalid pointer dereferencing if skbedit flags missing When application fails to pass flags in netlink TLV for a new skbedit action, the kernel results in the following oops: [ 8.307732] BUG: unable to handle kernel paging request at 0000000000021130 [ 8.309167] PGD 80000000193d1067 P4D 80000000193d1067 PUD 180e0067 PMD 0 [ 8.310595] Oops: 0000 [#1] SMP PTI [ 8.311334] Modules linked in: kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel aes_x86_64 crypto_simd cryptd glue_helper serio_raw [ 8.314190] CPU: 1 PID: 397 Comm: tc Not tainted 4.17.0-rc3+ #357 [ 8.315252] RIP: 0010:__tcf_idr_release+0x33/0x140 [ 8.316203] RSP: 0018:ffffa0718038f840 EFLAGS: 00010246 [ 8.317123] RAX: 0000000000000001 RBX: 0000000000021100 RCX: 0000000000000000 [ 8.319831] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000021100 [ 8.321181] RBP: 0000000000000000 R08: 000000000004adf8 R09: 0000000000000122 [ 8.322645] R10: 0000000000000000 R11: ffffffff9e5b01ed R12: 0000000000000000 [ 8.324157] R13: ffffffff9e0d3cc0 R14: 0000000000000000 R15: 0000000000000000 [ 8.325590] FS: 00007f591292e700(0000) GS:ffff8fcf5bc40000(0000) knlGS:0000000000000000 [ 8.327001] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 8.327987] CR2: 0000000000021130 CR3: 00000000180e6004 CR4: 00000000001606a0 [ 8.329289] Call Trace: [ 8.329735] tcf_skbedit_init+0xa7/0xb0 [ 8.330423] tcf_action_init_1+0x362/0x410 [ 8.331139] ? try_to_wake_up+0x44/0x430 [ 8.331817] tcf_action_init+0x103/0x190 [ 8.332511] tc_ctl_action+0x11a/0x220 [ 8.333174] rtnetlink_rcv_msg+0x23d/0x2e0 [ 8.333902] ? _cond_resched+0x16/0x40 [ 8.334569] ? __kmalloc_node_track_caller+0x5b/0x2c0 [ 8.335440] ? rtnl_calcit.isra.31+0xf0/0xf0 [ 8.336178] netlink_rcv_skb+0xdb/0x110 [ 8.336855] netlink_unicast+0x167/0x220 [ 8.337550] netlink_sendmsg+0x2a7/0x390 [ 8.338258] sock_sendmsg+0x30/0x40 [ 8.338865] ___sys_sendmsg+0x2c5/0x2e0 [ 8.339531] ? pagecache_get_page+0x27/0x210 [ 8.340271] ? filemap_fault+0xa2/0x630 [ 8.340943] ? page_add_file_rmap+0x108/0x200 [ 8.341732] ? alloc_set_pte+0x2aa/0x530 [ 8.342573] ? finish_fault+0x4e/0x70 [ 8.343332] ? __handle_mm_fault+0xbc1/0x10d0 [ 8.344337] ? __sys_sendmsg+0x53/0x80 [ 8.345040] __sys_sendmsg+0x53/0x80 [ 8.345678] do_syscall_64+0x4f/0x100 [ 8.346339] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 8.347206] RIP: 0033:0x7f591191da67 [ 8.347831] RSP: 002b:00007fff745abd48 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 8.349179] RAX: ffffffffffffffda RBX: 00007fff745abe70 RCX: 00007f591191da67 [ 8.350431] RDX: 0000000000000000 RSI: 00007fff745abdc0 RDI: 0000000000000003 [ 8.351659] RBP: 000000005af35251 R08: 0000000000000001 R09: 0000000000000000 [ 8.352922] R10: 00000000000005f1 R11: 0000000000000246 R12: 0000000000000000 [ 8.354183] R13: 00007fff745afed0 R14: 0000000000000001 R15: 00000000006767c0 [ 8.355400] Code: 41 89 d4 53 89 f5 48 89 fb e8 aa 20 fd ff 85 c0 0f 84 ed 00 00 00 48 85 db 0f 84 cf 00 00 00 40 84 ed 0f 85 cd 00 00 00 45 84 e4 <8b> 53 30 74 0d 85 d2 b8 ff ff ff ff 0f 8f b3 00 00 00 8b 43 2c [ 8.358699] RIP: __tcf_idr_release+0x33/0x140 RSP: ffffa0718038f840 [ 8.359770] CR2: 0000000000021130 [ 8.360438] ---[ end trace 60c66be45dfc14f0 ]--- The caller calls action's ->init() and passes pointer to "struct tc_action *a", which later may be initialized to point at the existing action, otherwise "struct tc_action *a" is still invalid, and therefore dereferencing it is an error as happens in tcf_idr_release, where refcnt is decremented. So in case of missing flags tcf_idr_release must be called only for existing actions. v2: - prepare patch for net tree Fixes: 5e1567aeb7fe ("net sched: skbedit action fix late binding") Signed-off-by: Roman Mashak Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_skbedit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 79f546a696bff2590169fb5684e23d65f4d9f591 Author: Dave Chinner Date: Fri May 11 11:20:57 2018 +1000 fs: don't scan the inode cache before SB_BORN is set We recently had an oops reported on a 4.14 kernel in xfs_reclaim_inodes_count() where sb->s_fs_info pointed to garbage and so the m_perag_tree lookup walked into lala land. It produces an oops down this path during the failed mount: radix_tree_gang_lookup_tag+0xc4/0x130 xfs_perag_get_tag+0x37/0xf0 xfs_reclaim_inodes_count+0x32/0x40 xfs_fs_nr_cached_objects+0x11/0x20 super_cache_count+0x35/0xc0 shrink_slab.part.66+0xb1/0x370 shrink_node+0x7e/0x1a0 try_to_free_pages+0x199/0x470 __alloc_pages_slowpath+0x3a1/0xd20 __alloc_pages_nodemask+0x1c3/0x200 cache_grow_begin+0x20b/0x2e0 fallback_alloc+0x160/0x200 kmem_cache_alloc+0x111/0x4e0 The problem is that the superblock shrinker is running before the filesystem structures it depends on have been fully set up. i.e. the shrinker is registered in sget(), before ->fill_super() has been called, and the shrinker can call into the filesystem before fill_super() does it's setup work. Essentially we are exposed to both use-after-free and use-before-initialisation bugs here. To fix this, add a check for the SB_BORN flag in super_cache_count. In general, this flag is not set until ->fs_mount() completes successfully, so we know that it is set after the filesystem setup has completed. This matches the trylock_super() behaviour which will not let super_cache_scan() run if SB_BORN is not set, and hence will not allow the superblock shrinker from entering the filesystem while it is being set up or after it has failed setup and is being torn down. Cc: stable@kernel.org Signed-Off-By: Dave Chinner Signed-off-by: Al Viro fs/super.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit 9abd68ef454c824bfd18629033367b4382b5f390 Author: Jens Axboe Date: Tue May 8 10:25:15 2018 -0600 nvme: add quirk to force medium priority for SQ creation Some P3100 drives have a bug where they think WRRU (weighted round robin) is always enabled, even though the host doesn't set it. Since they think it's enabled, they also look at the submission queue creation priority. We used to set that to MEDIUM by default, but that was removed in commit 81c1cd98351b. This causes various issues on that drive. Add a quirk to still set MEDIUM priority for that controller. Fixes: 81c1cd98351b ("nvme/pci: Don't set reserved SQ create flags") Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe Signed-off-by: Keith Busch drivers/nvme/host/nvme.h | 5 +++++ drivers/nvme/host/pci.c | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) commit 1e2e547a93a00ebc21582c06ca3c6cfea2a309ee Author: Al Viro Date: Fri May 4 08:23:01 2018 -0400 do d_instantiate/unlock_new_inode combinations safely For anything NFS-exported we do _not_ want to unlock new inode before it has grown an alias; original set of fixes got the ordering right, but missed the nasty complication in case of lockdep being enabled - unlock_new_inode() does lockdep_annotate_inode_mutex_key(inode) which can only be done before anyone gets a chance to touch ->i_mutex. Unfortunately, flipping the order and doing unlock_new_inode() before d_instantiate() opens a window when mkdir can race with open-by-fhandle on a guessed fhandle, leading to multiple aliases for a directory inode and all the breakage that follows from that. Correct solution: a new primitive (d_instantiate_new()) combining these two in the right order - lockdep annotate, then d_instantiate(), then the rest of unlock_new_inode(). All combinations of d_instantiate() with unlock_new_inode() should be converted to that. Cc: stable@kernel.org # 2.6.29 and later Tested-by: Mike Marshall Reviewed-by: Andreas Dilger Signed-off-by: Al Viro fs/btrfs/inode.c | 16 ++++------------ fs/dcache.c | 22 ++++++++++++++++++++++ fs/ecryptfs/inode.c | 3 +-- fs/ext2/namei.c | 6 ++---- fs/ext4/namei.c | 6 ++---- fs/f2fs/namei.c | 12 ++++-------- fs/jffs2/dir.c | 12 ++++-------- fs/jfs/namei.c | 12 ++++-------- fs/nilfs2/namei.c | 6 ++---- fs/orangefs/namei.c | 9 +++------ fs/reiserfs/namei.c | 12 ++++-------- fs/udf/namei.c | 6 ++---- fs/ufs/namei.c | 6 ++---- include/linux/dcache.h | 1 + 14 files changed, 57 insertions(+), 72 deletions(-) commit 84c3a0979c4c29711807747280dfecbb54b8af7c Merge: be83bbf d1ecfa9 Author: Linus Torvalds Date: Fri May 11 12:30:34 2018 -0700 Merge tag 'for-linus-4.17-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fix from Juergen Gross: "One fix for the kernel running as a fully virtualized guest using PV drivers on old Xen hypervisor versions" * tag 'for-linus-4.17-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/xen: Reset VCPU0 info pointer after shared_info remap commit c89ebb968f04c71e16e86c91caeacb045dc8f908 Author: Colin Ian King Date: Wed May 9 14:58:48 2018 +0100 ixgbe: fix memory leak on ipsec allocation The error clean up path kfree's adapter->ipsec and should be instead kfree'ing ipsec. Fix this. Also, the err1 error exit path does not need to kfree ipsec because this failure path was for the failed allocation of ipsec. Detected by CoverityScan, CID#146424 ("Resource Leak") Fixes: 63a67fe229ea ("ixgbe: add ipsec offload add and remove SA") Signed-off-by: Colin Ian King Acked-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf12aab67a2fb29342d833a6333a322aaccca2d0 Author: Luc Van Oostenryck Date: Tue Apr 24 15:16:48 2018 +0200 ixgbevf: fix ixgbevf_xmit_frame()'s return type The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbb2707623f3ccc48695da2433f06d7c38193451 Author: Emil Tantilov Date: Thu Apr 19 17:06:57 2018 -0700 ixgbe: return error on unsupported SFP module when resetting Add check for unsupported module and return the error code. This fixes a Coverity hit due to unused return status from setup_sfp. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 3 +++ 1 file changed, 3 insertions(+) commit ea3beca422742ca7e8502496e2806421d5e9d6fd Author: Jeff Shaw Date: Wed Apr 18 11:23:27 2018 -0700 ice: Set rq_last_status when cleaning rq Prior to this commit, the rq_last_status was only set when hardware responded with an error. This leads to rq_last_status being invalid in the future when hardware eventually responds without error. This commit resolves the issue by unconditionally setting rq_last_status with the value returned in the descriptor. Fixes: 940b61af02f4 ("ice: Initialize PF and setup miscellaneous interrupt") Signed-off-by: Jeff Shaw Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_controlq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04ac6fdba1afffad664377a324b017e63ac08bd8 Author: Trond Myklebust Date: Fri May 11 14:13:57 2018 -0400 Change Trond's email address in MAINTAINERS Signed-off-by: Trond Myklebust MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac21fc2dcb405cf250ad3f1228f64f64930d9211 Author: Rob Herring Date: Fri May 11 08:45:59 2018 -0500 sh: switch to NO_BOOTMEM Commit 0fa1c579349f ("of/fdt: use memblock_virt_alloc for early alloc") inadvertently switched the DT unflattening allocations from memblock to bootmem which doesn't work because the unflattening happens before bootmem is initialized. Swapping the order of bootmem init and unflattening could also fix this, but removing bootmem is desired. So enable NO_BOOTMEM on SH like other architectures have done. Fixes: 0fa1c579349f ("of/fdt: use memblock_virt_alloc for early alloc") Reported-by: Rich Felker Cc: Yoshinori Sato Signed-off-by: Rob Herring Signed-off-by: Rich Felker arch/sh/Kconfig | 1 + arch/sh/kernel/setup.c | 1 - arch/sh/mm/init.c | 68 +++++--------------------------------------------- arch/sh/mm/numa.c | 19 -------------- 4 files changed, 7 insertions(+), 82 deletions(-) commit be83bbf806822b1b89e0a0f23cd87cddc409e429 Author: Linus Torvalds Date: Fri May 11 09:52:01 2018 -0700 mmap: introduce sane default mmap limits The internal VM "mmap()" interfaces are based on the mmap target doing everything using page indexes rather than byte offsets, because traditionally (ie 32-bit) we had the situation that the byte offset didn't fit in a register. So while the mmap virtual address was limited by the word size of the architecture, the backing store was not. So we're basically passing "pgoff" around as a page index, in order to be able to describe backing store locations that are much bigger than the word size (think files larger than 4GB etc). But while this all makes a ton of sense conceptually, we've been dogged by various drivers that don't really understand this, and internally work with byte offsets, and then try to work with the page index by turning it into a byte offset with "pgoff << PAGE_SHIFT". Which obviously can overflow. Adding the size of the mapping to it to get the byte offset of the end of the backing store just exacerbates the problem, and if you then use this overflow-prone value to check various limits of your device driver mmap capability, you're just setting yourself up for problems. The correct thing for drivers to do is to do their limit math in page indices, the way the interface is designed. Because the generic mmap code _does_ test that the index doesn't overflow, since that's what the mmap code really cares about. HOWEVER. Finding and fixing various random drivers is a sisyphean task, so let's just see if we can just make the core mmap() code do the limiting for us. Realistically, the only "big" backing stores we need to care about are regular files and block devices, both of which are known to do this properly, and which have nice well-defined limits for how much data they can access. So let's special-case just those two known cases, and then limit other random mmap users to a backing store that still fits in "unsigned long". Realistically, that's not much of a limit at all on 64-bit, and on 32-bit architectures the only worry might be the GPU drivers, which can have big physical address spaces. To make it possible for drivers like that to say that they are 64-bit clean, this patch does repurpose the "FMODE_UNSIGNED_OFFSET" bit in the file flags to allow drivers to mark their file descriptors as safe in the full 64-bit mmap address space. [ The timing for doing this is less than optimal, and this should really go in a merge window. But realistically, this needs wide testing more than it needs anything else, and being main-line is the only way to do that. So the earlier the better, even if it's outside the proper development cycle - Linus ] Cc: Kees Cook Cc: Dan Carpenter Cc: Al Viro Cc: Willy Tarreau Cc: Dave Airlie Signed-off-by: Linus Torvalds mm/mmap.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 4e50d9ebaeaa3c6761d2b513ef7039510c8cf213 Author: Charles Machalow Date: Thu May 10 16:01:38 2018 -0700 nvme: Fix sync controller reset return If a controller reset is requested while the device has no namespaces, we were incorrectly returning ENETRESET. This patch adds the check for ADMIN_ONLY controller state to indicate a successful reset. Fixes: 8000d1fdb0 ("nvme-rdma: fix sysfs invoked reset_ctrl error flow ") Cc: Signed-off-by: Charles Machalow [changelog] Signed-off-by: Keith Busch drivers/nvme/host/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 41e3e1082367221e99a59c8968a583706123ae04 Merge: e03dc5d ef05037 Author: Linus Torvalds Date: Fri May 11 09:49:02 2018 -0700 Merge tag 'pm-4.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix two PCI power management regressions from the 4.13 cycle and one cpufreq schedutil governor bug introduced during the 4.12 cycle, drop a stale comment from the schedutil code and fix two mistakes in docs. Specifics: - Restore device_may_wakeup() check in pci_enable_wake() removed inadvertently during the 4.13 cycle to prevent systems from drawing excessive power when suspended or off, among other things (Rafael Wysocki). - Fix pci_dev_run_wake() to properly handle devices that only can signal PME# when in the D3cold power state (Kai Heng Feng). - Fix the schedutil cpufreq governor to avoid using UINT_MAX as the new CPU frequency in some cases due to a missing check (Rafael Wysocki). - Remove a stale comment regarding worker kthreads from the schedutil cpufreq governor (Juri Lelli). - Fix a copy-paste mistake in the intel_pstate driver documentation (Juri Lelli). - Fix a typo in the system sleep states documentation (Jonathan Neuschäfer)" * tag 'pm-4.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PCI / PM: Check device_may_wakeup() in pci_enable_wake() PCI / PM: Always check PME wakeup capability for runtime wakeup support cpufreq: schedutil: Avoid using invalid next_freq cpufreq: schedutil: remove stale comment PM: docs: intel_pstate: fix Active Mode w/o HWP paragraph PM: docs: sleep-states: Fix a typo ("includig") commit e03dc5d3d427ed0114258ba00b16277e705e2c0d Merge: ca30093 3057fce Author: Linus Torvalds Date: Fri May 11 09:46:14 2018 -0700 Merge tag 'mtd/fixes-for-4.17-rc5' of git://git.infradead.org/linux-mtd Pull mtd fixes from Boris Brezillon: - make nand_soft_waitrdy() wait tWB before polling the status REG - fix BCH write in the the Marvell NAND controller driver - fix wrong picosec to msec conversion in the Marvell NAND controller driver - fix DMA handling in the TI OneNAND controllre driver * tag 'mtd/fixes-for-4.17-rc5' of git://git.infradead.org/linux-mtd: mtd: rawnand: Make sure we wait tWB before polling the STATUS reg mtd: rawnand: marvell: fix command xtype in BCH write hook mtd: rawnand: marvell: pass ms delay to wait_op mtd: onenand: omap2: Disable DMA for HIGHMEM buffers commit 5ae4bbf76928b401fe467e837073d939300adbf0 Merge: 1b97013 f85900c Author: David S. Miller Date: Fri May 11 12:26:29 2018 -0400 Merge tag 'mlx5-fixes-2018-05-10' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2018-05-10 the following series includes some fixes for mlx5 core driver. Please pull and let me know if there's any problem. For -stable v4.5 ("net/mlx5: E-Switch, Include VF RDMA stats in vport statistics") For -stable v4.10 ("net/mlx5e: Err if asked to offload TC match on frag being first") ==================== Signed-off-by: David S. Miller commit ca30093dd7ff8fd3423c68db1f70f72a88542cb9 Merge: 0a0b987 72777fe Author: Linus Torvalds Date: Fri May 11 09:18:02 2018 -0700 Merge tag 'drm-fixes-for-v4.17-rc5' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "nouveau, amdgpu, i915, vc4, omap, exynos and atomic fixes. As last week seemed a bit slow, we got a few more fixes this week. The main stuff is two weeks of fixes for amdgpu, some missing bits of vega12 atom firmware support were added, and some power management fixes. Nouveau got two regression fixes for an DP MST deadlock and a random oops fix. i915 got an LVDS panel timeout fix 2 WARN fixes. exynos fixed a pagefault issue in the mixer driver. vc4 has an oops fix. omap had a bunch of uninit var and error-checking fixes. Two atomic modesetting state fixes. One minor agp cleanup patch" * tag 'drm-fixes-for-v4.17-rc5' of git://people.freedesktop.org/~airlied/linux: (30 commits) drm/amd/pp: Fix performance drop on Fiji drm/nouveau: Fix deadlock in nv50_mstm_register_connector() drm/nouveau/ttm: don't dereference nvbo::cli, it can outlive client agp: uninorth: make two functions static drm/amd/pp: Refine the output of pp_power_profile_mode on VI drm/amdgpu: Switch to interruptable wait to recover from ring hang. drm/ttm: Use GFP_TRANSHUGE_LIGHT for allocating huge pages drm/amd/display: Use kvzalloc for potentially large allocations drm/amd/display: Don't return ddc result and read_bytes in same return value drm/amd/display: Add get_firmware_info_v3_2 for VG12 drm/amd: Add BIOS smu_info v3_3 required struct def. drm/amd/display: Add VG12 ASIC IDs drm/vc4: Fix scaling of uni-planar formats drm/exynos: hdmi: avoid duplicating drm_bridge_attach drm/i915: Fix drm:intel_enable_lvds ERROR message in kernel log drm/i915: Correctly populate user mode h/vdisplay with pipe src size during readout drm/i915: Adjust eDP's logical vco in a reliable place. drm/bridge/sii8620: add Kconfig dependency on extcon drm/omap: handle alloc failures in omap_connector drm/omap: add missing linefeeds to prints ... commit 1b97013bfb11d66f041de691de6f0fec748ce016 Author: Andrey Ignatov Date: Thu May 10 10:59:34 2018 -0700 ipv4: fix memory leaks in udp_sendmsg, ping_v4_sendmsg Fix more memory leaks in ip_cmsg_send() callers. Part of them were fixed earlier in 919483096bfe. * udp_sendmsg one was there since the beginning when linux sources were first added to git; * ping_v4_sendmsg one was copy/pasted in c319b4d76b9e. Whenever return happens in udp_sendmsg() or ping_v4_sendmsg() IP options have to be freed if they were allocated previously. Add label so that future callers (if any) can use it instead of kfree() before return that is easy to forget. Fixes: c319b4d76b9e (net: ipv4: add IPPROTO_ICMP socket kind) Signed-off-by: Andrey Ignatov Signed-off-by: David S. Miller net/ipv4/ping.c | 7 +++++-- net/ipv4/udp.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) commit 8ccc113172e4c1ebef45c2433f3c32ed6ae1b9c9 Author: Christophe JAILLET Date: Thu May 10 13:26:16 2018 +0200 mlxsw: core: Fix an error handling path in 'mlxsw_core_bus_device_register()' Resources are not freed in the reverse order of the allocation. Labels are also mixed-up. Fix it and reorder code and labels in the error handling path of 'mlxsw_core_bus_device_register()' Fixes: ef3116e5403e ("mlxsw: spectrum: Register KVD resources with devlink") Signed-off-by: Christophe JAILLET Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 89dd2e752c7beb773c36e623773d50d5f34da711 Merge: ca3943c 21706ee Author: David S. Miller Date: Fri May 11 11:50:41 2018 -0400 Merge branch 'bonding-bug-fixes-and-regressions' Debabrata Banerjee says: ==================== bonding: bug fixes and regressions Fixes to bonding driver for balance-alb mode, suitable for stable. ==================== Signed-off-by: David S. Miller commit 21706ee8a47d3ede7fdae0be6d7c0a0e31a83229 Author: Debabrata Banerjee Date: Wed May 9 19:32:11 2018 -0400 bonding: send learning packets for vlans on slave There was a regression at some point from the intended functionality of commit f60c3704e87d ("bonding: Fix alb mode to only use first level vlans.") Given the return value vlan_get_encap_level() we need to store the nest level of the bond device, and then compare the vlan's encap level to this. Without this, this check always fails and learning packets are never sent. In addition, this same commit caused a regression in the behavior of balance_alb, which requires learning packets be sent for all interfaces using the slave's mac in order to load balance properly. For vlan's that have not set a user mac, we can send after checking one bit. Otherwise we need send the set mac, albeit defeating rx load balancing for that vlan. Signed-off-by: Debabrata Banerjee Signed-off-by: David S. Miller drivers/net/bonding/bond_alb.c | 13 ++++++++----- drivers/net/bonding/bond_main.c | 2 ++ include/net/bonding.h | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) commit 4fa8667ca3989ce14cf66301fa251544fbddbdd0 Author: Debabrata Banerjee Date: Wed May 9 19:32:10 2018 -0400 bonding: do not allow rlb updates to invalid mac Make sure multicast, broadcast, and zero mac's cannot be the output of rlb updates, which should all be directed arps. Receive load balancing will be collapsed if any of these happen, as the switch will broadcast. Signed-off-by: Debabrata Banerjee Signed-off-by: David S. Miller drivers/net/bonding/bond_alb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c23080a6e4e853cff2834436e3cf33eae7723900 Author: Arnaldo Carvalho de Melo Date: Thu May 3 15:59:58 2018 -0300 perf tools: Add missing newline when parsing empty BPF proggie This is not specific to BPF but was found when parsing a .c BPF proggie that while valid, had no events attached to tracepoints, kprobes, etc: Very minimal file that perf's BPF code can compile: # cat empty.c char _license[] __attribute__((section("license"), used)) = "GPL"; int _version __attribute__((section("version"), used)) = LINUX_VERSION_CODE; # Before this patch: # perf trace -e empty.c WARNING: event parser found nothinginvalid or unsupported event: 'empty.c' Run 'perf list' for a list of valid events Usage: perf trace [] [] or: perf trace [] -- [] or: perf trace record [] [] or: perf trace record [] -- [] -e, --event event/syscall selector. use 'perf list' to list available events # After: # perf trace -e empty.c WARNING: event parser found nothing invalid or unsupported event: 'empty.c' Run 'perf list' for a list of valid events Usage: perf trace [] [] or: perf trace [] -- [] or: perf trace record [] [] or: perf trace record [] -- [] -e, --event event/syscall selector. use 'perf list' to list available events # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-8ysughiz00h6mjpcot04qyjj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc432c3d7f9bceb3de6f5b44fb9c657c9810ed6d Author: Steven Rostedt (VMware) Date: Wed May 9 11:59:32 2018 -0400 tracing: Fix regex_match_front() to not over compare the test string The regex match function regex_match_front() in the tracing filter logic, was fixed to test just the pattern length from testing the entire test string. That is, it went from strncmp(str, r->pattern, len) to strcmp(str, r->pattern, r->len). The issue is that str is not guaranteed to be nul terminated, and if r->len is greater than the length of str, it can access more memory than is allocated. The solution is to add a simple test if (len < r->len) return 0. Cc: stable@vger.kernel.org Fixes: 285caad415f45 ("tracing/filters: Fix MATCH_FRONT_ONLY filter matching") Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_filter.c | 3 +++ 1 file changed, 3 insertions(+) commit 3a0887997d6731e1005ba09c93aa5c2898c78931 Author: Leo Yan Date: Thu May 10 12:02:00 2018 +0800 perf cs-etm: Remove redundant space There have two spaces ahead function name cs_etm__set_pid_tid_cpu(), so remove one space and correct indentation. Signed-off-by: Leo Yan Acked-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1525924920-4381-2-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 46d53620044f7b574c0f3216f8b4f2ce3559ce31 Author: Leo Yan Date: Thu May 10 12:01:59 2018 +0800 perf cs-etm: Support unknown_thread in cs_etm_auxtrace CoreSight doesn't allocate thread structure for unknown_thread in ETM auxtrace, so unknown_thread is NULL pointer. If the perf data doesn't contain valid tid and then cs_etm__mem_access() uses unknown_thread instead as thread handler, this results in a segmentation fault when thread__find_addr_map() accesses the thread handler. This commit creates a new thread data which is used by unknown_thread, so CoreSight tracing can roll back to use unknown_thread if perf data doesn't include valid thread info. This commit also releases thread data for initialization failure case and for normal auxtrace free flow. Signed-off-by: Leo Yan Acked-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1525924920-4381-1-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit ef050374e1eedec45bd260e0ac9eb98f699267d2 Merge: 9773950 cfcadfa 13610c9 Author: Rafael J. Wysocki Date: Fri May 11 15:17:18 2018 +0200 Merge branches 'pm-pci' and 'pm-docs' * pm-pci: PCI / PM: Check device_may_wakeup() in pci_enable_wake() PCI / PM: Always check PME wakeup capability for runtime wakeup support * pm-docs: PM: docs: intel_pstate: fix Active Mode w/o HWP paragraph PM: docs: sleep-states: Fix a typo ("includig") commit 7f6df440b8623c441c42d070bf592e2d2c1fa9bb Author: Haneen Mohammed Date: Fri May 11 07:15:42 2018 +0300 drm: Match sysfs name in link removal to link creation This patch matches the sysfs name used in the unlinking with the linking function. Otherwise, remove_compat_control_link() fails to remove sysfs created by create_compat_control_link() in drm_dev_register(). Fixes: 6449b088dd51 ("drm: Add fake controlD* symlinks for backwards compat") Cc: Dave Airlie Cc: Alex Deucher Cc: Emil Velikov Cc: David Herrmann Cc: Greg Kroah-Hartman Cc: Daniel Vetter Cc: Gustavo Padovan Cc: Maarten Lankhorst Cc: Sean Paul Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Cc: # v4.10+ Signed-off-by: Haneen Mohammed [seanpaul added Fixes and Cc tags] Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180511041542.GA4253@haneen-vb drivers/gpu/drm/drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64f7a11586ab9262f00b8b6eceef6d8154921bd8 Author: Sean Christopherson Date: Mon Apr 30 10:01:06 2018 -0700 KVM: vmx: update sec exec controls for UMIP iff emulating UMIP Update SECONDARY_EXEC_DESC for UMIP emulation if and only UMIP is actually being emulated. Skipping the VMCS update eliminates unnecessary VMREAD/VMWRITE when UMIP is supported in hardware, and on platforms that don't have SECONDARY_VM_EXEC_CONTROL. The latter case resolves a bug where KVM would fill the kernel log with warnings due to failed VMWRITEs on older platforms. Fixes: 0367f205a3b7 ("KVM: vmx: add support for emulating UMIP") Cc: stable@vger.kernel.org #4.16 Reported-by: Paolo Zeppegno Suggested-by: Paolo Bonzini Suggested-by: Radim KrÄmář Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit c19986fea873f3c745122bf79013a872a190f212 Author: Junaid Shahid Date: Fri May 4 11:37:13 2018 -0700 kvm: x86: Suppress CR3_PCID_INVD bit only when PCIDs are enabled If the PCIDE bit is not set in CR4, then the MSb of CR3 is a reserved bit. If the guest tries to set it, that should cause a #GP fault. So mask out the bit only when the PCIDE bit is set. Signed-off-by: Junaid Shahid Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bcb2b94ae01009db26d1ad0811975405149b14f0 Author: Paolo Bonzini Date: Wed Apr 18 18:26:45 2018 +0200 KVM: selftests: exit with 0 status code when tests cannot be run Right now, skipped tests are returning a failure exit code if /dev/kvm does not exists. Consistently return a zero status code so that various scripts over the interwebs do not complain. Also return a zero status code if the KVM_CAP_SYNC_REGS capability is not present, and hardcode in the test the register kinds that are covered (rather than just using whatever value of KVM_SYNC_X86_VALID_FIELDS is provided by the kernel headers). Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/Makefile | 2 +- tools/testing/selftests/kvm/include/test_util.h | 1 + tools/testing/selftests/kvm/lib/kvm_util.c | 16 ++++----- tools/testing/selftests/kvm/sync_regs_test.c | 40 ++++++++++++++++++----- tools/testing/selftests/kvm/vmx_tsc_adjust_test.c | 4 +-- 5 files changed, 43 insertions(+), 20 deletions(-) commit 452a68d0ef341c4d544757e02154788227b2a08b Author: Paolo Bonzini Date: Mon May 7 19:24:34 2018 +0200 KVM: hyperv: idr_find needs RCU protection Even though the eventfd is released after the KVM SRCU grace period elapses, the conn_to_evt data structure itself is not; it uses RCU internally, instead. Fix the read-side critical section to happen under rcu_read_lock/unlock; the result is still protected by vcpu->kvm->srcu. Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6356ee0c9602004e0a3b4b2dad68ee2ee9385b17 Author: Marian Rotariu Date: Mon Apr 30 12:23:01 2018 +0300 x86: Delay skip of emulated hypercall instruction The IP increment should be done after the hypercall emulation, after calling the various handlers. In this way, these handlers can accurately identify the the IP of the VMCALL if they need it. This patch keeps the same functionality for the Hyper-V handler which does not use the return code of the standard kvm_skip_emulated_instruction() call. Signed-off-by: Marian Rotariu [Hyper-V hypercalls also need kvm_skip_emulated_instruction() - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 2 +- arch/x86/kvm/x86.c | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) commit ddc9cfb79c1096a0855839631c091aa7e9602052 Author: Wanpeng Li Date: Thu Apr 26 17:55:03 2018 -0700 KVM: Extend MAX_IRQ_ROUTES to 4096 for all archs Our virtual machines make use of device assignment by configuring 12 NVMe disks for high I/O performance. Each NVMe device has 129 MSI-X Table entries: Capabilities: [50] MSI-X: Enable+ Count=129 Masked-Vector table: BAR=0 offset=00002000 The windows virtual machines fail to boot since they will map the number of MSI-table entries that the NVMe hardware reported to the bus to msi routing table, this will exceed the 1024. This patch extends MAX_IRQ_ROUTES to 4096 for all archs, in the future this might be extended again if needed. Reviewed-by: Cornelia Huck Cc: Paolo Bonzini Cc: Radim KrÄmář Cc: Cornelia Huck Cc: Christian Borntraeger Signed-off-by: Wanpeng Li Signed-off-by: Tonny Lu Signed-off-by: Paolo Bonzini include/linux/kvm_host.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 6d3299aef7df7225ecff653feedafb5d1646998b Author: Nikita Yushchenko Date: Mon May 7 16:53:09 2018 +0300 ARM: dts: imx51-zii-rdu1: fix touchscreen bindings This fixes errors in RDU1 device tree that cause touch screens not working. Fixes: ceef0396f367 ("ARM: dts: imx: add ZII RDU1 board") Signed-off-by: Nikita Yushchenko Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx51-zii-rdu1.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 60abce9f43d812dfec6687a10ca30be380f6f97a Merge: 13b86f5 c8da6cd Author: Zhang Rui Date: Fri May 11 09:37:21 2018 +0800 Merge branch 'thermal-soc' into next commit 0a0b98734479aa5b3c671d5190e86273372cab95 Author: Jann Horn Date: Fri May 11 02:19:01 2018 +0200 compat: fix 4-byte infoleak via uninitialized struct field Commit 3a4d44b61625 ("ntp: Move adjtimex related compat syscalls to native counterparts") removed the memset() in compat_get_timex(). Since then, the compat adjtimex syscall can invoke do_adjtimex() with an uninitialized ->tai. If do_adjtimex() doesn't write to ->tai (e.g. because the arguments are invalid), compat_put_timex() then copies the uninitialized ->tai field to userspace. Fix it by adding the memset() back. Fixes: 3a4d44b61625 ("ntp: Move adjtimex related compat syscalls to native counterparts") Signed-off-by: Jann Horn Acked-by: Kees Cook Acked-by: Al Viro Signed-off-by: Linus Torvalds kernel/compat.c | 1 + 1 file changed, 1 insertion(+) commit 72777fe79768ec30ac2163d26de68a89edc9849f Merge: 7c2b134 7fc6311 Author: Dave Airlie Date: Fri May 11 10:37:07 2018 +1000 Merge branch 'drm-fixes-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Single amdgpu regression fix * 'drm-fixes-4.17' of git://people.freedesktop.org/~agd5f/linux: drm/amd/pp: Fix performance drop on Fiji commit 6e70c267e68d77679534dcf4aaf84e66f2cf1425 Author: Steve French Date: Thu May 10 10:59:37 2018 -0500 smb3: directory sync should not return an error As with NFS, which ignores sync on directory handles, fsync on a directory handle is a noop for CIFS/SMB3. Do not return an error on it. It breaks some database apps otherwise. Signed-off-by: Steve French CC: Stable Reviewed-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky fs/cifs/cifsfs.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit f85900c3e13fdb61f040c9feecbcda601e0cdcfb Author: Roi Dayan Date: Thu Mar 22 18:51:37 2018 +0200 net/mlx5e: Err if asked to offload TC match on frag being first The HW doesn't support matching on frag first/later, return error if we are asked to offload that. Fixes: 3f7d0eb42d59 ("net/mlx5e: Offload TC matching on packets being IP fragments") Signed-off-by: Roi Dayan Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 88d725bbb43cd63a40c8ef70dd373f1d38ead2e3 Author: Adi Nissim Date: Wed Apr 25 11:21:32 2018 +0300 net/mlx5: E-Switch, Include VF RDMA stats in vport statistics The host side reporting of VF vport statistics didn't include the VF RDMA traffic. Fixes: 3b751a2a418a ("net/mlx5: E-Switch, Introduce get vf statistics") Signed-off-by: Adi Nissim Reported-by: Ariel Almog Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 1ef903bf795be01c91c10c93a0f9d9d6f2f7921b Author: Daniel Jurgens Date: Mon Mar 26 13:35:29 2018 -0500 net/mlx5: Free IRQs in shutdown path Some platforms require IRQs to be free'd in the shutdown path. Otherwise they will fail to be reallocated after a kexec. Fixes: 8812c24d28f4 ("net/mlx5: Add fast unload support in shutdown flow") Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eq.c | 28 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/main.c | 8 +++++++ .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 ++ 3 files changed, 38 insertions(+) commit 6b47fe1d1ca3aec3a1a8623439c22fbf51016cd8 Author: David Howells Date: Thu May 10 23:26:01 2018 +0100 rxrpc: Trace UDP transmission failure Add a tracepoint to log transmission failure from the UDP transport socket being used by AF_RXRPC. Signed-off-by: David Howells include/trace/events/rxrpc.h | 55 ++++++++++++++++++++++++++++++++++++++++++++ net/rxrpc/conn_event.c | 11 ++++++--- net/rxrpc/local_event.c | 3 ++- net/rxrpc/output.c | 23 ++++++++++++++++-- net/rxrpc/rxkad.c | 6 +++-- 5 files changed, 90 insertions(+), 8 deletions(-) commit 494337c918403db5743af0348d963cafb9b20cee Author: David Howells Date: Thu May 10 23:26:01 2018 +0100 rxrpc: Add a tracepoint to log ICMP/ICMP6 and error messages Add a tracepoint to log received ICMP/ICMP6 events and other error messages. Signed-off-by: David Howells include/trace/events/rxrpc.h | 30 +++++++++++++++++++++++++++++ net/rxrpc/peer_event.c | 46 ++++++++++++++++++++++---------------------- 2 files changed, 53 insertions(+), 23 deletions(-) commit 93864fc3ffcc4bf70e96cfb5cc6e941630419ad0 Author: David Howells Date: Thu May 10 23:26:01 2018 +0100 rxrpc: Fix the min security level for kernel calls Fix the kernel call initiation to set the minimum security level for kernel initiated calls (such as from kAFS) from the sockopt value. Fixes: 19ffa01c9c45 ("rxrpc: Use structs to hold connection params and protocol info") Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2aeed3a591ff29a82495eeaa92ac4780bad7487 Author: David Howells Date: Thu May 10 23:26:00 2018 +0100 rxrpc: Fix error reception on AF_INET6 sockets AF_RXRPC tries to turn on IP_RECVERR and IP_MTU_DISCOVER on the UDP socket it just opened for communications with the outside world, regardless of the type of socket. Unfortunately, this doesn't work with an AF_INET6 socket. Fix this by turning on IPV6_RECVERR and IPV6_MTU_DISCOVER instead if the socket is of the AF_INET6 family. Without this, kAFS server and address rotation doesn't work correctly because the algorithm doesn't detect received network errors. Fixes: 75b54cb57ca3 ("rxrpc: Add IPv6 support") Signed-off-by: David Howells net/rxrpc/local_object.c | 57 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 15 deletions(-) commit c54e43d752c7187595c8c62a231e0b0d53c7fded Author: David Howells Date: Thu May 10 23:26:00 2018 +0100 rxrpc: Fix missing start of call timeout The expect_rx_by call timeout is supposed to be set when a call is started to indicate that we need to receive a packet by that point. This is currently put back every time we receive a packet, but it isn't started when we first send a packet. Without this, the call may wait forever if the server doesn't deign to reply. Fix this by setting the timeout upon a successful UDP sendmsg call for the first DATA packet. The timeout is initiated only for initial transmission and not for subsequent retries as we don't want the retry mechanism to extend the timeout indefinitely. Fixes: a158bdd3247b ("rxrpc: Fix call timeouts") Reported-by: Marc Dionne Signed-off-by: David Howells net/rxrpc/ar-internal.h | 1 + net/rxrpc/input.c | 2 +- net/rxrpc/output.c | 11 +++++++++++ net/rxrpc/sendmsg.c | 10 ++++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) commit 3597683c9da602b0440c5f742d64fa5da79cc026 Author: Jakub Kicinski Date: Thu May 10 10:09:34 2018 -0700 tools: bpf: handle NULL return in bpf_prog_load_xattr() bpf_object__open() can return error pointer as well as NULL. Fix error handling in bpf_prog_load_xattr() (and indirectly bpf_prog_load()). Fixes: 6f6d33f3b3d0 ("bpf: selftests add sockmap tests") Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca3943c4aaff083bc25419f04e549e293590258e Merge: 2fdae03 32bee8f Author: David S. Miller Date: Thu May 10 17:57:11 2018 -0400 Merge tag 'linux-can-fixes-for-4.17-20180510' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== this is a pull request for net/master consisting of 2 patches. Both patches are from Lukas Wunner and fix two problems found in the hi311x CAN driver under high load situations. ==================== Signed-off-by: David S. Miller commit 2fdae0349f587ffde4d1010c65fb543569bab787 Author: Colin Ian King Date: Thu May 10 15:03:27 2018 +0100 qed: fix spelling mistake: "taskelt" -> "tasklet" Trivial fix to spelling mistake in DP_VERBOSE message text Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6910e25de2257e2c82c7a2d126e3463cd8e50810 Author: Xin Long Date: Thu May 10 17:34:13 2018 +0800 sctp: remove sctp_chunk_put from fail_mark err path in sctp_ulpevent_make_rcvmsg In Commit 1f45f78f8e51 ("sctp: allow GSO frags to access the chunk too"), it held the chunk in sctp_ulpevent_make_rcvmsg to access it safely later in recvmsg. However, it also added sctp_chunk_put in fail_mark err path, which is only triggered before holding the chunk. syzbot reported a use-after-free crash happened on this err path, where it shouldn't call sctp_chunk_put. This patch simply removes this call. Fixes: 1f45f78f8e51 ("sctp: allow GSO frags to access the chunk too") Reported-by: syzbot+141d898c5f24489db4aa@syzkaller.appspotmail.com Signed-off-by: Xin Long Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/ulpevent.c | 1 - 1 file changed, 1 deletion(-) commit a577d868b768a3baf16cdd4841ab8cfb165521d6 Author: Christophe JAILLET Date: Thu May 10 09:06:04 2018 +0200 net/mlx4_en: Fix an error handling path in 'mlx4_en_init_netdev()' If an error occurs, 'mlx4_en_destroy_netdev()' is called. It then calls 'mlx4_en_free_resources()' which does the needed resources cleanup. So, doing some explicit kfree in the error handling path would lead to some double kfree. Simplify code to avoid such a case. Fixes: 67f8b1dcb9ee ("net/mlx4_en: Refactor the XDP forwarding rings scheme") Signed-off-by: Christophe JAILLET Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 97f3efb64323beb0690576e9d74e94998ad6e82a Author: Stephen Hemminger Date: Wed May 9 14:09:04 2018 -0700 hv_netvsc: set master device The hyper-v transparent bonding should have used master_dev_link. The netvsc device should look like a master bond device not like the upper side of a tunnel. This makes the semantics the same so that userspace applications looking at network devices see the correct master relationshipship. Fixes: 0c195567a8f6 ("netvsc: transparent VF management") Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b2a9643855c320353723a08b9ee4a3bbd0301c1a Merge: 09c8b97 914eac2 Author: David S. Miller Date: Thu May 10 17:34:50 2018 -0400 Merge tag 'mac80211-for-davem-2018-05-09' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== We only have a few fixes this time: * WMM element validation * SAE timeout * add-BA timeout * docbook parsing * a few memory leaks in error paths ==================== Signed-off-by: David S. Miller commit 09c8b9718a7af674036643fa2e0dbb2f09aba75e Author: Eric Dumazet Date: Wed May 9 09:50:22 2018 -0700 tipc: fix one byte leak in tipc_sk_set_orig_addr() sysbot/KMSAN reported an uninit-value in recvmsg() that I tracked down to tipc_sk_set_orig_addr(), missing srcaddr->member.scope initialization. This patches moves srcaddr->sock.scope init to follow fields order and ease future verifications. BUG: KMSAN: uninit-value in copy_to_user include/linux/uaccess.h:184 [inline] BUG: KMSAN: uninit-value in move_addr_to_user+0x32e/0x530 net/socket.c:226 CPU: 0 PID: 4549 Comm: syz-executor287 Not tainted 4.17.0-rc3+ #88 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:113 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 kmsan_internal_check_memory+0x135/0x1e0 mm/kmsan/kmsan.c:1157 kmsan_copy_to_user+0x69/0x160 mm/kmsan/kmsan.c:1199 copy_to_user include/linux/uaccess.h:184 [inline] move_addr_to_user+0x32e/0x530 net/socket.c:226 ___sys_recvmsg+0x4e2/0x810 net/socket.c:2285 __sys_recvmsg net/socket.c:2328 [inline] __do_sys_recvmsg net/socket.c:2338 [inline] __se_sys_recvmsg net/socket.c:2335 [inline] __x64_sys_recvmsg+0x325/0x460 net/socket.c:2335 do_syscall_64+0x154/0x220 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x4455e9 RSP: 002b:00007fe3bd36ddb8 EFLAGS: 00000246 ORIG_RAX: 000000000000002f RAX: ffffffffffffffda RBX: 00000000006dac24 RCX: 00000000004455e9 RDX: 0000000000002002 RSI: 0000000020000400 RDI: 0000000000000003 RBP: 00000000006dac20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff98ce4b6f R14: 00007fe3bd36e9c0 R15: 0000000000000003 Local variable description: ----addr@___sys_recvmsg Variable was created at: ___sys_recvmsg+0xd5/0x810 net/socket.c:2246 __sys_recvmsg net/socket.c:2328 [inline] __do_sys_recvmsg net/socket.c:2338 [inline] __se_sys_recvmsg net/socket.c:2335 [inline] __x64_sys_recvmsg+0x325/0x460 net/socket.c:2335 Byte 19 of 32 is uninitialized Fixes: 31c82a2d9d51 ("tipc: add second source address to recvmsg()/recvfrom()") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Jon Maloy Cc: Ying Xue Acked-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f7017cafcdd7574680fc7faabcb73f91172a14ab Author: Davide Caratti Date: Wed May 9 18:45:42 2018 +0200 tc-testing: fix tdc tests for 'bpf' action - correct a typo in the value of 'matchPattern' of test 282d, potentially causing false negative - allow errors when 'teardown' executes '$TC action flush action bpf' in test 282d, to fix false positive when it is run with act_bpf unloaded - correct the value of 'matchPattern' in test e939, causing false positive in case the BPF JIT is enabled Fixes: 440ea4ae1828 ("tc-testing: add selftests for 'bpf' action") Signed-off-by: Davide Caratti Acked-by: Lucas Bates Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 7bb4d366cba992904bffa4820d24e70a3de93e76 Author: Jiri Kosina Date: Thu May 10 22:47:32 2018 +0200 x86/bugs: Make cpu_show_common() static cpu_show_common() is not used outside of arch/x86/kernel/cpu/bugs.c, so make it static. Signed-off-by: Jiri Kosina Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/bugs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d66d8ff3d21667b41eddbe86b35ab411e40d8c5f Author: Jiri Kosina Date: Thu May 10 22:47:18 2018 +0200 x86/bugs: Fix __ssb_select_mitigation() return type __ssb_select_mitigation() returns one of the members of enum ssb_mitigation, not ssb_mitigation_cmd; fix the prototype to reflect that. Fixes: 24f7fc83b9204 ("x86/bugs: Provide boot parameters for the spec_store_bypass_disable mitigation") Signed-off-by: Jiri Kosina Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/bugs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ad4e91c6d796b38a7f0e724db1de28eeb122bad Author: Moshe Shemesh Date: Wed May 9 18:35:13 2018 +0300 net/mlx4_en: Verify coalescing parameters are in range Add check of coalescing parameters received through ethtool are within range of values supported by the HW. Driver gets the coalescing rx/tx-usecs and rx/tx-frames as set by the users through ethtool. The ethtool support up to 32 bit value for each. However, mlx4 modify cq limits the coalescing time parameter and coalescing frames parameters to 16 bits. Return out of range error if user tries to set these parameters to higher values. Change type of sample-interval and adaptive_rx_coal parameters in mlx4 driver to u32 as the ethtool holds them as u32 and these parameters are not limited due to mlx4 HW. Fixes: c27a02cd94d6 ('mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC') Signed-off-by: Moshe Shemesh Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 16 ++++++++++++++++ drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 7 +++++-- 2 files changed, 21 insertions(+), 2 deletions(-) commit aca06eafd09f48ca4d97f3c0b2a12c8d631116f0 Author: Ganesh Goudar Date: Wed May 9 19:00:35 2018 +0530 cxgb4: copy mbox log size to PF0-3 adap instances copy mbox size to adapter instances of PF0-3 to avoid mbox log overflow. This fixes the possible protection fault. Fixes: baf5086840ab ("cxgb4: restructure VF mgmt code") Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2b928749f9ba781085442d1f8832f057cbf458a1 Author: Ganesh Goudar Date: Wed May 9 18:40:09 2018 +0530 cxgb4: zero the HMA memory firmware expects HMA memory to be zeroed, use __GFP_ZERO for HMA memory allocation. Fixes: 8b4e6b3ca2ed ("cxgb4: Add HMA support") Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 69678bcd4d2dedbc3e8fcd6d7d99f283d83c531a Author: Paolo Abeni Date: Wed May 9 12:42:34 2018 +0200 udp: fix SO_BINDTODEVICE Damir reported a breakage of SO_BINDTODEVICE for UDP sockets. In absence of VRF devices, after commit fb74c27735f0 ("net: ipv4: add second dif to udp socket lookups") the dif mismatch isn't fatal anymore for UDP socket lookup with non null sk_bound_dev_if, breaking SO_BINDTODEVICE semantics. This changeset addresses the issue making the dif match mandatory again in the above scenario. Reported-by: Damir Mansurov Fixes: fb74c27735f0 ("net: ipv4: add second dif to udp socket lookups") Fixes: 1801b570dd2a ("net: ipv6: add second dif to udp socket lookups") Signed-off-by: Paolo Abeni Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv4/udp.c | 4 ++-- net/ipv6/udp.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0e8411e426e277f55bd21e287ec89fab6f8eacae Author: Hangbin Liu Date: Wed May 9 18:06:44 2018 +0800 ipv4: reset fnhe_mtu_locked after cache route flushed After route cache is flushed via ipv4_sysctl_rtcache_flush(), we forget to reset fnhe_mtu_locked in rt_bind_exception(). When pmtu is updated in __ip_rt_update_pmtu(), it will return directly since the pmtu is still locked. e.g. + ip netns exec client ping 10.10.1.1 -c 1 -s 1400 -M do PING 10.10.1.1 (10.10.1.1) 1400(1428) bytes of data. >From 10.10.0.254 icmp_seq=1 Frag needed and DF set (mtu = 0) Signed-off-by: David S. Miller net/ipv4/route.c | 1 + 1 file changed, 1 insertion(+) commit 55be9f25be1ca5bda75c39808fc77e42691bc07f Author: Mohammed Gamal Date: Wed May 9 10:17:34 2018 +0200 hv_netvsc: Fix net device attach on older Windows hosts On older windows hosts the net_device instance is returned to the caller of rndis_filter_device_add() without having the presence bit set first. This would cause any subsequent calls to network device operations (e.g. MTU change, channel change) to fail after the device is detached once, returning -ENODEV. Instead of returning the device instabce, we take the exit path where we call netif_device_attach() Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic") Signed-off-by: Mohammed Gamal Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/rndis_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df13c59b54a9f8d3e20a2fb565d54eee8dac8768 Author: Pieter Jansen van Vuuren Date: Wed May 9 00:18:58 2018 -0700 nfp: flower: remove headroom from max MTU calculation Since commit 29a5dcae2790 ("nfp: flower: offload phys port MTU change") we take encapsulation headroom into account when calculating the max allowed MTU. This is unnecessary as the max MTU advertised by firmware should have already accounted for encap headroom. Subtracting headroom twice brings the max MTU below what's necessary for some deployments. Fixes: 29a5dcae2790 ("nfp: flower: offload phys port MTU change") Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/main.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 680a284635808594b8ac34939a7513dd4320e907 Author: Colin Ian King Date: Wed May 9 10:48:33 2018 +0100 net/9p: fix spelling mistake: "suspsend" -> "suspend" Trivial fix to spelling mistake in dev_warn message text Signed-off-by: Colin Ian King Signed-off-by: David S. Miller net/9p/trans_xen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39a2d5cbaa8ce03bdd8eb9d3891d7a1b3f5fff96 Author: Colin Ian King Date: Tue May 8 23:24:28 2018 +0100 sctp: fix spelling mistake: "max_retans" -> "max_retrans" Trivial fix to spelling mistake in error string Signed-off-by: Colin Ian King Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/sm_make_chunk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9af5573f3ae1b5ad7340b2f77bba81b066a426d7 Author: Colin Ian King Date: Tue May 8 23:01:51 2018 +0100 firestream: fix spelling mistake: "reseverd" -> "reserved" Trivial fix to spelling mistake in res_strings string array Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/atm/firestream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ff519e6c9e005e41a1fc8e861f9f23fe9a3fc13 Merge: 94f6a80 090477e Author: David S. Miller Date: Thu May 10 15:22:36 2018 -0400 Merge branch 'qed-rdma-fixes' Michal Kalderon says: ==================== qed*: Rdma fixes This patch series include two fixes for bugs related to rdma. The first has to do with loading the driver over an iWARP device. The second fixes a previous commit that added proper link indication for iWARP / RoCE. ==================== Signed-off-by: Michal Kalderon Signed-off-by: Sudarsana Kalluru commit 090477e4acb31c5dd674940c7c01d4f16bd1ac41 Author: Michal Kalderon Date: Tue May 8 21:29:19 2018 +0300 qede: Fix gfp flags sent to rdma event node allocation A previous commit 4609adc27175 ("qede: Fix qedr link update") added a flow that could allocate rdma event objects from an interrupt path (link notification). Therefore the kzalloc call should be done with GFP_ATOMIC. fixes: 4609adc27175 ("qede: Fix qedr link update") Signed-off-by: Michal Kalderon Signed-off-by: Sudarsana Kalluru Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af6858ee423a309d93054c361c61099b8eb12bbf Author: Michal Kalderon Date: Tue May 8 21:29:18 2018 +0300 qed: Fix l2 initializations over iWARP personality If qede driver was loaded on a device configured for iWARP the l2 mutex wouldn't be allocated, and some l2 related resources wouldn't be freed. fixes: c851a9dc4359 ("qed: Introduce iWARP personality") Signed-off-by: Michal Kalderon Signed-off-by: Sudarsana Kalluru Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 94d7dbf108813ea45a91e27e9a8bd231d5a23fa7 Merge: 008464a 28700a3 Author: Linus Torvalds Date: Thu May 10 11:42:01 2018 -0700 Merge tag 'for-4.17/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - a stable fix for DM integrity to use kvfree - fix for a 4.17-rc1 change to dm-bufio's buffer alignment - fixes for a few sparse warnings - remove VLA usage in DM mirror target - improve DM thinp Documentation for the "read_only" feature * tag 'for-4.17/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm thin: update Documentation to clarify when "read_only" is valid dm mirror: remove VLA usage dm: fix some sparse warnings and whitespace in dax methods dm cache background tracker: fix sparse warning dm bufio: fix buffer alignment dm integrity: use kvfree for kvmalloc'd memory commit 04d2600ab669b2d44dd7920cc8a1b95c8144084c Author: Jin Yao Date: Wed May 9 23:57:15 2018 +0800 perf annotate: Display all available events on --stdio When we perform the following command lines: $ perf record -e "{cycles,branches}" ./div $ perf annotate main --stdio The output shows only the first event, "cycles" and the displaying format is not correct. Percent | Source code & Disassembly of div for cycles (44550 samples) ----------------------------------------------------------------------------------- : : : : Disassembly of section .text: : : 00000000004004b0
: : main(): : : return i; : } : : int main(void) : { 0.00 : 4004b0: push %rbx : int i; : int flag; : volatile double x = 1212121212, y = 121212; : : s_randseed = time(0); 0.00 : 4004b1: xor %edi,%edi : srand(s_randseed); 0.00 : 4004b3: mov $0x77359400,%ebx : : return i; : } The issue is that the value of the 'nr_percent' variable is hardcoded to 1. This patch fixes it. With this patch, the output is: Percent | Source code & Disassembly of div for cycles (44550 samples) ----------------------------------------------------------------------------------- : : : : Disassembly of section .text: : : 00000000004004b0
: : main(): : : return i; : } : : int main(void) : { 0.00 0.00 : 4004b0: push %rbx : int i; : int flag; : volatile double x = 1212121212, y = 121212; : : s_randseed = time(0); 0.00 0.00 : 4004b1: xor %edi,%edi : srand(s_randseed); 0.00 0.00 : 4004b3: mov $0x77359400,%ebx : : return i; : } Signed-off-by: Jin Yao Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Fixes: f681d593d1ce ("perf annotate: Remove disasm__calc_percent() from disasm_line__print()") Link: http://lkml.kernel.org/r/1525881435-4092-1-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 3 +++ 1 file changed, 3 insertions(+) commit f8207b987fdc3768257704579bf29a717b4ea520 Author: Thomas Richter Date: Thu May 3 08:58:37 2018 +0200 perf test: "probe libc's inet_pton" fails on s390 due to missing inline perf test "probe libc's inet_pton & backtrace it with ping" fails on 4.17.0rc3 on s/390. It turned out that function __inet_pton is reported as inline: [root@s8360047 perf]# ./perf script -i /tmp/perf.data.111 ping 12457 [000] 1584.478959: probe_libc:inet_pton: (3ffb5a347e8) 1347e8 __inet_pton (inlined) f19d7 gaih_inet.constprop.5 (/usr/lib64/libc-2.24.so) f4c3f __GI_getaddrinfo (inlined) 410b main (/usr/bin/ping) Allow __inet_pton listed as inline. Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180503065837.71043-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49cf4a4b3f5a8b02556dd4f45c5cee598d4fc799 Merge: 75bc37f 4a35a90 Author: Ingo Molnar Date: Thu May 10 20:09:00 2018 +0200 Merge tag 'perf-urgent-for-mingo-4.17-20180507' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: . Revert "perf pmu: Fix pmu events parsing rule", as it broke Intel PT event description parsing (Arnaldo Carvalho de Melo) . Sync x86's cpufeatures.h and kvm UAPI headers with the kernel sources, suppressing the ABI drift warnings (Arnaldo Carvalho de Melo) - Remove duplicated entry for westmereep-dp in Intel's mapfile.csv (William Cohen) - Fix typo in 'perf bench numa' options description (Yisheng Xie) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 32bee8f48fa048a3198109de50e51c092507ff52 Author: Lukas Wunner Date: Wed May 9 14:43:43 2018 +0200 can: hi311x: Work around TX complete interrupt erratum When sending packets as fast as possible using "cangen -g 0 -i -x", the HI-3110 occasionally latches the interrupt pin high on completion of a packet, but doesn't set the TXCPLT bit in the INTF register. The INTF register contains 0x00 as if no interrupt has occurred. Even waiting for a few milliseconds after the interrupt doesn't help. Work around this apparent erratum by instead checking the TXMTY bit in the STATF register ("TX FIFO empty"). We know that we've queued up a packet for transmission if priv->tx_len is nonzero. If the TX FIFO is empty, transmission of that packet must have completed. Note that this is congruent with our handling of received packets, which likewise gleans from the STATF register whether a packet is waiting in the RX FIFO, instead of looking at the INTF register. Cc: Mathias Duckeck Cc: Akshay Bhat Cc: Casey Fitzpatrick Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Lukas Wunner Acked-by: Akshay Bhat Signed-off-by: Marc Kleine-Budde drivers/net/can/spi/hi311x.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 5cec9425b41dcf834c3d48776900d6acb7e96f38 Author: Lukas Wunner Date: Wed May 9 14:38:43 2018 +0200 can: hi311x: Acquire SPI lock on ->do_get_berr_counter hi3110_get_berr_counter() may run concurrently to the rest of the driver but neglects to acquire the lock protecting access to the SPI device. As a result, it and the rest of the driver may clobber each other's tx and rx buffers. We became aware of this issue because transmission of packets with "cangen -g 0 -i -x" frequently hung. It turns out that agetty executes ->do_get_berr_counter every few seconds via the following call stack: CPU: 2 PID: 1605 Comm: agetty [<7f3f7500>] (hi3110_get_berr_counter [hi311x]) [<7f130204>] (can_fill_info [can_dev]) [<80693bc0>] (rtnl_fill_ifinfo) [<806949ec>] (rtnl_dump_ifinfo) [<806b4834>] (netlink_dump) [<806b4bc8>] (netlink_recvmsg) [<8065f180>] (sock_recvmsg) [<80660f90>] (___sys_recvmsg) [<80661e7c>] (__sys_recvmsg) [<80661ec0>] (SyS_recvmsg) [<80108b20>] (ret_fast_syscall+0x0/0x1c) agetty listens to netlink messages in order to update the login prompt when IP addresses change (if /etc/issue contains \4 or \6 escape codes): https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=e36deb6424e8 It's a useful feature, though it seems questionable that it causes CAN bit error statistics to be queried. Be that as it may, if hi3110_get_berr_counter() is invoked while a frame is sent by hi3110_hw_tx(), bogus SPI transfers like the following may occur: => 12 00 (hi3110_get_berr_counter() wanted to transmit EC 00 to query the transmit error counter, but the first byte was overwritten by hi3110_hw_tx_frame()) => EA 00 3E 80 01 FB (hi3110_hw_tx_frame() wanted to transmit a frame, but the first byte was overwritten by hi3110_get_berr_counter() because it wanted to query the receive error counter) This sequence hangs the transmission because the driver believes it has sent a frame and waits for the interrupt signaling completion, but in reality the chip has never sent away the frame since the commands it received were malformed. Fix by acquiring the SPI lock in hi3110_get_berr_counter(). I've scrutinized the entire driver for further unlocked SPI accesses but found no others. Cc: Mathias Duckeck Cc: Akshay Bhat Cc: Casey Fitzpatrick Cc: Stef Walter Cc: Karel Zak Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Lukas Wunner Reviewed-by: Akshay Bhat Signed-off-by: Marc Kleine-Budde drivers/net/can/spi/hi311x.c | 2 ++ 1 file changed, 2 insertions(+) commit 28700a36232ba61fb6ac59466821546cb25aec69 Author: Mike Snitzer Date: Thu May 10 11:18:49 2018 -0400 dm thin: update Documentation to clarify when "read_only" is valid Due to user confusion, clarify that it doesn't make sense to try to create a thin-pool with "read_only" mode enabled. Signed-off-by: Mike Snitzer Documentation/device-mapper/thin-provisioning.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cfcadfaad7251d8b640713724b388164d75465b2 Author: Rafael J. Wysocki Date: Wed May 9 00:18:32 2018 +0200 PCI / PM: Check device_may_wakeup() in pci_enable_wake() Commit 0847684cfc5f0 (PCI / PM: Simplify device wakeup settings code) went too far and dropped the device_may_wakeup() check from pci_enable_wake() which causes wakeup to be enabled during system suspend, hibernation or shutdown for some PCI devices that are not allowed by user space to wake up the system from sleep (or power off). As a result of this, excessive power is drawn by some of the affected systems while in sleep states or off. Restore the device_may_wakeup() check in pci_enable_wake(), but make sure that the PCI bus type's runtime suspend callback will not call device_may_wakeup() which is about system wakeup from sleep and not about device wakeup from runtime suspend. Fixes: 0847684cfc5f0 (PCI / PM: Simplify device wakeup settings code) Reported-by: Joseph Salisbury Cc: 4.13+ # 4.13+ Signed-off-by: Rafael J. Wysocki Acked-by: Bjorn Helgaas drivers/pci/pci.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) commit 8ba0f9bd3bdea1058c2b2676bec7905724418e40 Author: Sven Eckelmann Date: Wed May 9 21:07:40 2018 +0200 batman-adv: Avoid race in TT TVLV allocator helper The functions batadv_tt_prepare_tvlv_local_data and batadv_tt_prepare_tvlv_global_data are responsible for preparing a buffer which can be used to store the TVLV container for TT and add the VLAN information to it. This will be done in three phases: 1. count the number of VLANs and their entries 2. allocate the buffer using the counters from the previous step and limits from the caller (parameter tt_len) 3. insert the VLAN information to the buffer The step 1 and 3 operate on a list which contains the VLANs. The access to these lists must be protected with an appropriate lock or otherwise they might operate on on different entries. This could for example happen when another context is adding VLAN entries to this list. This could lead to a buffer overflow in these functions when enough entries were added between step 1 and 3 to the VLAN lists that the buffer room for the entries (*tt_change) is smaller then the now required extra buffer for new VLAN entries. Fixes: 7ea7b4a14275 ("batman-adv: make the TT CRC logic VLAN specific") Signed-off-by: Sven Eckelmann Acked-by: Antonio Quartulli Signed-off-by: Simon Wunderlich net/batman-adv/translation-table.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7fc6311b174091e3283c28381e58bed3d12b6591 Author: Rex Zhu Date: Thu May 10 19:51:09 2018 +0800 drm/amd/pp: Fix performance drop on Fiji The performance drop if the default TDP more than 256 Watt Reviewed-by: Alex Deucher Reviewed-by: Junwei Zhang Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 94f6a80c0c11828cb7b3d79294459dd8d761ca89 Author: Ying Xue Date: Tue May 8 21:44:06 2018 +0800 tipc: eliminate KMSAN uninit-value in strcmp complaint When we get link properties through netlink interface with tipc_nl_node_get_link(), we don't validate TIPC_NLA_LINK_NAME attribute at all, instead we directly use it. As a consequence, KMSAN detected the TIPC_NLA_LINK_NAME attribute was an uninitialized value, and then posted the following complaint: ================================================================== BUG: KMSAN: uninit-value in strcmp+0xf7/0x160 lib/string.c:329 CPU: 1 PID: 4527 Comm: syz-executor655 Not tainted 4.16.0+ #87 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:683 strcmp+0xf7/0x160 lib/string.c:329 tipc_nl_node_get_link+0x220/0x6f0 net/tipc/node.c:1881 genl_family_rcv_msg net/netlink/genetlink.c:599 [inline] genl_rcv_msg+0x1686/0x1810 net/netlink/genetlink.c:624 netlink_rcv_skb+0x378/0x600 net/netlink/af_netlink.c:2447 genl_rcv+0x63/0x80 net/netlink/genetlink.c:635 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x166b/0x1740 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x1048/0x1310 net/netlink/af_netlink.c:1900 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046 __sys_sendmsg net/socket.c:2080 [inline] SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091 SyS_sendmsg+0x54/0x80 net/socket.c:2087 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x445589 RSP: 002b:00007fb7ee66cdb8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000006dac24 RCX: 0000000000445589 RDX: 0000000000000000 RSI: 0000000020023000 RDI: 0000000000000003 RBP: 00000000006dac20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffa2bf3f3f R14: 00007fb7ee66d9c0 R15: 0000000000000001 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:188 kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:314 kmsan_slab_alloc+0x11/0x20 mm/kmsan/kmsan.c:321 slab_post_alloc_hook mm/slab.h:445 [inline] slab_alloc_node mm/slub.c:2737 [inline] __kmalloc_node_track_caller+0xaed/0x11c0 mm/slub.c:4369 __kmalloc_reserve net/core/skbuff.c:138 [inline] __alloc_skb+0x2cf/0x9f0 net/core/skbuff.c:206 alloc_skb include/linux/skbuff.h:984 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1183 [inline] netlink_sendmsg+0x9a6/0x1310 net/netlink/af_netlink.c:1875 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046 __sys_sendmsg net/socket.c:2080 [inline] SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091 SyS_sendmsg+0x54/0x80 net/socket.c:2087 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 ================================================================== To quiet the complaint, TIPC_NLA_LINK_NAME attribute has been validated in tipc_nl_node_get_link() before it's used. Reported-by: syzbot+df0257c92ffd4fcc58cd@syzkaller.appspotmail.com Signed-off-by: Ying Xue Signed-off-by: David S. Miller net/tipc/node.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 4a026da91caaa36004a53a844dd00959370ea8fc Author: Sun Lianwen Date: Tue May 8 09:49:38 2018 +0800 net/9p: correct some comment errors in 9p file system code There are follow comment errors: 1 The function name is wrong in p9_release_pages() comment. 2 The function name and variable name is wrong in p9_poll_workfn() comment. 3 There is no variable dm_mr and lkey in struct p9_trans_rdma. 4 The function name is wrong in rdma_create_trans() comment. 5 There is no variable initialized in struct virtio_chan. 6 The variable name is wrong in p9_virtio_zc_request() comment. Signed-off-by: Sun Lianwen Reviewed-by: Randy Dunlap Reviewed-by: Randy Dunlap Signed-off-by: David S. Miller net/9p/trans_common.c | 2 +- net/9p/trans_fd.c | 4 ++-- net/9p/trans_rdma.c | 4 +--- net/9p/trans_virtio.c | 5 ++--- 4 files changed, 6 insertions(+), 9 deletions(-) commit 06cb616b1bca7080824acfedb3d4c898e7a64836 Author: Alexander Monakov Date: Sat Apr 28 16:56:06 2018 +0300 i2c: designware: fix poll-after-enable regression Not all revisions of DW I2C controller implement the enable status register. On platforms where that's the case (e.g. BG2CD and SPEAr ARM SoCs), waiting for enable will time out as reading the unimplemented register yields zero. It was observed that reading the IC_ENABLE_STATUS register once suffices to avoid getting it stuck on Bay Trail hardware, so replace polling with one dummy read of the register. Fixes: fba4adbbf670 ("i2c: designware: must wait for enable") Signed-off-by: Alexander Monakov Tested-by: Ben Gardner Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/busses/i2c-designware-master.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fc218544fbc800d1c91348ec834cacfb257348f7 Author: Ilya Dryomov Date: Fri May 4 16:57:31 2018 +0200 ceph: fix iov_iter issues in ceph_direct_read_write() dio_get_pagev_size() and dio_get_pages_alloc() introduced in commit b5b98989dc7e ("ceph: combine as many iovec as possile into one OSD request") assume that the passed iov_iter is ITER_IOVEC. This isn't the case with splice where it ends up poking into the guts of ITER_BVEC or ITER_PIPE iterators, causing lockups and crashes easily reproduced with generic/095. Rather than trying to figure out gap alignment and stuff pages into a page vector, add a helper for going from iov_iter to a bio_vec array and make use of the new CEPH_OSD_DATA_TYPE_BVECS code. Fixes: b5b98989dc7e ("ceph: combine as many iovec as possile into one OSD request") Link: http://tracker.ceph.com/issues/18130 Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton Reviewed-by: "Yan, Zheng" Tested-by: Luis Henriques fs/ceph/file.c | 195 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 117 insertions(+), 78 deletions(-) commit 0010f7052d6cb71c4b120238e28cd3fa413913d1 Author: Ilya Dryomov Date: Fri May 4 16:57:30 2018 +0200 libceph: add osd_req_op_extent_osd_data_bvecs() ... and store num_bvecs for client code's convenience. Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton Reviewed-by: "Yan, Zheng" drivers/block/rbd.c | 4 +++- include/linux/ceph/osd_client.h | 12 ++++++++++-- net/ceph/osd_client.c | 27 +++++++++++++++++++++++---- 3 files changed, 36 insertions(+), 7 deletions(-) commit 3a15b38fd2efc1d648cb33186bf71e9138c93491 Author: Ilya Dryomov Date: Thu May 3 16:10:09 2018 +0200 ceph: fix rsize/wsize capping in ceph_direct_read_write() rsize/wsize cap should be applied before ceph_osdc_new_request() is called. Otherwise, if the size is limited by the cap instead of the stripe unit, ceph_osdc_new_request() would setup an extent op that is bigger than what dio_get_pages_alloc() would pin and add to the page vector, triggering asserts in the messenger. Cc: stable@vger.kernel.org Fixes: 95cca2b44e54 ("ceph: limit osd write size") Signed-off-by: Ilya Dryomov Reviewed-by: "Yan, Zheng" fs/ceph/file.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3057fcef385348fe85173f1b0c824d89f1176f72 Author: Boris Brezillon Date: Fri May 4 21:24:31 2018 +0200 mtd: rawnand: Make sure we wait tWB before polling the STATUS reg NAND chips require a bit of time to take the NAND operation into account and set the BUSY bit in the STATUS reg. Make sure we don't poll the STATUS reg too early in nand_soft_waitrdy(). Fixes: 8878b126df76 ("mtd: nand: add ->exec_op() implementation") Cc: Signed-off-by: Boris Brezillon Acked-by: Miquel Raynal drivers/mtd/nand/raw/nand_base.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7c2b134110a6af3bfe574efdb23ee04c047dc311 Merge: 5c0e0b4 352672d Author: Dave Airlie Date: Thu May 10 13:48:52 2018 +1000 Merge branch 'linux-4.17' of git://github.com/skeggsb/linux into drm-fixes Two nouveau crasher/deadlock fixes. * 'linux-4.17' of git://github.com/skeggsb/linux: drm/nouveau: Fix deadlock in nv50_mstm_register_connector() drm/nouveau/ttm: don't dereference nvbo::cli, it can outlive client commit 352672db857290ab5b0e2b6a99c414f92bee024c Author: Lyude Paul Date: Wed May 2 19:38:48 2018 -0400 drm/nouveau: Fix deadlock in nv50_mstm_register_connector() Currently; we're grabbing all of the modesetting locks before adding MST connectors to fbdev. This isn't actually necessary, and causes a deadlock as well: ====================================================== WARNING: possible circular locking dependency detected 4.17.0-rc3Lyude-Test+ #1 Tainted: G O ------------------------------------------------------ kworker/1:0/18 is trying to acquire lock: 00000000c832f62d (&helper->lock){+.+.}, at: drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper] but task is already holding lock: 00000000942e28e2 (crtc_ww_class_mutex){+.+.}, at: drm_modeset_backoff+0x8e/0x1c0 [drm] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (crtc_ww_class_mutex){+.+.}: ww_mutex_lock+0x43/0x80 drm_modeset_lock+0x71/0x130 [drm] drm_helper_probe_single_connector_modes+0x7d/0x6b0 [drm_kms_helper] drm_setup_crtcs+0x15e/0xc90 [drm_kms_helper] __drm_fb_helper_initial_config_and_unlock+0x29/0x480 [drm_kms_helper] nouveau_fbcon_init+0x138/0x1a0 [nouveau] nouveau_drm_load+0x173/0x7e0 [nouveau] drm_dev_register+0x134/0x1c0 [drm] drm_get_pci_dev+0x8e/0x160 [drm] nouveau_drm_probe+0x1a9/0x230 [nouveau] pci_device_probe+0xcd/0x150 driver_probe_device+0x30b/0x480 __driver_attach+0xbc/0xe0 bus_for_each_dev+0x67/0x90 bus_add_driver+0x164/0x260 driver_register+0x57/0xc0 do_one_initcall+0x4d/0x323 do_init_module+0x5b/0x1f8 load_module+0x20e5/0x2ac0 __do_sys_finit_module+0xb7/0xd0 do_syscall_64+0x60/0x1b0 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #2 (crtc_ww_class_acquire){+.+.}: drm_helper_probe_single_connector_modes+0x58/0x6b0 [drm_kms_helper] drm_setup_crtcs+0x15e/0xc90 [drm_kms_helper] __drm_fb_helper_initial_config_and_unlock+0x29/0x480 [drm_kms_helper] nouveau_fbcon_init+0x138/0x1a0 [nouveau] nouveau_drm_load+0x173/0x7e0 [nouveau] drm_dev_register+0x134/0x1c0 [drm] drm_get_pci_dev+0x8e/0x160 [drm] nouveau_drm_probe+0x1a9/0x230 [nouveau] pci_device_probe+0xcd/0x150 driver_probe_device+0x30b/0x480 __driver_attach+0xbc/0xe0 bus_for_each_dev+0x67/0x90 bus_add_driver+0x164/0x260 driver_register+0x57/0xc0 do_one_initcall+0x4d/0x323 do_init_module+0x5b/0x1f8 load_module+0x20e5/0x2ac0 __do_sys_finit_module+0xb7/0xd0 do_syscall_64+0x60/0x1b0 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #1 (&dev->mode_config.mutex){+.+.}: drm_setup_crtcs+0x10c/0xc90 [drm_kms_helper] __drm_fb_helper_initial_config_and_unlock+0x29/0x480 [drm_kms_helper] nouveau_fbcon_init+0x138/0x1a0 [nouveau] nouveau_drm_load+0x173/0x7e0 [nouveau] drm_dev_register+0x134/0x1c0 [drm] drm_get_pci_dev+0x8e/0x160 [drm] nouveau_drm_probe+0x1a9/0x230 [nouveau] pci_device_probe+0xcd/0x150 driver_probe_device+0x30b/0x480 __driver_attach+0xbc/0xe0 bus_for_each_dev+0x67/0x90 bus_add_driver+0x164/0x260 driver_register+0x57/0xc0 do_one_initcall+0x4d/0x323 do_init_module+0x5b/0x1f8 load_module+0x20e5/0x2ac0 __do_sys_finit_module+0xb7/0xd0 do_syscall_64+0x60/0x1b0 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&helper->lock){+.+.}: __mutex_lock+0x70/0x9d0 drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper] nv50_mstm_register_connector+0x2c/0x50 [nouveau] drm_dp_add_port+0x2f5/0x420 [drm_kms_helper] drm_dp_send_link_address+0x155/0x1e0 [drm_kms_helper] drm_dp_add_port+0x33f/0x420 [drm_kms_helper] drm_dp_send_link_address+0x155/0x1e0 [drm_kms_helper] drm_dp_check_and_send_link_address+0x87/0xd0 [drm_kms_helper] drm_dp_mst_link_probe_work+0x4d/0x80 [drm_kms_helper] process_one_work+0x20d/0x650 worker_thread+0x3a/0x390 kthread+0x11e/0x140 ret_from_fork+0x3a/0x50 other info that might help us debug this: Chain exists of: &helper->lock --> crtc_ww_class_acquire --> crtc_ww_class_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(crtc_ww_class_mutex); lock(crtc_ww_class_acquire); lock(crtc_ww_class_mutex); lock(&helper->lock); *** DEADLOCK *** 5 locks held by kworker/1:0/18: #0: 000000004a05cd50 ((wq_completion)"events_long"){+.+.}, at: process_one_work+0x187/0x650 #1: 00000000601c11d1 ((work_completion)(&mgr->work)){+.+.}, at: process_one_work+0x187/0x650 #2: 00000000586ca0df (&dev->mode_config.mutex){+.+.}, at: drm_modeset_lock_all+0x3a/0x1b0 [drm] #3: 00000000d3ca0ffa (crtc_ww_class_acquire){+.+.}, at: drm_modeset_lock_all+0x44/0x1b0 [drm] #4: 00000000942e28e2 (crtc_ww_class_mutex){+.+.}, at: drm_modeset_backoff+0x8e/0x1c0 [drm] stack backtrace: CPU: 1 PID: 18 Comm: kworker/1:0 Tainted: G O 4.17.0-rc3Lyude-Test+ #1 Hardware name: Gateway FX6840/FX6840, BIOS P01-A3 05/17/2010 Workqueue: events_long drm_dp_mst_link_probe_work [drm_kms_helper] Call Trace: dump_stack+0x85/0xcb print_circular_bug.isra.38+0x1ce/0x1db __lock_acquire+0x128f/0x1350 ? lock_acquire+0x9f/0x200 ? lock_acquire+0x9f/0x200 ? __ww_mutex_lock.constprop.13+0x8f/0x1000 lock_acquire+0x9f/0x200 ? drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper] ? drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper] __mutex_lock+0x70/0x9d0 ? drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper] ? ww_mutex_lock+0x43/0x80 ? _cond_resched+0x15/0x30 ? ww_mutex_lock+0x43/0x80 ? drm_modeset_lock+0xb2/0x130 [drm] ? drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper] drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper] nv50_mstm_register_connector+0x2c/0x50 [nouveau] drm_dp_add_port+0x2f5/0x420 [drm_kms_helper] ? mark_held_locks+0x50/0x80 ? kfree+0xcf/0x2a0 ? drm_dp_check_mstb_guid+0xd6/0x120 [drm_kms_helper] ? trace_hardirqs_on_caller+0xed/0x180 ? drm_dp_check_mstb_guid+0xd6/0x120 [drm_kms_helper] drm_dp_send_link_address+0x155/0x1e0 [drm_kms_helper] drm_dp_add_port+0x33f/0x420 [drm_kms_helper] ? nouveau_connector_aux_xfer+0x7c/0xb0 [nouveau] ? find_held_lock+0x2d/0x90 ? drm_dp_dpcd_access+0xd9/0xf0 [drm_kms_helper] ? __mutex_unlock_slowpath+0x3b/0x280 ? drm_dp_dpcd_access+0xd9/0xf0 [drm_kms_helper] drm_dp_send_link_address+0x155/0x1e0 [drm_kms_helper] drm_dp_check_and_send_link_address+0x87/0xd0 [drm_kms_helper] drm_dp_mst_link_probe_work+0x4d/0x80 [drm_kms_helper] process_one_work+0x20d/0x650 worker_thread+0x3a/0x390 ? process_one_work+0x650/0x650 kthread+0x11e/0x140 ? kthread_create_worker_on_cpu+0x50/0x50 ret_from_fork+0x3a/0x50 Taking example from i915, the only time we need to hold any modesetting locks is when changing the port on the mstc, and in that case we only need to hold the connection mutex. Signed-off-by: Lyude Paul Cc: Karol Herbst Cc: stable@vger.kernel.org Signed-off-by: Lyude Paul Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 0d5a03c3d9254813ca76d7886ff9ed76a0aea545 Author: Ben Skeggs Date: Tue May 8 20:39:47 2018 +1000 drm/nouveau/ttm: don't dereference nvbo::cli, it can outlive client Potentially responsible for some random OOPSes. Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org [v4.15+] drivers/gpu/drm/nouveau/nouveau_bo.c | 1 - drivers/gpu/drm/nouveau/nouveau_bo.h | 2 -- drivers/gpu/drm/nouveau/nouveau_ttm.c | 6 +++--- 3 files changed, 3 insertions(+), 6 deletions(-) commit 5c0e0b45c4936295d6333dd7961d0b89b15b070d Merge: 44ef02c 639f790 Author: Dave Airlie Date: Thu May 10 11:28:46 2018 +1000 Merge branch 'drm-fixes-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-fixes A little bigger than normal since this is two weeks of fixes. - Atom firmware table updates for vega12 - Fix fallout from huge page support - Fix up smu7 power profile interface to be consistent with vega - Misc other fixes * 'drm-fixes-4.17' of git://people.freedesktop.org/~agd5f/linux: drm/amd/pp: Refine the output of pp_power_profile_mode on VI drm/amdgpu: Switch to interruptable wait to recover from ring hang. drm/ttm: Use GFP_TRANSHUGE_LIGHT for allocating huge pages drm/amd/display: Use kvzalloc for potentially large allocations drm/amd/display: Don't return ddc result and read_bytes in same return value drm/amd/display: Add get_firmware_info_v3_2 for VG12 drm/amd: Add BIOS smu_info v3_3 required struct def. drm/amd/display: Add VG12 ASIC IDs commit 44ef02c241e7c99af77b408d52af708aa159e968 Merge: 03a0a3e 9a0e980 Author: Dave Airlie Date: Thu May 10 11:28:27 2018 +1000 Merge tag 'drm-misc-fixes-2018-05-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes atomic: Clear state pointers on clear (Ville) vc4: Fix oops in dpi disable (Eric) omap: Various error-checking + uninitialized var fixes (Tomi) Cc: Ville Syrjälä Cc: Eric Anholt Cc: Tomi Valkeinen * tag 'drm-misc-fixes-2018-05-09' of git://anongit.freedesktop.org/drm/drm-misc: drm/vc4: Fix scaling of uni-planar formats drm/bridge/sii8620: add Kconfig dependency on extcon drm/omap: handle alloc failures in omap_connector drm/omap: add missing linefeeds to prints drm/omap: handle error if scale coefs are not found drm/omap: check return value from soc_device_match drm/omap: fix possible NULL ref issue in tiler_reserve_2d drm/omap: fix uninitialized ret variable drm/omap: silence unititialized variable warning drm/vc4: Fix oops dereferencing DPI's connector since panel_bridge. drm/atomic: Clean private obj old_state/new_state in drm_atomic_state_default_clear() drm/atomic: Clean old_state/new_state in drm_atomic_state_default_clear() commit 03a0a3e572dc05f266672e0e72c7f47aee96db8d Merge: 87bf742 e8f48f9 Author: Dave Airlie Date: Thu May 10 11:27:47 2018 +1000 Merge tag 'drm-intel-fixes-2018-05-09' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Increase LVDS panel timeout to 5s to avoid spurious *ERROR* - Fix 2 WARNS: BIOS framebuffer related (FDO #105992) and eDP cdclk mismatch * tag 'drm-intel-fixes-2018-05-09' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915: Fix drm:intel_enable_lvds ERROR message in kernel log drm/i915: Correctly populate user mode h/vdisplay with pipe src size during readout drm/i915: Adjust eDP's logical vco in a reliable place. commit 87bf742b080f4f23e5005e24db4c99c23715a780 Merge: dec60f3 6f2db7d Author: Dave Airlie Date: Thu May 10 11:27:04 2018 +1000 Merge tag 'exynos-drm-fixes-for-v4.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Fixup pagefault issue of mixer driver - it makes sure to check shadow register for interlace scan. - it corrects chroma_addr[1], height and vertical position values. And trivial cleanup - it just removes duplicated drm_bridge_attach. * tag 'exynos-drm-fixes-for-v4.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: hdmi: avoid duplicating drm_bridge_attach drm/exynos: mixer: avoid Oops in vp_video_buffer() drm/exynos/mixer: fix synchronization check in interlaced mode commit dec60f3a9b7251f2657d743d96ba9a83dca02351 Author: Mathieu Malaterre Date: Sat May 5 21:54:05 2018 +0200 agp: uninorth: make two functions static Both ‘uninorth_remove_memory’ and ‘null_cache_flush’ can be made static. So make them. Silence the following gcc warning (W=1): drivers/char/agp/uninorth-agp.c:198:5: warning: no previous prototype for ‘uninorth_remove_memory’ [-Wmissing-prototypes] and drivers/char/agp/uninorth-agp.c:473:6: warning: no previous prototype for ‘null_cache_flush’ [-Wmissing-prototypes] Signed-off-by: Mathieu Malaterre Signed-off-by: Dave Airlie drivers/char/agp/uninorth-agp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 008464a9360e31b14677457dcd976fbf9dd58e2e Merge: 036db8b 070b963 Author: Linus Torvalds Date: Wed May 9 10:49:52 2018 -1000 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: - quirk for Toshiba Click Mini L9W-B, from Hans de Goede - intel-ish-hid and wacom error handling (device freeing) path fixes from Arvind Yadav - memory corruption fix in intel-ish-hid driver from Hans de Goede - a few new device ID additions to hid-lenovo from Peter Ganzhorn * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: i2c-hid: Add RESEND_REPORT_DESCR quirk for Toshiba Click Mini L9W-B HID: intel-ish-hid: use put_device() instead of kfree() HID: intel_ish-hid: Stop using a static local buffer in get_report() HID: intel_ish-hid: Move header size check to inside the loop HID: wacom: Release device resource data obtained by devres_alloc() HID: lenovo: Add support for IBM/Lenovo Scrollpoint mice commit 639f790223e62339b9cb7319ea3fae9e02c39bdb Author: Rex Zhu Date: Mon May 7 14:23:04 2018 +0800 drm/amd/pp: Refine the output of pp_power_profile_mode on VI In order to keep consist with Vega, the output format of the pp_power_profile_mode would be < “*” for current profile>:"detail settings" and remove the "CURRENT" mode line. for example: NUM MODE_NAME SCLK_UP_HYST SCLK_DOWN_HYST SCLK_ACTIVE_LEVEL MCLK_UP_HYST MCLK_DOWN_HYST MCLK_ACTIVE_LEVEL 0 3D_FULL_SCREEN: 0 100 30 0 100 10 1 POWER_SAVING: 10 0 30 - - - 2 VIDEO: - - - 10 16 31 3 VR: 0 11 50 0 100 10 4 COMPUTE: 0 5 30 - - - 5 CUSTOM *: 0 5 30 0 100 10 NUM MODE_NAME SCLK_UP_HYST SCLK_DOWN_HYST SCLK_ACTIVE_LEVEL MCLK_UP_HYST MCLK_DOWN_HYST MCLK_ACTIVE_LEVEL 0 3D_FULL_SCREEN: 0 100 30 0 100 10 1 POWER_SAVING *: 10 0 30 0 100 10 2 VIDEO: - - - 10 16 31 3 VR: 0 11 50 0 100 10 4 COMPUTE: 0 5 30 - - - 5 CUSTOM: - - - - - - Reviewed-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 52 +++++++++++------------- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.h | 1 - 2 files changed, 23 insertions(+), 30 deletions(-) commit e6a5b9f9aee145c2f2c24431d84edfbb0d49eea5 Author: Andrey Grodzovsky Date: Mon Apr 30 10:04:42 2018 -0400 drm/amdgpu: Switch to interruptable wait to recover from ring hang. v2: Use dma_fence_wait instead of dma_fence_wait_timeout(...,MAX_SCHEDULE_TIMEOUT) Avoid printing error message for ERESTARTSYS Originally-by: David Panariti Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit da291320baec914f0bb4e65a9dccb86bd6c728f2 Author: Michel Dänzer Date: Wed Apr 25 17:32:10 2018 +0200 drm/ttm: Use GFP_TRANSHUGE_LIGHT for allocating huge pages GFP_TRANSHUGE tries very hard to allocate huge pages, which can result in long delays with high memory pressure. I have observed firefox freezing for up to around a minute due to this while restic was taking a full system backup. Since we don't really need huge pages, use GFP_TRANSHUGE_LIGHT | __GFP_NORETRY instead, in order to fail quickly when there are no huge pages available. Set __GFP_KSWAPD_RECLAIM as well, in order for huge pages to be freed up in the background if necessary. With these changes, I'm no longer seeing freezes during a restic backup. Cc: stable@vger.kernel.org Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 ++++++++--- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) commit bd4caed47a19f25fe8674344ea06d469c27ac314 Author: Michel Dänzer Date: Tue Apr 17 12:25:22 2018 +0200 drm/amd/display: Use kvzalloc for potentially large allocations Allocating up to 32 physically contiguous pages can easily fail (and has failed for me), and isn't necessary anyway. Reviewed-by: Harry Wentland Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 14 ++--- .../drm/amd/display/modules/color/color_gamma.c | 72 ++++++++++++---------- 2 files changed, 45 insertions(+), 41 deletions(-) commit 018d82e5f02ef3583411bcaa4e00c69786f46f19 Author: Harry Wentland Date: Tue Apr 24 10:49:20 2018 -0400 drm/amd/display: Don't return ddc result and read_bytes in same return value The two ranges overlap. Signed-off-by: Harry Wentland Acked-by: Alex Deucher Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 20 ++++++++++++-------- drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 10 +++++++--- drivers/gpu/drm/amd/display/dc/inc/dc_link_ddc.h | 5 +++-- 3 files changed, 22 insertions(+), 13 deletions(-) commit 6e65fb862064663ad3a08f964af1e8f3f2abf688 Author: Harry Wentland Date: Fri Apr 20 10:56:18 2018 -0400 drm/amd/display: Add get_firmware_info_v3_2 for VG12 Signed-off-by: Harry Wentland Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 86 +++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) commit 60a5205fb5f3da3907b8b53561571a790e7b1e70 Author: Jerry (Fangzhi) Zuo Date: Mon Mar 5 14:59:57 2018 -0500 drm/amd: Add BIOS smu_info v3_3 required struct def. Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/atomfirmware.h | 170 ++++++++++++++++++++++++++++- 1 file changed, 168 insertions(+), 2 deletions(-) commit c5191133405ac317d20d23c8510416e18842031d Author: Harry Wentland Date: Fri Apr 20 11:05:07 2018 -0400 drm/amd/display: Add VG12 ASIC IDs Signed-off-by: Harry Wentland Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/include/dal_asic_id.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit dd0792699c4058e63c0715d9a7c2d40226fcdddc Author: Borislav Petkov Date: Tue May 8 15:43:45 2018 +0200 Documentation/spec_ctrl: Do some minor cleanups Fix some typos, improve formulations, end sentences with a fullstop. Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Documentation/userspace-api/spec_ctrl.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit e96f46ee8587607a828f783daa6eb5b44d25004d Author: Konrad Rzeszutek Wilk Date: Wed May 9 21:41:38 2018 +0200 proc: Use underscores for SSBD in 'status' The style for the 'status' file is CamelCase or this. _. Fixes: fae1fa0fc ("proc: Provide details on speculation flaw mitigations") Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner fs/proc/array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f65fb29374ee37856dbad847b4e121aab72b510 Author: Konrad Rzeszutek Wilk Date: Wed May 9 21:41:38 2018 +0200 x86/bugs: Rename _RDS to _SSBD Intel collateral will reference the SSB mitigation bit in IA32_SPEC_CTL[2] as SSBD (Speculative Store Bypass Disable). Hence changing it. It is unclear yet what the MSR_IA32_ARCH_CAPABILITIES (0x10a) Bit(4) name is going to be. Following the rename it would be SSBD_NO but that rolls out to Speculative Store Bypass Disable No. Also fixed the missing space in X86_FEATURE_AMD_SSBD. [ tglx: Fixup x86_amd_rds_enable() and rds_tif_to_amd_ls_cfg() as well ] Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner arch/x86/include/asm/cpufeatures.h | 4 ++-- arch/x86/include/asm/msr-index.h | 10 +++++----- arch/x86/include/asm/spec-ctrl.h | 12 ++++++------ arch/x86/include/asm/thread_info.h | 6 +++--- arch/x86/kernel/cpu/amd.c | 14 +++++++------- arch/x86/kernel/cpu/bugs.c | 36 ++++++++++++++++++------------------ arch/x86/kernel/cpu/common.c | 2 +- arch/x86/kernel/cpu/intel.c | 2 +- arch/x86/kernel/process.c | 8 ++++---- arch/x86/kvm/cpuid.c | 2 +- arch/x86/kvm/vmx.c | 6 +++--- 11 files changed, 51 insertions(+), 51 deletions(-) commit ae2cd7fb478b8da707906ee1706ae1379968a8f9 Author: Paulo Alcantara Date: Fri May 4 11:25:26 2018 -0300 cifs: smb2ops: Fix listxattr() when there are no EAs As per listxattr(2): On success, a nonnegative number is returned indicating the size of the extended attribute name list. On failure, -1 is returned and errno is set appropriately. In SMB1, when the server returns an empty EA list through a listxattr(), it will correctly return 0 as there are no EAs for the given file. However, in SMB2+, it returns -ENODATA in listxattr() which is wrong since the request and response were sent successfully, although there's no actual EA for the given file. This patch fixes listxattr() for SMB2+ by returning 0 in cifs_listxattr() when the server returns an empty list of EAs. Signed-off-by: Paulo Alcantara Reviewed-by: Aurelien Aptel Signed-off-by: Steve French fs/cifs/smb2ops.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f7c439668a291ca94f358e44d3a3e9f2a2524b8a Author: Long Li Date: Wed Apr 25 11:30:05 2018 -0700 cifs: smbd: Enable signing with smbdirect Now signing is supported with RDMA transport. Remove the code that disabled it. Signed-off-by: Long Li Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg fs/cifs/connect.c | 8 -------- fs/cifs/smb2pdu.c | 5 ----- 2 files changed, 13 deletions(-) commit 2796d303e3c5ec213c578ed3a66872205c126eb8 Author: Long Li Date: Wed Apr 25 11:30:04 2018 -0700 cifs: Allocate validate negotiation request through kmalloc The data buffer allocated on the stack can't be DMA'ed, ib_dma_map_page will return an invalid DMA address for a buffer on stack. Even worse, this incorrect address can't be detected by ib_dma_mapping_error. Sending data from this address to hardware will not fail, but the remote peer will get junk data. Fix this by allocating the request on the heap in smb3_validate_negotiate. Changes in v2: Removed duplicated code on freeing buffers on function exit. (Thanks to Parav Pandit ) Fixed typo in the patch title. Changes in v3: Added "Fixes" to the patch. Changed several sizeof() to use *pointer in place of struct. Changes in v4: Added detailed comments on the failure through RDMA. Allocate request buffer using GPF_NOFS. Fixed possible memory leak. Changes in v5: Removed variable ret for checking return value. Changed to use pneg_inbuf->Dialects[0] to calculate unused space in pneg_inbuf. Fixes: ff1c038addc4 ("Check SMB3 dialects against downgrade attacks") Signed-off-by: Long Li Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg Reviewed-by: Tom Talpey fs/cifs/smb2pdu.c | 68 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 30 deletions(-) commit 26aeb9daa02cd37178321cf915efd3d5eb8b0511 Author: Jakub Kicinski Date: Tue May 8 19:42:40 2018 -0700 nfp: bpf: allow zero-length capabilities Some BPF capabilities carry no value, they simply indicate feature is present. Our capability parsing loop will exit early if last capability is zero-length because it's looking for more than 8 bytes of data (8B is our TLV header length). Allow the last capability to be zero-length. This bug would lead to driver failing to probe with the following error if the last capability FW advertises is zero-length: nfp: BPF capabilities left after parsing, parsed:92 total length:100 nfp: invalid BPF capabilities at offset:92 Note the "parsed" and "length" values are 8 apart. No shipping FW runs into this issue, but we can't guarantee that will remain the case. Fixes: 77a844ee650c ("nfp: bpf: prepare for parsing BPF FW capabilities") Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: Daniel Borkmann drivers/net/ethernet/netronome/nfp/bpf/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c0330208f6bfe5285bae239fdb2a7ec1ce1f78d Merge: 7781eda 76aa3de Author: Wolfram Sang Date: Wed May 9 17:40:44 2018 +0200 Merge tag 'at24-4.17-rc5-fixes-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-current Single bug-fix for a regression introduced during the 4.17 merge window. commit 76aa3de7095f15af7300012cb29ea8ab93eec348 Author: Bartosz Golaszewski Date: Mon May 7 12:08:37 2018 +0200 eeprom: at24: fix retrieving the at24_chip_data structure Commit feb2f19b1e8f ("eeprom: at24: move platform data processing into a separate routine") introduced a bug where we incorrectly retireve the at24_chip_data structure. Remove the unnecessary ampersand operator. Fixes: feb2f19b1e8f ("eeprom: at24: move platform data processing into a separate routine") Reported-by: Vadim Pasternak Signed-off-by: Bartosz Golaszewski drivers/misc/eeprom/at24.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d569b1cf7a2a385770835df15f77dde587b58a3 Merge: 6da6c0d 76974ef Author: Greg Kroah-Hartman Date: Wed May 9 17:08:29 2018 +0200 Merge tag 'iio-fixes-for-4.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First round of IIO fixes for the 4.17 cycle. * core - fix up some issues with overflow etc around wrong types for some fo the kfifo handling functions. Seems unlikely this would be triggered in reality but the fixes are simple so let's tidy them up. Second patch deals with checking the userspace value passed for length for potential overflow. * ad7793 - Catch up with changes to the ad_sigma_delta core and use read_raw / write_raw iwth IIO_CHAN_INFO_SAMP_FEW to handle sampling frequency control. * at91-sama5d2 - Channel config for differential channels was completely broken. - Missing Kconfig dependency for buffer support. * hid-sensor - Fix an issue with powering up after resume due to wrong reference counting. * stm32-dfsdm - Fix an issue with second writes of the oversampling settings failing. - Fix an issue with the sample rate being set to half of requested value when particular clock source is used. commit 3d69191086fc87f202c79eb8873b9c82c2bb065a Author: Christophe Jaillet Date: Tue May 8 07:44:27 2018 +0200 iw_cxgb4: Fix an error handling path in 'c4iw_get_dma_mr()' The error handling path of 'c4iw_get_dma_mr()' does not free resources in the correct order. If an error occures, it can leak 'mhp->wr_waitp'. Fixes: a3f12da0e99a ("iw_cxgb4: allocate wait object for each memory object") Signed-off-by: Christophe JAILLET Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 43731753c4b7d832775cf6b2301dd0447a5a1851 Author: Andrew Boyer Date: Mon May 7 13:23:38 2018 -0400 RDMA/i40iw: Avoid panic when reading back the IRQ affinity hint The current code sets an affinity hint with a cpumask_t stored on the stack. This value can then be accessed through /proc/irq/*/affinity_hint/, causing a segfault or returning corrupt data. Move the cpumask_t into struct i40iw_msix_vector so it is available later. Backtrace: BUG: unable to handle kernel paging request at ffffb16e600e7c90 IP: irq_affinity_hint_proc_show+0x60/0xf0 PGD 17c0c6d067 PUD 17c0c6e067 PMD 15d4a0e067 PTE 0 Oops: 0000 [#1] SMP Modules linked in: ... CPU: 3 PID: 172543 Comm: grep Tainted: G OE ... #1 Hardware name: ... task: ffff9a5caee08000 task.stack: ffffb16e659d8000 RIP: 0010:irq_affinity_hint_proc_show+0x60/0xf0 RSP: 0018:ffffb16e659dbd20 EFLAGS: 00010086 RAX: 0000000000000246 RBX: ffffb16e659dbd20 RCX: 0000000000000000 RDX: ffffb16e600e7c90 RSI: 0000000000000003 RDI: 0000000000000046 RBP: ffffb16e659dbd88 R08: 0000000000000038 R09: 0000000000000001 R10: 0000000070803079 R11: 0000000000000000 R12: ffff9a59d1d97a00 R13: ffff9a5da47a6cd8 R14: ffff9a5da47a6c00 R15: ffff9a59d1d97a00 FS: 00007f946c31d740(0000) GS:ffff9a5dc1800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffb16e600e7c90 CR3: 00000016a4339000 CR4: 00000000007406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: seq_read+0x12d/0x430 ? sched_clock_cpu+0x11/0xb0 proc_reg_read+0x48/0x70 __vfs_read+0x37/0x140 ? security_file_permission+0xa0/0xc0 vfs_read+0x96/0x140 SyS_read+0x58/0xc0 do_syscall_64+0x5a/0x190 entry_SYSCALL64_slow_path+0x25/0x25 RIP: 0033:0x7f946bbc97e0 RSP: 002b:00007ffdd0c4ae08 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 000000000096b000 RCX: 00007f946bbc97e0 RDX: 000000000096b000 RSI: 00007f946a2f0000 RDI: 0000000000000004 RBP: 0000000000001000 R08: 00007f946a2ef011 R09: 000000000000000a R10: 0000000000001000 R11: 0000000000000246 R12: 00007f946a2f0000 R13: 0000000000000004 R14: 0000000000000000 R15: 00007f946a2f0000 Code: b9 08 00 00 00 49 89 c6 48 89 df 31 c0 4d 8d ae d8 00 00 00 f3 48 ab 4c 89 ef e8 6c 9a 56 00 49 8b 96 30 01 00 00 48 85 d2 74 3f <48> 8b 0a 48 89 4d 98 48 8b 4a 08 48 89 4d a0 48 8b 4a 10 48 89 RIP: irq_affinity_hint_proc_show+0x60/0xf0 RSP: ffffb16e659dbd20 CR2: ffffb16e600e7c90 Fixes: 8e06af711bf2 ("i40iw: add main, hdr, status") Signed-off-by: Andrew Boyer Reviewed-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw.h | 1 + drivers/infiniband/hw/i40iw/i40iw_main.c | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) commit 9f7b16afab9b47de471f4ef6a0c6c337f0a53566 Author: Andrew Boyer Date: Mon May 7 13:23:37 2018 -0400 RDMA/i40iw: Avoid reference leaks when processing the AEQ In this switch there is a reference held on the QP. 'continue' will grab the next event without releasing the reference, causing a leak. Change it to 'break' to drop the reference before grabbing the next event. Fixes: 4e9042e647ff ("i40iw: add hw and utils files") Signed-off-by: Andrew Boyer Reviewed-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a75895b1ebd944a7873cbf76d30de8720955f8b3 Author: Andrew Boyer Date: Mon May 7 13:23:36 2018 -0400 RDMA/i40iw: Avoid panic when objects are being created and destroyed A panic occurs when there is a newly-registered element on the QP/CQ MR list waiting to be attached, but a different MR is deregistered. The current code only checks for whether the list is empty, not whether the element being deregistered is actually on the list. Fix the panic by adding a boolean to track if the object is on the list. Fixes: d37498417947 ("i40iw: add files for iwarp interface") Signed-off-by: Andrew Boyer Reviewed-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_verbs.c | 11 +++++++++-- drivers/infiniband/hw/i40iw/i40iw_verbs.h | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) commit a0403be8af338c319b5176c1d2975d94a930a0bf Author: oulijun Date: Fri May 4 10:57:13 2018 +0800 RDMA/hns: Fix the bug with NULL pointer When the last QP of eight QPs is not exist in hns_roce_v1_mr_free_work_fn function, the print for qpn of hr_qp may introduce a calltrace for NULL pointer. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79d442071a733057e4d9f28c90fbdb4f39d9fc23 Author: oulijun Date: Fri May 4 10:57:12 2018 +0800 RDMA/hns: Set NULL for __internal_mr This patch mainly configure value for __internal_mr of mr_free_pd. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 + 1 file changed, 1 insertion(+) commit 85e0274dc66430b0d0fad7ad01cbc0e0cbebf6dc Author: oulijun Date: Fri May 4 10:57:11 2018 +0800 RDMA/hns: Enable inner_pa_vld filed of mpt When enabled inner_pa_vld field of mpt, The pa0 and pa1 will be valid and the hardware will use it directly and not use base address of pbl. As a result, it can reduce the delay. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 ++ 1 file changed, 2 insertions(+) commit 90e7a4d5066240b75cdfd1bf8944ca36622153b1 Author: oulijun Date: Fri May 4 10:57:10 2018 +0800 RDMA/hns: Set desc_dma_addr for zero when free cmq desc In order to avoid illegal use for desc_dma_addr of ring, it needs to set it zero when free cmq desc. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 ++ 1 file changed, 2 insertions(+) commit 778cc5a8b75eee62d330059a2655b515cda43278 Author: oulijun Date: Fri May 4 10:57:09 2018 +0800 RDMA/hns: Fix the bug with rq sge When received multiply rq sge, it should tag the invalid lkey for the last non-zero length sge when have some sges' length are zero. This patch fixes it. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 391bd5fc7de54a5cb866e8897d60ee1d76b8840a Author: oulijun Date: Fri May 4 10:57:08 2018 +0800 RDMA/hns: Not support qp transition from reset to reset for hip06 Because hip06 hardware is not support for qp transition from reset to reset state, it need to return errno when qp transited from reset to reset. This patch fixes it. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_qp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 2349fdd483ea933b223f3eca53ed42835383d316 Author: oulijun Date: Fri May 4 10:57:07 2018 +0800 RDMA/hns: Add return operation when configured global param fail When configure global param function run fail, it should directly return and the initial flow will stop. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 + 1 file changed, 1 insertion(+) commit ad18e20ba2887e221e903d311f4c9a1586eacffb Author: oulijun Date: Fri May 4 10:57:06 2018 +0800 RDMA/hns: Update convert function of endian format Because the sys_image_guid of ib_device_attr structure is __be64, it need to use cpu_to_be64 for converting. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f97a62c39423575c62649721657e5cc04f67c0ac Author: oulijun Date: Fri May 4 10:57:05 2018 +0800 RDMA/hns: Load the RoCE dirver automatically To enable the linux-kernel system to load the hns-roce-hw-v2 driver automatically when hns-roce-hw-v2 is plugged in pci bus, it need to create a MODULE_DEVICE_TABLE for expose the pci_table of hns-roce-hw-v2 to user. Signed-off-by: Lijun Ou Reported-by: Zhou Wang Tested-by: Xiaojun Tan Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 ++ 1 file changed, 2 insertions(+) commit 3a39bbecc88fa9a99a80de588c8f1fe16aba3446 Author: oulijun Date: Fri May 4 10:57:04 2018 +0800 RDMA/hns: Bugfix for rq record db for kernel When used rq record db for kernel, it needs to set the rdb_en of hr_qp to 1 and configures the dma address of record rq db of qp context. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_qp.c | 1 + 1 file changed, 1 insertion(+) commit ecaaf1e26a37ddf7cba4e425cf68ae7ce1869bc0 Author: oulijun Date: Fri May 4 10:57:03 2018 +0800 RDMA/hns: Add rq inline flags judgement It needs to set the rqie field of qp context by configured rq inline flags. Besides, it need to decide whether posting inline rqwqe by judged rq inline flags. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 1661d3b0e2183ce90f6611641c350a5aa02aaa80 Author: Alexandru Moise <00moses.alexander00@gmail.com> Date: Tue May 8 11:02:02 2018 +0200 nvmet,rxe: defer ip datagram sending to tasklet This addresses 3 separate problems: 1. When using NVME over Fabrics we may end up sending IP packets in interrupt context, we should defer this work to a tasklet. [ 50.939957] WARNING: CPU: 3 PID: 0 at kernel/softirq.c:161 __local_bh_enable_ip+0x1f/0xa0 [ 50.942602] CPU: 3 PID: 0 Comm: swapper/3 Kdump: loaded Tainted: G W 4.17.0-rc3-ARCH+ #104 [ 50.945466] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-20171110_100015-anatol 04/01/2014 [ 50.948163] RIP: 0010:__local_bh_enable_ip+0x1f/0xa0 [ 50.949631] RSP: 0018:ffff88009c183900 EFLAGS: 00010006 [ 50.951029] RAX: 0000000080010403 RBX: 0000000000000200 RCX: 0000000000000001 [ 50.952636] RDX: 0000000000000000 RSI: 0000000000000200 RDI: ffffffff817e04ec [ 50.954278] RBP: ffff88009c183910 R08: 0000000000000001 R09: 0000000000000614 [ 50.956000] R10: ffffea00021d5500 R11: 0000000000000001 R12: ffffffff817e04ec [ 50.957779] R13: 0000000000000000 R14: ffff88009566f400 R15: ffff8800956c7000 [ 50.959402] FS: 0000000000000000(0000) GS:ffff88009c180000(0000) knlGS:0000000000000000 [ 50.961552] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 50.963798] CR2: 000055c4ec0ccac0 CR3: 0000000002209001 CR4: 00000000000606e0 [ 50.966121] Call Trace: [ 50.966845] [ 50.967497] __dev_queue_xmit+0x62d/0x690 [ 50.968722] dev_queue_xmit+0x10/0x20 [ 50.969894] neigh_resolve_output+0x173/0x190 [ 50.971244] ip_finish_output2+0x2b8/0x370 [ 50.972527] ip_finish_output+0x1d2/0x220 [ 50.973785] ? ip_finish_output+0x1d2/0x220 [ 50.975010] ip_output+0xd4/0x100 [ 50.975903] ip_local_out+0x3b/0x50 [ 50.976823] rxe_send+0x74/0x120 [ 50.977702] rxe_requester+0xe3b/0x10b0 [ 50.978881] ? ip_local_deliver_finish+0xd1/0xe0 [ 50.980260] rxe_do_task+0x85/0x100 [ 50.981386] rxe_run_task+0x2f/0x40 [ 50.982470] rxe_post_send+0x51a/0x550 [ 50.983591] nvmet_rdma_queue_response+0x10a/0x170 [ 50.985024] __nvmet_req_complete+0x95/0xa0 [ 50.986287] nvmet_req_complete+0x15/0x60 [ 50.987469] nvmet_bio_done+0x2d/0x40 [ 50.988564] bio_endio+0x12c/0x140 [ 50.989654] blk_update_request+0x185/0x2a0 [ 50.990947] blk_mq_end_request+0x1e/0x80 [ 50.991997] nvme_complete_rq+0x1cc/0x1e0 [ 50.993171] nvme_pci_complete_rq+0x117/0x120 [ 50.994355] __blk_mq_complete_request+0x15e/0x180 [ 50.995988] blk_mq_complete_request+0x6f/0xa0 [ 50.997304] nvme_process_cq+0xe0/0x1b0 [ 50.998494] nvme_irq+0x28/0x50 [ 50.999572] __handle_irq_event_percpu+0xa2/0x1c0 [ 51.000986] handle_irq_event_percpu+0x32/0x80 [ 51.002356] handle_irq_event+0x3c/0x60 [ 51.003463] handle_edge_irq+0x1c9/0x200 [ 51.004473] handle_irq+0x23/0x30 [ 51.005363] do_IRQ+0x46/0xd0 [ 51.006182] common_interrupt+0xf/0xf [ 51.007129] 2. Work must always be offloaded to tasklet for rxe_post_send_kernel() when using NVMEoF in order to solve lock ordering between neigh->ha_lock seqlock and the nvme queue lock: [ 77.833783] Possible interrupt unsafe locking scenario: [ 77.833783] [ 77.835831] CPU0 CPU1 [ 77.837129] ---- ---- [ 77.838313] lock(&(&n->ha_lock)->seqcount); [ 77.839550] local_irq_disable(); [ 77.841377] lock(&(&nvmeq->q_lock)->rlock); [ 77.843222] lock(&(&n->ha_lock)->seqcount); [ 77.845178] [ 77.846298] lock(&(&nvmeq->q_lock)->rlock); [ 77.847986] [ 77.847986] *** DEADLOCK *** 3. Same goes for the lock ordering between sch->q.lock and nvme queue lock: [ 47.634271] Possible interrupt unsafe locking scenario: [ 47.634271] [ 47.636452] CPU0 CPU1 [ 47.637861] ---- ---- [ 47.639285] lock(&(&sch->q.lock)->rlock); [ 47.640654] local_irq_disable(); [ 47.642451] lock(&(&nvmeq->q_lock)->rlock); [ 47.644521] lock(&(&sch->q.lock)->rlock); [ 47.646480] [ 47.647263] lock(&(&nvmeq->q_lock)->rlock); [ 47.648492] [ 47.648492] *** DEADLOCK *** Using NVMEoF after this patch seems to finally be stable, without it, rxe eventually deadlocks the whole system and causes RCU stalls. Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com> Reviewed-by: Zhu Yanjun Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_verbs.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit eeb1af4f53fa74fd41d288b113eebcdfca4d311c Author: Mustafa Ismail Date: Mon May 7 12:52:18 2018 -0500 i40iw: Use correct address in dst_neigh_lookup for IPv6 Use of incorrect structure address for IPv6 neighbor lookup causes connections to IPv6 addresses to fail. Fix this by using correct address in call to dst_neigh_lookup. Fixes: f27b4746f378 ("i40iw: add connection management code") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a7189d529cd146cd5838af97b32fcac4122b471 Author: Mustafa Ismail Date: Mon May 7 12:52:17 2018 -0500 i40iw: Fix memory leak in error path of create QP If i40iw_allocate_dma_mem fails when creating a QP, the memory allocated for the QP structure using kzalloc is not freed because iwqp->allocated_buffer is used to free the memory and it is not setup until later. Fix this by setting iwqp->allocated_buffer before allocating the dma memory. Fixes: d37498417947 ("i40iw: add files for iwarp interface") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37da2a03c036538a5a79766d74bfcf5b873e5cad Author: Daria Velikovsky Date: Mon May 7 10:20:02 2018 +0300 RDMA/mlx5: Use proper spec flow label type Flow label is defined as u32 in the in ipv6 flow spec, but used internally in the flow specs parsing as u8. That was causing loss of part of flow_label value. Fixes: 2d1e697e9b716 ('IB/mlx5: Add support to match inner packet fields') Reviewed-by: Maor Gottlieb Signed-off-by: Daria Velikovsky Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18b0362e87dfa09e355093b897b9db854e360d28 Author: Yishai Hadas Date: Mon May 7 10:20:01 2018 +0300 RDMA/mlx5: Don't assume that medium blueFlame register exists User can leave system without medium BlueFlames registers, however the code assumed that at least one such register exists. This patch fixes that assumption. Fixes: c1be5232d21d ("IB/mlx5: Fix micro UAR allocator") Reported-by: Rohit Zambre Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit f9e76ca3771bf23d2142a81a88ddd8f31f5c4c03 Author: Michael J. Ruhl Date: Wed May 2 06:42:51 2018 -0700 IB/hfi1: Use after free race condition in send context error path A pio send egress error can occur when the PSM library attempts to to send a bad packet. That issue is still being investigated. The pio error interrupt handler then attempts to progress the recovery of the errored pio send context. Code inspection reveals that the handling lacks the necessary locking if that recovery interleaves with a PSM close of the "context" object contains the pio send context. The lack of the locking can cause the recovery to access the already freed pio send context object and incorrectly deduce that the pio send context is actually a kernel pio send context as shown by the NULL deref stack below: [] _dev_info+0x6c/0x90 [] sc_restart+0x70/0x1f0 [hfi1] [] ? __schedule+0x424/0x9b0 [] sc_halted+0x15/0x20 [hfi1] [] process_one_work+0x17a/0x440 [] worker_thread+0x126/0x3c0 [] ? manage_workers.isra.24+0x2a0/0x2a0 [] kthread+0xcf/0xe0 [] ? insert_kthread_work+0x40/0x40 [] ret_from_fork+0x58/0x90 [] ? insert_kthread_work+0x40/0x40 This is the best case scenario and other scenarios can corrupt the already freed memory. Fix by adding the necessary locking in the pio send context error handler. Cc: # 4.9.x Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0583a4ef05987f7e0f3a7bdd3365e5dc36ca306d Author: David Gilhooley Date: Tue May 8 15:49:43 2018 -0700 arm64: capabilities: Add NVIDIA Denver CPU to bp_harden list The NVIDIA Denver CPU also needs a PSCI call to harden the branch predictor. Signed-off-by: David Gilhooley Signed-off-by: Will Deacon arch/arm64/kernel/cpu_errata.c | 1 + 1 file changed, 1 insertion(+) commit 1b06bd8dd95f7a19ab33fdf0f477c94950822ab3 Author: David Gilhooley Date: Tue May 8 15:49:42 2018 -0700 arm64: Add MIDR encoding for NVIDIA CPUs This patch adds the MIDR encodings for NVIDIA as well as the Denver and Carmel CPUs used in Tegra SoCs. Signed-off-by: David Gilhooley Signed-off-by: Will Deacon arch/arm64/include/asm/cputype.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 27f70620faf02a897123eb36b9e614e8d540f751 Author: Leon Romanovsky Date: Thu May 3 21:37:46 2018 +0300 MAINTAINERS: Remove bouncing @mellanox.com addresses Delete non-existent @mellanox.com addresses from MAINTAINERS file. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford MAINTAINERS | 6 ------ 1 file changed, 6 deletions(-) commit 9533b292a7acc62c294ebcbd9e1f9f9d52adb10b Author: Greg Thelen Date: Thu May 3 20:29:19 2018 -0700 IB: remove redundant INFINIBAND kconfig dependencies INFINIBAND_ADDR_TRANS depends on INFINIBAND. So there's no need for options which depend INFINIBAND_ADDR_TRANS to also depend on INFINIBAND. Remove the unnecessary INFINIBAND depends. Signed-off-by: Greg Thelen Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/Kconfig | 2 +- drivers/nvme/host/Kconfig | 2 +- drivers/nvme/target/Kconfig | 2 +- drivers/staging/lustre/lnet/Kconfig | 2 +- fs/cifs/Kconfig | 2 +- net/9p/Kconfig | 2 +- net/rds/Kconfig | 2 +- net/sunrpc/Kconfig | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit 070b9637dd8fa85c3ba7ecc60fe57fa4da9c2d1d Author: Hans de Goede Date: Thu May 3 11:32:33 2018 +0200 HID: i2c-hid: Add RESEND_REPORT_DESCR quirk for Toshiba Click Mini L9W-B The 0457:10fb touchscreen found on the Toshiba Click Mini L9W-B needs to have a report-decriptors command send to it on resume in order for the touchscreen to start generating events again on resume. Signed-off-by: Hans de Goede Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/i2c-hid/i2c-hid.c | 2 ++ 2 files changed, 3 insertions(+) commit 8feaec33b9868582654cd3d5355225dcb79aeca6 Author: Kai Heng Feng Date: Mon May 7 14:11:20 2018 +0800 PCI / PM: Always check PME wakeup capability for runtime wakeup support USB controller ASM1042 stops working after commit de3ef1eb1cd0 (PM / core: Drop run_wake flag from struct dev_pm_info). The device in question is not power managed by platform firmware, furthermore, it only supports PME# from D3cold: Capabilities: [78] Power Management version 3 Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot-,D3cold+) Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME- Before commit de3ef1eb1cd0, the device never gets runtime suspended. After that commit, the device gets runtime suspended to D3hot, which can not generate any PME#. usb_hcd_pci_probe() unconditionally calls device_wakeup_enable(), hence device_can_wakeup() in pci_dev_run_wake() always returns true. So pci_dev_run_wake() needs to check PME wakeup capability as its first condition. In addition, change wakeup flag passed to pci_target_state() from false to true, because we want to find the deepest state different from D3cold that the device can still generate PME#. In this case, it's D0 for the device in question. Fixes: de3ef1eb1cd0 (PM / core: Drop run_wake flag from struct dev_pm_info) Signed-off-by: Kai-Heng Feng Cc: 4.13+ # 4.13+ Acked-by: Bjorn Helgaas Signed-off-by: Rafael J. Wysocki drivers/pci/pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 97739501f207efe33145b918817f305b822987f8 Author: Rafael J. Wysocki Date: Wed May 9 11:44:56 2018 +0200 cpufreq: schedutil: Avoid using invalid next_freq If the next_freq field of struct sugov_policy is set to UINT_MAX, it shouldn't be used for updating the CPU frequency (this is a special "invalid" value), but after commit b7eaf1aab9f8 (cpufreq: schedutil: Avoid reducing frequency of busy CPUs prematurely) it may be passed as the new frequency to sugov_update_commit() in sugov_update_single(). Fix that by adding an extra check for the special UINT_MAX value of next_freq to sugov_update_single(). Fixes: b7eaf1aab9f8 (cpufreq: schedutil: Avoid reducing frequency of busy CPUs prematurely) Reported-by: Viresh Kumar Cc: 4.12+ # 4.12+ Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki kernel/sched/cpufreq_schedutil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a744490f12707d9f0b205272b29adf5bdb3ba193 Author: Juri Lelli Date: Wed May 9 10:40:51 2018 +0200 cpufreq: schedutil: remove stale comment After commit 794a56ebd9a57 (sched/cpufreq: Change the worker kthread to SCHED_DEADLINE) schedutil kthreads are "ignored" for a clock frequency selection point of view, so the potential corner case for RT tasks is not possible at all now. Remove the stale comment mentioning it. Signed-off-by: Juri Lelli Signed-off-by: Rafael J. Wysocki kernel/sched/cpufreq_schedutil.c | 13 ------------- 1 file changed, 13 deletions(-) commit 13610c93488b3c290f393c76744b308445921094 Author: Juri Lelli Date: Tue May 8 17:12:09 2018 +0200 PM: docs: intel_pstate: fix Active Mode w/o HWP paragraph P-state selection algorithm (powersave or performance) is selected by echoing the desired choice to scaling_governor sysfs attribute and not to scaling_cur_freq (as currently stated). Fix it. Signed-off-by: Juri Lelli Reviewed-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki Documentation/admin-guide/pm/intel_pstate.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c72a0ded8d4ac9d99c04200035bbfcc82e15842c Author: Jonathan Neuschäfer Date: Wed Apr 25 12:07:03 2018 +0200 PM: docs: sleep-states: Fix a typo ("includig") Fix a typo in admin-guide/pm/sleep-states.rst. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Rafael J. Wysocki Documentation/admin-guide/pm/sleep-states.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb7b40aecbf778c0c83a5bd62b0f03ca9f49a618 Author: Pablo Neira Ayuso Date: Tue May 8 02:43:57 2018 +0200 netfilter: nf_tables: bogus EBUSY in chain deletions When removing a rule that jumps to chain and such chain in the same batch, this bogusly hits EBUSY. Add activate and deactivate operations to expression that can be called from the preparation and the commit/abort phases. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 5 +++++ net/netfilter/nf_tables_api.c | 46 +++++++++++++++++++++++++++++++++++---- net/netfilter/nft_immediate.c | 15 ++++++++++--- 3 files changed, 59 insertions(+), 7 deletions(-) commit 732a8049f365f514d0607e03938491bf6cb0d620 Author: Florian Westphal Date: Mon May 7 15:22:36 2018 +0200 netfilter: nft_compat: fix handling of large matchinfo size currently matchinfo gets stored in the expression, but some xt matches are very large. To handle those we either need to switch nft core to kvmalloc and increase size limit, or allocate the info blob of large matches separately. This does the latter, this limits the scope of the changes to nft_compat. I picked a threshold of 192, this allows most matches to work as before and handle only few ones via separate alloation (cgroup, u32, sctp, rt). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_compat.c | 64 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) commit 8bdf164744b2c7f63561846c01cff3db597f282d Author: Florian Westphal Date: Mon May 7 15:22:35 2018 +0200 netfilter: nft_compat: prepare for indirect info storage Next patch will make it possible for *info to be stored in a separate allocation instead of the expr private area. This removes the 'expr priv area is info blob' assumption from the match init/destroy/eval functions. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_compat.c | 47 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) commit 9a0e9802217291e54c4dd1fc5462f189a4be14ec Author: Boris Brezillon Date: Mon May 7 14:13:03 2018 +0200 drm/vc4: Fix scaling of uni-planar formats When using uni-planar formats (like RGB), the scaling parameters are stored in plane 0, not plane 1. Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.") Cc: stable@vger.kernel.org Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180507121303.5610-1-boris.brezillon@bootlin.com drivers/gpu/drm/vc4/vc4_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3148dedfe79e422f448a10250d3e2cdf8b7ee617 Author: Heiner Kallweit Date: Mon May 7 21:11:21 2018 +0200 r8169: fix powering up RTL8168h Since commit a92a08499b1f "r8169: improve runtime pm in general and suspend unused ports" interfaces w/o link are runtime-suspended after 10s. On systems where drivers take longer to load this can lead to the situation that the interface is runtime-suspended already when it's initially brought up. This shouldn't be a problem because rtl_open() resumes MAC/PHY. However with at least one chip version the interface doesn't properly come up, as reported here: https://bugzilla.kernel.org/show_bug.cgi?id=199549 The vendor driver uses a delay to give certain chip versions some time to resume before starting the PHY configuration. So let's do the same. I don't know which chip versions may be affected, therefore apply this delay always. This patch was reported to fix the issue for RTL8168h. I was able to reproduce the issue on an Asus H310I-Plus which also uses a RTL8168h. Also in my case the patch fixed the issue. Reported-by: Slava Kardakov Tested-by: Slava Kardakov Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 3 +++ 1 file changed, 3 insertions(+) commit 6f2db7dc901a1b89fbc50f7b38f0f7ee17205703 Author: Peter Rosin Date: Wed May 2 09:40:25 2018 +0200 drm/exynos: hdmi: avoid duplicating drm_bridge_attach drm_bridge_attach takes care of these assignments, so there is no need to open-code them a second time. Signed-off-by: Peter Rosin Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 2 -- 1 file changed, 2 deletions(-) commit 322579dcc865b94b47345ad1b6002ad167f85405 Author: Tejun Heo Date: Tue May 8 14:21:56 2018 -0700 libata: Blacklist some Sandisk SSDs for NCQ Sandisk SSDs SD7SN6S256G and SD8SN8U256G are regularly locking up regularly under sustained moderate load with NCQ enabled. Blacklist for now. Signed-off-by: Tejun Heo Reported-by: Dave Jones Cc: stable@vger.kernel.org drivers/ata/libata-core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 31c6085562a03124d3f6a5c43dd9888ac44495a5 Author: Dan Carpenter Date: Fri Apr 27 17:06:49 2018 +0300 firmware: arm_scmi: Use after free in scmi_create_protocol_device() We need to return here instead of setting up the freed sdev device as a transport. Fixes: 907b6d14911d ("firmware: arm_scmi: add per-protocol channels support using idr objects") Signed-off-by: Dan Carpenter Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/driver.c | 1 + 1 file changed, 1 insertion(+) commit 036db8bd96374c66424f270f3370ddaf0adf7506 Merge: 93a0d34 0d74d87 Author: Linus Torvalds Date: Tue May 8 05:40:17 2018 -1000 Merge branch 'for-4.17-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: "An earlier commit to add reset control for embedded ahci controllers affected some of the hardware specific drivers and got reverted for now. Other than that, just per-device workarounds and trivial changes" * 'for-4.17-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: driver core: add __printf verification to __ata_ehi_pushv_desc ata: fix spelling mistake: "directon" -> "direction" libata: Apply NOLPM quirk for SanDisk SD7UB3Q*G1001 SSDs libata: Apply NOLPM quirk for SAMSUNG MZMPC128HBFU-000MV SSD ata: ahci: mvebu: override ahci_stop_engine for mvebu AHCI libahci: Allow drivers to override stop_engine Revert "ata: ahci-platform: add reset control support" commit 93a0d34024ad9951a7ce86a306c8d3414b1b1d88 Merge: 89240c6 c41eb2c Author: Linus Torvalds Date: Tue May 8 05:37:17 2018 -1000 Merge tag 'pinctrl-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Here are three pin control fixes. The Intel fixes are the most serious and important things I had queued since it affects a large portion of deployed Chromebooks. - Two major fixes for the Intel Cherryview and Sunrisepoint pin controllers, adjusting numberspaces so that they get aligned with various messed-up numbers encoded into the BIOS. - A fix for the Meson driver GPIO pin range" * tag 'pinctrl-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: sunrisepoint: Align GPIO number space with Windows pinctrl: cherryview: Associate IRQ descriptors to irqdomain pinctrl: meson-axg: fix the range of aobus bank commit 89240c675ed12fe540093fc70c13ae8ff227e8e5 Merge: f142f08 e026646 Author: Linus Torvalds Date: Tue May 8 05:35:12 2018 -1000 Merge tag 'gpio-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Sorry for lagging behind on sending the first batch of GPIO fixes for this cycle. Just too busy conferencing and the weather was too nice. Here it is anyway: some real important polishing on the error path facing userspace (tagged for stable as well) and some normal driver fixes. - Fix proper IRQ unmasking in the Aspeed driver. - Do not free unrequested descriptors on the errorpath when creating line handles from the userspace chardev requested GPIO lines. - Also fix the errorpath in the linehandle creation function. - Fix the get/set multiple GPIO lines for a few of the funky industrial GPIO cards on the ISA bus" * tag 'gpio-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: pcie-idio-24: Fix off-by-one error in get_multiple loop gpio: pcie-idio-24: Fix port memory offset for get_multiple/set_multiple callbacks gpio: pci-idio-16: Fix port memory offset for get_multiple callback gpio: fix error path in lineevent_create gpioib: do not free unrequested descriptors gpio: fix aspeed_gpio unmask irq commit 42f02130f980ac81efddb7968f50fd9ed06df26b Merge: 2dabf9f 7a25ac2 Author: David S. Miller Date: Tue May 8 10:19:53 2018 -0400 Merge tag 'linux-can-fixes-for-4.17-20180508' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2018-05-08 this is a pull request for 7 patches for net/master. The first patch is by Jakob Unterwurzacher and increases the severity of bus-off messages in the generic CAN device infrastructure. The next two patches are by Uwe Kleine-König and fix the endianess detection in the flexcan driver. Jimmy Assarsson's patch for the kvaser driver corrects the stats counter for dropped tx-messages. Geert Uytterhoeven provides one patch and Sergei Shtylyov two patches for the rcan_canfd device tree binding description. ==================== Signed-off-by: David S. Miller commit 2dabf9f281bc42ce1836c02b6588585d6c52b67d Merge: 2c5d5b1 f18fa5d Author: David S. Miller Date: Tue May 8 10:17:22 2018 -0400 Merge branch 'ieee802154-for-davem-2018-05-08' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan Stefan Schmidt says: ==================== pull-request: ieee802154 2018-05-08 An update from ieee802154 for your *net* tree. Two fixes for the mcr20a driver, which was being added in the 4.17 merge window, by Gustavo and myself. The atusb driver got a change to GFP_KERNEL where no GFP_ATOMIC is needed by Jia-Ju. The last and most important fix is from Alex to get IPv6 reassembly working again for the ieee802154 6lowpan adaptation. This got broken in 4.16 so please queue this one also up for the 4.16 stable tree. ==================== Signed-off-by: David S. Miller commit 4bbaf2584b86b0772413edeac22ff448f36351b1 Author: Hendrik Brueckner Date: Thu May 3 15:56:15 2018 +0200 s390/cpum_sf: ensure sample frequency of perf event attributes is non-zero Correct a trinity finding for the perf_event_open() system call with a perf event attribute structure that uses a frequency but has the sampling frequency set to zero. This causes a FP divide exception during the sample rate initialization for the hardware sampling facility. Fixes: 8c069ff4bd606 ("s390/perf: add support for the CPU-Measurement Sampling Facility") Cc: stable@vger.kernel.org # 3.14+ Reviewed-by: Heiko Carstens Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_sf.c | 4 ++++ 1 file changed, 4 insertions(+) commit e8f48f96db7e482995743f461b3e8a5c1a102533 Author: Florent Flament Date: Thu Apr 19 19:07:00 2018 +0300 drm/i915: Fix drm:intel_enable_lvds ERROR message in kernel log Fix `[drm:intel_enable_lvds] *ERROR* timed out waiting for panel to power on` in kernel log at boot time. Toshiba Satellite Z930 laptops needs between 1 and 2 seconds to power on its screen during Intel i915 DRM initialization. This currently results in a `[drm:intel_enable_lvds] *ERROR* timed out waiting for panel to power on` message appearing in the kernel log during boot time and when stopping the machine. This change increases the timeout of the `intel_enable_lvds` function from 1 to 5 seconds, letting enough time for the Satellite 930 LCD screen to power on, and suppressing the error message from the kernel log. This patch has been successfully tested on Linux 4.14 running on a Toshiba Satellite Z930. [vsyrjala: bump the timeout from 2 to 5 seconds to match the DP code and properly cover the max hw timeout of ~4 seconds, and drop the comment about the specific machine since this is not a particulary surprising issue, nor specific to that one machine] Signed-off-by: Florent Flament Cc: stable@vger.kernel.org Cc: Pavel Petrovic Cc: Sérgio M. Basto Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103414 References: https://bugzilla.kernel.org/show_bug.cgi?id=57591 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180419160700.19828-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula (cherry picked from commit 280b54ade5914d3b4abe4f0ebe083ddbd4603246) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_lvds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 660d88e74cf6e16252e366616f158d84dc9dc6a3 Author: Ville Syrjälä Date: Thu Apr 26 19:30:15 2018 +0300 drm/i915: Correctly populate user mode h/vdisplay with pipe src size during readout During state readout we first read out the pipe src size, store that information in the user mode h/vdisplay, but later on we overwrite that with the actual crtc timings. That makes our read out crtc state inconsistent with itself when the BIOS has enabled the panel fitter to scale the pipe contents. Let's preserve the pipe src size based information in the user mode to make things consistent again. This fixes a problem introduced by commit a2936e3d9a9c ("drm/i915: Use drm_mode_get_hv_timing() to populate plane clip rectangle") where the inconsistent state is now leading the plane clipping code to report a failure on account the plane dst coordinates not matching the user mode size. Previously we did the plane clipping based on the pipe src size instead and thus never noticed the inconsistency. The failure manifests as a WARN: [ 0.762117] [drm:intel_dump_pipe_config [i915]] requested mode: [ 0.762142] [drm:drm_mode_debug_printmodeline [drm]] Modeline 0:"1366x768" 60 72143 1366 1414 1446 1526 768 771 777 784 0x40 0xa ... [ 0.762327] [drm:intel_dump_pipe_config [i915]] port clock: 72143, pipe src size: 1024x768, pixel rate 72143 ... [ 0.764666] [drm:drm_atomic_helper_check_plane_state [drm_kms_helper]] Plane must cover entire CRTC [ 0.764690] [drm:drm_rect_debug_print [drm]] dst: 1024x768+0+0 [ 0.764711] [drm:drm_rect_debug_print [drm]] clip: 1366x768+0+0 [ 0.764713] ------------[ cut here ]------------ [ 0.764714] Could not determine valid watermarks for inherited state [ 0.764792] WARNING: CPU: 4 PID: 159 at drivers/gpu/drm/i915/intel_display.c:14584 intel_modeset_init+0x3ce/0x19d0 [i915] ... Cc: FadeMind Cc: Dave Jones Cc: Daniel Vetter Reported-by: FadeMind Reported-by: Dave Jones Tested-by: Dave Jones References: https://lists.freedesktop.org/archives/intel-gfx/2018-April/163186.html Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105992 Fixes: a2936e3d9a9c ("drm/i915: Use drm_mode_get_hv_timing() to populate plane clip rectangle") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180426163015.14232-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Tested-by: Larry Finger Tested-by: FadeMind (cherry picked from commit bd4cd03c81010dcd4e6f0e02e4c15f44aefe12d1) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_display.c | 2 ++ 1 file changed, 2 insertions(+) commit 9d219554d9bf59875b4e571a0392d620e8954879 Author: Rodrigo Vivi Date: Wed May 2 10:52:55 2018 -0700 drm/i915: Adjust eDP's logical vco in a reliable place. On intel_dp_compute_config() we were calculating the needed vco for eDP on gen9 and we stashing it in intel_atomic_state.cdclk.logical.vco However few moments later on intel_modeset_checks() we fully replace entire intel_atomic_state.cdclk.logical with dev_priv->cdclk.logical fully overwriting the logical desired vco for eDP on gen9. So, with wrong VCO value we end up with wrong desired cdclk, but also it will raise a lot of WARNs: On gen9, when we read CDCLK_CTL to verify if we configured properly the desired frequency the CD Frequency Select bits [27:26] == 10b can mean 337.5 or 308.57 MHz depending on the VCO. So if we have wrong VCO value stashed we will believe the frequency selection didn't stick and start to raise WARNs of cdclk mismatch. [ 42.857519] [drm:intel_dump_cdclk_state [i915]] Changing CDCLK to 308571 kHz, VCO 8640000 kHz, ref 24000 kHz, bypass 24000 kHz, voltage level 0 [ 42.897269] cdclk state doesn't match! [ 42.901052] WARNING: CPU: 5 PID: 1116 at drivers/gpu/drm/i915/intel_cdclk.c:2084 intel_set_cdclk+0x5d/0x110 [i915] [ 42.938004] RIP: 0010:intel_set_cdclk+0x5d/0x110 [i915] [ 43.155253] WARNING: CPU: 5 PID: 1116 at drivers/gpu/drm/i915/intel_cdclk.c:2084 intel_set_cdclk+0x5d/0x110 [i915] [ 43.170277] [drm:intel_dump_cdclk_state [i915]] [hw state] 337500 kHz, VCO 8100000 kHz, ref 24000 kHz, bypass 24000 kHz, voltage level 0 [ 43.182566] [drm:intel_dump_cdclk_state [i915]] [sw state] 308571 kHz, VCO 8640000 kHz, ref 24000 kHz, bypass 24000 kHz, voltage level 0 v2: Move the entire eDP's vco logical adjustment to inside the skl_modeset_calc_cdclk as suggested by Ville. Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Fixes: bb0f4aab0e76 ("drm/i915: Track full cdclk state for the logical and actual cdclk frequencies") Cc: # v4.12+ Link: https://patchwork.freedesktop.org/patch/msgid/20180502175255.5344-1-rodrigo.vivi@intel.com (cherry picked from commit 3297234a05ab1e90091b0574db4c397ef0e90d5f) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_cdclk.c | 41 ++++++++++++++++++++++++++++++++++---- drivers/gpu/drm/i915/intel_dp.c | 20 ------------------- 2 files changed, 37 insertions(+), 24 deletions(-) commit 009240940e84c1c089af88b454f7e804a4c5bd1b Author: Florian Westphal Date: Sun May 6 00:47:20 2018 +0200 netfilter: nf_tables: don't assume chain stats are set when jumplabel is set nft_chain_stats_replace() and all other spots assume ->stats can be NULL, but nft_update_chain_stats does not. It must do this check, just because the jump label is set doesn't mean all basechains have stats assigned. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_core.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit a44f6d82a471aa52fe218e43105fbe3c458fc5a6 Author: Florian Westphal Date: Sun May 6 00:46:16 2018 +0200 netfilter: x_tables: add module alias for icmp matches The icmp matches are implemented in ip_tables and ip6_tables, respectively, so for normal iptables they are always available: those modules are loaded once iptables calls getsockopt() to fetch available module revisions. In iptables-over-nftables case probing occurs via nfnetlink, so these modules might not be loaded. Add aliases so modprobe can load these when icmp/icmp6 is requested. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/ip_tables.c | 1 + net/ipv6/netfilter/ip6_tables.c | 1 + 2 files changed, 2 insertions(+) commit 4e09fc873d92398001e267f7b60c36c963f825b3 Author: Florian Westphal Date: Sun May 6 00:45:43 2018 +0200 netfilter: prefer nla_strlcpy for dealing with NLA_STRING attributes fixes these warnings: 'nfnl_cthelper_create' at net/netfilter/nfnetlink_cthelper.c:237:2, 'nfnl_cthelper_new' at net/netfilter/nfnetlink_cthelper.c:450:9: ./include/linux/string.h:246:9: warning: '__builtin_strncpy' specified bound 16 equals destination size [-Wstringop-truncation] return __builtin_strncpy(p, q, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Moreover, strncpy assumes null-terminated source buffers, but thats not the case here. Unlike strlcpy, nla_strlcpy *does* pad the destination buffer while also considering nla attribute size. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_acct.c | 2 +- net/netfilter/nfnetlink_cthelper.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 25fd386e0bc065849db7400f579e82863ea44838 Author: Florian Westphal Date: Fri May 4 18:16:06 2018 +0200 netfilter: core: add missing __rcu annotation removes following sparse error: net/netfilter/core.c:598:30: warning: incorrect type in argument 1 (different address spaces) net/netfilter/core.c:598:30: expected struct nf_hook_entries **e net/netfilter/core.c:598:30: got struct nf_hook_entries [noderef] ** Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d5e032fc5697b6c0d6b4958bcacb981a08f8174e Author: Julian Anastasov Date: Thu May 3 22:02:18 2018 +0300 ipvs: fix stats update from local clients Local clients are not properly synchronized on 32-bit CPUs when updating stats (3.10+). Now it is possible estimation_timer (timer), a stats reader, to interrupt the local client in the middle of write_seqcount_{begin,end} sequence leading to loop (DEADLOCK). The same interrupt can happen from received packet (SoftIRQ) which updates the same per-CPU stats. Fix it by disabling BH while updating stats. Found with debug: WARNING: inconsistent lock state 4.17.0-rc2-00105-g35cb6d7-dirty #2 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-R} -> {SOFTIRQ-ON-W} usage. ftp/2545 [HC0[0]:SC0[0]:HE1:SE1] takes: 86845479 (&syncp->seq#6){+.+-}, at: ip_vs_schedule+0x1c5/0x59e [ip_vs] {IN-SOFTIRQ-R} state was registered at: lock_acquire+0x44/0x5b estimation_timer+0x1b3/0x341 [ip_vs] call_timer_fn+0x54/0xcd run_timer_softirq+0x10c/0x12b __do_softirq+0xc1/0x1a9 do_softirq_own_stack+0x1d/0x23 irq_exit+0x4a/0x64 smp_apic_timer_interrupt+0x63/0x71 apic_timer_interrupt+0x3a/0x40 default_idle+0xa/0xc arch_cpu_idle+0x9/0xb default_idle_call+0x21/0x23 do_idle+0xa0/0x167 cpu_startup_entry+0x19/0x1b start_secondary+0x133/0x182 startup_32_smp+0x164/0x168 irq event stamp: 42213 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&syncp->seq#6); lock(&syncp->seq#6); *** DEADLOCK *** Fixes: ac69269a45e8 ("ipvs: do not disable bh for long time") Signed-off-by: Julian Anastasov Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit a050d345cef0dc6249263540da1e902bba617e43 Author: Julian Anastasov Date: Thu May 3 22:01:40 2018 +0300 ipvs: fix refcount usage for conns in ops mode Connections in One-packet scheduling mode (-o, --ops) are removed with refcnt=0 because they are not hashed in conn table. To avoid refcount_dec reporting this as error, change them to be removed with refcount_dec_if_one as all other connections. refcount_t hit zero at ip_vs_conn_put+0x31/0x40 [ip_vs] in sh[15519], uid/euid: 497/497 WARNING: CPU: 0 PID: 15519 at ../kernel/panic.c:657 refcount_error_report+0x94/0x9e Modules linked in: ip_vs_rr cirrus ttm sb_edac edac_core drm_kms_helper crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc mousedev drm aesni_intel aes_x86_64 crypto_simd glue_helper cryptd psmouse evdev input_leds led_class intel_agp fb_sys_fops syscopyarea sysfillrect intel_rapl_perf mac_hid intel_gtt serio_raw sysimgblt agpgart i2c_piix4 i2c_core ata_generic pata_acpi floppy cfg80211 rfkill button loop macvlan ip_vs nf_conntrack libcrc32c crc32c_generic ip_tables x_tables ipv6 crc_ccitt autofs4 ext4 crc16 mbcache jbd2 fscrypto ata_piix libata atkbd libps2 scsi_mod crc32c_intel i8042 rtc_cmos serio af_packet dm_mod dax fuse xen_netfront xen_blkfront CPU: 0 PID: 15519 Comm: sh Tainted: G W 4.15.17 #1-NixOS Hardware name: Xen HVM domU, BIOS 4.2.amazon 08/24/2006 RIP: 0010:refcount_error_report+0x94/0x9e RSP: 0000:ffffa344dde039c8 EFLAGS: 00010296 RAX: 0000000000000057 RBX: ffffffff92f20e06 RCX: 0000000000000006 RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffffa344dde165c0 RBP: ffffa344dde03b08 R08: 0000000000000218 R09: 0000000000000004 R10: ffffffff93006a80 R11: 0000000000000001 R12: ffffa344d68cd100 R13: 00000000000001f1 R14: ffffffff92f12fb0 R15: 0000000000000004 FS: 00007fc9d2040fc0(0000) GS:ffffa344dde00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000262a000 CR3: 0000000016a0c004 CR4: 00000000001606f0 Call Trace: ex_handler_refcount+0x4e/0x80 fixup_exception+0x33/0x40 do_trap+0x83/0x140 do_error_trap+0x83/0xf0 ? ip_vs_conn_drop_conntrack+0x120/0x1a5 [ip_vs] ? ip_finish_output2+0x29c/0x390 ? ip_finish_output2+0x1a2/0x390 invalid_op+0x1b/0x40 RIP: 0010:ip_vs_conn_put+0x31/0x40 [ip_vs] RSP: 0000:ffffa344dde03bb8 EFLAGS: 00010246 RAX: 0000000000000001 RBX: ffffa344df31cf00 RCX: ffffa344d7450198 RDX: 0000000000000003 RSI: 00000000fffffe01 RDI: ffffa344d7450140 RBP: 0000000000000002 R08: 0000000000000476 R09: 0000000000000000 R10: ffffa344dde03b28 R11: ffffa344df200000 R12: ffffa344d7d09000 R13: ffffa344def3a980 R14: ffffffffc04f6e20 R15: 0000000000000008 ip_vs_in.part.29.constprop.36+0x34f/0x640 [ip_vs] ? ip_vs_conn_out_get+0xe0/0xe0 [ip_vs] ip_vs_remote_request4+0x47/0xa0 [ip_vs] ? ip_vs_in.part.29.constprop.36+0x640/0x640 [ip_vs] nf_hook_slow+0x43/0xc0 ip_local_deliver+0xac/0xc0 ? ip_rcv_finish+0x400/0x400 ip_rcv+0x26c/0x380 __netif_receive_skb_core+0x3a0/0xb10 ? inet_gro_receive+0x23c/0x2b0 ? netif_receive_skb_internal+0x24/0xb0 netif_receive_skb_internal+0x24/0xb0 napi_gro_receive+0xb8/0xe0 xennet_poll+0x676/0xb40 [xen_netfront] net_rx_action+0x139/0x3a0 __do_softirq+0xde/0x2b4 irq_exit+0xae/0xb0 xen_evtchn_do_upcall+0x2c/0x40 xen_hvm_callback_vector+0x7d/0x90 RIP: 0033:0x7fc9d11c91f9 RSP: 002b:00007ffebe8a2ea0 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff0c RAX: 00000000ffffffff RBX: 0000000002609808 RCX: 0000000000000054 RDX: 0000000000000001 RSI: 0000000002605440 RDI: 00000000025f940e RBP: 00000000025f940e R08: 000000000260213d R09: 1999999999999999 R10: 000000000262a808 R11: 00000000025f942d R12: 00000000025f940e R13: 00007fc9d1301e20 R14: 00000000025f9408 R15: 00007fc9d1302720 Code: 48 8b 95 80 00 00 00 41 55 49 8d 8c 24 e0 05 00 00 45 8b 84 24 38 04 00 00 41 89 c1 48 89 de 48 c7 c7 a8 2f f2 92 e8 7c fa ff ff <0f> 0b 58 5b 5d 41 5c 41 5d c3 0f 1f 44 00 00 55 48 89 e5 41 56 Reported-by: Net Filter Fixes: b54ab92b84b6 ("netfilter: refcounter conversions") Signed-off-by: Julian Anastasov Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_conn.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit b8e9dc1c75714ceb53615743e1036f76e00f5a17 Author: Florian Westphal Date: Wed May 2 14:07:42 2018 +0200 netfilter: nf_tables: nft_compat: fix refcount leak on xt module Taehee Yoo reported following bug: iptables-compat -I OUTPUT -m cpu --cpu 0 iptables-compat -F lsmod |grep xt_cpu xt_cpu 16384 1 Quote: "When above command is given, a netlink message has two expressions that are the cpu compat and the nft_counter. The nft_expr_type_get() in the nf_tables_expr_parse() successes first expression then, calls select_ops callback. (allocates memory and holds module) But, second nft_expr_type_get() in the nf_tables_expr_parse() returns -EAGAIN because of request_module(). In that point, by the 'goto err1', the 'module_put(info[i].ops->type->owner)' is called. There is no release routine." The core problem is that unlike all other expression, nft_compat select_ops has side effects. 1. it allocates dynamic memory which holds an nft ops struct. In all other expressions, ops has static storage duration. 2. It grabs references to the xt module that it is supposed to invoke. Depending on where things go wrong, error unwinding doesn't always do the right thing. In the above scenario, a new nft_compat_expr is created and xt_cpu module gets loaded with a refcount of 1. Due to to -EAGAIN, the netlink messages get re-parsed. When that happens, nft_compat finds that xt_cpu is already present and increments module refcount again. This fixes the problem by making select_ops to have no visible side effects and removes all extra module_get/put. When select_ops creates a new nft_compat expression, the new expression has a refcount of 0, and the xt module gets its refcount incremented. When error happens, the next call finds existing entry, but will no longer increase the reference count -- the presence of existing nft_xt means we already hold a module reference. Because nft_xt_put is only called from nft_compat destroy hook, it will never see the initial zero reference count. ->destroy can only be called after ->init(), and that will increase the refcount. Lastly, we now free nft_xt struct with kfree_rcu. Else, we get use-after free in nf_tables_rule_destroy: while (expr != nft_expr_last(rule) && expr->ops) { nf_tables_expr_destroy(ctx, expr); expr = nft_expr_next(expr); // here nft_expr_next() dereferences expr->ops. This is safe for all users, as ops have static storage duration. In nft_compat case however, its ->destroy callback can free the memory that hold the ops structure. Tested-by: Taehee Yoo Reported-by: Taehee Yoo Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_compat.c | 92 +++++++++++++++++++++++++++++----------------- 1 file changed, 58 insertions(+), 34 deletions(-) commit a4995684a949cc1d28fbf09900c47c34b9427ecf Author: Stephen Hemminger Date: Fri Apr 27 11:16:09 2018 -0700 netfilter: bridge: stp fix reference to uninitialized data The destination mac (destmac) is only valid if EBT_DESTMAC flag is set. Fix by changing the order of the comparison to look for the flag first. Reported-by: syzbot+5c06e318fc558cc27823@syzkaller.appspotmail.com Signed-off-by: Stephen Hemminger Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebt_stp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a25ac2f71a409e77dd5c85cf3cbe1cbf2ae77f3 Author: Sergei Shtylyov Date: Fri Apr 27 21:53:33 2018 +0300 DT: net: can: rcar_canfd: document R8A77980 bindings Document the R-Car V3H (R8A77980) SoC support in the R-Car CAN-FD bindings. Signed-off-by: Sergei Shtylyov Reviewed-by: Simon Horman Signed-off-by: Marc Kleine-Budde Documentation/devicetree/bindings/net/can/rcar_canfd.txt | 1 + 1 file changed, 1 insertion(+) commit 0a4fe40efb04686529d998716d1680429d0b586b Author: Sergei Shtylyov Date: Thu Apr 26 22:41:14 2018 +0300 DT: net: can: rcar_canfd: document R8A77970 bindings Document the R-Car V3M (R8A77970) SoC support in the R-Car CAN-FD bindings. Signed-off-by: Sergei Shtylyov Reviewed-by: Ramesh Shanmugasundaram Reviewed-by: Simon Horman Signed-off-by: Marc Kleine-Budde Documentation/devicetree/bindings/net/can/rcar_canfd.txt | 1 + 1 file changed, 1 insertion(+) commit 1469c5f033a287dc25d113ea65c498c0603fbaa1 Author: Geert Uytterhoeven Date: Thu May 3 15:02:33 2018 +0200 dt-bindings: can: rcar_can: Fix R8A7796 SoC name R8A7796 is R-Car M3-W. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Marc Kleine-Budde Documentation/devicetree/bindings/net/can/rcar_canfd.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ee00865ffe4e8c8ba4a68d26db53c7ec09bbb89 Author: Jimmy Assarsson Date: Fri Apr 20 14:38:46 2018 +0200 can: kvaser_usb: Increase correct stats counter in kvaser_usb_rx_can_msg() Increase rx_dropped, if alloc_can_skb() fails, not tx_dropped. Signed-off-by: Jimmy Assarsson Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a62dcf486c10daf5366f29df1c799f69b1510f9 Author: Uwe Kleine-König Date: Wed Apr 25 16:50:40 2018 +0200 arm: dts: imx[35]*: declare flexcan devices to be compatible to imx25's flexcan Commit d50f4630c2e1 ("arm: dts: Remove p1010-flexcan compatible from imx series dts") removed the fallback compatible "fsl,p1010-flexcan" from the imx device trees. As the flexcan cores on i.MX25, i.MX35 and i.MX53 are identical, introduce the first as fallback for the two latter ones. Fixes: d50f4630c2e1 ("arm: dts: Remove p1010-flexcan compatible from imx series dts") Signed-off-by: Uwe Kleine-König Cc: linux-stable # >= v4.16 Signed-off-by: Marc Kleine-Budde arch/arm/boot/dts/imx35.dtsi | 4 ++-- arch/arm/boot/dts/imx53.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0e030a373df3b8792b8991740fc31fe0629c6e58 Author: Uwe Kleine-König Date: Wed Apr 25 16:50:39 2018 +0200 can: flexcan: fix endianess detection In commit 88462d2a7830 ("can: flexcan: Remodel FlexCAN register r/w APIs for big endian FlexCAN controllers.") the following logic was implemented: if the dt property "big-endian" is given or the device is compatible to "fsl,p1010-flexcan": use big-endian mode; else use little-endian mode; This relies on commit d50f4630c2e1 ("arm: dts: Remove p1010-flexcan compatible from imx series dts") which was applied a few commits later. Without this commit (or an old device tree used for booting a new kernel) the flexcan devices on i.MX25, i.MX28, i.MX35 and i.MX53 match the 'the device is compatible to "fsl,p1010-flexcan"' test and so are switched erroneously to big endian mode. Instead of the check above put a quirk in devtype data and rely on of_match_device yielding the most compatible match Fixes: 88462d2a7830 ("can: flexcan: Remodel FlexCAN register r/w APIs for big endian FlexCAN controllers.") Signed-off-by: Uwe Kleine-König Tested-by: Gavin Schenk Cc: linux-stable # >= v4.16 Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 71c23a821c6bcacba71a094efe49ee689605906b Author: Jakob Unterwurzacher Date: Wed Apr 18 16:10:03 2018 +0200 can: dev: increase bus-off message severity bus-off is usually caused by hardware malfunction or configuration error (baud rate mismatch) and causes a complete loss of communication. Increase the "bus-off" message's severity from netdev_dbg() to netdev_info() to make it visible to the user. A can interface going into bus-off is similar in severity to ethernet's "Link is Down" message, which is also printed at info level. It is debatable whether the the "restarted" message should also be changed to netdev_info() to make the interface state changes comprehensible from the kernel log. I have chosen to keep the "restarted" message at dbg for now as the "bus-off" message should be enough for the user to notice and investigate the problem. Signed-off-by: Jakob Unterwurzacher Cc: linux-can@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Marc Kleine-Budde drivers/net/can/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c0a8f6b5a45ac892a763b6299bd3c5324fc5e02 Author: Michael Ellerman Date: Tue May 8 14:59:56 2018 +1000 powerpc/pseries: Fix CONFIG_NUMA=n build The build is failing with CONFIG_NUMA=n and some compiler versions: arch/powerpc/platforms/pseries/hotplug-cpu.o: In function `dlpar_online_cpu': hotplug-cpu.c:(.text+0x12c): undefined reference to `timed_topology_update' arch/powerpc/platforms/pseries/hotplug-cpu.o: In function `dlpar_cpu_remove': hotplug-cpu.c:(.text+0x400): undefined reference to `timed_topology_update' Fix it by moving the empty version of timed_topology_update() into the existing #ifdef block, which has the right guard of SPLPAR && NUMA. Fixes: cee5405da402 ("powerpc/hotplug: Improve responsiveness of hotplug change") Signed-off-by: Michael Ellerman arch/powerpc/include/asm/topology.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 2c5d5b13c6eb79f5677e206b8aad59b3a2097f60 Author: Eric Dumazet Date: Mon May 7 09:02:25 2018 -0700 llc: better deal with too small mtu syzbot loves to set very small mtu on devices, since it brings joy. We must make llc_ui_sendmsg() fool proof. usercopy: Kernel memory overwrite attempt detected to wrapped address (offset 0, size 18446612139802320068)! kernel BUG at mm/usercopy.c:100! invalid opcode: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 17464 Comm: syz-executor1 Not tainted 4.17.0-rc3+ #36 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:usercopy_abort+0xbb/0xbd mm/usercopy.c:88 RSP: 0018:ffff8801868bf800 EFLAGS: 00010282 RAX: 000000000000006c RBX: ffffffff87d2fb00 RCX: 0000000000000000 RDX: 000000000000006c RSI: ffffffff81610731 RDI: ffffed0030d17ef6 RBP: ffff8801868bf858 R08: ffff88018daa4200 R09: ffffed003b5c4fb0 R10: ffffed003b5c4fb0 R11: ffff8801dae27d87 R12: ffffffff87d2f8e0 R13: ffffffff87d2f7a0 R14: ffffffff87d2f7a0 R15: ffffffff87d2f7a0 FS: 00007f56a14ac700(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2bc21000 CR3: 00000001abeb1000 CR4: 00000000001426f0 DR0: 0000000020000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000030602 Call Trace: check_bogus_address mm/usercopy.c:153 [inline] __check_object_size+0x5d9/0x5d9 mm/usercopy.c:256 check_object_size include/linux/thread_info.h:108 [inline] check_copy_size include/linux/thread_info.h:139 [inline] copy_from_iter_full include/linux/uio.h:121 [inline] memcpy_from_msg include/linux/skbuff.h:3305 [inline] llc_ui_sendmsg+0x4b1/0x1530 net/llc/af_llc.c:941 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:639 __sys_sendto+0x3d7/0x670 net/socket.c:1789 __do_sys_sendto net/socket.c:1801 [inline] __se_sys_sendto net/socket.c:1797 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1797 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455979 RSP: 002b:00007f56a14abc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f56a14ac6d4 RCX: 0000000000455979 RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000018 RBP: 000000000072bea0 R08: 00000000200012c0 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000548 R14: 00000000006fbf60 R15: 0000000000000000 Code: 55 c0 e8 c0 55 bb ff ff 75 c8 48 8b 55 c0 4d 89 f9 ff 75 d0 4d 89 e8 48 89 d9 4c 89 e6 41 56 48 c7 c7 80 fa d2 87 e8 a0 0b a3 ff <0f> 0b e8 95 55 bb ff e8 c0 a8 f7 ff 8b 95 14 ff ff ff 4d 89 e8 RIP: usercopy_abort+0xbb/0xbd mm/usercopy.c:88 RSP: ffff8801868bf800 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller net/llc/af_llc.c | 3 +++ 1 file changed, 3 insertions(+) commit 895b61760bec60e0b5dbfc4d9e2c8e6299da8f81 Merge: a9f71d0 a09bd81 Author: David S. Miller Date: Tue May 8 00:06:45 2018 -0400 Merge branch 'Aquantia-various-patches-2018-05' Igor Russkikh says: ==================== Aquantia various patches 2018-05 These are two patches covering issues found during test cycles: First is that driver should declare valid vlan_features Second fix is about correct allocation of MSI interrupts on some systems. ==================== Signed-off-by: David S. Miller commit a09bd81b5413d1b4d705c6c5303b5d311069da22 Author: Igor Russkikh Date: Mon May 7 16:10:39 2018 +0300 net: aquantia: Limit number of vectors to actually allocated irqs Driver should use pci_alloc_irq_vectors return value to correct number of allocated vectors and napi instances. Otherwise it'll panic later in pci_irq_vector. Driver also should allow more than one MSI vectors to be allocated. Error return path from pci_alloc_irq_vectors is also fixed to revert resources in a correct sequence when error happens. Reported-by: Long, Nicholas Fixes: 23ee07a ("net: aquantia: Cleanup pci functions module") Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 1 + drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 1 + drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 10 deletions(-) commit 8c61ab7f111a2b29d051348b9cb9a39804ebf1f8 Author: Igor Russkikh Date: Mon May 7 16:10:38 2018 +0300 net: aquantia: driver should correctly declare vlan_features bits In particular, not reporting SG forced skbs to be linear for vlan interfaces over atlantic NIC. With this fix it is possible to enable SG feature on device and therefore optimize performance. Reported-by: Ma Yuying Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 ++ 1 file changed, 2 insertions(+) commit a9f71d0de68db84de610b09cb72e8eb0f621d0e1 Author: Georg Hofmann Date: Mon May 7 14:03:18 2018 +0200 trivial: fix inconsistent help texts This patch removes "experimental" from the help text where depends on CONFIG_EXPERIMENTAL was already removed. Signed-off-by: Georg Hofmann Signed-off-by: David S. Miller net/ipv6/Kconfig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 5ed3fde21331407a319e966a0582195988b4f4f0 Author: Steffen Klassert Date: Mon May 7 12:39:30 2018 +0200 MAINTAINERS: Update the 3c59x network driver entry Replace my old E-Mail address with a working one. While at it, change the maintainance status to 'Odd Fixes'. I'm still around with some knowledge, but don't actively maintain it anymore. Signed-off-by: Steffen Klassert Signed-off-by: David S. Miller MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa89adba1941e4f3b213399b81732a5c12fd9131 Author: Jens Remus Date: Thu May 3 13:52:47 2018 +0200 scsi: zfcp: fix infinite iteration on ERP ready list zfcp_erp_adapter_reopen() schedules blocking of all of the adapter's rports via zfcp_scsi_schedule_rports_block() and enqueues a reopen adapter ERP action via zfcp_erp_action_enqueue(). Both are separately processed asynchronously and concurrently. Blocking of rports is done in a kworker by zfcp_scsi_rport_work(). It calls zfcp_scsi_rport_block(), which then traces a DBF REC "scpdely" via zfcp_dbf_rec_trig(). zfcp_dbf_rec_trig() acquires the DBF REC spin lock and then iterates with list_for_each() over the adapter's ERP ready list without holding the ERP lock. This opens a race window in which the current list entry can be moved to another list, causing list_for_each() to iterate forever on the wrong list, as the erp_ready_head is never encountered as terminal condition. Meanwhile the ERP action can be processed in the ERP thread by zfcp_erp_thread(). It calls zfcp_erp_strategy(), which acquires the ERP lock and then calls zfcp_erp_action_to_running() to move the ERP action from the ready to the running list. zfcp_erp_action_to_running() can move the ERP action using list_move() just during the aforementioned race window. It then traces a REC RUN "erator1" via zfcp_dbf_rec_run(). zfcp_dbf_rec_run() tries to acquire the DBF REC spin lock. If this is held by the infinitely looping kworker, it effectively spins forever. Example Sequence Diagram: Process ERP Thread rport_work ------------------- ------------------- ------------------- zfcp_erp_adapter_reopen() zfcp_erp_adapter_block() zfcp_scsi_schedule_rports_block() lock ERP zfcp_scsi_rport_work() zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_ADAPTER) list_add_tail() on ready !(rport_task==RPORT_ADD) wake_up() ERP thread zfcp_scsi_rport_block() zfcp_dbf_rec_trig() zfcp_erp_strategy() zfcp_dbf_rec_trig() unlock ERP lock DBF REC zfcp_erp_wait() lock ERP | zfcp_erp_action_to_running() | list_for_each() ready | list_move() current entry | ready to running | zfcp_dbf_rec_run() endless loop over running | zfcp_dbf_rec_run_lvl() | lock DBF REC spins forever Any adapter recovery can trigger this, such as setting the device offline or reboot. V4.9 commit 4eeaa4f3f1d6 ("zfcp: close window with unblocked rport during rport gone") introduced additional tracing of (un)blocking of rports. It missed that the adapter->erp_lock must be held when calling zfcp_dbf_rec_trig(). This fix uses the approach formerly introduced by commit aa0fec62391c ("[SCSI] zfcp: Fix sparse warning by providing new entry in dbf") that got later removed by commit ae0904f60fab ("[SCSI] zfcp: Redesign of the debug tracing for recovery actions."). Introduce zfcp_dbf_rec_trig_lock(), a wrapper for zfcp_dbf_rec_trig() that acquires and releases the adapter->erp_lock for read. Reported-by: Sebastian Ott Signed-off-by: Jens Remus Fixes: 4eeaa4f3f1d6 ("zfcp: close window with unblocked rport during rport gone") Cc: # 2.6.32+ Reviewed-by: Benjamin Block Signed-off-by: Steffen Maier Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_dbf.c | 23 ++++++++++++++++++++++- drivers/s390/scsi/zfcp_ext.h | 5 ++++- drivers/s390/scsi/zfcp_scsi.c | 14 +++++++------- 3 files changed, 33 insertions(+), 9 deletions(-) commit 1822f638e8af1f5e277e61d2245ffa826c22a4a4 Merge: 080324c b4331a6 Author: David S. Miller Date: Mon May 7 23:51:30 2018 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2018-05-07 1) Always verify length of provided sadb_key to fix a slab-out-of-bounds read in pfkey_add. From Kevin Easton. 2) Make sure that all states are really deleted before we check that the state lists are empty. Otherwise we trigger a warning. 3) Fix MTU handling of the VTI6 interfaces on interfamily tunnels. From Stefano Brivio. ==================== Signed-off-by: David S. Miller commit 080324c36ade319f57e505633ab54f6f53289b45 Author: Andre Tomt Date: Mon May 7 04:24:39 2018 +0200 net/tls: Fix connection stall on partial tls record In the case of writing a partial tls record we forgot to clear the ctx->in_tcp_sendpages flag, causing some connections to stall. Fixes: c212d2c7fc47 ("net/tls: Don't recursively call push_record during tls_write_space callbacks") Signed-off-by: Andre Tomt Signed-off-by: David S. Miller net/tls/tls_main.c | 1 + 1 file changed, 1 insertion(+) commit 53bc017f72b3b7f7f1bad3043c2d6dd87331ea44 Author: Wolfram Sang Date: Sun May 6 13:23:52 2018 +0200 net: flow_dissector: fix typo 'can by' to 'can be' Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller include/net/flow_dissector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9255bacd57a5a247be91ce2b81ff09e15a0b8822 Author: Andrew Lunn Date: Sat May 5 20:58:22 2018 +0200 net: dsa: mv88e6xxx: Fix PHY interrupts by parameterising PHY base address Most of the mv88e6xxx switches have the PHYs at address 0, 1, 2, ... The 6341 however has the PHYs at 0x10, 0x11, 0x12. Add a parameter to the info structure for this base address. Testing of 6f88284f3bd7 ("net: dsa: mv88e6xxx: Add MDIO interrupts for internal PHYs") was performed on the 6341. So it works only on the 6341. Use this base information to correctly set the interrupt. Fixes: 6f88284f3bd7 ("net: dsa: mv88e6xxx: Add MDIO interrupts for internal PHYs") Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 26 ++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/chip.h | 1 + drivers/net/dsa/mv88e6xxx/global2.c | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) commit 98f0a39529e553bb45c0a7d775d2cc2afe9ed91d Author: Eric Dumazet Date: Sat May 5 08:35:04 2018 -0700 tls: fix use after free in tls_sk_proto_close syzbot reported a use-after-free in tls_sk_proto_close Add a boolean value to cleanup a bit this function. BUG: KASAN: use-after-free in tls_sk_proto_close+0x8ab/0x9c0 net/tls/tls_main.c:297 Read of size 1 at addr ffff8801ae40a858 by task syz-executor363/4503 CPU: 0 PID: 4503 Comm: syz-executor363 Not tainted 4.17.0-rc3+ #34 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:430 tls_sk_proto_close+0x8ab/0x9c0 net/tls/tls_main.c:297 inet_release+0x104/0x1f0 net/ipv4/af_inet.c:427 inet6_release+0x50/0x70 net/ipv6/af_inet6.c:460 sock_release+0x96/0x1b0 net/socket.c:594 sock_close+0x16/0x20 net/socket.c:1149 __fput+0x34d/0x890 fs/file_table.c:209 ____fput+0x15/0x20 fs/file_table.c:243 task_work_run+0x1e4/0x290 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x1aee/0x2730 kernel/exit.c:865 do_group_exit+0x16f/0x430 kernel/exit.c:968 get_signal+0x886/0x1960 kernel/signal.c:2469 do_signal+0x98/0x2040 arch/x86/kernel/signal.c:810 exit_to_usermode_loop+0x28a/0x310 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:265 [inline] do_syscall_64+0x6ac/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4457b9 RSP: 002b:00007fdf4d766da8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00000000006dac3c RCX: 00000000004457b9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000006dac3c RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dac38 R13: 3692738801137283 R14: 6bf92c39443c4c1d R15: 0000000000000006 Allocated by task 4498: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 kmem_cache_alloc_trace+0x152/0x780 mm/slab.c:3620 kmalloc include/linux/slab.h:512 [inline] kzalloc include/linux/slab.h:701 [inline] create_ctx net/tls/tls_main.c:521 [inline] tls_init+0x1f9/0xb00 net/tls/tls_main.c:633 tcp_set_ulp+0x1bc/0x520 net/ipv4/tcp_ulp.c:153 do_tcp_setsockopt.isra.39+0x44a/0x2600 net/ipv4/tcp.c:2588 tcp_setsockopt+0xc1/0xe0 net/ipv4/tcp.c:2893 sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:3039 __sys_setsockopt+0x1bd/0x390 net/socket.c:1903 __do_sys_setsockopt net/socket.c:1914 [inline] __se_sys_setsockopt net/socket.c:1911 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1911 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 4503: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xd9/0x260 mm/slab.c:3813 tls_sw_free_resources+0x2a3/0x360 net/tls/tls_sw.c:1037 tls_sk_proto_close+0x67c/0x9c0 net/tls/tls_main.c:288 inet_release+0x104/0x1f0 net/ipv4/af_inet.c:427 inet6_release+0x50/0x70 net/ipv6/af_inet6.c:460 sock_release+0x96/0x1b0 net/socket.c:594 sock_close+0x16/0x20 net/socket.c:1149 __fput+0x34d/0x890 fs/file_table.c:209 ____fput+0x15/0x20 fs/file_table.c:243 task_work_run+0x1e4/0x290 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x1aee/0x2730 kernel/exit.c:865 do_group_exit+0x16f/0x430 kernel/exit.c:968 get_signal+0x886/0x1960 kernel/signal.c:2469 do_signal+0x98/0x2040 arch/x86/kernel/signal.c:810 exit_to_usermode_loop+0x28a/0x310 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:265 [inline] do_syscall_64+0x6ac/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801ae40a800 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 88 bytes inside of 256-byte region [ffff8801ae40a800, ffff8801ae40a900) The buggy address belongs to the page: page:ffffea0006b90280 count:1 mapcount:0 mapping:ffff8801ae40a080 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801ae40a080 0000000000000000 000000010000000c raw: ffffea0006bea9e0 ffffea0006bc94a0 ffff8801da8007c0 0000000000000000 page dumped because: kasan: bad access detected Fixes: dd0bed1665d6 ("tls: support for Inline tls record") Signed-off-by: Eric Dumazet Cc: Atul Gupta Cc: Steve Wise Cc: Ilya Lesokhin Cc: Aviad Yehezkel Cc: Dave Watson Reported-by: syzbot Signed-off-by: David S. Miller net/tls/tls_main.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 59d8d4434f429b4fa8a346fd889058bda427a837 Author: Xin Long Date: Sat May 5 14:59:47 2018 +0800 sctp: delay the authentication for the duplicated cookie-echo chunk Now sctp only delays the authentication for the normal cookie-echo chunk by setting chunk->auth_chunk in sctp_endpoint_bh_rcv(). But for the duplicated one with auth, in sctp_assoc_bh_rcv(), it does authentication first based on the old asoc, which will definitely fail due to the different auth info in the old asoc. The duplicated cookie-echo chunk will create a new asoc with the auth info from this chunk, and the authentication should also be done with the new asoc's auth info for all of the collision 'A', 'B' and 'D'. Otherwise, the duplicated cookie-echo chunk with auth will never pass the authentication and create the new connection. This issue exists since very beginning, and this fix is to make sctp_assoc_bh_rcv() follow the way sctp_endpoint_bh_rcv() does for the normal cookie-echo chunk to delay the authentication. While at it, remove the unused params from sctp_sf_authenticate() and define sctp_auth_chunk_verify() used for all the places that do the delayed authentication. v1->v2: fix the typo in changelog as Marcelo noticed. Acked-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/associola.c | 30 ++++++++++++++++- net/sctp/sm_statefuns.c | 86 ++++++++++++++++++++++++++----------------------- 2 files changed, 75 insertions(+), 41 deletions(-) commit a86b74d363708d0b04305f356fd3429c7b560a64 Author: Moritz Fischer Date: Fri May 4 10:18:34 2018 -0700 net: nixge: Address compiler warnings about signedness Fixes the following warnings: warning: pointer targets in passing argument 1 of ‘is_valid_ether_addr’ differ in signedness [-Wpointer-sign] if (mac_addr && is_valid_ether_addr(mac_addr)) { ^~~~~~~~ expected ‘const u8 * {aka const unsigned char *}’ but argument is of type ‘const char *’ static inline bool is_valid_ether_addr(const u8 *addr) ^~~~~~~~~~~~~~~~~~~ warning: pointer targets in passing argument 2 of ‘ether_addr_copy’ differ in signedness [-Wpointer-sign] ether_addr_copy(ndev->dev_addr, mac_addr); ^~~~~~~~ expected ‘const u8 * {aka const unsigned char *}’ but argument is of type ‘const char *’ static inline void ether_addr_copy(u8 *dst, const u8 *src) Signed-off-by: Moritz Fischer Signed-off-by: David S. Miller drivers/net/ethernet/ni/nixge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abcd3d6fc640aff48b17900734eff134f27fdf2a Author: Moritz Fischer Date: Fri May 4 10:18:33 2018 -0700 net: nixge: Fix error path for obtaining mac address Fix issue where nixge_get_nvmem_address() returns a non-NULL return value on a failed nvmem_cell_get() that causes an invalid access when error value encoded in pointer is dereferenced. Furthermore ensure that buffer allocated by nvmem_cell_read() actually gets kfreed() if the function succeeds. Fixes commit 492caffa8a1a ("net: ethernet: nixge: Add support for National Instruments XGE netdev") Reported-by: Alex Williams Signed-off-by: Moritz Fischer Signed-off-by: David S. Miller drivers/net/ethernet/ni/nixge.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 1751eb42ddb56b1e0a28ade5c5f19b7961a6f0c2 Author: Anders Roxell Date: Fri May 4 18:47:25 2018 +0200 selftests: net: use TEST_PROGS_EXTENDED When a script file that isn't generated uses the variable TEST_GEN_PROGS_EXTENDED and a 'make -C tools/testing/selftests clean' is performed the script file gets removed and git shows the file as deleted. For script files that isn't generated TEST_PROGS_EXTENDED should be used. Fixes: 9faedd643fd9 ("selftests: net: add in_netns.sh TEST_GEN_PROGS_EXTENDED") Signed-off-by: Anders Roxell Signed-off-by: David S. Miller tools/testing/selftests/net/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a35a9027f64d588d2fd9436dda4126e8d5647d7 Author: Arnaldo Carvalho de Melo Date: Mon May 7 15:27:01 2018 -0300 Revert "perf pmu: Fix pmu events parsing rule" As reported by Adrian Hunter, this breaks intel_pt event parsing: # perf record -e intel_pt//u uname event syntax error: 'intel_pt//u' \___ parser error Run 'perf list' for a list of valid events Usage: perf record [] [] or: perf record [] -- [] -e, --event event selector. use 'perf list' to list available events # This reverts commit 9a4a931ce847f4aaa12edf11b2e050e18bf45910. Reported-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ye1o2mji7x68xotiot1tn1gp@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit de5cb6eb514ebe241e3edeb290cb41deb380b81d Author: Martin Schwidefsky Date: Mon Apr 23 14:31:36 2018 +0200 s390: use expoline thunks in the BPF JIT The BPF JIT need safe guarding against spectre v2 in the sk_load_xxx assembler stubs and the indirect branches generated by the JIT itself need to be converted to expolines. Signed-off-by: Martin Schwidefsky arch/s390/net/bpf_jit.S | 16 ++++++----- arch/s390/net/bpf_jit_comp.c | 63 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 71 insertions(+), 8 deletions(-) commit 6deaa3bbca804b2a3627fd685f75de64da7be535 Author: Martin Schwidefsky Date: Tue Apr 24 15:32:08 2018 +0200 s390: extend expoline to BC instructions The BPF JIT uses a 'b (%r)' instruction in the definition of the sk_load_word and sk_load_half functions. Add support for branch-on-condition instructions contained in the thunk code of an expoline. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/nospec-insn.h | 57 +++++++++++++++++++++++++++++++++++++ arch/s390/kernel/nospec-branch.c | 25 ++++++++++++---- 2 files changed, 77 insertions(+), 5 deletions(-) commit 9f18fff63cfd6f559daa1eaae60640372c65f84b Author: Martin Schwidefsky Date: Tue Apr 24 11:18:49 2018 +0200 s390: remove indirect branch from do_softirq_own_stack The inline assembly to call __do_softirq on the irq stack uses an indirect branch. This can be replaced with a normal relative branch. Cc: stable@vger.kernel.org # 4.16 Fixes: f19fbd5ed6 ("s390: introduce execute-trampolines for branches") Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/kernel/irq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4253b0e0627ee3461e64c2495c616f1c8f6b127b Author: Martin Schwidefsky Date: Tue Apr 24 08:23:54 2018 +0200 s390: move spectre sysfs attribute code The nospec-branch.c file is compiled without the gcc options to generate expoline thunks. The return branch of the sysfs show functions cpu_show_spectre_v1 and cpu_show_spectre_v2 is an indirect branch as well. These need to be compiled with expolines. Move the sysfs functions for spectre reporting to a separate file and loose an '.' for one of the messages. Cc: stable@vger.kernel.org # 4.16 Fixes: d424986f1d ("s390: add sysfs attributes for spectre") Signed-off-by: Martin Schwidefsky arch/s390/kernel/Makefile | 1 + arch/s390/kernel/nospec-branch.c | 19 ------------------- arch/s390/kernel/nospec-sysfs.c | 21 +++++++++++++++++++++ 3 files changed, 22 insertions(+), 19 deletions(-) commit c50c84c3ac4d5db683904bdb3257798b6ef980ae Author: Martin Schwidefsky Date: Wed Apr 25 18:41:30 2018 +0200 s390/kernel: use expoline for indirect branches The assember code in arch/s390/kernel uses a few more indirect branches which need to be done with execute trampolines for CONFIG_EXPOLINE=y. Cc: stable@vger.kernel.org # 4.16 Fixes: f19fbd5ed6 ("s390: introduce execute-trampolines for branches") Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/kernel/base.S | 24 ++++++++++++++---------- arch/s390/kernel/reipl.S | 7 +++++-- arch/s390/kernel/swsusp.S | 10 ++++++---- 3 files changed, 25 insertions(+), 16 deletions(-) commit 23a4d7fd34856da8218c4cfc23dba7a6ec0a423a Author: Martin Schwidefsky Date: Wed Apr 25 18:35:26 2018 +0200 s390/ftrace: use expoline for indirect branches The return from the ftrace_stub, _mcount, ftrace_caller and return_to_handler functions is done with "br %r14" and "br %r1". These are indirect branches as well and need to use execute trampolines for CONFIG_EXPOLINE=y. The ftrace_caller function is a special case as it returns to the start of a function and may only use %r0 and %r1. For a pre z10 machine the standard execute trampoline uses a LARL + EX to do this, but this requires *two* registers in the range %r1..%r15. To get around this the 'br %r1' located in the lowcore is used, then the EX instruction does not need an address register. But the lowcore trick may only be used for pre z14 machines, with noexec=on the mapping for the first page may not contain instructions. The solution for that is an ALTERNATIVE in the expoline THUNK generated by 'GEN_BR_THUNK %r1' to switch to EXRL, this relies on the fact that a machine that supports noexec=on has EXRL as well. Cc: stable@vger.kernel.org # 4.16 Fixes: f19fbd5ed6 ("s390: introduce execute-trampolines for branches") Signed-off-by: Martin Schwidefsky arch/s390/include/asm/nospec-insn.h | 12 ++++++++++++ arch/s390/kernel/asm-offsets.c | 1 + arch/s390/kernel/mcount.S | 14 +++++++++----- 3 files changed, 22 insertions(+), 5 deletions(-) commit d1ecfa9d1f402366b1776fbf84e635678a51414f Author: van der Linden, Frank Date: Fri May 4 16:11:00 2018 -0400 x86/xen: Reset VCPU0 info pointer after shared_info remap This patch fixes crashes during boot for HVM guests on older (pre HVM vector callback) Xen versions. Without this, current kernels will always fail to boot on those Xen versions. Sample stack trace: BUG: unable to handle kernel paging request at ffffffffff200000 IP: __xen_evtchn_do_upcall+0x1e/0x80 PGD 1e0e067 P4D 1e0e067 PUD 1e10067 PMD 235c067 PTE 0 Oops: 0002 [#1] SMP PTI Modules linked in: CPU: 0 PID: 512 Comm: kworker/u2:0 Not tainted 4.14.33-52.13.amzn1.x86_64 #1 Hardware name: Xen HVM domU, BIOS 3.4.3.amazon 11/11/2016 task: ffff88002531d700 task.stack: ffffc90000480000 RIP: 0010:__xen_evtchn_do_upcall+0x1e/0x80 RSP: 0000:ffff880025403ef0 EFLAGS: 00010046 RAX: ffffffff813cc760 RBX: ffffffffff200000 RCX: ffffc90000483ef0 RDX: ffff880020540a00 RSI: ffff880023c78000 RDI: 000000000000001c RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff880025403f5c R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff880025400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffff200000 CR3: 0000000001e0a000 CR4: 00000000000006f0 Call Trace: do_hvm_evtchn_intr+0xa/0x10 __handle_irq_event_percpu+0x43/0x1a0 handle_irq_event_percpu+0x20/0x50 handle_irq_event+0x39/0x60 handle_fasteoi_irq+0x80/0x140 handle_irq+0xaf/0x120 do_IRQ+0x41/0xd0 common_interrupt+0x7d/0x7d During boot, the HYPERVISOR_shared_info page gets remapped to make it work with KASLR. This means that any pointer derived from it needs to be adjusted. The only value that this applies to is the vcpu_info pointer for VCPU 0. For PV and HVM with the callback vector feature, this gets done via the smp_ops prepare_boot_cpu callback. Older Xen versions do not support the HVM callback vector, so there is no Xen-specific smp_ops set up in that scenario. So, the vcpu_info pointer for VCPU 0 never gets set to the proper value, and the first reference of it will be bad. Fix this by resetting it immediately after the remap. Signed-off-by: Frank van der Linden Reviewed-by: Eduardo Valentin Reviewed-by: Alakesh Haloi Reviewed-by: Vallish Vaidyeshwara Reviewed-by: Boris Ostrovsky Cc: Juergen Gross Cc: Boris Ostrovsky Cc: xen-devel@lists.xenproject.org Signed-off-by: Boris Ostrovsky arch/x86/xen/enlighten_hvm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 914eac248d876f9c00cd1792ffec3d182c863f13 Author: Sara Sharon Date: Fri Apr 20 13:49:19 2018 +0300 mac80211: use timeout from the AddBA response instead of the request 2016 spec, section 10.24.2 specifies that the block ack timeout in the ADD BA request is advisory. That means we should check the value in the response and act upon it (same as buffer size). Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/agg-tx.c | 4 ++++ net/mac80211/tx.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 5981ec36688c49b7262f399c1a10edecc6e55ed2 Author: Arnaldo Carvalho de Melo Date: Mon May 7 13:23:19 2018 -0300 tools headers kvm: Sync ARM UAPI headers with the kernel sources To sync with the changes made in 85bd0ba1ff98 ("arm/arm64: KVM: Add PSCI version selection API"), that do not cause any changes in the tools, just to silence the build warning: Warning: Kernel ABI header at 'tools/arch/arm/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm/include/uapi/asm/kvm.h' Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h' Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Marc Zyngier Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-7u37pv09xtvet1ll27840w73@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/arm/include/uapi/asm/kvm.h | 6 ++++++ tools/arch/arm64/include/uapi/asm/kvm.h | 6 ++++++ 2 files changed, 12 insertions(+) commit d0e9f4c1a4e777c4d1122758137fc47238f4f015 Author: Arnaldo Carvalho de Melo Date: Mon May 7 12:26:23 2018 -0300 tools headers kvm: Sync uapi/linux/kvm.h with the kernel sources The changes in 5e62493f1a70 ("x86/headers/UAPI: Move DISABLE_EXITS KVM capability bits to the UAPI") do not requires changes in the tooling nor will trigger the automatic update of used ioctl string tables, copy it to silence this build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h' Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: KarimAllah Ahmed Cc: Namhyung Kim Cc: Radim Krčmář Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-8o5auh1lqglsgl1q97x00tlv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/kvm.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 605e71cd007b1897a4c5eda952acadd61b6a98f0 Author: Arnaldo Carvalho de Melo Date: Mon May 7 12:22:37 2018 -0300 tools headers: Sync x86 cpufeatures.h with the kernel sources The 912413057395 ("x86/cpufeatures: Enumerate cldemote instruction") doesn't requires changes in the tools, just copy it to silence this warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h' Cc: Adrian Hunter Cc: David Ahern Cc: Fenghua Yu Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-1vo20y5z2drlujfpltjudwk8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) commit ea9032fa2e4e91ae15facff5b7c4b2a84c1e40af Author: William Cohen Date: Thu May 3 15:50:32 2018 -0400 perf vendor events intel: Remove duplicated entry for westmereep-dp in mapfile.csv Signed-off-by: William Cohen Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180503195032.28871-1-wcohen@redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 1 - 1 file changed, 1 deletion(-) commit 675c7215aacf54242b2e8bc64bab698abbe764db Author: Clément Péron Date: Thu May 3 17:32:07 2018 +0200 ARM: dts: cygnus: fix irq type for arm global timer As per ARM documentation PPI(0) ID27 - global timer interrupt is rising-edge sensitive. set IRQ triggering type to IRQ_TYPE_EDGE_RISING for ARM Global timers. Fixes: c9ad7bc5fe3 ("ARM: dts: Enable Broadcom Cygnus SoC") Signed-off-by: Clément Péron Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-cygnus.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f142f08bf7ecc41c3e71e05b765ea654047cf0c0 Author: Florian La Roche Date: Sun May 6 19:34:07 2018 +0200 Fix typo in comment. CONFIG_PRREMPT -> CONFIG_PREEMPT Signed-off-by: Florian La Roche Signed-off-by: Linus Torvalds init/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2fcd01335ac7e022c2e45d03e815129322519fa Merge: 2ba5622f 596b07a Author: David S. Miller Date: Mon May 7 11:38:37 2018 -0400 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Johan Hedberg says: ==================== pull request: bluetooth 2018-05-07 Here are a few more Bluetooth fixes for the 4.17 kernel, all for the btusb driver. Two relate to the needs_reset_resume table, and one is a revert of a patch for Atheros 1525/QCA6174 which caused a regression for some people. ==================== Signed-off-by: David S. Miller commit 76787cf4af9b833353a4cc22364234632b2062d2 Merge: 75bc37f f130307 Author: Linus Torvalds Date: Mon May 7 05:33:29 2018 -1000 Merge tag 'devicetree-fixes-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree fixes from Rob Herring: - fix path to display timing binding - fix some typos in interrupt-names and clock-names - fix a resource leak on overlay removal - add missing documentation for R8A77965 DMA, serial, and net - cleanup sunxi pinctrl description - add Kieback & Peter GmbH vendor prefix * tag 'devicetree-fixes-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: panel: lvds: Fix path to display timing bindings dt-bindings: mvebu-uart: DT fix s/interrupts-names/interrupt-names/ dt-bindings: meson-uart: DT fix s/clocks-names/clock-names/ of: overlay: Stop leaking resources on overlay removal dtc: checks: drop warning for missing PCI bridge bus-range dt-bindings: dmaengine: rcar-dmac: document R8A77965 support dt-bindings: serial: sh-sci: Add support for r8a77965 (H)SCIF dt-bindings: net: ravb: Add support for r8a77965 SoC dt-bindings: pinctrl: sunxi: Fix reference to driver doc: Add vendor prefix for Kieback & Peter GmbH commit 0d74d872c3f8b9cb3d096fb932a063b43b37f188 Author: Mathieu Malaterre Date: Sat May 5 22:00:37 2018 +0200 driver core: add __printf verification to __ata_ehi_pushv_desc __printf is useful to verify format and arguments. Remove the following warning (with W=1): drivers/ata/libata-eh.c:183:10: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] Signed-off-by: Mathieu Malaterre Signed-off-by: Tejun Heo drivers/ata/libata-eh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 41bd6adf3c5d3990d7a67639aff53d54483744fa Author: Tony Lindgren Date: Mon May 7 08:28:17 2018 -0700 Revert "ARM: dts: logicpd-som-lv: Fix pinmux controller references" This reverts commit 30443b3104527c83102fa85347ae4bf21caaf77a. Turns out this causes other issues as reported by Adam. Signed-off-by: Tony Lingren arch/arm/boot/dts/logicpd-som-lv.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 2abb80dad3afa9170ae19ca03bb7b4cd1ec06d62 Author: Yisheng Xie Date: Wed Apr 25 16:25:07 2018 +0800 perf bench numa: Fix typo in options 'R' means access the data via reads instead of writes, fix this typo. Signed-off-by: Yisheng Xie Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1524644707-11030-1-git-send-email-xieyisheng1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12d9f07022dcde261ad16e9a11f45096dc68b03c Author: Jianchao Wang Date: Fri May 4 16:01:57 2018 +0800 nvme: fix use-after-free in nvme_free_ns_head Currently only nvme_ctrl will take a reference counter of nvme_subsystem, nvme_ns_head also needs it. Otherwise nvme_free_ns_head will access the nvme_subsystem.ns_ida which has been freed by __nvme_release_subsystem after all the reference of nvme_subsystem have been released by nvme_free_ctrl. This could cause memory corruption. BUG: KASAN: use-after-free in radix_tree_next_chunk+0x9f/0x4b0 Read of size 8 at addr ffff88036494d2e8 by task fio/1815 CPU: 1 PID: 1815 Comm: fio Kdump: loaded Tainted: G W 4.17.0-rc1+ #18 Hardware name: LENOVO 10MLS0E339/3106, BIOS M1AKT22A 06/27/2017 Call Trace: dump_stack+0x91/0xeb print_address_description+0x6b/0x290 kasan_report+0x261/0x360 radix_tree_next_chunk+0x9f/0x4b0 ida_remove+0x8b/0x180 ida_simple_remove+0x26/0x40 nvme_free_ns_head+0x58/0xc0 __blkdev_put+0x30a/0x3a0 blkdev_close+0x44/0x50 __fput+0x184/0x380 task_work_run+0xaf/0xe0 do_exit+0x501/0x1440 do_group_exit+0x89/0x140 __x64_sys_exit_group+0x28/0x30 do_syscall_64+0x72/0x230 Signed-off-by: Jianchao Wang Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch drivers/nvme/host/core.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7a109673899b6d5b147307999efe2392181acee3 Author: Andrzej Hajda Date: Mon Apr 9 08:27:08 2018 +0200 drm/bridge/sii8620: add Kconfig dependency on extcon The driver can work with or without extcon framework, but if extcon is build as module, sii8620 should be build as module as well. Fixes: 688838442147 ("drm/bridge/sii8620: use micro-USB cable detection logic to detect MHL") Reported-by: kbuild test robot Signed-off-by: Andrzej Hajda Reviewed-by: Chanwoo Choi Link: https://patchwork.freedesktop.org/patch/msgid/20180409062708.4326-1-a.hajda@samsung.com Signed-off-by: Sean Paul drivers/gpu/drm/bridge/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 47aaaec818dfd1009d1358974a2931f05dd57203 Author: Tomi Valkeinen Date: Wed May 2 12:11:59 2018 +0300 drm/omap: handle alloc failures in omap_connector Handle memory allocation failures in omap_connector to avoid NULL derefs. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20180502091159.7071-5-tomi.valkeinen@ti.com Reviewed-by: Benoit Parrot Reviewed-by: Peter Ujfalusi Signed-off-by: Sean Paul drivers/gpu/drm/omapdrm/omap_connector.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7f26eee572167926806b6fcb703bb5f8e452c398 Author: Tomi Valkeinen Date: Wed May 2 12:11:58 2018 +0300 drm/omap: add missing linefeeds to prints A bunch of debug and error prints are missing linefeeds. Add those. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20180502091159.7071-4-tomi.valkeinen@ti.com Reviewed-by: Benoit Parrot Reviewed-by: Peter Ujfalusi Signed-off-by: Sean Paul drivers/gpu/drm/omapdrm/dss/dispc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e1cdab6e5f9a52e0bdf34363ec0fdab0e2328ba9 Author: Tomi Valkeinen Date: Wed May 2 12:11:57 2018 +0300 drm/omap: handle error if scale coefs are not found If get_scale_coef functions fail, they return NULL, but we never check the return value and could do a NULL deref. This should not happen as we ought to validate the amount of scaling already earlier, but to be safe, add the necessary check. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20180502091159.7071-3-tomi.valkeinen@ti.com Reviewed-by: Benoit Parrot Reviewed-by: Peter Ujfalusi Signed-off-by: Sean Paul drivers/gpu/drm/omapdrm/dss/dispc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4d6cb5e2fee52af17001e92950f0894304706ee4 Author: Tomi Valkeinen Date: Wed May 2 12:11:56 2018 +0300 drm/omap: check return value from soc_device_match soc_device_match() can return NULL, so add a check and fail if soc_device_match() fails. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20180502091159.7071-2-tomi.valkeinen@ti.com Reviewed-by: Benoit Parrot Reviewed-by: Peter Ujfalusi Signed-off-by: Sean Paul drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6a0f0c55619f0b82a677cab72e77c3444a5eee58 Author: Tomi Valkeinen Date: Thu Mar 29 13:40:37 2018 +0300 drm/omap: fix possible NULL ref issue in tiler_reserve_2d tiler_reserve_2d allocates memory but does not check if it got the memory. Add the check and return ENOMEM on failure. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20180329104038.29154-2-tomi.valkeinen@ti.com Reviewed-by: Emil Velikov Reviewed-by: Laurent Pinchart Signed-off-by: Sean Paul drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 77eeac24b10fc84d3ffd5b11a897dff88dde244d Author: Tomi Valkeinen Date: Thu Mar 29 13:40:36 2018 +0300 drm/omap: fix uninitialized ret variable audio_config function for both HDMI4 and HDMI5 return uninitialized value as the error code if the display is not currently enabled. For some reason this has not caused any issues. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20180329104038.29154-1-tomi.valkeinen@ti.com Reviewed-by: Emil Velikov Reviewed-by: Laurent Pinchart Signed-off-by: Sean Paul drivers/gpu/drm/omapdrm/dss/hdmi4.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4a9fbfcab19d3f71ad2bf0bcb653c4ee84e69c7f Author: Dan Carpenter Date: Wed Apr 18 17:29:37 2018 +0300 drm/omap: silence unititialized variable warning Smatch complains that "area_free" could be used without being initialized. This code is several years old and premusably works fine so this can't be a very serious bug. But it's easy enough to silence the warning. If "area_free" is false at the end of the function then we return -ENOMEM. Signed-off-by: Dan Carpenter Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20180418142937.GA13828@mwanda Signed-off-by: Sean Paul drivers/gpu/drm/omapdrm/tcm-sita.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 164c2416dd40770aba5814f93da835e8a9f7196d Author: Eric Anholt Date: Fri Mar 9 15:32:56 2018 -0800 drm/vc4: Fix oops dereferencing DPI's connector since panel_bridge. In the cleanup, I didn't notice that we needed to dereference the connector for the bus_format. Fix the regression by looking up the first (and only) connector attached to us, and assume that its bus_format is what we want. Some day it would be good to have that part of display_info attached to the bridge, instead. v2: Fix stray whitespace change Signed-off-by: Eric Anholt Fixes: 7b1298e05310 ("drm/vc4: Switch DPI to using the panel-bridge helper.") Link: https://patchwork.freedesktop.org/patch/msgid/20180309233256.1667-1-eric@anholt.net Reviewed-by: Sean Paul Reviewed-by: Boris Brezillon Signed-off-by: Sean Paul drivers/gpu/drm/vc4/vc4_dpi.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit b5cb2e5a1f64d882a155add7522247ab0523051e Author: Ville Syrjälä Date: Wed May 2 21:32:47 2018 +0300 drm/atomic: Clean private obj old_state/new_state in drm_atomic_state_default_clear() Clear the old_state and new_state pointers for private objects in drm_atomic_state_default_clear(). We don't actually have functions to get the new/old state for private objects so getting access to the potentially stale pointers requires a bit more manual labour than for other object types. But let's clear the pointers for private objects as well, if only to avoid future surprises when someone decides to add the functions to get at them. v2: Split private objs to a separate patch (Daniel) Cc: # v4.14+ Cc: Maarten Lankhorst Cc: Laurent Pinchart Cc: Abhay Kumar Fixes: a4370c777406 (drm/atomic: Make private objs proper objects) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180502183247.5746-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul drivers/gpu/drm/drm_atomic.c | 2 ++ 1 file changed, 2 insertions(+) commit f0b408eebc993310bea3f2daae286c40bd3f063b Author: Ville Syrjälä Date: Wed May 2 21:32:47 2018 +0300 drm/atomic: Clean old_state/new_state in drm_atomic_state_default_clear() Clear the old_state and new_state pointers for every object in drm_atomic_state_default_clear(). Otherwise drm_atomic_get_{new,old}_*_state() will hand out stale pointers to anyone who hasn't first confirmed that the object is in fact part of the current atomic transcation, if they are called after we've done the ww backoff dance while hanging on to the same drm_atomic_state. For example, handle_conflicting_encoders() looks like it could hit this since it iterates the full connector list and just calls drm_atomic_get_new_connector_state() for each. And I believe we have now witnessed this happening at least once in i915 check_digital_port_conflicts(). Commit 8b69449d2663 ("drm/i915: Remove last references to drm_atomic_get_existing* macros") changed the safe drm_atomic_get_existing_connector_state() to the unsafe drm_atomic_get_new_connector_state(), which opened the doors for this particular bug there as well. v2: Split private objs out to a separate patch (Daniel) Cc: stable@vger.kernel.org Cc: Maarten Lankhorst Cc: Laurent Pinchart Cc: Abhay Kumar Fixes: 581e49fe6b41 ("drm/atomic: Add new iterators over all state, v3.") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180502183247.5746-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul drivers/gpu/drm/drm_atomic.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 407879b690ba3a6bf29be896d02dad63463bd1c0 Author: Ilan Peer Date: Fri Apr 20 13:49:20 2018 +0300 mac80211: Adjust SAE authentication timeout The IEEE P802.11-REVmd D1.0 specification updated the SAE authentication timeout to be 2000 milliseconds (see dot11RSNASAERetransPeriod). Update the SAE timeout setting accordingly. While at it, reduce some code duplication in the timeout configuration. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/mlme.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit d1361b32e6aec7440c01d5c8fcc54189930a342d Author: Randy Dunlap Date: Thu Apr 26 18:17:31 2018 -0700 mac80211: fix kernel-doc "bad line" warning Fix 88 instances of a kernel-doc warning: ../include/net/mac80211.h:2083: warning: bad line: > Signed-off-by: Randy Dunlap Cc: linux-wireless@vger.kernel.org Cc: Johannes Berg Signed-off-by: Johannes Berg include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bf01ca21e2e0e4561d1a03c48c3d740418702db Author: Johan Hovold Date: Thu Apr 26 09:31:52 2018 +0200 rfkill: gpio: fix memory leak in probe error path Make sure to free the rfkill device in case registration fails during probe. Fixes: 5e7ca3937fbe ("net: rfkill: gpio: convert to resource managed allocation") Cc: stable # 3.13 Cc: Heikki Krogerus Signed-off-by: Johan Hovold Reviewed-by: Heikki Krogerus Signed-off-by: Johannes Berg net/rfkill/rfkill-gpio.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit e8f90c74e6ab64824f3a21521640de7b21050b9d Author: YueHaibing Date: Tue Apr 24 11:08:35 2018 +0800 mac80211_hwsim: fix a possible memory leak in hwsim_new_radio_nl() 'hwname' should be freed before leaving from the error handling cases, otherwise it will cause mem leak Fixes: cb1a5bae5684 ("mac80211_hwsim: add permanent mac address option for new radios") Signed-off-by: YueHaibing Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 1 + 1 file changed, 1 insertion(+) commit edf6a2dfe3889daf97e7c164891a87832169e3e4 Author: Naveen N. Rao Date: Fri May 4 18:44:25 2018 +0530 powerpc/trace/syscalls: Update syscall name matching logic to account for ppc_ prefix Some syscall entry functions on powerpc are prefixed with ppc_/ppc32_/ppc64_ rather than the usual sys_/__se_sys prefix. fork(), clone(), swapcontext() are some examples of syscalls with such entry points. We need to match against these names when initializing ftrace syscall tracing. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ftrace.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 0b7758aaf6543b9a10c8671db559e9d374a3fd95 Author: Naveen N. Rao Date: Fri May 4 18:44:24 2018 +0530 powerpc/trace/syscalls: Update syscall name matching logic On powerpc64 ABIv1, we are enabling syscall tracing for only ~20 syscalls. This is due to commit e145242ea0df6 ("syscalls/core, syscalls/x86: Clean up syscall stub naming convention") which has changed the syscall entry wrapper prefix from "SyS" to "__se_sys". Update the logic for ABIv1 to not just skip the initial dot, but also the "__se_sys" prefix. Fixes: commit e145242ea0df6 ("syscalls/core, syscalls/x86: Clean up syscall stub naming convention") Reported-by: Michael Ellerman Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ftrace.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit c4ec1f0353b342473b93637fd0c3fb524bedbb2d Author: Michael Ellerman Date: Wed May 2 16:57:54 2018 +1000 powerpc/64: Remove unused paca->soft_enabled In commit 4e26bc4a4ed6 ("powerpc/64: Rename soft_enabled to irq_soft_mask") we renamed paca->soft_enabled. But then in commit 8e0b634b1327 ("powerpc/64s: Do not allocate lppaca if we are not virtualized") we added it back. Oops. This happened because the two patches were in flight at the same time and rebased vs each other multiple times, and we missed it in review. Fixes: 8e0b634b1327 ("powerpc/64s: Do not allocate lppaca if we are not virtualized") Signed-off-by: Michael Ellerman arch/powerpc/include/asm/paca.h | 1 - 1 file changed, 1 deletion(-) commit ab9d3db5b320a052452b9cd035599ee3c84bbee9 Author: Etienne Carriere Date: Sun Apr 29 14:22:29 2018 +0200 tee: check shm references are consistent in offset/size This change prevents userland from referencing TEE shared memory outside the area initially allocated by its owner. Prior this change an application could not reference or access memory it did not own but it could reference memory not explicitly allocated by owner but still allocated to the owner due to the memory allocation granule. Reported-by: Alexandre Jutras Signed-off-by: Etienne Carriere Signed-off-by: Jens Wiklander drivers/tee/tee_core.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit bb765d1c331f62b59049d35607ed2e365802bef9 Author: Jann Horn Date: Wed Apr 4 21:03:21 2018 +0200 tee: shm: fix use-after-free via temporarily dropped reference Bump the file's refcount before moving the reference into the fd table, not afterwards. The old code could drop the file's refcount to zero for a short moment before calling get_file() via get_dma_buf(). This code can only be triggered on ARM systems that use Linaro's OP-TEE. Fixes: 967c9cca2cc5 ("tee: generic TEE subsystem") Signed-off-by: Jann Horn Signed-off-by: Jens Wiklander drivers/tee/tee_shm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 97489e0663fa700d6e7febddc43b58df98d7bcda Author: Martin Schwidefsky Date: Mon Apr 23 14:31:36 2018 +0200 s390/lib: use expoline for indirect branches The return from the memmove, memset, memcpy, __memset16, __memset32 and __memset64 functions are done with "br %r14". These are indirect branches as well and need to use execute trampolines for CONFIG_EXPOLINE=y. Cc: stable@vger.kernel.org # 4.16 Fixes: f19fbd5ed6 ("s390: introduce execute-trampolines for branches") Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/lib/mem.S | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 467a3bf219cee12259182c5cb4821f88fd518a51 Author: Martin Schwidefsky Date: Mon Apr 23 14:31:36 2018 +0200 s390/crc32-vx: use expoline for indirect branches The return from the crc32_le_vgfm_16/crc32c_le_vgfm_16 and the crc32_be_vgfm_16 functions are done with "br %r14". These are indirect branches as well and need to use execute trampolines for CONFIG_EXPOLINE=y. Cc: stable@vger.kernel.org # 4.16 Fixes: f19fbd5ed6 ("s390: introduce execute-trampolines for branches") Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/crypto/crc32be-vx.S | 5 ++++- arch/s390/crypto/crc32le-vx.S | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) commit 6dd85fbb87d1d6b87a3b1f02ca28d7b2abd2e7ba Author: Martin Schwidefsky Date: Fri Apr 20 16:49:46 2018 +0200 s390: move expoline assembler macros to a header To be able to use the expoline branches in different assembler files move the associated macros from entry.S to a new header nospec-insn.h. While we are at it make the macros a bit nicer to use. Cc: stable@vger.kernel.org # 4.16 Fixes: f19fbd5ed6 ("s390: introduce execute-trampolines for branches") Signed-off-by: Martin Schwidefsky arch/s390/include/asm/nospec-insn.h | 127 ++++++++++++++++++++++++++++++++++++ arch/s390/kernel/entry.S | 105 +++++++---------------------- 2 files changed, 151 insertions(+), 81 deletions(-) commit 75bc37fefc4471e718ba8e651aa74673d4e0a9eb Author: Linus Torvalds Date: Sun May 6 16:57:38 2018 -1000 Linux 4.17-rc4 Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 388126a3e6c706eabf2359839753d550639c25ff Author: Fabio Estevam Date: Tue Apr 24 17:25:19 2018 -0300 ARM: dts: imx7s: Pass the 'fsl,sec-era' property Currently the following error is seen from the CAAM driver: caam 30900000.caam: device ID = 0x0a16030000000000 (Era -524) Pass the 'fsl,sec-era' property to properly describe the era information. This error happens because the 'fsl,sec-era' is not passed via device tree. The era information is used in various places inside drivers/crypto/caam, so pass the correct version via device tree. Fixes: 0eeabcad7da5 ("ARM: dts: imx7s: add CAAM device node") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s.dtsi | 1 + 1 file changed, 1 insertion(+) commit 701e39d05119229b92ecca4add7b7ed2193622c3 Merge: 772d4f8 ecf08da Author: Linus Torvalds Date: Sun May 6 05:46:29 2018 -1000 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pll KVM fixes from Radim Krčmář: "ARM: - Fix proxying of GICv2 CPU interface accesses - Fix crash when switching to BE - Track source vcpu git GICv2 SGIs - Fix an outdated bit of documentation x86: - Speed up injection of expired timers (for stable)" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: remove APIC Timer periodic/oneshot spikes arm64: vgic-v2: Fix proxying of cpuif access KVM: arm/arm64: vgic_init: Cleanup reference to process_maintenance KVM: arm64: Fix order of vcpu_write_sys_reg() arguments KVM: arm/arm64: vgic: Fix source vcpu issues for GICv2 SGI commit 772d4f84c6010f80a932f9e7e47a8acbbc0a527b Merge: 9c48eb6 40fa84e Author: Linus Torvalds Date: Sun May 6 05:42:24 2018 -1000 Merge tag 'iommu-fixes-v4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - fix a compile warning in the AMD IOMMU driver with irq remapping disabled - fix for VT-d interrupt remapping and invalidation size (caused a BUG_ON when trying to invalidate more than 4GB) - build fix and a regression fix for broken graphics with old DTS for the rockchip iommu driver - a revert in the PCI window reservation code which fixes a regression with VFIO. * tag 'iommu-fixes-v4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu: rockchip: fix building without CONFIG_OF iommu/vt-d: Use WARN_ON_ONCE instead of BUG_ON in qi_flush_dev_iotlb() iommu/vt-d: fix shift-out-of-bounds in bug checking iommu/dma: Move PCI window region reservation back into dma specific path. iommu/rockchip: Make clock handling optional iommu/amd: Hide unused iommu_table_lock iommu/vt-d: Fix usage of force parameter in intel_ir_reconfigure_irte() commit 9c48eb6aabf0d180159c128403c366aab80a57a6 Merge: fe282c6 c65732e Author: Linus Torvalds Date: Sun May 6 05:37:24 2018 -1000 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Thomas Gleixner: "Unbreak the CPUID CPUID_8000_0008_EBX reload which got dropped when the evaluation of physical and virtual bits which uses the same CPUID leaf was moved out of get_cpu_cap()" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Restore CPUID_8000_0008_EBX reload commit fe282c609d0a5da0607a21ffa9ef49849bd7524d Merge: 03b5f0c 7dba33c Author: Linus Torvalds Date: Sun May 6 05:35:23 2018 -1000 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull clocksource fixes from Thomas Gleixner: "The recent addition of the early TSC clocksource breaks on machines which have an unstable TSC because in case that TSC is disabled, then the clocksource selection logic falls back to the early TSC which is obviously bogus. That also unearthed a few robustness issues in the clocksource derating code which are addressed as well" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource: Rework stale comment clocksource: Consistent de-rate when marking unstable x86/tsc: Fix mark_tsc_unstable() clocksource: Initialize cs->wd_list clocksource: Allow clocksource_mark_unstable() on unregistered clocksources x86/tsc: Always unregister clocksource_tsc_early commit 03b5f0c138db46380fa51b36944167bca63eb572 Merge: ee946c3 1bc2463 Author: Linus Torvalds Date: Sun May 6 05:34:06 2018 -1000 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Thomas Gleixner: "A single fix to prevent false positives in the spurious interrupt detector when more than a single demultiplex register is evaluated in the Qualcom irq combiner driver" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/qcom: Fix check for spurious interrupts commit ee946c36be21dcfe044f1c432cd6c6a33682e244 Merge: 8e95cb33 7fe3fa3b Author: Linus Torvalds Date: Sat May 5 17:30:58 2018 -1000 Merge tag 'platform-drivers-x86-v4.17-2' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver fixes from Darren Hart: - We missed a case in the Dell config dependencies resulting in a possible bad configuration, resolve it by giving up on trying to keep DELL_LAPTOP visible in the menu and make it depend on DELL_SMBIOS. - Fix a null pointer dereference at module unload for the asus-wireless driver. * tag 'platform-drivers-x86-v4.17-2' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: Kconfig: Fix dell-laptop dependency chain. platform/x86: asus-wireless: Fix NULL pointer dereference commit 8e95cb336d5293704d6b31f73639d029c7d2c252 Merge: c1c0741 6844dc4 Author: Linus Torvalds Date: Sat May 5 17:28:08 2018 -1000 Merge tag 'usb-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some USB driver fixes for 4.17-rc4. The majority of them are some USB gadget fixes that missed my last pull request. The "largest" patch in here is a fix for the old visor driver that syzbot found 6 months or so ago and I finally remembered to fix it. All of these have been in linux-next with no reported issues" * tag 'usb-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: Revert "usb: host: ehci: Use dma_pool_zalloc()" usb: typec: tps6598x: handle block reads separately with plain-I2C adapters usb: typec: tcpm: Release the role mux when exiting USB: Accept bulk endpoints with 1024-byte maxpacket xhci: Fix use-after-free in xhci_free_virt_device USB: serial: visor: handle potential invalid device configuration USB: serial: option: adding support for ublox R410M usb: musb: trace: fix NULL pointer dereference in musb_g_tx() usb: musb: host: fix potential NULL pointer dereference usb: gadget: composite Allow for larger configuration descriptors usb: dwc3: gadget: Fix list_del corruption in dwc3_ep_dequeue usb: dwc3: gadget: dwc3_gadget_del_and_unmap_request() can be static usb: dwc2: pci: Fix error return code in dwc2_pci_probe() usb: dwc2: WA for Full speed ISOC IN in DDMA mode. usb: dwc2: dwc2_vbus_supply_init: fix error check usb: gadget: f_phonet: fix pn_net_xmit()'s return type commit ecf08dad723d3e000aecff6c396f54772d124733 Author: Anthoine Bourgeois Date: Sun Apr 29 22:05:58 2018 +0000 KVM: x86: remove APIC Timer periodic/oneshot spikes Since the commit "8003c9ae204e: add APIC Timer periodic/oneshot mode VMX preemption timer support", a Windows 10 guest has some erratic timer spikes. Here the results on a 150000 times 1ms timer without any load: Before 8003c9ae204e | After 8003c9ae204e Max 1834us | 86000us Mean 1100us | 1021us Deviation 59us | 149us Here the results on a 150000 times 1ms timer with a cpu-z stress test: Before 8003c9ae204e | After 8003c9ae204e Max 32000us | 140000us Mean 1006us | 1997us Deviation 140us | 11095us The root cause of the problem is starting hrtimer with an expiry time already in the past can take more than 20 milliseconds to trigger the timer function. It can be solved by forward such past timers immediately, rather than submitting them to hrtimer_start(). In case the timer is periodic, update the target expiration and call hrtimer_start with it. v2: Check if the tsc deadline is already expired. Thank you Mika. v3: Execute the past timers immediately rather than submitting them to hrtimer_start(). v4: Rearm the periodic timer with advance_periodic_target_expiration() a simpler version of set_target_expiration(). Thank you Paolo. Cc: Mika Penttilä Cc: Wanpeng Li Cc: Paolo Bonzini Cc: stable@vger.kernel.org Signed-off-by: Anthoine Bourgeois 8003c9ae204e ("KVM: LAPIC: add APIC Timer periodic/oneshot mode VMX preemption timer support") Signed-off-by: Radim Krčmář arch/x86/kvm/lapic.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) commit f3351c609bbdcf3c519ff5c5451103aa48a5b804 Merge: 6da6c0d b220244 Author: Radim Krčmář Date: Sat May 5 23:05:31 2018 +0200 Merge tag 'kvmarm-fixes-for-4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm KVM/arm fixes for 4.17, take #2 - Fix proxying of GICv2 CPU interface accesses - Fix crash when switching to BE - Track source vcpu git GICv2 SGIs - Fix an outdated bit of documentation commit b9826a4929bbd4dcb245429fd7434145c4fcdc9b Author: Jacopo Mondi Date: Wed Apr 18 11:42:35 2018 +0200 sh: mm: Fix unprotected access to struct device With commit ce88313069c36eef80f21fd7 ("arch/sh: make the DMA mapping operations observe dev->dma_pfn_offset") the generic DMA allocation function on which the SH 'dma_alloc_coherent()' function relies on, accesses the 'dma_pfn_offset' field of struct device. Unfortunately the 'dma_generic_alloc_coherent()' function is called from several places with a NULL struct device argument, halting the CPU during the boot process. This patch fixes the issue by protecting access to dev->dma_pfn_offset, with a trivial check for validity. It also passes a valid 'struct device' in the 'platform_resource_setup_memory()' function which is the main user of 'dma_alloc_coherent()', and inserts a WARN_ON() check to remind to future (and existing) bogus users of this function to provide a valid 'struct device' whenever possible. Fixes: ce88313069c36eef80f21fd7 ("arch/sh: make the DMA mapping operations observe dev->dma_pfn_offset") Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Reviewed-by: Thomas Petazzoni Signed-off-by: Rich Felker arch/sh/mm/consistent.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 6cb465972c4eb6741b3094a58a65e527fc63c100 Author: Rich Felker Date: Sat May 5 16:40:23 2018 -0400 sh: fix build failure for J2 cpu with SMP disabled The sh asm/smp.h defines a fallback hard_smp_processor_id macro for the !SMP case, but linux/smp.h never includes asm/smp.h in the !SMP case. Signed-off-by: Rich Felker arch/sh/kernel/cpu/sh2/probe.c | 4 ++++ 1 file changed, 4 insertions(+) commit c1c07416cdd47161a359286021d483f449ad8c4f Merge: 4a7a772 0da7e43 Author: Linus Torvalds Date: Fri May 4 21:15:25 2018 -1000 Merge tag 'kbuild-fixes-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - remove state comment in modpost - extend MAINTAINERS entry to cover modpost and more makefiles - fix missed building of SANCOV gcc-plugin - replace left-over 'bison' with $(YACC) - display short log when generating parer of genksyms * tag 'kbuild-fixes-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: genksyms: fix typo in parse.tab.{c,h} generation rules kbuild: replace hardcoded bison in cmd_bison_h with $(YACC) gcc-plugins: fix build condition of SANCOV plugin MAINTAINERS: Update Kbuild entry with a few paths modpost: delete stale comment commit 4a7a7729861be5f3c47ab5737aafd4045d5594e8 Merge: f933147 c964cfc Author: Linus Torvalds Date: Fri May 4 21:12:06 2018 -1000 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes froom Stephen Boyd: "A handful of fixes for the stm32mp1 clk driver came in during the merge window for the driver that got merged in the merge window. Plus a warning fix for unused PM ops and a couple fixes for the meson clk driver clk names that went unnoticed with the regmap rework. There's also another fix in here for the mux rounding flag which wasn't doing what it said it did, but now it does" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: meson: meson8b: fix meson8b_cpu_clk parent clock name clk: meson: meson8b: fix meson8b_fclk_div3_div clock name clk: meson: drop meson_aoclk_gate_regmap_ops clk: meson: honor CLK_MUX_ROUND_CLOSEST in clk_regmap clk: honor CLK_MUX_ROUND_CLOSEST in generic clk mux clk: cs2000: mark resume function as __maybe_unused clk: stm32mp1: remove ck_apb_dbg clock clk: stm32mp1: set stgen_k clock as critical clk: stm32mp1: add missing tzc2 clock clk: stm32mp1: fix SAI3 & SAI4 clocks clk: stm32mp1: remove unused dfsdm_src[] const clk: stm32mp1: add missing static commit f93314732fd9263621c86b05dad8b75cf838bc62 Merge: c12fd0f 93dd4e7 Author: Linus Torvalds Date: Fri May 4 21:07:43 2018 -1000 Merge tag 'rproc-v4.17-1' of git://github.com/andersson/remoteproc Pull remoteproc and rpmsg fixes from Bjorn Andersson: - fix screw-up when reversing boolean for rproc_stop() - add missing OF node refcounting dereferences - add missing MODULE_ALIAS in rpmsg_char * tag 'rproc-v4.17-1' of git://github.com/andersson/remoteproc: rpmsg: added MODULE_ALIAS for rpmsg_char remoteproc: qcom: Fix potential device node leaks remoteproc: fix crashed parameter logic on stop call commit c12fd0fe0c222e1e69cbbc41234ec525ee9b091b Merge: 4b29390 a02cbe2 Author: Linus Torvalds Date: Fri May 4 21:05:12 2018 -1000 Merge tag 'drm-fixes-for-v4.17-rc4' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "vmwgfx, i915, vc4, vga dac fixes. This seems eerily quiet, so I expect it will explode next week or something. One i915 model firmware, two vmwgfx fixes, one vc4 fix and one bridge leak fix" * tag 'drm-fixes-for-v4.17-rc4' of git://people.freedesktop.org/~airlied/linux: drm/bridge: vga-dac: Fix edid memory leak drm/vc4: Make sure vc4_bo_{inc,dec}_usecnt() calls are balanced drm/i915/glk: Add MODULE_FIRMWARE for Geminilake drm/vmwgfx: Fix a buffer object leak drm/vmwgfx: Clean up fbdev modeset locking commit e0f6d1a526b6adfa9ca3b336b83ece0eed345033 Author: Jann Horn Date: Fri May 4 19:59:35 2018 +0200 x86/vdso: Remove unused file commit da861e18eccc ("x86, vdso: Get rid of the fake section mechanism") left this file behind; nothing is using it anymore. Signed-off-by: Jann Horn Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: luto@amacapital.net Link: http://lkml.kernel.org/r/20180504175935.104085-1-jannh@google.com Signed-off-by: Ingo Molnar arch/x86/entry/vdso/vdso32/vdso-fakesections.c | 1 - 1 file changed, 1 deletion(-) commit 4b293907d36c4803df31f71693e6bd5917dba4d0 Merge: eb4f959 0c5a9ac Author: Linus Torvalds Date: Fri May 4 20:57:28 2018 -1000 Merge tag 'trace-v4.17-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Some of the files in the tracing directory show file mode 0444 when they are writable by root. To fix the confusion, they should be 0644. Note, either case root can still write to them. Zhengyuan asked why I never applied that patch (the first one is from 2014!). I simply forgot about it. /me lowers head in shame" * tag 'trace-v4.17-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix the file mode of stack tracer ftrace: Have set_graph_* files have normal file modes commit eb4f959b2697cea30cdaa0a7c351d7333f13f62c Merge: 2f50037 9aa1692 Author: Linus Torvalds Date: Fri May 4 20:51:10 2018 -1000 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Doug Ledford: "This is our first pull request of the rc cycle. It's not that it's been overly quiet, we were just waiting on a few things before sending this off. For instance, the 6 patch series from Intel for the hfi1 driver had actually been pulled in on Tuesday for a Wednesday pull request, only to have Jason notice something I missed, so we held off for some testing, and then on Thursday had to respin the series because the very first patch needed a minor fix (unnecessary cast is all). There is a sizable hns patch series in here, as well as a reasonably largish hfi1 patch series, then all of the lines of uapi updates are just the change to the new official Linux-OpenIB SPDX tag (a bunch of our files had what amounts to a BSD-2-Clause + MIT Warranty statement as their license as a result of the initial code submission years ago, and the SPDX folks decided it was unique enough to warrant a unique tag), then the typical mlx4 and mlx5 updates, and finally some cxgb4 and core/cache/cma updates to round out the bunch. None of it was overly large by itself, but in the 2 1/2 weeks we've been collecting patches, it has added up :-/. As best I can tell, it's been through 0day (I got a notice about my last for-next push, but not for my for-rc push, but Jason seems to think that failure messages are prioritized and success messages not so much). It's also been through linux-next. And yes, we did notice in the context portion of the CMA query gid fix patch that there is a dubious BUG_ON() in the code, and have plans to audit our BUG_ON usage and remove it anywhere we can. Summary: - Various build fixes (USER_ACCESS=m and ADDR_TRANS turned off) - SPDX license tag cleanups (new tag Linux-OpenIB) - RoCE GID fixes related to default GIDs - Various fixes to: cxgb4, uverbs, cma, iwpm, rxe, hns (big batch), mlx4, mlx5, and hfi1 (medium batch)" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (52 commits) RDMA/cma: Do not query GID during QP state transition to RTR IB/mlx4: Fix integer overflow when calculating optimal MTT size IB/hfi1: Fix memory leak in exception path in get_irq_affinity() IB/{hfi1, rdmavt}: Fix memory leak in hfi1_alloc_devdata() upon failure IB/hfi1: Fix NULL pointer dereference when invalid num_vls is used IB/hfi1: Fix loss of BECN with AHG IB/hfi1 Use correct type for num_user_context IB/hfi1: Fix handling of FECN marked multicast packet IB/core: Make ib_mad_client_id atomic iw_cxgb4: Atomically flush per QP HW CQEs IB/uverbs: Fix kernel crash during MR deregistration flow IB/uverbs: Prevent reregistration of DM_MR to regular MR RDMA/mlx4: Add missed RSS hash inner header flag RDMA/hns: Fix a couple misspellings RDMA/hns: Submit bad wr RDMA/hns: Update assignment method for owner field of send wqe RDMA/hns: Adjust the order of cleanup hem table RDMA/hns: Only assign dqpn if IB_QP_PATH_DEST_QPN bit is set RDMA/hns: Remove some unnecessary attr_mask judgement RDMA/hns: Only assign mtu if IB_QP_PATH_MTU bit is set ... commit 2f50037a1c687ac928bbd47b6eb959b39f748ada Merge: 2e171ff b8b7849 Author: Linus Torvalds Date: Fri May 4 20:41:44 2018 -1000 Merge tag 'for-linus-20180504' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A collection of fixes that should to into this release. This contains: - Set of bcache fixes from Coly, fixing regression in patches that went into this series. - Set of NVMe fixes by way of Keith. - Set of bdi related fixes, one from Jan and two from Tetsuo Handa, fixing various issues around device addition/removal. - Two block inflight fixes from Omar, fixing issues around the transition to using tags for blk-mq inflight accounting that we did a few releases ago" * tag 'for-linus-20180504' of git://git.kernel.dk/linux-block: bdi: Fix oops in wb_workfn() nvmet: switch loopback target state to connecting when resetting nvme/multipath: Fix multipath disabled naming collisions nvme/multipath: Disable runtime writable enabling parameter nvme: Set integrity flag for user passthrough commands nvme: fix potential memory leak in option parsing bdi: Fix use after free bug in debugfs_remove() bdi: wake up concurrent wb_shutdown() callers. bcache: use pr_info() to inform duplicated CACHE_SET_IO_DISABLE set bcache: set dc->io_disable to true in conditional_stop_bcache_device() bcache: add wait_for_kthread_stop() in bch_allocator_thread() bcache: count backing device I/O error for writeback I/O bcache: set CACHE_SET_IO_DISABLE in bch_cached_dev_error() bcache: store disk name in struct cache and struct cached_dev blk-mq: fix sysfs inflight counter blk-mq: count allocated but not started requests in iostats inflight commit a5f81290ce475489fa2551c01a07470c1a4c932e Author: Peter Zijlstra Date: Fri Apr 20 14:25:48 2018 +0200 perf/x86/cstate: Fix possible Spectre-v1 indexing for pkg_msr > arch/x86/events/intel/cstate.c:307 cstate_pmu_event_init() warn: potential spectre issue 'pkg_msr' (local cap) Userspace controls @attr, sanitize cfg (attr->config) before using it to index an array. Reported-by: Dan Carpenter Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar arch/x86/events/intel/cstate.c | 2 ++ 1 file changed, 2 insertions(+) commit 06ce6e9b6d6c09d4129c6e24a1314a395d816c10 Author: Peter Zijlstra Date: Fri Apr 20 14:23:36 2018 +0200 perf/x86/msr: Fix possible Spectre-v1 indexing in the MSR driver > arch/x86/events/msr.c:178 msr_event_init() warn: potential spectre issue 'msr' (local cap) Userspace controls @attr, sanitize cfg (attr->config) before using it to index an array. Reported-by: Dan Carpenter Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar arch/x86/events/msr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 46b1b577229a091b137831becaa0fae8690ee15a Author: Peter Zijlstra Date: Fri Apr 20 14:08:58 2018 +0200 perf/x86: Fix possible Spectre-v1 indexing for x86_pmu::event_map() > arch/x86/events/intel/cstate.c:307 cstate_pmu_event_init() warn: potential spectre issue 'pkg_msr' (local cap) > arch/x86/events/intel/core.c:337 intel_pmu_event_map() warn: potential spectre issue 'intel_perfmon_event_map' > arch/x86/events/intel/knc.c:122 knc_pmu_event_map() warn: potential spectre issue 'knc_perfmon_event_map' > arch/x86/events/intel/p4.c:722 p4_pmu_event_map() warn: potential spectre issue 'p4_general_events' > arch/x86/events/intel/p6.c:116 p6_pmu_event_map() warn: potential spectre issue 'p6_perfmon_event_map' > arch/x86/events/amd/core.c:132 amd_pmu_event_map() warn: potential spectre issue 'amd_perfmon_event_map' Userspace controls @attr, sanitize @attr->config before passing it on to x86_pmu::event_map(). Reported-by: Dan Carpenter Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar arch/x86/events/core.c | 3 +++ 1 file changed, 3 insertions(+) commit ef9ee4ad38445a30909c48998624861716f2a994 Author: Peter Zijlstra Date: Fri Apr 20 14:06:29 2018 +0200 perf/x86: Fix possible Spectre-v1 indexing for hw_perf_event cache_* > arch/x86/events/core.c:319 set_ext_hw_attr() warn: potential spectre issue 'hw_cache_event_ids[cache_type]' (local cap) > arch/x86/events/core.c:319 set_ext_hw_attr() warn: potential spectre issue 'hw_cache_event_ids' (local cap) > arch/x86/events/core.c:328 set_ext_hw_attr() warn: potential spectre issue 'hw_cache_extra_regs[cache_type]' (local cap) > arch/x86/events/core.c:328 set_ext_hw_attr() warn: potential spectre issue 'hw_cache_extra_regs' (local cap) Userspace controls @config which contains 3 (byte) fields used for a 3 dimensional array deref. Reported-by: Dan Carpenter Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar arch/x86/events/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4411ec1d1993e8dbff2898390e3fed280d88e446 Author: Peter Zijlstra Date: Fri Apr 20 14:03:18 2018 +0200 perf/core: Fix possible Spectre-v1 indexing for ->aux_pages[] > kernel/events/ring_buffer.c:871 perf_mmap_to_page() warn: potential spectre issue 'rb->aux_pages' Userspace controls @pgoff through the fault address. Sanitize the array index before doing the array dereference. Reported-by: Dan Carpenter Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/ring_buffer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 2e171ffcdf62a90ea7a0192728f81c1ac288de50 Merge: 4148d38 021ba8e Author: Linus Torvalds Date: Fri May 4 20:36:50 2018 -1000 Merge tag 'xfs-4.17-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "I've got one more bug fix for xfs for 4.17-rc4, which caps the amount of data we try to handle in one dedupe request so that userspace can't livelock the kernel. This series has been run through a full xfstests run during the week and through a quick xfstests run against this morning's master, with no ajor failures reported. Summary: - Cap the maximum length of a deduplication request at MAX_RW_COUNT/2 to avoid kernel livelock due to excessively large IO requests" * tag 'xfs-4.17-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: cap the length of deduplication requests commit 354d7793070611b4df5a79fbb0f12752d0ed0cc5 Author: Peter Zijlstra Date: Fri Apr 20 15:03:45 2018 +0200 sched/autogroup: Fix possible Spectre-v1 indexing for sched_prio_to_weight[] > kernel/sched/autogroup.c:230 proc_sched_autogroup_set_nice() warn: potential spectre issue 'sched_prio_to_weight' Userspace controls @nice, sanitize the array index. Reported-by: Dan Carpenter Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Signed-off-by: Ingo Molnar kernel/sched/autogroup.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 7281c8dec8a87685cb54d503d8cceef5a0fc2fdd Author: Peter Zijlstra Date: Fri Apr 20 14:29:51 2018 +0200 sched/core: Fix possible Spectre-v1 indexing for sched_prio_to_weight[] > kernel/sched/core.c:6921 cpu_weight_nice_write_s64() warn: potential spectre issue 'sched_prio_to_weight' Userspace controls @nice, so sanitize the value before using it to index an array. Reported-by: Dan Carpenter Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4148d3884a4c842a5b3ee2976c2ebbdb7bbd0559 Merge: 625e200 a6aa10c7 Author: Linus Torvalds Date: Fri May 4 20:32:18 2018 -1000 Merge tag 'for-4.17-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Two regression fixes and one fix for stable" * tag 'for-4.17-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: send, fix missing truncate for inode with prealloc extent past eof btrfs: Take trans lock before access running trans in check_delayed_ref btrfs: Fix wrong first_key parameter in replace_path commit 0da7e43261142b93307b70da455376ad84414d0a Author: Mauro Rossi Date: Tue Apr 24 20:08:18 2018 +0900 genksyms: fix typo in parse.tab.{c,h} generation rules 'quet' is replaced by 'quiet' in scripts/genksyms/Makefile Signed-off-by: Mauro Rossi Signed-off-by: Masahiro Yamada scripts/genksyms/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d59fbbd09d5d6bdf4ea1f0b4090d175e081ff421 Author: Masahiro Yamada Date: Tue Apr 24 20:07:13 2018 +0900 kbuild: replace hardcoded bison in cmd_bison_h with $(YACC) Commit 73a4f6dbe70a ("kbuild: add LEX and YACC variables") missed to update cmd_bison_h somehow. Signed-off-by: Masahiro Yamada scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 642ef99be932c4071274b28eaf3d3d85bbb6e78c Author: Masahiro Yamada Date: Fri Apr 13 14:06:10 2018 +0900 gcc-plugins: fix build condition of SANCOV plugin Since commit d677a4d60193 ("Makefile: support flag -fsanitizer-coverage=trace-cmp"), you miss to build the SANCOV plugin under some circumstances. CONFIG_KCOV=y CONFIG_KCOV_ENABLE_COMPARISONS=y Your compiler does not support -fsanitize-coverage=trace-pc Your compiler does not support -fsanitize-coverage=trace-cmp Under this condition, $(CFLAGS_KCOV) is not empty but contains a space, so the following ifeq-conditional is false. ifeq ($(CFLAGS_KCOV),) Then, scripts/Makefile.gcc-plugins misses to add sancov_plugin.so to gcc-plugin-y while the SANCOV plugin is necessary as an alternative means. Fixes: d677a4d60193 ("Makefile: support flag -fsanitizer-coverage=trace-cmp") Signed-off-by: Masahiro Yamada Acked-by: Kees Cook scripts/Makefile.gcc-plugins | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1cd4023bc3370578fae05abf48fb4a6ef79c9ea1 Author: Rasmus Villemoes Date: Thu Mar 22 21:58:27 2018 +0100 MAINTAINERS: Update Kbuild entry with a few paths I managed to send some modpost patches to old addresses of both Masahiro and Michal, and omitted linux-kbuild from cc, because my tried and trusted scripts/get_maintainer wrapper failed me. Add the modpost directory to the MAINTAINERS entry, and while at it make the Makefile glob match scripts/Makefile itself, and add one matching the Kbuild.include file as well. Signed-off-by: Rasmus Villemoes Signed-off-by: Masahiro Yamada MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2ba5622fba85eb52c91bf49c355ce1e36991a701 Merge: 52c5cd1 d0f1a45 Author: David S. Miller Date: Fri May 4 19:50:10 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-05-05 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Sanitize attr->{prog,map}_type from bpf(2) since used as an array index to retrieve prog/map specific ops such that we prevent potential out of bounds value under speculation, from Mark and Daniel. ==================== Signed-off-by: David S. Miller commit f21b53b20c754021935ea43364dbf53778eeba32 Author: Kees Cook Date: Thu May 3 14:37:54 2018 -0700 x86/speculation: Make "seccomp" the default mode for Speculative Store Bypass Unless explicitly opted out of, anything running under seccomp will have SSB mitigations enabled. Choosing the "prctl" mode will disable this. [ tglx: Adjusted it to the new arch_seccomp_spec_mitigate() mechanism ] Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Documentation/admin-guide/kernel-parameters.txt | 26 +++++++++++++------- arch/x86/include/asm/nospec-branch.h | 1 + arch/x86/kernel/cpu/bugs.c | 32 ++++++++++++++++++------- 3 files changed, 41 insertions(+), 18 deletions(-) commit 8bf37d8c067bb7eb8e7c381bdadf9bd89182b6bc Author: Thomas Gleixner Date: Fri May 4 15:12:06 2018 +0200 seccomp: Move speculation migitation control to arch code The migitation control is simpler to implement in architecture code as it avoids the extra function call to check the mode. Aside of that having an explicit seccomp enabled mode in the architecture mitigations would require even more workarounds. Move it into architecture code and provide a weak function in the seccomp code. Remove the 'which' argument as this allows the architecture to decide which mitigations are relevant for seccomp. Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/bugs.c | 29 ++++++++++++++++++----------- include/linux/nospec.h | 2 ++ kernel/seccomp.c | 15 ++------------- 3 files changed, 22 insertions(+), 24 deletions(-) commit 00a02d0c502a06d15e07b857f8ff921e3e402675 Author: Kees Cook Date: Thu May 3 14:56:12 2018 -0700 seccomp: Add filter flag to opt-out of SSB mitigation If a seccomp user is not interested in Speculative Store Bypass mitigation by default, it can set the new SECCOMP_FILTER_FLAG_SPEC_ALLOW flag when adding filters. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner include/linux/seccomp.h | 5 +++-- include/uapi/linux/seccomp.h | 5 +++-- kernel/seccomp.c | 19 +++++++++++-------- tools/testing/selftests/seccomp/seccomp_bpf.c | 22 +++++++++++++++++++--- 4 files changed, 36 insertions(+), 15 deletions(-) commit b849a812f7eb92e96d1c8239b06581b2cfd8b275 Author: Thomas Gleixner Date: Fri May 4 09:40:03 2018 +0200 seccomp: Use PR_SPEC_FORCE_DISABLE Use PR_SPEC_FORCE_DISABLE in seccomp() because seccomp does not allow to widen restrictions. Signed-off-by: Thomas Gleixner kernel/seccomp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 356e4bfff2c5489e016fdb925adbf12a1e3950ee Author: Thomas Gleixner Date: Thu May 3 22:09:15 2018 +0200 prctl: Add force disable speculation For certain use cases it is desired to enforce mitigations so they cannot be undone afterwards. That's important for loader stubs which want to prevent a child from disabling the mitigation again. Will also be used for seccomp(). The extra state preserving of the prctl state for SSB is a preparatory step for EBPF dymanic speculation control. Signed-off-by: Thomas Gleixner Documentation/userspace-api/spec_ctrl.rst | 34 ++++++++++++++++++------------ arch/x86/kernel/cpu/bugs.c | 35 ++++++++++++++++++++++--------- fs/proc/array.c | 3 +++ include/linux/sched.h | 10 ++++++++- include/uapi/linux/prctl.h | 1 + 5 files changed, 59 insertions(+), 24 deletions(-) commit f9544b2b076ca90d887c5ae5d74fab4c21bb7c13 Author: Kees Cook Date: Thu May 3 15:03:30 2018 -0700 x86/bugs: Make boot modes __ro_after_init There's no reason for these to be changed after boot. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/bugs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6844dc42722cac37762a45e742ab4b2cc5348023 Merge: 43b78f1 4842ed5 Author: Greg Kroah-Hartman Date: Fri May 4 14:38:32 2018 -0700 Merge tag 'usb-serial-4.17-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.17-rc4 Here's a fix for a long-standing issue in the visor driver, which could have security implications. Included is also a new modem device id. Both commits have been in linux-next for a couple of days with no reported issues. Signed-off-by: Johan Hovold commit 43b78f1155c868208a413082179251f5fba78153 Author: Greg Kroah-Hartman Date: Fri May 4 14:35:12 2018 -0700 Revert "usb: host: ehci: Use dma_pool_zalloc()" This reverts commit 22072e83ebd510fb6a090aef9d65ccfda9b1e7e4 as it is broken. Alan writes: What you can't see just from reading the patch is that in both cases (ehci->itd_pool and ehci->sitd_pool) there are two allocation paths -- the two branches of an "if" statement -- and only one of the paths calls dma_pool_[z]alloc. However, the memset is needed for both paths, and so it can't be eliminated. Given that it must be present, there's no advantage to calling dma_pool_zalloc rather than dma_pool_alloc. Reported-by: Erick Cafferata Cc: Alan Stern Cc: Souptick Joarder Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-mem.c | 3 ++- drivers/usb/host/ehci-sched.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit 7fe3fa3b5ec8e75389cce4bf5d052a52e6198d59 Author: Mario Limonciello Date: Fri Apr 20 12:42:11 2018 -0500 platform/x86: Kconfig: Fix dell-laptop dependency chain. As reported by Randy Dunlap: >> WARNING: unmet direct dependencies detected for DELL_SMBIOS >> Depends on [m]: X86 [=y] && X86_PLATFORM_DEVICES [=y] >> && (DCDBAS [=m] || >> DCDBAS [=m]=n) && (ACPI_WMI [=n] || ACPI_WMI [=n]=n) >> Selected by [y]: >> - DELL_LAPTOP [=y] && X86 [=y] && X86_PLATFORM_DEVICES [=y] >> && DMI [=y] >> && BACKLIGHT_CLASS_DEVICE [=y] && (ACPI_VIDEO [=n] || >> ACPI_VIDEO [=n]=n) >> && (RFKILL [=n] || RFKILL [=n]=n) && SERIO_I8042 [=y] >> Right now it's possible to set dell laptop to compile in but this causes dell-smbios to compile in which breaks if dcdbas is a module. Dell laptop shouldn't select dell-smbios anymore, but depend on it. Fixes: 32d7b19bad96 (platform/x86: dell-smbios: Resolve dependency error on DCDBAS) Reported-by: Randy Dunlap Signed-off-by: Mario Limonciello Cc: stable@vger.kernel.org Signed-off-by: Darren Hart (VMware) drivers/platform/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f0a93de9139c2b0a59299cd36b61564522458f8 Author: João Paulo Rechi Vita Date: Thu Apr 19 07:04:34 2018 -0700 platform/x86: asus-wireless: Fix NULL pointer dereference When the module is removed the led workqueue is destroyed in the remove callback, before the led device is unregistered from the led subsystem. This leads to a NULL pointer derefence when the led device is unregistered automatically later as part of the module removal cleanup. Bellow is the backtrace showing the problem. BUG: unable to handle kernel NULL pointer dereference at (null) IP: __queue_work+0x8c/0x410 PGD 0 P4D 0 Oops: 0000 [#1] SMP NOPTI Modules linked in: ccm edac_mce_amd kvm_amd kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel aes_x86_64 joydev crypto_simd asus_nb_wmi glue_helper uvcvideo snd_hda_codec_conexant snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_intel asus_wmi snd_hda_codec cryptd snd_hda_core sparse_keymap videobuf2_vmalloc arc4 videobuf2_memops snd_hwdep input_leds videobuf2_v4l2 ath9k psmouse videobuf2_core videodev ath9k_common snd_pcm ath9k_hw media fam15h_power ath k10temp snd_timer mac80211 i2c_piix4 r8169 mii mac_hid cfg80211 asus_wireless(-) snd soundcore wmi shpchp 8250_dw ip_tables x_tables amdkfd amd_iommu_v2 amdgpu radeon chash i2c_algo_bit drm_kms_helper syscopyarea serio_raw sysfillrect sysimgblt fb_sys_fops ahci ttm libahci drm video CPU: 3 PID: 2177 Comm: rmmod Not tainted 4.15.0-5-generic #6+dev94.b4287e5bem1-Endless Hardware name: ASUSTeK COMPUTER INC. X555DG/X555DG, BIOS 5.011 05/05/2015 RIP: 0010:__queue_work+0x8c/0x410 RSP: 0018:ffffbe8cc249fcd8 EFLAGS: 00010086 RAX: ffff992ac6810800 RBX: 0000000000000000 RCX: 0000000000000008 RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff992ac6400e18 RBP: ffffbe8cc249fd18 R08: ffff992ac6400db0 R09: 0000000000000000 R10: 0000000000000040 R11: ffff992ac6400dd8 R12: 0000000000002000 R13: ffff992abd762e00 R14: ffff992abd763e38 R15: 000000000001ebe0 FS: 00007f318203e700(0000) GS:ffff992aced80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000001c720e000 CR4: 00000000001406e0 Call Trace: queue_work_on+0x38/0x40 led_state_set+0x2c/0x40 [asus_wireless] led_set_brightness_nopm+0x14/0x40 led_set_brightness+0x37/0x60 led_trigger_set+0xfc/0x1d0 led_classdev_unregister+0x32/0xd0 devm_led_classdev_release+0x11/0x20 release_nodes+0x109/0x1f0 devres_release_all+0x3c/0x50 device_release_driver_internal+0x16d/0x220 driver_detach+0x3f/0x80 bus_remove_driver+0x55/0xd0 driver_unregister+0x2c/0x40 acpi_bus_unregister_driver+0x15/0x20 asus_wireless_driver_exit+0x10/0xb7c [asus_wireless] SyS_delete_module+0x1da/0x2b0 entry_SYSCALL_64_fastpath+0x24/0x87 RIP: 0033:0x7f3181b65fd7 RSP: 002b:00007ffe74bcbe18 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3181b65fd7 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000555ea2559258 RBP: 0000555ea25591f0 R08: 00007ffe74bcad91 R09: 000000000000000a R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000003 R13: 00007ffe74bcae00 R14: 0000000000000000 R15: 0000555ea25591f0 Code: 01 00 00 02 0f 85 7d 01 00 00 48 63 45 d4 48 c7 c6 00 f4 fa 87 49 8b 9d 08 01 00 00 48 03 1c c6 4c 89 f7 e8 87 fb ff ff 48 85 c0 <48> 8b 3b 0f 84 c5 01 00 00 48 39 f8 0f 84 bc 01 00 00 48 89 c7 RIP: __queue_work+0x8c/0x410 RSP: ffffbe8cc249fcd8 CR2: 0000000000000000 ---[ end trace 7aa4f4a232e9c39c ]--- Unregistering the led device on the remove callback before destroying the workqueue avoids this problem. https://bugzilla.kernel.org/show_bug.cgi?id=196097 Reported-by: Dun Hum Cc: stable@vger.kernel.org Signed-off-by: João Paulo Rechi Vita Signed-off-by: Darren Hart (VMware) drivers/platform/x86/asus-wireless.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 52c5cd1bf0cecf4b146ca07dc513cbe2f4583bb5 Author: Antoine Tenart Date: Fri May 4 17:10:54 2018 +0200 net: phy: sfp: fix the BR,min computation In an SFP EEPROM values can be read to get information about a given SFP module. One of those is the bitrate, which can be determined using a nominal bitrate in addition with min and max values (in %). The SFP code currently compute both BR,min and BR,max values thanks to this nominal and min,max values. This patch fixes the BR,min computation as the min value should be subtracted to the nominal one, not added. Fixes: 9962acf7fb8c ("sfp: add support for 1000Base-PX and 1000Base-BX10") Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/phy/sfp-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14224923c3600bae2ac4dcae3bf0c3d4dc2812be Author: Rob Taglang Date: Thu May 3 17:13:06 2018 -0400 net: ethernet: sun: niu set correct packet size in skb Currently, skb->len and skb->data_len are set to the page size, not the packet size. This causes the frame check sequence to not be located at the "end" of the packet resulting in ethernet frame check errors. The driver does work currently, but stricter kernel facing networking solutions like OpenVSwitch will drop these packets as invalid. These changes set the packet size correctly so that these errors no longer occur. The length does not include the frame check sequence, so that subtraction was removed. Tested on Oracle/SUN Multithreaded 10-Gigabit Ethernet Network Controller [108e:abcd] and validated in wireshark. Signed-off-by: Rob Taglang Signed-off-by: David S. Miller drivers/net/ethernet/sun/niu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ae552ac2785d69189c865dcea7e71da02180c59c Author: YU Bo Date: Thu May 3 23:09:23 2018 -0400 net/netlink: make sure the headers line up actual value output Making sure the headers line up properly with the actual value output of the command `cat /proc/net/netlink` Before the patch: sk Eth Pid Groups Rmem Wmem Dump Locks Drops Inode >0000000033203952 0 897 00000113 0 0 0 2 0 14906 Signed-off-by: Bo YU Signed-off-by: David S. Miller net/netlink/af_netlink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d89a2adb8bfe6f8949ff389acdb9fa298b6e8e12 Author: Michael Chan Date: Thu May 3 20:04:27 2018 -0400 tg3: Fix vunmap() BUG_ON() triggered from tg3_free_consistent(). tg3_free_consistent() calls dma_free_coherent() to free tp->hw_stats under spinlock and can trigger BUG_ON() in vunmap() because vunmap() may sleep. Fix it by removing the spinlock and relying on the TG3_FLAG_INIT_COMPLETE flag to prevent race conditions between tg3_get_stats64() and tg3_free_consistent(). TG3_FLAG_INIT_COMPLETE is always cleared under tp->lock before tg3_free_consistent() and therefore tg3_get_stats64() can safely access tp->hw_stats under tp->lock if TG3_FLAG_INIT_COMPLETE is set. Fixes: f5992b72ebe0 ("tg3: Fix race condition in tg3_get_stats64().") Reported-by: Zumeng Chen Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/tg3.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit af50e4ba34f4c45e92535364133d4deb5931c1c5 Author: Eric Dumazet Date: Thu May 3 13:37:54 2018 -0700 nsh: fix infinite loop syzbot caught an infinite recursion in nsh_gso_segment(). Problem here is that we need to make sure the NSH header is of reasonable length. BUG: MAX_LOCK_DEPTH too low! turning off the locking correctness validator. depth: 48 max: 48! 48 locks held by syz-executor0/10189: #0: (ptrval) (rcu_read_lock_bh){....}, at: __dev_queue_xmit+0x30f/0x34c0 net/core/dev.c:3517 #1: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #1: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #2: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #2: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #3: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #3: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #4: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #4: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #5: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #5: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #6: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #6: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #7: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #7: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #8: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #8: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #9: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #9: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #10: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #10: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #11: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #11: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #12: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #12: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #13: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #13: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #14: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #14: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #15: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #15: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #16: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #16: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #17: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #17: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #18: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #18: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #19: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #19: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #20: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #20: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #21: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #21: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #22: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #22: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #23: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #23: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #24: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #24: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #25: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #25: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #26: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #26: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #27: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #27: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #28: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #28: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #29: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #29: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #30: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #30: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #31: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #31: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 dccp_close: ABORT with 65423 bytes unread #32: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #32: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #33: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #33: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #34: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #34: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #35: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #35: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #36: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #36: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #37: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #37: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #38: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #38: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #39: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #39: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #40: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #40: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #41: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #41: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #42: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #42: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #43: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #43: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #44: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #44: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #45: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #45: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #46: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #46: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 #47: (ptrval) (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2080 [inline] #47: (ptrval) (rcu_read_lock){....}, at: skb_mac_gso_segment+0x221/0x720 net/core/dev.c:2787 INFO: lockdep is turned off. CPU: 1 PID: 10189 Comm: syz-executor0 Not tainted 4.17.0-rc2+ #26 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 __lock_acquire+0x1788/0x5140 kernel/locking/lockdep.c:3449 lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920 rcu_lock_acquire include/linux/rcupdate.h:246 [inline] rcu_read_lock include/linux/rcupdate.h:632 [inline] skb_mac_gso_segment+0x25b/0x720 net/core/dev.c:2789 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 nsh_gso_segment+0x405/0xb60 net/nsh/nsh.c:107 skb_mac_gso_segment+0x3ad/0x720 net/core/dev.c:2792 __skb_gso_segment+0x3bb/0x870 net/core/dev.c:2865 skb_gso_segment include/linux/netdevice.h:4025 [inline] validate_xmit_skb+0x54d/0xd90 net/core/dev.c:3118 validate_xmit_skb_list+0xbf/0x120 net/core/dev.c:3168 sch_direct_xmit+0x354/0x11e0 net/sched/sch_generic.c:312 qdisc_restart net/sched/sch_generic.c:399 [inline] __qdisc_run+0x741/0x1af0 net/sched/sch_generic.c:410 __dev_xmit_skb net/core/dev.c:3243 [inline] __dev_queue_xmit+0x28ea/0x34c0 net/core/dev.c:3551 dev_queue_xmit+0x17/0x20 net/core/dev.c:3616 packet_snd net/packet/af_packet.c:2951 [inline] packet_sendmsg+0x40f8/0x6070 net/packet/af_packet.c:2976 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:639 __sys_sendto+0x3d7/0x670 net/socket.c:1789 __do_sys_sendto net/socket.c:1801 [inline] __se_sys_sendto net/socket.c:1797 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1797 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: c411ed854584 ("nsh: add GSO support") Signed-off-by: Eric Dumazet Cc: Jiri Benc Reported-by: syzbot Acked-by: Jiri Benc Signed-off-by: David S. Miller net/nsh/nsh.c | 4 ++++ 1 file changed, 4 insertions(+) commit acf784bd0ce257fe43da7ca266f7a10b837479d2 Author: Gustavo A. R. Silva Date: Thu May 3 13:45:58 2018 -0500 net: atm: Fix potential Spectre v1 ioc_data.dev_num can be controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: net/atm/lec.c:702 lec_vcc_attach() warn: potential spectre issue 'dev_lec' Fix this by sanitizing ioc_data.dev_num before using it to index dev_lec. Also, notice that there is another instance in which array dev_lec is being indexed using ioc_data.dev_num at line 705: lec_vcc_added(netdev_priv(dev_lec[ioc_data.dev_num]), Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/atm/lec.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 2be147f7459db5bbf292e0a6f135037b55e20b39 Author: Gustavo A. R. Silva Date: Thu May 3 13:17:12 2018 -0500 atm: zatm: Fix potential Spectre v1 pool can be indirectly controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: drivers/atm/zatm.c:1462 zatm_ioctl() warn: potential spectre issue 'zatm_dev->pool_info' (local cap) Fix this by sanitizing pool before using it to index zatm_dev->pool_info Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/atm/zatm.c | 3 +++ 1 file changed, 3 insertions(+) commit 72f17baf2352ded6a1d3f4bb2d15da8c678cd2cb Author: Stefano Brivio Date: Thu May 3 18:13:25 2018 +0200 openvswitch: Don't swap table in nlattr_set() after OVS_ATTR_NESTED is found If an OVS_ATTR_NESTED attribute type is found while walking through netlink attributes, we call nlattr_set() recursively passing the length table for the following nested attributes, if different from the current one. However, once we're done with those sub-nested attributes, we should continue walking through attributes using the current table, instead of using the one related to the sub-nested attributes. For example, given this sequence: 1 OVS_KEY_ATTR_PRIORITY 2 OVS_KEY_ATTR_TUNNEL 3 OVS_TUNNEL_KEY_ATTR_ID 4 OVS_TUNNEL_KEY_ATTR_IPV4_SRC 5 OVS_TUNNEL_KEY_ATTR_IPV4_DST 6 OVS_TUNNEL_KEY_ATTR_TTL 7 OVS_TUNNEL_KEY_ATTR_TP_SRC 8 OVS_TUNNEL_KEY_ATTR_TP_DST 9 OVS_KEY_ATTR_IN_PORT 10 OVS_KEY_ATTR_SKB_MARK 11 OVS_KEY_ATTR_MPLS we switch to the 'ovs_tunnel_key_lens' table on attribute #3, and we don't switch back to 'ovs_key_lens' while setting attributes #9 to #11 in the sequence. As OVS_KEY_ATTR_MPLS evaluates to 21, and the array size of 'ovs_tunnel_key_lens' is 15, we also get this kind of KASan splat while accessing the wrong table: [ 7654.586496] ================================================================== [ 7654.594573] BUG: KASAN: global-out-of-bounds in nlattr_set+0x164/0xde9 [openvswitch] [ 7654.603214] Read of size 4 at addr ffffffffc169ecf0 by task handler29/87430 [ 7654.610983] [ 7654.612644] CPU: 21 PID: 87430 Comm: handler29 Kdump: loaded Not tainted 3.10.0-866.el7.test.x86_64 #1 [ 7654.623030] Hardware name: Dell Inc. PowerEdge R730/072T6D, BIOS 2.1.7 06/16/2016 [ 7654.631379] Call Trace: [ 7654.634108] [] dump_stack+0x19/0x1b [ 7654.639843] [] print_address_description+0x33/0x290 [ 7654.647129] [] ? nlattr_set+0x164/0xde9 [openvswitch] [ 7654.654607] [] kasan_report.part.3+0x242/0x330 [ 7654.661406] [] __asan_report_load4_noabort+0x34/0x40 [ 7654.668789] [] nlattr_set+0x164/0xde9 [openvswitch] [ 7654.676076] [] ovs_nla_get_match+0x10c8/0x1900 [openvswitch] [ 7654.684234] [] ? genl_rcv+0x28/0x40 [ 7654.689968] [] ? netlink_unicast+0x3f3/0x590 [ 7654.696574] [] ? ovs_nla_put_tunnel_info+0xb0/0xb0 [openvswitch] [ 7654.705122] [] ? unwind_get_return_address+0xb0/0xb0 [ 7654.712503] [] ? system_call_fastpath+0x1c/0x21 [ 7654.719401] [] ? update_stack_state+0x229/0x370 [ 7654.726298] [] ? update_stack_state+0x229/0x370 [ 7654.733195] [] ? kasan_unpoison_shadow+0x35/0x50 [ 7654.740187] [] ? kasan_kmalloc+0xaa/0xe0 [ 7654.746406] [] ? kasan_slab_alloc+0x12/0x20 [ 7654.752914] [] ? memset+0x31/0x40 [ 7654.758456] [] ovs_flow_cmd_new+0x2b2/0xf00 [openvswitch] [snip] [ 7655.132484] The buggy address belongs to the variable: [ 7655.138226] ovs_tunnel_key_lens+0xf0/0xffffffffffffd400 [openvswitch] [ 7655.145507] [ 7655.147166] Memory state around the buggy address: [ 7655.152514] ffffffffc169eb80: 00 00 00 00 00 00 00 00 00 00 fa fa fa fa fa fa [ 7655.160585] ffffffffc169ec00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 7655.168644] >ffffffffc169ec80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa fa [ 7655.176701] ^ [ 7655.184372] ffffffffc169ed00: fa fa fa fa 00 00 00 00 fa fa fa fa 00 00 00 05 [ 7655.192431] ffffffffc169ed80: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00 [ 7655.200490] ================================================================== Reported-by: Hangbin Liu Fixes: 982b52700482 ("openvswitch: Fix mask generation for nested attributes.") Signed-off-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller net/openvswitch/flow_netlink.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 23b8392201e0681b76630c4cea68e1a2e1821ec6 Author: Bhadram Varka Date: Wed May 2 20:43:58 2018 +0530 net: phy: broadcom: add support for BCM89610 PHY It adds support for BCM89610 (Single-Port 10/100/1000BASE-T) transceiver which is used in P3310 Tegra186 platform. Signed-off-by: Bhadram Varka Signed-off-by: David S. Miller drivers/net/phy/broadcom.c | 10 ++++++++++ include/linux/brcmphy.h | 1 + 2 files changed, 11 insertions(+) commit 625e2001e99e82ea3eb5b0370a428a4328b9166b Merge: 54c6fd5 eb0b4aa Author: Linus Torvalds Date: Fri May 4 05:47:21 2018 -1000 Merge tag 'for-linus-4.17-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen cleanup from Juergen Gross: "One cleanup to remove VLAs from the kernel" * tag 'for-linus-4.17-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/xen: Remove use of VLAs commit b220244d41798c6592e7d17843256eb0bae456a0 Author: James Morse Date: Fri May 4 16:19:24 2018 +0100 arm64: vgic-v2: Fix proxying of cpuif access Proxying the cpuif accesses at EL2 makes use of vcpu_data_guest_to_host and co, which check the endianness, which call into vcpu_read_sys_reg... which isn't mapped at EL2 (it was inlined before, and got moved OoL with the VHE optimizations). The result is of course a nice panic. Let's add some specialized cruft to keep the broken platforms that require this hack alive. But, this code used vcpu_data_guest_to_host(), which expected us to write the value to host memory, instead we have trapped the guest's read or write to an mmio-device, and are about to replay it using the host's readl()/writel() which also perform swabbing based on the host endianness. This goes wrong when both host and guest are big-endian, as readl()/writel() will undo the guest's swabbing, causing the big-endian value to be written to device-memory. What needs doing? A big-endian guest will have pre-swabbed data before storing, undo this. If its necessary for the host, writel() will re-swab it. For a read a big-endian guest expects to swab the data after the load. The hosts's readl() will correct for host endianness, giving us the device-memory's value in the register. For a big-endian guest, swab it as if we'd only done the load. For a little-endian guest, nothing needs doing as readl()/writel() leave the correct device-memory value in registers. Tested on Juno with that rarest of things: a big-endian 64K host. Based on a patch from Marc Zyngier. Reported-by: Suzuki K Poulose Fixes: bf8feb39642b ("arm64: KVM: vgic-v2: Add GICV access from HYP") Signed-off-by: James Morse Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit c3616a077190435cb540e134d5dfcd15207817ee Author: Valentin Schneider Date: Wed May 2 11:53:03 2018 +0100 KVM: arm/arm64: vgic_init: Cleanup reference to process_maintenance One comment still mentioned process_maintenance operations after commit af0614991ab6 ("KVM: arm/arm64: vgic: Get rid of unnecessary process_maintenance operation") Update the comment to point to vgic_fold_lr_state instead, which is where maintenance interrupts are taken care of. Acked-by: Christoffer Dall Signed-off-by: Valentin Schneider Signed-off-by: Marc Zyngier virt/kvm/arm/vgic/vgic-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1975fa56f1c85f5f47ab5cee903b9374a921b122 Author: James Morse Date: Wed May 2 12:17:02 2018 +0100 KVM: arm64: Fix order of vcpu_write_sys_reg() arguments A typo in kvm_vcpu_set_be()'s call: | vcpu_write_sys_reg(vcpu, SCTLR_EL1, sctlr) causes us to use the 32bit register value as an index into the sys_reg[] array, and sail off the end of the linear map when we try to bring up big-endian secondaries. | Unable to handle kernel paging request at virtual address ffff80098b982c00 | Mem abort info: | ESR = 0x96000045 | Exception class = DABT (current EL), IL = 32 bits | SET = 0, FnV = 0 | EA = 0, S1PTW = 0 | Data abort info: | ISV = 0, ISS = 0x00000045 | CM = 0, WnR = 1 | swapper pgtable: 4k pages, 48-bit VAs, pgdp = 000000002ea0571a | [ffff80098b982c00] pgd=00000009ffff8803, pud=0000000000000000 | Internal error: Oops: 96000045 [#1] PREEMPT SMP | Modules linked in: | CPU: 2 PID: 1561 Comm: kvm-vcpu-0 Not tainted 4.17.0-rc3-00001-ga912e2261ca6-dirty #1323 | Hardware name: ARM Juno development board (r1) (DT) | pstate: 60000005 (nZCv daif -PAN -UAO) | pc : vcpu_write_sys_reg+0x50/0x134 | lr : vcpu_write_sys_reg+0x50/0x134 | Process kvm-vcpu-0 (pid: 1561, stack limit = 0x000000006df4728b) | Call trace: | vcpu_write_sys_reg+0x50/0x134 | kvm_psci_vcpu_on+0x14c/0x150 | kvm_psci_0_2_call+0x244/0x2a4 | kvm_hvc_call_handler+0x1cc/0x258 | handle_hvc+0x20/0x3c | handle_exit+0x130/0x1ec | kvm_arch_vcpu_ioctl_run+0x340/0x614 | kvm_vcpu_ioctl+0x4d0/0x840 | do_vfs_ioctl+0xc8/0x8d0 | ksys_ioctl+0x78/0xa8 | sys_ioctl+0xc/0x18 | el0_svc_naked+0x30/0x34 | Code: 73620291 604d00b0 00201891 1ab10194 (957a33f8) |---[ end trace 4b4a4f9628596602 ]--- Fix the order of the arguments. Fixes: 8d404c4c24613 ("KVM: arm64: Rewrite system register accessors to read/write functions") CC: Christoffer Dall Signed-off-by: James Morse Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_emulate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54c6fd566bb887e2c01d0db00ac83a1f1e8fd0d8 Merge: c33ede1 d4f3388 Author: Linus Torvalds Date: Fri May 4 05:44:50 2018 -1000 Merge tag 'pm-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "This fixes a regression from the 4.14 cycle in the CPPC cpufreq driver causing it to use an incorrect transition delay value which leads to a very high rate of frequency change requests when the schedutil governor is in use (Prashanth Prakash)" * tag 'pm-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq / CPPC: Set platform specific transition_delay_us commit c33ede14337a3a486f9529f27907a2f964bc94e8 Merge: b99dc74 7553961 Author: Linus Torvalds Date: Fri May 4 05:43:33 2018 -1000 Merge tag 'acpi-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "This fixes an ACPICA utilities (acpidump) build regression from the 4.16 cycle by setting LD in the CFLAGS passed to the linker to $(CC) again (Jiri Slaby)" * tag 'acpi-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: tools: power/acpi, revert to LD = gcc commit b99dc74253980287c826b8158327fc8f2ff03dad Merge: dac1acc 3259081 Author: Linus Torvalds Date: Fri May 4 05:38:51 2018 -1000 Merge tag 'media/v4.17-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - a trivial one-line fix addressing a PTR_ERR() getting value from a wrong var at imx driver - a patch changing my e-mail at the Kernel tree to mchehab@kernel.org. no code changes * tag 'media/v4.17-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: MAINTAINERS & files: Canonize the e-mails I use at files media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR commit dac1acc3c216b09e04f173b3c1b94f1760ab3078 Merge: 1504269 f13876e Author: Linus Torvalds Date: Fri May 4 05:37:22 2018 -1000 Merge tag 'sound-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes, all deserved for stable. Two are about core API fixes for the bugs that were triggered by ever-growing fuzzers, while others are driver-specific fixes" * tag 'sound-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: pcm: Check PCM state at xfern compat ioctl ALSA: aloop: Add missing cable lock to ctl API callbacks ALSA: dice: fix kernel NULL pointer dereference due to invalid calculation for array index ALSA: seq: Fix races at MIDI encoding in snd_virmidi_output_trigger() ALSA: hda - Fix incorrect usage of IS_REACHABLE() commit 9bf4e370048d2bbae5262d0c6280e0142804a272 Author: Dmitry Osipenko Date: Fri May 4 01:55:37 2018 +0300 ARM: dts: tegra20: Revert "Fix ULPI regression on Tegra20" Commit 4c9a27a6c66d ("ARM: tegra: Fix ULPI regression on Tegra20") changed "ulpi-link" clock from CDEV2 to PLL_P_OUT4. Turned out that PLL_P_OUT4 is the parent of CDEV2 clock and original clock setup of "ulpi-link" was correct. The reverted patch was fixing USB for one board and broke the other, now Tegra's clk driver correctly sets parent for the CDEV2 clock and hence patch could be reverted safely, restoring USB for all of the boards. Signed-off-by: Dmitry Osipenko Reviewed-by: Marcel Ziswiler Tested-by: Marcel Ziswiler Tested-by: Marc Dietrich Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra20.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65972a6fa914b16cc15ffcffcb8bea8c64e78f49 Author: Kees Cook Date: Tue Apr 10 21:43:15 2018 -0700 dm mirror: remove VLA usage On the quest to remove all VLAs from the kernel[1], this avoids VLAs in dm-raid1.c by just using the maximum size for the stack arrays. The nr_mirrors value was already capped at 9, so this makes it a trivial adjustment to the array sizes. [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Kees Cook Acked-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid1.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 3259081991a9398434f6f49468b960f136ac0158 Author: Mauro Carvalho Chehab Date: Wed Apr 25 05:34:48 2018 -0400 MAINTAINERS & files: Canonize the e-mails I use at files From now on, I'll start using my @kernel.org as my development e-mail. As such, let's remove the entries that point to the old mchehab@s-opensource.com at MAINTAINERS file. For the files written with a copyright with mchehab@s-opensource, let's keep Samsung on their names, using mchehab+samsung@kernel.org, in order to keep pointing to my employer, with sponsors the work. For the files written before I join Samsung (on July, 4 2013), let's just use mchehab@kernel.org. For bug reports, we can simply point to just kernel.org, as this will reach my mchehab+samsung inbox anyway. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Brian Warner Signed-off-by: Mauro Carvalho Chehab Documentation/doc-guide/parse-headers.rst | 4 ++-- Documentation/media/uapi/rc/keytable.c.rst | 2 +- Documentation/media/uapi/v4l/v4l2grab.c.rst | 2 +- Documentation/sphinx/parse-headers.pl | 4 ++-- .../translations/zh_CN/video4linux/v4l2-framework.txt | 4 ++-- MAINTAINERS | 17 ----------------- drivers/media/i2c/saa7115.c | 2 +- drivers/media/i2c/saa711x_regs.h | 2 +- drivers/media/i2c/tda7432.c | 2 +- drivers/media/i2c/tvp5150.c | 2 +- drivers/media/i2c/tvp5150_reg.h | 2 +- drivers/media/i2c/tvp7002.c | 2 +- drivers/media/i2c/tvp7002_reg.h | 2 +- drivers/media/media-devnode.c | 2 +- drivers/media/pci/bt8xx/bttv-audio-hook.c | 2 +- drivers/media/pci/bt8xx/bttv-audio-hook.h | 2 +- drivers/media/pci/bt8xx/bttv-cards.c | 4 ++-- drivers/media/pci/bt8xx/bttv-driver.c | 2 +- drivers/media/pci/bt8xx/bttv-i2c.c | 2 +- drivers/media/pci/cx23885/cx23885-input.c | 2 +- drivers/media/pci/cx88/cx88-alsa.c | 4 ++-- drivers/media/pci/cx88/cx88-blackbird.c | 2 +- drivers/media/pci/cx88/cx88-core.c | 2 +- drivers/media/pci/cx88/cx88-i2c.c | 2 +- drivers/media/pci/cx88/cx88-video.c | 2 +- drivers/media/radio/radio-aimslab.c | 2 +- drivers/media/radio/radio-aztech.c | 2 +- drivers/media/radio/radio-gemtek.c | 2 +- drivers/media/radio/radio-maxiradio.c | 2 +- drivers/media/radio/radio-rtrack2.c | 2 +- drivers/media/radio/radio-sf16fmi.c | 2 +- drivers/media/radio/radio-terratec.c | 2 +- drivers/media/radio/radio-trust.c | 2 +- drivers/media/radio/radio-typhoon.c | 2 +- drivers/media/radio/radio-zoltrix.c | 2 +- drivers/media/rc/keymaps/rc-avermedia-m135a.c | 2 +- drivers/media/rc/keymaps/rc-encore-enltv-fm53.c | 2 +- drivers/media/rc/keymaps/rc-encore-enltv2.c | 2 +- drivers/media/rc/keymaps/rc-kaiomy.c | 2 +- drivers/media/rc/keymaps/rc-kworld-plus-tv-analog.c | 2 +- drivers/media/rc/keymaps/rc-pixelview-new.c | 2 +- drivers/media/tuners/tea5761.c | 4 ++-- drivers/media/tuners/tea5767.c | 4 ++-- drivers/media/tuners/tuner-xc2028-types.h | 2 +- drivers/media/tuners/tuner-xc2028.c | 4 ++-- drivers/media/tuners/tuner-xc2028.h | 2 +- drivers/media/usb/em28xx/em28xx-camera.c | 2 +- drivers/media/usb/em28xx/em28xx-cards.c | 2 +- drivers/media/usb/em28xx/em28xx-core.c | 4 ++-- drivers/media/usb/em28xx/em28xx-dvb.c | 4 ++-- drivers/media/usb/em28xx/em28xx-i2c.c | 2 +- drivers/media/usb/em28xx/em28xx-input.c | 2 +- drivers/media/usb/em28xx/em28xx-video.c | 4 ++-- drivers/media/usb/em28xx/em28xx.h | 2 +- drivers/media/usb/gspca/zc3xx-reg.h | 2 +- drivers/media/usb/tm6000/tm6000-cards.c | 2 +- drivers/media/usb/tm6000/tm6000-core.c | 2 +- drivers/media/usb/tm6000/tm6000-i2c.c | 2 +- drivers/media/usb/tm6000/tm6000-regs.h | 2 +- drivers/media/usb/tm6000/tm6000-usb-isoc.h | 2 +- drivers/media/usb/tm6000/tm6000-video.c | 2 +- drivers/media/usb/tm6000/tm6000.h | 2 +- drivers/media/v4l2-core/v4l2-dev.c | 4 ++-- drivers/media/v4l2-core/v4l2-ioctl.c | 2 +- drivers/media/v4l2-core/videobuf-core.c | 6 +++--- drivers/media/v4l2-core/videobuf-dma-contig.c | 2 +- drivers/media/v4l2-core/videobuf-dma-sg.c | 6 +++--- drivers/media/v4l2-core/videobuf-vmalloc.c | 4 ++-- include/media/i2c/tvp7002.h | 2 +- include/media/videobuf-core.h | 4 ++-- include/media/videobuf-dma-sg.h | 4 ++-- include/media/videobuf-vmalloc.h | 2 +- scripts/extract_xc3028.pl | 2 +- scripts/split-man.pl | 2 +- 74 files changed, 92 insertions(+), 109 deletions(-) commit 2b7db29b79190f7ad5c32f63594ba08b9b9171ea Author: From: Gustavo A. R. Silva Date: Mon Apr 16 13:28:56 2018 -0400 media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR Fix inconsistent IS_ERR and PTR_ERR in imx_csi_probe. The proper pointer to be passed as argument is pinctrl instead of priv->vdev. This issue was detected with the help of Coccinelle. Fixes: 52e17089d185 ("media: imx: Don't initialize vars that won't be used") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Fabio Estevam Reviewed-by: Philipp Zabel Tested-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-csi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 755396163148b50fe1afb4bdd3365e47f3ff7a42 Author: Jiri Slaby Date: Tue Apr 24 09:43:44 2018 +0200 tools: power/acpi, revert to LD = gcc Commit 7ed1c1901fe5 (tools: fix cross-compile var clobbering) removed setting of LD to $(CROSS_COMPILE)gcc. This broke build of acpica (acpidump) in power/acpi: ld: unrecognized option '-D_LINUX' The tools pass CFLAGS to the linker (incl. -D_LINUX), so revert this particular change and let LD be $(CC) again. Note that the old behaviour was a bit different, it used $(CROSS_COMPILE)gcc which was eliminated by the commit 7ed1c1901fe5. We use $(CC) for that reason. Fixes: 7ed1c1901fe5 (tools: fix cross-compile var clobbering) Signed-off-by: Jiri Slaby Cc: 4.16+ # 4.16+ Signed-off-by: Rafael J. Wysocki tools/power/acpi/Makefile.config | 1 + 1 file changed, 1 insertion(+) commit a2ee41fd953e7c3ff6c55a3038c80354d191a318 Author: Miquel Raynal Date: Thu May 3 12:00:27 2018 +0200 mtd: rawnand: marvell: fix command xtype in BCH write hook One layout supported by the Marvell NAND controller supports NAND pages of 2048 bytes, all handled in one single chunk when using BCH with a strength of 4-bit per 512 bytes. In this case, instead of the generic XTYPE_WRITE_DISPATCH/XTYPE_LAST_NAKED_RW couple, the controller expects to receive XTYPE_MONOLITHIC_RW. This fixes problems at boot like: [ 1.315475] Scanning device for bad blocks [ 3.203108] marvell-nfc f10d0000.flash: Timeout waiting for RB signal [ 3.209564] nand_bbt: error while writing BBT block -110 [ 4.243106] marvell-nfc f10d0000.flash: Timeout waiting for RB signal [ 5.283106] marvell-nfc f10d0000.flash: Timeout waiting for RB signal [ 5.289562] nand_bbt: error -110 while marking block 2047 bad [ 6.323106] marvell-nfc f10d0000.flash: Timeout waiting for RB signal [ 6.329559] nand_bbt: error while writing BBT block -110 [ 7.363106] marvell-nfc f10d0000.flash: Timeout waiting for RB signal [ 8.403105] marvell-nfc f10d0000.flash: Timeout waiting for RB signal [ 8.409559] nand_bbt: error -110 while marking block 2046 bad ... Fixes: 02f26ecf8c772 ("mtd: nand: add reworked Marvell NAND controller driver") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Tested-by: Chris Packham Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/marvell_nand.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b76401fc4ba720f0f38f7b1f9d54d5c2308bc18d Author: Chris Packham Date: Thu May 3 14:21:28 2018 +1200 mtd: rawnand: marvell: pass ms delay to wait_op marvell_nfc_wait_op() expects the delay to be expressed in milliseconds but nand_sdr_timings uses picoseconds. Use PSEC_TO_MSEC when passing tPROG_max to marvell_nfc_wait_op(). Fixes: 02f26ecf8c772 ("mtd: nand: add reworked Marvell NAND controller driver") Cc: stable@vger.kernel.org Signed-off-by: Chris Packham Reviewed-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/marvell_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b5bf9a90bbebffba888c9144c5a8a10317b04064 Author: Peter Zijlstra Date: Mon Apr 30 14:51:01 2018 +0200 sched/core: Introduce set_special_state() Gaurav reported a perceived problem with TASK_PARKED, which turned out to be a broken wait-loop pattern in __kthread_parkme(), but the reported issue can (and does) in fact happen for states that do not do condition based sleeps. When the 'current->state = TASK_RUNNING' store of a previous (concurrent) try_to_wake_up() collides with the setting of a 'special' sleep state, we can loose the sleep state. Normal condition based wait-loops are immune to this problem, but for sleep states that are not condition based are subject to this problem. There already is a fix for TASK_DEAD. Abstract that and also apply it to TASK_STOPPED and TASK_TRACED, both of which are also without condition based wait-loop. Reported-by: Gaurav Kohli Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Oleg Nesterov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 50 +++++++++++++++++++++++++++++++++++++++----- include/linux/sched/signal.h | 2 +- kernel/sched/core.c | 17 +-------------- kernel/signal.c | 17 +++++++++++++-- 4 files changed, 62 insertions(+), 24 deletions(-) commit 1504269814263c9676b4605a6a91e14dc6ceac21 Merge: e523a25 a335544 Author: Linus Torvalds Date: Thu May 3 19:26:51 2018 -1000 Merge tag 'linux-kselftest-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fixes from Shuah Khan: "This Kselftest update for 4.17-rc4 consists of a fix for a syntax error in the script that runs selftests. Mathieu Desnoyers found this bug in the script on systems running GNU Make 3.8 or older" * tag 'linux-kselftest-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: Fix lib.mk run_tests target shell script commit e523a2562a4457d9aae9b657125d193218631681 Merge: bb60931 a8d7aa1 Author: Linus Torvalds Date: Thu May 3 18:57:03 2018 -1000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Various sockmap fixes from John Fastabend (pinned map handling, blocking in recvmsg, double page put, error handling during redirect failures, etc.) 2) Fix dead code handling in x86-64 JIT, from Gianluca Borello. 3) Missing device put in RDS IB code, from Dag Moxnes. 4) Don't process fast open during repair mode in TCP< from Yuchung Cheng. 5) Move address/port comparison fixes in SCTP, from Xin Long. 6) Handle add a bond slave's master into a bridge properly, from Hangbin Liu. 7) IPv6 multipath code can operate on unitialized memory due to an assumption that the icmp header is in the linear SKB area. Fix from Eric Dumazet. 8) Don't invoke do_tcp_sendpages() recursively via TLS, from Dave Watson. 9) Fix memory leaks in x86-64 JIT, from Daniel Borkmann. 10) RDS leaks kernel memory to userspace, from Eric Dumazet. 11) DCCP can invoke a tasklet on a freed socket, take a refcount. Also from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (78 commits) dccp: fix tasklet usage smc: fix sendpage() call net/smc: handle unregistered buffers net/smc: call consolidation qed: fix spelling mistake: "offloded" -> "offloaded" net/mlx5e: fix spelling mistake: "loobpack" -> "loopback" tcp: restore autocorking rds: do not leak kernel memory to user land qmi_wwan: do not steal interfaces from class drivers ipv4: fix fnhe usage by non-cached routes bpf: sockmap, fix error handling in redirect failures bpf: sockmap, zero sg_size on error when buffer is released bpf: sockmap, fix scatterlist update on error path in send with apply net_sched: fq: take care of throttled flows before reuse ipv6: Revert "ipv6: Allow non-gateway ECMP for IPv6" bpf, x64: fix memleak when not converging on calls bpf, x64: fix memleak when not converging after image net/smc: restrict non-blocking connect finish 8139too: Use disable_irq_nosync() in rtl8139_poll_controller() sctp: fix the issue that the cookie-ack with auth can't get processed ... commit bb609316d406c6e4dc29e0219d40e70837f70f8a Merge: c15f6d8 8d73b18 Author: Linus Torvalds Date: Thu May 3 18:31:19 2018 -1000 Merge branch 'parisc-4.17-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: "Fix two section mismatches, convert to read_persistent_clock64(), add further documentation regarding the HPMC crash handler and make bzImage the default build target" * 'parisc-4.17-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix section mismatches parisc: drivers.c: Fix section mismatches parisc: time: Convert read_persistent_clock() to read_persistent_clock64() parisc: Document rules regarding checksum of HPMC handler parisc: Make bzImage default build target commit d0f1a451e33d9ca834422622da30aa68daade56b Author: Daniel Borkmann Date: Fri May 4 02:13:57 2018 +0200 bpf: use array_index_nospec in find_prog_type Commit 9ef09e35e521 ("bpf: fix possible spectre-v1 in find_and_alloc_map()") converted find_and_alloc_map() over to use array_index_nospec() to sanitize map type that user space passes on map creation, and this patch does an analogous conversion for progs in find_prog_type() as it's also passed from user space when loading progs as attr->prog_type. Signed-off-by: Daniel Borkmann Cc: Mark Rutland Signed-off-by: Alexei Starovoitov kernel/bpf/syscall.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 0ccc1c8f0282e237a0bd6dca7cdac4ed5e318ee7 Author: Tobias Jakobi Date: Fri Feb 2 16:11:23 2018 +0100 drm/exynos: mixer: avoid Oops in vp_video_buffer() If an interlaced video mode is selected, a IOMMU pagefault is triggered by vp_video_buffer(). Fix the most apparent bugs: - pitch value for chroma plane - divide by two of height and vpos of source and destination Signed-off-by: Tobias Jakobi [ a.hajda: Halved also destination height and vpos, updated commit message ] Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 2eced8e917b060587fc8ed46df41c364957a5050 Author: Andrzej Hajda Date: Fri Feb 2 16:11:22 2018 +0100 drm/exynos/mixer: fix synchronization check in interlaced mode In case of interlace mode video processor registers and mixer config register must be check to ensure internal state is in sync with shadow registers. This patch fixes page-faults in interlaced mode. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 10 ++++++++++ drivers/gpu/drm/exynos/regs-mixer.h | 1 + 2 files changed, 11 insertions(+) commit a02cbe2e34c576cdc5e7846a3cd55245ab81db47 Merge: 1e5fbc0b 13f149d Author: Dave Airlie Date: Fri May 4 10:03:27 2018 +1000 Merge branch 'vmwgfx-fixes-4.17' of git://people.freedesktop.org/~thomash/linux into drm-fixes Two fixes for now, one for a long standing problem uncovered by a commit in the 4.17 merge window, one for a regression introduced by a previous bugfix, Cc'd stable. * 'vmwgfx-fixes-4.17' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: Fix a buffer object leak drm/vmwgfx: Clean up fbdev modeset locking commit 9ef09e35e521bf0df5325cc9cffa726a8f5f3c1b Author: Mark Rutland Date: Thu May 3 17:04:59 2018 +0100 bpf: fix possible spectre-v1 in find_and_alloc_map() It's possible for userspace to control attr->map_type. Sanitize it when using it as an array index to prevent an out-of-bounds value being used under speculation. Found by smatch. Signed-off-by: Mark Rutland Cc: Alexei Starovoitov Cc: Dan Carpenter Cc: Daniel Borkmann Cc: Peter Zijlstra Cc: netdev@vger.kernel.org Acked-by: David S. Miller Signed-off-by: Daniel Borkmann kernel/bpf/syscall.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit bc519d9574618e47a0c788000fb78da95e18d953 Author: Rob Herring Date: Thu May 3 13:09:44 2018 -0500 spi: bcm2835aux: ensure interrupts are enabled for shared handler The BCM2835 AUX SPI has a shared interrupt line (with AUX UART). Downstream fixes this with an AUX irqchip to demux the IRQ sources and a DT change which breaks compatibility with older kernels. The AUX irqchip was already rejected for upstream[1] and the DT change would break working systems if the DTB is updated to a newer one. The latter issue was brought to my attention by Alex Graf. The root cause however is a bug in the shared handler. Shared handlers must check that interrupts are actually enabled before servicing the interrupt. Add a check that the TXEMPTY or IDLE interrupts are enabled. [1] https://patchwork.kernel.org/patch/9781221/ Cc: Alexander Graf Cc: Marc Zyngier Cc: Mark Brown Cc: Eric Anholt Cc: Stefan Wahren Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-spi@vger.kernel.org Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring Reviewed-by: Eric Anholt Signed-off-by: Mark Brown drivers/spi/spi-bcm2835aux.c | 5 +++++ 1 file changed, 5 insertions(+) commit b8b784958eccbf8f51ebeee65282ca3fd59ea391 Author: Jan Kara Date: Thu May 3 18:26:26 2018 +0200 bdi: Fix oops in wb_workfn() Syzbot has reported that it can hit a NULL pointer dereference in wb_workfn() due to wb->bdi->dev being NULL. This indicates that wb_workfn() was called for an already unregistered bdi which should not happen as wb_shutdown() called from bdi_unregister() should make sure all pending writeback works are completed before bdi is unregistered. Except that wb_workfn() itself can requeue the work with: mod_delayed_work(bdi_wq, &wb->dwork, 0); and if this happens while wb_shutdown() is waiting in: flush_delayed_work(&wb->dwork); the dwork can get executed after wb_shutdown() has finished and bdi_unregister() has cleared wb->bdi->dev. Make wb_workfn() use wakeup_wb() for requeueing the work which takes all the necessary precautions against racing with bdi unregistration. CC: Tetsuo Handa CC: Tejun Heo Fixes: 839a8e8660b6777e7fe4e80af1a048aebe2b5977 Reported-by: syzbot Reviewed-by: Dave Chinner Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/fs-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9aa169213d1166d30ae357a44abbeae93459339d Author: Parav Pandit Date: Wed May 2 13:18:59 2018 +0300 RDMA/cma: Do not query GID during QP state transition to RTR When commit [1] was added, SGID was queried to derive the SMAC address. Then, later on during a refactor [2], SMAC was no longer needed. However, the now useless GID query remained. Then during additional code changes later on, the GID query was being done in such a way that it caused iWARP queries to start breaking. Remove the useless GID query and resolve the iWARP breakage at the same time. This is discussed in [3]. [1] commit dd5f03beb4f7 ("IB/core: Ethernet L2 attributes in verbs/cm structures") [2] commit 5c266b2304fb ("IB/cm: Remove the usage of smac and vid of qp_attr and cm_av") [3] https://www.spinics.net/lists/linux-rdma/msg63951.html Suggested-by: Shiraz Saleem Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 7 ------- 1 file changed, 7 deletions(-) commit b03bcde962606d2ee59a4e9dd470db9ad53c5418 Author: Jack Morgenstein Date: Wed May 2 13:04:25 2018 +0300 IB/mlx4: Fix integer overflow when calculating optimal MTT size When the kernel was compiled using the UBSAN option, we saw the following stack trace: [ 1184.827917] UBSAN: Undefined behaviour in drivers/infiniband/hw/mlx4/mr.c:349:27 [ 1184.828114] signed integer overflow: [ 1184.828247] -2147483648 - 1 cannot be represented in type 'int' The problem was caused by calling round_up in procedure mlx4_ib_umem_calc_optimal_mtt_size (on line 349, as noted in the stack trace) with the second parameter (1 << block_shift) (which is an int). The second parameter should have been (1ULL << block_shift) (which is an unsigned long long). (1 << block_shift) is treated by the compiler as an int (because 1 is an integer). Now, local variable block_shift is initialized to 31. If block_shift is 31, 1 << block_shift is 1 << 31 = 0x80000000=-214748368. This is the most negative int value. Inside the round_up macro, there is a cast applied to ((1 << 31) - 1). However, this cast is applied AFTER ((1 << 31) - 1) is calculated. Since (1 << 31) is treated as an int, we get the negative overflow identified by UBSAN in the process of calculating ((1 << 31) - 1). The fix is to change (1 << block_shift) to (1ULL << block_shift) on line 349. Fixes: 9901abf58368 ("IB/mlx4: Use optimal numbers of MTT entries") Signed-off-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59482a14918b282ca2a98f38c69da5ebeb1107d2 Author: Sebastian Sanchez Date: Tue May 1 05:36:13 2018 -0700 IB/hfi1: Fix memory leak in exception path in get_irq_affinity() When IRQ affinity is set and the interrupt type is unknown, a cpu mask allocated within the function is never freed. Fix this memory leak by allocating memory within the scope where it is used. Reviewed-by: Mike Marciniszyn Reviewed-by: Michael J. Ruhl Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/affinity.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit e9777ad4399c26c70318c4945f94efac2ed95391 Author: Sebastian Sanchez Date: Tue May 1 05:36:06 2018 -0700 IB/{hfi1, rdmavt}: Fix memory leak in hfi1_alloc_devdata() upon failure When allocating device data, if there's an allocation failure, the already allocated memory won't be freed such as per-cpu counters. Fix memory leaks in exception path by creating a common reentrant clean up function hfi1_clean_devdata() to be used at driver unload time and device data allocation failure. To accomplish this, free_platform_config() and clean_up_i2c() are changed to be reentrant to remove dependencies when they are called in different order. This helps avoid NULL pointer dereferences introduced by this patch if those two functions weren't reentrant. In addition, set dd->int_counter, dd->rcv_limit, dd->send_schedule and dd->tx_opstats to NULL after they're freed in hfi1_clean_devdata(), so that hfi1_clean_devdata() is fully reentrant. Reviewed-by: Mike Marciniszyn Reviewed-by: Michael J. Ruhl Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 37 +++++++++++++++++++++++++---------- drivers/infiniband/hw/hfi1/platform.c | 1 + drivers/infiniband/hw/hfi1/qsfp.c | 2 ++ 3 files changed, 30 insertions(+), 10 deletions(-) commit 45d924571a5e1329580811f2419da61b07ac3613 Author: Sebastian Sanchez Date: Tue May 1 05:35:58 2018 -0700 IB/hfi1: Fix NULL pointer dereference when invalid num_vls is used When an invalid num_vls is used as a module parameter, the code execution follows an exception path where the macro dd_dev_err() expects dd->pcidev->dev not to be NULL in hfi1_init_dd(). This causes a NULL pointer dereference. Fix hfi1_init_dd() by initializing dd->pcidev and dd->pcidev->dev earlier in the code. If a dd exists, then dd->pcidev and dd->pcidev->dev always exists. BUG: unable to handle kernel NULL pointer dereference at 00000000000000f0 IP: __dev_printk+0x15/0x90 Workqueue: events work_for_cpu_fn RIP: 0010:__dev_printk+0x15/0x90 Call Trace: dev_err+0x6c/0x90 ? hfi1_init_pportdata+0x38d/0x3f0 [hfi1] hfi1_init_dd+0xdd/0x2530 [hfi1] ? pci_conf1_read+0xb2/0xf0 ? pci_read_config_word.part.9+0x64/0x80 ? pci_conf1_write+0xb0/0xf0 ? pcie_capability_clear_and_set_word+0x57/0x80 init_one+0x141/0x490 [hfi1] local_pci_probe+0x3f/0xa0 work_for_cpu_fn+0x10/0x20 process_one_work+0x152/0x350 worker_thread+0x1cf/0x3e0 kthread+0xf5/0x130 ? max_active_store+0x80/0x80 ? kthread_bind+0x10/0x10 ? do_syscall_64+0x6e/0x1a0 ? SyS_exit_group+0x10/0x10 ret_from_fork+0x35/0x40 Cc: # 4.9.x Reviewed-by: Mike Marciniszyn Reviewed-by: Michael J. Ruhl Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 2 ++ drivers/infiniband/hw/hfi1/pcie.c | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) commit 0a0bcb046b2f0c15b89f8c1b08ad3de601a83c66 Author: Mike Marciniszyn Date: Tue May 1 05:35:51 2018 -0700 IB/hfi1: Fix loss of BECN with AHG AHG may be armed to use the stored header, which by design is limited to edits in the PSN/A 32 bit word (bth2). When the code is trying to send a BECN, the use of the stored header will lose the BECN bit. Fix by avoiding AHG when getting ready to send a BECN. This is accomplished by always claiming the packet is not a middle packet which is an AHG precursor. BECNs are not a normal case and this should not hurt AHG optimizations. Cc: # 4.14.x Reviewed-by: Michael J. Ruhl Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/ruc.c | 50 ++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 10 deletions(-) commit 5da9e742be44d9b7c68b1bf6e1aaf46a1aa7a52b Author: Michael J. Ruhl Date: Tue May 1 05:35:43 2018 -0700 IB/hfi1 Use correct type for num_user_context The module parameter num_user_context is defined as 'int' and defaults to -1. The module_param_named() says that it is uint. Correct module_param_named() type information and update the modinfo text to reflect the default value. Reviewed-by: Dennis Dalessandro Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f59fb9e05109b836230813e45f71c9ecc2d5dbe6 Author: Mike Marciniszyn Date: Tue May 1 05:35:36 2018 -0700 IB/hfi1: Fix handling of FECN marked multicast packet The code for handling a marked UD packet unconditionally returns the dlid in the header of the FECN marked packet. This is not correct for multicast packets where the DLID is in the multicast range. The subsequent attempt to send the CNP with the multicast lid will cause the chip to halt the ack send context because the source lid doesn't match the chip programming. The send context will be halted and flush any other pending packets in the pio ring causing the CNP to not be sent. A part of investigating the fix, it was determined that the 16B work broke the FECN routine badly with inconsistent use of 16 bit and 32 bits types for lids and pkeys. Since the port's source lid was correctly 32 bits the type mixmatches need to be dealt with at the same time as fixing the CNP header issue. Fix these issues by: - Using the ports lid for as the SLID for responding to FECN marked UD packets - Insure pkey is always 16 bit in this and subordinate routines - Insure lids are 32 bits in this and subordinate routines Cc: # 4.14.x Fixes: 88733e3b8450 ("IB/hfi1: Add 16B UD support") Reviewed-by: Don Hiatt Reviewed-by: Michael J. Ruhl Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/driver.c | 19 +++++++++++++++---- drivers/infiniband/hw/hfi1/hfi.h | 8 ++++---- drivers/infiniband/hw/hfi1/ud.c | 4 ++-- 3 files changed, 21 insertions(+), 10 deletions(-) commit a8d7aa17bbc970971ccdf71988ea19230ab368b1 Author: Eric Dumazet Date: Thu May 3 09:39:20 2018 -0700 dccp: fix tasklet usage syzbot reported a crash in tasklet_action_common() caused by dccp. dccp needs to make sure socket wont disappear before tasklet handler has completed. This patch takes a reference on the socket when arming the tasklet, and moves the sock_put() from dccp_write_xmit_timer() to dccp_write_xmitlet() kernel BUG at kernel/softirq.c:514! invalid opcode: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 17 Comm: ksoftirqd/1 Not tainted 4.17.0-rc3+ #30 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:tasklet_action_common.isra.19+0x6db/0x700 kernel/softirq.c:515 RSP: 0018:ffff8801d9b3faf8 EFLAGS: 00010246 dccp_close: ABORT with 65423 bytes unread RAX: 1ffff1003b367f6b RBX: ffff8801daf1f3f0 RCX: 0000000000000000 RDX: ffff8801cf895498 RSI: 0000000000000004 RDI: 0000000000000000 RBP: ffff8801d9b3fc40 R08: ffffed0039f12a95 R09: ffffed0039f12a94 dccp_close: ABORT with 65423 bytes unread R10: ffffed0039f12a94 R11: ffff8801cf8954a3 R12: 0000000000000000 R13: ffff8801d9b3fc18 R14: dffffc0000000000 R15: ffff8801cf895490 FS: 0000000000000000(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2bc28000 CR3: 00000001a08a9000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tasklet_action+0x1d/0x20 kernel/softirq.c:533 __do_softirq+0x2e0/0xaf5 kernel/softirq.c:285 dccp_close: ABORT with 65423 bytes unread run_ksoftirqd+0x86/0x100 kernel/softirq.c:646 smpboot_thread_fn+0x417/0x870 kernel/smpboot.c:164 kthread+0x345/0x410 kernel/kthread.c:238 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 Code: 48 8b 85 e8 fe ff ff 48 8b 95 f0 fe ff ff e9 94 fb ff ff 48 89 95 f0 fe ff ff e8 81 53 6e 00 48 8b 95 f0 fe ff ff e9 62 fb ff ff <0f> 0b 48 89 cf 48 89 8d e8 fe ff ff e8 64 53 6e 00 48 8b 8d e8 RIP: tasklet_action_common.isra.19+0x6db/0x700 kernel/softirq.c:515 RSP: ffff8801d9b3faf8 Fixes: dc841e30eaea ("dccp: Extend CCID packet dequeueing interface") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Gerrit Renker Cc: dccp@vger.kernel.org Signed-off-by: David S. Miller net/dccp/ccids/ccid2.c | 14 ++++++++++++-- net/dccp/timer.c | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) commit 31140b47fe4b90ea38f29a48214e76d8b7f64176 Merge: df80b8f bda27ff Author: David S. Miller Date: Thu May 3 14:47:32 2018 -0400 Merge branch 'smc-fixes' Ursula Braun says: ==================== net/smc: fixes 2018/05/03 here are smc fixes for 2 problems: * receive buffers in SMC must be registered. If registration fails these buffers must not be kept within the link group for reuse. Patch 1 is a preparational patch; patch 2 contains the fix. * sendpage: do not hold the sock lock when calling kernel_sendpage() or sock_no_sendpage() ==================== Signed-off-by: David S. Miller commit bda27ff5c4526f80a7620a94ecfe8dca153e3696 Author: Stefan Raspl Date: Thu May 3 17:57:39 2018 +0200 smc: fix sendpage() call The sendpage() call grabs the sock lock before calling the default implementation - which tries to grab it once again. Signed-off-by: Stefan Raspl Signed-off-by: Ursula Braun < Signed-off-by: David S. Miller net/smc/af_smc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a6920d1d130c3de039be982eba42542d329dc64c Author: Karsten Graul Date: Thu May 3 17:57:38 2018 +0200 net/smc: handle unregistered buffers When smc_wr_reg_send() fails then tag (regerr) the affected buffer and free it in smc_buf_unuse(). Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 4 +++- net/smc/smc_core.c | 22 +++++++++++++++++++--- net/smc/smc_core.h | 3 ++- 3 files changed, 24 insertions(+), 5 deletions(-) commit e63a5f8c19d7807823d68830ebe8cfbd4419ab13 Author: Karsten Graul Date: Thu May 3 17:57:37 2018 +0200 net/smc: call consolidation Consolidate the call to smc_wr_reg_send() in a new function. No functional changes. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) commit df80b8fb3c0ef510649d2d6e350cf11be240d15c Author: Colin Ian King Date: Thu May 3 16:19:32 2018 +0100 qed: fix spelling mistake: "offloded" -> "offloaded" Trivial fix to spelling mistake in DP_NOTICE message Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_roce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a2f474d328f292ee706414824ec4ca690cdf5ba Author: Heikki Krogerus Date: Wed Apr 25 17:22:09 2018 +0300 usb: typec: tps6598x: handle block reads separately with plain-I2C adapters If the I2C adapter that the PD controller is attached to does not support SMBus protocol, the driver needs to handle block reads separately. The first byte returned in block read protocol will show the total number of bytes. It needs to be stripped away. This is handled separately in the driver only because right now we have no way of requesting the used protocol with regmap-i2c. This is in practice a workaround for what is really a problem in regmap-i2c. The other option would have been to register custom regmap, or not use regmap at all, however, since the solution is very simple, I choose to use it in this case for convenience. It is easy to remove once we figure out how to handle this kind of cases in regmap-i2c. Fixes: 0a4c005bd171 ("usb: typec: driver for TI TPS6598x USB Power Delivery controllers") Reviewed-by: Guenter Roeck Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tps6598x.c | 47 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 8 deletions(-) commit 5671a4608c326b8ec16dec2f0f32e64a33cdd317 Author: Heikki Krogerus Date: Mon Apr 30 15:41:56 2018 +0300 usb: typec: tcpm: Release the role mux when exiting The ref count for the USB role switch device must be released after we are done using the switch. Fixes: c6962c29729c ("usb: typec: tcpm: Set USB role switch to device mode when configured as such") Signed-off-by: Heikki Krogerus Reviewed-by: Hans de Goede Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm.c | 1 + 1 file changed, 1 insertion(+) commit fb5ee84ea72c5f1b6cabdd1c9d6e8648995ca7c6 Author: Alan Stern Date: Thu May 3 11:04:48 2018 -0400 USB: Accept bulk endpoints with 1024-byte maxpacket Some non-compliant high-speed USB devices have bulk endpoints with a 1024-byte maxpacket size. Although such endpoints don't work with xHCI host controllers, they do work with EHCI controllers. We used to accept these invalid sizes (with a warning), but we no longer do because of an unintentional change introduced by commit aed9d65ac327 ("USB: validate wMaxPacketValue entries in endpoint descriptors"). This patch restores the old behavior, so that people with these peculiar devices can use them without patching their kernels by hand. Signed-off-by: Alan Stern Suggested-by: Elvinas Fixes: aed9d65ac327 ("USB: validate wMaxPacketValue entries in endpoint descriptors") CC: Signed-off-by: Greg Kroah-Hartman drivers/usb/core/config.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 647efef69de483f1dd7944ede31b4cae16acb124 Author: Graeme Smecher Date: Wed May 2 17:32:36 2018 -0700 ARM: dts: correct missing "compatible" entry for ti81xx SoCs The missing "compatible" entries are needed by drivers/clk/ti/clkctrl.c, and without them the structures initialized in drivers/clk/ti/clk-814x.c are not passed to configuration code. The result is a "not found from clkctrl data" error message, although boot proceeds anyway. The reason why the compatible is not found is because the board specific files override the SoC compatible without including it. This did not cause any issues until with the clkctrl nodes got introduced. Very lightly tested on a (lurching) AM3874 design that's in the middle of a kernel upgrade from TI's abandoned 2.6.37 tree. Also tested on j5eco-evm and hp-t410 to verify the clkctrl clocks are found. Fixes: bb30465b5902 ("ARM: dts: dm814x: add clkctrl nodes") Fixes: 80a06c0d8357 ("ARM: dts: dm816x: add clkctrl nodes") Signed-off-by: Graeme Smecher [tony: updated to fix for 8168-evm, updated comments] Signed-off-by: Tony Lindgren arch/arm/boot/dts/dm8148-evm.dts | 2 +- arch/arm/boot/dts/dm8148-t410.dts | 2 +- arch/arm/boot/dts/dm8168-evm.dts | 2 +- arch/arm/boot/dts/dra62x-j5eco-evm.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit baf64250b4a513bf4ac226fd938692dc1836f4f6 Author: Janusz Krzysztofik Date: Wed May 2 20:32:03 2018 +0200 ARM: OMAP1: ams-delta: fix deferred_fiq handler The deferred_fiq handler used to limit hardware operations to IRQ unmask only, relying on gpio-omap assigned handler performing the ACKs. Since commit 80ac93c27441 ("gpio: omap: Fix lost edge interrupts") this is no longer the case as handle_edge_irq() has been replaced with handle_simmple_irq() which doesn't touch the hardware. Add single ACK operation per each active IRQ pin to the handler. While being at it, move unmask operation out of irq_counter loop so it is also called only once for each active IRQ pin. Fixes: 80ac93c27441 ("gpio: omap: Fix lost edge interrupts") Signed-off-by: Janusz Krzysztofik Signed-off-by: Tony Lindgren arch/arm/mach-omap1/ams-delta-fiq.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 4e11581c27a28503282e777ce75502f560c6f97b Author: Colin Ian King Date: Thu May 3 10:12:53 2018 +0100 net/mlx5e: fix spelling mistake: "loobpack" -> "loopback" Trivial fix to spelling mistake in netdev_err error message Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c15f6d8d47152762a2819173599ce0eb135297f1 Merge: f4ef6a4 892a0be Author: Linus Torvalds Date: Thu May 3 06:27:39 2018 -1000 Merge tag 'dma-mapping-4.17-4' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: "Fix an incorrect warning selection introduced in the last merge window" * tag 'dma-mapping-4.17-4' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: fix inversed DMA_ATTR_NO_WARN test commit 0c5a9acc8b4e878e761f735e144d4a7e4477d4e6 Author: Zhengyuan Liu Date: Thu Feb 8 09:41:53 2018 +0800 tracing: Fix the file mode of stack tracer It looks weird that the stack_trace_filter file can be written by root but shows that it does not have write permission by ll command. Link: http://lkml.kernel.org/r/1518054113-28096-1-git-send-email-liuzhengyuan@kylinos.cn Signed-off-by: Zhengyuan Liu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44a182b9d17765514fa2b1cc911e4e65134eef93 Author: Mathias Nyman Date: Thu May 3 17:30:07 2018 +0300 xhci: Fix use-after-free in xhci_free_virt_device KASAN found a use-after-free in xhci_free_virt_device+0x33b/0x38e where xhci_free_virt_device() sets slot id to 0 if udev exists: if (dev->udev && dev->udev->slot_id) dev->udev->slot_id = 0; dev->udev will be true even if udev is freed because dev->udev is not set to NULL. set dev->udev pointer to NULL in xhci_free_dev() The original patch went to stable so this fix needs to be applied there as well. Fixes: a400efe455f7 ("xhci: zero usb device slot_id member when disabling and freeing a xhci slot") Cc: Reported-by: Guenter Roeck Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 1 + 1 file changed, 1 insertion(+) commit 1ce0500d234f8ef880c399d55a886af646beec9a Author: Chen LinX Date: Wed Sep 3 14:31:09 2014 +0800 ftrace: Have set_graph_* files have normal file modes The set_graph_function and set_graph_notrace file mode should be 0644 instead of 0444 as they are writeable. Note, the mode appears to be ignored regardless, but they should at least look sane. Link: http://lkml.kernel.org/r/1409725869-4501-1-git-send-email-linx.z.chen@intel.com Acked-by: Namhyung Kim Signed-off-by: Chen LinX Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8bfc3b4c6f9de815de4ab73784b9419348266a65 Author: Johannes Thumshirn Date: Thu May 3 17:00:35 2018 +0200 nvmet: switch loopback target state to connecting when resetting After commit bb06ec31452f ("nvme: expand nvmf_check_if_ready checks") resetting of the loopback nvme target failed as we forgot to switch it's state to NVME_CTRL_CONNECTING before we reconnect the admin queues. Therefore the checks in nvmf_check_if_ready() choose to go to the reject_io case and thus we couldn't sent out an identify controller command to reconnect. Change the controller state to NVME_CTRL_CONNECTING after tearing down the old connection and before re-establishing the connection. Fixes: bb06ec31452f ("nvme: expand nvmf_check_if_ready checks") Signed-off-by: Johannes Thumshirn Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/target/loop.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a785dbccd95c37606c720580714f5a7a8b3255f1 Author: Keith Busch Date: Thu Apr 26 14:22:41 2018 -0600 nvme/multipath: Fix multipath disabled naming collisions When CONFIG_NVME_MULTIPATH is set, but we're not using nvme to multipath, namespaces with multiple paths were not creating unique names due to reusing the same instance number from the namespace's head. This patch fixes this by falling back to the non-multipath naming method when the parameter disabled using multipath. Reported-by: Mike Snitzer Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 26 +------------------------- drivers/nvme/host/multipath.c | 22 ++++++++++++++++++++++ drivers/nvme/host/nvme.h | 12 ++++++++++++ 3 files changed, 35 insertions(+), 25 deletions(-) commit 5cadde8019a6a80550fdde92d5a3327565974eab Author: Keith Busch Date: Thu Apr 26 14:24:29 2018 -0600 nvme/multipath: Disable runtime writable enabling parameter We can't allow the user to change multipath settings at runtime, as this will create naming conflicts due to the different naming schemes used for each mode. Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/multipath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f31a21103c03bb62846409fdc60cc9faf2398cfb Author: Keith Busch Date: Tue Apr 17 14:42:44 2018 -0600 nvme: Set integrity flag for user passthrough commands If the command a separate metadata buffer attached, the request needs to have the integrity flag set so the driver knows to map it. Signed-off-by: Keith Busch Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 1 + 1 file changed, 1 insertion(+) commit 59a2f3f00fd744dbad22593f47552037d3154ca6 Author: Chengguang Xu Date: Sat Apr 14 20:06:19 2018 +0800 nvme: fix potential memory leak in option parsing When specifying same string type option several times, current option parsing may cause memory leak. Hence, call kfree for previous one in this case. Signed-off-by: Chengguang Xu Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/fabrics.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f53823c18131e755905b4f654196fd2cc3953f6e Author: Tetsuo Handa Date: Mon Apr 23 11:21:03 2018 +0900 bdi: Fix use after free bug in debugfs_remove() syzbot is reporting use after free bug in debugfs_remove() [1]. This is because fault injection made memory allocation for debugfs_create_file() from bdi_debug_register() from bdi_register_va() fail and continued with setting WB_registered. But when debugfs_remove() is called from debugfs_remove(bdi->debug_dir) from bdi_debug_unregister() from bdi_unregister() from release_bdi() because WB_registered was set by bdi_register_va(), IS_ERR_OR_NULL(bdi->debug_dir) == false despite debugfs_remove(bdi->debug_dir) was already called from bdi_register_va(). Fix this by making IS_ERR_OR_NULL(bdi->debug_dir) == true. [1] https://syzkaller.appspot.com/bug?id=5ab4efd91a96dcea9b68104f159adf4af2a6dfc1 Signed-off-by: Tetsuo Handa Reported-by: syzbot Fixes: 97f07697932e6faf ("bdi: convert bdi_debug_register to int") Cc: weiping zhang Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Signed-off-by: Jens Axboe mm/backing-dev.c | 1 + 1 file changed, 1 insertion(+) commit 114f39feab360e6c7b0c4238697f223444d662a1 Author: Eric Dumazet Date: Wed May 2 20:25:13 2018 -0700 tcp: restore autocorking When adding rb-tree for TCP retransmit queue, we inadvertently broke TCP autocorking. tcp_should_autocork() should really check if the rtx queue is not empty. Tested: Before the fix : $ nstat -n;./netperf -H 10.246.7.152 -Cc -- -m 500;nstat | grep AutoCork MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.246.7.152 () port 0 AF_INET Recv Send Send Utilization Service Demand Socket Socket Message Elapsed Send Recv Send Recv Size Size Size Time Throughput local remote local remote bytes bytes bytes secs. 10^6bits/s % S % S us/KB us/KB 540000 262144 500 10.00 2682.85 2.47 1.59 3.618 2.329 TcpExtTCPAutoCorking 33 0.0 // Same test, but forcing TCP_NODELAY $ nstat -n;./netperf -H 10.246.7.152 -Cc -- -D -m 500;nstat | grep AutoCork MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.246.7.152 () port 0 AF_INET : nodelay Recv Send Send Utilization Service Demand Socket Socket Message Elapsed Send Recv Send Recv Size Size Size Time Throughput local remote local remote bytes bytes bytes secs. 10^6bits/s % S % S us/KB us/KB 540000 262144 500 10.00 1408.75 2.44 2.96 6.802 8.259 TcpExtTCPAutoCorking 1 0.0 After the fix : $ nstat -n;./netperf -H 10.246.7.152 -Cc -- -m 500;nstat | grep AutoCork MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.246.7.152 () port 0 AF_INET Recv Send Send Utilization Service Demand Socket Socket Message Elapsed Send Recv Send Recv Size Size Size Time Throughput local remote local remote bytes bytes bytes secs. 10^6bits/s % S % S us/KB us/KB 540000 262144 500 10.00 5472.46 2.45 1.43 1.761 1.027 TcpExtTCPAutoCorking 361293 0.0 // With TCP_NODELAY option $ nstat -n;./netperf -H 10.246.7.152 -Cc -- -D -m 500;nstat | grep AutoCork MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.246.7.152 () port 0 AF_INET : nodelay Recv Send Send Utilization Service Demand Socket Socket Message Elapsed Send Recv Send Recv Size Size Size Time Throughput local remote local remote bytes bytes bytes secs. 10^6bits/s % S % S us/KB us/KB 540000 262144 500 10.00 5454.96 2.46 1.63 1.775 1.174 TcpExtTCPAutoCorking 315448 0.0 Fixes: 75c119afe14f ("tcp: implement rb-tree based retransmit queue") Signed-off-by: Eric Dumazet Reported-by: Michael Wenig Tested-by: Michael Wenig Signed-off-by: Eric Dumazet Reported-by: Michael Wenig Tested-by: Michael Wenig Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb80ca476ec11f67a62691a93604b405ffc7d80c Author: Eric Dumazet Date: Wed May 2 14:53:39 2018 -0700 rds: do not leak kernel memory to user land syzbot/KMSAN reported an uninit-value in put_cmsg(), originating from rds_cmsg_recv(). Simply clear the structure, since we have holes there, or since rx_traces might be smaller than RDS_MSG_RX_DGRAM_TRACE_MAX. BUG: KMSAN: uninit-value in copy_to_user include/linux/uaccess.h:184 [inline] BUG: KMSAN: uninit-value in put_cmsg+0x600/0x870 net/core/scm.c:242 CPU: 0 PID: 4459 Comm: syz-executor582 Not tainted 4.16.0+ #87 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 kmsan_internal_check_memory+0x135/0x1e0 mm/kmsan/kmsan.c:1157 kmsan_copy_to_user+0x69/0x160 mm/kmsan/kmsan.c:1199 copy_to_user include/linux/uaccess.h:184 [inline] put_cmsg+0x600/0x870 net/core/scm.c:242 rds_cmsg_recv net/rds/recv.c:570 [inline] rds_recvmsg+0x2db5/0x3170 net/rds/recv.c:657 sock_recvmsg_nosec net/socket.c:803 [inline] sock_recvmsg+0x1d0/0x230 net/socket.c:810 ___sys_recvmsg+0x3fb/0x810 net/socket.c:2205 __sys_recvmsg net/socket.c:2250 [inline] SYSC_recvmsg+0x298/0x3c0 net/socket.c:2262 SyS_recvmsg+0x54/0x80 net/socket.c:2257 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Fixes: 3289025aedc0 ("RDS: add receive message trace used by application") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Santosh Shilimkar Cc: linux-rdma Signed-off-by: David S. Miller net/rds/recv.c | 1 + 1 file changed, 1 insertion(+) commit 8236b0ae31c837d2b3a2565c5f8d77f637e824cc Author: Tetsuo Handa Date: Wed May 2 07:07:55 2018 +0900 bdi: wake up concurrent wb_shutdown() callers. syzbot is reporting hung tasks at wait_on_bit(WB_shutting_down) in wb_shutdown() [1]. This seems to be because commit 5318ce7d46866e1d ("bdi: Shutdown writeback on all cgwbs in cgwb_bdi_destroy()") forgot to call wake_up_bit(WB_shutting_down) after clear_bit(WB_shutting_down). Introduce a helper function clear_and_wake_up_bit() and use it, in order to avoid similar errors in future. [1] https://syzkaller.appspot.com/bug?id=b297474817af98d5796bc544e1bb806fc3da0e5e Signed-off-by: Tetsuo Handa Reported-by: syzbot Fixes: 5318ce7d46866e1d ("bdi: Shutdown writeback on all cgwbs in cgwb_bdi_destroy()") Cc: Tejun Heo Reviewed-by: Jan Kara Suggested-by: Linus Torvalds Signed-off-by: Jens Axboe include/linux/wait_bit.h | 17 +++++++++++++++++ mm/backing-dev.c | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) commit 5697db4a696c41601a1d15c1922150b4dbf5726c Author: Bjørn Mork Date: Wed May 2 22:22:54 2018 +0200 qmi_wwan: do not steal interfaces from class drivers The USB_DEVICE_INTERFACE_NUMBER matching macro assumes that the { vendorid, productid, interfacenumber } set uniquely identifies one specific function. This has proven to fail for some configurable devices. One example is the Quectel EM06/EP06 where the same interface number can be either QMI or MBIM, without the device ID changing either. Fix by requiring the vendor-specific class for interface number based matching. Functions of other classes can and should use class based matching instead. Fixes: 03304bcb5ec4 ("net: qmi_wwan: use fixed interface number matching") Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 40fa84e10134ef5c892b628e02382349b5db3e0c Author: Arnd Bergmann Date: Wed Apr 4 12:23:53 2018 +0200 iommu: rockchip: fix building without CONFIG_OF We get a build error when compiling the iommu driver without CONFIG_OF: drivers/iommu/rockchip-iommu.c: In function 'rk_iommu_of_xlate': drivers/iommu/rockchip-iommu.c:1101:2: error: implicit declaration of function 'of_dev_put'; did you mean 'of_node_put'? [-Werror=implicit-function-declaration] This replaces the of_dev_put() with the equivalent platform_device_put(). Fixes: 5fd577c3eac3 ("iommu/rockchip: Use OF_IOMMU to attach devices automatically") Signed-off-by: Arnd Bergmann Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09a44ca2114737e0932257619c16a2b50c7807f1 Author: Coly Li Date: Thu May 3 18:51:37 2018 +0800 bcache: use pr_info() to inform duplicated CACHE_SET_IO_DISABLE set It is possible that multiple I/O requests hits on failed cache device or backing device, therefore it is quite common that CACHE_SET_IO_DISABLE is set already when a task tries to set the bit from bch_cache_set_error(). Currently the message "CACHE_SET_IO_DISABLE already set" is printed by pr_warn(), which might mislead users to think a serious fault happens in source code. This patch uses pr_info() to print the information in such situation, avoid extra worries. This information is helpful to understand bcache behavior in cache device failures, so I still keep them in source code. Fixes: 771f393e8ffc9 ("bcache: add CACHE_SET_IO_DISABLE to struct cache_set flags") Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fd8e13843978cbba48b8c21119da60c7fd5910d Author: Coly Li Date: Thu May 3 18:51:36 2018 +0800 bcache: set dc->io_disable to true in conditional_stop_bcache_device() Commit 7e027ca4b534b ("bcache: add stop_when_cache_set_failed option to backing device") adds stop_when_cache_set_failed option and stops bcache device if stop_when_cache_set_failed is auto and there is dirty data on broken cache device. There might exists a small time gap that the cache set is released and set to NULL but bcache device is not released yet (because they are released in parallel). During this time gap, dc->c is NULL so CACHE_SET_IO_DISABLE won't be checked, and dc->io_disable is still false, so new coming I/O requests will be accepted and directly go into backing device as no cache set attached to. If there is dirty data on cache device, this behavior may introduce potential inconsistent data. This patch sets dc->io_disable to true before calling bcache_device_stop() to make sure the backing device will reject new coming I/O request as well, so even in the small time gap no I/O will directly go into backing device to corrupt data consistency. Fixes: 7e027ca4b534b ("bcache: add stop_when_cache_set_failed option to backing device") Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ecb2ba8cb83549f1bb06bc7e693ae8fed43c0e4f Author: Coly Li Date: Thu May 3 18:51:35 2018 +0800 bcache: add wait_for_kthread_stop() in bch_allocator_thread() When CACHE_SET_IO_DISABLE is set on cache set flags, bcache allocator thread routine bch_allocator_thread() may stop the while-loops and exit. Then it is possible to observe the following kernel oops message, [ 631.068366] bcache: bch_btree_insert() error -5 [ 631.069115] bcache: cached_dev_detach_finish() Caching disabled for sdf [ 631.070220] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 [ 631.070250] PGD 0 P4D 0 [ 631.070261] Oops: 0002 [#1] SMP PTI [snipped] [ 631.070578] Workqueue: events cache_set_flush [bcache] [ 631.070597] RIP: 0010:exit_creds+0x1b/0x50 [ 631.070610] RSP: 0018:ffffc9000705fe08 EFLAGS: 00010246 [ 631.070626] RAX: 0000000000000001 RBX: ffff880a622ad300 RCX: 000000000000000b [ 631.070645] RDX: 0000000000000601 RSI: 000000000000000c RDI: 0000000000000000 [ 631.070663] RBP: ffff880a622ad300 R08: ffffea00190c66e0 R09: 0000000000000200 [ 631.070682] R10: ffff880a48123000 R11: ffff880000000000 R12: 0000000000000000 [ 631.070700] R13: ffff880a4b160e40 R14: ffff880a4b160000 R15: 0ffff880667e2530 [ 631.070719] FS: 0000000000000000(0000) GS:ffff880667e00000(0000) knlGS:0000000000000000 [ 631.070740] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 631.070755] CR2: 0000000000000000 CR3: 000000000200a001 CR4: 00000000003606e0 [ 631.070774] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 631.070793] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 631.070811] Call Trace: [ 631.070828] __put_task_struct+0x55/0x160 [ 631.070845] kthread_stop+0xee/0x100 [ 631.070863] cache_set_flush+0x11d/0x1a0 [bcache] [ 631.070879] process_one_work+0x146/0x340 [ 631.070892] worker_thread+0x47/0x3e0 [ 631.070906] kthread+0xf5/0x130 [ 631.070917] ? max_active_store+0x60/0x60 [ 631.070930] ? kthread_bind+0x10/0x10 [ 631.070945] ret_from_fork+0x35/0x40 [snipped] [ 631.071017] RIP: exit_creds+0x1b/0x50 RSP: ffffc9000705fe08 [ 631.071033] CR2: 0000000000000000 [ 631.071045] ---[ end trace 011c63a24b22c927 ]--- [ 631.071085] bcache: bcache_device_free() bcache0 stopped The reason is when cache_set_flush() tries to call kthread_stop() to stop allocator thread, but it exits already due to cache device I/O errors. This patch adds wait_for_kthread_stop() at tail of bch_allocator_thread(), to prevent the thread routine exiting directly. Then the allocator thread can be blocked at wait_for_kthread_stop() and wait for cache_set_flush() to stop it by calling kthread_stop(). changelog: v3: add Reviewed-by from Hannnes. v2: not directly return from allocator_wait(), move 'return 0' to tail of bch_allocator_thread(). v1: initial version. Fixes: 771f393e8ffc ("bcache: add CACHE_SET_IO_DISABLE to struct cache_set flags") Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/md/bcache/alloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bf78980fcc58bad2d61858ce342153a3dd097aa0 Author: Coly Li Date: Thu May 3 18:51:34 2018 +0800 bcache: count backing device I/O error for writeback I/O Commit c7b7bd07404c5 ("bcache: add io_disable to struct cached_dev") counts backing device I/O requets and set dc->io_disable to true if error counters exceeds dc->io_error_limit. But it only counts I/O errors for regular I/O request, neglects errors of write back I/Os when backing device is offline. This patch counts the errors of writeback I/Os, in dirty_endio() if bio->bi_status is not 0, it means error happens when writing dirty keys to backing device, then bch_count_backing_io_errors() is called. By this fix, even there is no reqular I/O request coming, if writeback I/O errors exceed dc->io_error_limit, the bcache device may still be stopped for the broken backing device. Fixes: c7b7bd07404c5 ("bcache: add io_disable to struct cached_dev") Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/md/bcache/writeback.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6147305c73e4511ca1a975b766b97a779d442567 Author: Coly Li Date: Thu May 3 18:51:33 2018 +0800 bcache: set CACHE_SET_IO_DISABLE in bch_cached_dev_error() Commit c7b7bd07404c5 ("bcache: add io_disable to struct cached_dev") tries to stop bcache device by calling bcache_device_stop() when too many I/O errors happened on backing device. But if there is internal I/O happening on cache device (writeback scan, garbage collection, etc), a regular I/O request triggers the internal I/Os may still holds a refcount of dc->count, and the refcount may only be dropped after the internal I/O stopped. By this patch, bch_cached_dev_error() will check if the backing device is attached to a cache set, if yes that CACHE_SET_IO_DISABLE will be set to flags of this cache set. Then internal I/Os on cache device will be rejected and stopped immediately, and the bcache device can be stopped. For people who are not familiar with the interesting refcount dependance, let me explain a bit more how the fix works. Example the writeback thread will scan cache device for dirty data writeback purpose. Before it stopps, it holds a refcount of dc->count. When CACHE_SET_IO_DISABLE bit is set, the internal I/O will stopped and the while-loop in bch_writeback_thread() quits and calls cached_dev_put() to drop dc->count. If this is the last refcount to drop, then cached_dev_detach_finish() will be called. In this call back function, in turn closure_put(dc->disk.cl) is called to drop a refcount of closure dc->disk.cl. If this is the last refcount of this closure to drop, then cached_dev_flush() will be called. Then the cached device is freed. So if CACHE_SET_IO_DISABLE is not set, the bache device can not be stopped until all inernal cache device I/O stopped. For large size cache device, and writeback thread competes locks with gc thread, there might be a quite long time to wait. Fixes: c7b7bd07404c5 ("bcache: add io_disable to struct cached_dev") Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 6e916a7eb1bc045f4e27355632ee7692014e6e60 Author: Coly Li Date: Thu May 3 18:51:32 2018 +0800 bcache: store disk name in struct cache and struct cached_dev Current code uses bdevname() or bio_devname() to reference gendisk disk name when bcache needs to display the disk names in kernel message. It was safe before bcache device failure handling patch set merged in, because when devices are failed, there was deadlock to prevent bcache printing error messages with gendisk disk name. But after the failure handling patch set merged, the deadlock is fixed, so it is possible that the gendisk structure bdev->hd_disk is released when bdevname() is called to reference bdev->bd_disk->disk_name[]. This is why I receive bug report of NULL pointers deference panic. This patch stores gendisk disk name in a buffer inside struct cache and struct cached_dev, then print out the offline device name won't reference bdev->hd_disk anymore. And this patch also avoids extra function calls of bdevname() and bio_devnmae(). Changelog: v3, add Reviewed-by from Hannes. v2, call bdevname() earlier in register_bdev() v1, first version with segguestion from Junhui Tang. Fixes: c7b7bd07404c5 ("bcache: add io_disable to struct cached_dev") Fixes: 5138ac6748e38 ("bcache: fix misleading error message in bch_count_io_errors()") Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/md/bcache/bcache.h | 4 ++++ drivers/md/bcache/debug.c | 3 +-- drivers/md/bcache/io.c | 8 +++----- drivers/md/bcache/request.c | 5 +---- drivers/md/bcache/super.c | 44 +++++++++++++++++++++----------------------- 5 files changed, 30 insertions(+), 34 deletions(-) commit a85894cd779455fab0086cfcb5c9f65c3706e1c6 Author: Joerg Roedel Date: Thu May 3 15:25:17 2018 +0200 iommu/vt-d: Use WARN_ON_ONCE instead of BUG_ON in qi_flush_dev_iotlb() A misaligned address is only worth a warning, and not stopping the while execution path with a BUG_ON(). Signed-off-by: Joerg Roedel drivers/iommu/dmar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0dfc0c792d691f8056f38b5c30789f504be0e467 Author: Changbin Du Date: Fri Apr 20 13:29:55 2018 +0800 iommu/vt-d: fix shift-out-of-bounds in bug checking It allows to flush more than 4GB of device TLBs. So the mask should be 64bit wide. UBSAN captured this fault as below. [ 3.760024] ================================================================================ [ 3.768440] UBSAN: Undefined behaviour in drivers/iommu/dmar.c:1348:3 [ 3.774864] shift exponent 64 is too large for 32-bit type 'int' [ 3.780853] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G U 4.17.0-rc1+ #89 [ 3.788661] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.2.8 01/26/2016 [ 3.796034] Call Trace: [ 3.798472] [ 3.800479] dump_stack+0x90/0xfb [ 3.803787] ubsan_epilogue+0x9/0x40 [ 3.807353] __ubsan_handle_shift_out_of_bounds+0x10e/0x170 [ 3.812916] ? qi_flush_dev_iotlb+0x124/0x180 [ 3.817261] qi_flush_dev_iotlb+0x124/0x180 [ 3.821437] iommu_flush_dev_iotlb+0x94/0xf0 [ 3.825698] iommu_flush_iova+0x10b/0x1c0 [ 3.829699] ? fq_ring_free+0x1d0/0x1d0 [ 3.833527] iova_domain_flush+0x25/0x40 [ 3.837448] fq_flush_timeout+0x55/0x160 [ 3.841368] ? fq_ring_free+0x1d0/0x1d0 [ 3.845200] ? fq_ring_free+0x1d0/0x1d0 [ 3.849034] call_timer_fn+0xbe/0x310 [ 3.852696] ? fq_ring_free+0x1d0/0x1d0 [ 3.856530] run_timer_softirq+0x223/0x6e0 [ 3.860625] ? sched_clock+0x5/0x10 [ 3.864108] ? sched_clock+0x5/0x10 [ 3.867594] __do_softirq+0x1b5/0x6f5 [ 3.871250] irq_exit+0xd4/0x130 [ 3.874470] smp_apic_timer_interrupt+0xb8/0x2f0 [ 3.879075] apic_timer_interrupt+0xf/0x20 [ 3.883159] [ 3.885255] RIP: 0010:poll_idle+0x60/0xe7 [ 3.889252] RSP: 0018:ffffb1b201943e30 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 [ 3.896802] RAX: 0000000080200000 RBX: 000000000000008e RCX: 000000000000001f [ 3.903918] RDX: 0000000000000000 RSI: 000000002819aa06 RDI: 0000000000000000 [ 3.911031] RBP: ffff9e93c6b33280 R08: 00000010f717d567 R09: 000000000010d205 [ 3.918146] R10: ffffb1b201943df8 R11: 0000000000000001 R12: 00000000e01b169d [ 3.925260] R13: 0000000000000000 R14: ffffffffb12aa400 R15: 0000000000000000 [ 3.932382] cpuidle_enter_state+0xb4/0x470 [ 3.936558] do_idle+0x222/0x310 [ 3.939779] cpu_startup_entry+0x78/0x90 [ 3.943693] start_secondary+0x205/0x2e0 [ 3.947607] secondary_startup_64+0xa5/0xb0 [ 3.951783] ================================================================================ Signed-off-by: Changbin Du Signed-off-by: Joerg Roedel drivers/iommu/dmar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd2c9fcf5c66fd21f7b83455806fdd14ab9236ee Author: Shameer Kolothum Date: Wed Apr 18 12:40:42 2018 +0100 iommu/dma: Move PCI window region reservation back into dma specific path. This pretty much reverts commit 273df9635385 ("iommu/dma: Make PCI window reservation generic") by moving the PCI window region reservation back into the dma specific path so that these regions doesn't get exposed via the IOMMU API interface. With this change, the vfio interface will report only iommu specific reserved regions to the user space. Cc: Joerg Roedel Signed-off-by: Shameer Kolothum Reviewed-by: Robin Murphy Fixes: 273df9635385 ('iommu/dma: Make PCI window reservation generic') Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 54 ++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 29 deletions(-) commit 2f8c7f2e76bf040fcdaa2b4f4c2b9ef3b6e4ed25 Author: Heiko Stuebner Date: Tue Apr 17 14:09:15 2018 +0200 iommu/rockchip: Make clock handling optional iommu clocks are optional, so the driver should not fail if they are not present. Instead just set the number of clocks to 0, which the clk-blk APIs can handle just fine. Fixes: f2e3a5f557ad ("iommu/rockchip: Control clocks needed to access the IOMMU") Signed-off-by: Heiko Stuebner Reviewed-by: Robin Murphy Tested-by: Enric Balletbo i Serra Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 94c793accacdb0d33c1df66f3b324eec96d26e58 Author: Arnd Bergmann Date: Wed Apr 4 12:56:59 2018 +0200 iommu/amd: Hide unused iommu_table_lock The newly introduced lock is only used when CONFIG_IRQ_REMAP is enabled: drivers/iommu/amd_iommu.c:86:24: error: 'iommu_table_lock' defined but not used [-Werror=unused-variable] static DEFINE_SPINLOCK(iommu_table_lock); This moves the definition next to the user, within the #ifdef protected section of the file. Fixes: ea6166f4b83e ("iommu/amd: Split irq_lookup_table out of the amd_iommu_devtable_lock") Signed-off-by: Arnd Bergmann Acked-by: Sebastian Andrzej Siewior Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa7528fe3576d11f4a10237178a723a1f080a547 Author: Jagannathan Raman Date: Tue Mar 6 17:39:41 2018 -0500 iommu/vt-d: Fix usage of force parameter in intel_ir_reconfigure_irte() It was noticed that the IRTE configured for guest OS kernel was over-written while the guest was running. As a result, vt-d Posted Interrupts configured for the guest are not being delivered directly, and instead bounces off the host. Every interrupt delivery takes a VM Exit. It was noticed that the following stack is doing the over-write: [ 147.463177] modify_irte+0x171/0x1f0 [ 147.463405] intel_ir_set_affinity+0x5c/0x80 [ 147.463641] msi_domain_set_affinity+0x32/0x90 [ 147.463881] irq_do_set_affinity+0x37/0xd0 [ 147.464125] irq_set_affinity_locked+0x9d/0xb0 [ 147.464374] __irq_set_affinity+0x42/0x70 [ 147.464627] write_irq_affinity.isra.5+0xe1/0x110 [ 147.464895] proc_reg_write+0x38/0x70 [ 147.465150] __vfs_write+0x36/0x180 [ 147.465408] ? handle_mm_fault+0xdf/0x200 [ 147.465671] ? _cond_resched+0x15/0x30 [ 147.465936] vfs_write+0xad/0x1a0 [ 147.466204] SyS_write+0x52/0xc0 [ 147.466472] do_syscall_64+0x74/0x1a0 [ 147.466744] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 reversing the sense of force check in intel_ir_reconfigure_irte() restores proper posted interrupt functionality Signed-off-by: Jagannathan Raman Fixes: d491bdff888e ('iommu/vt-d: Reevaluate vector configuration on activate()') Signed-off-by: Joerg Roedel drivers/iommu/intel_irq_remapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c3070890d06ff82eecb808d02d2ca39169533ef Author: Kees Cook Date: Tue May 1 15:07:31 2018 -0700 seccomp: Enable speculation flaw mitigations When speculation flaw mitigations are opt-in (via prctl), using seccomp will automatically opt-in to these protections, since using seccomp indicates at least some level of sandboxing is desired. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner kernel/seccomp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit fae1fa0fc6cca8beee3ab8ed71d54f9a78fa3f64 Author: Kees Cook Date: Tue May 1 15:31:45 2018 -0700 proc: Provide details on speculation flaw mitigations As done with seccomp and no_new_privs, also show speculation flaw mitigation state in /proc/$pid/status. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner fs/proc/array.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 7bbf1373e228840bb0295a2ca26d548ef37f448e Author: Kees Cook Date: Tue May 1 15:19:04 2018 -0700 nospec: Allow getting/setting on non-current task Adjust arch_prctl_get/set_spec_ctrl() to operate on tasks other than current. This is needed both for /proc/$pid/status queries and for seccomp (since thread-syncing can trigger seccomp in non-current threads). Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/bugs.c | 27 ++++++++++++++++----------- include/linux/nospec.h | 7 +++++-- kernel/sys.c | 9 +++++---- 3 files changed, 26 insertions(+), 17 deletions(-) commit a73ec77ee17ec556fe7f165d00314cb7c047b1ac Author: Thomas Gleixner Date: Sun Apr 29 15:26:40 2018 +0200 x86/speculation: Add prctl for Speculative Store Bypass mitigation Add prctl based control for Speculative Store Bypass mitigation and make it the default mitigation for Intel and AMD. Andi Kleen provided the following rationale (slightly redacted): There are multiple levels of impact of Speculative Store Bypass: 1) JITed sandbox. It cannot invoke system calls, but can do PRIME+PROBE and may have call interfaces to other code 2) Native code process. No protection inside the process at this level. 3) Kernel. 4) Between processes. The prctl tries to protect against case (1) doing attacks. If the untrusted code can do random system calls then control is already lost in a much worse way. So there needs to be system call protection in some way (using a JIT not allowing them or seccomp). Or rather if the process can subvert its environment somehow to do the prctl it can already execute arbitrary code, which is much worse than SSB. To put it differently, the point of the prctl is to not allow JITed code to read data it shouldn't read from its JITed sandbox. If it already has escaped its sandbox then it can already read everything it wants in its address space, and do much worse. The ability to control Speculative Store Bypass allows to enable the protection selectively without affecting overall system performance. Based on an initial patch from Tim Chen. Completely rewritten. Signed-off-by: Thomas Gleixner Reviewed-by: Konrad Rzeszutek Wilk Documentation/admin-guide/kernel-parameters.txt | 6 +- arch/x86/include/asm/nospec-branch.h | 1 + arch/x86/kernel/cpu/bugs.c | 83 ++++++++++++++++++++++--- 3 files changed, 79 insertions(+), 11 deletions(-) commit 885f82bfbc6fefb6664ea27965c3ab9ac4194b8c Author: Thomas Gleixner Date: Sun Apr 29 15:21:42 2018 +0200 x86/process: Allow runtime control of Speculative Store Bypass The Speculative Store Bypass vulnerability can be mitigated with the Reduced Data Speculation (RDS) feature. To allow finer grained control of this eventually expensive mitigation a per task mitigation control is required. Add a new TIF_RDS flag and put it into the group of TIF flags which are evaluated for mismatch in switch_to(). If these bits differ in the previous and the next task, then the slow path function __switch_to_xtra() is invoked. Implement the TIF_RDS dependent mitigation control in the slow path. If the prctl for controlling Speculative Store Bypass is disabled or no task uses the prctl then there is no overhead in the switch_to() fast path. Update the KVM related speculation control functions to take TID_RDS into account as well. Based on a patch from Tim Chen. Completely rewritten. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Reviewed-by: Konrad Rzeszutek Wilk arch/x86/include/asm/msr-index.h | 3 ++- arch/x86/include/asm/spec-ctrl.h | 17 +++++++++++++++++ arch/x86/include/asm/thread_info.h | 4 +++- arch/x86/kernel/cpu/bugs.c | 26 +++++++++++++++++++++----- arch/x86/kernel/process.c | 22 ++++++++++++++++++++++ 5 files changed, 65 insertions(+), 7 deletions(-) commit b617cfc858161140d69cc0b5cc211996b557a1c7 Author: Thomas Gleixner Date: Sun Apr 29 15:20:11 2018 +0200 prctl: Add speculation control prctls Add two new prctls to control aspects of speculation related vulnerabilites and their mitigations to provide finer grained control over performance impacting mitigations. PR_GET_SPECULATION_CTRL returns the state of the speculation misfeature which is selected with arg2 of prctl(2). The return value uses bit 0-2 with the following meaning: Bit Define Description 0 PR_SPEC_PRCTL Mitigation can be controlled per task by PR_SET_SPECULATION_CTRL 1 PR_SPEC_ENABLE The speculation feature is enabled, mitigation is disabled 2 PR_SPEC_DISABLE The speculation feature is disabled, mitigation is enabled If all bits are 0 the CPU is not affected by the speculation misfeature. If PR_SPEC_PRCTL is set, then the per task control of the mitigation is available. If not set, prctl(PR_SET_SPECULATION_CTRL) for the speculation misfeature will fail. PR_SET_SPECULATION_CTRL allows to control the speculation misfeature, which is selected by arg2 of prctl(2) per task. arg3 is used to hand in the control value, i.e. either PR_SPEC_ENABLE or PR_SPEC_DISABLE. The common return values are: EINVAL prctl is not implemented by the architecture or the unused prctl() arguments are not 0 ENODEV arg2 is selecting a not supported speculation misfeature PR_SET_SPECULATION_CTRL has these additional return values: ERANGE arg3 is incorrect, i.e. it's not either PR_SPEC_ENABLE or PR_SPEC_DISABLE ENXIO prctl control of the selected speculation misfeature is disabled The first supported controlable speculation misfeature is PR_SPEC_STORE_BYPASS. Add the define so this can be shared between architectures. Based on an initial patch from Tim Chen and mostly rewritten. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Reviewed-by: Konrad Rzeszutek Wilk Documentation/userspace-api/index.rst | 1 + Documentation/userspace-api/spec_ctrl.rst | 86 +++++++++++++++++++++++++++++++ include/linux/nospec.h | 5 ++ include/uapi/linux/prctl.h | 11 ++++ kernel/sys.c | 22 ++++++++ 5 files changed, 125 insertions(+) commit 28a2775217b17208811fa43a9e96bd1fdf417b86 Author: Thomas Gleixner Date: Sun Apr 29 15:01:37 2018 +0200 x86/speculation: Create spec-ctrl.h to avoid include hell Having everything in nospec-branch.h creates a hell of dependencies when adding the prctl based switching mechanism. Move everything which is not required in nospec-branch.h to spec-ctrl.h and fix up the includes in the relevant files. Signed-off-by: Thomas Gleixner Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Ingo Molnar arch/x86/include/asm/nospec-branch.h | 14 -------------- arch/x86/include/asm/spec-ctrl.h | 21 +++++++++++++++++++++ arch/x86/kernel/cpu/amd.c | 2 +- arch/x86/kernel/cpu/bugs.c | 2 +- arch/x86/kvm/svm.c | 2 +- arch/x86/kvm/vmx.c | 2 +- 6 files changed, 25 insertions(+), 18 deletions(-) commit da39556f66f5cfe8f9c989206974f1cb16ca5d7c Author: Konrad Rzeszutek Wilk Date: Wed Apr 25 22:04:25 2018 -0400 x86/KVM/VMX: Expose SPEC_CTRL Bit(2) to the guest Expose the CPUID.7.EDX[31] bit to the guest, and also guard against various combinations of SPEC_CTRL MSR values. The handling of the MSR (to take into account the host value of SPEC_CTRL Bit(2)) is taken care of in patch: KVM/SVM/VMX/x86/spectre_v2: Support the combination of guest and host IBRS Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar arch/x86/kvm/cpuid.c | 2 +- arch/x86/kvm/vmx.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) commit 764f3c21588a059cd783c6ba0734d4db2d72822d Author: Konrad Rzeszutek Wilk Date: Wed Apr 25 22:04:24 2018 -0400 x86/bugs/AMD: Add support to disable RDS on Fam[15,16,17]h if requested AMD does not need the Speculative Store Bypass mitigation to be enabled. The parameters for this are already available and can be done via MSR C001_1020. Each family uses a different bit in that MSR for this. [ tglx: Expose the bit mask via a variable and move the actual MSR fiddling into the bugs code as that's the right thing to do and also required to prepare for dynamic enable/disable ] Suggested-by: Borislav Petkov Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/nospec-branch.h | 4 ++++ arch/x86/kernel/cpu/amd.c | 26 ++++++++++++++++++++++++++ arch/x86/kernel/cpu/bugs.c | 27 ++++++++++++++++++++++++++- arch/x86/kernel/cpu/common.c | 4 ++++ 5 files changed, 61 insertions(+), 1 deletion(-) commit 1115a859f33276fe8afb31c60cf9d8e657872558 Author: Konrad Rzeszutek Wilk Date: Wed Apr 25 22:04:23 2018 -0400 x86/bugs: Whitelist allowed SPEC_CTRL MSR values Intel and AMD SPEC_CTRL (0x48) MSR semantics may differ in the future (or in fact use different MSRs for the same functionality). As such a run-time mechanism is required to whitelist the appropriate MSR values. [ tglx: Made the variable __ro_after_init ] Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar arch/x86/kernel/cpu/bugs.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 772439717dbf703b39990be58d8d4e3e4ad0598a Author: Konrad Rzeszutek Wilk Date: Wed Apr 25 22:04:22 2018 -0400 x86/bugs/intel: Set proper CPU features and setup RDS Intel CPUs expose methods to: - Detect whether RDS capability is available via CPUID.7.0.EDX[31], - The SPEC_CTRL MSR(0x48), bit 2 set to enable RDS. - MSR_IA32_ARCH_CAPABILITIES, Bit(4) no need to enable RRS. With that in mind if spec_store_bypass_disable=[auto,on] is selected set at boot-time the SPEC_CTRL MSR to enable RDS if the platform requires it. Note that this does not fix the KVM case where the SPEC_CTRL is exposed to guests which can muck with it, see patch titled : KVM/SVM/VMX/x86/spectre_v2: Support the combination of guest and host IBRS. And for the firmware (IBRS to be set), see patch titled: x86/spectre_v2: Read SPEC_CTRL MSR during boot and re-use reserved bits [ tglx: Distangled it from the intel implementation and kept the call order ] Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Ingo Molnar arch/x86/include/asm/msr-index.h | 6 ++++++ arch/x86/kernel/cpu/bugs.c | 30 ++++++++++++++++++++++++++++-- arch/x86/kernel/cpu/common.c | 10 ++++++---- arch/x86/kernel/cpu/cpu.h | 2 ++ arch/x86/kernel/cpu/intel.c | 1 + 5 files changed, 43 insertions(+), 6 deletions(-) commit 24f7fc83b9204d20f878c57cb77d261ae825e033 Author: Konrad Rzeszutek Wilk Date: Wed Apr 25 22:04:21 2018 -0400 x86/bugs: Provide boot parameters for the spec_store_bypass_disable mitigation Contemporary high performance processors use a common industry-wide optimization known as "Speculative Store Bypass" in which loads from addresses to which a recent store has occurred may (speculatively) see an older value. Intel refers to this feature as "Memory Disambiguation" which is part of their "Smart Memory Access" capability. Memory Disambiguation can expose a cache side-channel attack against such speculatively read values. An attacker can create exploit code that allows them to read memory outside of a sandbox environment (for example, malicious JavaScript in a web page), or to perform more complex attacks against code running within the same privilege level, e.g. via the stack. As a first step to mitigate against such attacks, provide two boot command line control knobs: nospec_store_bypass_disable spec_store_bypass_disable=[off,auto,on] By default affected x86 processors will power on with Speculative Store Bypass enabled. Hence the provided kernel parameters are written from the point of view of whether to enable a mitigation or not. The parameters are as follows: - auto - Kernel detects whether your CPU model contains an implementation of Speculative Store Bypass and picks the most appropriate mitigation. - on - disable Speculative Store Bypass - off - enable Speculative Store Bypass [ tglx: Reordered the checks so that the whole evaluation is not done when the CPU does not support RDS ] Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Ingo Molnar Documentation/admin-guide/kernel-parameters.txt | 33 ++++++++ arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/nospec-branch.h | 6 ++ arch/x86/kernel/cpu/bugs.c | 103 ++++++++++++++++++++++++ 4 files changed, 143 insertions(+) commit 0cc5fa00b0a88dad140b4e5c2cead9951ad36822 Author: Konrad Rzeszutek Wilk Date: Sat Apr 28 22:34:17 2018 +0200 x86/cpufeatures: Add X86_FEATURE_RDS Add the CPU feature bit CPUID.7.0.EDX[31] which indicates whether the CPU supports Reduced Data Speculation. [ tglx: Split it out from a later patch ] Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) commit c456442cd3a59eeb1d60293c26cbe2ff2c4e42cf Author: Konrad Rzeszutek Wilk Date: Wed Apr 25 22:04:20 2018 -0400 x86/bugs: Expose /sys/../spec_store_bypass Add the sysfs file for the new vulerability. It does not do much except show the words 'Vulnerable' for recent x86 cores. Intel cores prior to family 6 are known not to be vulnerable, and so are some Atoms and some Xeon Phi. It assumes that older Cyrix, Centaur, etc. cores are immune. Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Ingo Molnar Documentation/ABI/testing/sysfs-devices-system-cpu | 1 + arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/bugs.c | 5 +++++ arch/x86/kernel/cpu/common.c | 23 ++++++++++++++++++++++ drivers/base/cpu.c | 8 ++++++++ include/linux/cpu.h | 2 ++ 6 files changed, 40 insertions(+) commit 5cf687548705412da47c9cec342fd952d71ed3d5 Author: Konrad Rzeszutek Wilk Date: Wed Apr 25 22:04:19 2018 -0400 x86/bugs, KVM: Support the combination of guest and host IBRS A guest may modify the SPEC_CTRL MSR from the value used by the kernel. Since the kernel doesn't use IBRS, this means a value of zero is what is needed in the host. But the 336996-Speculative-Execution-Side-Channel-Mitigations.pdf refers to the other bits as reserved so the kernel should respect the boot time SPEC_CTRL value and use that. This allows to deal with future extensions to the SPEC_CTRL interface if any at all. Note: This uses wrmsrl() instead of native_wrmsl(). I does not make any difference as paravirt will over-write the callq *0xfff.. with the wrmsrl assembler code. Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Ingo Molnar arch/x86/include/asm/nospec-branch.h | 10 ++++++++++ arch/x86/kernel/cpu/bugs.c | 18 ++++++++++++++++++ arch/x86/kvm/svm.c | 6 ++---- arch/x86/kvm/vmx.c | 6 ++---- 4 files changed, 32 insertions(+), 8 deletions(-) commit 1b86883ccb8d5d9506529d42dbe1a5257cb30b18 Author: Konrad Rzeszutek Wilk Date: Wed Apr 25 22:04:18 2018 -0400 x86/bugs: Read SPEC_CTRL MSR during boot and re-use reserved bits The 336996-Speculative-Execution-Side-Channel-Mitigations.pdf refers to all the other bits as reserved. The Intel SDM glossary defines reserved as implementation specific - aka unknown. As such at bootup this must be taken it into account and proper masking for the bits in use applied. A copy of this document is available at https://bugzilla.kernel.org/show_bug.cgi?id=199511 [ tglx: Made x86_spec_ctrl_base __ro_after_init ] Suggested-by: Jon Masters Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Ingo Molnar arch/x86/include/asm/nospec-branch.h | 24 ++++++++++++++++++++---- arch/x86/kernel/cpu/bugs.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 4 deletions(-) commit d1059518b4789cabe34bb4b714d07e6089c82ca1 Author: Konrad Rzeszutek Wilk Date: Wed Apr 25 22:04:17 2018 -0400 x86/bugs: Concentrate bug reporting into a separate function Those SysFS functions have a similar preamble, as such make common code to handle them. Suggested-by: Borislav Petkov Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Ingo Molnar arch/x86/kernel/cpu/bugs.c | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) commit 4a28bfe3267b68e22c663ac26185aa16c9b879ef Author: Konrad Rzeszutek Wilk Date: Wed Apr 25 22:04:16 2018 -0400 x86/bugs: Concentrate bug detection into a separate function Combine the various logic which goes through all those x86_cpu_id matching structures in one function. Suggested-by: Borislav Petkov Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Ingo Molnar arch/x86/kernel/cpu/common.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 1aa7a5735a41418d8e01fa7c9565eb2657e2ea3f Author: Linus Torvalds Date: Tue May 1 15:55:51 2018 +0200 x86/nospec: Simplify alternative_msr_write() The macro is not type safe and I did look for why that "g" constraint for the asm doesn't work: it's because the asm is more fundamentally wrong. It does movl %[val], %%eax but "val" isn't a 32-bit value, so then gcc will pass it in a register, and generate code like movl %rsi, %eax and gas will complain about a nonsensical 'mov' instruction (it's moving a 64-bit register to a 32-bit one). Passing it through memory will just hide the real bug - gcc still thinks the memory location is 64-bit, but the "movl" will only load the first 32 bits and it all happens to work because x86 is little-endian. Convert it to a type safe inline function with a little trick which hands the feature into the ALTERNATIVE macro. Signed-off-by: Linus Torvalds Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar arch/x86/include/asm/nospec-branch.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 9df50ba76ac1485b844beffa1f3f5d9659d9cdaf Author: Bhadram Varka Date: Wed May 2 20:44:40 2018 +0530 arm64: tegra: Make BCM89610 PHY interrupt as active low Need to configure PHY interrupt as active low for P3310 Tegra186 platform otherwise it results in spurious interrupts. This issue wasn't seen before because the generic PHY driver without interrupt support was used. Signed-off-by: Bhadram Varka Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85f1abe0019fcb3ea10df7029056cf42702283a8 Author: Peter Zijlstra Date: Tue May 1 18:14:45 2018 +0200 kthread, sched/wait: Fix kthread_parkme() completion issue Even with the wait-loop fixed, there is a further issue with kthread_parkme(). Upon hotplug, when we do takedown_cpu(), smpboot_park_threads() can return before all those threads are in fact blocked, due to the placement of the complete() in __kthread_parkme(). When that happens, sched_cpu_dying() -> migrate_tasks() can end up migrating such a still runnable task onto another CPU. Normally the task will have hit schedule() and gone to sleep by the time we do kthread_unpark(), which will then do __kthread_bind() to re-bind the task to the correct CPU. However, when we loose the initial TASK_PARKED store to the concurrent wakeup issue described previously, do the complete(), get migrated, it is possible to either: - observe kthread_unpark()'s clearing of SHOULD_PARK and terminate the park and set TASK_RUNNING, or - __kthread_bind()'s wait_task_inactive() to observe the competing TASK_RUNNING store. Either way the WARN() in __kthread_bind() will trigger and fail to correctly set the CPU affinity. Fix this by only issuing the complete() when the kthread has scheduled out. This does away with all the icky 'still running' nonsense. The alternative is to promote TASK_PARKED to a special state, this guarantees wait_task_inactive() cannot observe a 'stale' TASK_RUNNING and we'll end up doing the right thing, but this preserves the whole icky business of potentially migating the still runnable thing. Reported-by: Gaurav Kohli Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/kthread.h | 1 + kernel/kthread.c | 43 +++++++++++++++++++------------------------ kernel/sched/core.c | 32 +++++++++++++++++++++----------- 3 files changed, 41 insertions(+), 35 deletions(-) commit 741a76b350897604c48fb12beff1c9b77724dc96 Author: Peter Zijlstra Date: Mon Apr 30 14:50:22 2018 +0200 kthread, sched/wait: Fix kthread_parkme() wait-loop Gaurav reported a problem with __kthread_parkme() where a concurrent try_to_wake_up() could result in competing stores to ->state which, when the TASK_PARKED store got lost bad things would happen. The comment near set_current_state() actually mentions this competing store, but only mentions the case against TASK_RUNNING. This same store, with different timing, can happen against a subsequent !RUNNING store. This normally is not a problem, because as per that same comment, the !RUNNING state store is inside a condition based wait-loop: for (;;) { set_current_state(TASK_UNINTERRUPTIBLE); if (!need_sleep) break; schedule(); } __set_current_state(TASK_RUNNING); If we loose the (first) TASK_UNINTERRUPTIBLE store to a previous (concurrent) wakeup, the schedule() will NO-OP and we'll go around the loop once more. The problem here is that the TASK_PARKED store is not inside the KTHREAD_SHOULD_PARK condition wait-loop. There is a genuine issue with sleeps that do not have a condition; this is addressed in a subsequent patch. Reported-by: Gaurav Kohli Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Oleg Nesterov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/kthread.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 457be908c83637ee10bda085a23dc05afa3b14a0 Author: Vincent Guittot Date: Thu Apr 26 12:19:32 2018 +0200 sched/fair: Fix the update of blocked load when newly idle With commit: 31e77c93e432 ("sched/fair: Update blocked load when newly idle") ... we release the rq->lock when updating blocked load of idle CPUs. This opens a time window during which another CPU can add a task to this CPU's cfs_rq. The check for newly added task of idle_balance() is not in the common path. Move the out label to include this check. Reported-by: Heiner Kallweit Tested-by: Geert Uytterhoeven Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 31e77c93e432 ("sched/fair: Update blocked load when newly idle") Link: http://lkml.kernel.org/r/20180426103133.GA6953@linaro.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b26351b910fb8fe6a056f8a1bbccabe50c0e19f Author: Peter Zijlstra Date: Fri Apr 20 11:50:05 2018 +0200 stop_machine, sched: Fix migrate_swap() vs. active_balance() deadlock Matt reported the following deadlock: CPU0 CPU1 schedule(.prev=migrate/0) pick_next_task() ... idle_balance() migrate_swap() active_balance() stop_two_cpus() spin_lock(stopper0->lock) spin_lock(stopper1->lock) ttwu(migrate/0) smp_cond_load_acquire() -- waits for schedule() stop_one_cpu(1) spin_lock(stopper1->lock) -- waits for stopper lock Fix this deadlock by taking the wakeups out from under stopper->lock. This allows the active_balance() to queue the stop work and finish the context switch, which in turn allows the wakeup from migrate_swap() to observe the context and complete the wakeup. Signed-off-by: Peter Zijlstra (Intel) Reported-by: Matt Fleming Signed-off-by: Peter Zijlstra (Intel) Acked-by: Matt Fleming Cc: Linus Torvalds Cc: Michal Hocko Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180420095005.GH4064@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/stop_machine.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit f4ef6a438cee86ca0c6d1b889aa53bec9c1f9de6 Merge: ecd649b d66a270 Author: Linus Torvalds Date: Wed May 2 17:38:37 2018 -1000 Merge tag 'trace-v4.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Various fixes in tracing: - Tracepoints should not give warning on OOM failures - Use special field for function pointer in trace event - Fix igrab issues in uprobes - Fixes to the new histogram triggers" * tag 'trace-v4.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracepoint: Do not warn on ENOMEM tracing: Add field modifier parsing hist error for hist triggers tracing: Add field parsing hist error for hist triggers tracing: Restore proper field flag printing when displaying triggers tracing: initcall: Ordered comparison of function pointers tracing: Remove igrab() iput() call from uprobes.c tracing: Fix bad use of igrab in trace_uprobe.c commit ecd649b3408408841d5793038b0241e55ac7a141 Merge: 3b6f979 f6eeb9e Author: Linus Torvalds Date: Wed May 2 17:34:42 2018 -1000 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: "Just a few driver fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: atmel_mxt_ts - add missing compatible strings to OF device table Input: atmel_mxt_ts - fix the firmware update Input: atmel_mxt_ts - add touchpad button mapping for Samsung Chromebook Pro MAINTAINERS: Rakesh Iyer can't be reached anymore Input: hideep_ts - fix a typo in Kconfig Input: alps - fix reporting pressure of v3 trackstick Input: leds - fix out of bound access Input: synaptics-rmi4 - fix an unchecked out of memory error path commit 94720e3aee6884d8c8beb678001629da60ec6366 Author: Julian Anastasov Date: Wed May 2 09:41:19 2018 +0300 ipv4: fix fnhe usage by non-cached routes Allow some non-cached routes to use non-expired fnhe: 1. ip_del_fnhe: moved above and now called by find_exception. The 4.5+ commit deed49df7390 expires fnhe only when caching routes. Change that to: 1.1. use fnhe for non-cached local output routes, with the help from (2) 1.2. allow __mkroute_input to detect expired fnhe (outdated fnhe_gw, for example) when do_cache is false, eg. when itag!=0 for unicast destinations. 2. __mkroute_output: keep fi to allow local routes with orig_oif != 0 to use fnhe info even when the new route will not be cached into fnhe. After commit 839da4d98960 ("net: ipv4: set orig_oif based on fib result for local traffic") it means all local routes will be affected because they are not cached. This change is used to solve a PMTU problem with IPVS (and probably Netfilter DNAT) setups that redirect local clients from target local IP (local route to Virtual IP) to new remote IP target, eg. IPVS TUN real server. Loopback has 64K MTU and we need to create fnhe on the local route that will keep the reduced PMTU for the Virtual IP. Without this change fnhe_pmtu is updated from ICMP but never exposed to non-cached local routes. This includes routes with flowi4_oif!=0 for 4.6+ and with flowi4_oif=any for 4.14+). 3. update_or_create_fnhe: make sure fnhe_expires is not 0 for new entries Fixes: 839da4d98960 ("net: ipv4: set orig_oif based on fib result for local traffic") Fixes: d6d5e999e5df ("route: do not cache fib route info on local routes with oif") Fixes: deed49df7390 ("route: check and remove route cache when we get route") Cc: David Ahern Cc: Xin Long Signed-off-by: Julian Anastasov Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv4/route.c | 118 +++++++++++++++++++++++++------------------------------ 1 file changed, 53 insertions(+), 65 deletions(-) commit 3b6f979319c86d73c48d27deca68331e7924c209 Merge: 2d618bdf f5957da Author: Linus Torvalds Date: Wed May 2 16:38:17 2018 -1000 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three small bug fixes: an illegally overlapping memcmp in target code, a potential infinite loop in isci under certain rare phy conditions and an ATA queue depth (performance) correction for storvsc" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: target: Fix fortify_panic kernel exception scsi: isci: Fix infinite loop in while loop scsi: storvsc: Set up correct queue depth values for IDE devices commit 1e5fbc0b8d9d340927013bf0a271c26bb0da1d36 Merge: 083faae 49ceda9 Author: Dave Airlie Date: Thu May 3 11:58:39 2018 +1000 Merge tag 'drm-misc-fixes-2018-05-02' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes vc4: Fix bo refcounts during async commits (Boris) vga-dac: Fix edid memory leak (Sean) Cc: Boris Brezillon Cc: Sean Paul * tag 'drm-misc-fixes-2018-05-02' of git://anongit.freedesktop.org/drm/drm-misc: drm/bridge: vga-dac: Fix edid memory leak drm/vc4: Make sure vc4_bo_{inc,dec}_usecnt() calls are balanced commit 083faae1529f5b0c2abc8bf3cf413e588d9e318d Merge: 6da6c0d b607990 Author: Dave Airlie Date: Thu May 3 11:58:19 2018 +1000 Merge tag 'drm-intel-fixes-2018-05-02' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Add DMC firmware for Geminilake. * tag 'drm-intel-fixes-2018-05-02' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915/glk: Add MODULE_FIRMWARE for Geminilake commit e002434e88882d8f8205619b5b8f1d8e373a2724 Merge: 7df40c2 b5b6ff7 Author: David S. Miller Date: Wed May 2 20:42:44 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-05-03 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Several BPF sockmap fixes mostly related to bugs in error path handling, that is, a bug in updating the scatterlist length / offset accounting, a missing sk_mem_uncharge() in redirect error handling, and a bug where the outstanding bytes counter sg_size was not zeroed, from John. 2) Fix two memory leaks in the x86-64 BPF JIT, one in an error path where we still don't converge after image was allocated and another one where BPF calls are used and JIT passes don't converge, from Daniel. 3) Minor fix in BPF selftests where in test_stacktrace_build_id() we drop useless args in urandom_read and we need to add a missing newline in a CHECK() error message, from Song. ==================== Signed-off-by: David S. Miller commit b5b6ff730253ab68ec230e239c4245cb1e8a5397 Merge: 0f58e58 abaeb09 Author: Alexei Starovoitov Date: Wed May 2 15:30:45 2018 -0700 Merge branch 'bpf-sockmap-fixes' John Fastabend says: ==================== When I added the test_sockmap to selftests I mistakenly changed the test logic a bit. The result of this was on redirect cases we ended up choosing the wrong sock from the BPF program and ended up sending to a socket that had no receive handler. The result was the actual receive handler, running on a different socket, is timing out and closing the socket. This results in errors (-EPIPE to be specific) on the sending side. Typically happening if the sender does not complete the send before the receive side times out. So depending on timing and the size of the send we may get errors. This exposed some bugs in the sockmap error path handling. This series fixes the errors. The primary issue is we did not do proper memory accounting in these cases which resulted in missing a sk_mem_uncharge(). This happened in the redirect path and in one case on the normal send path. See the three patches for the details. The other take-away from this is we need to fix the test_sockmap and also add more negative test cases. That will happen in bpf-next. Finally, I tested this using the existing test_sockmap program, the older sockmap sample test script, and a few real use cases with Cilium. All of these seem to be in working correctly. v2: fix compiler warning, drop iterator variable 'i' that is no longer used in patch 3. ==================== Signed-off-by: Alexei Starovoitov commit abaeb096ca38cad02c8a68c49ddd7efc043c319a Author: John Fastabend Date: Wed May 2 13:50:29 2018 -0700 bpf: sockmap, fix error handling in redirect failures When a redirect failure happens we release the buffers in-flight without calling a sk_mem_uncharge(), the uncharge is called before dropping the sock lock for the redirecte, however we missed updating the ring start index. When no apply actions are in progress this is OK because we uncharge the entire buffer before the redirect. But, when we have apply logic running its possible that only a portion of the buffer is being redirected. In this case we only do memory accounting for the buffer slice being redirected and expect to be able to loop over the BPF program again and/or if a sock is closed uncharge the memory at sock destruct time. With an invalid start index however the program logic looks at the start pointer index, checks the length, and when seeing the length is zero (from the initial release and failure to update the pointer) aborts without uncharging/releasing the remaining memory. The fix for this is simply to update the start index. To avoid fixing this error in two locations we do a small refactor and remove one case where it is open-coded. Then fix it in the single function. Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov kernel/bpf/sockmap.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit fec51d40ea65dd8f51a3e27fc69b4e7dc4f17776 Author: John Fastabend Date: Wed May 2 13:50:24 2018 -0700 bpf: sockmap, zero sg_size on error when buffer is released When an error occurs during a redirect we have two cases that need to be handled (i) we have a cork'ed buffer (ii) we have a normal sendmsg buffer. In the cork'ed buffer case we don't currently support recovering from errors in a redirect action. So the buffer is released and the error should _not_ be pushed back to the caller of sendmsg/sendpage. The rationale here is the user will get an error that relates to old data that may have been sent by some arbitrary thread on that sock. Instead we simple consume the data and tell the user that the data has been consumed. We may add proper error recovery in the future. However, this patch fixes a bug where the bytes outstanding counter sg_size was not zeroed. This could result in a case where if the user has both a cork'ed action and apply action in progress we may incorrectly call into the BPF program when the user expected an old verdict to be applied via the apply action. I don't have a use case where using apply and cork at the same time is valid but we never explicitly reject it because it should work fine. This patch ensures the sg_size is zeroed so we don't have this case. In the normal sendmsg buffer case (no cork data) we also do not zero sg_size. Again this can confuse the apply logic when the logic calls into the BPF program when the BPF programmer expected the old verdict to remain. So ensure we set sg_size to zero here as well. And additionally to keep the psock state in-sync with the sk_msg_buff release all the memory as well. Previously we did this before returning to the user but this left a gap where psock and sk_msg_buff states were out of sync which seems fragile. No additional overhead is taken here except for a call to check the length and realize its already been freed. This is in the error path as well so in my opinion lets have robust code over optimized error paths. Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov kernel/bpf/sockmap.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 3cc9a472d625f31f981063882b07e96229b9e71a Author: John Fastabend Date: Wed May 2 13:50:19 2018 -0700 bpf: sockmap, fix scatterlist update on error path in send with apply When the call to do_tcp_sendpage() fails to send the complete block requested we either retry if only a partial send was completed or abort if we receive a error less than or equal to zero. Before returning though we must update the scatterlist length/offset to account for any partial send completed. Before this patch we did this at the end of the retry loop, but this was buggy when used while applying a verdict to fewer bytes than in the scatterlist. When the scatterlist length was being set we forgot to account for the apply logic reducing the size variable. So the result was we chopped off some bytes in the scatterlist without doing proper cleanup on them. This results in a WARNING when the sock is tore down because the bytes have previously been charged to the socket but are never uncharged. The simple fix is to simply do the accounting inside the retry loop subtracting from the absolute scatterlist values rather than trying to accumulate the totals and subtract at the end. Reported-by: Alexei Starovoitov Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov kernel/bpf/sockmap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7df40c2673a1307c3260aab6f9d4b9bf97ca8fd7 Author: Eric Dumazet Date: Wed May 2 10:03:30 2018 -0700 net_sched: fq: take care of throttled flows before reuse Normally, a socket can not be freed/reused unless all its TX packets left qdisc and were TX-completed. However connect(AF_UNSPEC) allows this to happen. With commit fc59d5bdf1e3 ("pkt_sched: fq: clear time_next_packet for reused flows") we cleared f->time_next_packet but took no special action if the flow was still in the throttled rb-tree. Since f->time_next_packet is the key used in the rb-tree searches, blindly clearing it might break rb-tree integrity. We need to make sure the flow is no longer in the rb-tree to avoid this problem. Fixes: fc59d5bdf1e3 ("pkt_sched: fq: clear time_next_packet for reused flows") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/sched/sch_fq.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) commit 30ca22e4a5d0063dd9a9cdf35cd139c5807cbeb3 Author: Ido Schimmel Date: Wed May 2 22:41:56 2018 +0300 ipv6: Revert "ipv6: Allow non-gateway ECMP for IPv6" This reverts commit edd7ceb78296 ("ipv6: Allow non-gateway ECMP for IPv6"). Eric reported a division by zero in rt6_multipath_rebalance() which is caused by above commit that considers identical local routes to be siblings. The division by zero happens because a nexthop weight is not set for local routes. Revert the commit as it does not fix a bug and has side effects. To reproduce: # ip -6 address add 2001:db8::1/64 dev dummy0 # ip -6 address add 2001:db8::1/64 dev dummy1 Fixes: edd7ceb78296 ("ipv6: Allow non-gateway ECMP for IPv6") Signed-off-by: Ido Schimmel Reported-by: Eric Dumazet Tested-by: Eric Dumazet Signed-off-by: David S. Miller include/net/ip6_route.h | 3 ++- net/ipv6/ip6_fib.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 8d73b18079613baf75019a920ce6a1ac0dac8b5b Author: Helge Deller Date: Fri Apr 20 23:23:37 2018 +0200 parisc: Fix section mismatches Fix three section mismatches: 1) Section mismatch in reference from the function ioread8() to the function .init.text:pcibios_init_bridge() 2) Section mismatch in reference from the function free_initmem() to the function .init.text:map_pages() 3) Section mismatch in reference from the function ccio_ioc_init() to the function .init.text:count_parisc_driver() Signed-off-by: Helge Deller arch/parisc/kernel/pci.c | 2 +- arch/parisc/mm/init.c | 2 +- drivers/parisc/ccio-dma.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit b819439fea305a0bfd6ca23a7994fd1a8847c0d8 Author: Helge Deller Date: Fri Apr 20 23:19:17 2018 +0200 parisc: drivers.c: Fix section mismatches Fix two section mismatches in drivers.c: 1) Section mismatch in reference from the function alloc_tree_node() to the function .init.text:create_tree_node(). 2) Section mismatch in reference from the function walk_native_bus() to the function .init.text:alloc_pa_dev(). Signed-off-by: Helge Deller arch/parisc/kernel/drivers.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d7760d638b140d53c6390a2fbee9b06460b43e9e Author: Ilya Dryomov Date: Wed May 2 20:16:57 2018 +0200 iov_iter: fix memory leak in pipe_get_pages_alloc() Make n signed to avoid leaking the pages array if __pipe_get_pages() fails to allocate any pages. Signed-off-by: Ilya Dryomov Signed-off-by: Al Viro lib/iov_iter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e76b6312391bdd62e31dc86cb65e478b07b7909e Author: Ilya Dryomov Date: Wed May 2 20:16:56 2018 +0200 iov_iter: fix return type of __pipe_get_pages() It returns -EFAULT and happens to be a helper for pipe_get_pages() whose return type is ssize_t. Signed-off-by: Ilya Dryomov Signed-off-by: Al Viro lib/iov_iter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f58e58e2803a83753f7e626cd3654cea601308d Merge: a4e21ff 39f56ca Author: Alexei Starovoitov Date: Wed May 2 12:35:47 2018 -0700 Merge branch 'x86-bpf-jit-fixes' Daniel Borkmann says: ==================== Fix two memory leaks in x86 JIT. For details, please see individual patches in this series. Thanks! ==================== Signed-off-by: Alexei Starovoitov commit 39f56ca945af86112753646316c4c92dcd4acd82 Author: Daniel Borkmann Date: Wed May 2 20:12:23 2018 +0200 bpf, x64: fix memleak when not converging on calls The JIT logic in jit_subprogs() is as follows: for all subprogs we allocate a bpf_prog_alloc(), populate it (prog->is_func = 1 here), and pass it to bpf_int_jit_compile(). If a failure occurred during JIT and prog->jited is not set, then we bail out from attempting to JIT the whole program, and punt to the interpreter instead. In case JITing went successful, we fixup BPF call offsets and do another pass to bpf_int_jit_compile() (extra_pass is true at that point) to complete JITing calls. Given that requires to pass JIT context around addrs and jit_data from x86 JIT are freed in the extra_pass in bpf_int_jit_compile() when calls are involved (if not, they can be freed immediately). However, if in the original pass, the JIT image didn't converge then we leak addrs and jit_data since image itself is NULL, the prog->is_func is set and extra_pass is false in that case, meaning both will become unreachable and are never cleaned up, therefore we need to free as well on !image. Only x64 JIT is affected. Fixes: 1c2a088a6626 ("bpf: x64: add JIT support for multi-function programs") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: David S. Miller Signed-off-by: Alexei Starovoitov arch/x86/net/bpf_jit_comp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3aab8884c9eb99189a3569ac4e6b205371c9ac0b Author: Daniel Borkmann Date: Wed May 2 20:12:22 2018 +0200 bpf, x64: fix memleak when not converging after image While reviewing x64 JIT code, I noticed that we leak the prior allocated JIT image in the case where proglen != oldproglen during the JIT passes. Prior to the commit e0ee9c12157d ("x86: bpf_jit: fix two bugs in eBPF JIT compiler") we would just break out of the loop, and using the image as the JITed prog since it could only shrink in size anyway. After e0ee9c12157d, we would bail out to out_addrs label where we free addrs and jit_data but not the image coming from bpf_jit_binary_alloc(). Fixes: e0ee9c12157d ("x86: bpf_jit: fix two bugs in eBPF JIT compiler") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: David S. Miller Signed-off-by: Alexei Starovoitov arch/x86/net/bpf_jit_comp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 49ceda9de2da4d1827941d06701f3017c27c1855 Author: Sean Paul Date: Fri Apr 20 14:59:59 2018 -0400 drm/bridge: vga-dac: Fix edid memory leak edid should be freed once it's finished being used. Fixes: 56fe8b6f4991 ("drm/bridge: Add RGB to VGA bridge support") Cc: Rob Herring Cc: Sean Paul Cc: Maxime Ripard Cc: Archit Taneja Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: # v4.9+ Reviewed-by: Maxime Ripard Reviewed-by: Laurent Pinchart Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180420190007.1572-1-seanpaul@chromium.org drivers/gpu/drm/bridge/dumb-vga-dac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 784813aed6ba24a1f24e7e11d9d0f208cee37a7d Author: Ursula Braun Date: Wed May 2 16:53:56 2018 +0200 net/smc: restrict non-blocking connect finish The smc_poll code tries to finish connect() if the socket is in state SMC_INIT and polling of the internal CLC-socket returns with EPOLLOUT. This makes sense for a select/poll call following a connect call, but not without preceding connect(). With this patch smc_poll starts connect logic only, if the CLC-socket is no longer in its initial state TCP_CLOSE. In addition, a poll error on the internal CLC-socket is always propagated to the SMC socket. With this patch the code path mentioned by syzbot https://syzkaller.appspot.com/bug?extid=03faa2dc16b8b64be396 is no longer possible. Signed-off-by: Ursula Braun Reported-by: syzbot+03faa2dc16b8b64be396@syzkaller.appspotmail.com Signed-off-by: David S. Miller net/smc/af_smc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit af3e0fcf78879f718c5f73df0814951bd7057d34 Author: Ingo Molnar Date: Wed May 2 13:30:57 2018 +0200 8139too: Use disable_irq_nosync() in rtl8139_poll_controller() Use disable_irq_nosync() instead of disable_irq() as this might be called in atomic context with netpoll. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: David S. Miller drivers/net/ethernet/realtek/8139too.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 021ba8e98fe5c6691b3cc3669faafa02403aa211 Author: Darrick J. Wong Date: Mon Apr 16 23:07:36 2018 -0700 xfs: cap the length of deduplication requests Since deduplication potentially has to read in all the pages in both files in order to compare the contents, cap the deduplication request length at MAX_RW_COUNT/2 (roughly 1GB) so that we have /some/ upper bound on the request length and can't just lock up the kernel forever. Found by running generic/304 after commit 1ddae54555b62 ("common/rc: add missing 'local' keywords"). Reported-by: matorola@gmail.com Signed-off-by: Darrick J. Wong Reviewed-by: Carlos Maiolino fs/xfs/xfs_file.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 9fc347678dde73abd75bce81d5dd82c4f4505184 Author: Rasmus Villemoes Date: Thu Mar 22 22:05:23 2018 +0100 modpost: delete stale comment Commit 7840fea200cd ("kbuild: Fix computing srcversion for modules") fixed the comment above parse_source_files to refer to the new source_ line, but left this one behind that could still give the impression that drivers/net/dummy.c appears in the deps_ variable. Signed-off-by: Rasmus Villemoes Signed-off-by: Masahiro Yamada scripts/mod/sumversion.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit ce402f044e4e432c296f90eaabb8dbe8f3624391 Author: Xin Long Date: Wed May 2 13:45:12 2018 +0800 sctp: fix the issue that the cookie-ack with auth can't get processed When auth is enabled for cookie-ack chunk, in sctp_inq_pop, sctp processes auth chunk first, then continues to the next chunk in this packet if chunk_end + chunk_hdr size < skb_tail_pointer(). Otherwise, it will go to the next packet or discard this chunk. However, it missed the fact that cookie-ack chunk's size is equal to chunk_hdr size, which couldn't match that check, and thus this chunk would not get processed. This patch fixes it by changing the check to chunk_end + chunk_hdr size <= skb_tail_pointer(). Fixes: 26b87c788100 ("net: sctp: fix remote memory pressure from excessive queueing") Signed-off-by: Xin Long Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/inqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46e16d4b956867013e0bbd7f2bad206f4aa55752 Author: Xin Long Date: Wed May 2 13:39:46 2018 +0800 sctp: use the old asoc when making the cookie-ack chunk in dupcook_d When processing a duplicate cookie-echo chunk, for case 'D', sctp will not process the param from this chunk. It means old asoc has nothing to be updated, and the new temp asoc doesn't have the complete info. So there's no reason to use the new asoc when creating the cookie-ack chunk. Otherwise, like when auth is enabled for cookie-ack, the chunk can not be set with auth, and it will definitely be dropped by peer. This issue is there since very beginning, and we fix it by using the old asoc instead. Signed-off-by: Xin Long Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/sm_statefuns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4842a08fb80bc09b7b089af42c58353dfaa8f88f Author: Xin Long Date: Wed May 2 13:37:44 2018 +0800 sctp: init active key for the new asoc in dupcook_a and dupcook_b When processing a duplicate cookie-echo chunk, for case 'A' and 'B', after sctp_process_init for the new asoc, if auth is enabled for the cookie-ack chunk, the active key should also be initialized. Otherwise, the cookie-ack chunk made later can not be set with auth shkey properly, and a crash can even be caused by this, as after Commit 1b1e0bc99474 ("sctp: add refcnt support for sh_key"), sctp needs to hold the shkey when making control chunks. Fixes: 1b1e0bc99474 ("sctp: add refcnt support for sh_key") Reported-by: Jianwen Ji Signed-off-by: Xin Long Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/sm_statefuns.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e6e6a278b1eaffa19d42186bfacd1ffc15a50b3f Author: Neal Cardwell Date: Tue May 1 21:45:41 2018 -0400 tcp_bbr: fix to zero idle_restart only upon S/ACKed data Previously the bbr->idle_restart tracking was zeroing out the bbr->idle_restart bit upon ACKs that did not SACK or ACK anything, e.g. receiving incoming data or receiver window updates. In such situations BBR would forget that this was a restart-from-idle situation, and if the min_rtt had expired it would unnecessarily enter PROBE_RTT (even though we were actually restarting from idle but had merely forgotten that fact). The fix is simple: we need to remember we are restarting from idle until we receive a S/ACK for some data (a S/ACK for the first flight of data we send as we are restarting). This commit is a stable candidate for kernels back as far as 4.9. Fixes: 0f8782ea1497 ("tcp_bbr: add BBR congestion control") Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Priyaranjan Jha Signed-off-by: Yousuk Seung Signed-off-by: David S. Miller net/ipv4/tcp_bbr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5e5add172ea81152d518b161ec5706503ad3d799 Author: Grygorii Strashko Date: Tue May 1 12:41:22 2018 -0500 net: ethernet: ti: cpsw: fix packet leaking in dual_mac mode In dual_mac mode packets arrived on one port should not be forwarded by switch hw to another port. Only Linux Host can forward packets between ports. The below test case (reported in [1]) shows that packet arrived on one port can be leaked to anoter (reproducible with dual port evms): - connect port 1 (eth0) to linux Host 0 and run tcpdump or Wireshark - connect port 2 (eth1) to linux Host 1 with vlan 1 configured - ping from Host 1 through vlan 1 interface. ARP packets will be seen on Host 0. Issue happens because dual_mac mode is implemnted using two vlans: 1 (Port 1+Port 0) and 2 (Port 2+Port 0), so there are vlan records created for for each vlan. By default, the ALE will find valid vlan record in its table when vlan 1 tagged packet arrived on Port 2 and so forwards packet to all ports which are vlan 1 members (like Port. To avoid such behaviorr the ALE VLAN ID Ingress Check need to be enabled for each external CPSW port (ALE_PORTCTLn.VID_INGRESS_CHECK) so ALE will drop ingress packets if Rx port is not VLAN member. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 2 ++ 1 file changed, 2 insertions(+) commit c65732e4f72124ca5a3a0dd3bee0d3cee39c7170 Author: Thomas Gleixner Date: Mon Apr 30 21:47:46 2018 +0200 x86/cpu: Restore CPUID_8000_0008_EBX reload The recent commt which addresses the x86_phys_bits corruption with encrypted memory on CPUID reload after a microcode update lost the reload of CPUID_8000_0008_EBX as well. As a consequence IBRS and IBRS_FW are not longer detected Restore the behaviour by bringing the reload of CPUID_8000_0008_EBX back. This restore has a twist due to the convoluted way the cpuid analysis works: CPUID_8000_0008_EBX is used by AMD to enumerate IBRB, IBRS, STIBP. On Intel EBX is not used. But the speculation control code sets the AMD bits when running on Intel depending on the Intel specific speculation control bits. This was done to use the same bits for alternatives. The change which moved the 8000_0008 evaluation out of get_cpu_cap() broke this nasty scheme due to ordering. So that on Intel the store to CPUID_8000_0008_EBX clears the IBRB, IBRS, STIBP bits which had been set before by software. So the actual CPUID_8000_0008_EBX needs to go back to the place where it was and the phys/virt address space calculation cannot touch it. In hindsight this should have used completely synthetic bits for IBRB, IBRS, STIBP instead of reusing the AMD bits, but that's for 4.18. /me needs to find time to cleanup that steaming pile of ... Fixes: d94a155c59c9 ("x86/cpu: Prevent cpuinfo_x86::x86_phys_bits adjustment corruption") Reported-by: Jörg Otte Reported-by: Tim Chen Signed-off-by: Thomas Gleixner Tested-by: Jörg Otte Cc: Linus Torvalds Cc: kirill.shutemov@linux.intel.com Cc: Borislav Petkov Date: Wed May 2 17:19:05 2018 +0300 Revert "vhost: make msg padding explicit" This reverts commit 93c0d549c4c5a7382ad70de6b86610b7aae57406. Unfortunately the padding will break 32 bit userspace. Ouch. Need to add some compat code, revert for now. Signed-off-by: Michael S. Tsirkin Signed-off-by: David S. Miller include/uapi/linux/vhost.h | 1 - 1 file changed, 1 deletion(-) commit 7dba33c6346c337aac3f7cd188137d4a6d3d1f3a Author: Peter Zijlstra Date: Mon Apr 30 12:00:14 2018 +0200 clocksource: Rework stale comment AFAICS the hotplug code no longer uses this function. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Rafael J. Wysocki Cc: len.brown@intel.com Cc: rjw@rjwysocki.net Cc: diego.viola@gmail.com Cc: rui.zhang@intel.com Link: https://lkml.kernel.org/r/20180430100344.656525644@infradead.org kernel/time/clocksource.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit cd2af07d823e5287cd6c91d54337348c2a873462 Author: Peter Zijlstra Date: Mon Apr 30 12:00:13 2018 +0200 clocksource: Consistent de-rate when marking unstable When a registered clocksource gets marked unstable the watchdog_kthread will de-rate and re-select the clocksource. Ensure it also de-rates when getting called on an unregistered clocksource. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Rafael J. Wysocki Cc: len.brown@intel.com Cc: rjw@rjwysocki.net Cc: diego.viola@gmail.com Cc: rui.zhang@intel.com Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180430100344.594904898@infradead.org kernel/time/clocksource.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit e3b4f79025e0a4eb7e2a2c7d24dadfa1e38893b0 Author: Peter Zijlstra Date: Mon Apr 30 12:00:12 2018 +0200 x86/tsc: Fix mark_tsc_unstable() mark_tsc_unstable() also needs to affect tsc_early, Now that clocksource_mark_unstable() can be used on a clocksource irrespective of its registration state, use it on both tsc_early and tsc. This does however require cs->list to be initialized empty, otherwise it cannot tell the registation state before registation. Fixes: aa83c45762a2 ("x86/tsc: Introduce early tsc clocksource") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Diego Viola Reviewed-by: Rafael J. Wysocki Cc: len.brown@intel.com Cc: rjw@rjwysocki.net Cc: rui.zhang@intel.com Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180430100344.533326547@infradead.org arch/x86/kernel/tsc.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 5b9e886a4af97574ca3ce1147f35545da0e7afc7 Author: Peter Zijlstra Date: Mon Apr 30 12:00:11 2018 +0200 clocksource: Initialize cs->wd_list A number of places relies on list_empty(&cs->wd_list), however the list_head does not get initialized. Do so upon registration, such that thereafter it is possible to rely on list_empty() correctly reflecting the list membership status. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Diego Viola Reviewed-by: Rafael J. Wysocki Cc: stable@vger.kernel.org Cc: len.brown@intel.com Cc: rjw@rjwysocki.net Cc: rui.zhang@intel.com Link: https://lkml.kernel.org/r/20180430100344.472662715@infradead.org kernel/time/clocksource.c | 2 ++ 1 file changed, 2 insertions(+) commit 2aae7bcfa4104b770e6f612356adb8d66c6144d6 Author: Peter Zijlstra Date: Mon Apr 23 17:28:55 2018 +0200 clocksource: Allow clocksource_mark_unstable() on unregistered clocksources Because of how the code flips between tsc-early and tsc clocksources it might need to mark one or both unstable. The current code in mark_tsc_unstable() only worked because previously it registered the tsc clocksource once and then never touched it. Since it now unregisters the tsc-early clocksource, it needs to know if a clocksource got unregistered and the current cs->mult test doesn't work for that. Instead use list_empty(&cs->list) to test for registration. Furthermore, since clocksource_mark_unstable() needs to place the cs on the wd_list, it links the cs->list and cs->wd_list serialization. It must not see a clocsource registered (!empty cs->list) but already past dequeue_watchdog(). So place {en,de}queue{,_watchdog}() under the same lock. Provided cs->list is initialized to empty, this then allows us to unconditionally use clocksource_mark_unstable(), regardless of the registration state. Fixes: aa83c45762a2 ("x86/tsc: Introduce early tsc clocksource") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Rafael J. Wysocki Tested-by: Diego Viola Cc: len.brown@intel.com Cc: rjw@rjwysocki.net Cc: diego.viola@gmail.com Cc: rui.zhang@intel.com Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180502135312.GS12217@hirez.programming.kicks-ass.net kernel/time/clocksource.c | 50 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 16 deletions(-) commit e9088adda13cd23249d4b0abb97ff8a81bf5573a Author: Peter Zijlstra Date: Mon Apr 30 12:00:09 2018 +0200 x86/tsc: Always unregister clocksource_tsc_early Don't leave the tsc-early clocksource registered if it errors out early. This was reported by Diego, who on his Core2 era machine got TSC invalidated while it was running with tsc-early (due to C-states). This results in keeping tsc-early with very bad effects. Reported-and-Tested-by: Diego Viola Fixes: aa83c45762a2 ("x86/tsc: Introduce early tsc clocksource") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Rafael J. Wysocki Cc: len.brown@intel.com Cc: rjw@rjwysocki.net Cc: diego.viola@gmail.com Cc: rui.zhang@intel.com Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180430100344.350507853@infradead.org arch/x86/kernel/tsc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 1bc2463cee92ef0e2034c813d5e511adeb58b5fd Author: Agustin Vega-Frias Date: Tue May 1 10:14:50 2018 -0400 irqchip/qcom: Fix check for spurious interrupts When the interrupts for a combiner span multiple registers it must be checked if any interrupts have been asserted on each register before checking for spurious interrupts. Checking each register seperately leads to false positive warnings. [ tglx: Massaged changelog ] Fixes: f20cc9b00c7b ("irqchip/qcom: Add IRQ combiner driver") Signed-off-by: Agustin Vega-Frias Signed-off-by: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: timur@codeaurora.org Cc: linux-arm-kernel@lists.infradead.org Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1525184090-26143-1-git-send-email-agustinv@codeaurora.org drivers/irqchip/qcom-irq-combiner.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6732cfd4cac514b556f36b518670af91c8bdf19a Author: Ladislav Michl Date: Wed May 2 12:41:32 2018 +0200 mtd: onenand: omap2: Disable DMA for HIGHMEM buffers dma_map_single does not work for vmalloc-ed buffers, so disable DMA in this case. Signed-off-by: Ladislav Michl Reported-by: "H. Nikolaus Schaller" Tested-by: "H. Nikolaus Schaller" Reviewed-by: Peter Ujfalusi Signed-off-by: Boris Brezillon drivers/mtd/nand/onenand/omap2.c | 105 ++++++++++++++------------------------- 1 file changed, 38 insertions(+), 67 deletions(-) commit 892a0be43edd63e1cd228af3453a064e9e94f08e Author: Michel Dänzer Date: Tue May 1 15:24:11 2018 +0200 swiotlb: fix inversed DMA_ATTR_NO_WARN test The result was printing the warning only when we were explicitly asked not to. Cc: stable@vger.kernel.org Fixes: 0176adb004065d6815a8e67946752df4cd947c5b "swiotlb: refactor coherent buffer allocation" Signed-off-by: Michel Dänzer Reviewed-by: Christian König . Signed-off-by: Christoph Hellwig lib/swiotlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c41eb2c7f93531b8ea689b1e2bfe7e6b884a7213 Author: Mika Westerberg Date: Thu Mar 29 17:37:25 2018 +0300 pinctrl: sunrisepoint: Align GPIO number space with Windows It turns out that the Windows GPIO driver for Sunrisepoint PCH-H uses similar bank structure than it does for Cannon Lake with the exception that here the bank size is always 24 pins. Starting from pad group E the BIOS/Windows GPIO numbering does not match the hardware anymore but instead there are gaps to make each pad group ("bank") consume exactly 24 pins. Because of this Linux does not use correct pins for GpioIo/GpioIo resources exposed by the BIOS. This patch aligns the GPIO number space with BIOS/Windows to make sure the same numbering scheme is used in Linux as well following what we did already for Intel Cannon Lake. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1543769 Reported-by: Vivien FRASCA Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-sunrisepoint.c | 45 ++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 3 deletions(-) commit 83b9dc11312f48a561594a895672abb6cb2a2250 Author: Mika Westerberg Date: Wed Apr 25 13:32:11 2018 +0300 pinctrl: cherryview: Associate IRQ descriptors to irqdomain When we dropped the custom Linux GPIO translation it resulted that the IRQ numbers changed slightly as well. Normally this would be fine because everyone is expected to use controller relative GPIO numbers and ACPI GpioIo/GpioInt resources. However, there is a certain set of Intel_Strago based Chromebooks where i8042 keyboard controller IRQ number is hardcoded be 182 (this is corrected with newer coreboot but the older ones still have the hardcoded Linux IRQ number). Because of this hardcoded IRQ number keyboard on those systems accidentally broke again. Fix this by iteratively associating IRQ descriptors to the chip irqdomain so that there are no gaps on those systems. Other systems are not affected. Fixes: 03c4749dd6c7 ("gpio / ACPI: Drop unnecessary ACPI GPIO to Linux GPIO translation") Link: https://bugzilla.kernel.org/show_bug.cgi?id=199463 Reported-by: Sultan Alsawaf Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-cherryview.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit b84e54616a946f24eeeca8762cb70a9074b045e7 Author: Yixun Lan Date: Tue Apr 17 17:08:24 2018 +0000 pinctrl: meson-axg: fix the range of aobus bank The GPIOAO bank is range from GPIOAO_0 to GPIOAO_13. Fixes: 83c566806a68 ("pinctrl: meson-axg: Add new pinctrl driver for Meson AXG SoC") Reported-by: Xingyu Chen Signed-off-by: Yixun Lan Acked-by: Kevin Hilman Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-axg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d89ad4f0b44dde8c5333ef7a5d5824829cc72de3 Author: Colin Ian King Date: Sun Apr 29 13:10:56 2018 +0100 ARM: sun8i: v3s: fix spelling mistake: "disbaled" -> "disabled" Trivial fix to spelling mistake in status text string Signed-off-by: Colin Ian King Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6aa10c70bf72fb28504cb5de5deac75da78b0f5 Author: Filipe Manana Date: Mon Apr 30 19:05:07 2018 +0100 Btrfs: send, fix missing truncate for inode with prealloc extent past eof An incremental send operation can miss a truncate operation when an inode has an increased size in the send snapshot and a prealloc extent beyond its size. Consider the following scenario where a necessary truncate operation is missing in the incremental send stream: 1) In the parent snapshot an inode has a size of 1282957 bytes and it has no prealloc extents beyond its size; 2) In the the send snapshot it has a size of 5738496 bytes and has a new extent at offsets 1884160 (length of 106496 bytes) and a prealloc extent beyond eof at offset 6729728 (and a length of 339968 bytes); 3) When processing the prealloc extent, at offset 6729728, we end up at send.c:send_write_or_clone() and set the @len variable to a value of 18446744073708560384 because @offset plus the original @len value is larger then the inode's size (6729728 + 339968 > 5738496). We then call send_extent_data(), with that @offset and @len, which in turn calls send_write(), and then the later calls fill_read_buf(). Because the offset passed to fill_read_buf() is greater then inode's i_size, this function returns 0 immediately, which makes send_write() and send_extent_data() do nothing and return immediately as well. When we get back to send.c:send_write_or_clone() we adjust the value of sctx->cur_inode_next_write_offset to @offset plus @len, which corresponds to 6729728 + 18446744073708560384 = 5738496, which is precisely the the size of the inode in the send snapshot; 4) Later when at send.c:finish_inode_if_needed() we determine that we don't need to issue a truncate operation because the value of sctx->cur_inode_next_write_offset corresponds to the inode's new size, 5738496 bytes. This is wrong because the last write operation that was issued started at offset 1884160 with a length of 106496 bytes, so the correct value for sctx->cur_inode_next_write_offset should be 1990656 (1884160 + 106496), so that a truncate operation with a value of 5738496 bytes would have been sent to insert a trailing hole at the destination. So fix the issue by making send.c:send_write_or_clone() not attempt to send write or clone operations for extents that start beyond the inode's size, since such attempts do nothing but waste time by calling helper functions and allocating path structures, and send currently has no fallocate command in order to create prealloc extents at the destination (either beyond a file's eof or not). The issue was found running the test btrfs/007 from fstests using a seed value of 1524346151 for fsstress. Reported-by: Gu, Jinxiang Fixes: ffa7c4296e93 ("Btrfs: send, do not issue unnecessary truncate operations") Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/send.c | 4 ++++ 1 file changed, 4 insertions(+) commit 998ac6d21cfd6efd58f5edf420bae8839dda9f2a Author: ethanwu Date: Sun Apr 29 15:59:42 2018 +0800 btrfs: Take trans lock before access running trans in check_delayed_ref In preivous patch: Btrfs: kill trans in run_delalloc_nocow and btrfs_cross_ref_exist We avoid starting btrfs transaction and get this information from fs_info->running_transaction directly. When accessing running_transaction in check_delayed_ref, there's a chance that current transaction will be freed by commit transaction after the NULL pointer check of running_transaction is passed. After looking all the other places using fs_info->running_transaction, they are either protected by trans_lock or holding the transactions. Fix this by using trans_lock and increasing the use_count. Fixes: e4c3b2dcd144 ("Btrfs: kill trans in run_delalloc_nocow and btrfs_cross_ref_exist") CC: stable@vger.kernel.org # 4.14+ Signed-off-by: ethanwu Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 9411ac07cd764be34bbd7ff09125a6b7b9175d4c Author: Sekhar Nori Date: Wed Apr 18 15:02:46 2018 +0530 ARM: davinci: fix GPIO lookup for I2C The GPIO chip is called davinci_gpio.0 in legacy mode. Fix it, so that I2C can correctly lookup the recovery gpios. Note that it is the gpio-davinci driver that sets the gpiochip label to davinci_gpio.0. Also, the I2C device uses an id of 1 on DM644x and DM355. While at it, convert to using GPIO_TO_PIN() for referring to GPIO pin numbers, like it is done in rest of the board support files. Fixes: e53537653791 ("i2c/ARM: davinci: Deep refactoring of I2C recovery") Reviewed-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/mach-davinci/board-dm355-evm.c | 9 ++++++--- arch/arm/mach-davinci/board-dm644x-evm.c | 10 +++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) commit 4842ed5bfcb9daf6660537d70503c18d38dbdbb8 Author: Greg Kroah-Hartman Date: Sun Apr 29 17:41:55 2018 +0200 USB: serial: visor: handle potential invalid device configuration If we get an invalid device configuration from a palm 3 type device, we might incorrectly parse things, and we have the potential to crash in "interesting" ways. Fix this up by verifying the size of the configuration passed to us by the device, and only if it is correct, will we handle it. Note that this also fixes an information leak of slab data. Reported-by: Andrey Konovalov Reviewed-by: Andrey Konovalov Signed-off-by: Greg Kroah-Hartman [ johan: add comment about the info leak ] Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/visor.c | 69 +++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 34 deletions(-) commit 4205cb01f6e9ef2ae6daa7be4e8ac1edeb4c9d64 Author: SZ Lin (林上智) Date: Thu Apr 26 14:28:31 2018 +0800 USB: serial: option: adding support for ublox R410M This patch adds support for ublox R410M PID 0x90b2 USB modem to option driver, this module supports LTE Cat M1 / NB1. Interface layout: 0: QCDM/DIAG 1: ADB 2: AT 3: RMNET Signed-off-by: SZ Lin (林上智) Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 5 +++++ 1 file changed, 5 insertions(+) commit f13876e2c33a657a71bcbb10f767c0951b165020 Author: Takashi Iwai Date: Wed May 2 08:48:46 2018 +0200 ALSA: pcm: Check PCM state at xfern compat ioctl Since snd_pcm_ioctl_xfern_compat() has no PCM state check, it may go further and hit the sanity check pcm_sanity_check() when the ioctl is called right after open. It may eventually spew a kernel warning, as triggered by syzbot, depending on kconfig. The lack of PCM state check there was just an oversight. Although it's no real crash, the spurious kernel warning is annoying, so let's add the proper check. Reported-by: syzbot+1dac3a4f6bc9c1c675d4@syzkaller.appspotmail.com Cc: Signed-off-by: Takashi Iwai sound/core/pcm_compat.c | 2 ++ 1 file changed, 2 insertions(+) commit 7d3af7d96af7b9f51e1ef67b6f4725f545737da2 Author: Dave Carroll Date: Wed Apr 25 10:24:20 2018 -0600 scsi: aacraid: Correct hba_send to include iu_type commit b60710ec7d7a ("scsi: aacraid: enable sending of TMFs from aac_hba_send()") allows aac_hba_send() to send scsi commands, and TMF requests, but the existing code only updates the iu_type for scsi commands. For TMF requests we are sending an unknown iu_type to firmware, which causes a fault. Include iu_type prior to determining the validity of the command Reported-by: Noah Misner Fixes: b60710ec7d7ab ("aacraid: enable sending of TMFs from aac_hba_send()") Fixes: 423400e64d377 ("aacraid: Include HBA direct interface") Tested-by: Noah Misner cc: stable@vger.kernel.org Signed-off-by: Dave Carroll Reviewed-by: Raghava Aditya Renukunta Reviewed-by: Brian King Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f4b024271ae3e9786e5d6f1c05b01b57a74e1d6d Author: Jim Gill Date: Fri Apr 20 19:04:47 2018 -0700 scsi: vmw-pvscsi: return DID_BUS_BUSY for adapter-initated aborts The vmw_pvscsi driver returns DID_ABORT for commands aborted internally by the adapter, leading to the filesystem going read-only. Change the result to DID_BUS_BUSY, causing the kernel to retry the command. Signed-off-by: Jim Gill Signed-off-by: Martin K. Petersen drivers/scsi/vmw_pvscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d618bdf71635463a4aa4ad0fe46ec852292bc0c Merge: f212599 330e261 Author: Linus Torvalds Date: Tue May 1 19:54:22 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel Pull hexagon fixes from Richard Kuo: "Some small fixes for module compilation" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel: hexagon: export csum_partial_copy_nocheck hexagon: add memset_io() helper commit 50a5852a657f793a8482fe3af4a141b460d3499e Author: John Hurley Date: Tue May 1 15:49:49 2018 -0700 nfp: flower: set tunnel ttl value to net default Firmware requires that the ttl value for an encapsulating ipv4 tunnel header be included as an action field. Prior to the support of Geneve tunnel encap (when ttl set was removed completely), ttl value was extracted from the tunnel key. However, tests have shown that this can still produce a ttl of 0. Fix the issue by setting the namespace default value for each new tunnel. Follow up patch for net-next will do a full route lookup. Fixes: 3ca3059dc3a9 ("nfp: flower: compile Geneve encap actions") Fixes: b27d6a95a70d ("nfp: compile flower vxlan tunnel set actions") Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/action.c | 10 ++++++++-- drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) commit c212d2c7fc4736d49be102fb7a1a545cdc2f1fea Author: Dave Watson Date: Tue May 1 13:05:39 2018 -0700 net/tls: Don't recursively call push_record during tls_write_space callbacks It is reported that in some cases, write_space may be called in do_tcp_sendpages, such that we recursively invoke do_tcp_sendpages again: [ 660.468802] ? do_tcp_sendpages+0x8d/0x580 [ 660.468826] ? tls_push_sg+0x74/0x130 [tls] [ 660.468852] ? tls_push_record+0x24a/0x390 [tls] [ 660.468880] ? tls_write_space+0x6a/0x80 [tls] ... tls_push_sg already does a loop over all sending sg's, so ignore any tls_write_space notifications until we are done sending. We then have to call the previous write_space to wake up poll() waiters after we are done with the send loop. Reported-by: Andre Tomt Signed-off-by: Dave Watson Signed-off-by: David S. Miller include/net/tls.h | 1 + net/tls/tls_main.c | 7 +++++++ 2 files changed, 8 insertions(+) commit f6eeb9e548572c0e64632672dbd04363cbdd4eed Author: Javier Martinez Canillas Date: Tue May 1 11:44:53 2018 -0700 Input: atmel_mxt_ts - add missing compatible strings to OF device table Commit af503716ac14 ("i2c: core: report OF style module alias for devices registered via OF") fixed how the I2C core reports the module alias when devices are registered via OF. But the atmel_mxt_ts driver only has an "atmel,maxtouch" compatible in its OF device ID table, so if a Device Tree is using a different one, autoload won't be working for the module (the matching works because the I2C device ID table is used as a fallback). So add compatible strings for each of the entries in the I2C device table. Fixes: af503716ac14 ("i2c: core: report OF style module alias for devices registered via OF") Reported-by: Enric Balletbo i Serra Signed-off-by: Javier Martinez Canillas Tested-by: Enric Balletbo i Serra Reviewed-by: Rob Herring [dtor: document which compatibles are deprecated and should not be used] Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/atmel,maxtouch.txt | 7 +++++++ drivers/input/touchscreen/atmel_mxt_ts.c | 5 +++++ 2 files changed, 12 insertions(+) commit a4e21ff8d9a311b16cfa9e41aed0c627a47149a4 Author: Song Liu Date: Tue May 1 10:20:24 2018 -0700 bpf: minor fix to selftest test_stacktrace_build_id() 1. remove useless parameter list to ./urandom_read 2. add missing "\n" to the end of an error message Fixes: 81f77fd0deeb ("bpf: add selftest for stackmap with BPF_F_STACK_BUILD_ID") Cc: Alexei Starovoitov Cc: Daniel Borkmann Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_progs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c964cfc612b59910593fa10ee1c2673db274c9c7 Merge: 6cc1eb5 5b33139 Author: Stephen Boyd Date: Tue May 1 14:44:16 2018 -0700 Merge tag 'meson-clk-fixes-4.17-1' of https://github.com/BayLibre/clk-meson into clk-fixes Pull meson clk fixes from Jerome Brunet: - fix typos in two meson8 clock names - remove unused clock ops declaration * tag 'meson-clk-fixes-4.17-1' of https://github.com/BayLibre/clk-meson: clk: meson: meson8b: fix meson8b_cpu_clk parent clock name clk: meson: meson8b: fix meson8b_fclk_div3_div clock name clk: meson: drop meson_aoclk_gate_regmap_ops commit 602805fb618b018b7a41fbb3f93c1992b078b1ae Author: Kamal Dasu Date: Thu Apr 26 14:48:01 2018 -0400 spi: bcm-qspi: Always read and set BSPI_MAST_N_BOOT_CTRL Always confirm the BSPI_MAST_N_BOOT_CTRL bit when enabling or disabling BSPI transfers. Fixes: 4e3b2d236fe00 ("spi: bcm-qspi: Add BSPI spi-nor flash controller driver") Signed-off-by: Kamal Dasu Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-bcm-qspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5eb9a07a4ae1008b67d8bcd47bddb3dae97456b7 Author: Kamal Dasu Date: Thu Apr 26 14:48:00 2018 -0400 spi: bcm-qspi: Avoid setting MSPI_CDRAM_PCS for spi-nor master Added fix for probing of spi-nor device non-zero chip selects. Set MSPI_CDRAM_PCS (peripheral chip select) with spi master for MSPI controller and not for MSPI/BSPI spi-nor master controller. Ensure setting of cs bit in chip select register on chip select change. Fixes: fa236a7ef24048 ("spi: bcm-qspi: Add Broadcom MSPI driver") Signed-off-by: Kamal Dasu Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-bcm-qspi.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 330e261c35dfb969c48f996dbbc8b334b5ee8d9d Author: Arnd Bergmann Date: Fri Apr 6 16:28:23 2018 +0200 hexagon: export csum_partial_copy_nocheck This is needed to link ipv6 as a loadable module, which in turn happens in allmodconfig. Signed-off-by: Arnd Bergmann Signed-off-by: Richard Kuo arch/hexagon/lib/checksum.c | 1 + 1 file changed, 1 insertion(+) commit a57ab96ef9dde231d4d46edba4d5f73720edc16a Author: Arnd Bergmann Date: Fri Apr 6 16:28:22 2018 +0200 hexagon: add memset_io() helper We already have memcpy_toio(), but not memset_io(), so let's add the obvious version to allow building an allmodconfig kernel without errors like drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_bo_move_memcpy': drivers/gpu/drm/ttm/ttm_bo_util.c:390:3: error: implicit declaration of function 'memset_io' [-Werror=implicit-function-declaration] Signed-off-by: Arnd Bergmann Signed-off-by: Richard Kuo arch/hexagon/include/asm/io.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 068bdb67ef74df0ad1627b7247a163e3e252ac11 Author: Nick Dyer Date: Tue May 1 11:40:18 2018 -0700 Input: atmel_mxt_ts - fix the firmware update The automatic update mechanism will trigger an update if the info block CRCs are different between maxtouch configuration file (maxtouch.cfg) and chip. The driver compared the CRCs without retrieving the chip CRC, resulting always in a failure and firmware flashing action triggered. Fix this issue by retrieving the chip info block CRC before the check. Note that this solution has the benefit that by reading the information block and the object table into a contiguous region of memory, we can verify the checksum at probe time. This means we make sure that we are indeed talking to a chip that supports object protocol correctly. Using this patch on a kevin chromebook, the touchscreen and touchpad drivers are able to match the CRC: atmel_mxt_ts 3-004b: Family: 164 Variant: 14 Firmware V2.3.AA Objects: 40 atmel_mxt_ts 5-004a: Family: 164 Variant: 17 Firmware V2.0.AA Objects: 31 atmel_mxt_ts 3-004b: Resetting device atmel_mxt_ts 5-004a: Resetting device atmel_mxt_ts 3-004b: Config CRC 0x573E89: OK atmel_mxt_ts 3-004b: Touchscreen size X4095Y2729 input: Atmel maXTouch Touchscreen as /devices/platform/ff130000.i2c/i2c-3/3-004b/input/input5 atmel_mxt_ts 5-004a: Config CRC 0x0AF6BA: OK atmel_mxt_ts 5-004a: Touchscreen size X1920Y1080 input: Atmel maXTouch Touchpad as /devices/platform/ff140000.i2c/i2c-5/5-004a/input/input6 Signed-off-by: Nick Dyer Acked-by: Benson Leung [Ezequiel: minor patch massage] Signed-off-by: Ezequiel Garcia Tested-by: Sebastian Reichel Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/atmel_mxt_ts.c | 186 ++++++++++++++++++------------- 1 file changed, 110 insertions(+), 76 deletions(-) commit f372b81101e6895252298e563d634d5e44ae81e7 Author: Vittorio Gambaletta (VittGam) Date: Wed Apr 25 15:22:13 2018 -0700 Input: atmel_mxt_ts - add touchpad button mapping for Samsung Chromebook Pro This patch adds the correct platform data information for the Caroline Chromebook, so that the mouse button does not get stuck in pressed state after the first click. The Samus button keymap and platform data definition are the correct ones for Caroline, so they have been reused here. Signed-off-by: Vittorio Gambaletta Signed-off-by: Salvatore Bellizzi Tested-by: Guenter Roeck Cc: stable@vger.kernel.org [dtor: adjusted vendor spelling to match shipping firmware] Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/atmel_mxt_ts.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit edd7ceb78296fb1574958991b6655c3c2cedf124 Author: Thomas Winter Date: Tue May 1 09:15:29 2018 +1200 ipv6: Allow non-gateway ECMP for IPv6 It is valid to have static routes where the nexthop is an interface not an address such as tunnels. For IPv4 it was possible to use ECMP on these routes but not for IPv6. Signed-off-by: Thomas Winter Cc: David Ahern Cc: "David S. Miller" Cc: Alexey Kuznetsov Cc: Hideaki YOSHIFUJI Acked-by: David Ahern Signed-off-by: David S. Miller include/net/ip6_route.h | 3 +-- net/ipv6/ip6_fib.c | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) commit d656fe49e33df48ee6bc19e871f5862f49895c9e Author: Wenwen Wang Date: Mon Apr 30 12:31:13 2018 -0500 ethtool: fix a potential missing-check bug In ethtool_get_rxnfc(), the object "info" is firstly copied from user-space. If the FLOW_RSS flag is set in the member field flow_type of "info" (and cmd is ETHTOOL_GRXFH), info needs to be copied again from user-space because FLOW_RSS is newer and has new definition, as mentioned in the comment. However, given that the user data resides in user-space, a malicious user can race to change the data after the first copy. By doing so, the user can inject inconsistent data. For example, in the second copy, the FLOW_RSS flag could be cleared in the field flow_type of "info". In the following execution, "info" will be used in the function ops->get_rxnfc(). Such inconsistent data can potentially lead to unexpected information leakage since ops->get_rxnfc() will prepare various types of data according to flow_type, and the prepared data will be eventually copied to user-space. This inconsistent data may also cause undefined behaviors based on how ops->get_rxnfc() is implemented. This patch simply re-verifies the flow_type field of "info" after the second copy. If the value is not as expected, an error code will be returned. Signed-off-by: Wenwen Wang Signed-off-by: David S. Miller net/core/ethtool.c | 5 +++++ 1 file changed, 5 insertions(+) commit 26ff75857e5953720409ea531d42f902defb130a Author: Colin Ian King Date: Mon Apr 30 17:29:45 2018 +0100 net/mlx4: fix spelling mistake: "failedi" -> "failed" trivial fix to spelling mistake in mlx4_warn message. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de08481a253ac658433a8304a303ce9f018d71e5 Author: Michael S. Tsirkin Date: Fri Apr 27 19:02:05 2018 +0300 vhost: make msg padding explicit There's a 32 bit hole just after type. It's best to give it a name, this way compiler is forced to initialize it with rest of the structure. Reported-by: Kevin Easton Signed-off-by: Michael S. Tsirkin Signed-off-by: David S. Miller include/uapi/linux/vhost.h | 1 + 1 file changed, 1 insertion(+) commit 98eb6cf25f0317395d9a799d18f3d46ba26a00d3 Author: Chuck Lever Date: Tue May 1 11:37:19 2018 -0400 sunrpc: Fix latency trace point crashes If the rpc_task survived longer than the transport, task->tk_xprt points to freed memory by the time rpc_count_iostats_metrics runs. Replace the references to task->tk_xprt with references to the task's tk_client. Reported-by: syzbot+27db1f90e2b972a5f2d3@syzkaller.appspotmail.com Fixes: 40bf7eb304b5 ('sunrpc: Add static trace point to report ...') Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/trace/events/sunrpc.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 7e437d61514bc3e05167da263977e3cdd698f08a Author: Colin Ian King Date: Sun Apr 29 13:01:11 2018 +0100 ata: fix spelling mistake: "directon" -> "direction" Trivial fix to spelling mistake in sil24_cerr_info message text Signed-off-by: Colin Ian King Signed-off-by: Tejun Heo drivers/ata/sata_sil24.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 054f155721d7af1f343ed52bea246626d8450ca8 Author: Chuck Lever Date: Tue May 1 11:37:14 2018 -0400 xprtrdma: Fix list corruption / DMAR errors during MR recovery The ro_release_mr methods check whether mr->mr_list is empty. Therefore, be sure to always use list_del_init when removing an MR linked into a list using that field. Otherwise, when recovering from transport failures or device removal, list corruption can result, or MRs can get mapped or unmapped an odd number of times, resulting in IOMMU-related failures. In general this fix is appropriate back to v4.8. However, code changes since then make it impossible to apply this patch directly to stable kernels. The fix would have to be applied by hand or reworked for kernels earlier than v4.16. Backport guidance -- there are several cases: - When creating an MR, initialize mr_list so that using list_empty on an as-yet-unused MR is safe. - When an MR is being handled by the remote invalidation path, ensure that mr_list is reinitialized when it is removed from rl_registered. - When an MR is being handled by rpcrdma_destroy_mrs, it is removed from mr_all, but it may still be on an rl_registered list. In that case, the MR needs to be removed from that list before being released. - Other cases are covered by using list_del_init in rpcrdma_mr_pop. Fixes: 9d6b04097882 ('xprtrdma: Place registered MWs on a ... ') Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/fmr_ops.c | 5 +---- net/sunrpc/xprtrdma/frwr_ops.c | 9 +++------ net/sunrpc/xprtrdma/verbs.c | 5 +++++ net/sunrpc/xprtrdma/xprt_rdma.h | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) commit bf2acc943a45d2b2e8a9f1a5ddff6b6e43cc69d9 Author: Eric Dumazet Date: Sun Apr 29 18:55:20 2018 -0700 tcp: fix TCP_REPAIR_QUEUE bound checking syzbot is able to produce a nasty WARN_ON() in tcp_verify_left_out() with following C-repro : socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3 setsockopt(3, SOL_TCP, TCP_REPAIR, [1], 4) = 0 setsockopt(3, SOL_TCP, TCP_REPAIR_QUEUE, [-1], 4) = 0 bind(3, {sa_family=AF_INET, sin_port=htons(20002), sin_addr=inet_addr("0.0.0.0")}, 16) = 0 sendto(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1242, MSG_FASTOPEN, {sa_family=AF_INET, sin_port=htons(20002), sin_addr=inet_addr("127.0.0.1")}, 16) = 1242 setsockopt(3, SOL_TCP, TCP_REPAIR_WINDOW, "\4\0\0@+\205\0\0\377\377\0\0\377\377\377\177\0\0\0\0", 20) = 0 writev(3, [{"\270", 1}], 1) = 1 setsockopt(3, SOL_TCP, TCP_REPAIR_OPTIONS, "\10\0\0\0\0\0\0\0\0\0\0\0|\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 386) = 0 writev(3, [{"\210v\r[\226\320t\231qwQ\204\264l\254\t\1\20\245\214p\350H\223\254;\\\37\345\307p$"..., 3144}], 1) = 3144 The 3rd system call looks odd : setsockopt(3, SOL_TCP, TCP_REPAIR_QUEUE, [-1], 4) = 0 This patch makes sure bound checking is using an unsigned compare. Fixes: ee9952831cfd ("tcp: Initial repair mode") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Pavel Emelyanov Signed-off-by: David S. Miller net/ipv4/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cea67a2dd6b2419dcc13a39309b9a79a1f773193 Author: Eric Dumazet Date: Sun Apr 29 09:54:59 2018 -0700 ipv6: fix uninit-value in ip6_multipath_l3_keys() syzbot/KMSAN reported an uninit-value in ip6_multipath_l3_keys(), root caused to a bad assumption of ICMP header being already pulled in skb->head ip_multipath_l3_keys() does the correct thing, so it is an IPv6 only bug. BUG: KMSAN: uninit-value in ip6_multipath_l3_keys net/ipv6/route.c:1830 [inline] BUG: KMSAN: uninit-value in rt6_multipath_hash+0x5c4/0x640 net/ipv6/route.c:1858 CPU: 0 PID: 4507 Comm: syz-executor661 Not tainted 4.16.0+ #87 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:683 ip6_multipath_l3_keys net/ipv6/route.c:1830 [inline] rt6_multipath_hash+0x5c4/0x640 net/ipv6/route.c:1858 ip6_route_input+0x65a/0x920 net/ipv6/route.c:1884 ip6_rcv_finish+0x413/0x6e0 net/ipv6/ip6_input.c:69 NF_HOOK include/linux/netfilter.h:288 [inline] ipv6_rcv+0x1e16/0x2340 net/ipv6/ip6_input.c:208 __netif_receive_skb_core+0x47df/0x4a90 net/core/dev.c:4562 __netif_receive_skb net/core/dev.c:4627 [inline] netif_receive_skb_internal+0x49d/0x630 net/core/dev.c:4701 netif_receive_skb+0x230/0x240 net/core/dev.c:4725 tun_rx_batched drivers/net/tun.c:1555 [inline] tun_get_user+0x740f/0x7c60 drivers/net/tun.c:1962 tun_chr_write_iter+0x1d4/0x330 drivers/net/tun.c:1990 call_write_iter include/linux/fs.h:1782 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x7fb/0x9f0 fs/read_write.c:482 vfs_write+0x463/0x8d0 fs/read_write.c:544 SYSC_write+0x172/0x360 fs/read_write.c:589 SyS_write+0x55/0x80 fs/read_write.c:581 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Fixes: 23aebdacb05d ("ipv6: Compute multipath hash for ICMP errors from offending packet") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Jakub Sitnicki Acked-by: Jakub Sitnicki Signed-off-by: David S. Miller net/ipv6/route.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit f2125992e7cb25ece668cb7af2bd8433715827d1 Merge: fff75eb 7b38460 Author: Linus Torvalds Date: Tue May 1 09:11:45 2018 -0700 Merge tag 'xfs-4.17-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "Here are a few more bug fixes for xfs for 4.17-rc4. Most of them are fixes for bad behavior. This series has been run through a full xfstests run during LSF and through a quick xfstests run against this morning's master, with no major failures reported. Summary: - Enhance inode fork verifiers to prevent loading of corrupted metadata. - Fix a crash when we try to convert extents format inodes to btree format, we run out of space, but forget to revert the in-core state changes. - Fix file size checks when doing INSERT_RANGE that could cause files to end up negative size if there previously was an extent mapped at s_maxbytes. - Fix a bug when doing a remove-then-add ATTR_REPLACE xattr update where we forget to clear ATTR_REPLACE after the remove, which causes the attr to be lost and the fs to shut down due to (what it thinks is) inconsistent in-core state" * tag 'xfs-4.17-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: don't fail when converting shortform attr to long form during ATTR_REPLACE xfs: prevent creating negative-sized file via INSERT_RANGE xfs: set format back to extents if xfs_bmap_extents_to_btree xfs: enhance dinode verifier commit 30443b3104527c83102fa85347ae4bf21caaf77a Author: Adam Ford Date: Mon Apr 30 12:47:48 2018 -0500 ARM: dts: logicpd-som-lv: Fix pinmux controller references The pinmux controllers do not themselves need references to 'pinctrl-names' or 'pinctrl-0' This patch removes some unnecessary typos. Fixes: 89077c7145c3 ("ARM: dts: Add HSUSB2 EHCI Support to Logic PD DM37xx SOM-LV") Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-som-lv.dtsi | 4 ---- 1 file changed, 4 deletions(-) commit 95e59fc3c3fa3187a07a75f40b21637deb4bd12d Author: Adam Ford Date: Tue May 1 08:58:53 2018 -0500 ARM: dts: logicpd-som-lv: Fix Audio Mute The Audio has worked, but the mute pin has a weak pulldown which alows some of the audio signal to pass very quietly. This patch fixes that so the mute pin is actively driven high for mute or low for normal operation. Fixes: ab8dd3aed011 ("ARM: DTS: Add minimal Support for Logic PD DM3730 SOM-LV") Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-som-lv.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 189822cbcbf3ea37c26a15612d8f922c440bc0e0 Author: Adam Ford Date: Mon Apr 30 18:24:34 2018 -0500 ARM: dts: logicpd-som-lv: Fix WL127x Startup Issues The VAUX3 rail from the PMIC powers a clock driver which clocks the WL127x. This corrects a bug which did not correctly associate the vin-supply with the proper power rail. This also fixes a typo in the pinmuxing to properly configure the interrupt pin. Fixes: ab8dd3aed011 ("ARM: DTS: Add minimal Support for Logic PD DM3730 SOM-LV") Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-som-lv.dtsi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 33e9572483031a79ad0a4468064675144d9269ec Author: Tero Kristo Date: Fri Mar 9 11:50:20 2018 +0200 ARM: OMAP2+: powerdomain: use raw_smp_processor_id() for trace smp_processor_id() checks preemption if CONFIG_DEBUG_PREEMPT is enabled, causing a warning dump during boot: [ 5.042377] BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1 [ 5.050281] caller is pwrdm_set_next_pwrst+0x48/0x88 [ 5.055330] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.24-g57341df0b4 #1 Use the raw_smp_processor_id() for the trace instead, this value does not need to be perfectly correct. The alternative of disabling preempt is too heavy weight operation to be applied in PM hot path for just tracing purposes. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/powerdomain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f130307054a59ca21d2396f386be77ebd2e8ca96 Author: Geert Uytterhoeven Date: Wed Apr 25 09:49:38 2018 +0200 dt-bindings: panel: lvds: Fix path to display timing bindings Fixes: 14da3ed8dd08c581 ("devicetree/bindings: display: Document common panel properties") Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Rob Herring Documentation/devicetree/bindings/display/panel/panel-common.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b240e44d08c4a94faf3ed02c04c16b52fc045de Author: Geert Uytterhoeven Date: Mon Apr 23 09:35:16 2018 +0200 dt-bindings: mvebu-uart: DT fix s/interrupts-names/interrupt-names/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring Documentation/devicetree/bindings/serial/mvebu-uart.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c054de228dd6d97bf8e38962bd118953b66e5a0 Author: Sekhar Nori Date: Wed Apr 25 14:53:23 2018 +0530 ARM: davinci: board-dm355-evm: fix broken networking Since commit 09f3756bb9a8 ("dm9000: Return an ERR_PTR() in all error conditions of dm9000_parse_dt()"), passing either non-NULL platform data or device-tree for dm9000 driver to probe is mandatory. DM335 board was using none, so networking failed to initialize. Fix it by passing non-NULL (but empty) platform data. Fixes: 09f3756bb9a8 ("dm9000: Return an ERR_PTR() in all error conditions of dm9000_parse_dt()") Signed-off-by: Sekhar Nori arch/arm/mach-davinci/board-dm355-evm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d45622c0eaa5992a1a2248cbe93e1ff7a2da7be4 Author: Sekhar Nori Date: Tue Apr 24 20:05:06 2018 +0530 ARM: davinci: board-omapl138-hawk: fix GPIO numbers for MMC/SD lookup commit c4dc56be7e26 ("ARM: davinci: fix the GPIO lookup for omapl138-hawk") fixed the GPIO chip name for look-up of MMC/SD CD and WP pins, but forgot to change the GPIO numbers passed. The GPIO numbers are not offsets from within a 32 GPIO bank. Fix the GPIO numbers as well as remove the misleading comment. Fixes: c4dc56be7e26 ("ARM: davinci: fix the GPIO lookup for omapl138-hawk") Reviewed-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/mach-davinci/board-omapl138-hawk.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 67c6b6ff221f807180aea6dd597246f87e1dd98a Author: Sekhar Nori Date: Tue Apr 24 20:05:04 2018 +0530 ARM: davinci: board-da850-evm: fix GPIO lookup for MMC/SD The GPIO chip is called davinci_gpio.0 in legacy mode. Fix it, so that mmc can correctly lookup the wp and cp gpios. Also fix the GPIO numbers as they are not offsets within a bank. Note that it is the gpio-davinci driver that sets the gpiochip label to davinci_gpio.0. Fixes: bdf0e8364fd3 ("ARM: davinci: da850-evm: use gpio descriptor for mmc pins") Reviewed-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/mach-davinci/board-da850-evm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 51e9f12163223546bd3aa9f7af6817931f980da8 Author: Sekhar Nori Date: Tue Apr 24 20:05:03 2018 +0530 ARM: davinci: board-da830-evm: fix GPIO lookup for MMC/SD The GPIO chip is called davinci_gpio.0 in legacy mode. Fix it, so that mmc can correctly lookup the wp and cp gpios. Also fix the GPIO numbers as they are not offsets within a bank. Note that it is the gpio-davinci driver that sets the gpiochip label to davinci_gpio.0. Fixes: b5e1438cf98a ("ARM: davinci: da830-evm: use gpio descriptor for mmc pins") Reported-by: David Lechner Reviewed-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/mach-davinci/board-da830-evm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 05c58752f9dce11e396676eb731a620541590ed0 Author: CHANDAN VN Date: Mon Apr 30 09:50:18 2018 +0530 arm64: To remove initrd reserved area entry from memblock INITRD reserved area entry is not removed from memblock even though initrd reserved area is freed. After freeing the memory it is released from memblock. The same can be checked from /sys/kernel/debug/memblock/reserved. The patch makes sure that the initrd entry is removed from memblock when keepinitrd is not enabled. The patch only affects accounting and debugging. This does not fix any memory leak. Acked-by: Laura Abbott Signed-off-by: CHANDAN VN Signed-off-by: Will Deacon arch/arm64/mm/init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fff75eb2a08c2ac96404a2d79685668f3cf5a7a3 Merge: 8188fc8 b4678df Author: Linus Torvalds Date: Mon Apr 30 16:53:40 2018 -0700 Merge tag 'errseq-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull errseq infrastructure fix from Jeff Layton: "The PostgreSQL developers recently had a spirited discussion about the writeback error handling in Linux, and reached out to us about a behavoir change to the code that bit them when the errseq_t changes were merged. When we changed to using errseq_t for tracking writeback errors, we lost the ability for an application to see a writeback error that occurred before the open on which the fsync was issued. This was problematic for PostgreSQL which offloads fsync calls to a completely separate process from the DB writers. This patch restores that ability. If the errseq_t value in the inode does not have the SEEN flag set, then we just return 0 for the sample. That ensures that any recorded error is always delivered at least once. Note that we might still lose the error if the inode gets evicted from the cache before anything can reopen it, but that was the case before errseq_t was merged. At LSF/MM we had some discussion about keeping inodes with unreported writeback errors around in the cache for longer (possibly indefinitely), but that's really a separate problem" * tag 'errseq-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: errseq: Always report a writeback error once commit 3d97c829edd43262e7e9d720fa82c2241ba685a3 Author: Mike Snitzer Date: Mon Apr 30 16:06:28 2018 -0400 dm: fix some sparse warnings and whitespace in dax methods Eliminate these sparse warnings: drivers/md/dm.c:1062:9: warning: context imbalance in 'dm_dax_direct_access' - unexpected unlock drivers/md/dm.c:1086:9: warning: context imbalance in 'dm_dax_copy_from_iter' - unexpected unlock Signed-off-by: Mike Snitzer drivers/md/dm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8188fc8bef8c677d28a9dbbd2db6deaee1644180 Merge: 6da6c0d 00ad691 Author: Linus Torvalds Date: Mon Apr 30 13:27:16 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc - Fixup license text for oradax driver, from Rob Gardner. - Release device object with put_device() instead of straight kfree(), from Arvind Yadav. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc: vio: use put_device() instead of kfree() sparc64: Fix mistake in oradax license text commit 00ad691ab140b54ab9f5de5e74cb994f552e8124 Author: Arvind Yadav Date: Wed Apr 25 20:26:14 2018 +0530 sparc: vio: use put_device() instead of kfree() Never directly free @dev after calling device_register(), even if it returned an error. Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller arch/sparc/kernel/vio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3c68d0b4183ddfa05577348a231dd117e6563df Author: Rob Gardner Date: Fri Apr 20 12:48:25 2018 -0600 sparc64: Fix mistake in oradax license text The license text in both oradax files mistakenly specifies "version 3" of the GNU General Public License. This is corrected to specify "version 2". Signed-off-by: Rob Gardner Signed-off-by: Jonathan Helman Signed-off-by: David S. Miller arch/sparc/include/uapi/asm/oradax.h | 2 +- drivers/sbus/char/oradax.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 280884fadc5bd81628da3f158ae6821ea7386432 Author: Mike Snitzer Date: Mon Apr 30 15:40:40 2018 -0400 dm cache background tracker: fix sparse warning Fix drivers/md/dm-cache-background-tracker.c:169:16: warning: symbol 'alloc_work' was not declared. Should it be static? Signed-off-by: Mike Snitzer drivers/md/dm-cache-background-tracker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7aef1c207092770d06d0df21dceafdca2b49c39 Author: Boris Brezillon Date: Mon Apr 30 15:32:32 2018 +0200 drm/vc4: Make sure vc4_bo_{inc,dec}_usecnt() calls are balanced Commit b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl") introduced a mechanism to mark some BOs as purgeable to allow the driver to drop them under memory pressure. In order to implement this feature we had to add a mechanism to mark BOs as currently used by a piece of hardware which materialized through the ->usecnt counter. Plane code is supposed to increment usecnt when it attaches a BO to a plane and decrement it when it's done with this BO, which was done in the ->prepare_fb() and ->cleanup_fb() hooks. The problem is, async page flip logic does not go through the regular atomic update path, and ->prepare_fb() and ->cleanup_fb() are not called in this case. Fix that by manually calling vc4_bo_{inc,dec}_usecnt() in the async-page-flip path. Note that all this should go away as soon as we get generic async page flip support in the core, in the meantime, this fix should do the trick. Fixes: b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl") Reported-by: Peter Robinson Cc: Signed-off-by: Boris Brezillon Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180430133232.32457-1-boris.brezillon@bootlin.com Link: https://patchwork.freedesktop.org/patch/msgid/20180430133232.32457-1-boris.brezillon@bootlin.com drivers/gpu/drm/vc4/vc4_crtc.c | 46 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) commit db82476f37413eaeff5f836a9d8b022d6544accf Author: Håkon Bugge Date: Wed Apr 18 16:24:50 2018 +0200 IB/core: Make ib_mad_client_id atomic Currently, the kernel protects access to the agent ID allocator on a per port basis using a spinlock, so it is impossible for two apps/threads on the same port to get the same TID, but it is entirely possible for two threads on different ports to end up with the same TID. As this can be confusing (regardless of it being legal according to the IB Spec 1.3, C13-18.1.1, in section 13.4.6.4 - TransactionID usage), and as the rdma-core user space API for /dev/umad devices implies unique TIDs even across ports, make the TID an atomic type so that no two allocations, regardless of port number, will be the same. Signed-off-by: Håkon Bugge Reviewed-by: Jack Morgenstein Reviewed-by: Ira Weiny Reviewed-by: Zhu Yanjun Signed-off-by: Doug Ledford drivers/infiniband/core/mad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9aea9b6cc78d2b99b23d84fb2e0bc6e464c6569e Author: Bin Liu Date: Mon Apr 30 11:20:54 2018 -0500 usb: musb: trace: fix NULL pointer dereference in musb_g_tx() The usb_request pointer could be NULL in musb_g_tx(), where the tracepoint call would trigger the NULL pointer dereference failure when parsing the members of the usb_request pointer. Move the tracepoint call to where the usb_request pointer is already checked to solve the issue. Fixes: fc78003e5345 ("usb: musb: gadget: add usb-request tracepoints") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_gadget.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2b63f1329df2cd814c1f8353fae4853ace6521d1 Author: Bin Liu Date: Mon Apr 30 11:20:53 2018 -0500 usb: musb: host: fix potential NULL pointer dereference musb_start_urb() doesn't check the pass-in parameter if it is NULL. But in musb_bulk_nak_timeout() the parameter passed to musb_start_urb() is returned from first_qh(), which could be NULL. So wrap the musb_start_urb() call here with a if condition check to avoid the potential NULL pointer dereference. Fixes: f283862f3b5c ("usb: musb: NAK timeout scheme on bulk TX endpoint") Cc: stable@vger.kernel.org # v3.7+ Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_host.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d66a270be3310d7aa132fec0cea77d3d32a0ff75 Author: Mathieu Desnoyers Date: Thu Mar 15 08:44:24 2018 -0400 tracepoint: Do not warn on ENOMEM Tracepoint should only warn when a kernel API user does not respect the required preconditions (e.g. same tracepoint enabled twice, or called to remove a tracepoint that does not exist). Silence warning in out-of-memory conditions, given that the error is returned to the caller. This ensures that out-of-memory error-injection testing does not trigger warnings in tracepoint.c, which were seen by syzbot. Link: https://lkml.kernel.org/r/001a114465e241a8720567419a72@google.com Link: https://lkml.kernel.org/r/001a1140e0de15fc910567464190@google.com Link: http://lkml.kernel.org/r/20180315124424.32319-1-mathieu.desnoyers@efficios.com CC: Peter Zijlstra CC: Jiri Olsa CC: Arnaldo Carvalho de Melo CC: Alexander Shishkin CC: Namhyung Kim CC: stable@vger.kernel.org Fixes: de7b2973903c6 ("tracepoint: Use struct pointer instead of name hash for reg/unreg tracepoints") Reported-by: syzbot+9c0d616860575a73166a@syzkaller.appspotmail.com Reported-by: syzbot+4e9ae7fa46233396f64d@syzkaller.appspotmail.com Signed-off-by: Mathieu Desnoyers Signed-off-by: Steven Rostedt (VMware) kernel/tracepoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7879b4cea4b7867e7382efdbd805fbe35835337 Author: Mikulas Patocka Date: Thu Apr 19 08:33:00 2018 -0400 dm bufio: fix buffer alignment Commit 6b5e718cc138 ("dm bufio: relax alignment constraint on slab cache") relaxed alignment on dm-bufio cache, however it may break dm-crypt or dm-integrity. dm-crypt and dm-integrity require that the size of bio vector entries (bv_len) is aligned on its sector size. bv_offset doesn't have to be aligned, but bv_len must be. XFS sends unaligned bios, but they do not cross page boundary, so the requirement for aligned bv_len is met. Commit 6b5e718cc138 made dm-bufio send unaligned bios that cross page boundary, this could break dm-crypt and dm-integrity. Reinstates the alignment. Note that misaligned entries only happen when we use slab/slub debugging. Without debugging, the entries are always aligned. Fixes: 6b5e718cc138 ("dm bufio: relax alignment constraint on slab cache") Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fc8cec113904a47396bf0a1afc62920d66319d36 Author: Mikulas Patocka Date: Tue Apr 17 18:32:26 2018 -0400 dm integrity: use kvfree for kvmalloc'd memory Use kvfree instead of kfree because the array is allocated with kvmalloc. Fixes: 7eada909bfd7a ("dm: add integrity target") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 328da89950c69828448528e4c769504a81a32d06 Merge: 6da6c0d ed76952 Author: Greg Kroah-Hartman Date: Mon Apr 30 08:49:58 2018 -0700 Merge tag 'fixes-for-v4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.17-rc3 Not much this time around: A list_del corruption on dwc3_ep_dequeue(), sparse warning fix also on dwc3, build issues with f_phonet. Apart from these three, some other minor fixes. Signed-off-by: Felipe Balbi commit f944ad1b2b66bbec8ffc1d6d0a45565b12846308 Author: Colin Ian King Date: Sat Apr 28 10:57:07 2018 +0100 net: ethernet: ucc: fix spelling mistake: "tx-late-collsion" -> "tx-late-collision" Trivial fix to spelling mistake in tx_fw_stat_gstrings text Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/freescale/ucc_geth_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff81de73e4284649e78df1df0f63e2670ad87e7f Author: Colin Ian King Date: Sat Apr 28 10:43:20 2018 +0100 qed: fix spelling mistake: "checksumed" -> "checksummed" Trivial fix to spelling mistake in DP_INFO message text Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 596b07a9a22656493726edf1739569102bd3e136 Author: Hans de Goede Date: Thu Apr 26 20:52:06 2018 +0200 Bluetooth: btusb: Add Dell XPS 13 9360 to btusb_needs_reset_resume_table The Dell XPS 13 9360 uses a QCA Rome chip which needs to be reset (and have its firmware reloaded) for bluetooth to work after suspend/resume. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1514836 Cc: stable@vger.kernel.org Cc: Garrett LeSage Reported-and-tested-by: Garrett LeSage Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7781edaed63e9396fc913e0899cb197562e6f1a0 Author: Hans de Goede Date: Sun Apr 22 19:58:00 2018 +0200 i2c: core: ACPI: Log device not acking errors at dbg loglevel Unfortunately some DSDTs issue bogus i2c reads to non existing devices resulting in -EREMOTEIO errors because the non existing device of course does not ack. This happens e.g. from the The Asus T100TA's _BIX method, the DSDT on the T100TA defines 2 resources on the I2C1 bus: Name (EHID, ResourceTemplate () { I2cSerialBusV2 (0x005B, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.I2C1", 0x00, ResourceConsumer, , Exclusive, ) }) OperationRegion (EHOR, GenericSerialBus, Zero, 0x0100) Field (EHOR, BufferAcc, NoLock, Preserve) { Connection (EHID), Offset (0x01), AccessAs (BufferAcc, AttribBytes (0x10)), ABCD, 8 } Name (UMPC, ResourceTemplate () { I2cSerialBusV2 (0x0066, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.I2C1", 0x00, ResourceConsumer, , Exclusive, ) }) The _BIX method does a single read (on each BIX() call) from the EHID device through the ABCD Field, only to completely ignore the result. This read always fails as there is no i2c client at address 0x5b. The _BIX method also does several reads from the UMPC device and actually uses the results of those to provide battery information. IIRC I've also seen some DSTDs which do an i2c read to detect if a device is present, also leading to false positive errors being logged. Esp. the _BIX use is problematic as the _BIX method gets called periodically to monitor battery status. This commit stops the logs from filling up with errors like these: [ 57.327858] i2c i2c-0: i2c read 16 bytes from client@0x5b starting at reg 0x1 failed, error: -121 Signed-off-by: Hans de Goede Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-acpi.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit c8016fa215d2d50920a58de07da2d00f7cb982f3 Author: Hans de Goede Date: Sun Apr 22 19:57:59 2018 +0200 i2c: core: ACPI: Improve OpRegion read errors When we get an error doing an ACPI SerialBus I2C OpRegion read log some useful details, like the client address and which register is being read. Signed-off-by: Hans de Goede Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fc54910280eb38bde923cdf0898e74687d8e6989 Author: Hans de Goede Date: Fri Apr 27 11:26:43 2018 +0200 Bluetooth: btusb: Only check needs_reset_resume DMI table for QCA rome chipsets Jeremy Cline correctly points out in rhbz#1514836 that a device where the QCA rome chipset needs the USB_QUIRK_RESET_RESUME quirk, may also ship with a different wifi/bt chipset in some configurations. If that is the case then we are needlessly penalizing those other chipsets with a reset-resume quirk, typically causing 0.4W extra power use because this disables runtime-pm. This commit moves the DMI table check to a btusb_check_needs_reset_resume() helper (so that we can easily also call it for other chipsets) and calls this new helper only for QCA_ROME chipsets for now. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1514836 Cc: stable@vger.kernel.org Cc: Jeremy Cline Suggested-by: Jeremy Cline Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 544a591668813583021474fa5c7ff4942244d654 Author: Hans de Goede Date: Thu Apr 26 14:18:19 2018 +0200 Revert "Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174" Commit f44cb4b19ed4 ("Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174") is causing bluetooth to no longer work for several people, see: https://bugzilla.redhat.com/show_bug.cgi?id=1568911 So lets revert it for now and try to find another solution for devices which need the modified quirk. Cc: stable@vger.kernel.org Cc: Takashi Iwai Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e026646c178d8292de563fbecc247bada059c282 Author: William Breathitt Gray Date: Fri Apr 20 09:50:20 2018 -0400 gpio: pcie-idio-24: Fix off-by-one error in get_multiple loop The PCIe-IDIO-24 features 8 bits of TTL GPIO which may be configured for output or input. This patch fixes an off-by-one error in the loop conditional for the get_multiple callback so that the TTL GPIO are handled. Fixes: ca37081595a2 ("gpio: pcie-idio-24: Implement get_multiple/set_multiple callbacks") Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-pcie-idio-24.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4f3388afd488ed15368fa7413b8bd6d1f98bb1d Author: Prashanth Prakash Date: Fri Apr 27 11:35:27 2018 -0600 cpufreq / CPPC: Set platform specific transition_delay_us Add support to specify platform specific transition_delay_us instead of using the transition delay derived from PCC. With commit 3d41386d556d (cpufreq: CPPC: Use transition_delay_us depending transition_latency) we are setting transition_delay_us directly and not applying the LATENCY_MULTIPLIER. Because of that, on Qualcomm Centriq we can end up with a very high rate of frequency change requests when using the schedutil governor (default rate_limit_us=10 compared to an earlier value of 10000). The PCC subspace describes the rate at which the platform can accept commands on the CPPC's PCC channel. This includes read and write command on the PCC channel that can be used for reasons other than frequency transitions. Moreover the same PCC subspace can be used by multiple freq domains and deriving transition_delay_us from it as we do now can be sub-optimal. Moreover if a platform does not use PCC for desired_perf register then there is no way to compute the transition latency or the delay_us. CPPC does not have a standard defined mechanism to get the transition rate or the latency at the moment. Given the above limitations, it is simpler to have a platform specific transition_delay_us and rely on PCC derived value only if a platform specific value is not available. Signed-off-by: Prashanth Prakash Cc: 4.14+ # 4.14+ Fixes: 3d41386d556d (cpufreq: CPPC: Use transition_delay_us depending transition_latency) Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cppc_cpufreq.c | 46 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) commit 76b3421b39bd610546931fc923edcf90c18fa395 Author: Takashi Iwai Date: Mon Apr 30 10:06:48 2018 +0200 ALSA: aloop: Add missing cable lock to ctl API callbacks Some control API callbacks in aloop driver are too lazy to take the loopback->cable_lock and it results in possible races of cable access while it's being freed. It eventually lead to a UAF, as reported by fuzzer recently. This patch covers such control API callbacks and add the proper mutex locks. Reported-by: DaeRyong Jeong Cc: Signed-off-by: Takashi Iwai sound/drivers/aloop.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit b607990c76ceda0a7a7ceacabab174cdc8b9beee Author: Ian W MORRISON Date: Wed Apr 11 14:42:13 2018 +1000 drm/i915/glk: Add MODULE_FIRMWARE for Geminilake As the Geminilake firmware is now merged to linux-firmware.git use MODUE_FIRMWARE to load the firmware. This removes the error message in the dmesg log: i915 0000:00:02.0: Direct firmware load for i915/glk_dmc_ver1_04.bin failed with error -2 i915 0000:00:02.0: Failed to load DMC firmware i915/glk_dmc_ver1_04.bin. Disabling runtime power management. i915 0000:00:02.0: DMC firmware homepage: https://01.org/linuxgraphics/downloads/firmware and now shows that the firmware has correctly loaded: [drm] Finished loading DMC firmware i915/glk_dmc_ver1_04.bin (v1.4) Signed-off-by: Ian W MORRISON Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180411044213.383-1-ianwmorrison@gmail.com (cherry picked from commit f6d3e06f074721ad3a231df745d85b60428c1f03) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_csr.c | 1 + 1 file changed, 1 insertion(+) commit 2cb5fb1454ef4990f44f3070226ee29201bd5c87 Author: Marcelo Ricardo Leitner Date: Fri Apr 27 16:46:11 2018 -0300 MAINTAINERS: add myself as SCTP co-maintainer Signed-off-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 14b7dc18ee1d9ae79eb615ea6a918d15bfddd220 Author: Colin Ian King Date: Fri Apr 27 20:09:25 2018 +0100 net: systemport: fix spelling mistake: "asymetric" -> "asymmetric" Trivial fix to spelling mistake in netdev_warn warning message Signed-off-by: Colin Ian King Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8238fc2bd7b4c3c7554fa2df067e796610212fc Author: Hangbin Liu Date: Fri Apr 27 20:59:24 2018 +0800 bridge: check iface upper dev when setting master via ioctl When we set a bond slave's master to bridge via ioctl, we only check the IFF_BRIDGE_PORT flag. Although we will find the slave's real master at netdev_master_upper_dev_link() later, it already does some settings and allocates some resources. It would be better to return as early as possible. v1 -> v2: use netdev_master_upper_dev_get() instead of netdev_has_any_upper_dev() to check if we have a master, because not all upper devs are masters, e.g. vlan device. Reported-by: syzbot+de73361ee4971b6e6f75@syzkaller.appspotmail.com Signed-off-by: Hangbin Liu Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 40626a1bf657eef557fcee9e1b8ef5b4f5b56dcd Author: Guenter Roeck Date: Sun Apr 29 08:08:24 2018 -0700 hwmon: (k10temp) Fix reading critical temperature register The HTC (Hardware Temperature Control) register has moved for recent chips. Cc: stable@vger.kernel.org # v4.16+ Tested-by: Gabriel Craciunescu Signed-off-by: Guenter Roeck drivers/hwmon/k10temp.c | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) commit 6da6c0db5316275015e8cc2959f12a17584aeb64 Author: Linus Torvalds Date: Sun Apr 29 14:17:42 2018 -0700 Linux v4.17-rc3 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c61a56ababa404961fa769a2b24229f18e461961 Merge: 65f4d6d 1a512c0 Author: Linus Torvalds Date: Sun Apr 29 10:06:05 2018 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "Another set of x86 related updates: - Fix the long broken x32 version of the IPC user space headers which was noticed by Arnd Bergman in course of his ongoing y2038 work. GLIBC seems to have non broken private copies of these headers so this went unnoticed. - Two microcode fixlets which address some more fallout from the recent modifications in that area: - Unconditionally save the microcode patch, which was only saved when CPU_HOTPLUG was enabled causing failures in the late loading mechanism - Make the later loader synchronization finally work under all circumstances. It was exiting early and causing timeout failures due to a missing synchronization point. - Do not use mwait_play_dead() on AMD systems to prevent excessive power consumption as the CPU cannot go into deep power states from there. - Address an annoying sparse warning due to lost type qualifiers of the vmemmap and vmalloc base address constants. - Prevent reserving crash kernel region on Xen PV as this leads to the wrong perception that crash kernels actually work there which is not the case. Xen PV has its own crash mechanism handled by the hypervisor. - Add missing TLB cpuid values to the table to make the printout on certain machines correct. - Enumerate the new CLDEMOTE instruction - Fix an incorrect SPDX identifier - Remove stale macros" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ipc: Fix x32 version of shmid64_ds and msqid64_ds x86/setup: Do not reserve a crash kernel region if booted on Xen PV x86/cpu/intel: Add missing TLB cpuid values x86/smpboot: Don't use mwait_play_dead() on AMD systems x86/mm: Make vmemmap and vmalloc base address constants unsigned long x86/vector: Remove the unused macro FPU_IRQ x86/vector: Remove the macro VECTOR_OFFSET_START x86/cpufeatures: Enumerate cldemote instruction x86/microcode: Do not exit early from __reload_late() x86/microcode/intel: Save microcode patch unconditionally x86/jailhouse: Fix incorrect SPDX identifier commit 65f4d6d0f80b3c55830ec5735194703fa2909ba1 Merge: 810fb07 8bb2610 Author: Linus Torvalds Date: Sun Apr 29 09:36:22 2018 -0700 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 pti fixes from Thomas Gleixner: "A set of updates for the x86/pti related code: - Preserve r8-r11 in int $0x80. r8-r11 need to be preserved, but the int$80 entry code removed that quite some time ago. Make it correct again. - A set of fixes for the Global Bit work which went into 4.17 and caused a bunch of interesting regressions: - Triggering a BUG in the page attribute code due to a missing check for early boot stage - Warnings in the page attribute code about holes in the kernel text mapping which are caused by the freeing of the init code. Handle such holes gracefully. - Reduce the amount of kernel memory which is set global to the actual text and do not incidentally overlap with data. - Disable the global bit when RANDSTRUCT is enabled as it partially defeats the hardening. - Make the page protection setup correct for vma->page_prot population again. The adjustment of the protections fell through the crack during the Global bit rework and triggers warnings on machines which do not support certain features, e.g. NX" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/entry/64/compat: Preserve r8-r11 in int $0x80 x86/pti: Filter at vma->vm_page_prot population x86/pti: Disallow global kernel text with RANDSTRUCT x86/pti: Reduce amount of kernel text allowed to be Global x86/pti: Fix boot warning from Global-bit setting x86/pti: Fix boot problems from Global-bit setting commit 810fb07a9b504ac22b95899cf8b39d25a5f3e5c5 Merge: 7d9e55f a3ed0e43 Author: Linus Torvalds Date: Sun Apr 29 09:03:25 2018 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "Two fixes from the timer departement: - Fix a long standing issue in the NOHZ tick code which causes RB tree corruption, delayed timers and other malfunctions. The cause for this is code which modifies the expiry time of an enqueued hrtimer. - Revert the CLOCK_MONOTONIC/CLOCK_BOOTTIME unification due to regression reports. Seems userspace _is_ relying on the documented behaviour despite our hope that it wont" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert: Unify CLOCK_MONOTONIC and CLOCK_BOOTTIME tick/sched: Do not mess with an enqueued hrtimer commit 7d9e55feae5543b16ec9d433079c9db455929a67 Merge: cdface5 d4652f6 Author: Linus Torvalds Date: Sun Apr 29 08:58:50 2018 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "The perf update contains the following bits: x86: - Prevent setting freeze_on_smi on PerfMon V1 CPUs to avoid #GP perf stat: - Keep the '/' event modifier separator in fallback, for example when fallbacking from 'cpu/cpu-cycles/' to user level only, where it should become 'cpu/cpu-cycles/u' and not 'cpu/cpu-cycles/:u' (Jiri Olsa) - Fix PMU events parsing rule, improving error reporting for invalid events (Jiri Olsa) - Disable write_backward and other event attributes for !group events in a group, fixing, for instance this group: '{cycles,msr/aperf/}:S' that has leader sampling (:S) and where just the 'cycles', the leader event, should have the write_backward attribute set, in this case it all fails because the PMU where 'msr/aperf/' lives doesn't accepts write_backward style sampling (Jiri Olsa) - Only fall back group read for leader (Kan Liang) - Fix core PMU alias list for x86 platform (Kan Liang) - Print out hint for mixed PMU group error (Kan Liang) - Fix duplicate PMU name for interval print (Kan Liang) Core: - Set main kernel end address properly when reading kernel and module maps (Namhyung Kim) perf mem: - Fix incorrect entries and add missing man options (Sangwon Hong) s/390: - Remove s390 specific strcmp_cpuid_cmp function (Thomas Richter) - Adapt 'perf test' case record+probe_libc_inet_pton.sh for s390 - Fix s390 undefined record__auxtrace_init() return value in 'perf record' (Thomas Richter)" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Don't enable freeze-on-smi for PerfMon V1 perf stat: Fix duplicate PMU name for interval print perf evsel: Only fall back group read for leader perf stat: Print out hint for mixed PMU group error perf pmu: Fix core PMU alias list for X86 platform perf record: Fix s390 undefined record__auxtrace_init() return value perf mem: Document incorrect and missing options perf evsel: Disable write_backward for leader sampling group events perf pmu: Fix pmu events parsing rule perf stat: Keep the / modifier separator in fallback perf test: Adapt test case record+probe_libc_inet_pton.sh for s390 perf list: Remove s390 specific strcmp_cpuid_cmp function perf machine: Set main kernel end address properly commit 52759c0963510a2843774aac9b65ccaed3308dc0 Author: Takashi Sakamoto Date: Sun Apr 29 15:01:46 2018 +0900 ALSA: dice: fix kernel NULL pointer dereference due to invalid calculation for array index At a commit f91c9d7610a ('ALSA: firewire-lib: cache maximum length of payload to reduce function calls'), maximum size of payload for tx isochronous packet is cached to reduce the number of function calls. This cache was programmed to updated at a first callback of ohci1394 IR context. However, the maximum size is required to queueing packets before starting the isochronous context. As a result, the cached value is reused to queue packets in next time to starting the isochronous context. Then the cache is updated in a first callback of the isochronous context. This can cause kernel NULL pointer dereference in a below call graph: (sound/firewire/amdtp-stream.c) amdtp_stream_start() ->queue_in_packet() ->queue_packet() (drivers/firewire/core-iso.c) ->fw_iso_context_queue() ->struct fw_card_driver.queue_iso() (drivers/firewire/ohci.c) = ohci_queue_iso() ->queue_iso_packet_per_buffer() buffer->pages[page] The issued dereference occurs in a case that: - target unit supports different stream formats for sampling transmission frequency. - maximum length of payload for tx stream in a first trial is bigger than the length in a second trial. In this case, correct number of pages are allocated for DMA and the 'pages' array has enough elements, while index of the element is wrongly calculated according to the old value of length of payload in a call of 'queue_in_packet()'. Then it causes the issue. This commit fixes the critical bug. This affects all of drivers in ALSA firewire stack in Linux kernel v4.12 or later. [12665.302360] BUG: unable to handle kernel NULL pointer dereference at 0000000000000030 [12665.302415] IP: ohci_queue_iso+0x47c/0x800 [firewire_ohci] [12665.302439] PGD 0 [12665.302440] P4D 0 [12665.302450] [12665.302470] Oops: 0000 [#1] SMP PTI [12665.302487] Modules linked in: ... [12665.303096] CPU: 1 PID: 12760 Comm: jackd Tainted: P OE 4.13.0-38-generic #43-Ubuntu [12665.303154] Hardware name: /DH77DF, BIOS KCH7710H.86A.0069.2012.0224.1825 02/24/2012 [12665.303215] task: ffff9ce87da2ae80 task.stack: ffffb5b8823d0000 [12665.303258] RIP: 0010:ohci_queue_iso+0x47c/0x800 [firewire_ohci] [12665.303301] RSP: 0018:ffffb5b8823d3ab8 EFLAGS: 00010086 [12665.303337] RAX: ffff9ce4f4876930 RBX: 0000000000000008 RCX: ffff9ce88a3955e0 [12665.303384] RDX: 0000000000000000 RSI: 0000000034877f00 RDI: 0000000000000000 [12665.303427] RBP: ffffb5b8823d3b68 R08: ffff9ce8ccb390a0 R09: ffff9ce877639ab0 [12665.303475] R10: 0000000000000108 R11: 0000000000000000 R12: 0000000000000003 [12665.303513] R13: 0000000000000000 R14: ffff9ce4f4876950 R15: 0000000000000000 [12665.303554] FS: 00007f2ec467f8c0(0000) GS:ffff9ce8df280000(0000) knlGS:0000000000000000 [12665.303600] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [12665.303633] CR2: 0000000000000030 CR3: 00000002dcf90004 CR4: 00000000000606e0 [12665.303674] Call Trace: [12665.303698] fw_iso_context_queue+0x18/0x20 [firewire_core] [12665.303735] queue_packet+0x88/0xe0 [snd_firewire_lib] [12665.303770] amdtp_stream_start+0x19b/0x270 [snd_firewire_lib] [12665.303811] start_streams+0x276/0x3c0 [snd_dice] [12665.303840] snd_dice_stream_start_duplex+0x1bf/0x480 [snd_dice] [12665.303882] ? vma_gap_callbacks_rotate+0x1e/0x30 [12665.303914] ? __rb_insert_augmented+0xab/0x240 [12665.303936] capture_prepare+0x3c/0x70 [snd_dice] [12665.303961] snd_pcm_do_prepare+0x1d/0x30 [snd_pcm] [12665.303985] snd_pcm_action_single+0x3b/0x90 [snd_pcm] [12665.304009] snd_pcm_action_nonatomic+0x68/0x70 [snd_pcm] [12665.304035] snd_pcm_prepare+0x68/0x90 [snd_pcm] [12665.304058] snd_pcm_common_ioctl1+0x4c0/0x940 [snd_pcm] [12665.304083] snd_pcm_capture_ioctl1+0x19b/0x250 [snd_pcm] [12665.304108] snd_pcm_capture_ioctl+0x27/0x40 [snd_pcm] [12665.304131] do_vfs_ioctl+0xa8/0x630 [12665.304148] ? entry_SYSCALL_64_after_hwframe+0xe9/0x139 [12665.304172] ? entry_SYSCALL_64_after_hwframe+0xe2/0x139 [12665.304195] ? entry_SYSCALL_64_after_hwframe+0xdb/0x139 [12665.304218] ? entry_SYSCALL_64_after_hwframe+0xd4/0x139 [12665.304242] ? entry_SYSCALL_64_after_hwframe+0xcd/0x139 [12665.304265] ? entry_SYSCALL_64_after_hwframe+0xc6/0x139 [12665.304288] ? entry_SYSCALL_64_after_hwframe+0xbf/0x139 [12665.304312] ? entry_SYSCALL_64_after_hwframe+0xb8/0x139 [12665.304335] ? entry_SYSCALL_64_after_hwframe+0xb1/0x139 [12665.304358] SyS_ioctl+0x79/0x90 [12665.304374] ? entry_SYSCALL_64_after_hwframe+0x72/0x139 [12665.304397] entry_SYSCALL_64_fastpath+0x24/0xab [12665.304417] RIP: 0033:0x7f2ec3750ef7 [12665.304433] RSP: 002b:00007fff99e31388 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [12665.304465] RAX: ffffffffffffffda RBX: 00007fff99e312f0 RCX: 00007f2ec3750ef7 [12665.304494] RDX: 0000000000000000 RSI: 0000000000004140 RDI: 0000000000000007 [12665.304522] RBP: 0000556ebc63fd60 R08: 0000556ebc640560 R09: 0000000000000000 [12665.304553] R10: 0000000000000001 R11: 0000000000000246 R12: 0000556ebc63fcf0 [12665.304584] R13: 0000000000000000 R14: 0000000000000007 R15: 0000000000000000 [12665.304612] Code: 01 00 00 44 89 eb 45 31 ed 45 31 db 66 41 89 1e 66 41 89 5e 0c 66 45 89 5e 0e 49 8b 49 08 49 63 d4 4d 85 c0 49 63 ff 48 8b 14 d1 <48> 8b 72 30 41 8d 14 37 41 89 56 04 48 63 d3 0f 84 ce 00 00 00 [12665.304713] RIP: ohci_queue_iso+0x47c/0x800 [firewire_ohci] RSP: ffffb5b8823d3ab8 [12665.304743] CR2: 0000000000000030 [12665.317701] ---[ end trace 9d55b056dd52a19f ]--- Fixes: f91c9d7610a ('ALSA: firewire-lib: cache maximum length of payload to reduce function calls') Cc: # v4.12+ Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cdface5209349930ae1b51338763c8e029971b97 Merge: 19b9ad6 7ef79ad Author: Linus Torvalds Date: Sat Apr 28 20:07:21 2018 -0700 Merge tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Fix misc bugs and a regression for ext4" * tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: add MODULE_SOFTDEP to ensure crc32c is included in the initramfs ext4: fix bitmap position validation ext4: set h_journal if there is a failure starting a reserved handle ext4: prevent right-shifting extents beyond EXT_MAX_BLOCKS commit 19b9ad67310ed2f685062a00aec602bec33835f0 Author: Amir Goldstein Date: Mon Feb 5 19:32:18 2018 +0200 : fix end_name_hash() for 64bit long The comment claims that this helper will try not to loose bits, but for 64bit long it looses the high bits before hashing 64bit long into 32bit int. Use the helper hash_long() to do the right thing for 64bit long. For 32bit long, there is no change. All the callers of end_name_hash() either assign the result to qstr->hash, which is u32 or return the result as an int value (e.g. full_name_hash()). Change the helper return type to int to conform to its users. [ It took me a while to apply this, because my initial reaction to it was - incorrectly - that it could make for slower code. After having looked more at it, I take back all my complaints about the patch, Amir was right and I was mis-reading things or just being stupid. I also don't worry too much about the possible performance impact of this on 64-bit, since most architectures that actually care about performance end up not using this very much (the dcache code is the most performance-critical, but the word-at-a-time case uses its own hashing anyway). So this ends up being mostly used for filesystems that do their own degraded hashing (usually because they want a case-insensitive comparison function). A _tiny_ worry remains, in that not everybody uses DCACHE_WORD_ACCESS, and then this potentially makes things more expensive on 64-bit architectures with slow or lacking multipliers even for the normal case. That said, realistically the only such architecture I can think of is PA-RISC. Nobody really cares about performance on that, it's more of a "look ma, I've got warts^W an odd machine" platform. So the patch is fine, and all my initial worries were just misplaced from not looking at this properly. - Linus ] Signed-off-by: Amir Goldstein Signed-off-by: Linus Torvalds include/linux/stringhash.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bf8f5de17442bba5f811e7e724980730e079ee11 Author: David Sterba Date: Sat Apr 28 19:05:04 2018 +0200 MAINTAINERS: add myself as maintainer of AFFS The AFFS filesystem is still in use by m68k community (Link #2), but as there was no code activity and no maintainer, the filesystem appeared on the list of candidates for staging/removal (Link #1). I volunteer to act as a maintainer of AFFS to collect any fixes that might show up and to guard fs/affs/ against another spring cleaning. Link: https://lkml.kernel.org/r/20180425154602.GA8546@bombadil.infradead.org Link: https://lkml.kernel.org/r/1613268.lKBQxPXt8J@merkaba CC: Martin Steigerwald CC: John Paul Adrian Glaubitz Signed-off-by: David Sterba Signed-off-by: Linus Torvalds MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a97d8efd9d350bd9c6cf13689c7cc09049b42acd Merge: 6e041ff 2a01046 Author: Linus Torvalds Date: Sat Apr 28 10:06:16 2018 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: - two driver fixes - better parameter check for the core - Documentation updates - part of a tree-wide HAS_DMA cleanup * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: sprd: Fix the i2c count issue i2c: sprd: Prevent i2c accesses after suspend is called i2c: dev: prevent ZERO_SIZE_PTR deref in i2cdev_ioctl_rdwr() Documentation/i2c: adopt kernel commenting style in examples Documentation/i2c: sync docs with current state of i2c-tools Documentation/i2c: whitespace cleanup i2c: Remove depends on HAS_DMA in case of platform dependency commit 6e041ffcc2d0bf8792937e89480b2172a9dd2823 Merge: cac2642 eea0d3e Author: Linus Torvalds Date: Sat Apr 28 10:02:44 2018 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: - crypto API regression that may cause sporadic alloc failures - double-free bug in drbg * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: drbg - set freed buffers to NULL crypto: api - fix finding algorithm currently being tested commit cac264288abe0f54b91e51d97c949b706c9435c7 Merge: 0d95cfa 8bcda1d Author: Linus Torvalds Date: Sat Apr 28 09:51:56 2018 -0700 Merge tag '4.17-rc2-smb3' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "A few security related fixes for SMB3, most importantly for SMB3.11 encryption" * tag '4.17-rc2-smb3' of git://git.samba.org/sfrench/cifs-2.6: cifs: smbd: Avoid allocating iov on the stack cifs: smbd: Don't use RDMA read/write when signing is used SMB311: Fix reconnect SMB3: Fix 3.11 encryption to Windows and handle encrypted smb3 tcon CIFS: set *resp_buf_type to NO_BUFFER on error commit 0d95cfa922c24bcc20b5ccf7496b6ac7c8e29efb Merge: 46dc111 b2d7ecb Author: Linus Torvalds Date: Sat Apr 28 09:45:34 2018 -0700 Merge tag 'powerpc-4.17-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "A bunch of fixes, mostly for existing code and going to stable. Our memory hot-unplug path wasn't flushing the cache before removing memory. That is a problem now that we are doing memory hotplug on bare metal. Three fixes for the NPU code that supports devices connected via NVLink (ie. GPUs). The main one tweaks the TLB flush algorithm to avoid soft lockups for large flushes. A fix for our memory error handling where we would loop infinitely, returning back to the bad access and hard lockup the CPU. Fixes for the OPAL RTC driver, which wasn't handling some error cases correctly. A fix for a hardlockup in the powernv cpufreq driver. And finally two fixes to our smp_send_stop(), required due to a recent change to use it on shutdown. Thanks to: Alistair Popple, Balbir Singh, Laurentiu Tudor, Mahesh Salgaonkar, Mark Hairgrove, Nicholas Piggin, Rashmica Gupta, Shilpasri G Bhat" * tag 'powerpc-4.17-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/kvm/booke: Fix altivec related build break powerpc: Fix deadlock with multiple calls to smp_send_stop cpufreq: powernv: Fix hardlockup due to synchronous smp_call in timer interrupt powerpc: Fix smp_send_stop NMI IPI handling rtc: opal: Fix OPAL RTC driver OPAL_BUSY loops powerpc/mce: Fix a bug where mce loops on memory UE. powerpc/powernv/npu: Do a PID GPU TLB flush when invalidating a large address range powerpc/powernv/npu: Prevent overwriting of pnv_npu2_init_contex() callback parameters powerpc/powernv/npu: Add lock to prevent race in concurrent context init/destroy powerpc/powernv/memtrace: Let the arch hotunplug code flush cache powerpc/mm: Flush cache on memory hot(un)plug commit 8b82b66e68b32dd8e22a04db6a0494bfdd65156f Author: Masahiro Yamada Date: Fri Apr 27 13:25:18 2018 +0900 arm64: dts: uniphier: stabilize ethernet of LD20 reference board Currently, the ethernet RGMII mode on the LD20 reference board is unstable. The default drive-strength of ethernet TX pins is too strong because there is no dumping resistor on the TX lines on the board. Weaken the drive-strength to make the ethernet more stable. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1d39fd1bedbde2adfb57ef443c7688e85d547d6a Merge: 988bf72 987c658 Author: David S. Miller Date: Fri Apr 27 20:21:08 2018 -0400 Merge branch 'sfc-more-ARFS-fixes' Edward Cree says: ==================== sfc: more ARFS fixes A couple more bits of breakage in my recent ARFS and async filters work. Patch #1 in particular fixes a bug that leads to memory trampling and consequent crashes. ==================== Signed-off-by: David S. Miller commit 987c658a61f432804c4662b736dbd5fc5939af1f Author: Edward Cree Date: Fri Apr 27 15:08:57 2018 +0100 sfc: fix ARFS expiry check on EF10 Owing to a missing conditional, the result of rps_may_expire_flow() was being ignored and filters were being removed even if we'd decided not to expire them. Fixes: f8d6203780b7 ("sfc: ARFS filter IDs") Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ded8b9c761c50d147b20d7de18766fcdb8f5b621 Author: Edward Cree Date: Fri Apr 27 15:08:41 2018 +0100 sfc: Use filter index rather than ID for rps_flow_id table efx->type->filter_insert() returns an ID rather than the index that efx->type->filter_async_insert() used to, which causes it to exceed efx->type->max_rx_ip_filters on some EF10 configurations, leading to out- of-bounds array writes. So, in efx_filter_rfs_work(), convert this back into an index (which is what the remove call in the expiry path expects, anyway). Fixes: 3af0f34290f6 ("sfc: replace asynchronous filter operations") Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/rx.c | 2 ++ 1 file changed, 2 insertions(+) commit 988bf7243e03ef69238381594e0334a79cef74a6 Author: Lance Richardson Date: Wed Apr 25 10:21:54 2018 -0400 net: support compat 64-bit time in {s,g}etsockopt For the x32 ABI, struct timeval has two 64-bit fields. However the kernel currently interprets the user-space values used for the SO_RCVTIMEO and SO_SNDTIMEO socket options as having a pair of 32-bit fields. When the seconds portion of the requested timeout is less than 2**32, the seconds portion of the effective timeout is correct but the microseconds portion is zero. When the seconds portion of the requested timeout is zero and the microseconds portion is non-zero, the kernel interprets the timeout as zero (never timeout). Fix by using 64-bit time for SO_RCVTIMEO/SO_SNDTIMEO as required for the ABI. The code included below demonstrates the problem. Results before patch: $ gcc -m64 -Wall -O2 -o socktmo socktmo.c && ./socktmo recv time: 2.008181 seconds send time: 2.015985 seconds $ gcc -m32 -Wall -O2 -o socktmo socktmo.c && ./socktmo recv time: 2.016763 seconds send time: 2.016062 seconds $ gcc -mx32 -Wall -O2 -o socktmo socktmo.c && ./socktmo recv time: 1.007239 seconds send time: 1.023890 seconds Results after patch: $ gcc -m64 -O2 -Wall -o socktmo socktmo.c && ./socktmo recv time: 2.010062 seconds send time: 2.015836 seconds $ gcc -m32 -O2 -Wall -o socktmo socktmo.c && ./socktmo recv time: 2.013974 seconds send time: 2.015981 seconds $ gcc -mx32 -O2 -Wall -o socktmo socktmo.c && ./socktmo recv time: 2.030257 seconds send time: 2.013383 seconds #include #include #include #include #include void checkrc(char *str, int rc) { if (rc >= 0) return; perror(str); exit(1); } static char buf[1024]; int main(int argc, char **argv) { int rc; int socks[2]; struct timeval tv; struct timeval start, end, delta; rc = socketpair(AF_UNIX, SOCK_STREAM, 0, socks); checkrc("socketpair", rc); /* set timeout to 1.999999 seconds */ tv.tv_sec = 1; tv.tv_usec = 999999; rc = setsockopt(socks[0], SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv); rc = setsockopt(socks[0], SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof tv); checkrc("setsockopt", rc); /* measure actual receive timeout */ gettimeofday(&start, NULL); rc = recv(socks[0], buf, sizeof buf, 0); gettimeofday(&end, NULL); timersub(&end, &start, &delta); printf("recv time: %ld.%06ld seconds\n", (long)delta.tv_sec, (long)delta.tv_usec); /* fill send buffer */ do { rc = send(socks[0], buf, sizeof buf, 0); } while (rc > 0); /* measure actual send timeout */ gettimeofday(&start, NULL); rc = send(socks[0], buf, sizeof buf, 0); gettimeofday(&end, NULL); timersub(&end, &start, &delta); printf("send time: %ld.%06ld seconds\n", (long)delta.tv_sec, (long)delta.tv_usec); exit(0); } Fixes: 515c7af85ed9 ("x32: Use compat shims for {g,s}etsockopt") Reported-by: Gopal RajagopalSai Signed-off-by: Lance Richardson Signed-off-by: David S. Miller net/compat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 46dc111dfe47bf47f23884cade3c8a355be87c8c Merge: 19b522d 5e62493 Author: Linus Torvalds Date: Fri Apr 27 16:13:31 2018 -0700 rMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "ARM: - PSCI selection API, a leftover from 4.16 (for stable) - Kick vcpu on active interrupt affinity change - Plug a VMID allocation race on oversubscribed systems - Silence debug messages - Update Christoffer's email address (linaro -> arm) x86: - Expose userspace-relevant bits of a newly added feature - Fix TLB flushing on VMX with VPID, but without EPT" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: x86/headers/UAPI: Move DISABLE_EXITS KVM capability bits to the UAPI kvm: apic: Flush TLB after APIC mode/address change if VPIDs are in use arm/arm64: KVM: Add PSCI version selection API KVM: arm/arm64: vgic: Kick new VCPU on interrupt migration arm64: KVM: Demote SVE and LORegion warnings to debug only MAINTAINERS: Update e-mail address for Christoffer Dall KVM: arm/arm64: Close VMID generation race commit a33554401e4746cc33307910a1baad63ce3fd650 Author: Mathieu Desnoyers Date: Fri Apr 27 17:55:41 2018 -0400 selftests: Fix lib.mk run_tests target shell script Within run_tests target, the whole script needs to be executed within the same shell and not as separate subshells, so the initial test_num variable set to 0 is still present when executing "test_num=`echo $$test_num+1 | bc`;". Demonstration of the issue (make run_tests): TAP version 13 (standard_in) 1: syntax error selftests: basic_test ======================================== ok 1.. selftests: basic_test [PASS] (standard_in) 1: syntax error selftests: basic_percpu_ops_test ======================================== ok 1.. selftests: basic_percpu_ops_test [PASS] (standard_in) 1: syntax error selftests: param_test ======================================== ok 1.. selftests: param_test [PASS] With fix applied: TAP version 13 selftests: basic_test ======================================== ok 1..1 selftests: basic_test [PASS] selftests: basic_percpu_ops_test ======================================== ok 1..2 selftests: basic_percpu_ops_test [PASS] selftests: param_test ======================================== ok 1..3 selftests: param_test [PASS] Signed-off-by: Mathieu Desnoyers Fixes: 1f87c7c15d7 ("selftests: lib.mk: change RUN_TESTS to print messages in TAP13 format") CC: Shuah Khan CC: linux-kselftest@vger.kernel.org Signed-off-by: Shuah Khan (Samsung OSG) tools/testing/selftests/lib.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 779857e1870178e9f4aee600f17e44d81ff630b2 Author: Geert Uytterhoeven Date: Mon Apr 23 09:32:40 2018 +0200 dt-bindings: meson-uart: DT fix s/clocks-names/clock-names/ Signed-off-by: Geert Uytterhoeven Acked-by: Neil Armstrong Signed-off-by: Rob Herring Documentation/devicetree/bindings/serial/amlogic,meson-uart.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b21bca04551906485e5d4140ccb2d875c45daa0 Author: Vivien Didelot Date: Thu Apr 26 19:47:35 2018 -0400 MAINTAINERS: add davem in NETWORKING DRIVERS "./scripts/get_maintainer.pl -f" does not actually show us David as the maintainer of drivers/net directories such as team, bonding, phy or dsa. Adding him in an M: entry of NETWORKING DRIVERS fixes this. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 2df19e19ae90d94fd8724083f161f368a2797537 Author: Bharat Potnuri Date: Fri Apr 27 16:41:16 2018 +0530 iw_cxgb4: Atomically flush per QP HW CQEs When a CQ is shared by multiple QPs, c4iw_flush_hw_cq() needs to acquire corresponding QP lock before moving the CQEs into its corresponding SW queue and accessing the SQ contents for completing a WR. Ignore CQEs if corresponding QP is already flushed. Cc: stable@vger.kernel.org Signed-off-by: Potnuri Bharat Teja Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cq.c | 11 ++++++++++- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 +- drivers/infiniband/hw/cxgb4/qp.c | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) commit e8e9608116593a54915a6ca8e343210e3aa6bce3 Merge: 1da9a58 202854e Author: David S. Miller Date: Fri Apr 27 14:30:38 2018 -0400 Merge tag 'mlx5-fixes-2018-04-25' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2018-04-26 This pull request includes fixes for mlx5 core and netdev driver. Please pull and let me know if there's any problems. For -stable v4.12 net/mlx5e: TX, Use correct counter in dma_map error flow For -stable v4.13 net/mlx5: Avoid cleaning flow steering table twice during error flow For -stable v4.14 net/mlx5e: Allow offloading ipv4 header re-write for icmp For -stable v4.15 net/mlx5e: DCBNL fix min inline header size for dscp For -stable v4.16 net/mlx5: Fix mlx5_get_vector_affinity function ==================== Signed-off-by: David S. Miller commit 54e7e48b13c85d9a730b989fe7dc5250199a4f81 Author: Ariel Levkovich Date: Thu Apr 26 15:42:55 2018 +0300 IB/uverbs: Fix kernel crash during MR deregistration flow This patch fixes a crash that happens due to access to an uninitialized DM pointer within the MR object. The change makes sure the DM pointer in the MR object is set to NULL during a non-DM MR creation to prevent a false indication that this MR is related to a DM in the dereg flow. Fixes: be934cca9e98 ("IB/uverbs: Add device memory registration ioctl support") Reported-by: Lijun Ou Signed-off-by: Ariel Levkovich Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 1 + drivers/infiniband/core/verbs.c | 1 + 2 files changed, 2 insertions(+) commit 5ccbf63f87a39c279729670d2e31166844a335c6 Author: Ariel Levkovich Date: Thu Apr 26 15:42:54 2018 +0300 IB/uverbs: Prevent reregistration of DM_MR to regular MR This patch adds a check in the ib_uverbs_rereg_mr flow to make sure there's no attempt to rereg a device memory MR to regular MR. In such case the command will fail with -EINVAL status. fixes: be934cca9e98 ("IB/uverbs: Add device memory registration ioctl support") Signed-off-by: Ariel Levkovich Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4f9ca2d8686ecfdd40ca4f0294a3d94f83f05cea Author: Leon Romanovsky Date: Thu Apr 26 15:37:48 2018 +0300 RDMA/mlx4: Add missed RSS hash inner header flag Despite being advertised to user space application, the RSS inner header flag was filtered by checks at the beginning of QP creation routine. Cc: # 4.15 Fixes: 4d02ebd9bbbd ("IB/mlx4: Fix RSS hash fields restrictions") Fixes: 07d84f7b6adf ("IB/mlx4: Add support to RSS hash for inner headers") Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/qp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ab17884903f97054c719a3c68017513b922efe43 Author: oulijun Date: Thu Apr 26 14:46:24 2018 +0800 RDMA/hns: Fix a couple misspellings This patch fixes two spelling errors. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +- drivers/infiniband/hw/hns/hns_roce_qp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 137ae3208416278aabef3b71e0ea1052940ca362 Author: oulijun Date: Thu Apr 26 14:46:23 2018 +0800 RDMA/hns: Submit bad wr When generated bad work reqeust, it needs to report to user. This patch mainly fixes it. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 634f63902277700d0a02eaa101cc685958c35aa4 Author: oulijun Date: Thu Apr 26 14:46:22 2018 +0800 RDMA/hns: Update assignment method for owner field of send wqe When posting a work reqeust, it need to update the owner bit of send wqe. This patch mainly fix the bug when posting multiply work request. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ae25db00285bf664fbd78222491b29aac6242902 Author: oulijun Date: Thu Apr 26 14:46:21 2018 +0800 RDMA/hns: Adjust the order of cleanup hem table This patch update the order of cleaning hem table for trrl_table and irrl_table as well as mtt_cqe_table and mtt_table. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b6dd9b34838506f5307850d8d320d7b1ac6761d3 Author: oulijun Date: Thu Apr 26 14:46:20 2018 +0800 RDMA/hns: Only assign dqpn if IB_QP_PATH_DEST_QPN bit is set Only when the IB_QP_PATH_DEST_QPN flag of attr_mask is set is it valid to assign the dqpn field of qp context Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 734f38638d7b91c173ddfe46ceadb0382fae9b1f Author: oulijun Date: Thu Apr 26 14:46:19 2018 +0800 RDMA/hns: Remove some unnecessary attr_mask judgement This patch deletes some unnecessary attr_mask if condition in hip08 according to the IB protocol. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 6852af86627c7bd8de11c9ad3eb5cca7d99e5884 Author: oulijun Date: Thu Apr 26 14:46:18 2018 +0800 RDMA/hns: Only assign mtu if IB_QP_PATH_MTU bit is set Only when the IB_QP_PATH_MTU flag of attr_mask is set it is valid to assign the mtu field of qp context when qp type is not GSI and UD. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e1a70943cecdca9bb13b601b1a9772a7bdcc2c3 Author: oulijun Date: Thu Apr 26 14:46:17 2018 +0800 RDMA/hns: Fix the qp context state diagram According to RoCE protocol, it is possible to transition from error to error state for modifying qp in hip08. This patch fix it. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 328d405b3d4c8dd1f06bfd77f498e23281ae348c Author: oulijun Date: Thu Apr 26 14:46:16 2018 +0800 RDMA/hns: Intercept illegal RDMA operation when use inline data RDMA read operation is not supported inline data. If user cofigures issue a RDMA read and use inline data, it will happen a hardware error. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 5 +++++ 1 file changed, 5 insertions(+) commit 215a8c09e5e2aa6ae1fbcef87f8f27d65d5d1ca4 Author: oulijun Date: Thu Apr 26 14:46:15 2018 +0800 RDMA/hns: Bugfix for init hem table During init hem table, type should be used instead of table->type which is finally initializaed with type. Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9fd4350ba8953804f05215999e11a6cfb7b41f2b Author: Zhu Yanjun Date: Thu Apr 26 00:41:10 2018 -0400 IB/rxe: avoid double kfree_skb When skb is sent, it will pass the following functions in soft roce. rxe_send [rdma_rxe] ip_local_out __ip_local_out ip_output ip_finish_output ip_finish_output2 dev_queue_xmit __dev_queue_xmit dev_hard_start_xmit In the above functions, if error occurs in the above functions or iptables rules drop skb after ip_local_out, kfree_skb will be called. So it is not necessary to call kfree_skb in soft roce module again. Or else crash will occur. The steps to reproduce: server client --------- --------- |1.1.1.1|<----rxe-channel--->|1.1.1.2| --------- --------- On server: rping -s -a 1.1.1.1 -v -C 10000 -S 512 On client: rping -c -a 1.1.1.1 -v -C 10000 -S 512 The kernel configs CONFIG_DEBUG_KMEMLEAK and CONFIG_DEBUG_OBJECTS are enabled on both server and client. When rping runs, run the following command in server: iptables -I OUTPUT -p udp --dport 4791 -j DROP Without this patch, crash will occur. CC: Srinivas Eeda CC: Junxiao Bi Signed-off-by: Zhu Yanjun Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_req.c | 1 - drivers/infiniband/sw/rxe/rxe_resp.c | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) commit 2da36d44a9d54a2c6e1f8da1f7ccc26b0bc6cfec Author: Jianchao Wang Date: Thu Apr 26 11:52:39 2018 +0800 IB/rxe: add RXE_START_MASK for rxe_opcode IB_OPCODE_RC_SEND_ONLY_INV w/o RXE_START_MASK, the last_psn of IB_OPCODE_RC_SEND_ONLY_INV will not be updated in update_wqe_psn, and the corresponding wqe will not be acked in rxe_completer due to its last_psn is zero. Finally, the other wqe will also not be able to be acked, because the wqe of IB_OPCODE_RC_SEND_ONLY_INV with last_psn 0 is still there. This causes large amount of io timeout when nvmeof is over rxe. Add RXE_START_MASK for IB_OPCODE_RC_SEND_ONLY_INV to fix this. Signed-off-by: Jianchao Wang Reviewed-by: Zhu Yanjun Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_opcode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f96416cea7bce9afe619c15e87fced70f93f9098 Author: Colin Ian King Date: Wed Apr 25 17:24:04 2018 +0100 RDMA/iwpm: fix memory leak on map_info In the cases where iwpm_hash_bucket is NULL and where function get_mapinfo_hash_bucket returns NULL then the map_info is never added to hash_bucket_head and hence there is a leak of map_info. Fix this by nullifying hash_bucket_head and if that is null we know that that map_info was not added to hash_bucket_head and hence map_info should be free'd. Detected by CoverityScan, CID#1222481 ("Resource Leak") Fixes: 30dc5e63d6a5 ("RDMA/core: Add support for iWARP Port Mapper user space service") Signed-off-by: Colin Ian King Signed-off-by: Doug Ledford drivers/infiniband/core/iwpm_util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 19b522dbad0d0c35d0741a74aef70ce6fe2d6fb4 Merge: 7b87308 3789c12 Author: Linus Torvalds Date: Fri Apr 27 11:14:25 2018 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Nothing too bad, but the spectre updates to smatch identified a few places that may need sanitising so we've got those covered. Details: - Close some potential spectre-v1 vulnerabilities found by smatch - Add missing list sentinel for CPUs that don't require KPTI - Removal of unused 'addr' parameter for I/D cache coherency - Removal of redundant set_fs(KERNEL_DS) calls in ptrace - Fix single-stepping state machine handling in response to kernel traps - Clang support for 128-bit integers - Avoid instrumenting our out-of-line atomics in preparation for enabling LSE atomics by default in 4.18" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: avoid instrumenting atomic_ll_sc.o KVM: arm/arm64: vgic: fix possible spectre-v1 in vgic_mmio_read_apr() KVM: arm/arm64: vgic: fix possible spectre-v1 in vgic_get_irq() arm64: fix possible spectre-v1 in ptrace_hbp_get_event() arm64: support __int128 with clang arm64: only advance singlestep for user instruction traps arm64/kernel: rename module_emit_adrp_veneer->module_emit_veneer_for_adrp arm64: ptrace: remove addr_limit manipulation arm64: mm: drop addr parameter from sync icache and dcache arm64: add sentinel to kpti_safe_list commit 47a3968a985e1686f41a55b4099fd1b5e16a5969 Author: Luc Van Oostenryck Date: Tue Apr 24 15:15:47 2018 +0200 IB/ipoib: fix ipoib_start_xmit()'s return type The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Reviewed-by: Yuval Shaia Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c192a12ce82ca0a951bd5449a21d53c5f3f88697 Author: Luc Van Oostenryck Date: Tue Apr 24 15:15:45 2018 +0200 IB/nes: fix nes_netdev_start_xmit()'s return type The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes_nic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b87308e710858e95729b9e33c8b79e2a1564d37 Merge: 64ebe31 be71eda Author: Linus Torvalds Date: Fri Apr 27 11:01:21 2018 -0700 Merge tag 'modules-for-v4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull modules fix from Jessica Yu: "Fix display of module section addresses in sysfs, which were getting hashed with %pK and breaking tools like perf" * tag 'modules-for-v4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: module: Fix display of wrong module .text address commit 2918c1a900252b4a0c730715ec205437c7daf79d Author: Parav Pandit Date: Tue Apr 24 20:13:45 2018 +0300 RDMA/cma: Fix use after destroy access to net namespace for IPoIB There are few issues with validation of netdevice and listen id lookup for IB (IPoIB) while processing incoming CM request as below. 1. While performing lookup of bind_list in cma_ps_find(), net namespace of the netdevice can get deleted in cma_exit_net(), resulting in use after free access of idr and/or net namespace structures. This lookup occurs from the workqueue context (and not userspace context where net namespace is always valid). CPU0 CPU1 ==== ==== bind_list = cma_ps_find(); move netdevice to new namespace delete net namespace cma_exit_net() idr_destroy(idr); [..] cma_find_listener(bind_list, ..); 2. While netdevice is validated for IP address in given net namespace, netdevice's net namespace and/or ifindex can change in cma_get_net_dev() and cma_match_net_dev(). Above issues are overcome by using rcu lock along with netdevice UP/DOWN state as described below. When a net namespace is getting deleted, netdevice is closed and shutdown before moving it back to init_net namespace. change_net_namespace() synchronizes with any existing use of netdevice before changing the netdev properties such as net or ifindex. Once netdevice IFF_UP flags is cleared, such fields are not guaranteed to be valid. Therefore, rcu lock along with netdevice state check ensures that, while route lookup and cm_id lookup is in progress, netdevice of interest won't migrate to any other net namespace. This ensures that associated net namespace of netdevice won't get deleted while rcu lock is held for netdevice which is in IFF_UP state. Fixes: fa20105e09e9 ("IB/cma: Add support for network namespaces") Fixes: 4be74b42a6d0 ("IB/cma: Separate port allocation to network namespaces") Fixes: f887f2ac87c2 ("IB/cma: Validate routing of incoming requests") Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 53 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 10 deletions(-) commit 64ebe3126cefa45d7b97a6fc4de846285a55321f Merge: d8a3327 9c55ad1 Author: Linus Torvalds Date: Fri Apr 27 10:56:29 2018 -0700 Merge tag 'ceph-for-4.17-rc3' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "A CephFS quota follow-up and fixes for two older issues in the messenger layer, marked for stable" * tag 'ceph-for-4.17-rc3' of git://github.com/ceph/ceph-client: libceph: validate con->state at the top of try_write() libceph: reschedule a tick in finish_hunting() libceph: un-backoff on tick when we have a authenticated session ceph: check if mds create snaprealm when setting quota commit f604db645a66b7ba4f21c426fe73253928dada41 Author: Matan Barak Date: Tue Apr 24 08:15:20 2018 +0000 IB/uverbs: Fix validating mandatory attributes Previously, if a method contained mandatory attributes in a namespace that wasn't given by the user, these attributes weren't validated. Fixing this by iterating over all specification namespaces. Fixes: fac9658cabb9 ("IB/core: Add new ioctl interface") Signed-off-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_ioctl.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 26bff1bd74a4f7417509a83295614e9dab995b2a Author: Raju Rangoju Date: Mon Apr 23 21:42:37 2018 +0530 RDMA/cxgb4: release hw resources on device removal The c4iw_rdev_close() logic was not releasing all the hw resources (PBL and RQT memory) during the device removal event (driver unload / system reboot). This can cause panic in gen_pool_destroy(). The module remove function will wait for all the hw resources to be released during the device removal event. Fixes c12a67fe(iw_cxgb4: free EQ queue memory on last deref) Signed-off-by: Raju Rangoju Reviewed-by: Steve Wise Cc: stable@vger.kernel.org Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/device.c | 9 ++++++++- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 4 ++++ drivers/infiniband/hw/cxgb4/resource.c | 26 ++++++++++++++++++++++++-- 3 files changed, 36 insertions(+), 3 deletions(-) commit 1da9a586a2ed78d0b5fab4c0cc0473b873e48346 Merge: c7f46cc af8a41c Author: David S. Miller Date: Fri Apr 27 13:48:37 2018 -0400 Merge tag 'wireless-drivers-for-davem-2018-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.17 A few fixes for 4.17 but nothing really special. The new ETSI WMM parameter support for iwlwifi is not technically a bugfix but important for regulatory compliance. iwlwifi * use new ETSI WMM parameters from regulatory database * fix a regression with the older firmware API 31 (eg. 31.560484.0) brcmfmac * fix a double free in nvmam loading fails rtlwifi * yet another fix for ant_sel module parameter ==================== Signed-off-by: David S. Miller commit c7f46cca8c73a44311e4164b9196b4d791f59ac7 Author: Ido Schimmel Date: Thu Apr 26 11:46:29 2018 +0300 mlxsw: spectrum_switchdev: Do not remove mrouter port from MDB's ports list When IGMP snooping is enabled on a bridge, traffic forwarded by an MDB entry should be sent to both ports member in the MDB's ports list and mrouter ports. In case a port needs to be removed from an MDB's ports list, but this port is also configured as an mrouter port, then do not update the device so that it will continue to forward traffic through that port. Fix a copy-paste error that checked that IGMP snooping is enabled twice instead of checking the port's mrouter state. Fixes: ded711c87a04 ("mlxsw: spectrum_switchdev: Consider mrouter status for mdb changes") Signed-off-by: Ido Schimmel Reported-by: Colin King Reviewed-by: Nogah Frankel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit d8a332730e757129e70675679f2b2a03f1ecf65e Merge: ee3748b 6a7228d Author: Linus Torvalds Date: Fri Apr 27 10:39:38 2018 -0700 Merge tag 'char-misc-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char and misc driver fixes for 4.17-rc3 A variety of small things that have fallen out after 4.17-rc1 was out. Some vboxguest fixes for systems with lots of memory, amba bus fixes, some MAINTAINERS updates, uio_hv_generic driver fixes, and a few other minor things that resolve problems that people reported. The amba bus fixes took twice to get right, the first time I messed up applying the patches in the wrong order, hence the revert and later addition again with the correct fix, sorry about that. All of these have been in linux-next with no reported issues" * tag 'char-misc-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: ARM: amba: Fix race condition with driver_override ARM: amba: Make driver_override output consistent with other buses Revert "ARM: amba: Fix race condition with driver_override" ARM: amba: Don't read past the end of sysfs "driver_override" buffer ARM: amba: Fix race condition with driver_override virt: vbox: Log an error when we fail to get the host version virt: vbox: Use __get_free_pages instead of kmalloc for DMA32 memory virt: vbox: Add vbg_req_free() helper function virt: vbox: Move declarations of vboxguest private functions to private header slimbus: Fix out-of-bounds access in slim_slicesize() MAINTAINERS: add dri-devel&linaro-mm for Android ION fpga-manager: altera-ps-spi: preserve nCONFIG state MAINTAINERS: update my email address uio_hv_generic: fix subchannel ring mmap uio_hv_generic: use correct channel in isr uio_hv_generic: make ring buffer attribute for primary channel uio_hv_generic: set size of ring buffer attribute ANDROID: binder: prevent transactions into own process. commit 6a9a27d5397fc6c52f90c09ddab91e65053584aa Author: Xin Long Date: Thu Apr 26 15:21:44 2018 +0800 sctp: clear the new asoc's stream outcnt in sctp_stream_update When processing a duplicate cookie-echo chunk, sctp moves the new temp asoc's stream out/in into the old asoc, and later frees this new temp asoc. But now after this move, the new temp asoc's stream->outcnt is not cleared while stream->out is set to NULL, which would cause a same crash as the one fixed in Commit 79d0895140e9 ("sctp: fix error path in sctp_stream_init") when freeing this asoc later. This fix is to clear this outcnt in sctp_stream_update. Fixes: f952be79cebd ("sctp: introduce struct sctp_stream_out_ext") Reported-by: Jianwen Ji Signed-off-by: Xin Long Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/stream.c | 2 ++ 1 file changed, 2 insertions(+) commit 9306b38e42cb266f98bff6f6f4c1c652aa79ba45 Author: SZ Lin (林上智) Date: Thu Apr 26 14:30:13 2018 +0800 NET: usb: qmi_wwan: add support for ublox R410M PID 0x90b2 This patch adds support for PID 0x90b2 of ublox R410M. qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer [/dev/cdc-wdm0] Device manufacturer retrieved: Manufacturer: 'u-blox' qmicli -d /dev/cdc-wdm0 --dms-get-model [/dev/cdc-wdm0] Device model retrieved: Model: 'SARA-R410M-02B' Signed-off-by: SZ Lin (林上智) Cc: stable Acked-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit d625329b06e46bd20baf9ee40847d11982569204 Author: Xin Long Date: Thu Apr 26 14:13:57 2018 +0800 sctp: handle two v4 addrs comparison in sctp_inet6_cmp_addr Since sctp ipv6 socket also supports v4 addrs, it's possible to compare two v4 addrs in pf v6 .cmp_addr, sctp_inet6_cmp_addr. However after Commit 1071ec9d453a ("sctp: do not check port in sctp_inet6_cmp_addr"), it no longer calls af1->cmp_addr, which in this case is sctp_v4_cmp_addr, but calls __sctp_v6_cmp_addr where it handles them as two v6 addrs. It would cause a out of bounds crash. syzbot found this crash when trying to bind two v4 addrs to a v6 socket. This patch fixes it by adding the process for two v4 addrs in sctp_inet6_cmp_addr. Fixes: 1071ec9d453a ("sctp: do not check port in sctp_inet6_cmp_addr") Reported-by: syzbot+cd494c1dd681d4d93ebb@syzkaller.appspotmail.com Signed-off-by: Xin Long Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/ipv6.c | 3 +++ 1 file changed, 3 insertions(+) commit 1f3ccc3c3fc26468be00392ef0b2c215f9c9d054 Author: Florian Fainelli Date: Wed Apr 25 16:21:51 2018 -0700 net: systemport: Correclty disambiguate driver instances While adding the DSA notifier, we will be sending DSA notifications with info->master that is going to point to a particular net_device instance. Our logic in bcm_sysport_map_queues() correctly disambiguates net_device instances that are not covered by our own driver, but it will not make sure that info->master points to a particular driver instance that we are interested in. In a system where e.g: two or more SYSTEMPORT instances are registered, this would lead in programming two or more times the queue mapping, completely messing with the logic which does the queue/port allocation and tracking. Fix this by looking at the notifier_block pointer which is unique per instance and allows us to go back to our driver private structure, and in turn to the backing net_device instance. Fixes: d156576362c0 ("net: systemport: Establish lower/upper queue mapping") Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 9faedd643fd9f3a53f10ca270d3bbd436b908766 Author: Anders Roxell Date: Wed Apr 25 23:32:06 2018 +0200 selftests: net: add in_netns.sh TEST_GEN_PROGS_EXTENDED Script in_netns.sh is a utility function and not its own test so it shouldn't be part of the TEST_PROGS. The in_netns.sh get used by run_afpackettests. To install in_netns.sh without being added to the main run_kselftest.sh script use the TEST_GEN_PROGS_EXTENDED variable. Fixes: 5ff9c1a3dd92 ("selftests: net: add in_netns.sh to TEST_PROGS") Signed-off-by: Anders Roxell Signed-off-by: David S. Miller tools/testing/selftests/net/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ee3748be5c18db11f17baebf50405bbebeb85471 Merge: b52c85a b93815d Author: Linus Torvalds Date: Fri Apr 27 10:12:20 2018 -0700 Merge tag 'driver-core-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg Kroah-Hartman: "Here are some small driver core and firmware fixes for 4.17-rc3 There's a kobject WARN() removal to make syzkaller a lot happier about some "normal" error paths that it keeps hitting, which should reduce the number of false-positives we have been getting recently. There's also some fimware test and documentation fixes, and the coredump() function signature change that needed to happen after -rc1 before drivers started to take advantage of it. All of these have been in linux-next with no reported issues" * tag 'driver-core-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: firmware: some documentation fixes selftests:firmware: fixes a call to a wrong function name kobject: don't use WARN for registration failures firmware: Fix firmware documentation for recent file renames test_firmware: fix setting old custom fw path back on exit, second try test_firmware: Install all scripts drivers: change struct device_driver::coredump() return type to void commit b52c85a7b78938cbb44eb3c536f5f70426a238ae Merge: 79a17dd9 bcdd0ca Author: Linus Torvalds Date: Fri Apr 27 10:03:38 2018 -0700 Merge tag 'tty-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are some tty and serial driver fixes for reported issues for 4.17-rc3. Nothing major, but a number of small things: - device tree fixes/updates for serial ports - earlycon fixes - n_gsm fixes - tty core change reverted to help resolve syszkaller reports - other serial driver small fixes All of these have been in linux-next with no reported issues" * tag 'tty-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: Use __GFP_NOFAIL for tty_ldisc_get() tty: serial: xuartps: Setup early console when uartclk is also passed tty: Don't call panic() at tty_ldisc_init() tty: Avoid possible error pointer dereference at tty_ldisc_restore(). dt-bindings: mvebu-uart: DT fix s/interrupts-names/interrupt-names/ tty: serial: qcom_geni_serial: Use signed variable to get IRQ earlycon: Use a pointer table to fix __earlycon_table stride serial: sh-sci: Document r8a77470 bindings dt-bindings: meson-uart: DT fix s/clocks-names/clock-names/ serial: imx: fix cached UCR2 read on software reset serial: imx: warn user when using unsupported configuration serial: mvebu-uart: Fix local flags handling on termios update tty: n_gsm: Fix DLCI handling for ADM mode if debug & 2 is not set tty: n_gsm: Fix long delays with control frame timeouts in ADM mode commit 5e62493f1a70e7f13059544daaee05e40e8548e2 Author: KarimAllah Ahmed Date: Tue Apr 17 06:43:58 2018 +0200 x86/headers/UAPI: Move DISABLE_EXITS KVM capability bits to the UAPI Move DISABLE_EXITS KVM capability bits to the UAPI just like the rest of capabilities. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed Signed-off-by: Radim Krčmář arch/x86/kvm/x86.h | 7 ------- include/uapi/linux/kvm.h | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) commit 79a17dd9d2491443a0d03745adbb3d76ab97a356 Merge: 1993cbf0 b00e2fd Author: Linus Torvalds Date: Fri Apr 27 09:37:12 2018 -0700 Merge tag 'staging-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging fixes from Greg KH: "Here are two staging driver fixups for 4.17-rc3. The first is the remaining stragglers of the irda code removal that you pointed out during the merge window. The second is a fix for the wilc1000 driver due to a patch that got merged in 4.17-rc1. Both of these have been in linux-next for a while with no reported issues" * tag 'staging-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: wilc1000: fix NULL pointer exception in host_int_parse_assoc_resp_info() staging: irda: remove remaining remants of irda code removal commit 1993cbf06aa95c0fcf080f2e858c116306b6c29e Merge: 7ff5000 573a094 Author: Linus Torvalds Date: Fri Apr 27 09:32:20 2018 -0700 Merge tag 'usb-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a number of USB driver fixes for reported problems for 4.17-rc3. The "largest" here is a number of phy core changes for reported problems with the -rc1 release. There's also the usual musb and xhci fixes, as well as new device id updates. There are also some usbip fixes for reported problems as more people start to use that code with containers. All of these have been in linux-next with no reported issues, except the last few new device ids, which are "obviously correct" :)" * tag 'usb-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (26 commits) USB: musb: dsps: drop duplicate phy initialisation USB: musb: host: prevent core phy initialisation usb: core: phy: add the SPDX-License-Identifier and include guard xhci: Fix Kernel oops in xhci dbgtty usb: select USB_COMMON for usb role switch config usb: core: phy: add missing forward declaration for "struct device" usb: core: phy: make it a no-op if CONFIG_GENERIC_PHY is disabled usb: core: use phy_exit during suspend if wake up is not supported usb: core: split usb_phy_roothub_{init,alloc} usb: core: phy: fix return value of usb_phy_roothub_exit() usb: typec: ucsi: Increase command completion timeout value Revert "xhci: plat: Register shutdown for xhci_plat" usb: core: Add quirk for HP v222w 16GB Mini Documentation: typec.rst: Use literal-block element with ascii art usb: typec: ucsi: fix tracepoint related build error usbip: usbip_event: fix to not print kernel pointer address usbip: usbip_host: fix to hold parent lock for device_attach() calls usbip: vhci_hcd: Fix usb device and sockfd leaks usbip: vhci_hcd: check rhport before using in vhci_hub_control() USB: Increment wakeup count on remote wakeup. ... commit 7ff5000268355c63dc948ecb01f4de17987586e5 Merge: ee7141c 0f92566 Author: Linus Torvalds Date: Fri Apr 27 09:29:18 2018 -0700 Merge tag 'sound-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A significant amount of fixes have been piled up at this time. - Possible Spectre v1 coverage in OSS sequencer API, control API, HD-audio hwdep ioctl, ASIHPI hwdep ioctl, OPL3, and HDSPM/RME channel_info API. - A regression fix in PCM delay reporting that happened at the code refactoring for the set_fs() removal - The long-standing bug in PCM sync_ptr ioctl that missed the audio timestamp field - USB-audio regression fixes due to the recent UAC2 jack support - vm_fault_t conversions in a couple of places - ASoC topology API fixes - Assorted driver fixes: * ASoC rsnd, FSL, Intel SST, DMIC, AMD, ADAU17x1, Realtek codec * FireWire typo fix * HD-audio quirks and USB-audio Dell fixup * USB-audio UAC3 corrections" * tag 'sound-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (35 commits) ALSA: dice: fix error path to destroy initialized stream data ALSA: hda - Skip jack and others for non-existing PCM streams ALSA: hda/realtek - change the location for one of two front mics ALSA: rme9652: Hardening for potential Spectre v1 ALSA: hdspm: Hardening for potential Spectre v1 ALSA: asihpi: Hardening for potential Spectre v1 ALSA: opl3: Hardening for potential Spectre v1 ALSA: hda: Hardening for potential Spectre v1 ALSA: control: Hardening for potential Spectre v1 ALSA: seq: oss: Hardening for potential Spectre v1 ALSA: seq: oss: Fix unbalanced use lock for synth MIDI device ALSA: hda/realtek - Update ALC255 depop optimize ALSA: hda/realtek - Add some fixes for ALC233 ALSA: pcm: Change return type to vm_fault_t ALSA: usx2y: Change return type to vm_fault_t ALSA: usb-audio: ADC3: Fix channel mapping conversion for ADC3. ALSA: dice: fix OUI for TC group ALSA: usb-audio: Skip broken EU on Dell dock USB-audio ALSA: usb-audio: Fix missing endian conversion ALSA: usb-audio: Fix forgotten conversion of control query functions ... commit ee7141c929b3a7bfc06071f5c9d24bfe72d4f92e Merge: 245131e 4ea3f05 Author: Linus Torvalds Date: Fri Apr 27 09:22:06 2018 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "This round of fixes has two larger changes that came in last week: - a couple of patches all intended to finally turn on USB support on various Amlogic SoC based boards. The respective driver were not finalized until very late before the merge window and the DT portion is the last bit now. - a defconfig update for gemini that had repeatedly missed the cut but that is required to actually boot any real machines with the default build. The rest are the usual small changes: - a fix for a nasty build regression on the OMAP memory drivers - a fix for a boot problem on Intel/Altera SocFPGA - a MAINTAINER file update - a couple of fixes for issues found by automated testing (kernelci, coverity, sparse, ...) - a few incorrect DT entries are updated to match the hardware" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: defconfig: Update Gemini defconfig ARM: s3c24xx: jive: Fix some GPIO names HISI LPC: Add Kconfig MFD_CORE dependency ARM: dts: Fix NAS4220B pin config MAINTAINERS: Remove myself as maintainer arm64: dts: correct SATA addresses for Stingray ARM64: dts: meson-gxm-khadas-vim2: enable the USB controller ARM64: dts: meson-gxl-nexbox-a95x: enable the USB controller ARM64: dts: meson-gxl-s905x-libretech-cc: enable the USB controller ARM64: dts: meson-gx-p23x-q20x: enable the USB controller ARM64: dts: meson-gxl-s905x-p212: enable the USB controller ARM64: dts: meson-gxm: add GXM specific USB host configuration ARM64: dts: meson-gxl: add USB host support ARM: OMAP2+: Fix build when using split object directories soc: bcm2835: Make !RASPBERRYPI_FIRMWARE dummies return failure soc: bcm: raspberrypi-power: Fix use of __packed ARM: dts: Fix cm2 and prm sizes for omap4 ARM: socfpga_defconfig: Remove QSPI Sector 4K size force firmware: arm_scmi: remove redundant null check on array arm64: dts: juno: drop unnecessary address-cells and size-cells properties commit 245131e2d61d22e88cf0ebbd0a01bb446ec9c19a Merge: 0f940fa f6997be Author: Linus Torvalds Date: Fri Apr 27 09:15:06 2018 -0700 Merge tag 'mtd/fixes-for-4.17-rc3' of git://git.infradead.org/linux-mtd Pull mtd fixes from Boris Brezillon: - Fix nanddev_mtd_erase() function to match the changes done in e7bfb3fdbde3 ("mtd: Stop updating erase_info->state and calling mtd_erase_callback()") - Fix a memory leak in the Tango NAND controller driver - Fix read/write to a suspended erase block in the CFI driver - Fix the DT parsing logic in the Marvell NAND controller driver * tag 'mtd/fixes-for-4.17-rc3' of git://git.infradead.org/linux-mtd: mtd: rawnand: marvell: fix the chip-select DT parsing logic mtd: cfi: cmdset_0002: Do not allow read/write to suspend erase block. mtd: cfi: cmdset_0001: Workaround Micron Erase suspend bug. mtd: cfi: cmdset_0001: Do not allow read/write to suspend erase block. mtd: spi-nor: cadence-quadspi: Fix page fault kernel panic mtd: nand: Fix nanddev_mtd_erase() mtd: rawnand: tango: Fix struct clk memory leak commit 0f940fac655d5a728bc5ef6204d2ec4c3b3ea6c3 Merge: 0644f18 24d9092 Author: Linus Torvalds Date: Fri Apr 27 09:06:22 2018 -0700 Merge tag 'drm-fixes-for-v4.17-rc3' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Pretty run of the mill for this stage in the cycle: msm, i915, amdgpu, qxl, virtio-gpu, sun4i fixes. i915: - Black screen fixes - Display w/a fix - HDA codec interop fix sun4i: - tbsa711 tablet regression fix qxl: - Regression fixes due to changes in TTM virtio: - Fix wait event condition msm: - DSI display fixes amdgpu: - fix hang on Carrizo - DP MST hang fixes - irq handling deadlock in DC. amdkfd: - Fix Kconfig issue - Clock retrieval fix - Sparse fixes" * tag 'drm-fixes-for-v4.17-rc3' of git://people.freedesktop.org/~airlied/linux: (27 commits) drm/edid: Reset more of the display info drm/virtio: fix vq wait_event condition qxl: keep separate release_bo pointer qxl: fix qxl_release_{map,unmap} Revert "drm/sun4i: add lvds mode_valid function" drm/amd/display: Check dc_sink every time in MST hotplug drm/amd/display: Update MST edid property every time drm/amd/display: Don't read EDID in atomic_check drm/amd/display: Disallow enabling CRTC without primary plane with FB drm/amd/display: Fix deadlock when flushing irq drm/i915/fbdev: Enable late fbdev initial configuration drm/i915: Use ktime on wait_for drm/amdgpu: set COMPUTE_PGM_RSRC1 for SGPR/VGPR clearing shaders drm/amdkfd: fix build, select MMU_NOTIFIER drm/amdkfd: fix clock counter retrieval for node without GPU drm/amdkfd: Fix the error return code in kfd_ioctl_unmap_memory_from_gpu() drm/amdkfd: kfd_dev_is_large_bar() can be static drm/i915: Enable display WA#1183 from its correct spot drm/i915/audio: set minimum CD clock to twice the BCLK drm/msm: don't deref error pointer in the msm_fbdev_create error path ... commit 8f22e52528cc372b218b5f100457469615c733ce Author: Takashi Iwai Date: Thu Apr 26 09:17:45 2018 +0200 ALSA: seq: Fix races at MIDI encoding in snd_virmidi_output_trigger() The sequencer virmidi code has an open race at its output trigger callback: namely, virmidi keeps only one event packet for processing while it doesn't protect for concurrent output trigger calls. snd_virmidi_output_trigger() tries to process the previously unfinished event before starting encoding the given MIDI stream, but this is done without any lock. Meanwhile, if another rawmidi stream starts the output trigger, this proceeds further, and overwrites the event package that is being processed in another thread. This eventually corrupts and may lead to the invalid memory access if the event type is like SYSEX. The fix is just to move the spinlock to cover both the pending event and the new stream. The bug was spotted by a new fuzzer, RaceFuzzer. BugLink: http://lkml.kernel.org/r/20180426045223.GA15307@dragonet.kaist.ac.kr Reported-by: DaeRyong Jeong Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_virmidi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 16ae6aa1705299789f71fdea59bfb119c1fbd9c0 Author: Yuchung Cheng Date: Wed Apr 25 11:33:08 2018 -0700 tcp: ignore Fast Open on repair mode The TCP repair sequence of operation is to first set the socket in repair mode, then inject the TCP stats into the socket with repair socket options, then call connect() to re-activate the socket. The connect syscall simply returns and set state to ESTABLISHED mode. As a result Fast Open is meaningless for TCP repair. However allowing sendto() system call with MSG_FASTOPEN flag half-way during the repair operation could unexpectedly cause data to be sent, before the operation finishes changing the internal TCP stats (e.g. MSS). This in turn triggers TCP warnings on inconsistent packet accounting. The fix is to simply disallow Fast Open operation once the socket is in the repair mode. Reported-by: syzbot Signed-off-by: Yuchung Cheng Reviewed-by: Neal Cardwell Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f43194c1447c9536efb0859c2f3f46f6bf2b9154 Author: Maxime Chevallier Date: Wed Apr 25 20:19:47 2018 +0200 ARM64: dts: marvell: armada-cp110: Add mg_core_clk for ethernet node Marvell PPv2.2 controller present on CP-110 need the extra "mg_core_clk" clock to avoid system hangs when powering some network interfaces up. This issue appeared after a recent clock rework on Armada 7K/8K platforms. This commit adds the new clock and updates the documentation accordingly. [gregory.clement: use the real first commit to fix and add the cc:stable flag] Fixes: e3af9f7c6ece ("RM64: dts: marvell: armada-cp110: Fix clock resources for various node") Cc: Signed-off-by: Maxime Chevallier Signed-off-by: Gregory CLEMENT Documentation/devicetree/bindings/net/marvell-pp2.txt | 9 +++++---- arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) commit a057344806d035cb9ac991619fa07854e807562d Author: Maxime Chevallier Date: Wed Apr 25 13:07:31 2018 +0200 ARM64: dts: marvell: armada-cp110: Add clocks for the xmdio node The Marvell XSMI controller needs 3 clocks to operate correctly : - The MG clock (clk 5) - The MG Core clock (clk 6) - The GOP clock (clk 18) This commit adds them, to avoid system hangs when using these interfaces. [gregory.clement: use the real first commit to fix and add the cc:stable flag] Fixes: f66b2aff46ea ("arm64: dts: marvell: add xmdio nodes for 7k/8k") Cc: Signed-off-by: Maxime Chevallier Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit a468f2dbf921d02f5107378501693137a812999b Author: Junaid Shahid Date: Thu Apr 26 13:09:50 2018 -0700 kvm: apic: Flush TLB after APIC mode/address change if VPIDs are in use Currently, KVM flushes the TLB after a change to the APIC access page address or the APIC mode when EPT mode is enabled. However, even in shadow paging mode, a TLB flush is needed if VPIDs are being used, as specified in the Intel SDM Section 29.4.5. So replace vmx_flush_tlb_ept_only() with vmx_flush_tlb(), which will flush if either EPT or VPIDs are in use. Signed-off-by: Junaid Shahid Reviewed-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit cc2180a5880d0fd8491182cdc65e8df9696a7c9e Merge: c55ca68 9af771c Author: David S. Miller Date: Fri Apr 27 11:22:56 2018 -0400 Merge branch 'mvpp2-fixes' Maxime Chevallier says: ==================== net: mvpp2: Fix hangs when starting some interfaces on 7k/8k Armada 7K / 8K clock management has recently been reworked, see : commit c7e92def1ef4 ("clk: mvebu: cp110: Fix clock tree representation") I have been experiencing overall system hangs on MacchiatoBin when starting the eth1 interface since then. It turns out some clocks dependencies were missing in the PPv2 and xmdio driver, the clock rework made this visible. This is the V2 series, that adds support for the missing 'MG Core clock' in mvpp2, and fixes an issue with the error path for the axi_clk. Thanks to Gregory Clement for finding the root cause of this bug. V2 : Remove all DT patches from this series, they will be merged through the mvebu tree. ==================== Signed-off-by: David S. Miller commit 9af771ced473f92b5e57d086a0c2453fc0cb149c Author: Maxime Chevallier Date: Wed Apr 25 20:21:17 2018 +0200 net: mvpp2: Fix clock resource by adding missing mg_core_clk Marvell's PPv2.2 IP needs an additional clock named "MG Core clock". This is required on Armada 7K and 8K. This commit adds the required clock in mvpp2, making sure it's only used on PPv2.2. Fixes: c7e92def1ef4 ("clk: mvebu: cp110: Fix clock tree representation") Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 45f972adb7f4db2d7f02af728ccd104113336074 Author: Maxime Chevallier Date: Wed Apr 25 20:21:16 2018 +0200 net: mvpp2: Fix clk error path in mvpp2_probe When clk_prepare_enable fails for the axi_clk, the mg_clk isn't properly cleaned up. Add another jump label to handle that case, and make sure we jump to it in the later error cases. Fixes: 4792ea04bcd0 ("net: mvpp2: Fix clock resource by adding an optional bus clock") Signed-off-by: Maxime Chevallier Acked-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 6a30abaa40b62aed46ef12ea4c16c48565bdb376 Author: Takashi Iwai Date: Fri Apr 27 17:17:35 2018 +0200 ALSA: hda - Fix incorrect usage of IS_REACHABLE() The commit c469652bb5e8 ("ALSA: hda - Use IS_REACHABLE() for dependency on input") simplified the dependencies with IS_REACHABLE() macro, but it broke due to its incorrect usage: it should have been IS_REACHABLE(CONFIG_INPUT) instead of IS_REACHABLE(INPUT). Fixes: c469652bb5e8 ("ALSA: hda - Use IS_REACHABLE() for dependency on input") Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7cb7b85be55a4906b4b4b30596db1043dae6335 Author: Greg Thelen Date: Thu Apr 26 11:19:35 2018 -0700 IB: make INFINIBAND_ADDR_TRANS configurable Allow INFINIBAND without INFINIBAND_ADDR_TRANS because fuzzing has been finding fair number of CM bugs. So provide option to disable it. Signed-off-by: Greg Thelen Cc: Tarick Bedeir Reviewed-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5a3bc8a4abbd2d553430218d3a320400dce811b7 Author: Greg Thelen Date: Thu Apr 26 11:19:34 2018 -0700 ib_srp: depend on INFINIBAND_ADDR_TRANS INFINIBAND_SRP code depends on INFINIBAND_ADDR_TRANS provided symbols. So declare the kconfig dependency. This is necessary to allow for enabling INFINIBAND without INFINIBAND_ADDR_TRANS. Signed-off-by: Greg Thelen Cc: Tarick Bedeir Reviewed-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c6b03d18df657d677808d7090b4d03bc6026efd Author: Greg Thelen Date: Thu Apr 26 11:19:33 2018 -0700 cifs: smbd: depend on INFINIBAND_ADDR_TRANS CIFS_SMB_DIRECT code depends on INFINIBAND_ADDR_TRANS provided symbols. So declare the kconfig dependency. This is necessary to allow for enabling INFINIBAND without INFINIBAND_ADDR_TRANS. Signed-off-by: Greg Thelen Cc: Tarick Bedeir Reviewed-by: Long Li Signed-off-by: Doug Ledford fs/cifs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 346a47b65d10e450778ec0d21e4a9409f25daaa8 Author: Greg Thelen Date: Thu Apr 26 11:19:32 2018 -0700 ib_srpt: depend on INFINIBAND_ADDR_TRANS INFINIBAND_SRPT code depends on INFINIBAND_ADDR_TRANS provided symbols. So declare the kconfig dependency. This is necessary to allow for enabling INFINIBAND without INFINIBAND_ADDR_TRANS. Signed-off-by: Greg Thelen Cc: Tarick Bedeir Reviewed-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6fc6a22fc7d3df987666725496ed5dd2dd30f23 Author: Greg Thelen Date: Thu Apr 26 11:19:31 2018 -0700 nvmet-rdma: depend on INFINIBAND_ADDR_TRANS NVME_TARGET_RDMA code depends on INFINIBAND_ADDR_TRANS provided symbols. So declare the kconfig dependency. This is necessary to allow for enabling INFINIBAND without INFINIBAND_ADDR_TRANS. Signed-off-by: Greg Thelen Cc: Tarick Bedeir Signed-off-by: Doug Ledford drivers/nvme/target/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3af7a156bdc356946098e13180be66b6420619bf Author: Greg Thelen Date: Thu Apr 26 11:19:30 2018 -0700 nvme: depend on INFINIBAND_ADDR_TRANS NVME_RDMA code depends on INFINIBAND_ADDR_TRANS provided symbols. So declare the kconfig dependency. This is necessary to allow for enabling INFINIBAND without INFINIBAND_ADDR_TRANS. Signed-off-by: Greg Thelen Cc: Tarick Bedeir Signed-off-by: Doug Ledford drivers/nvme/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c55ca688ed99a9cb79367aee2ed2ff6cb80fc039 Author: Jakub Kicinski Date: Wed Apr 25 11:21:08 2018 -0700 nfp: don't depend on eth_tbl being available For very very old generation of the management FW Ethernet port information table may theoretically not be available. This in turn will cause the nfp_port structures to not be allocated. Make sure we don't crash the kernel when there is no eth_tbl: RIP: 0010:nfp_net_pci_probe+0xf2/0xb40 [nfp] ... Call Trace: nfp_pci_probe+0x6de/0xab0 [nfp] local_pci_probe+0x47/0xa0 work_for_cpu_fn+0x1a/0x30 process_one_work+0x1de/0x3e0 Found while working with broken/development version of management FW. Fixes: a5950182c00e ("nfp: map mac_stats and vf_cfg BARs") Fixes: 93da7d9660ee ("nfp: provide nfp_port to of nfp_net_get_mac_addr()") Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/main.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_app_nic.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_main.h | 4 ++- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 31 +++++++++++++---------- 4 files changed, 23 insertions(+), 16 deletions(-) commit 8bb2610bc4967f19672444a7b0407367f1540028 Author: Andy Lutomirski Date: Tue Apr 17 07:36:36 2018 -0700 x86/entry/64/compat: Preserve r8-r11 in int $0x80 32-bit user code that uses int $80 doesn't care about r8-r11. There is, however, some 64-bit user code that intentionally uses int $0x80 to invoke 32-bit system calls. From what I've seen, basically all such code assumes that r8-r15 are all preserved, but the kernel clobbers r8-r11. Since I doubt that there's any code that depends on int $0x80 zeroing r8-r11, change the kernel to preserve them. I suspect that very little user code is broken by the old clobber, since r8-r11 are only rarely allocated by gcc, and they're clobbered by function calls, so they only way we'd see a problem is if the same function that invokes int $0x80 also spills something important to one of these registers. The current behavior seems to date back to the historical commit "[PATCH] x86-64 merge for 2.6.4". Before that, all regs were preserved. I can't find any explanation of why this change was made. Update the test_syscall_vdso_32 testcase as well to verify the new behavior, and it strengthens the test to make sure that the kernel doesn't accidentally permute r8..r15. Suggested-by: Denys Vlasenko Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Dominik Brodowski Link: https://lkml.kernel.org/r/d4c4d9985fbe64f8c9e19291886453914b48caee.1523975710.git.luto@kernel.org arch/x86/entry/entry_64_compat.S | 8 +++--- tools/testing/selftests/x86/test_syscall_vdso.c | 35 +++++++++++++++---------- 2 files changed, 25 insertions(+), 18 deletions(-) commit 1a512c0882bd311c5b5561840fcfbe4c25b8f319 Author: Arnd Bergmann Date: Tue Apr 24 23:19:51 2018 +0200 x86/ipc: Fix x32 version of shmid64_ds and msqid64_ds A bugfix broke the x32 shmid64_ds and msqid64_ds data structure layout (as seen from user space) a few years ago: Originally, __BITS_PER_LONG was defined as 64 on x32, so we did not have padding after the 64-bit __kernel_time_t fields, After __BITS_PER_LONG got changed to 32, applications would observe extra padding. In other parts of the uapi headers we seem to have a mix of those expecting either 32 or 64 on x32 applications, so we can't easily revert the path that broke these two structures. Instead, this patch decouples x32 from the other architectures and moves it back into arch specific headers, partially reverting the even older commit 73a2d096fdf2 ("x86: remove all now-duplicate header files"). It's not clear whether this ever made any difference, since at least glibc carries its own (correct) copy of both of these header files, so possibly no application has ever observed the definitions here. Based on a suggestion from H.J. Lu, I tried out the tool from https://github.com/hjl-tools/linux-header to find other such bugs, which pointed out the same bug in statfs(), which also has a separate (correct) copy in glibc. Fixes: f4b4aae18288 ("x86/headers/uapi: Fix __BITS_PER_LONG value for x32 builds") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Cc: "H . J . Lu" Cc: Jeffrey Walton Cc: stable@vger.kernel.org Cc: "H. Peter Anvin" Link: https://lkml.kernel.org/r/20180424212013.3967461-1-arnd@arndb.de arch/x86/include/uapi/asm/msgbuf.h | 31 ++++++++++++++++++++++++++++ arch/x86/include/uapi/asm/shmbuf.h | 42 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) commit 3db3eb285259ac129f7aec6b814b3e9f6c1b372b Author: Petr Tesarik Date: Wed Apr 25 12:08:35 2018 +0200 x86/setup: Do not reserve a crash kernel region if booted on Xen PV Xen PV domains cannot shut down and start a crash kernel. Instead, the crashing kernel makes a SCHEDOP_shutdown hypercall with the reason code SHUTDOWN_crash, cf. xen_crash_shutdown() machine op in arch/x86/xen/enlighten_pv.c. A crash kernel reservation is merely a waste of RAM in this case. It may also confuse users of kexec_load(2) and/or kexec_file_load(2). When flags include KEXEC_ON_CRASH or KEXEC_FILE_ON_CRASH, respectively, these syscalls return success, which is technically correct, but the crash kexec image will never be actually used. Signed-off-by: Petr Tesarik Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Cc: Tom Lendacky Cc: Dou Liyang Cc: Mikulas Patocka Cc: Andy Lutomirski Cc: "H. Peter Anvin" Cc: xen-devel@lists.xenproject.org Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Jean Delvare Link: https://lkml.kernel.org/r/20180425120835.23cef60c@ezekiel.suse.cz arch/x86/kernel/setup.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7dbc73e6124ce4d0cfbdd6166de388e9367c47ad Author: Jon Maloy Date: Wed Apr 25 18:29:25 2018 +0200 tipc: fix bug in function tipc_nl_node_dump_monitor Commit 36a50a989ee8 ("tipc: fix infinite loop when dumping link monitor summary") intended to fix a problem with user tool looping when max number of bearers are enabled. Unfortunately, the wrong version of the commit was posted, so the problem was not solved at all. This commit adds the missing part. Fixes: 36a50a989ee8 ("tipc: fix infinite loop when dumping link monitor summary") Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 444261ca6ff201fa03de97a5041237e67a9d8d31 Author: Leon Romanovsky Date: Mon Apr 23 17:01:56 2018 +0300 RDMA/mlx5: Properly check return value of mlx5_get_uars_page Starting from commit 72f36be06138 ("net/mlx5: Fix mlx5_get_uars_page to return error code") the mlx5_get_uars_page() call returns error in case of failure, but it was mistakenly overlooked in the merge commit. Fixes: e7996a9a77fc ("Merge tag v4.15 of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git") Reported-by: Alaa Hleihel Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 84a6a7a99c0ac2f67366288c0625c9fba176b264 Author: Parav Pandit Date: Mon Apr 23 17:01:55 2018 +0300 IB/mlx5: Fix represent correct netdevice in dual port RoCE In commit bcf87f1dbbec ("IB/mlx5: Listen to netdev register/unresiter events in switchdev mode") incorrectly mapped primary device's netdevice to 2nd port netdevice. It always represented primary port's netdevice for 2nd port netdevice when ib representors were not used. This results into failing to process CM request arriving on 2nd port due to incorrect mapping of netdevice. This fix corrects it by considering the right mdev. Cc: # 4.16 Fixes: bcf87f1dbbec ("IB/mlx5: Listen to netdev register/unresiter events in switchdev mode") Reviewed-by: Mark Bloch Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f32ac2e452c2180cd2df581cbadac183e27ecd0 Author: Danit Goldberg Date: Mon Apr 23 17:01:54 2018 +0300 IB/mlx5: Use unlimited rate when static rate is not supported Before the change, if the user passed a static rate value different than zero and the FW doesn't support static rate, it would end up configuring rate of 2.5 GBps. Fix this by using rate 0; unlimited, in cases where FW doesn't support static rate configuration. Cc: # 3.10 Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Reviewed-by: Majd Dibbiny Signed-off-by: Danit Goldberg Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 002bf2282b2d7318e444dca9ffcb994afc5d5f15 Author: Leon Romanovsky Date: Mon Apr 23 17:01:53 2018 +0300 RDMA/mlx5: Protect from shift operand overflow Ensure that user didn't supply values too large that can cause overflow. UBSAN: Undefined behaviour in drivers/infiniband/hw/mlx5/qp.c:263:23 shift exponent -2147483648 is negative CPU: 0 PID: 292 Comm: syzkaller612609 Not tainted 4.16.0-rc1+ #131 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.0-0-g63451fca13-prebuilt.qemu-project.org 04/01/2014 Call Trace: dump_stack+0xde/0x164 ubsan_epilogue+0xe/0x81 set_rq_size+0x7c2/0xa90 create_qp_common+0xc18/0x43c0 mlx5_ib_create_qp+0x379/0x1ca0 create_qp.isra.5+0xc94/0x2260 ib_uverbs_create_qp+0x21b/0x2a0 ib_uverbs_write+0xc2c/0x1010 vfs_write+0x1b0/0x550 SyS_write+0xc7/0x1a0 do_syscall_64+0x1aa/0x740 entry_SYSCALL_64_after_hwframe+0x26/0x9b RIP: 0033:0x433569 RSP: 002b:00007ffc6e62f448 EFLAGS: 00000217 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00000000004002f8 RCX: 0000000000433569 RDX: 0000000000000070 RSI: 00000000200042c0 RDI: 0000000000000003 RBP: 00000000006d5018 R08: 00000000004002f8 R09: 00000000004002f8 R10: 00000000004002f8 R11: 0000000000000217 R12: 0000000000000000 R13: 000000000040c9f0 R14: 000000000040ca80 R15: 0000000000000006 Cc: # 3.10 Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Cc: syzkaller Reported-by: Noa Osherovich Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 4 ++++ 1 file changed, 4 insertions(+) commit b4bd701ac469075d94ed9699a28755f2862252b9 Author: Leon Romanovsky Date: Mon Apr 23 17:01:52 2018 +0300 RDMA/mlx5: Fix multiple NULL-ptr deref errors in rereg_mr flow Failure in rereg MR releases UMEM but leaves the MR to be destroyed by the user. As a result the following scenario may happen: "create MR -> rereg MR with failure -> call to rereg MR again" and hit "NULL-ptr deref or user memory access" errors. Ensure that rereg MR is only performed on a non-dead MR. Cc: syzkaller Cc: # 4.5 Fixes: 395a8e4c32ea ("IB/mlx5: Refactoring register MR code") Reported-by: Noa Osherovich Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) commit c8da6cdef57b459ac0fd5d9d348f8460a575ae90 Author: Marek Szyprowski Date: Mon Apr 16 12:11:53 2018 +0200 thermal: exynos: Propagate error value from tmu_read() tmu_read() in case of Exynos4210 might return error for out of bound values. Current code ignores such value, what leads to reporting critical temperature value. Add proper error code propagation to exynos_get_temp() function. Signed-off-by: Marek Szyprowski CC: stable@vger.kernel.org # v4.6+ Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Eduardo Valentin drivers/thermal/samsung/exynos_tmu.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 88fc6f73fddf64eb507b04f7b2bd01d7291db514 Author: Marek Szyprowski Date: Mon Apr 16 12:11:52 2018 +0200 thermal: exynos: Reading temperature makes sense only when TMU is turned on When thermal sensor is not yet enabled, reading temperature might return random value. This might even result in stopping system booting when such temperature is higher than the critical value. Fix this by checking if TMU has been actually enabled before reading the temperature. This change fixes booting of Exynos4210-based board with TMU enabled (for example Samsung Trats board), which was broken since v4.4 kernel release. Signed-off-by: Marek Szyprowski Fixes: 9e4249b40340 ("thermal: exynos: Fix first temperature read after registering sensor") CC: stable@vger.kernel.org # v4.6+ Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Eduardo Valentin drivers/thermal/samsung/exynos_tmu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b4678df184b314a2bd47d2329feca2c2534aa12b Author: Matthew Wilcox Date: Tue Apr 24 14:02:57 2018 -0700 errseq: Always report a writeback error once The errseq_t infrastructure assumes that errors which occurred before the file descriptor was opened are of no interest to the application. This turns out to be a regression for some applications, notably Postgres. Before errseq_t, a writeback error would be reported exactly once (as long as the inode remained in memory), so Postgres could open a file, call fsync() and find out whether there had been a writeback error on that file from another process. This patch changes the errseq infrastructure to report errors to all file descriptors which are opened after the error occurred, but before it was reported to any file descriptor. This restores the user-visible behaviour. Cc: stable@vger.kernel.org Fixes: 5660e13d2fd6 ("fs: new infrastructure for writeback error handling and reporting") Signed-off-by: Matthew Wilcox Reviewed-by: Jeff Layton Signed-off-by: Jeff Layton lib/errseq.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 2a010461207cc96bee5ab81748325dec1972976f Author: Baolin Wang Date: Mon Apr 9 14:40:55 2018 +0800 i2c: sprd: Fix the i2c count issue We found the I2C controller count register is unreliable sometimes, that will cause I2C to lose data. Thus we can read the data count from 'i2c_dev->count' instead of the I2C controller count register. Signed-off-by: Baolin Wang Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-sprd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit da33aa03fa34c918faf2c371ebda0dd961d7ccb2 Author: Baolin Wang Date: Mon Apr 9 14:40:54 2018 +0800 i2c: sprd: Prevent i2c accesses after suspend is called Add one flag to indicate if the i2c controller has been in suspend state, which can prevent i2c accesses after i2c controller is suspended following system suspend. Signed-off-by: Baolin Wang Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-sprd.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 23a27722b5292ef0b27403c87a109feea8296a5c Author: Alexander Popov Date: Thu Apr 19 15:29:22 2018 +0300 i2c: dev: prevent ZERO_SIZE_PTR deref in i2cdev_ioctl_rdwr() i2cdev_ioctl_rdwr() allocates i2c_msg.buf using memdup_user(), which returns ZERO_SIZE_PTR if i2c_msg.len is zero. Currently i2cdev_ioctl_rdwr() always dereferences the buf pointer in case of I2C_M_RD | I2C_M_RECV_LEN transfer. That causes a kernel oops in case of zero len. Let's check the len against zero before dereferencing buf pointer. This issue was triggered by syzkaller. Signed-off-by: Alexander Popov Reviewed-by: Uwe Kleine-König [wsa: use '< 1' instead of '!' for easier readability] Signed-off-by: Wolfram Sang drivers/i2c/i2c-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53692908b0f594285aba18ab848318262332ed25 Author: Marc Zyngier Date: Wed Apr 18 10:39:04 2018 +0100 KVM: arm/arm64: vgic: Fix source vcpu issues for GICv2 SGI Now that we make sure we don't inject multiple instances of the same GICv2 SGI at the same time, we've made another bug more obvious: If we exit with an active SGI, we completely lose track of which vcpu it came from. On the next entry, we restore it with 0 as a source, and if that wasn't the right one, too bad. While this doesn't seem to trouble GIC-400, the architectural model gets offended and doesn't deactivate the interrupt on EOI. Another connected issue is that we will happilly make pending an interrupt from another vcpu, overriding the above zero with something that is just as inconsistent. Don't do that. The final issue is that we signal a maintenance interrupt when no pending interrupts are present in the LR. Assuming we've fixed the two issues above, we end-up in a situation where we keep exiting as soon as we've reached the active state, and not be able to inject the following pending. The fix comes in 3 parts: - GICv2 SGIs have their source vcpu saved if they are active on exit, and restored on entry - Multi-SGIs cannot go via the Pending+Active state, as this would corrupt the source field - Multi-SGIs are converted to using MI on EOI instead of NPIE Fixes: 16ca6a607d84bef0 ("KVM: arm/arm64: vgic: Don't populate multiple LRs with the same vintid") Reported-by: Mark Rutland Tested-by: Mark Rutland Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier include/kvm/arm_vgic.h | 1 + virt/kvm/arm/vgic/vgic-mmio.c | 10 +++++++-- virt/kvm/arm/vgic/vgic-v2.c | 38 +++++++++++++++++++-------------- virt/kvm/arm/vgic/vgic-v3.c | 49 +++++++++++++++++++++++++------------------ virt/kvm/arm/vgic/vgic.c | 30 +++++++------------------- virt/kvm/arm/vgic/vgic.h | 14 +++++++++++++ 6 files changed, 81 insertions(+), 61 deletions(-) commit 3789c122d0a016b947ce5c05d3f1fbafa5db8f26 Author: Mark Rutland Date: Fri Apr 27 11:50:36 2018 +0100 arm64: avoid instrumenting atomic_ll_sc.o Our out-of-line atomics are built with a special calling convention, preventing pointless stack spilling, and allowing us to patch call sites with ARMv8.1 atomic instructions. Instrumentation inserted by the compiler may result in calls to functions not following this special calling convention, resulting in registers being unexpectedly clobbered, and various problems resulting from this. For example, if a kernel is built with KCOV and ARM64_LSE_ATOMICS, the compiler inserts calls to __sanitizer_cov_trace_pc in the prologues of the atomic functions. This has been observed to result in spurious cmpxchg failures, leading to a hang early on in the boot process. This patch avoids such issues by preventing instrumentation of our out-of-line atomics. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/lib/Makefile | 4 ++++ 1 file changed, 4 insertions(+) commit e6914365fd280fce303a89b8a8d4529af5a2e0f9 Author: Masahiro Yamada Date: Thu Apr 12 11:16:10 2018 +0900 reset: uniphier: fix USB clock line for LD20 For LD20, the bit 5 of the offset 0x200c turned out to be a USB3 reset. The hardware document says it is the GIO reset despite LD20 has no GIO bus, confusingly. Also, fix confusing comments for PXs3. Signed-off-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/reset-uniphier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4ea3f05614926fea280befaa693ba494a500c2c4 Merge: c12d7e9 4555a50 Author: Arnd Bergmann Date: Fri Apr 27 10:20:57 2018 +0200 Merge tag 'arm-soc/for-4.17/devicetree-arm64-fixes' of https://github.com/Broadcom/stblinux into fixes Pull "Broadcom devicetree-arm64 fixes for 4.17" from Florian Fainelli: This pull request contains Broadcom ARM64-based SoCs Device Tree fixes for 4.17, please pull the following: - Srinath fixes the register base address of all SATA controllers on Stingray * tag 'arm-soc/for-4.17/devicetree-arm64-fixes' of https://github.com/Broadcom/stblinux: arm64: dts: correct SATA addresses for Stingray commit ed769520727edbf526e0f510e6c501fc6ba3824a Author: Joel Pepper Date: Thu Apr 26 20:26:08 2018 +0200 usb: gadget: composite Allow for larger configuration descriptors The composite framework allows us to create gadgets composed from many different functions, which need to fit into a single configuration descriptor. Some functions (like uvc) can produce configuration descriptors upwards of 2500 bytes on their own. This patch increases the limit from 1024 bytes to 4096. Signed-off-by: Joel Pepper Signed-off-by: Felipe Balbi include/linux/usb/composite.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2d7ecbe355698010a6b7a15eb179e09eb3d6a34 Author: Laurentiu Tudor Date: Thu Apr 26 15:33:19 2018 +0300 powerpc/kvm/booke: Fix altivec related build break Add missing "altivec unavailable" interrupt injection helper thus fixing the linker error below: arch/powerpc/kvm/emulate_loadstore.o: In function `kvmppc_check_altivec_disabled': arch/powerpc/kvm/emulate_loadstore.c: undefined reference to `.kvmppc_core_queue_vec_unavail' Fixes: 09f984961c137c4b ("KVM: PPC: Book3S: Add MMIO emulation for VMX instructions") Signed-off-by: Laurentiu Tudor Signed-off-by: Michael Ellerman arch/powerpc/kvm/booke.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6029755eed95e5c90f763188c87ae3ff41e48e5c Author: Nicholas Piggin Date: Fri Apr 27 11:51:59 2018 +1000 powerpc: Fix deadlock with multiple calls to smp_send_stop smp_send_stop can lock up the IPI path for any subsequent calls, because the receiving CPUs spin in their handler function. This started becoming a problem with the addition of an smp_send_stop call in the reboot path, because panics can reboot after doing their own smp_send_stop. The NMI IPI variant was fixed with ac61c11566 ("powerpc: Fix smp_send_stop NMI IPI handling"), which leaves the smp_call_function variant. This is fixed by having smp_send_stop only ever do the smp_call_function once. This is a bit less robust than the NMI IPI fix, because any other call to smp_call_function after smp_send_stop could deadlock, but that has always been the case, and it was not been a problem before. Fixes: f2748bdfe1573 ("powerpc/powernv: Always stop secondaries before reboot/shutdown") Reported-by: Abdul Haleem Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/smp.c | 55 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 16 deletions(-) commit c0f7f5b6c69107ca92909512533e70258ee19188 Author: Shilpasri G Bhat Date: Wed Apr 25 16:29:31 2018 +0530 cpufreq: powernv: Fix hardlockup due to synchronous smp_call in timer interrupt gpstate_timer_handler() uses synchronous smp_call to set the pstate on the requested core. This causes the below hard lockup: smp_call_function_single+0x110/0x180 (unreliable) smp_call_function_any+0x180/0x250 gpstate_timer_handler+0x1e8/0x580 call_timer_fn+0x50/0x1c0 expire_timers+0x138/0x1f0 run_timer_softirq+0x1e8/0x270 __do_softirq+0x158/0x3e4 irq_exit+0xe8/0x120 timer_interrupt+0x9c/0xe0 decrementer_common+0x114/0x120 -- interrupt: 901 at doorbell_global_ipi+0x34/0x50 LR = arch_send_call_function_ipi_mask+0x120/0x130 arch_send_call_function_ipi_mask+0x4c/0x130 smp_call_function_many+0x340/0x450 pmdp_invalidate+0x98/0xe0 change_huge_pmd+0xe0/0x270 change_protection_range+0xb88/0xe40 mprotect_fixup+0x140/0x340 SyS_mprotect+0x1b4/0x350 system_call+0x58/0x6c One way to avoid this is removing the smp-call. We can ensure that the timer always runs on one of the policy-cpus. If the timer gets migrated to a cpu outside the policy then re-queue it back on the policy->cpus. This way we can get rid of the smp-call which was being used to set the pstate on the policy->cpus. Fixes: 7bc54b652f13 ("timers, cpufreq/powernv: Initialize the gpstate timer as pinned") Cc: stable@vger.kernel.org # v4.8+ Reported-by: Nicholas Piggin Reported-by: Pridhiviraj Paidipeddi Signed-off-by: Shilpasri G Bhat Acked-by: Nicholas Piggin Acked-by: Viresh Kumar Acked-by: Vaidyanathan Srinivasan Signed-off-by: Michael Ellerman drivers/cpufreq/powernv-cpufreq.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit b4331a681822b420511b3258f1c3db35001fde48 Author: Stefano Brivio Date: Thu Apr 26 19:39:09 2018 +0200 vti6: Change minimum MTU to IPV4_MIN_MTU, vti6 can carry IPv4 too A vti6 interface can carry IPv4 as well, so it makes no sense to enforce a minimum MTU of IPV6_MIN_MTU. If the user sets an MTU below IPV6_MIN_MTU, IPv6 will be disabled on the interface, courtesy of addrconf_notify(). Reported-by: Xin Long Fixes: b96f9afee4eb ("ipv4/6: use core net MTU range checking") Fixes: c6741fbed6dc ("vti6: Properly adjust vti6 MTU from MTU of lower device") Fixes: 53c81e95df17 ("ip6_vti: adjust vti mtu according to mtu of lower device") Signed-off-by: Stefano Brivio Signed-off-by: Steffen Klassert net/ipv6/ip6_vti.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d66a7355717ec903d455277a550d930ba13df4a8 Author: Halil Pasic Date: Tue Apr 24 13:26:56 2018 +0200 vfio: ccw: fix cleanup if cp_prefetch fails If the translation of a channel program fails, we may end up attempting to clean up (free, unpin) stuff that never got translated (and allocated, pinned) in the first place. By adjusting the lengths of the chains accordingly (so the element that failed, and all subsequent elements are excluded) cleanup activities based on false assumptions can be avoided. Let's make sure cp_free works properly after cp_prefetch returns with an error by setting ch_len of a ccw chain to the number of the translated CCWs on that chain. Cc: stable@vger.kernel.org #v4.12+ Acked-by: Pierre Morel Reviewed-by: Dong Jia Shi Signed-off-by: Halil Pasic Signed-off-by: Dong Jia Shi Message-Id: <20180423110113.59385-2-bjsdjshi@linux.vnet.ibm.com> [CH: fixed typos] Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky drivers/s390/cio/vfio_ccw_cp.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 598d76562cc2329ef2fdd95475e287b60ba9463f Author: Sebastian Ott Date: Wed Apr 25 12:39:06 2018 +0200 s390/kexec_file: add declaration of purgatory related globals Fix the following sparse complaints: arch/s390/purgatory/purgatory.c:18:5: warning: symbol 'kernel_entry' was not declared. Should it be static? arch/s390/purgatory/purgatory.c:19:5: warning: symbol 'kernel_type' was not declared. Should it be static? arch/s390/purgatory/purgatory.c:21:5: warning: symbol 'crash_start' was not declared. Should it be static? arch/s390/purgatory/purgatory.c:22:5: warning: symbol 'crash_size' was not declared. Should it be static? Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/include/asm/purgatory.h | 6 ++++++ 1 file changed, 6 insertions(+) commit d14be68fd1be2b33e362594b831eef6f007febe5 Author: Sebastian Ott Date: Thu Apr 26 14:31:52 2018 +0200 s390: update defconfigs Change the following to y: arch/s390/configs/performance_defconfig:262:warning: symbol value 'm' invalid for NF_TABLES_IPV4 arch/s390/configs/performance_defconfig:264:warning: symbol value 'm' invalid for NF_TABLES_ARP arch/s390/configs/performance_defconfig:285:warning: symbol value 'm' invalid for NF_TABLES_IPV6 arch/s390/configs/performance_defconfig:306:warning: symbol value 'm' invalid for NF_TABLES_BRIDGE Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/configs/debug_defconfig | 9 ++++----- arch/s390/configs/performance_defconfig | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) commit 84edb315cf766e7c8e09d473d63aaccd1637bbda Author: Harald Freudenberger Date: Mon Apr 23 11:14:28 2018 +0200 MAINTAINERS: update s390 zcrypt maintainers email address Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24d9092c8b7de0a0f630adbe3504bef8d3a618af Merge: bb1278e 0b551f1 Author: Dave Airlie Date: Fri Apr 27 14:08:47 2018 +1000 Merge tag 'drm-intel-fixes-2018-04-26' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix for black screen issues (FDO #104158 and #104425) - A correction for wrongly applied display W/A - Fixes for HDA codec interop issue (no audio) and too eager HW timeouts * tag 'drm-intel-fixes-2018-04-26' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915/fbdev: Enable late fbdev initial configuration drm/i915: Use ktime on wait_for drm/i915: Enable display WA#1183 from its correct spot drm/i915/audio: set minimum CD clock to twice the BCLK commit 83ef4777f5ff3689e6e52d3913a13d79aa25f1b5 Author: Jan Kiszka Date: Thu Apr 26 13:00:30 2018 +0200 of: overlay: Stop leaking resources on overlay removal Only the overlay notifier callbacks have a chance to potentially get hold of references to those two resources, but they are not supposed to store them beyond OF_OVERLAY_POST_REMOVE. Document the overlay notifier API, its constraint regarding pointer lifetime, and then remove intentional leaks of ovcs->overlay_tree and ovcs->fdt from free_overlay_changeset. See also https://lkml.org/lkml/2018/4/23/1063 and following. Signed-off-by: Jan Kiszka Reviewed-by: Frank Rowand Signed-off-by: Rob Herring Documentation/devicetree/overlay-notes.txt | 8 ++++++++ drivers/of/overlay.c | 30 +++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 9 deletions(-) commit dcf234577cd31fa16874e828b90659166ad6b80d Author: Tom Zanussi Date: Thu Apr 26 20:04:49 2018 -0500 tracing: Add field modifier parsing hist error for hist triggers If the user specifies an invalid field modifier for a hist trigger, the current code correctly flags that as an error, but doesn't tell the user what happened. Fix this by invoking hist_err() with an appropriate message when invalid modifiers are specified. Before: # echo 'hist:keys=pid:ts0=common_timestamp.junkusecs' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger -su: echo: write error: Invalid argument # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/hist After: # echo 'hist:keys=pid:ts0=common_timestamp.junkusecs' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger -su: echo: write error: Invalid argument # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/hist ERROR: Invalid field modifier: junkusecs Last command: keys=pid:ts0=common_timestamp.junkusecs Link: http://lkml.kernel.org/r/b043c59fa79acd06a5f14a1d44dee9e5a3cd1248.1524790601.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 1 + 1 file changed, 1 insertion(+) commit 5ec432d7bf9dd3b4a2b84f8974e3adb71f45fb1d Author: Tom Zanussi Date: Thu Apr 26 20:04:48 2018 -0500 tracing: Add field parsing hist error for hist triggers If the user specifies a nonexistent field for a hist trigger, the current code correctly flags that as an error, but doesn't tell the user what happened. Fix this by invoking hist_err() with an appropriate message when nonexistent fields are specified. Before: # echo 'hist:keys=pid:ts0=common_timestamp.usecs' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger -su: echo: write error: Invalid argument # cat /sys/kernel/debug/tracing/events/sched/sched_switch/hist After: # echo 'hist:keys=pid:ts0=common_timestamp.usecs' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger -su: echo: write error: Invalid argument # cat /sys/kernel/debug/tracing/events/sched/sched_switch/hist ERROR: Couldn't find field: pid Last command: keys=pid:ts0=common_timestamp.usecs Link: http://lkml.kernel.org/r/fdc8746969d16906120f162b99dd71c741e0b62c.1524790601.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Reported-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 1 + 1 file changed, 1 insertion(+) commit 608940dabe1bd2ce4c97524004ec86637cf80f2c Author: Tom Zanussi Date: Thu Apr 26 20:04:47 2018 -0500 tracing: Restore proper field flag printing when displaying triggers The flag-printing code used when displaying hist triggers somehow got dropped during refactoring of the inter-event patchset. This restores it. Below are a couple examples - in the first case, .usecs wasn't being displayed properly for common_timestamps and the second illustrates the same for other flags such as .execname. Before: # echo 'hist:key=common_pid.execname:val=count:sort=count' > /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger # cat /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger hist:keys=common_pid:vals=hitcount,count:sort=count:size=2048 [active] # echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger hist:keys=pid:vals=hitcount:ts0=common_timestamp:sort=hitcount:size=2048:clock=global if comm=="cyclictest" [active] After: # echo 'hist:key=common_pid.execname:val=count:sort=count' > /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger # cat /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger hist:keys=common_pid.execname:vals=hitcount,count:sort=count:size=2048 [active] # echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger hist:keys=pid:vals=hitcount:ts0=common_timestamp.usecs:sort=hitcount:size=2048:clock=global if comm=="cyclictest" [active] Link: http://lkml.kernel.org/r/492bab42ff21806600af98a8ea901af10efbee0c.1524790601.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0644f186fc9d77bb5bd198369e59fb28927a3692 Merge: 0871062 5c60300 Author: Linus Torvalds Date: Thu Apr 26 16:36:11 2018 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixups from Michael Tsirkin: - Latest header update will break QEMU (if it's rebuilt with the new header) - and it seems that the code there is so fragile that any change in this header will break it. Add a better interface so users do not need to change their code every time that header changes. - Fix virtio console for spec compliance. * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_console: reset on out of memory virtio_console: move removal code virtio_console: drop custom control queue cleanup virtio_console: free buffers after reset virtio: add ability to iterate over vqs virtio_console: don't tie bufs to a vq virtio_balloon: add array of stat names commit 0871062bf9c6e6f0cc91247b3e743a37b87a970f Merge: 7f5d157 877d894 Author: Linus Torvalds Date: Thu Apr 26 16:33:54 2018 -0700 Merge tag 'hwmon-for-linus-v4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - Add support for new Ryzen chips to k10temp driver ... making Phoronix happy - Fix inconsistent chip access in nct6683 driver - Handle absence of few types of sensors in scmi driver * tag 'hwmon-for-linus-v4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (k10temp) Add support for AMD Ryzen w/ Vega graphics hwmon: (k10temp) Add temperature offset for Ryzen 2700X hwmon: (nct6683) Enable EC access if disabled at boot hwmon: (scmi) handle absence of few types of sensors commit 7f5d15735588bc14e7c399e7214c0a36f3808dcf Merge: 47b5ece 0cf22d6 Author: Linus Torvalds Date: Thu Apr 26 16:28:24 2018 -0700 Merge tag 'pci-v4.17-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - fix Aardvark MRRS setting (Evan Wang) - clarify "bandwidth available" link status message (Jakub Kicinski) - update Kirin GPIO name to fix probe failure (Loic Poulain) - fix Aardvark IRQ usage (Victor Gu) - fix Aardvark config accessor issues (Victor Gu) * tag 'pci-v4.17-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Add "PCIe" to pcie_print_link_status() messages PCI: kirin: Fix reset gpio name PCI: aardvark: Fix PCIe Max Read Request Size setting PCI: aardvark: Use ISR1 instead of ISR0 interrupt in legacy irq mode PCI: aardvark: Set PIO_ADDR_LS correctly in advk_pcie_rd_conf() PCI: aardvark: Fix logic in advk_pcie_{rd,wr}_conf() commit 47b5ece937c27a2f541cb26509f7ba5491c8c99c Merge: fe03a75 9a0fd67 Author: Linus Torvalds Date: Thu Apr 26 16:22:47 2018 -0700 Merge tag 'trace-v4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: - Add workqueue forward declaration (for new work, but a nice clean up) - seftest fixes for the new histogram code - Print output fix for hwlat tracer - Fix missing system call events - due to change in x86 syscall naming - Fix kprobe address being used by perf being hashed * tag 'trace-v4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix missing tab for hwlat_detector print format selftests: ftrace: Add a testcase for multiple actions on trigger selftests: ftrace: Fix trigger extended error testcase kprobes: Fix random address output of blacklist file tracing: Fix kernel crash while using empty filter with perf tracing/x86: Update syscall trace events to handle new prefixed syscall func names tracing: Add missing forward declaration commit 304440aa96c6e5cc37eaa7a46ff4dd862e4c21be Author: William Breathitt Gray Date: Wed Apr 18 08:53:21 2018 -0400 gpio: pcie-idio-24: Fix port memory offset for get_multiple/set_multiple callbacks The ioread8/iowrite8 functions expect a memory offset argument. This patch fixes the ports array to provide the memory addresses of the respective device I/O registers. Fixes: ca37081595a2 ("gpio: pcie-idio-24: Implement get_multiple/set_multiple callbacks") Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-pcie-idio-24.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit aaf96e51de117cdfa2dc04735639895b46a3da3f Author: William Breathitt Gray Date: Wed Apr 18 08:53:10 2018 -0400 gpio: pci-idio-16: Fix port memory offset for get_multiple callback The ioread8 function expects a memory offset argument. This patch fixes the ports array to provide the memory addresses of the respective device I/O registers. Fixes: 810ebfc5efca ("gpio: pci-idio-16: Implement get_multiple callback") Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-pci-idio-16.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f001cc351ad3309ec8736c374e90e5a4bc472d41 Author: Uwe Kleine-König Date: Mon Apr 16 13:17:53 2018 +0200 gpio: fix error path in lineevent_create If gpiod_request() fails the cleanup must not call gpiod_free(). Cc: stable@vger.kernel.org Fixes: 61f922db7221 ("gpio: userspace ABI for reading GPIO line events") Signed-off-by: Uwe Kleine-König Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f99aa31cd7a5d667f17dd2924c884c3d2c621ac Author: Florian Westphal Date: Wed Apr 25 15:11:07 2018 +0200 netfilter: nf_tables: skip synchronize_rcu if transaction log is empty After processing the transaction log, the remaining entries of the log need to be released. However, in some cases no entries remain, e.g. because the transaction did not remove anything. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit dceb48d86b4871984b8ce9ad5057fb2c01aa33de Author: Florian Westphal Date: Wed Apr 25 13:38:47 2018 +0200 netfilter: x_tables: check name length in find_match/target, too ebtables uses find_match() rather than find_request_match in one case (see bcf4934288402be3464110109a4dae3bd6fb3e93, "netfilter: ebtables: Fix extension lookup with identical name"), so extend the check on name length to those functions too. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 72d4d3e3980702809509586d36015b7c3c51fad4 Author: Jozsef Kadlecsik Date: Sat Apr 21 13:43:48 2018 +0200 netfilter: Fix handling simultaneous open in TCP conntrack Dominique Martinet reported a TCP hang problem when simultaneous open was used. The problem is that the tcp_conntracks state table is not smart enough to handle the case. The state table could be fixed by introducing a new state, but that would require more lines of code compared to this patch, due to the required backward compatibility with ctnetlink. Signed-off-by: Jozsef Kadlecsik Reported-by: Dominique Martinet Tested-by: Dominique Martinet Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_conntrack_tcp.h | 3 +++ net/netfilter/nf_conntrack_proto_tcp.c | 11 +++++++++++ 2 files changed, 14 insertions(+) commit 184add2ca23ce5edcac0ab9c3b9be13f91e7b567 Author: Hans de Goede Date: Thu Apr 26 22:32:21 2018 +0200 libata: Apply NOLPM quirk for SanDisk SD7UB3Q*G1001 SSDs Richard Jones has reported that using med_power_with_dipm on a T450s with a Sandisk SD7UB3Q256G1001 SSD (firmware version X2180501) is causing the machine to hang. Switching the LPM to max_performance fixes this, so it seems that this Sandisk SSD does not handle LPM well. Note in the past there have been bug-reports about the following Sandisk models not working with min_power, so we may need to extend the quirk list in the future: name - firmware Sandisk SD6SB2M512G1022I - X210400 Sandisk SD6PP4M-256G-1006 - A200906 Cc: stable@vger.kernel.org Cc: Richard W.M. Jones Reported-and-tested-by: Richard W.M. Jones Signed-off-by: Hans de Goede Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 3 +++ 1 file changed, 3 insertions(+) commit 815425567dea6c54494e85050631d6bdda907c5d Author: John Fastabend Date: Wed Apr 25 15:08:53 2018 -0700 bpf: fix uninitialized variable in bpf tools Here the variable cont is used as the saved_pointer for a call to strtok_r(). It is safe to use the value uninitialized in this context however and the later reference is only ever used if the strtok_r is successful. But, 'gcc-5' at least doesn't have all this knowledge so initialize cont to NULL. Additionally, do the natural NULL check before accessing just for completness. The warning is the following: ./bpf/tools/bpf/bpf_dbg.c: In function ‘cmd_load’: ./bpf/tools/bpf/bpf_dbg.c:1077:13: warning: ‘cont’ may be used uninitialized in this function [-Wmaybe-uninitialized] } else if (matches(subcmd, "pcap") == 0) { Fixes: fd981e3c321a "filter: bpf_dbg: add minimal bpf debugger" Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann tools/bpf/bpf_dbg.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 202854e9f4df99df1f79962a9e8f94a7de602f7b Author: Chris Mi Date: Mon Apr 16 10:36:51 2018 +0900 net/mlx5: Properly deal with flow counters when deleting rules When deleting a flow counter, the modify mask should be the action and the flow counter. Otherwise the flow counter is not deleted and we'll get a firmware warning when deleting the remaining destinations on the same FTE. It only happens in the presence of flow counter and multiple vport destinations. If there is only one vport destination, there is no need to update the FTE when deleting the only vport destination, we just delete the FTE. Fixes: ae05831424ed ("net/mlx5: Add option to add fwd rule with counter") Signed-off-by: Chris Mi Signed-off-by: Jianbo Liu Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 99beaa22f11152e128861f1c681744ca4749e9f8 Author: Shahar Klein Date: Sun Apr 8 09:50:53 2018 +0300 net/mlx5e: Fix traffic between VF and representor After the cited commit, WQE RQ size is calculated based on sw_mtu but it was not set for representors. This commit fixes that. Fixes: 472a1e44b349 ("net/mlx5e: Save MTU in channels params") Signed-off-by: Shahar Klein Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9c26f5f89d01ca21560c6b8a8e4054c271cc3a9c Author: Talat Batheesh Date: Sun Apr 15 11:26:19 2018 +0300 net/mlx5: Avoid cleaning flow steering table twice during error flow When we fail to initialize the RX root namespace, we need to clean only that and not the entire flow steering. Currently the code may try to clean the flow steering twice on error witch leads to null pointer deference. Make sure we clean correctly. Fixes: fba53f7b5719 ("net/mlx5: Introduce mlx5_flow_steering structure") Signed-off-by: Talat Batheesh Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit d9a96ec362e3da878c378854e25321c85bac52c2 Author: Tariq Toukan Date: Tue Mar 20 18:17:25 2018 +0200 net/mlx5e: TX, Use correct counter in dma_map error flow In case of a dma_mapping_error, do not use wi->num_dma as a parameter for dma unmap function because it's yet to be set, and holds an out-of-date value. Use actual value (local variable num_dma) instead. Fixes: 34802a42b352 ("net/mlx5e: Do not modify the TX SKB") Fixes: e586b3b0baee ("net/mlx5: Ethernet Datapath files") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 6082d9c9c94a408d7409b5f2e4e42ac9e8b16d0d Author: Israel Rukshin Date: Thu Apr 12 09:49:11 2018 +0000 net/mlx5: Fix mlx5_get_vector_affinity function Adding the vector offset when calling to mlx5_vector2eqn() is wrong. This is because mlx5_vector2eqn() checks if EQ index is equal to vector number and the fact that the internal completion vectors that mlx5 allocates don't get an EQ index. The second problem here is that using effective_affinity_mask gives the same CPU for different vectors. This leads to unmapped queues when calling it from blk_mq_rdma_map_queues(). This doesn't happen when using affinity_hint mask. Fixes: 2572cf57d75a ("mlx5: fix mlx5_get_vector_affinity to start from completion vector 0") Fixes: 05e0cc84e00c ("net/mlx5: Fix get vector affinity helper function") Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg drivers/infiniband/hw/mlx5/main.c | 2 +- include/linux/mlx5/driver.h | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) commit 35f80acb24cd53dabd65e0660e46afdf5c45991d Author: Huy Nguyen Date: Thu Dec 21 15:15:24 2017 -0600 net/mlx5e: DCBNL fix min inline header size for dscp When the trust state is set to dscp and the netdev is down, the inline header size is not updated. When netdev is up, the inline header size stays at L2 instead of IP. Fix this issue by updating the private parameter when the netdev is in down so that when netdev is up, it picks up the right header size. Fixes: fbcb127e89ba ("net/mlx5e: Support DSCP trust state ...") Signed-off-by: Huy Nguyen Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 1ccef350db2f13715040a10df77ae672206004cf Author: Jianbo Liu Date: Tue Mar 27 09:22:16 2018 +0000 net/mlx5e: Allow offloading ipv4 header re-write for icmp For ICMPv4, the checksum is calculated from the ICMP headers and data. Since the ICMPv4 checksum doesn't cover the IP header, we can allow to do L3 header re-write for this protocol. Fixes: bdd66ac0aeed ('net/mlx5e: Disallow TC offloading of unsupported match/action combinations') Signed-off-by: Jianbo Liu Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b837913fc2d9061bf9b8c0dd6bf2d24e2f98b84a Author: jacek.tomaka@poczta.fm Date: Tue Apr 24 00:14:25 2018 +0800 x86/cpu/intel: Add missing TLB cpuid values Make kernel print the correct number of TLB entries on Intel Xeon Phi 7210 (and others) Before: [ 0.320005] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0 After: [ 0.320005] Last level dTLB entries: 4KB 256, 2MB 128, 4MB 128, 1GB 16 The entries do exist in the official Intel SMD but the type column there is incorrect (states "Cache" where it should read "TLB"), but the entries for the values 0x6B, 0x6C and 0x6D are correctly described as 'Data TLB'. Signed-off-by: Jacek Tomaka Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20180423161425.24366-1-jacekt@dugeo.com arch/x86/kernel/cpu/intel.c | 3 +++ 1 file changed, 3 insertions(+) commit 0566e40ce7c493d39006cdd7edf17bfdc52eb2ac Author: Rishabh Bhatnagar Date: Wed Apr 25 16:42:35 2018 -0700 tracing: initcall: Ordered comparison of function pointers Using initcall_t in the __field macro generates the following warning with clang version 6.0: include/trace/events/initcall.h:34:3: warning: ordered comparison of function pointers ('initcall_t' (aka 'int (*)(void)') and 'initcall_t') __field macro expands to __field_ext macro which does is_signed_type check on the type argument. Since initcall_t is defined as a function pointer, using it as the type in the __field macro, leads to an ordered comparison of function pointer warning, inside the check. Using __field_struct macro avoids the issue. Link: http://lkml.kernel.org/r/1524699755-29388-1-git-send-email-rishabhb@codeaurora.org Signed-off-by: Rishabh Bhatnagar [ Added comment to why we are using field_struct() ] Signed-off-by: Steven Rostedt (VMware) include/trace/events/initcall.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 61f94203c9efcaf44a7435298697caf406476c79 Author: Song Liu Date: Mon Apr 23 10:21:35 2018 -0700 tracing: Remove igrab() iput() call from uprobes.c Caller of uprobe_register is required to keep the inode and containing mount point referenced. There was misuse of igrab() in uprobes.c and trace_uprobe.c. This is because igrab() will not prevent umount of the containing mount point. To fix this, we added path to struct trace_uprobe, which keeps the inode and containing mount reference. For uprobes.c, it is not necessary to call igrab() in uprobe_register(), as the caller is required to keep the inode reference. The igrab() is removed and comments on this requirement is added to uprobe_register(). Link: http://lkml.kernel.org/r/CAELBmZB2XX=qEOLAdvGG4cPx4GEntcSnWQquJLUK1ongRj35cA@mail.gmail.com Link: http://lkml.kernel.org/r/20180423172135.4050588-2-songliubraving@fb.com Cc: Ingo Molnar Cc: Howard McLauchlan Cc: Josef Bacik Cc: Srikar Dronamraju Acked-by: Miklos Szeredi Signed-off-by: Song Liu Signed-off-by: Steven Rostedt (VMware) kernel/events/uprobes.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 0c92c7a3c5d416f47b32c5f20a611dfeca5d5f2e Author: Song Liu Date: Mon Apr 23 10:21:34 2018 -0700 tracing: Fix bad use of igrab in trace_uprobe.c As Miklos reported and suggested: This pattern repeats two times in trace_uprobe.c and in kernel/events/core.c as well: ret = kern_path(filename, LOOKUP_FOLLOW, &path); if (ret) goto fail_address_parse; inode = igrab(d_inode(path.dentry)); path_put(&path); And it's wrong. You can only hold a reference to the inode if you have an active ref to the superblock as well (which is normally through path.mnt) or holding s_umount. This way unmounting the containing filesystem while the tracepoint is active will give you the "VFS: Busy inodes after unmount..." message and a crash when the inode is finally put. Solution: store path instead of inode. This patch fixes two instances in trace_uprobe.c. struct path is added to struct trace_uprobe to keep the inode and containing mount point referenced. Link: http://lkml.kernel.org/r/20180423172135.4050588-1-songliubraving@fb.com Fixes: f3f096cfedf8 ("tracing: Provide trace events interface for uprobes") Fixes: 33ea4b24277b ("perf/core: Implement the 'perf_uprobe' PMU") Cc: stable@vger.kernel.org Cc: Ingo Molnar Cc: Howard McLauchlan Cc: Josef Bacik Cc: Srikar Dronamraju Acked-by: Miklos Szeredi Reported-by: Miklos Szeredi Signed-off-by: Song Liu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_uprobe.c | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) commit b5b4d3a52c8fd6e3fc6469c5a64ca0139c07229e Author: Hans de Goede Date: Tue Apr 24 11:19:07 2018 +0200 libata: Apply NOLPM quirk for SAMSUNG MZMPC128HBFU-000MV SSD Kevin Shanahan reports the following repeating errors when using LPM, causing long delays accessing the disk: Apr 23 10:21:43 link kernel: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x50000 action 0x6 frozen Apr 23 10:21:43 link kernel: ata1: SError: { PHYRdyChg CommWake } Apr 23 10:21:43 link kernel: ata1.00: failed command: WRITE DMA Apr 23 10:21:43 link kernel: ata1.00: cmd ca/00:08:60:5d:cd/00:00:00:00:00/e1 tag 9 dma 4096 out res 50/01:01:01:00:00/00:00:00:00:00/00 Emask 0x4 (timeout) Apr 23 10:21:43 link kernel: ata1.00: status: { DRDY } Apr 23 10:21:43 link kernel: ata1.00: error: { AMNF } Apr 23 10:21:43 link kernel: ata1: hard resetting link Apr 23 10:21:43 link kernel: ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300) Apr 23 10:21:43 link kernel: ata1.00: configured for UDMA/133 Apr 23 10:21:43 link kernel: ata1: EH complete These go away when switching from med_power_with_dipm to medium_power. This is somewhat weird as the PM830 datasheet explicitly mentions DIPM being supported and the idle power-consumption is specified with DIPM enabled. There are many OEM customized firmware versions for the PM830, so for now lets assume this is firmware version specific and blacklist LPM based on the firmware version. Cc: Kevin Shanahan Reported-by: Kevin Shanahan Signed-off-by: Hans de Goede Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 3 +++ 1 file changed, 3 insertions(+) commit daa2e3bdbb0b3e691cf20a042350817310cb8cb5 Author: Evan Wang Date: Fri Apr 13 12:32:31 2018 +0800 ata: ahci: mvebu: override ahci_stop_engine for mvebu AHCI There is an issue(Errata Ref#226) that the SATA can not be detected via SATA Port-MultiPlayer(PMP) with following error log: ata1.15: PMP product ID mismatch ata1.15: SATA link up 6.0 Gbps (SStatus 133 SControl 300) ata1.15: Port Multiplier vendor mismatch '0x1b4b'!='0x0' ata1.15: PMP revalidation failed (errno=-19) After debugging, the reason is found that the value Port-x FIS-based Switching Control(PxFBS@0x40) become wrong. According to design, the bits[11:8, 0] of register PxFBS are cleared when Port Command and Status (0x18) bit[0] changes its value from 1 to 0, i.e. falling edge of Port Command and Status bit[0] sends PULSE that resets PxFBS bits[11:8; 0]. So it needs a mvebu SATA WA to save the port PxFBS register before PxCMD ST write and restore it afterwards. This patch implements the WA in a separate function of ahci_mvebu_stop_engine to override ahci_stop_gngine. Signed-off-by: Evan Wang Cc: Ofer Heifetz Cc: Tejun Heo Cc: Thomas Petazzoni Signed-off-by: Tejun Heo drivers/ata/ahci_mvebu.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit fa89f53bd7288d6aa7a982841119e7123faf5a53 Author: Evan Wang Date: Fri Apr 13 12:32:30 2018 +0800 libahci: Allow drivers to override stop_engine Marvell armada37xx, armada7k and armada8k share the same AHCI sata controller IP, and currently there is an issue (Errata Ref#226)that the SATA can not be detected via SATA Port-MultiPlayer(PMP). After debugging, the reason is found that the value of Port-x FIS-based Switching Control (PxFBS@0x40) became wrong. According to design, the bits[11:8, 0] of register PxFBS are cleared when Port Command and Status (0x18) bit[0] changes its value from 1 to 0, i.e. falling edge of Port Command and Status bit[0] sends PULSE that resets PxFBS bits[11:8; 0]. So it needs save the port PxFBS register before PxCMD ST write and restore the port PxFBS register afterwards in ahci_stop_engine(). This commit allows drivers to override ahci_stop_engine behavior for use by the Marvell AHCI driver(and potentially other drivers in the future). Signed-off-by: Evan Wang Cc: Ofer Heifetz Cc: Tejun Heo Cc: Thomas Petazzoni Signed-off-by: Tejun Heo drivers/ata/ahci.c | 6 +++--- drivers/ata/ahci.h | 7 +++++++ drivers/ata/ahci_qoriq.c | 2 +- drivers/ata/ahci_xgene.c | 4 ++-- drivers/ata/libahci.c | 20 ++++++++++++-------- drivers/ata/sata_highbank.c | 2 +- 6 files changed, 26 insertions(+), 15 deletions(-) commit fe03a7594d86e0754f05e604cd803a6a9aae3c1c Merge: e58d911 bd6dff5 Author: Linus Torvalds Date: Thu Apr 26 11:06:36 2018 -0700 Merge tag 'acpi-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These are two watchdog-related fixes, fix for a backlight regression from the 4.16 cycle that unfortunately was propagated to -stable and a button module modification to prevent graphics driver modules from failing to load due to unmet dependencies if ACPI is disabled from the kernel command line. Specifics: - Change the ACPI subsystem initialization ordering to initialize the WDAT watchodg before reserving PNP motherboard resources so as to allow the watchdog to allocate its resources before the PNP code gets to them and prevents it from working correctly (Mika Westerberg). - Add a quirk for Lenovo Z50-70 to use the iTCO watchdog instead of the WDAT one which conflicts with the RTC on that platform (Mika Westerberg). - Avoid breaking backlight handling on Dell XPS 13 2013 model by allowing laptops to use the ACPI backlight by default even if they are Windows 8-ready in principle (Hans de Goede)" * tag 'acpi-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / video: Only default only_lcd to true on Win8-ready _desktops_ ACPI / button: make module loadable when booted in non-ACPI mode ACPI / watchdog: Prefer iTCO_wdt on Lenovo Z50-70 ACPI / scan: Initialize watchdog before PNP commit e58d911f98690db97a7ad93d2ecf5ebf0733fb5f Merge: 665fa00 e140c4a Author: Linus Torvalds Date: Thu Apr 26 11:03:02 2018 -0700 Merge tag 'pm-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These are a Low Power S0 Idle quirk, a hibernation handling fix for the PCI bus type and a brcmstb-avs-cpufreq driver fixup removing development debug code from it. Specifics: - Blacklist the Low Power S0 Idle _DSM on ThinkPad X1 Tablet(2016) where it causes issues and make it use ACPI S3 which works instead of the non-working suspend-to-idle by default (Chen Yu). - Fix the handling of hibernation in the PCI core for devices with the DPM_FLAG_SMART_SUSPEND flag set to fix a regression affecting intel-lpss I2C devices (Mika Westerberg). - Drop development debug code from the brcmstb-avs-cpufreq driver (Markus Mayer)" * tag 'pm-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: brcmstb-avs-cpufreq: remove development debug support PCI / PM: Do not clear state_saved in pci_pm_freeze() when smart suspend is set ACPI / PM: Blacklist Low Power S0 Idle _DSM for ThinkPad X1 Tablet(2016) commit 665fa0000aedb5f3d6b4d3b040d323074e1b7c40 Merge: 1334ac1 4e00b33 Author: Linus Torvalds Date: Thu Apr 26 10:59:56 2018 -0700 Merge tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random Pull /dev/random fixes from Ted Ts'o: "Fix a regression on NUMA kernels and suppress excess unseeded entropy pool warnings" * tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: random: rate limit unseeded randomness warnings random: fix possible sleeping allocation from irq context commit 1334ac11d93167fcc2953e9dd71837459b97d610 Merge: 69bfd47 6cf0995 Author: Linus Torvalds Date: Thu Apr 26 10:29:46 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "A couple of bug fixes: - correct some CPU-MF counter names for z13 and z14 - correct locking in the vfio-ccw fsm_io_helper function - provide arch_uretprobe_is_alive to avoid sigsegv with uretprobes - fix a corner case with CPU-MF sampling in regard to execve - fix expoline code revert for loadable modules - update chpid descriptor for resource accessibility events - fix dasd I/O errors due to outdated device alias infomation" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: correct module section names for expoline code revert vfio: ccw: process ssch with interrupts disabled s390: update sampling tag after task pid change s390/cpum_cf: rename IBM z13/z14 counter names s390/dasd: fix IO error for newly defined devices s390/uprobes: implement arch_uretprobe_is_alive() s390/cio: update chpid descriptor after resource accessibility event commit 573a094873752d225041b1059a662eca013a54f4 Merge: be75d8f 470b5d6 Author: Greg Kroah-Hartman Date: Thu Apr 26 19:29:24 2018 +0200 Merge tag 'usb-serial-4.17-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.17-rc3 Here are a few device ids for -rc3, including a new "simple driver". All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold commit f6997bec6af43396ff530caee79e178d32774a49 Author: Miquel Raynal Date: Wed Apr 25 16:16:32 2018 +0200 mtd: rawnand: marvell: fix the chip-select DT parsing logic The block responsible of parsing the DT for the number of chip-select lines uses an 'if/else if/else if' block. The content of the second and third 'else if' conditions are: 1/ the actual condition to enter the sub-block and 2/ the operation to do in this sub-block. [...] else if (condition1_to_enter && action1() == failed) raise_error(); else if (condition2_to_enter && action2() == failed) raise_error(); [...] In case of failure, the sub-block is entered and an error raised. Otherwise, in case of success, the code would continue erroneously in the next 'else if' statement because it did not failed (and did not enter the first 'else if' sub-block). The first 'else if' refers to legacy bindings while the second 'else if' refers to new bindings. The second 'else if', which is entered erroneously, checks for the 'reg' property, which, for old bindings, does not mean anything because it would not be the number of CS available, but the regular register map of almost any DT node. This being said, the content of the 'reg' property being the register map offset and length, it has '2' values, so the number of CS in this situation is assumed to be '2'. When running nand_scan_ident() with 2 CS, the core will check for an array of chips. It will first issue a RESET and then a READ_ID. Of course this will trigger two timeouts because there is no chip in front of the second CS: [ 1.367460] marvell-nfc f2720000.nand: Timeout on CMDD (NDSR: 0x00000080) [ 1.474292] marvell-nfc f2720000.nand: Timeout on CMDD (NDSR: 0x00000280) Indeed, this is harmless and the core will then assume there is only one valid CS. Fix the logic in the whole block by entering each sub-block just on the 'is legacy' condition, doing the action inside the sub-block. This way, when the action succeeds, the whole block is left. Furthermore, for both the old bindings and the new bindings the same logic was applied to retrieve the number of CS lines: using of_get_property() to get a size in bytes, converted in the actual number of lines by dividing it per sizeof(u32) (4 bytes). This is fine for the 'reg' property which is a list of the CS IDs but not for the 'num-cs' property which is directly the value of the number of CS. Anyway, no existing DT uses another value than 'num-cs = <1>' and no other value has ever been supported by the old driver (pxa3xx_nand.c). Remove this condition and apply a number of 1 CS anyway, as already described in the bindings. Finally, the 'reg' property of a 'nand' node (with the new bindings) gives the IDs of each CS line in use. marvell_nand.c driver first look at the number of CS lines that are present in this property. Better use of_property_count_elems_of_size() than dividing by 4 the size of the number of bytes returned by of_get_property(). Fixes: 02f26ecf8c772 ("mtd: nand: add reworked Marvell NAND controller driver") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Tested-by: Chris Packham Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/marvell_nand.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) commit 5e1ca5e23b167987d5b6d8b08f2d5b7dd2d13f49 Author: Mark Rutland Date: Wed Apr 25 17:13:42 2018 +0100 KVM: arm/arm64: vgic: fix possible spectre-v1 in vgic_mmio_read_apr() It's possible for userspace to control n. Sanitize n when using it as an array index. Note that while it appears that n must be bound to the interval [0,3] due to the way it is extracted from addr, we cannot guarantee that compiler transformations (and/or future refactoring) will ensure this is the case, and given this is a slow path it's better to always perform the masking. Found by smatch. Signed-off-by: Mark Rutland Acked-by: Christoffer Dall Acked-by: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu Signed-off-by: Will Deacon virt/kvm/arm/vgic/vgic-mmio-v2.c | 5 +++++ 1 file changed, 5 insertions(+) commit 41b87599c74300027f305d7b34368ec558978ff2 Author: Mark Rutland Date: Wed Apr 25 17:13:41 2018 +0100 KVM: arm/arm64: vgic: fix possible spectre-v1 in vgic_get_irq() It's possible for userspace to control intid. Sanitize intid when using it as an array index. At the same time, sort the includes when adding . Found by smatch. Signed-off-by: Mark Rutland Acked-by: Christoffer Dall Acked-by: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu Signed-off-by: Will Deacon virt/kvm/arm/vgic/vgic.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 19791a7ca674fb3009bb068260e852a2f05b605c Author: Mark Rutland Date: Wed Apr 25 17:13:40 2018 +0100 arm64: fix possible spectre-v1 in ptrace_hbp_get_event() It's possible for userspace to control idx. Sanitize idx when using it as an array index. Found by smatch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/ptrace.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 9c55ad1c214d9f8c4594ac2c3fa392c1c32431a7 Author: Ilya Dryomov Date: Tue Apr 24 19:10:55 2018 +0200 libceph: validate con->state at the top of try_write() ceph_con_workfn() validates con->state before calling try_read() and then try_write(). However, try_read() temporarily releases con->mutex, notably in process_message() and ceph_con_in_msg_alloc(), opening the window for ceph_con_close() to sneak in, close the connection and release con->sock. When try_write() is called on the assumption that con->state is still valid (i.e. not STANDBY or CLOSED), a NULL sock gets passed to the networking stack: BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 IP: selinux_socket_sendmsg+0x5/0x20 Make sure con->state is valid at the top of try_write() and add an explicit BUG_ON for this, similar to try_read(). Cc: stable@vger.kernel.org Link: https://tracker.ceph.com/issues/23706 Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman net/ceph/messenger.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bf0ddaba65ddbb2715af97041da8e7a45b2d8628 Author: Omar Sandoval Date: Thu Apr 26 00:21:59 2018 -0700 blk-mq: fix sysfs inflight counter When the blk-mq inflight implementation was added, /proc/diskstats was converted to use it, but /sys/block/$dev/inflight was not. Fix it by adding another helper to count in-flight requests by data direction. Fixes: f299b7c7a9de ("blk-mq: provide internal in-flight variant") Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq.c | 19 +++++++++++++++++++ block/blk-mq.h | 4 +++- block/genhd.c | 12 ++++++++++++ block/partition-generic.c | 10 ++++++---- include/linux/genhd.h | 4 +++- 5 files changed, 43 insertions(+), 6 deletions(-) commit 6131837b1de66116459ef4413e26fdbc70d066dc Author: Omar Sandoval Date: Thu Apr 26 00:21:58 2018 -0700 blk-mq: count allocated but not started requests in iostats inflight In the legacy block case, we increment the counter right after we allocate the request, not when the driver handles it. In both the legacy and blk-mq cases, part_inc_in_flight() is called from blk_account_io_start() right after we've allocated the request. blk-mq only considers requests started requests as inflight, but this is inconsistent with the legacy definition and the intention in the code. This removes the started condition and instead counts all allocated requests. Fixes: f299b7c7a9de ("blk-mq: provide internal in-flight variant") Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit c12d7e9fe9af142bce24f723191c4806da9fecc6 Author: Linus Walleij Date: Fri Apr 20 11:00:44 2018 +0200 ARM: defconfig: Update Gemini defconfig This updates the Gemini defconfig with a config that will bring up most of the recently merged and updated devices to some functional level: - We enable high resolution timers (the right thing to do) - Enable CMA for the framebuffer, and the new TVE200 framebuffer driver and the Ilitek ILI9322 driver for graphics on the D-Link DIR-685. HIGHMEM support comes in as part of this. - Enable networking and the new Cortina Gemini ethernet driver. - Enable MDIO over GPIO and the Realtek PHY devices used on several of these systems. - Enable I2C over GPIO and SPI over GPIO which is used on several of these devices. - Enable the Thermal framework, GPIO fan control and LM75 sensor adding cooling on the D-Link DNS-313 with no userspace involved even if only the kernel is working, rock solid thermal for this platform. - Enable JEDEC flash probing to support the Eon flash chip in D-Link DNS-313. - Enable LED disk triggers for the NAS type devices. Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/configs/gemini_defconfig | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit ef740508a2e2f26afa25b3a616bef779f9df3b45 Author: Linus Walleij Date: Mon Apr 23 13:57:00 2018 +0200 ARM: s3c24xx: jive: Fix some GPIO names One of the bitbanged SPI hosts had wrongly named GPIO lines due to sloppiness by yours truly. Cc: arm@kernel.org Cc: Mark Brown Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/mach-s3c24xx/mach-jive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21f2db5c73c2429bd473e7d881e9d6cb0af3cc8c Merge: 4b313ca fb289e3 Author: Arnd Bergmann Date: Thu Apr 26 16:54:12 2018 +0200 Merge tag 'omap-for-v4.17/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Pull "Two fixes for v4.17-rc cycle" from Tony Lindgren: Fix a build regression with split object directories reported by Russell and fix range sizes for omap4 cm2 and prm modules. * tag 'omap-for-v4.17/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Fix build when using split object directories ARM: dts: Fix cm2 and prm sizes for omap4 commit 4b313ca7b661ab8782f3dcb4a8996632a470b4da Author: John Garry Date: Thu Apr 19 22:14:02 2018 +0800 HISI LPC: Add Kconfig MFD_CORE dependency For ACPI support of the HiSilicon LPC driver we depend on MFD_CORE config. Currently the HiSi LPC Kconfig entry does not define this dependency, so add it. The reason for depending on MFD_CORE in the driver is that we model the LPC host as an MFD, in that a platform device will be created for each device on the bus. We do this as we need to modify the resources of these derived platform devices, something which we should not do to the original devices created in the ACPI scan. Details in e0aa1563f894 ("HISI LPC: Add ACPI support"). Fixes: e0aa1563f894 ("HISI LPC: Add ACPI support") Reported-and-tested-by: Tan Xiaojun Signed-off-by: John Garry Signed-off-by: Arnd Bergmann drivers/bus/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 7b069b114931a4076a1ab05b7d988dfc41447635 Merge: 1c3bc8f 4b7b0d7 Author: Arnd Bergmann Date: Thu Apr 26 16:51:26 2018 +0200 Merge tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into fixes Pull "Amlogic fixes for v4.17-rc1" from Kevin Hilman: - add / enable USB host support for GX boards * tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: dts: meson-gxm-khadas-vim2: enable the USB controller ARM64: dts: meson-gxl-nexbox-a95x: enable the USB controller ARM64: dts: meson-gxl-s905x-libretech-cc: enable the USB controller ARM64: dts: meson-gx-p23x-q20x: enable the USB controller ARM64: dts: meson-gxl-s905x-p212: enable the USB controller ARM64: dts: meson-gxm: add GXM specific USB host configuration ARM64: dts: meson-gxl: add USB host support commit 1c3bc8fb10c1803f8651911722ed584db3dfb0f2 Author: Linus Walleij Date: Tue Apr 17 10:53:11 2018 +0200 ARM: dts: Fix NAS4220B pin config The DTS file for the NAS4220B had the pin config for the ethernet interface set to the pins in the SL3512 SoC while this system is using SL3516. Fix it by referencing the right SL3516 pins instead of the SL3512 pins. Cc: stable@vger.kernel.org Cc: Hans Ulli Kroll Reported-by: Andreas Fiedler Reported-by: Roman Yeryomin Tested-by: Roman Yeryomin Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/boot/dts/gemini-nas4220b.dts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit e13db2d3371ee3fb77cd1991756c74e6d02ad41e Author: Niklas Cassel Date: Tue Apr 17 14:53:08 2018 +0200 MAINTAINERS: Remove myself as maintainer I am leaving Axis, so this address will bounce in the not too distant future. Fortunately, I will still be working with the community. Signed-off-by: Niklas Cassel Signed-off-by: Arnd Bergmann MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) commit cc753358265792b6b0630cdd746311fd5dd48f44 Merge: ee370b4 d27a3c3 Author: Arnd Bergmann Date: Thu Apr 26 16:48:35 2018 +0200 Merge tag 'scmi-fixes-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into fixes SCMI fix for v4.17 A single patch eliminating the redundant null pointer check detected by CoverityScan("Array compared against 0") * tag 'scmi-fixes-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: remove redundant null check on array commit ee370b4292893fbae3204961b505c997428fa027 Merge: c7d0a03 c326599 Author: Arnd Bergmann Date: Thu Apr 26 16:47:34 2018 +0200 Merge tag 'juno-fixes-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into fixes Pull "ARMv8 Juno DT fix for v4.17" from Sudeep Holla: A single patch to fix the new DTC warnings probably enabled during v4.17 merge window. * tag 'juno-fixes-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno: drop unnecessary address-cells and size-cells properties commit c7d0a03200c821bf6e3a721a68c53154056b4d4e Merge: a0a2d05 144345a Author: Arnd Bergmann Date: Thu Apr 26 16:45:54 2018 +0200 Merge tag 'arm-soc/for-4.17/drivers-fixes' of https://github.com/Broadcom/stblinux into fixes This pull request contains Broadcom SoCs drivers fixes, please pull the following: - Geert makes the Raspberry Pi firmwware return -ENOSYS (similar to other subsystems) when CONFIG_RASPBERRYPI_FIRMWARE is off. - Florian fixes an incorrect annotation in the Raspberry Pi power domain driver, spotted by sparse * tag 'arm-soc/for-4.17/drivers-fixes' of https://github.com/Broadcom/stblinux: soc: bcm2835: Make !RASPBERRYPI_FIRMWARE dummies return failure soc: bcm: raspberrypi-power: Fix use of __packed commit a0a2d0501d37d52711d47ea6cafb010822b442fd Merge: 6d08b06 6e8fe39 Author: Arnd Bergmann Date: Thu Apr 26 16:44:54 2018 +0200 Merge tag 'socfpga_defconfig_fix_v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into fixes ARM: socfpga_defconfig: fix QSPI Sector 4k - disable CONFIG_MTD_SPI_NOR_USE_4K_SECTORS * tag 'socfpga_defconfig_fix_v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: socfpga_defconfig: Remove QSPI Sector 4K size force commit da6fa7ef67f07108a1b0cb9fd9e7fcaabd39c051 Author: Yazen Ghannam Date: Tue Apr 3 09:02:28 2018 -0500 x86/smpboot: Don't use mwait_play_dead() on AMD systems Recent AMD systems support using MWAIT for C1 state. However, MWAIT will not allow deeper cstates than C1 on current systems. play_dead() expects to use the deepest state available. The deepest state available on AMD systems is reached through SystemIO or HALT. If MWAIT is available, it is preferred over the other methods, so the CPU never reaches the deepest possible state. Don't try to use MWAIT to play_dead() on AMD systems. Instead, use CPUIDLE to enter the deepest state advertised by firmware. If CPUIDLE is not available then fallback to HALT. Signed-off-by: Yazen Ghannam Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: stable@vger.kernel.org Cc: Yazen Ghannam Link: https://lkml.kernel.org/r/20180403140228.58540-1-Yazen.Ghannam@amd.com arch/x86/kernel/smpboot.c | 2 ++ 1 file changed, 2 insertions(+) commit 0f925660a7bc49b269c163249a5d06da3a0c7b0a Author: Takashi Sakamoto Date: Thu Apr 26 22:00:29 2018 +0900 ALSA: dice: fix error path to destroy initialized stream data In error path of snd_dice_stream_init_duplex(), stream data for incoming packet can be left to be initialized. This commit fixes it. Fixes: 436b5abe2224 ('ALSA: dice: handle whole available isochronous streams') Cc: # v4.6+ Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd6dff55de7acb2e5065e69706400c41b1bd0521 Merge: cc6a0e3 a0a3786 ac1e55b 53fa1f6 Author: Rafael J. Wysocki Date: Thu Apr 26 15:11:39 2018 +0200 Merge branches 'acpi-watchdog', 'acpi-button' and 'acpi-video' * acpi-watchdog: ACPI / watchdog: Prefer iTCO_wdt on Lenovo Z50-70 * acpi-button: ACPI / button: make module loadable when booted in non-ACPI mode * acpi-video: ACPI / video: Only default only_lcd to true on Win8-ready _desktops_ commit e140c4af1b63125dff629e8339793390201e2470 Merge: ae860a1 855c1c2 ee53a65 Author: Rafael J. Wysocki Date: Thu Apr 26 15:10:25 2018 +0200 Merge branches 'acpi-pm' and 'pm-cpufreq' * acpi-pm: ACPI / PM: Blacklist Low Power S0 Idle _DSM for ThinkPad X1 Tablet(2016) * pm-cpufreq: cpufreq: brcmstb-avs-cpufreq: remove development debug support commit 14d12bb8582e158006c35cce0f8ae1706094f9a4 Author: Jiri Kosina Date: Thu Apr 12 14:39:10 2018 +0200 x86/mm: Make vmemmap and vmalloc base address constants unsigned long Commits 9b46a051e4 ("x86/mm: Initialize vmemmap_base at boot-time") and a7412546d8 ("x86/mm: Adjust vmalloc base and size at boot-time") lost the type information for __VMALLOC_BASE_L4, __VMALLOC_BASE_L5, __VMEMMAP_BASE_L4 and __VMEMMAP_BASE_L5 constants. Declare them explicitly unsigned long again. Fixes: 9b46a051e4 ("x86/mm: Initialize vmemmap_base at boot-time") Fixes: a7412546d8 ("x86/mm: Adjust vmalloc base and size at boot-time") Signed-off-by: Jiri Kosina Signed-off-by: Thomas Gleixner Acked-by: "Kirill A. Shutemov" Link: https://lkml.kernel.org/r/nycvar.YFH.7.76.1804121437350.28129@cbobk.fhfr.pm arch/x86/include/asm/pgtable_64_types.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a3ed0e4393d6885b4af7ce84b437dc696490a530 Author: Thomas Gleixner Date: Wed Apr 25 15:33:38 2018 +0200 Revert: Unify CLOCK_MONOTONIC and CLOCK_BOOTTIME Revert commits 92af4dcb4e1c ("tracing: Unify the "boot" and "mono" tracing clocks") 127bfa5f4342 ("hrtimer: Unify MONOTONIC and BOOTTIME clock behavior") 7250a4047aa6 ("posix-timers: Unify MONOTONIC and BOOTTIME clock behavior") d6c7270e913d ("timekeeping: Remove boot time specific code") f2d6fdbfd238 ("Input: Evdev - unify MONOTONIC and BOOTTIME clock behavior") d6ed449afdb3 ("timekeeping: Make the MONOTONIC clock behave like the BOOTTIME clock") 72199320d49d ("timekeeping: Add the new CLOCK_MONOTONIC_ACTIVE clock") As stated in the pull request for the unification of CLOCK_MONOTONIC and CLOCK_BOOTTIME, it was clear that we might have to revert the change. As reported by several folks systemd and other applications rely on the documented behaviour of CLOCK_MONOTONIC on Linux and break with the above changes. After resume daemons time out and other timeout related issues are observed. Rafael compiled this list: * systemd kills daemons on resume, after >WatchdogSec seconds of suspending (Genki Sky). [Verified that that's because systemd uses CLOCK_MONOTONIC and expects it to not include the suspend time.] * systemd-journald misbehaves after resume: systemd-journald[7266]: File /var/log/journal/016627c3c4784cd4812d4b7e96a34226/system.journal corrupted or uncleanly shut down, renaming and replacing. (Mike Galbraith). * NetworkManager reports "networking disabled" and networking is broken after resume 50% of the time (Pavel). [May be because of systemd.] * MATE desktop dims the display and starts the screensaver right after system resume (Pavel). * Full system hang during resume (me). [May be due to systemd or NM or both.] That happens on debian and open suse systems. It's sad, that these problems were neither catched in -next nor by those folks who expressed interest in this change. Reported-by: Rafael J. Wysocki Reported-by: Genki Sky , Reported-by: Pavel Machek Signed-off-by: Thomas Gleixner Cc: Dmitry Torokhov Cc: John Stultz Cc: Jonathan Corbet Cc: Kevin Easton Cc: Linus Torvalds Cc: Mark Salyzyn Cc: Michael Kerrisk Cc: Peter Zijlstra Cc: Petr Mladek Cc: Prarit Bhargava Cc: Sergey Senozhatsky Cc: Steven Rostedt Documentation/trace/ftrace.rst | 14 +++++-- drivers/input/evdev.c | 7 +++- include/linux/hrtimer.h | 2 + include/linux/timekeeper_internal.h | 2 - include/linux/timekeeping.h | 37 ++++++++++++------ include/uapi/linux/time.h | 1 - kernel/time/hrtimer.c | 16 +++++++- kernel/time/posix-stubs.c | 2 - kernel/time/posix-timers.c | 26 ++++++++----- kernel/time/tick-common.c | 15 ------- kernel/time/tick-internal.h | 6 --- kernel/time/tick-sched.c | 9 ----- kernel/time/timekeeping.c | 78 ++++++++++++++++++------------------- kernel/time/timekeeping.h | 1 + kernel/trace/trace.c | 2 +- 15 files changed, 114 insertions(+), 104 deletions(-) commit 1f71addd34f4c442bec7d7c749acc1beb58126f2 Author: Thomas Gleixner Date: Tue Apr 24 21:22:18 2018 +0200 tick/sched: Do not mess with an enqueued hrtimer Kaike reported that in tests rdma hrtimers occasionaly stopped working. He did great debugging, which provided enough context to decode the problem. CPU 3 CPU 2 idle start sched_timer expires = 712171000000 queue->next = sched_timer start rdmavt timer. expires = 712172915662 lock(baseof(CPU3)) tick_nohz_stop_tick() tick = 716767000000 timerqueue_add(tmr) hrtimer_set_expires(sched_timer, tick); sched_timer->expires = 716767000000 <---- FAIL if (tmr->expires < queue->next->expires) hrtimer_start(sched_timer) queue->next = tmr; lock(baseof(CPU3)) unlock(baseof(CPU3)) timerqueue_remove() timerqueue_add() ts->sched_timer is queued and queue->next is pointing to it, but then ts->sched_timer.expires is modified. This not only corrupts the ordering of the timerqueue RB tree, it also makes CPU2 see the new expiry time of timerqueue->next->expires when checking whether timerqueue->next needs to be updated. So CPU2 sees that the rdma timer is earlier than timerqueue->next and sets the rdma timer as new next. Depending on whether it had also seen the new time at RB tree enqueue, it might have queued the rdma timer at the wrong place and then after removing the sched_timer the RB tree is completely hosed. The problem was introduced with a commit which tried to solve inconsistency between the hrtimer in the tick_sched data and the underlying hardware clockevent. It split out hrtimer_set_expires() to store the new tick time in both the NOHZ and the NOHZ + HIGHRES case, but missed the fact that in the NOHZ + HIGHRES case the hrtimer might still be queued. Use hrtimer_start(timer, tick...) for the NOHZ + HIGHRES case which sets timer->expires after canceling the timer and move the hrtimer_set_expires() invocation into the NOHZ only code path which is not affected as it merily uses the hrtimer as next event storage so code pathes can be shared with the NOHZ + HIGHRES case. Fixes: d4af6d933ccf ("nohz: Fix spurious warning when hrtimer and clockevent get out of sync") Reported-by: "Wan Kaike" Signed-off-by: Thomas Gleixner Acked-by: Frederic Weisbecker Cc: "Marciniszyn Mike" Cc: Anna-Maria Gleixner Cc: linux-rdma@vger.kernel.org Cc: "Dalessandro Dennis" Cc: "Fleck John" Cc: stable@vger.kernel.org Cc: Peter Zijlstra Cc: Frederic Weisbecker Cc: "Weiny Ira" Cc: "linux-rdma@vger.kernel.org" Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1804241637390.1679@nanos.tec.linutronix.de Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1804242119210.1597@nanos.tec.linutronix.de kernel/time/tick-sched.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a4eb490a41a0da3b1275fc7427084cf9ae2c3c1c Author: Arvind Yadav Date: Fri Mar 30 16:56:10 2018 +0530 HID: intel-ish-hid: use put_device() instead of kfree() Never directly free @dev after calling device_register(), even if it returned an error. Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17515f1b764df36271f3166c714f5a78301fbaa7 Author: Qu Wenruo Date: Mon Apr 23 17:32:04 2018 +0800 btrfs: Fix wrong first_key parameter in replace_path Commit 581c1760415c ("btrfs: Validate child tree block's level and first key") introduced new @first_key parameter for read_tree_block(), however caller in replace_path() is parasing wrong key to read_tree_block(). It should use parameter @first_key other than @key. Normally it won't expose problem as @key is normally initialzied to the same value of @first_key we expect. However in relocation recovery case, @key can be set to (0, 0, 0), and since no valid key in relocation tree can be (0, 0, 0), it will cause read_tree_block() to return -EUCLEAN and interrupt relocation recovery. Fix it by setting @first_key correctly. Fixes: 581c1760415c ("btrfs: Validate child tree block's level and first key") Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/relocation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d878817db22f64c2b2c241335ec03e4c3fd5476 Author: Dou Liyang Date: Thu Apr 26 14:08:32 2018 +0800 x86/vector: Remove the unused macro FPU_IRQ The macro FPU_IRQ has never been used since v3.10, So remove it. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180426060832.27312-1-douly.fnst@cn.fujitsu.com arch/x86/include/asm/irq_vectors.h | 2 -- 1 file changed, 2 deletions(-) commit ab3dbcf78f60f46d6a0ad63b1f4b690b7a427140 Author: Timur Tabi Date: Thu Mar 29 13:29:12 2018 -0500 gpioib: do not free unrequested descriptors If the main loop in linehandle_create() encounters an error, it unwinds completely by freeing all previously requested GPIO descriptors. However, if the error occurs in the beginning of the loop before that GPIO is requested, then the exit code attempts to free a null descriptor. If extrachecks is enabled, gpiod_free() triggers a WARN_ON. Instead, keep a separate count of legitimate GPIOs so that only those are freed. Cc: stable@vger.kernel.org Fixes: d7c51b47ac11 ("gpio: userspace ABI for reading/writing GPIO lines") Reviewed-by: Bjorn Andersson Signed-off-by: Timur Tabi Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f241632fd087d3d9fbd5450f4d8c8604badd8348 Author: Govert Overgaauw Date: Fri Apr 6 14:41:35 2018 +0200 gpio: fix aspeed_gpio unmask irq The unmask function disables all interrupts in a bank when unmasking an interrupt. Only disable the given interrupt. Cc: stable@vger.kernel.org Signed-off-by: Govert Overgaauw Signed-off-by: Linus Walleij drivers/gpio/gpio-aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a7228d90d42bcacfe38786756ba62762b91c20a Author: Geert Uytterhoeven Date: Tue Apr 10 15:21:44 2018 +0200 ARM: amba: Fix race condition with driver_override The driver_override implementation is susceptible to a race condition when different threads are reading vs storing a different driver override. Add locking to avoid this race condition. Cfr. commits 6265539776a0810b ("driver core: platform: fix race condition with driver_override") and 9561475db680f714 ("PCI: Fix race condition with driver_override"). Fixes: 3cf385713460eb2b ("ARM: 8256/1: driver coamba: add device binding path 'driver_override'") Signed-off-by: Geert Uytterhoeven Reviewed-by: Todd Kjos Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/amba/bus.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 5f53624662eaac89598641cee6cd54fc192572d9 Author: Geert Uytterhoeven Date: Tue Apr 10 15:21:43 2018 +0200 ARM: amba: Make driver_override output consistent with other buses For AMBA devices with unconfigured driver override, the "driver_override" sysfs virtual file is empty, while it contains "(null)" for platform and PCI devices. Make AMBA consistent with other buses by dropping the test for a NULL pointer. Note that contrary to popular belief, sprintf() handles NULL pointers fine; they are printed as "(null)". Signed-off-by: Geert Uytterhoeven Cc: stable Reviewed-by: Todd Kjos Signed-off-by: Greg Kroah-Hartman drivers/amba/bus.c | 3 --- 1 file changed, 3 deletions(-) commit 2891d4feae7c2cf0a56d84bf38519aae6c5060b5 Author: Greg Kroah-Hartman Date: Thu Apr 26 10:29:57 2018 +0200 Revert "ARM: amba: Fix race condition with driver_override" This reverts commit 6b614a87f3f477571e319281e84dba11e0ea0a76. My backport was incorrect, as Geert pointed out :( Reported-by: Geert Uytterhoeven Cc: Todd Kjos Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/amba/bus.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 13f149d47392782baafd96d54d4e65f3b5ca342f Author: Thomas Hellstrom Date: Thu Apr 26 09:59:30 2018 +0200 drm/vmwgfx: Fix a buffer object leak A buffer object leak was introduced when fixing a premature buffer object release. Fix this. Cc: Fixes: 73a88250b709 ("Fix a destoy-while-held mutex problem.") Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 1 + 1 file changed, 1 insertion(+) commit 21fbd085e62ff9a11318f5a9aba55e56e8503173 Author: Thomas Hellstrom Date: Thu Apr 26 09:48:55 2018 +0200 drm/vmwgfx: Clean up fbdev modeset locking At least since the atomic port, the vmwgfx fbdev code is taking a number of unnecessary modeset locks. In particular the kms_set_config() function will grab its own locks, leading to locking retries. So avoid drm_modeset_lock_all() and instead provide a local acquire context for kms_set_config(). Also have the vmw_kms_fbdev_init data itself grab the lock that it needs. This also fixed a long standing problem that vmw_fb_close() didn't provide an acquire context for kms_set_config(), causing potential warnings and hangs during driver unload. This problem was uncovered by the recent commit "drm/vmwgfx: Improve on hibernation" Testing done: Repeated driver load and unload on Ubuntu 16.04.2 Fixes: c3b9b1657344 ("drm/vmwgfx: Improve on hibernation") Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 31 ++++++++++--------------------- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 13 ++++++++++--- 2 files changed, 20 insertions(+), 24 deletions(-) commit 019fca287f93fa5e110ec33bcfadf16c04181ee5 Author: Vinod Koul Date: Thu Apr 26 12:05:12 2018 +0530 dmaengine: Update email address for Vinod Update the email address for DMAengine maintainer Signed-off-by: Vinod Koul MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3072805c61167b85a30ceeef606620704db31f7 Author: Dou Liyang Date: Wed Apr 25 10:05:53 2018 +0800 x86/vector: Remove the macro VECTOR_OFFSET_START Now, Linux uses matrix allocator for vector assignment, the original assignment code which used VECTOR_OFFSET_START has been removed. So remove the stale macro as well. Fixes: commit 69cde0004a4b ("x86/vector: Use matrix allocator for vector assignment") Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Acked-by: David Rientjes Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180425020553.17210-1-douly.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/include/asm/irq_vectors.h | 5 ----- 1 file changed, 5 deletions(-) commit 9124130573950dcfc06b6a59306edfda2fc33ec7 Author: Fenghua Yu Date: Mon Apr 23 11:29:22 2018 -0700 x86/cpufeatures: Enumerate cldemote instruction cldemote is a new instruction in future x86 processors. It hints to hardware that a specified cache line should be moved ("demoted") from the cache(s) closest to the processor core to a level more distant from the processor core. This instruction is faster than snooping to make the cache line available for other cores. cldemote instruction is indicated by the presence of the CPUID feature flag CLDEMOTE (CPUID.(EAX=0x7, ECX=0):ECX[bit25]). More details on cldemote instruction can be found in the latest Intel Architecture Instruction Set Extensions and Future Features Programming Reference. Signed-off-by: Fenghua Yu Signed-off-by: Thomas Gleixner Cc: "Ravi V Shankar" Cc: "H. Peter Anvin" Cc: "Ashok Raj" Link: https://lkml.kernel.org/r/1524508162-192587-1-git-send-email-fenghua.yu@intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) commit d4652f614f2163a56aee4c03a88af76f98d52161 Merge: 4e949e9 80ee8c5 Author: Ingo Molnar Date: Thu Apr 26 07:28:29 2018 +0200 Merge tag 'perf-urgent-for-mingo-4.17-20180425' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: perf stat: - Keep the '/' event modifier separator in fallback, for example when fallbacking from 'cpu/cpu-cycles/' to user level only, where it should become 'cpu/cpu-cycles/u' and not 'cpu/cpu-cycles/:u' (Jiri Olsa) - Fix PMU events parsing rule, improving error reporting for invalid events (Jiri Olsa) - Disable write_backward and other event attributes for !group events in a group, fixing, for instance this group: '{cycles,msr/aperf/}:S' that has leader sampling (:S) and where just the 'cycles', the leader event, should have the write_backward attribute set, in this case it all fails because the PMU where 'msr/aperf/' lives doesn't accepts write_backward style sampling (Jiri Olsa) - Only fall back group read for leader (Kan Liang) - Fix core PMU alias list for x86 platform (Kan Liang) - Print out hint for mixed PMU group error (Kan Liang) - Fix duplicate PMU name for interval print (Kan Liang) Core: - Set main kernel end address properly when reading kernel and module maps (Namhyung Kim) perf mem: - Fix incorrect entries and add missing man options (Sangwon Hong) s/390: - Remove s390 specific strcmp_cpuid_cmp function (Thomas Richter) - Adapt 'perf test' case record+probe_libc_inet_pton.sh for s390 - Fix s390 undefined record__auxtrace_init() return value in 'perf record' (Thomas Richter) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 7ef79ad52136712172eb0525bf0b462516bf2f93 Author: Theodore Ts'o Date: Thu Apr 26 00:44:46 2018 -0400 ext4: add MODULE_SOFTDEP to ensure crc32c is included in the initramfs Fixes: a45403b51582 ("ext4: always initialize the crc32c checksum driver") Reported-by: François Valenduc Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/super.c | 1 + 1 file changed, 1 insertion(+) commit 69bfd470f4623d2d57ad62cb33791cded0c662f4 Merge: 3442097 d90a10e Author: Linus Torvalds Date: Wed Apr 25 21:23:38 2018 -0700 Merge tag 'for_v4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify fix from Jan Kara: "A fix of a fsnotify race causing panics / softlockups" * tag 'for_v4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fsnotify: Fix fsnotify_mark_connector race commit 3442097b765c3e89fe3afe755054e6683b140f6d Merge: 8fba70b 8e1ceaf Author: Linus Torvalds Date: Wed Apr 25 21:13:40 2018 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Eight bug fixes, one spelling update and one tracepoint addition. The most serious is probably the mptsas write same fix because it means anyone using these controllers sees errors when modern filesystems try to issue discards" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: target: fix crash with iscsi target and dvd scsi: sd_zbc: Avoid that resetting a zone fails sporadically scsi: sd: Defer spinning up drive while SANITIZE is in progress scsi: megaraid_sas: Do not log an error if FW successfully initializes. scsi: ufs: add trace event for ufs upiu scsi: core: remove reference to scsi_show_extd_sense() scsi: mptsas: Disable WRITE SAME scsi: fnic: fix spelling mistake in fnic stats "Abord" -> "Abort" scsi: scsi_debug: IMMED related delay adjustments scsi: iscsi: respond to netlink with unicast when appropriate commit 8fba70b0850a0163f1018a122200ec11b854135c Merge: c6dc3e7 4412efe Author: Linus Torvalds Date: Wed Apr 25 21:05:15 2018 -0700 Merge tag 'for-linus-20180425' of git://git.kernel.dk/linux-block Pull block updates from Jens Axboe: "I ended up sitting on this about a week longer than I wanted to, since we were hashing out details with a timeout change. I've now killed that patch, so we can flush the existing queue in due time. This contains: - Fix for an old regression, where entering the queue can be disturbed by a signal to the process. This can cause spurious EIO. Fix from Alan Jenkins. - cdrom information leak fix from Dan. - Trivial helper for testing queue FUA from Dave Chinner, part of his O_DIRECT FUA series. - Series of swim fixes from Finn that actually makes it work again. - Loop O_DIRECT corruption fix, which caused data corruption in production for us. From me. - BFQ crash fix from me. - bcache maintainer update. Michael no longer has the time to do it, Coly has stepped up to serve as the new maintainer. - blkcg locking fixes from Jiang Biao. - Revert of a change from this merge window from Ming, that causes an issue on some hardware. - Minor clarification doc addition from Linus Walleij" * tag 'for-linus-20180425' of git://git.kernel.dk/linux-block: (22 commits) Revert "blk-mq: remove code for dealing with remapping queue" block: mq: Add some minor doc for core structs bcache: mark Coly Li as bcache maintainer MAINTAINERS: Remove me as maintainer of bcache blkcg: init root blkcg_gq under lock blkcg: small fix on comment in blkcg_init_queue blkcg: don't hold blkcg lock when deactivating policy block: add blk_queue_fua() helper function cdrom: information leak in cdrom_ioctl_media_changed() bfq-iosched: ensure to clear bic/bfqq pointers when preparing request blk-mq: start request gstate with gen 1 block/swim: Select appropriate drive on device open block/swim: Fix IO error at end of medium block/swim: Check drive type block/swim: Rename macros to avoid inconsistent inverted logic block/swim: Don't log an error message for an invalid ioctl block/swim: Remove extra put_disk() call from error path block/swim: Fix array bounds check m68k/mac: Don't remap SWIM MMIO region loop: handle short DIO reads ... commit c6dc3e711a28b6b4c5e63f2bca34a5cfd35e9a22 Merge: 26ed24e 85602be Author: Linus Torvalds Date: Wed Apr 25 20:27:23 2018 -0700 Merge tag 'riscv-for-linus-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux Pull RISC-V fixes from Palmer Dabbelt: "This contains three small fixes related to the RISC-V port that I'd like to target for 4.17-rc3: - a Kconfig cleanup to select DMA_DIRECT_OPS instead of redefining it in arch/riscv - the removal of asm/handle_irq.h, which doesn't exist, from our arch header list - the addition of "-no-pie" the link rules for our VDSO-related files, which fixes the build on systems where PIE is enabled by default" * tag 'riscv-for-linus-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux: RISC-V: build vdso-dummy.o with -no-pie riscv: there is no riscv: select DMA_DIRECT_OPS instead of redefining it commit 25eb0ea7174c6e84f21fa59dccbddd0318b17b12 Merge: 91a8252 9c299a3 Author: David S. Miller Date: Wed Apr 25 22:55:33 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-04-25 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix to clear the percpu metadata_dst that could otherwise carry stale ip_tunnel_info, from William. 2) Fix that reduces the number of passes in x64 JIT with regards to dead code sanitation to avoid risk of prog rejection, from Gianluca. 3) Several fixes of sockmap programs, besides others, fixing a double page_put() in error path, missing refcount hold for pinned sockmap, adding required -target bpf for clang in sample Makefile, from John. 4) Fix to disable preemption in __BPF_PROG_RUN_ARRAY() paths, from Roman. 5) Fix tools/bpf/ Makefile with regards to a lex/yacc build error seen on older gcc-5, from John. ==================== Signed-off-by: David S. Miller commit bb1278e891662616ccf4584523318d5f7ddb3a7c Merge: 14cdea8 1f6b8ee Author: Dave Airlie Date: Thu Apr 26 11:09:56 2018 +1000 Merge tag 'drm-misc-fixes-2018-04-25' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes sun41: Fix regression for TBSA711 tablet (Ondrej) qxl: 2 bug fixes (Gerd) core: Don't use stale display info between HDMI hotplugs (Ville) virtio: Fix guest spinning when request queue is full (Gerd) Cc: Ondrej Jirman Cc: Gerd Hoffmann Cc: Ville Syrjälä * tag 'drm-misc-fixes-2018-04-25' of git://anongit.freedesktop.org/drm/drm-misc: drm/edid: Reset more of the display info drm/virtio: fix vq wait_event condition qxl: keep separate release_bo pointer qxl: fix qxl_release_{map,unmap} Revert "drm/sun4i: add lvds mode_valid function" commit 14cdea89459e71e38027aa4fb1099c29f4c53316 Merge: 8eb8ad5 789d4c3 Author: Dave Airlie Date: Thu Apr 26 11:09:04 2018 +1000 Merge tag 'drm-msm-fixes-2018-04-25' of git://people.freedesktop.org/~robclark/linux into drm-fixes A few fixes for 4.17.. thanks to Sean for helping pull together some of the display related fixes while I was off in compute-land. * tag 'drm-msm-fixes-2018-04-25' of git://people.freedesktop.org/~robclark/linux: drm/msm: don't deref error pointer in the msm_fbdev_create error path drm/msm/dsi: use correct enum in dsi_get_cmd_fmt drm/msm: Fix possible null dereference on failure of get_pages() drm/msm: Add modifier to mdp_get_format arguments drm/msm: Mark the crtc->state->event consumed drm/msm/dsi: implement auto PHY timing calculator for 10nm PHY drm/msm/dsi: check video mode engine status before waiting drm/msm/dsi: check return value for video done waits commit 8eb8ad52fbc99aa87f1c56db378ee910833ed780 Merge: d736aa6 7ad3572 Author: Dave Airlie Date: Thu Apr 26 11:08:26 2018 +1000 Merge branch 'drm-fixes-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-fixes - Fix a hang on CZ boards with EDC enabled - Fix hangs related to DP MST handling - Fix a deadlock in irq handling in DC * 'drm-fixes-4.17' of git://people.freedesktop.org/~agd5f/linux: drm/amd/display: Check dc_sink every time in MST hotplug drm/amd/display: Update MST edid property every time drm/amd/display: Don't read EDID in atomic_check drm/amd/display: Disallow enabling CRTC without primary plane with FB drm/amd/display: Fix deadlock when flushing irq drm/amdgpu: set COMPUTE_PGM_RSRC1 for SGPR/VGPR clearing shaders commit d736aa62c291623b4cf71ea57daa6e63047c640e Merge: 6d08b06 7bbc0b9 Author: Dave Airlie Date: Thu Apr 26 11:07:52 2018 +1000 Merge tag 'drm-amdkfd-fixes-2018-04-24' of git://people.freedesktop.org/~gabbayo/linux into drm-fixes - fix amdkfd Kconfig to select MMU_NOTIFIER - allow clock retrieval in case GPU not present - fix return code from function - make function static (fix sparse warning) * tag 'drm-amdkfd-fixes-2018-04-24' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: fix build, select MMU_NOTIFIER drm/amdkfd: fix clock counter retrieval for node without GPU drm/amdkfd: Fix the error return code in kfd_ioctl_unmap_memory_from_gpu() drm/amdkfd: kfd_dev_is_large_bar() can be static commit 93dd4e73c0d9cc32f835d76a54257020b0bfc75a Author: Ramon Fried Date: Fri Mar 23 00:09:12 2018 -0400 rpmsg: added MODULE_ALIAS for rpmsg_char Added "rpmsg:rpmsg_chrdev" MODULE_ALIAS to autoload rpmg_chrdev module automatically. Signed-off-by: Ramon Fried Signed-off-by: Bjorn Andersson drivers/rpmsg/rpmsg_char.c | 2 ++ 1 file changed, 2 insertions(+) commit 278d744c46fd4f1925aec77752d18a0e4a9cbec3 Author: Tobias Jordan Date: Thu Feb 15 16:12:55 2018 +0100 remoteproc: qcom: Fix potential device node leaks Add missing of_node_put()s at two places for device nodes returned by of_parse_phandle(). Fixes: 051fb70fd4ea ("remoteproc: qcom: Driver for the self-authenticating Hexagon v5") Signed-off-by: Tobias Jordan Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_q6v5_pil.c | 2 ++ 1 file changed, 2 insertions(+) commit fcd58037f28bf70eb17157a51fbf94d466634a7d Author: Arnaud Pouliquen Date: Tue Apr 10 10:57:25 2018 +0200 remoteproc: fix crashed parameter logic on stop call Fix rproc_add_subdev parameter name and inverse the crashed logic. Fixes: 880f5b388252 ("remoteproc: Pass type of shutdown to subdev remove") Reviewed-by: Alex Elder Signed-off-by: Arnaud Pouliquen Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 4 ++-- include/linux/remoteproc.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 9c299a32ede98dc9faafb267034ed830a15304db Author: John Fastabend Date: Wed Apr 25 14:22:45 2018 -0700 bpf: fix for lex/yacc build error with gcc-5 Fix build error found with Ubuntu shipped gcc-5 ~/git/bpf/tools/bpf$ make all Auto-detecting system features: ... libbfd: [ OFF ] ... disassembler-four-args: [ OFF ] CC bpf_jit_disasm.o LINK bpf_jit_disasm CC bpf_dbg.o /home/john/git/bpf/tools/bpf/bpf_dbg.c: In function ‘cmd_load’: /home/john/git/bpf/tools/bpf/bpf_dbg.c:1077:13: warning: ‘cont’ may be used uninitialized in this function [-Wmaybe-uninitialized] } else if (matches(subcmd, "pcap") == 0) { ^ LINK bpf_dbg CC bpf_asm.o make: *** No rule to make target `bpf_exp.yacc.o', needed by `bpf_asm'. Stop. Fixes: 5a8997f20715 ("tools: bpf: respect output directory during build") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann tools/bpf/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 4e949e9b9d1e3edcdab3b54656c5851bd9e49c67 Author: Kan Liang Date: Wed Apr 25 14:57:17 2018 -0400 perf/x86/intel: Don't enable freeze-on-smi for PerfMon V1 The SMM freeze feature was introduced since PerfMon V2. But the current code unconditionally enables the feature for all platforms. It can generate #GP exception, if the related FREEZE_WHILE_SMM bit is set for the machine with PerfMon V1. To disable the feature for PerfMon V1, perf needs to - Remove the freeze_on_smi sysfs entry by moving intel_pmu_attrs to intel_pmu, which is only applied to PerfMon V2 and later. - Check the PerfMon version before flipping the SMM bit when starting CPU Fixes: 6089327f5424 ("perf/x86: Add sysfs entry to freeze counters on SMI") Signed-off-by: Kan Liang Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: ak@linux.intel.com Cc: eranian@google.com Cc: acme@redhat.com Link: https://lkml.kernel.org/r/1524682637-63219-1-git-send-email-kan.liang@linux.intel.com arch/x86/events/intel/core.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 1f6b8eef11c3d097bc8a6b2bbb868eb47ec6f7d8 Author: Ville Syrjälä Date: Tue Apr 24 16:02:50 2018 +0300 drm/edid: Reset more of the display info We're currently failing to reset everything in display_info.hdmi which will potentially cause us to use stale information when swapping monitors. Eg. if the user replaces a HDMI 2.0 monitor with a HDMI 1.x monitor we will continue to think that the monitor supports scrambling. That will lead to a black screen since the HDMI 1.x monitor won't understand the scrambled signal. Fix the problem by clearing display_info.hdmi fully. And while at eliminate some duplicated code by calling drm_reset_display_info() in drm_add_display_info(). Cc: stable@vger.kernel.org Cc: Antony Chen Cc: Shashank Sharma Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105655 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180424130250.7028-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Tested-by: Antony Chen Signed-off-by: Sean Paul drivers/gpu/drm/drm_edid.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit d02d270014f70dcab0117776b81a37b6fca745ae Author: Gerd Hoffmann Date: Tue Apr 3 11:59:04 2018 +0200 drm/virtio: fix vq wait_event condition Wait until we have enough space in the virt queue to actually queue up our request. Avoids the guest spinning in case we have a non-zero amount of free entries but not enough for the request. Cc: stable@vger.kernel.org Reported-by: Alain Magloire Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20180403095904.11152-1-kraxel@redhat.com Signed-off-by: Sean Paul drivers/gpu/drm/virtio/virtgpu_vq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a31805ba28c93f80cf874492e2f21da80851a9f Author: Gerd Hoffmann Date: Wed Apr 18 07:42:57 2018 +0200 qxl: keep separate release_bo pointer qxl expects that list_first_entry(release->bos) returns the first element qxl added to the list. ttm_eu_reserve_buffers() may reorder the list though. Add a release_bo field to struct qxl_release and use that instead. Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180418054257.15388-3-kraxel@redhat.com Signed-off-by: Sean Paul drivers/gpu/drm/qxl/qxl_cmd.c | 6 ++---- drivers/gpu/drm/qxl/qxl_drv.h | 1 + drivers/gpu/drm/qxl/qxl_release.c | 12 ++++++------ 3 files changed, 9 insertions(+), 10 deletions(-) commit 66c0255cf58718517e4cdff3612b92b82c2bf71b Author: Gerd Hoffmann Date: Wed Apr 18 07:42:56 2018 +0200 qxl: fix qxl_release_{map,unmap} s/PAGE_SIZE/PAGE_MASK/ Luckily release_offset is never larger than PAGE_SIZE, so the bug has no bad side effects and managed to stay unnoticed for years that way ... Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180418054257.15388-2-kraxel@redhat.com Signed-off-by: Sean Paul drivers/gpu/drm/qxl/qxl_ioctl.c | 4 ++-- drivers/gpu/drm/qxl/qxl_release.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit ab170c27361d1578b4769276ce2bbdb14394743d Author: Ondrej Jirman Date: Sat Apr 21 06:51:55 2018 +0200 Revert "drm/sun4i: add lvds mode_valid function" The reverted commit broke LVDS output on TBS A711 Tablet. That tablet has simple-panel node that has fixed pixel clock-frequency that A83T SoC used in the tablet can't generate exactly. Requested rate is 52000000 and rounded_rate is calculated as 51857142. It's close enough for it to work in practice, but with strict check in the reverted commit, the mode is rejected needlessly in this case. DT allows to specify a range of values for simple-panel/clock-frequency, but driver doesn't respect that ATM. Given that TBS A711 is the single user of sun4i-lvds driver, let's revert that commit for now, until a better solution for the problem is found. Also see: https://patchwork.kernel.org/patch/9446385/ for relevant discussion (or search for "[RFC] drm/sun4i: rgb: Add 5% tolerance to dot clock frequency check"). Fixes: e4e4b7ad50cf ("drm/sun4i: add lvds mode_valid function") Reported-by: Ondrej Jirman Signed-off-by: Ondrej Jirman Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180421045155.15332-1-megous@megous.com Signed-off-by: Sean Paul drivers/gpu/drm/sun4i/sun4i_lvds.c | 55 -------------------------------------- 1 file changed, 55 deletions(-) commit 26ed24e429d89e045e5eb2d2b75215244347b7f2 Merge: 3be4aaf 60695be Author: Linus Torvalds Date: Wed Apr 25 11:48:09 2018 -0700 Merge tag 'dma-mapping-4.17-3' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fixes from Christoph Hellwig: "A few small dma-mapping fixes for Linux 4.17-rc3: - don't loop to try GFP_DMA allocations if ZONE_DMA is not actually enabled (regression in 4.16) - don't try to do virt_to_page before we know we actuall have a valid page in dma_common_mmap - a comment fixup related to the above fix" * tag 'dma-mapping-4.17-3' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: postpone cpu addr translation on mmap dma-coherent: clarify dma_mmap_from_dev_coherent documentation dma-direct: don't retry allocation for no-op GFP_DMA commit 91a825290ca4eae88603bc811bf74a45f94a3f46 Author: Dag Moxnes Date: Wed Apr 25 13:22:01 2018 +0200 rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp The function rds_ib_setup_qp is calling rds_ib_get_client_data and should correspondingly call rds_ib_dev_put. This call was lost in the non-error path with the introduction of error handling done in commit 3b12f73a5c29 ("rds: ib: add error handle") Signed-off-by: Dag Moxnes Reviewed-by: Håkon Bugge Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib_cm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 070204a34884110ac5e19c1e2e036fcfd033f8e3 Author: Ursula Braun Date: Wed Apr 25 12:48:58 2018 +0200 net/smc: keep clcsock reference in smc_tcp_listen_work() The internal CLC socket should exist till the SMC-socket is released. Function tcp_listen_worker() releases the internal CLC socket of a listen socket, if an smc_close_active() is called. This function is called for the final release(), but it is called for shutdown SHUT_RDWR as well. This opens a door for protection faults, if socket calls using the internal CLC socket are called for a shutdown listen socket. With the changes of commit 3d502067599f ("net/smc: simplify wait when closing listen socket") there is no need anymore to release the internal CLC socket in function tcp_listen_worker((). It is sufficient to release it in smc_release(). Fixes: 127f49705823 ("net/smc: release clcsock from tcp_listen_worker") Signed-off-by: Ursula Braun Reported-by: syzbot+9045fc589fcd196ef522@syzkaller.appspotmail.com Reported-by: syzbot+28a2c86cf19c81d871fa@syzkaller.appspotmail.com Reported-by: syzbot+9605e6cace1b5efd4a0a@syzkaller.appspotmail.com Reported-by: syzbot+cf9012c597c8379d535c@syzkaller.appspotmail.com Signed-off-by: David S. Miller net/smc/af_smc.c | 4 ---- 1 file changed, 4 deletions(-) commit 5c60300d68da32ca77f7f978039dc72bfc78b06b Author: Michael S. Tsirkin Date: Fri Apr 20 21:00:13 2018 +0300 virtio_console: reset on out of memory When out of memory and we can't add ctrl vq buffers, probe fails. Unfortunately the error handling is out of spec: it calls del_vqs without bothering to reset the device first. To fix, call the full cleanup function in this case. Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin drivers/char/virtio_console.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit aa44ec867030a72e8aa127977e37dec551d8df19 Author: Michael S. Tsirkin Date: Fri Apr 20 20:51:18 2018 +0300 virtio_console: move removal code Will make it reusable for error handling. Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin drivers/char/virtio_console.c | 72 +++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 36 deletions(-) commit 61a8950c5c5708cf2068b29ffde94e454e528208 Author: Michael S. Tsirkin Date: Fri Apr 20 20:49:04 2018 +0300 virtio_console: drop custom control queue cleanup We now cleanup all VQs on device removal - no need to handle the control VQ specially. Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin drivers/char/virtio_console.c | 17 ----------------- 1 file changed, 17 deletions(-) commit a7a69ec0d8e4a58be7db88d33cbfa2912807bb2b Author: Michael S. Tsirkin Date: Fri Apr 20 20:24:23 2018 +0300 virtio_console: free buffers after reset Console driver is out of spec. The spec says: A driver MUST NOT decrement the available idx on a live virtqueue (ie. there is no way to “unexpose” buffers). and it does exactly that by trying to detach unused buffers without doing a device reset first. Defer detaching the buffers until device unplug. Of course this means we might get an interrupt for a vq without an attached port now. Handle that by discarding the consumed buffer. Reported-by: Tiwei Bie Fixes: b3258ff1d6 ("virtio: Decrement avail idx on buffer detach") Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin drivers/char/virtio_console.c | 49 +++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 25 deletions(-) commit 24a7e4d20783c0514850f24a5c41ede46ab058f0 Author: Michael S. Tsirkin Date: Fri Apr 20 20:22:40 2018 +0300 virtio: add ability to iterate over vqs For cleanup it's helpful to be able to simply scan all vqs and discard all data. Add an iterator to do that. Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin include/linux/virtio.h | 3 +++ 1 file changed, 3 insertions(+) commit 2855b33514d290c51d52d94e25d3ef942cd4d578 Author: Michael S. Tsirkin Date: Fri Apr 20 19:54:23 2018 +0300 virtio_console: don't tie bufs to a vq an allocated buffer doesn't need to be tied to a vq - only vq->vdev is ever used. Pass the function the just what it needs - the vdev. Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin drivers/char/virtio_console.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 02a6efcab675fe32815d824837784c3f42a7d892 Author: Alexandre Belloni Date: Tue Apr 24 18:09:04 2018 +0200 net: phy: allow scanning busses with missing phys Some MDIO busses will error out when trying to read a phy address with no phy present at that address. In that case, probing the bus will fail because __mdiobus_register() is scanning the bus for all possible phys addresses. In case MII_PHYSID1 returns -EIO or -ENODEV, consider there is no phy at this address and set the phy ID to 0xffffffff which is then properly handled in get_phy_device(). Suggested-by: Andrew Lunn Signed-off-by: Alexandre Belloni Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit b93815d0f37e7c4a056a143e6d782abc084ea56b Author: Andres Rodriguez Date: Wed Apr 25 12:25:39 2018 -0400 firmware: some documentation fixes Including: - Fixup outdated kernel-doc paths - Slightly too short title underline - Some typos Signed-off-by: Andres Rodriguez Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/firmware/request_firmware.rst | 6 +++--- drivers/base/firmware_loader/fallback.c | 4 ++-- drivers/base/firmware_loader/fallback.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 8bcda1d2a79da4ab84162574eee2c9f6e1a12a03 Author: Long Li Date: Tue Apr 17 12:17:07 2018 -0700 cifs: smbd: Avoid allocating iov on the stack It's not necessary to allocate another iov when going through the buffers in smbd_send() through RDMA send. Remove it to reduce stack size. Thanks to Matt for spotting a printk typo in the earlier version of this. CC: Matt Redfearn Signed-off-by: Long Li Acked-by: Ronnie Sahlberg Cc: stable@vger.kernel.org Signed-off-by: Steve French fs/cifs/smbdirect.c | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) commit bb4c0419476bd3982ba802f0f49de83cd79532d8 Author: Long Li Date: Tue Apr 17 12:17:08 2018 -0700 cifs: smbd: Don't use RDMA read/write when signing is used SMB server will not sign data transferred through RDMA read/write. When signing is used, it's a good idea to have all the data signed. In this case, use RDMA send/recv for all data transfers. This will degrade performance as this is not generally configured in RDMA environemnt. So warn the user on signing and RDMA send/recv. Signed-off-by: Long Li Acked-by: Ronnie Sahlberg Cc: stable@vger.kernel.org Signed-off-by: Steve French fs/cifs/cifssmb.c | 3 +++ fs/cifs/smb2ops.c | 18 ++++++++++++++---- fs/cifs/smb2pdu.c | 4 ++-- 3 files changed, 19 insertions(+), 6 deletions(-) commit 0d5ec281c0175d10f8d9be4d4a9c5fb37767ed00 Author: Steve French Date: Sun Apr 22 19:51:22 2018 -0500 SMB311: Fix reconnect The preauth hash was not being recalculated properly on reconnect of SMB3.11 dialect mounts (which caused access denied repeatedly on auto-reconnect). Fixes: 8bd68c6e47ab ("CIFS: implement v3.11 preauth integrity") Signed-off-by: Steve French CC: Stable Reviewed-by: Ronnie Sahlberg fs/cifs/transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d2ffed5185df9d8d9ccd150e4340e3b6f96a8381 Author: Geert Uytterhoeven Date: Tue Apr 10 15:21:45 2018 +0200 ARM: amba: Don't read past the end of sysfs "driver_override" buffer When printing the driver_override parameter when it is 4095 and 4094 bytes long, the printing code would access invalid memory because we need count + 1 bytes for printing. Cfr. commits 4efe874aace57dba ("PCI: Don't read past the end of sysfs "driver_override" buffer") and bf563b01c2895a4b ("driver core: platform: Don't read past the end of "driver_override" buffer"). Fixes: 3cf385713460eb2b ("ARM: 8256/1: driver coamba: add device binding path 'driver_override'") Signed-off-by: Geert Uytterhoeven Reviewed-by: Todd Kjos Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/amba/bus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6b614a87f3f477571e319281e84dba11e0ea0a76 Author: Geert Uytterhoeven Date: Tue Apr 10 15:21:44 2018 +0200 ARM: amba: Fix race condition with driver_override The driver_override implementation is susceptible to a race condition when different threads are reading vs storing a different driver override. Add locking to avoid this race condition. Cfr. commits 6265539776a0810b ("driver core: platform: fix race condition with driver_override") and 9561475db680f714 ("PCI: Fix race condition with driver_override"). Fixes: 3cf385713460eb2b ("ARM: 8256/1: driver coamba: add device binding path 'driver_override'") Signed-off-by: Geert Uytterhoeven Reviewed-by: Todd Kjos Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/amba/bus.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 4412efecf7fda3b8f9f18feed7938f2281f5ccbc Author: Ming Lei Date: Wed Apr 25 04:01:44 2018 +0800 Revert "blk-mq: remove code for dealing with remapping queue" This reverts commit 37c7c6c76d431dd7ef9c29d95f6052bd425f004c. Turns out some drivers(most are FC drivers) may not use managed IRQ affinity, and has their customized .map_queues meantime, so still keep this code for avoiding regression. Reported-by: Laurence Oberman Tested-by: Laurence Oberman Tested-by: Christian Borntraeger Tested-by: Stefan Haberland Cc: Ewan Milne Cc: Christoph Hellwig Cc: Sagi Grimberg Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) commit 0183df0baf7912b9fae16b5281f1eabbb4572b3d Author: Jeffrin Jose T Date: Mon Apr 23 19:40:22 2018 +0530 selftests:firmware: fixes a call to a wrong function name This is a patch to the tools/testing/selftests/firmware/fw_run_tests.sh file which fixes a bug which calls to a wrong function name,which in turn blocks the execution of certain tests. Signed-off-by: Jeffrin Jose T Acked-by: Kees Cook Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/firmware/fw_run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ad35721e7d5a5b56a4eddcdd9920c3c1e51ae4c Author: Jerry (Fangzhi) Zuo Date: Tue Apr 17 14:39:09 2018 -0400 drm/amd/display: Check dc_sink every time in MST hotplug Extended fix to: "Don't read EDID in atomic_check" Fix issue of missing dc_sink in .mode_valid in hot plug routine. Need to check dc_sink everytime in .get_modes hook after checking edid, since edid is not getting removed in hot unplug but dc_sink doesn't. Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Roman Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit d973f8535f033fac1599bd5eae6835e6bb304da3 Author: Jerry (Fangzhi) Zuo Date: Tue Apr 17 13:49:48 2018 -0400 drm/amd/display: Update MST edid property every time Extended fix to: "Don't read EDID in atomic_check" Fix display property not observed in GUI display after hot plug. Call drm_mode_connector_update_edid_property every time in .get_modes hook, due to the fact that edid property is getting removed from usermode ioctl DRM_IOCTL_MODE_GETCONNECTOR each time in hot unplug. Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c7b8de00384be49dc1617a838b0ce89a0235f319 Author: Harry Wentland Date: Thu Mar 8 22:05:35 2018 -0500 drm/amd/display: Don't read EDID in atomic_check We shouldn't attempt to read EDID in atomic_check. We really shouldn't even be modifying the connector object, or any other non-state object, but this is a start at least. Moving EDID cleanup to dm_dp_mst_connector_destroy from dm_dp_destroy_mst_connector to ensure the EDID is still available for headless mode. Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 32 +++++++--------------- 1 file changed, 10 insertions(+), 22 deletions(-) commit f2877656809386d7bc62c2b1c1b4e58404c486d4 Author: Harry Wentland Date: Mon Apr 16 17:28:11 2018 -0400 drm/amd/display: Disallow enabling CRTC without primary plane with FB The below commit "drm/atomic: Try to preserve the crtc enabled state in drm_atomic_remove_fb, v2" introduces a slight behavioral change to rmfb. Instead of disabling a crtc when the primary plane is disabled, it now preserves it. Since DC is currently not equipped to handle this we need to fail such a commit, otherwise we might see a corrupted screen. This is based on Shirish's previous approach but avoids adding all planes to the new atomic state which leads to a full update in DC for any commit, and is not what we intend. Theoretically DM should be able to deal with states with fully populated planes, even for simple updates, such as cursor updates. This should still be addressed in the future. Signed-off-by: Harry Wentland Tested-by: Michel Dänzer Reviewed-by: Tony Cheng Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit ad64dc0137968f09800e58174bbfd5eac9fe5418 Author: Mikita Lipski Date: Wed Jan 10 10:01:38 2018 -0500 drm/amd/display: Fix deadlock when flushing irq Lock irq table when reading a work in queue, unlock to flush the work, lock again till all tasks are cleared Signed-off-by: Mikita Lipski Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8a7d6003df41cb16f6b3b620da044fbd92d2f5ee Author: Takashi Iwai Date: Wed Apr 25 16:19:13 2018 +0200 ALSA: hda - Skip jack and others for non-existing PCM streams When CONFIG_SND_DYNAMIC_MINORS isn't set, there are only limited number of devices available, and HD-audio, especially with HDMI/DP codec, will fail to create more than two devices. The driver warns about the lack of such devices and skips the PCM device creations, but the HDMI driver still tries to create the corresponding JACK, SPDIF and ELD controls even for the non-existing PCM substreams. This results in confusion on user-space, and even may break the operation. Similarly, Intel HDMI/DP codec builds the ELD notification from i915 graphics driver, and this may be broken if a notification is sent for the non-existing PCM stream. This patch adds the check of the existence of the assigned PCM substream in the both scenarios above, and skips the further operation if the PCM substream is not assigned. Fixes: 9152085defb6 ("ALSA: hda - add DP MST audio support") Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 1612a981b76688c598dc944bbfbe29a2b33e3973 Author: Gianluca Borello Date: Wed Apr 25 05:42:16 2018 +0000 bpf, x64: fix JIT emission for dead code Commit 2a5418a13fcf ("bpf: improve dead code sanitizing") replaced dead code with a series of ja-1 instructions, for safety. That made JIT compilation much more complex for some BPF programs. One instance of such programs is, for example: bool flag = false ... /* A bunch of other code */ ... if (flag) do_something() In some cases llvm is not able to remove at compile time the code for do_something(), so the generated BPF program ends up with a large amount of dead instructions. In one specific real life example, there are two series of ~500 and ~1000 dead instructions in the program. When the verifier replaces them with a series of ja-1 instructions, it causes an interesting behavior at JIT time. During the first pass, since all the instructions are estimated at 64 bytes, the ja-1 instructions end up being translated as 5 bytes JMP instructions (0xE9), since the jump offsets become increasingly large (> 127) as each instruction gets discovered to be 5 bytes instead of the estimated 64. Starting from the second pass, the first N instructions of the ja-1 sequence get translated into 2 bytes JMPs (0xEB) because the jump offsets become <= 127 this time. In particular, N is defined as roughly 127 / (5 - 2) ~= 42. So, each further pass will make the subsequent N JMP instructions shrink from 5 to 2 bytes, making the image shrink every time. This means that in order to have the entire program converge, there need to be, in the real example above, at least ~1000 / 42 ~= 24 passes just for translating the dead code. If we add this number to the passes needed to translate the other non dead code, it brings such program to 40+ passes, and JIT doesn't complete. Ultimately the userspace loader fails because such BPF program was supposed to be part of a prog array owner being JITed. While it is certainly possible to try to refactor such programs to help the compiler remove dead code, the behavior is not really intuitive and it puts further burden on the BPF developer who is not expecting such behavior. To make things worse, such programs are working just fine in all the kernel releases prior to the ja-1 fix. A possible approach to mitigate this behavior consists into noticing that for ja-1 instructions we don't really need to rely on the estimated size of the previous and current instructions, we know that a -1 BPF jump offset can be safely translated into a 0xEB instruction with a jump offset of -2. Such fix brings the BPF program in the previous example to complete again in ~9 passes. Fixes: 2a5418a13fcf ("bpf: improve dead code sanitizing") Signed-off-by: Gianluca Borello Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann arch/x86/net/bpf_jit_comp.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 9a0fd675304d410f3a9586e1b333e16f4658d56c Author: Peter Xu Date: Thu Mar 15 14:06:39 2018 +0800 tracing: Fix missing tab for hwlat_detector print format It's been missing for a while but no one is touching that up. Fix it. Link: http://lkml.kernel.org/r/20180315060639.9578-1-peterx@redhat.com CC: Ingo Molnar Cc:stable@vger.kernel.org Fixes: 7b2c86250122d ("tracing: Add NMI tracing in hwlat detector") Signed-off-by: Peter Xu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_entries.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25aa50e0ca397a5e5d4d6fcecefa8107877d1dd0 Author: Masami Hiramatsu Date: Thu Apr 5 18:29:12 2018 +0900 selftests: ftrace: Add a testcase for multiple actions on trigger Add a testcase for multiple actions with different parameters on an event trigger, which has been fixed by commit 192c283e93bd ("tracing: Add action comparisons when testing matching hist triggers"). Link: http://lkml.kernel.org/r/152292055227.15769.6327959816123227152.stgit@devbox Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) .../inter-event/trigger-multi-actions-accept.tc | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit ef39a01203ed2f52319906db555ca66c234ef19b Author: Masami Hiramatsu Date: Thu Apr 5 18:28:42 2018 +0900 selftests: ftrace: Fix trigger extended error testcase Previous testcase redirects echo-out into /dev/null using "&>" as below echo "trigger-command" >> trigger &> /dev/null But this means redirecting both stdout and stderr into /dev/null because it is same as below echo "trigger-command" >> trigger > /dev/null 2>&1 So ">> trigger" redirects stdout to trigger file, but next "> /dev/null" redirects stdout to /dev/null again and the last "2>/&1" redirects stderr to stdout (/dev/null) This fixes it by "2> /dev/null". And also, since it must fail, add "!" to echo command. Link: http://lkml.kernel.org/r/152292052250.15769.12565292689264162435.stgit@devbox Fixes: f06eec4d0f2c ("selftests: ftrace: Add inter-event hist triggers testcases") Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) .../ftrace/test.d/trigger/inter-event/trigger-extended-error-support.tc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bcbd385b61bbdef3491d662203ac2e8186e5be59 Author: Thomas Richter Date: Thu Apr 19 12:55:56 2018 +0200 kprobes: Fix random address output of blacklist file File /sys/kernel/debug/kprobes/blacklist displays random addresses: [root@s8360046 linux]# cat /sys/kernel/debug/kprobes/blacklist 0x0000000047149a90-0x00000000bfcb099a print_type_x8 .... This breaks 'perf probe' which uses the blacklist file to prohibit probes on certain functions by checking the address range. Fix this by printing the correct (unhashed) address. The file mode is read all but this is not an issue as the file hierarchy points out: # ls -ld /sys/ /sys/kernel/ /sys/kernel/debug/ /sys/kernel/debug/kprobes/ /sys/kernel/debug/kprobes/blacklist dr-xr-xr-x 12 root root 0 Apr 19 07:56 /sys/ drwxr-xr-x 8 root root 0 Apr 19 07:56 /sys/kernel/ drwx------ 16 root root 0 Apr 19 06:56 /sys/kernel/debug/ drwxr-xr-x 2 root root 0 Apr 19 06:56 /sys/kernel/debug/kprobes/ -r--r--r-- 1 root root 0 Apr 19 06:56 /sys/kernel/debug/kprobes/blacklist Everything in and below /sys/kernel/debug is rwx to root only, no group or others have access. Background: Directory /sys/kernel/debug/kprobes is created by debugfs_create_dir() which sets the mode bits to rwxr-xr-x. Maybe change that to use the parent's directory mode bits instead? Link: http://lkml.kernel.org/r/20180419105556.86664-1-tmricht@linux.ibm.com Fixes: ad67b74d2469 ("printk: hash addresses printed with %p") Cc: stable@vger.kernel.org Cc: # v4.15+ Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Cc: David S Miller Cc: Masami Hiramatsu Cc: acme@kernel.org Signed-off-by: Thomas Richter Signed-off-by: Steven Rostedt (VMware) kernel/kprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba16293dad626d3e3827cfe0a1a743c1d93e76b7 Author: Ravi Bangoria Date: Fri Apr 20 20:37:58 2018 +0530 tracing: Fix kernel crash while using empty filter with perf Kernel is crashing when user tries to record 'ftrace:function' event with empty filter: # perf record -e ftrace:function --filter="" ls # dmesg BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 Oops: 0000 [#1] SMP PTI ... RIP: 0010:ftrace_profile_set_filter+0x14b/0x2d0 RSP: 0018:ffffa4a7c0da7d20 EFLAGS: 00010246 RAX: ffffa4a7c0da7d64 RBX: 0000000000000000 RCX: 0000000000000006 RDX: 0000000000000000 RSI: 0000000000000092 RDI: ffff8c48ffc968f0 ... Call Trace: _perf_ioctl+0x54a/0x6b0 ? rcu_all_qs+0x5/0x30 ... After patch: # perf record -e ftrace:function --filter="" ls failed to set filter "" on event ftrace:function with 22 (Invalid argument) Also, if user tries to echo "" > filter, it used to throw an error. This behavior got changed by commit 80765597bc58 ("tracing: Rewrite filter logic to be simpler and faster"). This patch restores the behavior as a side effect: Before patch: # echo "" > filter # After patch: # echo "" > filter bash: echo: write error: Invalid argument # Link: http://lkml.kernel.org/r/20180420150758.19787-1-ravi.bangoria@linux.ibm.com Fixes: 80765597bc58 ("tracing: Rewrite filter logic to be simpler and faster") Signed-off-by: Ravi Bangoria Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_filter.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 1c758a2202a6b4624d0703013a2c6cfa6e7455aa Author: Steven Rostedt (VMware) Date: Tue Apr 17 17:41:28 2018 -0400 tracing/x86: Update syscall trace events to handle new prefixed syscall func names Arnaldo noticed that the latest kernel is missing the syscall event system directory in x86. I bisected it down to d5a00528b58c ("syscalls/core, syscalls/x86: Rename struct pt_regs-based sys_*() to __x64_sys_*()"). The system call trace events are special, as there is only one trace event for all system calls (the raw_syscalls). But a macro that wraps the system calls creates meta data for them that copies the name to find the system call that maps to the system call table (the number). At boot up, it does a kallsyms lookup of the system call table to find the function that maps to the meta data of the system call. If it does not find a function, then that system call is ignored. Because the x86 system calls had "__x64_", or "__ia32_" prefixed to the "sys" for the names, they do not match the default compare algorithm. As this was a problem for power pc, the algorithm can be overwritten by the architecture. The solution is to have x86 have its own algorithm to do the compare and this brings back the system call trace events. Link: http://lkml.kernel.org/r/20180417174128.0f3457f0@gandalf.local.home Reported-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo Acked-by: Dominik Brodowski Acked-by: Thomas Gleixner Fixes: d5a00528b58c ("syscalls/core, syscalls/x86: Rename struct pt_regs-based sys_*() to __x64_sys_*()") Signed-off-by: Steven Rostedt (VMware) arch/x86/include/asm/ftrace.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit fe644072dfee069d97a66ea9a80f4bc461499e6a Author: Linus Walleij Date: Fri Apr 20 10:29:51 2018 +0200 block: mq: Add some minor doc for core structs As it came up in discussion on the mailing list that the semantic meaning of 'blk_mq_ctx' and 'blk_mq_hw_ctx' isn't completely obvious to everyone, let's add some minimal kerneldoc for a starter. Signed-off-by: Linus Walleij Signed-off-by: Jens Axboe block/blk-mq.h | 3 +++ include/linux/blk-mq.h | 3 +++ 2 files changed, 6 insertions(+) commit e9938f552fc279e87afcbff430cd6f8966ef31b3 Author: Jens Axboe Date: Thu Apr 19 21:07:14 2018 -0600 bcache: mark Coly Li as bcache maintainer Since Michael had to step back, Coly has agreed to be the new maintainer. Mark him as such. Signed-off-by: Jens Axboe MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit d88b6d04447bbfd0b55f57afb231bf6f5b38c8f0 Author: Michael Lyle Date: Thu Apr 19 10:59:31 2018 -0700 MAINTAINERS: Remove me as maintainer of bcache Too much to do with other projects. I've enjoyed working with everyone here, and hope to occasionally contribute on bcache. Signed-off-by: Michael Lyle Signed-off-by: Jens Axboe MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit bcdd0ca8cb8730573afebcaae4138f8f4c8eaa20 Author: Tetsuo Handa Date: Wed Apr 25 20:12:31 2018 +0900 tty: Use __GFP_NOFAIL for tty_ldisc_get() syzbot is reporting crashes triggered by memory allocation fault injection at tty_ldisc_get() [1]. As an attempt to handle OOM in a graceful way, we have tried commit 5362544bebe85071 ("tty: don't panic on OOM in tty_set_ldisc()"). But we reverted that attempt by commit a8983d01f9b7d600 ("Revert "tty: don't panic on OOM in tty_set_ldisc()"") due to reproducible crash. We should spend resource for finding and fixing race condition bugs rather than complicate error paths for 2 * sizeof(void *) bytes allocation failure. [1] https://syzkaller.appspot.com/bug?id=489d33fa386453859ead58ff5171d43772b13aa3 Signed-off-by: Tetsuo Handa Reported-by: syzbot Cc: Michal Hocko Cc: Vegard Nossum Cc: Dmitry Vyukov Cc: Jiri Slaby Cc: Peter Hurley Cc: One Thousand Gnomes Cc: Linus Torvalds Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_ldisc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 877d8948d0aa402fbbede138fc73432bb335b65f Author: Guenter Roeck Date: Tue Apr 24 08:59:45 2018 -0700 hwmon: (k10temp) Add support for AMD Ryzen w/ Vega graphics Enable k10temp for AMD Ryzen APUs w/ Vega Mobile Gfx. Based on patch from René Rebe . Dropped temperature offsets since those are not supposed to apply for the affected CPUs. Cc: stable@vger.kernel.org # v4.16+ Cc: René Rebe Signed-off-by: Guenter Roeck drivers/hwmon/k10temp.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1b59788979acd230b9627276c76f6e6ba2c4709c Author: Guenter Roeck Date: Tue Apr 24 06:55:55 2018 -0700 hwmon: (k10temp) Add temperature offset for Ryzen 2700X Ryzen 2700X has a temperature offset of 10 degrees C. If bit 19 of the Temperature Control register is set, there is an additional offset of 49 degrees C. Take this into account as well. Cc: stable@vger.kernel.org # v4.16+ Signed-off-by: Guenter Roeck drivers/hwmon/k10temp.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 06e22bb6fa5bd2d7d6cdd4d886aef90c3ef8f9c7 Merge: 6d08b06 85bd0ba Author: Radim Krčmář Date: Wed Apr 25 14:16:50 2018 +0200 Merge tag 'kvmarm-fixes-for-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm KVM/arm fixes for 4.17, take #1 - PSCI selection API, a leftover from 4.16 - Kick vcpu on active interrupt affinity change - Plug a VMID allocation race on oversubscribed systems - Silence debug messages - Update Christoffer's email address commit 96bd39df29c29d348d65311e5954c0b7d3a2a790 Author: Mayank Rana Date: Fri Mar 23 10:05:33 2018 -0700 usb: dwc3: gadget: Fix list_del corruption in dwc3_ep_dequeue dwc3_ep_dequeue() waits for completion of End Transfer command using wait_event_lock_irq(), which will release the dwc3->lock while waiting and reacquire after completion. This allows a potential race condition with ep_disable() which also removes all requests from started_list and pending_list. The check for NULL r->trb should catch this but currently it exits to the wrong 'out1' label which calls dwc3_gadget_giveback(). Since its list entry was already removed, if CONFIG_DEBUG_LIST is enabled a 'list_del corruption' bug is thrown since its next/prev pointers are already LIST_POISON1/2. If r->trb is NULL it should simply exit to 'out0'. Fixes: cf3113d893d4 ("usb: dwc3: gadget: properly increment dequeue pointer on ep_dequeue") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Mayank Rana Signed-off-by: Jack Pham Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cffd15de0c322c574085759793dbbcfafa91746 Author: Wei Yongjun Date: Thu Mar 29 02:20:10 2018 +0000 usb: dwc3: gadget: dwc3_gadget_del_and_unmap_request() can be static Fixes the following sparse warning: drivers/usb/dwc3/gadget.c:169:6: warning: symbol 'dwc3_gadget_del_and_unmap_request' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a53097c2319c9df16dff6109392c50aa422265bf Author: Wei Yongjun Date: Wed Mar 28 13:41:13 2018 +0000 usb: dwc2: pci: Fix error return code in dwc2_pci_probe() Fix to return error code -ENOMEM from the alloc fail error handling case instead of 0, as done elsewhere in this function. Fixes: ecd29dabb2ba ("usb: dwc2: pci: Handle error cleanup in probe") Reviewed-by: Grigor Tovmasyan Acked-by: Minas Harutyunyan Signed-off-by: Wei Yongjun Signed-off-by: Felipe Balbi drivers/usb/dwc2/pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ac61c1156623455c46701654abd8c99720bceea1 Author: Nicholas Piggin Date: Wed Apr 25 12:17:53 2018 +1000 powerpc: Fix smp_send_stop NMI IPI handling The NMI IPI handler for a receiving CPU increments nmi_ipi_busy_count over the handler function call, which causes later smp_send_nmi_ipi() callers to spin until the call is finished. The stop_this_cpu() function never returns, so the busy count is never decremeted, which can cause the system to hang in some cases. For example panic() will call smp_send_stop() early on which calls stop_this_cpu() on other CPUs, then later in the reboot path, pnv_restart() will call smp_send_stop() again, which hangs. Fix this by adding a special case to the stop_this_cpu() handler to decrement the busy count, because it will never return. Now that the NMI/non-NMI versions of stop_this_cpu() are different, split them out into separate functions rather than doing #ifdef tricks to share the body between the two functions. Fixes: 6bed3237624e3 ("powerpc: use NMI IPI for smp_send_stop") Reported-by: Abdul Haleem Signed-off-by: Nicholas Piggin [mpe: Split out the functions, tweak change log a bit] Signed-off-by: Michael Ellerman arch/powerpc/kernel/smp.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 3a230f7d09dd0f0eec90bc94abc440ab740c86f1 Merge: 6581183 a8419a0 Author: Takashi Iwai Date: Wed Apr 25 12:22:20 2018 +0200 Merge tag 'asoc-fix-4.17-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v4.17 A small batch of fixes collected since the merge window, none of which are particularly large or remarkable. They've all been cooking in -next for a while. commit 0ebf2a2c02b0976e939e795b1b9a53d32aeac8bc Author: Artur Petrosyan Date: Mon Apr 16 08:45:31 2018 -0400 usb: dwc2: WA for Full speed ISOC IN in DDMA mode. By clearing NAK status of EP, core will send ZLP to IN token and assert NAK interrupt relying on TxFIFO status only. The WA applies only to core versions from 2.72a to 4.00a (including both). Also for FS_IOT_1.00a and HS_IOT_1.00a. Signed-off-by: Artur Petrosyan Signed-off-by: Minas Harutyunyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 2 ++ drivers/usb/dwc2/gadget.c | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) commit 438fea2a6325933868aebc20279e2669c9a21207 Author: Tomeu Vizoso Date: Mon Mar 26 11:00:01 2018 +0200 usb: dwc2: dwc2_vbus_supply_init: fix error check devm_regulator_get_optional returns -ENODEV if the regulator isn't there, so if that's the case we have to make sure not to leave -ENODEV in the regulator pointer. Also, make sure we return 0 in that case, but correctly propagate any other errors. Also propagate the error from _dwc2_hcd_start. Fixes: 531ef5ebea96 ("usb: dwc2: add support for host mode external vbus supply") Cc: Amelie Delaunay Reviewed-by: Amelie Delaunay Reviewed-by: Heiko Stuebner Reviewed-by: Grigor Tovmasyan Tested-by: Heiko Stuebner Acked-by: Minas Harutyunyan Signed-off-by: Tomeu Vizoso Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 064b40754291f95121bbdb05645a3a110d0ae346 Author: Luc Van Oostenryck Date: Tue Apr 24 15:18:41 2018 +0200 usb: gadget: f_phonet: fix pn_net_xmit()'s return type The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_phonet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65811834ba56e9ed88117cf6c09880416c9951ab Author: Kailang Yang Date: Wed Apr 25 17:07:27 2018 +0800 ALSA: hda/realtek - change the location for one of two front mics On this Lenovo ThinkCentre machine. There are two front mics, we change the location for one of them. Relation: f33f79f3d0e5 ("ALSA: hda/realtek - change the location for one of two front microphones") Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 316d097c4cd4e7f2ef50c40cff2db266593c4ec4 Author: Dave Hansen Date: Fri Apr 20 15:20:28 2018 -0700 x86/pti: Filter at vma->vm_page_prot population commit ce9962bf7e22bb3891655c349faff618922d4a73 0day reported warnings at boot on 32-bit systems without NX support: attempted to set unsupported pgprot: 8000000000000025 bits: 8000000000000000 supported: 7fffffffffffffff WARNING: CPU: 0 PID: 1 at arch/x86/include/asm/pgtable.h:540 handle_mm_fault+0xfc1/0xfe0: check_pgprot at arch/x86/include/asm/pgtable.h:535 (inlined by) pfn_pte at arch/x86/include/asm/pgtable.h:549 (inlined by) do_anonymous_page at mm/memory.c:3169 (inlined by) handle_pte_fault at mm/memory.c:3961 (inlined by) __handle_mm_fault at mm/memory.c:4087 (inlined by) handle_mm_fault at mm/memory.c:4124 The problem is that due to the recent commit which removed auto-massaging of page protections, filtering page permissions at PTE creation time is not longer done, so vma->vm_page_prot is passed unfiltered to PTE creation. Filter the page protections before they are installed in vma->vm_page_prot. Fixes: fb43d6cb91 ("x86/mm: Do not auto-massage page protections") Reported-by: Fengguang Wu Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Cc: Andrea Arcangeli Cc: Juergen Gross Cc: Kees Cook Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: David Woodhouse Cc: Hugh Dickins Cc: linux-mm@kvack.org Cc: Linus Torvalds Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Greg Kroah-Hartman Cc: Nadav Amit Cc: Dan Williams Cc: Arjan van de Ven Link: https://lkml.kernel.org/r/20180420222028.99D72858@viggo.jf.intel.com arch/x86/Kconfig | 4 ++++ arch/x86/include/asm/pgtable.h | 5 +++++ mm/mmap.c | 11 ++++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) commit b7c21bc56fbedf4a61b628c6b11e0d7048746cc1 Author: Dave Hansen Date: Fri Apr 20 15:20:26 2018 -0700 x86/pti: Disallow global kernel text with RANDSTRUCT commit 26d35ca6c3776784f8156e1d6f80cc60d9a2a915 RANDSTRUCT derives its hardening benefits from the attacker's lack of knowledge about the layout of kernel data structures. Keep the kernel image non-global in cases where RANDSTRUCT is in use to help keep the layout a secret. Fixes: 8c06c7740 (x86/pti: Leave kernel text global for !PCID) Reported-by: Kees Cook Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Cc: Andrea Arcangeli Cc: Juergen Gross Cc: Josh Poimboeuf Cc: Greg Kroah-Hartman Cc: Peter Zijlstra Cc: David Woodhouse Cc: Hugh Dickins Cc: linux-mm@kvack.org Cc: Linus Torvalds Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Nadav Amit Cc: Dan Williams Cc: Arjan van de Ven Cc: Vlastimil Babka Link: https://lkml.kernel.org/r/20180420222026.D0B4AAC9@viggo.jf.intel.com arch/x86/mm/pti.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a44ca8f5a30c008b54d07b00eed4eae7f169fcd0 Author: Dave Hansen Date: Fri Apr 20 15:20:23 2018 -0700 x86/pti: Reduce amount of kernel text allowed to be Global commit abb67605203687c8b7943d760638d0301787f8d9 Kees reported to me that I made too much of the kernel image global. It was far more than just text: I think this is too much set global: _end is after data, bss, and brk, and all kinds of other stuff that could hold secrets. I think this should match what mark_rodata_ro() is doing. This does exactly that. We use __end_rodata_hpage_align as our marker both because it is huge-page-aligned and it does not contain any sections we expect to hold secrets. Kees's logic was that r/o data is in the kernel image anyway and, in the case of traditional distributions, can be freely downloaded from the web, so there's no reason to hide it. Fixes: 8c06c7740 (x86/pti: Leave kernel text global for !PCID) Reported-by: Kees Cook Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Cc: Andrea Arcangeli Cc: Juergen Gross Cc: Josh Poimboeuf Cc: Greg Kroah-Hartman Cc: Peter Zijlstra Cc: David Woodhouse Cc: Hugh Dickins Cc: linux-mm@kvack.org Cc: Linus Torvalds Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Nadav Amit Cc: Dan Williams Cc: Arjan van de Ven Link: https://lkml.kernel.org/r/20180420222023.1C8B2B20@viggo.jf.intel.com arch/x86/mm/pti.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 58e65b51e6f9b9dd94a25ff2b2772222e0358099 Author: Dave Hansen Date: Fri Apr 20 15:20:21 2018 -0700 x86/pti: Fix boot warning from Global-bit setting commit 231df823c4f04176f607afc4576c989895cff40e The pageattr.c code attempts to process "faults" when it goes looking for PTEs to change and finds non-present entries. It allows these faults in the linear map which is "expected to have holes", but WARN()s about them elsewhere, like when called on the kernel image. However, change_page_attr_clear() is now called on the kernel image in the process of trying to clear the Global bit. This trips the warning in __cpa_process_fault() if a non-present PTE is encountered in the kernel image. The "holes" in the kernel image result from free_init_pages()'s use of set_memory_np(). These holes are totally fine, and result from normal operation, just as they would be in the kernel linear map. Just silence the warning when holes in the kernel image are encountered. Fixes: 39114b7a7 (x86/pti: Never implicitly clear _PAGE_GLOBAL for kernel image) Reported-by: Mariusz Ceier Reported-by: Aaro Koskinen Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Tested-by: Aaro Koskinen Acked-by: Ingo Molnar Cc: Andrea Arcangeli Cc: Juergen Gross Cc: Nadav Amit Cc: Kees Cook Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: David Woodhouse Cc: Hugh Dickins Cc: linux-mm@kvack.org Cc: Linus Torvalds Cc: Andy Lutomirski Cc: Greg Kroah-Hartman Cc: Borislav Petkov Cc: Dan Williams Cc: Arjan van de Ven Link: https://lkml.kernel.org/r/20180420222021.1C7D2B3F@viggo.jf.intel.com arch/x86/mm/pageattr.c | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) commit d2479a30499d93377d3ab10b7822bc5f10ed7f22 Author: Dave Hansen Date: Fri Apr 20 15:20:19 2018 -0700 x86/pti: Fix boot problems from Global-bit setting commit 16dce603adc9de4237b7bf2ff5c5290f34373e7b Part of the global bit _setting_ patches also includes clearing the Global bit when it should not be enabled. That is done with set_memory_nonglobal(), which uses change_page_attr_clear() in pageattr.c under the covers. The TLB flushing code inside pageattr.c has has checks like BUG_ON(irqs_disabled()), looking for interrupt disabling that might cause deadlocks. But, these also trip in early boot on certain preempt configurations. Just copy the existing BUG_ON() sequence from cpa_flush_range() to the other two sites and check for early boot. Fixes: 39114b7a7 (x86/pti: Never implicitly clear _PAGE_GLOBAL for kernel image) Reported-by: Mariusz Ceier Reported-by: Aaro Koskinen Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Tested-by: Aaro Koskinen Acked-by: Ingo Molnar Cc: Andrea Arcangeli Cc: Juergen Gross Cc: Nadav Amit Cc: Kees Cook Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: David Woodhouse Cc: Hugh Dickins Cc: linux-mm@kvack.org Cc: Linus Torvalds Cc: Andy Lutomirski Cc: Greg Kroah-Hartman Cc: Borislav Petkov Cc: Dan Williams Cc: Arjan van de Ven Link: https://lkml.kernel.org/r/20180420222019.20C4A410@viggo.jf.intel.com arch/x86/mm/pageattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 749ab300d41bcdbb8edf776d20e9a9891e79eba4 Author: Hans de Goede Date: Sat Apr 14 17:06:45 2018 +0200 HID: intel_ish-hid: Stop using a static local buffer in get_report() hid_ishtp_get_report() may be called by multiple callers at the same time, causing trouble with the static local buffer used. Also there is no reason to use a non stack buffer, the buffer is tiny and ishtp_cl_send() copies its contents so the lifetime is not an issue either. Signed-off-by: Hans de Goede Reviewed-by: Benjamin Tissoires Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp-hid-client.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 37ba3c350e64adcbdd483e81bf194c05d9573515 Author: Hans de Goede Date: Sat Apr 14 17:06:44 2018 +0200 HID: intel_ish-hid: Move header size check to inside the loop With the headersize check outside of the loop, the second time through the loop the: "payload_len = recv_msg->hdr.size;" statement may deref recv_msg while it is pointing outside of our input buffer. Move the headersize check to inside the loop to fix this. Signed-off-by: Hans de Goede Reviewed-by: Benjamin Tissoires Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp-hid-client.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 097b8f62dd793e08f1732fc74dbb64596c7fbff9 Author: Arvind Yadav Date: Tue Apr 24 13:33:03 2018 +0530 HID: wacom: Release device resource data obtained by devres_alloc() Free device resource data, if __wacom_devm_sysfs_create_group is not successful. Signed-off-by: Arvind Yadav Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a230cd52b8a2be39cd6e9a13b3e62af57f21372a Author: pgzh Date: Thu Apr 12 19:36:47 2018 +0200 HID: lenovo: Add support for IBM/Lenovo Scrollpoint mice The IBM/Lenovo Scrollpoint mice feature a trackpoint-like stick instead of a scrolling wheel capable of 2-D (vertical+horizontal) scrolling. hid-generic does only expose 1-D (vertical) scrolling functionality for these mice. This patch adds support for horizontal scrolling for the IBM/Lenovo Scrollpoint mice to hid-lenovo. [jkosina@suse.cz: remove change versioning from git changelog] Signed-off-by: Peter Ganzhorn Reviewed-by: Benjamin Tissoires Signed-off-by: Peter De Wachter Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 7 ++++--- drivers/hid/hid-ids.h | 8 ++++++++ drivers/hid/hid-lenovo.c | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 3 deletions(-) commit f526afcd8f71945c23ce581d7864ace93de8a4f7 Author: Takashi Iwai Date: Tue Apr 24 08:04:41 2018 +0200 ALSA: rme9652: Hardening for potential Spectre v1 As recently Smatch suggested, one place in RME9652 driver may expand the array directly from the user-space value with speculation: sound/pci/rme9652/rme9652.c:2074 snd_rme9652_channel_info() warn: potential spectre issue 'rme9652->channel_map' (local cap) This patch puts array_index_nospec() for hardening against it. BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2 Reported-by: Dan Carpenter Cc: Signed-off-by: Takashi Iwai sound/pci/rme9652/rme9652.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 10513142a7114d251670361ad40cba2c61403406 Author: Takashi Iwai Date: Tue Apr 24 08:03:14 2018 +0200 ALSA: hdspm: Hardening for potential Spectre v1 As recently Smatch suggested, a couple of places in HDSP MADI driver may expand the array directly from the user-space value with speculation: sound/pci/rme9652/hdspm.c:5717 snd_hdspm_channel_info() warn: potential spectre issue 'hdspm->channel_map_out' (local cap) sound/pci/rme9652/hdspm.c:5734 snd_hdspm_channel_info() warn: potential spectre issue 'hdspm->channel_map_in' (local cap) This patch puts array_index_nospec() for hardening against them. BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2 Reported-by: Dan Carpenter Cc: Signed-off-by: Takashi Iwai sound/pci/rme9652/hdspm.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit f9d94b57e30fd1575b4935045b32d738668aa74b Author: Takashi Iwai Date: Tue Apr 24 08:01:48 2018 +0200 ALSA: asihpi: Hardening for potential Spectre v1 As recently Smatch suggested, a couple of places in ASIHPI driver may expand the array directly from the user-space value with speculation: sound/pci/asihpi/hpimsginit.c:70 hpi_init_response() warn: potential spectre issue 'res_size' (local cap) sound/pci/asihpi/hpioctl.c:189 asihpi_hpi_ioctl() warn: potential spectre issue 'adapters' This patch puts array_index_nospec() for hardening against them. BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2 Reported-by: Dan Carpenter Cc: Signed-off-by: Takashi Iwai sound/pci/asihpi/hpimsginit.c | 13 +++++++++---- sound/pci/asihpi/hpioctl.c | 4 +++- 2 files changed, 12 insertions(+), 5 deletions(-) commit 7f054a5bee0987f1e2d4e59daea462421c76f2cb Author: Takashi Iwai Date: Tue Apr 24 07:56:07 2018 +0200 ALSA: opl3: Hardening for potential Spectre v1 As recently Smatch suggested, one place in OPL3 driver may expand the array directly from the user-space value with speculation: sound/drivers/opl3/opl3_synth.c:476 snd_opl3_set_voice() warn: potential spectre issue 'snd_opl3_regmap' This patch puts array_index_nospec() for hardening against it. BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2 Reported-by: Dan Carpenter Cc: Signed-off-by: Takashi Iwai sound/drivers/opl3/opl3_synth.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 69fa6f19b95597618ab30438a27b67ad93daa7c7 Author: Takashi Iwai Date: Tue Apr 24 07:50:50 2018 +0200 ALSA: hda: Hardening for potential Spectre v1 As recently Smatch suggested, one place in HD-audio hwdep ioctl codes may expand the array directly from the user-space value with speculation: sound/pci/hda/hda_local.h:467 get_wcaps() warn: potential spectre issue 'codec->wcaps' As get_wcaps() itself is a fairly frequently called inline function, and there is only one single call with a user-space value, we replace only the latter one to open-code locally with array_index_nospec() hardening in this patch. BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2 Reported-by: Dan Carpenter Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_hwdep.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 088e861edffb84879cf0c0d1b02eda078c3a0ffe Author: Takashi Iwai Date: Tue Apr 24 07:45:56 2018 +0200 ALSA: control: Hardening for potential Spectre v1 As recently Smatch suggested, a few places in ALSA control core codes may expand the array directly from the user-space value with speculation: sound/core/control.c:1003 snd_ctl_elem_lock() warn: potential spectre issue 'kctl->vd' sound/core/control.c:1031 snd_ctl_elem_unlock() warn: potential spectre issue 'kctl->vd' sound/core/control.c:844 snd_ctl_elem_info() warn: potential spectre issue 'kctl->vd' sound/core/control.c:891 snd_ctl_elem_read() warn: potential spectre issue 'kctl->vd' sound/core/control.c:939 snd_ctl_elem_write() warn: potential spectre issue 'kctl->vd' Although all these seem doing only the first load without further reference, we may want to stay in a safer side, so hardening with array_index_nospec() would still make sense. In this patch, we put array_index_nospec() to the common snd_ctl_get_ioff*() helpers instead of each caller. These helpers are also referred from some drivers, too, and basically all usages are to calculate the array index from the user-space value, hence it's better to cover there. BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2 Reported-by: Dan Carpenter Cc: Signed-off-by: Takashi Iwai include/sound/control.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8d218dd8116695ecda7164f97631c069938aa22e Author: Takashi Iwai Date: Tue Apr 24 07:31:54 2018 +0200 ALSA: seq: oss: Hardening for potential Spectre v1 As Smatch recently suggested, a few places in OSS sequencer codes may expand the array directly from the user-space value with speculation, namely there are a significant amount of references to either info->ch[] or dp->synths[] array: sound/core/seq/oss/seq_oss_event.c:315 note_on_event() warn: potential spectre issue 'info->ch' (local cap) sound/core/seq/oss/seq_oss_event.c:362 note_off_event() warn: potential spectre issue 'info->ch' (local cap) sound/core/seq/oss/seq_oss_synth.c:470 snd_seq_oss_synth_load_patch() warn: potential spectre issue 'dp->synths' (local cap) sound/core/seq/oss/seq_oss_event.c:293 note_on_event() warn: potential spectre issue 'dp->synths' sound/core/seq/oss/seq_oss_event.c:353 note_off_event() warn: potential spectre issue 'dp->synths' sound/core/seq/oss/seq_oss_synth.c:506 snd_seq_oss_synth_sysex() warn: potential spectre issue 'dp->synths' sound/core/seq/oss/seq_oss_synth.c:580 snd_seq_oss_synth_ioctl() warn: potential spectre issue 'dp->synths' Although all these seem doing only the first load without further reference, we may want to stay in a safer side, so hardening with array_index_nospec() would still make sense. We may put array_index_nospec() at each place, but here we take a different approach: - For dp->synths[], change the helpers to retrieve seq_oss_synthinfo pointer directly instead of the array expansion at each place - For info->ch[], harden in a normal way, as there are only a couple of places As a result, the existing helper, snd_seq_oss_synth_is_valid() is replaced with snd_seq_oss_synth_info(). Also, we cover MIDI device where a similar array expansion is done, too, although it wasn't reported by Smatch. BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2 Reported-by: Dan Carpenter Cc: Signed-off-by: Takashi Iwai sound/core/seq/oss/seq_oss_event.c | 15 +++++--- sound/core/seq/oss/seq_oss_midi.c | 2 + sound/core/seq/oss/seq_oss_synth.c | 75 +++++++++++++++++++++----------------- sound/core/seq/oss/seq_oss_synth.h | 3 +- 4 files changed, 55 insertions(+), 40 deletions(-) commit f5e94b4c6ebdabe0f602d796e0430180927521a0 Author: Takashi Iwai Date: Tue Apr 24 07:26:59 2018 +0200 ALSA: seq: oss: Fix unbalanced use lock for synth MIDI device When get_synthdev() is called for a MIDI device, it returns the fixed midi_synth_dev without the use refcounting. OTOH, the caller is supposed to unreference unconditionally after the usage, so this would lead to unbalanced refcount. This patch corrects the behavior and keep up the refcount balance also for the MIDI synth device. Cc: Signed-off-by: Takashi Iwai sound/core/seq/oss/seq_oss_synth.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit ab3b8e5159b5335c81ba2d09ee5054d4a1b5a7a6 Author: Kailang Yang Date: Wed Apr 25 16:05:27 2018 +0800 ALSA: hda/realtek - Update ALC255 depop optimize Add ALC255 its own depop functions for alc_init and alc_shutup. Assign it to ALC256 usage. Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit 5b33139b1a08eabcba7b39d8a4babd7fc2d3b534 Author: Martin Blumenstingl Date: Mon Apr 23 21:30:29 2018 +0200 clk: meson: meson8b: fix meson8b_cpu_clk parent clock name meson8b_cpu_clk has two parent clocks: - meson8b_xtal - meson8b_cpu_scale_out_sel The name of the "xtal" clock parent is specified correctly. However, there is a typo in the name of the second parent clock. The meson8b_cpu_scale_out_sel definition uses the name "cpu_scale_out_sel" (which matches the name from the datasheet). However, the mux parent definition uses the name "cpu_out_sel" which does not match any existing clock. Fixes: 251b6fd38bcb9c ("clk: meson: rework meson8b cpu clock") Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet drivers/clk/meson/meson8b.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ea04a1dbf8b1d6af759d58e705636fde48583f8f Author: Kailang Yang Date: Wed Apr 25 15:31:52 2018 +0800 ALSA: hda/realtek - Add some fixes for ALC233 Fill COEF to change EAPD to verb control. Assigned codec type. This is an additional fix over 92f974df3460 ("ALSA: hda/realtek - New vendor ID for ALC233"). [ More notes: according to Kailang, the chip is 10ec:0235 bonding for ALC233b, which is equivalent with ALC255. It's only used for Lenovo. The chip needs no alc_process_coef_fw() for headset unlike ALC255. ] Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit b251e4c88fb443b3a44c3d04268f70e2260f1f8a Author: Martin Blumenstingl Date: Sun Apr 22 12:28:43 2018 +0200 clk: meson: meson8b: fix meson8b_fclk_div3_div clock name The names of all fclk divider gate clocks follow the naming schema "fclk_divN" and the name of all fclk fixed dividers follow the naming schema "fclk_divN_div". There's one exception to this rule: meson8b_fclk_div3_div's name is "fclk_div_div3". It's child clock meson8b_fclk_div3 however references it as "fclk_div3_div" (following the naming schema explained above). Fix the naming of the meson8b_fclk_div3_div clock to follow the naming schema. This also fixes serial console on my Meson8m2 board because "clk81" uses fclk_div3 as parent. However, since the hierarchy stops at meson8b_fclk_div3 there's no known parent clock and the rate of "clk81" and all of it's children (UART clock, SDIO MMC controller clock, ...) are all 0. Fixes: 05f814402d6174 ("clk: meson: add fdiv clock gates") Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet drivers/clk/meson/meson8b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 197143feede3038350056cd1d6e7c0524fc532dd Author: Yixun Lan Date: Fri Mar 23 22:38:10 2018 +0800 clk: meson: drop meson_aoclk_gate_regmap_ops let's remove the unused meson_aoclk_gate_regmap_ops Fixes: 1f932d99710d ("clk: meson: remove superseded aoclk_gate_regmap") Signed-off-by: Yixun Lan Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb-aoclk.h | 2 -- 1 file changed, 2 deletions(-) commit 5540fbf43845868defcb599ec91c678275a20671 Author: William Tu Date: Tue Apr 24 23:46:59 2018 -0700 bpf: clear the ip_tunnel_info. The percpu metadata_dst might carry the stale ip_tunnel_info and cause incorrect behavior. When mixing tests using ipv4/ipv6 bpf vxlan and geneve tunnel, the ipv6 tunnel info incorrectly uses ipv4's src ip addr as its ipv6 src address, because the previous tunnel info does not clean up. The patch zeros the fields in ip_tunnel_info. Signed-off-by: William Tu Reported-by: Yifeng Sun Signed-off-by: Daniel Borkmann net/core/filter.c | 1 + 1 file changed, 1 insertion(+) commit 0b551f1e0fc50ee4e3cde2dd639cb010dae5b997 Author: José Roberto de Souza Date: Wed Apr 18 16:41:58 2018 -0700 drm/i915/fbdev: Enable late fbdev initial configuration If the initial fbdev configuration (intel_fbdev_initial_config()) runs and there still no sink connected it will cause drm_fb_helper_initial_config() to return 0 as no error happened (but internally the return is -EAGAIN). Because no framebuffer was allocated, when a sink is connected intel_fbdev_output_poll_changed() will not execute drm_fb_helper_hotplug_event() that would trigger another try to do the initial fbdev configuration. So here allowing drm_fb_helper_hotplug_event() to be executed when there is no framebuffer allocated and fbdev was not set up yet. This issue also happens when a MST DP sink is connected since boot, as the MST topology is discovered in parallel if intel_fbdev_initial_config() is executed before the first sink MST is discovered it will cause this same issue. This is a follow-up patch of https://patchwork.freedesktop.org/patch/196089/ Changes from v1: - not creating a dump framebuffer anymore, instead just allowing drm_fb_helper_hotplug_event() to execute when fbdev is not setup yet. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104158 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104425 Cc: Rodrigo Vivi Cc: stable@vger.kernel.org # v4.15+ Signed-off-by: Chris Wilson Signed-off-by: José Roberto de Souza Tested-by: Paul Menzel Tested-by: frederik # 4.15.17 Tested-by: Ian Pilcher Acked-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180418234158.9388-1-jose.souza@intel.com (cherry picked from commit df9e6521749ab33cde306e8a4350b0ac7889220a) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_fbdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6de3b1f26d1e8adb53d97835400c541ce50155e5 Author: Mika Kuoppala Date: Mon Apr 23 14:37:53 2018 +0300 drm/i915: Use ktime on wait_for We use jiffies to determine when wait expires. However Imre did find out that jiffies can and will do a >1 increments on certain situations [1]. When this happens in a wait_for loop, we return timeout errorneously much earlier than what the real wallclock would say. We can't afford our waits to timeout prematurely. Discard jiffies and change to ktime to detect timeouts. v2: added bugzilla entry (Imre), added stable (Chris) Reported-by: Imre Deak References: https://lkml.org/lkml/2018/4/18/798 [1] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105771 Cc: Imre Deak Cc: Chris Wilson Cc: Ville Syrjälä Cc: Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180423113754.28424-1-mika.kuoppala@linux.intel.com (cherry picked from commit 3085982c6b45d7d22f76e3aa018affbc143a7370) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4e00b339e264802851aff8e73cde7d24b57b18ce Author: Theodore Ts'o Date: Wed Apr 25 01:12:32 2018 -0400 random: rate limit unseeded randomness warnings On systems without sufficient boot randomness, no point spamming dmesg. Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org drivers/char/random.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) commit 41412fe921188a2929832ebd643e63bdbb61d326 Author: Souptick Joarder Date: Wed Apr 25 09:50:29 2018 +0530 ALSA: pcm: Change return type to vm_fault_t Use new return type vm_fault_t for fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. Commit 1c8f422059ae ("mm: change return type to vm_fault_t") Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 295810516e302be90fe469b17b8ac0ac486da3bf Author: Souptick Joarder Date: Wed Apr 25 09:44:45 2018 +0530 ALSA: usx2y: Change return type to vm_fault_t Use new return type vm_fault_t for fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. Commit 1c8f422059ae ("mm: change return type to vm_fault_t") Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox Signed-off-by: Takashi Iwai sound/usb/usx2y/us122l.c | 2 +- sound/usb/usx2y/usX2Yhwdep.c | 2 +- sound/usb/usx2y/usx2yhwdeppcm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 682e6b4da5cbe8e9a53f979a58c2a9d7dc997175 Author: Nicholas Piggin Date: Tue Apr 10 21:49:32 2018 +1000 rtc: opal: Fix OPAL RTC driver OPAL_BUSY loops The OPAL RTC driver does not sleep in case it gets OPAL_BUSY or OPAL_BUSY_EVENT from firmware, which causes large scheduling latencies, up to 50 seconds have been observed here when RTC stops responding (BMC reboot can do it). Fix this by converting it to the standard form OPAL_BUSY loop that sleeps. Fixes: 628daa8d5abf ("powerpc/powernv: Add RTC and NVRAM support plus RTAS fallbacks") Cc: stable@vger.kernel.org # v3.2+ Signed-off-by: Nicholas Piggin Acked-by: Alexandre Belloni Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-rtc.c | 8 ++++--- drivers/rtc/rtc-opal.c | 37 +++++++++++++++++++------------ 2 files changed, 28 insertions(+), 17 deletions(-) commit 75569c182e4f65cd8826a5853dc9cbca703cbd0e Author: Nicolai Hähnle Date: Thu Apr 12 16:34:19 2018 +0200 drm/amdgpu: set COMPUTE_PGM_RSRC1 for SGPR/VGPR clearing shaders Otherwise, the SQ may skip some of the register writes, or shader waves may be allocated where we don't expect them, so that as a result we don't actually reset all of the register SRAMs. This can lead to spurious ECC errors later on if a shader uses an uninitialized register. Signed-off-by: Nicolai Hähnle Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 3be4aaf4e2d3eb95cce7835e8df797ae65ae5ac1 Merge: 24cac70 1f57817 Author: Linus Torvalds Date: Tue Apr 24 17:58:51 2018 -0700 Merge branch 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull userns bug fix from Eric Biederman: "Just a small fix to properly set the return code on error" * 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: commoncap: Handle memory allocation failure. commit 24cac7009cb1b211f1c793ecb6a462c03dc35818 Merge: 6d08b06 d19efb7 Author: Linus Torvalds Date: Tue Apr 24 14:16:40 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix rtnl deadlock in ipvs, from Julian Anastasov. 2) s390 qeth fixes from Julian Wiedmann (control IO completion stalls, bad MAC address update sequence, request side races on command IO timeouts). 3) Handle seq_file overflow properly in l2tp, from Guillaume Nault. 4) Fix VLAN priority mappings in cpsw driver, from Ivan Khoronzhuk. 5) Packet scheduler ife action fixes (malformed TLV lengths, etc.) from Alexander Aring. 6) Fix out of bounds access in tcp md5 option parser, from Jann Horn. 7) Missing netlink attribute policies in rtm_ipv6_policy table, from Eric Dumazet. 8) Missing socket address length checks in l2tp and pppoe connect, from Guillaume Nault. 9) Fix netconsole over team and bonding, from Xin Long. 10) Fix race with AF_PACKET socket state bitfields, from Willem de Bruijn. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (51 commits) ice: Fix insufficient memory issue in ice_aq_manage_mac_read sfc: ARFS filter IDs net: ethtool: Add missing kernel doc for FEC parameters packet: fix bitfield update race ice: Do not check INTEVENT bit for OICR interrupts ice: Fix incorrect comment for action type ice: Fix initialization for num_nodes_added igb: Fix the transmission mode of queue 0 for Qav mode ixgbevf: ensure xdp_ring resources are free'd on error exit team: fix netconsole setup over team amd-xgbe: Only use the SFP supported transceiver signals amd-xgbe: Improve KR auto-negotiation and training amd-xgbe: Add pre/post auto-negotiation phy hooks pppoe: check sockaddr length in pppoe_connect() l2tp: check sockaddr length in pppol2tp_connect() net: phy: marvell: clear wol event before setting it ipv6: add RTA_TABLE and RTA_PREFSRC to rtm_ipv6_policy bonding: do not set slave_dev npinfo before slave_enable_netpoll in bond_enslave tcp: don't read out-of-bounds opsize ibmvnic: Clean actual number of RX or TX pools ... commit 53fa1f6e8a5958da698a31edf366ffe90596b490 Author: Hans de Goede Date: Tue Apr 17 18:23:50 2018 +0200 ACPI / video: Only default only_lcd to true on Win8-ready _desktops_ Commit 5928c281524f (ACPI / video: Default lcd_only to true on Win8-ready and newer machines) made only_lcd default to true on all machines where acpi_osi_is_win8() returns true, including laptops. The purpose of this is to avoid the bogus / non-working acpi backlight interface which many newer BIOS-es define on desktop machines. But this is causing a regression on some laptops, specifically on the Dell XPS 13 2013 model, which does not have the LCD flag set for its fully functional ACPI backlight interface. Rather then DMI quirking our way out of this, this commits changes the logic for setting only_lcd to true, to only do this on machines with a desktop (or server) dmi chassis-type. Note that we cannot simply only check the chassis-type and not register the backlight interface based on that as there are some laptops and tablets which have their chassis-type set to "3" aka desktop. Hopefully the combination of checking the LCD flag, but only on devices with a desktop(ish) chassis-type will avoid the needs for DMI quirks for this, or at least limit the amount of DMI quirks which we need to a minimum. Fixes: 5928c281524f (ACPI / video: Default lcd_only to true on Win8-ready and newer machines) Reported-and-tested-by: James Hogan Signed-off-by: Hans de Goede Cc: 4.15+ # 4.15+ Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_video.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit d19efb729f10339f91c35003d480dc718cae3b3c Merge: f8d6203 d6fef10 Author: David S. Miller Date: Tue Apr 24 16:17:59 2018 -0400 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2018-04-24 This series contains fixes to ixgbevf, igb and ice drivers. Colin Ian King fixes the return value on error for the new XDP support that went into ixgbevf for 4.17. Vinicius provides a fix for queue 0 for igb, which was not receiving all the credits it needed when QAV mode was enabled. Anirudh provides several fixes for the new ice driver, starting with properly initializing num_nodes_added to zero. Fixed up a code comment to better reflect what is really going on in the code. Fixed how to detect if an OICR interrupt has occurred to a more reliable method. Md Fahad fixes the ice driver to allocate the right amount of memory when reading and storing the devices MAC addresses. The device can have up to 2 MAC addresses (LAN and WoL), while WoL is currently not supported, we need to ensure it can be properly handled when support is added. ==================== Signed-off-by: David S. Miller commit d6fef10c750e64f248543d2eee7c86a4a019f7ec Author: Md Fahad Iqbal Polash Date: Mon Apr 16 10:07:03 2018 -0700 ice: Fix insufficient memory issue in ice_aq_manage_mac_read For the MAC read operation, the device can return up to two (LAN and WoL) MAC addresses. Without access to adequate memory, the device will return an error. Fixed this by allocating the right amount of memory. Also, logic to detect and copy the LAN MAC address into the port_info structure has been added. Note that the WoL MAC address is ignored currently as the WoL feature isn't supported yet. Fixes: dc49c7723676 ("ice: Get MAC/PHY/link info and scheduler topology") Signed-off-by: Md Fahad Iqbal Polash Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_common.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 80ee8c588afde077cb0439e15129579a267916c4 Author: Kan Liang Date: Tue Apr 24 11:20:14 2018 -0700 perf stat: Fix duplicate PMU name for interval print PMU name is printed repeatedly for interval print, for example: perf stat --no-merge -e 'unc_m_clockticks' -a -I 1000 # time counts unit events 1.001053069 243,702,144 unc_m_clockticks [uncore_imc_4] 1.001053069 244,268,304 unc_m_clockticks [uncore_imc_2] 1.001053069 244,427,386 unc_m_clockticks [uncore_imc_0] 1.001053069 244,583,760 unc_m_clockticks [uncore_imc_5] 1.001053069 244,738,971 unc_m_clockticks [uncore_imc_3] 1.001053069 244,880,309 unc_m_clockticks [uncore_imc_1] 2.002024821 240,818,200 unc_m_clockticks [uncore_imc_4] [uncore_imc_4] 2.002024821 240,767,812 unc_m_clockticks [uncore_imc_2] [uncore_imc_2] 2.002024821 240,764,215 unc_m_clockticks [uncore_imc_0] [uncore_imc_0] 2.002024821 240,759,504 unc_m_clockticks [uncore_imc_5] [uncore_imc_5] 2.002024821 240,755,992 unc_m_clockticks [uncore_imc_3] [uncore_imc_3] 2.002024821 240,750,403 unc_m_clockticks [uncore_imc_1] [uncore_imc_1] For each print, the PMU name is unconditionally appended to the counter->name. Need to check the counter->name first. If the PMU name is already appended, do nothing. Committer notes: Add and use perf_evsel->uniquified_name bool instead of doing the more expensive strstr(event->name, pmu->name). Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Agustin Vega-Frias Cc: Andi Kleen Cc: Ganapatrao Kulkarni Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Fixes: 8c5421c016a4 ("perf pmu: Display pmu name when printing unmerged events in stat") Link: http://lkml.kernel.org/r/1524594014-79243-5-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 5 ++++- tools/perf/util/evsel.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit 121f325f34caf9a7654ec8a50e20942ed9d6dafc Author: Kan Liang Date: Tue Apr 24 11:20:12 2018 -0700 perf evsel: Only fall back group read for leader Perf doesn't support mixed events from different PMUs (except software event) in a group. The perf stat should output / for all events, but it doesn't. For example, perf stat -e '{cycles,uncore_imc_5/umask=0xF,event=0x4/,instructions}' cycles uncore_imc_5/umask=0xF,event=0x4/ 1,024,300 instructions If perf fails to open an event, it doesn't error out directly. It will disable some features and retry, until the event is opened or all features are disabled. The disabled features will not be re-enabled. The group read is one of these features. For the example as above, the IMC event and the leader event "cycles" are from different PMUs. Opening the IMC event must fail. The group read feature must be disabled for IMC event and the followed event "instructions". The "instructions" event has the same PMU as the leader "cycles". It can be opened successfully. Since the group read feature has been disabled, the "instructions" event will be read as a single event, which definitely has a value. The group read fallback is still useful for the case which kernel doesn't support group read. It is good enough to be handled only by the leader. For the fallback request from members, it must be caused by an error. The fallback only breaks the semantics of group. Limit the group read fallback only for the leader. Committer testing: On a broadwell t450s notebook: Before: # perf stat -e '{cycles,unc_cbo_cache_lookup.read_i,instructions}' sleep 1 Performance counter stats for 'sleep 1': cycles unc_cbo_cache_lookup.read_i 818,206 instructions 1.003170887 seconds time elapsed Some events weren't counted. Try disabling the NMI watchdog: echo 0 > /proc/sys/kernel/nmi_watchdog perf stat ... echo 1 > /proc/sys/kernel/nmi_watchdog After: # perf stat -e '{cycles,unc_cbo_cache_lookup.read_i,instructions}' sleep 1 Performance counter stats for 'sleep 1': cycles unc_cbo_cache_lookup.read_i instructions 1.001380511 seconds time elapsed Some events weren't counted. Try disabling the NMI watchdog: echo 0 > /proc/sys/kernel/nmi_watchdog perf stat ... echo 1 > /proc/sys/kernel/nmi_watchdog # Reported-by: Andi Kleen Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Agustin Vega-Frias Cc: Ganapatrao Kulkarni Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Fixes: 82bf311e15d2 ("perf stat: Use group read for event groups") Link: http://lkml.kernel.org/r/1524594014-79243-3-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 30060eaed769039c6e523b9d159f2b2858fa8907 Author: Kan Liang Date: Tue Apr 24 11:20:11 2018 -0700 perf stat: Print out hint for mixed PMU group error Perf doesn't support mixed events from different PMUs (except software event) in a group. For this case, only "" or "" are printed out. There is no hint which guides users to fix the issue. Checking the PMU type of events to determine if they are from the same PMU. There may be false alarm for the checking. E.g. the core PMU has different PMU type. But it should not happen often. The false alarm can also be tolerated, because: - It only happens on error path. - It just provides a possible solution for the issue. Signed-off-by: Kan Liang Cc: Agustin Vega-Frias Cc: Andi Kleen Cc: Ganapatrao Kulkarni Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Link: http://lkml.kernel.org/r/1524594014-79243-2-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 292c34c10249c64a70def442f0d977bf9d466ed7 Author: Kan Liang Date: Tue Apr 24 11:20:10 2018 -0700 perf pmu: Fix core PMU alias list for X86 platform When counting uncore event with alias, core event is mistakenly involved, for example: perf stat --no-merge -e "unc_m_cas_count.all" -C0 sleep 1 Performance counter stats for 'CPU(s) 0': 0 unc_m_cas_count.all [uncore_imc_4] 0 unc_m_cas_count.all [uncore_imc_2] 0 unc_m_cas_count.all [uncore_imc_0] 153,640 unc_m_cas_count.all [cpu] 0 unc_m_cas_count.all [uncore_imc_5] 25,026 unc_m_cas_count.all [uncore_imc_3] 0 unc_m_cas_count.all [uncore_imc_1] 1.001447890 seconds time elapsed The reason is that current implementation doesn't check PMU name of a event when adding its alias into the alias list for core PMU. The uncore event aliases are mistakenly added. This bug was introduced in: commit 14b22ae028de ("perf pmu: Add helper function is_pmu_core to detect PMU CORE devices") Checking the PMU name for all PMUs on X86 and other architectures except ARM. There is no behavior change for ARM. Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Agustin Vega-Frias Cc: Andi Kleen Cc: Ganapatrao Kulkarni Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Fixes: 14b22ae028de ("perf pmu: Add helper function is_pmu_core to detect PMU CORE devices") Link: http://lkml.kernel.org/r/1524594014-79243-1-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit b40000325044433cd350725e2025214ae48b17fd Author: Michael S. Tsirkin Date: Fri Apr 13 16:37:04 2018 +0300 virtio_balloon: add array of stat names Jason Wang points out that it's very hard for users to build an array of stat names. The naive thing is to use VIRTIO_BALLOON_S_NR but that breaks if we add more stats - as done e.g. recently by commit 6c64fe7f2 ("virtio_balloon: export hugetlb page allocation counts"). Let's add an array of reasonably readable names. Fixes: 6c64fe7f2 ("virtio_balloon: export hugetlb page allocation counts") Cc: Jason Wang Signed-off-by: Michael S. Tsirkin Reviewed-by: Jonathan Helman include/uapi/linux/virtio_balloon.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit ad40bdafb495f30e5af837e15b3c2a4cb2176e47 Author: Jason A. Donenfeld Date: Sat Dec 23 01:43:23 2017 +0100 arm64: support __int128 with clang Commit fb8722735f50 ("arm64: support __int128 on gcc 5+") added support for arm64 __int128 with gcc with a version-conditional, but neglected to enable this for clang, which in fact appears to support aarch64 __int128. This commit therefore enables it if the compiler is clang, using the same type of makefile conditional used elsewhere in the tree. Signed-off-by: Jason A. Donenfeld Signed-off-by: Will Deacon arch/arm64/Makefile | 4 ++++ 1 file changed, 4 insertions(+) commit 9478f1927e6ef9ef5e1ad761af1c98aa8e40b7f5 Author: Mark Rutland Date: Tue Apr 3 11:22:51 2018 +0100 arm64: only advance singlestep for user instruction traps Our arm64_skip_faulting_instruction() helper advances the userspace singlestep state machine, but this is also called by the kernel BRK handler, as used for WARN*(). Thus, if we happen to hit a WARN*() while the user singlestep state machine is in the active-no-pending state, we'll advance to the active-pending state without having executed a user instruction, and will take a step exception earlier than expected when we return to userspace. Let's fix this by only advancing the state machine when skipping a user instruction. Signed-off-by: Mark Rutland Cc: Andrey Konovalov Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/traps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ed231ae384fdfcb546b63b2fe7add65029e3a94c Author: Kim Phillips Date: Tue Apr 24 10:39:43 2018 -0500 arm64/kernel: rename module_emit_adrp_veneer->module_emit_veneer_for_adrp Commit a257e02579e ("arm64/kernel: don't ban ADRP to work around Cortex-A53 erratum #843419") introduced a function whose name ends with "_veneer". This clashes with commit bd8b22d2888e ("Kbuild: kallsyms: ignore veneers emitted by the ARM linker"), which removes symbols ending in "_veneer" from kallsyms. The problem was manifested as 'perf test -vvvvv vmlinux' failed, correctly claiming the symbol 'module_emit_adrp_veneer' was present in vmlinux, but not in kallsyms. ... ERR : 0xffff00000809aa58: module_emit_adrp_veneer not on kallsyms ... test child finished with -1 ---- end ---- vmlinux symtab matches kallsyms: FAILED! Fix the problem by renaming module_emit_adrp_veneer to module_emit_veneer_for_adrp. Now the test passes. Fixes: a257e02579e ("arm64/kernel: don't ban ADRP to work around Cortex-A53 erratum #843419") Acked-by: Ard Biesheuvel Cc: Will Deacon Cc: Catalin Marinas Cc: Michal Marek Signed-off-by: Kim Phillips Signed-off-by: Will Deacon arch/arm64/include/asm/module.h | 2 +- arch/arm64/kernel/module-plts.c | 2 +- arch/arm64/kernel/module.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 59275a0c037ed6fabd6354730f1e3104264ab719 Author: Mark Rutland Date: Tue Apr 24 13:11:22 2018 +0100 arm64: ptrace: remove addr_limit manipulation We transiently switch to KERNEL_DS in compat_ptrace_gethbpregs() and compat_ptrace_sethbpregs(), but in either case this is pointless as we don't perform any uaccess during this window. let's rip out the redundant addr_limit manipulation. Acked-by: Catalin Marinas Signed-off-by: Mark Rutland Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/ptrace.c | 6 ------ 1 file changed, 6 deletions(-) commit 8e0428a7e7a8e521540f7f87ce1c55ae04acd708 Author: Michael Drake Date: Tue Apr 24 18:24:43 2018 +0100 ALSA: usb-audio: ADC3: Fix channel mapping conversion for ADC3. The channel mapping is defined by bChRelationship, not bChPurpose. Fixes: 9a2fe9b801f5 ("ALSA: usb: initial USB Audio Device Class 3.0 support") Reviewed-by: Ruslan Bilovol Signed-off-by: Michael Drake Signed-off-by: Jorge Sanjuan Signed-off-by: Takashi Iwai sound/usb/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85602bea297fc4e5223adbf7006dcce9aa694f17 Author: Aurelien Jarno Date: Wed Mar 21 22:26:31 2018 +0100 RISC-V: build vdso-dummy.o with -no-pie Debian toolcahin defaults to PIE, and I guess that will also be the case of most distributions. This causes the following build failure: AS arch/riscv/kernel/vdso/getcpu.o AS arch/riscv/kernel/vdso/flush_icache.o VDSOLD arch/riscv/kernel/vdso/vdso.so.dbg OBJCOPY arch/riscv/kernel/vdso/vdso.so AS arch/riscv/kernel/vdso/vdso.o VDSOLD arch/riscv/kernel/vdso/vdso-dummy.o LD arch/riscv/kernel/vdso/vdso-syms.o riscv64-linux-gnu-ld: attempted static link of dynamic object `arch/riscv/kernel/vdso/vdso-dummy.o' make[2]: *** [arch/riscv/kernel/vdso/Makefile:43: arch/riscv/kernel/vdso/vdso-syms.o] Error 1 make[1]: *** [scripts/Makefile.build:575: arch/riscv/kernel/vdso] Error 2 make: *** [Makefile:1018: arch/riscv/kernel] Error 2 While the root Makefile correctly passes "-fno-PIE" to build individual object files, the RISC-V kernel also builds vdso-dummy.o as an executable, which is therefore linked as PIE. Fix that by updating this specific link rule to also include "-no-pie". Signed-off-by: Aurelien Jarno Signed-off-by: Palmer Dabbelt arch/riscv/kernel/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b7252a268706a69c803fd88cfd6d0176fca0041 Author: Christoph Hellwig Date: Mon Apr 16 08:57:52 2018 +0200 riscv: there is no So don't list it as generic-y. Signed-off-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/Kbuild | 1 - 1 file changed, 1 deletion(-) commit 86e11757d8b28d8266065beaa9d391d49426797b Author: Christoph Hellwig Date: Mon Apr 16 14:53:51 2018 +0200 riscv: select DMA_DIRECT_OPS instead of redefining it DMA_DIRECT_OPS is defined in lib/Kconfig, so don't duplicate it in arch/riscv/Kconfig. Signed-off-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f8d6203780b73c07dc49ee421fedae8edb76b6e4 Author: Edward Cree Date: Tue Apr 24 17:09:30 2018 +0100 sfc: ARFS filter IDs Associate an arbitrary ID with each ARFS filter, allowing to properly query for expiry. The association is maintained in a hash table, which is protected by a spinlock. v3: fix build warnings when CONFIG_RFS_ACCEL is disabled (thanks lkp-robot). v2: fixed uninitialised variable (thanks davem and lkp-robot). Fixes: 3af0f34290f6 ("sfc: replace asynchronous filter operations") Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 80 +++++++++++-------- drivers/net/ethernet/sfc/efx.c | 143 ++++++++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/efx.h | 21 +++++ drivers/net/ethernet/sfc/farch.c | 41 ++++++++-- drivers/net/ethernet/sfc/net_driver.h | 36 +++++++++ drivers/net/ethernet/sfc/rx.c | 62 +++++++++++++-- 6 files changed, 337 insertions(+), 46 deletions(-) commit d805c5209350ae725e3a1ee0204ba27d9e75ce3e Author: Florian Fainelli Date: Mon Apr 23 15:51:38 2018 -0700 net: ethtool: Add missing kernel doc for FEC parameters While adding support for ethtool::get_fecparam and set_fecparam, kernel doc for these functions was missed, add those. Fixes: 1a5f3da20bd9 ("net: ethtool: add support for forward error correction modes") Signed-off-by: Florian Fainelli Acked-by: Roopa Prabhu Signed-off-by: David S. Miller include/linux/ethtool.h | 2 ++ 1 file changed, 2 insertions(+) commit a6361f0ca4b25460f2cdf3235ebe8115f622901e Author: Willem de Bruijn Date: Mon Apr 23 17:37:03 2018 -0400 packet: fix bitfield update race Updates to the bitfields in struct packet_sock are not atomic. Serialize these read-modify-write cycles. Move po->running into a separate variable. Its writes are protected by po->bind_lock (except for one startup case at packet_create). Also replace a textual precondition warning with lockdep annotation. All others are set only in packet_setsockopt. Serialize these updates by holding the socket lock. Analogous to other field updates, also hold the lock when testing whether a ring is active (pg_vec). Fixes: 8dc419447415 ("[PACKET]: Add optional checksum computation for recvmsg") Reported-by: DaeRyong Jeong Reported-by: Byoungyoung Lee Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/packet/af_packet.c | 60 ++++++++++++++++++++++++++++++++++++-------------- net/packet/internal.h | 10 ++++----- 2 files changed, 49 insertions(+), 21 deletions(-) commit 30d84397affb0fcb11beaf049caabfcb1dac65a6 Author: Ben Shelton Date: Wed Apr 11 12:21:33 2018 -0700 ice: Do not check INTEVENT bit for OICR interrupts According to the hardware spec, checking the INTEVENT bit isn't a reliable way to detect if an OICR interrupt has occurred. This is because this bit can be cleared by the hardware/firmware before the interrupt service routine has run. So instead, just check for OICR events every time. Fixes: 940b61af02f4 ("ice: Initialize PF and setup miscellaneous interrupt") Signed-off-by: Ben Shelton Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_hw_autogen.h | 2 -- drivers/net/ethernet/intel/ice/ice_main.c | 4 ---- 2 files changed, 6 deletions(-) commit 6c1e851c4edc13a43adb3ea4044e3fc8f43ccf7d Author: Theodore Ts'o Date: Mon Apr 23 18:51:28 2018 -0400 random: fix possible sleeping allocation from irq context We can do a sleeping allocation from an irq context when CONFIG_NUMA is enabled. Fix this by initializing the NUMA crng instances in a workqueue. Reported-by: Tetsuo Handa Reported-by: syzbot+9de458f6a5e713ee8c1a@syzkaller.appspotmail.com Fixes: 8ef35c866f8862df ("random: set up the NUMA crng instances...") Cc: stable@vger.kernel.org Signed-off-by: Theodore Ts'o drivers/char/random.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 34357a90d5ca8228df4f88b21197f970285b209b Author: Anirudh Venkataramanan Date: Wed Apr 11 10:41:47 2018 -0700 ice: Fix incorrect comment for action type Action type 5 defines large action generic values. Fix comment to reflect that better. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d332a38c9519e0208f04da465bc88427db3485f6 Author: Anirudh Venkataramanan Date: Tue Apr 10 10:49:49 2018 -0700 ice: Fix initialization for num_nodes_added ice_sched_add_nodes_to_layer is used recursively, and so we start with num_nodes_added being 0. This way, in case of an error or if num_nodes is NULL, the function just returns 0 to indicate that no nodes were added. Fixes: 5513b920a4f7 ("ice: Update Tx scheduler tree for VSI multi-Tx queue support") Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2707df9773cd2cb8b0f35b8592431b301da9d352 Author: Vinicius Costa Gomes Date: Fri Mar 30 17:06:52 2018 -0700 igb: Fix the transmission mode of queue 0 for Qav mode When Qav mode is enabled, queue 0 should be kept on Stream Reservation mode. From the i210 datasheet, section 8.12.19: "Note: Queue0 QueueMode must be set to 1b when TransmitMode is set to Qav." ("QueueMode 1b" represents the Stream Reservation mode) The solution is to give queue 0 the all the credits it might need, so it has priority over queue 1. A situation where this can happen is when cbs is "installed" only on queue 1, leaving queue 0 alone. For example: $ tc qdisc replace dev enp2s0 handle 100: parent root mqprio num_tc 3 \ map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@1 2@2 hw 0 $ tc qdisc replace dev enp2s0 parent 100:2 cbs locredit -1470 \ hicredit 30 sendslope -980000 idleslope 20000 offload 1 Signed-off-by: Vinicius Costa Gomes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 7b70eb14392a7cf505f9b358d06c33b5af73d1e7 Author: Joakim Tjernlund Date: Thu Mar 1 14:39:41 2018 +0100 mtd: cfi: cmdset_0002: Do not allow read/write to suspend erase block. Currently it is possible to read and/or write to suspend EB's. Writing /dev/mtdX or /dev/mtdblockX from several processes may break the flash state machine. Taken from cfi_cmdset_0001 driver. Signed-off-by: Joakim Tjernlund Cc: Reviewed-by: Richard Weinberger Signed-off-by: Boris Brezillon drivers/mtd/chips/cfi_cmdset_0002.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 46a16a2283f9e678a4e26829175e0c37a5191860 Author: Joakim Tjernlund Date: Thu Mar 1 14:39:40 2018 +0100 mtd: cfi: cmdset_0001: Workaround Micron Erase suspend bug. Some Micron chips does not work well wrt Erase suspend for boot blocks. This avoids the issue by not allowing Erase suspend for the boot blocks for the 28F00AP30(1GBit) chip. Signed-off-by: Joakim Tjernlund Cc: Reviewed-by: Richard Weinberger Signed-off-by: Boris Brezillon drivers/mtd/chips/cfi_cmdset_0001.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 6510bbc88e3258631831ade49033537081950605 Author: Joakim Tjernlund Date: Thu Mar 1 14:39:39 2018 +0100 mtd: cfi: cmdset_0001: Do not allow read/write to suspend erase block. Currently it is possible to read and/or write to suspend EB's. Writing /dev/mtdX or /dev/mtdblockX from several processes may break the flash state machine. Signed-off-by: Joakim Tjernlund Cc: Reviewed-by: Richard Weinberger Signed-off-by: Boris Brezillon drivers/mtd/chips/cfi_cmdset_0001.c | 16 +++++++++++----- include/linux/mtd/flashchip.h | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) commit f4e5200fc0d7dad75c688e7ccc0652481a916df5 Author: Masahiro Yamada Date: Thu Apr 12 11:31:31 2018 +0900 arm64: dts: uniphier: fix input delay value for legacy mode of eMMC The property of the legacy mode for the eMMC PHY turned out to be wrong. Some eMMC devices are unstable due to the set-up/hold timing violation. Correct the delay value. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 2 +- arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 2 +- arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 22be37acce25d66ecf6403fc8f44df9c5ded2372 Author: Lukas Czerner Date: Tue Apr 24 11:31:44 2018 -0400 ext4: fix bitmap position validation Currently in ext4_valid_block_bitmap() we expect the bitmap to be positioned anywhere between 0 and s_blocksize clusters, but that's wrong because the bitmap can be placed anywhere in the block group. This causes false positives when validating bitmaps on perfectly valid file system layouts. Fix it by checking whether the bitmap is within the group boundary. The problem can be reproduced using the following mkfs -t ext3 -E stride=256 /dev/vdb1 mount /dev/vdb1 /mnt/test cd /mnt/test wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.16.3.tar.xz tar xf linux-4.16.3.tar.xz This will result in the warnings in the logs EXT4-fs error (device vdb1): ext4_validate_block_bitmap:399: comm tar: bg 84: block 2774529: invalid block bitmap [ Changed slightly for clarity and to not drop a overflow test -- TYT ] Signed-off-by: Lukas Czerner Signed-off-by: Theodore Ts'o Reported-by: Ilya Dryomov Fixes: 7dac4a1726a9 ("ext4: add validity checks for bitmap block numbers") Cc: stable@vger.kernel.org fs/ext4/balloc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 39035bfdc3f18987aba04165060bfbfa10ffc1cd Author: Colin Ian King Date: Tue Mar 27 15:21:48 2018 +0100 ixgbevf: ensure xdp_ring resources are free'd on error exit The current error handling for failed resource setup for xdp_ring data is a break out of the loop and returning 0 indicated everything was OK, when in fact it is not. Fix this by exiting via the error exit label err_setup_tx that will clean up the resources correctly and return and error status. Detected by CoverityScan, CID#1466879 ("Logically dead code") Fixes: 21092e9ce8b1 ("ixgbevf: Add support for XDP_TX action") Signed-off-by: Colin Ian King Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efc4a13724b852ddaa3358402a8dec024ffbcb17 Author: Andy Shevchenko Date: Thu Apr 19 19:53:32 2018 +0300 spi: pxa2xx: Allow 64-bit DMA Currently the 32-bit device address only is supported for DMA. However, starting from Intel Sunrisepoint PCH the DMA address of the device FIFO can be 64-bit. Change the respective variable to be compatible with DMA engine expectations, i.e. to phys_addr_t. Fixes: 34cadd9c1bcb ("spi: pxa2xx: Add support for Intel Sunrisepoint") Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-pxa2xx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23657ad7305ee8b263d27335abdd00917764c9cf Author: Steve French Date: Sun Apr 22 15:14:58 2018 -0500 SMB3: Fix 3.11 encryption to Windows and handle encrypted smb3 tcon Temporarily disable AES-GCM, as AES-CCM is only currently enabled mechanism on client side. This fixes SMB3.11 encrypted mounts to Windows. Also the tree connect request itself should be encrypted if requested encryption ("seal" on mount), in addition we should be enabling encryption in 3.11 based on whether we got any valid encryption ciphers back in negprot (the corresponding session flag is not set as it is in 3.0 and 3.02) Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky Reviewed-by: Ronnie Sahlberg CC: Stable fs/cifs/connect.c | 32 ++++++++++++++++---------------- fs/cifs/smb2pdu.c | 9 +++++---- fs/cifs/smb2pdu.h | 2 +- 3 files changed, 22 insertions(+), 21 deletions(-) commit 117e3b7fed552eba96ae0b3b92312fe8c5b0bfdd Author: Steve French Date: Sun Apr 22 10:24:19 2018 -0500 CIFS: set *resp_buf_type to NO_BUFFER on error Dan Carpenter had pointed this out a while ago, but the code around this had changed so wasn't causing any problems since that field was not used in this error path. Still, it is cleaner to always initialize this field, so changing the error path to set it. Reviewed-by: Ronnie Sahlberg CC: Dan Carpenter Signed-off-by: Steve French fs/cifs/transport.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9cf2f437ca5b39828984064fad213e68fc17ef11 Author: Xin Long Date: Tue Apr 24 14:33:37 2018 +0800 team: fix netconsole setup over team The same fix in Commit dbe173079ab5 ("bridge: fix netconsole setup over bridge") is also needed for team driver. While at it, remove the unnecessary parameter *team from team_port_enable_netpoll(). v1->v2: - fix it in a better way, as does bridge. Fixes: 0fb52a27a04a ("team: cleanup netpoll clode") Reported-by: João Avelino Bellomo Filho Signed-off-by: Xin Long Signed-off-by: David S. Miller drivers/net/team/team.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 13b86f50eaaddaea4bdd2fe476fd12e6a0951add Author: Hans de Goede Date: Sun Apr 22 19:56:17 2018 +0200 thermal: int3403_thermal: Fix NULL pointer deref on module load / probe Starting with kernel 4.17 thermal_cooling_device_register() will call the get_max_state() op during register. Since we deref priv->priv in int3403_get_max_state() this means we must set priv->priv before calling thermal_cooling_device_register(). Signed-off-by: Hans de Goede Signed-off-by: Zhang Rui drivers/thermal/int340x_thermal/int3403_thermal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 970f04c840f6004a1a956c1a836792a341d63eae Author: Rob Herring Date: Fri Apr 20 08:08:23 2018 -0500 dtc: checks: drop warning for missing PCI bridge bus-range Cherry-picked from dtc upstream commit e1f139ea4900fd0324c646822b4061fec6e08321. Having a 'bus-range' property for PCI bridges should not be required, so remove the warning when missing. There was some confusion with the Linux kernel printing a message that no property is present and the OS assigned the bus number. This message was intended to be informational rather than a warning. When the firmware doesn't enumerate the PCI bus and leaves it up to the OS to do, then it is perfectly fine for the OS to assign bus numbers and bus-range is not necessary. There are a few cases where bus-range is needed or useful as Arnd Bergmann summarized: - Traditionally Linux avoided using multiple PCI domains, but instead configured separate PCI host bridges to have non-overlapping bus ranges so we can present them to user space as a single domain, and run the kernel without CONFIG_PCI_DOMAINS. Specifying the bus ranges this way would and give stable bus numbers across boots when the probe order is not fixed. - On certain ARM64 systems, we must only use the first 128 bus numbers based on the way the IOMMU identifies the device with truncated bus/dev/fn number. There are probably others like this, with various limitations. - To leave some room for hotplugged devices, each slot on a host bridge can in theory get a range of bus numbers that are available when assigning bus numbers at boot time Cc: Arnd Bergmann Signed-off-by: Rob Herring Signed-off-by: David Gibson scripts/dtc/checks.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 10412c420af9ba1f3de8483a95d360e5eb5bfc84 Author: Takashi Sakamoto Date: Sun Apr 22 21:19:24 2018 +0900 ALSA: dice: fix OUI for TC group OUI for TC Electronic is 0x000166, for TC GROUP A/S. 0x001486 is for Echo Digital Audio Corporation. Fixes: 7cafc65b3aa1 ('ALSA: dice: force to add two pcm devices for listed models') Cc: # v4.6+ Reference: http://standards-oui.ieee.org/oui/oui.txt Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d8d6428d1da642ddd75b0be2d1bb1123ff8e017 Author: Takashi Iwai Date: Tue Apr 24 11:11:48 2018 +0200 ALSA: usb-audio: Skip broken EU on Dell dock USB-audio The Dell Dock USB-audio device with 0bda:4014 is behaving notoriously bad, and we have already applied some workaround to avoid the firmware hiccup. Yet we still need to skip one thing, the Extension Unit at ID 4, which doesn't react correctly to the mixer ctl access. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1090658 Cc: Signed-off-by: Takashi Iwai sound/usb/mixer_maps.c | 3 +++ 1 file changed, 3 insertions(+) commit 2b54f785b4d4894ab7ab3bf5e461e0819d221c1c Author: Takashi Iwai Date: Mon Apr 23 15:19:25 2018 +0200 ALSA: usb-audio: Fix missing endian conversion The UAC2 jack detection support introduced the bmControls checks in a couple of places, but they forgot the endian conversion; the bmControls of UAC2 terminal descriptor is __le16, not a byte like in UAC1. Fixes: 5a222e849452 ("ALSA: usb-audio: UAC2 jack detection") Tested-by: Andrew Chant Signed-off-by: Takashi Iwai sound/usb/mixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ac1e55b1fdb27c1b07a0a6fe519f1291ff1e7d40 Author: Ard Biesheuvel Date: Mon Apr 23 11:16:56 2018 +0200 ACPI / button: make module loadable when booted in non-ACPI mode Modules such as nouveau.ko and i915.ko have a link time dependency on acpi_lid_open(), and due to its use of acpi_bus_register_driver(), the button.ko module that provides it is only loadable when booted in ACPI mode. However, the ACPI button driver can be built into the core kernel as well, in which case the dependency can always be satisfied, and the dependent modules can be loaded regardless of whether the system was booted in ACPI mode or not. So let's fix this asymmetry by making the ACPI button driver loadable as a module even if not booted in ACPI mode, so it can provide the acpi_lid_open() symbol in the same way as when built into the kernel. Signed-off-by: Ard Biesheuvel [ rjw: Minor adjustments of comments, whitespace and names. ] Signed-off-by: Rafael J. Wysocki drivers/acpi/button.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit af8a41cccf8f469165c6debc8fe07c5fd2ca501a Author: Ping-Ke Shih Date: Fri Apr 20 10:30:09 2018 +0800 rtlwifi: cleanup 8723be ant_sel definition Some HP laptops have only a single wifi antenna. This would not be a problem except that they were shipped with an incorrectly encoded EFUSE. It should have been possible to open the computer and transfer the antenna connection to the other terminal except that such action might void the warranty, and moving the antenna broke the Windows driver. The fix was to add a module option that would override the EFUSE encoding. That was done with commit c18d8f509571 ("rtlwifi: rtl8723be: Add antenna select module parameter"). There was still a problem with Bluetooth coexistence, which was addressed with commit baa170229095 ("rtlwifi: btcoexist: Implement antenna selection"). There were still problems, thus there were commit 0ff78adeef11 ("rtlwifi: rtl8723be: fix ant_sel code") and commit 6d6226928369 ("rtlwifi: btcoexist: Fix antenna selection code"). Despite all these attempts at fixing the problem, the code is not yet right. A proper fix is important as there are now instances of laptops having RTL8723DE chips with the same problem. The module parameter ant_sel is used to control antenna number and path. At present enum ANT_{X2,X1} is used to define the antenna number, but this choice is not intuitive, thus change to a new enum ANT_{MAIN,AUX} to make it more readable. This change showed examples where incorrect values were used. It was also possible to remove a workaround in halbtcoutsrc.c. The experimental results with single antenna connected to specific path are now as follows: ant_sel ANT_MAIN(#1) ANT_AUX(#2) 0 -8 -62 1 -62 -10 2 -6 -60 Signed-off-by: Ping-Ke Shih Fixes: c18d8f509571 ("rtlwifi: rtl8723be: Add antenna select module parameter") Fixes: baa170229095 ("rtlwifi: btcoexist: Implement antenna selection") Fixes: 0ff78adeef11 ("rtlwifi: rtl8723be: fix ant_sel code") Fixes: 6d6226928369 ("rtlwifi: btcoexist: Fix antenna selection code") Cc: Stable # 4.7+ Reviewed-by: Larry Finger Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 15 --------------- drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 11 +++++++---- drivers/net/wireless/realtek/rtlwifi/wifi.h | 5 +++++ 3 files changed, 12 insertions(+), 19 deletions(-) commit a083429e133df63bf2e618f51e4061649fb3c65e Author: Luca Coelho Date: Mon Apr 23 16:01:31 2018 +0300 iwlwifi: mvm: fix old scan version sizes When version 8 of the scan command API was introduced, only the size of version 7 was updated, causing older versions of the firmware to throw BAD_COMMAND errors. Calculating the old version based on the size of the latest version got too complicated and the size of the older versions will never change anyway, so it's better to just hardcoded the sizes. Fixes: 66fa2424df16 ("iwlwifi: fw api: support the new scan request FW API version") Reported-by: Scott Register Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/fw/api/scan.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 7bbc0b950f34bf11c26a32b6beb927777e7f3b93 Author: Randy Dunlap Date: Fri Apr 13 19:49:28 2018 -0700 drm/amdkfd: fix build, select MMU_NOTIFIER When CONFIG_MMU_NOTIFIER is not enabled, struct mmu_notifier has an incomplete type definition, which causes build errors. ../drivers/gpu/drm/amd/amdkfd/kfd_priv.h:607:22: error: field 'mmu_notifier' has incomplete type ../include/linux/kernel.h:979:32: error: dereferencing pointer to incomplete type ../include/linux/kernel.h:980:18: error: dereferencing pointer to incomplete type ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:434:2: error: implicit declaration of function 'mmu_notifier_unregister_no_release' [-Werror=implicit-function-declaration] ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:435:2: error: implicit declaration of function 'mmu_notifier_call_srcu' [-Werror=implicit-function-declaration] ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:438:21: error: variable 'kfd_process_mmu_notifier_ops' has initializer but incomplete type ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:439:2: error: unknown field 'release' specified in initializer ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:439:2: warning: excess elements in struct initializer [enabled by default] ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:439:2: warning: (near initialization for 'kfd_process_mmu_notifier_ops') [enabled by default] ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:534:2: error: implicit declaration of function 'mmu_notifier_register' [-Werror=implicit-function-declaration] Signed-off-by: Randy Dunlap Tested-by: Anders Roxell Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ee53a65dc766384aaf1a26e3c43dd13456170b69 Author: Markus Mayer Date: Wed Apr 18 08:56:42 2018 -0700 cpufreq: brcmstb-avs-cpufreq: remove development debug support This debug code was helpful while developing the driver, but it isn't being used for anything anymore. Signed-off-by: Markus Mayer Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig.arm | 10 -- drivers/cpufreq/brcmstb-avs-cpufreq.c | 323 +--------------------------------- 2 files changed, 1 insertion(+), 332 deletions(-) commit 1cf6cc74bbeb85bb87c3ca3f3df97a283c3aa737 Author: Andres Rodriguez Date: Tue Apr 10 17:32:33 2018 -0400 drm/amdkfd: fix clock counter retrieval for node without GPU Currently if a user requests clock counters for a node without a GPU resource we will always return EINVAL. Instead if no GPU resource is attached, fill the gpu_clock_counter argument with zeroes so that we may proceed and return valid CPU counters. Signed-off-by: Andres Rodriguez Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit ded5e5622c38f6d0188c776bfd6793e1cdbb7606 Author: Wei Yongjun Date: Fri Mar 30 02:25:17 2018 +0000 drm/amdkfd: Fix the error return code in kfd_ioctl_unmap_memory_from_gpu() Passing NULL pointer to PTR_ERR will result in return value of 0 indicating success which is clearly not what it is intended here. This patch returns -EINVAL instead. v2: change ret code to -ENODEV Fixes: 5ec7e02854b3 ("drm/amdkfd: Add ioctls for GPUVM memory management") Signed-off-by: Wei Yongjun Reviewed-by: Felix Kuehling Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0a37862a4e1844793d39aca9ccb8fecbdcb8659 Author: Mika Westerberg Date: Mon Apr 23 14:16:03 2018 +0300 ACPI / watchdog: Prefer iTCO_wdt on Lenovo Z50-70 WDAT table on Lenovo Z50-70 is using RTC SRAM (ports 0x70 and 0x71) to store state of the timer. This conflicts with Linux RTC driver (rtc-cmos.c) who fails to reserve those ports for itself preventing RTC from functioning. In addition the WDAT table seems not to be fully functional because it does not reset the system when the watchdog times out. On this system iTCO_wdt works just fine so we simply prefer to use it instead of WDAT. This makes RTC working again and also results working watchdog via iTCO_wdt. Reported-by: Peter Milley Link: https://bugzilla.kernel.org/show_bug.cgi?id=199033 Signed-off-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_watchdog.c | 59 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 49 insertions(+), 10 deletions(-) commit a4efd3a4e685df239805ebd57f546904d5821114 Author: kbuild test robot Date: Wed Mar 28 00:55:26 2018 +0800 drm/amdkfd: kfd_dev_is_large_bar() can be static Fixes: 5ec7e02854b3 ("drm/amdkfd: Add ioctls for GPUVM memory management") Signed-off-by: Fengguang Wu Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94a82284ad4711b7f9fd78981fdc7a1cb645030b Author: Sekhar Nori Date: Tue Apr 17 18:06:00 2018 +0530 ARM: dts: da850: fix W=1 warnings with pinmux node Remove unused #address-cells and #size-cells from pinmux node. This fixes W=1 warnings of the type: arch/arm/boot/dts/da850-lcdk.dtb: Warning (avoid_unnecessary_addr_size): /soc@1c00000/pinmux@14120: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Tested on DA850 LCDK by checking output of: /sys/kernel/debug/pinctrl/1c14120.pinmux-pinctrl-single/pins before and after the change. Reviewed-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 01de0be5c1a3a03d043fd28c2a6a6fef245c9ab8 Author: Sekhar Nori Date: Wed Apr 18 14:54:08 2018 +0530 ARM: dts: da850-lcdk: add unit name for memory node Add unit name for memory node to squash the W=1 warning: arch/arm/boot/dts/da850-lcdk.dtb: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name While at it, drop the device_type property from memory node since its provided by da850.dtsi already. Reviewed-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lcdk.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 30f548ba90b83759c1b187156d6874334a804791 Author: Sekhar Nori Date: Wed Apr 18 14:54:07 2018 +0530 ARM: dts: da850: get rid of skeleton.dtsi skeleton.dtsi is deprecated. Drop its usage in da850.dtsi and move the nodes and properties included by it directly to keep the dtb same. The memory node has been changed to get rid of warnings (see below). It contains the memory base address as that is fixed for DA850 SoCs. But the size needs to be added by bootloader or a board specific dts. This gets rid of the following W=1 warnings: arch/arm/boot/dts/da850-enbw-cmc.dtb: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name arch/arm/boot/dts/da850-evm.dtb: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name arch/arm/boot/dts/da850-lego-ev3.dtb: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name Reviewed-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850.dtsi | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 7b4c443d139f1d2b5570da475f7a9cbcef86740c Author: Ilya Dryomov Date: Mon Apr 23 15:25:10 2018 +0200 libceph: reschedule a tick in finish_hunting() If we go without an established session for a while, backoff delay will climb to 30 seconds. The keepalive timeout is also 30 seconds, so it's pretty easily hit after a prolonged hunting for a monitor: we don't get a chance to send out a keepalive in time, which means we never get back a keepalive ack in time, cutting an established session and attempting to connect to a different monitor every 30 seconds: [Sun Apr 1 23:37:05 2018] libceph: mon0 10.80.20.99:6789 session established [Sun Apr 1 23:37:36 2018] libceph: mon0 10.80.20.99:6789 session lost, hunting for new mon [Sun Apr 1 23:37:36 2018] libceph: mon2 10.80.20.103:6789 session established [Sun Apr 1 23:38:07 2018] libceph: mon2 10.80.20.103:6789 session lost, hunting for new mon [Sun Apr 1 23:38:07 2018] libceph: mon1 10.80.20.100:6789 session established [Sun Apr 1 23:38:37 2018] libceph: mon1 10.80.20.100:6789 session lost, hunting for new mon [Sun Apr 1 23:38:37 2018] libceph: mon2 10.80.20.103:6789 session established [Sun Apr 1 23:39:08 2018] libceph: mon2 10.80.20.103:6789 session lost, hunting for new mon The regular keepalive interval is 10 seconds. After ->hunting is cleared in finish_hunting(), call __schedule_delayed() to ensure we send out a keepalive after 10 seconds. Cc: stable@vger.kernel.org # 4.7+ Link: http://tracker.ceph.com/issues/23537 Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman net/ceph/mon_client.c | 1 + 1 file changed, 1 insertion(+) commit facb9f6eba3df4e8027301cc0e514dc582a1b366 Author: Ilya Dryomov Date: Mon Apr 23 15:25:10 2018 +0200 libceph: un-backoff on tick when we have a authenticated session This means that if we do some backoff, then authenticate, and are healthy for an extended period of time, a subsequent failure won't leave us starting our hunting sequence with a large backoff. Mirrors ceph.git commit d466bc6e66abba9b464b0b69687cf45c9dccf383. Cc: stable@vger.kernel.org # 4.7+ Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman net/ceph/mon_client.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 907e21c15c883c2c15d1e5ee3cdbb7824ab1da59 Author: Shaokun Zhang Date: Tue Apr 17 20:03:09 2018 +0800 arm64: mm: drop addr parameter from sync icache and dcache The addr parameter isn't used for anything. Let's simplify and get rid of it, like arm. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Shaokun Zhang Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 4 ++-- arch/arm64/mm/flush.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 09e182d17e8891dd73baba961a0f5a82e9274c97 Author: Borislav Petkov Date: Sat Apr 21 10:19:30 2018 +0200 x86/microcode: Do not exit early from __reload_late() Vitezslav reported a case where the "Timeout during microcode update!" panic would hit. After a deeper look, it turned out that his .config had CONFIG_HOTPLUG_CPU disabled which practically made save_mc_for_early() a no-op. When that happened, the discovered microcode patch wasn't saved into the cache and the late loading path wouldn't find any. This, then, lead to early exit from __reload_late() and thus CPUs waiting until the timeout is reached, leading to the panic. In hindsight, that function should have been written so it does not return before the post-synchronization. Oh well, I know better now... Fixes: bb8c13d61a62 ("x86/microcode: Fix CPU synchronization routine") Reported-by: Vitezslav Samel Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Tested-by: Vitezslav Samel Tested-by: Ashok Raj Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20180418081140.GA2439@pc11.op.pod.cz Link: https://lkml.kernel.org/r/20180421081930.15741-2-bp@alien8.de arch/x86/kernel/cpu/microcode/core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 84749d83758af6576552046b215b9b7f37f9556b Author: Borislav Petkov Date: Sat Apr 21 10:19:29 2018 +0200 x86/microcode/intel: Save microcode patch unconditionally save_mc_for_early() was a no-op on !CONFIG_HOTPLUG_CPU but the generic_load_microcode() path saves the microcode patches it has found into the cache of patches which is used for late loading too. Regardless of whether CPU hotplug is used or not. Make the saving unconditional so that late loading can find the proper patch. Reported-by: Vitezslav Samel Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Tested-by: Vitezslav Samel Tested-by: Ashok Raj Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20180418081140.GA2439@pc11.op.pod.cz Link: https://lkml.kernel.org/r/20180421081930.15741-1-bp@alien8.de arch/x86/kernel/cpu/microcode/intel.c | 2 -- 1 file changed, 2 deletions(-) commit 75ecfb49516c53da00c57b9efe48fa3f5504a791 Author: Mahesh Salgaonkar Date: Mon Apr 23 10:29:27 2018 +0530 powerpc/mce: Fix a bug where mce loops on memory UE. The current code extracts the physical address for UE errors and then hooks it up into memory failure infrastructure. On successful extraction of physical address it wrongly sets "handled = 1" which means this UE error has been recovered. Since MCE handler gets return value as handled = 1, it assumes that error has been recovered and goes back to same NIP. This causes MCE interrupt again and again in a loop leading to hard lockup. Also, initialize phys_addr to ULONG_MAX so that we don't end up queuing undesired page to hwpoison. Without this patch we see: Severe Machine check interrupt [Recovered] NIP: [000000001002588c] PID: 7109 Comm: find Initiator: CPU Error type: UE [Load/Store] Effective address: 00007fffd2755940 Physical address: 000020181a080000 ... Severe Machine check interrupt [Recovered] NIP: [000000001002588c] PID: 7109 Comm: find Initiator: CPU Error type: UE [Load/Store] Effective address: 00007fffd2755940 Physical address: 000020181a080000 Severe Machine check interrupt [Recovered] NIP: [000000001002588c] PID: 7109 Comm: find Initiator: CPU Error type: UE [Load/Store] Effective address: 00007fffd2755940 Physical address: 000020181a080000 Memory failure: 0x20181a08: recovery action for dirty LRU page: Recovered Memory failure: 0x20181a08: already hardware poisoned Memory failure: 0x20181a08: already hardware poisoned Memory failure: 0x20181a08: already hardware poisoned Memory failure: 0x20181a08: already hardware poisoned Memory failure: 0x20181a08: already hardware poisoned Memory failure: 0x20181a08: already hardware poisoned ... Watchdog CPU:38 Hard LOCKUP After this patch we see: Severe Machine check interrupt [Not recovered] NIP: [00007fffaae585f4] PID: 7168 Comm: find Initiator: CPU Error type: UE [Load/Store] Effective address: 00007fffaafe28ac Physical address: 00002017c0bd0000 find[7168]: unhandled signal 7 at 00007fffaae585f4 nip 00007fffaae585f4 lr 00007fffaae585e0 code 4 Memory failure: 0x2017c0bd: recovery action for dirty LRU page: Recovered Fixes: 01eaac2b0591 ("powerpc/mce: Hookup ierror (instruction) UE errors") Fixes: ba41e1e1ccb9 ("powerpc/mce: Hookup derror (load/store) UE errors") Cc: stable@vger.kernel.org # v4.15+ Signed-off-by: Mahesh Salgaonkar Signed-off-by: Balbir Singh Reviewed-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/kernel/mce_power.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 6cd968f4481437e6a8194b5e028000310ffe5ce2 Merge: a49e2f5 117df65 Author: David S. Miller Date: Mon Apr 23 21:24:23 2018 -0400 Merge branch 'amd-xgbe-fixes' aTom Lendacky says: ==================== amd-xgbe: AMD XGBE driver fixes 2018-04-23 This patch series addresses some issues in the AMD XGBE driver. The following fixes are included in this driver update series: - Improve KR auto-negotiation and training (2 patches) - Add pre and post auto-negotiation hooks - Use the pre and post auto-negotiation hooks to disable CDR tracking during auto-negotiation page exchange in KR mode - Check for SFP tranceiver signal support and only use the signal if the SFP indicates that it is supported This patch series is based on net. ==================== Signed-off-by: David S. Miller commit 117df655f8ed51adb6e6b163812a06ebeae9f453 Author: Tom Lendacky Date: Mon Apr 23 11:43:34 2018 -0500 amd-xgbe: Only use the SFP supported transceiver signals The SFP eeprom indicates the transceiver signals (Rx LOS, Tx Fault, etc.) that it supports. Update the driver to include checking the eeprom data when deciding whether to use a transceiver signal. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 71 ++++++++++++++++++++++------- 1 file changed, 54 insertions(+), 17 deletions(-) commit 96f4d430c507ed4856048c2dc9c1a2ea5b5e74e4 Author: Tom Lendacky Date: Mon Apr 23 11:43:17 2018 -0500 amd-xgbe: Improve KR auto-negotiation and training Update xgbe-phy-v2.c to make use of the auto-negotiation (AN) phy hooks to improve the ability to successfully complete Clause 73 AN when running at 10gbps. Hardware can sometimes have issues with CDR lock when the AN DME page exchange is being performed. The AN and KR training hooks are used as follows: - The pre AN hook is used to disable CDR tracking in the PHY so that the DME page exchange can be successfully and consistently completed. - The post KR training hook is used to re-enable the CDR tracking so that KR training can successfully complete. - The post AN hook is used to check for an unsuccessful AN which will increase a CDR tracking enablement delay (up to a maximum value). Add two debugfs entries to allow control over use of the CDR tracking workaround. The debugfs entries allow the CDR tracking workaround to be disabled and determine whether to re-enable CDR tracking before or after link training has been initiated. Also, with these changes the receiver reset cycle that is performed during the link status check can be performed less often. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-common.h | 8 ++ drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c | 16 ++++ drivers/net/ethernet/amd/xgbe/xgbe-main.c | 1 + drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 8 +- drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 2 + drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 125 ++++++++++++++++++++++++++- drivers/net/ethernet/amd/xgbe/xgbe.h | 4 + 7 files changed, 160 insertions(+), 4 deletions(-) commit 4d945663a6a0acf3cbe45940503f2eb9584bfee7 Author: Tom Lendacky Date: Mon Apr 23 11:43:08 2018 -0500 amd-xgbe: Add pre/post auto-negotiation phy hooks Add hooks to the driver auto-negotiation (AN) flow to allow the different phy implementations to perform any steps necessary to improve AN. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 16 ++++++++++++++-- drivers/net/ethernet/amd/xgbe/xgbe.h | 5 +++++ 2 files changed, 19 insertions(+), 2 deletions(-) commit a49e2f5d5fb141884452ddb428f551b123d436b5 Author: Guillaume Nault Date: Mon Apr 23 16:38:27 2018 +0200 pppoe: check sockaddr length in pppoe_connect() We must validate sockaddr_len, otherwise userspace can pass fewer data than we expect and we end up accessing invalid data. Fixes: 224cf5ad14c0 ("ppp: Move the PPP drivers") Reported-by: syzbot+4f03bdf92fdf9ef5ddab@syzkaller.appspotmail.com Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller drivers/net/ppp/pppoe.c | 4 ++++ 1 file changed, 4 insertions(+) commit eb1c28c05894a4b1f6b56c5bf072205e64cfa280 Author: Guillaume Nault Date: Mon Apr 23 16:15:14 2018 +0200 l2tp: check sockaddr length in pppol2tp_connect() Check sockaddr_len before dereferencing sp->sa_protocol, to ensure that it actually points to valid data. Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts") Reported-by: syzbot+a70ac890b23b1bf29f5c@syzkaller.appspotmail.com Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ppp.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b6a930fa88083b41d26ddf1cab95cbd740936c22 Author: Jingju Hou Date: Mon Apr 23 15:22:49 2018 +0800 net: phy: marvell: clear wol event before setting it If WOL event happened once, the LED[2] interrupt pin will not be cleared unless we read the CSISR register. If interrupts are in use, the normal interrupt handling will clear the WOL event. Let's clear the WOL event before enabling it if !phy_interrupt_is_valid(). Signed-off-by: Jingju Hou Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d0cf9b561ca97d5245bb9e0c4774b7fadd897d67 Author: Alistair Popple Date: Tue Apr 17 19:11:28 2018 +1000 powerpc/powernv/npu: Do a PID GPU TLB flush when invalidating a large address range The NPU has a limited number of address translation shootdown (ATSD) registers and the GPU has limited bandwidth to process ATSDs. This can result in contention of ATSD registers leading to soft lockups on some threads, particularly when invalidating a large address range in pnv_npu2_mn_invalidate_range(). At some threshold it becomes more efficient to flush the entire GPU TLB for the given MM context (PID) than individually flushing each address in the range. This patch will result in ranges greater than 2MB being converted from 32+ ATSDs into a single ATSD which will flush the TLB for the given PID on each GPU. Fixes: 1ab66d1fbada ("powerpc/powernv: Introduce address translation services for Nvlink2") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Alistair Popple Acked-by: Balbir Singh Tested-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/npu-dma.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit a1409adac748f0db655e096521bbe6904aadeb98 Author: Alistair Popple Date: Wed Apr 11 16:38:55 2018 +1000 powerpc/powernv/npu: Prevent overwriting of pnv_npu2_init_contex() callback parameters There is a single npu context per set of callback parameters. Callers should be prevented from overwriting existing callback values so instead return an error if different parameters are passed. Fixes: 1ab66d1fbada ("powerpc/powernv: Introduce address translation services for Nvlink2") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Alistair Popple Reviewed-by: Mark Hairgrove Tested-by: Mark Hairgrove Reviewed-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/include/asm/powernv.h | 2 +- arch/powerpc/platforms/powernv/npu-dma.c | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) commit 28a5933e8d362766462ea9e5f135e19f41e658ba Author: Alistair Popple Date: Wed Apr 11 16:38:54 2018 +1000 powerpc/powernv/npu: Add lock to prevent race in concurrent context init/destroy The pnv_npu2_init_context() and pnv_npu2_destroy_context() functions are used to allocate/free contexts to allow address translation and shootdown by the NPU on a particular GPU. Context initialisation is implicitly safe as it is protected by the requirement mmap_sem be held in write mode, however pnv_npu2_destroy_context() does not require mmap_sem to be held and it is not safe to call with a concurrent initialisation for a different GPU. It was assumed the driver would ensure destruction was not called concurrently with initialisation. However the driver may be simplified by allowing concurrent initialisation and destruction for different GPUs. As npu context creation/destruction is not a performance critical path and the critical section is not large a single spinlock is used for simplicity. Fixes: 1ab66d1fbada ("powerpc/powernv: Introduce address translation services for Nvlink2") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Alistair Popple Reviewed-by: Mark Hairgrove Tested-by: Mark Hairgrove Reviewed-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/npu-dma.c | 51 ++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 9 deletions(-) commit 7fd6641de28fe9b5bce0c38d2adee0a72a72619e Author: Balbir Singh Date: Fri Apr 6 15:24:24 2018 +1000 powerpc/powernv/memtrace: Let the arch hotunplug code flush cache Don't do this via custom code, instead now that we have support in the arch hotplug/hotunplug code, rely on those routines to do the right thing. The existing flush doesn't work because it uses ppc64_caches.l1d.size instead of ppc64_caches.l1d.line_size. Fixes: 9d5171a8f248 ("powerpc/powernv: Enable removal of memory for in memory tracing") Signed-off-by: Balbir Singh Reviewed-by: Rashmica Gupta Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/memtrace.c | 17 ----------------- 1 file changed, 17 deletions(-) commit fb5924fddf9ee31db04da7ad4e8c3434a387101b Author: Balbir Singh Date: Fri Apr 6 15:24:23 2018 +1000 powerpc/mm: Flush cache on memory hot(un)plug This patch adds support for flushing potentially dirty cache lines when memory is hot-plugged/hot-un-plugged. The support is currently limited to 64 bit systems. The bug was exposed when mappings for a device were actually hot-unplugged and plugged in back later. A similar issue was observed during the development of memtrace, but memtrace does it's own flushing of region via a custom routine. These patches do a flush both on hotplug/unplug to clear any stale data in the cache w.r.t mappings, there is a small race window where a clean cache line may be created again just prior to tearing down the mapping. The patches were tested by disabling the flush routines in memtrace and doing I/O on the trace file. The system immediately checkstops (quite reliablly if prior to the hot-unplug of the memtrace region, we memset the regions we are about to hot unplug). After these patches no custom flushing is needed in the memtrace code. Fixes: 9d5171a8f248 ("powerpc/powernv: Enable removal of memory for in memory tracing") Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: Balbir Singh Acked-by: Reza Arbab Reviewed-by: Rashmica Gupta Signed-off-by: Michael Ellerman arch/powerpc/mm/mem.c | 2 ++ 1 file changed, 2 insertions(+) commit 596ea7aad431cb88d7a6f3a2b6019cf3221b8d02 Author: Wolfram Sang Date: Mon Apr 23 12:02:49 2018 -0700 MAINTAINERS: Rakesh Iyer can't be reached anymore The current mail address is rejected, last activity (with a different address) in git-history is from 2012. Remove this. Signed-off-by: Wolfram Sang Acked-by: Jon Hunter Signed-off-by: Dmitry Torokhov MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 6f226cff7a1e80de2a67175d26156c6354734a73 Author: Masanari Iida Date: Mon Apr 23 12:01:21 2018 -0700 Input: hideep_ts - fix a typo in Kconfig This patch fixes a spelling error found in Kconfig. Signed-off-by: Masanari Iida Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c71b2c53bf56efa2f8aeab4247a86c0178fdcd7 Author: Pali Rohár Date: Mon Apr 23 16:25:58 2018 -0700 Input: alps - fix reporting pressure of v3 trackstick According to documentation, all 7 lower bits represents trackpoint pressure. Fixes: 4621c9660459 ("Input: alps - report pressure of v3 and v7 trackstick") Signed-off-by: Pali Rohár Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3f8adee85e81a4e8b8ea842cdd9c8e5ec63573d Merge: 4dfe1bb 4fcfdfb Author: Daniel Borkmann Date: Tue Apr 24 00:49:46 2018 +0200 Merge branch 'bpf-sockmap-fixes' John Fastabend says: ==================== While testing sockmap with more programs (besides our test programs) I found a couple issues. The attached series fixes an issue where pinned maps were not working correctly, blocking sockets returned zero, and an error path that when the sock hit an out of memory case resulted in a double page_put() while doing ingress redirects. See individual patches for more details. v2: Incorporated Daniel's feedback to use map ops for uref put op which also fixed the build error discovered in v1. v3: rename map_put_uref to map_release_uref ==================== Signed-off-by: Daniel Borkmann commit 4fcfdfb83391c74e62683469289db42a143440ac Author: John Fastabend Date: Mon Apr 23 15:39:33 2018 -0700 bpf: sockmap, fix double page_put on ENOMEM error in redirect path In the case where the socket memory boundary is hit the redirect path returns an ENOMEM error. However, before checking for this condition the redirect scatterlist buffer is setup with a valid page and length. This is never unwound so when the buffers are released latter in the error path we do a put_page() and clear the scatterlist fields. But, because the initial error happens before completing the scatterlist buffer we end up with both the original buffer and the redirect buffer pointing to the same page resulting in duplicate put_page() calls. To fix this simply move the initial configuration of the redirect scatterlist buffer below the sock memory check. Found this while running TCP_STREAM test with netperf using Cilium. Fixes: fa246693a111 ("bpf: sockmap, BPF_F_INGRESS flag for BPF_SK_SKB_STREAM_VERDICT") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann kernel/bpf/sockmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e20f7334837ae47341d8ec4e3170d0b4336a3676 Author: John Fastabend Date: Mon Apr 23 15:39:28 2018 -0700 bpf: sockmap, sk_wait_event needed to handle blocking cases In the recvmsg handler we need to add a wait event to support the blocking use cases. Without this we return zero and may confuse user applications. In the wait event any data received on the sk either via sk_receive_queue or the psock ingress list will wake up the sock. Fixes: fa246693a111 ("bpf: sockmap, BPF_F_INGRESS flag for BPF_SK_SKB_STREAM_VERDICT") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann kernel/bpf/sockmap.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit ba6b8de423f8d0dee48d6030288ed81c03ddf9f0 Author: John Fastabend Date: Mon Apr 23 15:39:23 2018 -0700 bpf: sockmap, map_release does not hold refcnt for pinned maps Relying on map_release hook to decrement the reference counts when a map is removed only works if the map is not being pinned. In the pinned case the ref is decremented immediately and the BPF programs released. After this BPF programs may not be in-use which is not what the user would expect. This patch moves the release logic into bpf_map_put_uref() and brings sockmap in-line with how a similar case is handled in prog array maps. Fixes: 3d9e952697de ("bpf: sockmap, fix leaking maps with attached but not detached progs") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann include/linux/bpf.h | 2 +- kernel/bpf/arraymap.c | 3 ++- kernel/bpf/sockmap.c | 4 ++-- kernel/bpf/syscall.c | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) commit 4dfe1bb95235c553e216222cf0c377faf191dacd Author: John Fastabend Date: Mon Apr 23 12:11:08 2018 -0700 bpf: sockmap sample use clang flag, -target bpf Per Documentation/bpf/bpf_devel_QA.txt add the -target flag to the sockmap Makefile. Relevant text quoted here, Otherwise, you can use bpf target. Additionally, you _must_ use bpf target when: - Your program uses data structures with pointer or long / unsigned long types that interface with BPF helpers or context data structures. Access into these structures is verified by the BPF verifier and may result in verification failures if the native architecture is not aligned with the BPF architecture, e.g. 64-bit. An example of this is BPF_PROG_TYPE_SK_MSG require '-target bpf' Fixes: 69e8cc134bcb ("bpf: sockmap sample program") Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann samples/sockmap/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 514d6c1959f9b396f1b51850925900adedffb951 Author: John Fastabend Date: Mon Apr 23 12:11:02 2018 -0700 bpf: Document sockmap '-target bpf' requirement for PROG_TYPE_SK_MSG BPF_PROG_TYPE_SK_MSG programs use a 'void *' for both data and the data_end pointers. Additionally, the verifier ensures that every accesses into the values is a __u64 read. This correctly maps on to the BPF 64-bit architecture. However, to ensure that when building on 32bit architectures that clang uses correct types the '-target bpf' option _must_ be specified. To make this clear add a note to the Documentation. Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Documentation/bpf/bpf_devel_QA.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit dc5640f294e4ff6b89047cb4a0dfa931d5f0cd1f Author: Parav Pandit Date: Mon Apr 23 16:58:19 2018 +0300 IB/core: Fix deleting default GIDs when changing mac adddress Before [1], When MAC address of the netdevice is changed, default GID is supposed to get deleted and added back which affects the node and/or port GUID in below sequence. netdevice_event() -> NETDEV_CHANGEADDR default_del_cmd() del_netdev_default_ips() bond_delete_netdev_default_gids() ib_cache_gid_set_default_gid() ib_cache_gid_del() add_cmd() [..] However, ib_cache_gid_del() was not getting invoked in non bonding scenarios because event_ndev and rdma_ndev are same. Therefore, fix such condition to ignore checking upper device when event ndev and rdma_dev are same; similar to bond_set_netdev_default_gids(). Which this fix ib_cache_gid_del() is invoked correctly; however ib_cache_gid_del() doesn't find the default GID for deletion because find_gid() was given default_gid = false with GID_ATTR_FIND_MASK_DEFAULT set. But it was getting overwritten by ib_cache_gid_set_default_gid() later on as part of add_cmd(). Therefore, mac address change used to work for default GID. With refactor series [1], this incorrect behavior is detected. Therefore, when deleting default GID, set default_gid and set MASK flag. when deleting IP based GID, clear default_gid and set MASK flag. [1] https://patchwork.kernel.org/patch/10319151/ Fixes: 238fdf48f2b5 ("IB/core: Add RoCE table bonding support") Fixes: 598ff6bae689 ("IB/core: Refactor GID modify code for RoCE") Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cache.c | 28 +++++++++++++++------------- drivers/infiniband/core/roce_gid_mgmt.c | 26 ++++++++++++++------------ 2 files changed, 29 insertions(+), 25 deletions(-) commit 22c01ee4b8a8c000c490dfc479e175404e64167b Author: Parav Pandit Date: Mon Apr 23 16:58:18 2018 +0300 IB/core: Fix to avoid deleting IPv6 look alike default GIDs When IPv6 link local address is removed, if it matches with the default GID, default GID(s)s gets removed which may not be a desired behavior. This behavior is introduced by refactor work in Fixes tag. When IPv6 link address is removed, removing its equivalent RoCEv2 GID which exactly matches with default RoCEv2 GID, is right thing to do. However achieving it correctly requires lot more changes, likely in roce_gid_mgmt.c and core/cache.c. This should be done as independent patch. Therefore, this patch preserves behavior of not deleteing default GIDs. This is done by providing explicit hint to consider default GID property using mask and default_gid; similar to add_gid(). Fixes: 598ff6bae68 ("IB/core: Refactor GID modify code for RoCE") Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cache.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit a66ed149b0da5b97fa7486ee2bcd00f3f9df5442 Author: Parav Pandit Date: Mon Apr 23 16:58:17 2018 +0300 IB/core: Don't allow default GID addition at non reseved slots Default GIDs are marked reserved at the start of the GID table at index 0 and 1 by gid_table_reserve_default(). Currently when default GID is requested, it can still allocates an empty slot which was not marked as RESERVED for default GID, which is incorrect. At least in current code flow of roce_gid_mgmt.c, in theory we can still request to allocate more than one/two default GIDs depending on how upper devices are setup. Therefore, it is better for cache layer to only allow our reserved slots to be used by default GID allocation requests. Fixes: 598ff6bae689 ("IB/core: Refactor GID modify code for RoCE") Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cache.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 6899b32b5b2dee358936b82b8363b716607a138f Author: Roman Gushchin Date: Mon Apr 23 18:09:21 2018 +0100 bpf: disable and restore preemption in __BPF_PROG_RUN_ARRAY Running bpf programs requires disabled preemption, however at least some* of the BPF_PROG_RUN_ARRAY users do not follow this rule. To fix this bug, and also to make it not happen in the future, let's add explicit preemption disabling/re-enabling to the __BPF_PROG_RUN_ARRAY code. * for example: [ 17.624472] RIP: 0010:__cgroup_bpf_run_filter_sk+0x1c4/0x1d0 ... [ 17.640890] inet6_create+0x3eb/0x520 [ 17.641405] __sock_create+0x242/0x340 [ 17.641939] __sys_socket+0x57/0xe0 [ 17.642370] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 17.642944] SyS_socket+0xa/0x10 [ 17.643357] do_syscall_64+0x79/0x220 [ 17.643879] entry_SYSCALL_64_after_hwframe+0x42/0xb7 Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov Cc: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann include/linux/bpf.h | 2 ++ 1 file changed, 2 insertions(+) commit 77621f024d6be732e43366a42203486b6ec89acd Merge: aa8f877 5a78623 Author: David S. Miller Date: Mon Apr 23 16:22:24 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS fixes for net The following patchset contains Netfilter/IPVS fixes for your net tree, they are: 1) Fix SIP conntrack with phones sending session descriptions for different media types but same port numbers, from Florian Westphal. 2) Fix incorrect rtnl_lock mutex logic from IPVS sync thread, from Julian Anastasov. 3) Skip compat array allocation in ebtables if there is no entries, also from Florian. 4) Do not lose left/right bits when shifting marks from xt_connmark, from Jack Ma. 5) Silence false positive memleak in conntrack extensions, from Cong Wang. 6) Fix CONFIG_NF_REJECT_IPV6=m link problems, from Arnd Bergmann. 7) Cannot kfree rule that is already in list in nf_tables, switch order so this error handling is not required, from Florian Westphal. 8) Release set name in error path, from Florian. 9) include kmemleak.h in nf_conntrack_extend.c, from Stepheh Rothwell. 10) NAT chain and extensions depend on NF_TABLES. 11) Out of bound access when renaming chains, from Taehee Yoo. 12) Incorrect casting in xt_connmark leads to wrong bitshifting. ==================== Signed-off-by: David S. Miller commit 47016b341fc3b3fd4909e058c6fa38f165b53646 Author: Thor Thayer Date: Mon Apr 23 12:45:11 2018 -0500 mtd: spi-nor: cadence-quadspi: Fix page fault kernel panic The current Cadence QSPI driver caused a kernel panic when loading a Root Filesystem from QSPI. The problem was caused by reading more bytes than needed because the QSPI operated on 4 bytes at a time. [ 7.947754] spi_nor_read[1048]:from 0x037cad74, len 1 [bfe07fff] [ 7.956247] cqspi_read[910]:offset 0x58502516, buffer=bfe07fff [ 7.956247] [ 7.966046] Unable to handle kernel paging request at virtual address bfe08002 [ 7.973239] pgd = eebfc000 [ 7.975931] [bfe08002] *pgd=2fffb811, *pte=00000000, *ppte=00000000 Notice above how only 1 byte needed to be read but by reading 4 bytes into the end of a mapped page, an unrecoverable page fault occurred. This patch uses a temporary buffer to hold the 4 bytes read and then copies only the bytes required into the buffer. A min() function is used to limit the length to prevent buffer overflows. Request testing of this patch on other platforms. This was tested on the Intel Arria10 SoCFPGA DevKit. Fixes: 0cf1725676a97fc8 ("mtd: spi-nor: cqspi: Fix build on arches missing readsl/writesl") Signed-off-by: Thor Thayer Cc: Reviewed-by: Marek Vasut Signed-off-by: Boris Brezillon drivers/mtd/spi-nor/cadence-quadspi.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit f18fa5de5ba7f1d6650951502bb96a6e4715a948 Author: Alexander Aring Date: Fri Apr 20 14:54:13 2018 -0400 net: ieee802154: 6lowpan: fix frag reassembly This patch initialize stack variables which are used in frag_lowpan_compare_key to zero. In my case there are padding bytes in the structures ieee802154_addr as well in frag_lowpan_compare_key. Otherwise the key variable contains random bytes. The result is that a compare of two keys by memcmp works incorrect. Fixes: 648700f76b03 ("inet: frags: use rhashtables for reassembly units") Signed-off-by: Alexander Aring Reported-by: Stefan Schmidt Signed-off-by: Stefan Schmidt net/ieee802154/6lowpan/6lowpan_i.h | 4 ++-- net/ieee802154/6lowpan/reassembly.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 7e0ffee1b2e7d26cc2147be0d9d5186823e923f3 Author: Stefan Schmidt Date: Thu Apr 12 14:28:49 2018 +0200 net: ieee802154: mcr20a: do not leak resources on error path We already allocated the device and platform data at this point. Instead of simply return from the probe function we need to cleanup the resources first. Signed-off-by: Stefan Schmidt Acked-by: Xue Liu drivers/net/ieee802154/mcr20a.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f9e628a6645ed4f42a15dfa3c5af45a916a228e4 Author: Jia-Ju Bai Date: Wed Apr 11 10:14:10 2018 +0800 net: ieee802154: atusb: Replace GFP_ATOMIC with GFP_KERNEL in atusb_probe atusb_probe() is never called in atomic context. This function is only set as ".probe" in struct usb_driver. Despite never getting called from atomic context, atusb_probe() calls usb_alloc_urb() with GFP_ATOMIC, which does not sleep for allocation. GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL, which can sleep and improve the possibility of sucessful allocation. This is found by a static analysis tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai Signed-off-by: Stefan Schmidt drivers/net/ieee802154/atusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94912e8df4e5005cb5fa3f3603741eb5e8bf3334 Author: Gustavo A. R. Silva Date: Thu Apr 5 11:20:06 2018 -0500 ieee802154: mcr20a: Fix memory leak in mcr20a_probe Free allocated memory for pdata before return. Addresses-Coverity-ID: 1466096 ("Resource leak") Fixes: 8c6ad9cc5157 ("ieee802154: Add NXP MCR20A IEEE 802.15.4 transceiver driver") Signed-off-by: Gustavo A. R. Silva Acked-by: Xue Liu Signed-off-by: Stefan Schmidt drivers/net/ieee802154/mcr20a.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 71c751f2a43fa03fae3cf5f0067ed3001a397013 Author: Mark Rutland Date: Mon Apr 23 11:41:33 2018 +0100 arm64: add sentinel to kpti_safe_list We're missing a sentinel entry in kpti_safe_list. Thus is_midr_in_range_list() can walk past the end of kpti_safe_list. Depending on the contents of memory, this could erroneously match a CPU's MIDR, cause a data abort, or other bad outcomes. Add the sentinel entry to avoid this. Fixes: be5b299830c63ed7 ("arm64: capabilities: Add support for checks based on a list of MIDRs") Signed-off-by: Mark Rutland Reported-by: Jan Kiszka Tested-by: Jan Kiszka Reviewed-by: Suzuki K Poulose Cc: Catalin Marinas Cc: Suzuki K Poulose Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 1 + 1 file changed, 1 insertion(+) commit aa8f8778493c85fff480cdf8b349b1e1dcb5f243 Author: Eric Dumazet Date: Sun Apr 22 18:29:23 2018 -0700 ipv6: add RTA_TABLE and RTA_PREFSRC to rtm_ipv6_policy KMSAN reported use of uninit-value that I tracked to lack of proper size check on RTA_TABLE attribute. I also believe RTA_PREFSRC lacks a similar check. Fixes: 86872cb57925 ("[IPv6] route: FIB6 configuration using struct fib6_config") Fixes: c3968a857a6b ("ipv6: RTA_PREFSRC support for ipv6 route source address selection") Signed-off-by: Eric Dumazet Reported-by: syzbot Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 2 ++ 1 file changed, 2 insertions(+) commit ddea788c63094f7c483783265563dd5b50052e28 Author: Xin Long Date: Sun Apr 22 19:11:50 2018 +0800 bonding: do not set slave_dev npinfo before slave_enable_netpoll in bond_enslave After Commit 8a8efa22f51b ("bonding: sync netpoll code with bridge"), it would set slave_dev npinfo in slave_enable_netpoll when enslaving a dev if bond->dev->npinfo was set. However now slave_dev npinfo is set with bond->dev->npinfo before calling slave_enable_netpoll. With slave_dev npinfo set, __netpoll_setup called in slave_enable_netpoll will not call slave dev's .ndo_netpoll_setup(). It causes that the lower dev of this slave dev can't set its npinfo. One way to reproduce it: # modprobe bonding # brctl addbr br0 # brctl addif br0 eth1 # ifconfig bond0 192.168.122.1/24 up # ifenslave bond0 eth2 # systemctl restart netconsole # ifenslave bond0 br0 # ifconfig eth2 down # systemctl restart netconsole The netpoll won't really work. This patch is to remove that slave_dev npinfo setting in bond_enslave(). Fixes: 8a8efa22f51b ("bonding: sync netpoll code with bridge") Signed-off-by: Xin Long Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f1919826896c82b6af9c46f69e02f2bc04df4be7 Author: Yan, Zheng Date: Sun Apr 8 09:54:39 2018 +0800 ceph: check if mds create snaprealm when setting quota If mds does not, return -EOPNOTSUPP. Link: http://tracker.ceph.com/issues/23491 Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/xattr.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit d50e14abe2d0024aa527b89c7990147df5d531a5 Author: Jason Gunthorpe Date: Fri Apr 20 09:49:10 2018 -0600 uapi: Fix SPDX tags for files referring to the 'OpenIB.org' license Based on discussion with Kate Stewart this license is not a BSD-2-Clause, but is now formally identified as Linux-OpenIB by SPDX. The key difference between the licenses is in the 'warranty' paragraph. if_infiniband.h refers to the 'OpenIB.org' license, but does not include the text, instead it links to an obsolete web site that contains a license that matches the BSD-2-Clause SPX. There is no 'three clause' version of the OpenIB.org license. Signed-off-by: Jason Gunthorpe Acked-by: David S. Miller Signed-off-by: Doug Ledford include/uapi/linux/if_infiniband.h | 2 +- include/uapi/linux/rds.h | 2 +- include/uapi/linux/tls.h | 2 +- include/uapi/rdma/cxgb3-abi.h | 2 +- include/uapi/rdma/cxgb4-abi.h | 2 +- include/uapi/rdma/hns-abi.h | 2 +- include/uapi/rdma/ib_user_cm.h | 2 +- include/uapi/rdma/ib_user_ioctl_verbs.h | 2 +- include/uapi/rdma/ib_user_mad.h | 2 +- include/uapi/rdma/ib_user_sa.h | 2 +- include/uapi/rdma/ib_user_verbs.h | 2 +- include/uapi/rdma/mlx4-abi.h | 2 +- include/uapi/rdma/mlx5-abi.h | 2 +- include/uapi/rdma/mthca-abi.h | 2 +- include/uapi/rdma/nes-abi.h | 2 +- include/uapi/rdma/qedr-abi.h | 2 +- include/uapi/rdma/rdma_user_cm.h | 2 +- include/uapi/rdma/rdma_user_ioctl.h | 2 +- include/uapi/rdma/rdma_user_rxe.h | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) commit 5d9946c3e5e38e07ab7019db9413a96807a325f2 Author: Thomas Richter Date: Mon Apr 23 16:29:40 2018 +0200 perf record: Fix s390 undefined record__auxtrace_init() return value Command 'perf record' calls: cmd_report() record__auxtrace_init() auxtrace_record__init() On s390 function auxtrace_record__init() returns random return value due to missing initialization. This sometime causes 'perf record' to exit immediately without error message and creating a perf.data file. Fix this by setting error the return code to zero before returning from platform specific functions which may not set the error code in call cases. Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180423142940.21143-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/s390/util/auxtrace.c | 1 + 1 file changed, 1 insertion(+) commit 09abfe7b5b2f442a85f4c4d59ecf582ad76088d7 Author: Roland Dreier Date: Thu Apr 19 08:28:11 2018 -0700 RDMA/ucma: Allow resolving address w/o specifying source address The RDMA CM will select a source device and address by consulting the routing table if no source address is passed into rdma_resolve_address(). Userspace will ask for this by passing an all-zero source address in the RESOLVE_IP command. Unfortunately the new check for non-zero address size rejects this with EINVAL, which breaks valid userspace applications. Fix this by explicitly allowing a zero address family for the source. Fixes: 2975d5de6428 ("RDMA/ucma: Check AF family prior resolving address") Cc: Signed-off-by: Roland Dreier Signed-off-by: Doug Ledford drivers/infiniband/core/ucma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3138a2ef62667b6ac8eb5fb33a9e0b84ec3ab165 Author: Sangwon Hong Date: Sun Apr 22 16:29:06 2018 +0900 perf mem: Document incorrect and missing options Several options were incorrectly described, some lacked describing required arguments while others were simply not documented, fix it. Signed-off-by: Sangwon Hong Acked-by: Jiri Olsa Cc: Namhyung Kim Cc: Taeung Song Link: http://lkml.kernel.org/r/1524382146-19609-1-git-send-email-qpakzk@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-mem.txt | 41 +++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 12 deletions(-) commit e9add8bac6c69edb4bf391e537faa659b2ed70d2 Author: Jiri Olsa Date: Mon Apr 23 11:08:19 2018 +0200 perf evsel: Disable write_backward for leader sampling group events .. and other related fields that do not need to be enabled for events that have sampling leader. It fixes the perf top usage Ingo reported broken: # perf top -e '{cycles,msr/aperf/}:S' The 'msr/aperf/' event is configured for write_back sampling, which is not allowed by the MSR PMU, so it fails to create the event. Adjusting related attr test. Reported-by: Ingo Molnar Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180423090823.32309-6-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/attr/test-record-group-sampling | 3 +++ tools/perf/util/evsel.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 2de841efaeafa9f597e495ffdf5a024079c4bfe7 Author: Takashi Iwai Date: Mon Apr 23 08:59:36 2018 +0200 ALSA: usb-audio: Fix forgotten conversion of control query functions The recent code refactoring made the argument for some helper functions to be the explicit UAC_CS_* and UAC2_CS_* value instead of 0-based offset. However, there was one place left forgotten, and it caused a regression on some devices appearing as the inconsistent mixer setup. This patch corrects the forgotten conversion. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199449 Fixes: 21e9b3e931f7 ("ALSA: usb-audio: fix uac control query argument") Tested-by: Nazar Mokrynskyi Signed-off-by: Takashi Iwai sound/usb/mixer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1ba7862f1f5a7a3b268cf79ac236611546888a90 Author: Takashi Iwai Date: Mon Apr 23 15:01:44 2018 +0200 ALSA: control: Fix missing __user annotation There is one place missing __user annotation to the pointer used by the recent code refactoring. Reported by sparse. Fixes: 450296f305f1 ("ALSA: control: code refactoring TLV ioctl handler") Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a4a931ce847f4aaa12edf11b2e050e18bf45910 Author: Jiri Olsa Date: Mon Apr 23 11:08:18 2018 +0200 perf pmu: Fix pmu events parsing rule Currently all the event parsing fails end up in the event_pmu rule, and display misleading help like: $ perf stat -e inst kill event syntax error: 'inst' \___ Cannot find PMU `inst'. Missing kernel support? ... The reason is that the event_pmu is too strong and match also single string. Changing it to force the '/' separators to be part of the rule, and getting the proper error now: $ perf stat -e inst kill event syntax error: 'inst' \___ parser error Run 'perf list' for a list of valid events ... Signed-off-by: Jiri Olsa Reported-by: Ingo Molnar Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180423090823.32309-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 129193bb0c43d42f1c397c175346e3e0dba5a578 Author: Jiri Olsa Date: Mon Apr 23 11:08:17 2018 +0200 perf stat: Keep the / modifier separator in fallback The 'perf stat' fallback for EACCES error sets the exclude_kernel perf_event_attr and tries perf_event_open() again with it. In addition, it also changes the name of the event to reflect that change by adding the 'u' modifier. But it does not take into account the '/' separator, so the event name can end up mangled, like: (note the '/:' characters) $ perf stat -e cpu/cpu-cycles/ kill ... 386,832 cpu/cpu-cycles/:u Adding the code to check on the '/' separator and set the following correct event name: $ perf stat -e cpu/cpu-cycles/ kill ... 388,548 cpu/cpu-cycles/u Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180423090823.32309-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b31a8cc1a53dda3a33b6c9c62779869d4d5fc142 Author: Thomas Richter Date: Mon Apr 23 10:24:28 2018 +0200 perf test: Adapt test case record+probe_libc_inet_pton.sh for s390 perf test case 58 (record+probe_libc_inet_pton.sh) executed on s390x using kernel 4.16.0rc3 displays this result: # perf trace --no-syscalls -e probe_libc:inet_pton/call-graph=dwarf/ ping -6 -c 1 ::1 probe_libc:inet_pton: (3ffa0240448) __GI___inet_pton (/usr/lib64/libc-2.26.so) gaih_inet (inlined) __GI_getaddrinfo (inlined) main (/usr/bin/ping) __libc_start_main (/usr/lib64/libc-2.26.so) _start (/usr/bin/ping) After I installed kernel 4.16.0 the same tests uses commands: # perf record -e probe_libc:inet_pton/call-graph=dwarf/ -o /tmp/perf.data.abc ping -6 -c 1 ::1 # perf script -i /tmp/perf.data.abc and displays: ping 39048 [006] 84230.381198: probe_libc:inet_pton: (3ffa0240448) 140448 __GI___inet_pton (/usr/lib64/libc-2.26.so) fbde1 gaih_inet (inlined) fe2b9 __GI_getaddrinfo (inlined) 398d main (/usr/bin/ping) Nothing else changed including glibc elfutils and other libraries picked up by the build. The entries for __libc_start_main and _start are missing. I bisected missing __libc_start_main and _start to commit Fixes: 3d20c6246690 ("perf unwind: Unwind with libdw doesn't take symfs into account") When I undo this commit I get this call stack on s390: [root@s35lp76 perf]# ./perf script -i /tmp/perf.data.abc ping 39048 [006] 84230.381198: probe_libc:inet_pton: (3ffa0240448) 140448 __GI___inet_pton (/usr/lib64/libc-2.26.so) fbde1 gaih_inet (inlined) fe2b9 __GI_getaddrinfo (inlined) 398d main (/usr/bin/ping) 22fbd __libc_start_main (/usr/lib64/libc-2.26.so) 457b _start (/usr/bin/ping) Looks like dwarf functions dwfl_xxx create different call back stack trace when using file /usr/lib/debug/usr/bin/ping-20161105-7.fc27.s390x.debug instead of file /usr/bin/ping. Fix this test case on s390 and do not expect any call back stack entry after the main() function. Also be more robust and accept a leading __GI_ prefix in front of getaddrinfo. On x86 this test case shows the same call stack using both kernel versions 4.16.0rc3 and 4.16.0 and also stops at main: [root@f27 perf]# ./perf script -i /tmp/perf.data.tmr ping 4446 [000] 172.027088: probe_libc:inet_pton: (7fdfa08c93c0) 1393c0 __GI___inet_pton (/usr/lib64/libc-2.26.so) fe60d getaddrinfo (/usr/lib64/libc-2.26.so) 2f40 main (/usr/bin/ping) [root@f27 perf]# Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Martin Vuille Link: http://lkml.kernel.org/r/20180423082428.7930-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ce04abfbd3ea545a8eb38a8b6a48fb6e7d139dcb Author: Thomas Richter Date: Mon Apr 23 10:17:45 2018 +0200 perf list: Remove s390 specific strcmp_cpuid_cmp function Make the type field in pmu-events/arch/s390/mapfile.cvs more generic to match the created cpuid string for s390. The pattern also checks for the counter first version number and counter second version number ([13]\.[1-5]) and the authorization field which follows. These numbers do not exist in the cpuid identification string when perf commands are executed on a z/VM environment (which does not support CPU counter measurement facility). CPUID string for LPAR: cpuid : IBM,3906,704,M03,3.5,002f CPUID string for z/VM: cpuid : IBM,2964,702,N96 This allows the removal of s390 specific cpuid compare code and uses the common compare function with its regular expression matching algorithm. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Cc: Heiko Carstens Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180423081745.3672-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/s390/util/header.c | 18 ------------------ tools/perf/pmu-events/arch/s390/mapfile.csv | 10 +++++----- tools/perf/util/pmu.c | 2 +- 3 files changed, 6 insertions(+), 24 deletions(-) commit be75d8f1da08db6c3ccf3bae5597628109a9e7d0 Author: Johan Hovold Date: Mon Apr 23 08:50:00 2018 -0500 USB: musb: dsps: drop duplicate phy initialisation Since commit 39cee200c23e ("usb: musb: core: call init and shutdown for the usb phy") the musb USB phy is initialised by musb_core, but the original initialisation in the dsps-glue init callback was left in place resulting in two calls to phy init during probe (and similarly, two shutdowns on remove). Drop the duplicate phy init and shutdown calls from the dsps glue in favour of the ones in musb core, which other glue drivers rely on. Note however that any generic phy is still initialised in the glue init callback (just as for the other drivers). Cc: Uwe Kleine-König Signed-off-by: Johan Hovold Acked-by: Uwe Kleine-König Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_dsps.c | 2 -- 1 file changed, 2 deletions(-) commit 1f81f118406774ca65f5a4b1a63ee2478ba826ac Author: Johan Hovold Date: Mon Apr 23 08:50:01 2018 -0500 USB: musb: host: prevent core phy initialisation Set the new HCD flag which prevents USB core from trying to manage our phys. This is needed to be able to associate the controller platform device with the glue device device-tree node on the BBB which uses legacy USB phys. Otherwise, the generic phy lookup in usb_phy_roothub_init() and thus HCD registration fails repeatedly with -EPROBE_DEFER (see commit 178a0bce05cb ("usb: core: hcd: integrate the PHY wrapper into the HCD core")). Note that a related phy-lookup issue was recently worked around in the phy core by commit b7563e2796f8 ("phy: work around 'phys' references to usb-nop-xceiv devices"). Something similar may now be needed for other USB phys, and in particular if we eventually want to let USB core manage musb generic phys. Cc: Arnd Bergmann Cc: Martin Blumenstingl Signed-off-by: Johan Hovold Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_host.c | 1 + 1 file changed, 1 insertion(+) commit b00e2fd10429eddf4a181ad30af010e56c2303f9 Author: Ajay Singh Date: Thu Apr 12 13:51:14 2018 +0530 staging: wilc1000: fix NULL pointer exception in host_int_parse_assoc_resp_info() Commit fe014d4e6b55 (staging: wilc1000: free memory allocated for general info message from firmware) introduced a bug by using wrong source address in kmemdup(). 'conn_info.req_ies' is used for source address in kempdup() instead of 'hif_drv->usr_conn_req.ies'. This commit fixes the NULL pointer dereference issue in host_int_parse_assoc_resp_info() by using the correct source address in kmemdup(). Fixes: fe014d4e6b55 (staging: wilc1000: free memory allocated for general info message from firmware) Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee05d21791db6db954bbb7b79bb18d88b5f6b7ff Author: Namhyung Kim Date: Mon Feb 19 19:05:45 2018 +0900 perf machine: Set main kernel end address properly map_groups__fixup_end() was called to set the end addresses of kernel and module maps. But now since machine__create_modules() sets the end address of modules properly, the only remaining piece is the kernel map. We can set it with adjacent module's address directly instead of calling map_groups__fixup_end(). If there's no module after the kernel map, the end address will be ~0ULL. Since it also changes the start address of the kernel map, it needs to re-insert the map to the kmaps in order to keep a correct ordering. Kim reported that it caused problems on ARM64. Reported-by: Kim Phillips Tested-by: Kim Phillips Signed-off-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20180419235915.GA19067@sejong Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 7e5a206ab686f098367b61aca989f5cdfa8114a3 Author: Jann Horn Date: Fri Apr 20 15:57:30 2018 +0200 tcp: don't read out-of-bounds opsize The old code reads the "opsize" variable from out-of-bounds memory (first byte behind the segment) if a broken TCP segment ends directly after an opcode that is neither EOL nor NOP. The result of the read isn't used for anything, so the worst thing that could theoretically happen is a pagefault; and since the physmap is usually mostly contiguous, even that seems pretty unlikely. The following C reproducer triggers the uninitialized read - however, you can't actually see anything happen unless you put something like a pr_warn() in tcp_parse_md5sig_option() to print the opsize. ==================================== #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void systemf(const char *command, ...) { char *full_command; va_list ap; va_start(ap, command); if (vasprintf(&full_command, command, ap) == -1) err(1, "vasprintf"); va_end(ap); printf("systemf: <<<%s>>>\n", full_command); system(full_command); } char *devname; int tun_alloc(char *name) { int fd = open("/dev/net/tun", O_RDWR); if (fd == -1) err(1, "open tun dev"); static struct ifreq req = { .ifr_flags = IFF_TUN|IFF_NO_PI }; strcpy(req.ifr_name, name); if (ioctl(fd, TUNSETIFF, &req)) err(1, "TUNSETIFF"); devname = req.ifr_name; printf("device name: %s\n", devname); return fd; } #define IPADDR(a,b,c,d) (((a)<<0)+((b)<<8)+((c)<<16)+((d)<<24)) void sum_accumulate(unsigned int *sum, void *data, int len) { assert((len&2)==0); for (int i=0; i> 16) + (sum & 0xffff); sum = (sum >> 16) + (sum & 0xffff); return htons(~sum); } void fix_ip_sum(struct iphdr *ip) { unsigned int sum = 0; sum_accumulate(&sum, ip, sizeof(*ip)); ip->check = sum_final(sum); } void fix_tcp_sum(struct iphdr *ip, struct tcphdr *tcp) { unsigned int sum = 0; struct { unsigned int saddr; unsigned int daddr; unsigned char pad; unsigned char proto_num; unsigned short tcp_len; } fakehdr = { .saddr = ip->saddr, .daddr = ip->daddr, .proto_num = ip->protocol, .tcp_len = htons(ntohs(ip->tot_len) - ip->ihl*4) }; sum_accumulate(&sum, &fakehdr, sizeof(fakehdr)); sum_accumulate(&sum, tcp, tcp->doff*4); tcp->check = sum_final(sum); } int main(void) { int tun_fd = tun_alloc("inject_dev%d"); systemf("ip link set %s up", devname); systemf("ip addr add 192.168.42.1/24 dev %s", devname); struct { struct iphdr ip; struct tcphdr tcp; unsigned char tcp_opts[20]; } __attribute__((packed)) syn_packet = { .ip = { .ihl = sizeof(struct iphdr)/4, .version = 4, .tot_len = htons(sizeof(syn_packet)), .ttl = 30, .protocol = IPPROTO_TCP, /* FIXUP check */ .saddr = IPADDR(192,168,42,2), .daddr = IPADDR(192,168,42,1) }, .tcp = { .source = htons(1), .dest = htons(1337), .seq = 0x12345678, .doff = (sizeof(syn_packet.tcp)+sizeof(syn_packet.tcp_opts))/4, .syn = 1, .window = htons(64), .check = 0 /*FIXUP*/ }, .tcp_opts = { /* INVALID: trailing MD5SIG opcode after NOPs */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19 } }; fix_ip_sum(&syn_packet.ip); fix_tcp_sum(&syn_packet.ip, &syn_packet.tcp); while (1) { int write_res = write(tun_fd, &syn_packet, sizeof(syn_packet)); if (write_res != sizeof(syn_packet)) err(1, "packet write failed"); } } ==================================== Fixes: cfb6eeb4c860 ("[TCP]: MD5 Signature Option (RFC2385) support.") Signed-off-by: Jann Horn Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit dbac00f0cf634120d77edee10d25e3f6899d7636 Author: Guenter Roeck Date: Sun Apr 22 18:16:54 2018 -0700 hwmon: (nct6683) Enable EC access if disabled at boot On Asrock Z370M Pro4, it was observed that EC access was disabled after initially booting the system. As a result, the driver failed to load with nct6683: EC is disabled After a suspend/resume cycle, the driver loaded correctly. nct6683: Found NCT6683D or compatible chip at 0x2e:0xa20 nct6683 nct6683.2592: NCT6683D EC firmware version 1.0 build 07/18/16 Enable EC access after identifying the chip if disabled to fix the problem. Warn the user that the data it reports may be unusable, similar to other drivers for chips from Nuvoton. Fixes: 41082d66bfd6f ("hwmon: Driver for NCT6683D") Reported-by: Jonathan Sims Tested-by: Jonathan Sims Signed-off-by: Guenter Roeck drivers/hwmon/nct6683.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 60695be2bb6b0623f8e53bd9949d582a83c6d44a Author: Jacopo Mondi Date: Fri Apr 13 19:25:37 2018 +0200 dma-mapping: postpone cpu addr translation on mmap Postpone calling virt_to_page() translation on memory locations not guaranteed to be backed by a struct page. Try first to map memory from the device coherent memory pool, then perform translation if that fails. On some architectures, specifically SH when configured with the SPARSEMEM memory model, assuming a struct page is always assigned to a memory address lead to unexpected hangs during the virtual to page address translation. This patch fixes that specific issue but applies in the general case too. Suggested-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Reviewed-by: Robin Murphy Signed-off-by: Christoph Hellwig drivers/base/dma-mapping.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 41d0bbc749471522714efd0649b7e033fefcbfb4 Author: Robin Murphy Date: Mon Apr 9 18:59:14 2018 +0100 dma-coherent: clarify dma_mmap_from_dev_coherent documentation The use of "correctly mapped" here is misleading, since it can give the wrong expectation in the case that the memory *should* have been mapped from the per-device pool, but doing so failed for other reasons. Signed-off-by: Robin Murphy Signed-off-by: Christoph Hellwig drivers/base/dma-coherent.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 504a918e6714b551b7b39940dbab32610fafa1fe Author: Takashi Iwai Date: Sun Apr 15 11:08:07 2018 +0200 dma-direct: don't retry allocation for no-op GFP_DMA When an allocation with lower dma_coherent mask fails, dma_direct_alloc() retries the allocation with GFP_DMA. But, this is useless for architectures that hav no ZONE_DMA. Fix it by adding the check of CONFIG_ZONE_DMA before retrying the allocation. Fixes: 95f183916d4b ("dma-direct: retry allocations using GFP_DMA for small masks") Signed-off-by: Takashi Iwai Signed-off-by: Christoph Hellwig lib/dma-direct.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 19972dd568f8d1e701f8051fcff56562e0551f63 Author: Hans de Goede Date: Wed Apr 18 15:24:50 2018 +0200 virt: vbox: Log an error when we fail to get the host version This was the only error path during probe without a message being logged about what went wrong, this fixes this. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/virt/vboxguest/vboxguest_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit faf6a2a44164c0fb2c2a82692ab9051917514bce Author: Hans de Goede Date: Wed Apr 18 15:24:49 2018 +0200 virt: vbox: Use __get_free_pages instead of kmalloc for DMA32 memory It is not possible to get DMA32 zone memory through kmalloc, causing the vboxguest driver to malfunction due to getting memory above 4G which the PCI device cannot handle. This commit changes the kmalloc calls where the 4G limit matters to using __get_free_pages() fixing vboxguest not working on x86_64 guests with more then 4G RAM. Cc: stable@vger.kernel.org Reported-by: Eloy Coto Pereiro Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/virt/vboxguest/vboxguest_linux.c | 19 ++++++++++++++++--- drivers/virt/vboxguest/vboxguest_utils.c | 5 +++-- 2 files changed, 19 insertions(+), 5 deletions(-) commit f6f9885b0531163f72c7bf898a0ab1ba4c7d5de6 Author: Hans de Goede Date: Wed Apr 18 15:24:48 2018 +0200 virt: vbox: Add vbg_req_free() helper function This is a preparation patch for fixing issues on x86_64 virtual-machines with more then 4G of RAM, atm we pass __GFP_DMA32 to kmalloc, but kmalloc does not honor that, so we need to switch to get_pages, which means we will not be able to use kfree to free memory allocated with vbg_alloc_req. While at it also remove a comment on a vbg_alloc_req call which talks about Windows (inherited from the vbox upstream cross-platform code). Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/virt/vboxguest/vboxguest_core.c | 66 +++++++++++++++++--------------- drivers/virt/vboxguest/vboxguest_core.h | 1 + drivers/virt/vboxguest/vboxguest_utils.c | 14 +++++-- 3 files changed, 47 insertions(+), 34 deletions(-) commit 02cfde67df1f440c7c3c7038cc97992afb81804f Author: Hans de Goede Date: Wed Apr 18 15:24:47 2018 +0200 virt: vbox: Move declarations of vboxguest private functions to private header Move the declarations of functions from vboxguest_utils.c which are only meant for vboxguest internal use from include/linux/vbox_utils.h to drivers/virt/vboxguest/vboxguest_core.h. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/virt/vboxguest/vboxguest_core.h | 8 ++++++++ include/linux/vbox_utils.h | 23 ----------------------- 2 files changed, 8 insertions(+), 23 deletions(-) commit e33bbe69149b802c0c77bfb822685772f85388ca Author: Geert Uytterhoeven Date: Sun Apr 8 11:02:34 2018 +0200 slimbus: Fix out-of-bounds access in slim_slicesize() With gcc-4.1.2: slimbus/messaging.c: In function ‘slim_slicesize’: slimbus/messaging.c:186: warning: statement with no effect Indeed, clamp() is a macro not operating in-place, but returning the clamped value. Hence the value is not clamped at all, which may lead to an out-of-bounds access. Fix this by assigning the clamped value. Fixes: afbdcc7c384b0d44 ("slimbus: Add messaging APIs to slimbus framework") Signed-off-by: Geert Uytterhoeven Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/slimbus/messaging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4aa403b775fc027ee86d9a090a4c5c3ee9063089 Author: Daniel Vetter Date: Wed Apr 4 12:30:37 2018 +0200 MAINTAINERS: add dri-devel&linaro-mm for Android ION Most of the other cross-driver gfx infrastructure (dma_buf, dma_fence) also gets cross posted to all the relevant gfx/memory lists. Doing the same for ION means people won't miss relevant patches. Cc: Sumit Semwal Signed-off-by: Daniel Vetter Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 881c93c0fb73328845898344208fa0bf0d62cac6 Author: Anatolij Gustschin Date: Sun Apr 15 11:33:08 2018 -0700 fpga-manager: altera-ps-spi: preserve nCONFIG state If the driver module is loaded when FPGA is configured, the FPGA is reset because nconfig is pulled low (low-active gpio inited with GPIOD_OUT_HIGH activates the signal which means setting its value to low). Init nconfig with GPIOD_OUT_LOW to prevent this. Signed-off-by: Anatolij Gustschin Acked-by: Alan Tull Signed-off-by: Moritz Fischer Cc: stable # 4.14+ Signed-off-by: Greg Kroah-Hartman drivers/fpga/altera-ps-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e65de1b61302c8ddb7e126d07ef3b893d038839b Author: Bernat, Yehezkel Date: Thu Apr 19 14:02:30 2018 +0300 MAINTAINERS: update my email address Soon I'll not be available by my Intel email address, so switching to my personal email address instead. Signed-off-by: Yehezkel Bernat Signed-off-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3e14c6abbfb5c94506edda9d8e2c145d79375798 Author: Dmitry Vyukov Date: Wed Apr 11 17:22:43 2018 +0200 kobject: don't use WARN for registration failures This WARNING proved to be noisy. The function still returns an error and callers should handle it. That's how most of kernel code works. Downgrade the WARNING to pr_err() and leave WARNINGs for kernel bugs. Signed-off-by: Dmitry Vyukov Reported-by: syzbot+209c0f67f99fec8eb14b@syzkaller.appspotmail.com Reported-by: syzbot+7fb6d9525a4528104e05@syzkaller.appspotmail.com Reported-by: syzbot+2e63711063e2d8f9ea27@syzkaller.appspotmail.com Reported-by: syzbot+de73361ee4971b6e6f75@syzkaller.appspotmail.com Cc: stable Signed-off-by: Greg Kroah-Hartman lib/kobject.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit df9267f1fb6b56fa573cc93c611009b0bd126878 Author: Hans de Goede Date: Sun Apr 8 18:06:21 2018 +0200 firmware: Fix firmware documentation for recent file renames firmware_class.c was split into several files under drivers/base/firmware_loader. The new main.c has the functions which /request_firmware.rst references. Acked-by: Luis R. Rodriguez Signed-off-by: Hans de Goede Tested-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/firmware/request_firmware.rst | 10 +++++----- Documentation/driver-api/infrastructure.rst | 2 +- Documentation/power/suspend-and-cpuhotplug.txt | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit e538409257d0217a9bc715686100a5328db75a15 Author: Ben Hutchings Date: Wed Apr 4 22:38:49 2018 +0200 test_firmware: fix setting old custom fw path back on exit, second try Commit 65c79230576 tried to clear the custom firmware path on exit by writing a single space to the firmware_class.path parameter. This doesn't work because nothing strips this space from the value stored and fw_get_filesystem_firmware() only ignores zero-length paths. Instead, write a null byte. Fixes: 0a8adf58475 ("test: add firmware_class loader test") Fixes: 65c79230576 ("test_firmware: fix setting old custom fw path back on exit") Signed-off-by: Ben Hutchings Acked-by: Luis R. Rodriguez Cc: stable Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/firmware/fw_lib.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 1ecb160199c3c289c660bdb852a9269e243009a8 Author: Ben Hutchings Date: Wed Apr 4 22:37:13 2018 +0200 test_firmware: Install all scripts List all the scripts invoked by fw_run_tests.sh, so that "make TARGETS=firmware install" keeps working. Fixes: 29a1c00ce1df8 ("test_firmware: add simple firmware firmware test ...") Fixes: b3cf21fae1fe0 ("test_firmware: test three firmware kernel configs ...") Signed-off-by: Ben Hutchings Acked-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/firmware/Makefile | 1 + 1 file changed, 1 insertion(+) commit ce3d1536acabbdcdc3c945c3c078dd4ed1b8edfa Author: Stephen Hemminger Date: Mon Apr 16 11:19:27 2018 -0700 uio_hv_generic: fix subchannel ring mmap The fault method of handling subchannel ring, did not work correctly (it only worked for the first page). Since ring buffer is physically contiguous, using the vm helper function is simpler and handles more cases. Fixes: 37b96a4931db ("uio_hv_generic: support sub-channels") Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman drivers/uio/uio_hv_generic.c | 49 ++++++++------------------------------------ 1 file changed, 9 insertions(+), 40 deletions(-) commit 135db384a2efde3718fd551e3968e97fcb400c84 Author: Stephen Hemminger Date: Mon Apr 16 11:19:26 2018 -0700 uio_hv_generic: use correct channel in isr Need to mask the correct sub-channel in the callback from VMBUS isr. Otherwise, can get in to infinite interrupt storm. Fixes: 37b96a4931db ("uio_hv_generic: support sub-channels") Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman drivers/uio/uio_hv_generic.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 9ab877a6ccf820483d79602bede0c1aa1da4d26a Author: Stephen Hemminger Date: Mon Apr 16 11:19:25 2018 -0700 uio_hv_generic: make ring buffer attribute for primary channel The primary channel also needs a ring buffer attribute. This allows application to check if kernel supports uio sub channels, and also makes all channels use consistent API. Fixes: 37b96a4931db ("uio_hv_generic: support sub-channels") Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman drivers/uio/uio_hv_generic.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6e3d66b80f670fdc64b9a120362a9f94b0494621 Author: Stephen Hemminger Date: Mon Apr 16 11:19:24 2018 -0700 uio_hv_generic: set size of ring buffer attribute The original code had ring size as a module parameter, but then it was made a fixed value. The code to set the size of the ring buffer binary file was lost in the transistion. The size is needed by user mode driver to know the size of the ring buffer. Fixes: 37b96a4931db ("uio_hv_generic: support sub-channels") Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman drivers/uio/uio_hv_generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit edb0c3affe5214a21d71ffb82ca92ed068e828df Author: Laurent Pinchart Date: Fri Apr 20 14:57:54 2018 +0300 ARM: dts: r8a7793: Convert to new LVDS DT bindings The internal LVDS encoder now has DT bindings separate from the DU. Port the device tree over to the new model. Fixes: c6a27fa41fab ("drm: rcar-du: Convert LVDS encoder code to bridge driver") Fixes: bff8f8c2feb7 ("ARM: dts: r8a7793: add soc node") Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7793-gose.dts | 10 +++++++--- arch/arm/boot/dts/r8a7793.dtsi | 37 +++++++++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 9 deletions(-) commit e5c3f4707f3956a2f34b8c16daad07a16873c498 Author: Laurent Pinchart Date: Fri Apr 20 14:57:53 2018 +0300 ARM: dts: r8a7791: Convert to new LVDS DT bindings The internal LVDS encoder now has DT bindings separate from the DU. Port the device tree over to the new model. Fixes: c6a27fa41fab ("drm: rcar-du: Convert LVDS encoder code to bridge driver") Fixes: bb21803ea440 ("ARM: dts: r8a7791: add soc node") Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791-koelsch.dts | 12 +++++++++--- arch/arm/boot/dts/r8a7791-porter.dts | 16 +++++++++++++--- arch/arm/boot/dts/r8a7791.dtsi | 36 +++++++++++++++++++++++++++++------ 3 files changed, 52 insertions(+), 12 deletions(-) commit 15a1ff30d8f9bd83273d8712973b88663ad16265 Author: Laurent Pinchart Date: Fri Apr 20 14:57:52 2018 +0300 ARM: dts: r8a7790: Convert to new LVDS DT bindings The internal LVDS encoder now has DT bindings separate from the DU. Port the device tree over to the new model. Fixes: c6a27fa41fab ("drm: rcar-du: Convert LVDS encoder code to bridge driver") Fixes: 4bdb7aa7dcd0 ("ARM: dts: r8a7790: add soc node") Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790-lager.dts | 22 ++++++++++--- arch/arm/boot/dts/r8a7790.dtsi | 65 ++++++++++++++++++++++++++++++++----- 2 files changed, 74 insertions(+), 13 deletions(-) commit 7aa135fcf26377f92dc0680a57566b4c7f3e281b Author: Martijn Coenen Date: Wed Mar 28 11:14:50 2018 +0200 ANDROID: binder: prevent transactions into own process. This can't happen with normal nodes (because you can't get a ref to a node you own), but it could happen with the context manager; to make the behavior consistent with regular nodes, reject transactions into the context manager by the process owning it. Reported-by: syzbot+09e05aba06723a94d43d@syzkaller.appspotmail.com Signed-off-by: Martijn Coenen Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ac315c621f01d4b8a53dec317c7ae322fd26ff38 Author: Imre Deak Date: Thu Apr 19 18:51:09 2018 +0300 drm/i915: Enable display WA#1183 from its correct spot The DMC FW specific part of display WA#1183 is supposed to be enabled whenever enabling DC5 or DC6, so move it to the DC6 enable function from the DC6 disable function. I noticed this after Daniel's patch to remove the unused skl_disable_dc6() function. Fixes: 53421c2fe99c ("drm/i915: Apply Display WA #1183 on skl, kbl, and cfl") Cc: Lucas De Marchi Cc: Rodrigo Vivi Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180419155109.29451-1-imre.deak@intel.com (cherry picked from commit b49be6622f08187129561cff0409f7b06b33de57) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_runtime_pm.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 904e1b1ff4c70044334f395aa751c8e73fb42714 Author: Abhay Kumar Date: Wed Apr 18 13:37:07 2018 +0300 drm/i915/audio: set minimum CD clock to twice the BCLK In GLK when the device boots with only 1366x768 panel without audio, HDA codec doesn't come up. In this case, the CDCLK is less than twice the BCLK. Even though audio isn't being enabled, having a too low CDCLK leads to audio probe failing altogether. Require CDCLK to be at least twice the BLCK regardless of audio. This is a minimal fix to improve things. Unfortunately, this a) leads to too high CDCLK being used when audio is not used, and b) is still not enough to fix audio probe when no outputs are connected at probe time. The proper fix would be to increase CDCLK dynamically from the audio component hooks. v2: - Address comment (Jani) - New design approach v3: - Typo fix on top of v1 v4 by Jani: rewrite commit message, add comment in code Cc: stable@vger.kernel.org Cc: Ville Syrjälä Cc: Dhinakaran Pandiyan Cc: Wenkai Du Reviewed-by: Wenkai Du Tested-by: Wenkai Du Acked-by: Ville Syrjälä Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102937 Signed-off-by: Abhay Kumar Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180418103707.14645-1-jani.nikula@intel.com (cherry picked from commit 2a5b95b448485e143ec3e004eabe53b31db78eb3) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_cdclk.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 66dd99c2033684169f04068f66c7f83f7da229b8 Author: Michal Simek Date: Mon Apr 23 10:55:21 2018 +0200 tty: serial: xuartps: Setup early console when uartclk is also passed Baudrate calculation depends on requested baudrate and uart clock. This patch is checking that uartclk is also passed. The same logic is used 8250_early.c/init_port function. Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 903f9db10f18f735e62ba447147b6c434b6af003 Author: Tetsuo Handa Date: Thu Apr 5 19:40:16 2018 +0900 tty: Don't call panic() at tty_ldisc_init() syzbot is reporting kernel panic [1] triggered by memory allocation failure at tty_ldisc_get() from tty_ldisc_init(). But since both tty_ldisc_get() and caller of tty_ldisc_init() can cleanly handle errors, tty_ldisc_init() does not need to call panic() when tty_ldisc_get() failed. [1] https://syzkaller.appspot.com/bug?id=883431818e036ae6a9981156a64b821110f39187 Signed-off-by: Tetsuo Handa Reported-by: syzbot Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 5 ++++- drivers/tty/tty_ldisc.c | 5 +++-- include/linux/tty.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) commit 598c2d41ff44889dd8eced4f117403e472158d85 Author: Tetsuo Handa Date: Mon Apr 16 20:06:34 2018 +0900 tty: Avoid possible error pointer dereference at tty_ldisc_restore(). syzbot is reporting crashes [1] triggered by memory allocation failure at tty_ldisc_get() from tty_ldisc_restore(). While syzbot stops at WARN_ON() due to panic_on_warn == true, panic_on_warn == false will after all trigger an OOPS by dereferencing old->ops->num if IS_ERR(old) == true. We can simplify tty_ldisc_restore() as three calls (old->ops->num, N_TTY, N_NULL) to tty_ldisc_failto() in addition to avoiding possible error pointer dereference. If someone reports kernel panic triggered by forcing all memory allocations for tty_ldisc_restore() to fail, we can consider adding __GFP_NOFAIL for tty_ldisc_restore() case. [1] https://syzkaller.appspot.com/bug?id=6ac359c61e71d22e06db7f8f88243feb11d927e7 Reported-by: syzbot+40b7287c2dc987c48c81@syzkaller.appspotmail.com Signed-off-by: Tetsuo Handa Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Dmitry Vyukov Cc: Johannes Weiner Cc: Alan Cox Cc: Christoph Hellwig Cc: Michal Hocko Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_ldisc.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 17a16542b88e753cc3bd54cf30b74df3d547421e Author: Geert Uytterhoeven Date: Mon Apr 23 09:35:16 2018 +0200 dt-bindings: mvebu-uart: DT fix s/interrupts-names/interrupt-names/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/mvebu-uart.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 066cd1c4e4b9b43116f2bf0f4a84ac7235e7abec Author: Karthikeyan Ramasubramanian Date: Fri Apr 6 18:49:00 2018 -0600 tty: serial: qcom_geni_serial: Use signed variable to get IRQ The platform_get_irq can return error. Assigning the return value to an unsigned variable and checking it for negative value will always return false. Use an intermediate signed variable to get IRQ information, check for any error and then assign it to 'irq' variable inside uart_port structure. Signed-off-by: Karthikeyan Ramasubramanian Reported-by: Dan Carpenter Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/qcom_geni_serial.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 7010adcdd23527f7efef1e7bc0d8c458f6ec0dd2 Author: Thomas Gleixner Date: Mon Apr 23 00:02:09 2018 +0200 x86/jailhouse: Fix incorrect SPDX identifier GPL2.0 is not a valid SPDX identiier. Replace it with GPL-2.0. Fixes: 4a362601baa6 ("x86/jailhouse: Add infrastructure for running in non-root cell") Signed-off-by: Thomas Gleixner Acked-by: Jan Kiszka Cc: Kate Stewart Cc: Jonathan Corbet Cc: Greg Kroah-Hartman Cc: Philippe Ombredanne Link: https://lkml.kernel.org/r/20180422220832.815346488@linutronix.de arch/x86/include/asm/jailhouse_para.h | 2 +- arch/x86/kernel/jailhouse.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit dd709e72cb934eefd44de8d9969097173fbf45dc Author: Daniel Kurtz Date: Fri Apr 6 17:21:53 2018 -0600 earlycon: Use a pointer table to fix __earlycon_table stride Commit 99492c39f39f ("earlycon: Fix __earlycon_table stride") tried to fix __earlycon_table stride by forcing the earlycon_id struct alignment to 32 and asking the linker to 32-byte align the __earlycon_table symbol. This fix was based on commit 07fca0e57fca92 ("tracing: Properly align linker defined symbols") which tried a similar fix for the tracing subsystem. However, this fix doesn't quite work because there is no guarantee that gcc will place structures packed into an array format. In fact, gcc 4.9 chooses to 64-byte align these structs by inserting additional padding between the entries because it has no clue that they are supposed to be in an array. If we are unlucky, the linker will assign symbol "__earlycon_table" to a 32-byte aligned address which does not correspond to the 64-byte aligned contents of section "__earlycon_table". To address this same problem, the fix to the tracing system was subsequently re-implemented using a more robust table of pointers approach by commits: 3d56e331b653 ("tracing: Replace syscall_meta_data struct array with pointer array") 654986462939 ("tracepoints: Fix section alignment using pointer array") e4a9ea5ee7c8 ("tracing: Replace trace_event struct array with pointer array") Let's use this same "array of pointers to structs" approach for EARLYCON_TABLE. Fixes: 99492c39f39f ("earlycon: Fix __earlycon_table stride") Signed-off-by: Daniel Kurtz Suggested-by: Aaron Durbin Reviewed-by: Rob Herring Tested-by: Guenter Roeck Reviewed-by: Guenter Roeck Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/of/fdt.c | 7 +++++-- drivers/tty/serial/earlycon.c | 6 ++++-- include/asm-generic/vmlinux.lds.h | 2 +- include/linux/serial_core.h | 21 ++++++++++++++------- 4 files changed, 24 insertions(+), 12 deletions(-) commit ef9604b622ce3b77e0ec6b566a016ddd64c5deb0 Author: Biju Das Date: Mon Apr 9 13:20:00 2018 +0100 serial: sh-sci: Document r8a77470 bindings RZ/G1C (R8A77470) SoC also has the R-Car gen2 compatible SCIF and HSCIF ports, so document the SoC specific bindings. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 2 ++ 1 file changed, 2 insertions(+) commit 34df2466b48dfe258e14fe2a7bc4641416575ade Author: Geert Uytterhoeven Date: Mon Apr 23 09:32:40 2018 +0200 dt-bindings: meson-uart: DT fix s/clocks-names/clock-names/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/amlogic,meson-uart.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0aa821d846c0590ad64a00af95a3dcc29263d70f Author: Stefan Agner Date: Fri Apr 20 14:44:07 2018 +0200 serial: imx: fix cached UCR2 read on software reset To reset the UART the SRST needs be cleared (low active). According to the documentation the bit will remain active for 4 module clocks until it is cleared (set to 1). Hence the real register need to be read in case the cached register indicates that the SRST bit is zero. This bug lead to wrong baudrate because the baud rate register got restored before reset completed in imx_flush_buffer. Fixes: 3a0ab62f43de ("serial: imx: implement shadow registers for UCRx and UFCR") Signed-off-by: Stefan Agner Reviewed-by: Fabio Estevam Reviewed-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d215f83e5fccb3dd023e97fef1bd0029bfedde9 Author: Stefan Agner Date: Thu Apr 19 17:39:16 2018 +0200 serial: imx: warn user when using unsupported configuration When using half-duplex mode (which disables receiver during txing) the RTS signal cannot be driven low during transmission when using i.MX UART RTS/CTS control. This seems to be a limitation of the i.MX UART IP: The RTS (CTS_B) signal is controlled by the receiver. When the receiver is disabled, the signal stays in UART logic idle state which is high... If SER_RS485_RTS_ON_SEND is used, RTS needs to be high active during transmission. Since this is the default state of the RTS (CTS_B) signal when the receiver is off, half-duplex mode in this configuration works fine. However, a low-active RTS signal (flag SER_RS485_RTS_ON_SEND not set) cannot be generated when the receiver is turned off. Print an error if the user selects this unsupported configuration (both SER_RS485_RTS_ON_SEND and SER_RS485_RX_DURING_TX unset) and configure the closest working configuration (set the SER_RS485_RX_DURING_TX flag). Signed-off-by: Stefan Agner Acked-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 350f76dc063934215a877ef582206763c8a80395 Author: Martin Blumenstingl Date: Wed Apr 18 21:39:51 2018 +0200 usb: core: phy: add the SPDX-License-Identifier and include guard This clarifies the license of the code. While here also add an include guard to the header file. Fixes: 07dbff0ddbd86c ("usb: core: add a wrapper for the USB PHYs on the HCD") Suggested-by: Masahiro Yamada Signed-off-by: Martin Blumenstingl Signed-off-by: Greg Kroah-Hartman drivers/usb/core/phy.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 590b0c0cfc6162aeebbf43eaafb9753b56df1532 Author: Pascal Roeleven Date: Fri Apr 20 12:21:12 2018 +0200 ARM: dts: sun4i: Fix incorrect clocks for displays Some displays on sun4i devices wouldn't properly stay on unless 'clk_ignore_unused' is used. Change the duplicate clocks to the probably intended ones. Cc: Signed-off-by: Pascal Roeleven Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ae860a19f37c686e7c5816e96640168b7174a096 Author: Mika Westerberg Date: Fri Apr 20 15:22:02 2018 +0300 PCI / PM: Do not clear state_saved in pci_pm_freeze() when smart suspend is set If a driver uses DPM_FLAG_SMART_SUSPEND and the device is already runtime suspended when hibernate is started PCI core skips runtime resuming the device but still clears pci_dev->state_saved. After the hibernation image is written pci_pm_thaw_noirq() makes sure subsequent thaw phases for the device are also skipped leaving it runtime suspended with pci_dev->state_saved == false. When the device is eventually runtime resumed pci_pm_runtime_resume() restores config space by calling pci_restore_standard_config(), however because pci_dev->state_saved == false pci_restore_state() never actually restores the config space leaving the device in a state that is not what the driver might expect. For example here is what happens for intel-lpss I2C devices once the hibernation snapshot is taken: intel-lpss 0000:00:15.0: power state changed by ACPI to D0 intel-lpss 0000:00:1e.0: power state changed by ACPI to D3cold video LNXVIDEO:00: Restoring backlight state PM: hibernation exit i2c_designware i2c_designware.1: Unknown Synopsys component type: 0xffffffff i2c_designware i2c_designware.0: Unknown Synopsys component type: 0xffffffff i2c_designware i2c_designware.1: timeout in disabling adapter i2c_designware i2c_designware.0: timeout in disabling adapter Since PCI config space is not restored the device is still in D3hot making MMIO register reads return 0xffffffff. Fix this by clearing pci_dev->state_saved only if we actually end up runtime resuming the device. Fixes: c4b65157aeef (PCI / PM: Take SMART_SUSPEND driver flag into account) Signed-off-by: Mika Westerberg Cc: 4.15+ # 4.15+ Signed-off-by: Rafael J. Wysocki drivers/pci/pci-driver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cc6a0e315a68e5db85bea347b0c5b0fe4a9a5904 Author: Mika Westerberg Date: Thu Apr 19 13:08:37 2018 +0300 ACPI / scan: Initialize watchdog before PNP At least on one Dell system the PNP motherboard resources device includes resources used by WDAT table. Since PNP gets initialized before WDAT it results following error and no watchdog: platform wdat_wdt: failed to claim resource 3: [io 0x046a-0x046c] ACPI: watchdog: Device creation failed: -16 Now, the PNP system driver is already accustomed with the situation that it cannot reserve all those motherboard resources because drivers using those might have reserved them already. In addition putting WDAT table resources under motherboard resources device makes sense in general. Fix this by initializing WDAT right before PNP. This allows WDAT to reserve all its resources and still keeps PNP system driver happy. Reported-by: Shubhrata.Priyadarsh@dell.com Reported-by: Takashi Iwai Signed-off-by: Mika Westerberg Acked-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/acpi/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 855c1c2fce8bdbd796cba1d1456ca8f0e876c2f1 Author: Chen Yu Date: Tue Apr 10 23:07:51 2018 +0800 ACPI / PM: Blacklist Low Power S0 Idle _DSM for ThinkPad X1 Tablet(2016) ThinkPad X1 Tablet(2016) is reported to have issues with the Low Power S0 Idle _DSM interface and since this machine model generally can do ACPI S3 just fine, and user would like to use S3 as default sleep model, add a blacklist entry to disable that interface for ThinkPad X1 Tablet(2016). Link: https://bugzilla.kernel.org/show_bug.cgi?id=199057 Reported-and-tested-by: Robin Lee Signed-off-by: Chen Yu Signed-off-by: Rafael J. Wysocki drivers/acpi/sleep.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit f853dcaae2f5bbe021161e421bd1576845bae8f6 Author: David Henningsson Date: Sat Apr 21 14:57:40 2018 +0200 ALSA: core: Report audio_tstamp in snd_pcm_sync_ptr It looks like a simple mistake that this struct member was forgotten. Audio_tstamp isn't used much, and on some archs (such as x86) this ioctl is not used by default, so that might be the reason why this has slipped for so long. Fixes: 4eeaaeaea1ce ("ALSA: core: add hooks for audio timestamps") Signed-off-by: David Henningsson Reviewed-by: Takashi Sakamoto Cc: # v3.8+ Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 1 + 1 file changed, 1 insertion(+) commit 912e4c332037e7ed063c164985c36fb2b549ea3a Author: Jeffery Miller Date: Fri Apr 20 23:20:46 2018 -0500 ALSA: pcm: Return negative delays from SNDRV_PCM_IOCTL_DELAY. The commit c2c86a97175f ("ALSA: pcm: Remove set_fs() in PCM core code") changed SNDRV_PCM_IOCTL_DELAY to return an inconsistent error instead of a negative delay. Originally the call would succeed and return the negative delay. The Chromium OS Audio Server (CRAS) gets confused and hangs when the error is returned instead of the negative delay. Help CRAS avoid the issue by rolling back the behavior to return a negative delay instead of an error. Fixes: c2c86a97175f ("ALSA: pcm: Remove set_fs() in PCM core code") Signed-off-by: Jeffery Miller Cc: # v4.13+ Signed-off-by: Takashi Iwai sound/core/pcm_compat.c | 7 ++++--- sound/core/pcm_native.c | 23 +++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) commit 6cf09958f32b9667bb3ebadf74367c791112771b Author: Martin Schwidefsky Date: Fri Apr 20 12:48:52 2018 +0200 s390: correct module section names for expoline code revert The main linker script vmlinux.lds.S for the kernel image merges the expoline code patch tables into two section ".nospec_call_table" and ".nospec_return_table". This is *not* done for the modules, there the sections retain their original names as generated by gcc: ".s390_indirect_call", ".s390_return_mem" and ".s390_return_reg". The module_finalize code has to check for the compiler generated section names, otherwise no code patching is done. This slows down the module code in case of "spectre_v2=off". Cc: stable@vger.kernel.org # 4.16 Fixes: f19fbd5ed6 ("s390: introduce execute-trampolines for branches") Signed-off-by: Martin Schwidefsky arch/s390/kernel/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3368e547c52b96586f0edf9657ca12b94d8e61a7 Author: Cornelia Huck Date: Fri Apr 20 10:24:04 2018 +0200 vfio: ccw: process ssch with interrupts disabled When we call ssch, an interrupt might already be pending once we return from the START SUBCHANNEL instruction. Therefore we need to make sure interrupts are disabled while holding the subchannel lock until after we're done with our processing. Cc: stable@vger.kernel.org #v4.12+ Reviewed-by: Dong Jia Shi Acked-by: Halil Pasic Acked-by: Pierre Morel Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky drivers/s390/cio/vfio_ccw_fsm.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 2317b07d05d2b136eb4dc9609807c9111bda3b2a Author: Martin Schwidefsky Date: Fri Apr 20 10:21:21 2018 +0200 s390: update sampling tag after task pid change In a multi-threaded program any thread can call execve(). If this is not done by the thread group leader, the de_thread() function replaces the pid of the task that calls execve() with the pid of thread group leader. If the task reaches user space again without going over __switch_to() the sampling tag is still set to the old pid. Define the arch_setup_new_exec function to verify the task pid and udpate the tag with LPP if it has changed. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/thread_info.h | 3 +++ arch/s390/kernel/process.c | 10 ++++++++++ 2 files changed, 13 insertions(+) commit 5f3ba878e7a2ffef82fb0882c0dd2c3507d734bc Author: André Wild Date: Wed Apr 18 17:59:58 2018 +0200 s390/cpum_cf: rename IBM z13/z14 counter names Change the IBM z13/z14 counter names to be in sync with all other models. Cc: stable@vger.kernel.org # v4.12+ Fixes: 3593eb944c ("s390/cpum_cf: add hardware counter support for IBM z14") Fixes: 3fc7acebae ("s390/cpum_cf: add IBM z13 counter event names") Signed-off-by: André Wild Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_cf_events.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5d27a2bf6e14f5c7d1033ad1e993fcd0eba43e83 Author: Stefan Haberland Date: Thu Apr 12 13:38:22 2018 +0200 s390/dasd: fix IO error for newly defined devices When a new CKD storage volume is defined at the storage server, Linux may be relying on outdated information about that volume, which leads to the following errors: 1. Command Reject Errors for minidisk on z/VM: dasd-eckd.b3193d: 0.0.XXXX: An error occurred in the DASD device driver, reason=09 dasd(eckd): I/O status report for device 0.0.XXXX: dasd(eckd): in req: 00000000XXXXXXXX CC:00 FC:04 AC:00 SC:17 DS:02 CS:00 RC:0 dasd(eckd): device 0.0.2046: Failing CCW: 00000000XXXXXXXX dasd(eckd): Sense(hex) 0- 7: 80 00 00 00 00 00 00 00 dasd(eckd): Sense(hex) 8-15: 00 00 00 00 00 00 00 00 dasd(eckd): Sense(hex) 16-23: 00 00 00 00 e1 00 0f 00 dasd(eckd): Sense(hex) 24-31: 00 00 40 e2 00 00 00 00 dasd(eckd): 24 Byte: 0 MSG 0, no MSGb to SYSOP 2. Equipment Check errors on LPAR or for dedicated devices on z/VM: dasd(eckd): I/O status report for device 0.0.XXXX: dasd(eckd): in req: 00000000XXXXXXXX CC:00 FC:04 AC:00 SC:17 DS:0E CS:40 fcxs:01 schxs:00 RC:0 dasd(eckd): device 0.0.9713: Failing TCW: 00000000XXXXXXXX dasd(eckd): Sense(hex) 0- 7: 10 00 00 00 13 58 4d 0f dasd(eckd): Sense(hex) 8-15: 67 00 00 00 00 00 00 04 dasd(eckd): Sense(hex) 16-23: e5 18 05 33 97 01 0f 0f dasd(eckd): Sense(hex) 24-31: 00 00 40 e2 00 04 58 0d dasd(eckd): 24 Byte: 0 MSG f, no MSGb to SYSOP Fix this problem by using the up-to-date information provided during online processing via the device specific SNEQ to detect the case of outdated LCU data. If there is a difference, perform a re-read of that data. Cc: stable@vger.kernel.org Reviewed-by: Jan Hoeppner Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_alias.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 783c3b53b9506db3e05daacfe34e0287eebb09d8 Author: Heiko Carstens Date: Mon Apr 16 12:22:24 2018 +0200 s390/uprobes: implement arch_uretprobe_is_alive() Implement s390 specific arch_uretprobe_is_alive() to avoid SIGSEGVs observed with uretprobes in combination with setjmp/longjmp. See commit 2dea1d9c38e4 ("powerpc/uprobes: Implement arch_uretprobe_is_alive()") for more details. With this implemented all test cases referenced in the above commit pass. Reported-by: Ziqian SUN Cc: # v4.3+ Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/uprobes.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit af2e460ade0b0180d0f3812ca4f4f59cc9597f3e Author: Sebastian Ott Date: Wed Apr 11 11:21:17 2018 +0200 s390/cio: update chpid descriptor after resource accessibility event Channel path descriptors have been seen as something stable (as long as the chpid is configured). Recent tests have shown that the descriptor can also be altered when the link state of a channel path changes. Thus it is necessary to update the descriptor during handling of resource accessibility events. Cc: Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/chsc.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit f18a36cf3f31dce633fe2a93d0059008bb21d9f2 Author: Sudeep Holla Date: Fri Apr 6 16:30:47 2018 +0100 hwmon: (scmi) handle absence of few types of sensors Currently the loop checks for non-zero count of sensors for each type of sensors which is completely wrong. It also results in aborting the registration of sensors if one or more types of sensors are completely not supported by the platform SCMI firmware. This patch fixes the issue by continue to loop and skiping sensor types that are not present. Fixes: b23688aefb8b ("hwmon: add support for sensors exported via ARM SCMI") Reported-by: Jim Quinlan Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Signed-off-by: Sudeep Holla Signed-off-by: Guenter Roeck drivers/hwmon/scmi-hwmon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6d08b06e67cd117f6992c46611dfb4ce267cd71e Author: Linus Torvalds Date: Sun Apr 22 19:20:09 2018 -0700 Linux 4.17-rc2 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 986e54cd685e8166bc8b4f4c47de44709e541510 Merge: 660e309 6ab690a Author: David S. Miller Date: Sun Apr 22 21:15:59 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-04-21 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix a deadlock between mm->mmap_sem and bpf_event_mutex when one task is detaching a BPF prog via perf_event_detach_bpf_prog() and another one dumping through bpf_prog_array_copy_info(). For the latter we move the copy_to_user() out of the bpf_event_mutex lock to fix it, from Yonghong. 2) Fix test_sock and test_sock_addr.sh failures. The former was hitting rlimit issues and the latter required ping to specify the address family, from Yonghong. 3) Remove a dead check in sockmap's sock_map_alloc(), from Jann. 4) Add generated files to BPF kselftests gitignore that were previously missed, from Anders. ==================== Signed-off-by: David S. Miller commit 660e309ddd6aa99bb4d2a859c4a0b56965e744ef Author: Thomas Falcon Date: Fri Apr 20 14:25:32 2018 -0500 ibmvnic: Clean actual number of RX or TX pools Avoid using value stored in the login response buffer when cleaning TX and RX buffer pools since these could be inconsistent depending on the device state. Instead use the field in the driver's private data that tracks the number of active pools. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 906cce04e785b307a83e8cc1420cb38b496f5066 Merge: 7c5aba2 d57493d Author: David S. Miller Date: Sun Apr 22 21:12:00 2018 -0400 Merge branch 'net-sched-ife-malformed-ife-packet-fixes' Alexander Aring says: ==================== net: sched: ife: malformed ife packet fixes As promised at netdev 2.2 tc workshop I am working on adding scapy support for tdc testing. It is still work in progress. I will submit the patches to tdc later (they are not in good shape yet). The good news is I have been able to find bugs which normal packet testing would not be able to find. With fuzzy testing I was able to craft certain malformed packets that IFE action was not able to deal with. This patch set fixes those bugs. changes since v4: - use pskb_may_pull before pointer assign changes since v3: - use pskb_may_pull changes since v2: - remove inline from __ife_tlv_meta_valid - add const to cast to meta_tlvhdr - add acked and reviewed tags ==================== Signed-off-by: David S. Miller commit d57493d6d1be26c8ac8516a4463bfe24956978eb Author: Alexander Aring Date: Fri Apr 20 15:15:05 2018 -0400 net: sched: ife: check on metadata length This patch checks if sk buffer is available to dererence ife header. If not then NULL will returned to signal an malformed ife packet. This avoids to crashing the kernel from outside. Signed-off-by: Alexander Aring Reviewed-by: Yotam Gigi Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/ife/ife.c | 3 +++ 1 file changed, 3 insertions(+) commit cc74eddd0ff325d57373cea99f642b787d7f76f5 Author: Alexander Aring Date: Fri Apr 20 15:15:04 2018 -0400 net: sched: ife: handle malformed tlv length There is currently no handling to check on a invalid tlv length. This patch adds such handling to avoid killing the kernel with a malformed ife packet. Signed-off-by: Alexander Aring Reviewed-by: Yotam Gigi Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/net/ife.h | 3 ++- net/ife/ife.c | 35 +++++++++++++++++++++++++++++++++-- net/sched/act_ife.c | 7 ++++++- 3 files changed, 41 insertions(+), 4 deletions(-) commit f6cd14537ff9919081be19b9c53b9b19c0d3ea97 Author: Alexander Aring Date: Fri Apr 20 15:15:03 2018 -0400 net: sched: ife: signal not finding metaid We need to record stats for received metadata that we dont know how to process. Have find_decode_metaid() return -ENOENT to capture this. Signed-off-by: Alexander Aring Reviewed-by: Yotam Gigi Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_ife.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c5aba211dd61f41d737a2c51729eb9fdcd3edf4 Author: Doron Roberts-Kedes Date: Fri Apr 20 12:11:11 2018 -0700 strparser: Do not call mod_delayed_work with a timeout of LONG_MAX struct sock's sk_rcvtimeo is initialized to LONG_MAX/MAX_SCHEDULE_TIMEOUT in sock_init_data. Calling mod_delayed_work with a timeout of LONG_MAX causes spurious execution of the work function. timer->expires is set equal to jiffies + LONG_MAX. When timer_base->clk falls behind the current value of jiffies, the delta between timer_base->clk and jiffies + LONG_MAX causes the expiration to be in the past. Returning early from strp_start_timer if timeo == LONG_MAX solves this problem. Found while testing net/tls_sw recv path. Fixes: 43a0c6751a322847 ("strparser: Stream parser for messages") Reviewed-by: Tejun Heo Signed-off-by: Doron Roberts-Kedes Signed-off-by: David S. Miller net/strparser/strparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a957fa190aa9d9168b33d460a5241a6d088c6265 Author: Ahmed Abdelsalam Date: Fri Apr 20 15:58:05 2018 +0200 ipv6: sr: fix NULL pointer dereference in seg6_do_srh_encap()- v4 pkts In case of seg6 in encap mode, seg6_do_srh_encap() calls set_tun_src() in order to set the src addr of outer IPv6 header. The net_device is required for set_tun_src(). However calling ip6_dst_idev() on dst_entry in case of IPv4 traffic results on the following bug. Using just dst->dev should fix this BUG. [ 196.242461] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 [ 196.242975] PGD 800000010f076067 P4D 800000010f076067 PUD 10f060067 PMD 0 [ 196.243329] Oops: 0000 [#1] SMP PTI [ 196.243468] Modules linked in: nfsd auth_rpcgss nfs_acl nfs lockd grace fscache sunrpc crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel aes_x86_64 crypto_simd cryptd input_leds glue_helper led_class pcspkr serio_raw mac_hid video autofs4 hid_generic usbhid hid e1000 i2c_piix4 ahci pata_acpi libahci [ 196.244362] CPU: 2 PID: 1089 Comm: ping Not tainted 4.16.0+ #1 [ 196.244606] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 196.244968] RIP: 0010:seg6_do_srh_encap+0x1ac/0x300 [ 196.245236] RSP: 0018:ffffb2ce00b23a60 EFLAGS: 00010202 [ 196.245464] RAX: 0000000000000000 RBX: ffff8c7f53eea300 RCX: 0000000000000000 [ 196.245742] RDX: 0000f10000000000 RSI: ffff8c7f52085a6c RDI: ffff8c7f41166850 [ 196.246018] RBP: ffffb2ce00b23aa8 R08: 00000000000261e0 R09: ffff8c7f41166800 [ 196.246294] R10: ffffdce5040ac780 R11: ffff8c7f41166828 R12: ffff8c7f41166808 [ 196.246570] R13: ffff8c7f52085a44 R14: ffffffffb73211c0 R15: ffff8c7e69e44200 [ 196.246846] FS: 00007fc448789700(0000) GS:ffff8c7f59d00000(0000) knlGS:0000000000000000 [ 196.247286] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 196.247526] CR2: 0000000000000000 CR3: 000000010f05a000 CR4: 00000000000406e0 [ 196.247804] Call Trace: [ 196.247972] seg6_do_srh+0x15b/0x1c0 [ 196.248156] seg6_output+0x3c/0x220 [ 196.248341] ? prandom_u32+0x14/0x20 [ 196.248526] ? ip_idents_reserve+0x6c/0x80 [ 196.248723] ? __ip_select_ident+0x90/0x100 [ 196.248923] ? ip_append_data.part.50+0x6c/0xd0 [ 196.249133] lwtunnel_output+0x44/0x70 [ 196.249328] ip_send_skb+0x15/0x40 [ 196.249515] raw_sendmsg+0x8c3/0xac0 [ 196.249701] ? _copy_from_user+0x2e/0x60 [ 196.249897] ? rw_copy_check_uvector+0x53/0x110 [ 196.250106] ? _copy_from_user+0x2e/0x60 [ 196.250299] ? copy_msghdr_from_user+0xce/0x140 [ 196.250508] sock_sendmsg+0x36/0x40 [ 196.250690] ___sys_sendmsg+0x292/0x2a0 [ 196.250881] ? _cond_resched+0x15/0x30 [ 196.251074] ? copy_termios+0x1e/0x70 [ 196.251261] ? _copy_to_user+0x22/0x30 [ 196.251575] ? tty_mode_ioctl+0x1c3/0x4e0 [ 196.251782] ? _cond_resched+0x15/0x30 [ 196.251972] ? mutex_lock+0xe/0x30 [ 196.252152] ? vvar_fault+0xd2/0x110 [ 196.252337] ? __do_fault+0x1f/0xc0 [ 196.252521] ? __handle_mm_fault+0xc1f/0x12d0 [ 196.252727] ? __sys_sendmsg+0x63/0xa0 [ 196.252919] __sys_sendmsg+0x63/0xa0 [ 196.253107] do_syscall_64+0x72/0x200 [ 196.253305] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 [ 196.253530] RIP: 0033:0x7fc4480b0690 [ 196.253715] RSP: 002b:00007ffde9f252f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 196.254053] RAX: ffffffffffffffda RBX: 0000000000000040 RCX: 00007fc4480b0690 [ 196.254331] RDX: 0000000000000000 RSI: 000000000060a360 RDI: 0000000000000003 [ 196.254608] RBP: 00007ffde9f253f0 R08: 00000000002d1e81 R09: 0000000000000002 [ 196.254884] R10: 00007ffde9f250c0 R11: 0000000000000246 R12: 0000000000b22070 [ 196.255205] R13: 20c49ba5e353f7cf R14: 431bde82d7b634db R15: 00007ffde9f278fe [ 196.255484] Code: a5 0f b6 45 c0 41 88 41 28 41 0f b6 41 2c 48 c1 e0 04 49 8b 54 01 38 49 8b 44 01 30 49 89 51 20 49 89 41 18 48 8b 83 b0 00 00 00 <48> 8b 30 49 8b 86 08 0b 00 00 48 8b 40 20 48 8b 50 08 48 0b 10 [ 196.256190] RIP: seg6_do_srh_encap+0x1ac/0x300 RSP: ffffb2ce00b23a60 [ 196.256445] CR2: 0000000000000000 [ 196.256676] ---[ end trace 71af7d093603885c ]--- Fixes: 8936ef7604c11 ("ipv6: sr: fix NULL pointer dereference when setting encap source address") Signed-off-by: Ahmed Abdelsalam Acked-by: David Lebrun Signed-off-by: David S. Miller net/ipv6/seg6_iptunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 867ab4b2fcc3f840e9cc378a812e07f850795e6f Merge: 5ec83b2 221bda4 Author: Linus Torvalds Date: Sun Apr 22 17:14:29 2018 -0700 Merge tag 'drm-fixes-for-v4.17-rc2' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Exynos, i915, vc4, amdgpu fixes. i915: - an oops fix - two race fixes - some gvt fixes amdgpu: - dark screen fix - clk/voltage fix - vega12 smu fix vc4: - memory leak fix exynos just drops some code" * tag 'drm-fixes-for-v4.17-rc2' of git://people.freedesktop.org/~airlied/linux: (23 commits) drm/amd/powerplay: header file interface to SMU update drm/amd/pp: Fix bug voltage can't be OD separately on VI drm/amd/display: Don't program bypass on linear regamma LUT drm/i915: Fix LSPCON TMDS output buffer enabling from low-power state drm/i915/audio: Fix audio detection issue on GLK drm/i915: Call i915_perf_fini() on init_hw error unwind drm/i915/bios: filter out invalid DDC pins from VBT child devices drm/i915/pmu: Inspect runtime PM state more carefully while estimating RC6 drm/i915: Do no use kfree() to free a kmem_cache_alloc() return value drm/exynos: exynos_drm_fb -> drm_framebuffer drm/exynos: Move dma_addr out of exynos_drm_fb drm/exynos: Move GEM BOs to drm_framebuffer drm: Fix HDCP downstream dev count read drm/vc4: Fix memory leak during BO teardown drm/i915/execlists: Clear user-active flag on preemption completion drm/i915/gvt: Add drm_format_mod update drm/i915/gvt: Disable primary/sprite/cursor plane at virtual display initialization drm/i915/gvt: Delete redundant error message in fb_decode.c drm/i915/gvt: Cancel dma map when resetting ggtt entries drm/i915/gvt: Missed to cancel dma map for ggtt entries ... commit 221bda4b5f1abfd74159d7bf3703affa62468030 Merge: 2e1d6ea cc9e992 Author: Dave Airlie Date: Mon Apr 23 08:54:06 2018 +1000 Merge branch 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-next - Fix a dark screen issue in DC - Fix clk/voltage dependency tracking for wattman - Update SMU interface for vega12 * 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux: drm/amd/powerplay: header file interface to SMU update drm/amd/pp: Fix bug voltage can't be OD separately on VI drm/amd/display: Don't program bypass on linear regamma LUT commit 2e1d6eab503d179dbca51f54c65c4e0b70775fbf Merge: bc9ebca ff059fc Author: Dave Airlie Date: Mon Apr 23 08:53:41 2018 +1000 Merge tag 'exynos-drm-fixes-for-v4.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Remove Exynos specific framebuffer structure and relevant functions. - it removes exynos_drm_fb structure which is a wrapper of drm_framebuffer and unnecessary two exynos specific callback functions, exynos_drm_destory() and exynos_drm_fb_create_handle() because we can reuse existing drm common callback ones instead. * tag 'exynos-drm-fixes-for-v4.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: exynos_drm_fb -> drm_framebuffer drm/exynos: Move dma_addr out of exynos_drm_fb drm/exynos: Move GEM BOs to drm_framebuffer drm/amdkfd: Deallocate SDMA queues correctly drm/amdkfd: Fix scratch memory with HWS enabled commit bc9ebca2daeb132a6375700f41bd65d87794e9c7 Merge: e1898f9 b461573 Author: Dave Airlie Date: Mon Apr 23 08:53:27 2018 +1000 Merge tag 'drm-intel-next-fixes-2018-04-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Fix for FDO #105549: Avoid OOPS on bad VBT (Jani) - Fix rare pre-emption race (Chris) - Fix RC6 race against PM transitions (Tvrtko) * tag 'drm-intel-next-fixes-2018-04-19' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915/audio: Fix audio detection issue on GLK drm/i915: Call i915_perf_fini() on init_hw error unwind drm/i915/bios: filter out invalid DDC pins from VBT child devices drm/i915/pmu: Inspect runtime PM state more carefully while estimating RC6 drm/i915: Do no use kfree() to free a kmem_cache_alloc() return value drm/i915/execlists: Clear user-active flag on preemption completion drm/i915/gvt: Add drm_format_mod update drm/i915/gvt: Disable primary/sprite/cursor plane at virtual display initialization drm/i915/gvt: Delete redundant error message in fb_decode.c drm/i915/gvt: Cancel dma map when resetting ggtt entries drm/i915/gvt: Missed to cancel dma map for ggtt entries drm/i915/gvt: Make MI_USER_INTERRUPT nop in cmd parser drm/i915/gvt: Mark expected switch fall-through in handle_g2v_notification drm/i915/gvt: throw error on unhandled vfio ioctls commit e1898f99b7b8668c589e5eae8bd3d0d572ef5835 Merge: a10beab 7eb2c4d Author: Dave Airlie Date: Mon Apr 23 08:52:54 2018 +1000 Merge tag 'drm-misc-fixes-2018-04-18-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-fixes: stable: vc4: Fix memory leak during BO teardown (Daniel) dp: Add i2c retry for LSPCON adapters (Imre) hdcp: Fix device count mask (Ramalingam) Cc: Daniel J Blueman Cc: Ramalingam C * tag 'drm-misc-fixes-2018-04-18-1' of git://anongit.freedesktop.org/drm/drm-misc: drm/i915: Fix LSPCON TMDS output buffer enabling from low-power state drm: Fix HDCP downstream dev count read drm/vc4: Fix memory leak during BO teardown commit 5ec83b22a2dd13180762c89698e4e2c2881a423c Merge: d54b5c1 596632d Author: Linus Torvalds Date: Sun Apr 22 12:13:04 2018 -0700 Merge tag '4.17-rc1-SMB3-CIFS' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Various SMB3/CIFS fixes. There are three more security related fixes in progress that are not included in this set but they are still being tested and reviewed, so sending this unrelated set of smaller fixes now" * tag '4.17-rc1-SMB3-CIFS' of git://git.samba.org/sfrench/cifs-2.6: CIFS: fix typo in cifs_dbg cifs: do not allow creating sockets except with SMB1 posix exensions cifs: smbd: Dump SMB packet when configured cifs: smbd: Check for iov length on sending the last iov fs: cifs: Adding new return type vm_fault_t cifs: smb2ops: Fix NULL check in smb2_query_symlink commit d54b5c1315b25c7baea2fa6017a9e5d9d326742a Merge: 37a535e c0872323 Author: Linus Torvalds Date: Sun Apr 22 12:09:27 2018 -0700 Merge tag 'for-4.17-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "This contains a few fixups to the qgroup patches that were merged this dev cycle, unaligned access fix, blockgroup removal corner case fix and a small debugging output tweak" * tag 'for-4.17-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: print-tree: debugging output enhancement btrfs: Fix race condition between delayed refs and blockgroup removal btrfs: fix unaligned access in readdir btrfs: Fix wrong btrfs_delalloc_release_extents parameter btrfs: delayed-inode: Remove wrong qgroup meta reservation calls btrfs: qgroup: Use independent and accurate per inode qgroup rsv btrfs: qgroup: Commit transaction in advance to reduce early EDQUOT commit 3a04ce7130a7e5dad4e78d45d50313747f8c830f Author: Cong Wang Date: Thu Apr 19 21:54:34 2018 -0700 llc: fix NULL pointer deref for SOCK_ZAPPED For SOCK_ZAPPED socket, we don't need to care about llc->sap, so we should just skip these refcount functions in this case. Fixes: f7e43672683b ("llc: hold llc_sap before release_sock()") Reported-by: kernel test robot Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/llc/af_llc.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 5e391dc5a8d801a2410d0032ad4a428d1d61800c Author: Ivan Khoronzhuk Date: Thu Apr 19 22:49:09 2018 +0300 net: ethernet: ti: cpsw: fix tx vlan priority mapping The CPDMA_TX_PRIORITY_MAP in real is vlan pcp field priority mapping register and basically replaces vlan pcp field for tagged packets. So, set it to be 1:1 mapping. Otherwise, it will cause unexpected change of egress vlan tagged packets, like prio 2 -> prio 5. Fixes: e05107e6b747 ("net: ethernet: ti: cpsw: add multi queue support") Reviewed-by: Grygorii Strashko Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b905ef9ab90115d001c1658259af4b1c65088779 Author: Cong Wang Date: Thu Apr 19 12:25:38 2018 -0700 llc: delete timers synchronously in llc_sk_free() The connection timers of an llc sock could be still flying after we delete them in llc_sk_free(), and even possibly after we free the sock. We could just wait synchronously here in case of troubles. Note, I leave other call paths as they are, since they may not have to wait, at least we can change them to synchronously when needed. Also, move the code to net/llc/llc_conn.c, which is apparently a better place. Reported-by: Signed-off-by: Cong Wang Signed-off-by: David S. Miller include/net/llc_conn.h | 1 + net/llc/llc_c_ac.c | 9 +-------- net/llc/llc_conn.c | 22 +++++++++++++++++++++- 3 files changed, 23 insertions(+), 9 deletions(-) commit 5411b6187adf62909e3b998ac782e722904c7487 Author: Guillaume Nault Date: Thu Apr 19 16:20:48 2018 +0200 l2tp: fix {pppol2tp, l2tp_dfs}_seq_stop() in case of seq_file overflow Commit 0e0c3fee3a59 ("l2tp: hold reference on tunnels printed in pppol2tp proc file") assumed that if pppol2tp_seq_stop() was called with non-NULL private data (the 'v' pointer), then pppol2tp_seq_start() would not be called again. It turns out that this isn't guaranteed, and overflowing the seq_file's buffer in pppol2tp_seq_show() is a way to get into this situation. Therefore, pppol2tp_seq_stop() needs to reset pd->tunnel, so that pppol2tp_seq_start() won't drop a reference again if it gets called. We also have to clear pd->session, because the rest of the code expects a non-NULL tunnel when pd->session is set. The l2tp_debugfs module has the same issue. Fix it in the same way. Fixes: 0e0c3fee3a59 ("l2tp: hold reference on tunnels printed in pppol2tp proc file") Fixes: f726214d9b23 ("l2tp: hold reference on tunnels printed in l2tp/tunnels debugfs file") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_debugfs.c | 5 ++++- net/l2tp/l2tp_ppp.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit 353697e6e688c361af71fe921b89bbe71189d0ce Merge: 83beed7 b7493e9 Author: David S. Miller Date: Sun Apr 22 14:42:32 2018 -0400 Merge branch 's390-qeth-fixes' Julian Wiedmann says: ==================== s390/qeth: fixes 2018-04-19 Please apply the following qeth fixes for 4.17. The common theme seems to be error handling improvements in various areas of cmd IO. Patches 1-3 should also go back to stable. ==================== Signed-off-by: David S. Miller commit b7493e91c11a757cf0f8ab26989642ee4bb2c642 Author: Julian Wiedmann Date: Thu Apr 19 12:52:11 2018 +0200 s390/qeth: use Read device to query hypervisor for MAC For z/VM NICs, qeth needs to consider which of the three CCW devices in an MPC group it uses for requesting a managed MAC address. On the Base device, the hypervisor returns a default MAC which is pre-assigned when creating the NIC (this MAC is also returned by the READ MAC primitive). Querying any other device results in the allocation of an additional MAC address. For consistency with READ MAC and to avoid using up more addresses than necessary, it is preferable to use the NIC's default MAC. So switch the the diag26c over to using a NIC's Read device, which should always be identical to the Base device. Fixes: ec61bd2fd2a2 ("s390/qeth: use diag26c to get MAC address on L2") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db71bbbd11a4d314f0fa3fbf3369b71cf33ce33c Author: Julian Wiedmann Date: Thu Apr 19 12:52:10 2018 +0200 s390/qeth: fix request-side race during cmd IO timeout Submitting a cmd IO request (usually on the WRITE device, but for IDX also on the READ device) is currently done with ccw_device_start() and a manual timeout in the caller. On timeout, the caller cleans up the related resources (eg. IO buffer). But 1) the IO might still be active and utilize those resources, and 2) when the IO completes, qeth_irq() will attempt to clean up the same resources again. Instead of introducing additional resource locking, switch to ccw_device_start_timeout() to ensure IO termination after timeout, and let the IRQ handler alone deal with cleaning up after a request. This also removes a stray write->irq_pending reset from clear_ipacmd_list(). The routine doesn't terminate any pending IO on the WRITE device, so this should be handled properly via IO timeout in the IRQ handler. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 51 ++++++++++++++++++++------------------- drivers/s390/net/qeth_core_mpc.h | 12 +++++++++ drivers/s390/net/qeth_l2_main.c | 4 +-- 3 files changed, 40 insertions(+), 27 deletions(-) commit bcacfcbc82b4235d280ed9b067aa4567f4a0c756 Author: Julian Wiedmann Date: Thu Apr 19 12:52:09 2018 +0200 s390/qeth: fix MAC address update sequence When changing the MAC address on a L2 qeth device, current code first unregisters the old address, then registers the new one. If HW rejects the new address (or the IO fails), the device ends up with no operable address at all. Re-order the code flow so that the old address only gets dropped if the new address was registered successfully. While at it, add logic to catch some corner-cases. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 55 +++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 24 deletions(-) commit a936b1ef37ce1e996533878f4b23944f9444dcdf Author: Julian Wiedmann Date: Thu Apr 19 12:52:08 2018 +0200 s390/qeth: handle failure on workqueue creation Creating the global workqueue during driver init may fail, deal with it. Also, destroy the created workqueue on any subsequent error. Fixes: 0f54761d167f ("qeth: Support VEPA mode") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 901e3f49facbd31b2b3d1786637b4a35e1022e9b Author: Julian Wiedmann Date: Thu Apr 19 12:52:07 2018 +0200 s390/qeth: avoid control IO completion stalls For control IO, qeth currently tracks the index of the buffer that it expects to complete the next IO on each qeth_channel. If the channel presents an IRQ while this buffer has not yet completed, no completion processing for _any_ completed buffer takes place. So if the 'next buffer' is skipped for any sort of reason* (eg. when it is released due to error conditions, before the IO is started), the buffer obviously won't switch to PROCESSED until it is eventually allocated for a _different_ IO and completes. Until this happens, all completion processing on that channel stalls and pending requests possibly time out. As a fix, remove the whole 'next buffer' logic and simply process any IO buffer right when it completes. A channel will never have more than one IO pending, so there's no risk of processing out-of-sequence. *Note: currently just one location in the code really handles this problem, by advancing the 'next' index manually. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 2 -- drivers/s390/net/qeth_core_main.c | 22 +++++----------------- 2 files changed, 5 insertions(+), 19 deletions(-) commit 686c97ee29c886ee07d17987d0059874c5c3b5af Author: Julian Wiedmann Date: Thu Apr 19 12:52:06 2018 +0200 s390/qeth: fix error handling in adapter command callbacks Make sure to check both return code fields before(!) processing the command response. Otherwise we risk operating on invalid data. This matches an earlier fix for SETASSPARMS commands, see commit ad3cbf613329 ("s390/qeth: fix error handling in checksum cmd callback"). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 85 +++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 48 deletions(-) commit 37a535edd72cacf73b456d4e9272ff2ee4bf7405 Merge: c1e9dae 0518982 Author: Linus Torvalds Date: Sun Apr 22 11:40:52 2018 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A small set of fixes for x86: - Prevent X2APIC ID 0xFFFFFFFF from being treated as valid, which causes the possible CPU count to be wrong. - Prevent 32bit truncation in calc_hpet_ref() which causes the TSC calibration to fail - Fix the page table setup for temporary text mappings in the resume code which causes resume failures - Make the page table dump code handle HIGHPTE correctly instead of oopsing - Support for topologies where NUMA nodes share an LLC to prevent a invalid topology warning and further malfunction on such systems. - Remove the now unused pci-nommu code - Remove stale function declarations" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/power/64: Fix page-table setup for temporary text mapping x86/mm: Prevent kernel Oops in PTDUMP code with HIGHPTE=y x86,sched: Allow topologies where NUMA nodes share an LLC x86/processor: Remove two unused function declarations x86/acpi: Prevent X2APIC id 0xffffffff from being accounted x86/tsc: Prevent 32bit truncation in calc_hpet_ref() x86: Remove pci-nommu.c commit 23566c3798f315058862564ab3d01882316054eb Author: Boris Brezillon Date: Tue Apr 10 17:15:13 2018 +0200 mtd: nand: Fix nanddev_mtd_erase() Commit e7bfb3fdbde3 ("mtd: Stop updating erase_info->state and calling mtd_erase_callback()") removed the einfo->state field and the MTD_ERASE_XXX macros. At the same time, the generic NAND layer was added and made sure to update the erase info state. It did not result in a build failure after merging the nand/for-4.17 branch in mtd/next because the generic NAND layer is not selected yet. Let's fix that before a config option starts selecting MTD_NAND_CORE. Fixes: e7bfb3fdbde3 ("mtd: Stop updating erase_info->state and calling mtd_erase_callback()") Signed-off-by: Boris Brezillon drivers/mtd/nand/core.c | 3 --- 1 file changed, 3 deletions(-) commit c1e9dae0a9bf3394818abafaf376a34248c5f638 Merge: 38f0b33 7407188 Author: Linus Torvalds Date: Sun Apr 22 10:49:02 2018 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "A small set of timer fixes: - Evaluate the -ETIME condition correctly in the imx tpm driver - Fix the evaluation order of a condition in posix cpu timers - Use pr_cont() in the clockevents code to prevent ugly message splitting - Remove __current_kernel_time() which is now unused to prevent that new users show up. - Remove a stale forward declaration" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/imx-tpm: Correct -ETIME return condition check posix-cpu-timers: Ensure set_process_cpu_timer is always evaluated timekeeping: Remove __current_kernel_time() timers: Remove stale struct tvec_base forward declaration clockevents: Fix kernel messages split across multiple lines commit 38f0b33e6d5bbf7caa23d0abae19bce1e8db5866 Merge: 18de45a c042f7e Author: Linus Torvalds Date: Sun Apr 22 10:17:01 2018 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "A larger set of updates for perf. Kernel: - Handle the SBOX uncore monitoring correctly on Broadwell CPUs which do not have SBOX. - Store context switch out type in PERF_RECORD_SWITCH[_CPU_WIDE]. The percentage of preempting and non-preempting context switches help understanding the nature of workloads (CPU or IO bound) that are running on a machine. This adds the kernel facility and userspace changes needed to show this information in 'perf script' and 'perf report -D' (Alexey Budankov) - Remove a WARN_ON() in the trace/kprobes code which is pointless because the return error code is already telling the caller what's wrong. - Revert a fugly workaround for clang BPF targets. - Fix sample_max_stack maximum check and do not proceed when an error has been detect, return them to avoid misidentifying errors (Jiri Olsa) - Add SPDX idenitifiers and get rid of GPL boilderplate. Tools: - Synchronize kernel ABI headers, v4.17-rc1 (Ingo Molnar) - Support MAP_FIXED_NOREPLACE, noticed when updating the tools/include/ copies (Arnaldo Carvalho de Melo) - Add '\n' at the end of parse-options error messages (Ravi Bangoria) - Add s390 support for detailed/verbose PMU event description (Thomas Richter) - perf annotate fixes and improvements: * Allow showing offsets in more than just jump targets, use the new 'O' hotkey in the TUI, config ~/.perfconfig annotate.offset_level for it and for --stdio2 (Arnaldo Carvalho de Melo) * Use the resolved variable names from objdump disassembled lines to make them more compact, just like was already done for some instructions, like "mov", this eventually will be done more generally, but lets now add some more to the existing mechanism (Arnaldo Carvalho de Melo) - perf record fixes: * Change warning for missing topology sysfs entry to debug, as not all architectures have those files, s390 being one of those (Thomas Richter) * Remove old error messages about things that unlikely to be the root cause in modern systems (Andi Kleen) - perf sched fixes: * Fix -g/--call-graph documentation (Takuya Yamamoto) - perf stat: * Enable 1ms interval for printing event counters values in (Alexey Budankov) - perf test fixes: * Run dwarf unwind on arm32 (Kim Phillips) * Remove unused ptrace.h include from LLVM test, sidesteping older clang's lack of support for some asm constructs (Arnaldo Carvalho de Melo) * Fixup BPF test using epoll_pwait syscall function probe, to cope with the syscall routines renames performed in this development cycle (Arnaldo Carvalho de Melo) - perf version fixes: * Do not print info about HAVE_LIBAUDIT_SUPPORT in 'perf version --build-options' when HAVE_SYSCALL_TABLE_SUPPORT is true, as libaudit won't be used in that case, print info about syscall_table support instead (Jin Yao) - Build system fixes: * Use HAVE_..._SUPPORT used consistently (Jin Yao) * Restore READ_ONCE() C++ compatibility in tools/include (Mark Rutland) * Give hints about package names needed to build jvmti (Arnaldo Carvalho de Melo)" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (37 commits) perf/x86/intel/uncore: Fix SBOX support for Broadwell CPUs perf/x86/intel/uncore: Revert "Remove SBOX support for Broadwell server" coresight: Move to SPDX identifier perf test BPF: Fixup BPF test using epoll_pwait syscall function probe perf tests mmap: Show which tracepoint is failing perf tools: Add '\n' at the end of parse-options error messages perf record: Remove suggestion to enable APIC perf record: Remove misleading error suggestion perf hists browser: Clarify top/report browser help perf mem: Allow all record/report options perf trace: Support MAP_FIXED_NOREPLACE perf: Remove superfluous allocation error check perf: Fix sample_max_stack maximum check perf: Return proper values for user stack errors perf list: Add s390 support for detailed/verbose PMU event description perf script: Extend misc field decoding with switch out event type perf report: Extend raw dump (-D) out with switch out event type perf/core: Store context switch out type in PERF_RECORD_SWITCH[_CPU_WIDE] tools/headers: Synchronize kernel ABI headers, v4.17-rc1 trace_kprobe: Remove warning message "Could not insert probe at..." ... commit 18de45a925c905d086cd2db2d3d7e7a653e08003 Merge: 285848b 596a9f6 Author: Linus Torvalds Date: Sun Apr 22 09:48:13 2018 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fix from Thomas Gleixner: "A single fix for objtool so it uses the host C and LD flags and not the target ones" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Support HOSTCFLAGS and HOSTLDFLAGS commit 46c6975a1fd9794ed979565235d24b2f5004e014 Author: Marc Zyngier Date: Sun Apr 22 13:33:46 2018 +0100 serial: mvebu-uart: Fix local flags handling on termios update Commit 68a0db1d7da2 reworked the baud rate selection, but also added a (not so) subtle change in the way the local flags (c_lflag in the termios structure) are handled, forcing the new flags to always be the same as the old ones. The reason for that particular change is both obscure and undocumented. It also completely breaks userspace. Something as trivial as getty is unusable: Debian GNU/Linux 9 sy-borg ttyMV0 sy-borg login: root root [timeout] Debian GNU/Linux 9 sy-borg ttyMV0 which is quite obvious in retrospect: getty cannot get in control of the echo mode, is stuck in canonical mode, and times out without ever seeing anything valid. It also begs the question of how this change was ever tested. The fix is pretty obvious: stop messing with c_lflag, and the world will be a happier place. Cc: stable@vger.kernel.org # 4.15+ Fixes: 68a0db1d7da2 ("serial: mvebu-uart: add function to change baudrate") Signed-off-by: Marc Zyngier Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 1 - 1 file changed, 1 deletion(-) commit b2d89ad9c9682e795ed6eeb9ed455789ad6cedf1 Author: Tony Lindgren Date: Sat Apr 7 10:19:51 2018 -0700 tty: n_gsm: Fix DLCI handling for ADM mode if debug & 2 is not set At least on droid 4 with control channel in ADM mode, there is no response to Modem Status Command (MSC). Currently gsmtty_modem_update() expects to have data in dlci->modem_rx unless debug & 2 is set. This means that on droid 4, things only work if debug & 2 is set. Let's fix the issue by ignoring empty dlci->modem_rx for ADM mode. In the AMD mode, CMD_MSC will never respond and gsm_process_modem() won't get called to set dlci->modem_rx. And according to ts_127010v140000p.pdf, MSC is only relevant if basic option is chosen, so let's test for that too. Fixes: ea3d8465ab9b ("tty: n_gsm: Allow ADM response in addition to UA for control dlci") Cc: linux-serial@vger.kernel.org Cc: Alan Cox Cc: Dan Williams Cc: Jiri Prchal Cc: Jiri Slaby Cc: Marcel Partap Cc: Merlijn Wajer Cc: Michael Nazzareno Trimarchi Cc: Michael Scott Cc: Pavel Machek Cc: Peter Hurley Cc: Russ Gorby Cc: Sascha Hauer Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit e9ec22547986dd32c5c70da78107ce35dbff1344 Author: Tony Lindgren Date: Sat Apr 7 10:19:50 2018 -0700 tty: n_gsm: Fix long delays with control frame timeouts in ADM mode Commit ea3d8465ab9b ("tty: n_gsm: Allow ADM response in addition to UA for control dlci") added support for DLCI to stay in Asynchronous Disconnected Mode (ADM). But we still get long delays waiting for commands to other DLCI to complete: --> 5) C: SABM(P) Q> 0) C: UIH(F) Q> 0) C: UIH(F) Q> 0) C: UIH(F) ... This happens because gsm_control_send() sets cretries timer to T2 that is by default set to 34. This will cause resend for T2 times for the control frame. In ADM mode, we will never get a response so the control frame, so retries are just delaying all the commands. Let's fix the issue by setting DLCI_MODE_ADM flag after detecting the ADM mode for the control DLCI. Then we can use that in gsm_control_send() to set retries to 1. This means the control frame will be sent once allowing the other end at an opportunity to switch from ADM to ABM mode. Note that retries will be decremented in gsm_control_retransmit() so we don't want to set it to 0 here. Fixes: ea3d8465ab9b ("tty: n_gsm: Allow ADM response in addition to UA for control dlci") Cc: linux-serial@vger.kernel.org Cc: Alan Cox Cc: Dan Williams Cc: Jiri Prchal Cc: Jiri Slaby Cc: Marcel Partap Cc: Merlijn Wajer Cc: Michael Nazzareno Trimarchi Cc: Michael Scott Cc: Pavel Machek Cc: Peter Hurley Cc: Russ Gorby Cc: Sascha Hauer Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 7fc65d4c2ba9e5006c629669146c6876b65aa233 Author: Zhengjun Xing Date: Fri Apr 13 15:55:34 2018 +0300 xhci: Fix Kernel oops in xhci dbgtty tty_unregister_driver may be called more than 1 time in some hotplug cases,it will cause the kernel oops. This patch checked dbc_tty_driver to make sure it is unregistered only 1 time. [ 175.741404] BUG: unable to handle kernel NULL pointer dereference at 0000000000000034 [ 175.742309] IP: tty_unregister_driver+0x9/0x70 [ 175.743148] PGD 0 P4D 0 [ 175.743981] Oops: 0000 [#1] SMP PTI [ 175.753904] RIP: 0010:tty_unregister_driver+0x9/0x70 [ 175.754817] RSP: 0018:ffffa8ff831d3bb0 EFLAGS: 00010246 [ 175.755753] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 175.756685] RDX: ffff92089c616000 RSI: ffffe64fe1b26080 RDI: 0000000000000000 [ 175.757608] RBP: ffff92086c988230 R08: 000000006c982701 R09: 00000001801e0016 [ 175.758533] R10: ffffa8ff831d3b48 R11: ffff92086c982100 R12: ffff92086c98827c [ 175.759462] R13: ffff92086c988398 R14: 0000000000000060 R15: ffff92089c5e9b40 [ 175.760401] FS: 0000000000000000(0000) GS:ffff9208a0100000(0000) knlGS:0000000000000000 [ 175.761334] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 175.762270] CR2: 0000000000000034 CR3: 000000011800a003 CR4: 00000000003606e0 [ 175.763225] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 175.764164] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 175.765091] Call Trace: [ 175.766014] xhci_dbc_tty_unregister_driver+0x11/0x30 [ 175.766960] xhci_dbc_exit+0x2a/0x40 [ 175.767889] xhci_stop+0x57/0x1c0 [ 175.768824] usb_remove_hcd+0x100/0x250 [ 175.769708] usb_hcd_pci_remove+0x68/0x130 [ 175.770574] pci_device_remove+0x3b/0xc0 [ 175.771435] device_release_driver_internal+0x157/0x230 [ 175.772343] pci_stop_bus_device+0x74/0xa0 [ 175.773205] pci_stop_bus_device+0x2b/0xa0 [ 175.774061] pci_stop_bus_device+0x2b/0xa0 [ 175.774907] pci_stop_bus_device+0x2b/0xa0 [ 175.775741] pci_stop_bus_device+0x2b/0xa0 [ 175.776618] pci_stop_bus_device+0x2b/0xa0 [ 175.777452] pci_stop_bus_device+0x2b/0xa0 [ 175.778273] pci_stop_bus_device+0x2b/0xa0 [ 175.779092] pci_stop_bus_device+0x2b/0xa0 [ 175.779908] pci_stop_bus_device+0x2b/0xa0 [ 175.780750] pci_stop_bus_device+0x2b/0xa0 [ 175.781543] pci_stop_and_remove_bus_device+0xe/0x20 [ 175.782338] pciehp_unconfigure_device+0xb8/0x160 [ 175.783128] pciehp_disable_slot+0x4f/0xd0 [ 175.783920] pciehp_power_thread+0x82/0xa0 [ 175.784766] process_one_work+0x147/0x3c0 [ 175.785564] worker_thread+0x4a/0x440 [ 175.786376] kthread+0xf8/0x130 [ 175.787174] ? rescuer_thread+0x360/0x360 [ 175.787964] ? kthread_associate_blkcg+0x90/0x90 [ 175.788798] ret_from_fork+0x35/0x40 Cc: # 4.16 Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI driver") Signed-off-by: Zhengjun Xing Tested-by: Christian Kellner Reviewed-by: Christian Kellner Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-dbgtty.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 602f4fb71d2b4aa5a447d4ed25a58fd098df9058 Author: Arnd Bergmann Date: Wed Apr 4 14:21:53 2018 +0200 usb: select USB_COMMON for usb role switch config The new axp288 extcon driver has no dependency on USB itself but calls the usb role switch helper functions. This causes a link error when USB_COMMON is disabled, as that subdirectory never gets entered: drivers/extcon/extcon-axp288.o: In function `axp288_usb_role_work': extcon-axp288.c:(.text+0x47b): undefined reference to `usb_role_switch_set_role' extcon-axp288.c:(.text+0x498): undefined reference to `usb_role_switch_get_role' drivers/extcon/extcon-axp288.o: In function `axp288_extcon_probe': extcon-axp288.c:(.text+0x675): undefined reference to `usb_role_switch_get' extcon-axp288.c:(.text+0x6d1): undefined reference to `usb_role_switch_put' drivers/extcon/extcon-axp288.o: In function `axp288_put_role_sw': extcon-axp288.c:(.text+0x1c): undefined reference to `usb_role_switch_put' There are multiple ways of fixing this, I chose to 'select USB_COMMON', since that is how we solved the same problem for other helpers like USB_LED_TRIG or PHY drivers. Fixes: d54f063cdbe4 ("extcon: axp288: Set USB role where necessary") Signed-off-by: Arnd Bergmann Reviewed-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/usb/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 9d3cd19be3e2675f5b30172f3305f79ddcb91023 Author: Martin Blumenstingl Date: Wed Apr 18 21:39:50 2018 +0200 usb: core: phy: add missing forward declaration for "struct device" Currently hcd.c is the only consumer of the usb_phy_roothub logic. This already includes the required header files so struct device is known. However, future consumers might not know about struct device. Add a forward declaration for struct device to fix potential future consumers which don't include any of the struct device API headers. Fixes: 07dbff0ddbd86c ("usb: core: add a wrapper for the USB PHYs on the HCD") Suggested-by: Masahiro Yamada Signed-off-by: Martin Blumenstingl Signed-off-by: Greg Kroah-Hartman drivers/usb/core/phy.h | 1 + 1 file changed, 1 insertion(+) commit fec94445db7777c65b0a681b8dc0ed2532304d2a Author: Martin Blumenstingl Date: Wed Apr 18 21:39:49 2018 +0200 usb: core: phy: make it a no-op if CONFIG_GENERIC_PHY is disabled If the generic PHY support is disabled the stub of devm_of_phy_get_by_index returns ENOSYS. This corner case isn't handled properly by usb_phy_roothub_add_phy and at least breaks USB support on Raspberry Pi (bcm2835_defconfig): dwc2 20980000.usb: dwc2_hcd_init() FAILED, returning -38 dwc2: probe of 20980000.usb failed with error -38 Let usb_phy_roothub_alloc() return in case CONFIG_GENERIC_PHY is disabled to fix this issue (compilers might even be smart enough to optimize away most of the code within usb_phy_roothub_alloc and usb_phy_roothub_add_phy if CONFIG_GENERIC_PHY is disabled). All existing usb_phy_roothub_* functions are already NULL-safe, so no special handling is required there. Fixes: 07dbff0ddbd8 ("usb: core: add a wrapper for the USB PHYs on the HCD") Reported-by: Stefan Wahren Signed-off-by: Martin Blumenstingl Signed-off-by: Greg Kroah-Hartman drivers/usb/core/phy.c | 3 +++ 1 file changed, 3 insertions(+) commit f0e36d478faf37fb26413b2530d04e6b30af3834 Author: Martin Blumenstingl Date: Wed Apr 18 21:39:48 2018 +0200 usb: core: use phy_exit during suspend if wake up is not supported If the USB controller can wake up the system (which is the case for example with the Mediatek USB3 IP) then we must not call phy_exit during suspend to ensure that the USB controller doesn't have to re-enumerate the devices during resume. However, if the USB controller cannot wake up the system (which is the case for example on various TI platforms using a dwc3 controller) then we must call phy_exit during suspend. Otherwise the PHY driver keeps the clocks enabled, which prevents the system from reaching the lowest power levels in the suspend state. Solve this by introducing two new functions in the PHY wrapper which are dedicated to the suspend and resume handling. If the controller can wake up the system the new usb_phy_roothub_suspend function will simply call usb_phy_roothub_power_off. However, if wake up is not supported by the controller it will also call usb_phy_roothub_exit. The also new usb_phy_roothub_resume function takes care of calling usb_phy_roothub_init (if the controller can't wake up the system) in addition to usb_phy_roothub_power_on. Fixes: 07dbff0ddbd86c ("usb: core: add a wrapper for the USB PHYs on the HCD") Fixes: 178a0bce05cbc1 ("usb: core: hcd: integrate the PHY wrapper into the HCD core") Reported-by: Roger Quadros Suggested-by: Roger Quadros Suggested-by: Chunfeng Yun Signed-off-by: Martin Blumenstingl Tested-by: Chunfeng Yun Reviewed-by: Roger Quadros Tested-by: Keerthy Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 8 +++++--- drivers/usb/core/phy.c | 35 +++++++++++++++++++++++++++++++++++ drivers/usb/core/phy.h | 5 +++++ 3 files changed, 45 insertions(+), 3 deletions(-) commit 63cb03f5c11eef2c08b5812f4533ba87cf778fa8 Author: Martin Blumenstingl Date: Wed Apr 18 21:39:47 2018 +0200 usb: core: split usb_phy_roothub_{init,alloc} Before this patch usb_phy_roothub_init served two purposes (from a caller's point of view - like hcd.c): - parsing the PHYs and allocating the list entries - calling phy_init on each list entry While this worked so far it has one disadvantage: if we need to call phy_init for each PHY instance then the existing code cannot be re-used. Solve this by splitting off usb_phy_roothub_alloc which only parses the PHYs and allocates the list entries. usb_phy_roothub_init then gets a struct usb_phy_roothub and only calls phy_init on each PHY instance (along with the corresponding cleanup if that failed somewhere). This is a preparation step for adding proper suspend support for some hardware that requires phy_exit to be called during suspend and phy_init to be called during resume. Signed-off-by: Martin Blumenstingl Tested-by: Chunfeng Yun Reviewed-by: Roger Quadros Tested-by: Keerthy Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 10 +++++++--- drivers/usb/core/phy.c | 53 +++++++++++++++++++++++++------------------------- drivers/usb/core/phy.h | 4 +++- 3 files changed, 37 insertions(+), 30 deletions(-) commit dd40438fc6be7454c906093fe2a1b69ca98946fb Author: Martin Blumenstingl Date: Wed Apr 18 21:39:46 2018 +0200 usb: core: phy: fix return value of usb_phy_roothub_exit() usb_phy_roothub_exit() should return the error code from the phy_exit() call if exiting the PHY failed. However, since a wrong variable is used usb_phy_roothub_exit() currently always returns 0, even if one of the phy_exit calls returned an error. Clang also reports this bug: kernel/drivers/usb/core/phy.c:114:8: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] error, forbidden warning: phy.c:114 Fix this by assigning the error code from phy_exit() to the "ret" variable to propagate the error correctly. Fixes: 07dbff0ddbd86c ("usb: core: add a wrapper for the USB PHYs on the HCD") Signed-off-by: Martin Blumenstingl Signed-off-by: Rishabh Bhatnagar Tested-by: Keerthy Signed-off-by: Greg Kroah-Hartman drivers/usb/core/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1b59e16075f5e5da2943ce8de724ab96bc3c6c2 Author: Heikki Krogerus Date: Wed Apr 18 15:34:10 2018 +0300 usb: typec: ucsi: Increase command completion timeout value On some boards, under heavy load, the EC firmware is unable to complete commands even in one second. Increasing the command completion timeout value to five seconds. Reported-by: Quanxian Wang Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface") Cc: Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c20f53c58261b121d0989e147368803b9773b413 Author: Greg Kroah-Hartman Date: Sun Apr 22 14:31:03 2018 +0200 Revert "xhci: plat: Register shutdown for xhci_plat" This reverts commit b07c12517f2aed0add8ce18146bb426b14099392 It is incomplete and causes hangs on devices when shutting down. It needs a much more "complete" fix in order to work properly. As that fix has not been merged, revert this patch for now before it causes any more problems. Cc: Greg Hackmann Cc: Adam Wallis Cc: Mathias Nyman Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 1 - 1 file changed, 1 deletion(-) commit 3180dabe08e3653bf0a838553905d88f3773f29c Author: Kamil Lulko Date: Thu Apr 19 16:54:02 2018 -0700 usb: core: Add quirk for HP v222w 16GB Mini Add DELAY_INIT quirk to fix the following problem with HP v222w 16GB Mini: usb 1-3: unable to read config index 0 descriptor/start: -110 usb 1-3: can't read configurations, error -110 usb 1-3: can't set config #1, error -110 Signed-off-by: Kamil Lulko Signed-off-by: Kuppuswamy Sathyanarayanan Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) commit 1acc85d82f1510f1176a5f873c30d57ab7a36218 Author: Heikki Krogerus Date: Fri Apr 6 15:41:22 2018 +0300 Documentation: typec.rst: Use literal-block element with ascii art Using reStructuredText literal-block element with ascii-art. That prevents the ascii art from being processed as reStructuredText. Reported-by: Masanari Iida Fixes: bdecb33af34f ("usb: typec: API for controlling USB Type-C Multiplexers") Signed-off-by: Heikki Krogerus Reviewed-by: Jani Nikula Tested-by: Jani Nikula Reported-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/usb/typec.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f860691c2d2e3af1404ffeb2d22dd5c3dbca811 Author: Tobias Regnery Date: Tue Apr 10 10:38:06 2018 +0200 usb: typec: ucsi: fix tracepoint related build error There is the following build error with CONFIG_TYPEC_UCSI=m, CONFIG_FTRACE=y and CONFIG_TRACING=n: ERROR: "__tracepoint_ucsi_command" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! ERROR: "__tracepoint_ucsi_register_port" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! ERROR: "__tracepoint_ucsi_notify" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! ERROR: "__tracepoint_ucsi_reset_ppm" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! ERROR: "__tracepoint_ucsi_run_command" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! ERROR: "__tracepoint_ucsi_ack" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! ERROR: "__tracepoint_ucsi_connector_change" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! This compination is quite hard to create because CONFIG_TRACING gets selected only in rare cases without CONFIG_FTRACE. The build failure is caused by conditionally compiling trace.c depending on the wrong option CONFIG_FTRACE. Change this to depend on CONFIG_TRACING like other users of tracepoints do. Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface") Signed-off-by: Tobias Regnery Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c982482341c64f55daf69b6caa5a2bcd9b43824 Author: Shuah Khan Date: Thu Apr 5 16:29:50 2018 -0600 usbip: usbip_event: fix to not print kernel pointer address Fix it to not print kernel pointer address. Remove the conditional and debug message as it isn't very useful. Signed-off-by: Shuah Khan Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/usbip_event.c | 4 ---- 1 file changed, 4 deletions(-) commit 4bfb141bc01312a817d36627cc47c93f801c216d Author: Shuah Khan Date: Thu Apr 5 16:29:04 2018 -0600 usbip: usbip_host: fix to hold parent lock for device_attach() calls usbip_host calls device_attach() without holding dev->parent lock. Fix it. Signed-off-by: Shuah Khan Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_main.c | 5 +++++ 1 file changed, 5 insertions(+) commit 9020a7efe537856eb3e826ebebdf38a5d07a7857 Author: Shuah Khan Date: Mon Apr 2 14:52:32 2018 -0600 usbip: vhci_hcd: Fix usb device and sockfd leaks vhci_hcd fails to do reset to put usb device and sockfd in the module remove/stop paths. Fix the leak. Signed-off-by: Shuah Khan Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/usbip_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b22f676118ff25049382041da0db8012e57c9e8 Author: Shuah Khan Date: Thu Apr 5 16:31:49 2018 -0600 usbip: vhci_hcd: check rhport before using in vhci_hub_control() Validate !rhport < 0 before using it to access port_status array. Signed-off-by: Shuah Khan Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci_hcd.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 83a62c51ba7b3c0bf45150c4eac7aefc6c785e94 Author: Ravi Chandra Sadineni Date: Fri Apr 20 11:08:21 2018 -0700 USB: Increment wakeup count on remote wakeup. On chromebooks we depend on wakeup count to identify the wakeup source. But currently USB devices do not increment the wakeup count when they trigger the remote wake. This patch addresses the same. Resume condition is reported differently on USB 2.0 and USB 3.0 devices. On USB 2.0 devices, a wake capable device, if wake enabled, drives resume signal to indicate a remote wake (USB 2.0 spec section 7.1.7.7). The upstream facing port then sets C_PORT_SUSPEND bit and reports a port change event (USB 2.0 spec section 11.24.2.7.2.3). Thus if a port has resumed before driving the resume signal from the host and C_PORT_SUSPEND is set, then the device attached to the given port might be the reason for the last system wakeup. Increment the wakeup count for the same. On USB 3.0 devices, a function may signal that it wants to exit from device suspend by sending a Function Wake Device Notification to the host (USB3.0 spec section 8.5.6.4) Thus on receiving the Function Wake, increment the wakeup count. Signed-off-by: Ravi Chandra Sadineni Acked-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 1 + drivers/usb/core/hub.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 65cc02a8e1d4449daedf3a84e9dfdda2e44a5d97 Author: Colin Ian King Date: Fri Mar 23 22:53:50 2018 +0000 batman-adv: don't pass a NULL hard_iface to batadv_hardif_put In the case where hard_iface is NULL, the error path may pass a null pointer to batadv_hardif_put causing a null pointer dereference error. Avoid this by only calling the function if hard_iface not null. Detected by CoverityScan, CID#1466456 ("Explicit null dereferenced") Fixes: 53dd9a68ba68 ("batman-adv: add multicast flags netlink support") Signed-off-by: Colin Ian King Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/multicast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 285848b0f4074f04ab606f1e5dca296482033d54 Merge: 4c50cea d848e5f Author: Linus Torvalds Date: Sat Apr 21 21:20:48 2018 -0700 Merge tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random Pull /dev/random fixes from Ted Ts'o: "Fix some bugs in the /dev/random driver which causes getrandom(2) to unblock earlier than designed. Thanks to Jann Horn from Google's Project Zero for pointing this out to me" * tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: random: add new ioctl RNDRESEEDCRNG random: crng_reseed() should lock the crng instance that it is modifying random: set up the NUMA crng instances after the CRNG is fully initialized random: use a different mixing algorithm for add_device_randomness() random: fix crng_ready() test commit 4c50ceae8f3b56e7c13b327f01e973b4127142a2 Merge: 5e7c780 c579451 Author: Linus Torvalds Date: Sat Apr 21 21:11:05 2018 -0700 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "A regression fix, new unit test infrastructure and a build fix: - Regression fix addressing support for the new NVDIMM label storage area access commands (_LSI, _LSR, and _LSW). The Intel specific version of these commands communicated the "Device Locked" status on the label-storage-information command. However, these new commands (standardized in ACPI 6.2) communicate the "Device Locked" status on the label-storage-read command, and the driver was missing the indication. Reading from locked persistent memory is similar to reading unmapped PCI memory space, returns all 1's. - Unit test infrastructure is added to regression test the "Device Locked" detection failure. - A build fix is included to allow the "of_pmem" driver to be built as a module and translate an Open Firmware described device to its local numa node" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: MAINTAINERS: Add backup maintainers for libnvdimm and DAX device-dax: allow MAP_SYNC to succeed Revert "libnvdimm, of_pmem: workaround OF_NUMA=n build error" libnvdimm, of_pmem: use dev_to_node() instead of of_node_to_nid() tools/testing/nvdimm: enable labels for nfit_test.1 dimms tools/testing/nvdimm: fix missing newline in nfit_test_dimm 'handle' attribute tools/testing/nvdimm: support nfit_test_dimm attributes under nfit_test.1 tools/testing/nvdimm: allow custom error code injection libnvdimm, dimm: handle EACCES failures from label reads commit 5e7c7806111ade52f4e198fa0f576c538fbfb0df Merge: e46096b 8a56ef4 Author: Linus Torvalds Date: Sat Apr 21 10:32:16 2018 -0700 Merge tag 'sound-4.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A few small fixes: - a fix for the NULL-dereference in rawmidi compat ioctls, triggered by fuzzer - HD-audio Realtek codec quirks, a VIA controller fixup - a long-standing bug fix in LINE6 MIDI" * tag 'sound-4.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: rawmidi: Fix missing input substream checks in compat ioctls ALSA: hda/realtek - adjust the location of one mic ALSA: hda/realtek - set PINCFG_HEADSET_MIC to parse_flags ALSA: hda - New VIA controller suppor no-snoop path ALSA: line6: Use correct endpoint type for midi output commit e46096b6a33a698100cbe923f6cf7f05cd5ad1ad Merge: 6488ec2 49d4d27 Author: Linus Torvalds Date: Sat Apr 21 10:28:15 2018 -0700 Merge tag 'linux-watchdog-4.17-rc2' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog fixes from Wim Van Sebroeck: - fall-through fixes - MAINTAINER change for hpwdt - renesas-wdt: Add support for WDIOF_CARDRESET - aspeed: set bootstatus during probe * tag 'linux-watchdog-4.17-rc2' of git://www.linux-watchdog.org/linux-watchdog: aspeed: watchdog: Set bootstatus during probe watchdog: renesas-wdt: Add support for WDIOF_CARDRESET watchdog: wafer5823wdt: Mark expected switch fall-through watchdog: w83977f_wdt: Mark expected switch fall-through watchdog: sch311x_wdt: Mark expected switch fall-through watchdog: hpwdt: change maintainer. commit 6488ec263343337fdb090b15563864b293ce0340 Merge: 9409227 8bf24e8 Author: Linus Torvalds Date: Sat Apr 21 10:26:00 2018 -0700 Merge tag 'linux-kselftest-4.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fix from Shuah Khan: "A fix from Michael Ellerman to not run dnotify_test by default to prevent Kselftest running forever" * tag 'linux-kselftest-4.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/filesystems: Don't run dnotify_test by default commit 9409227ab202938b730219b30d231a242eab5484 Merge: 7a75247 b2d71b3 Author: Linus Torvalds Date: Sat Apr 21 10:20:50 2018 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - kasan: avoid pfn_to_nid() before the page array is initialised - Fix typo causing the "upgrade" of known signals to SIGKILL * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: signal: don't force known signals to SIGKILL arm64: kasan: avoid pfn_to_nid() before page array is initialized commit 7a752478efa617cd5a7d646daa7fc3f4615924f6 Merge: 83beed7 abc1be1 Author: Linus Torvalds Date: Sat Apr 21 08:15:16 2018 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: - "fork: unconditionally clear stack on fork" is a non-bugfix which got lost during the merge window - performance concerns appear to have been adequately addressed. - and a bunch of fixes * emailed patches from Andrew Morton : mm/filemap.c: fix NULL pointer in page_cache_tree_insert() mm: memcg: add __GFP_NOWARN in __memcg_schedule_kmem_cache_create() fs, elf: don't complain MAP_FIXED_NOREPLACE unless -EEXIST error kexec_file: do not add extra alignment to efi memmap proc: fix /proc/loadavg regression proc: revalidate kernel thread inodes to root:root autofs: mount point create should honour passed in mode MAINTAINERS: add personal addresses for Sascha and Uwe kasan: add no_sanitize attribute for clang builds rapidio: fix rio_dma_transfer error handling mm: enable thp migration for shmem thp writeback: safer lock nesting mm, pagemap: fix swap offset value for PMD migration entry mm: fix do_pages_move status handling fork: unconditionally clear stack on fork commit 76974ef9d1bf397b7bb97892a3b3bc516a1fc2c2 Author: Eugen Hristev Date: Mon Apr 16 09:54:03 2018 +0300 iio: adc: select buffer for at91-sama5d2_adc We need to select the buffer code, otherwise we get build errors with undefined functions on the trigger and buffer, if we select just IIO and then AT91_SAMA5D2_ADC from menuconfig This adds a Kconfig 'select' statement like other ADC drivers have it already. Fixes: 5e1a1da0f8c9 ("iio: adc: at91-sama5d2_adc: add hw trigger and buffer support") Signed-off-by: Eugen Hristev Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 6f92253024d9d947a4f454654840ce479e251376 Author: Hans de Goede Date: Sat Apr 14 17:09:09 2018 +0200 iio: hid-sensor-trigger: Fix sometimes not powering up the sensor after resume hid_sensor_set_power_work() powers the sensors back up after a resume based on the user_requested_state atomic_t. But hid_sensor_power_state() treats this as a boolean flag, leading to the following problematic scenario: 1) Some app starts using the iio-sensor in buffered / triggered mode, hid_sensor_data_rdy_trigger_set_state(true) gets called, setting user_requested_state to 1. 2) Something directly accesses a _raw value through sysfs, leading to a call to hid_sensor_power_state(true) followed by hid_sensor_power_state(false) call, this sets user_requested_state to 1 followed by setting it to 0. 3) Suspend/resume the machine, hid_sensor_set_power_work() now does NOT power the sensor back up because user_requested_state (wrongly) is 0. Which stops the app using the sensor in buffered mode from receiving any new values. This commit changes user_requested_state to a counter tracking how many times hid_sensor_power_state(true) was called instead, fixing this. Cc: Bastien Nocera Cc: Srinivas Pandruvada Signed-off-by: Hans de Goede Acked-by: Srinivas Pandruvada Cc: Signed-off-by: Jonathan Cameron drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c042f7e9bb6ad9429ea0f2c9138dc06413198967 Merge: 15a3e84 8a9fd83 Author: Ingo Molnar Date: Sat Apr 21 09:38:33 2018 +0200 Merge tag 'perf-urgent-for-mingo-4.17-20180420' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes and improvements from Arnaldo Carvalho de Melo: - Store context switch out type in PERF_RECORD_SWITCH[_CPU_WIDE]. The percentage of preempting and non-preempting context switches help understanding the nature of workloads (CPU or IO bound) that are running on a machine. This adds the kernel facility and userspace changes needed to show this information in 'perf script' and 'perf report -D' (Alexey Budankov) - Remove old error messages about things that unlikely to be the root cause in modern systems (Andi Kleen) - Synchronize kernel ABI headers, v4.17-rc1 (Ingo Molnar) - Support MAP_FIXED_NOREPLACE, noticed when updating the tools/include/ copies (Arnaldo Carvalho de Melo) - Fixup BPF test using epoll_pwait syscall function probe, to cope with the syscall routines renames performed in this development cycle (Arnaldo Carvalho de Melo) - Fix sample_max_stack maximum check and do not proceed when an error has been detect, return them to avoid misidentifying errors (Jiri Olsa) - Add '\n' at the end of parse-options error messages (Ravi Bangoria) - Add s390 support for detailed/verbose PMU event description (Thomas Richter) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit abc1be13fd113ddef5e2d807a466286b864caed3 Author: Matthew Wilcox Date: Fri Apr 20 14:56:20 2018 -0700 mm/filemap.c: fix NULL pointer in page_cache_tree_insert() f2fs specifies the __GFP_ZERO flag for allocating some of its pages. Unfortunately, the page cache also uses the mapping's GFP flags for allocating radix tree nodes. It always masked off the __GFP_HIGHMEM flag, and masks off __GFP_ZERO in some paths, but not all. That causes radix tree nodes to be allocated with a NULL list_head, which causes backtraces like: __list_del_entry+0x30/0xd0 list_lru_del+0xac/0x1ac page_cache_tree_insert+0xd8/0x110 The __GFP_DMA and __GFP_DMA32 flags would also be able to sneak through if they are ever used. Fix them all by using GFP_RECLAIM_MASK at the innermost location, and remove it from earlier in the callchain. Link: http://lkml.kernel.org/r/20180411060320.14458-2-willy@infradead.org Fixes: 449dd6984d0e ("mm: keep page cache radix tree nodes in check") Signed-off-by: Matthew Wilcox Reported-by: Chris Fries Debugged-by: Minchan Kim Acked-by: Johannes Weiner Acked-by: Michal Hocko Reviewed-by: Jan Kara Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit c892fd82cc0632d425ae011a4dd75eb59e9f84ee Author: Minchan Kim Date: Fri Apr 20 14:56:17 2018 -0700 mm: memcg: add __GFP_NOWARN in __memcg_schedule_kmem_cache_create() If there is heavy memory pressure, page allocation with __GFP_NOWAIT fails easily although it's order-0 request. I got below warning 9 times for normal boot. : page allocation failure: order:0, mode:0x2200000(GFP_NOWAIT|__GFP_NOTRACK) .. snip .. Call trace: dump_backtrace+0x0/0x4 dump_stack+0xa4/0xc0 warn_alloc+0xd4/0x15c __alloc_pages_nodemask+0xf88/0x10fc alloc_slab_page+0x40/0x18c new_slab+0x2b8/0x2e0 ___slab_alloc+0x25c/0x464 __kmalloc+0x394/0x498 memcg_kmem_get_cache+0x114/0x2b8 kmem_cache_alloc+0x98/0x3e8 mmap_region+0x3bc/0x8c0 do_mmap+0x40c/0x43c vm_mmap_pgoff+0x15c/0x1e4 sys_mmap+0xb0/0xc8 el0_svc_naked+0x24/0x28 Mem-Info: active_anon:17124 inactive_anon:193 isolated_anon:0 active_file:7898 inactive_file:712955 isolated_file:55 unevictable:0 dirty:27 writeback:18 unstable:0 slab_reclaimable:12250 slab_unreclaimable:23334 mapped:19310 shmem:212 pagetables:816 bounce:0 free:36561 free_pcp:1205 free_cma:35615 Node 0 active_anon:68496kB inactive_anon:772kB active_file:31592kB inactive_file:2851820kB unevictable:0kB isolated(anon):0kB isolated(file):220kB mapped:77240kB dirty:108kB writeback:72kB shmem:848kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no DMA free:142188kB min:3056kB low:3820kB high:4584kB active_anon:10052kB inactive_anon:12kB active_file:312kB inactive_file:1412620kB unevictable:0kB writepending:0kB present:1781412kB managed:1604728kB mlocked:0kB slab_reclaimable:3592kB slab_unreclaimable:876kB kernel_stack:400kB pagetables:52kB bounce:0kB free_pcp:1436kB local_pcp:124kB free_cma:142492kB lowmem_reserve[]: 0 1842 1842 Normal free:4056kB min:4172kB low:5212kB high:6252kB active_anon:58376kB inactive_anon:760kB active_file:31348kB inactive_file:1439040kB unevictable:0kB writepending:180kB present:2000636kB managed:1923688kB mlocked:0kB slab_reclaimable:45408kB slab_unreclaimable:92460kB kernel_stack:9680kB pagetables:3212kB bounce:0kB free_pcp:3392kB local_pcp:688kB free_cma:0kB lowmem_reserve[]: 0 0 0 DMA: 0*4kB 0*8kB 1*16kB (C) 0*32kB 0*64kB 0*128kB 1*256kB (C) 1*512kB (C) 0*1024kB 1*2048kB (C) 34*4096kB (C) = 142096kB Normal: 228*4kB (UMEH) 172*8kB (UMH) 23*16kB (UH) 24*32kB (H) 5*64kB (H) 1*128kB (H) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 3872kB 721350 total pagecache pages 0 pages in swap cache Swap cache stats: add 0, delete 0, find 0/0 Free swap = 0kB Total swap = 0kB 945512 pages RAM 0 pages HighMem/MovableOnly 63408 pages reserved 51200 pages cma reserved __memcg_schedule_kmem_cache_create() tries to create a shadow slab cache and the worker allocation failure is not really critical because we will retry on the next kmem charge. We might miss some charges but that shouldn't be critical. The excessive allocation failure report is not very helpful. [mhocko@kernel.org: changelog update] Link: http://lkml.kernel.org/r/20180418022912.248417-1-minchan@kernel.org Signed-off-by: Minchan Kim Acked-by: Johannes Weiner Reviewed-by: Andrew Morton Cc: Michal Hocko Cc: Vladimir Davydov Cc: Minchan Kim Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d23a61ee90af38bb4a65decf76e798e65b401482 Author: Tetsuo Handa Date: Fri Apr 20 14:56:13 2018 -0700 fs, elf: don't complain MAP_FIXED_NOREPLACE unless -EEXIST error Commit 4ed28639519c ("fs, elf: drop MAP_FIXED usage from elf_map") is printing spurious messages under memory pressure due to map_addr == -ENOMEM. 9794 (a.out): Uhuuh, elf segment at 00007f2e34738000(fffffffffffffff4) requested but the memory is mapped already 14104 (a.out): Uhuuh, elf segment at 00007f34fd76c000(fffffffffffffff4) requested but the memory is mapped already 16843 (a.out): Uhuuh, elf segment at 00007f930ecc7000(fffffffffffffff4) requested but the memory is mapped already Complain only if -EEXIST, and use %px for printing the address. Link: http://lkml.kernel.org/r/201804182307.FAC17665.SFMOFJVFtHOLOQ@I-love.SAKURA.ne.jp Fixes: 4ed28639519c7bad ("fs, elf: drop MAP_FIXED usage from elf_map") is Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Cc: Andrei Vagin Cc: Khalid Aziz Cc: Michael Ellerman Cc: Kees Cook Cc: Abdul Haleem Cc: Joel Stanley Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/binfmt_elf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a841aa83dff0af75c88aa846ba610a8af4c5ee21 Author: Dave Young Date: Fri Apr 20 14:56:10 2018 -0700 kexec_file: do not add extra alignment to efi memmap Chun-Yi reported a kernel warning message below: WARNING: CPU: 0 PID: 0 at ../mm/early_ioremap.c:182 early_iounmap+0x4f/0x12c() early_iounmap(ffffffffff200180, 00000118) [0] size not consistent 00000120 The problem is x86 kexec_file_load adds extra alignment to the efi memmap: in bzImage64_load(): efi_map_sz = efi_get_runtime_map_size(); efi_map_sz = ALIGN(efi_map_sz, 16); And __efi_memmap_init maps with the size including the alignment bytes but efi_memmap_unmap use nr_maps * desc_size which does not include the extra bytes. The alignment in kexec code is only needed for the kexec buffer internal use Actually kexec should pass exact size of the efi memmap to 2nd kernel. Link: http://lkml.kernel.org/r/20180417083600.GA1972@dhcp-128-65.nay.redhat.com Signed-off-by: Dave Young Reported-by: joeyli Tested-by: Randy Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kernel/kexec-bzimage64.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9a1015b32faa7cebfe19663c886b0cfe90be1d49 Author: Alexey Dobriyan Date: Fri Apr 20 14:56:06 2018 -0700 proc: fix /proc/loadavg regression Commit 95846ecf9dac ("pid: replace pid bitmap implementation with IDR API") changed last field of /proc/loadavg (last pid allocated) to be off by one: # unshare -p -f --mount-proc cat /proc/loadavg 0.00 0.00 0.00 1/60 2 <=== It should be 1 after first fork into pid namespace. This is formally a regression but given how useless this field is I don't think anyone is affected. Bug was found by /proc testsuite! Link: http://lkml.kernel.org/r/20180413175408.GA27246@avx2 Fixes: 95846ecf9dac508 ("pid: replace pid bitmap implementation with IDR API") Signed-off-by: Alexey Dobriyan Cc: "Eric W. Biederman" Cc: Gargi Sharma Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/platforms/cell/spufs/sched.c | 2 +- fs/proc/loadavg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2e0ad552f5f8cd0fda02bc45fcd2b89821c62fd1 Author: Alexey Dobriyan Date: Fri Apr 20 14:56:03 2018 -0700 proc: revalidate kernel thread inodes to root:root task_dump_owner() has the following code: mm = task->mm; if (mm) { if (get_dumpable(mm) != SUID_DUMP_USER) { uid = ... } } Check for ->mm is buggy -- kernel thread might be borrowing mm and inode will go to some random uid:gid pair. Link: http://lkml.kernel.org/r/20180412220109.GA20978@avx2 Signed-off-by: Alexey Dobriyan Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1e6306652ba18723015d1b4967fe9de55f042499 Author: Ian Kent Date: Fri Apr 20 14:55:59 2018 -0700 autofs: mount point create should honour passed in mode The autofs file system mkdir inode operation blindly sets the created directory mode to S_IFDIR | 0555, ingoring the passed in mode, which can cause selinux dac_override denials. But the function also checks if the caller is the daemon (as no-one else should be able to do anything here) so there's no point in not honouring the passed in mode, allowing the daemon to set appropriate mode when required. Link: http://lkml.kernel.org/r/152361593601.8051.14014139124905996173.stgit@pluto.themaw.net Signed-off-by: Ian Kent Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1551cf740cffc62221a4f13da1892f15b0d36f1e Author: Uwe Kleine-König Date: Fri Apr 20 14:55:56 2018 -0700 MAINTAINERS: add personal addresses for Sascha and Uwe The idea behind using kernel@pengutronix.de (i.e. the mail alias for the kernel people at Pengutronix) as email address was to have a backup when a given developer is on vacation or run over by a bus. Make this more explicit by adding the alias as reviewer and use the personal address for Sascha and me. Link: http://lkml.kernel.org/r/20180413083312.11213-1-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Acked-by: Sascha Hauer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 12c8f25a016dff69ee284aa3338bebfd2cfcba33 Author: Andrey Konovalov Date: Fri Apr 20 14:55:52 2018 -0700 kasan: add no_sanitize attribute for clang builds KASAN uses the __no_sanitize_address macro to disable instrumentation of particular functions. Right now it's defined only for GCC build, which causes false positives when clang is used. This patch adds a definition for clang. Note, that clang's revision 329612 or higher is required. [andreyknvl@google.com: remove redundant #ifdef CONFIG_KASAN check] Link: http://lkml.kernel.org/r/c79aa31a2a2790f6131ed607c58b0dd45dd62a6c.1523967959.git.andreyknvl@google.com Link: http://lkml.kernel.org/r/4ad725cc903f8534f8c8a60f0daade5e3d674f8d.1523554166.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: David Rientjes Cc: Thomas Gleixner Cc: Ingo Molnar Cc: David Woodhouse Cc: Andrey Konovalov Cc: Will Deacon Cc: Greg Kroah-Hartman Cc: Paul Lawrence Cc: Sandipan Das Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compiler-clang.h | 3 +++ 1 file changed, 3 insertions(+) commit c5157b76869ba98c3a99a1982396437464e131a6 Author: Ioan Nicu Date: Fri Apr 20 14:55:49 2018 -0700 rapidio: fix rio_dma_transfer error handling Some of the mport_dma_req structure members were initialized late inside the do_dma_request() function, just before submitting the request to the dma engine. But we have some error branches before that. In case of such an error, the code would return on the error path and trigger the calling of dma_req_free() with a req structure which is not completely initialized. This causes a NULL pointer dereference in dma_req_free(). This patch fixes these error branches by making sure that all necessary mport_dma_req structure members are initialized in rio_dma_transfer() immediately after the request structure gets allocated. Link: http://lkml.kernel.org/r/20180412150605.GA31409@nokia.com Fixes: bbd876adb8c72 ("rapidio: use a reference count for struct mport_dma_req") Signed-off-by: Ioan Nicu Tested-by: Alexander Sverdlin Acked-by: Alexandre Bounine Cc: Barry Wood Cc: Matt Porter Cc: Christophe JAILLET Cc: Logan Gunthorpe Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Frank Kunz Cc: [4.6+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/rio_mport_cdev.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit e71769ae52609ea0044a9901709042e5634c2306 Author: Naoya Horiguchi Date: Fri Apr 20 14:55:45 2018 -0700 mm: enable thp migration for shmem thp My testing for the latest kernel supporting thp migration showed an infinite loop in offlining the memory block that is filled with shmem thps. We can get out of the loop with a signal, but kernel should return with failure in this case. What happens in the loop is that scan_movable_pages() repeats returning the same pfn without any progress. That's because page migration always fails for shmem thps. In memory offline code, memory blocks containing unmovable pages should be prevented from being offline targets by has_unmovable_pages() inside start_isolate_page_range(). So it's possible to change migratability for non-anonymous thps to avoid the issue, but it introduces more complex and thp-specific handling in migration code, so it might not good. So this patch is suggesting to fix the issue by enabling thp migration for shmem thp. Both of anon/shmem thp are migratable so we don't need precheck about the type of thps. Link: http://lkml.kernel.org/r/20180406030706.GA2434@hori1.linux.bs1.fc.nec.co.jp Fixes: commit 72b39cfc4d75 ("mm, memory_hotplug: do not fail offlining too early") Signed-off-by: Naoya Horiguchi Acked-by: Kirill A. Shutemov Cc: Zi Yan Cc: Vlastimil Babka Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 5 ++++- mm/migrate.c | 19 ++++++++++++++++--- mm/rmap.c | 3 --- 3 files changed, 20 insertions(+), 7 deletions(-) commit 2e898e4c0a3897ccd434adac5abb8330194f527b Author: Greg Thelen Date: Fri Apr 20 14:55:42 2018 -0700 writeback: safer lock nesting lock_page_memcg()/unlock_page_memcg() use spin_lock_irqsave/restore() if the page's memcg is undergoing move accounting, which occurs when a process leaves its memcg for a new one that has memory.move_charge_at_immigrate set. unlocked_inode_to_wb_begin,end() use spin_lock_irq/spin_unlock_irq() if the given inode is switching writeback domains. Switches occur when enough writes are issued from a new domain. This existing pattern is thus suspicious: lock_page_memcg(page); unlocked_inode_to_wb_begin(inode, &locked); ... unlocked_inode_to_wb_end(inode, locked); unlock_page_memcg(page); If both inode switch and process memcg migration are both in-flight then unlocked_inode_to_wb_end() will unconditionally enable interrupts while still holding the lock_page_memcg() irq spinlock. This suggests the possibility of deadlock if an interrupt occurs before unlock_page_memcg(). truncate __cancel_dirty_page lock_page_memcg unlocked_inode_to_wb_begin unlocked_inode_to_wb_end end_page_writeback test_clear_page_writeback lock_page_memcg unlock_page_memcg Due to configuration limitations this deadlock is not currently possible because we don't mix cgroup writeback (a cgroupv2 feature) and memory.move_charge_at_immigrate (a cgroupv1 feature). If the kernel is hacked to always claim inode switching and memcg moving_account, then this script triggers lockup in less than a minute: cd /mnt/cgroup/memory mkdir a b echo 1 > a/memory.move_charge_at_immigrate echo 1 > b/memory.move_charge_at_immigrate ( echo $BASHPID > a/cgroup.procs while true; do dd if=/dev/zero of=/mnt/big bs=1M count=256 done ) & while true; do sync done & sleep 1h & SLEEP=$! while true; do echo $SLEEP > a/cgroup.procs echo $SLEEP > b/cgroup.procs done The deadlock does not seem possible, so it's debatable if there's any reason to modify the kernel. I suggest we should to prevent future surprises. And Wang Long said "this deadlock occurs three times in our environment", so there's more reason to apply this, even to stable. Stable 4.4 has minor conflicts applying this patch. For a clean 4.4 patch see "[PATCH for-4.4] writeback: safer lock nesting" https://lkml.org/lkml/2018/4/11/146 Wang Long said "this deadlock occurs three times in our environment" [gthelen@google.com: v4] Link: http://lkml.kernel.org/r/20180411084653.254724-1-gthelen@google.com [akpm@linux-foundation.org: comment tweaks, struct initialization simplification] Change-Id: Ibb773e8045852978f6207074491d262f1b3fb613 Link: http://lkml.kernel.org/r/20180410005908.167976-1-gthelen@google.com Fixes: 682aa8e1a6a1 ("writeback: implement unlocked_inode_to_wb transaction and use it for stat updates") Signed-off-by: Greg Thelen Reported-by: Wang Long Acked-by: Wang Long Acked-by: Michal Hocko Reviewed-by: Andrew Morton Cc: Johannes Weiner Cc: Tejun Heo Cc: Nicholas Piggin Cc: [v4.2+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fs-writeback.c | 7 ++++--- include/linux/backing-dev-defs.h | 5 +++++ include/linux/backing-dev.h | 30 ++++++++++++++++-------------- mm/page-writeback.c | 18 +++++++++--------- 4 files changed, 34 insertions(+), 26 deletions(-) commit 88c28f2469151b031f8cea9b28ed5be1b74a4172 Author: Huang Ying Date: Fri Apr 20 14:55:38 2018 -0700 mm, pagemap: fix swap offset value for PMD migration entry The swap offset reported by /proc//pagemap may be not correct for PMD migration entries. If addr passed into pagemap_pmd_range() isn't aligned with PMD start address, the swap offset reported doesn't reflect this. And in the loop to report information of each sub-page, the swap offset isn't increased accordingly as that for PFN. This may happen after opening /proc//pagemap and seeking to a page whose address doesn't align with a PMD start address. I have verified this with a simple test program. BTW: migration swap entries have PFN information, do we need to restrict whether to show them? [akpm@linux-foundation.org: fix typo, per Huang, Ying] Link: http://lkml.kernel.org/r/20180408033737.10897-1-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Michal Hocko Cc: "Kirill A. Shutemov" Cc: Andrei Vagin Cc: Dan Williams Cc: "Jerome Glisse" Cc: Daniel Colascione Cc: Zi Yan Cc: Naoya Horiguchi Cc: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8f175cf5c99dc0e3add2aac0ea1cd54e0f9ca87d Author: Michal Hocko Date: Fri Apr 20 14:55:35 2018 -0700 mm: fix do_pages_move status handling Li Wang has reported that LTP move_pages04 test fails with the current tree: LTP move_pages04: TFAIL : move_pages04.c:143: status[1] is EPERM, expected EFAULT The test allocates an array of two pages, one is present while the other is not (resp. backed by zero page) and it expects EFAULT for the second page as the man page suggests. We are reporting EPERM which doesn't make any sense and this is a result of a bug from cf5f16b23ec9 ("mm: unclutter THP migration"). do_pages_move tries to handle as many pages in one batch as possible so we queue all pages with the same node target together and that corresponds to [start, i] range which is then used to update status array. add_page_for_migration will correctly notice the zero (resp. !present) page and returns with EFAULT which gets written to the status. But if this is the last page in the array we do not update start and so the last store_status after the loop will overwrite the range of the last batch with NUMA_NO_NODE (which corresponds to EPERM). Fix this by simply bailing out from the last flush if the pagelist is empty as there is clearly nothing more to do. Link: http://lkml.kernel.org/r/20180418121255.334-1-mhocko@kernel.org Fixes: cf5f16b23ec9 ("mm: unclutter THP migration") Signed-off-by: Michal Hocko Reported-by: Li Wang Tested-by: Li Wang Cc: Zi Yan Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 3 +++ 1 file changed, 3 insertions(+) commit e01e80634ecdde1dd113ac43b3adad21b47f3957 Author: Kees Cook Date: Fri Apr 20 14:55:31 2018 -0700 fork: unconditionally clear stack on fork One of the classes of kernel stack content leaks[1] is exposing the contents of prior heap or stack contents when a new process stack is allocated. Normally, those stacks are not zeroed, and the old contents remain in place. In the face of stack content exposure flaws, those contents can leak to userspace. Fixing this will make the kernel no longer vulnerable to these flaws, as the stack will be wiped each time a stack is assigned to a new process. There's not a meaningful change in runtime performance; it almost looks like it provides a benefit. Performing back-to-back kernel builds before: Run times: 157.86 157.09 158.90 160.94 160.80 Mean: 159.12 Std Dev: 1.54 and after: Run times: 159.31 157.34 156.71 158.15 160.81 Mean: 158.46 Std Dev: 1.46 Instead of making this a build or runtime config, Andy Lutomirski recommended this just be enabled by default. [1] A noisy search for many kinds of stack content leaks can be seen here: https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=linux+kernel+stack+leak I did some more with perf and cycle counts on running 100,000 execs of /bin/true. before: Cycles: 218858861551 218853036130 214727610969 227656844122 224980542841 Mean: 221015379122.60 Std Dev: 4662486552.47 after: Cycles: 213868945060 213119275204 211820169456 224426673259 225489986348 Mean: 217745009865.40 Std Dev: 5935559279.99 It continues to look like it's faster, though the deviation is rather wide, but I'm not sure what I could do that would be less noisy. I'm open to ideas! Link: http://lkml.kernel.org/r/20180221021659.GA37073@beast Signed-off-by: Kees Cook Acked-by: Michal Hocko Reviewed-by: Andrew Morton Cc: Andy Lutomirski Cc: Laura Abbott Cc: Rasmus Villemoes Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/thread_info.h | 6 +----- kernel/fork.c | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) commit f5957dade4f373b04fa1f5315a489f18cc2c4cb4 Author: Bryant G Ly Date: Tue Apr 17 10:33:21 2018 -0500 scsi: target: Fix fortify_panic kernel exception memcmp() requires the two buffers passed as arguments to be at least 'size' bytes long, otherwise a fortify_panic will trigger. Use memchr_inv() instead of memcmp() to determine whether the received payload is zeroed or not. The bug was found by running a block backstore via LIO. [ 496.212958] Call Trace: [ 496.212960] [c0000007e58e3800] [c000000000cbbefc] fortify_panic+0x24/0x38 (unreliable) [ 496.212965] [c0000007e58e3860] [d00000000f150c28] iblock_execute_write_same+0x3b8/0x3c0 [target_core_iblock] [ 496.212976] [c0000007e58e3910] [d000000006c737d4] __target_execute_cmd+0x54/0x150 [target_core_mod] [ 496.212982] [c0000007e58e3940] [d000000006d32ce4] ibmvscsis_write_pending+0x74/0xe0 [ibmvscsis] [ 496.212991] [c0000007e58e39b0] [d000000006c74fc8] transport_generic_new_cmd+0x318/0x370 [target_core_mod] [ 496.213001] [c0000007e58e3a30] [d000000006c75084] transport_handle_cdb_direct+0x64/0xd0 [target_core_mod] [ 496.213011] [c0000007e58e3aa0] [d000000006c75298] target_submit_cmd_map_sgls+0x1a8/0x320 [target_core_mod] [ 496.213021] [c0000007e58e3b30] [d000000006c75458] target_submit_cmd+0x48/0x60 [target_core_mod] [ 496.213026] [c0000007e58e3bd0] [d000000006d34c20] ibmvscsis_scheduler+0x370/0x600 [ibmvscsis] [ 496.213031] [c0000007e58e3c90] [c00000000013135c] process_one_work+0x1ec/0x580 [ 496.213035] [c0000007e58e3d20] [c000000000131798] worker_thread+0xa8/0x600 [ 496.213039] [c0000007e58e3dc0] [c00000000013a468] kthread+0x168/0x1b0 [ 496.213044] [c0000007e58e3e30] [c00000000000b528] ret_from_kernel_thread+0x5c/0xb4 [mkp: tweaked commit message] Fixes: 2237498f0b5c ("target/iblock: Convert WRITE_SAME to blkdev_issue_zeroout") Signed-off-by: Bryant G. Ly Reviewed-by: Steven Royer Tested-by: Taylor Jakobson Cc: Christoph Hellwig Cc: Nicholas Bellinger Cc: # v4.13+ Signed-off-by: Martin K. Petersen drivers/target/target_core_iblock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4bc83b3f272fe8f36450f9c003df49cf07ffe5fd Author: Colin Ian King Date: Fri Apr 20 10:57:16 2018 +0100 scsi: isci: Fix infinite loop in while loop In the case when the phy_mask is bitwise anded with the phy_index bit is zero the continue statement currently jumps to the next iteration of the while loop and phy_index is never actually incremented, potentially causing an infinite loop if phy_index is less than SCI_MAX_PHS. Fix this by turning the while loop into a for loop. Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/isci/port_config.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 007b4e8b705a4eff184d567c5a8b496622f9e116 Author: Marc Gonzalez Date: Thu Apr 5 14:57:59 2018 +0200 mtd: rawnand: tango: Fix struct clk memory leak Use devm_clk_get() to let Linux manage struct clk memory. Fixes: 6956e2385a16 ("add tango NAND flash controller support") Cc: stable@vger.kernel.org Reported-by: Xidong Wang Signed-off-by: Marc Gonzalez Reviewed-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/tango_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ab690aa439803347743c0d899ac422774fdd5e7 Author: Jann Horn Date: Fri Apr 20 18:16:30 2018 +0200 bpf: sockmap remove dead check Remove dead code that bails on `attr->value_size > KMALLOC_MAX_SIZE` - the previous check already bails on `attr->value_size != 4`. Signed-off-by: Jann Horn Signed-off-by: Daniel Borkmann kernel/bpf/sockmap.c | 3 --- 1 file changed, 3 deletions(-) commit f286299c1d0ba5e2ca0377610307b370fe178767 Author: Long Li Date: Thu Mar 22 14:47:18 2018 -0700 scsi: storvsc: Set up correct queue depth values for IDE devices Unlike SCSI and FC, we don't use multiple channels for IDE. Also fix the calculation for sub-channels. Signed-off-by: Long Li Reviewed-by: Michael Kelley Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 596632de0440baecaccc9d4347329c64661c400f Author: Aurelien Aptel Date: Thu Apr 19 10:44:20 2018 +0200 CIFS: fix typo in cifs_dbg Signed-off-by: Aurelien Aptel Signed-off-by: Steve French Reported-by: Long Li fs/cifs/cifs_debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d0cffa674cfa7d185a302c8c6850fc50b893bed Author: Steve French Date: Fri Apr 20 12:19:07 2018 -0500 cifs: do not allow creating sockets except with SMB1 posix exensions RHBZ: 1453123 Since at least the 3.10 kernel and likely a lot earlier we have not been able to create unix domain sockets in a cifs share when mounted using the SFU mount option (except when mounted with the cifs unix extensions to Samba e.g.) Trying to create a socket, for example using the af_unix command from xfstests will cause : BUG: unable to handle kernel NULL pointer dereference at 00000000 00000040 Since no one uses or depends on being able to create unix domains sockets on a cifs share the easiest fix to stop this vulnerability is to simply not allow creation of any other special files than char or block devices when sfu is used. Added update to Ronnie's patch to handle a tcon link leak, and to address a buf leak noticed by Gustavo and Colin. Acked-by: Gustavo A. R. Silva CC: Colin Ian King Reviewed-by: Pavel Shilovsky Reported-by: Eryu Guan Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Cc: stable@vger.kernel.org fs/cifs/dir.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit f76cdd00ef0e39d880139b074e3b247594dff95a Author: Baolin Wang Date: Thu Apr 19 14:51:03 2018 +0800 parisc: time: Convert read_persistent_clock() to read_persistent_clock64() The read_persistent_clock() uses a timespec, which is not year 2038 safe on 32bit systems. On parisc architecture, we have implemented generic RTC drivers that can be used to compensate the system suspend time, but the RTC time can not represent the nanosecond resolution, so this patch just converts to read_persistent_clock64() with timespec64. Signed-off-by: Baolin Wang Acked-by: Arnd Bergmann Signed-off-by: Helge Deller arch/parisc/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0cf22d6b317ce0103b7d5a47878aa5ef94240433 Author: Jakub Kicinski Date: Fri Apr 20 12:56:36 2018 -0500 PCI: Add "PCIe" to pcie_print_link_status() messages Currently the pcie_print_link_status() will print PCIe bandwidth and link width information but does not mention it is pertaining to the PCIe. Since this and related functions are used exclusively by networking drivers today users may get confused into thinking that it's the NIC bandwidth that is being talked about. Insert a "PCIe" into the messages. Signed-off-by: Jakub Kicinski Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 83beed7b2b26f232d782127792dd0cd4362fdc41 Merge: 7e3cb16 e04907d Author: Linus Torvalds Date: Fri Apr 20 10:56:32 2018 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal Pull thermal fixes from Eduardo Valentin: "A couple of fixes for the thermal subsystem" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal: dt-bindings: thermal: Remove "cooling-{min|max}-level" properties dt-bindings: thermal: remove no longer needed samsung thermal properties commit dd70e51ee01495c1268ee07736352617994aa714 Merge: 60cc43f 5db8f8d Author: Bjorn Helgaas Date: Fri Apr 20 12:55:32 2018 -0500 Merge remote-tracking branch 'lorenzo/pci/host/fixes' into for-linus - correct GPIO name to fix HiSilicon Kirin probing issue (Loic Poulain) - fix MRRS setting in Marvell Armada Aardvark (Evan Wang) - fix interrupts by using ISR1 on Marvell Armada Aardvark (Victor Gu) - fix config accesses on Marvell Armada Aardvark (Victor Gu) * lorenzo/pci/host/fixes: PCI: kirin: Fix reset gpio name PCI: aardvark: Fix PCIe Max Read Request Size setting PCI: aardvark: Use ISR1 instead of ISR0 interrupt in legacy irq mode PCI: aardvark: Set PIO_ADDR_LS correctly in advk_pcie_rd_conf() PCI: aardvark: Fix logic in advk_pcie_{rd,wr}_conf() commit 7e3cb169d3a9ef840db1b73609ebb9e7d20a2f1a Merge: 7768ee3 0cbc94d Author: Linus Torvalds Date: Fri Apr 20 10:41:31 2018 -0700 Merge tag 'mmc-v4.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "A couple of MMC host fixes: - sdhci-pci: Fixup tuning for AMD for eMMC HS200 mode - renesas_sdhi_internal_dmac: Avoid data corruption by limiting DMA RX" * tag 'mmc-v4.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs mmc: sdhci-pci: Only do AMD tuning for HS200 commit 7768ee3f450e96c2ebcc7a9591332bbd1931e0ea Merge: a9e5b73 dba40d4 Author: Linus Torvalds Date: Fri Apr 20 10:39:44 2018 -0700 Merge tag 'md/4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD fixes from Shaohua Li: "Three small fixes for MD: - md-cluster fix for faulty device from Guoqing - writehint fix for writebehind IO for raid1 from Mariusz - a live lock fix for interrupted recovery from Yufen" * tag 'md/4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: raid1: copy write hint from master bio to behind bio md/raid1: exit sync request if MD_RECOVERY_INTR is set md-cluster: don't update recovery_offset for faulty device commit ff30b89e0ab71115cbad6ae10a58bd83fe18b41f Author: Long Li Date: Tue Apr 17 12:17:10 2018 -0700 cifs: smbd: Dump SMB packet when configured When sending through SMB Direct, also dump the packet in SMB send path. Also fixed a typo in debug message. Signed-off-by: Long Li Cc: stable@vger.kernel.org Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg fs/cifs/smbdirect.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c0872323746e11fc79344e3738b283a8cda86654 Author: Qu Wenruo Date: Wed Apr 11 17:08:12 2018 +0800 btrfs: print-tree: debugging output enhancement This patch enhances the following things: - tree block header * add generation and owner output for node and leaf - node pointer generation output - allow btrfs_print_tree() to not follow nodes * just like btrfs-progs Please note that, although function btrfs_print_tree() is not called by anyone right now, it's still a pretty useful function to debug kernel. So that function is still kept for later use. Signed-off-by: Qu Wenruo Reviewed-by: Lu Fengqi Signed-off-by: David Sterba fs/btrfs/print-tree.c | 25 +++++++++++++++---------- fs/btrfs/print-tree.h | 2 +- 2 files changed, 16 insertions(+), 11 deletions(-) commit 5e388e95815408c27f3612190d089afc0774b870 Author: Nikolay Borisov Date: Wed Apr 18 09:41:54 2018 +0300 btrfs: Fix race condition between delayed refs and blockgroup removal When the delayed refs for a head are all run, eventually cleanup_ref_head is called which (in case of deletion) obtains a reference for the relevant btrfs_space_info struct by querying the bg for the range. This is problematic because when the last extent of a bg is deleted a race window emerges between removal of that bg and the subsequent invocation of cleanup_ref_head. This can result in cache being null and either a null pointer dereference or assertion failure. task: ffff8d04d31ed080 task.stack: ffff9e5dc10cc000 RIP: 0010:assfail.constprop.78+0x18/0x1a [btrfs] RSP: 0018:ffff9e5dc10cfbe8 EFLAGS: 00010292 RAX: 0000000000000044 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff8d04ffc1f868 RSI: ffff8d04ffc178c8 RDI: ffff8d04ffc178c8 RBP: ffff8d04d29e5ea0 R08: 00000000000001f0 R09: 0000000000000001 R10: ffff9e5dc0507d58 R11: 0000000000000001 R12: ffff8d04d29e5ea0 R13: ffff8d04d29e5f08 R14: ffff8d04efe29b40 R15: ffff8d04efe203e0 FS: 00007fbf58ead500(0000) GS:ffff8d04ffc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe6c6975648 CR3: 0000000013b2a000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __btrfs_run_delayed_refs+0x10e7/0x12c0 [btrfs] btrfs_run_delayed_refs+0x68/0x250 [btrfs] btrfs_should_end_transaction+0x42/0x60 [btrfs] btrfs_truncate_inode_items+0xaac/0xfc0 [btrfs] btrfs_evict_inode+0x4c6/0x5c0 [btrfs] evict+0xc6/0x190 do_unlinkat+0x19c/0x300 do_syscall_64+0x74/0x140 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x7fbf589c57a7 To fix this, introduce a new flag "is_system" to head_ref structs, which is populated at insertion time. This allows to decouple the querying for the spaceinfo from querying the possibly deleted bg. Fixes: d7eae3403f46 ("Btrfs: rework delayed ref total_bytes_pinned accounting") CC: stable@vger.kernel.org # 4.14+ Suggested-by: Omar Sandoval Signed-off-by: Nikolay Borisov Reviewed-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/delayed-ref.c | 19 ++++++++++++++----- fs/btrfs/delayed-ref.h | 1 + fs/btrfs/extent-tree.c | 16 +++++++++++----- 3 files changed, 26 insertions(+), 10 deletions(-) commit a9e5b73288cf1595ac2e05cf1acd1924ceea05fa Author: David Howells Date: Fri Apr 20 13:35:02 2018 +0100 vfs: Undo an overly zealous MS_RDONLY -> SB_RDONLY conversion In do_mount() when the MS_* flags are being converted to MNT_* flags, MS_RDONLY got accidentally convered to SB_RDONLY. Undo this change. Fixes: e462ec50cb5f ("VFS: Differentiate mount flags (MS_*) from internal superblock flags") Signed-off-by: David Howells Signed-off-by: Linus Torvalds fs/namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 660625922b3d9fcb376e5870299bc5c1086e1d32 Author: David Howells Date: Wed Apr 18 09:38:34 2018 +0100 afs: Fix server record deletion AFS server records get removed from the net->fs_servers tree when they're deleted, but not from the net->fs_addresses{4,6} lists, which can lead to an oops in afs_find_server() when a server record has been removed, for instance during rmmod. Fix this by deleting the record from the by-address lists before posting it for RCU destruction. The reason this hasn't been noticed before is that the fileserver keeps probing the local cache manager, thereby keeping the service record alive, so the oops would only happen when a fileserver eventually gets bored and stops pinging or if the module gets rmmod'd and a call comes in from the fileserver during the window between the server records being destroyed and the socket being closed. The oops looks something like: BUG: unable to handle kernel NULL pointer dereference at 000000000000001c ... Workqueue: kafsd afs_process_async_call [kafs] RIP: 0010:afs_find_server+0x271/0x36f [kafs] ... Call Trace: afs_deliver_cb_init_call_back_state3+0x1f2/0x21f [kafs] afs_deliver_to_call+0x1ee/0x5e8 [kafs] afs_process_async_call+0x5b/0xd0 [kafs] process_one_work+0x2c2/0x504 worker_thread+0x1d4/0x2ac kthread+0x11f/0x127 ret_from_fork+0x24/0x30 Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Signed-off-by: David Howells Signed-off-by: Linus Torvalds fs/afs/server.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit eea0d3ea7546961f69f55b26714ac8fd71c7c020 Author: Stephan Mueller Date: Thu Apr 12 08:40:55 2018 +0200 crypto: drbg - set freed buffers to NULL During freeing of the internal buffers used by the DRBG, set the pointer to NULL. It is possible that the context with the freed buffers is reused. In case of an error during initialization where the pointers do not yet point to allocated memory, the NULL value prevents a double free. Cc: stable@vger.kernel.org Fixes: 3cfc3b9721123 ("crypto: drbg - use aligned buffers") Signed-off-by: Stephan Mueller Reported-by: syzbot+75397ee3df5c70164154@syzkaller.appspotmail.com Signed-off-by: Herbert Xu crypto/drbg.c | 2 ++ 1 file changed, 2 insertions(+) commit a72db42cee37a43f8a40e1f47358ac86921ad8e4 Merge: b9abdcf 1255fcb Author: Linus Torvalds Date: Fri Apr 20 09:34:39 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Unbalanced refcounting in TIPC, from Jon Maloy. 2) Only allow TCP_MD5SIG to be set on sockets in close or listen state. Once the connection is established it makes no sense to change this. From Eric Dumazet. 3) Missing attribute validation in neigh_dump_table(), also from Eric Dumazet. 4) Fix address comparisons in SCTP, from Xin Long. 5) Neigh proxy table clearing can deadlock, from Wolfgang Bumiller. 6) Fix tunnel refcounting in l2tp, from Guillaume Nault. 7) Fix double list insert in team driver, from Paolo Abeni. 8) af_vsock.ko module was accidently made unremovable, from Stefan Hajnoczi. 9) Fix reference to freed llc_sap object in llc stack, from Cong Wang. 10) Don't assume netdevice struct is DMA'able memory in virtio_net driver, from Michael S. Tsirkin. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (62 commits) net/smc: fix shutdown in state SMC_LISTEN bnxt_en: Fix memory fault in bnxt_ethtool_init() virtio_net: sparse annotation fix virtio_net: fix adding vids on big-endian virtio_net: split out ctrl buffer net: hns: Avoid action name truncation docs: ip-sysctl.txt: fix name of some ipv6 variables vmxnet3: fix incorrect dereference when rxvlan is disabled llc: hold llc_sap before release_sock() MAINTAINERS: Direct networking documentation changes to netdev atm: iphase: fix spelling mistake: "Tansmit" -> "Transmit" net: qmi_wwan: add Wistron Neweb D19Q1 net: caif: fix spelling mistake "UKNOWN" -> "UNKNOWN" net: stmmac: Disable ACS Feature for GMAC >= 4 net: mvpp2: Fix DMA address mask size net: change the comment of dev_mc_init net: qualcomm: rmnet: Fix warning seen with fill_info tun: fix vlan packet truncation tipc: fix infinite loop when dumping link monitor summary tipc: fix use-after-free in tipc_nametbl_stop ... commit b346e492d7127e4332d5a9989b844b2095cc4fcd Author: Eric Biggers Date: Mon Apr 16 16:59:13 2018 -0700 crypto: api - fix finding algorithm currently being tested Commit eb02c38f0197 ("crypto: api - Keep failed instances alive") is making allocating crypto transforms sometimes fail with ELIBBAD, when multiple processes try to access encrypted files with fscrypt for the first time since boot. The problem is that the "request larval" for the algorithm is being mistaken for an algorithm which failed its tests. Fix it by only returning ELIBBAD for "non-larval" algorithms. Also don't leak a reference to the algorithm. Fixes: eb02c38f0197 ("crypto: api - Keep failed instances alive") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/api.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit b9abdcfd10f12c174c7118aa68244db1d8a3c9a6 Merge: 43f70c9 16a34ad Author: Linus Torvalds Date: Fri Apr 20 09:15:14 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "Assorted fixes. Some of that is only a matter with fault injection (broken handling of small allocation failure in various mount-related places), but the last one is a root-triggerable stack overflow, and combined with userns it gets really nasty ;-/" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: Don't leak MNT_INTERNAL away from internal mounts mm,vmscan: Allow preallocating memory for register_shrinker(). rpc_pipefs: fix double-dput() orangefs_kill_sb(): deal with allocation failures jffs2_kill_sb(): deal with failed allocations hypfs_kill_super(): deal with failed allocations commit 43f70c960180c11d64ee3e9e53075fe1acd43ff1 Merge: 0d9cf33 e86281e Author: Linus Torvalds Date: Fri Apr 20 09:08:37 2018 -0700 Merge tag 'ecryptfs-4.17-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs Pull eCryptfs fixes from Tyler Hicks: "Minor cleanups and a bug fix to completely ignore unencrypted filenames in the lower filesystem when filename encryption is enabled at the eCryptfs layer" * tag 'ecryptfs-4.17-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs: eCryptfs: don't pass up plaintext names when using filename encryption ecryptfs: fix spelling mistake: "cadidate" -> "candidate" ecryptfs: lookup: Don't check if mount_crypt_stat is NULL commit 0d9cf33b4aabd8de03f80659ceae967ba2b3ba30 Merge: 4d18905 44f06ba Author: Linus Torvalds Date: Fri Apr 20 09:01:26 2018 -0700 Merge tag 'for_v4.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs - isofs memory leak fix - two fsnotify fixes of event mask handling - udf fix of UTF-16 handling - couple other smaller cleanups * tag 'for_v4.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: Fix leak of UTF-16 surrogates into encoded strings fs: ext2: Adding new return type vm_fault_t isofs: fix potential memory leak in mount option parsing MAINTAINERS: add an entry for FSNOTIFY infrastructure fsnotify: fix typo in a comment about mark->g_list fsnotify: fix ignore mask logic in send_to_group() isofs compress: Remove VLA usage fs: quota: Replace GFP_ATOMIC with GFP_KERNEL in dquot_init fanotify: fix logic of events on child commit 4d1890531413a19d63cb980fee6d9d3ff86d97ad Merge: 41e3bef b658912 Author: Linus Torvalds Date: Fri Apr 20 08:55:30 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID updates from Jiri Kosina: - suspend/resume handling fix for Raydium I2C-connected touchscreen from Aaron Ma - protocol fixup for certain BT-connected Wacoms from Aaron Armstrong Skomra - battery level reporting fix on BT-connected mice from Dmitry Torokhov - hidraw race condition fix from Rodrigo Rivas Costa * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: i2c-hid: fix inverted return value from i2c_hid_command() HID: i2c-hid: Fix resume issue on Raydium touchscreen device HID: wacom: bluetooth: send exit report for recent Bluetooth devices HID: hidraw: Fix crash on HIDIOCGFEATURE with a destroyed device HID: input: fix battery level reporting on BT mice commit 41e3bef52e42c03cb7234f2d8419352478c92926 Merge: 36e584d 3b2c77d Author: Linus Torvalds Date: Fri Apr 20 08:51:55 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching Pull livepatching fix from Jiri Kosina: "Shadow variable API list_head initialization fix from Petr Mladek" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching: livepatch: Allow to call a custom callback when freeing shadow variables livepatch: Initialize shadow variables safely by a custom callback commit 36e584de256a8155a292a96288bd78a3a328aa4f Merge: 854da23 ebf04f3 Author: Linus Torvalds Date: Fri Apr 20 08:36:04 2018 -0700 Merge tag 'for-linus-4.17-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - some fixes of kmalloc() flags - one fix of the xenbus driver - an update of the pv sound driver interface needed for a driver which will go through the sound tree * tag 'for-linus-4.17-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: xenbus_dev_frontend: Really return response string xen/sndif: Sync up with the canonical definition in Xen xen: xen-pciback: Replace GFP_ATOMIC with GFP_KERNEL in pcistub_reg_add xen: xen-pciback: Replace GFP_ATOMIC with GFP_KERNEL in xen_pcibk_config_quirks_init xen: xen-pciback: Replace GFP_ATOMIC with GFP_KERNEL in pcistub_device_alloc xen: xen-pciback: Replace GFP_ATOMIC with GFP_KERNEL in pcistub_init_device xen: xen-pciback: Replace GFP_ATOMIC with GFP_KERNEL in pcistub_probe commit 85bd0ba1ff9875798fad94218b627ea9f768f3c3 Author: Marc Zyngier Date: Sun Jan 21 16:42:56 2018 +0000 arm/arm64: KVM: Add PSCI version selection API Although we've implemented PSCI 0.1, 0.2 and 1.0, we expose either 0.1 or 1.0 to a guest, defaulting to the latest version of the PSCI implementation that is compatible with the requested version. This is no different from doing a firmware upgrade on KVM. But in order to give a chance to hypothetical badly implemented guests that would have a fit by discovering something other than PSCI 0.2, let's provide a new API that allows userspace to pick one particular version of the API. This is implemented as a new class of "firmware" registers, where we expose the PSCI version. This allows the PSCI version to be save/restored as part of a guest migration, and also set to any supported version if the guest requires it. Cc: stable@vger.kernel.org #4.16 Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Documentation/virtual/kvm/api.txt | 9 ++++- Documentation/virtual/kvm/arm/psci.txt | 30 +++++++++++++++++ arch/arm/include/asm/kvm_host.h | 3 ++ arch/arm/include/uapi/asm/kvm.h | 6 ++++ arch/arm/kvm/guest.c | 13 ++++++++ arch/arm64/include/asm/kvm_host.h | 3 ++ arch/arm64/include/uapi/asm/kvm.h | 6 ++++ arch/arm64/kvm/guest.c | 14 +++++++- include/kvm/arm_psci.h | 16 +++++++-- virt/kvm/arm/psci.c | 60 ++++++++++++++++++++++++++++++++++ 10 files changed, 156 insertions(+), 4 deletions(-) commit 854da238752775ba399890f54d4ef75f57c6aae8 Merge: d08de37b b3d7e55 Author: Linus Torvalds Date: Fri Apr 20 08:25:31 2018 -0700 Merge tag 'mips_fixes_4.17_1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips Pull MIPS fixes from James Hogan: - io: Add barriers to read*() & write*() - dts: Fix boston PCI bus DTC warnings (4.17) - memset: Several corner case fixes (one 3.10, others longer) * tag 'mips_fixes_4.17_1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips: MIPS: uaccess: Add micromips clobbers to bzero invocation MIPS: memset.S: Fix clobber of v1 in last_fixup MIPS: memset.S: Fix return of __clear_user from Lpartial_fixup MIPS: memset.S: EVA & fault support for small_memset MIPS: dts: Boston: Fix PCI bus dtc warnings: MIPS: io: Add barrier after register read in readX() MIPS: io: Prevent compiler reordering writeX() commit d08de37b8c3ec9d650a346b50cf3698c5b00a6bc Merge: c2d94c5 56376c5 Author: Linus Torvalds Date: Fri Apr 20 08:23:30 2018 -0700 Merge tag 'powerpc-4.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix an off-by-one bug in our alternative asm patching which leads to incorrectly patched code. This bug lay dormant for nearly 10 years but we finally hit it due to a recent change. - Fix lockups when running KVM guests on Power8 due to a missing check when a thread that's running KVM comes out of idle. - Fix an out-of-spec behaviour in the XIVE code (P9 interrupt controller). - Fix EEH handling of bridge MMIO windows. - Prevent crashes in our RFI fallback flush handler if firmware didn't tell us the size of the L1 cache (only seen on simulators). Thanks to: Benjamin Herrenschmidt, Madhavan Srinivasan, Michael Neuling. * tag 'powerpc-4.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/kvm: Fix lockups when running KVM guests on Power8 powerpc/eeh: Fix enabling bridge MMIO windows powerpc/xive: Fix trying to "push" an already active pool VP powerpc/64s: Default l1d_size to 64K in RFI fallback flush powerpc/lib: Fix off-by-one in alternate feature patching commit c2d94c5214905fd67ddfd7ad21729ca129e4e02d Merge: 87ef120 fae7649 Author: Linus Torvalds Date: Fri Apr 20 08:01:38 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes and kexec-file-load from Martin Schwidefsky: "After the common code kexec patches went in via Andrew we can now push the architecture parts to implement the kexec-file-load system call. Plus a few more bug fixes and cleanups, this includes an update to the default configurations" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/signal: cleanup uapi struct sigaction s390: rename default_defconfig to debug_defconfig s390: remove gcov defconfig s390: update defconfig s390: add support for IBM z14 Model ZR1 s390: remove couple of duplicate includes s390/boot: remove unused COMPILE_VERSION and ccflags-y s390/nospec: include cpu.h s390/decompressor: Ignore file vmlinux.bin.full s390/kexec_file: add generated files to .gitignore s390/Kconfig: Move kexec config options to "Processor type and features" s390/kexec_file: Add ELF loader s390/kexec_file: Add crash support to image loader s390/kexec_file: Add image loader s390/kexec_file: Add kexec_file_load system call s390/kexec_file: Add purgatory s390/kexec_file: Prepare setup.h for kexec_file_load s390/smsgiucv: disable SMSG on module unload s390/sclp: avoid potential usage of uninitialized value commit 3ae2da7b28b393d4f6faef3d384cc725ef39716b Author: Gregory CLEMENT Date: Fri Apr 20 16:52:52 2018 +0300 usb: host: xhci-plat: Fix clock resource by adding a register clock On Armada 7K/8K we need to explicitly enable the register clock. This clock is optional because not all the SoCs using this IP need it but at least for Armada 7K/8K it is actually mandatory. The change was done at xhci-plat level and not at a xhci-mvebu.c because, it is expected that other SoC would have this kind of constraint. The binding documentation is updating accordingly. Signed-off-by: Gregory CLEMENT Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/usb-xhci.txt | 5 ++++- drivers/usb/host/xhci-plat.c | 25 ++++++++++++++++++---- drivers/usb/host/xhci.h | 3 ++- 3 files changed, 27 insertions(+), 6 deletions(-) commit 2d79609bf21eedb2142f9dff7d4af9919cd7399a Author: Gregory CLEMENT Date: Fri Apr 20 16:52:51 2018 +0300 usb: host: xhci-plat: Remove useless test before clk_disable_unprepare clk_disable_unprepare() already checks that the clock pointer is valid. No need to test it before calling it. Signed-off-by: Gregory CLEMENT Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 621faf4f6a181b6e012c1d1865213f36f4159b7f Author: Kai-Heng Feng Date: Fri Apr 20 16:52:50 2018 +0300 xhci: Fix USB ports for Dell Inspiron 5775 The Dell Inspiron 5775 is a Raven Ridge. The Enable Slot command timed out when a USB device gets plugged: [ 212.156326] xhci_hcd 0000:03:00.3: Error while assigning device slot ID [ 212.156340] xhci_hcd 0000:03:00.3: Max number of devices this xHCI host supports is 64. [ 212.156348] usb usb2-port3: couldn't allocate usb_device AMD suggests that a delay before xHC suspends can fix the issue. I can confirm it fixes the issue, so use the suspend delay quirk for Raven Ridge's xHC. Cc: stable@vger.kernel.org Signed-off-by: Kai-Heng Feng Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 15a3e845b01ce2342cf187dc123c92c44c3c8170 Author: Oskar Senft Date: Fri Mar 23 09:11:30 2018 -0400 perf/x86/intel/uncore: Fix SBOX support for Broadwell CPUs SBOX on some Broadwell CPUs is broken because it's enabled unconditionally despite the fact that there are no SBOXes available. Check the Power Control Unit CAPID4 register to determine the number of available SBOXes on the particular CPU before trying to enable them. If there are none, nullify the SBOX descriptor so it isn't tried to be initialized. Signed-off-by: Oskar Senft Signed-off-by: Thomas Gleixner Tested-by: Mark van Dijk Reviewed-by: Kan Liang Acked-by: Peter Zijlstra Cc: ak@linux.intel.com Cc: peterz@infradead.org Cc: eranian@google.com Link: https://lkml.kernel.org/r/1521810690-2576-2-git-send-email-kan.liang@linux.intel.com arch/x86/events/intel/uncore_snbep.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit d7717587ac6deae00e0b66c0113a046be2c6fb1c Author: Stephane Eranian Date: Fri Mar 23 09:11:29 2018 -0400 perf/x86/intel/uncore: Revert "Remove SBOX support for Broadwell server" This reverts commit 3b94a891667c ("perf/x86/intel/uncore: Remove SBOX support for Broadwell server") Revert because there exists a proper workaround for Broadwell-EP servers without SBOX now. Note that BDX-DE does not have a SBOX. Signed-off-by: Stephane Eranian Signed-off-by: Thomas Gleixner Reviewed-by: Kan Liang Acked-by: Peter Zijlstra Cc: ak@linux.intel.com Cc: osk@google.com Cc: mark@voidzero.net Link: https://lkml.kernel.org/r/1521810690-2576-1-git-send-email-kan.liang@linux.intel.com arch/x86/events/intel/uncore_snbep.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 05189820da23fc87ee2a7d87c20257f298af27f4 Author: Joerg Roedel Date: Thu Apr 19 20:26:00 2018 +0200 x86/power/64: Fix page-table setup for temporary text mapping On a system with 4-level page-tables there is no p4d, so the pud in the pgd should be mapped. The old code before commit fb43d6cb91ef already did that. The change from above commit causes an invalid page-table which causes undefined behavior. In one report it caused triple faults. Fix it by changing the p4d back to pud. Fixes: fb43d6cb91ef ('x86/mm: Do not auto-massage page protections') Reported-by: Borislav Petkov Signed-off-by: Joerg Roedel Signed-off-by: Thomas Gleixner Tested-by: Michal Kubecek Tested-by: Borislav Petkov Cc: linux-pm@vger.kernel.org Cc: rjw@rjwysocki.net Cc: pavel@ucw.cz Cc: hpa@zytor.com Cc: Dave Hansen Link: https://lkml.kernel.org/r/1524162360-26179-1-git-send-email-joro@8bytes.org arch/x86/power/hibernate_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f0605a697f4b9f5b1c1571c7ec6a16df4dc2616 Author: Srinivas Dasari Date: Fri Apr 20 11:41:14 2018 +0530 nl80211: Free connkeys on external authentication failure The failure scenario while processing NL80211_ATTR_EXTERNAL_AUTH_SUPPORT does not free the connkeys. This commit addresses the same. Signed-off-by: Srinivas Dasari Signed-off-by: Johannes Berg net/wireless/nl80211.c | 1 + 1 file changed, 1 insertion(+) commit 16a34adb9392b2fe4195267475ab5b472e55292c Author: Al Viro Date: Thu Apr 19 22:03:08 2018 -0400 Don't leak MNT_INTERNAL away from internal mounts We want it only for the stuff created by SB_KERNMOUNT mounts, *not* for their copies. As it is, creating a deep stack of bindings of /proc/*/ns/* somewhere in a new namespace and exiting yields a stack overflow. Cc: stable@kernel.org Reported-by: Alexander Aring Bisected-by: Kirill Tkhai Tested-by: Kirill Tkhai Tested-by: Alexander Aring Signed-off-by: Al Viro fs/namespace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8b77586bd8fe600d97f922c79f7222c46f37c118 Author: Jason Gunthorpe Date: Wed Apr 4 21:00:01 2018 -0600 RDMA/ucma: Check for a cm_id->device in all user calls that need it This is done by auditing all callers of ucma_get_ctx and switching the ones that unconditionally touch ->device to ucma_get_ctx_dev. This covers a little less than half of the call sites. The 11 remaining call sites to ucma_get_ctx() were manually audited. Signed-off-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/ucma.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit fb289e3ab10c16834741bb02be740fa9d025fde0 Merge: 5692fce bc8a3ef Author: Tony Lindgren Date: Thu Apr 19 15:48:46 2018 -0700 Merge branch 'omap-for-v4.17/fixes-ti-sysc' into omap-for-v4.17/fixes commit c5794510d7b5f210f05531ff9e82432cf7244367 Author: Dave Jiang Date: Fri Apr 13 13:47:40 2018 -0700 MAINTAINERS: Add backup maintainers for libnvdimm and DAX Adding additional maintainers to libnvdimm related code and DAX. Signed-off-by: Dave Jiang Acked-by: Ross Zwisler Acked-by: Vishal Verma Signed-off-by: Dan Williams MAINTAINERS | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit ef8423022324cf79bd1b41d8707c766461e7e555 Author: Dave Jiang Date: Thu Apr 19 13:39:43 2018 -0700 device-dax: allow MAP_SYNC to succeed MAP_SYNC is a nop for device-dax. Allow MAP_SYNC to succeed on device-dax to eliminate special casing between device-dax and fs-dax as to when the flag can be specified. Device-dax users already implicitly assume that they do not need to call fsync(), and this enables them to explicitly check for this capability. Cc: Fixes: b6fb293f2497 ("mm: Define MAP_SYNC and VM_SYNC flags") Signed-off-by: Dave Jiang Reviewed-by: Dan Williams Signed-off-by: Dan Williams drivers/dax/device.c | 2 ++ 1 file changed, 2 insertions(+) commit f22acf82746dd3d75e06d7c5801926d3b9c50169 Author: Dan Williams Date: Thu Apr 19 15:07:42 2018 -0700 Revert "libnvdimm, of_pmem: workaround OF_NUMA=n build error" With commit df3f126482db ("libnvdimm, of_pmem: use dev_to_node() instead of of_node_to_nid()") it is now possible to allow of_pmem to be built as a module as originally implemented. Signed-off-by: Dan Williams drivers/nvdimm/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit df3f126482dba8e00cdbfc8fc44a05a5a35b1704 Author: Rob Herring Date: Mon Apr 16 11:58:16 2018 -0500 libnvdimm, of_pmem: use dev_to_node() instead of of_node_to_nid() Remove the direct dependency on of_node_to_nid() by using dev_to_node() instead. Any DT platform device will have its NUMA node id set when the device is created. With this, commit 291717b6fbdb ("libnvdimm, of_pmem: workaround OF_NUMA=n build error") can be reverted. Fixes: 717197608952 ("libnvdimm: Add device-tree based driver") Cc: Dan Williams Cc: Oliver O'Halloran Cc: linux-nvdimm@lists.01.org Signed-off-by: Rob Herring Signed-off-by: Dan Williams drivers/nvdimm/of_pmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1255fcb2a655f05e02f3a74675a6d6525f187afd Author: Ursula Braun Date: Thu Apr 19 15:56:40 2018 +0200 net/smc: fix shutdown in state SMC_LISTEN Calling shutdown with SHUT_RD and SHUT_RDWR for a listening SMC socket crashes, because commit 127f49705823 ("net/smc: release clcsock from tcp_listen_worker") releases the internal clcsock in smc_close_active() and sets smc->clcsock to NULL. For SHUT_RD the smc_close_active() call is removed. For SHUT_RDWR the kernel_sock_shutdown() call is omitted, since the clcsock is already released. Fixes: 127f49705823 ("net/smc: release clcsock from tcp_listen_worker") Signed-off-by: Ursula Braun Reported-by: Stephen Hemminger Signed-off-by: David S. Miller net/smc/af_smc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit eb0b4aa89cf21b69e15168010189e9d9c7483e54 Author: Laura Abbott Date: Wed Apr 18 10:08:32 2018 -0700 x86/xen: Remove use of VLAs There's an ongoing effort to remove VLAs[1] from the kernel to eventually turn on -Wvla. It turns out, the few VLAs in use in Xen produce only a single entry array that is always bounded by GDT_SIZE. Clean up the code to get rid of the VLA and the loop. [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Laura Abbott Reviewed-by: Boris Ostrovsky [boris: Use BUG_ON(size>PAGE_SIZE) instead of GDT_SIZE] Signed-off-by: Boris Ostrovsky arch/x86/xen/enlighten_pv.c | 86 ++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 55 deletions(-) commit a60faa60da891e311e19fd3e88d611863f431130 Author: Vasundhara Volam Date: Thu Apr 19 03:16:16 2018 -0400 bnxt_en: Fix memory fault in bnxt_ethtool_init() In some firmware images, the length of BNX_DIR_TYPE_PKG_LOG nvram type could be greater than the fixed buffer length of 4096 bytes allocated by the driver. This was causing HWRM_NVM_READ to copy more data to the buffer than the allocated size, causing general protection fault. Fix the issue by allocating the exact buffer length returned by HWRM_NVM_FIND_DIR_ENTRY, instead of 4096. Move the kzalloc() call into the bnxt_get_pkgver() function. Fixes: 3ebf6f0a09a2 ("bnxt_en: Add installed-package firmware version reporting via Ethtool GDRVINFO") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 49 ++++++++++++---------- drivers/net/ethernet/broadcom/bnxt/bnxt_nvm_defs.h | 2 - 2 files changed, 27 insertions(+), 24 deletions(-) commit 0df8bb01cb38f5b835e2739a7f5ca0e954d79c90 Merge: f4ea891 f4ee703 Author: David S. Miller Date: Thu Apr 19 16:33:21 2018 -0400 Merge branch 'virtio-ctrl-buffer-fixes' Michael S. Tsirkin says: ==================== virtio: ctrl buffer fixes Here are a couple of fixes related to the virtio control buffer. Lightly tested on x86 only. ==================== Signed-off-by: David S. Miller commit f4ee703ace847f299da00944d57db7ff91786d0b Author: Michael S. Tsirkin Date: Thu Apr 19 08:30:50 2018 +0300 virtio_net: sparse annotation fix offloads is a buffer in virtio format, should use the __virtio64 tag. Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7fad4c840f33a6bd333dd7fbb3006edbcf0017a Author: Michael S. Tsirkin Date: Thu Apr 19 08:30:49 2018 +0300 virtio_net: fix adding vids on big-endian Programming vids (adding or removing them) still passes guest-endian values in the DMA buffer. That's wrong if guest is big-endian and when virtio 1 is enabled. Note: this is on top of a previous patch: virtio_net: split out ctrl buffer Fixes: 9465a7a6f ("virtio_net: enable v1.0 support") Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 12e571693837d6164bda61e316b1944972ee0d97 Author: Michael S. Tsirkin Date: Thu Apr 19 08:30:48 2018 +0300 virtio_net: split out ctrl buffer When sending control commands, virtio net sets up several buffers for DMA. The buffers are all part of the net device which means it's actually allocated by kvmalloc so it's in theory (on extreme memory pressure) possible to get a vmalloc'ed buffer which on some platforms means we can't DMA there. Fix up by moving the DMA buffers into a separate structure. Reported-by: Mikulas Patocka Suggested-by: Eric Dumazet Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 68 +++++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 29 deletions(-) commit f4ea89110df237da6fbcaab76af431e85f07d904 Author: dann frazier Date: Wed Apr 18 21:55:41 2018 -0600 net: hns: Avoid action name truncation When longer interface names are used, the action names exposed in /proc/interrupts and /proc/irq/* maybe truncated. For example, when using the predictable name algorithm in systemd on a HiSilicon D05, I see: ubuntu@d05-3:~$ grep enahisic2i0-tx /proc/interrupts | sed 's/.* //' enahisic2i0-tx0 enahisic2i0-tx1 [...] enahisic2i0-tx8 enahisic2i0-tx9 enahisic2i0-tx1 enahisic2i0-tx1 enahisic2i0-tx1 enahisic2i0-tx1 enahisic2i0-tx1 enahisic2i0-tx1 Increase the max ring name length to allow for an interface name of IFNAMSIZE. After this change, I now see: $ grep enahisic2i0-tx /proc/interrupts | sed 's/.* //' enahisic2i0-tx0 enahisic2i0-tx1 enahisic2i0-tx2 [...] enahisic2i0-tx8 enahisic2i0-tx9 enahisic2i0-tx10 enahisic2i0-tx11 enahisic2i0-tx12 enahisic2i0-tx13 enahisic2i0-tx14 enahisic2i0-tx15 Signed-off-by: dann frazier Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hnae.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d90a10e2444ba5a351fa695917258ff4c5709fa5 Author: Robert Kolchmeyer Date: Thu Apr 19 10:44:33 2018 -0700 fsnotify: Fix fsnotify_mark_connector race fsnotify() acquires a reference to a fsnotify_mark_connector through the SRCU-protected pointer to_tell->i_fsnotify_marks. However, it appears that no precautions are taken in fsnotify_put_mark() to ensure that fsnotify() drops its reference to this fsnotify_mark_connector before assigning a value to its 'destroy_next' field. This can result in fsnotify_put_mark() assigning a value to a connector's 'destroy_next' field right before fsnotify() tries to traverse the linked list referenced by the connector's 'list' field. Since these two fields are members of the same union, this behavior results in a kernel panic. This issue is resolved by moving the connector's 'destroy_next' field into the object pointer union. This should work since the object pointer access is protected by both a spinlock and the value of the 'flags' field, and the 'flags' field is cleared while holding the spinlock in fsnotify_put_mark() before 'destroy_next' is updated. It shouldn't be possible for another thread to accidentally read from the object pointer after the 'destroy_next' field is updated. The offending behavior here is extremely unlikely; since fsnotify_put_mark() removes references to a connector (specifically, it ensures that the connector is unreachable from the inode it was formerly attached to) before updating its 'destroy_next' field, a sizeable chunk of code in fsnotify_put_mark() has to execute in the short window between when fsnotify() acquires the connector reference and saves the value of its 'list' field. On the HEAD kernel, I've only been able to reproduce this by inserting a udelay(1) in fsnotify(). However, I've been able to reproduce this issue without inserting a udelay(1) anywhere on older unmodified release kernels, so I believe it's worth fixing at HEAD. References: https://bugzilla.kernel.org/show_bug.cgi?id=199437 Fixes: 08991e83b7286635167bab40927665a90fb00d81 CC: stable@vger.kernel.org Signed-off-by: Robert Kolchmeyer Signed-off-by: Jan Kara include/linux/fsnotify_backend.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ab913455dd59b81204b6a0d387a44697b0e0bd85 Author: Olivier Gayot Date: Wed Apr 18 22:03:06 2018 +0200 docs: ip-sysctl.txt: fix name of some ipv6 variables The name of the following proc/sysctl entries were incorrectly documented: /proc/sys/net/ipv6/conf//max_dst_opts_number /proc/sys/net/ipv6/conf//max_hbt_opts_number /proc/sys/net/ipv6/conf//max_dst_opts_length /proc/sys/net/ipv6/conf//max_hbt_length Their name was set to the name of the symbol in the .data field of the control table instead of their .proc name. Signed-off-by: Olivier Gayot Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 65ec0bd1c7c14522670a5294de35710fb577a7fd Author: Ronak Doshi Date: Wed Apr 18 12:48:04 2018 -0700 vmxnet3: fix incorrect dereference when rxvlan is disabled vmxnet3_get_hdr_len() is used to calculate the header length which in turn is used to calculate the gso_size for skb. When rxvlan offload is disabled, vlan tag is present in the header and the function references ip header from sizeof(ethhdr) and leads to incorrect pointer reference. This patch fixes this issue by taking sizeof(vlan_ethhdr) into account if vlan tag is present and correctly references the ip hdr. Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Acked-by: Louis Luo Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 17 +++++++++++++---- drivers/net/vmxnet3/vmxnet3_int.h | 4 ++-- 2 files changed, 15 insertions(+), 6 deletions(-) commit f7e43672683b097bb074a8fe7af9bc600a23f231 Author: Cong Wang Date: Wed Apr 18 11:51:56 2018 -0700 llc: hold llc_sap before release_sock() syzbot reported we still access llc->sap in llc_backlog_rcv() after it is freed in llc_sap_remove_socket(): Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:430 llc_conn_ac_send_sabme_cmd_p_set_x+0x3a8/0x460 net/llc/llc_c_ac.c:785 llc_exec_conn_trans_actions net/llc/llc_conn.c:475 [inline] llc_conn_service net/llc/llc_conn.c:400 [inline] llc_conn_state_process+0x4e1/0x13a0 net/llc/llc_conn.c:75 llc_backlog_rcv+0x195/0x1e0 net/llc/llc_conn.c:891 sk_backlog_rcv include/net/sock.h:909 [inline] __release_sock+0x12f/0x3a0 net/core/sock.c:2335 release_sock+0xa4/0x2b0 net/core/sock.c:2850 llc_ui_release+0xc8/0x220 net/llc/af_llc.c:204 llc->sap is refcount'ed and llc_sap_remove_socket() is paired with llc_sap_add_socket(). This can be amended by holding its refcount before llc_sap_remove_socket() and releasing it after release_sock(). Reported-by: Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/llc/af_llc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 02b94fc70ffe320a7799c35e09372809e40b7131 Author: Jonathan Corbet Date: Wed Apr 18 10:14:13 2018 -0600 MAINTAINERS: Direct networking documentation changes to netdev Networking docs changes go through the networking tree, so patch the MAINTAINERS file to direct authors to the right place. Signed-off-by: Jonathan Corbet Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit f3335545b34315fc42cc03a83165bdd26d956584 Author: Colin Ian King Date: Wed Apr 18 16:55:05 2018 +0100 atm: iphase: fix spelling mistake: "Tansmit" -> "Transmit" Trivial fix to spelling mistake in message text. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/atm/iphase.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4ec7eb3ff6eb5c9af3a84288a8d808a857fbc22b Author: Pawel Dembicki Date: Wed Apr 18 16:03:24 2018 +0200 net: qmi_wwan: add Wistron Neweb D19Q1 This modem is embedded on dlink dwr-960 router. The oem configuration states: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1435 ProdID=d191 Rev=ff.ff S: Manufacturer=Android S: Product=Android S: SerialNumber=0123456789ABCDEF C:* #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=88(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none) E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=125us Tested on openwrt distribution Signed-off-by: Pawel Dembicki Acked-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit 5e84b38b07e676fcd3ab6e296780b4f77a29d09f Author: Colin Ian King Date: Wed Apr 18 12:00:08 2018 +0100 net: caif: fix spelling mistake "UKNOWN" -> "UNKNOWN" Trivial fix to spelling mistake Signed-off-by: Colin Ian King Signed-off-by: David S. Miller net/caif/chnl_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 565020aaeebfa7c8b3ec077bee38f4c15acc9905 Author: Jose Abreu Date: Wed Apr 18 10:57:55 2018 +0100 net: stmmac: Disable ACS Feature for GMAC >= 4 ACS Feature is currently enabled for GMAC >= 4 but the llc_snap status is never checked in descriptor rx_status callback. This will cause stmmac to always strip packets even that ACS feature is already stripping them. Lets be safe and disable the ACS feature for GMAC >= 4 and always strip the packets for this GMAC version. Fixes: 477286b53f55 ("stmmac: add GMAC4 core support") Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 7 ------- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 ++++++- 3 files changed, 7 insertions(+), 9 deletions(-) commit da42bb271305d68df6cbf99eed90542f1f1ee1c9 Author: Maxime Chevallier Date: Wed Apr 18 11:14:44 2018 +0200 net: mvpp2: Fix DMA address mask size PPv2 TX/RX descriptors uses 40bits DMA addresses, but 41 bits masks were used (GENMASK_ULL(40, 0)). This commit fixes that by using the correct mask. Fixes: e7c5359f2eed ("net: mvpp2: introduce PPv2.2 HW descriptors and adapt accessors") Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit bb9aaaa1849eed763c6b7f20227a8a03300d4421 Author: sunlianwen Date: Wed Apr 18 09:22:39 2018 +0800 net: change the comment of dev_mc_init The comment of dev_mc_init() is wrong. which use dev_mc_flush instead of dev_mc_init. Signed-off-by: Lianwen Sun net/core/dev_addr_lists.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a56ef4f3ffba9ebf4967b61ef600b0a7ba10f11 Author: Takashi Iwai Date: Thu Apr 19 18:16:15 2018 +0200 ALSA: rawmidi: Fix missing input substream checks in compat ioctls Some rawmidi compat ioctls lack of the input substream checks (although they do check only for rfile->output). This many eventually lead to an Oops as NULL substream is passed to the rawmidi core functions. Fix it by adding the proper checks before each function call. The bug was spotted by syzkaller. Reported-by: syzbot+f7a0348affc3b67bc617@syzkaller.appspotmail.com Cc: Signed-off-by: Takashi Iwai sound/core/rawmidi_compat.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 8a9fd8323087e794f1d3cd4850b393ced048bc73 Author: Mathieu Poirier Date: Wed Apr 18 16:05:18 2018 -0600 coresight: Move to SPDX identifier Move CoreSight headers to the SPDX identifier. Signed-off-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1524089118-27595-1-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo include/linux/coresight-pmu.h | 13 +------------ tools/include/linux/coresight-pmu.h | 13 +------------ tools/perf/arch/arm/util/auxtrace.c | 13 +------------ tools/perf/arch/arm/util/cs-etm.c | 13 +------------ tools/perf/arch/arm/util/cs-etm.h | 13 +------------ tools/perf/arch/arm/util/pmu.c | 13 +------------ tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 3 +-- tools/perf/util/cs-etm.c | 3 +-- tools/perf/util/cs-etm.h | 13 +------------ 9 files changed, 9 insertions(+), 88 deletions(-) commit cc9e992dfb5bb48f59f3fbc1268d3f38d2c86ef3 Author: Kenneth Feng Date: Tue Apr 17 21:49:51 2018 +0800 drm/amd/powerplay: header file interface to SMU update update vega12 smu interface. Signed-off-by: Kenneth Feng Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/vega12/smu9_driver_if.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 84f8508f717268c333de8e472f351d6a7a487e51 Author: Rex Zhu Date: Tue Apr 17 17:26:26 2018 +0800 drm/amd/pp: Fix bug voltage can't be OD separately on VI Make sure to update the MCLK and SCLK flags when setting the VDDC flags due to dependencies. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit d78fd7255881645fc645e23145d469385227170d Author: Harry Wentland Date: Thu Apr 12 16:37:09 2018 -0400 drm/amd/display: Don't program bypass on linear regamma LUT Even though this is required for degamma since DCE HW only supports a couple predefined LUTs we can just program the LUT directly for regamma. This fixes dark screens which occurs when we program regamma to bypass while degamma is using srgb LUT. Signed-off-by: Harry Wentland Reviewed-by: Leo Li Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 7 ------- 1 file changed, 7 deletions(-) commit 1cdae042fc63dd987f39ffb3258e54fdac8b9852 Author: Ahbong Chang Date: Mon Apr 16 10:36:25 2018 +0800 tracing: Add missing forward declaration Without this forward declaration compile may fail if this header is included only for registering other probe event without struct pool_workqueue. Link: http://lkml.kernel.org/r/20180416023626.139915-1-cwahbong@google.com Reviewed-by: Todd Poynor Signed-off-by: Ahbong Chang Signed-off-by: Steven Rostedt (VMware) include/trace/events/workqueue.h | 2 ++ 1 file changed, 2 insertions(+) commit 83826469e36b9c8219f88c16713a755b2cea6ff5 Author: weiyongjun (A) Date: Fri Mar 30 02:07:05 2018 +0000 cfg80211: fix possible memory leak in regdb_query_country() 'wmm_ptrs' is malloced in regdb_query_country() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: 230ebaa189af ("cfg80211: read wmm rules from regulatory database") Signed-off-by: Wei Yongjun [johannes: add Fixes tag] Signed-off-by: Johannes Berg net/wireless/reg.c | 1 + 1 file changed, 1 insertion(+) commit 901932a3f9b2b80352896be946c6d577c0a9652c Author: Jiang Biao Date: Thu Apr 19 12:06:09 2018 +0800 blkcg: init root blkcg_gq under lock The initializing of q->root_blkg is currently outside of queue lock and rcu, so the blkg may be destroied before the initializing, which may cause dangling/null references. On the other side, the destroys of blkg are protected by queue lock or rcu. Put the initializing inside the queue lock and rcu to make it safer. Signed-off-by: Jiang Biao Signed-off-by: Wen Yang CC: Tejun Heo CC: Jens Axboe Signed-off-by: Jens Axboe block/blk-cgroup.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit bea548831b8cee347181132eacd8b9711dfced92 Author: Jiang Biao Date: Thu Apr 19 12:04:26 2018 +0800 blkcg: small fix on comment in blkcg_init_queue The comment before blkg_create() in blkcg_init_queue() was moved from blkcg_activate_policy() by commit ec13b1d6f0a0457312e615, but it does not suit for the new context. Signed-off-by: Jiang Biao Signed-off-by: Wen Yang CC: Tejun Heo CC: Jens Axboe Signed-off-by: Jens Axboe block/blk-cgroup.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 5a786232eb69a1f870ddc0cfd69d5bdef241a2ea Author: Pablo Neira Ayuso Date: Thu Apr 19 16:17:14 2018 +0200 netfilter: xt_connmark: do not cast xt_connmark_tginfo1 to xt_connmark_tginfo2 These structures have different layout, fill xt_connmark_tginfo2 with old fields in xt_connmark_tginfo1. Based on patch from Jack Ma. Fixes: 472a73e00757 ("netfilter: xt_conntrack: Support bit-shifting for CONNMARK & MARK targets.") Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_connmark.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit 789d4c300e10eb2096ee83c3497118e67ccc951e Author: Emil Velikov Date: Wed Mar 28 17:22:16 2018 +0100 drm/msm: don't deref error pointer in the msm_fbdev_create error path Currently the error pointer returned by msm_alloc_stolen_fb gets passed to drm_framebuffer_remove. The latter handles only NULL pointers, thus a nasty crash will occur. Drop the unnecessary fail label and the associated checks - both err and fb will be set at this stage. Cc: Rob Clark Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Emil Velikov Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_fbdev.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit a4af89286f8fc382459308764ea05935dc477cdc Author: Stefan Agner Date: Mon Mar 19 22:26:32 2018 +0100 drm/msm/dsi: use correct enum in dsi_get_cmd_fmt The function dsi_get_cmd_fmt returns enum dsi_cmd_dst_format, use the correct enum value also for MIPI_DSI_FMT_RGB666/_PACKED. This has been discovered using clang: drivers/gpu/drm/msm/dsi/dsi_host.c:743:35: warning: implicit conversion from enumeration type 'enum dsi_vid_dst_format' to different enumeration type 'enum dsi_cmd_dst_format' [-Wenum-conversion] case MIPI_DSI_FMT_RGB666: return VID_DST_FORMAT_RGB666; ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Stefan Agner Reviewed-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3976626ea3d2011f8fd3f3a47070a8b792018253 Author: Ben Hutchings Date: Tue Apr 3 23:38:45 2018 +0100 drm/msm: Fix possible null dereference on failure of get_pages() Commit 62e3a3e342af changed get_pages() to initialise msm_gem_object::pages before trying to initialise msm_gem_object::sgt, so that put_pages() would properly clean up pages in the failure case. However, this means that put_pages() now needs to check that msm_gem_object::sgt is not null before trying to clean it up, and this check was only applied to part of the cleanup code. Move it all into the conditional block. (Strictly speaking we don't need to make the kfree() conditional, but since we can't avoid checking for null ourselves we may as well do so.) Fixes: 62e3a3e342af ("drm/msm: fix leak in failed get_pages") Signed-off-by: Ben Hutchings Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit f2f3df0aa8522b5641110bbabe54c79922601476 Author: Jeykumar Sankaran Date: Tue Feb 13 12:42:44 2018 -0500 drm/msm: Add modifier to mdp_get_format arguments This change plumbs the new fb modifier through the various mdp/disp get_format hooks. Signed-off-by: Jeykumar Sankaran [seanpaul pimped out commit message a bit] Signed-off-by: Sean Paul Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/mdp_format.c | 3 ++- drivers/gpu/drm/msm/disp/mdp_kms.h | 2 +- drivers/gpu/drm/msm/msm_fb.c | 3 ++- drivers/gpu/drm/msm/msm_kms.h | 5 ++++- 4 files changed, 9 insertions(+), 4 deletions(-) commit 78b32d49c49f7162f9ab5884a1b7228f6bfa2632 Author: Sean Paul Date: Wed Feb 28 14:19:00 2018 -0500 drm/msm: Mark the crtc->state->event consumed Don't leave the event != NULL once it's consumed, this is used a signal to the atomic helpers that the event will be handled by the driver. Changes in v2: - None Changes in v3: - Rebased on Archit's private_obj set Changes in v4: - None Cc: Jeykumar Sankaran Reviewed-by: Archit Taneja Signed-off-by: Sean Paul Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c | 1 + drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 1 + 2 files changed, 2 insertions(+) commit f1fa7ff4405697603f5e3901623533c54091f130 Author: Abhinav Kumar Date: Tue Apr 17 13:50:19 2018 -0700 drm/msm/dsi: implement auto PHY timing calculator for 10nm PHY Currently the DSI PHY timings are hard-coded for a specific panel for the 10nm PHY. Replace this with the auto PHY timing calculator which can calculate the PHY timings for any panel. Changes in v4: - None Changes in v3: - None Changes in v2: - None Reviewed-by: Sean Paul Reviewed-by: Archit Taneja Signed-off-by: Abhinav Kumar Signed-off-by: Sean Paul Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 109 +++++++++++++++++++++++++++++ drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 2 + drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c | 28 -------- 3 files changed, 111 insertions(+), 28 deletions(-) commit a56896c56e861464ff4de1e45a8e31c146eeeec1 Author: Abhinav Kumar Date: Tue Apr 17 13:50:18 2018 -0700 drm/msm/dsi: check video mode engine status before waiting Make sure the video mode engine is on before waiting for the video done interrupt. Changes in v4: - Move setting enabled to false earlier Changes in v3: - Move the return value check to another patch Changes in v2: - Replace pr_err with dev_err - Changed error message Signed-off-by: Abhinav Kumar Signed-off-by: Sean Paul Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi_host.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a6bb80f8efe04be2b2e2dcd1e5cd8fbfdaa35ab0 Author: Abhinav Kumar Date: Mon Apr 16 19:05:30 2018 -0700 drm/msm/dsi: check return value for video done waits Check for the return value of wait for video done waits and print appropriate error message. Signed-off-by: Abhinav Kumar Signed-off-by: Sean Paul Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi_host.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit a7cfebcb7594a24609268f91299ab85ba064bf82 Author: Johannes Berg Date: Tue Apr 3 14:33:49 2018 +0200 cfg80211: limit wiphy names to 128 bytes There's currently no limit on wiphy names, other than netlink message size and memory limitations, but that causes issues when, for example, the wiphy name is used in a uevent, e.g. in rfkill where we use the same name for the rfkill instance, and then the buffer there is "only" 2k for the environment variables. This was reported by syzkaller, which used a 4k name. Limit the name to something reasonable, I randomly picked 128. Reported-by: syzbot+230d9e642a85d3fec29c@syzkaller.appspotmail.com Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 2 ++ net/wireless/core.c | 3 +++ 2 files changed, 5 insertions(+) commit 911a26484c33e10de6237228ca1d7293548e9f49 Author: Ilan Peer Date: Tue Apr 3 11:35:22 2018 +0300 mac80211: Fix condition validating WMM IE Commit c470bdc1aaf3 ("mac80211: don't WARN on bad WMM parameters from buggy APs") handled cases where an AP reports a zeroed WMM IE. However, the condition that checks the validity accessed the wrong index in the ieee80211_tx_queue_params array, thus wrongly deducing that the parameters are invalid. Fix it. Fixes: c470bdc1aaf3 ("mac80211: don't WARN on bad WMM parameters from buggy APs") Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0cbc94daa55441c21999e96a07061952d873dcb7 Author: Wolfram Sang Date: Wed Apr 18 20:20:57 2018 +0200 mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs Early revisions of certain SoCs cannot do multiple DMA RX streams in parallel. To avoid data corruption, only allow one DMA RX channel and fall back to PIO, if needed. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Nguyen Viet Dung Reviewed-by: Simon Horman Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_internal_dmac.c | 39 ++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 6 deletions(-) commit a8419a0cd98ddf628a9e38a92110af7cc650dde7 Author: Srinivas Kandagatla Date: Wed Apr 18 18:46:37 2018 +0100 ASoC: msm8916-wcd-analog: use threaded context for mbhc events As snd_soc_jack_report() can sleep, move handling of mbhc events to a thread context rather than in interrupt context. Fixes: de66b3455023 ('ASoC: codecs: msm8916-wcd-analog: add MBHC support') Reported-by: Bjorn Andersson Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown sound/soc/codecs/msm8916-wcd-analog.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 7407188489c62a7b5694bc75a6db2b82af94c9a5 Author: Anson Huang Date: Thu Apr 19 14:04:43 2018 +0800 clocksource/imx-tpm: Correct -ETIME return condition check The additional brakects added to tpm_set_next_event's return value computation causes (int) forced type conversion NOT taking effect, and the incorrect value return will cause various system timer issue, like RCU stall etc.. Remove the additional brackets to make sure tpm_set_next_event always returns correct value. Fixes: 059ab7b82eec ("clocksource/drivers/imx-tpm: Add imx tpm timer support") Signed-off-by: Anson Huang Signed-off-by: Thomas Gleixner Acked-by: Dong Aisheng Cc: stable@vger.kernel.org Cc: daniel.lezcano@linaro.org Cc: Linux-imx@nxp.com Link: https://lkml.kernel.org/r/1524117883-2484-1-git-send-email-Anson.Huang@nxp.com drivers/clocksource/timer-imx-tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3bca5d450b620dd3d36e14b5e1f43639fd47d6b Author: Laura Abbott Date: Tue Apr 17 14:57:42 2018 -0700 posix-cpu-timers: Ensure set_process_cpu_timer is always evaluated Commit a9445e47d897 ("posix-cpu-timers: Make set_process_cpu_timer() more robust") moved the check into the 'if' statement. Unfortunately, it did so on the right side of an && which means that it may get short circuited and never evaluated. This is easily reproduced with: $ cat loop.c void main() { struct rlimit res; /* set the CPU time limit */ getrlimit(RLIMIT_CPU,&res); res.rlim_cur = 2; res.rlim_max = 2; setrlimit(RLIMIT_CPU,&res); while (1); } Which will hang forever instead of being killed. Fix this by pulling the evaluation out of the if statement but checking the return value instead. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1568337 Fixes: a9445e47d897 ("posix-cpu-timers: Make set_process_cpu_timer() more robust") Signed-off-by: Laura Abbott Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Cc: "Max R . P . Grossmann" Cc: John Stultz Link: https://lkml.kernel.org/r/20180417215742.2521-1-labbott@redhat.com kernel/time/posix-cpu-timers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d71efb599ad42ef1e564c652d8084252bdc85edf Author: Taehee Yoo Date: Wed Apr 18 23:35:34 2018 +0900 netfilter: nf_tables: fix out-of-bounds in nft_chain_commit_update When chain name is changed, nft_chain_commit_update is called. In the nft_chain_commit_update, trans->ctx.chain->name has old chain name and nft_trans_chain_name(trans) has new chain name. If new chain name is longer than old chain name, KASAN warns slab-out-of-bounds. [ 175.015012] BUG: KASAN: slab-out-of-bounds in strcpy+0x9e/0xb0 [ 175.022735] Write of size 1 at addr ffff880114e022da by task iptables-compat/1458 [ 175.031353] CPU: 0 PID: 1458 Comm: iptables-compat Not tainted 4.16.0-rc7+ #146 [ 175.031353] Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/08/2015 [ 175.031353] Call Trace: [ 175.031353] dump_stack+0x68/0xa0 [ 175.031353] print_address_description+0xd0/0x260 [ 175.031353] ? strcpy+0x9e/0xb0 [ 175.031353] kasan_report+0x234/0x350 [ 175.031353] __asan_report_store1_noabort+0x1c/0x20 [ 175.031353] strcpy+0x9e/0xb0 [ 175.031353] nf_tables_commit+0x1ccc/0x2990 [ 175.031353] nfnetlink_rcv+0x141e/0x16c0 [ 175.031353] ? nfnetlink_net_init+0x150/0x150 [ 175.031353] ? lock_acquire+0x370/0x370 [ 175.031353] ? lock_acquire+0x370/0x370 [ 175.031353] netlink_unicast+0x444/0x640 [ 175.031353] ? netlink_attachskb+0x700/0x700 [ 175.031353] ? _copy_from_iter_full+0x180/0x740 [ 175.031353] ? kasan_check_write+0x14/0x20 [ 175.031353] ? _copy_from_user+0x9b/0xd0 [ 175.031353] netlink_sendmsg+0x845/0xc70 [ ... ] Steps to reproduce: iptables-compat -N 1 iptables-compat -E 1 aaaaaaaaa Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39f2ff0816e5421476c2bc538b68b4bb0708a78e Author: Pablo Neira Ayuso Date: Wed Apr 18 12:23:39 2018 +0200 netfilter: nf_tables: NAT chain and extensions require NF_TABLES Move these options inside the scope of the 'if' NF_TABLES and NF_TABLES_IPV6 dependencies. This patch fixes: net/ipv6/netfilter/nft_chain_nat_ipv6.o: In function `nft_nat_do_chain': >> net/ipv6/netfilter/nft_chain_nat_ipv6.c:37: undefined reference to `nft_do_chain' net/ipv6/netfilter/nft_chain_nat_ipv6.o: In function `nft_chain_nat_ipv6_exit': >> net/ipv6/netfilter/nft_chain_nat_ipv6.c:94: undefined reference to `nft_unregister_chain_type' net/ipv6/netfilter/nft_chain_nat_ipv6.o: In function `nft_chain_nat_ipv6_init': >> net/ipv6/netfilter/nft_chain_nat_ipv6.c:87: undefined reference to `nft_register_chain_type' that happens with: CONFIG_NF_TABLES=m CONFIG_NFT_CHAIN_NAT_IPV6=y Fixes: 02c7b25e5f54 ("netfilter: nf_tables: build-in filter chain type") Reported-by: kbuild test robot Signed-off-by: Pablo Neira Ayuso net/ipv6/netfilter/Kconfig | 55 +++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 27 deletions(-) commit a3dafb2200bf3c13905a088e82ae11f1eb275a83 Author: Hui Wang Date: Thu Apr 19 13:29:05 2018 +0800 ALSA: hda/realtek - adjust the location of one mic There are two front mics on this machine, if we don't adjust the location for one of them, they will have the same mixer name, pulseaudio can't handle this situation. After applying this FIXUP, they will have different mixer name, then pulseaudio can handle them correctly. Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 3ce0d5aa265bcc0a4b281cb0cabf92491276101b Author: Hui Wang Date: Thu Apr 19 13:29:04 2018 +0800 ALSA: hda/realtek - set PINCFG_HEADSET_MIC to parse_flags Otherwise, the pin will be regarded as microphone, and the jack name is "Mic Phantom", it is always on in the pulseaudio even nothing is plugged into the jack. So the UI is confusing to users since the microphone always shows up in the UI even there is no microphone plugged. After adding this flag, the jack name is "Headset Mic Phantom", then the pulseaudio can handle its detection correctly. Fixes: f0ba9d699e5c ("ALSA: hda/realtek - Fix Dell headset Mic can't record") Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit ed4564babeeee4fb19fe4ec0beabe29754e380f9 Author: Arend van Spriel Date: Sun Apr 8 23:57:07 2018 +0200 drivers: change struct device_driver::coredump() return type to void Upon submitting a patch for mwifiex [1] it was discussed whether this callback function could fail. To keep things simple there is no need for the error code so the driver can do the task synchronous or not without worries. Currently the device driver core already ignores the return value so changing it to void. [1] https://patchwork.kernel.org/patch/10231933/ Signed-off-by: Arend van Spriel Signed-off-by: Greg Kroah-Hartman include/linux/device.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b658912cb023cd6f8e46963d29779903d3c10538 Author: Jiri Kosina Date: Thu Apr 19 09:25:15 2018 +0200 HID: i2c-hid: fix inverted return value from i2c_hid_command() i2c_hid_command() returns non-zero in error cases (the actual errno). Error handling in for I2C_HID_QUIRK_RESEND_REPORT_DESCR case in i2c_hid_resume() had the check inverted; fix that. Fixes: 3e83eda467 ("HID: i2c-hid: Fix resume issue on Raydium touchscreen device") Reported-by: Dan Carpenter Signed-off-by: Jiri Kosina drivers/hid/i2c-hid/i2c-hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56376c5864f8ff4ba7c78a80ae857eee3b1d23d8 Author: Michael Ellerman Date: Thu Apr 19 16:22:20 2018 +1000 powerpc/kvm: Fix lockups when running KVM guests on Power8 When running KVM guests on Power8 we can see a lockup where one CPU stops responding. This often leads to a message such as: watchdog: CPU 136 detected hard LOCKUP on other CPUs 72 Task dump for CPU 72: qemu-system-ppc R running task 10560 20917 20908 0x00040004 And then backtraces on other CPUs, such as: Task dump for CPU 48: ksmd R running task 10032 1519 2 0x00000804 Call Trace: ... --- interrupt: 901 at smp_call_function_many+0x3c8/0x460 LR = smp_call_function_many+0x37c/0x460 pmdp_invalidate+0x100/0x1b0 __split_huge_pmd+0x52c/0xdb0 try_to_unmap_one+0x764/0x8b0 rmap_walk_anon+0x15c/0x370 try_to_unmap+0xb4/0x170 split_huge_page_to_list+0x148/0xa30 try_to_merge_one_page+0xc8/0x990 try_to_merge_with_ksm_page+0x74/0xf0 ksm_scan_thread+0x10ec/0x1ac0 kthread+0x160/0x1a0 ret_from_kernel_thread+0x5c/0x78 This is caused by commit 8c1c7fb0b5ec ("powerpc/64s/idle: avoid sync for KVM state when waking from idle"), which added a check in pnv_powersave_wakeup() to see if the kvm_hstate.hwthread_state is already set to KVM_HWTHREAD_IN_KERNEL, and if so to skip the store and test of kvm_hstate.hwthread_req. The problem is that the primary does not set KVM_HWTHREAD_IN_KVM when entering the guest, so it can then come out to cede with KVM_HWTHREAD_IN_KERNEL set. It can then go idle in kvm_do_nap after setting hwthread_req to 1, but because hwthread_state is still KVM_HWTHREAD_IN_KERNEL we will skip the test of hwthread_req when we wake up from idle and won't go to kvm_start_guest. From there the thread will return somewhere garbage and crash. Fix it by skipping the store of hwthread_state, but not the test of hwthread_req, when coming out of idle. It's OK to skip the sync in that case because hwthread_req will have been set on the same thread, so there is no synchronisation required. Fixes: 8c1c7fb0b5ec ("powerpc/64s/idle: avoid sync for KVM state when waking from idle") Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8e1ceafe50ec4d1bcfae154dd70e7cb6946a6177 Author: Ming Lei Date: Mon Apr 16 17:48:41 2018 +0800 scsi: target: fix crash with iscsi target and dvd When the current page can't be added to bio, one new bio should be created for adding this page again, instead of ignoring this page. This patch fixes kernel crash with iscsi target and dvd, as reported by Wakko. Cc: Wakko Warner Cc: Bart Van Assche Cc: target-devel@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: "Nicholas A. Bellinger" Cc: Christoph Hellwig Fixes: 84c8590646d5b35804 ("target: avoid accessing .bi_vcnt directly") Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/target/target_core_pscsi.c | 2 ++ 1 file changed, 2 insertions(+) commit ccce20fc7968d546fb1e8e147bf5cdc8afc4278a Author: Bart Van Assche Date: Mon Apr 16 18:04:41 2018 -0700 scsi: sd_zbc: Avoid that resetting a zone fails sporadically Since SCSI scanning occurs asynchronously, since sd_revalidate_disk() is called from sd_probe_async() and since sd_revalidate_disk() calls sd_zbc_read_zones() it can happen that sd_zbc_read_zones() is called concurrently with blkdev_report_zones() and/or blkdev_reset_zones(). That can cause these functions to fail with -EIO because sd_zbc_read_zones() e.g. sets q->nr_zones to zero before restoring it to the actual value, even if no drive characteristics have changed. Avoid that this can happen by making the following changes: - Protect the code that updates zone information with blk_queue_enter() and blk_queue_exit(). - Modify sd_zbc_setup_seq_zones_bitmap() and sd_zbc_setup() such that these functions do not modify struct scsi_disk before all zone information has been obtained. Note: since commit 055f6e18e08f ("block: Make q_usage_counter also track legacy requests"; kernel v4.15) the request queue freezing mechanism also affects legacy request queues. Fixes: 89d947561077 ("sd: Implement support for ZBC devices") Signed-off-by: Bart Van Assche Cc: Jens Axboe Cc: Damien Le Moal Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: stable@vger.kernel.org # v4.16 Reviewed-by: Damien Le Moal Signed-off-by: Martin K. Petersen drivers/scsi/sd_zbc.c | 140 +++++++++++++++++++++++++++++-------------------- include/linux/blkdev.h | 5 ++ 2 files changed, 87 insertions(+), 58 deletions(-) commit 505aa4b6a8834a2300971c5220c380c3271ebde3 Author: Mahesh Rajashekhara Date: Tue Apr 17 17:03:12 2018 +0530 scsi: sd: Defer spinning up drive while SANITIZE is in progress A drive being sanitized will return NOT READY / ASC 0x4 / ASCQ 0x1b ("LOGICAL UNIT NOT READY. SANITIZE IN PROGRESS"). Prevent spinning up the drive until this condition clears. [mkp: tweaked commit message] Signed-off-by: Mahesh Rajashekhara Cc: Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 2 ++ 1 file changed, 2 insertions(+) commit fb1633d56b0025233ed3dc49b44544748d509d9d Author: Vinson Lee Date: Wed Mar 21 21:04:12 2018 +0000 scsi: megaraid_sas: Do not log an error if FW successfully initializes. Fixes: 2d2c2331673c ("scsi: megaraid_sas: modified few prints in OCR and IOC INIT path") Signed-off-by: Vinson Lee Acked-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6667e6d91c88a788d5ab1b1e999d245473e84a90 Author: Ohad Sharabi Date: Wed Mar 28 12:42:18 2018 +0300 scsi: ufs: add trace event for ufs upiu Add UFS Protocol Information Units(upiu) trace events for ufs driver, used to trace various ufs transaction types- command, task-management and device management. The trace-point format is generic and can be easily adapted to trace other upius if needed. Currently tracing ufs transaction of type 'device management', which this patch introduce, cannot be obtained from any other trace. Device management transactions are used for communication with the device such as reading and writing descriptor or attributes etc. Signed-off-by: Ohad Sharabi Reviewed-by: Stanislav Nijnikov Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 40 ++++++++++++++++++++++++++++++++++++++++ include/trace/events/ufs.h | 27 +++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) commit 4d79e7d0f0cfe22c05c21a1008fa000f153119aa Author: John Pittman Date: Sat Mar 24 09:30:48 2018 -0400 scsi: core: remove reference to scsi_show_extd_sense() In commit 2104551969e8 ("scsi: use per-cpu buffer for formatting sense"), function scsi_show_extd_sense() was removed, switching use over to scsi_format_extd_sense(). Remove last reference to scsi_show_extd_sense() in include/scsi/scsi_dbg.h. Signed-off-by: John Pittman Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen include/scsi/scsi_dbg.h | 2 -- 1 file changed, 2 deletions(-) commit 94e5395d2403c8bc2504a7cbe4c4caaacb7b8b84 Author: Martin K. Petersen Date: Wed Apr 18 22:54:59 2018 -0400 scsi: mptsas: Disable WRITE SAME First generation MPT Fusion controllers can not translate WRITE SAME when the attached device is a SATA drive. Disable WRITE SAME support. Reported-by: Nikola Ciprich Cc: Signed-off-by: Martin K. Petersen drivers/message/fusion/mptsas.c | 1 + 1 file changed, 1 insertion(+) commit ab60ee7bf9a84954f50a66a3d835860e80f99b7f Author: Long Li Date: Tue Apr 17 12:17:05 2018 -0700 cifs: smbd: Check for iov length on sending the last iov When sending the last iov that breaks into smaller buffers to fit the transfer size, it's necessary to check if this is the last iov. If this is the latest iov, stop and proceed to send pages. Signed-off-by: Long Li Cc: stable@vger.kernel.org Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg fs/cifs/smbdirect.c | 2 ++ 1 file changed, 2 insertions(+) commit 13a83eac373c49c0a081cbcd137e79210fe78acd Author: Michael Neuling Date: Wed Apr 11 13:37:58 2018 +1000 powerpc/eeh: Fix enabling bridge MMIO windows On boot we save the configuration space of PCIe bridges. We do this so when we get an EEH event and everything gets reset that we can restore them. Unfortunately we save this state before we've enabled the MMIO space on the bridges. Hence if we have to reset the bridge when we come back MMIO is not enabled and we end up taking an PE freeze when the driver starts accessing again. This patch forces the memory/MMIO and bus mastering on when restoring bridges on EEH. Ideally we'd do this correctly by saving the configuration space writes later, but that will have to come later in a larger EEH rewrite. For now we have this simple fix. The original bug can be triggered on a boston machine by doing: echo 0x8000000000000000 > /sys/kernel/debug/powerpc/PCI0001/err_injct_outbound On boston, this PHB has a PCIe switch on it. Without this patch, you'll see two EEH events, 1 expected and 1 the failure we are fixing here. The second EEH event causes the anything under the PHB to disappear (i.e. the i40e eth). With this patch, only 1 EEH event occurs and devices properly recover. Fixes: 652defed4875 ("powerpc/eeh: Check PCIe link after reset") Cc: stable@vger.kernel.org # v3.11+ Reported-by: Pridhiviraj Paidipeddi Signed-off-by: Michael Neuling Acked-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_pe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0cfce53a7880eb949e55fcfbe0d82c613f056fe0 Author: Colin Ian King Date: Wed Apr 11 08:36:49 2018 +0100 scsi: fnic: fix spelling mistake in fnic stats "Abord" -> "Abort" Trivial fix to spelling mistake in fnic stats message text. Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f2c8bf6bdff306e8f918fa4bacf636c6b9ef760 Author: Douglas Gilbert Date: Tue Apr 10 13:00:36 2018 -0400 scsi: scsi_debug: IMMED related delay adjustments A patch titled: "[PATCH v2] scsi_debug: implement IMMED bit" introduced long delays to the Start stop unit (SSU) and Synchronize cache (SC) commands when the IMMED bit is clear. This patch makes those delays more realistic. It causes SSU to only delay when the start stop state is changed; SC only delays when there's been a write since the previous SC. It also reduced the SC delay from 1 second to 50 milliseconds. Signed-off-by: Douglas Gilbert Tested-by: Ming Lei Reported-by: Ming Lei Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debug.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit af17092810a887178195276255b7b31f8fbe7dbe Author: Chris Leech Date: Mon Apr 9 15:15:28 2018 -0700 scsi: iscsi: respond to netlink with unicast when appropriate Instead of always multicasting responses, send a unicast netlink message directed at the correct pid. This will be needed if we ever want to support multiple userspace processes interacting with the kernel over iSCSI netlink simultaneously. Limitations can currently be seen if you attempt to run multiple iscsistart commands in parallel. We've fixed up the userspace issues in iscsistart that prevented multiple instances from running, so now attempts to speed up booting by bringing up multiple iscsi sessions at once in the initramfs are just running into misrouted responses that this fixes. Signed-off-by: Chris Leech Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_iscsi.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 64e86fec54069266ba32be551d7b7f75e88ab60c Author: Subash Abhinov Kasiviswanathan Date: Tue Apr 17 17:40:00 2018 -0600 net: qualcomm: rmnet: Fix warning seen with fill_info When the last rmnet device attached to a real device is removed, the real device is unregistered from rmnet. As a result, the real device lookup fails resulting in a warning when the fill_info handler is called as part of the rmnet device unregistration. Fix this by returning the rmnet flags as 0 when no real device is present. WARNING: CPU: 0 PID: 1779 at net/core/rtnetlink.c:3254 rtmsg_ifinfo_build_skb+0xca/0x10d Modules linked in: CPU: 0 PID: 1779 Comm: ip Not tainted 4.16.0-11872-g7ce2367 #1 Stack: 7fe655f0 60371ea3 00000000 00000000 60282bc6 6006b116 7fe65600 60371ee8 7fe65660 6003a68c 00000000 900000000 Call Trace: [<6006b116>] ? printk+0x0/0x94 [<6001f375>] show_stack+0xfe/0x158 [<60371ea3>] ? dump_stack_print_info+0xe8/0xf1 [<60282bc6>] ? rtmsg_ifinfo_build_skb+0xca/0x10d [<6006b116>] ? printk+0x0/0x94 [<60371ee8>] dump_stack+0x2a/0x2c [<6003a68c>] __warn+0x10e/0x13e [<6003a82c>] warn_slowpath_null+0x48/0x4f [<60282bc6>] rtmsg_ifinfo_build_skb+0xca/0x10d [<60282c4d>] rtmsg_ifinfo_event.part.37+0x1e/0x43 [<60282c2f>] ? rtmsg_ifinfo_event.part.37+0x0/0x43 [<60282d03>] rtmsg_ifinfo+0x24/0x28 [<60264e86>] dev_close_many+0xba/0x119 [<60282cdf>] ? rtmsg_ifinfo+0x0/0x28 [<6027c225>] ? rtnl_is_locked+0x0/0x1c [<6026ca67>] rollback_registered_many+0x1ae/0x4ae [<600314be>] ? unblock_signals+0x0/0xae [<6026cdc0>] ? unregister_netdevice_queue+0x19/0xec [<6026ceec>] unregister_netdevice_many+0x21/0xa1 [<6027c765>] rtnl_delete_link+0x3e/0x4e [<60280ecb>] rtnl_dellink+0x262/0x29c [<6027c241>] ? rtnl_get_link+0x0/0x3e [<6027f867>] rtnetlink_rcv_msg+0x235/0x274 Fixes: be81a85f5f87 ("net: qualcomm: rmnet: Implement fill_info") Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 92d32170847bfff2dd08af2c016085779f2fd2a1 Author: David Sterba Date: Mon Apr 16 21:10:14 2018 +0200 btrfs: fix unaligned access in readdir The last update to readdir introduced a temporary buffer to store the emitted readdir data, but as there are file names of variable length, there's a lot of unaligned access. This was observed on a sparc64 machine: Kernel unaligned access at TPC[102f3080] btrfs_real_readdir+0x51c/0x718 [btrfs] Fixes: 23b5ec74943 ("btrfs: fix readdir deadlock with pagefault") CC: stable@vger.kernel.org # 4.14+ Reported-and-tested-by: René Rebe Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/inode.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 0a0a7e00a250c117f0c7ad8e1184abd98e7c098a Author: Yonghong Song Date: Wed Apr 18 10:49:12 2018 -0700 tools/bpf: fix test_sock and test_sock_addr.sh failure The bpf selftests test_sock and test_sock_addr.sh failed in my test machine. The failure looks like: $ ./test_sock Test case: bind4 load with invalid access: src_ip6 .. [PASS] Test case: bind4 load with invalid access: mark .. [PASS] Test case: bind6 load with invalid access: src_ip4 .. [PASS] Test case: sock_create load with invalid access: src_port .. [PASS] Test case: sock_create load w/o expected_attach_type (compat mode) .. [FAIL] Test case: sock_create load w/ expected_attach_type .. [FAIL] Test case: attach type mismatch bind4 vs bind6 .. [FAIL] ... Summary: 4 PASSED, 12 FAILED $ ./test_sock_addr.sh Wait for testing IPv4/IPv6 to become available ..... ERROR: Timeout waiting for test IP to become available. In test_sock, bpf program loads failed due to hitting memlock limits. In test_sock_addr.sh, my test machine is a ipv6 only test box and using "ping" without specifying address family for an ipv6 address does not work. This patch fixed the issue by including header bpf_rlimit.h in test_sock.c and test_sock_addr.c, and specifying address family for ping command. Cc: Andrey Ignatov Signed-off-by: Yonghong Song Acked-by: Andrey Ignatov Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_sock.c | 1 + tools/testing/selftests/bpf/test_sock_addr.c | 1 + tools/testing/selftests/bpf/test_sock_addr.sh | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) commit b3d7e55c3f886493235bfee08e1e5a4a27cbcce8 Author: Matt Redfearn Date: Tue Apr 17 16:40:01 2018 +0100 MIPS: uaccess: Add micromips clobbers to bzero invocation The micromips implementation of bzero additionally clobbers registers t7 & t8. Specify this in the clobbers list when invoking bzero. Fixes: 26c5e07d1478 ("MIPS: microMIPS: Optimise 'memset' core library function.") Reported-by: James Hogan Signed-off-by: Matt Redfearn Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: # 3.10+ Patchwork: https://patchwork.linux-mips.org/patch/19110/ Signed-off-by: James Hogan arch/mips/include/asm/uaccess.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit be71eda5383faa663efdba9ef54a6b8255e3c7f0 Author: Thomas Richter Date: Wed Apr 18 09:14:36 2018 +0200 module: Fix display of wrong module .text address Reading file /proc/modules shows the correct address: [root@s35lp76 ~]# cat /proc/modules | egrep '^qeth_l2' qeth_l2 94208 1 - Live 0x000003ff80401000 and reading file /sys/module/qeth_l2/sections/.text [root@s35lp76 ~]# cat /sys/module/qeth_l2/sections/.text 0x0000000018ea8363 displays a random address. This breaks the perf tool which uses this address on s390 to calculate start of .text section in memory. Fix this by printing the correct (unhashed) address. Thanks to Jessica Yu for helping on this. Fixes: ef0010a30935 ("vsprintf: don't use 'restricted_pointer()' when not restricting") Cc: # v4.15+ Suggested-by: Linus Torvalds Signed-off-by: Thomas Richter Cc: Jessica Yu Signed-off-by: Jessica Yu kernel/module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c96eebf07692e53bf4dd5987510d8b550e793598 Author: Matt Redfearn Date: Tue Apr 17 16:40:00 2018 +0100 MIPS: memset.S: Fix clobber of v1 in last_fixup The label .Llast_fixup\@ is jumped to on page fault within the final byte set loop of memset (on < MIPSR6 architectures). For some reason, in this fault handler, the v1 register is randomly set to a2 & STORMASK. This clobbers v1 for the calling function. This can be observed with the following test code: static int __init __attribute__((optimize("O0"))) test_clear_user(void) { register int t asm("v1"); char *test; int j, k; pr_info("\n\n\nTesting clear_user\n"); test = vmalloc(PAGE_SIZE); for (j = 256; j < 512; j++) { t = 0xa5a5a5a5; if ((k = clear_user(test + PAGE_SIZE - 256, j)) != j - 256) { pr_err("clear_user (%px %d) returned %d\n", test + PAGE_SIZE - 256, j, k); } if (t != 0xa5a5a5a5) { pr_err("v1 was clobbered to 0x%x!\n", t); } } return 0; } late_initcall(test_clear_user); Which demonstrates that v1 is indeed clobbered (MIPS64): Testing clear_user v1 was clobbered to 0x1! v1 was clobbered to 0x2! v1 was clobbered to 0x3! v1 was clobbered to 0x4! v1 was clobbered to 0x5! v1 was clobbered to 0x6! v1 was clobbered to 0x7! Since the number of bytes that could not be set is already contained in a2, the andi placing a value in v1 is not necessary and actively harmful in clobbering v1. Reported-by: James Hogan Signed-off-by: Matt Redfearn Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/19109/ Signed-off-by: James Hogan arch/mips/lib/memset.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87ef12027b9b1dd0e0b12cf311fbcb19f9d92539 Merge: a27fc14 d936054 Author: Linus Torvalds Date: Wed Apr 18 12:48:17 2018 -0700 Merge tag 'ceph-for-4.17-rc2' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "A couple of follow-up patches for -rc1 changes in rbd, support for a timeout on waiting for the acquisition of exclusive lock and a fix for uninitialized memory access in CephFS, marked for stable" * tag 'ceph-for-4.17-rc2' of git://github.com/ceph/ceph-client: rbd: notrim map option rbd: adjust queue limits for "fancy" striping rbd: avoid Wreturn-type warnings ceph: always update atime/mtime/ctime for new inode rbd: support timeout in rbd_wait_state_locked() rbd: refactor rbd_wait_state_locked() commit eccb1b936363c62544bccb5bbb75afec9536f7e3 Author: Arnaldo Carvalho de Melo Date: Wed Apr 18 12:59:03 2018 -0300 perf test BPF: Fixup BPF test using epoll_pwait syscall function probe Since e145242ea0df ("syscalls/core, syscalls/x86: Clean up syscall stub naming convention") changed the main syscall function for 'epoll_pwait' to something other than the expected 'SyS_epoll_pwait the' 'perf test BPF' entries started failing, fix it by using something called from the main syscall function instead, 'epoll_wait', which should keep this test working in older kernels too. Before: # perf test BPF 40: BPF filter : 40.1: Basic BPF filtering : FAILED! 40.2: BPF pinning : Skip 40.3: BPF prologue generation : Skip 40.4: BPF relocation checker : Skip If we use -v for that test we see the problem: Probe point 'SyS_epoll_pwait' not found. After: # perf test BPF 40: BPF filter : 40.1: Basic BPF filtering : Ok 40.2: BPF pinning : Ok 40.3: BPF prologue generation : Ok 40.4: BPF relocation checker : Ok # Cc: Adrian Hunter Cc: David Ahern Cc: Dominik Brodowski Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: https://lkml.kernel.org/r/tip-y24nmn70cs2am8jh4i344dng@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/bpf-script-example.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 518c6021e9b82696819b380cd173e76cac55a01e Author: Arnaldo Carvalho de Melo Date: Tue Apr 17 14:47:36 2018 -0300 perf tests mmap: Show which tracepoint is failing In the 'perf test "mmap interface"' we try creating events for several tracepoints, but when perf_evsel__new() fails we're not showing which one is failing, fix that to help diagnosing problems, such as the syscall tracepoints ones being found and fixes in this merge window. Now the failing tests shows: # perf test -v "mmap interface" 4: Read samples using the mmap interface : --- start --- test child forked, pid 14311 perf_evsel__new(sys_enter_getppid) test child finished with -1 ---- end ---- Read samples using the mmap interface: FAILED! # Now to check why the syscalls:sys_enter_getppid is failing... # ls -la /sys/kernel/debug/tracing/events/syscalls/sys_enter_getppid ls: cannot access '/sys/kernel/debug/tracing/events/syscalls/sys_enter_getppid': No such file or directory # Cc: Adrian Hunter Cc: David Ahern Cc: Dominik Brodowski Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-44xk0ycdzrfzx1o9rklf5itl@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/mmap-basic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66f5a0779af2a4f28b1832f6c20bc9d3b1ab1886 Author: Ravi Bangoria Date: Tue Apr 17 09:43:44 2018 +0530 perf tools: Add '\n' at the end of parse-options error messages Few error messages does not have '\n' at the end and thus next prompt gets printed in the same line. Ex, linux~$ perf buildid-cache -verbose --add ./a.out Error: did you mean `--verbose` (with two dashes ?)linux~$ Fix it. Signed-off-by: Ravi Bangoria Reviewed-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Kate Stewart Cc: Krister Johansen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Sihyeon Jang Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180417041346.5617-2-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/subcmd/parse-options.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ccbb6afe0890b09cc828373a9a5fffab40ec85df Author: Andi Kleen Date: Fri Apr 6 13:38:12 2018 -0700 perf record: Remove suggestion to enable APIC 'perf record' suggests to enable the APIC on errors. APIC is practically always used today and the problem is usually somewhere else. Just remove the outdated suggestion. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20180406203812.3087-5-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ec3948451e0ba317e66873b48d6cc51d701d4eb0 Author: Andi Kleen Date: Fri Apr 6 13:38:11 2018 -0700 perf record: Remove misleading error suggestion When perf record encounters an error setting up an event it suggests to enable CONFIG_PERF_EVENTS. This is misleading because: - Usually it is enabled (it is really hard to disable on x86) - The problem is usually somewhere else, e.g. the CPU is not supported or an invalid configuration has been used. Remove the misleading suggestion. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20180406203812.3087-4-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6a02f06edea5a5910c787fd6c49b0552e8080e5d Author: Andi Kleen Date: Fri Apr 6 13:38:10 2018 -0700 perf hists browser: Clarify top/report browser help Clarify in the browser help that ESC in tui mode may go back to the previous screen instead of just exiting (was not clear to me) Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20180406203812.3087-3-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7e9eab3dbd35268c16244557a4155a2d9a641c3 Author: Andi Kleen Date: Fri Apr 6 13:38:09 2018 -0700 perf mem: Allow all record/report options For perf mem report / perf mem record, pass all unknown options through to the underlying report/record commands. This makes things like perf mem record -a sleep 1 work. Matches how c2c and other tools work. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20180406203812.3087-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-mem.txt | 3 +++ tools/perf/builtin-mem.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit 4e5c01a7c746130033eb6e7153b346b8ca61e7a5 Author: Arnaldo Carvalho de Melo Date: Mon Apr 16 16:39:38 2018 -0300 perf trace: Support MAP_FIXED_NOREPLACE Introduced in a4ff8e8620d3 ("mm: introduce MAP_FIXED_NOREPLACE"), and now that we have that define in the just syncronized tools/arch/*/include/uapi/asm/mman.h files, add support for it. This should really transition to autogeneration of string tables as done for various other things: $ ls /tmp/build/perf/trace/beauty/generated/*.c arch_errno_name_array.c kcmp_type_array.c madvise_behavior_array.c pkey_alloc_access_rights_array.c prctl_option_array.c $ head /tmp/build/perf/trace/beauty/generated/madvise_behavior_array.c static const char *madvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [8] = "FREE", [9] = "REMOVE", [10] = "DONTFORK", [11] = "DOFORK", $ Till then, add support for this the old way. Also it has to be ifdef'ed, because arches like mips still don't define it. The proper solution will be to have per-arch tables for these values to support cross-analysis. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Michal Hocko Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-td9t5vhjltqnlzaurkkgq8cn@git.kernel.org Signef-off-by: Arnaldo Carvalho de Melo tools/perf/trace/beauty/mmap.c | 3 +++ 1 file changed, 3 insertions(+) commit 4555a5021fe88fc4f19ff53d1e58b410cf30a49a Author: Srinath Mannam Date: Wed Apr 18 14:11:29 2018 +0530 arm64: dts: correct SATA addresses for Stingray Correct all SATA ahci and phy controller register addresses and interrupt lines to proper values. Fixes: 344a2e514182 ("arm64: dts: Add SATA DT nodes for Stingray SoC") Signed-off-by: Srinath Mannam Reviewed-by: Ray Jui Reviewed-by: Scott Branden Reviewed-by: Andrew Gospodarek Signed-off-by: Florian Fainelli .../boot/dts/broadcom/stingray/stingray-sata.dtsi | 80 +++++++++++----------- 1 file changed, 40 insertions(+), 40 deletions(-) commit 81c895072d29cd70eea5be1a8587cd6461c3715a Author: Bjørn Mork Date: Tue Apr 17 22:46:38 2018 +0200 tun: fix vlan packet truncation Bogus trimming in tun_net_xmit() causes truncated vlan packets. skb->len is correct whether or not skb_vlan_tag_present() is true. There is no more reason to adjust the skb length on xmit in this driver than any other driver. tun_put_user() adds 4 bytes to the total for tagged packets because it transmits the tag inline to userspace. This is similar to a nic transmitting the tag inline on the wire. Reproducing the bug by sending any tagged packet through back-to-back connected tap interfaces: socat TUN,tun-type=tap,iff-up,tun-name=in TUN,tun-type=tap,iff-up,tun-name=out & ip link add link in name in.20 type vlan id 20 ip addr add 10.9.9.9/24 dev in.20 ip link set in.20 up tshark -nxxi in -f arp -c1 2>/dev/null & tshark -nxxi out -f arp -c1 2>/dev/null & ping -c 1 10.9.9.5 >/dev/null 2>&1 The output from the 'in' and 'out' interfaces are different when the bug is present: Capturing on 'in' 0000 ff ff ff ff ff ff 76 cf 76 37 d5 0a 81 00 00 14 ......v.v7...... 0010 08 06 00 01 08 00 06 04 00 01 76 cf 76 37 d5 0a ..........v.v7.. 0020 0a 09 09 09 00 00 00 00 00 00 0a 09 09 05 .............. Capturing on 'out' 0000 ff ff ff ff ff ff 76 cf 76 37 d5 0a 81 00 00 14 ......v.v7...... 0010 08 06 00 01 08 00 06 04 00 01 76 cf 76 37 d5 0a ..........v.v7.. 0020 0a 09 09 09 00 00 00 00 00 00 .......... Fixes: aff3d70a07ff ("tun: allow to attach ebpf socket filter") Cc: Jason Wang Signed-off-by: Bjørn Mork Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/tun.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 36a50a989ee8267588de520b8704b85f045a3220 Author: Tung Nguyen Date: Tue Apr 17 21:58:27 2018 +0200 tipc: fix infinite loop when dumping link monitor summary When configuring the number of used bearers to MAX_BEARER and issuing command "tipc link monitor summary", the command enters infinite loop in user space. This issue happens because function tipc_nl_node_dump_monitor() returns the wrong 'prev_bearer' value when all potential monitors have been scanned. The correct behavior is to always try to scan all monitors until either the netlink message is full, in which case we return the bearer identity of the affected monitor, or we continue through the whole bearer array until we can return MAX_BEARERS. This solution also caters for the case where there may be gaps in the bearer array. Signed-off-by: Tung Nguyen Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/monitor.c | 2 +- net/tipc/node.c | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) commit be47e41d77fba5bc17e9fb5f1c99217bb6691989 Author: Jon Maloy Date: Tue Apr 17 21:25:42 2018 +0200 tipc: fix use-after-free in tipc_nametbl_stop When we delete a service item in tipc_nametbl_stop() we loop over all service ranges in the service's RB tree, and for each service range we loop over its pertaining publications while calling tipc_service_remove_publ() for each of them. However, tipc_service_remove_publ() has the side effect that it also removes the comprising service range item when there are no publications left. This leads to a "use-after-free" access when the inner loop continues to the next iteration, since the range item holding the list we are looping no longer exists. We fix this by moving the delete of the service range item outside the said function. Instead, we now let the two functions calling it test if the list is empty and perform the removal when that is the case. Reported-by: syzbot+d64b64afc55660106556@syzkaller.appspotmail.com Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/name_table.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 4b7b0d7b25538d2ad421a1041267d5208d3425bc Author: Martin Blumenstingl Date: Mon Mar 26 23:17:48 2018 +0200 ARM64: dts: meson-gxm-khadas-vim2: enable the USB controller The Khadas VIM2 board connects the dwc3 controller to an internal 4-port USB hub which. Two of these ports are accessible directly soldered to the board, while the other two are accessible through the 40-pin "GPIO" header. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 55ef32249bb647c6b64adcf943918d302a0020a7 Author: Martin Blumenstingl Date: Mon Mar 26 23:17:47 2018 +0200 ARM64: dts: meson-gxl-nexbox-a95x: enable the USB controller The Nexbox A95X provides two USB ports. Enable the SoC's USB controller on this board to make these USB ports usable. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 4 ++++ 1 file changed, 4 insertions(+) commit b83687f359d9b4128073f06ab7a06489eb04aa7c Author: Martin Blumenstingl Date: Mon Mar 26 23:17:46 2018 +0200 ARM64: dts: meson-gxl-s905x-libretech-cc: enable the USB controller The LibreTech CC ("Le Potato") board provides four USB connectors. These are provided by a hub which is connected to the SoC's USB controller. Enable the SoC's USB controller to make the USB ports usable. Also turn on the HDMI_5V regulator when powering on the PHY because (even though it's not shown in the schematics) HDMI_5V also supplies the USB VBUS. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 972cd12a027256061c19c164021f2a771e860438 Author: Martin Blumenstingl Date: Mon Mar 26 23:17:45 2018 +0200 ARM64: dts: meson-gx-p23x-q20x: enable the USB controller All S905D (GXL) and S912 (GXM) reference boards (namely these are P230, P231, Q200 and Q201) provide USB connectors. This enables the USB controller on these boards to make the USB ports actually usable. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit b9f07cb4f41fccbe7616482015d28e6e26aec3a3 Author: Martin Blumenstingl Date: Mon Mar 26 23:17:44 2018 +0200 ARM64: dts: meson-gxl-s905x-p212: enable the USB controller All boards based on the P212 reference design (the P212 reference board itself and the Khadas VIM) have USB connectors (in case of the Khadas VIM the first port is exposed through the USB Type-C connector, the second port is connected to a 4-port USB hub). This enables the USB controller on these boards to make the USB ports actually usable. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 458baa95c86406c81c6ebac0a98d1689075a3ec4 Author: Martin Blumenstingl Date: Mon Mar 26 23:17:43 2018 +0200 ARM64: dts: meson-gxm: add GXM specific USB host configuration The USB configuration on GXM is slightly different than on GXL. The dwc3 controller's internal hub has three USB2 ports (instead of 2 on GXL) along with a dedicated USB2 PHY for this port. However, it seems that there are no pins on GXM which would allow connecting the third port to a physical USB port. Passing the third PHY is required though, because without it none of the other USB ports is working (this seems to be a limitation of how the internal USB hub works, if one PHY is disabled then no USB port works). Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxm.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 8aec5fc1d4d881fe446addb94309efb39d4e5b23 Author: Martin Blumenstingl Date: Mon Mar 26 23:17:42 2018 +0200 ARM64: dts: meson-gxl: add USB host support This adds USB host support to the Meson GXL SoC. A dwc3 controller is used for host-mode, while a dwc2 controller (not added in this patch because I could not get it working) is used for device-mode only. The dwc3 controller's internal roothub has two USB2 ports enabled but no USB3 port. Each of the ports is supplied by a separate PHY. The USB pins are connected to the SoC's USBHOST_A and USBOTG_B pins. Due to the way the roothub works internally the USB PHYs are left enabled. When the dwc3 controller is disabled the PHY is never powered on so it does not draw any extra power. However, when the dwc3 host controller is enabled then all PHYs also have to be enabled, otherwise USB devices will not be detected (regardless of whether they are plugged into an enabled port or not). This means that only the dwc3 controller has to be enabled on boards with USB support (instead of requiring all boards to enable the PHYs additionally with the chance of forgetting to enable one and breaking all other ports with that as well). This also adds the USB3 PHY which currently only does some basic initialization. That however is required because without it high-speed devices (like USB thumb drives) do not work on some devices (probably because the bootloader does not configure the USB3 PHY registers). Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 61 ++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 5692fceebeb7f11c07e2a990f7711a01ae437de2 Author: Dave Gerlach Date: Wed Apr 11 16:15:43 2018 -0500 ARM: OMAP2+: Fix build when using split object directories The sleep33xx and sleep43xx files should not depend on a header file generated in drivers/memory. Remove this dependency and instead allow both drivers/memory and arch/arm/mach-omap2 to generate all macros needed in headers local to their own paths. This fixes an issue where the build fail will when using O= to set a split object directory and arch/arm/mach-omap2 is built before drivers/memory with the following error: .../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory compilation terminated. Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM") Reviewed-by: Masahiro Yamada Signed-off-by: Dave Gerlach Acked-by: Santosh Shilimkar Signed-off-by: Tony Lindgren arch/arm/mach-omap2/Makefile | 6 +-- arch/arm/mach-omap2/pm-asm-offsets.c | 3 ++ arch/arm/mach-omap2/sleep33xx.S | 1 - arch/arm/mach-omap2/sleep43xx.S | 1 - drivers/memory/emif-asm-offsets.c | 72 +--------------------------------- include/linux/ti-emif-sram.h | 75 ++++++++++++++++++++++++++++++++++++ 6 files changed, 80 insertions(+), 78 deletions(-) commit b2569260d55228b617bd82aba6d0db2faeeb4116 Author: Theodore Ts'o Date: Wed Apr 18 11:49:31 2018 -0400 ext4: set h_journal if there is a failure starting a reserved handle If ext4 tries to start a reserved handle via jbd2_journal_start_reserved(), and the journal has been aborted, this can result in a NULL pointer dereference. This is because the fields h_journal and h_transaction in the handle structure share the same memory, via a union, so jbd2_journal_start_reserved() will clear h_journal before calling start_this_handle(). If this function fails due to an aborted handle, h_journal will still be NULL, and the call to jbd2_journal_free_reserved() will pass a NULL journal to sub_reserve_credits(). This can be reproduced by running "kvm-xfstests -c dioread_nolock generic/475". Cc: stable@kernel.org # 3.11 Fixes: 8f7d89f36829b ("jbd2: transaction reservation support") Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger Reviewed-by: Jan Kara fs/jbd2/transaction.c | 1 + 1 file changed, 1 insertion(+) commit b32e56e5a87a1f9243db92bc7a5df0ffb4627cfb Author: Benjamin Herrenschmidt Date: Wed Apr 11 15:17:59 2018 +1000 powerpc/xive: Fix trying to "push" an already active pool VP When setting up a CPU, we "push" (activate) a pool VP for it. However it's an error to do so if it already has an active pool VP. This happens when doing soft CPU hotplug on powernv since we don't tear down the CPU on unplug. The HW flags the error which gets captured by the diagnostics. Fix this by making sure to "pull" out any already active pool first. Fixes: 243e25112d06 ("powerpc/xive: Native exploitation of the XIVE interrupt controller") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/sysdev/xive/native.c | 4 ++++ 1 file changed, 4 insertions(+) commit 336a8bb8e36a273a802a54b2e673c777c9c62fb1 Author: Qu Wenruo Date: Tue Apr 17 18:43:58 2018 +0800 btrfs: Fix wrong btrfs_delalloc_release_extents parameter Commit 43b18595d660 ("btrfs: qgroup: Use separate meta reservation type for delalloc") merged into mainline is not the latest version submitted to mail list in Dec 2017. It has a fatal wrong @qgroup_free parameter, which results increasing qgroup metadata pertrans reserved space, and causing a lot of early EDQUOT. Fix it by applying the correct diff on top of current branch. Fixes: 43b18595d660 ("btrfs: qgroup: Use separate meta reservation type for delalloc") Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f218ea6c4792e0fabba0195f2f866d0a3b58431e Author: Qu Wenruo Date: Tue Apr 17 16:52:45 2018 +0800 btrfs: delayed-inode: Remove wrong qgroup meta reservation calls Commit 4f5427ccce5d ("btrfs: delayed-inode: Use new qgroup meta rsv for delayed inode and item") merged into mainline was not latest version submitted to the mail list in Dec 2017. Which lacks the following fixes: 1) Remove btrfs_qgroup_convert_reserved_meta() call in btrfs_delayed_item_release_metadata() 2) Remove btrfs_qgroup_reserve_meta_prealloc() call in btrfs_delayed_inode_reserve_metadata() Those fixes will resolve unexpected EDQUOT problems. Fixes: 4f5427ccce5d ("btrfs: delayed-inode: Use new qgroup meta rsv for delayed inode and item") Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit ff6bc37eb7f6e7b052e50c13a480e1080b3ec07a Author: Qu Wenruo Date: Thu Dec 21 13:42:04 2017 +0800 btrfs: qgroup: Use independent and accurate per inode qgroup rsv Unlike reservation calculation used in inode rsv for metadata, qgroup doesn't really need to care about things like csum size or extent usage for the whole tree COW. Qgroups care more about net change of the extent usage. That's to say, if we're going to insert one file extent, it will mostly find its place in COWed tree block, leaving no change in extent usage. Or causing a leaf split, resulting in one new net extent and increasing qgroup number by nodesize. Or in an even more rare case, increase the tree level, increasing qgroup number by 2 * nodesize. So here instead of using the complicated calculation for extent allocator, which cares more about accuracy and no error, qgroup doesn't need that over-estimated reservation. This patch will maintain 2 new members in btrfs_block_rsv structure for qgroup, using much smaller calculation for qgroup rsv, reducing false EDQUOT. Signed-off-by: David Sterba Signed-off-by: Qu Wenruo fs/btrfs/ctree.h | 19 +++++++++++++++++ fs/btrfs/extent-tree.c | 57 ++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 65 insertions(+), 11 deletions(-) commit a514d63882c3d2063b21b865447266ebcb18b04c Author: Qu Wenruo Date: Fri Dec 22 16:06:39 2017 +0800 btrfs: qgroup: Commit transaction in advance to reduce early EDQUOT Unlike previous method that tries to commit transaction inside qgroup_reserve(), this time we will try to commit transaction using fs_info->transaction_kthread to avoid nested transaction and no need to worry about locking context. Since it's an asynchronous function call and we won't wait for transaction commit, unlike previous method, we must call it before we hit the qgroup limit. So this patch will use the ratio and size of qgroup meta_pertrans reservation as indicator to check if we should trigger a transaction commit. (meta_prealloc won't be cleaned in transaction committ, it's useless anyway) Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/ctree.h | 6 ++++++ fs/btrfs/disk-io.c | 1 + fs/btrfs/qgroup.c | 43 +++++++++++++++++++++++++++++++++++++++++-- fs/btrfs/transaction.c | 1 + fs/btrfs/transaction.h | 14 ++++++++++++++ 5 files changed, 63 insertions(+), 2 deletions(-) commit 946b81da114b8ba5c74bb01e57c0c6eca2bdc801 Author: Jiang Biao Date: Wed Apr 18 08:37:18 2018 -0600 blkcg: don't hold blkcg lock when deactivating policy As described in the comment of blkcg_activate_policy(), *Update of each blkg is protected by both queue and blkcg locks so that holding either lock and testing blkcg_policy_enabled() is always enough for dereferencing policy data.* with queue lock held, there is no need to hold blkcg lock in blkcg_deactivate_policy(). Similar case is in blkcg_activate_policy(), which has removed holding of blkcg lock in commit 4c55f4f9ad3001ac1fefdd8d8ca7641d18558e23. Signed-off-by: Jiang Biao Signed-off-by: Wen Yang CC: Tejun Heo Signed-off-by: Jens Axboe block/blk-cgroup.c | 5 ----- 1 file changed, 5 deletions(-) commit 44f06ba8297c7e9dfd0e49b40cbe119113cca094 Author: Jan Kara Date: Thu Apr 12 17:22:23 2018 +0200 udf: Fix leak of UTF-16 surrogates into encoded strings OSTA UDF specification does not mention whether the CS0 charset in case of two bytes per character encoding should be treated in UTF-16 or UCS-2. The sample code in the standard does not treat UTF-16 surrogates in any special way but on systems such as Windows which work in UTF-16 internally, filenames would be treated as being in UTF-16 effectively. In Linux it is more difficult to handle characters outside of Base Multilingual plane (beyond 0xffff) as NLS framework works with 2-byte characters only. Just make sure we don't leak UTF-16 surrogates into the resulting string when loading names from the filesystem for now. CC: stable@vger.kernel.org # >= v4.6 Reported-by: Mingye Wang Signed-off-by: Jan Kara fs/udf/unicode.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0ce9144471de9ee09306ca0127e7cd27521ccc3f Author: Dave Chinner Date: Wed Apr 18 14:08:27 2018 +1000 block: add blk_queue_fua() helper function So we can check FUA support status from the iomap direct IO code. Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner Signed-off-by: Jens Axboe include/linux/blkdev.h | 1 + 1 file changed, 1 insertion(+) commit 9de4ee40547fd315d4a0ed1dd15a2fa3559ad707 Author: Dan Carpenter Date: Wed Apr 18 12:51:31 2018 +0300 cdrom: information leak in cdrom_ioctl_media_changed() This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned long. The way the check is written now, if one of the high 32 bits is set then we could read outside the info->slots[] array. This bug is pretty old and it predates git. Reviewed-by: Christoph Hellwig Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter Signed-off-by: Jens Axboe drivers/cdrom/cdrom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41dbee81c875300072f6154d6722f6e8e1353cca Author: Helge Deller Date: Wed Apr 18 15:46:41 2018 +0200 parisc: Document rules regarding checksum of HPMC handler Signed-off-by: Helge Deller arch/parisc/kernel/traps.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b2d71b3cda19831ec67f49d7c6ba0214d9367b29 Author: Mark Rutland Date: Mon Apr 16 16:45:01 2018 +0100 arm64: signal: don't force known signals to SIGKILL Since commit: a7e6f1ca90354a31 ("arm64: signal: Force SIGKILL for unknown signals in force_signal_inject") ... any signal which is not SIGKILL will be upgraded to a SIGKILL be force_signal_inject(). This includes signals we do expect, such as SIGILL triggered by do_undefinstr(). Fix the check to use a logical AND rather than a logical OR, permitting signals whose layout is SIL_FAULT. Fixes: a7e6f1ca90354a31 ("arm64: signal: Force SIGKILL for unknown signals in force_signal_inject") Cc: Will Deacon Reviewed-by: Dave Martin Signed-off-by: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e04907dbc25930b88ee2328fe692c776f63ddf2c Author: Viresh Kumar Date: Fri Feb 9 14:28:10 2018 +0530 dt-bindings: thermal: Remove "cooling-{min|max}-level" properties The "cooling-min-level" and "cooling-max-level" properties are not parsed by any part of kernel currently and the max cooling state of a CPU cooling device is found by referring to the cpufreq table instead. Remove the unused bindings. Signed-off-by: Viresh Kumar Reviewed-by: Rob Herring Signed-off-by: Eduardo Valentin Documentation/devicetree/bindings/thermal/thermal.txt | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 8b8b5903d50d6e4c5fd06272022b25a11c3214cf Author: Bartlomiej Zolnierkiewicz Date: Tue Mar 6 15:43:54 2018 +0100 dt-bindings: thermal: remove no longer needed samsung thermal properties Remove documentation for longer needed samsung thermal properties. Signed-off-by: Bartlomiej Zolnierkiewicz Reviewed-by: Rob Herring Signed-off-by: Eduardo Valentin .../devicetree/bindings/thermal/exynos-thermal.txt | 23 +++++----------------- 1 file changed, 5 insertions(+), 18 deletions(-) commit 89e050c87dab3e933dcb90677947752d19aeafa4 Author: Helge Deller Date: Wed Apr 18 07:49:19 2018 +0200 parisc: Make bzImage default build target Debian uses "make all" to build the Linux kernel, thus to be able to use the self-decompressing kernel as default debian kernel we need to make bzImage the default build target. Signed-off-by: Helge Deller arch/parisc/Makefile | 3 +++ 1 file changed, 3 insertions(+) commit 7eb2c4dd54ff841f2fe509a84973eb25fa20bda2 Author: Imre Deak Date: Mon Apr 16 18:53:09 2018 +0300 drm/i915: Fix LSPCON TMDS output buffer enabling from low-power state LSPCON adapters in low-power state may ignore the first I2C write during TMDS output buffer enabling, resulting in a blank screen even with an otherwise enabled pipe. Fix this by reading back and validating the written value a few times. The problem was noticed on GLK machines with an onboard LSPCON adapter after entering/exiting DC5 power state. Doing an I2C read of the adapter ID as the first transaction - instead of the I2C write to enable the TMDS buffers - returns the correct value. Based on this we assume that the transaction itself is sent properly, it's only the adapter that is not ready for some reason to accept this first write after waking from low-power state. In my case the second I2C write attempt always succeeded. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105854 Cc: Clinton Taylor Cc: Ville Syrjälä Cc: stable@vger.kernel.org Signed-off-by: Imre Deak Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180416155309.11100-1-imre.deak@intel.com drivers/gpu/drm/drm_dp_dual_mode_helper.c | 39 +++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 7 deletions(-) commit b4615730530be85fc45ab4631c2ad6d8e2d0b97d Author: Gaurav K Singh Date: Tue Apr 17 23:52:18 2018 +0530 drm/i915/audio: Fix audio detection issue on GLK On Geminilake, sometimes audio card is not getting detected after reboot. This is a spurious issue happening on Geminilake. HW codec and HD audio controller link was going out of sync for which there was a fix in i915 driver but was not getting invoked for GLK. Extending this fix to GLK as well. Tested by Du,Wenkai on GLK board. Bspec: 21829 v2: Instead of checking GEN9_BC, BXT and GLK macros, use IS_GEN9 macro (Jani N) Cc: # b651bd2a3ae3 ("drm/i915/audio: Fix audio enumeration issue on BXT") Cc: Signed-off-by: Gaurav K Singh Reviewed-by: Abhay Kumar Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1523989338-29677-1-git-send-email-gaurav.k.singh@intel.com (cherry picked from commit 8221229046e862977ae93ec9d34aa583fbd10397) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a0559ed99189f259e92ed34f60dd51688f1bc40 Author: Chris Wilson Date: Sat Apr 14 10:12:33 2018 +0100 drm/i915: Call i915_perf_fini() on init_hw error unwind We have to cleanup after i915_perf_init(), even on the error path, as it passes a pointer into the module to the sysfs core. If we fail to unregister the sysctl table, we leave a dangling pointer which then may explode anytime later. Fixes: 9f9b2792b6d3 ("drm/i915/perf: reuse timestamp frequency from device info") Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Matthew Auld Reviewed-by: Lionel Landwerlin Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20180414091233.32224-1-chris@chris-wilson.co.uk (cherry picked from commit 9f172f6fbd243759c808d97bd83c95e49325b2c9) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit a3520b8992e57bc94ab6ec9f95f09c6c932555fd Author: Jani Nikula Date: Wed Apr 11 16:15:18 2018 +0300 drm/i915/bios: filter out invalid DDC pins from VBT child devices The VBT contains the DDC pin to use for specific ports. Alas, sometimes the field appears to contain bogus data, and while we check for it later on in intel_gmbus_get_adapter() we fail to check the returned NULL on errors. Oops results. The simplest approach seems to be to catch and ignore the bogus DDC pins already at the VBT parsing phase, reverting to fixed per port default pins. This doesn't guarantee display working, but at least it prevents the oops. And we continue to be fuzzed by VBT. One affected machine is Dell Latitude 5590 where a BIOS upgrade added invalid DDC pins. Typical backtrace: [ 35.461411] WARN_ON(!intel_gmbus_is_valid_pin(dev_priv, pin)) [ 35.461432] WARNING: CPU: 6 PID: 411 at drivers/gpu/drm/i915/intel_i2c.c:844 intel_gmbus_get_adapter+0x32/0x37 [i915] [ 35.461437] Modules linked in: i915 ahci libahci dm_snapshot dm_bufio dm_raid raid456 async_raid6_recov async_pq raid6_pq async_xor xor async_memcpy async_tx [ 35.461445] CPU: 6 PID: 411 Comm: kworker/u16:2 Not tainted 4.16.0-rc7.x64-g1cda370ffded #1 [ 35.461447] Hardware name: Dell Inc. Latitude 5590/0MM81M, BIOS 1.1.9 03/13/2018 [ 35.461450] Workqueue: events_unbound async_run_entry_fn [ 35.461465] RIP: 0010:intel_gmbus_get_adapter+0x32/0x37 [i915] [ 35.461467] RSP: 0018:ffff9b4e43d47c40 EFLAGS: 00010286 [ 35.461469] RAX: 0000000000000000 RBX: ffff98f90639f800 RCX: ffffffffae051960 [ 35.461471] RDX: 0000000000000001 RSI: 0000000000000092 RDI: 0000000000000246 [ 35.461472] RBP: ffff98f905410000 R08: 0000004d062a83f6 R09: 00000000000003bd [ 35.461474] R10: 0000000000000031 R11: ffffffffad4eda58 R12: ffff98f905410000 [ 35.461475] R13: ffff98f9064c1000 R14: ffff9b4e43d47cf0 R15: ffff98f905410000 [ 35.461477] FS: 0000000000000000(0000) GS:ffff98f92e580000(0000) knlGS:0000000000000000 [ 35.461479] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 35.461481] CR2: 00007f5682359008 CR3: 00000001b700c005 CR4: 00000000003606e0 [ 35.461483] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 35.461484] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 35.461486] Call Trace: [ 35.461501] intel_hdmi_set_edid+0x37/0x27f [i915] [ 35.461515] intel_hdmi_detect+0x7c/0x97 [i915] [ 35.461518] drm_helper_probe_single_connector_modes+0xe1/0x6c0 [ 35.461521] drm_setup_crtcs+0x129/0xa6a [ 35.461523] ? __switch_to_asm+0x34/0x70 [ 35.461525] ? __switch_to_asm+0x34/0x70 [ 35.461527] ? __switch_to_asm+0x40/0x70 [ 35.461528] ? __switch_to_asm+0x34/0x70 [ 35.461529] ? __switch_to_asm+0x40/0x70 [ 35.461531] ? __switch_to_asm+0x34/0x70 [ 35.461532] ? __switch_to_asm+0x40/0x70 [ 35.461534] ? __switch_to_asm+0x34/0x70 [ 35.461536] __drm_fb_helper_initial_config_and_unlock+0x34/0x46f [ 35.461538] ? __switch_to_asm+0x40/0x70 [ 35.461541] ? _cond_resched+0x10/0x33 [ 35.461557] intel_fbdev_initial_config+0xf/0x1c [i915] [ 35.461560] async_run_entry_fn+0x2e/0xf5 [ 35.461563] process_one_work+0x15b/0x364 [ 35.461565] worker_thread+0x2c/0x3a0 [ 35.461567] ? process_one_work+0x364/0x364 [ 35.461568] kthread+0x10c/0x122 [ 35.461570] ? _kthread_create_on_node+0x5d/0x5d [ 35.461572] ret_from_fork+0x35/0x40 [ 35.461574] Code: 74 16 89 f6 48 8d 04 b6 48 c1 e0 05 48 29 f0 48 8d 84 c7 e8 11 00 00 c3 48 c7 c6 b0 19 1e c0 48 c7 c7 64 8a 1c c0 e8 47 88 ed ec <0f> 0b 31 c0 c3 8b 87 a4 04 00 00 80 e4 fc 09 c6 89 b7 a4 04 00 [ 35.461604] WARNING: CPU: 6 PID: 411 at drivers/gpu/drm/i915/intel_i2c.c:844 intel_gmbus_get_adapter+0x32/0x37 [i915] [ 35.461606] ---[ end trace 4fe1e63e2dd93373 ]--- [ 35.461609] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 [ 35.461613] IP: i2c_transfer+0x4/0x86 [ 35.461614] PGD 0 P4D 0 [ 35.461616] Oops: 0000 [#1] SMP PTI [ 35.461618] Modules linked in: i915 ahci libahci dm_snapshot dm_bufio dm_raid raid456 async_raid6_recov async_pq raid6_pq async_xor xor async_memcpy async_tx [ 35.461624] CPU: 6 PID: 411 Comm: kworker/u16:2 Tainted: G W 4.16.0-rc7.x64-g1cda370ffded #1 [ 35.461625] Hardware name: Dell Inc. Latitude 5590/0MM81M, BIOS 1.1.9 03/13/2018 [ 35.461628] Workqueue: events_unbound async_run_entry_fn [ 35.461630] RIP: 0010:i2c_transfer+0x4/0x86 [ 35.461631] RSP: 0018:ffff9b4e43d47b30 EFLAGS: 00010246 [ 35.461633] RAX: ffff9b4e43d47b6e RBX: 0000000000000005 RCX: 0000000000000001 [ 35.461635] RDX: 0000000000000002 RSI: ffff9b4e43d47b80 RDI: 0000000000000000 [ 35.461636] RBP: ffff9b4e43d47bd8 R08: 0000004d062a83f6 R09: 00000000000003bd [ 35.461638] R10: 0000000000000031 R11: ffffffffad4eda58 R12: 0000000000000002 [ 35.461639] R13: 0000000000000001 R14: ffff9b4e43d47b6f R15: ffff9b4e43d47c07 [ 35.461641] FS: 0000000000000000(0000) GS:ffff98f92e580000(0000) knlGS:0000000000000000 [ 35.461643] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 35.461645] CR2: 0000000000000010 CR3: 00000001b700c005 CR4: 00000000003606e0 [ 35.461646] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 35.461647] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 35.461649] Call Trace: [ 35.461652] drm_do_probe_ddc_edid+0xb3/0x128 [ 35.461654] drm_get_edid+0xe5/0x38d [ 35.461669] intel_hdmi_set_edid+0x45/0x27f [i915] [ 35.461684] intel_hdmi_detect+0x7c/0x97 [i915] [ 35.461687] drm_helper_probe_single_connector_modes+0xe1/0x6c0 [ 35.461689] drm_setup_crtcs+0x129/0xa6a [ 35.461691] ? __switch_to_asm+0x34/0x70 [ 35.461693] ? __switch_to_asm+0x34/0x70 [ 35.461694] ? __switch_to_asm+0x40/0x70 [ 35.461696] ? __switch_to_asm+0x34/0x70 [ 35.461697] ? __switch_to_asm+0x40/0x70 [ 35.461698] ? __switch_to_asm+0x34/0x70 [ 35.461700] ? __switch_to_asm+0x40/0x70 [ 35.461701] ? __switch_to_asm+0x34/0x70 [ 35.461703] __drm_fb_helper_initial_config_and_unlock+0x34/0x46f [ 35.461705] ? __switch_to_asm+0x40/0x70 [ 35.461707] ? _cond_resched+0x10/0x33 [ 35.461724] intel_fbdev_initial_config+0xf/0x1c [i915] [ 35.461727] async_run_entry_fn+0x2e/0xf5 [ 35.461729] process_one_work+0x15b/0x364 [ 35.461731] worker_thread+0x2c/0x3a0 [ 35.461733] ? process_one_work+0x364/0x364 [ 35.461734] kthread+0x10c/0x122 [ 35.461736] ? _kthread_create_on_node+0x5d/0x5d [ 35.461738] ret_from_fork+0x35/0x40 [ 35.461739] Code: 5c fa e1 ad 48 89 df e8 ea fb ff ff e9 2a ff ff ff 0f 1f 44 00 00 31 c0 e9 43 fd ff ff 31 c0 45 31 e4 e9 c5 fd ff ff 41 54 55 53 <48> 8b 47 10 48 83 78 10 00 74 70 41 89 d4 48 89 f5 48 89 fb 65 [ 35.461756] RIP: i2c_transfer+0x4/0x86 RSP: ffff9b4e43d47b30 [ 35.461757] CR2: 0000000000000010 [ 35.461759] ---[ end trace 4fe1e63e2dd93374 ]--- Based on a patch by Fei Li. v2: s/reverting/sticking/ (Chris) Cc: stable@vger.kernel.org Cc: Fei Li Co-developed-by: Fei Li Reported-by: Pavel Nakonechnyi Reported-and-tested-by: Seweryn Kokot Reported-and-tested-by: Laszlo Valko Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105549 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105961 Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180411131519.9091-1-jani.nikula@intel.com (cherry picked from commit f212bf9abe5de9f938fecea7df07046e74052dde) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_bios.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit e6be6bd85654dba55b97758f937c46835d961a44 Author: Tvrtko Ursulin Date: Tue Apr 10 12:27:04 2018 +0100 drm/i915/pmu: Inspect runtime PM state more carefully while estimating RC6 While thinking about sporadic failures of perf_pmu/rc6-runtime-pm* tests on some CI machines I have concluded that: a) the PMU readout of RC6 can race against runtime PM transitions, and b) there are other reasons than being runtime suspended which can cause intel_runtime_pm_get_if_in_use to fail. Therefore when estimating RC6 the code needs to assert we are indeed in suspended state, and if not, the best we can do is return the last known RC6 value. Without this check we can calculate the estimated value based on un- initialized or inappropriate internal state, which can result in over- estimation, or in any case incorrect value being returned. v2: * Re-arrange the code a bit to avoid second unlock and return branch. (Chris Wilson) v3: * Insert some strategic blank lines and improve commit msg. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Fixes: 1fe699e30113 ("drm/i915/pmu: Fix sleep under atomic in RC6 readout") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105010 Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: Imre Deak Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180410112704.24462-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit 2924bdee21edd6785a4df1b4d17fd3cb265fddd9) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_pmu.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) commit fcf1fadf4c65eea6c519c773d2d9901e8ad94f5f Author: Xidong Wang Date: Wed Apr 4 10:38:24 2018 +0100 drm/i915: Do no use kfree() to free a kmem_cache_alloc() return value Along the eb_lookup_vmas() error path, the return value from kmem_cache_alloc() was freed using kfree(). Fix it to use the proper kmem_cache_free() instead. Fixes: d1b48c1e7184 ("drm/i915: Replace execbuf vma ht with an idr") Signed-off-by: Xidong Wang Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: # v4.14+ Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180404093824.9313-1-chris@chris-wilson.co.uk (cherry picked from commit 6be1187dbffa0027ea379c53f7ca0c782515c610) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49530e6411789c1b9ea3ebc58e520c19d1c3752f Author: sxauwsk Date: Tue Apr 17 04:01:27 2018 +0800 spi: cadence: Add usleep_range() for cdns_spi_fill_tx_fifo() In case of xspi work in busy condition, may send bytes failed. once something wrong, spi controller did't work any more My test found this situation appear in both of read/write process. so when TX FIFO is full, add one byte delay before send data; Signed-off-by: sxauwsk Signed-off-by: Mark Brown drivers/spi/spi-cadence.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 40d802cb66ad110673e40cb3426b1f1c79645104 Author: Sam Hansen Date: Fri Apr 13 10:42:57 2018 -0700 Documentation/i2c: adopt kernel commenting style in examples The example I2C code is rewritten to adopt the preferred kernel block commenting style. Signed-off-by: Sam Hansen Signed-off-by: Wolfram Sang Documentation/i2c/dev-interface | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b50cb3eaf7c8d13e427f991f7d52b485ca0fc65f Author: Sam Hansen Date: Fri Apr 13 10:42:56 2018 -0700 Documentation/i2c: sync docs with current state of i2c-tools Currently, Documentation/i2c/dev-interface describes the use of i2c_smbus_* helper routines as static inlined functions provided by linux/i2c-dev.h. Work has been done to refactor the linux/i2c-dev.h file in the i2c-tools project out into its own library. As a result, these docs have become stale. This patch corrects the discrepancy and directs the reader to the i2c-tools project for more information. Signed-off-by: Sam Hansen Signed-off-by: Wolfram Sang Documentation/i2c/dev-interface | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 675edea10badf5b3446275d60e1bd2105905d498 Author: Sam Hansen Date: Fri Apr 13 10:42:55 2018 -0700 Documentation/i2c: whitespace cleanup This strips trailing whitespace in Documentation/i2c/dev-interface. Signed-off-by: Sam Hansen Signed-off-by: Wolfram Sang Documentation/i2c/dev-interface | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 14a8f0d88cfb58071da2e5ff99eddcef0f87e2cc Author: Geert Uytterhoeven Date: Tue Apr 17 19:49:07 2018 +0200 i2c: Remove depends on HAS_DMA in case of platform dependency Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their dependencies on HAS_DMA, to prevent compiling subsystems or drivers that cannot work anyway. This simplifies the dependencies, and allows to improve compile-testing. Signed-off-by: Geert Uytterhoeven Reviewed-by: Mark Brown Acked-by: Robin Murphy Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 3 --- 1 file changed, 3 deletions(-) commit e33514f2e930ad800fa52db19e889bb0fba25419 Author: Geert Uytterhoeven Date: Mon Apr 9 16:52:47 2018 +0200 IB/uverbs: Add missing braces in anonymous union initializers With gcc-4.1.2: drivers/infiniband/core/uverbs_std_types_flow_action.c:366: error: unknown field ‘ptr’ specified in initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:367: error: unknown field ‘type’ specified in initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:367: warning: missing braces around initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:367: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0]..’) drivers/infiniband/core/uverbs_std_types_flow_action.c:368: error: unknown field ‘min_len’ specified in initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: excess elements in union initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0].’) drivers/infiniband/core/uverbs_std_types_flow_action.c:368: error: unknown field ‘len’ specified in initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: excess elements in union initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0].’) drivers/infiniband/core/uverbs_std_types_flow_action.c:369: error: unknown field ‘flags’ specified in initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:369: warning: excess elements in union initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:369: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0].’) drivers/infiniband/core/uverbs_std_types_flow_action.c:376: error: unknown field ‘ptr’ specified in initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:377: error: unknown field ‘type’ specified in initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:377: warning: missing braces around initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:377: warning: (near initialization for ‘uverbs_flow_action_esp_replay[0]..’) drivers/infiniband/core/uverbs_std_types_flow_action.c:379: error: unknown field ‘len’ specified in initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:379: warning: excess elements in union initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:379: warning: (near initialization for ‘uverbs_flow_action_esp_replay[0].’) drivers/infiniband/core/uverbs_std_types_flow_action.c:383: error: unknown field ‘ptr’ specified in initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:384: error: unknown field ‘type’ specified in initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:385: error: unknown field ‘min_len’ specified in initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: excess elements in union initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: (near initialization for ‘uverbs_flow_action_esp_replay[1].’) drivers/infiniband/core/uverbs_std_types_flow_action.c:385: error: unknown field ‘len’ specified in initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: excess elements in union initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: (near initialization for ‘uverbs_flow_action_esp_replay[1].’) drivers/infiniband/core/uverbs_std_types_flow_action.c:386: error: unknown field ‘flags’ specified in initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:386: warning: excess elements in union initializer drivers/infiniband/core/uverbs_std_types_flow_action.c:386: warning: (near initialization for ‘uverbs_flow_action_esp_replay[1].’) Add the missing braces to fix this. Fixes: 2eb9beaee5d7 ("IB/uverbs: Add flow_action create and destroy verbs") Fixes: 7d12f8d5a164 ("IB/uverbs: Add modify ESP flow_action") Signed-off-by: Geert Uytterhoeven Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs_std_types_flow_action.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7b38460dc8e4eafba06c78f8e37099d3b34d473c Author: Darrick J. Wong Date: Tue Apr 17 19:10:15 2018 -0700 xfs: don't fail when converting shortform attr to long form during ATTR_REPLACE Kanda Motohiro reported that expanding a tiny xattr into a large xattr fails on XFS because we remove the tiny xattr from a shortform fork and then try to re-add it after converting the fork to extents format having not removed the ATTR_REPLACE flag. This fails because the attr is no longer present, causing a fs shutdown. This is derived from the patch in his bug report, but we really shouldn't ignore a nonzero retval from the remove call. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199119 Reported-by: kanda.motohiro@gmail.com Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_attr.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit b3fe6c62bc66868c45b5bb16050e6bcb333af337 Author: Randy Dunlap Date: Mon Apr 16 18:51:50 2018 -0700 infiniband: mlx5: fix build errors when INFINIBAND_USER_ACCESS=m Fix build errors when INFINIBAND_USER_ACCESS=m and MLX5_INFINIBAND=y. The build error occurs when the mlx5 driver code attempts to use USER_ACCESS interfaces, which are built as a loadable module. Fixes these build errors: drivers/infiniband/hw/mlx5/main.o: In function `populate_specs_root': ../drivers/infiniband/hw/mlx5/main.c:4982: undefined reference to `uverbs_default_get_objects' ../drivers/infiniband/hw/mlx5/main.c:4994: undefined reference to `uverbs_alloc_spec_tree' drivers/infiniband/hw/mlx5/main.o: In function `depopulate_specs_root': ../drivers/infiniband/hw/mlx5/main.c:5001: undefined reference to `uverbs_free_spec_tree' Build-tested with multiple config combinations. Fixes: 8c84660bb437 ("IB/mlx5: Initialize the parsing tree root without the help of uverbs") Cc: stable@vger.kernel.org # reported against 4.16 Reported-by: kbuild test robot Signed-off-by: Randy Dunlap Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 7d83fb14258b9961920cd86f0b921caaeb3ebe85 Author: Darrick J. Wong Date: Mon Apr 16 23:07:45 2018 -0700 xfs: prevent creating negative-sized file via INSERT_RANGE During the "insert range" fallocate operation, i_size grows by the specified 'len' bytes. XFS verifies that i_size + len < s_maxbytes, as it should. But this comparison is done using the signed 'loff_t', and 'i_size + len' can wrap around to a negative value, causing the check to incorrectly pass, resulting in an inode with "negative" i_size. This is possible on 64-bit platforms, where XFS sets s_maxbytes = LLONG_MAX. ext4 and f2fs don't run into this because they set a smaller s_maxbytes. Fix it by using subtraction instead. Reproducer: xfs_io -f file -c "truncate $(((1<<63)-1))" -c "finsert 0 4096" Fixes: a904b1ca5751 ("xfs: Add support FALLOC_FL_INSERT_RANGE for fallocate") Cc: # v4.1+ Originally-From: Eric Biggers Signed-off-by: Eric Biggers Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong [darrick: fix signed integer addition overflow too] Signed-off-by: Darrick J. Wong fs/xfs/xfs_file.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 2c4306f719b083d17df2963bc761777576b8ad1b Author: Eric Sandeen Date: Mon Apr 16 23:07:27 2018 -0700 xfs: set format back to extents if xfs_bmap_extents_to_btree If xfs_bmap_extents_to_btree fails in a mode where we call xfs_iroot_realloc(-1) to de-allocate the root, set the format back to extents. Otherwise we can assume we can dereference ifp->if_broot based on the XFS_DINODE_FMT_BTREE format, and crash. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199423 Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 4 ++++ 1 file changed, 4 insertions(+) commit b42db0860e13067fcc7cbfba3966c9e652668bbc Author: Eric Sandeen Date: Mon Apr 16 23:06:53 2018 -0700 xfs: enhance dinode verifier Add several more validations to xfs_dinode_verify: - For LOCAL data fork formats, di_nextents must be 0. - For LOCAL attr fork formats, di_anextents must be 0. - For inodes with no attr fork offset, - format must be XFS_DINODE_FMT_EXTENTS if set at all - di_anextents must be 0. Thanks to dchinner for pointing out a couple related checks I had forgotten to add. Signed-off-by: Eric Sandeen Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199377 Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_inode_buf.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 72961c4e6082be79825265d9193272b8a1634dec Author: Jens Axboe Date: Tue Apr 17 17:08:52 2018 -0600 bfq-iosched: ensure to clear bic/bfqq pointers when preparing request Even if we don't have an IO context attached to a request, we still need to clear the priv[0..1] pointers, as they could be pointing to previously used bic/bfqq structures. If we don't do so, we'll either corrupt memory on dispatching a request, or cause an imbalance in counters. Inspired by a fix from Kees. Reported-by: Oleksandr Natalenko Reported-by: Kees Cook Cc: stable@vger.kernel.org Fixes: aee69d78dec0 ("block, bfq: introduce the BFQ-v0 I/O scheduler as an extra scheduler") Signed-off-by: Jens Axboe block/bfq-iosched.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 8bf24e8319613bbe950d4188682b3a0d9441b76b Author: Michael Ellerman Date: Tue Apr 10 16:20:53 2018 +1000 selftests/filesystems: Don't run dnotify_test by default In commit ce290a19609d ("selftests: add devpts selftests"), the filesystems directory was added to the top-level selftests Makefile. That had the effect of causing the existing dnotify_test in the filesystems directory to now be run as part of the default selftests test-run. Unfortunately dnotify_test is actually an infinite loop. Fix it by moving dnotify_test to TEST_GEN_PROGS_EXTENDED, which says that it's a generated file (ie. built) but should not be run as part of the default test suite run (it's an "extended" test). While we're here cleanup a few other things, devpts_pts should be in TEST_GEN_PROGS to indicate that it's built, and with the above two changes we no longer need a custom all or clean rule. Fixes: ce290a19609d ("selftests: add devpts selftests") Signed-off-by: Michael Ellerman Acked-by: Christian brauner Signed-off-by: Shuah Khan tools/testing/selftests/filesystems/Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit a5240cbde22c86c606c6462d32aea0648c21fdc3 Author: Souptick Joarder Date: Sun Apr 15 00:58:25 2018 +0530 fs: cifs: Adding new return type vm_fault_t Use new return type vm_fault_t for page_mkwrite handler. Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox Signed-off-by: Steve French fs/cifs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d568cd34eb04acf05c26f360d1a0f071f0bb636 Author: Gustavo A. R. Silva Date: Fri Apr 13 10:13:29 2018 -0500 cifs: smb2ops: Fix NULL check in smb2_query_symlink The current code null checks variable err_buf, which is always null when it is checked, hence utf16_path is free'd and the function returns -ENOENT everytime it is called, making it impossible for the execution path to reach the following code: err_buf = err_iov.iov_base; Fix this by null checking err_iov.iov_base instead of err_buf. Also, notice that err_buf no longer needs to be initialized to NULL. Addresses-Coverity-ID: 1467876 ("Logically dead code") Fixes: 2d636199e400 ("cifs: Change SMB2_open to return an iov for the error parameter") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/smb2ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c438d7a3a52dcc2b9ed095cb87d3a5e83cf7e60 Author: Eric Biggers Date: Tue Apr 17 12:07:06 2018 -0700 KEYS: DNS: limit the length of option strings Adding a dns_resolver key whose payload contains a very long option name resulted in that string being printed in full. This hit the WARN_ONCE() in set_precision() during the printk(), because printk() only supports a precision of up to 32767 bytes: precision 1000000 too large WARNING: CPU: 0 PID: 752 at lib/vsprintf.c:2189 vsnprintf+0x4bc/0x5b0 Fix it by limiting option strings (combined name + value) to a much more reasonable 128 bytes. The exact limit is arbitrary, but currently the only recognized option is formatted as "dnserror=%lu" which fits well within this limit. Also ratelimit the printks. Reproducer: perl -e 'print "#", "A" x 1000000, "\x00"' | keyctl padd dns_resolver desc @s This bug was found using syzkaller. Reported-by: Mark Rutland Fixes: 4a2d789267e0 ("DNS: If the DNS server returns an error, allow that to be cached [ver #2]") Signed-off-by: Eric Biggers Signed-off-by: David S. Miller net/dns_resolver/dns_key.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 89bda97b445bacab68e71507cc08ccacd6694474 Author: Bert Kenward Date: Tue Apr 17 13:32:39 2018 +0100 sfc: check RSS is active for filter insert For some firmware variants - specifically 'capture packed stream' - RSS filters are not valid. We must check if RSS is actually active rather than merely enabled. Fixes: 42356d9a137b ("sfc: support RSS spreading of ethtool ntuple filters") Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7ce2367254e84753bceb07327aaf5c953cfce117 Author: Toshiaki Makita Date: Tue Apr 17 18:46:14 2018 +0900 vlan: Fix reading memory beyond skb->tail in skb_vlan_tagged_multi Syzkaller spotted an old bug which leads to reading skb beyond tail by 4 bytes on vlan tagged packets. This is caused because skb_vlan_tagged_multi() did not check skb_headlen. BUG: KMSAN: uninit-value in eth_type_vlan include/linux/if_vlan.h:283 [inline] BUG: KMSAN: uninit-value in skb_vlan_tagged_multi include/linux/if_vlan.h:656 [inline] BUG: KMSAN: uninit-value in vlan_features_check include/linux/if_vlan.h:672 [inline] BUG: KMSAN: uninit-value in dflt_features_check net/core/dev.c:2949 [inline] BUG: KMSAN: uninit-value in netif_skb_features+0xd1b/0xdc0 net/core/dev.c:3009 CPU: 1 PID: 3582 Comm: syzkaller435149 Not tainted 4.16.0+ #82 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676 eth_type_vlan include/linux/if_vlan.h:283 [inline] skb_vlan_tagged_multi include/linux/if_vlan.h:656 [inline] vlan_features_check include/linux/if_vlan.h:672 [inline] dflt_features_check net/core/dev.c:2949 [inline] netif_skb_features+0xd1b/0xdc0 net/core/dev.c:3009 validate_xmit_skb+0x89/0x1320 net/core/dev.c:3084 __dev_queue_xmit+0x1cb2/0x2b60 net/core/dev.c:3549 dev_queue_xmit+0x4b/0x60 net/core/dev.c:3590 packet_snd net/packet/af_packet.c:2944 [inline] packet_sendmsg+0x7c57/0x8a10 net/packet/af_packet.c:2969 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] sock_write_iter+0x3b9/0x470 net/socket.c:909 do_iter_readv_writev+0x7bb/0x970 include/linux/fs.h:1776 do_iter_write+0x30d/0xd40 fs/read_write.c:932 vfs_writev fs/read_write.c:977 [inline] do_writev+0x3c9/0x830 fs/read_write.c:1012 SYSC_writev+0x9b/0xb0 fs/read_write.c:1085 SyS_writev+0x56/0x80 fs/read_write.c:1082 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x43ffa9 RSP: 002b:00007fff2cff3948 EFLAGS: 00000217 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043ffa9 RDX: 0000000000000001 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 00000000006cb018 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000217 R12: 00000000004018d0 R13: 0000000000401960 R14: 0000000000000000 R15: 0000000000000000 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:188 kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:314 kmsan_slab_alloc+0x11/0x20 mm/kmsan/kmsan.c:321 slab_post_alloc_hook mm/slab.h:445 [inline] slab_alloc_node mm/slub.c:2737 [inline] __kmalloc_node_track_caller+0xaed/0x11c0 mm/slub.c:4369 __kmalloc_reserve net/core/skbuff.c:138 [inline] __alloc_skb+0x2cf/0x9f0 net/core/skbuff.c:206 alloc_skb include/linux/skbuff.h:984 [inline] alloc_skb_with_frags+0x1d4/0xb20 net/core/skbuff.c:5234 sock_alloc_send_pskb+0xb56/0x1190 net/core/sock.c:2085 packet_alloc_skb net/packet/af_packet.c:2803 [inline] packet_snd net/packet/af_packet.c:2894 [inline] packet_sendmsg+0x6444/0x8a10 net/packet/af_packet.c:2969 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] sock_write_iter+0x3b9/0x470 net/socket.c:909 do_iter_readv_writev+0x7bb/0x970 include/linux/fs.h:1776 do_iter_write+0x30d/0xd40 fs/read_write.c:932 vfs_writev fs/read_write.c:977 [inline] do_writev+0x3c9/0x830 fs/read_write.c:1012 SYSC_writev+0x9b/0xb0 fs/read_write.c:1085 SyS_writev+0x56/0x80 fs/read_write.c:1082 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Fixes: 58e998c6d239 ("offloading: Force software GSO for multiple vlan tags.") Reported-and-tested-by: syzbot+0bbe42c764feafa82c5a@syzkaller.appspotmail.com Signed-off-by: Toshiaki Makita Signed-off-by: David S. Miller include/linux/if_vlan.h | 7 +++++-- net/core/dev.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) commit f53c4c20d6d38bcefd89bfcab135486cbb797884 Author: Liam Girdwood Date: Tue Mar 27 14:30:44 2018 +0100 ASoC: topology: Check widget kcontrols before deref Validate the topology input before we dereference the pointer. Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/soc-topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e142aa09ed88be98395dde7acb96fb2263566b68 Author: Baolin Wang Date: Fri Apr 13 13:27:58 2018 +0800 timekeeping: Remove __current_kernel_time() The __current_kernel_time() function based on 'struct timespec' is no longer recommended for new code, and the only user of this function has been replaced by commit 6909e29fdefb ("kdb: use __ktime_get_real_seconds instead of __current_kernel_time"). Remove the obsolete interface. Signed-off-by: Baolin Wang Signed-off-by: Thomas Gleixner Cc: arnd@arndb.de Cc: sboyd@kernel.org Cc: broonie@kernel.org Cc: john.stultz@linaro.org Link: https://lkml.kernel.org/r/1a9dbea7ee2cda7efe9ed330874075cf17fdbff6.1523596316.git.baolin.wang@linaro.org include/linux/timekeeping32.h | 3 --- kernel/time/timekeeping.c | 7 ------- 2 files changed, 10 deletions(-) commit f0ae6a0321222864ed8675a924cc8ee2cb042c31 Author: Liu, Changcheng Date: Thu Apr 12 15:57:01 2018 +0800 timers: Remove stale struct tvec_base forward declaration struct tvec_base is a leftover of the original timer wheel implementation and not longer used. Remove the forward declaration. Signed-off-by: Liu Changcheng Signed-off-by: Thomas Gleixner Cc: akpm@linux-foundation.org Link: https://lkml.kernel.org/r/20180412075701.GA38952@sofia include/linux/timer.h | 2 -- 1 file changed, 2 deletions(-) commit 4450dc0ae2c18a0ac6dce560215c7a1fa12122b5 Author: Geert Uytterhoeven Date: Thu Apr 5 17:26:58 2018 +0200 clockevents: Fix kernel messages split across multiple lines Convert the clockevents driver from old-style printk() to pr_info() and pr_cont(), to fix split kernel messages like below: Clockevents: could not switch to one-shot mode: dummy_timer is not functional. Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Gleixner Cc: Frederic Weisbecker Link: https://lkml.kernel.org/r/1522942018-14471-1-git-send-email-geert%2Brenesas@glider.be kernel/time/tick-oneshot.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit daf70d89f80c6e1772233da9e020114b1254e7e0 Author: Matt Redfearn Date: Tue Apr 17 15:52:21 2018 +0100 MIPS: memset.S: Fix return of __clear_user from Lpartial_fixup The __clear_user function is defined to return the number of bytes that could not be cleared. From the underlying memset / bzero implementation this means setting register a2 to that number on return. Currently if a page fault is triggered within the memset_partial block, the value loaded into a2 on return is meaningless. The label .Lpartial_fixup\@ is jumped to on page fault. In order to work out how many bytes failed to copy, the exception handler should find how many bytes left in the partial block (andi a2, STORMASK), add that to the partial block end address (a2), and subtract the faulting address to get the remainder. Currently it incorrectly subtracts the partial block start address (t1), which has additionally been clobbered to generate a jump target in memset_partial. Fix this by adding the block end address instead. This issue was found with the following test code: int j, k; for (j = 0; j < 512; j++) { if ((k = clear_user(NULL, j)) != j) { pr_err("clear_user (NULL %d) returned %d\n", j, k); } } Which now passes on Creator Ci40 (MIPS32) and Cavium Octeon II (MIPS64). Suggested-by: James Hogan Signed-off-by: Matt Redfearn Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/19108/ Signed-off-by: James Hogan arch/mips/lib/memset.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 800cb2e553d44541b83aa3ec45d9839385fe8ab6 Author: Mark Rutland Date: Mon Apr 16 14:44:41 2018 +0100 arm64: kasan: avoid pfn_to_nid() before page array is initialized In arm64's kasan_init(), we use pfn_to_nid() to find the NUMA node a span of memory is in, hoping to allocate shadow from the same NUMA node. However, at this point, the page array has not been initialized, and thus this is bogus. Since commit: f165b378bbdf6c8a ("mm: uninitialized struct page poisoning sanity") ... accessing fields of the page array results in a boot time Oops(), highlighting this problem: [ 0.000000] Unable to handle kernel paging request at virtual address dfff200000000000 [ 0.000000] Mem abort info: [ 0.000000] ESR = 0x96000004 [ 0.000000] Exception class = DABT (current EL), IL = 32 bits [ 0.000000] SET = 0, FnV = 0 [ 0.000000] EA = 0, S1PTW = 0 [ 0.000000] Data abort info: [ 0.000000] ISV = 0, ISS = 0x00000004 [ 0.000000] CM = 0, WnR = 0 [ 0.000000] [dfff200000000000] address between user and kernel address ranges [ 0.000000] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.16.0-07317-gf165b378bbdf #42 [ 0.000000] Hardware name: ARM Juno development board (r1) (DT) [ 0.000000] pstate: 80000085 (Nzcv daIf -PAN -UAO) [ 0.000000] pc : __asan_load8+0x8c/0xa8 [ 0.000000] lr : __dump_page+0x3c/0x3b8 [ 0.000000] sp : ffff2000099b7ca0 [ 0.000000] x29: ffff2000099b7ca0 x28: ffff20000a1762c0 [ 0.000000] x27: ffff7e0000000000 x26: ffff2000099dd000 [ 0.000000] x25: ffff200009a3f960 x24: ffff200008f9c38c [ 0.000000] x23: ffff20000a9d3000 x22: ffff200009735430 [ 0.000000] x21: fffffffffffffffe x20: ffff7e0001e50420 [ 0.000000] x19: ffff7e0001e50400 x18: 0000000000001840 [ 0.000000] x17: ffffffffffff8270 x16: 0000000000001840 [ 0.000000] x15: 0000000000001920 x14: 0000000000000004 [ 0.000000] x13: 0000000000000000 x12: 0000000000000800 [ 0.000000] x11: 1ffff0012d0f89ff x10: ffff10012d0f89ff [ 0.000000] x9 : 0000000000000000 x8 : ffff8009687c5000 [ 0.000000] x7 : 0000000000000000 x6 : ffff10000f282000 [ 0.000000] x5 : 0000000000000040 x4 : fffffffffffffffe [ 0.000000] x3 : 0000000000000000 x2 : dfff200000000000 [ 0.000000] x1 : 0000000000000005 x0 : 0000000000000000 [ 0.000000] Process swapper (pid: 0, stack limit = 0x (ptrval)) [ 0.000000] Call trace: [ 0.000000] __asan_load8+0x8c/0xa8 [ 0.000000] __dump_page+0x3c/0x3b8 [ 0.000000] dump_page+0xc/0x18 [ 0.000000] kasan_init+0x2e8/0x5a8 [ 0.000000] setup_arch+0x294/0x71c [ 0.000000] start_kernel+0xdc/0x500 [ 0.000000] Code: aa0403e0 9400063c 17ffffee d343fc00 (38e26800) [ 0.000000] ---[ end trace 67064f0e9c0cc338 ]--- [ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task! [ 0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]--- Let's fix this by using early_pfn_to_nid(), as other architectures do in their kasan init code. Note that early_pfn_to_nid acquires the nid from the memblock array, which we iterate over in kasan_init(), so this should be fine. Signed-off-by: Mark Rutland Fixes: 39d114ddc6822302 ("arm64: add KASAN support") Cc: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/mm/kasan_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 77ac725e0c5b27c925e514b999cd46d01eedafd1 Author: Nicolas Dechesne Date: Tue Apr 17 14:03:26 2018 +0200 net: qrtr: add MODULE_ALIAS_NETPROTO macro To ensure that qrtr can be loaded automatically, when needed, if it is compiled as module. Signed-off-by: Nicolas Dechesne Signed-off-by: David S. Miller net/qrtr/qrtr.c | 1 + 1 file changed, 1 insertion(+) commit 05e489b1596f0aa1025a1fa572676631cd9665da Author: Stefan Hajnoczi Date: Tue Apr 17 14:25:58 2018 +0800 VSOCK: make af_vsock.ko removable again Commit c1eef220c1760762753b602c382127bfccee226d ("vsock: always call vsock_init_tables()") introduced a module_init() function without a corresponding module_exit() function. Modules with an init function can only be removed if they also have an exit function. Therefore the vsock module was considered "permanent" and could not be removed. This patch adds an empty module_exit() function so that "rmmod vsock" works. No explicit cleanup is required because: 1. Transports call vsock_core_exit() upon exit and cannot be removed while sockets are still alive. 2. vsock_diag.ko does not perform any action that requires cleanup by vsock.ko. Fixes: c1eef220c176 ("vsock: always call vsock_init_tables()") Reported-by: Xiumei Mu Cc: Cong Wang Cc: Jorgen Hansen Signed-off-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: David S. Miller net/vmw_vsock/af_vsock.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d6ef1f194b7569af8b8397876dc9ab07649d63cb Author: Joerg Roedel Date: Tue Apr 17 15:27:16 2018 +0200 x86/mm: Prevent kernel Oops in PTDUMP code with HIGHPTE=y The walk_pte_level() function just uses __va to get the virtual address of the PTE page, but that breaks when the PTE page is not in the direct mapping with HIGHPTE=y. The result is an unhandled kernel paging request at some random address when accessing the current_kernel or current_user file. Use the correct API to access PTE pages. Fixes: fe770bf0310d ('x86: clean up the page table dumper and add 32-bit support') Signed-off-by: Joerg Roedel Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Cc: jgross@suse.com Cc: JBeulich@suse.com Cc: hpa@zytor.com Cc: aryabinin@virtuozzo.com Cc: kirill.shutemov@linux.intel.com Link: https://lkml.kernel.org/r/1523971636-4137-1-git-send-email-joro@8bytes.org arch/x86/mm/dump_pagetables.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 1340ccfa9a9afefdbab90d7935d4ed19817e37c2 Author: Alison Schofield Date: Fri Apr 6 17:21:30 2018 -0700 x86,sched: Allow topologies where NUMA nodes share an LLC Intel's Skylake Server CPUs have a different LLC topology than previous generations. When in Sub-NUMA-Clustering (SNC) mode, the package is divided into two "slices", each containing half the cores, half the LLC, and one memory controller and each slice is enumerated to Linux as a NUMA node. This is similar to how the cores and LLC were arranged for the Cluster-On-Die (CoD) feature. CoD allowed the same cache line to be present in each half of the LLC. But, with SNC, each line is only ever present in *one* slice. This means that the portion of the LLC *available* to a CPU depends on the data being accessed: Remote socket: entire package LLC is shared Local socket->local slice: data goes into local slice LLC Local socket->remote slice: data goes into remote-slice LLC. Slightly higher latency than local slice LLC. The biggest implication from this is that a process accessing all NUMA-local memory only sees half the LLC capacity. The CPU describes its cache hierarchy with the CPUID instruction. One of the CPUID leaves enumerates the "logical processors sharing this cache". This information is used for scheduling decisions so that tasks move more freely between CPUs sharing the cache. But, the CPUID for the SNC configuration discussed above enumerates the LLC as being shared by the entire package. This is not 100% precise because the entire cache is not usable by all accesses. But, it *is* the way the hardware enumerates itself, and this is not likely to change. The userspace visible impact of all the above is that the sysfs info reports the entire LLC as being available to the entire package. As noted above, this is not true for local socket accesses. This patch does not correct the sysfs info. It is the same, pre and post patch. The current code emits the following warning: sched: CPU #3's llc-sibling CPU #0 is not on the same node! [node: 1 != 0]. Ignoring dependency. The warning is coming from the topology_sane() check in smpboot.c because the topology is not matching the expectations of the model for obvious reasons. To fix this, add a vendor and model specific check to never call topology_sane() for these systems. Also, just like "Cluster-on-Die" disable the "coregroup" sched_domain_topology_level and use NUMA information from the SRAT alone. This is OK at least on the hardware we are immediately concerned about because the LLC sharing happens at both the slice and at the package level, which are also NUMA boundaries. Signed-off-by: Alison Schofield Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Prarit Bhargava Cc: Tony Luck Cc: Peter Zijlstra (Intel) Cc: brice.goglin@gmail.com Cc: Dave Hansen Cc: Borislav Petkov Cc: David Rientjes Cc: Igor Mammedov Cc: "H. Peter Anvin" Cc: Tim Chen Link: https://lkml.kernel.org/r/20180407002130.GA18984@alison-desk.jf.intel.com arch/x86/kernel/smpboot.c | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) commit bfb3d7b8b906b66551424d7636182126e1d134c8 Author: Jiri Olsa Date: Sun Apr 15 11:23:52 2018 +0200 perf: Remove superfluous allocation error check If the get_callchain_buffers fails to allocate the buffer it will decrease the nr_callchain_events right away. There's no point of checking the allocation error for nr_callchain_events > 1. Removing that check. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: H. Peter Anvin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: syzkaller-bugs@googlegroups.com Cc: x86@kernel.org Link: http://lkml.kernel.org/r/20180415092352.12403-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo kernel/events/callchain.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 5af44ca53d019de47efe6dbc4003dd518e5197ed Author: Jiri Olsa Date: Sun Apr 15 11:23:51 2018 +0200 perf: Fix sample_max_stack maximum check The syzbot hit KASAN bug in perf_callchain_store having the entry stored behind the allocated bounds [1]. We miss the sample_max_stack check for the initial event that allocates callchain buffers. This missing check allows to create an event with sample_max_stack value bigger than the global sysctl maximum: # sysctl -a | grep perf_event_max_stack kernel.perf_event_max_stack = 127 # perf record -vv -C 1 -e cycles/max-stack=256/ kill ... perf_event_attr: size 112 ... sample_max_stack 256 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 1 group_fd -1 flags 0x8 = 4 Note the '-C 1', which forces perf record to create just single event. Otherwise it opens event for every cpu, then the sample_max_stack check fails on the second event and all's fine. The fix is to run the sample_max_stack check also for the first event with callchains. [1] https://marc.info/?l=linux-kernel&m=152352732920874&w=2 Reported-by: syzbot+7c449856228b63ac951e@syzkaller.appspotmail.com Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: H. Peter Anvin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: syzkaller-bugs@googlegroups.com Cc: x86@kernel.org Fixes: 97c79a38cd45 ("perf core: Per event callchain limit") Link: http://lkml.kernel.org/r/20180415092352.12403-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo kernel/events/callchain.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 78b562fbfa2cf0a9fcb23c3154756b690f4905c1 Author: Jiri Olsa Date: Sun Apr 15 11:23:50 2018 +0200 perf: Return proper values for user stack errors Return immediately when we find issue in the user stack checks. The error value could get overwritten by following check for PERF_SAMPLE_REGS_INTR. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: H. Peter Anvin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: syzkaller-bugs@googlegroups.com Cc: x86@kernel.org Fixes: 60e2364e60e8 ("perf: Add ability to sample machine state on interrupt") Link: http://lkml.kernel.org/r/20180415092352.12403-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo kernel/events/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 038586c34301578e538f6c5aa79ca82bce1b9152 Author: Thomas Richter Date: Mon Apr 16 15:23:14 2018 +0200 perf list: Add s390 support for detailed/verbose PMU event description 'perf list' with flags -d and -v print a description (-d) or a very verbose explanation (-v) of CPU specific counter events. These descriptions are provided with the json files in directory pmu-events/arch/s390/*.json. Display of these descriptions on s390 requires the corresponding json files. On s390 this does not work because function is_pmu_core() does not detect the s390 directory name where the CPU specific events are listed. On x86 it is: /sys/bus/event_source/devices/cpu whereas on s390 it is: /sys/bus/event_source/devices/cpum_cf /sys/bus/event_source/devices/cpum_sf Fix this by adding s390 directory name testing to function is_pmu_core(). This is the same approach as taken for the ARM platform. Output before: [root@s35lp76 perf]# ./perf list -d pmu List of pre-defined events (to be used in -e): cpum_cf/AES_BLOCKED_CYCLES/ [Kernel PMU event] cpum_cf/AES_BLOCKED_FUNCTIONS/ [Kernel PMU event] cpum_cf/AES_CYCLES/ [Kernel PMU event] cpum_cf/AES_FUNCTIONS/ [Kernel PMU event] .... cpum_cf/TX_NC_TEND/ [Kernel PMU event] cpum_cf/VX_BCD_EXECUTION_SLOTS/ [Kernel PMU event] cpum_sf/SF_CYCLES_BASIC/ [Kernel PMU event] Output after: [root@s35lp76 perf]# ./perf list -d pmu List of pre-defined events (to be used in -e): cpum_cf/AES_BLOCKED_CYCLES/ [Kernel PMU event] cpum_cf/AES_BLOCKED_FUNCTIONS/ [Kernel PMU event] cpum_cf/AES_CYCLES/ [Kernel PMU event] cpum_cf/AES_FUNCTIONS/ [Kernel PMU event] .... cpum_cf/TX_NC_TEND/ [Kernel PMU event] cpum_cf/VX_BCD_EXECUTION_SLOTS/ [Kernel PMU event] cpum_sf/SF_CYCLES_BASIC/ [Kernel PMU event] 3906: bcd_dfp_execution_slots [BCD DFP Execution Slots] decimal_instructions [Decimal Instructions] dtlb2_gpage_writes [DTLB2 GPAGE Writes] dtlb2_hpage_writes [DTLB2 HPAGE Writes] dtlb2_misses [DTLB2 Misses] dtlb2_writes [DTLB2 Writes] itlb2_misses [ITLB2 Misses] itlb2_writes [ITLB2 Writes] l1c_tlb2_misses [L1C TLB2 Misses] ..... cfvn 3: cpu_cycles [CPU Cycles] instructions [Instructions] l1d_dir_writes [L1D Directory Writes] l1d_penalty_cycles [L1D Penalty Cycles] l1i_dir_writes [L1I Directory Writes] l1i_penalty_cycles [L1I Penalty Cycles] problem_state_cpu_cycles [Problem State CPU Cycles] problem_state_instructions [Problem State Instructions] .... csvn generic: aes_blocked_cycles [AES Blocked Cycles] aes_blocked_functions [AES Blocked Functions] aes_cycles [AES Cycles] aes_functions [AES Functions] dea_blocked_cycles [DEA Blocked Cycles] dea_blocked_functions [DEA Blocked Functions] .... Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Acked-by: Mark Rutland Cc: Heiko Carstens Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180416132314.33249-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 6 ++++++ 1 file changed, 6 insertions(+) commit bf30cc1882d2c65aaf92842cc9bcf06565eab73c Author: Alexey Budankov Date: Mon Apr 9 10:26:46 2018 +0300 perf script: Extend misc field decoding with switch out event type Append 'p' sign to 'S' tag designating the type of context switch out event so 'Sp' means preemption context switch. Documentation is extended to cover new presentation changes. $ perf script --show-switch-events -F +misc -I -i perf.data: hdparm 4073 [004] U 762.198265: 380194 cycles:ppp: 7faf727f5a23 strchr (/usr/lib64/ld-2.26.so) hdparm 4073 [004] K 762.198366: 441572 cycles:ppp: ffffffffb9218435 alloc_set_pte (/lib/modules/4.16.0-rc6+/build/vmlinux) hdparm 4073 [004] S 762.198391: PERF_RECORD_SWITCH_CPU_WIDE OUT next pid/tid: 0/0 swapper 0 [004] 762.198392: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 4073/4073 swapper 0 [004] Sp 762.198477: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt next pid/tid: 4073/4073 hdparm 4073 [004] 762.198478: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 0/0 swapper 0 [007] K 762.198514: 2303073 cycles:ppp: ffffffffb98b0c66 intel_idle (/lib/modules/4.16.0-rc6+/build/vmlinux) swapper 0 [007] Sp 762.198561: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt next pid/tid: 1134/1134 kworker/u16:18 1134 [007] 762.198562: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 0/0 kworker/u16:18 1134 [007] S 762.198567: PERF_RECORD_SWITCH_CPU_WIDE OUT next pid/tid: 0/0 Signed-off-by: Alexey Budankov Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/5fc65ce7-8ca5-53ae-8858-8ddd27290575@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 17 +++++++++-------- tools/perf/builtin-script.c | 5 ++++- 2 files changed, 13 insertions(+), 9 deletions(-) commit b3f35b5d5d36fba9311d1a965fcce2dd35614f2e Author: Alexey Budankov Date: Mon Apr 9 10:26:05 2018 +0300 perf report: Extend raw dump (-D) out with switch out event type Print additional 'preempt' tag for PERF_RECORD_SWITCH[_CPU_WIDE] OUT records when event header misc field contains PERF_RECORD_MISC_SWITCH_OUT_PREEMPT bit set designating preemption context switch out event: tools/perf/perf report -D -i perf.data | grep _SWITCH 0 768361415226 0x27f076 [0x28]: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 8/8 4 768362216813 0x28f45e [0x28]: PERF_RECORD_SWITCH_CPU_WIDE OUT next pid/tid: 0/0 4 768362217824 0x28f486 [0x28]: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 4073/4073 0 768362414027 0x27f0ce [0x28]: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt next pid/tid: 8/8 0 768362414367 0x27f0f6 [0x28]: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 0/0 Signed-off-by: Alexey Budankov Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/6f5aebb9-b96c-f304-f08f-8f046d38de4f@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 101592b4904ecf6b8ed2a4784d41d180319d95a1 Author: Alexey Budankov Date: Mon Apr 9 10:25:32 2018 +0300 perf/core: Store context switch out type in PERF_RECORD_SWITCH[_CPU_WIDE] Store preempting context switch out event into Perf trace as a part of PERF_RECORD_SWITCH[_CPU_WIDE] record. Percentage of preempting and non-preempting context switches help understanding the nature of workloads (CPU or IO bound) that are running on a machine; The event is treated as preemption one when task->state value of the thread being switched out is TASK_RUNNING. Event type encoding is implemented using PERF_RECORD_MISC_SWITCH_OUT_PREEMPT bit; Signed-off-by: Alexey Budankov Acked-by: Peter Zijlstra Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/9ff84e83-a0ca-dd82-a6d0-cb951689be74@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo include/uapi/linux/perf_event.h | 18 +++++++++++++++--- kernel/events/core.c | 4 ++++ tools/include/uapi/linux/perf_event.h | 18 +++++++++++++++--- 3 files changed, 34 insertions(+), 6 deletions(-) commit e2f73a1828e9ffd2765ce1726b9a9c6e022e3cd6 Author: Ingo Molnar Date: Mon Apr 16 08:18:22 2018 +0200 tools/headers: Synchronize kernel ABI headers, v4.17-rc1 Sync the following tooling headers with the latest kernel version: tools/arch/arm/include/uapi/asm/kvm.h - New ABI: KVM_REG_ARM_* tools/arch/x86/include/asm/required-features.h - Removal of NEED_LA57 dependency tools/arch/x86/include/uapi/asm/kvm.h - New KVM ABI: KVM_SYNC_X86_* tools/include/uapi/asm-generic/mman-common.h - New ABI: MAP_FIXED_NOREPLACE flag tools/include/uapi/linux/bpf.h - New ABI: BPF_F_SEQ_NUMBER functions tools/include/uapi/linux/if_link.h - New ABI: IFLA tun and rmnet support tools/include/uapi/linux/kvm.h - New ABI: hyperv eventfd and CONN_ID_MASK support plus header cleanups tools/include/uapi/sound/asound.h - New ABI: SNDRV_PCM_FORMAT_FIRST PCM format specifier tools/perf/arch/x86/entry/syscalls/syscall_64.tbl - The x86 system call table description changed due to the ptregs changes and the renames, in: d5a00528b58c: syscalls/core, syscalls/x86: Rename struct pt_regs-based sys_*() to __x64_sys_*() 5ac9efa3c50d: syscalls/core, syscalls/x86: Clean up compat syscall stub naming convention ebeb8c82ffaf: syscalls/x86: Use 'struct pt_regs' based syscall calling for IA32_EMULATION and x32 Also fix the x86 syscall table warning: -Warning: Kernel ABI header at 'tools/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl' +Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl' None of these changes impact existing tooling code, so we only have to copy the kernel version. Signed-off-by: Ingo Molnar Cc: Adrian Hunter Cc: Alexander Potapenko Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Alexey Budankov Cc: Andi Kleen Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Brian Robbins Cc: Clark Williams Cc: Daniel Borkmann Cc: David Ahern Cc: Dmitriy Vyukov Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Jesper Dangaard Brouer Cc: Jin Yao Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Kan Liang Cc: Kim Phillips Cc: Linus Torvalds Cc: Li Zhijian Cc: Mark Rutland Cc: Martin Liška Cc: Martin Schwidefsky Cc: Matthias Kaehlcke Cc: Miguel Bernal Marin Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Stephane Eranian Cc: Stephen Rothwell Cc: Takuya Yamamoto Cc: Thomas Gleixner Cc: Thomas Richter Cc: Wang Nan Cc: William Cohen Cc: Yonghong Song Link: http://lkml.kernel.org/r/20180416064024.ofjtrz5yuu3ykhvl@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/arch/arm/include/uapi/asm/kvm.h | 9 + tools/arch/x86/include/asm/required-features.h | 8 +- tools/arch/x86/include/uapi/asm/kvm.h | 19 +- tools/include/uapi/asm-generic/mman-common.h | 3 + tools/include/uapi/linux/bpf.h | 1 + tools/include/uapi/linux/if_link.h | 39 ++ tools/include/uapi/linux/kvm.h | 21 +- tools/include/uapi/sound/asound.h | 1 + tools/perf/arch/x86/Makefile | 2 +- tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 712 +++++++++++----------- 10 files changed, 451 insertions(+), 364 deletions(-) commit ebf04f331fa15a966262341a7dc6b1a0efd633e4 Author: Simon Gaiser Date: Thu Mar 15 04:08:03 2018 +0100 xen: xenbus_dev_frontend: Really return response string xenbus_command_reply() did not actually copy the response string and leaked stack content instead. Fixes: 9a6161fe73bd ("xen: return xenstore command failures via response instead of rc") Signed-off-by: Simon Gaiser Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/xenbus/xenbus_dev_frontend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cd6e992b3aab072cc90839508aaf5573c8f7e066 Author: Oleksandr Andrushchenko Date: Thu Apr 12 20:26:27 2018 +0300 xen/sndif: Sync up with the canonical definition in Xen This is the sync up with the canonical definition of the sound protocol in Xen: 1. Protocol version was referenced in the protocol description, but missed its definition. Fixed by adding a constant for current protocol version. 2. Some of the request descriptions have "reserved" fields missed: fixed by adding corresponding entries. 3. Extend the size of the requests and responses to 64 octets. Bump protocol version to 2. 4. Add explicit back and front synchronization In order to provide explicit synchronization between backend and frontend the following changes are introduced in the protocol: - add new ring buffer for sending asynchronous events from backend to frontend to report number of bytes played by the frontend (XENSND_EVT_CUR_POS) - introduce trigger events for playback control: start/stop/pause/resume - add "req-" prefix to event-channel and ring-ref to unify naming of the Xen event channels for requests and events 5. Add explicit back and front parameter negotiation In order to provide explicit stream parameter negotiation between backend and frontend the following changes are introduced in the protocol: add XENSND_OP_HW_PARAM_QUERY request to read/update configuration space for the parameters given: request passes desired parameter's intervals/masks and the response to this request returns allowed min/max intervals/masks to be used. Signed-off-by: Oleksandr Andrushchenko Signed-off-by: Oleksandr Grytsov Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Boris Ostrovsky Cc: Konrad Rzeszutek Wilk Cc: Takashi Iwai Signed-off-by: Boris Ostrovsky include/xen/interface/io/sndif.h | 322 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 306 insertions(+), 16 deletions(-) commit bf9a41377d14f565764022470e14aae72559589a Author: Andre Przywara Date: Tue Apr 17 11:23:49 2018 +0100 KVM: arm/arm64: vgic: Kick new VCPU on interrupt migration When vgic_prune_ap_list() finds an interrupt that needs to be migrated to a new VCPU, we should notify this VCPU of the pending interrupt, since it requires immediate action. Kick this VCPU once we have added the new IRQ to the list, but only after dropping the locks. Reported-by: Stefano Stabellini Reviewed-by: Christoffer Dall Signed-off-by: Andre Przywara Signed-off-by: Marc Zyngier virt/kvm/arm/vgic/vgic.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 165d102905691891f85cb90736c25150b7b25d29 Author: Marc Zyngier Date: Mon Mar 26 11:51:43 2018 +0100 arm64: KVM: Demote SVE and LORegion warnings to debug only While generating a message about guests probing for SVE/LORegions is a useful debugging tool, considering it an error is slightly over the top, as this is the only way the guest can find out about the presence of the feature. Let's turn these message into kvm_debug so that they can only be seen if CONFIG_DYNAMIC_DEBUG, and kept quiet otherwise. Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3b2c77d000fe9f7d02e9e726e00dccf9f92b256f Author: Petr Mladek Date: Mon Apr 16 13:36:47 2018 +0200 livepatch: Allow to call a custom callback when freeing shadow variables We might need to do some actions before the shadow variable is freed. For example, we might need to remove it from a list or free some data that it points to. This is already possible now. The user can get the shadow variable by klp_shadow_get(), do the necessary actions, and then call klp_shadow_free(). This patch allows to do it a more elegant way. The user could implement the needed actions in a callback that is passed to klp_shadow_free() as a parameter. The callback usually does reverse operations to the constructor callback that can be called by klp_shadow_*alloc(). It is especially useful for klp_shadow_free_all(). There we need to do these extra actions for each found shadow variable with the given ID. Note that the memory used by the shadow variable itself is still released later by rcu callback. It is needed to protect internal structures that keep all shadow variables. But the destructor is called immediately. The shadow variable must not be access anyway after klp_shadow_free() is called. The user is responsible to protect this any suitable way. Be aware that the destructor is called under klp_shadow_lock. It is the same as for the contructor in klp_shadow_alloc(). Signed-off-by: Petr Mladek Acked-by: Josh Poimboeuf Acked-by: Miroslav Benes Signed-off-by: Jiri Kosina Documentation/livepatch/shadow-vars.txt | 10 +++++++--- include/linux/livepatch.h | 5 +++-- kernel/livepatch/shadow.c | 26 ++++++++++++++++++-------- samples/livepatch/livepatch-shadow-fix1.c | 25 +++++++++++++++---------- samples/livepatch/livepatch-shadow-fix2.c | 27 ++++++++++++++++----------- 5 files changed, 59 insertions(+), 34 deletions(-) commit e91c2518a5d22a07642f35d85f39001ad379dae4 Author: Petr Mladek Date: Mon Apr 16 13:36:46 2018 +0200 livepatch: Initialize shadow variables safely by a custom callback The existing API allows to pass a sample data to initialize the shadow data. It works well when the data are position independent. But it fails miserably when we need to set a pointer to the shadow structure itself. Unfortunately, we might need to initialize the pointer surprisingly often because of struct list_head. It is even worse because the list might be hidden in other common structures, for example, struct mutex, struct wait_queue_head. For example, this was needed to fix races in ALSA sequencer. It required to add mutex into struct snd_seq_client. See commit b3defb791b26ea06 ("ALSA: seq: Make ioctls race-free") and commit d15d662e89fc667b9 ("ALSA: seq: Fix racy pool initializations") This patch makes the API more safe. A custom constructor function and data are passed to klp_shadow_*alloc() functions instead of the sample data. Note that ctor_data are no longer a template for shadow->data. It might point to any data that might be necessary when the constructor is called. Also note that the constructor is called under klp_shadow_lock. It is an internal spin_lock that synchronizes alloc() vs. get() operations, see klp_shadow_get_or_alloc(). On one hand, this adds a risk of ABBA deadlocks. On the other hand, it allows to do some operations safely. For example, we could add the new structure into an existing list. This must be done only once when the structure is allocated. Reported-by: Nicolai Stange Signed-off-by: Petr Mladek Acked-by: Josh Poimboeuf Acked-by: Miroslav Benes Signed-off-by: Jiri Kosina Documentation/livepatch/shadow-vars.txt | 31 ++++++++---- include/linux/livepatch.h | 14 ++++-- kernel/livepatch/shadow.c | 82 ++++++++++++++++++++----------- samples/livepatch/livepatch-shadow-fix1.c | 18 ++++++- samples/livepatch/livepatch-shadow-fix2.c | 6 +-- 5 files changed, 104 insertions(+), 47 deletions(-) commit feb12f0cd8d7b1e8df2e6fce19fc9a026a468cc2 Author: Yan Wang Date: Mon Mar 26 16:48:00 2018 +0100 ASoC: topology: Fix bugs of freeing soc topology In snd_soc_tplg_component_remove(), it should compare index and not dobj->index with SND_SOC_TPLG_INDEX_ALL for removing all topology objects. Signed-off-by: Yan Wang Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/soc-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5db8f8d1099bd93a64a80b609dbcce887327ffc8 Author: Loic Poulain Date: Tue Apr 3 11:19:01 2018 +0200 PCI: kirin: Fix reset gpio name As documented in the devicetree bindings (pci/kirin-pcie.txt) and the reset gpio name must be 'reset-gpios'. However, current driver erroneously looks for a 'reset-gpio' resource which makes the driver probe fail. Fix it. Fixes: fc5165db245a ("PCI: kirin: Add HiSilicon Kirin SoC PCIe controller driver") Signed-off-by: Loic Poulain [lorenzo.pieralisi@arm.com: updated the commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Xiaowei Song drivers/pci/dwc/pcie-kirin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 451cf3ca7d4615631443014ee769c25e267c25ff Author: Dou Liyang Date: Wed Apr 4 14:45:27 2018 +0800 x86/processor: Remove two unused function declarations early_trap_init() and cpu_set_gdt() have been removed, so remove the stale declarations as well. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: keescook@chromium.org Cc: luto@kernel.org Cc: hpa@zytor.com Cc: bp@suse.de Cc: kirill.shutemov@linux.intel.com Link: https://lkml.kernel.org/r/20180404064527.10562-1-douly.fnst@cn.fujitsu.com arch/x86/include/asm/processor.h | 2 -- 1 file changed, 2 deletions(-) commit 10daf10ab154e31237a8c07242be3063fb6a9bf4 Author: Dou Liyang Date: Thu Apr 12 09:40:52 2018 +0800 x86/acpi: Prevent X2APIC id 0xffffffff from being accounted RongQing reported that there are some X2APIC id 0xffffffff in his machine's ACPI MADT table, which makes the number of possible CPU inaccurate. The reason is that the ACPI X2APIC parser has no sanity check for APIC ID 0xffffffff, which is an invalid id in all APIC types. See "Intel® 64 Architecture x2APIC Specification", Chapter 2.4.1. Add a sanity check to acpi_parse_x2apic() which ignores the invalid id. Reported-by: Li RongQing Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Cc: len.brown@intel.com Cc: rjw@rjwysocki.net Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180412014052.25186-1-douly.fnst@cn.fujitsu.com arch/x86/kernel/acpi/boot.c | 4 ++++ 1 file changed, 4 insertions(+) commit d3878e164dcd3925a237a20e879432400e369172 Author: Xiaoming Gao Date: Fri Apr 13 17:48:08 2018 +0800 x86/tsc: Prevent 32bit truncation in calc_hpet_ref() The TSC calibration code uses HPET as reference. The conversion normalizes the delta of two HPET timestamps: hpetref = ((tshpet1 - tshpet2) * HPET_PERIOD) / 1e6 and then divides the normalized delta of the corresponding TSC timestamps by the result to calulate the TSC frequency. tscfreq = ((tstsc1 - tstsc2 ) * 1e6) / hpetref This uses do_div() which takes an u32 as the divisor, which worked so far because the HPET frequency was low enough that 'hpetref' never exceeded 32bit. On Skylake machines the HPET frequency increased so 'hpetref' can exceed 32bit. do_div() truncates the divisor, which causes the calibration to fail. Use div64_u64() to avoid the problem. [ tglx: Fixes whitespace mangled patch and rewrote changelog ] Signed-off-by: Xiaoming Gao Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Cc: peterz@infradead.org Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/38894564-4fc9-b8ec-353f-de702839e44e@gmail.com arch/x86/kernel/tsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef97837db916075af54554552628bcb0840df62f Author: Christoph Hellwig Date: Mon Apr 16 14:44:42 2018 +0200 x86: Remove pci-nommu.c The commit that switched x86 to dma_direct_ops stopped using and building this file, but accidentally left it in the tree. Remove it. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Gleixner Cc: iommu@lists.infradead.org Link: https://lkml.kernel.org/r/20180416124442.13831-1-hch@lst.de arch/x86/kernel/pci-nommu.c | 90 --------------------------------------------- 1 file changed, 90 deletions(-) commit 9dfbf78e4114fcaf4ef61c49885c3ab5bad40d0b Author: Madhavan Srinivasan Date: Thu Jan 18 00:33:36 2018 +0530 powerpc/64s: Default l1d_size to 64K in RFI fallback flush If there is no d-cache-size property in the device tree, l1d_size could be zero. We don't actually expect that to happen, it's only been seen on mambo (simulator) in some configurations. A zero-size l1d_size leads to the loop in the asm wrapping around to 2^64-1, and then walking off the end of the fallback area and eventually causing a page fault which is fatal. Just default to 64K which is correct on some CPUs, and sane enough to not cause a crash on others. Fixes: aa8a5e0062ac9 ('powerpc/64s: Add support for RFI flush of L1-D cache') Signed-off-by: Madhavan Srinivasan [mpe: Rewrite comment and change log] Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_64.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit aed5eb44d831fde393ba8072b8cb44df524fd989 Author: Chen-Yu Tsai Date: Tue Apr 17 12:17:14 2018 +0800 ARM: dts: sun8i: h3: Re-enable EMAC on Orange Pi One In commit f0842bc5637c ("ARM: dts: sun8i: h3: Enable HDMI output on H3 boards"), the hunk that enabled HDMI for the Orange Pi One did not add a status = "okay"; line for the HDMI node, inadvertenly using the one for the EMAC. This resulted in the EMAC now being disabled. Whether this was due to a rebase error or some other mishap is unknown. This patch re-enables the EMAC by adding the status line to its node. Fixes: f0842bc5637c ("ARM: dts: sun8i: h3: Enable HDMI output on H3 boards") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 1 + 1 file changed, 1 insertion(+) commit 765cca91b895c8b747bca0b5fa54d1dc85c867a7 Author: Stephen Rothwell Date: Tue Apr 17 09:28:59 2018 +1000 netfilter: conntrack: include kmemleak.h for kmemleak_not_leak() After merging the netfilter tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: net/netfilter/nf_conntrack_extend.c: In function 'nf_ct_ext_add': net/netfilter/nf_conntrack_extend.c:74:2: error: implicit declaration of function 'kmemleak_not_leak' [-Werror=implicit-function-declaration] kmemleak_not_leak(old); ^~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors Fixes: 114aa35d06d4 ("netfilter: conntrack: silent a memory leak warning") Signed-off-by: Stephen Rothwell Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_extend.c | 1 + 1 file changed, 1 insertion(+) commit fae764912153065ea55eda47f834e0764a54df94 Author: Martin Schwidefsky Date: Thu Apr 12 13:48:25 2018 +0200 s390/signal: cleanup uapi struct sigaction The struct sigaction for user space in arch/s390/include/uapi/asm/signal.h is ill defined. The kernel uses two structures 'struct sigaction' and 'struct old_sigaction', the correlation in the kernel for both 31 and 64 bit is as follows sys_sigaction -> struct old_sigaction sys_rt_sigaction -> struct sigaction The correlation of the (single) uapi definition for 'struct sigaction' under '#ifndef __KERNEL__': 31-bit: sys_sigaction -> uapi struct sigaction 31-bit: sys_rt_sigaction -> no structure available 64-bit: sys_sigaction -> no structure available 64-bit: sys_rt_sigaction -> uapi struct sigaction This is quite confusing. To make it a bit less confusing make the uapi definition of 'struct sigaction' usable for sys_rt_sigaction for both 31-bit and 64-bit. Signed-off-by: Martin Schwidefsky arch/s390/include/uapi/asm/signal.h | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 6522404f1a5780685cf2b3ab7fd811126ea07ba2 Author: Christoffer Dall Date: Mon Apr 16 20:28:31 2018 +0200 MAINTAINERS: Update e-mail address for Christoffer Dall Update my e-mail address to a working address. Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f0cf47d939d0b4b4f660c5aaa4276fa3488f3391 Author: Marc Zyngier Date: Wed Apr 4 14:48:24 2018 +0100 KVM: arm/arm64: Close VMID generation race Before entering the guest, we check whether our VMID is still part of the current generation. In order to avoid taking a lock, we start with checking that the generation is still current, and only if not current do we take the lock, recheck, and update the generation and VMID. This leaves open a small race: A vcpu can bump up the global generation number as well as the VM's, but has not updated the VMID itself yet. At that point another vcpu from the same VM comes in, checks the generation (and finds it not needing anything), and jumps into the guest. At this point, we end-up with two vcpus belonging to the same VM running with two different VMIDs. Eventually, the VMID used by the second vcpu will get reassigned, and things will really go wrong... A simple solution would be to drop this initial check, and always take the lock. This is likely to cause performance issues. A middle ground is to convert the spinlock to a rwlock, and only take the read lock on the fast path. If the check fails at that point, drop it and acquire the write lock, rechecking the condition. This ensures that the above scenario doesn't occur. Cc: stable@vger.kernel.org Reported-by: Mark Rutland Tested-by: Shannon Zhao Signed-off-by: Marc Zyngier virt/kvm/arm/arm.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 596a9f6768af58d7034f6ebe559a0d489ae61467 Author: Laura Abbott Date: Thu Apr 12 14:21:54 2018 -0500 objtool: Support HOSTCFLAGS and HOSTLDFLAGS It may be useful to compile host programs with different flags (e.g. hardening). Ensure that objtool picks up the appropriate flags. Signed-off-by: Laura Abbott Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Masahiro Yamada Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kbuild@vger.kernel.org Link: http://lkml.kernel.org/r/05a360681176f1423cb2fde8faae3a0a0261afc5.1523560825.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff059fcbeed9cbed7421f82d1463dd74c472636e Author: Daniel Stone Date: Fri Mar 30 15:11:32 2018 +0100 drm/exynos: exynos_drm_fb -> drm_framebuffer Now exynos_drm_fb is just an empty wrapper around drm_framebuffer, we can drop it. Signed-off-by: Daniel Stone Signed-off-by: Inki Dae Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park drivers/gpu/drm/exynos/exynos_drm_fb.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) commit 7b30508f5116574f94b50c71d3da1089d145e603 Author: Daniel Stone Date: Fri Mar 30 15:11:31 2018 +0100 drm/exynos: Move dma_addr out of exynos_drm_fb This can be calculated from the GEM BO DMA address as well as the offset stored in the base framebuffer. Signed-off-by: Daniel Stone Signed-off-by: Inki Dae Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park drivers/gpu/drm/exynos/exynos_drm_fb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit b11954a6971baa5842e24e6c0dcf56f117249638 Author: Daniel Stone Date: Fri Mar 30 15:11:30 2018 +0100 drm/exynos: Move GEM BOs to drm_framebuffer Since drm_framebuffer can now store GEM objects directly, place them there rather than in our own subclass. As this makes the framebuffer create_handle and destroy functions the same as the GEM framebuffer helper, we can reuse those. Signed-off-by: Daniel Stone Signed-off-by: Inki Dae Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park drivers/gpu/drm/exynos/exynos_drm_fb.c | 39 ++++------------------------------ 1 file changed, 4 insertions(+), 35 deletions(-) commit 5c8dad48e4f53d6fd0a7e4f95d7c1c983374de88 Author: Song Liu Date: Fri Apr 13 11:55:13 2018 -0700 trace_kprobe: Remove warning message "Could not insert probe at..." This warning message is not very helpful, as the return value should already show information about the error. Also, this message will spam dmesg if the user space does testing in a loop, like: for x in {0..5} do echo p:xx xx+$x >> /sys/kernel/debug/tracing/kprobe_events done Reported-by: Vince Weaver Signed-off-by: Song Liu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-team@fb.com Link: http://lkml.kernel.org/r/20180413185513.3626052-1-songliubraving@fb.com Signed-off-by: Ingo Molnar kernel/trace/trace_kprobe.c | 2 -- 1 file changed, 2 deletions(-) commit f4560231ec42092c6662acccabb28c6cac9f5dfb Author: Jianchao Wang Date: Tue Apr 17 11:46:20 2018 +0800 blk-mq: start request gstate with gen 1 rq->gstate and rq->aborted_gstate both are zero before rqs are allocated. If we have a small timeout, when the timer fires, there could be rqs that are never allocated, and also there could be rq that has been allocated but not initialized and started. At the moment, the rq->gstate and rq->aborted_gstate both are 0, thus the blk_mq_terminate_expired will identify the rq is timed out and invoke .timeout early. For scsi, this will cause scsi_times_out to be invoked before the scsi_cmnd is not initialized, scsi_cmnd->device is still NULL at the moment, then we will get crash. Cc: Bart Van Assche Cc: Tejun Heo Cc: Ming Lei Cc: Martin Steigerwald Cc: stable@vger.kernel.org Signed-off-by: Jianchao Wang Signed-off-by: Jens Axboe block/blk-core.c | 4 ++++ block/blk-mq.c | 7 +++++++ 2 files changed, 11 insertions(+) commit b3906535ccc6cd04c42f9b1c7e31d1947b3ebc74 Author: Finn Thain Date: Wed Apr 11 20:50:14 2018 -0400 block/swim: Select appropriate drive on device open The driver supports internal and external FDD units so the floppy_open function must not hard-code the drive location. Cc: Laurent Vivier Cc: Jens Axboe Cc: stable@vger.kernel.org # v4.14+ Tested-by: Stan Johnson Signed-off-by: Finn Thain Acked-by: Laurent Vivier Signed-off-by: Jens Axboe drivers/block/swim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a13388d7aa1177b98d7168330ecbeeac52f844d Author: Finn Thain Date: Wed Apr 11 20:50:14 2018 -0400 block/swim: Fix IO error at end of medium Reading to the end of a 720K disk results in an IO error instead of EOF because the block layer thinks the disk has 2880 sectors. (Partly this is a result of inverted logic of the ONEMEG_MEDIA bit that's now fixed.) Initialize the density and head count in swim_add_floppy() to agree with the device size passed to set_capacity() during drive probe. Call set_capacity() again upon device open, after refreshing the density and head count values. Cc: Laurent Vivier Cc: Jens Axboe Cc: stable@vger.kernel.org # v4.14+ Tested-by: Stan Johnson Signed-off-by: Finn Thain Acked-by: Laurent Vivier Signed-off-by: Jens Axboe drivers/block/swim.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 8a500df63d07d8aee44b7ee2c54e462e47ce93ec Author: Finn Thain Date: Wed Apr 11 20:50:14 2018 -0400 block/swim: Check drive type The SWIM chip is compatible with GCR-mode Sony 400K/800K drives but this driver only supports MFM mode. Therefore only Sony FDHD drives are supported. Skip incompatible drives. Cc: Laurent Vivier Cc: Jens Axboe Cc: stable@vger.kernel.org # v4.14+ Tested-by: Stan Johnson Signed-off-by: Finn Thain Acked-by: Laurent Vivier Signed-off-by: Jens Axboe drivers/block/swim.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 56a1c5ee54f69dd767fb61d301883dc919ddc259 Author: Finn Thain Date: Wed Apr 11 20:50:14 2018 -0400 block/swim: Rename macros to avoid inconsistent inverted logic The Sony drive status bits use active-low logic. The swim_readbit() function converts that to 'C' logic for readability. Hence, the sense of the names of the status bit macros should not be inverted. Mostly they are correct. However, the TWOMEG_DRIVE, MFM_MODE and TWOMEG_MEDIA macros have inverted sense (like MkLinux). Fix this inconsistency and make the following patches less confusing. The same problem affects swim3.c so fix that too. No functional change. The FDHD drive status bits are documented in sonydriv.cpp from MAME and in swimiii.h from MkLinux. Cc: Laurent Vivier Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org Cc: Jens Axboe Cc: stable@vger.kernel.org # v4.14+ Tested-by: Stan Johnson Signed-off-by: Finn Thain Acked-by: Laurent Vivier Signed-off-by: Jens Axboe drivers/block/swim.c | 8 ++++---- drivers/block/swim3.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) commit 8e2ab5a4efaac77fb93e5b5b109d0b3976fdd3a0 Author: Finn Thain Date: Wed Apr 11 20:50:14 2018 -0400 block/swim: Don't log an error message for an invalid ioctl The 'eject' shell command may send various different ioctl commands. This leads to error messages on the console even though the FDEJECT ioctl succeeds. ~# eject floppy SWIM floppy_ioctl: unknown cmd 21257 SWIM floppy_ioctl: unknown cmd 1 Don't log an error message for an invalid ioctl, just do as the swim3 driver does and return -ENOTTY. Cc: Laurent Vivier Cc: Jens Axboe Cc: stable@vger.kernel.org # v4.14+ Tested-by: Stan Johnson Signed-off-by: Finn Thain Acked-by: Laurent Vivier Reviewed-by: Geert Uytterhoeven Signed-off-by: Jens Axboe drivers/block/swim.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit c1d6207cc0eef2a7f8551f9c7420d8776268f6e1 Author: Finn Thain Date: Wed Apr 11 20:50:14 2018 -0400 block/swim: Remove extra put_disk() call from error path Cc: Laurent Vivier Cc: Jens Axboe Cc: stable@vger.kernel.org # v4.14+ Fixes: 103db8b2dfa5 ("[PATCH] swim: stop sharing request queue across multiple gendisks") Tested-by: Stan Johnson Signed-off-by: Finn Thain Acked-by: Laurent Vivier Reviewed-by: Geert Uytterhoeven Signed-off-by: Jens Axboe drivers/block/swim.c | 1 - 1 file changed, 1 deletion(-) commit 7ae6a2b6cc058005ee3d0d2b9ce27688e51afa4b Author: Finn Thain Date: Wed Apr 11 20:50:14 2018 -0400 block/swim: Fix array bounds check In the floppy_find() function in swim.c is a call to get_disk(swd->unit[drive].disk). The actual parameter to this call can be a NULL pointer when drive == swd->floppy_count. This causes an oops in get_disk(). Data read fault at 0x00000198 in Super Data (pc=0x1be5b6) BAD KERNEL BUSERR Oops: 00000000 Modules linked in: swim_mod ipv6 mac8390 PC: [<001be5b6>] get_disk+0xc/0x76 SR: 2004 SP: 9a078bc1 a2: 0213ed90 d0: 00000000 d1: 00000000 d2: 00000000 d3: 000000ff d4: 00000002 d5: 02983590 a0: 02332e00 a1: 022dfd64 Process dd (pid: 285, task=020ab25b) Frame format=B ssw=074d isc=4a88 isb=6732 daddr=00000198 dobuf=00000000 baddr=001be5bc dibuf=bfffffff ver=f Stack from 022dfca4: 00000000 0203fc00 0213ed90 022dfcc0 02982936 00000000 00200000 022dfd08 0020f85a 00200000 022dfd64 02332e00 004040fc 00000014 001be77e 022dfd64 00334e4a 001be3f8 0800001d 022dfd64 01c04b60 01c04b70 022aba80 029828f8 02332e00 022dfd2c 001be7ac 0203fc00 00200000 022dfd64 02103a00 01c04b60 01c04b60 0200e400 022dfd68 000e191a 00200000 022dfd64 02103a00 0800001d 00000000 00000003 000b89de 00500000 02103a00 01c04b60 02103a08 01c04c2e Call Trace: [<02982936>] floppy_find+0x3e/0x4a [swim_mod] [<00200000>] uart_remove_one_port+0x1a2/0x260 [<0020f85a>] kobj_lookup+0xde/0x132 [<00200000>] uart_remove_one_port+0x1a2/0x260 [<001be77e>] get_gendisk+0x0/0x130 [<00334e4a>] mutex_lock+0x0/0x2e [<001be3f8>] disk_block_events+0x0/0x6c [<029828f8>] floppy_find+0x0/0x4a [swim_mod] [<001be7ac>] get_gendisk+0x2e/0x130 [<00200000>] uart_remove_one_port+0x1a2/0x260 [<000e191a>] __blkdev_get+0x32/0x45a [<00200000>] uart_remove_one_port+0x1a2/0x260 [<000b89de>] complete_walk+0x0/0x8a [<000e1e22>] blkdev_get+0xe0/0x29a [<000e1fdc>] blkdev_open+0x0/0xb0 [<000b89de>] complete_walk+0x0/0x8a [<000e1fdc>] blkdev_open+0x0/0xb0 [<000e01cc>] bd_acquire+0x74/0x8a [<000e205c>] blkdev_open+0x80/0xb0 [<000e1fdc>] blkdev_open+0x0/0xb0 [<000abf24>] do_dentry_open+0x1a4/0x322 [<00020000>] __do_proc_douintvec+0x22/0x27e [<000b89de>] complete_walk+0x0/0x8a [<000baa62>] link_path_walk+0x0/0x48e [<000ba3f8>] inode_permission+0x20/0x54 [<000ac0e4>] vfs_open+0x42/0x78 [<000bc372>] path_openat+0x2b2/0xeaa [<000bc0c0>] path_openat+0x0/0xeaa [<0004463e>] __irq_wake_thread+0x0/0x4e [<0003a45a>] task_tick_fair+0x18/0xc8 [<000bd00a>] do_filp_open+0xa0/0xea [<000abae0>] do_sys_open+0x11a/0x1ee [<00020000>] __do_proc_douintvec+0x22/0x27e [<000abbf4>] SyS_open+0x1e/0x22 [<00020000>] __do_proc_douintvec+0x22/0x27e [<00002b40>] syscall+0x8/0xc [<00020000>] __do_proc_douintvec+0x22/0x27e [<0000c00b>] dyadic+0x1/0x28 Code: 4e5e 4e75 4e56 fffc 2f0b 2f02 266e 0008 <206b> 0198 4a88 6732 2428 002c 661e 486b 0058 4eb9 0032 0b96 588f 4a88 672c 2008 Disabling lock debugging due to kernel taint Fix the array index bounds check to avoid this. Cc: Laurent Vivier Cc: Jens Axboe Cc: stable@vger.kernel.org # v4.14+ Fixes: 8852ecd97488 ("[PATCH] m68k: mac - Add SWIM floppy support") Tested-by: Stan Johnson Signed-off-by: Finn Thain Acked-by: Laurent Vivier Reviewed-by: Geert Uytterhoeven Signed-off-by: Jens Axboe drivers/block/swim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b64576cbf36afa5fabf3b31f62a1994c429ef855 Author: Finn Thain Date: Wed Apr 11 20:50:14 2018 -0400 m68k/mac: Don't remap SWIM MMIO region For reasons I don't understand, calling ioremap() then iounmap() on the SWIM MMIO region causes a hang on 68030 (but not on 68040). ~# modprobe swim_mod SWIM floppy driver Version 0.2 (2008-10-30) SWIM device not found ! watchdog: BUG: soft lockup - CPU#0 stuck for 23s! [modprobe:285] Modules linked in: swim_mod(+) Format 00 Vector: 0064 PC: 000075aa Status: 2000 Not tainted ORIG_D0: ffffffff D0: d00c0000 A2: 007c2370 A1: 003f810c A0: 00040000 D5: d0096800 D4: d0097e00 D3: 00000001 D2: 00000003 D1: 00000000 Non-Maskable Interrupt Modules linked in: swim_mod(+) PC: [<000075ba>] __iounmap+0x24/0x10e SR: 2000 SP: 007abc48 a2: 007c2370 d0: d00c0000 d1: 000001a0 d2: 00000019 d3: 00000001 d4: d0097e00 d5: d0096800 a0: 00040000 a1: 003f810c Process modprobe (pid: 285, task=007c2370) Frame format=0 Stack from 007abc7c: ffffffed 00000000 006a4060 004712e0 007abca0 000076ea d0080000 00080000 010bb4b8 007abcd8 010ba542 d0096000 00000000 00000000 00000001 010bb59c 00000000 007abf30 010bb4b8 0047760a 0047763c 00477612 00616540 007abcec 0020a91a 00477600 0047760a 010bb4cc 007abd18 002092f2 0047760a 00333b06 007abd5c 00000000 0047760a 010bb4cc 00404f90 004776b8 00000001 007abd38 00209446 010bb4cc 0047760a 010bb4cc 0020938e 0031f8be 00616540 007abd64 Call Trace: [<000076ea>] iounmap+0x46/0x5a [<00080000>] shrink_page_list+0x7f6/0xe06 [<010ba542>] swim_probe+0xe4/0x496 [swim_mod] [<0020a91a>] platform_drv_probe+0x20/0x5e [<002092f2>] driver_probe_device+0x21c/0x2b8 [<00333b06>] mutex_lock+0x0/0x2e [<00209446>] __driver_attach+0xb8/0xce [<0020938e>] __driver_attach+0x0/0xce [<0031f8be>] klist_next+0x0/0xa0 [<00207562>] bus_for_each_dev+0x74/0xba [<000344c0>] blocking_notifier_call_chain+0x0/0x20 [<00333b06>] mutex_lock+0x0/0x2e [<00208e44>] driver_attach+0x1a/0x1e [<0020938e>] __driver_attach+0x0/0xce [<00207e26>] bus_add_driver+0x188/0x234 [<000344c0>] blocking_notifier_call_chain+0x0/0x20 [<00209894>] driver_register+0x58/0x104 [<000344c0>] blocking_notifier_call_chain+0x0/0x20 [<010bd000>] swim_init+0x0/0x2c [swim_mod] [<0020a7be>] __platform_driver_register+0x38/0x3c [<010bd028>] swim_init+0x28/0x2c [swim_mod] [<000020dc>] do_one_initcall+0x38/0x196 [<000344c0>] blocking_notifier_call_chain+0x0/0x20 [<003331cc>] mutex_unlock+0x0/0x3e [<00333b06>] mutex_lock+0x0/0x2e [<003331cc>] mutex_unlock+0x0/0x3e [<00333b06>] mutex_lock+0x0/0x2e [<003331cc>] mutex_unlock+0x0/0x3e [<00333b06>] mutex_lock+0x0/0x2e [<003331cc>] mutex_unlock+0x0/0x3e [<00333b06>] mutex_lock+0x0/0x2e [<00075008>] __free_pages+0x0/0x38 [<000045c0>] mangle_kernel_stack+0x30/0xda [<000344c0>] blocking_notifier_call_chain+0x0/0x20 [<003331cc>] mutex_unlock+0x0/0x3e [<00333b06>] mutex_lock+0x0/0x2e [<0005ced4>] do_init_module+0x42/0x266 [<010bd000>] swim_init+0x0/0x2c [swim_mod] [<000344c0>] blocking_notifier_call_chain+0x0/0x20 [<0005eda0>] load_module+0x1a30/0x1e70 [<0000465d>] mangle_kernel_stack+0xcd/0xda [<00331c64>] __generic_copy_from_user+0x0/0x46 [<0033256e>] _cond_resched+0x0/0x32 [<00331b9c>] memset+0x0/0x98 [<0033256e>] _cond_resched+0x0/0x32 [<0005f25c>] SyS_init_module+0x7c/0x112 [<00002000>] _start+0x0/0x8 [<00002000>] _start+0x0/0x8 [<00331c82>] __generic_copy_from_user+0x1e/0x46 [<0005f2b2>] SyS_init_module+0xd2/0x112 [<0000465d>] mangle_kernel_stack+0xcd/0xda [<00002b40>] syscall+0x8/0xc [<0000465d>] mangle_kernel_stack+0xcd/0xda [<0008c00c>] pcpu_balance_workfn+0xb2/0x40e Code: 2200 7419 e4a9 e589 2841 d9fc 0000 1000 <2414> 7203 c282 7602 b681 6600 0096 0242 fe00 0482 0000 0000 e9c0 11c3 ed89 2642 There's no need to call ioremap() for the SWIM address range, as it lies within the usual IO device region at 0x5000 0000, which has already been mapped by head.S. Remove the redundant ioremap() and iounmap() calls to fix the hang. Cc: Laurent Vivier Cc: stable@vger.kernel.org # v4.14+ Tested-by: Stan Johnson Signed-off-by: Finn Thain Acked-by: Laurent Vivier Signed-off-by: Jens Axboe drivers/block/swim.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 5968a70d7af5f2abbd9d9f9c8e86da51f0a6b16d Author: Randy Dunlap Date: Mon Apr 16 12:32:55 2018 -0700 textsearch: fix kernel-doc warnings and add kernel-api section Make lib/textsearch.c usable as kernel-doc. Add textsearch() function family to kernel-api documentation. Fix kernel-doc warnings in : ../include/linux/textsearch.h:65: warning: Incorrect use of kernel-doc format: * get_next_block - fetch next block of data ../include/linux/textsearch.h:82: warning: Incorrect use of kernel-doc format: * finish - finalize/clean a series of get_next_block() calls Signed-off-by: Randy Dunlap Signed-off-by: David S. Miller Documentation/core-api/kernel-api.rst | 13 ++++++++++++ include/linux/textsearch.h | 4 ++-- lib/textsearch.c | 40 ++++++++++++++++++++--------------- 3 files changed, 38 insertions(+), 19 deletions(-) commit 25d0e2db3d8f4f79fddd436dcc848d912e98b485 Author: Zhu Yanjun Date: Sat Apr 14 21:16:54 2018 -0400 IB/mlx5: remove duplicate header file The header file fs_helpers.h is included twice. So it should be removed. Fixes: 802c2125689d ("IB/mlx5: Add IPsec support for egress and ingress") CC: Srinivas Eeda CC: Junxiao Bi Signed-off-by: Zhu Yanjun Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 1 - 1 file changed, 1 deletion(-) commit 144345a4a8c3b497a3f60d3af9d6071a37660186 Author: Geert Uytterhoeven Date: Sun Apr 8 11:05:15 2018 +0200 soc: bcm2835: Make !RASPBERRYPI_FIRMWARE dummies return failure If CONFIG_RASPBERRYPI_FIRMWARE=n: drivers/gpio/gpio-raspberrypi-exp.c: In function ‘rpi_exp_gpio_get_polarity’: drivers/gpio/gpio-raspberrypi-exp.c:71: warning: ‘get.polarity’ is used uninitialized in this function drivers/gpio/gpio-raspberrypi-exp.c: In function ‘rpi_exp_gpio_get_direction’: drivers/gpio/gpio-raspberrypi-exp.c:150: warning: ‘get.direction’ is used uninitialized in this function The dummy firmware interface functions return 0, which means success, causing subsequent code to make use of the never initialized output parameter. Fix this by making the dummy functions return an error code (-ENOSYS) instead. Note that this assumes the firmware always fills in the requested data in the CONFIG_RASPBERRYPI_FIRMWARE=y case. Fixes: d45f1a563b92dac7 ("staging: vc04_services: fix up rpi firmware functions") Signed-off-by: Geert Uytterhoeven Reviewed-by: Eric Anholt Signed-off-by: Florian Fainelli include/soc/bcm2835/raspberrypi-firmware.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a12e80ce4230434c2ed66ad0d65af0b7ccecea8 Author: Florian Fainelli Date: Sun Apr 1 09:42:25 2018 -0700 soc: bcm: raspberrypi-power: Fix use of __packed Commit a09cd356586d ("ARM: bcm2835: add rpi power domain driver") attempted to annotate the structure rpi_power_domain_packet with __packed but introduced a typo and made it named __packet instead. Just drop the annotation since the structure is naturally aligned already. Fixes: a09cd356586d ("ARM: bcm2835: add rpi power domain driver") Signed-off-by: Florian Fainelli drivers/soc/bcm/raspberrypi-power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c9f0a946d5c6d3d6a83cfee0e8bb4e886559a67 Merge: 9783ccd c640412 Author: David S. Miller Date: Mon Apr 16 18:08:18 2018 -0400 Merge branch 'tipc-Better-check-user-provided-attributes' Eric Dumazet says: ==================== tipc: Better check user provided attributes syzbot reported a crash in __tipc_nl_net_set() While fixing it, I also had to fix an old bug involving TIPC_NLA_NET_ADDR ==================== Acked-by: Jon Maloy Signed-off-by: David S. Miller commit c6404122cb18f1fbd2a6dc85ab687f6fa2e454cf Author: Eric Dumazet Date: Mon Apr 16 08:29:43 2018 -0700 tipc: fix possible crash in __tipc_nl_net_set() syzbot reported a crash in __tipc_nl_net_set() caused by NULL dereference. We need to check that both TIPC_NLA_NET_NODEID and TIPC_NLA_NET_NODEID_W1 are present. We also need to make sure userland provided u64 attributes. Fixes: d50ccc2d3909 ("tipc: add 128-bit node identifier") Signed-off-by: Eric Dumazet Cc: Jon Maloy Cc: Ying Xue Reported-by: syzbot Signed-off-by: David S. Miller net/tipc/net.c | 2 ++ net/tipc/netlink.c | 2 ++ 2 files changed, 4 insertions(+) commit ec518f21cb1a1b1f8a516499ea05c60299e04963 Author: Eric Dumazet Date: Mon Apr 16 08:29:42 2018 -0700 tipc: add policy for TIPC_NLA_NET_ADDR Before syzbot/KMSAN bites, add the missing policy for TIPC_NLA_NET_ADDR Fixes: 27c21416727a ("tipc: add net set to new netlink api") Signed-off-by: Eric Dumazet Cc: Jon Maloy Cc: Ying Xue Signed-off-by: David S. Miller net/tipc/netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a27fc14219f2e3c4a46ba9177b04d9b52c875532 Merge: d95c884 c7cd882 Author: Linus Torvalds Date: Mon Apr 16 14:07:39 2018 -0700 Merge branch 'parisc-4.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc build fix from Helge Deller: "Fix build error because of missing binfmt_elf32.o file which is still mentioned in the Makefile" * 'parisc-4.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix missing binfmt_elf32.o build error commit 8a8158c85e1e774a44fbe81106fa41138580dfd1 Author: Matt Redfearn Date: Thu Mar 29 10:28:23 2018 +0100 MIPS: memset.S: EVA & fault support for small_memset The MIPS kernel memset / bzero implementation includes a small_memset branch which is used when the region to be set is smaller than a long (4 bytes on 32bit, 8 bytes on 64bit). The current small_memset implementation uses a simple store byte loop to write the destination. There are 2 issues with this implementation: 1. When EVA mode is active, user and kernel address spaces may overlap. Currently the use of the sb instruction means kernel mode addressing is always used and an intended write to userspace may actually overwrite some critical kernel data. 2. If the write triggers a page fault, for example by calling __clear_user(NULL, 2), instead of gracefully handling the fault, an OOPS is triggered. Fix these issues by replacing the sb instruction with the EX() macro, which will emit EVA compatible instuctions as required. Additionally implement a fault fixup for small_memset which sets a2 to the number of bytes that could not be cleared (as defined by __clear_user). Reported-by: Chuanhua Lei Signed-off-by: Matt Redfearn Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/18975/ Signed-off-by: James Hogan arch/mips/lib/memset.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit d95c8844399885cd511c6f6395621cc1a9fe2e68 Merge: e6d9bfd 90c7c0c Author: Linus Torvalds Date: Mon Apr 16 12:44:03 2018 -0700 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull missed timer updates from Thomas Gleixner: "This is a branch which got forgotten during the merge window, but it contains only fixes and hardware enablement. No fundamental changes. - Various fixes for the imx-tpm clocksource driver - A new timer driver for the NCPM7xx SoC family" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/imx-tpm: Add different counter width support clocksource/drivers/imx-tpm: Correct some registers operation flow clocksource/drivers/imx-tpm: Fix typo of clock name dt-bindings: timer: tpm: fix typo of clock name clocksource/drivers/npcm: Add NPCM7xx timer driver dt-binding: timer: document NPCM7xx timer DT bindings commit e86281e700cca8a773f9a572fa406adf2784ba5c Author: Tyler Hicks Date: Wed Mar 28 23:41:52 2018 +0000 eCryptfs: don't pass up plaintext names when using filename encryption Both ecryptfs_filldir() and ecryptfs_readlink_lower() use ecryptfs_decode_and_decrypt_filename() to translate lower filenames to upper filenames. The function correctly passes up lower filenames, unchanged, when filename encryption isn't in use. However, it was also passing up lower filenames when the filename wasn't encrypted or when decryption failed. Since 88ae4ab9802e, eCryptfs refuses to lookup lower plaintext names when filename encryption is enabled so this resulted in a situation where userspace would see lower plaintext filenames in calls to getdents(2) but then not be able to lookup those filenames. An example of this can be seen when enabling filename encryption on an eCryptfs mount at the root directory of an Ext4 filesystem: $ ls -1i /lower 12 ECRYPTFS_FNEK_ENCRYPTED.FWYZD8TcW.5FV-TKTEYOHsheiHX9a-w.NURCCYIMjI8pn5BDB9-h3fXwrE-- 11 lost+found $ ls -1i /upper ls: cannot access '/upper/lost+found': No such file or directory ? lost+found 12 test With this change, the lower lost+found dentry is ignored: $ ls -1i /lower 12 ECRYPTFS_FNEK_ENCRYPTED.FWYZD8TcW.5FV-TKTEYOHsheiHX9a-w.NURCCYIMjI8pn5BDB9-h3fXwrE-- 11 lost+found $ ls -1i /upper 12 test Additionally, some potentially noisy error/info messages in the related code paths are turned into debug messages so that the logs can't be easily filled. Fixes: 88ae4ab9802e ("ecryptfs_lookup(): try either only encrypted or plaintext name") Reported-by: Guenter Roeck Cc: Al Viro Signed-off-by: Tyler Hicks fs/ecryptfs/crypto.c | 41 ++++++++++++++++++++++++++++------------- fs/ecryptfs/file.c | 21 ++++++++++++++++----- 2 files changed, 44 insertions(+), 18 deletions(-) commit e6d9bfdeb4395fa5397996b2c3111b5909f41a1b Merge: e6f39e8 d5edb7f Author: Linus Torvalds Date: Mon Apr 16 11:24:28 2018 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Bug fixes, plus a new test case and the associated infrastructure for writing nested virtualization tests" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm: selftests: add vmx_tsc_adjust_test kvm: x86: move MSR_IA32_TSC handling to x86.c X86/KVM: Properly update 'tsc_offset' to represent the running guest kvm: selftests: add -std=gnu99 cflags x86: Add check for APIC access address for vmentry of L2 guests KVM: X86: fix incorrect reference of trace_kvm_pi_irte_update X86/KVM: Do not allow DISABLE_EXITS_MWAIT when LAPIC ARAT is not available kvm: selftests: fix spelling mistake: "divisable" and "divisible" X86/VMX: Disable VMX preemption timer if MWAIT is not intercepted commit e6f39e87b6439939a14cb7fdd94086a082b63b87 Author: Joerg Roedel Date: Mon Apr 16 11:43:57 2018 +0200 x86/ldt: Fix support_pte_mask filtering in map_ldt_struct() The |= operator will let us end up with an invalid PTE. Use the correct &= instead. [ The bug was also independently reported by Shuah Khan ] Fixes: fb43d6cb91ef ('x86/mm: Do not auto-massage page protections') Acked-by: Andy Lutomirski Acked-by: Dave Hansen Signed-off-by: Joerg Roedel Signed-off-by: Linus Torvalds arch/x86/kernel/ldt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc29f581fa9d5567c3a01ecfdd7f16b2e613c7fb Author: Wei Yongjun Date: Thu Mar 29 02:14:03 2018 +0000 ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk static Fixes the following sparse warning: sound/soc/amd/acp-da7219-max98357a.c:46:12: warning: symbol 'da7219_dai_clk' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown sound/soc/amd/acp-da7219-max98357a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc8a3ef1940c9a6dfa316b31e063fdd4fbab0add Author: Tony Lindgren Date: Mon Apr 16 10:01:04 2018 -0700 ARM: dts: Fix cm2 and prm sizes for omap4 The size of these modules is 0x2000, not 0x3000. The extra 0x1000 after 0x2000 is for the interconnect target agent which is a separate device. Fixes: 7415b0b4c645 ("ARM: dts: omap4: add minimal l4 bus layout with control module support") Cc: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9783ccd0f2507cbe3c5ff1cb84bf6ae3a512d17d Author: Gao Feng Date: Mon Apr 16 10:16:45 2018 +0800 net: Fix one possible memleak in ip_setup_cork It would allocate memory in this function when the cork->opt is NULL. But the memory isn't freed if failed in the latter rt check, and return error directly. It causes the memleak if its caller is ip_make_skb which also doesn't free the cork->opt when meet a error. Now move the rt check ahead to avoid the memleak. Signed-off-by: Gao Feng Signed-off-by: David S. Miller net/ipv4/ip_output.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 5ef5ac8de125fe6b4b23293bee026ca7ea1529b9 Author: oder_chiou@realtek.com Date: Fri Mar 30 15:41:55 2018 +0800 ASoC: rt5514: Add the missing register in the readable table The patch adds the missing register in the readable table. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5514.c | 3 +++ 1 file changed, 3 insertions(+) commit 6cc1eb507855612a983f9a66a9a13cdd48e16852 Author: Jerome Brunet Date: Mon Apr 9 15:59:21 2018 +0200 clk: meson: honor CLK_MUX_ROUND_CLOSEST in clk_regmap Using __clk_mux_determine_rate effectively ignores CLK_MUX_ROUND_CLOSEST if set the related clk_regmap mux instance. Use clk_mux_determine_rate_flags() to make sure the flag is honored. Fixes: ea11dda9e091 ("clk: meson: add regmap clocks") Signed-off-by: Jerome Brunet Signed-off-by: Stephen Boyd drivers/clk/meson/clk-regmap.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 4ad69b80e886a845f56ce0a3d10211208693d92b Author: Jerome Brunet Date: Mon Apr 9 15:59:20 2018 +0200 clk: honor CLK_MUX_ROUND_CLOSEST in generic clk mux CLK_MUX_ROUND_CLOSEST is part of the clk_mux documentation but clk_mux directly calls __clk_mux_determine_rate(), which overrides the flag. As result, if clk_mux is instantiated with CLK_MUX_ROUND_CLOSEST, the flag will be ignored and the clock rounded down. To solve this, this patch expose clk_mux_determine_rate_flags() in the clk-provider API and uses it in the determine_rate() callback of clk_mux. Fixes: 15a02c1f6dd7 ("clk: Add __clk_mux_determine_rate_closest") Signed-off-by: Jerome Brunet Signed-off-by: Stephen Boyd drivers/clk/clk-mux.c | 10 +++++++++- drivers/clk/clk.c | 7 ++++--- include/linux/clk-provider.h | 3 +++ 3 files changed, 16 insertions(+), 4 deletions(-) commit b8e47d87be65aec931846ced9a34a22d2021c311 Author: Ramalingam C Date: Thu Apr 5 17:33:22 2018 +0530 drm: Fix HDCP downstream dev count read In both HDMI and DP, device count is represented by 6:0 bits of a register(BInfo/Bstatus) So macro for bitmasking the device_count is fixed(0x3F->0x7F). v3: Retained the Rb-ed. v4: %s/drm\/i915/drm [rodrigo] v5: Added "Fixes:" and HDCP keyword in subject [Rodrigo, Sean Paul] Signed-off-by: Ramalingam C Fixes: 495eb7f877ab drm: Add some HDCP related #defines cc: Sean Paul Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1522929802-22850-1-git-send-email-ramalingam.c@intel.com include/drm/drm_hdcp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a21b85944c9653f2a3388d0da962c7c70690c30f Author: Arnd Bergmann Date: Mon Apr 9 12:54:34 2018 +0200 clk: cs2000: mark resume function as __maybe_unused When power management is disabled, we get a harmless warning: drivers/clk/clk-cs2000-cp.c:544:12: error: 'cs2000_resume' defined but not used [-Werror=unused-function] Marking the function as __maybe_unused lets the compiler silently drop it instead. Fixes: eade4ccdb087 ("clk: cs2000: set pm_ops in hibernate-compatible way") Signed-off-by: Arnd Bergmann Signed-off-by: Stephen Boyd drivers/clk/clk-cs2000-cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14867765351b75b5aa366310b4535b363d615247 Merge: 60cc43f ccf719b Author: Stephen Boyd Date: Mon Apr 16 08:58:39 2018 -0700 Merge branch 'clk-stm32mp1' into clk-fixes * clk-stm32mp1: clk: stm32mp1: remove ck_apb_dbg clock clk: stm32mp1: set stgen_k clock as critical clk: stm32mp1: add missing tzc2 clock clk: stm32mp1: fix SAI3 & SAI4 clocks clk: stm32mp1: remove unused dfsdm_src[] const clk: stm32mp1: add missing static commit d5edb7f8e7ab9fd5fd54a77d957b1733f117a813 Author: Paolo Bonzini Date: Tue Mar 27 22:46:11 2018 +0200 kvm: selftests: add vmx_tsc_adjust_test The test checks the behavior of setting MSR_IA32_TSC in a nested guest, and the TSC_OFFSET VMCS field in general. It also introduces the testing infrastructure for Intel nested virtualization. Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/Makefile | 3 +- tools/testing/selftests/kvm/include/kvm_util.h | 15 +- tools/testing/selftests/kvm/include/vmx.h | 494 ++++++++++++++++++++++ tools/testing/selftests/kvm/lib/kvm_util.c | 18 +- tools/testing/selftests/kvm/lib/vmx.c | 243 +++++++++++ tools/testing/selftests/kvm/vmx_tsc_adjust_test.c | 231 ++++++++++ 6 files changed, 991 insertions(+), 13 deletions(-) commit dd259935e4eec844dc3e5b8a7cd951cd658b4fb6 Author: Paolo Bonzini Date: Fri Apr 13 11:38:35 2018 +0200 kvm: x86: move MSR_IA32_TSC handling to x86.c This is not specific to Intel/AMD anymore. The TSC offset is available in vcpu->arch.tsc_offset. Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 9 --------- arch/x86/kvm/vmx.c | 20 -------------------- arch/x86/kvm/x86.c | 6 ++++++ 3 files changed, 6 insertions(+), 29 deletions(-) commit e79f245ddec17bbd89d73cd0169dba4be46c9b55 Author: KarimAllah Ahmed Date: Sat Apr 14 05:10:52 2018 +0200 X86/KVM: Properly update 'tsc_offset' to represent the running guest Update 'tsc_offset' on vmentry/vmexit of L2 guests to ensure that it always captures the TSC_OFFSET of the running guest whether it is the L1 or L2 guest. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Jim Mattson Suggested-by: Paolo Bonzini Signed-off-by: KarimAllah Ahmed [AMD changes, fix update_ia32_tsc_adjust_msr. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/svm.c | 17 ++++++++++++- arch/x86/kvm/vmx.c | 54 ++++++++++++++++++++++++++--------------- arch/x86/kvm/x86.c | 6 +++-- 4 files changed, 56 insertions(+), 22 deletions(-) commit ef95a90ae6f4f21990e1f7ced6719784a409e811 Author: Shamir Rabinovitch Date: Tue Apr 10 10:26:23 2018 -0400 RDMA/ucma: ucma_context reference leak in error path Validating input parameters should be done before getting the cm_id otherwise it can leak a cm_id reference. Fixes: 6a21dfc0d0db ("RDMA/ucma: Limit possible option size") Signed-off-by: Shamir Rabinovitch Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/ucma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2f6adf481527c8ab8033c601f55bfb5b3712b2ac Author: Florian Westphal Date: Tue Apr 10 09:00:24 2018 +0200 netfilter: nf_tables: free set name in error path set->name must be free'd here in case ops->init fails. Fixes: 387454901bd6 ("netfilter: nf_tables: Allow set names of up to 255 chars") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 569ccae68b38654f04b6842b034aa33857f605fe Author: Florian Westphal Date: Tue Apr 10 09:30:27 2018 +0200 netfilter: nf_tables: can't fail after linking rule into active rule list rules in nftables a free'd using kfree, but protected by rcu, i.e. we must wait for a grace period to elapse. Normal removal patch does this, but nf_tables_newrule() doesn't obey this rule during error handling. It calls nft_trans_rule_add() *after* linking rule, and, if that fails to allocate memory, it unlinks the rule and then kfree() it -- this is unsafe. Switch order -- first add rule to transaction list, THEN link it to public list. Note: nft_trans_rule_add() uses GFP_KERNEL; it will not fail so this is not a problem in practice (spotted only during code review). Fixes: 0628b123c96d12 ("netfilter: nfnetlink: add batch support and use it from nf_tables") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 59 +++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 27 deletions(-) commit a6615743704fdc179e227f84b7903edd1f0b4241 Author: Arnd Bergmann Date: Mon Apr 9 12:53:12 2018 +0200 netfilter: fix CONFIG_NF_REJECT_IPV6=m link error We get a new link error with CONFIG_NFT_REJECT_INET=y and CONFIG_NF_REJECT_IPV6=m after larger parts of the nftables modules are linked together: net/netfilter/nft_reject_inet.o: In function `nft_reject_inet_eval': nft_reject_inet.c:(.text+0x17c): undefined reference to `nf_send_unreach6' nft_reject_inet.c:(.text+0x190): undefined reference to `nf_send_reset6' The problem is that with NF_TABLES_INET set, we implicitly try to use the ipv6 version as well for NFT_REJECT, but when CONFIG_IPV6 is set to a loadable module, it's impossible to reach that. The best workaround I found is to express the above as a Kconfig dependency, forcing NFT_REJECT itself to be 'm' in that particular configuration. Fixes: 02c7b25e5f54 ("netfilter: nf_tables: build-in filter chain type") Signed-off-by: Arnd Bergmann Signed-off-by: Pablo Neira Ayuso net/netfilter/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 114aa35d06d4920c537b72f9fa935de5dd205260 Author: Cong Wang Date: Fri Mar 30 13:22:06 2018 -0700 netfilter: conntrack: silent a memory leak warning The following memory leak is false postive: unreferenced object 0xffff8f37f156fb38 (size 128): comm "softirq", pid 0, jiffies 4294899665 (age 11.292s) hex dump (first 32 bytes): 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk 00 00 00 00 30 00 20 00 48 6b 6b 6b 6b 6b 6b 6b ....0. .Hkkkkkkk backtrace: [<000000004fda266a>] __kmalloc_track_caller+0x10d/0x141 [<000000007b0a7e3c>] __krealloc+0x45/0x62 [<00000000d08e0bfb>] nf_ct_ext_add+0xdc/0x133 [<0000000099b47fd8>] init_conntrack+0x1b1/0x392 [<0000000086dc36ec>] nf_conntrack_in+0x1ee/0x34b [<00000000940592de>] nf_hook_slow+0x36/0x95 [<00000000d1bd4da7>] nf_hook.constprop.43+0x1c3/0x1dd [<00000000c3673266>] __ip_local_out+0xae/0xb4 [<000000003e4192a6>] ip_local_out+0x17/0x33 [<00000000b64356de>] igmp_ifc_timer_expire+0x23e/0x26f [<000000006a8f3032>] call_timer_fn+0x14c/0x2a5 [<00000000650c1725>] __run_timers.part.34+0x150/0x182 [<0000000090e6946e>] run_timer_softirq+0x2a/0x4c [<000000004d1e7293>] __do_softirq+0x1d1/0x3c2 [<000000004643557d>] irq_exit+0x53/0xa2 [<0000000029ddee8f>] smp_apic_timer_interrupt+0x22a/0x235 because __krealloc() is not supposed to release the old memory and it is released later via kfree_rcu(). Since this is the only external user of __krealloc(), just mark it as not leak here. Signed-off-by: Cong Wang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_extend.c | 1 + 1 file changed, 1 insertion(+) commit 5171b37d959641bbc619781caf62e61f7b940871 Author: Eric Dumazet Date: Sun Apr 15 17:52:04 2018 -0700 net: af_packet: fix race in PACKET_{R|T}X_RING In order to remove the race caught by syzbot [1], we need to lock the socket before using po->tp_version as this could change under us otherwise. This means lock_sock() and release_sock() must be done by packet_set_ring() callers. [1] : BUG: KMSAN: uninit-value in packet_set_ring+0x1254/0x3870 net/packet/af_packet.c:4249 CPU: 0 PID: 20195 Comm: syzkaller707632 Not tainted 4.16.0+ #83 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676 packet_set_ring+0x1254/0x3870 net/packet/af_packet.c:4249 packet_setsockopt+0x12c6/0x5a90 net/packet/af_packet.c:3662 SYSC_setsockopt+0x4b8/0x570 net/socket.c:1849 SyS_setsockopt+0x76/0xa0 net/socket.c:1828 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x449099 RSP: 002b:00007f42b5307ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000070003c RCX: 0000000000449099 RDX: 0000000000000005 RSI: 0000000000000107 RDI: 0000000000000003 RBP: 0000000000700038 R08: 000000000000001c R09: 0000000000000000 R10: 00000000200000c0 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000080eecf R14: 00007f42b53089c0 R15: 0000000000000001 Local variable description: ----req_u@packet_setsockopt Variable was created at: packet_setsockopt+0x13f/0x5a90 net/packet/af_packet.c:3612 SYSC_setsockopt+0x4b8/0x570 net/socket.c:1849 Fixes: f6fb8f100b80 ("af-packet: TPACKET_V3 flexible buffer implementation.") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller net/packet/af_packet.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit f23e0643cd0b53e68e283b6f26194d56c28a2eb1 Author: Thomas Falcon Date: Sun Apr 15 18:53:36 2018 -0500 ibmvnic: Clear pending interrupt after device reset Due to a firmware bug, the hypervisor can send an interrupt to a transmit or receive queue just prior to a partition migration, not allowing the device enough time to handle it and send an EOI. When the partition migrates, the interrupt is lost but an "EOI-pending" flag for the interrupt line is still set in firmware. No further interrupts will be sent until that flag is cleared, effectively freezing that queue. To workaround this, the driver will disable the hardware interrupt and send an H_EOI signal prior to re-enabling it. This will flush the pending EOI and allow the driver to continue operation. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit b89bc283286b105e50aab9ab35992c0237ac77d8 Author: Jacopo Mondi Date: Mon Apr 16 15:56:08 2018 +0200 dt-bindings: dmaengine: rcar-dmac: document R8A77965 support Add documentation for r8a77965 compatible string to rcar-dmac device tree bindings documentation. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Rob Herring Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt | 1 + 1 file changed, 1 insertion(+) commit 7de5b7e5f6a67c285b86d1478e8e150929c93482 Author: Jacopo Mondi Date: Mon Apr 16 15:55:28 2018 +0200 dt-bindings: serial: sh-sci: Add support for r8a77965 (H)SCIF Add documentation for r8a77965 compatible string to Renesas sci-serial device tree bindings documentation. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Rob Herring Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 2 ++ 1 file changed, 2 insertions(+) commit 1a862488729a6ea9cfd285d2c90f8738949ae7d2 Author: Jacopo Mondi Date: Mon Apr 16 15:55:17 2018 +0200 dt-bindings: net: ravb: Add support for r8a77965 SoC Add documentation for r8a77965 compatible string to renesas ravb device tree bindings documentation. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Acked-by: Sergei Shtylyov Signed-off-by: Rob Herring Documentation/devicetree/bindings/net/renesas,ravb.txt | 1 + 1 file changed, 1 insertion(+) commit b614e905a0bc8fc5d4fa72665ac26ae00c874a4e Author: Matheus Castello Date: Wed Apr 11 01:17:03 2018 -0400 dt-bindings: pinctrl: sunxi: Fix reference to driver Bindings describe hardware, not drivers. Use reference to hardware Allwinner A1X Pin Controller instead driver. Signed-off-by: Matheus Castello Signed-off-by: Rob Herring .../devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 99bf8f27f3f94d2a37291354b8dc83f13728f75f Author: Lukasz Majewski Date: Wed Apr 4 09:52:04 2018 +0200 doc: Add vendor prefix for Kieback & Peter GmbH The 'kiebackpeter' entry has been added to vendor-prefixes.txt to indicate products from Kieback & Peter GmbH. Signed-off-by: Lukasz Majewski Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit bffd168c3fc5cc7d2bad4c668fa90e7a9010db4b Author: Soheil Hassas Yeganeh Date: Sat Apr 14 20:44:46 2018 -0400 tcp: clear tp->packets_out when purging write queue Clear tp->packets_out when purging the write queue, otherwise tcp_rearm_rto() mistakenly assumes TCP write queue is not empty. This results in NULL pointer dereference. Also, remove the redundant `tp->packets_out = 0` from tcp_disconnect(), since tcp_disconnect() calls tcp_write_queue_purge(). Fixes: a27fd7a8ed38 (tcp: purge write queue upon RST) Reported-by: Subash Abhinov Kasiviswanathan Reported-by: Sami Farin Tested-by: Sami Farin Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9484e12d7999a3c82d8732b60c0149f038bdd985 Author: Dan Williams Date: Mon Apr 9 14:29:33 2018 -0700 tools/testing/nvdimm: enable labels for nfit_test.1 dimms Enable test cases for the kernel's fallback to label-less mode. Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 3 +++ 1 file changed, 3 insertions(+) commit 19357a685e870eeb825cbb7fd3104082ab041987 Author: Dan Williams Date: Tue Apr 10 14:23:47 2018 -0700 tools/testing/nvdimm: fix missing newline in nfit_test_dimm 'handle' attribute Sysfs userspace tooling generally expects the kernel to emit a newlines when reading sysfs attributes. Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 718fda67d2f69cc6074b4b6a740a6e4aacd44eff Author: Dan Williams Date: Mon Apr 9 16:38:01 2018 -0700 tools/testing/nvdimm: support nfit_test_dimm attributes under nfit_test.1 The nfit_test.1 bus provides a pmem topology without blk-aperture enabling, so it presents different failure modes for label space handling. Allow custom DSM command error injection. Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 43 +++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 18 deletions(-) commit 55c72ab62e47fc584131901baddb2752e949ebcd Author: Dan Williams Date: Mon Apr 9 13:56:43 2018 -0700 tools/testing/nvdimm: allow custom error code injection Given that libnvdimm driver stack takes specific actions on DIMM command error codes like -EACCES, provide a facility to inject custom failures. Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) commit e7c5a571a8d6a266aee9ca3f3f26e5afe3717eca Author: Dan Williams Date: Mon Apr 9 12:34:24 2018 -0700 libnvdimm, dimm: handle EACCES failures from label reads The new support for the standard _LSR and _LSW methods neglected to also update the nvdimm_init_config_data() and nvdimm_set_config_data() to return the translated error code from failed commands. This precision is necessary because the locked status that was previously returned on ND_CMD_GET_CONFIG_SIZE commands is now returned on ND_CMD_{GET,SET}_CONFIG_DATA commands. If the kernel misses this indication it can inadvertently fall back to label-less mode when it should otherwise avoid all access to locked regions. Cc: Fixes: 4b27db7e26cd ("acpi, nfit: add support for the _LSI, _LSR, and...") Signed-off-by: Dan Williams drivers/nvdimm/dimm_devs.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 4fb0534fb7bbc2346ba7d3a072b538007f4135a5 Author: Paolo Abeni Date: Fri Apr 13 13:59:25 2018 +0200 team: avoid adding twice the same option to the event list When parsing the options provided by the user space, team_nl_cmd_options_set() insert them in a temporary list to send multiple events with a single message. While each option's attribute is correctly validated, the code does not check for duplicate entries before inserting into the event list. Exploiting the above, the syzbot was able to trigger the following splat: kernel BUG at lib/list_debug.c:31! invalid opcode: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 4466 Comm: syzkaller556835 Not tainted 4.16.0+ #17 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__list_add_valid+0xaa/0xb0 lib/list_debug.c:29 RSP: 0018:ffff8801b04bf248 EFLAGS: 00010286 RAX: 0000000000000058 RBX: ffff8801c8fc7a90 RCX: 0000000000000000 RDX: 0000000000000058 RSI: ffffffff815fbf41 RDI: ffffed0036097e3f RBP: ffff8801b04bf260 R08: ffff8801b0b2a700 R09: ffffed003b604f90 R10: ffffed003b604f90 R11: ffff8801db027c87 R12: ffff8801c8fc7a90 R13: ffff8801c8fc7a90 R14: dffffc0000000000 R15: 0000000000000000 FS: 0000000000b98880(0000) GS:ffff8801db000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000043fc30 CR3: 00000001afe8e000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __list_add include/linux/list.h:60 [inline] list_add include/linux/list.h:79 [inline] team_nl_cmd_options_set+0x9ff/0x12b0 drivers/net/team/team.c:2571 genl_family_rcv_msg+0x889/0x1120 net/netlink/genetlink.c:599 genl_rcv_msg+0xc6/0x170 net/netlink/genetlink.c:624 netlink_rcv_skb+0x172/0x440 net/netlink/af_netlink.c:2448 genl_rcv+0x28/0x40 net/netlink/genetlink.c:635 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x58b/0x740 net/netlink/af_netlink.c:1336 netlink_sendmsg+0x9f0/0xfa0 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:639 ___sys_sendmsg+0x805/0x940 net/socket.c:2117 __sys_sendmsg+0x115/0x270 net/socket.c:2155 SYSC_sendmsg net/socket.c:2164 [inline] SyS_sendmsg+0x29/0x30 net/socket.c:2162 do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x4458b9 RSP: 002b:00007ffd1d4a7278 EFLAGS: 00000213 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000000001b RCX: 00000000004458b9 RDX: 0000000000000010 RSI: 0000000020000d00 RDI: 0000000000000004 RBP: 00000000004a74ed R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000213 R12: 00007ffd1d4a7348 R13: 0000000000402a60 R14: 0000000000000000 R15: 0000000000000000 Code: 75 e8 eb a9 48 89 f7 48 89 75 e8 e8 d1 85 7b fe 48 8b 75 e8 eb bb 48 89 f2 48 89 d9 4c 89 e6 48 c7 c7 a0 84 d8 87 e8 ea 67 28 fe <0f> 0b 0f 1f 40 00 48 b8 00 00 00 00 00 fc ff df 55 48 89 e5 41 RIP: __list_add_valid+0xaa/0xb0 lib/list_debug.c:29 RSP: ffff8801b04bf248 This changeset addresses the avoiding list_add() if the current option is already present in the event list. Reported-and-tested-by: syzbot+4d4af685432dc0e56c91@syzkaller.appspotmail.com Signed-off-by: Paolo Abeni Fixes: 2fcdb2c9e659 ("team: allow to send multiple set events in one message") Signed-off-by: David S. Miller drivers/net/team/team.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 10b4640833e95eeacaef8060bc1b35e636df3218 Author: Vladimir Zapolskiy Date: Fri Apr 13 15:44:16 2018 +0300 spi: sh-msiof: Fix bit field overflow writes to TSCR/RSCR The change fixes a bit field overflow which allows to write to higher bits while calculating SPI transfer clock and setting BRPS and BRDV bit fields, the problem is reproduced if 'parent_rate' to 'spi_hz' ratio is greater than 1024, for instance p->min_div = 2, MSO rate = 33333333, SPI device rate = 10000 results in k = 5, i.e. BRDV = 0b100 or 1/32 prescaler output, BRPS = 105, TSCR value = 0x6804, thus MSSEL and MSIMM bit fields are non-zero. Fixes: 65d5665bb260 ("spi: sh-msiof: Update calculation of frequency dividing") Signed-off-by: Vladimir Zapolskiy Signed-off-by: Mark Brown drivers/spi/spi-sh-msiof.c | 1 + 1 file changed, 1 insertion(+) commit 8089f9f5a32938ddefb1767b8ee14bb7996e5e2f Merge: c0db1b6 a10beab Author: Sean Paul Date: Mon Apr 16 10:47:13 2018 -0400 Merge airlied/drm-next into drm-misc-fixes Fast forwarding -fixes for 4.17. Signed-off-by: Sean Paul commit b8858581febb050688e276b956796bc4a78299ed Author: Michael Ellerman Date: Mon Apr 16 23:25:19 2018 +1000 powerpc/lib: Fix off-by-one in alternate feature patching When we patch an alternate feature section, we have to adjust any relative branches that branch out of the alternate section. But currently we have a bug if we have a branch that points to past the last instruction of the alternate section, eg: FTR_SECTION_ELSE 1: b 2f or 6,6,6 2: ALT_FTR_SECTION_END(...) nop This will result in a relative branch at 1 with a target that equals the end of the alternate section. That branch does not need adjusting when it's moved to the non-else location. Currently we do adjust it, resulting in a branch that goes off into the link-time location of the else section, which is junk. The fix is to not patch branches that have a target == end of the alternate section. Fixes: d20fe50a7b3c ("KVM: PPC: Book3S HV: Branch inside feature section") Fixes: 9b1a735de64c ("powerpc: Add logic to patch alternative feature sections") Cc: stable@vger.kernel.org # v2.6.27+ Signed-off-by: Michael Ellerman arch/powerpc/lib/feature-fixups.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de3d01fd8549ec0444fc917aab711b3f884930c5 Author: Jia-Ju Bai Date: Wed Apr 11 09:15:31 2018 +0800 xen: xen-pciback: Replace GFP_ATOMIC with GFP_KERNEL in pcistub_reg_add pcistub_reg_add() is never called in atomic context. pcistub_reg_add() is only called by pcistub_quirk_add, which is only set in DRIVER_ATTR(). Despite never getting called from atomic context, pcistub_reg_add() calls kzalloc() with GFP_ATOMIC, which does not sleep for allocation. GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL, which can sleep and improve the possibility of sucessful allocation. This is found by a static analysis tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/xen/xen-pciback/pci_stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 230d211472d2779253e5a8383353fc44783dd038 Author: Jia-Ju Bai Date: Mon Apr 9 23:04:25 2018 +0800 xen: xen-pciback: Replace GFP_ATOMIC with GFP_KERNEL in xen_pcibk_config_quirks_init xen_pcibk_config_quirks_init() is never called in atomic context. The call chains ending up at xen_pcibk_config_quirks_init() are: [1] xen_pcibk_config_quirks_init() <- xen_pcibk_config_init_dev() <- pcistub_init_device() <- pcistub_seize() <- pcistub_probe() [2] xen_pcibk_config_quirks_init() <- xen_pcibk_config_init_dev() <- pcistub_init_device() <- pcistub_init_devices_late() <- xen_pcibk_init() pcistub_probe() is only set as ".probe" in struct pci_driver. xen_pcibk_init() is is only set as a parameter of module_init(). These functions are not called in atomic context. Despite never getting called from atomic context, xen_pcibk_config_quirks_init() calls kzalloc() with GFP_ATOMIC, which does not sleep for allocation. GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL, which can sleep and improve the possibility of sucessful allocation. Signed-off-by: Jia-Ju Bai Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/xen/xen-pciback/conf_space_quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9eb5f15b47b69847bfceb94350bd68fbdbf829e3 Author: Jia-Ju Bai Date: Mon Apr 9 23:04:12 2018 +0800 xen: xen-pciback: Replace GFP_ATOMIC with GFP_KERNEL in pcistub_device_alloc pcistub_device_alloc() is never called in atomic context. The call chain ending up at pcistub_device_alloc() is: [1] pcistub_device_alloc() <- pcistub_seize() <- pcistub_probe() pcistub_probe() is only set as ".probe" in struct pci_driver. This function is not called in atomic context. Despite never getting called from atomic context, pcistub_device_alloc() calls kzalloc() with GFP_ATOMIC, which does not sleep for allocation. GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL, which can sleep and improve the possibility of sucessful allocation. Signed-off-by: Jia-Ju Bai Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/xen/xen-pciback/pci_stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb52e3169cb7dd5a9deea39b94342fce36235a5b Author: Jia-Ju Bai Date: Mon Apr 9 23:03:53 2018 +0800 xen: xen-pciback: Replace GFP_ATOMIC with GFP_KERNEL in pcistub_init_device pcistub_init_device() is never called in atomic context. The call chain ending up at pcistub_init_device() is: [1] pcistub_init_device() <- pcistub_seize() <- pcistub_probe() [2] pcistub_init_device() <- pcistub_init_devices_late() <- xen_pcibk_init() pcistub_probe() is only set as ".probe" in struct pci_driver. xen_pcibk_init() is is only set as a parameter of module_init(). These functions are not called in atomic context. Despite never getting called from atomic context, pcistub_init_device() calls kzalloc() with GFP_ATOMIC, which does not sleep for allocation. GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL, which can sleep and improve the possibility of sucessful allocation. This is found by a static analysis tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/xen/xen-pciback/pci_stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc5cd5079699c7831fdc58e74352736706c3df3c Author: Jia-Ju Bai Date: Mon Apr 9 23:03:36 2018 +0800 xen: xen-pciback: Replace GFP_ATOMIC with GFP_KERNEL in pcistub_probe pcistub_probe() is never called in atomic context. This function is only set as ".probe" in struct pci_driver. Despite never getting called from atomic context, pcistub_probe() calls kmalloc() with GFP_ATOMIC, which does not sleep for allocation. GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL, which can sleep and improve the possibility of sucessful allocation. This is found by a static analysis tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/xen/xen-pciback/pci_stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e8fe39989720b87439fee7817a5ca362b16d931 Author: Thor Thayer Date: Mon Mar 26 14:50:00 2018 -0500 ARM: socfpga_defconfig: Remove QSPI Sector 4K size force Remove QSPI Sector 4K size force which is causing QSPI boot problems with the JFFS2 root filesystem. Fixes the following error: "Magic bitmask 0x1985 not found at ..." Cc: stable@vger.kernel.org Signed-off-by: Thor Thayer Signed-off-by: Dinh Nguyen arch/arm/configs/socfpga_defconfig | 1 + 1 file changed, 1 insertion(+) commit 982e05001c472066ab288e4269ad6cab48889f0d Author: Maxime Chevallier Date: Mon Apr 16 10:07:23 2018 +0200 net: mvpp2: Fix TCAM filter reserved range Marvell's PPv2 controller has a Packet Header parser, which uses a fixed-size TCAM array of filter entries. The mvpp2 driver reserves some ranges among the 256 TCAM entries to perform MAC and VID filtering. The rest of the TCAM ids are freely usable for other features, such as IPv4 proto matching. This commit fixes the MVPP2_PE_LAST_FREE_TID define that sets the end of the "free range", which included the MAC range. This could therefore allow some other features to use entries dedicated to MAC filtering, lowering the number of unicast/multicast addresses that could be allowed before switching to promiscuous mode. Fixes: 10fea26ce2aa ("net: mvpp2: Add support for unicast filtering") Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd28899dd34f9283c567f7eeb31bb546f10820b5 Author: Dan Carpenter Date: Mon Apr 16 13:17:50 2018 +0300 Revert "macsec: missing dev_put() on error in macsec_newlink()" This patch is just wrong, sorry. I was trying to fix a static checker warning and misread the code. The reference taken in macsec_newlink() is released in macsec_free_netdev() when the netdevice is destroyed. This reverts commit 5dcd8400884cc4a043a6d4617e042489e5d566a9. Reported-by: Laura Abbott Fixes: 5dcd8400884c ("macsec: missing dev_put() on error in macsec_newlink()") Signed-off-by: Dan Carpenter Acked-by: Sabrina Dubroca Signed-off-by: David S. Miller drivers/net/macsec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit af52f9982e410edac21ca4b49563053ffc9da1eb Author: David Wang Date: Mon Apr 16 17:48:09 2018 +0800 ALSA: hda - New VIA controller suppor no-snoop path This patch is used to tell kernel that new VIA HDAC controller also support no-snoop path. [ minor coding style fix by tiwai ] Signed-off-by: David Wang Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fc31c4e347c9dad50544d01d5ee98b22c7df88bb Author: Evan Wang Date: Fri Apr 6 16:55:34 2018 +0200 PCI: aardvark: Fix PCIe Max Read Request Size setting There is an obvious typo issue in the definition of the PCIe maximum read request size: a bit shift is directly used as a value, while it should be used to shift the correct value. Fixes: 8c39d710363c1 ("PCI: aardvark: Add Aardvark PCI host controller driver") Cc: Signed-off-by: Evan Wang Reviewed-by: Victor Gu Reviewed-by: Nadav Haklai [Thomas: tweak commit log.] Signed-off-by: Thomas Petazzoni Signed-off-by: Lorenzo Pieralisi drivers/pci/host/pci-aardvark.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3430f924a62905891c8fa9a3b97ea52007795bc3 Author: Victor Gu Date: Fri Apr 6 16:55:33 2018 +0200 PCI: aardvark: Use ISR1 instead of ISR0 interrupt in legacy irq mode The Aardvark has two interrupts sets: - first set is bit[23:16] of PCIe ISR 0 register(RD0074840h) - second set is bit[11:8] of PCIe ISR 1 register(RD0074848h) Only one set should be used, while another set should be masked. The second set, ISR1, is more advanced, the Legacy INT_X status bit is asserted once Assert_INTX message is received, and de-asserted after Deassert_INTX message is received which matches what the driver is currently doing in the ->irq_mask() and ->irq_unmask() functions. The ISR0 requires additional work to deassert the interrupt, which the driver does not currently implement, therefore it needs fixing. Update the driver to use ISR1 register set, fixing current implementation. Fixes: 8c39d710363c1 ("PCI: aardvark: Add Aardvark PCI host controller driver") Link: https://bugzilla.kernel.org/show_bug.cgi?id=196339 Signed-off-by: Victor Gu [Thomas: tweak commit log.] Signed-off-by: Thomas Petazzoni [lorenzo.pieralisi@arm.com: updated the commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Evan Wang Reviewed-by: Nadav Haklai Cc: drivers/pci/host/pci-aardvark.c | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) commit 4fa3999ee672c54a5498ce98e20fe3fdf9c1cbb4 Author: Victor Gu Date: Fri Apr 6 16:55:32 2018 +0200 PCI: aardvark: Set PIO_ADDR_LS correctly in advk_pcie_rd_conf() When setting the PIO_ADDR_LS register during a configuration read, we were properly passing the device number, function number and register number, but not the bus number, causing issues when reading the configuration of PCIe devices. Fixes: 8c39d710363c1 ("PCI: aardvark: Add Aardvark PCI host controller driver") Cc: Signed-off-by: Victor Gu Reviewed-by: Wilson Ding Reviewed-by: Nadav Haklai [Thomas: tweak commit log.] Signed-off-by: Thomas Petazzoni Signed-off-by: Lorenzo Pieralisi drivers/pci/host/pci-aardvark.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 660661afcd40ed7f515ef3369721ed58e80c0fc5 Author: Victor Gu Date: Fri Apr 6 16:55:31 2018 +0200 PCI: aardvark: Fix logic in advk_pcie_{rd,wr}_conf() The PCI configuration space read/write functions were special casing the situation where PCI_SLOT(devfn) != 0, and returned PCIBIOS_DEVICE_NOT_FOUND in this case. However, while this is what is intended for the root bus, it is not intended for the child busses, as it prevents discovering devices with PCI_SLOT(x) != 0. Therefore, we return PCIBIOS_DEVICE_NOT_FOUND only if we're on the root bus. Fixes: 8c39d710363c1 ("PCI: aardvark: Add Aardvark PCI host controller driver") Cc: Signed-off-by: Victor Gu Reviewed-by: Wilson Ding Reviewed-by: Nadav Haklai [Thomas: tweak commit log.] Signed-off-by: Thomas Petazzoni Signed-off-by: Lorenzo Pieralisi drivers/pci/host/pci-aardvark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c2bf522ed8cbfaac666f7dc65cfd38de2b89f0f Author: Matt Redfearn Date: Fri Apr 13 09:50:44 2018 +0100 MIPS: dts: Boston: Fix PCI bus dtc warnings: dtc recently (v1.4.4-8-g756ffc4f52f6) added PCI bus checks. Fix the warnings now emitted: arch/mips/boot/dts/img/boston.dtb: Warning (pci_bridge): /pci@10000000: missing bus-range for PCI bridge arch/mips/boot/dts/img/boston.dtb: Warning (pci_bridge): /pci@12000000: missing bus-range for PCI bridge arch/mips/boot/dts/img/boston.dtb: Warning (pci_bridge): /pci@14000000: missing bus-range for PCI bridge Signed-off-by: Matt Redfearn Cc: Ralf Baechle Cc: Paul Burton Cc: Rob Herring Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/19070/ Signed-off-by: James Hogan arch/mips/boot/dts/img/boston.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit edf5c17d866eada03b8750368a12dc3def77d608 Author: Greg Kroah-Hartman Date: Thu Apr 5 16:15:55 2018 +0200 staging: irda: remove remaining remants of irda code removal There were some documentation locations that irda was mentioned, as well as an old MAINTAINERS entry and the networking sysctl entries. Clean these all out as this stuff really is finally gone. Reported-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman Documentation/ioctl/ioctl-number.txt | 2 -- Documentation/networking/ip-sysctl.txt | 15 --------------- Documentation/process/magic-number.rst | 3 --- MAINTAINERS | 10 ---------- include/uapi/linux/sysctl.h | 18 ------------------ kernel/sysctl_binary.c | 20 +------------------- 6 files changed, 1 insertion(+), 67 deletions(-) commit 470b5d6f0cf4674be2d1ec94e54283a1770b6a1a Author: Vasyl Vavrychuk Date: Wed Apr 11 17:05:13 2018 +0300 USB: serial: ftdi_sio: use jtag quirk for Arrow USB Blaster Arrow USB Blaster integrated on MAX1000 board uses the same vendor ID (0x0403) and product ID (0x6010) as the "original" FTDI device. This patch avoids picking up by ftdi_sio of the first interface of this USB device. After that this device can be used by Arrow user-space JTAG driver. Signed-off-by: Vasyl Vavrychuk Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1e23aace21515a8f7615a1de016c0ea8d4e0cc6e Author: Kyle Roeschley Date: Mon Apr 9 10:23:55 2018 -0500 USB: serial: cp210x: add ID for NI USB serial console Added the USB VID and PID for the USB serial console on some National Instruments devices. Signed-off-by: Kyle Roeschley Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) commit d27a3c3436a7f68f3affd7991cb4a68e91dd747e Author: Colin Ian King Date: Wed Mar 21 18:01:58 2018 +0000 firmware: arm_scmi: remove redundant null check on array The null check on clk->name is redundant since name is a char array and can never be null, so the check is always true. Remove it. Detected by CoverityScan, CID#1466117 ("Array compared against 0") Signed-off-by: Colin Ian King Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c326599b29f0dac8d73147309ffd31cce2cfdc05 Author: Sudeep Holla Date: Mon Apr 9 11:24:03 2018 +0100 arm64: dts: juno: drop unnecessary address-cells and size-cells properties /smb@8000000/motherboard/gpio_keys node doesn't have "ranges" or "reg" property in child nodes. So it's unnecessary to have address-cells as well as size-cells properties which results in below warning. Warning (avoid_unnecessary_addr_size): /smb@8000000/motherboard/gpio_keys: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property This patch drops the unnecessary address+size-cell properties. Cc: Lorenzo Pieralisi Reviewed-by: Liviu Dudau Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-motherboard.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 49d23a851d62c03daebae2d245dcc9b07dbfa89f Author: Heiko Carstens Date: Thu Apr 12 11:01:07 2018 +0200 s390: rename default_defconfig to debug_defconfig The name debug_defconfig reflects what the config is actually good for and should be less confusing. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/configs/debug_defconfig | 731 ++++++++++++++++++++++++++++++++++++ arch/s390/configs/default_defconfig | 731 ------------------------------------ 2 files changed, 731 insertions(+), 731 deletions(-) commit cd7cf57f18be4196306997d4325b8ebf895ab318 Author: Heiko Carstens Date: Thu Apr 12 11:00:31 2018 +0200 s390: remove gcov defconfig This config is not needed anymore. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/configs/gcov_defconfig | 661 --------------------------------------- 1 file changed, 661 deletions(-) commit de2011197d15746307e709687401397fe52bea83 Author: Martin Schwidefsky Date: Mon Nov 20 08:48:02 2017 +0100 s390: update defconfig Signed-off-by: Martin Schwidefsky arch/s390/configs/default_defconfig | 31 ++++++++++++++++++++----------- arch/s390/configs/performance_defconfig | 20 +++++++++++++++----- arch/s390/defconfig | 13 +++++++++++-- 3 files changed, 46 insertions(+), 18 deletions(-) commit 49d4d277ca54e04170d39484c8758a0ea9bca37d Author: Eddie James Date: Tue Mar 27 15:09:27 2018 -0500 aspeed: watchdog: Set bootstatus during probe Check the aspeed timeout status register to see if the system has booted from the secondary boot source. If so, set the watchdog device bootstatus flag for "Card previously reset the CPU." Signed-off-by: Eddie James Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/aspeed_wdt.c | 7 +++++++ 1 file changed, 7 insertions(+) commit fdac6a90d2d151abdbb7e5ec14bb9ab64e2931ec Author: Veeraiyan Chidambaram Date: Fri Apr 13 16:19:24 2018 +0200 watchdog: renesas-wdt: Add support for WDIOF_CARDRESET This patch adds the WDIOF_CARDRESET support for the Renesas platform watchdog, to know if the board reboot is due to a watchdog reset. This is done via the WOVF bit (bit 4) of the RWTCSRA register, which indicates if RWTCNT overflowed, triggering the reset in last boot. Signed-off-by: Veeraiyan Chidambaram [takeshi.kihara.df: changed to read the RWTCSRA register while clock is enabled] Signed-off-by: Takeshi Kihara Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck Reviewed-by: Vladimir Zapolskiy Reviewed-by: Geert Uytterhoeven Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/renesas_wdt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e30d69df78fb2667dc58e906cabd0f70ed0af95d Author: Gustavo A. R. Silva Date: Tue Mar 27 14:33:49 2018 -0500 watchdog: wafer5823wdt: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced "Fall" with a proper "Fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/wafer5823wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ff0751fa04208459b74cfbe492df79468b8425c Author: Gustavo A. R. Silva Date: Tue Mar 27 14:30:41 2018 -0500 watchdog: w83977f_wdt: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced "Fall" with a proper "Fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/w83977f_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a03cc689e5c9d89d500f4a4dae1a81ea512dbb25 Author: Gustavo A. R. Silva Date: Tue Mar 27 14:25:40 2018 -0500 watchdog: sch311x_wdt: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced "Fall" with a proper "Fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sch311x_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f20407a2415181ce3af06fc84a86280a2708dd4 Author: Jerry Hoemann Date: Mon Oct 9 12:56:56 2017 -0600 watchdog: hpwdt: change maintainer. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Acked-by: Jimmy Vance Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06856938112b84ff3c6b0594d017f59cfda2a43d Author: Souptick Joarder Date: Sun Apr 15 01:03:42 2018 +0530 fs: ext2: Adding new return type vm_fault_t Use new return type vm_fault_t for page_mkwrite, pfn_mkwrite and fault handler. Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox Signed-off-by: Jan Kara fs/ext2/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4f34a5130a471f32f2fe7750769ab4057dc3eaa0 Author: Chengguang Xu Date: Sat Apr 14 20:16:06 2018 +0800 isofs: fix potential memory leak in mount option parsing When specifying string type mount option (e.g., iocharset) several times in a mount, current option parsing may cause memory leak. Hence, call kfree for previous one in this case. Meanwhile, check memory allocation result for it. Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara fs/isofs/inode.c | 3 +++ 1 file changed, 3 insertions(+) commit d93605407af34eb0b7eb8aff6b1eae2cde3cdd22 Author: Ilya Dryomov Date: Fri Mar 23 06:14:47 2018 +0100 rbd: notrim map option Add an option to turn off discard and write zeroes offload support to avoid deprovisioning a fully provisioned image. When enabled, discard requests will fail with -EOPNOTSUPP, write zeroes requests will fall back to manually zeroing. Signed-off-by: Ilya Dryomov Tested-by: Hitoshi Kamei drivers/block/rbd.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 420efbdf4d2358dc12913298ad44d041c6ac0ed6 Author: Ilya Dryomov Date: Mon Apr 16 09:32:18 2018 +0200 rbd: adjust queue limits for "fancy" striping In order to take full advantage of merging in ceph_file_to_extents(), allow object set sized I/Os. If the layout is not "fancy", an object set consists of just one object. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit c6244b3b23771b258656445dcd212be759265b84 Author: Arnd Bergmann Date: Wed Apr 4 14:53:39 2018 +0200 rbd: avoid Wreturn-type warnings In some configurations gcc cannot see that rbd_assert(0) leads to an unreachable code path: drivers/block/rbd.c: In function 'rbd_img_is_write': drivers/block/rbd.c:1397:1: error: control reaches end of non-void function [-Werror=return-type] drivers/block/rbd.c: In function '__rbd_obj_handle_request': drivers/block/rbd.c:2499:1: error: control reaches end of non-void function [-Werror=return-type] drivers/block/rbd.c: In function 'rbd_obj_handle_write': drivers/block/rbd.c:2471:1: error: control reaches end of non-void function [-Werror=return-type] As the rbd_assert() here shows has no extra information beyond the verbose BUG(), we can simply use BUG() directly in its place. This is reliably detected as not returning on any architecture, since it doesn't depend on the unlikely() comparison that confused gcc. Fixes: 3da691bf4366 ("rbd: new request handling code") Signed-off-by: Arnd Bergmann Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ffdeec7aa41aa61ca4ee68fddf4669df9ce661d1 Author: Yan, Zheng Date: Mon Mar 26 16:46:39 2018 +0800 ceph: always update atime/mtime/ctime for new inode For new inode, atime/mtime/ctime are uninitialized. Don't compare against them. Cc: stable@kernel.org Signed-off-by: "Yan, Zheng" Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 34f55d0b3a0a39c95134c0c89173893b846d4c80 Author: Dongsheng Yang Date: Mon Mar 26 10:22:55 2018 -0400 rbd: support timeout in rbd_wait_state_locked() currently, the rbd_wait_state_locked() will wait forever if we can't get our state locked. Example: rbd map --exclusive test1 --> /dev/rbd0 rbd map test1 --> /dev/rbd1 dd if=/dev/zero of=/dev/rbd1 bs=1M count=1 --> IO blocked To avoid this problem, this patch introduce a timeout design in rbd_wait_state_locked(). Then rbd_wait_state_locked() will return error when we reach a timeout. This patch allow user to set the lock_timeout in rbd mapping. Signed-off-by: Dongsheng Yang Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 2f18d46683cb3047c41229d57cf7c6e2ee48676f Author: Ilya Dryomov Date: Wed Apr 4 10:15:38 2018 +0200 rbd: refactor rbd_wait_state_locked() In preparation for lock_timeout option, make rbd_wait_state_locked() return error codes. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) commit fe710508b6ba9d28730f3021fed70e7043433b2e Author: Collin May Date: Sat Apr 7 14:32:48 2018 -0700 USB: serial: simple: add libtransistor console Add simple driver for libtransistor USB console. This device is implemented in software: https://github.com/reswitched/libtransistor/blob/development/lib/usb_serial.c Signed-off-by: Collin May Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/Kconfig | 1 + drivers/usb/serial/usb-serial-simple.c | 7 +++++++ 2 files changed, 8 insertions(+) commit 451239eb3d397bd197a79cc3aab943da41ba0905 Author: Heiko Carstens Date: Fri Apr 13 14:04:24 2018 +0200 s390: add support for IBM z14 Model ZR1 Just add the new machine type number to the two places that matter. Cc: # v4.14+ Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 8 ++++---- arch/s390/kernel/perf_cpum_cf_events.c | 1 + arch/s390/kernel/setup.c | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) commit f43c426a581f04272a852f0486ae431acff6d87e Author: Vasily Gorbik Date: Fri Apr 13 10:57:27 2018 +0200 s390: remove couple of duplicate includes Removing couple of duplicate includes, found by "make includecheck". That leaves 1 duplicate include in arch/s390/kernel/entry.S, which is there for a reason (it includes generated asm/syscall_table.h twice). Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_diag.c | 1 - drivers/s390/net/qeth_l2_main.c | 1 - 2 files changed, 2 deletions(-) commit c65bbb51c6e98a1956c08faab81941ec558ef0ba Author: Vasily Gorbik Date: Wed Apr 11 10:24:29 2018 +0200 s390/boot: remove unused COMPILE_VERSION and ccflags-y ccflags-y has no effect (no code is built in that directory, arch/s390/boot/compressed/Makefile defines its own KBUILD_CFLAGS). Removing ccflags-y together with COMPILE_VERSION. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/boot/Makefile | 6 ------ 1 file changed, 6 deletions(-) commit 232acdff21fb02f0ccd538cd29c9ee7e028b6101 Author: Sebastian Ott Date: Tue Apr 10 12:39:34 2018 +0200 s390/nospec: include cpu.h Fix the following sparse warnings: symbol 'cpu_show_spectre_v1' was not declared. Should it be static? symbol 'cpu_show_spectre_v2' was not declared. Should it be static? Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/kernel/nospec-branch.c | 1 + 1 file changed, 1 insertion(+) commit 701e188c6560d6abeba508f530c4224b4e830fb5 Author: Thomas Richter Date: Thu Apr 12 08:42:48 2018 +0100 s390/decompressor: Ignore file vmlinux.bin.full Commit 81796a3c6a4a ("s390/decompressor: trim uncompressed image head during the build") introduced a new file named vmlinux.bin.full in directory arch/s390/boot/compressed. Add this file to the list of ignored files so it does not show up on git status. Signed-off-by: Thomas Richter Signed-off-by: Martin Schwidefsky arch/s390/boot/compressed/.gitignore | 1 + 1 file changed, 1 insertion(+) commit de66b2429100c85b72db5c409526351d3ffc5faa Author: Heiko Carstens Date: Thu Apr 12 13:45:52 2018 +0200 s390/kexec_file: add generated files to .gitignore Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/purgatory/.gitignore | 2 ++ 1 file changed, 2 insertions(+) commit bdea9f6f7a707301878573a5c35e39e4fe817378 Author: Philipp Rudo Date: Tue Mar 27 13:14:12 2018 +0200 s390/Kconfig: Move kexec config options to "Processor type and features" The config options for kexec are currently not under any menu directory. Up until now this was not a problem as standard kexec is always compiled in and thus does not create a menu entry. This changed when kexec_file_load was enabled. Its config option requires a menu entry which, when added beneath standard kexec option, appears on the main directory above "General Setup". Thus move the whole block further down such that the entry in now in "Processor type and features". While at it also update the help text for kexec file. Signed-off-by: Philipp Rudo Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) commit 8be018827154666d1fe5904cb7a43b6706e01c87 Author: Philipp Rudo Date: Mon Sep 11 15:15:29 2017 +0200 s390/kexec_file: Add ELF loader Add an ELF loader for kexec_file. The main task here is to do proper sanity checks on the ELF file. Basically all other functionality was already implemented for the image loader. Signed-off-by: Philipp Rudo Signed-off-by: Martin Schwidefsky arch/s390/include/asm/kexec.h | 1 + arch/s390/kernel/Makefile | 1 + arch/s390/kernel/kexec_elf.c | 147 ++++++++++++++++++++++++++++++++++ arch/s390/kernel/machine_kexec_file.c | 1 + 4 files changed, 150 insertions(+) commit ee337f5469fd67f22d231e520ec4189ce0589d92 Author: Philipp Rudo Date: Tue Sep 5 11:55:23 2017 +0200 s390/kexec_file: Add crash support to image loader Add support to load a crash kernel to the image loader. This requires extending the purgatory. Signed-off-by: Philipp Rudo Reviewed-by: Martin Schwidefsky Signed-off-by: Martin Schwidefsky arch/s390/kernel/kexec_image.c | 6 +- arch/s390/kernel/machine_kexec_file.c | 45 ++++++++- arch/s390/purgatory/head.S | 185 +++++++++++++++++++++++++++++++++- arch/s390/purgatory/purgatory.c | 4 + 4 files changed, 234 insertions(+), 6 deletions(-) commit e49bb0a27fa3c6ec45cc13e2102a6ec13c4ae697 Author: Philipp Rudo Date: Wed Aug 30 14:03:38 2017 +0200 s390/kexec_file: Add image loader Add an image loader for kexec_file_load. For simplicity first skip crash support. The functions defined in machine_kexec_file will later be shared with the ELF loader. Signed-off-by: Philipp Rudo Reviewed-by: Martin Schwidefsky Signed-off-by: Martin Schwidefsky arch/s390/include/asm/kexec.h | 22 ++++++++++ arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/kexec_image.c | 78 +++++++++++++++++++++++++++++++++++ arch/s390/kernel/machine_kexec_file.c | 75 +++++++++++++++++++++++++++++++++ 4 files changed, 176 insertions(+), 1 deletion(-) commit 71406883fd35794d573b3085433c41d0a3bf6c21 Author: Philipp Rudo Date: Mon Jun 19 10:45:33 2017 +0200 s390/kexec_file: Add kexec_file_load system call This patch adds the kexec_file_load system call to s390 as well as the arch specific functions common code requires to work. Loaders for the different file types will be added later. Signed-off-by: Philipp Rudo Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 13 ++++ arch/s390/configs/default_defconfig | 1 + arch/s390/kernel/Makefile | 2 + arch/s390/kernel/compat_wrapper.c | 1 + arch/s390/kernel/machine_kexec_file.c | 126 ++++++++++++++++++++++++++++++++++ arch/s390/kernel/syscalls/syscall.tbl | 1 + 6 files changed, 144 insertions(+) commit 840798a1f52994c172270893bd2ec6013cc92e40 Author: Philipp Rudo Date: Mon Aug 28 15:32:36 2017 +0200 s390/kexec_file: Add purgatory The common code expects the architecture to have a purgatory that runs between the two kernels. Add it now. For simplicity first skip crash support. Signed-off-by: Philipp Rudo Signed-off-by: Martin Schwidefsky arch/s390/Kbuild | 1 + arch/s390/Kconfig | 4 ++ arch/s390/include/asm/purgatory.h | 17 +++++++ arch/s390/kernel/asm-offsets.c | 5 ++ arch/s390/purgatory/Makefile | 37 +++++++++++++++ arch/s390/purgatory/head.S | 96 +++++++++++++++++++++++++++++++++++++++ arch/s390/purgatory/purgatory.c | 38 ++++++++++++++++ 7 files changed, 198 insertions(+) commit 15ceb8c936d13d940ca9e53996fbd05a26ce96db Author: Philipp Rudo Date: Tue Jun 27 12:44:11 2017 +0200 s390/kexec_file: Prepare setup.h for kexec_file_load kexec_file_load needs to prepare the new kernels before they are loaded. For that it has to know the offsets in head.S, e.g. to register the new command line. Unfortunately there are no macros right now defining those offsets. Define them now. Signed-off-by: Philipp Rudo Signed-off-by: Martin Schwidefsky arch/s390/include/asm/setup.h | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) commit 760dd0eeaec1689430243ead14e5a429613d8c52 Author: Martin Schwidefsky Date: Tue Apr 3 11:08:52 2018 +0200 s390/smsgiucv: disable SMSG on module unload The module exit function of the smsgiucv module uses the incorrect CP command to disable SMSG messages. The correct command is "SET SMSG OFF". Use it. Signed-off-by: Martin Schwidefsky drivers/s390/net/smsgiucv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dccccd332d028f57358a8b64ca88e691fc8be5b7 Author: Vasily Gorbik Date: Fri Apr 13 18:22:14 2018 +0200 s390/sclp: avoid potential usage of uninitialized value sclp_early_printk could be used before .bss section is zeroed (i.e. from als.c during the decompressor phase), therefore values used by sclp_early_printk should be located in the .data section. Another reason for that is to avoid potential initrd corruption, if some code in future would use sclp_early_printk before initrd is moved from possibly overlapping with .bss section region to a safe location. Fixes: 0b0d1173d8ae ("s390/sclp: 32 bit event mask compatibility mode") Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/char/sclp_early_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aacd188a2deea4e0886e43641cdae6b47b540b7f Merge: 60cc43f b0d5c81 Author: Ingo Molnar Date: Mon Apr 16 08:14:00 2018 +0200 Merge tag 'perf-core-for-mingo-4.17-20180413' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull tooling improvements and fixes from Arnaldo Carvalho de Melo: perf annotate fixes and improvements: - Allow showing offsets in more than just jump targets, use the new 'O' hotkey in the TUI, config ~/.perfconfig annotate.offset_level for it and for --stdio2 (Arnaldo Carvalho de Melo) - Use the resolved variable names from objdump disassembled lines to make them more compact, just like was already done for some instructions, like "mov", this eventually will be done more generally, but lets now add some more to the existing mechanism (Arnaldo Carvalho de Melo) perf record fixes: - Change warning for missing topology sysfs entry to debug, as not all architectures have those files, s390 being one of those (Thomas Richter) perf sched fixes: - Fix -g/--call-graph documentation (Takuya Yamamoto) perf stat: - Enable 1ms interval for printing event counters values in (Alexey Budankov) perf test fixes: - Run dwarf unwind on arm32 (Kim Phillips) - Remove unused ptrace.h include from LLVM test, sidesteping older clang's lack of support for some asm constructs (Arnaldo Carvalho de Melo) perf version fixes: - Do not print info about HAVE_LIBAUDIT_SUPPORT in 'perf version --build-options' when HAVE_SYSCALL_TABLE_SUPPORT is true, as libaudit won't be used in that case, print info about syscall_table support instead (Jin Yao) Build system fixes: - Use HAVE_..._SUPPORT used consistently (Jin Yao) - Restore READ_ONCE() C++ compatibility in tools/include (Mark Rutland) - Give hints about package names needed to build jvmti (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo commit 8e04944f0ea8b838399049bdcda920ab36ae3b04 Author: Tetsuo Handa Date: Wed Apr 4 19:53:07 2018 +0900 mm,vmscan: Allow preallocating memory for register_shrinker(). syzbot is catching so many bugs triggered by commit 9ee332d99e4d5a97 ("sget(): handle failures of register_shrinker()"). That commit expected that calling kill_sb() from deactivate_locked_super() without successful fill_super() is safe, but the reality was different; some callers assign attributes which are needed for kill_sb() after sget() succeeds. For example, [1] is a report where sb->s_mode (which seems to be either FMODE_READ | FMODE_EXCL | FMODE_WRITE or FMODE_READ | FMODE_EXCL) is not assigned unless sget() succeeds. But it does not worth complicate sget() so that register_shrinker() failure path can safely call kill_block_super() via kill_sb(). Making alloc_super() fail if memory allocation for register_shrinker() failed is much simpler. Let's avoid calling deactivate_locked_super() from sget_userns() by preallocating memory for the shrinker and making register_shrinker() in sget_userns() never fail. [1] https://syzkaller.appspot.com/bug?id=588996a25a2587be2e3a54e8646728fb9cae44e7 Signed-off-by: Tetsuo Handa Reported-by: syzbot Cc: Al Viro Cc: Michal Hocko Signed-off-by: Al Viro fs/super.c | 9 ++++----- include/linux/shrinker.h | 7 +++++-- mm/vmscan.c | 21 ++++++++++++++++++++- 3 files changed, 29 insertions(+), 8 deletions(-) commit b48c05ab5d32af2af4bc63851c153782d1c6ba42 Author: Steffen Klassert Date: Mon Apr 16 07:50:09 2018 +0200 xfrm: Fix warning in xfrm6_tunnel_net_exit. We need to make sure that all states are really deleted before we check that the state lists are empty. Otherwise we trigger a warning. Fixes: baeb0dbbb5659 ("xfrm6_tunnel: exit_net cleanup check added") Reported-and-tested-by:syzbot+777bf170a89e7b326405@syzkaller.appspotmail.com Signed-off-by: Steffen Klassert include/net/xfrm.h | 1 + net/ipv6/xfrm6_tunnel.c | 3 +++ net/xfrm/xfrm_state.c | 6 ++++++ 3 files changed, 10 insertions(+) commit 4a3877c4cedd95543f8726b0a98743ed8db0c0fb Author: Al Viro Date: Tue Apr 3 01:15:46 2018 -0400 rpc_pipefs: fix double-dput() if we ever hit rpc_gssd_dummy_depopulate() dentry passed to it has refcount equal to 1. __rpc_rmpipe() drops it and dput() done after that hits an already freed dentry. Cc: stable@kernel.org Signed-off-by: Al Viro net/sunrpc/rpc_pipe.c | 1 + 1 file changed, 1 insertion(+) commit 659038428cb43a66e3eff71e2c845c9de3611a98 Author: Al Viro Date: Tue Apr 3 00:13:17 2018 -0400 orangefs_kill_sb(): deal with allocation failures orangefs_fill_sb() might've failed to allocate ORANGEFS_SB(s); don't oops in that case. Cc: stable@kernel.org Signed-off-by: Al Viro fs/orangefs/super.c | 5 +++++ 1 file changed, 5 insertions(+) commit c66b23c2840446a82c389e4cb1a12eb2a71fa2e4 Author: Al Viro Date: Mon Apr 2 23:56:44 2018 -0400 jffs2_kill_sb(): deal with failed allocations jffs2_fill_super() might fail to allocate jffs2_sb_info; jffs2_kill_sb() must survive that. Cc: stable@kernel.org Signed-off-by: Al Viro fs/jffs2/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a24cd490739586a7d2da3549a1844e1d7c4f4fc4 Author: Al Viro Date: Mon Apr 2 23:50:31 2018 -0400 hypfs_kill_super(): deal with failed allocations hypfs_fill_super() might fail to allocate sbi; hypfs_kill_super() should not oops on that. Cc: stable@vger.kernel.org Signed-off-by: Al Viro arch/s390/hypfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60cc43fc888428bb2f18f08997432d426a243338 Author: Linus Torvalds Date: Sun Apr 15 18:24:20 2018 -0700 Linux 4.17-rc1 Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e37563bb6c59a6948aa09beb77ba263600d19792 Merge: 09c9b0e 5d41be6 Author: Linus Torvalds Date: Sun Apr 15 18:08:35 2018 -0700 Merge tag 'for-4.17-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull more btrfs updates from David Sterba: "We have queued a few more fixes (error handling, log replay, softlockup) and the rest is SPDX updates that touche almost all files so the diffstat is long" * tag 'for-4.17-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: Only check first key for committed tree blocks btrfs: add SPDX header to Kconfig btrfs: replace GPL boilerplate by SPDX -- sources btrfs: replace GPL boilerplate by SPDX -- headers Btrfs: fix loss of prealloc extents past i_size after fsync log replay Btrfs: clean up resources during umount after trans is aborted btrfs: Fix possible softlock on single core machines Btrfs: bail out on error during replay_dir_deletes Btrfs: fix NULL pointer dereference in log_dir_items commit 09c9b0eaa0773264b795c9e1bbb2c9816732573f Merge: f0d98d8 c1596ff Author: Linus Torvalds Date: Sun Apr 15 18:06:22 2018 -0700 Merge tag '4.17-rc1SMB3-Fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "SMB3 fixes, a few for stable, and some important cleanup work from Ronnie of the smb3 transport code" * tag '4.17-rc1SMB3-Fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: change validate_buf to validate_iov cifs: remove rfc1002 hardcoded constants from cifs_discard_remaining_data() cifs: Change SMB2_open to return an iov for the error parameter cifs: add resp_buf_size to the mid_q_entry structure smb3.11: replace a 4 with server->vals->header_preamble_size cifs: replace a 4 with server->vals->header_preamble_size cifs: add pdu_size to the TCP_Server_Info structure SMB311: Improve checking of negotiate security contexts SMB3: Fix length checking of SMB3.11 negotiate request CIFS: add ONCE flag for cifs_dbg type cifs: Use ULL suffix for 64-bit constant SMB3: Log at least once if tree connect fails during reconnect cifs: smb2pdu: Fix potential NULL pointer dereference commit c246fd333f84e6a0a8572f991637aa102f5e1865 Author: Wang Sheng-Hui Date: Sun Apr 15 16:07:12 2018 +0800 filter.txt: update 'tools/net/' to 'tools/bpf/' The tools are located at tootls/bpf/ instead of tools/net/. Update the filter.txt doc. Signed-off-by: Wang Sheng-Hui Signed-off-by: David S. Miller Documentation/networking/filter.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f0d98d85831bf1a3b1f56f8c14af60797aaca536 Merge: ca71b3b 4d42680 Author: Linus Torvalds Date: Sun Apr 15 17:24:12 2018 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is a set of minor (and safe changes) that didn't make the initial pull request plus some bug fixes. The status handling code is actually a running regression from the previous merge window which had an incomplete fix (now reverted) and most of the remaining bug fixes are for problems older than the current merge window" [ Side note: this merge also takes the base kernel git repository to 6+ million objects for the first time. Technically we hit it a couple of merges ago already if you count all the tag objects, but now it reaches 6M+ objects reachable from HEAD. I was joking around that that's when I should switch to 5.0, because 3.0 happened at the 2M mark, and 4.0 happened at 4M objects. But probably not, even if numerology is about as good a reason as any. - Linus ] * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: devinfo: Add Microsoft iSCSI target to 1024 sector blacklist scsi: cxgb4i: silence overflow warning in t4_uld_rx_handler() scsi: dpt_i2o: Use after free in I2ORESETCMD ioctl scsi: core: Make scsi_result_to_blk_status() recognize CONDITION MET scsi: core: Rename __scsi_error_from_host_byte() into scsi_result_to_blk_status() Revert "scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()" scsi: aacraid: Insure command thread is not recursively stopped scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION scsi: qla2xxx: correctly shift host byte scsi: qla2xxx: Fix race condition between iocb timeout and initialisation scsi: qla2xxx: Avoid double completion of abort command scsi: qla2xxx: Fix small memory leak in qla2x00_probe_one on probe failure scsi: scsi_dh: Don't look for NULL devices handlers by name scsi: core: remove redundant assignment to shost->use_blk_mq commit ca71b3ba4c78c2c05b44be9b257a4127223f0b0c Merge: 9fb71c2 17baab6 Author: Linus Torvalds Date: Sun Apr 15 17:21:30 2018 -0700 Merge tag 'kbuild-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull more Kbuild updates from Masahiro Yamada: - pass HOSTLDFLAGS when compiling single .c host programs - build genksyms lexer and parser files instead of using shipped versions - rename *-asn1.[ch] to *.asn1.[ch] for suffix consistency - let the top .gitignore globally ignore artifacts generated by flex, bison, and asn1_compiler - let the top Makefile globally clean artifacts generated by flex, bison, and asn1_compiler - use safer .SECONDARY marker instead of .PRECIOUS to prevent intermediate files from being removed - support -fmacro-prefix-map option to make __FILE__ a relative path - fix # escaping to prepare for the future GNU Make release - clean up deb-pkg by using debian tools instead of handrolled source/changes generation - improve rpm-pkg portability by supporting kernel-install as a fallback of new-kernel-pkg - extend Kconfig listnewconfig target to provide more information * tag 'kbuild-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: extend output of 'listnewconfig' kbuild: rpm-pkg: use kernel-install as a fallback for new-kernel-pkg Kbuild: fix # escaping in .cmd files for future Make kbuild: deb-pkg: split generating packaging and build kbuild: use -fmacro-prefix-map to make __FILE__ a relative path kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers kbuild: rename *-asn1.[ch] to *.asn1.[ch] kbuild: clean up *-asn1.[ch] patterns from top-level Makefile .gitignore: move *-asn1.[ch] patterns to the top-level .gitignore kbuild: add %.dtb.S and %.dtb to 'targets' automatically kbuild: add %.lex.c and %.tab.[ch] to 'targets' automatically genksyms: generate lexer and parser during build instead of shipping kbuild: clean up *.lex.c and *.tab.[ch] patterns from top-level Makefile .gitignore: move *.lex.c *.tab.[ch] patterns to the top-level .gitignore kbuild: use HOSTLDFLAGS for single .c executables commit 9fb71c2f230df44bdd237e9a4457849a3909017d Merge: 6b0a02e ef389b7 Author: Linus Torvalds Date: Sun Apr 15 16:12:35 2018 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A set of fixes and updates for x86: - Address a swiotlb regression which was caused by the recent DMA rework and made driver fail because dma_direct_supported() returned false - Fix a signedness bug in the APIC ID validation which caused invalid APIC IDs to be detected as valid thereby bloating the CPU possible space. - Fix inconsisten config dependcy/select magic for the MFD_CS5535 driver. - Fix a corruption of the physical address space bits when encryption has reduced the address space and late cpuinfo updates overwrite the reduced bit information with the original value. - Dominiks syscall rework which consolidates the architecture specific syscall functions so all syscalls can be wrapped with the same macros. This allows to switch x86/64 to struct pt_regs based syscalls. Extend the clearing of user space controlled registers in the entry patch to the lower registers" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apic: Fix signedness bug in APIC ID validity checks x86/cpu: Prevent cpuinfo_x86::x86_phys_bits adjustment corruption x86/olpc: Fix inconsistent MFD_CS5535 configuration swiotlb: Use dma_direct_supported() for swiotlb_ops syscalls/x86: Adapt syscall_wrapper.h to the new syscall stub naming convention syscalls/core, syscalls/x86: Rename struct pt_regs-based sys_*() to __x64_sys_*() syscalls/core, syscalls/x86: Clean up compat syscall stub naming convention syscalls/core, syscalls/x86: Clean up syscall stub naming convention syscalls/x86: Extend register clearing on syscall entry to lower registers syscalls/x86: Unconditionally enable 'struct pt_regs' based syscalls on x86_64 syscalls/x86: Use 'struct pt_regs' based syscall calling for IA32_EMULATION and x32 syscalls/core: Prepare CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y for compat syscalls syscalls/x86: Use 'struct pt_regs' based syscall calling convention for 64-bit syscalls syscalls/core: Introduce CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y x86/syscalls: Don't pointlessly reload the system call number x86/mm: Fix documentation of module mapping range with 4-level paging x86/cpuid: Switch to 'static const' specifier commit 6b0a02e86c293c32a50d49b33a1f04420585d40b Merge: 71b8ebb e3e2881 Author: Linus Torvalds Date: Sun Apr 15 13:35:29 2018 -0700 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 pti updates from Thomas Gleixner: "Another series of PTI related changes: - Remove the manual stack switch for user entries from the idtentry code. This debloats entry by 5k+ bytes of text. - Use the proper types for the asm/bootparam.h defines to prevent user space compile errors. - Use PAGE_GLOBAL for !PCID systems to gain back performance - Prevent setting of huge PUD/PMD entries when the entries are not leaf entries otherwise the entries to which the PUD/PMD points to and are populated get lost" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/pgtable: Don't set huge PUD/PMD on non-leaf entries x86/pti: Leave kernel text global for !PCID x86/pti: Never implicitly clear _PAGE_GLOBAL for kernel image x86/pti: Enable global pages for shared areas x86/mm: Do not forbid _PAGE_RW before init for __ro_after_init x86/mm: Comment _PAGE_GLOBAL mystery x86/mm: Remove extra filtering in pageattr code x86/mm: Do not auto-massage page protections x86/espfix: Document use of _PAGE_GLOBAL x86/mm: Introduce "default" kernel PTE mask x86/mm: Undo double _PAGE_PSE clearing x86/mm: Factor out pageattr _PAGE_GLOBAL setting x86/entry/64: Drop idtentry's manual stack switch for user entries x86/uapi: Fix asm/bootparam.h userspace compilation errors commit 71b8ebbf3d7bee88427eb207ef643f2f6447c625 Merge: 174e719 317d359 Author: Linus Torvalds Date: Sun Apr 15 12:43:30 2018 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "A few scheduler fixes: - Prevent a bogus warning vs. runqueue clock update flags in do_sched_rt_period_timer() - Simplify the helper functions which handle requests for skipping the runqueue clock updat. - Do not unlock the tunables mutex in the error path of the cpu frequency scheduler utils. Its not held. - Enforce proper alignement for 'struct util_est' in sched_avg to prevent a misalignment fault on IA64" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Force proper alignment of 'struct util_est' sched/core: Simplify helpers for rq clock update skip requests sched/rt: Fix rq->clock_update_flags < RQCF_ACT_SKIP warning sched/cpufreq/schedutil: Fix error path mutex unlock commit 174e719439b8224d7cedfbdd9529de396cac01ff Merge: 19ca90d 32e6e96 Author: Linus Torvalds Date: Sun Apr 15 12:36:31 2018 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull more perf updates from Thomas Gleixner: "A rather large set of perf updates: Kernel: - Fix various initialization issues - Prevent creating [ku]probes for not CAP_SYS_ADMIN users Tooling: - Show only failing syscalls with 'perf trace --failure' (Arnaldo Carvalho de Melo) e.g: See what 'openat' syscalls are failing: # perf trace --failure -e openat 762.323 ( 0.007 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video2) = -1 ENOENT No such file or directory 790.228 ( 0.008 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video63) = -1 ENOENT No such file or directory ^C# - Show information about the event (freq, nr_samples, total period/nr_events) in the annotate --tui and --stdio2 'perf annotate' output, similar to the first line in the 'perf report --tui', but just for the samples for a the annotated symbol (Arnaldo Carvalho de Melo) - Introduce 'perf version --build-options' to show what features were linked, aliased as well as a shorter 'perf -vv' (Jin Yao) - Add a "dso_size" sort order (Kim Phillips) - Remove redundant ')' in the tracepoint output in 'perf trace' (Changbin Du) - Synchronize x86's cpufeatures.h, no effect on toolss (Arnaldo Carvalho de Melo) - Show group details on the title line in the annotate browser and 'perf annotate --stdio2' output, so that the per-event columns can have headers (Arnaldo Carvalho de Melo) - Fixup vertical line separating metrics from instructions and cleaning unused lines at the bottom, both in the annotate TUI browser (Arnaldo Carvalho de Melo) - Remove duplicated 'samples' in lost samples warning in 'perf report' (Arnaldo Carvalho de Melo) - Synchronize i915_drm.h, silencing the perf build process, automagically adding support for the new DRM_I915_QUERY ioctl (Arnaldo Carvalho de Melo) - Make auxtrace_queues__add_buffer() allocate struct buffer, from a patchkit already applied (Adrian Hunter) - Fix the --stdio2/TUI annotate output to include group details, be it for a recorded '{a,b,f}' explicit event group or when forcing group display using 'perf report --group' for a set of events not recorded as a group (Arnaldo Carvalho de Melo) - Fix display artifacts in the ui browser (base class for the annotate and main report/top TUI browser) related to the extra title lines work (Arnaldo Carvalho de Melo) - perf auxtrace refactorings, leftovers from a previously partially processed patchset (Adrian Hunter) - Fix the builtin clang build (Sandipan Das, Arnaldo Carvalho de Melo) - Synchronize i915_drm.h, silencing a perf build warning and in the process automagically adding support for a new ioctl command (Arnaldo Carvalho de Melo) - Fix a strncpy issue in uprobe tracing" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits) perf/core: Need CAP_SYS_ADMIN to create k/uprobe with perf_event_open() tracing/uprobe_event: Fix strncpy corner case perf/core: Fix perf_uprobe_init() perf/core: Fix perf_kprobe_init() perf/core: Fix use-after-free in uprobe_perf_close() perf tests clang: Fix function name for clang IR test perf clang: Add support for recent clang versions perf tools: Fix perf builds with clang support perf tools: No need to include namespaces.h in util.h perf hists browser: Remove leftover from row returned from refresh perf hists browser: Show extra_title_lines in the 'D' debug hotkey perf auxtrace: Make auxtrace_queues__add_buffer() do CPU filtering tools headers uapi: Synchronize i915_drm.h perf report: Remove duplicated 'samples' in lost samples warning perf ui browser: Fixup cleaning unused lines at the bottom perf annotate browser: Fixup vertical line separating metrics from instructions perf annotate: Show group details on the title line perf auxtrace: Make auxtrace_queues__add_buffer() allocate struct buffer perf/x86/intel: Move regs->flags EXACT bit init perf trace: Remove redundant ')' ... commit 19ca90de49c3269874722148edf07083182e23ec Merge: 68d54d3 162ee5a Author: Linus Torvalds Date: Sun Apr 15 12:32:06 2018 -0700 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 EFI bootup fixlet from Thomas Gleixner: "A single fix for an early boot warning caused by invoking this_cpu_has() before SMP initialization" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Fix bogus warning during EFI bootup, use boot_cpu_has() instead of this_cpu_has() in build_cr3_noflush() commit 68d54d3ff3e872009ff7a003d5c43816e1f7864b Merge: 9dceab8 d305681 Author: Linus Torvalds Date: Sun Apr 15 12:29:46 2018 -0700 Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq affinity fixes from Thomas Gleixner: - Fix error path handling in the affinity spreading code - Make affinity spreading smarter to avoid issues on systems which claim to have hotpluggable CPUs while in fact they can't hotplug anything. So instead of trying to spread the vectors (and thereby the associated device queues) to all possibe CPUs, spread them on all present CPUs first. If there are left over vectors after that first step they are spread among the possible, but not present CPUs which keeps the code backwards compatible for virtual decives and NVME which allocate a queue per possible CPU, but makes the spreading smarter for devices which have less queues than possible or present CPUs. * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/affinity: Spread irq vectors among present CPUs as far as possible genirq/affinity: Allow irq spreading from a given starting point genirq/affinity: Move actual irq vector spreading into a helper function genirq/affinity: Rename *node_to_possible_cpumask as *node_to_cpumask genirq/affinity: Don't return with empty affinity masks on error commit 9dceab89d88572eb673883e98c2b62e9b3b4537e Merge: b1cb4f9 d56f3af Author: Linus Torvalds Date: Sun Apr 15 12:27:58 2018 -0700 Merge tag 'for-linus' of git://github.com/openrisc/linux Pull OpenRISC fixlet from Stafford Horne: "Just one small thing here, it came in a while back but I didnt have anything in my 4.16 queue, still its the only thing for 4.17 so sending it alone. Small cleanup: remove unused __ARCH_HAVE_MMU define" * tag 'for-linus' of git://github.com/openrisc/linux: openrisc: remove unused __ARCH_HAVE_MMU define commit f0c8d1f6dc8eac5a1fbf441c8e080721a7b6c0ff Author: Eugen Hristev Date: Tue Apr 10 11:57:47 2018 +0300 iio: adc: at91-sama5d2_adc: fix channel configuration for differential channels When iterating through the channels, the index in the array is not the scan index. Added an xlate function to translate to the proper index. The result of the bug is that the channel array is indexed with a wrong index, thus instead of the proper channel, we access invalid memory, which may lead to invalid results and/or corruption. This will be used also for devicetree channel xlate. Fixes: 5e1a1da0f ("iio: adc: at91-sama5d2_adc: add hw trigger and buffer support") Fixes: 073c66201 ("iio: adc: at91-sama5d2_adc: add support for DMA") Signed-off-by: Eugen Hristev Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/at91-sama5d2_adc.c | 41 ++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) commit b1cb4f93b5f861b498a29d0a1ad701ebe9a75e7e Merge: 18b7fd1 81b654c Author: Linus Torvalds Date: Sun Apr 15 11:57:12 2018 -0700 Merge tag 'powerpc-4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix crashes when loading modules built with a different CONFIG_RELOCATABLE value by adding CONFIG_RELOCATABLE to vermagic. - Fix busy loops in the OPAL NVRAM driver if we get certain error conditions from firmware. - Remove tlbie trace points from KVM code that's called in real mode, because it causes crashes. - Fix checkstops caused by invalid tlbiel on Power9 Radix. - Ensure the set of CPU features we "know" are always enabled is actually the minimal set when we build with support for firmware supplied CPU features. Thanks to: Aneesh Kumar K.V, Anshuman Khandual, Nicholas Piggin. * tag 'powerpc-4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s: Fix CPU_FTRS_ALWAYS vs DT CPU features powerpc/mm/radix: Fix checkstops caused by invalid tlbiel KVM: PPC: Book3S HV: trace_tlbie must not be called in realmode powerpc/8xx: Fix build with hugetlbfs enabled powerpc/powernv: Fix OPAL NVRAM driver OPAL_BUSY loops powerpc/powernv: define a standard delay for OPAL_BUSY type retry loops powerpc/fscr: Enable interrupts earlier before calling get_user() powerpc/64s: Fix section mismatch warnings from setup_rfi_flush() powerpc/modules: Fix crashes by adding CONFIG_RELOCATABLE to vermagic commit f9de14bc7e7aac77fd44bb2f62206eb9e494f0d2 Author: Jens Axboe Date: Fri Apr 13 16:25:57 2018 -0600 loop: handle short DIO reads We ran into an issue with loop and btrfs, where btrfs would complain about checksum errors. It turns out that is because we don't handle short reads at all, we just zero fill the remainder. Worse than that, we don't handle the filling properly, which results in loop trying to advance a single bio by much more than its size, since it doesn't take chaining into account. Handle short reads appropriately, by simply retrying at the new correct offset. End the remainder of the request with EIO, if we get a 0 read. Fixes: bc07c10a3603 ("block: loop: support DIO & AIO") Reviewed-by: Ming Lei Signed-off-by: Jens Axboe drivers/block/loop.c | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) commit 1894e916546df0efec9890a5c9954f4ad281494c Author: Jens Axboe Date: Fri Apr 13 16:24:29 2018 -0600 loop: remove cmd->rq member We can always get at the request from the payload, no need to store a pointer to it. Reviewed-by: Ming Lei Signed-off-by: Jens Axboe drivers/block/loop.c | 36 +++++++++++++++++++----------------- drivers/block/loop.h | 1 - 2 files changed, 19 insertions(+), 18 deletions(-) commit 1dc3039bc87ae7d19a990c3ee71cfd8a9068f428 Author: Alan Jenkins Date: Thu Apr 12 19:11:58 2018 +0100 block: do not use interruptible wait anywhere When blk_queue_enter() waits for a queue to unfreeze, or unset the PREEMPT_ONLY flag, do not allow it to be interrupted by a signal. The PREEMPT_ONLY flag was introduced later in commit 3a0a529971ec ("block, scsi: Make SCSI quiesce and resume work reliably"). Note the SCSI device is resumed asynchronously, i.e. after un-freezing userspace tasks. So that commit exposed the bug as a regression in v4.15. A mysterious SIGBUS (or -EIO) sometimes happened during the time the device was being resumed. Most frequently, there was no kernel log message, and we saw Xorg or Xwayland killed by SIGBUS.[1] [1] E.g. https://bugzilla.redhat.com/show_bug.cgi?id=1553979 Without this fix, I get an IO error in this test: # dd if=/dev/sda of=/dev/null iflag=direct & \ while killall -SIGUSR1 dd; do sleep 0.1; done & \ echo mem > /sys/power/state ; \ sleep 5; killall dd # stop after 5 seconds The interruptible wait was added to blk_queue_enter in commit 3ef28e83ab15 ("block: generic request_queue reference counting"). Before then, the interruptible wait was only in blk-mq, but I don't think it could ever have been correct. Reviewed-by: Bart Van Assche Cc: stable@vger.kernel.org Signed-off-by: Alan Jenkins Signed-off-by: Jens Axboe block/blk-core.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit d6606bcc6dbbf6c7b9fdf9166a9aa92c1d9aaaf5 Merge: c5042da f993740 Author: David S. Miller Date: Sat Apr 14 15:39:53 2018 -0400 Merge branch 'sfc-ARFS-fixes' Edward Cree says: ==================== sfc: ARFS fixes Three issues introduced by my recent asynchronous filter handling changes: 1. The old filter_rfs_insert would replace a matching filter of equal priority; we need to pass the appropriate argument to filter_insert to make it do the same. 2. We're lying to the kernel with our return value from ndo_rx_flow_steer, so we need to lie consistently when calling rps_may_expire_flow. This is only a partial fix, as the lie still prevents us from steering multiple flows with the same ID to different queues; a proper fix that stops us lying at all will hopefully follow later. 3. It's possible to cause the kernel to hammer ndo_rx_flow_steer very hard, so make sure we don't build up too huge a backlog of workitems. Possibly it would be better to fix #3 on the kernel side; I have a patch which I think does that but it's not a regression in 4.17 so isn't 'net' material. There's also the issue that we come up in the bad configuration that triggers #3 by default, but that too is a problem for another time. ==================== Signed-off-by: David S. Miller commit f993740ee05821307eca03d23d468895740450f8 Author: Edward Cree Date: Fri Apr 13 19:18:09 2018 +0100 sfc: limit ARFS workitems in flight per channel A misconfigured system (e.g. with all interrupts affinitised to all CPUs) may produce a storm of ARFS steering events. With the existing sfc ARFS implementation, that could create a backlog of workitems that grinds the system to a halt. To prevent this, limit the number of workitems that may be in flight for a given SFC device to 8 (EFX_RPS_MAX_IN_FLIGHT), and return EBUSY from our ndo_rx_flow_steer method if the limit is reached. Given this limit, also store the workitems in an array of slots within the struct efx_nic, rather than dynamically allocating for each request. The limit should not negatively impact performance, because it is only likely to be hit in cases where ARFS will be ineffective anyway. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/net_driver.h | 25 +++++++++++++++ drivers/net/ethernet/sfc/rx.c | 58 ++++++++++++++++++----------------- 2 files changed, 55 insertions(+), 28 deletions(-) commit a7f80189e41c96c0c6210e9198a31859c91eb3e5 Author: Edward Cree Date: Fri Apr 13 19:17:49 2018 +0100 sfc: pass the correctly bogus filter_id to rps_may_expire_flow() When we inserted an ARFS filter for ndo_rx_flow_steer(), we didn't know what the filter ID would be, so we just returned 0. Thus, we must also pass 0 as the filter ID when calling rps_may_expire_flow() for it, and rely on the flow_id to identify what we're talking about. Fixes: 3af0f34290f6 ("sfc: replace asynchronous filter operations") Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 3 +-- drivers/net/ethernet/sfc/farch.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit 494bef4c2a087876e75f3e95f7f63b06d6a65921 Author: Edward Cree Date: Fri Apr 13 19:17:22 2018 +0100 sfc: insert ARFS filters with replace_equal=true Necessary to allow redirecting a flow when the application moves. Fixes: 3af0f34290f6 ("sfc: replace asynchronous filter operations") Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d848e5f8e1ebdb227d045db55fe4f825e82965fa Author: Theodore Ts'o Date: Wed Apr 11 16:32:17 2018 -0400 random: add new ioctl RNDRESEEDCRNG Add a new ioctl which forces the the crng to be reseeded. Signed-off-by: Theodore Ts'o Cc: stable@kernel.org drivers/char/random.c | 13 ++++++++++++- include/uapi/linux/random.h | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) commit 0bb29a849a6433b72e249eea7695477b02056e94 Author: Theodore Ts'o Date: Thu Apr 12 00:50:45 2018 -0400 random: crng_reseed() should lock the crng instance that it is modifying Reported-by: Jann Horn Fixes: 1e7f583af67b ("random: make /dev/urandom scalable for silly...") Cc: stable@kernel.org # 4.8+ Signed-off-by: Theodore Ts'o Reviewed-by: Jann Horn drivers/char/random.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8ef35c866f8862df074a49a93b0309725812dea8 Author: Theodore Ts'o Date: Wed Apr 11 15:23:56 2018 -0400 random: set up the NUMA crng instances after the CRNG is fully initialized Until the primary_crng is fully initialized, don't initialize the NUMA crng nodes. Otherwise users of /dev/urandom on NUMA systems before the CRNG is fully initialized can get very bad quality randomness. Of course everyone should move to getrandom(2) where this won't be an issue, but there's a lot of legacy code out there. This related to CVE-2018-1108. Reported-by: Jann Horn Fixes: 1e7f583af67b ("random: make /dev/urandom scalable for silly...") Cc: stable@kernel.org # 4.8+ Signed-off-by: Theodore Ts'o drivers/char/random.c | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) commit dc12baacb95f205948f64dc936a47d89ee110117 Author: Theodore Ts'o Date: Wed Apr 11 14:58:27 2018 -0400 random: use a different mixing algorithm for add_device_randomness() add_device_randomness() use of crng_fast_load() was highly problematic. Some callers of add_device_randomness() can pass in a large amount of static information. This would immediately promote the crng_init state from 0 to 1, without really doing much to initialize the primary_crng's internal state with something even vaguely unpredictable. Since we don't have the speed constraints of add_interrupt_randomness(), we can do a better job mixing in the what unpredictability a device driver or architecture maintainer might see fit to give us, and do it in a way which does not bump the crng_init_cnt variable. Also, since add_device_randomness() doesn't bump any entropy accounting in crng_init state 0, mix the device randomness into the input_pool entropy pool as well. This is related to CVE-2018-1108. Reported-by: Jann Horn Fixes: ee7998c50c26 ("random: do not ignore early device randomness") Cc: stable@kernel.org # 4.13+ Signed-off-by: Theodore Ts'o drivers/char/random.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 4 deletions(-) commit 43838a23a05fbd13e47d750d3dfd77001536dd33 Author: Theodore Ts'o Date: Wed Apr 11 13:27:52 2018 -0400 random: fix crng_ready() test The crng_init variable has three states: 0: The CRNG is not initialized at all 1: The CRNG has a small amount of entropy, hopefully good enough for early-boot, non-cryptographical use cases 2: The CRNG is fully initialized and we are sure it is safe for cryptographic use cases. The crng_ready() function should only return true once we are in the last state. This addresses CVE-2018-1108. Reported-by: Jann Horn Fixes: e192be9d9a30 ("random: replace non-blocking pool...") Cc: stable@kernel.org # 4.8+ Signed-off-by: Theodore Ts'o Reviewed-by: Jann Horn drivers/char/random.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 18b7fd1c93e5204355ddbf2608a097d64df81b88 Merge: 4802310 df6f280 Author: Linus Torvalds Date: Sat Apr 14 08:50:50 2018 -0700 Merge branch 'akpm' (patches from Andrew) Merge yet more updates from Andrew Morton: - various hotfixes - kexec_file updates and feature work * emailed patches from Andrew Morton : (27 commits) kernel/kexec_file.c: move purgatories sha256 to common code kernel/kexec_file.c: allow archs to set purgatory load address kernel/kexec_file.c: remove mis-use of sh_offset field during purgatory load kernel/kexec_file.c: remove unneeded variables in kexec_purgatory_setup_sechdrs kernel/kexec_file.c: remove unneeded for-loop in kexec_purgatory_setup_sechdrs kernel/kexec_file.c: split up __kexec_load_puragory kernel/kexec_file.c: use read-only sections in arch_kexec_apply_relocations* kernel/kexec_file.c: search symbols in read-only kexec_purgatory kernel/kexec_file.c: make purgatory_info->ehdr const kernel/kexec_file.c: remove checks in kexec_purgatory_load include/linux/kexec.h: silence compile warnings kexec_file, x86: move re-factored code to generic side x86: kexec_file: clean up prepare_elf64_headers() x86: kexec_file: lift CRASH_MAX_RANGES limit on crash_mem buffer x86: kexec_file: remove X86_64 dependency from prepare_elf64_headers() x86: kexec_file: purge system-ram walking from prepare_elf64_headers() kexec_file,x86,powerpc: factor out kexec_file_ops functions kexec_file: make use of purgatory optional proc: revalidate misc dentries mm, slab: reschedule cache_reap() on the same CPU ... commit c7cd882469fc5042a5c84122b4062d7f53076db7 Author: Helge Deller Date: Fri Apr 13 21:54:37 2018 +0200 parisc: Fix missing binfmt_elf32.o build error Commit 71d577db01a5 ("parisc: Switch to generic COMPAT_BINFMT_ELF") removed the binfmt_elf32.c source file, but missed to drop the object file from the list of object files the Makefile, which then results in a build error. Fixes: 71d577db01a5 ("parisc: Switch to generic COMPAT_BINFMT_ELF") Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Helge Deller arch/parisc/kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df6f2801f511b07c08c110fe9f047a34cb40286f Author: Philipp Rudo Date: Fri Apr 13 15:36:46 2018 -0700 kernel/kexec_file.c: move purgatories sha256 to common code The code to verify the new kernels sha digest is applicable for all architectures. Move it to common code. One problem is the string.c implementation on x86. Currently sha256 includes x86/boot/string.h which defines memcpy and memset to be gcc builtins. By moving the sha256 implementation to common code and changing the include to linux/string.h both functions are no longer defined. Thus definitions have to be provided in x86/purgatory/string.c Link: http://lkml.kernel.org/r/20180321112751.22196-12-prudo@linux.vnet.ibm.com Signed-off-by: Philipp Rudo Acked-by: Dave Young Cc: AKASHI Takahiro Cc: Eric Biederman Cc: Heiko Carstens Cc: Ingo Molnar Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Thiago Jung Bauermann Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/purgatory/Makefile | 3 + arch/x86/purgatory/purgatory.c | 2 +- arch/x86/purgatory/sha256.c | 283 ----------------------------------------- arch/x86/purgatory/sha256.h | 21 --- arch/x86/purgatory/string.c | 12 ++ include/linux/sha256.h | 30 +++++ lib/sha256.c | 283 +++++++++++++++++++++++++++++++++++++++++ 7 files changed, 329 insertions(+), 305 deletions(-) commit 3be3f61d25e04ecf90d65d52fad632af5ba8805b Author: Philipp Rudo Date: Fri Apr 13 15:36:43 2018 -0700 kernel/kexec_file.c: allow archs to set purgatory load address For s390 new kernels are loaded to fixed addresses in memory before they are booted. With the current code this is a problem as it assumes the kernel will be loaded to an 'arbitrary' address. In particular, kexec_locate_mem_hole searches for a large enough memory region and sets the load address (kexec_bufer->mem) to it. Luckily there is a simple workaround for this problem. By returning 1 in arch_kexec_walk_mem, kexec_locate_mem_hole is turned off. This allows the architecture to set kbuf->mem by hand. While the trick works fine for the kernel it does not for the purgatory as here the architectures don't have access to its kexec_buffer. Give architectures access to the purgatories kexec_buffer by changing kexec_load_purgatory to take a pointer to it. With this change architectures have access to the buffer and can edit it as they need. A nice side effect of this change is that we can get rid of the purgatory_info->purgatory_load_address field. As now the information stored there can directly be accessed from kbuf->mem. Link: http://lkml.kernel.org/r/20180321112751.22196-11-prudo@linux.vnet.ibm.com Signed-off-by: Philipp Rudo Reviewed-by: Martin Schwidefsky Acked-by: Dave Young Cc: AKASHI Takahiro Cc: Eric Biederman Cc: Heiko Carstens Cc: Ingo Molnar Cc: Michael Ellerman Cc: Thiago Jung Bauermann Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/kernel/kexec_elf_64.c | 9 +++++---- arch/x86/kernel/kexec-bzimage64.c | 8 ++++---- include/linux/kexec.h | 17 ++++++----------- kernel/kexec_file.c | 29 ++++++++++++++++------------- 4 files changed, 31 insertions(+), 32 deletions(-) commit 8da0b724959ccd3f8435214ebdaf1aef548967bb Author: Philipp Rudo Date: Fri Apr 13 15:36:39 2018 -0700 kernel/kexec_file.c: remove mis-use of sh_offset field during purgatory load The current code uses the sh_offset field in purgatory_info->sechdrs to store a pointer to the current load address of the section. Depending whether the section will be loaded or not this is either a pointer into purgatory_info->purgatory_buf or kexec_purgatory. This is not only a violation of the ELF standard but also makes the code very hard to understand as you cannot tell if the memory you are using is read-only or not. Remove this misuse and store the offset of the section in pugaroty_info->purgatory_buf in sh_offset. Link: http://lkml.kernel.org/r/20180321112751.22196-10-prudo@linux.vnet.ibm.com Signed-off-by: Philipp Rudo Acked-by: Dave Young Cc: AKASHI Takahiro Cc: Eric Biederman Cc: Heiko Carstens Cc: Ingo Molnar Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Thiago Jung Bauermann Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kernel/machine_kexec_64.c | 10 ++++++---- kernel/kexec_file.c | 37 +++++++------------------------------ 2 files changed, 13 insertions(+), 34 deletions(-) commit 620f697cc27a6d9b09268f47cd13620488ec67af Author: Philipp Rudo Date: Fri Apr 13 15:36:35 2018 -0700 kernel/kexec_file.c: remove unneeded variables in kexec_purgatory_setup_sechdrs The main loop currently uses quite a lot of variables to update the section headers. Some of them are unnecessary. So clean them up a little. Link: http://lkml.kernel.org/r/20180321112751.22196-9-prudo@linux.vnet.ibm.com Signed-off-by: Philipp Rudo Acked-by: Dave Young Cc: AKASHI Takahiro Cc: Eric Biederman Cc: Heiko Carstens Cc: Ingo Molnar Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Thiago Jung Bauermann Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kexec_file.c | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) commit f1b1cca39650c9c1dbe26140946a518953f66771 Author: Philipp Rudo Date: Fri Apr 13 15:36:32 2018 -0700 kernel/kexec_file.c: remove unneeded for-loop in kexec_purgatory_setup_sechdrs To update the entry point there is an extra loop over all section headers although this can be done in the main loop. So move it there and eliminate the extra loop and variable to store the 'entry section index'. Also, in the main loop, move the usual case, i.e. non-bss section, out of the extra if-block. Link: http://lkml.kernel.org/r/20180321112751.22196-8-prudo@linux.vnet.ibm.com Signed-off-by: Philipp Rudo Reviewed-by: Martin Schwidefsky Acked-by: Dave Young Cc: AKASHI Takahiro Cc: Eric Biederman Cc: Heiko Carstens Cc: Ingo Molnar Cc: Michael Ellerman Cc: Thiago Jung Bauermann Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kexec_file.c | 76 +++++++++++++++++++++-------------------------------- 1 file changed, 30 insertions(+), 46 deletions(-) commit 930457057abe4e6d57433dea75e97e0e39fd0ab6 Author: Philipp Rudo Date: Fri Apr 13 15:36:28 2018 -0700 kernel/kexec_file.c: split up __kexec_load_puragory When inspecting __kexec_load_purgatory you find that it has two tasks 1) setting up the kexec_buffer for the new kernel and, 2) setting up pi->sechdrs for the final load address. The two tasks are independent of each other. To improve readability split up __kexec_load_purgatory into two functions, one for each task, and call them directly from kexec_load_purgatory. Link: http://lkml.kernel.org/r/20180321112751.22196-7-prudo@linux.vnet.ibm.com Signed-off-by: Philipp Rudo Acked-by: Dave Young Cc: AKASHI Takahiro Cc: Eric Biederman Cc: Heiko Carstens Cc: Ingo Molnar Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Thiago Jung Bauermann Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kexec_file.c | 200 +++++++++++++++++++++++++++------------------------- 1 file changed, 103 insertions(+), 97 deletions(-) commit 8aec395b8478310521031157ef5d44ef19c2c581 Author: Philipp Rudo Date: Fri Apr 13 15:36:24 2018 -0700 kernel/kexec_file.c: use read-only sections in arch_kexec_apply_relocations* When the relocations are applied to the purgatory only the section the relocations are applied to is writable. The other sections, i.e. the symtab and .rel/.rela, are in read-only kexec_purgatory. Highlight this by marking the corresponding variables as 'const'. While at it also change the signatures of arch_kexec_apply_relocations* to take section pointers instead of just the index of the relocation section. This removes the second lookup and sanity check of the sections in arch code. Link: http://lkml.kernel.org/r/20180321112751.22196-6-prudo@linux.vnet.ibm.com Signed-off-by: Philipp Rudo Acked-by: Dave Young Cc: AKASHI Takahiro Cc: Eric Biederman Cc: Heiko Carstens Cc: Ingo Molnar Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Thiago Jung Bauermann Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kernel/machine_kexec_64.c | 56 ++++++++++++--------------------- include/linux/kexec.h | 13 +++++--- kernel/kexec_file.c | 63 +++++++++++++++++++++++++------------- 3 files changed, 71 insertions(+), 61 deletions(-) commit 961d921a1b967f76e13f9e11f2b0c2bcb5741f10 Author: Philipp Rudo Date: Fri Apr 13 15:36:21 2018 -0700 kernel/kexec_file.c: search symbols in read-only kexec_purgatory The stripped purgatory does not contain a symtab. So when looking for symbols this is done in read-only kexec_purgatory. Highlight this by marking the corresponding variables as 'const'. Link: http://lkml.kernel.org/r/20180321112751.22196-5-prudo@linux.vnet.ibm.com Signed-off-by: Philipp Rudo Acked-by: Dave Young Cc: AKASHI Takahiro Cc: Eric Biederman Cc: Heiko Carstens Cc: Ingo Molnar Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Thiago Jung Bauermann Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kexec_file.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit 65c225d3280542f3ea145e052215ce0538f6bb69 Author: Philipp Rudo Date: Fri Apr 13 15:36:17 2018 -0700 kernel/kexec_file.c: make purgatory_info->ehdr const The kexec_purgatory buffer is read-only. Thus all pointers into kexec_purgatory are read-only, too. Point this out by explicitly marking purgatory_info->ehdr as 'const' and update the comments in purgatory_info. Link: http://lkml.kernel.org/r/20180321112751.22196-4-prudo@linux.vnet.ibm.com Signed-off-by: Philipp Rudo Acked-by: Dave Young Cc: AKASHI Takahiro Cc: Eric Biederman Cc: Heiko Carstens Cc: Ingo Molnar Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Thiago Jung Bauermann Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kexec.h | 17 +++++++++++------ kernel/kexec_file.c | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) commit d2b8178ca7324a21495cb71049b4e4a041ab5942 Author: Philipp Rudo Date: Fri Apr 13 15:36:13 2018 -0700 kernel/kexec_file.c: remove checks in kexec_purgatory_load Before the purgatory is loaded several checks are done whether the ELF file in kexec_purgatory is valid or not. These checks are incomplete. For example they don't check for the total size of the sections defined in the section header table or if the entry point actually points into the purgatory. On the other hand the purgatory, although an ELF file on its own, is part of the kernel. Thus not trusting the purgatory means not trusting the kernel build itself. So remove all validity checks on the purgatory and just trust the kernel build. Link: http://lkml.kernel.org/r/20180321112751.22196-3-prudo@linux.vnet.ibm.com Signed-off-by: Philipp Rudo Acked-by: Dave Young Cc: AKASHI Takahiro Cc: Eric Biederman Cc: Heiko Carstens Cc: Ingo Molnar Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Thiago Jung Bauermann Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kexec_file.c | 14 -------------- 1 file changed, 14 deletions(-) commit ee6ebeda8ddc350700168f2c8052a97bd9c11e5b Author: Philipp Rudo Date: Fri Apr 13 15:36:10 2018 -0700 include/linux/kexec.h: silence compile warnings Patch series "kexec_file: Clean up purgatory load", v2. Following the discussion with Dave and AKASHI, here are the common code patches extracted from my recent patch set (Add kexec_file_load support to s390) [1]. The patches were extracted to allow upstream integration together with AKASHI's common code patches before the arch code gets adjusted to the new base. The reason for this series is to prepare common code for adding kexec_file_load to s390 as well as cleaning up the mis-use of the sh_offset field during purgatory load. In detail this series contains: Patch #1&2: Minor cleanups/fixes. Patch #3-9: Clean up the purgatory load/relocation code. Especially remove the mis-use of the purgatory_info->sechdrs->sh_offset field, currently holding a pointer into either kexec_purgatory (ro) or purgatory_buf (rw) depending on the section. With these patches the section address will be calculated verbosely and sh_offset will contain the offset of the section in the stripped purgatory binary (purgatory_buf). Patch #10: Allows architectures to set the purgatory load address. This patch is important for s390 as the kernel and purgatory have to be loaded to fixed addresses. In current code this is impossible as the purgatory load is opaque to the architecture. Patch #11: Moves x86 purgatories sha implementation to common lib/ directory to allow reuse in other architectures. This patch (of 11) When building the kernel with CONFIG_KEXEC_FILE enabled gcc prints a compile warning multiple times. In file included from /linux/init/initramfs.c:526:0: /include/linux/kexec.h:120:9: warning: `struct kimage' declared inside parameter list [enabled by default] unsigned long cmdline_len); ^ This is because the typedefs for kexec_file_load uses struct kimage before it is declared. Fix this by simply forward declaring struct kimage. Link: http://lkml.kernel.org/r/20180321112751.22196-2-prudo@linux.vnet.ibm.com Signed-off-by: Philipp Rudo Acked-by: Dave Young Cc: Eric Biederman Cc: Vivek Goyal Cc: Michael Ellerman Cc: Thiago Jung Bauermann Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: AKASHI Takahiro Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kexec.h | 2 ++ 1 file changed, 2 insertions(+) commit babac4a84a88842bec477a5bdada1460f3bc374c Author: AKASHI Takahiro Date: Fri Apr 13 15:36:06 2018 -0700 kexec_file, x86: move re-factored code to generic side In the previous patches, commonly-used routines, exclude_mem_range() and prepare_elf64_headers(), were carved out. Now place them in kexec common code. A prefix "crash_" is given to each of their names to avoid possible name collisions. Link: http://lkml.kernel.org/r/20180306102303.9063-8-takahiro.akashi@linaro.org Signed-off-by: AKASHI Takahiro Acked-by: Dave Young Tested-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kernel/crash.c | 195 ++---------------------------------------------- include/linux/kexec.h | 19 +++++ kernel/kexec_file.c | 175 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 201 insertions(+), 188 deletions(-) commit eb7dae947ef5c50e0121f673fcb43ca3583e5849 Author: AKASHI Takahiro Date: Fri Apr 13 15:36:03 2018 -0700 x86: kexec_file: clean up prepare_elf64_headers() Removing bufp variable in prepare_elf64_headers() makes the code simpler and more understandable. Link: http://lkml.kernel.org/r/20180306102303.9063-7-takahiro.akashi@linaro.org Signed-off-by: AKASHI Takahiro Acked-by: Dave Young Tested-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kernel/crash.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 8d5f894a3108ac7c362f524aace01266cb237a7d Author: AKASHI Takahiro Date: Fri Apr 13 15:35:59 2018 -0700 x86: kexec_file: lift CRASH_MAX_RANGES limit on crash_mem buffer While CRASH_MAX_RANGES (== 16) seems to be good enough, fixed-number array is not a good idea in general. In this patch, size of crash_mem buffer is calculated as before and the buffer is now dynamically allocated. This change also allows removing crash_elf_data structure. Link: http://lkml.kernel.org/r/20180306102303.9063-6-takahiro.akashi@linaro.org Signed-off-by: AKASHI Takahiro Acked-by: Dave Young Tested-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kernel/crash.c | 82 +++++++++++++++++++------------------------------ 1 file changed, 31 insertions(+), 51 deletions(-) commit c72c7e670963b26134e78a06b91632b41a0e3615 Author: AKASHI Takahiro Date: Fri Apr 13 15:35:56 2018 -0700 x86: kexec_file: remove X86_64 dependency from prepare_elf64_headers() The code guarded by CONFIG_X86_64 is necessary on some architectures which have a dedicated kernel mapping outside of linear memory mapping. (arm64 is among those.) In this patch, an additional argument, kernel_map, is added to enable/ disable the code removing #ifdef. Link: http://lkml.kernel.org/r/20180306102303.9063-5-takahiro.akashi@linaro.org Signed-off-by: AKASHI Takahiro Acked-by: Dave Young Tested-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kernel/crash.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit cbe6601617302b0998d7f6779d04a222fc3a819b Author: AKASHI Takahiro Date: Fri Apr 13 15:35:53 2018 -0700 x86: kexec_file: purge system-ram walking from prepare_elf64_headers() While prepare_elf64_headers() in x86 looks pretty generic for other architectures' use, it contains some code which tries to list crash memory regions by walking through system resources, which is not always architecture agnostic. To make this function more generic, the related code should be purged. In this patch, prepare_elf64_headers() simply scans crash_mem buffer passed and add all the listed regions to elf header as a PT_LOAD segment. So walk_system_ram_res(prepare_elf64_headers_callback) have been moved forward before prepare_elf64_headers() where the callback, prepare_elf64_headers_callback(), is now responsible for filling up crash_mem buffer. Meanwhile exclude_elf_header_ranges() used to be called every time in this callback it is rather redundant and now called only once in prepare_elf_headers() as well. Link: http://lkml.kernel.org/r/20180306102303.9063-4-takahiro.akashi@linaro.org Signed-off-by: AKASHI Takahiro Acked-by: Dave Young Tested-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kernel/crash.c | 121 +++++++++++++++++++++++------------------------- 1 file changed, 58 insertions(+), 63 deletions(-) commit 9ec4ecef0af7790551109283ca039a7c52de343c Author: AKASHI Takahiro Date: Fri Apr 13 15:35:49 2018 -0700 kexec_file,x86,powerpc: factor out kexec_file_ops functions As arch_kexec_kernel_image_{probe,load}(), arch_kimage_file_post_load_cleanup() and arch_kexec_kernel_verify_sig() are almost duplicated among architectures, they can be commonalized with an architecture-defined kexec_file_ops array. So let's factor them out. Link: http://lkml.kernel.org/r/20180306102303.9063-3-takahiro.akashi@linaro.org Signed-off-by: AKASHI Takahiro Acked-by: Dave Young Tested-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He Cc: Michael Ellerman Cc: Thiago Jung Bauermann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/asm/kexec.h | 2 +- arch/powerpc/kernel/kexec_elf_64.c | 2 +- arch/powerpc/kernel/machine_kexec_file_64.c | 39 ++----------------- arch/x86/include/asm/kexec-bzimage64.h | 2 +- arch/x86/kernel/kexec-bzimage64.c | 2 +- arch/x86/kernel/machine_kexec_64.c | 45 +--------------------- include/linux/kexec.h | 13 +++---- kernel/kexec_file.c | 60 +++++++++++++++++++++++++++-- 8 files changed, 71 insertions(+), 94 deletions(-) commit b799a09f639beeda105fe8a9ab440d80fdabd3b3 Author: AKASHI Takahiro Date: Fri Apr 13 15:35:45 2018 -0700 kexec_file: make use of purgatory optional Patch series "kexec_file, x86, powerpc: refactoring for other architecutres", v2. This is a preparatory patchset for adding kexec_file support on arm64. It was originally included in a arm64 patch set[1], but Philipp is also working on their kexec_file support on s390[2] and some changes are now conflicting. So these common parts were extracted and put into a separate patch set for better integration. What's more, my original patch#4 was split into a few small chunks for easier review after Dave's comment. As such, the resulting code is basically identical with my original, and the only *visible* differences are: - renaming of _kexec_kernel_image_probe() and _kimage_file_post_load_cleanup() - change one of types of arguments at prepare_elf64_headers() Those, unfortunately, require a couple of trivial changes on the rest (#1, #6 to #13) of my arm64 kexec_file patch set[1]. Patch #1 allows making a use of purgatory optional, particularly useful for arm64. Patch #2 commonalizes arch_kexec_kernel_{image_probe, image_load, verify_sig}() and arch_kimage_file_post_load_cleanup() across architectures. Patches #3-#7 are also intended to generalize parse_elf64_headers(), along with exclude_mem_range(), to be made best re-use of. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2018-February/561182.html [2] http://lkml.iu.edu//hypermail/linux/kernel/1802.1/02596.html This patch (of 7): On arm64, crash dump kernel's usable memory is protected by *unmapping* it from kernel virtual space unlike other architectures where the region is just made read-only. It is highly unlikely that the region is accidentally corrupted and this observation rationalizes that digest check code can also be dropped from purgatory. The resulting code is so simple as it doesn't require a bit ugly re-linking/relocation stuff, i.e. arch_kexec_apply_relocations_add(). Please see: http://lists.infradead.org/pipermail/linux-arm-kernel/2017-December/545428.html All that the purgatory does is to shuffle arguments and jump into a new kernel, while we still need to have some space for a hash value (purgatory_sha256_digest) which is never checked against. As such, it doesn't make sense to have trampline code between old kernel and new kernel on arm64. This patch introduces a new configuration, ARCH_HAS_KEXEC_PURGATORY, and allows related code to be compiled in only if necessary. [takahiro.akashi@linaro.org: fix trivial screwup] Link: http://lkml.kernel.org/r/20180309093346.GF25863@linaro.org Link: http://lkml.kernel.org/r/20180306102303.9063-2-takahiro.akashi@linaro.org Signed-off-by: AKASHI Takahiro Acked-by: Dave Young Tested-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/Kconfig | 3 +++ arch/x86/Kconfig | 3 +++ kernel/kexec_file.c | 5 +++++ 3 files changed, 11 insertions(+) commit 1da4d377f943fe4194ffb9fb9c26cc58fad4dd24 Author: Alexey Dobriyan Date: Fri Apr 13 15:35:42 2018 -0700 proc: revalidate misc dentries If module removes proc directory while another process pins it by chdir'ing to it, then subsequent recreation of proc entry and all entries down the tree will not be visible to any process until pinning process unchdir from directory and unpins everything. Steps to reproduce: proc_mkdir("aaa", NULL); proc_create("aaa/bbb", ...); chdir("/proc/aaa"); remove_proc_entry("aaa/bbb", NULL); remove_proc_entry("aaa", NULL); proc_mkdir("aaa", NULL); # inaccessible because "aaa" dentry still points # to the original "aaa". proc_create("aaa/bbb", ...); Fix is to implement ->d_revalidate and ->d_delete. Link: http://lkml.kernel.org/r/20180312201938.GA4871@avx2 Signed-off-by: Alexey Dobriyan Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/generic.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit a9f2a846f0503e7d729f552e3ccfe2279010fe94 Author: Vlastimil Babka Date: Fri Apr 13 15:35:38 2018 -0700 mm, slab: reschedule cache_reap() on the same CPU cache_reap() is initially scheduled in start_cpu_timer() via schedule_delayed_work_on(). But then the next iterations are scheduled via schedule_delayed_work(), i.e. using WORK_CPU_UNBOUND. Thus since commit ef557180447f ("workqueue: schedule WORK_CPU_UNBOUND work on wq_unbound_cpumask CPUs") there is no guarantee the future iterations will run on the originally intended cpu, although it's still preferred. I was able to demonstrate this with /sys/module/workqueue/parameters/debug_force_rr_cpu. IIUC, it may also happen due to migrating timers in nohz context. As a result, some cpu's would be calling cache_reap() more frequently and others never. This patch uses schedule_delayed_work_on() with the current cpu when scheduling the next iteration. Link: http://lkml.kernel.org/r/20180411070007.32225-1-vbabka@suse.cz Fixes: ef557180447f ("workqueue: schedule WORK_CPU_UNBOUND work on wq_unbound_cpumask CPUs") Signed-off-by: Vlastimil Babka Acked-by: Pekka Enberg Acked-by: Christoph Lameter Cc: Joonsoo Kim Cc: David Rientjes Cc: Tejun Heo Cc: Lai Jiangshan Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1cbf29da3628b661379acba7b08a07ef1e5da3b5 Author: Petr Tesarik Date: Fri Apr 13 15:35:34 2018 -0700 kexec: export PG_swapbacked to VMCOREINFO Since commit 6326fec1122c ("mm: Use owner_priv bit for PageSwapCache, valid when PageSwapBacked"), PG_swapcache is an alias for PG_owner_priv_1, which may be also used for other purposes. To know whether the bit indeed has the PG_swapcache meaning, it is necessary to check PG_swapbacked, hence this bit must be exported. Link: http://lkml.kernel.org/r/20180410161345.142e142d@ezekiel.suse.cz Signed-off-by: Petr Tesarik Reviewed-by: Andrew Morton Cc: Dave Young Cc: Xunlei Pang Cc: Baoquan He Cc: Hari Bathini Cc: "Kirill A. Shutemov" Cc: "Marc-Andr Lureau" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/crash_core.c | 1 + 1 file changed, 1 insertion(+) commit 3f05317d9889ab75c7190dcd39491d2a97921984 Author: Eric Biggers Date: Fri Apr 13 15:35:30 2018 -0700 ipc/shm: fix use-after-free of shm file via remap_file_pages() syzbot reported a use-after-free of shm_file_data(file)->file->f_op in shm_get_unmapped_area(), called via sys_remap_file_pages(). Unfortunately it couldn't generate a reproducer, but I found a bug which I think caused it. When remap_file_pages() is passed a full System V shared memory segment, the memory is first unmapped, then a new map is created using the ->vm_file. Between these steps, the shm ID can be removed and reused for a new shm segment. But, shm_mmap() only checks whether the ID is currently valid before calling the underlying file's ->mmap(); it doesn't check whether it was reused. Thus it can use the wrong underlying file, one that was already freed. Fix this by making the "outer" shm file (the one that gets put in ->vm_file) hold a reference to the real shm file, and by making __shm_open() require that the file associated with the shm ID matches the one associated with the "outer" file. Taking the reference to the real shm file is needed to fully solve the problem, since otherwise sfd->file could point to a freed file, which then could be reallocated for the reused shm ID, causing the wrong shm segment to be mapped (and without the required permission checks). Commit 1ac0b6dec656 ("ipc/shm: handle removed segments gracefully in shm_mmap()") almost fixed this bug, but it didn't go far enough because it didn't consider the case where the shm ID is reused. The following program usually reproduces this bug: #include #include #include #include int main() { int is_parent = (fork() != 0); srand(getpid()); for (;;) { int id = shmget(0xF00F, 4096, IPC_CREAT|0700); if (is_parent) { void *addr = shmat(id, NULL, 0); usleep(rand() % 50); while (!syscall(__NR_remap_file_pages, addr, 4096, 0, 0, 0)); } else { usleep(rand() % 50); shmctl(id, IPC_RMID, NULL); } } } It causes the following NULL pointer dereference due to a 'struct file' being used while it's being freed. (I couldn't actually get a KASAN use-after-free splat like in the syzbot report. But I think it's possible with this bug; it would just take a more extraordinary race...) BUG: unable to handle kernel NULL pointer dereference at 0000000000000058 PGD 0 P4D 0 Oops: 0000 [#1] SMP NOPTI CPU: 9 PID: 258 Comm: syz_ipc Not tainted 4.16.0-05140-gf8cf2f16a7c95 #189 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-20171110_100015-anatol 04/01/2014 RIP: 0010:d_inode include/linux/dcache.h:519 [inline] RIP: 0010:touch_atime+0x25/0xd0 fs/inode.c:1724 [...] Call Trace: file_accessed include/linux/fs.h:2063 [inline] shmem_mmap+0x25/0x40 mm/shmem.c:2149 call_mmap include/linux/fs.h:1789 [inline] shm_mmap+0x34/0x80 ipc/shm.c:465 call_mmap include/linux/fs.h:1789 [inline] mmap_region+0x309/0x5b0 mm/mmap.c:1712 do_mmap+0x294/0x4a0 mm/mmap.c:1483 do_mmap_pgoff include/linux/mm.h:2235 [inline] SYSC_remap_file_pages mm/mmap.c:2853 [inline] SyS_remap_file_pages+0x232/0x310 mm/mmap.c:2769 do_syscall_64+0x64/0x1a0 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ebiggers@google.com: add comment] Link: http://lkml.kernel.org/r/20180410192850.235835-1-ebiggers3@gmail.com Link: http://lkml.kernel.org/r/20180409043039.28915-1-ebiggers3@gmail.com Reported-by: syzbot+d11f321e7f1923157eac80aa990b446596f46439@syzkaller.appspotmail.com Fixes: c8d78c1823f4 ("mm: replace remap_file_pages() syscall with emulation") Signed-off-by: Eric Biggers Acked-by: Kirill A. Shutemov Acked-by: Davidlohr Bueso Cc: Manfred Spraul Cc: "Eric W . Biederman" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/shm.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 453972283dcbf61fa33c8c0540d9b5e0caf9d570 Author: Arnd Bergmann Date: Fri Apr 13 15:35:27 2018 -0700 mm/filemap.c: provide dummy filemap_page_mkwrite() for NOMMU Building orangefs on MMU-less machines now results in a link error because of the newly introduced use of the filemap_page_mkwrite() function: ERROR: "filemap_page_mkwrite" [fs/orangefs/orangefs.ko] undefined! This adds a dummy version for it, similar to the existing generic_file_mmap and generic_file_readonly_mmap stubs in the same file, to avoid the link error without adding #ifdefs in each file system that uses these. Link: http://lkml.kernel.org/r/20180409105555.2439976-1-arnd@arndb.de Fixes: a5135eeab2e5 ("orangefs: implement vm_ops->fault") Signed-off-by: Arnd Bergmann Reviewed-by: Jan Kara Reviewed-by: Andrew Morton Cc: Martin Brandenburg Cc: Mike Marshall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d081107867b85cc7454b9d4f5aea47f65bcf06d1 Author: Michael S. Tsirkin Date: Fri Apr 13 15:35:23 2018 -0700 mm/gup.c: document return value __get_user_pages_fast handles errors differently from get_user_pages_fast: the former always returns the number of pages pinned, the later might return a negative error code. Link: http://lkml.kernel.org/r/1522962072-182137-6-git-send-email-mst@redhat.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Andrew Morton Cc: Kirill A. Shutemov Cc: Huang Ying Cc: Jonathan Corbet Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Thorsten Leemhuis Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/mm/gup.c | 2 ++ arch/s390/mm/gup.c | 2 ++ arch/sh/mm/gup.c | 2 ++ arch/sparc/mm/gup.c | 4 ++++ mm/gup.c | 4 +++- mm/util.c | 6 ++++-- 6 files changed, 17 insertions(+), 3 deletions(-) commit c61611f70958d86f659bca25c02ae69413747a8d Author: Michael S. Tsirkin Date: Fri Apr 13 15:35:20 2018 -0700 get_user_pages_fast(): return -EFAULT on access_ok failure get_user_pages_fast is supposed to be a faster drop-in equivalent of get_user_pages. As such, callers expect it to return a negative return code when passed an invalid address, and never expect it to return 0 when passed a positive number of pages, since its documentation says: * Returns number of pages pinned. This may be fewer than the number * requested. If nr_pages is 0 or negative, returns 0. If no pages * were pinned, returns -errno. When get_user_pages_fast fall back on get_user_pages this is exactly what happens. Unfortunately the implementation is inconsistent: it returns 0 if passed a kernel address, confusing callers: for example, the following is pretty common but does not appear to do the right thing with a kernel address: ret = get_user_pages_fast(addr, 1, writeable, &page); if (ret < 0) return ret; Change get_user_pages_fast to return -EFAULT when supplied a kernel address to make it match expectations. All callers have been audited for consistency with the documented semantics. Link: http://lkml.kernel.org/r/1522962072-182137-4-git-send-email-mst@redhat.com Fixes: 5b65c4677a57 ("mm, x86/mm: Fix performance regression in get_user_pages_fast()") Signed-off-by: Michael S. Tsirkin Reported-by: syzbot+6304bf97ef436580fede@syzkaller.appspotmail.com Reviewed-by: Andrew Morton Cc: Kirill A. Shutemov Cc: Huang Ying Cc: Jonathan Corbet Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Thorsten Leemhuis Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 09e35a4a1ca8b9988ca9b8557d17948cd6c0808b Author: Michael S. Tsirkin Date: Fri Apr 13 15:35:16 2018 -0700 mm/gup_benchmark: handle gup failures Patch series "mm/get_user_pages_fast fixes, cleanups", v2. Turns out get_user_pages_fast and __get_user_pages_fast return different values on error when given a single page: __get_user_pages_fast returns 0. get_user_pages_fast returns either 0 or an error. Callers of get_user_pages_fast expect an error so fix it up to return an error consistently. Stress the difference between get_user_pages_fast and __get_user_pages_fast to make sure callers aren't confused. This patch (of 3): __gup_benchmark_ioctl does not handle the case where get_user_pages_fast fails: - a negative return code will cause a buffer overrun - returning with partial success will cause use of uninitialized memory. [akpm@linux-foundation.org: simplification] Link: http://lkml.kernel.org/r/1522962072-182137-3-git-send-email-mst@redhat.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Andrew Morton Cc: Kirill A. Shutemov Cc: Huang Ying Cc: Jonathan Corbet Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Thorsten Leemhuis Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup_benchmark.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 60bb83b81169820c691fbfa33a6a4aef32aa4b0b Author: Takashi Iwai Date: Fri Apr 13 15:35:13 2018 -0700 resource: fix integer overflow at reallocation We've got a bug report indicating a kernel panic at booting on an x86-32 system, and it turned out to be the invalid PCI resource assigned after reallocation. __find_resource() first aligns the resource start address and resets the end address with start+size-1 accordingly, then checks whether it's contained. Here the end address may overflow the integer, although resource_contains() still returns true because the function validates only start and end address. So this ends up with returning an invalid resource (start > end). There was already an attempt to cover such a problem in the commit 47ea91b4052d ("Resource: fix wrong resource window calculation"), but this case is an overseen one. This patch adds the validity check of the newly calculated resource for avoiding the integer overflow problem. Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=1086739 Link: http://lkml.kernel.org/r/s5hpo37d5l8.wl-tiwai@suse.de Fixes: 23c570a67448 ("resource: ability to resize an allocated resource") Signed-off-by: Takashi Iwai Reported-by: Michael Henders Tested-by: Michael Henders Reviewed-by: Andrew Morton Cc: Ram Pai Cc: Bjorn Helgaas Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 48023102b7078a6674516b1fe0d639669336049d Merge: ba2b137 1614901 Author: Linus Torvalds Date: Fri Apr 13 16:55:41 2018 -0700 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs updates from Miklos Szeredi: "In addition to bug fixes and cleanups there are two new features from Amir: - Consistent inode number support for the case when layers are not all on the same filesystem (feature is dubbed "xino"). - Optimize overlayfs file handle decoding. This one touches the exportfs interface to allow detecting the disconnected directory case" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: update documentation w.r.t "xino" feature ovl: add support for "xino" mount and config options ovl: consistent d_ino for non-samefs with xino ovl: consistent i_ino for non-samefs with xino ovl: constant st_ino for non-samefs with xino ovl: allocate anon bdev per unique lower fs ovl: factor out ovl_map_dev_ino() helper ovl: cleanup ovl_update_time() ovl: add WARN_ON() for non-dir redirect cases ovl: cleanup setting OVL_INDEX ovl: set d->is_dir and d->opaque for last path element ovl: Do not check for redirect if this is last layer ovl: lookup in inode cache first when decoding lower file handle ovl: do not try to reconnect a disconnected origin dentry ovl: disambiguate ovl_encode_fh() ovl: set lower layer st_dev only if setting lower st_ino ovl: fix lookup with middle layer opaque dir and absolute path redirects ovl: Set d->last properly during lookup ovl: set i_ino to the value of st_ino for NFS export commit ba2b137d10bafc3cc514e52172b549e64a5402fb Merge: 71893f1 b907b40 Author: Linus Torvalds Date: Fri Apr 13 16:52:26 2018 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management update from Zhang Rui: - Fix race condition in imx_thermal_probe() (Mikhail Lappo) - Add cooling device's statistics in sysfs (Viresh Kumar) * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal: Add cooling device's statistics in sysfs thermal: imx: Fix race condition in imx_thermal_probe() commit a1cc7034e33d12dc17d13fbcd7d597d552889097 Author: Sinan Kaya Date: Thu Apr 12 22:30:44 2018 -0400 MIPS: io: Add barrier after register read in readX() While a barrier is present in the writeX() functions before the register write, a similar barrier is missing in the readX() functions after the register read. This could allow memory accesses following readX() to observe stale data. Signed-off-by: Sinan Kaya Reported-by: Arnd Bergmann Cc: Ralf Baechle Cc: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/19069/ [jhogan@kernel.org: Tidy commit message] Signed-off-by: James Hogan arch/mips/include/asm/io.h | 2 ++ 1 file changed, 2 insertions(+) commit 71893f116109c92e4cd230d990fad5bd7cb4f99d Merge: f681137 712ff25 Author: Linus Torvalds Date: Fri Apr 13 16:32:16 2018 -0700 Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging Pull dmi updates from Jean Delvare. * 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: firmware: dmi_scan: Use lowercase letters for UUID firmware: dmi_scan: Add DMI_OEM_STRING support to dmi_matches firmware: dmi_scan: Fix UUID length safety check commit f6811370b9266a3d8a21e27cb5f46751f97df2fb Merge: ca4e7c5 c171d3b Author: Linus Torvalds Date: Fri Apr 13 16:20:36 2018 -0700 Merge tag 'chrome-platform-for-linus-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform Pull chrome platform updates from Benson Leung: - a series from Dmitry to remove platform data from chromeos_laptop.c, which was the only user of platform data for the atmel_mxt_ts driver. - a series to clean up sysfs and debugfs for cros_ec - other misc cleanups * tag 'chrome-platform-for-linus-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform: (22 commits) platform/chrome: mfd/cros_ec_dev: Add sysfs entry to set keyboard wake lid angle platform/chrome: cros_ec_debugfs: Add PD port info to debugfs platform/chrome: cros_ec_debugfs: Use octal permissions '0444' platform/chrome: cros_ec_sysfs: use permission-specific DEVICE_ATTR variants platform/chrome: cros_ec_sysfs: introduce to_cros_ec_dev define. platform/chrome: cros_ec_sysfs: Modify error handling platform/chrome: cros_ec_lpc: Add support for Google devices using custom coreboot firmware platform/chrome: cros_ec_lpc: wake up from s2idle on Chrome EC Input: atmel_mxt_ts - remove platform data support platform/chrome: chromeos_laptop - discard data for unneeded boards platform/chrome: chromeos_laptop - use device properties for Pixel platform/chrome: chromeos_laptop - rely on I2C to set up interrupt trigger platform/chrome: chromeos_laptop - use I2C notifier to create devices platform/chrome: chromeos_laptop - parse DMI IRQ data once platform/chrome: chromeos_laptop - rework i2c peripherals initialization platform/chrome: chromeos_laptop - factor out getting IRQ from DMI platform/chrome: chromeos_laptop - introduce pr_fmt() platform/chrome: chromeos_laptop - stop setting suspend mode for Atmel devices platform/chrome: chromeos_laptop - add SPDX identifier Input: atmel_mxt_ts - switch ChromeOS ACPI devices to generic props ... commit ca4e7c51201fc47b2668d58faaa3b46a99d1a233 Merge: daf3ef6 b44c4dd Author: Linus Torvalds Date: Fri Apr 13 15:51:06 2018 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "The large diff this time around is from the addition of a new clk driver for the TI Davinci family of SoCs. So far those clks have been supported with a custom implementation of the clk API in the arch port instead of in the CCF. With this driver merged we're one step closer to having a single clk API implementation. The other large diff is from the Amlogic clk driver that underwent some major surgery to use regmap. Beyond that, the biggest hitter is Samsung which needed some reworks to properly handle clk provider power domains and a bunch of PLL rate updates. The core framework was fairly quiet this round, just getting some cleanups and small fixes for some of the more esoteric features. And the usual set of driver non-critical fixes, cleanups, and minor additions are here as well. Core: - Rejig clk_ops::init() to be a little earlier for phase/accuracy ops - debugfs ops macroized to shave some lines of boilerplate code - Always calculate the phase instead of caching it in clk_get_phase() - More __must_check on bulk clk APIs New Drivers: - TI's Davinci family of SoCs - Intel's Stratix10 SoC - stm32mp157 SoC - Allwinner H6 CCU - Silicon Labs SI544 clock generator chip - Renesas R-Car M3-N and V3H SoCs - i.MX6SLL SoCs Removed Drivers: - ST-Ericsson AB8540/9540 Updates: - Mediatek MT2701 and MT7622 audsys support and MT2712 updates - STM32F469 DSI and STM32F769 sdmmc2 support - GPIO clks can sleep now - Spreadtrum SC9860 RTC clks - Nvidia Tegra MBIST workarounds and various minor fixes - Rockchip phase handling fixes and a memory leak plugged - Renesas drivers switch to readl/writel from clk_readl/clk_writel - Renesas gained CPU (Z/Z2) and watchdog support - Rockchip rk3328 display clks and rk3399 1.6GHz PLL support - Qualcomm PM8921 PMIC XO buffers - Amlogic migrates to regmap APIs - TI Keystone clk latching support - Allwinner H3 and H5 video clk fixes - Broadcom BCM2835 PLLs needed another bit to enable - i.MX6SX CKO mux fix and i.MX7D Video PLL divider fix - i.MX6UL/ULL epdc_podf support - Hi3798CV200 COMBPHY0 and USB2_OTG_UTMI and phase support for eMMC" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (233 commits) clk: davinci: add a reset lookup table for psc0 clk: imx: add clock driver for imx6sll dt-bindings: imx: update clock doc for imx6sll clk: imx: add new gate/gate2 wrapper funtion clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux clk: cs2000: set pm_ops in hibernate-compatible way clk: bcm2835: De-assert/assert PLL reset signal when appropriate clk: imx7d: Move clks_init_on before any clock operations clk: imx7d: Correct ahb clk parent select clk: imx7d: Correct dram pll type clk: imx7d: Add USB clock information clk: socfpga: stratix10: add clock driver for Stratix10 platform dt-bindings: documentation: add clock bindings information for Stratix10 clk: ti: fix flag space conflict with clkctrl clocks clk: uniphier: add additional ethernet clock lines for Pro4 clk: uniphier: add SATA clock control support clk: uniphier: add PCIe clock control support clk: Add driver for the si544 clock generator chip clk: davinci: Remove redundant dev_err calls clk: uniphier: add ethernet clock control support for PXs3 ... commit daf3ef6e965d1d51d6ec604a8fc9919b75d5ec3c Merge: 41531f5 6873842 Author: Linus Torvalds Date: Fri Apr 13 15:46:21 2018 -0700 Merge tag 'pwm/for-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "This set of changes adds support for more generations of the RCar controller as well as runtime PM support. The JZ4740 driver gains support for device tree and can now be used on all Ingenic SoCs. Rounding things off is a random assortment of fixes and cleanups all across the board" * tag 'pwm/for-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (29 commits) pwm: rcar: Add suspend/resume support pwm: rcar: Use PM Runtime to control module clock dt-bindings: pwm: rcar: Add bindings for R-Car M3N support pwm: rcar: Fix a condition to prevent mismatch value setting to duty pwm: sysfs: Use put_device() instead of kfree() dt-bindings: pwm: sunxi: Add new compatible strings pwm: sun4i: Simplify controller mapping pwm: sun4i: Drop unused .has_rdy member pwm: sun4i: Properly check current state pwm: Remove depends on AVR32 pwm: stm32: LPTimer: Use 3 cells ->of_xlate() dt-bindings: pwm-stm32-lp: Add #pwm-cells pwm: stm32: Protect common prescaler for all channels pwm: stm32: Remove unused struct device pwm: mediatek: Improve precision in rate calculation pwm: mediatek: Remove redundant MODULE_ALIAS entries pwm: mediatek: Fix up PWM4 and PWM5 malfunction on MT7623 pwm: jz4740: Enable for all Ingenic SoCs pwm: jz4740: Add support for devicetree pwm: jz4740: Implement ->set_polarity() ... commit 41531f58a6513b86f8f379117eca82502022b4a9 Merge: 80a17a5 1991a55 Author: Linus Torvalds Date: Fri Apr 13 15:43:50 2018 -0700 Merge tag 'linux-watchdog-4.17-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - Add Nuvoton NPCM watchdog driver - renesas_wdt: Add R-Car Gen2 support - renesas_wdt: add suspend/resume and restart handler support - hpwdt: convert to watchdog core and improve NMI - improve timeout setting/handling in various drivers - coh901327: make license text and module licence match - fix error handling in asm9260_wdt, sprd_wdt and davinci_wdt - aspeed imrovements - dw improvements (for control register & suspend/resume) - add SPDX identifiers for watchdog subsystem * tag 'linux-watchdog-4.17-rc1' of git://www.linux-watchdog.org/linux-watchdog: (35 commits) watchdog: davinci_wdt: fix error handling in davinci_wdt_probe() watchdog: add SPDX identifiers for watchdog subsystem watchdog: aspeed: Allow configuring for alternate boot watchdog: Add Nuvoton NPCM watchdog driver dt-bindings: watchdog: Add Nuvoton NPCM description watchdog: dw: save/restore control and timeout across suspend/resume watchdog: dw: RMW the control register watchdog: sprd_wdt: Fix error handling in sprd_wdt_enable() watchdog: aspeed: Fix translation of reset mode to ctrl register watchdog: renesas_wdt: Add restart handler watchdog: renesas_wdt: Add R-Car Gen2 support watchdog: renesas_wdt: Add suspend/resume support watchdog: f71808e_wdt: Fix WD_EN register read watchdog: hpwdt: Update driver version. watchdog: hpwdt: Add dynamic debug watchdog: hpwdt: Programable Pretimeout NMI watchdog: hpwdt: remove allow_kdump module parameter. watchdog: hpwdt: condition early return of NMI handler on iLO5 watchdog: hpwdt: Modify to use watchdog core. watchdog: hpwdt: Update nmi_panic message. ... commit 80a17a5f501ea048d86f81d629c94062b76610d4 Merge: edda415 588558e Author: Linus Torvalds Date: Fri Apr 13 15:38:53 2018 -0700 Merge tag 'apparmor-pr-2018-04-10' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor Pull apparmor updates from John Johansen: "Features: - add base infrastructure for socket mediation. ABI bump and additional checks to ensure only v8 compliant policy uses socket af mediation. - improve and cleanup dfa verification - improve profile attachment logic - improve overlapping expression handling - add the xattr matching to the attachment logic - improve signal mediation handling with stacked labels - improve handling of no_new_privs in a label stack Cleanups and changes: - use dfa to parse string split - bounded version of label_parse - proper line wrap nulldfa.in - split context out into task and cred naming to better match usage - simplify code in aafs Bug fixes: - fix display of .ns_name for containers - fix resource audit messages when auditing peer - fix logging of the existence test for signals - fix resource audit messages when auditing peer - fix display of .ns_name for containers - fix an error code in verify_table_headers() - fix memory leak on buffer on error exit path - fix error returns checks by making size a ssize_t" * tag 'apparmor-pr-2018-04-10' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: (36 commits) apparmor: fix memory leak on buffer on error exit path apparmor: fix dangling symlinks to policy rawdata after replacement apparmor: Fix an error code in verify_table_headers() apparmor: fix error returns checks by making size a ssize_t apparmor: update MAINTAINERS file git and wiki locations apparmor: remove POLICY_MEDIATES_SAFE apparmor: add base infastructure for socket mediation apparmor: improve overlapping domain attachment resolution apparmor: convert attaching profiles via xattrs to use dfa matching apparmor: Add support for attaching profiles via xattr, presence and value apparmor: cleanup: simplify code to get ns symlink name apparmor: cleanup create_aafs() error path apparmor: dfa split verification of table headers apparmor: dfa add support for state differential encoding apparmor: dfa move character match into a macro apparmor: update domain transitions that are subsets of confinement at nnp apparmor: move context.h to cred.h apparmor: move task related defines and fns to task.X files apparmor: cleanup, drop unused fn __aa_task_is_confined() apparmor: cleanup fixup description of aa_replace_profiles ... commit edda415314804c29fa07e538938fa07947012d8f Merge: 3e565a3 bb06ec31 Author: Linus Torvalds Date: Fri Apr 13 15:15:15 2018 -0700 Merge tag 'for-linus-20180413' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Followup fixes for this merge window. This contains: - Series from Ming, fixing corner cases in our CPU <-> queue mapping. This triggered repeated warnings on especially s390, but I also hit it in cpu hot plug/unplug testing while doing IO on NVMe on x86-64. - Another fix from Ming, ensuring that we always order budget and driver tag identically, avoiding a deadlock on QD=1 devices. - Loop locking regression fix from this merge window, from Omar. - Another loop locking fix, this time missing an unlock, from Tetsuo Handa. - Fix for racing IO submission with device removal from Bart. - sr reference fix from me, fixing a case where disk change or getevents can race with device removal. - Set of nvme fixes by way of Keith, from various contributors" * tag 'for-linus-20180413' of git://git.kernel.dk/linux-block: (28 commits) nvme: expand nvmf_check_if_ready checks nvme: Use admin command effects for admin commands nvmet: fix space padding in serial number nvme: check return value of init_srcu_struct function nvmet: Fix nvmet_execute_write_zeroes sector count nvme-pci: Separate IO and admin queue IRQ vectors nvme-pci: Remove unused queue parameter nvme-pci: Skip queue deletion if there are no queues nvme: target: fix buffer overflow nvme: don't send keep-alives to the discovery controller nvme: unexport nvme_start_keep_alive nvme-loop: fix kernel oops in case of unhandled command nvme: enforce 64bit offset for nvme_get_log_ext fn sr: get/drop reference to device in revalidate and check_events blk-mq: Revert "blk-mq: reimplement blk_mq_hw_queue_mapped" blk-mq: Avoid that submitting a bio concurrently with device removal triggers a crash backing: silence compiler warning using __printf blk-mq: remove code for dealing with remapping queue blk-mq: reimplement blk_mq_hw_queue_mapped blk-mq: don't check queue mapped in __blk_mq_delay_run_hw_queue() ... commit 3e565a351ed3e94352bfbe0be06c659fc8fafb19 Merge: 1bad9ce 1eace83 Author: Linus Torvalds Date: Fri Apr 13 15:13:18 2018 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull more i2c updates from Wolfram Sang: - hot bugfix for i801 to make laptops with strange BIOS reboot again when using SMBUS Host notify - change to MAINTAINERS creating a specific fallback entry for I2C host drivers and settings its status to "Odd fixes" - a long overdue param checking for the I2C core * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: add param sanity check to i2c_transfer() MAINTAINERS: add maintainer for Renesas I2C related drivers MAINTAINERS: remove me as maintainer for I2C host drivers i2c: i801: Restore configuration at shutdown i2c: i801: Save register SMBSLVCMD value only once commit 1bad9ce155a7c010a9a5f3261ad12a6a8eccfb2c Merge: e4e57f2 bf9c7e3 Author: Linus Torvalds Date: Fri Apr 13 12:27:11 2018 -0700 Merge tag 'sh-for-4.17' of git://git.libc.org/linux-sh Pull arch/sh updates from Rich Felker: "Fixes for bugs in futex, device tree, and userspace breakpoint traps, and for PCI issues on SH7786" * tag 'sh-for-4.17' of git://git.libc.org/linux-sh: arch/sh: pcie-sh7786: handle non-zero DMA offset arch/sh: pcie-sh7786: adjust the memory mapping arch/sh: pcie-sh7786: adjust PCI MEM and IO regions arch/sh: pcie-sh7786: exclude unusable PCI MEM areas arch/sh: pcie-sh7786: mark unavailable PCI resource as disabled arch/sh: pci: don't use disabled resources arch/sh: make the DMA mapping operations observe dev->dma_pfn_offset arch/sh: add sh7786_mm_sel() function sh: fix debug trap failure to process signals before return to user sh: fix memory corruption of unflattened device tree sh: fix futex FUTEX_OP_SET op on userspace addresses commit e4e57f20fa12ce044fa2b9fec204098799485539 Merge: 6c21e43 24534b3 Author: Linus Torvalds Date: Fri Apr 13 11:24:18 2018 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull more arm64 updates from Will Deacon: "A few late updates to address some issues arising from conflicts with other trees: - Removal of Qualcomm-specific Spectre-v2 mitigation in favour of the generic SMCCC-based firmware call - Fix EL2 hardening capability checking, which was bodged to reduce conflicts with the KVM tree - Add some currently unused assembler macros for managing SIMD registers which will be used by some crypto code in the next merge window" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: assembler: add macros to conditionally yield the NEON under PREEMPT arm64: assembler: add utility macros to push/pop stack frames arm64: Move the content of bpi.S to hyp-entry.S arm64: Get rid of __smccc_workaround_1_hvc_* arm64: capabilities: Rework EL2 vector hardening entry arm64: KVM: Use SMCCC_ARCH_WORKAROUND_1 for Falkor BP hardening commit 6c21e4334adaf1ea0f74349be01adddf40e36a27 Merge: 16e205c 6a3d1e8 Author: Linus Torvalds Date: Fri Apr 13 09:43:20 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Martin Schwidefsky: "Three notable larger changes next to the usual bug fixing: - update the email addresses in MAINTAINERS for the s390 folks to use the simpler linux.ibm.com domain instead of the old linux.vnet.ibm.com - an update for the zcrypt device driver that removes some old and obsolete interfaces and add support for up to 256 crypto adapters - a rework of the IPL aka boot code" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (23 commits) s390: correct nospec auto detection init order s390/zcrypt: Support up to 256 crypto adapters. s390/zcrypt: Remove deprecated zcrypt proc interface. s390/zcrypt: Remove deprecated ioctls. s390/zcrypt: Make ap init functions static. MAINTAINERS: update s390 maintainers email addresses s390/ipl: remove reipl_method and dump_method s390/ipl: correct kdump reipl block checksum calculation s390/ipl: remove non-existing functions declaration s390: assume diag308 set always works s390/ipl: avoid adding scpdata to cmdline during ftp/dvd boot s390/ipl: correct ipl parmblock valid checks s390/ipl: rely on diag308 store to get ipl info s390/ipl: move ipl_flags to ipl.c s390/ipl: get rid of ipl_ssid and ipl_devno s390/ipl: unite diag308 and scsi boot ipl blocks s390/ipl: ensure loadparm valid flag is set s390/qdio: lock device while installing IRQ handler s390/qdio: clear intparm during shutdown s390/ccwgroup: require at least one ccw device ... commit c5042dacec877a5cbade94ec29016fd43d5f6c78 Merge: 9267c43 f726214 Author: David S. Miller Date: Fri Apr 13 12:17:27 2018 -0400 Merge branch 'l2tp-remove-unsafe-calls-to-l2tp_tunnel_find_nth' Guillaume Nault says: ==================== l2tp: remove unsafe calls to l2tp_tunnel_find_nth() Using l2tp_tunnel_find_nth() is racy, because the returned tunnel can go away as soon as this function returns. This series introduce l2tp_tunnel_get_nth() as a safe replacement to fixes these races. With this series, all unsafe tunnel/session lookups are finally gone. ==================== Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit f726214d9b23e5fce8c11937577a289a3202498f Author: Guillaume Nault Date: Thu Apr 12 20:50:35 2018 +0200 l2tp: hold reference on tunnels printed in l2tp/tunnels debugfs file Use l2tp_tunnel_get_nth() instead of l2tp_tunnel_find_nth(), to be safe against concurrent tunnel deletion. Use the same mechanism as in l2tp_ppp.c for dropping the reference taken by l2tp_tunnel_get_nth(). That is, drop the reference just before looking up the next tunnel. In case of error, drop the last accessed tunnel in l2tp_dfs_seq_stop(). That was the last use of l2tp_tunnel_find_nth(). Fixes: 0ad6614048cf ("l2tp: Add debugfs files for dumping l2tp debug info") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 20 -------------------- net/l2tp/l2tp_core.h | 1 - net/l2tp/l2tp_debugfs.c | 15 +++++++++++++-- 3 files changed, 13 insertions(+), 23 deletions(-) commit 0e0c3fee3a59a387aeecc4fca6f3a2e9615a5443 Author: Guillaume Nault Date: Thu Apr 12 20:50:34 2018 +0200 l2tp: hold reference on tunnels printed in pppol2tp proc file Use l2tp_tunnel_get_nth() instead of l2tp_tunnel_find_nth(), to be safe against concurrent tunnel deletion. Unlike sessions, we can't drop the reference held on tunnels in pppol2tp_seq_show(). Tunnels are reused across several calls to pppol2tp_seq_start() when iterating over sessions. These iterations need the tunnel for accessing the next session. Therefore the only safe moment for dropping the reference is just before searching for the next tunnel. Normally, the last invocation of pppol2tp_next_tunnel() doesn't find any new tunnel, so it drops the last tunnel without taking any new reference. However, in case of error, pppol2tp_seq_stop() is called directly, so we have to drop the reference there. Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ppp.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 5846c131c39b6d0add36ec19dc8650700690f930 Author: Guillaume Nault Date: Thu Apr 12 20:50:33 2018 +0200 l2tp: hold reference on tunnels in netlink dumps l2tp_tunnel_find_nth() is unsafe: no reference is held on the returned tunnel, therefore it can be freed whenever the caller uses it. This patch defines l2tp_tunnel_get_nth() which works similarly, but also takes a reference on the returned tunnel. The caller then has to drop it after it stops using the tunnel. Convert netlink dumps to make them safe against concurrent tunnel deletion. Fixes: 309795f4bec2 ("l2tp: Add netlink control API for L2TP") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 20 ++++++++++++++++++++ net/l2tp/l2tp_core.h | 2 ++ net/l2tp/l2tp_netlink.c | 11 ++++++++--- 3 files changed, 30 insertions(+), 3 deletions(-) commit 9267c430c6b6f4c0120e3c6bb847313d633f02a6 Author: Jason Wang Date: Fri Apr 13 14:58:25 2018 +0800 virtio-net: add missing virtqueue kick when flushing packets We tends to batch submitting packets during XDP_TX. This requires to kick virtqueue after a batch, we tried to do it through xdp_do_flush_map() which only makes sense for devmap not XDP_TX. So explicitly kick the virtqueue in this case. Reported-by: Kimitoshi Takahashi Tested-by: Kimitoshi Takahashi Cc: Daniel Borkmann Fixes: 186b3c998c50 ("virtio-net: support XDP_REDIRECT") Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 17baab68d337a0bf4654091e2b4cd67c3fdb44d8 Author: Don Zickus Date: Wed Apr 11 15:15:37 2018 -0400 kconfig: extend output of 'listnewconfig' We at Red Hat/Fedora have generally tried to have a per file breakdown of every config option we set. This makes it easy for us to add new options when they are exposed and keep a changelog of why they were set. A Fedora example is here: https://src.fedoraproject.org/cgit/rpms/kernel.git/tree/configs/fedora/generic Using various merge scripts, we build up a config file and run it through 'make listnewconfig' and 'make oldnoconfig'. The idea is to print out new config options that haven't been manually set and use the default until a patch is posted to set it properly. To speed things up, it would be nice to make it easier to generate a patch to post the default setting. The output of 'make listnewconfig' has two issues that limit us: - it doesn't provide the default value - it doesn't provide the new 'choice' options that get flagged in 'oldconfig' This patch extends 'listnewconfig' to address the above two issues. This allows us to run a script make listnewconfig | rhconfig-tool -o patches; git send-email patches/ The output of 'make listnewconfig': CONFIG_NET_EMATCH_IPT CONFIG_IPVLAN CONFIG_ICE CONFIG_NET_VENDOR_NI CONFIG_IEEE802154_MCR20A CONFIG_IR_IMON_DECODER CONFIG_IR_IMON_RAW The new output of 'make listnewconfig': CONFIG_KERNEL_XZ=n CONFIG_KERNEL_LZO=n CONFIG_NET_EMATCH_IPT=n CONFIG_IPVLAN=n CONFIG_ICE=n CONFIG_NET_VENDOR_NI=y CONFIG_IEEE802154_MCR20A=n CONFIG_IR_IMON_DECODER=n CONFIG_IR_IMON_RAW=n Signed-off-by: Don Zickus Signed-off-by: Masahiro Yamada scripts/kconfig/conf.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit eea6f62bc2d67e42dd553181a68984268a03594f Author: Javier Martinez Canillas Date: Wed Apr 11 20:15:24 2018 +0200 kbuild: rpm-pkg: use kernel-install as a fallback for new-kernel-pkg The new-kernel-pkg script is only present when grubby is installed, but it may not always be the case. So if the script isn't present, attempt to use the kernel-install script as a fallback instead. Signed-off-by: Javier Martinez Canillas Signed-off-by: Masahiro Yamada scripts/package/mkspec | 2 ++ 1 file changed, 2 insertions(+) commit 5d41be6f702f19f72db816c17175caf9dbdcdfa6 Author: Qu Wenruo Date: Fri Apr 13 06:32:47 2018 +0800 btrfs: Only check first key for committed tree blocks When looping btrfs/074 with many cpus (>= 8), it's possible to trigger kernel warning due to first key verification: [ 4239.523446] WARNING: CPU: 5 PID: 2381 at fs/btrfs/disk-io.c:460 btree_read_extent_buffer_pages+0x1ad/0x210 [ 4239.523830] Modules linked in: [ 4239.524630] RIP: 0010:btree_read_extent_buffer_pages+0x1ad/0x210 [ 4239.527101] Call Trace: [ 4239.527251] read_tree_block+0x42/0x70 [ 4239.527434] read_node_slot+0xd2/0x110 [ 4239.527632] push_leaf_right+0xad/0x1b0 [ 4239.527809] split_leaf+0x4ea/0x700 [ 4239.527988] ? leaf_space_used+0xbc/0xe0 [ 4239.528192] ? btrfs_set_lock_blocking_rw+0x99/0xb0 [ 4239.528416] btrfs_search_slot+0x8cc/0xa40 [ 4239.528605] btrfs_insert_empty_items+0x71/0xc0 [ 4239.528798] __btrfs_run_delayed_refs+0xa98/0x1680 [ 4239.529013] btrfs_run_delayed_refs+0x10b/0x1b0 [ 4239.529205] btrfs_commit_transaction+0x33/0xaf0 [ 4239.529445] ? start_transaction+0xa8/0x4f0 [ 4239.529630] btrfs_alloc_data_chunk_ondemand+0x1b0/0x4e0 [ 4239.529833] btrfs_check_data_free_space+0x54/0xa0 [ 4239.530045] btrfs_delalloc_reserve_space+0x25/0x70 [ 4239.531907] btrfs_direct_IO+0x233/0x3d0 [ 4239.532098] generic_file_direct_write+0xcb/0x170 [ 4239.532296] btrfs_file_write_iter+0x2bb/0x5f4 [ 4239.532491] aio_write+0xe2/0x180 [ 4239.532669] ? lock_acquire+0xac/0x1e0 [ 4239.532839] ? __might_fault+0x3e/0x90 [ 4239.533032] do_io_submit+0x594/0x860 [ 4239.533223] ? do_io_submit+0x594/0x860 [ 4239.533398] SyS_io_submit+0x10/0x20 [ 4239.533560] ? SyS_io_submit+0x10/0x20 [ 4239.533729] do_syscall_64+0x75/0x1d0 [ 4239.533979] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 4239.534182] RIP: 0033:0x7f8519741697 The problem here is, at btree_read_extent_buffer_pages() we don't have acquired read/write lock on that extent buffer, only basic info like level/bytenr is reliable. So race condition leads to such false alert. However in current call site, it's impossible to acquire proper lock without race window. To fix the problem, we only verify first key for committed tree blocks (whose generation is no larger than fs_info->last_trans_committed), so the content of such tree blocks will not change and there is no need to get read/write lock. Reported-by: Nikolay Borisov Fixes: 581c1760415c ("btrfs: Validate child tree block's level and first key") Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 96348e49366c6e2a5a2e62ba0350f66ef5d67ea7 Author: Amir Goldstein Date: Thu Apr 5 16:18:05 2018 +0300 MAINTAINERS: add an entry for FSNOTIFY infrastructure There is alreay an entry for all the backends, but those entries do not cover all the fsnotify files. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8e984f8667ff4225092af734eef28a3d7bae8626 Author: Amir Goldstein Date: Thu Apr 5 16:18:04 2018 +0300 fsnotify: fix typo in a comment about mark->g_list Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara include/linux/fsnotify_backend.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92183a42898dc400b89da35685d1814ac6acd3d8 Author: Amir Goldstein Date: Thu Apr 5 16:18:03 2018 +0300 fsnotify: fix ignore mask logic in send_to_group() The ignore mask logic in send_to_group() does not match the logic in fanotify_should_send_event(). In the latter, a vfsmount mark ignore mask precedes an inode mark mask and in the former, it does not. That difference may cause events to be sent to fanotify backend for no reason. Fix the logic in send_to_group() to match that of fanotify_should_send_event(). Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fsnotify.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit 81b654c273914704a4bdf580f28d67aaba1094e4 Author: Michael Ellerman Date: Thu Apr 12 22:24:45 2018 +1000 powerpc/64s: Fix CPU_FTRS_ALWAYS vs DT CPU features The cpu_has_feature() mechanism has an optimisation where at build time we construct a mask of the CPU feature bits that will always be true for the given .config, based on the platform/bitness/etc. that we are building for. That is incompatible with DT CPU features, where the set of CPU features is dependent on feature flags that are given to us by firmware. The result is that some feature bits can not be *disabled* by DT CPU features. Or more accurately, they can be disabled but they will still appear in the ALWAYS mask, meaning cpu_has_feature() will always return true for them. In the past this hasn't really been a problem because on Book3S 64 (where we support DT CPU features), the set of ALWAYS bits has been very small. That was because we always built for POWER4 and later, meaning the set of common bits was small. The only bit that could be cleared by DT CPU features that was also in the ALWAYS mask was CPU_FTR_NODSISRALIGN, and that was only used in the alignment handler to create a fake DSISR. That code was itself deleted in 31bfdb036f12 ("powerpc: Use instruction emulation infrastructure to handle alignment faults") (Sep 2017). However the set of ALWAYS features changed with the recent commit db5ae1c155af ("powerpc/64s: Refine feature sets for little endian builds") which restricted the set of feature flags when building little endian to Power7 or later. That caused the ALWAYS mask to become much larger for little endian builds. The result is that the following feature bits can currently not be *disabled* by DT CPU features: CPU_FTR_REAL_LE, CPU_FTR_MMCRA, CPU_FTR_CTRL, CPU_FTR_SMT, CPU_FTR_PURR, CPU_FTR_SPURR, CPU_FTR_DSCR, CPU_FTR_PKEY, CPU_FTR_VMX_COPY, CPU_FTR_CFAR, CPU_FTR_HAS_PPR. To fix it we need to mask the set of ALWAYS features with the base set of DT CPU features, ie. the features that are always enabled by DT CPU features. That way there are no bits in the ALWAYS mask that are not also always set by DT CPU features. Fixes: db5ae1c155af ("powerpc/64s: Refine feature sets for little endian builds") Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 23 +++++++++++++++++++++-- arch/powerpc/kernel/dt_cpu_ftrs.c | 14 +------------- 2 files changed, 22 insertions(+), 15 deletions(-) commit 712ff25450bd01366301eef81c33e865d901e7b7 Author: Jean Delvare Date: Fri Apr 13 15:37:59 2018 +0200 firmware: dmi_scan: Use lowercase letters for UUID RFC 4122 asks for letters a-f in UUID to be lowercase. Follow this recommendation. Suggested by Paul Dagnelie at: https://savannah.nongnu.org/bugs/index.php?53569 Signed-off-by: Jean Delvare drivers/firmware/dmi_scan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit de40614de997a388499f9a01d5eeb7cd8d3c34d1 Author: Alex Hung Date: Fri Apr 13 15:37:59 2018 +0200 firmware: dmi_scan: Add DMI_OEM_STRING support to dmi_matches OEM strings are defined by each OEM and they contain customized and useful OEM information. Supporting it provides more flexible uses of the dmi_matches function. Signed-off-by: Alex Hung Signed-off-by: Jean Delvare drivers/firmware/dmi_scan.c | 10 +++++++++- include/linux/mod_devicetable.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) commit 90fe6f8ff00a07641ca893d64f75ca22ce77cca2 Author: Jean Delvare Date: Fri Apr 13 15:37:59 2018 +0200 firmware: dmi_scan: Fix UUID length safety check The test which ensures that the DMI type 1 structure is long enough to hold the UUID is off by one. It would fail if the structure is exactly 24 bytes long, while that's sufficient to hold the UUID. I don't expect this bug to cause problem in practice because all implementations I have seen had length 8, 25 or 27 bytes, in line with the SMBIOS specifications. But let's fix it still. Signed-off-by: Jean Delvare Fixes: a814c3597a6b ("firmware: dmi_scan: Check DMI structure length") Reviewed-by: Mika Westerberg drivers/firmware/dmi_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0d5c81e872ed21de1e56feb0fa6e4161da7be61 Author: Arnaldo Carvalho de Melo Date: Thu Apr 12 16:28:18 2018 -0300 perf annotate: Handle variables in 'sub', 'or' and many other instructions Just like is done for 'mov' and others that can have as source or targets variables resolved by objdump, to make them more compact: - orb $0x4,0x224d71(%rip) # 226ca4 <_rtld_global+0xca4> + orb $0x4,_rtld_global+0xca4 Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Martin Liška Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Thomas Richter Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-efex7746id4w4wa03nqxvh3m@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/annotate/instructions.c | 67 ++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) commit 43c4023152a9c5742948ac919e58ade127fa4e2e Author: Arnaldo Carvalho de Melo Date: Thu Apr 12 15:23:02 2018 -0300 perf annotate: Allow setting the offset level in .perfconfig The default is 1 (jump_target): # perf annotate --ignore-vmlinux --stdio2 _raw_spin_lock_irqsave Samples: 3K of event 'cycles:ppp', 3000 Hz, Event count (approx.): 2766398574 _raw_spin_lock_irqsave() /proc/kcore 0.26 nop 4.61 push %rbx 19.33 pushfq 7.97 pop %rax 0.32 nop 0.06 mov %rax,%rbx 14.63 cli 0.06 nop xor %eax,%eax mov $0x1,%edx 49.94 lock cmpxchg %edx,(%rdi) 0.16 test %eax,%eax ↓ jne 2b 2.66 mov %rbx,%rax pop %rbx ← retq 2b: mov %eax,%esi → callq *ffffffffb30eaed0 mov %rbx,%rax pop %rbx ← retq # But one can ask for showing offsets for call instructions by setting this: # perf annotate --ignore-vmlinux --stdio2 _raw_spin_lock_irqsave Samples: 3K of event 'cycles:ppp', 3000 Hz, Event count (approx.): 2766398574 _raw_spin_lock_irqsave() /proc/kcore 0.26 nop 4.61 push %rbx 19.33 pushfq 7.97 pop %rax 0.32 nop 0.06 mov %rax,%rbx 14.63 cli 0.06 nop xor %eax,%eax mov $0x1,%edx 49.94 lock cmpxchg %edx,(%rdi) 0.16 test %eax,%eax ↓ jne 2b 2.66 mov %rbx,%rax pop %rbx ← retq 2b: mov %eax,%esi 2d: → callq *ffffffffb30eaed0 mov %rbx,%rax pop %rbx ← retq # Or using a big value to ask for all offsets to be shown: # cat ~/.perfconfig [annotate] offset_level = 100 hide_src_code = true # perf annotate --ignore-vmlinux --stdio2 _raw_spin_lock_irqsave Samples: 3K of event 'cycles:ppp', 3000 Hz, Event count (approx.): 2766398574 _raw_spin_lock_irqsave() /proc/kcore 0.26 0: nop 4.61 5: push %rbx 19.33 6: pushfq 7.97 7: pop %rax 0.32 8: nop 0.06 d: mov %rax,%rbx 14.63 10: cli 0.06 11: nop 17: xor %eax,%eax 19: mov $0x1,%edx 49.94 1e: lock cmpxchg %edx,(%rdi) 0.16 22: test %eax,%eax 24: ↓ jne 2b 2.66 26: mov %rbx,%rax 29: pop %rbx 2a: ← retq 2b: mov %eax,%esi 2d: → callq *ffffffffb30eaed0 32: mov %rbx,%rax 35: pop %rbx 36: ← retq # This also affects the TUI, i.e. the default 'perf annotate' and 'perf top/report' -> A hotkey -> annotate interfaces, when slang-devel is present in the build, i.e.: # perf version --build-options | grep slang libslang: [ on ] # HAVE_SLANG_SUPPORT # Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Martin Liška Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Thomas Richter Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-venm6x5zrt40eu8hxdsmqxz6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-config.txt | 5 +++++ tools/perf/util/annotate.c | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) commit 7b366142a50ad79e48de8e67c5b3e8cfb9fa82dd Author: Arnaldo Carvalho de Melo Date: Thu Apr 12 14:58:24 2018 -0300 perf report: Fix switching to another perf.data file In the TUI the 's' hotkey can be used to switch to another perf.data file in the current directory, but that got broken in Fixes: b01141f4f59c ("perf annotate: Initialize the priv are in symbol__new()"), that would show this once another file was chosen: ┌─Fatal Error─────────────────────────────────────┐ │Annotation needs to be init before symbol__init()│ │ │ │ │ │Press any key... │ └─────────────────────────────────────────────────┘ Fix it by just silently bailing out if symbol__annotation_init() was already called, just like is done with symbol__init(), i.e. they are done just once at session start, not when switching to a new perf.data file. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Martin Liška Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Thomas Richter Cc: Wang Nan Fixes: b01141f4f59c ("perf annotate: Initialize the priv are in symbol__new()") Link: https://lkml.kernel.org/n/tip-ogppdtpzfax7y1h6gjdv5s6u@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 4f75f1cbf95e2f0853cd229d042b203931b899af Author: Thomas Richter Date: Thu Apr 12 15:32:46 2018 +0200 perf record: Change warning for missing sysfs entry to debug Using perf on 4.16.0 kernel on s390 shows this warning: failed: can't open node sysfs data each time I run command perf record ... for example: [root@s35lp76 perf]# ./perf record -e rB0000 -- sleep 1 [ perf record: Woken up 1 times to write data ] failed: can't open node sysfs data [ perf record: Captured and wrote 0.001 MB perf.data (4 samples) ] [root@s35lp76 perf]# It turns out commit e2091cedd51bf ("perf tools: Add MEM_TOPOLOGY feature to perf data file") tries to open directory named /sys/devices/system/node/ which does not exist on s390. This is the call stack: __cmd_record +---> perf_session__write_header +---> perf_header__adds_write +---> do_write_feat +---> write_mem_topology +---> build_mem_topology prints warning The issue starts in do_write_feat() which unconditionally loops over all features and now includes HEADER_MEM_TOPOLOGY and calls write_mem_topology(). Function record__init_features() at the beginning of __cmd_record() sets all features and then turns off some of them. Fix this by changing the warning to a level 2 debug output statement. So it is only shown when debug level 2 or higher is set. Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180412133246.92801-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit af82800cd2d9cfcae2de1b47a35c26c147b9cdd1 Author: wangbo Date: Thu Apr 12 16:58:08 2018 +0800 spi: imx: Update MODULE_DESCRIPTION to "SPI Controller driver" Now i.MX SPI controller can work in Slave mode. Update MODULE_DESCRIPTION to "SPI Controller driver". Signed-off-by: wangbo Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0f8b9c5a350ca6fa842b52bfb88b77b34ee485b Author: Danny Smith Date: Mon Apr 9 15:13:35 2018 +0200 ASoC: adau17x1: Handling of DSP_RUN register during fw setup DSP_RUN needs to be disabled during firmware write otherwise we can end up with undefined behavior if writing to a dsp which is already running firmware. Signed-off-by: Danny Smith Signed-off-by: Robert Rosengren Acked-by: Lars-Peter Clausen Signed-off-by: Mark Brown sound/soc/codecs/adau17x1.c | 26 ++++++++++++++++++++------ sound/soc/codecs/adau17x1.h | 3 ++- 2 files changed, 22 insertions(+), 7 deletions(-) commit b907b408ca64482989cd95dacef804ce509a3673 Merge: 8ea2295 cf1ba1d Author: Zhang Rui Date: Fri Apr 13 14:11:53 2018 +0800 Merge branches 'thermal-core' and 'thermal-soc' into next commit 16e205cf42da1f497b10a4a24f563e6c0d574eec Merge: affb028 a10beab Author: Linus Torvalds Date: Thu Apr 12 20:56:10 2018 -0700 Merge tag 'drm-fixes-for-v4.17-rc1' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "One omap, and one alsa pm fix (we merged the breaking patch via drm tree). Otherwise it's two bunches of amdgpu fixes, removing an unneeded file, some DC fixes, HDMI audio regression fix, and some vega12 fixes" * tag 'drm-fixes-for-v4.17-rc1' of git://people.freedesktop.org/~airlied/linux: (27 commits) Revert "drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2)" Revert "drm/amd/display: fix dereferencing possible ERR_PTR()" drm/amd/display: Fix regamma not affecting full-intensity color values drm/amd/display: Fix FBC text console corruption drm/amd/display: Only register backlight device if embedded panel connected drm/amd/display: fix brightness level after resume from suspend drm/amd/display: HDMI has no sound after Panel power off/on drm/amdgpu: add MP1 and THM hw ip base reg offset drm/amdgpu: fix null pointer panic with direct fw loading on gpu reset drm/radeon: add PX quirk for Asus K73TK drm/omap: fix crash if there's no video PLL drm/amdgpu: Fix memory leaks at amdgpu_init() error path drm/amdgpu: Fix PCIe lane width calculation drm/radeon: Fix PCIe lane width calculation drm/amdgpu/si: implement get/set pcie_lanes asic callback drm/amdgpu: Add support for SRBM selection v3 Revert "drm/amdgpu: Don't change preferred domian when fallback GTT v5" drm/amd/powerply: fix power reading on Fiji drm/amd/powerplay: Enable ACG SS feature drm/amdgpu/sdma: fix mask in emit_pipeline_sync ... commit affb028071492048ce1d8fa37e5e4236152b02cc Merge: ee9294d 0b3dec0 Author: Linus Torvalds Date: Thu Apr 12 20:54:01 2018 -0700 Merge tag 'trace-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "A few clean ups and bug fixes: - replace open coded "ARRAY_SIZE()" with macro - updates to uprobes - bug fix for perf event filter on error path" * tag 'trace-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Enforce passing in filter=NULL to create_filter() trace_uprobe: Simplify probes_seq_show() trace_uprobe: Use %lx to display offset tracing/uprobe: Add support for overlayfs tracing: Use ARRAY_SIZE() macro instead of open coding it commit ee9294d6ddbd418807ae49f4ab4e6441c9da2a18 Author: Alexey Dobriyan Date: Thu Apr 12 23:31:17 2018 +0300 proc: fixup copyright sign Add copyright in two files before they get autorubberstamped. Signed-off-by: Alexey Dobriyan Signed-off-by: Linus Torvalds tools/testing/selftests/proc/proc-loadavg-001.c | 2 +- tools/testing/selftests/proc/proc-self-map-files-001.c | 2 +- tools/testing/selftests/proc/proc-self-map-files-002.c | 2 +- tools/testing/selftests/proc/proc-self-syscall.c | 15 +++++++++++++++ tools/testing/selftests/proc/proc-self-wchan.c | 15 +++++++++++++++ tools/testing/selftests/proc/proc-uptime-001.c | 2 +- tools/testing/selftests/proc/proc-uptime-002.c | 2 +- tools/testing/selftests/proc/proc-uptime.h | 2 +- tools/testing/selftests/proc/read.c | 2 +- 9 files changed, 37 insertions(+), 7 deletions(-) commit 0c314a95150dce58953ca366c1c66791e424367c Merge: 681857e adf5845 Author: Linus Torvalds Date: Thu Apr 12 20:50:38 2018 -0700 Merge tag 'pci-v4.17-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - mark Extended Tags as broken on Broadcom HT1100 and HT2000 Root Ports to fix drm/Xorg hangs and unresponsive keyboards (Sinan Kaya) - remove useless messages during resource reassignment (Desnes A. Nunes do Rosario) * tag 'pci-v4.17-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Remove messages about reassigning resources PCI: Mark Broadcom HT1100 and HT2000 Root Port Extended Tags as broken commit 2290482379278e0254e6edfdb681d88359143fd1 Author: Richard Cochran Date: Mon Apr 9 00:03:14 2018 -0700 net: dsa: mv88e6xxx: Fix receive time stamp race condition. The DSA stack passes received PTP frames to this driver via mv88e6xxx_port_rxtstamp() for deferred delivery. The driver then queues the frame and kicks the worker thread. The work callback reads out the latched receive time stamp and then works through the queue, delivering any non-matching frames without a time stamp. If a new frame arrives after the worker thread has read out the time stamp register but enters the queue before the worker finishes processing the queue, that frame will be delivered without a time stamp. This patch fixes the race by moving the queue onto a list on the stack before reading out the latched time stamp value. Fixes: c6fe0ad2c3499 ("net: dsa: mv88e6xxx: add rx/tx timestamping support") Signed-off-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/hwtstamp.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 53b76cdf7e8fecec1d09e38aad2f8579882591a8 Author: Wolfgang Bumiller Date: Thu Apr 12 10:46:55 2018 +0200 net: fix deadlock while clearing neighbor proxy table When coming from ndisc_netdev_event() in net/ipv6/ndisc.c, neigh_ifdown() is called with &nd_tbl, locking this while clearing the proxy neighbor entries when eg. deleting an interface. Calling the table's pndisc_destructor() with the lock still held, however, can cause a deadlock: When a multicast listener is available an IGMP packet of type ICMPV6_MGM_REDUCTION may be sent out. When reaching ip6_finish_output2(), if no neighbor entry for the target address is found, __neigh_create() is called with &nd_tbl, which it'll want to lock. Move the elements into their own list, then unlock the table and perform the destruction. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199289 Fixes: 6fd6ce2056de ("ipv6: Do not depend on rt->n in ip6_finish_output2().") Signed-off-by: Wolfgang Bumiller Signed-off-by: David S. Miller net/core/neighbour.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 1071ec9d453a38023579714b64a951a2fb982071 Author: Xin Long Date: Thu Apr 12 14:24:31 2018 +0800 sctp: do not check port in sctp_inet6_cmp_addr pf->cmp_addr() is called before binding a v6 address to the sock. It should not check ports, like in sctp_inet_cmp_addr. But sctp_inet6_cmp_addr checks the addr by invoking af(6)->cmp_addr, sctp_v6_cmp_addr where it also compares the ports. This would cause that setsockopt(SCTP_SOCKOPT_BINDX_ADD) could bind multiple duplicated IPv6 addresses after Commit 40b4f0fd74e4 ("sctp: lack the check for ports in sctp_v6_cmp_addr"). This patch is to remove af->cmp_addr called in sctp_inet6_cmp_addr, but do the proper check for both v6 addrs and v4mapped addrs. v1->v2: - define __sctp_v6_cmp_addr to do the common address comparison used for both pf and af v6 cmp_addr. Fixes: 40b4f0fd74e4 ("sctp: lack the check for ports in sctp_v6_cmp_addr") Reported-by: Jianwen Ji Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/ipv6.c | 60 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 837708a89342250b22a51dfb7e527cf079dba73f Merge: 335b929 cf2cbad Author: David S. Miller Date: Thu Apr 12 21:57:28 2018 -0400 Merge branch 'nfp-improve-signal-handing-on-FW-waits-and-flower-control-message-Jakub Kicinski says: ==================== nfp: improve signal handing on FW waits and flower control message processing The first part of this set aims to improve handling of interrupted waits. Patch 1 makes waiting for management FW responses uninterruptible while patch 2 adds a message when signal arrives while waiting for an NFP mutex. We can't interrupt execution of FW commands so uninterruptible sleep seems reasonable there. Exiting a wait for a mutex should be clean and have no side affects so we are allowing to abort it. Note that both waits have rather large timeouts (tens of seconds). Patches 3 and 4 improve flower offload operation under heavy load. Currently there is no cap on the number of queued FW notifications. Some of the notifications have to be processed from a workqueue which may lead to very large number of messages getting queued if workqueue never gets a chance to run. Pieter puts a limit on number of queued messages, tries to drop some messages we ignore without queuing and process more important messages first. ==================== Signed-off-by: David S. Miller processing' commit cf2cbadc20f5651c3dde9f5ac2ee52fb43aa4ddd Author: Pieter Jansen van Vuuren Date: Wed Apr 11 16:47:38 2018 -0700 nfp: flower: split and limit cmsg skb lists Introduce a second skb list for handling control messages and limit the number of allowed messages. Some control messages are considered more crucial than others, resulting in the need for a second skb list. By splitting the list into a separate high and low priority list we can ensure that messages on the high list get added to the head of the list that gets processed, this however has no functional impact. Previously there was no limit on the number of messages allowed on the queue, this could result in the queue growing boundlessly and eventually the host running out of memory. Fixes: b985f870a5f0 ("nfp: process control messages in workqueue in flower app") Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 38 +++++++++++++++++++++--- drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 2 ++ drivers/net/ethernet/netronome/nfp/flower/main.c | 6 ++-- drivers/net/ethernet/netronome/nfp/flower/main.h | 8 +++-- 4 files changed, 46 insertions(+), 8 deletions(-) commit 0b1a989ef5a751b5992842d1934e22de861a848e Author: Pieter Jansen van Vuuren Date: Wed Apr 11 16:47:37 2018 -0700 nfp: flower: move route ack control messages out of the workqueue Previously we processed the route ack control messages in the workqueue, this unnecessarily loads the workqueue. We can deal with these messages sooner as we know we are going to drop them. Fixes: 8e6a9046b66a ("nfp: flower vxlan neighbour offload") Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bc05f9bcd8cb62f935625850e535da183b4a07c0 Author: Jakub Kicinski Date: Wed Apr 11 16:47:36 2018 -0700 nfp: print a message when mutex wait is interrupted When waiting for an NFP mutex is interrupted print a message to make root causing later error messages easier. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp_mutex.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5496295aefe86995e41398b0f76de601308fc3f5 Author: Jakub Kicinski Date: Wed Apr 11 16:47:35 2018 -0700 nfp: ignore signals when communicating with management FW We currently allow signals to interrupt the wait for management FW commands. Exiting the wait should not cause trouble, the FW will just finish executing the command in the background and new commands will wait for the old one to finish. However, this may not be what users expect (Ctrl-C not actually stopping the command). Moreover some systems routinely request link information with signals pending (Ubuntu 14.04 runs a landscape-sysinfo python tool from MOTD) worrying users with errors like these: nfp 0000:04:00.0: nfp_nsp: Error -512 waiting for code 0x0007 to start nfp 0000:04:00.0: nfp: reading port table failed -512 Make the wait for management FW responses non-interruptible. Fixes: 1a64821c6af7 ("nfp: add support for service processor access") Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 335b929b28aeb5bfc0698adb21deaf685b2982d1 Author: Jon Maloy Date: Thu Apr 12 01:15:48 2018 +0200 tipc: fix missing initializer in tipc_sendmsg() The stack variable 'dnode' in __tipc_sendmsg() may theoretically end up tipc_node_get_mtu() as an unitilalized variable. We fix this by intializing the variable at declaration. We also add a default else clause to the two conditional ones already there, so that we never end up in the named function if the given address type is illegal. Reported-by: syzbot+b0975ce9355b347c1546@syzkaller.appspotmail.com Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9d0c75bf6e03d9bf80c55b0f677dc9b982958fd5 Author: Doron Roberts-Kedes Date: Wed Apr 11 15:05:16 2018 -0700 strparser: Fix incorrect strp->need_bytes value. strp_data_ready resets strp->need_bytes to 0 if strp_peek_len indicates that the remainder of the message has been received. However, do_strp_work does not reset strp->need_bytes to 0. If do_strp_work completes a partial message, the value of strp->need_bytes will continue to reflect the needed bytes of the previous message, causing future invocations of strp_data_ready to return early if strp->need_bytes is less than strp_peek_len. Resetting strp->need_bytes to 0 in __strp_recv on handing a full message to the upper layer solves this problem. __strp_recv also calculates strp->need_bytes using stm->accum_len before stm->accum_len has been incremented by cand_len. This can cause strp->need_bytes to be equal to the full length of the message instead of the full length minus the accumulated length. This, in turn, causes strp_data_ready to return early, even when there is sufficient data to complete the partial message. Incrementing stm->accum_len before using it to calculate strp->need_bytes solves this problem. Found while testing net/tls_sw recv path. Fixes: 43a0c6751a322847 ("strparser: Stream parser for messages") Signed-off-by: Doron Roberts-Kedes Signed-off-by: David S. Miller net/strparser/strparser.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 5ff9c1a3dd92d2d8eeea6bb15b3502cfcc0e26fa Author: Anders Roxell Date: Wed Apr 11 17:17:34 2018 +0200 selftests: net: add in_netns.sh to TEST_PROGS Script in_netns.sh isn't installed. -------------------- running psock_fanout test -------------------- ./run_afpackettests: line 12: ./in_netns.sh: No such file or directory [FAIL] -------------------- running psock_tpacket test -------------------- ./run_afpackettests: line 22: ./in_netns.sh: No such file or directory [FAIL] In current code added in_netns.sh to be installed. Fixes: cc30c93fa020 ("selftests/net: ignore background traffic in psock_fanout") Signed-off-by: Anders Roxell Signed-off-by: David S. Miller tools/testing/selftests/net/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 095d370173e128bbf93d638d3951764102999c1f Merge: 7dd07c1 ebc701b7 Author: David S. Miller Date: Thu Apr 12 21:51:54 2018 -0400 Merge branch 'ibmvnic-Fix-parameter-change-request-handling' Nathan Fontenot says: ==================== ibmvnic: Fix parameter change request handling When updating parameters for the ibmvnic driver there is a possibility of entering an infinite loop if a return value other that a partial success is received from sending the login CRQ. Also, a deadlock can occur on the rtnl lock if netdev_notify_peers() is called during driver reset for a parameter change reset. This patch set corrects both of these issues by updating the return code handling in ibmvnic_login() nand gaurding against calling netdev_notify_peers() for parameter change requests. Updates for V2: Correct spelling mistakes in commit messages. ==================== Signed-off-by: David S. Miller commit ebc701b796a67a5785399dcbc83d90e3b5f1e02f Author: Nathan Fontenot Date: Wed Apr 11 10:09:38 2018 -0500 ibmvnic: Do not notify peers on parameter change resets When attempting to change the driver parameters, such as the MTU value or number of queues, do not call netdev_notify_peers(). Doing so will deadlock on the rtnl_lock. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 64d92aa2c9fe490ceffc440d7648ce369cd6cc3c Author: Nathan Fontenot Date: Wed Apr 11 10:09:32 2018 -0500 ibmvnic: Handle all login error conditions There is a bug in handling the possible return codes from sending the login CRQ. The current code treats any non-success return value, minus failure to send the crq and a timeout waiting for a login response, as a need to re-send the login CRQ. This can put the drive in an infinite loop of trying to login when getting return values other that a partial success such as a return code of aborted. For these scenarios the login will not ever succeed at this point and the driver would need to be reset again. To resolve this loop trying to login is updated to only retry the login if the driver gets a return code of a partial success. Other return codes are treated as an error and the driver returns an error from ibmvnic_login(). To avoid infinite looping in the partial success return cases, the number of retries is capped at the maximum number of supported queues. This value was chosen because the driver does a renegotiation of capabilities which sets the number of queues possible and allows the driver to attempt a login for possible value for the number of queues supported. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 55 ++++++++++++++++++++++++-------------- drivers/net/ethernet/ibm/ibmvnic.h | 1 - 2 files changed, 35 insertions(+), 21 deletions(-) commit 7dd07c143a4b54d050e748bee4b4b9e94a7b1744 Author: Eric Dumazet Date: Wed Apr 11 14:46:00 2018 -0700 net: validate attribute sizes in neigh_dump_table() Since neigh_dump_table() calls nlmsg_parse() without giving policy constraints, attributes can have arbirary size that we must validate Reported by syzbot/KMSAN : BUG: KMSAN: uninit-value in neigh_master_filtered net/core/neighbour.c:2292 [inline] BUG: KMSAN: uninit-value in neigh_dump_table net/core/neighbour.c:2348 [inline] BUG: KMSAN: uninit-value in neigh_dump_info+0x1af0/0x2250 net/core/neighbour.c:2438 CPU: 1 PID: 3575 Comm: syzkaller268891 Not tainted 4.16.0+ #83 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676 neigh_master_filtered net/core/neighbour.c:2292 [inline] neigh_dump_table net/core/neighbour.c:2348 [inline] neigh_dump_info+0x1af0/0x2250 net/core/neighbour.c:2438 netlink_dump+0x9ad/0x1540 net/netlink/af_netlink.c:2225 __netlink_dump_start+0x1167/0x12a0 net/netlink/af_netlink.c:2322 netlink_dump_start include/linux/netlink.h:214 [inline] rtnetlink_rcv_msg+0x1435/0x1560 net/core/rtnetlink.c:4598 netlink_rcv_skb+0x355/0x5f0 net/netlink/af_netlink.c:2447 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:4653 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x1672/0x1750 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x1048/0x1310 net/netlink/af_netlink.c:1900 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046 __sys_sendmsg net/socket.c:2080 [inline] SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091 SyS_sendmsg+0x54/0x80 net/socket.c:2087 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x43fed9 RSP: 002b:00007ffddbee2798 EFLAGS: 00000213 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fed9 RDX: 0000000000000000 RSI: 0000000020005000 RDI: 0000000000000003 RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8 R10: 00000000004002c8 R11: 0000000000000213 R12: 0000000000401800 R13: 0000000000401890 R14: 0000000000000000 R15: 0000000000000000 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:188 kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:314 kmsan_slab_alloc+0x11/0x20 mm/kmsan/kmsan.c:321 slab_post_alloc_hook mm/slab.h:445 [inline] slab_alloc_node mm/slub.c:2737 [inline] __kmalloc_node_track_caller+0xaed/0x11c0 mm/slub.c:4369 __kmalloc_reserve net/core/skbuff.c:138 [inline] __alloc_skb+0x2cf/0x9f0 net/core/skbuff.c:206 alloc_skb include/linux/skbuff.h:984 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1183 [inline] netlink_sendmsg+0x9a6/0x1310 net/netlink/af_netlink.c:1875 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046 __sys_sendmsg net/socket.c:2080 [inline] SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091 SyS_sendmsg+0x54/0x80 net/socket.c:2087 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Fixes: 21fdd092acc7 ("net: Add support for filtering neigh dump by master device") Signed-off-by: Eric Dumazet Cc: David Ahern Reported-by: syzbot Acked-by: David Ahern Signed-off-by: David S. Miller net/core/neighbour.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 7212303268918b9a203aebeacfdbd83b5e87b20d Author: Eric Dumazet Date: Wed Apr 11 14:36:28 2018 -0700 tcp: md5: reject TCP_MD5SIG or TCP_MD5SIG_EXT on established sockets syzbot/KMSAN reported an uninit-value in tcp_parse_options() [1] I believe this was caused by a TCP_MD5SIG being set on live flow. This is highly unexpected, since TCP option space is limited. For instance, presence of TCP MD5 option automatically disables TCP TimeStamp option at SYN/SYNACK time, which we can not do once flow has been established. Really, adding/deleting an MD5 key only makes sense on sockets in CLOSE or LISTEN state. [1] BUG: KMSAN: uninit-value in tcp_parse_options+0xd74/0x1a30 net/ipv4/tcp_input.c:3720 CPU: 1 PID: 6177 Comm: syzkaller192004 Not tainted 4.16.0+ #83 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676 tcp_parse_options+0xd74/0x1a30 net/ipv4/tcp_input.c:3720 tcp_fast_parse_options net/ipv4/tcp_input.c:3858 [inline] tcp_validate_incoming+0x4f1/0x2790 net/ipv4/tcp_input.c:5184 tcp_rcv_established+0xf60/0x2bb0 net/ipv4/tcp_input.c:5453 tcp_v4_do_rcv+0x6cd/0xd90 net/ipv4/tcp_ipv4.c:1469 sk_backlog_rcv include/net/sock.h:908 [inline] __release_sock+0x2d6/0x680 net/core/sock.c:2271 release_sock+0x97/0x2a0 net/core/sock.c:2786 tcp_sendmsg+0xd6/0x100 net/ipv4/tcp.c:1464 inet_sendmsg+0x48d/0x740 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] SYSC_sendto+0x6c3/0x7e0 net/socket.c:1747 SyS_sendto+0x8a/0xb0 net/socket.c:1715 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x448fe9 RSP: 002b:00007fd472c64d38 EFLAGS: 00000216 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00000000006e5a30 RCX: 0000000000448fe9 RDX: 000000000000029f RSI: 0000000020a88f88 RDI: 0000000000000004 RBP: 00000000006e5a34 R08: 0000000020e68000 R09: 0000000000000010 R10: 00000000200007fd R11: 0000000000000216 R12: 0000000000000000 R13: 00007fff074899ef R14: 00007fd472c659c0 R15: 0000000000000009 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:188 kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:314 kmsan_slab_alloc+0x11/0x20 mm/kmsan/kmsan.c:321 slab_post_alloc_hook mm/slab.h:445 [inline] slab_alloc_node mm/slub.c:2737 [inline] __kmalloc_node_track_caller+0xaed/0x11c0 mm/slub.c:4369 __kmalloc_reserve net/core/skbuff.c:138 [inline] __alloc_skb+0x2cf/0x9f0 net/core/skbuff.c:206 alloc_skb include/linux/skbuff.h:984 [inline] tcp_send_ack+0x18c/0x910 net/ipv4/tcp_output.c:3624 __tcp_ack_snd_check net/ipv4/tcp_input.c:5040 [inline] tcp_ack_snd_check net/ipv4/tcp_input.c:5053 [inline] tcp_rcv_established+0x2103/0x2bb0 net/ipv4/tcp_input.c:5469 tcp_v4_do_rcv+0x6cd/0xd90 net/ipv4/tcp_ipv4.c:1469 sk_backlog_rcv include/net/sock.h:908 [inline] __release_sock+0x2d6/0x680 net/core/sock.c:2271 release_sock+0x97/0x2a0 net/core/sock.c:2786 tcp_sendmsg+0xd6/0x100 net/ipv4/tcp.c:1464 inet_sendmsg+0x48d/0x740 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] SYSC_sendto+0x6c3/0x7e0 net/socket.c:1747 SyS_sendto+0x8a/0xb0 net/socket.c:1715 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Fixes: cfb6eeb4c860 ("[TCP]: MD5 Signature Option (RFC2385) support.") Signed-off-by: Eric Dumazet Reported-by: syzbot Acked-by: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c3317f4db831b7564ff8d1670326456a7fbbbcb3 Author: Jon Maloy Date: Wed Apr 11 22:52:09 2018 +0200 tipc: fix unbalanced reference counter When a topology subscription is created, we may encounter (or KASAN may provoke) a failure to create a corresponding service instance in the binding table. Instead of letting the tipc_nametbl_subscribe() report the failure back to the caller, the function just makes a warning printout and returns, without incrementing the subscription reference counter as expected by the caller. This makes the caller believe that the subscription was successful, so it will at a later moment try to unsubscribe the item. This involves a sub_put() call. Since the reference counter never was incremented in the first place, we get a premature delete of the subscription item, followed by a "use-after-free" warning. We fix this by adding a return value to tipc_nametbl_subscribe() and make the caller aware of the failure to subscribe. This bug seems to always have been around, but this fix only applies back to the commit shown below. Given the low risk of this happening we believe this to be sufficient. Fixes: commit 218527fe27ad ("tipc: replace name table service range array with rb tree") Reported-by: syzbot+aa245f26d42b8305d157@syzkaller.appspotmail.com Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/name_table.c | 5 ++++- net/tipc/name_table.h | 2 +- net/tipc/subscr.c | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) commit 1c2734b31d72316e3faaad88c0c9c46fa92a4b20 Author: Raghuram Chary J Date: Wed Apr 11 20:36:36 2018 +0530 lan78xx: PHY DSP registers initialization to address EEE link drop issues with long cables The patch is to configure DSP registers of PHY device to handle Gbe-EEE failures with >40m cable length. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Signed-off-by: Raghuram Chary J Signed-off-by: David S. Miller drivers/net/phy/microchip.c | 178 ++++++++++++++++++++++++++++++++++++++++++- include/linux/microchipphy.h | 8 ++ 2 files changed, 185 insertions(+), 1 deletion(-) commit 9a4381618262157586051f5ba0db42df3c6ab4b5 Author: Laura Abbott Date: Tue Apr 10 18:04:29 2018 -0700 mISDN: Remove VLAs There's an ongoing effort to remove VLAs[1] from the kernel to eventually turn on -Wvla. Remove the VLAs from the mISDN code by switching to using kstrdup in one place and using an upper bound in another. Signed-off-by: Laura Abbott Signed-off-by: David S. Miller drivers/isdn/mISDN/dsp_hwec.c | 8 +++++--- drivers/isdn/mISDN/l1oip_core.c | 14 +++++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) commit b16520f7493d06d8ef6d4255bdfcf7a803d7874a Author: Kees Cook Date: Tue Apr 10 17:52:34 2018 -0700 net/tls: Remove VLA usage In the quest to remove VLAs from the kernel[1], this replaces the VLA size with the only possible size used in the code, and adds a mechanism to double-check future IV sizes. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Kees Cook Acked-by: Dave Watson Signed-off-by: David S. Miller net/tls/tls_sw.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 08ea556e14b56e9a49b19abd8e39f0c9e05582f2 Author: Kees Cook Date: Tue Apr 10 15:26:43 2018 -0700 ibmvnic: Define vnic_login_client_data name field as unsized array The "name" field of struct vnic_login_client_data is a char array of undefined length. This should be written as "char name[]" so the compiler can make better decisions about the field (for example, not assuming it's a single character). This was noticed while trying to tighten the CONFIG_FORTIFY_SOURCE checking. Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c1596ff52466522c98013f1610797a85ba5d4e63 Author: Ronnie Sahlberg Date: Mon Apr 9 18:06:30 2018 +1000 cifs: change validate_buf to validate_iov Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/smb2pdu.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) commit 05432e2938ddb8bd942e5a89298e763cf785edb6 Author: Ronnie Sahlberg Date: Mon Apr 9 18:06:31 2018 +1000 cifs: remove rfc1002 hardcoded constants from cifs_discard_remaining_data() Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/cifssmb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 91cb74f5142c14dd921ab2d064b7b128054f9fae Author: Ronnie Sahlberg Date: Fri Apr 13 09:03:19 2018 +1000 cifs: Change SMB2_open to return an iov for the error parameter Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/smb2ops.c | 10 ++++++---- fs/cifs/smb2pdu.c | 10 ++++++---- fs/cifs/smb2proto.h | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) commit e19b2bc0790a1c25b226815ce132c06274b1ba87 Author: Ronnie Sahlberg Date: Mon Apr 9 18:06:28 2018 +1000 cifs: add resp_buf_size to the mid_q_entry structure and get rid of some more calls to get_rfc1002_length() Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/cifsglob.h | 1 + fs/cifs/connect.c | 1 + fs/cifs/smb2transport.c | 2 +- fs/cifs/transport.c | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) commit 0d4b46ba7d124e67bcf27082bf313f8c07c93287 Author: Steve French Date: Thu Apr 12 20:32:13 2018 -0500 smb3.11: replace a 4 with server->vals->header_preamble_size More cleanup of use of hardcoded 4 byte RFC1001 field size Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky Reviewed-by: Ronnie Sahlberg fs/cifs/smb2misc.c | 11 +++++++---- fs/cifs/smb2pdu.c | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) commit 681857ef0de16a61cf040464cd4a54ea626a2d53 Merge: 80aa76b 6769828 Author: Linus Torvalds Date: Thu Apr 12 17:07:04 2018 -0700 Merge branch 'parisc-4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: - fix panic when halting system via "shutdown -h now" - drop own coding in favour of generic CONFIG_COMPAT_BINFMT_ELF implementation - add FPE_CONDTRAP constant: last outstanding parisc-specific cleanup for Eric Biedermans siginfo patches - move some functions to .init and some to .text.hot linker sections * 'parisc-4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Prevent panic at system halt parisc: Switch to generic COMPAT_BINFMT_ELF parisc: Move cache flush functions into .text.hot section parisc/signal: Add FPE_CONDTRAP for conditional trap handling commit bf9c7e3d7924f72225f8f9c28438b4a711192ad3 Author: Thomas Petazzoni Date: Mon Dec 4 16:09:07 2017 +0100 arch/sh: pcie-sh7786: handle non-zero DMA offset On SuperH, the base of the physical memory might be different from zero. In this case, PCI address zero will map to a non-zero physical address. In order to make sure that the DMA mapping API takes care of this DMA offset, we must fill in the dev->dma_pfn_offset field for PCI devices. This gets done in the pcibios_bus_add_device() hook, called for each new PCI device detected. The dma_pfn_offset global variable is re-calculated for every PCI controller available on the platform, but that's not an issue because its value will each time be exactly the same, as it only depends on the memory start address and memory size. Signed-off-by: Thomas Petazzoni Signed-off-by: Rich Felker arch/sh/drivers/pci/pcie-sh7786.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 79e1c5e70b2a0fadb7b61c69de8442703e7d0dc4 Author: Thomas Petazzoni Date: Mon Dec 4 16:09:06 2017 +0100 arch/sh: pcie-sh7786: adjust the memory mapping The code setting up the PCI -> SuperHighway mapping doesn't take into account the fact that the address stored in PCIELARx must be aligned with the size stored in PCIELAMRx. For example, when your physical memory starts at 0x0800_0000 (128 MB), a size of 64 MB or 128 MB is fine. However, if you have 256 MB of memory, it doesn't work because the base address is not aligned on the size. In such situation, we have to round down the base address to make sure it is aligned on the size of the area. For for a 0x0800_0000 base address with 256 MB of memory, we will round down to 0x0, and extend the size of the mapping to 512 MB. This allows the mapping to work on platforms that have 256 MB of RAM. The current setup would only work with 128 MB of RAM or less. Signed-off-by: Thomas Petazzoni Signed-off-by: Rich Felker arch/sh/drivers/pci/pcie-sh7786.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 5da1bb96dc8dfce9d1b9d7c410803e8fa88f678c Author: Thomas Petazzoni Date: Mon Dec 4 16:09:05 2017 +0100 arch/sh: pcie-sh7786: adjust PCI MEM and IO regions The current definition of the PCIe IO and MEM resources for SH7786 doesn't match what the datasheet says. For example, for PCIe0 0xfe100000 is advertised by the datasheet as a PCI IO region, while 0xfd000000 is advertised as a PCI MEM region. The code currently inverts the two. The SH4A_PCIEPARL and SH4A_PCIEPTCTLR registers allow to define the base address and role of the different regions (including whether it's a MEM or IO region). However, practical experience on a SH7786 shows that if 0xfe100000 is used for LEL and 0xfd000000 for IO, a PCIe device using two MEM BARs cannot be accessed at all. Simply using 0xfe100000 for IO and 0xfd000000 for MEM makes the PCIe device accessible. It is very likely that this was never seen because there are two other PCI MEM region listed in the resources. However, for different reasons, none of the two other MEM regions are usable on the specific SH7786 platform the problem was encountered. Therefore, the last MEM region at 0xfe100000 was used to place the BARs, making the device non-functional. This commit therefore adjusts those PCI MEM and IO resources definitions so that they match what the datasheet says. They have only been tested with PCIe 0. Signed-off-by: Thomas Petazzoni Signed-off-by: Rich Felker arch/sh/drivers/pci/pcie-sh7786.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit d62e9bf5dd4c0298465dd70b78b5532ea6708d63 Author: Thomas Petazzoni Date: Mon Dec 4 16:09:04 2017 +0100 arch/sh: pcie-sh7786: exclude unusable PCI MEM areas Depending on the physical memory layout, some PCI MEM areas are not usable. According to the SH7786 datasheet, the PCI MEM area from 1000_0000 to 13FF_FFFF is only usable if the physical memory layout (in MMSELR) is 1, 2, 5 or 6. In all other configurations, this PCI MEM area is not usable (because it overlaps with DRAM). Therefore, this commit adjusts the PCI SH7786 initialization to mark the relevant PCI resource as IORESOURCE_DISABLED if we can't use it. Signed-off-by: Thomas Petazzoni Signed-off-by: Rich Felker arch/sh/drivers/pci/pcie-sh7786.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 7dd7f69809b4e3bed5c28dd8600a3a8b20f6441c Author: Thomas Petazzoni Date: Mon Dec 4 16:09:03 2017 +0100 arch/sh: pcie-sh7786: mark unavailable PCI resource as disabled Some PCI MEM resources are marked as IORESOURCE_MEM_32BIT, which means they are only usable when the SH core runs in 32-bit mode. In 29-bit mode, such memory regions are not usable. The existing code for SH7786 properly skips such regions when configuring the PCIe controller registers. However, because such regions are still described in the resource array, the pcibios_scanbus() function in the SuperH pci.c will register them to the PCI core. Due to this, the PCI core will allocate MEM areas from this resource, and assign BARs pointing to this area, even though it's unusable. In order to prevent this from happening, we mark such regions as IORESOURCE_DISABLED, which tells the SuperH pci.c pcibios_scanbus() function to skip them. Note that we separate marking the region as disabled from skipping it, because other regions will be marked as disabled in follow-up patches. Signed-off-by: Thomas Petazzoni Signed-off-by: Rich Felker arch/sh/drivers/pci/pcie-sh7786.c | 3 +++ 1 file changed, 3 insertions(+) commit 3aeb93a014058eb889cbb12c1f61f59666b9a081 Author: Thomas Petazzoni Date: Mon Dec 4 16:09:02 2017 +0100 arch/sh: pci: don't use disabled resources In pcibios_scanbus(), we provide to the PCI core the usable MEM and IO regions using pci_add_resource_offset(). We travel through all resources available in the "struct pci_channel". Also, in register_pci_controller(), we travel through all resources to request them, making sure they don't conflict with already requested resources. However, some resources may be disabled, in which case they should not be requested nor provided to the PCI core. In the current situation, none of the resources are disabled. However, follow-up patches in this series will make some resources disabled, making this preliminary change necessary. Signed-off-by: Thomas Petazzoni Signed-off-by: Rich Felker arch/sh/drivers/pci/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit ce88313069c36eef80f21fd7403f16620ecd21a2 Author: Thomas Petazzoni Date: Mon Dec 4 16:09:01 2017 +0100 arch/sh: make the DMA mapping operations observe dev->dma_pfn_offset Some devices may have a non-zero DMA offset, i.e an offset between the DMA address and the physical address. Such an offset can be encoded into the dma_pfn_offset field of "struct device", but the SuperH implementation of the DMA mapping API does not observe this information. This commit fixes that by ensuring the DMA address is properly calculated depending on this DMA offset. Signed-off-by: Thomas Petazzoni Signed-off-by: Rich Felker arch/sh/kernel/dma-nommu.c | 7 +++++-- arch/sh/mm/consistent.c | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) commit bc05aa6e13a717e1abff6f863f7ba82b14556df4 Author: Thomas Petazzoni Date: Mon Dec 4 16:09:00 2017 +0100 arch/sh: add sh7786_mm_sel() function The SH7786 has different physical memory layout configurations, configurable through the MMSELR register. The configuration is typically defined by the bootloader, so Linux generally doesn't care. Except that depending on the configuration, some PCI MEM areas may or may not be available. This commit adds a helper function that allows to retrieve the current physical memory layout configuration. It will be used in a following patch to exclude unusable PCI MEM areas during the PCI initialization. Signed-off-by: Thomas Petazzoni Signed-off-by: Rich Felker arch/sh/include/cpu-sh4/cpu/sh7786.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 96a598996f6ac518ac79839ecbb17c91af91f4f7 Author: Rich Felker Date: Thu Mar 15 20:01:36 2018 -0400 sh: fix debug trap failure to process signals before return to user When responding to a debug trap (breakpoint) in userspace, the kernel's trap handler raised SIGTRAP but returned from the trap via a code path that ignored pending signals, resulting in an infinite loop re-executing the trapping instruction. Signed-off-by: Rich Felker arch/sh/kernel/entry-common.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb6b6930a70faefe04479a71088cc10366782d9a Author: Rich Felker Date: Mon Jul 31 01:27:50 2017 -0400 sh: fix memory corruption of unflattened device tree unflatten_device_tree() makes use of memblock allocation, and therefore must be called before paging_init() migrates the memblock allocation data to the bootmem framework. Otherwise the record of the allocation for the expanded device tree will be lost, and will eventually be clobbered when allocated for another use. Signed-off-by: Rich Felker arch/sh/boards/of-generic.c | 6 ------ arch/sh/kernel/setup.c | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) commit 9b7e30ab975334448dc4c82941a48a3685a7642b Author: Aurelien Jarno Date: Tue May 2 13:00:12 2017 +0000 sh: fix futex FUTEX_OP_SET op on userspace addresses Commit 00b73d8d1b71 ("sh: add working futex atomic ops on userspace addresses for smp") changed the futex_atomic_op_inuser function to use a loop. In case of the FUTEX_OP_SET op with a userspace address containing a value different of 0, this loop is an endless loop. Fix that by loading the value of oldval from the userspace before doing the cmpxchg op, also for the FUTEX_OP_SET case. Signed-off-by: Aurelien Jarno Signed-off-by: Rich Felker arch/sh/include/asm/futex.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a10beabba213924d876f2d10ca9351aeab93f58a Merge: dece02f 1cb19e8 Author: Dave Airlie Date: Fri Apr 13 09:25:21 2018 +1000 Merge branch 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-next - Add a PX quirk for radeon - Fix flickering and stability issues with DC on some platforms - Fix HDMI audio regression - Few other misc DC and base driver fixes * 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux: Revert "drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2)" Revert "drm/amd/display: fix dereferencing possible ERR_PTR()" drm/amd/display: Fix regamma not affecting full-intensity color values drm/amd/display: Fix FBC text console corruption drm/amd/display: Only register backlight device if embedded panel connected drm/amd/display: fix brightness level after resume from suspend drm/amd/display: HDMI has no sound after Panel power off/on drm/amdgpu: add MP1 and THM hw ip base reg offset drm/amdgpu: fix null pointer panic with direct fw loading on gpu reset drm/radeon: add PX quirk for Asus K73TK commit dece02f71dabdba9823a87a5ef702a3946e15ab7 Merge: 871e899 41613a1 Author: Dave Airlie Date: Fri Apr 13 09:25:07 2018 +1000 Merge tag 'drm-misc-next-fixes-2018-04-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-next omap: Fix crash on AM4 EVM, and all OMAP2/3 boards (Tomi) Cc: Tomi Valkeinen * tag 'drm-misc-next-fixes-2018-04-11' of git://anongit.freedesktop.org/drm/drm-misc: drm/omap: fix crash if there's no video PLL commit 9fdd2e0034393d6c63f830a60f6332c66927f2ff Author: Ronnie Sahlberg Date: Mon Apr 9 18:06:27 2018 +1000 cifs: replace a 4 with server->vals->header_preamble_size Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/smb2pdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e96467d9eb189b38954bcbbf1ee16762914f4cb Author: Ronnie Sahlberg Date: Mon Apr 9 18:06:26 2018 +1000 cifs: add pdu_size to the TCP_Server_Info structure and get rid of some get_rfc1002_length() in smb2 Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/cifsglob.h | 2 ++ fs/cifs/cifssmb.c | 2 +- fs/cifs/connect.c | 3 ++- fs/cifs/smb2ops.c | 8 ++++---- 4 files changed, 9 insertions(+), 6 deletions(-) commit f6b7aeee8f167409195fbf1364d02988fecad1d0 Author: Sinan Kaya Date: Tue Apr 3 08:55:03 2018 -0400 MIPS: io: Prevent compiler reordering writeX() writeX() has strong ordering semantics with respect to memory updates. In the absence of a write barrier or a compiler barrier, the compiler can reorder register and memory update instructions. This breaks the writeX() API. Signed-off-by: Sinan Kaya Cc: Arnd Bergmann Cc: Ralf Baechle Cc: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18997/ [jhogan@kernel.org: Tidy commit message] Signed-off-by: James Hogan arch/mips/include/asm/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5100d8a3fe034845926266a4e7f5bdcbb859088b Author: Steve French Date: Mon Apr 9 10:47:14 2018 -0500 SMB311: Improve checking of negotiate security contexts SMB3.11 crypto and hash contexts were not being checked strictly enough. Add parsing and validity checking for the security contexts in the SMB3.11 negotiate response. Signed-off-by: Steve French CC: Stable Reviewed-by: Pavel Shilovsky fs/cifs/cifsglob.h | 1 + fs/cifs/smb2pdu.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/cifs/smb2pdu.h | 3 ++ 3 files changed, 106 insertions(+) commit 136ff1b4b65edf09b6b7173ba94ad53347d3aa83 Author: Steve French Date: Sun Apr 8 16:14:31 2018 -0500 SMB3: Fix length checking of SMB3.11 negotiate request The length checking for SMB3.11 negotiate request includes "negotiate contexts" which caused a buffer validation problem and a confusing warning message on SMB3.11 mount e.g.: SMB2 server sent bad RFC1001 len 236 not 170 Fix the length checking for SMB3.11 negotiate to account for the new negotiate context so that we don't log a warning on SMB3.11 mount by default but do log warnings if lengths returned by the server are incorrect. CC: Stable Signed-off-by: Steve French Reviewed-by: Aurelien Aptel Reviewed-by: Pavel Shilovsky fs/cifs/smb2misc.c | 39 +++++++++++++++++++++++++++++++++++++++ fs/cifs/smb2pdu.h | 7 +++++++ 2 files changed, 46 insertions(+) commit 80aa76bcd3642480e17bc27811665d928c0b87d6 Merge: 4ac1800 8c81dd4 Author: Linus Torvalds Date: Thu Apr 12 13:28:22 2018 -0700 Merge tag 'xfs-4.17-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull more xfs updates from Darrick Wong: "Most of these are code cleanups, but there are a couple of notable use-after-free bug fixes. This series has been run through a full xfstests run over the week and through a quick xfstests run against this morning's master, with no major failures reported. - clean up unnecessary function call parameters - fix a use-after-free bug when aborting logging intents - refactor filestreams state data to avoid use-after-free bug - fix incorrect removal of cow extents when truncating extended attributes. - refactor open-coded __set_page_dirty in favor of using vfs function. - fix a deadlock when fstrim and fs shutdown race" * tag 'xfs-4.17-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: Force log to disk before reading the AGF during a fstrim Export __set_page_dirty xfs: only cancel cow blocks when truncating the data fork xfs: non-scrub - remove unused function parameters xfs: remove filestream item xfs_inode reference xfs: fix intent use-after-free on abort xfs: Remove "committed" argument of xfs_dir_ialloc commit 4ac1800f81eb52f776aca201e791eec2ef355259 Merge: a1bf4c7 3e7aafc Author: Linus Torvalds Date: Thu Apr 12 13:00:44 2018 -0700 Merge tag 'gfs2-4.17.fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull more gfs2 updates from Bob Peterson: "We decided to request the latest three patches to be merged into this merge window while it's still open. - The first patch adds a new function to lockref: lockref_put_not_zero - The second patch fixes GFS2's glock dump code so it uses the new lockref function. This fixes a problem whereby lock dumps could miss glocks. - I made a minor patch to update some comments and fix the lock ordering text in our gfs2-glocks.txt Documentation file" * tag 'gfs2-4.17.fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: GFS2: Minor improvements to comments and documentation gfs2: Stop using rhashtable_walk_peek lockref: Add lockref_put_not_zero commit a1bf4c7da62fcadea065f7c9a561d61c26ea4882 Merge: 7214dd4 98de9ce Author: Linus Torvalds Date: Thu Apr 12 12:55:50 2018 -0700 Merge tag 'nfs-for-4.17-1' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client updates from Anna Schumaker: "Stable bugfixes: - xprtrdma: Fix corner cases when handling device removal # v4.12+ - xprtrdma: Fix latency regression on NUMA NFS/RDMA clients # v4.15+ Features: - New sunrpc tracepoint for RPC pings - Finer grained NFSv4 attribute checking - Don't unnecessarily return NFS v4 delegations Other bugfixes and cleanups: - Several other small NFSoRDMA cleanups - Improvements to the sunrpc RTT measurements - A few sunrpc tracepoint cleanups - Various fixes for NFS v4 lock notifications - Various sunrpc and NFS v4 XDR encoding cleanups - Switch to the ida_simple API - Fix NFSv4.1 exclusive create - Forget acl cache after setattr operation - Don't advance the nfs_entry readdir cookie if xdr decoding fails" * tag 'nfs-for-4.17-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (47 commits) NFS: advance nfs_entry cookie only after decoding completes successfully NFSv3/acl: forget acl cache after setattr NFSv4.1: Fix exclusive create NFSv4: Declare the size up to date after it was set. nfs: Use ida_simple API NFSv4: Fix the nfs_inode_set_delegation() arguments NFSv4: Clean up CB_GETATTR encoding NFSv4: Don't ask for attributes when ACCESS is protected by a delegation NFSv4: Add a helper to encode/decode struct timespec NFSv4: Clean up encode_attrs NFSv4; Clean up XDR encoding of type bitmap4 NFSv4: Allow GFP_NOIO sleeps in decode_attr_owner/decode_attr_group SUNRPC: Add a helper for encoding opaque data inline SUNRPC: Add helpers for decoding opaque and string types NFSv4: Ignore change attribute invalidations if we hold a delegation NFS: More fine grained attribute tracking NFS: Don't force unnecessary cache invalidation in nfs_update_inode() NFS: Don't redirty the attribute cache in nfs_wcc_update_inode() NFS: Don't force a revalidation of all attributes if change is missing NFS: Convert NFS_INO_INVALID flags to unsigned long ... commit 7214dd4ea9048d2031e14fc552980cecd6573a9e Merge: 19e8a2f 08fdc8a Author: Linus Torvalds Date: Thu Apr 12 12:28:32 2018 -0700 Merge branch 'work.thaw' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs thaw updates from Al Viro: "An ancient series that has fallen through the cracks in the previous cycle" * 'work.thaw' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: buffer.c: call thaw_super during emergency thaw vfs: factor sb iteration out of do_emergency_remount commit 1cb19e8267a57c5174da09e0d52d1477baceccca Author: Harry Wentland Date: Thu Apr 12 10:51:52 2018 -0400 Revert "drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2)" This seems to cause flickering and lock-ups for a wide range of users. Revert until we've found a proper fix for the flickering and lock-ups. This reverts commit 36cc549d59864b7161f0e23d710c1c4d1b9cf022. Cc: Shirish S Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Michel Dänzer Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 28 ----------------------- 1 file changed, 28 deletions(-) commit 19e8a2f875a56009c0ce30389964aca452a85510 Merge: 5d13659 5a81327 Author: Linus Torvalds Date: Thu Apr 12 11:59:06 2018 -0700 Merge branch 'afs-dh' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull AFS updates from Al Viro: "The AFS series posted by dhowells depended upon lookup_one_len() rework; now that prereq is in the mainline, that series had been rebased on top of it and got some exposure and testing..." * 'afs-dh' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: afs: Do better accretion of small writes on newly created content afs: Add stats for data transfer operations afs: Trace protocol errors afs: Locally edit directory data for mkdir/create/unlink/... afs: Adjust the directory XDR structures afs: Split the directory content defs into a header afs: Fix directory handling afs: Split the dynroot stuff out and give it its own ops tables afs: Keep track of invalid-before version for dentry coherency afs: Rearrange status mapping afs: Make it possible to get the data version in readpage afs: Init inode before accessing cache afs: Introduce a statistics proc file afs: Dump bad status record afs: Implement @cell substitution handling afs: Implement @sys substitution handling afs: Prospectively look up extra files when doing a single lookup afs: Don't over-increment the cell usage count when pinning it afs: Fix checker warnings vfs: Remove the const from dir_context::actor commit 1bc8ffbd71380661c5bc9cd65649bb0cf3d0cf09 Author: Harry Wentland Date: Thu Apr 12 10:51:51 2018 -0400 Revert "drm/amd/display: fix dereferencing possible ERR_PTR()" This reverts commit cd2d6c92a8e39d7e50a5af9fcc67d07e6a89e91d. Cc: Shirish S Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Michel Dänzer Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 --- 1 file changed, 3 deletions(-) commit b2f3f5920ddb5b121cbc57ee9efc0c1ffe4d19af Author: Leo (Sunpeng) Li Date: Tue Apr 3 16:07:16 2018 -0400 drm/amd/display: Fix regamma not affecting full-intensity color values Hardware understands the regamma LUT as a piecewise linear function, with points spaced exponentially along the range. We previously programmed the LUT for range [2^-10, 2^0). This causes (normalized) color values of 1 (=2^0) to miss the programmed LUT, and fall onto the end region. For DCE, the end region is extrapolated using a single (base, slope) pair, using the max y-value from the last point in the curve as base. This presents a problem, since this value affects all three color channels. Scaling down the intensity of say - the blue regamma curve - will not affect it's end region. This is especially noticiable when using RedShift. It scales down the blue and green channels, but leaves full-intensity colors unshifted. Therefore, extend the range to cover [2^-10, 2^1) by programming another hardware segment, containing only one point. That way, we won't be hitting the end region. Note that things are a bit different for DCN, since the end region can be set per-channel. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Krunoslav Kovac Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 1409bc6b2bff44ea4e366b892dcac4a1cf0a5e8b Author: Roman Li Date: Thu Mar 29 11:14:25 2018 -0400 drm/amd/display: Fix FBC text console corruption Signed-off-by: Roman Li Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dce110/dce110_compressor.c | 67 +++++++++++++++++----- 1 file changed, 54 insertions(+), 13 deletions(-) commit 89fc8d4e95e78bdaaadbe72463c8cd16946bf5b3 Author: Harry Wentland Date: Mon Mar 12 11:16:47 2018 -0400 drm/amd/display: Only register backlight device if embedded panel connected Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 58 +++++++++++++---------- 1 file changed, 33 insertions(+), 25 deletions(-) commit 5d1365940a68dd57b031b6e3c07d7d451cd69daf Merge: 67a7a8f 0c84cee Author: Linus Torvalds Date: Thu Apr 12 11:09:05 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) In ip_gre tunnel, handle the conflict between TUNNEL_{SEQ,CSUM} and GSO/LLTX properly. From Sabrina Dubroca. 2) Stop properly on error in lan78xx_read_otp(), from Phil Elwell. 3) Don't uncompress in slip before rstate is initialized, from Tejaswi Tanikella. 4) When using 1.x firmware on aquantia, issue a deinit before we hardware reset the chip, otherwise we break dirty wake WOL. From Igor Russkikh. 5) Correct log check in vhost_vq_access_ok(), from Stefan Hajnoczi. 6) Fix ethtool -x crashes in bnxt_en, from Michael Chan. 7) Fix races in l2tp tunnel creation and duplicate tunnel detection, from Guillaume Nault. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (22 commits) l2tp: fix race in duplicate tunnel detection l2tp: fix races in tunnel creation tun: send netlink notification when the device is modified tun: set the flags before registering the netdevice lan78xx: Don't reset the interface on open bnxt_en: Fix NULL pointer dereference at bnxt_free_irq(). bnxt_en: Need to include RDMA rings in bnxt_check_rings(). bnxt_en: Support max-mtu with VF-reps bnxt_en: Ignore src port field in decap filter nodes bnxt_en: do not allow wildcard matches for L2 flows bnxt_en: Fix ethtool -x crash when device is down. vhost: return bool from *_access_ok() functions vhost: fix vhost_vq_access_ok() log check vhost: Fix vhost_copy_to_user() net: aquantia: oops when shutdown on already stopped device net: aquantia: Regression on reset with 1.x firmware cdc_ether: flag the Cinterion AHS8 modem by gemalto as WWAN slip: Check if rstate is initialized before uncompressing lan78xx: Avoid spurious kevent 4 "error" lan78xx: Correctly indicate invalid OTP ... commit 67a7a8fff8aef69579cd4426dca1ccb865b93167 Merge: c5c177c a5a18ae Author: Linus Torvalds Date: Thu Apr 12 11:04:35 2018 -0700 Merge tag 'for-linus-4.17-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "A few fixes of Xen related core code and drivers" * tag 'for-linus-4.17-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/pvh: Indicate XENFEAT_linux_rsdp_unrestricted to Xen xen/acpi: off by one in read_acpi_id() xen/acpi: upload _PSD info for non Dom0 CPUs too x86/xen: Delay get_cpu_cap until stack canary is established xen: xenbus_dev_frontend: Verify body of XS_TRANSACTION_END xen: xenbus: Catch closing of non existent transactions xen: xenbus_dev_frontend: Fix XS_TRANSACTION_END handling commit c5c177c5fd952720d6b659f596d6eb9be59c9000 Merge: d1cb771 9e7f06c Author: Linus Torvalds Date: Thu Apr 12 11:00:48 2018 -0700 Merge tag 'dma-mapping-4.17-2' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: "Fix for one swiotlb regression in 2.16 from Takashi" * tag 'dma-mapping-4.17-2' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: fix unexpected swiotlb_alloc_coherent failures commit d1cb7718cfe3a464189cb3d1ee2c092565bc8b39 Merge: cb098d5 fc167da Author: Linus Torvalds Date: Thu Apr 12 10:59:03 2018 -0700 Merge tag 'mmc-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Prevent bus reference leak in mmc_blk_init() MMC host: - tmio: Fix error handling when issuing CMD23 - jz4740: Fix race condition in IRQ mask update" * tag 'mmc-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: tmio: Fix error handling when issuing CMD23 mmc: core: Prevent bus reference leak in mmc_blk_init() mmc: jz4740: Fix race condition in IRQ mask update commit cb098d50ecc0a4729507ddcc7f4ae98c3703fadd Merge: 07820c3 2cf2f0d Author: Linus Torvalds Date: Thu Apr 12 10:21:19 2018 -0700 Merge tag 'for_linus-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb Pull kdb updates from Jason Wessel: - fix 2032 time access issues and new compiler warnings - minor regression test cleanup - formatting fixes for end user use of kdb * tag 'for_linus-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb: kdb: use memmove instead of overlapping memcpy kdb: use ktime_get_mono_fast_ns() instead of ktime_get_ts() kdb: bl: don't use tab character in output kdb: drop newline in unknown command output kdb: make "mdr" command repeat kdb: use __ktime_get_real_seconds instead of __current_kernel_time misc: kgdbts: Display progress of asynchronous tests commit 4b163ca343b45855b03114ef2ab47c454989d55c Author: Sandipan Das Date: Thu Apr 12 21:51:40 2018 +0530 perf tests: Disable breakpoint accounting test for powerpc We disable this test as instruction breakpoints (HW_BREAKPOINT_X) are not available for powerpc. Before applying patch: 21: Breakpoint accounting : --- start --- test child forked, pid 3635 failed opening event 0 failed opening event 0 watchpoints count 1, breakpoints count 0, has_ioctl 1, share 0 test child finished with -2 ---- end ---- Breakpoint accounting: Skip After applying patch: 21: Breakpoint accounting : Disabled Signed-off-by: Sandipan Das Cc: Jiri Olsa Cc: Naveen N. Rao Cc: Ravi Bangoria Link: http://lkml.kernel.org/r/20180412162140.2992-1-sandipan@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/builtin-test.c | 1 + 1 file changed, 1 insertion(+) commit 07820c3bf17822361b25f1015125fd407d9925ed Merge: c17b0aa 70f6283 Author: Linus Torvalds Date: Thu Apr 12 10:18:02 2018 -0700 Merge tag 'microblaze-4.17-rc1' of git://git.monstr.eu/linux-2.6-microblaze Pull microblaze updates from Michal Simek: "Use generic pci_mmap_resource_range()" * tag 'microblaze-4.17-rc1' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Use generic pci_mmap_resource_range() microblaze: Provide pgprot_device/writecombine macros for nommu commit 3e7aafc39c59c639ebd5961f893743f076df9b4e Author: Bob Peterson Date: Fri Apr 6 13:07:45 2018 -0700 GFS2: Minor improvements to comments and documentation This patch simply fixes some comments and the gfs2-glocks.txt file: Places where i_rwsem was called i_mutex, and adding i_rw_mutex. Signed-off-by: Bob Peterson Documentation/filesystems/gfs2-glocks.txt | 5 +++-- fs/gfs2/bmap.c | 2 +- fs/gfs2/ops_fstype.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) commit 3fd5d3ad35dc44aaf0f28d60cc0eb75887bff54d Author: Andreas Gruenbacher Date: Wed Mar 28 12:05:35 2018 +0200 gfs2: Stop using rhashtable_walk_peek Function rhashtable_walk_peek is problematic because there is no guarantee that the glock previously returned still exists; when that key is deleted, rhashtable_walk_peek can end up returning a different key, which will cause an inconsistent glock dump. Fix this by keeping track of the current glock in the seq file iterator functions instead. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/glock.c | 47 ++++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 19 deletions(-) commit 450b1f6f56350c630e795f240dc5a77aa8aa2419 Author: Andreas Gruenbacher Date: Thu Mar 29 08:07:46 2018 +0100 lockref: Add lockref_put_not_zero Put a lockref unless the lockref is dead or its count would become zero. This is the same as lockref_put_or_lock except that the lock is never left held. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson include/linux/lockref.h | 1 + lib/lockref.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit 4e1acd7b31a03f24cc6108d37d005e6b1d48c5d3 Author: Peng Hao Date: Fri Apr 13 08:36:30 2018 +0800 kvm: selftests: add -std=gnu99 cflags lib/kvm_util.c: In function ‘kvm_memcmp_hva_gva’: lib/kvm_util.c:332:2: error: ‘for’ loop initial declarations are only allowed in C99 mode So add -std=gnu99 to CFLAGS Signed-off-by: Peng Hao Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0f4cf5b306620282db0c59ff963012e1973e025 Author: Krish Sadhukhan Date: Wed Apr 11 01:10:16 2018 -0400 x86: Add check for APIC access address for vmentry of L2 guests According to the sub-section titled 'VM-Execution Control Fields' in the section titled 'Basic VM-Entry Checks' in Intel SDM vol. 3C, the following vmentry check must be enforced: If the 'virtualize APIC-accesses' VM-execution control is 1, the APIC-access address must satisfy the following checks: - Bits 11:0 of the address must be 0. - The address should not set any bits beyond the processor's physical-address width. This patch adds the necessary check to conform to this rule. If the check fails, we cause the L2 VMENTRY to fail which is what the associated unit test (following patch) expects. Reviewed-by: Mihai Carabas Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Jim Mattson Reviewed-by: Wanpeng Li Signed-off-by: Krish Sadhukhan Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit c17b0aadb7d8f87de56a4a374a8131519c0f7422 Merge: e241e3f a71e7c4 Author: Linus Torvalds Date: Thu Apr 12 09:15:48 2018 -0700 Merge tag 'asm-generic' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic fixes from Arnd Bergmann: "I have one regression fix for a minor build problem after the architecture removal series, plus a rework of the barriers in the readl/writel functions, thanks to work by Sinan Kaya: This started from a discussion on the linuxpcc and rdma mailing lists[1]. To summarize, we decided that architectures are responsible to serialize readl() and writel() accesses on a device MMIO space relative to DMA performed by that device. This series provides a pessimistic implementation of that behavior for asm-generic/io.h, which is in turn used by a number of architectures (h8300, microblaze, nios2, openrisc, s390, sparc, um, unicore32, and xtensa). Some of those presumably need no extra barriers, or something weaker than rmb()/wmb(), and they are advised to override the new default for better performance. For inb()/outb(), the same barriers are used, but architectures might want to add another barrier to outb() here if that can guarantee non-posted behavior (some architectures can, others cannot do that). The readl_relaxed()/writel_relaxed() family of functions retains the existing behavior with no extra barriers" [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2018-March/170481.html * tag 'asm-generic' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: io: change writeX_relaxed() to remove barriers io: change readX_relaxed() to remove barriers dts: remove cris & metag dts hard link file io: change inX() to have their own IO barrier overrides io: change outX() to have their own IO barrier overrides io: define stronger ordering for the default writeX() implementation io: define stronger ordering for the default readX() implementation io: define several IO & PIO barrier types for the asm-generic version commit bb06ec31452fb2da1594f88035c2ecea4e0652f4 Author: James Smart Date: Thu Apr 12 09:16:15 2018 -0600 nvme: expand nvmf_check_if_ready checks The nvmf_check_if_ready() checks that were added are very simplistic. As such, the routine allows a lot of cases to fail ios during windows of reset or re-connection. In cases where there are not multi-path options present, the error goes back to the callee - the filesystem or application. Not good. The common routine was rewritten and calling syntax slightly expanded so that per-transport is_ready routines don't need to be present. The transports now call the routine directly. The routine is now a fabrics routine rather than an inline function. The routine now looks at controller state to decide the action to take. Some states mandate io failure. Others define the condition where a command can be accepted. When the decision is unclear, a generic queue-or-reject check is made to look for failfast or multipath ios and only fails the io if it is so marked. Otherwise, the io will be queued and wait for the controller state to resolve. Admin commands issued via ioctl share a live admin queue with commands from the transport for controller init. The ioctls could be intermixed with the initialization commands. It's possible for the ioctl cmd to be issued prior to the controller being enabled. To block this, the ioctl admin commands need to be distinguished from admin commands used for controller init. Added a USERCMD nvme_req(req)->rq_flags bit to reflect this division and set it on ioctls requests. As the nvmf_check_if_ready() routine is called prior to nvme_setup_cmd(), ensure that commands allocated by the ioctl path (actually anything in core.c) preps the nvme_req(req) before starting the io. This will preserve the USERCMD flag during execution and/or retry. Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 17 +++++++--- drivers/nvme/host/fabrics.c | 79 +++++++++++++++++++++++++++++++++++++++++++++ drivers/nvme/host/fabrics.h | 33 ++----------------- drivers/nvme/host/fc.c | 12 ++----- drivers/nvme/host/nvme.h | 1 + drivers/nvme/host/rdma.c | 14 ++------ drivers/nvme/target/loop.c | 11 ++----- 7 files changed, 101 insertions(+), 66 deletions(-) commit 62843c2e4226057c83f520c74fe9c81a1891c331 Author: Keith Busch Date: Thu Apr 12 09:16:14 2018 -0600 nvme: Use admin command effects for admin commands Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c73996984902516745bc587d5e8a0b2e034aea05 Author: Daniel Verkamp Date: Thu Apr 12 09:16:13 2018 -0600 nvmet: fix space padding in serial number Commit 42de82a8b544 previously attempted to fix this, and it did correctly pad the MN and FR fields with spaces, but the SN field still contains 0 bytes. The current code fills out the first 16 bytes with hex2bin, leaving the last 4 bytes zeroed. Rather than adding a lot of error-prone math to avoid overwriting SN twice, just set the whole thing to spaces up front (it's only 20 bytes). Fixes: 42de82a8b544 ("nvmet: don't report 0-bytes in serial number") Signed-off-by: Daniel Verkamp Reviewed-by: Martin Wilck Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/target/admin-cmd.c | 1 + 1 file changed, 1 insertion(+) commit fd92c77f58257ae5eb5180afe36e86094e4910f6 Author: Max Gurtovoy Date: Thu Apr 12 09:16:12 2018 -0600 nvme: check return value of init_srcu_struct function Also add error flow in case srcu initialization function fails. Signed-off-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 543c09c89fdc007c2990aa9d2abcc62e0dfa1311 Author: Rodrigo R. Galvao Date: Thu Apr 12 09:16:11 2018 -0600 nvmet: Fix nvmet_execute_write_zeroes sector count We have to increment the number of logical blocks to a 1's based value in the native format prior to converting to 512b units. Signed-off-by: Rodrigo R. Galvao [changelog] Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/target/io-cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 22b5560195bd66bc43359b71821dc78cc9de56c6 Author: Keith Busch Date: Thu Apr 12 09:16:10 2018 -0600 nvme-pci: Separate IO and admin queue IRQ vectors The admin and first IO queues shared the first irq vector, which has an affinity mask including cpu0. If a system allows cpu0 to be offlined, the admin queue may not be usable if no other CPUs in the affinity mask are online. This is a problem since unlike IO queues, there is only one admin queue that always needs to be usable. To fix, this patch allocates one pre_vector for the admin queue that is assigned all CPUs, so will always be accessible. The IO queues are assigned the remaining managed vectors. In case a controller has only one interrupt vector available, the admin and IO queues will share the pre_vector with all CPUs assigned. Cc: Jianchao Wang Cc: Ming Lei Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit a6ff7262c26c190f2480721703211cb12d66d45a Author: Keith Busch Date: Thu Apr 12 09:16:09 2018 -0600 nvme-pci: Remove unused queue parameter All the queue memory is allocated up front. We don't take the node into consideration when creating queues anymore, so removing the unused parameter. Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 64ee0ac0527704c47170316fa58dbde50edaaf70 Author: Keith Busch Date: Thu Apr 12 09:16:08 2018 -0600 nvme-pci: Skip queue deletion if there are no queues User reported controller always retains CSTS.RDY to 1, which fails controller disabling when resetting the controller. This is also before the admin queue is allocated, and trying to disable an unallocated queue results in a NULL dereference. Reported-by: Alex Gagniuc Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6038aa532a224da68c478f34f4dbce33c47169e6 Author: Arnd Bergmann Date: Thu Apr 12 09:16:07 2018 -0600 nvme: target: fix buffer overflow nvmet_execute_get_disc_log_page() passes a fixed-length string into nvmet_format_discovery_entry(), which then does a longer memcpy() on it, as pointed out by gcc-8: In function 'nvmet_format_discovery_entry', inlined from 'nvmet_execute_get_disc_log_page' at drivers/nvme/target/discovery.c:126:4: drivers/nvme/target/discovery.c:62:2: error: 'memcpy' forming offset [38, 223] is out of the bounds [0, 37] [-Werror=array-bounds] memcpy(e->subnqn, subsys_nqn, NVMF_NQN_SIZE); Using strncpy() will make this well-defined, filling the rest of the buffer with zeroes, under the assumption that the input is either a NUL-terminated string, or a byte sequence containing no zeroes. If the input is a string that is longer than NVMF_NQN_SIZE, we continue to have no NUL-termination in the output. Fixes: a07b4970f464 ("nvmet: add a generic NVMe target") Signed-off-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/target/discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74c6c71530847808d4e3be7b205719270efee80c Author: Johannes Thumshirn Date: Thu Apr 12 09:16:06 2018 -0600 nvme: don't send keep-alives to the discovery controller NVMe over Fabrics 1.0 Section 5.2 "Discovery Controller Properties and Command Support" Figure 31 "Discovery Controller – Admin Commands" explicitly listst all commands but "Get Log Page" and "Identify" as reserved, but NetApp report the Linux host is sending Keep Alive commands to the discovery controller, which is a violation of the Spec. We're already checking for discovery controllers when configuring the keep alive timeout but when creating a discovery controller we're not hard wiring the keep alive timeout to 0 and thus remain on NVME_DEFAULT_KATO for the discovery controller. This can be easily remproduced when issuing a direct connect to the discovery susbsystem using: 'nvme connect [...] --nqn=nqn.2014-08.org.nvmexpress.discovery' Signed-off-by: Johannes Thumshirn Fixes: 07bfcd09a288 ("nvme-fabrics: add a generic NVMe over Fabrics library") Reported-by: Martin George Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/fabrics.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 00b683dbabc34599b96a935aeee791f9af3ae02e Author: Johannes Thumshirn Date: Thu Apr 12 09:16:05 2018 -0600 nvme: unexport nvme_start_keep_alive nvme_start_keep_alive() isn't used outside core.c so unexport it and make it static. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 3 +-- drivers/nvme/host/nvme.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit 11d9ea6f2ca69237d35d6c55755beba3e006b106 Author: Ming Lei Date: Thu Apr 12 09:16:04 2018 -0600 nvme-loop: fix kernel oops in case of unhandled command When nvmet_req_init() fails, __nvmet_req_complete() is called to handle the target request via .queue_response(), so nvme_loop_queue_response() shouldn't be called again for handling the failure. This patch fixes this case by the following way: - move blk_mq_start_request() before nvmet_req_init(), so nvme_loop_queue_response() may work well to complete this host request - don't call nvme_cleanup_cmd() which is done in nvme_loop_complete_rq() - don't call nvme_loop_queue_response() which is done via .queue_response() Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig [trimmed changelog] Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/target/loop.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 7ec6074ff005e5f6cd2cf186a9ec7496c3db04f9 Author: Matias Bjørling Date: Thu Apr 12 09:16:03 2018 -0600 nvme: enforce 64bit offset for nvme_get_log_ext fn Compiling on 32 bits system produces a warning for the shift width when shifting 32 bit integer with 64bit integer. Make sure that offset always is 64bit, and use macros for retrieving lower and upper bits of the offset. Signed-off-by: Matias Bjørling Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 6 +++--- drivers/nvme/host/nvme.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 349fa7d6e1935f49bf4161c4900711b2989180a9 Author: Eric Biggers Date: Thu Apr 12 11:48:09 2018 -0400 ext4: prevent right-shifting extents beyond EXT_MAX_BLOCKS During the "insert range" fallocate operation, extents starting at the range offset are shifted "right" (to a higher file offset) by the range length. But, as shown by syzbot, it's not validated that this doesn't cause extents to be shifted beyond EXT_MAX_BLOCKS. In that case ->ee_block can wrap around, corrupting the extent tree. Fix it by returning an error if the space between the end of the last extent and EXT4_MAX_BLOCKS is smaller than the range being inserted. This bug can be reproduced by running the following commands when the current directory is on an ext4 filesystem with a 4k block size: fallocate -l 8192 file fallocate --keep-size -o 0xfffffffe000 -l 4096 -n file fallocate --insert-range -l 8192 file Then after unmounting the filesystem, e2fsck reports corruption. Reported-by: syzbot+06c885be0edcdaeab40c@syzkaller.appspotmail.com Fixes: 331573febb6a ("ext4: Add support FALLOC_FL_INSERT_RANGE for fallocate") Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/extents.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 65030ff305bc9c51cb75705483bdaac7813778f0 Author: Dan Carpenter Date: Thu Apr 5 14:25:18 2018 +0300 ASoC: topology: fix some tiny memory leaks These tiny memory leaks don't have a huge real life impact but they cause static checker warnings so let's fix them. Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown sound/soc/soc-topology.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 90619eb1dc4f19357fef5e9c13c6c9beead0fd80 Author: Pierre-Louis Bossart Date: Mon Apr 2 12:06:14 2018 -0500 ASoC: Intel: atom: fix ACPI/PCI Kconfig The split between ACPI and PCI platforms generated issues with randconfig: with SND_SST_ATOM_HIFI2_PLATFORM_PCI=y and SND_SST_ATOM_HIFI2_PLATFORM=m, we get this module link failure: ERROR: "sst_context_init" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined! ERROR: "sst_context_cleanup" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined! ERROR: "sst_alloc_drv_context" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined! ERROR: "intel_sst_pm" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined! ERROR: "sst_configure_runtime_pm" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined! To keep things simple, let's expose two configs for SND_SST_ATOM_HIFI2_PLATFORM_PCI and SND_SST_ATOM_HIFI2_PLATFORM_ACPI, which select a common SND_SST_ATOM_HIFI2_PLATFORM option. To avoid breaking existing solutions with the semantics change, SND_SST_ATOM_HIFI2_PLATFORM_ACPI uses "default ACPI" so that "make oldnoconfig" and "make olddefconfig" still work as expected. Also remove mentions of Medfield while we are at it since it was removed recently. Reported-by: Arnd Bergmann Fixes: 4772c16ede52 ("ASoC: Intel: Kconfig: Simplify-clarify ACPI/PCI dependencies") Signed-off-by: Pierre-Louis Bossart Reviewed-by: Andy Shevchenko Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 6f5427039c33e149b711c0f973fcac7f6875b768 Author: Arnd Bergmann Date: Wed Mar 28 16:53:10 2018 +0200 ASoC: rsnd: mark PM functions __maybe_unused The suspend/resume callbacks are now optional, leading to a warning when they are unused: sound/soc/sh/rcar/core.c:1548:12: error: 'rsnd_resume' defined but not used [-Werror=unused-function] static int rsnd_resume(struct device *dev) ^~~~~~~~~~~ sound/soc/sh/rcar/core.c:1539:12: error: 'rsnd_suspend' defined but not used [-Werror=unused-function] static int rsnd_suspend(struct device *dev) This marks the as __maybe_unused to avoid the warning. Fixes: f8a9a29c4fe9 ("ASoC: rsnd: set pm_ops in hibernate-compatible way") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fac8a5a5ea40b03dcbb0f46977094099ba2220b8 Author: Nicolin Chen Date: Sat Apr 7 21:40:21 2018 -0700 ASoC: fsl_ssi: Fix mode setting when changing channel number This is a partial revert (in a cleaner way) of commit ebf08ae3bc90 ("ASoC: fsl_ssi: Keep ssi->i2s_net updated") to fix a regression at test cases when switching between mono and stereo audio. The problem is that ssi->i2s_net is initialized in set_dai_fmt() only, while this set_dai_fmt() is only called during the dai-link probe(). The original patch assumed set_dai_fmt() would be called during every playback instance, so it failed at the overriding use cases. This patch adds the local variable i2s_net back to let regular use cases still follow the mode settings from the set_dai_fmt(). Meanwhile, the original commit of keeping ssi->i2s_net updated was to make set_tdm_slot() clean by checking the ssi->i2s_net directly instead of reading SCR register. However, the change itself is not necessary (or even harmful) because the set_tdm_slot() might fail to check the slot number for Normal-Mode-None-Net settings while mono audio cases still need 2 slots. So this patch can also fix it. And it adds an extra line of comments to declare ssi->i2s_net does not reflect the register value but merely the initial setting from the set_dai_fmt(). Reported-by: Mika Penttilä Signed-off-by: Nicolin Chen Tested-by: Mika Penttilä Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 852eb3aeeaf65f175f15c7af6a31aeffc050d659 Author: David Sterba Date: Tue Apr 3 19:23:33 2018 +0200 btrfs: add SPDX header to Kconfig Signed-off-by: David Sterba fs/btrfs/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit c1d7c514f745628eb096c5cbb10737855879ae25 Author: David Sterba Date: Tue Apr 3 19:23:33 2018 +0200 btrfs: replace GPL boilerplate by SPDX -- sources Remove GPL boilerplate text (long, short, one-line) and keep the rest, ie. personal, company or original source copyright statements. Add the SPDX header. Signed-off-by: David Sterba fs/btrfs/acl.c | 15 +-------------- fs/btrfs/async-thread.c | 15 +-------------- fs/btrfs/backref.c | 15 +-------------- fs/btrfs/check-integrity.c | 15 +-------------- fs/btrfs/compression.c | 15 +-------------- fs/btrfs/ctree.c | 15 +-------------- fs/btrfs/delayed-inode.c | 15 +-------------- fs/btrfs/delayed-ref.c | 15 +-------------- fs/btrfs/dev-replace.c | 16 ++-------------- fs/btrfs/dir-item.c | 15 +-------------- fs/btrfs/disk-io.c | 15 +-------------- fs/btrfs/export.c | 1 + fs/btrfs/extent-tree.c | 16 ++-------------- fs/btrfs/extent_io.c | 1 + fs/btrfs/extent_map.c | 1 + fs/btrfs/file-item.c | 15 +-------------- fs/btrfs/file.c | 15 +-------------- fs/btrfs/free-space-cache.c | 15 +-------------- fs/btrfs/free-space-tree.c | 15 +-------------- fs/btrfs/inode-item.c | 15 +-------------- fs/btrfs/inode-map.c | 15 +-------------- fs/btrfs/inode.c | 15 +-------------- fs/btrfs/ioctl.c | 15 +-------------- fs/btrfs/locking.c | 16 ++-------------- fs/btrfs/lzo.c | 15 +-------------- fs/btrfs/ordered-data.c | 15 +-------------- fs/btrfs/orphan.c | 15 +-------------- fs/btrfs/print-tree.c | 15 +-------------- fs/btrfs/props.c | 15 +-------------- fs/btrfs/qgroup.c | 15 +-------------- fs/btrfs/raid56.c | 16 ++-------------- fs/btrfs/reada.c | 15 +-------------- fs/btrfs/ref-verify.c | 15 +-------------- fs/btrfs/relocation.c | 15 +-------------- fs/btrfs/root-tree.c | 15 +-------------- fs/btrfs/scrub.c | 15 +-------------- fs/btrfs/send.c | 15 +-------------- fs/btrfs/struct-funcs.c | 15 +-------------- fs/btrfs/super.c | 15 +-------------- fs/btrfs/sysfs.c | 15 +-------------- fs/btrfs/tests/btrfs-tests.c | 15 +-------------- fs/btrfs/tests/extent-buffer-tests.c | 15 +-------------- fs/btrfs/tests/extent-io-tests.c | 15 +-------------- fs/btrfs/tests/extent-map-tests.c | 15 +-------------- fs/btrfs/tests/free-space-tests.c | 15 +-------------- fs/btrfs/tests/free-space-tree-tests.c | 15 +-------------- fs/btrfs/tests/inode-tests.c | 15 +-------------- fs/btrfs/tests/qgroup-tests.c | 15 +-------------- fs/btrfs/transaction.c | 15 +-------------- fs/btrfs/tree-checker.c | 13 +------------ fs/btrfs/tree-defrag.c | 15 +-------------- fs/btrfs/tree-log.c | 15 +-------------- fs/btrfs/ulist.c | 2 +- fs/btrfs/uuid-tree.c | 16 ++-------------- fs/btrfs/volumes.c | 16 ++-------------- fs/btrfs/xattr.c | 16 +--------------- fs/btrfs/zlib.c | 15 +-------------- fs/btrfs/zstd.c | 10 ++-------- 58 files changed, 65 insertions(+), 750 deletions(-) commit 9888c3402c8567a977de37f61e9dd87792723064 Author: David Sterba Date: Tue Apr 3 19:16:55 2018 +0200 btrfs: replace GPL boilerplate by SPDX -- headers Remove GPL boilerplate text (long, short, one-line) and keep the rest, ie. personal, company or original source copyright statements. Add the SPDX header. Unify the include protection macros to match the file names. Signed-off-by: David Sterba fs/btrfs/async-thread.h | 21 +++++---------------- fs/btrfs/backref.h | 19 +++---------------- fs/btrfs/btrfs_inode.h | 19 +++---------------- fs/btrfs/check-integrity.h | 19 +++---------------- fs/btrfs/compression.h | 19 +++---------------- fs/btrfs/ctree.h | 20 ++++---------------- fs/btrfs/dedupe.h | 20 ++++---------------- fs/btrfs/delayed-inode.h | 19 +++---------------- fs/btrfs/delayed-ref.h | 21 +++++---------------- fs/btrfs/dev-replace.h | 20 ++++---------------- fs/btrfs/disk-io.h | 20 ++++---------------- fs/btrfs/export.h | 1 + fs/btrfs/extent_io.h | 6 ++++-- fs/btrfs/extent_map.h | 6 ++++-- fs/btrfs/free-space-cache.h | 19 +++---------------- fs/btrfs/free-space-tree.h | 19 +++---------------- fs/btrfs/inode-map.h | 5 +++-- fs/btrfs/locking.h | 19 +++---------------- fs/btrfs/math.h | 20 +++----------------- fs/btrfs/ordered-data.h | 20 ++++---------------- fs/btrfs/print-tree.h | 21 +++++---------------- fs/btrfs/props.h | 19 +++---------------- fs/btrfs/qgroup.h | 22 +++++----------------- fs/btrfs/raid56.h | 21 +++++---------------- fs/btrfs/rcu-string.h | 20 ++++++-------------- fs/btrfs/ref-verify.h | 23 ++++++----------------- fs/btrfs/send.h | 20 ++++++-------------- fs/btrfs/sysfs.h | 7 ++++--- fs/btrfs/tests/btrfs-tests.h | 19 +++---------------- fs/btrfs/transaction.h | 20 ++++---------------- fs/btrfs/tree-checker.h | 17 +++-------------- fs/btrfs/tree-log.h | 20 ++++---------------- fs/btrfs/ulist.h | 7 +++---- fs/btrfs/volumes.h | 19 +++---------------- fs/btrfs/xattr.h | 21 ++++----------------- 35 files changed, 133 insertions(+), 475 deletions(-) commit c656941df9bc80f7ec65b92ca73c42f8b0b62628 Author: Nicolin Chen Date: Sun Apr 8 16:57:35 2018 -0700 ASoC: fsl_esai: Fix divisor calculation failure at lower ratio When the desired ratio is less than 256, the savesub (tolerance) in the calculation would become 0. This will then fail the loop- search immediately without reporting any errors. But if the ratio is smaller enough, there is no need to calculate the tolerance because PM divisor alone is enough to get the ratio. So a simple fix could be just to set PM directly instead of going into the loop-search. Reported-by: Marek Vasut Signed-off-by: Nicolin Chen Tested-by: Marek Vasut Reviewed-by: Fabio Estevam Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/fsl/fsl_esai.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 2675c13b293a007b7b7f8229514126bd23df09a7 Author: Michael Ellerman Date: Thu Apr 12 11:35:55 2018 +1000 powerpc/mm/radix: Fix checkstops caused by invalid tlbiel In tlbiel_radix_set_isa300() we use the PPC_TLBIEL() macro to construct tlbiel instructions. The instruction takes 5 fields, two of which are registers, and the others are constants. But because it's constructed with inline asm the compiler doesn't know that. We got the constraint wrong on the 'r' field, using "r" tells the compiler to put the value in a register. The value we then get in the macro is the *register number*, not the value of the field. That means when we mask the register number with 0x1 we get 0 or 1 depending on which register the compiler happens to put the constant in, eg: li r10,1 tlbiel r8,r9,2,0,0 li r7,1 tlbiel r10,r6,0,0,1 If we're unlucky we might generate an invalid instruction form, for example RIC=0, PRS=1 and R=0, tlbiel r8,r7,0,1,0, this has been observed to cause machine checks: Oops: Machine check, sig: 7 [#1] CPU: 24 PID: 0 Comm: swapper NIP: 00000000000385f4 LR: 000000000100ed00 CTR: 000000000000007f REGS: c00000000110bb40 TRAP: 0200 MSR: 9000000000201003 CR: 48002222 XER: 20040000 CFAR: 00000000000385d0 DAR: 0000000000001c00 DSISR: 00000200 SOFTE: 1 If the machine check happens early in boot while we have MSR_ME=0 it will escalate into a checkstop and kill the box entirely. To fix it we could change the inline asm constraint to "i" which tells the compiler the value is a constant. But a better fix is to just pass a literal 1 into the macro, which bypasses any problems with inline asm constraints. Fixes: d4748276ae14 ("powerpc/64s: Improve local TLB flush for boot and MCE on POWER9") Cc: stable@vger.kernel.org # v4.16+ Signed-off-by: Michael Ellerman Reviewed-by: Nicholas Piggin arch/powerpc/mm/tlb-radix.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e8103e44cebe2ef891bc3a5c6c4b74854846968b Author: Takuya Yamamoto Date: Tue Apr 10 23:35:39 2018 +0900 perf sched: Fix documentation for timehist Fixed a incorrect option and usage to those shown by "perf sched timehist -h", i.e. the default is really --call-graph, which is equivalent to -g. Signed-off-by: Takuya Yamamoto Cc: Peter Zijlstra Link: https://lkml.kernel.org/n/tip-8fzo0dlsi1mku5aqx8brep5s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-sched.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8a812bf552d98f6f887f860d3910f201b4a97b26 Author: Jin Yao Date: Mon Apr 9 18:26:49 2018 +0800 perf version: Print status for syscall_table This patch doesn't print "libaudit" line if HAVE_SYSCALL_TABLE_SUPPORT is available and add a line for HAVE_SYSCALL_TABLE_SUPPORT. For example, $ ./perf -vv perf version 4.13.rc5.gc2f8af9 dwarf: [ on ] # HAVE_DWARF_SUPPORT dwarf_getlocations: [ on ] # HAVE_DWARF_GETLOCATIONS_SUPPORT glibc: [ on ] # HAVE_GLIBC_SUPPORT gtk2: [ on ] # HAVE_GTK2_SUPPORT syscall_table: [ on ] # HAVE_SYSCALL_TABLE_SUPPORT libbfd: [ on ] # HAVE_LIBBFD_SUPPORT libelf: [ on ] # HAVE_LIBELF_SUPPORT libnuma: [ on ] # HAVE_LIBNUMA_SUPPORT numa_num_possible_cpus: [ on ] # HAVE_LIBNUMA_SUPPORT libperl: [ on ] # HAVE_LIBPERL_SUPPORT libpython: [ on ] # HAVE_LIBPYTHON_SUPPORT libslang: [ on ] # HAVE_SLANG_SUPPORT libcrypto: [ on ] # HAVE_LIBCRYPTO_SUPPORT libunwind: [ on ] # HAVE_LIBUNWIND_SUPPORT libdw-dwarf-unwind: [ on ] # HAVE_DWARF_SUPPORT zlib: [ on ] # HAVE_ZLIB_SUPPORT lzma: [ on ] # HAVE_LZMA_SUPPORT get_cpuid: [ on ] # HAVE_AUXTRACE_SUPPORT bpf: [ on ] # HAVE_LIBBPF_SUPPORT The line "syscall_table: [ on ] # HAVE_SYSCALL_TABLE_SUPPORT" is new created. Signed-off-by: Jin Yao Suggested-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1523269609-28824-4-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-version.c | 3 +++ 1 file changed, 3 insertions(+) commit 22e9af4e94801bbdf6945e55db64b877be7c71b3 Author: Jin Yao Date: Mon Apr 9 18:26:48 2018 +0800 perf tools: Rename HAVE_SYSCALL_TABLE to HAVE_SYSCALL_TABLE_SUPPORT To be consistent with other HAVE_XXX_SUPPORT uses in Makefile.config, this patch renames HAVE_SYSCALL_TABLE to HAVE_SYSCALL_TABLE_SUPPORT and updates the C code accordingly. Signed-off-by: Jin Yao Suggested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1523269609-28824-3-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 2 +- tools/perf/builtin-help.c | 2 +- tools/perf/perf.c | 4 ++-- tools/perf/util/generate-cmdlist.sh | 2 +- tools/perf/util/syscalltbl.c | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) commit 90ce61b91903f9c357cbceced45d41642f2aa812 Author: Jin Yao Date: Mon Apr 9 18:26:47 2018 +0800 perf script: Use HAVE_LIBXXX_SUPPORT to replace NO_LIBXXX In Makefile.config, we define the conditional compilation variables HAVE_LIBPERL_SUPPORT and HAVE_LIBPYTHON_SUPPORT. To make the C code more consistent, this patch replaces NO_LIBPERL/NO_LIBPYTHON in C code with HAVE_LIBPERL_SUPPORT/ HAVE_LIBPYTHON_SUPPORT. Signed-off-by: Jin Yao Suggested-by: Ingo Molnar Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1523269609-28824-2-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 4 ++-- tools/perf/util/trace-event-scripting.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit fd97d39b0aa49a4beb429aec344604c1b689f089 Author: Arnaldo Carvalho de Melo Date: Wed Apr 11 18:03:33 2018 -0300 Revert "x86/asm: Allow again using asm.h when building for the 'bpf' clang target" This reverts commit ca26cffa4e4aaeb09bb9e308f95c7835cb149248. Newer clang versions accept that asm(_ASM_SP) construct, and now that the bpf-script-test-kbuild.c script, used in one of the 'perf test LLVM' subtests doesn't include ptrace.h, which ended up including arch/x86/include/asm/asm.h, we can revert this patch. Suggested-by: Yonghong Song Link: https://lkml.kernel.org/r/613f0a0d-c433-8f4d-dcc1-c9889deae39e@fb.com Acked-by: Yonghong Song Cc: Adrian Hunter Cc: Alexander Potapenko Cc: Alexei Starovoitov Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Daniel Borkmann Cc: David Ahern Cc: Dmitriy Vyukov Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Matthias Kaehlcke Cc: Miguel Bernal Marin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-nqozcv8loq40tkqpfw997993@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo arch/x86/include/asm/asm.h | 2 -- 1 file changed, 2 deletions(-) commit c13009c1ef3a94cfea212c86bbb94c8361e5de0c Author: Arnaldo Carvalho de Melo Date: Wed Apr 11 17:57:32 2018 -0300 perf tests bpf: Remove unused ptrace.h include from LLVM test The bpf-script-test-kbuild.c script, used in one of the LLVM subtests, includes ptrace.h unnecessarily, and that ends up making it include a header that uses asm(_ASM_SP), a feature that is not supported by clang <= 4.0, breaking that 'perf test' entry. This ended up leading to the ca26cffa4e4a ("x86/asm: Allow again using asm.h when building for the 'bpf' clang target"), adding an ifndef __BPF__ to the arch/x86/include/asm/asm.h file. Newer clang versions accept that asm(_ASM_SP) construct, so just remove the ptrace.h include, which paves the way for reverting ca26cffa4e4a ("x86/asm: Allow again using asm.h when building for the 'bpf' clang target"). Suggested-by: Yonghong Song Acked-by: Yonghong Song Link: https://lkml.kernel.org/r/613f0a0d-c433-8f4d-dcc1-c9889deae39e@fb.com Cc: Adrian Hunter Cc: Alexander Potapenko Cc: Alexei Starovoitov Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Daniel Borkmann Cc: David Ahern Cc: Dmitriy Vyukov Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Matthias Kaehlcke Cc: Miguel Bernal Marin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-clbcnzbakdp18ibme4wt43ib@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/bpf-script-test-kbuild.c | 1 - 1 file changed, 1 deletion(-) commit e14b733c5dc62f574b4dbc045b2cc52b03d83d4c Author: Arnaldo Carvalho de Melo Date: Wed Apr 11 12:08:53 2018 -0300 perf jvmti: Give hints about package names needed to build Give as examples of package names to install to have this built for fedora and debian, to help the user a bit. The part from 'e.g.:' onwards: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: William Cohen Link: https://lkml.kernel.org/n/tip-edbi4r2pvzn7no6ebxbtczng@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51f39603b5f260c73635f4d06d390476b32df6a5 Author: Arnaldo Carvalho de Melo Date: Wed Apr 11 10:41:23 2018 -0300 perf annotate browser: Allow showing offsets in more than just jump targets Jesper wanted to see offsets at callq sites when doing some performance investigation related to retpolines, so save him some time by providing a 'O' hotkey to allow showing offsets from function start at call instructions or in all instructions, just go on pressing 'O' till the offsets you need appear. Example: Starts with: Samples: 64 of event 'cycles:ppp', 100000 Hz, Event count (approx.): 318963 ixgbe_read_reg /proc/kcore Percent│ ↑ je 2a │ ┌──cmp $0xffffffff,%r13d │ ├──je d0 │ │ mov $0x53e3,%edi │ │→ callq __const_udelay │ │ sub $0x1,%r15d │ │↑ jne 83 │ │ mov 0x8(%rbp),%rax │ │ testb $0x20,0x1799(%rax) │ │↑ je 2a │ │ mov 0x200(%rax),%rdi │ │ mov %r13d,%edx │ │ mov $0xffffffffc02595d8,%rsi │ │→ callq netdev_warn │ │↑ jmpq 2a │d0:└─→mov 0x8(%rbp),%rsi │ mov %rbp,%rdi │ mov %eax,0x4(%rsp) │ → callq ixgbe_remove_adapter.isra.77 │ mov 0x4(%rsp),%eax Press 'h' for help on key bindings ============================================================================ Pess 'O': Samples: 64 of event 'cycles:ppp', 100000 Hz, Event count (approx.): 318963 ixgbe_read_reg /proc/kcore Percent│ ↑ je 2a │ ┌──cmp $0xffffffff,%r13d │ ├──je d0 │ │ mov $0x53e3,%edi │99:│→ callq __const_udelay │ │ sub $0x1,%r15d │ │↑ jne 83 │ │ mov 0x8(%rbp),%rax │ │ testb $0x20,0x1799(%rax) │ │↑ je 2a │ │ mov 0x200(%rax),%rdi │ │ mov %r13d,%edx │ │ mov $0xffffffffc02595d8,%rsi │c6:│→ callq netdev_warn │ │↑ jmpq 2a │d0:└─→mov 0x8(%rbp),%rsi │ mov %rbp,%rdi │ mov %eax,0x4(%rsp) │db: → callq ixgbe_remove_adapter.isra.77 │ mov 0x4(%rsp),%eax Press 'h' for help on key bindings ============================================================================ Press 'O' again: Samples: 64 of event 'cycles:ppp', 100000 Hz, Event count (approx.): 318963 ixgbe_read_reg /proc/kcore Percent│8c: ↑ je 2a │8e:┌──cmp $0xffffffff,%r13d │92:├──je d0 │94:│ mov $0x53e3,%edi │99:│→ callq __const_udelay │9e:│ sub $0x1,%r15d │a2:│↑ jne 83 │a4:│ mov 0x8(%rbp),%rax │a8:│ testb $0x20,0x1799(%rax) │af:│↑ je 2a │b5:│ mov 0x200(%rax),%rdi │bc:│ mov %r13d,%edx │bf:│ mov $0xffffffffc02595d8,%rsi │c6:│→ callq netdev_warn │cb:│↑ jmpq 2a │d0:└─→mov 0x8(%rbp),%rsi │d4: mov %rbp,%rdi │d7: mov %eax,0x4(%rsp) │db: → callq ixgbe_remove_adapter.isra.77 │e0: mov 0x4(%rsp),%eax Press 'h' for help on key bindings ============================================================================ Press 'O' again and it will show just jump target offsets. Suggested-by: Jesper Dangaard Brouer Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Daniel Borkmann Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Linus Torvalds Cc: Martin Liška Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Thomas Richter Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-upp6pfdetwlsx18ec2uf1od4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 5 +++++ 1 file changed, 5 insertions(+) commit 592c10e217f3edb35c7e0deba161fef69ad1a336 Author: Arnaldo Carvalho de Melo Date: Wed Apr 11 10:30:03 2018 -0300 perf annotate: Allow showing offsets in more than just jump targets Jesper wanted to see offsets at callq sites when doing some performance investigation related to retpolines, so save him some time by providing an 'struct annotation_options' to control where offsets should appear: just on jump targets? That + call instructions? All? This puts in place the logic to show the offsets, now we need to wire this up in the TUI browser (next patch) and on the 'perf annotate --stdio2" interface, where we need a more general mechanism to setup the 'annotation_options' struct from the command line. Suggested-by: Jesper Dangaard Brouer Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Daniel Borkmann Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Linus Torvalds Cc: Martin Liška Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Thomas Richter Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-m3jc9c3swobye9tj08gnh5i7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 11 +++++++++-- tools/perf/util/annotate.h | 9 +++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) commit 3e83eda467050f13fa69d888993458b76e733de9 Author: Aaron Ma Date: Mon Apr 9 15:41:31 2018 +0800 HID: i2c-hid: Fix resume issue on Raydium touchscreen device When Rayd touchscreen resumed from S3, it issues too many errors like: i2c_hid i2c-RAYD0001:00: i2c_hid_get_input: incomplete report (58/5442) And all the report data are corrupted, touchscreen is unresponsive. Fix this by re-sending report description command after resume. Add device ID as a quirk. Cc: stable@vger.kernel.org Signed-off-by: Aaron Ma Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 3 +++ drivers/hid/i2c-hid/i2c-hid.c | 13 +++++++++++++ 2 files changed, 16 insertions(+) commit 471d557afed155b85da237ec46c549f443eeb5de Author: Filipe Manana Date: Thu Apr 5 22:55:12 2018 +0100 Btrfs: fix loss of prealloc extents past i_size after fsync log replay Currently if we allocate extents beyond an inode's i_size (through the fallocate system call) and then fsync the file, we log the extents but after a power failure we replay them and then immediately drop them. This behaviour happens since about 2009, commit c71bf099abdd ("Btrfs: Avoid orphan inodes cleanup while replaying log"), because it marks the inode as an orphan instead of dropping any extents beyond i_size before replaying logged extents, so after the log replay, and while the mount operation is still ongoing, we find the inode marked as an orphan and then perform a truncation (drop extents beyond the inode's i_size). Because the processing of orphan inodes is still done right after replaying the log and before the mount operation finishes, the intention of that commit does not make any sense (at least as of today). However reverting that behaviour is not enough, because we can not simply discard all extents beyond i_size and then replay logged extents, because we risk dropping extents beyond i_size created in past transactions, for example: add prealloc extent beyond i_size fsync - clears the flag BTRFS_INODE_NEEDS_FULL_SYNC from the inode transaction commit add another prealloc extent beyond i_size fsync - triggers the fast fsync path power failure In that scenario, we would drop the first extent and then replay the second one. To fix this just make sure that all prealloc extents beyond i_size are logged, and if we find too many (which is far from a common case), fallback to a full transaction commit (like we do when logging regular extents in the fast fsync path). Trivial reproducer: $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt $ xfs_io -f -c "pwrite -S 0xab 0 256K" /mnt/foo $ sync $ xfs_io -c "falloc -k 256K 1M" /mnt/foo $ xfs_io -c "fsync" /mnt/foo # mount to replay log $ mount /dev/sdb /mnt # at this point the file only has one extent, at offset 0, size 256K A test case for fstests follows soon, covering multiple scenarios that involve adding prealloc extents with previous shrinking truncates and without such truncates. Fixes: c71bf099abdd ("Btrfs: Avoid orphan inodes cleanup while replaying log") Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/tree-log.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 5 deletions(-) commit af7227338135d2f1b1552bf9a6d43e02dcba10b9 Author: Liu Bo Date: Sat Mar 31 06:11:56 2018 +0800 Btrfs: clean up resources during umount after trans is aborted Currently if some fatal errors occur, like all IO get -EIO, resources would be cleaned up when a) transaction is being committed or b) BTRFS_FS_STATE_ERROR is set However, in some rare cases, resources may be left alone after transaction gets aborted and umount may run into some ASSERT(), e.g. ASSERT(list_empty(&block_group->dirty_list)); For case a), in btrfs_commit_transaciton(), there're several places at the beginning where we just call btrfs_end_transaction() without cleaning up resources. For case b), it is possible that the trans handle doesn't have any dirty stuff, then only trans hanlde is marked as aborted while BTRFS_FS_STATE_ERROR is not set, so resources remain in memory. This makes btrfs also check BTRFS_FS_STATE_TRANS_ABORTED to make sure that all resources won't stay in memory after umount. Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit af72cfb80af5e4cafd8e0b58ac54f222c913aa1b Author: Kim Phillips Date: Tue Apr 10 19:16:24 2018 -0500 perf tests: Run dwarf unwind test on arm32 Enable the unwind test on arm32: $ perf test unwind 58: DWARF unwind : Ok Signed-off-by: Kim Phillips Cc: Alexander Shishkin Cc: Brian Robbins Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180410191624.a3a468670dd4548c66d3d094@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/include/arch-tests.h | 12 ++++++++++++ tools/perf/arch/arm/tests/Build | 2 ++ tools/perf/arch/arm/tests/arch-tests.c | 16 ++++++++++++++++ 3 files changed, 30 insertions(+) commit 4d3b57da1593c66835d8e3a757e4751b35493fb8 Author: Mark Rutland Date: Wed Apr 4 17:34:45 2018 +0100 tools headers: Restore READ_ONCE() C++ compatibility Our userspace defines READ_ONCE() in a way that clang doesn't like, as we have an anonymous union in which neither field is initialized. WRITE_ONCE() is fine since it initializes the __val field. For READ_ONCE() we can keep clang and GCC happy with a dummy initialization of the __c field, so let's do that. At the same time, let's split READ_ONCE() and WRITE_ONCE() over several lines for legibility, as we do in the in-kernel . Reported-by: Li Zhijian Reported-by: Sandipan Das Tested-by: Sandipan Das Signed-off-by: Mark Rutland Fixes: 6aa7de059173a986 ("locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE()") Link: http://lkml.kernel.org/r/20180404163445.16492-1-mark.rutland@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/compiler.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 9dc9a95f03a69ab926d9ff1986ab2087f34a5dce Author: Alexey Budankov Date: Tue Apr 3 21:18:33 2018 +0300 perf stat: Enable 1ms interval for printing event counters values Currently print count interval for performance counters values is limited by 10ms so reading the values at frequencies higher than 100Hz is restricted by the tool. This change makes perf stat -I possible on frequencies up to 1KHz and, to some extent, makes perf stat -I to be on-par with perf record sampling profiling. When running perf stat -I for monitoring e.g. PCIe uncore counters and at the same time profiling some I/O workload by perf record e.g. for cpu-cycles and context switches, it is then possible to observe consolidated CPU/OS/IO(Uncore) performance picture for that workload. Tool overhead warning printed when specifying -v option can be missed due to screen scrolling in case you have output to the console so message is moved into help available by running perf stat -h. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/b842ad6a-d606-32e4-afe5-974071b5198e@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-stat.txt | 2 +- tools/perf/builtin-stat.c | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) commit 619d3a2922ce623ca2eca443cc936810d328317c Author: Aaron Armstrong Skomra Date: Wed Apr 4 14:24:11 2018 -0700 HID: wacom: bluetooth: send exit report for recent Bluetooth devices The code path for recent Bluetooth devices omits an exit report which resets all the values of the device. Fixes: 4922cd26f0 ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface") Cc: # 4.11 Signed-off-by: Aaron Armstrong Skomra Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 76 ++++++++++++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 30 deletions(-) commit 573eda59c772d11fc2b56d525dfb698b0f87ddb3 Author: Tero Kristo Date: Thu Apr 12 11:23:15 2018 +0300 ASoC: dmic: Fix clock parenting In 4.16 the clock hierarchy got changed by a5c82a09d876 ARM: dts: omap4: add clkctrl nodes The fck of dmic is no longer a mux clock, it's parent is. Signed-off-by: Tero Kristo Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown Cc: stable@vger.kernel.org # 4.16+ sound/soc/omap/omap-dmic.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 16149013f8391d3bd7bcbcbe3bfd2fd06ba110e4 Author: Amir Goldstein Date: Thu Mar 29 16:36:56 2018 +0300 ovl: update documentation w.r.t "xino" feature Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi Documentation/filesystems/overlayfs.txt | 39 ++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 6 deletions(-) commit 795939a93e600587e52c34fe02402b27ddda6017 Author: Amir Goldstein Date: Thu Mar 29 09:08:18 2018 +0300 ovl: add support for "xino" mount and config options With mount option "xino=on", mounter declares that there are enough free high bits in underlying fs to hold the layer fsid. If overlayfs does encounter underlying inodes using the high xino bits reserved for layer fsid, a warning will be emitted and the original inode number will be used. The mount option name "xino" goes after a similar meaning mount option of aufs, but in overlayfs case, the mapping is stateless. An example for a use case of "xino=on" is when upper/lower is on an xfs filesystem. xfs uses 64bit inode numbers, but it currently never uses the upper 8bit for inode numbers exposed via stat(2) and that is not likely to change in the future without user opting-in for a new xfs feature. The actual number of unused upper bit is much larger and determined by the xfs filesystem geometry (64 - agno_log - agblklog - inopblog). That means that for all practical purpose, there are enough unused bits in xfs inode numbers for more than OVL_MAX_STACK unique fsid's. Another use case of "xino=on" is when upper/lower is on tmpfs. tmpfs inode numbers are allocated sequentially since boot, so they will practially never use the high inode number bits. For compatibility with applications that expect 32bit inodes, the feature can be disabled with "xino=off". The option "xino=auto" automatically detects underlying filesystem that use 32bit inodes and enables the feature. The Kconfig option OVERLAY_FS_XINO_AUTO and module parameter of the same name, determine if the default mode for overlayfs mount is "xino=auto" or "xino=off". Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/Kconfig | 17 +++++++++++ fs/overlayfs/ovl_entry.h | 1 + fs/overlayfs/super.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 88 insertions(+), 3 deletions(-) commit adbf4f7ea834671c9d12002136c8162b34e011d5 Author: Amir Goldstein Date: Mon Nov 6 16:48:02 2017 +0200 ovl: consistent d_ino for non-samefs with xino When overlay layers are not all on the same fs, but all inode numbers of underlying fs do not use the high 'xino' bits, overlay st_ino values are constant and persistent. In that case, relax non-samefs constraint for consistent d_ino and always iterate non-merge dir using ovl_fill_real() actor so we can remap lower inode numbers to unique lower fs range. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/readdir.c | 45 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) commit 12574a9f4c9cc9d8d6fd9078cbb8ec7d3e9ed46b Author: Amir Goldstein Date: Fri Mar 16 10:39:37 2018 +0200 ovl: consistent i_ino for non-samefs with xino When overlay layers are not all on the same fs, but all inode numbers of underlying fs do not use the high 'xino' bits, overlay st_ino values are constant and persistent. In that case, set i_ino value to the same value as st_ino for nfsd readdirplus validator. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/export.c | 2 +- fs/overlayfs/inode.c | 27 ++++++++++++++++++--------- fs/overlayfs/namei.c | 4 +--- fs/overlayfs/overlayfs.h | 2 +- 4 files changed, 21 insertions(+), 14 deletions(-) commit e487d889b7e3e8ec4091eb83bc4f7e67c7f05e27 Author: Amir Goldstein Date: Tue Nov 7 13:55:04 2017 +0200 ovl: constant st_ino for non-samefs with xino On 64bit systems, when overlay layers are not all on the same fs, but all inode numbers of underlying fs are not using the high bits, use the high bits to partition the overlay st_ino address space. The high bits hold the fsid (upper fsid is 0). This way overlay inode numbers are unique and all inodes use overlay st_dev. Inode numbers are also persistent for a given layer configuration. Currently, our only indication for available high ino bits is from a filesystem that supports file handles and uses the default encode_fh() operation, which encodes a 32bit inode number. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 31 +++++++++++++++++++++++++++++-- fs/overlayfs/overlayfs.h | 9 ++++++++- fs/overlayfs/ovl_entry.h | 2 ++ fs/overlayfs/super.c | 26 ++++++++++++++++++++++---- fs/overlayfs/util.c | 17 ++++++++++++++--- 5 files changed, 75 insertions(+), 10 deletions(-) commit 5148626b806a74dd219f2bce5f204abf909f6930 Author: Amir Goldstein Date: Wed Mar 28 20:22:41 2018 +0300 ovl: allocate anon bdev per unique lower fs Instead of allocating an anonymous bdev per lower layer, allocate one anonymous bdev per every unique lower fs that is different than upper fs. Every unique lower fs is assigned an fsid > 0 and the number of unique lower fs are stored in ofs->numlowerfs. The assigned fsid is stored in the lower layer struct and will be used also for inode number multiplexing. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 9 ++++--- fs/overlayfs/ovl_entry.h | 18 +++++++++---- fs/overlayfs/super.c | 66 +++++++++++++++++++++++++++++++++++------------- fs/overlayfs/util.c | 7 ++++- 4 files changed, 72 insertions(+), 28 deletions(-) commit da309e8c055de8d6461ae01764a3352c77878735 Author: Amir Goldstein Date: Wed Nov 8 19:39:51 2017 +0200 ovl: factor out ovl_map_dev_ino() helper A helper for ovl_getattr() to map the values of st_dev and st_ino according to constant st_ino rules. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 88 +++++++++++++++++++++++++++--------------------- fs/overlayfs/overlayfs.h | 1 + fs/overlayfs/util.c | 7 ++++ 3 files changed, 57 insertions(+), 39 deletions(-) commit 8f35cf51cd24a08e3d5b97e7253c93a5c90a4c1e Author: Miklos Szeredi Date: Thu Apr 12 12:04:50 2018 +0200 ovl: cleanup ovl_update_time() No need to mess with an alias, the upperdentry can be retrieved directly from the overlay inode. Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit 3a291774d17e096950854506d8869dfe950ec932 Author: Miklos Szeredi Date: Thu Apr 12 12:04:49 2018 +0200 ovl: add WARN_ON() for non-dir redirect cases Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 0471a9cdb00ff4a84e781c6dc4b0f87297bac1ed Author: Vivek Goyal Date: Tue Mar 20 16:35:40 2018 -0400 ovl: cleanup setting OVL_INDEX Signed-off-by: Miklos Szeredi fs/overlayfs/export.c | 3 --- fs/overlayfs/inode.c | 3 +++ fs/overlayfs/namei.c | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) commit 102b0d11cbe83e607a8e9060c05930905332f9ec Author: Vivek Goyal Date: Fri Mar 9 15:44:43 2018 -0500 ovl: set d->is_dir and d->opaque for last path element Certain properties in ovl_lookup_data should be set only for the last element of the path. IOW, if we are calling ovl_lookup_single() for an absolute redirect, then d->is_dir and d->opaque do not make much sense for intermediate path elements. Instead set them only if dentry being lookup is last path element. As of now we do not seem to be making use of d->opaque if it is set for a path/dentry in lower. But just define the semantics so that future code can make use of this assumption. Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e9b77f90cc2307f6d2457696d3d76288a5df11fc Author: Vivek Goyal Date: Fri Mar 9 15:44:42 2018 -0500 ovl: Do not check for redirect if this is last layer If we are looking in last layer, then there should not be any need to process redirect. redirect information is used only for lookup in next lower layer and there is no more lower layer to look into. So no need to process redirects. IOW, ignore redirects on lowest layer. Signed-off-by: Vivek Goyal Reviewed-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8b58924ad55c3a9fbeddd1a02d09fd29435e50eb Author: Amir Goldstein Date: Fri Mar 9 17:05:55 2018 +0200 ovl: lookup in inode cache first when decoding lower file handle When decoding a lower file handle, we need to check if lower file was copied up and indexed and if it has a whiteout index, we need to check if this is an unlinked but open non-dir before returning -ESTALE. To find out if this is an unlinked but open non-dir we need to lookup an overlay inode in inode cache by lower inode and that requires decoding the lower file handle before looking in inode cache. Before this change, if the lower inode turned out to be a directory, we may have paid an expensive cost to reconnect that lower directory for nothing. After this change, we start by decoding a disconnected lower dentry and using the lower inode for looking up an overlay inode in inode cache. If we find overlay inode and dentry in cache, we avoid the index lookup overhead. If we don't find an overlay inode and dentry in cache, then we only need to decode a connected lower dentry in case the lower dentry is a non-indexed directory. The xfstests group overlay/exportfs tests decoding overlayfs file handles after drop_caches with different states of the file at encode and decode time. Overall the tests in the group call ovl_lower_fh_to_d() 89 times to decode a lower file handle. Before this change, the tests called ovl_get_index_fh() 75 times and reconnect_one() 61 times. After this change, the tests call ovl_get_index_fh() 70 times and reconnect_one() 59 times. The 2 cases where reconnect_one() was avoided are cases where a non-upper directory file handle was encoded, then the directory removed and then file handle was decoded. To demonstrate the affect on decoding file handles with hot inode/dentry cache, the drop_caches call in the tests was disabled. Without drop_caches, there are no reconnect_one() calls at all before or after the change. Before the change, there are 75 calls to ovl_get_index_fh(), exactly as the case with drop_caches. After the change, there are only 10 calls to ovl_get_index_fh(). Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/export.c | 58 +++++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 25 deletions(-) commit 8a22efa15b46d524577cac79da63cebca8e8307f Author: Amir Goldstein Date: Fri Mar 9 15:51:02 2018 +0200 ovl: do not try to reconnect a disconnected origin dentry On lookup of non directory, we try to decode the origin file handle stored in upper inode. The origin file handle is supposed to be decoded to a disconnected non-dir dentry, which is fine, because we only need the lower inode of a copy up origin. However, if the origin file handle somehow turns out to be a directory we pay the expensive cost of reconnecting the directory dentry, only to get a mismatch file type and drop the dentry. Optimize this case by explicitly opting out of reconnecting the dentry. Opting-out of reconnect is done by passing a NULL acceptable callback to exportfs_decode_fh(). While the case described above is a strange corner case that does not really need to be optimized, the API added for this optimization will be used by a following patch to optimize a more common case of decoding an overlayfs file handle. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/exportfs/expfs.c | 9 +++++++++ fs/overlayfs/export.c | 4 ++-- fs/overlayfs/namei.c | 16 +++++++++------- fs/overlayfs/overlayfs.h | 5 +++-- 4 files changed, 23 insertions(+), 11 deletions(-) commit 5b2cccd32c668de6bd1979545184cd7f0260f053 Author: Amir Goldstein Date: Fri Feb 2 10:42:03 2018 +0200 ovl: disambiguate ovl_encode_fh() Rename ovl_encode_fh() to ovl_encode_real_fh() to differentiate from the exportfs function ovl_encode_inode_fh() and change the latter to ovl_encode_fh() to match the exportfs method name. Rename ovl_decode_fh() to ovl_decode_real_fh() for consistency. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 6 +++--- fs/overlayfs/export.c | 12 ++++++------ fs/overlayfs/namei.c | 10 +++++----- fs/overlayfs/overlayfs.h | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) commit 9f99e50d460ac7fd5f6c9b97aad0088c28c8656d Author: Amir Goldstein Date: Wed Apr 11 20:09:29 2018 +0300 ovl: set lower layer st_dev only if setting lower st_ino For broken hardlinks, we do not return lower st_ino, so we should also not return lower pseudo st_dev. Fixes: a0c5ad307ac0 ("ovl: relax same fs constraint for constant st_ino") Cc: #v4.15 Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 3ec9b3fafcaf441cc4d46b9742cd6ec0c79f8df0 Author: Amir Goldstein Date: Mon Mar 12 10:30:41 2018 -0400 ovl: fix lookup with middle layer opaque dir and absolute path redirects As of now if we encounter an opaque dir while looking for a dentry, we set d->last=true. This means that there is no need to look further in any of the lower layers. This works fine as long as there are no redirets or relative redircts. But what if there is an absolute redirect on the children dentry of opaque directory. We still need to continue to look into next lower layer. This patch fixes it. Here is an example to demonstrate the issue. Say you have following setup. upper: /redirect (redirect=/a/b/c) lower1: /a/[b]/c ([b] is opaque) (c has absolute redirect=/a/b/d/) lower0: /a/b/d/foo Now "redirect" dir should merge with lower1:/a/b/c/ and lower0:/a/b/d. Note, despite the fact lower1:/a/[b] is opaque, we need to continue to look into lower0 because children c has an absolute redirect. Following is a reproducer. Watch me make foo disappear: $ mkdir lower middle upper work work2 merged $ mkdir lower/origin $ touch lower/origin/foo $ mount -t overlay none merged/ \ -olowerdir=lower,upperdir=middle,workdir=work2 $ mkdir merged/pure $ mv merged/origin merged/pure/redirect $ umount merged $ mount -t overlay none merged/ \ -olowerdir=middle:lower,upperdir=upper,workdir=work $ mv merged/pure/redirect merged/redirect Now you see foo inside a twice redirected merged dir: $ ls merged/redirect foo $ umount merged $ mount -t overlay none merged/ \ -olowerdir=middle:lower,upperdir=upper,workdir=work After mount cycle you don't see foo inside the same dir: $ ls merged/redirect During middle layer lookup, the opaqueness of middle/pure is left in the lookup state and then middle/pure/redirect is wrongly treated as opaque. Fixes: 02b69b284cd7 ("ovl: lookup redirects") Cc: #v4.10 Signed-off-by: Amir Goldstein Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 452061fd4521b2bf3225fc391dbe536e5f9c05e2 Author: Vivek Goyal Date: Fri Mar 9 15:44:41 2018 -0500 ovl: Set d->last properly during lookup d->last signifies that this is the last layer we are looking into and there is no more. And that means this allows for some optimzation opportunities during lookup. For example, in ovl_lookup_single() we don't have to check for opaque xattr of a directory is this is the last layer we are looking into (d->last = true). But knowing for sure whether we are looking into last layer can be very tricky. If redirects are not enabled, then we can look at poe->numlower and figure out if the lookup we are about to is last layer or not. But if redircts are enabled then it is possible poe->numlower suggests that we are looking in last layer, but there is an absolute redirect present in found element and that redirects us to a layer in root and that means lookup will continue in lower layers further. For example, consider following. /upperdir/pure (opaque=y) /upperdir/pure/foo (opaque=y,redirect=/bar) /lowerdir/bar In this case pure is "pure upper". When we look for "foo", that time poe->numlower=0. But that alone does not mean that we will not search for a merge candidate in /lowerdir. Absolute redirect changes that. IOW, d->last should not be set just based on poe->numlower if redirects are enabled. That can lead to setting d->last while it should not have and that means we will not check for opaque xattr while we should have. So do this. - If redirects are not enabled, then continue to rely on poe->numlower information to determine if it is last layer or not. - If redirects are enabled, then set d->last = true only if this is the last layer in root ovl_entry (roe). Suggested-by: Amir Goldstein Reviewed-by: Amir Goldstein Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi Fixes: 02b69b284cd7 ("ovl: lookup redirects") Cc: #v4.10 fs/overlayfs/namei.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 695b46e76b62447e506cddc87e088236498008e5 Author: Amir Goldstein Date: Thu Mar 15 23:39:01 2018 +0200 ovl: set i_ino to the value of st_ino for NFS export Eddie Horng reported that readdir of an overlayfs directory that was exported via NFSv3 returns entries with d_type set to DT_UNKNOWN. The reason is that while preparing the response for readdirplus, nfsd checks inside encode_entryplus_baggage() that a child dentry's inode number matches the value of d_ino returns by overlayfs readdir iterator. Because the overlayfs inodes use arbitrary inode numbers that are not correlated with the values of st_ino/d_ino, NFSv3 falls back to not encoding d_type. Although this is an allowed behavior, we can fix it for the case of all overlayfs layers on the same underlying filesystem. When NFS export is enabled and d_ino is consistent with st_ino (samefs), set the same value also to i_ino in ovl_fill_inode() for all overlayfs inodes, nfsd readdirplus sanity checks will pass. ovl_fill_inode() may be called from ovl_new_inode(), before real inode was created with ino arg 0. In that case, i_ino will be updated to real upper inode i_ino on ovl_inode_init() or ovl_inode_update(). Reported-by: Eddie Horng Tested-by: Eddie Horng Signed-off-by: Amir Goldstein Fixes: 8383f1748829 ("ovl: wire up NFS export operations") Cc: #v4.16 Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 21 +++++++++++++++++---- fs/overlayfs/util.c | 8 +++++++- 2 files changed, 24 insertions(+), 5 deletions(-) commit 32e6e967fb36bf77ed99221ae3ce1909f045d8f9 Author: Song Liu Date: Wed Apr 11 18:02:37 2018 +0000 perf/core: Need CAP_SYS_ADMIN to create k/uprobe with perf_event_open() Non-root user cannot create kprobe or uprobe through the text-based interface (kprobe_events, uprobe_events),so they should not be able to create probes via perf_event_open() either. Reported-by: Vince Weaver Signed-off-by: Song Liu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 33ea4b24277b ("perf/core: Implement the 'perf_uprobe' PMU") Fixes: e12f03d7031a ("perf/core: Implement the 'perf_kprobe' PMU") Link: http://lkml.kernel.org/r/C0B2EFB5-C403-4BDB-9046-C14B3EE66999@fb.com Signed-off-by: Ingo Molnar kernel/events/core.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ef389b734691cdc8beb009dd402135dcdcb86a56 Merge: a774635 c76fc98 Author: Ingo Molnar Date: Thu Apr 12 09:42:34 2018 +0200 Merge branch 'WIP.x86/asm' into x86/urgent, because the topic is ready Signed-off-by: Ingo Molnar commit e3e288121408c3abeed5af60b87b95c847143845 Author: Joerg Roedel Date: Wed Apr 11 17:24:38 2018 +0200 x86/pgtable: Don't set huge PUD/PMD on non-leaf entries The pmd_set_huge() and pud_set_huge() functions are used from the generic ioremap() code to establish large mappings where this is possible. But the generic ioremap() code does not check whether the PMD/PUD entries are already populated with a non-leaf entry, so that any page-table pages these entries point to will be lost. Further, on x86-32 with SHARED_KERNEL_PMD=0, this causes a BUG_ON() in vmalloc_sync_one() when PMD entries are synced from swapper_pg_dir to the current page-table. This happens because the PMD entry from swapper_pg_dir was promoted to a huge-page entry while the current PGD still contains the non-leaf entry. Because both entries are present and point to a different page, the BUG_ON() triggers. This was actually triggered with pti-x32 enabled in a KVM virtual machine by the graphics driver. A real and better fix for that would be to improve the page-table handling in the generic ioremap() code. But that is out-of-scope for this patch-set and left for later work. Reported-by: David H. Gutteridge Signed-off-by: Joerg Roedel Reviewed-by: Thomas Gleixner Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: Jiri Kosina Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180411152437.GC15462@8bytes.org Signed-off-by: Ingo Molnar arch/x86/mm/pgtable.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8c06c7740d191b9055cb9be920579d5ecdd26303 Author: Dave Hansen Date: Fri Apr 6 13:55:18 2018 -0700 x86/pti: Leave kernel text global for !PCID Global pages are bad for hardening because they potentially let an exploit read the kernel image via a Meltdown-style attack which makes it easier to find gadgets. But, global pages are good for performance because they reduce TLB misses when making user/kernel transitions, especially when PCIDs are not available, such as on older hardware, or where a hypervisor has disabled them for some reason. This patch implements a basic, sane policy: If you have PCIDs, you only map a minimal amount of kernel text global. If you do not have PCIDs, you map all kernel text global. This policy effectively makes PCIDs something that not only adds performance but a little bit of hardening as well. I ran a simple "lseek" microbenchmark[1] to test the benefit on a modern Atom microserver. Most of the benefit comes from applying the series before this patch ("entry only"), but there is still a signifiant benefit from this patch. No Global Lines (baseline ): 6077741 lseeks/sec 88 Global Lines (entry only): 7528609 lseeks/sec (+23.9%) 94 Global Lines (this patch): 8433111 lseeks/sec (+38.8%) [1.] https://github.com/antonblanchard/will-it-scale/blob/master/tests/lseek1.c Signed-off-by: Dave Hansen Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dan Williams Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Nadav Amit Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180406205518.E3D989EB@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/pti.h | 2 ++ arch/x86/mm/init_64.c | 6 ++++ arch/x86/mm/pti.c | 78 +++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 82 insertions(+), 4 deletions(-) commit 39114b7a743e6759bab4d96b7d9651d44d17e3f9 Author: Dave Hansen Date: Fri Apr 6 13:55:17 2018 -0700 x86/pti: Never implicitly clear _PAGE_GLOBAL for kernel image Summary: In current kernels, with PTI enabled, no pages are marked Global. This potentially increases TLB misses. But, the mechanism by which the Global bit is set and cleared is rather haphazard. This patch makes the process more explicit. In the end, it leaves us with Global entries in the page tables for the areas truly shared by userspace and kernel and increases TLB hit rates. The place this patch really shines in on systems without PCIDs. In this case, we are using an lseek microbenchmark[1] to see how a reasonably non-trivial syscall behaves. Higher is better: No Global pages (baseline): 6077741 lseeks/sec 88 Global Pages (this set): 7528609 lseeks/sec (+23.9%) On a modern Skylake desktop with PCIDs, the benefits are tangible, but not huge for a kernel compile (lower is better): No Global pages (baseline): 186.951 seconds time elapsed ( +- 0.35% ) 28 Global pages (this set): 185.756 seconds time elapsed ( +- 0.09% ) -1.195 seconds (-0.64%) I also re-checked everything using the lseek1 test[1]: No Global pages (baseline): 15783951 lseeks/sec 28 Global pages (this set): 16054688 lseeks/sec +270737 lseeks/sec (+1.71%) The effect is more visible, but still modest. Details: The kernel page tables are inherited from head_64.S which rudely marks them as _PAGE_GLOBAL. For PTI, we have been relying on the grace of $DEITY and some insane behavior in pageattr.c to clear _PAGE_GLOBAL. This patch tries to do better. First, stop filtering out "unsupported" bits from being cleared in the pageattr code. It's fine to filter out *setting* these bits but it is insane to keep us from clearing them. Then, *explicitly* go clear _PAGE_GLOBAL from the kernel identity map. Do not rely on pageattr to do it magically. After this patch, we can see that "GLB" shows up in each copy of the page tables, that we have the same number of global entries in each and that they are the *same* entries. /sys/kernel/debug/page_tables/current_kernel:11 /sys/kernel/debug/page_tables/current_user:11 /sys/kernel/debug/page_tables/kernel:11 9caae8ad6a1fb53aca2407ec037f612d current_kernel.GLB 9caae8ad6a1fb53aca2407ec037f612d current_user.GLB 9caae8ad6a1fb53aca2407ec037f612d kernel.GLB A quick visual audit also shows that all the entries make sense. 0xfffffe0000000000 is the cpu_entry_area and 0xffffffff81c00000 is the entry/exit text: 0xfffffe0000000000-0xfffffe0000002000 8K ro GLB NX pte 0xfffffe0000002000-0xfffffe0000003000 4K RW GLB NX pte 0xfffffe0000003000-0xfffffe0000006000 12K ro GLB NX pte 0xfffffe0000006000-0xfffffe0000007000 4K ro GLB x pte 0xfffffe0000007000-0xfffffe000000d000 24K RW GLB NX pte 0xfffffe000002d000-0xfffffe000002e000 4K ro GLB NX pte 0xfffffe000002e000-0xfffffe000002f000 4K RW GLB NX pte 0xfffffe000002f000-0xfffffe0000032000 12K ro GLB NX pte 0xfffffe0000032000-0xfffffe0000033000 4K ro GLB x pte 0xfffffe0000033000-0xfffffe0000039000 24K RW GLB NX pte 0xffffffff81c00000-0xffffffff81e00000 2M ro PSE GLB x pmd [1.] https://github.com/antonblanchard/will-it-scale/blob/master/tests/lseek1.c Signed-off-by: Dave Hansen Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dan Williams Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Nadav Amit Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180406205517.C80FBE05@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/init.c | 8 +------- arch/x86/mm/pageattr.c | 12 +++++++++--- arch/x86/mm/pti.c | 25 +++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 10 deletions(-) commit 0f561fce4d6979a50415616896512f87a6d1d5c8 Author: Dave Hansen Date: Fri Apr 6 13:55:15 2018 -0700 x86/pti: Enable global pages for shared areas The entry/exit text and cpu_entry_area are mapped into userspace and the kernel. But, they are not _PAGE_GLOBAL. This creates unnecessary TLB misses. Add the _PAGE_GLOBAL flag for these areas. Signed-off-by: Dave Hansen Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dan Williams Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Nadav Amit Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180406205515.2977EE7D@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/cpu_entry_area.c | 14 +++++++++++++- arch/x86/mm/pti.c | 23 ++++++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) commit 639d6aafe437a7464399d2a77d006049053df06f Author: Dave Hansen Date: Fri Apr 6 13:55:14 2018 -0700 x86/mm: Do not forbid _PAGE_RW before init for __ro_after_init __ro_after_init data gets stuck in the .rodata section. That's normally fine because the kernel itself manages the R/W properties. But, if we run __change_page_attr() on an area which is __ro_after_init, the .rodata checks will trigger and force the area to be immediately read-only, even if it is early-ish in boot. This caused problems when trying to clear the _PAGE_GLOBAL bit for these area in the PTI code: it cleared _PAGE_GLOBAL like I asked, but also took it up on itself to clear _PAGE_RW. The kernel then oopses the next time it wrote to a __ro_after_init data structure. To fix this, add the kernel_set_to_readonly check, just like we have for kernel text, just a few lines below in this function. Signed-off-by: Dave Hansen Acked-by: Kees Cook Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dan Williams Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Nadav Amit Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180406205514.8D898241@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/pageattr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 430d4005b8b41c19966dd3bfdb33004bdb2de01c Author: Dave Hansen Date: Fri Apr 6 13:55:13 2018 -0700 x86/mm: Comment _PAGE_GLOBAL mystery I was mystified as to where the _PAGE_GLOBAL in the kernel page tables for kernel text came from. I audited all the places I could find, but I missed one: head_64.S. The page tables that we create in here live for a long time, and they also have _PAGE_GLOBAL set, despite whether the processor supports it or not. It's harmless, and we got *lucky* that the pageattr code accidentally clears it when we wipe it out of __supported_pte_mask and then later try to mark kernel text read-only. Comment some of these properties to make it easier to find and understand in the future. Signed-off-by: Dave Hansen Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dan Williams Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Nadav Amit Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180406205513.079BB265@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/head_64.S | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 1a54420aeb4da1ba5b28283aa5696898220c9a27 Author: Dave Hansen Date: Fri Apr 6 13:55:11 2018 -0700 x86/mm: Remove extra filtering in pageattr code The pageattr code has a mode where it can set or clear PTE bits in existing PTEs, so the page protections of the *new* PTEs come from one of two places: 1. The set/clear masks: cpa->mask_clr / cpa->mask_set 2. The existing PTE We filter ->mask_set/clr for supported PTE bits at entry to __change_page_attr() so we never need to filter them again. The only other place permissions can come from is an existing PTE and those already presumably have good bits. We do not need to filter them again. Signed-off-by: Dave Hansen Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dan Williams Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Nadav Amit Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180406205511.BC072352@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/pageattr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit fb43d6cb91ef57d9e58d5f69b423784ff4a4c374 Author: Dave Hansen Date: Fri Apr 6 13:55:09 2018 -0700 x86/mm: Do not auto-massage page protections A PTE is constructed from a physical address and a pgprotval_t. __PAGE_KERNEL, for instance, is a pgprot_t and must be converted into a pgprotval_t before it can be used to create a PTE. This is done implicitly within functions like pfn_pte() by massage_pgprot(). However, this makes it very challenging to set bits (and keep them set) if your bit is being filtered out by massage_pgprot(). This moves the bit filtering out of pfn_pte() and friends. For users of PAGE_KERNEL*, filtering will be done automatically inside those macros but for users of __PAGE_KERNEL*, they need to do their own filtering now. Note that we also just move pfn_pte/pmd/pud() over to check_pgprot() instead of massage_pgprot(). This way, we still *look* for unsupported bits and properly warn about them if we find them. This might happen if an unfiltered __PAGE_KERNEL* value was passed in, for instance. - printk format warning fix from: Arnd Bergmann - boot crash fix from: Tom Lendacky - crash bisected by: Mike Galbraith Signed-off-by: Dave Hansen Reported-and-fixed-by: Arnd Bergmann Fixed-by: Tom Lendacky Bisected-by: Mike Galbraith Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dan Williams Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Nadav Amit Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180406205509.77E1D7F6@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/kaslr.c | 3 +++ arch/x86/include/asm/pgtable.h | 27 ++++++++++++++++++++++----- arch/x86/kernel/head64.c | 2 ++ arch/x86/kernel/ldt.c | 6 +++++- arch/x86/mm/ident_map.c | 3 +++ arch/x86/mm/iomap_32.c | 6 ++++++ arch/x86/mm/ioremap.c | 3 +++ arch/x86/mm/kasan_init_64.c | 14 +++++++++++++- arch/x86/mm/pgtable.c | 3 +++ arch/x86/power/hibernate_64.c | 20 +++++++++++++++----- 10 files changed, 75 insertions(+), 12 deletions(-) commit 7ecb46e9ee9af18e304eb9e7d6804c59a408e846 Author: Fabián Inostroza Date: Thu Apr 12 00:37:35 2018 -0300 ALSA: line6: Use correct endpoint type for midi output Sending MIDI messages to a PODxt through the USB connection shows "usb_submit_urb failed" in dmesg and the message is not received by the POD. The error is caused because in the funcion send_midi_async() in midi.c there is a call to usb_sndbulkpipe() for endpoint 3 OUT, but the PODxt USB descriptor shows that this endpoint it's an interrupt endpoint. Patch tested with PODxt only. [ The bug has been present from the very beginning in the staging driver time, but Fixes below points to the commit moving to sound/ directory so that the fix can be cleanly applied -- tiwai ] Fixes: 61864d844c29 ("ALSA: move line6 usb driver into sound/usb") Signed-off-by: Fabián Inostroza Cc: Signed-off-by: Takashi Iwai sound/usb/line6/midi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e241e3f2bf975788a1b70dff2eb5180ca395b28e Merge: e5c3722 6c64fe7 Author: Linus Torvalds Date: Wed Apr 11 18:58:27 2018 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio update from Michael Tsirkin: "This adds reporting hugepage stats to virtio-balloon" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_balloon: export hugetlb page allocation counts commit e5c372280b9cc1057647b4307757b7885a732a7e Merge: 1fe43114 d4f96fd Author: Linus Torvalds Date: Wed Apr 11 18:50:41 2018 -0700 Merge tag 'iommu-updates-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU updates from Joerg Roedel: - OF_IOMMU support for the Rockchip iommu driver so that it can use generic DT bindings - rework of locking in the AMD IOMMU interrupt remapping code to make it work better in RT kernels - support for improved iotlb flushing in the AMD IOMMU driver - support for 52-bit physical and virtual addressing in the ARM-SMMU - various other small fixes and cleanups * tag 'iommu-updates-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (53 commits) iommu/io-pgtable-arm: Avoid warning with 32-bit phys_addr_t iommu/rockchip: Support sharing IOMMU between masters iommu/rockchip: Add runtime PM support iommu/rockchip: Fix error handling in init iommu/rockchip: Use OF_IOMMU to attach devices automatically iommu/rockchip: Use IOMMU device for dma mapping operations dt-bindings: iommu/rockchip: Add clock property iommu/rockchip: Control clocks needed to access the IOMMU iommu/rockchip: Fix TLB flush of secondary IOMMUs iommu/rockchip: Use iopoll helpers to wait for hardware iommu/rockchip: Fix error handling in attach iommu/rockchip: Request irqs in rk_iommu_probe() iommu/rockchip: Fix error handling in probe iommu/rockchip: Prohibit unbind and remove iommu/amd: Return proper error code in irq_remapping_alloc() iommu/amd: Make amd_iommu_devtable_lock a spin_lock iommu/amd: Drop the lock while allocating new irq remap table iommu/amd: Factor out setting the remap table for a devid iommu/amd: Use `table' instead `irt' as variable name in amd_iommu_update_ga() iommu/amd: Remove the special case from alloc_irq_table() ... commit 1fe43114ea7355ec9f336c942aaf3e74d27483a0 Merge: 9697376 51798de Author: Linus Torvalds Date: Wed Apr 11 17:03:20 2018 -0700 Merge tag 'pm-4.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These include one big-ticket item which is the rework of the idle loop in order to prevent CPUs from spending too much time in shallow idle states. It reduces idle power on some systems by 10% or more and may improve performance of workloads in which the idle loop overhead matters. This has been in the works for several weeks and it has been tested and reviewed quite thoroughly. Also included are changes that finalize the cpufreq cleanup moving frequency table validation from drivers to the core, a few fixes and cleanups of cpufreq drivers, a cpuidle documentation update and a PM QoS core update to mark the expected switch fall-throughs in it. Specifics: - Rework the idle loop in order to prevent CPUs from spending too much time in shallow idle states by making it stop the scheduler tick before putting the CPU into an idle state only if the idle duration predicted by the idle governor is long enough. That required the code to be reordered to invoke the idle governor before stopping the tick, among other things (Rafael Wysocki, Frederic Weisbecker, Arnd Bergmann). - Add the missing description of the residency sysfs attribute to the cpuidle documentation (Prashanth Prakash). - Finalize the cpufreq cleanup moving frequency table validation from drivers to the core (Viresh Kumar). - Fix a clock leak regression in the armada-37xx cpufreq driver (Gregory Clement). - Fix the initialization of the CPU performance data structures for shared policies in the CPPC cpufreq driver (Shunyong Yang). - Clean up the ti-cpufreq, intel_pstate and CPPC cpufreq drivers a bit (Viresh Kumar, Rafael Wysocki). - Mark the expected switch fall-throughs in the PM QoS core (Gustavo Silva)" * tag 'pm-4.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (23 commits) tick-sched: avoid a maybe-uninitialized warning cpufreq: Drop cpufreq_table_validate_and_show() cpufreq: SCMI: Don't validate the frequency table twice cpufreq: CPPC: Initialize shared perf capabilities of CPUs cpufreq: armada-37xx: Fix clock leak cpufreq: CPPC: Don't set transition_latency cpufreq: ti-cpufreq: Use builtin_platform_driver() cpufreq: intel_pstate: Do not include debugfs.h PM / QoS: mark expected switch fall-throughs cpuidle: Add definition of residency to sysfs documentation time: hrtimer: Use timerqueue_iterate_next() to get to the next timer nohz: Avoid duplication of code related to got_idle_tick nohz: Gather tick_sched booleans under a common flag field cpuidle: menu: Avoid selecting shallow states with stopped tick cpuidle: menu: Refine idle state selection for running tick sched: idle: Select idle state before stopping the tick time: hrtimer: Introduce hrtimer_next_event_without() time: tick-sched: Split tick_nohz_stop_sched_tick() cpuidle: Return nohz hint from cpuidle_select() jiffies: Introduce USER_TICK_USEC and redefine TICK_USEC ... commit 96973767594fe9c5d8a7e8fc594c9e565ab0374e Merge: 77cb51e 6cd110a Author: Linus Torvalds Date: Wed Apr 11 16:42:27 2018 -0700 Merge tag 'ktest-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest Pull ktest updates from Steven Rostedt: "These commits have either been sitting in my INBOX or have been in my local tree for some time. I need to push them upstream: - Separate out config-bisect.pl from ktest.pl. This allows users to do config bisects without full ktest setup. - Email on status change. Allow the user to be emailed on test start, finish, failure, etc. - Other small fixes and enhancements" * tag 'ktest-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: (24 commits) ktest: Take submenu into account for grub2 menus ktest.pl: Add MAIL_COMMAND option to define how to send email ktest.pl: Use run_command to execute sending mail ktest.pl: Allow dodie be recursive ktest.pl: Kill test if mailer is not supported ktest.pl: Add MAIL_PATH option to define where to find the mailer ktest.pl: No need to print no mailer is specified when mailto is not Ktest: add email options to sample.config Ktest: Use dodie for critical falures Ktest: Add SigInt handling Ktest: Add email support ktest.pl: Detect if a config-bisect was interrupted ktest.pl: Make finding config-bisect.pl dynamic ktest.pl: Have ktest.pl pass -r to config-bisect.pl to reset bisect ktest.pl: Use diffconfig if available for failed config bisects ktest.pl: Allow for the config-bisect.pl output to display to console ktest: Use config-bisect.pl in ktest.pl ktest: Add standalone config-bisect.pl program ktest: Set do_not_reboot=y for CONFIG_BISECT_TYPE=build ktest: Set buildonly=1 for CONFIG_BISECT_TYPE=build ... commit 77cb51e65df0010cb22169bcbb6ea1b4f21da7e0 Merge: 375479c b5094b7 Author: Linus Torvalds Date: Wed Apr 11 16:39:34 2018 -0700 Merge tag 'tags/upstream-4.17-rc1' of git://git.infradead.org/linux-ubifs Pull UBI and UBIFS updates from Richard Weinberger: "Minor bug fixes and improvements" * tag 'tags/upstream-4.17-rc1' of git://git.infradead.org/linux-ubifs: ubi: Reject MLC NAND ubifs: Remove useless parameter of lpt_heap_replace ubifs: Constify struct ubifs_lprops in scan_for_leb_for_idx ubifs: remove unnecessary assignment ubi: Fix error for write access ubi: fastmap: Don't flush fastmap work on detach ubifs: Check ubifs_wbuf_sync() return code commit 375479c38689fbc403cf57b2999278615a4163f5 Merge: 45df60c e40238d Author: Linus Torvalds Date: Wed Apr 11 16:36:47 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: - a new and faster epoll based IRQ controller and NIC driver - misc fixes and janitorial updates * git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: Fix vector raw inintialization logic Migrate vector timers to new timer API um: Compile with modern headers um: vector: Fix an error handling path in 'vector_parse()' um: vector: Fix a memory allocation check um: vector: fix missing unlock on error in vector_net_open() um: Add missing EXPORT for free_irq_by_fd() High Performance UML Vector Network Driver Epoll based IRQ controller um: Use POSIX ucontext_t instead of struct ucontext um: time: Use timespec64 for persistent clock um: Restore symbol versions for __memcpy and memcpy commit 45df60cd2cbe2a8c32fd34e474b62b2b41bacf69 Merge: b82b681 cb79926 Author: Linus Torvalds Date: Wed Apr 11 16:12:21 2018 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "Here is a very small set of fixes for inclusion in linux-4.17-rc1: Two changes for the maintainer file, and one more fix for the newly added npcm platform, to enable the level 2 cache controller" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: MAINTAINERS: Update ASPEED entry with details MAINTAINERS: Migrate oxnas list to groups.io arm: npcm: enable L2 cache in NPCM7xx architecture commit b82b6813ff8fd741c3061c4a754ded898b69ab28 Merge: 8837c70d 3d9644e Author: Linus Torvalds Date: Wed Apr 11 16:02:18 2018 -0700 Merge tag 'nios2-v4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 Pull nios2 update from Ley Foon Tan: "Use read_persistent_clock64() instead of read_persistent_clock()" * tag 'nios2-v4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2: nios2: Use read_persistent_clock64() instead of read_persistent_clock() commit 6bd6ae639683c0b41f46990d5c64ff9fbfa019dc Author: Dmitry Torokhov Date: Fri Apr 6 10:23:05 2018 -0700 Input: leds - fix out of bound access UI_SET_LEDBIT ioctl() causes the following KASAN splat when used with led > LED_CHARGING: [ 1274.663418] BUG: KASAN: slab-out-of-bounds in input_leds_connect+0x611/0x730 [input_leds] [ 1274.663426] Write of size 8 at addr ffff88003377b2c0 by task ckb-next-daemon/5128 This happens because we were writing to the led structure before making sure that it exists. Reported-by: Tasos Sahanidis Tested-by: Tasos Sahanidis Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/input-leds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f2f176b418da96ae030c2f312c0ddb0e7b6ead21 Author: Aurelien Aptel Date: Tue Apr 10 17:01:13 2018 +0200 CIFS: add ONCE flag for cifs_dbg type * Since cifs_vfs_error was just using pr_debug_ratelimited like the rest of cifs_dbg, move it there too * Add a ONCE type flag to call the pr_xxx_once() debug function instead of the ratelimited ones. To convert existing printk_once() calls to this we can run: perl -i -pE \ 's/printk_once\s*\(([^" \n]+)(.*)/cifs_dbg(VFS|ONCE,$2/g' \ fs/cifs/*.c Signed-off-by: Aurelien Aptel Signed-off-by: Steve French fs/cifs/cifs_debug.c | 17 ----------------- fs/cifs/cifs_debug.h | 34 ++++++++++++++++++++++------------ 2 files changed, 22 insertions(+), 29 deletions(-) commit 3995bbf53bd2047f2720c6fdd4bf38f6d942a0c0 Author: Geert Uytterhoeven Date: Thu Apr 5 14:57:11 2018 +0200 cifs: Use ULL suffix for 64-bit constant On 32-bit (e.g. with m68k-linux-gnu-gcc-4.1): fs/cifs/inode.c: In function ‘simple_hashstr’: fs/cifs/inode.c:713: warning: integer constant is too large for ‘long’ type Fixes: 7ea884c77e5c97f1 ("smb3: Fix root directory when server returns inode number of zero") Signed-off-by: Geert Uytterhoeven Signed-off-by: Steve French Reviewed-by: Aurelien Aptel fs/cifs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c318e6c26cbe91bfcd1e9bca8840de2fb57aef4f Author: Steve French Date: Wed Apr 4 14:08:52 2018 -0500 SMB3: Log at least once if tree connect fails during reconnect Adding an extra debug message to show if a tree connect failure during reconnect (and made it a log once so it doesn't spam the logs). Saw a case recently where tree connect repeatedly returned access denied on reconnect and it wasn't as easy to spot as it should have been. Signed-off-by: Steve French Reviewed-by: Aurelien Aptel fs/cifs/cifssmb.c | 4 +++- fs/cifs/smb2pdu.c | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit c0953f2ed510c31a375193e9dbca9774e77fb4b7 Author: Gustavo A. R. Silva Date: Tue Apr 3 16:00:40 2018 -0500 cifs: smb2pdu: Fix potential NULL pointer dereference tcon->ses is being dereferenced before it is null checked, hence there is a potential null pointer dereference. Fix this by moving the pointer dereference after tcon->ses has been properly null checked. Addresses-Coverity-ID: 1467426 ("Dereference before null check") Fixes: 93012bf98416 ("cifs: add server->vals->header_preamble_size") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Aurelien Aptel Signed-off-by: Steve French fs/cifs/smb2pdu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0c84cee8f131a090f77f5a3dea5d6a7bd99c00db Merge: 83c1f36 f6cd651 Author: David S. Miller Date: Wed Apr 11 17:41:28 2018 -0400 Merge branch 'l2tp-tunnel-creation-fixes' Guillaume Nault says: ==================== l2tp: tunnel creation fixes L2TP tunnel creation is racy. We need to make sure that the tunnel returned by l2tp_tunnel_create() isn't going to be freed while the caller is using it. This is done in patch #1, by separating tunnel creation from tunnel registration. With the tunnel registration code in place, we can now check for duplicate tunnels in a race-free way. This is done in patch #2, which incidentally removes the last use of l2tp_tunnel_find(). ==================== Signed-off-by: David S. Miller commit f6cd651b056ffd3b4e8496afd44d4ed44bf69136 Author: Guillaume Nault Date: Tue Apr 10 21:01:13 2018 +0200 l2tp: fix race in duplicate tunnel detection We can't use l2tp_tunnel_find() to prevent l2tp_nl_cmd_tunnel_create() from creating a duplicate tunnel. A tunnel can be concurrently registered after l2tp_tunnel_find() returns. Therefore, searching for duplicates must be done at registration time. Finally, remove l2tp_tunnel_find() entirely as it isn't use anywhere anymore. Fixes: 309795f4bec2 ("l2tp: Add netlink control API for L2TP") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 35 ++++++++++++++--------------------- net/l2tp/l2tp_core.h | 1 - net/l2tp/l2tp_netlink.c | 6 ------ 3 files changed, 14 insertions(+), 28 deletions(-) commit 6b9f34239b00e6956a267abed2bc559ede556ad6 Author: Guillaume Nault Date: Tue Apr 10 21:01:12 2018 +0200 l2tp: fix races in tunnel creation l2tp_tunnel_create() inserts the new tunnel into the namespace's tunnel list and sets the socket's ->sk_user_data field, before returning it to the caller. Therefore, there are two ways the tunnel can be accessed and freed, before the caller even had the opportunity to take a reference. In practice, syzbot could crash the module by closing the socket right after a new tunnel was returned to pppol2tp_create(). This patch moves tunnel registration out of l2tp_tunnel_create(), so that the caller can safely hold a reference before publishing the tunnel. This second step is done with the new l2tp_tunnel_register() function, which is now responsible for associating the tunnel to its socket and for inserting it into the namespace's list. While moving the code to l2tp_tunnel_register(), a few modifications have been done. First, the socket validation tests are done in a helper function, for clarity. Also, modifying the socket is now done after having inserted the tunnel to the namespace's tunnels list. This will allow insertion to fail, without having to revert theses modifications in the error path (a followup patch will check for duplicate tunnels before insertion). Either the socket is a kernel socket which we control, or it is a user-space socket for which we have a reference on the file descriptor. In any case, the socket isn't going to be closed from under us. Reported-by: syzbot+fbeeb5c3b538e8545644@syzkaller.appspotmail.com Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 192 +++++++++++++++++++++--------------------------- net/l2tp/l2tp_core.h | 3 + net/l2tp/l2tp_netlink.c | 16 +++- net/l2tp/l2tp_ppp.c | 9 +++ 4 files changed, 110 insertions(+), 110 deletions(-) commit 1eace8344c02c625ee99cc3ffa50187ded2c87b5 Author: Ard Biesheuvel Date: Tue Apr 3 21:11:50 2018 +0200 i2c: add param sanity check to i2c_transfer() The API docs describe i2c_transfer() as taking a pointer to an array of i2c_msg containing at least 1 entry, but leaves it to the individual drivers to sanity check the msgs and num parameters. Let's do this in core code instead. Signed-off-by: Ard Biesheuvel [wsa: changed '<= 0' to '< 1'] Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 3 +++ 1 file changed, 3 insertions(+) commit 090cecc669d4336a6ce2eeaa3074b628d3fb7678 Author: Wolfram Sang Date: Tue Apr 10 21:49:14 2018 +0200 MAINTAINERS: add maintainer for Renesas I2C related drivers Intentionally missing i2c-riic here, Chris Brandt will add himself for that one later. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Wolfram Sang MAINTAINERS | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 95df14f7937482a2a527814061eda9b534adb7eb Author: Wolfram Sang Date: Tue Apr 10 21:49:13 2018 +0200 MAINTAINERS: remove me as maintainer for I2C host drivers The number of I2C host controller drivers keeps increasing, and although I had some success acquiring specific driver maintainers, my bandwidth is by far not enough to act as a fallback for the rest of the drivers. To reflect this status-quo in MAINTAINERS, add a separate entry for I2C host drivers, let the I2C list (= community) be the contact point, and mark this section as "Odd fixes". Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman MAINTAINERS | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit f7f6d915a10f7f2bce17e3b1b7d3376562395a28 Author: Jean Delvare Date: Wed Apr 11 18:05:34 2018 +0200 i2c: i801: Restore configuration at shutdown On some systems, the BIOS expects certain SMBus register values to match the hardware defaults. Restore these configuration registers at shutdown time to avoid confusing the BIOS. This avoids hard-locking such systems upon reboot. Signed-off-by: Jean Delvare Tested-by: Jason Andryuk Signed-off-by: Wolfram Sang Cc: stable@vger.kernel.org drivers/i2c/busses/i2c-i801.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a086bb8317303dd74725dca933b9b29575159382 Author: Jean Delvare Date: Wed Apr 11 18:03:31 2018 +0200 i2c: i801: Save register SMBSLVCMD value only once Saving the original value of register SMBSLVCMD in i801_enable_host_notify() doesn't work, because this function is called not only at probe time but also at resume time. Do it in i801_probe() instead, so that the saved value is not overwritten at resume time. Signed-off-by: Jean Delvare Fixes: 22e94bd6779e ("i2c: i801: store and restore the SLVCMD register at load and unload") Reviewed-by: Benjamin Tissoires Tested-by: Jason Andryuk Signed-off-by: Wolfram Sang Cc: stable@vger.kernel.org # v4.10+ drivers/i2c/busses/i2c-i801.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 67698287031be7c1821f9b151237ca8cdb231fd1 Author: Helge Deller Date: Wed Apr 11 22:27:07 2018 +0200 parisc: Prevent panic at system halt When issuing a "shutdown -h now", the reboot syscall calls kernel_halt() which shouldn't return, otherwise one gets this panic: reboot: System halted Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000 CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 4.16.0-32bit+ #560 Backtrace: [<1018a694>] show_stack+0x18/0x28 [<106e68a8>] dump_stack+0x80/0x10c [<101a4df8>] panic+0xfc/0x290 [<101a90b8>] do_exit+0x73c/0x914 [<101c7e38>] SyS_reboot+0x190/0x1d4 [<1017e444>] syscall_exit+0x0/0x14 Fix it by letting machine_halt() call machine_power_off() which doesn't return. Signed-off-by: Helge Deller arch/parisc/kernel/process.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 83c1f36f9880814b24cdf6c2f91f66f61db65326 Author: Sabrina Dubroca Date: Tue Apr 10 16:28:56 2018 +0200 tun: send netlink notification when the device is modified I added dumping of link information about tun devices over netlink in commit 1ec010e70593 ("tun: export flags, uid, gid, queue information over netlink"), but didn't add the missing netlink notifications when the device's exported properties change. This patch adds notifications when owner/group or flags are modified, when queues are attached/detached, and when a tun fd is closed. Reported-by: Thomas Haller Fixes: 1ec010e70593 ("tun: export flags, uid, gid, queue information over netlink") Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller drivers/net/tun.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 9fffc5c6dd7dafb2e021dbbe9a30be2566a6949a Author: Sabrina Dubroca Date: Tue Apr 10 16:28:55 2018 +0200 tun: set the flags before registering the netdevice Otherwise, register_netdevice advertises the creation of the device with the default flags, instead of what the user requested. Reported-by: Thomas Haller Fixes: 1ec010e70593 ("tun: export flags, uid, gid, queue information over netlink") Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller drivers/net/tun.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 47b998653fea4ef69e3e89574956386f262bccca Author: Phil Elwell Date: Tue Apr 10 13:18:25 2018 +0100 lan78xx: Don't reset the interface on open Commit 92571a1aae40 ("lan78xx: Connect phy early") moves the PHY initialisation into lan78xx_probe, but lan78xx_open subsequently calls lan78xx_reset. As well as forcing a second round of link negotiation, this reset frequently prevents the phy interrupt from being generated (even though the link is up), rendering the interface unusable. Fix this issue by removing the lan78xx_reset call from lan78xx_open. Fixes: 92571a1aae40 ("lan78xx: Connect phy early") Signed-off-by: Phil Elwell Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 4 ---- 1 file changed, 4 deletions(-) commit 9cf74f593aa728ea4ed1760b74f31c02c4dd777b Merge: 949989b cb98526 Author: David S. Miller Date: Wed Apr 11 14:42:00 2018 -0400 Merge branch 'bnxt_en-Fixes-for-net' Michael Chan says: ==================== bnxt_en: Fixes for net. This bug fix series include NULL pointer fixes in ethtool -x code path and in the error clean up path when freeing IRQs, a ring accounting bug that missed rings used by the RDMA driver, and 3 bug fixes related to TC Flower and VF-reps. v2: Fixed commit message of patch 4. Changed the pound sign to $ sign in front of the ip command. ==================== Signed-off-by: David S. Miller commit cb98526bf9b985866d648dbb9c983ba9eb59daba Author: Michael Chan Date: Wed Apr 11 11:50:18 2018 -0400 bnxt_en: Fix NULL pointer dereference at bnxt_free_irq(). When open fails during ethtool -L ring change, for example, the driver may crash at bnxt_free_irq() because bp->bnapi is NULL. If we fail to allocate all the new rings, bnxt_open_nic() will free all the memory including bp->bnapi. Subsequent call to bnxt_close_nic() will try to dereference bp->bnapi in bnxt_free_irq(). Fix it by checking for !bp->bnapi in bnxt_free_irq(). Fixes: e5811b8c09df ("bnxt_en: Add IRQ remapping logic.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11c3ec7bb940b6fa3f87f05f01b7f45eef08dfbb Author: Michael Chan Date: Wed Apr 11 11:50:17 2018 -0400 bnxt_en: Need to include RDMA rings in bnxt_check_rings(). With recent changes to reserve both L2 and RDMA rings, we need to include the RDMA rings in bnxt_check_rings(). Otherwise we will under-estimate the rings we need during ethtool -L and may lead to failure. Fixes: fbcfc8e46741 ("bnxt_en: Reserve completion rings and MSIX for bnxt_re RDMA driver.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++ 1 file changed, 2 insertions(+) commit 9d96465b111edd6c4f94345783e6e01db7f435d6 Author: Sriharsha Basavapatna Date: Wed Apr 11 11:50:16 2018 -0400 bnxt_en: Support max-mtu with VF-reps While a VF is configured with a bigger mtu (> 1500), any packets that are punted to the VF-rep (slow-path) get dropped by OVS kernel-datapath with the following message: "dropped over-mtu packet". Fix this by returning the max-mtu value for a VF-rep derived from its corresponding VF. VF-rep's mtu can be changed using 'ip' command as shown in this example: $ ip link set bnxt0_pf0vf0 mtu 9000 Signed-off-by: Sriharsha Basavapatna Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 479ca3bf91da971fcefc003cf5773e8d7db24794 Author: Sriharsha Basavapatna Date: Wed Apr 11 11:50:15 2018 -0400 bnxt_en: Ignore src port field in decap filter nodes The driver currently uses src port field (along with other fields) in the decap tunnel key, while looking up and adding tunnel nodes. This leads to redundant cfa_decap_filter_alloc() requests to the FW and flow-miss in the flow engine. Fix this by ignoring the src port field in decap tunnel nodes. Fixes: f484f6782e01 ("bnxt_en: add hwrm FW cmds for cfa_encap_record and decap_filter") Signed-off-by: Sriharsha Basavapatna Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e85a9be93cf144623a823a0a60e4eda6ee337aef Author: Andy Gospodarek Date: Wed Apr 11 11:50:14 2018 -0400 bnxt_en: do not allow wildcard matches for L2 flows Before this patch the following commands would succeed as far as the user was concerned: $ tc qdisc add dev p1p1 ingress $ tc filter add dev p1p1 parent ffff: protocol all \ flower skip_sw action drop $ tc filter add dev p1p1 parent ffff: protocol ipv4 \ flower skip_sw src_mac 00:02:00:00:00:01/44 action drop The current flow offload infrastructure used does not support wildcard matching for ethernet headers, so do not allow the second or third commands to succeed. If a user wants to drop traffic on that interface the protocol and MAC addresses need to be specified explicitly: $ tc qdisc add dev p1p1 ingress $ tc filter add dev p1p1 parent ffff: protocol arp \ flower skip_sw action drop $ tc filter add dev p1p1 parent ffff: protocol ipv4 \ flower skip_sw action drop ... $ tc filter add dev p1p1 parent ffff: protocol ipv4 \ flower skip_sw src_mac 00:02:00:00:00:01 action drop $ tc filter add dev p1p1 parent ffff: protocol ipv4 \ flower skip_sw src_mac 00:02:00:00:00:02 action drop ... There are also checks for VLAN parameters in this patch as other callers may wildcard those parameters even if tc does not. Using different flow infrastructure could allow this to work in the future for L2 flows, but for now it does not. Fixes: 2ae7408fedfe ("bnxt_en: bnxt: add TC flower filter offload support") Signed-off-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 59 ++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 7991cb9cfbce1b60ac1cff819350b05de4d902e1 Author: Michael Chan Date: Wed Apr 11 11:50:13 2018 -0400 bnxt_en: Fix ethtool -x crash when device is down. Fix ethtool .get_rxfh() crash by checking for valid indirection table address before copying the data. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit c3d7bad88e3b35b981eecc1645ddbb3f13a8b54f Author: Roman Li Date: Thu Mar 29 10:56:17 2018 -0400 drm/amd/display: fix brightness level after resume from suspend Adding missing call to cache current backlight values. Otherwise the brightness resets to default value on resume. Signed-off-by: Roman Li Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 13 +++++++++++++ drivers/gpu/drm/amd/display/dc/dc_link.h | 2 ++ drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 +++- 3 files changed, 18 insertions(+), 1 deletion(-) commit af2ac326087da632e9580f65205f4cc4205caf85 Author: Charlene Liu Date: Fri Apr 6 23:03:12 2018 -0400 drm/amd/display: HDMI has no sound after Panel power off/on Signed-off-by: Charlene Liu Reviewed-by: Krunoslav Kovac Acked-by: Harry Wentland Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 2 ++ 1 file changed, 2 insertions(+) commit 1b59fb036a3e2a5bc4ce3d02c3fb473e595400c9 Author: Evan Quan Date: Tue Apr 10 12:30:59 2018 +0800 drm/amdgpu: add MP1 and THM hw ip base reg offset Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 2d4f9020d343a284429eff37ecc9d7e12133da4f Author: Huang Rui Date: Sun Apr 8 14:39:18 2018 +0800 drm/amdgpu: fix null pointer panic with direct fw loading on gpu reset When system uses fw direct loading, then psp context structure won't be initiliazed. And it is also unable to execute mode reset. [ 434.601474] amdgpu 0000:0c:00.0: GPU reset begin! [ 434.694326] amdgpu 0000:0c:00.0: GPU reset [ 434.743152] BUG: unable to handle kernel NULL pointer dereference at 0000000000000058 [ 434.838474] IP: psp_gpu_reset+0xc/0x30 [amdgpu] [ 434.893532] PGD 406ed9067 [ 434.893533] P4D 406ed9067 [ 434.926376] PUD 400b46067 [ 434.959217] PMD 0 [ 435.033379] Oops: 0000 [#1] SMP [ 435.072573] Modules linked in: amdgpu(OE) chash(OE) gpu_sched(OE) ttm(OE) drm_kms_helper(OE) drm(OE) fb_sys_fops syscopyarea sysfillrect sysimgblt rpcsec_gss_krb5 auth_rpcgss nfsv4 nfs lockd grace fscache snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm edac_mce_amd snd_seq_midi snd_seq_midi_event kvm_amd snd_rawmidi kvm irqbypass crct10dif_pclmul crc32_pclmul snd_seq ghash_clmulni_intel snd_seq_device pcbc snd_timer eeepc_wmi aesni_intel snd asus_wmi aes_x86_64 sparse_keymap crypto_simd glue_helper joydev soundcore wmi_bmof cryptd video i2c_piix4 shpchp 8250_dw i2c_designware_platform mac_hid i2c_designware_core sunrpc parport_pc ppdev lp parport autofs4 hid_generic igb usbhid dca ptp mxm_wmi pps_core ahci hid i2c_algo_bit [ 435.931754] libahci wmi Signed-off-by: Huang Rui Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++ 1 file changed, 3 insertions(+) commit b1550359d1eb392ee54f7cf47cffcfe0a602f6a7 Author: Nico Sneck Date: Sat Apr 7 15:13:04 2018 +0000 drm/radeon: add PX quirk for Asus K73TK With this the dGPU turns on correctly. Signed-off-by: Nico Sneck Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8837c70d531a1788f975c366c254a5cb973a5291 Merge: b284d4d b93b016 Author: Linus Torvalds Date: Wed Apr 11 10:51:26 2018 -0700 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: - almost all of the rest of MM - kasan updates - lots of procfs work - misc things - lib/ updates - checkpatch - rapidio - ipc/shm updates - the start of willy's XArray conversion * emailed patches from Andrew Morton : (140 commits) page cache: use xa_lock xarray: add the xa_lock to the radix_tree_root fscache: use appropriate radix tree accessors export __set_page_dirty unicore32: turn flush_dcache_mmap_lock into a no-op arm64: turn flush_dcache_mmap_lock into a no-op mac80211_hwsim: use DEFINE_IDA radix tree: use GFP_ZONEMASK bits of gfp_t for flags linux/const.h: refactor _BITUL and _BITULL a bit linux/const.h: move UL() macro to include/linux/const.h linux/const.h: prefix include guard of uapi/linux/const.h with _UAPI xen, mm: allow deferred page initialization for xen pv domains elf: enforce MAP_FIXED on overlaying elf segments fs, elf: drop MAP_FIXED usage from elf_map mm: introduce MAP_FIXED_NOREPLACE MAINTAINERS: update bouncing aacraid@adaptec.com addresses fs/dcache.c: add cond_resched() in shrink_dentry_list() include/linux/kfifo.h: fix comment ipc/shm.c: shm_split(): remove unneeded test for NULL shm_file_data.vm_ops kernel/sysctl.c: add kdoc comments to do_proc_do{u}intvec_minmax_conv_param ... commit 24534b3511828c66215fdf1533d77a7bf2e1fdb2 Author: Ard Biesheuvel Date: Thu Mar 29 15:13:23 2018 +0200 arm64: assembler: add macros to conditionally yield the NEON under PREEMPT Add support macros to conditionally yield the NEON (and thus the CPU) that may be called from the assembler code. In some cases, yielding the NEON involves saving and restoring a non trivial amount of context (especially in the CRC folding algorithms), and so the macro is split into three, and the code in between is only executed when the yield path is taken, allowing the context to be preserved. The third macro takes an optional label argument that marks the resume path after a yield has been performed. Signed-off-by: Ard Biesheuvel Reviewed-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 73 ++++++++++++++++++++++++++++++++++++++ arch/arm64/kernel/asm-offsets.c | 3 ++ 2 files changed, 76 insertions(+) commit 0f468e221c3ae89d2fbe611a1a69ee554188519a Author: Ard Biesheuvel Date: Thu Mar 29 15:13:22 2018 +0200 arm64: assembler: add utility macros to push/pop stack frames We are going to add code to all the NEON crypto routines that will turn them into non-leaf functions, so we need to manage the stack frames. To make this less tedious and error prone, add some macros that take the number of callee saved registers to preserve and the extra size to allocate in the stack frame (for locals) and emit the ldp/stp sequences. Signed-off-by: Ard Biesheuvel Reviewed-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 63 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit e8b22d0f4500c7bb6aab879d4e32b2a00c89d5f8 Author: Marc Zyngier Date: Tue Apr 10 11:36:45 2018 +0100 arm64: Move the content of bpi.S to hyp-entry.S bpi.S was introduced as we were starting to build the Spectre v2 mitigation framework, and it was rather unclear that it would become strictly KVM specific. Now that the picture is a lot clearer, let's move the content of that file to hyp-entry.S, where it actually belong. Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon arch/arm64/kernel/Makefile | 2 - arch/arm64/kernel/bpi.S | 86 ------------------------------------------ arch/arm64/kernel/cpu_errata.c | 4 +- arch/arm64/kvm/hyp/hyp-entry.S | 64 ++++++++++++++++++++++++++++++- 4 files changed, 65 insertions(+), 91 deletions(-) commit 22765f30dbaf1118c6ff0fcb8b99c9f2b4d396d5 Author: Marc Zyngier Date: Tue Apr 10 11:36:44 2018 +0100 arm64: Get rid of __smccc_workaround_1_hvc_* The very existence of __smccc_workaround_1_hvc_* is a thinko, as KVM will never use a HVC call to perform the branch prediction invalidation. Even as a nested hypervisor, it would use an SMC instruction. Let's get rid of it. Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon arch/arm64/kernel/bpi.S | 12 ++---------- arch/arm64/kernel/cpu_errata.c | 9 +++------ 2 files changed, 5 insertions(+), 16 deletions(-) commit 8892b71885df7d6d7b0f491f9a8e2bb12fd4afdd Author: Marc Zyngier Date: Tue Apr 10 11:36:43 2018 +0100 arm64: capabilities: Rework EL2 vector hardening entry Since 5e7951ce19ab ("arm64: capabilities: Clean up midr range helpers"), capabilities must be represented with a single entry. If multiple CPU types can use the same capability, then they need to be enumerated in a list. The EL2 hardening stuff (which affects both A57 and A72) managed to escape the conversion in the above patch thanks to the 4.17 merge window. Let's fix it now. Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon arch/arm64/kernel/cpu_errata.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 4bc352ffb39e4eec253e70f8c076f2f48a6c1926 Author: Shanker Donthineni Date: Tue Apr 10 11:36:42 2018 +0100 arm64: KVM: Use SMCCC_ARCH_WORKAROUND_1 for Falkor BP hardening The function SMCCC_ARCH_WORKAROUND_1 was introduced as part of SMC V1.1 Calling Convention to mitigate CVE-2017-5715. This patch uses the standard call SMCCC_ARCH_WORKAROUND_1 for Falkor chips instead of Silicon provider service ID 0xC2001700. Cc: # 4.14+ Signed-off-by: Shanker Donthineni [maz: reworked errata framework integration] Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon arch/arm64/include/asm/cpucaps.h | 13 ++++---- arch/arm64/include/asm/kvm_asm.h | 2 -- arch/arm64/kernel/bpi.S | 8 ----- arch/arm64/kernel/cpu_errata.c | 66 ++++++++++++---------------------------- arch/arm64/kvm/hyp/entry.S | 12 -------- arch/arm64/kvm/hyp/switch.c | 10 ------ 6 files changed, 25 insertions(+), 86 deletions(-) commit b93b016313b3ba8003c3b8bb71f569af91f19fc7 Author: Matthew Wilcox Date: Tue Apr 10 16:36:56 2018 -0700 page cache: use xa_lock Remove the address_space ->tree_lock and use the xa_lock newly added to the radix_tree_root. Rename the address_space ->page_tree to ->i_pages, since we don't really care that it's a tree. [willy@infradead.org: fix nds32, fs/dax.c] Link: http://lkml.kernel.org/r/20180406145415.GB20605@bombadil.infradead.orgLink: http://lkml.kernel.org/r/20180313132639.17387-9-willy@infradead.org Signed-off-by: Matthew Wilcox Acked-by: Jeff Layton Cc: Darrick J. Wong Cc: Dave Chinner Cc: Ryusuke Konishi Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/cgroup-v1/memory.txt | 2 +- Documentation/vm/page_migration | 14 +-- arch/arm/include/asm/cacheflush.h | 6 +- arch/nds32/include/asm/cacheflush.h | 4 +- arch/nios2/include/asm/cacheflush.h | 6 +- arch/parisc/include/asm/cacheflush.h | 6 +- drivers/staging/lustre/lustre/llite/glimpse.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 8 +- fs/afs/write.c | 9 +- fs/btrfs/compression.c | 2 +- fs/btrfs/extent_io.c | 16 +-- fs/buffer.c | 13 ++- fs/cifs/file.c | 9 +- fs/dax.c | 124 ++++++++++++------------ fs/f2fs/data.c | 6 +- fs/f2fs/dir.c | 6 +- fs/f2fs/inline.c | 6 +- fs/f2fs/node.c | 8 +- fs/fs-writeback.c | 22 ++--- fs/inode.c | 11 +-- fs/nilfs2/btnode.c | 20 ++-- fs/nilfs2/page.c | 22 ++--- include/linux/backing-dev.h | 14 +-- include/linux/fs.h | 8 +- include/linux/mm.h | 2 +- include/linux/pagemap.h | 4 +- mm/filemap.c | 84 ++++++++-------- mm/huge_memory.c | 10 +- mm/khugepaged.c | 49 +++++----- mm/memcontrol.c | 4 +- mm/migrate.c | 32 +++--- mm/page-writeback.c | 43 ++++---- mm/readahead.c | 2 +- mm/rmap.c | 4 +- mm/shmem.c | 60 ++++++------ mm/swap_state.c | 17 ++-- mm/truncate.c | 22 ++--- mm/vmscan.c | 12 +-- mm/workingset.c | 22 ++--- 39 files changed, 345 insertions(+), 366 deletions(-) commit f6bb2a2c0b81c47282ddb7883f92e65a063c27dd Author: Matthew Wilcox Date: Tue Apr 10 16:36:52 2018 -0700 xarray: add the xa_lock to the radix_tree_root This results in no change in structure size on 64-bit machines as it fits in the padding between the gfp_t and the void *. 32-bit machines will grow the structure from 8 to 12 bytes. Almost all radix trees are protected with (at least) a spinlock, so as they are converted from radix trees to xarrays, the data structures will shrink again. Initialising the spinlock requires a name for the benefit of lockdep, so RADIX_TREE_INIT() now needs to know the name of the radix tree it's initialising, and so do IDR_INIT() and IDA_INIT(). Also add the xa_lock() and xa_unlock() family of wrappers to make it easier to use the lock. If we could rely on -fplan9-extensions in the compiler, we could avoid all of this syntactic sugar, but that wasn't added until gcc 4.6. Link: http://lkml.kernel.org/r/20180313132639.17387-8-willy@infradead.org Signed-off-by: Matthew Wilcox Reviewed-by: Jeff Layton Cc: Darrick J. Wong Cc: Dave Chinner Cc: Ryusuke Konishi Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/f2fs/gc.c | 2 +- include/linux/idr.h | 19 ++++++++++--------- include/linux/radix-tree.h | 7 +++++-- include/linux/xarray.h | 24 ++++++++++++++++++++++++ kernel/pid.c | 2 +- tools/include/linux/spinlock.h | 1 + 6 files changed, 42 insertions(+), 13 deletions(-) commit e5a955419642e0842fd26e1ada6ab3328018ca16 Author: Matthew Wilcox Date: Tue Apr 10 16:36:48 2018 -0700 fscache: use appropriate radix tree accessors Don't open-code accesses to data structure internals. Link: http://lkml.kernel.org/r/20180313132639.17387-7-willy@infradead.org Signed-off-by: Matthew Wilcox Reviewed-by: Jeff Layton Cc: Darrick J. Wong Cc: Dave Chinner Cc: Ryusuke Konishi Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fscache/cookie.c | 2 +- fs/fscache/object.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f82b376413298ddd39a2391e38260c15cdebf380 Author: Matthew Wilcox Date: Tue Apr 10 16:36:44 2018 -0700 export __set_page_dirty XFS currently contains a copy-and-paste of __set_page_dirty(). Export it from buffer.c instead. Link: http://lkml.kernel.org/r/20180313132639.17387-6-willy@infradead.org Signed-off-by: Matthew Wilcox Acked-by: Jeff Layton Reviewed-by: Darrick J. Wong Cc: Ryusuke Konishi Cc: Dave Chinner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/buffer.c | 3 ++- fs/xfs/xfs_aops.c | 15 ++------------- include/linux/mm.h | 1 + 3 files changed, 5 insertions(+), 14 deletions(-) commit d339d705f7024d602b1449e36e53451a0fcde9fa Author: Matthew Wilcox Date: Tue Apr 10 16:36:40 2018 -0700 unicore32: turn flush_dcache_mmap_lock into a no-op Unicore doesn't walk the VMA tree in its flush_dcache_page() implementation, so has no need to take the tree_lock. Link: http://lkml.kernel.org/r/20180313132639.17387-5-willy@infradead.org Signed-off-by: Matthew Wilcox Cc: Darrick J. Wong Cc: Dave Chinner Cc: Jeff Layton Cc: Ryusuke Konishi Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/unicore32/include/asm/cacheflush.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 427c896f262ad70d1e6b04890945675df13bb031 Author: Matthew Wilcox Date: Tue Apr 10 16:36:36 2018 -0700 arm64: turn flush_dcache_mmap_lock into a no-op ARM64 doesn't walk the VMA tree in its flush_dcache_page() implementation, so has no need to take the tree_lock. Link: http://lkml.kernel.org/r/20180313132639.17387-4-willy@infradead.org Signed-off-by: Matthew Wilcox Reviewed-by: Will Deacon Cc: Darrick J. Wong Cc: Dave Chinner Cc: Jeff Layton Cc: Ryusuke Konishi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/include/asm/cacheflush.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 60a052719af6cf34cee53c6b93b2d31cfc795de7 Author: Matthew Wilcox Date: Tue Apr 10 16:36:33 2018 -0700 mac80211_hwsim: use DEFINE_IDA This is preferred to opencoding an IDA_INIT. Link: http://lkml.kernel.org/r/20180313132639.17387-2-willy@infradead.org Signed-off-by: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/net/wireless/mac80211_hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa290cda102c096f5ca394277d65d3dbd689930b Author: Matthew Wilcox Date: Tue Apr 10 16:36:28 2018 -0700 radix tree: use GFP_ZONEMASK bits of gfp_t for flags Patch series "XArray", v9. (First part thereof). This patchset is, I believe, appropriate for merging for 4.17. It contains the XArray implementation, to eventually replace the radix tree, and converts the page cache to use it. This conversion keeps the radix tree and XArray data structures in sync at all times. That allows us to convert the page cache one function at a time and should allow for easier bisection. Other than renaming some elements of the structures, the data structures are fundamentally unchanged; a radix tree walk and an XArray walk will touch the same number of cachelines. I have changes planned to the XArray data structure, but those will happen in future patches. Improvements the XArray has over the radix tree: - The radix tree provides operations like other trees do; 'insert' and 'delete'. But what most users really want is an automatically resizing array, and so it makes more sense to give users an API that is like an array -- 'load' and 'store'. We still have an 'insert' operation for users that really want that semantic. - The XArray considers locking as part of its API. This simplifies a lot of users who formerly had to manage their own locking just for the radix tree. It also improves code generation as we can now tell RCU that we're holding a lock and it doesn't need to generate as much fencing code. The other advantage is that tree nodes can be moved (not yet implemented). - GFP flags are now parameters to calls which may need to allocate memory. The radix tree forced users to decide what the allocation flags would be at creation time. It's much clearer to specify them at allocation time. - Memory is not preloaded; we don't tie up dozens of pages on the off chance that the slab allocator fails. Instead, we drop the lock, allocate a new node and retry the operation. We have to convert all the radix tree, IDA and IDR preload users before we can realise this benefit, but I have not yet found a user which cannot be converted. - The XArray provides a cmpxchg operation. The radix tree forces users to roll their own (and at least four have). - Iterators take a 'max' parameter. That simplifies many users and will reduce the amount of iteration done. - Iteration can proceed backwards. We only have one user for this, but since it's called as part of the pagefault readahead algorithm, that seemed worth mentioning. - RCU-protected pointers are not exposed as part of the API. There are some fun bugs where the page cache forgets to use rcu_dereference() in the current codebase. - Value entries gain an extra bit compared to radix tree exceptional entries. That gives us the extra bit we need to put huge page swap entries in the page cache. - Some iterators now take a 'filter' argument instead of having separate iterators for tagged/untagged iterations. The page cache is improved by this: - Shorter, easier to read code - More efficient iterations - Reduction in size of struct address_space - Fewer walks from the top of the data structure; the XArray API encourages staying at the leaf node and conducting operations there. This patch (of 8): None of these bits may be used for slab allocations, so we can use them as radix tree flags as long as we mask them off before passing them to the slab allocator. Move the IDR flag from the high bits to the GFP_ZONEMASK bits. Link: http://lkml.kernel.org/r/20180313132639.17387-3-willy@infradead.org Signed-off-by: Matthew Wilcox Acked-by: Jeff Layton Cc: Darrick J. Wong Cc: Dave Chinner Cc: Ryusuke Konishi Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/idr.h | 3 ++- include/linux/radix-tree.h | 7 ++++--- lib/radix-tree.c | 3 ++- tools/testing/radix-tree/linux/gfp.h | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) commit 21e7bc600e3b662020c05fd0749bcf85f16336f7 Author: Masahiro Yamada Date: Tue Apr 10 16:36:24 2018 -0700 linux/const.h: refactor _BITUL and _BITULL a bit Minor cleanups available by _UL and _ULL. Link: http://lkml.kernel.org/r/1519301715-31798-5-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Cc: Catalin Marinas Cc: David Howells Cc: Geert Uytterhoeven Cc: Guan Xuetao Cc: Russell King Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/const.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2dd8a62c647691161a2346546834262597739872 Author: Masahiro Yamada Date: Tue Apr 10 16:36:19 2018 -0700 linux/const.h: move UL() macro to include/linux/const.h ARM, ARM64 and UniCore32 duplicate the definition of UL(): #define UL(x) _AC(x, UL) This is not actually arch-specific, so it will be useful to move it to a common header. Currently, we only have the uapi variant for linux/const.h, so I am creating include/linux/const.h. I also added _UL(), _ULL() and ULL() because _AC() is mostly used in the form either _AC(..., UL) or _AC(..., ULL). I expect they will be replaced in follow-up cleanups. The underscore-prefixed ones should be used for exported headers. Link: http://lkml.kernel.org/r/1519301715-31798-4-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Acked-by: Guan Xuetao Acked-by: Catalin Marinas Acked-by: Russell King Cc: David Howells Cc: Geert Uytterhoeven Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/memory.h | 6 ------ arch/arm64/include/asm/memory.h | 6 ------ arch/unicore32/include/asm/memory.h | 6 ------ include/linux/const.h | 9 +++++++++ include/uapi/linux/const.h | 3 +++ 5 files changed, 12 insertions(+), 18 deletions(-) commit 2a6cc8a6c0cb44baf7df2f64e5090aaf726002c3 Author: Masahiro Yamada Date: Tue Apr 10 16:36:15 2018 -0700 linux/const.h: prefix include guard of uapi/linux/const.h with _UAPI Patch series "linux/const.h: cleanups of macros such as UL(), _BITUL(), BIT() etc", v3. ARM, ARM64, UniCore32 define UL() as a shorthand of _AC(..., UL). More architectures may introduce it in the future. UL() is arch-agnostic, and useful. So let's move it to include/linux/const.h Currently, must be included to use UL(). It pulls in more bloats just for defining some bit macros. I posted V2 one year ago. The previous posts are: https://patchwork.kernel.org/patch/9498273/ https://patchwork.kernel.org/patch/9498275/ https://patchwork.kernel.org/patch/9498269/ https://patchwork.kernel.org/patch/9498271/ At that time, what blocked this series was a comment from David Howells: You need to be very careful doing this. Some userspace stuff depends on the guard macro names on the kernel header files. (https://patchwork.kernel.org/patch/9498275/) Looking at the code closer, I noticed this is not a problem. See the following line. https://github.com/torvalds/linux/blob/v4.16-rc2/scripts/headers_install.sh#L40 scripts/headers_install.sh rips off _UAPI prefix from guard macro names. I ran "make headers_install" and confirmed the result is what I expect. So, we can prefix the include guard of include/uapi/linux/const.h, and add a new include/linux/const.h. This patch (of 4): I am going to add include/linux/const.h for the kernel space. Add _UAPI to the include guard of include/uapi/linux/const.h to prepare for that. Please notice the guard name of the exported one will be kept as-is. So, this commit has no impact to the userspace even if some userspace stuff depends on the guard macro names. scripts/headers_install.sh processes exported headers by SED, and rips off "_UAPI" from guard macro names. #ifndef _UAPI_LINUX_CONST_H #define _UAPI_LINUX_CONST_H will be turned into #ifndef _LINUX_CONST_H #define _LINUX_CONST_H Link: http://lkml.kernel.org/r/1519301715-31798-2-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Cc: David Howells Cc: Will Deacon Cc: Guan Xuetao Cc: Geert Uytterhoeven Cc: Catalin Marinas Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/const.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6f84f8d1587f20f60592cf1b1792ca639f37d429 Author: Pavel Tatashin Date: Tue Apr 10 16:36:10 2018 -0700 xen, mm: allow deferred page initialization for xen pv domains Juergen Gross noticed that commit f7f99100d8d ("mm: stop zeroing memory during allocation in vmemmap") broke XEN PV domains when deferred struct page initialization is enabled. This is because the xen's PagePinned() flag is getting erased from struct pages when they are initialized later in boot. Juergen fixed this problem by disabling deferred pages on xen pv domains. It is desirable, however, to have this feature available as it reduces boot time. This fix re-enables the feature for pv-dmains, and fixes the problem the following way: The fix is to delay setting PagePinned flag until struct pages for all allocated memory are initialized, i.e. until after free_all_bootmem(). A new x86_init.hyper op init_after_bootmem() is called to let xen know that boot allocator is done, and hence struct pages for all the allocated memory are now initialized. If deferred page initialization is enabled, the rest of struct pages are going to be initialized later in boot once page_alloc_init_late() is called. xen_after_bootmem() walks page table's pages and marks them pinned. Link: http://lkml.kernel.org/r/20180226160112.24724-2-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Acked-by: Ingo Molnar Reviewed-by: Juergen Gross Tested-by: Juergen Gross Cc: Daniel Jordan Cc: Pavel Tatashin Cc: Alok Kataria Cc: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Boris Ostrovsky Cc: Michal Hocko Cc: Vlastimil Babka Cc: Andy Lutomirski Cc: Laura Abbott Cc: Kirill A. Shutemov Cc: Borislav Petkov Cc: Mathias Krause Cc: Jinbum Park Cc: Dan Williams Cc: Baoquan He Cc: Jia Zhang Cc: Mel Gorman Cc: Johannes Weiner Cc: Stefano Stabellini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/x86_init.h | 2 ++ arch/x86/kernel/x86_init.c | 1 + arch/x86/mm/init_32.c | 1 + arch/x86/mm/init_64.c | 1 + arch/x86/xen/mmu_pv.c | 38 ++++++++++++++++++++++++++------------ mm/page_alloc.c | 4 ---- 6 files changed, 31 insertions(+), 16 deletions(-) commit ad55eac74f2016c6dc132b9502f794156858a3d1 Author: Michal Hocko Date: Tue Apr 10 16:36:05 2018 -0700 elf: enforce MAP_FIXED on overlaying elf segments Anshuman has reported that with "fs, elf: drop MAP_FIXED usage from elf_map" applied, some ELF binaries in his environment fail to start with [ 23.423642] 9148 (sed): Uhuuh, elf segment at 0000000010030000 requested but the memory is mapped already [ 23.423706] requested [10030000, 10040000] mapped [10030000, 10040000] 100073 anon The reason is that the above binary has overlapping elf segments: LOAD 0x0000000000000000 0x0000000010000000 0x0000000010000000 0x0000000000013a8c 0x0000000000013a8c R E 10000 LOAD 0x000000000001fd40 0x000000001002fd40 0x000000001002fd40 0x00000000000002c0 0x00000000000005e8 RW 10000 LOAD 0x0000000000020328 0x0000000010030328 0x0000000010030328 0x0000000000000384 0x00000000000094a0 RW 10000 That binary has two RW LOAD segments, the first crosses a page border into the second 0x1002fd40 (LOAD2-vaddr) + 0x5e8 (LOAD2-memlen) == 0x10030328 (LOAD3-vaddr) Handle this situation by enforcing MAP_FIXED when we establish a temporary brk VMA to handle overlapping segments. All other mappings will still use MAP_FIXED_NOREPLACE. Link: http://lkml.kernel.org/r/20180213100440.GM3443@dhcp22.suse.cz Signed-off-by: Michal Hocko Reported-by: Anshuman Khandual Reviewed-by: Khalid Aziz Cc: Andrei Vagin Cc: Michael Ellerman Cc: Kees Cook Cc: Abdul Haleem Cc: Joel Stanley Cc: Stephen Rothwell Cc: Mark Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/binfmt_elf.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 4ed28639519c7bad5f518e70b3284c6e0763e650 Author: Michal Hocko Date: Tue Apr 10 16:36:01 2018 -0700 fs, elf: drop MAP_FIXED usage from elf_map Both load_elf_interp and load_elf_binary rely on elf_map to map segments on a controlled address and they use MAP_FIXED to enforce that. This is however dangerous thing prone to silent data corruption which can be even exploitable. Let's take CVE-2017-1000253 as an example. At the time (before commit eab09532d400: "binfmt_elf: use ELF_ET_DYN_BASE only for PIE") ELF_ET_DYN_BASE was at TASK_SIZE / 3 * 2 which is not that far away from the stack top on 32b (legacy) memory layout (only 1GB away). Therefore we could end up mapping over the existing stack with some luck. The issue has been fixed since then (a87938b2e246: "fs/binfmt_elf.c: fix bug in loading of PIE binaries"), ELF_ET_DYN_BASE moved moved much further from the stack (eab09532d400 and later by c715b72c1ba4: "mm: revert x86_64 and arm64 ELF_ET_DYN_BASE base changes") and excessive stack consumption early during execve fully stopped by da029c11e6b1 ("exec: Limit arg stack to at most 75% of _STK_LIM"). So we should be safe and any attack should be impractical. On the other hand this is just too subtle assumption so it can break quite easily and hard to spot. I believe that the MAP_FIXED usage in load_elf_binary (et. al) is still fundamentally dangerous. Moreover it shouldn't be even needed. We are at the early process stage and so there shouldn't be unrelated mappings (except for stack and loader) existing so mmap for a given address should succeed even without MAP_FIXED. Something is terribly wrong if this is not the case and we should rather fail than silently corrupt the underlying mapping. Address this issue by changing MAP_FIXED to the newly added MAP_FIXED_NOREPLACE. This will mean that mmap will fail if there is an existing mapping clashing with the requested one without clobbering it. [mhocko@suse.com: fix build] [akpm@linux-foundation.org: coding-style fixes] [avagin@openvz.org: don't use the same value for MAP_FIXED_NOREPLACE and MAP_SYNC] Link: http://lkml.kernel.org/r/20171218184916.24445-1-avagin@openvz.org Link: http://lkml.kernel.org/r/20171213092550.2774-3-mhocko@kernel.org Signed-off-by: Michal Hocko Signed-off-by: Andrei Vagin Signed-off-by: Michal Hocko Reviewed-by: Khalid Aziz Acked-by: Michael Ellerman Acked-by: Kees Cook Cc: Abdul Haleem Cc: Joel Stanley Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/binfmt_elf.c | 13 +++++++++---- include/uapi/asm-generic/mman-common.h | 4 +++- 2 files changed, 12 insertions(+), 5 deletions(-) commit a4ff8e8620d3f4f50ac4b41e8067b7d395056843 Author: Michal Hocko Date: Tue Apr 10 16:35:57 2018 -0700 mm: introduce MAP_FIXED_NOREPLACE Patch series "mm: introduce MAP_FIXED_NOREPLACE", v2. This has started as a follow up discussion [3][4] resulting in the runtime failure caused by hardening patch [5] which removes MAP_FIXED from the elf loader because MAP_FIXED is inherently dangerous as it might silently clobber an existing underlying mapping (e.g. stack). The reason for the failure is that some architectures enforce an alignment for the given address hint without MAP_FIXED used (e.g. for shared or file backed mappings). One way around this would be excluding those archs which do alignment tricks from the hardening [6]. The patch is really trivial but it has been objected, rightfully so, that this screams for a more generic solution. We basically want a non-destructive MAP_FIXED. The first patch introduced MAP_FIXED_NOREPLACE which enforces the given address but unlike MAP_FIXED it fails with EEXIST if the given range conflicts with an existing one. The flag is introduced as a completely new one rather than a MAP_FIXED extension because of the backward compatibility. We really want a never-clobber semantic even on older kernels which do not recognize the flag. Unfortunately mmap sucks wrt flags evaluation because we do not EINVAL on unknown flags. On those kernels we would simply use the traditional hint based semantic so the caller can still get a different address (which sucks) but at least not silently corrupt an existing mapping. I do not see a good way around that. Except we won't export expose the new semantic to the userspace at all. It seems there are users who would like to have something like that. Jemalloc has been mentioned by Michael Ellerman [7] Florian Weimer has mentioned the following: : glibc ld.so currently maps DSOs without hints. This means that the kernel : will map right next to each other, and the offsets between them a completely : predictable. We would like to change that and supply a random address in a : window of the address space. If there is a conflict, we do not want the : kernel to pick a non-random address. Instead, we would try again with a : random address. John Hubbard has mentioned CUDA example : a) Searches /proc//maps for a "suitable" region of available : VA space. "Suitable" generally means it has to have a base address : within a certain limited range (a particular device model might : have odd limitations, for example), it has to be large enough, and : alignment has to be large enough (again, various devices may have : constraints that lead us to do this). : : This is of course subject to races with other threads in the process. : : Let's say it finds a region starting at va. : : b) Next it does: : p = mmap(va, ...) : : *without* setting MAP_FIXED, of course (so va is just a hint), to : attempt to safely reserve that region. If p != va, then in most cases, : this is a failure (almost certainly due to another thread getting a : mapping from that region before we did), and so this layer now has to : call munmap(), before returning a "failure: retry" to upper layers. : : IMPROVEMENT: --> if instead, we could call this: : : p = mmap(va, ... MAP_FIXED_NOREPLACE ...) : : , then we could skip the munmap() call upon failure. This : is a small thing, but it is useful here. (Thanks to Piotr : Jaroszynski and Mark Hairgrove for helping me get that detail : exactly right, btw.) : : c) After that, CUDA suballocates from p, via: : : q = mmap(sub_region_start, ... MAP_FIXED ...) : : Interestingly enough, "freeing" is also done via MAP_FIXED, and : setting PROT_NONE to the subregion. Anyway, I just included (c) for : general interest. Atomic address range probing in the multithreaded programs in general sounds like an interesting thing to me. The second patch simply replaces MAP_FIXED use in elf loader by MAP_FIXED_NOREPLACE. I believe other places which rely on MAP_FIXED should follow. Actually real MAP_FIXED usages should be docummented properly and they should be more of an exception. [1] http://lkml.kernel.org/r/20171116101900.13621-1-mhocko@kernel.org [2] http://lkml.kernel.org/r/20171129144219.22867-1-mhocko@kernel.org [3] http://lkml.kernel.org/r/20171107162217.382cd754@canb.auug.org.au [4] http://lkml.kernel.org/r/1510048229.12079.7.camel@abdul.in.ibm.com [5] http://lkml.kernel.org/r/20171023082608.6167-1-mhocko@kernel.org [6] http://lkml.kernel.org/r/20171113094203.aofz2e7kueitk55y@dhcp22.suse.cz [7] http://lkml.kernel.org/r/87efp1w7vy.fsf@concordia.ellerman.id.au This patch (of 2): MAP_FIXED is used quite often to enforce mapping at the particular range. The main problem of this flag is, however, that it is inherently dangerous because it unmaps existing mappings covered by the requested range. This can cause silent memory corruptions. Some of them even with serious security implications. While the current semantic might be really desiderable in many cases there are others which would want to enforce the given range but rather see a failure than a silent memory corruption on a clashing range. Please note that there is no guarantee that a given range is obeyed by the mmap even when it is free - e.g. arch specific code is allowed to apply an alignment. Introduce a new MAP_FIXED_NOREPLACE flag for mmap to achieve this behavior. It has the same semantic as MAP_FIXED wrt. the given address request with a single exception that it fails with EEXIST if the requested address is already covered by an existing mapping. We still do rely on get_unmaped_area to handle all the arch specific MAP_FIXED treatment and check for a conflicting vma after it returns. The flag is introduced as a completely new one rather than a MAP_FIXED extension because of the backward compatibility. We really want a never-clobber semantic even on older kernels which do not recognize the flag. Unfortunately mmap sucks wrt. flags evaluation because we do not EINVAL on unknown flags. On those kernels we would simply use the traditional hint based semantic so the caller can still get a different address (which sucks) but at least not silently corrupt an existing mapping. I do not see a good way around that. [mpe@ellerman.id.au: fix whitespace] [fail on clashing range with EEXIST as per Florian Weimer] [set MAP_FIXED before round_hint_to_min as per Khalid Aziz] Link: http://lkml.kernel.org/r/20171213092550.2774-2-mhocko@kernel.org Reviewed-by: Khalid Aziz Signed-off-by: Michal Hocko Acked-by: Michael Ellerman Cc: Khalid Aziz Cc: Russell King - ARM Linux Cc: Andrea Arcangeli Cc: Florian Weimer Cc: John Hubbard Cc: Matthew Wilcox Cc: Abdul Haleem Cc: Joel Stanley Cc: Kees Cook Cc: Michal Hocko Cc: Jason Evans Cc: David Goldblatt Cc: Edward Tomasz Napierała Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/include/uapi/asm/mman.h | 1 + arch/mips/include/uapi/asm/mman.h | 1 + arch/parisc/include/uapi/asm/mman.h | 1 + arch/xtensa/include/uapi/asm/mman.h | 1 + include/uapi/asm-generic/mman-common.h | 1 + mm/mmap.c | 11 +++++++++++ 6 files changed, 16 insertions(+) commit 721d8b41aba3d99a9e9abaa398ad908e94053a30 Author: Joe Perches Date: Tue Apr 10 16:35:53 2018 -0700 MAINTAINERS: update bouncing aacraid@adaptec.com addresses Adaptec is now part of Microsemi. Commit 2a81ffdd9da1 ("MAINTAINERS: Update email address for aacraid") updated only one of the driver maintainer addresses. Update the other two sections as the aacraid@adaptec.com address bounces. Link: http://lkml.kernel.org/r/1522103936.12357.27.camel@perches.com Signed-off-by: Joe Perches Cc: Dave Carroll Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 32785c0539b7e96f77a14a4f4ab225712665a5a4 Author: Nikolay Borisov Date: Tue Apr 10 16:35:49 2018 -0700 fs/dcache.c: add cond_resched() in shrink_dentry_list() As previously reported (https://patchwork.kernel.org/patch/8642031/) it's possible to call shrink_dentry_list with a large number of dentries (> 10000). This, in turn, could trigger the softlockup detector and possibly trigger a panic. In addition to the unmount path being vulnerable to this scenario, at SuSE we've observed similar situation happening during process exit on processes that touch a lot of dentries. Here is an excerpt from a crash dump. The number after the colon are the number of dentries on the list passed to shrink_dentry_list: PID 99760: 10722 PID 107530: 215 PID 108809: 24134 PID 108877: 21331 PID 141708: 16487 So we want to kill between 15k-25k dentries without yielding. And one possible call stack looks like: 4 [ffff8839ece41db0] _raw_spin_lock at ffffffff8152a5f8 5 [ffff8839ece41db0] evict at ffffffff811c3026 6 [ffff8839ece41dd0] __dentry_kill at ffffffff811bf258 7 [ffff8839ece41df0] shrink_dentry_list at ffffffff811bf593 8 [ffff8839ece41e18] shrink_dcache_parent at ffffffff811bf830 9 [ffff8839ece41e50] proc_flush_task at ffffffff8120dd61 10 [ffff8839ece41ec0] release_task at ffffffff81059ebd 11 [ffff8839ece41f08] do_exit at ffffffff8105b8ce 12 [ffff8839ece41f78] sys_exit at ffffffff8105bd53 13 [ffff8839ece41f80] system_call_fastpath at ffffffff81532909 While some of the callers of shrink_dentry_list do use cond_resched, this is not sufficient to prevent softlockups. So just move cond_resched into shrink_dentry_list from its callers. David said: I've found hundreds of occurrences of warnings that we emit when need_resched stays set for a prolonged period of time with the stack trace that is included in the change log. Link: http://lkml.kernel.org/r/1521718946-31521-1-git-send-email-nborisov@suse.com Signed-off-by: Nikolay Borisov Reviewed-by: Andrew Morton Acked-by: David Rientjes Cc: Alexander Viro Cc: Goldwyn Rodrigues Cc: Jeff Mahoney Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dcache.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit de99626c2e89713cd29860ca26b584d1e6219da0 Author: Valentin Vidic Date: Tue Apr 10 16:35:46 2018 -0700 include/linux/kfifo.h: fix comment Clean up unusual formatting in the note about locking. Link: http://lkml.kernel.org/r/20180324002630.13046-1-Valentin.Vidic@CARNet.hr Signed-off-by: Valentin Vidic Cc: Stefani Seibold Cc: Mauro Carvalho Chehab Cc: Christophe JAILLET Cc: Jiri Kosina Cc: Sean Young Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kfifo.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a61fc2cbdf6a753b7000dd216c62285a68755147 Author: Andrew Morton Date: Tue Apr 10 16:35:42 2018 -0700 ipc/shm.c: shm_split(): remove unneeded test for NULL shm_file_data.vm_ops This was added by the recent "ipc/shm.c: add split function to shm_vm_ops", but it is not necessary. Reviewed-by: Mike Kravetz Cc: Laurent Dufour Cc: Dan Williams Cc: Michal Hocko Cc: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24704f36196ce79b48dd3921e782d15fd9c87959 Author: Waiman Long Date: Tue Apr 10 16:35:38 2018 -0700 kernel/sysctl.c: add kdoc comments to do_proc_do{u}intvec_minmax_conv_param Kdoc comments are added to the do_proc_dointvec_minmax_conv_param and do_proc_douintvec_minmax_conv_param structures thare are used internally for range checking. The error codes returned by proc_dointvec_minmax() and proc_douintvec_minmax() are also documented. Link: http://lkml.kernel.org/r/1519926220-7453-3-git-send-email-longman@redhat.com Signed-off-by: Waiman Long Reviewed-by: Andrew Morton Acked-by: Luis R. Rodriguez Cc: Al Viro Cc: Davidlohr Bueso Cc: Kees Cook Cc: Manfred Spraul Cc: Matthew Wilcox Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/sysctl.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 64a11f3dc20b45fdc8c058296b4f6449e4b9f24c Author: Waiman Long Date: Tue Apr 10 16:35:35 2018 -0700 fs/proc/proc_sysctl.c: fix typo in sysctl_check_table_array() Patch series "ipc: Clamp *mni to the real IPCMNI limit", v3. The sysctl parameters msgmni, shmmni and semmni have an inherent limit of IPC_MNI (32k). However, users may not be aware of that because they can write a value much higher than that without getting any error or notification. Reading the parameters back will show the newly written values which are not real. Enforcing the limit by failing sysctl parameter write, however, can break existing user applications. To address this delemma, a new flags field is introduced into the ctl_table. The value CTL_FLAGS_CLAMP_RANGE can be added to any ctl_table entries to enable a looser range clamping without returning any error. For example, .flags = CTL_FLAGS_CLAMP_RANGE, This flags value are now used for the range checking of shmmni, msgmni and semmni without breaking existing applications. If any out of range value is written to those sysctl parameters, the following warning will be printed instead. Kernel parameter "shmmni" was set out of range [0, 32768], clamped to 32768. Reading the values back will show 32768 instead of some fake values. This patch (of 6): Fix a typo. Link: http://lkml.kernel.org/r/1519926220-7453-2-git-send-email-longman@redhat.com Signed-off-by: Waiman Long Reviewed-by: Andrew Morton Acked-by: Luis R. Rodriguez Cc: Davidlohr Bueso Cc: Manfred Spraul Cc: Kees Cook Cc: Al Viro Cc: Matthew Wilcox Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/proc_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23c8cec8cf679b10997a512abb1e86f0cedc42ba Author: Davidlohr Bueso Date: Tue Apr 10 16:35:30 2018 -0700 ipc/msg: introduce msgctl(MSG_STAT_ANY) There is a permission discrepancy when consulting msq ipc object metadata between /proc/sysvipc/msg (0444) and the MSG_STAT shmctl command. The later does permission checks for the object vs S_IRUGO. As such there can be cases where EACCESS is returned via syscall but the info is displayed anyways in the procfs files. While this might have security implications via info leaking (albeit no writing to the msq metadata), this behavior goes way back and showing all the objects regardless of the permissions was most likely an overlook - so we are stuck with it. Furthermore, modifying either the syscall or the procfs file can cause userspace programs to break (ie ipcs). Some applications require getting the procfs info (without root privileges) and can be rather slow in comparison with a syscall -- up to 500x in some reported cases for shm. This patch introduces a new MSG_STAT_ANY command such that the msq ipc object permissions are ignored, and only audited instead. In addition, I've left the lsm security hook checks in place, as if some policy can block the call, then the user has no other choice than just parsing the procfs file. Link: http://lkml.kernel.org/r/20180215162458.10059-4-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reported-by: Robert Kettler Cc: Eric W. Biederman Cc: Kees Cook Cc: Manfred Spraul Cc: Michael Kerrisk Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/msg.h | 1 + ipc/msg.c | 17 ++++++++++++----- security/selinux/hooks.c | 1 + security/smack/smack_lsm.c | 1 + 4 files changed, 15 insertions(+), 5 deletions(-) commit a280d6dc77eb6002f269d58cd47c7c7e69b617b6 Author: Davidlohr Bueso Date: Tue Apr 10 16:35:26 2018 -0700 ipc/sem: introduce semctl(SEM_STAT_ANY) There is a permission discrepancy when consulting shm ipc object metadata between /proc/sysvipc/sem (0444) and the SEM_STAT semctl command. The later does permission checks for the object vs S_IRUGO. As such there can be cases where EACCESS is returned via syscall but the info is displayed anyways in the procfs files. While this might have security implications via info leaking (albeit no writing to the sma metadata), this behavior goes way back and showing all the objects regardless of the permissions was most likely an overlook - so we are stuck with it. Furthermore, modifying either the syscall or the procfs file can cause userspace programs to break (ie ipcs). Some applications require getting the procfs info (without root privileges) and can be rather slow in comparison with a syscall -- up to 500x in some reported cases for shm. This patch introduces a new SEM_STAT_ANY command such that the sem ipc object permissions are ignored, and only audited instead. In addition, I've left the lsm security hook checks in place, as if some policy can block the call, then the user has no other choice than just parsing the procfs file. Link: http://lkml.kernel.org/r/20180215162458.10059-3-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reported-by: Robert Kettler Cc: Eric W. Biederman Cc: Kees Cook Cc: Manfred Spraul Cc: Michael Kerrisk Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/sem.h | 1 + ipc/sem.c | 17 ++++++++++++----- security/selinux/hooks.c | 1 + security/smack/smack_lsm.c | 1 + 4 files changed, 15 insertions(+), 5 deletions(-) commit c21a6970ae727839a2f300cd8dd957de0d0238c3 Author: Davidlohr Bueso Date: Tue Apr 10 16:35:23 2018 -0700 ipc/shm: introduce shmctl(SHM_STAT_ANY) Patch series "sysvipc: introduce STAT_ANY commands", v2. The following patches adds the discussed (see [1]) new command for shm as well as for sems and msq as they are subject to the same discrepancies for ipc object permission checks between the syscall and via procfs. These new commands are justified in that (1) we are stuck with this semantics as changing syscall and procfs can break userland; and (2) some users can benefit from performance (for large amounts of shm segments, for example) from not having to parse the procfs interface. Once merged, I will submit the necesary manpage updates. But I'm thinking something like: : diff --git a/man2/shmctl.2 b/man2/shmctl.2 : index 7bb503999941..bb00bbe21a57 100644 : --- a/man2/shmctl.2 : +++ b/man2/shmctl.2 : @@ -41,6 +41,7 @@ : .\" 2005-04-25, mtk -- noted aberrant Linux behavior w.r.t. new : .\" attaches to a segment that has already been marked for deletion. : .\" 2005-08-02, mtk: Added IPC_INFO, SHM_INFO, SHM_STAT descriptions. : +.\" 2018-02-13, dbueso: Added SHM_STAT_ANY description. : .\" : .TH SHMCTL 2 2017-09-15 "Linux" "Linux Programmer's Manual" : .SH NAME : @@ -242,6 +243,18 @@ However, the : argument is not a segment identifier, but instead an index into : the kernel's internal array that maintains information about : all shared memory segments on the system. : +.TP : +.BR SHM_STAT_ANY " (Linux-specific)" : +Return a : +.I shmid_ds : +structure as for : +.BR SHM_STAT . : +However, the : +.I shm_perm.mode : +is not checked for read access for : +.IR shmid , : +resembing the behaviour of : +/proc/sysvipc/shm. : .PP : The caller can prevent or allow swapping of a shared : memory segment with the following \fIcmd\fP values: : @@ -287,7 +300,7 @@ operation returns the index of the highest used entry in the : kernel's internal array recording information about all : shared memory segments. : (This information can be used with repeated : -.B SHM_STAT : +.B SHM_STAT/SHM_STAT_ANY : operations to obtain information about all shared memory segments : on the system.) : A successful : @@ -328,7 +341,7 @@ isn't accessible. : \fIshmid\fP is not a valid identifier, or \fIcmd\fP : is not a valid command. : Or: for a : -.B SHM_STAT : +.B SHM_STAT/SHM_STAT_ANY : operation, the index value specified in : .I shmid : referred to an array slot that is currently unused. This patch (of 3): There is a permission discrepancy when consulting shm ipc object metadata between /proc/sysvipc/shm (0444) and the SHM_STAT shmctl command. The later does permission checks for the object vs S_IRUGO. As such there can be cases where EACCESS is returned via syscall but the info is displayed anyways in the procfs files. While this might have security implications via info leaking (albeit no writing to the shm metadata), this behavior goes way back and showing all the objects regardless of the permissions was most likely an overlook - so we are stuck with it. Furthermore, modifying either the syscall or the procfs file can cause userspace programs to break (ie ipcs). Some applications require getting the procfs info (without root privileges) and can be rather slow in comparison with a syscall -- up to 500x in some reported cases. This patch introduces a new SHM_STAT_ANY command such that the shm ipc object permissions are ignored, and only audited instead. In addition, I've left the lsm security hook checks in place, as if some policy can block the call, then the user has no other choice than just parsing the procfs file. [1] https://lkml.org/lkml/2017/12/19/220 Link: http://lkml.kernel.org/r/20180215162458.10059-2-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Acked-by: Michal Hocko Cc: Michael Kerrisk Cc: Manfred Spraul Cc: Eric W. Biederman Cc: Kees Cook Cc: Robert Kettler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/shm.h | 5 +++-- ipc/shm.c | 23 ++++++++++++++++++----- security/selinux/hooks.c | 1 + security/smack/smack_lsm.c | 1 + 4 files changed, 23 insertions(+), 7 deletions(-) commit edc41b3c5489996e4c1ec820bf102660bf745c45 Author: Chris Wilson Date: Tue Apr 10 16:35:18 2018 -0700 kernel/params.c: downgrade warning for unsafe parameters As using an unsafe module parameter is, by its very definition, an expected user action, emitting a warning is overkill. Nothing has yet gone wrong, and we add a taint flag for any future oops should something actually go wrong. So instead of having a user controllable pr_warn, downgrade it to a pr_notice for "a normal, but significant condition". We make use of unsafe kernel parameters in igt (https://cgit.freedesktop.org/drm/igt-gpu-tools/) (we have not yet succeeded in removing all such debugging options), which generates a warning and taints the kernel. The warning is unhelpful as we then need to filter it out again as we check that every test themselves do not provoke any kernel warnings. Link: http://lkml.kernel.org/r/20180226151919.9674-1-chris@chris-wilson.co.uk Fixes: 91f9d330cc14 ("module: make it possible to have unsafe, tainting module params") Signed-off-by: Chris Wilson Acked-by: Jani Nikula Reviewed-by: Andrew Morton Cc: Rusty Russell Cc: Jean Delvare Cc: Li Zhong Cc: Petri Latvala Cc: Daniel Vetter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d87b309a5d66c3ec0b4d985fe29b547282e7427 Author: Randy Dunlap Date: Tue Apr 10 16:35:14 2018 -0700 kernel/sysctl.c: fix sizeof argument to match variable name Fix sizeof argument to be the same as the data variable name. Probably a copy/paste error. Mostly harmless since both variables are unsigned int. Fixes kernel bugzilla #197371: Possible access to unintended variable in "kernel/sysctl.c" line 1339 https://bugzilla.kernel.org/show_bug.cgi?id=197371 Link: http://lkml.kernel.org/r/e0d0531f-361e-ef5f-8499-32743ba907e1@infradead.org Signed-off-by: Randy Dunlap Reported-by: Petru Mihancea Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbd876adb8c7294ad86ef0542d6b528b7ab06f48 Author: Ioan Nicu Date: Tue Apr 10 16:35:10 2018 -0700 rapidio: use a reference count for struct mport_dma_req Once the dma request is passed to the DMA engine, the DMA subsystem would hold a pointer to this structure and could call the completion callback after do_dma_request() has timed out. The current code deals with this by putting timed out SYNC requests to a pending list and freeing them later, when the mport cdev device is released. This still does not guarantee that the DMA subsystem is really done with those transfers, so in theory dma_xfer_callback/dma_req_free could be called after mport_cdev_release_dma and could potentially access already freed memory. This patch simplifies the current handling by using a kref in the mport dma request structure, so that it gets freed only when nobody uses it anymore. This also simplifies the code a bit, as FAF transfers are now handled in the same way as SYNC and ASYNC transfers. There is no need anymore for the pending list and for the dma workqueue which was used in case of FAF transfers, so we remove them both. Link: http://lkml.kernel.org/r/20180405203342.GA16191@nokia.com Signed-off-by: Ioan Nicu Acked-by: Alexandre Bounine Cc: Barry Wood Cc: Matt Porter Cc: Christophe JAILLET Cc: Al Viro Cc: Logan Gunthorpe Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Frank Kunz Cc: Alexander Sverdlin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/rio_mport_cdev.c | 122 +++++-------------------------- 1 file changed, 18 insertions(+), 104 deletions(-) commit b94bb1f6104a1d66b8900d79eb0d28fd894c380e Author: Vasyl Gomonovych Date: Tue Apr 10 16:35:06 2018 -0700 drivers/rapidio/rio-scan.c: fix typo in comment Fix typo in the words 'receiver', 'specified', 'during' Link: http://lkml.kernel.org/r/20180321211035.8904-1-gomonovych@gmail.com Signed-off-by: Vasyl Gomonovych Cc: Matt Porter Cc: Alexandre Bounine Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/rio-scan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c31dbb146dd44af44bc60780ce8fa7a9f5f746df Author: Kees Cook Date: Tue Apr 10 16:35:01 2018 -0700 exec: pin stack limit during exec Since the stack rlimit is used in multiple places during exec and it can be changed via other threads (via setrlimit()) or processes (via prlimit()), the assumption that the value doesn't change cannot be made. This leads to races with mm layout selection and argument size calculations. This changes the exec path to use the rlimit stored in bprm instead of in current. Before starting the thread, the bprm stack rlimit is stored back to current. Link: http://lkml.kernel.org/r/1518638796-20819-4-git-send-email-keescook@chromium.org Fixes: 64701dee4178e ("exec: Use sane stack rlimit under secureexec") Signed-off-by: Kees Cook Reported-by: Ben Hutchings Reported-by: Andy Lutomirski Reported-by: Brad Spengler Acked-by: Michal Hocko Cc: Ben Hutchings Cc: Greg KH Cc: Hugh Dickins Cc: "Jason A. Donenfeld" Cc: Laura Abbott Cc: Oleg Nesterov Cc: Rik van Riel Cc: Willy Tarreau Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/exec.c | 27 +++++++++++++++------------ include/linux/binfmts.h | 2 ++ 2 files changed, 17 insertions(+), 12 deletions(-) commit b83838313386f617d6bd8201be7f5b532059bba1 Author: Kees Cook Date: Tue Apr 10 16:34:57 2018 -0700 exec: introduce finalize_exec() before start_thread() Provide a final callback into fs/exec.c before start_thread() takes over, to handle any last-minute changes, like the coming restoration of the stack limit. Link: http://lkml.kernel.org/r/1518638796-20819-3-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook Cc: Andy Lutomirski Cc: Ben Hutchings Cc: Ben Hutchings Cc: Brad Spengler Cc: Greg KH Cc: Hugh Dickins Cc: "Jason A. Donenfeld" Cc: Laura Abbott Cc: Michal Hocko Cc: Oleg Nesterov Cc: Rik van Riel Cc: Willy Tarreau Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/binfmt_aout.c | 1 + fs/binfmt_elf.c | 1 + fs/binfmt_elf_fdpic.c | 1 + fs/binfmt_flat.c | 1 + fs/exec.c | 6 ++++++ include/linux/binfmts.h | 1 + 6 files changed, 11 insertions(+) commit 8f2af155b513583e8b149a384551f13e1ac5dc72 Author: Kees Cook Date: Tue Apr 10 16:34:53 2018 -0700 exec: pass stack rlimit into mm layout functions Patch series "exec: Pin stack limit during exec". Attempts to solve problems with the stack limit changing during exec continue to be frustrated[1][2]. In addition to the specific issues around the Stack Clash family of flaws, Andy Lutomirski pointed out[3] other places during exec where the stack limit is used and is assumed to be unchanging. Given the many places it gets used and the fact that it can be manipulated/raced via setrlimit() and prlimit(), I think the only way to handle this is to move away from the "current" view of the stack limit and instead attach it to the bprm, and plumb this down into the functions that need to know the stack limits. This series implements the approach. [1] 04e35f4495dd ("exec: avoid RLIMIT_STACK races with prlimit()") [2] 779f4e1c6c7c ("Revert "exec: avoid RLIMIT_STACK races with prlimit()"") [3] to security@kernel.org, "Subject: existing rlimit races?" This patch (of 3): Since it is possible that the stack rlimit can change externally during exec (either via another thread calling setrlimit() or another process calling prlimit()), provide a way to pass the rlimit down into the per-architecture mm layout functions so that the rlimit can stay in the bprm structure instead of sitting in the signal structure until exec is finalized. Link: http://lkml.kernel.org/r/1518638796-20819-2-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook Cc: Michal Hocko Cc: Ben Hutchings Cc: Willy Tarreau Cc: Hugh Dickins Cc: Oleg Nesterov Cc: "Jason A. Donenfeld" Cc: Rik van Riel Cc: Laura Abbott Cc: Greg KH Cc: Andy Lutomirski Cc: Ben Hutchings Cc: Brad Spengler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/mm/mmap.c | 14 +++++++------- arch/arm64/mm/mmap.c | 14 +++++++------- arch/mips/mm/mmap.c | 14 +++++++------- arch/parisc/kernel/sys_parisc.c | 16 +++++++++++----- arch/powerpc/mm/mmap.c | 28 ++++++++++++++++------------ arch/s390/mm/mmap.c | 15 ++++++++------- arch/sparc/kernel/sys_sparc_64.c | 4 ++-- arch/x86/mm/mmap.c | 18 +++++++++++------- fs/exec.c | 8 +++++++- include/linux/sched/mm.h | 6 ++++-- mm/util.c | 2 +- 11 files changed, 81 insertions(+), 58 deletions(-) commit d64d01a155f84850f7dc9795f464e3df9a5ddb10 Author: Alexey Dobriyan Date: Tue Apr 10 16:34:49 2018 -0700 seq_file: account everything to kmemcg All it takes to open a file and read 1 byte from it. seq_file will be allocated along with any private allocations, and more importantly seq file buffer which is 1 page by default. Link: http://lkml.kernel.org/r/20180310085252.GB17121@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Acked-by: Michal Hocko Cc: Al Viro Cc: Glauber Costa Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/seq_file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0965232035cfa59a64d197cf8a8ee0bc407bb3e4 Author: Alexey Dobriyan Date: Tue Apr 10 16:34:45 2018 -0700 seq_file: allocate seq_file from kmem_cache For fine-grained debugging and usercopy protection. Link: http://lkml.kernel.org/r/20180310085027.GA17121@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Cc: Al Viro Cc: Glauber Costa Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/seq_file.c | 12 ++++++++++-- include/linux/seq_file.h | 1 + init/main.c | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) commit 9ad553abe66f8be3f4755e9fa0a6ba137ce76341 Author: Andrew Morton Date: Tue Apr 10 16:34:41 2018 -0700 fs/reiserfs/journal.c: add missing resierfs_warning() arg One use of the reiserfs_warning() macro in journal_init_dev() is missing a parameter, causing the following warning: REISERFS warning (device loop0): journal_init_dev: Cannot open '%s': %i journal_init_dev: This also causes a WARN_ONCE() warning in the vsprintf code, and then a panic if panic_on_warn is set. Please remove unsupported %/ in format string WARNING: CPU: 1 PID: 4480 at lib/vsprintf.c:2138 format_decode+0x77f/0x830 lib/vsprintf.c:2138 Kernel panic - not syncing: panic_on_warn set ... Just add another string argument to the macro invocation. Addresses https://syzkaller.appspot.com/bug?id=0627d4551fdc39bf1ef5d82cd9eef587047f7718 Link: http://lkml.kernel.org/r/d678ebe1-6f54-8090-df4c-b9affad62293@infradead.org Signed-off-by: Randy Dunlap Reported-by: Tested-by: Randy Dunlap Acked-by: Jeff Mahoney Cc: Alexander Viro Cc: Jan Kara Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/reiserfs/journal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad12c3a6ef1c78d0d0dbbe48dfcd416583f515ad Author: Matthew Wilcox Date: Tue Apr 10 16:34:37 2018 -0700 autofs4: use wait_event_killable This playing with signals to allow only fatal signals appears to predate the introduction of wait_event_killable(), and I'm fairly sure that wait_event_killable is what was meant to happen here. [avagin@openvz.org: use wake_up() instead of wake_up_interruptible] Link: http://lkml.kernel.org/r/20180331022839.21277-1-avagin@openvz.org Link: http://lkml.kernel.org/r/20180319191609.23880-1-willy@infradead.org Signed-off-by: Matthew Wilcox Acked-by: Ian Kent Cc: Matthew Wilcox Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/waitq.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) commit 1a6a05a4fa862631df738dae76b4531ee15e5a0f Author: Aaro Koskinen Date: Tue Apr 10 16:34:34 2018 -0700 init/ramdisk: use pr_cont() at the end of ramdisk loading Use pr_cont() at the end of ramdisk loading. This will avoid the rotator and an extra newline appearing in the dmesg. Before: RAMDISK: Loading 2436KiB [1 disk] into ram disk... | done. After: RAMDISK: Loading 2436KiB [1 disk] into ram disk... done. Link: http://lkml.kernel.org/r/20180302205552.16031-1-aaro.koskinen@iki.fi Signed-off-by: Aaro Koskinen Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/do_mounts_rd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5d430902615bdea9d9bc205ed06ffc40d86ea66f Author: Joe Perches Date: Tue Apr 10 16:34:25 2018 -0700 checkpatch: whinge about bool bitfields Using bool in a bitfield isn't a good idea as the alignment behavior is arch implementation defined. Suggest using unsigned int or u<8|16|32> instead. Link: http://lkml.kernel.org/r/e22fb871b1b7f2fda4b22f3a24e0d7f092eb612c.camel@perches.com Signed-off-by: Joe Perches Suggested-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) commit 38dca988bb208e66d6fdb6346f7266f3d2d1a8a4 Author: Heinrich Schuchardt Date: Tue Apr 10 16:34:14 2018 -0700 checkpatch: allow space between colon and bracket Allow a space between a colon and subsequent opening bracket. This sequence may occur in inline assembler statements like asm( "ldr %[out], [%[in]]\n\t" : [out] "=r" (ret) : [in] "r" (addr) ); Link: http://lkml.kernel.org/r/20180403191655.23700-1-xypron.glpk@gmx.de Signed-off-by: Heinrich Schuchardt Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a487211ec720658f3e3c39eecd0b6829eafa6d4 Author: Joe Perches Date: Tue Apr 10 16:34:04 2018 -0700 checkpatch: add test for assignment at start of line Kernel style seems to prefer line wrapping an assignment with the assignment operator on the previous line like: identifier = expression; over identifier = expression; somewhere around a 50:1 ratio $ git grep -P "[^=]=\s*$" -- "*.[ch]" | wc -l 52008 $ git grep -P "^\s+[\*\/\+\|\%\-]?=[^=>]" | wc -l 1161 So add a --strict test for that condition. Link: http://lkml.kernel.org/r/1522275726.2210.12.camel@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) commit bc22d9a7d3aa76bc090d844e6aad18db9cc69237 Author: Joe Perches Date: Tue Apr 10 16:33:53 2018 -0700 checkpatch: test SYMBOLIC_PERMS multiple times per line There are occasions where symbolic perms are used in a ternary like return (channel == 0) ? S_IRUGO | S_IWUSR : S_IRUGO; The current test will find the first use "S_IRUGO | S_IWUSR" but not the second use "S_IRUGO" on the same line. Improve the test to look for all instances on a line. Link: http://lkml.kernel.org/r/1522127944.12357.49.camel@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d2e11b22d79053e832d17084bc912102c6cbb62 Author: Claudio Fontana Date: Tue Apr 10 16:33:42 2018 -0700 checkpatch: two spelling fixes completly -> completely wacking -> whacking Link: http://lkml.kernel.org/r/1520405394-5586-1-git-send-email-claudio.fontana@gliwa.com Signed-off-by: Claudio Fontana Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 478b17998066a6a70a7f265f4feba09c6945ab62 Author: Joe Perches Date: Tue Apr 10 16:33:34 2018 -0700 checkpatch: improve get_quoted_string for TRACE_EVENT macros The get_quoted_string function does not expect invalid arguments. The $stat test can return non-statements for complicated macros like TRACE_EVENT. Allow the $stat block and test for vsprintf misuses to exceed the actual block length and possibly test invalid lines by validating the arguments of get_quoted_string. Return "" if either get_quoted_string argument is undefined. Miscellanea: o Properly align the comment for the vsprintf extension test Link: http://lkml.kernel.org/r/9e9725342ca3dfc0f5e3e0b8ca3c482b0e5712cc.1520356392.git.joe@perches.com Signed-off-by: Joe Perches Reported-by: Chuck Lever Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e3c6bc95668b9b9fc1e74f221551dfa622ea9061 Author: Tobin C. Harding Date: Tue Apr 10 16:33:31 2018 -0700 checkpatch: warn for use of %px Usage of the new %px specifier potentially leaks sensitive information. Printing kernel addresses exposes the kernel layout in memory, this is potentially exploitable. We have tools in the kernel to help us do the right thing. We can have checkpatch warn developers of potential dangers of using %px. Have checkpatch emit a warning for usage of specifier %px. Link: http://lkml.kernel.org/r/1519700648-23108-5-git-send-email-me@tobin.cc Signed-off-by: Tobin C. Harding Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) commit e3d95a2a05afd6b51ade4686291b0ed8581dd5e5 Author: Tobin C. Harding Date: Tue Apr 10 16:33:27 2018 -0700 checkpatch: add sub routine get_stat_here() checkpatch currently contains duplicate code. We can define a sub routine and call that instead. This reduces code duplication and line count. Add subroutine get_stat_here(). Link: http://lkml.kernel.org/r/1519700648-23108-4-git-send-email-me@tobin.cc Signed-off-by: Tobin C. Harding Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 52 ++++++++++++++++++++------------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) commit c2066ca350b32f1d3d69743c59099c6f91f7a559 Author: Tobin C. Harding Date: Tue Apr 10 16:33:24 2018 -0700 checkpatch: remove unused variable declarations Variables are declared and not used, we should remove them. Link: http://lkml.kernel.org/r/1519700648-23108-3-git-send-email-me@tobin.cc Signed-off-by: Tobin C. Harding Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 2 -- 1 file changed, 2 deletions(-) commit 2a9f9d851c602b6ef0d0a52fb1996772edf218cb Author: Tobin C. Harding Date: Tue Apr 10 16:33:20 2018 -0700 checkpatch: add sub routine get_stat_real() checkpatch currently contains duplicate code. We can define a sub routine and call that instead. This reduces code duplication and line count. Add subroutine get_stat_real() Link: http://lkml.kernel.org/r/1519700648-23108-2-git-send-email-me@tobin.cc Signed-off-by: Tobin C. Harding Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 3d102fc0e7b02d4e16752c15aa92923405b01388 Author: Gilad Ben-Yossef Date: Tue Apr 10 16:33:17 2018 -0700 checkpatch: add Crypto ON_STACK to declaration_macros Add the crypto API *_ON_STACK to $declaration_macros. Resolves the following false warning: WARNING: Missing a blank line after declarations + int err; + SHASH_DESC_ON_STACK(desc, ctx_p->shash_tfm); Link: http://lkml.kernel.org/r/1518941636-4484-1-git-send-email-gilad@benyossef.com Signed-off-by: Gilad Ben-Yossef Signed-off-by: Joe Perches Acked-by: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9f3a89926d6dfc30a4fd1bbcb92cc7b218d3786d Author: Rob Herring Date: Tue Apr 10 16:33:13 2018 -0700 checkpatch.pl: add SPDX license tag check Add SPDX license tag check based on the rules defined in Documentation/process/license-rules.rst. To summarize, SPDX license tags should be on the 1st line (or 2nd line in scripts) using the appropriate comment style for the file type. Link: http://lkml.kernel.org/r/20180202154026.15298-1-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Joe Perches Acked-by: Greg Kroah-Hartman Acked-by: Philippe Ombredanne Cc: Andy Whitcroft Cc: Joe Perches Cc: Thomas Gleixner Cc: Igor Stoppa Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 85e12066ea09bbee5c99ff2dbde9934291533b0d Author: Joe Perches Date: Tue Apr 10 16:33:09 2018 -0700 checkpatch: improve parse_email signature checking Bare email addresses with non alphanumeric characters require escape quoting before being substituted in the parse_email routine. e.g. Reported-by: syzbot+bbd8e9a06452cc48059b@syzkaller.appspotmail.com Do so. Link: http://lkml.kernel.org/r/1518631805.3678.12.camel@perches.com Signed-off-by: Joe Perches Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68c1f08203f2b06b3b888229b1524cfbfe51660d Author: Matthew Wilcox Date: Tue Apr 10 16:33:06 2018 -0700 lib/list_debug.c: print unmangled addresses The entire point of printing the pointers in list_debug is to see if there's any useful information in them (eg poison values, ASCII, etc); obscuring them to see if they compare equal makes them much less useful. If an attacker can force this message to be printed, we've already lost. Link: http://lkml.kernel.org/r/20180401223237.GV13332@bombadil.infradead.org Signed-off-by: Matthew Wilcox Reviewed-by: Tobin C. Harding Reviewed-by: Andrew Morton Cc: Eric Biggers Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/list_debug.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 317506009216f5103e185fe626d61361a899909d Author: Colin Ian King Date: Tue Apr 10 16:33:02 2018 -0700 lib/test_ubsan.c: make test_ubsan_misaligned_access() static test_ubsan_misaligned_access() is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: lib/test_ubsan.c:91:6: warning: symbol 'test_ubsan_misaligned_access' was not declared. Should it be static? Link: http://lkml.kernel.org/r/20180313103048.28513-1-colin.king@canonical.com Signed-off-by: Colin Ian King Cc: Jinbum Park Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_ubsan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 854686f4edf483db1e0d26d972bdb8fb65c8bfaa Author: Jinbum Park Date: Tue Apr 10 16:32:58 2018 -0700 lib: add testing module for UBSAN This is a test module for UBSAN. It triggers all undefined behaviors that linux supports now, and detect them. All test-cases have passed by compiling with gcc-5.5.0. If use gcc-4.9.x, misaligned, out-of-bounds, object-size-mismatch will not be detected. Because gcc-4.9.x doesn't support them. Link: http://lkml.kernel.org/r/20180309102247.GA2944@pjb1027-Latitude-E5410 Signed-off-by: Jinbum Park Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.ubsan | 7 +++ lib/Makefile | 2 + lib/test_ubsan.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+) commit f6f66c1bf53079ce1f0789c8b482fba35b81617d Author: Kees Cook Date: Tue Apr 10 16:32:54 2018 -0700 lib/test_bitmap.c: do not accidentally use stack VLA This avoids an accidental stack VLA (since the compiler thinks the value of "len" can change, even when marked "const"). This just replaces it with a #define so it will DTRT. Seen with -Wvla. Fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 Link: http://lkml.kernel.org/r/20180307212555.GA17927@beast Signed-off-by: Kees Cook Reviewed-by: Andrew Morton Cc: Yury Norov Cc: Andy Shevchenko Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_bitmap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 5f00ae0d3ef8d36041d8d40ec71ab31b22764cba Author: Randy Dunlap Date: Tue Apr 10 16:32:51 2018 -0700 lib/Kconfig.debug: Debug Lockups and Hangs: keep SOFTLOCKUP options together Keep all of the SOFTLOCKUP kconfig symbols together (instead of injecting the HARDLOCKUP symbols in the midst of them) so that the config tools display them with their dependencies. Tested with 'make {menuconfig/nconfig/gconfig/xconfig}'. Link: http://lkml.kernel.org/r/6be2d9ed-4656-5b94-460d-7f051e2c7570@infradead.org Fixes: 05a4a9527931 ("kernel/watchdog: split up config options") Signed-off-by: Randy Dunlap Cc: Nicholas Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.debug | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit d387a31d75496e076046013f1670d17b8694213e Author: Alexandre Bounine Date: Tue Apr 10 16:32:48 2018 -0700 MAINTAINERS: update email address for Alexandre Bounine Link: http://lkml.kernel.org/r/1522958149-6157-1-git-send-email-alex.bou9@gmail.com Signed-off-by: Alexandre Bounine Reviewed-by: Andrew Morton Cc: Barry Wood Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cfe0d3009418a132b93d78642a8059a38fe5944 Author: Kees Cook Date: Tue Apr 10 16:32:44 2018 -0700 task_struct: only use anon struct under randstruct plugin The original intent for always adding the anonymous struct in task_struct was to make sure we had compiler coverage. However, this caused pathological padding of 40 bytes at the start of task_struct. Instead, move the anonymous struct to being only used when struct layout randomization is enabled. Link: http://lkml.kernel.org/r/20180327213609.GA2964@beast Fixes: 29e48ce87f1e ("task_struct: Allow randomized") Signed-off-by: Kees Cook Reported-by: Peter Zijlstra Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compiler-clang.h | 3 --- include/linux/compiler-gcc.h | 12 +++--------- 2 files changed, 3 insertions(+), 12 deletions(-) commit d4ef8d3ff005c70f6c9e2ffea14cc65fc8fe328d Author: Miguel Ojeda Date: Tue Apr 10 16:32:40 2018 -0700 clang-format: add configuration file clang-format is a tool to format C/C++/... code according to a set of rules and heuristics. Like most tools, it is not perfect nor covers every single case, but it is good enough to be helpful. In particular, it is useful for quickly re-formatting blocks of code automatically, for reviewing full files in order to spot coding style mistakes, typos and possible improvements. It is also handy for sorting ``#includes``, for aligning variables and macros, for reflowing text and other similar tasks. It also serves as a teaching tool/guide for newcomers. The tool itself has been already included in the repositories of popular Linux distributions for a long time. The rules in this file are intended for clang-format >= 4, which is easily available in most distributions. This commit adds the configuration file that contains the rules that the tool uses to know how to format the code according to the kernel coding style. This gives us several advantages: * clang-format works out of the box with reasonable defaults; avoiding that everyone has to re-do the configuration. * Everyone agrees (eventually) on what is the most useful default configuration for most of the kernel. * If it becomes commonplace among kernel developers, clang-format may feel compelled to support us better. They already recognize the Linux kernel and its style in their documentation and in one of the style sub-options. Some of clang-format's features relevant for the kernel are: * Uses clang's tooling support behind the scenes to parse and rewrite the code. It is not based on ad-hoc regexps. * Supports reasonably well the Linux kernel coding style. * Fast enough to be used at the press of a key. * There are already integrations (either built-in or third-party) for many common editors used by kernel developers (e.g. vim, emacs, Sublime, Atom...) that allow you to format an entire file or, more usefully, just your selection. * Able to parse unified diffs -- you can, for instance, reformat only the lines changed by a git commit. * Able to reflow text comments as well. * Widely supported and used by hundreds of developers in highly complex projects and organizations (e.g. the LLVM project itself, Chromium, WebKit, Google, Mozilla...). Therefore, it will be supported for a long time. See more information about the tool at: https://clang.llvm.org/docs/ClangFormat.html https://clang.llvm.org/docs/ClangFormatStyleOptions.html Link: http://lkml.kernel.org/r/20180318171632.qfkemw3mwbcukth6@gmail.com Signed-off-by: Miguel Ojeda Cc: Randy Dunlap Cc: Andy Whitcroft Cc: Joe Perches Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .clang-format | 428 +++++++++++++++++++++++++++++++++ .gitignore | 1 + Documentation/process/4.Coding.rst | 8 + Documentation/process/clang-format.rst | 184 ++++++++++++++ Documentation/process/coding-style.rst | 8 + 5 files changed, 629 insertions(+) commit 3ea056c50476f877f8bceb560ab69871098cb3a9 Author: Alexey Dobriyan Date: Tue Apr 10 16:32:36 2018 -0700 uts: create "struct uts_namespace" from kmem_cache So "struct uts_namespace" can enjoy fine-grained SLAB debugging and usercopy protection. I'd prefer shorter name "utsns" but there is "user_namespace" already. Link: http://lkml.kernel.org/r/20180228215158.GA23146@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Cc: "Eric W. Biederman" Cc: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/utsname.h | 6 ++++++ init/main.c | 2 ++ kernel/utsname.c | 20 ++++++++++++++++---- 3 files changed, 24 insertions(+), 4 deletions(-) commit bc4f2f5469ac2a52affadc4c00c1276d76151a39 Author: Kees Cook Date: Tue Apr 10 16:32:33 2018 -0700 taint: add taint for randstruct Since the randstruct plugin can intentionally produce extremely unusual kernel structure layouts (even performance pathological ones), some maintainers want to be able to trivially determine if an Oops is coming from a randstruct-built kernel, so as to keep their sanity when debugging. This adds the new flag and initializes taint_mask immediately when built with randstruct. Link: http://lkml.kernel.org/r/1519084390-43867-4-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook Reviewed-by: Andrew Morton Cc: Al Viro Cc: Alexey Dobriyan Cc: Jonathan Corbet Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/sysctl/kernel.txt | 1 + include/linux/kernel.h | 3 ++- kernel/panic.c | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) commit 9c4560e5bbd8c839c8986f79ef536aa07bd77ec7 Author: Kees Cook Date: Tue Apr 10 16:32:29 2018 -0700 taint: consolidate documentation This consolidates the taint bit documentation into a single place with both numeric and letter values. Additionally adds the missing TAINT_AUX documentation. Link: http://lkml.kernel.org/r/1519084390-43867-3-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook Reviewed-by: Andrew Morton Cc: Al Viro Cc: Alexey Dobriyan Cc: Jonathan Corbet Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/sysctl/kernel.txt | 53 +++++++++++++++++++++-------------------- kernel/panic.c | 23 ++++-------------- 2 files changed, 31 insertions(+), 45 deletions(-) commit 47d4b263a2f7324fb3cb641ca00b2725dd12dea0 Author: Kees Cook Date: Tue Apr 10 16:32:26 2018 -0700 taint: convert to indexed initialization This converts to using indexed initializers instead of comments, adds a comment on why the taint flags can't be an enum, and make sure that no one forgets to update the taint_flags when adding new bits. Link: http://lkml.kernel.org/r/1519084390-43867-2-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook Reviewed-by: Andrew Morton Cc: Al Viro Cc: Alexey Dobriyan Cc: Jonathan Corbet Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kernel.h | 1 + kernel/panic.c | 36 +++++++++++++++++++----------------- 2 files changed, 20 insertions(+), 17 deletions(-) commit 1f5bd0547654ada423b184e22f320d76c0fac49e Author: Alexey Dobriyan Date: Tue Apr 10 16:43:28 2018 -0700 proc: selftests: test /proc/uptime The only tests I could come up with for /proc/uptime are: - test that values increase monotonically for 1 second, - bounce around CPUs and test the same thing. Avoid glibc like plague for affinity given patches like this: https://marc.info/?l=linux-kernel&m=152130031912594&w=4 Link: http://lkml.kernel.org/r/20180317165235.GB3445@avx2 Signed-off-by: Alexey Dobriyan Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/proc/.gitignore | 2 + tools/testing/selftests/proc/Makefile | 2 + tools/testing/selftests/proc/proc-uptime-001.c | 45 +++++++++++++++ tools/testing/selftests/proc/proc-uptime-002.c | 79 ++++++++++++++++++++++++++ tools/testing/selftests/proc/proc-uptime.h | 74 ++++++++++++++++++++++++ 5 files changed, 202 insertions(+) commit 4f1134370a29a5f2d0f4b4be4c5e2fddd38f0f9d Author: Alexey Dobriyan Date: Tue Apr 10 16:32:20 2018 -0700 proc: use slower rb_first() In a typical for /proc "open+read+close" usecase, dentry is looked up successfully on open only to be killed in dput() on close. In fact dentries which aren't /proc/*/... and /proc/sys/* were almost NEVER CACHED. Simple printk in proc_lookup_de() shows that. Now that ->delete hook intelligently picks which dentries should live in dcache and which should not, rbtree caching is not necessary as dcache does it job, at last! As a side effect, struct proc_dir_entry shrinks by one pointer which can go into inline name. Link: http://lkml.kernel.org/r/20180314231032.GA15854@avx2 Signed-off-by: Alexey Dobriyan Acked-by: Davidlohr Bueso Cc: Peter Zijlstra Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/generic.c | 26 ++++++++++++-------------- fs/proc/internal.h | 6 +++--- fs/proc/proc_net.c | 2 +- fs/proc/root.c | 2 +- 4 files changed, 17 insertions(+), 19 deletions(-) commit 05c3f29283af9e3da0ab7414f666cb37f530950a Author: Alexey Dobriyan Date: Tue Apr 10 16:46:19 2018 -0700 proc: selftests: shotgun testing of read/readdir/readlink/write Perform reads with nearly everything in /proc, and some writing as well. Hopefully memleak checkers and KASAN will find something. [adobriyan@gmail.com: /proc/kmsg can and will block if read under root] Link: http://lkml.kernel.org/r/20180316232147.GA20146@avx2 Signed-off-by: Alexey Dobriyan [adobriyan@gmail.com: /proc/sysrq-trigger lives on the ground floor] Link: http://lkml.kernel.org/r/20180317164911.GA3445@avx2 Link: http://lkml.kernel.org/r/20180315201251.GA12396@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/proc/.gitignore | 1 + tools/testing/selftests/proc/Makefile | 1 + tools/testing/selftests/proc/read.c | 147 ++++++++++++++++++++++++++++++++ 3 files changed, 149 insertions(+) commit 9cdd83e3100651af41631fb66838adcd24032f2a Author: Alexey Dobriyan Date: Tue Apr 10 16:32:14 2018 -0700 proc: switch struct proc_dir_entry::count to refcount ->count is honest reference count unlike ->in_use. Link: http://lkml.kernel.org/r/20180313174550.GA4332@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/generic.c | 4 ++-- fs/proc/internal.h | 5 +++-- fs/proc/root.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) commit b77d70db659ad3aa662c80cff4475e773a531fbe Author: Alexey Dobriyan Date: Tue Apr 10 16:32:11 2018 -0700 proc: reject "." and ".." as filenames Various subsystems can create files and directories in /proc with names directly controlled by userspace. Which means "/", "." and ".." are no-no. "/" split is already taken care of, do the other 2 prohibited names. Link: http://lkml.kernel.org/r/20180310001223.GB12443@avx2 Signed-off-by: Alexey Dobriyan Acked-by: Florian Westphal Cc: Eric Dumazet Cc: Cong Wang Cc: Pavel Machek Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/generic.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5de3d401b79486b9323e1be30e3a34c2437b8800 Author: Alexey Dobriyan Date: Tue Apr 10 16:42:23 2018 -0700 proc: add selftest for last field of /proc/loadavg Test fork counter formerly known as ->last_pid, the only part of /proc/loadavg which can be tested. Testing in init pid namespace is not reliable because of background activity. Link: http://lkml.kernel.org/r/20180311152241.GA26247@avx2 Signed-off-by: Alexey Dobriyan Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/proc/.gitignore | 1 + tools/testing/selftests/proc/Makefile | 1 + tools/testing/selftests/proc/proc-loadavg-001.c | 83 +++++++++++++++++++++++++ 3 files changed, 85 insertions(+) commit fe079a5e102cc59b6c2b66a41e39c624ce284519 Author: Alexey Dobriyan Date: Tue Apr 10 16:32:05 2018 -0700 proc: do mmput ASAP for /proc/*/map_files mm_struct is not needed while printing as all the data was already extracted. Link: http://lkml.kernel.org/r/20180309223120.GC3843@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58c501aab3e54b99eac632a2f5ab5f53e0c27948 Author: Alexey Dobriyan Date: Tue Apr 10 16:32:01 2018 -0700 proc: faster /proc/cmdline Use seq_puts() and skip format string processing. Link: http://lkml.kernel.org/r/20180309222948.GB3843@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/cmdline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1539d584e488538451526da039fa554fdeea1177 Author: Alexey Dobriyan Date: Tue Apr 10 16:31:57 2018 -0700 proc: register filesystem last As soon as register_filesystem() exits, filesystem can be mounted. It is better to present fully operational /proc. Of course it doesn't matter because /proc is not modular but do it anyway. Drop error check, it should be handled by panicking. Link: http://lkml.kernel.org/r/20180309222709.GA3843@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/root.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 35318db566e18ee3ada7e2d62192e5e87b1b5e4b Author: Alexey Dobriyan Date: Tue Apr 10 16:41:14 2018 -0700 proc: fix /proc/*/map_files lookup some more I totally forgot that _parse_integer() accepts arbitrary amount of leading zeroes leading to the following lookups: OK # readlink /proc/1/map_files/56427ecba000-56427eddc000 /lib/systemd/systemd bogus # readlink /proc/1/map_files/00000000000056427ecba000-56427eddc000 /lib/systemd/systemd # readlink /proc/1/map_files/56427ecba000-00000000000056427eddc000 /lib/systemd/systemd Link: http://lkml.kernel.org/r/20180303215130.GA23480@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Cyrill Gorcunov Reviewed-by: Andrew Morton Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 4 + tools/testing/selftests/proc/.gitignore | 4 +- tools/testing/selftests/proc/Makefile | 2 + .../selftests/proc/proc-self-map-files-001.c | 82 +++++++++++++++++++++ .../selftests/proc/proc-self-map-files-002.c | 85 ++++++++++++++++++++++ 5 files changed, 176 insertions(+), 1 deletion(-) commit b4884f23331ae31e9ecb617956986c3b76ab9a91 Author: Alexey Dobriyan Date: Tue Apr 10 16:31:52 2018 -0700 proc: move "struct proc_dir_entry" into kmem cache "struct proc_dir_entry" is variable sized because of 0-length trailing array for name, however, because of SLAB padding allocations it is possible to make "struct proc_dir_entry" fixed sized and allocate same amount of memory. It buys fine-grained debugging with poisoning and usercopy protection which is not possible with kmalloc-* caches. Currently, on 32-bit 91+ byte allocations go into kmalloc-128 and on 64-bit 147+ byte allocations go to kmalloc-192 anyway. Additional memory is allocated only for 38/46+ byte long names which are rare or may not even exist in the wild. Link: http://lkml.kernel.org/r/20180223205504.GA17139@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/generic.c | 50 ++++++++++++++++++++++++++++++++------------------ fs/proc/inode.c | 4 ++++ fs/proc/internal.h | 11 ++++++++++- fs/proc/proc_net.c | 7 ++++--- fs/proc/root.c | 3 ++- 5 files changed, 52 insertions(+), 23 deletions(-) commit c4219edf1de2af44fd98903f72f6e1ceb7f3c701 Author: Alexey Dobriyan Date: Tue Apr 10 16:31:48 2018 -0700 proc: test /proc/self/syscall Read from /proc/self/syscall should yield read system call and correct args in the output as current is reading /proc/self/syscall. Link: http://lkml.kernel.org/r/20180226212145.GB742@avx2 Signed-off-by: Alexey Dobriyan Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/proc/.gitignore | 3 +- tools/testing/selftests/proc/Makefile | 1 + tools/testing/selftests/proc/proc-self-syscall.c | 45 ++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) commit 9cd65655585523adecd65b750e1537cdea84718e Author: Alexey Dobriyan Date: Tue Apr 10 16:31:45 2018 -0700 proc: test /proc/self/wchan This patch starts testing /proc. Many more tests to come (I promise). Read from /proc/self/wchan should always return "0" as current is in TASK_RUNNING state while reading /proc/self/wchan. Link: http://lkml.kernel.org/r/20180226212006.GA742@avx2 Signed-off-by: Alexey Dobriyan Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/Makefile | 1 + tools/testing/selftests/proc/.gitignore | 1 + tools/testing/selftests/proc/Makefile | 6 ++++++ tools/testing/selftests/proc/config | 1 + tools/testing/selftests/proc/proc-self-wchan.c | 25 +++++++++++++++++++++++++ 5 files changed, 34 insertions(+) commit 835b94e05c92e6e8df48112770e624cee192a057 Author: Danilo Krummrich Date: Tue Apr 10 16:31:41 2018 -0700 fs/proc/proc_sysctl.c: remove redundant link check in proc_sys_link_fill_cache() proc_sys_link_fill_cache() does not need to check whether we're called for a link - it's already done by scan(). Link: http://lkml.kernel.org/r/20180228013506.4915-2-danilokrummrich@dk-develop.de Signed-off-by: Danilo Krummrich Acked-by: Kees Cook Reviewed-by: Andrew Morton Cc: Alexey Dobriyan Cc: "Eric W. Biederman" Cc: "Luis R . Rodriguez" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/proc_sysctl.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit a0b0d1c345d0317efe594df268feb5ccc99f651e Author: Danilo Krummrich Date: Tue Apr 10 16:31:38 2018 -0700 fs/proc/proc_sysctl.c: fix potential page fault while unregistering sysctl table proc_sys_link_fill_cache() does not take currently unregistering sysctl tables into account, which might result into a page fault in sysctl_follow_link() - add a check to fix it. This bug has been present since v3.4. Link: http://lkml.kernel.org/r/20180228013506.4915-1-danilokrummrich@dk-develop.de Fixes: 0e47c99d7fe25 ("sysctl: Replace root_list with links between sysctl_table_sets") Signed-off-by: Danilo Krummrich Acked-by: Kees Cook Reviewed-by: Andrew Morton Cc: "Luis R . Rodriguez" Cc: "Eric W. Biederman" Cc: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/proc_sysctl.c | 3 +++ 1 file changed, 3 insertions(+) commit 21dae0ad07e6c4d3fa1bd9a91a8b51be316a5111 Author: Alexey Dobriyan Date: Tue Apr 10 16:31:34 2018 -0700 proc: use set_puts() at /proc/*/wchan Link: http://lkml.kernel.org/r/20180217072011.GB16074@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Cc: Andy Shevchenko Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24b2ec21192c963c17a1b687b6171e95e8b59c06 Author: Alexey Dobriyan Date: Tue Apr 10 16:31:30 2018 -0700 proc: check permissions earlier for /proc/*/wchan get_wchan() accesses stack page before permissions are checked, let's not play this game. Link: http://lkml.kernel.org/r/20180217071923.GA16074@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Cc: Andy Shevchenko Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit d0f02231222b313d1b49278cd2e3c7e7406fea6d Author: Andrei Vagin Date: Tue Apr 10 16:31:26 2018 -0700 proc: replace seq_printf by seq_put_smth to speed up /proc/pid/status seq_printf() works slower than seq_puts, seq_puts, etc. == test_proc.c int main(int argc, char **argv) { int n, i, fd; char buf[16384]; n = atoi(argv[1]); for (i = 0; i < n; i++) { fd = open(argv[2], O_RDONLY); if (fd < 0) return 1; if (read(fd, buf, sizeof(buf)) <= 0) return 1; close(fd); } return 0; } == $ time ./test_proc 1000000 /proc/1/status == Before path == real 0m5.171s user 0m0.328s sys 0m4.783s == After patch == real 0m4.761s user 0m0.334s sys 0m4.366s Link: http://lkml.kernel.org/r/20180212074931.7227-4-avagin@openvz.org Signed-off-by: Andrei Vagin Cc: Alexey Dobriyan Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/array.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 48dffbf82d2f17bc6dd3c2b7fd733738ea567914 Author: Andrei Vagin Date: Tue Apr 10 16:31:23 2018 -0700 proc: optimize single-symbol delimiters to spead up seq_put_decimal_ull A delimiter is a string which is printed before a number. A syngle-symbol delimiters can be printed by set_putc() and this works faster than printing by set_puts(). == test_proc.c int main(int argc, char **argv) { int n, i, fd; char buf[16384]; n = atoi(argv[1]); for (i = 0; i < n; i++) { fd = open(argv[2], O_RDONLY); if (fd < 0) return 1; if (read(fd, buf, sizeof(buf)) <= 0) return 1; close(fd); } return 0; } == $ time ./test_proc 1000000 /proc/1/stat == Before patch == real 0m3.820s user 0m0.337s sys 0m3.394s == After patch == real 0m3.110s user 0m0.324s sys 0m2.700s Link: http://lkml.kernel.org/r/20180212074931.7227-3-avagin@openvz.org Signed-off-by: Andrei Vagin Cc: Alexey Dobriyan Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/seq_file.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit f66406638fffe874c56e7e41106167c5235f251e Author: Andrei Vagin Date: Tue Apr 10 16:31:19 2018 -0700 proc: replace seq_printf on seq_putc to speed up /proc/pid/smaps seq_putc() works much faster than seq_printf() == Before patch == $ time python test_smaps.py real 0m3.828s user 0m0.413s sys 0m3.408s == After patch == $ time python test_smaps.py real 0m3.405s user 0m0.401s sys 0m3.003s == Before patch == - 75.51% 4.62% python [kernel.kallsyms] [k] show_smap.isra.33 - 70.88% show_smap.isra.33 + 24.82% seq_put_decimal_ull_aligned + 19.78% __walk_page_range + 12.74% seq_printf + 11.08% show_map_vma.isra.23 + 1.68% seq_puts == After patch == - 69.16% 5.70% python [kernel.kallsyms] [k] show_smap.isra.33 - 63.46% show_smap.isra.33 + 25.98% seq_put_decimal_ull_aligned + 20.90% __walk_page_range + 12.60% show_map_vma.isra.23 1.56% seq_putc + 1.55% seq_puts Link: http://lkml.kernel.org/r/20180212074931.7227-2-avagin@openvz.org Signed-off-by: Andrei Vagin Reviewed-by: Alexey Dobriyan Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d1be35cb6f96975d792a1535d3fe9b75239065ee Author: Andrei Vagin Date: Tue Apr 10 16:31:16 2018 -0700 proc: add seq_put_decimal_ull_width to speed up /proc/pid/smaps seq_put_decimal_ull_w(m, str, val, width) prints a decimal number with a specified minimal field width. It is equivalent of seq_printf(m, "%s%*d", str, width, val), but it works much faster. == test_smaps.py num = 0 with open("/proc/1/smaps") as f: for x in xrange(10000): data = f.read() f.seek(0, 0) == == Before patch == $ time python test_smaps.py real 0m4.593s user 0m0.398s sys 0m4.158s == After patch == $ time python test_smaps.py real 0m3.828s user 0m0.413s sys 0m3.408s $ perf -g record python test_smaps.py == Before patch == - 79.01% 3.36% python [kernel.kallsyms] [k] show_smap.isra.33 - 75.65% show_smap.isra.33 + 48.85% seq_printf + 15.75% __walk_page_range + 9.70% show_map_vma.isra.23 0.61% seq_puts == After patch == - 75.51% 4.62% python [kernel.kallsyms] [k] show_smap.isra.33 - 70.88% show_smap.isra.33 + 24.82% seq_put_decimal_ull_w + 19.78% __walk_page_range + 12.74% seq_printf + 11.08% show_map_vma.isra.23 + 1.68% seq_puts [akpm@linux-foundation.org: fix drivers/of/unittest.c build] Link: http://lkml.kernel.org/r/20180212074931.7227-1-avagin@openvz.org Signed-off-by: Andrei Vagin Cc: Alexey Dobriyan Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/of/unittest.c | 2 +- fs/proc/meminfo.c | 15 +----- fs/proc/task_mmu.c | 127 +++++++++++++++++++---------------------------- fs/seq_file.c | 28 ++++++++--- include/linux/kernel.h | 3 +- include/linux/seq_file.h | 2 + lib/vsprintf.c | 18 +++++-- 7 files changed, 93 insertions(+), 102 deletions(-) commit 2acddbe8168967adebf4623923242c9a4f9e1aee Author: Alexey Dobriyan Date: Tue Apr 10 16:31:12 2018 -0700 proc: account "struct pde_opener" The allocation is persistent in fact as any fool can open a file in /proc and sit on it. Link: http://lkml.kernel.org/r/20180214082409.GC17157@avx2 Signed-off-by: Alexey Dobriyan Cc: Al Viro Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 195b8cf0689554db764f459730c81f741887aa5f Author: Alexey Dobriyan Date: Tue Apr 10 16:31:09 2018 -0700 proc: move "struct pde_opener" to kmem cache "struct pde_opener" is fixed size and we can have more granular approach to debugging. For those who don't know, per cache SLUB poisoning and red zoning don't work if there is at least one object allocated which is hopeless in case of kmalloc-64 but not in case of standalone cache. Although systemd opens 2 files from the get go, so it is hopeless after all. Link: http://lkml.kernel.org/r/20180214082306.GB17157@avx2 Signed-off-by: Alexey Dobriyan Cc: Al Viro Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/inode.c | 12 ++++++++---- fs/proc/internal.h | 2 +- fs/proc/root.c | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) commit a9fabc3df4c68e05f023c6a5189f0104e200beca Author: Alexey Dobriyan Date: Tue Apr 10 16:31:05 2018 -0700 proc: randomize "struct pde_opener" The more the merrier. Link: http://lkml.kernel.org/r/20180214081935.GA17157@avx2 Signed-off-by: Alexey Dobriyan Cc: Al Viro Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7a6e291e30a00061c356bbcba0d9380943a1671 Author: Alexey Dobriyan Date: Tue Apr 10 16:31:01 2018 -0700 proc: faster open/close of files without ->release hook The whole point of code in fs/proc/inode.c is to make sure ->release hook is called either at close() or at rmmod time. All if it is unnecessary if there is no ->release hook. Save allocation+list manipulations under spinlock in that case. Link: http://lkml.kernel.org/r/20180214063033.GA15579@avx2 Signed-off-by: Alexey Dobriyan Cc: Al Viro Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/inode.c | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) commit e74a0effffbbea75fe2b6770948f84fcb0917cdd Author: Alexey Dobriyan Date: Tue Apr 10 16:30:58 2018 -0700 proc: move /proc/sysvipc creation to where it belongs Move the proc_mkdir() call within the sysvipc subsystem such that we avoid polluting proc_root_init() with petty cpp. [dave@stgolabs.net: contributed changelog] Link: http://lkml.kernel.org/r/20180216161732.GA10297@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Acked-by: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/root.c | 4 ---- ipc/util.c | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) commit 2f8974243507d9e5b0f214d7668a59a66b93f36c Author: Alexey Dobriyan Date: Tue Apr 10 16:30:54 2018 -0700 proc: do less stuff under ->pde_unload_lock Commit ca469f35a8e9ef ("deal with races between remove_proc_entry() and proc_reg_release()") moved too much stuff under ->pde_unload_lock making a problem described at series "[PATCH v5] procfs: Improve Scaling in proc" worse. While RCU is being figured out, move kfree() out of ->pde_unload_lock. On my potato, difference is only 0.5% speedup with concurrent open+read+close of /proc/cmdline, but the effect should be more noticeable on more capable machines. $ perf stat -r 16 -- ./proc-j 16 Performance counter stats for './proc-j 16' (16 runs): 130569.502377 task-clock (msec) # 15.872 CPUs utilized ( +- 0.05% ) 19,169 context-switches # 0.147 K/sec ( +- 0.18% ) 15 cpu-migrations # 0.000 K/sec ( +- 3.27% ) 437 page-faults # 0.003 K/sec ( +- 1.25% ) 300,172,097,675 cycles # 2.299 GHz ( +- 0.05% ) 96,793,267,308 instructions # 0.32 insn per cycle ( +- 0.04% ) 22,798,342,298 branches # 174.607 M/sec ( +- 0.04% ) 111,764,687 branch-misses # 0.49% of all branches ( +- 0.47% ) 8.226574400 seconds time elapsed ( +- 0.05% ) ^^^^^^^^^^^ $ perf stat -r 16 -- ./proc-j 16 Performance counter stats for './proc-j 16' (16 runs): 129866.777392 task-clock (msec) # 15.869 CPUs utilized ( +- 0.04% ) 19,154 context-switches # 0.147 K/sec ( +- 0.66% ) 14 cpu-migrations # 0.000 K/sec ( +- 1.73% ) 431 page-faults # 0.003 K/sec ( +- 1.09% ) 298,556,520,546 cycles # 2.299 GHz ( +- 0.04% ) 96,525,366,833 instructions # 0.32 insn per cycle ( +- 0.04% ) 22,730,194,043 branches # 175.027 M/sec ( +- 0.04% ) 111,506,074 branch-misses # 0.49% of all branches ( +- 0.18% ) 8.183629778 seconds time elapsed ( +- 0.04% ) ^^^^^^^^^^^ Link: http://lkml.kernel.org/r/20180213132911.GA24298@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/inode.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 68c3411ff4a4cee53cc854c11ed191eaaf1956ba Author: Mateusz Guzik Date: Tue Apr 10 16:30:51 2018 -0700 proc: get rid of task lock/unlock pair to read umask for the "status" file get_task_umask locks/unlocks the task on its own. The only caller does the same thing immediately after. Utilize the fact the task has to be locked anyway and just do it once. Since there are no other users and the code is short, fold it in. Link: http://lkml.kernel.org/r/1517995608-23683-1-git-send-email-mguzik@redhat.com Signed-off-by: Mateusz Guzik Reviewed-by: Alexey Dobriyan Cc: Konstantin Khlebnikov Cc: Jerome Marchand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/array.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit 8cfa67b4d9a9d9a6061f3cfd0e0ed16e66e45984 Author: Andrei Vagin Date: Tue Apr 10 16:30:47 2018 -0700 procfs: optimize seq_pad() to speed up /proc/pid/maps seq_printf() is slow and it can be replaced by memset() in this case. == test.py num = 0 with open("/proc/1/maps") as f: while num < 10000 : data = f.read() f.seek(0, 0) num = num + 1 == == Before patch == $ time python test.py real 0m0.986s user 0m0.279s sys 0m0.707s == After patch == $ time python test.py real 0m0.932s user 0m0.261s sys 0m0.669s $ perf record -g python test.py == Before patch == - 47.35% 3.38% python [kernel.kallsyms] [k] show_map_vma.isra.23 - 43.97% show_map_vma.isra.23 + 20.84% seq_path - 15.73% show_vma_header_prefix + 6.96% seq_pad + 2.94% __GI___libc_read == After patch == - 44.01% 0.34% python [kernel.kallsyms] [k] show_pid_map - 43.67% show_pid_map - 42.91% show_map_vma.isra.23 + 21.55% seq_path - 15.68% show_vma_header_prefix + 2.08% seq_pad 0.55% seq_putc Link: http://lkml.kernel.org/r/20180112185812.7710-2-avagin@openvz.org Signed-off-by: Andrei Vagin Cc: Alexey Dobriyan Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/seq_file.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 0e3dc019143104a6e676287b1e453cccd7add404 Author: Andrei Vagin Date: Tue Apr 10 16:30:44 2018 -0700 procfs: add seq_put_hex_ll to speed up /proc/pid/maps seq_put_hex_ll() prints a number in hexadecimal notation and works faster than seq_printf(). == test.py num = 0 with open("/proc/1/maps") as f: while num < 10000 : data = f.read() f.seek(0, 0) num = num + 1 == == Before patch == $ time python test.py real 0m1.561s user 0m0.257s sys 0m1.302s == After patch == $ time python test.py real 0m0.986s user 0m0.279s sys 0m0.707s $ perf -g record python test.py: == Before patch == - 67.42% 2.82% python [kernel.kallsyms] [k] show_map_vma.isra.22 - 64.60% show_map_vma.isra.22 - 44.98% seq_printf - seq_vprintf - vsnprintf + 14.85% number + 12.22% format_decode 5.56% memcpy_erms + 15.06% seq_path + 4.42% seq_pad + 2.45% __GI___libc_read == After patch == - 47.35% 3.38% python [kernel.kallsyms] [k] show_map_vma.isra.23 - 43.97% show_map_vma.isra.23 + 20.84% seq_path - 15.73% show_vma_header_prefix 10.55% seq_put_hex_ll + 2.65% seq_put_decimal_ull 0.95% seq_putc + 6.96% seq_pad + 2.94% __GI___libc_read [avagin@openvz.org: use unsigned int instead of int where it is suitable] Link: http://lkml.kernel.org/r/20180214025619.4005-1-avagin@openvz.org [avagin@openvz.org: v2] Link: http://lkml.kernel.org/r/20180117082050.25406-1-avagin@openvz.org Link: http://lkml.kernel.org/r/20180112185812.7710-1-avagin@openvz.org Signed-off-by: Andrei Vagin Cc: Alexey Dobriyan Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 21 ++++++++++++--------- fs/seq_file.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/seq_file.h | 3 +++ 3 files changed, 61 insertions(+), 9 deletions(-) commit 69ca372c100fba99c78ef826a1795aa86e4f01a8 Author: Andrey Konovalov Date: Tue Apr 10 16:30:39 2018 -0700 kasan: prevent compiler from optimizing away memset in tests A compiler can optimize away memset calls by replacing them with mov instructions. There are KASAN tests that specifically test that KASAN correctly handles memset calls so we don't want this optimization to happen. The solution is to add -fno-builtin flag to test_kasan.ko Link: http://lkml.kernel.org/r/105ec9a308b2abedb1a0d1fdced0c22d765e4732.1519924383.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Geert Uytterhoeven Cc: Nick Terrell Cc: Chris Mason Cc: Yury Norov Cc: Al Viro Cc: "Luis R . Rodriguez" Cc: Palmer Dabbelt Cc: "Paul E . McKenney" Cc: Jeff Layton Cc: "Jason A . Donenfeld" Cc: Kostya Serebryany Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Makefile | 1 + 1 file changed, 1 insertion(+) commit 91c93ed07f04f5b32a30321d522d8ca9504745bf Author: Andrey Konovalov Date: Tue Apr 10 16:30:35 2018 -0700 kasan: fix invalid-free test crashing the kernel When an invalid-free is triggered by one of the KASAN tests, the object doesn't actually get freed. This later leads to a BUG failure in kmem_cache_destroy that checks that there are no allocated objects in the cache that is being destroyed. Fix this by calling kmem_cache_free with the proper object address after the call that triggers invalid-free. Link: http://lkml.kernel.org/r/286eaefc0a6c3fa9b83b87e7d6dc0fbb5b5c9926.1519924383.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Geert Uytterhoeven Cc: Nick Terrell Cc: Chris Mason Cc: Yury Norov Cc: Al Viro Cc: "Luis R . Rodriguez" Cc: Palmer Dabbelt Cc: "Paul E . McKenney" Cc: Jeff Layton Cc: "Jason A . Donenfeld" Cc: Kostya Serebryany Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_kasan.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c3895391df385c6628638f014c87e16f5e2efd45 Author: Andrey Konovalov Date: Tue Apr 10 16:30:31 2018 -0700 kasan, slub: fix handling of kasan_slab_free hook The kasan_slab_free hook's return value denotes whether the reuse of a slab object must be delayed (e.g. when the object is put into memory qurantine). The current way SLUB handles this hook is by ignoring its return value and hardcoding checks similar (but not exactly the same) to the ones performed in kasan_slab_free, which is prone to making mistakes. The main difference between the hardcoded checks and the ones in kasan_slab_free is whether we want to perform a free in case when an invalid-free or a double-free was detected (we don't). This patch changes the way SLUB handles this by: 1. taking into account the return value of kasan_slab_free for each of the objects, that are being freed; 2. reconstructing the freelist of objects to exclude the ones, whose reuse must be delayed. [andreyknvl@google.com: eliminate unnecessary branch in slab_free] Link: http://lkml.kernel.org/r/a62759a2545fddf69b0c034547212ca1eb1b3ce2.1520359686.git.andreyknvl@google.com Link: http://lkml.kernel.org/r/083f58501e54731203801d899632d76175868e97.1519400992.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Andrey Ryabinin Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Kostya Serebryany Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 57 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 23 deletions(-) commit b7d349c741293b694c552593dbd7d38ea7eb7143 Author: Joonsoo Kim Date: Tue Apr 10 16:30:27 2018 -0700 mm/thp: don't count ZONE_MOVABLE as the target for freepage reserving There was a regression report for "mm/cma: manage the memory of the CMA area by using the ZONE_MOVABLE" [1] and I think that it is related to this problem. CMA patchset makes the system use one more zone (ZONE_MOVABLE) and then increases min_free_kbytes. It reduces usable memory and it could cause regression. ZONE_MOVABLE only has movable pages so we don't need to keep enough freepages to avoid or deal with fragmentation. So, don't count it. This changes min_free_kbytes and thus min_watermark greatly if ZONE_MOVABLE is used. It will make the user uses more memory. System: 22GB ram, fakenuma, 2 nodes. 5 zones are used. Before: min_free_kbytes: 112640 zone_info (min_watermark): Node 0, zone DMA min 19 Node 0, zone DMA32 min 3778 Node 0, zone Normal min 10191 Node 0, zone Movable min 0 Node 0, zone Device min 0 Node 1, zone DMA min 0 Node 1, zone DMA32 min 0 Node 1, zone Normal min 14043 Node 1, zone Movable min 127 Node 1, zone Device min 0 After: min_free_kbytes: 90112 zone_info (min_watermark): Node 0, zone DMA min 15 Node 0, zone DMA32 min 3022 Node 0, zone Normal min 8152 Node 0, zone Movable min 0 Node 0, zone Device min 0 Node 1, zone DMA min 0 Node 1, zone DMA32 min 0 Node 1, zone Normal min 11234 Node 1, zone Movable min 102 Node 1, zone Device min 0 [1] (lkml.kernel.org/r/20180102063528.GG30397%20()%20yexl-desktop) Link: http://lkml.kernel.org/r/1522913236-15776-1-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Joonsoo Kim Cc: Michal Hocko Cc: "Kirill A . Shutemov" Cc: Mel Gorman Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/khugepaged.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 3d2054ad8c2d5100b68b0c0405f89fd90bf4107b Author: Joonsoo Kim Date: Tue Apr 10 16:30:23 2018 -0700 ARM: CMA: avoid double mapping to the CMA area if CONFIG_HIGHMEM=y CMA area is now managed by the separate zone, ZONE_MOVABLE, to fix many MM related problems. In this implementation, if CONFIG_HIGHMEM = y, then ZONE_MOVABLE is considered as HIGHMEM and the memory of the CMA area is also considered as HIGHMEM. That means that they are considered as the page without direct mapping. However, CMA area could be in a lowmem and the memory could have direct mapping. In ARM, when establishing a new mapping for DMA, direct mapping should be cleared since two mapping with different cache policy could cause unknown problem. With this patch, PageHighmem() for the CMA memory located in lowmem returns true so that the function for DMA mapping cannot notice whether it needs to clear direct mapping or not, correctly. To handle this situation, this patch always clears direct mapping for such CMA memory. Link: http://lkml.kernel.org/r/1512114786-5085-4-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Joonsoo Kim Tested-by: Tony Lindgren Cc: "Aneesh Kumar K . V" Cc: Johannes Weiner Cc: Laura Abbott Cc: Marek Szyprowski Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Nazarewicz Cc: Minchan Kim Cc: Rik van Riel Cc: Russell King Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/mm/dma-mapping.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 1d47a3ec09b5489cd915e8f492aa623cdab5d002 Author: Joonsoo Kim Date: Tue Apr 10 16:30:19 2018 -0700 mm/cma: remove ALLOC_CMA Now, all reserved pages for CMA region are belong to the ZONE_MOVABLE and it only serves for a request with GFP_HIGHMEM && GFP_MOVABLE. Therefore, we don't need to maintain ALLOC_CMA at all. Link: http://lkml.kernel.org/r/1512114786-5085-3-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Joonsoo Kim Reviewed-by: Aneesh Kumar K.V Tested-by: Tony Lindgren Acked-by: Vlastimil Babka Cc: Johannes Weiner Cc: Laura Abbott Cc: Marek Szyprowski Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Nazarewicz Cc: Minchan Kim Cc: Rik van Riel Cc: Russell King Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 4 +--- mm/internal.h | 1 - mm/page_alloc.c | 28 +++------------------------- 3 files changed, 4 insertions(+), 29 deletions(-) commit bad8c6c0b1144694ecb0bc5629ede9b8b578b86e Author: Joonsoo Kim Date: Tue Apr 10 16:30:15 2018 -0700 mm/cma: manage the memory of the CMA area by using the ZONE_MOVABLE Patch series "mm/cma: manage the memory of the CMA area by using the ZONE_MOVABLE", v2. 0. History This patchset is the follow-up of the discussion about the "Introduce ZONE_CMA (v7)" [1]. Please reference it if more information is needed. 1. What does this patch do? This patch changes the management way for the memory of the CMA area in the MM subsystem. Currently the memory of the CMA area is managed by the zone where their pfn is belong to. However, this approach has some problems since MM subsystem doesn't have enough logic to handle the situation that different characteristic memories are in a single zone. To solve this issue, this patch try to manage all the memory of the CMA area by using the MOVABLE zone. In MM subsystem's point of view, characteristic of the memory on the MOVABLE zone and the memory of the CMA area are the same. So, managing the memory of the CMA area by using the MOVABLE zone will not have any problem. 2. Motivation There are some problems with current approach. See following. Although these problem would not be inherent and it could be fixed without this conception change, it requires many hooks addition in various code path and it would be intrusive to core MM and would be really error-prone. Therefore, I try to solve them with this new approach. Anyway, following is the problems of the current implementation. o CMA memory utilization First, following is the freepage calculation logic in MM. - For movable allocation: freepage = total freepage - For unmovable allocation: freepage = total freepage - CMA freepage Freepages on the CMA area is used after the normal freepages in the zone where the memory of the CMA area is belong to are exhausted. At that moment that the number of the normal freepages is zero, so - For movable allocation: freepage = total freepage = CMA freepage - For unmovable allocation: freepage = 0 If unmovable allocation comes at this moment, allocation request would fail to pass the watermark check and reclaim is started. After reclaim, there would exist the normal freepages so freepages on the CMA areas would not be used. FYI, there is another attempt [2] trying to solve this problem in lkml. And, as far as I know, Qualcomm also has out-of-tree solution for this problem. Useless reclaim: There is no logic to distinguish CMA pages in the reclaim path. Hence, CMA page is reclaimed even if the system just needs the page that can be usable for the kernel allocation. Atomic allocation failure: This is also related to the fallback allocation policy for the memory of the CMA area. Consider the situation that the number of the normal freepages is *zero* since the bunch of the movable allocation requests come. Kswapd would not be woken up due to following freepage calculation logic. - For movable allocation: freepage = total freepage = CMA freepage If atomic unmovable allocation request comes at this moment, it would fails due to following logic. - For unmovable allocation: freepage = total freepage - CMA freepage = 0 It was reported by Aneesh [3]. Useless compaction: Usual high-order allocation request is unmovable allocation request and it cannot be served from the memory of the CMA area. In compaction, migration scanner try to migrate the page in the CMA area and make high-order page there. As mentioned above, it cannot be usable for the unmovable allocation request so it's just waste. 3. Current approach and new approach Current approach is that the memory of the CMA area is managed by the zone where their pfn is belong to. However, these memory should be distinguishable since they have a strong limitation. So, they are marked as MIGRATE_CMA in pageblock flag and handled specially. However, as mentioned in section 2, the MM subsystem doesn't have enough logic to deal with this special pageblock so many problems raised. New approach is that the memory of the CMA area is managed by the MOVABLE zone. MM already have enough logic to deal with special zone like as HIGHMEM and MOVABLE zone. So, managing the memory of the CMA area by the MOVABLE zone just naturally work well because constraints for the memory of the CMA area that the memory should always be migratable is the same with the constraint for the MOVABLE zone. There is one side-effect for the usability of the memory of the CMA area. The use of MOVABLE zone is only allowed for a request with GFP_HIGHMEM && GFP_MOVABLE so now the memory of the CMA area is also only allowed for this gfp flag. Before this patchset, a request with GFP_MOVABLE can use them. IMO, It would not be a big issue since most of GFP_MOVABLE request also has GFP_HIGHMEM flag. For example, file cache page and anonymous page. However, file cache page for blockdev file is an exception. Request for it has no GFP_HIGHMEM flag. There is pros and cons on this exception. In my experience, blockdev file cache pages are one of the top reason that causes cma_alloc() to fail temporarily. So, we can get more guarantee of cma_alloc() success by discarding this case. Note that there is no change in admin POV since this patchset is just for internal implementation change in MM subsystem. Just one minor difference for admin is that the memory stat for CMA area will be printed in the MOVABLE zone. That's all. 4. Result Following is the experimental result related to utilization problem. 8 CPUs, 1024 MB, VIRTUAL MACHINE make -j16 CMA area: 0 MB 512 MB Elapsed-time: 92.4 186.5 pswpin: 82 18647 pswpout: 160 69839 CMA : 0 MB 512 MB Elapsed-time: 93.1 93.4 pswpin: 84 46 pswpout: 183 92 akpm: "kernel test robot" reported a 26% improvement in vm-scalability.throughput: http://lkml.kernel.org/r/20180330012721.GA3845@yexl-desktop [1]: lkml.kernel.org/r/1491880640-9944-1-git-send-email-iamjoonsoo.kim@lge.com [2]: https://lkml.org/lkml/2014/10/15/623 [3]: http://www.spinics.net/lists/linux-mm/msg100562.html Link: http://lkml.kernel.org/r/1512114786-5085-2-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Joonsoo Kim Reviewed-by: Aneesh Kumar K.V Tested-by: Tony Lindgren Acked-by: Vlastimil Babka Cc: Johannes Weiner Cc: Laura Abbott Cc: Marek Szyprowski Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Nazarewicz Cc: Minchan Kim Cc: Rik van Riel Cc: Russell King Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memory_hotplug.h | 3 -- include/linux/mm.h | 1 + mm/cma.c | 83 ++++++++++++++++++++++++++++++++++++------ mm/internal.h | 3 ++ mm/page_alloc.c | 55 +++++++++++++++++++++++++--- 5 files changed, 126 insertions(+), 19 deletions(-) commit d3cda2337bbc9edd2a26b83cb00eaa8c048ff274 Author: Joonsoo Kim Date: Tue Apr 10 16:30:11 2018 -0700 mm/page_alloc: don't reserve ZONE_HIGHMEM for ZONE_MOVABLE request Freepage on ZONE_HIGHMEM doesn't work for kernel memory so it's not that important to reserve. When ZONE_MOVABLE is used, this problem would theorectically cause to decrease usable memory for GFP_HIGHUSER_MOVABLE allocation request which is mainly used for page cache and anon page allocation. So, fix it by setting 0 to sysctl_lowmem_reserve_ratio[ZONE_HIGHMEM]. And, defining sysctl_lowmem_reserve_ratio array by MAX_NR_ZONES - 1 size makes code complex. For example, if there is highmem system, following reserve ratio is activated for *NORMAL ZONE* which would be easyily misleading people. #ifdef CONFIG_HIGHMEM 32 #endif This patch also fixes this situation by defining sysctl_lowmem_reserve_ratio array by MAX_NR_ZONES and place "#ifdef" to right place. Link: http://lkml.kernel.org/r/1504672525-17915-1-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Joonsoo Kim Reviewed-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Tested-by: Tony Lindgren Cc: Michal Hocko Cc: Vlastimil Babka Cc: Mel Gorman Cc: Johannes Weiner Cc: "Aneesh Kumar K . V" Cc: Minchan Kim Cc: Rik van Riel Cc: Laura Abbott Cc: Marek Szyprowski Cc: Michal Nazarewicz Cc: Russell King Cc: Will Deacon Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/sysctl/vm.txt | 5 ++--- include/linux/mmzone.h | 2 +- mm/page_alloc.c | 25 ++++++++++++++----------- 3 files changed, 17 insertions(+), 15 deletions(-) commit 94723aafb9e76414fada7c1c198733a86f01ea8f Author: Michal Hocko Date: Tue Apr 10 16:30:07 2018 -0700 mm: unclutter THP migration THP migration is hacked into the generic migration with rather surprising semantic. The migration allocation callback is supposed to check whether the THP can be migrated at once and if that is not the case then it allocates a simple page to migrate. unmap_and_move then fixes that up by spliting the THP into small pages while moving the head page to the newly allocated order-0 page. Remaning pages are moved to the LRU list by split_huge_page. The same happens if the THP allocation fails. This is really ugly and error prone [1]. I also believe that split_huge_page to the LRU lists is inherently wrong because all tail pages are not migrated. Some callers will just work around that by retrying (e.g. memory hotplug). There are other pfn walkers which are simply broken though. e.g. madvise_inject_error will migrate head and then advances next pfn by the huge page size. do_move_page_to_node_array, queue_pages_range (migrate_pages, mbind), will simply split the THP before migration if the THP migration is not supported then falls back to single page migration but it doesn't handle tail pages if the THP migration path is not able to allocate a fresh THP so we end up with ENOMEM and fail the whole migration which is a questionable behavior. Page compaction doesn't try to migrate large pages so it should be immune. This patch tries to unclutter the situation by moving the special THP handling up to the migrate_pages layer where it actually belongs. We simply split the THP page into the existing list if unmap_and_move fails with ENOMEM and retry. So we will _always_ migrate all THP subpages and specific migrate_pages users do not have to deal with this case in a special way. [1] http://lkml.kernel.org/r/20171121021855.50525-1-zi.yan@sent.com Link: http://lkml.kernel.org/r/20180103082555.14592-4-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Kirill A. Shutemov Reviewed-by: Zi Yan Cc: Andrea Reale Cc: Anshuman Khandual Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/migrate.h | 4 ++-- mm/huge_memory.c | 6 ++++++ mm/memory_hotplug.c | 2 +- mm/mempolicy.c | 31 +++---------------------------- mm/migrate.c | 34 ++++++++++++++++++++++++---------- 5 files changed, 36 insertions(+), 41 deletions(-) commit 666feb21a0083e5b29ddd96588553ffa0cc357b6 Author: Michal Hocko Date: Tue Apr 10 16:30:03 2018 -0700 mm, migrate: remove reason argument from new_page_t No allocation callback is using this argument anymore. new_page_node used to use this parameter to convey node_id resp. migration error up to move_pages code (do_move_page_to_node_array). The error status never made it into the final status field and we have a better way to communicate node id to the status field now. All other allocation callbacks simply ignored the argument so we can drop it finally. [mhocko@suse.com: fix migration callback] Link: http://lkml.kernel.org/r/20180105085259.GH2801@dhcp22.suse.cz [akpm@linux-foundation.org: fix alloc_misplaced_dst_page()] [mhocko@kernel.org: fix build] Link: http://lkml.kernel.org/r/20180103091134.GB11319@dhcp22.suse.cz Link: http://lkml.kernel.org/r/20180103082555.14592-3-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Zi Yan Cc: Andrea Reale Cc: Anshuman Khandual Cc: Kirill A. Shutemov Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/mm/mmu_context_iommu.c | 3 +-- include/linux/migrate.h | 3 +-- include/linux/page-isolation.h | 3 +-- mm/compaction.c | 3 +-- mm/internal.h | 2 +- mm/memory-failure.c | 2 +- mm/memory_hotplug.c | 3 +-- mm/mempolicy.c | 6 +++--- mm/migrate.c | 21 +++------------------ mm/page_isolation.c | 3 +-- 10 files changed, 14 insertions(+), 35 deletions(-) commit a49bd4d7163707de377aee062f17befef6da891b Author: Michal Hocko Date: Tue Apr 10 16:29:59 2018 -0700 mm, numa: rework do_pages_move Patch series "unclutter thp migration" Motivation: THP migration is hacked into the generic migration with rather surprising semantic. The migration allocation callback is supposed to check whether the THP can be migrated at once and if that is not the case then it allocates a simple page to migrate. unmap_and_move then fixes that up by splitting the THP into small pages while moving the head page to the newly allocated order-0 page. Remaining pages are moved to the LRU list by split_huge_page. The same happens if the THP allocation fails. This is really ugly and error prone [2]. I also believe that split_huge_page to the LRU lists is inherently wrong because all tail pages are not migrated. Some callers will just work around that by retrying (e.g. memory hotplug). There are other pfn walkers which are simply broken though. e.g. madvise_inject_error will migrate head and then advances next pfn by the huge page size. do_move_page_to_node_array, queue_pages_range (migrate_pages, mbind), will simply split the THP before migration if the THP migration is not supported then falls back to single page migration but it doesn't handle tail pages if the THP migration path is not able to allocate a fresh THP so we end up with ENOMEM and fail the whole migration which is a questionable behavior. Page compaction doesn't try to migrate large pages so it should be immune. The first patch reworks do_pages_move which relies on a very ugly calling semantic when the return status is pushed to the migration path via private pointer. It uses pre allocated fixed size batching to achieve that. We simply cannot do the same if a THP is to be split during the migration path which is done in the patch 3. Patch 2 is follow up cleanup which removes the mentioned return status calling convention ugliness. On a side note: There are some semantic issues I have encountered on the way when working on patch 1 but I am not addressing them here. E.g. trying to move THP tail pages will result in either success or EBUSY (the later one more likely once we isolate head from the LRU list). Hugetlb reports EACCESS on tail pages. Some errors are reported via status parameter but migration failures are not even though the original `reason' argument suggests there was an intention to do so. From a quick look into git history this never worked. I have tried to keep the semantic unchanged. Then there is a relatively minor thing that the page isolation might fail because of pages not being on the LRU - e.g. because they are sitting on the per-cpu LRU caches. Easily fixable. This patch (of 3): do_pages_move is supposed to move user defined memory (an array of addresses) to the user defined numa nodes (an array of nodes one for each address). The user provided status array then contains resulting numa node for each address or an error. The semantic of this function is little bit confusing because only some errors are reported back. Notably migrate_pages error is only reported via the return value. This patch doesn't try to address these semantic nuances but rather change the underlying implementation. Currently we are processing user input (which can be really large) in batches which are stored to a temporarily allocated page. Each address is resolved to its struct page and stored to page_to_node structure along with the requested target numa node. The array of these structures is then conveyed down the page migration path via private argument. new_page_node then finds the corresponding structure and allocates the proper target page. What is the problem with the current implementation and why to change it? Apart from being quite ugly it also doesn't cope with unexpected pages showing up on the migration list inside migrate_pages path. That doesn't happen currently but the follow up patch would like to make the thp migration code more clear and that would need to split a THP into the list for some cases. How does the new implementation work? Well, instead of batching into a fixed size array we simply batch all pages that should be migrated to the same node and isolate all of them into a linked list which doesn't require any additional storage. This should work reasonably well because page migration usually migrates larger ranges of memory to a specific node. So the common case should work equally well as the current implementation. Even if somebody constructs an input where the target numa nodes would be interleaved we shouldn't see a large performance impact because page migration alone doesn't really benefit from batching. mmap_sem batching for the lookup is quite questionable and isolate_lru_page which would benefit from batching is not using it even in the current implementation. Link: http://lkml.kernel.org/r/20180103082555.14592-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Kirill A. Shutemov Reviewed-by: Andrew Morton Cc: Anshuman Khandual Cc: Zi Yan Cc: Naoya Horiguchi Cc: Vlastimil Babka Cc: Andrea Reale Cc: Kirill A. Shutemov Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/internal.h | 1 + mm/mempolicy.c | 5 +- mm/migrate.c | 308 +++++++++++++++++++++++++-------------------------------- 3 files changed, 139 insertions(+), 175 deletions(-) commit bfc6b1cabce28d46d2559855ca224992e14fede7 Author: Colin Ian King Date: Tue Apr 10 16:29:55 2018 -0700 mm/swapfile.c: make pointer swap_avail_heads static The pointer swap_avail_heads is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: mm/swapfile.c:88:19: warning: symbol 'swap_avail_heads' was not declared. Should it be static? Link: http://lkml.kernel.org/r/20180206215836.12366-1-colin.king@canonical.com Signed-off-by: Colin Ian King Reviewed-by: Andrew Morton Acked-by: "Huang, Ying" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4eaf431f6f71bbed40a4c733ffe93a7e8cedf9d9 Author: Michal Hocko Date: Tue Apr 10 16:29:52 2018 -0700 memcg: fix per_node_info cleanup syzbot has triggered a NULL ptr dereference when allocation fault injection enforces a failure and alloc_mem_cgroup_per_node_info initializes memcg->nodeinfo only half way through. But __mem_cgroup_free still tries to free all per-node data and dereferences pn->lruvec_stat_cpu unconditioanlly even if the specific per-node data hasn't been initialized. The bug is quite unlikely to hit because small allocations do not fail and we would need quite some numa nodes to make struct mem_cgroup_per_node large enough to cross the costly order. Link: http://lkml.kernel.org/r/20180406100906.17790-1-mhocko@kernel.org Reported-by: syzbot+8a5de3cce7cdc70e9ebe@syzkaller.appspotmail.com Fixes: 00f3ca2c2d66 ("mm: memcontrol: per-lruvec stats infrastructure") Signed-off-by: Michal Hocko Reviewed-by: Andrey Ryabinin Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 3 +++ 1 file changed, 3 insertions(+) commit a06ad633a37c64a0cd4c229fc605cee8725d376e Author: Tom Abraham Date: Tue Apr 10 16:29:48 2018 -0700 swap: divide-by-zero when zero length swap file on ssd Calling swapon() on a zero length swap file on SSD can lead to a divide-by-zero. Although creating such files isn't possible with mkswap and they woud be considered invalid, it would be better for the swapon code to be more robust and handle this condition gracefully (return -EINVAL). Especially since the fix is small and straightforward. To help with wear leveling on SSD, the swapon syscall calculates a random position in the swap file using modulo p->highest_bit, which is set to maxpages - 1 in read_swap_header. If the swap file is zero length, read_swap_header sets maxpages=1 and last_page=0, resulting in p->highest_bit=0 and we divide-by-zero when we modulo p->highest_bit in swapon syscall. This can be prevented by having read_swap_header return zero if last_page is zero. Link: http://lkml.kernel.org/r/5AC747C1020000A7001FA82C@prv-mh.provo.novell.com Signed-off-by: Thomas Abraham Reported-by: Reviewed-by: Andrew Morton Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 4 ++++ 1 file changed, 4 insertions(+) commit e27be240df53f1a20c659168e722b5d9f16cc7f4 Author: Johannes Weiner Date: Tue Apr 10 16:29:45 2018 -0700 mm: memcg: make sure memory.events is uptodate when waking pollers Commit a983b5ebee57 ("mm: memcontrol: fix excessive complexity in memory.stat reporting") added per-cpu drift to all memory cgroup stats and events shown in memory.stat and memory.events. For memory.stat this is acceptable. But memory.events issues file notifications, and somebody polling the file for changes will be confused when the counters in it are unchanged after a wakeup. Luckily, the events in memory.events - MEMCG_LOW, MEMCG_HIGH, MEMCG_MAX, MEMCG_OOM - are sufficiently rare and high-level that we don't need per-cpu buffering for them: MEMCG_HIGH and MEMCG_MAX would be the most frequent, but they're counting invocations of reclaim, which is a complex operation that touches many shared cachelines. This splits memory.events from the generic VM events and tracks them in their own, unbuffered atomic counters. That's also cleaner, as it eliminates the ugly enum nesting of VM and cgroup events. [hannes@cmpxchg.org: "array subscript is above array bounds"] Link: http://lkml.kernel.org/r/20180406155441.GA20806@cmpxchg.org Link: http://lkml.kernel.org/r/20180405175507.GA24817@cmpxchg.org Fixes: a983b5ebee57 ("mm: memcontrol: fix excessive complexity in memory.stat reporting") Signed-off-by: Johannes Weiner Reported-by: Tejun Heo Acked-by: Tejun Heo Acked-by: Michal Hocko Cc: Vladimir Davydov Cc: Roman Gushchin Cc: Rik van Riel Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 35 ++++++++++++++++++----------------- mm/memcontrol.c | 28 ++++++++++++++++------------ mm/vmscan.c | 2 +- 3 files changed, 35 insertions(+), 30 deletions(-) commit a38c015f3156895b07e71d4e4414289f8a3b2745 Author: Claudio Imbrenda Date: Tue Apr 10 16:29:41 2018 -0700 mm/ksm.c: fix inconsistent accounting of zero pages When using KSM with use_zero_pages, we replace anonymous pages containing only zeroes with actual zero pages, which are not anonymous. We need to do proper accounting of the mm counters, otherwise we will get wrong values in /proc and a BUG message in dmesg when tearing down the mm. Link: http://lkml.kernel.org/r/1522931274-15552-1-git-send-email-imbrenda@linux.vnet.ibm.com Fixes: e86c59b1b1 ("mm/ksm: improve deduplication of zero pages with colouring") Signed-off-by: Claudio Imbrenda Reviewed-by: Andrew Morton Cc: Andrea Arcangeli Cc: Minchan Kim Cc: Kirill A. Shutemov Cc: Hugh Dickins Cc: Christian Borntraeger Cc: Gerald Schaefer Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8a97ea546bb6532f77a0efe165012ee0d0c4b903 Author: Matthew Wilcox Date: Tue Apr 10 16:29:37 2018 -0700 mm/z3fold.c: use gfpflags_allow_blocking We have a perfectly good macro to determine whether the gfp flags allow you to sleep or not; use it instead of trying to infer it. Link: http://lkml.kernel.org/r/20180408062206.GC16007@bombadil.infradead.org Signed-off-by: Matthew Wilcox Reviewed-by: Andrew Morton Cc: Vitaly Wool Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ec6995d1290bfb87cc3a51f0836c889e857cef9 Author: Xidong Wang Date: Tue Apr 10 16:29:34 2018 -0700 z3fold: fix memory leak In z3fold_create_pool(), the memory allocated by __alloc_percpu() is not released on the error path that pool->compact_wq , which holds the return value of create_singlethread_workqueue(), is NULL. This will result in a memory leak bug. [akpm@linux-foundation.org: fix oops on kzalloc() failure, check __alloc_percpu() retval] Link: http://lkml.kernel.org/r/1522803111-29209-1-git-send-email-wangxidong_97@163.com Signed-off-by: Xidong Wang Reviewed-by: Andrew Morton Cc: Vitaly Wool Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 2a70f6a76bb86d1f39a34b7764f6dcc4257b0356 Author: Michal Hocko Date: Tue Apr 10 16:29:30 2018 -0700 memcg, thp: do not invoke oom killer on thp charges A THP memcg charge can trigger the oom killer since 2516035499b9 ("mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations"). We have used an explicit __GFP_NORETRY previously which ruled the OOM killer automagically. Memcg charge path should be semantically compliant with the allocation path and that means that if we do not trigger the OOM killer for costly orders which should do the same in the memcg charge path as well. Otherwise we are forcing callers to distinguish the two and use different gfp masks which is both non-intuitive and bug prone. As soon as we get a costly high order kmalloc user we even do not have any means to tell the memcg specific gfp mask to prevent from OOM because the charging is deep within guts of the slab allocator. The unexpected memcg OOM on THP has already been fixed upstream by 9d3c3354bb85 ("mm, thp: do not cause memcg oom for thp") but this is a one-off fix rather than a generic solution. Teach mem_cgroup_oom to bail out on costly order requests to fix the THP issue as well as any other costly OOM eligible allocations to be added in future. Also revert 9d3c3354bb85 because special gfp for THP is no longer needed. Link: http://lkml.kernel.org/r/20180403193129.22146-1-mhocko@kernel.org Fixes: 2516035499b9 ("mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations") Signed-off-by: Michal Hocko Acked-by: Johannes Weiner Cc: "Kirill A. Shutemov" Cc: Vlastimil Babka Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 5 ++--- mm/khugepaged.c | 8 ++------ mm/memcontrol.c | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) commit 07707125aec6a7529900616ba491210ec3d85fc6 Author: Ralph Campbell Date: Tue Apr 10 16:29:27 2018 -0700 mm/migrate: properly preserve write attribute in special migrate entry Use of pte_write(pte) is only valid for present pte, the common code which set the migration entry can be reach for both valid present pte and special swap entry (for device memory). Fix the code to use the mpfn value which properly handle both cases. On x86 this did not have any bad side effect because pte write bit is below PAGE_BIT_GLOBAL and thus special swap entry have it set to 0 which in turn means we were always creating read only special migration entry. So once migration did finish we always write protected the CPU page table entry (moreover this is only an issue when migrating from device memory to system memory). End effect is that CPU write access would fault again and restore write permission. This behaviour isn't too bad; it just burns CPU cycles by forcing CPU to take a second fault on write access. ie, double faulting the same address. There is no corruption or incorrect states (it behaves as a COWed page from a fork with a mapcount of 1). Link: http://lkml.kernel.org/r/20180402023506.12180-1-jglisse@redhat.com Signed-off-by: Ralph Campbell Signed-off-by: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bc8755ba66325cb5874eef81d935e91c331d0b1d Author: Wei Yang Date: Tue Apr 10 16:29:23 2018 -0700 mm: check __highest_present_section_nr directly in memory_dev_init() __highest_present_section_nr is a more strict boundary than NR_MEM_SECTIONS. So checking __highest_present_section_nr directly is enough. Link: http://lkml.kernel.org/r/20180330032044.21647-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: Andrew Morton Cc: Dave Hansen Cc: Michal Hocko Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 09a913a7a947fb6f624379e9da22670994942b85 Author: Mel Gorman Date: Tue Apr 10 16:29:20 2018 -0700 sched/numa: avoid trapping faults and attempting migration of file-backed dirty pages change_pte_range is called from task work context to mark PTEs for receiving NUMA faulting hints. If the marked pages are dirty then migration may fail. Some filesystems cannot migrate dirty pages without blocking so are skipped in MIGRATE_ASYNC mode which just wastes CPU. Even when they can, it can be a waste of cycles when the pages are shared forcing higher scan rates. This patch avoids marking shared dirty pages for hinting faults but also will skip a migration if the page was dirtied after the scanner updated a clean page. This is most noticeable running the NASA Parallel Benchmark when backed by btrfs, the default root filesystem for some distributions, but also noticeable when using XFS. The following are results from a 4-socket machine running a 4.16-rc4 kernel with some scheduler patches that are pending for the next merge window. 4.16.0-rc4 4.16.0-rc4 schedtip-20180309 nodirty-v1 Time cg.D 459.07 ( 0.00%) 444.21 ( 3.24%) Time ep.D 76.96 ( 0.00%) 77.69 ( -0.95%) Time is.D 25.55 ( 0.00%) 27.85 ( -9.00%) Time lu.D 601.58 ( 0.00%) 596.87 ( 0.78%) Time mg.D 107.73 ( 0.00%) 108.22 ( -0.45%) is.D regresses slightly in terms of absolute time but note that that particular load varies quite a bit from run to run. The more relevant observation is the total system CPU usage. 4.16.0-rc4 4.16.0-rc4 schedtip-20180309 nodirty-v1 User 71471.91 70627.04 System 11078.96 8256.13 Elapsed 661.66 632.74 That is a substantial drop in system CPU usage and overall the workload completes faster. The NUMA balancing statistics are also interesting NUMA base PTE updates 111407972 139848884 NUMA huge PMD updates 206506 264869 NUMA page range updates 217139044 275461812 NUMA hint faults 4300924 3719784 NUMA hint local faults 3012539 3416618 NUMA hint local percent 70 91 NUMA pages migrated 1517487 1358420 While more PTEs are scanned due to changes in what faults are gathered, it's clear that a far higher percentage of faults are local as the bulk of the remote hits were dirty pages that, in this case with btrfs, had no chance of migrating. The following is a comparison when using XFS as that is a more realistic filesystem choice for a data partition 4.16.0-rc4 4.16.0-rc4 schedtip-20180309 nodirty-v1r47 Time cg.D 485.28 ( 0.00%) 442.62 ( 8.79%) Time ep.D 77.68 ( 0.00%) 77.54 ( 0.18%) Time is.D 26.44 ( 0.00%) 24.79 ( 6.24%) Time lu.D 597.46 ( 0.00%) 597.11 ( 0.06%) Time mg.D 142.65 ( 0.00%) 105.83 ( 25.81%) That is a reasonable gain on two relatively long-lived workloads. While not presented, there is also a substantial drop in system CPu usage and the NUMA balancing stats show similar improvements in locality as btrfs did. Link: http://lkml.kernel.org/r/20180326094334.zserdec62gwmmfqf@techsingularity.net Signed-off-by: Mel Gorman Reviewed-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 7 +++++++ mm/mprotect.c | 9 +++++++++ 2 files changed, 16 insertions(+) commit e8eddfd2d9cc00a65147353afed8398651a54736 Author: Jérôme Glisse Date: Tue Apr 10 16:29:16 2018 -0700 Documentation/vm/hmm.txt: typos and syntaxes fixes This fix typos and syntaxes, thanks to Randy Dunlap for pointing them out (they were all my faults). Link: http://lkml.kernel.org/r/20180409151859.4713-1-jglisse@redhat.com Signed-off-by: Jérôme Glisse Reviewed-by: Ralph Campbell Reviewed-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/hmm.txt | 108 +++++++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 54 deletions(-) commit 9d8a463a7016e9e5578a561588a18acef139919c Author: Arnd Bergmann Date: Tue Apr 10 16:29:13 2018 -0700 mm/hmm: fix header file if/else/endif maze, again The last fix was still wrong, as we need the inline dummy functions also for the case that CONFIG_HMM is enabled but CONFIG_HMM_MIRROR is not: kernel/fork.o: In function `__mmdrop': fork.c:(.text+0x14f6): undefined reference to `hmm_mm_destroy' This adds back the second copy of the dummy functions, hopefully this time in the right place. Link: http://lkml.kernel.org/r/20180404110236.804484-1-arnd@arndb.de Fixes: 8900d06a277a ("mm/hmm: fix header file if/else/endif maze") Signed-off-by: Arnd Bergmann Reviewed-by: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 18be460eeb2cd3f4bfb6498b10ce5b800f9a20ea Author: Tejun Heo Date: Tue Apr 10 16:29:09 2018 -0700 mm/hmm.c: remove superfluous RCU protection around radix tree lookup hmm_devmem_find() requires rcu_read_lock_held() but there's nothing which actually uses the RCU protection. The only caller is hmm_devmem_pages_create() which already grabs the mutex and does superfluous rcu_read_lock/unlock() around the function. This doesn't add anything and just adds to confusion. Remove the RCU protection and open-code the radix tree lookup. If this needs to become more sophisticated in the future, let's add them back when necessary. Link: http://lkml.kernel.org/r/20180314194515.1661824-4-tj@kernel.org Signed-off-by: Tejun Heo Reviewed-by: Jérôme Glisse Cc: Paul E. McKenney Cc: Benjamin LaHaise Cc: Al Viro Cc: Kent Overstreet Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hmm.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit f88a1e90c665408732ab16ea48e1a182dce597a2 Author: Jérôme Glisse Date: Tue Apr 10 16:29:06 2018 -0700 mm/hmm: use device driver encoding for HMM pfn Users of hmm_vma_fault() and hmm_vma_get_pfns() provide a flags array and pfn shift value allowing them to define their own encoding for HMM pfn that are fill inside the pfns array of the hmm_range struct. With this device driver can get pfn that match their own private encoding out of HMM without having to do any conversion. [rcampbell@nvidia.com: don't ignore specific pte fault flag in hmm_vma_fault()] Link: http://lkml.kernel.org/r/20180326213009.2460-2-jglisse@redhat.com [rcampbell@nvidia.com: clarify fault logic for device private memory] Link: http://lkml.kernel.org/r/20180326213009.2460-3-jglisse@redhat.com Link: http://lkml.kernel.org/r/20180323005527.758-16-jglisse@redhat.com Signed-off-by: Jérôme Glisse Signed-off-by: Ralph Campbell Cc: Evgeny Baskakov Cc: Ralph Campbell Cc: Mark Hairgrove Cc: John Hubbard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 130 +++++++++++++++++++++++++++++++++++++--------------- mm/hmm.c | 99 ++++++++++++++++++++++----------------- 2 files changed, 152 insertions(+), 77 deletions(-) commit 2aee09d8c1164219971c7b396f2235bd5334018c Author: Jérôme Glisse Date: Tue Apr 10 16:29:02 2018 -0700 mm/hmm: change hmm_vma_fault() to allow write fault on page basis This changes hmm_vma_fault() to not take a global write fault flag for a range but instead rely on caller to populate HMM pfns array with proper fault flag ie HMM_PFN_VALID if driver want read fault for that address or HMM_PFN_VALID and HMM_PFN_WRITE for write. Moreover by setting HMM_PFN_DEVICE_PRIVATE the device driver can ask for device private memory to be migrated back to system memory through page fault. This is more flexible API and it better reflects how device handles and reports fault. Link: http://lkml.kernel.org/r/20180323005527.758-15-jglisse@redhat.com Signed-off-by: Jérôme Glisse Cc: Evgeny Baskakov Cc: Ralph Campbell Cc: Mark Hairgrove Cc: John Hubbard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 2 +- mm/hmm.c | 151 ++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 119 insertions(+), 34 deletions(-) commit 53f5c3f489ecddc7570a2e2422a6fc5b25007b9d Author: Jérôme Glisse Date: Tue Apr 10 16:28:59 2018 -0700 mm/hmm: factor out pte and pmd handling to simplify hmm_vma_walk_pmd() No functional change, just create one function to handle pmd and one to handle pte (hmm_vma_handle_pmd() and hmm_vma_handle_pte()). Link: http://lkml.kernel.org/r/20180323005527.758-14-jglisse@redhat.com Signed-off-by: Jérôme Glisse Reviewed-by: John Hubbard Cc: Evgeny Baskakov Cc: Ralph Campbell Cc: Mark Hairgrove Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hmm.c | 174 +++++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 102 insertions(+), 72 deletions(-) commit 33cd47dcbba068850eb73f00cc41090ba26c1e9b Author: Jérôme Glisse Date: Tue Apr 10 16:28:54 2018 -0700 mm/hmm: move hmm_pfns_clear() closer to where it is used Move hmm_pfns_clear() closer to where it is used to make it clear it is not use by page table walkers. Link: http://lkml.kernel.org/r/20180323005527.758-13-jglisse@redhat.com Signed-off-by: Jérôme Glisse Reviewed-by: John Hubbard Cc: Evgeny Baskakov Cc: Ralph Campbell Cc: Mark Hairgrove Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hmm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b2744118a65efee90aea95f7cd31bf74eb8009f8 Author: Jérôme Glisse Date: Tue Apr 10 16:28:49 2018 -0700 mm/hmm: rename HMM_PFN_DEVICE_UNADDRESSABLE to HMM_PFN_DEVICE_PRIVATE Make naming consistent across code, DEVICE_PRIVATE is the name use outside HMM code so use that one. Link: http://lkml.kernel.org/r/20180323005527.758-12-jglisse@redhat.com Signed-off-by: Jérôme Glisse Reviewed-by: John Hubbard Cc: Evgeny Baskakov Cc: Ralph Campbell Cc: Mark Hairgrove Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 4 ++-- mm/hmm.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 5504ed29692faad06ea74c4275e96a8ffc83a1e1 Author: Jérôme Glisse Date: Tue Apr 10 16:28:46 2018 -0700 mm/hmm: do not differentiate between empty entry or missing directory There is no point in differentiating between a range for which there is not even a directory (and thus entries) and empty entry (pte_none() or pmd_none() returns true). Simply drop the distinction ie remove HMM_PFN_EMPTY flag and merge now duplicate hmm_vma_walk_hole() and hmm_vma_walk_clear() functions. Link: http://lkml.kernel.org/r/20180323005527.758-11-jglisse@redhat.com Signed-off-by: Jérôme Glisse Reviewed-by: John Hubbard Cc: Evgeny Baskakov Cc: Ralph Campbell Cc: Mark Hairgrove Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 8 +++----- mm/hmm.c | 45 +++++++++++++++------------------------------ 2 files changed, 18 insertions(+), 35 deletions(-) commit 855ce7d2525c97cf706ad82a419f0c2d632b9481 Author: Jérôme Glisse Date: Tue Apr 10 16:28:42 2018 -0700 mm/hmm: cleanup special vma handling (VM_SPECIAL) Special vma (one with any of the VM_SPECIAL flags) can not be access by device because there is no consistent model across device drivers on those vma and their backing memory. This patch directly use hmm_range struct for hmm_pfns_special() argument as it is always affecting the whole vma and thus the whole range. It also make behavior consistent after this patch both hmm_vma_fault() and hmm_vma_get_pfns() returns -EINVAL when facing such vma. Previously hmm_vma_fault() returned 0 and hmm_vma_get_pfns() return -EINVAL but both were filling the HMM pfn array with special entry. Link: http://lkml.kernel.org/r/20180323005527.758-10-jglisse@redhat.com Signed-off-by: Jérôme Glisse Reviewed-by: John Hubbard Cc: Evgeny Baskakov Cc: Ralph Campbell Cc: Mark Hairgrove Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hmm.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit ff05c0c6bbe5043af6a1686522ed845f40ba49ee Author: Jérôme Glisse Date: Tue Apr 10 16:28:38 2018 -0700 mm/hmm: use uint64_t for HMM pfn instead of defining hmm_pfn_t to ulong All device driver we care about are using 64bits page table entry. In order to match this and to avoid useless define convert all HMM pfn to directly use uint64_t. It is a first step on the road to allow driver to directly use pfn value return by HMM (saving memory and CPU cycles use for conversion between the two). Link: http://lkml.kernel.org/r/20180323005527.758-9-jglisse@redhat.com Signed-off-by: Jérôme Glisse Reviewed-by: John Hubbard Cc: Evgeny Baskakov Cc: Ralph Campbell Cc: Mark Hairgrove Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 46 +++++++++++++++++++++------------------------- mm/hmm.c | 26 +++++++++++++------------- 2 files changed, 34 insertions(+), 38 deletions(-) commit 86586a41b8fe655e28be418a40e9bb2bb478cdd5 Author: Jérôme Glisse Date: Tue Apr 10 16:28:34 2018 -0700 mm/hmm: remove HMM_PFN_READ flag and ignore peculiar architecture Only peculiar architecture allow write without read thus assume that any valid pfn do allow for read. Note we do not care for write only because it does make sense with thing like atomic compare and exchange or any other operations that allow you to get the memory value through them. Link: http://lkml.kernel.org/r/20180323005527.758-8-jglisse@redhat.com Signed-off-by: Jérôme Glisse Reviewed-by: John Hubbard Cc: Evgeny Baskakov Cc: Ralph Campbell Cc: Mark Hairgrove Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 16 +++++++--------- mm/hmm.c | 44 ++++++++++++++++++++++++++++++++++---------- 2 files changed, 41 insertions(+), 19 deletions(-) commit 08232a4544cc6befaabfbec2087bedaf21b0da34 Author: Jérôme Glisse Date: Tue Apr 10 16:28:30 2018 -0700 mm/hmm: use struct for hmm_vma_fault(), hmm_vma_get_pfns() parameters Both hmm_vma_fault() and hmm_vma_get_pfns() were taking a hmm_range struct as parameter and were initializing that struct with others of their parameters. Have caller of those function do this as they are likely to already do and only pass this struct to both function this shorten function signature and make it easier in the future to add new parameters by simply adding them to the structure. Link: http://lkml.kernel.org/r/20180323005527.758-7-jglisse@redhat.com Signed-off-by: Jérôme Glisse Reviewed-by: John Hubbard Cc: Evgeny Baskakov Cc: Ralph Campbell Cc: Mark Hairgrove Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 18 ++++--------- mm/hmm.c | 78 +++++++++++++++++++---------------------------------- 2 files changed, 33 insertions(+), 63 deletions(-) commit c719547f032d4610c7a20900baacae26d0b1ff3e Author: Jérôme Glisse Date: Tue Apr 10 16:28:27 2018 -0700 mm/hmm: hmm_pfns_bad() was accessing wrong struct The private field of mm_walk struct point to an hmm_vma_walk struct and not to the hmm_range struct desired. Fix to get proper struct pointer. Link: http://lkml.kernel.org/r/20180323005527.758-6-jglisse@redhat.com Signed-off-by: Jérôme Glisse Cc: Evgeny Baskakov Cc: Ralph Campbell Cc: Mark Hairgrove Cc: John Hubbard Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hmm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c01cbba2aa8b4d05607d373b02fe9e4eda5c0591 Author: Jérôme Glisse Date: Tue Apr 10 16:28:23 2018 -0700 mm/hmm: unregister mmu_notifier when last HMM client quit This code was lost in translation at one point. This properly call mmu_notifier_unregister_no_release() once last user is gone. This fix the zombie mm_struct as without this patch we do not drop the refcount we have on it. Link: http://lkml.kernel.org/r/20180323005527.758-5-jglisse@redhat.com Signed-off-by: Jérôme Glisse Cc: Evgeny Baskakov Cc: Ralph Campbell Cc: Mark Hairgrove Cc: John Hubbard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hmm.c | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) commit e1401513c6b5efec59678a4d4e9f90957684b7e3 Author: Ralph Campbell Date: Tue Apr 10 16:28:19 2018 -0700 mm/hmm: HMM should have a callback before MM is destroyed hmm_mirror_register() registers a callback for when the CPU pagetable is modified. Normally, the device driver will call hmm_mirror_unregister() when the process using the device is finished. However, if the process exits uncleanly, the struct_mm can be destroyed with no warning to the device driver. Link: http://lkml.kernel.org/r/20180323005527.758-4-jglisse@redhat.com Signed-off-by: Ralph Campbell Signed-off-by: Jérôme Glisse Reviewed-by: John Hubbard Cc: Evgeny Baskakov Cc: Mark Hairgrove Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 10 ++++++++++ mm/hmm.c | 29 ++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) commit b28b08de436a638c82d0cf3dcdbdbad055baf1fc Author: Jérôme Glisse Date: Tue Apr 10 16:28:15 2018 -0700 mm/hmm: fix header file if/else/endif maze The #if/#else/#endif for IS_ENABLED(CONFIG_HMM) were wrong. Because of this after multiple include there was multiple definition of both hmm_mm_init() and hmm_mm_destroy() leading to build failure if HMM was enabled (CONFIG_HMM set). Link: http://lkml.kernel.org/r/20180323005527.758-3-jglisse@redhat.com Signed-off-by: Jérôme Glisse Acked-by: Balbir Singh Cc: Andrew Morton Cc: Ralph Campbell Cc: John Hubbard Cc: Evgeny Baskakov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 76ea470ce45cc45edaea93ffa5c46e5c9278df70 Author: Ralph Campbell Date: Tue Apr 10 16:28:11 2018 -0700 mm/hmm: documentation editorial update to HMM documentation Update the documentation for HMM to fix minor typos and phrasing to be a bit more readable. Link: http://lkml.kernel.org/r/20180323005527.758-2-jglisse@redhat.com Signed-off-by: Ralph Campbell Signed-off-by: Jérôme Glisse Cc: Stephen Bates Cc: Jason Gunthorpe Cc: Logan Gunthorpe Cc: Evgeny Baskakov Cc: Mark Hairgrove Cc: John Hubbard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/hmm.txt | 360 ++++++++++++++++++++++++----------------------- MAINTAINERS | 1 + 2 files changed, 187 insertions(+), 174 deletions(-) commit d51d1e64500fcb48fc6a18c77c965b8f48a175f2 Author: Steven Rostedt Date: Tue Apr 10 16:28:07 2018 -0700 mm, vmscan, tracing: use pointer to reclaim_stat struct in trace event The trace event trace_mm_vmscan_lru_shrink_inactive() currently has 12 parameters! Seven of them are from the reclaim_stat structure. This structure is currently local to mm/vmscan.c. By moving it to the global vmstat.h header, we can also reference it from the vmscan tracepoints. In moving it, it brings down the overhead of passing so many arguments to the trace event. In the future, we may limit the number of arguments that a trace event may pass (ideally just 6, but more realistically it may be 8). Before this patch, the code to call the trace event is this: 0f 83 aa fe ff ff jae ffffffff811e6261 48 8b 45 a0 mov -0x60(%rbp),%rax 45 8b 64 24 20 mov 0x20(%r12),%r12d 44 8b 6d d4 mov -0x2c(%rbp),%r13d 8b 4d d0 mov -0x30(%rbp),%ecx 44 8b 75 cc mov -0x34(%rbp),%r14d 44 8b 7d c8 mov -0x38(%rbp),%r15d 48 89 45 90 mov %rax,-0x70(%rbp) 8b 83 b8 fe ff ff mov -0x148(%rbx),%eax 8b 55 c0 mov -0x40(%rbp),%edx 8b 7d c4 mov -0x3c(%rbp),%edi 8b 75 b8 mov -0x48(%rbp),%esi 89 45 80 mov %eax,-0x80(%rbp) 65 ff 05 e4 f7 e2 7e incl %gs:0x7ee2f7e4(%rip) # 15bd0 <__preempt_count> 48 8b 05 75 5b 13 01 mov 0x1135b75(%rip),%rax # ffffffff8231bf68 <__tracepoint_mm_vmscan_lru_shrink_inactive+0x28> 48 85 c0 test %rax,%rax 74 72 je ffffffff811e646a 48 89 c3 mov %rax,%rbx 4c 8b 10 mov (%rax),%r10 89 f8 mov %edi,%eax 48 89 85 68 ff ff ff mov %rax,-0x98(%rbp) 89 f0 mov %esi,%eax 48 89 85 60 ff ff ff mov %rax,-0xa0(%rbp) 89 c8 mov %ecx,%eax 48 89 85 78 ff ff ff mov %rax,-0x88(%rbp) 89 d0 mov %edx,%eax 48 89 85 70 ff ff ff mov %rax,-0x90(%rbp) 8b 45 8c mov -0x74(%rbp),%eax 48 8b 7b 08 mov 0x8(%rbx),%rdi 48 83 c3 18 add $0x18,%rbx 50 push %rax 41 54 push %r12 41 55 push %r13 ff b5 78 ff ff ff pushq -0x88(%rbp) 41 56 push %r14 41 57 push %r15 ff b5 70 ff ff ff pushq -0x90(%rbp) 4c 8b 8d 68 ff ff ff mov -0x98(%rbp),%r9 4c 8b 85 60 ff ff ff mov -0xa0(%rbp),%r8 48 8b 4d 98 mov -0x68(%rbp),%rcx 48 8b 55 90 mov -0x70(%rbp),%rdx 8b 75 80 mov -0x80(%rbp),%esi 41 ff d2 callq *%r10 After the patch: 0f 83 a8 fe ff ff jae ffffffff811e626d 8b 9b b8 fe ff ff mov -0x148(%rbx),%ebx 45 8b 64 24 20 mov 0x20(%r12),%r12d 4c 8b 6d a0 mov -0x60(%rbp),%r13 65 ff 05 f5 f7 e2 7e incl %gs:0x7ee2f7f5(%rip) # 15bd0 <__preempt_count> 4c 8b 35 86 5b 13 01 mov 0x1135b86(%rip),%r14 # ffffffff8231bf68 <__tracepoint_mm_vmscan_lru_shrink_inactive+0x28> 4d 85 f6 test %r14,%r14 74 2a je ffffffff811e6411 49 8b 06 mov (%r14),%rax 8b 4d 8c mov -0x74(%rbp),%ecx 49 8b 7e 08 mov 0x8(%r14),%rdi 49 83 c6 18 add $0x18,%r14 4c 89 ea mov %r13,%rdx 45 89 e1 mov %r12d,%r9d 4c 8d 45 b8 lea -0x48(%rbp),%r8 89 de mov %ebx,%esi 51 push %rcx 48 8b 4d 98 mov -0x68(%rbp),%rcx ff d0 callq *%rax Link: http://lkml.kernel.org/r/2559d7cb-ec60-1200-2362-04fa34fd02bb@fb.com Link: http://lkml.kernel.org/r/20180322121003.4177af15@gandalf.local.home Signed-off-by: Steven Rostedt (VMware) Reported-by: Alexei Starovoitov Acked-by: David Rientjes Acked-by: Michal Hocko Cc: Mel Gorman Cc: Vlastimil Babka Cc: Andrey Ryabinin Cc: Alexei Starovoitov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/vmstat.h | 11 +++++++++++ include/trace/events/vmscan.h | 24 +++++++++--------------- mm/vmscan.c | 18 +----------------- 3 files changed, 21 insertions(+), 32 deletions(-) commit e3c1ac586c9922180146605bfb4816e3b11148c5 Author: Andrey Ryabinin Date: Tue Apr 10 16:28:03 2018 -0700 mm/vmscan: don't mess with pgdat->flags in memcg reclaim memcg reclaim may alter pgdat->flags based on the state of LRU lists in cgroup and its children. PGDAT_WRITEBACK may force kswapd to sleep congested_wait(), PGDAT_DIRTY may force kswapd to writeback filesystem pages. But the worst here is PGDAT_CONGESTED, since it may force all direct reclaims to stall in wait_iff_congested(). Note that only kswapd have powers to clear any of these bits. This might just never happen if cgroup limits configured that way. So all direct reclaims will stall as long as we have some congested bdi in the system. Leave all pgdat->flags manipulations to kswapd. kswapd scans the whole pgdat, only kswapd can clear pgdat->flags once node is balanced, thus it's reasonable to leave all decisions about node state to kswapd. Why only kswapd? Why not allow to global direct reclaim change these flags? It is because currently only kswapd can clear these flags. I'm less worried about the case when PGDAT_CONGESTED falsely not set, and more worried about the case when it falsely set. If direct reclaimer sets PGDAT_CONGESTED, do we have guarantee that after the congestion problem is sorted out, kswapd will be woken up and clear the flag? It seems like there is no such guarantee. E.g. direct reclaimers may eventually balance pgdat and kswapd simply won't wake up (see wakeup_kswapd()). Moving pgdat->flags manipulation to kswapd, means that cgroup2 recalim now loses its congestion throttling mechanism. Add per-cgroup congestion state and throttle cgroup2 reclaimers if memcg is in congestion state. Currently there is no need in per-cgroup PGDAT_WRITEBACK and PGDAT_DIRTY bits since they alter only kswapd behavior. The problem could be easily demonstrated by creating heavy congestion in one cgroup: echo "+memory" > /sys/fs/cgroup/cgroup.subtree_control mkdir -p /sys/fs/cgroup/congester echo 512M > /sys/fs/cgroup/congester/memory.max echo $$ > /sys/fs/cgroup/congester/cgroup.procs /* generate a lot of diry data on slow HDD */ while true; do dd if=/dev/zero of=/mnt/sdb/zeroes bs=1M count=1024; done & .... while true; do dd if=/dev/zero of=/mnt/sdb/zeroes bs=1M count=1024; done & and some job in another cgroup: mkdir /sys/fs/cgroup/victim echo 128M > /sys/fs/cgroup/victim/memory.max # time cat /dev/sda > /dev/null real 10m15.054s user 0m0.487s sys 1m8.505s According to the tracepoint in wait_iff_congested(), the 'cat' spent 50% of the time sleeping there. With the patch, cat don't waste time anymore: # time cat /dev/sda > /dev/null real 5m32.911s user 0m0.411s sys 0m56.664s [aryabinin@virtuozzo.com: congestion state should be per-node] Link: http://lkml.kernel.org/r/20180406135215.10057-1-aryabinin@virtuozzo.com [ayabinin@virtuozzo.com: make congestion state per-cgroup-per-node instead of just per-cgroup[ Link: http://lkml.kernel.org/r/20180406180254.8970-2-aryabinin@virtuozzo.com Link: http://lkml.kernel.org/r/20180323152029.11084-5-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Mel Gorman Cc: Tejun Heo Cc: Michal Hocko Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/backing-dev.h | 2 +- include/linux/memcontrol.h | 3 ++ mm/backing-dev.c | 19 +++------ mm/vmscan.c | 96 +++++++++++++++++++++++++++++++++------------ 4 files changed, 82 insertions(+), 38 deletions(-) commit d108c7721fbd1f867510b2db12ed18ff3d9fa171 Author: Andrey Ryabinin Date: Tue Apr 10 16:27:59 2018 -0700 mm/vmscan: don't change pgdat state on base of a single LRU list state We have separate LRU list for each memory cgroup. Memory reclaim iterates over cgroups and calls shrink_inactive_list() every inactive LRU list. Based on the state of a single LRU shrink_inactive_list() may flag the whole node as dirty,congested or under writeback. This is obviously wrong and hurtful. It's especially hurtful when we have possibly small congested cgroup in system. Than *all* direct reclaims waste time by sleeping in wait_iff_congested(). And the more memcgs in the system we have the longer memory allocation stall is, because wait_iff_congested() called on each lru-list scan. Sum reclaim stats across all visited LRUs on node and flag node as dirty, congested or under writeback based on that sum. Also call congestion_wait(), wait_iff_congested() once per pgdat scan, instead of once per lru-list scan. This only fixes the problem for global reclaim case. Per-cgroup reclaim may alter global pgdat flags too, which is wrong. But that is separate issue and will be addressed in the next patch. This change will not have any effect on a systems with all workload concentrated in a single cgroup. [aryabinin@virtuozzo.com: check nr_writeback against all nr_taken, not just file] Link: http://lkml.kernel.org/r/20180406180254.8970-1-aryabinin@virtuozzo.com Link: http://lkml.kernel.org/r/20180323152029.11084-4-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Reviewed-by: Shakeel Butt Cc: Mel Gorman Cc: Tejun Heo Cc: Johannes Weiner Cc: Michal Hocko Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 126 ++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 75 insertions(+), 51 deletions(-) commit c4fd4fa58018bab781c17c8d92d70106a37b6a5c Author: Andrey Ryabinin Date: Tue Apr 10 16:27:55 2018 -0700 mm/vmscan: remove redundant current_may_throttle() check Only kswapd can have non-zero nr_immediate, and current_may_throttle() is always true for kswapd (PF_LESS_THROTTLE bit is never set) thus it's enough to check stat.nr_immediate only. Link: http://lkml.kernel.org/r/20180315164553.17856-4-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Acked-by: Michal Hocko Cc: Shakeel Butt Cc: Mel Gorman Cc: Tejun Heo Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 894befec4d70b1c14097e4f009c90114b5a044ba Author: Andrey Ryabinin Date: Tue Apr 10 16:27:51 2018 -0700 mm/vmscan: update stale comments Update some comments that became stale since transiton from per-zone to per-node reclaim. Link: http://lkml.kernel.org/r/20180315164553.17856-2-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Acked-by: Michal Hocko Cc: Shakeel Butt Cc: Mel Gorman Cc: Tejun Heo Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d79f7aa496fc94d763f67b833a1f36f4c171176f Author: Roman Gushchin Date: Tue Apr 10 16:27:47 2018 -0700 mm: treat indirectly reclaimable memory as free in overcommit logic Indirectly reclaimable memory can consume a significant part of total memory and it's actually reclaimable (it will be released under actual memory pressure). So, the overcommit logic should treat it as free. Otherwise, it's possible to cause random system-wide memory allocation failures by consuming a significant amount of memory by indirectly reclaimable memory, e.g. dentry external names. If overcommit policy GUESS is used, it might be used for denial of service attack under some conditions. The following program illustrates the approach. It causes the kernel to allocate an unreclaimable kmalloc-256 chunk for each stat() call, so that at some point the overcommit logic may start blocking large allocation system-wide. int main() { char buf[256]; unsigned long i; struct stat statbuf; buf[0] = '/'; for (i = 1; i < sizeof(buf); i++) buf[i] = '_'; for (i = 0; 1; i++) { sprintf(&buf[248], "%8lu", i); stat(buf, &statbuf); } return 0; } This patch in combination with related indirectly reclaimable memory patches closes this issue. Link: http://lkml.kernel.org/r/20180313130041.8078-1-guro@fb.com Signed-off-by: Roman Gushchin Reviewed-by: Andrew Morton Cc: Alexander Viro Cc: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/util.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f1782c9bc547754f4bd3043fe8cfda53db85f13f Author: Roman Gushchin Date: Tue Apr 10 16:27:44 2018 -0700 dcache: account external names as indirectly reclaimable memory I received a report about suspicious growth of unreclaimable slabs on some machines. I've found that it happens on machines with low memory pressure, and these unreclaimable slabs are external names attached to dentries. External names are allocated using generic kmalloc() function, so they are accounted as unreclaimable. But they are held by dentries, which are reclaimable, and they will be reclaimed under the memory pressure. In particular, this breaks MemAvailable calculation, as it doesn't take unreclaimable slabs into account. This leads to a silly situation, when a machine is almost idle, has no memory pressure and therefore has a big dentry cache. And the resulting MemAvailable is too low to start a new workload. To address the issue, the NR_INDIRECTLY_RECLAIMABLE_BYTES counter is used to track the amount of memory, consumed by external names. The counter is increased in the dentry allocation path, if an external name structure is allocated; and it's decreased in the dentry freeing path. To reproduce the problem I've used the following Python script: import os for iter in range (0, 10000000): try: name = ("/some_long_name_%d" % iter) + "_" * 220 os.stat(name) except Exception: pass Without this patch: $ cat /proc/meminfo | grep MemAvailable MemAvailable: 7811688 kB $ python indirect.py $ cat /proc/meminfo | grep MemAvailable MemAvailable: 2753052 kB With the patch: $ cat /proc/meminfo | grep MemAvailable MemAvailable: 7809516 kB $ python indirect.py $ cat /proc/meminfo | grep MemAvailable MemAvailable: 7749144 kB [guro@fb.com: fix indirectly reclaimable memory accounting for CONFIG_SLOB] Link: http://lkml.kernel.org/r/20180312194140.19517-1-guro@fb.com [guro@fb.com: fix indirectly reclaimable memory accounting] Link: http://lkml.kernel.org/r/20180313125701.7955-1-guro@fb.com Link: http://lkml.kernel.org/r/20180305133743.12746-5-guro@fb.com Signed-off-by: Roman Gushchin Reviewed-by: Andrew Morton Cc: Alexander Viro Cc: Michal Hocko Cc: Johannes Weiner Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dcache.c | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) commit 034ebf65c3c21d85b963d39f992258a64a85e3a9 Author: Roman Gushchin Date: Tue Apr 10 16:27:40 2018 -0700 mm: treat indirectly reclaimable memory as available in MemAvailable Adjust /proc/meminfo MemAvailable calculation by adding the amount of indirectly reclaimable memory (rounded to the PAGE_SIZE). Link: http://lkml.kernel.org/r/20180305133743.12746-4-guro@fb.com Signed-off-by: Roman Gushchin Reviewed-by: Andrew Morton Cc: Alexander Viro Cc: Michal Hocko Cc: Johannes Weiner Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit eb59254608bc1d42c4c6afdcdce9c0d3ce02b318 Author: Roman Gushchin Date: Tue Apr 10 16:27:36 2018 -0700 mm: introduce NR_INDIRECTLY_RECLAIMABLE_BYTES Patch series "indirectly reclaimable memory", v2. This patchset introduces the concept of indirectly reclaimable memory and applies it to fix the issue of when a big number of dentries with external names can significantly affect the MemAvailable value. This patch (of 3): Introduce a concept of indirectly reclaimable memory and adds the corresponding memory counter and /proc/vmstat item. Indirectly reclaimable memory is any sort of memory, used by the kernel (except of reclaimable slabs), which is actually reclaimable, i.e. will be released under memory pressure. The counter is in bytes, as it's not always possible to count such objects in pages. The name contains BYTES by analogy to NR_KERNEL_STACK_KB. Link: http://lkml.kernel.org/r/20180305133743.12746-2-guro@fb.com Signed-off-by: Roman Gushchin Reviewed-by: Andrew Morton Cc: Alexander Viro Cc: Michal Hocko Cc: Johannes Weiner Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 1 + mm/vmstat.c | 1 + 2 files changed, 2 insertions(+) commit 2d097c50212e137e7b53ffe3b37561153eeba87d Author: Jens Axboe Date: Wed Apr 11 11:26:09 2018 -0600 sr: get/drop reference to device in revalidate and check_events We can't just use scsi_cd() to get the scsi_cd structure, we have to grab a live reference to the device. For both callbacks, we're not inside an open where we already hold a reference to the device. This fixes device removal/addition under concurrent device access, which otherwise could result in the below oops. NULL pointer dereference at 0000000000000010 PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP Modules linked in: sr 12:0:0:0: [sr2] scsi-1 drive scsi_debug crc_t10dif crct10dif_generic crct10dif_common nvme nvme_core sb_edac xl sr 12:0:0:0: Attached scsi CD-ROM sr2 sr_mod cdrom btrfs xor zstd_decompress zstd_compress xxhash lzo_compress zlib_defc sr 12:0:0:0: Attached scsi generic sg7 type 5 igb ahci libahci i2c_algo_bit libata dca [last unloaded: crc_t10dif] CPU: 43 PID: 4629 Comm: systemd-udevd Not tainted 4.16.0+ #650 Hardware name: Dell Inc. PowerEdge T630/0NT78X, BIOS 2.3.4 11/09/2016 RIP: 0010:sr_block_revalidate_disk+0x23/0x190 [sr_mod] RSP: 0018:ffff883ff357bb58 EFLAGS: 00010292 RAX: ffffffffa00b07d0 RBX: ffff883ff3058000 RCX: ffff883ff357bb66 RDX: 0000000000000003 RSI: 0000000000007530 RDI: ffff881fea631000 RBP: 0000000000000000 R08: ffff881fe4d38400 R09: 0000000000000000 R10: 0000000000000000 R11: 00000000000001b6 R12: 000000000800005d R13: 000000000800005d R14: ffff883ffd9b3790 R15: 0000000000000000 FS: 00007f7dc8e6d8c0(0000) GS:ffff883fff340000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000010 CR3: 0000003ffda98005 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? __invalidate_device+0x48/0x60 check_disk_change+0x4c/0x60 sr_block_open+0x16/0xd0 [sr_mod] __blkdev_get+0xb9/0x450 ? iget5_locked+0x1c0/0x1e0 blkdev_get+0x11e/0x320 ? bdget+0x11d/0x150 ? _raw_spin_unlock+0xa/0x20 ? bd_acquire+0xc0/0xc0 do_dentry_open+0x1b0/0x320 ? inode_permission+0x24/0xc0 path_openat+0x4e6/0x1420 ? cpumask_any_but+0x1f/0x40 ? flush_tlb_mm_range+0xa0/0x120 do_filp_open+0x8c/0xf0 ? __seccomp_filter+0x28/0x230 ? _raw_spin_unlock+0xa/0x20 ? __handle_mm_fault+0x7d6/0x9b0 ? list_lru_add+0xa8/0xc0 ? _raw_spin_unlock+0xa/0x20 ? __alloc_fd+0xaf/0x160 ? do_sys_open+0x1a6/0x230 do_sys_open+0x1a6/0x230 do_syscall_64+0x5a/0x100 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Reviewed-by: Lee Duncan Reviewed-by: Jan Kara Signed-off-by: Jens Axboe drivers/scsi/sr.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 6a3d1e81a434fc311f224b8be77258bafc18ccc6 Author: Martin Schwidefsky Date: Wed Apr 11 08:35:23 2018 +0200 s390: correct nospec auto detection init order With CONFIG_EXPOLINE_AUTO=y the call of spectre_v2_auto_early() via early_initcall is done *after* the early_param functions. This overwrites any settings done with the nobp/no_spectre_v2/spectre_v2 parameters. The code patching for the kernel is done after the evaluation of the early parameters but before the early_initcall is done. The end result is a kernel image that is patched correctly but the kernel modules are not. Make sure that the nospec auto detection function is called before the early parameters are evaluated and before the code patching is done. Fixes: 6e179d64126b ("s390: add automatic detection of the spectre defense") Signed-off-by: Martin Schwidefsky arch/s390/include/asm/nospec-branch.h | 1 + arch/s390/kernel/nospec-branch.c | 8 ++------ arch/s390/kernel/setup.c | 3 +++ 3 files changed, 6 insertions(+), 6 deletions(-) commit 0b3dec05dbbce023f4f25aba975b5d253c313ebb Author: Steven Rostedt (VMware) Date: Wed Apr 11 10:59:46 2018 -0400 tracing: Enforce passing in filter=NULL to create_filter() There's some inconsistency with what to set the output parameter filterp when passing to create_filter(..., struct event_filter **filterp). Whatever filterp points to, should be NULL when calling this function. The create_filter() calls create_filter_start() with a pointer to a local "filter" variable that is set to NULL. The create_filter_start() has a WARN_ON() if the passed in pointer isn't pointing to a value set to NULL. Ideally, create_filter() should pass the filterp variable it received to create_filter_start() and not hide it as with a local variable, this allowed create_filter() to fail, and not update the passed in filter, and the caller of create_filter() then tried to free filter, which was never initialized to anything, causing memory corruption. Link: http://lkml.kernel.org/r/00000000000032a0c30569916870@google.com Fixes: 80765597bc587 ("tracing: Rewrite filter logic to be simpler and faster") Reported-by: syzbot+dadcc936587643d7f568@syzkaller.appspotmail.com Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_filter.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit a64b2c01e67eff8b8d0d438507fd0346290697cf Author: Ravi Bangoria Date: Thu Mar 15 13:57:56 2018 +0530 trace_uprobe: Simplify probes_seq_show() Simplify probes_seq_show() function. No change in output before and after patch. Link: http://lkml.kernel.org/r/20180315082756.9050-2-ravi.bangoria@linux.vnet.ibm.com Acked-by: Masami Hiramatsu Signed-off-by: Ravi Bangoria Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_uprobe.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) commit 18d45b11d96e6f9b3814960a1394083a3d6b7f74 Author: Ravi Bangoria Date: Thu Mar 15 13:57:55 2018 +0530 trace_uprobe: Use %lx to display offset tu->offset is unsigned long, not a pointer, thus %lx should be used to print it, not the %px. Link: http://lkml.kernel.org/r/20180315082756.9050-1-ravi.bangoria@linux.vnet.ibm.com Cc: stable@vger.kernel.org Acked-by: Masami Hiramatsu Fixes: 0e4d819d0893 ("trace_uprobe: Display correct offset in uprobe_events") Suggested-by: Kees Cook Signed-off-by: Ravi Bangoria Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_uprobe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0a2aa5a2a406d0a57aa9b320ffaa5538672b6c5 Author: Howard McLauchlan Date: Tue Apr 10 16:10:30 2018 -0700 tracing/uprobe: Add support for overlayfs uprobes cannot successfully attach to binaries located in a directory mounted with overlayfs. To verify, create directories for mounting overlayfs (upper,lower,work,merge), move some binary into merge/ and use readelf to obtain some known instruction of the binary. I used /bin/true and the entry instruction(0x13b0): $ mount -t overlay overlay -o lowerdir=lower,upperdir=upper,workdir=work merge $ cd /sys/kernel/debug/tracing $ echo 'p:true_entry PATH_TO_MERGE/merge/true:0x13b0' > uprobe_events $ echo 1 > events/uprobes/true_entry/enable This returns 'bash: echo: write error: Input/output error' and dmesg tells us 'event trace: Could not enable event true_entry' This change makes create_trace_uprobe() look for the real inode of a dentry. In the case of normal filesystems, this simplifies to just returning the inode. In the case of overlayfs(and similar fs) we will obtain the underlying dentry and corresponding inode, upon which uprobes can successfully register. Running the example above with the patch applied, we can see that the uprobe is enabled and will output to trace as expected. Link: http://lkml.kernel.org/r/20180410231030.2720-1-hmclauchlan@fb.com Reviewed-by: Josef Bacik Reviewed-by: Masami Hiramatsu Reviewed-by: Srikar Dronamraju Signed-off-by: Howard McLauchlan Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_uprobe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a4d0564f0fc377ad0ba66ce214b9b16324aea4b Author: Jérémy Lefaure Date: Sun Oct 15 21:22:49 2017 -0400 tracing: Use ARRAY_SIZE() macro instead of open coding it It is useless to re-invent the ARRAY_SIZE macro so let's use it instead of DATA_CNT. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Link: http://lkml.kernel.org/r/20171016012250.26453-1-jeremy.lefaure@lse.epita.fr Signed-off-by: Jérémy Lefaure [ Removed useless include of kernel.h ] Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 949989b36c2261125a7d01a4ca3d5b5ee64da05c Merge: 7ced6c9 ddd3d40 Author: David S. Miller Date: Wed Apr 11 10:54:06 2018 -0400 Merge branch 'vhost-fix-vhost_vq_access_ok-log-check' Stefan Hajnoczi says: ==================== vhost: fix vhost_vq_access_ok() log check v3: * Rebased onto net/master and resolved conflict [DaveM] v2: * Rewrote the conditional to make the vq access check clearer [Linus] * Added Patch 2 to make the return type consistent and harder to misuse [Linus] The first patch fixes the vhost virtqueue access check which was recently broken. The second patch replaces the int return type with bool to prevent future bugs. ==================== Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit ddd3d4081ffa806ffef28eaeefde757ba2b6812a Author: Stefan Hajnoczi Date: Wed Apr 11 10:35:41 2018 +0800 vhost: return bool from *_access_ok() functions Currently vhost *_access_ok() functions return int. This is error-prone because there are two popular conventions: 1. 0 means failure, 1 means success 2. -errno means failure, 0 means success Although vhost mostly uses #1, it does not do so consistently. umem_access_ok() uses #2. This patch changes the return type from int to bool so that false means failure and true means success. This eliminates a potential source of errors. Suggested-by: Linus Torvalds Signed-off-by: Stefan Hajnoczi Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/vhost/vhost.c | 66 +++++++++++++++++++++++++-------------------------- drivers/vhost/vhost.h | 4 ++-- 2 files changed, 35 insertions(+), 35 deletions(-) commit d14d2b78090c7de0557362b26a4ca591aa6a9faa Author: Stefan Hajnoczi Date: Wed Apr 11 10:35:40 2018 +0800 vhost: fix vhost_vq_access_ok() log check Commit d65026c6c62e7d9616c8ceb5a53b68bcdc050525 ("vhost: validate log when IOTLB is enabled") introduced a regression. The logic was originally: if (vq->iotlb) return 1; return A && B; After the patch the short-circuit logic for A was inverted: if (A || vq->iotlb) return A; return B; This patch fixes the regression by rewriting the checks in the obvious way, no longer returning A when vq->iotlb is non-NULL (which is hard to understand). Reported-by: syzbot+65a84dde0214b0387ccd@syzkaller.appspotmail.com Cc: Jason Wang Signed-off-by: Stefan Hajnoczi Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/vhost/vhost.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 7ced6c98c7ab7a1f6743931e28671b833af79b1e Author: Eric Auger Date: Wed Apr 11 15:30:38 2018 +0200 vhost: Fix vhost_copy_to_user() vhost_copy_to_user is used to copy vring used elements to userspace. We should use VHOST_ADDR_USED instead of VHOST_ADDR_DESC. Fixes: f88949138058 ("vhost: introduce O(1) vq metadata cache") Signed-off-by: Eric Auger Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98239c9096ed1dad97f01c66aa6d8b6e9be9029a Merge: 5376534 9a11aff Author: David S. Miller Date: Wed Apr 11 10:41:36 2018 -0400 Merge branch 'Aquantia-atlantic-critical-fixes-04-2018' Igor Russkikh says: ==================== Aquantia atlantic critical fixes 04/2018 Two regressions on latest 4.16 driver reported by users Some of old FW (1.5.44) had a link management logic which prevents driver to make clean reset. Driver of 4.16 has a full hardware reset implemented and that broke the link and traffic on such a cards. Second is oops on shutdown callback in case interface is already closed or was never opened. ==================== Signed-off-by: David S. Miller commit 9a11aff25fd43d5bd2660ababdc9f564b0ba183a Author: Igor Russkikh Date: Wed Apr 11 15:23:25 2018 +0300 net: aquantia: oops when shutdown on already stopped device In case netdev is closed at the moment of pci shutdown, aq_nic_stop gets called second time. napi_disable in that case hangs indefinitely. In other case, if device was never opened at all, we get oops because of null pointer access. We should invoke aq_nic_stop conditionally, only if device is running at the moment of shutdown. Reported-by: David Arcari Fixes: 90869ddfefeb ("net: aquantia: Implement pci shutdown callback") Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit cce96d1883dae4b79f44890e5118243d806da286 Author: Igor Russkikh Date: Wed Apr 11 15:23:24 2018 +0300 net: aquantia: Regression on reset with 1.x firmware On ASUS XG-C100C with 1.5.44 firmware a special mode called "dirty wake" is active. With this mode when motherboard gets powered (but no poweron happens yet), NIC automatically enables powersave link and watches for WOL packet. This normally allows to powerup the PC after AC power failures. Not all motherboards or bios settings gives power to PCI slots, so this mode is not enabled on all the hardware. 4.16 linux driver introduced full hardware reset sequence This is required since before that we had no NIC hardware reset implemented and there were side effects of "not clean start". But this full reset is incompatible with "dirty wake" WOL feature it keeps the PHY link in a special mode forever. As a consequence, driver sees no link and no traffic. To fix this we forcibly change FW state to idle state before doing the full reset. This makes FW to restore link state. Fixes: c8c82eb net: aquantia: Introduce global AQC hardware reset sequence Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller .../net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 53765341ee821c0a0f1dec41adc89c9096ad694c Author: Bassem Boubaker Date: Wed Apr 11 13:15:53 2018 +0200 cdc_ether: flag the Cinterion AHS8 modem by gemalto as WWAN The Cinterion AHS8 is a 3G device with one embedded WWAN interface using cdc_ether as a driver. The modem is controlled via AT commands through the exposed TTYs. AT+CGDCONT write command can be used to activate or deactivate a WWAN connection for a PDP context defined with the same command. UE supports one WWAN adapter. Signed-off-by: Bassem Boubaker Acked-by: Oliver Neukum Signed-off-by: David S. Miller drivers/net/usb/cdc_ether.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 3f01ddb962dc506916c243f9524e8bef97119b77 Author: Tejaswi Tanikella Date: Wed Apr 11 16:34:47 2018 +0530 slip: Check if rstate is initialized before uncompressing On receiving a packet the state index points to the rstate which must be used to fill up IP and TCP headers. But if the state index points to a rstate which is unitialized, i.e. filled with zeros, it gets stuck in an infinite loop inside ip_fast_csum trying to compute the ip checsum of a header with zero length. 89.666953: <2> [] slhc_uncompress+0x464/0x468 89.666965: <2> [] ppp_receive_nonmp_frame+0x3b4/0x65c 89.666978: <2> [] ppp_receive_frame+0x64/0x7e0 89.666991: <2> [] ppp_input+0x104/0x198 89.667005: <2> [] pppopns_recv_core+0x238/0x370 89.667027: <2> [] __sk_receive_skb+0xdc/0x250 89.667040: <2> [] pppopns_recv+0x44/0x60 89.667053: <2> [] __sock_queue_rcv_skb+0x16c/0x24c 89.667065: <2> [] sock_queue_rcv_skb+0x2c/0x38 89.667085: <2> [] raw_rcv+0x124/0x154 89.667098: <2> [] raw_local_deliver+0x1e0/0x22c 89.667117: <2> [] ip_local_deliver_finish+0x70/0x24c 89.667131: <2> [] ip_local_deliver+0x100/0x10c ./scripts/faddr2line vmlinux slhc_uncompress+0x464/0x468 output: ip_fast_csum at arch/arm64/include/asm/checksum.h:40 (inlined by) slhc_uncompress at drivers/net/slip/slhc.c:615 Adding a variable to indicate if the current rstate is initialized. If such a packet arrives, move to toss state. Signed-off-by: Tejaswi Tanikella Signed-off-by: David S. Miller drivers/net/slip/slhc.c | 5 +++++ include/net/slhc_vj.h | 1 + 2 files changed, 6 insertions(+) commit fed56079e76461765f1e21c214bd1b614b7981e8 Author: Phil Elwell Date: Wed Apr 11 12:02:47 2018 +0100 lan78xx: Avoid spurious kevent 4 "error" lan78xx_defer_event generates an error message whenever the work item is already scheduled. lan78xx_open defers three events - EVENT_STAT_UPDATE, EVENT_DEV_OPEN and EVENT_LINK_RESET. Being aware of the likelihood (or certainty) of an error message, the DEV_OPEN event is added to the set of pending events directly, relying on the subsequent deferral of the EVENT_LINK_RESET call to schedule the work. Take the same precaution with EVENT_STAT_UPDATE to avoid a totally unnecessary error message. Signed-off-by: Phil Elwell Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bfc33807a9a02764bdd1e42e794b3b401240f27 Author: Phil Elwell Date: Wed Apr 11 10:59:17 2018 +0100 lan78xx: Correctly indicate invalid OTP lan78xx_read_otp tries to return -EINVAL in the event of invalid OTP content, but the value gets overwritten before it is returned and the read goes ahead anyway. Make the read conditional as it should be and preserve the error code. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Signed-off-by: Phil Elwell Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a43cced9a348901f9015f4730b70b69e7c41a9c9 Author: Ka-Cheong Poon Date: Wed Apr 11 00:57:25 2018 -0700 rds: MP-RDS may use an invalid c_path rds_sendmsg() calls rds_send_mprds_hash() to find a c_path to use to send a message. Suppose the RDS connection is not yet up. In rds_send_mprds_hash(), it does if (conn->c_npaths == 0) wait_event_interruptible(conn->c_hs_waitq, (conn->c_npaths != 0)); If it is interrupted before the connection is set up, rds_send_mprds_hash() will return a non-zero hash value. Hence rds_sendmsg() will use a non-zero c_path to send the message. But if the RDS connection ends up to be non-MP capable, the message will be lost as only the zero c_path can be used. Signed-off-by: Ka-Cheong Poon Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/send.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 2434af79c85d45d41d0c286fedf6e0556888a54c Author: Ming Lei Date: Wed Apr 11 18:47:44 2018 +0800 blk-mq: Revert "blk-mq: reimplement blk_mq_hw_queue_mapped" This reverts commit 127276c6ce5a30fcc806b7fe53015f4f89b62956. When all CPUs of one hw queue become offline, there still may have IOs not completed from this hctx. But blk_mq_hw_queue_mapped() is called in blk_mq_queue_tag_busy_iter(), which is used for iterating request in timeout handler, timeout event will be missed on the inactive hctx, then request may never be completed. Also the replementation of blk_mq_hw_queue_mapped() doesn't match the helper's name any more, and it should have been named as blk_mq_hw_queue_active(). Even other callers need further verification about this reimplemenation. So revert this patch now, and we can improve hw queue activate/inactivate event after adequent researching and test. Cc: Stefan Haberland Cc: Christian Borntraeger Cc: Christoph Hellwig Reported-by: Jens Axboe Fixes: 127276c6ce5a30fcc ("blk-mq: reimplement blk_mq_hw_queue_mapped") Reviewed-by: Sagi Grimberg Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adf58458bcb2890efe94e5a58506c27bfecf518d Author: Desnes A. Nunes do Rosario Date: Tue Apr 10 14:51:06 2018 -0500 PCI: Remove messages about reassigning resources When reassigning device resources to increase their alignment, e.g., because of a "pci=resource_alignment=" kernel parameter or because the platform aligns resources to its page size, we previously emitted messages like this: pci 0000:00:00.0: Disabling memory decoding and releasing memory resources pci 0000:00:00.0: disabling bridge mem windows These messages don't convey any useful information, so remove them. Fixes: 38274637699 ("powerpc/powernv: Override pcibios_default_alignment() to force PCI devices to be page aligned") Signed-off-by: Desnes A. Nunes do Rosario [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 1 - drivers/pci/setup-res.c | 2 -- 2 files changed, 3 deletions(-) commit 300ad8992913025b4294d4fc37b6bfff4a8b7ad1 Author: Daniel Kurtz Date: Fri Apr 6 16:07:59 2018 -0600 mmc: sdhci-pci: Only do AMD tuning for HS200 Commit c31165d7400b ("mmc: sdhci-pci: Add support for HS200 tuning mode on AMD, eMMC-4.5.1") added a HS200 tuning method for use with AMD SDHCI controllers. As described in the commit subject, this tuning is specific for HS200. However, as implemented, this method is used for all host timings, because platform_execute_tuning, if it exists, is called unconditionally by sdhci_execute_tuning(). This breaks tuning when using the AMD controller with, for example, a DDR50 SD card. Instead, we can implement an amd execute_tuning wrapper callback, and then conditionally do the HS200 specific tuning for HS200, and otherwise call back to the standard sdhci_execute_tuning(). Signed-off-by: Daniel Kurtz Acked-by: Shyam Sundar S K Acked-by: Adrian Hunter Fixes: c31165d7400b ("mmc: sdhci-pci: Add support for HS200 tuning mode on AMD, eMMC-4.5.1") Cc: stable@vger.kernel.org # v4.11+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit 2698d82e519413c6ad287e6f14b29e0373ed37f8 Author: hu huajun Date: Wed Apr 11 15:16:40 2018 +0800 KVM: X86: fix incorrect reference of trace_kvm_pi_irte_update In arch/x86/kvm/trace.h, this function is declared as host_irq the first input, and vcpu_id the second, instead of otherwise. Signed-off-by: hu huajun Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 5 ++--- arch/x86/kvm/vmx.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) commit 51798deaffb738ef3bdd4f544b11ce2adaff40f3 Merge: 2dd0df8 bbe9a70 fe43e2c Author: Rafael J. Wysocki Date: Wed Apr 11 13:22:46 2018 +0200 Merge branches 'pm-cpuidle' and 'pm-qos' * pm-cpuidle: tick-sched: avoid a maybe-uninitialized warning cpuidle: Add definition of residency to sysfs documentation time: hrtimer: Use timerqueue_iterate_next() to get to the next timer nohz: Avoid duplication of code related to got_idle_tick nohz: Gather tick_sched booleans under a common flag field cpuidle: menu: Avoid selecting shallow states with stopped tick cpuidle: menu: Refine idle state selection for running tick sched: idle: Select idle state before stopping the tick time: hrtimer: Introduce hrtimer_next_event_without() time: tick-sched: Split tick_nohz_stop_sched_tick() cpuidle: Return nohz hint from cpuidle_select() jiffies: Introduce USER_TICK_USEC and redefine TICK_USEC sched: idle: Do not stop the tick before cpuidle_idle_call() sched: idle: Do not stop the tick upfront in the idle loop time: tick-sched: Reorganize idle tick management code * pm-qos: PM / QoS: mark expected switch fall-throughs commit 71d577db01a5177c7807a2f3d3df9bab9d21c500 Author: Helge Deller Date: Wed Apr 11 09:09:53 2018 +0200 parisc: Switch to generic COMPAT_BINFMT_ELF Drop our own compat binfmt implementation in arch/parisc/kernel/binfmt_elf32.c in favour of the generic implementation with CONFIG_COMPAT_BINFMT_ELF. While cleaning up the dependencies, I noticed that ELF_PLATFORM was strangely defined: On a 32-bit kernel, it was defined to "PARISC", while when running in compat mode on a 64-bit kernel it was defined to "PARISC32". Since it doesn't seem to be used in glibc yet, it's now defined in both cases to "PARISC". In any case, it can be distinguished because it's either a 32-bit or a 64-bit ELF file. Signed-off-by: Helge Deller arch/parisc/Kconfig | 1 + arch/parisc/include/asm/compat.h | 6 +++ arch/parisc/include/asm/elf.h | 69 +++++++++++++-------------- arch/parisc/kernel/binfmt_elf32.c | 98 --------------------------------------- 4 files changed, 42 insertions(+), 132 deletions(-) commit 2a03bb9e7af2052ad6990bf417a3ba9ff7e8900e Author: Helge Deller Date: Tue Apr 10 18:55:13 2018 +0200 parisc: Move cache flush functions into .text.hot section and move the disable_sr_hashing() C and assembly functions into the .init section. Signed-off-by: Helge Deller arch/parisc/kernel/cache.c | 2 +- arch/parisc/kernel/pacache.S | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) commit 75abf64287cab73546382a4fa7fa2f4e3516efeb Author: Helge Deller Date: Sat Jan 13 19:32:43 2018 -0600 parisc/signal: Add FPE_CONDTRAP for conditional trap handling Posix and common sense requires that SI_USER not be a signal specific si_code. Thus add a new FPE_CONDTRAP si_code for conditional traps. Signed-off-by: Helge Deller Cc: Stephen Rothwell arch/parisc/include/uapi/asm/siginfo.h | 7 ------- arch/parisc/kernel/traps.c | 7 ++++--- arch/x86/kernel/signal_compat.c | 2 +- include/uapi/asm-generic/siginfo.h | 3 ++- 4 files changed, 7 insertions(+), 12 deletions(-) commit 8e9b29b61851ba452e33373743fadb52778e9075 Author: KarimAllah Ahmed Date: Wed Apr 11 11:16:03 2018 +0200 X86/KVM: Do not allow DISABLE_EXITS_MWAIT when LAPIC ARAT is not available If the processor does not have an "Always Running APIC Timer" (aka ARAT), we should not give guests direct access to MWAIT. The LAPIC timer would stop ticking in deep C-states, so any host deadlines would not wakeup the host kernel. The host kernel intel_idle driver handles this by switching to broadcast mode when ARAT is not available and MWAIT is issued with a deep C-state that would stop the LAPIC timer. When MWAIT is passed through, we can not tell when MWAIT is issued. So just disable this capability when LAPIC ARAT is not available. I am not even sure if there are any CPUs with VMX support but no LAPIC ARAT or not. Cc: Paolo Bonzini Cc: Radim Krčmář Reported-by: Wanpeng Li Signed-off-by: KarimAllah Ahmed Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cb799267bb65676277fb718cfb42239fe5c6e4fb Author: Joel Stanley Date: Thu Feb 22 15:33:24 2018 +1030 MAINTAINERS: Update ASPEED entry with details I am interested in all ASPEED drivers, and the previous match wasn't grabbing files in nested directories. Use N instead. Add the arm kernel mailing list so that patches get reviewed there, and the linux-aspeed list which exists only so I can use patchwork to track patches. Add Andrew as a reviewer, because he is involved in reviewing ASPEED stuff. Signed-off-by: Joel Stanley Acked-by: Andrew Jeffery Signed-off-by: Arnd Bergmann MAINTAINERS | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit af4a72276d49da117dbc99799afee740a26f8f10 Author: Harald Freudenberger Date: Mon Apr 9 16:18:37 2018 +0200 s390/zcrypt: Support up to 256 crypto adapters. There was an artificial restriction on the card/adapter id to only 6 bits but all the AP commands do support adapter ids with 8 bit. This patch removes this restriction to 64 adapters and now up to 256 adapter can get addressed. Some of the ioctl calls work on the max number of cards possible (which was 64). These ioctls are now deprecated but still supported. All the defines, structs and ioctl interface declarations have been kept for compabibility. There are now new ioctls (and defines for these) with an additional '2' appended which provide the extended versions with 256 cards supported. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ap.h | 6 +- arch/s390/include/uapi/asm/zcrypt.h | 124 +++++++++++++++--------- drivers/s390/crypto/ap_bus.h | 2 +- drivers/s390/crypto/pkey_api.c | 41 ++++---- drivers/s390/crypto/zcrypt_api.c | 182 ++++++++++++++++++++++++++---------- drivers/s390/crypto/zcrypt_api.h | 2 +- 6 files changed, 237 insertions(+), 120 deletions(-) commit cf43ae63c024971e6df94665e829c01c22202a19 Author: Jack Ma Date: Fri Apr 6 15:45:16 2018 +1200 netfilter: xt_connmark: Add bit mapping for bit-shift operation. With the addition of bit-shift operations, we are able to shift ct/skbmark based on user requirements. However, this change might also cause the most left/right hand- side mark to be accidentially lost during shift operations. This patch adds the ability to 'grep' certain bits based on ctmask or nfmask out of the original mark. Then, apply shift operations to achieve a new mapping between ctmark and skb->mark. For example: If someone would like save the fourth F bits of ctmark 0xFFF(F)000F into the seventh hexadecimal (0) skb->mark 0xABC000(0)E. new_targetmark = (ctmark & ctmask) >> 12; (new) skb->mark = (skb->mark &~nfmask) ^ new_targetmark; This will preserve the other bits that are not related to this operation. Fixes: 472a73e00757 ("netfilter: xt_conntrack: Support bit-shifting for CONNMARK & MARK targets.") Reviewed-by: Florian Westphal Signed-off-by: Jack Ma Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_connmark.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 5ac7c2fd6e7102532104907c0df94abca826ec5c Author: Kyle Spiers Date: Tue Apr 10 17:02:29 2018 -0700 isofs compress: Remove VLA usage As part of the effort to remove VLAs from the kernel[1], this changes the allocation of the bhs and pages arrays from being on the stack to being kcalloc()ed. This also allows for the removal of the explicit zeroing of bhs. https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Kyle Spiers Signed-off-by: Jan Kara fs/isofs/compress.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 8c81dd46ef3c416b3b95e3020fb90dbd44e6140b Author: Carlos Maiolino Date: Tue Apr 10 22:39:04 2018 -0700 Force log to disk before reading the AGF during a fstrim Forcing the log to disk after reading the agf is wrong, we might be calling xfs_log_force with XFS_LOG_SYNC with a metadata lock held. This can cause a deadlock when racing a fstrim with a filesystem shutdown. The deadlock has been identified due a miscalculation bug in device-mapper dm-thin, which returns lack of space to its users earlier than the device itself really runs out of space, changing the device-mapper volume into an error state. The problem happened while filling the filesystem with a single file, triggering the bug in device-mapper, consequently causing an IO error and shutting down the filesystem. If such file is removed, and fstrim executed before the XFS finishes the shut down process, the fstrim process will end up holding the buffer lock, and going to sleep on the cil wait queue. At this point, the shut down process will try to wake up all the threads waiting on the cil wait queue, but for this, it will try to hold the same buffer log already held my the fstrim, locking up the filesystem. Signed-off-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_discard.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit fbbb4509048cf4e41a1254978859b588e0c86eab Author: Matthew Wilcox Date: Tue Apr 10 22:39:01 2018 -0700 Export __set_page_dirty XFS currently contains a copy-and-paste of __set_page_dirty(). Export it from buffer.c instead. Signed-off-by: Matthew Wilcox Acked-by: Jeff Layton Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/buffer.c | 3 ++- fs/xfs/xfs_aops.c | 15 ++------------- include/linux/mm.h | 1 + 3 files changed, 5 insertions(+), 14 deletions(-) commit c171d3b8a67e08884d915ffbb1dbc475747d7df2 Merge: 72655f6 c1d1e91a Author: Benson Leung Date: Tue Apr 10 22:29:14 2018 -0700 Merge remote-tracking branch 'origin/ib-chrome-platform-cros-ec-sysfs-debugfs-for-v4.17' into working-branch-for-4.17 Merging Enric's cros-ec sysfs and debugfs fixes from immutable branch. Signed-off-by: Benson Leung commit c1d1e91aff3d1183d6b16a282c2575e3e006cee4 Author: Gwendal Grignou Date: Fri Mar 23 18:42:47 2018 +0100 platform/chrome: mfd/cros_ec_dev: Add sysfs entry to set keyboard wake lid angle This adds a sysfs attribute (/sys/class/chromeos/cros_ec/kb_wake_angle) used to set and get the keyboard wake lid angle. This attribute is present only if 2 accelerometers are controlled by the EC. This patch also moves the cros_ec features check before the device is added so the features map obtained from the EC is ready on time. Signed-off-by: Gwendal Grignou Signed-off-by: Enric Balletbo i Serra Reviewed-by: Andy Shevchenko Acked-by: Lee Jones Signed-off-by: Benson Leung drivers/mfd/cros_ec_dev.c | 31 ++++++------- drivers/platform/chrome/cros_ec_sysfs.c | 81 +++++++++++++++++++++++++++++++++ include/linux/mfd/cros_ec.h | 2 + 3 files changed, 96 insertions(+), 18 deletions(-) commit b082b2e1454c3e0217d7cf70f2211966c3d54301 Author: Shawn Nematbakhsh Date: Fri Mar 23 18:42:46 2018 +0100 platform/chrome: cros_ec_debugfs: Add PD port info to debugfs Add info useful for debugging USB-PD port state. Signed-off-by: Shawn Nematbakhsh Signed-off-by: Enric Balletbo i Serra Reviewed-by: Andy Shevchenko Acked-by: Lee Jones Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_debugfs.c | 72 +++++++++++++++++++++++++++++++ include/linux/mfd/cros_ec_commands.h | 3 ++ 2 files changed, 75 insertions(+) commit f63192800ebd01099d3487f7fef1dd0ee0b18b45 Author: Enric Balletbo i Serra Date: Fri Mar 23 18:42:45 2018 +0100 platform/chrome: cros_ec_debugfs: Use octal permissions '0444' Fixed the following checkpatch warning: WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. Signed-off-by: Enric Balletbo i Serra Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7d800c99ecfab57845c5ae29ed0aefb36c055c2b Author: Enric Balletbo i Serra Date: Fri Mar 23 18:42:44 2018 +0100 platform/chrome: cros_ec_sysfs: use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR variants for read/write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. Suggested-by: Andy Shevchenko Signed-off-by: Enric Balletbo i Serra Reviewed-by: Andy Shevchenko Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_sysfs.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 93afebbe694ecd0a22f065af2e2565e2dbd49025 Author: Enric Balletbo i Serra Date: Fri Mar 23 18:42:43 2018 +0100 platform/chrome: cros_ec_sysfs: introduce to_cros_ec_dev define. Add a define to get the cros_ec_dev from device and use it. Suggested-by: Andy Shevchenko Signed-off-by: Enric Balletbo i Serra Reviewed-by: Andy Shevchenko Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_sysfs.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 311394248ca539c12b33d396b2944e03cd0d6bfc Author: Gwendal Grignou Date: Fri Mar 23 18:42:42 2018 +0100 platform/chrome: cros_ec_sysfs: Modify error handling When accessing a sysfs attribute, if the EC command fails, -EPROTO is now returned instead of an error message as it is unlikely an app is parsing the error message to do something meaningful. Also, this patch makes use of cros_ec_cmd_xfer_status() instead of cros_ec_cmd_xfer() so an error message is printed in the syslog. Signed-off-by: Gwendal Grignou Signed-off-by: Enric Balletbo i Serra Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_sysfs.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) commit 19ce7909ed11c49f7eddf59e7f49cd3062bf83d5 Author: Nicholas Piggin Date: Fri Apr 6 03:56:30 2018 +1000 KVM: PPC: Book3S HV: trace_tlbie must not be called in realmode This crashes with a "Bad real address for load" attempting to load from the vmalloc region in realmode (faulting address is in DAR). Oops: Bad interrupt in KVM entry/exit code, sig: 6 [#1] LE SMP NR_CPUS=2048 NUMA PowerNV CPU: 53 PID: 6582 Comm: qemu-system-ppc Not tainted 4.16.0-01530-g43d1859f0994 NIP: c0000000000155ac LR: c0000000000c2430 CTR: c000000000015580 REGS: c000000fff76dd80 TRAP: 0200 Not tainted (4.16.0-01530-g43d1859f0994) MSR: 9000000000201003 CR: 48082222 XER: 00000000 CFAR: 0000000102900ef0 DAR: d00017fffd941a28 DSISR: 00000040 SOFTE: 3 NIP [c0000000000155ac] perf_trace_tlbie+0x2c/0x1a0 LR [c0000000000c2430] do_tlbies+0x230/0x2f0 I suspect the reason is the per-cpu data is not in the linear chunk. This could be restored if that was able to be fixed, but for now, just remove the tracepoints. Fixes: 0428491cba92 ("powerpc/mm: Trace tlbie(l) instructions") Cc: stable@vger.kernel.org # v4.13+ Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_hv_rm_mmu.c | 4 ---- 1 file changed, 4 deletions(-) commit 032900e62c176d75923baf95ad880e5d6ba71171 Author: Aneesh Kumar K.V Date: Tue Apr 10 14:21:26 2018 +0530 powerpc/8xx: Fix build with hugetlbfs enabled 8xx uses the slice code when hugetlbfs is enabled. We missed a header include on 8xx which resulted in the below build failure: config: mpc885_ads_defconfig + CONFIG_HUGETLBFS arch/powerpc/mm/slice.c: In function 'slice_get_unmapped_area': arch/powerpc/mm/slice.c:655:2: error: implicit declaration of function 'need_extra_context' arch/powerpc/mm/slice.c:656:3: error: implicit declaration of function 'alloc_extended_context' on PPC64 the mmu_context.h was included via linux/pkeys.h Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 1 + 1 file changed, 1 insertion(+) commit 3b8070335f751aac9f1526ae2e012e6f5b8b0f21 Author: Nicholas Piggin Date: Tue Apr 10 21:49:33 2018 +1000 powerpc/powernv: Fix OPAL NVRAM driver OPAL_BUSY loops The OPAL NVRAM driver does not sleep in case it gets OPAL_BUSY or OPAL_BUSY_EVENT from firmware, which causes large scheduling latencies, and various lockup errors to trigger (again, BMC reboot can cause it). Fix this by converting it to the standard form OPAL_BUSY loop that sleeps. Fixes: 628daa8d5abf ("powerpc/powernv: Add RTC and NVRAM support plus RTAS fallbacks") Depends-on: 34dd25de9fe3 ("powerpc/powernv: define a standard delay for OPAL_BUSY type retry loops") Cc: stable@vger.kernel.org # v3.2+ Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-nvram.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 1f5781725dcbb026438e77091c91a94f678c3522 Author: Tetsuo Handa Date: Tue Apr 10 15:15:16 2018 +0900 commoncap: Handle memory allocation failure. syzbot is reporting NULL pointer dereference at xattr_getsecurity() [1], for cap_inode_getsecurity() is returning sizeof(struct vfs_cap_data) when memory allocation failed. Return -ENOMEM if memory allocation failed. [1] https://syzkaller.appspot.com/bug?id=a55ba438506fe68649a5f50d2d82d56b365e0107 Signed-off-by: Tetsuo Handa Fixes: 8db6c34f1dbc8e06 ("Introduce v3 namespaced file capabilities") Reported-by: syzbot Cc: stable # 4.14+ Acked-by: Serge E. Hallyn Acked-by: James Morris Signed-off-by: Eric W. Biederman security/commoncap.c | 2 ++ 1 file changed, 2 insertions(+) commit 37f9579f4c31a6d698dbf3016d7bf132f9288d30 Author: Bart Van Assche Date: Tue Apr 10 17:02:40 2018 -0600 blk-mq: Avoid that submitting a bio concurrently with device removal triggers a crash Because blkcg_exit_queue() is now called from inside blk_cleanup_queue() it is no longer safe to access cgroup information during or after the blk_cleanup_queue() call. Hence protect the generic_make_request_checks() call with blk_queue_enter() / blk_queue_exit(). Reported-by: Ming Lei Fixes: a063057d7c73 ("block: Fix a race between request queue removal and the block cgroup controller") Signed-off-by: Bart Van Assche Cc: Ming Lei Cc: Joseph Qi Signed-off-by: Jens Axboe block/blk-core.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) commit 3a38bb98d9abdc3856f26b5ed4332803065cd7cf Author: Yonghong Song Date: Tue Apr 10 09:37:32 2018 -0700 bpf/tracing: fix a deadlock in perf_event_detach_bpf_prog syzbot reported a possible deadlock in perf_event_detach_bpf_prog. The error details: ====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc7+ #3 Not tainted ------------------------------------------------------ syz-executor7/24531 is trying to acquire lock: (bpf_event_mutex){+.+.}, at: [<000000008a849b07>] perf_event_detach_bpf_prog+0x92/0x3d0 kernel/trace/bpf_trace.c:854 but task is already holding lock: (&mm->mmap_sem){++++}, at: [<0000000038768f87>] vm_mmap_pgoff+0x198/0x280 mm/util.c:353 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&mm->mmap_sem){++++}: __might_fault+0x13a/0x1d0 mm/memory.c:4571 _copy_to_user+0x2c/0xc0 lib/usercopy.c:25 copy_to_user include/linux/uaccess.h:155 [inline] bpf_prog_array_copy_info+0xf2/0x1c0 kernel/bpf/core.c:1694 perf_event_query_prog_array+0x1c7/0x2c0 kernel/trace/bpf_trace.c:891 _perf_ioctl kernel/events/core.c:4750 [inline] perf_ioctl+0x3e1/0x1480 kernel/events/core.c:4770 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #0 (bpf_event_mutex){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1a80 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 perf_event_detach_bpf_prog+0x92/0x3d0 kernel/trace/bpf_trace.c:854 perf_event_free_bpf_prog kernel/events/core.c:8147 [inline] _free_event+0xbdb/0x10f0 kernel/events/core.c:4116 put_event+0x24/0x30 kernel/events/core.c:4204 perf_mmap_close+0x60d/0x1010 kernel/events/core.c:5172 remove_vma+0xb4/0x1b0 mm/mmap.c:172 remove_vma_list mm/mmap.c:2490 [inline] do_munmap+0x82a/0xdf0 mm/mmap.c:2731 mmap_region+0x59e/0x15a0 mm/mmap.c:1646 do_mmap+0x6c0/0xe00 mm/mmap.c:1483 do_mmap_pgoff include/linux/mm.h:2223 [inline] vm_mmap_pgoff+0x1de/0x280 mm/util.c:355 SYSC_mmap_pgoff mm/mmap.c:1533 [inline] SyS_mmap_pgoff+0x462/0x5f0 mm/mmap.c:1491 SYSC_mmap arch/x86/kernel/sys_x86_64.c:100 [inline] SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:91 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mm->mmap_sem); lock(bpf_event_mutex); lock(&mm->mmap_sem); lock(bpf_event_mutex); *** DEADLOCK *** ====================================================== The bug is introduced by Commit f371b304f12e ("bpf/tracing: allow user space to query prog array on the same tp") where copy_to_user, which requires mm->mmap_sem, is called inside bpf_event_mutex lock. At the same time, during perf_event file descriptor close, mm->mmap_sem is held first and then subsequent perf_event_detach_bpf_prog needs bpf_event_mutex lock. Such a senario caused a deadlock. As suggested by Daniel, moving copy_to_user out of the bpf_event_mutex lock should fix the problem. Fixes: f371b304f12e ("bpf/tracing: allow user space to query prog array on the same tp") Reported-by: syzbot+dc5ca0e4c9bfafaf2bae@syzkaller.appspotmail.com Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann include/linux/bpf.h | 4 ++-- kernel/bpf/core.c | 45 +++++++++++++++++++++++++++++---------------- kernel/trace/bpf_trace.c | 25 +++++++++++++++++++++---- 3 files changed, 52 insertions(+), 22 deletions(-) commit 0abf854d7cbbb405e39e0f93d5c1da98dca24bc0 Author: Anders Roxell Date: Tue Apr 10 14:24:21 2018 +0200 selftests: bpf: update .gitignore with missing generated files Signed-off-by: Anders Roxell Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/.gitignore | 3 +++ 1 file changed, 3 insertions(+) commit 871e899db19da3dbd17a5d263b555dc5b7d8fed5 Merge: c975f17 c60e22f Author: Dave Airlie Date: Wed Apr 11 08:35:41 2018 +1000 Merge branch 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-next A few fixes for 4.17: - Fix a potential use after free in a error case - Fix pcie lane handling in amdgpu SI dpm - sdma pipeline sync fix - A few vega12 cleanups and fixes - Misc other fixes * 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: Fix memory leaks at amdgpu_init() error path drm/amdgpu: Fix PCIe lane width calculation drm/radeon: Fix PCIe lane width calculation drm/amdgpu/si: implement get/set pcie_lanes asic callback drm/amdgpu: Add support for SRBM selection v3 Revert "drm/amdgpu: Don't change preferred domian when fallback GTT v5" drm/amd/powerply: fix power reading on Fiji drm/amd/powerplay: Enable ACG SS feature drm/amdgpu/sdma: fix mask in emit_pipeline_sync drm/amdgpu: Fix KIQ hang on bare metal for device unbind/bind back v2. drm/amd/pp: Clean header file in vega12_smumgr.c drm/amd/pp: Remove Dead functions on Vega12 drm/amd/pp: silence a static checker warning drm/amdgpu: drop compute ring timeout setting for non-sriov only (v2) drm/amdgpu: fix typo of domain fallback commit c975f17d700445051ad0f87c6822bd15816c587f Merge: 694f54f 8cd1b5b Author: Dave Airlie Date: Wed Apr 11 08:35:18 2018 +1000 Merge tag 'drm-misc-next-fixes-2018-04-04' of git://anongit.freedesktop.org/drm/drm-misc into drm-next hda_intel: Don't declare azx PM ops if VGA_SWITCHEROO configured (Lukas) Cc: Lukas Wunner Cc: Takashi Iwai * tag 'drm-misc-next-fixes-2018-04-04' of git://anongit.freedesktop.org/drm/drm-misc: ALSA: hda - Silence PM ops build warning commit 9e7f06c8beee304ee21b791653fefcd713f48b9a Author: Takashi Iwai Date: Tue Apr 10 19:05:13 2018 +0200 swiotlb: fix unexpected swiotlb_alloc_coherent failures The code refactoring by commit 0176adb00406 ("swiotlb: refactor coherent buffer allocation") made swiotlb_alloc_buffer almost always failing due to a thinko: namely, the function evaluates the dma_coherent_ok call incorrectly and dealing as if it's invalid. This ends up with weird errors like iwlwifi probe failure or amdgpu screen flickering. This patch corrects the logic error. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1088658 Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1088902 Fixes: 0176adb00406 ("swiotlb: refactor coherent buffer allocation") Cc: # v4.16+ Signed-off-by: Takashi Iwai Signed-off-by: Christoph Hellwig lib/swiotlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98de9ce6f6660d02aa72d7b9b17696fa68a2ed9b Author: Frank Sorenson Date: Mon Apr 2 16:12:45 2018 -0500 NFS: advance nfs_entry cookie only after decoding completes successfully In nfs[34]_decode_dirent, the cookie is advanced as soon as it is read, but decoding may still fail later in the function, returning an error. Because the cookie has been advanced, the failing entry is not re-requested from the server, resulting in a missing directory entry. In addition, nfs v3 and v4 read the cookie at different locations in the xdr_stream, so the behavior of the two can be inconsistent. Fix these by reading the cookie into a temporary variable, and only advancing the cookie once the entire entry has been decoded from the xdr_stream successfully. Signed-off-by: Frank Sorenson Signed-off-by: Anna Schumaker fs/nfs/nfs3xdr.c | 7 +++++-- fs/nfs/nfs4xdr.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) commit dbc898ae107104ef49fd977a593e521fcefab5aa Author: chendt Date: Thu Mar 29 16:13:09 2018 +0800 NFSv3/acl: forget acl cache after setattr Sync of ACL with std permissions fail,We need to forget the ACL cache after setattr. Reproduction: #!/bin/bash touch testfile cat <testfile #!/bin/bash echo "Test was executed" EOF chmod u=rwx testfile chmod g=rw- testfile chmod o=r-- testfile chacl u::r--,g::rwx,o:rw- testfile chmod u+w testfile ls -l testfile chacl -l testfile Output: -rw-rwxrw- 1 root root 0 Mar 28 05:29 testfile testfile [u::r--,g::rwx,o::rw-] Signed-off-by: chendt.fnst Reviewed-by: Benjamin Coddington Reviewed-by: Kinglong Mee Signed-off-by: Anna Schumaker fs/nfs/nfs3proc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 609339c123843ace16d6b17f10205cd61460ab02 Author: Trond Myklebust Date: Wed Mar 28 16:18:17 2018 -0400 NFSv4.1: Fix exclusive create When we use EXCLUSIVE4_1 mode, the server returns an attribute mask where all the bits indicate which attributes were set, and where the verifier was stored. In order to figure out which attribute we have to resend, we need to clear out the attributes that are set in exclcreat_bitmask. Signed-off-by: Trond Myklebust [Anna: Fixed typo NFS4_CREATE_EXCLUSIVE4 -> NFS4_CREATE_EXCLUSIVE] Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 49 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 16 deletions(-) commit f6cdfa6dd629604d6a6af4de92b9c6eea6d52b1c Author: Trond Myklebust Date: Tue Mar 27 17:10:42 2018 -0400 NFSv4: Declare the size up to date after it was set. When we've changed the file size, then ensure we declare it to be up to date in the inode attributes. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/inode.c | 1 + fs/nfs/write.c | 1 + 2 files changed, 2 insertions(+) commit aae5730e2d32d779b31c81fa62e79c8e3bba1ac2 Author: Matthew Wilcox Date: Wed Mar 14 19:48:27 2018 -0700 nfs: Use ida_simple API Allocate the owner_id when we allocate the state and free it when we free the state. That lets us get rid of a gnarly ida_pre_get() / ida_get_new() loop. Signed-off-by: Matthew Wilcox Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/nfs4state.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 35156bfff3c0cd44d0e2e674530e0817fd22b313 Author: Trond Myklebust Date: Tue Mar 20 17:03:13 2018 -0400 NFSv4: Fix the nfs_inode_set_delegation() arguments Neither nfs_inode_set_delegation() nor nfs_inode_reclaim_delegation() are generic code. They have no business delving into NFSv4 OPEN xdr structures, so let's replace the "struct nfs_openres" parameter. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/delegation.c | 35 ++++++++++++++++++++++------------- fs/nfs/delegation.h | 6 ++++-- fs/nfs/nfs4proc.c | 12 ++++++++---- 3 files changed, 34 insertions(+), 19 deletions(-) commit 8b0649462407ec4192cacd0f283627b38f24aa5c Author: Trond Myklebust Date: Tue Mar 20 17:03:12 2018 -0400 NFSv4: Clean up CB_GETATTR encoding Replace the open coded bitmap implementation with a generic one. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/callback_xdr.c | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) commit 8bcbe7d98cffb60efdea40e36171c58dcc2bdd31 Author: Trond Myklebust Date: Tue Mar 20 17:03:11 2018 -0400 NFSv4: Don't ask for attributes when ACCESS is protected by a delegation If we hold a delegation, then the results of the ACCESS call are protected anyway. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 13 ++++++++----- fs/nfs/nfs4xdr.c | 6 ++++-- 2 files changed, 12 insertions(+), 7 deletions(-) commit 36b3743fef88616f92b49949fe1022f345970258 Author: Trond Myklebust Date: Tue Mar 20 17:03:10 2018 -0400 NFSv4: Add a helper to encode/decode struct timespec Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4xdr.c | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) commit 40a3426c75e1621ee6d88be2352f5dd85f557aed Author: Trond Myklebust Date: Tue Mar 20 17:03:09 2018 -0400 NFSv4: Clean up encode_attrs Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4xdr.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 37c88763def8474bc0972fbd1adb0d21670104b7 Author: Trond Myklebust Date: Tue Mar 20 17:03:08 2018 -0400 NFSv4; Clean up XDR encoding of type bitmap4 Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4xdr.c | 166 ++++++++++++++++++++------------------------- include/linux/sunrpc/xdr.h | 63 +++++++++++++++++ 2 files changed, 135 insertions(+), 94 deletions(-) commit e8d8aa46be413930fb3e084f9a7e815f87f72f1f Author: Trond Myklebust Date: Tue Mar 20 17:03:07 2018 -0400 NFSv4: Allow GFP_NOIO sleeps in decode_attr_owner/decode_attr_group Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4xdr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 85e3dd44c514a8bed6c713df4af657be83d00f68 Author: Trond Myklebust Date: Tue Mar 20 17:03:06 2018 -0400 SUNRPC: Add a helper for encoding opaque data inline Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker include/linux/sunrpc/xdr.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 0e779aa70308462e45f7cd1a54de418dfe101694 Author: Trond Myklebust Date: Tue Mar 20 17:03:05 2018 -0400 SUNRPC: Add helpers for decoding opaque and string types Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker include/linux/sunrpc/xdr.h | 6 ++++ net/sunrpc/xdr.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) commit d943f2dd8dba1ecde2de053500a6533e39577bfc Author: Trond Myklebust Date: Tue Mar 20 16:53:32 2018 -0400 NFSv4: Ignore change attribute invalidations if we hold a delegation Don't bother even recording an invalid change attribute if we hold a delegation since we already know the state of our attribute cache. We can rely on the fact that we will pick up a copy from the server when we return the delegation. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/inode.c | 3 +++ 1 file changed, 3 insertions(+) commit 16e143751727471f9a565515344196693bbc8762 Author: Trond Myklebust Date: Tue Mar 20 16:53:31 2018 -0400 NFS: More fine grained attribute tracking Currently, if the NFS_INO_INVALID_ATTR flag is set, for instance by a call to nfs_post_op_update_inode_locked(), then it will not be cleared until all the attributes have been revalidated. This means, for instance, that NFSv4 writes will always force a full attribute revalidation. Track the ctime, mtime, size and change attribute separately from the other attributes so that we can have nfs_post_op_update_inode_locked() set them correctly, and later have the cache consistency bitmask be able to clear them. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/dir.c | 4 +- fs/nfs/inode.c | 109 +++++++++++++++++++++++++++++-------------------- fs/nfs/nfs4proc.c | 7 +++- fs/nfs/write.c | 7 +++- include/linux/nfs_fs.h | 21 +++++++--- 5 files changed, 94 insertions(+), 54 deletions(-) commit cac88f942d5890706a8965e40a068d295ac95ae2 Author: Trond Myklebust Date: Tue Mar 20 16:53:30 2018 -0400 NFS: Don't force unnecessary cache invalidation in nfs_update_inode() If we managed to revalidate all the attributes, then there is no reason to mark them as invalid again. We do, however want to ensure that we set nfsi->attrtimeo correctly. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/inode.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 783b194c6ee14aba491ea7e97fb5109dcbd77720 Author: Trond Myklebust Date: Tue Mar 20 16:53:29 2018 -0400 NFS: Don't redirty the attribute cache in nfs_wcc_update_inode() If we received weak cache consistency data from the server, then those attributes are up to date, and there is no reason to mark them as dirty in the attribute cache. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/inode.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 8619ddd07b8608bb0e1c0b83406e006cbc5009cf Author: Trond Myklebust Date: Tue Mar 20 16:53:28 2018 -0400 NFS: Don't force a revalidation of all attributes if change is missing Even if the change attribute is missing, it is still OK to mark the other attributes as being up to date. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/inode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 909728821e366599b899251e0a0f023c0ccf4fb0 Author: Trond Myklebust Date: Tue Mar 20 16:53:27 2018 -0400 NFS: Convert NFS_INO_INVALID flags to unsigned long The cache validity attribute is unsigned long, so make sure that the flags are too. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker include/linux/nfs_fs.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit c01d36457dccf8e4c8991ab6570ff11554824710 Author: Trond Myklebust Date: Tue Mar 20 16:43:20 2018 -0400 NFSv4: Don't return the delegation when not needed by NFSv4.x (x>0) Starting with NFSv4.1, the server is able to deduce the client id from the SEQUENCE op which means it can always figure out whether or not the client is holding a delegation on a file that is being changed. For that reason, RFC5661 does not require a delegation to be unconditionally recalled on operations such as SETATTR, RENAME, or REMOVE. Note that for now, we continue to return READ delegations since that is still expected by the Linux knfsd server. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/delegation.c | 17 +++++++++++++++++ fs/nfs/delegation.h | 1 + fs/nfs/nfs4proc.c | 16 ++++++++++------ 3 files changed, 28 insertions(+), 6 deletions(-) commit c135cb39a907b85aef5389c191b6f02cffbadb8a Author: Trond Myklebust Date: Tue Mar 20 16:43:19 2018 -0400 NFS: Remove the unused return_delegation() callback Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs3proc.c | 7 ------- fs/nfs/nfs4proc.c | 1 - fs/nfs/proc.c | 7 ------- include/linux/nfs_xdr.h | 1 - 4 files changed, 16 deletions(-) commit 199366f0173f9e01efc23ecd7d88b82ad34f42fb Author: Trond Myklebust Date: Tue Mar 20 16:43:18 2018 -0400 NFS: Move the delegation return down into _nfs4_do_setattr() Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/inode.c | 5 ----- fs/nfs/nfs4proc.c | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) commit 977fcc2b0b41c1fc82e8349995695e207ccb6684 Author: Trond Myklebust Date: Tue Mar 20 16:43:17 2018 -0400 NFS: Add a delegation return into nfs4_proc_unlink_setup() Ensure that when we do finally delete the file, then we return the delegation. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs3proc.c | 2 +- fs/nfs/nfs4proc.c | 9 ++++++--- fs/nfs/proc.c | 2 +- fs/nfs/unlink.c | 2 +- include/linux/nfs_xdr.h | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) commit f2c2c552f119db84d85a53a8bd76479f34df02b1 Author: Trond Myklebust Date: Tue Mar 20 16:43:16 2018 -0400 NFS: Move delegation recall into the NFSv4 callback for rename_setup() Move the delegation recall out of the generic code, and into the NFSv4 specific callback. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/dir.c | 4 ---- fs/nfs/nfs3proc.c | 4 +++- fs/nfs/nfs4proc.c | 13 ++++++++++--- fs/nfs/proc.c | 4 +++- fs/nfs/unlink.c | 5 +---- include/linux/nfs_xdr.h | 4 +++- 6 files changed, 20 insertions(+), 14 deletions(-) commit 912678dbc592db7ad618f383866ad23e43cd51f3 Author: Trond Myklebust Date: Tue Mar 20 16:43:15 2018 -0400 NFS: Move the delegation return down into nfs4_proc_remove() Move the delegation return out of generic code and down into the NFSv4 specific unlink code. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/dir.c | 5 ++--- fs/nfs/nfs3proc.c | 6 +++--- fs/nfs/nfs4proc.c | 22 ++++++++++++++++++++-- fs/nfs/proc.c | 6 +++--- include/linux/nfs_xdr.h | 2 +- 5 files changed, 29 insertions(+), 12 deletions(-) commit 9f7682728728114ed99d8f127f0e1ce3ef9ba857 Author: Trond Myklebust Date: Tue Mar 20 16:43:14 2018 -0400 NFS: Move the delegation return down into nfs4_proc_link() Move the delegation return out of generic code. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/dir.c | 2 -- fs/nfs/nfs4proc.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit f50862423f547f8506d69b6e4fc53be53288244c Author: Trond Myklebust Date: Tue Mar 20 16:43:13 2018 -0400 NFSv4: Fix nfs4_return_incompatible_delegation The 'fmode' argument can take an FMODE_EXEC value, which we want to filter out before comparing to the delegation type. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 1 + 1 file changed, 1 insertion(+) commit 25524288631fc5b7d33259fca1e0dc38146be5d6 Author: Chuck Lever Date: Mon Mar 19 14:23:16 2018 -0400 xprtrdma: Fix corner cases when handling device removal Michal Kalderon has found some corner cases around device unload with active NFS mounts that I didn't have the imagination to test when xprtrdma device removal was added last year. - The ULP device removal handler is responsible for deallocating the PD. That wasn't clear to me initially, and my own testing suggested it was not necessary, but that is incorrect. - The transport destruction path can no longer assume that there is a valid ID. - When destroying a transport, ensure that ib_free_cq() is not invoked on a CQ that was already released. Reported-by: Michal Kalderon Fixes: bebd031866ca ("xprtrdma: Support unplugging an HCA from ...") Signed-off-by: Chuck Lever Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 571745935b2ec276345faec81af732fb9f51082b Author: Jeff Layton Date: Sun Mar 18 08:37:03 2018 -0400 nfs4: wake any lock waiters on successful RECLAIM_COMPLETE If we have a RECLAIM_COMPLETE with a populated cl_lock_waitq, then that implies that a reconnect has occurred. Since we can't expect a CB_NOTIFY_LOCK callback at that point, just wake up the entire queue so that all the tasks can re-poll for their locks. Signed-off-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 5656610325a926141625e2d5eed1b0ba57a2e4cb Author: Jeff Layton Date: Sun Mar 18 08:37:02 2018 -0400 nfs4: don't compare clientid in nfs4_wake_lock_waiter The task is expected to sleep for a while here, and it's possible that a new EXCHANGE_ID has occurred in the interim, and we were assigned a new clientid. Since this is a per-client list, there isn't a lot of value in vetting the clientid on the incoming request. Signed-off-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 41a74620185e2c7666c0fc4bfd7ff2f21fd0cb13 Author: Jeff Layton Date: Sun Mar 18 08:37:01 2018 -0400 nfs4: always reset notified flag to false before repolling for lock We may get a notification and lose the race to another client. Ensure that we wait again for a notification in that case. Signed-off-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 1 + 1 file changed, 1 insertion(+) commit a25a4cb3af177a4cf5621ffbf4fa89ae60c6d4d7 Author: Chuck Lever Date: Fri Mar 16 10:33:55 2018 -0400 sunrpc: Add static trace point to report result of RPC ping This information can help track down local misconfiguration issues as well as network partitions and unresponsive servers. There are several ways to send a ping, and with transport multi- plexing, the exact rpc_xprt that is used is sometimes not known by the upper layer. The rpc_xprt pointer passed to the trace point call also has to be RCU-safe. I found a spot inside the client FSM where an rpc_xprt pointer is always available and safe to use. Suggested-by: Bill Baker Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/trace/events/sunrpc.h | 21 +++++++++++++++++++++ net/sunrpc/clnt.c | 6 ++++++ 2 files changed, 27 insertions(+) commit 40bf7eb304b5659991ed932c0cd5bee6a7c88f4f Author: Chuck Lever Date: Fri Mar 16 10:33:49 2018 -0400 sunrpc: Add static trace point to report RPC latency stats Introduce a low-overhead mechanism to report information about latencies of individual RPCs. The goal is to enable user space to filter the trace record for latency outliers, or build histograms, etc. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/trace/events/sunrpc.h | 45 +++++++++++++++++++++++++++++++++++++++++++ net/sunrpc/stats.c | 16 ++++++++++----- 2 files changed, 56 insertions(+), 5 deletions(-) commit e671edb9428c8a61662aaf8c39f5edced7cc45c7 Author: Chuck Lever Date: Fri Mar 16 10:33:44 2018 -0400 sunrpc: Simplify synopsis of some trace points Clean up: struct rpc_task carries a pointer to a struct rpc_clnt, and in fact task->tk_client is always what is passed into trace points that are already passing @task. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/trace/events/sunrpc.h | 40 +++++++++++++++++++++------------------- net/sunrpc/clnt.c | 2 +- net/sunrpc/sched.c | 10 +++++----- 3 files changed, 27 insertions(+), 25 deletions(-) commit ff699ea8269a02d977c6ee42d58f76efe83a34f9 Author: Chuck Lever Date: Mon Mar 5 15:13:13 2018 -0500 SUNRPC: Make num_reqs a non-atomic integer If recording xprt->stat.max_slots is moved into xprt_alloc_slot, then xprt->num_reqs is never manipulated outside xprt->reserve_lock. There's no longer a need for xprt->num_reqs to be atomic. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/linux/sunrpc/xprt.h | 2 +- net/sunrpc/xprt.c | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) commit 78215759e20d859b8f1de7d0aebd08878fbc4eed Author: Chuck Lever Date: Mon Mar 5 15:13:07 2018 -0500 SUNRPC: Make RTT measurement more precise (Send) Some RPC transports have more overhead in their send_request callouts than others. For example, for RPC-over-RDMA: - Marshaling an RPC often has to DMA map the RPC arguments - Registration methods perform memory registration as part of marshaling To capture just server and network latencies more precisely: when sending a Call, capture the rq_xtime timestamp _after_ the transport header has been marshaled. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprt.c | 1 - net/sunrpc/xprtrdma/transport.c | 1 + net/sunrpc/xprtsock.c | 3 +++ 3 files changed, 4 insertions(+), 1 deletion(-) commit 0b87a46b437c1629bc7d79f3c5a0ba3608c37544 Author: Chuck Lever Date: Mon Mar 5 15:13:02 2018 -0500 SUNRPC: Make RTT measurement more precise (Receive) Some RPC transports have more overhead in their reply handlers than others. For example, for RPC-over-RDMA: - RPC completion has to wait for memory invalidation, which is not a part of the server/network round trip - Recently a context switch was introduced into the reply handler, which further artificially inflates the measure of RPC RTT To capture just server and network latencies more precisely: when receiving a reply, compute the RTT as soon as the XID is recognized rather than at RPC completion time. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ecd465ee88bb6648c06c82b1abae6ec28cf5fccb Author: Chuck Lever Date: Mon Mar 5 15:12:57 2018 -0500 SUNRPC: Move xprt_update_rtt callsite Since commit 33849792cbcd ("xprtrdma: Detect unreachable NFS/RDMA servers more reliably"), the xprtrdma transport now has a ->timer callout. But xprtrdma does not need to compute RTT data, only UDP needs that. Move the xprt_update_rtt call into the UDP transport implementation. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/linux/sunrpc/xprt.h | 1 + net/sunrpc/xprt.c | 11 ++++++++--- net/sunrpc/xprtsock.c | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) commit 2dd4a012d9e73c423a8c48d7e0f2e427caecce3d Author: Chuck Lever Date: Wed Feb 28 15:31:05 2018 -0500 xprtrdma: Move creation of rl_rdmabuf to rpcrdma_create_req Refactor: Both rpcrdma_create_req call sites have to allocate the buffer where the transport header is built, so just move that allocation into rpcrdma_create_req. This buffer is a fixed size. There's no needed information available in call_allocate that is not also available when the transport is created. The original purpose for allocating these buffers on demand was to reduce the possibility that an allocation failure during transport creation will hork the mount operation during low memory scenarios. Some relief for this rare possibility is coming up in the next few patches. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/backchannel.c | 7 ------- net/sunrpc/xprtrdma/transport.c | 25 ------------------------- net/sunrpc/xprtrdma/verbs.c | 14 ++++++++++++-- 3 files changed, 12 insertions(+), 34 deletions(-) commit f2877623082b720c1424b163cf905fff8eed4126 Author: Chuck Lever Date: Wed Feb 28 15:30:59 2018 -0500 xprtrdma: Chain Send to FastReg WRs With FRWR, the client transport can perform memory registration and post a Send with just a single ib_post_send. This reduces contention between the send_request path and the Send Completion handlers, and reduces the overhead of registering a chunk that has multiple segments. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/fmr_ops.c | 11 +++++++++ net/sunrpc/xprtrdma/frwr_ops.c | 51 ++++++++++++++++++++++++++++------------- net/sunrpc/xprtrdma/verbs.c | 3 +-- net/sunrpc/xprtrdma/xprt_rdma.h | 2 ++ 4 files changed, 49 insertions(+), 18 deletions(-) commit fb14ae8853e4f0347950f98e604fa2f4f3b3abe1 Author: Chuck Lever Date: Wed Feb 28 15:30:54 2018 -0500 xprtrdma: "Support" call-only RPCs RPC-over-RDMA version 1 credit accounting relies on there being a response message for every RPC Call. This means that RPC procedures that have no reply will disrupt credit accounting, just in the same way as a retransmit would (since it is sent because no reply has arrived). Deal with the "no reply" case the same way. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/linux/sunrpc/clnt.h | 7 +++++++ net/sunrpc/sunrpc.h | 6 ------ net/sunrpc/xprtrdma/transport.c | 6 ++++++ 3 files changed, 13 insertions(+), 6 deletions(-) commit ae741a855170fa97adabce7e48bdf9de71186a5f Author: Chuck Lever Date: Wed Feb 28 15:30:49 2018 -0500 xprtrdma: Reduce number of MRs created by rpcrdma_mrs_create Create fewer MRs on average. Many workloads don't need as many as 32 MRs, and the transport can now quickly restock the MR free list. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e679d5e7660eb3e75255a4f583d44789ad1b743 Author: Chuck Lever Date: Wed Feb 28 15:30:44 2018 -0500 xprtrdma: ->send_request returns -EAGAIN when there are no free MRs Currently, when the MR free list is exhausted during marshaling, the RPC/RDMA transport places the RPC task on the delayq, which forces a wait for HZ >> 2 before the marshal and send is retried. With this change, the transport now places such an RPC task on the pending queue, and wakes it just as soon as more MRs have been created. Creating more MRs typically takes less than a millisecond, and this waking mechanism is less deadlock-prone. Moreover, the waiting RPC task is holding the transport's write lock, which blocks the transport from sending RPCs. Therefore faster recovery from MR exhaustion is desirable. This is the same mechanism that the TCP transport utilizes when handling write buffer space exhaustion. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/fmr_ops.c | 2 +- net/sunrpc/xprtrdma/frwr_ops.c | 2 +- net/sunrpc/xprtrdma/rpc_rdma.c | 30 +++++++++++++++++++++--------- net/sunrpc/xprtrdma/transport.c | 3 ++- net/sunrpc/xprtrdma/verbs.c | 3 ++- 5 files changed, 27 insertions(+), 13 deletions(-) commit 8a14793e7aa718d16382e18cadec92e2e531e62a Author: Chuck Lever Date: Wed Feb 28 15:30:38 2018 -0500 xprtrdma: Remove xprt-specific connect cookie Clean up: The generic rq_connect_cookie is sufficient to detect RPC Call retransmission. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/transport.c | 6 +----- net/sunrpc/xprtrdma/verbs.c | 2 ++ net/sunrpc/xprtrdma/xprt_rdma.h | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) commit b7e85fff52eec510eac147462615fd6bc580969a Author: Chuck Lever Date: Wed Feb 28 15:30:33 2018 -0500 xprtrdma: Remove arbitrary limit on initiator depth Clean up: We need to check only that the value does not exceed the range of the u8 field it's going into. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 6720a89933739cb8dec748cd253f7c8df2c0ae4d Author: Chuck Lever Date: Wed Feb 28 15:30:27 2018 -0500 xprtrdma: Fix latency regression on NUMA NFS/RDMA clients With v4.15, on one of my NFS/RDMA clients I measured a nearly doubling in the latency of small read and write system calls. There was no change in server round trip time. The extra latency appears in the whole RPC execution path. "git bisect" settled on commit ccede7598588 ("xprtrdma: Spread reply processing over more CPUs") . After some experimentation, I found that leaving the WQ bound and allowing the scheduler to pick the dispatch CPU seems to eliminate the long latencies, and it does not introduce any new regressions. The fix is implemented by reverting only the part of commit ccede7598588 ("xprtrdma: Spread reply processing over more CPUs") that dispatches RPC replies specifically on the CPU where the matching RPC call was made. Interestingly, saving the CPU number and later queuing reply processing there was effective _only_ for a NFS READ and WRITE request. On my NUMA client, in-kernel RPC reply processing for asynchronous RPCs was dispatched on the same CPU where the RPC call was made, as expected. However synchronous RPCs seem to get their reply dispatched on some other CPU than where the call was placed, every time. Fixes: ccede7598588 ("xprtrdma: Spread reply processing over ... ") Signed-off-by: Chuck Lever Cc: stable@vger.kernel.org # v4.15+ Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 2 +- net/sunrpc/xprtrdma/transport.c | 2 -- net/sunrpc/xprtrdma/xprt_rdma.h | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) commit 6cd110a91f52197e3392809cd43466bfe2c524d0 Author: Satoru Takeuchi Date: Fri Sep 22 13:38:19 2017 +0900 ktest: Take submenu into account for grub2 menus grub-reboot selects the submenu's first menuentry (title is "1>0") rather than ktest's menuentry (title is "2") by mistake. === $ sudo cat /boot/grub/grub.cfg | grep -E "^menuentry|^submenu" ... menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option '...' { ... submenu 'Advanced options for Ubuntu' $menuentry_id_option '...' { ... menuentry 'ktest' { ... === Correct it by taking submenu entries into account in get_grub2_index(). Link: http://lkml.kernel.org/r/87poaje4as.wl-satoru.takeuchi@gmail.com Signed-off-by: Satoru Takeuchi Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b30dfd376e28e7f37eda5e2033f6823cdda222b Author: Sinan Kaya Date: Tue Apr 10 14:44:21 2018 -0500 PCI: Mark Broadcom HT1100 and HT2000 Root Port Extended Tags as broken Per PCIe r3.1, sec 2.2.6.2 and 7.8.4, a Requester may not use 8-bit Tags unless its Extended Tag Field Enable is set, but all Receivers/Completers must handle 8-bit Tags correctly regardless of their Extended Tag Field Enable. Some devices do not handle 8-bit Tags as Completers, so add a quirk for them. If we find such a device, we disable Extended Tags for the entire hierarchy to make peer-to-peer DMA possible. The Broadcom HT1100/HT2000/HT2100 seems to have issues with handling 8-bit tags. Mark it as broken. This fixes Xorg hangs and unresponsive keyboards with errors like this: radeon 0000:06:00.0: GPU lockup (current fence id 0x000000000000000e last fence id 0x0000000000000 [drm:r600_ring_test [radeon]] *ERROR* radeon: ring 0 test failed (scratch(0x8504)=0xCAFEDEAD) [drm:r600_resume [radeon]] *ERROR* r600 startup failed on resume Fixes: 60db3a4d8cc9 ("PCI: Enable PCIe Extended Tags if supported") Link: https://bugzilla.kernel.org/show_bug.cgi?id=196197 Signed-off-by: Sinan Kaya Signed-off-by: Bjorn Helgaas CC: stable@vger.kernel.org # v4.11: 62ce94a7a5a5 PCI: Mark Broadcom HT2100 Root Port Extended Tags as broken CC: stable@vger.kernel.org # v4.11 drivers/pci/quirks.c | 4 ++++ 1 file changed, 4 insertions(+) commit b284d4d5a6785f8cd07eda2646a95782373cd01e Merge: a7726f6 9122eed Author: Linus Torvalds Date: Tue Apr 10 12:25:30 2018 -0700 Merge tag 'ceph-for-4.17-rc1' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "The big ticket items are: - support for rbd "fancy" striping (myself). The striping feature bit is now fully implemented, allowing mapping v2 images with non-default striping patterns. This completes support for --image-format 2. - CephFS quota support (Luis Henriques and Zheng Yan). This set is based on the new SnapRealm code in the upcoming v13.y.z ("Mimic") release. Quota handling will be rejected on older filesystems. - memory usage improvements in CephFS (Chengguang Xu). Directory specific bits have been split out of ceph_file_info and some effort went into improving cap reservation code to avoid OOM crashes. Also included a bunch of assorted fixes all over the place from Chengguang and others" * tag 'ceph-for-4.17-rc1' of git://github.com/ceph/ceph-client: (67 commits) ceph: quota: report root dir quota usage in statfs ceph: quota: add counter for snaprealms with quota ceph: quota: cache inode pointer in ceph_snap_realm ceph: fix root quota realm check ceph: don't check quota for snap inode ceph: quota: update MDS when max_bytes is approaching ceph: quota: support for ceph.quota.max_bytes ceph: quota: don't allow cross-quota renames ceph: quota: support for ceph.quota.max_files ceph: quota: add initial infrastructure to support cephfs quotas rbd: remove VLA usage rbd: fix spelling mistake: "reregisteration" -> "reregistration" ceph: rename function drop_leases() to a more descriptive name ceph: fix invalid point dereference for error case in mdsc destroy ceph: return proper bool type to caller instead of pointer ceph: optimize memory usage ceph: optimize mds session register libceph, ceph: add __init attribution to init funcitons ceph: filter out used flags when printing unused open flags ceph: don't wait on writeback when there is no more dirty pages ... commit a7726f6b61e8917e73101bb8071facdff7ec5d72 Merge: 1b02dcb a986c75 Author: Linus Torvalds Date: Tue Apr 10 12:18:50 2018 -0700 Merge tag 'platform-drivers-x86-v4.17-1' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Andy Shevchenko: - Dell SMBIOS driver fixed against memory leaks. - The fujitsu-laptop driver is cleaned up and now supports hotkeys for Lifebook U7x7 models. Besides that the typo introduced by one of previous clean up series has been fixed. - Specific to x86-based laptops HID device now supports KEY_ROTATE_LOCK_TOGGLE event which is emitted, for example, by Wacom MobileStudio Pro 13. - Turbo MAX 3 technology is enabled for the rest of platforms that support Hardware-P-States feature which have core priority described by ACPI CPPC table. - Mellanox on x86 gets better support of I2C bus in use including support of hotpluggable ones. - Silead touchscreen is enabled on two tablet models, i.e Yours Y8W81 and I.T.Works TW701. - From now on the second fan on Thinkpad P50 is supported. - The topstar-laptop driver is reworked to support new models, in particular Topstar U931. * tag 'platform-drivers-x86-v4.17-1' of git://git.infradead.org/linux-platform-drivers-x86: (41 commits) platform/x86: thinkpad_acpi: Add 2nd Fan Support for Thinkpad P50 platform/x86: dell-smbios: Fix memory leaks in build_tokens_sysfs() intel-hid: support KEY_ROTATE_LOCK_TOGGLE intel-hid: clean up and sort header files platform/x86: silead_dmi: Add entry for the Yours Y8W81 tablet platform/x86: fujitsu-laptop: Support Lifebook U7x7 hotkeys platform/x86: mlx-platform: Add physical bus number auto detection platform/mellanox: mlxreg-hotplug: Change input for device create routine platform/x86: mlx-platform: Add deffered bus functionality platform/x86: mlx-platform: Use define for the channel numbers platform/x86: fujitsu-laptop: Revert UNSUPPORTED_CMD back to an int platform/x86: Fix dell driver init order platform/x86: dell-smbios: Resolve dependency error on ACPI_WMI platform/x86: dell-smbios: Resolve dependency error on DCDBAS platform/x86: Allow for SMBIOS backend defaults platform/x86: dell-smbios: Link all dell-smbios-* modules together platform/x86: dell-smbios: Rename dell-smbios source to dell-smbios-base platform/x86: dell-smbios: Correct some style warnings platform/x86: wmi: Fix misuse of vsprintf extension %pULL platform/x86: intel-hid: Reset wakeup capable flag on removal ... commit 1b02dcb9fa530614151d5713684a626a3c93e054 Merge: 92589cb 2ffb850 Author: Linus Torvalds Date: Tue Apr 10 12:14:37 2018 -0700 Merge tag 'dmaengine-4.17-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine updates from Vinod Koul: "This time we have couple of new drivers along with updates to drivers: - new drivers for the DesignWare AXI DMAC and MediaTek High-Speed DMA controllers - stm32 dma and qcom bam dma driver updates - norandom test option for dmatest" * tag 'dmaengine-4.17-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (30 commits) dmaengine: stm32-dma: properly mask irq bits dmaengine: stm32-dma: fix max items per transfer dmaengine: stm32-dma: fix DMA IRQ status handling dmaengine: stm32-dma: Improve memory burst management dmaengine: stm32-dma: fix typo and reported checkpatch warnings dmaengine: stm32-dma: fix incomplete configuration in cyclic mode dmaengine: stm32-dma: threshold manages with bitfield feature dt-bindings: stm32-dma: introduce DMA features bitfield dt-bindings: rcar-dmac: Document r8a77470 support dmaengine: rcar-dmac: Fix too early/late system suspend/resume callbacks dmaengine: dw-axi-dmac: fix spelling mistake: "catched" -> "caught" dmaengine: edma: Check the memory allocation for the memcpy dma device dmaengine: at_xdmac: fix rare residue corruption dmaengine: mediatek: update MAINTAINERS entry with MediaTek DMA driver dmaengine: mediatek: Add MediaTek High-Speed DMA controller for MT7622 and MT7623 SoC dt-bindings: dmaengine: Add MediaTek High-Speed DMA controller bindings dt-bindings: Document the Synopsys DW AXI DMA bindings dmaengine: Introduce DW AXI DMAC driver dmaengine: pl330: fix a race condition in case of threaded irqs dmaengine: imx-sdma: fix pagefault when channel is disabled during interrupt ... commit 92589cbdda677a84ca5e485e1083c7d3bdcfc7b9 Merge: 9ab89c4 730b2ad Author: Linus Torvalds Date: Tue Apr 10 12:09:27 2018 -0700 Merge tag 'rproc-v4.17' of git://github.com/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: - add support for generating coredumps for remoteprocs using devcoredump - add the Qualcomm sysmon driver for intra-remoteproc crash handling - a number of fixes in Qualcomm and IMX drivers * tag 'rproc-v4.17' of git://github.com/andersson/remoteproc: remoteproc: fix null pointer dereference on glink only platforms soc: qcom: qmi: add CONFIG_NET dependency remoteproc: imx_rproc: Slightly simplify code in 'imx_rproc_probe()' remoteproc: imx_rproc: Re-use existing error handling path in 'imx_rproc_probe()' remoteproc: imx_rproc: Fix an error handling path in 'imx_rproc_probe()' samples: Introduce Qualcomm QMI sample client remoteproc: qcom: Introduce sysmon remoteproc: Pass type of shutdown to subdev remove remoteproc: qcom: Register segments for core dump soc: qcom: mdt-loader: Return relocation base remoteproc: Rename "load_rsc_table" to "parse_fw" remoteproc: Add remote processor coredump support remoteproc: Remove null character write of shared mem commit 9ab89c407d904c284558bbcd285eb3baef9d8c07 Merge: f77cfbe 0d72038 Author: Linus Torvalds Date: Tue Apr 10 12:04:54 2018 -0700 Merge tag 'rpmsg-v4.17' of git://github.com/andersson/remoteproc Pull rpmsg updates from Bjorn Andersson: - transition the rpmsg_trysend() code paths of SMD and GLINK to use non-sleeping locks - revert the overly optimistic handling of discovered SMD channels - fix an issue in SMD where incoming messages race with the probing of a client driver * tag 'rpmsg-v4.17' of git://github.com/andersson/remoteproc: rpmsg: smd: Use announce_create to process any receive work rpmsg: Only invoke announce_create for rpdev with endpoints rpmsg: smd: Fix container_of macros Revert "rpmsg: smd: Create device for all channels" rpmsg: glink: Use spinlock in tx path rpmsg: smd: Use spinlock in tx path rpmsg: smd: use put_device() if device_register fail rpmsg: glink: use put_device() if device_register fail commit f77cfbe6455a67d4e9b69f08f07fc62cd11b0674 Merge: 948869f 85fa2cc Author: Linus Torvalds Date: Tue Apr 10 11:50:14 2018 -0700 Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming Pull c6x updates from Mark Salter. * tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming: c6x: pass endianness info to sparse c6x: fix platforms/plldata.c get_coreid build error c6x: remove unused KTHREAD_SIZE definition commit 948869fa9f391664cfe008fa9968a1110bfd14fd Merge: 2a56bb5 a5075e6 Author: Linus Torvalds Date: Tue Apr 10 11:39:22 2018 -0700 Merge tag 'mips_4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips Pull MIPS updates from James Hogan: "These are the main MIPS changes for 4.17. Rough overview: (1) generic platform: Add support for Microsemi Ocelot SoCs (2) crypto: Add CRC32 and CRC32C HW acceleration module (3) Various cleanups and misc improvements More detailed summary: Miscellaneous: - hang more efficiently on halt/powerdown/restart - pm-cps: Block system suspend when a JTAG probe is present - expand make help text for generic defconfigs - refactor handling of legacy defconfigs - determine the entry point from the ELF file header to fix microMIPS for certain toolchains - introduce isa-rev.h for MIPS_ISA_REV and use to simplify other code Minor cleanups: - DTS: boston/ci20: Unit name cleanups and correction - kdump: Make the default for PHYSICAL_START always 64-bit - constify gpio_led in Alchemy, AR7, and TXX9 - silence a couple of W=1 warnings - remove duplicate includes Platform support: Generic platform: - add support for Microsemi Ocelot - dt-bindings: Add vendor prefix for Microsemi Corporation - dt-bindings: Add bindings for Microsemi SoCs - add ocelot SoC & PCB123 board DTS files - MAINTAINERS: Add entry for Microsemi MIPS SoCs - enable crc32-mips on r6 configs ath79: - fix AR724X_PLL_REG_PCIE_CONFIG offset BCM47xx: - firmware: Use mac_pton() for MAC address parsing - add Luxul XAP1500/XWR1750 WiFi LEDs - use standard reset button for Luxul XWR-1750 BMIPS: - enable CONFIG_BRCMSTB_PM in bmips_stb_defconfig for build coverage - add STB PM, wake-up timer, watchdog DT nodes Octeon: - drop '.' after newlines in printk calls ralink: - pci-mt7621: Enable PCIe on MT7688" * tag 'mips_4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips: (37 commits) MIPS: BCM47XX: Use standard reset button for Luxul XWR-1750 MIPS: BCM47XX: Add Luxul XAP1500/XWR1750 WiFi LEDs MIPS: Make the default for PHYSICAL_START always 64-bit MIPS: Use the entry point from the ELF file header MAINTAINERS: Add entry for Microsemi MIPS SoCs MIPS: generic: Add support for Microsemi Ocelot MIPS: mscc: Add ocelot PCB123 device tree MIPS: mscc: Add ocelot dtsi dt-bindings: mips: Add bindings for Microsemi SoCs dt-bindings: Add vendor prefix for Microsemi Corporation MIPS: ath79: Fix AR724X_PLL_REG_PCIE_CONFIG offset MIPS: pci-mt7620: Enable PCIe on MT7688 MIPS: pm-cps: Block system suspend when a JTAG probe is present MIPS: VDSO: Replace __mips_isa_rev with MIPS_ISA_REV MIPS: BPF: Replace __mips_isa_rev with MIPS_ISA_REV MIPS: cpu-features.h: Replace __mips_isa_rev with MIPS_ISA_REV MIPS: Introduce isa-rev.h to define MIPS_ISA_REV MIPS: Hang more efficiently on halt/powerdown/restart FIRMWARE: bcm47xx_nvram: Replace mac address parsing MIPS: BMIPS: Add Broadcom STB watchdog nodes ... commit 2a56bb596b2c1fb612f9988afda9655c8c872a6e Merge: 9f3a094 b0dc52f Author: Linus Torvalds Date: Tue Apr 10 11:27:30 2018 -0700 Merge tag 'trace-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "New features: - Tom Zanussi's extended histogram work. This adds the synthetic events to have histograms from multiple event data Adds triggers "onmatch" and "onmax" to call the synthetic events Several updates to the histogram code from this - Allow way to nest ring buffer calls in the same context - Allow absolute time stamps in ring buffer - Rewrite of filter code parsing based on Al Viro's suggestions - Setting of trace_clock to global if TSC is unstable (on boot) - Better OOM handling when allocating large ring buffers - Added initcall tracepoints (consolidated initcall_debug code with them) And other various fixes and clean ups" * tag 'trace-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (68 commits) init: Have initcall_debug still work without CONFIG_TRACEPOINTS init, tracing: Have printk come through the trace events for initcall_debug init, tracing: instrument security and console initcall trace events init, tracing: Add initcall trace events tracing: Add rcu dereference annotation for test func that touches filter->prog tracing: Add rcu dereference annotation for filter->prog tracing: Fixup logic inversion on setting trace_global_clock defaults tracing: Hide global trace clock from lockdep ring-buffer: Add set/clear_current_oom_origin() during allocations ring-buffer: Check if memory is available before allocation lockdep: Add print_irqtrace_events() to __warn vsprintf: Do not preprocess non-dereferenced pointers for bprintf (%px and %pK) tracing: Uninitialized variable in create_tracing_map_fields() tracing: Make sure variable string fields are NULL-terminated tracing: Add action comparisons when testing matching hist triggers tracing: Don't add flag strings when displaying variable references tracing: Fix display of hist trigger expressions containing timestamps ftrace: Drop a VLA in module_exists() tracing: Mention trace_clock=global when warning about unstable clocks tracing: Default to using trace_global_clock if sched_clock is unstable ... commit 6c64fe7f2adcee21d7c4247f1ec021fd18428fc4 Author: Jonathan Helman Date: Mon Mar 19 15:14:14 2018 -0700 virtio_balloon: export hugetlb page allocation counts Export the number of successful and failed hugetlb page allocations via the virtio balloon driver. These 2 counts come directly from the vm_events HTLB_BUDDY_PGALLOC and HTLB_BUDDY_PGALLOC_FAIL. Signed-off-by: Jonathan Helman Signed-off-by: Michael S. Tsirkin Reviewed-by: Jason Wang drivers/virtio/virtio_balloon.c | 6 ++++++ include/uapi/linux/virtio_balloon.h | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 50268a3d266ecfdd6c5873d62b2758d9732fc598 Author: Masami Hiramatsu Date: Tue Apr 10 21:20:08 2018 +0900 tracing/uprobe_event: Fix strncpy corner case Fix string fetch function to terminate with NUL. It is OK to drop the rest of string. Signed-off-by: Masami Hiramatsu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Song Liu Cc: Thomas Gleixner Cc: security@kernel.org Cc: 范龙飞 Fixes: 5baaa59ef09e ("tracing/probes: Implement 'memory' fetch method for uprobes") Signed-off-by: Ingo Molnar kernel/trace/trace_uprobe.c | 2 ++ 1 file changed, 2 insertions(+) commit 9f3a0941fb5efaa4d27911e251dc595034d58baa Merge: fbe173e e13e75b Author: Linus Torvalds Date: Tue Apr 10 10:25:57 2018 -0700 Merge tag 'libnvdimm-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updates from Dan Williams: "This cycle was was not something I ever want to repeat as there were several late changes that have only now just settled. Half of the branch up to commit d2c997c0f145 ("fs, dax: use page->mapping to warn...") have been in -next for several releases. The of_pmem driver and the address range scrub rework were late arrivals, and the dax work was scaled back at the last moment. The of_pmem driver missed a previous merge window due to an oversight. A sense of obligation to rectify that miss is why it is included for 4.17. It has acks from PowerPC folks. Stephen reported a build failure that only occurs when merging it with your latest tree, for now I have fixed that up by disabling modular builds of of_pmem. A test merge with your tree has received a build success report from the 0day robot over 156 configs. An initial version of the ARS rework was submitted before the merge window. It is self contained to libnvdimm, a net code reduction, and passing all unit tests. The filesystem-dax changes are based on the wait_var_event() functionality from tip/sched/core. However, late review feedback showed that those changes regressed truncate performance to a large degree. The branch was rewound to drop the truncate behavior change and now only includes preparation patches and cleanups (with full acks and reviews). The finalization of this dax-dma-vs-trnucate work will need to wait for 4.18. Summary: - A rework of the filesytem-dax implementation provides for detection of unmap operations (truncate / hole punch) colliding with in-progress device-DMA. A fix for these collisions remains a work-in-progress pending resolution of truncate latency and starvation regressions. - The of_pmem driver expands the users of libnvdimm outside of x86 and ACPI to describe an implementation of persistent memory on PowerPC with Open Firmware / Device tree. - Address Range Scrub (ARS) handling is completely rewritten to account for the fact that ARS may run for 100s of seconds and there is no platform defined way to cancel it. ARS will now no longer block namespace initialization. - The NVDIMM Namespace Label implementation is updated to handle label areas as small as 1K, down from 128K. - Miscellaneous cleanups and updates to unit test infrastructure" * tag 'libnvdimm-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (39 commits) libnvdimm, of_pmem: workaround OF_NUMA=n build error nfit, address-range-scrub: add module option to skip initial ars nfit, address-range-scrub: rework and simplify ARS state machine nfit, address-range-scrub: determine one platform max_ars value powerpc/powernv: Create platform devs for nvdimm buses doc/devicetree: Persistent memory region bindings libnvdimm: Add device-tree based driver libnvdimm: Add of_node to region and bus descriptors libnvdimm, region: quiet region probe libnvdimm, namespace: use a safe lookup for dimm device name libnvdimm, dimm: fix dpa reservation vs uninitialized label area libnvdimm, testing: update the default smart ctrl_temperature libnvdimm, testing: Add emulation for smart injection commands nfit, address-range-scrub: introduce nfit_spa->ars_state libnvdimm: add an api to cast a 'struct nd_region' to its 'struct device' nfit, address-range-scrub: fix scrub in-progress reporting dax, dm: allow device-mapper to operate without dax support dax: introduce CONFIG_DAX_DRIVER fs, dax: use page->mapping to warn if truncate collides with a busy page ext2, dax: introduce ext2_dax_aops ... commit fbe173e3ffbd897b5a859020d714c0eaf4af2a1a Merge: 5e630af 1485991 Author: Linus Torvalds Date: Tue Apr 10 10:22:27 2018 -0700 Merge tag 'rtc-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "This contains a few series that have been in preparation for a while and that will help systems with RTCs that will fail in 2038, 2069 or 2100. Subsystem: - Add tracepoints - Rework of the RTC/nvmem API to allow drivers to discard struct nvmem_config after registration - New range API, drivers can now expose the useful range of the RTC - New offset API the core is now able to add an offset to the RTC time, modifying the supported range. - Multiple rtc_time64_to_tm fixes - Handle time_t overflow on 32 bit platforms in the core instead of letting drivers do crazy things. - remove rtc_control API New driver: - Intersil ISL12026 Drivers: - Drivers exposing the RTC non volatile memory have been converted to use nvmem - Removed useless time and date validation - Removed an indirection pattern that was a cargo cult from ancient drivers - Removed VLA usage - Fixed a possible race condition in probe functions - AB8540 support is dropped from ab8500 - pcf85363 now has alarm support" * tag 'rtc-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (128 commits) rtc: snvs: Fix usage of snvs_rtc_enable rtc: mt7622: fix module autoloading for OF platform drivers rtc: isl12022: use true and false for boolean values rtc: ab8500: Drop AB8540 support rtc: remove a warning during scripts/kernel-doc step rtc: 88pm860x: remove artificial limitation rtc: 88pm80x: remove artificial limitation rtc: st-lpc: remove artificial limitation rtc: mrst: remove artificial limitation rtc: mv: remove artificial limitation rtc: hctosys: Ensure system time doesn't overflow time_t parisc: time: stop validating rtc_time in .read_time rtc: pcf85063: fix clearing bits in pcf85063_start_clock rtc: at91sam9: Set name of regmap_config rtc: s5m: Remove VLA usage rtc: s5m: Move enum from rtc.h to rtc-s5m.c rtc: remove VLA usage rtc: Add useful timestamp definitions rtc: Add one offset seconds to expand RTC range rtc: Factor out the RTC range validation into rtc_valid_range() ... commit 5e630afdcb82779f5bf03fd4a5e86adc56fe7c8a Merge: 7aa1cf2 7c9b845 Author: Linus Torvalds Date: Tue Apr 10 10:20:00 2018 -0700 Merge tag 'fbdev-v4.17' of git://github.com/bzolnier/linux Pull fbdev updates from Bartlomiej Zolnierkiewicz: "There is nothing really major here, just a couple of small bugfixes, improvements and cleanups: - make it possible to load radeonfb driver when offb driver is loaded first (Mathieu Malaterre) - fix memory leak in offb driver (Mathieu Malaterre) - fix unaligned access in udlfb driver (Ladislav Michl) - convert atmel_lcdfb driver to use GPIO descriptors (Ludovic Desroches) - avoid mismatched prototypes in sisfb driver (Arnd Bergmann) - remove VLA usage from viafb driver (Gustavo A. R. Silva) - add missing help text to FB_I810_I2 config option (Ulf Magnusson) - misc fixes (Gustavo A. R. Silva, Colin Ian King, Markus Elfring) - remove dead code from s3c-fb driver for Exynos and S5PV210 platforms - misc cleanups (Corentin Labbe, Ladislav Michl, Ulf Magnusson, Vladimir Zapolskiy, Markus Elfring)" * tag 'fbdev-v4.17' of git://github.com/bzolnier/linux: (32 commits) video: fbdev: s3c-fb: remove dead platform code for Exynos and S5PV210 platforms video: au1100fb: Delete an unnecessary variable initialisation in au1100fb_drv_probe() video: au1100fb: Improve a size determination in au1100fb_drv_probe() video: au1100fb: Delete an error message for a failed memory allocation in au1100fb_drv_probe() video/console/sticore: Delete an error message for a failed memory allocation in sti_try_rom_generic() video: ARM CLCD: Improve a size determination in clcdfb_probe() video: ARM CLCD: Delete an error message for a failed memory allocation in clcdfb_probe() video: matroxfb: Delete an error message for a failed memory allocation in matroxfb_crtc2_probe() video: s3c-fb: Improve a size determination in s3c_fb_probe() video: s3c-fb: Delete an error message for a failed memory allocation in s3c_fb_probe() video: fsl-diu-fb: Delete an error message for a failed memory allocation in fsl_diu_init() video: ssd1307fb: Improve a size determination in ssd1307fb_probe() video: smscufx: Delete an error message for a failed memory allocation in ufx_realloc_framebuffer() video: smscufx: Return an error code only as a constant in ufx_realloc_framebuffer() video: smscufx: Less checks in ufx_usb_probe() after error detection video: udlfb: Return an error code only as a constant in dlfb_realloc_framebuffer() video/fbdev/stifb: Delete an error message for a failed memory allocation in stifb_init_fb() video/fbdev/stifb: Return -ENOMEM after a failed kzalloc() in stifb_init_fb() video: fbdev: aty128fb: use true and false for boolean values fbdev: aty: fix missing indentation in if statement ... commit 7aa1cf254ca66bc9602bc5adef5bf1d611869a69 Merge: d362600 e1a3a98 Author: Linus Torvalds Date: Tue Apr 10 10:16:04 2018 -0700 Merge tag 'sound-fix-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "The main purpose of this pull request is a fix for a regression in the recent PCM OSS emulation code that may lead to RCU stall. Since syzkaller hits this too often, I send the pull request now with a minimal collection. Possibly another pull request may follow before RC1. The other fixes here are for USB-audio class 2 and 3 to improve the parser for the clock descriptors. These are rather cleanups but good for security, too. Last but not least, another included fix is the trivial one to remove superfluous WARN_ON() that annoyed syzbot" * tag 'sound-fix-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: pcm: Remove WARN_ON() at snd_pcm_hw_params() error ALSA: pcm: Fix endless loop for XRUN recovery in OSS emulation ALSA: usb-audio: Add sanity checks in UAC3 clock parsers ALSA: usb-audio: More strict sanity checks for clock parsers ALSA: usb-audio: Refactor clock finder helpers commit d36260050e1881dce09625a9352d8729c911a6e3 Merge: 71219b3 a95845b Author: Linus Torvalds Date: Tue Apr 10 10:10:30 2018 -0700 Merge tag 'media/v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "A series of media updates/fixes for 4.17. There are two important core fix patches in this series: - A regression fix on Kernel 4.16 with causes it to not work with some input devices that depend on media core - A fix at compat32 bits with causes it to OOPS on overlay, and affects the Kernels where the CVE-2017-13166 was backported The remaining ones are other random fixes at the documentation and on drivers. The biggest part of this series is a set of 18 patches for the Intel atomisp driver. Currently, it produces hundreds of warnings/errors on sparse/smatch, causing me to sometimes ignore new warnings on other drivers that are not so broken. This driver is on really poor state, even for staging standards: it has several layers of abstraction on it, and it supports two different hardware. Selecting between them require to add a define (there isn't even a Kconfig option for such purpose). Just on this smatch cleanup, I could easily get rid of 8 "do-nothing" files. So, I'm seriously considering its removal from upstream, if I don't see any real work on addressing the problems there along this year" * tag 'media/v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (48 commits) media: v4l2-core: fix size of devnode_nums[] bitarray media: v4l2-compat-ioctl32: don't oops on overlay media: i2c: adv748x: afe: fix sparse warning media: extended-controls.rst: transmitter -> receiver media: staging: atomisp: stop duplicating input format types media: staging: atomisp: get rid of an unused var media: staging: atomisp: stop mixing enum types media: staging: atomisp: get rid of some static warnings media: staging: atomisp: use %p to print pointers media: staging: atomisp: remove an useless check media: staging: atomisp: avoid a warning if 32 bits build media: staging: atomisp: don't access a NULL var media: staging: atomisp: Get rid of *default.host.[ch] media: staging: atomisp: get rid of an unused function media: staging: atomisp: remove unused set_pd_base() media: staging: atomisp: fix endianess issues media: staging: atomisp: add a missing include media: staging: atomisp: get rid of stupid statements media: staging: atomisp: declare static vars as such media: staging: atomisp: ia_css_output.host: don't use var before check ... commit 4919d42ab69a4e4601f3cd20a9540f3835e0dd48 Author: Darrick J. Wong Date: Tue Apr 10 08:28:33 2018 -0700 xfs: only cancel cow blocks when truncating the data fork In xfs_itruncate_extents, only cancel cow blocks and clear the reflink flag if we were asked to truncate the data fork. Attr fork blocks cannot be shared, so this makes no sense. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_inode.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 4d5f26ee310237552a36aa14ceee96d6659153cd Author: Colin Ian King Date: Tue Apr 10 13:38:56 2018 +0100 kvm: selftests: fix spelling mistake: "divisable" and "divisible" Trivial fix to spelling mistakes in comment and message text Signed-off-by: Colin Ian King Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/kvm_util.c | 2 +- tools/testing/selftests/kvm/lib/sparsebit.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 386c6ddbda180676b7d9fc375d54a7bdd353d39e Author: KarimAllah Ahmed Date: Tue Apr 10 14:15:46 2018 +0200 X86/VMX: Disable VMX preemption timer if MWAIT is not intercepted The VMX-preemption timer is used by KVM as a way to set deadlines for the guest (i.e. timer emulation). That was safe till very recently when capability KVM_X86_DISABLE_EXITS_MWAIT to disable intercepting MWAIT was introduced. According to Intel SDM 25.5.1: """ The VMX-preemption timer operates in the C-states C0, C1, and C2; it also operates in the shutdown and wait-for-SIPI states. If the timer counts down to zero in any state other than the wait-for SIPI state, the logical processor transitions to the C0 C-state and causes a VM exit; the timer does not cause a VM exit if it counts down to zero in the wait-for-SIPI state. The timer is not decremented in C-states deeper than C2. """ Now once the guest issues the MWAIT with a c-state deeper than C2 the preemption timer will never wake it up again since it stopped ticking! Usually this is compensated by other activities in the system that would wake the core from the deep C-state (and cause a VMExit). For example, if the host itself is ticking or it received interrupts, etc! So disable the VMX-preemption timer if MWAIT is exposed to the guest! Cc: Paolo Bonzini Cc: Radim Krčmář Cc: kvm@vger.kernel.org Signed-off-by: KarimAllah Ahmed Fixes: 4d5422cea3b61f158d58924cbb43feada456ba5c Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 1cc5954f44150bb70cac07c3cc5df7cf0dfb61ec Author: Sabrina Dubroca Date: Tue Apr 10 12:57:18 2018 +0200 ip_gre: clear feature flags when incompatible o_flags are set Commit dd9d598c6657 ("ip_gre: add the support for i/o_flags update via netlink") added the ability to change o_flags, but missed that the GSO/LLTX features are disabled by default, and only enabled some gre features are unused. Thus we also need to disable the GSO/LLTX features on the device when the TUNNEL_SEQ or TUNNEL_CSUM flags are set. These two examples should result in the same features being set: ip link add gre_none type gre local 192.168.0.10 remote 192.168.0.20 ttl 255 key 0 ip link set gre_none type gre seq ip link add gre_seq type gre local 192.168.0.10 remote 192.168.0.20 ttl 255 key 1 seq Fixes: dd9d598c6657 ("ip_gre: add the support for i/o_flags update via netlink") Signed-off-by: Sabrina Dubroca Reviewed-by: Xin Long Acked-by: William Tu Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9564a8cf422d7b58f6e857e3546d346fa970191e Author: Rasmus Villemoes Date: Sun Apr 8 23:35:28 2018 +0200 Kbuild: fix # escaping in .cmd files for future Make I tried building using a freshly built Make (4.2.1-69-g8a731d1), but already the objtool build broke with orc_dump.c: In function ‘orc_dump’: orc_dump.c:106:2: error: ‘elf_getshnum’ is deprecated [-Werror=deprecated-declarations] if (elf_getshdrnum(elf, &nr_sections)) { Turns out that with that new Make, the backslash was not removed, so cpp didn't see a #include directive, grep found nothing, and -DLIBELF_USE_DEPRECATED was wrongly put in CFLAGS. Now, that new Make behaviour is documented in their NEWS file: * WARNING: Backward-incompatibility! Number signs (#) appearing inside a macro reference or function invocation no longer introduce comments and should not be escaped with backslashes: thus a call such as: foo := $(shell echo '#') is legal. Previously the number sign needed to be escaped, for example: foo := $(shell echo '\#') Now this latter will resolve to "\#". If you want to write makefiles portable to both versions, assign the number sign to a variable: C := \# foo := $(shell echo '$C') This was claimed to be fixed in 3.81, but wasn't, for some reason. To detect this change search for 'nocomment' in the .FEATURES variable. This also fixes up the two make-cmd instances to replace # with $(pound) rather than with \#. There might very well be other places that need similar fixup in preparation for whatever future Make release contains the above change, but at least this builds an x86_64 defconfig with the new make. Link: https://bugzilla.kernel.org/show_bug.cgi?id=197847 Cc: Randy Dunlap Signed-off-by: Rasmus Villemoes Signed-off-by: Masahiro Yamada scripts/Kbuild.include | 5 +++-- tools/build/Build.include | 5 +++-- tools/objtool/Makefile | 2 +- tools/scripts/Makefile.include | 2 ++ 4 files changed, 9 insertions(+), 5 deletions(-) commit a774635db5c430cbf21fa5d2f2df3d23aaa8e782 Author: Li RongQing Date: Tue Apr 10 09:16:06 2018 +0800 x86/apic: Fix signedness bug in APIC ID validity checks The APIC ID as parsed from ACPI MADT is validity checked with the apic->apic_id_valid() callback, which depends on the selected APIC type. For non X2APIC types APIC IDs >= 0xFF are invalid, but values > 0x7FFFFFFF are detected as valid. This happens because the 'apicid' argument of the apic_id_valid() callback is type 'int'. So the resulting comparison apicid < 0xFF evaluates to true for all unsigned int values > 0x7FFFFFFF which are handed to default_apic_id_valid(). As a consequence, invalid APIC IDs in !X2APIC mode are considered valid and accounted as possible CPUs. Change the apicid argument type of the apic_id_valid() callback to u32 so the evaluation is unsigned and returns the correct result. [ tglx: Massaged changelog ] Signed-off-by: Li RongQing Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Cc: jgross@suse.com Cc: Dou Liyang Cc: Peter Zijlstra Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/1523322966-10296-1-git-send-email-lirongqing@baidu.com arch/x86/include/asm/apic.h | 4 ++-- arch/x86/kernel/acpi/boot.c | 13 ++++++++----- arch/x86/kernel/apic/apic_common.c | 2 +- arch/x86/kernel/apic/apic_numachip.c | 2 +- arch/x86/kernel/apic/x2apic.h | 2 +- arch/x86/kernel/apic/x2apic_phys.c | 2 +- arch/x86/kernel/apic/x2apic_uv_x.c | 2 +- arch/x86/xen/apic.c | 2 +- 8 files changed, 16 insertions(+), 13 deletions(-) commit 3c9f2157a23bffc0175675c8c5fb8466dcfd0780 Author: Neil Armstrong Date: Tue Apr 10 10:43:45 2018 +0200 MAINTAINERS: Migrate oxnas list to groups.io The linux-oxnas migrates from tuxfamily to groups.io for a simpler administration and maintainance. Signed-off-by: Neil Armstrong Signed-off-by: Arnd Bergmann MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d893c4de012ad586400d9ccf5143884eafd8d841 Author: Tomer Maimon Date: Sun Apr 8 17:03:17 2018 +0300 arm: npcm: enable L2 cache in NPCM7xx architecture This patch Enable ARM L2 cache module in Nuvoton NPCM7xx BMC by adding L2 cache parameters into NPCM7xx DT machine start structure. At patch V7 arm: npcm: add basic support for Nuvoton BMCs we got comments regarding the flags use in L2 cache module. - https://www.spinics.net/lists/arm-kernel/msg613212.html After checking again the L2 cache use in the NPCM7xx, the only L2 cache flag we need to set is L2C_AUX_CTRL_SHARED_OVERRIDE and it is done in the device tree: https://patchwork.kernel.org/patch/10063497/ L2 cache flag mask allowed all the flag option. Signed-off-by: Tomer Maimon Signed-off-by: Arnd Bergmann arch/arm/mach-npcm/npcm7xx.c | 2 ++ 1 file changed, 2 insertions(+) commit a93f00b3762026dd8231f473fae9346bda07db03 Author: Mathieu Malaterre Date: Fri Apr 6 22:14:51 2018 +0200 backing: silence compiler warning using __printf __printf marker was added in commit d2cc4dde9206 ("bdi_register: add __printf verification, fix arg mismatch") for function `bdi_register` since it is useful to verify format and arguments. Apply equivalent gcc attribute to `bdi_register_va`. Remove warning triggered with W=1: mm/backing-dev.c:881:2: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] Reviewed-by: Jan Kara Signed-off-by: Mathieu Malaterre Signed-off-by: Jens Axboe include/linux/backing-dev.h | 1 + 1 file changed, 1 insertion(+) commit 37c7c6c76d431dd7ef9c29d95f6052bd425f004c Author: Ming Lei Date: Sun Apr 8 17:48:14 2018 +0800 blk-mq: remove code for dealing with remapping queue Firstly, from commit 4b855ad37194 ("blk-mq: Create hctx for each present CPU), blk-mq doesn't remap queue any more after CPU topo is changed. Secondly, set->nr_hw_queues can't be bigger than nr_cpu_ids, and now we map all possible CPUs to hw queues, so at least one CPU is mapped to each hctx. So queue mapping has became static and fixed just like percpu variable, and we don't need to handle queue remapping any more. Cc: Stefan Haberland Tested-by: Christian Borntraeger Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) commit 127276c6ce5a30fcc806b7fe53015f4f89b62956 Author: Ming Lei Date: Sun Apr 8 17:48:13 2018 +0800 blk-mq: reimplement blk_mq_hw_queue_mapped Now the actual meaning of queue mapped is that if there is any online CPU mapped to this hctx, so implement blk_mq_hw_queue_mapped() in this way. Cc: Stefan Haberland Tested-by: Christian Borntraeger Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efea8450c3d2d3918029b36f59ef612be57d91ae Author: Ming Lei Date: Sun Apr 8 17:48:12 2018 +0800 blk-mq: don't check queue mapped in __blk_mq_delay_run_hw_queue() There are several reasons for removing the check: 1) blk_mq_hw_queue_mapped() returns true always now since each hctx may be mapped by one CPU at least 2) when there isn't any online CPU mapped to this hctx, there won't be any IO queued to this CPU, blk_mq_run_hw_queue() only runs queue if there is IO queued to this hctx 3) If __blk_mq_delay_run_hw_queue() is called by blk_mq_delay_run_hw_queue(), which is run from blk_mq_dispatch_rq_list() or scsi_mq_get_budget(), and the hctx to be handled has to be mapped. Cc: Stefan Haberland Tested-by: Christian Borntraeger Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 3 --- 1 file changed, 3 deletions(-) commit 15fe8a90bb45b953ca36f074194fcb519a05fdec Author: Ming Lei Date: Sun Apr 8 17:48:11 2018 +0800 blk-mq: remove blk_mq_delay_queue() No driver uses this interface any more, so remove it. Cc: Stefan Haberland Tested-by: Christian Borntraeger Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 1 - block/blk-mq.c | 30 ++---------------------------- include/linux/blk-mq.h | 2 -- 3 files changed, 2 insertions(+), 31 deletions(-) commit f82ddf1923b90f89665d08cf219287c8f9deb739 Author: Ming Lei Date: Sun Apr 8 17:48:10 2018 +0800 blk-mq: introduce blk_mq_hw_queue_first_cpu() to figure out first cpu This patch introduces helper of blk_mq_hw_queue_first_cpu() for figuring out the hctx's first cpu, and code duplication can be avoided. Cc: Stefan Haberland Tested-by: Christian Borntraeger Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 476f8c98a9bccccbb97866974ffc80879adf2bbb Author: Ming Lei Date: Sun Apr 8 17:48:09 2018 +0800 blk-mq: avoid to write intermediate result to hctx->next_cpu This patch figures out the final selected CPU, then writes it to hctx->next_cpu once, then we can avoid to intermediate next cpu observed from other dispatch paths. Cc: Stefan Haberland Tested-by: Christian Borntraeger Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit bffa9909a6b48d8ca3398dec601bc9162a4020c4 Author: Ming Lei Date: Sun Apr 8 17:48:08 2018 +0800 blk-mq: don't keep offline CPUs mapped to hctx 0 From commit 4b855ad37194 ("blk-mq: Create hctx for each present CPU), blk-mq doesn't remap queue after CPU topo is changed, that said when some of these offline CPUs become online, they are still mapped to hctx 0, then hctx 0 may become the bottleneck of IO dispatch and completion. This patch sets up the mapping from the beginning, and aligns to queue mapping for PCI device (blk_mq_pci_map_queues()). Cc: Stefan Haberland Cc: Keith Busch Cc: stable@vger.kernel.org Fixes: 4b855ad37194 ("blk-mq: Create hctx for each present CPU) Tested-by: Christian Borntraeger Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-cpumap.c | 5 ----- 1 file changed, 5 deletions(-) commit a1c735fb790745f94a359df45c11df4a69760389 Author: Ming Lei Date: Sun Apr 8 17:48:07 2018 +0800 blk-mq: make sure that correct hctx->next_cpu is set From commit 20e4d81393196 (blk-mq: simplify queue mapping & schedule with each possisble CPU), one hctx can be mapped from all offline CPUs, then hctx->next_cpu can be set as wrong. This patch fixes this issue by making hctx->next_cpu pointing to the first CPU in hctx->cpumask if all CPUs in hctx->cpumask are offline. Cc: Stefan Haberland Tested-by: Christian Borntraeger Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Fixes: 20e4d81393196 ("blk-mq: simplify queue mapping & schedule with each possisble CPU") Cc: stable@vger.kernel.org Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 2 ++ 1 file changed, 2 insertions(+) commit bdac616db9bbadb90b7d6a406144571015e138f7 Author: Omar Sandoval Date: Fri Apr 6 09:57:03 2018 -0700 loop: fix LOOP_GET_STATUS lock imbalance Commit 2d1d4c1e591f made loop_get_status() drop lo_ctx_mutex before returning, but the loop_get_status_old(), loop_get_status64(), and loop_get_status_compat() wrappers don't call loop_get_status() if the passed argument is NULL. The callers expect that the lock is dropped, so make sure we drop it in that case, too. Reported-by: syzbot+31e8daa8b3fc129e75f2@syzkaller.appspotmail.com Fixes: 2d1d4c1e591f ("loop: don't call into filesystem while holding lo_ctl_mutex") Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/loop.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit 1e047eaab3bb5564f25b41e9cd3a053009f4e789 Author: Tetsuo Handa Date: Fri Apr 6 10:03:17 2018 +0900 block/loop: fix deadlock after loop_set_status syzbot is reporting deadlocks at __blkdev_get() [1]. ---------------------------------------- [ 92.493919] systemd-udevd D12696 525 1 0x00000000 [ 92.495891] Call Trace: [ 92.501560] schedule+0x23/0x80 [ 92.502923] schedule_preempt_disabled+0x5/0x10 [ 92.504645] __mutex_lock+0x416/0x9e0 [ 92.510760] __blkdev_get+0x73/0x4f0 [ 92.512220] blkdev_get+0x12e/0x390 [ 92.518151] do_dentry_open+0x1c3/0x2f0 [ 92.519815] path_openat+0x5d9/0xdc0 [ 92.521437] do_filp_open+0x7d/0xf0 [ 92.527365] do_sys_open+0x1b8/0x250 [ 92.528831] do_syscall_64+0x6e/0x270 [ 92.530341] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 92.931922] 1 lock held by systemd-udevd/525: [ 92.933642] #0: 00000000a2849e25 (&bdev->bd_mutex){+.+.}, at: __blkdev_get+0x73/0x4f0 ---------------------------------------- The reason of deadlock turned out that wait_event_interruptible() in blk_queue_enter() got stuck with bdev->bd_mutex held at __blkdev_put() due to q->mq_freeze_depth == 1. ---------------------------------------- [ 92.787172] a.out S12584 634 633 0x80000002 [ 92.789120] Call Trace: [ 92.796693] schedule+0x23/0x80 [ 92.797994] blk_queue_enter+0x3cb/0x540 [ 92.803272] generic_make_request+0xf0/0x3d0 [ 92.807970] submit_bio+0x67/0x130 [ 92.810928] submit_bh_wbc+0x15e/0x190 [ 92.812461] __block_write_full_page+0x218/0x460 [ 92.815792] __writepage+0x11/0x50 [ 92.817209] write_cache_pages+0x1ae/0x3d0 [ 92.825585] generic_writepages+0x5a/0x90 [ 92.831865] do_writepages+0x43/0xd0 [ 92.836972] __filemap_fdatawrite_range+0xc1/0x100 [ 92.838788] filemap_write_and_wait+0x24/0x70 [ 92.840491] __blkdev_put+0x69/0x1e0 [ 92.841949] blkdev_close+0x16/0x20 [ 92.843418] __fput+0xda/0x1f0 [ 92.844740] task_work_run+0x87/0xb0 [ 92.846215] do_exit+0x2f5/0xba0 [ 92.850528] do_group_exit+0x34/0xb0 [ 92.852018] SyS_exit_group+0xb/0x10 [ 92.853449] do_syscall_64+0x6e/0x270 [ 92.854944] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 92.943530] 1 lock held by a.out/634: [ 92.945105] #0: 00000000a2849e25 (&bdev->bd_mutex){+.+.}, at: __blkdev_put+0x3c/0x1e0 ---------------------------------------- The reason of q->mq_freeze_depth == 1 turned out that loop_set_status() forgot to call blk_mq_unfreeze_queue() at error paths for info->lo_encrypt_type != NULL case. ---------------------------------------- [ 37.509497] CPU: 2 PID: 634 Comm: a.out Tainted: G W 4.16.0+ #457 [ 37.513608] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/19/2017 [ 37.518832] RIP: 0010:blk_freeze_queue_start+0x17/0x40 [ 37.521778] RSP: 0018:ffffb0c2013e7c60 EFLAGS: 00010246 [ 37.524078] RAX: 0000000000000000 RBX: ffff8b07b1519798 RCX: 0000000000000000 [ 37.527015] RDX: 0000000000000002 RSI: ffffb0c2013e7cc0 RDI: ffff8b07b1519798 [ 37.529934] RBP: ffffb0c2013e7cc0 R08: 0000000000000008 R09: 47a189966239b898 [ 37.532684] R10: dad78b99b278552f R11: 9332dca72259d5ef R12: ffff8b07acd73678 [ 37.535452] R13: 0000000000004c04 R14: 0000000000000000 R15: ffff8b07b841e940 [ 37.538186] FS: 00007fede33b9740(0000) GS:ffff8b07b8e80000(0000) knlGS:0000000000000000 [ 37.541168] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 37.543590] CR2: 00000000206fdf18 CR3: 0000000130b30006 CR4: 00000000000606e0 [ 37.546410] Call Trace: [ 37.547902] blk_freeze_queue+0x9/0x30 [ 37.549968] loop_set_status+0x67/0x3c0 [loop] [ 37.549975] loop_set_status64+0x3b/0x70 [loop] [ 37.549986] lo_ioctl+0x223/0x810 [loop] [ 37.549995] blkdev_ioctl+0x572/0x980 [ 37.550003] block_ioctl+0x34/0x40 [ 37.550006] do_vfs_ioctl+0xa7/0x6d0 [ 37.550017] ksys_ioctl+0x6b/0x80 [ 37.573076] SyS_ioctl+0x5/0x10 [ 37.574831] do_syscall_64+0x6e/0x270 [ 37.576769] entry_SYSCALL_64_after_hwframe+0x42/0xb7 ---------------------------------------- [1] https://syzkaller.appspot.com/bug?id=cd662bc3f6022c0979d01a262c318fab2ee9b56f Signed-off-by: Tetsuo Handa Reported-by: syzbot Fixes: ecdd09597a572513 ("block/loop: fix race between I/O and set_status") Cc: Ming Lei Cc: Dmitry Vyukov Cc: stable Cc: Jens Axboe Signed-off-by: Jens Axboe drivers/block/loop.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 0bca799b92807ee9be0890690f5dde7d8c6a8e25 Author: Ming Lei Date: Thu Apr 5 00:35:21 2018 +0800 blk-mq: order getting budget and driver tag This patch orders getting budget and driver tag by making sure to acquire driver tag after budget is got, this way can help to avoid the following race: 1) before dispatch request from scheduler queue, get one budget first, then dequeue a request, call it request A. 2) in another IO path for dispatching request B which is from hctx->dispatch, driver tag is got, then try to get budget in blk_mq_dispatch_rq_list(), unfortunately the budget is held by request A. 3) meantime blk_mq_dispatch_rq_list() is called for dispatching request A, and try to get driver tag first, unfortunately no driver tag is available because the driver tag is held by request B 4) both two IO pathes can't move on, and IO stall is caused. This issue can be observed when running dbench on USB storage. This patch fixes this issue by always getting budget before getting driver tag. Cc: stable@vger.kernel.org Fixes: de1482974080ec9e ("blk-mq: introduce .get_budget and .put_budget in blk_mq_ops") Cc: Christoph Hellwig Cc: Bart Van Assche Cc: Omar Sandoval Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit a71e7c44ffb7baea0c0795824afc34cc0bc1a301 Author: Sinan Kaya Date: Fri Apr 6 14:02:46 2018 -0400 io: change writeX_relaxed() to remove barriers Now that we hardened writeX() API in asm-generic version, writeX_relaxed() API is violating the rules when writeX_relaxed() == writeX() in the default implementation. The relaxed API shouldn't have any barriers in it and it doesn't provide any ordering with respect to the memory transactions. The only requirement is for writes to be ordered with respect to each other. This is achieved by the volatile in the __raw_writeX() API. Open code the relaxed API and remove any barriers in it. Signed-off-by: Sinan Kaya Signed-off-by: Arnd Bergmann include/asm-generic/io.h | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 8875c55437617fa4351070656bd78e17ed8284a5 Author: Sinan Kaya Date: Fri Apr 6 14:02:45 2018 -0400 io: change readX_relaxed() to remove barriers Now that we hardened readX() API in asm-generic version, readX_relaxed() API is violating the rules when readX_relaxed() == readX() in the default implementation. The relaxed API shouldn't have any barriers in it and it doesn't provide any ordering with respect to the memory transactions. The only requirement is for reads to be ordered with respect to each other. This is achieved by the volatile in the __raw_readX() API. Open code the relaxed API and remove any barriers in it. Signed-off-by: Sinan Kaya Signed-off-by: Arnd Bergmann include/asm-generic/io.h | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit d94a155c59c98c19b98ee949eaab6a0312bbd6be Author: Kirill A. Shutemov Date: Tue Apr 10 12:27:04 2018 +0300 x86/cpu: Prevent cpuinfo_x86::x86_phys_bits adjustment corruption Some features (Intel MKTME, AMD SME) reduce the number of effectively available physical address bits. cpuinfo_x86::x86_phys_bits is adjusted accordingly during the early cpu feature detection. Though if get_cpu_cap() is called later again then this adjustement is overwritten. That happens in setup_pku(), which is called after detect_tme(). To address this, extract the address sizes enumeration into a separate function, which is only called only from early_identify_cpu() and from generic_identify(). This makes get_cpu_cap() safe to be called later during boot proccess without overwriting cpuinfo_x86::x86_phys_bits. [ tglx: Massaged changelog ] Fixes: cb06d8e3d020 ("x86/tme: Detect if TME and MKTME is activated by BIOS") Reported-by: Kai Huang Signed-off-by: Kirill A. Shutemov Signed-off-by: Thomas Gleixner Cc: Tom Lendacky Cc: Dave Hansen Cc: linux-mm@kvack.org Cc: "H. Peter Anvin" Link: https://lkml.kernel.org/r/20180410092704.41106-1-kirill.shutemov@linux.intel.com arch/x86/kernel/cpu/common.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit 34dd25de9fe3f60bfdb31b473bf04b28262d0896 Author: Nicholas Piggin Date: Tue Apr 10 21:49:31 2018 +1000 powerpc/powernv: define a standard delay for OPAL_BUSY type retry loops This is the start of an effort to tidy up and standardise all the delays. Existing loops have a range of delay/sleep periods from 1ms to 20ms, and some have no delay. They all loop forever except rtc, which times out after 10 retries, and that uses 10ms delays. So use 10ms as our standard delay. The OPAL maintainer agrees 10ms is a reasonable starting point. The idea is to use the same recipe everywhere, once this is proven to work then it will be documented as an OPAL API standard. Then both firmware and OS can agree, and if a particular call needs something else, then that can be documented with reasoning. This is not the end-all of this effort, it's just a relatively easy change that fixes some existing high latency delays. There should be provision for standardising timeouts and/or interruptible loops where possible, so non-fatal firmware errors don't cause hangs. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal.h | 3 +++ 1 file changed, 3 insertions(+) commit 85fa2cc51104ee5b529ce85b12f4c8421888544f Author: Luc Van Oostenryck Date: Tue Oct 31 18:22:02 2017 +0100 c6x: pass endianness info to sparse c6x depends on the macro '_BIG_ENDIAN' being defined or not to correctly select or define endian-specific macros, structures or pieces of code. This macro is predefined by the compiler but sparse knows nothing about it and thus may pre-process files differently from what gcc would. Fix this by passing '-D_BIG_ENDIAN' when compiling a big-endian kernel, like GCC would have done. To: Mark Salter To: Aurelien Jacquiot CC: linux-c6x-dev@linux-c6x.org Signed-off-by: Luc Van Oostenryck Signed-off-by: Mark Salter arch/c6x/Makefile | 1 + 1 file changed, 1 insertion(+) commit 319938bd6f07e59ba55dff0abb3b51f5230a8f24 Author: Randy Dunlap Date: Fri Jan 19 11:19:33 2018 -0800 c6x: fix platforms/plldata.c get_coreid build error Fix build error reported by the 0day bot by including the header file for that macro. Fixes this build error: (should fix; not tested) arch/c6x/platforms/plldata.c: In function 'c6472_setup_clocks': arch/c6x/platforms/plldata.c:279:33: error: implicit declaration of function 'get_coreid'; did you mean 'get_order'? [-Werror=implicit-function-declaration] c6x_core_clk.parent = &sysclks[get_coreid() + 1]; Reported-by: Fengguang Wu Cc: Mark Salter Cc: Aurelien Jacquiot Cc: linux-c6x-dev@linux-c6x.org Cc: Ingo Molnar Signed-off-by: Randy Dunlap Signed-off-by: Mark Salter arch/c6x/platforms/plldata.c | 1 + 1 file changed, 1 insertion(+) commit f5ad907e31345807c5c2bd0fbb12a120e82e3042 Author: Jérémy Lefaure Date: Mon Sep 4 15:14:12 2017 -0400 c6x: remove unused KTHREAD_SIZE definition KTHREAD_SIZE has never been used since it has been defined for c6x arch. Let's remove this useless definition. Signed-off-by: Jérémy Lefaure Signed-off-by: Mark Salter arch/c6x/kernel/asm-offsets.c | 1 - 1 file changed, 1 deletion(-) commit a5a18ae73bcac37010a7b37e942add0f25b9d503 Author: Boris Ostrovsky Date: Mon Apr 9 14:51:44 2018 -0400 xen/pvh: Indicate XENFEAT_linux_rsdp_unrestricted to Xen Pre-4.17 kernels ignored start_info's rsdp_paddr pointer and instead relied on finding RSDP in standard location in BIOS RO memory. This has worked since that's where Xen used to place it. However, with recent Xen change (commit 4a5733771e6f ("libxl: put RSDP for PVH guest near 4GB")) it prefers to keep RSDP at a "non-standard" address. Even though as of commit b17d9d1df3c3 ("x86/xen: Add pvh specific rsdp address retrieval function") Linux is able to find RSDP, for back-compatibility reasons we need to indicate to Xen that we can handle this, an we do so by setting XENFEAT_linux_rsdp_unrestricted flag in ELF notes. (Also take this opportunity and sync features.h header file with Xen) Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross Reviewed-by: Wei Liu arch/x86/xen/xen-head.S | 4 +++- include/xen/interface/features.h | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) commit bbe9a70a478129f3f9b2003415d0c36afcea210f Author: Arnd Bergmann Date: Mon Apr 9 14:23:33 2018 +0200 tick-sched: avoid a maybe-uninitialized warning The use of bitfields seems to confuse gcc, leading to a false-positive warning in all compiler versions: kernel/time/tick-sched.c: In function 'tick_nohz_idle_exit': kernel/time/tick-sched.c:538:2: error: 'now' may be used uninitialized in this function [-Werror=maybe-uninitialized] This introduces a temporary variable to track the flags so gcc doesn't have to evaluate twice, eliminating the code path that leads to the warning. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85301 Fixes: 1cae544d42d2 ("nohz: Gather tick_sched booleans under a common flag field") Signed-off-by: Arnd Bergmann Signed-off-by: Rafael J. Wysocki kernel/time/tick-sched.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 2dd0df8472ff9bb520673cb5862b08be9290c9fa Author: Viresh Kumar Date: Tue Apr 3 15:37:39 2018 +0530 cpufreq: Drop cpufreq_table_validate_and_show() This isn't used anymore. Remove the helper and update documentation accordingly. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki Documentation/cpu-freq/core.txt | 12 +++++------- Documentation/cpu-freq/cpu-drivers.txt | 6 ++---- drivers/cpufreq/freq_table.c | 14 -------------- include/linux/cpufreq.h | 2 -- 4 files changed, 7 insertions(+), 27 deletions(-) commit d983af9864b273e2fa19f564e6fa80d67638e539 Author: Viresh Kumar Date: Tue Apr 3 15:37:38 2018 +0530 cpufreq: SCMI: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from SCMI driver. Signed-off-by: Viresh Kumar Acked-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki drivers/cpufreq/scmi-cpufreq.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 8913315e9459b146e5888ab5138e10daa061b885 Author: Shunyong Yang Date: Fri Apr 6 10:43:49 2018 +0800 cpufreq: CPPC: Initialize shared perf capabilities of CPUs When multiple CPUs are related in one cpufreq policy, the first online CPU will be chosen by default to handle cpufreq operations. Let's take cpu0 and cpu1 as an example. When cpu0 is offline, policy->cpu will be shifted to cpu1. cpu1's perf capabilities should be initialized. Otherwise, perf capabilities are 0s and speed change can not take effect. This patch copies perf capabilities of the first online CPU to other shared CPUs when policy shared type is CPUFREQ_SHARED_TYPE_ANY. Acked-by: Viresh Kumar Signed-off-by: Shunyong Yang Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cppc_cpufreq.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit bbcc328561040292f7d6796954d478e4a2335e6f Author: Gregory CLEMENT Date: Wed Apr 4 16:44:44 2018 +0200 cpufreq: armada-37xx: Fix clock leak There was no clk_put() balancing the clk_get(). This commit fixes it. Fixes: 92ce45fb875d (cpufreq: Add DVFS support for Armada 37xx) Cc: 4.16+ # 4.16+ Reported-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/armada-37xx-cpufreq.c | 2 ++ 1 file changed, 2 insertions(+) commit b8b10bc2015cd91350aac68447377c8410a48865 Author: Viresh Kumar Date: Mon Apr 2 12:50:53 2018 +0530 cpufreq: CPPC: Don't set transition_latency Now that the driver has started to set transition_delay_us directly, there is no need to set transition_latency along with it, as it is not used by the cpufreq core. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cppc_cpufreq.c | 1 - 1 file changed, 1 deletion(-) commit 44a264ee1e91316b24a808d2b5b6e1815bcb0fee Author: Viresh Kumar Date: Mon Apr 2 10:58:38 2018 +0530 cpufreq: ti-cpufreq: Use builtin_platform_driver() This driver can not be built as a module and there is no need of the platform driver unregister part. Use builtin_platform_driver() instead of module_platform_driver(). Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/ti-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b258dfeafb4a7a6b6c81fb80e6d3df8e8235524f Author: Rafael J. Wysocki Date: Fri Mar 30 11:52:19 2018 +0200 cpufreq: intel_pstate: Do not include debugfs.h The intel_pstate driver doesn't use debugfs any more, so drop linux/debugfs.h from the list of included headers in it. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/intel_pstate.c | 1 - 1 file changed, 1 deletion(-) commit 72655f6cf7fe04b867776bb7120fbdb84dee4f61 Merge: f56db26 96a938aa Author: Benson Leung Date: Mon Apr 9 23:00:04 2018 -0700 Merge remote-tracking branch 'chrome-platform-stop-being-a-platform-driver-plus-atmel_mxt_ts-for-v4.17' into working-branch-for-4.17 commit f56db262e46d3368ee4e5c9e19797853cab382cd Author: Salvatore Bellizzi Date: Wed Mar 7 14:56:43 2018 +0100 platform/chrome: cros_ec_lpc: Add support for Google devices using custom coreboot firmware This patch adds generic device information to the DMI table of the cros_ec_lpc driver, needed for Chromebooks/boxes using a custom coreboot firmware. The DMI info would not contain "Google_*" as BIOS version string, instead the system vendor string would still be "GOOGLE", so this seems to be a reasonable match for every Chromebook/box running a custom firmware. Signed-off-by: Salvatore Bellizzi Signed-off-by: Vittorio Gambaletta Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_lpc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d6542b3916582375dde30344611fa920f51aed45 Author: Wenkai Du Date: Thu Feb 22 13:21:17 2018 -0800 platform/chrome: cros_ec_lpc: wake up from s2idle on Chrome EC Chrome platform installed a Chrome EC notify handler which prevents default EC GPE handler getting called. Add pm_system_wakeup to the Chrome EC notify handler so wake up from s2idle can happen. Suggested-by: Rafael J. Wysocki Signed-off-by: Wenkai Du Signed-off-by: Benson Leung drivers/platform/chrome/cros_ec_lpc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 96a938aa214e965d5b4a2f10443b29cad14289b9 Author: Dmitry Torokhov Date: Tue Mar 20 15:31:38 2018 -0700 Input: atmel_mxt_ts - remove platform data support Now that there are no users of custom Atmel platform data, and everyone has switched to the generic device properties, we can remove support for the platform data. Acked-by: Nick Dyer Signed-off-by: Dmitry Torokhov Signed-off-by: Benson Leung MAINTAINERS | 1 - drivers/input/touchscreen/atmel_mxt_ts.c | 130 ++++++++++++----------------- include/linux/platform_data/atmel_mxt_ts.h | 31 ------- 3 files changed, 55 insertions(+), 107 deletions(-) commit c0bb0608ec79f8480432e169ccc3857dc7f7c205 Author: Dmitry Torokhov Date: Tue Mar 20 15:31:37 2018 -0700 platform/chrome: chromeos_laptop - discard data for unneeded boards Mark board data as __intconst/__initdata and make a copy of appropriate entry once we identified the board we are running on. The rest of the data will be discarded once the kernel finished booting (or module finished loading). Signed-off-by: Dmitry Torokhov Signed-off-by: Benson Leung drivers/platform/chrome/chromeos_laptop.c | 476 +++++++++++++++++------------- 1 file changed, 264 insertions(+), 212 deletions(-) commit f00c1d199e05f4f633a3ae34f16f707257d56fcf Author: Dmitry Torokhov Date: Tue Mar 20 15:31:36 2018 -0700 platform/chrome: chromeos_laptop - use device properties for Pixel Now that Atmel driver uses generic device properties we can use them instead of platform data when setting up touchpad on the original Google Pixel. Signed-off-by: Dmitry Torokhov Signed-off-by: Benson Leung drivers/platform/chrome/chromeos_laptop.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e6215eeaa23c5d80a72caa91fc80795b9cde038f Author: Dmitry Torokhov Date: Tue Mar 20 15:31:35 2018 -0700 platform/chrome: chromeos_laptop - rely on I2C to set up interrupt trigger Instead of passing interrupt flags via platform data to drivers, or hoping that drivers will do the right thing and set it up the way we need, let's set up IRQ resource and attach it to the I2C board info, and let I2C core set it up for us. Signed-off-by: Dmitry Torokhov Signed-off-by: Benson Leung drivers/platform/chrome/chromeos_laptop.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 8d88cb03c22e4cbde4c3020883f534e8ba7f5c79 Author: Dmitry Torokhov Date: Tue Mar 20 15:31:34 2018 -0700 platform/chrome: chromeos_laptop - use I2C notifier to create devices Instead of using platform device and deferrals to handle the case when i2C adapters appear late in the game, and not handling device unbinding all that well, let's switch to using I2C bus notifier to get told when a new I2C adapter appears in the system, and attempt to add appropriate devices at that time. In case when we have 2 Designware adapters in the system (Acer C720), instead of counting and hoping they get enumerate din the right order, let's switch to using their PCI devids (slot/function) that should be stable. Signed-off-by: Dmitry Torokhov Signed-off-by: Benson Leung drivers/platform/chrome/chromeos_laptop.c | 247 ++++++++++++------------------ 1 file changed, 102 insertions(+), 145 deletions(-) commit 65582920d72d2562e44c07aa530586a3583477b9 Author: Dmitry Torokhov Date: Tue Mar 20 15:31:33 2018 -0700 platform/chrome: chromeos_laptop - parse DMI IRQ data once Instead of trying to parse DMI IRQ data every time we try to instantiate a device, let's do it once, when we identify the device we are working with. This allows us to mark chromeos_laptop_get_irq_from_dmi() as __init and discard it once module is initialized. Signed-off-by: Dmitry Torokhov Signed-off-by: Benson Leung drivers/platform/chrome/chromeos_laptop.c | 120 ++++++++++++++++-------------- 1 file changed, 64 insertions(+), 56 deletions(-) commit 28cd38f105fc30ccda7a15170cbaa977d2601272 Author: Dmitry Torokhov Date: Tue Mar 20 15:31:32 2018 -0700 platform/chrome: chromeos_laptop - rework i2c peripherals initialization Instead of having separate setup() functions responsible for instantiating i2c client for each peripheral, let's generalize the behavior and use common code for instantiating all i2c peripherals. Signed-off-by: Dmitry Torokhov Signed-off-by: Benson Leung drivers/platform/chrome/chromeos_laptop.c | 467 +++++++++++++++--------------- 1 file changed, 235 insertions(+), 232 deletions(-) commit 71cbbff8c4fd1467b59b8c15a06093ac03cd11c7 Author: Harald Freudenberger Date: Wed Apr 4 14:01:10 2018 +0200 s390/zcrypt: Remove deprecated zcrypt proc interface. This patch removes the deprecated zcrypt proc interface. It is outdated and deprecated and does not support the latest 3 generations of CEX cards. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/zcrypt_api.c | 231 --------------------------------------- 1 file changed, 231 deletions(-) commit 2a80786d477a3811c1a5410ddf08d0f981e53cf3 Author: Harald Freudenberger Date: Wed Apr 4 13:25:40 2018 +0200 s390/zcrypt: Remove deprecated ioctls. This patch removes the old status calls which have been marked as deprecated since at least 2 years now. There is no known application or library relying on these ioctls any more. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/include/uapi/asm/zcrypt.h | 41 +----------------------- drivers/s390/crypto/zcrypt_api.c | 62 +------------------------------------ drivers/s390/crypto/zcrypt_api.h | 24 -------------- 3 files changed, 2 insertions(+), 125 deletions(-) commit efda7adec7a5ad7aa3745df7c6740727b00ac8ba Author: Harald Freudenberger Date: Wed Apr 4 07:14:17 2018 +0200 s390/zcrypt: Make ap init functions static. The ap init functions ap_module_init and ap_debug_init are only used within ap_bus.c. Make these functions static and do not declare them in any header file any more. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/ap_bus.c | 4 ++-- drivers/s390/crypto/ap_debug.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) commit 67f7c7039978a38bacf7e4a2079854630225ab3c Author: Heiko Carstens Date: Mon Apr 9 15:38:01 2018 +0200 MAINTAINERS: update s390 maintainers email addresses The linux.vnet.ibm.com domain will be discontinued end of 2018. Instead the new linux.ibm.com domain is already active. Reflect this by changing the email addresses of maintainers active in the s390 area accordingly. Acked-by: Benjamin Block Acked-by: Dong Jia Shi Acked-by: Halil Pasic Acked-by: Jan Hoeppner Acked-by: Janosch Frank Acked-by: Julian Wiedmann Acked-by: Peter Oberparleiter Acked-by: Sebastian Ott Acked-by: Stefan Haberland Acked-by: Steffen Maier Acked-by: Ursula Braun Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky MAINTAINERS | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 96c0cdbc7c60885d65dc8d11a39bbcfd9cc49d03 Author: Vasily Gorbik Date: Wed Apr 4 16:05:16 2018 +0200 s390/ipl: remove reipl_method and dump_method reipl_method and dump_method have been used in addition to reipl_type and dump_type, because a single reipl_type could be achieved with multiple reipl_method (same for dump_type/method). After dropping non-diag308_set based reipl methods, there is a single method per reipl_type/dump_type and reipl_method and dump_method could be simply removed. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/kernel/ipl.c | 57 ++++++++++---------------------------------------- 1 file changed, 11 insertions(+), 46 deletions(-) commit 3b9678472bab86ae654cf2c18d5dd551558045be Author: Vasily Gorbik Date: Wed Apr 4 14:42:41 2018 +0200 s390/ipl: correct kdump reipl block checksum calculation s390 kdump reipl implementation relies on os_info kernel structure residing in old memory being dumped. os_info contains reipl block, which is used (if valid) by the kdump kernel for reipl parameters. The problem is that the reipl block and its checksum inside os_info is updated only when /sys/firmware/reipl/reipl_type is written. This sets an offset of a reipl block for "reipl_type" and re-calculates reipl block checksum. Any further alteration of values under /sys/firmware/reipl/{reipl_type}/ without subsequent write to /sys/firmware/reipl/reipl_type lead to incorrect os_info reipl block checksum. In such a case kdump kernel ignores it and reboots using default logic. To fix this, os_info reipl block update is moved right before kdump execution. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ipl.h | 1 + arch/s390/kernel/ipl.c | 11 +++++------ arch/s390/kernel/machine_kexec.c | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) commit 0649685073422af82ab8e7d9119b9991403851a6 Author: Vasily Gorbik Date: Tue Apr 3 16:04:21 2018 +0200 s390/ipl: remove non-existing functions declaration do_reipl, do_halt and do_poff are not defined anywhere. Cleaning up functions declaration. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ipl.h | 3 --- 1 file changed, 3 deletions(-) commit d485235b005407ae64246a8fe2171d1b369b3b30 Author: Vasily Gorbik Date: Tue Apr 3 16:03:32 2018 +0200 s390: assume diag308 set always works diag308 set has been available for many machine generations, and alternative reipl code paths has not been exercised and seems to be broken without noticing for a while now. So, cleaning up all obsolete reipl methods except currently used ones, assuming that diag308 set always works. Also removing not longer needed reset callbacks. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/include/asm/cio.h | 2 - arch/s390/include/asm/ipl.h | 1 + arch/s390/include/asm/reset.h | 20 ---- arch/s390/kernel/ipl.c | 209 ++-------------------------------- arch/s390/kernel/machine_kexec.c | 1 - arch/s390/kernel/reipl.S | 87 -------------- arch/s390/kernel/relocate_kernel.S | 54 +-------- drivers/s390/cio/cio.c | 224 ------------------------------------- drivers/s390/cio/ioasm.c | 24 ---- drivers/s390/cio/ioasm.h | 1 - drivers/s390/crypto/ap_bus.c | 23 ---- 11 files changed, 16 insertions(+), 630 deletions(-) commit ecc0df0f23cb5f83ee580a8d1d818524955cbc97 Author: Vasily Gorbik Date: Tue Apr 3 16:03:25 2018 +0200 s390/ipl: avoid adding scpdata to cmdline during ftp/dvd boot Add missing ipl parmblock validity check to append_ipl_scpdata. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/kernel/ipl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0832b3aef5a793e9e04d9a7a4647ac03654ef79 Author: Vasily Gorbik Date: Tue Apr 3 16:03:14 2018 +0200 s390/ipl: correct ipl parmblock valid checks In some cases diag308_set_works used to be misused as "we have valid ipl parmblock", which is not the case when diag308 set works, but there is no ipl parmblock (diag308 store returns DIAG308_RC_NOCONFIG). Such checks are adjusted to reuse ipl_block_valid instead of diag308_set_works. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/kernel/ipl.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit d08091ac9654383422350ce829caf467b3e9a8b1 Author: Vasily Gorbik Date: Tue Apr 3 16:03:08 2018 +0200 s390/ipl: rely on diag308 store to get ipl info For both ccw and fcp boot retrieve ipl info from ipl block received via diag308 store. Old scsi ipl parm block handling and cio_get_iplinfo are removed. Ipl type is deducted from ipl block (if valid). Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/boot/compressed/misc.c | 23 ----------------- arch/s390/include/asm/cio.h | 8 ------ arch/s390/include/asm/ipl.h | 5 +--- arch/s390/kernel/early.c | 14 +---------- arch/s390/kernel/ipl.c | 53 ++++++++++++---------------------------- drivers/s390/cio/cio.c | 33 ------------------------- 6 files changed, 17 insertions(+), 119 deletions(-) commit 283abedb1bd67e22f05fe4e79e1722bd7c7ed3be Author: Vasily Gorbik Date: Tue Apr 3 16:03:03 2018 +0200 s390/ipl: move ipl_flags to ipl.c ipl_flags and corresponding enum are not used outside of ipl.c and will be reworked in later commits. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ipl.h | 10 ---------- arch/s390/kernel/ipl.c | 10 +++++++++- 2 files changed, 9 insertions(+), 11 deletions(-) commit e9627da113db1b457a504ee4dca6c0a1a19e18fc Author: Vasily Gorbik Date: Tue Apr 3 16:02:51 2018 +0200 s390/ipl: get rid of ipl_ssid and ipl_devno ipl_ssid and ipl_devno used to be used during ccw boot when diag308 store was not available. Reuse ipl_block to store those values. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/kernel/ipl.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit bdbfe18595ceabd2b6b4e3abae9c3911802e3cb1 Author: Vasily Gorbik Date: Tue Apr 3 16:02:40 2018 +0200 s390/ipl: unite diag308 and scsi boot ipl blocks Ipl parm blocks received via "diag308 store" and during scsi boot at IPL_PARMBLOCK_ORIGIN are merged into the "ipl_block". Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ipl.h | 5 +---- arch/s390/kernel/ipl.c | 50 ++++++++++++++++++++++----------------------- 2 files changed, 26 insertions(+), 29 deletions(-) commit 15deb080a6087b73089139569558965750e69d67 Author: Vasily Gorbik Date: Tue Apr 3 16:02:15 2018 +0200 s390/ipl: ensure loadparm valid flag is set When loadparm is set in reipl parm block, the kernel should also set DIAG308_FLAGS_LP_VALID flag. This fixes loadparm ignoring during z/VM fcp -> ccw reipl and kvm direct boot -> ccw reipl. Cc: Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/kernel/ipl.c | 1 + 1 file changed, 1 insertion(+) commit 7eee12b44eb4c0c30b0eac5946fb59f1460572f6 Author: Julian Wiedmann Date: Wed Mar 21 17:17:14 2018 +0100 s390/qdio: lock device while installing IRQ handler During setup, qdio takes control of the presented ccw device and replaces the device's IRQ handler with its own. To avoid any interference with conccurent activity on the device, this should be done while holding the device's lock. Signed-off-by: Julian Wiedmann Reviewed-by: Benjamin Block Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_setup.c | 2 ++ 1 file changed, 2 insertions(+) commit 89286320a236d245834075fa13adb0bdd827ecaa Author: Julian Wiedmann Date: Wed Mar 21 17:14:00 2018 +0100 s390/qdio: clear intparm during shutdown During shutdown, qdio returns its ccw device back to control by the upper-layer driver. But there is a remote chance that by the time where the IRQ handler gets switched back, the interrupt for the preceding ccw_device_{clear,halt} hasn't been presented yet. Upper-layer drivers would then need to handle this IRQ - and since the IO is issued with an intparm, it could very well be confused with whatever intparm mechanism the driver uses itself (eg intparm == request address). So when switching over the IRQ handler, also clear the intparm and have upper-layer drivers deal with any such delayed interrupt as if it was unsolicited. Suggested-by: Sebastian Ott Signed-off-by: Julian Wiedmann Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ab7efda477f976c22f1d35797c33f22612d93182 Author: Julian Wiedmann Date: Tue Jan 30 14:39:34 2018 +0100 s390/ccwgroup: require at least one ccw device ccwgroup_create_dev() derives the gdev's device name from gdev->cdev[0], so make sure that this reference is valid. For robustness only, all current ccwgroup drivers get this right. Signed-off-by: Julian Wiedmann Acked-by: Sebastian Ott Signed-off-by: Martin Schwidefsky drivers/s390/cio/ccwgroup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2c957a8ad45991f3ef71da5c75ed2299f3d46a31 Author: Harald Freudenberger Date: Tue Mar 27 07:37:24 2018 +0200 s390/zcrypt: remove unused functions and declarations The AP bus code is not available as kernel module any more. There was some leftover code dealing with kernel module exit which has been removed with this patch. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/ap_bus.c | 5 ----- drivers/s390/crypto/ap_bus.h | 3 --- 2 files changed, 8 deletions(-) commit 8b09ca746a643ca452cd41a522046a96ee5a55fd Author: Heiko Carstens Date: Fri Apr 6 18:10:04 2018 +0200 s390/compat: fix setup_frame32 Git commit c60a03fee0e5 ("s390: switch to {get,put}_compat_sigset()") contains a typo and now copies the wrong pointer to user space. Use the correct pointer instead. Reported-and-tested-by: Stefan Liebler Fixes: c60a03fee0e5 ("s390: switch to {get,put}_compat_sigset()") Cc: # v4.15+ Cc: Al Viro Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/compat_signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aff304e7a0e8f926edafcd1e0e4f6da2866e9845 Author: Harald Freudenberger Date: Thu Apr 5 20:27:47 2018 +0200 s390/crypto: Adjust s390 aes and paes cipher priorities Tests with paes-xts and debugging investigations showed that the ciphers are not always correctly resolved. The rules for cipher priorities seem to be: - Ecb-aes should have a prio greater than the generic ecb-aes. - The mode specialized ciphers (like cbc-aes-s390) should have a prio greater than the sum of the more generic combinations (like cbs(aes)). This patch adjusts the cipher priorities for the s390 aes and paes in kernel crypto implementations. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/crypto/aes_s390.c | 8 ++++---- arch/s390/crypto/paes_s390.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit ab6c5600d8caf5ee9a8a5081344f055bc80bc271 Author: Dmitry Torokhov Date: Tue Mar 20 15:31:31 2018 -0700 platform/chrome: chromeos_laptop - factor out getting IRQ from DMI This will make code instantiating I2C device a bit clearer. Signed-off-by: Dmitry Torokhov Signed-off-by: Benson Leung drivers/platform/chrome/chromeos_laptop.c | 35 ++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 12 deletions(-) commit 4f27f677c9541c02b7a62761f93bccbc404be8bb Author: Dmitry Torokhov Date: Tue Mar 20 15:31:30 2018 -0700 platform/chrome: chromeos_laptop - introduce pr_fmt() Define pr_fmt() to standardize driver messages. Signed-off-by: Dmitry Torokhov Signed-off-by: Benson Leung drivers/platform/chrome/chromeos_laptop.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit ed58f90c11696dee3a27fb56b00b507ad4cbad53 Author: Dmitry Torokhov Date: Tue Mar 20 15:31:29 2018 -0700 platform/chrome: chromeos_laptop - stop setting suspend mode for Atmel devices Atmel touch controller driver no longer respects suspend mode specified in platform data, so let's stop setting it. Signed-off-by: Dmitry Torokhov Signed-off-by: Benson Leung drivers/platform/chrome/chromeos_laptop.c | 2 -- 1 file changed, 2 deletions(-) commit 203e0baedb984f1f206f853675cd169f9a646c72 Author: Dmitry Torokhov Date: Tue Mar 20 15:31:28 2018 -0700 platform/chrome: chromeos_laptop - add SPDX identifier Replace the original license statement with the SPDX identifier. Add also one line of description as recommended by the COPYING file. Signed-off-by: Dmitry Torokhov Signed-off-by: Benson Leung drivers/platform/chrome/chromeos_laptop.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) commit d3f810ce0802e71966d97b1c41619063a5c2362c Author: Dmitry Torokhov Date: Tue Mar 20 15:31:27 2018 -0700 Input: atmel_mxt_ts - switch ChromeOS ACPI devices to generic props Move older ChromeOS devices describing Atmel controllers in ACPI, but not providing enough details to configure the controllers properly, from platform data over to generic device properties. This will allow us remove support for platform data later on, leaving only generic device properties in place. Acked-by: Nick Dyer Signed-off-by: Dmitry Torokhov Signed-off-by: Benson Leung drivers/input/touchscreen/atmel_mxt_ts.c | 63 ++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 23 deletions(-) commit 93afb1d6e72a1a61bcfb49364d3550924276ee20 Author: Dmitry Torokhov Date: Tue Mar 20 15:31:26 2018 -0700 Input: atmel_mxt_ts - switch from OF to generic device properties Instead of using OF-specific APIs to fecth device properties, let's switch to generic device properties API. This will allow us to use device properties on legacy ChromeOS devices and get rid of platform data down the road. Acked-by: Nick Dyer Signed-off-by: Dmitry Torokhov Signed-off-by: Benson Leung drivers/input/touchscreen/atmel_mxt_ts.c | 59 ++++++++++++++++---------------- 1 file changed, 30 insertions(+), 29 deletions(-) commit d80808e1ebc2def95def245c39347c3f4ab02aa6 Author: Dmitry Torokhov Date: Tue Mar 20 15:31:25 2018 -0700 Input: atmel_mxt_ts - do not pass suspend mode in platform data The way we are supposed to put controller to sleep and wake it up does not depend on the platform, but rather on controller itself, so we want to get rid of suspend mode in platform data (and eventually get rid of platform data completely). Unfortunately some early chromebooks (the original Pixel, Acer C720) were shipped with config that requires manually re-enabling touch reporting in T9. We will sort it out, but in the meantime let's switch to a simple DMI quirk. We'll keep pdata->suspend_mode for now and remove it when we rework chromeos-laptop driver. Signed-off-by: Dmitry Torokhov Signed-off-by: Benson Leung drivers/input/touchscreen/atmel_mxt_ts.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit 0eadcc7a7bc03e991d2da1cf88143fb7cc0342c1 Author: Song Liu Date: Mon Apr 9 18:31:30 2018 +0000 perf/core: Fix perf_uprobe_init() Similarly to the uprobe PMU fix in perf_kprobe_init(), fix error handling in perf_uprobe_init() as well. Reported-by: 范龙飞 Signed-off-by: Song Liu Acked-by: Masami Hiramatsu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: e12f03d7031a ("perf/core: Implement the 'perf_kprobe' PMU") Signed-off-by: Ingo Molnar kernel/trace/trace_event_perf.c | 2 ++ 1 file changed, 2 insertions(+) commit 5da13ab8b0dcaa984c45ae43edf5a4d148603d42 Author: Masami Hiramatsu Date: Mon Apr 9 21:16:54 2018 +0900 perf/core: Fix perf_kprobe_init() Fix error handling in perf_kprobe_init(): ================================================================== BUG: KASAN: slab-out-of-bounds in strlen+0x8e/0xa0 lib/string.c:482 Read of size 1 at addr ffff88003f9cc5c0 by task syz-executor2/23095 CPU: 0 PID: 23095 Comm: syz-executor2 Not tainted 4.16.0+ #24 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xca/0x13e lib/dump_stack.c:113 print_address_description+0x6e/0x2c0 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report+0x256/0x380 mm/kasan/report.c:412 strlen+0x8e/0xa0 lib/string.c:482 kstrdup+0x21/0x70 mm/util.c:55 alloc_trace_kprobe+0xc8/0x930 kernel/trace/trace_kprobe.c:325 create_local_trace_kprobe+0x4f/0x3a0 kernel/trace/trace_kprobe.c:1438 perf_kprobe_init+0x149/0x1f0 kernel/trace/trace_event_perf.c:264 perf_kprobe_event_init+0xa8/0x120 kernel/events/core.c:8407 perf_try_init_event+0xcb/0x2a0 kernel/events/core.c:9719 perf_init_event kernel/events/core.c:9750 [inline] perf_event_alloc+0x1367/0x1e20 kernel/events/core.c:10022 SYSC_perf_event_open+0x242/0x2330 kernel/events/core.c:10477 do_syscall_64+0x198/0x640 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Reported-by: 范龙飞 Signed-off-by: Masami Hiramatsu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Song Liu Cc: Thomas Gleixner Fixes: e12f03d7031a ("perf/core: Implement the 'perf_kprobe' PMU") Signed-off-by: Ingo Molnar kernel/trace/trace_event_perf.c | 2 ++ 1 file changed, 2 insertions(+) commit e31193a9fee0f8008e9718c9d8a6f4c4709f0482 Merge: 621b6d2 fcbd8fa Author: Ingo Molnar Date: Tue Apr 10 07:21:54 2018 +0200 Merge tag 'perf-urgent-for-mingo-4.17-20180409' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: . Fix the --stdio2/TUI annotate output to include group details, be it for a recorded '{a,b,f}' explicit event group or when forcing group display using 'perf report --group' for a set of events not recorded as a group (Arnaldo Carvalho de Melo) . Fix display artifacts in the ui browser (base class for the annotate and main report/top TUI browser) related to the extra title lines work (Arnaldo Carvalho de Melo) . perf auxtrace refactorings, leftovers from a previously partially processed patchset (Adrian Hunter) . Fix the builtin clang build (Sandipan Das, Arnaldo Carvalho de Melo) - Synchronize i915_drm.h, silencing a perf build warning and in the process automagically adding support for a new ioctl command (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 2ffb850e23a943acfbeda62599397c863cdd854c Merge: 3a7b854 9df3bd5 Author: Vinod Koul Date: Tue Apr 10 08:55:58 2018 +0530 Merge branch 'topic/stm' into for-linus commit 3a7b854d625816166c0faa3846810fee23f4b3d3 Merge: 477e0f9 a0b007e Author: Vinod Koul Date: Tue Apr 10 08:55:52 2018 +0530 Merge branch 'topic/renesas' into for-linus commit 477e0f90aea39d9945c7e8f9a7b33a0861015161 Merge: 185a6cd 0c0eb4c Author: Vinod Koul Date: Tue Apr 10 08:55:42 2018 +0530 Merge branch 'topic/raid' into for-linus commit 185a6cdb78ddf2dc60e2c700c68f8a53c91ede99 Merge: f18b461 5b4a689 Author: Vinod Koul Date: Tue Apr 10 08:55:37 2018 +0530 Merge branch 'topic/qcom' into for-linus commit f18b46190c62858fe04414e8ee9efea26f759e91 Merge: c21bd0a a3ca83124 Author: Vinod Koul Date: Tue Apr 10 08:55:30 2018 +0530 Merge branch 'topic/pl330' into for-linus commit c21bd0a86789ed54cf7dfb948c590766484a585c Merge: ab2528c e10734e Author: Vinod Koul Date: Tue Apr 10 08:55:26 2018 +0530 Merge branch 'topic/mtek' into for-linus commit ab2528c1b19e6e3b5a3713dfe6b054c672b4a498 Merge: 238eed6 2746e2c Author: Vinod Koul Date: Tue Apr 10 08:55:19 2018 +0530 Merge branch 'topic/imx' into for-linus commit 238eed66be899ab4d576c60d446f595c64e4b557 Merge: 6206513 f31b323 Author: Vinod Koul Date: Tue Apr 10 08:55:14 2018 +0530 Merge branch 'topic/edma' into for-linus commit 62065132eec7dc1e5e8ea7a11d26786935d84856 Merge: 36ebe2b 6a28ba2 Author: Vinod Koul Date: Tue Apr 10 08:55:07 2018 +0530 Merge branch 'topic/dw_axi' into for-linus commit 36ebe2b98e969d80aa0eab2a37404871173b41db Merge: c563747 2e67a08 Author: Vinod Koul Date: Tue Apr 10 08:54:59 2018 +0530 Merge branch 'topic/dmatest' into for-linus commit 71219b3494a32b5e1f22c4b1a5be2eb0d5524057 Merge: c18bb39 e3a2d2b Author: Linus Torvalds Date: Mon Apr 9 19:59:54 2018 -0700 Merge tag 'hwmon-for-linus-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: - added chip support: new Centaur CPUs, ADM1272, NCT6796D - ucd9000: added debugfs attributes, gpio support - cleanup and minor bug fixes * tag 'hwmon-for-linus-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (via-cputemp) support new centaur CPUs hwmon: (nct6775) Fix writing pwmX_mode hwmon: (lm92) Add max6635 to lm92_id[] hwmon: (pmbus/adm1275) Add support for ADM1272 hwmon: (lm92) Do not try to detect MAX6635 hwmon: (ucd9000) Add debugfs attributes to provide mfr_status hwmon: (ucd9000) Add gpio chip interface hwmon: (nct6775) Add support for NCT6796D hwmon: (nct6775) Initialize boolean variables with declaration hwmon: (nct6775) Improve fan6/pwm6 support hwmon: (nct6775) Use NUM_FAN consistently hwmon: (g762) handle cleanup with devm_add_action hwmon: (sht3x) Update data sheet URL hwmon: (sht21) Update data sheet URLs hwmon: (pmbus/adm1275) Accept negative page register values hwmon: (pmbus/max8688) Accept negative page register values commit 4d42680330e1ac6f9aee715311a198038264747f Author: Ross Lagerwall Date: Mon Mar 26 14:56:51 2018 +0100 scsi: devinfo: Add Microsoft iSCSI target to 1024 sector blacklist The Windows Server 2016 iSCSI target doesn't work with the Linux kernel initiator since the kernel started sending larger requests by default, nor does it implement the block limits VPD page. Apply the sector limit workaround for these targets. Signed-off-by: Ross Lagerwall Acked-by: KY Srinivasan Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ccc495efb326d17be3e7790b5aa49b25e239ead7 Author: Dan Carpenter Date: Tue Apr 3 11:52:22 2018 +0300 scsi: cxgb4i: silence overflow warning in t4_uld_rx_handler() Smatch marks skb->data as untrusted so it complains that there is a potential overflow here: drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:2111 t4_uld_rx_handler() error: buffer overflow 'cxgb4i_cplhandlers' 239 <= 255. In this case, skb->data comes from the hardware or firmware so it's not going to overflow unless there is a firmware bug. [mkp: fixed braces] Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7709e9bdee96a904ebf18378c803a9288e10bb30 Author: Dan Carpenter Date: Wed Mar 21 11:09:42 2018 +0300 scsi: dpt_i2o: Use after free in I2ORESETCMD ioctl Here is another use after free if we reset the card. The adpt_hba_reset() function frees "pHba" on error. Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen drivers/scsi/dpt_i2o.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit f4abab3f182b6b01e3e0f052721b4721a269a133 Author: Bart Van Assche Date: Thu Apr 5 10:33:01 2018 -0700 scsi: core: Make scsi_result_to_blk_status() recognize CONDITION MET Ensure that CONDITION MET and other non-zero status values that indicate success are translated into BLK_STS_OK. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Douglas Gilbert Cc: Damien Le Moal Cc: Christoph Hellwig Cc: Lee Duncan Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit a77b32d8b1ed7365d8b2a35b188b059d211b658b Author: Bart Van Assche Date: Thu Apr 5 10:33:00 2018 -0700 scsi: core: Rename __scsi_error_from_host_byte() into scsi_result_to_blk_status() Since the next patch will modify this function such that it checks more than just the host byte of the SCSI result, rename __scsi_error_from_host_byte() into scsi_result_to_blk_status(). This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Douglas Gilbert Cc: Damien Le Moal Cc: Christoph Hellwig Cc: Lee Duncan Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit cbe095e2b584623b882ebaf6c18e0b9077baa3f7 Author: Bart Van Assche Date: Thu Apr 5 10:32:59 2018 -0700 Revert "scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()" The description of commit e39a97353e53 is wrong: it mentions that commit 2a842acab109 introduced a bug in __scsi_error_from_host_byte() although that commit did not change the behavior of that function. Additionally, commit e39a97353e53 introduced a bug: it causes commands that fail with hostbyte=DID_OK and driverbyte=DRIVER_SENSE to be completed with BLK_STS_OK. Hence revert that commit. Fixes: e39a97353e53 ("scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()") Reported-by: Damien Le Moal Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Douglas Gilbert Cc: Damien Le Moal Cc: Christoph Hellwig Cc: Lee Duncan Cc: stable@vger.kernel.org Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 2 -- 1 file changed, 2 deletions(-) commit 709b973c844c0b4d115ac3a227a2e5a68722c912 Author: Anshuman Khandual Date: Thu Mar 29 11:53:37 2018 +0530 powerpc/fscr: Enable interrupts earlier before calling get_user() The function get_user() can sleep while trying to fetch instruction from user address space and causes the following warning from the scheduler. BUG: sleeping function called from invalid context Though interrupts get enabled back but it happens bit later after get_user() is called. This change moves enabling these interrupts earlier covering the function get_user(). While at this, lets check for kernel mode and crash as this interrupt should not have been triggered from the kernel context. Signed-off-by: Anshuman Khandual Signed-off-by: Michael Ellerman arch/powerpc/kernel/traps.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit 501a78cbc17c329fabf8e9750a1e9ab810c88a0e Author: Michael Ellerman Date: Thu Apr 5 22:49:13 2018 +1000 powerpc/64s: Fix section mismatch warnings from setup_rfi_flush() The recent LPM changes to setup_rfi_flush() are causing some section mismatch warnings because we removed the __init annotation on setup_rfi_flush(): The function setup_rfi_flush() references the function __init ppc64_bolted_size(). the function __init memblock_alloc_base(). The references are actually in init_fallback_flush(), but that is inlined into setup_rfi_flush(). These references are safe because: - only pseries calls setup_rfi_flush() at runtime - pseries always passes L1D_FLUSH_FALLBACK at boot - so the fallback flush area will always be allocated - so the check in init_fallback_flush() will always return early: /* Only allocate the fallback flush area once (at boot time). */ if (l1d_flush_fallback_area) return; - and therefore we won't actually call the freed init routines. We should rework the code to make it safer by default rather than relying on the above, but for now as a quick-fix just add a __ref annotation to squash the warning. Fixes: abf110f3e1ce ("powerpc/rfi-flush: Make it possible to call setup_rfi_flush() again") Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c6b41fb92936fa5facea464d5d7cbf855966d04 Author: Dave Carroll Date: Tue Apr 3 15:50:42 2018 -0600 scsi: aacraid: Insure command thread is not recursively stopped If a recursive IOP_RESET is invoked, usually due to the eh_thread handling errors after the first reset, be sure we flag that the command thread has been stopped to avoid an Oops of the form; [ 336.620256] CPU: 28 PID: 1193 Comm: scsi_eh_0 Kdump: loaded Not tainted 4.14.0-49.el7a.ppc64le #1 [ 336.620297] task: c000003fd630b800 task.stack: c000003fd61a4000 [ 336.620326] NIP: c000000000176794 LR: c00000000013038c CTR: c00000000024bc10 [ 336.620361] REGS: c000003fd61a7720 TRAP: 0300 Not tainted (4.14.0-49.el7a.ppc64le) [ 336.620395] MSR: 9000000000009033 CR: 22084022 XER: 20040000 [ 336.620435] CFAR: c000000000130388 DAR: 0000000000000000 DSISR: 40000000 SOFTE: 1 [ 336.620435] GPR00: c00000000013038c c000003fd61a79a0 c0000000014c7e00 0000000000000000 [ 336.620435] GPR04: 000000000000000c 000000000000000c 9000000000009033 0000000000000477 [ 336.620435] GPR08: 0000000000000477 0000000000000000 0000000000000000 c008000010f7d940 [ 336.620435] GPR12: c00000000024bc10 c000000007a33400 c0000000001708a8 c000003fe3b881d8 [ 336.620435] GPR16: c000003fe3b88060 c000003fd61a7d10 fffffffffffff000 000000000000001e [ 336.620435] GPR20: 0000000000000001 c000000000ebf1a0 0000000000000001 c000003fe3b88000 [ 336.620435] GPR24: 0000000000000003 0000000000000002 c000003fe3b88840 c000003fe3b887e8 [ 336.620435] GPR28: c000003fe3b88000 c000003fc8181788 0000000000000000 c000003fc8181700 [ 336.620750] NIP [c000000000176794] exit_creds+0x34/0x160 [ 336.620775] LR [c00000000013038c] __put_task_struct+0x8c/0x1f0 [ 336.620804] Call Trace: [ 336.620817] [c000003fd61a79a0] [c000003fe3b88000] 0xc000003fe3b88000 (unreliable) [ 336.620853] [c000003fd61a79d0] [c00000000013038c] __put_task_struct+0x8c/0x1f0 [ 336.620889] [c000003fd61a7a00] [c000000000171418] kthread_stop+0x1e8/0x1f0 [ 336.620922] [c000003fd61a7a40] [c008000010f7448c] aac_reset_adapter+0x14c/0x8d0 [aacraid] [ 336.620959] [c000003fd61a7b00] [c008000010f60174] aac_eh_host_reset+0x84/0x100 [aacraid] [ 336.621010] [c000003fd61a7b30] [c000000000864f24] scsi_try_host_reset+0x74/0x180 [ 336.621046] [c000003fd61a7bb0] [c000000000867ac0] scsi_eh_ready_devs+0xc00/0x14d0 [ 336.625165] [c000003fd61a7ca0] [c0000000008699e0] scsi_error_handler+0x550/0x730 [ 336.632101] [c000003fd61a7dc0] [c000000000170a08] kthread+0x168/0x1b0 [ 336.639031] [c000003fd61a7e30] [c00000000000b528] ret_from_kernel_thread+0x5c/0xb4 [ 336.645971] Instruction dump: [ 336.648743] 384216a0 7c0802a6 fbe1fff8 f8010010 f821ffd1 7c7f1b78 60000000 60000000 [ 336.657056] 39400000 e87f0838 f95f0838 7c0004ac <7d401828> 314affff 7d40192d 40c2fff4 [ 336.663997] -[ end trace 4640cf8d4945ad95 ]- So flag when the thread is stopped by setting the thread pointer to NULL. Signed-off-by: Dave Carroll Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 4 +++- drivers/scsi/aacraid/linit.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit 584d7aad28fd5251a72d3efb3ba76284f3a670fd Author: Johannes Thumshirn Date: Mon Apr 9 14:39:22 2018 +0200 scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION Bart reports that in qla_isr.c's qla2x00_handle_dif_error we're wrongly shifting the SAM_STAT_CHECK_CONDITION by one instead of directly ORing it onto the SCSI command's result. Signed-off-by: Johannes Thumshirn Reported-by: Bart Van Assche Cc: Himanshu Madhani Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_isr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f7d5182c8fd9d220fa9ebde2e30ff0ba0ef714b5 Author: Johannes Thumshirn Date: Mon Apr 9 14:24:23 2018 +0200 scsi: qla2xxx: correctly shift host byte The SCSI host byte has to be shifted by 16 not 6. As Bart pointed out this patch does not change any functionality because DID_OK == 0, but a wrong shift is irritating for the reviewer. Signed-off-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_isr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e74e7d95878d7993cf56c801d55d78f16ea58d1d Author: Ben Hutchings Date: Tue Mar 20 21:36:14 2018 +0000 scsi: qla2xxx: Fix race condition between iocb timeout and initialisation qla2x00_init_timer() calls add_timer() on the iocb timeout timer, which means the timeout function pointer and any data that the function depends on must be initialised beforehand. Move this initialisation before each call to qla2x00_init_timer(). In some cases qla2x00_init_timer() initialises a completion structure needed by the timeout function, so move the call to add_timer() after that. Signed-off-by: Ben Hutchings Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_gs.c | 12 +++++++----- drivers/scsi/qla2xxx/qla_init.c | 37 +++++++++++++++++++++++-------------- drivers/scsi/qla2xxx/qla_inline.h | 2 +- drivers/scsi/qla2xxx/qla_iocb.c | 8 +++++--- drivers/scsi/qla2xxx/qla_mbx.c | 8 ++++---- drivers/scsi/qla2xxx/qla_mid.c | 2 +- drivers/scsi/qla2xxx/qla_mr.c | 5 +++-- drivers/scsi/qla2xxx/qla_target.c | 2 +- 8 files changed, 45 insertions(+), 31 deletions(-) commit 3a9910d7b686546dcc9986e790af17e148f1c888 Author: Ben Hutchings Date: Tue Mar 20 21:05:48 2018 +0000 scsi: qla2xxx: Avoid double completion of abort command qla2x00_tmf_sp_done() now deletes the timer that will run qla2x00_tmf_iocb_timeout(), but doesn't check whether the timer already expired. Check the return value from del_timer() to avoid calling complete() a second time. Fixes: 4440e46d5db7 ("[SCSI] qla2xxx: Add IOCB Abort command asynchronous ...") Fixes: 1514839b3664 ("scsi: qla2xxx: Fix NULL pointer crash due to active ...") Signed-off-by: Ben Hutchings Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c18bb396d3d261ebbb4efbc05129c5d354c541e4 Merge: fd3b36d a2ac999 Author: Linus Torvalds Date: Mon Apr 9 17:04:10 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) The sockmap code has to free socket memory on close if there is corked data, from John Fastabend. 2) Tunnel names coming from userspace need to be length validated. From Eric Dumazet. 3) arp_filter() has to take VRFs properly into account, from Miguel Fadon Perlines. 4) Fix oops in error path of tcf_bpf_init(), from Davide Caratti. 5) Missing idr_remove() in u32_delete_key(), from Cong Wang. 6) More syzbot stuff. Several use of uninitialized value fixes all over, from Eric Dumazet. 7) Do not leak kernel memory to userspace in sctp, also from Eric Dumazet. 8) Discard frames from unused ports in DSA, from Andrew Lunn. 9) Fix DMA mapping and reset/failover problems in ibmvnic, from Thomas Falcon. 10) Do not access dp83640 PHY registers prematurely after reset, from Esben Haabendal. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (46 commits) vhost-net: set packet weight of tx polling to 2 * vq size net: thunderx: rework mac addresses list to u64 array inetpeer: fix uninit-value in inet_getpeer dp83640: Ensure against premature access to PHY registers after reset devlink: convert occ_get op to separate registration ARM: dts: ls1021a: Specify TBIPA register address net/fsl_pq_mdio: Allow explicit speficition of TBIPA address ibmvnic: Do not reset CRQ for Mobility driver resets ibmvnic: Fix failover case for non-redundant configuration ibmvnic: Fix reset scheduler error handling ibmvnic: Zero used TX descriptor counter on reset ibmvnic: Fix DMA mapping mistakes tipc: use the right skb in tipc_sk_fill_sock_diag() sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6 net: dsa: Discard frames from unused ports sctp: do not leak kernel memory to user space soreuseport: initialise timewait reuseport field ipv4: fix uninit-value in ip_route_output_key_hash_rcu() dccp: initialize ireq->ir_mark net: fix uninit-value in __hw_addr_add_ex() ... commit fd17ed684b6e33312cdcd9270b1fece9df266103 Author: Kunihiko Hayashi Date: Mon Apr 9 10:32:34 2018 +0900 Revert "ata: ahci-platform: add reset control support" This reverts commit f0f56716fc3e5d547fd7811eb218a30ed0695605. According to Thierry's view, https://www.spinics.net/lists/linux-ide/msg55357.html some hardware-specific drivers already use their own resets, and the common reset might make a path to occur double controls of resets. For now, revert the commit that adds reset control support to ahci-platform, and hold until the solution is confirmed not be affect all hardware-specific drivers. Fixes: f0f56716fc3e ("ata: ahci-platform: add reset control support") Reported-by: Thierry Reding Suggested-by: Hans de Goede Acked-by: Hans de Goede Signed-off-by: Kunihiko Hayashi Signed-off-by: Tejun Heo .../devicetree/bindings/ata/ahci-platform.txt | 1 - drivers/ata/ahci.h | 1 - drivers/ata/libahci_platform.c | 24 +++------------------- 3 files changed, 3 insertions(+), 23 deletions(-) commit 5a8132761609bd7e42db642d6f157140d5bf2ae8 Author: David Howells Date: Fri Apr 6 14:17:26 2018 +0100 afs: Do better accretion of small writes on newly created content Processes like ld that do lots of small writes that aren't necessarily contiguous result in a lot of small StoreData operations to the server, the idea being that if someone else changes the data on the server, we only write our changes over that and not the space between. Further, we don't want to write back empty space if we can avoid it to make it easier for the server to do sparse files. However, making lots of tiny RPC ops is a lot less efficient for the server than one big one because each op requires allocation of resources and the taking of locks, so we want to compromise a bit. Reduce the load by the following: (1) If a file is just created locally or has just been truncated with O_TRUNC locally, allow subsequent writes to the file to be merged with intervening space if that space doesn't cross an entire intervening page. (2) Don't flush the file on ->flush() but rather on ->release() if the file was open for writing. Just linking vmlinux.o, without this patch, looking in /proc/fs/afs/stats: file-wr : n=441 nb=513581204 and after the patch: file-wr : n=62 nb=513668555 there were 379 fewer StoreData RPC operations at the expense of an extra 87K being written. Signed-off-by: David Howells fs/afs/callback.c | 1 + fs/afs/dir.c | 3 +++ fs/afs/file.c | 7 ++++++- fs/afs/internal.h | 2 +- fs/afs/write.c | 32 +++++++++++++------------------- 5 files changed, 24 insertions(+), 21 deletions(-) commit 76a5cb6fc1e22a2a316fb690fc4cdd5121d1c0ff Author: David Howells Date: Fri Apr 6 14:17:26 2018 +0100 afs: Add stats for data transfer operations Add statistics to /proc/fs/afs/stats for data transfer RPC operations. New lines are added that look like: file-rd : n=55794 nb=10252282150 file-wr : n=9789 nb=3247763645 where n= indicates the number of ops completed and nb= indicates the number of bytes successfully transferred. file-rd is the counts for read/fetch operations and file-wr the counts for write/store operations. Note that directory and symlink downloading are included in the file-rd stats at the moment. Signed-off-by: David Howells fs/afs/file.c | 6 ++++++ fs/afs/internal.h | 4 ++++ fs/afs/proc.c | 7 +++++++ fs/afs/write.c | 6 ++++++ 4 files changed, 23 insertions(+) commit 5f702c8e124f967146a735a19f0b00a2469487d1 Author: David Howells Date: Fri Apr 6 14:17:25 2018 +0100 afs: Trace protocol errors Trace protocol errors detected in afs. Signed-off-by: David Howells fs/afs/cmservice.c | 4 +-- fs/afs/fsclient.c | 68 ++++++++++++++++++++++++---------------------- fs/afs/inode.c | 2 +- fs/afs/internal.h | 1 + fs/afs/rxrpc.c | 9 ++++++ fs/afs/vlclient.c | 20 +++++++------- include/trace/events/afs.h | 21 ++++++++++++++ 7 files changed, 79 insertions(+), 46 deletions(-) commit 63a4681ff39cb63314b8ff41319e70fb0e606ed2 Author: David Howells Date: Fri Apr 6 14:17:25 2018 +0100 afs: Locally edit directory data for mkdir/create/unlink/... Locally edit the contents of an AFS directory upon a successful inode operation that modifies that directory (such as mkdir, create and unlink) so that we can avoid the current practice of re-downloading the directory after each change. This is viable provided that the directory version number we get back from the modifying RPC op is exactly incremented by 1 from what we had previously. The data in the directory contents is in a defined format that we have to parse locally to perform lookups and readdir, so modifying isn't a problem. If the edit fails, we just clear the VALID flag on the directory and it will be reloaded next time it is needed. Signed-off-by: David Howells fs/afs/Makefile | 1 + fs/afs/dir.c | 83 +++++++- fs/afs/dir_edit.c | 505 +++++++++++++++++++++++++++++++++++++++++++++ fs/afs/fsclient.c | 35 ++-- fs/afs/inode.c | 7 +- fs/afs/internal.h | 19 +- fs/afs/proc.c | 4 + include/trace/events/afs.h | 90 ++++++++ 8 files changed, 715 insertions(+), 29 deletions(-) commit 0031763698d197d779fcafe5685f6e7818b70d32 Author: David Howells Date: Fri Apr 6 14:17:25 2018 +0100 afs: Adjust the directory XDR structures Adjust the AFS directory XDR structures in a number of superficial ways: (1) Rename them to all begin afs_xdr_. (2) Use u8 instead of uint8_t. (3) Mark the structures as __packed so they don't get rearranged by the compiler. (4) Rename the hdr member of afs_xdr_dir_block to meta. (5) Rename the pagehdr member of afs_xdr_dir_block to hdr. Signed-off-by: David Howells fs/afs/dir.c | 62 ++++++++++++++++++++++++++++----------------------------- fs/afs/xdr_fs.h | 44 ++++++++++++++++++++-------------------- 2 files changed, 53 insertions(+), 53 deletions(-) commit 4ea219a839bf85cf774299e2f817e609ba7ef331 Author: David Howells Date: Fri Apr 6 14:17:25 2018 +0100 afs: Split the directory content defs into a header Split the directory content definitions into a header file so that they can be used by multiple .c files. Signed-off-by: David Howells fs/afs/dir.c | 56 ++++---------------------------------------------- fs/afs/xdr_fs.h | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 52 deletions(-) commit f3ddee8dc4e2cff37936afbeed2fdaa95b7fb7c6 Author: David Howells Date: Fri Apr 6 14:17:25 2018 +0100 afs: Fix directory handling AFS directories are structured blobs that are downloaded just like files and then parsed by the lookup and readdir code and, as such, are currently handled in the pagecache like any other file, with the entire directory content being thrown away each time the directory changes. However, since the blob is a known structure and since the data version counter on a directory increases by exactly one for each change committed to that directory, we can actually edit the directory locally rather than fetching it from the server after each locally-induced change. What we can't do, though, is mix data from the server and data from the client since the server is technically at liberty to rearrange or compress a directory if it sees fit, provided it updates the data version number when it does so and breaks the callback (ie. sends a notification). Further, lookup with lookup-ahead, readdir and, when it arrives, local editing are likely want to scan the whole of a directory. So directory handling needs to be improved to maintain the coherency of the directory blob prior to permitting local directory editing. To this end: (1) If any directory page gets discarded, invalidate and reread the entire directory. (2) If readpage notes that if when it fetches a single page that the version number has changed, the entire directory is flagged for invalidation. (3) Read as much of the directory in one go as we can. Note that this removes local caching of directories in fscache for the moment as we can't pass the pages to fscache_read_or_alloc_pages() since page->lru is in use by the LRU. Signed-off-by: David Howells fs/afs/dir.c | 294 +++++++++++++++++++++++++++++++++++++++++------------- fs/afs/file.c | 14 +-- fs/afs/fsclient.c | 24 +++-- fs/afs/inode.c | 26 ++--- fs/afs/internal.h | 13 ++- fs/afs/proc.c | 5 +- fs/afs/write.c | 3 +- 7 files changed, 271 insertions(+), 108 deletions(-) commit 66c7e1d319a5b3a57de688a36200e463ec87e88e Author: David Howells Date: Fri Apr 6 14:17:25 2018 +0100 afs: Split the dynroot stuff out and give it its own ops tables Split the AFS dynamic root stuff out of the main directory handling file and into its own file as they share little in common. The dynamic root code also gets its own dentry and inode ops tables. Signed-off-by: David Howells fs/afs/Makefile | 1 + fs/afs/dir.c | 180 +--------------------------------------------- fs/afs/dynroot.c | 209 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/afs/internal.h | 12 +++- fs/afs/super.c | 11 +-- 5 files changed, 228 insertions(+), 185 deletions(-) commit a4ff7401fbfa06fba3aac14db5b33c5b76298f2c Author: David Howells Date: Fri Apr 6 14:17:24 2018 +0100 afs: Keep track of invalid-before version for dentry coherency Each afs dentry is tagged with the version that the parent directory was at last time it was validated and, currently, if this differs, the directory is scanned and the dentry is refreshed. However, this leads to an excessive amount of revalidation on directories that get modified on the client without conflict with another client. We know there's no conflict because the parent directory's data version number got incremented by exactly 1 on any create, mkdir, unlink, etc., therefore we can trust the current state of the unaffected dentries when we perform a local directory modification. Optimise by keeping track of the last version of the parent directory that was changed outside of the client in the parent directory's vnode and using that to validate the dentries rather than the current version. Signed-off-by: David Howells fs/afs/dir.c | 20 +++++++++++++++----- fs/afs/fsclient.c | 1 + fs/afs/inode.c | 1 + fs/afs/internal.h | 1 + 4 files changed, 18 insertions(+), 5 deletions(-) commit dd9fbcb8e10349fbd640aaa5942455912004f284 Author: David Howells Date: Fri Apr 6 14:17:24 2018 +0100 afs: Rearrange status mapping Rearrange the AFSFetchStatus to inode attribute mapping code in a number of ways: (1) Use an XDR structure rather than a series of incremented pointer accesses when decoding an AFSFetchStatus object. This allows out-of-order decode. (2) Don't store the if_version value but rather just check it and abort if it's not something we can handle. (3) Store the owner and group in the status record as raw values rather than converting them to kuid/kgid. Do that when they're mapped into i_uid/i_gid. (4) Validate the type and abort code up front and abort if they're wrong. (5) Split the inode attribute setting out into its own function from the XDR decode of an AFSFetchStatus object. This allows it to be called from elsewhere too. (6) Differentiate changes to data from changes to metadata. (7) Use the split-out attribute mapping function from afs_iget(). Signed-off-by: David Howells fs/afs/afs.h | 6 +- fs/afs/fsclient.c | 270 ++++++++++++++++++++++++++++++++---------------------- fs/afs/inode.c | 23 ++--- fs/afs/internal.h | 6 ++ fs/afs/xdr_fs.h | 40 ++++++++ 5 files changed, 216 insertions(+), 129 deletions(-) commit 0c3a5ac28115f45ee1d56717d9a9526bc6d63b05 Author: David Howells Date: Fri Apr 6 14:17:24 2018 +0100 afs: Make it possible to get the data version in readpage Store the data version number indicated by an FS.FetchData op into the read request structure so that it's accessible by the page reader. Signed-off-by: David Howells fs/afs/flock.c | 2 +- fs/afs/fsclient.c | 83 ++++++++++++++++++++++++++++++++----------------------- fs/afs/inode.c | 8 +++--- fs/afs/internal.h | 8 ++++-- fs/afs/security.c | 2 +- 5 files changed, 59 insertions(+), 44 deletions(-) commit 5800db810a2308544a9e42686a2fc7f8682418ba Author: David Howells Date: Fri Apr 6 14:17:24 2018 +0100 afs: Init inode before accessing cache We no longer parse symlinks when we get the inode to determine if this symlink is actually a mountpoint as we detect that by examining the mode instead (symlinks are always 0777 and mountpoints 0644). Access the cache after mapping the status so that we don't have to manually set the inode size now. Note that this may need adjusting if the disconnected operation is implemented as the file metadata may have to be obtained from the cache. Signed-off-by: David Howells fs/afs/inode.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit d55b4da4331efdfe2be1bcc7bc217bd3f7c47870 Author: David Howells Date: Fri Apr 6 14:17:24 2018 +0100 afs: Introduce a statistics proc file Introduce a proc file that displays a bunch of statistics for the AFS filesystem in the current network namespace. Signed-off-by: David Howells fs/afs/dir.c | 3 +++ fs/afs/inode.c | 3 +++ fs/afs/internal.h | 15 ++++++++++++++- fs/afs/proc.c | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) commit 888b33846111927d94dee6d8187c72515160edd3 Author: David Howells Date: Fri Apr 6 14:17:24 2018 +0100 afs: Dump bad status record Dump an AFS FileStatus record that is detected as invalid. Signed-off-by: David Howells fs/afs/fsclient.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 6d6340672ba3a99c4cf7af79c2edf7aa25595c84 Author: Bill Kuzeja Date: Fri Mar 23 10:37:25 2018 -0400 scsi: qla2xxx: Fix small memory leak in qla2x00_probe_one on probe failure The code that fixes the crashes in the following commit introduced a small memory leak: commit 6a2cf8d3663e ("scsi: qla2xxx: Fix crashes in qla2x00_probe_one on probe failure") Fixing this requires a bit of reworking, which I've explained. Also provide some code cleanup. There is a small window in qla2x00_probe_one where if qla2x00_alloc_queues fails, we end up never freeing req and rsp and leak 0xc0 and 0xc8 bytes respectively (the sizes of req and rsp). I originally put in checks to test for this condition which were based on the incorrect assumption that if ha->rsp_q_map and ha->req_q_map were allocated, then rsp and req were allocated as well. This is incorrect. There is a window between these allocations: ret = qla2x00_mem_alloc(ha, req_length, rsp_length, &req, &rsp); goto probe_hw_failed; [if successful, both rsp and req allocated] base_vha = qla2x00_create_host(sht, ha); goto probe_hw_failed; ret = qla2x00_request_irqs(ha, rsp); goto probe_failed; if (qla2x00_alloc_queues(ha, req, rsp)) { goto probe_failed; [if successful, now ha->rsp_q_map and ha->req_q_map allocated] To simplify this, we should just set req and rsp to NULL after we free them. Sounds simple enough? The problem is that req and rsp are pointers defined in the qla2x00_probe_one and they are not always passed by reference to the routines that free them. Here are paths which can free req and rsp: PATH 1: qla2x00_probe_one ret = qla2x00_mem_alloc(ha, req_length, rsp_length, &req, &rsp); [req and rsp are passed by reference, but if this fails, we currently do not NULL out req and rsp. Easily fixed] PATH 2: qla2x00_probe_one failing in qla2x00_request_irqs or qla2x00_alloc_queues probe_failed: qla2x00_free_device(base_vha); qla2x00_free_req_que(ha, req) qla2x00_free_rsp_que(ha, rsp) PATH 3: qla2x00_probe_one: failing in qla2x00_mem_alloc or qla2x00_create_host probe_hw_failed: qla2x00_free_req_que(ha, req) qla2x00_free_rsp_que(ha, rsp) PATH 1: This should currently work, but it doesn't because rsp and rsp are not set to NULL in qla2x00_mem_alloc. Easily remedied. PATH 2: req and rsp aren't passed in at all to qla2x00_free_device but are derived from ha->req_q_map[0] and ha->rsp_q_map[0]. These are only set up if qla2x00_alloc_queues succeeds. In qla2x00_free_queues, we are protected from crashing if these don't exist because req_qid_map and rsp_qid_map are only set on their allocation. We are guarded in this way: for (cnt = 0; cnt < ha->max_req_queues; cnt++) { if (!test_bit(cnt, ha->req_qid_map)) continue; PATH 3: This works. We haven't freed req or rsp yet (or they were never allocated if qla2x00_mem_alloc failed), so we'll attempt to free them here. To summarize, there are a few small changes to make this work correctly and (and for some cleanup): 1) (For PATH 1) Set *rsp and *req to NULL in case of failure in qla2x00_mem_alloc so these are correctly set to NULL back in qla2x00_probe_one 2) After jumping to probe_failed: and calling qla2x00_free_device, explicitly set rsp and req to NULL so further calls with these pointers do not crash, i.e. the free queue calls in the probe_hw_failed section we fall through to. 3) Fix return code check in the call to qla2x00_alloc_queues. We currently drop the return code on the floor. The probe fails but the caller of the probe doesn't have an error code, so it attaches to pci. This can result in a crash on module shutdown. 4) Remove unnecessary NULL checks in qla2x00_free_req_que, qla2x00_free_rsp_que, and the egregious NULL checks before kfrees and vfrees in qla2x00_mem_free. I tested this out running a scenario where the card breaks at various times during initialization. I made sure I forced every error exit path in qla2x00_probe_one. Cc: # v4.16 Fixes: 6a2cf8d3663e ("scsi: qla2xxx: Fix crashes in qla2x00_probe_one on probe failure") Signed-off-by: Bill Kuzeja Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 44 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 23 deletions(-) commit 2ee5671e3ae35e53bb5a53a89ac8f033e4b1721f Author: Johannes Thumshirn Date: Fri Mar 23 14:37:05 2018 +0100 scsi: scsi_dh: Don't look for NULL devices handlers by name Currently scsi_dh_lookup() doesn't check for NULL as a device name. This combined with nvme over dm-mpath results in the following messages emitted by device-mapper: device-mapper: multipath: Could not failover device 259:67: Handler scsi_dh_(null) error 14. Let scsi_dh_lookup() fail fast on NULL names. [mkp: typo fix] Cc: # v4.16 Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_dh.c | 3 +++ 1 file changed, 3 insertions(+) commit cbee67c2d7f97aaa1a85501d621002b4dc1e24b8 Author: Colin Ian King Date: Wed Mar 28 17:41:42 2018 +0100 scsi: core: remove redundant assignment to shost->use_blk_mq The first assignment to shost->use_blk_mq is redundant as it is overwritten by the following statement. Remove this redundant code. Detected by CoverityScan, CID#1466993 ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/hosts.c | 1 - 1 file changed, 1 deletion(-) commit 37ab636880cbc95ba87a5790bee23a1c813089c6 Author: David Howells Date: Fri Apr 6 14:17:23 2018 +0100 afs: Implement @cell substitution handling Implement @cell substitution handling such that if @cell is seen as a name in a dynamic root mount, then the name of the root cell for that network namespace will be substituted for @cell during lookup. The substitution of @cell for the current net namespace is set by writing the cell name to /proc/fs/afs/rootcell. The value can be obtained by reading the file. For example: # mount -t afs none /kafs -o dyn # echo grand.central.org >/proc/fs/afs/rootcell # ls /kafs/@cell archive/ cvs/ doc/ local/ project/ service/ software/ user/ www/ # cat /proc/fs/afs/rootcell grand.central.org Signed-off-by: David Howells fs/afs/cell.c | 2 ++ fs/afs/dir.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/afs/proc.c | 35 ++++++++++++++++++++++++++++++++++- 3 files changed, 89 insertions(+), 1 deletion(-) commit 6f8880d8e68155726a2a22e8787cfebf1ffcab08 Author: David Howells Date: Mon Apr 9 21:12:31 2018 +0100 afs: Implement @sys substitution handling Implement the AFS feature by which @sys at the end of a pathname component may be substituted for one of a list of values, typically naming the operating system. Up to 16 alternatives may be specified and these are tried in turn until one works. Each network namespace has[*] a separate independent list. Upon creation of a new network namespace, the list of values is initialised[*] to a single OpenAFS-compatible string representing arch type plus "_linux26". For example, on x86_64, the sysname is "amd64_linux26". [*] Or will, once network namespace support is finalised in kAFS. The list may be set by: # for i in foo bar linux-x86_64; do echo $i; done >/proc/fs/afs/sysname for which separate writes to the same fd are amalgamated and applied on close. The LF character may be used as a separator to specify multiple items in the same write() call. The list may be cleared by: # echo >/proc/fs/afs/sysname and read by: # cat /proc/fs/afs/sysname foo bar linux-x86_64 Signed-off-by: David Howells Documentation/filesystems/afs.txt | 28 ++++- fs/afs/dir.c | 63 +++++++++++ fs/afs/internal.h | 16 +++ fs/afs/main.c | 44 ++++++++ fs/afs/proc.c | 231 +++++++++++++++++++++++++++++++++++++- 5 files changed, 380 insertions(+), 2 deletions(-) commit 5cf9dd55a0ec26428f2824aadd16bfa305a5b603 Author: David Howells Date: Mon Apr 9 21:12:31 2018 +0100 afs: Prospectively look up extra files when doing a single lookup When afs_lookup() is called, prospectively look up the next 50 uncached fids also from that same directory and cache the results, rather than just looking up the one file requested. This allows us to use the FS.InlineBulkStatus RPC op to increase efficiency by fetching up to 50 file statuses at a time. Signed-off-by: David Howells fs/afs/afs.h | 21 ++-- fs/afs/afs_fs.h | 2 + fs/afs/callback.c | 8 +- fs/afs/cmservice.c | 12 +- fs/afs/dir.c | 288 +++++++++++++++++++++++++++++++++++++++------ fs/afs/fsclient.c | 272 +++++++++++++++++++++++++++++++++++++++++- fs/afs/internal.h | 10 +- include/trace/events/afs.h | 2 + 8 files changed, 552 insertions(+), 63 deletions(-) commit 17814aef57fc0b80ac2a4a7a639db358b75cb6b9 Author: David Howells Date: Mon Apr 9 21:12:31 2018 +0100 afs: Don't over-increment the cell usage count when pinning it AFS cells that are added or set as the workstation cell through /proc are pinned against removal by setting the AFS_CELL_FL_NO_GC flag on them and taking a ref. The ref should be only taken if the flag wasn't already set. Fix this by making it conditional. Without this an assertion failure will occur during module removal indicating that the refcount is too elevated. Signed-off-by: David Howells fs/afs/cell.c | 4 ++-- fs/afs/proc.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) commit fe342cf77bc3c3ba89e8bb1e4eddbe614df4efa4 Author: David Howells Date: Mon Apr 9 21:12:31 2018 +0100 afs: Fix checker warnings Fix warnings raised by checker, including: (*) Warnings raised by unequal comparison for the purposes of sorting, where the endianness doesn't matter: fs/afs/addr_list.c:246:21: warning: restricted __be16 degrades to integer fs/afs/addr_list.c:246:30: warning: restricted __be16 degrades to integer fs/afs/addr_list.c:248:21: warning: restricted __be32 degrades to integer fs/afs/addr_list.c:248:49: warning: restricted __be32 degrades to integer fs/afs/addr_list.c:283:21: warning: restricted __be16 degrades to integer fs/afs/addr_list.c:283:30: warning: restricted __be16 degrades to integer (*) afs_set_cb_interest() is not actually used and can be removed. (*) afs_cell_gc_delay() should be provided with a sysctl. (*) afs_cell_destroy() needs to use rcu_access_pointer() to read cell->vl_addrs. (*) afs_init_fs_cursor() should be static. (*) struct afs_vnode::permit_cache needs to be marked __rcu. (*) afs_server_rcu() needs to use rcu_access_pointer(). (*) afs_destroy_server() should use rcu_access_pointer() on server->addresses as the server object is no longer accessible. (*) afs_find_server() casts __be16/__be32 values to int in order to directly compare them for the purpose of finding a match in a list, but is should also annotate the cast with __force to avoid checker warnings. (*) afs_check_permit() accesses vnode->permit_cache outside of the RCU readlock, though it doesn't then access the value; the extraneous access is deleted. False positives: (*) Conditional locking around the code in xdr_decode_AFSFetchStatus. This can be dealt with in a separate patch. fs/afs/fsclient.c:148:9: warning: context imbalance in 'xdr_decode_AFSFetchStatus' - different lock contexts for basic block (*) Incorrect handling of seq-retry lock context balance: fs/afs/inode.c:455:38: warning: context imbalance in 'afs_getattr' - different lock contexts for basic block fs/afs/server.c:52:17: warning: context imbalance in 'afs_find_server' - different lock contexts for basic block fs/afs/server.c:128:17: warning: context imbalance in 'afs_find_server_by_uuid' - different lock contexts for basic block Errors: (*) afs_lookup_cell_rcu() needs to break out of the seq-retry loop, not go round again if it successfully found the workstation cell. (*) Fix UUID decode in afs_deliver_cb_probe_uuid(). (*) afs_cache_permit() has a missing rcu_read_unlock() before one of the jumps to the someone_else_changed_it label. Move the unlock to after the label. (*) afs_vl_get_addrs_u() is using ntohl() rather than htonl() when encoding to XDR. (*) afs_deliver_yfsvl_get_endpoints() is using htonl() rather than ntohl() when decoding from XDR. Signed-off-by: David Howells fs/afs/addr_list.c | 6 +++--- fs/afs/callback.c | 20 -------------------- fs/afs/cell.c | 6 +++--- fs/afs/cmservice.c | 6 +++--- fs/afs/inode.c | 2 +- fs/afs/internal.h | 2 +- fs/afs/proc.c | 8 ++++++++ fs/afs/rotate.c | 2 +- fs/afs/security.c | 11 +++-------- fs/afs/server.c | 14 ++++++++------ fs/afs/vlclient.c | 8 ++++---- 11 files changed, 35 insertions(+), 50 deletions(-) commit a09acf4b43b90581bf53b0c03cc84ed693bf27e2 Author: David Howells Date: Mon Apr 9 21:12:30 2018 +0100 vfs: Remove the const from dir_context::actor Remove the const marking from the actor function pointer in the dir_context struct. The const prevents the structure from being used as part of a kmalloc'd object as it makes the compiler require that the actor member be set at object initialisation time (or not at all), incuring something like the following error if you try and set it later: fs/afs/dir.c:556:20: error: assignment of read-only member 'actor' Marking the member const like this adds very little in the way of sanity checking as the type checking system is likely to provide sufficient - and if not, the kernel is very likely to oops repeatably in this case. Fixes: ac6614b76478 ("[readdir] constify ->actor") Signed-off-by: David Howells Reviewed-by: Al Viro include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd3b36d275660c905da9900b078eea341847d5e4 Merge: 8ea4a5d 30ce4d1 Author: Linus Torvalds Date: Mon Apr 9 12:48:05 2018 -0700 Merge branch 'work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs namei updates from Al Viro: - make lookup_one_len() safe with parent locked only shared(incoming afs series wants that) - fix of getname_kernel() regression from 2015 (-stable fodder, that one). * 'work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: getname_kernel() needs to make sure that ->name != ->iname in long case make lookup_one_len() safe to use with directory locked shared new helper: __lookup_slow() merge common parts of lookup_one_len{,_unlocked} into common helper commit 8ea4a5d84e6c44b3508599fe114ea806e63985a4 Merge: 190f2ac 8e9ba5c Author: Linus Torvalds Date: Mon Apr 9 12:45:47 2018 -0700 Merge tag 'for-linus-4.17-ofs' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs updates from Mike Marshall: "Fixes and cleanups: - Documentation cleanups - removal of unused code - make some structs static - implement Orangefs vm_operations fault callout - eliminate two single-use functions and put their cleaned up code in line. - replace a vmalloc/memset instance with vzalloc - fix a race condition bug in wait code" * tag 'for-linus-4.17-ofs' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: Orangefs: documentation updates orangefs: document package install and xfstests procedure orangefs: remove unused code orangefs: make several *_operations structs static orangefs: implement vm_ops->fault orangefs: open code short single-use functions orangefs: replace vmalloc and memset with vzalloc orangefs: bug fix for a race condition when getting a slot commit 190f2ace0efdf632f0451a9543f00f50148837bf Merge: fd40ffc e698aaf Author: Linus Torvalds Date: Mon Apr 9 12:43:18 2018 -0700 Merge tag 'pstore-v4.17-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore fix from Kees Cook: "Fix another compression Kconfig combination missed in testing (Tobias Regnery)" * tag 'pstore-v4.17-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: fix crypto dependencies without compression commit c0db1b677e1d584fab5d7ac76a32e1c0157542e0 Author: Daniel J Blueman Date: Mon Apr 2 15:10:35 2018 +0800 drm/vc4: Fix memory leak during BO teardown During BO teardown, an indirect list 'uniform_addr_offsets' wasn't being freed leading to leaking many 128B allocations. Fix the memory leak by releasing it at teardown time. Cc: stable@vger.kernel.org Fixes: 6d45c81d229d ("drm/vc4: Add support for branching in shader validation.") Signed-off-by: Daniel J Blueman Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180402071035.25356-1-daniel@quora.org drivers/gpu/drm/vc4/vc4_bo.c | 2 ++ drivers/gpu/drm/vc4/vc4_validate_shaders.c | 1 + 2 files changed, 3 insertions(+) commit fd40ffc72e2f74c7db61e400903e7d50a88bc0b0 Author: Stephen Smalley Date: Mon Apr 9 14:36:05 2018 -0400 selinux: fix missing dput() before selinuxfs unmount Commit 0619f0f5e36f ("selinux: wrap selinuxfs state") triggers a BUG when SELinux is runtime-disabled (i.e. systemd or equivalent disables SELinux before initial policy load via /sys/fs/selinux/disable based on /etc/selinux/config SELINUX=disabled). This does not manifest if SELinux is disabled via kernel command line argument or if SELinux is enabled (permissive or enforcing). Before: SELinux: Disabled at runtime. BUG: Dentry 000000006d77e5c7{i=17,n=null} still in use (1) [unmount of selinuxfs selinuxfs] After: SELinux: Disabled at runtime. Fixes: 0619f0f5e36f ("selinux: wrap selinuxfs state") Reported-by: Tetsuo Handa Reported-by: Dmitry Vyukov Signed-off-by: Stephen Smalley Signed-off-by: Linus Torvalds security/selinux/selinuxfs.c | 1 + 1 file changed, 1 insertion(+) commit d8312a3f61024352f1c7cb967571fd53631b0d6c Merge: e9092d0 e01bca2 Author: Linus Torvalds Date: Mon Apr 9 11:42:31 2018 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm updates from Paolo Bonzini: "ARM: - VHE optimizations - EL2 address space randomization - speculative execution mitigations ("variant 3a", aka execution past invalid privilege register access) - bugfixes and cleanups PPC: - improvements for the radix page fault handler for HV KVM on POWER9 s390: - more kvm stat counters - virtio gpu plumbing - documentation - facilities improvements x86: - support for VMware magic I/O port and pseudo-PMCs - AMD pause loop exiting - support for AMD core performance extensions - support for synchronous register access - expose nVMX capabilities to userspace - support for Hyper-V signaling via eventfd - use Enlightened VMCS when running on Hyper-V - allow userspace to disable MWAIT/HLT/PAUSE vmexits - usual roundup of optimizations and nested virtualization bugfixes Generic: - API selftest infrastructure (though the only tests are for x86 as of now)" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (174 commits) kvm: x86: fix a prototype warning kvm: selftests: add sync_regs_test kvm: selftests: add API testing infrastructure kvm: x86: fix a compile warning KVM: X86: Add Force Emulation Prefix for "emulate the next instruction" KVM: X86: Introduce handle_ud() KVM: vmx: unify adjacent #ifdefs x86: kvm: hide the unused 'cpu' variable KVM: VMX: remove bogus WARN_ON in handle_ept_misconfig Revert "KVM: X86: Fix SMRAM accessing even if VM is shutdown" kvm: Add emulation for movups/movupd KVM: VMX: raise internal error for exception during invalid protected mode state KVM: nVMX: Optimization: Dont set KVM_REQ_EVENT when VMExit with nested_run_pending KVM: nVMX: Require immediate-exit when event reinjected to L2 and L1 event pending KVM: x86: Fix misleading comments on handling pending exceptions KVM: x86: Rename interrupt.pending to interrupt.injected KVM: VMX: No need to clear pending NMI/interrupt on inject realmode interrupt x86/kvm: use Enlightened VMCS when running on Hyper-V x86/hyper-v: detect nested features x86/hyper-v: define struct hv_enlightened_vmcs and clean field bits ... commit e13e75b86ef2f88e3a47d672dd4c52a293efb95b Merge: 1ed41b5 976431b Author: Dan Williams Date: Mon Apr 9 10:50:17 2018 -0700 Merge branch 'for-4.17/dax' into libnvdimm-for-next commit 1ed41b5696ccc3ff40a1dee39fe14eff273faf82 Merge: 3eb2ce8 291717b Author: Dan Williams Date: Mon Apr 9 10:50:08 2018 -0700 Merge branch 'for-4.17/libnvdimm' into libnvdimm-for-next commit e9092d0d97961146655ce51f43850907d95f68c3 Author: Linus Torvalds Date: Mon Apr 9 10:34:07 2018 -0700 Fix subtle macro variable shadowing in min_not_zero() Commit 3c8ba0d61d04 ("kernel.h: Retain constant expression output for max()/min()") rewrote our min/max macros to be very clever, but in the meantime resurrected a variable name shadow issue that we had had previously fixed in commit 589a9785ee3a ("min/max: remove sparse warnings when they're nested"). That commit talks about the sparse warnings that this shadowing causes, which we ignored as just a minor annoyance. But it turns out that the sparse warning is the least of our problems. We actually have a real bug due to the shadowing through the interaction with "min_not_zero()", which ends up doing min(__x, __y) internally, and then the new declaration of "__x" and "__y" as new variables in __cmp_once() results in a complete mess of an expression, and "min_not_zero()" doesn't work at all. For some odd reason, this only ever caused (reported) problems on s390, even though it is a generic issue and most of the (obviously successful) testing of the problematic commit had happened on other architectures. Quoting Sebastian Ott: "What happened is that the bio build by the partition detection code was attempted to be split by the block layer because the block queue had a max_sector setting of 0. blk_queue_max_hw_sectors uses min_not_zero." So re-introduce the use of __UNIQUE_ID() to make sure that the min/max macros do not have these kinds of clashes. [ That said, __UNIQUE_ID() itself has several issues that make it less than wonderful. In particular, the "uniqueness" has a fallback on the line number, which means that it's not actually unique in more complex cases if you don't build with gcc or clang (which have working unique counters that aren't tied to line numbers). That historical broken fallback also means that we have that pointless "prefix" argument that doesn't actually make much sense _except_ for the known-broken case. Oh well. ] Fixes: 3c8ba0d61d04 ("kernel.h: Retain constant expression output for max()/min()") Reported-and-tested-by: Sebastian Ott Cc: Kees Cook Cc: Ingo Molnar Cc: Miguel Ojeda Signed-off-by: Linus Torvalds include/linux/kernel.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit a1f69417c6f4d1c5280ffb795da7778cba1e1451 Author: Eric Sandeen Date: Fri Apr 6 10:09:42 2018 -0700 xfs: non-scrub - remove unused function parameters Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_alloc.c | 6 ++---- fs/xfs/libxfs/xfs_alloc.h | 5 ++--- fs/xfs/libxfs/xfs_bmap.c | 3 +-- fs/xfs/libxfs/xfs_bmap.h | 2 +- fs/xfs/libxfs/xfs_btree.c | 2 -- fs/xfs/libxfs/xfs_btree.h | 6 ++---- fs/xfs/libxfs/xfs_ialloc.c | 2 +- fs/xfs/libxfs/xfs_ialloc_btree.c | 2 +- fs/xfs/libxfs/xfs_refcount.c | 22 ++++++++-------------- fs/xfs/libxfs/xfs_refcount_btree.c | 5 ++--- fs/xfs/libxfs/xfs_refcount_btree.h | 3 +-- fs/xfs/libxfs/xfs_rmap.c | 3 +-- fs/xfs/libxfs/xfs_rmap_btree.c | 5 ++--- fs/xfs/libxfs/xfs_rmap_btree.h | 2 +- fs/xfs/libxfs/xfs_sb.c | 10 ++++------ fs/xfs/libxfs/xfs_trans_resv.c | 10 ++++------ fs/xfs/xfs_bmap_util.c | 3 +-- fs/xfs/xfs_buf.c | 1 - fs/xfs/xfs_buf.h | 2 +- fs/xfs/xfs_filestream.c | 2 +- fs/xfs/xfs_inode.c | 3 +-- fs/xfs/xfs_inode.h | 4 ++-- fs/xfs/xfs_iops.c | 2 +- fs/xfs/xfs_log.c | 1 - fs/xfs/xfs_log.h | 3 +-- fs/xfs/xfs_log_cil.c | 2 +- fs/xfs/xfs_super.c | 13 ++++++------- 27 files changed, 48 insertions(+), 76 deletions(-) commit 7fcd3efa1e9ebebf71f9c65f6c0a8ce993122424 Author: Christoph Hellwig Date: Mon Apr 9 10:23:39 2018 -0700 xfs: remove filestream item xfs_inode reference The filestreams allocator stores an xfs_fstrm_item structure in the MRU to cache inode number to agno mappings for a particular length of time. Each xfs_fstrm_item contains the internal MRU structure, an inode pointer and agno value. The inode pointer stored in the xfs_fstrm_item is not referenced, however, which means the inode itself can be removed and reclaimed before the MRU item is freed. If this occurs, xfs_fstrm_free_func() can access freed or unrelated memory through xfs_fstrm_item->ip and crash. The obvious solution is to grab an inode reference for xfs_fstrm_item. The filestream mechanism only actually uses the inode pointer as a means to access the xfs_mount, however. Rather than add unnecessary complexity, simplify the implementation to store an xfs_mount pointer in struct xfs_mru_cache, and pass it to the free callback. This also requires updates to the tracepoint class to provide the associated data via parameters rather than the inode and a minor hack to peek at the MRU key to establish the inode number at free time. Based on debugging work and an earlier patch from Brian Foster, who also wrote most of this changelog. Reported-by: Brian Foster Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_filestream.c | 19 +++++++++---------- fs/xfs/xfs_mru_cache.c | 8 +++++--- fs/xfs/xfs_mru_cache.h | 8 ++++---- fs/xfs/xfs_trace.h | 14 +++++++------- 4 files changed, 25 insertions(+), 24 deletions(-) commit 6baf4bec02dbc41645c3a5130ee15a8e1d62b80f Author: Dave Hansen Date: Fri Apr 6 13:55:07 2018 -0700 x86/espfix: Document use of _PAGE_GLOBAL The "normal" kernel page table creation mechanisms using PAGE_KERNEL_* page protections will never set _PAGE_GLOBAL with PTI. The few places in the kernel that always want _PAGE_GLOBAL must avoid using PAGE_KERNEL_*. Document that we want it here and its use is not accidental. Signed-off-by: Dave Hansen Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dan Williams Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Nadav Amit Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180406205507.BCF4D4F0@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/espfix_64.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8a57f4849f4fa22ed18a941164a214083fc020a2 Author: Dave Hansen Date: Fri Apr 6 13:55:06 2018 -0700 x86/mm: Introduce "default" kernel PTE mask The __PAGE_KERNEL_* page permissions are "raw". They contain bits that may or may not be supported on the current processor. They need to be filtered by a mask (currently __supported_pte_mask) to turn them into a value that we can actually set in a PTE. These __PAGE_KERNEL_* values all contain _PAGE_GLOBAL. But, with PTI, we want to be able to support _PAGE_GLOBAL (have the bit set in __supported_pte_mask) but not have it appear in any of these masks by default. This patch creates a new mask, __default_kernel_pte_mask, and applies it when creating all of the PAGE_KERNEL_* masks. This makes PAGE_KERNEL_* safe to use anywhere (they only contain supported bits). It also ensures that PAGE_KERNEL_* contains _PAGE_GLOBAL on PTI=n kernels but clears _PAGE_GLOBAL when PTI=y. We also make __default_kernel_pte_mask a non-GPL exported symbol because there are plenty of driver-available interfaces that take PAGE_KERNEL_* permissions. Signed-off-by: Dave Hansen Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dan Williams Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Nadav Amit Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180406205506.030DB6B6@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable_types.h | 29 ++++++++++++++++------------- arch/x86/mm/init.c | 6 ++++++ arch/x86/mm/init_32.c | 8 +++++++- arch/x86/mm/init_64.c | 5 +++++ 4 files changed, 34 insertions(+), 14 deletions(-) commit 606c7193d5fbf8ea3dafc8a9468f719fbf1d7160 Author: Dave Hansen Date: Fri Apr 6 13:55:04 2018 -0700 x86/mm: Undo double _PAGE_PSE clearing When clearing _PAGE_PRESENT on a huge page, we need to be careful to also clear _PAGE_PSE, otherwise it might still get confused for a valid large page table entry. We do that near the spot where we *set* _PAGE_PSE. That's fine, but it's unnecessary. pgprot_large_2_4k() already did it. BTW, I also noticed that pgprot_large_2_4k() and pgprot_4k_2_large() are not symmetric. pgprot_large_2_4k() clears _PAGE_PSE (because it is aliased to _PAGE_PAT) but pgprot_4k_2_large() does not put _PAGE_PSE back. Bummer. Also, add some comments and change "promote" to "move". "Promote" seems an odd word to move when we are logically moving a bit to a lower bit position. Also add an extra line return to make it clear to which line the comment applies. Signed-off-by: Dave Hansen Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dan Williams Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Nadav Amit Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180406205504.9B0F44A9@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/pageattr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit d1440b23c922d845ff039f64694a32ff356e89fa Author: Dave Hansen Date: Fri Apr 6 13:55:02 2018 -0700 x86/mm: Factor out pageattr _PAGE_GLOBAL setting The pageattr code has a pattern repeated where it sets _PAGE_GLOBAL for present PTEs but clears it for non-present PTEs. The intention is to keep _PAGE_GLOBAL from getting confused with _PAGE_PROTNONE since _PAGE_GLOBAL is for present PTEs and _PAGE_PROTNONE is for non-present But, this pattern makes no sense. Effectively, it says, if you use the pageattr code, always set _PAGE_GLOBAL when _PAGE_PRESENT. canon_pgprot() will clear it if unsupported (because it masks the value with __supported_pte_mask) but we *always* set it. Even if canon_pgprot() did not filter _PAGE_GLOBAL, it would be OK. _PAGE_GLOBAL is ignored when CR4.PGE=0 by the hardware. This unconditional setting of _PAGE_GLOBAL is a problem when we have PTI and non-PTI and we want some areas to have _PAGE_GLOBAL and some not. This updated version of the code says: 1. Clear _PAGE_GLOBAL when !_PAGE_PRESENT 2. Never set _PAGE_GLOBAL implicitly 3. Allow _PAGE_GLOBAL to be in cpa.set_mask 4. Allow _PAGE_GLOBAL to be inherited from previous PTE Signed-off-by: Dave Hansen Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dan Williams Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Nadav Amit Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180406205502.86E199DA@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/pageattr.c | 66 ++++++++++++++++++-------------------------------- 1 file changed, 23 insertions(+), 43 deletions(-) commit 7886e8aa7ff59198271ac650878eb247627a8b9a Merge: 4a1e005 64b2f12 Author: Linus Torvalds Date: Mon Apr 9 09:26:36 2018 -0700 Merge branch 'for-linus-sa1100' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM SA1100 updates from Russell King: "We have support for arbitary MMIO registers providing platform GPIOs, which allows us to abstract some of the SA11x0 CF support. This set of updates makes that change" * 'for-linus-sa1100' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: sa1100/simpad: switch simpad CF to use gpiod APIs ARM: sa1100/shannon: convert to generic CF sockets ARM: sa1100/nanoengine: convert to generic CF sockets ARM: sa1100/h3xxx: switch h3xxx PCMCIA to use gpiod APIs ARM: sa1100/cerf: convert to generic CF sockets ARM: sa1100/assabet: convert to generic CF sockets ARM: sa1100: provide infrastructure to support generic CF sockets pcmcia: sa1100: provide generic CF support commit ee1400dda31814d0a61c964ad87da6880edec0e2 Merge: 071ccc9 bc16d40 Author: Ingo Molnar Date: Mon Apr 9 18:24:58 2018 +0200 Merge branch 'linus' into x86/pti to pick up upstream changes Signed-off-by: Ingo Molnar commit 071ccc966ba5db1ac8f5c24b0faebb37698f68db Author: Andy Lutomirski Date: Tue Apr 3 15:39:26 2018 -0700 x86/entry/64: Drop idtentry's manual stack switch for user entries For non-paranoid entries, idtentry knows how to switch from the kernel stack to the user stack, as does error_entry. This results in pointless duplication and code bloat. Make idtentry stop thinking about stacks for non-paranoid entries. This reduces text size by 5377 bytes. This goes back to the following commit: 7f2590a110b8 ("x86/entry/64: Use a per-CPU trampoline stack for IDT entries") Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Dominik Brodowski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/90aab80c1f906e70742eaa4512e3c9b5e62d59d4.1522794757.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 92e830f25fc0be447486a4658887ded68ef824f5 Author: Arnd Bergmann Date: Wed Apr 4 14:44:54 2018 +0200 x86/olpc: Fix inconsistent MFD_CS5535 configuration This Kconfig warning appeared after a fix to the Kconfig validation. The GPIO_CS5535 driver depends on the MFD_CS5535 driver, but the former is selected in places where the latter is not: WARNING: unmet direct dependencies detected for GPIO_CS5535 Depends on [m]: GPIOLIB [=y] && (X86 [=y] || MIPS || COMPILE_TEST [=y]) && MFD_CS5535 [=m] Selected by [y]: - OLPC_XO1_SCI [=y] && X86_32 [=y] && OLPC [=y] && OLPC_XO1_PM [=y] && INPUT [=y]=y The warning does seem appropriate, since the GPIO_CS5535 driver won't work unless MFD_CS5535 is also present. However, there is no link time dependency between the two, so this caused no problems during randconfig testing before. This changes the 'select GPIO_CS5535' to 'depends on GPIO_CS5535' to avoid the issue, at the expense of making it harder to configure the driver (one now has to select the dependencies first). The 'select MFD_CORE' part is completely redundant, since we already depend on MFD_CS5535 here, so I'm removing that as well. Ideally, the private symbols exported by that cs5535 gpio driver would just be converted to gpiolib interfaces so we could expletely avoid this dependency. Signed-off-by: Arnd Bergmann Acked-by: Thomas Gleixner Cc: Andrew Morton Cc: Linus Torvalds Cc: Masahiro Yamada Cc: Peter Zijlstra Cc: linux-kbuild@vger.kernel.org Fixes: f622f8279581 ("kconfig: warn unmet direct dependency of tristate symbols selected by y") Link: http://lkml.kernel.org/r/20180404124539.3817101-1-arnd@arndb.de Signed-off-by: Ingo Molnar arch/x86/Kconfig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 66bdb1478fd1a66d5b8b81e4e28e0ed3df63ed37 Author: Christoph Hellwig Date: Mon Apr 9 11:15:17 2018 +0200 swiotlb: Use dma_direct_supported() for swiotlb_ops swiotlb_alloc() calls dma_direct_alloc(), which can satisfy lower than 32-bit DMA mask requests using GFP_DMA if the architecture supports it. Various x86 drivers rely on that, so we need to support that. At the same time the whole kernel expects a 32-bit DMA mask to just work, so the other magic in swiotlb_dma_supported() isn't actually needed either. Reported-by: Dominik Brodowski Signed-off-by: Christoph Hellwig Cc: Konrad Rzeszutek Wilk Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: iommu@lists.linux-foundation.org Fixes: 6e4bf5867783 ("x86/dma: Use generic swiotlb_ops") Link: http://lkml.kernel.org/r/20180409091517.6619-2-hch@lst.de Signed-off-by: Ingo Molnar lib/swiotlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a1e00524cbdd38567e36f9c54a0444deebd864a Merge: 2025fef 9178caf Author: Linus Torvalds Date: Mon Apr 9 09:19:30 2018 -0700 Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: "A number of core ARM changes: - Refactoring linker script by Nicolas Pitre - Enable source fortification - Add support for Cortex R8" * 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: decompressor: fix warning introduced in fortify patch ARM: 8751/1: Add support for Cortex-R8 processor ARM: 8749/1: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE ARM: simplify and fix linker script for TCM ARM: linker script: factor out TCM bits ARM: linker script: factor out vectors and stubs ARM: linker script: factor out unwinding table sections ARM: linker script: factor out stuff for the .text section ARM: linker script: factor out stuff for the DISCARD section ARM: linker script: factor out some common definitions between XIP and non-XIP commit 621b6d2ea297d0fb6030452c5bcd221f12165fcf Author: Prashant Bhole Date: Mon Apr 9 19:03:46 2018 +0900 perf/core: Fix use-after-free in uprobe_perf_close() A use-after-free bug was caught by KASAN while running usdt related code (BCC project. bcc/tests/python/test_usdt2.py): ================================================================== BUG: KASAN: use-after-free in uprobe_perf_close+0x222/0x3b0 Read of size 4 at addr ffff880384f9b4a4 by task test_usdt2.py/870 CPU: 4 PID: 870 Comm: test_usdt2.py Tainted: G W 4.16.0-next-20180409 #215 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 Call Trace: dump_stack+0xc7/0x15b ? show_regs_print_info+0x5/0x5 ? printk+0x9c/0xc3 ? kmsg_dump_rewind_nolock+0x6e/0x6e ? uprobe_perf_close+0x222/0x3b0 print_address_description+0x83/0x3a0 ? uprobe_perf_close+0x222/0x3b0 kasan_report+0x1dd/0x460 ? uprobe_perf_close+0x222/0x3b0 uprobe_perf_close+0x222/0x3b0 ? probes_open+0x180/0x180 ? free_filters_list+0x290/0x290 trace_uprobe_register+0x1bb/0x500 ? perf_event_attach_bpf_prog+0x310/0x310 ? probe_event_disable+0x4e0/0x4e0 perf_uprobe_destroy+0x63/0xd0 _free_event+0x2bc/0xbd0 ? lockdep_rcu_suspicious+0x100/0x100 ? ring_buffer_attach+0x550/0x550 ? kvm_sched_clock_read+0x1a/0x30 ? perf_event_release_kernel+0x3e4/0xc00 ? __mutex_unlock_slowpath+0x12e/0x540 ? wait_for_completion+0x430/0x430 ? lock_downgrade+0x3c0/0x3c0 ? lock_release+0x980/0x980 ? do_raw_spin_trylock+0x118/0x150 ? do_raw_spin_unlock+0x121/0x210 ? do_raw_spin_trylock+0x150/0x150 perf_event_release_kernel+0x5d4/0xc00 ? put_event+0x30/0x30 ? fsnotify+0xd2d/0xea0 ? sched_clock_cpu+0x18/0x1a0 ? __fsnotify_update_child_dentry_flags.part.0+0x1b0/0x1b0 ? pvclock_clocksource_read+0x152/0x2b0 ? pvclock_read_flags+0x80/0x80 ? kvm_sched_clock_read+0x1a/0x30 ? sched_clock_cpu+0x18/0x1a0 ? pvclock_clocksource_read+0x152/0x2b0 ? locks_remove_file+0xec/0x470 ? pvclock_read_flags+0x80/0x80 ? fcntl_setlk+0x880/0x880 ? ima_file_free+0x8d/0x390 ? lockdep_rcu_suspicious+0x100/0x100 ? ima_file_check+0x110/0x110 ? fsnotify+0xea0/0xea0 ? kvm_sched_clock_read+0x1a/0x30 ? rcu_note_context_switch+0x600/0x600 perf_release+0x21/0x40 __fput+0x264/0x620 ? fput+0xf0/0xf0 ? do_raw_spin_unlock+0x121/0x210 ? do_raw_spin_trylock+0x150/0x150 ? SyS_fchdir+0x100/0x100 ? fsnotify+0xea0/0xea0 task_work_run+0x14b/0x1e0 ? task_work_cancel+0x1c0/0x1c0 ? copy_fd_bitmaps+0x150/0x150 ? vfs_read+0xe5/0x260 exit_to_usermode_loop+0x17b/0x1b0 ? trace_event_raw_event_sys_exit+0x1a0/0x1a0 do_syscall_64+0x3f6/0x490 ? syscall_return_slowpath+0x2c0/0x2c0 ? lockdep_sys_exit+0x1f/0xaa ? syscall_return_slowpath+0x1a3/0x2c0 ? lockdep_sys_exit+0x1f/0xaa ? prepare_exit_to_usermode+0x11c/0x1e0 ? enter_from_user_mode+0x30/0x30 random: crng init done ? __put_user_4+0x1c/0x30 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x7f41d95f9340 RSP: 002b:00007fffe71e4268 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 000000000000000d RCX: 00007f41d95f9340 RDX: 0000000000000000 RSI: 0000000000002401 RDI: 000000000000000d RBP: 0000000000000000 R08: 00007f41ca8ff700 R09: 00007f41d996dd1f R10: 00007fffe71e41e0 R11: 0000000000000246 R12: 00007fffe71e4330 R13: 0000000000000000 R14: fffffffffffffffc R15: 00007fffe71e4290 Allocated by task 870: kasan_kmalloc+0xa0/0xd0 kmem_cache_alloc_node+0x11a/0x430 copy_process.part.19+0x11a0/0x41c0 _do_fork+0x1be/0xa20 do_syscall_64+0x198/0x490 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Freed by task 0: __kasan_slab_free+0x12e/0x180 kmem_cache_free+0x102/0x4d0 free_task+0xfe/0x160 __put_task_struct+0x189/0x290 delayed_put_task_struct+0x119/0x250 rcu_process_callbacks+0xa6c/0x1b60 __do_softirq+0x238/0x7ae The buggy address belongs to the object at ffff880384f9b480 which belongs to the cache task_struct of size 12928 It occurs because task_struct is freed before perf_event which refers to the task and task flags are checked while teardown of the event. perf_event_alloc() assigns task_struct to hw.target of perf_event, but there is no reference counting for it. As a fix we get_task_struct() in perf_event_alloc() at above mentioned assignment and put_task_struct() in _free_event(). Signed-off-by: Prashant Bhole Reviewed-by: Oleg Nesterov Acked-by: Peter Zijlstra (Intel) Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 63b6da39bb38e8f1a1ef3180d32a39d6 ("perf: Fix perf_event_exit_task() race") Link: http://lkml.kernel.org/r/20180409100346.6416-1-bhole_prashant_q7@lab.ntt.co.jp Signed-off-by: Ingo Molnar kernel/events/core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2025fef0ca0c8c7fa730a3e0399243721a4925f1 Merge: 5148408 f61e643 Author: Linus Torvalds Date: Mon Apr 9 09:15:46 2018 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu update from Greg Ungerer: "Only a single fix to set the DMA masks in the ColdFire FEC platform data structure. This stops the warning from dma-mapping.h at boot time" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: set dma and coherent masks for platform FEC ethernets commit 5148408a5165e2f69203fcf4481a8153837ef260 Merge: becdce1 cd0e00c Author: Linus Torvalds Date: Mon Apr 9 09:11:32 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha Pull alpha updates from Matt Turner: "A few small changes for alpha" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha: alpha: io: reorder barriers to guarantee writeX() and iowriteX() ordering alpha: Implement CPU vulnerabilities sysfs functions. alpha: rtc: stop validating rtc_time in .read_time alpha: rtc: remove unused set_mmss ops commit 291717b6fbdb175da88ae2144fc58d63a490128d Author: Dan Williams Date: Mon Apr 9 09:10:22 2018 -0700 libnvdimm, of_pmem: workaround OF_NUMA=n build error Stephen reports that an x86 allmodconfig build fails to build the of_pmem driver due to a missing definition of of_node_to_nid(). That helper is currently only exported in the OF_NUMA=y case. In other cases, ppc and sparc, it is a weak symbol, and outside of those platforms it is a static inline. Until an OF_NUMA=n configuration can reliably support usage of of_node_to_nid() in modules across architectures, mark this driver as 'bool' instead of 'tristate'. Cc: Rob Herring Cc: Oliver O'Halloran Reported-by: Stephen Rothwell Signed-off-by: Dan Williams drivers/nvdimm/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit becdce1c66b21ce1c0452e16127182ef692f47ba Merge: f8cf2f1 92fa7a1 Author: Linus Torvalds Date: Mon Apr 9 09:04:10 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Martin Schwidefsky: - Improvements for the spectre defense: * The spectre related code is consolidated to a single file nospec-branch.c * Automatic enable/disable for the spectre v2 defenses (expoline vs. nobp) * Syslog messages for specve v2 are added * Enable CONFIG_GENERIC_CPU_VULNERABILITIES and define the attribute functions for spectre v1 and v2 - Add helper macros for assembler alternatives and use them to shorten the code in entry.S. - Add support for persistent configuration data via the SCLP Store Data interface. The H/W interface requires a page table that uses 4K pages only, the code to setup such an address space is added as well. - Enable virtio GPU emulation in QEMU. To do this the depends statements for a few common Kconfig options are modified. - Add support for format-3 channel path descriptors and add a binary sysfs interface to export the associated utility strings. - Add a sysfs attribute to control the IFCC handling in case of constant channel errors. - The vfio-ccw changes from Cornelia. - Bug fixes and cleanups. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (40 commits) s390/kvm: improve stack frame constants in entry.S s390/lpp: use assembler alternatives for the LPP instruction s390/entry.S: use assembler alternatives s390: add assembler macros for CPU alternatives s390: add sysfs attributes for spectre s390: report spectre mitigation via syslog s390: add automatic detection of the spectre defense s390: move nobp parameter functions to nospec-branch.c s390/cio: add util_string sysfs attribute s390/chsc: query utility strings via fmt3 channel path descriptor s390/cio: rename struct channel_path_desc s390/cio: fix unbind of io_subchannel_driver s390/qdio: split up CCQ handling for EQBS / SQBS s390/qdio: don't retry EQBS after CCQ 96 s390/qdio: restrict buffer merging to eligible devices s390/qdio: don't merge ERROR output buffers s390/qdio: simplify math in get_*_buffer_frontier() s390/decompressor: trim uncompressed image head during the build s390/crypto: Fix kernel crash on aes_s390 module remove. s390/defkeymap: fix global init to zero ... commit 77e30e10ee28a53c8af95809866ee8493583e29a Author: Haim Dreyfuss Date: Wed Apr 4 09:23:48 2018 +0300 iwlwifi: mvm: query regdb for wmm rule if needed Since our device is regulatory self managed it maintains its regulatory rules by its own. However the wmm_rules values can't be set by the device itself but only the indication about the need to set it. In case the device set wmm indication, proactively query the regulatory data base to get these values Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 111 ++++++++++++++++++--- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h | 6 +- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 3 +- 3 files changed, 101 insertions(+), 19 deletions(-) commit dba40d46ebf41e3f7ac9480609529bb6037a918d Author: Mariusz Dabrowski Date: Wed Feb 14 14:23:30 2018 +0100 raid1: copy write hint from master bio to behind bio Signed-off-by: Mariusz Dabrowski Reviewed-by: Artur Paszkiewicz Reviewed-by: Pawel Baldysiak Signed-off-by: Shaohua Li drivers/md/raid1.c | 2 ++ 1 file changed, 2 insertions(+) commit 0b5c0305e57ca940713bcb2b202fd2b412c62f31 Author: Arend Van Spriel Date: Tue Apr 3 10:18:15 2018 +0200 brcmfmac: fix firmware request processing if nvram load fails When nvram loading fails a double free occurred. Fix this and reorg the code a little. Fixes: d09ae51a4b67 ("brcmfmac: pass struct in brcmf_fw_get_firmwares()") Reported-by: Dan Carpenter Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/firmware.c | 36 ++++++++++++---------- 1 file changed, 20 insertions(+), 16 deletions(-) commit 1aa3b3e0cbdb32439f04842e88fc7557a0777660 Author: Jia-Ju Bai Date: Mon Apr 9 22:31:19 2018 +0800 fs: quota: Replace GFP_ATOMIC with GFP_KERNEL in dquot_init dquot_init() is never called in atomic context. This function is only set as a parameter of fs_initcall(). Despite never getting called from atomic context, dquot_init() calls __get_free_pages() with GFP_ATOMIC, which waits busily for allocation. GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL, to avoid busy waiting and improve the possibility of sucessful allocation. This is found by a static analysis tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai Signed-off-by: Jan Kara fs/quota/dquot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c2425932398a160f687534efe71f0ec4b92833e Author: Yufen Yu Date: Mon Apr 9 09:50:44 2018 +0800 md/raid1: exit sync request if MD_RECOVERY_INTR is set We met a sync thread stuck as follows: raid1_sync_request+0x2c9/0xb50 md_do_sync+0x983/0xfa0 md_thread+0x11c/0x160 kthread+0x111/0x130 ret_from_fork+0x35/0x40 0xffffffffffffffff At the same time, there is a stuck mdadm thread (mdadm --manage /dev/md2 --add /dev/sda). It is trying to stop the sync thread: kthread_stop+0x42/0xf0 md_unregister_thread+0x3a/0x70 md_reap_sync_thread+0x15/0x160 action_store+0x142/0x2a0 md_attr_store+0x6c/0xb0 kernfs_fop_write+0x102/0x180 __vfs_write+0x33/0x170 vfs_write+0xad/0x1a0 SyS_write+0x52/0xc0 do_syscall_64+0x6e/0x190 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Debug tools show that the sync thread is waiting in raise_barrier(), until raid1d() end all normal IO bios into bio_end_io_list(introduced in commit 55ce74d4bfe1). But, raid1d() cannot end these bios if MD_CHANGE_PENDING bit is set. It needs to get mddev->reconfig_mutex lock and then clear the bit in md_check_recovery(). However, the lock is holding by mdadm in action_store(). Thus, there is a loop: mdadm waiting for sync thread to stop, sync thread waiting for raid1d() to end bios, raid1d() waiting for mdadm to release mddev->reconfig_mutex lock and then it can end bios. Fix this by checking MD_RECOVERY_INTR while waiting in raise_barrier(), so that sync thread can exit while mdadm is stoping the sync thread. Fixes: 55ce74d4bfe1 ("md/raid1: ensure device failure recorded before write request returns.") Signed-off-by: Jason Yan Signed-off-by: Yufen Yu Signed-off-by: Shaohua Li drivers/md/raid1.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 0ea9924abe125a0c1277484f1a3d512b3f45c320 Author: Guoqing Jiang Date: Mon Apr 9 17:01:21 2018 +0800 md-cluster: don't update recovery_offset for faulty device Device could become faulty when clustered array handling METADATA_UPDATED msg, so we don't need to call read_rdev for this device. Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e1a3a981e320a6916b30ff53571ba144274def0e Author: Takashi Iwai Date: Mon Apr 9 17:12:16 2018 +0200 ALSA: pcm: Remove WARN_ON() at snd_pcm_hw_params() error snd_pcm_hw_params() (more exactly snd_pcm_hw_params_choose()) contains a check of the return error from snd_pcm_hw_param_first() and _last() with snd_BUG_ON() -- i.e. it may trigger WARN_ON() depending on the kconfig. This was a valid check in the past, as these functions shouldn't return any error if the parameters have been already refined via snd_pcm_hw_refine() beforehand. However, the recent rewrite introduced a kmalloc() in snd_pcm_hw_refine() for removing VLA, and this brought a possibility to trigger an error. As a result, syzbot caught lots of superfluous kernel WARN_ON() and paniced via fault injection. As the WARN_ON() is no longer valid with the introduction of kmalloc(), let's drop snd_BUG_ON() check, in order to make the world peaceful place again. Reported-by: syzbot+803e0047ac3a3096bb4f@syzkaller.appspotmail.com Fixes: 5730f9f744cf ("ALSA: pcm: Remove VLA usage") Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f1e53abff84cf40b1adb3455d480dd295bf42e8 Author: Florian Westphal Date: Wed Apr 4 21:13:30 2018 +0200 netfilter: ebtables: don't attempt to allocate 0-sized compat array Dmitry reports 32bit ebtables on 64bit kernel got broken by a recent change that returns -EINVAL when ruleset has no entries. ebtables however only counts user-defined chains, so for the initial table nentries will be 0. Don't try to allocate the compat array in this case, as no user defined rules exist no rule will need 64bit translation. Reported-by: Dmitry Vyukov Fixes: 7d7d7e02111e9 ("netfilter: compat: reject huge allocation requests") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebtables.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 5c64576a77894a50be80be0024bed27171b55989 Author: Julian Anastasov Date: Sat Apr 7 15:50:47 2018 +0300 ipvs: fix rtnl_lock lockups caused by start_sync_thread syzkaller reports for wrong rtnl_lock usage in sync code [1] and [2] We have 2 problems in start_sync_thread if error path is taken, eg. on memory allocation error or failure to configure sockets for mcast group or addr/port binding: 1. recursive locking: holding rtnl_lock while calling sock_release which in turn calls again rtnl_lock in ip_mc_drop_socket to leave the mcast group, as noticed by Florian Westphal. Additionally, sock_release can not be called while holding sync_mutex (ABBA deadlock). 2. task hung: holding rtnl_lock while calling kthread_stop to stop the running kthreads. As the kthreads do the same to leave the mcast group (sock_release -> ip_mc_drop_socket -> rtnl_lock) they hang. Fix the problems by calling rtnl_unlock early in the error path, now sock_release is called after unlocking both mutexes. Problem 3 (task hung reported by syzkaller [2]) is variant of problem 2: use _trylock to prevent one user to call rtnl_lock and then while waiting for sync_mutex to block kthreads that execute sock_release when they are stopped by stop_sync_thread. [1] IPVS: stopping backup sync thread 4500 ... WARNING: possible recursive locking detected 4.16.0-rc7+ #3 Not tainted -------------------------------------------- syzkaller688027/4497 is trying to acquire lock: (rtnl_mutex){+.+.}, at: [<00000000bb14d7fb>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 but task is already holding lock: IPVS: stopping backup sync thread 4495 ... (rtnl_mutex){+.+.}, at: [<00000000bb14d7fb>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(rtnl_mutex); lock(rtnl_mutex); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by syzkaller688027/4497: #0: (rtnl_mutex){+.+.}, at: [<00000000bb14d7fb>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 #1: (ipvs->sync_mutex){+.+.}, at: [<00000000703f78e3>] do_ip_vs_set_ctl+0x10f8/0x1cc0 net/netfilter/ipvs/ip_vs_ctl.c:2388 stack backtrace: CPU: 1 PID: 4497 Comm: syzkaller688027 Not tainted 4.16.0-rc7+ #3 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x24d lib/dump_stack.c:53 print_deadlock_bug kernel/locking/lockdep.c:1761 [inline] check_deadlock kernel/locking/lockdep.c:1805 [inline] validate_chain kernel/locking/lockdep.c:2401 [inline] __lock_acquire+0xe8f/0x3e00 kernel/locking/lockdep.c:3431 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1a80 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 ip_mc_drop_socket+0x88/0x230 net/ipv4/igmp.c:2643 inet_release+0x4e/0x1c0 net/ipv4/af_inet.c:413 sock_release+0x8d/0x1e0 net/socket.c:595 start_sync_thread+0x2213/0x2b70 net/netfilter/ipvs/ip_vs_sync.c:1924 do_ip_vs_set_ctl+0x1139/0x1cc0 net/netfilter/ipvs/ip_vs_ctl.c:2389 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ip_setsockopt+0x97/0xa0 net/ipv4/ip_sockglue.c:1261 udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2406 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2975 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x446a69 RSP: 002b:00007fa1c3a64da8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000446a69 RDX: 000000000000048b RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00000000006e29fc R08: 0000000000000018 R09: 0000000000000000 R10: 00000000200000c0 R11: 0000000000000246 R12: 00000000006e29f8 R13: 00676e697279656b R14: 00007fa1c3a659c0 R15: 00000000006e2b60 [2] IPVS: sync thread started: state = BACKUP, mcast_ifn = syz_tun, syncid = 4, id = 0 IPVS: stopping backup sync thread 25415 ... INFO: task syz-executor7:25421 blocked for more than 120 seconds. Not tainted 4.16.0-rc6+ #284 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor7 D23688 25421 4408 0x00000004 Call Trace: context_switch kernel/sched/core.c:2862 [inline] __schedule+0x8fb/0x1ec0 kernel/sched/core.c:3440 schedule+0xf5/0x430 kernel/sched/core.c:3499 schedule_timeout+0x1a3/0x230 kernel/time/timer.c:1777 do_wait_for_common kernel/sched/completion.c:86 [inline] __wait_for_common kernel/sched/completion.c:107 [inline] wait_for_common kernel/sched/completion.c:118 [inline] wait_for_completion+0x415/0x770 kernel/sched/completion.c:139 kthread_stop+0x14a/0x7a0 kernel/kthread.c:530 stop_sync_thread+0x3d9/0x740 net/netfilter/ipvs/ip_vs_sync.c:1996 do_ip_vs_set_ctl+0x2b1/0x1cc0 net/netfilter/ipvs/ip_vs_ctl.c:2394 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ip_setsockopt+0x97/0xa0 net/ipv4/ip_sockglue.c:1253 sctp_setsockopt+0x2ca/0x63e0 net/sctp/socket.c:4154 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:3039 SYSC_setsockopt net/socket.c:1850 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1829 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x454889 RSP: 002b:00007fc927626c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007fc9276276d4 RCX: 0000000000454889 RDX: 000000000000048c RSI: 0000000000000000 RDI: 0000000000000017 RBP: 000000000072bf58 R08: 0000000000000018 R09: 0000000000000000 R10: 0000000020000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000051c R14: 00000000006f9b40 R15: 0000000000000001 Showing all locks held in the system: 2 locks held by khungtaskd/868: #0: (rcu_read_lock){....}, at: [<00000000a1a8f002>] check_hung_uninterruptible_tasks kernel/hung_task.c:175 [inline] #0: (rcu_read_lock){....}, at: [<00000000a1a8f002>] watchdog+0x1c5/0xd60 kernel/hung_task.c:249 #1: (tasklist_lock){.+.+}, at: [<0000000037c2f8f9>] debug_show_all_locks+0xd3/0x3d0 kernel/locking/lockdep.c:4470 1 lock held by rsyslogd/4247: #0: (&f->f_pos_lock){+.+.}, at: [<000000000d8d6983>] __fdget_pos+0x12b/0x190 fs/file.c:765 2 locks held by getty/4338: #0: (&tty->ldisc_sem){++++}, at: [<00000000bee98654>] ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: (&ldata->atomic_read_lock){+.+.}, at: [<00000000c1d180aa>] n_tty_read+0x2ef/0x1a40 drivers/tty/n_tty.c:2131 2 locks held by getty/4339: #0: (&tty->ldisc_sem){++++}, at: [<00000000bee98654>] ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: (&ldata->atomic_read_lock){+.+.}, at: [<00000000c1d180aa>] n_tty_read+0x2ef/0x1a40 drivers/tty/n_tty.c:2131 2 locks held by getty/4340: #0: (&tty->ldisc_sem){++++}, at: [<00000000bee98654>] ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: (&ldata->atomic_read_lock){+.+.}, at: [<00000000c1d180aa>] n_tty_read+0x2ef/0x1a40 drivers/tty/n_tty.c:2131 2 locks held by getty/4341: #0: (&tty->ldisc_sem){++++}, at: [<00000000bee98654>] ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: (&ldata->atomic_read_lock){+.+.}, at: [<00000000c1d180aa>] n_tty_read+0x2ef/0x1a40 drivers/tty/n_tty.c:2131 2 locks held by getty/4342: #0: (&tty->ldisc_sem){++++}, at: [<00000000bee98654>] ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: (&ldata->atomic_read_lock){+.+.}, at: [<00000000c1d180aa>] n_tty_read+0x2ef/0x1a40 drivers/tty/n_tty.c:2131 2 locks held by getty/4343: #0: (&tty->ldisc_sem){++++}, at: [<00000000bee98654>] ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: (&ldata->atomic_read_lock){+.+.}, at: [<00000000c1d180aa>] n_tty_read+0x2ef/0x1a40 drivers/tty/n_tty.c:2131 2 locks held by getty/4344: #0: (&tty->ldisc_sem){++++}, at: [<00000000bee98654>] ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: (&ldata->atomic_read_lock){+.+.}, at: [<00000000c1d180aa>] n_tty_read+0x2ef/0x1a40 drivers/tty/n_tty.c:2131 3 locks held by kworker/0:5/6494: #0: ((wq_completion)"%s"("ipv6_addrconf")){+.+.}, at: [<00000000a062b18e>] work_static include/linux/workqueue.h:198 [inline] #0: ((wq_completion)"%s"("ipv6_addrconf")){+.+.}, at: [<00000000a062b18e>] set_work_data kernel/workqueue.c:619 [inline] #0: ((wq_completion)"%s"("ipv6_addrconf")){+.+.}, at: [<00000000a062b18e>] set_work_pool_and_clear_pending kernel/workqueue.c:646 [inline] #0: ((wq_completion)"%s"("ipv6_addrconf")){+.+.}, at: [<00000000a062b18e>] process_one_work+0xb12/0x1bb0 kernel/workqueue.c:2084 #1: ((addr_chk_work).work){+.+.}, at: [<00000000278427d5>] process_one_work+0xb89/0x1bb0 kernel/workqueue.c:2088 #2: (rtnl_mutex){+.+.}, at: [<00000000066e35ac>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 1 lock held by syz-executor7/25421: #0: (ipvs->sync_mutex){+.+.}, at: [<00000000d414a689>] do_ip_vs_set_ctl+0x277/0x1cc0 net/netfilter/ipvs/ip_vs_ctl.c:2393 2 locks held by syz-executor7/25427: #0: (rtnl_mutex){+.+.}, at: [<00000000066e35ac>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 #1: (ipvs->sync_mutex){+.+.}, at: [<00000000e6d48489>] do_ip_vs_set_ctl+0x10f8/0x1cc0 net/netfilter/ipvs/ip_vs_ctl.c:2388 1 lock held by syz-executor7/25435: #0: (rtnl_mutex){+.+.}, at: [<00000000066e35ac>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 1 lock held by ipvs-b:2:0/25415: #0: (rtnl_mutex){+.+.}, at: [<00000000066e35ac>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 Reported-and-tested-by: syzbot+a46d6abf9d56b1365a72@syzkaller.appspotmail.com Reported-and-tested-by: syzbot+5fe074c01b2032ce9618@syzkaller.appspotmail.com Fixes: e0b26cc997d5 ("ipvs: call rtnl_lock early") Signed-off-by: Julian Anastasov Signed-off-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_ctl.c | 8 --- net/netfilter/ipvs/ip_vs_sync.c | 155 +++++++++++++++++++++------------------- 2 files changed, 80 insertions(+), 83 deletions(-) commit 876c27314ce51fe7e7e2aeb24a6448da1a26c78f Author: Florian Westphal Date: Tue Apr 3 12:10:09 2018 +0200 netfilter: nf_conntrack_sip: allow duplicate SDP expectations Callum Sinclair reported SIP IP Phone errors that he tracked down to such phones sending session descriptions for different media types but with same port numbers. The expect core will only 'refresh' existing expectation if it is from same master AND same expectation class (media type). As expectation class is different, we get an error. The SIP connection tracking code will then 1). drop the SDP packet 2). if an rtp expectation was already installed successfully, error on rtcp expectation will cancel the rtp one. Make the expect core report back to caller when the conflict is due to different expectation class and have SIP tracker ignore soft-error. Reported-by: Callum Sinclair Tested-by: Callum Sinclair Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_expect.c | 5 ++++- net/netfilter/nf_conntrack_sip.c | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) commit a2ac99905f1ea8b15997a6ec39af69aa28a3653b Author: haibinzhang(张海斌) Date: Mon Apr 9 07:22:17 2018 +0000 vhost-net: set packet weight of tx polling to 2 * vq size handle_tx will delay rx for tens or even hundreds of milliseconds when tx busy polling udp packets with small length(e.g. 1byte udp payload), because setting VHOST_NET_WEIGHT takes into account only sent-bytes but no single packet length. Ping-Latencies shown below were tested between two Virtual Machines using netperf (UDP_STREAM, len=1), and then another machine pinged the client: vq size=256 Packet-Weight Ping-Latencies(millisecond) min avg max Origin 3.319 18.489 57.303 64 1.643 2.021 2.552 128 1.825 2.600 3.224 256 1.997 2.710 4.295 512 1.860 3.171 4.631 1024 2.002 4.173 9.056 2048 2.257 5.650 9.688 4096 2.093 8.508 15.943 vq size=512 Packet-Weight Ping-Latencies(millisecond) min avg max Origin 6.537 29.177 66.245 64 2.798 3.614 4.403 128 2.861 3.820 4.775 256 3.008 4.018 4.807 512 3.254 4.523 5.824 1024 3.079 5.335 7.747 2048 3.944 8.201 12.762 4096 4.158 11.057 19.985 Seems pretty consistent, a small dip at 2 VQ sizes. Ring size is a hint from device about a burst size it can tolerate. Based on benchmarks, set the weight to 2 * vq size. To evaluate this change, another tests were done using netperf(RR, TX) between two machines with Intel(R) Xeon(R) Gold 6133 CPU @ 2.50GHz, and vq size was tweaked through qemu. Results shown below does not show obvious changes. vq size=256 TCP_RR vq size=512 TCP_RR size/sessions/+thu%/+normalize% size/sessions/+thu%/+normalize% 1/ 1/ -7%/ -2% 1/ 1/ 0%/ -2% 1/ 4/ +1%/ 0% 1/ 4/ +1%/ 0% 1/ 8/ +1%/ -2% 1/ 8/ 0%/ +1% 64/ 1/ -6%/ 0% 64/ 1/ +7%/ +3% 64/ 4/ 0%/ +2% 64/ 4/ -1%/ +1% 64/ 8/ 0%/ 0% 64/ 8/ -1%/ -2% 256/ 1/ -3%/ -4% 256/ 1/ -4%/ -2% 256/ 4/ +3%/ +4% 256/ 4/ +1%/ +2% 256/ 8/ +2%/ 0% 256/ 8/ +1%/ -1% vq size=256 UDP_RR vq size=512 UDP_RR size/sessions/+thu%/+normalize% size/sessions/+thu%/+normalize% 1/ 1/ -5%/ +1% 1/ 1/ -3%/ -2% 1/ 4/ +4%/ +1% 1/ 4/ -2%/ +2% 1/ 8/ -1%/ -1% 1/ 8/ -1%/ 0% 64/ 1/ -2%/ -3% 64/ 1/ +1%/ +1% 64/ 4/ -5%/ -1% 64/ 4/ +2%/ 0% 64/ 8/ 0%/ -1% 64/ 8/ -2%/ +1% 256/ 1/ +7%/ +1% 256/ 1/ -7%/ 0% 256/ 4/ +1%/ +1% 256/ 4/ -3%/ -4% 256/ 8/ +2%/ +2% 256/ 8/ +1%/ +1% vq size=256 TCP_STREAM vq size=512 TCP_STREAM size/sessions/+thu%/+normalize% size/sessions/+thu%/+normalize% 64/ 1/ 0%/ -3% 64/ 1/ 0%/ 0% 64/ 4/ +3%/ -1% 64/ 4/ -2%/ +4% 64/ 8/ +9%/ -4% 64/ 8/ -1%/ +2% 256/ 1/ +1%/ -4% 256/ 1/ +1%/ +1% 256/ 4/ -1%/ -1% 256/ 4/ -3%/ 0% 256/ 8/ +7%/ +5% 256/ 8/ -3%/ 0% 512/ 1/ +1%/ 0% 512/ 1/ -1%/ -1% 512/ 4/ +1%/ -1% 512/ 4/ 0%/ 0% 512/ 8/ +7%/ -5% 512/ 8/ +6%/ -1% 1024/ 1/ 0%/ -1% 1024/ 1/ 0%/ +1% 1024/ 4/ +3%/ 0% 1024/ 4/ +1%/ 0% 1024/ 8/ +8%/ +5% 1024/ 8/ -1%/ 0% 2048/ 1/ +2%/ +2% 2048/ 1/ -1%/ 0% 2048/ 4/ +1%/ 0% 2048/ 4/ 0%/ -1% 2048/ 8/ -2%/ 0% 2048/ 8/ 5%/ -1% 4096/ 1/ -2%/ 0% 4096/ 1/ -2%/ 0% 4096/ 4/ +2%/ 0% 4096/ 4/ 0%/ 0% 4096/ 8/ +9%/ -2% 4096/ 8/ -5%/ -1% Acked-by: Michael S. Tsirkin Signed-off-by: Haibin Zhang Signed-off-by: Yunfang Tai Signed-off-by: Lidong Chen Signed-off-by: David S. Miller drivers/vhost/net.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 9b5c4dfb2a6390bfb0166770d0d776ce0d3cdebd Author: Vadim Lomovtsev Date: Mon Apr 9 06:24:48 2018 -0700 net: thunderx: rework mac addresses list to u64 array It is too expensive to pass u64 values via linked list, instead allocate array for them by overall number of mac addresses from netdev. This eventually removes multiple kmalloc() calls, aviod memory fragmentation and allow to put single null check on kmalloc return value in order to prevent a potential null pointer dereference. Addresses-Coverity-ID: 1467429 ("Dereference null return value") Fixes: 37c3347eb247 ("net: thunderx: add ndo_set_rx_mode callback implementation for VF") Reported-by: Dan Carpenter Signed-off-by: Vadim Lomovtsev Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 7 +----- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 28 +++++++++--------------- 2 files changed, 11 insertions(+), 24 deletions(-) commit b6a37e5e25414df4b8e9140a5c6f5ee0ec6f3b90 Author: Eric Dumazet Date: Mon Apr 9 06:43:27 2018 -0700 inetpeer: fix uninit-value in inet_getpeer syzbot/KMSAN reported that p->dtime was read while it was not yet initialized in : delta = (__u32)jiffies - p->dtime; if (delta < ttl || !refcount_dec_if_one(&p->refcnt)) gc_stack[i] = NULL; This is a false positive, because the inetpeer wont be erased from rb-tree if the refcount_dec_if_one(&p->refcnt) does not succeed. And this wont happen before first inet_putpeer() call for this inetpeer has been done, and ->dtime field is written exactly before the refcount_dec_and_test(&p->refcnt). The KMSAN report was : BUG: KMSAN: uninit-value in inet_peer_gc net/ipv4/inetpeer.c:163 [inline] BUG: KMSAN: uninit-value in inet_getpeer+0x1567/0x1e70 net/ipv4/inetpeer.c:228 CPU: 0 PID: 9494 Comm: syz-executor5 Not tainted 4.16.0+ #82 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676 inet_peer_gc net/ipv4/inetpeer.c:163 [inline] inet_getpeer+0x1567/0x1e70 net/ipv4/inetpeer.c:228 inet_getpeer_v4 include/net/inetpeer.h:110 [inline] icmpv4_xrlim_allow net/ipv4/icmp.c:330 [inline] icmp_send+0x2b44/0x3050 net/ipv4/icmp.c:725 ip_options_compile+0x237c/0x29f0 net/ipv4/ip_options.c:472 ip_rcv_options net/ipv4/ip_input.c:284 [inline] ip_rcv_finish+0xda8/0x16d0 net/ipv4/ip_input.c:365 NF_HOOK include/linux/netfilter.h:288 [inline] ip_rcv+0x119d/0x16f0 net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x47cf/0x4a80 net/core/dev.c:4562 __netif_receive_skb net/core/dev.c:4627 [inline] netif_receive_skb_internal+0x49d/0x630 net/core/dev.c:4701 netif_receive_skb+0x230/0x240 net/core/dev.c:4725 tun_rx_batched drivers/net/tun.c:1555 [inline] tun_get_user+0x6d88/0x7580 drivers/net/tun.c:1962 tun_chr_write_iter+0x1d4/0x330 drivers/net/tun.c:1990 do_iter_readv_writev+0x7bb/0x970 include/linux/fs.h:1776 do_iter_write+0x30d/0xd40 fs/read_write.c:932 vfs_writev fs/read_write.c:977 [inline] do_writev+0x3c9/0x830 fs/read_write.c:1012 SYSC_writev+0x9b/0xb0 fs/read_write.c:1085 SyS_writev+0x56/0x80 fs/read_write.c:1082 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x455111 RSP: 002b:00007fae0365cba0 EFLAGS: 00000293 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 000000000000002e RCX: 0000000000455111 RDX: 0000000000000001 RSI: 00007fae0365cbf0 RDI: 00000000000000fc RBP: 0000000020000040 R08: 00000000000000fc R09: 0000000000000000 R10: 000000000000002e R11: 0000000000000293 R12: 00000000ffffffff R13: 0000000000000658 R14: 00000000006fc8e0 R15: 0000000000000000 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:188 kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:314 kmem_cache_alloc+0xaab/0xb90 mm/slub.c:2756 inet_getpeer+0xed8/0x1e70 net/ipv4/inetpeer.c:210 inet_getpeer_v4 include/net/inetpeer.h:110 [inline] ip4_frag_init+0x4d1/0x740 net/ipv4/ip_fragment.c:153 inet_frag_alloc net/ipv4/inet_fragment.c:369 [inline] inet_frag_create net/ipv4/inet_fragment.c:385 [inline] inet_frag_find+0x7da/0x1610 net/ipv4/inet_fragment.c:418 ip_find net/ipv4/ip_fragment.c:275 [inline] ip_defrag+0x448/0x67a0 net/ipv4/ip_fragment.c:676 ip_check_defrag+0x775/0xda0 net/ipv4/ip_fragment.c:724 packet_rcv_fanout+0x2a8/0x8d0 net/packet/af_packet.c:1447 deliver_skb net/core/dev.c:1897 [inline] deliver_ptype_list_skb net/core/dev.c:1912 [inline] __netif_receive_skb_core+0x314a/0x4a80 net/core/dev.c:4545 __netif_receive_skb net/core/dev.c:4627 [inline] netif_receive_skb_internal+0x49d/0x630 net/core/dev.c:4701 netif_receive_skb+0x230/0x240 net/core/dev.c:4725 tun_rx_batched drivers/net/tun.c:1555 [inline] tun_get_user+0x6d88/0x7580 drivers/net/tun.c:1962 tun_chr_write_iter+0x1d4/0x330 drivers/net/tun.c:1990 do_iter_readv_writev+0x7bb/0x970 include/linux/fs.h:1776 do_iter_write+0x30d/0xd40 fs/read_write.c:932 vfs_writev fs/read_write.c:977 [inline] do_writev+0x3c9/0x830 fs/read_write.c:1012 SYSC_writev+0x9b/0xb0 fs/read_write.c:1085 SyS_writev+0x56/0x80 fs/read_write.c:1082 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller net/ipv4/inetpeer.c | 1 + 1 file changed, 1 insertion(+) commit c76fc98260751e71c884dc1a18a07e427ef033b5 Author: Dominik Brodowski Date: Mon Apr 9 12:51:45 2018 +0200 syscalls/x86: Adapt syscall_wrapper.h to the new syscall stub naming convention Make the code in syscall_wrapper.h more readable by naming the stub macros similar to the stub they provide. While at it, fix a stray newline at the end of the __IA32_COMPAT_SYS_STUBx macro. Signed-off-by: Dominik Brodowski Cc: Al Viro Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180409105145.5364-5-linux@dominikbrodowski.net Signed-off-by: Ingo Molnar arch/x86/include/asm/syscall_wrapper.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit d5a00528b58cdb2c71206e18bd021e34c4eab878 Author: Dominik Brodowski Date: Mon Apr 9 12:51:44 2018 +0200 syscalls/core, syscalls/x86: Rename struct pt_regs-based sys_*() to __x64_sys_*() This rename allows us to have a coherent syscall stub naming convention on 64-bit x86 (0xffffffff prefix removed): 810f0af0 t kernel_waitid # common (32/64) kernel helper __do_sys_waitid # inlined helper doing actual work 810f0be0 t __se_sys_waitid # C func calling inlined helper __do_compat_sys_waitid # inlined helper doing actual work 810f0d80 t __se_compat_sys_waitid # compat C func calling inlined helper 810f2080 T __x64_sys_waitid # x64 64-bit-ptregs -> C stub 810f20b0 T __ia32_sys_waitid # ia32 32-bit-ptregs -> C stub[*] 810f2470 T __ia32_compat_sys_waitid # ia32 32-bit-ptregs -> compat C stub 810f2490 T __x32_compat_sys_waitid # x32 64-bit-ptregs -> compat C stub [*] This stub is unused, as the syscall table links __ia32_compat_sys_waitid instead of __ia32_sys_waitid as we need a compat variant here. Suggested-by: Ingo Molnar Signed-off-by: Dominik Brodowski Cc: Al Viro Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180409105145.5364-4-linux@dominikbrodowski.net Signed-off-by: Ingo Molnar arch/x86/entry/syscalls/syscall_32.tbl | 46 +-- arch/x86/entry/syscalls/syscall_64.tbl | 638 +++++++++++++++++---------------- arch/x86/entry/syscalls/syscalltbl.sh | 14 +- arch/x86/entry/vsyscall/vsyscall_64.c | 6 +- arch/x86/include/asm/syscall_wrapper.h | 63 +++- 5 files changed, 405 insertions(+), 362 deletions(-) commit 5ac9efa3c50d7caff9f3933bb8a3ad1139d92d92 Author: Dominik Brodowski Date: Mon Apr 9 12:51:43 2018 +0200 syscalls/core, syscalls/x86: Clean up compat syscall stub naming convention Tidy the naming convention for compat syscall subs. Hints which describe the purpose of the stub go in front and receive a double underscore to denote that they are generated on-the-fly by the COMPAT_SYSCALL_DEFINEx() macro. For the generic case, this means: t kernel_waitid # common C function (see kernel/exit.c) __do_compat_sys_waitid # inlined helper doing the actual work # (takes original parameters as declared) T __se_compat_sys_waitid # sign-extending C function calling inlined # helper (takes parameters of type long, # casts them to unsigned long and then to # the declared type) T compat_sys_waitid # alias to __se_compat_sys_waitid() # (taking parameters as declared), to # be included in syscall table For x86, the naming is as follows: t kernel_waitid # common C function (see kernel/exit.c) __do_compat_sys_waitid # inlined helper doing the actual work # (takes original parameters as declared) t __se_compat_sys_waitid # sign-extending C function calling inlined # helper (takes parameters of type long, # casts them to unsigned long and then to # the declared type) T __ia32_compat_sys_waitid # IA32_EMULATION 32-bit-ptregs -> C stub, # calls __se_compat_sys_waitid(); to be # included in syscall table T __x32_compat_sys_waitid # x32 64-bit-ptregs -> C stub, calls # __se_compat_sys_waitid(); to be included # in syscall table If only one of IA32_EMULATION and x32 is enabled, __se_compat_sys_waitid() may be inlined into the stub __{ia32,x32}_compat_sys_waitid(). Suggested-by: Ingo Molnar Signed-off-by: Dominik Brodowski Cc: Al Viro Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180409105145.5364-3-linux@dominikbrodowski.net Signed-off-by: Ingo Molnar Documentation/process/adding-syscalls.rst | 4 +- arch/x86/entry/syscalls/syscall_32.tbl | 252 +++++++++++++++--------------- arch/x86/entry/syscalls/syscall_64.tbl | 72 ++++----- arch/x86/include/asm/syscall_wrapper.h | 44 +++--- arch/x86/include/asm/syscalls.h | 2 +- include/linux/compat.h | 29 ++-- scripts/bloat-o-meter | 2 +- 7 files changed, 205 insertions(+), 200 deletions(-) commit e145242ea0df6b7d28fd7186e61d6840fa4bb06e Author: Dominik Brodowski Date: Mon Apr 9 12:51:42 2018 +0200 syscalls/core, syscalls/x86: Clean up syscall stub naming convention Tidy the naming convention for compat syscall subs. Hints which describe the purpose of the stub go in front and receive a double underscore to denote that they are generated on-the-fly by the SYSCALL_DEFINEx() macro. For the generic case, this means (0xffffffff prefix removed): 810f08d0 t kernel_waitid # common C function (see kernel/exit.c) __do_sys_waitid # inlined helper doing the actual work # (takes original parameters as declared) 810f1aa0 T __se_sys_waitid # sign-extending C function calling inlined # helper (takes parameters of type long; # casts them to the declared type) 810f1aa0 T sys_waitid # alias to __se_sys_waitid() (taking # parameters as declared), to be included # in syscall table For x86, the naming is as follows: 810efc70 t kernel_waitid # common C function (see kernel/exit.c) __do_sys_waitid # inlined helper doing the actual work # (takes original parameters as declared) 810efd60 t __se_sys_waitid # sign-extending C function calling inlined # helper (takes parameters of type long; # casts them to the declared type) 810f1140 T __ia32_sys_waitid # IA32_EMULATION 32-bit-ptregs -> C stub, # calls __se_sys_waitid(); to be included # in syscall table 810f1110 T sys_waitid # x86 64-bit-ptregs -> C stub, calls # __se_sys_waitid(); to be included in # syscall table For x86, sys_waitid() will be re-named to __x64_sys_waitid in a follow-up patch. Suggested-by: Ingo Molnar Signed-off-by: Dominik Brodowski Cc: Al Viro Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180409105145.5364-2-linux@dominikbrodowski.net Signed-off-by: Ingo Molnar arch/x86/entry/syscalls/syscall_32.tbl | 424 ++++++++++++++++----------------- arch/x86/include/asm/syscall_wrapper.h | 35 +-- include/linux/syscalls.h | 17 +- scripts/bloat-o-meter | 2 +- 4 files changed, 242 insertions(+), 236 deletions(-) commit 54a307ba8d3cd00a3902337ffaae28f436eeb1a4 Author: Amir Goldstein Date: Wed Apr 4 23:42:18 2018 +0300 fanotify: fix logic of events on child When event on child inodes are sent to the parent inode mark and parent inode mark was not marked with FAN_EVENT_ON_CHILD, the event will not be delivered to the listener process. However, if the same process also has a mount mark, the event to the parent inode will be delivered regadless of the mount mark mask. This behavior is incorrect in the case where the mount mark mask does not contain the specific event type. For example, the process adds a mark on a directory with mask FAN_MODIFY (without FAN_EVENT_ON_CHILD) and a mount mark with mask FAN_CLOSE_NOWRITE (without FAN_ONDIR). A modify event on a file inside that directory (and inside that mount) should not create a FAN_MODIFY event, because neither of the marks requested to get that event on the file. Fixes: 1968f5eed54c ("fanotify: use both marks when possible") Cc: stable Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fanotify/fanotify.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) commit fcbd8fa44664e99a5d8c7ab97f1afdd82472f973 Author: Sandipan Das Date: Wed Apr 4 23:34:19 2018 +0530 perf tests clang: Fix function name for clang IR test As stated in tests/llvm-src-base.c, the name of the bpf function should be "bpf_func__SyS_epoll_pwait" but this clang test fails as it tries to lookup "bpf_func__SyS_epoll_wait". Before applying patch: 55: builtin clang support : 55.1: builtin clang compile C source to IR : FAILED! 55.2: builtin clang compile C source to ELF object : Skip After applying patch: 55: builtin clang support : 55.1: builtin clang compile C source to IR : Ok 55.2: builtin clang compile C source to ELF object : Ok Signed-off-by: Sandipan Das Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Naveen N. Rao Fixes: e67d52d411c3 ("perf clang: Update test case to use real BPF script") Link: http://lkml.kernel.org/r/20180404180419.19056-3-sandipan@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/c++/clang-test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7854e499f33fd9c7e63288692ffb754d9b1d02fd Author: Sandipan Das Date: Wed Apr 4 23:34:18 2018 +0530 perf clang: Add support for recent clang versions The clang API calls used by perf have changed in recent releases and builds succeed with libclang-3.9 only. This introduces compatibility with libclang-4.0 and above. Without this patch, we will see the following compilation errors with libclang-4.0+: util/c++/clang.cpp: In function ‘clang::CompilerInvocation* perf::createCompilerInvocation(llvm::opt::ArgStringList, llvm::StringRef&, clang::DiagnosticsEngine&)’: util/c++/clang.cpp:62:33: error: ‘IK_C’ was not declared in this scope Opts.Inputs.emplace_back(Path, IK_C); ^~~~ util/c++/clang.cpp: In function ‘std::unique_ptr perf::getModuleFromSource(llvm::opt::ArgStringList, llvm::StringRef, llvm::IntrusiveRefCntPtr)’: util/c++/clang.cpp:75:26: error: no matching function for call to ‘clang::CompilerInstance::setInvocation(clang::CompilerInvocation*)’ Clang.setInvocation(&*CI); ^ In file included from util/c++/clang.cpp:14:0: /usr/include/clang/Frontend/CompilerInstance.h:231:8: note: candidate: void clang::CompilerInstance::setInvocation(std::shared_ptr) void setInvocation(std::shared_ptr Value); ^~~~~~~~~~~~~ Committer testing: Tested on Fedora 27 after installing the clang-devel and llvm-devel packages, versions: # rpm -qa | egrep llvm\|clang llvm-5.0.1-6.fc27.x86_64 clang-libs-5.0.1-5.fc27.x86_64 clang-5.0.1-5.fc27.x86_64 clang-tools-extra-5.0.1-5.fc27.x86_64 llvm-libs-5.0.1-6.fc27.x86_64 llvm-devel-5.0.1-6.fc27.x86_64 clang-devel-5.0.1-5.fc27.x86_64 # Make sure you don't have some older version lying around in /usr/local, etc, then: $ make LIBCLANGLLVM=1 -C tools/perf install-bin And in the end perf will be linked agains these libraries: # ldd ~/bin/perf | egrep -i llvm\|clang libclangAST.so.5 => /lib64/libclangAST.so.5 (0x00007f8bb2eb4000) libclangBasic.so.5 => /lib64/libclangBasic.so.5 (0x00007f8bb29e3000) libclangCodeGen.so.5 => /lib64/libclangCodeGen.so.5 (0x00007f8bb23f7000) libclangDriver.so.5 => /lib64/libclangDriver.so.5 (0x00007f8bb2060000) libclangFrontend.so.5 => /lib64/libclangFrontend.so.5 (0x00007f8bb1d06000) libclangLex.so.5 => /lib64/libclangLex.so.5 (0x00007f8bb1a3e000) libclangTooling.so.5 => /lib64/libclangTooling.so.5 (0x00007f8bb17d4000) libclangEdit.so.5 => /lib64/libclangEdit.so.5 (0x00007f8bb15c5000) libclangSema.so.5 => /lib64/libclangSema.so.5 (0x00007f8bb0cc9000) libclangAnalysis.so.5 => /lib64/libclangAnalysis.so.5 (0x00007f8bb0a23000) libclangParse.so.5 => /lib64/libclangParse.so.5 (0x00007f8bb0725000) libclangSerialization.so.5 => /lib64/libclangSerialization.so.5 (0x00007f8bb039a000) libLLVM-5.0.so => /lib64/libLLVM-5.0.so (0x00007f8bace98000) libclangASTMatchers.so.5 => /lib64/../lib64/libclangASTMatchers.so.5 (0x00007f8bab735000) libclangFormat.so.5 => /lib64/../lib64/libclangFormat.so.5 (0x00007f8bab4b2000) libclangRewrite.so.5 => /lib64/../lib64/libclangRewrite.so.5 (0x00007f8bab2a1000) libclangToolingCore.so.5 => /lib64/../lib64/libclangToolingCore.so.5 (0x00007f8bab08e000) # Signed-off-by: Sandipan Das Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Naveen N. Rao Fixes: 00b86691c77c ("perf clang: Add builtin clang support ant test case") Link: http://lkml.kernel.org/r/20180404180419.19056-2-sandipan@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/c++/clang.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit c2fb54a183cfe77c6fdc9d71e2d5299c1c302a6e Author: Sandipan Das Date: Wed Apr 4 23:34:17 2018 +0530 perf tools: Fix perf builds with clang support For libclang, some distro packages provide static libraries (.a) while some provide shared libraries (.so). Currently, perf code can only be linked with static libraries. This makes perf build possible for both cases. Signed-off-by: Sandipan Das Cc: Jiri Olsa Cc: Naveen N. Rao Fixes: d58ac0bf8d1e ("perf build: Add clang and llvm compile and linking support") Link: http://lkml.kernel.org/r/20180404180419.19056-1-sandipan@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ad0902e0c4004dc95bf15229933012121ff54033 Author: Arnaldo Carvalho de Melo Date: Fri Apr 6 14:53:56 2018 -0300 perf tools: No need to include namespaces.h in util.h The only thing that is needed there is a forward declaration for 'struct nsinfo', so disentanble this, which in turns allows built-in clang builds, i.e. 'make LIBCLANGLLVM=1 -C tools/perf'. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Sandipan Das Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-vq26rsuwq1cqylpcyvq89c84@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fe43e2ce526979271f6c682727c6af9e7c19bec5 Author: Gustavo A. R. Silva Date: Fri Mar 30 16:18:44 2018 -0500 PM / QoS: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki kernel/power/qos.c | 2 ++ 1 file changed, 2 insertions(+) commit 792ccb457ade4107ad9f1892cb23b78c13a10fb1 Author: Prakash, Prashanth Date: Wed Apr 4 12:10:44 2018 -0600 cpuidle: Add definition of residency to sysfs documentation Add definition of minimum residency to sysfs documentation and update the tree to include the residency sysfs entry. Signed-off-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki Documentation/cpuidle/sysfs.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 7d2f6abb402ae38ec4bb7beabb3980bb834b1e0d Author: Rafael J. Wysocki Date: Sat Apr 7 19:11:55 2018 +0200 time: hrtimer: Use timerqueue_iterate_next() to get to the next timer Use timerqueue_iterate_next() to get to the next timer in __hrtimer_next_event_base() without browsing the timerqueue details diredctly. No intentional changes in functionality. Suggested-by: Frederic Weisbecker Signed-off-by: Rafael J. Wysocki kernel/time/hrtimer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ff7de6203131e3d60cda60aeda12c69373ca5d43 Author: Rafael J. Wysocki Date: Fri Apr 6 14:59:13 2018 +0200 nohz: Avoid duplication of code related to got_idle_tick Move the code setting ts->got_idle_tick into tick_sched_do_timer() to avoid code duplication. No intentional changes in functionality. Suggested-by: Frederic Weisbecker Signed-off-by: Rafael J. Wysocki Reviewed-by: Frederic Weisbecker kernel/time/tick-sched.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 2bc629a692a76b9ee3dab9c303e3f501bece66a4 Author: Frederic Weisbecker Date: Fri Apr 6 04:32:37 2018 +0200 nohz: Gather tick_sched booleans under a common flag field Optimize the space and leave plenty of room for further flags. Signed-off-by: Frederic Weisbecker [ rjw: Do not use __this_cpu_read() to access tick_stopped and add got_idle_tick to avoid overloading inidle ] Signed-off-by: Rafael J. Wysocki kernel/time/tick-sched.c | 12 +++++++----- kernel/time/tick-sched.h | 12 ++++++++---- 2 files changed, 15 insertions(+), 9 deletions(-) commit 87c9fe6ee495f78f36d39cb37f6a714444a093ee Author: Rafael J. Wysocki Date: Thu Apr 5 19:12:43 2018 +0200 cpuidle: menu: Avoid selecting shallow states with stopped tick If the scheduler tick has been stopped already and the governor selects a shallow idle state, the CPU can spend a long time in that state if the selection is based on an inaccurate prediction of idle time. That effect turns out to be relevant, so it needs to be mitigated. To that end, modify the menu governor to discard the result of the idle time prediction if the tick is stopped and the predicted idle time is less than the tick period length, unless the tick timer is going to expire soon. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) drivers/cpuidle/governors/menu.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit 296bb1e51a4838a6488ec5ce676607093482ecbc Author: Rafael J. Wysocki Date: Thu Apr 5 19:12:34 2018 +0200 cpuidle: menu: Refine idle state selection for running tick If the tick isn't stopped, the target residency of the state selected by the menu governor may be greater than the actual time to the next tick and that means lost energy. To avoid that, make tick_nohz_get_sleep_length() return the current time to the next event (before stopping the tick) in addition to the estimated one via an extra pointer argument and make menu_select() use that value to refine the state selection when necessary. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) drivers/cpuidle/governors/menu.c | 27 +++++++++++++++++++++++++-- include/linux/tick.h | 7 ++++--- kernel/time/tick-sched.c | 12 ++++++------ 3 files changed, 35 insertions(+), 11 deletions(-) commit 554c8aa8ecade210d58a252173bb8f2106552a44 Author: Rafael J. Wysocki Date: Tue Apr 3 23:17:11 2018 +0200 sched: idle: Select idle state before stopping the tick In order to address the issue with short idle duration predictions by the idle governor after the scheduler tick has been stopped, reorder the code in cpuidle_idle_call() so that the governor idle state selection runs before tick_nohz_idle_go_idle() and use the "nohz" hint returned by cpuidle_select() to decide whether or not to stop the tick. This isn't straightforward, because menu_select() invokes tick_nohz_get_sleep_length() to get the time to the next timer event and the number returned by the latter comes from __tick_nohz_idle_stop_tick(). Fortunately, however, it is possible to compute that number without actually stopping the tick and with the help of the existing code. Namely, tick_nohz_get_sleep_length() can be made call tick_nohz_next_event(), introduced earlier, to get the time to the next non-highres timer event. If that happens, tick_nohz_next_event() need not be called by __tick_nohz_idle_stop_tick() again. If it turns out that the scheduler tick cannot be stopped going forward or the next timer event is too close for the tick to be stopped, tick_nohz_get_sleep_length() can simply return the time to the next event currently programmed into the corresponding clock event device. In addition to knowing the return value of tick_nohz_next_event(), however, tick_nohz_get_sleep_length() needs to know the time to the next highres timer event, but with the scheduler tick timer excluded, which can be computed with the help of hrtimer_get_next_event(). That minimum of that number and the tick_nohz_next_event() return value is the total time to the next timer event with the assumption that the tick will be stopped. It can be returned to the idle governor which can use it for predicting idle duration (under the assumption that the tick will be stopped) and deciding whether or not it makes sense to stop the tick before putting the CPU into the selected idle state. With the above, the sleep_length field in struct tick_sched is not necessary any more, so drop it. Link: https://bugzilla.kernel.org/show_bug.cgi?id=199227 Reported-by: Doug Smythies Reported-by: Thomas Ilsche Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Reviewed-by: Frederic Weisbecker include/linux/tick.h | 2 ++ kernel/sched/idle.c | 11 ++++++--- kernel/time/tick-sched.c | 61 ++++++++++++++++++++++++++++++++++++++---------- kernel/time/tick-sched.h | 2 -- 4 files changed, 59 insertions(+), 17 deletions(-) commit 9178caf9649d97e976adbfca1f56477befde28f8 Merge: b54290e 5f8d561 Author: Russell King Date: Mon Apr 9 10:08:51 2018 +0100 Merge branches 'devel-stable' and 'misc' into for-linus commit a955358d54695e4ad9f7d6489a7ac4d69a8fc711 Author: Rodrigo Rivas Costa Date: Fri Apr 6 01:09:36 2018 +0200 HID: hidraw: Fix crash on HIDIOCGFEATURE with a destroyed device Doing `ioctl(HIDIOCGFEATURE)` in a tight loop on a hidraw device and then disconnecting the device, or unloading the driver, can cause a NULL pointer dereference. When a hidraw device is destroyed it sets 0 to `dev->exist`. Most functions check 'dev->exist' before doing its work, but `hidraw_get_report()` was missing that check. Cc: stable@vger.kernel.org Signed-off-by: Rodrigo Rivas Costa Signed-off-by: Jiri Kosina drivers/hid/hidraw.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2e210bbb7429cdcf1a1a3ad00c1bf98bd9bf2452 Author: Dmitry Torokhov Date: Tue Apr 3 10:52:20 2018 -0700 HID: input: fix battery level reporting on BT mice The commit 581c4484769e ("HID: input: map digitizer battery usage") assumed that devices having input (qas opposed to feature) report for battery strength would report the data on their own, without the need to be polled by the kernel; unfortunately it is not so. Many wireless mice do not send unsolicited reports with battery strength data and have to be polled explicitly. As a complication, stylus devices on digitizers are not normally connected to the base and thus can not be polled - the base can only determine battery strength in the stylus when it is in proximity. To solve this issue, we add a special flag that tells the kernel to avoid polling the device (and expect unsolicited reports) and set it when report field with physical usage of digitizer stylus (HID_DG_STYLUS). Unless this flag is set, and we have not seen the unsolicited reports, the kernel will attempt to poll the device when userspace attempts to read "capacity" and "state" attributes of power_supply object corresponding to the devices battery. Fixes: 581c4484769e ("HID: input: map digitizer battery usage") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198095 Cc: stable@vger.kernel.org Reported-and-tested-by: Martin van Es Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina drivers/hid/hid-input.c | 24 +++++++++++++++++------- include/linux/hid.h | 9 ++++++++- 2 files changed, 25 insertions(+), 8 deletions(-) commit 4b66af2d6356a00e94bcdea3e7fea324e8b5c6f4 Author: Kevin Easton Date: Sat Apr 7 11:40:33 2018 -0400 af_key: Always verify length of provided sadb_key Key extensions (struct sadb_key) include a user-specified number of key bits. The kernel uses that number to determine how much key data to copy out of the message in pfkey_msg2xfrm_state(). The length of the sadb_key message must be verified to be long enough, even in the case of SADB_X_AALG_NULL. Furthermore, the sadb_key_len value must be long enough to include both the key data and the struct sadb_key itself. Introduce a helper function verify_key_len(), and call it from parse_exthdrs() where other exthdr types are similarly checked for correctness. Signed-off-by: Kevin Easton Reported-by: syzbot+5022a34ca5a3d49b84223653fab632dfb7b4cf37@syzkaller.appspotmail.com Signed-off-by: Steffen Klassert net/key/af_key.c | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) commit 73aca179d78eaa11604ba0783a6d8b2125fbc332 Author: Michael Ellerman Date: Mon Mar 26 19:27:01 2018 +1100 powerpc/modules: Fix crashes by adding CONFIG_RELOCATABLE to vermagic If you build the kernel with CONFIG_RELOCATABLE=n, then install the modules, rebuild the kernel with CONFIG_RELOCATABLE=y and leave the old modules installed, we crash something like: Unable to handle kernel paging request for data at address 0xd000000018d66cef Faulting instruction address: 0xc0000000021ddd08 Oops: Kernel access of bad area, sig: 11 [#1] Modules linked in: x_tables autofs4 CPU: 2 PID: 1 Comm: systemd Not tainted 4.16.0-rc6-gcc_ubuntu_le-g99fec39 #1 ... NIP check_version.isra.22+0x118/0x170 Call Trace: __ksymtab_xt_unregister_table+0x58/0xfffffffffffffcb8 [x_tables] (unreliable) resolve_symbol+0xb4/0x150 load_module+0x10e8/0x29a0 SyS_finit_module+0x110/0x140 system_call+0x58/0x6c This happens because since commit 71810db27c1c ("modversions: treat symbol CRCs as 32 bit quantities"), a relocatable kernel encodes and handles symbol CRCs differently from a non-relocatable kernel. Although it's possible we could try and detect this situation and handle it, it's much more robust to simply make the state of CONFIG_RELOCATABLE part of the module vermagic. Fixes: 71810db27c1c ("modversions: treat symbol CRCs as 32 bit quantities") Signed-off-by: Michael Ellerman arch/powerpc/include/asm/module.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 76327a35caabd1a932e83d6a42b967aa08584e5d Author: Esben Haabendal Date: Sun Apr 8 22:17:01 2018 +0200 dp83640: Ensure against premature access to PHY registers after reset The datasheet specifies a 3uS pause after performing a software reset. The default implementation of genphy_soft_reset() does not provide this, so implement soft_reset with the needed pause. Signed-off-by: Esben Haabendal Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/dp83640.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 1f1cba787f5b2c03e3d103829cc02a74a7c9110a Merge: 4c7c12e 3349158 Author: David S. Miller Date: Sun Apr 8 19:51:41 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-04-09 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Two sockmap fixes: i) fix a potential warning when a socket with pending cork data is closed by freeing the memory right when the socket is closed instead of seeing still outstanding memory at garbage collector time, ii) fix a NULL pointer deref in case of duplicates release calls, so make sure to only reset the sk_prot pointer when it's in a valid state to do so, both from John. 2) Fix a compilation warning in bpf_prog_attach_check_attach_type() by moving the function under CONFIG_CGROUP_BPF ifdef since only used there, from Anders. ==================== Signed-off-by: David S. Miller commit 4c7c12e0c9b8224170afd974eed9ea032bd7f453 Merge: fc56be4 082f230 Author: David S. Miller Date: Sun Apr 8 17:19:15 2018 -0400 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Johan Hedberg says: ==================== pull request: bluetooth 2018-04-08 Here's one important Bluetooth fix for the 4.17-rc series that's needed to pass several Bluetooth qualification test cases. Let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit fc56be47da8cb111add373c36230b0139139898f Author: Jiri Pirko Date: Thu Apr 5 22:13:21 2018 +0200 devlink: convert occ_get op to separate registration This resolves race during initialization where the resources with ops are registered before driver and the structures used by occ_get op is initialized. So keep occ_get callbacks registered only when all structs are initialized. The example flows, as it is in mlxsw: 1) driver load/asic probe: mlxsw_core -> mlxsw_sp_resources_register -> mlxsw_sp_kvdl_resources_register -> devlink_resource_register IDX mlxsw_spectrum -> mlxsw_sp_kvdl_init -> mlxsw_sp_kvdl_parts_init -> mlxsw_sp_kvdl_part_init -> devlink_resource_size_get IDX (to get the current setup size from devlink) -> devlink_resource_occ_get_register IDX (register current occupancy getter) 2) reload triggered by devlink command: -> mlxsw_devlink_core_bus_device_reload -> mlxsw_sp_fini -> mlxsw_sp_kvdl_fini -> devlink_resource_occ_get_unregister IDX (struct mlxsw_sp *mlxsw_sp is freed at this point, call to occ get which is using mlxsw_sp would cause use-after free) -> mlxsw_sp_init -> mlxsw_sp_kvdl_init -> mlxsw_sp_kvdl_parts_init -> mlxsw_sp_kvdl_part_init -> devlink_resource_size_get IDX (to get the current setup size from devlink) -> devlink_resource_occ_get_register IDX (register current occupancy getter) Fixes: d9f9b9a4d05f ("devlink: Add support for resource abstraction") Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 24 ++----- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 - .../net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 67 ++++++++++++-------- drivers/net/netdevsim/devlink.c | 65 +++++++++---------- include/net/devlink.h | 40 ++++++++---- net/core/devlink.c | 74 +++++++++++++++++++--- 6 files changed, 165 insertions(+), 106 deletions(-) commit 5571196135abb6d51e01592812997403c136067c Author: Esben Haabendal Date: Fri Apr 6 14:46:35 2018 +0200 ARM: dts: ls1021a: Specify TBIPA register address The current (mildly evil) fsl_pq_mdio code uses an undocumented shadow of the TBIPA register on LS1021A, which happens to be read-only. Changing TBI PHY address therefore does not work on LS1021A. The real (and documented) address of the TBIPA registere lies in the eTSEC block and not in MDIO/MII, which is read/write, so using that fixes the problem. Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller arch/arm/boot/dts/ls1021a.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 21481189e8ffa4016e398d46ac6d66fb0f23acc3 Author: Esben Haabendal Date: Fri Apr 6 14:38:34 2018 +0200 net/fsl_pq_mdio: Allow explicit speficition of TBIPA address This introduces a simpler and generic method for for finding (and mapping) the TBIPA register. Instead of relying of complicated logic for finding the TBIPA register address based on the MDIO or MII register block base address, which even in some cases relies on undocumented shadow registers, a second "reg" entry for the mdio bus devicetree node specifies the TBIPA register. Backwards compatibility is kept, as the existing logic is applied when only a single "reg" mapping is specified. Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller .../devicetree/bindings/net/fsl-tsec-phy.txt | 6 ++- drivers/net/ethernet/freescale/fsl_pq_mdio.c | 50 +++++++++++++++------- 2 files changed, 39 insertions(+), 17 deletions(-) commit 4e31a6845f673a70a63688a82051ce1451c742bc Merge: e41f054 30f7962 Author: David S. Miller Date: Sun Apr 8 12:39:47 2018 -0400 Merge branch 'ibmvnic-Fix-driver-reset-and-DMA-bugs' Thomas Falcon says: ==================== ibmvnic: Fix driver reset and DMA bugs This patch series introduces some fixes to the driver reset routines and a patch that fixes mistakes caught by the kernel DMA debugger. The reset fixes include a fix to reset TX queue counters properly after a reset as well as updates to driver reset error-handling code. It also provides updates to the reset handling routine for redundant backing VF failover and partition migration cases. ==================== Signed-off-by: David S. Miller commit 30f796258c49baa313222456bcf5b0246da55ff1 Author: Nathan Fontenot Date: Fri Apr 6 18:37:06 2018 -0500 ibmvnic: Do not reset CRQ for Mobility driver resets When resetting the ibmvnic driver after a partition migration occurs there is no requirement to do a reset of the main CRQ. The current driver code does the required re-enable of the main CRQ, then does a reset of the main CRQ later. What we should be doing for a driver reset after a migration is to re-enable the main CRQ, release all the sub-CRQs, and then allocate new sub-CRQs after capability negotiation. This patch updates the handling of mobility resets to do the proper work and not reset the main CRQ. To do this the initialization/reset of the main CRQ had to be moved out of the ibmvnic_init routine and in to the ibmvnic_probe and do_reset routines. Signed-off-by: Nathan Fontenot Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 55 ++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 23 deletions(-) commit 5a18e1e0c193b2f6a8d4651f38aaabee58080647 Author: Thomas Falcon Date: Fri Apr 6 18:37:05 2018 -0500 ibmvnic: Fix failover case for non-redundant configuration There is a failover case for a non-redundant pseries VNIC configuration that was not being handled properly. The current implementation assumes that the driver will always have a redandant device to communicate with following a failover notification. There are cases, however, when a non-redundant configuration can receive a failover request. If that happens, the driver should wait until it receives a signal that the device is ready for operation. The driver is agnostic of its backing hardware configuration, so this fix necessarily affects all device failover management. The driver needs to wait until it receives a signal that the device is ready for resetting. A flag is introduced to track this intermediary state where the driver is waiting for an active device. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 37 +++++++++++++++++++++++++++++-------- drivers/net/ethernet/ibm/ibmvnic.h | 1 + 2 files changed, 30 insertions(+), 8 deletions(-) commit af894d239840908dfebb2215e13a713e63d2ffb0 Author: Thomas Falcon Date: Fri Apr 6 18:37:04 2018 -0500 ibmvnic: Fix reset scheduler error handling In some cases, if the driver is waiting for a reset following a device parameter change, failure to schedule a reset can result in a hang since a completion signal is never sent. If the device configuration is being altered by a tool such as ethtool or ifconfig, it could cause the console to hang if the reset request does not get scheduled. Add some additional error handling code to exit the wait_for_completion if there is one in progress. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 39 ++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) commit 41f714672f93608751dbd2fa2291d476a8ff0150 Author: Thomas Falcon Date: Fri Apr 6 18:37:03 2018 -0500 ibmvnic: Zero used TX descriptor counter on reset The counter that tracks used TX descriptors pending completion needs to be zeroed as part of a device reset. This change fixes a bug causing transmit queues to be stopped unnecessarily and in some cases a transmit queue stall and timeout reset. If the counter is not reset, the remaining descriptors will not be "removed", effectively reducing queue capacity. If the queue is over half full, it will cause the queue to stall if stopped. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 1 + 1 file changed, 1 insertion(+) commit 37e40fa8f62ba33021cb0050e38f87d7519ee447 Author: Thomas Falcon Date: Fri Apr 6 18:37:02 2018 -0500 ibmvnic: Fix DMA mapping mistakes Fix some mistakes caught by the DMA debugger. The first change fixes a unnecessary unmap that should have been removed in an earlier update. The next hunk fixes another bad unmap by zeroing the bit checked to determine that an unmap is needed. The final change fixes some buffers that are unmapped with the wrong direction specified. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit e41f0548473eb7b6499bd8482474e30ae6d31220 Author: Cong Wang Date: Fri Apr 6 18:54:52 2018 -0700 tipc: use the right skb in tipc_sk_fill_sock_diag() Commit 4b2e6877b879 ("tipc: Fix namespace violation in tipc_sk_fill_sock_diag") tried to fix the crash but failed, the crash is still 100% reproducible with it. In tipc_sk_fill_sock_diag(), skb is the diag dump we are filling, it is not correct to retrieve its NETLINK_CB(), instead, like other protocol diag, we should use NETLINK_CB(cb->skb).sk here. Reported-by: Fixes: 4b2e6877b879 ("tipc: Fix namespace violation in tipc_sk_fill_sock_diag") Fixes: c30b70deb5f4 (tipc: implement socket diagnostics for AF_TIPC) Cc: GhantaKrishnamurthy MohanKrishna Cc: Jon Maloy Cc: Ying Xue Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/tipc/diag.c | 2 +- net/tipc/socket.c | 6 +++--- net/tipc/socket.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 81e98370293afcb58340ce8bd71af7b97f925c26 Author: Eric Dumazet Date: Sun Apr 8 07:52:08 2018 -0700 sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6 Check must happen before call to ipv6_addr_v4mapped() syzbot report was : BUG: KMSAN: uninit-value in sctp_sockaddr_af net/sctp/socket.c:359 [inline] BUG: KMSAN: uninit-value in sctp_do_bind+0x60f/0xdc0 net/sctp/socket.c:384 CPU: 0 PID: 3576 Comm: syzkaller968804 Not tainted 4.16.0+ #82 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676 sctp_sockaddr_af net/sctp/socket.c:359 [inline] sctp_do_bind+0x60f/0xdc0 net/sctp/socket.c:384 sctp_bind+0x149/0x190 net/sctp/socket.c:332 inet6_bind+0x1fd/0x1820 net/ipv6/af_inet6.c:293 SYSC_bind+0x3f2/0x4b0 net/socket.c:1474 SyS_bind+0x54/0x80 net/socket.c:1460 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x43fd49 RSP: 002b:00007ffe99df3d28 EFLAGS: 00000213 ORIG_RAX: 0000000000000031 RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fd49 RDX: 0000000000000010 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8 R10: 00000000004002c8 R11: 0000000000000213 R12: 0000000000401670 R13: 0000000000401700 R14: 0000000000000000 R15: 0000000000000000 Local variable description: ----address@SYSC_bind Variable was created at: SYSC_bind+0x6f/0x4b0 net/socket.c:1461 SyS_bind+0x54/0x80 net/socket.c:1460 Signed-off-by: Eric Dumazet Cc: Vlad Yasevich Cc: Neil Horman Reported-by: syzbot Signed-off-by: David S. Miller net/sctp/socket.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 30ce4d1903e1d8a7ccd110860a5eef3c638ed8be Author: Al Viro Date: Sun Apr 8 11:57:10 2018 -0400 getname_kernel() needs to make sure that ->name != ->iname in long case missed it in "kill struct filename.separate" several years ago. Cc: stable@vger.kernel.org Signed-off-by: Al Viro fs/namei.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fc5f33768cca7144f8d793205b229d46740d183b Author: Andrew Lunn Date: Sat Apr 7 20:37:40 2018 +0200 net: dsa: Discard frames from unused ports The Marvell switches under some conditions will pass a frame to the host with the port being the CPU port. Such frames are invalid, and should be dropped. Not dropping them can result in a crash when incrementing the receive statistics for an invalid port. Reported-by: Chris Healy Fixes: 91da11f870f0 ("net: Distributed Switch Architecture protocol support") Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 6780db244d6b1537d139dea0ec8aad10cf9e4adb Author: Eric Dumazet Date: Sat Apr 7 17:15:22 2018 -0700 sctp: do not leak kernel memory to user space syzbot produced a nice report [1] Issue here is that a recvmmsg() managed to leak 8 bytes of kernel memory to user space, because sin_zero (padding field) was not properly cleared. [1] BUG: KMSAN: uninit-value in copy_to_user include/linux/uaccess.h:184 [inline] BUG: KMSAN: uninit-value in move_addr_to_user+0x32e/0x530 net/socket.c:227 CPU: 1 PID: 3586 Comm: syzkaller481044 Not tainted 4.16.0+ #82 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 kmsan_internal_check_memory+0x164/0x1d0 mm/kmsan/kmsan.c:1176 kmsan_copy_to_user+0x69/0x160 mm/kmsan/kmsan.c:1199 copy_to_user include/linux/uaccess.h:184 [inline] move_addr_to_user+0x32e/0x530 net/socket.c:227 ___sys_recvmsg+0x4e2/0x810 net/socket.c:2211 __sys_recvmmsg+0x54e/0xdb0 net/socket.c:2313 SYSC_recvmmsg+0x29b/0x3e0 net/socket.c:2394 SyS_recvmmsg+0x76/0xa0 net/socket.c:2378 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x4401c9 RSP: 002b:00007ffc56f73098 EFLAGS: 00000217 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004401c9 RDX: 0000000000000001 RSI: 0000000020003ac0 RDI: 0000000000000003 RBP: 00000000006ca018 R08: 0000000020003bc0 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401af0 R13: 0000000000401b80 R14: 0000000000000000 R15: 0000000000000000 Local variable description: ----addr@___sys_recvmsg Variable was created at: ___sys_recvmsg+0xd5/0x810 net/socket.c:2172 __sys_recvmmsg+0x54e/0xdb0 net/socket.c:2313 Bytes 8-15 of 16 are uninitialized ================================================================== Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 3586 Comm: syzkaller481044 Tainted: G B 4.16.0+ #82 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 panic+0x39d/0x940 kernel/panic.c:183 kmsan_report+0x238/0x240 mm/kmsan/kmsan.c:1083 kmsan_internal_check_memory+0x164/0x1d0 mm/kmsan/kmsan.c:1176 kmsan_copy_to_user+0x69/0x160 mm/kmsan/kmsan.c:1199 copy_to_user include/linux/uaccess.h:184 [inline] move_addr_to_user+0x32e/0x530 net/socket.c:227 ___sys_recvmsg+0x4e2/0x810 net/socket.c:2211 __sys_recvmmsg+0x54e/0xdb0 net/socket.c:2313 SYSC_recvmmsg+0x29b/0x3e0 net/socket.c:2394 SyS_recvmmsg+0x76/0xa0 net/socket.c:2378 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Cc: Vlad Yasevich Cc: Neil Horman Reported-by: syzbot Signed-off-by: David S. Miller net/sctp/ipv6.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ccb48e837cf23b101de9799ab92cc2821133a1c8 Merge: f12c643 3099a52 Author: David S. Miller Date: Sat Apr 7 22:32:32 2018 -0400 Merge branch 'net-fix-uninit-values-in-networking-stack' Eric Dumazet says: ==================== net: fix uninit-values in networking stack It seems syzbot got new features enabled, and fired some interesting reports. Oh well. ==================== Signed-off-by: David S. Miller commit 3099a52918937ab86ec47038ad80d377ba16c531 Author: Eric Dumazet Date: Sat Apr 7 13:42:43 2018 -0700 soreuseport: initialise timewait reuseport field syzbot reported an uninit-value in inet_csk_bind_conflict() [1] It turns out we never propagated sk->sk_reuseport into timewait socket. [1] BUG: KMSAN: uninit-value in inet_csk_bind_conflict+0x5f9/0x990 net/ipv4/inet_connection_sock.c:151 CPU: 1 PID: 3589 Comm: syzkaller008242 Not tainted 4.16.0+ #82 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676 inet_csk_bind_conflict+0x5f9/0x990 net/ipv4/inet_connection_sock.c:151 inet_csk_get_port+0x1d28/0x1e40 net/ipv4/inet_connection_sock.c:320 inet6_bind+0x121c/0x1820 net/ipv6/af_inet6.c:399 SYSC_bind+0x3f2/0x4b0 net/socket.c:1474 SyS_bind+0x54/0x80 net/socket.c:1460 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x4416e9 RSP: 002b:00007ffce6d15c88 EFLAGS: 00000217 ORIG_RAX: 0000000000000031 RAX: ffffffffffffffda RBX: 0100000000000000 RCX: 00000000004416e9 RDX: 000000000000001c RSI: 0000000020402000 RDI: 0000000000000004 RBP: 0000000000000000 R08: 00000000e6d15e08 R09: 00000000e6d15e08 R10: 0000000000000004 R11: 0000000000000217 R12: 0000000000009478 R13: 00000000006cd448 R14: 0000000000000000 R15: 0000000000000000 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_save_stack mm/kmsan/kmsan.c:293 [inline] kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:684 __msan_chain_origin+0x69/0xc0 mm/kmsan/kmsan_instr.c:521 tcp_time_wait+0xf17/0xf50 net/ipv4/tcp_minisocks.c:283 tcp_rcv_state_process+0xebe/0x6490 net/ipv4/tcp_input.c:6003 tcp_v6_do_rcv+0x11dd/0x1d90 net/ipv6/tcp_ipv6.c:1331 sk_backlog_rcv include/net/sock.h:908 [inline] __release_sock+0x2d6/0x680 net/core/sock.c:2271 release_sock+0x97/0x2a0 net/core/sock.c:2786 tcp_close+0x277/0x18f0 net/ipv4/tcp.c:2269 inet_release+0x240/0x2a0 net/ipv4/af_inet.c:427 inet6_release+0xaf/0x100 net/ipv6/af_inet6.c:435 sock_release net/socket.c:595 [inline] sock_close+0xe0/0x300 net/socket.c:1149 __fput+0x49e/0xa10 fs/file_table.c:209 ____fput+0x37/0x40 fs/file_table.c:243 task_work_run+0x243/0x2c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x10e1/0x38d0 kernel/exit.c:867 do_group_exit+0x1a0/0x360 kernel/exit.c:970 SYSC_exit_group+0x21/0x30 kernel/exit.c:981 SyS_exit_group+0x25/0x30 kernel/exit.c:979 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_save_stack mm/kmsan/kmsan.c:293 [inline] kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:684 __msan_chain_origin+0x69/0xc0 mm/kmsan/kmsan_instr.c:521 inet_twsk_alloc+0xaef/0xc00 net/ipv4/inet_timewait_sock.c:182 tcp_time_wait+0xd9/0xf50 net/ipv4/tcp_minisocks.c:258 tcp_rcv_state_process+0xebe/0x6490 net/ipv4/tcp_input.c:6003 tcp_v6_do_rcv+0x11dd/0x1d90 net/ipv6/tcp_ipv6.c:1331 sk_backlog_rcv include/net/sock.h:908 [inline] __release_sock+0x2d6/0x680 net/core/sock.c:2271 release_sock+0x97/0x2a0 net/core/sock.c:2786 tcp_close+0x277/0x18f0 net/ipv4/tcp.c:2269 inet_release+0x240/0x2a0 net/ipv4/af_inet.c:427 inet6_release+0xaf/0x100 net/ipv6/af_inet6.c:435 sock_release net/socket.c:595 [inline] sock_close+0xe0/0x300 net/socket.c:1149 __fput+0x49e/0xa10 fs/file_table.c:209 ____fput+0x37/0x40 fs/file_table.c:243 task_work_run+0x243/0x2c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x10e1/0x38d0 kernel/exit.c:867 do_group_exit+0x1a0/0x360 kernel/exit.c:970 SYSC_exit_group+0x21/0x30 kernel/exit.c:981 SyS_exit_group+0x25/0x30 kernel/exit.c:979 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:188 kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:314 kmem_cache_alloc+0xaab/0xb90 mm/slub.c:2756 inet_twsk_alloc+0x13b/0xc00 net/ipv4/inet_timewait_sock.c:163 tcp_time_wait+0xd9/0xf50 net/ipv4/tcp_minisocks.c:258 tcp_rcv_state_process+0xebe/0x6490 net/ipv4/tcp_input.c:6003 tcp_v6_do_rcv+0x11dd/0x1d90 net/ipv6/tcp_ipv6.c:1331 sk_backlog_rcv include/net/sock.h:908 [inline] __release_sock+0x2d6/0x680 net/core/sock.c:2271 release_sock+0x97/0x2a0 net/core/sock.c:2786 tcp_close+0x277/0x18f0 net/ipv4/tcp.c:2269 inet_release+0x240/0x2a0 net/ipv4/af_inet.c:427 inet6_release+0xaf/0x100 net/ipv6/af_inet6.c:435 sock_release net/socket.c:595 [inline] sock_close+0xe0/0x300 net/socket.c:1149 __fput+0x49e/0xa10 fs/file_table.c:209 ____fput+0x37/0x40 fs/file_table.c:243 task_work_run+0x243/0x2c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x10e1/0x38d0 kernel/exit.c:867 do_group_exit+0x1a0/0x360 kernel/exit.c:970 SYSC_exit_group+0x21/0x30 kernel/exit.c:981 SyS_exit_group+0x25/0x30 kernel/exit.c:979 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Fixes: da5e36308d9f ("soreuseport: TCP/IPv4 implementation") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller include/net/inet_timewait_sock.h | 1 + net/ipv4/inet_timewait_sock.c | 1 + 2 files changed, 2 insertions(+) commit d0ea2b12500543535be3f54e17920fffc9bb45f6 Author: Eric Dumazet Date: Sat Apr 7 13:42:42 2018 -0700 ipv4: fix uninit-value in ip_route_output_key_hash_rcu() syzbot complained that res.type could be used while not initialized. Using RTN_UNSPEC as initial value seems better than using garbage. BUG: KMSAN: uninit-value in __mkroute_output net/ipv4/route.c:2200 [inline] BUG: KMSAN: uninit-value in ip_route_output_key_hash_rcu+0x31f0/0x3940 net/ipv4/route.c:2493 CPU: 1 PID: 12207 Comm: syz-executor0 Not tainted 4.16.0+ #81 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676 __mkroute_output net/ipv4/route.c:2200 [inline] ip_route_output_key_hash_rcu+0x31f0/0x3940 net/ipv4/route.c:2493 ip_route_output_key_hash net/ipv4/route.c:2322 [inline] __ip_route_output_key include/net/route.h:126 [inline] ip_route_output_flow+0x1eb/0x3c0 net/ipv4/route.c:2577 raw_sendmsg+0x1861/0x3ed0 net/ipv4/raw.c:653 inet_sendmsg+0x48d/0x740 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] SYSC_sendto+0x6c3/0x7e0 net/socket.c:1747 SyS_sendto+0x8a/0xb0 net/socket.c:1715 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x455259 RSP: 002b:00007fdc0625dc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fdc0625e6d4 RCX: 0000000000455259 RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000020000080 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004f7 R14: 00000000006fa7c8 R15: 0000000000000000 Local variable description: ----res.i.i@ip_route_output_flow Variable was created at: ip_route_output_flow+0x75/0x3c0 net/ipv4/route.c:2576 raw_sendmsg+0x1861/0x3ed0 net/ipv4/raw.c:653 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/route.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit b855ff827476adbdc2259e9895681d82b7b26065 Author: Eric Dumazet Date: Sat Apr 7 13:42:41 2018 -0700 dccp: initialize ireq->ir_mark syzbot reported an uninit-value read of skb->mark in iptable_mangle_hook() Thanks to the nice report, I tracked the problem to dccp not caring of ireq->ir_mark for passive sessions. BUG: KMSAN: uninit-value in ipt_mangle_out net/ipv4/netfilter/iptable_mangle.c:66 [inline] BUG: KMSAN: uninit-value in iptable_mangle_hook+0x5e5/0x720 net/ipv4/netfilter/iptable_mangle.c:84 CPU: 0 PID: 5300 Comm: syz-executor3 Not tainted 4.16.0+ #81 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676 ipt_mangle_out net/ipv4/netfilter/iptable_mangle.c:66 [inline] iptable_mangle_hook+0x5e5/0x720 net/ipv4/netfilter/iptable_mangle.c:84 nf_hook_entry_hookfn include/linux/netfilter.h:120 [inline] nf_hook_slow+0x158/0x3d0 net/netfilter/core.c:483 nf_hook include/linux/netfilter.h:243 [inline] __ip_local_out net/ipv4/ip_output.c:113 [inline] ip_local_out net/ipv4/ip_output.c:122 [inline] ip_queue_xmit+0x1d21/0x21c0 net/ipv4/ip_output.c:504 dccp_transmit_skb+0x15eb/0x1900 net/dccp/output.c:142 dccp_xmit_packet+0x814/0x9e0 net/dccp/output.c:281 dccp_write_xmit+0x20f/0x480 net/dccp/output.c:363 dccp_sendmsg+0x12ca/0x12d0 net/dccp/proto.c:818 inet_sendmsg+0x48d/0x740 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046 __sys_sendmsg net/socket.c:2080 [inline] SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091 SyS_sendmsg+0x54/0x80 net/socket.c:2087 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x455259 RSP: 002b:00007f1a4473dc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f1a4473e6d4 RCX: 0000000000455259 RDX: 0000000000000000 RSI: 0000000020b76fc8 RDI: 0000000000000015 RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004f0 R14: 00000000006fa720 R15: 0000000000000000 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_save_stack mm/kmsan/kmsan.c:293 [inline] kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:684 __msan_chain_origin+0x69/0xc0 mm/kmsan/kmsan_instr.c:521 ip_queue_xmit+0x1e35/0x21c0 net/ipv4/ip_output.c:502 dccp_transmit_skb+0x15eb/0x1900 net/dccp/output.c:142 dccp_xmit_packet+0x814/0x9e0 net/dccp/output.c:281 dccp_write_xmit+0x20f/0x480 net/dccp/output.c:363 dccp_sendmsg+0x12ca/0x12d0 net/dccp/proto.c:818 inet_sendmsg+0x48d/0x740 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046 __sys_sendmsg net/socket.c:2080 [inline] SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091 SyS_sendmsg+0x54/0x80 net/socket.c:2087 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_save_stack mm/kmsan/kmsan.c:293 [inline] kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:684 __msan_chain_origin+0x69/0xc0 mm/kmsan/kmsan_instr.c:521 inet_csk_clone_lock+0x503/0x580 net/ipv4/inet_connection_sock.c:797 dccp_create_openreq_child+0x7f/0x890 net/dccp/minisocks.c:92 dccp_v4_request_recv_sock+0x22c/0xe90 net/dccp/ipv4.c:408 dccp_v6_request_recv_sock+0x290/0x2000 net/dccp/ipv6.c:414 dccp_check_req+0x7b9/0x8f0 net/dccp/minisocks.c:197 dccp_v4_rcv+0x12e4/0x2630 net/dccp/ipv4.c:840 ip_local_deliver_finish+0x6ed/0xd40 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:288 [inline] ip_local_deliver+0x43c/0x4e0 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:449 [inline] ip_rcv_finish+0x1253/0x16d0 net/ipv4/ip_input.c:397 NF_HOOK include/linux/netfilter.h:288 [inline] ip_rcv+0x119d/0x16f0 net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x47cf/0x4a80 net/core/dev.c:4562 __netif_receive_skb net/core/dev.c:4627 [inline] process_backlog+0x62d/0xe20 net/core/dev.c:5307 napi_poll net/core/dev.c:5705 [inline] net_rx_action+0x7c1/0x1a70 net/core/dev.c:5771 __do_softirq+0x56d/0x93d kernel/softirq.c:285 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:188 kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:314 kmem_cache_alloc+0xaab/0xb90 mm/slub.c:2756 reqsk_alloc include/net/request_sock.h:88 [inline] inet_reqsk_alloc+0xc4/0x7f0 net/ipv4/tcp_input.c:6145 dccp_v4_conn_request+0x5cc/0x1770 net/dccp/ipv4.c:600 dccp_v6_conn_request+0x299/0x1880 net/dccp/ipv6.c:317 dccp_rcv_state_process+0x2ea/0x2410 net/dccp/input.c:612 dccp_v4_do_rcv+0x229/0x340 net/dccp/ipv4.c:682 dccp_v6_do_rcv+0x16d/0x1220 net/dccp/ipv6.c:578 sk_backlog_rcv include/net/sock.h:908 [inline] __sk_receive_skb+0x60e/0xf20 net/core/sock.c:513 dccp_v4_rcv+0x24d4/0x2630 net/dccp/ipv4.c:874 ip_local_deliver_finish+0x6ed/0xd40 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:288 [inline] ip_local_deliver+0x43c/0x4e0 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:449 [inline] ip_rcv_finish+0x1253/0x16d0 net/ipv4/ip_input.c:397 NF_HOOK include/linux/netfilter.h:288 [inline] ip_rcv+0x119d/0x16f0 net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x47cf/0x4a80 net/core/dev.c:4562 __netif_receive_skb net/core/dev.c:4627 [inline] process_backlog+0x62d/0xe20 net/core/dev.c:5307 napi_poll net/core/dev.c:5705 [inline] net_rx_action+0x7c1/0x1a70 net/core/dev.c:5771 __do_softirq+0x56d/0x93d kernel/softirq.c:285 Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller net/dccp/ipv4.c | 1 + net/dccp/ipv6.c | 1 + 2 files changed, 2 insertions(+) commit 77d36398d99f2565c0a8d43a86fd520a82e64bb8 Author: Eric Dumazet Date: Sat Apr 7 13:42:40 2018 -0700 net: fix uninit-value in __hw_addr_add_ex() syzbot complained : BUG: KMSAN: uninit-value in memcmp+0x119/0x180 lib/string.c:861 CPU: 0 PID: 3 Comm: kworker/0:0 Not tainted 4.16.0+ #82 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: ipv6_addrconf addrconf_dad_work Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676 memcmp+0x119/0x180 lib/string.c:861 __hw_addr_add_ex net/core/dev_addr_lists.c:60 [inline] __dev_mc_add+0x1c2/0x8e0 net/core/dev_addr_lists.c:670 dev_mc_add+0x6d/0x80 net/core/dev_addr_lists.c:687 igmp6_group_added+0x2db/0xa00 net/ipv6/mcast.c:662 ipv6_dev_mc_inc+0xe9e/0x1130 net/ipv6/mcast.c:914 addrconf_join_solict net/ipv6/addrconf.c:2078 [inline] addrconf_dad_begin net/ipv6/addrconf.c:3828 [inline] addrconf_dad_work+0x427/0x2150 net/ipv6/addrconf.c:3954 process_one_work+0x12c6/0x1f60 kernel/workqueue.c:2113 worker_thread+0x113c/0x24f0 kernel/workqueue.c:2247 kthread+0x539/0x720 kernel/kthread.c:239 Fixes: f001fde5eadd ("net: introduce a list of device addresses dev_addr_list (v6)") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller net/core/dev_addr_lists.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b13dda9f9aa7caceeee61c080c2e544d5f5d85e5 Author: Eric Dumazet Date: Sat Apr 7 13:42:39 2018 -0700 net: initialize skb->peeked when cloning syzbot reported __skb_try_recv_from_queue() was using skb->peeked while it was potentially unitialized. We need to clear it in __skb_clone() Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller net/core/skbuff.c | 1 + 1 file changed, 1 insertion(+) commit b1993a2de12c9e75c35729e2ffbc3a92d50c0d31 Author: Eric Dumazet Date: Sat Apr 7 13:42:38 2018 -0700 net: fix rtnh_ok() syzbot reported : BUG: KMSAN: uninit-value in rtnh_ok include/net/nexthop.h:11 [inline] BUG: KMSAN: uninit-value in fib_count_nexthops net/ipv4/fib_semantics.c:469 [inline] BUG: KMSAN: uninit-value in fib_create_info+0x554/0x8d20 net/ipv4/fib_semantics.c:1091 @remaining is an integer, coming from user space. If it is negative we want rtnh_ok() to return false. Fixes: 4e902c57417c ("[IPv4]: FIB configuration using struct fib_config") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller include/net/nexthop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6091f09c2f79730d895149bcfe3d66140288cd0e Author: Eric Dumazet Date: Sat Apr 7 13:42:37 2018 -0700 netlink: fix uninit-value in netlink_sendmsg syzbot reported : BUG: KMSAN: uninit-value in ffs arch/x86/include/asm/bitops.h:432 [inline] BUG: KMSAN: uninit-value in netlink_sendmsg+0xb26/0x1310 net/netlink/af_netlink.c:1851 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller net/netlink/af_netlink.c | 2 ++ 1 file changed, 2 insertions(+) commit a466856e0b7ab269cdf9461886d007e88ff575b0 Author: Eric Dumazet Date: Sat Apr 7 13:42:36 2018 -0700 crypto: af_alg - fix possible uninit-value in alg_bind() syzbot reported : BUG: KMSAN: uninit-value in alg_bind+0xe3/0xd90 crypto/af_alg.c:162 We need to check addr_len before dereferencing sa (or uaddr) Fixes: bb30b8848c85 ("crypto: af_alg - whitelist mask and type") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Stephan Mueller Cc: Herbert Xu Signed-off-by: David S. Miller crypto/af_alg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b0dc52f15e7fe2b973ecfe4f3706f1b35ce3943a Author: Steven Rostedt (VMware) Date: Fri Apr 6 09:24:25 2018 -0400 init: Have initcall_debug still work without CONFIG_TRACEPOINTS Add macros around the initcall_debug tracepoint code to have the code to default back to the old method if CONFIG_TRACEPOINTS is not enabled. Signed-off-by: Steven Rostedt (VMware) init/main.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit c2d84ddb338c829e3ee9d1af6a55325998fcdb82 Author: Steven Rostedt (VMware) Date: Sat Apr 7 20:11:19 2018 -0400 ktest.pl: Add MAIL_COMMAND option to define how to send email Allow the user to override the default way to send email. This will allow the user to add their own mailer and format for sending email. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 54 ++++++++++++++++++++++++++--------------- tools/testing/ktest/sample.conf | 12 +++++++++ 2 files changed, 46 insertions(+), 20 deletions(-) commit 59f89eb1e3ddccdef9a154dd667facfc15bceab1 Author: Steven Rostedt (VMware) Date: Fri Apr 6 17:46:27 2018 -0400 ktest.pl: Use run_command to execute sending mail Instead of open coding system() call, use run_command which will log the sending of email as well. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 255769a17b86838eb724da5501eba6a31b0ed1ba Author: Steven Rostedt (VMware) Date: Fri Apr 6 17:16:39 2018 -0400 ktest.pl: Allow dodie be recursive If dodie cause a function that itself will call dodie, then be able to handle that. This will allow dodie functions to call run_command, which could possibly call dodie. If dodie is called again, simply ignore it. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 7 +++++++ 1 file changed, 7 insertions(+) commit 8604b0c4bc9a39f8fa0301bbb15146bcda2a44f7 Author: Steven Rostedt (VMware) Date: Fri Apr 6 16:42:34 2018 -0400 ktest.pl: Kill test if mailer is not supported If the user specifies a MAILTO, but the MAILER is not supported, then kill the test. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be1546b87f3b60f107b8f8dfef0e268cc12792f1 Author: Steven Rostedt (VMware) Date: Fri Apr 6 16:38:56 2018 -0400 ktest.pl: Add MAIL_PATH option to define where to find the mailer The option MAIL_PATH lets the user decide how to find the mailer they are using. For example, sendmail is usually located in /usr/sbin but is not always in the path of non admin users. Have ktest look through the user's PATH environment variable (adding /usr/sbin) as well, but if that's not good enough, allow the user to define where to find the mailer. Signed-off-by: Steven Rostedt (VMware) squash to mail exec Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 36 +++++++++++++++++++++++++++++++----- tools/testing/ktest/sample.conf | 4 ++++ 2 files changed, 35 insertions(+), 5 deletions(-) commit f8cf2f16a7c95acce497bfafa90e7c6d8397d653 Merge: 4b3f1a1 ab60368 Author: Linus Torvalds Date: Sat Apr 7 16:53:59 2018 -0700 Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull integrity updates from James Morris: "A mixture of bug fixes, code cleanup, and continues to close IMA-measurement, IMA-appraisal, and IMA-audit gaps. Also note the addition of a new cred_getsecid LSM hook by Matthew Garrett: For IMA purposes, we want to be able to obtain the prepared secid in the bprm structure before the credentials are committed. Add a cred_getsecid hook that makes this possible. which is used by a new CREDS_CHECK target in IMA: In ima_bprm_check(), check with both the existing process credentials and the credentials that will be committed when the new process is started. This will not change behaviour unless the system policy is extended to include CREDS_CHECK targets - BPRM_CHECK will continue to check the same credentials that it did previously" * 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: ima: Fallback to the builtin hash algorithm ima: Add smackfs to the default appraise/measure list evm: check for remount ro in progress before writing ima: Improvements in ima_appraise_measurement() ima: Simplify ima_eventsig_init() integrity: Remove unused macro IMA_ACTION_RULE_FLAGS ima: drop vla in ima_audit_measurement() ima: Fix Kconfig to select TPM 2.0 CRB interface evm: Constify *integrity_status_msg[] evm: Move evm_hmac and evm_hash from evm_main.c to evm_crypto.c fuse: define the filesystem as untrusted ima: fail signature verification based on policy ima: clear IMA_HASH ima: re-evaluate files on privileged mounted filesystems ima: fail file signature verification on non-init mounted filesystems IMA: Support using new creds in appraisal policy security: Add a cred_getsecid hook commit 4b3f1a151571985f7c9964260db1c31e056a67e4 Merge: 706ffc8 ed807f6 Author: Linus Torvalds Date: Sat Apr 7 16:46:56 2018 -0700 Merge branch 'next-tpm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull TPM updates from James Morris: "This release contains only bug fixes. There are no new major features added" * 'next-tpm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: tpm: fix intermittent failure with self tests tpm: add retry logic tpm: self test failure should not cause suspend to fail tpm2: add longer timeouts for creation commands. tpm_crb: use __le64 annotated variable for response buffer address tpm: fix buffer type in tpm_transmit_cmd tpm: tpm-interface: fix tpm_transmit/_cmd kdoc tpm: cmd_ready command can be issued only after granting locality commit 706ffc8c26432432fcd6d8a02708b40852bd0bd2 Merge: bf6879d d54d27c Author: Linus Torvalds Date: Sat Apr 7 16:44:33 2018 -0700 Merge branch 'next-smack' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull smack update from James Morris: "One small change for Automotive Grade Linux" * 'next-smack' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: Smack: Handle CGROUP2 in the same way that CGROUP commit cd0e00c106722eca40b38ebf11cf134c01901086 Author: Sinan Kaya Date: Mon Apr 2 13:48:00 2018 -0400 alpha: io: reorder barriers to guarantee writeX() and iowriteX() ordering memory-barriers.txt has been updated with the following requirement. "When using writel(), a prior wmb() is not needed to guarantee that the cache coherent memory writes have completed before writing to the MMIO region." Current writeX() and iowriteX() implementations on alpha are not satisfying this requirement as the barrier is after the register write. Move mb() in writeX() and iowriteX() functions to guarantee that HW observes memory changes before performing register operations. Signed-off-by: Sinan Kaya Reported-by: Arnd Bergmann Signed-off-by: Matt Turner arch/alpha/include/asm/io.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 6fd16ce5590e30d0ed8b21e977102361ff9f92ef Author: Michael Cree Date: Mon Feb 26 22:02:12 2018 +1300 alpha: Implement CPU vulnerabilities sysfs functions. Implement the CPU vulnerabilty show functions for meltdown, spectre_v1 and spectre_v2 on Alpha. Tests on XP1000 (EV67/667MHz) and ES45 (EV68CB/1.25GHz) show them to be vulnerable to Meltdown and Spectre V1. In the case of Meltdown I saw a 1 to 2% success rate in reading bytes on the XP1000 and 50 to 60% success rate on the ES45. (This compares to 99.97% success reported for Intel CPUs.) Report EV6 and later CPUs as vulnerable. Tests on PWS600au (EV56/600MHz) for Spectre V1 attack were unsuccessful (though I did not try particularly hard) so mark EV4 through to EV56 as not vulnerable. Signed-off-by: Michael Cree Signed-off-by: Matt Turner arch/alpha/Kconfig | 1 + arch/alpha/kernel/Makefile | 2 +- arch/alpha/kernel/bugs.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) commit 54f16b1967bd7c6a252b3c128032deb37cc61cf3 Author: Alexandre Belloni Date: Wed Feb 21 22:36:16 2018 +0100 alpha: rtc: stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it just before returning from the callback. Signed-off-by: Alexandre Belloni Signed-off-by: Matt Turner arch/alpha/kernel/rtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9917df83a9d11c63a1c4b89ddd821357b7c20171 Author: Alexandre Belloni Date: Sat Feb 17 00:34:46 2018 +0100 alpha: rtc: remove unused set_mmss ops The .set_mmss and .setmmss64 ops are only called when the RTC is not providing an implementation for the .set_time callback. On alpha, .set_time is provided so .set_mmss64 is never called. Remove the unused code. Signed-off-by: Alexandre Belloni Signed-off-by: Matt Turner arch/alpha/kernel/rtc.c | 99 ------------------------------------------------- 1 file changed, 99 deletions(-) commit bf6879dcc483f0aa087afe27d103285daf435951 Merge: 8844a50 206b1c6 Author: Linus Torvalds Date: Sat Apr 7 14:38:01 2018 -0700 Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull alpha syscall cleanups from Al Viro: "A couple of SYSCALL_DEFINE conversions and removal of pointless (and bitrotted) piece stuck in ret_from_kernel_thread since the kernel_exceve/kernel_thread conversions six years ago" * 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: alpha: get rid of pointless insn in ret_from_kernel_thread alpha: switch pci syscalls to SYSCALL_DEFINE commit 8844a509863d7da41024194e40190ec00c2cd890 Merge: 90fda63 47db697 Author: Linus Torvalds Date: Sat Apr 7 14:30:28 2018 -0700 Merge branch 'misc.sparc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull sparc syscall cleanups from Al Viro: "sparc syscall stuff - killing pointless wrappers, conversions to {COMPAT_,}SYSCALL_DEFINE" * 'misc.sparc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: sparc: get rid of asm wrapper for nis_syscall() sparc: switch compat {f,}truncate64() to COMPAT_SYSCALL_DEFINE sparc: switch compat pread64 and pwrite64 to COMPAT_SYSCALL_DEFINE convert compat sync_file_range() to COMPAT_SYSCALL_DEFINE switch sparc_remap_file_pages() to SYSCALL_DEFINE sparc: get rid of memory_ordering(2) wrapper sparc: trivial conversions to {COMPAT_,}SYSCALL_DEFINE() sparc: bury a zombie extern that had been that way for twenty years sparc: get rid of remaining SIGN... wrappers sparc: kill useless SIGN... wrappers sparc: get rid of sys_sparc_pipe() wrappers commit 90fda63fa1156ec1bcfd7f9ca384cec221f70a21 Author: Linus Torvalds Date: Sat Apr 7 13:31:23 2018 -0700 treewide: fix up files incorrectly marked executable Joe Perches noted that we have a few source files that for some inexplicable reason (read: I'm too lazy to even go look at the history) are marked executable: drivers/gpu/drm/amd/amdgpu/vce_v4_0.c drivers/net/ethernet/cadence/macb_ptp.c A simple git command line to show executable C/asm/header files is this: git ls-files -s '*.[chsS]' | grep '^100755' and then you can fix them up with scripting by just feeding that output into: | cut -f2 | xargs chmod -x and commit it. Which is exactly what this commit does. Reported-by: Joe Perches Signed-off-by: Linus Torvalds drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 0 drivers/net/ethernet/cadence/macb_ptp.c | 0 2 files changed, 0 insertions(+), 0 deletions(-) commit 0d5b1bd332e09acffa6569dd6458199b3894d496 Merge: 49a695b 0d676a6 Author: Linus Torvalds Date: Sat Apr 7 12:36:18 2018 -0700 Merge branch 'i2c/for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: -I2C core now reports proper OF style module alias. I'd like to repeat the note from the commit msg here (Thanks, Javier!): NOTE: This patch may break out-of-tree drivers that were relying on this behavior, and only had an I2C device ID table even when the device was registered via OF. There are no remaining drivers in mainline that do this, but out-of-tree drivers have to be fixed and define a proper OF device ID table to have module auto-loading working. - new driver for the SynQuacer I2C controller - major refactoring of the QUP driver - the piix4 driver now uses request_muxed_region which should fix a long standing resource conflict with the sp5100_tco watchdog - a bunch of small core & driver improvements * 'i2c/for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (53 commits) i2c: add support for Socionext SynQuacer I2C controller dt-bindings: i2c: add binding for Socionext SynQuacer I2C i2c: Update i2c_trace_msg static key to modern api i2c: fix parameter of trace_i2c_result i2c: imx: avoid taking clk_prepare mutex in PM callbacks i2c: imx: use clk notifier for rate changes i2c: make i2c_check_addr_validity() static i2c: rcar: fix mask value of prohibited bit dt-bindings: i2c: document R8A77965 bindings i2c: pca-platform: drop gpio from platform data i2c: pca-platform: use device_property_read_u32 i2c: pca-platform: unconditionally use devm_gpiod_get_optional sh: sh7785lcr: add GPIO lookup table for i2c controller reset i2c: qup: reorganization of driver code to remove polling for qup v2 i2c: qup: reorganization of driver code to remove polling for qup v1 i2c: qup: send NACK for last read sub transfers i2c: qup: fix buffer overflow for multiple msg of maximum xfer len i2c: qup: change completion timeout according to transfer length i2c: qup: use the complete transfer length to choose DMA mode i2c: qup: proper error handling for i2c error in BAM mode ... commit 49a695ba723224875df50e327bd7b0b65dd9a56b Merge: 299f89d c1b25a1 Author: Linus Torvalds Date: Sat Apr 7 12:08:19 2018 -0700 Merge tag 'powerpc-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: "Notable changes: - Support for 4PB user address space on 64-bit, opt-in via mmap(). - Removal of POWER4 support, which was accidentally broken in 2016 and no one noticed, and blocked use of some modern instructions. - Workarounds so that the hypervisor can enable Transactional Memory on Power9. - A series to disable the DAWR (Data Address Watchpoint Register) on Power9. - More information displayed in the meltdown/spectre_v1/v2 sysfs files. - A vpermxor (Power8 Altivec) implementation for the raid6 Q Syndrome. - A big series to make the allocation of our pacas (per cpu area), kernel page tables, and per-cpu stacks NUMA aware when using the Radix MMU on Power9. And as usual many fixes, reworks and cleanups. Thanks to: Aaro Koskinen, Alexandre Belloni, Alexey Kardashevskiy, Alistair Popple, Andy Shevchenko, Aneesh Kumar K.V, Anshuman Khandual, Balbir Singh, Benjamin Herrenschmidt, Christophe Leroy, Christophe Lombard, Cyril Bur, Daniel Axtens, Dave Young, Finn Thain, Frederic Barrat, Gustavo Romero, Horia Geantă, Jonathan Neuschäfer, Kees Cook, Larry Finger, Laurent Dufour, Laurent Vivier, Logan Gunthorpe, Madhavan Srinivasan, Mark Greer, Mark Hairgrove, Markus Elfring, Mathieu Malaterre, Matt Brown, Matt Evans, Mauricio Faria de Oliveira, Michael Neuling, Naveen N. Rao, Nicholas Piggin, Paul Mackerras, Philippe Bergheaud, Ram Pai, Rob Herring, Sam Bobroff, Segher Boessenkool, Simon Guo, Simon Horman, Stewart Smith, Sukadev Bhattiprolu, Suraj Jitindar Singh, Thiago Jung Bauermann, Vaibhav Jain, Vaidyanathan Srinivasan, Vasant Hegde, Wei Yongjun" * tag 'powerpc-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (207 commits) powerpc/64s/idle: Fix restore of AMOR on POWER9 after deep sleep powerpc/64s: Fix POWER9 DD2.2 and above in cputable features powerpc/64s: Fix pkey support in dt_cpu_ftrs, add CPU_FTR_PKEY bit powerpc/64s: Fix dt_cpu_ftrs to have restore_cpu clear unwanted LPCR bits Revert "powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead" powerpc: iomap.c: introduce io{read|write}64_{lo_hi|hi_lo} powerpc: io.h: move iomap.h include so that it can use readq/writeq defs cxl: Fix possible deadlock when processing page faults from cxllib powerpc/hw_breakpoint: Only disable hw breakpoint if cpu supports it powerpc/mm/radix: Update command line parsing for disable_radix powerpc/mm/radix: Parse disable_radix commandline correctly. powerpc/mm/hugetlb: initialize the pagetable cache correctly for hugetlb powerpc/mm/radix: Update pte fragment count from 16 to 256 on radix powerpc/mm/keys: Update documentation and remove unnecessary check powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead powerpc/64s/idle: Consolidate power9_offline_stop()/power9_idle_stop() powerpc/powernv: Always stop secondaries before reboot/shutdown powerpc: hard disable irqs in smp_send_stop loop powerpc: use NMI IPI for smp_send_stop powerpc/powernv: Fix SMT4 forcing idle code ... commit 299f89d53e61c0b17479cc7d6f3b5382d5e83f28 Merge: fc22e19 e875d33 Author: Linus Torvalds Date: Sat Apr 7 11:56:33 2018 -0700 Merge tag 'leaks-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tobin/leaks Pull leaking-addresses updates from Tobin Harding: "This set represents improvements to the scripts/leaking_addresses.pl script. The major improvement is that with this set applied the script actually runs in a reasonable amount of time (less than a minute on a standard stock Ubuntu user desktop). Also, we have a second maintainer now and a tree hosted on kernel.org We do a few code clean ups. We fix the command help output. Handling of the vsyscall address range is fixed to check the whole range instead of just the start/end addresses. We add support for 5 page table levels (suggested on LKML). We use a system command to get the machine architecture instead of using Perl. Calling this command for every regex comparison is what previously choked the script, caching the result of this call gave the major speed improvement. We add support for scanning 32-bit kernels using the user/kernel memory split. Path skipping code refactored and simplified (meaning easier script configuration). We remove version numbering. We add a variable name to improve readability of a regex and finally we check filenames for leaking addresses. Currently script scans /proc/PID for all PID. With this set applied we only scan for PID==1. It was observed that on an idle system files under /proc/PID are predominantly the same for all processes. Also it was noted that the script does not scan _all_ the kernel since it only scans active processes. Scanning only for PID==1 makes explicit the inherent flaw in the script that the scan is only partial and also speeds things up" * tag 'leaks-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tobin/leaks: MAINTAINERS: Update LEAKING_ADDRESSES leaking_addresses: check if file name contains address leaking_addresses: explicitly name variable used in regex leaking_addresses: remove version number leaking_addresses: skip '/proc/1/syscall' leaking_addresses: skip all /proc/PID except /proc/1 leaking_addresses: cache architecture name leaking_addresses: simplify path skipping leaking_addresses: do not parse binary files leaking_addresses: add 32-bit support leaking_addresses: add is_arch() wrapper subroutine leaking_addresses: use system command to get arch leaking_addresses: add support for 5 page table levels leaking_addresses: add support for kernel config file leaking_addresses: add range check for vsyscall memory leaking_addresses: indent dependant options leaking_addresses: remove command examples leaking_addresses: remove mention of kptr_restrict leaking_addresses: fix typo function not called commit fc22e19a114f000da4db2ed0ed82023c44d38a8c Merge: 3612605 6aa6904 Author: Linus Torvalds Date: Sat Apr 7 11:54:21 2018 -0700 Merge tag 'linux-kselftest-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest update from Shuah Khan: "This Kselftest update for 4.17-rc1 consists of: - Test build error fixes - Fixes to prevent intel_pstate from building on non-x86 systems. - New test for ion with vgem driver. - Change to print the test name to /dev/kmsg to add context to kernel failures if any uncovered from running the test. - Kselftest framework enhancements to add KSFT_TAP_LEVEL environment variable to prevent nested TAP headers being printed in the Kselftest output. Nested TAP13 headers could cause problems for some parsers. This change suppresses the nested headers from test programs and test shell scripts with changes to framework and Makefiles without changing the tests" * tag 'linux-kselftest-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/intel_pstate: Fix build rule for x86 selftests: Print the test we're running to /dev/kmsg selftests/seccomp: Allow get_metadata to XFAIL selftests/android/ion: Makefile: fix build error selftests: futex Makefile add top level TAP header echo to RUN_TESTS selftests: Makefile set KSFT_TAP_LEVEL to prevent nested TAP headers selftests: lib.mk set KSFT_TAP_LEVEL to prevent nested TAP headers selftests: kselftest framework: add handling for TAP header level selftests: ion: Add simple test with the vgem driver selftests: ion: Remove some prints commit 3612605a5a5bc3d3ae0ec861328be8a2990f2c7a Merge: 62f8e6c df0ce17 Author: Linus Torvalds Date: Sat Apr 7 11:11:41 2018 -0700 Merge branch 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull general security layer updates from James Morris: - Convert security hooks from list to hlist, a nice cleanup, saving about 50% of space, from Sargun Dhillon. - Only pass the cred, not the secid, to kill_pid_info_as_cred and security_task_kill (as the secid can be determined from the cred), from Stephen Smalley. - Close a potential race in kernel_read_file(), by making the file unwritable before calling the LSM check (vs after), from Kees Cook. * 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: security: convert security hooks to use hlist exec: Set file unwritable before LSM check usb, signal, security: only pass the cred, not the secid, to kill_pid_info_as_cred and security_task_kill commit d56f3af9e801970d21c57621de3b42bc17eac152 Author: Tobias Klauser Date: Thu Jan 25 10:58:50 2018 +0100 openrisc: remove unused __ARCH_HAVE_MMU define The __ARCH_HAVE_MMU define is (and was) used nowhere in the tree and also doesn't appear to be used by any libc. Signed-off-by: Tobias Klauser Signed-off-by: Stafford Horne arch/openrisc/include/uapi/asm/unistd.h | 2 -- 1 file changed, 2 deletions(-) commit a59855cd8c613ba4bb95147f6176360d95f75e60 Author: Rafael J. Wysocki Date: Tue Apr 3 23:17:00 2018 +0200 time: hrtimer: Introduce hrtimer_next_event_without() The next set of changes will need to compute the time to the next hrtimer event over all hrtimers except for the scheduler tick one. To that end introduce a new helper function, hrtimer_next_event_without(), for computing the time until the next hrtimer event over all timers except for one and modify the underlying code in __hrtimer_next_event_base() to prepare it for being called by that new function. No intentional changes in functionality. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Reviewed-by: Frederic Weisbecker include/linux/hrtimer.h | 1 + kernel/time/hrtimer.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 2 deletions(-) commit 23a8d888107ce4ce444eab2dcebf4cfb3578770b Author: Rafael J. Wysocki Date: Thu Apr 5 19:07:57 2018 +0200 time: tick-sched: Split tick_nohz_stop_sched_tick() In order to address the issue with short idle duration predictions by the idle governor after the scheduler tick has been stopped, split tick_nohz_stop_sched_tick() into two separate routines, one computing the time to the next timer event and the other simply stopping the tick when the time to the next timer event is known. Prepare these two routines to be called separately, as one of them will be called by the idle governor in the cpuidle_select() code path after subsequent changes. Update the former callers of tick_nohz_stop_sched_tick() to use the new routines, tick_nohz_next_event() and tick_nohz_stop_tick(), instead of it and move the updates of the sleep_length field in struct tick_sched into __tick_nohz_idle_stop_tick() as it doesn't need to be updated anywhere else. There should be no intentional visible changes in functionality resulting from this change. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Reviewed-by: Frederic Weisbecker kernel/time/tick-sched.c | 124 +++++++++++++++++++++++++++++------------------ kernel/time/tick-sched.h | 4 ++ 2 files changed, 82 insertions(+), 46 deletions(-) commit f12c643209db0626f2f54780d86bb93bfa7a9c2d Author: Cong Wang Date: Fri Apr 6 17:19:41 2018 -0700 net_sched: fix a missing idr_remove() in u32_delete_key() When we delete a u32 key via u32_delete_key(), we forget to call idr_remove() to remove its handle from IDR. Fixes: e7614370d6f0 ("net_sched: use idr to allocate u32 filter handles") Reported-by: Marcin Kabiesz Tested-by: Marcin Kabiesz Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_u32.c | 1 + 1 file changed, 1 insertion(+) commit 62f8e6c5dcb6666e7da402aea28fcf846eea144c Merge: f605ba9 ec0328e Author: Linus Torvalds Date: Sat Apr 7 09:08:24 2018 -0700 Merge tag 'fscache-next-20180406' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull fscache updates from David Howells: "Three patches that fix some of AFS's usage of fscache: (1) Need to invalidate the cache if a foreign data change is detected on the server. (2) Move the vnode ID uniquifier (equivalent to i_generation) from the auxiliary data to the index key to prevent a race between file delete and a subsequent file create seeing the same index key. (3) Need to retire cookies that correspond to files that we think got deleted on the server. Four patches to fix some things in fscache and cachefiles: (4) Fix a couple of checker warnings. (5) Correctly indicate to the end-of-operation callback whether an operation completed or was cancelled. (6) Add a check for multiple cookie relinquishment. (7) Fix a path through the asynchronous write that doesn't wake up a waiter for a page if the cache decides not to write that page, but discards it instead. A couple of patches to add tracepoints to fscache and cachefiles: (8) Add tracepoints for cookie operators, object state machine execution, cachefiles object management and cachefiles VFS operations. (9) Add tracepoints for fscache operation management and page wrangling. And then three development patches: (10) Attach the index key and auxiliary data to the cookie, pass this information through various fscache-netfs API functions and get rid of the callbacks to the netfs to get it. This means that the cache can get at this information, even if the netfs goes away. It also means that the cache can be lazy in updating the coherency data. (11) Pass the object data size through various fscache-netfs API rather than calling back to the netfs for it, and store the value in the object. This makes it easier to correctly resize the object, as the size is updated on writes to the cache, rather than calling back out to the netfs. (12) Maintain a catalogue of allocated cookies. This makes it possible to catch cookie collision up front rather than down in the bowels of the cache being run from a service thread from the object state machine. This will also make it possible in the future to reconnect to a cookie that's not gone dead yet because it's waiting for finalisation of the storage and also make it possible to bring cookies online if the cache is added after the cookie has been obtained" * tag 'fscache-next-20180406' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: fscache: Maintain a catalogue of allocated cookies fscache: Pass object size in rather than calling back for it fscache: Attach the index key and aux data to the cookie fscache: Add more tracepoints fscache: Add tracepoints fscache: Fix hanging wait on page discarded by writeback fscache: Detect multiple relinquishment of a cookie fscache: Pass the correct cancelled indications to fscache_op_complete() fscache, cachefiles: Fix checker warnings afs: Be more aggressive in retiring cached vnodes afs: Use the vnode ID uniquifier in the cache key not the aux data afs: Invalidate cache on server data change commit bca811a7fd5a5c1c0644926161c2843322ab74b3 Author: Dan Williams Date: Mon Apr 2 15:28:03 2018 -0700 nfit, address-range-scrub: add module option to skip initial ars After attempting to quickly retrieve known errors the kernel proceeds to kick off a long running ARS. Add a module option to disable this behavior at initialization time, or at new region discovery time. Otherwise, ARS can be started manually regardless of the state of this setting. Co-developed-by: Dave Jiang Signed-off-by: Dave Jiang Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bc6ba8085842164f2a8dc2e78e23a7167872abbe Author: Dan Williams Date: Thu Apr 5 16:18:55 2018 -0700 nfit, address-range-scrub: rework and simplify ARS state machine ARS is an operation that can take 10s to 100s of seconds to find media errors that should rarely be present. If the platform crashes due to media errors in persistent memory, the expectation is that the BIOS will report those known errors in a 'short' ARS request. A 'short' ARS request asks platform firmware to return an ARS payload with all known errors, but without issuing a 'long' scrub. At driver init a short request is issued to all PMEM ranges before registering regions. Then, in the background, a long ARS is scheduled for each region. The ARS implementation is simplified to centralize ARS completion work in the ars_complete() helper. The timeout is removed since there is no facility to cancel ARS, and this otherwise arranges for system init to never be blocked waiting for a 'long' ARS. The ars_state flags are used to coordinate ARS requests from driver init, ARS requests from userspace, and ARS requests in response to media error notifications. Given that there is no notification of ARS completion the implementation still needs to poll. It backs off exponentially to a maximum poll period of 30 minutes. Suggested-by: Toshi Kani Co-developed-by: Dave Jiang Signed-off-by: Dave Jiang Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 482 +++++++++++++++++++++-------------------------- drivers/acpi/nfit/nfit.h | 4 +- 2 files changed, 218 insertions(+), 268 deletions(-) commit 459d0ddb079c869c986e1bb871c91564a4b8ccfe Author: Dan Williams Date: Thu Apr 5 01:25:02 2018 -0700 nfit, address-range-scrub: determine one platform max_ars value acpi_nfit_query_poison() is awkward in that it requires an nfit_spa argument in order to determine what max_ars value to use. Instead probe for the minimum max_ars across all scrub-capable ranges in the system and drop the nfit_spa argument. This enables a larger rework / simplification of the ARS state machine whereby the status can be retrieved once and then iterated over all address ranges to reap completions. Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 78 +++++++++++++++++++++++++----------------------- drivers/acpi/nfit/nfit.h | 2 +- 2 files changed, 41 insertions(+), 39 deletions(-) commit 3013e17381b8ba9adc5b0fb424128ea692205300 Author: Oliver O'Halloran Date: Fri Apr 6 15:21:16 2018 +1000 powerpc/powernv: Create platform devs for nvdimm buses Scan the devicetree for an nvdimm-bus compatible and create a platform device for them. Signed-off-by: Oliver O'Halloran Signed-off-by: Dan Williams arch/powerpc/platforms/powernv/opal.c | 3 +++ 1 file changed, 3 insertions(+) commit ddc141e5c6be3c5f3f900ba306fe7c7fdb4258cc Author: Oliver O'Halloran Date: Fri Apr 6 15:21:15 2018 +1000 doc/devicetree: Persistent memory region bindings Add device-tree binding documentation for the nvdimm region driver. Cc: devicetree@vger.kernel.org Signed-off-by: Oliver O'Halloran Acked-by: Michael Ellerman Signed-off-by: Dan Williams .../devicetree/bindings/pmem/pmem-region.txt | 65 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 66 insertions(+) commit 7171976089528cb3d057a6fb288e7f8f89ab7f68 Author: Oliver O'Halloran Date: Fri Apr 6 15:21:14 2018 +1000 libnvdimm: Add device-tree based driver This patch adds peliminary device-tree bindings for persistent memory regions. The driver registers a libnvdimm bus for each pmem-region node and each address range under the node is converted to a region within that bus. Signed-off-by: Oliver O'Halloran Signed-off-by: Dan Williams MAINTAINERS | 7 +++ drivers/nvdimm/Kconfig | 10 ++++ drivers/nvdimm/Makefile | 1 + drivers/nvdimm/of_pmem.c | 119 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 137 insertions(+) commit 1ff19f487a7e55bf3cebc96ea2a9a38d66fb7db7 Author: Oliver O'Halloran Date: Fri Apr 6 15:21:13 2018 +1000 libnvdimm: Add of_node to region and bus descriptors We want to be able to cross reference the region and bus devices with the device tree node that they were spawned from. libNVDIMM handles creating the actual devices for these internally, so we need to pass in a pointer to the relevant node in the descriptor. Signed-off-by: Oliver O'Halloran Acked-by: Dan Williams Acked-by: Balbir Singh Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 1 + drivers/nvdimm/region_devs.c | 1 + include/linux/libnvdimm.h | 3 +++ 3 files changed, 5 insertions(+) commit 60ce0f936bdad595a5cfc50b6e347a7de183ab59 Author: Dan Williams Date: Sat Apr 7 07:47:10 2018 -0700 libnvdimm, region: quiet region probe The message about constraining number of online cpus to be less than or equal to ND_MAX_LANES (256) is only useful for block-aperture configurations and BTT. Make it debug since it is only relevant when debugging performance. Signed-off-by: Dan Williams drivers/nvdimm/region.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e15dc99dbb9cf99f6432e8e3c0b3a8f7a3403a86 Author: Takashi Iwai Date: Sat Apr 7 11:48:58 2018 +0200 ALSA: pcm: Fix endless loop for XRUN recovery in OSS emulation The commit 02a5d6925cd3 ("ALSA: pcm: Avoid potential races between OSS ioctls and read/write") split the PCM preparation code to a locked version, and it added a sanity check of runtime->oss.prepare flag along with the change. This leaded to an endless loop when the stream gets XRUN: namely, snd_pcm_oss_write3() and co call snd_pcm_oss_prepare() without setting runtime->oss.prepare flag and the loop continues until the PCM state reaches to another one. As the function is supposed to execute the preparation unconditionally, drop the invalid state check there. The bug was triggered by syzkaller. Fixes: 02a5d6925cd3 ("ALSA: pcm: Avoid potential races between OSS ioctls and read/write") Reported-by: syzbot+150189c103427d31a053@syzkaller.appspotmail.com Reported-by: syzbot+7e3f31a52646f939c052@syzkaller.appspotmail.com Reported-by: syzbot+4f2016cf5185da7759dc@syzkaller.appspotmail.com Cc: Signed-off-by: Takashi Iwai sound/core/oss/pcm_oss.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b580fbfff13b01fa79a0760cbb6386f33bc9e10b Author: Takashi Iwai Date: Tue Apr 3 17:45:19 2018 +0200 ALSA: usb-audio: Add sanity checks in UAC3 clock parsers The UAC3 clock parser codes lack of the sanity checks for malformed descriptors like UAC2 parser does. Without it, the driver may lead to a potential crash. Fixes: 9a2fe9b801f5 ("ALSA: usb: initial USB Audio Device Class 3.0 support") Tested-by: Ruslan Bilovol Reviewed-by: Ruslan Bilovol Signed-off-by: Takashi Iwai sound/usb/clock.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f5d76e9c40fd8791202d31c66a63f6f7ebbb8dcb Author: Takashi Iwai Date: Wed Apr 4 07:18:44 2018 +0200 ALSA: usb-audio: More strict sanity checks for clock parsers The sanity checks introduced for malformed descriptors loosely check the given descriptor size, although the size greater than the defined description is invalid. It was due to a concern of any funky firmware in the actual products. But this doesn't look hitting, and any sane products must have the defined descriptors. So in this patch, we make the validators more strict, allowing only with the defined descriptor sizes. The value in clock selector validator is corrected from 5 to 7 to count the two unlisted fields after baCSourceID[]. Suggested-by: Ruslan Bilovol Reviewed-by: Ruslan Bilovol Signed-off-by: Takashi Iwai sound/usb/clock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f7645bd636d06f64f3eadb63cf1c8145219fdc58 Author: Takashi Iwai Date: Tue Apr 3 17:34:57 2018 +0200 ALSA: usb-audio: Refactor clock finder helpers There are lots of open-coded functions to find a clock source, selector and multiplier. Now there are both v2 and v3, so six variants. This patch refactors the code to use a common helper for the main loop, and define each validator function for each target. There is no functional change. Fixes: 9a2fe9b801f5 ("ALSA: usb: initial USB Audio Device Class 3.0 support") Reviewed-by: Ruslan Bilovol Signed-off-by: Takashi Iwai sound/usb/clock.c | 127 +++++++++++++++++++++++------------------------------- 1 file changed, 53 insertions(+), 74 deletions(-) commit b41d920acff8305b8a25a183a8e4d41b8975097d Author: Riku Voipio Date: Thu Apr 5 14:22:29 2018 +0300 kbuild: deb-pkg: split generating packaging and build Move debian/ directory generation out of builddeb to a new script, mkdebian. The package build commands are kept in builddeb, which is now an internal command called from debian/rules. With these changes in place, we can now use dpkg-buildpackage from deb-pkg and bindeb-pkg removing need for handrolled source/changes generation. This patch is based on the criticism of the current state of builddeb discussed on: https://patchwork.kernel.org/patch/9656403/ Signed-off-by: Riku Voipio Signed-off-by: Masahiro Yamada scripts/package/Makefile | 34 +++----- scripts/package/builddeb | 221 +---------------------------------------------- scripts/package/mkdebian | 189 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 200 insertions(+), 244 deletions(-) commit a73619a845d5625079cc1b3b820f44c899618388 Author: Masahiro Yamada Date: Fri Mar 30 13:15:26 2018 +0900 kbuild: use -fmacro-prefix-map to make __FILE__ a relative path The __FILE__ macro is used everywhere in the kernel to locate the file printing the log message, such as WARN_ON(), etc. If the kernel is built out of tree, this can be a long absolute path, like this: WARNING: CPU: 1 PID: 1 at /path/to/build/directory/arch/arm64/kernel/foo.c:... This is because Kbuild runs in the objtree instead of the srctree, then __FILE__ is expanded to a file path prefixed with $(srctree)/. Commit 9da0763bdd82 ("kbuild: Use relative path when building in a subdir of the source tree") improved this to some extent; $(srctree) becomes ".." if the objtree is a child of the srctree. For other cases of out-of-tree build, __FILE__ is still the absolute path. It also means the kernel image depends on where it was built. A brand-new option from GCC, -fmacro-prefix-map, solves this problem. If your compiler supports it, __FILE__ is the relative path from the srctree regardless of O= option. This provides more readable log and more reproducible builds. Please note __FILE__ is always an absolute path for external modules. Signed-off-by: Masahiro Yamada Makefile | 3 +++ 1 file changed, 3 insertions(+) commit 54a702f70589926acf687f0cd5df24d07230c80e Author: Masahiro Yamada Date: Fri Mar 23 22:04:39 2018 +0900 kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers GNU Make automatically deletes intermediate files that are updated in a chain of pattern rules. Example 1) %.dtb.o <- %.dtb.S <- %.dtb <- %.dts Example 2) %.o <- %.c <- %.c_shipped A couple of makefiles mark such targets as .PRECIOUS to prevent Make from deleting them, but the correct way is to use .SECONDARY. .SECONDARY Prerequisites of this special target are treated as intermediate files but are never automatically deleted. .PRECIOUS When make is interrupted during execution, it may delete the target file it is updating if the file was modified since make started. If you mark the file as precious, make will never delete the file if interrupted. Both can avoid deletion of intermediate files, but the difference is the behavior when Make is interrupted; .SECONDARY deletes the target, but .PRECIOUS does not. The use of .PRECIOUS is relatively rare since we do not want to keep partially constructed (possibly corrupted) targets. Another difference is that .PRECIOUS works with pattern rules whereas .SECONDARY does not. .PRECIOUS: $(obj)/%.lex.c works, but .SECONDARY: $(obj)/%.lex.c has no effect. However, for the reason above, I do not want to use .PRECIOUS which could cause obscure build breakage. The targets specified as .SECONDARY must be explicit. $(targets) contains all targets that need to include .*.cmd files. So, the intermediates you want to keep are mostly in there. Therefore, mark $(targets) as .SECONDARY. It means primary targets are also marked as .SECONDARY, but I do not see any drawback for this. I replaced some .SECONDARY / .PRECIOUS markers with 'targets'. This will make Kbuild search for non-existing .*.cmd files, but this is not a noticeable performance issue. Signed-off-by: Masahiro Yamada Acked-by: Frank Rowand Acked-by: Ingo Molnar arch/arc/boot/dts/Makefile | 2 -- arch/arm/crypto/Makefile | 2 +- arch/arm64/crypto/Makefile | 2 +- arch/sparc/vdso/Makefile | 4 +--- arch/x86/entry/vdso/Makefile | 4 +--- drivers/of/unittest-data/Makefile | 4 ---- scripts/Makefile.build | 10 +++++++--- scripts/Makefile.lib | 3 --- 8 files changed, 11 insertions(+), 20 deletions(-) commit 4fa8bc949de11c99ee2433c602d43f87c452f4f2 Author: Masahiro Yamada Date: Fri Mar 23 22:04:37 2018 +0900 kbuild: rename *-asn1.[ch] to *.asn1.[ch] Our convention is to distinguish file types by suffixes with a period as a separator. *-asn1.[ch] is a different pattern from other generated sources such as *.lex.c, *.tab.[ch], *.dtb.S, etc. More confusing, files with '-asn1.[ch]' are generated files, but '_asn1.[ch]' are checked-in files: net/netfilter/nf_conntrack_h323_asn1.c include/linux/netfilter/nf_conntrack_h323_asn1.h include/linux/sunrpc/gss_asn1.h Rename generated files to *.asn1.[ch] for consistency. Signed-off-by: Masahiro Yamada .gitignore | 2 +- Makefile | 2 +- crypto/Makefile | 10 +++++----- crypto/asymmetric_keys/Makefile | 24 ++++++++++++------------ crypto/asymmetric_keys/mscode_parser.c | 2 +- crypto/asymmetric_keys/pkcs7_parser.c | 2 +- crypto/asymmetric_keys/x509_cert_parser.c | 4 ++-- crypto/rsa_helper.c | 4 ++-- net/ipv4/netfilter/Makefile | 4 ++-- net/ipv4/netfilter/nf_nat_snmp_basic_main.c | 2 +- scripts/Makefile.build | 4 ++-- scripts/asn1_compiler.c | 2 +- 12 files changed, 31 insertions(+), 31 deletions(-) commit 3ca3273eaa509a6a17e33fc7d31714bfd9f65a38 Author: Masahiro Yamada Date: Fri Mar 23 22:04:36 2018 +0900 kbuild: clean up *-asn1.[ch] patterns from top-level Makefile Clean up these patterns from the top Makefile to omit 'clean-files' in each Makefile. Signed-off-by: Masahiro Yamada Makefile | 1 + crypto/Makefile | 2 -- crypto/asymmetric_keys/Makefile | 7 ------- net/ipv4/netfilter/Makefile | 1 - 4 files changed, 1 insertion(+), 10 deletions(-) commit 9ce285cfe3602d71485ac9582ebb8034e485a33c Author: Masahiro Yamada Date: Fri Mar 23 22:04:35 2018 +0900 .gitignore: move *-asn1.[ch] patterns to the top-level .gitignore These are common patterns where source files are parsed by the asn1_compiler. Signed-off-by: Masahiro Yamada .gitignore | 5 +---- crypto/.gitignore | 1 - crypto/asymmetric_keys/.gitignore | 1 - drivers/crypto/qat/qat_common/.gitignore | 1 - 4 files changed, 1 insertion(+), 7 deletions(-) commit a7f924190924783d3e291624c4f0c3f51481ae2c Author: Masahiro Yamada Date: Fri Mar 23 22:04:34 2018 +0900 kbuild: add %.dtb.S and %.dtb to 'targets' automatically Another common pattern that consists of chained commands is to compile a DTB as binary data into the kernel image or a module. It is used in several places in the source tree. Support it in the core Makefile. $(call if_changed,dt_S_dtb) is more suitable than $(call cmd,dt_S_dtb) in case cmd_dt_S_dtb is changed in the future. Signed-off-by: Masahiro Yamada Acked-by: Frank Rowand drivers/of/unittest-data/Makefile | 2 -- scripts/Makefile.build | 4 +++- scripts/Makefile.lib | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit b23d1a241f4eb44ae55785c9b65274717c8e2c1e Author: Masahiro Yamada Date: Fri Mar 23 22:04:33 2018 +0900 kbuild: add %.lex.c and %.tab.[ch] to 'targets' automatically Files generated by if_changed* must be added to 'targets' to include *.cmd files. Otherwise, they would be regenerated every time. The build system automatically adds objects to 'targets' where appropriate, such as obj-y, extra-y, etc. but does nothing for intermediate files. So, each Makefile needs to add them by itself. There are some common cases where objects are generated by chained rules. Lexers and parsers are compiled like follows: %.lex.o <- %.lex.c <- %.l %.tab.o <- %.tab.c <- %.y They are common patterns, so it is reasonable to take care of them in the core Makefile instead of requiring each Makefile to do so. At this moment, you cannot delete 'target += zconf.lex.c' in the Kconfig Makefile because zconf.lex.c is included from zconf.tab.c instead of being compiled separately. It should be deleted after Kconfig is more refactored. Signed-off-by: Masahiro Yamada Acked-by: Frank Rowand scripts/Makefile.build | 11 +++++++++++ scripts/dtc/Makefile | 3 --- scripts/genksyms/Makefile | 2 -- scripts/kconfig/Makefile | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) commit 833e622459432ed5bc7cc58ffadb91b59c863a3a Author: Masahiro Yamada Date: Fri Mar 23 22:04:32 2018 +0900 genksyms: generate lexer and parser during build instead of shipping Now that the kernel build supports flex and bison, remove the _shipped files and generate them during the build instead. There are no more shipped lexer and parser, so I ripped off the rules in scripts/Malefile.lib that were used for REGENERATE_PARSERS. The genksyms parser has ambiguous grammar, which would emit warnings: scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr] scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr] They are normally suppressed, but displayed when W=1 is given. Signed-off-by: Masahiro Yamada scripts/Makefile.lib | 24 +- scripts/genksyms/Makefile | 27 + scripts/genksyms/lex.lex.c_shipped | 2291 -------------------------------- scripts/genksyms/parse.tab.c_shipped | 2394 ---------------------------------- scripts/genksyms/parse.tab.h_shipped | 119 -- 5 files changed, 30 insertions(+), 4825 deletions(-) commit 9a8dfb394c046742b2ac7444ba42272e11e9989d Author: Masahiro Yamada Date: Fri Mar 23 22:04:31 2018 +0900 kbuild: clean up *.lex.c and *.tab.[ch] patterns from top-level Makefile Files suffixed by .lex.c, .tab.[ch] are generated lexers, parsers, respectively. Clean them up globally from the top Makefile. Some of the final host programs those lexer/parser are linked into are necessary for building external modules, but the intermediates are unneeded. They can be cleaned away by 'make clean' instead of 'make mrproper'. Signed-off-by: Masahiro Yamada Acked-by: Frank Rowand Makefile | 1 + scripts/dtc/Makefile | 6 ++---- scripts/genksyms/Makefile | 2 -- scripts/kconfig/Makefile | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) commit 598893002745690e57692ca5bf6fb9ff04604a1b Author: Masahiro Yamada Date: Fri Mar 23 22:04:30 2018 +0900 .gitignore: move *.lex.c *.tab.[ch] patterns to the top-level .gitignore These patterns are common to host programs that require lexer and parser. Move them to the top .gitignore. Signed-off-by: Masahiro Yamada Acked-by: Frank Rowand .gitignore | 2 ++ scripts/dtc/.gitignore | 3 --- scripts/genksyms/.gitignore | 3 --- scripts/kconfig/.gitignore | 3 --- 4 files changed, 2 insertions(+), 9 deletions(-) commit 63185b46cdb36905d585c73cc4730fec44cdf55d Author: Robin Jarry Date: Mon Feb 26 19:41:47 2018 +0100 kbuild: use HOSTLDFLAGS for single .c executables When compiling executables from a single .c file, the linker is also invoked. Pass the HOSTLDFLAGS like for other linker commands. Signed-off-by: Robin Jarry Cc: Josh Poimboeuf Cc: Ingo Molnar Signed-off-by: Masahiro Yamada scripts/Makefile.host | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f8672201b7e7ed4f5f6c3cf6dcd080648580582 Author: Dan Williams Date: Fri Apr 6 16:37:21 2018 -0700 libnvdimm, namespace: use a safe lookup for dimm device name The following NULL dereference results from incorrectly assuming that ndd is valid in this print: struct nvdimm_drvdata *ndd = to_ndd(&nd_region->mapping[i]); /* * Give up if we don't find an instance of a uuid at each * position (from 0 to nd_region->ndr_mappings - 1), or if we * find a dimm with two instances of the same uuid. */ dev_err(&nd_region->dev, "%s missing label for %pUb\n", dev_name(ndd->dev), nd_label->uuid); BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 IP: nd_region_register_namespaces+0xd67/0x13c0 [libnvdimm] PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 43 PID: 673 Comm: kworker/u609:10 Not tainted 4.16.0-rc4+ #1 [..] RIP: 0010:nd_region_register_namespaces+0xd67/0x13c0 [libnvdimm] [..] Call Trace: ? devres_add+0x2f/0x40 ? devm_kmalloc+0x52/0x60 ? nd_region_activate+0x9c/0x320 [libnvdimm] nd_region_probe+0x94/0x260 [libnvdimm] ? kernfs_add_one+0xe4/0x130 nvdimm_bus_probe+0x63/0x100 [libnvdimm] Switch to using the nvdimm device directly. Fixes: 0e3b0d123c8f ("libnvdimm, namespace: allow multiple pmem...") Cc: Reported-by: Dave Jiang Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c31898c8c711f2bbbcaebe802a55827e288d875a Author: Dan Williams Date: Fri Apr 6 11:25:38 2018 -0700 libnvdimm, dimm: fix dpa reservation vs uninitialized label area At initialization time the 'dimm' driver caches a copy of the memory device's label area and reserves address space for each of the namespaces defined. However, as can be seen below, the reservation occurs even when the index blocks are invalid: nvdimm nmem0: nvdimm_init_config_data: len: 131072 rc: 0 nvdimm nmem0: config data size: 131072 nvdimm nmem0: __nd_label_validate: nsindex0 labelsize 1 invalid nvdimm nmem0: __nd_label_validate: nsindex1 labelsize 1 invalid nvdimm nmem0: : pmem-6025e505: 0x1000000000 @ 0xf50000000 reserve <-- bad Gate dpa reservation on the presence of valid index blocks. Cc: Fixes: 4a826c83db4e ("libnvdimm: namespace indices: read and validate") Reported-by: Krzysztof Rusocki Signed-off-by: Dan Williams drivers/nvdimm/dimm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit f605ba97fb80522656c7dce9825a908f1e765b57 Merge: 016c6f2 da91471 Author: Linus Torvalds Date: Fri Apr 6 19:44:27 2018 -0700 Merge tag 'vfio-v4.17-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Adopt iommu_unmap_fast() interface to type1 backend (Suravee Suthikulpanit) - mdev sample driver fixup (Shunyong Yang) - More efficient PFN mapping handling in type1 backend (Jason Cai) - VFIO device ioeventfd interface (Alex Williamson) - Tag new vfio-platform sub-maintainer (Alex Williamson) * tag 'vfio-v4.17-rc1' of git://github.com/awilliam/linux-vfio: MAINTAINERS: vfio/platform: Update sub-maintainer vfio/pci: Add ioeventfd support vfio/pci: Use endian neutral helpers vfio/pci: Pull BAR mapping setup from read-write path vfio/type1: Improve memory pinning process for raw PFN mapping vfio-mdev/samples: change RDI interrupt condition vfio/type1: Adopt fast IOTLB flush interface when unmap IOVAs commit 016c6f25d11af187f93324d5c591f5d6f63dfb75 Merge: 3c0d551 dc32bb6 Author: Linus Torvalds Date: Fri Apr 6 19:21:41 2018 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull fw_cfg, vhost updates from Michael Tsirkin: "This cleans up the qemu fw cfg device driver. On top of this, vmcore is dumped there on crash to help debugging with kASLR enabled. Also included are some fixes in vhost" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost: add vsock compat ioctl vhost: fix vhost ioctl signature to build with clang fw_cfg: write vmcoreinfo details crash: export paddr_vmcoreinfo_note() fw_cfg: add DMA register fw_cfg: add a public uapi header fw_cfg: handle fw_cfg_read_blob() error fw_cfg: remove inline from fw_cfg_read_blob() fw_cfg: fix sparse warnings around FW_CFG_FILE_DIR read fw_cfg: fix sparse warning reading FW_CFG_ID fw_cfg: fix sparse warnings with fw_cfg_file fw_cfg: fix sparse warnings in fw_cfg_sel_endianness() ptr_ring: fix build commit 3c0d551e02b2590fa71a1354f2f1994551a33315 Merge: 19fd08b 5f76441 Author: Linus Torvalds Date: Fri Apr 6 18:31:06 2018 -0700 Merge tag 'pci-v4.17-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: - move pci_uevent_ers() out of pci.h (Michael Ellerman) - skip ASPM common clock warning if BIOS already configured it (Sinan Kaya) - fix ASPM Coverity warning about threshold_ns (Gustavo A. R. Silva) - remove last user of pci_get_bus_and_slot() and the function itself (Sinan Kaya) - add decoding for 16 GT/s link speed (Jay Fang) - add interfaces to get max link speed and width (Tal Gilboa) - add pcie_bandwidth_capable() to compute max supported link bandwidth (Tal Gilboa) - add pcie_bandwidth_available() to compute bandwidth available to device (Tal Gilboa) - add pcie_print_link_status() to log link speed and whether it's limited (Tal Gilboa) - use PCI core interfaces to report when device performance may be limited by its slot instead of doing it in each driver (Tal Gilboa) - fix possible cpqphp NULL pointer dereference (Shawn Lin) - rescan more of the hierarchy on ACPI hotplug to fix Thunderbolt/xHCI hotplug (Mika Westerberg) - add support for PCI I/O port space that's neither directly accessible via CPU in/out instructions nor directly mapped into CPU physical memory space. This is fairly intrusive and includes minor changes to interfaces used for I/O space on most platforms (Zhichang Yuan, John Garry) - add support for HiSilicon Hip06/Hip07 LPC I/O space (Zhichang Yuan, John Garry) - use PCI_EXP_DEVCTL2_COMP_TIMEOUT in rapidio/tsi721 (Bjorn Helgaas) - remove possible NULL pointer dereference in of_pci_bus_find_domain_nr() (Shawn Lin) - report quirk timings with dev_info (Bjorn Helgaas) - report quirks that take longer than 10ms (Bjorn Helgaas) - add and use Altera Vendor ID (Johannes Thumshirn) - tidy Makefiles and comments (Bjorn Helgaas) - don't set up INTx if MSI or MSI-X is enabled to align cris, frv, ia64, and mn10300 with x86 (Bjorn Helgaas) - move pcieport_if.h to drivers/pci/pcie/ to encapsulate it (Frederick Lawler) - merge pcieport_if.h into portdrv.h (Bjorn Helgaas) - move workaround for BIOS PME issue from portdrv to PCI core (Bjorn Helgaas) - completely disable portdrv with "pcie_ports=compat" (Bjorn Helgaas) - remove portdrv link order dependency (Bjorn Helgaas) - remove support for unused VC portdrv service (Bjorn Helgaas) - simplify portdrv feature permission checking (Bjorn Helgaas) - remove "pcie_hp=nomsi" parameter (use "pci=nomsi" instead) (Bjorn Helgaas) - remove unnecessary "pcie_ports=auto" parameter (Bjorn Helgaas) - use cached AER capability offset (Frederick Lawler) - don't enable DPC if BIOS hasn't granted AER control (Mika Westerberg) - rename pcie-dpc.c to dpc.c (Bjorn Helgaas) - use generic pci_mmap_resource_range() instead of powerpc and xtensa arch-specific versions (David Woodhouse) - support arbitrary PCI host bridge offsets on sparc (Yinghai Lu) - remove System and Video ROM reservations on sparc (Bjorn Helgaas) - probe for device reset support during enumeration instead of runtime (Bjorn Helgaas) - add ACS quirk for Ampere (née APM) root ports (Feng Kan) - add function 1 DMA alias quirk for Marvell 88SE9220 (Thomas Vincent-Cross) - protect device restore with device lock (Sinan Kaya) - handle failure of FLR gracefully (Sinan Kaya) - handle CRS (config retry status) after device resets (Sinan Kaya) - skip various config reads for SR-IOV VFs as an optimization (KarimAllah Ahmed) - consolidate VPD code in vpd.c (Bjorn Helgaas) - add Tegra dependency on PCI_MSI_IRQ_DOMAIN (Arnd Bergmann) - add DT support for R-Car r8a7743 (Biju Das) - fix a PCI_EJECT vs PCI_BUS_RELATIONS race condition in Hyper-V host bridge driver that causes a general protection fault (Dexuan Cui) - fix Hyper-V host bridge hang in MSI setup on 1-vCPU VMs with SR-IOV (Dexuan Cui) - fix Hyper-V host bridge hang when ejecting a VF before setting up MSI (Dexuan Cui) - make several structures static (Fengguang Wu) - increase number of MSI IRQs supported by Synopsys DesignWare bridges from 32 to 256 (Gustavo Pimentel) - implemented multiplexed IRQ domain API and remove obsolete MSI IRQ API from DesignWare drivers (Gustavo Pimentel) - add Tegra power management support (Manikanta Maddireddy) - add Tegra loadable module support (Manikanta Maddireddy) - handle 64-bit BARs correctly in endpoint support (Niklas Cassel) - support optional regulator for HiSilicon STB (Shawn Guo) - use regulator bulk API for Qualcomm apq8064 (Srinivas Kandagatla) - support power supplies for Qualcomm msm8996 (Srinivas Kandagatla) * tag 'pci-v4.17-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (123 commits) MAINTAINERS: Add John Garry as maintainer for HiSilicon LPC driver HISI LPC: Add ACPI support ACPI / scan: Do not enumerate Indirect IO host children ACPI / scan: Rename acpi_is_serial_bus_slave() for more general use HISI LPC: Support the LPC host on Hip06/Hip07 with DT bindings of: Add missing I/O range exception for indirect-IO devices PCI: Apply the new generic I/O management on PCI IO hosts PCI: Add fwnode handler as input param of pci_register_io_range() PCI: Remove __weak tag from pci_register_io_range() MAINTAINERS: Add missing /drivers/pci/cadence directory entry fm10k: Report PCIe link properties with pcie_print_link_status() net/mlx5e: Use pcie_bandwidth_available() to compute bandwidth net/mlx5: Report PCIe link properties with pcie_print_link_status() net/mlx4_core: Report PCIe link properties with pcie_print_link_status() PCI: Add pcie_print_link_status() to log link speed and whether it's limited PCI: Add pcie_bandwidth_available() to compute bandwidth available to device misc: pci_endpoint_test: Handle 64-bit BARs properly PCI: designware-ep: Make dw_pcie_ep_reset_bar() handle 64-bit BARs properly PCI: endpoint: Make sure that BAR_5 does not have 64-bit flag set when clearing PCI: endpoint: Make epc->ops->clear_bar()/pci_epc_clear_bar() take struct *epf_bar ... commit 19fd08b85bc7e0502b55cd726f466df82ee7e777 Merge: 28da7be efc365e Author: Linus Torvalds Date: Fri Apr 6 17:35:43 2018 -0700 Merge tag 'for-linus-unmerged' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "Doug and I are at a conference next week so if another PR is sent I expect it to only be bug fixes. Parav noted yesterday that there are some fringe case behavior changes in his work that he would like to fix, and I see that Intel has a number of rc looking patches for HFI1 they posted yesterday. Parav is again the biggest contributor by patch count with his ongoing work to enable container support in the RDMA stack, followed by Leon doing syzkaller inspired cleanups, though most of the actual fixing went to RC. There is one uncomfortable series here fixing the user ABI to actually work as intended in 32 bit mode. There are lots of notes in the commit messages, but the basic summary is we don't think there is an actual 32 bit kernel user of drivers/infiniband for several good reasons. However we are seeing people want to use a 32 bit user space with 64 bit kernel, which didn't completely work today. So in fixing it we required a 32 bit rxe user to upgrade their userspace. rxe users are still already quite rare and we think a 32 bit one is non-existing. - Fix RDMA uapi headers to actually compile in userspace and be more complete - Three shared with netdev pull requests from Mellanox: * 7 patches, mostly to net with 1 IB related one at the back). This series addresses an IRQ performance issue (patch 1), cleanups related to the fix for the IRQ performance problem (patches 2-6), and then extends the fragmented completion queue support that already exists in the net side of the driver to the ib side of the driver (patch 7). * Mostly IB, with 5 patches to net that are needed to support the remaining 10 patches to the IB subsystem. This series extends the current 'representor' framework when the mlx5 driver is in switchdev mode from being a netdev only construct to being a netdev/IB dev construct. The IB dev is limited to raw Eth queue pairs only, but by having an IB dev of this type attached to the representor for a switchdev port, it enables DPDK to work on the switchdev device. * All net related, but needed as infrastructure for the rdma driver - Updates for the hns, i40iw, bnxt_re, cxgb3, cxgb4, hns drivers - SRP performance updates - IB uverbs write path cleanup patch series from Leon - Add RDMA_CM support to ib_srpt. This is disabled by default. Users need to set the port for ib_srpt to listen on in configfs in order for it to be enabled (/sys/kernel/config/target/srpt/discovery_auth/rdma_cm_port) - TSO and Scatter FCS support in mlx4 - Refactor of modify_qp routine to resolve problems seen while working on new code that is forthcoming - More refactoring and updates of RDMA CM for containers support from Parav - mlx5 'fine grained packet pacing', 'ipsec offload' and 'device memory' user API features - Infrastructure updates for the new IOCTL interface, based on increased usage - ABI compatibility bug fixes to fully support 32 bit userspace on 64 bit kernel as was originally intended. See the commit messages for extensive details - Syzkaller bugs and code cleanups motivated by them" * tag 'for-linus-unmerged' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (199 commits) IB/rxe: Fix for oops in rxe_register_device on ppc64le arch IB/mlx5: Device memory mr registration support net/mlx5: Mkey creation command adjustments IB/mlx5: Device memory support in mlx5_ib net/mlx5: Query device memory capabilities IB/uverbs: Add device memory registration ioctl support IB/uverbs: Add alloc/free dm uverbs ioctl support IB/uverbs: Add device memory capabilities reporting IB/uverbs: Expose device memory capabilities to user RDMA/qedr: Fix wmb usage in qedr IB/rxe: Removed GID add/del dummy routines RDMA/qedr: Zero stack memory before copying to user space IB/mlx5: Add ability to hash by IPSEC_SPI when creating a TIR IB/mlx5: Add information for querying IPsec capabilities IB/mlx5: Add IPsec support for egress and ingress {net,IB}/mlx5: Add ipsec helper IB/mlx5: Add modify_flow_action_esp verb IB/mlx5: Add implementation for create and destroy action_xfrm IB/uverbs: Introduce ESP steering match filter IB/uverbs: Add modify ESP flow_action ... commit 28da7be5ebc096ada5e6bc526c623bdd8c47800a Merge: 9eda2d2 41c0e93 Author: Linus Torvalds Date: Fri Apr 6 17:20:14 2018 -0700 Merge tag 'mailbox-v4.17' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - New Hi3660 mailbox driver - Fix TEGRA Kconfig warning - Broadcom: use dma_pool_zalloc instead of dma_pool_alloc+memset * tag 'mailbox-v4.17' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: Add support for Hi3660 mailbox dt-bindings: mailbox: Introduce Hi3660 controller binding mailbox: tegra: relax TEGRA_HSP_MBOX Kconfig dependencies maillbox: bcm-flexrm-mailbox: Use dma_pool_zalloc() commit e875d33d7f06d1107c057d12bb5aaba84738e418 Author: Tobin C. Harding Date: Mon Feb 26 09:27:59 2018 +1100 MAINTAINERS: Update LEAKING_ADDRESSES MAINTAINERS is out of date for leaking_addresses.pl. There is now a tree on kernel.org for development of this script. We have a second maintainer now, thanks Tycho. Development of this scripts was started on kernel-hardening mailing list so let's keep it there. Update maintainer details; Add mailing list, kernel.org hosted tree, and second maintainer. Signed-off-by: Tobin C. Harding MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) commit a5075e6226c42a8e64ea1b862eec7747dc46cb32 Author: Dan Haab Date: Thu Mar 29 16:21:47 2018 -0600 MIPS: BCM47XX: Use standard reset button for Luxul XWR-1750 The original patch submitted for support of the Luxul XWR-1750 used a non-standard button handler for the reset button. This patch will allow using the standard KEY_RESTART Signed-off-by: Dan Haab Cc: Ralf Baechle Cc: Hauke Mehrtens Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18981/ Signed-off-by: James Hogan arch/mips/bcm47xx/buttons.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c73dff595f259736a90f52b38cf5798abeae4a3c Author: Tobin C. Harding Date: Fri Mar 2 08:49:55 2018 +1100 leaking_addresses: check if file name contains address Sometimes files may be created by using output from printk. As the scan traverses the directory tree we should parse each path name and check if it is leaking an address. Add check for leaking address on each path name. Suggested-by: Tycho Andersen Acked-by: Tycho Andersen Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 2306a67745ebdf3f98bc954248b74a3f1d57cdc2 Author: Tobin C. Harding Date: Fri Mar 2 08:42:59 2018 +1100 leaking_addresses: explicitly name variable used in regex Currently sub routine may_leak_address() is checking regex against Perl special variable $_ which is _fortunately_ being set correctly in a loop before this sub routine is called. We already have declared a variable to hold this value '$line' we should use it. Use $line in regex match instead of implicit $_ Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34827374492580b27c3cba29d493dab28c8c25d3 Author: Tobin C. Harding Date: Tue Feb 27 15:15:34 2018 +1100 leaking_addresses: remove version number We have git now, we don't need a version number. This was originally added because leaking_addresses.pl shamelessly (and mindlessly) copied checkpatch.pl Remove version number from script. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 2 -- 1 file changed, 2 deletions(-) commit 2ad742939283ed0613be654ad0aaf29b797f9905 Author: Tobin C. Harding Date: Tue Feb 27 14:14:24 2018 +1100 leaking_addresses: skip '/proc/1/syscall' The pointers listed in /proc/1/syscall are user pointers, and negative syscall args will show up like kernel addresses. For example /proc/31808/syscall: 0 0x3 0x55b107a38180 0x2000 0xffffffffffffffb0 \ 0x55b107a302d0 0x55b107a38180 0x7fffa313b8e8 0x7ff098560d11 Skip parsing /proc/1/syscall Suggested-by: Tycho Andersen Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 1 + 1 file changed, 1 insertion(+) commit 472c9e1085f20de71fc482500c8f1e4e45dff651 Author: Tobin C. Harding Date: Tue Feb 27 15:02:57 2018 +1100 leaking_addresses: skip all /proc/PID except /proc/1 When the system is idle it is likely that most files under /proc/PID will be identical for various processes. Scanning _all_ the PIDs under /proc is unnecessary and implies that we are thoroughly scanning /proc. This is _not_ the case because there may be ways userspace can trigger creation of /proc files that leak addresses but were not present during a scan. For these two reasons we should exclude all PID directories under /proc except '1/' Exclude all /proc/PID except /proc/1. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5e4bac34edc7829b4a0749e3870d4a171c1f036f Author: Tobin C. Harding Date: Mon Feb 19 13:23:44 2018 +1100 leaking_addresses: cache architecture name Currently we are repeatedly calling `uname -m`. This is causing the script to take a long time to run (more than 10 seconds to parse /proc/kallsyms). We can use Perl state variables to cache the result of the first call to `uname -m`. With this change in place the script scans the whole kernel in under a minute. Cache machine architecture in state variable. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b401f56f33bf551304cc4ca4f503863ee6ac7787 Author: Tobin C. Harding Date: Mon Feb 19 11:03:37 2018 +1100 leaking_addresses: simplify path skipping Currently script has multiple configuration arrays. This is confusing, evident by the fact that a bunch of the entries are in the wrong place. We can simplify the code by just having a single array for absolute paths to skip and a single array for file names to skip wherever they appear in the scanned directory tree. There are also currently multiple subroutines to handle the different arrays, we can reduce these to a single subroutine also. Simplify the path skipping code. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 90 ++++++++++++++------------------------------ 1 file changed, 29 insertions(+), 61 deletions(-) commit e2858caddc71f61521254a5359d17d058d6dda08 Author: Tobin C. Harding Date: Mon Feb 19 10:22:15 2018 +1100 leaking_addresses: do not parse binary files Currently script parses binary files. Since we are scanning for readable kernel addresses there is no need to parse binary files. We can use Perl to check if file is binary and skip parsing it if so. Do not parse binary files. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 4 ++++ 1 file changed, 4 insertions(+) commit 1410fe4eea22959bd31c05e4c1846f1718300bde Author: Tobin C. Harding Date: Mon Jan 29 15:00:16 2018 +1100 leaking_addresses: add 32-bit support Currently script only supports x86_64 and ppc64. It would be nice to be able to scan 32-bit machines also. We can add support for 32-bit architectures by modifying how we check for false positives, taking advantage of the page offset used by the kernel, and using the correct regular expression. Support for 32-bit machines is enabled by the observation that the kernel addresses on 32-bit machines are larger [in value] than the page offset. We can use this to filter false positives when scanning the kernel for leaking addresses. Programmatic determination of the running architecture is not immediately obvious (current 32-bit machines return various strings from `uname -m`). We therefore provide a flag to enable scanning of 32-bit kernels. Also we can check the kernel config file for the offset and if not found default to 0xc0000000. A command line option to parse in the page offset is also provided. We do automatically detect architecture if running on ix86. Add support for 32-bit kernels. Add a command line option for page offset. Suggested-by: Kaiwan N Billimoria Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 93 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 82 insertions(+), 11 deletions(-) commit 5eb0da0568a241f72732eb2143538fb14879a52c Author: Tobin C. Harding Date: Mon Jan 29 14:33:49 2018 +1100 leaking_addresses: add is_arch() wrapper subroutine Currently there is duplicate code when checking the architecture type. We can remove the duplication by implementing a wrapper function is_arch(). Implement and use wrapper function is_arch(). Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 6efb7458280a8f5d4c1955324e9d8985e90a882b Author: Tobin C. Harding Date: Sat Jan 6 09:24:49 2018 +1100 leaking_addresses: use system command to get arch Currently script uses Perl to get the machine architecture. This can be erroneous since Perl uses the architecture of the machine that Perl was compiled on not the architecture of the running machine. We should use the systems `uname` command instead. Use `uname -m` instead of Perl to get the machine architecture. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2f042c93a138f87a2f85e80daa5dbab6bf138045 Author: Tobin C. Harding Date: Thu Dec 7 14:40:29 2017 +1100 leaking_addresses: add support for 5 page table levels Currently script only supports 4 page table levels because of the way the kernel address regular expression is crafted. We can do better than this. Using previously added support for kernel configuration options we can get the number of page table levels defined by CONFIG_PGTABLE_LEVELS. Using this value a correct regular expression can be crafted. This only supports 5 page tables on x86_64. Add support for 5 page table levels on x86_64. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit f9d2a42dacf96eb8a10259edafec0f66c9921d52 Author: Tobin C. Harding Date: Thu Dec 7 13:53:41 2017 +1100 leaking_addresses: add support for kernel config file Features that rely on the ability to get kernel configuration options are ready to be implemented in script. In preparation for this we can add support for kernel config options as a separate patch to ease review. Add support for locating and parsing kernel configuration file. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 66 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) commit 87e37588563da905a8506b8922cfba1d71382a64 Author: Tobin C. Harding Date: Thu Dec 7 12:33:21 2017 +1100 leaking_addresses: add range check for vsyscall memory Currently script checks only first and last address in the vsyscall memory range. We can do better than this. When checking for false positives against $match, we can convert $match to a hexadecimal value then check if it lies within the range of vsyscall addresses. Check whole range of vsyscall addresses when checking for false positive. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 15d60a35b8fe82363325494a2a7c49f26f9f5594 Author: Tobin C. Harding Date: Thu Dec 7 13:57:53 2017 +1100 leaking_addresses: indent dependant options A number of the command line options to script are dependant on the option --input-raw being set. If we indent these options it makes explicit this dependency. Indent options dependant on --input-raw. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 6145de836a5ead2732667ac76917f5c296599f5f Author: Tobin C. Harding Date: Thu Dec 7 13:54:48 2017 +1100 leaking_addresses: remove command examples Currently help output includes command examples. These were cute when we first started development of this script but are unnecessary. Remove command examples. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 11 ----------- 1 file changed, 11 deletions(-) commit 20cdfb5fc49550e66a972ed448e2dacb229aa5d1 Author: Tobin C. Harding Date: Thu Dec 7 12:10:44 2017 +1100 leaking_addresses: remove mention of kptr_restrict leaking_addresses.pl can be run with kptr_restrict==0 now, we don't need the comment about setting kptr_restrict any more. Remove comment suggesting setting kptr_restrict. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 3 --- 1 file changed, 3 deletions(-) commit 6d23dd9bbb2e71f1bc1bfbe77831e15cc505a995 Author: Tobin C. Harding Date: Wed Nov 22 10:14:45 2017 +1100 leaking_addresses: fix typo function not called Currently code uses a check against an undefined variable because the variable is a sub routine name and is not evaluated. Evaluate subroutine; add parenthesis to sub routine name. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e698aaf37f9fac419ac6c1867137cce83c90c80b Author: Tobias Regnery Date: Fri Apr 6 09:25:17 2018 +0200 pstore: fix crypto dependencies without compression Commit 58eb5b670747 ("pstore: fix crypto dependencies") fixed up the crypto dependencies but missed the case when no compression is selected. With CONFIG_PSTORE=y, CONFIG_PSTORE_COMPRESS=n and CONFIG_CRYPTO=m we see the following link error: fs/pstore/platform.o: In function `pstore_register': (.text+0x1b1): undefined reference to `crypto_has_alg' (.text+0x205): undefined reference to `crypto_alloc_base' fs/pstore/platform.o: In function `pstore_unregister': (.text+0x3b0): undefined reference to `crypto_destroy_tfm' Fix this by checking at compile-time if CONFIG_PSTORE_COMPRESS is enabled. Fixes: 58eb5b670747 ("pstore: fix crypto dependencies") Signed-off-by: Tobias Regnery Acked-by: Arnd Bergmann Signed-off-by: Kees Cook fs/pstore/platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9eda2d2dca830f0f8923b1f377d0fb70f576af1d Merge: 6ad11bd 6b6bc62 Author: Linus Torvalds Date: Fri Apr 6 15:39:26 2018 -0700 Merge tag 'selinux-pr-20180403' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull SELinux updates from Paul Moore: "A bigger than usual pull request for SELinux, 13 patches (lucky!) along with a scary looking diffstat. Although if you look a bit closer, excluding the usual minor tweaks/fixes, there are really only two significant changes in this pull request: the addition of proper SELinux access controls for SCTP and the encapsulation of a lot of internal SELinux state. The SCTP changes are the result of a multi-month effort (maybe even a year or longer?) between the SELinux folks and the SCTP folks to add proper SELinux controls. A special thanks go to Richard for seeing this through and keeping the effort moving forward. The state encapsulation work is a bit of janitorial work that came out of some early work on SELinux namespacing. The question of namespacing is still an open one, but I believe there is some real value in the encapsulation work so we've split that out and are now sending that up to you" * tag 'selinux-pr-20180403' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: wrap AVC state selinux: wrap selinuxfs state selinux: fix handling of uninitialized selinux state in get_bools/classes selinux: Update SELinux SCTP documentation selinux: Fix ltp test connect-syscall failure selinux: rename the {is,set}_enforcing() functions selinux: wrap global selinux state selinux: fix typo in selinux_netlbl_sctp_sk_clone declaration selinux: Add SCTP support sctp: Add LSM hooks sctp: Add ip option support security: Add support for SCTP security hooks netlabel: If PF_INET6, check sk_buff ip header version commit 839c42273617787318da7baf6151d553108f5e17 Author: Christophe JAILLET Date: Fri Apr 6 15:36:11 2018 -0700 Input: synaptics-rmi4 - fix an unchecked out of memory error path When extending the rmi_spi buffers, we must check that no out of memory error occurs, otherwise we may access data above the currently allocated memory. Propagate the error code returned by 'rmi_spi_manage_pools()' instead. Signed-off-by: Christophe JAILLET Reviewed-by: Andrew Duggan Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_spi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 6ad11bdd57ad31182850a54235f0e947cbfd5ad0 Merge: 69824bc ea841ba Author: Linus Torvalds Date: Fri Apr 6 15:01:25 2018 -0700 Merge tag 'audit-pr-20180403' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: "We didn't have anything to send for v4.16, but we're back with a little more than usual for v4.17. Eleven patches in total, most fall into the small fix category, but there are three non-trivial changes worth calling out: - the audit entry filter is being removed after deprecating it for quite a while (years of no one really using it because it turns out to be not very practical) - created our own version of "__mutex_owner()" because the locking folks were upset we were using theirs - improved our handling of kernel command line parameters to make them more forgiving - we fixed auditing of symlink operations Everything passes the audit-testsuite and as of a few minutes ago it merges well with your tree" * tag 'audit-pr-20180403' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: add refused symlink to audit_names audit: remove path param from link denied function audit: link denied should not directly generate PATH record audit: make ANOM_LINK obey audit_enabled and audit_dummy_context audit: do not panic on invalid boot parameter audit: track the owner of the command mutex ourselves audit: return on memory error to avoid null pointer dereference audit: bail before bug check if audit disabled audit: deprecate the AUDIT_FILTER_ENTRY filter audit: session ID should not set arch quick field pointer audit: update bugtracker and source URIs commit 69824bcc4b4e1427ac18a76057d592ec9028f2fe Merge: 3b54765 58eb5b67 Author: Linus Torvalds Date: Fri Apr 6 14:59:01 2018 -0700 Merge tag 'pstore-v4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: "This cycle was almost entirely improvements to the pstore compression options, noted below: - Add lz4hc and 842 to pstore compression options (Geliang Tang) - Refactor to use crypto compression API (Geliang Tang) - Fix up Kconfig dependencies for compression (Arnd Bergmann) - Allow for run-time compression selection - Remove stack VLA usage" * tag 'pstore-v4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: fix crypto dependencies pstore: Use crypto compress API pstore/ram: Do not use stack VLA for parity workspace pstore: Select compression at runtime pstore: Avoid size casts for 842 compression pstore: Add lz4hc and 842 compression support commit 3b54765cca23152ec0cc254b75c877c10f6e2870 Merge: 3fd14cd 97b1255 Author: Linus Torvalds Date: Fri Apr 6 14:19:26 2018 -0700 Merge branch 'akpm' (patches from Andrew) Merge updates from Andrew Morton: - a few misc things - ocfs2 updates - the v9fs maintainers have been missing for a long time. I've taken over v9fs patch slinging. - most of MM * emailed patches from Andrew Morton : (116 commits) mm,oom_reaper: check for MMF_OOM_SKIP before complaining mm/ksm: fix interaction with THP mm/memblock.c: cast constant ULLONG_MAX to phys_addr_t headers: untangle kmemleak.h from mm.h include/linux/mmdebug.h: make VM_WARN* non-rvals mm/page_isolation.c: make start_isolate_page_range() fail if already isolated mm: change return type to vm_fault_t mm, oom: remove 3% bonus for CAP_SYS_ADMIN processes mm, page_alloc: wakeup kcompactd even if kswapd cannot free more memory kernel/fork.c: detect early free of a live mm mm: make counting of list_lru_one::nr_items lockless mm/swap_state.c: make bool enable_vma_readahead and swap_vma_readahead() static block_invalidatepage(): only release page if the full page was invalidated mm: kernel-doc: add missing parameter descriptions mm/swap.c: remove @cold parameter description for release_pages() mm/nommu: remove description of alloc_vm_area zram: drop max_zpage_size and use zs_huge_class_size() zsmalloc: introduce zs_huge_class_size() mm: fix races between swapoff and flush dcache fs/direct-io.c: minor cleanups in do_blockdev_direct_IO ... commit 8613a209ffa6dd2c19c405fa699a062035dec9b0 Author: Al Viro Date: Fri Apr 6 16:45:33 2018 -0400 make lookup_one_len() safe to use with directory locked shared Signed-off-by: Al Viro fs/namei.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 88d8331afb0f76ad856770c49a0c0909d123b59c Author: Al Viro Date: Fri Apr 6 16:43:47 2018 -0400 new helper: __lookup_slow() lookup_slow() sans locking/unlocking the directory Signed-off-by: Al Viro fs/namei.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit ccf719b8845d6ca9f24a8708bb39e0df008f4e3f Author: Gabriel Fernandez Date: Fri Apr 6 08:39:33 2018 +0200 clk: stm32mp1: remove ck_apb_dbg clock It's recommended to use only clk_sys_dbg clock instead to activate debug IP. Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/clk-stm32mp1.c | 4 ---- include/dt-bindings/clock/stm32mp1-clks.h | 1 - 2 files changed, 5 deletions(-) commit 1742aed6e539851ae7cfb12685182aa9044f3b0c Author: Gabriel Fernandez Date: Fri Apr 6 08:39:32 2018 +0200 clk: stm32mp1: set stgen_k clock as critical stgen_k should be declared as critical to avoid blocking console when ck_hsi is not used. Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/clk-stm32mp1.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a1bf646f719f14464be93e163cfa7d003c472e6e Author: Gabriel Fernandez Date: Fri Apr 6 08:39:31 2018 +0200 clk: stm32mp1: add missing tzc2 clock This patch adds tzc2 clock and rename tzc clock into tzc1 Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/clk-stm32mp1.c | 9 ++++++--- include/dt-bindings/clock/stm32mp1-clks.h | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) commit 4cd2136031f246ae099f18d4568290c64187ddf8 Author: Gabriel Fernandez Date: Fri Apr 6 08:39:30 2018 +0200 clk: stm32mp1: fix SAI3 & SAI4 clocks fix bad copy / paste. SAI3 & SAI4 used gate of SAI2 instead SAI3 & SAI4 Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/clk-stm32mp1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa5fc95fd5e63b31cafa7a5a0c02d0585bbc9263 Author: Gabriel Fernandez Date: Fri Apr 6 08:39:29 2018 +0200 clk: stm32mp1: remove unused dfsdm_src[] const This patch remove unused constant. Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/clk-stm32mp1.c | 4 ---- 1 file changed, 4 deletions(-) commit e631ad60d2e8c3d358935fa3eb6c45b24af5d48f Author: Gabriel Fernandez Date: Fri Apr 6 08:39:28 2018 +0200 clk: stm32mp1: add missing static Add missing static for const parent names and clock ops. Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/clk-stm32mp1.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit b44c4ddf4a15c42a91a88aaa32b7d53cf43391cb Merge: a339bdf 5ced192 Author: Stephen Boyd Date: Fri Apr 6 13:38:08 2018 -0700 Merge branch 'clk-davinci' into clk-next * clk-davinci: clk: davinci: add a reset lookup table for psc0 reset: modify the way reset lookup works for board files reset: add support for non-DT systems commit 5ced1923128470bda20d454cc6b07a8aa2f2e64d Author: Bartosz Golaszewski Date: Fri Mar 30 17:28:51 2018 +0200 clk: davinci: add a reset lookup table for psc0 In order to be able to use the reset framework in legacy boot mode as well, add the reset lookup table to the psc driver for da850 variant. Signed-off-by: Bartosz Golaszewski Reviewed-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/psc-da850.c | 7 +++++++ drivers/clk/davinci/psc.c | 1 + 2 files changed, 8 insertions(+) commit ac8e5cc73736fe1ec6c7f3674ee71f7c99c42ae0 Merge: fc3fcb4 e2749bb Author: Stephen Boyd Date: Fri Apr 6 13:36:50 2018 -0700 Merge branch 'reset/lookup' of git://git.pengutronix.de/git/pza/linux into clk-davinci We need this to be able to use the reset_controller_add_lookup() API. * 'reset/lookup' of git://git.pengutronix.de/git/pza/linux: reset: modify the way reset lookup works for board files reset: add support for non-DT systems commit 3c95f0dce82186de657d828cce420daa0edd9a19 Author: Al Viro Date: Fri Apr 6 16:32:38 2018 -0400 merge common parts of lookup_one_len{,_unlocked} into common helper Signed-off-by: Al Viro fs/namei.c | 90 ++++++++++++++++++++++++-------------------------------------- 1 file changed, 34 insertions(+), 56 deletions(-) commit f5ef48855733360c850be82221ce7454294a1580 Author: Steven Rostedt (VMware) Date: Fri Apr 6 15:49:43 2018 -0400 ktest.pl: No need to print no mailer is specified when mailto is not If the user doesn't want to send mail, then don't bother them with output that says they didn't specify a mailer. That can be annoying. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a339bdf64a7c41a6c88cc7da2eb432c876d5ce19 Merge: a83fdfa 07afb8d 8d41e65 7538723 eade4cc 4a5f720 Author: Stephen Boyd Date: Fri Apr 6 13:22:12 2018 -0700 Merge branches 'clk-stratix10', 'clk-imx', 'clk-bcm', 'clk-cs2000' and 'clk-imx6sll' into clk-next * clk-stratix10: clk: socfpga: stratix10: add clock driver for Stratix10 platform dt-bindings: documentation: add clock bindings information for Stratix10 * clk-imx: clk: imx7d: Move clks_init_on before any clock operations clk: imx7d: Correct ahb clk parent select clk: imx7d: Correct dram pll type clk: imx7d: Add USB clock information clk: imx: pllv2: avoid using uninitialized values clk: imx6ull: Add epdc_podf instead of sim_podf clk: imx: imx7d: correct video pll clock tree clk: imx: imx7d: add the Keypad Port module clock clk: imx7d: add CAAM clock clk: imx: imx7d: add the snvs clock clk: imx: imx6sx: update cko mux options * clk-bcm: clk: bcm2835: De-assert/assert PLL reset signal when appropriate * clk-cs2000: clk: cs2000: set pm_ops in hibernate-compatible way * clk-imx6sll: clk: imx: add clock driver for imx6sll dt-bindings: imx: update clock doc for imx6sll clk: imx: add new gate/gate2 wrapper funtion clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux commit a83fdfae5a25588cc6c4c086e98f03c7270fc37b Merge: b037819 fc3fcb4 953cc3e f6ae7c3 6f1aa4e 269bd20 Author: Stephen Boyd Date: Fri Apr 6 13:22:06 2018 -0700 Merge branches 'clk-davinci', 'clk-si544', 'clk-rockchip', 'clk-uniphier' and 'clk-ti-flag-fix' into clk-next * clk-davinci: clk: davinci: Remove redundant dev_err calls clk: davinci: cfgchip: Add TI DA8XX USB PHY clocks clk: davinci: New driver for TI DA8XX CFGCHIP clocks dt-bindings: clock: Add bindings for DA8XX CFGCHIP clocks clk: davinci: Add platform information for TI DM646x PSC clk: davinci: Add platform information for TI DM644x PSC clk: davinci: Add platform information for TI DM365 PSC clk: davinci: Add platform information for TI DM355 PSC clk: davinci: Add platform information for TI DA850 PSC clk: davinci: Add platform information for TI DA830 PSC clk: davinci: New driver for davinci PSC clocks dt-bindings: clock: New bindings for TI Davinci PSC clk: davinci: Add platform information for TI DM646x PLL clk: davinci: Add platform information for TI DM644x PLL clk: davinci: Add platform information for TI DM365 PLL clk: davinci: Add platform information for TI DM355 PLL clk: davinci: Add platform information for TI DA850 PLL clk: davinci: Add platform information for TI DA830 PLL clk: davinci: New driver for davinci PLL clocks dt-bindings: clock: Add new bindings for TI Davinci PLL clocks * clk-si544: clk: Add driver for the si544 clock generator chip * clk-rockchip: clk: rockchip: assign correct id for pclk_ddr and hclk_sd in rk3399 clk: rockchip: Fix error return in phase clock registration clk: rockchip: Correct the behaviour of restoring cached phase clk: rockchip: Fix wrong parents for MMC phase clock for rk3328 clk: rockchip: Fix wrong parent for SDMMC phase clock for rk3228 clk: rockchip: Add 1.6GHz PLL rate for rk3399 clk: rockchip: Restore the clock phase after the rate was changed clk: rockchip: Prevent calculating mmc phase if clock rate is zero clk: rockchip: Free the memory on the error path clk: rockchip: document hdmi_phy external input for rk3328 clk: rockchip: add flags for rk3328 dclk_lcdc clk: rockchip: remove ignore_unused flag from rk3328 vio_h2p clocks clk: rockchip: protect all remaining rk3328 interconnect clocks clk: rockchip: export sclk_hdmi_sfc on rk3328 clk: rockchip: remove HCLK_VIO from rk3328 dt header clk: rockchip: fix hclk_vio_niu on rk3328 * clk-uniphier: clk: uniphier: add additional ethernet clock lines for Pro4 clk: uniphier: add SATA clock control support clk: uniphier: add PCIe clock control support clk: uniphier: add ethernet clock control support for PXs3 clk: uniphier: add Pro4/Pro5/PXs2 audio system clock * clk-ti-flag-fix: clk: ti: fix flag space conflict with clkctrl clocks clk: ti: clkctrl: add support for CLK_SET_RATE_PARENT flag commit b03781920c844486d2f67823ec3153c58116fc1e Merge: fbc20b8 b572f63 c744b63 26b99db 726fef0 aa584d2 Author: Stephen Boyd Date: Fri Apr 6 13:21:57 2018 -0700 Merge branches 'clk-mediatek', 'clk-hisi', 'clk-allwinner', 'clk-ux500' and 'clk-renesas' into clk-next * clk-mediatek: clk: mediatek: add audsys support for MT2701 clk: mediatek: add devm_of_platform_populate() for MT7622 audsys dt-bindings: clock: mediatek: add audsys support for MT2701 dt-bindings: clock: mediatek: update audsys documentation to adapt MFD device clk: mediatek: update missing clock data for MT7622 audsys clk: mediatek: fix PWM clock source by adding a fixed-factor clock dt-bindings: clock: mediatek: add binding for fixed-factor clock axisel_d4 * clk-hisi: clk: hisilicon: fix potential NULL dereference in hisi_clk_alloc() clk: hisilicon: mark wdt_mux_p[] as const clk: hisilicon: Mark phase_ops static clk: hi3798cv200: add emmc sample and drive clock clk: hisilicon: add hisi phase clock support clk: hi3798cv200: add COMBPHY0 clock support clk: hi3798cv200: fix define indentation clk: hi3798cv200: add support for HISTB_USB2_OTG_UTMI_CLK clk: hi3798cv200: correct IR clock parent clk: hi3798cv200: fix unregister call sequence in error path * clk-allwinner: clk: sunxi-ng: add missing hdmi-slow clock for H6 CCU clk: sunxi-ng: add support for the Allwinner H6 CCU dt-bindings: add device tree binding for Allwinner H6 main CCU clk: sunxi-ng: Support fixed post-dividers on NKMP style clocks clk: sunxi-ng: h3: h5: export CLK_PLL_VIDEO clk: sunxi-ng: h3: h5: Allow some clocks to set parent rate clk: sunxi-ng: h3: h5: Add minimal rate for video PLL clk: sunxi-ng: Add check for minimal rate to NM PLLs clk: sunxi-ng: Use u64 for calculation of nkmp rate clk: sunxi-ng: Mask nkmp factors when setting register clk: sunxi-ng: remove select on obsolete SUNXI_CCU_X kconfig name * clk-ux500: clk: ux500: Drop AB8540/9540 support * clk-renesas: (27 commits) clk: renesas: cpg-mssr: Adjust r8a77980 ifdef clk: renesas: rcar-gen3: Always use readl()/writel() clk: renesas: sh73a0: Always use readl()/writel() clk: renesas: rza1: Always use readl()/writel() clk: renesas: rcar-gen2: Always use readl()/writel() clk: renesas: r8a7740: Always use readl()/writel() clk: renesas: r8a73a4: Always use readl()/writel() clk: renesas: mstp: Always use readl()/writel() clk: renesas: div6: Always use readl()/writel() clk: fix false-positive Wmaybe-uninitialized warning clk: renesas: r8a77965: Replace DU2 clock clk: renesas: cpg-mssr: Add support for R-Car M3-N clk: renesas: cpg-mssr: add R8A77980 support dt-bindings: clock: add R8A77980 CPG core clock definitions clk: renesas: r8a7792: Add rwdt clock clk: renesas: r8a7794: Add rwdt clock clk: renesas: r8a7791/r8a7793: Add rwdt clock clk: renesas: r8a7790: Add rwdt clock clk: renesas: r8a7745: Add rwdt clock clk: renesas: r8a7743: Add rwdt clock ... commit fbc20b8c3cc4b95c0e31f89c596eaa350f9cd6c3 Merge: e8121d9 6a4a459 1f9c63e cef7b18 f72595c 8bcde65 Author: Stephen Boyd Date: Fri Apr 6 13:21:52 2018 -0700 Merge branches 'clk-mvebu', 'clk-phase', 'clk-nxp', 'clk-mtk2712' and 'clk-qcom-rpmcc' into clk-next * clk-mvebu: clk: mvebu: armada-38x: add support for missing clocks clk: mvebu: cp110: Fix clock tree representation * clk-phase: clk: Don't show the incorrect clock phase clk: update cached phase to respect the fact when setting phase * clk-nxp: clk: lpc32xx: Set name of regmap_config * clk-mtk2712: clk: mediatek: update clock driver of MT2712 dt-bindings: clock: add clocks for MT2712 * clk-qcom-rpmcc: clk: qcom: rpmcc: Add support to XO buffered clocks commit e8121d98672b17f505c4798c1e5aeb6d2efa6781 Merge: caa9f3b b3316a6 f9acf10 da32d35 3a49afb 2e838e7 Author: Stephen Boyd Date: Fri Apr 6 13:21:45 2018 -0700 Merge branches 'clk-spreadtrum', 'clk-stm32f', 'clk-stm32mp1', 'clk-hi655x' and 'clk-gpio' into clk-next * clk-spreadtrum: clk: sprd: add RTC gate for SC9860 dt-bindings: clocks: add APB RTC gate for SC9860 * clk-stm32f: clk: stm32: Add clk entry for SDMMC2 on stm32F769 clk: stm32: Add DSI clock for STM32F469 Board clk: stm32: END_PRIMARY_CLK should be declare after CLK_SYSCLK * clk-stm32mp1: clk: stm32: add configuration flags for each of the stm32 drivers clk: stm32mp1: add Debug clocks clk: stm32mp1: add MCO clocks clk: stm32mp1: add RTC clock clk: stm32mp1: add Peripheral & Kernel Clocks clk: stm32mp1: add Kernel timers clk: stm32mp1: add Sub System clocks clk: stm32mp1: add Post-dividers for PLL clk: stm32mp1: add PLL clocks clk: stm32mp1: add Source Clocks for PLLs clk: stm32mp1: add MP1 gate for hse/hsi/csi oscillators clk: stm32mp1: Introduce STM32MP1 clock driver dt-bindings: Document STM32MP1 Reset Clock Controller (RCC) bindings * clk-hi655x: clk: enable hi655x common clk automatically * clk-gpio: clk: clk-gpio: Allow GPIO to sleep in set/get_parent commit caa9f3b7d73f7675145d61e95f58394a1f537a3a Merge: 15afa04 a1d803d 5bc5673 6e0d4ff 91927ff fec0ef3 Author: Stephen Boyd Date: Fri Apr 6 13:21:39 2018 -0700 Merge branches 'clk-versatile', 'clk-doc', 'clk-must-check', 'clk-qcom' and 'clk-debugfs' into clk-next * clk-versatile: clk: versatile: Remove WARNs in ->round_rate() clk: versatile: add min/max rate boundaries for vexpress osc clock * clk-doc: Documentation: clk: enable lock is not held for clk_is_enabled API * clk-must-check: clk: add more __must_check for bulk APIs * clk-qcom: clk: qcom: smd-rpm: Migrate to devm_of_clk_add_hw_provider() clk: qcom: gcc-msm8996: Mark aggre0 noc clks as critical * clk-debugfs: clk: Re-use DEFINE_SHOW_ATTRIBUTE() macro commit 15afa044cba4980aea49fc8e18580a15844f1d5c Merge: 401fd20 5d1c04d 91fab9d 1871f0f Author: Stephen Boyd Date: Fri Apr 6 13:21:33 2018 -0700 Merge branches 'clk-ti', 'clk-amlogic', 'clk-tegra' and 'clk-samsung' into clk-next * clk-ti: clk: keystone: sci-clk: add support for dynamically probing clocks clk: ti: add support for clock latching to mux clocks clk: ti: add support for clock latching to divider clocks clk: ti: add generic support for clock latching clk: ti: add support for register read-modify-write low-level operation dt-bindings: clock: ti: add latching support to mux and divider clocks * clk-amlogic: (50 commits) clk: meson: Drop unused local variable and add static clk: meson: clean-up clk81 clocks clk: meson: add fdiv clock gates clk: meson: add mpll pre-divider clk: meson: axg: add hifi pll clock clk: meson: axg: add hifi clock bindings clk: meson: add ROUND_CLOSEST to the pll driver clk: meson: add gp0 frac parameter for axg and gxl clk: meson: improve pll driver results with frac clk: meson: remove special gp0 lock loop clk: meson: poke pll CNTL last clk: meson: add fractional part of meson8b fixed_pll clk: meson: use hhi syscon if available clk: meson: remove obsolete cpu_clk clk: meson: rework meson8b cpu clock clk: meson: split divider and gate part of mpll clk: meson: migrate plls clocks to clk_regmap clk: meson: migrate the audio divider clock to clk_regmap clk: meson: migrate mplls clocks to clk_regmap clk: meson: add regmap helpers for parm ... * clk-tegra: clk: tegra: Fix pll_u rate configuration clk: tegra: Specify VDE clock rate clk: tegra20: Correct PLL_C_OUT1 setup clk: tegra: Mark HCLK, SCLK and EMC as critical clk: tegra: MBIST work around for Tegra210 clk: tegra: add fence_delay for clock registers clk: tegra: Add la clock for Tegra210 * clk-samsung: (22 commits) clk: samsung: Mark a few things static clk: samsung: Add fout=196608001 Hz EPLL rate entry for exynos4412 clk: samsung: exynos5250: Add missing clocks for FIMC LITE SYSMMU devices clk: samsung: exynos5420: Add more entries to EPLL rate table clk: samsung: exynos5420: Add CLK_SET_RATE_PARENT flag to mout_mau_epll_clk clk: samsung: exynos5250: Move PD-dependent clocks to Exynos5 sub-CMU clk: samsung: exynos5420: Move PD-dependent clocks to Exynos5 sub-CMU clk: samsung: Add Exynos5 sub-CMU clock driver soc: samsung: pm_domains: Add blacklisting clock handling clk: samsung: Add compile time PLL rate validators clk: samsung: s3c2410: Fix PLL rates clk: samsung: exynos7: Fix PLL rates clk: samsung: exynos5433: Fix PLL rates clk: samsung: exynos5260: Fix PLL rates clk: samsung: exynos5250: Fix PLL rates clk: samsung: exynos3250: Fix PLL rates clk: exynos5433: Extend list of available AUD_PLL output frequencies clk: exynos5433: Add CLK_IGNORE_UNUSED flag to sclk_ioclk_i2s1_bclk clk: samsung: Add a git tree entry to MAINTAINERS clk: samsung: Remove redundant dev_err call in exynos_audss_clk_probe() ... commit 3fd14cdcc05a682b03743683ce3a726898b20555 Merge: 83c7c18 fe5f31a Author: Linus Torvalds Date: Fri Apr 6 12:15:41 2018 -0700 Merge tag 'mtd/for-4.17' of git://git.infradead.org/linux-mtd Pull MTD updates from Boris Brezillon: "MTD Core: - Remove support for asynchronous erase (not implemented by any of the existing drivers anyway) - Remove Cyrille from the list of SPI NOR and MTD maintainers - Fix kernel doc headers - Allow users to define the partitions parsers they want to test through a DT property (compatible of the partitions subnode) - Remove the bfin-async-flash driver (the only architecture using it has been removed) - Fix pagetest test - Add extra checks in mtd_erase() - Simplify the MTD partition creation logic and get rid of mtd_add_device_partitions() MTD Drivers: - Add endianness information to the physmap DT binding - Add Eon EN29LV400A IDs to JEDEC probe logic - Use %*ph where appropriate SPI NOR Drivers: - Make fsl-quaspi assign different names to MTD devices connected to the same QSPI controller - Remove an unneeded driver.bus assigned in the fsl-qspi driver NAND Core: - Prepare arrival of the SPI NAND subsystem by implementing a generic (interface-agnostic) layer to ease manipulation of NAND devices - Move onenand code base to the drivers/mtd/nand/ dir - Rework timing mode selection - Provide a generic way for NAND chip drivers to flag a specific GET/SET FEATURE operation as supported/unsupported - Stop embedding ONFI/JEDEC param page in nand_chip NAND Drivers: - Rework/cleanup of the mxc driver - Various cleanups in the vf610 driver - Migrate the fsmc and vf610 to ->exec_op() - Get rid of the pxa driver (replaced by marvell_nand) - Support ->setup_data_interface() in the GPMI driver - Fix probe error path in several drivers - Remove support for unused hw_syndrome mode in sunxi_nand - Various minor improvements" * tag 'mtd/for-4.17' of git://git.infradead.org/linux-mtd: (89 commits) dt-bindings: fsl-quadspi: Add the example of two SPI NOR mtd: fsl-quadspi: Distinguish the mtd device names mtd: nand: Fix some function description mismatches in core.c mtd: fsl-quadspi: Remove unneeded driver.bus assignment mtd: rawnand: marvell: Rename ->ecc_clk into ->core_clk mtd: rawnand: s3c2410: enhance the probe function error path mtd: rawnand: tango: fix probe function error path mtd: rawnand: sh_flctl: fix the probe function error path mtd: rawnand: omap2: fix the probe function error path mtd: rawnand: mxc: fix probe function error path mtd: rawnand: denali: fix probe function error path mtd: rawnand: davinci: fix probe function error path mtd: rawnand: cafe: fix probe function error path mtd: rawnand: brcmnand: fix probe function error path mtd: rawnand: sunxi: Stop supporting ECC_HW_SYNDROME mode mtd: rawnand: marvell: Fix clock resource by adding a register clock mtd: ftl: Use DIV_ROUND_UP() mtd: Fix some function description mismatches in mtdcore.c mtd: physmap_of: update struct map_info's swap as per map requirement dt-bindings: mtd-physmap: Add endianness supports ... commit 83c7c18b169bdac3dabab763d16549c1e4688a8b Merge: 9022ca6 5bd5e8d Author: Linus Torvalds Date: Fri Apr 6 11:50:19 2018 -0700 Merge tag 'for-4.17/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - DM core passthrough ioctl fix to retain reference to DM table, and that table's block devices, while issuing the ioctl to one of those block devices. - DM core passthrough ioctl fix to _not_ override the fmode_t used to issue the ioctl. Overriding by using the fmode_t that the block device was originally open with during DM table load is a liability. - Add DM core support for secure erase forwarding and update the DM linear and DM striped targets to support them. - A DM core 4.16 stable fix to allow abnormal IO (e.g. discard, write same, write zeroes) for targets that make use of the non-splitting IO variant (as is done for multipath or thinp when layered directly on NVMe). - Allow DM targets to return a payload in response to a DM message that they are sent. This is useful for DM targets that would like to provide statistics data in response to DM messages. - Update DM bufio to support non-power-of-2 block sizes. Numerous other related changes prepare the DM bufio code for this support. - Fix DM crypt to use a bounded amount of memory across the entire system. This is to avoid OOM that can otherwise occur in response to certain pathological IO workloads (e.g. discarding a large DM crypt device). - Add a 'check_at_most_once' feature to the DM verity target to allow verity to be used on mobile devices that have very limited resources. - Fix the DM integrity target to fail early if a keyed algorithm (e.g. HMAC) is to be used but the key isn't set. - Add non-power-of-2 support to the DM unstripe target. - Eliminate the use of a Variable Length Array in the DM stripe target. - Update the DM log-writes target to record metadata (REQ_META flag). - DM raid fixes for its nosync status and some variable range issues. * tag 'for-4.17/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (28 commits) dm: remove fmode_t argument from .prepare_ioctl hook dm: hold DM table for duration of ioctl rather than use blkdev_get dm raid: fix parse_raid_params() variable range issue dm verity: make verity_for_io_block static dm verity: add 'check_at_most_once' option to only validate hashes once dm bufio: don't embed a bio in the dm_buffer structure dm bufio: support non-power-of-two block sizes dm bufio: use slab cache for dm_buffer structure allocations dm bufio: reorder fields in dm_buffer structure dm bufio: relax alignment constraint on slab cache dm bufio: remove code that merges slab caches dm bufio: get rid of slab cache name allocations dm bufio: move dm-bufio.h to include/linux/ dm bufio: delete outdated comment dm: add support for secure erase forwarding dm: backfill abnormal IO support to non-splitting IO submission dm raid: fix nosync status dm mpath: use DM_MAPIO_SUBMITTED instead of magic number 0 in process_queued_bios() dm stripe: get rid of a Variable Length Array (VLA) dm log writes: record metadata flag for better flags record ... commit eaaa1e283ada2e8808f9074829c27857adb35bdb Author: Tim Tianyang Chen Date: Mon Mar 26 13:08:04 2018 -0700 Ktest: add email options to sample.config A block of email options is added under the optional config section. Link: http://lkml.kernel.org/r/1522094884-22718-5-git-send-email-tianyang.chen@oracle.com Suggested-by: Dhaval Giani Signed-off-by: Tim Tianyang Chen Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/sample.conf | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit df46fce692a649559d64da2826d355b4f28fc526 Author: Tim Tianyang Chen Date: Mon Mar 26 13:08:03 2018 -0700 Ktest: Use dodie for critical falures Users should get emails when the script dies because of a critical failure. Critical failures are defined as any errors that could abnormally terminate the script. In order to add email support, this patch converts all die() to dodie() except: * when '-v' is used as an option to get the version of the script. * in Sig-Int handeler because it's not a fatal error to cancel the script. * errors happen during parsing config Link: http://lkml.kernel.org/r/1522094884-22718-4-git-send-email-tianyang.chen@oracle.com Suggested-by: Dhaval Giani Signed-off-by: Tim Tianyang Chen Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 54 ++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 4a5f720b65422e168139826c0dae675336bdd706 Author: Bai Ping Date: Tue Mar 20 10:24:04 2018 +0800 clk: imx: add clock driver for imx6sll Add clk driver support for imx6sll. Signed-off-by: Bai Ping Acked-by: Dong Aisheng Signed-off-by: Stephen Boyd drivers/clk/imx/Makefile | 1 + drivers/clk/imx/clk-imx6sll.c | 340 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 341 insertions(+) commit 0c123a4fbbf4672fb8c357158eb9368f3d3660f2 Author: Bai Ping Date: Tue Mar 20 10:24:03 2018 +0800 dt-bindings: imx: update clock doc for imx6sll Add clock binding doc update for imx6sll. Signed-off-by: Bai Ping Acked-by: Dong Aisheng Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/imx6sll-clock.txt | 36 ++++ include/dt-bindings/clock/imx6sll-clock.h | 202 +++++++++++++++++++++ 2 files changed, 238 insertions(+) commit 2b18cc1f12f4f751b984f6493db0f25a69b2f860 Author: Bai Ping Date: Tue Mar 20 10:24:02 2018 +0800 clk: imx: add new gate/gate2 wrapper funtion Add new gate/gate2 wrapper function to register clocks with optional flags. Signed-off-by: Bai Ping Acked-by: Dong Aisheng Signed-off-by: Stephen Boyd drivers/clk/imx/clk.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 6f9575e55632b2a060c8c158949ec712d39db0be Author: Bai Ping Date: Tue Mar 20 10:24:01 2018 +0800 clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux The busy divider and busy mux is actually used by the system critical clocks, so add 'CLK_IS_CRITICAL' to clocks registered with these two type. Signed-off-by: Bai Ping Acked-by: Dong Aisheng Signed-off-by: Stephen Boyd drivers/clk/imx/clk-busy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 92db453e7eeb44efd43e977fa5ab417274834a9a Author: Tim Tianyang Chen Date: Mon Mar 26 13:08:02 2018 -0700 Ktest: Add SigInt handling User can cancel tests and specify handler's behavior using option 'EMAIL_WHEN_CANCELED'. Link: http://lkml.kernel.org/r/1522094884-22718-3-git-send-email-tianyang.chen@oracle.com Suggested-by: Dhaval Giani Signed-off-by: Tim Tianyang Chen Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2ceb2d85b6697e2a3485047d1c908a4908069411 Author: Tim Tianyang Chen Date: Mon Mar 26 13:08:01 2018 -0700 Ktest: Add email support Users can define optional variables to get email notifications. Ktest can send emails when the script: * was started * failed with fatal errors and called dodie() * completed all testing Users have to setup the mailer provided in config prior to using this script. Supported mailers: mailx, mail, sendmail mailer specific routines are _sendmail_send(), _mailx_send() Link: http://lkml.kernel.org/r/1522094884-22718-2-git-send-email-tianyang.chen@oracle.com Suggested-by: Dhaval Giani Signed-off-by: Tim Tianyang Chen Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 61 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 58 insertions(+), 3 deletions(-) commit eade4ccdb087ae6238bcce78e64587d543374ca4 Author: Nikita Yushchenko Date: Tue Mar 20 11:33:23 2018 +0300 clk: cs2000: set pm_ops in hibernate-compatible way Use SET_LATE_SYSTEM_SLEEP_PM_OPS() macro instead of direct assignment to .resume_early field. This fixes initialization of CS2000 in restore from hibernation in case of kernel used to load image did not initialize CS2000 while kernel being restored had CS2000 initialized. Signed-off-by: Nikita Yushchenko Signed-off-by: Stephen Boyd drivers/clk/clk-cs2000-cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 753872373b599384ac7df809aa61ea12d1c4d5d1 Author: Boris Brezillon Date: Thu Mar 22 10:11:30 2018 +0100 clk: bcm2835: De-assert/assert PLL reset signal when appropriate In order to enable a PLL, not only the PLL has to be powered up and locked, but you also have to de-assert the reset signal. The last part was missing. Add it so PLLs that were not enabled by the FW/bootloader can be enabled from Linux. Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-bcm2835.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 5a57299a1f084bbe7e3e9cafb06999793c4a40fb Author: Steven Rostedt (VMware) Date: Thu Apr 5 14:51:42 2018 -0400 ktest.pl: Detect if a config-bisect was interrupted If a config-bisect was interrupted, then allow the user to continue, or restart a new config-bisect. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 40667fb5fda0483e5c617d133968b17f6854cb9b Author: Steven Rostedt (VMware) Date: Thu Apr 5 12:14:39 2018 -0400 ktest.pl: Make finding config-bisect.pl dynamic Just looking for config-bisect.pl in the source tree can be risky, especially, if the source tree being tested doesn't have config-bisect.pl in place. Instead, allow the user to set where to find config-bisect.pl with a new option CONFIG_BISECT_EXEC. If this option is not set, by default, ktest.pl will look for config-bisect.pl in the following locations: `pwd`/config-bisect.pl # where ktest.pl was called from `dirname /path/to/ktest.pl`/config-bisect.pl # where ktest.pl exists ${BUILD_DIR}/tools/testing/ktest/config-bisect.pl # where config-bisect.pl exists in the source tree. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 27 ++++++++++++++++++++++++++- tools/testing/ktest/sample.conf | 10 ++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) commit 133087f0623e927dfdf439a1b6a4e819a7a5f3ea Author: Steven Rostedt (VMware) Date: Wed Apr 4 15:42:08 2018 -0400 ktest.pl: Have ktest.pl pass -r to config-bisect.pl to reset bisect If config-bisect.pl sees that a config_bisect has already been started, it will ask on the command line if it should bisect or not. This will mess up running config_bisect from ktest.pl. Have ktest.pl pass in '-r' to config-bisect.pl and have config-bisect.pl recognize that to reset without asking. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/config-bisect.pl | 21 ++++++++++++++------- tools/testing/ktest/ktest.pl | 6 +++++- 2 files changed, 19 insertions(+), 8 deletions(-) commit 9022ca6b1129da44e3d5c4fa779b8bb9ceabe2ce Merge: 38c2368 0e11f64 Author: Linus Torvalds Date: Fri Apr 6 11:07:08 2018 -0700 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: "Assorted stuff, including Christoph's I_DIRTY patches" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: move I_DIRTY_INODE to fs.h ubifs: fix bogus __mark_inode_dirty(I_DIRTY_SYNC | I_DIRTY_DATASYNC) call ntfs: fix bogus __mark_inode_dirty(I_DIRTY_SYNC | I_DIRTY_DATASYNC) call gfs2: fix bogus __mark_inode_dirty(I_DIRTY_SYNC | I_DIRTY_DATASYNC) calls fs: fold open_check_o_direct into do_dentry_open vfs: Replace stray non-ASCII homoglyph characters with their ASCII equivalents vfs: make sure struct filename->iname is word-aligned get rid of pointless includes of fs_struct.h [poll] annotate SAA6588_CMD_POLL users commit b2b07ea282721b6c7bed21e95e2c00dd95cb8520 Author: Steven Rostedt (VMware) Date: Thu Mar 22 16:36:34 2018 -0400 ktest.pl: Use diffconfig if available for failed config bisects Check to see if diffconfig is available and use that to diff the configs instead of using 'diff -u', as diffconfig produces much better output of kernel config files. It checks the source directory for the executable. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b337f9790a0c8f0f01abf9fe3e1f48894b773899 Author: Steven Rostedt (VMware) Date: Thu Mar 22 16:28:18 2018 -0400 ktest.pl: Allow for the config-bisect.pl output to display to console When commands are run in ktest, they are only displayed in the ktest log file, but that is not sufficient for outputting the display for config bisects. The result of a config bisect is not shown. Add a way to display the output of "run_command" which is the subroutine used by ktest to execute commands. Use this feature to display the output of config-bisect.pl executions to see the progress as well as the result. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit a9adc261e978b9214fd505030c24e75b07dcf52f Author: Scott Wood Date: Sun Jul 16 19:16:30 2017 -0500 ktest: Use config-bisect.pl in ktest.pl Reduce code duplication and take advantage of bisection logic improvements by calling config-bisect.pl. The output of make oldconfig is now copied directly to the desired file, rather than doing assign_configs+save_config, in order to preserve the ordering so that diffing the configs at the end will provide useful output. Link: http://lkml.kernel.org/r/20170717001630.10518-8-swood@redhat.com Signed-off-by: Scott Wood [ Modified to use with new version of config-bisect.pl ] Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 264 +++++++------------------------------------ 1 file changed, 42 insertions(+), 222 deletions(-) commit 0f0db065999cf1793a7a9b595a9ba86935f139d4 Author: Steven Rostedt (Red Hat) Date: Tue Feb 17 20:33:43 2015 -0500 ktest: Add standalone config-bisect.pl program Started working on a stand alone program that can do a config bisect. It is based on the config bisect code of ktest.pl. Instead of needing all the infrastructure of ktest.pl, all that is required for config-bisect.pl is two config files. One that works, and one that does not. The goal is to pass in the two files, and it will create a new "good" and a new "bad" config file based on input from the user. After several iterations (calls to this program), it will eventually end with a minimum config value that allows one config to work and the other config to break. The program uses a technique that takes the good config and then makes half of the configs that differ from the bad config just like the bad config. The code will use make oldconfig to make sure the configs that are set are not all converted back due to incorrect dependencies on other configs set in the bad config but not in the new test config. This is still a work in progress, but as it was written while I was working at Red Hat, I want this code to be submitted as such. Signed-off-by: Steven Rostedt (Red Hat) tools/testing/ktest/config-bisect.pl | 763 +++++++++++++++++++++++++++++++++++ 1 file changed, 763 insertions(+) commit dd9a122ae99ae471beed4d4f8073d71e8d31ffa6 Author: Esben Haabendal Date: Thu Apr 5 22:40:29 2018 +0200 net: phy: marvell: Enable interrupt function on LED2 pin The LED2[2]/INTn pin on Marvell 88E1318S as well as 88E1510/12/14/18 needs to be configured to be usable as interrupt not only when WOL is enabled, but whenever we rely on interrupts from the PHY. Signed-off-by: Esben Haabendal Cc: Rasmus Villemoes Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 8d41e6538c1a4d034cd1f4cc5efec699dd83ca5d Author: Dong Aisheng Date: Wed Mar 28 09:46:39 2018 +0300 clk: imx7d: Move clks_init_on before any clock operations For init on clocks we should move it at the first place in imx7d_clocks_init() before any clock operations, else the clock operation may fail in case the clock is still not on. Acked-by: Ranjani Vaidyanathan Signed-off-by: Dong Aisheng Signed-off-by: Irina Tirdea Signed-off-by: Abel Vesa Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a12ec8b6536b9eb484627f252d2a460f6b74c585 Author: Anson Huang Date: Wed Mar 28 09:46:38 2018 +0300 clk: imx7d: Correct ahb clk parent select Design team change the ahb's clk parent options but did NOT update the DOC accordingly in time, so the AHB/IPG's clk rate in clk tree is incorrect, AHB is 67.5MHz and IPG is 33.75MHz, but using scope to monitor them, they are actually 135MHz and 67.5MHz, update the clk parent option to make clk tree info correct. Signed-off-by: Anson Huang Signed-off-by: Irina Tirdea Signed-off-by: Abel Vesa Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afe7c08a03a47732fa32ef12b26fb8fe4f9a00b9 Author: Anson Huang Date: Wed Mar 28 09:46:37 2018 +0300 clk: imx7d: Correct dram pll type DRAM PLL is a audio/video type PLL, need to correct it to get correct ops of PLL. There is a test_div placed before DRAM PLL's gate, so add this test div clk. Signed-off-by: Anson Huang Signed-off-by: Irina Tirdea Signed-off-by: Abel Vesa Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5fcb4c76bbf4dd0b9371f1b84b5baf7315e942a9 Author: Peter Chen Date: Wed Mar 28 09:46:35 2018 +0300 clk: imx7d: Add USB clock information Add USB clock information, the pll_usb_main_clk is USB_PLL at CCM which is the output of USBOTG2 PHY. Signed-off-by: Peter Chen Signed-off-by: Irina Tirdea Signed-off-by: Abel Vesa Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 07afb8db7340f9b6051a26c5c28f2ce74148f6b5 Author: Dinh Nguyen Date: Wed Mar 21 09:20:12 2018 -0500 clk: socfpga: stratix10: add clock driver for Stratix10 platform Add a clock driver for the Stratix10 SoC. The driver is similar to the Cyclone5/Arria10 platforms, with the exception that this driver only uses one single clock binding. Signed-off-by: Dinh Nguyen Signed-off-by: Stephen Boyd drivers/clk/Makefile | 1 + drivers/clk/socfpga/Makefile | 9 +- drivers/clk/socfpga/clk-gate-s10.c | 125 +++++++++++++ drivers/clk/socfpga/clk-periph-s10.c | 149 +++++++++++++++ drivers/clk/socfpga/clk-pll-s10.c | 146 +++++++++++++++ drivers/clk/socfpga/clk-s10.c | 345 +++++++++++++++++++++++++++++++++++ drivers/clk/socfpga/clk.h | 4 + drivers/clk/socfpga/stratix10-clk.h | 80 ++++++++ 8 files changed, 854 insertions(+), 5 deletions(-) commit 89727949ea1e5f8ec481cba4d5c71c32d8bff3bc Author: Dinh Nguyen Date: Wed Mar 21 09:20:10 2018 -0500 dt-bindings: documentation: add clock bindings information for Stratix10 Document that Stratix10 clock bindings, and add the clock header file. The clock header is an enumeration of all the different clocks on the Stratix10 platform. Signed-off-by: Dinh Nguyen Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/intc_stratix10.txt | 20 ++++++ include/dt-bindings/clock/stratix10-clock.h | 84 ++++++++++++++++++++++ 2 files changed, 104 insertions(+) commit e01bca2fc698d7f0626f0214001af523e18ad60b Author: Peng Hao Date: Sat Apr 7 05:47:32 2018 +0800 kvm: x86: fix a prototype warning Make the function static to avoid a warning: no previous prototype for ‘vmx_enable_tdp’ Signed-off-by: Peng Hao Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb1924809a0c3d54e177ed93257a10b4bf316896 Merge: 3239534 cba5957 Author: David S. Miller Date: Fri Apr 6 11:39:28 2018 -0400 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2018-04-06 This series contains a couple of fixes for the new ice driver. Wei Yongjun fixes the return error code for error case during init. Anirudh fixes the incorrect use of ARRAY_SIZE() in the ice ethtool code and fixed "for" loop calculations. ==================== Signed-off-by: David S. Miller commit 94e87a8bd529121ea90219164c65c36ea1d19e56 Author: Arnaldo Carvalho de Melo Date: Fri Apr 6 12:11:11 2018 -0300 perf hists browser: Remove leftover from row returned from refresh The per-browser screen refresh routine (ui_browser->refresh()) should return the first row that should be cleaned after the rows just printed, in case not all rows available on the screen gets filled. When moving the extra title lines logic from the hists browser to the generic ui_browser class, one piece of that logic remained in the hists browser and then when going back from the annotate browser to the hists browser in a case where fewer lines were displayed in the hists browser, for instance when filtering the entries per substring, one line of the annotate browser would remain on the screen, fix that. Example of the screen artifact: ================================================================================ Samples: 73K of event 'cycles:ppp', 4000 Hz, Event count (approx.): 45172901394 Overhead Shared O Symbol 0.30% [kernel] [k] __indirect_thunk_start 0.09% [kernel] [k] __x86_indirect_thunk_r10 │ lfence ================================================================================ Here from 'perf top' the view was zoomed with '/thunk' to functions having that substring, then the first was annotated and from the annotate browser ESC was pressed, then the first lines were overwritten, but the 'lfence' line remained due to the off by one bug fixed in this cset. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: ef9ff6017e3c ("perf ui browser: Move the extra title lines from the hists browser") Link: https://lkml.kernel.org/n/tip-odryfso74eaarm0z3e4v9owx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit fdae6400809aa179f8ca04e32f3eb176fb3b3a9d Author: Arnaldo Carvalho de Melo Date: Fri Apr 6 11:56:11 2018 -0300 perf hists browser: Show extra_title_lines in the 'D' debug hotkey To help in fixing problems in the browser. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-uj0n76yqh5bf98i0edckd47t@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 64b2f129c38713a059e1299662fc68fc6bf6f0a6 Author: Russell King Date: Wed Aug 31 08:49:48 2016 +0100 ARM: sa1100/simpad: switch simpad CF to use gpiod APIs Switch simpad's CF implementation to use the gpiod APIs. The inverted detection is handled using gpiolib's native inversion abilities. Signed-off-by: Russell King arch/arm/mach-sa1100/simpad.c | 11 +++++++++++ drivers/pcmcia/sa1100_simpad.c | 12 +++--------- 2 files changed, 14 insertions(+), 9 deletions(-) commit b51af86559d4b5c831abbec545c76f721a8d8237 Author: Russell King Date: Wed Aug 31 08:49:48 2016 +0100 ARM: sa1100/shannon: convert to generic CF sockets Convert shannon to use the generic CF socket support. Signed-off-by: Russell King arch/arm/mach-sa1100/Kconfig | 2 + arch/arm/mach-sa1100/shannon.c | 38 +++++++++++++++ drivers/pcmcia/Makefile | 1 - drivers/pcmcia/sa1100_generic.c | 3 -- drivers/pcmcia/sa1100_generic.h | 1 - drivers/pcmcia/sa1100_shannon.c | 104 ---------------------------------------- 6 files changed, 40 insertions(+), 109 deletions(-) commit 80c799dbf88d0b404e1304b469eb157e4e9e0fbf Author: Russell King Date: Wed Aug 31 08:49:48 2016 +0100 ARM: sa1100/nanoengine: convert to generic CF sockets Convert nanoengine to use the generic CF socket support. Makefile fix from Arnd Bergmann . Signed-off-by: Russell King arch/arm/mach-sa1100/nanoengine.c | 23 +++++++ drivers/pcmcia/Makefile | 1 - drivers/pcmcia/sa1100_generic.c | 3 - drivers/pcmcia/sa1100_generic.h | 1 - drivers/pcmcia/sa1100_nanoengine.c | 133 ------------------------------------- 5 files changed, 23 insertions(+), 138 deletions(-) commit cba5957d7e08fffd6237e4bd8f42adad057ab8bb Author: Anirudh Venkataramanan Date: Mon Apr 2 09:26:06 2018 -0700 ice: Bug fixes in ethtool code 1) Return correct size from ice_get_regs_len. 2) Fix incorrect use of ARRAY_SIZE in ice_get_regs. Fixes: fcea6f3da546 (ice: Add stats and ethtool support) Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63bb4e1ebd9876d250eea24d27a2caf3e0e3302c Author: Wei Yongjun Date: Wed Mar 28 12:50:45 2018 +0000 ice: Fix error return code in ice_init_hw() Fix to return error code ICE_ERR_NO_MEMORY from the alloc error handling case instead of 0, as done elsewhere in this function. Fixes: dc49c7723676 ("ice: Get MAC/PHY/link info and scheduler topology") Signed-off-by: Wei Yongjun Acked-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5f764419098671cfffcfc44f8a5220afd3e37864 Merge: 7432acf 86df107 Author: Bjorn Helgaas Date: Fri Apr 6 08:41:08 2018 -0500 Merge remote-tracking branch 'lorenzo/pci/cadence' into next * lorenzo/pci/cadence: MAINTAINERS: Add missing /drivers/pci/cadence directory entry commit 8d14f31ec9ac3e27fd451c23c760b59559c2ad27 Author: Liu, Changcheng Date: Fri Apr 6 21:14:15 2018 +0800 dts: remove cris & metag dts hard link file arch cris & metag have been removed from supported archs. The dts hard link files should also be removed, or the ctags tool will give warning. execute"ctags -R", output: ctags: Warning: cannot open source file "scripts/dtc/include-prefixes/cris" : No such file or directory ctags: Warning: cannot open source file "scripts/dtc/include-prefixes/metag" : No such file or directory Signed-off-by: Liu Changcheng Signed-off-by: Arnd Bergmann scripts/dtc/include-prefixes/cris | 1 - scripts/dtc/include-prefixes/metag | 1 - 2 files changed, 2 deletions(-) commit ec0328e46d6e5d0f17372eb90ab8e333c2ac7ca9 Author: David Howells Date: Wed Apr 4 13:41:28 2018 +0100 fscache: Maintain a catalogue of allocated cookies Maintain a catalogue of allocated cookies so that cookie collisions can be handled properly. For the moment, this just involves printing a warning and returning a NULL cookie to the caller of fscache_acquire_cookie(), but in future it might make sense to wait for the old cookie to finish being cleaned up. This requires the cookie key to be stored attached to the cookie so that we still have the key available if the netfs relinquishes the cookie. This is done by an earlier patch. The catalogue also renders redundant fscache_netfs_list (used for checking for duplicates), so that can be removed. Signed-off-by: David Howells Acked-by: Anna Schumaker Tested-by: Steve Dickson fs/fscache/cookie.c | 294 +++++++++++++++++++++++++++++++++-------- fs/fscache/internal.h | 7 + fs/fscache/netfs.c | 81 +++--------- include/linux/fscache.h | 8 +- include/trace/events/fscache.h | 8 ++ 5 files changed, 279 insertions(+), 119 deletions(-) commit ee1235a9a06813429c201bf186397a6feeea07bf Author: David Howells Date: Wed Apr 4 13:41:28 2018 +0100 fscache: Pass object size in rather than calling back for it Pass the object size in to fscache_acquire_cookie() and fscache_write_page() rather than the netfs providing a callback by which it can be received. This makes it easier to update the size of the object when a new page is written that extends the object. The current object size is also passed by fscache to the check_aux function, obviating the need to store it in the aux data. Signed-off-by: David Howells Acked-by: Anna Schumaker Tested-by: Steve Dickson Documentation/filesystems/caching/netfs-api.txt | 61 +++++++++++++------------ fs/9p/cache.c | 27 +++++------ fs/afs/cache.c | 24 ++-------- fs/afs/cell.c | 2 +- fs/afs/file.c | 6 ++- fs/afs/inode.c | 2 +- fs/afs/volume.c | 2 +- fs/cachefiles/interface.c | 5 +- fs/cachefiles/xattr.c | 6 ++- fs/ceph/cache.c | 26 ++++------- fs/cifs/cache.c | 15 ++---- fs/cifs/fscache.c | 14 +++--- fs/fscache/cookie.c | 18 ++++---- fs/fscache/fsdef.c | 6 ++- fs/fscache/object.c | 5 +- fs/fscache/page.c | 5 ++ fs/nfs/fscache-index.c | 19 +------- fs/nfs/fscache.c | 14 +++--- fs/nfs/fscache.h | 1 - include/linux/fscache-cache.h | 3 +- include/linux/fscache.h | 32 ++++++------- 21 files changed, 127 insertions(+), 166 deletions(-) commit 4e37958d1288ce90e8b8eb526ed93d6b2ee6cf54 Author: Steven Rostedt (VMware) Date: Mon Mar 26 13:31:07 2018 -0400 init, tracing: Have printk come through the trace events for initcall_debug With trace events set before and after the initcall function calls, instead of having a separate routine for printing out the initcalls when initcall_debug is specified on the kernel command line, have the code register a callback to the tracepoints where the initcall trace events are. This removes the need for having a separate function to do the initcalls as the tracepoint callbacks can handle the printk. It also includes other initcalls that are not called by the do_one_initcall() which includes console and security initcalls. Signed-off-by: Steven Rostedt (VMware) init/main.c | 51 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 16 deletions(-) commit 58eacfffc41735c9155becc73cb7f4dcc60a46a9 Author: Abderrahmane Benbachir Date: Thu Mar 22 20:33:28 2018 -0400 init, tracing: instrument security and console initcall trace events Trace events have been added around the initcall functions defined in init/main.c. But console and security have their own initcalls. This adds the trace events associated for those initcall functions. Link: http://lkml.kernel.org/r/1521765208.19745.2.camel@polymtl.ca Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Abderrahmane Benbachir Signed-off-by: Steven Rostedt (VMware) kernel/printk/printk.c | 7 ++++++- security/security.c | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) commit 4ee7c60de83ac01fa4c33c55937357601631e8ad Author: Steven Rostedt (VMware) Date: Fri Mar 23 10:18:03 2018 -0400 init, tracing: Add initcall trace events Being able to trace the start and stop of initcalls is useful to see where the timings are an issue. There is already an "initcall_debug" parameter, but that can cause a large overhead itself, as the printing of the information may take longer than the initcall functions. Adding in a start and finish trace event around the initcall functions, as well as a trace event that records the level of the initcalls, one can get a much finer measurement of the times and interactions of the initcalls themselves, as trace events are much lighter than printk()s. Suggested-by: Abderrahmane Benbachir Signed-off-by: Steven Rostedt (VMware) include/trace/events/initcall.h | 66 +++++++++++++++++++++++++++++++++++++++++ init/main.c | 7 +++++ 2 files changed, 73 insertions(+) commit 8ec8405f081e1e0f800b20f683451c37e81e26c1 Author: Steven Rostedt (VMware) Date: Thu Apr 5 15:20:26 2018 -0400 tracing: Add rcu dereference annotation for test func that touches filter->prog A boot up test function update_pred_fn() dereferences filter->prog without the proper rcu annotation. To do this, we must also take the event_mutex first. Normally, this isn't needed because this test function can not race with other use cases that touch the event filters (it is disabled if any events are enabled). Reported-by: kbuild test robot Fixes: 80765597bc587 ("tracing: Rewrite filter logic to be simpler and faster") Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_filter.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 1f3b0faa3e9dc713efce392af1f58542e735f822 Author: Steven Rostedt (VMware) Date: Thu Apr 5 13:39:36 2018 -0400 tracing: Add rcu dereference annotation for filter->prog ftrace_function_set_filter() referenences filter->prog without annotation and sparse complains about it. It needs a rcu_dereference_protected() wrapper. Reported-by: kbuild test robot Fixes: 80765597bc587 ("tracing: Rewrite filter logic to be simpler and faster") Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5125eee4e698f02b8e1a364ad5d7560f908d855f Author: Chris Wilson Date: Wed Apr 4 22:24:50 2018 +0100 tracing: Fixup logic inversion on setting trace_global_clock defaults In commit 932066a15335 ("tracing: Default to using trace_global_clock if sched_clock is unstable"), the logic for deciding to override the default clock if unstable was reversed from the earlier posting. I was trying to reduce the width of the message by using an early return rather than a if-block, but reverted back to using the if-block and accidentally left the predicate inverted. Link: http://lkml.kernel.org/r/20180404212450.26646-1-chris@chris-wilson.co.uk Fixes: 932066a15335 ("tracing: Default to using trace_global_clock if sched_clock is unstable") Signed-off-by: Chris Wilson Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7a1570da91558fb85b61e53243fe3fa79e2bbae Author: Steven Rostedt (VMware) Date: Wed Apr 4 14:50:15 2018 -0400 tracing: Hide global trace clock from lockdep Function tracing can trace in NMIs and such. If the TSC is determined to be unstable, the tracing clock will switch to the global clock on boot up, unless "trace_clock" is specified on the kernel command line. The global clock disables interrupts to access sched_clock_cpu(), and in doing so can be done within lockdep internals (because of function tracing and NMIs). This can trigger false lockdep splats. The trace_clock_global() is special, best not to trace the irq logic within it. Link: http://lkml.kernel.org/r/20180404145015.77bde42d@gandalf.local.home Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_clock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 927e56db6253225166d521cee3772624347b5cd5 Author: Steven Rostedt (VMware) Date: Wed Apr 4 11:29:57 2018 -0400 ring-buffer: Add set/clear_current_oom_origin() during allocations As si_mem_available() can say there is enough memory even though the memory available is not useable by the ring buffer, it is best to not kill innocent applications because the ring buffer is taking up all the memory while it is trying to allocate a great deal of memory. If the allocator is user space (because kernel threads can also increase the size of the kernel ring buffer on boot up), then after si_mem_available() says there is enough memory, set the OOM killer to kill the current task if an OOM triggers during the allocation. Link: http://lkml.kernel.org/r/20180404062340.GD6312@dhcp22.suse.cz Suggested-by: Michal Hocko Signed-off-by: Steven Rostedt (VMware) kernel/trace/ring_buffer.c | 48 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 10 deletions(-) commit 2a872fa4e9c8adc79c830e4009e1cc0c013a9d8a Author: Steven Rostedt (VMware) Date: Mon Apr 2 10:33:56 2018 -0400 ring-buffer: Check if memory is available before allocation The ring buffer is made up of a link list of pages. When making the ring buffer bigger, it will allocate all the pages it needs before adding to the ring buffer, and if it fails, it frees them and returns an error. This makes increasing the ring buffer size an all or nothing action. When this was first created, the pages were allocated with "NORETRY". This was to not cause any Out-Of-Memory (OOM) actions from allocating the ring buffer. But NORETRY was too strict, as the ring buffer would fail to expand even when there's memory available, but was taken up in the page cache. Commit 848618857d253 ("tracing/ring_buffer: Try harder to allocate") changed the allocating from NORETRY to RETRY_MAYFAIL. The RETRY_MAYFAIL would allocate from the page cache, but if there was no memory available, it would simple fail the allocation and not trigger an OOM. This worked fine, but had one problem. As the ring buffer would allocate one page at a time, it could take up all memory in the system before it failed to allocate and free that memory. If the allocation is happening and the ring buffer allocates all memory and then tries to take more than available, its allocation will not trigger an OOM, but if there's any allocation that happens someplace else, that could trigger an OOM, even though once the ring buffer's allocation fails, it would free up all the previous memory it tried to allocate, and allow other memory allocations to succeed. Commit d02bd27bd33dd ("mm/page_alloc.c: calculate 'available' memory in a separate function") separated out si_mem_availble() as a separate function that could be used to see how much memory is available in the system. Using this function to make sure that the ring buffer could be allocated before it tries to allocate pages we can avoid allocating all memory in the system and making it vulnerable to OOMs if other allocations are taking place. Link: http://lkml.kernel.org/r/1522320104-6573-1-git-send-email-zhaoyang.huang@spreadtrum.com CC: stable@vger.kernel.org Cc: linux-mm@kvack.org Fixes: 848618857d253 ("tracing/ring_buffer: Try harder to allocate") Requires: d02bd27bd33dd ("mm/page_alloc.c: calculate 'available' memory in a separate function") Reported-by: Zhaoyang Huang Tested-by: Joel Fernandes Signed-off-by: Steven Rostedt (VMware) kernel/trace/ring_buffer.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4c281074d2e7beb8179d81c3d2c2a53ae47dfa1c Author: Steven Rostedt (VMware) Date: Tue Apr 3 10:31:47 2018 -0400 lockdep: Add print_irqtrace_events() to __warn Running a test on a x86_32 kernel I triggered a bug that an interrupt disable/enable isn't being catched by lockdep. At least knowing where the last one was found would be helpful, but the warnings that are produced do not show this information. Even without debugging lockdep, having the WARN() display the last place hard and soft irqs were enabled or disabled is valuable. Signed-off-by: Steven Rostedt (VMware) kernel/panic.c | 2 ++ 1 file changed, 2 insertions(+) commit 1e6338cfb50e244c445ad7d891b35385bd0ee757 Author: Steven Rostedt (VMware) Date: Tue Apr 3 14:38:53 2018 -0400 vsprintf: Do not preprocess non-dereferenced pointers for bprintf (%px and %pK) Commit 841a915d20c7b2 ("printf: Do not have bprintf dereference pointers") would preprocess various pointers that are dereferenced in the bprintf() because the recording and printing are done at two different times. Some pointers stayed dereferenced in the ring buffer because user space could handle them (namely "%pS" and friends). Pointers that are not dereferenced should not be processed immediately but instead just saved directly. Cc: stable@vger.kernel.org Fixes: 841a915d20c7b2 ("printf: Do not have bprintf dereference pointers") Signed-off-by: Steven Rostedt (VMware) lib/vsprintf.c | 4 ++++ 1 file changed, 4 insertions(+) commit b28d7b2dc27f0eef1ae608b49d6860f2463910f1 Author: Dan Carpenter Date: Wed Mar 28 14:48:15 2018 +0300 tracing: Uninitialized variable in create_tracing_map_fields() Smatch complains that idx can be used uninitialized when we check if (idx < 0). It has to be the first iteration through the loop and the HIST_FIELD_FL_STACKTRACE bit has to be clear and the HIST_FIELD_FL_VAR bit has to be set to reach the bug. Link: http://lkml.kernel.org/r/20180328114815.GC29050@mwanda Fixes: 30350d65ac56 ("tracing: Add variable support to hist triggers") Acked-by: Tom Zanussi Signed-off-by: Dan Carpenter Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad452870c66e05819a99b491b500a13989a1c502 Author: Tom Zanussi Date: Wed Mar 28 15:10:56 2018 -0500 tracing: Make sure variable string fields are NULL-terminated The strncpy() currently being used for variable string fields can result in a lack of termination if the string length is equal to the field size. Use the safer strscpy() instead, which will guarantee termination. Link: http://lkml.kernel.org/r/fb97c1e518fb358c12a4057d7445ba2c46956cd7.1522256721.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 48f794731e4ca7b83b8b22a48bfc8641fa77dd09 Author: Tom Zanussi Date: Wed Mar 28 15:10:55 2018 -0500 tracing: Add action comparisons when testing matching hist triggers Actions also need to be considered when checking for matching triggers - triggers differing only by action should be allowed, but currently aren't because the matching check ignores the action and erroneously returns -EEXIST. Add and call an actions_match() function to address that. Here's an example using onmatch() actions. The first -EEXIST shouldn't occur because the onmatch() is different in the second wakeup_latency() param. The second -EEXIST shouldn't occur because it's a different action (in this case, it doesn't have an action, so shouldn't be seen as being the same and therefore rejected). In the after case, both are correctly accepted (and trying to add one of them again returns -EEXIST as it should). before: # echo 'wakeup_latency u64 lat; pid_t pid' >> /sys/kernel/debug/tracing/synthetic_events # echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0 if next_comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger # echo 'hist:keys=next_pid:onmatch(sched.sched_wakeup).wakeup_latency(sched.sched_switch.$wakeup_lat,next_pid) if next_comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger # echo 'hist:keys=next_pid:onmatch(sched.sched_wakeup).wakeup_latency(sched.sched_switch.$wakeup_lat,prev_pid) if next_comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger -su: echo: write error: File exists # echo 'hist:keys=next_pid if next_comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger -su: echo: write error: File exists after: # echo 'wakeup_latency u64 lat; pid_t pid' >> /sys/kernel/debug/tracing/synthetic_events # echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0 if next_comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger # echo 'hist:keys=next_pid:onmatch(sched.sched_wakeup).wakeup_latency(sched.sched_switch.$wakeup_lat,next_pid) if next_comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger # echo 'hist:keys=next_pid:onmatch(sched.sched_wakeup).wakeup_latency(sched.sched_switch.$wakeup_lat,prev_pid) if next_comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger # echo 'hist:keys=next_pid if next_comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger Link: http://lkml.kernel.org/r/a7fd668b87ec10736c8f016ac4279c8480d50c2b.1522256721.git.tom.zanussi@linux.intel.com Tested-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 76690945f59e2f329f148e1266d9d13800629463 Author: Tom Zanussi Date: Wed Mar 28 15:10:54 2018 -0500 tracing: Don't add flag strings when displaying variable references Variable references should never have flags appended when displayed - prevent that from happening. Before: # cat /sys/kernel/debug/tracing/events/sched/sched_switch/trigger hist:keys=next_pid:vals=hitcount:wakeup_lat=common_timestamp.usecs-$ts0.usecs:... After: hist:keys=next_pid:vals=hitcount:wakeup_lat=common_timestamp.usecs-$ts0:... Link: http://lkml.kernel.org/r/913318a5610ef6b24af2522575f671fa6ee19b6b.1522256721.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ae7961e75c3fe3383796323d5342cbda8f82536 Author: Tom Zanussi Date: Wed Mar 28 15:10:53 2018 -0500 tracing: Fix display of hist trigger expressions containing timestamps When displaying hist triggers, variable references that have the timestamp field flag set are erroneously displayed as common_timestamp rather than the variable reference. Additionally, timestamp expressions are displayed in the same way. Fix this by forcing the timestamp flag handling to follow variable reference and expression handling. Before: # cat /sys/kernel/debug/tracing/events/sched/sched_switch/trigger hist:keys=next_pid:vals=hitcount:wakeup_lat=common_timestamp.usecs:... After: # cat /sys/kernel/debug/tracing/events/sched/sched_switch/trigger hist:keys=next_pid:vals=hitcount:wakeup_lat=common_timestamp.usecs-$ts0.usecs:... Link: http://lkml.kernel.org/r/92746b06be67499c2a6217bd55395b350ad18fad.1522256721.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 419e9fe53b7941481941984ce271b0ce946c3914 Author: Salvatore Mesoraca Date: Fri Mar 30 10:53:08 2018 +0200 ftrace: Drop a VLA in module_exists() Avoid a VLA by using a real constant expression instead of a variable. The compiler should be able to optimize the original code and avoid using an actual VLA. Anyway this change is useful because it will avoid a false positive with -Wvla, it might also help the compiler generating better code. Link: http://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Link: http://lkml.kernel.org/r/1522399988-8815-1-git-send-email-s.mesoraca16@gmail.com Signed-off-by: Salvatore Mesoraca Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 913ea4d0b1074bac4c42a43ac1677dc56bbbcc52 Author: Chris Wilson Date: Fri Mar 30 16:01:32 2018 +0100 tracing: Mention trace_clock=global when warning about unstable clocks Mention the alternative of adding trace_clock=global to the kernel command line when we detect that we've used an unstable clock across a suspend/resume cycle. Link: http://lkml.kernel.org/r/20180330150132.16903-2-chris@chris-wilson.co.uk Signed-off-by: Chris Wilson Signed-off-by: Steven Rostedt (VMware) kernel/trace/ring_buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3fd49c9e48e2c09a18902695716a0d1aa387b6f4 Author: Chris Wilson Date: Fri Mar 30 16:01:31 2018 +0100 tracing: Default to using trace_global_clock if sched_clock is unstable Across suspend, we may see a very large drift in timestamps if the sched clock is unstable, prompting the global trace's ringbuffer code to warn and suggest switching to the global clock. Preempt this request by detecting when the sched clock is unstable (determined during late_initcall) and automatically switching the default clock over to trace_global_clock. This should prevent requiring user interaction to resolve warnings such as: Delta way too big! 18446743856563626466 ts=18446744054496180323 write stamp = 197932553857 If you just came from a suspend/resume, please switch to the trace global clock: echo global > /sys/kernel/debug/tracing/trace_clock Link: http://lkml.kernel.org/r/20180330150132.16903-1-chris@chris-wilson.co.uk Signed-off-by: Chris Wilson Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit b238db655796e74b59d9ece58b645ad0b494d615 Author: Adrian Hunter Date: Tue Mar 6 11:13:18 2018 +0200 perf auxtrace: Make auxtrace_queues__add_buffer() do CPU filtering In preparation for supporting AUX area sampling buffers, auxtrace_queues__add_buffer() needs to be more generic. To that end, move CPU filtering into it. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1520327598-1317-8-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/auxtrace.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit ce9f85c32678efd3ab9b8c9aade0f0ffed0016c5 Merge: d1e7e60 01f9751 Author: Ingo Molnar Date: Fri Apr 6 14:35:00 2018 +0200 Merge tag 'perf-urgent-for-mingo-4.17-20180406' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: - Show group details on the title line in the annotate browser and 'perf annotate --stdio2' output, so that the per-event columns can have headers (Arnaldo Carvalho de Melo) - Fixup vertical line separating metrics from instructions and cleaning unused lines at the bottom, both in the annotate TUI browser (Arnaldo Carvalho de Melo) - Remove duplicated 'samples' in lost samples warning in 'perf report' (Arnaldo Carvalho de Melo) - Synchronize i915_drm.h, silencing the perf build process, automagically adding support for the new DRM_I915_QUERY ioctl (Arnaldo Carvalho de Melo) - Make auxtrace_queues__add_buffer() allocate struct buffer, from a patchkit already applied (Adrian Hunter) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit d3056812e7dfe6bf4f8ad9e397a9116dd5d32d15 Author: Ming Lei Date: Thu Mar 8 18:53:58 2018 +0800 genirq/affinity: Spread irq vectors among present CPUs as far as possible Commit 84676c1f21 ("genirq/affinity: assign vectors to all possible CPUs") tried to spread the interrupts accross all possible CPUs to make sure that in case of phsyical hotplug (e.g. virtualization) the CPUs which get plugged in after the device was initialized are targeted by a hardware queue and the corresponding interrupt. This has a downside in cases where the ACPI tables claim that there are more possible CPUs than present CPUs and the number of interrupts to spread out is smaller than the number of possible CPUs. These bogus ACPI tables are unfortunately not uncommon. In such a case the vector spreading algorithm assigns interrupts to CPUs which can never be utilized and as a consequence these interrupts are unused instead of being mapped to present CPUs. As a result the performance of the device is suboptimal. To fix this spread the interrupt vectors in two stages: 1) Spread as many interrupts as possible among the present CPUs 2) Spread the remaining vectors among non present CPUs On a 8 core system, where CPU 0-3 are present and CPU 4-7 are not present, for a device with 4 queues the resulting interrupt affinity is: 1) Before 84676c1f21 ("genirq/affinity: assign vectors to all possible CPUs") irq 39, cpu list 0 irq 40, cpu list 1 irq 41, cpu list 2 irq 42, cpu list 3 2) With 84676c1f21 ("genirq/affinity: assign vectors to all possible CPUs") irq 39, cpu list 0-2 irq 40, cpu list 3-4,6 irq 41, cpu list 5 irq 42, cpu list 7 3) With the refined vector spread applied: irq 39, cpu list 0,4 irq 40, cpu list 1,6 irq 41, cpu list 2,5 irq 42, cpu list 3,7 On a 8 core system, where all CPUs are present the resulting interrupt affinity for the 4 queues is: irq 39, cpu list 0,1 irq 40, cpu list 2,3 irq 41, cpu list 4,5 irq 42, cpu list 6,7 This is independent of the number of CPUs which are online at the point of initialization because in such a system the offline CPUs can be easily onlined afterwards, while in non-present CPUs need to be plugged physically or virtually which requires external interaction. The downside of this approach is that in case of physical hotplug the interrupt vector spreading might be suboptimal when CPUs 4-7 are physically plugged. Suboptimal from a NUMA point of view and due to the single target nature of interrupt affinities the later plugged CPUs might not be targeted by interrupts at all. Though, physical hotplug systems are not the common case while the broken ACPI table disease is wide spread. So it's preferred to have as many interrupts as possible utilized at the point where the device is initialized. Block multi-queue devices like NVME create a hardware queue per possible CPU, so the goal of commit 84676c1f21 to assign one interrupt vector per possible CPU is still achieved even with physical/virtual hotplug. [ tglx: Changed from online to present CPUs for the first spreading stage, renamed variables for readability sake, added comments and massaged changelog ] Reported-by: Laurence Oberman Signed-off-by: Ming Lei Signed-off-by: Thomas Gleixner Reviewed-by: Christoph Hellwig Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: Christoph Hellwig Link: https://lkml.kernel.org/r/20180308105358.1506-5-ming.lei@redhat.com kernel/irq/affinity.c | 43 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) commit 1a2d0914e23aab386f5d5acb689777e24151c2c8 Author: Ming Lei Date: Thu Mar 8 18:53:57 2018 +0800 genirq/affinity: Allow irq spreading from a given starting point To support two stage irq vector spreading, it's required to add a starting point to the spreading function. No functional change, just preparatory work for the actual two stage change. [ tglx: Renamed variables, tidied up the code and massaged changelog ] Signed-off-by: Ming Lei Signed-off-by: Thomas Gleixner Reviewed-by: Christoph Hellwig Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: Laurence Oberman Cc: Christoph Hellwig Link: https://lkml.kernel.org/r/20180308105358.1506-4-ming.lei@redhat.com kernel/irq/affinity.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) commit b3e6aaa8d94d618e685c4df08bef991a4fb43923 Author: Ming Lei Date: Thu Mar 8 18:53:56 2018 +0800 genirq/affinity: Move actual irq vector spreading into a helper function No functional change, just prepare for converting to 2-stage irq vector spreading. Signed-off-by: Ming Lei Signed-off-by: Thomas Gleixner Reviewed-by: Christoph Hellwig Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: Laurence Oberman Cc: Christoph Hellwig Link: https://lkml.kernel.org/r/20180308105358.1506-3-ming.lei@redhat.com kernel/irq/affinity.c | 97 +++++++++++++++++++++++++++++---------------------- 1 file changed, 55 insertions(+), 42 deletions(-) commit 47778f33dcba7feb92031643b37e477892f82b62 Author: Ming Lei Date: Thu Mar 8 18:53:55 2018 +0800 genirq/affinity: Rename *node_to_possible_cpumask as *node_to_cpumask The following patches will introduce two stage irq spreading for improving irq spread on all possible CPUs. No functional change. Signed-off-by: Ming Lei Signed-off-by: Thomas Gleixner Reviewed-by: Christoph Hellwig Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: Laurence Oberman Cc: Christoph Hellwig Link: https://lkml.kernel.org/r/20180308105358.1506-2-ming.lei@redhat.com kernel/irq/affinity.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 0211e12dd0a5385ecffd3557bc570dbad7fcf245 Author: Thomas Gleixner Date: Wed Apr 4 12:40:07 2018 +0200 genirq/affinity: Don't return with empty affinity masks on error When the allocation of node_to_possible_cpumask fails, then irq_create_affinity_masks() returns with a pointer to the empty affinity masks array, which will cause malfunction. Reorder the allocations so the masks array allocation comes last and every failure path returns NULL. Fixes: 9a0ef98e186d ("genirq/affinity: Assign vectors to all present CPUs") Signed-off-by: Thomas Gleixner Cc: Christoph Hellwig Cc: Ming Lei kernel/irq/affinity.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 87fe2d543f817300e13f0ea683f38c122737856e Author: Sinan Kaya Date: Thu Apr 5 09:09:13 2018 -0400 io: change inX() to have their own IO barrier overrides Open code readX() inside inX() so that inX() variants have their own overrideable Port IO barrier combinations as __io_pbr() and __io_par() for actions to be taken before port IO and after port IO read. Signed-off-by: Sinan Kaya Signed-off-by: Arnd Bergmann include/asm-generic/io.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit a7851aa54c0cdd2f62457b72aee0da5d5586e514 Author: Sinan Kaya Date: Thu Apr 5 09:09:12 2018 -0400 io: change outX() to have their own IO barrier overrides Open code writeX() inside outX() so that outX() variants have their own overrideable Port IO barrier combinations as __io_pbw() and __io_paw() for actions to be taken before port IO and after port IO write. Signed-off-by: Sinan Kaya Signed-off-by: Arnd Bergmann include/asm-generic/io.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 755bd04aaf4bf7c49ce8aad2677ea4d14271fc46 Author: Sinan Kaya Date: Thu Apr 5 09:09:11 2018 -0400 io: define stronger ordering for the default writeX() implementation The default implementation of mapping writeX() to __raw_writeX() is wrong. writeX() has stronger ordering semantics. Compiler is allowed to reorder memory writes against __raw_writeX(). Use the previously defined __io_aw() and __io_bw() macros to harden code generation according to architecture support. Signed-off-by: Sinan Kaya Signed-off-by: Arnd Bergmann include/asm-generic/io.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 032d59e1cde9dd71bb5918e1f6529776623ee86b Author: Sinan Kaya Date: Thu Apr 5 09:09:10 2018 -0400 io: define stronger ordering for the default readX() implementation The default implementation of mapping readX() to __raw_readX() is wrong. readX() has stronger ordering semantics. Compiler is allowed to reorder __raw_readX() against the memory accesses following register read. Use the previously defined __io_ar() and __io_br() macros to harden code generation according to architecture support. Signed-off-by: Sinan Kaya Signed-off-by: Arnd Bergmann include/asm-generic/io.h | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) commit 64e2c6738b4d49d69d697b5887f72ad07c206ab3 Author: Sinan Kaya Date: Thu Apr 5 09:09:09 2018 -0400 io: define several IO & PIO barrier types for the asm-generic version Getting ready to harden readX()/writeX() and inX()/outX() semantics for the generic implementation. Defining two set of macros as __io_br() and __io_ar() to indicate actions to be taken before and after MMIO read. Defining two set of macros as __io_bw() and __io_aw() to indicate actions to be taken before and after MMIO write. Defining two set of macros as __io_pbw() and __io_paw() to indicate actions to be taken before and after Port IO write. Defining two set of macros as __io_pbr() and __io_par() to indicate actions to be taken before and after Port IO read. If rmb() is available for the architecture, prefer rmb() as the default implementation of __io_ar()/__io_par(). If wmb() is available for the architecture, prefer wmb() as the default implementation of __io_bw()/__io_pbw(). Signed-off-by: Sinan Kaya Signed-off-by: Arnd Bergmann include/asm-generic/io.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 45f1ff59e27ca59d33cc1a317e669d90022ccf7d Author: Rafael J. Wysocki Date: Thu Mar 22 17:50:49 2018 +0100 cpuidle: Return nohz hint from cpuidle_select() Add a new pointer argument to cpuidle_select() and to the ->select cpuidle governor callback to allow a boolean value indicating whether or not the tick should be stopped before entering the selected state to be returned from there. Make the ladder governor ignore that pointer (to preserve its current behavior) and make the menu governor return 'false" through it if: (1) the idle exit latency is constrained at 0, or (2) the selected state is a polling one, or (3) the expected idle period duration is within the tick period range. In addition to that, the correction factor computations in the menu governor need to take the possibility that the tick may not be stopped into account to avoid artificially small correction factor values. To that end, add a mechanism to record tick wakeups, as suggested by Peter Zijlstra, and use it to modify the menu_update() behavior when tick wakeup occurs. Namely, if the CPU is woken up by the tick and the return value of tick_nohz_get_sleep_length() is not within the tick boundary, the predicted idle duration is likely too short, so make menu_update() try to compensate for that by updating the governor statistics as though the CPU was idle for a long time. Since the value returned through the new argument pointer of cpuidle_select() is not used by its caller yet, this change by itself is not expected to alter the functionality of the code. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) drivers/cpuidle/cpuidle.c | 10 +++++-- drivers/cpuidle/governors/ladder.c | 3 +- drivers/cpuidle/governors/menu.c | 59 ++++++++++++++++++++++++++++++-------- include/linux/cpuidle.h | 8 ++++-- include/linux/tick.h | 2 ++ kernel/sched/idle.c | 4 ++- kernel/time/tick-sched.c | 20 +++++++++++++ 7 files changed, 87 insertions(+), 19 deletions(-) commit efefc97736e6f3261879bc9dddcb161224a455f5 Author: Rafael J. Wysocki Date: Tue Mar 20 10:11:28 2018 +0100 jiffies: Introduce USER_TICK_USEC and redefine TICK_USEC Since the subsequent changes will need a TICK_USEC definition analogous to TICK_NSEC, rename the existing TICK_USEC as USER_TICK_USEC, update its users and redefine TICK_USEC accordingly. Suggested-by: Peter Zijlstra Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Reviewed-by: Frederic Weisbecker drivers/net/ethernet/sfc/mcdi.c | 2 +- include/linux/jiffies.h | 7 +++++-- kernel/time/ntp.c | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) commit 730b2ad8f72898029160a6832141ba954122a0c8 Author: Sibi Sankar Date: Tue Apr 3 23:45:15 2018 +0530 remoteproc: fix null pointer dereference on glink only platforms Currently calling list_del on smd subdev remove path results in null pointer dereference on glink only platforms. Fix this by adding safety checks in glink/smd subdev remove paths. Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_common.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 97b1255cb27c551d7c3c5c496d787da40772da99 Author: Tetsuo Handa Date: Thu Apr 5 16:25:45 2018 -0700 mm,oom_reaper: check for MMF_OOM_SKIP before complaining I got "oom_reaper: unable to reap pid:" messages when the victim thread was blocked inside free_pgtables() (which occurred after returning from unmap_vmas() and setting MMF_OOM_SKIP). We don't need to complain when exit_mmap() already set MMF_OOM_SKIP. Killed process 7558 (a.out) total-vm:4176kB, anon-rss:84kB, file-rss:0kB, shmem-rss:0kB oom_reaper: unable to reap pid:7558 (a.out) a.out D13272 7558 6931 0x00100084 Call Trace: schedule+0x2d/0x80 rwsem_down_write_failed+0x2bb/0x440 call_rwsem_down_write_failed+0x13/0x20 down_write+0x49/0x60 unlink_file_vma+0x28/0x50 free_pgtables+0x36/0x100 exit_mmap+0xbb/0x180 mmput+0x50/0x110 copy_process.part.41+0xb61/0x1fe0 _do_fork+0xe6/0x560 do_syscall_64+0x74/0x230 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Link: http://lkml.kernel.org/r/201803221946.DHG65638.VFJHFtOSQLOMOF@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Acked-by: David Rientjes Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 77da2ba0648a4fd52e5ff97b8b2b8dd312aec4b0 Author: Claudio Imbrenda Date: Thu Apr 5 16:25:41 2018 -0700 mm/ksm: fix interaction with THP This patch fixes a corner case for KSM. When two pages belong or belonged to the same transparent hugepage, and they should be merged, KSM fails to split the page, and therefore no merging happens. This bug can be reproduced by: * making sure ksm is running (in case disabling ksmtuned) * enabling transparent hugepages * allocating a THP-aligned 1-THP-sized buffer e.g. on amd64: posix_memalign(&p, 1<<21, 1<<21) * filling it with the same values e.g. memset(p, 42, 1<<21) * performing madvise to make it mergeable e.g. madvise(p, 1<<21, MADV_MERGEABLE) * waiting for KSM to perform a few scans The expected outcome is that the all the pages get merged (1 shared and the rest sharing); the actual outcome is that no pages get merged (1 unshared and the rest volatile) The reason of this behaviour is that we increase the reference count once for both pages we want to merge, but if they belong to the same hugepage (or compound page), the reference counter used in both cases is the one of the head of the compound page. This means that split_huge_page will find a value of the reference counter too high and will fail. This patch solves this problem by testing if the two pages to merge belong to the same hugepage when attempting to merge them. If so, the hugepage is split safely. This means that the hugepage is not split if not necessary. Link: http://lkml.kernel.org/r/1521548069-24758-1-git-send-email-imbrenda@linux.vnet.ibm.com Signed-off-by: Claudio Imbrenda Co-authored-by: Gerald Schaefer Reviewed-by: Andrew Morton Cc: Andrea Arcangeli Cc: Minchan Kim Cc: Kirill A. Shutemov Cc: Hugh Dickins Cc: Christian Borntraeger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 644d87dccdc69cf79834a72ed0c889580d6af32a Author: Stefan Agner Date: Thu Apr 5 16:25:38 2018 -0700 mm/memblock.c: cast constant ULLONG_MAX to phys_addr_t This fixes a warning shown when phys_addr_t is 32-bit int when compiling with clang: mm/memblock.c:927:15: warning: implicit conversion from 'unsigned long long' to 'phys_addr_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion] r->base : ULLONG_MAX; ^~~~~~~~~~ ./include/linux/kernel.h:30:21: note: expanded from macro 'ULLONG_MAX' #define ULLONG_MAX (~0ULL) ^~~~~ Link: http://lkml.kernel.org/r/20180319005645.29051-1-stefan@agner.ch Signed-off-by: Stefan Agner Reviewed-by: Andrew Morton Cc: Michal Hocko Cc: Catalin Marinas Cc: Pavel Tatashin Cc: Ard Biesheuvel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memblock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 514c60324960137e74457fdc233a339b985fa8a8 Author: Randy Dunlap Date: Thu Apr 5 16:25:34 2018 -0700 headers: untangle kmemleak.h from mm.h Currently #includes for no obvious reason. It looks like it's only a convenience, so remove kmemleak.h from slab.h and add to any users of kmemleak_* that don't already #include it. Also remove from source files that do not use it. This is tested on i386 allmodconfig and x86_64 allmodconfig. It would be good to run it through the 0day bot for other $ARCHes. I have neither the horsepower nor the storage space for the other $ARCHes. Update: This patch has been extensively build-tested by both the 0day bot & kisskb/ozlabs build farms. Both of them reported 2 build failures for which patches are included here (in v2). [ slab.h is the second most used header file after module.h; kernel.h is right there with slab.h. There could be some minor error in the counting due to some #includes having comments after them and I didn't combine all of those. ] [akpm@linux-foundation.org: security/keys/big_key.c needs vmalloc.h, per sfr] Link: http://lkml.kernel.org/r/e4309f98-3749-93e1-4bb7-d9501a39d015@infradead.org Link: http://kisskb.ellerman.id.au/kisskb/head/13396/ Signed-off-by: Randy Dunlap Reviewed-by: Ingo Molnar Reported-by: Michael Ellerman [2 build failures] Reported-by: Fengguang Wu [2 build failures] Reviewed-by: Andrew Morton Cc: Wei Yongjun Cc: Luis R. Rodriguez Cc: Greg Kroah-Hartman Cc: Mimi Zohar Cc: John Johansen Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/sysdev/dart_iommu.c | 1 + arch/powerpc/sysdev/msi_bitmap.c | 1 + arch/s390/kernel/nmi.c | 2 +- arch/s390/kernel/smp.c | 1 - arch/sparc/kernel/irq_64.c | 1 - arch/x86/kernel/pci-dma.c | 1 - drivers/iommu/exynos-iommu.c | 1 + drivers/iommu/mtk_iommu_v1.c | 1 - drivers/net/ethernet/ti/cpsw.c | 1 + drivers/net/wireless/realtek/rtlwifi/pci.c | 1 - drivers/net/wireless/realtek/rtlwifi/rtl8192c/fw_common.c | 1 - drivers/staging/rtl8188eu/hal/fw.c | 2 +- drivers/staging/rtlwifi/pci.c | 1 - drivers/virtio/virtio_ring.c | 1 - include/linux/slab.h | 1 - kernel/ucount.c | 1 + lib/test_firmware.c | 1 + mm/cma.c | 1 + mm/memblock.c | 1 + net/core/sysctl_net_core.c | 1 - net/ipv4/route.c | 1 - security/apparmor/lsm.c | 1 - security/keys/big_key.c | 1 + 23 files changed, 11 insertions(+), 14 deletions(-) commit 91241681c62a5a690c88eb2aca027f094125eaac Author: Michal Hocko Date: Thu Apr 5 16:25:30 2018 -0700 include/linux/mmdebug.h: make VM_WARN* non-rvals At present the construct if (VM_WARN(...)) will compile OK with CONFIG_DEBUG_VM=y and will fail with CONFIG_DEBUG_VM=n. The reason is that VM_{WARN,BUG}* have always been special wrt. {WARN/BUG}* and never generate any code when DEBUG_VM is disabled. So we cannot really use it in conditionals. We considered changing things so that this construct works in both cases but that might cause unwanted code generation with CONFIG_DEBUG_VM=n. It is safer and simpler to make the build fail in both cases. [akpm@linux-foundation.org: changelog] Signed-off-by: Michal Hocko Reviewed-by: Andrew Morton Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmdebug.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2c7452a075d4db2dc8e7a61369ede1afc05cd63e Author: Mike Kravetz Date: Thu Apr 5 16:25:26 2018 -0700 mm/page_isolation.c: make start_isolate_page_range() fail if already isolated start_isolate_page_range() is used to set the migrate type of a set of pageblocks to MIGRATE_ISOLATE while attempting to start a migration operation. It assumes that only one thread is calling it for the specified range. This routine is used by CMA, memory hotplug and gigantic huge pages. Each of these users synchronize access to the range within their subsystem. However, two subsystems (CMA and gigantic huge pages for example) could attempt operations on the same range. If this happens, one thread may 'undo' the work another thread is doing. This can result in pageblocks being incorrectly left marked as MIGRATE_ISOLATE and therefore not available for page allocation. What is ideally needed is a way to synchronize access to a set of pageblocks that are undergoing isolation and migration. The only thing we know about these pageblocks is that they are all in the same zone. A per-node mutex is too coarse as we want to allow multiple operations on different ranges within the same zone concurrently. Instead, we will use the migration type of the pageblocks themselves as a form of synchronization. start_isolate_page_range sets the migration type on a set of page- blocks going in order from the one associated with the smallest pfn to the largest pfn. The zone lock is acquired to check and set the migration type. When going through the list of pageblocks check if MIGRATE_ISOLATE is already set. If so, this indicates another thread is working on this pageblock. We know exactly which pageblocks we set, so clean up by undo those and return -EBUSY. This allows start_isolate_page_range to serve as a synchronization mechanism and will allow for more general use of callers making use of these interfaces. Update comments in alloc_contig_range to reflect this new functionality. Each CPU holds the associated zone lock to modify or examine the migration type of a pageblock. And, it will only examine/update a single pageblock per lock acquire/release cycle. Link: http://lkml.kernel.org/r/20180309224731.16978-1-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Reviewed-by: Andrew Morton Cc: KAMEZAWA Hiroyuki Cc: Luiz Capitulino Cc: Michal Nazarewicz Cc: Michal Hocko Cc: Vlastimil Babka Cc: Mel Gorman Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 8 ++++---- mm/page_isolation.c | 18 +++++++++++++++++- 2 files changed, 21 insertions(+), 5 deletions(-) commit 1c8f422059ae5da07db7406ab916203f9417e396 Author: Souptick Joarder Date: Thu Apr 5 16:25:23 2018 -0700 mm: change return type to vm_fault_t The plan for these patches is to introduce the typedef, initially just as documentation ("These functions should return a VM_FAULT_ status"). We'll trickle the patches to individual drivers/filesystems in through the maintainers, as far as possible. Then we'll change the typedef to an unsigned int and break the compilation of any unconverted drivers/filesystems. vmf_insert_page(), vmf_insert_mixed() and vmf_insert_pfn() are three newly added functions. The various drivers/filesystems where return value of fault(), huge_fault(), page_mkwrite() and pfn_mkwrite() get converted, will need them. These functions will return correct VM_FAULT_ code based on err value. We've had bugs before where drivers returned -EFOO. And we have this silly inefficiency where vm_insert_xxx() return an errno which (afaict) every driver then converts into a VM_FAULT code. In many cases drivers failed to return correct VM_FAULT code value despite of vm_insert_xxx() fails. We have indentified and clean up all those existing bugs and silly inefficiencies in driver/filesystems by adding these three new inline wrappers. As mentioned above, we will trickle those patches to individual drivers/filesystems in through maintainers after these three wrapper functions are merged. Eventually we can convert vm_insert_xxx() into vmf_insert_xxx() and remove these inline wrappers, but these are a good intermediate step. Link: http://lkml.kernel.org/r/20180310162351.GA7422@jordon-HP-15-Notebook-PC Signed-off-by: Souptick Joarder Acked-by: Michal Hocko Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 47 +++++++++++++++++++++++++++++++++++++++++++---- include/linux/mm_types.h | 2 ++ 2 files changed, 45 insertions(+), 4 deletions(-) commit d46078b2888947a86b6bb997cd5927e602e8fdc9 Author: David Rientjes Date: Thu Apr 5 16:25:19 2018 -0700 mm, oom: remove 3% bonus for CAP_SYS_ADMIN processes Since the 2.6 kernel, the oom killer has slightly biased away from CAP_SYS_ADMIN processes by discounting some of its memory usage in comparison to other processes. This has always been implicit and nothing exactly relies on the behavior. Gaurav notices that __task_cred() can dereference a potentially freed pointer if the task under consideration is exiting because a reference to the task_struct is not held. Remove the CAP_SYS_ADMIN bias so that all processes are treated equally. If any CAP_SYS_ADMIN process would like to be biased against, it is always allowed to adjust /proc/pid/oom_score_adj. Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1803071548510.6996@chino.kir.corp.google.com Signed-off-by: David Rientjes Reported-by: Gaurav Kohli Acked-by: Michal Hocko Cc: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 7 ------- 1 file changed, 7 deletions(-) commit 5ecd9d403ad081ed2de7b118c1e96124d4e0ba6c Author: David Rientjes Date: Thu Apr 5 16:25:16 2018 -0700 mm, page_alloc: wakeup kcompactd even if kswapd cannot free more memory Kswapd will not wakeup if per-zone watermarks are not failing or if too many previous attempts at background reclaim have failed. This can be true if there is a lot of free memory available. For high- order allocations, kswapd is responsible for waking up kcompactd for background compaction. If the zone is not below its watermarks or reclaim has recently failed (lots of free memory, nothing left to reclaim), kcompactd does not get woken up. When __GFP_DIRECT_RECLAIM is not allowed, allow kcompactd to still be woken up even if kswapd will not reclaim. This allows high-order allocations, such as thp, to still trigger background compaction even when the zone has an abundance of free memory. Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1803111659420.209721@chino.kir.corp.google.com Signed-off-by: David Rientjes Acked-by: Vlastimil Babka Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .../trace/postprocess/trace-vmscan-postprocess.pl | 4 +-- include/linux/mmzone.h | 3 +- include/trace/events/vmscan.h | 17 +++++++----- mm/page_alloc.c | 14 ++++++---- mm/vmscan.c | 32 ++++++++++++++++------ 5 files changed, 45 insertions(+), 25 deletions(-) commit 3eda69c92d4751977baf2d34e88a29d4b6affa7d Author: Mark Rutland Date: Thu Apr 5 16:25:12 2018 -0700 kernel/fork.c: detect early free of a live mm KASAN splats indicate that in some cases we free a live mm, then continue to access it, with potentially disastrous results. This is likely due to a mismatched mmdrop() somewhere in the kernel, but so far the culprit remains elusive. Let's have __mmdrop() verify that the mm isn't live for the current task, similar to the existing check for init_mm. This way, we can catch this class of issue earlier, and without requiring KASAN. Currently, idle_task_exit() leaves active_mm stale after it switches to init_mm. This isn't harmful, but will trigger the new assertions, so we must adjust idle_task_exit() to update active_mm. Link: http://lkml.kernel.org/r/20180312140103.19235-1-mark.rutland@arm.com Signed-off-by: Mark Rutland Reviewed-by: Andrew Morton Cc: Ingo Molnar Cc: Mathieu Desnoyers Cc: Michal Hocko Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/fork.c | 2 ++ kernel/sched/core.c | 1 + 2 files changed, 3 insertions(+) commit 0c7c1bed7e13dbb545375c231e6ba1dca5e8d725 Author: Kirill Tkhai Date: Thu Apr 5 16:25:08 2018 -0700 mm: make counting of list_lru_one::nr_items lockless During the reclaiming slab of a memcg, shrink_slab iterates over all registered shrinkers in the system, and tries to count and consume objects related to the cgroup. In case of memory pressure, this behaves bad: I observe high system time and time spent in list_lru_count_one() for many processes on RHEL7 kernel. This patch makes list_lru_node::memcg_lrus rcu protected, that allows to skip taking spinlock in list_lru_count_one(). Shakeel Butt with the patch observes significant perf graph change. He says: ======================================================================== Setup: running a fork-bomb in a memcg of 200MiB on a 8GiB and 4 vcpu VM and recording the trace with 'perf record -g -a'. The trace without the patch: + 34.19% fb.sh [kernel.kallsyms] [k] queued_spin_lock_slowpath + 30.77% fb.sh [kernel.kallsyms] [k] _raw_spin_lock + 3.53% fb.sh [kernel.kallsyms] [k] list_lru_count_one + 2.26% fb.sh [kernel.kallsyms] [k] super_cache_count + 1.68% fb.sh [kernel.kallsyms] [k] shrink_slab + 0.59% fb.sh [kernel.kallsyms] [k] down_read_trylock + 0.48% fb.sh [kernel.kallsyms] [k] _raw_spin_unlock_irqrestore + 0.38% fb.sh [kernel.kallsyms] [k] shrink_node_memcg + 0.32% fb.sh [kernel.kallsyms] [k] queue_work_on + 0.26% fb.sh [kernel.kallsyms] [k] count_shadow_nodes With the patch: + 0.16% swapper [kernel.kallsyms] [k] default_idle + 0.13% oom_reaper [kernel.kallsyms] [k] mutex_spin_on_owner + 0.05% perf [kernel.kallsyms] [k] copy_user_generic_string + 0.05% init.real [kernel.kallsyms] [k] wait_consider_task + 0.05% kworker/0:0 [kernel.kallsyms] [k] finish_task_switch + 0.04% kworker/2:1 [kernel.kallsyms] [k] finish_task_switch + 0.04% kworker/3:1 [kernel.kallsyms] [k] finish_task_switch + 0.04% kworker/1:0 [kernel.kallsyms] [k] finish_task_switch + 0.03% binary [kernel.kallsyms] [k] copy_page ======================================================================== Thanks Shakeel for the testing. [ktkhai@virtuozzo.com: v2] Link: http://lkml.kernel.org/r/151203869520.3915.2587549826865799173.stgit@localhost.localdomain Link: http://lkml.kernel.org/r/150583358557.26700.8490036563698102569.stgit@localhost.localdomain Signed-off-by: Kirill Tkhai Tested-by: Shakeel Butt Acked-by: Vladimir Davydov Cc: Andrey Ryabinin Cc: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/list_lru.h | 3 ++- mm/list_lru.c | 67 ++++++++++++++++++++++++++++++++---------------- 2 files changed, 47 insertions(+), 23 deletions(-) commit f5c754d63d069dabe2afc6f248188b5148e08687 Author: Colin Ian King Date: Thu Apr 5 16:25:05 2018 -0700 mm/swap_state.c: make bool enable_vma_readahead and swap_vma_readahead() static The bool enable_vma_readahead and swap_vma_readahead() are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: mm/swap_state.c:41:6: warning: symbol 'enable_vma_readahead' was not declared. Should it be static? mm/swap_state.c:742:13: warning: symbol 'swap_vma_readahead' was not declared. Should it be static? Link: http://lkml.kernel.org/r/20180223164852.5159-1-colin.king@canonical.com Signed-off-by: Colin Ian King Reviewed-by: Andrew Morton Acked-by: "Huang, Ying" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap_state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3172485f4f8032649c144e4aafa550e1e6179332 Author: Jeff Moyer Date: Thu Apr 5 16:25:01 2018 -0700 block_invalidatepage(): only release page if the full page was invalidated Prior to commit d47992f86b30 ("mm: change invalidatepage prototype to accept length"), an offset of 0 meant that the full page was being invalidated. After that commit, we need to instead check the length. Jan said: : : The only possible issue is that try_to_release_page() was called more : often than necessary. Otherwise the issue is harmless but still it's good : to have this fixed. Link: http://lkml.kernel.org/r/x49fu5rtnzs.fsf@segfault.boston.devel.redhat.com Fixes: d47992f86b307 ("mm: change invalidatepage prototype to accept length") Signed-off-by: Jeff Moyer Reviewed-by: Jan Kara Cc: Lukas Czerner Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8b098fc5747a7c871f113c9eb65453cc2d86e6f Author: Mike Rapoport Date: Thu Apr 5 16:24:57 2018 -0700 mm: kernel-doc: add missing parameter descriptions Link: http://lkml.kernel.org/r/1519585191-10180-4-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/cma.c | 5 +++++ mm/compaction.c | 1 + mm/kmemleak.c | 10 ++++++++++ mm/memory_hotplug.c | 6 ++++++ mm/oom_kill.c | 2 ++ mm/pagewalk.c | 3 +++ mm/rmap.c | 1 + mm/zsmalloc.c | 2 ++ 8 files changed, 30 insertions(+) commit 002843de36e18bd5be6f5bb858c0de18b6447a64 Author: Mike Rapoport Date: Thu Apr 5 16:24:53 2018 -0700 mm/swap.c: remove @cold parameter description for release_pages() The 'cold' parameter was removed from release_pages function by commit c6f92f9fbe7d ("mm: remove cold parameter for release_pages"). Update the description to match the code. Link: http://lkml.kernel.org/r/1519585191-10180-3-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap.c | 1 - 1 file changed, 1 deletion(-) commit e48e3c590aac5ba9a7b6106239543c251931ba2d Author: Mike Rapoport Date: Thu Apr 5 16:24:50 2018 -0700 mm/nommu: remove description of alloc_vm_area The alloc_mm_area in nommu is a stub, but its description states it allocates kernel address space. Remove the description to make the code and the documentation agree. Link: http://lkml.kernel.org/r/1519585191-10180-2-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/nommu.c | 12 ------------ 1 file changed, 12 deletions(-) commit 60f5921a9a4f126e081318bd6bb2bc2798b7bba8 Author: Sergey Senozhatsky Date: Thu Apr 5 16:24:47 2018 -0700 zram: drop max_zpage_size and use zs_huge_class_size() Remove ZRAM's enforced "huge object" value and use zsmalloc huge-class watermark instead, which makes more sense. TEST - I used a 1G zram device, LZO compression back-end, original data set size was 444MB. Looking at zsmalloc classes stats the test ended up to be pretty fair. BASE ZRAM/ZSMALLOC ===================== zram mm_stat 498978816 191482495 199831552 0 199831552 15634 0 zsmalloc classes class size almost_full almost_empty obj_allocated obj_used pages_used pages_per_zspage freeable ... 151 2448 0 0 1240 1240 744 3 0 168 2720 0 0 4200 4200 2800 2 0 190 3072 0 0 10100 10100 7575 3 0 202 3264 0 0 380 380 304 4 0 254 4096 0 0 10620 10620 10620 1 0 Total 7 46 106982 106187 48787 0 PATCHED ZRAM/ZSMALLOC ===================== zram mm_stat 498978816 182579184 194248704 0 194248704 15628 0 zsmalloc classes class size almost_full almost_empty obj_allocated obj_used pages_used pages_per_zspage freeable ... 151 2448 0 0 1240 1240 744 3 0 168 2720 0 0 4200 4200 2800 2 0 190 3072 0 0 10100 10100 7575 3 0 202 3264 0 0 7180 7180 5744 4 0 254 4096 0 0 3820 3820 3820 1 0 Total 8 45 106959 106193 47424 0 As we can see, we reduced the number of objects stored in class-4096, because a huge number of objects which we previously forcibly stored in class-4096 now stored in non-huge class-3264. This results in lower memory consumption: - zsmalloc now uses 47424 physical pages, which is less than 48787 pages zsmalloc used before. - objects that we store in class-3264 share zspages. That's why overall the number of pages that both class-4096 and class-3264 consumed went down from 10924 to 9564. [sergey.senozhatsky.work@gmail.com: add pool param to zs_huge_class_size()] Link: http://lkml.kernel.org/r/20180314081833.1096-3-sergey.senozhatsky@gmail.com Link: http://lkml.kernel.org/r/20180306070639.7389-3-sergey.senozhatsky@gmail.com Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 9 ++++++++- drivers/block/zram/zram_drv.h | 16 ---------------- 2 files changed, 8 insertions(+), 17 deletions(-) commit 010b495e2fa32353d0ef6aa70a8169e5ef617a15 Author: Sergey Senozhatsky Date: Thu Apr 5 16:24:43 2018 -0700 zsmalloc: introduce zs_huge_class_size() Patch series "zsmalloc/zram: drop zram's max_zpage_size", v3. ZRAM's max_zpage_size is a bad thing. It forces zsmalloc to store normal objects as huge ones, which results in bigger zsmalloc memory usage. Drop it and use actual zsmalloc huge-class value when decide if the object is huge or not. This patch (of 2): Not every object can be share its zspage with other objects, e.g. when the object is as big as zspage or nearly as big a zspage. For such objects zsmalloc has a so called huge class - every object which belongs to huge class consumes the entire zspage (which consists of a physical page). On x86_64, PAGE_SHIFT 12 box, the first non-huge class size is 3264, so starting down from size 3264, objects can share page(-s) and thus minimize memory wastage. ZRAM, however, has its own statically defined watermark for huge objects, namely "3 * PAGE_SIZE / 4 = 3072", and forcibly stores every object larger than this watermark (3072) as a PAGE_SIZE object, in other words, to a huge class, while zsmalloc can keep some of those objects in non-huge classes. This results in increased memory consumption. zsmalloc knows better if the object is huge or not. Introduce zs_huge_class_size() function which tells if the given object can be stored in one of non-huge classes or not. This will let us to drop ZRAM's huge object watermark and fully rely on zsmalloc when we decide if the object is huge. [sergey.senozhatsky.work@gmail.com: add pool param to zs_huge_class_size()] Link: http://lkml.kernel.org/r/20180314081833.1096-2-sergey.senozhatsky@gmail.com Link: http://lkml.kernel.org/r/20180306070639.7389-2-sergey.senozhatsky@gmail.com Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/zsmalloc.h | 2 ++ mm/zsmalloc.c | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) commit cb9f753a3731f7fe16447bea45cb6f8e8bb432fb Author: Huang Ying Date: Thu Apr 5 16:24:39 2018 -0700 mm: fix races between swapoff and flush dcache Thanks to commit 4b3ef9daa4fc ("mm/swap: split swap cache into 64MB trunks"), after swapoff the address_space associated with the swap device will be freed. So page_mapping() users which may touch the address_space need some kind of mechanism to prevent the address_space from being freed during accessing. The dcache flushing functions (flush_dcache_page(), etc) in architecture specific code may access the address_space of swap device for anonymous pages in swap cache via page_mapping() function. But in some cases there are no mechanisms to prevent the swap device from being swapoff, for example, CPU1 CPU2 __get_user_pages() swapoff() flush_dcache_page() mapping = page_mapping() ... exit_swap_address_space() ... kvfree(spaces) mapping_mapped(mapping) The address space may be accessed after being freed. But from cachetlb.txt and Russell King, flush_dcache_page() only care about file cache pages, for anonymous pages, flush_anon_page() should be used. The implementation of flush_dcache_page() in all architectures follows this too. They will check whether page_mapping() is NULL and whether mapping_mapped() is true to determine whether to flush the dcache immediately. And they will use interval tree (mapping->i_mmap) to find all user space mappings. While mapping_mapped() and mapping->i_mmap isn't used by anonymous pages in swap cache at all. So, to fix the race between swapoff and flush dcache, __page_mapping() is add to return the address_space for file cache pages and NULL otherwise. All page_mapping() invoking in flush dcache functions are replaced with page_mapping_file(). [akpm@linux-foundation.org: simplify page_mapping_file(), per Mike] Link: http://lkml.kernel.org/r/20180305083634.15174-1-ying.huang@intel.com Signed-off-by: "Huang, Ying" Reviewed-by: Andrew Morton Cc: Minchan Kim Cc: Michal Hocko Cc: Johannes Weiner Cc: Mel Gorman Cc: Dave Hansen Cc: Chen Liqin Cc: Russell King Cc: Yoshinori Sato Cc: "James E.J. Bottomley" Cc: Guan Xuetao Cc: "David S. Miller" Cc: Chris Zankel Cc: Vineet Gupta Cc: Ley Foon Tan Cc: Ralf Baechle Cc: Andi Kleen Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arc/mm/cache.c | 2 +- arch/arm/mm/copypage-v4mc.c | 2 +- arch/arm/mm/copypage-v6.c | 2 +- arch/arm/mm/copypage-xscale.c | 2 +- arch/arm/mm/fault-armv.c | 2 +- arch/arm/mm/flush.c | 6 +++--- arch/mips/mm/cache.c | 2 +- arch/nios2/mm/cacheflush.c | 4 ++-- arch/parisc/kernel/cache.c | 5 +++-- arch/sh/mm/cache-sh4.c | 2 +- arch/sh/mm/cache-sh7705.c | 2 +- arch/sparc/kernel/smp_64.c | 8 ++++---- arch/sparc/mm/init_64.c | 6 +++--- arch/sparc/mm/tlb.c | 2 +- arch/unicore32/mm/flush.c | 2 +- arch/unicore32/mm/mmu.c | 2 +- arch/xtensa/mm/cache.c | 2 +- include/linux/mm.h | 1 + mm/util.c | 10 ++++++++++ 19 files changed, 38 insertions(+), 26 deletions(-) commit 1c0ff0f1bdeb183608ac9a345996d4d1ebfed632 Author: Nikolay Borisov Date: Thu Apr 5 16:24:36 2018 -0700 fs/direct-io.c: minor cleanups in do_blockdev_direct_IO We already get the block counts and calculate the end block at the beginning of the function. Let's use the local variables for consistency and readability. No functional changes [akpm@linux-foundation.org: constify the locals to prevent future slipups] Link: http://lkml.kernel.org/r/1519638870-17756-1-git-send-email-nborisov@suse.com Signed-off-by: Nikolay Borisov Reviewed-by: Jeff Moyer Cc: Al Viro Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/direct-io.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 5844a486daf2705dcdbfabe869a698bdfe629f54 Author: Guenter Roeck Date: Thu Apr 5 16:24:32 2018 -0700 include/linux/mm.h: provide consistent declaration for num_poisoned_pages clang reports the following compile warning. In file included from mm/vmscan.c:56: ./include/linux/swapops.h:327:22: warning: section attribute is specified on redeclared variable [-Wsection] extern atomic_long_t num_poisoned_pages __read_mostly; ^ ./include/linux/mm.h:2585:22: note: previous declaration is here extern atomic_long_t num_poisoned_pages; ^ Let's use __read_mostly everywhere. Link: http://lkml.kernel.org/r/1519686565-8224-1-git-send-email-linux@roeck-us.net Signed-off-by: Guenter Roeck Reviewed-by: Andrew Morton Cc: Matthias Kaehlcke Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1d53b92b95c23909de11a97bcc51f26a9509231 Author: Dan Williams Date: Thu Apr 5 16:24:28 2018 -0700 device-dax: implement ->pagesize() for smaps to report MMUPageSize Given that device-dax is making similar page mapping size guarantees as hugetlbfs, emit the size in smaps and any other kernel path that requests the mapping size of a vma. Link: http://lkml.kernel.org/r/151996255287.27922.18397777516059080245.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reported-by: Jane Chu Reviewed-by: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/dax/device.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 05ea88608d4e135695571727f5d7f22967d2a3bf Author: Dan Williams Date: Thu Apr 5 16:24:25 2018 -0700 mm, hugetlbfs: introduce ->pagesize() to vm_operations_struct When device-dax is operating in huge-page mode we want it to behave like hugetlbfs and report the MMU page mapping size that is being enforced by the vma. Similar to commit 31383c6865a5 "mm, hugetlbfs: introduce ->split() to vm_operations_struct" it would be messy to teach vma_mmu_pagesize() about device-dax page mapping sizes in the same (hstate) way that hugetlbfs communicates this attribute. Instead, these patches introduce a new ->pagesize() vm operation. Link: http://lkml.kernel.org/r/151996254734.27922.15813097401404359642.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reported-by: Jane Chu Reviewed-by: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 1 + mm/hugetlb.c | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) commit 09135cc594d141cd279c32a18b91cb3bd3fe8cc5 Author: Dan Williams Date: Thu Apr 5 16:24:21 2018 -0700 mm, powerpc: use vma_kernel_pagesize() in vma_mmu_pagesize() Patch series "mm, smaps: MMUPageSize for device-dax", v3. Similar to commit 31383c6865a5 ("mm, hugetlbfs: introduce ->split() to vm_operations_struct") here is another occasion where we want special-case hugetlbfs/hstate enabling to also apply to device-dax. This prompts the question what other hstate conversions we might do beyond ->split() and ->pagesize(), but this appears to be the last of the usages of hstate_vma() in generic/non-hugetlbfs specific code paths. This patch (of 3): The current powerpc definition of vma_mmu_pagesize() open codes looking up the page size via hstate. It is identical to the generic vma_kernel_pagesize() implementation. Now, vma_kernel_pagesize() is growing support for determining the page size of Device-DAX vmas in addition to the existing Hugetlbfs page size determination. Ideally, if the powerpc vma_mmu_pagesize() used vma_kernel_pagesize() it would automatically benefit from any new vma-type support that is added to vma_kernel_pagesize(). However, the powerpc vma_mmu_pagesize() is prevented from calling vma_kernel_pagesize() due to a circular header dependency that requires vma_mmu_pagesize() to be defined before including . Break this circular dependency by defining the default vma_mmu_pagesize() as a __weak symbol to be overridden by the powerpc version. Link: http://lkml.kernel.org/r/151996254179.27922.2213728278535578744.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Jane Chu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/asm/hugetlb.h | 6 ------ arch/powerpc/mm/hugetlbpage.c | 5 +---- mm/hugetlb.c | 8 +++----- 3 files changed, 4 insertions(+), 15 deletions(-) commit 2923117b7162946042e49cd363846c498293230c Author: Mario Leinweber Date: Thu Apr 5 16:24:18 2018 -0700 mm/gup.c: fix coding style issues. - Fixed style error: 8 spaces -> 1 tab. - Fixed style warning: Corrected misleading indentation. Link: http://lkml.kernel.org/r/20180302210254.31888-1-marioleinweber@web.de Signed-off-by: Mario Leinweber Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 97334162e4d79f866edd7308aac0ab3ab7a103f7 Author: Aaron Lu Date: Thu Apr 5 16:24:14 2018 -0700 mm/free_pcppages_bulk: prefetch buddy while not holding lock When a page is freed back to the global pool, its buddy will be checked to see if it's possible to do a merge. This requires accessing buddy's page structure and that access could take a long time if it's cache cold. This patch adds a prefetch to the to-be-freed page's buddy outside of zone->lock in hope of accessing buddy's page structure later under zone->lock will be faster. Since we *always* do buddy merging and check an order-0 page's buddy to try to merge it when it goes into the main allocator, the cacheline will always come in, i.e. the prefetched data will never be unused. Normally, the number of prefetch will be pcp->batch(default=31 and has an upper limit of (PAGE_SHIFT * 8)=96 on x86_64) but in the case of pcp's pages get all drained, it will be pcp->count which has an upper limit of pcp->high. pcp->high, although has a default value of 186 (pcp->batch=31 * 6), can be changed by user through /proc/sys/vm/percpu_pagelist_fraction and there is no software upper limit so could be large, like several thousand. For this reason, only the first pcp->batch number of page's buddy structure is prefetched to avoid excessive prefetching. In the meantime, there are two concerns: 1. the prefetch could potentially evict existing cachelines, especially for L1D cache since it is not huge 2. there is some additional instruction overhead, namely calculating buddy pfn twice For 1, it's hard to say, this microbenchmark though shows good result but the actual benefit of this patch will be workload/CPU dependant; For 2, since the calculation is a XOR on two local variables, it's expected in many cases that cycles spent will be offset by reduced memory latency later. This is especially true for NUMA machines where multiple CPUs are contending on zone->lock and the most time consuming part under zone->lock is the wait of 'struct page' cacheline of the to-be-freed pages and their buddies. Test with will-it-scale/page_fault1 full load: kernel Broadwell(2S) Skylake(2S) Broadwell(4S) Skylake(4S) v4.16-rc2+ 9034215 7971818 13667135 15677465 patch2/3 9536374 +5.6% 8314710 +4.3% 14070408 +3.0% 16675866 +6.4% this patch 10180856 +6.8% 8506369 +2.3% 14756865 +4.9% 17325324 +3.9% Note: this patch's performance improvement percent is against patch2/3. (Changelog stolen from Dave Hansen and Mel Gorman's comments at http://lkml.kernel.org/r/148a42d8-8306-2f2f-7f7c-86bc118f8ccd@intel.com) [aaron.lu@intel.com: use helper function, avoid disordering pages] Link: http://lkml.kernel.org/r/20180301062845.26038-4-aaron.lu@intel.com Link: http://lkml.kernel.org/r/20180320113146.GB24737@intel.com [aaron.lu@intel.com: v4] Link: http://lkml.kernel.org/r/20180301062845.26038-4-aaron.lu@intel.com Link: http://lkml.kernel.org/r/20180309082431.GB30868@intel.com Link: http://lkml.kernel.org/r/20180301062845.26038-4-aaron.lu@intel.com Signed-off-by: Aaron Lu Suggested-by: Ying Huang Reviewed-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Dave Hansen Cc: David Rientjes Cc: Kemi Wang Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Tim Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 0a5f4e5b45625e75db85b4968fc4c232d8091143 Author: Aaron Lu Date: Thu Apr 5 16:24:10 2018 -0700 mm/free_pcppages_bulk: do not hold lock when picking pages to free When freeing a batch of pages from Per-CPU-Pages(PCP) back to buddy, the zone->lock is held and then pages are chosen from PCP's migratetype list. While there is actually no need to do this 'choose part' under lock since it's PCP pages, the only CPU that can touch them is us and irq is also disabled. Moving this part outside could reduce lock held time and improve performance. Test with will-it-scale/page_fault1 full load: kernel Broadwell(2S) Skylake(2S) Broadwell(4S) Skylake(4S) v4.16-rc2+ 9034215 7971818 13667135 15677465 this patch 9536374 +5.6% 8314710 +4.3% 14070408 +3.0% 16675866 +6.4% What the test does is: starts $nr_cpu processes and each will repeatedly do the following for 5 minutes: - mmap 128M anonymouse space - write access to that space - munmap. The score is the aggregated iteration. https://github.com/antonblanchard/will-it-scale/blob/master/tests/page_fault1.c Link: http://lkml.kernel.org/r/20180301062845.26038-3-aaron.lu@intel.com Signed-off-by: Aaron Lu Acked-by: Mel Gorman Acked-by: Michal Hocko Reviewed-by: Andrew Morton Cc: Andi Kleen Cc: Dave Hansen Cc: David Rientjes Cc: Huang Ying Cc: Kemi Wang Cc: Matthew Wilcox Cc: Tim Chen Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) commit 77ba9062e43c7e4966d9ff3afd87dca86542f86a Author: Aaron Lu Date: Thu Apr 5 16:24:06 2018 -0700 mm/free_pcppages_bulk: update pcp->count inside Matthew Wilcox found that all callers of free_pcppages_bulk() currently update pcp->count immediately after so it's natural to do it inside free_pcppages_bulk(). No functionality or performance change is expected from this patch. Link: http://lkml.kernel.org/r/20180301062845.26038-2-aaron.lu@intel.com Signed-off-by: Aaron Lu Suggested-by: Matthew Wilcox Acked-by: David Rientjes Acked-by: Michal Hocko Reviewed-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Huang Ying Cc: Dave Hansen Cc: Kemi Wang Cc: Tim Chen Cc: Andi Kleen Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit bc3106b26cf6a6f214fd1a8538736afc39ae1b5c Author: David Rientjes Date: Thu Apr 5 16:24:02 2018 -0700 mm, compaction: drain pcps for zone when kcompactd fails It's possible for free pages to become stranded on per-cpu pagesets (pcps) that, if drained, could be merged with buddy pages on the zone's free area to form large order pages, including up to MAX_ORDER. Consider a verbose example using the tools/vm/page-types tool at the beginning of a ZONE_NORMAL ('B' indicates a buddy page and 'S' indicates a slab page). Pages on pcps do not have any page flags set. 109954 1 _______S________________________________________________________ 109955 2 __________B_____________________________________________________ 109957 1 ________________________________________________________________ 109958 1 __________B_____________________________________________________ 109959 7 ________________________________________________________________ 109960 1 __________B_____________________________________________________ 109961 9 ________________________________________________________________ 10996a 1 __________B_____________________________________________________ 10996b 3 ________________________________________________________________ 10996e 1 __________B_____________________________________________________ 10996f 1 ________________________________________________________________ ... 109f8c 1 __________B_____________________________________________________ 109f8d 2 ________________________________________________________________ 109f8f 2 __________B_____________________________________________________ 109f91 f ________________________________________________________________ 109fa0 1 __________B_____________________________________________________ 109fa1 7 ________________________________________________________________ 109fa8 1 __________B_____________________________________________________ 109fa9 1 ________________________________________________________________ 109faa 1 __________B_____________________________________________________ 109fab 1 _______S________________________________________________________ The compaction migration scanner is attempting to defragment this memory since it is at the beginning of the zone. It has done so quite well, all movable pages have been migrated. From pfn [0x109955, 0x109fab), there are only buddy pages and pages without flags set. These pages may be stranded on pcps that could otherwise allow this memory to be coalesced if freed back to the zone free area. It is possible that some of these pages may not be on pcps and that something has called alloc_pages() and used the memory directly, but we rely on the absence of __GFP_MOVABLE in these cases to allocate from MIGATE_UNMOVABLE pageblocks to try to keep these MIGRATE_MOVABLE pageblocks as free as possible. These buddy and pcp pages, spanning 1,621 pages, could be coalesced and allow for three transparent hugepages to be dynamically allocated. Running the numbers for all such spans on the system, it was found that there were over 400 such spans of only buddy pages and pages without flags set at the time this /proc/kpageflags sample was collected. Without this support, there were _no_ order-9 or order-10 pages free. When kcompactd fails to defragment memory such that a cc.order page can be allocated, drain all pcps for the zone back to the buddy allocator so this stranding cannot occur. Compaction for that order will subsequently be deferred, which acts as a ratelimit on this drain. Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1803010340100.88270@chino.kir.corp.google.com Signed-off-by: David Rientjes Acked-by: Vlastimil Babka Cc: Mel Gorman Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4f6923fbb352d126659cabe34806cff75c7b5ea0 Author: Howard McLauchlan Date: Thu Apr 5 16:23:57 2018 -0700 mm: make should_failslab always available for fault injection should_failslab() is a convenient function to hook into for directed error injection into kmalloc(). However, it is only available if a config flag is set. The following BCC script, for example, fails kmalloc() calls after a btrfs umount: from bcc import BPF prog = r""" BPF_HASH(flag); #include int kprobe__btrfs_close_devices(void *ctx) { u64 key = 1; flag.update(&key, &key); return 0; } int kprobe__should_failslab(struct pt_regs *ctx) { u64 key = 1; u64 *res; res = flag.lookup(&key); if (res != 0) { bpf_override_return(ctx, -ENOMEM); } return 0; } """ b = BPF(text=prog) while 1: b.kprobe_poll() This patch refactors the should_failslab implementation so that the function is always available for error injection, independent of flags. This change would be similar in nature to commit f5490d3ec921 ("block: Add should_fail_bio() for bpf error injection"). Link: http://lkml.kernel.org/r/20180222020320.6944-1-hmclauchlan@fb.com Signed-off-by: Howard McLauchlan Reviewed-by: Andrew Morton Cc: Akinobu Mita Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Josef Bacik Cc: Johannes Weiner Cc: Alexei Starovoitov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/fault-inject.h | 5 +++-- mm/failslab.c | 2 +- mm/slab_common.c | 8 ++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) commit 14298d3663e44705d3f9106343ac8298a5fdff99 Author: Dou Liyang Date: Thu Apr 5 16:23:53 2018 -0700 mm/page_poison.c: make early_page_poison_param() __init The early_param() is only called during kernel initialization, So Linux marks the function of it with __init macro to save memory. But it forgot to mark the early_page_poison_param(). So, Make it __init as well. Link: http://lkml.kernel.org/r/20180117034757.27024-1-douly.fnst@cn.fujitsu.com Signed-off-by: Dou Liyang Reviewed-by: Andrew Morton Acked-by: Michal Hocko Cc: Philippe Ombredanne Cc: Kate Stewart Cc: Michal Hocko Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_poison.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1173194e1e932e4aa9ce4b0ecac72446482f0e4f Author: Dou Liyang Date: Thu Apr 5 16:23:49 2018 -0700 mm/page_owner.c: make early_page_owner_param() __init The early_param() is only called during kernel initialization, So Linux marks the functions of it with __init macro to save memory. But it forgot to mark the early_page_owner_param(). So, Make it __init as well. Link: http://lkml.kernel.org/r/20180117034736.26963-1-douly.fnst@cn.fujitsu.com Signed-off-by: Dou Liyang Reviewed-by: Andrew Morton Cc: Vlastimil Babka Cc: Michal Hocko Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_owner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bd30c1090995ce800ae257fbbabfd6b6899b57c Author: Dou Liyang Date: Thu Apr 5 16:23:46 2018 -0700 mm/kmemleak.c: make kmemleak_boot_config() __init The early_param() is only called during kernel initialization, So Linux marks the functions of it with __init macro to save memory. But it forgot to mark the kmemleak_boot_config(). So, Make it __init as well. Link: http://lkml.kernel.org/r/20180117034720.26897-1-douly.fnst@cn.fujitsu.com Signed-off-by: Dou Liyang Reviewed-by: Andrew Morton Cc: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kmemleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9e9b7ecee4a139a6fbe2e15ef224ca6b6c47d57 Author: Minchan Kim Date: Thu Apr 5 16:23:42 2018 -0700 mm: swap: unify cluster-based and vma-based swap readahead This patch makes do_swap_page() not need to be aware of two different swap readahead algorithms. Just unify cluster-based and vma-based readahead function call. Link: http://lkml.kernel.org/r/1509520520-32367-3-git-send-email-minchan@kernel.org Link: http://lkml.kernel.org/r/20180220085249.151400-3-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Andrew Morton Cc: Hugh Dickins Cc: Huang Ying Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 27 ++++++++------------------- mm/memory.c | 11 ++++------- mm/shmem.c | 5 ++++- mm/swap_state.c | 48 +++++++++++++++++++++++++++++++++++++----------- 4 files changed, 53 insertions(+), 38 deletions(-) commit eaf649ebc3acfbb235ce31cebd06e4876d05758e Author: Minchan Kim Date: Thu Apr 5 16:23:39 2018 -0700 mm: swap: clean up swap readahead When I see recent change of swap readahead, I am very unhappy about current code structure which diverges two swap readahead algorithm in do_swap_page. This patch is to clean it up. Main motivation is that fault handler doesn't need to be aware of readahead algorithms but just should call swapin_readahead. As first step, this patch cleans up a little bit but not perfect (I just separate for review easier) so next patch will make the goal complete. [minchan@kernel.org: do not check readahead flag with THP anon] Link: http://lkml.kernel.org/r/874lm83zho.fsf@yhuang-dev.intel.com Link: http://lkml.kernel.org/r/20180227232611.169883-1-minchan@kernel.org Link: http://lkml.kernel.org/r/1509520520-32367-2-git-send-email-minchan@kernel.org Link: http://lkml.kernel.org/r/20180220085249.151400-2-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Andrew Morton Cc: Hugh Dickins Cc: Huang Ying Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 17 ++-------- mm/memory.c | 26 ++++---------- mm/swap_state.c | 96 +++++++++++++++++++++++++++++----------------------- 3 files changed, 62 insertions(+), 77 deletions(-) commit e830c63a621e20894a663351b968706bd0efbbd0 Author: Tetsuo Handa Date: Thu Apr 5 16:23:35 2018 -0700 mm,vmscan: don't pretend forward progress upon shrinker_rwsem contention Since we no longer use return value of shrink_slab() for normal reclaim, the comment is no longer true. If some do_shrink_slab() call takes unexpectedly long (root cause of stall is currently unknown) when register_shrinker()/unregister_shrinker() is pending, trying to drop caches via /proc/sys/vm/drop_caches could become infinite cond_resched() loop if many mem_cgroup are defined. For safety, let's not pretend forward progress. Link: http://lkml.kernel.org/r/201802202229.GGF26507.LVFtMSOOHFJOQF@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Reviewed-by: Andrew Morton Cc: Dave Chinner Cc: Glauber Costa Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 5c9bab592f53328b3e00d7293378b714abf47a2a Author: Vitaly Wool Date: Thu Apr 5 16:23:32 2018 -0700 z3fold: limit use of stale list for allocation Currently if z3fold couldn't find an unbuddied page it would first try to pull a page off the stale list. The problem with this approach is that we can't 100% guarantee that the page is not processed by the workqueue thread at the same time unless we run cancel_work_sync() on it, which we can't do if we're in an atomic context. So let's just limit stale list usage to non-atomic contexts only. Link: http://lkml.kernel.org/r/47ab51e7-e9c1-d30e-ab17-f734dbc3abce@gmail.com Signed-off-by: Vitaly Vul Reviewed-by: Andrew Morton Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit 605ca5ede7643a01f4c4a15913f9714ac297f8a6 Author: Konstantin Khlebnikov Date: Thu Apr 5 16:23:28 2018 -0700 mm/huge_memory.c: reorder operations in __split_huge_page_tail() THP split makes non-atomic change of tail page flags. This is almost ok because tail pages are locked and isolated but this breaks recent changes in page locking: non-atomic operation could clear bit PG_waiters. As a result concurrent sequence get_page_unless_zero() -> lock_page() might block forever. Especially if this page was truncated later. Fix is trivial: clone flags before unfreezing page reference counter. This race exists since commit 62906027091f ("mm: add PageWaiters indicating tasks are waiting for a page bit") while unsave unfreeze itself was added in commit 8df651c7059e ("thp: cleanup split_huge_page()"). clear_compound_head() also must be called before unfreezing page reference because after successful get_page_unless_zero() might follow put_page() which needs correct compound_head(). And replace page_ref_inc()/page_ref_add() with page_ref_unfreeze() which is made especially for that and has semantic of smp_store_release(). Link: http://lkml.kernel.org/r/151844393341.210639.13162088407980624477.stgit@buzz Signed-off-by: Konstantin Khlebnikov Acked-by: Kirill A. Shutemov Cc: Michal Hocko Cc: Nicholas Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) commit 03f5d58fa42fb337b921e57f8e2c2d4df7df890d Author: Konstantin Khlebnikov Date: Thu Apr 5 16:23:24 2018 -0700 mm/page_ref: use atomic_set_release in page_ref_unfreeze page_ref_unfreeze() has exactly that semantic. No functional changes: just minus one barrier and proper handling of PPro errata. Link: http://lkml.kernel.org/r/151844393004.210639.4672319312617954272.stgit@buzz Signed-off-by: Konstantin Khlebnikov Acked-by: Kirill A. Shutemov Cc: Michal Hocko Cc: Nicholas Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page_ref.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e92bb4dd9673945179b1fc738c9817dd91bfb629 Author: Huang Ying Date: Thu Apr 5 16:23:20 2018 -0700 mm: fix races between address_space dereference and free in page_evicatable When page_mapping() is called and the mapping is dereferenced in page_evicatable() through shrink_active_list(), it is possible for the inode to be truncated and the embedded address space to be freed at the same time. This may lead to the following race. CPU1 CPU2 truncate(inode) shrink_active_list() ... page_evictable(page) truncate_inode_page(mapping, page); delete_from_page_cache(page) spin_lock_irqsave(&mapping->tree_lock, flags); __delete_from_page_cache(page, NULL) page_cache_tree_delete(..) ... mapping = page_mapping(page); page->mapping = NULL; ... spin_unlock_irqrestore(&mapping->tree_lock, flags); page_cache_free_page(mapping, page) put_page(page) if (put_page_testzero(page)) -> false - inode now has no pages and can be freed including embedded address_space mapping_unevictable(mapping) test_bit(AS_UNEVICTABLE, &mapping->flags); - we've dereferenced mapping which is potentially already free. Similar race exists between swap cache freeing and page_evicatable() too. The address_space in inode and swap cache will be freed after a RCU grace period. So the races are fixed via enclosing the page_mapping() and address_space usage in rcu_read_lock/unlock(). Some comments are added in code to make it clear what is protected by the RCU read lock. Link: http://lkml.kernel.org/r/20180212081227.1940-1-ying.huang@intel.com Signed-off-by: "Huang, Ying" Reviewed-by: Jan Kara Reviewed-by: Andrew Morton Cc: Mel Gorman Cc: Minchan Kim Cc: "Huang, Ying" Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 5ad3509364a86461188184e2ae7ca517dca6f389 Author: Andy Shevchenko Date: Thu Apr 5 16:23:16 2018 -0700 mm: reuse DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. [andriy.shevchenko@linux.intel.com: add tags, fix compilation issue] Link: http://lkml.kernel.org/r/20180217144253.58604-1-andriy.shevchenko@linux.intel.com Link: http://lkml.kernel.org/r/20180214154644.54505-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Reviewed-by: Matthew Wilcox Reviewed-by: Andrew Morton Reviewed-by: Sergey Senozhatsky Acked-by: Christoph Lameter Cc: Tejun Heo Cc: Dennis Zhou Cc: Minchan Kim Cc: Nitin Gupta Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/backing-dev.c | 13 +------------ mm/memblock.c | 13 +------------ mm/percpu-stats.c | 13 +------------ mm/zsmalloc.c | 15 ++------------- 4 files changed, 5 insertions(+), 49 deletions(-) commit 7f16f91fdfce694493e539bff17acaedaebc366d Author: David Rientjes Date: Thu Apr 5 16:23:12 2018 -0700 mm, page_alloc: move mirrored_kernelcore to __meminitdata mirrored_kernelcore can be in __meminitdata, so move it there. At the same time, fixup section specifiers to be after the name of the variable per checkpatch. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1802121623280.179479@chino.kir.corp.google.com Signed-off-by: David Rientjes Reviewed-by: Andrew Morton Cc: Mike Kravetz Cc: Jonathan Corbet Cc: Vlastimil Babka Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit a5c6d6509342785bef53bf9508e1842b303f1878 Author: David Rientjes Date: Thu Apr 5 16:23:09 2018 -0700 mm, page_alloc: extend kernelcore and movablecore for percent Both kernelcore= and movablecore= can be used to define the amount of ZONE_NORMAL and ZONE_MOVABLE on a system, respectively. This requires the system memory capacity to be known when specifying the command line, however. This introduces the ability to define both kernelcore= and movablecore= as a percentage of total system memory. This is convenient for systems software that wants to define the amount of ZONE_MOVABLE, for example, as a proportion of a system's memory rather than a hardcoded byte value. To define the percentage, the final character of the parameter should be a '%'. mhocko: "why is anyone using these options nowadays?" rientjes: : : Fragmentation of non-__GFP_MOVABLE pages due to low on memory : situations can pollute most pageblocks on the system, as much as 1GB of : slab being fragmented over 128GB of memory, for example. When the : amount of kernel memory is well bounded for certain systems, it is : better to aggressively reclaim from existing MIGRATE_UNMOVABLE : pageblocks rather than eagerly fallback to others. : : We have additional patches that help with this fragmentation if you're : interested, specifically kcompactd compaction of MIGRATE_UNMOVABLE : pageblocks triggered by fallback of non-__GFP_MOVABLE allocations and : draining of pcp lists back to the zone free area to prevent stranding. [rientjes@google.com: updates] Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1802131700160.71590@chino.kir.corp.google.com Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1802121622470.179479@chino.kir.corp.google.com Signed-off-by: David Rientjes Reviewed-by: Andrew Morton Reviewed-by: Mike Kravetz Cc: Jonathan Corbet Cc: Vlastimil Babka Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/admin-guide/kernel-parameters.txt | 54 ++++++++++++------------- mm/page_alloc.c | 43 ++++++++++++++++---- 2 files changed, 62 insertions(+), 35 deletions(-) commit 31286a8484a85e8b4e91ddb0f5415aee8a416827 Author: Naoya Horiguchi Date: Thu Apr 5 16:23:05 2018 -0700 mm: hwpoison: disable memory error handling on 1GB hugepage Recently the following BUG was reported: Injecting memory failure for pfn 0x3c0000 at process virtual address 0x7fe300000000 Memory failure: 0x3c0000: recovery action for huge page: Recovered BUG: unable to handle kernel paging request at ffff8dfcc0003000 IP: gup_pgd_range+0x1f0/0xc20 PGD 17ae72067 P4D 17ae72067 PUD 0 Oops: 0000 [#1] SMP PTI ... CPU: 3 PID: 5467 Comm: hugetlb_1gb Not tainted 4.15.0-rc8-mm1-abc+ #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-1.fc25 04/01/2014 You can easily reproduce this by calling madvise(MADV_HWPOISON) twice on a 1GB hugepage. This happens because get_user_pages_fast() is not aware of a migration entry on pud that was created in the 1st madvise() event. I think that conversion to pud-aligned migration entry is working, but other MM code walking over page table isn't prepared for it. We need some time and effort to make all this work properly, so this patch avoids the reported bug by just disabling error handling for 1GB hugepage. [n-horiguchi@ah.jp.nec.com: v2] Link: http://lkml.kernel.org/r/1517284444-18149-1-git-send-email-n-horiguchi@ah.jp.nec.com Link: http://lkml.kernel.org/r/1517207283-15769-1-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Acked-by: Michal Hocko Reviewed-by: Andrew Morton Reviewed-by: Mike Kravetz Acked-by: Punit Agrawal Tested-by: Michael Ellerman Cc: Anshuman Khandual Cc: "Aneesh Kumar K.V" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 1 + mm/memory-failure.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) commit d0dc12e86b3197a14a908d4fe7cb35b73dda82b5 Author: Pavel Tatashin Date: Thu Apr 5 16:23:00 2018 -0700 mm/memory_hotplug: optimize memory hotplug During memory hotplugging we traverse struct pages three times: 1. memset(0) in sparse_add_one_section() 2. loop in __add_section() to set do: set_page_node(page, nid); and SetPageReserved(page); 3. loop in memmap_init_zone() to call __init_single_pfn() This patch removes the first two loops, and leaves only loop 3. All struct pages are initialized in one place, the same as it is done during boot. The benefits: - We improve memory hotplug performance because we are not evicting the cache several times and also reduce loop branching overhead. - Remove condition from hotpath in __init_single_pfn(), that was added in order to fix the problem that was reported by Bharata in the above email thread, thus also improve performance during normal boot. - Make memory hotplug more similar to the boot memory initialization path because we zero and initialize struct pages only in one function. - Simplifies memory hotplug struct page initialization code, and thus enables future improvements, such as multi-threading the initialization of struct pages in order to improve hotplug performance even further on larger machines. [pasha.tatashin@oracle.com: v5] Link: http://lkml.kernel.org/r/20180228030308.1116-7-pasha.tatashin@oracle.com Link: http://lkml.kernel.org/r/20180215165920.8570-7-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Ingo Molnar Cc: Michal Hocko Cc: Baoquan He Cc: Bharata B Rao Cc: Daniel Jordan Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Steven Sistare Cc: Thomas Gleixner Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/node.c | 2 ++ include/linux/memory.h | 1 + mm/memory_hotplug.c | 27 ++++++++------------------- mm/page_alloc.c | 28 ++++++++++------------------ mm/sparse.c | 8 +++++++- 5 files changed, 28 insertions(+), 38 deletions(-) commit fc44f7f9231a73821fc858f5bc48883a9e78f6de Author: Pavel Tatashin Date: Thu Apr 5 16:22:56 2018 -0700 mm/memory_hotplug: don't read nid from struct page during hotplug During memory hotplugging the probe routine will leave struct pages uninitialized, the same as it is currently done during boot. Therefore, we do not want to access the inside of struct pages before __init_single_page() is called during onlining. Because during hotplug we know that pages in one memory block belong to the same numa node, we can skip the checking. We should keep checking for the boot case. [pasha.tatashin@oracle.com: s/register_new_memory()/hotplug_memory_register()] Link: http://lkml.kernel.org/r/20180228030308.1116-6-pasha.tatashin@oracle.com Link: http://lkml.kernel.org/r/20180215165920.8570-6-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Acked-by: Michal Hocko Reviewed-by: Ingo Molnar Cc: Baoquan He Cc: Bharata B Rao Cc: Daniel Jordan Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Steven Sistare Cc: Thomas Gleixner Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 4 ++-- drivers/base/node.c | 22 +++++++++++++++------- include/linux/memory.h | 2 +- include/linux/node.h | 4 ++-- mm/memory_hotplug.c | 2 +- 5 files changed, 21 insertions(+), 13 deletions(-) commit b77eab7079d9e477489d2416cceda05d3c1cf21f Author: Pavel Tatashin Date: Thu Apr 5 16:22:52 2018 -0700 mm/memory_hotplug: optimize probe routine When memory is hotplugged pages_correctly_reserved() is called to verify that the added memory is present, this routine traverses through every struct page and verifies that PageReserved() is set. This is a slow operation especially if a large amount of memory is added. Instead of checking every page, it is enough to simply check that the section is present, has mapping (struct page array is allocated), and the mapping is online. In addition, we should not excpect that probe routine sets flags in struct page, as the struct pages have not yet been initialized. The initialization should be done in __init_single_page(), the same as during boot. Link: http://lkml.kernel.org/r/20180215165920.8570-5-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Acked-by: Michal Hocko Cc: Ingo Molnar Cc: Baoquan He Cc: Bharata B Rao Cc: Daniel Jordan Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Steven Sistare Cc: Thomas Gleixner Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit f165b378bbdf6c8afd950060fc3cbc935bb890c6 Author: Pavel Tatashin Date: Thu Apr 5 16:22:47 2018 -0700 mm: uninitialized struct page poisoning sanity checking During boot we poison struct page memory in order to ensure that no one is accessing this memory until the struct pages are initialized in __init_single_page(). This patch adds more scrutiny to this checking by making sure that flags do not equal the poison pattern when they are accessed. The pattern is all ones. Since node id is also stored in struct page, and may be accessed quite early, we add this enforcement into page_to_nid() function as well. Note, this is applicable only when NODE_NOT_IN_PAGE_FLAGS=n [pasha.tatashin@oracle.com: v4] Link: http://lkml.kernel.org/r/20180215165920.8570-4-pasha.tatashin@oracle.com Link: http://lkml.kernel.org/r/20180213193159.14606-4-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Ingo Molnar Acked-by: Michal Hocko Cc: Baoquan He Cc: Bharata B Rao Cc: Daniel Jordan Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Steven Sistare Cc: Thomas Gleixner Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 4 +++- include/linux/page-flags.h | 22 +++++++++++++++++----- mm/memblock.c | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) commit 078eb6aa50dc50cd85f09a22226b7e238b3397ce Author: Pavel Tatashin Date: Thu Apr 5 16:22:43 2018 -0700 x86/mm/memory_hotplug: determine block size based on the end of boot memory Memory sections are combined into "memory block" chunks. These chunks are the units upon which memory can be added and removed. On x86, the new memory may be added after the end of the boot memory, therefore, if block size does not align with end of boot memory, memory hot-plugging/hot-removing can be broken. Memory sections are combined into "memory block" chunks. These chunks are the units upon which memory can be added and removed. On x86 the new memory may be added after the end of the boot memory, therefore, if block size does not align with end of boot memory, memory hotplugging/hotremoving can be broken. Currently, whenever machine is booted with more than 64G the block size is unconditionally increased to 2G from the base 128M. This is done in order to reduce number of memory device files in sysfs: /sys/devices/system/memory/memoryXXX We must use the largest allowed block size that aligns to the next address to be able to hotplug the next block of memory. So, when memory is larger or equal to 64G, we check the end address and find the largest block size that is still power of two but smaller or equal to 2G. Before, the fix: Run qemu with: -m 64G,slots=2,maxmem=66G -object memory-backend-ram,id=mem1,size=2G (qemu) device_add pc-dimm,id=dimm1,memdev=mem1 Block size [0x80000000] unaligned hotplug range: start 0x1040000000, size 0x80000000 acpi PNP0C80:00: add_memory failed acpi PNP0C80:00: acpi_memory_enable_device() error acpi PNP0C80:00: Enumeration failure With the fix memory is added successfully as the block size is set to 1G, and therefore aligns with start address 0x1040000000. [pasha.tatashin@oracle.com: v4] Link: http://lkml.kernel.org/r/20180215165920.8570-3-pasha.tatashin@oracle.com Link: http://lkml.kernel.org/r/20180213193159.14606-3-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Ingo Molnar Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Steven Sistare Cc: Daniel Jordan Cc: Mel Gorman Cc: Michal Hocko Cc: Greg Kroah-Hartman Cc: Vlastimil Babka Cc: Bharata B Rao Cc: Dan Williams Cc: Kirill A. Shutemov Cc: Baoquan He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/init_64.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) commit ba325585230ed17079fd5b4065c359ebba117bbe Author: Pavel Tatashin Date: Thu Apr 5 16:22:39 2018 -0700 mm/memory_hotplug: enforce block size aligned range check Patch series "optimize memory hotplug", v3. This patchset: - Improves hotplug performance by eliminating a number of struct page traverses during memory hotplug. - Fixes some issues with hotplugging, where boundaries were not properly checked. And on x86 block size was not properly aligned with end of memory - Also, potentially improves boot performance by eliminating condition from __init_single_page(). - Adds robustness by verifying that that struct pages are correctly poisoned when flags are accessed. The following experiments were performed on Xeon(R) CPU E7-8895 v3 @ 2.60GHz with 1T RAM: booting in qemu with 960G of memory, time to initialize struct pages: no-kvm: TRY1 TRY2 BEFORE: 39.433668 39.39705 AFTER: 36.903781 36.989329 with-kvm: BEFORE: 10.977447 11.103164 AFTER: 10.929072 10.751885 Hotplug 896G memory: no-kvm: TRY1 TRY2 BEFORE: 848.740000 846.910000 AFTER: 783.070000 786.560000 with-kvm: TRY1 TRY2 BEFORE: 34.410000 33.57 AFTER: 29.810000 29.580000 This patch (of 6): Start qemu with the following arguments: -m 64G,slots=2,maxmem=66G -object memory-backend-ram,id=mem1,size=2G Which: boots machine with 64G, and adds a device mem1 with 2G which can be hotplugged later. Also make sure that config has the following turned on: CONFIG_MEMORY_HOTPLUG CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE CONFIG_ACPI_HOTPLUG_MEMORY Using the qemu monitor hotplug the memory (make sure config has (qemu) device_add pc-dimm,id=dimm1,memdev=mem1 The operation will fail with the following trace: WARNING: CPU: 0 PID: 91 at drivers/base/memory.c:205 pages_correctly_reserved+0xe6/0x110 Modules linked in: CPU: 0 PID: 91 Comm: systemd-udevd Not tainted 4.16.0-rc1_pt_master #29 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.0-0-g63451fca13-prebuilt.qemu-project.org 04/01/2014 RIP: 0010:pages_correctly_reserved+0xe6/0x110 Call Trace: memory_subsys_online+0x44/0xa0 device_online+0x51/0x80 store_mem_state+0x5e/0xe0 kernfs_fop_write+0xfa/0x170 __vfs_write+0x2e/0x150 vfs_write+0xa8/0x1a0 SyS_write+0x4d/0xb0 do_syscall_64+0x5d/0x110 entry_SYSCALL_64_after_hwframe+0x21/0x86 ---[ end trace 6203bc4f1a5d30e8 ]--- The problem is detected in: drivers/base/memory.c static bool pages_correctly_reserved(unsigned long start_pfn) 205 if (WARN_ON_ONCE(!pfn_valid(pfn))) This function loops through every section in the newly added memory block and verifies that the first pfn is valid, meaning section exists, has mapping (struct page array), and is online. The block size on x86 is usually 128M, but when machine is booted with more than 64G of memory, the block size is changed to 2G: $ cat /sys/devices/system/memory/block_size_bytes 80000000 or $ dmesg | grep "block size" [ 0.086469] x86/mm: Memory block size: 2048MB During memory hotplug, and hotremove we verify that the range is section size aligned, but we actually must verify that it is block size aligned, because that is the proper unit for hotplug operations. See: Documentation/memory-hotplug.txt So, when the start_pfn of newly added memory is not block size aligned, we can get a memory block that has only part of it with properly populated sections. In our case the start_pfn starts from the last_pfn (end of physical memory). $ dmesg | grep last_pfn [ 0.000000] e820: last_pfn = 0x1040000 max_arch_pfn = 0x400000000 0x1040000 == 65G, and so is not 2G aligned! The fix is to enforce that memory that is hotplugged and hotremoved is block size aligned. With this fix, running the above sequence yield to the following result: (qemu) device_add pc-dimm,id=dimm1,memdev=mem1 Block size [0x80000000] unaligned hotplug range: start 0x1040000000, size 0x80000000 acpi PNP0C80:00: add_memory failed acpi PNP0C80:00: acpi_memory_enable_device() error acpi PNP0C80:00: Enumeration failure Link: http://lkml.kernel.org/r/20180213193159.14606-2-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Ingo Molnar Acked-by: Michal Hocko Cc: Baoquan He Cc: Bharata B Rao Cc: Daniel Jordan Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Steven Sistare Cc: Thomas Gleixner Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit f0849ac0b8e072073ec5fcc7fadd05a77434364e Author: Yang Shi Date: Thu Apr 5 16:22:35 2018 -0700 mm: thp: fix potential clearing to referenced flag in page_idle_clear_pte_refs_one() For PTE-mapped THP, the compound THP has not been split to normal 4K pages yet, the whole THP is considered referenced if any one of sub page is referenced. When walking PTE-mapped THP by pvmw, all relevant PTEs will be checked to retrieve referenced bit. But, the current code just returns the result of the last PTE. If the last PTE has not referenced, the referenced flag will be cleared. Just set referenced when ptep{pmdp}_clear_young_notify() returns true. Link: http://lkml.kernel.org/r/1518212451-87134-1-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Reported-by: Gang Deng Suggested-by: Kirill A. Shutemov Reviewed-by: Andrew Morton Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_idle.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit c9e97a1997fbf3a1d18d4065c2ca381f0704d7e5 Author: Pavel Tatashin Date: Thu Apr 5 16:22:31 2018 -0700 mm: initialize pages on demand during boot Deferred page initialization allows the boot cpu to initialize a small subset of the system's pages early in boot, with other cpus doing the rest later on. It is, however, problematic to know how many pages the kernel needs during boot. Different modules and kernel parameters may change the requirement, so the boot cpu either initializes too many pages or runs out of memory. To fix that, initialize early pages on demand. This ensures the kernel does the minimum amount of work to initialize pages during boot and leaves the rest to be divided in the multithreaded initialization path (deferred_init_memmap). The on-demand code is permanently disabled using static branching once deferred pages are initialized. After the static branch is changed to false, the overhead is up-to two branch-always instructions if the zone watermark check fails or if rmqueue fails. Sergey Senozhatsky noticed that while deferred pages currently make sense only on NUMA machines (we start one thread per latency node), CONFIG_NUMA is not a requirement for CONFIG_DEFERRED_STRUCT_PAGE_INIT, so that is also must be addressed in the patch. [akpm@linux-foundation.org: fix typo in comment, make deferred_pages static] [pasha.tatashin@oracle.com: fix min() type mismatch warning] Link: http://lkml.kernel.org/r/20180212164543.26592-1-pasha.tatashin@oracle.com [pasha.tatashin@oracle.com: use zone_to_nid() in deferred_grow_zone()] Link: http://lkml.kernel.org/r/20180214163343.21234-2-pasha.tatashin@oracle.com [pasha.tatashin@oracle.com: might_sleep warning] Link: http://lkml.kernel.org/r/20180306192022.28289-1-pasha.tatashin@oracle.com [akpm@linux-foundation.org: s/spin_lock/spin_lock_irq/ in page_alloc_init_late()] [pasha.tatashin@oracle.com: v5] Link: http://lkml.kernel.org/r/20180309220807.24961-3-pasha.tatashin@oracle.com [akpm@linux-foundation.org: tweak comments] [pasha.tatashin@oracle.com: v6] Link: http://lkml.kernel.org/r/20180313182355.17669-3-pasha.tatashin@oracle.com [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20180209192216.20509-2-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Daniel Jordan Reviewed-by: Steven Sistare Reviewed-by: Andrew Morton Tested-by: Masayoshi Mizuma Acked-by: Mel Gorman Cc: Michal Hocko Cc: Catalin Marinas Cc: AKASHI Takahiro Cc: Gioh Kim Cc: Heiko Carstens Cc: Yaowei Bai Cc: Wei Yang Cc: Paul Burton Cc: Miles Chen Cc: Vlastimil Babka Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memblock.h | 10 --- mm/memblock.c | 23 ------ mm/page_alloc.c | 183 +++++++++++++++++++++++++++++++++++++---------- 3 files changed, 144 insertions(+), 72 deletions(-) commit 3a2d7fa8a3d5ae740bd0c21d933acc6220857ed0 Author: Pavel Tatashin Date: Thu Apr 5 16:22:27 2018 -0700 mm: disable interrupts while initializing deferred pages Vlastimil Babka reported about a window issue during which when deferred pages are initialized, and the current version of on-demand initialization is finished, allocations may fail. While this is highly unlikely scenario, since this kind of allocation request must be large, and must come from interrupt handler, we still want to cover it. We solve this by initializing deferred pages with interrupts disabled, and holding node_size_lock spin lock while pages in the node are being initialized. The on-demand deferred page initialization that comes later will use the same lock, and thus synchronize with deferred_init_memmap(). It is unlikely for threads that initialize deferred pages to be interrupted. They run soon after smp_init(), but before modules are initialized, and long before user space programs. This is why there is no adverse effect of having these threads running with interrupts disabled. [pasha.tatashin@oracle.com: v6] Link: http://lkml.kernel.org/r/20180313182355.17669-2-pasha.tatashin@oracle.com Link: http://lkml.kernel.org/r/20180309220807.24961-2-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Andrew Morton Cc: Steven Sistare Cc: Daniel Jordan Cc: Masayoshi Mizuma Cc: Michal Hocko Cc: Catalin Marinas Cc: AKASHI Takahiro Cc: Gioh Kim Cc: Heiko Carstens Cc: Yaowei Bai Cc: Wei Yang Cc: Paul Burton Cc: Miles Chen Cc: Vlastimil Babka Cc: Mel Gorman Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memory_hotplug.h | 53 ++++++++++++++++++++++-------------------- include/linux/mmzone.h | 5 ++-- mm/page_alloc.c | 19 ++++++++------- 3 files changed, 42 insertions(+), 35 deletions(-) commit 8e7a0c9100cade3bdbf851206b892b6f98eb39c9 Author: Randy Dunlap Date: Thu Apr 5 16:22:23 2018 -0700 mm/swap_slots.c: use conditional compilation For mm/swap_slots.c, use the traditional Linux method of conditional compilation and linking instead of always compiling it by using #ifdef CONFIG_SWAP and #endif for the entire source file (excluding header files). Link: http://lkml.kernel.org/r/c2a47015-0b5a-d0d9-8bc7-9984c049df20@infradead.org Signed-off-by: Randy Dunlap Acked-by: Tim Chen Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/Makefile | 4 ++-- mm/swap_slots.c | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) commit 310253514bbf179c5f82e20a7a4bbf07abc7f5ad Author: Anshuman Khandual Date: Thu Apr 5 16:22:08 2018 -0700 mm/migrate: rename migration reason MR_CMA to MR_CONTIG_RANGE alloc_contig_range() initiates compaction and eventual migration for the purpose of either CMA or HugeTLB allocations. At present, the reason code remains the same MR_CMA for either of these cases. Let's make it MR_CONTIG_RANGE which will appropriately reflect the reason code in both these cases. Link: http://lkml.kernel.org/r/20180202091518.18798-1-khandual@linux.vnet.ibm.com Signed-off-by: Anshuman Khandual Acked-by: Michal Hocko Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/mm/mmu_context_iommu.c | 2 +- include/linux/migrate.h | 2 +- include/trace/events/migrate.h | 2 +- mm/page_alloc.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 57a7702b12bc610393bf7764d25183392344ee92 Author: David Woodhouse Date: Thu Apr 5 16:22:05 2018 -0700 mm: always print RLIMIT_DATA warning The documentation for ignore_rlimit_data says that it will print a warning at first misuse. Yet it doesn't seem to do that. Fix the code to print the warning even when we allow the process to continue. Link: http://lkml.kernel.org/r/1517935505-9321-1-git-send-email-dwmw@amazon.co.uk Signed-off-by: David Woodhouse Acked-by: Konstantin Khlebnikov Cc: Cyrill Gorcunov Cc: Vladimir Davydov Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit c01f0b54efb1519f513089984c163ad3f6fea6eb Author: Colin Ian King Date: Thu Apr 5 16:22:01 2018 -0700 mm/ksm.c: make stable_node_dup() static stable_node_dup() is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: mm/ksm.c:1321:13: warning: symbol 'stable_node_dup' was not declared. Should it be static? Link: http://lkml.kernel.org/r/20180206221005.12642-1-colin.king@canonical.com Signed-off-by: Colin Ian King Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f9e13c0a5a33d1eaec374d6d4dab53a4f72756a0 Author: Shakeel Butt Date: Thu Apr 5 16:21:57 2018 -0700 slab, slub: skip unnecessary kasan_cache_shutdown() The kasan quarantine is designed to delay freeing slab objects to catch use-after-free. The quarantine can be large (several percent of machine memory size). When kmem_caches are deleted related objects are flushed from the quarantine but this requires scanning the entire quarantine which can be very slow. We have seen the kernel busily working on this while holding slab_mutex and badly affecting cache_reaper, slabinfo readers and memcg kmem cache creations. It can easily reproduced by following script: yes . | head -1000000 | xargs stat > /dev/null for i in `seq 1 10`; do seq 500 | (cd /cg/memory && xargs mkdir) seq 500 | xargs -I{} sh -c 'echo $BASHPID > \ /cg/memory/{}/tasks && exec stat .' > /dev/null seq 500 | (cd /cg/memory && xargs rmdir) done The busy stack: kasan_cache_shutdown shutdown_cache memcg_destroy_kmem_caches mem_cgroup_css_free css_free_rwork_fn process_one_work worker_thread kthread ret_from_fork This patch is based on the observation that if the kmem_cache to be destroyed is empty then there should not be any objects of this cache in the quarantine. Without the patch the script got stuck for couple of hours. With the patch the script completed within a second. Link: http://lkml.kernel.org/r/20180327230603.54721-1-shakeelb@google.com Signed-off-by: Shakeel Butt Reviewed-by: Andrew Morton Acked-by: Andrey Ryabinin Acked-by: Christoph Lameter Cc: Vladimir Davydov Cc: Alexander Potapenko Cc: Greg Thelen Cc: Dmitry Vyukov Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/kasan.c | 3 ++- mm/slab.c | 12 ++++++++++++ mm/slab.h | 1 + mm/slub.c | 11 +++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) commit 1ba586de22909f48db78682ee791e0213aba73ae Author: Mikulas Patocka Date: Thu Apr 5 16:21:53 2018 -0700 mm/slab_common.c: remove test if cache name is accessible Since commit db265eca7700 ("mm/sl[aou]b: Move duping of slab name to slab_common.c"), the kernel always duplicates the slab cache name when creating a slab cache, so the test if the slab name is accessible is useless. Link: http://lkml.kernel.org/r/alpine.LRH.2.02.1803231133310.22626@file01.intranet.prod.int.rdu2.redhat.com Signed-off-by: Mikulas Patocka Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab_common.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 613a5eb5677923fdaecfa582738c7bcf80abe186 Author: Shakeel Butt Date: Thu Apr 5 16:21:50 2018 -0700 slab, slub: remove size disparity on debug kernel I have noticed on debug kernel with SLAB, the size of some non-root slabs were larger than their corresponding root slabs. e.g. for radix_tree_node: $cat /proc/slabinfo | grep radix name ... radix_tree_node 15052 15075 4096 1 1 ... $cat /cgroup/memory/temp/memory.kmem.slabinfo | grep radix name ... radix_tree_node 1581 158 4120 1 2 ... However for SLUB in debug kernel, the sizes were same. On further inspection it is found that SLUB always use kmem_cache.object_size to measure the kmem_cache.size while SLAB use the given kmem_cache.size. In the debug kernel the slab's size can be larger than its object_size. Thus in the creation of non-root slab, the SLAB uses the root's size as base to calculate the non-root slab's size and thus non-root slab's size can be larger than the root slab's size. For SLUB, the non-root slab's size is measured based on the root's object_size and thus the size will remain same for root and non-root slab. This patch makes slab's object_size the default base to measure the slab's size. Link: http://lkml.kernel.org/r/20180313165428.58699-1-shakeelb@google.com Fixes: 794b1248be4e ("memcg, slab: separate memcg vs root cache creation paths") Signed-off-by: Shakeel Butt Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab_common.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 302d55d51d04ab92f8b3f6a89d3424299e3efdf7 Author: Alexey Dobriyan Date: Thu Apr 5 16:21:46 2018 -0700 slab: use 32-bit arithmetic in freelist_randomize() SLAB doesn't support 4GB+ of objects per slab, therefore randomization doesn't need size_t. Link: http://lkml.kernel.org/r/20180305200730.15812-25-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 870b1fbb036c0e115aeb8a48478643c16b73d204 Author: Alexey Dobriyan Date: Thu Apr 5 16:21:43 2018 -0700 slub: make size_from_object() return unsigned int Function returns size of the object without red zone which can't be negative. Link: http://lkml.kernel.org/r/20180305200730.15812-24-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19af27aff901e401a5b79e5c974e881e4701162c Author: Alexey Dobriyan Date: Thu Apr 5 16:21:39 2018 -0700 slub: make struct kmem_cache_order_objects::x unsigned int struct kmem_cache_order_objects is for mixing order and number of objects, and orders aren't big enough to warrant 64-bit width. Propagate unsignedness down so that everything fits. !!! Patch assumes that "PAGE_SIZE << order" doesn't overflow. !!! Link: http://lkml.kernel.org/r/20180305200730.15812-23-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 2 +- mm/slub.c | 74 +++++++++++++++++++++++++----------------------- 2 files changed, 40 insertions(+), 36 deletions(-) commit 284b50ddcf32e3fe1cd39bfc9ad803704e6ca338 Author: Alexey Dobriyan Date: Thu Apr 5 16:21:35 2018 -0700 slub: make slab_index() return unsigned int slab_index() returns index of an object within a slab which is at most u15 (or u16?). Iterators additionally guarantee that "p >= addr". Link: http://lkml.kernel.org/r/20180305200730.15812-22-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7bbdb81ee3de73f2381ceec1bbee831f4c913b5c Author: Alexey Dobriyan Date: Thu Apr 5 16:21:31 2018 -0700 slab: make usercopy region 32-bit If kmem case sizes are 32-bit, then usecopy region should be too. Link: http://lkml.kernel.org/r/20180305200730.15812-21-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Cc: David Miller Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab.h | 2 +- include/linux/slab_def.h | 4 ++-- include/linux/slub_def.h | 4 ++-- include/net/sock.h | 4 ++-- mm/slab.h | 4 ++-- mm/slab_common.c | 7 ++++--- mm/slub.c | 2 +- 7 files changed, 14 insertions(+), 13 deletions(-) commit be4a7988b35db9e6f95dca818d5e94785840fb58 Author: Alexey Dobriyan Date: Thu Apr 5 16:21:28 2018 -0700 kasan: make kasan_cache_create() work with 32-bit slab cache sizes If SLAB doesn't support 4GB+ kmem caches (it never did), KASAN should not do it as well. Link: http://lkml.kernel.org/r/20180305200730.15812-20-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kasan.h | 4 ++-- mm/kasan/kasan.c | 12 ++++++------ mm/slab.c | 2 +- mm/slub.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) commit 0293d1fdd677a09b816df0c7bfe8f60d1b9b956f Author: Alexey Dobriyan Date: Thu Apr 5 16:21:24 2018 -0700 slab: make kmem_cache_flags accept 32-bit object size Now that all sizes are properly typed, propagate "unsigned int" down the callgraph. Link: http://lkml.kernel.org/r/20180305200730.15812-19-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 2 +- mm/slab.h | 4 ++-- mm/slub.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 44065b2e2975ff5987164b98d29cc78e207f9a5a Author: Alexey Dobriyan Date: Thu Apr 5 16:21:20 2018 -0700 slub: make ->size unsigned int Linux doesn't support negative length objects (including meta data). Link: http://lkml.kernel.org/r/20180305200730.15812-18-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 2 +- mm/slub.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit 1b473f29d5dd766903ac2372ac04b07600f233d0 Author: Alexey Dobriyan Date: Thu Apr 5 16:21:17 2018 -0700 slub: make ->object_size unsigned int Linux doesn't support negative length objects. Link: http://lkml.kernel.org/r/20180305200730.15812-17-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 2 +- mm/slab_common.c | 2 +- mm/slub.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) commit a5035de2c4472d6c58c60a7f8eaad8ed0084b8b2 Author: Alexey Dobriyan Date: Thu Apr 5 16:21:13 2018 -0700 slub: make ->offset unsigned int ->offset is free pointer offset from the start of the object, can't be negative. Link: http://lkml.kernel.org/r/20180305200730.15812-16-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5d9998f3e09359b372a037a6ac55ba235d95d57 Author: Alexey Dobriyan Date: Thu Apr 5 16:21:10 2018 -0700 slub: make ->cpu_partial unsigned int /* * cpu_partial determined the maximum number of objects * kept in the per cpu partial lists of a processor. */ Can't be negative. Link: http://lkml.kernel.org/r/20180305200730.15812-15-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 3 ++- mm/slub.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 52ee6d74aa23a3c5d4472edf167f2bb47776a733 Author: Alexey Dobriyan Date: Thu Apr 5 16:21:06 2018 -0700 slub: make ->inuse unsigned int ->inuse is "the number of bytes in actual use by the object", can't be negative. Link: http://lkml.kernel.org/r/20180305200730.15812-14-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 2 +- mm/slub.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) commit 3a3791ec2ecd5db8d903b66faa340b0dfa72e64b Author: Alexey Dobriyan Date: Thu Apr 5 16:21:02 2018 -0700 slub: make ->align unsigned int Kmem cache alignment can't be negative. Link: http://lkml.kernel.org/r/20180305200730.15812-13-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 2 +- mm/slub.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d66e52d1e82b1adfab541f1aad09526ebf67842d Author: Alexey Dobriyan Date: Thu Apr 5 16:20:58 2018 -0700 slub: make ->reserved unsigned int ->reserved is either 0 or sizeof(struct rcu_head), can't be negative. Link: http://lkml.kernel.org/r/20180305200730.15812-12-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 2 +- mm/slub.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2ca6d39b31022bb9e1dda77109e292517f701261 Author: Alexey Dobriyan Date: Thu Apr 5 16:20:55 2018 -0700 slub: make ->red_left_pad unsigned int Padding length can't be negative. Link: http://lkml.kernel.org/r/20180305200730.15812-11-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56d8ceebd39b4db3248291e6d1e3e696fc73b077 Author: Alexey Dobriyan Date: Thu Apr 5 16:20:51 2018 -0700 slub: make ->max_attr_size unsigned int ->max_attr_size is maximum length of every SLAB memcg attribute ever written. VFS limits those to INT_MAX. Link: http://lkml.kernel.org/r/20180305200730.15812-10-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eb7235eb842043ca302e992286ca6af63a8127fe Author: Alexey Dobriyan Date: Thu Apr 5 16:20:48 2018 -0700 slub: make ->remote_node_defrag_ratio unsigned int ->remote_node_defrag_ratio is in range 0..1000. This also adds a check and modifies the behavior to return an error code. Before this patch invalid values were ignored. Link: http://lkml.kernel.org/r/20180305200730.15812-9-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 2 +- mm/slub.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) commit ac914d08bbb6afdc089ca6651af1988533c9786c Author: Alexey Dobriyan Date: Thu Apr 5 16:20:44 2018 -0700 slab: make size_index_elem() unsigned int size_index_elem() always works with small sizes (kmalloc caches are 32-bit) and returns small indexes. Link: http://lkml.kernel.org/r/20180305200730.15812-8-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d5f866550df237861f9d59ca0206434b0dea9701 Author: Alexey Dobriyan Date: Thu Apr 5 16:20:40 2018 -0700 slab: make size_index[] array u8 All those small numbers are reverse indexes into kmalloc caches array and can't be negative. On x86_64 "unsigned int = fls()" can drop CDQE instruction: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-2 (-2) Function old new delta kmalloc_slab 101 99 -2 Link: http://lkml.kernel.org/r/20180305200730.15812-7-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f4957d5bd09165b165df851fbf8c658f7fcd9922 Author: Alexey Dobriyan Date: Thu Apr 5 16:20:37 2018 -0700 slab: make kmem_cache_create() work with 32-bit sizes struct kmem_cache::size and ::align were always 32-bit. Out of curiosity I created 4GB kmem_cache, it oopsed with division by 0. kmem_cache_create(1UL<<32+1) created 1-byte cache as expected. size_t doesn't work and never did. Link: http://lkml.kernel.org/r/20180305200730.15812-6-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab.h | 7 ++++--- mm/slab.c | 2 +- mm/slab.h | 6 +++--- mm/slab_common.c | 19 ++++++++++--------- mm/slub.c | 2 +- 5 files changed, 19 insertions(+), 17 deletions(-) commit 361d575e5c7a39c73a8a9bdd504c1d1274f280aa Author: Alexey Dobriyan Date: Thu Apr 5 16:20:33 2018 -0700 slab: make create_boot_cache() work with 32-bit sizes struct kmem_cache::size has always been "int", all those "size_t size" are fake. Link: http://lkml.kernel.org/r/20180305200730.15812-5-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.h | 4 ++-- mm/slab_common.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) commit 55de8b9c60f2f6da9bf5c9144020882d07e62296 Author: Alexey Dobriyan Date: Thu Apr 5 16:20:29 2018 -0700 slab: make create_kmalloc_cache() work with 32-bit sizes KMALLOC_MAX_CACHE_SIZE is 32-bit so is the largest kmalloc cache size. Christoph said: : : Ok SLABs maximum allocation size is limited to 32M (see : include/linux/slab.h: : : #define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT - 1) <= 25 ? \ : (MAX_ORDER + PAGE_SHIFT - 1) : 25) : : And SLUB/SLOB pass all larger requests to the page allocator anyways. Link: http://lkml.kernel.org/r/20180305200730.15812-4-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.h | 8 ++++---- mm/slab_common.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) commit 0be70327ec8cf6dd6847cbd8b75ca51be864a6ea Author: Alexey Dobriyan Date: Thu Apr 5 16:20:26 2018 -0700 slab: make kmalloc_size() return "unsigned int" kmalloc_size() derives size of kmalloc cache from internal index, which can't be negative. Propagate unsignedness a bit. Link: http://lkml.kernel.org/r/20180305200730.15812-3-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab.h | 4 ++-- mm/slab_common.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 36071a279b4100afe9fbee18727ad78daa307591 Author: Alexey Dobriyan Date: Thu Apr 5 16:20:22 2018 -0700 slab: make kmalloc_index() return "unsigned int" kmalloc_index() return index into an array of kmalloc kmem caches, therefore should be unsigned. Space savings with SLUB on trimmed down .config: add/remove: 0/1 grow/shrink: 6/56 up/down: 85/-557 (-472) Function old new delta calculate_sizes 924 983 +59 on_freelist 589 604 +15 init_cache_random_seq 122 127 +5 ext4_mb_init 1206 1210 +4 slab_pad_check.part 270 271 +1 cpu_partial_store 112 113 +1 usersize_show 28 27 -1 ... new_slab 1871 1837 -34 slab_order 204 - -204 This patch start a series of converting SLUB (mostly) to "unsigned int". 1) Most integers in the code are in fact unsigned entities: array indexes, lengths, buffer sizes, allocation orders. It is therefore better to use unsigned variables 2) Some integers in the code are either "size_t" or "unsigned long" for no reason. size_t usually comes from people trying to maintain type correctness and figuring out that "sizeof" operator returns size_t or memset/memcpy takes size_t so should everything passed to it. However the number of 4GB+ objects in the kernel is very small. Most, if not all, dynamically allocated objects with kmalloc() or kmem_cache_create() aren't actually big. Maintaining wide types doesn't do anything. 64-bit ops are bigger than 32-bit on our beloved x86_64, so try to not use 64-bit where it isn't necessary (read: everywhere where integers are integers not pointers) 3) in case of SLAB allocators, there are additional limitations *) page->inuse, page->objects are only 16-/15-bit, *) cache size was always 32-bit *) slab orders are small, order 20 is needed to go 64-bit on x86_64 (PAGE_SIZE << order) Basically everything is 32-bit except kmalloc(1ULL<<32) which gets shortcut through page allocator. Christoph said: : : That changes with large base page size on power and ARM64 f.e. but then : we do not want to encourage larger allocations through slab anyways. Link: http://lkml.kernel.org/r/20180305200730.15812-2-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c86305743bdf3928ed7fbc685724c04bbd5331aa Author: Alexey Dobriyan Date: Thu Apr 5 16:20:18 2018 -0700 slab: fixup calculate_alignment() argument type Link: http://lkml.kernel.org/r/20180305200730.15812-1-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86609d3319ad57ff65c20890391a035acad47bb1 Author: Chintan Pandya Date: Thu Apr 5 16:20:15 2018 -0700 mm/slub.c: use jitter-free reference while printing age When SLUB_DEBUG catches some issues, it prints all the required debug info. However, in a few cases where allocation and free of the object has happened in a very short time, 'age' might be misleading. See the example below: ============================================================================= BUG kmalloc-256 (Tainted: G W O ): Poison overwritten ----------------------------------------------------------------------------- ... INFO: Allocated in binder_transaction+0x4b0/0x2448 age=731 cpu=3 pid=5314 ... INFO: Freed in binder_free_transaction+0x2c/0x58 age=735 cpu=6 pid=2079 ... Object fffffff14956a870: 6b 6b 6b 6b 6b 6b 6b 6b 67 6b 6b 6b 6b 6b 6b a5 kkkkkkkkgkkkk In this case, object got freed later but 'age' shows otherwise. This could be because, while printing this info, we print allocation traces first and free traces thereafter. In between, if we get schedule out or jiffies increment, (jiffies - t->when) could become meaningless. Use the jitter free reference to calculate age. New output will exactly be same. 'age' is still staying with single jiffies ref in both prints. Change-Id: I0846565807a4229748649bbecb1ffb743d71fcd8 Link: http://lkml.kernel.org/r/1520492010-19389-1-git-send-email-cpandya@codeaurora.org Signed-off-by: Chintan Pandya Acked-by: Christoph Lameter Reviewed-by: Andrew Morton Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 1c99ba2918df372c7cb1fde81d8a6311fdd62aab Author: Alexey Dobriyan Date: Thu Apr 5 16:20:11 2018 -0700 mm/slab_common.c: mark kmalloc machinery as __ro_after_init kmalloc caches aren't relocated after being set up neither does "size_index" array. Link: http://lkml.kernel.org/r/20180226203519.GA6886@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab_common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 849cf55963dfd877ad92996195e0fe7218eaf0e9 Author: shunki-fujita Date: Thu Apr 5 16:20:07 2018 -0700 fs: don't flush pagecache when expanding block device When changing the size of a block device, its all caches are freed. It's necessary on shrinking to prevent spurious I/Os to the disappeared region. However, on expanding, such kind of I/Os doesn't happen. Similar things can be considered for btrfs filesystem resize and resize2fs, but they are designed not to drop caches when expanding. Therefore this patch removes unnecessary cache drop. Link: http://lkml.kernel.org/r/1521457240-153390-1-git-send-email-shunki-fujita@cybozu.co.jp Signed-off-by: Shunki Fujita Cc: Al Viro Cc: Jens Axboe Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/block_dev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9421c3e64137ec69e5cf4ed024dc777a09b7779f Author: Chengguang Xu Date: Thu Apr 5 16:20:01 2018 -0700 net/9p/client.c: fix potential refcnt problem of trans module When specifying trans_mod multiple times in a mount, it will cause an inaccurate refcount of the trans module. Also, in the error case of option parsing, we should put the trans module if we have already got it. Link: http://lkml.kernel.org/r/1522154942-57339-1-git-send-email-cgxu519@gmx.com Signed-off-by: Chengguang Xu Reviewed-by: Andrew Morton Cc: David Miller Cc: Eric Van Hensbergen Cc: Ron Minnich Cc: Latchesar Ionkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds net/9p/client.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7ff3c2046803ac99d95de6d63cda46c84f72293b Author: Yiwen Jiang Date: Thu Apr 5 16:19:57 2018 -0700 fs/9p: don't set SB_NOATIME by default When the user uses some syscall, for example mmap(v9fs_file_mmap), it will not update atime even if user's was set mnt_flags without MNT_NOATIME, because v9fs defaults to settine SB_NOATIME in v9fs_set_super. For supporting access time updating when the user mounts with relatime, we should not set SB_NOATIME by default. Link: http://lkml.kernel.org/r/5AB9A377.6080906@huawei.com Signed-off-by: Yiwen Jiang Reviewed-by: Greg Kurz Cc: Eric Van Hensbergen Cc: Ron Minnich Cc: Latchesar Ionkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/9p/vfs_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a25c36577ca788f9ea4b229baef1b6d436393a4c Author: Chengguang Xu Date: Thu Apr 5 16:19:53 2018 -0700 9p: check memory allocation result for cachetag Check memory allocation result for cachetag in mount option parsing and fix potential memory leak in the error case. Link: http://lkml.kernel.org/r/1521614889-73446-1-git-send-email-cgxu519@gmx.com Signed-off-by: Chengguang Xu Reviewed-by: Andrew Morton Cc: Eric Van Hensbergen Cc: Ron Minnich Cc: Latchesar Ionkov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/9p/v9fs.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ac89b2ef9b55924bcf922251f043ba73a32d05bb Author: Eryu Guan Date: Thu Apr 5 16:19:49 2018 -0700 9p: don't maintain dir i_nlink if the exported fs doesn't either If the exported filesystem dir on 9p server doesn't maintain accurate i_nlink count, e.g. always reports i_nlink as 1, then 9p should not maintain nlink count either, otherwise drop_link would report warning with i_nlink being zero. For example: - overlayfs sets nlink to 1 for merged dir - ext4 (with dir_nlink feature enabled) sets nlink to 1 if a dir has more than EXT4_LINK_MAX (65000) links. In this case, everytime a stat(2) call (getattr) on such exported dirs on 9p client side, the i_nlink gets reset to 1, then operations like rmdir(2), unlink(2) and rename(2) would cause the dir nlink to go to zero (then negative), which results in warnings in drop_nlink() and/or inc_nlink() calls. This can be reproduced easily as the following steps: - export a merged overlayfs dir via qemu virtfs to guest - mount the exported virtfs in guest - create two sub-directories in the root dir of the mounted 9pfs - stat the root dir of 9pfs, this resets nlink to 1 - remove all subdirs, the second unlink/rmdir would trigger warning ------------[ cut here ]------------ WARNING: CPU: 3 PID: 1284 at fs/inode.c:282 drop_nlink+0x3e/0x50 ... Call Trace: dump_stack+0x63/0x81 __warn+0xcb/0xf0 warn_slowpath_null+0x1d/0x20 drop_nlink+0x3e/0x50 v9fs_remove+0xaa/0x130 [9p] v9fs_vfs_rmdir+0x13/0x20 [9p] vfs_rmdir+0xb7/0x130 do_rmdir+0x1b8/0x230 SyS_unlinkat+0x22/0x30 do_syscall_64+0x67/0x180 ---[ end trace 43758d8ba91e603b ]--- Fix it by leaving i_nlink to be 1 and don't drop nlink if a directory has nlink <= 2, which indicates that the underlying exported fs doesn't maintain nlink count accurately. This follows what ext4 does in ext4_dec_count(). Link: http://lkml.kernel.org/r/20180312053829.4367-1-eguan@linux.alibaba.com Signed-off-by: Eryu Guan Reviewed-by: Yiwen Jiang Tested-by: Roman Kapl Cc: Caspar Zhang Cc: Eric Van Hensbergen Cc: Ron Minnich Cc: Latchesar Ionkov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/9p/vfs_inode.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit a85222435bd055b2d2cedc515d810a5ea6c05432 Author: Greg Kurz Date: Thu Apr 5 16:19:44 2018 -0700 net/9p: avoid -ERESTARTSYS leak to userspace If it was interrupted by a signal, the 9p client may need to send some more requests to the server for cleanup before returning to userspace. To avoid such a last minute request to be interrupted right away, the client memorizes if a signal is pending, clears TIF_SIGPENDING, handles the request and calls recalc_sigpending() before returning. Unfortunately, if the transmission of this cleanup request fails for any reason, the transport returns an error and the client propagates it right away, without calling recalc_sigpending(). This ends up with -ERESTARTSYS from the initially interrupted request crawling up to syscall exit, with TIF_SIGPENDING cleared by the cleanup request. The specific signal handling code, which is responsible for converting -ERESTARTSYS to -EINTR is not called, and userspace receives the confusing errno value: open: Unknown error 512 (512) This is really hard to hit in real life. I discovered the issue while working on hot-unplug of a virtio-9p-pci device with an instrumented QEMU allowing to control request completion. Both p9_client_zc_rpc() and p9_client_rpc() functions have this buggy error path actually. Their code flow is a bit obscure and the best thing to do would probably be a full rewrite: to really ensure this situation of clearing TIF_SIGPENDING and returning -ERESTARTSYS can never happen. But given the general lack of interest for the 9p code, I won't risk breaking more things. So this patch simply fixes the buggy paths in both functions with a trivial label+goto. Thanks to Laurent Dufour for his help and suggestions on how to find the root cause and how to fix it. Link: http://lkml.kernel.org/r/152062809886.10599.7361006774123053312.stgit@bahia.lan Signed-off-by: Greg Kurz Reviewed-by: Andrew Morton Reviewed-by: Yiwen Jiang Cc: Eric Van Hensbergen Cc: Ron Minnich Cc: Latchesar Ionkov Cc: David Miller Cc: Laurent Dufour Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds net/9p/client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit de37428638ec7d22b46c4c20b8536f3681559e2c Author: Changwei Ge Date: Thu Apr 5 16:19:40 2018 -0700 ocfs2/dlm: clean up unused variable in dlm_process_recovery_data Link: http://lkml.kernel.org/r/1522734135-7933-1-git-send-email-ge.changwei@h3c.com Signed-off-by: Changwei Ge Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmrecovery.c | 4 ---- 1 file changed, 4 deletions(-) commit ba16ddfbeb9dde0df67cdb2006820e9cf4d99386 Author: piaojun Date: Thu Apr 5 16:19:36 2018 -0700 ocfs2/o2hb: check len for bio_add_page() to avoid getting incorrect bio We need to check len for bio_add_page() to make sure the bio has been set up correctly, otherwise we may submit incorrect data to device. Link: http://lkml.kernel.org/r/5ABC3EBE.5020807@huawei.com Signed-off-by: Jun Piao Reviewed-by: Yiwen Jiang Reviewed-by: Changwei Ge Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/cluster/heartbeat.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 39ec3774e3e8ebd5e45b0a5d071531d36f67c158 Author: Gang He Date: Thu Apr 5 16:19:32 2018 -0700 ocfs2: add duplicated ino number check Add duplicated ino number check, to avoid adding a file into the file check list when this file is being checked. Link: http://lkml.kernel.org/r/1495611866-27360-5-git-send-email-ghe@suse.com Signed-off-by: Gang He Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/filecheck.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 5f483c4abb507d068b326f24e4ea3481db9cda06 Author: Gang He Date: Thu Apr 5 16:19:29 2018 -0700 ocfs2: add kobject for online file check Use embedded kobject mechanism for online file check feature, this will avoid to use a global list to save/search per-device online file check related data, meanwhile, reduce the code lines and make the code logic clear. The changed code is based on Goldwyn Rodrigues's patches and ext4 fs code. Link: http://lkml.kernel.org/r/1495611866-27360-4-git-send-email-ghe@suse.com Signed-off-by: Gang He Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/filecheck.c | 302 ++++++++++++++++++++------------------------------- fs/ocfs2/filecheck.h | 20 ++-- fs/ocfs2/ocfs2.h | 8 ++ fs/ocfs2/super.c | 27 ++++- 4 files changed, 155 insertions(+), 202 deletions(-) commit 8fc2cb4ba03ee3502ec23de825cd133f5388738f Author: Gang He Date: Thu Apr 5 16:19:25 2018 -0700 ocfs2: fix some small problems First, move setting fe_done = 1 in spin lock, avoid bring any potential race condition. Second, tune mlog message level from ERROR to NOTICE, since the message should not belong to error message. Third, tune errno to -EAGAIN when file check queue is full, this errno is more appropriate in the case. Link: http://lkml.kernel.org/r/1495611866-27360-3-git-send-email-ghe@suse.com Signed-off-by: Gang He Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/filecheck.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5ac94386194eccc2125c17d1b75aa8364584f585 Author: Gang He Date: Thu Apr 5 16:19:22 2018 -0700 ocfs2: move some definitions to header file Patch series "ocfs2: use kobject for online file check", v3. Use embedded kobject mechanism for online file check feature, this will avoid to use a global list to save/search per-device online file check related data. The changed code is based on Goldwyn Rodrigues's patches and ext4 fs code, there is not any new features added, except some very small fixes during this code refactoring. Second, the code change does not affect the underlying file check code. Thank Goldwyn very much. Compare with second version, add more comments in the patch descriptions, to make sure each modification is mentioned. Compare with first version, split the code change into four patches, make sure each patch will not bring ocfs2 kernel modules compiling errors. This patch (of 3): Move some definitions to header file, which will be referenced by other source files when kobject mechanism is introduced. Link: http://lkml.kernel.org/r/1495611866-27360-2-git-send-email-ghe@suse.com Signed-off-by: Gang He Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/filecheck.c | 27 --------------------------- fs/ocfs2/filecheck.h | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 27 deletions(-) commit baa31b89b00236ea459502bff490aef1a0d29562 Author: Changwei Ge Date: Thu Apr 5 16:19:18 2018 -0700 ocfs2: correct spelling mistake for migratable for all Inspired by the ocfs2 patch to fix the spelling of migrateable to migratable, I checked all ocfs2 files and found more spelling mistakes. So correct them all. Link: http://lkml.kernel.org/r/1521525734-19576-1-git-send-email-ge.changwei@h3c.com Signed-off-by: Changwei Ge Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmmaster.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 510c48795d4b48963d4d8a889bb8650a11e3f440 Author: Colin Ian King Date: Thu Apr 5 16:19:14 2018 -0700 ocfs2: fix spelling mistake: "Migrateable" -> "Migratable" Trivial fix to spelling mistake in mlog message text Link: http://lkml.kernel.org/r/20180319114101.2051-1-colin.king@canonical.com Signed-off-by: Colin Ian King Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmmaster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60c7ec9ee4a3410c2cb08850102d363c7e207f48 Author: piaojun Date: Thu Apr 5 16:19:11 2018 -0700 ocfs2/dlm: wait for dlm recovery done when migrating all lock resources Wait for dlm recovery done when migrating all lock resources in case that new lock resource left after leaving dlm domain. And the left lock resource will cause other nodes BUG. NodeA NodeB NodeC umount: dlm_unregister_domain() dlm_migrate_all_locks() NodeB down do recovery for NodeB and collect a new lockres form other live nodes: dlm_do_recovery dlm_remaster_locks dlm_request_all_locks: dlm_mig_lockres_handler dlm_new_lockres __dlm_insert_lockres at last NodeA become the master of the new lockres and leave domain: dlm_leave_domain() mount: dlm_join_domain() touch file and request for the owner of the new lockres, but all the other nodes said 'NO', so NodeC decide to be the owner, and send do assert msg to other nodes: dlmlock() dlm_get_lock_resource() dlm_do_assert_master() other nodes receive the msg and found two masters exist. at last cause BUG in dlm_assert_master_handler() -->BUG(); Link: http://lkml.kernel.org/r/5AAA6E25.7090303@huawei.com Fixes: bc9838c4d44a ("dlm: allow dlm do recovery during shutdown") Signed-off-by: Jun Piao Reviewed-by: Alex Chen Reviewed-by: Yiwen Jiang Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmcommon.h | 1 + fs/ocfs2/dlm/dlmdomain.c | 15 +++++++++++++++ fs/ocfs2/dlm/dlmrecovery.c | 13 ++++++++++--- 3 files changed, 26 insertions(+), 3 deletions(-) commit a43d24cb3b0b395de8bb176355a907a9c9a1c42e Author: Changwei Ge Date: Thu Apr 5 16:19:07 2018 -0700 ocfs2/dlm: clean up unused stack variable in dlm_do_local_ast() Link: http://lkml.kernel.org/r/1521116681-14602-2-git-send-email-ge.changwei@h3c.com Signed-off-by: Changwei Ge Cc: Mark Fasheh Cc: Joseph Qi Cc: Junxiao Bi Cc: Joel Becker Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmast.c | 2 -- 1 file changed, 2 deletions(-) commit 2bcb654c93a5a9d741d964c3d399b9e8e9157e8c Author: Changwei Ge Date: Thu Apr 5 16:19:03 2018 -0700 ocfs2/dlm: clean up unused argument for dlm_destroy_recovery_area() Link: http://lkml.kernel.org/r/1521116681-14602-1-git-send-email-ge.changwei@h3c.com Signed-off-by: Changwei Ge Cc: Mark Fasheh Cc: Joseph Qi Cc: Junxiao Bi Cc: Joel Becker Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmrecovery.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 26ec1615ca82e00b583aab92a0d88d9c392932e3 Author: Changwei Ge Date: Thu Apr 5 16:19:00 2018 -0700 fs/ocfs2/dlm/dlmrecovery.c: remove unrelated comment Obviously, the comment before dlm_do_local_recovery_cleanup() has nothing to do with it. So remove it. Link: http://lkml.kernel.org/r/1519371054-4648-1-git-send-email-ge.changwei@h3c.com Signed-off-by: Changwei Ge Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmrecovery.c | 7 ------- 1 file changed, 7 deletions(-) commit a012ab4d4316e6a6da8d93e96c74c51b59965dc3 Author: Changwei Ge Date: Thu Apr 5 16:18:56 2018 -0700 ocfs2: remove two unused functions from suballoc.c The two functions are no longer used. Link: http://lkml.kernel.org/r/1519609595-26229-1-git-send-email-ge.changwei@h3c.com Signed-off-by: Changwei Ge Reviewed-by: Andrew Morton Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/suballoc.c | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) commit a17b485aae3effe2f35345dc7af4ed2070a2d949 Author: piaojun Date: Thu Apr 5 16:18:52 2018 -0700 ocfs2: remove unnecessary null pointer check before kmem_cache_destroy() As kmem_cache_destroy() already handles null pointers, so we can remove the conditional test entirely. Link: http://lkml.kernel.org/r/5A9EB21D.3000209@huawei.com Signed-off-by: Jun Piao Reviewed-by: Yiwen Jiang Reviewed-by: Andrew Morton Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmlock.c | 3 +-- fs/ocfs2/dlm/dlmmaster.c | 15 +++++---------- fs/ocfs2/super.c | 18 ++++++------------ fs/ocfs2/uptodate.c | 3 +-- 4 files changed, 13 insertions(+), 26 deletions(-) commit bb34f24c7d2c98d0c81838a7700e6068325b17a0 Author: Jun Piao Date: Thu Apr 5 16:18:48 2018 -0700 ocfs2/dlm: don't handle migrate lockres if already in shutdown We should not handle migrate lockres if we are already in 'DLM_CTXT_IN_SHUTDOWN', as that will cause lockres remains after leaving dlm domain. At last other nodes will get stuck into infinite loop when requsting lock from us. The problem is caused by concurrency umount between nodes. Before receiveing N1's DLM_BEGIN_EXIT_DOMAIN_MSG, N2 has picked up N1 as the migrate target. So N2 will continue sending lockres to N1 even though N1 has left domain. N1 N2 (owner) touch file access the file, and get pr lock begin leave domain and pick up N1 as new owner begin leave domain and migrate all lockres done begin migrate lockres to N1 end leave domain, but the lockres left unexpectedly, because migrate task has passed [piaojun@huawei.com: v3] Link: http://lkml.kernel.org/r/5A9CBD19.5020107@huawei.com Link: http://lkml.kernel.org/r/5A99F028.2090902@huawei.com Signed-off-by: Jun Piao Reviewed-by: Yiwen Jiang Reviewed-by: Joseph Qi Reviewed-by: Changwei Ge Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmdomain.c | 14 -------------- fs/ocfs2/dlm/dlmdomain.h | 25 ++++++++++++++++++++++++- fs/ocfs2/dlm/dlmrecovery.c | 9 +++++++++ 3 files changed, 33 insertions(+), 15 deletions(-) commit 1202d4ba2899e083417b7b4fb9b544942fd2b9b7 Author: Jia Guo Date: Thu Apr 5 16:18:45 2018 -0700 ocfs2: keep the trace point consistent with the function name Keep the trace point consistent with the function name. Link: http://lkml.kernel.org/r/02609aba-84b2-a22d-3f3b-bc1944b94260@huawei.com Fixes: 3ef045c3d8ae ("ocfs2: switch to ->write_iter()") Signed-off-by: Jia Guo Reviewed-by: Jun Piao Reviewed-by: Yiwen Jiang Reviewed-by: Alex Chen Acked-by: Gang He Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/aops.h | 2 +- fs/ocfs2/file.c | 8 ++++---- fs/ocfs2/ocfs2_trace.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) commit bb4c9d67650efb02bd8c2b0ea077d421d54cbc4c Author: piaojun Date: Thu Apr 5 16:18:41 2018 -0700 ocfs2: remove some unused function declarations Remove some unused function declarations in dlmcommon.h. Link: http://lkml.kernel.org/r/5A7D1034.7050807@huawei.com Signed-off-by: Jun Piao Reviewed-by: Yiwen Jiang Reviewed-by: Changwei Ge Reviewed-by: Alex Chen Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmcommon.h | 3 --- 1 file changed, 3 deletions(-) commit d324cd4c80b9cbe1c2ac5285f071387c79bea455 Author: piaojun Date: Thu Apr 5 16:18:37 2018 -0700 ocfs2: use 'oi' instead of 'OCFS2_I()' We could use 'oi' instead of 'OCFS2_I()' to make code more elegant. Link: http://lkml.kernel.org/r/5A7020FE.5050906@huawei.com Signed-off-by: Jun Piao Reviewed-by: Yiwen Jiang Reviewed-by: Alex Chen Reviewed-by: Andrew Morton Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/alloc.c | 2 +- fs/ocfs2/aops.c | 2 +- fs/ocfs2/file.c | 6 +++--- fs/ocfs2/inode.c | 2 +- fs/ocfs2/namei.c | 6 +++--- fs/ocfs2/refcounttree.c | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) commit 1119d3c06f64a7123d774c363440987952c522ef Author: piaojun Date: Thu Apr 5 16:18:33 2018 -0700 ocfs2: use 'osb' instead of 'OCFS2_SB()' We could use 'osb' instead of 'OCFS2_SB()' to make code more elegant. Link: http://lkml.kernel.org/r/5A702111.7090907@huawei.com Signed-off-by: Jun Piao Reviewed-by: Yiwen Jiang Reviewed-by: Andrew Morton Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/aops.c | 2 +- fs/ocfs2/dir.c | 2 +- fs/ocfs2/dlmglue.c | 21 ++++++++------------- fs/ocfs2/file.c | 2 +- fs/ocfs2/inode.c | 6 +++--- fs/ocfs2/refcounttree.c | 4 ++-- fs/ocfs2/suballoc.c | 4 ++-- fs/ocfs2/super.c | 4 ++-- fs/ocfs2/xattr.c | 2 +- 9 files changed, 21 insertions(+), 26 deletions(-) commit 6870c0165feaa5e337e78ab2c781ed46f086bca2 Author: Changbin Du Date: Thu Apr 5 16:18:29 2018 -0700 scripts/faddr2line: show the code context Inspired by gdb command 'list', show the code context of target lines. Here is a example: $ scripts/faddr2line vmlinux native_write_msr+0x6 native_write_msr+0x6/0x20: arch_static_branch at arch/x86/include/asm/msr.h:105 100 return EAX_EDX_VAL(val, low, high); 101 } 102 103 static inline void notrace __wrmsr(unsigned int msr, u32 low, u32 high) 104 { 105 asm volatile("1: wrmsr\n" 106 "2:\n" 107 _ASM_EXTABLE_HANDLE(1b, 2b, ex_handler_wrmsr_unsafe) 108 : : "c" (msr), "a"(low), "d" (high) : "memory"); 109 } 110 (inlined by) static_key_false at include/linux/jump_label.h:142 137 #define JUMP_TYPE_LINKED 2UL 138 #define JUMP_TYPE_MASK 3UL 139 140 static __always_inline bool static_key_false(struct static_key *key) 141 { 142 return arch_static_branch(key, false); 143 } 144 145 static __always_inline bool static_key_true(struct static_key *key) 146 { 147 return !arch_static_branch(key, true); (inlined by) native_write_msr at arch/x86/include/asm/msr.h:150 145 static inline void notrace 146 native_write_msr(unsigned int msr, u32 low, u32 high) 147 { 148 __wrmsr(msr, low, high); 149 150 if (msr_tracepoint_active(__tracepoint_write_msr)) 151 do_trace_write_msr(msr, ((u64)high << 32 | low), 0); 152 } 153 154 /* Can be uninlined because referenced by paravirt */ 155 static inline int notrace Link: http://lkml.kernel.org/r/1521444205-2259-1-git-send-email-changbin.du@intel.com Signed-off-by: Changbin Du Cc: Thomas Gleixner Cc: Philippe Ombredanne Cc: NeilBrown Cc: Richard Weinberger Cc: Kate Stewart Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/faddr2line | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 8351760ff5b2042039554b4948ddabaac644a976 Author: Yury Norov Date: Thu Apr 5 16:18:25 2018 -0700 lib: fix stall in __bitmap_parselist() syzbot is catching stalls at __bitmap_parselist() (https://syzkaller.appspot.com/bug?id=ad7e0351fbc90535558514a71cd3edc11681997a). The trigger is unsigned long v = 0; bitmap_parselist("7:,", &v, BITS_PER_LONG); which results in hitting infinite loop at while (a <= b) { off = min(b - a + 1, used_size); bitmap_set(maskp, a, off); a += group_size; } due to used_size == group_size == 0. Link: http://lkml.kernel.org/r/20180404162647.15763-1-ynorov@caviumnetworks.com Fixes: 0a5ce0831d04382a ("lib/bitmap.c: make bitmap_parselist() thread-safe and much faster") Signed-off-by: Yury Norov Reported-by: Tetsuo Handa Reported-by: syzbot Cc: Noam Camus Cc: Rasmus Villemoes Cc: Matthew Wilcox Cc: Mauro Carvalho Chehab Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/bitmap.c | 2 +- lib/test_bitmap.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 5df63c2a149ae65a9ec239e7c2af44efa6f79beb Author: Mike Kravetz Date: Thu Apr 5 16:18:21 2018 -0700 hugetlbfs: fix bug in pgoff overflow checking This is a fix for a regression in 32 bit kernels caused by an invalid check for pgoff overflow in hugetlbfs mmap setup. The check incorrectly specified that the size of a loff_t was the same as the size of a long. The regression prevents mapping hugetlbfs files at offsets greater than 4GB on 32 bit kernels. On 32 bit kernels conversion from a page based unsigned long can not overflow a loff_t byte offset. Therefore, skip this check if sizeof(unsigned long) != sizeof(loff_t). Link: http://lkml.kernel.org/r/20180330145402.5053-1-mike.kravetz@oracle.com Fixes: 63489f8e8211 ("hugetlbfs: check for pgoff value overflow") Reported-by: Dan Rue Signed-off-by: Mike Kravetz Tested-by: Anders Roxell Cc: Michal Hocko Cc: Yisheng Xie Cc: "Kirill A . Shutemov" Cc: Nic Losby Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hugetlbfs/inode.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 7bbaf27d9c83037b6e60a818e57bdbedf6bc15be Author: Huacai Chen Date: Thu Apr 5 16:18:18 2018 -0700 zboot: fix stack protector in compressed boot phase Calling __stack_chk_guard_setup() in decompress_kernel() is too late that stack checking always fails for decompress_kernel() itself. So remove __stack_chk_guard_setup() and initialize __stack_chk_guard before we call decompress_kernel(). Original code comes from ARM but also used for MIPS and SH, so fix them together. If without this fix, compressed booting of these archs will fail because stack checking is enabled by default (>=4.16). Link: http://lkml.kernel.org/r/1522226933-29317-1-git-send-email-chenhc@lemote.com Fixes: 8779657d29c0 ("stackprotector: Introduce CONFIG_CC_STACKPROTECTOR_STRONG") Signed-off-by: Huacai Chen Acked-by: James Hogan Acked-by: Kees Cook Acked-by: Rich Felker Cc: Ralf Baechle Cc: Russell King Cc: Yoshinori Sato Cc: Ingo Molnar Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/boot/compressed/misc.c | 9 +-------- arch/mips/boot/compressed/decompress.c | 9 +-------- arch/sh/boot/compressed/misc.c | 9 +-------- 3 files changed, 3 insertions(+), 24 deletions(-) commit 38c23685b273cfb4ccf31a199feccce3bdcb5d83 Merge: 1675693 7df3f0b Author: Linus Torvalds Date: Thu Apr 5 21:29:35 2018 -0700 Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Arnd Bergmann: "The main addition this time around is the new ARM "SCMI" framework, which is the latest in a series of standards coming from ARM to do power management in a platform independent way. This has been through many review cycles, and it relies on a rather interesting way of using the mailbox subsystem, but in the end I agreed that Sudeep's version was the best we could do after all. Other changes include: - the ARM CCN driver is moved out of drivers/bus into drivers/perf, which makes more sense. Similarly, the performance monitoring portion of the CCI driver are moved the same way and cleaned up a little more. - a series of updates to the SCPI framework - support for the Mediatek mt7623a SoC in drivers/soc - support for additional NVIDIA Tegra hardware in drivers/soc - a new reset driver for Socionext Uniphier - lesser bug fixes in drivers/soc, drivers/tee, drivers/memory, and drivers/firmware and drivers/reset across platforms" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (87 commits) reset: uniphier: add ethernet reset control support for PXs3 reset: stm32mp1: Enable stm32mp1 reset driver dt-bindings: reset: add STM32MP1 resets reset: uniphier: add Pro4/Pro5/PXs2 audio systems reset control reset: imx7: add 'depends on HAS_IOMEM' to fix unmet dependency reset: modify the way reset lookup works for board files reset: add support for non-DT systems clk: scmi: use devm_of_clk_add_hw_provider() API and drop scmi_clocks_remove firmware: arm_scmi: prevent accessing rate_discrete uninitialized hwmon: (scmi) return -EINVAL when sensor information is unavailable amlogic: meson-gx-socinfo: Update soc ids soc/tegra: pmc: Use the new reset APIs to manage reset controllers soc: mediatek: update power domain data of MT2712 dt-bindings: soc: update MT2712 power dt-bindings cpufreq: scmi: add thermal dependency soc: mediatek: fix the mistaken pointer accessed when subdomains are added soc: mediatek: add SCPSYS power domain driver for MediaTek MT7623A SoC soc: mediatek: avoid hardcoded value with bus_prot_mask dt-bindings: soc: add header files required for MT7623A SCPSYS dt-binding dt-bindings: soc: add SCPSYS binding for MT7623 and MT7623A SoC ... commit 167569343fac74ec6825a3ab982f795b5880e63e Merge: b240b41 cd90371 Author: Linus Torvalds Date: Thu Apr 5 21:21:08 2018 -0700 Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC platform updates from Arnd Bergmann: "This release brings up a new platform based on the old ARM9 core: the Nuvoton NPCM is used as a baseboard management controller, competing with the better known ASpeed AST2xx series. Another important change is the addition of ARMv7-A based chips in mach-stm32. The older parts in this platform are ARMv7-M based microcontrollers, now they are expanding to general-purpose workloads. The other changes are the usual defconfig updates to enable additional drivers, lesser bugfixes. The largest updates as often are the ongoing OMAP cleanups, but we also have a number of changes for the older PXA and davinci platforms this time. For the Renesas shmobile/r-car platform, some new infrastructure is needed to make the watchdog work correctly. Supporting Multiprocessing on Allwinner A80 required a significant amount of new code, but is not doing anything unexpected" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (179 commits) arm: npcm: modify configuration for the NPCM7xx BMC. MAINTAINERS: update entry for ARM/berlin ARM: omap2: fix am43xx build without L2X0 ARM: davinci: da8xx: simplify CFGCHIP regmap_config ARM: davinci: da8xx: fix oops in USB PHY driver due to stack allocated platform_data ARM: multi_v7_defconfig: add NXP FlexCAN IP support ARM: multi_v7_defconfig: enable thermal driver for i.MX devices ARM: multi_v7_defconfig: add RN5T618 PMIC family support ARM: multi_v7_defconfig: add NXP graphics drivers ARM: multi_v7_defconfig: add GPMI NAND controller support ARM: multi_v7_defconfig: add OCOTP driver for NXP SoCs ARM: multi_v7_defconfig: configure I2C driver built-in arm64: defconfig: add CONFIG_UNIPHIER_THERMAL and CONFIG_SNI_AVE ARM: imx: fix imx6sll-only build ARM: imx: select ARM_CPU_SUSPEND for CPU_IDLE as well ARM: mxs_defconfig: Re-sync defconfig ARM: imx_v4_v5_defconfig: Use the generic fsl-asoc-card driver ARM: imx_v4_v5_defconfig: Re-sync defconfig arm64: defconfig: enable stmmac ethernet to defconfig ARM: EXYNOS: Simplify code in coupled CPU idle hot path ... commit b240b419db5d624ce7a5a397d6f62a1a686009ec Merge: 9c2dd84 518d2f4 Author: Linus Torvalds Date: Thu Apr 5 21:18:09 2018 -0700 Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC device tree updates from Arnd Bergmann: "This is the usual set of changes for device trees, with over 700 non-merged changesets. There is an ongoing set of dtc warning fixes and the usual bugfixes, cleanups and added device support. The most interesting bit as usual is support for new machines listed below: - The Allwinner H6 makes its debut with the Pine-H64 board, and we get two new machines based on its older siblings: the H5 based OrangePi Zero+ and the A64 based Teres-I Laptop from Olimex. On the 32-bit side, we add The Olimex som204 based on Allwinner A20, and the Banana Pi M2 Zero development board (based on H2). - NVIDIA adds support for Tegra194 aka "Xavier", plus their p2972 development board and p2888 CPU module. - The Nuvoton npcm750 is a BMC that was newly added, for now we only support running on the evaluation board. - STmicroelectronics stm32 gains support for the stm32mp157c and two evaluation boards. - The Toradex Colibri board family grows a few members based on the i.MX6ULL variant. - The Advantec DMS-BA16 is a Qseven module using the NXP i.MX6 family of chips. - The Phytec phyBOARD Mira is a family of industrial boards based on i.MX6. For now, four models get added. - TI am335x based PDU-001 is an industrial embedded machine used for traffic monitoring - The Aspeed platform now supports running on the BMC on the Qualcomm Centriq 2400 server - Samsung Exynos4 based Galaxy S3 is a family of mobile phones Qualcomm msm8974 based Galaxy S5 is a rather different phone made by the same company. - The Xilinx Zynq and ZynqMP platforms now gained a lot of dts file for the various boards made by Xilinx themselves, as well as the Digilent Zybo Z7. - The ARM Versatile family now supports the "IB2" interface board. - The Renesas H2 based "Stout" and the H3 based Salvator-X are more evaluation boards named after a kind of beer, as most of them are. The r8a77980 (V3H) based "Condor" apparently doesn't follow that tradition. ;-) - ROC-RK3328-CC is a simple developement board from the Libre Computer Project, based on the Rockchips RK3328 SoC - Haiku is another development board plus Qseven module based on Rockchips RK3368 and made by Theobroma Systems" * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (701 commits) arm: dts: modify Nuvoton NPCM7xx device tree structure arm: dts: modify Makefile NPCM750 configuration name arm: dts: modify clock binding in NPCM750 device tree arm: dts: modify timer register size in NPCM750 device tree arm: dts: modify UART compatible name in NPCM750 device tree arm: dts: add watchdog device to NPCM750 device tree arm64: dts: uniphier: add ethernet node for PXs3 ARM: dts: uniphier: add pinctrl groups of ethernet for second instance arm: dts: kirkwood*.dts: use SPDX-License-Identifier for board using GPL-2.0+ arm: dts: kirkwood*.dts: use SPDX-License-Identifier for boards using GPL-2.0+/MIT arm: dts: kirkwood*.dts: use SPDX-License-Identifier for boards using GPL-2.0 arm: dts: armada-385-turris-omnia: use SPDX-License-Identifier arm: dts: armada-385-db-ap: use SPDX-License-Identifier arm: dts: armada-388-rd: use SPDX-License-Identifier arm: dts: armada-xp-db-xc3-24g4xg: use SPDX-License-Identifier arm: dts: armada-xp-db-dxbc2: use SPDX-License-Identifier arm: dts: armada-370-db: use SPDX-License-Identifier arm: dts: armada-*.dts: use SPDX-License-Identifier for most of the Armada based board arm: dts: armada-xp-98dx: use SPDX-License-Identifier for prestara 98d SoCs arm: dts: armada-*.dtsi: use SPDX-License-Identifier for most of the Armada SoCs ... commit 9c2dd8405c0cc2288d6098df40c19569d17553e4 Merge: d66db9f 8274732 Author: Linus Torvalds Date: Thu Apr 5 21:03:42 2018 -0700 Merge tag 'devicetree-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree updates from Rob Herring: - Sync dtc to upstream version v1.4.6-9-gaadd0b65c987. This adds a bunch more warnings (hidden behind W=1). - Build dtc lexer and parser files instead of using shipped versions. - Rework overlay apply API to take an FDT as input and apply overlays in a single step. - Add a phandle lookup cache. This improves boot time by hundreds of msec on systems with large DT. - Add trivial mcp4017/18/19 potentiometers bindings. - Remove VLA stack usage in DT code. * tag 'devicetree-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (26 commits) of: unittest: fix an error code in of_unittest_apply_overlay() of: unittest: move misplaced function declaration of: unittest: Remove VLA stack usage of: overlay: Fix forgotten reference to of_overlay_apply() of: Documentation: Fix forgotten reference to of_overlay_apply() of: unittest: local return value variable related cleanups of: unittest: remove unneeded local return value variables dt-bindings: trivial: add various mcp4017/18/19 potentiometers of: unittest: fix an error test in of_unittest_overlay_8() of: cache phandle nodes to reduce cost of of_find_node_by_phandle() dt-bindings: rockchip-dw-mshc: use consistent clock names MAINTAINERS: Add linux/of_*.h headers to appropriate subsystems scripts: turn off some new dtc warnings by default scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987 scripts/dtc: generate lexer and parser during build instead of shipping powerpc: boot: add strrchr function of: overlay: do not include path in full_name of added nodes of: unittest: clean up changeset test arm64/efi: Make strrchr() available to the EFI namespace ARM: boot: add strrchr function ... commit d66db9f6e427db122aeaad0f0cc94291ce6ddb82 Merge: 357aa6a 4be3332 Author: Linus Torvalds Date: Thu Apr 5 20:33:38 2018 -0700 Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull siginfo updates from Eric Biederman: "The work on cleaning up and getting the bugs out of siginfo generation was largely stalled this round. The progress that was made was the definition of FPE_FLTUNK. Which is usable to fix many of the cases where siginfo generation is erroneously generating SI_USER by setting si_code to 0, that has recently been tagged as FPE_FIXME. You already have the change by way of the arm64 tree as that definition was pulled into the arm64 tree to allow fixing the problem there. What remains is the second round of fixing for what I thought was a trivial change to the struct siginfo when put the union in _sigfault where it belongs. Do to historical reasons 32bit m68k only ensures that pointers are 2 byte aligned. So I have added a m68k test case made of BUILD_BUG_ONs to verify I have this fix correct and possibly catch problems, and I have computed the number of bytes of padding needed for the _addr_bnd and _addr_pkey cases and just use an array of characters that size. For pure paranoia I have written the code so if there is an architecture out there that does not perform any alignment of structures it should still work. With the removal of all of the stale arechitectures this cycle future work on cleaning up struct siginfo should be much easier. Almost all of the conflicting si_code definitions have been removed with the removal of (blackfin, tile, and frv). Plus some of the most difficult to test cases have simply been removed from the tree. Which means that with a little luck copy_siginfo_to_user can become a light weight wrapper around copy_to_user in the next cycle" * 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: m68k: Verify the offsets in struct siginfo never change. signal: Correct the offset of si_pkey and si_lower in struct siginfo on m68k commit f6adcca02ca26577692a1f2ee892c134b076b339 Author: Vishal Verma Date: Thu Feb 8 14:24:05 2018 -0700 libnvdimm, testing: update the default smart ctrl_temperature The default value for smart ctrl_temperature was the same as the threshold for ctrl_temperature. As a result, any arbitrary smart injection to the nfit_test dimm could cause this alarm to trigger and cause an acpi notification. Drop the default value to below the threshold, so that unrelated injections don't trigger notifications. Cc: Dan Williams Signed-off-by: Vishal Verma Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cf260fc409c73f6e40b3e8061a0cb925703d7ee Author: Vishal Verma Date: Thu Feb 8 14:24:04 2018 -0700 libnvdimm, testing: Add emulation for smart injection commands Add support for the smart injection command in the nvdimm unit test framework. This allows for directly injecting to smart fields and flags that are supported in the injection command. If the injected values are past the threshold, then an acpi notification is also triggered. Cc: Dan Williams Signed-off-by: Vishal Verma Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 38 ++++++++++++++++++++++++++++++++++- tools/testing/nvdimm/test/nfit_test.h | 16 +++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) commit 14c73f997a5e060c6887a80c143021a58975c92a Author: Dan Williams Date: Mon Apr 2 15:40:30 2018 -0700 nfit, address-range-scrub: introduce nfit_spa->ars_state In preparation for re-working the ARS implementation to better handle short vs long ARS runs, introduce nfit_spa->ars_state. For now this just replaces the nfit_spa->ars_required bit-field/flag, but going forward it will be used to track ARS completion and make short vs long ARS requests. Reviewed-by: Dave Jiang Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 16 +++++++++------- drivers/acpi/nfit/nfit.h | 11 +++++++++-- 2 files changed, 18 insertions(+), 9 deletions(-) commit 357aa6aefebe888c712152cb83c9e700f98eebd1 Merge: be88751 47319f7 Author: Linus Torvalds Date: Thu Apr 5 19:53:30 2018 -0700 Merge branch 'for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk Pull printk updates from Petr Mladek: - Add info about loaded kdump kernel into the dump stack header - Move dump-stack related code from printk.c to lib/dump_stack.c - Write message about suspending consoles in KERN_INFO log level * 'for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: printk: change message to pr_info printk: move dump stack related code to lib/dump_stack.c print kdump kernel loaded status in stack dump commit 3239534a79ee6f20cffd974173a1e62e0730e8ac Author: Davide Caratti Date: Fri Apr 6 01:19:37 2018 +0200 net/sched: fix NULL dereference in the error path of tcf_bpf_init() when tcf_bpf_init_from_ops() fails (e.g. because of program having invalid number of instructions), tcf_bpf_cfg_cleanup() calls bpf_prog_put(NULL) or bpf_prog_destroy(NULL). Unless CONFIG_BPF_SYSCALL is unset, this causes the following error: BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 PGD 800000007345a067 P4D 800000007345a067 PUD 340e1067 PMD 0 Oops: 0000 [#1] SMP PTI Modules linked in: act_bpf(E) ip6table_filter ip6_tables iptable_filter binfmt_misc ext4 mbcache jbd2 crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec_generic pcbc snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_seq snd_seq_device snd_pcm aesni_intel crypto_simd glue_helper cryptd joydev snd_timer snd virtio_balloon pcspkr soundcore i2c_piix4 nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c ata_generic pata_acpi qxl drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm virtio_blk drm virtio_net virtio_console i2c_core crc32c_intel serio_raw virtio_pci ata_piix libata virtio_ring floppy virtio dm_mirror dm_region_hash dm_log dm_mod [last unloaded: act_bpf] CPU: 3 PID: 5654 Comm: tc Tainted: G E 4.16.0.bpf_test+ #408 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 RIP: 0010:__bpf_prog_put+0xc/0xc0 RSP: 0018:ffff9594003ef728 EFLAGS: 00010202 RAX: 0000000000000000 RBX: ffff9594003ef758 RCX: 0000000000000024 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000044 R10: 0000000000000220 R11: ffff8a7ab9f17131 R12: 0000000000000000 R13: ffff8a7ab7c3c8e0 R14: 0000000000000001 R15: ffff8a7ab88f1054 FS: 00007fcb2f17c740(0000) GS:ffff8a7abfd80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000020 CR3: 000000007c888006 CR4: 00000000001606e0 Call Trace: tcf_bpf_cfg_cleanup+0x2f/0x40 [act_bpf] tcf_bpf_cleanup+0x4c/0x70 [act_bpf] __tcf_idr_release+0x79/0x140 tcf_bpf_init+0x125/0x330 [act_bpf] tcf_action_init_1+0x2cc/0x430 ? get_page_from_freelist+0x3f0/0x11b0 tcf_action_init+0xd3/0x1b0 tc_ctl_action+0x18b/0x240 rtnetlink_rcv_msg+0x29c/0x310 ? _cond_resched+0x15/0x30 ? __kmalloc_node_track_caller+0x1b9/0x270 ? rtnl_calcit.isra.29+0x100/0x100 netlink_rcv_skb+0xd2/0x110 netlink_unicast+0x17c/0x230 netlink_sendmsg+0x2cd/0x3c0 sock_sendmsg+0x30/0x40 ___sys_sendmsg+0x27a/0x290 ? mem_cgroup_commit_charge+0x80/0x130 ? page_add_new_anon_rmap+0x73/0xc0 ? do_anonymous_page+0x2a2/0x560 ? __handle_mm_fault+0xc75/0xe20 __sys_sendmsg+0x58/0xa0 do_syscall_64+0x6e/0x1a0 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x7fcb2e58eba0 RSP: 002b:00007ffc93c496c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007ffc93c497f0 RCX: 00007fcb2e58eba0 RDX: 0000000000000000 RSI: 00007ffc93c49740 RDI: 0000000000000003 RBP: 000000005ac6a646 R08: 0000000000000002 R09: 0000000000000000 R10: 00007ffc93c49120 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc93c49804 R14: 0000000000000001 R15: 000000000066afa0 Code: 5f 00 48 8b 43 20 48 c7 c7 70 2f 7c b8 c7 40 10 00 00 00 00 5b e9 a5 8b 61 00 0f 1f 44 00 00 0f 1f 44 00 00 41 54 55 48 89 fd 53 <48> 8b 47 20 f0 ff 08 74 05 5b 5d 41 5c c3 41 89 f4 0f 1f 44 00 RIP: __bpf_prog_put+0xc/0xc0 RSP: ffff9594003ef728 CR2: 0000000000000020 Fix it in tcf_bpf_cfg_cleanup(), ensuring that bpf_prog_{put,destroy}(f) is called only when f is not NULL. Fixes: bbc09e7842a5 ("net/sched: fix idr leak on the error path of tcf_bpf_init()") Reported-by: Lucas Bates Signed-off-by: Davide Caratti Signed-off-by: David S. Miller net/sched/act_bpf.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 71a1c915238c970cd9bdd5bf158b1279d6b6d55b Author: Jeff Barnhill <0xeffeff@gmail.com> Date: Thu Apr 5 21:29:47 2018 +0000 net/ipv6: Increment OUTxxx counters after netfilter hook At the end of ip6_forward(), IPSTATS_MIB_OUTFORWDATAGRAMS and IPSTATS_MIB_OUTOCTETS are incremented immediately before the NF_HOOK call for NFPROTO_IPV6 / NF_INET_FORWARD. As a result, these counters get incremented regardless of whether or not the netfilter hook allows the packet to continue being processed. This change increments the counters in ip6_forward_finish() so that it will not happen if the netfilter hook chooses to terminate the packet, which is similar to how IPv4 works. Signed-off-by: Jeff Barnhill <0xeffeff@gmail.com> Signed-off-by: David S. Miller net/ipv6/ip6_output.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a2aeea1cc14f9143f973b99950f39b38be144f3e Merge: 3d92f0b 3f076eff Author: David S. Miller Date: Thu Apr 5 22:21:01 2018 -0400 Merge branch 'hv_netvsc-Fix-shutdown-issues-on-older-Windows-hosts' Mohammed Gamal says: ==================== hv_netvsc: Fix shutdown issues on older Windows hosts Guests running on WS2012 hosts would not shutdown when changing network interface setting (e.g. Number of channels, MTU ... etc). This patch series addresses these shutdown issues we enecountered with WS2012 hosts. It's essentialy a rework of the series sent in https://lkml.org/lkml/2018/1/23/111 on top of latest upstream ==================== Fixes: 0ef58b0a05c1 ("hv_netvsc: change GPAD teardown order on older versions") Signed-off-by: David S. Miller commit 3f076effb9adad6a16fafd3cfe33fe530c5d428d Author: Mohammed Gamal Date: Thu Apr 5 21:09:21 2018 +0200 hv_netvsc: Pass net_device parameter to revoke and teardown functions The callers to netvsc_revoke_*_buf() and netvsc_teardown_*_gpadl() already have their net_device instances. Pass them as a paramaeter to the function instead of obtaining them from netvsc_device struct everytime Signed-off-by: Mohammed Gamal Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit a56d99d714665591fed8527b90eef21530ea61e0 Author: Mohammed Gamal Date: Thu Apr 5 21:09:20 2018 +0200 hv_netvsc: Ensure correct teardown message sequence order Prior to commit 0cf737808ae7 ("hv_netvsc: netvsc_teardown_gpadl() split") the call sequence in netvsc_device_remove() was as follows (as implemented in netvsc_destroy_buf()): 1- Send NVSP_MSG1_TYPE_REVOKE_RECV_BUF message 2- Teardown receive buffer GPADL 3- Send NVSP_MSG1_TYPE_REVOKE_SEND_BUF message 4- Teardown send buffer GPADL 5- Close vmbus This didn't work for WS2016 hosts. Commit 0cf737808ae7 ("hv_netvsc: netvsc_teardown_gpadl() split") rearranged the teardown sequence as follows: 1- Send NVSP_MSG1_TYPE_REVOKE_RECV_BUF message 2- Send NVSP_MSG1_TYPE_REVOKE_SEND_BUF message 3- Close vmbus 4- Teardown receive buffer GPADL 5- Teardown send buffer GPADL That worked well for WS2016 hosts, but it prevented guests on older hosts from shutting down after changing network settings. Commit 0ef58b0a05c1 ("hv_netvsc: change GPAD teardown order on older versions") ensured the following message sequence for older hosts 1- Send NVSP_MSG1_TYPE_REVOKE_RECV_BUF message 2- Send NVSP_MSG1_TYPE_REVOKE_SEND_BUF message 3- Teardown receive buffer GPADL 4- Teardown send buffer GPADL 5- Close vmbus However, with this sequence calling `ip link set eth0 mtu 1000` hangs and the process becomes uninterruptible. On futher analysis it turns out that on tearing down the receive buffer GPADL the kernel is waiting indefinitely in vmbus_teardown_gpadl() for a completion to be signaled. Here is a snippet of where this occurs: int vmbus_teardown_gpadl(struct vmbus_channel *channel, u32 gpadl_handle) { struct vmbus_channel_gpadl_teardown *msg; struct vmbus_channel_msginfo *info; unsigned long flags; int ret; info = kmalloc(sizeof(*info) + sizeof(struct vmbus_channel_gpadl_teardown), GFP_KERNEL); if (!info) return -ENOMEM; init_completion(&info->waitevent); info->waiting_channel = channel; [....] ret = vmbus_post_msg(msg, sizeof(struct vmbus_channel_gpadl_teardown), true); if (ret) goto post_msg_err; wait_for_completion(&info->waitevent); [....] } The completion is signaled from vmbus_ongpadl_torndown(), which gets called when the corresponding message is received from the host, which apparently never happens in that case. This patch works around the issue by restoring the first mentioned message sequence for older hosts Fixes: 0ef58b0a05c1 ("hv_netvsc: change GPAD teardown order on older versions") Signed-off-by: Mohammed Gamal Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 7992894c305eaf504d005529637ff8283d0a849d Author: Mohammed Gamal Date: Thu Apr 5 21:09:19 2018 +0200 hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl() Split each of the functions into two for each of send/recv buffers. This will be needed in order to implement a fine-grained messaging sequence to the host so that we accommodate the requirements of different Windows versions Fixes: 0ef58b0a05c12 ("hv_netvsc: change GPAD teardown order on older versions") Signed-off-by: Mohammed Gamal Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 46 +++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 12 deletions(-) commit 2afc5d61a7197de25a61f54ea4ecfb4cb62b1d42 Author: Mohammed Gamal Date: Thu Apr 5 21:09:18 2018 +0200 hv_netvsc: Use Windows version instead of NVSP version on GPAD teardown When changing network interface settings, Windows guests older than WS2016 can no longer shutdown. This was addressed by commit 0ef58b0a05c12 ("hv_netvsc: change GPAD teardown order on older versions"), however the issue also occurs on WS2012 guests that share NVSP protocol versions with WS2016 guests. Hence we use Windows version directly to differentiate them. Fixes: 0ef58b0a05c12 ("hv_netvsc: change GPAD teardown order on older versions") Signed-off-by: Mohammed Gamal Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit be88751f320a716a4327596adfe834e162c14532 Merge: 5e4d659 b91ed9d Author: Linus Torvalds Date: Thu Apr 5 19:17:50 2018 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull misc filesystem updates from Jan Kara: "udf, ext2, quota, fsnotify fixes & cleanups: - udf fixes for handling of media without uid/gid - udf fixes for some corner cases in parsing of volume recognition sequence - improvements of fsnotify handling of ENOMEM - new ioctl to allow setting of watch descriptor id for inotify (for checkpoint - restart) - small ext2, reiserfs, quota cleanups" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: Kill an unused extern entry form quota.h reiserfs: Remove VLA from fs/reiserfs/reiserfs.h udf: fix potential refcnt problem of nls module ext2: change return code to -ENOMEM when failing memory allocation udf: Do not mark possibly inconsistent filesystems as closed fsnotify: Let userspace know about lost events due to ENOMEM fanotify: Avoid lost events due to ENOMEM for unlimited queues udf: Remove never implemented mount options udf: Update mount option documentation udf: Provide saner default for invalid uid / gid udf: Clean up handling of invalid uid/gid udf: Apply uid/gid mount options also to new inodes & chown udf: Ignore [ug]id=ignore mount options udf: Fix handling of Partition Descriptors udf: Unify common handling of descriptors udf: Convert descriptor index definitions to enum udf: Allow volume descriptor sequence to be terminated by unrecorded block udf: Simplify handling of Volume Descriptor Pointers udf: Fix off-by-one in volume descriptor sequence length inotify: Extend ioctl to allow to request id of new watch descriptor commit 5e4d659713f52c1c9dfc2fea9d319b80a53d4bc9 Merge: 274c0e7 880a3a5 Author: Linus Torvalds Date: Thu Apr 5 19:15:29 2018 -0700 Merge tag 'nfsd-4.17' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "Chuck Lever did a bunch of work on nfsd tracepoints, on RDMA, and on server xdr decoding (with an eye towards eliminating a data copy in the RDMA case). I did some refactoring of the delegation code in preparation for eliminating some delegation self-conflicts and implementing write delegations" * tag 'nfsd-4.17' of git://linux-nfs.org/~bfields/linux: (40 commits) nfsd: fix incorrect umasks sunrpc: remove incorrect HMAC request initialization NFSD: Clean up legacy NFS SYMLINK argument XDR decoders NFSD: Clean up legacy NFS WRITE argument XDR decoders nfsd: Trace NFSv4 COMPOUND execution nfsd: Add I/O trace points in the NFSv4 read proc nfsd: Add I/O trace points in the NFSv4 write path nfsd: Add "nfsd_" to trace point names nfsd: Record request byte count, not count of vectors nfsd: Fix NFSD trace points svc: Report xprt dequeue latency sunrpc: Report per-RPC execution stats sunrpc: Re-purpose trace_svc_process sunrpc: Save remote presentation address in svc_xprt for trace events sunrpc: Simplify trace_svc_recv sunrpc: Simplify do_enqueue tracing sunrpc: Move trace_svc_xprt_dequeue() sunrpc: Update show_svc_xprt_flags() to include recently added flags svc: Simplify ->xpo_secure_port sunrpc: Remove unneeded pointer dereference ... commit 3d92f0b582062127026af1fb5e86eda4a3b01783 Author: Maxime Chevallier Date: Thu Apr 5 11:55:48 2018 +0200 net: mvpp2: Fix parser entry init boundary check Boundary check in mvpp2_prs_init_from_hw must be done according to the passed "tid" parameter, not the mvpp2_prs_entry index, which is not yet initialized at the time of the check. Fixes: 47e0e14eb1a6 ("net: mvpp2: Make mvpp2_prs_hw_read a parser entry init function") Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 274c0e74e508c939a4ae5ef3890fddb4af537b76 Merge: 052c220 214c246 Author: Linus Torvalds Date: Thu Apr 5 19:12:55 2018 -0700 Merge tag 'f2fs-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs update from Jaegeuk Kim: "In this round, we've mainly focused on performance tuning and critical bug fixes occurred in low-end devices. Sheng Yong introduced lost_found feature to keep missing files during recovery instead of thrashing them. We're preparing coming fsverity implementation. And, we've got more features to communicate with users for better performance. In low-end devices, some memory-related issues were fixed, and subtle race condtions and corner cases were addressed as well. Enhancements: - large nat bitmaps for more free node ids - add three block allocation policies to pass down write hints given by user - expose extension list to user and introduce hot file extension - tune small devices seamlessly for low-end devices - set readdir_ra by default - give more resources under gc_urgent mode regarding to discard and cleaning - introduce fsync_mode to enforce posix or not - nowait aio support - add lost_found feature to keep dangling inodes - reserve bits for future fsverity feature - add test_dummy_encryption for FBE Bug fixes: - don't use highmem for dentry pages - align memory boundary for bitops - truncate preallocated blocks in write errors - guarantee i_times on fsync call - clear CP_TRIMMED_FLAG correctly - prevent node chain loop during recovery - avoid data race between atomic write and background cleaning - avoid unnecessary selinux violation warnings on resgid option - GFP_NOFS to avoid deadlock in quota and read paths - fix f2fs_skip_inode_update to allow i_size recovery In addition to the above, there are several minor bug fixes and clean-ups" * tag 'f2fs-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (50 commits) f2fs: remain written times to update inode during fsync f2fs: make assignment of t->dentry_bitmap more readable f2fs: truncate preallocated blocks in error case f2fs: fix a wrong condition in f2fs_skip_inode_update f2fs: reserve bits for fs-verity f2fs: Add a segment type check in inplace write f2fs: no need to initialize zero value for GFP_F2FS_ZERO f2fs: don't track new nat entry in nat set f2fs: clean up with F2FS_BLK_ALIGN f2fs: check blkaddr more accuratly before issue a bio f2fs: Set GF_NOFS in read_cache_page_gfp while doing f2fs_quota_read f2fs: introduce a new mount option test_dummy_encryption f2fs: introduce F2FS_FEATURE_LOST_FOUND feature f2fs: release locks before return in f2fs_ioc_gc_range() f2fs: align memory boundary for bitops f2fs: remove unneeded set_cold_node() f2fs: add nowait aio support f2fs: wrap all options with f2fs_sb_info.mount_opt f2fs: Don't overwrite all types of node to keep node chain f2fs: introduce mount option for fsync mode ... commit 58b35f27689b5eb514fc293c332966c226b1b6e4 Author: Miguel Fadon Perlines Date: Thu Apr 5 10:25:38 2018 +0200 arp: fix arp_filter on l3slave devices arp_filter performs an ip_route_output search for arp source address and checks if output device is the same where the arp request was received, if it is not, the arp request is not answered. This route lookup is always done on main route table so l3slave devices never find the proper route and arp is not answered. Passing l3mdev_master_ifindex_rcu(dev) return value as oif fixes the lookup for l3slave devices while maintaining same behavior for non l3slave devices as this function returns 0 in that case. Fixes: 613d09b30f8b ("net: Use VRF device index for lookups on TX") Signed-off-by: Miguel Fadon Perlines Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv4/arp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f8d561fb019a3ebe073c019bf5f797f5b06c55e Author: Russell King Date: Thu Mar 29 11:59:17 2018 +0100 ARM: decompressor: fix warning introduced in fortify patch Commit ee333554fed5 ("ARM: 8749/1: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE") introduced a new warning: arch/arm/boot/compressed/misc.c: In function 'fortify_panic': arch/arm/boot/compressed/misc.c:167:1: error: 'noreturn' function does return [-Werror] The simple solution would be to make 'error' a noreturn function, but this causes a prototype mismatch as the function is prototyped in several .c files. So, move the function prototype to a new header. There are also a couple of variables that are also declared in several locations. Clean this up while we are here. Signed-off-by: Russell King arch/arm/boot/compressed/decompress.c | 5 +---- arch/arm/boot/compressed/misc.c | 2 +- arch/arm/boot/compressed/misc.h | 10 ++++++++++ 3 files changed, 12 insertions(+), 5 deletions(-) commit 269bd202bc0fd04e841cb123867fd3f49e04ace9 Author: Tero Kristo Date: Tue Mar 27 20:47:04 2018 +0300 clk: ti: fix flag space conflict with clkctrl clocks The introduction of support for CLK_SET_RATE_PARENT flag for clkctrl clocks used a generic clock flag, which causes a conflict with the rest of the clkctrl flags, namely the NO_IDLEST flag. This can cause boot failures on certain platforms where this flag is introduced, by omitting the wait for the clockctrl module to be fully enabled before proceeding with rest of the code. Fix this by moving all the clkctrl specific flags to their own bit-range. Signed-off-by: Tero Kristo Fixes: 49159a9dc3da ("clk: ti: add support for CLK_SET_RATE_PARENT flag") Reported-by: Christophe Lyon Tested-by: Tony Lindgren drivers/clk/ti/clock.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 052c220da392c4dcbc628852d04970447a315683 Merge: 3526dd0 2e1f44f Author: Linus Torvalds Date: Thu Apr 5 15:05:53 2018 -0700 Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This is mostly updates of the usual drivers: arcmsr, qla2xx, lpfc, ufs, mpt3sas, hisi_sas. In addition we have removed several really old drivers: sym53c416, NCR53c406a, fdomain, fdomain_cs and removed the old scsi_module.c initialization from all remaining drivers. Plus an assortment of bug fixes, initialization errors and other minor fixes" * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (168 commits) scsi: ufs: Add support for Auto-Hibernate Idle Timer scsi: ufs: sysfs: reworking of the rpm_lvl and spm_lvl entries scsi: qla2xxx: fx00 copypaste typo scsi: qla2xxx: fix error message on Date: Fri Mar 30 18:44:14 2018 +0900 clk: uniphier: add additional ethernet clock lines for Pro4 Pro4 SoC has clock lines for Giga-bit feature and ethernet phy, and these are mandatory to activate the ethernet controller. This adds support for the clock lines. Signed-off-by: Kunihiko Hayashi Acked-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-sys.c | 3 +++ 1 file changed, 3 insertions(+) commit 54e1f7ee1f5e8ec8b56e89fc431b3d07f84e9cbd Author: Kunihiko Hayashi Date: Fri Mar 30 18:44:13 2018 +0900 clk: uniphier: add SATA clock control support Add clock control for SATA controller on UniPhier SoCs. This adds support for PXs2, LD20 and PXs3. Signed-off-by: Kunihiko Hayashi Acked-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-sys.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2e277efb82c1ddacd9afed172098602a44dc5671 Author: Kunihiko Hayashi Date: Fri Mar 30 18:44:12 2018 +0900 clk: uniphier: add PCIe clock control support Add clock control for PCIe controller on UniPhier SoCs. This adds support for Pro5, LD20 and PXs3. Signed-off-by: Kunihiko Hayashi Acked-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-sys.c | 3 +++ 1 file changed, 3 insertions(+) commit 3526dd0c7832f1011a0477cc6d903662bae05ea8 Merge: dd972f9 bc6d65e Author: Linus Torvalds Date: Thu Apr 5 14:27:02 2018 -0700 Merge tag 'for-4.17/block-20180402' of git://git.kernel.dk/linux-block Pull block layer updates from Jens Axboe: "It's a pretty quiet round this time, which is nice. This contains: - series from Bart, cleaning up the way we set/test/clear atomic queue flags. - series from Bart, fixing races between gendisk and queue registration and removal. - set of bcache fixes and improvements from various folks, by way of Michael Lyle. - set of lightnvm updates from Matias, most of it being the 1.2 to 2.0 transition. - removal of unused DIO flags from Nikolay. - blk-mq/sbitmap memory ordering fixes from Omar. - divide-by-zero fix for BFQ from Paolo. - minor documentation patches from Randy. - timeout fix from Tejun. - Alpha "can't write a char atomically" fix from Mikulas. - set of NVMe fixes by way of Keith. - bsg and bsg-lib improvements from Christoph. - a few sed-opal fixes from Jonas. - cdrom check-disk-change deadlock fix from Maurizio. - various little fixes, comment fixes, etc from various folks" * tag 'for-4.17/block-20180402' of git://git.kernel.dk/linux-block: (139 commits) blk-mq: Directly schedule q->timeout_work when aborting a request blktrace: fix comment in blktrace_api.h lightnvm: remove function name in strings lightnvm: pblk: remove some unnecessary NULL checks lightnvm: pblk: don't recover unwritten lines lightnvm: pblk: implement 2.0 support lightnvm: pblk: implement get log report chunk lightnvm: pblk: rename ppaf* to addrf* lightnvm: pblk: check for supported version lightnvm: implement get log report chunk helpers lightnvm: make address conversions depend on generic device lightnvm: add support for 2.0 address format lightnvm: normalize geometry nomenclature lightnvm: complete geo structure with maxoc* lightnvm: add shorten OCSSD version in geo lightnvm: add minor version to generic geometry lightnvm: simplify geometry structure lightnvm: pblk: refactor init/exit sequences lightnvm: Avoid validation of default op value lightnvm: centralize permission check for lightnvm ioctl ... commit dd972f924df6bdbc0ab185a38d5d2361dbc26311 Merge: 3c8ba0d 6fd0526 Author: Linus Torvalds Date: Thu Apr 5 14:21:13 2018 -0700 Merge tag 'edac_for_4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC updates from Borislav Petkov: "Noteworthy is the NVDIMM support: - NVDIMM support to EDAC (Tony Luck) - misc fixes" * tag 'edac_for_4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: EDAC, sb_edac: Remove variable length array usage EDAC, skx_edac: Detect non-volatile DIMMs firmware, DMI: Add function to look up a handle and return DIMM size acpi, nfit: Add function to look up nvdimm device and provide SMBIOS handle EDAC: Add new memory type for non-volatile DIMMs EDAC: Drop duplicated array of strings for memory type names EDAC, layerscape: Allow building for LS1021A commit 3c8ba0d61d04ced9f8d9ff93977995a9e4e96e91 Author: Kees Cook Date: Fri Mar 30 18:52:36 2018 -0700 kernel.h: Retain constant expression output for max()/min() In the effort to remove all VLAs from the kernel[1], it is desirable to build with -Wvla. However, this warning is overly pessimistic, in that it is only happy with stack array sizes that are declared as constant expressions, and not constant values. One case of this is the evaluation of the max() macro which, due to its construction, ends up converting constant expression arguments into a constant value result. All attempts to rewrite this macro with __builtin_constant_p() failed with older compilers (e.g. gcc 4.4)[2]. However, Martin Uecker, constructed[3] a mind-shattering solution that works everywhere. Cthulhu fhtagn! This patch updates the min()/max() macros to evaluate to a constant expression when called on constant expression arguments. This removes several false-positive stack VLA warnings from an x86 allmodconfig build when -Wvla is added: $ diff -u before.txt after.txt | grep ^- -drivers/input/touchscreen/cyttsp4_core.c:871:2: warning: ISO C90 forbids variable length array ‘ids’ [-Wvla] -fs/btrfs/tree-checker.c:344:4: warning: ISO C90 forbids variable length array ‘namebuf’ [-Wvla] -lib/vsprintf.c:747:2: warning: ISO C90 forbids variable length array ‘sym’ [-Wvla] -net/ipv4/proc.c:403:2: warning: ISO C90 forbids variable length array ‘buff’ [-Wvla] -net/ipv6/proc.c:198:2: warning: ISO C90 forbids variable length array ‘buff’ [-Wvla] -net/ipv6/proc.c:218:2: warning: ISO C90 forbids variable length array ‘buff64’ [-Wvla] This also updates two cases where different enums were being compared and explicitly casts them to int (which matches the old side-effect of the single-evaluation code): one in tpm/tpm_tis_core.h, and one in drm/drm_color_mgmt.c. [1] https://lkml.org/lkml/2018/3/7/621 [2] https://lkml.org/lkml/2018/3/10/170 [3] https://lkml.org/lkml/2018/3/20/845 Co-Developed-by: Linus Torvalds Co-Developed-by: Martin Uecker Signed-off-by: Kees Cook Acked-by: Ingo Molnar Acked-by: Miguel Ojeda Signed-off-by: Linus Torvalds drivers/char/tpm/tpm_tis_core.h | 8 ++--- drivers/gpu/drm/drm_color_mgmt.c | 4 +-- include/linux/kernel.h | 71 +++++++++++++++++++++++----------------- 3 files changed, 47 insertions(+), 36 deletions(-) commit f6ae7c36e69f375220cb6e3de04df211258a2b7c Merge: ed0df3c 9dc486f Author: Stephen Boyd Date: Thu Apr 5 13:28:16 2018 -0700 Merge tag 'v4.17-rockchip-clk-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip Pull more Rockchip clk driver updates from Heiko Stuebner: Some more fixes for Rockchip clocks mainly resulting from the changes in phase-handling. Which revealed some parent issues on rk3228 and rk3328 as well as additional issue in how handle phase restoration. And to top it off two assignments of already existing clock ids for rk3399. * tag 'v4.17-rockchip-clk-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: assign correct id for pclk_ddr and hclk_sd in rk3399 clk: rockchip: Fix error return in phase clock registration clk: rockchip: Correct the behaviour of restoring cached phase clk: rockchip: Fix wrong parents for MMC phase clock for rk3328 clk: rockchip: Fix wrong parent for SDMMC phase clock for rk3228 commit 5414ab31b1e8dec34800201cb5211abf3436129e Merge: 672a9c1 664b0ba Author: Linus Torvalds Date: Thu Apr 5 13:21:57 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - new driver for PhoenixRC Flight Controller Adapter - new driver for RAVE SP Power button - fixes for autosuspend-related deadlocks in a few unput USB dirvers - support for 2nd wheel in ATech PS/2 mouse - fix for ALPS trackpoint detection on Thinkpad L570 and Latitude 7370 - bunch of cleanups in various in PS/2 protocols - other assorted changes and fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (35 commits) Input: i8042 - enable MUX on Sony VAIO VGN-CS series to fix touchpad Input: stmfts, s6sy761 - update my e-mail Input: stmfts - use async probe & suspend/resume to avoid 2s delay Input: ALPS - fix TrackStick detection on Thinkpad L570 and Latitude 7370 Input: xpad - add PDP device id 0x02a4 Input: alps - report pressure of v3 and v7 trackstick Input: pxrc - new driver for PhoenixRC Flight Controller Adapter Input: usbtouchscreen - do not rely on input_dev->users Input: usbtouchscreen - fix deadlock in autosuspend Input: pegasus_notetaker - do not rely on input_dev->users Input: pagasus_notetaker - fix deadlock in autosuspend Input: synaptics_usb - do not rely on input_dev->users Input: synaptics_usb - fix deadlock in autosuspend Input: gpio-keys - add support for wakeup event action Input: appletouch - use true and false for boolean values Input: silead - add Chuwi Hi8 support Input: analog - use get_cycles() on PPC Input: stmpe-keypad - remove VLA usage Input: i8042 - add Lenovo ThinkPad L460 to i8042 reset list Input: add RAVE SP Powerbutton driver ... commit d68a19f89bcfa53cc2aaa3153d7243226df08456 Merge: 06dd3df 537b361 Author: David S. Miller Date: Thu Apr 5 15:16:15 2018 -0400 Merge branch 'net-tunnel-name-validate' Eric Dumazet says: ==================== net: better validate user provided tunnel names This series changes dev_valid_name() to not attempt reading a possibly too long user-provided device name, then use this helper in five different tunnel providers. ==================== Signed-off-by: David S. Miller commit 537b361fbcbcc3cd6fe2bb47069fd292b9256d16 Author: Eric Dumazet Date: Thu Apr 5 06:39:31 2018 -0700 vti6: better validate user provided tunnel names Use valid_name() to make sure user does not provide illegal device name. Fixes: ed1efb2aefbb ("ipv6: Add support for IPsec virtual tunnel interfaces") Signed-off-by: Eric Dumazet Cc: Steffen Klassert Signed-off-by: David S. Miller net/ipv6/ip6_vti.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit db7a65e3ab78e5b1c4b17c0870ebee35a4ee3257 Author: Eric Dumazet Date: Thu Apr 5 06:39:30 2018 -0700 ip6_tunnel: better validate user provided tunnel names Use valid_name() to make sure user does not provide illegal device name. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 5f42df013b8bc1b6511af7a04bf93b014884ae2a Author: Eric Dumazet Date: Thu Apr 5 06:39:29 2018 -0700 ip6_gre: better validate user provided tunnel names Use dev_valid_name() to make sure user does not provide illegal device name. syzbot caught the following bug : BUG: KASAN: stack-out-of-bounds in strlcpy include/linux/string.h:300 [inline] BUG: KASAN: stack-out-of-bounds in ip6gre_tunnel_locate+0x334/0x860 net/ipv6/ip6_gre.c:339 Write of size 20 at addr ffff8801afb9f7b8 by task syzkaller851048/4466 CPU: 1 PID: 4466 Comm: syzkaller851048 Not tainted 4.16.0+ #1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b9/0x29f lib/dump_stack.c:53 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0xac/0x2f5 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 memcpy+0x37/0x50 mm/kasan/kasan.c:303 strlcpy include/linux/string.h:300 [inline] ip6gre_tunnel_locate+0x334/0x860 net/ipv6/ip6_gre.c:339 ip6gre_tunnel_ioctl+0x69d/0x12e0 net/ipv6/ip6_gre.c:1195 dev_ifsioc+0x43e/0xb90 net/core/dev_ioctl.c:334 dev_ioctl+0x69a/0xcc0 net/core/dev_ioctl.c:525 sock_ioctl+0x47e/0x680 net/socket.c:1015 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x1cf/0x1650 fs/ioctl.c:684 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701 SYSC_ioctl fs/ioctl.c:708 [inline] SyS_ioctl+0x24/0x30 fs/ioctl.c:706 do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Fixes: c12b395a4664 ("gre: Support GRE over IPv6") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b95211e066fc3494b7c115060b2297b4ba21f025 Author: Eric Dumazet Date: Thu Apr 5 06:39:28 2018 -0700 ipv6: sit: better validate user provided tunnel names Use dev_valid_name() to make sure user does not provide illegal device name. syzbot caught the following bug : BUG: KASAN: stack-out-of-bounds in strlcpy include/linux/string.h:300 [inline] BUG: KASAN: stack-out-of-bounds in ipip6_tunnel_locate+0x63b/0xaa0 net/ipv6/sit.c:254 Write of size 33 at addr ffff8801b64076d8 by task syzkaller932654/4453 CPU: 0 PID: 4453 Comm: syzkaller932654 Not tainted 4.16.0+ #1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b9/0x29f lib/dump_stack.c:53 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0xac/0x2f5 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 memcpy+0x37/0x50 mm/kasan/kasan.c:303 strlcpy include/linux/string.h:300 [inline] ipip6_tunnel_locate+0x63b/0xaa0 net/ipv6/sit.c:254 ipip6_tunnel_ioctl+0xe71/0x241b net/ipv6/sit.c:1221 dev_ifsioc+0x43e/0xb90 net/core/dev_ioctl.c:334 dev_ioctl+0x69a/0xcc0 net/core/dev_ioctl.c:525 sock_ioctl+0x47e/0x680 net/socket.c:1015 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x1cf/0x1650 fs/ioctl.c:684 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701 SYSC_ioctl fs/ioctl.c:708 [inline] SyS_ioctl+0x24/0x30 fs/ioctl.c:706 do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller net/ipv6/sit.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 9cb726a212a82c88c98aa9f0037fd04777cd8fe5 Author: Eric Dumazet Date: Thu Apr 5 06:39:27 2018 -0700 ip_tunnel: better validate user provided tunnel names Use dev_valid_name() to make sure user does not provide illegal device name. syzbot caught the following bug : BUG: KASAN: stack-out-of-bounds in strlcpy include/linux/string.h:300 [inline] BUG: KASAN: stack-out-of-bounds in __ip_tunnel_create+0xca/0x6b0 net/ipv4/ip_tunnel.c:257 Write of size 20 at addr ffff8801ac79f810 by task syzkaller268107/4482 CPU: 0 PID: 4482 Comm: syzkaller268107 Not tainted 4.16.0+ #1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b9/0x29f lib/dump_stack.c:53 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0xac/0x2f5 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 memcpy+0x37/0x50 mm/kasan/kasan.c:303 strlcpy include/linux/string.h:300 [inline] __ip_tunnel_create+0xca/0x6b0 net/ipv4/ip_tunnel.c:257 ip_tunnel_create net/ipv4/ip_tunnel.c:352 [inline] ip_tunnel_ioctl+0x818/0xd40 net/ipv4/ip_tunnel.c:861 ipip_tunnel_ioctl+0x1c5/0x420 net/ipv4/ipip.c:350 dev_ifsioc+0x43e/0xb90 net/core/dev_ioctl.c:334 dev_ioctl+0x69a/0xcc0 net/core/dev_ioctl.c:525 sock_ioctl+0x47e/0x680 net/socket.c:1015 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x1cf/0x1650 fs/ioctl.c:684 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701 SYSC_ioctl fs/ioctl.c:708 [inline] SyS_ioctl+0x24/0x30 fs/ioctl.c:706 do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller net/ipv4/ip_tunnel.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit a9d48205d0aedda021fc3728972a9e9934c2b9de Author: Eric Dumazet Date: Thu Apr 5 06:39:26 2018 -0700 net: fool proof dev_valid_name() We want to use dev_valid_name() to validate tunnel names, so better use strnlen(name, IFNAMSIZ) than strlen(name) to make sure to not upset KASAN. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efc365e7290d040fbd43f60b0e97653489a739d4 Author: Mikhail Malygin Date: Mon Apr 2 12:26:59 2018 +0300 IB/rxe: Fix for oops in rxe_register_device on ppc64le arch On ppc64le arch rxe_add command causes oops in kernel log: [ 92.495140] Oops: Kernel access of bad area, sig: 11 [#1] [ 92.499710] SMP NR_CPUS=2048 NUMA pSeries [ 92.499792] Modules linked in: ipt_MASQUERADE(E) nf_nat_masquerade_ipv4(E) nf_conntrack_netlink(E) nfnetlink(E) xfrm_user(E) iptable _nat(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) nf_nat_ipv4(E) xt_addrtype(E) iptable_filter(E) ip_tables(E) xt_conntrack(E) x_tables(E) nf_nat(E) nf_conntrack(E) br_netfilter(E) bridge(E) stp(E) llc(E) overlay(E) af_packet(E) rpcrdma(E) ib_isert(E) iscsi_target_mod(E) i b_iser(E) libiscsi(E) ib_srpt(E) target_core_mod(E) ib_srp(E) ib_ipoib(E) rdma_ucm(E) ib_ucm(E) ib_uverbs(E) ib_umad(E) bochs_drm(E) tt m(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) fb_sys_fops(E) drm(E) agpgart(E) virtio_rng(E) virtio_console(E) rtc_ generic(E) dm_ec(OEN) ttln_rdma(OEN) rdma_cm(E) configfs(E) iw_cm(E) ib_cm(E) rdma_rxe(E) ip6_udp_tunnel(E) udp_tunnel(E) ib_core(E) ql a2xxx(E) [ 92.499832] scsi_transport_fc(E) nvme_fc(E) nvme_fabrics(E) nvme_core(E) ipmi_watchdog(E) ipmi_ssif(E) ipmi_poweroff(E) ipmi_powernv(EX) ipmi_devintf(E) ipmi_msghandler(E) dummy(E) ext4(E) crc16(E) jbd2(E) mbcache(E) dm_service_time(E) scsi_transport_iscsi(E) sd_mod(E) sr_mod(E) cdrom(E) hid_generic(E) usbhid(E) virtio_blk(E) virtio_scsi(E) virtio_net(E) ibmvscsi(EX) scsi_transport_srp(E) xhci_pci(E) xhci_hcd(E) usbcore(E) usb_common(E) virtio_pci(E) virtio_ring(E) virtio(E) sunrpc(E) dm_mirror(E) dm_region_hash(E) dm_log(E) sg(E) dm_multipath(E) dm_mod(E) scsi_dh_rdac(E) scsi_dh_emc(E) scsi_dh_alua(E) scsi_mod(E) autofs4(E) [ 92.499834] Supported: No, Unsupported modules are loaded [ 92.499839] CPU: 3 PID: 5576 Comm: sh Tainted: G OE NX 4.4.120-ttln.17-default #1 [ 92.499841] task: c0000000afe8a490 ti: c0000000beba8000 task.ti: c0000000beba8000 [ 92.499842] NIP: c00000000008ba3c LR: c000000000027644 CTR: c00000000008ba10 [ 92.499844] REGS: c0000000bebab750 TRAP: 0300 Tainted: G OE NX (4.4.120-ttln.17-default) [ 92.499850] MSR: 8000000000009033 CR: 28424428 XER: 20000000 [ 92.499871] CFAR: 0000000000002424 DAR: 0000000000000208 DSISR: 40000000 SOFTE: 1 GPR00: c000000000027644 c0000000bebab9d0 c000000000f09700 0000000000000000 GPR04: d0000000043d7192 0000000000000002 000000000000001a fffffffffffffffe GPR08: 000000000000009c c00000000008ba10 d0000000043e5848 d0000000043d3828 GPR12: c00000000008ba10 c000000007a02400 0000000010062e38 0000010020388860 GPR16: 0000000000000000 0000000000000000 00000100203885f0 00000000100f6c98 GPR20: c0000000b3f1fcc0 c0000000b3f1fc48 c0000000b3f1fbd0 c0000000b3f1fb58 GPR24: c0000000b3f1fae0 c0000000b3f1fa68 00000000000005dc c0000000b3f1f9f0 GPR28: d0000000043e5848 c0000000b3f1f900 c0000000b3f1f320 c0000000b3f1f000 [ 92.499881] NIP [c00000000008ba3c] dma_get_required_mask_pSeriesLP+0x2c/0x1a0 [ 92.499885] LR [c000000000027644] dma_get_required_mask+0x44/0xac [ 92.499886] Call Trace: [ 92.499891] [c0000000bebab9d0] [c0000000bebaba30] 0xc0000000bebaba30 (unreliable) [ 92.499894] [c0000000bebaba10] [c000000000027644] dma_get_required_mask+0x44/0xac [ 92.499904] [c0000000bebaba30] [d0000000043cb4b4] rxe_register_device+0xc4/0x430 [rdma_rxe] [ 92.499910] [c0000000bebabab0] [d0000000043c06c8] rxe_add+0x448/0x4e0 [rdma_rxe] [ 92.499915] [c0000000bebabb30] [d0000000043d28dc] rxe_net_add+0x4c/0xf0 [rdma_rxe] [ 92.499921] [c0000000bebabb60] [d0000000043d305c] rxe_param_set_add+0x6c/0x1ac [rdma_rxe] [ 92.499924] [c0000000bebabbf0] [c0000000000e78c0] param_attr_store+0xa0/0x180 [ 92.499927] [c0000000bebabc70] [c0000000000e6448] module_attr_store+0x48/0x70 [ 92.499932] [c0000000bebabc90] [c000000000391f60] sysfs_kf_write+0x70/0xb0 [ 92.499935] [c0000000bebabcb0] [c000000000390f1c] kernfs_fop_write+0x18c/0x1e0 [ 92.499939] [c0000000bebabd00] [c0000000002e22ac] __vfs_write+0x4c/0x1d0 [ 92.499942] [c0000000bebabd90] [c0000000002e2f94] vfs_write+0xc4/0x200 [ 92.499945] [c0000000bebabde0] [c0000000002e488c] SyS_write+0x6c/0x110 [ 92.499948] [c0000000bebabe30] [c000000000009384] system_call+0x38/0xe4 [ 92.499949] Instruction dump: [ 92.499954] 4e800020 3c4c00e8 3842dcf0 7c0802a6 f8010010 60000000 7c0802a6 fba1ffe8 [ 92.499958] fbc1fff0 fbe1fff8 f8010010 f821ffc1 7c7e1b78 2fa90000 419e0078 [ 92.499962] ---[ end trace bed077e15eb420cf ]--- It fails in dma_get_required_mask, that has ppc-specific implementation, and fail if provided device argument is NULL Signed-off-by: Mikhail Malygin Reviewed-by: Yonatan Cohen Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c29f57ea4751c4887627521027cd72aba831a97 Author: Ariel Levkovich Date: Thu Apr 5 18:53:29 2018 +0300 IB/mlx5: Device memory mr registration support Adding mlx5_ib driver implementation for reg_dm_mr callback which allows registering device memory (DM) as an MR for local and remote access. Signed-off-by: Ariel Levkovich Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 1 + drivers/infiniband/hw/mlx5/mlx5_ib.h | 9 +++++ drivers/infiniband/hw/mlx5/mr.c | 74 ++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) commit cdbd0d2bae14566cf875595180b91527b4431df8 Author: Ariel Levkovich Date: Thu Apr 5 18:53:28 2018 +0300 net/mlx5: Mkey creation command adjustments This change updates the mlx5 interface to create mkey on the device. The updates in the command mailbox include increasing the access mode type field to 5 bits in order to support additional types such as MLX5_MKC_ACCESS_MODE_MEMIC which represents device memory access type and will be used when registering MR on allocated device memory. All the places that use the old access mode format are adjusted as well. Signed-off-by: Ariel Levkovich Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/cmd.c | 16 +++++++--------- drivers/infiniband/hw/mlx5/mr.c | 13 ++++++++----- drivers/net/ethernet/mellanox/mlx5/core/en_common.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c | 2 +- include/linux/mlx5/mlx5_ifc.h | 9 +++++++-- 6 files changed, 25 insertions(+), 19 deletions(-) commit 24da00164f7a9c247d2224a54494d0e955199630 Author: Ariel Levkovich Date: Thu Apr 5 18:53:27 2018 +0300 IB/mlx5: Device memory support in mlx5_ib This patch adds the mlx5_ib driver implementation for the device memory allocation API. It implements the ib_device callbacks for allocation and deallocation operations as well as a new mmap command support which allows mapping an allocated device memory to a VMA. The change also adds reporting of device memory maximum size and alignment parameters reported in device capabilities. The allocation/deallocation operations are using new firmware commands to allocate MEMIC memory on the device. Signed-off-by: Ariel Levkovich Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/cmd.c | 106 +++++++++++++++++++++++ drivers/infiniband/hw/mlx5/cmd.h | 4 + drivers/infiniband/hw/mlx5/main.c | 143 ++++++++++++++++++++++++++++++- drivers/infiniband/hw/mlx5/mlx5_ib.h | 35 +++++++- include/linux/mlx5/mlx5_ifc.h | 55 ++++++++++++ include/uapi/rdma/mlx5-abi.h | 1 + include/uapi/rdma/mlx5_user_ioctl_cmds.h | 6 +- 7 files changed, 347 insertions(+), 3 deletions(-) commit e72bd817aee2bd867a90aac68aca07d99addcb55 Author: Ariel Levkovich Date: Thu Apr 5 18:53:26 2018 +0300 net/mlx5: Query device memory capabilities This patch adds querying of device memory capabilities by the mlx5_core driver during initialization. Device memory capabilities is a new capability type and structure which contains the necessary data that is needed for future device memory allocation. The presence of this new capabilities struct is indicated in the general capabilities struct which is queried first by the driver. If the presence bit is set, the driver will also query the new capabilities struct and save it in the device context. Signed-off-by: Ariel Levkovich Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/net/ethernet/mellanox/mlx5/core/fw.c | 6 ++++++ include/linux/mlx5/device.h | 9 +++++++++ include/linux/mlx5/mlx5_ifc.h | 20 +++++++++++++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) commit 672a9c106966f8d418478830975288b8096bb058 Merge: e8403b49 75a24b8 Author: Linus Torvalds Date: Thu Apr 5 11:56:35 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: kfifo: fix inaccurate comment tools/thermal: tmon: fix for segfault net: Spelling s/stucture/structure/ edd: don't spam log if no EDD information is present Documentation: Fix early-microcode.txt references after file rename tracing: Block comments should align the * on each line treewide: Fix typos in printk GenWQE: Fix a typo in two comments treewide: Align function definition open/close braces commit e8403b493fd5180e351ca67eb66406d95dadcd0b Merge: e02d37b 9931753 Author: Linus Torvalds Date: Thu Apr 5 11:53:34 2018 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID updates from Jiri Kosina: - 3rd generation Wacom Intuos BT device support from Aaron Armstrong Skomra - support for NSG-MR5U and NSG-MR7U devices from Todd Kelner - multitouch Razer Blade Stealth support from Benjamin Tissoires - Elantech touchpad support from Alexandrov Stansilav - a few other scattered-around fixes and cleanups to drivers and generic code * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (31 commits) HID: google: Enable PM Full On mode when adjusting backlight HID: google: add google hammer HID driver HID: core: reset the quirks before calling probe again HID: multitouch: do not set HID_QUIRK_NO_INIT_REPORTS HID: core: remove the need for HID_QUIRK_NO_EMPTY_INPUT HID: use BIT() macro for quirks too HID: use BIT macro instead of plain integers for flags HID: multitouch: remove dead zones of Razer Blade Stealth HID: multitouch: export a quirk for the button handling of touchpads HID: usbhid: extend the polling interval configuration to keyboards HID: ntrig: document sysfs interface HID: wacom: wacom_wac_collection() is local to wacom_wac.c HID: wacom: generic: add the "Report Valid" usage HID: wacom: generic: Support multiple tools per report HID: wacom: Add support for 3rd generation Intuos BT HID: core: rewrite the hid-generic automatic unbind HID: sony: Add touchpad support for NSG-MR5U and NSG-MR7U remotes HID: hid-multitouch: Use true and false for boolean values HID: hid-ntrig: use true and false for boolean values HID: logitech-hidpp: document sysfs interface ... commit 01f97511f13cbf2ba3d23b2bffa06258dc81e283 Author: Arnaldo Carvalho de Melo Date: Thu Apr 5 14:40:44 2018 -0300 tools headers uapi: Synchronize i915_drm.h To pick up the changes in: c822e0591855 drm/i915: expose rcs topology through query uAPI a446ae2c6e65 drm/i915: add query uAPI This affects 'perf trace', that automagically gets the definition of the new I915_QUERY DRM ioctl: --- /tmp/build/perf/trace/beauty/generated/ioctl/drm_ioctl_array.c.old 2018-04-05 14:38:33.660111995 -0300 +++ /tmp/build/perf/trace/beauty/generated/ioctl/drm_ioctl_array.c 2018-04-05 14:40:17.923283914 -0300 @@ -158,4 +158,5 @@ [DRM_COMMAND_BASE + 0x36] = "I915_PERF_OPEN", [DRM_COMMAND_BASE + 0x37] = "I915_PERF_ADD_CONFIG", [DRM_COMMAND_BASE + 0x38] = "I915_PERF_REMOVE_CONFIG", + [DRM_COMMAND_BASE + 0x39] = "I915_QUERY", }; I.e. on systems where this is used it will appear when, for instance, one does a system wide 'perf trace' session looking for ioctl calls, just like it does with the previously implemented DRM_I915 ioctls: # perf trace -e ioctl --filter-pids 2190 4346.232 ( 0.012 ms): gnome-shell/1455 ioctl(fd: 8, cmd: DRM_I915_GEM_BUSY, arg: 0x7fff3b0cd910) = 0 4346.246 ( 0.002 ms): gnome-shell/1455 ioctl(fd: 8, cmd: DRM_I915_GEM_MADVISE, arg: 0x7fff3b0cd980) = 0 4346.252 ( 0.002 ms): gnome-shell/1455 ioctl(fd: 8, cmd: DRM_I915_GEM_BUSY, arg: 0x7fff3b0cdb00) = 0 This silences this perf tools build warning: Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h' Cc: Adrian Hunter Cc: Chris Wilson Cc: David Ahern Cc: Jiri Olsa Cc: Joonas Lahtinen Cc: Lionel Landwerlin Cc: Namhyung Kim Cc: Tvrtko Ursulin Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-5kxuvruuzdbojvf90f8j2wat@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/drm/i915_drm.h | 112 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 108 insertions(+), 4 deletions(-) commit e02d37bf55a9a36f22427fd6dd733fe104d817b6 Merge: 652ede3 a820ccb Author: Linus Torvalds Date: Thu Apr 5 10:42:07 2018 -0700 Merge tag 'sound-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "This became a large update. The changes are scattered widely, and the majority of them are attributed to ASoC componentization. The gitk output made me dizzy, but it's slightly better than London tube. OK, below are some highlights: - Continued hardening works in ALSA PCM core; most of the existing syzkaller reports should have been covered. - USB-audio got the initial USB Audio Class 3 support, as well as UAC2 jack detection support and more DSD-device support. - ASoC componentization: finally each individual driver was converted to components framework, which is more future-proof for further works. Most of conversations were systematic. - Lots of fixes for Intel Baytrail / Cherrytrail devices with Realtek codecs, typically tablets and small PCs. - Fixes / cleanups for Samsung Odroid systems - Cleanups in Freescale SSI driver - New ASoC drivers: * AKM AK4458 and AK5558 codecs * A few AMD based machine drivers * Intel Kabylake machine drivers * Maxim MAX9759 codec * Motorola CPCAP codec * Socionext Uniphier SoCs * TI PCM1789 and TDA7419 codecs - Retirement of Blackfin drivers along with architecture removal" * tag 'sound-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (497 commits) ALSA: pcm: Fix UAF at PCM release via PCM timer access ALSA: usb-audio: silence a static checker warning ASoC: tscs42xx: Remove owner assignment from i2c_driver ASoC: mediatek: remove "simple-mfd" in the example ASoC: cpcap: replace codec to component ASoC: Intel: bytcr_rt5651: don't use codec anymore ASoC: amd: don't use codec anymore ALSA: usb-audio: fix memory leak on cval ALSA: pcm: Fix mutex unbalance in OSS emulation ioctls ASoC: topology: Fix kcontrol name string handling ALSA: aloop: Mark paused device as inactive ALSA: usb-audio: update clock valid control ALSA: usb-audio: UAC2 jack detection ALSA: pcm: Return -EBUSY for OSS ioctls changing busy streams ALSA: pcm: Avoid potential races between OSS ioctls and read/write ALSA: usb-audio: Integrate native DSD support for ITF-USB based DACs. ALSA: usb-audio: FIX native DSD support for TEAC UD-501 DAC ALSA: usb-audio: Add native DSD support for Luxman DA-06 ALSA: usb-audio: fix uac control query argument ASoC: nau8824: recover system clock when device changes ... commit 41a43dacecdbc9aec9d307bd9f6aa5ec16d65832 Author: Arnaldo Carvalho de Melo Date: Thu Apr 5 14:34:09 2018 -0300 perf report: Remove duplicated 'samples' in lost samples warning The following message, emitted when samples are lost due to system overload, had one 'samples' too many, ditch it: Processed 25333 samples and lost 20.88% samples! Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: Kan Liang Link: https://lkml.kernel.org/n/tip-oev1469y02hmfere6r2kkxp6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 652ede37cec0bf7313927ecf4cebf0e79a0619f2 Merge: 1b2951d 1f674e1 Author: Linus Torvalds Date: Thu Apr 5 10:23:24 2018 -0700 Merge tag 'dma-mapping-4.17' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: "Very light this round as the interesting dma mapping changes went through the x86 tree. This just provides proper stubs for architectures not supporting dma (Geert Uytterhoeven)" * tag 'dma-mapping-4.17' of git://git.infradead.org/users/hch/dma-mapping: usb: gadget: Add NO_DMA dummies for DMA mapping API scsi: Add NO_DMA dummies for SCSI DMA mapping API mm: Add NO_DMA dummies for DMA pool API dma-coherent: Add NO_DMA dummies for managed DMA API dma-mapping: Convert NO_DMA get_dma_ops() into a real dummy commit 1e1c50a929bc9e49bc3f9935b92450d9e69f8158 Author: Nikolay Borisov Date: Thu Apr 5 10:40:15 2018 +0300 btrfs: Fix possible softlock on single core machines do_chunk_alloc implements a loop checking whether there is a pending chunk allocation and if so causes the caller do loop. Generally this loop is executed only once, however testing with btrfs/072 on a single core vm machines uncovered an extreme case where the system could loop indefinitely. This is due to a missing cond_resched when loop which doesn't give a chance to the previous chunk allocator finish its job. The fix is to simply add the missing cond_resched. Fixes: 6d74119f1a3e ("Btrfs: avoid taking the chunk_mutex in do_chunk_alloc") Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 1 + 1 file changed, 1 insertion(+) commit b98def7ca6e152ee55e36863dddf6f41f12d1dc6 Author: Liu Bo Date: Tue Apr 3 01:59:48 2018 +0800 Btrfs: bail out on error during replay_dir_deletes If errors were returned by btrfs_next_leaf(), replay_dir_deletes needs to bail out, otherwise @ret would be forced to be 0 after 'break;' and the caller won't be aware of it. Fixes: e02119d5a7b4 ("Btrfs: Add a write ahead tree log to optimize synchronous operations") Reviewed-by: Nikolay Borisov Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/tree-log.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 80c0b4210a963e31529e15bf90519708ec947596 Author: Liu Bo Date: Tue Apr 3 01:59:47 2018 +0800 Btrfs: fix NULL pointer dereference in log_dir_items 0, 1 and <0 can be returned by btrfs_next_leaf(), and when <0 is returned, path->nodes[0] could be NULL, log_dir_items lacks such a check for <0 and we may run into a null pointer dereference panic. Fixes: e02119d5a7b4 ("Btrfs: Add a write ahead tree log to optimize synchronous operations") Reviewed-by: Nikolay Borisov Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/tree-log.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit be934cca9e987e73eb20e3c80731a9580d5acc79 Author: Ariel Levkovich Date: Thu Apr 5 18:53:25 2018 +0300 IB/uverbs: Add device memory registration ioctl support Adding new ioctl method for the MR object - REG_DM_MR. This command can be used by users to register an allocated device memory buffer as an MR and receive lkey and rkey to be used within work requests. It is added as a new method under the MR object and using a new ib_device callback - reg_dm_mr. The command creates a standard ib_mr object which represents the registered memory. Signed-off-by: Ariel Levkovich Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/Makefile | 3 +- drivers/infiniband/core/uverbs_std_types.c | 10 -- drivers/infiniband/core/uverbs_std_types_mr.c | 147 ++++++++++++++++++++++++++ drivers/infiniband/core/verbs.c | 6 +- include/rdma/ib_verbs.h | 11 ++ include/rdma/uverbs_ioctl.h | 12 +++ include/uapi/rdma/ib_user_ioctl_cmds.h | 16 +++ 7 files changed, 193 insertions(+), 12 deletions(-) commit bee76d7ab5d270919e80e4764df7cd7e4f06ed24 Author: Ariel Levkovich Date: Thu Apr 5 18:53:24 2018 +0300 IB/uverbs: Add alloc/free dm uverbs ioctl support This change adds uverbs support for allocation/freeing of device memory commands. A new uverbs object is defined of type idr to represent and track the new resource type allocation per context. The API requires provider driver to implement 2 new ib_device callbacks - one for allocation and one for deallocation which return and accept (respectively) the ib_dm object which represents the allocated memory on the device. The support is added via the ioctl command infrastructure only. Signed-off-by: Ariel Levkovich Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/Makefile | 2 +- drivers/infiniband/core/uverbs.h | 1 + drivers/infiniband/core/uverbs_std_types.c | 3 +- drivers/infiniband/core/uverbs_std_types_dm.c | 108 ++++++++++++++++++++++++++ include/rdma/ib_verbs.h | 20 ++++- include/uapi/rdma/ib_user_ioctl_cmds.h | 15 ++++ 6 files changed, 146 insertions(+), 3 deletions(-) commit 1d8eeb9f6a6e0d8ac43a54fd95126044bf8d6695 Author: Ariel Levkovich Date: Thu Apr 5 18:53:23 2018 +0300 IB/uverbs: Add device memory capabilities reporting This change allows vendors to report device memory capability max_dm_size - to user via uverbs command. Signed-off-by: Ariel Levkovich Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs_cmd.c | 6 ++++++ include/rdma/ib_verbs.h | 1 + 2 files changed, 7 insertions(+) commit d41c1208955394198398f8a2ab8e0e25ad592e2b Author: Ariel Levkovich Date: Thu Apr 5 18:53:22 2018 +0300 IB/uverbs: Expose device memory capabilities to user Adding a new capability field under ib_uverbs_ex_query_device_resp - max_dm_size - which reflects the maximum amount of device memory that is available for allocation on a device in bytes. Signed-off-by: Ariel Levkovich Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe include/uapi/rdma/ib_user_verbs.h | 1 + 1 file changed, 1 insertion(+) commit 09c4854fde84421726a90249b4c20df2492f425f Author: Kalderon, Michal Date: Thu Apr 5 09:59:29 2018 +0300 RDMA/qedr: Fix wmb usage in qedr This patch comes as a result of Sinan Kaya's work and the decision that writel() must be a strong enough barrier for DMA. wmb usages in qedr driver have either been removed where they were there only to order DMA accesses, and replaced with smp_wmb and comments for the places that the barrier was there for SMP reasons. Fixes: 561e5d48968b ("RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs") Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/qedr/verbs.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit ed98c34919985a9f87c3edacb9a8d8c283c9e243 Author: Rafael J. Wysocki Date: Thu Mar 15 23:07:41 2018 +0100 sched: idle: Do not stop the tick before cpuidle_idle_call() Make cpuidle_idle_call() decide whether or not to stop the tick. First, the cpuidle_enter_s2idle() path deals with the tick (and with the entire timekeeping for that matter) by itself and it doesn't need the tick to be stopped beforehand. Second, to address the issue with short idle duration predictions by the idle governor after the tick has been stopped, it will be necessary to change the ordering of cpuidle_select() with respect to tick_nohz_idle_stop_tick(). To prepare for that, put a tick_nohz_idle_stop_tick() call in the same branch in which cpuidle_select() is called. Signed-off-by: Rafael J. Wysocki Reviewed-by: Frederic Weisbecker Acked-by: Peter Zijlstra (Intel) kernel/sched/idle.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 2aaf709a518d26563b80fd7a42379d7aa7ffed4a Author: Rafael J. Wysocki Date: Thu Mar 15 23:05:50 2018 +0100 sched: idle: Do not stop the tick upfront in the idle loop Push the decision whether or not to stop the tick somewhat deeper into the idle loop. Stopping the tick upfront leads to unpleasant outcomes in case the idle governor doesn't agree with the nohz code on the duration of the upcoming idle period. Specifically, if the tick has been stopped and the idle governor predicts short idle, the situation is bad regardless of whether or not the prediction is accurate. If it is accurate, the tick has been stopped unnecessarily which means excessive overhead. If it is not accurate, the CPU is likely to spend too much time in the (shallow, because short idle has been predicted) idle state selected by the governor [1]. As the first step towards addressing this problem, change the code to make the tick stopping decision inside of the loop in do_idle(). In particular, do not stop the tick in the cpu_idle_poll() code path. Also don't do that in tick_nohz_irq_exit() which doesn't really have enough information on whether or not to stop the tick. Link: https://marc.info/?l=linux-pm&m=150116085925208&w=2 # [1] Link: https://tu-dresden.de/zih/forschung/ressourcen/dateien/projekte/haec/powernightmares.pdf Suggested-by: Frederic Weisbecker Signed-off-by: Rafael J. Wysocki Reviewed-by: Frederic Weisbecker Acked-by: Peter Zijlstra (Intel) include/linux/tick.h | 2 ++ kernel/sched/idle.c | 9 ++++++--- kernel/time/tick-sched.c | 26 ++++++++++++++++++-------- 3 files changed, 26 insertions(+), 11 deletions(-) commit 0e7767687fdabfc58d5046e7488632bf2ecd4d0c Author: Rafael J. Wysocki Date: Thu Apr 5 18:58:27 2018 +0200 time: tick-sched: Reorganize idle tick management code Prepare the scheduler tick code for reworking the idle loop to avoid stopping the tick in some cases. The idea is to split the nohz idle entry call to decouple the idle time stats accounting and preparatory work from the actual tick stop code, in order to later be able to delay the tick stop once we reach more power-knowledgeable callers. Move away the tick_nohz_start_idle() invocation from __tick_nohz_idle_enter(), rename the latter to __tick_nohz_idle_stop_tick() and define tick_nohz_idle_stop_tick() as a wrapper around it for calling it from the outside. Make tick_nohz_idle_enter() only call tick_nohz_start_idle() instead of calling the entire __tick_nohz_idle_enter(), add another wrapper disabling and enabling interrupts around tick_nohz_idle_stop_tick() and make the current callers of tick_nohz_idle_enter() call it too to retain their current functionality. Signed-off-by: Rafael J. Wysocki Reviewed-by: Frederic Weisbecker Acked-by: Peter Zijlstra (Intel) arch/x86/xen/smp_pv.c | 1 + include/linux/tick.h | 12 ++++++++++++ kernel/sched/idle.c | 1 + kernel/time/tick-sched.c | 46 +++++++++++++++++++++++++--------------------- 4 files changed, 39 insertions(+), 21 deletions(-) commit 1b2951dd99af3970c1c1a8385a12b90236b837de Merge: 06dd3df 348f3cd Author: Linus Torvalds Date: Thu Apr 5 09:51:41 2018 -0700 Merge tag 'gpio-v4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v4.17 kernel cycle: New drivers: - Nintendo Wii GameCube GPIO, known as "Hollywood" - Raspberry Pi mailbox service GPIO expander - Spreadtrum main SC9860 SoC and IEC GPIO controllers. Improvements: - Implemented .get_multiple() callback for most of the high-performance industrial GPIO cards for the ISA bus. - ISA GPIO drivers now select the ISA_BUS_API instead of depending on it. This is merged with the same pattern for all the ISA drivers and some other Kconfig cleanups related to this. Cleanup: - Delete the TZ1090 GPIO drivers following the deletion of this SoC from the ARM tree. - Move the documentation over to driver-api to conform with the rest of the kernel documentation build. - Continue to make the GPIO drivers include only and not the too broad that we want to get rid of. - Managed to remove VLA allocation from two drivers pending more fixes in this area for the next merge window. - Misc janitorial fixes" * tag 'gpio-v4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (77 commits) gpio: Add Spreadtrum PMIC EIC driver support gpio: Add Spreadtrum EIC driver support dt-bindings: gpio: Add Spreadtrum EIC controller documentation gpio: ath79: Fix potential NULL dereference in ath79_gpio_probe() pinctrl: qcom: Don't allow protected pins to be requested gpiolib: Support 'gpio-reserved-ranges' property gpiolib: Change bitmap allocation to kmalloc_array gpiolib: Extract mask allocation into subroutine dt-bindings: gpio: Add a gpio-reserved-ranges property gpio: mockup: fix a potential crash when creating debugfs entries gpio: pca953x: add compatibility for pcal6524 and pcal9555a gpio: dwapb: Add support for a bus clock gpio: Remove VLA from xra1403 driver gpio: Remove VLA from MAX3191X driver gpio: ws16c48: Implement get_multiple callback gpio: gpio-mm: Implement get_multiple callback gpio: 104-idi-48: Implement get_multiple callback gpio: 104-dio-48e: Implement get_multiple callback gpio: pcie-idio-24: Implement get_multiple/set_multiple callbacks gpio: pci-idio-16: Implement get_multiple callback ... commit 39e00b6cf65831469a57333a929b8ca986892798 Author: Parav Pandit Date: Tue Apr 3 23:06:18 2018 -0500 IB/rxe: Removed GID add/del dummy routines rxe driver's add_gid() and del_gid() callbacks are doing simple checks which are already done by the ib core before invoking these callback routines. Therefore, code is simplified to skip implementing add_gid() and del_gid() callback functions. They are only invoked by ib_core if they are implemented. Signed-off-by: Parav Pandit Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_verbs.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 57939021e8f882d13a5263a9d682c64ae00c578d Author: Jason Gunthorpe Date: Wed Apr 4 20:58:13 2018 -0600 RDMA/qedr: Zero stack memory before copying to user space The fact this struct was not init'd like all the others was missed when the padding reserved field was added. Reported-by: Dan Carpenter Fixes: 71e80a4781af ("RDMA/qedr: Fix uABI structure layouts for 32/64 compat") Acked-by: Michal Kalderon Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/qedr/verbs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6dc936f175cc6d12a8eb14d29b87e9238e460383 Author: Dominik Brodowski Date: Thu Apr 5 11:53:06 2018 +0200 syscalls/x86: Extend register clearing on syscall entry to lower registers To reduce the chance that random user space content leaks down the call chain in registers, also clear lower registers on syscall entry: For 64-bit syscalls, extend the register clearing in PUSH_AND_CLEAR_REGS to %dx and %cx. This should not hurt at all, also on the other callers of that macro. We do not need to clear %rdi and %rsi for syscall entry, as those registers are used to pass the parameters to do_syscall_64(). For the 32-bit compat syscalls, do_int80_syscall_32() and do_fast_syscall_32() each only take one parameter. Therefore, extend the register clearing to %dx, %cx, and %si in entry_SYSCALL_compat and entry_INT80_compat. Signed-off-by: Dominik Brodowski Acked-by: Linus Torvalds Cc: Al Viro Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180405095307.3730-8-linux@dominikbrodowski.net Signed-off-by: Ingo Molnar arch/x86/entry/calling.h | 2 ++ arch/x86/entry/entry_64_compat.S | 6 ++++++ 2 files changed, 8 insertions(+) commit f8781c4a226319fe60e652118b90cf094ccfe747 Author: Dominik Brodowski Date: Thu Apr 5 11:53:05 2018 +0200 syscalls/x86: Unconditionally enable 'struct pt_regs' based syscalls on x86_64 Removing CONFIG_SYSCALL_PTREGS from arch/x86/Kconfig and simply selecting ARCH_HAS_SYSCALL_WRAPPER unconditionally on x86-64 allows us to simplify several codepaths. Signed-off-by: Dominik Brodowski Acked-by: Linus Torvalds Cc: Al Viro Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180405095307.3730-7-linux@dominikbrodowski.net Signed-off-by: Ingo Molnar arch/x86/Kconfig | 6 +----- arch/x86/entry/common.c | 10 ++-------- arch/x86/entry/syscall_32.c | 6 +++--- arch/x86/entry/syscall_64.c | 5 ----- arch/x86/entry/vsyscall/vsyscall_64.c | 18 ------------------ arch/x86/include/asm/syscall.h | 4 ++-- arch/x86/include/asm/syscalls.h | 20 ++++---------------- 7 files changed, 12 insertions(+), 57 deletions(-) commit ebeb8c82ffaf94435806ff0b686fffd41dd410b5 Author: Dominik Brodowski Date: Thu Apr 5 11:53:04 2018 +0200 syscalls/x86: Use 'struct pt_regs' based syscall calling for IA32_EMULATION and x32 Extend ARCH_HAS_SYSCALL_WRAPPER for i386 emulation and for x32 on 64-bit x86. For x32, all we need to do is to create an additional stub for each compat syscall which decodes the parameters in x86-64 ordering, e.g.: asmlinkage long __compat_sys_x32_xyzzy(struct pt_regs *regs) { return c_SyS_xyzzy(regs->di, regs->si, regs->dx); } For i386 emulation, we need to teach compat_sys_*() to take struct pt_regs as its only argument, e.g.: asmlinkage long __compat_sys_ia32_xyzzy(struct pt_regs *regs) { return c_SyS_xyzzy(regs->bx, regs->cx, regs->dx); } In addition, we need to create additional stubs for common syscalls (that is, for syscalls which have the same parameters on 32-bit and 64-bit), e.g.: asmlinkage long __sys_ia32_xyzzy(struct pt_regs *regs) { return c_sys_xyzzy(regs->bx, regs->cx, regs->dx); } This approach avoids leaking random user-provided register content down the call chain. This patch is based on an original proof-of-concept | From: Linus Torvalds | Signed-off-by: Linus Torvalds and was split up and heavily modified by me, in particular to base it on ARCH_HAS_SYSCALL_WRAPPER. Signed-off-by: Dominik Brodowski Acked-by: Linus Torvalds Cc: Al Viro Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180405095307.3730-6-linux@dominikbrodowski.net Signed-off-by: Ingo Molnar arch/x86/Kconfig | 2 +- arch/x86/entry/common.c | 4 + arch/x86/entry/syscall_32.c | 15 +- arch/x86/entry/syscalls/syscall_32.tbl | 677 +++++++++++++++++---------------- arch/x86/entry/syscalls/syscall_64.tbl | 74 ++-- arch/x86/include/asm/syscall_wrapper.h | 117 +++++- 6 files changed, 509 insertions(+), 380 deletions(-) commit 7303e30ec1d8fb5ca1f07c92d069241c32b2ee1b Author: Dominik Brodowski Date: Thu Apr 5 11:53:03 2018 +0200 syscalls/core: Prepare CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y for compat syscalls It may be useful for an architecture to override the definitions of the COMPAT_SYSCALL_DEFINE0() and __COMPAT_SYSCALL_DEFINEx() macros in , in particular to use a different calling convention for syscalls. This patch provides a mechanism to do so, based on the previously introduced CONFIG_ARCH_HAS_SYSCALL_WRAPPER. If it is enabled, is included in and may be used to define the macros mentioned above. Moreover, as the syscall calling convention may be different if CONFIG_ARCH_HAS_SYSCALL_WRAPPER is set, the compat syscall function prototypes in are #ifndef'd out in that case. As some of the syscalls and/or compat syscalls may not be present, the COND_SYSCALL() and COND_SYSCALL_COMPAT() macros in kernel/sys_ni.c as well as the SYS_NI() and COMPAT_SYS_NI() macros in kernel/time/posix-stubs.c can be re-defined in iff CONFIG_ARCH_HAS_SYSCALL_WRAPPER is enabled. Signed-off-by: Dominik Brodowski Acked-by: Linus Torvalds Cc: Al Viro Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180405095307.3730-5-linux@dominikbrodowski.net Signed-off-by: Ingo Molnar include/linux/compat.h | 22 ++++++++++++++++++++++ init/Kconfig | 9 ++++++--- kernel/sys_ni.c | 10 ++++++++++ kernel/time/posix-stubs.c | 10 ++++++++++ 4 files changed, 48 insertions(+), 3 deletions(-) commit fa697140f9a20119a9ec8fd7460cc4314fbdaff3 Author: Dominik Brodowski Date: Thu Apr 5 11:53:02 2018 +0200 syscalls/x86: Use 'struct pt_regs' based syscall calling convention for 64-bit syscalls Let's make use of ARCH_HAS_SYSCALL_WRAPPER=y on pure 64-bit x86-64 systems: Each syscall defines a stub which takes struct pt_regs as its only argument. It decodes just those parameters it needs, e.g: asmlinkage long sys_xyzzy(const struct pt_regs *regs) { return SyS_xyzzy(regs->di, regs->si, regs->dx); } This approach avoids leaking random user-provided register content down the call chain. For example, for sys_recv() which is a 4-parameter syscall, the assembly now is (in slightly reordered fashion): : callq <__fentry__> /* decode regs->di, ->si, ->dx and ->r10 */ mov 0x70(%rdi),%rdi mov 0x68(%rdi),%rsi mov 0x60(%rdi),%rdx mov 0x38(%rdi),%rcx [ SyS_recv() is automatically inlined by the compiler, as it is not [yet] used anywhere else ] /* clear %r9 and %r8, the 5th and 6th args */ xor %r9d,%r9d xor %r8d,%r8d /* do the actual work */ callq __sys_recvfrom /* cleanup and return */ cltq retq The only valid place in an x86-64 kernel which rightfully calls a syscall function on its own -- vsyscall -- needs to be modified to pass struct pt_regs onwards as well. To keep the syscall table generation working independent of SYSCALL_PTREGS being enabled, the stubs are named the same as the "original" syscall stubs, i.e. sys_*(). This patch is based on an original proof-of-concept | From: Linus Torvalds | Signed-off-by: Linus Torvalds and was split up and heavily modified by me, in particular to base it on ARCH_HAS_SYSCALL_WRAPPER, to limit it to 64-bit-only for the time being, and to update the vsyscall to the new calling convention. Signed-off-by: Dominik Brodowski Acked-by: Linus Torvalds Cc: Al Viro Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180405095307.3730-4-linux@dominikbrodowski.net Signed-off-by: Ingo Molnar arch/x86/Kconfig | 5 +++ arch/x86/entry/common.c | 4 ++ arch/x86/entry/syscall_64.c | 9 ++++- arch/x86/entry/vsyscall/vsyscall_64.c | 22 +++++++++++ arch/x86/include/asm/syscall.h | 4 ++ arch/x86/include/asm/syscall_wrapper.h | 70 ++++++++++++++++++++++++++++++++++ arch/x86/include/asm/syscalls.h | 7 ++++ include/linux/syscalls.h | 2 +- 8 files changed, 120 insertions(+), 3 deletions(-) commit 1bd21c6c21e848996339508d3ffb106d505256a8 Author: Dominik Brodowski Date: Thu Apr 5 11:53:01 2018 +0200 syscalls/core: Introduce CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y It may be useful for an architecture to override the definitions of the SYSCALL_DEFINE0() and __SYSCALL_DEFINEx() macros in , in particular to use a different calling convention for syscalls. This patch provides a mechanism to do so: It introduces CONFIG_ARCH_HAS_SYSCALL_WRAPPER. If it is enabled, is included in and may be used to define the macros mentioned above. Moreover, as the syscall calling convention may be different if CONFIG_ARCH_HAS_SYSCALL_WRAPPER is set, the syscall function prototypes in are #ifndef'd out in that case. Signed-off-by: Dominik Brodowski Acked-by: Linus Torvalds Cc: Al Viro Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180405095307.3730-3-linux@dominikbrodowski.net Signed-off-by: Ingo Molnar include/linux/syscalls.h | 23 +++++++++++++++++++++++ init/Kconfig | 7 +++++++ 2 files changed, 30 insertions(+) commit dfe64506c01e57159a4c550fe537c13a317ff01b Author: Linus Torvalds Date: Thu Apr 5 11:53:00 2018 +0200 x86/syscalls: Don't pointlessly reload the system call number We have it in a register in the low-level asm, just pass it in as an argument rather than have do_syscall_64() load it back in from the ptregs pointer. Signed-off-by: Linus Torvalds Signed-off-by: Dominik Brodowski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180405095307.3730-2-linux@dominikbrodowski.net Signed-off-by: Ingo Molnar arch/x86/entry/common.c | 12 ++++++------ arch/x86/entry/entry_64.S | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) commit caf61de356189f0925b23c3922bd16b53bb7c768 Author: Arnaldo Carvalho de Melo Date: Thu Apr 5 11:43:38 2018 -0300 perf ui browser: Fixup cleaning unused lines at the bottom Now that we can have extra title lines we should use ui_browser->rows and not ->height when drawing lines, as well as adding ui_browser->extra_title_lines to browser->y when cleaning unused lines at the bottom, otherwise we end up clobbering with spaces the last line just shown by ui_browser->refresh() routine. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: ef9ff6017e3c ("perf ui browser: Move the extra title lines from the hists browser") Link: https://lkml.kernel.org/n/tip-dfcpokt1pm5ixm8n9pxwtstz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e726c8511c052ba40dc943517b54011e42c2dfa3 Author: Arnaldo Carvalho de Melo Date: Thu Apr 5 11:35:32 2018 -0300 perf annotate browser: Fixup vertical line separating metrics from instructions Now that we can have extra title lines we should use ui_browser->rows and not ->height when drawing lines, as it will use ui_browser__gotorc() and that will take the extra title lines into account, which was causing an off by one at the end of the vertical line drawn by __ui_browser__vline(), fix it. The visual effect was that the last line, with status messages, was being overwritten by the vertical line, looking like: Press 'h' for help on│key bindings Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: ef9ff6017e3c ("perf ui browser: Move the extra title lines from the hists browser") Link: https://lkml.kernel.org/n/tip-08y1ln3xjn76zvizz1i1dsvn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0459a092509f9c2ff91cc070cd2645d38e7cf7b Author: Arnaldo Carvalho de Melo Date: Thu Apr 5 11:13:24 2018 -0300 perf annotate: Show group details on the title line To match what is shown in the main 'perf report/top' title lines, i.e. if a group is being shown, either a real group (recorded with "-e '{a,b,c}') or a forced group (using 'perf report --group' for a perf.data file recorded without {}) we will show multiple columns, one per event, but we were failing to show the group details, so, for: # perf report --header-only | grep cmdline # cmdline : /home/acme/bin/perf record -e {cycles,instructions,cache-misses} # perf report --group The first line was showing just "cycles", now it shows the correct line, which is: Samples: 578 of events 'anon group { cycles, instructions, cache-misses }', 4000 Hz, Event count (approx.): 487421794 syscall_return_via_sysret /lib/modules/4.16.0-rc7/build/vmlinux 0.22 2.97 0.00 │ ↓ jmp 6c │ mov %cr3,%rdi 1.33 10.89 4.00 │ ↓ jmp 62 │ mov %rdi,%rax Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: 6920e2854e9a ("perf annotate browser: Show extra title line with event information") Link: https://lkml.kernel.org/n/tip-i41tqh17c2dabnyzjh99r1oz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0d75f123a6dcdacb3550b0c3c44a283f7259289e Author: Adrian Hunter Date: Tue Mar 6 11:13:17 2018 +0200 perf auxtrace: Make auxtrace_queues__add_buffer() allocate struct buffer In preparation for supporting AUX area sampling buffers, auxtrace_queues__add_buffer() needs to be more generic. To that end, move memory allocation for struct buffer into it. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1520327598-1317-7-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/auxtrace.c | 54 +++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 30 deletions(-) commit cd903711fd9dce808b5cc07e509135886d962b0c Author: Tomer Maimon Date: Fri Mar 16 01:10:11 2018 +0200 arm: npcm: modify configuration for the NPCM7xx BMC. Modify configuration and MakeFile for the Nuvoton NPCM and NPCM7xx BMC. [arnd: took this one late, since it fixes some build problems with the original commit] Signed-off-by: Tomer Maimon Reviewed-by: Brendan Higgins Signed-off-by: Arnd Bergmann arch/arm/mach-npcm/Kconfig | 40 +++++++++++----------------------------- arch/arm/mach-npcm/Makefile | 3 ++- 2 files changed, 13 insertions(+), 30 deletions(-) commit 9931753b6c5ebf78ad0b8cb056234369f0b3c561 Merge: e2d39e0 7ba8fc0 Author: Jiri Kosina Date: Thu Apr 5 13:28:59 2018 +0200 Merge branch 'for-4.17/wacom' into for-linus Pull support for 3rd generation Intuos BT device commit e2d39e0f95cb414b1fb6530f8429ad411586922b Merge: 108ff0e 2ddc8e2 Author: Jiri Kosina Date: Thu Apr 5 13:28:46 2018 +0200 Merge branch 'for-4.17/upstream' into for-linus Pull a few small generic code cleanups. commit 108ff0e8012ae10708168940c7474318fb343751 Merge: af73686e b7289cb Author: Jiri Kosina Date: Thu Apr 5 13:28:34 2018 +0200 Merge branch 'for-4.17/sony' into for-linus Pull support for NSG-MR5U and NSG-MR7U devices. commit af73686e7bfe49fbbccc099995be8c78ce5bfe9a Merge: f73fee74 2904e68 Author: Jiri Kosina Date: Thu Apr 5 13:19:57 2018 +0200 Merge branch 'for-4.17/multitouch' into for-linus Pull Razer Blade Stealth support improvement and a few generic cleanups commit f73fee743b5c44abc217f957a13fe0721c89450b Merge: 7a8c1c4 8afede1 Author: Jiri Kosina Date: Thu Apr 5 13:18:26 2018 +0200 Merge branch 'for-4.17/hid-i2c' into for-linus Small hid-i2c acpi cleanup. commit 7a8c1c4e71e4c694e2c9a05f565dd5dac43faa40 Merge: d463fd4 9a6a419 Author: Jiri Kosina Date: Thu Apr 5 13:17:23 2018 +0200 Merge branch 'for-4.17/hid-elan' into for-linus Pull new hid-elan driver, currently providing support for touchpad found in certain HP Pavilion x2 laptops. commit d463fd44c4d620b6f96f9f56474fbd42cb663a84 Merge: a9ef00a 7d3d884 Author: Jiri Kosina Date: Thu Apr 5 13:16:52 2018 +0200 Merge branch 'for-4.17/google-hammer' into for-linus Support for Google Hammer device. commit a9ef00aec7633b3be3b19a7fce9a8d13f5a07c1c Merge: b55dc1d fbb77e8 Author: Jiri Kosina Date: Thu Apr 5 13:16:37 2018 +0200 Merge branch 'for-4.17/elecom' into for-linus Support for new elecom device. commit a95845ba184b854106972f5d8f50354c2d272c06 Author: Mauro Carvalho Chehab Date: Thu Apr 5 06:51:15 2018 -0300 media: v4l2-core: fix size of devnode_nums[] bitarray The size of devnode_nums[] bit array is too short to store information for VFL_TYPE_TOUCH. That causes it to override other memory regions. Thankfully, on recent reports, it is overriding video_device[] array, trigging a WARN_ON(). Yet, it just warns about the problem, but let the code excecuting, with generates an OOPS: [ 43.177394] WARNING: CPU: 1 PID: 711 at drivers/media/v4l2-core/v4l2-dev.c:945 __video_register_device+0xc99/0x1090 [videodev] [ 43.177396] Modules linked in: hid_sensor_custom hid_sensor_als hid_sensor_incl_3d hid_sensor_rotation hid_sensor_magn_3d hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf joydev hid_sensor_iio_common hid_rmi(+) rmi_core industrialio videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev hid_multitouch media hid_sensor_hub binfmt_misc nls_iso8859_1 snd_hda_codec_hdmi arc4 snd_soc_skl snd_soc_skl_ipc snd_hda_ext_core snd_soc_sst_dsp snd_soc_sst_ipc snd_hda_codec_realtek snd_soc_acpi snd_hda_codec_generic snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel snd_hda_codec intel_rapl snd_hda_core x86_pkg_temp_thermal snd_hwdep intel_powerclamp coretemp snd_pcm kvm_intel snd_seq_midi snd_seq_midi_event snd_rawmidi crct10dif_pclmul [ 43.177426] crc32_pclmul ghash_clmulni_intel iwlmvm pcbc mac80211 snd_seq aesni_intel iwlwifi aes_x86_64 snd_seq_device crypto_simd glue_helper cryptd snd_timer intel_cstate intel_rapl_perf input_leds serio_raw intel_wmi_thunderbolt snd wmi_bmof cfg80211 soundcore ideapad_laptop sparse_keymap idma64 virt_dma tpm_crb acpi_pad int3400_thermal acpi_thermal_rel intel_pch_thermal processor_thermal_device mac_hid int340x_thermal_zone mei_me intel_soc_dts_iosf mei intel_lpss_pci shpchp intel_lpss sch_fq_codel vfio_pci nfsd vfio_virqfd parport_pc ppdev auth_rpcgss nfs_acl lockd grace lp parport sunrpc ip_tables x_tables autofs4 hid_logitech_hidpp hid_logitech_dj hid_generic usbhid kvmgt vfio_mdev mdev vfio_iommu_type1 vfio kvm irqbypass i915 i2c_algo_bit drm_kms_helper syscopyarea sdhci_pci sysfillrect [ 43.177466] sysimgblt cqhci fb_sys_fops sdhci drm i2c_hid wmi hid video pinctrl_sunrisepoint pinctrl_intel [ 43.177474] CPU: 1 PID: 711 Comm: systemd-udevd Not tainted 4.16.0 #1 [ 43.177475] Hardware name: LENOVO 80UE/VIUU4, BIOS 2UCN10T 10/14/2016 [ 43.177481] RIP: 0010:__video_register_device+0xc99/0x1090 [videodev] [ 43.177482] RSP: 0000:ffffa5c5c231b420 EFLAGS: 00010202 [ 43.177484] RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000000000 [ 43.177485] RDX: ffffffffc0c44cc0 RSI: ffffffffffffffff RDI: ffffffffc0c44cc0 [ 43.177486] RBP: ffffa5c5c231b478 R08: ffffffffc0c96900 R09: ffff8eda1a51f018 [ 43.177487] R10: 0000000000000600 R11: 00000000000003b6 R12: 0000000000000000 [ 43.177488] R13: 0000000000000005 R14: ffffffffc0c96900 R15: ffff8eda1d6d91c0 [ 43.177489] FS: 00007fd2d8ef2480(0000) GS:ffff8eda33480000(0000) knlGS:0000000000000000 [ 43.177490] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 43.177491] CR2: 00007ffe0a6ad01c CR3: 0000000456ae2004 CR4: 00000000003606e0 [ 43.177492] Call Trace: [ 43.177498] ? devres_add+0x5f/0x70 [ 43.177502] rmi_f54_probe+0x437/0x470 [rmi_core] [ 43.177505] rmi_function_probe+0x25/0x30 [rmi_core] [ 43.177507] driver_probe_device+0x310/0x480 [ 43.177509] __device_attach_driver+0x86/0x100 [ 43.177511] ? __driver_attach+0xf0/0xf0 [ 43.177512] bus_for_each_drv+0x6b/0xb0 [ 43.177514] __device_attach+0xdd/0x160 [ 43.177516] device_initial_probe+0x13/0x20 [ 43.177518] bus_probe_device+0x95/0xa0 [ 43.177519] device_add+0x44b/0x680 [ 43.177522] rmi_register_function+0x62/0xd0 [rmi_core] [ 43.177525] rmi_create_function+0x112/0x1a0 [rmi_core] [ 43.177527] ? rmi_driver_clear_irq_bits+0xc0/0xc0 [rmi_core] [ 43.177530] rmi_scan_pdt+0xca/0x1a0 [rmi_core] [ 43.177535] rmi_init_functions+0x5b/0x120 [rmi_core] [ 43.177537] rmi_driver_probe+0x152/0x3c0 [rmi_core] [ 43.177547] ? sysfs_create_link+0x25/0x40 [ 43.177549] driver_probe_device+0x310/0x480 [ 43.177551] __device_attach_driver+0x86/0x100 [ 43.177553] ? __driver_attach+0xf0/0xf0 [ 43.177554] bus_for_each_drv+0x6b/0xb0 [ 43.177556] __device_attach+0xdd/0x160 [ 43.177558] device_initial_probe+0x13/0x20 [ 43.177560] bus_probe_device+0x95/0xa0 [ 43.177561] device_add+0x44b/0x680 [ 43.177564] rmi_register_transport_device+0x84/0x100 [rmi_core] [ 43.177568] rmi_input_configured+0xbf/0x1a0 [hid_rmi] [ 43.177571] ? input_allocate_device+0xdf/0xf0 [ 43.177574] hidinput_connect+0x4a9/0x37a0 [hid] [ 43.177578] hid_connect+0x326/0x3d0 [hid] [ 43.177581] hid_hw_start+0x42/0x70 [hid] [ 43.177583] rmi_probe+0x115/0x510 [hid_rmi] [ 43.177586] hid_device_probe+0xd3/0x150 [hid] [ 43.177588] ? sysfs_create_link+0x25/0x40 [ 43.177590] driver_probe_device+0x310/0x480 [ 43.177592] __driver_attach+0xbf/0xf0 [ 43.177593] ? driver_probe_device+0x480/0x480 [ 43.177595] bus_for_each_dev+0x74/0xb0 [ 43.177597] ? kmem_cache_alloc_trace+0x1a6/0x1c0 [ 43.177599] driver_attach+0x1e/0x20 [ 43.177600] bus_add_driver+0x167/0x260 [ 43.177602] ? 0xffffffffc0cbc000 [ 43.177604] driver_register+0x60/0xe0 [ 43.177605] ? 0xffffffffc0cbc000 [ 43.177607] __hid_register_driver+0x63/0x70 [hid] [ 43.177610] rmi_driver_init+0x23/0x1000 [hid_rmi] [ 43.177612] do_one_initcall+0x52/0x191 [ 43.177615] ? _cond_resched+0x19/0x40 [ 43.177617] ? kmem_cache_alloc_trace+0xa2/0x1c0 [ 43.177619] ? do_init_module+0x27/0x209 [ 43.177621] do_init_module+0x5f/0x209 [ 43.177623] load_module+0x1987/0x1f10 [ 43.177626] ? ima_post_read_file+0x96/0xa0 [ 43.177629] SYSC_finit_module+0xfc/0x120 [ 43.177630] ? SYSC_finit_module+0xfc/0x120 [ 43.177632] SyS_finit_module+0xe/0x10 [ 43.177634] do_syscall_64+0x73/0x130 [ 43.177637] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 [ 43.177638] RIP: 0033:0x7fd2d880b839 [ 43.177639] RSP: 002b:00007ffe0a6b2368 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 43.177641] RAX: ffffffffffffffda RBX: 000055cdd86542e0 RCX: 00007fd2d880b839 [ 43.177641] RDX: 0000000000000000 RSI: 00007fd2d84ea0e5 RDI: 0000000000000016 [ 43.177642] RBP: 00007fd2d84ea0e5 R08: 0000000000000000 R09: 00007ffe0a6b2480 [ 43.177643] R10: 0000000000000016 R11: 0000000000000246 R12: 0000000000000000 [ 43.177644] R13: 000055cdd8688930 R14: 0000000000020000 R15: 000055cdd86542e0 [ 43.177645] Code: 48 c7 c7 54 b4 c3 c0 e8 96 9d ec dd e9 d4 fb ff ff 0f 0b 41 be ea ff ff ff e9 c7 fb ff ff 0f 0b 41 be ea ff ff ff e9 ba fb ff ff <0f> 0b e9 d8 f4 ff ff 83 fa 01 0f 84 c4 02 00 00 48 83 78 68 00 [ 43.177675] ---[ end trace d44d9bc41477c2dd ]--- [ 43.177679] BUG: unable to handle kernel NULL pointer dereference at 0000000000000499 [ 43.177723] IP: __video_register_device+0x1cc/0x1090 [videodev] [ 43.177749] PGD 0 P4D 0 [ 43.177764] Oops: 0000 [#1] SMP PTI [ 43.177780] Modules linked in: hid_sensor_custom hid_sensor_als hid_sensor_incl_3d hid_sensor_rotation hid_sensor_magn_3d hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf joydev hid_sensor_iio_common hid_rmi(+) rmi_core industrialio videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev hid_multitouch media hid_sensor_hub binfmt_misc nls_iso8859_1 snd_hda_codec_hdmi arc4 snd_soc_skl snd_soc_skl_ipc snd_hda_ext_core snd_soc_sst_dsp snd_soc_sst_ipc snd_hda_codec_realtek snd_soc_acpi snd_hda_codec_generic snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel snd_hda_codec intel_rapl snd_hda_core x86_pkg_temp_thermal snd_hwdep intel_powerclamp coretemp snd_pcm kvm_intel snd_seq_midi snd_seq_midi_event snd_rawmidi crct10dif_pclmul [ 43.178055] crc32_pclmul ghash_clmulni_intel iwlmvm pcbc mac80211 snd_seq aesni_intel iwlwifi aes_x86_64 snd_seq_device crypto_simd glue_helper cryptd snd_timer intel_cstate intel_rapl_perf input_leds serio_raw intel_wmi_thunderbolt snd wmi_bmof cfg80211 soundcore ideapad_laptop sparse_keymap idma64 virt_dma tpm_crb acpi_pad int3400_thermal acpi_thermal_rel intel_pch_thermal processor_thermal_device mac_hid int340x_thermal_zone mei_me intel_soc_dts_iosf mei intel_lpss_pci shpchp intel_lpss sch_fq_codel vfio_pci nfsd vfio_virqfd parport_pc ppdev auth_rpcgss nfs_acl lockd grace lp parport sunrpc ip_tables x_tables autofs4 hid_logitech_hidpp hid_logitech_dj hid_generic usbhid kvmgt vfio_mdev mdev vfio_iommu_type1 vfio kvm irqbypass i915 i2c_algo_bit drm_kms_helper syscopyarea sdhci_pci sysfillrect [ 43.178337] sysimgblt cqhci fb_sys_fops sdhci drm i2c_hid wmi hid video pinctrl_sunrisepoint pinctrl_intel [ 43.178380] CPU: 1 PID: 711 Comm: systemd-udevd Tainted: G W 4.16.0 #1 [ 43.178411] Hardware name: LENOVO 80UE/VIUU4, BIOS 2UCN10T 10/14/2016 [ 43.178441] RIP: 0010:__video_register_device+0x1cc/0x1090 [videodev] [ 43.178467] RSP: 0000:ffffa5c5c231b420 EFLAGS: 00010202 [ 43.178490] RAX: ffffffffc0c44cc0 RBX: 0000000000000005 RCX: ffffffffc0c454c0 [ 43.178519] RDX: 0000000000000001 RSI: ffff8eda1d6d9118 RDI: ffffffffc0c44cc0 [ 43.178549] RBP: ffffa5c5c231b478 R08: ffffffffc0c96900 R09: ffff8eda1a51f018 [ 43.178579] R10: 0000000000000600 R11: 00000000000003b6 R12: 0000000000000000 [ 43.178608] R13: 0000000000000005 R14: ffffffffc0c96900 R15: ffff8eda1d6d91c0 [ 43.178636] FS: 00007fd2d8ef2480(0000) GS:ffff8eda33480000(0000) knlGS:0000000000000000 [ 43.178669] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 43.178693] CR2: 0000000000000499 CR3: 0000000456ae2004 CR4: 00000000003606e0 [ 43.178721] Call Trace: [ 43.178736] ? devres_add+0x5f/0x70 [ 43.178755] rmi_f54_probe+0x437/0x470 [rmi_core] [ 43.178779] rmi_function_probe+0x25/0x30 [rmi_core] [ 43.178805] driver_probe_device+0x310/0x480 [ 43.178828] __device_attach_driver+0x86/0x100 [ 43.178851] ? __driver_attach+0xf0/0xf0 [ 43.178884] bus_for_each_drv+0x6b/0xb0 [ 43.178904] __device_attach+0xdd/0x160 [ 43.178925] device_initial_probe+0x13/0x20 [ 43.178948] bus_probe_device+0x95/0xa0 [ 43.178968] device_add+0x44b/0x680 [ 43.178987] rmi_register_function+0x62/0xd0 [rmi_core] [ 43.181747] rmi_create_function+0x112/0x1a0 [rmi_core] [ 43.184677] ? rmi_driver_clear_irq_bits+0xc0/0xc0 [rmi_core] [ 43.187505] rmi_scan_pdt+0xca/0x1a0 [rmi_core] [ 43.190171] rmi_init_functions+0x5b/0x120 [rmi_core] [ 43.192809] rmi_driver_probe+0x152/0x3c0 [rmi_core] [ 43.195403] ? sysfs_create_link+0x25/0x40 [ 43.198253] driver_probe_device+0x310/0x480 [ 43.201083] __device_attach_driver+0x86/0x100 [ 43.203800] ? __driver_attach+0xf0/0xf0 [ 43.206503] bus_for_each_drv+0x6b/0xb0 [ 43.209291] __device_attach+0xdd/0x160 [ 43.212207] device_initial_probe+0x13/0x20 [ 43.215146] bus_probe_device+0x95/0xa0 [ 43.217885] device_add+0x44b/0x680 [ 43.220597] rmi_register_transport_device+0x84/0x100 [rmi_core] [ 43.223321] rmi_input_configured+0xbf/0x1a0 [hid_rmi] [ 43.226051] ? input_allocate_device+0xdf/0xf0 [ 43.228814] hidinput_connect+0x4a9/0x37a0 [hid] [ 43.231701] hid_connect+0x326/0x3d0 [hid] [ 43.234548] hid_hw_start+0x42/0x70 [hid] [ 43.237302] rmi_probe+0x115/0x510 [hid_rmi] [ 43.239862] hid_device_probe+0xd3/0x150 [hid] [ 43.242558] ? sysfs_create_link+0x25/0x40 [ 43.242828] audit: type=1400 audit(1522795151.600:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/snap/core/4206/usr/lib/snapd/snap-confine" pid=1151 comm="apparmor_parser" [ 43.244859] driver_probe_device+0x310/0x480 [ 43.244862] __driver_attach+0xbf/0xf0 [ 43.246982] audit: type=1400 audit(1522795151.600:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/snap/core/4206/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=1151 comm="apparmor_parser" [ 43.249403] ? driver_probe_device+0x480/0x480 [ 43.249405] bus_for_each_dev+0x74/0xb0 [ 43.253200] audit: type=1400 audit(1522795151.600:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/snap/core/4206/usr/lib/snapd/snap-confine//snap_update_ns" pid=1151 comm="apparmor_parser" [ 43.254055] ? kmem_cache_alloc_trace+0x1a6/0x1c0 [ 43.256282] audit: type=1400 audit(1522795151.604:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/sbin/dhclient" pid=1152 comm="apparmor_parser" [ 43.258436] driver_attach+0x1e/0x20 [ 43.260875] audit: type=1400 audit(1522795151.604:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=1152 comm="apparmor_parser" [ 43.263118] bus_add_driver+0x167/0x260 [ 43.267676] audit: type=1400 audit(1522795151.604:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-helper" pid=1152 comm="apparmor_parser" [ 43.268807] ? 0xffffffffc0cbc000 [ 43.268812] driver_register+0x60/0xe0 [ 43.271184] audit: type=1400 audit(1522795151.604:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-script" pid=1152 comm="apparmor_parser" [ 43.274081] ? 0xffffffffc0cbc000 [ 43.274086] __hid_register_driver+0x63/0x70 [hid] [ 43.288367] rmi_driver_init+0x23/0x1000 [hid_rmi] [ 43.291501] do_one_initcall+0x52/0x191 [ 43.292348] audit: type=1400 audit(1522795151.652:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/man" pid=1242 comm="apparmor_parser" [ 43.294212] ? _cond_resched+0x19/0x40 [ 43.300028] ? kmem_cache_alloc_trace+0xa2/0x1c0 [ 43.303475] ? do_init_module+0x27/0x209 [ 43.306842] do_init_module+0x5f/0x209 [ 43.310269] load_module+0x1987/0x1f10 [ 43.313704] ? ima_post_read_file+0x96/0xa0 [ 43.317174] SYSC_finit_module+0xfc/0x120 [ 43.320754] ? SYSC_finit_module+0xfc/0x120 [ 43.324065] SyS_finit_module+0xe/0x10 [ 43.327387] do_syscall_64+0x73/0x130 [ 43.330909] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 [ 43.334305] RIP: 0033:0x7fd2d880b839 [ 43.337810] RSP: 002b:00007ffe0a6b2368 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 43.341259] RAX: ffffffffffffffda RBX: 000055cdd86542e0 RCX: 00007fd2d880b839 [ 43.344613] RDX: 0000000000000000 RSI: 00007fd2d84ea0e5 RDI: 0000000000000016 [ 43.347962] RBP: 00007fd2d84ea0e5 R08: 0000000000000000 R09: 00007ffe0a6b2480 [ 43.351456] R10: 0000000000000016 R11: 0000000000000246 R12: 0000000000000000 [ 43.354845] R13: 000055cdd8688930 R14: 0000000000020000 R15: 000055cdd86542e0 [ 43.358224] Code: c7 05 ad 12 02 00 00 00 00 00 48 8d 88 00 08 00 00 eb 09 48 83 c0 08 48 39 c1 74 31 48 8b 10 48 85 d2 74 ef 49 8b b7 98 04 00 00 <48> 39 b2 98 04 00 00 75 df 48 63 92 f8 04 00 00 f0 48 0f ab 15 [ 43.361764] RIP: __video_register_device+0x1cc/0x1090 [videodev] RSP: ffffa5c5c231b420 [ 43.365281] CR2: 0000000000000499 This patch fixes the array size and changes the WARN_ON() to return an error, instead of letting the Kernel to proceed with registering. Cc: stable@vger.kernel.org # For Kernel 4.16 Fixes: 4839c58f034a ("media: v4l2-dev: convert VFL_TYPE_* into an enum") Reported-by: Peter Geis Reported-by: Jaak Ristioja Reported-by: Michał Siemek Reviewed-by: Hans Verkuil Reviewed-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-dev.c | 8 ++++++-- include/media/v4l2-dev.h | 12 ++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) commit 41613a1a7df27a0aa34bf77d51278bbe8e108a8f Author: Tomi Valkeinen Date: Thu Apr 5 09:55:37 2018 +0300 drm/omap: fix crash if there's no video PLL Commit 8a7eda7686675b73d74c22c0d5b83059f9d783f6 ("drm: omapdrm: dispc: Pass DISPC pointer to remaining dispc API functions") made dpi.c use ctx->pll even when there's no PLL, causing a crash at modeset on AM4 EVM, and presumably all OMAP2/3 boards. Fix this by having struct dpi_data pointer in the ctx instead, giving access to dispc without going through the pll. Fixes: 8a7eda768667 ("drm: omapdrm: dispc: Pass DISPC pointer to remaining dispc API functions") Signed-off-by: Tomi Valkeinen Reported-by: Keerthy Cc: Laurent Pinchart Tested-by: Keerthy Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20180405065537.29818-1-tomi.valkeinen@ti.com drivers/gpu/drm/omapdrm/dss/dpi.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 85ea29f19eab56ec16ec6b92bc67305998706afa Author: Mauro Carvalho Chehab Date: Wed Mar 28 13:59:22 2018 -0400 media: v4l2-compat-ioctl32: don't oops on overlay At put_v4l2_window32(), it tries to access kp->clips. However, kp points to an userspace pointer. So, it should be obtained via get_user(), otherwise it can OOPS: vivid-000: ================== END STATUS ================== BUG: unable to handle kernel paging request at 00000000fffb18e0 IP: [] __put_v4l2_format32+0x169/0x220 [videodev] PGD 3f5776067 PUD 3f576f067 PMD 3f5769067 PTE 800000042548f067 Oops: 0001 [#1] SMP Modules linked in: vivid videobuf2_vmalloc videobuf2_memops v4l2_dv_timings videobuf2_core v4l2_common videodev media xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack tun bridge stp llc ebtable_filter ebtables ip6table_filter ip6_tables bluetooth rfkill binfmt_misc snd_hda_codec_hdmi i915 snd_hda_intel snd_hda_controller snd_hda_codec intel_rapl x86_pkg_temp_thermal snd_hwdep intel_powerclamp snd_pcm coretemp snd_seq_midi kvm_intel kvm snd_seq_midi_event snd_rawmidi i2c_algo_bit drm_kms_helper snd_seq drm crct10dif_pclmul e1000e snd_seq_device crc32_pclmul snd_timer ghash_clmulni_intel snd mei_me mei ptp pps_core soundcore lpc_ich video crc32c_intel [last unloaded: media] CPU: 2 PID: 28332 Comm: v4l2-compliance Not tainted 3.18.102+ #107 Hardware name: /NUC5i7RYB, BIOS RYBDWi35.86A.0364.2017.0511.0949 05/11/2017 task: ffff8804293f8000 ti: ffff8803f5640000 task.ti: ffff8803f5640000 RIP: 0010:[] [] __put_v4l2_format32+0x169/0x220 [videodev] RSP: 0018:ffff8803f5643e28 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000fffb1ab4 RDX: 00000000fffb1a68 RSI: 00000000fffb18d8 RDI: 00000000fffb1aa8 RBP: ffff8803f5643e48 R08: 0000000000000001 R09: ffff8803f54b0378 R10: 0000000000000000 R11: 0000000000000168 R12: 00000000fffb18c0 R13: 00000000fffb1a94 R14: 00000000fffb18c8 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff880456d00000(0063) knlGS:00000000f7100980 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 00000000fffb18e0 CR3: 00000003f552b000 CR4: 00000000003407e0 Stack: 00000000fffb1a94 00000000c0cc5640 0000000000000056 ffff8804274f3600 ffff8803f5643ed0 ffffffffc0547e16 0000000000000003 ffff8803f5643eb0 ffffffff81301460 ffff88009db44b01 ffff880441942520 ffff8800c0d05640 Call Trace: [] v4l2_compat_ioctl32+0x12d6/0x1b1d [videodev] [] ? file_has_perm+0x70/0xc0 [] compat_SyS_ioctl+0xec/0x1200 [] sysenter_dispatch+0x7/0x21 Code: 00 00 48 8b 80 48 c0 ff ff 48 83 e8 38 49 39 c6 0f 87 2b ff ff ff 49 8d 45 1c e8 a3 ce e3 c0 85 c0 0f 85 1a ff ff ff 41 8d 40 ff <4d> 8b 64 24 20 41 89 d5 48 8d 44 40 03 4d 8d 34 c4 eb 15 0f 1f RIP [] __put_v4l2_format32+0x169/0x220 [videodev] RSP CR2: 00000000fffb18e0 Tested with vivid driver on Kernel v3.18.102. Same bug happens upstream too: BUG: KASAN: user-memory-access in __put_v4l2_format32+0x98/0x4d0 [videodev] Read of size 8 at addr 00000000ffe48400 by task v4l2-compliance/8713 CPU: 0 PID: 8713 Comm: v4l2-compliance Not tainted 4.16.0-rc4+ #108 Hardware name: /NUC5i7RYB, BIOS RYBDWi35.86A.0364.2017.0511.0949 05/11/2017 Call Trace: dump_stack+0x5c/0x7c kasan_report+0x164/0x380 ? __put_v4l2_format32+0x98/0x4d0 [videodev] __put_v4l2_format32+0x98/0x4d0 [videodev] v4l2_compat_ioctl32+0x1aec/0x27a0 [videodev] ? __fsnotify_inode_delete+0x20/0x20 ? __put_v4l2_format32+0x4d0/0x4d0 [videodev] compat_SyS_ioctl+0x646/0x14d0 ? do_ioctl+0x30/0x30 do_fast_syscall_32+0x191/0x3f4 entry_SYSENTER_compat+0x6b/0x7a ================================================================== Disabling lock debugging due to kernel taint BUG: unable to handle kernel paging request at 00000000ffe48400 IP: __put_v4l2_format32+0x98/0x4d0 [videodev] PGD 3a22fb067 P4D 3a22fb067 PUD 39b6f0067 PMD 39b6f1067 PTE 80000003256af067 Oops: 0001 [#1] SMP KASAN Modules linked in: vivid videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops v4l2_tpg v4l2_dv_timings videobuf2_v4l2 videobuf2_common v4l2_common videodev xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack libcrc32c tun bridge stp llc ebtable_filter ebtables ip6table_filter ip6_tables bluetooth rfkill ecdh_generic binfmt_misc snd_hda_codec_hdmi intel_rapl x86_pkg_temp_thermal intel_powerclamp i915 coretemp snd_hda_intel snd_hda_codec kvm_intel snd_hwdep snd_hda_core kvm snd_pcm irqbypass crct10dif_pclmul crc32_pclmul snd_seq_midi ghash_clmulni_intel snd_seq_midi_event i2c_algo_bit intel_cstate snd_rawmidi intel_uncore snd_seq drm_kms_helper e1000e snd_seq_device snd_timer intel_rapl_perf drm ptp snd mei_me mei lpc_ich pps_core soundcore video crc32c_intel CPU: 0 PID: 8713 Comm: v4l2-compliance Tainted: G B 4.16.0-rc4+ #108 Hardware name: /NUC5i7RYB, BIOS RYBDWi35.86A.0364.2017.0511.0949 05/11/2017 RIP: 0010:__put_v4l2_format32+0x98/0x4d0 [videodev] RSP: 0018:ffff8803b9be7d30 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff8803ac983e80 RCX: ffffffff8cd929f2 RDX: 1ffffffff1d0a149 RSI: 0000000000000297 RDI: 0000000000000297 RBP: 00000000ffe485c0 R08: fffffbfff1cf5123 R09: ffffffff8e7a8948 R10: 0000000000000001 R11: fffffbfff1cf5122 R12: 00000000ffe483e0 R13: 00000000ffe485c4 R14: ffff8803ac985918 R15: 00000000ffe483e8 FS: 0000000000000000(0000) GS:ffff880407400000(0063) knlGS:00000000f7a46980 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 00000000ffe48400 CR3: 00000003a83f2003 CR4: 00000000003606f0 Call Trace: v4l2_compat_ioctl32+0x1aec/0x27a0 [videodev] ? __fsnotify_inode_delete+0x20/0x20 ? __put_v4l2_format32+0x4d0/0x4d0 [videodev] compat_SyS_ioctl+0x646/0x14d0 ? do_ioctl+0x30/0x30 do_fast_syscall_32+0x191/0x3f4 entry_SYSENTER_compat+0x6b/0x7a Code: 4c 89 f7 4d 8d 7c 24 08 e8 e6 a4 69 cb 48 8b 83 98 1a 00 00 48 83 e8 10 49 39 c7 0f 87 9d 01 00 00 49 8d 7c 24 20 e8 c8 a4 69 cb <4d> 8b 74 24 20 4c 89 ef 4c 89 fe ba 10 00 00 00 e8 23 d9 08 cc RIP: __put_v4l2_format32+0x98/0x4d0 [videodev] RSP: ffff8803b9be7d30 CR2: 00000000ffe48400 cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Sakari Ailus Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2b8677ec0c6b08ad8e3c8aef0b0827994a305361 Author: Niklas Söderlund Date: Mon Mar 26 18:09:51 2018 -0400 media: i2c: adv748x: afe: fix sparse warning This fixes the following sparse warning: drivers/media/i2c/adv748x/adv748x-afe.c:294:34: expected unsigned int [usertype] *signal drivers/media/i2c/adv748x/adv748x-afe.c:294:34: got int * drivers/media/i2c/adv748x/adv748x-afe.c:294:34: warning: incorrect type in argument 2 (different signedness) Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv748x/adv748x-afe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 518d2f43c358da2072948f64df99b1bd417288dc Author: Tomer Maimon Date: Wed Apr 4 14:11:02 2018 +0300 arm: dts: modify Nuvoton NPCM7xx device tree structure Modify Nuvoton NPCM7xx device tree structure by adding nuvoton common nNPCM7xx device tree structure that include all common modules. Signed-off-by: Tomer Maimon Signed-off-by: Arnd Bergmann arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 187 ++++++++++++++++++++++++++ arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 2 +- arch/arm/boot/dts/nuvoton-npcm750.dtsi | 179 +----------------------- 3 files changed, 190 insertions(+), 178 deletions(-) commit 82e9f1d1f87d23ae943f8508a720f482bc2de256 Author: Tomer Maimon Date: Wed Apr 4 14:11:01 2018 +0300 arm: dts: modify Makefile NPCM750 configuration name Signed-off-by: Tomer Maimon Signed-off-by: Arnd Bergmann arch/arm/boot/dts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 016c366f505f96dce2a4d0e1e9075fe6e0dfad3e Author: Tomer Maimon Date: Wed Apr 4 14:11:00 2018 +0300 arm: dts: modify clock binding in NPCM750 device tree Modify clock binding in a common device tree for all Nuvoton NPCM750 BMCs. Modify NPCM750 modules clock numbers accourding the new clock driver. Signed-off-by: Tomer Maimon Signed-off-by: Arnd Bergmann arch/arm/boot/dts/nuvoton-npcm750.dtsi | 58 ++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 14 deletions(-) commit 4828b20a0b89efba524eb34b3234d98683dbe108 Author: Tomer Maimon Date: Wed Apr 4 14:10:59 2018 +0300 arm: dts: modify timer register size in NPCM750 device tree Modify timer register size in a common device tree for all Nuvoton NPCM750 BMCs. Signed-off-by: Tomer Maimon Signed-off-by: Arnd Bergmann arch/arm/boot/dts/nuvoton-npcm750.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33a5365900e9cf914cd1d2bdde1457b79b3e9ed9 Author: Tomer Maimon Date: Wed Apr 4 14:10:58 2018 +0300 arm: dts: modify UART compatible name in NPCM750 device tree Modify UART compatible name in a common device tree for all Nuvoton NPCM750 BMCs. Signed-off-by: Tomer Maimon Signed-off-by: Arnd Bergmann arch/arm/boot/dts/nuvoton-npcm750.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1c4937eec91426014247b9ae8cb3f04935cd4865 Author: Tomer Maimon Date: Wed Apr 4 14:10:57 2018 +0300 arm: dts: add watchdog device to NPCM750 device tree Add watchdog device node to a common device tree for all Nuvoton NPCM750 BMCs and a board specific device tree for the NPCM750 (Poleg) evaluation board. Signed-off-by: Tomer Maimon Signed-off-by: Arnd Bergmann arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 4 ++++ arch/arm/boot/dts/nuvoton-npcm750.dtsi | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit 04a2c2efbfefa492eb7e00187dc8848924230dca Merge: bc52497 f6adc9f Author: Arnd Bergmann Date: Thu Apr 5 11:09:02 2018 +0200 Merge tag 'davinci-for-v4.17/soc-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc Pull "DaVinci SoC update fixes for v4.17" from Sekhar Nori: A fix and a clean-up patch for content previously queued for v4.17. * tag 'davinci-for-v4.17/soc-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: da8xx: simplify CFGCHIP regmap_config ARM: davinci: da8xx: fix oops in USB PHY driver due to stack allocated platform_data commit bc52497a595d2246923749177d99e4216703b0f4 Author: Jisheng Zhang Date: Fri Mar 30 11:02:11 2018 +0800 MAINTAINERS: update entry for ARM/berlin Synaptics has acquired the Multimedia Solutions Business of Marvell[1]. So change the berlin entry name and move it to its alphabetical location. We move to ARM/Synaptics instead of ARM/Marvell. This patch also updates my email address from marvell to synaptics. [1] https://www.synaptics.com/company/news/conexant-marvell Signed-off-by: Jisheng Zhang Reviewed-by: Andrew Lunn Signed-off-by: Arnd Bergmann MAINTAINERS | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 03de3727b25059d9802d1baac319ba40c035eade Author: Arnd Bergmann Date: Wed Apr 4 12:25:36 2018 +0200 ARM: omap2: fix am43xx build without L2X0 When CONFIG_CACHE_L2X0 is disabled, the am43xx specific suspend implemnentation fails to link: arch/arm/mach-omap2/sleep43xx.o: In function `get_l2cache_base': (.text+0x180): undefined reference to `omap4_get_l2cache_base' This adds an #ifdef protection around the code, like we do for am44xx. Fixes: 41d37e61372f ("ARM: OMAP2+: Introduce low-level suspend code for AM43XX") Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann arch/arm/mach-omap2/sleep43xx.S | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 317d359df95dd0cb7653d09b7fc513770590cf85 Author: Peter Zijlstra Date: Thu Apr 5 10:05:21 2018 +0200 sched/core: Force proper alignment of 'struct util_est' For some as yet not understood reason, Tony gets unaligned access traps on IA64 because of: struct util_est ue = READ_ONCE(p->se.avg.util_est); and: WRITE_ONCE(p->se.avg.util_est, ue); introduced by commit: d519329f72a6 ("sched/fair: Update util_est only on util_avg updates") Normally those two fields should end up on an 8-byte aligned location, but UP and RANDSTRUCT can mess that up so enforce the alignment explicitly. Also make the alignment on sched_avg unconditional, as it is really about data locality, not false-sharing. With or without this patch the layout for sched_avg on a ia64-defconfig build looks like: $ pahole -EC sched_avg ia64-defconfig/kernel/sched/core.o die__process_function: tag not supported (INVALID)! struct sched_avg { /* typedef u64 */ long long unsigned int last_update_time; /* 0 8 */ /* typedef u64 */ long long unsigned int load_sum; /* 8 8 */ /* typedef u64 */ long long unsigned int runnable_load_sum; /* 16 8 */ /* typedef u32 */ unsigned int util_sum; /* 24 4 */ /* typedef u32 */ unsigned int period_contrib; /* 28 4 */ long unsigned int load_avg; /* 32 8 */ long unsigned int runnable_load_avg; /* 40 8 */ long unsigned int util_avg; /* 48 8 */ struct util_est { unsigned int enqueued; /* 56 4 */ unsigned int ewma; /* 60 4 */ } util_est; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ /* size: 64, cachelines: 1, members: 9 */ }; Reported-and-Tested-by: Tony Luck Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Mel Gorman Cc: Norbert Manthey Cc: Patrick Bellasi Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Cc: Vincent Guittot Fixes: d519329f72a6 ("sched/fair: Update util_est only on util_avg updates") Link: http://lkml.kernel.org/r/20180405080521.GG4129@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar include/linux/sched.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9820e1c3376c641299624dd24646aed3167ad5b1 Author: Dmitry V. Levin Date: Thu Apr 5 07:32:10 2018 +0300 x86/uapi: Fix asm/bootparam.h userspace compilation errors Consistently use types provided by to fix the following asm/bootparam.h userspace compilation errors: /usr/include/asm/bootparam.h:140:2: error: unknown type name 'u16' u16 version; /usr/include/asm/bootparam.h:141:2: error: unknown type name 'u16' u16 compatible_version; /usr/include/asm/bootparam.h:142:2: error: unknown type name 'u16' u16 pm_timer_address; /usr/include/asm/bootparam.h:143:2: error: unknown type name 'u16' u16 num_cpus; /usr/include/asm/bootparam.h:144:2: error: unknown type name 'u64' u64 pci_mmconfig_base; /usr/include/asm/bootparam.h:145:2: error: unknown type name 'u32' u32 tsc_khz; /usr/include/asm/bootparam.h:146:2: error: unknown type name 'u32' u32 apic_khz; /usr/include/asm/bootparam.h:147:2: error: unknown type name 'u8' u8 standard_ioapic; /usr/include/asm/bootparam.h:148:2: error: unknown type name 'u8' u8 cpu_ids[255]; Signed-off-by: Dmitry V. Levin Acked-by: Jan Kiszka Cc: # v4.16 Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 4a362601baa6 ("x86/jailhouse: Add infrastructure for running in non-root cell") Link: http://lkml.kernel.org/r/20180405043210.GA13254@altlinux.org Signed-off-by: Ingo Molnar arch/x86/include/uapi/asm/bootparam.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit d1e7e602cd64cf61f87dbf30df07c24df9eb1d99 Author: Stephane Eranian Date: Wed Apr 4 23:29:51 2018 -0700 perf/x86/intel: Move regs->flags EXACT bit init This patch removes a redundant store on regs->flags introduced by commit: 71eb9ee9596d ("perf/x86/intel: Fix linear IP of PEBS real_ip on Haswell and later CPUs") We were clearing the PERF_EFLAGS_EXACT but it was overwritten by regs->flags = pebs->flags later on. The PERF_EFLAGS_EXACT is a software flag using bit 3 of regs->flags. X86 marks this bit as Reserved. To make sure this bit is zero before we do any IP processing, we clear it explicitly. Patch also removes the following assignment: regs->flags = pebs->flags | (regs->flags & PERF_EFLAGS_VM); Because there is no regs->flags to preserve anymore because set_linear_ip() is not called until later. Signed-off-by: Stephane Eranian Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vince Weaver Cc: kan.liang@intel.com Link: http://lkml.kernel.org/r/1522909791-32498-1-git-send-email-eranian@google.com [ Improve capitalization, punctuation and clarity of comments. ] Signed-off-by: Ingo Molnar arch/x86/events/intel/ds.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit adcc8da8859bee9548bb6d323b1e8de8a7252acd Author: Davidlohr Bueso Date: Wed Apr 4 09:15:39 2018 -0700 sched/core: Simplify helpers for rq clock update skip requests By renaming the functions we can get rid of the skip parameter and have better code redability. It makes zero sense to have things such as: rq_clock_skip_update(rq, false) When the skip request is in fact not going to happen. Ever. Rename things such that we end up with: rq_clock_skip_update(rq) rq_clock_cancel_skipupdate(rq) Signed-off-by: Davidlohr Bueso Acked-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Cc: matt@codeblueprint.co.uk Cc: rostedt@goodmis.org Link: http://lkml.kernel.org/r/20180404161539.nhadkff2aats74jh@linux-n805 Signed-off-by: Ingo Molnar kernel/sched/core.c | 2 +- kernel/sched/deadline.c | 2 +- kernel/sched/fair.c | 2 +- kernel/sched/rt.c | 2 +- kernel/sched/sched.h | 17 ++++++++++++----- 5 files changed, 16 insertions(+), 9 deletions(-) commit d29a20645d5e929aa7e8616f28e5d8e1c49263ec Author: Davidlohr Bueso Date: Mon Apr 2 09:49:54 2018 -0700 sched/rt: Fix rq->clock_update_flags < RQCF_ACT_SKIP warning While running rt-tests' pi_stress program I got the following splat: rq->clock_update_flags < RQCF_ACT_SKIP WARNING: CPU: 27 PID: 0 at kernel/sched/sched.h:960 assert_clock_updated.isra.38.part.39+0x13/0x20 [...] enqueue_top_rt_rq+0xf4/0x150 ? cpufreq_dbs_governor_start+0x170/0x170 sched_rt_rq_enqueue+0x65/0x80 sched_rt_period_timer+0x156/0x360 ? sched_rt_rq_enqueue+0x80/0x80 __hrtimer_run_queues+0xfa/0x260 hrtimer_interrupt+0xcb/0x220 smp_apic_timer_interrupt+0x62/0x120 apic_timer_interrupt+0xf/0x20 [...] do_idle+0x183/0x1e0 cpu_startup_entry+0x5f/0x70 start_secondary+0x192/0x1d0 secondary_startup_64+0xa5/0xb0 We can get rid of it be the "traditional" means of adding an update_rq_clock() call after acquiring the rq->lock in do_sched_rt_period_timer(). The case for the RT task throttling (which this workload also hits) can be ignored in that the skip_update call is actually bogus and quite the contrary (the request bits are removed/reverted). By setting RQCF_UPDATED we really don't care if the skip is happening or not and will therefore make the assert_clock_updated() check happy. Signed-off-by: Davidlohr Bueso Reviewed-by: Matt Fleming Acked-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Thomas Gleixner Cc: dave@stgolabs.net Cc: linux-kernel@vger.kernel.org Cc: rostedt@goodmis.org Link: http://lkml.kernel.org/r/20180402164954.16255-1-dave@stgolabs.net Signed-off-by: Ingo Molnar kernel/sched/rt.c | 2 ++ 1 file changed, 2 insertions(+) commit ea2a6af517714c52a1209795a03e863e96b460bb Merge: 1b5d43cf 642e7fd Author: Ingo Molnar Date: Thu Apr 5 09:20:34 2018 +0200 Merge branch 'linus' into sched/urgent, to pick up fixes and updates Signed-off-by: Ingo Molnar commit c1b25a17d24925b0961c319cfc3fd7e1dc778914 Author: Nicholas Piggin Date: Thu Apr 5 16:10:00 2018 +1000 powerpc/64s/idle: Fix restore of AMOR on POWER9 after deep sleep POWER8 restores AMOR when waking from deep sleep, but POWER9 does not, because it does not go through the subcore restore. Have POWER9 restore it in core restore. Fixes: ee97b6b99f42 ("powerpc/mm/radix: Setup AMOR in HV mode to allow key 0") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 2 ++ 1 file changed, 2 insertions(+) commit 3a52f6014d367a6c8d91b1df8a658903345908e3 Author: Nicholas Piggin Date: Thu Apr 5 15:57:55 2018 +1000 powerpc/64s: Fix POWER9 DD2.2 and above in cputable features The CPU_FTR_POWER9_DD2_1 flag is intended to be set for DD2.1 and above (which is what the dt_cpu_ftrs setup does). Fix cputable for DD2.2 to match. This came about due to patches b5af4f279323 ("powerpc: Add CPU feature bits for TM bug workarounds on POWER9 v2.2"), and 9e9626ed3a4a ("powerpc/64s: Fix POWER9 DD2.2 and above in DT CPU features") being in-flight at once. The latter patch fixed dt_cpu_ftrs like this one does. The former changed cputable to match dt_cpu_ftrs. Fixes: b5af4f279323 ("powerpc: Add CPU feature bits for TM bug workarounds on POWER9 v2.2") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c130153e453cba0f37ad10fa18a1aa9c9a598a59 Author: Nicholas Piggin Date: Thu Apr 5 15:57:54 2018 +1000 powerpc/64s: Fix pkey support in dt_cpu_ftrs, add CPU_FTR_PKEY bit The pkey code added a CPU_FTR_PKEY bit, but did not add it to the dt_cpu_ftrs feature set. Although capability is supported by all processors in the base dt_cpu_ftrs set for 64s, it's a significant and sufficiently well defined feature to make it optional. So add it as a quirk for now, which can be versioned out then controlled by the firmware (once dt_cpu_ftrs gains versioning support). Fixes: cf43d3b26452 ("powerpc: Enable pkey subsystem") Cc: stable@vger.kernel.org # v4.16+ Cc: Ram Pai Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/dt_cpu_ftrs.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a57ac411832384eb93df4bfed2bf644c4089720e Author: Nicholas Piggin Date: Thu Apr 5 15:50:49 2018 +1000 powerpc/64s: Fix dt_cpu_ftrs to have restore_cpu clear unwanted LPCR bits Presently the dt_cpu_ftrs restore_cpu will only add bits to the LPCR for secondaries, but some bits must be removed (e.g., UPRT for HPT). Not clearing these bits on secondaries causes checkstops when booting with disable_radix. restore_cpu can not just set LPCR, because it is also called by the idle wakeup code which relies on opal_slw_set_reg to restore the value of LPCR, at least on P8 which does not save LPCR to stack in the idle code. Fix this by including a mask of bits to clear from LPCR as well, which is used by restore_cpu. This is a little messy now, but it's a minimal fix that can be backported. Longer term, the idle SPR save/restore code can be reworked to completely avoid calls to restore_cpu, then restore_cpu would be able to unconditionally set LPCR to match boot processor environment. Fixes: 5a61ef74f269f ("powerpc/64s: Support new device tree binding for discovering CPU features") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/dt_cpu_ftrs.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit a67cc594dffd29cfe33fbee40932c9d04197ab2f Author: Michael Ellerman Date: Thu Apr 5 16:03:39 2018 +1000 Revert "powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead" As described in that commit: When stop is executed with EC=ESL=0, it appears to execute like a normal instruction (resuming from NIP when woken by interrupt). So all the save/restore handling can be avoided completely. This is true, except in the case of an NMI interrupt (sreset or machine check) interrupting the instruction. In that case, the NMI gets an "interrupt occurred while the processor was in power-saving mode" indication. The power-save wakeup code uses that bit to decide whether to restore some registers (e.g., LR). Because these are no longer saved, this causes random register corruption. It may be possible to restore this optimisation by detecting the case of no register loss on the wakeup side, and avoid restoring in that case, but that's not a minor fix because the wakeup code itself uses some registers that would be live (e.g., LR). Fixes: b9ee31e100e7 ("powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 45 +++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 16 deletions(-) commit 07c3d9eaa4be3a000e2b9386cf678ee78f7f7abb Author: Logan Gunthorpe Date: Tue Mar 27 17:08:29 2018 -0600 powerpc: iomap.c: introduce io{read|write}64_{lo_hi|hi_lo} These functions will be introduced into the generic iomap.c so they can deal with PIO accesses in hi-lo/lo-hi variants. Thus, the powerpc version of iomap.c will need to provide the same functions even though, in this arch, they are identical to the regular io{read|write}64 functions. Signed-off-by: Logan Gunthorpe Tested-by: Horia Geantă Reviewed-by: Andy Shevchenko Signed-off-by: Michael Ellerman arch/powerpc/kernel/iomap.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit ef237039c5c86b6587ee1fd88857a24fa5978474 Author: Logan Gunthorpe Date: Tue Mar 27 17:08:28 2018 -0600 powerpc: io.h: move iomap.h include so that it can use readq/writeq defs Subsequent patches in this series makes use of the readq and writeq defines in iomap.h. However, as is, they get missed on the powerpc platform seeing the include comes before the define. This patch moves the include down to fix this. Signed-off-by: Logan Gunthorpe Reviewed-by: Andy Shevchenko Signed-off-by: Michael Ellerman arch/powerpc/include/asm/io.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 06dd3dfeea60e2a6457a6aedf97afc8e6d2ba497 Merge: 38047d5 86f690e Author: Linus Torvalds Date: Wed Apr 4 20:07:20 2018 -0700 Merge tag 'char-misc-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc updates from Greg KH: "Here is the big set of char/misc driver patches for 4.17-rc1. There are a lot of little things in here, nothing huge, but all important to the different hardware types involved: - thunderbolt driver updates - parport updates (people still care...) - nvmem driver updates - mei updates (as always) - hwtracing driver updates - hyperv driver updates - extcon driver updates - ... and a handful of even smaller driver subsystem and individual driver updates All of these have been in linux-next with no reported issues" * tag 'char-misc-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (149 commits) hwtracing: Add HW tracing support menu intel_th: Add ACPI glue layer intel_th: Allow forcing host mode through drvdata intel_th: Pick up irq number from resources intel_th: Don't touch switch routing in host mode intel_th: Use correct method of finding hub intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate stm class: Make dummy's master/channel ranges configurable stm class: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate MAINTAINERS: Bestow upon myself the care for drivers/hwtracing hv: add SPDX license id to Kconfig hv: add SPDX license to trace Drivers: hv: vmbus: do not mark HV_PCIE as perf_device Drivers: hv: vmbus: respect what we get from hv_get_synint_state() /dev/mem: Avoid overwriting "err" in read_mem() eeprom: at24: use SPDX identifier instead of GPL boiler-plate eeprom: at24: simplify the i2c functionality checking eeprom: at24: fix a line break eeprom: at24: tweak newlines eeprom: at24: refactor at24_probe() ... commit 38047d5c269bbdedf900fc86954913f3dffa01f1 Merge: df34df4 1fe56e0 Author: Linus Torvalds Date: Wed Apr 4 19:41:45 2018 -0700 Merge tag 'driver-core-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the "big" set of driver core patches for 4.17-rc1. There's really not much here, just a bunch of firmware code refactoring from Luis as he attempts to wrangle that codebase into something that is managable, along with a bunch of userspace tests for it. Other than that, a handful of small bugfixes and reverts of things that didn't work out. Full details are in the shortlog, it's not all that much. All of these have been in linux-next for a while with no reported issues" * tag 'driver-core-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (30 commits) drivers: base: remove check for callback in coredump_store() mt7601u: use firmware_request_cache() to address cache on reboot firmware: add firmware_request_cache() to help with cache on reboot firmware: fix typo on pr_info_once() when ignore_sysfs_fallback is used firmware: explicitly include vmalloc.h firmware: ensure the firmware cache is not used on incompatible calls test_firmware: modify custom fallback tests to use unique files firmware: add helper to check to see if fw cache is setup firmware: fix checking for return values for fw_add_devm_name() rename: _request_firmware_load() fw_load_sysfs_fallback() test_firmware: test three firmware kernel configs using a proc knob test_firmware: expand on library with shared helpers firmware: enable to force disable the fallback mechanism at run time firmware: enable run time change of forcing fallback loader firmware: move firmware loader into its own directory firmware: split firmware fallback functionality into its own file firmware: move loading timeout under struct firmware_fallback_config firmware: use helpers for setting up a temporary cache timeout firmware: simplify CONFIG_FW_LOADER_USER_HELPER_FALLBACK further drivers: base: add description for .coredump() callback ... commit df34df483a97b1591a3e90a6941f99fe9f863508 Merge: 9abf8ac 049b5e2 Author: Linus Torvalds Date: Wed Apr 4 18:56:27 2018 -0700 Merge tag 'staging-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO updates from Greg KH: "Here is the big set of Staging/IIO driver patches for 4.17-rc1. It is a lot, over 500 changes, but not huge by previous kernel release standards. We deleted more lines than we added again (27k added vs. 91k remvoed), thanks to finally being able to delete the IRDA drivers and networking code. We also deleted the ccree crypto driver, but that's coming back in through the crypto tree to you, in a much cleaned-up form. Added this round is at lot of "mt7621" device support, which is for an embedded device that Neil Brown cares about, and of course a handful of new IIO drivers as well. And finally, the fsl-mc core code moved out of the staging tree to the "real" part of the kernel, which is nice to see happen as well. Full details are in the shortlog, which has all of the tiny cleanup patches described. All of these have been in linux-next for a while with no reported issues" * tag 'staging-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (579 commits) staging: rtl8723bs: Remove yield call, replace with cond_resched() staging: rtl8723bs: Replace yield() call with cond_resched() staging: rtl8723bs: Remove unecessary newlines from 'odm.h'. staging: rtl8723bs: Rework 'struct _ODM_Phy_Status_Info_' coding style. staging: rtl8723bs: Rework 'struct _ODM_Per_Pkt_Info_' coding style. staging: rtl8723bs: Replace NULL pointer comparison with '!'. staging: rtl8723bs: Factor out rtl8723bs_recv_tasklet() sections. staging: rtl8723bs: Fix function signature that goes over 80 characters. staging: rtl8723bs: Fix lines too long in update_recvframe_attrib(). staging: rtl8723bs: Remove unnecessary blank lines in 'rtl8723bs_recv.c'. staging: rtl8723bs: Change camel case to snake case in 'rtl8723bs_recv.c'. staging: rtl8723bs: Add missing braces in else statement. staging: rtl8723bs: Add spaces around ternary operators. staging: rtl8723bs: Fix lines with trailing open parentheses. staging: rtl8723bs: Remove unnecessary length #define's. staging: rtl8723bs: Fix IEEE80211 authentication algorithm constants. staging: rtl8723bs: Fix alignment in rtw_wx_set_auth(). staging: rtl8723bs: Remove braces from single statement conditionals. staging: rtl8723bs: Remove unecessary braces from switch statement. staging: rtl8723bs: Fix newlines in rtw_wx_set_auth(). ... commit 9abf8acea297b4c65f5fa3206e2b8e468e730e84 Merge: ac9053d 4f79409 Author: Linus Torvalds Date: Wed Apr 4 18:43:49 2018 -0700 Merge tag 'tty-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver updates from Greg KH: "Here is the big set of tty and serial driver patches for 4.17-rc1 Not all that big really, most are just small fixes and additions to existing drivers. There's a bunch of work on the imx serial driver recently for some reason, and a new embedded serial driver added as well. Full details are in the shortlog. All of these have been in the linux-next tree for a while with no reported issues" * tag 'tty-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (66 commits) serial: expose buf_overrun count through proc interface serial: mvebu-uart: fix tx lost characters tty: serial: msm_geni_serial: Fix return value check in qcom_geni_serial_probe() tty: serial: msm_geni_serial: Add serial driver support for GENI based QUP 8250-men-mcb: add support for 16z025 and 16z057 powerpc: Mark the variable earlycon_acpi_spcr_enable maybe_unused serial: stm32: fix initialization of RS485 mode ARM: dts: STi: Remove "console=ttyASN" from bootargs for STi boards vt: change SGR 21 to follow the standards serdev: Fix typo in serdev_device_alloc ARM: dts: STi: Fix aliases property name for STi boards tty: st-asc: Update tty alias serial: stm32: add support for RS485 hardware control mode dt-bindings: serial: stm32: add RS485 optional properties selftests: add devpts selftests devpts: comment devpts_mntget() devpts: resolve devpts bind-mounts devpts: hoist out check for DEVPTS_SUPER_MAGIC serial: 8250: Add Nuvoton NPCM UART serial: mxs-auart: disable clks of Alphascale ASM9260 ... commit ac9053d2dcb9e8c3fa35ce458dfca8fddc141680 Merge: f9ca6a5 5267c5e Author: Linus Torvalds Date: Wed Apr 4 17:55:35 2018 -0700 Merge tag 'usb-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY updates from Greg KH: "Here is the big set of USB and PHY driver patches for 4.17-rc1. Lots of USB typeC work happened this round, with code moving from the staging directory into the "real" part of the kernel, as well as new infrastructure being added to be able to handle the different types of "roles" that typeC requires. There is also the normal huge set of USB gadget controller and driver updates, along with XHCI changes, and a raft of other tiny fixes all over the USB tree. And the PHY driver updates are merged in here as well as they interacted with the USB drivers in some places. All of these have been in linux-next for a while with no reported issues" * tag 'usb-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (250 commits) Revert "USB: serial: ftdi_sio: add Id for Physik Instrumente E-870" usb: musb: gadget: misplaced out of bounds check usb: chipidea: imx: Fix ULPI on imx53 usb: chipidea: imx: Cleanup ci_hdrc_imx_platform_flag usb: chipidea: usbmisc: small clean up usb: chipidea: usbmisc: evdo can be set e/o reset usb: chipidea: usbmisc: evdo is only specific to OTG port USB: serial: ftdi_sio: add Id for Physik Instrumente E-870 usb: dwc3: gadget: never call ->complete() from ->ep_queue() usb: gadget: udc: core: update usb_ep_queue() documentation usb: host: Remove the deprecated ATH79 USB host config options usb: roles: Fix return value check in intel_xhci_usb_probe() USB: gadget: f_midi: fixing a possible double-free in f_midi usb: core: Add USB_QUIRK_DELAY_CTRL_MSG to usbcore quirks usb: core: Copy parameter string correctly and remove superfluous null check USB: announce bcdDevice as well as idVendor, idProduct. USB:fix USB3 devices behind USB3 hubs not resuming at hibernate thaw usb: hub: Reduce warning to notice on power loss USB: serial: ftdi_sio: add support for Harman FirmwareHubEmulator USB: serial: cp210x: add ELDAT Easywave RX09 id ... commit f9ca6a561d40115696a54f16085c4edb17effc74 Merge: 9eb3122 87248d3 Author: Linus Torvalds Date: Wed Apr 4 17:42:38 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "This fixes some fallout from the net-next merge the other day, plus some non-merge-window-related bug fixes: 1) Fix sparse warnings in bcmgenet, systemport, b53, and mt7530 (Florian Fainelli) 2) pptp does a bogus dst_release() on a route we have a single refcount on, and attached to a socket, which needs that refcount (Eric Dumazet) 3) UDP connected sockets on ipv6 can race with route update handling, resulting in a pre-PMTU update route still stuck on the socket and thus continuing to get ICMPV6_PKT_TOOBIG errors. We end up never seeing the updated route. (Alexey Kodanev) 4) Missing list initializer(s) in TIPC (Jon Maloy) 5) Connect phy early to prevent crashes in lan78xx driver (Alexander Graf) 6) Fix build with modular NVMEM (Arnd Bergmann) 7) netdevsim canot mark nsim_devlink_net_ops and nsim_fib_net_ops as __net_initdata, as these are references from module unload unconditionally (Arnd Bergmann)" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (23 commits) netdevsim: remove incorrect __net_initdata annotations sfc: remove ctpio_dmabuf_start from stats inet: frags: fix ip6frag_low_thresh boundary tipc: Fix namespace violation in tipc_sk_fill_sock_diag net: avoid unneeded atomic operation in ip*_append_data() nvmem: disallow modular CONFIG_NVMEM net: hns3: fix length overflow when CONFIG_ARM64_64K_PAGES nfp: use full 40 bits of the NSP buffer address lan78xx: Connect phy early nfp: add a separate counter for packets with CHECKSUM_COMPLETE tipc: Fix missing list initializations in struct tipc_subscription ipv6: udp: set dst cache for a connected sk if current not valid ipv6: udp: convert 'connected' to bool type in udpv6_sendmsg() ipv6: allow to cache dst for a connected sk in ip6_sk_dst_lookup_flow() ipv6: add a wrapper for ip6_dst_store() with flowi6 checks net: phy: marvell10g: add thermal hwmon device pptp: remove a buggy dst release in pptp_connect() net: dsa: mt7530: Use NULL instead of plain integer net: dsa: b53: Fix sparse warnings in b53_mmap.c af_unix: remove redundant lockdep class ... commit 9eb31227cbccd3a37da0f42604f1ab5fc556bc53 Merge: 527cd20 f444ec1 Author: Linus Torvalds Date: Wed Apr 4 17:11:08 2018 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - add AEAD support to crypto engine - allow batch registration in simd Algorithms: - add CFB mode - add speck block cipher - add sm4 block cipher - new test case for crct10dif - improve scheduling latency on ARM - scatter/gather support to gcm in aesni - convert x86 crypto algorithms to skcihper Drivers: - hmac(sha224/sha256) support in inside-secure - aes gcm/ccm support in stm32 - stm32mp1 support in stm32 - ccree driver from staging tree - gcm support over QI in caam - add ks-sa hwrng driver" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (212 commits) crypto: ccree - remove unused enums crypto: ahash - Fix early termination in hash walk crypto: brcm - explicitly cast cipher to hash type crypto: talitos - don't leak pointers to authenc keys crypto: qat - don't leak pointers to authenc keys crypto: picoxcell - don't leak pointers to authenc keys crypto: ixp4xx - don't leak pointers to authenc keys crypto: chelsio - don't leak pointers to authenc keys crypto: caam/qi - don't leak pointers to authenc keys crypto: caam - don't leak pointers to authenc keys crypto: lrw - Free rctx->ext with kzfree crypto: talitos - fix IPsec cipher in length crypto: Deduplicate le32_to_cpu_array() and cpu_to_le32_array() crypto: doc - clarify hash callbacks state machine crypto: api - Keep failed instances alive crypto: api - Make crypto_alg_lookup static crypto: api - Remove unused crypto_type lookup function crypto: chelsio - Remove declaration of static function from header crypto: inside-secure - hmac(sha224) support crypto: inside-secure - hmac(sha256) support .. commit 527cd20771888443b5d8707debe98f62c7a1f596 Merge: 23221d9 f6a11d9 Author: Linus Torvalds Date: Wed Apr 4 16:43:47 2018 -0700 Merge tag 'riscv-for-linus-4.17-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux Pull RISC-V updates from Palmer Dabbelt: "This contains the new features we'd like to incorporate into the RISC-V port for 4.17. We might have a bit more stuff land later in the merge window, but I wanted to get this out earlier just so everyone can see where we currently stand. A short summary of the changes is: - We've added support for dynamic ftrace on RISC-V targets. - There have been a handful of cleanups to our atomic and locking routines. They now more closely match the released RISC-V memory model draft. - Our module loading support has been cleaned up and is now enabled by default, despite some limitations still existing. - A patch to define COMMANDLINE_FORCE instead of COMMANDLINE_OVERRIDE so the generic device tree code picks up handling all our command line stuff. There's more information in the merge commits for each patch set" * tag 'riscv-for-linus-4.17-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux: (21 commits) RISC-V: Rename CONFIG_CMDLINE_OVERRIDE to CONFIG_CMDLINE_FORCE RISC-V: Add definition of relocation types RISC-V: Enable module support in defconfig RISC-V: Support SUB32 relocation type in kernel module RISC-V: Support ADD32 relocation type in kernel module RISC-V: Support ALIGN relocation type in kernel module RISC-V: Support RVC_BRANCH/JUMP relocation type in kernel modulewq RISC-V: Support HI20/LO12_I/LO12_S relocation type in kernel module RISC-V: Support CALL relocation type in kernel module RISC-V: Support GOT_HI20/CALL_PLT relocation type in kernel module RISC-V: Add section of GOT.PLT for kernel module RISC-V: Add sections of PLT and GOT for kernel module riscv/atomic: Strengthen implementations with fences riscv/spinlock: Strengthen implementations with fences riscv/barrier: Define __smp_{store_release,load_acquire} riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support riscv/ftrace: Add DYNAMIC_FTRACE_WITH_REGS support riscv/ftrace: Add ARCH_SUPPORTS_FTRACE_OPS support riscv/ftrace: Add dynamic function graph tracer support riscv/ftrace: Add dynamic function tracer support ... commit 162ee5a8ab49be40d253f90e94aef712470a3a24 Author: Sai Praneeth Date: Wed Apr 4 12:34:19 2018 -0700 x86/mm: Fix bogus warning during EFI bootup, use boot_cpu_has() instead of this_cpu_has() in build_cr3_noflush() Linus reported the following boot warning: WARNING: CPU: 0 PID: 0 at arch/x86/include/asm/tlbflush.h:134 load_new_mm_cr3+0x114/0x170 [...] Call Trace: switch_mm_irqs_off+0x267/0x590 switch_mm+0xe/0x20 efi_switch_mm+0x3e/0x50 efi_enter_virtual_mode+0x43f/0x4da start_kernel+0x3bf/0x458 secondary_startup_64+0xa5/0xb0 ... after merging: 03781e40890c: x86/efi: Use efi_switch_mm() rather than manually twiddling with %cr3 When the platform supports PCID and if CONFIG_DEBUG_VM=y is enabled, build_cr3_noflush() (called via switch_mm()) does a sanity check to see if X86_FEATURE_PCID is set. Presently, build_cr3_noflush() uses "this_cpu_has(X86_FEATURE_PCID)" to perform the check but this_cpu_has() works only after SMP is initialized (i.e. per cpu cpu_info's should be populated) and this happens to be very late in the boot process (during rest_init()). As efi_runtime_services() are called during (early) kernel boot time and run time, modify build_cr3_noflush() to use boot_cpu_has() all the time. As suggested by Dave Hansen, this should be OK because all CPU's have same capabilities on x86. With this change the warning is fixed. ( Dave also suggested that we put a warning in this_cpu_has() if it's used early in the boot process. This is still work in progress as it affects MCE. ) Reported-by: Linus Torvalds Signed-off-by: Sai Praneeth Prakhya Cc: Andrew Morton Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Borislav Petkov Cc: Dave Hansen Cc: Lee Chun-Yi Cc: Matt Fleming Cc: Michael S. Tsirkin Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Ricardo Neri Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1522870459-7432-1-git-send-email-sai.praneeth.prakhya@intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbflush.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 664b0bae0b87f69bc9deb098f5e0158b9cf18e04 Merge: 567b9b5 04bb1719 Author: Dmitry Torokhov Date: Wed Apr 4 16:11:49 2018 -0700 Merge branch 'next' into for-linus Prepare input updates for 4.17 merge window. commit 04bb1719c4de94700056241d4c0fe3c1413f5aff Author: Ondrej Zary Date: Tue Apr 3 10:24:34 2018 -0700 Input: i8042 - enable MUX on Sony VAIO VGN-CS series to fix touchpad The touch sensor buttons on Sony VAIO VGN-CS series laptops (e.g. VGN-CS31S) are a separate PS/2 device. As the MUX is disabled for all VAIO machines by the nomux blacklist, the data from touch sensor buttons and touchpad are combined. The protocol used by the buttons is probably similar to the touchpad protocol (both are Synaptics) so both devices get enabled. The controller combines the data, creating a mess which results in random button clicks, touchpad stopping working and lost sync error messages: psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 4 psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1 psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1 psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1 psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1 psmouse serio1: issuing reconnect request Add a new i8042_dmi_forcemux_table whitelist with VGN-CS. With MUX enabled, touch sensor buttons are detected as separate device (and left disabled as there's currently no driver), fixing all touchpad problems. Signed-off-by: Ondrej Zary Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-x86ia64io.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 23221d997b3d28cb80c4d4d1b4bd36610f8e12fc Merge: 5b1f3dc 6589654 Author: Linus Torvalds Date: Wed Apr 4 16:01:43 2018 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: "Nothing particularly stands out here, probably because people were tied up with spectre/meltdown stuff last time around. Still, the main pieces are: - Rework of our CPU features framework so that we can whitelist CPUs that don't require kpti even in a heterogeneous system - Support for the IDC/DIC architecture extensions, which allow us to elide instruction and data cache maintenance when writing out instructions - Removal of the large memory model which resulted in suboptimal codegen by the compiler and increased the use of literal pools, which could potentially be used as ROP gadgets since they are mapped as executable - Rework of forced signal delivery so that the siginfo_t is well-formed and handling of show_unhandled_signals is consolidated and made consistent between different fault types - More siginfo cleanup based on the initial patches from Eric Biederman - Workaround for Cortex-A55 erratum #1024718 - Some small ACPI IORT updates and cleanups from Lorenzo Pieralisi - Misc cleanups and non-critical fixes" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (70 commits) arm64: uaccess: Fix omissions from usercopy whitelist arm64: fpsimd: Split cpu field out from struct fpsimd_state arm64: tlbflush: avoid writing RES0 bits arm64: cmpxchg: Include linux/compiler.h in asm/cmpxchg.h arm64: move percpu cmpxchg implementation from cmpxchg.h to percpu.h arm64: cmpxchg: Include build_bug.h instead of bug.h for BUILD_BUG arm64: lse: Include compiler_types.h and export.h for out-of-line LL/SC arm64: fpsimd: include in fpsimd.h drivers/perf: arm_pmu_platform: do not warn about affinity on uniprocessor perf: arm_spe: include linux/vmalloc.h for vmap() Revert "arm64: Revert L1_CACHE_SHIFT back to 6 (64-byte cache line size)" arm64: cpufeature: Avoid warnings due to unused symbols arm64: Add work around for Arm Cortex-A55 Erratum 1024718 arm64: Delay enabling hardware DBM feature arm64: Add MIDR encoding for Arm Cortex-A55 and Cortex-A35 arm64: capabilities: Handle shared entries arm64: capabilities: Add support for checks based on a list of MIDRs arm64: Add helpers for checking CPU MIDR against a range arm64: capabilities: Clean up midr range helpers arm64: capabilities: Change scope of VHE to Boot CPU feature ... commit 5b1f3dc927a2681cb339b05156f828f83bfa1b80 Merge: 680014d 83fbdf1 Author: Linus Torvalds Date: Wed Apr 4 15:19:26 2018 -0700 Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "The usual pile of boring changes: - Consolidate tasklet functions to share code instead of duplicating it - The first step for making the low level entry handler management on multi-platform kernels generic - A new sysfs file which allows to retrieve the wakeup state of interrupts. - Ensure that the interrupt thread follows the effective affinity and not the programmed affinity to avoid cross core wakeups. - Two new interrupt controller drivers (Microsemi Ocelot and Qualcomm PDC) - Fix the wakeup path clock handling for Reneasas interrupt chips. - Rework the boot time register reset for ARM GIC-V2/3 - Better suspend/resume support for ARM GIV-V3/ITS - Add missing locking to the ARM GIC set_type() callback - Small fixes for the irq simulator code - SPDX identifiers for the irq core code and removal of boiler plate - Small cleanups all over the place" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (37 commits) openrisc: Set CONFIG_MULTI_IRQ_HANDLER arm64: Set CONFIG_MULTI_IRQ_HANDLER genirq: Make GENERIC_IRQ_MULTI_HANDLER depend on !MULTI_IRQ_HANDLER irqchip/gic: Take lock when updating irq type irqchip/gic: Update supports_deactivate static key to modern api irqchip/gic-v3: Ensure GICR_CTLR.EnableLPI=0 is observed before enabling irqchip: Add a driver for the Microsemi Ocelot controller dt-bindings: interrupt-controller: Add binding for the Microsemi Ocelot interrupt controller irqchip/gic-v3: Probe for SCR_EL3 being clear before resetting AP0Rn irqchip/gic-v3: Don't try to reset AP0Rn irqchip/gic-v3: Do not check trigger configuration of partitionned LPIs genirq: Remove license boilerplate/references genirq: Add missing SPDX identifiers genirq/matrix: Cleanup SPDX identifier genirq: Cleanup top of file comments genirq: Pass desc to __irq_free instead of irq number irqchip/gic-v3: Loudly complain about the use of IRQ_TYPE_NONE irqchip/gic: Loudly complain about the use of IRQ_TYPE_NONE RISC-V: Move to the new GENERIC_IRQ_MULTI_HANDLER handler genirq: Add CONFIG_GENERIC_IRQ_MULTI_HANDLER ... commit 680014d6d1da84e9c7860831221ec74230721907 Merge: 0c21fd6 bd03143 Author: Linus Torvalds Date: Wed Apr 4 14:50:29 2018 -0700 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull time(r) updates from Thomas Gleixner: "A small set of updates for timers and timekeeping: - The most interesting change is the consolidation of clock MONOTONIC and clock BOOTTIME. Clock MONOTONIC behaves now exactly like clock BOOTTIME and does not longer ignore the time spent in suspend. A new clock MONOTONIC_ACTIVE is provived which behaves like clock MONOTONIC in kernels before this change. This allows applications to programmatically check for the clock MONOTONIC behaviour. As discussed in the review thread, this has the potential of breaking user space and we might have to revert this. Knock on wood that we can avoid that exercise. - Updates to the NTP mechanism to improve accuracy - A new kernel internal data structure to aid the ongoing Y2038 work. - Cleanups and simplifications of the clocksource code. - Make the alarmtimer code play nicely with debugobjects" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: alarmtimer: Init nanosleep alarm timer on stack y2038: Introduce struct __kernel_old_timeval tracing: Unify the "boot" and "mono" tracing clocks hrtimer: Unify MONOTONIC and BOOTTIME clock behavior posix-timers: Unify MONOTONIC and BOOTTIME clock behavior timekeeping: Remove boot time specific code Input: Evdev - unify MONOTONIC and BOOTTIME clock behavior timekeeping: Make the MONOTONIC clock behave like the BOOTTIME clock timekeeping: Add the new CLOCK_MONOTONIC_ACTIVE clock timekeeping/ntp: Determine the multiplier directly from NTP tick length timekeeping/ntp: Don't align NTP frequency adjustments to ticks clocksource: Use ATTRIBUTE_GROUPS clocksource: Use DEVICE_ATTR_RW/RO/WO to define device attributes clocksource: Don't walk the clocksource list for empty override commit b5094b7f135be34630e3ea8a98fa215715d0f29d Author: Richard Weinberger Date: Sat Mar 3 11:45:54 2018 +0100 ubi: Reject MLC NAND While UBI and UBIFS seem to work at first sight with MLC NAND, you will most likely lose all your data upon a power-cut or due to read/write disturb. In order to protect users from bad surprises, refuse to attach to MLC NAND. Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger Acked-by: Boris Brezillon Acked-by: Artem Bityutskiy drivers/mtd/ubi/build.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 4fb1cd82302e2aa87bb4876d67f3ed679f1f4a04 Author: Jiang Biao Date: Wed Feb 28 10:22:37 2018 +0800 ubifs: Remove useless parameter of lpt_heap_replace The parameter *old_lprops* is never used in lpt_heap_replace(), remove it to avoid compile warning. Signed-off-by: Jiang Biao Signed-off-by: Richard Weinberger fs/ubifs/lprops.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit cc1947834827379a5fd66e8b73969fd7eaab4516 Author: Jiang Biao Date: Wed Feb 28 10:13:57 2018 +0800 ubifs: Constify struct ubifs_lprops in scan_for_leb_for_idx Constify struct ubifs_lprops in scan_for_leb_for_idx to be consistent with other references. Signed-off-by: Jiang Biao Signed-off-by: Richard Weinberger fs/ubifs/find.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae4c8081eb77bc82ac5ac8a7d55abea6f98e0209 Author: Stefan Agner Date: Sun Feb 11 23:17:36 2018 +0100 ubifs: remove unnecessary assignment Assigning a value of a variable to itself is not useful. This fixes a warning shown when using clang: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] Signed-off-by: Stefan Agner Signed-off-by: Richard Weinberger fs/ubifs/scan.c | 1 - 1 file changed, 1 deletion(-) commit 78a8dfbabbece22bee58ac4cb26cab10e7a19c5d Author: Romain Izard Date: Mon Jan 29 11:18:20 2018 +0100 ubi: Fix error for write access When opening a device with write access, ubiblock_open returns an error code. Currently, this error code is -EPERM, but this is not the right value. The open function for other block devices returns -EROFS when opening read-only devices with FMODE_WRITE set. When used with dm-verity, the veritysetup userspace tool is expecting EROFS, and refuses to use the ubiblock device. Use -EROFS for ubiblock as well. As a result, veritysetup accepts the ubiblock device as valid. Cc: stable@vger.kernel.org Fixes: 9d54c8a33eec (UBI: R/O block driver on top of UBI volumes) Signed-off-by: Romain Izard Signed-off-by: Richard Weinberger drivers/mtd/ubi/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29b7a6fa1ec07e8480b0d9caf635a4498a438bf4 Author: Richard Weinberger Date: Wed Jan 17 23:15:57 2018 +0100 ubi: fastmap: Don't flush fastmap work on detach At this point UBI volumes have already been free()'ed and fastmap can no longer access these data structures. Reported-by: Martin Townsend Fixes: 74cdaf24004a ("UBI: Fastmap: Fix memory leaks while closing the WL sub-system") Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger drivers/mtd/ubi/fastmap-wl.c | 1 - 1 file changed, 1 deletion(-) commit aac17948a7ce01fb60b9ee6cf902967a47b3ce26 Author: Richard Weinberger Date: Wed Jan 17 19:12:42 2018 +0100 ubifs: Check ubifs_wbuf_sync() return code If ubifs_wbuf_sync() fails we must not write a master node with the dirty marker cleared. Otherwise it is possible that in case of an IO error while syncing we mark the filesystem as clean and UBIFS refuses to recover upon next mount. Cc: Fixes: 1e51764a3c2a ("UBIFS: add new flash file system") Signed-off-by: Richard Weinberger fs/ubifs/super.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 0c21fd6e659342d6b6bb4b4c9ddc0f1c38b5216e Merge: 3e968c9 5e747dd Author: Linus Torvalds Date: Wed Apr 4 14:31:53 2018 -0700 Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random Pull /dev/random updates from Ted Ts'o: "A few random (cough, cough) cleanups for the /dev/random driver" * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: drivers/char/random.c: remove unused dont_count_entropy random: optimize add_interrupt_randomness random: always fill buffer in get_random_bytes_wait random: use a tighter cap in credit_entropy_bits_safe() commit 3e968c9f1401088abc9a19ae6ff571644d37a355 Merge: a8f8e8a e40ff21 Author: Linus Torvalds Date: Wed Apr 4 14:19:24 2018 -0700 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "Cleanups and bugfixes for ext4, including some fixes to make ext4 more robust against maliciously crafted file system images. (I still don't recommend that container folks hold any delusions that mounting arbitary images that can be crafted by malicious attackers should be considered sane thing to do, though!)" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (29 commits) ext4: force revalidation of directory pointer after seekdir(2) ext4: add extra checks to ext4_xattr_block_get() ext4: add bounds checking to ext4_xattr_find_entry() ext4: move call to ext4_error() into ext4_xattr_check_block() ext4: don't show data= option if defaulted ext4: omit init_itable=n in procfs when disabled ext4: show more binary mount options in procfs ext4: simplify kobject usage ext4: remove unused parameters in sysfs code ext4: null out kobject* during sysfs cleanup ext4: don't allow r/w mounts if metadata blocks overlap the superblock ext4: always initialize the crc32c checksum driver ext4: fail ext4_iget for root directory if unallocated ext4: limit xattr size to INT_MAX ext4: add validity checks for bitmap block numbers ext4: fix comments in ext4_swap_extents() ext4: use generic_writepages instead of __writepage/write_cache_pages ext4: don't complain about incorrect features when probing ext4: remove EXT4_STATE_DIOREAD_LOCK flag ext4: fix offset overflow on 32-bit archs in ext4_iomap_begin() ... commit a8f8e8ac766ddb8702ef9baf01b7ae4f8d3a940c Merge: 2bd99df 07108d0 Author: Linus Torvalds Date: Wed Apr 4 14:09:27 2018 -0700 Merge tag '4.17-SMB3-Fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs updates from Steve French: "Includes SMB3.11 security improvements, as well as various fixes for stable and some debugging improvements" * tag '4.17-SMB3-Fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: Add minor debug message during negprot smb3: Fix root directory when server returns inode number of zero cifs: fix sparse warning on previous patch in a few printks cifs: add server->vals->header_preamble_size cifs: smbd: disconnect transport on RDMA errors cifs: smbd: avoid reconnect lockup Don't log confusing message on reconnect by default Don't log expected error on DFS referral request fs: cifs: Replace _free_xid call in cifs_root_iget function SMB3.1.1 dialect is no longer experimental Tree connect for SMB3.1.1 must be signed for non-encrypted shares fix smb3-encryption breakage when CONFIG_DEBUG_SG=y CIFS: fix sha512 check in cifs_crypto_secmech_release CIFS: implement v3.11 preauth integrity CIFS: add sha512 secmech CIFS: refactor crypto shash/sdesc allocation&free Update README file for cifs.ko Update TODO list for cifs.ko cifs: fix memory leak in SMB2_open() CIFS: SMBD: fix spelling mistake: "faield" and "legnth" commit fe5f31a8010a0cb13e72cfb72905fefa2a41730c Merge: a88b5f3 91ab883 Author: Boris Brezillon Date: Wed Apr 4 22:13:35 2018 +0200 Merge tag 'v4.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into mtd/next Backmerge v4.16-rc2 into mtd/next to resolve a conflict between Linus' master branch and nand/for-4.17. commit a88b5f38338db9cf2b8868e3645c30da655ac139 Merge: 7c0ed56 097ccca Author: Boris Brezillon Date: Wed Apr 4 22:11:36 2018 +0200 Merge tag 'nand/for-4.17' of git://git.infradead.org/linux-mtd into mtd/next Core changes: * Prepare arrival of the SPI NAND subsystem by implementing a generic (interface-agnostic) layer to ease manipulation of NAND devices * Move onenand code base to the drivers/mtd/nand/ dir * Rework timing mode selection * Provide a generic way for NAND chip drivers to flag a specific GET/SET FEATURE operation as supported/unsupported * Stop embedding ONFI/JEDEC param page in nand_chip Driver changes: * Rework/cleanup of the mxc driver * Various cleanups in the vf610 driver * Migrate the fsmc and vf610 to ->exec_op() * Get rid of the pxa driver (replaced by marvell_nand) * Support ->setup_data_interface() in the GPMI driver * Fix probe error path in several drivers * Remove support for unused hw_syndrome mode in sunxi_nand * Various minor improvements commit 7c0ed565d2a90ba45ea3f895cf625c0091451960 Merge: b756816 e8de85d Author: Boris Brezillon Date: Wed Apr 4 22:11:24 2018 +0200 Merge tag 'spi-nor/for-4.17' of git://git.infradead.org/linux-mtd into mtd/next * Make fsl-quaspi assign different names to MTD devices connected to the same QSPI controller * Remove an unneeded driver.bus assigned in the fsl-qspi driver commit 2bd99df54f43b659ddaab8922adbaf3bcf3753ed Merge: 94514bbe 5e86d9d Author: Linus Torvalds Date: Wed Apr 4 13:09:42 2018 -0700 Merge tag 'gfs2-4.17.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Bob Peterson: "We've only got nine GFS2 patches for this merge window: - report journal recovery times more accurately during journal replay (Abhi Das) - fix fallocate chunk size (Andreas Gruenbacher) - correctly dirty inodes during rename (Andreas Gruenbacher) - improve the comment for function gfs2_block_map (Andreas Gruenbacher) - improve kernel trace point iomap end: The physical block address was added (Andreas Gruenbacher) - fix a nasty file system corruption bug that surfaced in xfstests 476 in punch-hole/truncate (Andreas Gruenbacher) - fix a problem Christoph Helwig pointed out, namely, that GFS2 was misusing the IOMAP_ZERO flag. The zeroing of new blocks was moved to the proper fallocate code (Andreas Gruenbacher) - declare function gfs2_remove_from_ail as static (Bob Peterson) - only set PageChecked for jdata page writes (Bob Peterson)" * tag 'gfs2-4.17.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: time journal recovery steps accurately gfs2: Zero out fallocated blocks in fallocate_chunk gfs2: Check for the end of metadata in punch_hole gfs2: gfs2_iomap_end tracepoint: log block address gfs2: Improve gfs2_block_map comment GFS2: Only set PageChecked for jdata pages GFS2: Make function gfs2_remove_from_ail static gfs2: Dirty source inode during rename gfs2: Fix fallocate chunk size commit 94514bbe9e5c402c4232af158a295a8fdfd72a2c Merge: 547c43d 57599c7 Author: Linus Torvalds Date: Wed Apr 4 13:03:38 2018 -0700 Merge tag 'for-4.17-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "There are a several user visible changes, the rest is mostly invisible and continues to clean up the whole code base. User visible changes: - new mount option nossd_spread (pair for ssd_spread) - mount option subvolid will detect junk after the number and fail the mount - add message after cancelled device replace - direct module dependency on libcrc32, removed own crc wrappers - removed user space transaction ioctls - use lighter locking when reading /proc/self/mounts, RCU instead of mutex to avoid unnecessary contention Enhancements: - skip writeback of last page when truncating file to same size - send: do not issue unnecessary truncate operations - mount option token specifiers: use %u for unsigned values, more validation - selftests: more tree block validations qgroups: - preparatory work for splitting reservation types for data and metadata, this should allow for more accurate tracking and fix some issues with underflows or do further enhancements - split metadata reservations for started and joined transaction so they do not get mixed up and are accounted correctly at commit time - with the above, it's possible to revert patch that potentially deadlocks when trying to make more space by explicitly committing when the quota limit is hit - fix root item corruption when multiple same source snapshots are created with quota enabled RAID56: - make sure target is identical to source when raid56 rebuild fails after dev-replace - faster rebuild during scrub, batch by stripes and not block-by-block - make more use of cached data when rebuilding from a missing device Fixes: - null pointer deref when device replace target is missing - fix fsync after hole punching when using no-holes feature - fix lockdep splat when allocating percpu data with wrong GFP flags Cleanups, refactoring, core changes: - drop redunant parameters from various functions - kill and opencode trivial helpers - __cold/__exit function annotations - dead code removal - continued audit and documentation of memory barriers - error handling: handle removal from uuid tree - error handling: remove handling of impossible condtitons - more debugging or error messages - updated tracepoints - one VLA use removal (and one still left)" * tag 'for-4.17-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (164 commits) btrfs: lift errors from add_extent_changeset to the callers Btrfs: print error messages when failing to read trees btrfs: user proper type for btrfs_mask_flags flags btrfs: split dev-replace locking helpers for read and write btrfs: remove stale comments about fs_mutex btrfs: use RCU in btrfs_show_devname for device list traversal btrfs: update barrier in should_cow_block btrfs: use lockdep_assert_held for mutexes btrfs: use lockdep_assert_held for spinlocks btrfs: Validate child tree block's level and first key btrfs: tests/qgroup: Fix wrong tree backref level Btrfs: fix copy_items() return value when logging an inode Btrfs: fix fsync after hole punching when using no-holes feature btrfs: use helper to set ulist aux from a qgroup Revert "btrfs: qgroups: Retry after commit on getting EDQUOT" btrfs: qgroup: Update trace events for metadata reservation btrfs: qgroup: Use root::qgroup_meta_rsv_* to record qgroup meta reserved space btrfs: delayed-inode: Use new qgroup meta rsv for delayed inode and item btrfs: qgroup: Use separate meta reservation type for delalloc btrfs: qgroup: Introduce function to convert META_PREALLOC into META_PERTRANS ... commit 547c43d777968228b1060b6f1b152b96215eb7b2 Merge: 2e08edc dc1baa7 Author: Linus Torvalds Date: Wed Apr 4 12:44:02 2018 -0700 Merge tag 'xfs-4.17-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Darrick Wong: "Here's the first round of fixes for XFS for 4.17. The biggest new features this time around are the addition of lazytime support, further enhancement of the on-disk inode metadata verifiers, and a patch to smooth over some of the AGFL padding problems that have intermittently plagued users since 4.5. I forsee sending a second pull request next week with further bug fixes and speedups in the online scrub code and elsewhere. This series has been run through a full xfstests run over the weekend and through a quick xfstests run against this morning's master, with no major failures reported. Summary of changes for this release: - Various cleanups and code fixes - Implement lazytime as a mount option - Convert various on-disk metadata checks from asserts to -EFSCORRUPTED - Fix accounting problems with the rmap per-ag reservations - Refactorings and cleanups for xfs_log_force - Various bugfixes for the reflink code - Work around v5 AGFL padding problems to prevent fs shutdowns - Establish inode fork verifiers to inspect on-disk metadata correctness - Various online scrub fixes - Fix v5 swapext blowing up on deleted inodes" * tag 'xfs-4.17-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (49 commits) xfs: do not log/recover swapext extent owner changes for deleted inodes xfs: clean up xfs_mount allocation and dynamic initializers xfs: remove dead inode version setting code xfs: catch inode allocation state mismatch corruption xfs: xfs_scrub_iallocbt_xref_rmap_inodes should use xref_set_corrupt xfs: flag inode corruption if parent ptr doesn't get us a real inode xfs: don't accept inode buffers with suspicious unlinked chains xfs: move inode extent size hint validation to libxfs xfs: record inode buf errors as a xref error in inobt scrubber xfs: remove xfs_buf parameter from inode scrub methods xfs: inode scrubber shouldn't bother with raw checks xfs: bmap scrubber should do rmap xref with bmap for sparse files xfs: refactor inode buffer verifier error logging xfs: refactor inode verifier error logging xfs: refactor bmap record validation xfs: sanity-check the unused space before trying to use it xfs: detect agfl count corruption and reset agfl xfs: unwind the try_again loop in xfs_log_force xfs: refactor xfs_log_force_lsn xfs: minor cleanup for xfs_reflink_end_cow ... commit 2e08edc5c50a01dc52c005fd939c24476eaf55ef Merge: 17dec0a 04bbc97 Author: Linus Torvalds Date: Wed Apr 4 12:05:25 2018 -0700 Merge branch 'work.dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs dcache updates from Al Viro: "Part of this is what the trylock loop elimination series has turned into, part making d_move() preserve the parent (and thus the path) of victim, plus some general cleanups" * 'work.dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (22 commits) d_genocide: move export to definition fold dentry_lock_for_move() into its sole caller and clean it up make non-exchanging __d_move() copy ->d_parent rather than swap them oprofilefs: don't oops on allocation failure lustre: get rid of pointless casts to struct dentry * debugfs_lookup(): switch to lookup_one_len_unlocked() fold lookup_real() into __lookup_hash() take out orphan externs (empty_string/slash_string) split d_path() and friends into a separate file dcache.c: trim includes fs/dcache: Avoid a try_lock loop in shrink_dentry_list() get rid of trylock loop around dentry_kill() handle move to LRU in retain_dentry() dput(): consolidate the "do we need to retain it?" into an inlined helper split the slow part of lock_parent() off now lock_parent() can't run into killed dentry get rid of trylock loop in locking dentries on shrink list d_delete(): get rid of trylock loop fs/dcache: Move dentry_kill() below lock_parent() fs/dcache: Remove stale comment from dentry_kill() ... commit 0d676a6c439028b046610f7593f4ddb62680f1fb Author: Ard Biesheuvel Date: Tue Apr 3 21:11:49 2018 +0200 i2c: add support for Socionext SynQuacer I2C controller This is a cleaned up version of the I2C controller driver for the Fujitsu F_I2C IP, which was never supported upstream, and has now been incorporated into the Socionext SynQuacer SoC. Signed-off-by: Ard Biesheuvel Reviewed-by: Andy Shevchenko [wsa: updated MAINTAINERS entry and removed two empty lines] Signed-off-by: Wolfram Sang MAINTAINERS | 7 + drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-synquacer.c | 667 +++++++++++++++++++++++++++++++++++++ 4 files changed, 685 insertions(+) commit 7432acf315254aae540609d2370543b5488a317a Merge: d2f48c5 7450291 Author: Bjorn Helgaas Date: Wed Apr 4 13:28:57 2018 -0500 Merge branch 'lorenzo/pci/xilinx' * lorenzo/pci/xilinx: PCI: pcie-xilinx-nwl: Fix mask value to disable MSIs commit d2f48c5d7fd791104f3227d8e6b55fca892eb2ba Merge: 34fe07b 1736353 Author: Bjorn Helgaas Date: Wed Apr 4 13:28:56 2018 -0500 Merge branch 'lorenzo/pci/xgene' * lorenzo/pci/xgene: PCI: xgene: Fix the xgene_msi_probe() return code commit 34fe07b11dbf8d2a4d3676c8f7b1de7d1092bb9f Merge: df25d40 da76ba5 Author: Bjorn Helgaas Date: Wed Apr 4 13:28:54 2018 -0500 Merge branch 'lorenzo/pci/tegra' * lorenzo/pci/tegra: PCI: tegra: Add power management support PCI: tegra: Add loadable kernel module support PCI: tegra: Free resources on probe failure commit df25d407afa5e929449dc78f89588617d27d4983 Merge: 11ee090 2380ca5 Author: Bjorn Helgaas Date: Wed Apr 4 13:28:52 2018 -0500 Merge branch 'lorenzo/pci/rcar' * lorenzo/pci/rcar: dt-bindings: PCI: rcar: Add device tree support for r8a7743 PCI: rcar-gen2: Remove duplicated bit-wise or of RCAR_PCI_INT_SIGRETABORT commit 11ee09055207cb75a23862e2c983700f3c01f3af Merge: 84d4d6f af7b9b7 Author: Bjorn Helgaas Date: Wed Apr 4 13:28:51 2018 -0500 Merge branch 'lorenzo/pci/mediatek' * lorenzo/pci/mediatek: dt-bindings: PCI: MediaTek: fix dtc warnings commit 84d4d6f882175e02ab630fd444987e1e1b12e90a Merge: 74716ff 948373b Author: Bjorn Helgaas Date: Wed Apr 4 13:28:50 2018 -0500 Merge branch 'lorenzo/pci/hv' * lorenzo/pci/hv: PCI: hv: Only queue new work items in hv_pci_devices_present() if necessary PCI: hv: Remove the bogus test in hv_eject_device_work() PCI: hv: Fix a comment typo in _hv_pcifront_read_config() PCI: hv: Fix 2 hang issues in hv_compose_msi_msg() PCI: hv: Serialize the present and eject work items commit 74716ff7abb483111eb44104b05799226e69b4b3 Merge: 14d8d77 6c994c5 Author: Bjorn Helgaas Date: Wed Apr 4 13:28:48 2018 -0500 Merge branch '6c994c504fa2' - exclude af3c73473d10 ("PCI: Improve host drivers compile test coverage") from lorenzo/pci/host/misc to avoid build failure * commit '6c994c504fa2': PCI: v3-semi: Remove unnecessary semicolon PCI: rcar: Remove unnecessary semicolon PCI: faraday: Make struct faraday_pci_variant static PCI: kirin: Make struct kirin_pcie_driver static PCI: kirin: Fix missing dependency on PCI_MSI_IRQ_DOMAIN PCI: iproc: Remove dependency on ARM specific struct pci_sys_data PCI: kirin: Remove unnecessary asm/compiler.h include PCI: tegra: Add PCI_MSI_IRQ_DOMAIN kconfig dependency PCI: vmd: Fix malformed Kconfig default commit 14d8d776aeda8e367a9354b6cb6a0696671630c9 Merge: 1ad9a87 16b17ca Author: Bjorn Helgaas Date: Wed Apr 4 13:28:47 2018 -0500 Merge branch 'lorenzo/pci/endpoint' * lorenzo/pci/endpoint: misc: pci_endpoint_test: Handle 64-bit BARs properly PCI: designware-ep: Make dw_pcie_ep_reset_bar() handle 64-bit BARs properly PCI: endpoint: Make sure that BAR_5 does not have 64-bit flag set when clearing PCI: endpoint: Make epc->ops->clear_bar()/pci_epc_clear_bar() take struct *epf_bar PCI: endpoint: Handle 64-bit BARs properly PCI: cadence: Set PCI_BASE_ADDRESS_MEM_TYPE_64 if a 64-bit BAR was set-up PCI: designware-ep: Make dw_pcie_ep_set_bar() handle 64-bit BARs properly PCI: endpoint: Setting a BAR size > 4 GB is invalid if 64-bit flag is not set PCI: endpoint: Setting 64-bit/prefetch bit is invalid when IO is set PCI: endpoint: Setting BAR_5 to 64-bits wide is invalid PCI: endpoint: Simplify epc->ops->set_bar()/pci_epc_set_bar() PCI: endpoint: BAR width should not depend on sizeof dma_addr_t PCI: endpoint: Remove goto labels in pci_epf_create() PCI: endpoint: Fix kernel panic after put_device() PCI: endpoint: Simplify name allocation for EPF device commit 1ad9a8730e8fd15c6f2ed2230e38a61c3a61d438 Merge: f3c9109 1f319cb Author: Bjorn Helgaas Date: Wed Apr 4 13:28:45 2018 -0500 Merge branch 'lorenzo/pci/dwc-msi' * lorenzo/pci/dwc-msi: PCI: dwc: Expand maximum number of MSI IRQs from 32 to 256 PCI: dwc: Remove old MSI IRQs API PCI: dwc: Move MSI IRQs allocation to IRQ domains hierarchical API commit f3c91098a444c905b69a83a4947d9dbc774f986d Merge: 248c51d 58dfb24 Author: Bjorn Helgaas Date: Wed Apr 4 13:28:44 2018 -0500 Merge branch 'lorenzo/pci/dwc' * lorenzo/pci/dwc: PCI: histb: Add an optional regulator for PCIe port power control PCI: histb: Fix error path of histb_pcie_host_enable() PCI: qcom: Use regulator bulk api for apq8064 supplies PCI: qcom: Add missing supplies required for msm8996 PCI: designware-ep: Fix typo in error message commit 248c51d9a739478b3cfb24fd931187bf1f46fb71 Merge: c8afd5e db89ed1 Author: Bjorn Helgaas Date: Wed Apr 4 13:28:42 2018 -0500 Merge branch 'lorenzo/pci/altera' * lorenzo/pci/altera: PCI: altera: Fix bool initialization in tlp_read_packet() commit c8afd5ef001b85034c31025686d3b7419103d729 Merge: a4b8850 f9ea894 Author: Bjorn Helgaas Date: Wed Apr 4 13:28:40 2018 -0500 Merge branch 'pci/vpd' - consolidate VPD code in vpd.c (Bjorn Helgaas) * pci/vpd: PCI/VPD: Move VPD structures to vpd.c PCI/VPD: Move VPD quirks to vpd.c PCI/VPD: Move VPD sysfs code to vpd.c PCI/VPD: Move VPD access code to vpd.c commit a4b88505ac1f77cf4fa75fa6845fe95aa43aac9e Merge: 0eb6de7 619e6f3 Author: Bjorn Helgaas Date: Wed Apr 4 13:28:26 2018 -0500 Merge branch 'pci/virtualization' - probe for device reset support during enumeration instead of runtime (Bjorn Helgaas) - add ACS quirk for Ampere (née APM) root ports (Feng Kan) - add function 1 DMA alias quirk for Marvell 88SE9220 (Thomas Vincent-Cross) - protect device restore with device lock (Sinan Kaya) - handle failure of FLR gracefully (Sinan Kaya) - handle CRS (config retry status) after device resets (Sinan Kaya) - skip various config reads for SR-IOV VFs as an optimization (KarimAllah Ahmed) * pci/virtualization: PCI/IOV: Add missing prototypes for powerpc pcibios interfaces PCI/IOV: Use VF0 cached config registers for other VFs PCI/IOV: Skip BAR sizing for VFs PCI/IOV: Skip INTx config reads for VFs PCI: Wait for device to become ready after secondary bus reset PCI: Add a return type for pci_reset_bridge_secondary_bus() PCI: Wait for device to become ready after a power management reset PCI: Rename pci_flr_wait() to pci_dev_wait() and make it generic PCI: Handle FLR failure and allow other reset types PCI: Protect restore with device lock to be consistent PCI: Add function 1 DMA alias quirk for Marvell 88SE9220 PCI: Add ACS quirk for Ampere root ports PCI: Remove redundant probes for device reset support PCI: Probe for device reset support during enumeration Conflicts: include/linux/pci.h commit 0eb6de7872d9d7bfc9598912fe6332f72943f0aa Merge: 1e1b320 3758a19 Author: Bjorn Helgaas Date: Wed Apr 4 13:28:13 2018 -0500 Merge branch 'pci/sparc' - support arbitrary PCI host bridge offsets on sparc (Yinghai Lu) - remove System and Video ROM reservations on sparc (Bjorn Helgaas) * pci/sparc: sparc/PCI: Stop reserving System ROM and Video ROM in PCI space sparc/PCI: Support arbitrary host bridge address offset commit 1e1b3201ab18df5f7beafa68581bc82a504b1575 Merge: 64ae499 46e15a2 Author: Bjorn Helgaas Date: Wed Apr 4 13:28:11 2018 -0500 Merge branch 'pci/resource-mmap' - use generic pci_mmap_resource_range() instead of powerpc and xtensa arch-specific versions (David Woodhouse) * pci/resource-mmap: xtensa/PCI: Use generic pci_mmap_resource_range() powerpc/pci: Use generic pci_mmap_resource_range() commit 64ae499cf2eece26bc395184aa2c9a18aa49d199 Merge: ac30aa5 e02602bd Author: Bjorn Helgaas Date: Wed Apr 4 13:27:58 2018 -0500 Merge branch 'pci/portdrv' - move pcieport_if.h to drivers/pci/pcie/ to encapsulate it (Frederick Lawler) - merge pcieport_if.h into portdrv.h (Bjorn Helgaas) - move workaround for BIOS PME issue from portdrv to PCI core (Bjorn Helgaas) - completely disable portdrv with "pcie_ports=compat" (Bjorn Helgaas) - remove portdrv link order dependency (Bjorn Helgaas) - remove support for unused VC portdrv service (Bjorn Helgaas) - simplify portdrv feature permission checking (Bjorn Helgaas) - remove "pcie_hp=nomsi" parameter (use "pci=nomsi" instead) (Bjorn Helgaas) - remove unnecessary "pcie_ports=auto" parameter (Bjorn Helgaas) - use cached AER capability offset (Frederick Lawler) - don't enable DPC if BIOS hasn't granted AER control (Mika Westerberg) - rename pcie-dpc.c to dpc.c (Bjorn Helgaas) * pci/portdrv: PCI/DPC: Rename from pcie-dpc.c to dpc.c PCI/DPC: Do not enable DPC if AER control is not allowed by the BIOS PCI/AER: Use cached AER Capability offset PCI/portdrv: Rename and reverse sense of pcie_ports_auto PCI/portdrv: Encapsulate pcie_ports_auto inside the port driver PCI/portdrv: Remove unnecessary "pcie_ports=auto" parameter PCI/portdrv: Remove "pcie_hp=nomsi" kernel parameter PCI/portdrv: Remove unnecessary include of PCI/portdrv: Simplify PCIe feature permission checking PCI/portdrv: Remove unused PCIE_PORT_SERVICE_VC PCI/portdrv: Remove pcie_port_bus_type link order dependency PCI/portdrv: Disable port driver in compat mode PCI/PM: Clear PCIe PME Status bit for Root Complex Event Collectors PCI/PM: Clear PCIe PME Status bit in core, not PCIe port driver PCI/PM: Move pcie_clear_root_pme_status() to core PCI/portdrv: Merge pcieport_if.h into portdrv.h PCI/portdrv: Move pcieport_if.h to drivers/pci/pcie/ Conflicts: drivers/pci/pcie/Makefile drivers/pci/pcie/portdrv.h commit ac30aa596996a1e0bf1a8ff22bbdc24edaa24772 Merge: 43b90ea 5a1e0ba Author: Bjorn Helgaas Date: Wed Apr 4 13:27:46 2018 -0500 Merge branch 'pci/msi' - don't set up INTx if MSI or MSI-X is enabled to align cris, frv, ia64, and mn10300 with x86 (Bjorn Helgaas) * pci/msi: PCI/MSI: Don't set up INTx if MSI or MSI-X is enabled commit 43b90eaed57679731ae340a47cef49e59a321c2e Merge: 3da1b61 ad32eb2 Author: Bjorn Helgaas Date: Wed Apr 4 13:27:45 2018 -0500 Merge branch 'pci/misc' - use PCI_EXP_DEVCTL2_COMP_TIMEOUT in rapidio/tsi721 (Bjorn Helgaas) - remove possible NULL pointer dereference in of_pci_bus_find_domain_nr() (Shawn Lin) - report quirk timings with dev_info (Bjorn Helgaas) - report quirks that take longer than 10ms (Bjorn Helgaas) - add and use Altera Vendor ID (Johannes Thumshirn) - tidy Makefiles and comments (Bjorn Helgaas) * pci/misc: PCI: Always define the of_node helpers PCI: Tidy comments PCI: Tidy Makefiles mcb: Add Altera PCI ID to mcb-pci PCI: Add Altera vendor ID PCI: Report quirks that take more than 10ms PCI: Report quirk timings with pci_info() instead of pr_debug() PCI: Fix NULL pointer dereference in of_pci_bus_find_domain_nr() rapidio/tsi721: use PCI_EXP_DEVCTL2_COMP_TIMEOUT macro commit 3da1b6174ba3f573ee795cc25c4b8633749bd036 Merge: a5c6ad7 6183d9b Author: Bjorn Helgaas Date: Wed Apr 4 13:27:43 2018 -0500 Merge branch 'pci/lpc' - add support for PCI I/O port space that's neither directly accessible via CPU in/out instructions nor directly mapped into CPU physical memory space (Zhichang Yuan) - add support for HiSilicon Hip06/Hip07 LPC I/O space (Zhichang Yuan, John Garry) * pci/lpc: MAINTAINERS: Add John Garry as maintainer for HiSilicon LPC driver HISI LPC: Add ACPI support ACPI / scan: Do not enumerate Indirect IO host children ACPI / scan: Rename acpi_is_serial_bus_slave() for more general use HISI LPC: Support the LPC host on Hip06/Hip07 with DT bindings of: Add missing I/O range exception for indirect-IO devices PCI: Apply the new generic I/O management on PCI IO hosts PCI: Add fwnode handler as input param of pci_register_io_range() PCI: Remove __weak tag from pci_register_io_range() lib: Add generic PIO mapping method commit a5c6ad7840e1a37c2111612d96d99a5edb6e5502 Merge: 315271b 13d3047 Author: Bjorn Helgaas Date: Wed Apr 4 13:27:42 2018 -0500 Merge branch 'pci/hotplug' - fix possible cpqphp NULL pointer dereference (Shawn Lin) - rescan more of the hierarchy on ACPI hotplug to fix Thunderbolt/xHCI hotplug (Mika Westerberg) * pci/hotplug: ACPI / hotplug / PCI: Check presence of slot itself in get_slot_status() PCI: cpqphp: Fix possible NULL pointer dereference commit 315271b0ff1976e8c4a1c2620cef39047a003390 Merge: db7a726 170648f Author: Bjorn Helgaas Date: Wed Apr 4 13:27:40 2018 -0500 Merge branch 'pci/enumeration' - add decoding for 16 GT/s link speed (Jay Fang) - add interfaces to get max link speed and width (Tal Gilboa) - add pcie_bandwidth_capable() to compute max supported link bandwidth (Tal Gilboa) - add pcie_bandwidth_available() to compute bandwidth available to device (Tal Gilboa) - add pcie_print_link_status() to log link speed and whether it's limited (Tal Gilboa) - use PCI core interfaces to report when device performance may be limited by its slot instead of doing it in each driver (Tal Gilboa) * pci/enumeration: fm10k: Report PCIe link properties with pcie_print_link_status() net/mlx5e: Use pcie_bandwidth_available() to compute bandwidth net/mlx5: Report PCIe link properties with pcie_print_link_status() net/mlx4_core: Report PCIe link properties with pcie_print_link_status() PCI: Add pcie_print_link_status() to log link speed and whether it's limited PCI: Add pcie_bandwidth_available() to compute bandwidth available to device PCI: Add pcie_bandwidth_capable() to compute max supported link bandwidth PCI: Add pcie_get_width_cap() to find max supported link width PCI: Add pcie_get_speed_cap() to find max supported link speed PCI: Add decoding for 16 GT/s link speed commit db7a726ea8a26ae1e418f9e08845d64cbc079480 Merge: 09baca9 5cf0c37 Author: Bjorn Helgaas Date: Wed Apr 4 13:27:39 2018 -0500 Merge branch 'pci/deprecate-get-bus-and-slot' - remove last user of pci_get_bus_and_slot() and the function itself (Sinan Kaya) * pci/deprecate-get-bus-and-slot: PCI: Remove pci_get_bus_and_slot() function drm/i915: Deprecate pci_get_bus_and_slot() commit 09baca98411f4688be6e2deb312ffa2c42474b59 Merge: 63d5ce5 0487517 Author: Bjorn Helgaas Date: Wed Apr 4 13:27:37 2018 -0500 Merge branch 'pci/aspm' - skip ASPM common clock warning if BIOS already configured it (Sinan Kaya) - fix ASPM Coverity warning about threshold_ns (Gustavo A. R. Silva) * pci/aspm: PCI/ASPM: Don't warn if already in common clock mode PCI/ASPM: Declare threshold_ns as u32, not u64 commit 63d5ce5fc854293a4f479ff6992ef4efe76ac457 Merge: 7928b2c 3ecac02 Author: Bjorn Helgaas Date: Wed Apr 4 13:27:36 2018 -0500 Merge branch 'pci/aer' - move pci_uevent_ers() out of pci.h (Michael Ellerman) * pci/aer: PCI/AER: Move pci_uevent_ers() out of pci.h commit 730b35e08c5721dece9e624a33481d78cde221df Author: Ard Biesheuvel Date: Tue Apr 3 21:11:48 2018 +0200 dt-bindings: i2c: add binding for Socionext SynQuacer I2C Add a binding for the I2C controller that can be found in the Socionext SynQuacer SoC. Signed-off-by: Ard Biesheuvel Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang .../devicetree/bindings/i2c/i2c-synquacer.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 2d93fc856959bb940b3cf1e7cbad38721d6bea75 Author: Matan Barak Date: Wed Mar 28 09:27:55 2018 +0300 IB/mlx5: Add ability to hash by IPSEC_SPI when creating a TIR When a Raw Ethernet QP is created, we actually create a few objects. One of these objects is a TIR. Currently, a TIR could hash (and spread the traffic) by IP or port only. Adding a hashing by IPSec SPI to TIR creation with the required UAPI bit. Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 4 ++++ drivers/infiniband/hw/mlx5/qp.c | 16 ++++++++++++---- include/uapi/rdma/mlx5-abi.h | 1 + 3 files changed, 17 insertions(+), 4 deletions(-) commit c03faa562d0279e463900c92d4a54c0dc3c806b0 Author: Matan Barak Date: Wed Mar 28 09:27:54 2018 +0300 IB/mlx5: Add information for querying IPsec capabilities Users should be able to query for IPSec support. Adding a few capabilities bits as part of the driver specific part in alloc_ucontext: MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_REQ_METADATA Payload's header is returned with metadata representing the IPSec decryption state. MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_RX Support ESP_AES_GCM in ingress path. MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_TX Support ESP_AES_GCM in egress path. MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_SPI_RSS_ONLY Hardware doesn't support matching SPI in flow steering rules but just hashing and spreading the traffic accordingly. Signed-off-by: Aviad Yehezkel Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 12 ++++++++++++ include/uapi/rdma/mlx5-abi.h | 10 +++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) commit 802c2125689d1ceedd9671a8f728e85eacdac077 Author: Aviad Yehezkel Date: Wed Mar 28 09:27:53 2018 +0300 IB/mlx5: Add IPsec support for egress and ingress This commit introduces support for the esp_aes_gcm flow specification for the Innova device. To that end we add support for egress steering and some validations that an IPsec rule is indeed valid. Signed-off-by: Matan Barak Signed-off-by: Aviad Yehezkel Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 127 +++++++++++++++++++++++++++++++---- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 + 2 files changed, 117 insertions(+), 12 deletions(-) commit 363c5a570d4a386fa1bf8d3833de817d7c4fcda2 Author: Aviad Yehezkel Date: Wed Mar 28 09:27:52 2018 +0300 {net,IB}/mlx5: Add ipsec helper Simple wrapper to understand if we are dealing with IPsec flow. Signed-off-by: Aviad Yehezkel Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe include/linux/mlx5/fs_helpers.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 349705c1936269aa6e5f923a0bc663e1addf288e Author: Matan Barak Date: Wed Mar 28 09:27:51 2018 +0300 IB/mlx5: Add modify_flow_action_esp verb Adding implementation in mlx5 driver to modify action_xfrm object. This merely call the accel layer. Currently a user can modify only the ESN parameters. Reviewed-by: Yishai Hadas Signed-off-by: Matan Barak Signed-off-by: Aviad Yehezkel Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit c6475a0bca30fc2f9e5e4c48935f08973c2780ef Author: Aviad Yehezkel Date: Wed Mar 28 09:27:50 2018 +0300 IB/mlx5: Add implementation for create and destroy action_xfrm Adding implementation in mlx5 driver to create and destroy action_xfrm object. This merely call the accel layer. A user may pass MLX5_IB_XFRM_FLAGS_REQUIRE_METADATA flag which states that [s]he expects a metadata header to be added to the payload. This header represents information regarding the transformation's state. Reviewed-by: Yishai Hadas Signed-off-by: Matan Barak Signed-off-by: Aviad Yehezkel Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 133 +++++++++++++++++++++++++++++- drivers/infiniband/hw/mlx5/mlx5_ib.h | 16 ++++ include/uapi/rdma/mlx5_user_ioctl_cmds.h | 44 ++++++++++ include/uapi/rdma/mlx5_user_ioctl_verbs.h | 43 ++++++++++ 4 files changed, 235 insertions(+), 1 deletion(-) commit 56ab0b38b80e5771920e163cc9bd52504b03f539 Author: Matan Barak Date: Wed Mar 28 09:27:49 2018 +0300 IB/uverbs: Introduce ESP steering match filter Adding a new ESP steering match filter that could match against spi and seq used in IPSec protocol. Reviewed-by: Yishai Hadas Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs.h | 1 + drivers/infiniband/core/uverbs_cmd.c | 11 +++++++++++ include/rdma/ib_verbs.h | 16 ++++++++++++++++ include/uapi/rdma/ib_user_verbs.h | 18 ++++++++++++++++++ 4 files changed, 46 insertions(+) commit 7d12f8d5a1645275dd452138bf1fe478be736704 Author: Matan Barak Date: Wed Mar 28 09:27:48 2018 +0300 IB/uverbs: Add modify ESP flow_action flow_actions of ESP type could be modified during runtime. This could be common for example when ESN should be changed. Adding a new UVERBS_FLOW_ACTION_ESP_MODIFY method for changing ESP parameters of an existing ESP flow_action. The new method uses the UVERBS_FLOW_ACTION_ESP_CREATE attributes, but adds a new IB_FLOW_ACTION_ESP_FLAGS_MOD_ESP_ATTRS which means ESP_ATTRS should be changed. In addition, we add a new FLOW_ACTION_ESP_REPLAY_NONE replay type that could be used when one wants to disable a replay protection over a specific flow_action. Reviewed-by: Yishai Hadas Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe .../infiniband/core/uverbs_std_types_flow_action.c | 97 ++++++++++++++++++++-- include/rdma/ib_verbs.h | 4 + include/uapi/rdma/ib_user_ioctl_cmds.h | 1 + 3 files changed, 97 insertions(+), 5 deletions(-) commit 21e82d3e1dcf9ce61ae387ca1a507cf53665336a Author: Boris Pismenny Date: Wed Mar 28 09:27:47 2018 +0300 IB/uverbs: Introduce egress flow steering The egress flag indicates that this flow steering rule is for egress traffic. The scope of an egress rule is port-wide, meaning all packets originated from that port, which match the steering rule specification will be effected by this steering rule's action. Reviewed-by: Yishai Hadas Signed-off-by: Boris Pismenny Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe include/rdma/ib_verbs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9b828441976ef719f1008a9855fff95a45e474b8 Author: Matan Barak Date: Wed Mar 28 09:27:46 2018 +0300 IB/uverbs: Add action_handle flow steering specification Binding a flow_action to flow steering rule requires using a new specification. Therefore, adding such an IB_FLOW_SPEC_ACTION_HANDLE flow specification. Flow steering rules could use flow_action(s) and as of that we need to avoid deleting flow_action(s) as long as they're being used. Moreover, when the attached rules are deleted, action_handle reference count should be decremented. Introducing a new mechanism of flow resources to keep track on the attached action_handle(s). Later on, this mechanism should be extended to other attached flow steering resources like flow counters. Reviewed-by: Yishai Hadas Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs.h | 8 +++ drivers/infiniband/core/uverbs_cmd.c | 86 +++++++++++++++++++++++++++--- drivers/infiniband/core/uverbs_std_types.c | 14 ++++- include/rdma/ib_verbs.h | 8 +++ include/uapi/rdma/ib_user_verbs.h | 13 +++++ 5 files changed, 121 insertions(+), 8 deletions(-) commit 2eb9beaee5d73130d28c54e91eecb8a186581e08 Author: Matan Barak Date: Wed Mar 28 09:27:45 2018 +0300 IB/uverbs: Add flow_action create and destroy verbs A verbs application may receive and transmits packets using a data path pipeline. Sometimes, the first stage in the receive pipeline or the last stage in the transmit pipeline involves transforming a packet, either in order to make it easier for later stages to process it or to prepare it for transmission over the wire. Such transformation could be stripping/encapsulating the packet (i.e. vxlan), decrypting/encrypting it (i.e. ipsec), altering headers, doing some complex FPGA changes, etc. Some hardware could do such transformations without software data path intervention at all. The flow steering API supports steering a packet (either to a QP or dropping it) and some simple packet immutable actions (i.e. tagging a packet). Complex actions, that may change the packet, could bloat the flow steering API extensively. Sometimes the same action should be applied to several flows. In this case, it's easier to bind several flows to the same action and modify it than change all matching flows. Introducing a new flow_action object that abstracts any packet transformation (out of a standard and well defined set of actions). This flow_action object could be tied to a flow steering rule via a new specification. Currently, we support esp flow_action, which encrypts or decrypts a packet according to the given parameters. However, we present a flexible schema that could be used to other transformation actions tied to flow rules. Reviewed-by: Yishai Hadas Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/Makefile | 3 +- drivers/infiniband/core/uverbs.h | 4 + drivers/infiniband/core/uverbs_std_types.c | 10 +- .../infiniband/core/uverbs_std_types_flow_action.c | 348 +++++++++++++++++++++ include/rdma/ib_verbs.h | 65 ++++ include/uapi/rdma/ib_user_ioctl_cmds.h | 19 ++ include/uapi/rdma/ib_user_ioctl_verbs.h | 59 ++++ 7 files changed, 506 insertions(+), 2 deletions(-) commit 766d8551ada05326f0cafc5fc0bd32a666cebeed Author: Matan Barak Date: Wed Mar 28 09:27:44 2018 +0300 IB/uverbs: Refactor kern_spec_to_ib_spec_filter The current implementation of kern_spec_to_ib_spec_filter, which takes a uAPI based flow steering specification and creates the respective kernel API flow steering structure, gets a ib_uverbs_flow_spec structure. The new flow_action uAPI gets a match mask and filter from user-space which aren't encoded in the flow steering's ib_uverbs_flow_spec structure. Exporting the logic out of kern_spec_to_ib_spec_filter to get user-space blobs rather than ib_uverbs_flow_spec structure. Reviewed-by: Yishai Hadas Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs.h | 6 +++++ drivers/infiniband/core/uverbs_cmd.c | 47 ++++++++++++++++++++++++------------ 2 files changed, 37 insertions(+), 16 deletions(-) commit 8510020d2916b9f7d8e406aa2fb2d35fbe692f4d Author: Boris Pismenny Date: Wed Mar 28 09:27:43 2018 +0300 IB/mlx4: Check for egress flow steering ConnectX3 doesn't support egress flow steering. Return an EOPNOTSUPP error when such a flow is being created. Signed-off-by: Boris Pismenny Reviewed-by: Aviad Yehezkel Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx4/main.c | 3 +++ 1 file changed, 3 insertions(+) commit 494c5580aa6721874a6d9d62dac1c94e83e79302 Author: Matan Barak Date: Wed Mar 28 09:27:42 2018 +0300 IB/uverbs: Add enum attribute type to ioctl() interface Methods sometimes need to get one attribute out of a group of pre-defined attributes. This is an enum-like behavior. Since this is a common requirement, we add a new ENUM attribute to the generic uverbs ioctl() layer. This attribute is embedded in methods, like any other attributes we currently have. ENUM attributes point to an array of standard UVERBS_ATTR_PTR_IN. The user-space encodes the enum's attribute id in the id field and the internal PTR_IN attr id in the enum_data.elem_id field. This ENUM attribute could be shared by several attributes and it can get UVERBS_ATTR_SPEC_F_MANDATORY flag, stating this attribute must be supported by the kernel, like any other attribute. Reviewed-by: Yishai Hadas Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs_ioctl.c | 39 ++++++++++++++++++++++++-------- include/rdma/uverbs_ioctl.h | 34 ++++++++++++++++++++++++++++ include/uapi/rdma/rdma_user_ioctl_cmds.h | 8 ++++++- 3 files changed, 71 insertions(+), 10 deletions(-) commit 8c84660bb437fe8692e6a2b4e85023ccb874a520 Author: Matan Barak Date: Wed Mar 28 09:27:41 2018 +0300 IB/mlx5: Initialize the parsing tree root without the help of uverbs In order to have a custom parsing tree, a provider driver needs to assign its parsing tree to ib_device specs_tree field. Otherwise, the uverbs client assigns a common default parsing tree for it. In downstream patches, the mlx5_ib driver gains a custom parsing tree, which contains both the common objects and a new flags field for the UVERBS_FLOW_ACTION_ESP_CREATE command. This patch makes mlx5_ib assign its own tree to specs_root, which later on will be extended. Reviewed-by: Yishai Hadas Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 38 ++++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + 2 files changed, 39 insertions(+) commit 8e9ba5c48ea690060a814fbac6a8c046ab935d79 Author: Mike Marshall Date: Wed Apr 4 14:05:48 2018 -0400 Orangefs: documentation updates Signed-off-by: Mike Marshall Documentation/filesystems/orangefs.txt | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 6089ae0bd5e15fc150adce5bc694e87e00513825 Author: Paolo Bonzini Date: Wed Mar 28 09:45:34 2018 +0200 kvm: selftests: add sync_regs_test This includes the infrastructure to map the test into the guest and run code from the test program inside a VM. Signed-off-by: Ken Hofsass Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/Makefile | 3 +- tools/testing/selftests/kvm/include/kvm_util.h | 3 + tools/testing/selftests/kvm/lib/elf.c | 197 +++++++++++++++++++++ tools/testing/selftests/kvm/lib/io.c | 158 +++++++++++++++++ tools/testing/selftests/kvm/lib/x86.c | 3 + tools/testing/selftests/kvm/sync_regs_test.c | 232 +++++++++++++++++++++++++ 6 files changed, 595 insertions(+), 1 deletion(-) commit 783e9e51266ebb7f78c606a53cb0fa41bb7c31a0 Author: Paolo Bonzini Date: Tue Mar 27 11:49:19 2018 +0200 kvm: selftests: add API testing infrastructure Testsuite contributed by Google and cleaned up by myself for inclusion in Linux. Signed-off-by: Ken Hofsass Signed-off-by: Paolo Bonzini tools/testing/selftests/Makefile | 1 + tools/testing/selftests/kvm/Makefile | 38 + tools/testing/selftests/kvm/include/kvm_util.h | 139 ++ tools/testing/selftests/kvm/include/sparsebit.h | 75 + tools/testing/selftests/kvm/include/test_util.h | 45 + tools/testing/selftests/kvm/include/x86.h | 1043 ++++++++++ tools/testing/selftests/kvm/lib/assert.c | 87 + tools/testing/selftests/kvm/lib/kvm_util.c | 1480 ++++++++++++++ .../testing/selftests/kvm/lib/kvm_util_internal.h | 67 + tools/testing/selftests/kvm/lib/sparsebit.c | 2087 ++++++++++++++++++++ tools/testing/selftests/kvm/lib/x86.c | 697 +++++++ tools/testing/selftests/kvm/set_sregs_test.c | 54 + 12 files changed, 5813 insertions(+) commit 3140c156e919b0f5fad5c5f6cf7876c39d1d4f06 Author: Peng Hao Date: Mon Apr 2 09:15:32 2018 +0800 kvm: x86: fix a compile warning fix a "warning: no previous prototype". Cc: stable@vger.kernel.org Signed-off-by: Peng Hao Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c86eedc206dd1f9d37a2796faa8e6f2278215d2 Author: Wanpeng Li Date: Tue Apr 3 16:28:49 2018 -0700 KVM: X86: Add Force Emulation Prefix for "emulate the next instruction" There is no easy way to force KVM to run an instruction through the emulator (by design as that will expose the x86 emulator as a significant attack-surface). However, we do wish to expose the x86 emulator in case we are testing it (e.g. via kvm-unit-tests). Therefore, this patch adds a "force emulation prefix" that is designed to raise #UD which KVM will trap and it's #UD exit-handler will match "force emulation prefix" to run instruction after prefix by the x86 emulator. To not expose the x86 emulator by default, we add a module parameter that should be off by default. A simple testcase here: #include #include #define HYPERVISOR_INFO 0x40000000 #define CPUID(idx, eax, ebx, ecx, edx) \ asm volatile (\ "ud2a; .ascii \"kvm\"; cpuid" \ :"=b" (*ebx), "=a" (*eax), "=c" (*ecx), "=d" (*edx) \ :"0"(idx) ); void main() { unsigned int eax, ebx, ecx, edx; char string[13]; CPUID(HYPERVISOR_INFO, &eax, &ebx, &ecx, &edx); *(unsigned int *)(string + 0) = ebx; *(unsigned int *)(string + 4) = ecx; *(unsigned int *)(string + 8) = edx; string[12] = 0; if (strncmp(string, "KVMKVMKVM\0\0\0", 12) == 0) printf("kvm guest\n"); else printf("bare hardware\n"); } Suggested-by: Andrew Cooper Reviewed-by: Radim Krčmář Reviewed-by: Liran Alon Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Andrew Cooper Cc: Konrad Rzeszutek Wilk Cc: Liran Alon Signed-off-by: Wanpeng Li [Correctly handle usermode exits. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 082d06edab49f302eb96b7a9d029f52713156354 Author: Wanpeng Li Date: Tue Apr 3 16:28:48 2018 -0700 KVM: X86: Introduce handle_ud() Introduce handle_ud() to handle invalid opcode, this function will be used by later patches. Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Liran Alon Cc: Paolo Bonzini Cc: Radim KrÄmář Cc: Andrew Cooper Cc: Konrad Rzeszutek Wilk Cc: Liran Alon Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 9 +-------- arch/x86/kvm/vmx.c | 10 ++-------- arch/x86/kvm/x86.c | 13 +++++++++++++ arch/x86/kvm/x86.h | 2 ++ 4 files changed, 18 insertions(+), 16 deletions(-) commit 4fde8d57cfa8236818459adfc4f8bd7d353c153e Author: Paolo Bonzini Date: Wed Apr 4 18:58:59 2018 +0200 KVM: vmx: unify adjacent #ifdefs vmx_save_host_state has multiple ifdefs for CONFIG_X86_64 that have no other code between them. Simplify by reducing them to a single conditional. Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 51e8a8cc2f2d4295703f9c7ff66dead565dfea9a Author: Arnd Bergmann Date: Wed Apr 4 12:44:14 2018 +0200 x86: kvm: hide the unused 'cpu' variable The local variable was newly introduced but is only accessed in one place on x86_64, but not on 32-bit: arch/x86/kvm/vmx.c: In function 'vmx_save_host_state': arch/x86/kvm/vmx.c:2175:6: error: unused variable 'cpu' [-Werror=unused-variable] This puts it into another #ifdef. Fixes: 35060ed6a1ff ("x86/kvm/vmx: avoid expensive rdmsr for MSR_GS_BASE") Signed-off-by: Arnd Bergmann Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 2 ++ 1 file changed, 2 insertions(+) commit 87248d31d1055b56e01a62d9320b4e118bc84e0e Author: Arnd Bergmann Date: Wed Apr 4 14:12:39 2018 +0200 netdevsim: remove incorrect __net_initdata annotations The __net_initdata section cannot currently be used for structures that get cleaned up in an exitcall using unregister_pernet_operations: WARNING: vmlinux.o(.text+0x868c34): Section mismatch in reference from the function nsim_devlink_exit() to the (unknown reference) .init.data:(unknown) The function nsim_devlink_exit() references the (unknown reference) __initdata (unknown). This is often because nsim_devlink_exit lacks a __initdata annotation or the annotation of (unknown) is wrong. WARNING: vmlinux.o(.text+0x868c64): Section mismatch in reference from the function nsim_devlink_init() to the (unknown reference) .init.data:(unknown) WARNING: vmlinux.o(.text+0x8692bc): Section mismatch in reference from the function nsim_fib_exit() to the (unknown reference) .init.data:(unknown) WARNING: vmlinux.o(.text+0x869300): Section mismatch in reference from the function nsim_fib_init() to the (unknown reference) .init.data:(unknown) As that warning tells us, discarding the structure after a module is loaded would lead to a undefined behavior when that module is removed. It might be possible to change that annotation so it has no effect for loadable modules, but I have not figured out exactly how to do that, and we want this to be fixed in -rc1. This just removes the annotations, just like we do for all other such modules. Fixes: 37923ed6b8ce ("netdevsim: Add simple FIB resource controller via devlink") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/netdevsim/devlink.c | 2 +- drivers/net/netdevsim/fib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5bd5e8d891c1fd2d966a7e2c26f0452d22410683 Author: Mike Snitzer Date: Tue Apr 3 16:54:10 2018 -0400 dm: remove fmode_t argument from .prepare_ioctl hook Use the fmode_t that is passed to dm_blk_ioctl() rather than inconsistently (varies across targets) drop it on the floor by overriding it with the fmode_t stored in 'struct dm_dev'. All the persistent reservation functions weren't using the fmode_t they got back from .prepare_ioctl so remove them. Signed-off-by: Mike Snitzer drivers/md/dm-flakey.c | 3 +-- drivers/md/dm-linear.c | 3 +-- drivers/md/dm-log-writes.c | 2 +- drivers/md/dm-mpath.c | 3 +-- drivers/md/dm-switch.c | 4 +--- drivers/md/dm-verity-target.c | 3 +-- drivers/md/dm-zoned-target.c | 3 +-- drivers/md/dm.c | 18 +++++++----------- include/linux/device-mapper.h | 3 +-- 9 files changed, 15 insertions(+), 27 deletions(-) commit 971888c46993f871f20d02d1fe43486a924fad11 Author: Mike Snitzer Date: Tue Apr 3 15:05:12 2018 -0400 dm: hold DM table for duration of ioctl rather than use blkdev_get Commit 519049afead ("dm: use blkdev_get rather than bdgrab when issuing pass-through ioctl") inadvertantly introduced a regression relative to users of device cgroups that issue ioctls (e.g. libvirt). Using blkdev_get() in DM's passthrough ioctl support implicitly introduced a cgroup permissions check that would fail unless care were taken to add all devices in the IO stack to the device cgroup. E.g. rather than just adding the top-level DM multipath device to the cgroup all the underlying devices would need to be allowed. Fix this, to no longer require allowing all underlying devices, by simply holding the live DM table (which includes the table's original blkdev_get() reference on the blockdevice that the ioctl will be issued to) for the duration of the ioctl. Also, bump the DM ioctl version so a user can know that their device cgroup allow workaround is no longer needed. Reported-by: Michal Privoznik Suggested-by: Mikulas Patocka Fixes: 519049afead ("dm: use blkdev_get rather than bdgrab when issuing pass-through ioctl") Cc: stable@vger.kernel.org # 4.16 Signed-off-by: Mike Snitzer drivers/md/dm.c | 97 ++++++++++++++++++++----------------------- include/uapi/linux/dm-ioctl.h | 4 +- 2 files changed, 46 insertions(+), 55 deletions(-) commit 13bc62d4a6c79b95ec299591df1bae0a505f2d07 Author: Heinz Mauelshagen Date: Wed Mar 28 17:07:14 2018 +0200 dm raid: fix parse_raid_params() variable range issue parse_raid_params() compares variable "int value" with INT_MAX. E.g. related Coverity report excerpt: CID 1364818 (#2 of 3): Operands don't affect result (CONSTANT_EXPRESSION_RESULT) [select issue] 1433 if (value > INT_MAX) { Fix by changing checks to avoid INT_MAX. Whilst on it, avoid unnecessary checks against constants and add check for sane recovery speed min/max. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit d4b1aaf53c02e6440c49aeae06ba3a3a8ce9882a Author: weiyongjun (A) Date: Wed Mar 28 11:11:58 2018 +0000 dm verity: make verity_for_io_block static Fixes the following sparse warning: drivers/md/dm-verity-target.c:375:6: warning: symbol 'verity_for_io_block' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Mike Snitzer drivers/md/dm-verity-target.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 458bd99e49742c225f75501591573959c7ef50a2 Author: Bert Kenward Date: Wed Apr 4 16:40:30 2018 +0100 sfc: remove ctpio_dmabuf_start from stats The ctpio_dmabuf_start entry is not actually a stat and shouldn't be exposed to ethtool. Fixes: 2c0b6ee837db ("sfc: expose CTPIO stats on NICs that support them") Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 2 -- drivers/net/ethernet/sfc/nic.h | 1 - 2 files changed, 3 deletions(-) commit 3d23401283e80ceb03f765842787e0e79ff598b7 Author: Eric Dumazet Date: Wed Apr 4 08:35:10 2018 -0700 inet: frags: fix ip6frag_low_thresh boundary Giving an integer to proc_doulongvec_minmax() is dangerous on 64bit arches, since linker might place next to it a non zero value preventing a change to ip6frag_low_thresh. ip6frag_low_thresh is not used anymore in the kernel, but we do not want to prematuraly break user scripts wanting to change it. Since specifying a minimal value of 0 for proc_doulongvec_minmax() is moot, let's remove these zero values in all defrag units. Fixes: 6e00f7dd5e4e ("ipv6: frags: fix /proc/sys/net/ipv6/ip6frag_low_thresh") Signed-off-by: Eric Dumazet Reported-by: Maciej Żenczykowski Signed-off-by: David S. Miller net/ieee802154/6lowpan/reassembly.c | 2 -- net/ipv4/ip_fragment.c | 5 ++--- net/ipv6/netfilter/nf_conntrack_reasm.c | 2 -- net/ipv6/reassembly.c | 2 -- 4 files changed, 2 insertions(+), 9 deletions(-) commit c75d0edc8e83541272c8c0177c4da153f22094e4 Author: Sean Christopherson Date: Thu Mar 29 14:48:31 2018 -0700 KVM: VMX: remove bogus WARN_ON in handle_ept_misconfig Remove the WARN_ON in handle_ept_misconfig() as it is unnecessary and causes false positives. Return the unmodified result of kvm_mmu_page_fault() instead of converting a system error code to KVM_EXIT_UNKNOWN so that userspace sees the error code of the actual failure, not a generic "we don't know what went wrong". * kvm_mmu_page_fault() will WARN if reserved bits are set in the SPTEs, i.e. it covers the case where an EPT misconfig occurred because of a KVM bug. * The WARN_ON will fire on any system error code that is hit while handling the fault, e.g. -ENOMEM from mmu_topup_memory_caches() while handling a legitmate MMIO EPT misconfig or -EFAULT from kvm_handle_bad_page() if the corresponding HVA is invalid. In either case, userspace should receive the original error code and firing a warning is incorrect behavior as KVM is operating as designed. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 2c151b25441ae5c2da66472abd165af785c9ecd2 Author: Sean Christopherson Date: Thu Mar 29 14:48:30 2018 -0700 Revert "KVM: X86: Fix SMRAM accessing even if VM is shutdown" The bug that led to commit 95e057e25892eaa48cad1e2d637b80d0f1a4fac5 was a benign warning (no adverse affects other than the warning itself) that was detected by syzkaller. Further inspection shows that the WARN_ON in question, in handle_ept_misconfig(), is unnecessary and flawed (this was also briefly discussed in the original patch: https://patchwork.kernel.org/patch/10204649). * The WARN_ON is unnecessary as kvm_mmu_page_fault() will WARN if reserved bits are set in the SPTEs, i.e. it covers the case where an EPT misconfig occurred because of a KVM bug. * The WARN_ON is flawed because it will fire on any system error code that is hit while handling the fault, e.g. -ENOMEM can be returned by mmu_topup_memory_caches() while handling a legitmate MMIO EPT misconfig. The original behavior of returning -EFAULT when userspace munmaps an HVA without first removing the memslot is correct and desirable, i.e. KVM is letting userspace know it has generated a bad address. Returning RET_PF_EMULATE masks the WARN_ON in the EPT misconfig path, but does not fix the underlying bug, i.e. the WARN_ON is bogus. Furthermore, returning RET_PF_EMULATE has the unwanted side effect of causing KVM to attempt to emulate an instruction on any page fault with an invalid HVA translation, e.g. a not-present EPT violation on a VM_PFNMAP VMA whose fault handler failed to insert a PFN. * There is no guarantee that the fault is directly related to the instruction, i.e. the fault could have been triggered by a side effect memory access in the guest, e.g. while vectoring a #DB or writing a tracing record. This could cause KVM to effectively mask the fault if KVM doesn't model the behavior leading to the fault, i.e. emulation could succeed and resume the guest. * If emulation does fail, KVM will return EMULATION_FAILED instead of -EFAULT, which is a red herring as the user will either debug a bogus emulation attempt or scratch their head wondering why we were attempting emulation in the first place. TL;DR: revert to returning -EFAULT and remove the bogus WARN_ON in handle_ept_misconfig in a future patch. This reverts commit 95e057e25892eaa48cad1e2d637b80d0f1a4fac5. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b2e6877b8793b60abb75c15abaaa4377807a358 Author: GhantaKrishnamurthy MohanKrishna Date: Wed Apr 4 14:49:47 2018 +0200 tipc: Fix namespace violation in tipc_sk_fill_sock_diag To fetch UID info for socket diagnostics, we determine the namespace of user context using tipc socket instance. This may cause namespace violation, as the kernel will remap based on UID. We fix this by fetching namespace info using the calling userspace netlink socket. Fixes: c30b70deb5f4 (tipc: implement socket diagnostics for AF_TIPC) Reported-by: syzbot+326e587eff1074657718@syzkaller.appspotmail.com Acked-by: Jon Maloy Signed-off-by: GhantaKrishnamurthy MohanKrishna Signed-off-by: David S. Miller net/tipc/socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9e8445a56c253f01f6716ac14526a7dae6bc0d46 Author: Paolo Abeni Date: Wed Apr 4 14:30:01 2018 +0200 net: avoid unneeded atomic operation in ip*_append_data() After commit 694aba690de0 ("ipv4: factorize sk_wmem_alloc updates done by __ip_append_data()") and commit 1f4c6eb24029 ("ipv6: factorize sk_wmem_alloc updates done by __ip6_append_data()"), when transmitting sub MTU datagram, an addtional, unneeded atomic operation is performed in ip*_append_data() to update wmem_alloc: in the above condition the delta is 0. The above cause small but measurable performance regression in UDP xmit tput test with packet size below MTU. This change avoids such overhead updating wmem_alloc only if wmem_alloc_delta is non zero. The error path is left intentionally unmodified: it's a slow path and simplicity is preferred to performances. Fixes: 694aba690de0 ("ipv4: factorize sk_wmem_alloc updates done by __ip_append_data()") Fixes: 1f4c6eb24029 ("ipv6: factorize sk_wmem_alloc updates done by __ip6_append_data()") Signed-off-by: Paolo Abeni Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ip_output.c | 3 ++- net/ipv6/ip6_output.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 29916968c48691c94be466a0b47cc9adcea9cb8d Author: Stefan Fritsch Date: Sun Apr 1 17:54:44 2018 +0200 kvm: Add emulation for movups/movupd This is very similar to the aligned versions movaps/movapd. We have seen the corresponding emulation failures with openbsd as guest and with Windows 10 with intel HD graphics pass through. Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Fritsch Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit add5ff7a216ee545a214013f26d1ef2f44a9c9f8 Author: Sean Christopherson Date: Fri Mar 23 09:34:00 2018 -0700 KVM: VMX: raise internal error for exception during invalid protected mode state Exit to userspace with KVM_INTERNAL_ERROR_EMULATION if we encounter an exception in Protected Mode while emulating guest due to invalid guest state. Unlike Big RM, KVM doesn't support emulating exceptions in PM, i.e. PM exceptions are always injected via the VMCS. Because we will never do VMRESUME due to emulation_required, the exception is never realized and we'll keep emulating the faulting instruction over and over until we receive a signal. Exit to userspace iff there is a pending exception, i.e. don't exit simply on a requested event. The purpose of this check and exit is to aid in debugging a guest that is in all likelihood already doomed. Invalid guest state in PM is extremely limited in normal operation, e.g. it generally only occurs for a few instructions early in BIOS, and any exception at this time is all but guaranteed to be fatal. Non-vectored interrupts, e.g. INIT, SIPI and SMI, can be cleanly handled/emulated, while checking for vectored interrupts, e.g. INTR and NMI, without hitting false positives would add a fair amount of complexity for almost no benefit (getting hit by lightning seems more likely than encountering this specific scenario). Add a WARN_ON_ONCE to vmx_queue_exception() if we try to inject an exception via the VMCS and emulation_required is true. Signed-off-by: Sean Christopherson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 2a37ce25d9f2071ab6cce7f70fd5bd4bf4a50ee7 Author: Arnd Bergmann Date: Wed Apr 4 12:38:40 2018 +0200 nvmem: disallow modular CONFIG_NVMEM The new of_get_nvmem_mac_address() helper function causes a link error with CONFIG_NVMEM=m: drivers/of/of_net.o: In function `of_get_nvmem_mac_address': of_net.c:(.text+0x168): undefined reference to `of_nvmem_cell_get' of_net.c:(.text+0x19c): undefined reference to `nvmem_cell_read' of_net.c:(.text+0x1a8): undefined reference to `nvmem_cell_put' I could not come up with a good solution for this, as the code is always built-in. Using an #if IS_REACHABLE() check around it would solve the link time issue but then stop it from working in that configuration. Making of_nvmem_cell_get() an inline function could also solve that, but seems a bit ugly since it's somewhat larger than most inline functions, and it would just bring that problem into the callers. Splitting the function into a separate file might be an alternative. This uses the big hammer by making CONFIG_NVMEM itself a 'bool' symbol, which avoids the problem entirely but makes the vmlinux larger for anyone that might use NVMEM support but doesn't need it built-in otherwise. Fixes: 9217e566bdee ("of_net: Implement of_get_nvmem_mac_address helper") Cc: Mike Looijmans Cc: Florian Fainelli Cc: Andrew Lunn Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Arnd Bergmann Acked-by: Mike Looijmans Signed-off-by: David S. Miller drivers/nvmem/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48d154e7f56ed03c61a02436e86d25e6b37c0256 Author: Tan Xiaojun Date: Wed Apr 4 17:40:48 2018 +0800 net: hns3: fix length overflow when CONFIG_ARM64_64K_PAGES When enable the config item "CONFIG_ARM64_64K_PAGES", the size of PAGE_SIZE is 65536(64K). But the type of length is u16, it will overflow. So change it to u32. Signed-off-by: Tan Xiaojun Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1489bbd10e16079ce30a53d3c22a431fd47af791 Author: Dirk van der Merwe Date: Tue Apr 3 17:24:23 2018 -0700 nfp: use full 40 bits of the NSP buffer address The NSP default buffer is a piece of NFP memory where additional command data can be placed. Its format has been copied from host buffer, but the PCIe selection bits do not make sense in this case. If those get masked out from a NFP address - writes to random place in the chip memory may be issued and crash the device. Even in the general NSP buffer case, it doesn't make sense to have the PCIe selection bits there anymore. These are unused at the moment, and when it becomes necessary, the PCIe selection bits should rather be moved to another register to utilise more bits for the buffer address. This has never been an issue because the buffer used to be allocated in memory with less-than-38-bit-long address but that is about to change. Fixes: 1a64821c6af7 ("nfp: add support for service processor access") Signed-off-by: Dirk van der Merwe Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 92571a1aae40d291158d16e7142637908220f470 Author: Alexander Graf Date: Wed Apr 4 00:19:35 2018 +0200 lan78xx: Connect phy early When using wicked with a lan78xx device attached to the system, we end up with ethtool commands issued on the device before an ifup got issued. That lead to the following crash: Unable to handle kernel NULL pointer dereference at virtual address 0000039c pgd = ffff800035b30000 [0000039c] *pgd=0000000000000000 Internal error: Oops: 96000004 [#1] SMP Modules linked in: [...] Supported: Yes CPU: 3 PID: 638 Comm: wickedd Tainted: G E 4.12.14-0-default #1 Hardware name: raspberrypi rpi/rpi, BIOS 2018.03-rc2 02/21/2018 task: ffff800035e74180 task.stack: ffff800036718000 PC is at phy_ethtool_ksettings_get+0x20/0x98 LR is at lan78xx_get_link_ksettings+0x44/0x60 [lan78xx] pc : [] lr : [] pstate: 20000005 sp : ffff80003671bb20 x29: ffff80003671bb20 x28: ffff800035e74180 x27: ffff000008912000 x26: 000000000000001d x25: 0000000000000124 x24: ffff000008f74d00 x23: 0000004000114809 x22: 0000000000000000 x21: ffff80003671bbd0 x20: 0000000000000000 x19: ffff80003671bbd0 x18: 000000000000040d x17: 0000000000000001 x16: 0000000000000000 x15: 0000000000000000 x14: ffffffffffffffff x13: 0000000000000000 x12: 0000000000000020 x11: 0101010101010101 x10: fefefefefefefeff x9 : 7f7f7f7f7f7f7f7f x8 : fefefeff31677364 x7 : 0000000080808080 x6 : ffff80003671bc9c x5 : ffff80003671b9f8 x4 : ffff80002c296190 x3 : 0000000000000000 x2 : 0000000000000000 x1 : ffff80003671bbd0 x0 : ffff80003671bc00 Process wickedd (pid: 638, stack limit = 0xffff800036718000) Call trace: Exception stack(0xffff80003671b9e0 to 0xffff80003671bb20) b9e0: ffff80003671bc00 ffff80003671bbd0 0000000000000000 0000000000000000 ba00: ffff80002c296190 ffff80003671b9f8 ffff80003671bc9c 0000000080808080 ba20: fefefeff31677364 7f7f7f7f7f7f7f7f fefefefefefefeff 0101010101010101 ba40: 0000000000000020 0000000000000000 ffffffffffffffff 0000000000000000 ba60: 0000000000000000 0000000000000001 000000000000040d ffff80003671bbd0 ba80: 0000000000000000 ffff80003671bbd0 0000000000000000 0000004000114809 baa0: ffff000008f74d00 0000000000000124 000000000000001d ffff000008912000 bac0: ffff800035e74180 ffff80003671bb20 ffff000000dcca84 ffff80003671bb20 bae0: ffff0000086f7f30 0000000020000005 ffff80002c296000 ffff800035223900 bb00: 0000ffffffffffff 0000000000000000 ffff80003671bb20 ffff0000086f7f30 [] phy_ethtool_ksettings_get+0x20/0x98 [] lan78xx_get_link_ksettings+0x44/0x60 [lan78xx] [] ethtool_get_settings+0x68/0x210 [] dev_ethtool+0x214/0x2180 [] dev_ioctl+0x400/0x630 [] sock_do_ioctl+0x70/0x88 [] sock_ioctl+0x208/0x368 [] do_vfs_ioctl+0xb0/0x848 [] SyS_ioctl+0x8c/0xa8 Exception stack(0xffff80003671bec0 to 0xffff80003671c000) bec0: 0000000000000009 0000000000008946 0000fffff4e841d0 0000aa0032687465 bee0: 0000aaaafa2319d4 0000fffff4e841d4 0000000032687465 0000000032687465 bf00: 000000000000001d 7f7fff7f7f7f7f7f 72606b622e71ff4c 7f7f7f7f7f7f7f7f bf20: 0101010101010101 0000000000000020 ffffffffffffffff 0000ffff7f510c68 bf40: 0000ffff7f6a9d18 0000ffff7f44ce30 000000000000040d 0000ffff7f6f98f0 bf60: 0000fffff4e842c0 0000000000000001 0000aaaafa2c2e00 0000ffff7f6ab000 bf80: 0000fffff4e842c0 0000ffff7f62a000 0000aaaafa2b9f20 0000aaaafa2c2e00 bfa0: 0000fffff4e84818 0000fffff4e841a0 0000ffff7f5ad0cc 0000fffff4e841a0 bfc0: 0000ffff7f44ce3c 0000000080000000 0000000000000009 000000000000001d bfe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 The culprit is quite simple: The driver tries to access the phy left and right, but only actually has a working reference to it when the device is up. The fix thus is quite simple too: Get a reference to the phy on probe already and keep it even when the device is going down. With this patch applied, I can successfully run wicked on my system and bring the interface up and down as many times as I want, without getting NULL pointer dereferences in between. Signed-off-by: Alexander Graf Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 0df57e604c460fc8333306ea3029d9e21e8f19f7 Author: Jakub Kicinski Date: Mon Apr 2 13:31:20 2018 -0700 nfp: add a separate counter for packets with CHECKSUM_COMPLETE We are currently counting packets with CHECKSUM_COMPLETE as "hw_rx_csum_ok". This is confusing. Add a new counter. To make sure it fits in the same cacheline move the less used error counter to a different location. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 4 +++- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 16 +++++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) commit b714295abc59cfa2fe46f9341503d9a7eb790503 Author: Jon Maloy Date: Tue Apr 3 19:11:19 2018 +0200 tipc: Fix missing list initializations in struct tipc_subscription When an item of struct tipc_subscription is created, we fail to initialize the two lists aggregated into the struct. This has so far never been a problem, since the items are just added to a root object by list_add(), which does not require the addee list to be pre-initialized. However, syzbot is provoking situations where this addition fails, whereupon the attempted removal if the item from the list causes a crash. This problem seems to always have been around, despite that the code for creating this object was rewritten in commit 242e82cc95f6 ("tipc: collapse subscription creation functions"), which is still in net-next. We fix this for that commit by initializing the two lists properly. Fixes: 242e82cc95f6 ("tipc: collapse subscription creation functions") Reported-by: syzbot+0bb443b74ce09197e970@syzkaller.appspotmail.com Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/subscr.c | 2 ++ 1 file changed, 2 insertions(+) commit f51ffde9276e94fd4608dd7f5c6798fac41bb065 Merge: 0d3ad85 4f858c5 Author: David S. Miller Date: Wed Apr 4 11:31:58 2018 -0400 Merge branch 'ipv6-udp-set-dst-cache-for-a-connected-sk-if-current-not-valid' Alexey Kodanev says: ==================== ipv6: udp: set dst cache for a connected sk if current not valid A new RTF_CACHE route can be created with the socket's dst cache update between the below calls in udpv6_sendmsg(), when datagram sending results to ICMPV6_PKT_TOOBIG error: dst = ip6_sk_dst_lookup_flow(...) ... release_dst: if (dst) { if (connected) { ip6_dst_store(sk, dst) Therefore, the new socket's dst cache reset to the old one on "release_dst:". The first three patches prepare the code to store dst cache with ip6_sk_dst_lookup_flow(): * the first patch adds ip6_sk_dst_store_flow() function with commonly used source and destiantion addresses checks using the flow information. * the second patch adds a new argument to ip6_sk_dst_lookup_flow() and ability to store dst in the socket's cache. Also, the two users of the function are updated without enabling the new behavior: pingv6_sendmsg() and udpv6_sendmsg(). * the third patch makes 'connected' variable in udpv6_sendmsg() to be consistent with ip6_sk_dst_store_flow(), changes its type from int to bool. The last patch contains the actual fix that removes sk dst cache update in the end of udpv6_sendmsg(), and allows to do it in ip6_sk_dst_lookup_flow(). v6: * use bool type for a new parameter in ip_sk_dst_lookup_flow() * add one more patch to convert 'connected' variable in udpv6_sendmsg() from int to bool type. If it shouldn't be here I will resend it when the net-next is opened. v5: * relocate ip6_sk_dst_store_flow() to net/ipv6/route.c and rename ip6_dst_store_flow() to ip6_sk_dst_store_flow() as suggested by Martin v4: * fix the error in the build of ip_dst_store_flow() reported by kbuild test robot due to missing checks for CONFIG_IPV6: add new function to ip6_output.c instead of ip6_route.h * add 'const' to struct flowi6 in ip6_dst_store_flow() * minor commit messages fixes v3: * instead of moving ip6_dst_store() above udp_v6_send_skb(), update socket's dst cache inside ip6_sk_dst_lookup_flow() if the current one is invalid * the issue not reproduced in 4.1, but starting from 4.2. Add one more 'Fixes:' commit that creates new RTF_CACHE route. Though, it is also mentioned in the first one ==================== Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller commit 4f858c56bdac801728b8983d7b542ae0e263e7e6 Author: Alexey Kodanev Date: Tue Apr 3 15:00:10 2018 +0300 ipv6: udp: set dst cache for a connected sk if current not valid A new RTF_CACHE route can be created between ip6_sk_dst_lookup_flow() and ip6_dst_store() calls in udpv6_sendmsg(), when datagram sending results to ICMPV6_PKT_TOOBIG error: udp_v6_send_skb(), for example with vti6 tunnel: vti6_xmit(), get ICMPV6_PKT_TOOBIG error skb_dst_update_pmtu(), can create a RTF_CACHE clone icmpv6_send() ... udpv6_err() ip6_sk_update_pmtu() ip6_update_pmtu(), can create a RTF_CACHE clone ... ip6_datagram_dst_update() ip6_dst_store() And after commit 33c162a980fe ("ipv6: datagram: Update dst cache of a connected datagram sk during pmtu update"), the UDPv6 error handler can update socket's dst cache, but it can happen before the update in the end of udpv6_sendmsg(), preventing getting the new dst cache on the next udpv6_sendmsg() calls. In order to fix it, save dst in a connected socket only if the current socket's dst cache is invalid. The previous patch prepared ip6_sk_dst_lookup_flow() to do that with the new argument, and this patch enables it in udpv6_sendmsg(). Fixes: 33c162a980fe ("ipv6: datagram: Update dst cache of a connected datagram sk during pmtu update") Fixes: 45e4fd26683c ("ipv6: Only create RTF_CACHE routes after encountering pmtu exception") Signed-off-by: Alexey Kodanev Signed-off-by: David S. Miller net/ipv6/udp.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit 9f542f616c24f7d85a4bde42ec621e8d87478fd8 Author: Alexey Kodanev Date: Tue Apr 3 15:00:09 2018 +0300 ipv6: udp: convert 'connected' to bool type in udpv6_sendmsg() This should make it consistent with ip6_sk_dst_lookup_flow() that is accepting the new 'connected' parameter of type bool. Signed-off-by: Alexey Kodanev Signed-off-by: David S. Miller net/ipv6/udp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 96818159c3c08911330e84f86b3becf71aeeaac8 Author: Alexey Kodanev Date: Tue Apr 3 15:00:08 2018 +0300 ipv6: allow to cache dst for a connected sk in ip6_sk_dst_lookup_flow() Add 'connected' parameter to ip6_sk_dst_lookup_flow() and update the cache only if ip6_sk_dst_check() returns NULL and a socket is connected. The function is used as before, the new behavior for UDP sockets in udpv6_sendmsg() will be enabled in the next patch. Signed-off-by: Alexey Kodanev Signed-off-by: David S. Miller include/net/ipv6.h | 3 ++- net/ipv6/ip6_output.c | 15 ++++++++++++--- net/ipv6/ping.c | 2 +- net/ipv6/udp.c | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) commit 7d6850f7c618d8f13d7945dd0dcee98223be6459 Author: Alexey Kodanev Date: Tue Apr 3 15:00:07 2018 +0300 ipv6: add a wrapper for ip6_dst_store() with flowi6 checks Move commonly used pattern of ip6_dst_store() usage to a separate function - ip6_sk_dst_store_flow(), which will check the addresses for equality using the flow information, before saving them. There is no functional changes in this patch. In addition, it will be used in the next patch, in ip6_sk_dst_lookup_flow(). Signed-off-by: Alexey Kodanev Signed-off-by: David S. Miller include/net/ip6_route.h | 3 +++ net/ipv6/datagram.c | 9 +-------- net/ipv6/route.c | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 8 deletions(-) commit 0d3ad8549c6327a8e0bad0fb785c00e07672f296 Author: Russell King Date: Tue Apr 3 10:31:45 2018 +0100 net: phy: marvell10g: add thermal hwmon device Add a thermal monitoring device for the Marvell 88x3310, which updates once a second. We also need to hook into the suspend/resume mechanism to ensure that the thermal monitoring is reconfigured when we resume. Suggested-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/marvell10g.c | 184 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 182 insertions(+), 2 deletions(-) commit bfacfb457b36911a10140b8cb3ce76a74883ac5a Author: Eric Dumazet Date: Mon Apr 2 18:48:37 2018 -0700 pptp: remove a buggy dst release in pptp_connect() Once dst has been cached in socket via sk_setup_caps(), it is illegal to call ip_rt_put() (or dst_release()), since sk_setup_caps() did not change dst refcount. We can still dereference it since we hold socket lock. Caugth by syzbot : BUG: KASAN: use-after-free in atomic_dec_return include/asm-generic/atomic-instrumented.h:198 [inline] BUG: KASAN: use-after-free in dst_release+0x27/0xa0 net/core/dst.c:185 Write of size 4 at addr ffff8801c54dc040 by task syz-executor4/20088 CPU: 1 PID: 20088 Comm: syz-executor4 Not tainted 4.16.0+ #376 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1a7/0x27d lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report+0x23c/0x360 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x137/0x190 mm/kasan/kasan.c:267 kasan_check_write+0x14/0x20 mm/kasan/kasan.c:278 atomic_dec_return include/asm-generic/atomic-instrumented.h:198 [inline] dst_release+0x27/0xa0 net/core/dst.c:185 sk_dst_set include/net/sock.h:1812 [inline] sk_dst_reset include/net/sock.h:1824 [inline] sock_setbindtodevice net/core/sock.c:610 [inline] sock_setsockopt+0x431/0x1b20 net/core/sock.c:707 SYSC_setsockopt net/socket.c:1845 [inline] SyS_setsockopt+0x2ff/0x360 net/socket.c:1828 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x4552d9 RSP: 002b:00007f4878126c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f48781276d4 RCX: 00000000004552d9 RDX: 0000000000000019 RSI: 0000000000000001 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000000000010 R09: 0000000000000000 R10: 00000000200010c0 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000526 R14: 00000000006fac30 R15: 0000000000000000 Allocated by task 20088: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3542 dst_alloc+0x11f/0x1a0 net/core/dst.c:104 rt_dst_alloc+0xe9/0x540 net/ipv4/route.c:1520 __mkroute_output net/ipv4/route.c:2265 [inline] ip_route_output_key_hash_rcu+0xa49/0x2c60 net/ipv4/route.c:2493 ip_route_output_key_hash+0x20b/0x370 net/ipv4/route.c:2322 __ip_route_output_key include/net/route.h:126 [inline] ip_route_output_flow+0x26/0xa0 net/ipv4/route.c:2577 ip_route_output_ports include/net/route.h:163 [inline] pptp_connect+0xa84/0x1170 drivers/net/ppp/pptp.c:453 SYSC_connect+0x213/0x4a0 net/socket.c:1639 SyS_connect+0x24/0x30 net/socket.c:1620 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 20082: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527 __cache_free mm/slab.c:3486 [inline] kmem_cache_free+0x83/0x2a0 mm/slab.c:3744 dst_destroy+0x266/0x380 net/core/dst.c:140 dst_destroy_rcu+0x16/0x20 net/core/dst.c:153 __rcu_reclaim kernel/rcu/rcu.h:178 [inline] rcu_do_batch kernel/rcu/tree.c:2675 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2930 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2897 [inline] rcu_process_callbacks+0xd6c/0x17b0 kernel/rcu/tree.c:2914 __do_softirq+0x2d7/0xb85 kernel/softirq.c:285 The buggy address belongs to the object at ffff8801c54dc000 which belongs to the cache ip_dst_cache of size 168 The buggy address is located 64 bytes inside of 168-byte region [ffff8801c54dc000, ffff8801c54dc0a8) The buggy address belongs to the page: page:ffffea0007153700 count:1 mapcount:0 mapping:ffff8801c54dc000 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801c54dc000 0000000000000000 0000000100000010 raw: ffffea0006b34b20 ffffea0006b6c1e0 ffff8801d674a1c0 0000000000000000 page dumped because: kasan: bad access detected Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ppp/pptp.c | 1 - 1 file changed, 1 deletion(-) commit 18bd5949e5c825f29f022b9ac46474d2e95b4eb0 Author: Florian Fainelli Date: Mon Apr 2 16:24:14 2018 -0700 net: dsa: mt7530: Use NULL instead of plain integer We would be passing 0 instead of NULL as the rsp argument to mt7530_fdb_cmd(), fix that. Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") Signed-off-by: Florian Fainelli Acked-by: Sean Wang Signed-off-by: David S. Miller drivers/net/dsa/mt7530.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 861690d0543949633c97ebe9b2fcd55c27b9bda4 Author: Florian Fainelli Date: Mon Apr 2 16:17:01 2018 -0700 net: dsa: b53: Fix sparse warnings in b53_mmap.c sparse complains about the following warnings: drivers/net/dsa/b53/b53_mmap.c:33:31: warning: incorrect type in initializer (different address spaces) drivers/net/dsa/b53/b53_mmap.c:33:31: expected unsigned char [noderef] [usertype] *regs drivers/net/dsa/b53/b53_mmap.c:33:31: got void *priv and indeed, while what we are doing is functional, we are dereferencing a void * pointer into a void __iomem * which is not great. Just use the defined b53_mmap_priv structure which holds our register base and use that. Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_mmap.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit 3848ec5dc82ce648a84ed10021ce2562fdac7c6a Author: Cong Wang Date: Mon Apr 2 11:01:27 2018 -0700 af_unix: remove redundant lockdep class After commit 581319c58600 ("net/socket: use per af lockdep classes for sk queues") sock queue locks now have per-af lockdep classes, including unix socket. It is no longer necessary to workaround it. I noticed this while looking at a syzbot deadlock report, this patch itself doesn't fix it (this is why I don't add Reported-by). Fixes: 581319c58600 ("net/socket: use per af lockdep classes for sk queues") Cc: Paolo Abeni Signed-off-by: Cong Wang Acked-by: Paolo Abeni Signed-off-by: David S. Miller net/unix/af_unix.c | 10 ---------- 1 file changed, 10 deletions(-) commit 51508179ecc6dda46c90c7d2de4971112eb57306 Merge: b41d7cf c0eb055 Author: David S. Miller Date: Wed Apr 4 11:07:21 2018 -0400 Merge branch 'net-Broadcom-drivers-sparse-fixes' Florian Fainelli says: ==================== net: Broadcom drivers sparse fixes This patch series fixes the same warning reported by sparse in bcmsysport and bcmgenet in the code that deals with inserting the TX checksum pointers: drivers/net/ethernet/broadcom/bcmsysport.c:1155:26: warning: cast from restricted __be16 drivers/net/ethernet/broadcom/bcmsysport.c:1155:26: warning: incorrect type in argument 1 (different base types) drivers/net/ethernet/broadcom/bcmsysport.c:1155:26: expected unsigned short [unsigned] [usertype] val drivers/net/ethernet/broadcom/bcmsysport.c:1155:26: got restricted __be16 [usertype] protocol This patch fixes both issues by using the same construct and not swapping skb->protocol but instead the values we are checking against. ==================== Signed-off-by: David S. Miller commit c0eb05585d4184596453622b5abba7d13dd20667 Author: Florian Fainelli Date: Mon Apr 2 15:58:56 2018 -0700 net: systemport: Fix sparse warnings in bcm_sysport_insert_tsb() skb->protocol is a __be16 which we would be calling htons() against, while this is not wrong per-se as it correctly results in swapping the value on LE hosts, this still upsets sparse. Adopt a similar pattern to what other drivers do and just assign ip_ver to skb->protocol, and then use htons() against the different constants such that the compiler can resolve the values at build time. Fixes: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 6f89421180f15867dc1472d9edf68f82b0ed5ee6 Author: Florian Fainelli Date: Mon Apr 2 15:58:55 2018 -0700 net: bcmgenet: Fix sparse warnings in bcmgenet_put_tx_csum() skb->protocol is a __be16 which we would be calling htons() against, while this is not wrong per-se as it correctly results in swapping the value on LE hosts, this still upsets sparse. Adopt a similar pattern to what other drivers do and just assign ip_ver to skb->protocol, and then use htons() against the different constants such that the compiler can resolve the values at build time. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit b41d7cfef5696b4fb17a122d16e2fbf2a3bc0d9e Author: David Howells Date: Mon Apr 2 23:51:39 2018 +0100 rxrpc: Fix undefined packet handling By analogy with other Rx implementations, RxRPC packet types 9, 10 and 11 should just be discarded rather than being aborted like other undefined packet types. Reported-by: Jeffrey Altman Signed-off-by: David Howells Signed-off-by: David S. Miller net/rxrpc/input.c | 6 ++++++ net/rxrpc/protocol.h | 6 ++++++ 2 files changed, 12 insertions(+) commit 38057aa1639b74d5c1e0dc1ca7c22bc7a31de714 Author: Chris Wilson Date: Sat Mar 24 12:58:29 2018 +0000 drm/i915/execlists: Clear user-active flag on preemption completion When cancelling the requests and clearing out the ports following a successful preemption completion, also clear the active flag. I had assumed that all preemptions would be followed by an immediate dequeue (preserving the active user flag), but under rare circumstances we may be triggering a preemption for the second port only for it to have completed before the preemotion kicks in; leaving execlists->active set even though the system is now idle. We can clear the flag inside the common execlists_cancel_port_requests() as the other users also expect the semantics of active being cleared. Fixes: f6322eddaff7 ("drm/i915/preemption: Allow preemption between submission ports") Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Michel Thierry Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180324125829.27026-1-chris@chris-wilson.co.uk (cherry picked from commit eed7ec52f214bac2f25395ccaad610fbeb842a6e) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_lrc.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6183d9b3ce7979eda940e594a5c342171a5da998 Author: John Garry Date: Thu Mar 15 02:15:59 2018 +0800 MAINTAINERS: Add John Garry as maintainer for HiSilicon LPC driver Add John Garry as maintainer for drivers/bus/hisi_lpc.c, the HiSilicon LPC driver. Signed-off-by: John Garry Signed-off-by: Bjorn Helgaas MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit e0aa1563f8945d9b8f472426d100bed190a4308f Author: John Garry Date: Thu Mar 15 02:15:58 2018 +0800 HISI LPC: Add ACPI support Based on the previous patches, this patch supports the LPC host on Hip06/Hip07 for ACPI FW. It is the responsibility of the LPC host driver to enumerate the child devices, as the ACPI scan code will not enumerate children of "indirect IO" hosts. The ACPI table for the LPC host controller and the child devices is in the following format: Device (LPC0) { Name (_HID, "HISI0191") // HiSi LPC Name (_CRS, ResourceTemplate () { Memory32Fixed (ReadWrite, 0xa01b0000, 0x1000) }) } Device (LPC0.IPMI) { Name (_HID, "IPI0001") Name (LORS, ResourceTemplate() { QWordIO ( ResourceConsumer, MinNotFixed, // _MIF MaxNotFixed, // _MAF PosDecode, EntireRange, 0x0, // _GRA 0xe4, // _MIN 0x3fff, // _MAX 0x0, // _TRA 0x04, // _LEN , , BTIO ) }) Since the IO resources of the child devices need to be translated from LPC bus addresses to logical PIO addresses, and we shouldn't modify the resources of the devices generated in the FW scan, a per-child MFD is created as a substitute. The MFD IO resources will be the translated bus addresses of the ACPI child. Tested-by: dann frazier Signed-off-by: John Garry Signed-off-by: Zhichang Yuan Signed-off-by: Gabriele Paoloni Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko drivers/bus/hisi_lpc.c | 208 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 204 insertions(+), 4 deletions(-) commit dfda4492322ed0a1eb9c4d4715c4b90c9af57352 Author: John Garry Date: Thu Mar 15 02:15:57 2018 +0800 ACPI / scan: Do not enumerate Indirect IO host children Through the logical PIO framework, systems which otherwise have no IO space access to legacy ISA/LPC devices may access these devices through so-called "indirect IO" method. In this, IO space accesses for non-PCI hosts are redirected to a host LLDD to manually generate the IO space (bus) accesses. Hosts are able to register a region in logical PIO space to map to its bus address range. Indirect IO child devices have an associated host-specific bus address. Special translation is required to map between a logical PIO address for a device and its host bus address. Since in the ACPI tables the child device IO resources would be the host-specific values, it is required the ACPI scan code should not enumerate these devices, and that this should be the responsibility of the host driver so that it can "fixup" the resources so that they map to the appropriate logical PIO addresses. To avoid enumerating these child devices, add a check from acpi_device_enumeration_by_parent() as to whether the parent for a device is a member of a known list of "indirect IO" hosts. For now, the HiSilicon LPC host controller ID is added. Tested-by: dann frazier Signed-off-by: John Garry Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Acked-by: Rafael J. Wysocki drivers/acpi/scan.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit d87fb0917a073d71300b2b31b3773f6690bd1712 Author: John Garry Date: Thu Mar 15 02:15:56 2018 +0800 ACPI / scan: Rename acpi_is_serial_bus_slave() for more general use Currently the ACPI scan has special handling for serial bus slaves, in that it makes it the responsibility of the slave device's parent to enumerate the device. To support other types of slave devices which require the same special handling but where the bus is not strictly a serial bus, such as devices on the HiSilicon LPC controller bus, rename acpi_is_serial_bus_slave() to acpi_device_enumeration_by_parent(), so that the name can fit the wider purpose. Also rename the associated device flag acpi_device_flags.serial_bus_slave to .enumeration_by_parent. Signed-off-by: John Garry Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki drivers/acpi/scan.c | 19 ++++++++++--------- include/acpi/acpi_bus.h | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) commit adf38bb0b5956ab5469acb1ca981a9287c7ad1d8 Author: Zhichang Yuan Date: Wed Mar 21 17:23:02 2018 -0500 HISI LPC: Support the LPC host on Hip06/Hip07 with DT bindings The low-pin-count (LPC) interface of Hip06/Hip07 accesses I/O port space of peripherals. Implement the LPC host controller driver which performs the I/O operations on the underlying hardware. We don't want to touch existing drivers such as ipmi-bt, so this driver applies the indirect-IO introduced in the previous patch after registering an indirect-IO node to the indirect-IO devices list which will be searched by the I/O accessors to retrieve the host-local I/O port. The driver config is set as a bool instead of a tristate. The reason here is that, by the very nature of the driver providing a logical PIO range, it does not make sense to have this driver as a loadable module. Another more specific reason is that the Huawei D03 board which includes Hip06 SoC requires the LPC bus for UART console, so should be built in. Tested-by: dann frazier Signed-off-by: Zou Rongrong Signed-off-by: Zhichang Yuan Signed-off-by: John Garry Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Acked-by: Rob Herring # dts part .../arm/hisilicon/hisilicon-low-pin-count.txt | 33 ++ drivers/bus/Kconfig | 8 + drivers/bus/Makefile | 1 + drivers/bus/hisi_lpc.c | 415 +++++++++++++++++++++ 4 files changed, 457 insertions(+) commit 65af618d2c559f8eb19d80d03a23029651a59de4 Author: Zhichang Yuan Date: Thu Mar 15 02:15:54 2018 +0800 of: Add missing I/O range exception for indirect-IO devices There are some special ISA/LPC devices that work on a specific I/O range where it is not correct to specify a 'ranges' property in the DTS parent node as CPU addresses translated from DTS node are only for memory space on some architectures, such as ARM64. Without the parent 'ranges' property, of_translate_address() returns an error. Here we add special handling for this case. During the OF address translation, some checking will be performed to identify whether the device node is registered as indirect-IO. If it is, the I/O translation will be done in a different way from that one of PCI MMIO. In this way, the I/O 'reg' property of the special ISA/LPC devices will be parsed correctly. Tested-by: dann frazier Signed-off-by: Zhichang Yuan Signed-off-by: Gabriele Paoloni Signed-off-by: Arnd Bergmann # earlier draft Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Acked-by: Rob Herring drivers/of/address.c | 92 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 76 insertions(+), 16 deletions(-) commit 5745392e0c2b78e0d73203281d5c42cbd6993194 Author: Zhichang Yuan Date: Thu Mar 15 02:15:53 2018 +0800 PCI: Apply the new generic I/O management on PCI IO hosts After introducing the new generic I/O space management (Logical PIO), the original PCI MMIO relevant helpers need to be updated based on the new interfaces defined in logical PIO. Adapt the corresponding code to match the changes introduced by logical PIO. Tested-by: dann frazier Signed-off-by: Zhichang Yuan Signed-off-by: Gabriele Paoloni Signed-off-by: Arnd Bergmann # earlier draft Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko drivers/pci/pci.c | 92 +++++++++--------------------------------------- include/asm-generic/io.h | 2 +- 2 files changed, 18 insertions(+), 76 deletions(-) commit fcfaab30933bd151bd8cb4dd07b3f11d885bb611 Author: Gabriele Paoloni Date: Thu Mar 15 02:15:52 2018 +0800 PCI: Add fwnode handler as input param of pci_register_io_range() In preparation for having the PCI MMIO helpers use the new generic I/O space management (logical PIO) we need to add the fwnode handler as an extra input parameter. Changes the signature of pci_register_io_range() and its callers as needed. Tested-by: dann frazier Signed-off-by: Gabriele Paoloni Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Acked-by: Rob Herring drivers/acpi/pci_root.c | 8 +++++--- drivers/of/address.c | 4 +++- drivers/pci/pci.c | 3 ++- include/linux/pci.h | 3 ++- 4 files changed, 12 insertions(+), 6 deletions(-) commit e2515476ab3ca228369be14ac4792787c91d1804 Author: Gabriele Paoloni Date: Thu Mar 15 02:15:51 2018 +0800 PCI: Remove __weak tag from pci_register_io_range() pci_register_io_range() has only one definition, so there is no need for the __weak attribute. Remove it. Tested-by: dann frazier Signed-off-by: Gabriele Paoloni Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 402cb8dda949d9b8c0df20ad2527d139faad7ca1 Author: David Howells Date: Wed Apr 4 13:41:28 2018 +0100 fscache: Attach the index key and aux data to the cookie Attach copies of the index key and auxiliary data to the fscache cookie so that: (1) The callbacks to the netfs for this stuff can be eliminated. This can simplify things in the cache as the information is still available, even after the cache has relinquished the cookie. (2) Simplifies the locking requirements of accessing the information as we don't have to worry about the netfs object going away on us. (3) The cache can do lazy updating of the coherency information on disk. As long as the cache is flushed before reboot/poweroff, there's no need to update the coherency info on disk every time it changes. (4) Cookies can be hashed or put in a tree as the index key is easily available. This allows: (a) Checks for duplicate cookies can be made at the top fscache layer rather than down in the bowels of the cache backend. (b) Caching can be added to a netfs object that has a cookie if the cache is brought online after the netfs object is allocated. A certain amount of space is made in the cookie for inline copies of the data, but if it won't fit there, extra memory will be allocated for it. The downside of this is that live cache operation requires more memory. Signed-off-by: David Howells Acked-by: Anna Schumaker Tested-by: Steve Dickson Documentation/filesystems/caching/netfs-api.txt | 106 ++++++++-------- fs/9p/cache.c | 73 ++++------- fs/afs/cache.c | 120 +------------------ fs/afs/cell.c | 4 +- fs/afs/inode.c | 46 +++++-- fs/afs/internal.h | 7 ++ fs/afs/volume.c | 4 +- fs/cachefiles/interface.c | 38 +++--- fs/cachefiles/namei.c | 33 ++--- fs/cachefiles/xattr.c | 2 + fs/ceph/cache.c | 93 ++++---------- fs/cifs/cache.c | 153 +----------------------- fs/cifs/fscache.c | 122 ++++++++++++++++--- fs/cifs/fscache.h | 13 ++ fs/fscache/cache.c | 2 +- fs/fscache/cookie.c | 88 +++++++++++--- fs/fscache/fsdef.c | 49 +------- fs/fscache/internal.h | 21 ++++ fs/fscache/netfs.c | 17 ++- fs/fscache/object-list.c | 28 ++--- fs/fscache/object.c | 22 +++- fs/fscache/operation.c | 2 +- fs/nfs/fscache-index.c | 140 ---------------------- fs/nfs/fscache.c | 83 ++++++++++++- fs/nfs/fscache.h | 16 +++ include/linux/fscache.h | 110 ++++++++++------- 26 files changed, 606 insertions(+), 786 deletions(-) commit 08c2e3d087840cd1e7141b62d92f3dc897147984 Author: David Howells Date: Wed Apr 4 13:41:27 2018 +0100 fscache: Add more tracepoints Add more tracepoints to fscache, including: (*) fscache_page - Tracks netfs pages known to fscache. (*) fscache_check_page - Tracks the netfs querying whether a page is pending storage. (*) fscache_wake_cookie - Tracks cookies being woken up after a page completes/aborts storage in the cache. (*) fscache_op - Tracks operations being initialised. (*) fscache_wrote_page - Tracks return of the backend write_page op. (*) fscache_gang_lookup - Tracks lookup of pages to be stored in the write operation. Signed-off-by: David Howells fs/fscache/cookie.c | 3 +- fs/fscache/object.c | 3 +- fs/fscache/operation.c | 26 ++++- fs/fscache/page.c | 51 ++++++++- include/linux/fscache-cache.h | 3 +- include/trace/events/fscache.h | 252 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 330 insertions(+), 8 deletions(-) commit a18feb55769b705a44c4107786c4045eae2e87b6 Author: David Howells Date: Wed Apr 4 13:41:27 2018 +0100 fscache: Add tracepoints Add some tracepoints to fscache: (*) fscache_cookie - Tracks a cookie's usage count. (*) fscache_netfs - Logs registration of a network filesystem, including the pointer to the cookie allocated. (*) fscache_acquire - Logs cookie acquisition. (*) fscache_relinquish - Logs cookie relinquishment. (*) fscache_enable - Logs enablement of a cookie. (*) fscache_disable - Logs disablement of a cookie. (*) fscache_osm - Tracks execution of states in the object state machine. and cachefiles: (*) cachefiles_ref - Tracks a cachefiles object's usage count. (*) cachefiles_lookup - Logs result of lookup_one_len(). (*) cachefiles_mkdir - Logs result of vfs_mkdir(). (*) cachefiles_create - Logs result of vfs_create(). (*) cachefiles_unlink - Logs calls to vfs_unlink(). (*) cachefiles_rename - Logs calls to vfs_rename(). (*) cachefiles_mark_active - Logs an object becoming active. (*) cachefiles_wait_active - Logs a wait for an old object to be destroyed. (*) cachefiles_mark_inactive - Logs an object becoming inactive. (*) cachefiles_mark_buried - Logs the burial of an object. Signed-off-by: David Howells fs/cachefiles/interface.c | 18 ++- fs/cachefiles/internal.h | 2 + fs/cachefiles/main.c | 1 + fs/cachefiles/namei.c | 42 +++-- fs/fscache/cookie.c | 46 ++++-- fs/fscache/internal.h | 16 +- fs/fscache/main.c | 1 + fs/fscache/netfs.c | 3 +- fs/fscache/object.c | 36 +++-- include/linux/fscache-cache.h | 18 ++- include/trace/events/cachefiles.h | 325 ++++++++++++++++++++++++++++++++++++++ include/trace/events/fscache.h | 277 ++++++++++++++++++++++++++++++++ 12 files changed, 731 insertions(+), 54 deletions(-) commit 2c98425720233ae3e135add0c7e869b32913502f Author: David Howells Date: Wed Apr 4 13:41:26 2018 +0100 fscache: Fix hanging wait on page discarded by writeback If the fscache asynchronous write operation elects to discard a page that's pending storage to the cache because the page would be over the store limit then it needs to wake the page as someone may be waiting on completion of the write. The problem is that the store limit may be updated by a different asynchronous operation - and so may miss the write - and that the store limit may not even get updated until later by the netfs. Fix the kernel hang by making fscache_write_op() mark as written any pages that are over the limit. Signed-off-by: David Howells fs/fscache/page.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit d0fb31ecda2c3c6092d0c2a46a6a72653e7dcabb Author: David Howells Date: Wed Apr 4 13:41:26 2018 +0100 fscache: Detect multiple relinquishment of a cookie Report if an fscache cookie is relinquished multiple times by the netfs. Signed-off-by: David fs/fscache/cookie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b27ddd46245311850f850024df54d0537506f3c1 Author: David Howells Date: Wed Apr 4 13:41:26 2018 +0100 fscache: Pass the correct cancelled indications to fscache_op_complete() The last parameter to fscache_op_complete() is a bool indicating whether or not the operation was cancelled. A lot of the time the inverse value is given or no differentiation is made. Fix this. Signed-off-by: David Howells fs/fscache/page.c | 15 +++++++++------ include/linux/fscache-cache.h | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) commit bfa3837ec3ccda3138ce9b798107aadcc6d2e78c Author: David Howells Date: Wed Apr 4 13:41:26 2018 +0100 fscache, cachefiles: Fix checker warnings Fix a couple of checker warnings in fscache and cachefiles: (1) fscache_n_op_requeue is never used, so get rid of it. (2) cachefiles_uncache_page() is passed in a lock that it releases, so this needs annotating. Signed-off-by: David Howells fs/cachefiles/rdwr.c | 1 + fs/fscache/stats.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 678edd09c24f8a47ed88b3e172e05cc4f611bfcd Author: David Howells Date: Wed Apr 4 13:41:26 2018 +0100 afs: Be more aggressive in retiring cached vnodes When relinquishing cookies, either due to iget failure or to inode eviction, retire a cookie if we think the corresponding vnode got deleted on the server rather than just letting it lie in the cache. Signed-off-by: David Howells fs/afs/inode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 27a3ee3a0471abaacf0c2ab1397b188c7b693fcd Author: David Howells Date: Wed Apr 4 13:41:25 2018 +0100 afs: Use the vnode ID uniquifier in the cache key not the aux data AFS vnodes (files) are referenced by a triplet of { volume ID, vnode ID, uniquifier }. Currently, kafs is only using the vnode ID as the file key in the volume fscache index and checking the uniquifier on cookie acquisition against the contents of the auxiliary data stored in the cache. Unfortunately, this is subject to a race in which an FS.RemoveFile or FS.RemoveDir op is issued against the server but the local afs inode isn't torn down and disposed off before another thread issues something like FS.CreateFile. The latter then gets given the vnode ID that just got removed, but with a new uniquifier and a cookie collision occurs in the cache because the cookie is only keyed on the vnode ID whereas the inode is keyed on the vnode ID plus the uniquifier. Fix this by keying the cookie on the uniquifier in addition to the vnode ID and dropping the uniquifier from the auxiliary data supplied. Signed-off-by: David Howells fs/afs/cache.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit c1515999bdf9a91a4b7c82623a068ffe770a17b9 Author: David Howells Date: Wed Apr 4 13:41:25 2018 +0100 afs: Invalidate cache on server data change Invalidate any data stored in fscache for a vnode that changes on the server so that we don't end up with the cache in a bad state locally. Signed-off-by: David Howells fs/afs/inode.c | 4 ++++ 1 file changed, 4 insertions(+) commit ad7b4e8022b9864c075fe71e1328b1d25cad82f6 Author: Frederic Barrat Date: Tue Apr 3 15:54:02 2018 +0200 cxl: Fix possible deadlock when processing page faults from cxllib cxllib_handle_fault() is called by an external driver when it needs to have the host resolve page faults for a buffer. The buffer can cover several pages and VMAs. The function iterates over all the pages used by the buffer, based on the page size of the VMA. To ensure some stability while processing the faults, the thread T1 grabs the mm->mmap_sem semaphore with read access (R1). However, when processing a page fault for a single page, one of the underlying functions, copro_handle_mm_fault(), also grabs the same semaphore with read access (R2). So the thread T1 takes the semaphore twice. If another thread T2 tries to access the semaphore in write mode W1 (say, because it wants to allocate memory and calls 'brk'), then that thread T2 will have to wait because there's a reader (R1). If the thread T1 is processing a new page at that time, it won't get an automatic grant at R2, because there's now a writer thread waiting (T2). And we have a deadlock. The timeline is: 1. thread T1 owns the semaphore with read access R1 2. thread T2 requests write access W1 and waits 3. thread T1 requests read access R2 and waits The fix is for the thread T1 to release the semaphore R1 once it got the information it needs from the current VMA. The address space/VMAs could evolve while T1 iterates over the full buffer, but in the unlikely case where T1 misses a page, the external driver will raise a new page fault when retrying the memory access. Fixes: 3ced8d730063 ("cxl: Export library to support IBM XSL") Cc: stable@vger.kernel.org # 4.13+ Signed-off-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/cxllib.c | 85 ++++++++++++++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 30 deletions(-) commit 1401b579fa77c79f098e70775fe0ea0cc05b513d Author: Hans Verkuil Date: Fri Mar 30 03:30:06 2018 -0400 media: extended-controls.rst: transmitter -> receiver V4L2_CID_DV_RX_POWER_PRESENT refers to a receiver, not a transmitter. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/extended-controls.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d6a03ebc88f82b0b0adcec24eabb9eb2fcd97db Author: Naveen N. Rao Date: Wed Apr 4 16:11:16 2018 +0530 powerpc/hw_breakpoint: Only disable hw breakpoint if cpu supports it We get the below warning if we try to use kexec on P9: kexec_core: Starting new kernel WARNING: CPU: 0 PID: 1223 at arch/powerpc/kernel/process.c:826 __set_breakpoint+0xb4/0x140 [snip] NIP __set_breakpoint+0xb4/0x140 LR kexec_prepare_cpus_wait+0x58/0x150 Call Trace: 0xc0000000ee70fb20 (unreliable) 0xc0000000ee70fb20 default_machine_kexec+0x234/0x2c0 machine_kexec+0x84/0x90 kernel_kexec+0xd8/0xe0 SyS_reboot+0x214/0x2c0 system_call+0x58/0x6c This happens since we are trying to clear hw breakpoint on POWER9, though we don't have CPU_FTR_DAWR enabled. Guard __set_breakpoint() within hw_breakpoint_disable() with ppc_breakpoint_available() to address this. Fixes: 9654153158d3 ("powerpc: Disable DAWR in the base POWER9 CPU features") Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/hw_breakpoint.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0116b8df1c9e8f0946b678d0caaf4542f571af5c Author: Mauro Carvalho Chehab Date: Mon Mar 26 16:50:34 2018 -0400 media: staging: atomisp: stop duplicating input format types The same formats are defined twice with different names, as warned: drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:5092:58: warning: mixing different enum types drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:5092:58: int enum atomisp_input_format versus drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:5092:58: int enum ia_css_stream_format drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:5112:50: warning: mixing different enum types drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:5112:50: int enum atomisp_input_format versus drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:5112:50: int enum ia_css_stream_format drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:5288:42: warning: mixing different enum types drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:5288:42: int enum atomisp_input_format versus drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:5288:42: int enum ia_css_stream_format drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:6179:62: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:6179:62: expected void const [noderef] *from drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:6179:62: got unsigned short [usertype] * Stop this enum abuse. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/include/linux/atomisp_platform.h | 4 + .../media/atomisp/pci/atomisp2/atomisp_compat.h | 12 +- .../atomisp/pci/atomisp2/atomisp_compat_css20.c | 16 +-- .../atomisp/pci/atomisp2/atomisp_compat_css20.h | 3 +- .../media/atomisp/pci/atomisp2/atomisp_subdev.c | 14 +-- .../media/atomisp/pci/atomisp2/atomisp_subdev.h | 8 +- .../css2400/camera/util/interface/ia_css_util.h | 6 +- .../pci/atomisp2/css2400/camera/util/src/util.c | 72 +++++------ .../atomisp/pci/atomisp2/css2400/ia_css_metadata.h | 4 +- .../atomisp/pci/atomisp2/css2400/ia_css_mipi.h | 2 +- .../pci/atomisp2/css2400/ia_css_stream_format.h | 71 +---------- .../pci/atomisp2/css2400/ia_css_stream_public.h | 8 +- .../isp/kernels/raw/raw_1.0/ia_css_raw.host.c | 42 +++---- .../isp/kernels/raw/raw_1.0/ia_css_raw_types.h | 2 +- .../runtime/binary/interface/ia_css_binary.h | 8 +- .../atomisp2/css2400/runtime/binary/src/binary.c | 6 +- .../css2400/runtime/debug/src/ia_css_debug.c | 91 +++++++------- .../pci/atomisp2/css2400/runtime/ifmtr/src/ifmtr.c | 92 +++++++------- .../runtime/inputfifo/interface/ia_css_inputfifo.h | 6 +- .../css2400/runtime/inputfifo/src/inputfifo.c | 22 ++-- .../css2400/runtime/isys/interface/ia_css_isys.h | 4 +- .../pci/atomisp2/css2400/runtime/isys/src/rx.c | 110 ++++++++--------- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 132 ++++++++++----------- .../atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 56 ++++----- .../atomisp/pci/atomisp2/css2400/sh_css_params.c | 2 +- .../media/atomisp/pci/atomisp2/css2400/sh_css_sp.c | 4 +- .../pci/atomisp2/css2400/sh_css_stream_format.c | 58 ++++----- .../pci/atomisp2/css2400/sh_css_stream_format.h | 2 +- 28 files changed, 396 insertions(+), 461 deletions(-) commit f1581b444e8d30566852eabba189ad5b2e8418bf Author: Mauro Carvalho Chehab Date: Mon Mar 26 16:13:36 2018 -0400 media: staging: atomisp: get rid of an unused var As warned: drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:8085 create_host_regular_capture_pipeline() error: uninitialized symbol 'frm'. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 1 - 1 file changed, 1 deletion(-) commit fd418c8a598511865d8b2774bce58bb4b1f5d962 Author: Mauro Carvalho Chehab Date: Mon Mar 26 16:08:34 2018 -0400 media: staging: atomisp: stop mixing enum types This driver abuses on enum types: drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c:1027:37: warning: mixing different enum types drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c:1027:37: int enum ia_css_csi2_port versus drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c:1027:37: int enum mipi_port_ID_t drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c:1037:39: warning: mixing different enum types drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c:1037:39: int enum ia_css_csi2_port versus drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c:1037:39: int enum mipi_port_ID_t drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c:2147:62: warning: mixing different enum types drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c:2147:62: int enum mipi_port_ID_t versus drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c:2147:62: int enum ia_css_csi2_port Doing some "implicit" typecast. Fix it by using just one enum everywhere, and stopping using typedef to refer to it. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 10 +++--- .../media/atomisp/pci/atomisp2/atomisp_cmd.h | 2 +- .../media/atomisp/pci/atomisp2/atomisp_compat.h | 6 ++-- .../atomisp/pci/atomisp2/atomisp_compat_css20.c | 6 ++-- .../css2400/css_2401_csi2p_system/system_global.h | 4 +-- .../hive_isp_css_common/host/input_system.c | 20 ++++++------ .../hive_isp_css_common/host/input_system_local.h | 2 +- .../host/input_system_private.h | 4 +-- .../css2400/hive_isp_css_common/system_global.h | 4 +-- .../host/input_system_public.h | 14 ++++----- .../pci/atomisp2/css2400/ia_css_input_port.h | 20 +++++------- .../atomisp/pci/atomisp2/css2400/ia_css_irq.h | 4 +-- .../atomisp/pci/atomisp2/css2400/ia_css_mipi.h | 2 +- .../pci/atomisp2/css2400/runtime/ifmtr/src/ifmtr.c | 4 +-- .../css2400/runtime/isys/interface/ia_css_isys.h | 16 +++++----- .../css2400/runtime/isys/src/csi_rx_rmgr.c | 4 +-- .../pci/atomisp2/css2400/runtime/isys/src/rx.c | 36 +++++++++++----------- .../css2400/runtime/pipeline/src/pipeline.c | 4 +-- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 30 +++++++++--------- .../atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 2 +- .../media/atomisp/pci/atomisp2/css2400/sh_css_sp.c | 2 +- .../media/atomisp/pci/atomisp2/css2400/sh_css_sp.h | 2 +- 22 files changed, 96 insertions(+), 102 deletions(-) commit ddbd758f87b700603f281d47d8d14c576e35034a Author: Mauro Carvalho Chehab Date: Mon Mar 26 11:14:10 2018 -0400 media: staging: atomisp: get rid of some static warnings Get rid of those warnings: drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tdf/tdf_1.0/ia_css_tdf.host.c:18:15: warning: symbol 'g_pyramid' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/mmu/sh_mmu_mrfld.c:66:23: warning: symbol 'sh_mmu_mrfld' was not declared. Should it be static? drivers/staging/media/atomisp/i2c/gc0310.h:381:26: warning: symbol 'gc0310_res_preview' was not declared. Should it be static? drivers/staging/media/atomisp/i2c/atomisp-gc0310.c:622:25: warning: symbol 'gc0310_controls' was not declared. Should it be static? drivers/staging/media/atomisp/i2c/ov2722.h:1099:26: warning: symbol 'ov2722_res_preview' was not declared. Should it be static? drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:574:25: warning: symbol 'ov2722_controls' was not declared. Should it be static? drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:727:25: warning: symbol 'ov2680_controls' was not declared. Should it be static? drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:1090:26: warning: symbol 'ov5693_res_preview' was not declared. Should it be static? drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:958:5: warning: symbol 'ad5823_t_focus_abs' was not declared. Should it be static? drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:1139:25: warning: symbol 'ov5693_controls' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c:91:6: warning: symbol 'atomisp_css2_hw_store_8' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c:129:10: warning: symbol 'atomisp_css2_hw_load_16' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c:139:10: warning: symbol 'atomisp_css2_hw_load_32' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c:2868:14: warning: symbol 'atomisp_get_pipe_index' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:5165:5: warning: symbol 'configure_pp_input_nop' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:5171:5: warning: symbol 'configure_output_nop' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:5179:5: warning: symbol 'get_frame_info_nop' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:6630:5: warning: symbol 'atomisp_get_pipe_id' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_formatter.c:48:12: warning: symbol 'HIVE_IF_BIN_COPY' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:1610:6: warning: symbol '__wdt_on_master_slave_sensor' was not declared. Should it be static? Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 2 +- drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 2 +- drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 2 +- drivers/staging/media/atomisp/i2c/gc0310.h | 3 +-- drivers/staging/media/atomisp/i2c/ov2722.h | 2 +- .../staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 4 ++-- drivers/staging/media/atomisp/i2c/ov5693/ov5693.h | 2 +- .../staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 18 +++++++++--------- .../media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 11 ++++++----- .../staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 8 +++++--- .../css2400/hive_isp_css_common/host/input_formatter.c | 5 +++-- .../css2400/isp/kernels/tdf/tdf_1.0/ia_css_tdf.host.c | 2 +- .../media/atomisp/pci/atomisp2/mmu/sh_mmu_mrfld.c | 1 + 13 files changed, 33 insertions(+), 29 deletions(-) commit 517ac8c02b8454192a1e6250f1326338eaef3fc2 Author: Mauro Carvalho Chehab Date: Mon Mar 26 15:31:33 2018 -0400 media: staging: atomisp: use %p to print pointers Instead of a converting pointers to unsigned long, just print them as-is, using %p. Fixes this warning: drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c:3012 ia_css_debug_pipe_graph_dump_sp_raw_copy() warn: argument 4 to %08lx specifier is cast from pointer Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../css2400/runtime/debug/src/ia_css_debug.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 83d019bbb0ed214b4ab9d43107cb2fd7be5aeeea Author: Mauro Carvalho Chehab Date: Mon Mar 26 15:27:54 2018 -0400 media: staging: atomisp: remove an useless check There's a check at ia_css_vf_configure() to verify if binary is not null. However, this is called too late: drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf.host.c:133 ia_css_vf_configure() warn: variable dereferenced before check 'binary' (see line 129) This test is wrong, as this fuction is only called by ia_css_binary_fill_info(), in a place that already assumes that binary is not null, and checks with: assert(binary != NULL); So, remove the useless broken extra check. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf.host.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit dc9f65cf9aea13167bb930d118dbd31ef6f03180 Author: Mauro Carvalho Chehab Date: Mon Mar 26 15:06:00 2018 -0400 media: staging: atomisp: avoid a warning if 32 bits build Checking if a size_t value is bigger than ULONG_INT only makes sense if building on 64 bits, as warned by: drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:697 gmin_get_config_var() warn: impossible condition '(*out_len > (~0)) => (0-u32max > u32max)' Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 2 ++ 1 file changed, 2 insertions(+) commit 8b1a2468cf8afcf2f2e0a113a32bef4a42298cff Author: Mauro Carvalho Chehab Date: Mon Mar 26 14:54:47 2018 -0400 media: staging: atomisp: don't access a NULL var Get rid of those warnings: drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:446 gmin_v1p2_ctrl() error: we previously assumed 'gs' could be null (see line 444) drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:480 gmin_v1p8_ctrl() error: we previously assumed 'gs' could be null (see line 478) drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:516 gmin_v2p8_ctrl() error: we previously assumed 'gs' could be null (see line 514) Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6dfc6a3f66fbeed1be8fb5a376339d3dcb7545c3 Author: Mauro Carvalho Chehab Date: Mon Mar 26 14:31:33 2018 -0400 media: staging: atomisp: Get rid of *default.host.[ch] There are a number of files at atomisp that aren't used anywhere, called as "*default.host.[ch]": css2400/isp/kernels/dpc2/ia_css_dpc2_default.host.[ch] css2400/isp/kernels/bnlm/ia_css_bnlm_default.host.[ch] css2400/isp/kernels/tdf/tdf_1.0/ia_css_tdf_default.host.[ch] css2400/isp/kernels/eed1_8/ia_css_eed1_8_default.host.[ch] Remove them. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../staging/media/atomisp/pci/atomisp2/Makefile | 4 - .../css2400/isp/kernels/bnlm/ia_css_bnlm.host.h | 1 - .../isp/kernels/bnlm/ia_css_bnlm_default.host.c | 71 ---------------- .../isp/kernels/bnlm/ia_css_bnlm_default.host.h | 22 ----- .../css2400/isp/kernels/dpc2/ia_css_dpc2.host.h | 1 - .../isp/kernels/dpc2/ia_css_dpc2_default.host.c | 26 ------ .../isp/kernels/dpc2/ia_css_dpc2_default.host.h | 23 ------ .../isp/kernels/eed1_8/ia_css_eed1_8.host.h | 1 - .../kernels/eed1_8/ia_css_eed1_8_default.host.c | 94 ---------------------- .../kernels/eed1_8/ia_css_eed1_8_default.host.h | 22 ----- .../isp/kernels/tdf/tdf_1.0/ia_css_tdf.host.h | 1 - .../kernels/tdf/tdf_1.0/ia_css_tdf_default.host.c | 36 --------- .../kernels/tdf/tdf_1.0/ia_css_tdf_default.host.h | 23 ------ 13 files changed, 325 deletions(-) commit 319dbc1b4ba9f84a1ce33ea8352a33d1eaea5deb Author: Mauro Carvalho Chehab Date: Mon Mar 26 14:25:24 2018 -0400 media: staging: atomisp: get rid of an unused function The function __need_realloc_mipi_buffer() is not used anywhere. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../atomisp/pci/atomisp2/atomisp_compat_css20.c | 21 --------------------- 1 file changed, 21 deletions(-) commit 849267dfe0deaca6df41d02fe6f2989678932ac1 Author: Mauro Carvalho Chehab Date: Mon Mar 26 14:22:32 2018 -0400 media: staging: atomisp: remove unused set_pd_base() There's an implementation for set_pd_base at sh_mmu logic with is said to be mandatory. However, the implementation ends by calling a routine that does nothing. So get rid of this entire nonsense. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../staging/media/atomisp/pci/atomisp2/atomisp_compat.h | 2 -- .../media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 4 ---- .../media/atomisp/pci/atomisp2/include/mmu/isp_mmu.h | 4 +--- drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c | 13 ++----------- .../staging/media/atomisp/pci/atomisp2/mmu/sh_mmu_mrfld.c | 15 --------------- 5 files changed, 3 insertions(+), 35 deletions(-) commit f10127cd63b39ae01c1c7d4d91edda51d091b56a Author: Mauro Carvalho Chehab Date: Mon Mar 26 11:51:18 2018 -0400 media: staging: atomisp: fix endianess issues There are lots of be-related warnings there, as it doesn't properly mark what data uses bigendian. Warnings fixed: drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:134:15: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:134:15: expected unsigned short [unsigned] [short] [usertype] drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:134:15: got restricted __be16 [usertype] drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:140:26: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:140:26: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:140:26: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:140:26: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:144:26: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:144:26: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:144:26: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:144:26: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:144:26: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:144:26: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:256:27: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:256:27: expected unsigned short [unsigned] [usertype] addr drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:256:27: got restricted __be16 [usertype] drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:302:25: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:302:25: expected unsigned short [unsigned] [short] [usertype] drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:302:25: got restricted __be16 [usertype] drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:306:25: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:306:25: expected unsigned int [unsigned] [usertype] drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:306:25: got restricted __be32 [usertype] drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:97:24: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:97:24: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:97:24: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:97:24: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:99:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:99:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:99:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:99:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:99:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:99:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:134:15: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:134:15: expected unsigned short [unsigned] [short] [usertype] drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:134:15: got restricted __be16 [usertype] drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:141:24: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:141:24: expected unsigned short [unsigned] [short] [usertype] drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:141:24: got restricted __be16 [usertype] drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:177:27: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:177:27: expected unsigned short [unsigned] [usertype] addr drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:177:27: got restricted __be16 [usertype] drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:198:25: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:198:25: expected unsigned short [unsigned] [short] [usertype] drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:198:25: got restricted __be16 [usertype] drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:88:24: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:88:24: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:88:24: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:88:24: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:90:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:90:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:90:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:90:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:90:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:90:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:125:15: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:125:15: expected unsigned short [unsigned] [short] [usertype] drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:125:15: got restricted __be16 [usertype] drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:132:24: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:132:24: expected unsigned short [unsigned] [short] [usertype] drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:132:24: got restricted __be16 [usertype] drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:168:27: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:168:27: expected unsigned short [unsigned] [usertype] addr drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:168:27: got restricted __be16 [usertype] drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:189:25: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:189:25: expected unsigned short [unsigned] [short] [usertype] drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:189:25: got restricted __be16 [usertype] drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:176:24: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:176:24: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:176:24: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:176:24: warning: cast to restricted __be16 drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:178:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:178:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:178:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:178:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:178:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:178:24: warning: cast to restricted __be32 drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:205:13: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:205:13: expected unsigned short [unsigned] [usertype] val drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:205:13: got restricted __be16 [usertype] drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:276:15: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:276:15: expected unsigned short [unsigned] [short] [usertype] drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:276:15: got restricted __be16 [usertype] drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:283:24: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:283:24: expected unsigned short [unsigned] [short] [usertype] drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:283:24: got restricted __be16 [usertype] drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:319:27: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:319:27: expected unsigned short [unsigned] [usertype] addr drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:319:27: got restricted __be16 [usertype] drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:340:25: warning: incorrect type in assignment (different base types) drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:340:25: expected unsigned short [unsigned] [short] [usertype] drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:340:25: got restricted __be16 [usertype] Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../staging/media/atomisp/i2c/atomisp-mt9m114.c | 25 ++++++++++++---------- drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 16 ++++++++------ drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 16 ++++++++------ .../media/atomisp/i2c/ov5693/atomisp-ov5693.c | 24 ++++++++++++--------- 4 files changed, 46 insertions(+), 35 deletions(-) commit c3a9880f53c4822de8d88eae63d9eb1721660812 Author: Mauro Carvalho Chehab Date: Mon Mar 26 11:00:05 2018 -0400 media: staging: atomisp: add a missing include atomisp_drvfs.c is not including its own header, causing those warnings: drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c:185:5: warning: symbol 'atomisp_drvfs_init' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c:201:6: warning: symbol 'atomisp_drvfs_exit' was not declared. Should it be static? Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c | 1 + 1 file changed, 1 insertion(+) commit b2fc77bc1bcbe856a9cbfd6d2ed2a953d4e6d3a8 Author: Mauro Carvalho Chehab Date: Mon Mar 26 10:30:21 2018 -0400 media: staging: atomisp: get rid of stupid statements It makes no sense to have a do nothing statement like: (void)stage; Fix those warnings: drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:3808 sh_css_param_update_isp_params() error: uninitialized symbol 'stage'. drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c:1444 sh_css_update_host2sp_offline_frame() error: uninitialized symbol 'HIVE_ADDR_host_sp_com'. drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c:1475 sh_css_update_host2sp_mipi_frame() error: uninitialized symbol 'HIVE_ADDR_host_sp_com'. drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c:1502 sh_css_update_host2sp_mipi_metadata() error: uninitialized symbol 'HIVE_ADDR_host_sp_com'. drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c:1522 sh_css_update_host2sp_num_mipi_frames() error: uninitialized symbol 'HIVE_ADDR_host_sp_com'. drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c:1541 sh_css_update_host2sp_cont_num_raw_frames() error: uninitialized symbol 'HIVE_ADDR_host_sp_com'. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 1 - .../media/atomisp/pci/atomisp2/css2400/sh_css_params.c | 1 - .../media/atomisp/pci/atomisp2/css2400/sh_css_sp.c | 16 +++------------- 3 files changed, 3 insertions(+), 15 deletions(-) commit 893311298a96c18b7a4a28c111cf9edf8fa27fed Author: Mauro Carvalho Chehab Date: Mon Mar 26 10:27:10 2018 -0400 media: staging: atomisp: declare static vars as such Fix a bunch of warnings: drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c:93:23: warning: symbol 'css_queues' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c:27:32: warning: symbol 'handle_table' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c:32:30: warning: symbol 'refpool' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c:43:30: warning: symbol 'writepool' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c:54:30: warning: symbol 'hmmbufferpool' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_formatter.c:48:12: warning: symbol 'HIVE_IF_BIN_COPY' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c:33:1: warning: symbol 'gp_timer_reg_load' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c:74:33: warning: symbol 'sh_css_sp_output' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/debug.c:32:25: warning: symbol 'debug_data' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:32:21: warning: symbol 'IB_BUFFER_NULL' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:647:24: warning: symbol 'config' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:2894:10: warning: symbol 'g_param_buffer_dequeue_count' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:2895:10: warning: symbol 'g_param_buffer_enqueue_count' was not declared. Should it be static? Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/debug.c | 2 +- .../pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c | 2 +- .../pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c | 4 ++-- .../media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c | 7 +++---- .../atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c | 8 ++++---- .../staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c | 6 +++--- 6 files changed, 14 insertions(+), 15 deletions(-) commit a0891a6e8ea63c382e0a1afc0d49197cf75aaf59 Author: Mauro Carvalho Chehab Date: Mon Mar 26 10:16:07 2018 -0400 media: staging: atomisp: ia_css_output.host: don't use var before check Fix this warning: drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output.host.c:64 ia_css_output_config() warn: variable dereferenced before check 'from->info' (see line 63) Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output.host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e95db4cf73f62e369c10150025a2896618d4e83 Author: Mauro Carvalho Chehab Date: Mon Mar 26 09:45:05 2018 -0400 media: staging: atomisp: do some coding style improvements Use make coccicheck in patch mode to do some coding style improvements. Adjust the results manually. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 14 +++++----- .../media/atomisp/pci/atomisp2/atomisp_fops.c | 14 +++++----- .../media/atomisp/pci/atomisp2/atomisp_ioctl.c | 2 +- .../pci/atomisp2/css2400/runtime/bufq/src/bufq.c | 2 +- .../atomisp2/css2400/runtime/isys/src/isys_init.c | 4 +-- .../css2400/runtime/isys/src/virtual_isys.c | 12 ++++----- .../css2400/runtime/pipeline/src/pipeline.c | 2 +- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 30 ++++++++++------------ .../media/atomisp/pci/atomisp2/css2400/sh_css_sp.c | 3 +-- 9 files changed, 38 insertions(+), 45 deletions(-) commit fbcc85974a49e9a6f3deb67fe3a0d4fb1af49983 Merge: 694f54f 10996f8 Author: Joonas Lahtinen Date: Wed Apr 4 13:46:39 2018 +0300 Merge tag 'gvt-fixes-2018-04-03' of https://github.com/intel/gvt-linux into drm-intel-next-fixes gvt-fixes-2018-04-03 - fix unhandled vfio ioctl return value (Gerd) - no-op user interrupt for vGPU (Zhipeng) - fix ggtt dma unmap (Changbin) - fix warning in fb decoder (Xiong) - dmabuf drm_format_mod fix (Tina) - misc cleanup Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180403072835.kltk47gcwy7kuenv@zhen-hp.sh.intel.com commit 5c6c9c4830b76d851d38829611b3c3e4be0f5cdf Author: Katsuhiro Suzuki Date: Wed Apr 4 04:17:56 2018 -0400 media: dvb_frontend: fix wrong cast in compat_ioctl FE_GET_PROPERTY has always failed as following situations: - Use compatible ioctl - The array of 'struct dtv_property' has 2 or more items This patch fixes wrong cast to a pointer 'struct dtv_property' from a pointer of 2nd or after item of 'struct compat_dtv_property' array. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 732a9edc30c64207606792d577a87dc8410ff236 Author: winton.liu <18502523564@163.com> Date: Tue Apr 3 08:04:45 2018 -0400 media: gspca: fix Kconfig help info Documentation/video4linux/gspca.txt is missing. It has moved to Documentation/media/v4l-drivers/gspca-cardlist.rst Signed-off-by: winton.liu <18502523564@163.com> Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b1ca8a0363efdfa63358f598a2cadda2e514ab7 Author: Brad Love Date: Mon Apr 2 15:59:01 2018 -0400 media: cx231xx: Increase USB bridge bandwidth The cx231xx USB bridge has issue streaming QAM256 DVB-C channels. QAM64 channels were fine, but QAM256 channels produced corrupted transport streams. cx231xx alt mode 4 does not provide enough bandwidth to acommodate QAM256 DVB-C channels, most likely DVB-T2 channels would break up as well. Alt mode 5 increases bridge bandwidth to 90Mbps, and fixes QAM256 DVB-C streaming. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-dvb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 639fa43d59e5a41ca8c55592cd5c1021fea2ab83 Author: Kieran Bingham Date: Mon Mar 26 09:29:17 2018 -0400 media: vsp1: Fix BRx conditional path in WPF When a BRx is provided by a pipeline, the WPF must determine the master layer. Currently the condition to check this identifies pipe->bru || pipe->num_inputs > 1. The code then moves on to dereference pipe->bru, thus the check fails static analysers on the possibility that pipe->num_inputs could be greater than 1 without pipe->bru being set. The reality is that the pipeline must have a BRx to support more than one input, thus this could never cause a fault - however it also identifies that the num_inputs > 1 check is redundant. Remove the redundant check - and always configure the master layer appropriately when we have a BRx configured in our pipeline. Fixes: 6134148f6098 ("v4l: vsp1: Add support for the BRS entity") Cc: stable@vger.kernel.org Suggested-by: Mauro Carvalho Chehab Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_wpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90c7c0c24e2232bbc74c6752c67bf1dfc6b4ced1 Merge: bd03143 0136c74 Author: Thomas Gleixner Date: Wed Apr 4 12:25:19 2018 +0200 Merge branch 'clockevents/4.17' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clockevent updates from Daniel Lezcano: - Fix timer name and register flow for imx's timer tmp and handle different counter width (Anson Huang) - Add the NPCM7xx timer support (Tomer Maimon) commit fc167daff581c01ebce8695e9618231cae3561a1 Author: Masaharu Hayakawa Date: Tue Apr 3 23:57:03 2018 +0200 mmc: tmio: Fix error handling when issuing CMD23 If an error was detected when CMD23 was issued, command sequence should be terminated with errors and CMD23 should be issued after retuning. Fixes: 8b22c3c18be5 ("mmc: tmio: add CMD23 support") Signed-off-by: Masaharu Hayakawa Signed-off-by: Wolfram Sang Cc: # 4.13+ Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19ad26f9e6e1decdde6d48fe1849a06a103b0f09 Author: Akinobu Mita Date: Sun Mar 11 11:34:41 2018 -0400 media: ov5640: add missing output pixel format setting The output pixel format changed by set_fmt() pad operation is not correctly applied. It is intended to be restored by calling ov5640_set_framefmt() when the video stream is started. However, when the device is powered on by s_power subdev operation before the video stream is started, the current output mode setting is restored by ov5640_restore_mode() that also clears pending_mode_change flag in ov5640_set_mode(). So ov5640_set_framefmt() isn't called as intended and the output pixel format is not restored. This change adds the missing output pixel format setting in the ov5640_restore_mode() that is called when the device is powered on. Cc: Steve Longerbeam Cc: Hugues Fruchet Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 4996c3d4cfce30ed30160c511b43d9b491445d7c Author: Fabio Estevam Date: Sat Mar 17 14:24:58 2018 -0400 media: ov2685: Remove owner assignment from i2c_driver Structure i2c_driver does not need to set the owner field, as this will be populated by the driver core. Generated by scripts/coccinelle/api/platform_no_drv_owner.cocci. Signed-off-by: Fabio Estevam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2685.c | 1 - 1 file changed, 1 deletion(-) commit 5b81c53c4996c4382f8ea85c1706152c9e5af5c7 Author: Todor Tomov Date: Wed Mar 21 04:42:36 2018 -0400 media: ov5645: Use v4l2_find_nearest_size Use v4l2_find_nearest_size instead of a driver specific function to find nearest matching size. Signed-off-by: Todor Tomov Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5645.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) commit 06fe932307d58108a11c3e603517dd2a73a57b80 Author: Akinobu Mita Date: Mon Mar 19 12:14:17 2018 -0400 media: ov5645: add missing of_node_put() in error path The device node obtained with of_graph_get_next_endpoint() should be released by calling of_node_put(). But it was not released when v4l2_fwnode_endpoint_parse() failed. This change moves the of_node_put() call before the error check and fixes the issue. Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita Acked-by: Todor Tomov Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5645.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e6441fde848737c54bd3fdcb273c3a85ff66f14e Author: Hugues Fruchet Date: Tue Mar 6 12:04:39 2018 -0500 media: ov5640: fix get_/set_fmt colorspace related fields Fix set of missing colorspace related fields in get_/set_fmt. Detected by v4l2-compliance tool. [Sakari Ailus: Rearrange fmt declaration in ov5640_probe()] Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 9f67a5e22c0facd7d6c0ba4d84a427f541c85a17 Author: Luca Ceresoli Date: Fri Feb 23 03:57:15 2018 -0500 media: imx274: fix typo in error message Signed-off-by: Luca Ceresoli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/imx274.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28cab405c44bb2881d7f53d8d602fc7b40ff9e43 Author: Chiranjeevi Rapolu Date: Wed Feb 21 12:55:20 2018 -0500 media: ov13858: Update to SPDX identifier Replace GPL v2 license notice with SPDX license identifier. Signed-off-by: Chiranjeevi Rapolu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov13858.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit a1c3bb0e1faf44f8b0968e2775abd1f64d0b02f1 Author: Chiranjeevi Rapolu Date: Wed Feb 21 12:42:47 2018 -0500 media: ov5670: Update to SPDX identifier Replace GPL v2 license notice with SPDX license identifier. Signed-off-by: Chiranjeevi Rapolu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5670.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 136fe992346454bfa7d8a4a7c80ae3910c7ffa25 Author: Rajmohan Mani Date: Tue Feb 20 19:54:05 2018 -0500 media: dw9714: Update to SPDX license identifier Remove the GPL v2 license boilerplate and update with the SPDX license identifier. Signed-off-by: Rajmohan Mani Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/dw9714.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit d2dc57b10ae2bd2e2e92ce26f2aaf24bcee17c53 Author: Sakari Ailus Date: Wed Mar 21 16:29:27 2018 -0400 media: v4l: Bring back array_size parameter to v4l2_find_nearest_size An older version of the driver patches were merged accidentally which resulted in missing the array_size parameter that tells the length of the array that contains the different supported sizes. Bring it back to v4l2_find_nearest size and make the corresponding change for the drivers using it as well. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov13858.c | 4 +++- drivers/media/i2c/ov5670.c | 4 +++- drivers/media/platform/vivid/vivid-vid-cap.c | 5 +++-- include/media/v4l2-common.h | 5 +++-- 4 files changed, 12 insertions(+), 6 deletions(-) commit dd5747fb9235d28ac2534e0ad4826a810a93e003 Author: Fabio Estevam Date: Sat Mar 3 07:56:30 2018 -0500 media: imx-media-csi: Do not propagate the error when pinctrl is not found Since commit 52e17089d185 ("media: imx: Don't initialize vars that won't be used") imx_csi_probe() fails to probe after propagating the devm_pinctrl_get_select_default() error. devm_pinctrl_get_select_default() may return -ENODEV when the CSI pinctrl entry is not found, so better not to propagate the error in the -ENODEV case to avoid a regression. Suggested-by: Philipp Zabel Signed-off-by: Fabio Estevam Reviewed-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-csi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cccc41fd3e8d1cfb6f4474470111cf03a6e18452 Author: Hans Verkuil Date: Mon Mar 19 11:43:24 2018 -0400 media: media-types.rst: rename media-entity-type to media-entity-functions The MEDIA_ENT_F_* defines refer to functions, not types. Update the documentation accordingly. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/mediactl/media-ioc-enum-entities.rst | 2 +- Documentation/media/uapi/mediactl/media-ioc-g-topology.rst | 2 +- Documentation/media/uapi/mediactl/media-types.rst | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 793d2a9e3d846180e5f796a5a414d963504efd97 Author: Hans Verkuil Date: Mon Mar 19 11:43:17 2018 -0400 media: media-ioc-g-topology.rst: fix 'reserved' sizes The size of the reserved arrays in the documentation is wrong. Sync this with the actual header. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/mediactl/media-ioc-g-topology.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a54f2d98670045c78547ee669ff024b68f5ed17a Author: Hans Verkuil Date: Mon Mar 19 08:58:19 2018 -0400 media: pixfmt-v4l2.rst: fix types The v4l2_pix_format documentation still had 'enum's as types. Replace by __u32 and add a reference to the enum. Also put ycbcr_enc and hsv_enc in a union. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-v4l2.rst | 36 ++++++++++++++++++---------- 1 file changed, 24 insertions(+), 12 deletions(-) commit 54f6735abea87487c2a01dab22897fe8dcb99145 Author: Hans Verkuil Date: Mon Mar 19 08:58:18 2018 -0400 media: pixfmt-v4l2-mplane.rst: fix types The v4l2_pix_format_mplane documentation still had 'enum's as types. Replace by __u8 and add a reference to the enum. Also put ycbcr_enc and hsv_enc in a union. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/uapi/v4l/pixfmt-v4l2-mplane.rst | 36 ++++++++++++++-------- 1 file changed, 24 insertions(+), 12 deletions(-) commit e605e9e339379730c84a6b51bf9a12da2d64b77b Author: Hans Verkuil Date: Sun Mar 25 17:40:30 2018 -0400 media: v4l2-tpg-core.c: add space after % I know, it's a measly space, but I can't stand it since the V4L2_PIX_FMT_NV24 case before this case does it right. So add the space in order to restore blessed symmetry and consistency and to make the world whole again... Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 437fba47f48514554c71f3a14ab1d991fd11579e Author: Jasmin Jessich Date: Sat Mar 24 20:29:46 2018 -0400 media: cec-pin: Fixed ktime_t to ns conversion Older Kernels use a struct for ktime_t, which requires the conversion function ktime_to_ns to be used on some places. With this patch it will compile now also for older Kernel versions. Signed-off-by: Jasmin Jessich Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-pin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 648a9576932a26e1c6a157b4c9345204de975957 Author: Ryder Lee Date: Thu Mar 22 23:44:13 2018 -0400 media: vcodec: fix error return value from mtk_jpeg_clk_init() The error return value should be fixed as it may return EPROBE_DEFER. Cc: Bin Liu Signed-off-by: Ryder Lee Reviewed-by: Matthias Brugger Acked-by: Rick Chang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eed5756519ad4b43238370763f73a1ce115d41ca Author: Luca Ceresoli Date: Wed Mar 21 13:49:39 2018 -0400 media: doc: fix ReST link syntax There is a ':' in excess, resulting in an unwanted ':' in the rendered output. Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-dev.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67b6c672a7ae1f8def5646701be947e68a05821c Author: Colin Ian King Date: Mon Mar 19 07:18:09 2018 -0400 media: staging: media: davinci_vpfe: fix spelling of resizer_configure_in_continious_mode Trivial fix: rename function resizer_configure_in_continious_mode to resizer_configure_in_continuous_mode to fix spelling mistake. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/davinci_vpfe/dm365_resizer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 82e071e254fcd46e3075a3ef8377a8c716d035fc Author: Alexandre Courbot Date: Mon Mar 19 05:32:29 2018 -0400 media: venus: vdec: fix format enumeration find_format_by_index() stops enumerating formats as soon as the index matches, and returns NULL if venus_helper_check_codec() finds out that the format is not supported. This prevents formats to be properly enumerated if a non-supported format is present, as the enumeration will end with it. Fix this by moving the call to venus_helper_check_codec() into the loop, and keep enumerating when it fails. Fixes: 29f0133ec6 media: venus: use helper function to check supported codecs Signed-off-by: Alexandre Courbot Acked-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/vdec.c | 13 +++++++------ drivers/media/platform/qcom/venus/venc.c | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) commit 890f27693f2a6b9a0a7c13bf931b9d1dde050e04 Author: Arnd Bergmann Date: Tue Mar 13 09:14:09 2018 -0400 media: imx: work around false-positive warning The IS_ERR()/PTR_ERR() combination confuses gcc to the point that it cannot prove the upstream_ep variable to be initialized: drivers/staging/media/imx/imx-media-csi.c: In function 'csi_link_validate': drivers/staging/media/imx/imx-media-csi.c:1025:20: error: 'upstream_ep' may be used uninitialized in this function [-Werror=maybe-uninitialized] priv->upstream_ep = upstream_ep; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ drivers/staging/media/imx/imx-media-csi.c:1026:24: error: 'upstream_ep.bus_type' may be used uninitialized in this function [-Werror=maybe-uninitialized] is_csi2 = (upstream_ep.bus_type == V4L2_MBUS_CSI2); ~~~~~~~~~~~^~~~~~~~~ drivers/staging/media/imx/imx-media-csi.c:127:19: error: 'upstream_ep.bus.parallel.bus_width' may be used uninitialized in this function [-Werror=maybe-uninitialized] I could come up with no good way to rewrite this function, as a last resort, this adds an explicit zero-intialization of the structure. Fixes: 52e17089d185 ("media: imx: Don't initialize vars that won't be used") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-csi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83fbdf1c0595470d98ee99a6474099aee870640f Author: Palmer Dabbelt Date: Tue Apr 3 21:31:29 2018 -0700 openrisc: Set CONFIG_MULTI_IRQ_HANDLER arm has an optional MULTI_IRQ_HANDLER, which openrisc copied but didn't make optional. The multi irq handler infrastructure has been copied to generic code selectable with a new config symbol. That symbol can be selected by randconfig builds and can cause build breakage. Introduce CONFIG_MULTI_IRQ_HANDLER as an intermediate step which prevents the core config symbol from being selected. The openrisc local config symbol will be removed once openrisc gets converted to the generic code. Signed-off-by: Palmer Dabbelt Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Arnd Bergmann Link: https://lkml.kernel.org/r/20180404043130.31277-3-palmer@sifive.com arch/openrisc/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 667b24d049e5dd643a351757fee1a17472cd1719 Author: Palmer Dabbelt Date: Tue Apr 3 21:31:28 2018 -0700 arm64: Set CONFIG_MULTI_IRQ_HANDLER arm has an optional MULTI_IRQ_HANDLER, which arm64 copied but didn't make optional. The multi irq handler infrastructure has been copied to generic code selectable with a new config symbol. That symbol can be selected by randconfig builds and can cause build breakage. Introduce CONFIG_MULTI_IRQ_HANDLER as an intermediate step which prevents the core config symbol from being selected. The arm64 local config symbol will be removed once arm64 gets converted to the generic code. Signed-off-by: Palmer Dabbelt Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Arnd Bergmann Link: https://lkml.kernel.org/r/20180404043130.31277-2-palmer@sifive.com arch/arm64/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit d6f73825dcd0fa1de9a6bf37c79f6109cc87b82f Author: Palmer Dabbelt Date: Tue Apr 3 21:31:30 2018 -0700 genirq: Make GENERIC_IRQ_MULTI_HANDLER depend on !MULTI_IRQ_HANDLER These config switches enable the same code in the core and the not yet converted architecture code. They can be selected both by randconfig builds and cause linker error because the same symbols are defined twice. Make the new GENERIC_IRQ_MULTI_HANDLER depend on !MULTI_IRQ_HANDLER to prevent that. The dependency will be removed once all architectures are converted over. Signed-off-by: Palmer Dabbelt Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Arnd Bergmann Link: https://lkml.kernel.org/r/20180404043130.31277-4-palmer@sifive.com kernel/irq/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 2e81ae396788c7f1af327510899f06f773fe3501 Author: Mauro Carvalho Chehab Date: Mon Mar 26 09:18:36 2018 -0400 media: r820t: don't crash if attach fails As pointed by smatch: drivers/media/tuners/r820t.c:2374 r820t_attach() error: potential null dereference 'priv'. (kzalloc returns null) The current function with prints error assumes that the attach succeeds. So, don't use it in case of failures. Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/r820t.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 33491588c1fb2c76ed114a211ad0ee76c16b5a0c Author: Anders Roxell Date: Tue Apr 3 14:09:47 2018 +0200 kernel/bpf/syscall: fix warning defined but not used There will be a build warning -Wunused-function if CONFIG_CGROUP_BPF isn't defined, since the only user is inside #ifdef CONFIG_CGROUP_BPF: kernel/bpf/syscall.c:1229:12: warning: ‘bpf_prog_attach_check_attach_type’ defined but not used [-Wunused-function] static int bpf_prog_attach_check_attach_type(const struct bpf_prog *prog, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Current code moves function bpf_prog_attach_check_attach_type inside ifdef CONFIG_CGROUP_BPF. Fixes: 5e43f899b03a ("bpf: Check attach type at prog load time") Signed-off-by: Anders Roxell Signed-off-by: Daniel Borkmann kernel/bpf/syscall.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 0e94d87fcfc81883b72574a5cc4638bd87adbb10 Author: John Fastabend Date: Mon Apr 2 12:50:52 2018 -0700 bpf: sockmap, duplicates release calls may NULL sk_prot It is possible to have multiple ULP tcp_release call paths in flight if a sock is closed and simultaneously being removed from the sockmap control path. The result would be setting the sk_prot to the saved values on the first iteration and then on the second iteration setting the value to NULL. This patch resolves this by ensuring we only reset the sk_prot pointer if we have a valid saved state to set. Fixes: 4f738adba30a7 ("bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann kernel/bpf/sockmap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 820ed3fb2e6e986144465082d041e6a403a94135 Author: John Fastabend Date: Mon Apr 2 12:50:46 2018 -0700 bpf: sockmap, free memory on sock close with cork data If a socket with pending cork data is closed we do not return the memory to the socket until the garbage collector free's the psock structure. The garbage collector though can run after the sock has completed its close operation. If this ordering happens the sock code will through a WARN_ON because there is still outstanding memory accounted to the sock. To resolve this ensure we return memory to the sock when a socket is closed. Signed-off-by: John Fastabend Fixes: 91843d540a13 ("bpf: sockmap, add msg_cork_bytes() helper") Signed-off-by: Daniel Borkmann kernel/bpf/sockmap.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d0a0852b9f81cf5f793bf2eae7336ed40a1a1815 Author: Alexander Kappner Date: Wed Mar 28 15:18:31 2018 -0700 mmc: core: Prevent bus reference leak in mmc_blk_init() Upon module load, mmc_block allocates a bus with bus_registeri() in mmc_blk_init(). This reference never gets freed during module unload, which leads to subsequent re-insertions of the module fails and a WARN() splat is triggered. Fix the bug by dropping the reference for the bus in mmc_blk_exit(). Signed-off-by: Alexander Kappner Fixes: 97548575bef3 ("mmc: block: Convert RPMB to a character device") Cc: Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 1 + 1 file changed, 1 insertion(+) commit a04f0017c22453613d5f423326b190c61e3b4f98 Author: Alex Smith Date: Wed Mar 28 18:00:43 2018 -0300 mmc: jz4740: Fix race condition in IRQ mask update A spinlock is held while updating the internal copy of the IRQ mask, but not while writing it to the actual IMASK register. After the lock is released, an IRQ can occur before the IMASK register is written. If handling this IRQ causes the mask to be changed, when the handler returns back to the middle of the first mask update, a stale value will be written to the mask register. If this causes an IRQ to become unmasked that cannot have its status cleared by writing a 1 to it in the IREG register, e.g. the SDIO IRQ, then we can end up stuck with the same IRQ repeatedly being fired but not handled. Normally the MMC IRQ handler attempts to clear any unexpected IRQs by writing IREG, but for those that cannot be cleared in this way then the IRQ will just repeatedly fire. This was resulting in lockups after a while of using Wi-Fi on the CI20 (GitHub issue #19). Resolve by holding the spinlock until after the IMASK register has been updated. Cc: stable@vger.kernel.org Link: https://github.com/MIPS/CI20_linux/issues/19 Fixes: 61bfbdb85687 ("MMC: Add support for the controller on JZ4740 SoCs.") Tested-by: Mathieu Malaterre Signed-off-by: Alex Smith Signed-off-by: Ulf Hansson drivers/mmc/host/jz4740_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a22d6321c3da61a3778f84caa5b3a398ed019d1 Author: Aneesh Kumar K.V Date: Fri Mar 30 17:39:02 2018 +0530 powerpc/mm/radix: Update command line parsing for disable_radix kernel parameter disable_radix takes different options disable_radix=yes|no|1|0 or just disable_radix. prom_init parsing is not supporting these options. Fixes: 1fd6c0220710 ("powerpc/mm: Add a CONFIG option to choose if radix is used by default") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/kernel/prom_init.c | 16 +++++++++++++--- arch/powerpc/kernel/prom_init_check.sh | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) commit cec4e9b28ffbcb9ce04b9e33946c505e5ad7a295 Author: Aneesh Kumar K.V Date: Fri Mar 30 17:39:01 2018 +0530 powerpc/mm/radix: Parse disable_radix commandline correctly. kernel parameter disable_radix takes different options disable_radix=yes|no|1|0 or just disable_radix. When using the later format we get below error. `Malformed early option 'disable_radix'` Fixes: 1fd6c0220710 ("powerpc/mm: Add a CONFIG option to choose if radix is used by default") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/init_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fa504835d6969144b2bd3699684dd447c789ba2 Author: Aneesh Kumar K.V Date: Fri Mar 30 17:34:08 2018 +0530 powerpc/mm/hugetlb: initialize the pagetable cache correctly for hugetlb With 64k page size, we have hugetlb pte entries at the pmd and pud level for book3s64. We don't need to create a separate page table cache for that. With 4k we need to make sure hugepd page table cache for 16M is placed at PUD level and 16G at the PGD level. Simplify all these by not using HUGEPD_PD_SHIFT which is confusing for book3s64. Without this patch, with 64k page size we create pagetable caches with shift value 10 and 7 which are not used at all. Fixes: 419df06eea5b ("powerpc: Reduce the PTE_INDEX_SIZE") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/hugetlbpage.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit fb4e5dbd44564077fa0267a59b45961a1fd181b6 Author: Aneesh Kumar K.V Date: Thu Mar 22 14:13:50 2018 +0530 powerpc/mm/radix: Update pte fragment count from 16 to 256 on radix With split PTL (page table lock) config, we allocate the level 4 (leaf) page table using pte fragment framework instead of slab cache like other levels. This was done to enable us to have split page table lock at the level 4 of the page table. We use page->plt backing the all the level 4 pte fragment for the lock. Currently with Radix, we use only 16 fragments out of the allocated page. In radix each fragment is 256 bytes which means we use only 4k out of the allocated 64K page wasting 60k of the allocated memory. This was done earlier to keep it closer to hash. This patch update the pte fragment count to 256, thereby using the full 64K page and reducing the memory usage. Performance tests shows really low impact even with THP disabled. With THP disabled we will be contenting further less on level 4 ptl and hence the impact should be further low. 256 threads: without patch (10 runs of ./ebizzy -m -n 1000 -s 131072 -S 100) median = 15678.5 stdev = 42.1209 with patch: median = 15354 stdev = 194.743 This is with THP disabled. With THP enabled the impact of the patch will be less. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hash-64k.h | 10 ++++------ arch/powerpc/include/asm/book3s/64/radix-4k.h | 5 +++++ arch/powerpc/include/asm/book3s/64/radix-64k.h | 6 ++++++ arch/powerpc/mm/pgtable-radix.c | 8 ++------ 4 files changed, 17 insertions(+), 12 deletions(-) commit 9df3bd5520038225ceb3927021e6ea811c000c5b Author: Pierre Yves MORDRET Date: Tue Mar 13 17:42:05 2018 +0100 dmaengine: stm32-dma: properly mask irq bits A single register of the controller holds the information for four dma channels. The functions stm32_dma_irq_status() don't mask the relevant bits after the shift, thus adjacent channel's status is also reported in the returned value. Fixed by masking the value before returning it. Similarly, the function stm32_dma_irq_clear() don't mask the input value before shifting it, thus an incorrect input value could disable the interrupts of adjacent channels. Fixed by masking the input value before using it. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Antonio Borneo Signed-off-by: Vinod Koul drivers/dma/stm32-dma.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 80a76952a5a5d2914a5c04d6f3a151348e5580a5 Author: Pierre Yves MORDRET Date: Tue Mar 13 17:42:04 2018 +0100 dmaengine: stm32-dma: fix max items per transfer Having 0 in item counter register is valid and stands for a "No or Ended transfer". Therefore valid transfer starts from @+0 to @+0xFFFE leading to unaligned scatter gather at boundary. Thus it's safer to round down this value on its FIFO size (16 Bytes). Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Vinod Koul drivers/dma/stm32-dma.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit c2d86b1cd64c5db8948119761008ff337c688d96 Author: Pierre Yves MORDRET Date: Tue Mar 13 17:42:03 2018 +0100 dmaengine: stm32-dma: fix DMA IRQ status handling Update the way Transfer Complete and Half Transfer Complete status are acknowledge. Even if HTI is not enabled its status is shown when reading registers, driver has to clear it gently and not raise an error. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Vinod Koul drivers/dma/stm32-dma.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit a2b6103b7a8afc4e507aad19a46a21fb8e0948cf Author: Pierre Yves MORDRET Date: Tue Mar 13 17:42:02 2018 +0100 dmaengine: stm32-dma: Improve memory burst management This patch improves memory burst capability using best burst size according to transferred buffer size from/to memory. >From now on, memory burst is not necessarily same as with peripheral burst one and fifo threshold is directly managed by this driver in order to fit with computed memory burst. Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Vinod Koul drivers/dma/stm32-dma.c | 204 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 175 insertions(+), 29 deletions(-) commit 249d553118a0fecda631d78e32c263f2614fe0c5 Author: Pierre Yves MORDRET Date: Tue Mar 13 17:42:07 2018 +0100 dmaengine: stm32-dma: fix typo and reported checkpatch warnings Fix typo in a comment and solved reported checkpatch warnings. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Vinod Koul drivers/dma/stm32-dma.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit e57cb3b3f10d005410f09d4598cc6d62b833f2b0 Author: Pierre Yves MORDRET Date: Tue Mar 13 17:42:06 2018 +0100 dmaengine: stm32-dma: fix incomplete configuration in cyclic mode When in cyclic mode, the configuration is updated after having started the DMA hardware (STM32_DMA_SCR_EN) leading to incomplete configuration of SMxAR registers. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Hugues Fruchet Signed-off-by: Vinod Koul drivers/dma/stm32-dma.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 951f44cb6cbe899e20e02b1fd0ab57ee64a39a33 Author: Pierre Yves MORDRET Date: Tue Mar 13 17:42:01 2018 +0100 dmaengine: stm32-dma: threshold manages with bitfield feature >From now on, DMA bitfield is to manage DMA FIFO Threshold. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Vinod Koul drivers/dma/stm32-dma.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 7c7055c7c5c7a7e66395777b72e6693a81831a54 Author: Pierre-Yves MORDRET Date: Tue Mar 13 17:42:00 2018 +0100 dt-bindings: stm32-dma: introduce DMA features bitfield This bitfield intends to address features to be activated within the driver. Initially the mask was only meant for FIFO Threshold management. Backward compatibility is preserved but the meaning of this field has been extended to features instead of only threshold. Signed-off-by: Pierre-Yves MORDRET Reviewed-by: Rob Herring Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/stm32-dma.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a0b007e1ef1cb5b7f8d4be296beeb0a097af57ac Author: Biju Das Date: Thu Mar 29 11:11:06 2018 +0100 dt-bindings: rcar-dmac: Document r8a77470 support Renesas RZ/G SoC also have the R-Car gen2/3 compatible DMA controllers. Document RZ/G1C (also known as R8A77470) SoC bindings. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt | 1 + 1 file changed, 1 insertion(+) commit 73dcc666d6bd0db56cd556010f93d8f04c1cc70c Author: Geert Uytterhoeven Date: Thu Mar 29 18:53:32 2018 +0200 dmaengine: rcar-dmac: Fix too early/late system suspend/resume callbacks If serial console wake-up is enabled ("echo enabled > /sys/.../ttySC0/power/wakeup"), and any serial input is received while the system is suspended, serial port input no longer works after system resume. Note that: 1) The system can still be woken up using the serial console, 2) Serial port input keeps working if the system is woken up in some other way (e.g. Wake-on-LAN or gpio-keys), and no serial input was received while suspended. To fix this, replace SET_LATE_SYSTEM_SLEEP_PM_OPS() by SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(), as the callbacks installed by the former happen too early resp. late in the suspend resp. resume process. Reported-by: RVC test team via Yoshihiro Shimoda Fixes: 1131b0a4af911de5 ("dmaengine: rcar-dmac: Make DMAC reinit during system resume explicit") Signed-off-by: Geert Uytterhoeven Signed-off-by: Vinod Koul drivers/dma/sh/rcar-dmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b89e7914f0291bbb58f6a1f024923ceffcde4fc7 Merge: 642e7fd 51125a2 Author: Ingo Molnar Date: Wed Apr 4 07:23:52 2018 +0200 Merge tag 'perf-core-for-mingo-4.17-20180403' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: - Show only failing syscalls with 'perf trace --failure' (Arnaldo Carvalho de Melo) e.g: See what 'openat' syscalls are failing: # perf trace --failure -e openat 762.323 ( 0.007 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video2) = -1 ENOENT No such file or directory 790.228 ( 0.008 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video63) = -1 ENOENT No such file or directory ^C# - Show information about the event (freq, nr_samples, total period/nr_events) in the annotate --tui and --stdio2 'perf annotate' output, similar to the first line in the 'perf report --tui', but just for the samples for a the annotated symbol (Arnaldo Carvalho de Melo) - Introduce 'perf version --build-options' to show what features were linked, aliased as well as a shorter 'perf -vv' (Jin Yao) - Add a "dso_size" sort order (Kim Phillips) - Remove redundant ')' in the tracepoint output in 'perf trace' (Changbin Du) - Synchronize x86's cpufeatures.h, no effect on toolss (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit f2ed480fa4d7f95b190279722690df8d4a396b3e Author: Aneesh Kumar K.V Date: Wed Mar 7 19:06:45 2018 +0530 powerpc/mm/keys: Update documentation and remove unnecessary check Adds more code comments. We also remove an unnecessary pkey check after we check for pkey error in this patch. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/fault.c | 28 ++++++++++++---------------- arch/powerpc/mm/pkeys.c | 11 ++++------- 2 files changed, 16 insertions(+), 23 deletions(-) commit 04bbc9795d2e89c79edf48fb1303ace2e8c90a60 Merge: cbd4a5b 4ded097 Author: Al Viro Date: Wed Apr 4 00:40:19 2018 -0400 Merge branch 'old.dcache' into work.dcache commit 414448d249d82c9be93b35e61e0303e84ef2f959 Author: Parav Pandit Date: Sun Apr 1 15:08:24 2018 +0300 RDMA: Use ib_gid_attr during GID modification Now that ib_gid_attr contains device, port and index, simplify the provider APIs add_gid() and del_gid() to use device, port and index fields from the ib_gid_attr attributes structure. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cache.c | 5 ++-- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 10 ++++---- drivers/infiniband/hw/bnxt_re/ib_verbs.h | 6 ++--- drivers/infiniband/hw/hns/hns_roce_main.c | 20 +++++++--------- drivers/infiniband/hw/mlx4/main.c | 30 ++++++++++------------- drivers/infiniband/hw/mlx5/main.c | 13 +++++----- drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 31 +++++++----------------- drivers/infiniband/sw/rxe/rxe_verbs.c | 10 ++++---- include/rdma/ib_verbs.h | 33 +++++++++++--------------- 9 files changed, 63 insertions(+), 95 deletions(-) commit 3e44e0ee0893cbea257e585dbd4c7d2ff00f1a6b Author: Parav Pandit Date: Sun Apr 1 15:08:23 2018 +0300 IB/providers: Avoid null netdev check for RoCE Now that IB core GID cache ensures that all RoCE entries have an associated netdev remove null checks from the provider drivers for clarity. Reviewed-by: Mark Bloch Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/bnxt_re/ib_verbs.c | 5 +-- drivers/infiniband/hw/hns/hns_roce_ah.c | 8 ++-- drivers/infiniband/hw/mlx4/ah.c | 10 ++--- drivers/infiniband/hw/mlx4/qp.c | 2 +- drivers/infiniband/hw/mlx5/main.c | 6 --- drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 8 ++-- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 2 +- drivers/infiniband/hw/qedr/qedr_roce_cm.c | 10 ++--- drivers/infiniband/hw/qedr/verbs.c | 72 +++++++++++++++---------------- drivers/infiniband/sw/rxe/rxe_verbs.c | 4 +- 10 files changed, 54 insertions(+), 73 deletions(-) commit 14169e333e712e3640a6e4b1a81239ce952e3fcf Author: Parav Pandit Date: Sun Apr 1 15:08:22 2018 +0300 IB/providers: Avoid zero GID check for RoCE Now that the IB core GID cache ensures that a zero GID doesn't exist in the GID table remove zero GID checks from the provider drivers for clarity. Reviewed-by: Mark Bloch Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx4/main.c | 3 --- drivers/infiniband/hw/mlx4/qp.c | 2 -- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 6 +----- drivers/infiniband/hw/qedr/qedr_roce_cm.c | 6 ------ drivers/infiniband/hw/qedr/verbs.c | 3 --- 5 files changed, 1 insertion(+), 19 deletions(-) commit 598ff6bae689453aa894bc38f3f1bb78eb131a61 Author: Parav Pandit Date: Sun Apr 1 15:08:21 2018 +0300 IB/core: Refactor GID modify code for RoCE Code is refactored to prepare separate functions for RoCE which can do more complex operations related to reference counting, while still maintainining code readability. This includes (a) Simplification to not perform netdevice checks and modifications for IB link layer. (b) Do not add RoCE GID entry which has NULL netdevice; instead return an error. (c) If GID addition fails at provider level add_gid(), do not add the entry in the cache and keep the entry marked as INVALID. (d) Simplify and reuse the ib_cache_gid_add()/del() routines so that they can be used even for modifying default GIDs. This avoid some code duplication in modifying default GIDs. (e) find_gid() routine refers to the data entry flags to qualify a GID as valid or invalid GID rather than depending on attributes and zeroness of the GID content. (f) gid_table_reserve_default() sets the GID default attribute at beginning while setting up the GID table. There is no need to use default_gid flag in low level functions such as write_gid(), add_gid(), del_gid(), as they never need to update the DEFAULT property of the GID entry while during GID table update. As as result of this refactor, reserved GID 0:0:0:0:0:0:0:0 is no longer searchable as described below. A unicast GID entry of 0:0:0:0:0:0:0:0 is Reserved GID as per the IB spec version 1.3 section 4.1.1, point (6) whose snippet is below. "The unicast GID address 0:0:0:0:0:0:0:0 is reserved - referred to as the Reserved GID. It shall never be assigned to any endport. It shall not be used as a destination address or in a global routing header (GRH)." GID table cache now only stores valid GID entries. Before this patch, Reserved GID 0:0:0:0:0:0:0:0 was searchable in the GID table using ib_find_cached_gid_by_port() and other similar find routines. Zero GID is no longer searchable as it shall not to be present in GRH or path recored entry as described in IB spec version 1.3 section 4.1.1, point (6), section 12.7.10 and section 12.7.20. ib_cache_update() is simplified to check link layer once, use unified locking scheme for all link layers, removed temporary gid table allocation/free logic. Additionally, (a) Expand ib_gid_attr to store port and index so that GID query routines can get port and index information from the attribute structure. (b) Expand ib_gid_attr to store device as well so that in future code when GID reference counting is done, device is used to reach back to the GID table entry. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cache.c | 484 +++++++++++++++++++++------------------- drivers/infiniband/core/sysfs.c | 18 +- include/rdma/ib_verbs.h | 5 +- 3 files changed, 272 insertions(+), 235 deletions(-) commit f35faa4ba9568138eea1c58abb92e8ef415dce41 Author: Parav Pandit Date: Sun Apr 1 15:08:20 2018 +0300 IB/core: Simplify ib_query_gid to always refer to cache Currently following inconsistencies exist. 1. ib_query_gid() returns GID from the software cache for a RoCE port and returns GID from the HCA for an IB port. This is incorrect because software GID cache is maintained regardless of HCA port type. 2. GID is queries from the HCA via ib_query_gid and updated in the software cache for IB link layer. Both of them might not be in sync. ULPs such as SRP initiator, SRP target, IPoIB driver have historically used ib_query_gid() API to query the GID. However CM used cached version during CM processing, When software cache was introduced, this inconsitency remained. In order to simplify, improve readability and avoid link layer specific above inconsistencies, this patch brings following changes. 1. ib_query_gid() always refers to the cache layer regardless of link layer. 2. cache module who reads the GID entry from HCA and builds the cache, directly invokes the HCA provider verb's query_gid() callback function. 3. ib_query_port() is being called in early stage where GID cache is not yet build while reading port immutable property. Therefore it needs to read the default GID from the HCA for IB link layer to publish the subnet prefix. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cache.c | 4 ++-- drivers/infiniband/core/device.c | 15 +++------------ 2 files changed, 5 insertions(+), 14 deletions(-) commit 0e1f9b924471c132dcf314476916e3c4bd4956b2 Author: Parav Pandit Date: Sun Apr 1 15:08:19 2018 +0300 RDMA/providers: Simplify query_gid callback of RoCE providers ib_query_gid() fetches the GID from the software cache maintained in ib_core for RoCE ports. Therefore, simplify the provider drivers for RoCE to treat query_gid() callback as never called for RoCE, and only require non-RoCE devices to implement it. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/device.c | 4 +++- drivers/infiniband/hw/bnxt_re/main.c | 1 - drivers/infiniband/hw/hns/hns_roce_main.c | 7 ------- drivers/infiniband/hw/mlx4/main.c | 17 +---------------- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 1 - drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 18 ------------------ drivers/infiniband/hw/ocrdma/ocrdma_verbs.h | 2 -- drivers/infiniband/hw/qedr/main.c | 1 - drivers/infiniband/hw/qedr/verbs.c | 21 --------------------- drivers/infiniband/hw/qedr/verbs.h | 1 - drivers/infiniband/sw/rxe/rxe_verbs.c | 18 ------------------ 11 files changed, 4 insertions(+), 87 deletions(-) commit 72e1ff0fb7e09c34956e4b3f619481da4d9787c1 Author: Parav Pandit Date: Sun Apr 1 15:08:18 2018 +0300 RDMA/core: Update query_gid documentation for HCA drivers query_gid() should return right GID value for iWarp and IB link layers. It is a no-op for RoCE link layer. Update the documentation to reflect this. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe include/rdma/ib_verbs.h | 4 ++++ 1 file changed, 4 insertions(+) commit 8435168d50e66fa5eae01852769d20a36f9e5e83 Author: Roland Dreier Date: Tue Apr 3 15:33:01 2018 -0700 RDMA/ucma: Don't allow setting RDMA_OPTION_IB_PATH without an RDMA device Check to make sure that ctx->cm_id->device is set before we use it. Otherwise userspace can trigger a NULL dereference by doing RDMA_USER_CM_CMD_SET_OPTION on an ID that is not bound to a device. Cc: Reported-by: Signed-off-by: Roland Dreier Signed-off-by: Jason Gunthorpe drivers/infiniband/core/ucma.c | 3 +++ 1 file changed, 3 insertions(+) commit 17dec0a949153d9ac00760ba2f5b78cb583e995f Merge: d92cd81 2236d4d Author: Linus Torvalds Date: Tue Apr 3 19:15:32 2018 -0700 Merge branch 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull namespace updates from Eric Biederman: "There was a lot of work this cycle fixing bugs that were discovered after the merge window and getting everything ready where we can reasonably support fully unprivileged fuse. The bug fixes you already have and much of the unprivileged fuse work is coming in via other trees. Still left for fully unprivileged fuse is figuring out how to cleanly handle .set_acl and .get_acl in the legacy case, and properly handling of evm xattrs on unprivileged mounts. Included in the tree is a cleanup from Alexely that replaced a linked list with a statically allocated fix sized array for the pid caches, which simplifies and speeds things up. Then there is are some cleanups and fixes for the ipc namespace. The motivation was that in reviewing other code it was discovered that access ipc objects from different pid namespaces recorded pids in such a way that when asked the wrong pids were returned. In the worst case there has been a measured 30% performance impact for sysvipc semaphores. Other test cases showed no measurable performance impact. Manfred Spraul and Davidlohr Bueso who tend to work on sysvipc performance both gave the nod that this is good enough. Casey Schaufler and James Morris have given their approval to the LSM side of the changes. I simplified the types and the code dealing with sysvipc to pass just kern_ipc_perm for all three types of ipc. Which reduced the header dependencies throughout the kernel and simplified the lsm code. Which let me work on the pid fixes without having to worry about trivial changes causing complete kernel recompiles" * 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: ipc/shm: Fix pid freeing. ipc/shm: fix up for struct file no longer being available in shm.h ipc/smack: Tidy up from the change in type of the ipc security hooks ipc: Directly call the security hook in ipc_ops.associate ipc/sem: Fix semctl(..., GETPID, ...) between pid namespaces ipc/msg: Fix msgctl(..., IPC_STAT, ...) between pid namespaces ipc/shm: Fix shmctl(..., IPC_STAT, ...) between pid namespaces. ipc/util: Helpers for making the sysvipc operations pid namespace aware ipc: Move IPCMNI from include/ipc.h into ipc/util.h msg: Move struct msg_queue into ipc/msg.c shm: Move struct shmid_kernel into ipc/shm.c sem: Move struct sem and struct sem_array into ipc/sem.c msg/security: Pass kern_ipc_perm not msg_queue into the msg_queue security hooks shm/security: Pass kern_ipc_perm not shmid_kernel into the shm security hooks sem/security: Pass kern_ipc_perm not sem_array into the sem security hooks pidns: simpler allocation of pid_* caches commit dd0980226f89c89e531a64b34a2a350358de46dd Author: Martin Brandenburg Date: Tue Apr 3 16:27:15 2018 +0000 orangefs: document package install and xfstests procedure Unless one is working on the userspace code, there's no need to compile OrangeFS. The package works just fine. (But leave the documentation for building from source since not everyone uses distributions which include the package.) Also document the process to run xfstests against OrangeFS. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall Documentation/filesystems/orangefs.txt | 126 +++++++++++++++++++++++++++------ 1 file changed, 103 insertions(+), 23 deletions(-) commit 209469d978ae91e460b37b32f2c2834d93e1ff13 Author: Martin Brandenburg Date: Tue Apr 3 16:27:14 2018 +0000 orangefs: remove unused code Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/orangefs-debug.h | 6 ---- fs/orangefs/orangefs-kernel.h | 77 ------------------------------------------- fs/orangefs/protocol.h | 45 ------------------------- 3 files changed, 128 deletions(-) commit bdd6f083586ff17eb3959cca88212fdb60ca53d1 Author: Martin Brandenburg Date: Tue Apr 3 16:27:13 2018 +0000 orangefs: make several *_operations structs static Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/devorangefs-req.c | 52 +++++++++++++++++++++---------------------- fs/orangefs/inode.c | 4 ++-- fs/orangefs/orangefs-kernel.h | 3 --- 3 files changed, 28 insertions(+), 31 deletions(-) commit a5135eeab2e5ca1b94f34dcb772cb30f9f390efc Author: Martin Brandenburg Date: Tue Apr 3 16:27:12 2018 +0000 orangefs: implement vm_ops->fault Must retrieve size before running filemap_fault so the kernel has an up-to-date size. This should have been caught by xfstests generic/246, but it was masked by orangefs_new_inode, which set i_size to PAGE_SIZE. When nothing caused a getattr prior to a pagefault, i_size was still PAGE_SIZE. Since xfstests only read 10 bytes, it did not catch this bug. When orangefs_new_inode was modified to perform a getattr instead, i_size was set to zero, as it was a newly created file. Then orangefs_file_write_iter did NOT set i_size. Instead it invalidated the attribute cache, which should have caused the next caller to retrieve i_size. But the fault handler did not know it was supposed to retrieve i_size. So during xfstests, i_size was still zero, and filemap_fault returned VM_FAULT_SIGBUS. Fixes xfstests generic/452. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/file.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit 214c2461a864a46b11856426b80dc7db453043c5 Author: Jaegeuk Kim Date: Thu Mar 29 22:50:41 2018 -0700 f2fs: remain written times to update inode during fsync This fixes xfstests/generic/392. The failure was caused by different times between 1) one marked in the last fsync(2) call and 2) the other given by roll-forward recovery after power-cut. The reason was that we skipped updating inode block at 1), since its i_size was recoverable along with 4KB-aligned data writes, which was fixed by: "f2fs: fix a wrong condition in f2fs_skip_inode_update" Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 11 +++++++++++ fs/f2fs/inode.c | 8 ++++++++ 2 files changed, 19 insertions(+) commit b9ee31e100e73075431faaf7af2ee0fbfd6e624b Author: Nicholas Piggin Date: Sun Apr 1 15:48:55 2018 +1000 powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead When stop is executed with EC=ESL=0, it appears to execute like a normal instruction (resuming from NIP when woken by interrupt). So all the save/restore handling can be avoided completely. In particular NV GPRs do not have to be saved, and MSR does not have to be switched back to kernel MSR. So move the test for EC=ESL=0 sleep states out to power9_idle_stop, and return directly to the caller after stop in that case. This improves performance for ping-pong benchmark with the stop0_lite idle state by 2.54% for 2 threads in the same core, and 2.57% for different cores. Performance increase with HV_POSSIBLE defined will be improved further by avoiding the hwsync. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 45 ++++++++++++++------------------------- 1 file changed, 16 insertions(+), 29 deletions(-) commit d92cd810e64aa7cf22b05f0ea1c7d3e8dbae75fe Merge: a23867f f75da8a Author: Linus Torvalds Date: Tue Apr 3 18:00:13 2018 -0700 Merge branch 'for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue updates from Tejun Heo: "rcu_work addition and a couple trivial changes" * 'for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: remove the comment about the old manager_arb mutex workqueue: fix the comments of nr_idle fs/aio: Use rcu_work instead of explicit rcu and work item cgroup: Use rcu_work instead of explicit rcu and work item RCU, workqueue: Implement rcu_work commit a23867f1d2de572f84b459651dfe99fa9e79fadf Merge: ef1c4a6 027fa4d Author: Linus Torvalds Date: Tue Apr 3 17:42:25 2018 -0700 Merge branch 'for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata updates from Tejun Heo: "Nothing too interesting. The biggest change is refcnting fix for ata_host - the bug is recent and can only be triggered on controller hotplug, so very few are hitting it. There also are a number of trivial license / error message changes and some hardware specific changes" * 'for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (23 commits) ahci: imx: add the imx8qm ahci sata support libata: ensure host is free'd on error exit paths ata: ahci-platform: add reset control support ahci: imx: fix the build warning ata: add Amiga Gayle PATA controller driver ahci: imx: add the imx6qp ahci sata support ata: change Tegra124 to Tegra ata: ahci_tegra: Add AHCI support for Tegra210 ata: ahci_tegra: disable DIPM ata: ahci_tegra: disable devslp for Tegra124 ata: ahci_tegra: initialize regulators from soc struct ata: ahci_tegra: Update initialization sequence dt-bindings: Tegra210: add binding documentation libata: add refcounting to ata_host pata_bk3710: clarify license version and use SPDX header pata_falcon: clarify license version and use SPDX header pata_it821x: Delete an error message for a failed memory allocation in it821x_firmware_command() pata_macio: Delete an error message for a failed memory allocation in two functions pata_mpc52xx: Delete an error message for a failed memory allocation in mpc52xx_ata_probe() sata_dwc_460ex: Delete an error message for a failed memory allocation in sata_dwc_port_start() ... commit 2e1f44f6ad8008be353c7c99286f7a747b4b3cf4 Merge: ad44837 3f6c9be Author: James Bottomley Date: Tue Mar 27 12:27:34 2018 -0400 Merge branch 'fixes' into misc Somewhat nasty merge due to conflicts between "33b28357dd00 scsi: qla2xxx: Fix Async GPN_FT for FCP and FC-NVMe scan" and "2b5b96473efc scsi: qla2xxx: Fix FC-NVMe LUN discovery" Merge is non-trivial and has been verified by Qlogic (Cavium) Signed-off-by: James E.J. Bottomley commit ef1c4a6fa91bbbe9b09f770d28eba31a9edf770c Merge: 147a89b f8a695c Author: Linus Torvalds Date: Tue Apr 3 17:16:59 2018 -0700 Merge tag 'media/v4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - new CEC pin injection code for testing purposes - DVB frontend cxd2099 promoted from staging - new platform driver for Sony cxd2880 DVB devices - new sensor drivers: mt9t112, ov2685, ov5695, ov772x, tda1997x, tw9910.c - removal of unused cx18 and ivtv alsa mixers - the reneseas-ceu driver doesn't depend on soc_camera anymore and moved from staging - removed the mantis_vp3028 driver, unused since 2009 - s5p-mfc: add support for version 10 of the MSP - added a decoder for imon protocol - atomisp: lots of cleanups - imx074 and mt9t031: don't depend on soc_camera anymore, being promoted from staging - added helper functions to better support DVB I2C binding - lots of driver improvements and cleanups * tag 'media/v4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (438 commits) media: v4l2-ioctl: rename a temp var that stores _IOC_SIZE(cmd) media: fimc-capture: get rid of two warnings media: dvb-usb-v2: fix a missing dependency of I2C_MUX media: uvc: to the right check at uvc_ioctl_enum_framesizes() media: cec-core: fix a bug at cec_error_inj_write() media: tda9840: cleanup a warning media: tm6000: avoid casting just to print pointer address media: em28xx-input: improve error handling code media: zr364xx: avoid casting just to print pointer address media: vivid-radio-rx: add a cast to avoid a warning media: saa7134-alsa: don't use casts to print a buffer address media: solo6x10: get rid of an address space warning media: zoran: don't cast pointers to print them media: ir-kbd-i2c: change the if logic to avoid a warning media: ir-kbd-i2c: improve error handling code media: saa7134-input: improve error handling media: s2255drv: fix a casting warning media: ivtvfb: Cleanup some warnings media: videobuf-dma-sg: Fix a weird cast soc_camera: fix a weird cast on printk ... commit 147a89bc71e7db40f011454a40add7ff2d10f8d8 Merge: 3b24b83 1849268 Author: Linus Torvalds Date: Tue Apr 3 16:28:01 2018 -0700 Merge tag 'kconfig-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kconfig updates from Masahiro Yamada: - improve checkpatch for more precise Kconfig code checking - clarify effective selects by grouping reverse dependencies in help - do not write out '# CONFIG_FOO is not set' from invisible symbols - make oldconfig as silent as it should be - rename 'silentoldconfig' to 'syncconfig' - add unit-test framework and several test cases - warn unmet dependency of tristate symbols - make unmet dependency warnings readable, removing false positives - improve recursive include detection - use yylineno to simplify the line number tracking - misc cleanups * tag 'kconfig-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (30 commits) kconfig: use yylineno option instead of manual lineno increments kconfig: detect recursive inclusion earlier kconfig: remove duplicated file name and lineno of recursive inclusion kconfig: do not include both curses.h and ncurses.h for nconfig kconfig: make unmet dependency warnings readable kconfig: warn unmet direct dependency of tristate symbols selected by y kconfig: tests: test if recursive inclusion is detected kconfig: tests: test if recursive dependencies are detected kconfig: tests: test randconfig for choice in choice kconfig: tests: test defconfig when two choices interact kconfig: tests: check visibility of tristate choice values in y choice kconfig: tests: check unneeded "is not set" with unmet dependency kconfig: tests: test if new symbols in choice are asked kconfig: tests: test automatic submenu creation kconfig: tests: add basic choice tests kconfig: tests: add framework for Kconfig unit testing kbuild: add PYTHON2 and PYTHON3 variables kconfig: remove redundant streamline_config.pl prerequisite kconfig: rename silentoldconfig to syncconfig kconfig: invoke oldconfig instead of silentoldconfig from local*config ... commit d0b791c02994486b21fc48949ba276c72a88938d Author: Michael Ellerman Date: Wed Apr 4 09:01:08 2018 +1000 powerpc/64s/idle: Consolidate power9_offline_stop()/power9_idle_stop() Commit 3d4fbffdd703 ("powerpc/64s/idle: POWER9 implement a separate idle stop function for hotplug") that added power9_offline_stop() was written before commit 7672691a08c8 ("powerpc/powernv: Provide a way to force a core into SMT4 mode"). When merging the former I failed to notice that it caused us to skip the force-SMT4 logic for offline CPUs. The result is that offlined CPUs will not correctly participate in the force-SMT4 logic, which presumably will result in badness (not tested). Reconcile the two commits by making power9_offline_stop() a pre-cursor to power9_idle_stop(), so that they share the force-SMT4 logic. This is based on an original commit from Nick, all breakage is my own. Fixes: 3d4fbffdd703 ("powerpc/64s/idle: POWER9 implement a separate idle stop function for hotplug") Signed-off-by: Michael Ellerman Signed-off-by: Nicholas Piggin arch/powerpc/kernel/idle_book3s.S | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 3b24b83763e72a6c1e728100104fd99aa83a7b3b Merge: 0734e00 a95b37e Author: Linus Torvalds Date: Tue Apr 3 15:51:22 2018 -0700 Merge tag 'kbuild-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - add a shell script to get Clang version - improve portability of build scripts - drop always-enabled CONFIG_THIN_ARCHIVE and remove unused code - rename built-in.o which is now thin archive to built-in.a - process clean/build targets one by one to get along with -j option - simplify ld-option - improve building with CONFIG_TRIM_UNUSED_KSYMS - define KBUILD_MODNAME even for objects shared among multiple modules - avoid linking multiple instances of same objects from composite objects - move to c_flags to include it only for C files - clean-up various Makefiles * tag 'kbuild-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (29 commits) kbuild: get out of kbuild: clean up link rule of composite modules kbuild: clean up archive rule of built-in.a kbuild: remove partial section mismatch detection for built-in.a net: liquidio: clean up Makefile for simpler composite object handling lib: zstd: clean up Makefile for simpler composite object handling kbuild: link $(real-obj-y) instead of $(obj-y) into built-in.a kbuild: rename real-objs-y/m to real-obj-y/m kbuild: move modname and modname-multi close to modname_flags kbuild: simplify modname calculation kbuild: fix modname for composite modules kbuild: define KBUILD_MODNAME even if multiple modules share objects kbuild: remove unnecessary $(subst $(obj)/, , ...) in modname-multi kbuild: Use ls(1) instead of stat(1) to obtain file size kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS kbuild: move include/config/ksym/* to include/ksym/* kbuild: move CONFIG_TRIM_UNUSED_KSYMS code unneeded for external module kbuild: restore autoksyms.h touch to the top Makefile kbuild: move 'scripts' target below kbuild: remove wrong 'touch' in adjust_autoksyms.sh ... commit 0734e00ef9e48e78c5c3ce1648572f160d07e323 Merge: 4608f06 615b266 Author: Linus Torvalds Date: Tue Apr 3 15:48:04 2018 -0700 Merge branch 'parisc-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "Lots of small enhancements and fixes in this patchset: - improved the x86-64 compatibility for PCI cards by returning -1UL for timed out MMIO transactions (instead of crashing) - fixed HPMC handler for PAT machines: size needs to be multiple of 16 - prepare machine_power_off() to be able to turn rp3410 and c8000 machines off via IMPI - added code to extract machine info for usage with qemu - some init sections fixes - lots of fixes for sparse-, ubsan- and uninitalized variables warnings" * 'parisc-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix out of array access in match_pci_device() parisc: Add code generator for Qemu/SeaBIOS machine info parisc/pci: Switch LBA PCI bus from Hard Fail to Soft Fail mode parisc: Fix HPMC handler by increasing size to multiple of 16 bytes parisc: Directly call machine_power_off() in power button driver parisc: machine_power_off() should call pm_power_off() parisc/Kconfig: SMP kernels boot on all machines parisc: Silence uninitialized variable warning in dbl_to_sgl_fcnvff() parisc: Move various functions and strings to init section parisc: Convert MAP_TYPE to cover 4 bits on parisc parisc: Force to various endian types for sparse parisc/gscps2: Fix sparse warnings parisc/led: Fix sparse warnings parisc/parport_gsc: Use NULL to avoid sparse warning parisc/stifb: Use fb_memset() to avoid sparse warning commit 4608f064532c28c0ea3c03fe26a3a5909852811a Merge: 5bb053b d13864b Author: Linus Torvalds Date: Tue Apr 3 14:08:58 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next Pull sparc updates from David Miller: 1) Add support for ADI (Application Data Integrity) found in more recent sparc64 cpus. Essentially this is keyed based access to virtual memory, and if the key encoded in the virual address is wrong you get a trap. The mm changes were reviewed by Andrew Morton and others. Work by Khalid Aziz. 2) Validate DAX completion index range properly, from Rob Gardner. 3) Add proper Kconfig deps for DAX driver. From Guenter Roeck. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next: sparc64: Make atomic_xchg() an inline function rather than a macro. sparc64: Properly range check DAX completion index sparc: Make auxiliary vectors for ADI available on 32-bit as well sparc64: Oracle DAX driver depends on SPARC64 sparc64: Update signal delivery to use new helper functions sparc64: Add support for ADI (Application Data Integrity) mm: Allow arch code to override copy_highpage() mm: Clear arch specific VM flags on protection change mm: Add address parameter to arch_validate_prot() sparc64: Add auxiliary vectors to report platform ADI properties sparc64: Add handler for "Memory Corruption Detected" trap sparc64: Add HV fault type handlers for ADI related faults sparc64: Add support for ADI register fields, ASIs and traps mm, swap: Add infrastructure for saving page metadata on swap signals, sparc: Add signal codes for ADI violations commit 5bb053bef82523a8fd78d650bca81c9f114fa276 Merge: bb2407a 159f029 Author: Linus Torvalds Date: Tue Apr 3 14:04:18 2018 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next Pull networking updates from David Miller: 1) Support offloading wireless authentication to userspace via NL80211_CMD_EXTERNAL_AUTH, from Srinivas Dasari. 2) A lot of work on network namespace setup/teardown from Kirill Tkhai. Setup and cleanup of namespaces now all run asynchronously and thus performance is significantly increased. 3) Add rx/tx timestamping support to mv88e6xxx driver, from Brandon Streiff. 4) Support zerocopy on RDS sockets, from Sowmini Varadhan. 5) Use denser instruction encoding in x86 eBPF JIT, from Daniel Borkmann. 6) Support hw offload of vlan filtering in mvpp2 dreiver, from Maxime Chevallier. 7) Support grafting of child qdiscs in mlxsw driver, from Nogah Frankel. 8) Add packet forwarding tests to selftests, from Ido Schimmel. 9) Deal with sub-optimal GSO packets better in BBR congestion control, from Eric Dumazet. 10) Support 5-tuple hashing in ipv6 multipath routing, from David Ahern. 11) Add path MTU tests to selftests, from Stefano Brivio. 12) Various bits of IPSEC offloading support for mlx5, from Aviad Yehezkel, Yossi Kuperman, and Saeed Mahameed. 13) Support RSS spreading on ntuple filters in SFC driver, from Edward Cree. 14) Lots of sockmap work from John Fastabend. Applications can use eBPF to filter sendmsg and sendpage operations. 15) In-kernel receive TLS support, from Dave Watson. 16) Add XDP support to ixgbevf, this is significant because it should allow optimized XDP usage in various cloud environments. From Tony Nguyen. 17) Add new Intel E800 series "ice" ethernet driver, from Anirudh Venkataramanan et al. 18) IP fragmentation match offload support in nfp driver, from Pieter Jansen van Vuuren. 19) Support XDP redirect in i40e driver, from Björn Töpel. 20) Add BPF_RAW_TRACEPOINT program type for accessing the arguments of tracepoints in their raw form, from Alexei Starovoitov. 21) Lots of striding RQ improvements to mlx5 driver with many performance improvements, from Tariq Toukan. 22) Use rhashtable for inet frag reassembly, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1678 commits) net: mvneta: improve suspend/resume net: mvneta: split rxq/txq init and txq deinit into SW and HW parts ipv6: frags: fix /proc/sys/net/ipv6/ip6frag_low_thresh net: bgmac: Fix endian access in bgmac_dma_tx_ring_free() net: bgmac: Correctly annotate register space route: check sysctl_fib_multipath_use_neigh earlier than hash fix typo in command value in drivers/net/phy/mdio-bitbang. sky2: Increase D3 delay to sky2 stops working after suspend net/mlx5e: Set EQE based as default TX interrupt moderation mode ibmvnic: Disable irqs before exiting reset from closed state net: sched: do not emit messages while holding spinlock vlan: also check phy_driver ts_info for vlan's real device Bluetooth: Mark expected switch fall-throughs Bluetooth: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for BTUSB_QCA_ROME Bluetooth: btrsi: remove unused including Bluetooth: hci_bcm: Remove DMI quirk for the MINIX Z83-4 sh_eth: kill useless check in __sh_eth_get_regs() sh_eth: add sh_eth_cpu_data::no_xdfar flag ipv6: factorize sk_wmem_alloc updates done by __ip6_append_data() ipv4: factorize sk_wmem_alloc updates done by __ip_append_data() ... commit bb2407a7219760926760f0448fddf00d625e5aec Merge: e40dc66 86afad7 Author: Linus Torvalds Date: Tue Apr 3 13:35:51 2018 -0700 Merge tag 'docs-4.17' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "There's been a fair amount of activity in Documentation/ this time around: - Lots of work aligning Documentation/ABI with reality, done by Aishwarya Pant. - The trace documentation has been converted to RST by Changbin Du - I thrashed up kernel-doc to deal with a parsing issue and to try to make the code more readable. It's still a 20+-year-old Perl hack, though. - Lots of other updates, typo fixes, and more" * tag 'docs-4.17' of git://git.lwn.net/linux: (82 commits) Documentation/process: update FUSE project website docs: kernel-doc: fix parsing of arrays dmaengine: Fix spelling for parenthesis in dmatest documentation dmaengine: Make dmatest.rst indeed reST compatible dmaengine: Add note to dmatest documentation about supported channels Documentation: magic-numbers: Fix typo Documentation: admin-guide: add kvmconfig, xenconfig and tinyconfig commands Input: alps - Update documentation for trackstick v3 format Documentation: Mention why %p prints ptrval COPYING: use the new text with points to the license files COPYING: create a new file with points to the Kernel license files Input: trackpoint: document sysfs interface xfs: Change URL for the project in xfs.txt char/bsr: add sysfs interface documentation acpi: nfit: document sysfs interface block: rbd: update sysfs interface Documentation/sparse: fix typo Documentation/CodingStyle: Add an example for braces docs/vm: update 00-INDEX kernel-doc: Remove __sched markings ... commit 880a3a5325489a143269a8e172e7563ebf9897bc Author: J. Bruce Fields Date: Wed Mar 21 17:19:02 2018 -0400 nfsd: fix incorrect umasks We're neglecting to clear the umask after it's set, which can cause a later unrelated rpc to (incorrectly) use the same umask if it happens to be processed by the same thread. There's a more subtle problem here too: An NFSv4 compound request is decoded all in one pass before any operations are executed. Currently we're setting current->fs->umask at the time we decode the compound. In theory a single compound could contain multiple creates each setting a umask. In that case we'd end up using whichever umask was passed in the *last* operation as the umask for all the creates, whether that was correct or not. So, we should just be saving the umask at decode time and waiting to set it until we actually process the corresponding operation. In practice it's unlikely any client would do multiple creates in a single compound. And even if it did they'd likely be from the same process (hence carry the same umask). So this is a little academic, but we should get it right anyway. Fixes: 47057abde515 (nfsd: add support for the umask attribute) Cc: stable@vger.kernel.org Reported-by: Lucash Stach Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 12 ++++++++++-- fs/nfsd/nfs4xdr.c | 8 +++----- fs/nfsd/xdr4.h | 2 ++ 3 files changed, 15 insertions(+), 7 deletions(-) commit ca486a3b338ea0858104bab80d86475de3575966 Author: Parav Pandit Date: Sun Apr 1 13:51:28 2018 -0500 IB/qedr: Remove GID add/del dummy routines qedr driver's add_gid() and del_gid() callbacks are doing simple checks which are already done by the ib core before invoking these callback routines. Therefore, code is simplified to skip implementing add_gid() and del_gid() callback functions. Signed-off-by: Parav Pandit Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/qedr/main.c | 3 --- drivers/infiniband/hw/qedr/verbs.c | 31 ------------------------------- drivers/infiniband/hw/qedr/verbs.h | 5 ----- 3 files changed, 39 deletions(-) commit 3e64f8d6f514c31b6856bfb97737232dd4afcccb Author: Shiraz Saleem Date: Tue Apr 3 10:32:28 2018 -0500 i40iw: Remove pre-production workaround for resource profile 1 Support for resource profile 1 is currenlty deprecated due to a pre-production errata. Remove this workaround as its no longer needed. Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/i40iw/i40iw_main.c | 2 -- 1 file changed, 2 deletions(-) commit 41d902cb7c326d711674977763c4b30df87611bc Author: Jason Gunthorpe Date: Tue Apr 3 10:00:53 2018 +0300 RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp This structure is pushed down the ex and the non-ex path, so it needs to be aligned to 8 bytes to go through ex without implicit padding. Old user space will provide 4 bytes of resp on !ex and 8 bytes on ex, so take the approach of just copying the minimum length. New user space will consistently provide 8 bytes in both cases. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/qp.c | 4 ++-- include/uapi/rdma/mlx5-abi.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) commit e40dc66220b7ff1b816311b135b9298f8ba14ce6 Merge: cc5ada7c 92d7ec1 Author: Linus Torvalds Date: Tue Apr 3 12:38:19 2018 -0700 Merge tag 'leds_for_4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED updates from Jacek Anaszewski: "New LED class driver: - add driver for Mellanox regmap LEDs Improvement to ledtrig-disk: - extend disk trigger for reads and writes Improvements and fixes to existing LED class drivers: - add more product/board names for PC Engines APU2 - fix wrong dmi_match on PC Engines APU LEDs - clarify chips supported by LM355x driver - fix Kconfig text for MLXCPLD, SYSCON, MC13783, NETXBIG - allow leds-mlxcpld compilation for 32 bit arch" * tag 'leds_for_4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: Fix wrong dmi_match on PC Engines APU LEDs leds: Extends disk trigger for reads and writes leds: Add more product/board names for PC Engines APU2 leds: add driver for support Mellanox regmap LEDs for BMC and x86 platform leds: fix Kconfig text for MLXCPLD, SYSCON, MC13783, NETXBIG leds: Clarify supported chips by LM355x driver leds: leds-mlxcpld: Allow compilation for 32 bit arch commit cc5ada7ca3618e25c1c2be29dad3c092573200d3 Merge: 77624cd2a c6185e2 Author: Linus Torvalds Date: Tue Apr 3 12:25:44 2018 -0700 Merge tag 'for-linus-4.17' of git://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "Mostly small changes, as usual. This does add an IPMI BMC server-side driver, to allow a Linux system to act as an IPMI controller. That's the biggest change, but it is just a new driver that is fairly narrow in use. The other largish change is removing ACPI SPMI probe support, which should have never really been there in the beginning" * tag 'for-linus-4.17' of git://github.com/cminyard/linux-ipmi: ipmi/parisc: Add IPMI chassis poweroff for certain HP PA-RISC and IA-64 servers ipmi_ssif: Fix kernel panic at msg_done_handler ipmi:pci: Blacklist a Realtek "IPMI" device ipmi: Remove ACPI SPMI probing from the system interface driver ipmi: Remove ACPI SPMI probing from the SSIF (I2C) driver ipmi: missing error code in try_smi_init() ipmi: use ARRAY_SIZE for poweroff_functions array sizing calculation ipmi: Consolidate cleanup code ipmi: Remove some unnecessary initializations ipmi: Fix some error cleanup issues ipmi: Add or fix SPDX-License-Identifier in all files ipmi: Re-use existing macros for built-in properties ipmi:pci: Make the PCI defines consistent with normal Linux ones ipmi: kcs_bmc: coding-style fixes and use new poll type char/ipmi: add documentation for sysfs interface ipmi: kcs_bmc: mark expected switch fall-through in kcs_bmc_handle_data ipmi: add an Aspeed KCS IPMI BMC driver ipmi: add a KCS IPMI BMC driver commit 77624cd2a7783fccf2c518768a6fd7a7aeccd002 Merge: dc73d6a 4fc97ef Author: Linus Torvalds Date: Tue Apr 3 12:20:54 2018 -0700 Merge tag 'pinctrl-v4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control bulk updates from Linus Walleij: "New drivers: - Qualcomm SDM845: this is their new flagship SoC platform which seems to be targeted at premium mobile handsets. - Renesas R-Car M3-N SoC. - Renesas R8A77980 SoC. - NXP (ex Freescale) i.MX 6SLL SoC. - Mediatek MT2712 SoC. - Allwinner H6 SoC. Improvements: - Uniphier adds a few new functions and pins. - Renesas refactorings and additional pin definitions. - Improved pin groups for Axis Artpec6. Cleanup: - Drop the TZ1090 drivers. This platform is no longer maintained and is being deleted. - Drop ST-Ericsson U8540/U9540 support as this was never productified. - Overall minor fixes and janitorial" * tag 'pinctrl-v4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (82 commits) pinctrl: uniphier: add UART hardware flow control pin-mux settings pinctrl: sunxi: add support for the Allwinner H6 main pin controller pinctrl: sunxi: change irq_bank_base to irq_bank_map pinctrl: sunxi: introduce IRQ bank conversion function pinctrl: sunxi: refactor irq related register function to have desc pinctrl: msm8998: Remove owner assignment from platform_driver pinctrl: uniphier: divide I2S and S/PDIF audio out pin-mux group pinctrl: uniphier: add PXs2 Audio in/out pin-mux settings pinctrl/amd: poll InterruptEnable bits in enable_irq pinctrl: ocelot: fix gpio direction pinctrl: mtk: fix check warnings. pintcrl: mtk: support bias-disable of generic and special pins simultaneously pinctrl: add mt2712 pinctrl driver pinctrl: pinctrl-single: Fix pcs_request_gpio() when bits_per_mux != 0 pinctrl: imx: Add pinctrl driver support for imx6sll dt-bindings: imx: update pinctrl doc for imx6sll pinctrl: intel: Implement intel_gpio_get_direction callback pinctrl: stm32: add 'depends on HAS_IOMEM' to fix unmet dependency pinctrl: mediatek: mtk-common: use true and false for boolean values pinctrl: sunxi: always look for apb block ... commit dc73d6a8d42d208c027b4bcca59a77d045895977 Merge: dabe518 4472f0f Author: Linus Torvalds Date: Tue Apr 3 12:17:25 2018 -0700 Merge tag 'mmc-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Export host capabilities through debugfs - Export card RCA register via sysfs - Improve card initializing sequence while enabling 4-bit bus - Export a function to enable/disable wakeup for card detect IRQ MMC host: - dw_mmc: Add support for new hi3798cv200 variant - dw_mmc: Remove support for some deprecated DT properties - mediatek: Add support for new variant used on MT7622 SoC - sdhci: Improve wakeup support for SDIO IRQs - sdhci: Improve wakeup support for card detect IRQs - sdhci-omap: Add tuning support - sdhci_omap: Add UHS-I mode support - sunxi: Prepare for runtime PM support via a few re-factorings - tmio: deprecate "toshiba,mmc-wrprotect-disable" DT property - tmio/renesas_sdhi: Consolidate code supporting write protect - tmio: Improve DMA vs PIO handling - tmio: Add support for IP-builtin card detection logic" * tag 'mmc-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (55 commits) mmc: renesas_sdhi: replace EXT_ACC with HOST_MODE mmc: update sdio_claim_irq documentation mmc: Export host capabilities to debugfs. mmc: core: Disable HPI for certain Micron (Numonyx) eMMC cards mmc: block: fix updating ext_csd caches on ioctl call mmc: sunxi: Set our device drvdata earlier mmc: sunxi: Move the reset deassertion before enabling the clocks mmc: sunxi: Move resources management to separate functions mmc: dw_mmc: add support for hi3798cv200 specific extensions of dw-mshc dt-bindings: mmc: add bindings for hi3798cv200-dw-mshc mmc: core: Export card RCA register via sysfs mmc: renesas_sdhi: fix WP detection mmc: core: Use memdup_user() rather than duplicating its implementation mmc: dw_mmc-rockchip: correct property names in debug mmc: sd: Remove redundant err assignment from mmc_read_switch mmc: sdio: Check the return value of sdio_enable_4bit_bus mmc: core: Don't try UHS-I mode if 4-bit mode isn't supported arm64: dts: hi3660: remove 'num-slots' property for dwmmc ARM: dts: lpc18xx: remove 'num-slots' property for dwmmc arm64: dts: stratix10: remove 'num-slots' property for dwmmc ... commit 51125a29a395048fdb3429b8c4ca0ada57097744 Author: Changbin Du Date: Tue Mar 13 18:40:01 2018 +0800 perf trace: Remove redundant ')' There is a redundant ')' at the tail of each event. So remove it. $ sudo perf trace --no-syscalls -e 'kmem:*' -a 899.342 kmem:kfree:(vfs_writev+0xb9) call_site=ffffffff9c453979 ptr=(nil)) 899.344 kmem:kfree:(___sys_recvmsg+0x188) call_site=ffffffff9c9b8b88 ptr=(nil)) Signed-off-by: Changbin Du Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1520937601-24952-1-git-send-email-changbin.du@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dabe51840e2790aa7e66c53990d15c663b0d628a Merge: 3ac684b e3d7fba Author: Linus Torvalds Date: Tue Apr 3 12:14:54 2018 -0700 Merge tag 'hsi-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI updates from Sebastian Reichel: - spelling/typo fixes - remove extra error printing for -ENOMEM * tag 'hsi-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: hsi_char: Delete an error message for a failed memory allocation in hsc_probe() HSI: ssi_protocol: fix spelling mistake: "trigerred" -> "triggered" HSI: ssi_protocol: Delete an error message for a failed memory allocation in ssi_protocol_probe() HSI: ssi_protocol: Fix a typo in two comment lines commit 3ac684b88148bf132fbf02a133cba9dcfb2e7aa2 Merge: 75dcc7e fd73a3e6 Author: Linus Torvalds Date: Tue Apr 3 12:10:01 2018 -0700 Merge tag 'for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - Microsemi Ocelot reset support - Spreadtrum SC27xx reset support - generic gpio charger: lot's of cleanups - axp20x fuel gauge: add AXP813 support - misc fixes, including one devicetree change for the Nokia N900, that has been Acked-by Tony Lindgren * tag 'for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (27 commits) power: reset: at91-reset: Switch from the pr_*() to the dev_*() logging functions power: reset: at91-poweroff: Remove redundant dev_err call in at91_poweroff_probe() power: reset: at91-poweroff: Switch from the pr_*() to the dev_*() logging functions power: reset: make function sc27xx_poweroff_shutdown static power: supply: da9150-fg: remove VLA usage ARM: dts: omap3-n900: Add link between battery and charger power: supply: bq2415x: add DT referencing support power: supply: bq27xxx: support missing supplier device max17042: propagate of_node to power supply device power: supply: axp288_fuel_gauge: Fix full status reporting power: supply: axp288_fuel_gauge: Do not register FG on ECS EF20EA power: reset: gpio-poweroff: Support for timeout from device property dt-bindings: power: reset: gpio-poweroff: Add 'timeout-ms' property power: reset: Add Spreadtrum SC27xx PMIC power off support power: supply: axp20x_battery: add support for AXP813 dt-bindings: power: supply: axp20x: add AXP813 battery DT binding power: supply: axp20x_battery: use data struct for variant specific code power: supply: gpio-charger: Remove pdata from gpio_charger power: supply: gpio-charger: Use GPIOF_ACTIVE_LOW for legacy setup power: supply: gpio-charger: Remove redundant dev_err call in probe function ... commit f3aefb6a7066e24bfea7fcf1b07907576de69d63 Author: Eric Biggers Date: Wed Mar 28 10:57:22 2018 -0700 sunrpc: remove incorrect HMAC request initialization make_checksum_hmac_md5() is allocating an HMAC transform and doing crypto API calls in the following order: crypto_ahash_init() crypto_ahash_setkey() crypto_ahash_digest() This is wrong because it makes no sense to init() the request before a key has been set, given that the initial state depends on the key. And digest() is short for init() + update() + final(), so in this case there's no need to explicitly call init() at all. Before commit 9fa68f620041 ("crypto: hash - prevent using keyed hashes without setting key") the extra init() had no real effect, at least for the software HMAC implementation. (There are also hardware drivers that implement HMAC-MD5, and it's not immediately obvious how gracefully they handle init() before setkey().) But now the crypto API detects this incorrect initialization and returns -ENOKEY. This is breaking NFS mounts in some cases. Fix it by removing the incorrect call to crypto_ahash_init(). Reported-by: Michael Young Fixes: 9fa68f620041 ("crypto: hash - prevent using keyed hashes without setting key") Fixes: fffdaef2eb4a ("gss_krb5: Add support for rc4-hmac encryption") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Signed-off-by: J. Bruce Fields net/sunrpc/auth_gss/gss_krb5_crypto.c | 3 --- 1 file changed, 3 deletions(-) commit 38a70315599dedacd9ff3bd1016f9048c9d0ad12 Author: Chuck Lever Date: Tue Mar 27 10:54:21 2018 -0400 NFSD: Clean up legacy NFS SYMLINK argument XDR decoders Move common code in NFSD's legacy SYMLINK decoders into a helper. The immediate benefits include: - one fewer data copies on transports that support DDP - consistent error checking across all versions - reduction of code duplication - support for both legal forms of SYMLINK requests on RDMA transports for all versions of NFS (in particular, NFSv2, for completeness) In the long term, this helper is an appropriate spot to perform a per-transport call-out to fill the pathname argument using, say, RDMA Reads. Filling the pathname in the proc function also means that eventually the incoming filehandle can be interpreted so that filesystem- specific memory can be allocated as a sink for the pathname argument, rather than using anonymous pages. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields fs/nfsd/nfs3proc.c | 10 +++++++ fs/nfsd/nfs3xdr.c | 51 +++++++++-------------------------- fs/nfsd/nfsproc.c | 14 +++++----- fs/nfsd/nfsxdr.c | 49 +++++++++++++++++++-------------- fs/nfsd/xdr.h | 1 + fs/nfsd/xdr3.h | 1 + fs/nfsd/xdr4.h | 2 ++ include/linux/sunrpc/svc.h | 2 ++ net/sunrpc/svc.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 132 insertions(+), 65 deletions(-) commit 8154ef2776aa512a3eaa0e7db030dc4803354d61 Author: Chuck Lever Date: Tue Mar 27 10:54:07 2018 -0400 NFSD: Clean up legacy NFS WRITE argument XDR decoders Move common code in NFSD's legacy NFS WRITE decoders into a helper. The immediate benefit is reduction of code duplication and some nice micro-optimizations (see below). In the long term, this helper can perform a per-transport call-out to fill the rq_vec (say, using RDMA Reads). The legacy WRITE decoders and procs are changed to work like NFSv4, which constructs the rq_vec just before it is about to call vfs_writev. Why? Calling a transport call-out from the proc instead of the XDR decoder means that the incoming FH can be resolved to a particular filesystem and file. This would allow pages from the backing file to be presented to the transport to be filled, rather than presenting anonymous pages and copying or flipping them into the file's page cache later. I also prefer using the pages in rq_arg.pages, instead of pulling the data pages directly out of the rqstp::rq_pages array. This is currently the way the NFSv3 write decoder works, but the other two do not seem to take this approach. Fixing this removes the only reference to rq_pages found in NFSD, eliminating an NFSD assumption about how transports use the pages in rq_pages. Lastly, avoid setting up the first element of rq_vec as a zero- length buffer. This happens with an RDMA transport when a normal Read chunk is present because the data payload is in rq_arg's page list (none of it is in the head buffer). Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields fs/nfsd/nfs3proc.c | 8 ++++++-- fs/nfsd/nfs3xdr.c | 16 ++++------------ fs/nfsd/nfsproc.c | 9 +++++++-- fs/nfsd/nfsxdr.c | 14 ++------------ fs/nfsd/xdr.h | 2 +- fs/nfsd/xdr3.h | 2 +- include/linux/sunrpc/svc.h | 2 ++ net/sunrpc/svc.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 65 insertions(+), 30 deletions(-) commit fff4080b2f1389ecf3028d72eb70e1837df48b01 Author: Chuck Lever Date: Tue Mar 27 10:53:54 2018 -0400 nfsd: Trace NFSv4 COMPOUND execution This helps record the identity and timing of the ops in each NFSv4 COMPOUND, replacing dprintk calls that did much the same thing. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 9 +++------ fs/nfsd/trace.h | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 6 deletions(-) commit 87c5942e8fae81ac296267654a047eb2db81592b Author: Chuck Lever Date: Wed Mar 28 13:29:11 2018 -0400 nfsd: Add I/O trace points in the NFSv4 read proc NFSv4 read compound processing invokes nfsd_splice_read and nfs_readv directly, so the trace points currently in nfsd_read are not invoked for NFSv4 reads. Move the NFSD READ trace points to common helpers so that NFSv4 reads are captured. Also, record any local I/O error that occurs, the total count of bytes that were actually returned, and whether splice or vectored read was used. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 5 +++++ fs/nfsd/nfs4xdr.c | 10 ++++++---- fs/nfsd/trace.h | 4 +++- fs/nfsd/vfs.c | 34 ++++++++++++++++++---------------- fs/nfsd/vfs.h | 11 +++++++---- 5 files changed, 39 insertions(+), 25 deletions(-) commit d890be159a71395bd4ceca09233a8a56d7da69ee Author: Chuck Lever Date: Tue Mar 27 10:53:27 2018 -0400 nfsd: Add I/O trace points in the NFSv4 write path NFSv4 write compound processing invokes nfsd_vfs_write directly. The trace points currently in nfsd_write are not effective for NFSv4 writes. Move the trace points into the shared nfsd_vfs_write() helper. After the I/O, we also want to record any local I/O error that might have occurred, and the total count of bytes that were actually moved (rather than the requested number). Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 7 +++++-- fs/nfsd/trace.h | 33 +++++++++++++++++++++++++++++++++ fs/nfsd/vfs.c | 23 ++++++++++++----------- 3 files changed, 50 insertions(+), 13 deletions(-) commit f394b62b7b0dd24757e9813e19f4b6091c5a28f6 Author: Chuck Lever Date: Tue Mar 27 10:53:11 2018 -0400 nfsd: Add "nfsd_" to trace point names Follow naming convention used in client and in sunrpc layers. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields fs/nfsd/nfs4layouts.c | 16 ++++++++-------- fs/nfsd/nfs4proc.c | 4 ++-- fs/nfsd/trace.h | 4 ++-- fs/nfsd/vfs.c | 16 ++++++++-------- 4 files changed, 20 insertions(+), 20 deletions(-) commit 79e0b4e247b3d1787ade451cc0187e8d3b0e6e53 Author: Chuck Lever Date: Tue Mar 27 10:52:57 2018 -0400 nfsd: Record request byte count, not count of vectors Byte count is more helpful to know than vector count. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields fs/nfsd/trace.h | 15 +++++---------- fs/nfsd/vfs.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 18 deletions(-) commit afa720a0910bd0fe4a714ab9b902ff6e845900c3 Author: Chuck Lever Date: Tue Mar 27 10:52:43 2018 -0400 nfsd: Fix NFSD trace points nfsd-1915 [003] 77915.780959: write_opened: [FAILED TO PARSE] xid=3286130958 fh=0 offset=154624 len=1 nfsd-1915 [003] 77915.780960: write_io_done: [FAILED TO PARSE] xid=3286130958 fh=0 offset=154624 len=1 nfsd-1915 [003] 77915.780964: write_done: [FAILED TO PARSE] xid=3286130958 fh=0 offset=154624 len=1 Byte swapping and knfsd_fh_hash() are not available in "trace-cmd report", where the print format string is actually used. These data transformations have to be done during the TP_fast_assign step. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields fs/nfsd/trace.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 55f5088c22cc83dbc64394abfbf76cd1ff5e7cd0 Author: Chuck Lever Date: Tue Mar 27 10:52:27 2018 -0400 svc: Report xprt dequeue latency Record the time between when a rqstp is enqueued on a transport and when it is dequeued. This includes how long the rqstp waits on the queue and how long it takes the kernel scheduler to wake a nfsd thread to service it. The svc_xprt_dequeue trace point is altered to include the number of microseconds between xprt_enqueue and xprt_dequeue. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc.h | 1 + include/trace/events/sunrpc.h | 30 ++++++++++++++++++++++++++---- net/sunrpc/svc_xprt.c | 4 ++-- 3 files changed, 29 insertions(+), 6 deletions(-) commit aaba72cd4e793fbf1c04e06dee3d2c3710339678 Author: Chuck Lever Date: Tue Mar 27 10:51:39 2018 -0400 sunrpc: Report per-RPC execution stats Introduce a mechanism to report the server-side execution latency of each RPC. The goal is to enable user space to filter the trace record for latency outliers, build histograms, etc. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc.h | 1 + include/trace/events/sunrpc.h | 21 +++++++++++++++++++++ net/sunrpc/svc_xprt.c | 3 ++- 3 files changed, 24 insertions(+), 1 deletion(-) commit 0b9547bf6b94317b3f8e2496dc2b44cb6e599b01 Author: Chuck Lever Date: Tue Mar 27 10:51:22 2018 -0400 sunrpc: Re-purpose trace_svc_process Currently, trace_svc_process has two call sites: 1. Just after a call to svc_send. svc_send already invokes trace_svc_send with the same arguments just before returning 2. Just before a call to svc_drop. svc_drop already invokes trace_svc_drop with the same arguments just after it is called Therefore trace_svc_process does not provide any additional information not already provided by these other trace points. However, it would be useful to record the incoming RPC procedure. So reuse trace_svc_process for this purpose. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/trace/events/sunrpc.h | 30 ++++++++++++++++++++++++++---- net/sunrpc/svc.c | 9 +++------ 2 files changed, 29 insertions(+), 10 deletions(-) commit ece200ddd54b9ce840cfee554fb812560c545c7d Author: Chuck Lever Date: Tue Mar 27 10:51:00 2018 -0400 sunrpc: Save remote presentation address in svc_xprt for trace events TP_printk defines a format string that is passed to user space for converting raw trace event records to something human-readable. My user space's printf (Oracle Linux 7), however, does not have a %pI format specifier. The result is that what is supposed to be an IP address in the output of "trace-cmd report" is just a string that says the field couldn't be displayed. To fix this, adopt the same approach as the client: maintain a pre- formated presentation address for occasions when %pI is not available. The location of the trace_svc_send trace point is adjusted so that rqst->rq_xprt is not NULL when the trace event is recorded. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_xprt.h | 4 ++ include/trace/events/sunrpc.h | 89 ++++++++++++-------------------- net/sunrpc/svc_xprt.c | 3 +- net/sunrpc/svcsock.c | 1 + net/sunrpc/xprtrdma/svc_rdma_transport.c | 4 +- 5 files changed, 43 insertions(+), 58 deletions(-) commit 41f306d0c287e0cc04054135f9f4ceb003ad6795 Author: Chuck Lever Date: Tue Mar 27 10:50:42 2018 -0400 sunrpc: Simplify trace_svc_recv There doesn't seem to be a lot of value in calling trace_svc_recv in the failing case. 1. There are two very common cases: one is the transport is not ready, and the other is shutdown. Neither is terribly interesting. 2. The trace record for the failing case contains nothing but the status code. Therefore the trace point call site in the error exit is removed. Since the trace point is now recording a length instead of a status, rename the status field and remove the case that records a zero XID. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/trace/events/sunrpc.h | 14 +++++++------- net/sunrpc/svc_xprt.c | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) commit 7dbb53baed3c3969dea43e3cee261a75adde123c Author: Chuck Lever Date: Tue Mar 27 10:50:27 2018 -0400 sunrpc: Simplify do_enqueue tracing There are three cases where svc_xprt_do_enqueue() returns without waking an nfsd thread: 1. There is no work to do 2. The transport is already busy 3. There are no available nfsd threads Only 3. is truly interesting. Move the trace point so it records that there was work to do and either an nfsd thread was awoken, or a free one could not found. As an additional clean up, remove a redundant comment and a couple of dprintk call sites. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/svc_xprt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit caa3e106dc623eb41542e6221abecf9956e8a0e6 Author: Chuck Lever Date: Tue Mar 27 10:50:07 2018 -0400 sunrpc: Move trace_svc_xprt_dequeue() Reduce the amount of noise generated by trace_svc_xprt_dequeue by moving it to the end of svc_get_next_xprt. This generates exactly one trace event when a ready xprt is found, rather than spurious events when there is no work to do. The empty events contain no information that can't be obtained simply by tracing function calls to svc_xprt_dequeue. A small additional benefit is simplification of the svc_xprt_event trace class, which no longer has to handle the case when the @xprt parameter is NULL. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/trace/events/sunrpc.h | 16 +++++----------- net/sunrpc/svc_xprt.c | 5 +---- 2 files changed, 6 insertions(+), 15 deletions(-) commit 03edb90f57a5f7edaa13db3174e269331ef9a527 Author: Chuck Lever Date: Tue Mar 27 10:49:53 2018 -0400 sunrpc: Update show_svc_xprt_flags() to include recently added flags XPT_KILL_TEMP was added by commit 546125d16142 ("sunrpc: don't call sleeping functions from the notifier block callbacks"), and XPT_CONG_CTRL was added by commit 362142b25843 ("sunrpc: flag transports as having congestion control") . Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/trace/events/sunrpc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 989f881ebf77d70e883dd0fbcfa04a058d97f771 Author: Chuck Lever Date: Tue Mar 27 10:49:38 2018 -0400 svc: Simplify ->xpo_secure_port Clean up: Instead of returning a value that is used to set or clear a bit, just make ->xpo_secure_port mangle that bit, and return void. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_xprt.h | 2 +- net/sunrpc/svc_xprt.c | 5 +---- net/sunrpc/svcsock.c | 7 +++++-- net/sunrpc/xprtrdma/svc_rdma_transport.c | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) commit 63a1b1569372860fdef9e25edfc2320766b2f4c2 Author: Chuck Lever Date: Tue Mar 27 10:49:22 2018 -0400 sunrpc: Remove unneeded pointer dereference Clean up: Noticed during code inspection that there is already a local automatic variable "xprt" so dereferencing rqst->rq_xprt again is unnecessary. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/svc_xprt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47299f79ea4742b191931ffc33cde2401a9792e4 Author: Stefan Agner Date: Mon Mar 19 23:37:05 2018 +0100 nfsd: use correct enum type in decode_cb_op_status Use enum nfs_cb_opnum4 in decode_cb_op_status. This fixes warnings seen with clang: fs/nfsd/nfs4callback.c:451:36: warning: implicit conversion from enumeration type 'enum nfs_cb_opnum4' to different enumeration type 'enum nfs_opnum4' [-Wenum-conversion] status = decode_cb_op_status(xdr, OP_CB_SEQUENCE, &cb->cb_seq_status); ~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~ Signed-off-by: Stefan Agner Signed-off-by: J. Bruce Fields fs/nfsd/nfs4callback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51d87bc2bfa7ff5381941654738540fb23cc5f6a Author: Fengguang Wu Date: Thu Mar 22 13:37:20 2018 +0800 nfsd: fix boolreturn.cocci warnings fs/nfsd/nfs4state.c:926:8-9: WARNING: return of 0/1 in function 'nfs4_delegation_exists' with return type bool fs/nfsd/nfs4state.c:2955:9-10: WARNING: return of 0/1 in function 'nfsd4_compound_in_session' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Fixes: 68b18f52947b ("nfsd: make nfs4_get_existing_delegation less confusing") Signed-off-by: Fengguang Wu Reported-by: Dan Carpenter [bfields: also fix -EAGAIN] Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 75dcc7ef952af106c1b7051daa591b566632fd30 Merge: b51c435 0930437 Author: Linus Torvalds Date: Tue Apr 3 12:06:21 2018 -0700 Merge tag 'spi-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull SPI updates from Mark Brown: "A quiet release for SPI, some fixes and small updates for individual drivers with one bigger change from Linus Walleij which coverts the bitbanging SPI driver to use the GPIO descriptor API from Linus Walleij. Since GPIO descriptors were used by platform data this means there's a few changes in arch/ making relevant updates for a few platforms and one misc driver that are affected" * tag 'spi-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (24 commits) MAINTAINERS: update Andi's e-mail spi: spi-atmel: Use correct enum for DMA transfer direction spi: sh-msiof: Document R-Car M3-N support spi: sh-msiof: Use correct enum for DMA transfer direction spi: sprd: Add the support of restarting the system spi: sprd: Simplify the transfer function spi: Fix unregistration of controller with fixed SPI bus number spi: rspi: use correct enum for DMA transfer direction spi: jcore: disable ref_clk after getting its rate spi: bcm-qspi: fIX some error handling paths spi: pxa2xx: Disable runtime PM if controller registration fails spi: tegra20-slink: use true and false for boolean values spi: Fix scatterlist elements size in spi_map_buf spi: atmel: init FIFOs before spi enable spi: orion: Prepare space for per-child options spi: orion: Make the error message greppable spi: orion: Rework GPIO CS handling spi: bcm2835aux: Avoid 64-bit arithmetic in xfer len calc spi: spi-gpio: Augment device tree bindings spi: spi-gpio: Rewrite to use GPIO descriptors ... commit 520d3f01ea5322edeedff4bb25a0aff07ad72d43 Author: Arnaldo Carvalho de Melo Date: Mon Apr 2 16:42:01 2018 -0300 perf annotate stdio2: Print more descriptive event information header To match the recently added event header information to --tui, e.g.: # perf annotate --ignore-vmlinux --stdio2 _raw_spin_lock_irqsave Samples: 128 of event 'cycles:ppp', 4000 Hz, Event count (approx.): 48617682 _raw_spin_lock_irqsave() /proc/kcore 0.78 nop 7.03 push %rbx 3.12 pushfq 6.25 pop %rax nop mov %rax,%rbx 3.12 cli nop xor %eax,%eax mov $0x1,%edx 79.69 lock cmpxchg %edx,(%rdi) test %eax,%eax ↓ jne 2b mov %rbx,%rax pop %rbx ← retq 2b: mov %eax,%esi → callq *ffffffffb30eaed0 mov %rbx,%rax pop %rbx ← retq # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Martin Liška Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ujy46x7cldyhyxelyf2b9quy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 843f38d382b1ca2f6f4ae2ef7c35933e6319ffbb Author: Patrik Torstensson Date: Thu Mar 22 18:18:04 2018 -0700 dm verity: add 'check_at_most_once' option to only validate hashes once This allows platforms that are CPU/memory contrained to verify data blocks only the first time they are read from the data device, rather than every time. As such, it provides a reduced level of security because only offline tampering of the data device's content will be detected, not online tampering. Hash blocks are still verified each time they are read from the hash device, since verification of hash blocks is less performance critical than data blocks, and a hash block will not be verified any more after all the data blocks it covers have been verified anyway. This option introduces a bitset that is used to check if a block has been validated before or not. A block can be validated more than once as there is no thread protection for the bitset. These changes were developed and tested on entry-level Android Go devices. Signed-off-by: Patrik Torstensson Signed-off-by: Mike Snitzer Documentation/device-mapper/verity.txt | 11 ++++++ drivers/md/dm-verity-target.c | 64 +++++++++++++++++++++++++++++++--- drivers/md/dm-verity.h | 1 + 3 files changed, 71 insertions(+), 5 deletions(-) commit 45354f1eb67224669a1de94dbfcb8bb226be1f74 Author: Mikulas Patocka Date: Mon Mar 26 20:29:47 2018 +0200 dm bufio: don't embed a bio in the dm_buffer structure The bio structure consumes a substantial part of dm_buffer. The bio structure is only needed when doing I/O on the buffer, thus we don't have to embed it in the buffer. Allocate the bio structure only when doing I/O. We don't need to create a bio_set because, in case of allocation failure, dm-bufio falls back to using dm-io (which keeps its own bio_set). Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 105 ++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 60 deletions(-) commit f51f2e0a7fb17af57634c65687c985c9b3449263 Author: Mikulas Patocka Date: Mon Mar 26 20:29:46 2018 +0200 dm bufio: support non-power-of-two block sizes Support block sizes that are not a power-of-two (but they must be a multiple of 512b). As always, a slab cache is used for allocations. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 64 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 25 deletions(-) commit 359dbf19ab524652a2208a2a2cddccec2eede2ad Author: Mikulas Patocka Date: Mon Mar 26 20:29:45 2018 +0200 dm bufio: use slab cache for dm_buffer structure allocations kmalloc padded to the next power of two, using a slab cache avoids this. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 03b02939593700caf391dc02b86b23b0d7aac2e5 Author: Mikulas Patocka Date: Mon Mar 26 20:29:44 2018 +0200 dm bufio: reorder fields in dm_buffer structure Reorder fields in dm_buffer structure to improve packing and reduce structure size. The compiler allocates 32-bit integer for field 'enum data_mode', so change it to unsigned char. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6b5e718cc138ef691e91685535e3ba776acc4893 Author: Mikulas Patocka Date: Thu Mar 15 17:22:00 2018 -0400 dm bufio: relax alignment constraint on slab cache The I/O buffer doesn't have to be aligned on block size granularity, relax alignment to ARCH_KMALLOC_MINALIGN (required to allow DMA from slab cache memory on some architectures). Also, set SLAB_RECLAIM_ACCOUNT so that the memory allocated from the cache is accounted as reclaimable and doesn't inflate the 'used' entry in the free command. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21bb13276768da7925c0b532037e071877e4fb4d Author: Mikulas Patocka Date: Mon Mar 26 20:29:42 2018 +0200 dm bufio: remove code that merges slab caches All slab allocators can merge duplicate caches. So dm-bufio doesn't need extra slab merging logic. Instead it can just allocate one slab cache per client and let the allocator merge them. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 53 ++++++++++++++------------------------------------- 1 file changed, 14 insertions(+), 39 deletions(-) commit eeb67a0ba04dfb80ec1a956fa6345f4ca5b9c937 Author: Mikulas Patocka Date: Thu Mar 15 17:16:07 2018 -0400 dm bufio: get rid of slab cache name allocations dm-bufio keeps the dm_bufio_cache_names array that holds names of the slab caches. Since the commit db265eca7700 ("mm/sl[aou]b: Move duping of slab name to slab_common.c"), the kernel automatically duplicates the slab cache name when creating the slab cache, so we no longer have to keep the name allocated. Remove the code that allocates the slab names and keeps them around. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) commit afa53df869121fd4f6f1265cbe794d64387890ae Author: Mikulas Patocka Date: Thu Mar 15 16:02:31 2018 -0400 dm bufio: move dm-bufio.h to include/linux/ Move dm-bufio.h to include/linux/ so that external GPL'd DM target modules can use it. It is better to allow the use of dm-bufio than force external modules to implement the equivalent buffered IO mechanism in some new way. The hope is this will encourage the use of dm-bufio; which will then make it easier for a GPL'd external DM target module to be included upstream. A couple dm-bufio EXPORT_SYMBOL exports have also been updated to use EXPORT_SYMBOL_GPL. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 8 +- drivers/md/dm-bufio.h | 148 -------------------------- drivers/md/dm-integrity.c | 2 +- drivers/md/dm-snap-persistent.c | 2 +- drivers/md/dm-verity.h | 2 +- drivers/md/persistent-data/dm-block-manager.c | 2 +- include/linux/dm-bufio.h | 148 ++++++++++++++++++++++++++ 7 files changed, 156 insertions(+), 156 deletions(-) commit 1f013174b352057557e47321f23a33e39e752bd4 Author: Mikulas Patocka Date: Sun Mar 4 01:53:00 2018 -0500 dm bufio: delete outdated comment This comment was true when dm-bufio was written but, since 4.3, bios can now have arbitrary size and the driver splits them. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 4 ---- 1 file changed, 4 deletions(-) commit 00716545c894fc464e00612809d9cb836b180c99 Author: Denis Semakin Date: Tue Mar 13 13:23:45 2018 +0400 dm: add support for secure erase forwarding Set QUEUE_FLAG_SECERASE in DM device's queue_flags if a DM table's data devices support secure erase. Also, add support for secure erase to both the linear and striped targets. Signed-off-by: Denis Semakin Signed-off-by: Mike Snitzer drivers/md/dm-linear.c | 1 + drivers/md/dm-stripe.c | 2 ++ drivers/md/dm-table.c | 31 +++++++++++++++++++++++++++++++ drivers/md/dm.c | 12 ++++++++++++ include/linux/device-mapper.h | 6 ++++++ 5 files changed, 52 insertions(+) commit 0519c71e8d461ac3ef9a555bb7339243c9128d37 Author: Mike Snitzer Date: Mon Mar 26 11:49:16 2018 -0400 dm: backfill abnormal IO support to non-splitting IO submission Otherwise, these abnormal IOs would be sent to the DM target regardless of whether the target advertised support for them. Factor out __process_abnormal_io() from __split_and_process_non_flush() so that discards, write same, etc may be conditionally processed. Fixes: 978e51ba3 ("dm: optimize bio-based NVMe IO submission") Cc: stable@vger.kernel.org # 4.16 Signed-off-by: Mike Snitzer drivers/md/dm.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) commit 880bcce0dcc3172fe865352b492c41d85290cb8d Author: Heinz Mauelshagen Date: Fri Mar 16 23:01:59 2018 +0100 dm raid: fix nosync status Fix a race for "nosync" activations providing "aa.." device health characters and "0/N" sync ratio rather than "AA..." and "N/N". Occurs when status for the raid set is retrieved during resume before the MD sync thread starts and clears the MD_RECOVERY_NEEDED flag. Cc: stable@vger.kernel.org # 4.16+ Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8192a0cd7648f222d8ba73f302df0f03f07d5c4f Author: Wang Sheng-Hui Date: Sat Mar 10 10:18:55 2018 +0800 dm mpath: use DM_MAPIO_SUBMITTED instead of magic number 0 in process_queued_bios() Signed-off-by: Wang Sheng-Hui Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 706dd22f12628b70b342bada819ffc1e80337f3f Author: Tycho Andersen Date: Thu Mar 8 20:35:44 2018 -0700 dm stripe: get rid of a Variable Length Array (VLA) Ideally, we'd like to get rid of all VLAs in the kernel and add -Wvla to the build args: https://lkml.org/lkml/2018/3/7/621 This one is a simple case, since we don't actually need the VLA at all: we can just iterate over the stripes twice, once to emit their names, and the second time to emit status (i.e. trade memory for time). Since the number of stripes is probably low, this is hopefully not that expensive. Signed-off-by: Tycho Andersen Reviewed-by: Kees Cook Signed-off-by: Mike Snitzer drivers/md/dm-stripe.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e5c4cb9b1b78edb5bd42a9bd7315a0d7b842ac71 Author: Qu Wenruo Date: Wed Feb 28 15:32:47 2018 +0800 dm log writes: record metadata flag for better flags record So developer could distinguish data and metadata bios easier. Signed-off-by: Qu Wenruo Reviewed-by: Josef Bacik Signed-off-by: Mike Snitzer drivers/md/dm-log-writes.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit e16b4f99f0f79682a7efe191a8ce694d87ca9fc8 Author: Milan Broz Date: Tue Feb 13 14:50:50 2018 +0100 dm integrity: fail early if required HMAC key is not available Since crypto API commit 9fa68f62004 ("crypto: hash - prevent using keyed hashes without setting key") dm-integrity cannot use keyed algorithms without the key being set. The dm-integrity recognizes this too late (during use of HMAC), so it allows creation and formatting of superblock, but the device is in fact unusable. Fix it by detecting the key requirement in integrity table constructor. Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 3 +++ 1 file changed, 3 insertions(+) commit 2d77dafe23b6c0cc9e501bda0e3f138b96ecd811 Author: Wang Sheng-Hui Date: Mon Feb 5 10:25:44 2018 +0800 dm: remove unused macro DM_MOD_NAME_SIZE Signed-off-by: Wang Sheng-Hui Signed-off-by: Mike Snitzer drivers/md/dm-target.c | 2 -- 1 file changed, 2 deletions(-) commit afac6bd6d1a3ea38c800aa82d6d0ceda518b3aec Author: Heinz Mauelshagen Date: Thu Feb 1 19:06:12 2018 +0100 dm unstripe: remove unnecessary header includes Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-unstripe.c | 6 ------ 1 file changed, 6 deletions(-) commit 91e065d8f2354f25246d5c6a0ee270ab74c43dd8 Author: Heinz Mauelshagen Date: Thu Feb 1 19:06:10 2018 +0100 dm unstripe: remove superfluous module init error path message Signed-off-by: Heinz Mauelshagen Reviewed-by: Scott Bauer Signed-off-by: Mike Snitzer drivers/md/dm-unstripe.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit ba5dfbb712e72002c4e4b02def4df4a020849ce6 Author: Heinz Mauelshagen Date: Thu Feb 1 19:06:09 2018 +0100 dm unstripe: add "dm-unstriped" module alias This target's kernel module being named dm-unstripe.ko doesn't allow lvm2's DM module autoload capability to load the dm-unstripe.ko because lvm2 looks for dm-unstriped.ko due to the target name being "unstriped". Add the "dm-unstriped" module alias to resolve this oversight. NOTE: this isn't needed for the "striped" target, despite its source file being named dm-stripe.c, because it is part of dm-mod.ko. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-unstripe.c | 1 + 1 file changed, 1 insertion(+) commit 2ae600cd15a7cce7f2c26d24cfbd9c1bc9e1810d Author: Heinz Mauelshagen Date: Thu Feb 1 19:06:09 2018 +0100 dm unstripe: support non-power-of-2 chunk size Address "FIXME: must support non power of 2 chunk_size, dm-stripe.c does". Bump target version to indicate change. Signed-off-by: Heinz Mauelshagen Tested-by: Scott Bauer Reviewed-by: Scott Bauer Signed-off-by: Mike Snitzer drivers/md/dm-unstripe.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 5059353df86e2573ccd9d43fd9d9396dcec47ca2 Author: Mikulas Patocka Date: Sun Aug 13 22:45:08 2017 -0400 dm crypt: limit the number of allocated pages dm-crypt consumes an excessive amount memory when the user attempts to zero a dm-crypt device with "blkdiscard -z". The command "blkdiscard -z" calls the BLKZEROOUT ioctl, it goes to the function __blkdev_issue_zeroout, __blkdev_issue_zeroout sends a large amount of write bios that contain the zero page as their payload. For each incoming page, dm-crypt allocates another page that holds the encrypted data, so when processing "blkdiscard -z", dm-crypt tries to allocate the amount of memory that is equal to the size of the device. This can trigger OOM killer or cause system crash. Fix this by limiting the amount of memory that dm-crypt allocates to 2% of total system memory. This limit is system-wide and is divided by the number of active dm-crypt devices and each device receives an equal share. Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) commit 1eb5fa849f2bf9186a618e85bea23f02e527540a Author: Mike Snitzer Date: Wed Feb 28 15:59:59 2018 -0500 dm: allow targets to return output from messages they are sent Could be useful for a target to return stats or other information. If a target does DMEMIT() anything to @result from its .message method then it must return 1 to the caller. Signed-off-By: Mike Snitzer drivers/md/dm-cache-target.c | 3 ++- drivers/md/dm-crypt.c | 3 ++- drivers/md/dm-era-target.c | 3 ++- drivers/md/dm-ioctl.c | 2 +- drivers/md/dm-log-writes.c | 3 ++- drivers/md/dm-mpath.c | 3 ++- drivers/md/dm-raid.c | 3 ++- drivers/md/dm-switch.c | 3 ++- drivers/md/dm-thin.c | 3 ++- include/linux/device-mapper.h | 3 ++- include/uapi/linux/dm-ioctl.h | 4 ++-- 11 files changed, 21 insertions(+), 12 deletions(-) commit b51c4354dffd32b3472c5a3da7ce864c7be82601 Merge: ffd776b 36fd679 Author: Linus Torvalds Date: Tue Apr 3 11:52:16 2018 -0700 Merge tag 'regulator-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "A very small set of updates for the regulator API this time around, there's a few bug fixes and also: - Conversion of the regulator API to use GPIO descriptors rather than numbers from Linus Walleij. - New drivers for Marvell 88PG86x and Qualcomm PM8998 and PMI8998" * tag 'regulator-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: qcom: smd: Add pm8998 and pmi8998 regulators regulator: core: Add missing blank line between functions regulator: qcom_smd: Drop regulator/{machine,of_regulator} includes regulator: giving regulator controlling gpios a non-empty label when used through the devicetree. regulator: gpio: Fix some error handling paths in 'gpio_regulator_probe()' regulator: 88pg86x: new i2c dual regulator chip regulator: 88pg86x: add DT bindings document regulator: da9211: Pass descriptors instead of GPIO numbers regulator: da9055: Pass descriptor instead of GPIO number regulator: core: Support passing an initialized GPIO enable descriptor regulator: dt: regulator-name is required property regulator: of: Add a missing 'of_node_put()' in an error handling path of 'of_regulator_match()' commit 243f29fe449bbead69076ad861dbe8f51b42c4d7 Author: Dan Williams Date: Mon Apr 2 13:14:25 2018 -0700 libnvdimm: add an api to cast a 'struct nd_region' to its 'struct device' For debug, it is useful for bus providers to be able to retrieve the 'struct device' associated with an nd_region instance that it registered. We already have to_nd_region() to perform the reverse cast operation, in fact its duplicate declaration can be removed from the private drivers/nvdimm/nd.h header. Reviewed-by: Dave Jiang Signed-off-by: Dan Williams drivers/nvdimm/nd.h | 1 - drivers/nvdimm/region_devs.c | 8 ++++++++ include/linux/libnvdimm.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) commit 78727137fdf49edf9f731bde79d7189067b4047a Author: Dan Williams Date: Mon Apr 2 16:40:04 2018 -0700 nfit, address-range-scrub: fix scrub in-progress reporting There is a small window whereby ARS scan requests can schedule work that userspace will miss when polling scrub_show. Hold the init_mutex lock over calls to report the status to close this potential escape. Also, make sure that requests to cancel the ARS workqueue are treated as an idle event. Cc: Cc: Vishal Verma Fixes: 37b137ff8c83 ("nfit, libnvdimm: allow an ARS scrub...") Reviewed-by: Dave Jiang Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ffd776bf564f1308fb94634b032df296ce3134a3 Merge: f2d2856 2889312 Author: Linus Torvalds Date: Tue Apr 3 11:46:38 2018 -0700 Merge tag 'regmap-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "This is a fairly large set of updates for regmap, mainly bugfixes. The biggest bit of this is some fixes for the bulk operations code which had issues in some use cases, Charles Keepax has sorted them out. We also gained the ability to use debugfs with syscon regmaps and to specify the clock to be used with MMIO regmaps" * tag 'regmap-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: (21 commits) regmap: debugfs: Improve warning message on debugfs_create_dir() failure regmap: debugfs: Free map->debugfs_name when debugfs_create_dir() failed regmap: debugfs: Don't leak dummy names regmap: debugfs: Disambiguate dummy debugfs file name regmap: mmio: Add function to attach a clock regmap: Merge redundant handling in regmap_bulk_write regmap: Tidy up regmap_raw_write chunking code regmap: Move the handling for max_raw_write into regmap_raw_write regmap: Remove unnecessary printk for failed allocation regmap: Format data for raw write in regmap_bulk_write regmap: use debugfs even when no device regmap: Allow missing device in regmap_name_read_file() regmap: Use _regmap_read in regmap_bulk_read regmap: Tidy up regmap_raw_read chunking code regmap: Move the handling for max_raw_read into regmap_raw_read regmap: Use helper function for register offset regmap: Don't use format_val in regmap_bulk_read regmap: Correct comparison in regmap_cached regmap: Correct offset handling in regmap_volatile_range regmap-i2c: Off by one in regmap_i2c_smbus_i2c_read/write() ... commit 6920e2854e9a16226ca57199d48fd6b68819f6d5 Author: Arnaldo Carvalho de Melo Date: Mon Apr 2 16:18:45 2018 -0300 perf annotate browser: Show extra title line with event information So at the top we'll have two lines, like this, from 'perf report': # perf report --group --ignore-vmlinux ===================================================================================================== Samples: 46 of events 'cycles', 4000 Hz, Event count (approx.): 5154895 _raw_spin_lock_irqsave /proc/kcore Percent │ nop │ push %rbx 0.00 14.29 0.00 │ pushfq 9.09 0.00 0.00 │ pop %rax 9.09 0.00 20.00 │ nop │ mov %rax,%rbx │ cli 4.55 7.14 0.00 │ nop │ xor %eax,%eax │ mov $0x1,%edx │ lock cmpxchg %edx,(%rdi) 77.27 78.57 70.00 │ test %eax,%eax │ ↓ jne 2b │ mov %rbx,%rax 0.00 0.00 10.00 │ pop %rbx │ ← retq │2b: mov %eax,%esi │ → callq queued_spin_lock_slowpath │ mov %rbx,%rax │ pop %rbx Press 'h' for help on│key bindings ===================================================================================================== 9.09 + 9.09 + 4.55 + 77.27 = 100 14.29 + 7.14 + 78.57 = 100 20 + 70 + 10 = 100 We can do the math by using 't' to toggle from 'percent' to nr ===================================================================================================== Samples: 46 of events 'cycles', 4000 Hz, Event count (approx.): 5154895 _raw_spin_lock_irqsave /proc/kcore Period │ nop │ push %rbx 0 79273 0 │ pushfq 190455 0 0 │ pop %rax 198038 0 3045 │ nop │ mov %rax,%rbx │ cli 217233 32562 0 │ nop │ xor %eax,%eax │ mov $0x1,%edx │ lock cmpxchg %edx,(%rdi) 3421649 979174 28273 │ test %eax,%eax │ ↓ jne 2b │ mov %rbx,%rax 0 0 5193 │ pop %rbx │ ← retq │2b: mov %eax,%esi │ → callq queued_spin_lock_slowpath │ mov %rbx,%rax │ pop %rbx Press 'h' for help on│key bindings ===================================================================================================== 79273 + 190455 + 198038 + 3045 + 217233 + 32562 + 3421649 + 979174 + 28273 + 5193 = 5154895 Or number of samples: ===================================================================================================== ooSamples: 46 of events 'cycles', 4000 Hz, Event count (approx.): 5154895 _raw_spin_lock_irqsave /proc/kcore Samples │ nop │ push %rbx 0 2 0 │ pushfq 2 0 0 │ pop %rax 2 0 2 │ nop │ mov %rax,%rbx │ cli 1 1 0 │ nop │ xor %eax,%eax │ mov $0x1,%edx │ lock cmpxchg %edx,(%rdi) 17 11 7 │ test %eax,%eax │ ↓ jne 2b │ mov %rbx,%rax 0 0 1 │ pop %rbx │ ← retq │2b: mov %eax,%esi │ → callq queued_spin_lock_slowpath │ mov %rbx,%rax │ pop %rbx Press 'h' for help on key bindings ===================================================================================================== 2 + 2 + 2 + 2 + 1 + 1 + 17 + 11 + 7 + 1 = 46 Suggested-by: Martin Liška Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Wang Nan Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196935 Link: https://lkml.kernel.org/n/tip-ezccyxld50wtwyt66np6aomo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit b213eac245aa2d29a3b9dd90f3b96ab182337ee8 Author: Arnaldo Carvalho de Melo Date: Tue Apr 3 15:19:47 2018 -0300 perf annotate: Introduce annotation__scnprintf_samples_period() method To print a string using the total period (nr_events) and the number of samples for a given annotation, i.e. for a given symbol, the counterpart to hists__scnprintf_samples_period(), that is for all the samples in a session (be it a live session, think 'perf top' or a perf.data file, think 'perf report'). Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Martin Liška Cc: Namhyung Kim Cc: Wang Nan Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196935 Link: https://lkml.kernel.org/n/tip-goj2wu4fxutc8vd46mw3yg14@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 38 ++++++++++++++++++++++++++++++++++++++ tools/perf/util/annotate.h | 12 ++++++++++++ 2 files changed, 50 insertions(+) commit c60e22f7199b5fe7cee4007ccb3b27bb8a506476 Author: Takashi Iwai Date: Fri Mar 30 22:45:11 2018 +0200 drm/amdgpu: Fix memory leaks at amdgpu_init() error path amdgpu driver checks vgacon_text_force() after some initializations but without cleaning up. This will result in leaks. Move the check of vgacon_text_force() to the beginning of amdgpu_init() for fixing it and also for optimization. Signed-off-by: Takashi Iwai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 41212e2fe72b26ded7ed78224d9eab720c2891e2 Author: Alex Deucher Date: Mon Apr 2 12:29:26 2018 -0500 drm/amdgpu: Fix PCIe lane width calculation The calculation of the lane widths via ATOM_PPLIB_PCIE_LINK_WIDTH_MASK and ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT macros did not increment the resulting value, per the comment in pptable.h ("lanes - 1"), and per usage elsewhere. Port of the radeon fix to amdgpu. Acked-by: Christian König Acked-by: Chunming Zhou Bug: https://bugs.freedesktop.org/show_bug.cgi?id=102553 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/si_dpm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 85e290d92b4b794d0c758c53007eb4248d385386 Author: Paul Parsons Date: Sat Apr 2 12:32:30 2016 +0100 drm/radeon: Fix PCIe lane width calculation Two years ago I tried an AMD Radeon E8860 embedded GPU with the drm driver. The dmesg output included driver warnings about an invalid PCIe lane width. Tracking the problem back led to si_set_pcie_lane_width_in_smc(). The calculation of the lane widths via ATOM_PPLIB_PCIE_LINK_WIDTH_MASK and ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT macros did not increment the resulting value, per the comment in pptable.h ("lanes - 1"), and per usage elsewhere. Applying the increment silenced the warnings. The code has not changed since, so either my analysis was incorrect or the bug has gone unnoticed. Hence submitting this as an RFC. Acked-by: Christian König Acked-by: Chunming Zhou Signed-off-by: Paul Parsons Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/si_dpm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 20ca25e86c56f5490bdc80318f4fc06466e4c21b Author: Alex Deucher Date: Tue Apr 3 12:54:33 2018 -0500 drm/amdgpu/si: implement get/set pcie_lanes asic callback Required for dpm setup on some asics. Fixes a NULL dereference on asics that require it. Acked-by: Christian König Bug: https://bugs.freedesktop.org/show_bug.cgi?id=102553 Tested-by: Abel Garcia Dorta Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/si.c | 67 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit f7a9ee81a88b83915e7c15895c507abede44b0c5 Author: Andrey Grodzovsky Date: Thu Mar 29 09:09:39 2018 -0400 drm/amdgpu: Add support for SRBM selection v3 Also remove code duplication in write and read regs functions. This also fixes potential missing unlock in amdgpu_debugfs_regs_write in case get_user would fail. v2: Add SRBM mutex locking. v3: Fix TO counter and fix comment location. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 117 ++++++++++------------------ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 7 ++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 7 ++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 7 ++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 11 ++- 6 files changed, 72 insertions(+), 79 deletions(-) commit 073997ccd9dd8eb8015f5371ff0ea85a48814bb4 Author: Chunming Zhou Date: Fri Mar 30 10:23:48 2018 +0800 Revert "drm/amdgpu: Don't change preferred domian when fallback GTT v5" This reverts commit bbaf1871ea1d7b7021e350a3e8bb1ec8408c2030. Felix reports this commit causes regression. Signed-off-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 16 ++++++++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 18 +++--------------- 2 files changed, 17 insertions(+), 17 deletions(-) commit 46bce67f62e7daa00ad908c4c17e9750df2acf52 Author: Eric Huang Date: Thu Mar 29 11:49:51 2018 -0400 drm/amd/powerply: fix power reading on Fiji Power value is wrong reported by customer. It is a regression by commit a7c7bc4c0c47eaac77b8fa92f0672032df7f4254 Author: Rex Zhu Date: Mon Mar 27 15:32:59 2017 +0800 drm/amd/powerplay: reduce sample period time for power readings. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher The theoretical sampling period is from 50ms to 4sec, original 2sec is long but correct, and 20ms is too short. change it to more reasonable 200ms. Signed-off-by: Eric Huang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5d41535c5d66b0a9ad2b7d5d1a72025cbca13ed2 Author: Kenneth Feng Date: Wed Mar 28 17:58:03 2018 +0800 drm/amd/powerplay: Enable ACG SS feature Port the atomfirmware.h and populates the updated pptable to SMU.With the new parameters in the new pptable, the ACG SS feature is enabled. Signed-off-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/atomfirmware.h | 12 ++++++++---- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c | 10 +++++++--- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.h | 10 +++++++--- .../gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c | 11 ++++++++--- drivers/gpu/drm/amd/powerplay/inc/vega12/smu9_driver_if.h | 14 +++++++++----- 5 files changed, 39 insertions(+), 18 deletions(-) commit 4a8e06f7aad797e92413a3042d09d3b385fa1fda Author: Alex Deucher Date: Tue Mar 27 15:53:52 2018 -0500 drm/amdgpu/sdma: fix mask in emit_pipeline_sync Needs to be a 32 bit mask. Acked-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 326aa996a6681dca76477337b66f5e303aa8953e Author: Andrey Grodzovsky Date: Wed Mar 28 08:01:53 2018 -0400 drm/amdgpu: Fix KIQ hang on bare metal for device unbind/bind back v2. Problem: When unbind and then bind back the device KIQ hangs on Vega after mapping KCQs request. Fix: Adding deinitialzie code from CAIL during HW fini solves the hang. v2: use srbm_mutex around soc15_grbm_select() Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 54 ++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) commit fd8d415148ccf5af1ca87d7e38fd2902cc7d8904 Author: Rex Zhu Date: Tue Mar 27 18:29:41 2018 +0800 drm/amd/pp: Clean header file in vega12_smumgr.c Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/vega12_smumgr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 29b443d016a59bc29e5aaf2887994f9ced21d79d Author: Rex Zhu Date: Fri Mar 23 15:51:54 2018 +0800 drm/amd/pp: Remove Dead functions on Vega12 Remove Vega12 DIDT config functions. Reviewed-by: Huang Rui Acked-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 23 +- .../gpu/drm/amd/powerplay/hwmgr/vega12_powertune.c | 1364 -------------------- .../gpu/drm/amd/powerplay/hwmgr/vega12_powertune.h | 53 - 4 files changed, 23 insertions(+), 1419 deletions(-) commit 326a59e78a05e0a4941463d16ea427337d90e0f5 Author: Dan Carpenter Date: Fri Mar 23 14:39:03 2018 +0300 drm/amd/pp: silence a static checker warning This has a static checker warning because "frev" and "crev" can be uninitialized if "info" is NULL. I just changed the order of the checks so that we check "info" first. Reviewed-by: Rex Zhu Reviewed-by: Huang Rui Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 687c1c2eed0c0463b731ed462dd87de6ba7d4ac8 Author: Evan Quan Date: Tue Mar 27 09:53:15 2018 +0800 drm/amdgpu: drop compute ring timeout setting for non-sriov only (v2) Sriov still wants these error messags on timeout. So, for sriov use case, the timeout setting on compute rings is kept. -v2: clean the code Signed-off-by: Evan Quan Reviewed-by: Christian König Reviewed-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 1af27e341aeadf856beaa252a15c6c8cdf35772f Author: Chunming Zhou Date: Fri Mar 23 18:42:17 2018 +0800 drm/amdgpu: fix typo of domain fallback Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2d285669aae656dfeafa0bf25e86bbbc5d22329 Merge: be55375 103cf0e Author: Linus Torvalds Date: Tue Apr 3 10:45:39 2018 -0700 Merge tag 'pm-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These update the cpuidle poll state definition to reduce excessive energy usage related to it, add new CPU ID to the RAPL power capping driver, update the ACPI system suspend code to handle some special cases better, extend the PM core's device links code slightly, add new sysfs attribute for better suspend-to-idle diagnostics and easier hibernation handling, update power management tools and clean up cpufreq quite a bit. Specifics: - Modify the cpuidle poll state implementation to prevent CPUs from staying in the loop in there for excessive times (Rafael Wysocki). - Add Intel Cannon Lake chips support to the RAPL power capping driver (Joe Konno). - Add reference counting to the device links handling code in the PM core (Lukas Wunner). - Avoid reconfiguring GPEs on suspend-to-idle in the ACPI system suspend code (Rafael Wysocki). - Allow devices to be put into deeper low-power states via ACPI if both _SxD and _SxW are missing (Daniel Drake). - Reorganize the core ACPI suspend-to-idle wakeup code to avoid a keyboard wakeup issue on Asus UX331UA (Chris Chiu). - Prevent the PCMCIA library code from aborting suspend-to-idle due to noirq suspend failures resulting from incorrect assumptions (Rafael Wysocki). - Add coupled cpuidle supprt to the Exynos3250 platform (Marek Szyprowski). - Add new sysfs file to make it easier to specify the image storage location during hibernation (Mario Limonciello). - Add sysfs files for collecting suspend-to-idle usage and time statistics for CPU idle states (Rafael Wysocki). - Update the pm-graph utilities (Todd Brandt). - Reduce the kernel log noise related to reporting Low-power Idle constraings by the ACPI system suspend code (Rafael Wysocki). - Make it easier to distinguish dedicated wakeup IRQs in the /proc/interrupts output (Tony Lindgren). - Add the frequency table validation in cpufreq to the core and drop it from a number of cpufreq drivers (Viresh Kumar). - Drop "cooling-{min|max}-level" for CPU nodes from a couple of DT bindings (Viresh Kumar). - Clean up the CPU online error code path in the cpufreq core (Viresh Kumar). - Fix assorted issues in the SCPI, CPPC, mediatek and tegra186 cpufreq drivers (Arnd Bergmann, Chunyu Hu, George Cherian, Viresh Kumar). - Drop memory allocation error messages from a few places in cpufreq and cpuildle drivers (Markus Elfring)" * tag 'pm-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (56 commits) ACPI / PM: Fix keyboard wakeup from suspend-to-idle on ASUS UX331UA cpufreq: CPPC: Use transition_delay_us depending transition_latency PM / hibernate: Change message when writing to /sys/power/resume PM / hibernate: Make passing hibernate offsets more friendly cpuidle: poll_state: Avoid invoking local_clock() too often PM: cpuidle/suspend: Add s2idle usage and time state attributes cpuidle: Enable coupled cpuidle support on Exynos3250 platform cpuidle: poll_state: Add time limit to poll_idle() cpufreq: tegra186: Don't validate the frequency table twice cpufreq: speedstep: Don't validate the frequency table twice cpufreq: sparc: Don't validate the frequency table twice cpufreq: sh: Don't validate the frequency table twice cpufreq: sfi: Don't validate the frequency table twice cpufreq: scpi: Don't validate the frequency table twice cpufreq: sc520: Don't validate the frequency table twice cpufreq: s3c24xx: Don't validate the frequency table twice cpufreq: qoirq: Don't validate the frequency table twice cpufreq: pxa: Don't validate the frequency table twice cpufreq: ppc_cbe: Don't validate the frequency table twice cpufreq: powernow: Don't validate the frequency table twice ... commit be5537542743f72c7cedddd145c17cf7706baa23 Merge: 642e7fd 49076b2 Author: Linus Torvalds Date: Tue Apr 3 10:38:46 2018 -0700 Merge tag 'acpi-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These update the ACPICA code in the kernel to follow upstream revision 20180313 which includes fixes related to the so-called module-level AML (mostly "if" type of statements outside of any methods) that should improve the handling of systems that load alternative SSDTs depending on the current configuration, for example, and event handling fixes related to disabling and enabling GPEs on system startup and on suspend/resume. Moreover, the ACPICA license boilerplate is replaced with SPDX license IDs which alone reduces the number of lines of ACPICA code in the kernel quite a bit. Also added is a new driver for the generic ACPI Time and Alarm Device (TAD). At the moment it only handles the most basic capabilities of the TAD, however. In addition to that the ACPI battery driver is improved to handle battery thresholds on ThinkPads, among other things, some bugs are fixed, a new backlight quirk is added and some documentation is updated. Specifics: - Update the in-kernel ACPICA code to upstream revision 20180313 including: * Module-level AML code handling fixes and simplifications (Bob Moore, Erik Schmauss). * Fixes and cleanups related to messaging (Bob Moore). * Events handling fixes related to disabling and enabling GPEs (Erik Schmauss). * Introduction of SPDX license identifiers and removal of license boilerplate in multiple files (Erik Schmauss). * Assorted fixes and cleanups (Bob Moore, Erik Schmauss, Hans de Goede, Seunghun Han). - Add new basic driver for the ACPI Time and Alarm Device (Rafael Wysocki). - Modify the ACPI battery driver to support battery thresholds on Lenovo ThinkPads (Ognjen Galic, Colin Ian King). - Avoid reporting battery capacity over 100 in the ACPI battery driver in some cases (Laszlo Toth). - Make the kernel recognize an OEM _OSI string from Dell to avoid power management issues with NVidia GPUs in Dell platforms (Alex Hung). - Make the PCI IRQ management code handle missing _PRS cleanly (Alex Hung). - Fix uevent notifications related to device hotplut (Lee, Chun-Yi). - Prevent the ACPI PAD driver from leaking memory (Lenny Szubowicz). - Update the ACPI CPPC library code to include subspace IDs in the kernel messages logged by it (George Cherian). - Add backlight quirk for Samsung 670Z5E (Hans de Goede). - Add the NFIT and HMAT tables to the list of ACPI tables that can be overridden via initrd (Dan Williams). - Fix and clean up some ACPI documentation and Kconfig help language (Aishwarya Pant, Randy Dunlap). - Replace license boilerplate with an SPDX license ID in the ACPI PMIC operation region handling code (Rajmohan Mani)" * tag 'acpi-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (39 commits) ACPI: acpi_pad: Fix memory leak in power saving threads ACPI / video: Add quirk to force acpi-video backlight on Samsung 670Z5E ACPI: Add Time and Alarm Device (TAD) driver ACPI / scan: Send change uevent with offine environmental data ACPI / Kconfig: Update ACPI_PROCFS_POWER help text ACPI / OSI: Add OEM _OSI strings to disable NVidia RTD3 ACPICA: Update version to 20180313 ACPICA: Cleanup/simplify module-level code support ACPICA: Events: add a return on failure from acpi_hw_register_read ACPICA: adding SPDX headers ACPICA: Rename a global for clarity, no functional change ACPICA: macros: fix ACPI_ERROR_NAMESPACE macro ACPICA: Change a compile-time option to a runtime option ACPICA: Remove calling of _STA from acpi_get_object_info() ACPICA: AML Debug Object: Don't ignore output of zero-length strings ACPICA: Fix memory leak on unusual memory leak ACPICA: Events: Dispatch GPEs after enabling for the first time ACPICA: Events: Add parallel GPE handling support to fix potential redundant _Exx evaluations ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c ... commit 50888b015d1318a5d76c961f80bab79249cb1000 Author: Davidlohr Bueso Date: Mon Mar 26 14:09:24 2018 -0700 i2c: Update i2c_trace_msg static key to modern api No changes in refcount semantics -- key init is false; replace static_key_slow_inc|dec with static_branch_inc|dec static_key_false with static_branch_unlikely Added a '_key' suffix to i2c_trace_msg, for better self documentation. Signed-off-by: Davidlohr Bueso Reviewed-by: David Howells Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 86df1073a57a5b87af3e0e6ed76e42a6cf950fd4 Author: Lorenzo Pieralisi Date: Tue Apr 3 16:55:27 2018 +0100 MAINTAINERS: Add missing /drivers/pci/cadence directory entry Commit 37dddf14f1ae ("PCI: cadence: Add EndPoint Controller driver for Cadence PCIe controller") created the /drivers/pci/cadence directory to keep in a single place Cadence host and endpoint controller drivers. Since code in /drivers/pci/cadence falls within the PCI native host bridge and endpoint controllers mainteinance remit, that maintainer entry should have been updated too by adding the /drivers/pci/cadence directory to it but it actually was not. Update the MAINTAINERS entry accordingly, fixing the omission. Signed-off-by: Lorenzo Pieralisi Cc: Alan Douglas Cc: Bjorn Helgaas MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit f6a11d9febad1f308fe4119a54b92e335e7c8032 Author: Palmer Dabbelt Date: Tue Mar 13 13:31:20 2018 -0700 RISC-V: Rename CONFIG_CMDLINE_OVERRIDE to CONFIG_CMDLINE_FORCE The device tree code looks for CONFIG_CMDLINE_FORCE, but we were using CONFIG_CMDLINE_OVERRIDE. It looks like this was just a hold over from before our device tree conversion -- in fact, we'd already removed the support for CONFIG_CMDLINE_OVERRIDE from our arch-specific code so it didn't even work any more. Thanks to Mortiz and Trung for finding the original bug, and for Michael for suggeting a better fix. CC: Trung Tran CC: Michael J Clark Reviewed-by: Moritz Fischer Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 689a8e31938d41ce75955a81936de4d62c2fc677 Author: Gustavo A. R. Silva Date: Fri Mar 30 10:38:58 2018 -0500 IB/ocrdma_hw: Remove redundant checks and goto labels Check on return values and goto label mbx_err are unnecessary. Addresses-Coverity-ID: 1271151 ("Identical code for different branches") Addresses-Coverity-ID: 1268788 ("Identical code for different branches") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 12ed56bad92265c4430712afd8fa37090dd7888a Author: Yuval Shaia Date: Sun Apr 1 09:22:18 2018 +0300 IB/ipoib: Delete unused struct This structure is not needed since the introduction of commit 'c42687784b9a ("IB/ipoib: Scatter-Gather support in connected mode")' Signed-off-by: Yuval Shaia Reviewed-by: Leon Romanovsky Reviewed-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/ipoib/ipoib.h | 5 ----- 1 file changed, 5 deletions(-) commit d13864b68e41c11e4231de90cf358658f6ecea45 Author: David S. Miller Date: Tue Apr 3 08:24:35 2018 -0700 sparc64: Make atomic_xchg() an inline function rather than a macro. This avoids a lot of -Wunused warnings such as: ==================== kernel/debug/debug_core.c: In function ‘kgdb_cpu_enter’: ./arch/sparc/include/asm/cmpxchg_64.h:55:22: warning: value computed is not used [-Wunused-value] #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) ./arch/sparc/include/asm/atomic_64.h:86:30: note: in expansion of macro ‘xchg’ #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) ^~~~ kernel/debug/debug_core.c:508:4: note: in expansion of macro ‘atomic_xchg’ atomic_xchg(&kgdb_active, cpu); ^~~~~~~~~~~ ==================== Signed-off-by: David S. Miller arch/sparc/include/asm/atomic_64.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1485991c024603b2fb4ae77beb7a0d741128a48e Author: Bryan O'Donoghue Date: Wed Mar 28 20:14:05 2018 +0100 rtc: snvs: Fix usage of snvs_rtc_enable commit 179a502f8c46 ("rtc: snvs: add Freescale rtc-snvs driver") introduces the SNVS RTC driver with a function snvs_rtc_enable(). snvs_rtc_enable() can return an error on the enable path however this driver does not currently trap that failure on the probe() path and consequently if enabling the RTC fails we encounter a later error spinning forever in rtc_write_sync_lp(). [ 36.093481] [] (__irq_svc) from [] (_raw_spin_unlock_irqrestore+0x34/0x44) [ 36.102122] [] (_raw_spin_unlock_irqrestore) from [] (regmap_read+0x4c/0x5c) [ 36.110938] [] (regmap_read) from [] (rtc_write_sync_lp+0x6c/0x98) [ 36.118881] [] (rtc_write_sync_lp) from [] (snvs_rtc_alarm_irq_enable+0x40/0x4c) [ 36.128041] [] (snvs_rtc_alarm_irq_enable) from [] (rtc_timer_do_work+0xd8/0x1a8) [ 36.137291] [] (rtc_timer_do_work) from [] (process_one_work+0x28c/0x76c) [ 36.145840] [] (process_one_work) from [] (worker_thread+0x34/0x58c) [ 36.153961] [] (worker_thread) from [] (kthread+0x138/0x150) [ 36.161388] [] (kthread) from [] (ret_from_fork+0x14/0x20) [ 36.168635] rcu_sched kthread starved for 2602 jiffies! g496 c495 f0x2 RCU_GP_WAIT_FQS(3) ->state=0x0 ->cpu=0 [ 36.178564] rcu_sched R running task 0 8 2 0x00000000 [ 36.185664] [] (__schedule) from [] (schedule+0x3c/0xa0) [ 36.192739] [] (schedule) from [] (schedule_timeout+0x78/0x4e0) [ 36.200422] [] (schedule_timeout) from [] (rcu_gp_kthread+0x648/0x1864) [ 36.208800] [] (rcu_gp_kthread) from [] (kthread+0x138/0x150) [ 36.216309] [] (kthread) from [] (ret_from_fork+0x14/0x20) This patch fixes by parsing the result of rtc_write_sync_lp() and propagating both in the probe and elsewhere. If the RTC doesn't start we don't proceed loading the driver and don't get into this loop mess later on. Fixes: 179a502f8c46 ("rtc: snvs: add Freescale rtc-snvs driver") Signed-off-by: Bryan O'Donoghue Acked-by: Shawn Guo Signed-off-by: Alexandre Belloni drivers/rtc/rtc-snvs.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 3fc990a5dbfff26fe2ef1286d9268d55a3136206 Author: Sean Wang Date: Mon Mar 26 18:05:52 2018 +0800 rtc: mt7622: fix module autoloading for OF platform drivers It's required to create a modules.alias via MODULE_DEVICE_TABLE helper for the OF platform driver. Otherwise, module autoloading cannot work. Signed-off-by: Sean Wang Signed-off-by: Alexandre Belloni drivers/rtc/rtc-mt7622.c | 1 + 1 file changed, 1 insertion(+) commit c1f5f0549d62c534d3d102b87c856a8907862d8f Author: Gustavo A. R. Silva Date: Thu Mar 22 14:53:28 2018 -0500 rtc: isl12022: use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alexandre Belloni drivers/rtc/rtc-isl12022.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a3f7691e2f722421b231d3f3fa05b0a6670a20a Author: Ahbong Chang Date: Sat Mar 31 16:17:34 2018 +0800 i2c: fix parameter of trace_i2c_result According to the event i2c_result defined in include/trace/events/i2c.h, the second parameter should be the number of messages instead of the ended loop index. The value of ended loop index is the same as ret. Signed-off-by: Ahbong Chang Reviewed-by: Todd Poynor Reviewed-by: David Howells Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 082f2300cfa1a3d9d5221c38c5eba85d4ab98bd8 Author: Szymon Janc Date: Tue Apr 3 13:40:06 2018 +0200 Bluetooth: Fix connection if directed advertising and privacy is used Local random address needs to be updated before creating connection if RPA from LE Direct Advertising Report was resolved in host. Otherwise remote device might ignore connection request due to address mismatch. This was affecting following qualification test cases: GAP/CONN/SCEP/BV-03-C, GAP/CONN/GCEP/BV-05-C, GAP/CONN/DCEP/BV-05-C Before patch: < HCI Command: LE Set Random Address (0x08|0x0005) plen 6 #11350 [hci0] 84680.231216 Address: 56:BC:E8:24:11:68 (Resolvable) Identity type: Random (0x01) Identity: F2:F1:06:3D:9C:42 (Static) > HCI Event: Command Complete (0x0e) plen 4 #11351 [hci0] 84680.246022 LE Set Random Address (0x08|0x0005) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 #11352 [hci0] 84680.246417 Type: Passive (0x00) Interval: 60.000 msec (0x0060) Window: 30.000 msec (0x0030) Own address type: Random (0x01) Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02) > HCI Event: Command Complete (0x0e) plen 4 #11353 [hci0] 84680.248854 LE Set Scan Parameters (0x08|0x000b) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #11354 [hci0] 84680.249466 Scanning: Enabled (0x01) Filter duplicates: Enabled (0x01) > HCI Event: Command Complete (0x0e) plen 4 #11355 [hci0] 84680.253222 LE Set Scan Enable (0x08|0x000c) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 18 #11356 [hci0] 84680.458387 LE Direct Advertising Report (0x0b) Num reports: 1 Event type: Connectable directed - ADV_DIRECT_IND (0x01) Address type: Random (0x01) Address: 53:38:DA:46:8C:45 (Resolvable) Identity type: Public (0x00) Identity: 11:22:33:44:55:66 (OUI 11-22-33) Direct address type: Random (0x01) Direct address: 7C:D6:76:8C:DF:82 (Resolvable) Identity type: Random (0x01) Identity: F2:F1:06:3D:9C:42 (Static) RSSI: -74 dBm (0xb6) < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #11357 [hci0] 84680.458737 Scanning: Disabled (0x00) Filter duplicates: Disabled (0x00) > HCI Event: Command Complete (0x0e) plen 4 #11358 [hci0] 84680.469982 LE Set Scan Enable (0x08|0x000c) ncmd 1 Status: Success (0x00) < HCI Command: LE Create Connection (0x08|0x000d) plen 25 #11359 [hci0] 84680.470444 Scan interval: 60.000 msec (0x0060) Scan window: 60.000 msec (0x0060) Filter policy: White list is not used (0x00) Peer address type: Random (0x01) Peer address: 53:38:DA:46:8C:45 (Resolvable) Identity type: Public (0x00) Identity: 11:22:33:44:55:66 (OUI 11-22-33) Own address type: Random (0x01) Min connection interval: 30.00 msec (0x0018) Max connection interval: 50.00 msec (0x0028) Connection latency: 0 (0x0000) Supervision timeout: 420 msec (0x002a) Min connection length: 0.000 msec (0x0000) Max connection length: 0.000 msec (0x0000) > HCI Event: Command Status (0x0f) plen 4 #11360 [hci0] 84680.474971 LE Create Connection (0x08|0x000d) ncmd 1 Status: Success (0x00) < HCI Command: LE Create Connection Cancel (0x08|0x000e) plen 0 #11361 [hci0] 84682.545385 > HCI Event: Command Complete (0x0e) plen 4 #11362 [hci0] 84682.551014 LE Create Connection Cancel (0x08|0x000e) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 19 #11363 [hci0] 84682.551074 LE Connection Complete (0x01) Status: Unknown Connection Identifier (0x02) Handle: 0 Role: Master (0x00) Peer address type: Public (0x00) Peer address: 00:00:00:00:00:00 (OUI 00-00-00) Connection interval: 0.00 msec (0x0000) Connection latency: 0 (0x0000) Supervision timeout: 0 msec (0x0000) Master clock accuracy: 0x00 After patch: < HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 #210 [hci0] 667.152459 Type: Passive (0x00) Interval: 60.000 msec (0x0060) Window: 30.000 msec (0x0030) Own address type: Random (0x01) Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02) > HCI Event: Command Complete (0x0e) plen 4 #211 [hci0] 667.153613 LE Set Scan Parameters (0x08|0x000b) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #212 [hci0] 667.153704 Scanning: Enabled (0x01) Filter duplicates: Enabled (0x01) > HCI Event: Command Complete (0x0e) plen 4 #213 [hci0] 667.154584 LE Set Scan Enable (0x08|0x000c) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 18 #214 [hci0] 667.182619 LE Direct Advertising Report (0x0b) Num reports: 1 Event type: Connectable directed - ADV_DIRECT_IND (0x01) Address type: Random (0x01) Address: 50:52:D9:A6:48:A0 (Resolvable) Identity type: Public (0x00) Identity: 11:22:33:44:55:66 (OUI 11-22-33) Direct address type: Random (0x01) Direct address: 7C:C1:57:A5:B7:A8 (Resolvable) Identity type: Random (0x01) Identity: F4:28:73:5D:38:B0 (Static) RSSI: -70 dBm (0xba) < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #215 [hci0] 667.182704 Scanning: Disabled (0x00) Filter duplicates: Disabled (0x00) > HCI Event: Command Complete (0x0e) plen 4 #216 [hci0] 667.183599 LE Set Scan Enable (0x08|0x000c) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Random Address (0x08|0x0005) plen 6 #217 [hci0] 667.183645 Address: 7C:C1:57:A5:B7:A8 (Resolvable) Identity type: Random (0x01) Identity: F4:28:73:5D:38:B0 (Static) > HCI Event: Command Complete (0x0e) plen 4 #218 [hci0] 667.184590 LE Set Random Address (0x08|0x0005) ncmd 1 Status: Success (0x00) < HCI Command: LE Create Connection (0x08|0x000d) plen 25 #219 [hci0] 667.184613 Scan interval: 60.000 msec (0x0060) Scan window: 60.000 msec (0x0060) Filter policy: White list is not used (0x00) Peer address type: Random (0x01) Peer address: 50:52:D9:A6:48:A0 (Resolvable) Identity type: Public (0x00) Identity: 11:22:33:44:55:66 (OUI 11-22-33) Own address type: Random (0x01) Min connection interval: 30.00 msec (0x0018) Max connection interval: 50.00 msec (0x0028) Connection latency: 0 (0x0000) Supervision timeout: 420 msec (0x002a) Min connection length: 0.000 msec (0x0000) Max connection length: 0.000 msec (0x0000) > HCI Event: Command Status (0x0f) plen 4 #220 [hci0] 667.186558 LE Create Connection (0x08|0x000d) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 19 #221 [hci0] 667.485824 LE Connection Complete (0x01) Status: Success (0x00) Handle: 0 Role: Master (0x00) Peer address type: Random (0x01) Peer address: 50:52:D9:A6:48:A0 (Resolvable) Identity type: Public (0x00) Identity: 11:22:33:44:55:66 (OUI 11-22-33) Connection interval: 50.00 msec (0x0028) Connection latency: 0 (0x0000) Supervision timeout: 420 msec (0x002a) Master clock accuracy: 0x07 @ MGMT Event: Device Connected (0x000b) plen 13 {0x0002} [hci0] 667.485996 LE Address: 11:22:33:44:55:66 (OUI 11-22-33) Flags: 0x00000000 Data length: 0 Signed-off-by: Szymon Janc Signed-off-by: Marcel Holtmann Cc: stable@vger.kernel.org include/net/bluetooth/hci_core.h | 2 +- net/bluetooth/hci_conn.c | 29 +++++++++++++++++++++-------- net/bluetooth/hci_event.c | 15 +++++++++++---- net/bluetooth/l2cap_core.c | 2 +- 4 files changed, 34 insertions(+), 14 deletions(-) commit 170648fda93729f05d0758c76b8cd9170408471b Author: Bjorn Helgaas Date: Fri Mar 30 14:22:44 2018 -0500 fm10k: Report PCIe link properties with pcie_print_link_status() Previously the driver used pcie_get_minimum_link() to warn when the NIC is in a slot that can't supply as much bandwidth as the NIC could use. pcie_get_minimum_link() can be misleading because it finds the slowest link and the narrowest link (which may be different links) without considering the total bandwidth of each link. For a path with a 16 GT/s x1 link and a 2.5 GT/s x16 link, it returns 2.5 GT/s x1, which corresponds to 250 MB/s of bandwidth, not the true available bandwidth of about 1969 MB/s for a 16 GT/s x1 link. Use pcie_print_link_status() to report PCIe link speed and possible limitations instead of implementing this in the driver itself. This finds the slowest link in the path to the device by computing the total bandwidth of each link and compares that with the capabilities of the device. Note that the driver previously used dev_warn() to suggest using a different slot, but pcie_print_link_status() uses dev_info() because if the platform has no faster slot available, the user can't do anything about the warning and may not want to be bothered with it. Signed-off-by: Bjorn Helgaas Acked-by: Jacob Keller drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 87 +--------------------------- 1 file changed, 1 insertion(+), 86 deletions(-) commit 33523a361307c097a8a23f3549cb485db5fba6c5 Author: Tal Gilboa Date: Fri Mar 30 09:01:51 2018 -0500 net/mlx5e: Use pcie_bandwidth_available() to compute bandwidth Use the new pci_bandwidth_available() function to calculate maximum available bandwidth through the PCI chain instead of computing it ourselves with mlx5e_get_pci_bw(). This is used to detect when the device is capable of more bandwidth than is available in the current slot. The driver may adjust compression settings accordingly. Note that pci_bandwidth_available() accounts for PCIe encoding overhead, so it is more accurate than mlx5e_get_pci_bw() was. Signed-off-by: Tal Gilboa [bhelgaas: remove mlx5e_get_pci_bw() wrapper altogether] Signed-off-by: Bjorn Helgaas Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 32 +---------------------- 1 file changed, 1 insertion(+), 31 deletions(-) commit 00c6bcb0d60e3f05a533d324ca17b21b6af87fea Author: Tal Gilboa Date: Fri Mar 30 09:01:34 2018 -0500 net/mlx5: Report PCIe link properties with pcie_print_link_status() Use pcie_print_link_status() to report PCIe link speed and possible limitations. Signed-off-by: Tal Gilboa [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 190b509c8de2af7c35b8fdcef4e54163a865d680 Author: Tal Gilboa Date: Fri Mar 30 09:01:05 2018 -0500 net/mlx4_core: Report PCIe link properties with pcie_print_link_status() Use pcie_print_link_status() to report PCIe link speed and possible limitations instead of implementing this in the driver itself. Signed-off-by: Tal Gilboa Signed-off-by: Tariq Toukan [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas drivers/net/ethernet/mellanox/mlx4/main.c | 81 +------------------------------ 1 file changed, 1 insertion(+), 80 deletions(-) commit 9e506a7b51474241f0c900e53e85512780275c05 Author: Tal Gilboa Date: Fri Mar 30 08:56:47 2018 -0500 PCI: Add pcie_print_link_status() to log link speed and whether it's limited Add pcie_print_link_status(). This logs the current settings of the link (speed, width, and total available bandwidth). If the device is capable of more bandwidth but is limited by a slower upstream link, we include information about the link that limits the device's performance. The user may be able to move the device to a different slot for better performance. This provides a unified method for all PCI devices to report status and issues, instead of each device reporting in a different way, using different code. Signed-off-by: Tal Gilboa [bhelgaas: changelog, reword log messages, print device capabilities when not limited, print bandwidth in Gb/s] Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 32 ++++++++++++++++++++++++++++++++ include/linux/pci.h | 1 + 2 files changed, 33 insertions(+) commit 6db79a88c67e4679d9c1e4a3f05c6385e21f6e9a Author: Tal Gilboa Date: Fri Mar 30 08:37:44 2018 -0500 PCI: Add pcie_bandwidth_available() to compute bandwidth available to device Add pcie_bandwidth_available() to compute the bandwidth available to a device. This may be limited by the device itself or by a slower upstream link leading to the device. The available bandwidth at each link along the path is computed as: link_width * link_speed * (1 - encoding_overhead) 2.5 and 5.0 GT/s links use 8b/10b encoding, which reduces the raw bandwidth available by 20%; 8.0 GT/s and faster links use 128b/130b encoding, which reduces it by about 1.5%. The result is in Mb/s, i.e., megabits/second, of raw bandwidth. Also return the device with the slowest link and the speed and width of that link. Signed-off-by: Tal Gilboa [bhelgaas: changelog, leave pcie_get_minimum_link() alone for now, return bw directly, use pci_upstream_bridge(), check "next_bw <= bw" to find uppermost limiting device, return speed/width of the limiting device] Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/pci.h | 3 +++ 2 files changed, 61 insertions(+) commit d9a22d713acb484f9d60861598a71e28129c0afa Author: Lucas Stach Date: Thu Mar 8 14:25:18 2018 +0100 i2c: imx: avoid taking clk_prepare mutex in PM callbacks This is unsafe, as the runtime PM callbacks are called from the PM workqueue, so this may deadlock when handling an i2c attached clock, which may already hold the clk_prepare mutex from another context. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-imx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90ad2cbe88c22d0215225ab9594eeead0eb24fde Author: Lucas Stach Date: Thu Mar 8 14:25:17 2018 +0100 i2c: imx: use clk notifier for rate changes Instead of repeatedly calling clk_get_rate for each transfer, register a clock notifier to update the cached divider value each time the clock rate actually changes. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-imx.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit ef9ff6017e3c4593f3efa5776784cb417c58ad6c Author: Arnaldo Carvalho de Melo Date: Mon Apr 2 15:48:18 2018 -0300 perf ui browser: Move the extra title lines from the hists browser This will be useful for the annotate browser as well, that wants to have extra title lines, i.e. the current ui_browser unconditionally reserves the first line for a browser title and the last one for status messages. But some browsers, like the buckets one (hists browser) needs extra lines to show headers, allowing it to be shown or not, press 'H' in 'perf top' or 'perf report' to see this feature. So move that logic to the core ui_browser used by the hists_browser ('perf top' and 'perf report' main interface) so that it can be used by the annotate browser too. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Martin Liška Cc: Namhyung Kim Cc: Wang Nan Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196935 Link: https://lkml.kernel.org/n/tip-r38xm3ut37ulbg1o5tn5iise@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browser.c | 8 +++++++- tools/perf/ui/browser.h | 2 ++ tools/perf/ui/browsers/hists.c | 43 +++++++++++++++++++++++------------------- 3 files changed, 33 insertions(+), 20 deletions(-) commit 25c312dbf88ca402bf47389c5aa4f1552799a8ca Author: Arnaldo Carvalho de Melo Date: Mon Apr 2 14:24:28 2018 -0300 perf hists: Move hists__scnprintf_title() away from the TUI code The previous patch made this function useful to non-TUI parts of the tools, but left it where the function from what it was carved, so that the patch showed more clearly the process. Now just move it outside the TUI parts so that we can finally use it, even when the TUI code doesn't get built/linked. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Martin Liška Cc: Namhyung Kim Cc: Wang Nan Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196935 Link: https://lkml.kernel.org/n/tip-hqj7hvcr3mu5lvcqp3cssio6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 79 ---------------------------------------- tools/perf/util/hist.c | 81 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 79 deletions(-) commit 967a464a7e6d939f0b0dbb4ee41bd3d515fa9a6d Author: Arnaldo Carvalho de Melo Date: Mon Apr 2 14:20:20 2018 -0300 perf hists: Introduce hists__scnprint_title() That is not use any struct hists_browser internals, so that it can be shared with the other UIs and tools. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Martin Liška Cc: Namhyung Kim Cc: Wang Nan Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196935 Link: https://lkml.kernel.org/n/tip-w8mczjnqnbcj9yzfkv9ja6ro@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 15 +++++++++++---- tools/perf/util/hist.h | 6 ++++++ 2 files changed, 17 insertions(+), 4 deletions(-) commit f016d24acd95660ca264e0424c8037391d165553 Author: Arnaldo Carvalho de Melo Date: Mon Apr 2 14:00:04 2018 -0300 perf hists browser: Rename perf_evsel_browser_title to a more descriptive name Rename it to hists_browser__scnprintf_title() to better reflect that it provides a scnprintf-like function operating on a hists_browser instance. This paves the way to have a non-hists_browser specific function to scnprintf format a title with per evsel information to use in other tools or UIs. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Martin Liška Cc: Namhyung Kim Cc: Wang Nan Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196935 Link: https://lkml.kernel.org/n/tip-sntpyzxsnme9jvuz2qntwoh2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit f2748bdfe157343eb8cf910a1d89ccf2fd20100b Author: Nicholas Piggin Date: Sun Apr 1 20:36:15 2018 +1000 powerpc/powernv: Always stop secondaries before reboot/shutdown Currently powernv reboot and shutdown requests just leave secondaries to do their own things. This is undesirable because they can trigger any number of watchdogs while waiting for reboot, but also we don't know what else they might be doing -- they might be causing trouble, trampling memory, etc. The opal scheduled flash update code already ran into watchdog problems due to flashing taking a long time, and it was fixed with 2196c6f1ed ("powerpc/powernv: Return secondary CPUs to firmware before FW update"), which returns secondaries to opal. It's been found that regular reboots can take over 10 seconds, which can result in the hard lockup watchdog firing, reboot: Restarting system [ 360.038896709,5] OPAL: Reboot request... Watchdog CPU:0 Hard LOCKUP Watchdog CPU:44 detected Hard LOCKUP other CPUS:16 Watchdog CPU:16 Hard LOCKUP watchdog: BUG: soft lockup - CPU#16 stuck for 3s! [swapper/16:0] This patch removes the special case for flash update, and calls smp_send_stop in all cases before calling reboot/shutdown. smp_send_stop could return CPUs to OPAL, the main reason not to is that the request could come from a NMI that interrupts OPAL code, so re-entry to OPAL can cause a number of problems. Putting secondaries into simple spin loops improves the chances of a successful reboot. Signed-off-by: Nicholas Piggin Reviewed-by: Vasant Hegde Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal.h | 2 +- arch/powerpc/platforms/powernv/opal-flash.c | 28 +--------------------------- arch/powerpc/platforms/powernv/setup.c | 15 +++++---------- 3 files changed, 7 insertions(+), 38 deletions(-) commit 855bfe0de1a05a01f89975ea8ba9f5521fb0f567 Author: Nicholas Piggin Date: Sun Apr 1 20:36:14 2018 +1000 powerpc: hard disable irqs in smp_send_stop loop The hard lockup watchdog can fire under local_irq_disable on platforms with irq soft masking. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/smp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6bed3237624e3faad1592543952907cd01a42c83 Author: Nicholas Piggin Date: Sun Apr 1 20:36:13 2018 +1000 powerpc: use NMI IPI for smp_send_stop Use the NMI IPI rather than smp_call_function for smp_send_stop. Have stopped CPUs hard disable interrupts rather than just soft disable. This function is used in crash/panic/shutdown paths to bring other CPUs down as quickly and reliably as possible, and minimizing their potential to cause trouble. Avoiding the Linux smp_call_function infrastructure and (if supported) using true NMI IPIs makes this more robust. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/smp.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 976431b02c2ef92ae3f8b6a7d699fc554025e118 Author: Dan Williams Date: Thu Mar 29 17:22:13 2018 -0700 dax, dm: allow device-mapper to operate without dax support Change device-mapper's DAX dependency to require the presence of at least one DAX_DRIVER. This allows device-mapper to be built without bringing the DAX core along which is especially wasteful when there are no DAX drivers, like BLK_DEV_PMEM, configured. Cc: Alasdair Kergon Reported-by: Bart Van Assche Reported-by: kbuild test robot Reported-by: Arnd Bergmann Reviewed-by: Mike Snitzer Signed-off-by: Dan Williams drivers/md/Kconfig | 2 +- drivers/md/dm-linear.c | 6 +++ drivers/md/dm-log-writes.c | 95 ++++++++++++++++++++++++---------------------- drivers/md/dm-stripe.c | 6 +++ drivers/md/dm.c | 10 +++-- include/linux/dax.h | 30 ++++++++++++--- 6 files changed, 93 insertions(+), 56 deletions(-) commit 2080e88aecd78773eacbe7d6b9d59968000ba55a Author: Dan Williams Date: Thu Mar 29 17:20:39 2018 -0700 dax: introduce CONFIG_DAX_DRIVER In support of allowing device-mapper to compile out idle/dead code when there are no dax providers in the system, introduce the DAX_DRIVER symbol. This is selected by all leaf drivers that device-mapper might be layered on top. This allows device-mapper to conditionally 'select DAX' only when a provider is present. Cc: Martin Schwidefsky Cc: Heiko Carstens Reported-by: Bart Van Assche Reviewed-by: Mike Snitzer Signed-off-by: Dan Williams drivers/dax/Kconfig | 5 ++++- drivers/nvdimm/Kconfig | 2 +- drivers/s390/block/Kconfig | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) commit d2c997c0f14535eff68d8ed9c2f1c5e100625751 Author: Dan Williams Date: Fri Dec 22 22:02:48 2017 -0800 fs, dax: use page->mapping to warn if truncate collides with a busy page Catch cases where extent unmap operations encounter pages that are pinned / busy. Typically this is pinned pages that are under active dma. This warning is a canary for potential data corruption as truncated blocks could be allocated to a new file while the device is still performing i/o. Here is an example of a collision that this implementation catches: WARNING: CPU: 2 PID: 1286 at fs/dax.c:343 dax_disassociate_entry+0x55/0x80 [..] Call Trace: __dax_invalidate_mapping_entry+0x6c/0xf0 dax_delete_mapping_entry+0xf/0x20 truncate_exceptional_pvec_entries.part.12+0x1af/0x200 truncate_inode_pages_range+0x268/0x970 ? tlb_gather_mmu+0x10/0x20 ? up_write+0x1c/0x40 ? unmap_mapping_range+0x73/0x140 xfs_free_file_space+0x1b6/0x5b0 [xfs] ? xfs_file_fallocate+0x7f/0x320 [xfs] ? down_write_nested+0x40/0x70 ? xfs_ilock+0x21d/0x2f0 [xfs] xfs_file_fallocate+0x162/0x320 [xfs] ? rcu_read_lock_sched_held+0x3f/0x70 ? rcu_sync_lockdep_assert+0x2a/0x50 ? __sb_start_write+0xd0/0x1b0 ? vfs_fallocate+0x20c/0x270 vfs_fallocate+0x154/0x270 SyS_fallocate+0x43/0x80 entry_SYSCALL_64_fastpath+0x1f/0x96 Cc: Jeff Moyer Cc: Matthew Wilcox Cc: Ross Zwisler Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Signed-off-by: Dan Williams fs/dax.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit fb094c90748fbeba1063927eeb751add147b35b9 Author: Dan Williams Date: Thu Dec 21 12:25:11 2017 -0800 ext2, dax: introduce ext2_dax_aops In preparation for the dax implementation to start associating dax pages to inodes via page->mapping, we need to provide a 'struct address_space_operations' instance for dax. Otherwise, direct-I/O triggers incorrect page cache assumptions and warnings. Reviewed-by: Jan Kara Reported-by: kbuild test robot Signed-off-by: Dan Williams fs/ext2/ext2.h | 1 + fs/ext2/inode.c | 46 +++++++++++++++++++++++++++------------------- fs/ext2/namei.c | 18 ++---------------- 3 files changed, 30 insertions(+), 35 deletions(-) commit a2b5e056b75ee6ef0777817644a456b36b96ce38 Author: Nicholas Piggin Date: Sun Apr 1 15:38:13 2018 +1000 powerpc/powernv: Fix SMT4 forcing idle code The PSSCR value is not stored to PACA_REQ_PSSCR if the CPU does not have the XER[SO] bug. Fix this by storing up-front, outside the workaround code. The initial test is not required because it is a slow path. The workaround is made to depend on CONFIG_KVM_BOOK3S_HV_POSSIBLE, to match pnv_power9_force_smt4_catch() where it is used. Drop the comment on pnv_power9_force_smt4_catch() as it's no longer true. Fixes: 7672691a08c8 ("powerpc/powernv: Provide a way to force a core into SMT4 mode") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 9 +++++---- arch/powerpc/platforms/powernv/idle.c | 4 ---- 2 files changed, 5 insertions(+), 8 deletions(-) commit b6f534d1a642a9b6263fd52df30806171fbc331e Author: Michael Ellerman Date: Tue Apr 3 21:24:59 2018 +1000 selftests/powerpc: Fix copyloops build since Power4 assembler change The recent commit 15a3204d24a3 ("powerpc/64s: Set assembler machine type to POWER4") set the machine type in our ASFLAGS when building the kernel, and removed some ".machine power4" directives from various asm files. This broke the selftests build on old toolchains (that don't assume Power4), because we build the kernel source files into the selftests using different ASFLAGS. The fix is simply to add -mpower4 to the selftest ASFLAGS as well. Fixes: 15a3204d24a3 ("powerpc/64s: Set assembler machine type to POWER4") Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/copyloops/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6232774f1599028a15418179d17f7df47ede770a Author: Mauricio Faria de Oliveira Date: Fri Mar 30 14:28:25 2018 -0300 powerpc/pseries: Restore default security feature flags on setup After migration the security feature flags might have changed (e.g., destination system with unpatched firmware), but some flags are not set/clear again in init_cpu_char_feature_flags() because it assumes the security flags to be the defaults. Additionally, if the H_GET_CPU_CHARACTERISTICS hypercall fails then init_cpu_char_feature_flags() does not run again, which potentially might leave the system in an insecure or sub-optimal configuration. So, just restore the security feature flags to the defaults assumed by init_cpu_char_feature_flags() so it can set/clear them correctly, and to ensure safe settings are in place in case the hypercall fail. Fixes: f636c14790ea ("powerpc/pseries: Set or clear security feature flags") Depends-on: 19887d6a28e2 ("powerpc: Move default security feature flags") Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/setup.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit e7347a86830f38dc3e40c8f7e28c04412b12a2e7 Author: Mauricio Faria de Oliveira Date: Fri Mar 30 14:28:24 2018 -0300 powerpc: Move default security feature flags This moves the definition of the default security feature flags (i.e., enabled by default) closer to the security feature flags. This can be used to restore current flags to the default flags. Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Michael Ellerman arch/powerpc/include/asm/security_features.h | 8 ++++++++ arch/powerpc/kernel/security.c | 7 +------ 2 files changed, 9 insertions(+), 6 deletions(-) commit 252988cbf037f3d446eea222afb46cc134d32c71 Author: Nicholas Piggin Date: Sun Apr 1 15:50:36 2018 +1000 powerpc: Don't write to DABR on >= Power8 if DAWR is disabled flush_thread() calls __set_breakpoint() via set_debug_reg_defaults() without checking ppc_breakpoint_available(). On Power8 or later CPUs which have the DAWR feature disabled that will cause a write to the DABR which is incorrect as those CPUs don't have a DABR. Fix it two ways, by checking ppc_breakpoint_available() in set_debug_reg_defaults(), and also by reworking __set_breakpoint() to only write to DABR on Power7 or earlier. Fixes: 9654153158d3 ("powerpc: Disable DAWR in the base POWER9 CPU features") Signed-off-by: Nicholas Piggin [mpe: Rework the logic in __set_breakpoint()] Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit e303c08787c4cbe1ca07912817dff205ed802985 Author: Nicholas Piggin Date: Sun Apr 1 15:50:35 2018 +1000 KVM: PPC: Book3S HV: Fix ppc_breakpoint_available compile error arch/powerpc/kvm/book3s_hv.c: In function ‘kvmppc_h_set_mode’: arch/powerpc/kvm/book3s_hv.c:745:8: error: implicit declaration of function ‘ppc_breakpoint_available’ if (!ppc_breakpoint_available()) ^~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 398e712c007f ("KVM: PPC: Book3S HV: Return error from h_set_mode(SET_DAWR) on POWER9") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_hv.c | 1 + 1 file changed, 1 insertion(+) commit a6201da34ff9366680e97392efd06abb9ff15014 Author: Aneesh Kumar K.V Date: Mon Apr 2 13:03:37 2018 +0530 powerpc: Fix oops due to bad access of lppaca on bare metal Commit 8e0b634b1327 ("powerpc/64s: Do not allocate lppaca if we are not virtualized") removed allocation of lppaca on bare metal platforms. But with CONFIG_PPC_SPLPAR enabled, we still access the lppaca on bare metal in some code paths. Fix this but adding runtime checks for SPLPAR (shared processor LPAR). Fixes: 8e0b634b1327 ("powerpc/64s: Do not allocate lppaca if we are not virtualized") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/lppaca.h | 3 +++ arch/powerpc/include/asm/spinlock.h | 2 ++ arch/powerpc/kernel/time.c | 3 +++ 3 files changed, 8 insertions(+) commit 16b17cad0990f13cdcdfd9694cc7c41c7c76b0cf Author: Niklas Cassel Date: Wed Mar 28 13:50:17 2018 +0200 misc: pci_endpoint_test: Handle 64-bit BARs properly A 64-bit BAR consists of a BAR pair, where the second BAR has the upper bits, so we cannot simply call pci_ioremap_bar() on every single BAR index. The second BAR in a BAR pair will not have the IORESOURCE_MEM resource flag set. Only call ioremap on BARs that have the IORESOURCE_MEM resource flag set. pci 0000:01:00.0: BAR 4: assigned [mem 0xc0300000-0xc031ffff 64bit] pci 0000:01:00.0: BAR 2: assigned [mem 0xc0320000-0xc03203ff 64bit] pci 0000:01:00.0: BAR 0: assigned [mem 0xc0320400-0xc03204ff 64bit] pci-endpoint-test 0000:01:00.0: can't ioremap BAR 1: [??? 0x00000000 flags 0x0] pci-endpoint-test 0000:01:00.0: failed to read BAR1 pci-endpoint-test 0000:01:00.0: can't ioremap BAR 3: [??? 0x00000000 flags 0x0] pci-endpoint-test 0000:01:00.0: failed to read BAR3 pci-endpoint-test 0000:01:00.0: can't ioremap BAR 5: [??? 0x00000000 flags 0x0] pci-endpoint-test 0000:01:00.0: failed to read BAR5 Signed-off-by: Niklas Cassel Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I drivers/misc/pci_endpoint_test.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 96a3be43261b919a1785d080b501fae26ce97bc2 Author: Niklas Cassel Date: Wed Mar 28 13:50:16 2018 +0200 PCI: designware-ep: Make dw_pcie_ep_reset_bar() handle 64-bit BARs properly Since a 64-bit BAR consists of a BAR pair, we need to write to both BARs in the BAR pair to clear the BAR properly. Signed-off-by: Niklas Cassel Signed-off-by: Lorenzo Pieralisi Reviewed-by: Gustavo Pimentel Acked-by: Kishon Vijay Abraham I drivers/pci/dwc/pcie-designware-ep.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6474a4e5546e1e3fbba5081dd201ebed62939278 Author: Niklas Cassel Date: Wed Mar 28 13:50:15 2018 +0200 PCI: endpoint: Make sure that BAR_5 does not have 64-bit flag set when clearing Since a 64-bit BAR consists of a BAR pair, and since there is no BAR after BAR_5, BAR_5 cannot be 64-bits wide. This sanity check is done in pci_epc_clear_bar(), so that we don't need to do this sanity check in all epc->ops->clear_bar() implementations. Signed-off-by: Niklas Cassel Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I drivers/pci/endpoint/pci-epc-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 77d08dbdae2e70a446c61f5db763deed5947acf3 Author: Niklas Cassel Date: Wed Mar 28 13:50:14 2018 +0200 PCI: endpoint: Make epc->ops->clear_bar()/pci_epc_clear_bar() take struct *epf_bar Make epc->ops->clear_bar()/pci_epc_clear_bar() take struct *epf_bar. This is needed so that epc->ops->clear_bar() can clear the BAR pair, if the BAR is 64-bits wide. This also makes it possible for pci_epc_clear_bar() to sanity check the flags. Signed-off-by: Niklas Cassel Signed-off-by: Lorenzo Pieralisi Reviewed-by: Gustavo Pimentel drivers/pci/cadence/pcie-cadence-ep.c | 3 ++- drivers/pci/dwc/pcie-designware-ep.c | 13 ++++++++++--- drivers/pci/endpoint/functions/pci-epf-test.c | 5 ++++- drivers/pci/endpoint/pci-epc-core.c | 7 ++++--- include/linux/pci-epc.h | 5 +++-- 5 files changed, 23 insertions(+), 10 deletions(-) commit fca83058753456528bef62579ae2b50799d7a473 Author: Niklas Cassel Date: Wed Mar 28 13:50:13 2018 +0200 PCI: endpoint: Handle 64-bit BARs properly If a 64-bit BAR was set-up, we need to skip a BAR, since a 64-bit BAR consists of a BAR pair. We need to check what BAR width the epc->ops->set_bar() specific implementation actually did set-up, since some drivers, like the Cadence EP controller, sometimes sets up a 64-bit BAR, even though a 32-bit BAR was requested. Signed-off-by: Niklas Cassel Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I drivers/pci/endpoint/functions/pci-epf-test.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a2ea8ac4ec72da44e2cf508e6431db0487b26893 Author: Niklas Cassel Date: Wed Mar 28 13:50:12 2018 +0200 PCI: cadence: Set PCI_BASE_ADDRESS_MEM_TYPE_64 if a 64-bit BAR was set-up cdns_pcie_ep_set_bar() does some round-up of the BAR size, which means that a 64-bit BAR can be set-up, even when the flag PCI_BASE_ADDRESS_MEM_TYPE_64 isn't set. If a 64-bit BAR was set-up, set the flag PCI_BASE_ADDRESS_MEM_TYPE_64, so that the calling function can know what BAR width that was actually set-up. I'm not sure why cdns_pcie_ep_set_bar() doesn't obey the flag PCI_BASE_ADDRESS_MEM_TYPE_64, but I leave this for the MAINTAINER to fix, since there might be a reason why this flag is ignored. Signed-off-by: Niklas Cassel Signed-off-by: Lorenzo Pieralisi Acked-by: Alan Douglas drivers/pci/cadence/pcie-cadence-ep.c | 3 +++ 1 file changed, 3 insertions(+) commit d28810ba7891a1df2cb00116c6c66167970a193d Author: Niklas Cassel Date: Wed Mar 28 13:50:11 2018 +0200 PCI: designware-ep: Make dw_pcie_ep_set_bar() handle 64-bit BARs properly Since a 64-bit BAR consists of a BAR pair, we need to write to both BARs in the BAR pair to setup the BAR properly. Link: https://lkml.kernel.org/r/20180328115018.31921-7-niklas.cassel@axis.com Signed-off-by: Niklas Cassel [lorenzo.pieralisi@arm.com: updated code according to review] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Gustavo Pimentel drivers/pci/dwc/pcie-designware-ep.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit f25b5fae29d4e5fe6ae17d3f898a959d72519b6a Author: Niklas Cassel Date: Wed Mar 28 13:50:10 2018 +0200 PCI: endpoint: Setting a BAR size > 4 GB is invalid if 64-bit flag is not set Setting a BAR size > 4 GB is invalid if PCI_BASE_ADDRESS_MEM_TYPE_64 flag is not set. This sanity check is done in pci_epc_set_bar(), so that we don't need to do this sanity check in all epc->ops->set_bar() implementations. Signed-off-by: Niklas Cassel Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I drivers/pci/endpoint/pci-epc-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3567a4edd6352239586470da1bd5834989425085 Author: Niklas Cassel Date: Wed Mar 28 13:50:09 2018 +0200 PCI: endpoint: Setting 64-bit/prefetch bit is invalid when IO is set If flag PCI_BASE_ADDRESS_SPACE_IO is set, also having any PCI_BASE_ADDRESS_MEM_* bit set is invalid. This sanity check is done in pci_epc_set_bar(), so that we don't need to do this sanity check in all epc->ops->set_bar() implementations. Signed-off-by: Niklas Cassel Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I drivers/pci/endpoint/pci-epc-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f16b1f6fdf631213428ff115ae49ea70c9ac4f2d Author: Niklas Cassel Date: Wed Mar 28 13:50:08 2018 +0200 PCI: endpoint: Setting BAR_5 to 64-bits wide is invalid Since a 64-bit BAR consists of a BAR pair, and since there is no BAR after BAR_5, BAR_5 cannot be 64-bits wide. This sanity check is done in pci_epc_set_bar(), so that we don't need to do this sanity check in all epc->ops->set_bar() implementations. Signed-off-by: Niklas Cassel Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I drivers/pci/endpoint/pci-epc-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bc4a48976f57bc88319bfa32690bcc4b6cef4a29 Author: Niklas Cassel Date: Wed Mar 28 13:50:07 2018 +0200 PCI: endpoint: Simplify epc->ops->set_bar()/pci_epc_set_bar() Add barno and flags to struct epf_bar. That way we can simplify epc->ops->set_bar()/pci_epc_set_bar() by passing a struct *epf_bar instead of a whole lot of arguments. This is needed so that epc->ops->set_bar() implementations can modify BAR flags. Will be utilized in a succeeding patch. Signed-off-by: Niklas Cassel Signed-off-by: Lorenzo Pieralisi Reviewed-by: Gustavo Pimentel Acked-by: Kishon Vijay Abraham I drivers/pci/cadence/pcie-cadence-ep.c | 9 ++++++--- drivers/pci/dwc/pcie-designware-ep.c | 8 +++++--- drivers/pci/endpoint/functions/pci-epf-test.c | 8 ++------ drivers/pci/endpoint/pci-epc-core.c | 10 ++++------ drivers/pci/endpoint/pci-epf-core.c | 4 ++++ include/linux/pci-epc.h | 6 ++---- include/linux/pci-epf.h | 2 ++ 7 files changed, 25 insertions(+), 22 deletions(-) commit bf597574b6bee5ac741c58da763ad2f10df19065 Author: Niklas Cassel Date: Wed Mar 28 13:50:06 2018 +0200 PCI: endpoint: BAR width should not depend on sizeof dma_addr_t If a BAR supports 64-bit width or not depends on the hardware, and should thus not depend on sizeof(dma_addr_t). If a certain hardware doesn't support 64-bit BARs, its epc->ops->set_bar() implementation should return -EINVAL when PCI_BASE_ADDRESS_MEM_TYPE_64 is set. We can't change pci_epc_set_bar() to only set PCI_BASE_ADDRESS_MEM_TYPE_64 based on size, since if the user, for some reason, wants to configure a BAR with a 64-bit width, even though the BAR size is less than 4 GB, he should be able to do that. However, since pci-epf-test is simply a test and not an API, we can set PCI_BASE_ADDRESS_MEM_TYPE_64 in pci-epf-test itself only based on size. Signed-off-by: Niklas Cassel Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I drivers/pci/endpoint/functions/pci-epf-test.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 9a3b7e5e65c4b4d332df5f607c0838c3fb918673 Author: Kirill A. Shutemov Date: Mon Apr 2 15:10:25 2018 +0300 x86/mm: Fix documentation of module mapping range with 4-level paging Commit: f5a40711fa58 ("x86/mm: Set MODULES_END to 0xffffffffff000000") changed MODULES_END back to a fixed value, but didn't update the documentation of memory layout for 4-level paging. Signed-off-by: Kirill A. Shutemov Acked-by: Andrey Ryabinin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: f5a40711fa58 ("x86/mm: Set MODULES_END to 0xffffffffff000000") Link: http://lkml.kernel.org/r/20180402121025.10244-1-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar Documentation/x86/x86_64/mm.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a986c75a7df027d2c649a8f087be9417372cbfb3 Author: Alexander Kappner Date: Mon Apr 2 11:27:01 2018 -0700 platform/x86: thinkpad_acpi: Add 2nd Fan Support for Thinkpad P50 The Thinkpad P50 has 2 fans. Add the 2FAN quirk so the tpacpi driver properly reports both fan speeds. Because the P50 doesn't report the version of its EC controller, we need to identify it by BIOS version (N1). Signed-off-by: Alexander Kappner Acked-by: Henrique de Moraes Holschuh [andy: renamed macro, massaged changelog] Signed-off-by: Andy Shevchenko drivers/platform/x86/thinkpad_acpi.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a820ccbe21e8ce8e86c39cd1d3bc8c7d1cbb949b Author: Takashi Iwai Date: Mon Apr 2 22:41:43 2018 +0200 ALSA: pcm: Fix UAF at PCM release via PCM timer access The PCM runtime object is created and freed dynamically at PCM stream open / close time. This is tracked via substream->runtime, and it's cleared at snd_pcm_detach_substream(). The runtime object assignment is protected by PCM open_mutex, so for all PCM operations, it's safely handled. However, each PCM substream provides also an ALSA timer interface, and user-space can access to this while closing a PCM substream. This may eventually lead to a UAF, as snd_pcm_timer_resolution() tries to access the runtime while clearing it in other side. Fortunately, it's the only concurrent access from the PCM timer, and it merely reads runtime->timer_resolution field. So, we can avoid the race by reordering kfree() and wrapping the substream->runtime clearance with the corresponding timer lock. Reported-by: syzbot+8e62ff4e07aa2ce87826@syzkaller.appspotmail.com Cc: Signed-off-by: Takashi Iwai sound/core/pcm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 642e7fd23353e22290e3d51719fcb658dc252342 Merge: 2103596 c9a2119 Author: Linus Torvalds Date: Mon Apr 2 21:22:12 2018 -0700 Merge branch 'syscalls-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux Pull removal of in-kernel calls to syscalls from Dominik Brodowski: "System calls are interaction points between userspace and the kernel. Therefore, system call functions such as sys_xyzzy() or compat_sys_xyzzy() should only be called from userspace via the syscall table, but not from elsewhere in the kernel. At least on 64-bit x86, it will likely be a hard requirement from v4.17 onwards to not call system call functions in the kernel: It is better to use use a different calling convention for system calls there, where struct pt_regs is decoded on-the-fly in a syscall wrapper which then hands processing over to the actual syscall function. This means that only those parameters which are actually needed for a specific syscall are passed on during syscall entry, instead of filling in six CPU registers with random user space content all the time (which may cause serious trouble down the call chain). Those x86-specific patches will be pushed through the x86 tree in the near future. Moreover, rules on how data may be accessed may differ between kernel data and user data. This is another reason why calling sys_xyzzy() is generally a bad idea, and -- at most -- acceptable in arch-specific code. This patchset removes all in-kernel calls to syscall functions in the kernel with the exception of arch/. On top of this, it cleans up the three places where many syscalls are referenced or prototyped, namely kernel/sys_ni.c, include/linux/syscalls.h and include/linux/compat.h" * 'syscalls-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux: (109 commits) bpf: whitelist all syscalls for error injection kernel/sys_ni: remove {sys_,sys_compat} from cond_syscall definitions kernel/sys_ni: sort cond_syscall() entries syscalls/x86: auto-create compat_sys_*() prototypes syscalls: sort syscall prototypes in include/linux/compat.h net: remove compat_sys_*() prototypes from net/compat.h syscalls: sort syscall prototypes in include/linux/syscalls.h kexec: move sys_kexec_load() prototype to syscalls.h x86/sigreturn: use SYSCALL_DEFINE0 x86: fix sys_sigreturn() return type to be long, not unsigned long x86/ioport: add ksys_ioperm() helper; remove in-kernel calls to sys_ioperm() mm: add ksys_readahead() helper; remove in-kernel calls to sys_readahead() mm: add ksys_mmap_pgoff() helper; remove in-kernel calls to sys_mmap_pgoff() mm: add ksys_fadvise64_64() helper; remove in-kernel call to sys_fadvise64_64() fs: add ksys_fallocate() wrapper; remove in-kernel calls to sys_fallocate() fs: add ksys_p{read,write}64() helpers; remove in-kernel calls to syscalls fs: add ksys_truncate() wrapper; remove in-kernel calls to sys_truncate() fs: add ksys_sync_file_range helper(); remove in-kernel calls to syscall kernel: add ksys_setsid() helper; remove in-kernel call to sys_setsid() kernel: add ksys_unshare() helper; remove in-kernel calls to sys_unshare() ... commit 21035965f60b0502fc6537b232839389bb4ce664 Author: Omar Sandoval Date: Mon Apr 2 15:58:31 2018 -0700 bitmap: fix memset optimization on big-endian systems Commit 2a98dc028f91 ("include/linux/bitmap.h: turn bitmap_set and bitmap_clear into memset when possible") introduced an optimization to bitmap_{set,clear}() which uses memset() when the start and length are constants aligned to a byte. This is wrong on big-endian systems; our bitmaps are arrays of unsigned long, so bit n is not at byte n / 8 in memory. This was caught by the Btrfs selftests, but the bitmap selftests also fail when run on a big-endian machine. We can still use memset if the start and length are aligned to an unsigned long, so do that on big-endian. The same problem applies to the memcmp in bitmap_equal(), so fix it there, too. Fixes: 2a98dc028f91 ("include/linux/bitmap.h: turn bitmap_set and bitmap_clear into memset when possible") Fixes: 2c6deb01525a ("bitmap: use memcmp optimisation in more situations") Cc: stable@kernel.org Reported-by: "Erhard F." Cc: Matthew Wilcox Cc: Rasmus Villemoes Cc: Andrew Morton Cc: Arnd Bergmann Signed-off-by: Omar Sandoval Signed-off-by: Linus Torvalds include/linux/bitmap.h | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 7a8e7da42250138adf202ba2596ef7f68651060a Merge: 2c9046b e21d542 Author: Palmer Dabbelt Date: Mon Apr 2 20:43:14 2018 -0700 RISC-V: Fixes to module loading This cleans up the module support that was commited earlier to work with what's actually emitted from our GCC port as it lands upstream. Most of the work here is adding new relocations to the kernel. There's some limitations on module loading imposed by the kernel: * The kernel doesn't support linker relaxation, which is necessary to support R_RISCV_ALIGN. In order to get reliable module building you're going to need to a GCC that supports the new '-mno-relax', which IIRC isn't going to be out until 8.1.0. It's somewhat unlikely that R_RISCV_ALIGN will appear in a module even without '-mno-relax' support, so issues shouldn't be common. * There is no large code model for RISC-V, which means modules must be loaded within a 32-bit signed offset of the kernel. We don't currently have any mechanism for ensuring this memory remains free or moving pages around, so issues here might be common. I fixed a singcle merge conflict in arch/riscv/kernel/Makefile. commit 2c9046b71bb6ce2386e8847fce92b18aca9127c4 Merge: 1cead2d 5ce6c1f Author: Palmer Dabbelt Date: Mon Apr 2 20:36:33 2018 -0700 RISC-V: Assorted memory model fixes These fixes fall into three categories * The definiton of __smp_{store_release,load_acquire}, which allow us to emit a full fence when unnecessary. * Fixes to avoid relying on the behavior of "*.aqrl" atomics, as those are specified in the currently released RISC-V memory model draft in a way that makes them useless for Linux. This might change in the future, but now the code matches the memory model spec as it's written so at least we're getting closer to something sane. The actual fix is to delete the RISC-V specific atomics and drop back to generic versions that use the new fences from above. * Cleanups to our atomic macros, which are mostly non-functional changes. Unfortunately I haven't given these as thorough of a testing as I probably should have, but I've poked through the code and they seem generally OK. commit 1cead2d7fec53a8d385934caefcf5dbb1b7d778b Merge: 0adb328 b785ec1 Author: Palmer Dabbelt Date: Mon Apr 2 20:30:49 2018 -0700 RISC-V: Add dynamic ftrace support for RISC-V platforms This patch set includes the building blocks of dynamic ftrace features for RISC-V machines. I'm afraid I'm not very familiar with ftrace, but the code looks OK to me. It's been used to track down a performance problem in our SPI driver and appears to work acceptably, but we haven't given it a whole lot of banging yet so there might still be some bugs lurking around somewhere. commit f5a8eb632b562bd9c16c389f5db3a5260fba4157 Merge: c9297d2 dd3b8c3 Author: Linus Torvalds Date: Mon Apr 2 20:20:12 2018 -0700 Merge tag 'arch-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pul removal of obsolete architecture ports from Arnd Bergmann: "This removes the entire architecture code for blackfin, cris, frv, m32r, metag, mn10300, score, and tile, including the associated device drivers. I have been working with the (former) maintainers for each one to ensure that my interpretation was right and the code is definitely unused in mainline kernels. Many had fond memories of working on the respective ports to start with and getting them included in upstream, but also saw no point in keeping the port alive without any users. In the end, it seems that while the eight architectures are extremely different, they all suffered the same fate: There was one company in charge of an SoC line, a CPU microarchitecture and a software ecosystem, which was more costly than licensing newer off-the-shelf CPU cores from a third party (typically ARM, MIPS, or RISC-V). It seems that all the SoC product lines are still around, but have not used the custom CPU architectures for several years at this point. In contrast, CPU instruction sets that remain popular and have actively maintained kernel ports tend to all be used across multiple licensees. [ See the new nds32 port merged in the previous commit for the next generation of "one company in charge of an SoC line, a CPU microarchitecture and a software ecosystem" - Linus ] The removal came out of a discussion that is now documented at https://lwn.net/Articles/748074/. Unlike the original plans, I'm not marking any ports as deprecated but remove them all at once after I made sure that they are all unused. Some architectures (notably tile, mn10300, and blackfin) are still being shipped in products with old kernels, but those products will never be updated to newer kernel releases. After this series, we still have a few architectures without mainline gcc support: - unicore32 and hexagon both have very outdated gcc releases, but the maintainers promised to work on providing something newer. At least in case of hexagon, this will only be llvm, not gcc. - openrisc, risc-v and nds32 are still in the process of finishing their support or getting it added to mainline gcc in the first place. They all have patched gcc-7.3 ports that work to some degree, but complete upstream support won't happen before gcc-8.1. Csky posted their first kernel patch set last week, their situation will be similar [ Palmer Dabbelt points out that RISC-V support is in mainline gcc since gcc-7, although gcc-7.3.0 is the recommended minimum - Linus ]" This really says it all: 2498 files changed, 95 insertions(+), 467668 deletions(-) * tag 'arch-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (74 commits) MAINTAINERS: UNICORE32: Change email account staging: iio: remove iio-trig-bfin-timer driver tty: hvc: remove tile driver tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers serial: remove tile uart driver serial: remove m32r_sio driver serial: remove blackfin drivers serial: remove cris/etrax uart drivers usb: Remove Blackfin references in USB support usb: isp1362: remove blackfin arch glue usb: musb: remove blackfin port usb: host: remove tilegx platform glue pwm: remove pwm-bfin driver i2c: remove bfin-twi driver spi: remove blackfin related host drivers watchdog: remove bfin_wdt driver can: remove bfin_can driver mmc: remove bfin_sdh driver input: misc: remove blackfin rotary driver input: keyboard: remove bf54x driver ... commit c79d152094d228080e9895a92feb44ba9d60c798 Author: Yunlong Song Date: Mon Apr 2 20:22:20 2018 +0800 f2fs: make assignment of t->dentry_bitmap more readable In make_dentry_ptr_block, it is confused with "&" for t->dentry_bitmap but without "&" for t->dentry, so delete "&" to make code more readable. Signed-off-by: Yunlong Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc7a10ddee0c56c6d891dd18de5c4ee9869545e0 Author: Jaegeuk Kim Date: Fri Mar 30 17:58:13 2018 -0700 f2fs: truncate preallocated blocks in error case If write is failed, we must deallocate the blocks that we couldn't write. Cc: stable@vger.kernel.org Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 0612d1166330697d91b8d2d1e71e41485bb0b18e Author: Dave Chinner Date: Mon Apr 2 20:08:27 2018 -0700 xfs: fix intent use-after-free on abort When an intent is aborted during it's initial commit through xfs_defer_trans_abort(), there is a use after free. The current report is for a RUI through this path in generic/388: Freed by task 6274: __kasan_slab_free+0x136/0x180 kmem_cache_free+0xe7/0x4b0 xfs_trans_free_items+0x198/0x2e0 __xfs_trans_commit+0x27f/0xcc0 xfs_trans_roll+0x17b/0x2a0 xfs_defer_trans_roll+0x6ad/0xe60 xfs_defer_finish+0x2a6/0x2140 xfs_alloc_file_space+0x53a/0xf90 xfs_file_fallocate+0x5c6/0xac0 vfs_fallocate+0x2f5/0x930 ioctl_preallocate+0x1dc/0x320 do_vfs_ioctl+0xfe4/0x1690 The problem is that the RUI has two active references - one in the current transaction, and another held by the defer_ops structure that is passed to the RUD (intent done) so that both the intent and the intent done structures are freed on commit of the intent done. Hence during abort, we need to release the intent item, because the defer_ops reference is released separately via ->abort_intent callback. Fix all the intent code to do this correctly. Signed-Off-By: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_item.c | 39 ++++++++++++++++++++------------------- fs/xfs/xfs_extfree_item.c | 38 +++++++++++++++++++------------------- fs/xfs/xfs_refcount_item.c | 39 ++++++++++++++++++++------------------- fs/xfs/xfs_rmap_item.c | 38 +++++++++++++++++++------------------- 4 files changed, 78 insertions(+), 76 deletions(-) commit e21d54219c7a698b10d5f1e6a1023ebde284cd7b Author: Zong Li Date: Thu Mar 15 16:50:51 2018 +0800 RISC-V: Add definition of relocation types Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt arch/riscv/include/uapi/asm/elf.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 4a632cec8884b3eca70fb644bcf56a985dc31ebf Author: Zong Li Date: Thu Mar 15 16:50:50 2018 +0800 RISC-V: Enable module support in defconfig Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt arch/riscv/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 4aad074c9c1d1302c504e1a26fe434878fe08cd5 Author: Zong Li Date: Thu Mar 15 16:50:49 2018 +0800 RISC-V: Support SUB32 relocation type in kernel module Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt arch/riscv/kernel/module.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8e691b16769d233f8a8b668dc7fad783459e4573 Author: Zong Li Date: Thu Mar 15 16:50:48 2018 +0800 RISC-V: Support ADD32 relocation type in kernel module Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt arch/riscv/kernel/module.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 29e405cd88c373ddcb3399687311aa869a7c8ee7 Author: Zong Li Date: Thu Mar 15 16:50:47 2018 +0800 RISC-V: Support ALIGN relocation type in kernel module Just fail on align type. Kernel modules loader didn't do relax like linker, it is difficult to remove or migrate the code, but the remnant nop instructions harm the performaace of module. We expect the building module with the no-relax option. Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt arch/riscv/kernel/module.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 56ea45ae239206d79d776a43bf32cbd8fa4e069d Author: Zong Li Date: Thu Mar 15 16:50:46 2018 +0800 RISC-V: Support RVC_BRANCH/JUMP relocation type in kernel modulewq Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt arch/riscv/kernel/module.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit e7456e696bff09ef2345081bf21e5ce741e2a3ce Author: Zong Li Date: Thu Mar 15 16:50:45 2018 +0800 RISC-V: Support HI20/LO12_I/LO12_S relocation type in kernel module HI20 and LO12_I/LO12_S relocate the absolute address, the range of offset must in 32-bit. Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt arch/riscv/kernel/module.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit e1910c72bdc405b5028510ccc3ed42f0ed25cc6c Author: Zong Li Date: Thu Mar 15 16:50:44 2018 +0800 RISC-V: Support CALL relocation type in kernel module Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt arch/riscv/kernel/module.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit da975dd4818cf42a181910789c096eb6997ed663 Author: Zong Li Date: Thu Mar 15 16:50:43 2018 +0800 RISC-V: Support GOT_HI20/CALL_PLT relocation type in kernel module For CALL_PLT, emit the plt entry only when offset is more than 32-bit. For PCREL_LO12, it uses the location of corresponding HI20 to get the address of external symbol. It should check the HI20 type is the PCREL_HI20 or GOT_HI20, because sometime the location will have two or more relocation types. For example: 0: 00000797 auipc a5,0x0 0: R_RISCV_ALIGN *ABS* 0: R_RISCV_GOT_HI20 SYMBOL 4: 0007b783 ld a5,0(a5) # 0 4: R_RISCV_PCREL_LO12_I .L0 4: R_RISCV_RELAX *ABS* Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt arch/riscv/kernel/module.c | 62 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 10 deletions(-) commit b8bde0ef12bd43f013d879973a1900930bfb95ee Author: Zong Li Date: Thu Mar 15 16:50:42 2018 +0800 RISC-V: Add section of GOT.PLT for kernel module Separate the function symbol address from .plt to .got.plt section. The original plt entry has trampoline code with symbol address, there is a 32-bit padding bwtween jar instruction and symbol address. Extract the symbol address to .got.plt to reduce the module size. Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/module.h | 40 +++++++++++++++++++++++-------------- arch/riscv/kernel/module-sections.c | 21 +++++++++++++++++-- arch/riscv/kernel/module.lds | 1 + 3 files changed, 45 insertions(+), 17 deletions(-) commit ab1ef68e54019937cf859f2c86c9ead6f3e62f19 Author: Zong Li Date: Thu Mar 15 16:50:41 2018 +0800 RISC-V: Add sections of PLT and GOT for kernel module The address of external symbols will locate more than 32-bit offset in 64-bit kernel with sv39 or sv48 virtual addressing. Module loader emits the GOT and PLT entries for data symbols and function symbols respectively. The PLT entry is a trampoline code for jumping to the 64-bit real address. The GOT entry is just the data symbol address. Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 5 ++ arch/riscv/Makefile | 5 ++ arch/riscv/include/asm/module.h | 103 ++++++++++++++++++++++++++ arch/riscv/kernel/Makefile | 1 + arch/riscv/kernel/module-sections.c | 139 ++++++++++++++++++++++++++++++++++++ arch/riscv/kernel/module.lds | 7 ++ 6 files changed, 260 insertions(+) commit 5ce6c1f3535fa8d2134468547377b7b737042834 Author: Andrea Parri Date: Fri Mar 9 13:13:40 2018 +0100 riscv/atomic: Strengthen implementations with fences Atomics present the same issue with locking: release and acquire variants need to be strengthened to meet the constraints defined by the Linux-kernel memory consistency model [1]. Atomics present a further issue: implementations of atomics such as atomic_cmpxchg() and atomic_add_unless() rely on LR/SC pairs, which do not give full-ordering with .aqrl; for example, current implementations allow the "lr-sc-aqrl-pair-vs-full-barrier" test below to end up with the state indicated in the "exists" clause. In order to "synchronize" LKMM and RISC-V's implementation, this commit strengthens the implementations of the atomics operations by replacing .rl and .aq with the use of ("lightweigth") fences, and by replacing .aqrl LR/SC pairs in sequences such as: 0: lr.w.aqrl %0, %addr bne %0, %old, 1f ... sc.w.aqrl %1, %new, %addr bnez %1, 0b 1: with sequences of the form: 0: lr.w %0, %addr bne %0, %old, 1f ... sc.w.rl %1, %new, %addr /* SC-release */ bnez %1, 0b fence rw, rw /* "full" fence */ 1: following Daniel's suggestion. These modifications were validated with simulation of the RISC-V memory consistency model. C lr-sc-aqrl-pair-vs-full-barrier {} P0(int *x, int *y, atomic_t *u) { int r0; int r1; WRITE_ONCE(*x, 1); r0 = atomic_cmpxchg(u, 0, 1); r1 = READ_ONCE(*y); } P1(int *x, int *y, atomic_t *v) { int r0; int r1; WRITE_ONCE(*y, 1); r0 = atomic_cmpxchg(v, 0, 1); r1 = READ_ONCE(*x); } exists (u=1 /\ v=1 /\ 0:r1=0 /\ 1:r1=0) [1] https://marc.info/?l=linux-kernel&m=151930201102853&w=2 https://groups.google.com/a/groups.riscv.org/forum/#!topic/isa-dev/hKywNHBkAXM https://marc.info/?l=linux-kernel&m=151633436614259&w=2 Suggested-by: Daniel Lustig Signed-off-by: Andrea Parri Cc: Palmer Dabbelt Cc: Albert Ou Cc: Daniel Lustig Cc: Alan Stern Cc: Will Deacon Cc: Peter Zijlstra Cc: Boqun Feng Cc: Nicholas Piggin Cc: David Howells Cc: Jade Alglave Cc: Luc Maranget Cc: "Paul E. McKenney" Cc: Akira Yokosawa Cc: Ingo Molnar Cc: Linus Torvalds Cc: linux-riscv@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/atomic.h | 417 +++++++++++++++++++++++++-------------- arch/riscv/include/asm/cmpxchg.h | 391 +++++++++++++++++++++++++++++------- 2 files changed, 588 insertions(+), 220 deletions(-) commit 0123f4d76ca63b7b895f40089be0ce4809e392d8 Author: Andrea Parri Date: Fri Mar 9 13:13:20 2018 +0100 riscv/spinlock: Strengthen implementations with fences Current implementations map locking operations using .rl and .aq annotations. However, this mapping is unsound w.r.t. the kernel memory consistency model (LKMM) [1]: Referring to the "unlock-lock-read-ordering" test reported below, Daniel wrote: "I think an RCpc interpretation of .aq and .rl would in fact allow the two normal loads in P1 to be reordered [...] The intuition would be that the amoswap.w.aq can forward from the amoswap.w.rl while that's still in the store buffer, and then the lw x3,0(x4) can also perform while the amoswap.w.rl is still in the store buffer, all before the l1 x1,0(x2) executes. That's not forbidden unless the amoswaps are RCsc, unless I'm missing something. Likewise even if the unlock()/lock() is between two stores. A control dependency might originate from the load part of the amoswap.w.aq, but there still would have to be something to ensure that this load part in fact performs after the store part of the amoswap.w.rl performs globally, and that's not automatic under RCpc." Simulation of the RISC-V memory consistency model confirmed this expectation. In order to "synchronize" LKMM and RISC-V's implementation, this commit strengthens the implementations of the locking operations by replacing .rl and .aq with the use of ("lightweigth") fences, resp., "fence rw, w" and "fence r , rw". C unlock-lock-read-ordering {} /* s initially owned by P1 */ P0(int *x, int *y) { WRITE_ONCE(*x, 1); smp_wmb(); WRITE_ONCE(*y, 1); } P1(int *x, int *y, spinlock_t *s) { int r0; int r1; r0 = READ_ONCE(*y); spin_unlock(s); spin_lock(s); r1 = READ_ONCE(*x); } exists (1:r0=1 /\ 1:r1=0) [1] https://marc.info/?l=linux-kernel&m=151930201102853&w=2 https://groups.google.com/a/groups.riscv.org/forum/#!topic/isa-dev/hKywNHBkAXM https://marc.info/?l=linux-kernel&m=151633436614259&w=2 Signed-off-by: Andrea Parri Cc: Palmer Dabbelt Cc: Albert Ou Cc: Daniel Lustig Cc: Alan Stern Cc: Will Deacon Cc: Peter Zijlstra Cc: Boqun Feng Cc: Nicholas Piggin Cc: David Howells Cc: Jade Alglave Cc: Luc Maranget Cc: "Paul E. McKenney" Cc: Akira Yokosawa Cc: Ingo Molnar Cc: Linus Torvalds Cc: linux-riscv@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/fence.h | 12 ++++++++++++ arch/riscv/include/asm/spinlock.h | 29 +++++++++++++++-------------- 2 files changed, 27 insertions(+), 14 deletions(-) commit 8d235b174af5d0af35ff206c15041fc2b02a0993 Author: Andrea Parri Date: Tue Feb 27 03:24:11 2018 +0100 riscv/barrier: Define __smp_{store_release,load_acquire} Introduce __smp_{store_release,load_acquire}, and rely on the generic definitions for smp_{store_release,load_acquire}. This avoids the use of full ("rw,rw") fences on SMP. Signed-off-by: Andrea Parri Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/barrier.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit b785ec129bd9498ecd6e221e45820b00c6ed4adf Author: Alan Kao Date: Tue Feb 13 13:13:21 2018 +0800 riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support In walk_stackframe, the pc now receives the address from calling ftrace_graph_ret_addr instead of manual calculation. Note that the original calculation, pc = frame->ra - 4 is buggy when the instruction at the return address happened to be a compressed inst. But since it is not a critical part of ftrace, it is ignored for now to ease the review process. Cc: Greentime Hu Signed-off-by: Alan Kao Signed-off-by: Palmer Dabbelt arch/riscv/kernel/ftrace.c | 2 +- arch/riscv/kernel/stacktrace.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit aea4c671fb985e6a9ffc365c43ea6f5e0d737fea Author: Alan Kao Date: Tue Feb 13 13:13:20 2018 +0800 riscv/ftrace: Add DYNAMIC_FTRACE_WITH_REGS support Cc: Greentime Hu Signed-off-by: Alan Kao Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 1 + arch/riscv/include/asm/ftrace.h | 1 + arch/riscv/kernel/ftrace.c | 17 ++++++ arch/riscv/kernel/mcount-dyn.S | 122 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 141 insertions(+) commit 71e736a7d65551e49136c1efc4759e5902729cc2 Author: Alan Kao Date: Tue Feb 13 13:13:19 2018 +0800 riscv/ftrace: Add ARCH_SUPPORTS_FTRACE_OPS support Cc: Greentime Hu Signed-off-by: Alan Kao Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/ftrace.h | 1 + arch/riscv/kernel/mcount-dyn.S | 3 +++ 2 files changed, 4 insertions(+) commit bc1a4c3a842556852bb02039887d73899d513532 Author: Alan Kao Date: Tue Feb 13 13:13:18 2018 +0800 riscv/ftrace: Add dynamic function graph tracer support Once the function_graph tracer is enabled, a filtered function has the following call sequence: * ftracer_caller ==> on/off by ftrace_make_call/ftrace_make_nop * ftrace_graph_caller * ftrace_graph_call ==> on/off by ftrace_en/disable_ftrace_graph_caller * prepare_ftrace_return Considering the following DYNAMIC_FTRACE_WITH_REGS feature, it would be more extendable to have a ftrace_graph_caller function, instead of calling prepare_ftrace_return directly in ftrace_caller. Cc: Greentime Hu Signed-off-by: Alan Kao Signed-off-by: Palmer Dabbelt arch/riscv/kernel/ftrace.c | 55 +++++++++++++++++++++++++++++++++++- arch/riscv/kernel/mcount-dyn.S | 64 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+), 1 deletion(-) commit c15ac4fd60d5ffdb151bb2c7805f377fd7f90363 Author: Alan Kao Date: Tue Feb 13 13:13:17 2018 +0800 riscv/ftrace: Add dynamic function tracer support We now have dynamic ftrace with the following added items: * ftrace_make_call, ftrace_make_nop (in kernel/ftrace.c) The two functions turn each recorded call site of filtered functions into a call to ftrace_caller or nops * ftracce_update_ftrace_func (in kernel/ftrace.c) turns the nops at ftrace_call into a call to a generic entry for function tracers. * ftrace_caller (in kernel/mcount-dyn.S) The entry where each _mcount call sites calls to once they are filtered to be traced. Also, this patch fixes the semantic problems in mcount.S, which will be treated as only a reference implementation once we have the dynamic ftrace. Cc: Greentime Hu Signed-off-by: Alan Kao Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 1 + arch/riscv/include/asm/ftrace.h | 54 +++++++++++++++++++++ arch/riscv/kernel/Makefile | 5 +- arch/riscv/kernel/ftrace.c | 103 +++++++++++++++++++++++++++++++++++++++- arch/riscv/kernel/mcount-dyn.S | 50 +++++++++++++++++++ arch/riscv/kernel/mcount.S | 22 +++++---- 6 files changed, 223 insertions(+), 12 deletions(-) commit a1d2a6b4cee858a2f27eebce731fbf1dfd72cb4e Author: Alan Kao Date: Tue Feb 13 13:13:16 2018 +0800 riscv/ftrace: Add RECORD_MCOUNT support Now recordmcount.pl recognizes RISC-V object files. For the mechanism to work, we have to disable the linker relaxation. Cc: Greentime Hu Signed-off-by: Alan Kao Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 1 + arch/riscv/Makefile | 3 +++ scripts/recordmcount.pl | 5 +++++ 3 files changed, 9 insertions(+) commit c9297d284126b80c9cfd72c690e0da531c99fc48 Merge: 17e3cd2 6fc61ee Author: Linus Torvalds Date: Mon Apr 2 19:41:08 2018 -0700 Merge tag 'nds32-for-linus-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux Pull nds32 architecture support from Greentime Hu: "This contains the core nds32 Linux port (including interrupt controller driver and timer driver), which has been through seven rounds of review on mailing list. It is able to boot to shell and passes most LTP-2017 testsuites in nds32 AE3XX platform: Total Tests: 1901 Total Skipped Tests: 618 Total Failures: 78" Reviewed-by: Arnd Bergmann * tag 'nds32-for-linus-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux: (44 commits) nds32: To use the generic dump_stack() nds32: fix building failed if using elf toolchain. nios2: add ioremap_nocache declaration before include asm-generic/io.h. nds32: fix building failed if using older version gcc. dt-bindings: timer: Add andestech atcpit100 timer binding doc clocksource/drivers/atcpit100: VDSO support clocksource/drivers/atcpit100: Add andestech atcpit100 timer net: faraday add nds32 support. irqchip: Andestech Internal Vector Interrupt Controller driver dt-bindings: interrupt-controller: Andestech Internal Vector Interrupt Controller dt-bindings: nds32 SoC Bindings dt-bindings: nds32 L2 cache controller Bindings dt-bindings: nds32 CPU Bindings MAINTAINERS: Add nds32 nds32: Build infrastructure nds32: defconfig nds32: Miscellaneous header files nds32: Device tree support nds32: Generic timers support nds32: Loadable modules ... commit 17e3cd222af1c72a750cd83565bb8dfc7bc12335 Merge: bc16d40 ecd6855 Author: Linus Torvalds Date: Mon Apr 2 19:23:05 2018 -0700 Merge tag 'm68k-for-v4.17-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - Macintosh enhancements and fixes - Remove useless memory layout printing using hashed pointers - Add missing Amiga Zorro bus DMA mask - Small fixes and cleanups - Defconfig updates * tag 'm68k-for-v4.17-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/mac: Remove bogus "FIXME" comment m68k/mac: Enable RTC for 100-series PowerBooks m68k/mac: Clean up whitespace and remove redundant parentheses m68k/defconfig: Update defconfigs for v4.16-rc5 zorro: Set up z->dev.dma_mask for the DMA API m68k/time: Stop validating rtc_time in .read_time m68k/mm: Stop printing the virtual memory layout macintosh/via-pmu68k: Initialize PMU driver with setup_arch and arch_initcall m68k/mac: Fix apparent race condition in Baboon interrupt dispatch m68k/mac: Enable PDMA support for PowerBook 190 commit bc16d4052f1ae99996f3475b5a73d29c86e7ba81 Merge: 2fcd2b3 03781e4 Author: Linus Torvalds Date: Mon Apr 2 17:46:37 2018 -0700 Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI updates from Ingo Molnar: "The main EFI changes in this cycle were: - Fix the apple-properties code (Andy Shevchenko) - Add WARN() on arm64 if UEFI Runtime Services corrupt the reserved x18 register (Ard Biesheuvel) - Use efi_switch_mm() on x86 instead of manipulating %cr3 directly (Sai Praneeth) - Fix early memremap leak in ESRT code (Ard Biesheuvel) - Switch to L"xxx" notation for wide string literals (Ard Biesheuvel) - ... plus misc other cleanups and bugfixes" * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/efi: Use efi_switch_mm() rather than manually twiddling with %cr3 x86/efi: Replace efi_pgd with efi_mm.pgd efi: Use string literals for efi_char16_t variable initializers efi/esrt: Fix handling of early ESRT table mapping efi: Use efi_mm in x86 as well as ARM efi: Make const array 'apple' static efi/apple-properties: Use memremap() instead of ioremap() efi: Reorder pr_notice() with add_device_randomness() call x86/efi: Replace GFP_ATOMIC with GFP_KERNEL in efi_query_variable_store() efi/arm64: Check whether x18 is preserved by runtime services calls efi/arm*: Stop printing addresses of virtual mappings efi/apple-properties: Remove redundant attribute initialization from unmarshal_key_value_pairs() efi/arm*: Only register page tables when they exist commit 2fcd2b306aa80771e053275ed74b2dfe7e3d1434 Merge: ce6eba3 e89f5b3 Author: Linus Torvalds Date: Mon Apr 2 17:18:45 2018 -0700 Merge branch 'x86-dma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 dma mapping updates from Ingo Molnar: "This tree, by Christoph Hellwig, switches over the x86 architecture to the generic dma-direct and swiotlb code, and also unifies more of the dma-direct code between architectures. The now unused x86-only primitives are removed" * 'x86-dma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: dma-mapping: Don't clear GFP_ZERO in dma_alloc_attrs swiotlb: Make swiotlb_{alloc,free}_buffer depend on CONFIG_DMA_DIRECT_OPS dma/swiotlb: Remove swiotlb_{alloc,free}_coherent() dma/direct: Handle force decryption for DMA coherent buffers in common code dma/direct: Handle the memory encryption bit in common code dma/swiotlb: Remove swiotlb_set_mem_attributes() set_memory.h: Provide set_memory_{en,de}crypted() stubs x86/dma: Remove dma_alloc_coherent_gfp_flags() iommu/intel-iommu: Enable CONFIG_DMA_DIRECT_OPS=y and clean up intel_{alloc,free}_coherent() iommu/amd_iommu: Use CONFIG_DMA_DIRECT_OPS=y and dma_direct_{alloc,free}() x86/dma/amd_gart: Use dma_direct_{alloc,free}() x86/dma/amd_gart: Look at dev->coherent_dma_mask instead of GFP_DMA x86/dma: Use generic swiotlb_ops x86/dma: Use DMA-direct (CONFIG_DMA_DIRECT_OPS=y) x86/dma: Remove dma_alloc_coherent_mask() commit ce6eba3dba366b607c0a363c7cdbd4ee8fcc6434 Merge: a553243 b3fc5c9 Author: Linus Torvalds Date: Mon Apr 2 16:50:39 2018 -0700 Merge branch 'sched-wait-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull wait_var_event updates from Ingo Molnar: "This introduces the new wait_var_event() API, which is a more flexible waiting primitive than wait_on_atomic_t(). All wait_on_atomic_t() users are migrated over to the new API and wait_on_atomic_t() is removed. The migration fixes one bug and should result in no functional changes for the other usecases" * 'sched-wait-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/wait: Improve __var_waitqueue() code generation sched/wait: Remove the wait_on_atomic_t() API sched/wait, arch/mips: Fix and convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, fs/ocfs2: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, fs/nfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, fs/fscache: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, fs/btrfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, fs/afs: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, drivers/media: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, drivers/drm: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait: Introduce wait_var_event() commit 8d0d8ed3356aa9ed43b819aaedd39b08ca453007 Author: Dan Williams Date: Mon Apr 2 16:49:30 2018 -0700 nfit: fix region registration vs block-data-window ranges Commit 1cf03c00e7c1 "nfit: scrub and register regions in a workqueue" mistakenly attempts to register a region per BLK aperture. There is nothing to register for individual apertures as they belong as a set to a BLK aperture group that are registered with a corresponding DIMM-control-region. Filter them for registration to prevent some needless devm_kzalloc() allocations. Cc: Fixes: 1cf03c00e7c1 ("nfit: scrub and register regions in a workqueue") Reviewed-by: Dave Jiang Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit a5532439ebab93e47784effb96aafa7d7ba4b760 Merge: cea061e4 ea89c06 Author: Linus Torvalds Date: Mon Apr 2 16:18:31 2018 -0700 Merge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 timer updates from Ingo Molnar: "Two changes: add the new convert_art_ns_to_tsc() API for upcoming Intel Goldmont+ drivers, and remove the obsolete rdtscll() API" * 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/tsc: Get rid of rdtscll() x86/tsc: Convert ART in nanoseconds to TSC commit cea061e455c88312b86142e68c8fc5b8e1294ca2 Merge: d22fff8 47a9973 Author: Linus Torvalds Date: Mon Apr 2 16:15:32 2018 -0700 Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform updates from Ingo Molnar: "The main changes in this cycle were: - Add "Jailhouse" hypervisor support (Jan Kiszka) - Update DeviceTree support (Ivan Gorinov) - Improve DMI date handling (Andy Shevchenko)" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/PCI: Fix a potential regression when using dmi_get_bios_year() firmware/dmi_scan: Uninline dmi_get_bios_year() helper x86/devicetree: Use CPU description from Device Tree of/Documentation: Specify local APIC ID in "reg" MAINTAINERS: Add entry for Jailhouse x86/jailhouse: Allow to use PCI_MMCONFIG without ACPI x86: Consolidate PCI_MMCONFIG configs x86: Align x86_64 PCI_MMCONFIG with 32-bit variant x86/jailhouse: Enable PCI mmconfig access in inmates PCI: Scan all functions when running over Jailhouse jailhouse: Provide detection for non-x86 systems x86/devicetree: Fix device IRQ settings in DT x86/devicetree: Initialize device tree before using it pci: Simplify code by using the new dmi_get_bios_year() helper ACPI/sleep: Simplify code by using the new dmi_get_bios_year() helper x86/pci: Simplify code by using the new dmi_get_bios_year() helper dmi: Introduce the dmi_get_bios_year() helper function x86/platform/quark: Re-use DEFINE_SHOW_ATTRIBUTE() macro x86/platform/atom: Re-use DEFINE_SHOW_ATTRIBUTE() macro commit c959025edad924c8f4a8a3140221f3cde22243db Author: Chandan Rajendra Date: Mon Apr 2 15:47:43 2018 -0700 xfs: Remove "committed" argument of xfs_dir_ialloc xfs_dir_ialloc() rolls the current transaction when allocation of a new inode required the space manager to perform an allocation and replinish the Inode btree. None of the callers of xfs_dir_ialloc() need to know if the transaction was committed. Hence this commit removes the "committed" argument of xfs_dir_ialloc. Signed-off-by: Chandan Rajendra Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_inode.c | 14 +++----------- fs/xfs/xfs_inode.h | 2 +- fs/xfs/xfs_qm.c | 4 +--- fs/xfs/xfs_symlink.c | 2 +- 4 files changed, 6 insertions(+), 16 deletions(-) commit d22fff81418edc92be534cad8d59da914049bf69 Merge: 986b37c eaeb8e7 Author: Linus Torvalds Date: Mon Apr 2 15:45:30 2018 -0700 Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mm updates from Ingo Molnar: - Extend the memmap= boot parameter syntax to allow the redeclaration and dropping of existing ranges, and to support all e820 range types (Jan H. Schönherr) - Improve the W+X boot time security checks to remove false positive warnings on Xen (Jan Beulich) - Support booting as Xen PVH guest (Juergen Gross) - Improved 5-level paging (LA57) support, in particular it's possible now to have a single kernel image for both 4-level and 5-level hardware (Kirill A. Shutemov) - AMD hardware RAM encryption support (SME/SEV) fixes (Tom Lendacky) - Preparatory commits for hardware-encrypted RAM support on Intel CPUs. (Kirill A. Shutemov) - Improved Intel-MID support (Andy Shevchenko) - Show EFI page tables in page_tables debug files (Andy Lutomirski) - ... plus misc fixes and smaller cleanups * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (56 commits) x86/cpu/tme: Fix spelling: "configuation" -> "configuration" x86/boot: Fix SEV boot failure from change to __PHYSICAL_MASK_SHIFT x86/mm: Update comment in detect_tme() regarding x86_phys_bits x86/mm/32: Remove unused node_memmap_size_bytes() & CONFIG_NEED_NODE_MEMMAP_SIZE logic x86/mm: Remove pointless checks in vmalloc_fault x86/platform/intel-mid: Add special handling for ACPI HW reduced platforms ACPI, x86/boot: Introduce the ->reduced_hw_early_init() ACPI callback ACPI, x86/boot: Split out acpi_generic_reduce_hw_init() and export x86/pconfig: Provide defines and helper to run MKTME_KEY_PROG leaf x86/pconfig: Detect PCONFIG targets x86/tme: Detect if TME and MKTME is activated by BIOS x86/boot/compressed/64: Handle 5-level paging boot if kernel is above 4G x86/boot/compressed/64: Use page table in trampoline memory x86/boot/compressed/64: Use stack from trampoline memory x86/boot/compressed/64: Make sure we have a 32-bit code segment x86/mm: Do not use paravirtualized calls in native_set_p4d() kdump, vmcoreinfo: Export pgtable_l5_enabled value x86/boot/compressed/64: Prepare new top-level page table for trampoline x86/boot/compressed/64: Set up trampoline memory x86/boot/compressed/64: Save and restore trampoline memory ... commit bc6d65e6dc89c3b7ff78e4ad797117c122ffde8e Author: Tejun Heo Date: Mon Apr 2 15:04:58 2018 -0700 blk-mq: Directly schedule q->timeout_work when aborting a request Request abortion is performed by overriding deadline to now and scheduling timeout handling immediately. For the latter part, the code was using mod_timer(timeout, 0) which can't guarantee that the timer runs afterwards. Let's schedule the underlying work item directly instead. This fixes the hangs during probing reported by Sitsofe but it isn't yet clear to me how the failure can happen reliably if it's just the above described race condition. Signed-off-by: Tejun Heo Reported-by: Sitsofe Wheeler Reported-by: Meelis Roos Fixes: 358f70da49d7 ("blk-mq: make blk_abort_request() trigger timeout path") Cc: stable@vger.kernel.org # v4.16 Link: http://lkml.kernel.org/r/CALjAwxh-PVYFnYFCJpGOja+m5SzZ8Sa4J7ohxdK=r8NyOF-EMA@mail.gmail.com Link: http://lkml.kernel.org/r/alpine.LRH.2.21.1802261049140.4893@math.ut.ee Signed-off-by: Jens Axboe block/blk-timeout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 986b37c0ae4f0a3f93d8974d03a9cbc1502dd377 Merge: e68b4ba 9b9a513 Author: Linus Torvalds Date: Mon Apr 2 15:16:43 2018 -0700 Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups and msr updates from Ingo Molnar: "The main change is a performance/latency improvement to /dev/msr access. The rest are misc cleanups" * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/msr: Make rdmsrl_safe_on_cpu() scheduling safe as well x86/cpuid: Allow cpuid_read() to schedule x86/msr: Allow rdmsr_safe_on_cpu() to schedule x86/rtc: Stop using deprecated functions x86/dumpstack: Unify show_regs() x86/fault: Do not print IP in show_fault_oops() x86/MSR: Move native_* variants to msr.h commit e68b4bad71e8739d79f3c9580c719aa70c42fb96 Merge: 5e46caf d6289f3 Author: Linus Torvalds Date: Mon Apr 2 14:37:03 2018 -0700 Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 build updates from Ingo Molnar: "The biggest change is the forcing of asm-goto support on x86, which effectively increases the GCC minimum supported version to gcc-4.5 (on x86)" * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/build: Don't pass in -D__KERNEL__ multiple times x86: Remove FAST_FEATURE_TESTS x86: Force asm-goto x86/build: Drop superfluous ALIGN from the linker script commit 5e46caf62d8910f6999fd378b743b9c0e1b21cf9 Merge: 2451d1e 16c5055 Author: Linus Torvalds Date: Mon Apr 2 14:06:47 2018 -0700 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm fixlets from Ingo Molnar: "A clobber list fix and cleanups" * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/asm: Trim clear_page.S includes x86/asm: Clobber flags in clear_page() commit 2451d1e59d5a154a42bcf02e0bfeebb01d8df1e0 Merge: 67dbfc1 e25283b Author: Linus Torvalds Date: Mon Apr 2 13:38:43 2018 -0700 Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 apic updates from Ingo Molnar: "The main x86 APIC/IOAPIC changes in this cycle were: - Robustify kexec support to more carefully restore IRQ hardware state before calling into kexec/kdump kernels. (Baoquan He) - Clean up the local APIC code a bit (Dou Liyang) - Remove unused callbacks (David Rientjes)" * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apic: Finish removing unused callbacks x86/apic: Drop logical_smp_processor_id() inline x86/apic: Modernize the pending interrupt code x86/apic: Move pending interrupt check code into it's own function x86/apic: Set up through-local-APIC mode on the boot CPU if 'noapic' specified x86/apic: Rename variables and functions related to x86_io_apic_ops x86/apic: Remove the (now) unused disable_IO_APIC() function x86/apic: Fix restoring boot IRQ mode in reboot and kexec/kdump x86/apic: Split disable_IO_APIC() into two functions to fix CONFIG_KEXEC_JUMP=y x86/apic: Split out restore_boot_irq_mode() from disable_IO_APIC() x86/apic: Make setup_local_APIC() static x86/apic: Simplify init_bsp_APIC() usage x86/x2apic: Mark set_x2apic_phys_mode() as __init commit 67dbfc142310698b979d12a689aa9e0b4a93dced Merge: 46e0d28 fcb3029 Author: Linus Torvalds Date: Mon Apr 2 13:37:05 2018 -0700 Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull SMP hotplug updates from Ingo Molnar: "Simplify the CPU hot-plug state machine" * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Fix unused function warning cpu/hotplug: Merge cpuhp_bp_states and cpuhp_ap_states commit 235831d7dd783ebd20e08ef4310dbdeeea46d87a Author: Junling Zheng Date: Thu Mar 29 19:27:12 2018 +0800 f2fs: fix a wrong condition in f2fs_skip_inode_update Fix commit 97dd26ad8347 (f2fs: fix wrong AUTO_RECOVER condition). We should use ~PAGE_MASK to determine whether i_size is aligned to the f2fs's block size or not. Signed-off-by: Junling Zheng Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4be33329d46f80e87afe7db61271d1370607260a Author: Eric W. Biederman Date: Mon Apr 2 15:10:57 2018 -0500 m68k: Verify the offsets in struct siginfo never change. A change to the generic struct siginfo accidentally changed the offset of si_offset. Add build time checks to ensure the offsets of all known fields in struct siginfo never change. This copies the form of similar changes on x86. Signed-off-by: "Eric W. Biederman" arch/m68k/kernel/signal.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 8420f71943ae96dcd78da5bd4a5c2827419d340c Author: Eric W. Biederman Date: Mon Apr 2 14:45:42 2018 -0500 signal: Correct the offset of si_pkey and si_lower in struct siginfo on m68k The change moving addr_lsb into the _sigfault union failed to take into account that _sigfault._addr_bnd._lower being a pointer forced the entire union to have pointer alignment. The fix for _sigfault._addr_bnd._lower having pointer alignment failed to take into account that m68k has a pointer alignment less than the size of a pointer. So simply making the padding members pointers changed the location of later members in the structure. Fix this by directly computing the needed size of the padding members, and making the padding members char arrays of the needed size. AKA if __alignof__(void *) is 1 sizeof(short) otherwise __alignof__(void *). Which should be exactly the same rules the compiler whould have used when computing the padding. I have tested this change by adding BUILD_BUG_ONs to m68k to verify the offset of every member of struct siginfo, and with those testing that the offsets of the fields in struct siginfo is the same before I changed the generic _sigfault member and after the correction to the _sigfault member. I have also verified that the x86 with it's own BUILD_BUG_ONs to verify the offsets of the siginfo members also compiles cleanly. Cc: stable@vger.kernel.org Reported-by: Eugene Syromiatnikov Fixes: 859d880cf544 ("signal: Correct the offset of si_pkey in struct siginfo") Fixes: b68a68d3dcc1 ("signal: Move addr_lsb into the _sigfault union for clarity") Signed-off-by: "Eric W. Biederman" include/linux/compat.h | 6 ++++-- include/uapi/asm-generic/siginfo.h | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) commit 46e0d28bdb8e6d00e27a0fe9e1d15df6098f0ffb Merge: 86bbbeb b720342 Author: Linus Torvalds Date: Mon Apr 2 11:49:41 2018 -0700 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "The main scheduler changes in this cycle were: - NUMA balancing improvements (Mel Gorman) - Further load tracking improvements (Patrick Bellasi) - Various NOHZ balancing cleanups and optimizations (Peter Zijlstra) - Improve blocked load handling, in particular we can now reduce and eventually stop periodic load updates on 'very idle' CPUs. (Vincent Guittot) - On isolated CPUs offload the final 1Hz scheduler tick as well, plus related cleanups and reorganization. (Frederic Weisbecker) - Core scheduler code cleanups (Ingo Molnar)" * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (45 commits) sched/core: Update preempt_notifier_key to modern API sched/cpufreq: Rate limits for SCHED_DEADLINE sched/fair: Update util_est only on util_avg updates sched/cpufreq/schedutil: Use util_est for OPP selection sched/fair: Use util_est in LB and WU paths sched/fair: Add util_est on top of PELT sched/core: Remove TASK_ALL sched/completions: Use bool in try_wait_for_completion() sched/fair: Update blocked load when newly idle sched/fair: Move idle_balance() sched/nohz: Merge CONFIG_NO_HZ_COMMON blocks sched/fair: Move rebalance_domains() sched/nohz: Optimize nohz_idle_balance() sched/fair: Reduce the periodic update duration sched/nohz: Stop NOHZ stats when decayed sched/cpufreq: Provide migration hint sched/nohz: Clean up nohz enter/exit sched/fair: Update blocked load from NEWIDLE sched/fair: Add NOHZ stats balancing sched/fair: Restructure nohz_balance_kick() ... commit 86bbbebac1933e6e95e8234c4f7d220c5ddd38bc Merge: 486adce e2efacb Author: Linus Torvalds Date: Mon Apr 2 11:47:07 2018 -0700 Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 RAS updates from Ingo Molnar: "The main changes in this cycle were: - AMD MCE support/decoding improvements (Yazen Ghannam) - general MCE header cleanups and reorganization (Borislav Petkov)" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "x86/mce/AMD: Collect error info even if valid bits are not set" x86/MCE: Cleanup and complete struct mce fields definitions x86/mce/AMD: Carve out SMCA get_block_address() code x86/mce/AMD: Get address from already initialized block x86/mce/AMD, EDAC/mce_amd: Enumerate Reserved SMCA bank type x86/mce/AMD: Pass the bank number to smca_get_bank_type() x86/mce/AMD: Collect error info even if valid bits are not set x86/mce: Issue the 'mcelog --ascii' message only on !AMD x86/mce: Convert 'struct mca_config' bools to a bitfield x86/mce: Put private structures and definitions into the internal header commit c9a211951c7c79cfb5de888d7d9550872868b086 Author: Howard McLauchlan Date: Wed Mar 21 18:59:08 2018 -0700 bpf: whitelist all syscalls for error injection Error injection is a useful mechanism to fail arbitrary kernel functions. However, it is often hard to guarantee an error propagates appropriately to user space programs. By injecting into syscalls, we can return arbitrary values to user space directly; this increases flexibility and robustness in testing, allowing us to test user space error paths effectively. The following script, for example, fails calls to sys_open() from a given pid: from bcc import BPF from sys import argv pid = argv[1] prog = r""" int kprobe__SyS_open(struct pt_regs *ctx, const char *pathname, int flags) { u32 pid = bpf_get_current_pid_tgid(); if (pid == %s) bpf_override_return(ctx, -ENOMEM); return 0; } """ % pid b = BPF(text=prog) while 1: b.perf_buffer_poll() This patch whitelists all syscalls defined with SYSCALL_DEFINE and COMPAT_SYSCALL_DEFINE for error injection. These changes are not intended to be considered stable, and would normally be configured off. Signed-off-by: Howard McLauchlan Signed-off-by: Dominik Brodowski include/linux/compat.h | 3 +++ include/linux/syscalls.h | 3 +++ 2 files changed, 6 insertions(+) commit 67a7acd3773a94df2e671601a288685485463cf9 Author: Dominik Brodowski Date: Sun Mar 4 19:06:35 2018 +0100 kernel/sys_ni: remove {sys_,sys_compat} from cond_syscall definitions This keeps it in line with the SYSCALL_DEFINEx() / COMPAT_SYSCALL_DEFINEx() calling convention. Signed-off-by: Dominik Brodowski Documentation/process/adding-syscalls.rst | 2 +- kernel/sys_ni.c | 433 +++++++++++++++--------------- 2 files changed, 219 insertions(+), 216 deletions(-) commit 70dd4b3160798b647b7f30baf9fb6e8a5933d4e2 Author: Dominik Brodowski Date: Tue Mar 6 19:53:01 2018 +0100 kernel/sys_ni: sort cond_syscall() entries Shuffle the cond_syscall() entries in kernel/sys_ni.c around so that they are kept in the same order as in include/uapi/asm-generic/unistd.h. For better structuring, add the same comments as in that file, but keep a few additional comments and extend the commentary where it seems useful. Signed-off-by: Dominik Brodowski kernel/sys_ni.c | 506 +++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 332 insertions(+), 174 deletions(-) commit 3e2052e5dd4062ccc7a10e8860aa7d2e58627001 Author: Dominik Brodowski Date: Thu Mar 22 14:09:17 2018 +0100 syscalls/x86: auto-create compat_sys_*() prototypes compat_sys_*() functions are no longer called from within the kernel on x86 except from the system call table. Linking the system call does not require compat_sys_*() function prototypes at least on x86. Therefore, generate compat_sys_*() prototypes on-the-fly within the COMPAT_SYSCALL_DEFINEx() macro, and remove x86-specific prototypes from various header files. Suggested-by: Andy Lutomirski Cc: Arnd Bergmann Cc: David S. Miller Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Cc: Andi Kleen Cc: Ingo Molnar Cc: Andrew Morton Cc: Al Viro Cc: x86@kernel.org Signed-off-by: Dominik Brodowski arch/x86/ia32/ia32_signal.c | 1 - arch/x86/ia32/sys_ia32.c | 2 +- arch/x86/include/asm/sys_ia32.h | 64 ----------------------------------------- include/linux/compat.h | 17 ++--------- 4 files changed, 4 insertions(+), 80 deletions(-) commit c679a08983db7c1eb09930570b92ff7c9fd59c1c Author: Dominik Brodowski Date: Sun Mar 25 23:04:48 2018 +0200 syscalls: sort syscall prototypes in include/linux/compat.h Shuffle the syscall prototypes in include/linux/compat.h around so that they are kept in the same order as in include/uapi/asm-generic/unistd.h. The individual entries are kept the same, and neither modified to bring them in line with kernel coding style nor wrapped in proper ifdefs -- as an exception to this, add the prefix "asmlinkage" where it was missing. Cc: Arnd Bergmann Cc: Andrew Morton Signed-off-by: Dominik Brodowski include/linux/compat.h | 655 ++++++++++++++++++++++++++++--------------------- 1 file changed, 378 insertions(+), 277 deletions(-) commit 0621150d4a4e17ca6c104ec6e6bcfe6127b33c90 Author: Dominik Brodowski Date: Sun Mar 25 20:18:18 2018 +0200 net: remove compat_sys_*() prototypes from net/compat.h As the syscall functions should only be called from the system call table but not from elsewhere in the kernel, it is sufficient that they are defined in linux/compat.h. Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski include/net/compat.h | 11 ----------- 1 file changed, 11 deletions(-) commit 3c1c456f9b96c208c9dc9ad7aa3be36b8d488504 Author: Dominik Brodowski Date: Sun Mar 25 21:50:11 2018 +0200 syscalls: sort syscall prototypes in include/linux/syscalls.h Shuffle the syscall prototypes in include/linux/syscalls.h around so that they are kept in the same order as in include/uapi/asm-generic/unistd.h. The individual entries are kept the same, and neither modified to bring them in line with kernel coding style nor wrapped in proper ifdefs. Cc: Arnd Bergmann Cc: Andrew Morton Signed-off-by: Dominik Brodowski include/linux/syscalls.h | 1226 +++++++++++++++++++++++++--------------------- 1 file changed, 678 insertions(+), 548 deletions(-) commit 1bec510a9ebf00baa1aa8751e4a5d88b54efb748 Author: Dominik Brodowski Date: Thu Mar 22 17:46:57 2018 +0100 kexec: move sys_kexec_load() prototype to syscalls.h As the syscall function should only be called from the system call table but not from elsewhere in the kernel, move the prototype for sys_kexec_load() to include/syscall.h. Cc: Eric Biederman Cc: kexec@lists.infradead.org Signed-off-by: Dominik Brodowski include/linux/kexec.h | 4 ---- include/linux/syscalls.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) commit 4c8ca51af730cce5cc5fdc7605f8aa20575c0731 Author: Tautschnig, Michael Date: Wed Mar 14 09:41:42 2018 +0000 x86/sigreturn: use SYSCALL_DEFINE0 All definitions of syscalls in x86 except for those patched here have already been using the appropriate SYSCALL_DEFINE*. Signed-off-by: Michael Tautschnig Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: Jaswinder Singh Cc: Andi Kleen Cc: x86@kernel.org Reviewed-by: Thomas Gleixner Signed-off-by: Dominik Brodowski arch/x86/kernel/signal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 025bd3905acab2cdfeb1a521491bee5e33a8fc90 Author: Dominik Brodowski Date: Thu Mar 22 08:29:36 2018 +0100 x86: fix sys_sigreturn() return type to be long, not unsigned long Same as with other system calls, sys_sigreturn() should return a value of type long, not unsigned long. This also matches the behaviour for IA32_EMULATION, see sys32_sigreturn() in arch/x86/ia32/ia32_signal.c . Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Slaby Cc: x86@kernel.org Cc: Michael Tautschnig Reviewed-by: Thomas Gleixner Signed-off-by: Dominik Brodowski arch/x86/include/asm/syscalls.h | 2 +- arch/x86/kernel/signal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 66f4e88cc69da7d9ec4d68cf370cc69742d4af81 Author: Dominik Brodowski Date: Sun Mar 11 11:34:38 2018 +0100 x86/ioport: add ksys_ioperm() helper; remove in-kernel calls to sys_ioperm() Using this helper allows us to avoid the in-kernel calls to the sys_ioperm() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_ioperm(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Ingo Molnar Cc: Jiri Slaby Cc: x86@kernel.org Acked-by: Greg Kroah-Hartman Reviewed-by: Thomas Gleixner Signed-off-by: Dominik Brodowski arch/x86/include/asm/syscalls.h | 1 + arch/x86/kernel/ioport.c | 7 ++++++- drivers/tty/vt/vt_ioctl.c | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) commit c7b95d5156a9ee70f800bd2e47a9eba677be73e1 Author: Dominik Brodowski Date: Mon Mar 19 17:51:36 2018 +0100 mm: add ksys_readahead() helper; remove in-kernel calls to sys_readahead() Using this helper allows us to avoid the in-kernel calls to the sys_readahead() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_readahead(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Andrew Morton Cc: linux-mm@kvack.org Signed-off-by: Dominik Brodowski arch/mips/kernel/linux32.c | 2 +- arch/parisc/kernel/sys_parisc.c | 2 +- arch/powerpc/kernel/sys_ppc32.c | 2 +- arch/s390/kernel/compat_linux.c | 2 +- arch/sparc/kernel/sys_sparc32.c | 2 +- arch/x86/ia32/sys_ia32.c | 2 +- include/linux/syscalls.h | 1 + mm/readahead.c | 7 ++++++- 8 files changed, 13 insertions(+), 7 deletions(-) commit a90f590a1bee36fc2129cfb38ceec24a555bb12d Author: Dominik Brodowski Date: Sun Mar 11 11:34:46 2018 +0100 mm: add ksys_mmap_pgoff() helper; remove in-kernel calls to sys_mmap_pgoff() Using this helper allows us to avoid the in-kernel calls to the sys_mmap_pgoff() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_mmap_pgoff(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Andrew Morton Cc: linux-mm@kvack.org Signed-off-by: Dominik Brodowski arch/alpha/kernel/osf_sys.c | 2 +- arch/arm64/kernel/sys.c | 2 +- arch/ia64/kernel/sys_ia64.c | 4 ++-- arch/m68k/kernel/sys_m68k.c | 2 +- arch/microblaze/kernel/sys_microblaze.c | 6 +++--- arch/mips/kernel/linux32.c | 4 ++-- arch/mips/kernel/syscall.c | 6 ++++-- arch/parisc/kernel/sys_parisc.c | 6 +++--- arch/powerpc/kernel/syscalls.c | 2 +- arch/riscv/kernel/sys_riscv.c | 4 ++-- arch/s390/kernel/compat_linux.c | 6 +++--- arch/s390/kernel/sys_s390.c | 2 +- arch/sh/kernel/sys_sh.c | 4 ++-- arch/sparc/kernel/sys_sparc_32.c | 6 +++--- arch/sparc/kernel/sys_sparc_64.c | 2 +- arch/um/kernel/syscall.c | 2 +- arch/x86/ia32/sys_ia32.c | 2 +- arch/x86/kernel/sys_x86_64.c | 2 +- include/linux/syscalls.h | 3 +++ mm/mmap.c | 17 ++++++++++++----- mm/nommu.c | 17 ++++++++++++----- 21 files changed, 60 insertions(+), 41 deletions(-) commit 9d5b7c956b09daab955fb2a42447d5d89ff15093 Author: Dominik Brodowski Date: Sun Mar 11 11:34:45 2018 +0100 mm: add ksys_fadvise64_64() helper; remove in-kernel call to sys_fadvise64_64() Using the ksys_fadvise64_64() helper allows us to avoid the in-kernel calls to the sys_fadvise64_64() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as ksys_fadvise64_64(). Some compat stubs called sys_fadvise64(), which then just passed through the arguments to sys_fadvise64_64(). Get rid of this indirection, and call ksys_fadvise64_64() directly. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Andrew Morton Cc: linux-mm@kvack.org Signed-off-by: Dominik Brodowski arch/arm/kernel/sys_arm.c | 2 +- arch/mips/kernel/linux32.c | 2 +- arch/parisc/kernel/sys_parisc.c | 2 +- arch/powerpc/kernel/sys_ppc32.c | 4 ++-- arch/powerpc/kernel/syscalls.c | 4 ++-- arch/s390/kernel/compat_linux.c | 5 +++-- arch/sh/kernel/sys_sh32.c | 8 ++++---- arch/sparc/kernel/sys_sparc32.c | 10 +++++----- arch/x86/ia32/sys_ia32.c | 12 ++++++------ arch/xtensa/kernel/syscall.c | 2 +- include/linux/syscalls.h | 9 +++++++++ mm/fadvise.c | 10 ++++++++-- 12 files changed, 43 insertions(+), 27 deletions(-) commit edf292c76b884a499cc60ad5cdada2663cc39a2f Author: Dominik Brodowski Date: Mon Mar 19 17:46:32 2018 +0100 fs: add ksys_fallocate() wrapper; remove in-kernel calls to sys_fallocate() Using the ksys_fallocate() wrapper allows us to get rid of in-kernel calls to the sys_fallocate() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_fallocate(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski arch/mips/kernel/linux32.c | 4 ++-- arch/parisc/kernel/sys_parisc.c | 4 ++-- arch/powerpc/kernel/sys_ppc32.c | 2 +- arch/s390/kernel/compat_linux.c | 4 ++-- arch/sparc/kernel/sys_sparc32.c | 4 ++-- arch/x86/ia32/sys_ia32.c | 4 ++-- fs/open.c | 7 ++++++- include/linux/syscalls.h | 1 + 8 files changed, 18 insertions(+), 12 deletions(-) commit 36028d5dd71175c332ab634e089e16dbdfe3812b Author: Dominik Brodowski Date: Mon Mar 19 17:38:31 2018 +0100 fs: add ksys_p{read,write}64() helpers; remove in-kernel calls to syscalls Using the ksys_p{read,write}64() wrappers allows us to get rid of in-kernel calls to the sys_pread64() and sys_pwrite64() syscalls. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_p{read,write}64(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski arch/mips/kernel/linux32.c | 4 ++-- arch/parisc/kernel/sys_parisc.c | 4 ++-- arch/powerpc/kernel/sys_ppc32.c | 4 ++-- arch/s390/kernel/compat_linux.c | 4 ++-- arch/sh/kernel/sys_sh32.c | 4 ++-- arch/sparc/kernel/sys_sparc32.c | 4 ++-- arch/x86/ia32/sys_ia32.c | 8 ++++---- fs/read_write.c | 20 ++++++++++++++++---- include/linux/syscalls.h | 4 ++++ 9 files changed, 36 insertions(+), 20 deletions(-) commit df260e21e6cd5d2dfc1fe9b6a3bbf747e72b3bed Author: Dominik Brodowski Date: Mon Mar 19 17:32:11 2018 +0100 fs: add ksys_truncate() wrapper; remove in-kernel calls to sys_truncate() Using the ksys_truncate() wrapper allows us to get rid of in-kernel calls to the sys_truncate() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_truncate(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski arch/mips/kernel/linux32.c | 2 +- arch/parisc/kernel/sys_parisc.c | 6 +++--- arch/powerpc/kernel/sys_ppc32.c | 2 +- arch/s390/kernel/compat_linux.c | 2 +- arch/sparc/kernel/sys_sparc32.c | 2 +- arch/x86/ia32/sys_ia32.c | 3 ++- fs/open.c | 2 +- include/linux/syscalls.h | 7 +++++++ 8 files changed, 17 insertions(+), 9 deletions(-) commit 806cbae1228cc1a19b978c4513f6851e9ab7f388 Author: Dominik Brodowski Date: Sun Mar 11 11:34:47 2018 +0100 fs: add ksys_sync_file_range helper(); remove in-kernel calls to syscall Using this helper allows us to avoid the in-kernel calls to the sys_sync_file_range() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_sync_file_range(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski arch/mips/kernel/linux32.c | 2 +- arch/parisc/kernel/sys_parisc.c | 2 +- arch/powerpc/kernel/sys_ppc32.c | 2 +- arch/s390/kernel/compat_linux.c | 2 +- arch/sparc/kernel/sys_sparc32.c | 2 +- arch/x86/ia32/sys_ia32.c | 6 +++--- fs/sync.c | 12 +++++++++--- include/linux/syscalls.h | 2 ++ 8 files changed, 19 insertions(+), 11 deletions(-) commit e2aaa9f423367ee03755d632555c242629a08d00 Author: Dominik Brodowski Date: Fri Mar 16 12:36:06 2018 +0100 kernel: add ksys_setsid() helper; remove in-kernel call to sys_setsid() Using this helper allows us to avoid the in-kernel call to the sys_setsid() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_setsid(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Signed-off-by: Dominik Brodowski include/linux/syscalls.h | 1 + init/do_mounts_initrd.c | 2 +- kernel/sys.c | 7 ++++++- 3 files changed, 8 insertions(+), 2 deletions(-) commit 9b32105ec6b13d32d5db6a6e7992c97ce54b5ea7 Author: Dominik Brodowski Date: Sun Mar 11 11:34:42 2018 +0100 kernel: add ksys_unshare() helper; remove in-kernel calls to sys_unshare() Using this helper allows us to avoid the in-kernel calls to the sys_unshare() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_unshare(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Cc: Ingo Molnar Signed-off-by: Dominik Brodowski drivers/base/devtmpfs.c | 2 +- include/linux/syscalls.h | 1 + init/do_mounts_initrd.c | 2 +- kernel/fork.c | 7 ++++++- 4 files changed, 9 insertions(+), 3 deletions(-) commit 70f68ee81e2e9ad5105b8d2bd324e890e94c6ad9 Author: Dominik Brodowski Date: Wed Mar 14 22:35:11 2018 +0100 fs: add ksys_sync() helper; remove in-kernel calls to sys_sync() Using this helper allows us to avoid the in-kernel calls to the sys_sync() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_sync(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski arch/sparc/kernel/setup_32.c | 2 +- drivers/tty/sysrq.c | 2 +- fs/sync.c | 7 ++++++- include/linux/syscalls.h | 1 + kernel/power/hibernate.c | 2 +- kernel/power/suspend.c | 2 +- kernel/power/user.c | 2 +- 7 files changed, 12 insertions(+), 6 deletions(-) commit 3ce4a7bf66263748194b77ccefd284be963c6304 Author: Dominik Brodowski Date: Tue Mar 13 21:56:26 2018 +0100 fs: add ksys_read() helper; remove in-kernel calls to sys_read() Using this helper allows us to avoid the in-kernel calls to the sys_read() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_read(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski arch/s390/kernel/compat_linux.c | 2 +- fs/read_write.c | 7 ++++++- include/linux/syscalls.h | 1 + init/do_mounts.c | 2 +- init/do_mounts_rd.c | 10 +++++----- 5 files changed, 14 insertions(+), 8 deletions(-) commit 76847e4344350970e1c2e27c28b5abb3c588c5b3 Author: Dominik Brodowski Date: Tue Mar 13 21:51:17 2018 +0100 fs: add ksys_lseek() helper; remove in-kernel calls to sys_lseek() Using this helper allows us to avoid the in-kernel calls to the sys_lseek() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_lseek(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski fs/read_write.c | 9 +++++++-- include/linux/syscalls.h | 1 + init/do_mounts_rd.c | 8 ++++---- 3 files changed, 12 insertions(+), 6 deletions(-) commit cbb60b924b9f3e4d7c67a1c9dcf981718f926e4e Author: Dominik Brodowski Date: Tue Mar 13 21:43:59 2018 +0100 fs: add ksys_ioctl() helper; remove in-kernel calls to sys_ioctl() Using this helper allows us to avoid the in-kernel calls to the sys_ioctl() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_ioctl(). After careful review, at least some of these calls could be converted to do_vfs_ioctl() in future. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski fs/ioctl.c | 7 ++++++- include/linux/syscalls.h | 1 + init/do_mounts.c | 8 ++++---- init/do_mounts_initrd.c | 2 +- init/do_mounts_md.c | 15 ++++++++------- init/do_mounts_rd.c | 4 ++-- 6 files changed, 22 insertions(+), 15 deletions(-) commit 454dab3f965ec24fda8fbe135c8dad4c5b238a86 Author: Dominik Brodowski Date: Tue Mar 13 21:34:04 2018 +0100 fs: add ksys_getdents64() helper; remove in-kernel calls to sys_getdents64() Using this helper allows us to avoid the in-kernel calls to the sys_getdents64() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_getdents64(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski fs/readdir.c | 11 +++++++++-- include/linux/syscalls.h | 2 ++ init/initramfs.c | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) commit bae217ea8c7e123ed3fb1064909a262924771bbb Author: Dominik Brodowski Date: Sun Mar 11 11:34:56 2018 +0100 fs: add ksys_open() wrapper; remove in-kernel calls to sys_open() Using this wrapper allows us to avoid the in-kernel calls to the sys_open() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_open(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/open.c | 2 +- include/linux/syscalls.h | 11 +++++++++++ init/do_mounts.c | 4 ++-- init/do_mounts_initrd.c | 4 ++-- init/do_mounts_md.c | 6 +++--- init/do_mounts_rd.c | 6 +++--- init/initramfs.c | 6 +++--- init/main.c | 2 +- 8 files changed, 26 insertions(+), 15 deletions(-) commit 2ca2a09d6215fd9621aa3e2db7cc9428a61f2911 Author: Dominik Brodowski Date: Sun Mar 11 11:34:55 2018 +0100 fs: add ksys_close() wrapper; remove in-kernel calls to sys_close() Using the ksys_close() wrapper allows us to get rid of in-kernel calls to the sys_close() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_close(), with one subtle difference: The few places which checked the return value did not care about the return value re-writing in sys_close(), so simply use a wrapper around __close_fd(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/autofs4/dev-ioctl.c | 2 +- fs/binfmt_misc.c | 2 +- fs/file.c | 1 + fs/open.c | 1 - include/linux/syscalls.h | 12 ++++++++++++ init/do_mounts.c | 4 ++-- init/do_mounts_initrd.c | 2 +- init/do_mounts_md.c | 8 ++++---- init/do_mounts_rd.c | 6 +++--- init/initramfs.c | 8 ++++---- 10 files changed, 29 insertions(+), 17 deletions(-) commit 411d9475cf901b5a6d2996b46cb5726184a4fa50 Author: Dominik Brodowski Date: Sun Mar 11 11:34:54 2018 +0100 fs: add ksys_ftruncate() wrapper; remove in-kernel calls to sys_ftruncate() Using the ksys_ftruncate() wrapper allows us to get rid of in-kernel calls to the sys_ftruncate() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_ftruncate(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski arch/mips/kernel/linux32.c | 2 +- arch/parisc/kernel/sys_parisc.c | 4 ++-- arch/powerpc/kernel/sys_ppc32.c | 2 +- arch/s390/kernel/compat_linux.c | 2 +- arch/sparc/kernel/sys_sparc32.c | 2 +- arch/x86/ia32/sys_ia32.c | 2 +- fs/internal.h | 1 + fs/open.c | 2 +- include/linux/syscalls.h | 7 +++++++ init/initramfs.c | 2 +- 10 files changed, 17 insertions(+), 9 deletions(-) commit 55731b3cda3a85ee888dac3bf1f36489f275c187 Author: Dominik Brodowski Date: Sun Mar 11 11:34:55 2018 +0100 fs: add do_fchownat(), ksys_fchown() helpers and ksys_{,l}chown() wrappers Using the fs-interal do_fchownat() wrapper allows us to get rid of fs-internal calls to the sys_fchownat() syscall. Introducing the ksys_fchown() helper and the ksys_{,}chown() wrappers allows us to avoid the in-kernel calls to the sys_{,l,f}chown() syscalls. The ksys_ prefix denotes that these functions are meant as a drop-in replacement for the syscalls. In particular, they use the same calling convention as sys_{,l,f}chown(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski arch/s390/kernel/compat_linux.c | 6 +++--- fs/internal.h | 2 ++ fs/open.c | 23 +++++++++++++++++------ include/linux/syscalls.h | 17 +++++++++++++++++ init/initramfs.c | 8 ++++---- kernel/uid16.c | 6 +++--- 6 files changed, 46 insertions(+), 16 deletions(-) commit cbfe20f565228966f0249f016752437df95df679 Author: Dominik Brodowski Date: Sun Mar 11 11:34:54 2018 +0100 fs: add do_faccessat() helper and ksys_access() wrapper; remove in-kernel calls to syscall Using the fs-internal do_faccessat() helper allows us to get rid of fs-internal calls to the sys_faccessat() syscall. Introducing the ksys_access() wrapper allows us to avoid the in-kernel calls to the sys_access() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_access(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/internal.h | 1 + fs/open.c | 9 +++++++-- include/linux/syscalls.h | 7 +++++++ init/main.c | 3 ++- 4 files changed, 17 insertions(+), 3 deletions(-) commit 03450e271a160bc07a2c48e5769e0ba338582d77 Author: Dominik Brodowski Date: Sun Mar 11 11:34:53 2018 +0100 fs: add ksys_fchmod() and do_fchmodat() helpers and ksys_chmod() wrapper; remove in-kernel calls to syscall Using the fs-internal do_fchmodat() helper allows us to get rid of fs-internal calls to the sys_fchmodat() syscall. Introducing the ksys_fchmod() helper and the ksys_chmod() wrapper allows us to avoid the in-kernel calls to the sys_fchmod() and sys_chmod() syscalls. The ksys_ prefix denotes that these functions are meant as a drop-in replacement for the syscalls. In particular, they use the same calling convention as sys_fchmod() and sys_chmod(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/internal.h | 2 ++ fs/open.c | 17 ++++++++++++++--- include/linux/syscalls.h | 8 ++++++++ init/initramfs.c | 6 +++--- 4 files changed, 27 insertions(+), 6 deletions(-) commit 46ea89eb652a365e10257016d09dcf1aaf23cf63 Author: Dominik Brodowski Date: Sun Mar 11 11:34:53 2018 +0100 fs: add do_linkat() helper and ksys_link() wrapper; remove in-kernel calls to syscall Using the fs-internal do_linkat() helper allows us to get rid of fs-internal calls to the sys_linkat() syscall. Introducing the ksys_link() wrapper allows us to avoid the in-kernel calls to sys_link() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_link(). In the near future, the only fs-external user of ksys_link() should be converted to use vfs_link() instead. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/internal.h | 2 ++ fs/namei.c | 12 +++++++++--- include/linux/syscalls.h | 9 +++++++++ init/initramfs.c | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) commit 87c4e19262d81862886207be3c8795f6576d5a52 Author: Dominik Brodowski Date: Sun Mar 11 11:34:50 2018 +0100 fs: add do_mknodat() helper and ksys_mknod() wrapper; remove in-kernel calls to syscall Using the fs-internal do_mknodat() helper allows us to get rid of fs-internal calls to the sys_mknodat() syscall. Introducing the ksys_mknod() wrapper allows us to avoid the in-kernel calls to sys_mknod() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_mknod(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/internal.h | 2 ++ fs/namei.c | 12 +++++++++--- include/linux/syscalls.h | 9 +++++++++ init/do_mounts.h | 2 +- init/initramfs.c | 2 +- init/noinitramfs.c | 2 +- 6 files changed, 23 insertions(+), 6 deletions(-) commit b724e846b491ef8db943be8086226c9d8da31877 Author: Dominik Brodowski Date: Sun Mar 11 11:34:49 2018 +0100 fs: add do_symlinkat() helper and ksys_symlink() wrapper; remove in-kernel calls to syscall Using the fs-internal do_symlinkat() helper allows us to get rid of fs-internal calls to the sys_symlinkat() syscall. Introducing the ksys_symlink() wrapper allows us to avoid the in-kernel calls to the sys_symlink() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_symlink(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/internal.h | 2 ++ fs/namei.c | 12 +++++++++--- include/linux/syscalls.h | 9 +++++++++ init/initramfs.c | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) commit 0101db7a301981a008296d522d8c1f456b0fe837 Author: Dominik Brodowski Date: Sun Mar 11 11:34:49 2018 +0100 fs: add do_mkdirat() helper and ksys_mkdir() wrapper; remove in-kernel calls to syscall Using the fs-internal do_mkdirat() helper allows us to get rid of fs-internal calls to the sys_mkdirat() syscall. Introducing the ksys_mkdir() wrapper allows us to avoid the in-kernel calls to the sys_mkdir() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_mkdir(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/internal.h | 1 + fs/namei.c | 9 +++++++-- include/linux/syscalls.h | 7 +++++++ init/do_mounts_initrd.c | 2 +- init/initramfs.c | 2 +- init/noinitramfs.c | 4 ++-- 6 files changed, 19 insertions(+), 6 deletions(-) commit f459dffae1c6026928bbe8e972daecb635b7b5e9 Author: Dominik Brodowski Date: Sun Mar 11 11:34:48 2018 +0100 fs: add ksys_rmdir() wrapper; remove in-kernel calls to sys_rmdir() Using this wrapper allows us to avoid the in-kernel calls to the sys_rmdir() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_rmdir(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/internal.h | 1 + fs/namei.c | 2 +- include/linux/syscalls.h | 7 +++++++ init/initramfs.c | 4 ++-- 4 files changed, 11 insertions(+), 3 deletions(-) commit 6380161ce9d08320d2e09f0fc64b778da433b451 Author: Dominik Brodowski Date: Sun Mar 11 11:34:48 2018 +0100 hostfs: rename do_rmdir() to hostfs_do_rmdir() do_rmdir() is used in the VFS layer at fs/namei.c, so use a different name in hostfs. Cc: Jeff Dike Cc: user-mode-linux-devel@lists.sourceforge.net Acked-by: Richard Weinberger Signed-off-by: Dominik Brodowski fs/hostfs/hostfs.h | 2 +- fs/hostfs/hostfs_kern.c | 2 +- fs/hostfs/hostfs_user.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 0f32ab8cfac478be053cb526ced8918ef6f4df47 Author: Dominik Brodowski Date: Sun Mar 11 11:34:47 2018 +0100 fs: add ksys_unlink() wrapper; remove in-kernel calls to sys_unlink() Using this wrapper allows us to avoid the in-kernel calls to the sys_unlink() syscall. The ksys_ prefix denotes that this function is meant s a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_unlink(). In the near future, all callers of ksys_unlink() should be converted to call do_unlinkat() directly or, at least, to operate on regular kernel pointers. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski include/linux/syscalls.h | 11 +++++++++++ init/do_mounts.h | 2 +- init/do_mounts_initrd.c | 4 ++-- init/do_mounts_rd.c | 2 +- init/initramfs.c | 4 ++-- 5 files changed, 17 insertions(+), 6 deletions(-) commit 447016e9681965fda8dcd9e4fd3c55308a6fd166 Author: Dominik Brodowski Date: Sun Mar 11 11:34:46 2018 +0100 fs: add ksys_chdir() helper; remove in-kernel calls to sys_chdir() Using this helper allows us to avoid the in-kernel calls to the sys_chdir() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_chdir(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski drivers/base/devtmpfs.c | 2 +- fs/open.c | 7 ++++++- include/linux/syscalls.h | 1 + init/do_mounts.c | 2 +- init/do_mounts_initrd.c | 8 ++++---- 5 files changed, 13 insertions(+), 7 deletions(-) commit e7a3e8b2edf544ec28f689385c3adc2903f46ec0 Author: Dominik Brodowski Date: Sun Mar 11 11:34:41 2018 +0100 fs: add ksys_write() helper; remove in-kernel calls to sys_write() Using this helper allows us to avoid the in-kernel calls to the sys_write() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_write(). In the near future, the do_mounts / initramfs callers of ksys_write() should be converted to use filp_open() and vfs_write() instead. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Cc: linux-s390@vger.kernel.org Signed-off-by: Dominik Brodowski arch/s390/kernel/compat_linux.c | 2 +- fs/read_write.c | 9 +++++++-- include/linux/syscalls.h | 1 + init/do_mounts_rd.c | 4 ++-- init/initramfs.c | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) commit a16fe33ab5572e52ef4cb9719d6eb49623b2528a Author: Dominik Brodowski Date: Sun Mar 11 11:34:41 2018 +0100 fs: add ksys_chroot() helper; remove-in kernel calls to sys_chroot() Using this helper allows us to avoid the in-kernel calls to the sys_chroot() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_chroot(). In the near future, the fs-external callers of ksys_chroot() should be converted to use kern_path()/set_fs_root() directly. Then ksys_chroot() can be moved within sys_chroot() again. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski drivers/base/devtmpfs.c | 2 +- fs/open.c | 7 ++++++- include/linux/syscalls.h | 1 + init/do_mounts.c | 2 +- init/do_mounts_initrd.c | 4 ++-- 5 files changed, 11 insertions(+), 5 deletions(-) commit c7248321a3d42ffba78db0dde88d1c49ca1c045f Author: Dominik Brodowski Date: Sun Mar 11 11:34:40 2018 +0100 fs: add ksys_dup{,3}() helper; remove in-kernel calls to sys_dup{,3}() Using ksys_dup() and ksys_dup3() as helper functions allows us to avoid the in-kernel calls to the sys_dup() and sys_dup3() syscalls. The ksys_ prefix denotes that these functions are meant as a drop-in replacement for the syscalls. In particular, they use the same calling convention as sys_dup{,3}(). In the near future, the fs-external callers of ksys_dup{,3}() should be converted to call do_dup2() directly. Then, ksys_dup{,3}() can be moved within sys_dup{,3}() again. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski fs/file.c | 16 +++++++++++++--- include/linux/syscalls.h | 1 + init/do_mounts_initrd.c | 4 ++-- init/main.c | 4 ++-- 4 files changed, 18 insertions(+), 7 deletions(-) commit 3a18ef5c1b3935cb05888fc37964321f7bd6231d Author: Dominik Brodowski Date: Sun Mar 11 11:34:40 2018 +0100 fs: add ksys_umount() helper; remove in-kernel call to sys_umount() Using this helper allows us to avoid the in-kernel call to the sys_umount() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as ksys_umount(). In the near future, the only fs-external caller of ksys_umount() should be converted to call do_umount() directly. Then, ksys_umount() can be moved within sys_umount() again. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski fs/namespace.c | 9 +++++++-- include/linux/syscalls.h | 1 + init/do_mounts_initrd.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) commit 312db1aa1dc7bff133d95c92efcc5e42b57cefa6 Author: Dominik Brodowski Date: Sun Mar 11 11:34:39 2018 +0100 fs: add ksys_mount() helper; remove in-kernel calls to sys_mount() Using this helper allows us to avoid the in-kernel calls to the sys_mount() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_mount(). In the near future, all callers of ksys_mount() should be converted to call do_mount() directly. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski drivers/base/devtmpfs.c | 5 +++-- fs/namespace.c | 10 ++++++++-- include/linux/syscalls.h | 3 +++ init/do_mounts.c | 4 ++-- init/do_mounts_initrd.c | 6 +++--- 5 files changed, 19 insertions(+), 9 deletions(-) commit ab0d1e85bfd0c25260f02cd3708d5abdfb5b5a9c Author: Dominik Brodowski Date: Sun Mar 4 21:54:05 2018 +0100 fs/quota: use COMPAT_SYSCALL_DEFINE for sys32_quotactl() While sys32_quotactl() is only needed on x86, it can use the recommended COMPAT_SYSCALL_DEFINEx() machinery for its setup. Acked-by: Jan Kara Cc: Christoph Hellwig Signed-off-by: Dominik Brodowski arch/x86/entry/syscalls/syscall_32.tbl | 2 +- fs/quota/compat.c | 5 +++-- include/linux/compat.h | 3 +++ include/linux/syscalls.h | 2 -- kernel/sys_ni.c | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) commit cb0b476ab12ca3bd9dd9122047660f3a73e8d647 Author: Dominik Brodowski Date: Sat Mar 17 16:26:56 2018 +0100 fs/quota: add kernel_quotactl() helper; remove in-kernel call to syscall Using the fs-internal kernel_quotactl() helper allows us to get rid of the fs-internal call to the sys_quotactl() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Acked-by: Jan Kara Signed-off-by: Dominik Brodowski fs/quota/compat.c | 8 ++++---- fs/quota/quota.c | 10 ++++++++-- include/linux/quotaops.h | 3 +++ 3 files changed, 15 insertions(+), 6 deletions(-) commit 183caa3c8668e95c3647ac1e7e6b8876b7d9fbdb Author: Dominik Brodowski Date: Sat Mar 17 15:06:11 2018 +0100 fanotify: add do_fanotify_mark() helper; remove in-kernel call to syscall Using the fs-internal do_fanotify_mark() helper allows us to get rid of the fs-internal call to the sys_fanotify_mark() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Acked-by: Jan Kara Cc: Amir Goldstein Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Dominik Brodowski fs/notify/fanotify/fanotify_user.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit d0d89d1ed3ff7e39d80773be09918037d06522fb Author: Dominik Brodowski Date: Tue Mar 13 21:27:21 2018 +0100 inotify: add do_inotify_init() helper; remove in-kernel call to syscall Using the inotify-internal do_inotify_init() helper allows us to get rid of the in-kernel call to sys_inotify_init1() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Acked-by: Jan Kara Cc: Amir Goldstein Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Dominik Brodowski fs/notify/inotify/inotify_user.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit ab641afa73fbcdee962c4ec9641dd561fdae9944 Author: Dominik Brodowski Date: Tue Mar 20 19:39:44 2018 +0100 fs: add do_compat_futimesat() helper; remove in-kernel call to compat syscall Using the fs-internal do_compat_futimesat() helper allows us to get rid of the fs-internal call to the compat_sys_futimesat() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/utimes.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 570484bfe813fa67da003077898a7046767cb4d1 Author: Dominik Brodowski Date: Tue Mar 20 19:36:46 2018 +0100 fs: add do_compat_signalfd4() helper; remove in-kernel call to compat syscall Using the fs-internal do_compat_signalfd4() helper allows us to get rid of the fs-internal call to the compat_sys_signalfd4() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/signalfd.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 05585e449572d7bdb798a87a732f86760c6b3c77 Author: Dominik Brodowski Date: Tue Mar 20 19:33:48 2018 +0100 fs: add do_compat_select() helper; remove in-kernel call to compat syscall Using the fs-internal do_compat_select() helper allows us to get rid of the fs-internal call to the compat_sys_select() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/select.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit e02af2ff654806c5dc93412fffd77d67d1125ccc Author: Dominik Brodowski Date: Tue Mar 20 19:29:53 2018 +0100 fs: add do_compat_fcntl64() helper; remove in-kernel call to compat syscall Using the fs-internal do_compat_fcntl64() helper allows us to get rid of the fs-internal call to the compat_sys_fcntl64() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/fcntl.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 4bdb9acabff2dfcb856c40b6936269d87f490c8d Author: Dominik Brodowski Date: Sun Mar 18 07:53:04 2018 +0100 fs: add kern_select() helper; remove in-kernel call to sys_select() Using this helper allows us to avoid the in-kernel call to the sys_umount() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/select.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 30cfe4ef8b8948842a48de7955ca0522568eeb6d Author: Dominik Brodowski Date: Sat Mar 17 15:00:24 2018 +0100 fs: add do_vmsplice() helper; remove in-kernel call to syscall Using the fs-internal do_vmsplice() helper allows us to get rid of the fs-internal call to the sys_vmsplice() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/splice.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 98e5f7bd2c67f4028a0797393092f8730118d713 Author: Dominik Brodowski Date: Sat Mar 17 14:53:38 2018 +0100 fs: add do_lookup_dcookie() helper; remove in-kernel call to syscall Using the fs-internal do_lookup_dcookie() helper allows us to get rid of fs-internal calls to the sys_lookup_dcookie() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski fs/dcookies.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 2fc96f8331ba7d08ddc126d154a1504b9a79b79e Author: Dominik Brodowski Date: Sun Mar 11 11:34:37 2018 +0100 fs: add do_eventfd() helper; remove internal call to sys_eventfd() Using this helper removes an in-kernel call to the sys_eventfd() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski fs/eventfd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 52fb6db0fd6f50ac71475f02b96098fbb1fb3417 Author: Dominik Brodowski Date: Sun Mar 11 11:34:36 2018 +0100 fs: add do_signalfd4() helper; remove internal calls to sys_signalfd4() Using this helper removes in-kernel calls to the sys_signalfd4() syscall function. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski fs/signalfd.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 791eb22eef0d077df4ddcf633ee6eac038f0431e Author: Dominik Brodowski Date: Sun Mar 11 11:34:30 2018 +0100 fs: add do_epoll_*() helpers; remove internal calls to sys_epoll_*() Using the helper functions do_epoll_create() and do_epoll_wait() allows us to remove in-kernel calls to the related syscall functions. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski fs/eventpoll.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit f13903587c189fa73da47ddd416eb31704c48486 Author: Dominik Brodowski Date: Sun Mar 11 11:34:29 2018 +0100 fs: add do_futimesat() helper; remove internal call to sys_futimesat() Using this helper removes the in-kernel call to the sys_futimesat() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski fs/utimes.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit ee81feb64ead8e4bed0ebc94c980e6cd836aaafd Author: Dominik Brodowski Date: Sun Mar 11 11:34:28 2018 +0100 fs: add do_renameat2() helper; remove internal call to sys_renameat2() Using this helper removes in-kernel calls to the sys_renameat2() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski fs/namei.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 0a216dd1cfe8a4966767e7e8c0bb90c3db163def Author: Dominik Brodowski Date: Sun Mar 11 11:34:28 2018 +0100 fs: add do_pipe2() helper; remove internal call to sys_pipe2() Using this helper removes an in-kernel call to the sys_pipe2() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski fs/pipe.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 2dae0248061e6a8a2cccfb2ad01a76f674e40d72 Author: Dominik Brodowski Date: Sun Mar 11 11:34:27 2018 +0100 fs: add do_readlinkat() helper; remove internal call to sys_readlinkat() Using the do_readlinkat() helper removes an in-kernel call to the sys_readlinkat() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro Signed-off-by: Dominik Brodowski fs/stat.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit af03c4acb728dd9ed850d329a1cff71d52e7f3a8 Author: Dominik Brodowski Date: Sat Mar 17 16:20:01 2018 +0100 mm: add kernel_[sg]et_mempolicy() helpers; remove in-kernel calls to syscalls Using the mm-internal kernel_[sg]et_mempolicy() helper allows us to get rid of the mm-internal calls to the sys_[sg]et_mempolicy() syscalls. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: linux-mm@kvack.org Cc: Andrew Morton Signed-off-by: Dominik Brodowski mm/mempolicy.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit e7dc9ad6e98eb8cc49b454d54e361f91aebc395f Author: Dominik Brodowski Date: Sat Mar 17 16:12:22 2018 +0100 mm: add kernel_mbind() helper; remove in-kernel call to syscall Using the mm-internal kernel_mbind() helper allows us to get rid of the mm-internal call to the sys_mbind() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: linux-mm@kvack.org Cc: Andrew Morton Signed-off-by: Dominik Brodowski mm/mempolicy.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 7addf44388255f6fa99c83e3e2ad79cef0813698 Author: Dominik Brodowski Date: Sat Mar 17 16:08:03 2018 +0100 mm: add kernel_move_pages() helper, move compat syscall to mm/migrate.c Move compat_sys_move_pages() to mm/migrate.c and make it call a newly introduced helper -- kernel_move_pages() -- instead of the syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: linux-mm@kvack.org Cc: Andrew Morton Signed-off-by: Dominik Brodowski kernel/compat.c | 22 ---------------------- mm/migrate.c | 39 +++++++++++++++++++++++++++++++++++---- 2 files changed, 35 insertions(+), 26 deletions(-) commit b6e9b0babb7a02ae4f00f053974609000f00950e Author: Dominik Brodowski Date: Sat Mar 17 16:00:25 2018 +0100 mm: add kernel_migrate_pages() helper, move compat syscall to mm/mempolicy.c Move compat_sys_migrate_pages() to mm/mempolicy.c and make it call a newly introduced helper -- kernel_migrate_pages() -- instead of the syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: linux-mm@kvack.org Cc: Andrew Morton Signed-off-by: Dominik Brodowski kernel/compat.c | 33 --------------------------------- mm/mempolicy.c | 48 ++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 44 insertions(+), 37 deletions(-) commit 7d4dd4f159b94003655b1688d9a4c0e2b6268ff8 Author: Dominik Brodowski Date: Wed Mar 14 22:40:35 2018 +0100 sched: add do_sched_yield() helper; remove in-kernel call to sched_yield() Using the sched-internal do_sched_yield() helper allows us to get rid of the sched-internal call to the sys_sched_yield() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Signed-off-by: Dominik Brodowski kernel/sched/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e530dca584a9aa4aedf26adf0ed3c1c9b80e2767 Author: Dominik Brodowski Date: Mon Mar 19 18:09:27 2018 +0100 kernel: provide ksys_*() wrappers for syscalls called by kernel/uid16.c Using these helpers allows us to avoid the in-kernel calls to these syscalls: sys_setregid(), sys_setgid(), sys_setreuid(), sys_setuid(), sys_setresuid(), sys_setresgid(), sys_setfsuid(), and sys_setfsgid(). The ksys_ prefix denotes that these function are meant as a drop-in replacement for the syscall. In particular, they use the same calling convention. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Eric W. Biederman Cc: Andrew Morton Signed-off-by: Dominik Brodowski kernel/sys.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++-------- kernel/uid16.c | 19 ++++++++++--------- kernel/uid16.h | 14 ++++++++++++++ 3 files changed, 74 insertions(+), 17 deletions(-) commit 6203deb0a76f35b6dc476fecb228c850099a1bc4 Author: Dominik Brodowski Date: Sat Mar 17 17:11:51 2018 +0100 kernel: add do_compat_sigaltstack() helper; remove in-kernel call to compat syscall Using this helper allows us to avoid the in-kernel call to the compat_sys_sigaltstack() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: "Eric W. Biederman" Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski kernel/signal.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 192c58073d9abb1c507c89f109da5dc9f130ba70 Author: Dominik Brodowski Date: Sun Mar 11 11:34:27 2018 +0100 kernel: add do_getpgid() helper; remove internal call to sys_getpgid() Using the do_getpgid() helper removes an in-kernel call to the sys_getpgid() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Signed-off-by: Dominik Brodowski kernel/sys.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 31c213f2106b7ea06f7fdc94ef8b785ed5342cf7 Author: Dominik Brodowski Date: Tue Mar 20 21:29:00 2018 +0100 ipc: add msgsnd syscall/compat_syscall wrappers Provide ksys_msgsnd() and compat_ksys_msgsnd() wrappers to avoid in-kernel calls to these syscalls. The ksys_ prefix denotes that these functions are meant as a drop-in replacement for the syscalls. In particular, they use the same calling convention as sys_msgsnd() and compat_sys_msgsnd(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski ipc/msg.c | 20 ++++++++++++++++---- ipc/syscall.c | 4 ++-- ipc/util.h | 4 ++++ 3 files changed, 22 insertions(+), 6 deletions(-) commit 078faac9e8b6c8124bc012bbf97cca59caf6d4ea Author: Dominik Brodowski Date: Tue Mar 20 21:25:57 2018 +0100 ipc: add msgrcv syscall/compat_syscall wrappers Provide ksys_msgrcv() and compat_ksys_msgrcv() wrappers to avoid in-kernel calls to these syscalls. The ksys_ prefix denotes that these functions are meant as a drop-in replacement for the syscalls. In particular, they use the same calling convention as sys_msgrcv() and compat_sys_msgrcv(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski ipc/msg.c | 19 ++++++++++++++++--- ipc/syscall.c | 8 ++++---- ipc/util.h | 4 ++++ 3 files changed, 24 insertions(+), 7 deletions(-) commit e340db56483b6e10bd5e5f281071876808801a41 Author: Dominik Brodowski Date: Tue Mar 20 20:15:28 2018 +0100 ipc: add msgctl syscall/compat_syscall wrappers Provide ksys_msgctl() and compat_ksys_msgctl() wrappers to avoid in-kernel calls to these syscalls. The ksys_ prefix denotes that these functions are meant as a drop-in replacement for the syscalls. In particular, they use the same calling convention as sys_msgctl() and compat_sys_msgctl(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski ipc/msg.c | 14 ++++++++++++-- ipc/syscall.c | 5 +++-- ipc/util.h | 2 ++ 3 files changed, 17 insertions(+), 4 deletions(-) commit c84d0791dfa7fe8f051082c09a558eb3e2d01931 Author: Dominik Brodowski Date: Tue Mar 20 20:12:33 2018 +0100 ipc: add shmctl syscall/compat_syscall wrappers Provide ksys_shmctl() and compat_ksys_shmctl() wrappers to avoid in-kernel calls to these syscalls. The ksys_ prefix denotes that these functions are meant as a drop-in replacement for the syscalls. In particular, they use the same calling convention as sys_shmctl() and compat_sys_shmctl(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski ipc/shm.c | 14 ++++++++++++-- ipc/syscall.c | 4 ++-- ipc/util.h | 2 ++ 3 files changed, 16 insertions(+), 4 deletions(-) commit da1e2744341542e404c172bcf6a321f509408b14 Author: Dominik Brodowski Date: Tue Mar 20 20:09:48 2018 +0100 ipc: add shmdt syscall wrapper Provide ksys_shmdt() wrapper to avoid in-kernel calls to this syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_shmdt(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski ipc/shm.c | 7 ++++++- ipc/syscall.c | 4 ++-- ipc/util.h | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) commit 65749e0bb5e7de876ee43d3f601e32afe17e9248 Author: Dominik Brodowski Date: Tue Mar 20 20:07:53 2018 +0100 ipc: add shmget syscall wrapper Provide ksys_shmget() wrapper to avoid in-kernel calls to this syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_shmget(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski ipc/shm.c | 7 ++++++- ipc/syscall.c | 4 ++-- ipc/util.h | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) commit 3d65661a494a11266500c2532b4f163537c379db Author: Dominik Brodowski Date: Tue Mar 20 20:06:04 2018 +0100 ipc: add msgget syscall wrapper Provide ksys_msgget() wrapper to avoid in-kernel calls to this syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_msgget(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski ipc/msg.c | 7 ++++++- ipc/syscall.c | 4 ++-- ipc/util.h | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) commit d969c6fa7263c8fc1928f528bb68587872350b6c Author: Dominik Brodowski Date: Tue Mar 20 20:00:39 2018 +0100 ipc: add semctl syscall/compat_syscall wrappers Provide ksys_semctl() and compat_ksys_semctl() wrappers to avoid in-kernel calls to these syscalls. The ksys_ prefix denotes that these functions are meant as a drop-in replacement for the syscalls. In particular, they use the same calling convention as sys_semctl() and compat_sys_semctl(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski ipc/sem.c | 14 ++++++++++++-- ipc/syscall.c | 4 ++-- ipc/util.h | 2 ++ 3 files changed, 16 insertions(+), 4 deletions(-) commit 69894718a515fef7ff633cf354fcd7ed73a88891 Author: Dominik Brodowski Date: Tue Mar 20 19:53:58 2018 +0100 ipc: add semget syscall wrapper Provide ksys_semget() wrapper to avoid in-kernel calls to this syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_semget(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski ipc/sem.c | 7 ++++++- ipc/syscall.c | 4 ++-- ipc/util.h | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) commit 41f4f0e2f5f4cd060885405c04214851ffe7b299 Author: Dominik Brodowski Date: Tue Mar 20 19:48:14 2018 +0100 ipc: add semtimedop syscall/compat_syscall wrappers Provide ksys_semtimedop() and compat_ksys_semtimedop() wrappers to avoid in-kernel calls to these syscalls. The ksys_ prefix denotes that these functions are meant as a drop-in replacement for the syscalls. In particular, they use the same calling convention as sys_semtimedop() and compat_sys_semtimedop(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski ipc/sem.c | 23 ++++++++++++++++++----- ipc/syscall.c | 17 ++++++++++------- ipc/util.h | 13 +++++++++++++ 3 files changed, 41 insertions(+), 12 deletions(-) commit 6df354653e8cc07be1f057d9207e1092c0b3963b Author: Dominik Brodowski Date: Fri Mar 16 17:07:03 2018 +0100 net: socket: add __compat_sys_...msg() helpers; remove in-kernel calls to compat syscalls Using the net-internal helpers __compat_sys_...msg() allows us to avoid the internal calls to the compat_sys_...msg() syscalls. compat_sys_recvmmsg() is handled in a different patch. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski net/compat.c | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) commit 157b334aa84dc5a4edcbf056b7254263e4112ba8 Author: Dominik Brodowski Date: Fri Mar 16 17:10:50 2018 +0100 net: socket: add __compat_sys_recvmmsg() helper; remove in-kernel call to compat syscall Using the net-internal helper __compat_sys_recvmmsg() allows us to avoid the internal calls to the compat_sys_recvmmsg() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski net/compat.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 8770cf4a5858c4f7c109a3e47dfd3715fda45f2c Author: Dominik Brodowski Date: Fri Mar 16 17:01:41 2018 +0100 net: socket: add __compat_sys_getsockopt() helper; remove in-kernel call to compat syscall Using the net-internal helper __compat_sys_getsockopt() allows us to avoid the internal calls to the compat_sys_getsockopt() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski net/compat.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 73ee3eafd5d1037af9762d28d17611bcf64834d6 Author: Dominik Brodowski Date: Fri Mar 16 16:58:54 2018 +0100 net: socket: add __compat_sys_setsockopt() helper; remove in-kernel call to compat syscall Using the net-internal helper __compat_sys_setsockopt() allows us to avoid the internal calls to the compat_sys_setsockopt() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski net/compat.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit fd4e82f5b8612ce90bf85f062f2b7954044a1db7 Author: Dominik Brodowski Date: Fri Mar 16 16:48:34 2018 +0100 net: socket: add __compat_sys_recvfrom() helper; remove in-kernel call to compat syscall Using the net-internal helper __compat_sys_recvfrom() allows us to avoid the internal calls to the compat_sys_recvfrom() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski net/compat.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit d27e9afc64206b5a2fe02561716cee5be9aacf01 Author: Dominik Brodowski Date: Tue Mar 13 19:54:17 2018 +0100 net: socket: replace call to sys_recv() with __sys_recvfrom() sys_recv() merely expands the parameters to __sys_recvfrom() by NULL and NULL. Open-code this in the two places which used sys_recv() as a wrapper to __sys_recvfrom(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski net/compat.c | 3 ++- net/socket.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit f3bf896b1d041153ea1c6cfa58f6f4658c91089f Author: Dominik Brodowski Date: Tue Mar 13 19:52:00 2018 +0100 net: socket: replace calls to sys_send() with __sys_sendto() sys_send() merely expands the parameters to __sys_sendto() by NULL and 0. Open-code this in the two places which used sys_send() as a wrapper to __sys_sendto(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski net/compat.c | 2 +- net/socket.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit e1834a329d6bb5659c14e9e537bd1f750fe3b85e Author: Dominik Brodowski Date: Tue Mar 13 20:35:57 2018 +0100 net: socket: move check for forbid_cmsg_compat to __sys_...msg() The non-compat codepaths for sys_...msg() verify that MSG_CMSG_COMPAT is not set. By moving this check to the __sys_...msg() functions (and making it dependent on a static flag passed to this function), we can call the __sys...msg() functions instead of the syscall functions in all cases. __sys_recvmmsg() does not need this trickery, as the check is handled within the do_sys_recvmmsg() function internal to net/socket.c. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski include/linux/socket.h | 13 +++++++++---- net/compat.c | 8 +++++--- net/socket.c | 38 +++++++++++++++++++++++--------------- 3 files changed, 37 insertions(+), 22 deletions(-) commit 1255e2690689ba5b72814c8df7bfd9ecf50175aa Author: Dominik Brodowski Date: Tue Mar 13 20:44:21 2018 +0100 net: socket: add do_sys_recvmmsg() helper; remove in-kernel call to syscall Using the net-internal helper do_sys_recvmmsg() allows us to avoid the internal calls to the sys_getsockopt() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski net/socket.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 13a2d70e2b5218dde4b551a9b7adc5a11e359a05 Author: Dominik Brodowski Date: Tue Mar 13 20:15:04 2018 +0100 net: socket: add __sys_getsockopt() helper; remove in-kernel call to syscall Using the net-internal helper __sys_getsockopt() allows us to avoid the internal calls to the sys_getsockopt() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski net/socket.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit cc36dca0dffad991135d0e28938ba2b4c0b786f7 Author: Dominik Brodowski Date: Tue Mar 13 20:10:59 2018 +0100 net: socket: add __sys_setsockopt() helper; remove in-kernel call to syscall Using the net-internal helper __sys_setsockopt() allows us to avoid the internal calls to the sys_setsockopt() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski include/linux/socket.h | 1 + net/socket.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) commit 005a1aeac46666e2805f316596893ebd2a3c12e7 Author: Dominik Brodowski Date: Tue Mar 13 20:07:05 2018 +0100 net: socket: add __sys_shutdown() helper; remove in-kernel call to syscall Using the net-internal helper __sys_shutdown() allows us to avoid the internal calls to the sys_shutdown() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski include/linux/socket.h | 1 + net/compat.c | 2 +- net/socket.c | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) commit 6debc8d834ebc73566e5255c565c8fb307be22c5 Author: Dominik Brodowski Date: Tue Mar 13 19:49:23 2018 +0100 net: socket: add __sys_socketpair() helper; remove in-kernel call to syscall Using the net-internal helper __sys_socketpair() allows us to avoid the internal calls to the sys_socketpair() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski include/linux/socket.h | 2 ++ net/compat.c | 2 +- net/socket.c | 11 ++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) commit b21c8f838a0e5b84c0d78fd9ed6b9f2cf97afbe9 Author: Dominik Brodowski Date: Tue Mar 13 19:47:00 2018 +0100 net: socket: add __sys_getpeername() helper; remove in-kernel call to syscall Using the net-internal helper __sys_getpeername() allows us to avoid the internal calls to the sys_getpeername() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski include/linux/socket.h | 2 ++ net/compat.c | 2 +- net/socket.c | 14 ++++++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) commit 8882a107b3062c6222cdbeadb284ea054ae50a3f Author: Dominik Brodowski Date: Tue Mar 13 19:43:14 2018 +0100 net: socket: add __sys_getsockname() helper; remove in-kernel call to syscall Using the net-internal helper __sys_getsockname() allows us to avoid the internal calls to the sys_getsockname() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski include/linux/socket.h | 2 ++ net/compat.c | 2 +- net/socket.c | 14 ++++++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) commit 25e290eed9c653cc90ac675d64b30b66cffce82f Author: Dominik Brodowski Date: Tue Mar 13 19:36:54 2018 +0100 net: socket: add __sys_listen() helper; remove in-kernel call to syscall Using the net-internal helper __sys_listen() allows us to avoid the internal calls to the sys_listen() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski include/linux/socket.h | 1 + net/compat.c | 2 +- net/socket.c | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) commit 1387c2c2f988f8180c6189d5083eaeeb8f120d44 Author: Dominik Brodowski Date: Tue Mar 13 19:35:09 2018 +0100 net: socket: add __sys_connect() helper; remove in-kernel call to syscall Using the net-internal helper __sys_connect() allows us to avoid the internal calls to the sys_connect() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski include/linux/socket.h | 2 ++ net/compat.c | 2 +- net/socket.c | 11 ++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) commit a87d35d87a3e4f2a0b0968d1f06703c909138b62 Author: Dominik Brodowski Date: Tue Mar 13 19:33:09 2018 +0100 net: socket: add __sys_bind() helper; remove in-kernel call to syscall Using the net-internal helper __sys_bind() allows us to avoid the internal calls to the sys_bind() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski include/linux/socket.h | 1 + net/compat.c | 2 +- net/socket.c | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) commit 9d6a15c3f23bcf0b0e6c6efd7d19f52d960a8697 Author: Dominik Brodowski Date: Tue Mar 13 19:29:43 2018 +0100 net: socket: add __sys_socket() helper; remove in-kernel call to syscall Using the net-internal helper __sys_socket() allows us to avoid the internal calls to the sys_socket() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski include/linux/socket.h | 1 + net/compat.c | 2 +- net/socket.c | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) commit 4541e80560ca56d63348f40f2e34b044a5eb3dd7 Author: Dominik Brodowski Date: Tue Mar 13 19:24:23 2018 +0100 net: socket: add __sys_accept4() helper; remove in-kernel call to syscall Using the net-internal helper __sys_accept4() allows us to avoid the internal calls to the sys_accept4() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski include/linux/socket.h | 2 ++ net/compat.c | 4 ++-- net/socket.c | 20 +++++++++++++------- 3 files changed, 17 insertions(+), 9 deletions(-) commit 211b634b7f1ebc3436d5e8a34810a8eaa1f269d9 Author: Dominik Brodowski Date: Tue Mar 13 19:18:52 2018 +0100 net: socket: add __sys_sendto() helper; remove in-kernel call to syscall Using the net-internal helper __sys_sendto() allows us to avoid the internal calls to the sys_sendto() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski include/linux/socket.h | 3 +++ net/compat.c | 3 ++- net/socket.c | 19 ++++++++++++------- 3 files changed, 17 insertions(+), 8 deletions(-) commit 7a09e1eb9c1e5179797e0f3341ba7315c7626a0c Author: Dominik Brodowski Date: Tue Mar 13 19:10:06 2018 +0100 net: socket: add __sys_recvfrom() helper; remove in-kernel call to syscall Using the net-internal helper __sys_recvfrom() allows us to avoid the internal calls to the sys_recvfrom() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski include/linux/socket.h | 6 ++++++ net/compat.c | 3 ++- net/socket.c | 21 +++++++++++++-------- 3 files changed, 21 insertions(+), 9 deletions(-) commit b51d3cdf44d5ca9000de1e3d64551337d67b1cad Author: Dominik Brodowski Date: Sun Mar 18 08:03:01 2018 +0100 x86: remove compat_sys_x86_waitpid() compat_sys_x86_waitpid() is not needed, as it takes the same parameters (int, *int, int) as the native syscall. Suggested-by: Al Viro Cc: Ingo Molnar Cc: Jiri Slaby Cc: x86@kernel.org Reviewed-by: Thomas Gleixner Signed-off-by: Dominik Brodowski arch/x86/entry/syscalls/syscall_32.tbl | 2 +- arch/x86/ia32/sys_ia32.c | 6 ------ arch/x86/include/asm/sys_ia32.h | 3 --- 3 files changed, 1 insertion(+), 10 deletions(-) commit 37db219ef9ccff280c83f10e5d7c1e5a1b6abc1b Author: Dominik Brodowski Date: Sun Mar 18 08:11:26 2018 +0100 x86: use _do_fork() in compat_sys_x86_clone() It is trivial to directly call _do_fork() instead of the sys_clone() syscall in compat_sys_x86_clone(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Ingo Molnar Cc: Jiri Slaby Cc: x86@kernel.org Reviewed-by: Thomas Gleixner Signed-off-by: Dominik Brodowski arch/x86/ia32/sys_ia32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2de0db992de189fccc83fed57c30875144821491 Author: Dominik Brodowski Date: Sun Mar 11 11:34:26 2018 +0100 mm: use do_futex() instead of sys_futex() in mm_release() sys_futex() is a wrapper to do_futex() which does not modify any values here: - uaddr, val and val3 are kept the same - op is masked with FUTEX_CMD_MASK, but is always set to FUTEX_WAKE. Therefore, val2 is always 0. - as utime is set to NULL, *timeout is NULL This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Darren Hart Cc: Andrew Morton Reviewed-by: Thomas Gleixner Signed-off-by: Dominik Brodowski include/linux/futex.h | 13 ++++++++++--- kernel/fork.c | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) commit 6b27aef09fea32b805a8c81287b1bb80362dadb0 Author: Dominik Brodowski Date: Sat Mar 17 15:18:30 2018 +0100 kexec: call do_kexec_load() in compat syscall directly do_kexec_load() can be called directly by compat_sys_kexec() as long as the same parameters checks are completed which are currently handled (also) by sys_kexec(). Therefore, move those to kexec_load_check(), call that newly introduced helper function from both sys_kexec() and compat_sys_kexec(), and duplicate the remaining code from sys_kexec() in compat_sys_kexec(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Eric Biederman Cc: kexec@lists.infradead.org Signed-off-by: Dominik Brodowski kernel/kexec.c | 52 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 13 deletions(-) commit d53238cd51a80f6f2e5b9d64830c62e2086787bd Author: Dominik Brodowski Date: Sun Mar 11 11:34:37 2018 +0100 kernel: open-code sys_rt_sigpending() in sys_sigpending() A similar but not fully equivalent code path is already open-coded three times (in sys_rt_sigpending and in the two compat stubs), so do it a fourth time here. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski include/linux/syscalls.h | 2 +- kernel/signal.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) commit d300b610812f3c10d146db4c18f98eba38834c70 Author: Dominik Brodowski Date: Sun Mar 11 11:34:26 2018 +0100 kernel: use kernel_wait4() instead of sys_wait4() All call sites of sys_wait4() set *rusage to NULL. Therefore, there is no need for the copy_to_user() handling of *rusage, and we can use kernel_wait4() directly. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Acked-by: Luis R. Rodriguez Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski kernel/exit.c | 2 +- kernel/pid_namespace.c | 6 +++--- kernel/umh.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 07108d0e7c7fbbf9c6d76c0af2f1813e4f3f0800 Author: Steve French Date: Sun Apr 1 20:15:55 2018 -0500 cifs: Add minor debug message during negprot Check for unknown security mode flags during negotiate protocol if debugging enabled. Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/smb2pdu.c | 4 +++- fs/cifs/smb2pdu.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 7ea884c77e5c97f1e0a1a422d961d27f78ca2745 Author: Steve French Date: Sat Mar 31 18:13:38 2018 -0500 smb3: Fix root directory when server returns inode number of zero Some servers return inode number zero for the root directory, which causes ls to display incorrect data (missing "." and ".."). If the server returns zero for the inode number of the root directory, fake an inode number for it. Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky CC: Stable fs/cifs/cifsglob.h | 1 + fs/cifs/inode.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit 6c4ba31133f1af68fd9abe070debeec14e7307d8 Author: Steve French Date: Sat Mar 31 12:36:26 2018 -0500 cifs: fix sparse warning on previous patch in a few printks Signed-off-by: Steve French CC: Ronnie Sahlberg fs/cifs/smb2misc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 93012bf984163f6616d1ab606a7cd86095c052c6 Author: Ronnie Sahlberg Date: Sat Mar 31 11:45:31 2018 +1100 cifs: add server->vals->header_preamble_size This variable is set to 4 for all protocol versions and replaces the hardcoded constant 4 throughought the code. This will later be updated to reflect whether a response packet has a 4 byte length preamble or not once we start removing this field from the SMB2+ dialects. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/cifsglob.h | 1 + fs/cifs/cifssmb.c | 6 ++++-- fs/cifs/connect.c | 16 ++++++++++----- fs/cifs/smb1ops.c | 1 + fs/cifs/smb2misc.c | 19 +++++++++-------- fs/cifs/smb2ops.c | 59 +++++++++++++++++++++++++++++++++-------------------- fs/cifs/smb2pdu.c | 15 ++++++++------ fs/cifs/transport.c | 3 ++- 8 files changed, 75 insertions(+), 45 deletions(-) commit 486adcea4a63bec206cba6f0d7f301fb945ae9d3 Merge: 701f3b3 1159e094 Author: Linus Torvalds Date: Mon Apr 2 11:06:34 2018 -0700 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: "The main kernel side changes were: - Modernize the kprobe and uprobe creation/destruction tooling ABIs: The existing text based APIs (kprobe_events and uprobe_events in tracefs), are naive, limited ABIs in that they require user-space to clean up after themselves, which is both difficult and fragile if the tool is buggy or exits unexpectedly. In other words they are not really suited for modern, robust tooling. So introduce a modern, file descriptor based ABI that does not have these limitations: introduce the 'perf_kprobe' and 'perf_uprobe' PMUs and extend the perf_event_open() syscall to create events with a kprobe/uprobe attached to them. These [k,u]probe are associated with this file descriptor, so they are not available in tracefs. (Song Liu) - Intel Cannon Lake CPU support (Harry Pan) - Intel PT cleanups (Alexander Shishkin) - Improve the performance of pinned/flexible event groups by using RB trees (Alexey Budankov) - Add PERF_EVENT_IOC_MODIFY_ATTRIBUTES which allows the modification of hardware breakpoints, which new ABI variant massively speeds up existing tooling that uses hardware breakpoints to instrument (and debug) memory usage. (Milind Chabbi, Jiri Olsa) - Various Intel PEBS handling fixes and improvements, and other Intel PMU improvements (Kan Liang) - Various perf core improvements and optimizations (Peter Zijlstra) - ... misc cleanups, fixes and updates. There's over 200 tooling commits, here's an (imperfect) list of highlights: - 'perf annotate' improvements: * Recognize and handle jumps to other functions as calls, which improves the navigation along jumps and back. (Arnaldo Carvalho de Melo) * Add the 'P' hotkey in TUI annotation to dump annotation output into a file, to ease e-mail reporting of annotation details. (Arnaldo Carvalho de Melo) * Add an IPC/cycles column to the TUI (Jin Yao) * Improve s390 assembly annotation (Thomas Richter) * Refactor the output formatting logic to better separate it into interactive and non-interactive features and add the --stdio2 output variant to demonstrate this. (Arnaldo Carvalho de Melo) - 'perf script' improvements: * Add Python 3 support (Jaroslav Škarvada) * Add --show-round-event (Jiri Olsa) - 'perf c2c' improvements: * Add NUMA analysis support (Jiri Olsa) - 'perf trace' improvements: * Improve PowerPC support (Ravi Bangoria) - 'perf inject' improvements: * Integrate ARM CoreSight traces (Robert Walker) - 'perf stat' improvements: * Add the --interval-count option (yuzhoujian) * Add the --timeout option (yuzhoujian) - 'perf sched' improvements (Changbin Du) - Vendor events improvements : * Add IBM s390 vendor events (Thomas Richter) * Add and improve arm64 vendor events (John Garry, Ganapatrao Kulkarni) * Update POWER9 vendor events (Sukadev Bhattiprolu) - Intel PT tooling improvements (Adrian Hunter) - PMU handling improvements (Agustin Vega-Frias) - Record machine topology in perf.data (Jiri Olsa) - Various overwrite related cleanups (Kan Liang) - Add arm64 dwarf post unwind support (Kim Phillips, Jean Pihet) - ... and lots of other changes, cleanups and fixes, see the shortlog and Git history for details" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (262 commits) perf/x86/intel: Enable C-state residency events for Cannon Lake perf/x86/intel: Add Cannon Lake support for RAPL profiling perf/x86/pt, coresight: Clean up address filter structure perf vendor events s390: Add JSON files for IBM z14 perf vendor events s390: Add JSON files for IBM z13 perf vendor events s390: Add JSON files for IBM zEC12 zBC12 perf vendor events s390: Add JSON files for IBM z196 perf vendor events s390: Add JSON files for IBM z10EC z10BC perf mmap: Be consistent when checking for an unmaped ring buffer perf mmap: Fix accessing unmapped mmap in perf_mmap__read_done() perf build: Fix check-headers.sh opts assignment perf/x86: Update rdpmc_always_available static key to the modern API perf annotate: Use absolute addresses to calculate jump target offsets perf annotate: Defer searching for comma in raw line till it is needed perf annotate: Support jumping from one function to another perf annotate: Add "_local" to jump/offset validation routines perf python: Reference Py_None before returning it perf annotate: Mark jumps to outher functions with the call arrow perf annotate: Pass function descriptor to its instruction parsing routines perf annotate: No need to calculate notes->start twice ... commit 6aa69043d9f3f4adc5b3817ccfcac1fddfe10ded Author: Daniel Díaz Date: Wed Feb 21 12:07:57 2018 -0600 selftests/intel_pstate: Fix build rule for x86 Ensure that ARCH is defined and that this only builds for x86 architectures. It is possible to build from the root of the Linux tree, which will define ARCH, or to run make from the selftests/ directory itself, which has no provision for defining ARCH, so this change is to use the current definition (if any), or to check uname -m if undefined. Signed-off-by: Daniel Díaz Signed-off-by: Shuah Khan tools/testing/selftests/intel_pstate/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 903d271a3f83826ef810a4b5dbbd9842cf0465d6 Merge: bc334cb 445bb42 Author: Takashi Iwai Date: Mon Apr 2 19:51:39 2018 +0200 Merge tag 'asoc-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v4.17 This is a *very* big release for ASoC. Not much change in the core but there s the transition of all the individual drivers over to components which is intended to support further core work. The goal is to make it easier to do further core work by removing the need to special case all the different driver classes in the core, many of the devices end up being used in multiple roles in modern systems. We also have quite a lot of new drivers added this month of all kinds, quite a few for simple devices but also some more advanced ones with more substantial code. - The biggest thing is the huge series from Morimoto-san which converted everything over to components. This is a huge change by code volume but was fairly mechanical - Many fixes for some of the Realtek based Baytrail systems covering both the CODECs and the CPUs, contributed by Hans de Goode. - Lots of cleanups for Samsung based Odroid systems from Sylwester Nawrocki. - The Freescale SSI driver also got a lot of cleanups from Nicolin Chen. - The Blackfin drivers have been removed as part of the removal of the architecture. - New drivers for AKM AK4458 and AK5558, several AMD based machines, several Intel based machines, Maxim MAX9759, Motorola CPCAP, Socionext Uniphier SoCs, and TI PCM1789 and TDA7419 commit bc334cb61b9ee6e85b9bb01519989a3ae8fe03f6 Merge: 5607ddd b44d419 Author: Takashi Iwai Date: Mon Apr 2 19:50:41 2018 +0200 Merge branch 'for-next' into for-linus Preparation for 4.17 merge. Signed-off-by: Takashi Iwai commit 701f3b314905ac05f09fc052c87b022825d831f2 Merge: 8747a29 19193bc Author: Linus Torvalds Date: Mon Apr 2 10:27:16 2018 -0700 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: "The main changes in the locking subsystem in this cycle were: - Add the Linux Kernel Memory Consistency Model (LKMM) subsystem, which is an an array of tools in tools/memory-model/ that formally describe the Linux memory coherency model (a.k.a. Documentation/memory-barriers.txt), and also produce 'litmus tests' in form of kernel code which can be directly executed and tested. Here's a high level background article about an earlier version of this work on LWN.net: https://lwn.net/Articles/718628/ The design principles: "There is reason to believe that Documentation/memory-barriers.txt could use some help, and a major purpose of this patch is to provide that help in the form of a design-time tool that can produce all valid executions of a small fragment of concurrent Linux-kernel code, which is called a "litmus test". This tool's functionality is roughly similar to a full state-space search. Please note that this is a design-time tool, not useful for regression testing. However, we hope that the underlying Linux-kernel memory model will be incorporated into other tools capable of analyzing large bodies of code for regression-testing purposes." [...] "A second tool is klitmus7, which converts litmus tests to loadable kernel modules for direct testing. As with herd7, the klitmus7 code is freely available from http://diy.inria.fr/sources/index.html (and via "git" at https://github.com/herd/herdtools7)" [...] Credits go to: "This patch was the result of a most excellent collaboration founded by Jade Alglave and also including Alan Stern, Andrea Parri, and Luc Maranget." ... and to the gents listed in the MAINTAINERS entry: LINUX KERNEL MEMORY CONSISTENCY MODEL (LKMM) M: Alan Stern M: Andrea Parri M: Will Deacon M: Peter Zijlstra M: Boqun Feng M: Nicholas Piggin M: David Howells M: Jade Alglave M: Luc Maranget M: "Paul E. McKenney" The LKMM project already found several bugs in Linux locking primitives and improved the understanding and the documentation of the Linux memory model all around. - Add KASAN instrumentation to atomic APIs (Dmitry Vyukov) - Add RWSEM API debugging and reorganize the lock debugging Kconfig (Waiman Long) - ... misc cleanups and other smaller changes" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits) locking/Kconfig: Restructure the lock debugging menu locking/Kconfig: Add LOCK_DEBUGGING_SUPPORT to make it more readable locking/rwsem: Add DEBUG_RWSEMS to look for lock/unlock mismatches lockdep: Make the lock debug output more useful locking/rtmutex: Handle non enqueued waiters gracefully in remove_waiter() locking/atomic, asm-generic, x86: Add comments for atomic instrumentation locking/atomic, asm-generic: Add KASAN instrumentation to atomic operations locking/atomic/x86: Switch atomic.h to use atomic-instrumented.h locking/atomic, asm-generic: Add asm-generic/atomic-instrumented.h locking/xchg/alpha: Remove superfluous memory barriers from the _local() variants tools/memory-model: Finish the removal of rb-dep, smp_read_barrier_depends(), and lockless_dereference() tools/memory-model: Add documentation of new litmus test tools/memory-model: Remove mention of docker/gentoo image locking/memory-barriers: De-emphasize smp_read_barrier_depends() some more locking/lockdep: Show unadorned pointers mutex: Drop linkage.h from mutex.h tools/memory-model: Remove rb-dep, smp_read_barrier_depends, and lockless_dereference tools/memory-model: Convert underscores to hyphens tools/memory-model: Add a S lock-based external-view litmus test tools/memory-model: Add required herd7 version to README file ... commit 8747a29173c6eb6f4b3e8d3b3bcabc0fa132678a Merge: cc67cce c4fb5f3 Author: Linus Torvalds Date: Mon Apr 2 09:59:09 2018 -0700 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU updates from Ingo Molnar: "The main RCU subsystem changes in this cycle were: - Miscellaneous fixes, perhaps most notably removing obsolete code whose only purpose in life was to gather information for the now-removed RCU debugfs facility. Other notable changes include removing NO_HZ_FULL_ALL in favor of the nohz_full kernel boot parameter, minor optimizations for expedited grace periods, some added tracing, creating an RCU-specific workqueue using Tejun's new WQ_MEM_RECLAIM flag, and several cleanups to code and comments. - SRCU cleanups and optimizations. - Torture-test updates, perhaps most notably the adding of ARMv8 support, but also including numerous cleanups and usability fixes" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (37 commits) rcu: Create RCU-specific workqueues with rescuers torture: Provide more sensible nreader/nwriter defaults for rcuperf torture: Grace periods do not piggyback off of themselves torture: Adjust rcuperf trace processing to allow for workqueues torture: Default jitter off when running rcuperf torture: Specify qemu memory size with --memory argument rcutorture: Add basic ARM64 support to run scripts rcutorture: Update kvm.sh header comment rcutorture: Record which grace-period primitives are tested rcutorture: Re-enable testing of dynamic expediting rcutorture: Avoid fake-writer use of undefined primitives rcutorture: Abstract function and module names rcutorture: Replace multi-instance kzalloc() with kcalloc() rcu: Remove SRCU throttling srcu: Remove dead code in srcu_gp_end() srcu: Reduce scans of srcu_data in counter wrap check srcu: Prevent sdp->srcu_gp_seq_needed_exp counter wrap srcu: Abstract function name rcu: Make expedited RCU CPU selection avoid unnecessary stores rcu: Trace expedited GP delays due to transitioning CPUs ... commit 709846725673a944ee38da1c275a6dfbf0576d0f Author: Jin Yao Date: Fri Mar 30 17:27:16 2018 +0800 perf version: Add man page Since a new option '--build-options' is created for 'perf version', so we need to document it. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1522402036-22915-7-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-version.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 3aa94b10ab0a818ed9fa2dc06c40812c136f9a5a Author: Jin Yao Date: Fri Mar 30 17:27:15 2018 +0800 perf tools: Add 'perf -vv' as an alias to 'perf version --build-options' We keep having bug reports that when users build perf on their own, but they don't install some needed libraries such as libelf, libbfd/libibery. The perf can build, but it is missing important functionality. This patch provides a new option '-vv' for perf which will print the compiled-in status of libraries. The 'perf -vv' is mapped to 'perf version --build-options'. For example: $ ./perf -vv perf version 4.13.rc5.g6727c5 dwarf: [ on ] # HAVE_DWARF_SUPPORT dwarf_getlocations: [ on ] # HAVE_DWARF_GETLOCATIONS_SUPPORT glibc: [ on ] # HAVE_GLIBC_SUPPORT gtk2: [ on ] # HAVE_GTK2_SUPPORT libaudit: [ OFF ] # HAVE_LIBAUDIT_SUPPORT libbfd: [ on ] # HAVE_LIBBFD_SUPPORT libelf: [ on ] # HAVE_LIBELF_SUPPORT libnuma: [ on ] # HAVE_LIBNUMA_SUPPORT numa_num_possible_cpus: [ on ] # HAVE_LIBNUMA_SUPPORT libperl: [ on ] # HAVE_LIBPERL_SUPPORT libpython: [ on ] # HAVE_LIBPYTHON_SUPPORT libslang: [ on ] # HAVE_SLANG_SUPPORT libcrypto: [ on ] # HAVE_LIBCRYPTO_SUPPORT libunwind: [ on ] # HAVE_LIBUNWIND_SUPPORT libdw-dwarf-unwind: [ on ] # HAVE_DWARF_SUPPORT zlib: [ on ] # HAVE_ZLIB_SUPPORT lzma: [ on ] # HAVE_LZMA_SUPPORT get_cpuid: [ on ] # HAVE_AUXTRACE_SUPPORT bpf: [ on ] # HAVE_LIBBPF_SUPPORT v3: One bug is found in v2. It didn't process the option like '-vabc' correctly. Fix this bug. v2: Use a global variable version_verbose to record the number of 'v'. Signed-off-by: Jin Yao Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1522402036-22915-6-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/perf.c | 6 ++++++ tools/perf/perf.h | 1 + 2 files changed, 7 insertions(+) commit 9ff2a64708a642b3dee867d0a083171077663b0a Author: Jin Yao Date: Fri Mar 30 17:27:14 2018 +0800 perf version: Print the compiled-in status of libraries This patch checks the values passed by CFLAGS (-DHAVE_XXX) and then print the status of libraries. For example, if HAVE_DWARF_SUPPORT is defined, that means the library "dwarf" is compiled-in. The patch will print the status "on" for this library otherwise it print the status "OFF". A new option '--build-options' created for 'perf version' supports the printing of library status. For example: $ ./perf version --build-options or ./perf --version --build-options or ./perf -v --build-options perf version 4.13.rc5.g6727c5 dwarf: [ on ] # HAVE_DWARF_SUPPORT dwarf_getlocations: [ on ] # HAVE_DWARF_GETLOCATIONS_SUPPORT glibc: [ on ] # HAVE_GLIBC_SUPPORT gtk2: [ on ] # HAVE_GTK2_SUPPORT libaudit: [ OFF ] # HAVE_LIBAUDIT_SUPPORT libbfd: [ on ] # HAVE_LIBBFD_SUPPORT libelf: [ on ] # HAVE_LIBELF_SUPPORT libnuma: [ on ] # HAVE_LIBNUMA_SUPPORT numa_num_possible_cpus: [ on ] # HAVE_LIBNUMA_SUPPORT libperl: [ on ] # HAVE_LIBPERL_SUPPORT libpython: [ on ] # HAVE_LIBPYTHON_SUPPORT libslang: [ on ] # HAVE_SLANG_SUPPORT libcrypto: [ on ] # HAVE_LIBCRYPTO_SUPPORT libunwind: [ on ] # HAVE_LIBUNWIND_SUPPORT libdw-dwarf-unwind: [ on ] # HAVE_DWARF_SUPPORT zlib: [ on ] # HAVE_ZLIB_SUPPORT lzma: [ on ] # HAVE_LZMA_SUPPORT get_cpuid: [ on ] # HAVE_AUXTRACE_SUPPORT bpf: [ on ] # HAVE_LIBBPF_SUPPORT v4: 1. Also print the macro name. That would make it easier to grep around in the source looking for where code related a particular features is located. 2. Update since HAVE_DWARF_GETLOCATIONS is renamed to HAVE_DWARF_GETLOCATIONS_SUPPORT v3: Remove following unnecessary help message. 1. [ on ]: library is compiled-in [ OFF ]: library is disabled in make configuration OR library is not installed in build environment 2. Create '--build-options' option. 3. Use standard option parsing API 'parse_options'. v2: 1. Use IS_BUILTIN macro to replace #ifdef/#endif block. 2. Print color for on/OFF. Signed-off-by: Jin Yao Suggested-by: Arnaldo Carvalho de Melo Suggested-by: Ingo Molnar Suggested-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1522402036-22915-5-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-version.c | 82 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) commit a36ebe4e242a2f6818f424b03a5e8dae3964e458 Author: Jin Yao Date: Fri Mar 30 17:27:13 2018 +0800 perf config: Rename to HAVE_DWARF_GETLOCATIONS_SUPPORT In Makefile.config, to make all libraries flags have _SUPPORT suffix, rename HAVE_DWARF_GETLOCATIONS to HAVE_DWARF_GETLOCATIONS_SUPPORT Signed-off-by: Jin Yao Suggested-by: Ingo Molnar Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1522402036-22915-4-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 2 +- tools/perf/util/dwarf-aux.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8e2c241f0c9768c589319ff48d007526465374d2 Author: Jin Yao Date: Fri Mar 30 17:27:12 2018 +0800 perf config: Add some new -DHAVE_XXX to CFLAGS For most of libraries, in perf.config, they are recorded with -DHAVE_XXX in CFLAGS according to if the libraries are compiled-in. Then C code then will know if the library is compiled-in or not. While for glibc, no -DHAVE_GLIBC_SUPPORT exists. For python and perl libraries, only -DNO_PYTHON and -DNO_LIBPERL exist. To make the code more consistent, the patch creates -DHAVE_LIBPYTHON_SUPPORT and -DHAVE_LIBPERL_SUPPORT if the python and perl libraries are compiled-in. Since the existing flags -DNO_PYTHON and -DNO_LIBPERL are being used in many places in C code, this patch doesn't remove them. In a follow-up patch, we will recontruct the C code and then use HAVE_XXX instead. v3: Move 'CFLAGS += -DHAVE_LIBPYTHON_SUPPORT' and 'CFLAGS += -DHAVE_LIBPERL_SUPPORT' to other places to avoid duplicated feature checking. v2: Create -DHAVE_GLIBC_SUPPORT, -DHAVE_LIBPYTHON_SUPPORT and -DHAVE_LIBPERL_SUPPORT. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1522402036-22915-3-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 6 ++++++ 1 file changed, 6 insertions(+) commit 3d9644ef9a0f6c3ca0c1bd2aea1d82e7ea0a7f24 Author: Baolin Wang Date: Tue Apr 3 00:36:02 2018 +0800 nios2: Use read_persistent_clock64() instead of read_persistent_clock() Since struct timespec is not y2038 safe on 32bit machines, this patch converts read_persistent_clock() to read_persistent_clock64() using struct timespec64, as well as converting mktime() to mktime64(). Signed-off-by: Baolin Wang Signed-off-by: Ley Foon Tan arch/nios2/kernel/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6b416ebcc32c5753214d53c18ac5719c93bc340e Author: Jiri Olsa Date: Fri Mar 30 17:27:11 2018 +0800 tools include: Add config.h header file Adding IS_BUILTIN macro and its dependencies into tools world. It's taken from kernel's include/linux/kconfig.h, which can't be taken completely due to its kconfig dependencies. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1522402036-22915-2-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/include/tools/config.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit cc67ccecd3e6e2827b6706bad3287786202498f5 Merge: 61d1757 562c45d Author: Linus Torvalds Date: Mon Apr 2 09:27:29 2018 -0700 Merge branch 'core-headers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull header file cleanup from Ingo Molnar: "Reduce dependencies: a single change that drops two #includes from this frequently used kernel header" * 'core-headers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: headers: Drop two #included headers from commit 61d1757f562da687bfd5277a652bd007ad2a8419 Merge: 54dce3c 163cf84 Author: Linus Torvalds Date: Mon Apr 2 09:14:41 2018 -0700 Merge branch 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull debugobjects updates from Ingo Molnar: "Misc improvements: - add better instrumentation/debugging - optimize the freeing logic improve performance" * 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Avoid another unused variable warning debugobjects: Fix debug_objects_freed accounting debugobjects: Use global free list in __debug_check_no_obj_freed() debugobjects: Use global free list in free_object() debugobjects: Add global free list and the counter debugobjects: Export max loops counter commit 54dce3c35bbbeaab8de4b82d3ef3a2f011229662 Merge: 320b164 5ad7510 Author: Linus Torvalds Date: Mon Apr 2 09:08:26 2018 -0700 Merge branch 'core-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc core updates from Ingo Molnar: "Two changes: - add membarriers to Documentation/features/ - fix a minor nit in panic printk formatting" * 'core-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: panic: Add closing panic marker parenthesis Documentation/features, membarriers: Document membarrier-sync-core architecture support Documentation/features: Allow comments in arch features files commit 0e5b09b165510e2ea5c526e962c4edadd849ef4c Author: Dan Carpenter Date: Fri Mar 16 15:10:15 2018 +0300 platform/x86: dell-smbios: Fix memory leaks in build_tokens_sysfs() We're freeing "value_name" which is NULL, so that's a no-op, but we intended to free "location_name" instead. And then we don't free the names in token_location_attrs[0] and token_value_attrs[0]. Fixes: 33b9ca1e53b4 ("platform/x86: dell-smbios: Add a sysfs interface for SMBIOS tokens") Signed-off-by: Dan Carpenter Signed-off-by: Andy Shevchenko drivers/platform/x86/dell-smbios-base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b5de0cc1fe0e2308dc1d2494de7917c707bd8ca Author: Alex Hung Date: Fri Mar 30 16:54:54 2018 -0700 intel-hid: support KEY_ROTATE_LOCK_TOGGLE KEY_ROTATE_LOCK_TOGGLE is introduced in 4.16 rc1 and this key event is emitted on Wacom MobileStudio Pro 13. Signed-off-by: Alex Hung Co-developed-by: Jason Gerecke Signed-off-by: Jason Gerecke Signed-off-by: Andy Shevchenko drivers/platform/x86/intel-hid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 159f02977b2feb18a4bece5e586c838a6d26d44b Merge: 6e00f7d 1799cdd2 Author: David S. Miller Date: Mon Apr 2 11:14:03 2018 -0400 Merge branch 'net-mvneta-improve-suspend-resume' Jisheng Zhang says: ==================== net: mvneta: improve suspend/resume This series tries to optimize the mvneta's suspend/resume implementation by only taking necessary actions. Since v2: - keep rtnl lock when calling mvneta_start_dev() and mvneta_stop_dev() Thank Russell for pointing this out Since v1: - unify ret check - try best to keep the suspend/resume behavior - split txq deinit into sw/hw parts as well - adjust mvneta_stop_dev() location I didn't add Thomas's Ack tag to patch1, because in v2, I add new code to split the txq deinit into two parts. ==================== Signed-off-by: David S. Miller commit 1799cdd287ff09c6d34347409b0d4f464e197aea Author: Jisheng Zhang Date: Mon Apr 2 11:24:59 2018 +0800 net: mvneta: improve suspend/resume Current suspend/resume implementation reuses the mvneta_open() and mvneta_close(), but it could be optimized to take only necessary actions during suspend/resume. One obvious problem of current implementation is: after hundreds of system suspend/resume cycles, the resume of mvneta could fail due to fragmented dma coherent memory. After this patch, the non-necessary memory alloc/free is optimized out. Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 69 +++++++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 7 deletions(-) commit 4a188a63afdffb5f62cccc508589c19e5297ed05 Author: Jisheng Zhang Date: Mon Apr 2 11:23:43 2018 +0800 net: mvneta: split rxq/txq init and txq deinit into SW and HW parts This is to prepare the suspend/resume improvement in next patch. The SW parts can be optimized out during resume. As for rxq handling during suspend, we'd like to drop packets by calling mvneta_rxq_drop_pkts() which is both SW and HW operation, so we don't split rxq deinit. Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 85 +++++++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 19 deletions(-) commit da9147140fe3de5a3a3fe5fe7f69739d4f39bea1 Author: Alex Williamson Date: Mon Mar 26 13:36:55 2018 -0600 MAINTAINERS: vfio/platform: Update sub-maintainer Baptiste has changed positions and has not been active with vfio-platform, replace with the current, de-facto sub-maintainer Eric Auger. Acked-by: Eric Auger Signed-off-by: Alex Williamson MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 320b164abb32db876866a4ff8c2cb710524ac6ea Merge: 0adb328 694f54f Author: Linus Torvalds Date: Mon Apr 2 07:59:23 2018 -0700 Merge tag 'drm-for-v4.17' of git://people.freedesktop.org/~airlied/linux Pull drm updates from Dave Airlie: "Cannonlake and Vega12 support are probably the two major things. This pull lacks nouveau, Ben had some unforseen leave and a few other blockers so we'll see how things look or maybe leave it for this merge window. core: - Device links to handle sound/gpu pm dependency - Color encoding/range properties - Plane clipping into plane check helper - Backlight helpers - DP TP4 + HBR3 helper support amdgpu: - Vega12 support - Enable DC by default on all supported GPUs - Powerplay restructuring and cleanup - DC bandwidth calc updates - DC backlight on pre-DCE11 - TTM backing store dropping support - SR-IOV fixes - Adding "wattman" like functionality - DC crc support - Improved DC dual-link handling amdkfd: - GPUVM support for dGPU - KFD events for dGPU - Enable PCIe atomics for dGPUs - HSA process eviction support - Live-lock fixes for process eviction - VM page table allocation fix for large-bar systems panel: - Raydium RM68200 - AUO G104SN02 V2 - KEO TX31D200VM0BAA - ARM Versatile panels i915: - Cannonlake support enabled - AUX-F port support added - Icelake base enabling until internal milestone of forcewake support - Query uAPI interface (used for GPU topology information currently) - Compressed framebuffer support for sprites - kmem cache shrinking when GPU is idle - Avoid boosting GPU when waited item is being processed already - Avoid retraining LSPCON link unnecessarily - Decrease request signaling latency - Deprecation of I915_SET_COLORKEY_NONE - Kerneldoc and compiler warning cleanup for upcoming CI enforcements - Full range ycbcr toggling - HDCP support i915/gvt: - Big refactor for shadow ppgtt - KBL context save/restore via LRI cmd (Weinan) - Properly unmap dma for guest page (Changbin) vmwgfx: - Lots of various improvements etnaviv: - Use the drm gpu scheduler - prep work for GC7000L support vc4: - fix alpha blending - Expose perf counters to userspace pl111: - Bandwidth checking/limiting - Versatile panel support sun4i: - A83T HDMI support - A80 support - YUV plane support - H3/H5 HDMI support omapdrm: - HPD support for DVI connector - remove lots of static variables msm: - DSI updates from 10nm / SDM845 - fix for race condition with a3xx/a4xx fence completion irq - some refactoring/prep work for eventual a6xx support (ie. when we have a userspace) - a5xx debugfs enhancements - some mdp5 fixes/cleanups to prepare for eventually merging writeback - support (ie. when we have a userspace) tegra: - mmap() fixes for fbdev devices - Overlay plane for hw cursor fix - dma-buf cache maintenance support mali-dp: - YUV->RGB conversion support rockchip: - rk3399/chromebook fixes and improvements rcar-du: - LVDS support move to drm bridge - DT bindings for R8A77995 - Driver/DT support for R8A77970 tilcdc: - DRM panel support" * tag 'drm-for-v4.17' of git://people.freedesktop.org/~airlied/linux: (1646 commits) drm/i915: Fix hibernation with ACPI S0 target state drm/i915/execlists: Use a locked clear_bit() for synchronisation with interrupt drm/i915: Specify which engines to reset following semaphore/event lockups drm/i915/dp: Write to SET_POWER dpcd to enable MST hub. drm/amdkfd: Use ordered workqueue to restore processes drm/amdgpu: Fix acquiring VM on large-BAR systems drm/amd/pp: clean header file hwmgr.h drm/amd/pp: use mlck_table.count for array loop index limit drm: Fix uabi regression by allowing garbage mode->type from userspace drm/amdgpu: Add an ATPX quirk for hybrid laptop drm/amdgpu: fix spelling mistake: "asssert" -> "assert" drm/amd/pp: Add new asic support in pp_psm.c drm/amd/pp: Clean up powerplay code on Vega12 drm/amd/pp: Add smu irq handlers for legacy asics drm/amd/pp: Fix set wrong temperature range on smu7 drm/amdgpu: Don't change preferred domian when fallback GTT v5 drm/vmwgfx: Bump version patchlevel and date drm/vmwgfx: use monotonic event timestamps drm/vmwgfx: Unpin the screen object backup buffer when not used drm/vmwgfx: Stricter count of legacy surface device resources ... commit 0930437e8f9d1f513ca7f130a650b608358f8805 Merge: 8aaeae7 7bb5e54 ac17750 2172a33 Author: Mark Brown Date: Mon Apr 2 15:56:45 2018 +0100 Merge remote-tracking branches 'spi/topic/sh-msiof', 'spi/topic/sprd' and 'spi/topic/tegra20-slink' into spi-next commit 8aaeae7e6144c5dc3b0e6977cda739265879f928 Merge: 70a3550 7c2861a e3d001a 5c22af7 3cc7b0e 768d59f Author: Mark Brown Date: Mon Apr 2 15:56:39 2018 +0100 Merge remote-tracking branches 'spi/topic/jcore', 'spi/topic/kconfig', 'spi/topic/orion', 'spi/topic/pxa2xx' and 'spi/topic/rspi' into spi-next commit 70a3550b8c8b8937d0235fa669e4f6d2dd78fdf6 Merge: b3181e2 3573257 bc3cc75 d704aff 721483e 77a0605 Author: Mark Brown Date: Mon Apr 2 15:56:34 2018 +0100 Merge remote-tracking branches 'spi/topic/atmel', 'spi/topic/bcm-qspi', 'spi/topic/bcm2835aux', 'spi/topic/dw' and 'spi/topic/gpio' into spi-next commit b3181e294959abb8ebd075a13515aefdbc7f68d1 Merge: 3ce2dcf 7c43042 Author: Mark Brown Date: Mon Apr 2 15:56:32 2018 +0100 Merge remote-tracking branch 'spi/topic/samsung' into spi-next commit 3ce2dcf70280980adf3f7a9dde4c1a96a20f2d0d Merge: 43ff2dc 9581329 e2b714a 613bd1e Author: Mark Brown Date: Mon Apr 2 15:56:24 2018 +0100 Merge remote-tracking branches 'spi/fix/atmel', 'spi/fix/pxa2xx' and 'spi/fix/unregiser' into spi-linus commit 43ff2dcef0fde7402a0bbcf2d1f5a507595a9fb0 Merge: 0adb328 ce99319 Author: Mark Brown Date: Mon Apr 2 15:56:20 2018 +0100 Merge remote-tracking branch 'spi/fix/dma' into spi-linus commit 28e8ed2a01bba317aab9bca1c5609924cbbf6cdc Author: Alex Hung Date: Thu Mar 15 16:22:51 2018 -0700 intel-hid: clean up and sort header files Removed unused header files and sorted them alphabetically. No functional changes are made. Signed-off-by: Alex Hung Signed-off-by: Andy Shevchenko drivers/platform/x86/intel-hid.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 7c43042880836b1477e3b2ae404879ecd5bd2888 Author: Andi Shyti Date: Wed Mar 28 18:31:02 2018 +0900 MAINTAINERS: update Andi's e-mail Because I will be leaving Samsung soon, update my e-mail address to andi@etezian.org For reachability update also mailcap. CC: Krzysztof Kozlowski CC: Kukjin Kim CC: linux-samsung-soc@vger.kernel.org Signed-off-by: Andi Shyti Signed-off-by: Mark Brown .mailmap | 1 + MAINTAINERS | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 24e2bb311ff4c8224c0c61fac3a0971d24b54380 Author: Hans de Goede Date: Fri Mar 9 15:03:58 2018 +0100 platform/x86: silead_dmi: Add entry for the Yours Y8W81 tablet Add an entry with touchscreen info for the Yours Y8W81 8" tablet. This tablet has the same case and mostly the same internals as the Chuwi Vi8. Both seem to be from an ODM called inet-tek. Both are labelled: "INET-I86M-REVxx" on the PCB, with the Chuwi Vi8 being REV03 (and having an ALC5640 audio codec) and the Yours Y8W81 being REV21 (and having an ALC5651 audio codec). The wifi, accelerometer and touchscreen are identical on both. Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko drivers/platform/x86/silead_dmi.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6e00f7dd5e4edc2443f030b226f66fe4f1267667 Author: Eric Dumazet Date: Sun Apr 1 21:57:59 2018 -0700 ipv6: frags: fix /proc/sys/net/ipv6/ip6frag_low_thresh I forgot to change ip6frag_low_thresh proc_handler from proc_dointvec_minmax to proc_doulongvec_minmax Fixes: 3e67f106f619 ("inet: frags: break the 2GB limit for frags storage") Signed-off-by: Eric Dumazet Reported-by: Maciej Żenczykowski Signed-off-by: David S. Miller net/ipv6/reassembly.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ea229511e06f9635ecc338dcbe0db41a73623f0 Author: Viresh Kumar Date: Mon Apr 2 16:26:25 2018 +0530 thermal: Add cooling device's statistics in sysfs This extends the sysfs interface for thermal cooling devices and exposes some pretty useful statistics. These statistics have proven to be quite useful specially while doing benchmarks related to the task scheduler, where we want to make sure that nothing has disrupted the test, specially the cooling device which may have put constraints on the CPUs. The information exposed here tells us to what extent the CPUs were constrained by the thermal framework. The write-only "reset" file is used to reset the statistics. The read-only "time_in_state_ms" file shows the time (in msec) spent by the device in the respective cooling states, and it prints one line per cooling state. The read-only "total_trans" file shows single positive integer value showing the total number of cooling state transitions the device has gone through since the time the cooling device is registered or the time when statistics were reset last. The read-only "trans_table" file shows a two dimensional matrix, where an entry (row i, column j) represents the number of transitions from State_i to State_j. This is how the directory structure looks like for a single cooling device: $ ls -R /sys/class/thermal/cooling_device0/ /sys/class/thermal/cooling_device0/: cur_state max_state power stats subsystem type uevent /sys/class/thermal/cooling_device0/power: autosuspend_delay_ms runtime_active_time runtime_suspended_time control runtime_status /sys/class/thermal/cooling_device0/stats: reset time_in_state_ms total_trans trans_table This is tested on ARM 64-bit Hisilicon hikey620 board running Ubuntu and ARM 64-bit Hisilicon hikey960 board running Android. Signed-off-by: Viresh Kumar Signed-off-by: Zhang Rui Documentation/thermal/sysfs-api.txt | 31 +++++ drivers/thermal/Kconfig | 7 ++ drivers/thermal/thermal_core.c | 3 +- drivers/thermal/thermal_core.h | 10 ++ drivers/thermal/thermal_helpers.c | 5 +- drivers/thermal/thermal_sysfs.c | 225 ++++++++++++++++++++++++++++++++++++ include/linux/thermal.h | 1 + 7 files changed, 280 insertions(+), 2 deletions(-) commit dbcb5e7fc470c9daec9cb4ae463670f2047163e3 Author: Martin Brandenburg Date: Tue Mar 20 17:00:12 2018 +0000 orangefs: open code short single-use functions Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/file.c | 95 +++++++++++------------------------------------------- 1 file changed, 19 insertions(+), 76 deletions(-) commit 81e3d0253f87d369a1d957eb3173fd596126383c Author: Colin Ian King Date: Fri Jan 26 19:42:47 2018 +0000 orangefs: replace vmalloc and memset with vzalloc Use vzalloc instead of the vmalloc, memset combo Signed-off-by: Colin Ian King Signed-off-by: Mike Marshall fs/orangefs/devorangefs-req.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c2676ef801f50cc759d205a89adbf733c798d052 Author: David Reynolds Date: Thu Mar 8 18:54:12 2018 -0500 orangefs: bug fix for a race condition when getting a slot When a slot becomes free, call wake_up_locked regardless of the number of slots available. Without this patch, wake_up_locked is only called when going from no free slots to one. This means that there is a chance a waiting task will not be woken up. In many cases, the system will bounce between 0 and 1 free slots, and the waiting tasks will be woken up. But if there is still a waiting task and another slot becomes available before the number of free slots reaches zero, that waiting task may never be woken up since the number of free slots may never reach zero again. The bug behavior is easy to reproduce with the following script, where /mnt/orangefs is an OrangeFS file system. for i in {1..100}; do for j in {1..20}; do dd if=/dev/zero of=/mnt/orangefs/tmp$j bs=32768 count=32 & done wait done Signed-off-by: David Reynolds Reviewed-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/orangefs-bufmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a6545bda2756807a089c64352edfc5628c57e6c Author: Arnaldo Carvalho de Melo Date: Thu Mar 29 12:22:59 2018 -0300 perf trace: Show only failing syscalls For instance: # perf probe "vfs_getname=getname_flags:72 pathname=result->name:string" Added new event: probe:vfs_getname (on getname_flags:72 with pathname=result->name:string) You can now use it in all perf tools, such as: perf record -e probe:vfs_getname -aR sleep 1 # perf trace --failure sleep 1 0.043 ( 0.010 ms): sleep/10978 access(filename: /etc/ld.so.preload, mode: R) = -1 ENOENT No such file or directory For reference, here are all the syscalls in this case: # perf trace sleep 1 ? ( ): sleep/10976 ... [continued]: execve()) = 0 0.027 ( 0.001 ms): sleep/10976 brk() = 0x55bdc2d04000 0.044 ( 0.010 ms): sleep/10976 access(filename: /etc/ld.so.preload, mode: R) = -1 ENOENT No such file or directory 0.057 ( 0.006 ms): sleep/10976 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) = 3 0.064 ( 0.002 ms): sleep/10976 fstat(fd: 3, statbuf: 0x7fffac22b370) = 0 0.067 ( 0.003 ms): sleep/10976 mmap(len: 111457, prot: READ, flags: PRIVATE, fd: 3) = 0x7feec8615000 0.071 ( 0.001 ms): sleep/10976 close(fd: 3) = 0 0.080 ( 0.007 ms): sleep/10976 openat(dfd: CWD, filename: /lib64/libc.so.6, flags: CLOEXEC) = 3 0.088 ( 0.002 ms): sleep/10976 read(fd: 3, buf: 0x7fffac22b538, count: 832) = 832 0.092 ( 0.001 ms): sleep/10976 fstat(fd: 3, statbuf: 0x7fffac22b3d0) = 0 0.094 ( 0.002 ms): sleep/10976 mmap(len: 8192, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS) = 0x7feec8613000 0.099 ( 0.004 ms): sleep/10976 mmap(len: 3889792, prot: EXEC|READ, flags: PRIVATE|DENYWRITE, fd: 3) = 0x7feec8057000 0.104 ( 0.007 ms): sleep/10976 mprotect(start: 0x7feec8203000, len: 2097152) = 0 0.112 ( 0.005 ms): sleep/10976 mmap(addr: 0x7feec8403000, len: 24576, prot: READ|WRITE, flags: PRIVATE|DENYWRITE|FIXED, fd: 3, off: 1753088) = 0x7feec8403000 0.120 ( 0.003 ms): sleep/10976 mmap(addr: 0x7feec8409000, len: 14976, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS|FIXED) = 0x7feec8409000 0.128 ( 0.001 ms): sleep/10976 close(fd: 3) = 0 0.139 ( 0.001 ms): sleep/10976 arch_prctl(option: 4098, arg2: 140663540761856) = 0 0.186 ( 0.004 ms): sleep/10976 mprotect(start: 0x7feec8403000, len: 16384, prot: READ) = 0 0.204 ( 0.003 ms): sleep/10976 mprotect(start: 0x55bdc0ec3000, len: 4096, prot: READ) = 0 0.209 ( 0.004 ms): sleep/10976 mprotect(start: 0x7feec8631000, len: 4096, prot: READ) = 0 0.214 ( 0.010 ms): sleep/10976 munmap(addr: 0x7feec8615000, len: 111457) = 0 0.269 ( 0.001 ms): sleep/10976 brk() = 0x55bdc2d04000 0.271 ( 0.002 ms): sleep/10976 brk(brk: 0x55bdc2d25000) = 0x55bdc2d25000 0.274 ( 0.001 ms): sleep/10976 brk() = 0x55bdc2d25000 0.278 ( 0.007 ms): sleep/10976 open(filename: /usr/lib/locale/locale-archive, flags: CLOEXEC) = 3 0.288 ( 0.001 ms): sleep/10976 fstat(fd: 3, statbuf: 0x7feec8408aa0) = 0 0.290 ( 0.003 ms): sleep/10976 mmap(len: 113045344, prot: READ, flags: PRIVATE, fd: 3) = 0x7feec1488000 0.297 ( 0.001 ms): sleep/10976 close(fd: 3) = 0 0.325 (1000.193 ms): sleep/10976 nanosleep(rqtp: 0x7fffac22c0b0) = 0 1000.560 ( 0.006 ms): sleep/10976 close(fd: 1) = 0 1000.573 ( 0.005 ms): sleep/10976 close(fd: 2) = 0 1000.596 ( ): sleep/10976 exit_group() # And can be done systemwide, etc, with backtraces: # perf trace --max-stack=16 --failure sleep 1 0.048 ( 0.015 ms): sleep/11092 access(filename: /etc/ld.so.preload, mode: R) = -1 ENOENT No such file or directory __access (inlined) dl_main (/usr/lib64/ld-2.26.so) # Or for some specific syscalls: # perf trace --max-stack=16 -e openat --failure cat /tmp/rien cat: /tmp/rien: No such file or directory 0.251 ( 0.012 ms): cat/11106 openat(dfd: CWD, filename: /tmp/rien) = -1 ENOENT No such file or directory __libc_open64 (inlined) main (/usr/bin/cat) __libc_start_main (/usr/lib64/libc-2.26.so) _start (/usr/bin/cat) # Look for inotify* syscalls that fail, system wide, for 2 seconds, with backtraces: # perf trace -a --max-stack=16 --failure -e inotify* sleep 2 819.165 ( 0.058 ms): gmain/1724 inotify_add_watch(fd: 8, pathname: /home/acme/~, mask: 16789454) = -1 ENOENT No such file or directory __GI_inotify_add_watch (inlined) _ik_watch (/usr/lib64/libgio-2.0.so.0.5400.3) _ip_start_watching (/usr/lib64/libgio-2.0.so.0.5400.3) im_scan_missing (/usr/lib64/libgio-2.0.so.0.5400.3) g_timeout_dispatch (/usr/lib64/libglib-2.0.so.0.5400.3) g_main_context_dispatch (/usr/lib64/libglib-2.0.so.0.5400.3) g_main_context_iterate.isra.23 (/usr/lib64/libglib-2.0.so.0.5400.3) g_main_context_iteration (/usr/lib64/libglib-2.0.so.0.5400.3) glib_worker_main (/usr/lib64/libglib-2.0.so.0.5400.3) g_thread_proxy (/usr/lib64/libglib-2.0.so.0.5400.3) start_thread (/usr/lib64/libpthread-2.26.so) __GI___clone (inlined) # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-8f7d3mngaxvi7tlzloz3n7cs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-trace.txt | 3 +++ tools/perf/builtin-trace.c | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) commit 5e2a146bbdae6095b13bca9ebe26a867030ae010 Author: Arnaldo Carvalho de Melo Date: Thu Mar 29 11:46:53 2018 -0300 tools headers: Synchronize x86's cpufeatures.h Due to these commits: 1da961d72ab0 ("x86/cpufeatures: Add Intel Total Memory Encryption cpufeature") 7958b2246fad ("x86/cpufeatures: Add Intel PCONFIG cpufeature") To silence this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h' Nothing in those csets requires changes in tools/perf/, so just sync it to silence the build. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Kirill A. Shutemov Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-m2yl8wj0uxs8pncq2ncfcx46@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/cpufeatures.h | 2 ++ 1 file changed, 2 insertions(+) commit b74d12d598143c2dd30b9cb9636a50dded4cc49f Author: Kim Phillips Date: Tue Mar 27 06:09:56 2018 -0500 perf tools: Add a "dso_size" sort order Add DSO size to perf report/top sort output list. This includes adding a map__size fn to map.h, which is approximately equal to the DSO data file_size: DSO file size map (end-start) file / (end-start) libwebkit2gtk-4.0.so.37.24.9 43260072 41295872 95% libglib-2.0.so.0.5400.1 1125680 1118208 99% libc-2.26.so 1960656 1925120 101% libdbus-1.so.3.14.13 309456 303104 102% Sample output: $ ./perf report -s dso_size,dso Samples: 2K of event 'cycles:uppp', Event count (approx.): 128373340 Overhead DSO size Shared Object 90.62% unknown [unknown] 2.87% 1118208 libglib-2.0.so.0.5400.1 1.92% 303104 libdbus-1.so.3.14.13 1.42% 1925120 libc-2.26.so 0.77% 41295872 libwebkit2gtk-4.0.so.37.24.9 0.61% 335872 libgobject-2.0.so.0.5400.1 0.41% 1052672 libgdk-3.so.0.2200.25 0.36% 106496 libpthread-2.26.so 0.29% 221184 dbus-daemon 0.17% 159744 ld-2.26.so 0.13% 49152 libwayland-client.so.0.3.0 0.12% 1642496 libgio-2.0.so.0.5400.1 0.09% 7327744 libgtk-3.so.0.2200.25 0.09% 12324864 libmozjs-52.so.0.0.0 0.05% 4796416 perf 0.04% 843776 libgjs.so.0.0.0 0.03% 1409024 libmutter-clutter-1.so Committer testing: To sort by DSO size, use: # perf report -F dso_size,dso,overhead -s dso_size 3465216 libdns-export.so.174.0.1 0.00% 3522560 libgc.so.1.0.3 0.00% 3538944 libbfd-2.29-13.fc27.so 0.59% 3670016 libunistring.so.2.1.0 0.00% 3723264 libguile-2.0.so.22.8.1 0.00% 3776512 libgio-2.0.so.0.5400.3 0.00% 3891200 libc-2.26.so 0.96% 3944448 libmozjs-17.0.so 0.00% 4218880 libperl.so.5.26.1 0.18% 4452352 libpython2.7.so.1.0 0.02% 4472832 perf 0.02% 4603904 git 0.01% 4751360 libcrypto.so.1.1.0g 0.00% 5005312 libslang.so.2.3.1 0.00% 7315456 libgtk-3.so.0.2200.26 0.09% 8818688 i965_dri.so 2.46% 8818688 i965_dri.so (deleted) 1.26% 12414976 libmozjs-52.so.0.0.0 0.03% 23642112 cc1 2.02% 27889664 [kernel.kallsyms] 25.41% 80834560 libxul.so (deleted) 15.68% 98078720 chrome 32.03% 1056964608 [kernel.kallsyms] 1.59% # Signed-off-by: Kim Phillips Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Jiri Olsa Cc: Maxim Kuvyrkov Cc: Milian Wolff Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180327060956.1c01ebe67a2a941bb4468c6f@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-report.txt | 1 + tools/perf/util/hist.h | 1 + tools/perf/util/map.h | 4 ++++ tools/perf/util/sort.c | 41 ++++++++++++++++++++++++++++++++ tools/perf/util/sort.h | 1 + 5 files changed, 48 insertions(+) commit 9122eed5281e89bdb02162a8ecb3cc13ffc8985e Author: Luis Henriques Date: Wed Jan 31 10:53:13 2018 +0000 ceph: quota: report root dir quota usage in statfs This commit changes statfs default behaviour when reporting usage statistics. Instead of using the overall filesystem usage, statfs now reports the quota for the filesystem root, if ceph.quota.max_bytes has been set for this inode. If quota hasn't been set, it falls back to the old statfs behaviour. A new mount option is also added ('noquotadf') to disable this behaviour. Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov Documentation/filesystems/ceph.txt | 4 +++ fs/ceph/quota.c | 56 ++++++++++++++++++++++++++++++++++++++ fs/ceph/super.c | 27 ++++++++++++++++-- fs/ceph/super.h | 3 ++ 4 files changed, 87 insertions(+), 3 deletions(-) commit d557c48db730eaab6b75d4af332c135309b7a6a4 Author: Luis Henriques Date: Fri Jan 12 17:19:29 2018 +0000 ceph: quota: add counter for snaprealms with quota By keeping a counter with the number of snaprealms that have quota set allows to optimize the functions that need to walk throught the realms hierarchy looking for quotas. Thus, if this counter is zero it's safe to assume that there are no realms with quota. Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 6 ++++-- fs/ceph/mds_client.c | 1 + fs/ceph/mds_client.h | 2 ++ fs/ceph/quota.c | 29 ++++++++++++++++++++++++----- fs/ceph/super.h | 20 ++++++++++++++++++++ 5 files changed, 51 insertions(+), 7 deletions(-) commit e3161f17d92699ce6ca3b7988131b10ad4035cf9 Author: Luis Henriques Date: Fri Jan 12 17:19:28 2018 +0000 ceph: quota: cache inode pointer in ceph_snap_realm Keep a pointer to the inode in struct ceph_snap_realm. This allows to optimize functions that walk the realms hierarchy (e.g. in quotas). Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 4 +++- fs/ceph/inode.c | 3 +++ fs/ceph/quota.c | 24 ++++++++++-------------- fs/ceph/snap.c | 2 ++ fs/ceph/super.h | 1 + 5 files changed, 19 insertions(+), 15 deletions(-) commit 0eb6bbe4d9cf02f639d661edf7c02defc3453a69 Author: Yan, Zheng Date: Fri Jan 12 16:55:31 2018 +0800 ceph: fix root quota realm check Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/quota.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 2596366907f872de7be0557720bb55bccf7489d9 Author: Yan, Zheng Date: Fri Jan 12 16:26:17 2018 +0800 ceph: don't check quota for snap inode snap inode's i_snap_realm is not pointing to ceph_snap_realm. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/dir.c | 3 ++- fs/ceph/quota.c | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) commit 1ab302a0cb1455631646aa66b7fc02afd617ea4f Author: Luis Henriques Date: Fri Jan 5 10:47:22 2018 +0000 ceph: quota: update MDS when max_bytes is approaching When we're reaching the ceph.quota.max_bytes limit, i.e., when writing more than 1/16th of the space left in a quota realm, update the MDS with the new file size. This mirrors the fuse-client approach with commit 122c50315ed1 ("client: Inform mds file size when approaching quota limit"), in the ceph git tree. Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/file.c | 6 ++++++ fs/ceph/quota.c | 38 +++++++++++++++++++++++++++++++++++++- fs/ceph/super.h | 2 ++ 3 files changed, 45 insertions(+), 1 deletion(-) commit 2b83845f8bd711e66e1c367a9bd56c9df3410236 Author: Luis Henriques Date: Fri Jan 5 10:47:21 2018 +0000 ceph: quota: support for ceph.quota.max_bytes Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/file.c | 11 +++++++++++ fs/ceph/inode.c | 4 ++++ fs/ceph/quota.c | 28 +++++++++++++++++++++++++++- fs/ceph/super.h | 2 ++ 4 files changed, 44 insertions(+), 1 deletion(-) commit cafe21a4fb3075fb2980caba8fdb533a1bdb52b0 Author: Luis Henriques Date: Fri Jan 5 10:47:20 2018 +0000 ceph: quota: don't allow cross-quota renames This patch changes ceph_rename so that -EXDEV is returned if an attempt is made to mv a file between two different dir trees with different quotas setup. Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/dir.c | 5 +++++ fs/ceph/quota.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/ceph/super.h | 1 + 3 files changed, 75 insertions(+) commit b7a2921765cf796280baf653a52b22b52e0ba266 Author: Luis Henriques Date: Fri Jan 5 10:47:19 2018 +0000 ceph: quota: support for ceph.quota.max_files This patch adds support for the max_files quota. It hooks into all the ceph functions that add new filesystem objects that need to be checked against the quota limits. When these limits are hit, -EDQUOT is returned. Note that we're not checking quotas on ceph_link(). ceph_link doesn't really create a new inode, and since the MDS doesn't update the directory statistics when a new (hard) link is created (only with symlinks), they are not accounted as a new file. Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/dir.c | 11 ++++++++ fs/ceph/file.c | 4 ++- fs/ceph/quota.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/ceph/super.h | 1 + 4 files changed, 95 insertions(+), 1 deletion(-) commit fb18a57568c2b84cd611e242c0f6fa97b45e4907 Author: Luis Henriques Date: Fri Jan 5 10:47:18 2018 +0000 ceph: quota: add initial infrastructure to support cephfs quotas This patch adds the infrastructure required to support cephfs quotas as it is currently implemented in the ceph fuse client. Cephfs quotas can be set on any directory, and can restrict the number of bytes or the number of files stored beneath that point in the directory hierarchy. Quotas are set using the extended attributes 'ceph.quota.max_files' and 'ceph.quota.max_bytes', and can be removed by setting these attributes to '0'. Link: http://tracker.ceph.com/issues/22372 Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov Documentation/filesystems/ceph.txt | 12 +++++++ fs/ceph/Makefile | 2 +- fs/ceph/inode.c | 6 ++++ fs/ceph/mds_client.c | 23 ++++++++++++++ fs/ceph/mds_client.h | 2 ++ fs/ceph/quota.c | 65 ++++++++++++++++++++++++++++++++++++++ fs/ceph/super.h | 8 +++++ fs/ceph/xattr.c | 44 ++++++++++++++++++++++++++ include/linux/ceph/ceph_features.h | 1 + include/linux/ceph/ceph_fs.h | 17 ++++++++++ net/ceph/ceph_common.c | 1 + 11 files changed, 180 insertions(+), 1 deletion(-) commit 103cf0e5799ce024fd28dfab716d7111afe4b117 Merge: a9f36db 4dc2375 700abc9 Author: Rafael J. Wysocki Date: Mon Apr 2 11:01:02 2018 +0200 Merge branches 'pm-cpuidle' and 'pm-tools' * pm-cpuidle: cpuidle: poll_state: Avoid invoking local_clock() too often PM: cpuidle/suspend: Add s2idle usage and time state attributes cpuidle: Enable coupled cpuidle support on Exynos3250 platform cpuidle: poll_state: Add time limit to poll_idle() ARM: cpuidle: Drop memory allocation error message from arm_idle_init_cpu() * pm-tools: pm-graph: AnalyzeSuspend v5.0 pm-graph: AnalyzeBoot v2.2 pm-graph: config files and installer commit a9f36db7ec653ddeba81ba43d56103eab1ab912a Merge: e3a495c 3d41386 Author: Rafael J. Wysocki Date: Mon Apr 2 11:00:46 2018 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: (38 commits) cpufreq: CPPC: Use transition_delay_us depending transition_latency cpufreq: tegra186: Don't validate the frequency table twice cpufreq: speedstep: Don't validate the frequency table twice cpufreq: sparc: Don't validate the frequency table twice cpufreq: sh: Don't validate the frequency table twice cpufreq: sfi: Don't validate the frequency table twice cpufreq: scpi: Don't validate the frequency table twice cpufreq: sc520: Don't validate the frequency table twice cpufreq: s3c24xx: Don't validate the frequency table twice cpufreq: qoirq: Don't validate the frequency table twice cpufreq: pxa: Don't validate the frequency table twice cpufreq: ppc_cbe: Don't validate the frequency table twice cpufreq: powernow: Don't validate the frequency table twice cpufreq: p4-clockmod: Don't validate the frequency table twice cpufreq: mediatek: Don't validate the frequency table twice cpufreq: longhaul: Don't validate the frequency table twice cpufreq: ia64-acpi: Don't validate the frequency table twice cpufreq: elanfreq: Don't validate the frequency table twice cpufreq: e_powersaver: Don't validate the frequency table twice cpufreq: cpufreq-dt: Don't validate the frequency table twice ... commit e3a495c4ee64eb2ce8aaef244d7a0b68fd5216fd Merge: ef74b5b ead18c2 6484640 6f1d7c4 Author: Rafael J. Wysocki Date: Mon Apr 2 11:00:28 2018 +0200 Merge branches 'pm-core', 'pm-sleep' and 'acpi-pm' * pm-core: driver core: Introduce device links reference counting PM / wakeirq: Add wakeup name to dedicated wake irqs * pm-sleep: PM / hibernate: Change message when writing to /sys/power/resume PM / hibernate: Make passing hibernate offsets more friendly PCMCIA / PM: Avoid noirq suspend aborts during suspend-to-idle * acpi-pm: ACPI / PM: Fix keyboard wakeup from suspend-to-idle on ASUS UX331UA ACPI / PM: Allow deeper wakeup power states with no _SxD nor _SxW ACPI / PM: Reduce LPI constraints logging noise ACPI / PM: Do not reconfigure GPEs for suspend-to-idle commit 49076b2c64a25d21d5d2870dc9caa4aa562b8609 Merge: 81616df 9251a71 27664c5 95c513e bbf0386 7e46b32 Author: Rafael J. Wysocki Date: Mon Apr 2 10:59:01 2018 +0200 Merge branches 'acpi-osi', 'acpi-scan', 'acpi-tad', 'acpi-video' and 'acpi-misc' * acpi-osi: ACPI / OSI: Add OEM _OSI strings to disable NVidia RTD3 * acpi-scan: ACPI / scan: Send change uevent with offine environmental data * acpi-tad: ACPI: Add Time and Alarm Device (TAD) driver * acpi-video: ACPI / video: Add quirk to force acpi-video backlight on Samsung 670Z5E * acpi-misc: ACPI / Kconfig: Update ACPI_PROCFS_POWER help text commit 81616dfa2d097024ca214689f80332b3cf66ddfc Merge: 0c9ed61 24bada7 d29abc8 92d1b38 Author: Rafael J. Wysocki Date: Mon Apr 2 10:58:39 2018 +0200 Merge branches 'acpi-tables', 'acpi-cppc' and 'acpi-pci' * acpi-tables: ACPI: add NFIT and HMAT to the initrd override list * acpi-cppc: ACPI / CPPC: Update all pr_(debug/err) messages to log the susbspace id * acpi-pci: ACPI / PCI: pci_link: Allow the absence of _PRS and change log level commit 0c9ed61bddd27cf95067e17c3d25634e25c4204b Merge: ae02168 7a4ea10 4f1c29d 66444f4 Author: Rafael J. Wysocki Date: Mon Apr 2 10:58:13 2018 +0200 Merge branches 'acpi-battery', 'acpi-doc' and 'acpi-pmic' * acpi-battery: Revert "ACPI: battery: Add the ThinkPad "Not Charging" quirk" ACPI: battery: do not export degraded capacity values over 100 ACPI: battery: make function __battery_hook_unregister() static ACPI: battery: Add the ThinkPad "Not Charging" quirk thinkpad_acpi: Add support for battery thresholds power: add to_power_supply macro to the API battery: Add the battery hooking API * acpi-doc: ACPI: sysfs: Update device object sysfs documentation * acpi-pmic: ACPI / PMIC: Replace license boilerplate with SPDX license identifier commit ae02168d7877daf3a8ffcc60237a64398ed943aa Merge: 8b29d29 4860ae7 Author: Rafael J. Wysocki Date: Mon Apr 2 10:57:58 2018 +0200 Merge branch 'acpica' * acpica: (21 commits) ACPICA: Update version to 20180313 ACPICA: Cleanup/simplify module-level code support ACPICA: Events: add a return on failure from acpi_hw_register_read ACPICA: adding SPDX headers ACPICA: Rename a global for clarity, no functional change ACPICA: macros: fix ACPI_ERROR_NAMESPACE macro ACPICA: Change a compile-time option to a runtime option ACPICA: Remove calling of _STA from acpi_get_object_info() ACPICA: AML Debug Object: Don't ignore output of zero-length strings ACPICA: Fix memory leak on unusual memory leak ACPICA: Events: Dispatch GPEs after enabling for the first time ACPICA: Events: Add parallel GPE handling support to fix potential redundant _Exx evaluations ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c ACPICA: Update version to 20180209 ACPICA: Add option to disable Package object name resolution errors ACPICA: Integrate package handling with module-level code ACPICA: Revert "Fix for implicit result conversion for the To____ functions" ACPICA: Update for some debug output. No functional change ACPICA: Update error message, no functional change ... commit 08a79102aa373e03ce704621fd84567605214465 Author: Kyle Spiers Date: Sat Mar 17 09:44:01 2018 -0700 rbd: remove VLA usage As part of the effort to remove VLAs from the kernel[1], this moves the literal values into the stack array calculation instead of using a variable for the sizing. The resulting size can be found from sizeof(buf). [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Kyle Spiers Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f6870cc9a36623d1dcb0aceade9e8a4785a4283a Author: Colin Ian King Date: Mon Mar 19 13:33:10 2018 +0000 rbd: fix spelling mistake: "reregisteration" -> "reregistration" Trivial fix to spelling mistake in rdb_warn message text. Signed-off-by: Colin Ian King Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7aac453a03a2216fcda4f4d72ae4d2089a013bb3 Author: Yan, Zheng Date: Tue Mar 13 19:52:20 2018 +0800 ceph: rename function drop_leases() to a more descriptive name Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 50c55aeca27f09ceda0cd58b72b0addeecef74eb Author: Chengguang Xu Date: Wed Mar 14 13:47:33 2018 +0800 ceph: fix invalid point dereference for error case in mdsc destroy 1. set fsc->mdsc after successfully allocate all necessary memory in mdsc init. 2. if fsc->mdsc is NULL, just skip destroy operation in mdsc destroy. Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 98cfda81040f4a6925a98567d036a918e855d4ec Author: Chengguang Xu Date: Tue Mar 13 10:43:45 2018 +0800 ceph: return proper bool type to caller instead of pointer Change to return true/false only for bool type return code. Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bb48bd4dc45f9ee1e44d8e9fcb01023e0d0ba80d Author: Chengguang Xu Date: Tue Mar 13 10:42:44 2018 +0800 ceph: optimize memory usage In current code, regular file and directory use same struct ceph_file_info to store fs specific data so the struct has to include some fields which are only used for directory (e.g., readdir related info), when having plenty of regular files, it will lead to memory waste. This patch introduces dedicated ceph_dir_file_info cache for readdir related thins. So that regular file does not include those unused fields anymore. Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/dir.c | 185 ++++++++++++++++++++++--------------------- fs/ceph/file.c | 88 ++++++++++++++------ fs/ceph/super.c | 8 ++ fs/ceph/super.h | 4 + include/linux/ceph/libceph.h | 1 + 5 files changed, 169 insertions(+), 117 deletions(-) commit 47474d0b011bb385719e91a60bb9ff7649d66526 Author: Chengguang Xu Date: Tue Mar 13 23:01:07 2018 +0800 ceph: optimize mds session register Do memory allocation first, so that avoid unnecessary initialization of newly allocated session in error case. Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit 57a35dfb522c8bbac622d49f5217906f9b5eceb0 Author: Chengguang Xu Date: Sat Mar 10 20:32:05 2018 +0800 libceph, ceph: add __init attribution to init funcitons Add __init attribution to the functions which are called only once during initiating/registering operations and deleting unnecessary symbol exports. Signed-off-by: Chengguang Xu Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/cache.c | 2 +- net/ceph/crypto.c | 6 ++++-- net/ceph/debugfs.c | 7 ++----- net/ceph/messenger.c | 4 +--- net/ceph/osd_client.c | 4 +--- 5 files changed, 9 insertions(+), 14 deletions(-) commit 51b10f3fe446f536b6edf90ce6941882033dd93b Author: Chengguang Xu Date: Fri Mar 9 15:12:40 2018 +0800 ceph: filter out used flags when printing unused open flags Filter out used access mode flags when printing unused open flags. Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/file.c | 2 ++ 1 file changed, 2 insertions(+) commit 1582af2eaaf17cbcd7864172347c1db10b6b2210 Author: Yan, Zheng Date: Tue Mar 6 15:14:54 2018 +0800 ceph: don't wait on writeback when there is no more dirty pages In sync mode, writepages() needs to write all dirty pages. But it can only write dirty pages associated with the oldest snapc. To write dirty pages associated with next snapc, it needs to wait until current writes complete. If there is no more dirty pages, writepages() should not wait on writeback. Otherwise, dirty page writeback becomes very slow. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit af9cc401ce7452f9d965ba4553d8ffe7f0ed42ee Author: Yan, Zheng Date: Sun Mar 4 16:36:01 2018 +0800 ceph: invalidate pages that beyond EOF in ceph_writepages_start() Dirty pages can be associated with different capsnap. Different capsnap may have different EOF value. So invalidating dirty pages according to the largest EOF value is wrong. Dirty pages beyond EOF, but associated with other capsnap, do not get invalidated. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 36 ++++++++++++++++++------------------ fs/ceph/inode.c | 11 ----------- 2 files changed, 18 insertions(+), 29 deletions(-) commit bc4b5ad3a6a1cfe11494380affc4bfc4521af499 Author: Chengguang Xu Date: Tue Feb 27 13:49:44 2018 +0800 ceph: mark the cap cache as unreclaimable Releasing cap is affected by many factors (e.g., avail_count/reserve_count/min_count) and min_count could be specified high volume in client mount option. Hence it's better to mark cap cache as unreclaimable in case of non-trivial discrepancies between memory shown as reclaimable and what is actually reclaimed. Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/super.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 73737682e0598ae73bd4c481e478a0d75884aa8a Author: Chengguang Xu Date: Wed Feb 28 19:43:47 2018 +0800 ceph: change variable name to follow common rule Variable name ci is mostly used for ceph_inode_info. Variable name fi is mostly used for ceph_file_info. Variable name cf is mostly used for ceph_cap_flush. Change variable name to follow above common rules in case of confusing. Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 4 ++-- fs/ceph/dir.c | 18 +++++++++--------- fs/ceph/file.c | 38 +++++++++++++++++++------------------- 3 files changed, 30 insertions(+), 30 deletions(-) commit 79cd674aed7363a043222af3c8f97d0ea0a078cf Author: Chengguang Xu Date: Sat Feb 24 18:36:02 2018 +0800 ceph: optimizing cap reservation When caps_avail_count is in a low level, most newly trimmed caps will probably go into ->caps_list and caps_avail_count will be increased. Hence after trimming, should recheck caps_avail_count to effectly reuse newly trimmed caps. Also, when releasing unnecessary caps follow the same rule of ceph_put_cap. Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 88 +++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 59 insertions(+), 29 deletions(-) commit b517c1d87faafba0c33a38ffdd551e8b399f0a31 Author: Chengguang Xu Date: Sun Feb 25 13:39:09 2018 +0800 ceph: release unreserved caps if having enough available caps When unreserving caps check if there is too mamy available caps in the ->caps_list, if so release unreserved caps. Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit e327ce068518e38c0182739e879b9dce477c8d85 Author: Chengguang Xu Date: Sat Feb 24 18:35:29 2018 +0800 ceph: optimizing cap allocation When setting high volume of caps_min_count or having many unreserved caps, unused caps may always keep in the ->caps_list even can't get new cap from kmem_cache_alloc because lack of maximum limitation of caps_avail_count. Hence reuse caps in ->caps_list if available, it's maybe better than setting max limitation of caps_avail_count and releasing unused caps when reaching the limit. Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit b884014a91a49ed0e7198d276b28887cc48363bd Author: Chengguang Xu Date: Fri Feb 23 17:09:38 2018 +0800 ceph: adding protection for showing cap reservation info Adding spinlock protection during getting cap reservation ralated fields so that the numbers match below BUG_ON condition in the code. BUG_ON(mdsc->caps_total_count != mdsc->caps_use_count + mdsc->caps_reserve_count + mdsc->caps_avail_count); Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 4 ++++ 1 file changed, 4 insertions(+) commit f2f87877b8f29a4aa0000a2e3cdf806ac645500e Author: Chengguang Xu Date: Thu Feb 22 15:47:05 2018 +0800 libceph: adding missing message types to ceph_msg_type_name() Some of message types are missing in ceph_msg_type_name(), so just adding them for better understanding of output information. Signed-off-by: Chengguang Xu Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov net/ceph/ceph_common.c | 5 +++++ 1 file changed, 5 insertions(+) commit dd4358550fc5244d4757eae40e23d87894fe5273 Author: Ilya Dryomov Date: Thu Feb 22 13:43:24 2018 +0100 rbd: get the latest osdmap when using an existing client Currently we request the latest osdmap only if ceph_pg_poolid_by_name() fails with -ENOENT. This is effective with newly created pools, but we also want to avoid attempting to map from pools that were recently deleted and report "pool does not exist" instead. (Such an attempt eventually fails in the OSD client after map check code kicks in, but the error message is confusing.) Request the latest osdmap unconditionally after bumping a ref on an existing client in rbd_client_find(). Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 69 +++++++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 36 deletions(-) commit 5feb0d8d2f10c3f39f3d3a754dded74bb430a5e6 Author: Ilya Dryomov Date: Thu Feb 22 13:19:04 2018 +0100 rbd: move rbd_get_client() below rbd_put_client() ... to avoid a forward declaration in the next commit. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 0a4a1e68d861848d09ab4b4b280d13584ad8ca45 Author: Ilya Dryomov Date: Mon Feb 12 16:00:36 2018 +0100 rbd: remove redundant declaration of rbd_spec_put() Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 1 - 1 file changed, 1 deletion(-) commit 4d8969af28a5c1bccd9f42cf98ab5cff3c0fe140 Author: Chengguang Xu Date: Thu Feb 15 15:39:05 2018 +0800 ceph: use seq_show_option for string type options Using seq_show_option to replace seq_printf for string type options. Signed-off-by: Chengguang Xu Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/super.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 7377324e5bb2ed4c89e9d60691462a7272ee08a5 Author: Chengguang Xu Date: Sun Feb 11 09:33:28 2018 +0800 libceph: fix misjudgement of maximum monitor number num_mon should allow up to CEPH_MAX_MON in ceph_monmap_decode(). Signed-off-by: Chengguang Xu Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov net/ceph/mon_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11e1478df91cba4919c2bb011c49f659ebed3d16 Author: Chengguang Xu Date: Sat Feb 10 14:18:06 2018 +0800 libceph, ceph: change permission for readonly debugfs entries Remove write permission for debugfs entries which only have readonly function. Signed-off-by: Chengguang Xu Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/debugfs.c | 8 ++++---- net/ceph/debugfs.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) commit 7ae7a828d9ac249b175f1b6d1c21c77720cd6098 Author: Chengguang Xu Date: Wed Feb 7 10:27:06 2018 +0800 ceph: keep consistent semantic in fscache related option combination When specifying multiple fscache related options, the result isn't always the same as option order, this fix will keep strict consistent meaning by order. Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/super.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4c069a5821ddc568e9509f49fcc9481c8a43712f Author: Chengguang Xu Date: Tue Jan 30 16:29:17 2018 +0800 ceph: add newline to end of debug message format Some of dout format do not include newline in the end, fix for the files which are in fs/ceph and net/ceph directories, and changing printk to dout for printing debug info in super.c Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/cache.c | 2 +- fs/ceph/dir.c | 2 +- fs/ceph/file.c | 2 +- fs/ceph/locks.c | 20 ++++++++++---------- fs/ceph/mds_client.c | 10 +++++----- fs/ceph/super.c | 1 - net/ceph/ceph_common.c | 2 +- 7 files changed, 19 insertions(+), 20 deletions(-) commit b13318521776304a37c8cb3e2a3e613d228a38f3 Author: Ilya Dryomov Date: Wed Feb 7 12:09:12 2018 +0100 rbd: allow "fancy" striping Signed-off-by: Ilya Dryomov Acked-by: Jason Dillaman drivers/block/rbd.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) commit afb978884c3ec17227626eb371130a97671e5238 Author: Ilya Dryomov Date: Tue Feb 6 19:26:35 2018 +0100 rbd: introduce OWN_BVECS data type If the layout is "fancy", we need to be able to rearrange the provided bio_vecs in stripe unit chunks to make it possible for the messenger to read/write directly from/to the provided data buffer, without employing a temporary data buffer for assembling the result. Higher level bio_vec arrays are generally immutable, so this requires copying into a private array. Only the bio_vecs themselves are shuffled around, not the actual data. OWN_BVECS doesn't own any pages. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 156 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 149 insertions(+), 7 deletions(-) commit e93aca0abb8b9f8fd23675dc9110b7517964657a Author: Ilya Dryomov Date: Tue Feb 6 19:26:35 2018 +0100 rbd: remove rbd_parent_request_{create,destroy}() rbd_parent_request_create() takes a ref on obj_req for child_img_req. There is no point in doing that because child_img_req is created on behalf of obj_req -- obj_req is the initiator and can't be completed before child_img_req. Open-code the rest of rbd_parent_request_create() and remove it along with rbd_parent_request_destroy(). Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 74 +++++------------------------------------------------ 1 file changed, 6 insertions(+), 68 deletions(-) commit dfd9875f11008183c26fea5fdf23e6740fe8aa5a Author: Ilya Dryomov Date: Tue Feb 6 19:26:35 2018 +0100 rbd: get rid of img_req->{offset,length} These are set, but no longer used. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) commit 0420c5dd2ef308b69a86b44a217390f5612bab58 Author: Ilya Dryomov Date: Tue Feb 6 19:26:34 2018 +0100 rbd: remove rbd_img_request_fill() and helpers Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 98 ----------------------------------------------------- 1 file changed, 98 deletions(-) commit 5a237819aa4e0421a17966e9baf91b9caedaf61d Author: Ilya Dryomov Date: Tue Feb 6 19:26:34 2018 +0100 rbd: switch to common striping framework Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 191 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 168 insertions(+), 23 deletions(-) commit 2bb1e56ec6450ce533c644c5bfa548dc34c551a0 Author: Ilya Dryomov Date: Tue Feb 6 19:26:34 2018 +0100 rbd: create+truncate for whole-object layered discards A whole-object layered discard is implemented as a truncate rather than a delete: a dummy object is needed to prevent the CoW machinery from kicking in. However, a truncate on a non-existent object is a no-op. If the object doesn't exist in HEAD, a discard request is effectively ignored, which violates our "discard zeroes data" promise and breaks REQ_OP_WRITE_ZEROES implementation. A non-exclusive create on an existing object is also a no-op, so the fix is to do a compound create+truncate instead. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 86bd7998fa2c1b18fda74cfa4674cfb49ae701c7 Author: Ilya Dryomov Date: Tue Feb 6 19:26:33 2018 +0100 rbd: move to obj_req->img_extents In preparation for rbd "fancy" striping, replace obj_req->img_offset with obj_req->img_extents. A single starting offset isn't sufficient because we want only one OSD request per object and will merge adjacent object extents in ceph_file_to_extents(). The final object extent may map into multiple different byte ranges in the image. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 150 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 98 insertions(+), 52 deletions(-) commit 43df3d35c0a558e461a1d7b3f0b21f5c43a5955f Author: Ilya Dryomov Date: Fri Feb 2 15:23:22 2018 +0100 rbd: incorporate ceph_object_extent obj_req->object_no -> obj_req->ex.oe_objno obj_req->offset -> obj_req->ex.oe_off obj_req->length -> obj_req->ex.oe_len ... and use ex for linking object requests to image requests. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 71 +++++++++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 37 deletions(-) commit 08c1ac508b6dc20ac866e7cdb7279245437c7d26 Author: Ilya Dryomov Date: Sat Feb 17 10:41:20 2018 +0100 libceph, ceph: move ceph_calc_file_object_mapping() to striper.c ceph_calc_file_object_mapping() has nothing to do with osdmaps. Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 1 + fs/ceph/ioctl.c | 2 +- include/linux/ceph/osdmap.h | 5 ----- include/linux/ceph/striper.h | 4 ++++ net/ceph/osd_client.c | 1 + net/ceph/osdmap.c | 37 ------------------------------------- net/ceph/striper.c | 37 ++++++++++++++++++++++++++++++++++++- 7 files changed, 43 insertions(+), 44 deletions(-) commit ed0811d2d243c4195580a9671266031907c02ca7 Author: Ilya Dryomov Date: Fri Feb 2 15:23:22 2018 +0100 libceph: striping framework implementation Signed-off-by: Ilya Dryomov include/linux/ceph/striper.h | 65 +++++++++++++ net/ceph/Makefile | 1 + net/ceph/striper.c | 226 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 292 insertions(+) commit ecc633caebcc84a1469892e3f6f6f4b6a16f41af Author: Ilya Dryomov Date: Thu Feb 1 11:50:47 2018 +0100 rbd: store data_type in img_req instead of obj_req All object requests are associated with an image request now -- avoid duplicating the same info in each object request. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) commit 0be2d60ed888a25016a05148e52feea4bf401b0e Author: Ilya Dryomov Date: Thu Feb 1 11:50:47 2018 +0100 rbd: remove obj_req->flags field There are no standalone (!IMG_DATA) object requests anymore. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) commit 15961b44947d9d53bfec0a89b5ebbcf30afeb6ac Author: Ilya Dryomov Date: Thu Feb 1 11:50:47 2018 +0100 rbd: remove old request completion code Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 175 +--------------------------------------------------- 1 file changed, 3 insertions(+), 172 deletions(-) commit 7114edac357b8cc27cf95a4d7eed75d07c41970d Author: Ilya Dryomov Date: Thu Feb 1 11:50:47 2018 +0100 rbd: new request completion code Do away with partial request completions and all the associated complexity. Individual object requests no longer need to be completed in order -- when the last one becomes ready, we complete the entire higher level request all at once. This also wraps up the conversion to a state machine model and eliminates the recursion described in commit 6d69bb536bac ("rbd: prevent kernel stack blow up on rbd map"). Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 68 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 13 deletions(-) commit efbd1a1106f15f9260c7cb9a67f5c380a39b4fcc Author: Ilya Dryomov Date: Tue Jan 30 17:52:11 2018 +0100 rbd: update rbd_img_request_submit() signature It should be void now. Also, object requests are unlinked only in image request destructor, which can't run before rbd_img_request_put(), so no need for _safe. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 9bb0248d9eb9438b991ba538e30eedb493cf1fb4 Author: Ilya Dryomov Date: Tue Jan 30 17:52:10 2018 +0100 rbd: add img_req->op_type field Store op_type in its own field instead of packing it into flags. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 75 +++++++++-------------------------------------------- 1 file changed, 12 insertions(+), 63 deletions(-) commit a162b308dc30ddeb848a1445534f5b04e41e1ed5 Author: Ilya Dryomov Date: Tue Jan 30 17:52:10 2018 +0100 rbd: simplify rbd_osd_req_create() No need to pass rbd_dev and op_type to rbd_osd_req_create(): there are no standalone (!IMG_DATA) object requests anymore and osd_req->r_flags can be set in rbd_osd_req_format_{read,write}(). Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 59 +++++++++++++---------------------------------------- 1 file changed, 14 insertions(+), 45 deletions(-) commit 51c3509e5e167cf0fdc82c81f4d85da46b1ee1ee Author: Ilya Dryomov Date: Mon Jan 29 14:04:08 2018 +0100 rbd: remove old request handling code Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 734 +--------------------------------------------------- 1 file changed, 4 insertions(+), 730 deletions(-) commit 3da691bf436690c4bb943d5d16e5934937625578 Author: Ilya Dryomov Date: Mon Jan 29 14:04:08 2018 +0100 rbd: new request handling code The notable changes are: - instead of explicitly stat'ing the object to see if it exists before issuing the write, send the write optimistically along with the stat in a single OSD request - zero copyup optimization - all object requests are associated with an image request and have a valid ->img_request pointer; there are no standalone (!IMG_DATA) object requests anymore - code is structured as a state machine (vs a bunch of callbacks with implicit state) Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 678 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 601 insertions(+), 77 deletions(-) commit 45a267dbb40f5cf15efa23ce815c4fe0b4674aa2 Author: Ilya Dryomov Date: Mon Jan 22 15:20:15 2018 +0100 libceph: handle zero-length data items rbd needs this for null copyups -- if copyup data is all zeroes, we want to save some I/O and network bandwidth. See rbd_obj_issue_copyup() in the next commit. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder net/ceph/messenger.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 7e07efb12db96c2f7c5fafeccada327d1f869e60 Author: Ilya Dryomov Date: Sat Jan 20 10:30:11 2018 +0100 rbd: move from raw pages to bvec data descriptors In preparation for rbd "fancy" striping which requires bio_vec arrays, wire up BVECS data type and kill off PAGES data type. There is nothing wrong with using page vectors for copyup requests -- it's just less iterator boilerplate code to write for the new striping framework. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder drivers/block/rbd.c | 155 ++++++++++++++++++++++++++-------------------------- 1 file changed, 77 insertions(+), 78 deletions(-) commit b9e281c2b38804984d619e1d9efc4b9020bcb291 Author: Ilya Dryomov Date: Sat Jan 20 10:30:11 2018 +0100 libceph: introduce BVECS data type In preparation for rbd "fancy" striping, introduce ceph_bvec_iter for working with bio_vec array data buffers. The wrappers are trivial, but make it look similar to ceph_bio_iter. Signed-off-by: Ilya Dryomov include/linux/ceph/messenger.h | 42 +++++++++++++++++++++++ include/linux/ceph/osd_client.h | 8 +++++ net/ceph/messenger.c | 75 +++++++++++++++++++++++++++++++++++++++++ net/ceph/osd_client.c | 39 +++++++++++++++++++++ 4 files changed, 164 insertions(+) commit f9dcbc44cd317ee3c5e443db7f9a62f52689f08e Author: Ilya Dryomov Date: Sat Jan 20 10:30:11 2018 +0100 rbd: get rid of img_req->copyup_pages The initiating object request is the proper owner -- save a bit of space. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder drivers/block/rbd.c | 43 +++++++++---------------------------------- 1 file changed, 9 insertions(+), 34 deletions(-) commit 06fbb6993504974db6334a80b6796d6522ad45eb Author: Ilya Dryomov Date: Sat Jan 20 10:30:10 2018 +0100 rbd: don't (ab)use obj_req->pages for stat requests obj_req->pages is for provided data buffers. stat requests are internal and should be NODATA. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder drivers/block/rbd.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit df6ba7015dd3a64a2e74353d1e7d19871af86f38 Author: Ilya Dryomov Date: Sat Jan 20 10:30:10 2018 +0100 rbd: remove bio cloning helpers Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder drivers/block/rbd.c | 141 ---------------------------------------------------- 1 file changed, 141 deletions(-) commit 5359a17d2706b86da2af83027343d5eb256f7670 Author: Ilya Dryomov Date: Sat Jan 20 10:30:10 2018 +0100 libceph, rbd: new bio handling code (aka don't clone bios) The reason we clone bios is to be able to give each object request (and consequently each ceph_osd_data/ceph_msg_data item) its own pointer to a (list of) bio(s). The messenger then initializes its cursor with cloned bio's ->bi_iter, so it knows where to start reading from/writing to. That's all the cloned bios are used for: to determine each object request's starting position in the provided data buffer. Introduce ceph_bio_iter to do exactly that -- store position within bio list (i.e. pointer to bio) + position within that bio (i.e. bvec_iter). Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 67 +++++++++++++++----------- include/linux/ceph/messenger.h | 59 +++++++++++++++++++---- include/linux/ceph/osd_client.h | 11 +++-- net/ceph/messenger.c | 101 ++++++++++++++-------------------------- net/ceph/osd_client.c | 13 ++++-- 5 files changed, 139 insertions(+), 112 deletions(-) commit a1fbb5e7bbb56fccdf54bf4ab5086c6080ee5bfa Author: Ilya Dryomov Date: Tue Jan 16 12:15:02 2018 +0100 rbd: start enums at 1 instead of 0 Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit dccbf08005df800f5c8e948ab6132ed5536134bc Author: Ilya Dryomov Date: Sat Feb 17 09:29:58 2018 +0100 libceph, ceph: change ceph_calc_file_object_mapping() signature - make it void - xlen (object extent length) out parameter should be u32 because only a single stripe unit is mapped at a time Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder fs/ceph/addr.c | 16 ++++++---------- fs/ceph/ioctl.c | 11 +++-------- include/linux/ceph/osdmap.h | 7 +++---- net/ceph/osd_client.c | 10 ++++------ net/ceph/osdmap.c | 6 ++---- 5 files changed, 18 insertions(+), 32 deletions(-) commit db2196a58939c0b75b9b7ea5ab1fec4081d48661 Author: Ilya Dryomov Date: Tue Jan 16 12:15:02 2018 +0100 libceph: eliminate overflows in ceph_calc_file_object_mapping() bl, stripeno and objsetno should be u64 -- otherwise large enough files get corrupted. How large depends on file layout: - 4M-objects layout (default): any file over 16P - 64K-objects layout (smallest possible object size): any file over 512T Only CephFS is affected, rbd doesn't use ceph_calc_file_object_mapping() yet. Fortunately, CephFS has a max_file_size configurable, the default for which is way below both of the above numbers. Reimplement the logic from scratch with no layout validation -- it's done on the MDS side. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder net/ceph/osdmap.c | 88 ++++++++++++++++++------------------------------------- 1 file changed, 28 insertions(+), 60 deletions(-) commit 24f1df60ce943aee107b3cb99b37a0152c9dd47a Author: Ilya Dryomov Date: Fri Jan 12 17:22:10 2018 +0100 rbd: set max_segment_size to UINT_MAX Commit 21acdf45f495 ("rbd: set max_segments to USHRT_MAX") removed the limit on max_segments. Remove the limit on max_segment_size as well. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder drivers/block/rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e40ff213898502d299351cc2fe1e350cd186f0d3 Author: Theodore Ts'o Date: Sun Apr 1 23:21:03 2018 -0400 ext4: force revalidation of directory pointer after seekdir(2) A malicious user could force the directory pointer to be in an invalid spot by using seekdir(2). Use the mechanism we already have to notice if the directory has changed since the last time we called ext4_readdir() to force a revalidation of the pointer. Reported-by: syzbot+1236ce66f79263e8a862@syzkaller.appspotmail.com Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/dir.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 28e9c1d530b4ccfb2d64ec5b1ebb1f9f893a21e8 Merge: 6174a30 60d6e6f Author: David S. Miller Date: Sun Apr 1 22:20:48 2018 -0400 Merge branch 'net-bgmac-Couple-of-sparse-warnings' Florian Fainelli says: ==================== net: bgmac: Couple of sparse warnings This patch series fixes a couple of warnings reported by sparse, should not cause any functional problems since bgmac is typically used on LE platforms anyway. ==================== Signed-off-by: David S. Miller commit 60d6e6f0b9e422dd01aeda39257ee0428e5e2a3f Author: Florian Fainelli Date: Sun Apr 1 10:26:30 2018 -0700 net: bgmac: Fix endian access in bgmac_dma_tx_ring_free() bgmac_dma_tx_ring_free() assigns the ctl1 word which is a litle endian 32-bit word without using proper accessors, fix this, and because a length cannot be negative, use unsigned int while at it. Fixes: 9cde94506eac ("bgmac: implement scatter/gather support") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 16a1c0646e55c3345bce8e4edfc06ad119d27c04 Author: Florian Fainelli Date: Sun Apr 1 10:26:29 2018 -0700 net: bgmac: Correctly annotate register space All the members: base, idm_base and nicpm_base should be annotated with __iomem since they are pointers to register space. This fixes a bunch of sparse reported warnings. Fixes: f6a95a24957a ("net: ethernet: bgmac: Add platform device support") Fixes: dd5c5d037f5e ("net: ethernet: bgmac: add NS2 support") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 21a4e14aaedbc85f203d37e56cb26235b22b43f6 Author: Long Li Date: Fri Mar 30 15:16:36 2018 -0700 cifs: smbd: disconnect transport on RDMA errors On RDMA errors, transport should disconnect the RDMA CM connection. This will notify the upper layer, and it will attempt transport reconnect. Signed-off-by: Long Li Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg CC: Stable fs/cifs/smbdirect.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 48f238a79f668f8ff013024d83010de551833d7f Author: Long Li Date: Fri Mar 30 15:16:35 2018 -0700 cifs: smbd: avoid reconnect lockup During transport reconnect, other processes may have registered memory and blocked on transport. This creates a deadlock situation because the transport resources can't be freed, and reconnect is blocked. Fix this by returning to upper layer on timeout. Before returning, transport status is set to reconnecting so other processes will release memory registration resources. Upper layer will retry the reconnect. This is not in fast I/O path so setting the timeout to 5 seconds. Signed-off-by: Long Li Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg CC: Stable fs/cifs/smbdirect.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 2a18287b54f8654d9835cddfc80a12fd73162fc0 Author: Steve French Date: Thu Mar 29 12:16:34 2018 -0500 Don't log confusing message on reconnect by default Change the following message (which can occur on reconnect) from a warning to an FYI message. It is confusing to users. [58360.523634] CIFS VFS: Free previous auth_key.response = 00000000a91cdc84 By default this message won't show up on reconnect unless the user bumps up the log level to include FYI messages. Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2564f2ff83975e05dbd2f13301f7147b63e67c91 Author: Steve French Date: Wed Mar 21 23:16:36 2018 -0500 Don't log expected error on DFS referral request STATUS_FS_DRIVER_REQUIRED is expected when DFS is not turned on on the server. Do not log it on DFS referral response. It clutters the dmesg log unnecessarily at mount time. Signed-off-by: Steve French Reviewed-by: Aurelien Aptel fs/cifs/smb2maperror.c | 2 +- fs/cifs/smb2ops.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 31cd106bb141b54ba4db5c1078c3f58f0c6e8dfa Author: Phillip Potter Date: Sat Mar 17 21:06:56 2018 +0000 fs: cifs: Replace _free_xid call in cifs_root_iget function Modify end of cifs_root_iget function in fs/cifs/inode.c to call free_xid(xid) instead of _free_xid(xid), thereby allowing debug notification of this action when enabled. Signed-off-by: Phillip Potter Signed-off-by: Steve French fs/cifs/inode.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit d68f353fc9d086a88331d6714e437bd7f4f77f48 Author: Steve French Date: Tue Mar 13 02:35:01 2018 -0500 SMB3.1.1 dialect is no longer experimental SMB3.1.1 is a very important dialect, with much improved security. We can remove the ExPERIMENTAL comments about it. It is widely supported by servers. Signed-off-by: Steve French CC: Stable fs/cifs/Kconfig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 6188f28bf608ddecc2377663b0f2f709440c19ba Author: Steve French Date: Tue Mar 13 02:29:36 2018 -0500 Tree connect for SMB3.1.1 must be signed for non-encrypted shares SMB3.1.1 tree connect was only being signed when signing was mandatory but needs to always be signed (for non-guest users). See MS-SMB2 section 3.2.4.1.1 Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky CC: Stable fs/cifs/smb2pdu.c | 5 +++++ 1 file changed, 5 insertions(+) commit 262916bc69faf90104aa784d55e10760a4199594 Author: Ronnie Sahlberg Date: Tue Feb 20 12:45:21 2018 +1100 fix smb3-encryption breakage when CONFIG_DEBUG_SG=y We can not use the standard sg_set_buf() fucntion since when CONFIG_DEBUG_SG=y this adds a check that will BUG_ON for cifs.ko when we pass it an object from the stack. Create a new wrapper smb2_sg_set_buf() which avoids doing that particular check and use it for smb3 encryption instead. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French CC: Stable fs/cifs/smb2ops.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 70e80655f58e17a2e38e577e1b4fa7a8c99619a0 Author: Gustavo A. R. Silva Date: Mon Feb 19 11:11:13 2018 -0600 CIFS: fix sha512 check in cifs_crypto_secmech_release It seems this is a copy-paste error and that the proper variable to use in this particular case is _sha512_ instead of _md5_. Addresses-Coverity-ID: 1465358 ("Copy-paste error") Fixes: 1c6614d229e7 ("CIFS: add sha512 secmech") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Aurelien Aptel CC: Stable Signed-off-by: Steve French fs/cifs/cifsencrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bd68c6e47abff34e412a0c68cecb4a36bf0198b Author: Aurelien Aptel Date: Fri Feb 16 19:19:29 2018 +0100 CIFS: implement v3.11 preauth integrity SMB3.11 clients must implement pre-authentification integrity. * new mechanism to certify requests/responses happening before Tree Connect. * supersedes VALIDATE_NEGOTIATE * fixes signing for SMB3.11 Signed-off-by: Aurelien Aptel Signed-off-by: Steve French CC: Stable Reviewed-by: Ronnie Sahlberg fs/cifs/cifsglob.h | 5 +++-- fs/cifs/smb2misc.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/cifs/smb2pdu.c | 25 +++++++++++++++++++++ fs/cifs/smb2pdu.h | 1 + fs/cifs/smb2proto.h | 2 ++ fs/cifs/transport.c | 17 ++++++++++++++ 6 files changed, 112 insertions(+), 2 deletions(-) commit 5fcd7f3f966f37f3f9a215af4cc1597fe338d0d5 Author: Aurelien Aptel Date: Fri Feb 16 19:19:28 2018 +0100 CIFS: add sha512 secmech * prepare for SMB3.11 pre-auth integrity * enable sha512 when SMB311 is enabled in Kconfig * add sha512 as a soft dependency Signed-off-by: Aurelien Aptel Signed-off-by: Steve French CC: Stable Reviewed-by: Ronnie Sahlberg fs/cifs/Kconfig | 1 + fs/cifs/cifsencrypt.c | 7 +++++++ fs/cifs/cifsfs.c | 1 + fs/cifs/cifsglob.h | 2 ++ fs/cifs/smb2proto.h | 3 +++ fs/cifs/smb2transport.c | 30 ++++++++++++++++++++++++++++++ 6 files changed, 44 insertions(+) commit 82fb82be05585426405667dd5f0510aa953ba439 Author: Aurelien Aptel Date: Fri Feb 16 19:19:27 2018 +0100 CIFS: refactor crypto shash/sdesc allocation&free shash and sdesc and always allocated and freed together. * abstract this in new functions cifs_alloc_hash() and cifs_free_hash(). * make smb2/3 crypto allocation independent from each other. Signed-off-by: Aurelien Aptel Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg CC: Stable fs/cifs/cifsencrypt.c | 78 +++++-------------------------------------------- fs/cifs/cifsproto.h | 5 ++++ fs/cifs/link.c | 27 ++++------------- fs/cifs/misc.c | 54 ++++++++++++++++++++++++++++++++++ fs/cifs/smb2transport.c | 75 ++++++++++------------------------------------- fs/cifs/smbencrypt.c | 27 ++++------------- 6 files changed, 93 insertions(+), 173 deletions(-) commit f30e4148b19d38790e68ec277dea3ad1d6c66db6 Author: Steve French Date: Tue Feb 13 17:09:28 2018 -0600 Update README file for cifs.ko Remove references to two obsolete /proc/fs/cifs parameters and update for a few minor SMB3 features. Signed-off-by: Steve French Documentation/filesystems/cifs/README | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit 68dbe2f841e0530273d469a4de076ae5147954ce Author: Steve French Date: Tue Feb 13 16:52:51 2018 -0600 Update TODO list for cifs.ko Update list of items still TODO in cifs.ko Signed-off-by: Steve French Documentation/filesystems/cifs/TODO | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit b7a73c84eb96dabd6bb8e9d7c56f796d83efee8e Author: Ronnie Sahlberg Date: Tue Feb 13 15:42:30 2018 +1100 cifs: fix memory leak in SMB2_open() Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French CC: Stable fs/cifs/smb2pdu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ac65cb6203e712821a60061b62ad0b24415880a1 Author: Colin Ian King Date: Fri Feb 9 12:14:15 2018 +0000 CIFS: SMBD: fix spelling mistake: "faield" and "legnth" Trivial fix to spelling mistake in log_rdma_send and log_rdma_mr message text. Signed-off-by: Colin Ian King Signed-off-by: Steve French Reviewed-by: Aurelien Aptel fs/cifs/smbdirect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6174a30df1b902e1fedbd728f5343937e83e64e6 Author: Xin Long Date: Sun Apr 1 22:40:35 2018 +0800 route: check sysctl_fib_multipath_use_neigh earlier than hash Prior to this patch, when one packet is hashed into path [1] (hash <= nh_upper_bound) and it's neigh is dead, it will try path [2]. However, if path [2]'s neigh is alive but it's hash > nh_upper_bound, it will not return this alive path. This packet will never be sent even if path [2] is alive. 3.3.3.1/24: nexthop via 1.1.1.254 dev eth1 weight 1 <--[1] (dead neigh) nexthop via 2.2.2.254 dev eth2 weight 1 <--[2] With sysctl_fib_multipath_use_neigh set is supposed to find an available path respecting to the l3/l4 hash. But if there is no available route with this hash, it should at least return an alive route even with other hash. This patch is to fix it by processing fib_multipath_use_neigh earlier than the hash check, so that it will at least return an alive route if there is when fib_multipath_use_neigh is enabled. It's also compatible with before when there are alive routes with the l3/l4 hash. Fixes: a6db4494d218 ("net: ipv4: Consider failed nexthops in multipath routes") Reported-by: Jianlin Shi Signed-off-by: Xin Long Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 781492abce1bd3ef3fb01271772d6b77e260d193 Author: Frans Meulenbroeks Date: Sun Apr 1 22:52:55 2018 +0200 fix typo in command value in drivers/net/phy/mdio-bitbang. mdio-bitbang mentioned 10 for both read and write. However mdio read opcode is 10 and write opcode is 01 Fixed comment. Signed-off-by: Frans Meulenbroeks Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mdio-bitbang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afb133637071be6deeb8b3d0e55593ffbf63c527 Author: Kai-Heng Feng Date: Sat Mar 31 23:42:03 2018 +0800 sky2: Increase D3 delay to sky2 stops working after suspend The sky2 ethernet stops working after system resume from suspend: [ 582.852065] sky2 0000:04:00.0: Refused to change power state, currently in D3 The current 150ms delay is not enough, change it to 200ms can solve the issue. BugLink: https://bugs.launchpad.net/bugs/1758507 Cc: Stable Signed-off-by: Kai-Heng Feng Signed-off-by: David S. Miller drivers/net/ethernet/marvell/sky2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48bfc39791b8b4a25f165e711f18b9c1617cefbc Author: Tal Gilboa Date: Fri Mar 30 15:50:08 2018 -0700 net/mlx5e: Set EQE based as default TX interrupt moderation mode The default TX moderation mode was mistakenly set to CQE based. The intention was to add a control ability in order to improve some specific use-cases. In general, we prefer to use EQE based moderation as it gives much better numbers for the common cases. CQE based causes a degradation in the common case since it resets the moderation timer on CQE generation. This causes an issue when TSO is well utilized (large TSO sessions). The timer is set to 16us so traffic of ~64KB TSO sessions per second would mean timer reset (CQE per TSO session -> long time between CQEs). In this case we quickly reach the tcp_limit_output_bytes (256KB by default) and cause a halt in TX traffic. By setting EQE based moderation we make sure timer would expire after 16us regardless of the packet rate. This fixes an up to 40% packet rate and up to 23% bandwidth degradtions. Fixes: 0088cbbc4b66 ("net/mlx5e: Enable CQE based moderation on TX CQ") Signed-off-by: Tal Gilboa Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6095e590d277ecec54805c4999335406f08855fe Author: John Allen Date: Fri Mar 30 13:44:21 2018 -0500 ibmvnic: Disable irqs before exiting reset from closed state When the driver is closed, all the associated irqs are disabled. In the event that the driver exits a reset in the closed state, we should be consistent with the state we are in directly after a close. So before we exit the reset routine, all irqs should be disabled as well. This will prevent the irqs from being enabled twice in this case and reporting a number of noisy warning traces. Signed-off-by: John Allen Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit da01ec4ee5e69933641e6017d6461d0ce9dbfac6 Author: Li RongQing Date: Fri Mar 30 10:11:21 2018 +0800 net: sched: do not emit messages while holding spinlock move messages emitting out of sch_tree_lock to avoid holding this lock too long. Signed-off-by: Li RongQing Signed-off-by: David S. Miller net/sched/sch_htb.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit ec1d8ccb07deaf30fd0508af6755364ac47dc08d Author: Hangbin Liu Date: Fri Mar 30 09:44:00 2018 +0800 vlan: also check phy_driver ts_info for vlan's real device Just like function ethtool_get_ts_info(), we should also consider the phy_driver ts_info call back. For example, driver dp83640. Fixes: 37dd9255b2f6 ("vlan: Pass ethtool get_ts_info queries to real device.") Acked-by: Richard Cochran Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller net/8021q/vlan_dev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 49d7006d9f01d435661d03bbea3db4c33935b3d8 Author: Rob Gardner Date: Sat Mar 31 22:53:01 2018 -0600 sparc64: Properly range check DAX completion index Each Oracle DAX CCB has a corresponding completion area, and the required number of areas must fit within a previously allocated array of completion areas beginning at the requested index. Since the completion area index is specified by a file offset, a user can pass arbitrary values, including negative numbers. So the index must be thoroughly range checked to prevent access to addresses outside the bounds of the allocated completion area array. The index cannot be negative, and it cannot exceed the total array size, less the number of CCBs requested. The old code did not check for negative values and was off by one on the upper bound. Signed-off-by: Rob Gardner Signed-off-by: Jonathan Helman Reported-by: Linus Torvalds Signed-off-by: David S. Miller drivers/sbus/char/oradax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a68277b786347b0d3acc3976f693c5065a296fba Merge: 257a1aa 9c548bb Author: David S. Miller Date: Sun Apr 1 20:06:35 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc commit c0b458a9463bd6be165374a8e9e3235800ee132e Merge: 859a593 b5dbc28 Author: David S. Miller Date: Sun Apr 1 19:49:34 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Minor conflicts in drivers/net/ethernet/mellanox/mlx5/core/en_rep.c, we had some overlapping changes: 1) In 'net' MLX5E_PARAMS_LOG_{SQ,RQ}_SIZE --> MLX5E_REP_PARAMS_LOG_{SQ,RQ}_SIZE 2) In 'net-next' params->log_rq_size is renamed to be params->log_rq_mtu_frames. 3) In 'net-next' params->hard_mtu is added. Signed-off-by: David S. Miller commit 859a59352e926315b6384c5fd895b00a30659a12 Merge: 5366271 9ea47132 Author: David S. Miller Date: Sun Apr 1 17:46:01 2018 -0400 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2018-04-01 Here's (most likely) the last bluetooth-next pull request for the 4.17 kernel: - Remove unused btuart_cs driver (replaced by serial_cs + hci_uart) - New USB ID for Edimax EW-7611ULB controller - Cleanups & fixes to hci_bcm driver - Clenups to btmrvl driver Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 9ea471320e1302be0fac67c14a7ab7982609fea7 Author: Gustavo A. R. Silva Date: Fri Mar 30 16:05:06 2018 -0500 Bluetooth: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Marcel Holtmann net/bluetooth/mgmt.c | 1 + net/bluetooth/rfcomm/sock.c | 1 + 2 files changed, 2 insertions(+) commit 96e58d368fa6c9419fa1fd724a50b7ed900a78d2 Author: Vic Wei Date: Wed Mar 28 08:28:47 2018 -0700 Bluetooth: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for BTUSB_QCA_ROME QCA Rome controllers can do both LE scan and BR/EDR inquiry at once. Signed-off-by: Vic Wei Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 1 + 1 file changed, 1 insertion(+) commit f9b95db0165ae81c99fe1893e586aab34751ee51 Author: Wei Yongjun Date: Wed Mar 28 13:22:14 2018 +0000 Bluetooth: btrsi: remove unused including Remove including that don't need it. Signed-off-by: Wei Yongjun Signed-off-by: Marcel Holtmann drivers/bluetooth/btrsi.c | 1 - 1 file changed, 1 deletion(-) commit 45a42bc9cc65b9ab33411bee454b55bd8a00c977 Author: Ian W MORRISON Date: Tue Mar 27 09:09:28 2018 +1100 Bluetooth: hci_bcm: Remove DMI quirk for the MINIX Z83-4 As Interrupt resource specified IRQs are now assumed to be always active-low the DMI quirk for the MINIX Z83-4 is no longer required. Signed-off-by: Ian W MORRISON Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 7 ------- 1 file changed, 7 deletions(-) commit 5366271c72689059203007143487c69dd498206c Merge: 16c3c91 e14549a Author: David S. Miller Date: Sun Apr 1 14:09:54 2018 -0400 Merge branch 'sh_eth-remove-SH_ETH_OFFSET_INVALID-abuses' Sergei Shtylyov says: ==================== sh_eth: remove SH_ETH_OFFSET_INVALID abuses Here's a set of 2 patches against DaveM's 'net-next.git' repo. They get rid of the abuse of SH_ETH_OFFSET_INVALID for the register existence checks, so that only its necessary uses would remain... ==================== Signed-off-by: David S. Miller commit e14549a50a6c5e3320bb941440b1c3ae4812ea69 Author: Sergei Shtylyov Date: Sun Apr 1 00:23:51 2018 +0300 sh_eth: kill useless check in __sh_eth_get_regs() Iff TSU registers exist on a given [G]Ether controller, they always include the CAM entry table registers (TSU_ADR{H|L}), thus the check for invalid TSU_ADRH0 offset in __sh_eth_get_regs() is useless... Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 6e80e55bd37a90b412f168b1667ffa7d2debd46b Author: Sergei Shtylyov Date: Sun Apr 1 00:22:08 2018 +0300 sh_eth: add sh_eth_cpu_data::no_xdfar flag The commit 6ded286555c2 ("sh_eth: Fix RX recovery on R-Car in case of RX ring underrun") added a check for an bad RDFAR offset in sh_eth_rx(), so that the code could work on the R-Car Ether controllers which don't have this register (and TDFAR), then the commit 3365711df02 ("sh_eth: WARN on access to a register not implemented in a particular chip") replaced offset 0 with 0xffff. Adding/checking the 'no_xdfar' bit field in the 'struct sh_eth_cpu_data' instead results in less object code... Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 5 +++-- drivers/net/ethernet/renesas/sh_eth.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) commit 16c3c91346961fdd733ad232311772795599be7f Merge: c072550 1f4c6eb Author: David S. Miller Date: Sun Apr 1 14:08:21 2018 -0400 Merge branch 'inet-factorize-sk_wmem_alloc-updates' Eric Dumazet says: ==================== inet: factorize sk_wmem_alloc updates While testing my inet defrag changes, I found that senders could spend ~20% of cpu cycles in skb_set_owner_w() updating sk->sk_wmem_alloc for every fragment they cook, competing with TX completion of prior skbs possibly happening on another cpus. One solution to this problem is to use alloc_skb() instead of sock_wmalloc() and manually perform a single sk_wmem_alloc change. This greatly increases speed for applications sending big UDP datagrams. ==================== Signed-off-by: David S. Miller commit 1f4c6eb24029689a40dceae561e31ff6926d7f0d Author: Eric Dumazet Date: Sat Mar 31 13:16:26 2018 -0700 ipv6: factorize sk_wmem_alloc updates done by __ip6_append_data() While testing my inet defrag changes, I found that the senders could spend ~20% of cpu cycles in skb_set_owner_w() updating sk->sk_wmem_alloc for every fragment they cook, competing with TX completion of prior skbs possibly happening on another cpus. The solution to this problem is to use alloc_skb() instead of sock_wmalloc() and manually perform a single sk_wmem_alloc change. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6_output.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 694aba690de062cf27b28a5e56e7a5a7185b0a1c Author: Eric Dumazet Date: Sat Mar 31 13:16:25 2018 -0700 ipv4: factorize sk_wmem_alloc updates done by __ip_append_data() While testing my inet defrag changes, I found that the senders could spend ~20% of cpu cycles in skb_set_owner_w() updating sk->sk_wmem_alloc for every fragment they cook. The solution to this problem is to use alloc_skb() instead of sock_wmalloc() and manually perform a single sk_wmem_alloc change. Similar change for IPv6 is provided in following patch. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ip_output.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit c07255020551cadae8bf903f2c5e1fcbad731bac Author: David S. Miller Date: Sun Apr 1 14:04:58 2018 -0400 Revert "net: usb: asix88179_178a: de-duplicate code" This reverts commit cf29bded91f9153208c4c2145d602cd82430ad1a. It causes regressions. Signed-off-by: David S. Miller drivers/net/usb/ax88179_178a.c | 117 ++++++++++++++++++++++++++++++----------- 1 file changed, 86 insertions(+), 31 deletions(-) commit ec1258903a13d0255695a07280ae5e32303aa6c5 Author: Alexey Kodanev Date: Fri Mar 30 20:34:33 2018 +0300 ip6_gre: remove redundant 'tunnel' setting in ip6erspan_tap_init() 'tunnel' was already set at the start of ip6erspan_tap_init(). Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support") Signed-off-by: Alexey Kodanev Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 1 - 1 file changed, 1 deletion(-) commit ce5a453c4421ccd68a98fd987b6878923c549be2 Author: Eric Dumazet Date: Tue Mar 27 14:21:14 2018 -0700 net/mlx4_en: CHECKSUM_COMPLETE support for fragments Refine the RX check summing handling to propagate the hardware provided checksum so that we do not have to compute it later in software. Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Cc: Tariq Toukan Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 2919ee2d41084aef216331d960b9e338ceff77a6 Merge: 06b19fe 59441fe Author: David S. Miller Date: Sun Apr 1 10:56:44 2018 -0400 Merge branch 'mlxsw-cleanups' Ido Schimmel says: ==================== mlxsw: Various cleanups The first nine patches from Jiri perform small and unrelated cleanups. The largest being the conversion of the KVD linear partitions from a list to an array, which simplifies the code. The last patch from Petr is a bug fix for a recent net-next commit that prevented the "kvd" resource from being marked as the parent of its various child resources (e.g., "/kvd/linear"). v2: Dropped devlink patch following David's comment. Will be sent separately. ==================== Signed-off-by: David S. Miller commit 59441fef2b10c651261be08aec558e90fbd594f8 Author: Petr Machata Date: Sun Apr 1 17:34:59 2018 +0300 mlxsw: spectrum: Don't use resource ID of 0 In commit 145307460ba9 ("devlink: Remove top_hierarchy arg to devlink_resource_register"), the "top_hierarchy" parameter to devlink_resource_register() was removed in favor of using the parameter "parent_resource_id" exclusively to determine who the parent is. The root node's resource ID for this purpose is DEVLINK_RESOURCE_ID_PARENT_TOP with the value 0. It is therefore problematic that the resource MLXSW_SP_RESOURCE_KVD has also ID of 0. Fix this by numbering driver-specific resources from 1. Fixes: 145307460ba9 ("devlink: Remove top_hierarchy arg to devlink_resource_register") Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88d2fbcda145f5b256a254635c7420a2a645eca0 Author: Jiri Pirko Date: Sun Apr 1 17:34:58 2018 +0300 mlxsw: spectrum: Pass mlxsw_core as arg of mlxsw_sp_kvdl_resources_register() Pass struct mlxsw_core instead of devlink since it is nicer within mlxsw code and we need both structs in mlxsw_sp_kvdl_resources_register() anyway. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit ad3f20b28602fd46b3a27b5a61be270a3794cc36 Author: Jiri Pirko Date: Sun Apr 1 17:34:57 2018 +0300 mlxsw: Move "resources_query_enable" out of mlxsw_config_profile As struct mlxsw_config_profile is mapped to the payload of the FW command of the same name, resources_query_enable flag does not belong there. Move it to struct mlxsw_driver. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.c | 5 +++-- drivers/net/ethernet/mellanox/mlxsw/core.h | 2 +- drivers/net/ethernet/mellanox/mlxsw/pci.c | 9 +++------ drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/switchib.c | 1 - drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 1 - 6 files changed, 8 insertions(+), 12 deletions(-) commit 110d2d2141d9671d4b4467ead06d1dc7288d0e9a Author: Jiri Pirko Date: Sun Apr 1 17:34:56 2018 +0300 mlxsw: Move "used_kvd_sizes" check to mlxsw_pci_config_profile The check should be done directly in mlxsw_pci_config_profile, as for other profile items. Also, be consistent in naming with the rest and rename to "used_kvd_sizes". Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.h | 3 +-- drivers/net/ethernet/mellanox/mlxsw/pci.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 5 ++--- 3 files changed, 4 insertions(+), 6 deletions(-) commit 64f4588821776ce08c1ff0271630fcaada138705 Author: Jiri Pirko Date: Sun Apr 1 17:34:55 2018 +0300 mlxsw: core: Fix arg name of MLXSW_CORE_RES_VALID and MLXSW_CORE_RES_GET First arg of these helpers should be "mlxsw_core". Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 72779c97cf8f8f446521b48b12f305b6cf952bec Author: Jiri Pirko Date: Sun Apr 1 17:34:54 2018 +0300 mlxsw: remove kvd_hash_granularity from config profile struct This should not be part of the struct, as the struct fields are tightly coupled with the FW command payload of the same name. Just use the "granularity" define directly, as in other places. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.h | 1 - drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) commit 4f8768befdea9d8004361f180ca559f22ce5346d Author: Jiri Pirko Date: Sun Apr 1 17:34:53 2018 +0300 mlxsw: spectrum: Change KVD linear parts from list to array The parts info is array. The parts copy this info array, yet they are a list. So make the indexing according to the id and change the list of parts into array of parts. This helps to eliminate lookups and constructs like mlxsw_sp_kvdl_part_update() (took me some non-trivial time to figure out what is going on there). Alongside with that, introduce a helper macro to define the parts infos. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 235 ++++++++------------- 1 file changed, 92 insertions(+), 143 deletions(-) commit f9b9120119ca70ccdb1c900ac061425e4784c4de Author: Jiri Pirko Date: Sun Apr 1 17:34:52 2018 +0300 mlxsw: Constify devlink_resource_ops devlink_resource_ops should be const as the arg of register function is also const. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit c8276dd250e9a9833f8ff1da1cd53e6f7e6825e2 Author: Jiri Pirko Date: Sun Apr 1 17:34:51 2018 +0300 mlxsw: spectrum_kvdl: Fix handling of resource_size_param Current code uses global variables, adjusts them and passes pointer down to devlink. With every other mlxsw_core instance, the previously passed pointer values are rewritten. Fix this by de-globalize the variables. Fixes: 7f47b19bd744 ("mlxsw: spectrum_kvdl: Add support for per part occupancy") Signed-off-by: Jiri Pirko Acked-by: Arkadi Sharshevsky Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 47 +++++++--------------- 1 file changed, 14 insertions(+), 33 deletions(-) commit 9270aa0ddcf33527977bf4562ea3434c79af0d09 Author: Jiri Pirko Date: Sun Apr 1 17:34:50 2018 +0300 mlxsw: spectrum_acl: Fix flex actions header ifndef define construct Fix copy&paste error in flex actions header ifndef define construct Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_flex_actions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f6f1eced8c325d5ef64451556947f606f9fac7a Author: Marcel Holtmann Date: Sat Mar 24 10:19:54 2018 +0100 Bluetooth: Remove unused btuart_cs driver With patch 279c936153199 the btuart_cs driver has been deprecated in favor of serial_cs + hci_uart combination. static struct pcmcia_device_id btuart_ids[] = { /* don't use this driver. Use serial_cs + hci_uart instead */ PCMCIA_DEVICE_NULL }; Intead of keeping it around, just remove it since it is not even assigned to any PCMCIA identifiers anymore. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg drivers/bluetooth/Kconfig | 16 - drivers/bluetooth/Makefile | 1 - drivers/bluetooth/btuart_cs.c | 675 ------------------------------------------ 3 files changed, 692 deletions(-) commit 07eb96a5a7b083c988a2c7b0663e958e392f18c7 Author: Marcel Holtmann Date: Sat Mar 24 10:19:53 2018 +0100 Bluetooth: bpa10x: Use separate h4_recv_buf helper When adding the alignment and padding support for H:4 packet processing for the Nokia driver, it broke the h4_recv_buf usage within bpa10x driver. To fix this use a separate helper function and placing it into a dedicated h4_recv.h header file. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg drivers/bluetooth/Kconfig | 3 +- drivers/bluetooth/bpa10x.c | 2 +- drivers/bluetooth/h4_recv.h | 160 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 162 insertions(+), 3 deletions(-) commit f9d7c8fd2630d1d15dbc23e6ff6f9f0b54194ee4 Author: Marcel Holtmann Date: Sat Mar 24 10:19:52 2018 +0100 Bluetooth: hci_ll: Convert to use h4_recv_buf helper The HCILL or eHCILL protocol from TI is actually an H:4 protocol with a few extra events and thus can also use the h4_recv_buf helper. Instead of open coding the same funtionality add the extra events to the packet description table and use h4_recv_buf. Signed-off-by: Marcel Holtmann Tested-by: Tony Lindgren Signed-off-by: Johan Hedberg drivers/bluetooth/Kconfig | 1 + drivers/bluetooth/hci_ll.c | 214 +++++++++++++++------------------------------ 2 files changed, 70 insertions(+), 145 deletions(-) commit 6112150261247d9a7d85dda476143985f44f8859 Author: Hans de Goede Date: Wed Mar 21 13:53:18 2018 +0100 Bluetooth: hci_bcm: Add ACPI HIDs found in Windows .inf files and DSTDs Now that we need just an ACPI HID in the table, and the driver auto- configures itself otherwise, we can easily add a bunch of known ACPI HIDs. This avoids having to add these 1 by 1 as devices with one are encountered by users. This commit may seem as if it simply adds all IDs between BCM2E00-BCM2EAC, but that is not true, all these IDs were found in actual .inf files and the range is not entirely continuous, the following IDs are not added: BCM2E6A, BCM2E6C, BCM2E8F and BCM2E91 because I did not see these in any .inf files. As for the large amount of IDs this seems to be caused by Broadcom using a separate ID for every bluetooth module using their chips. E.g. BCM2EA6 seems to be specifically for the Raspberry Pi 3. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 141 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) commit a4de1567be322f4fca75e47bb7bd4cd8e3d79657 Author: Hans de Goede Date: Fri Mar 16 21:28:11 2018 +0100 Bluetooth: hci_bcm: Do not tie GPIO pin order to a specific ACPI HID Since I've been doing a lot of work on Linux Bay Trail / Cherry Trail support, I've gathered a collection of ACPI DSDTs from about 50 such machines. Looking at these DSTDs many have an ACPI device entry describing a bcm bluetooth device (often disabled in the DSDT), quite a few of these ACPI device entries have a resource-table where the order does not match with the order currently associated with the HID of that entry in the bcm_acpi_match table. Looking at the Windows .inf files, there is nothing indicating a specific order there, so I believe that there is no 1:1 mapping between the ACPI HID and the order in which the resources are listed. Therefor this commit replaces the hardcoded mapping based on ACPI HID, with code which actually checks in which order the resources are listed and bases the gpio-mapping on that. This should ensure that we always pick the right mapping and this will make adding new ACPI HIDs to the driver easier. This has been tested on the following devices: -Asus T100CHI BCM2E39 / brcmfmac43241b4-sdio / BCM4324B3-37.4M.hcd -Asus T100TA BCM2E39 / brcmfmac43241b4-sdio / BCM4324B3-37.4M.hcd -Asus T200TA BCM2E65 / brcmfmac43340-sdio / BCM43341B0-37.4M.hcd -Jumper ezPad mini 3 BCM2E74 / brcmfmac43430a0-sdio / BCM4343A0-26M.hcd -Acer Iconia Tab8 w1-8 BCM2E83 / brcmfmac4330-sdio / BCM4330B1-26M.hcd -Chuwi Vi8 plus(CWI519) BCM2EAA / brcmfmac43430-sdio / BCM43430A1-26M.hcd Which together cover all 3 combinations of using an Interrupt resource / GpioInt resource as first resource / GpioInt resource as last resource. Tested-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 91 +++++++++++++++++++++++++++------------------ 1 file changed, 55 insertions(+), 36 deletions(-) commit 9644e6b98cda0485d12b6b1cf72658855e57c878 Author: Hans de Goede Date: Fri Mar 16 21:28:10 2018 +0100 Bluetooth: hci_bcm: Remove duplication in gpio-mappings declaration We declare the same set of const acpi_gpio_params twice with different names, besides the needless duplication this naming leads to a sortof double indirection which also makes it harder to see how the mapping is actually setup. This commit renames the first set to have generic names, which better describe the contents of the mapping and drops the second set. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 4063cafa3b24ff04635bdedc97cd3e4320415065 Author: Hans de Goede Date: Fri Mar 16 21:28:09 2018 +0100 Bluetooth: hci_bcm: Add 6 new ACPI HIDs Add 6 new ACPI HIDs to enable bluetooth on devices using these HIDs, I've tested the following HIDs / devices: BCM2E74: Jumper ezPad mini 3 BCM2E83: Acer Iconia Tab8 w1-810 BCM2E90: Meegopad T08 BCM2EAA: Chuwi Vi8 plus (CWI519) The reporter of Red Hat bugzilla 1554835 has tested: BCM2E84: Lenovo Yoga2 The reporter of kernel bugzilla 274481 has tested: BCM2E38: Toshiba Encore Note the Lenovo Yoga2 and Toshiba Encore also needs the earlier patch to treat all Interrupt ACPI resources as active low. Cc: stable@vger.kernel.org Buglink: https://bugzilla.kernel.org/attachment.cgi?id=274481 Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1554835 Reported-and-tested-by: Robert R. Howell Reported-and-tested-by: Christian Herzog Tested-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit bb5208b314c5127b716b2ee4f55803a8bb73b750 Author: Hans de Goede Date: Fri Mar 16 21:28:08 2018 +0100 Bluetooth: hci_bcm: Treat Interrupt ACPI resources as always being active-low Older devices with a serdev attached bcm bt hci, use an Interrupt ACPI resource to describe the IRQ (rather then a GpioInt resource). These device seem to all claim the IRQ is active-high and seem to all need a DMI quirk to treat it as active-low. Instead simply always assume that Interrupt resource specified IRQs are always active-low. This fixes the bt device not being able to wake the host from runtime- suspend on the: Asus T100TAM, Asus T200TA, Lenovo Yoga2 and the Toshiba Encore, without the need to add 4 new DMI quirks for these models. This also allows us to remove 2 DMI quirks for the Asus T100TA and Asus T100CHI series. Likely the 2 remaining quirks can also be removed but I could not find a DSDT of these devices to verify this. Cc: stable@vger.kernel.org Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=198953 Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1554835 Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) commit e09070c51b280567695022237e57c428e548b355 Author: Hans de Goede Date: Fri Mar 16 21:28:07 2018 +0100 Bluetooth: hci_bcm: Add irq_polarity module option Add irq_polarity module option for easier troubleshooting of irq-polarity issues. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit a41e0796396eeceff673af4a38feaee149c6ff86 Author: Vicente Bergas Date: Tue Mar 20 19:41:10 2018 +0100 Bluetooth: btusb: Add USB ID 7392:a611 for Edimax EW-7611ULB This WiFi/Bluetooth USB dongle uses a Realtek chipset, so, use btrtl for it. Product information: https://wikidevi.com/wiki/Edimax_EW-7611ULB From /sys/kernel/debug/usb/devices T: Bus=02 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=7392 ProdID=a611 Rev= 2.00 S: Manufacturer=Realtek S: Product=Edimax Wi-Fi N150 Bluetooth4.0 USB Adapter S: SerialNumber=00e04c000001 C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=01 I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms I:* If#= 2 Alt= 0 #EPs= 6 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8723bu E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=500us E: Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=09(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Tested-by: Vicente Bergas Signed-off-by: Vicente Bergas Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 3 +++ 1 file changed, 3 insertions(+) commit 9bef22fb00cbfc6400c52c265c6c5ebcb6bfc1d1 Author: Marcel Holtmann Date: Tue Mar 20 09:31:04 2018 +0100 Bluetooth: hci_ll: Use skb_put_u8 instead of struct hcill_cmd The struct hcill_cmd to create an skb with a single u8 is pointless. So just use skb_put_u8 instead. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg drivers/bluetooth/hci_ll.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 9376e4a5a318e1dbf1c53a31cfbe919e0ba926b0 Author: Markus Elfring Date: Mon Mar 12 11:15:59 2018 +0100 Bluetooth: btmrvl: Delete an unnecessary variable initialisation in btmrvl_sdio_card_to_host() The variable "payload" will eventually be set to an appropriate pointer a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5c2f4c1c5292362c8f78e63f82c527cea955bbd Author: Markus Elfring Date: Mon Mar 12 10:20:04 2018 +0100 Bluetooth: btmrvl: Delete an unnecessary variable initialisation in btmrvl_sdio_register_dev() The local variable "ret" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3863f1d7a579a8d8d7741a777ef863674a4d0c8 Author: Marcel Holtmann Date: Wed Mar 7 22:39:03 2018 +0100 Bluetooth: hci_bcm: Use default baud rate if missing shutdown GPIO In case the shutdown GPIO is not wired up, it is impossible to reset the Bluetooth controller to its original state. This include the initial default baud rate which leads to issues when reloading the module or when something unexpected happens. To avoid any kind of runtime deadlocks, stick with the initial default baud rate. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg drivers/bluetooth/hci_bcm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit fb2d466be9b336e9c801978e6a75d06059ac124a Author: Loic Poulain Date: Mon Mar 5 19:02:35 2018 +0100 Bluetooth: hci_bcm: use gpiod cansleep version Some GPIO controller drivers request sleepable context and so can't be accessed from IRQ context. Using gpiod_set/get_value accessors with such controller leads to a kernel warning since they are reserved for atomic context (according to the documentation). Use the postfixed _cansleep version instead, indicating that context is safe for sleeping if necessary. Note that this is the case here since we never toggle the gpio neither from IRQ nor from a spinlocked section. Signed-off-by: Loic Poulain Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8c59c264e5e17670c0ad2063fa40e3091b549151 Author: Jaganath Kanakkassery Date: Mon Feb 26 12:11:07 2018 +0530 Bluetooth: Fix data type of appearence It should be __le16 instead of __u16 since its part of mgmt API. Signed-off-by: Jaganath Kanakkassery Signed-off-by: Marcel Holtmann include/net/bluetooth/mgmt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19e68b2aec3c0a2bd770d3c358a296a1849f308a Author: Mathieu Malaterre Date: Thu Mar 22 22:03:18 2018 +0100 powerpc/mm/radix: Fix always false comparison against MMU_NO_CONTEXT In commit 9690c1574268 ("powerpc/mm/radix: Fix always false comparison against MMU_NO_CONTEXT") an issue was discovered where `mm->context.id` was being truncated to an `unsigned int`, while the PID is actually an `unsigned long`. Update the earlier patch by fixing one remaining occurrence. Discovered during a compilation with W=1: arch/powerpc/mm/tlb-radix.c:702:19: error: comparison is always false due to limited range of data type [-Werror=type-limits] Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e524e761fc2157f1037e0f5d616cd39e468d89c Author: Matt Evans Date: Mon Mar 26 17:55:21 2018 +0100 powerpc: Clear branch trap (MSR.BE) before delivering SIGTRAP When using SIG_DBG_BRANCH_TRACING, MSR.BE is left enabled in the user context when single_step_exception() prepares the SIGTRAP delivery. The resulting branch-trap-within-the-SIGTRAP-handler isn't healthy. Commit 2538c2d08f46141550a1e68819efa8fe31c6e3dc broke this, by replacing an MSR mask operation of ~(MSR_SE | MSR_BE) with a call to clear_single_step() which only clears MSR_SE. This patch adds a new helper, clear_br_trace(), which clears the debug trap before invoking the signal handler. This helper is a NOP for BookE as SIG_DBG_BRANCH_TRACING isn't supported on BookE. Signed-off-by: Matt Evans Signed-off-by: Michael Ellerman arch/powerpc/kernel/traps.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4b7e5532d2113d002aa54bfe581f35b3f1f72306 Author: Nicholas Piggin Date: Wed Feb 21 05:08:32 2018 +1000 powerpc/64s: Add POWER9 CPU type selection Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/Makefile | 3 ++- arch/powerpc/platforms/Kconfig.cputype | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit db5ae1c155af7a76c9f538bf134066303089679d Author: Nicholas Piggin Date: Wed Feb 21 05:08:31 2018 +1000 powerpc/64s: Refine feature sets for little endian builds This reduces vmlinux text size by 1kB and data by 1.5kB with a small build! Signed-off-by: Nicholas Piggin [mpe: Add the recently added CPU_FTRS_POWER9_DD2_2 to the little endian possible mask as noticed by Nick.] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit a73657ea19aeb92f98438263d42f90188f115d58 Author: Nicholas Piggin Date: Wed Feb 21 05:08:30 2018 +1000 powerpc/64: Add GENERIC_CPU support for little endian Add GENERIC_CPU support for little-endian rather than using POWER8 specific selection for POWER9 and above. Restrict GENERIC_CPU to POWER8 and above on little endian. Signed-off-by: Nicholas Piggin [mpe: Duplicate GENERIC_CPU to avoid a kbuild warning about the prompt being redefined. Spell out that GENERIC means >= POWER4 for BE.] Signed-off-by: Michael Ellerman arch/powerpc/Makefile | 5 +++++ arch/powerpc/platforms/Kconfig.cputype | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) commit 06b19fe9a6df7aaa423cd8404ebe5ac9ec4b2960 Merge: d4069fe bd7f485 Author: David S. Miller Date: Sat Mar 31 23:37:33 2018 -0400 Merge branch 'chelsio-inline-tls' Atul Gupta says: ==================== Chelsio Inline TLS Series for Chelsio Inline TLS driver (chtls) Use tls ULP infrastructure to register chtls as Inline TLS driver. Chtls use TCP Sockets to Tx/Rx TLS records. TCP sk_proto APIs are enhanced to offload TLS record. T6 adapter provides the following features: -TLS record offload, TLS header, encrypt, digest and transmit -TLS record receive and decrypt -TLS keys store -TCP/IP engine -TLS engine -GCM crypto engine [support CBC also] TLS provides security at the transport layer. It uses TCP to provide reliable end-to-end transport of application data. It relies on TCP for any retransmission. TLS session comprises of three parts: a. TCP/IP connection b. TLS handshake c. Record layer processing TLS handshake state machine is executed in host (refer standard implementation eg. OpenSSL). Setsockopt [SOL_TCP, TCP_ULP] initialize TCP proto-ops for Chelsio inline tls support. setsockopt(sock, SOL_TCP, TCP_ULP, "tls", sizeof("tls")); Tx and Rx Keys are decided during handshake and programmed on the chip after CCS is exchanged. struct tls12_crypto_info_aes_gcm_128 crypto_info setsockopt(sock, SOL_TLS, TLS_TX, &crypto_info, sizeof(crypto_info)) Finish is the first encrypted/decrypted message tx/rx inline. On the Tx path TLS engine receive plain text from openssl, insert IV, fetches the tx key, create cipher text records and generate MAC. TLS header is added to cipher text and forward to TCP/IP engine for transport layer processing and transmission on wire. TX PATH: Apps--openssl--chtls---TLS engine---encrypt/auth---TCP/IP engine---wire On the Rx side, data received is PDU aligned at record boundaries. TLS processes only the complete record. If rx key is programmed on CCS receive, data is decrypted and plain text is posted to host. RX PATH: Wire--cipher-text--TCP/IP engine [PDU align]---TLS engine--- decrypt/auth---plain-text--chtls--openssl--application v15: indent fix in mark_urg -removed unwanted checks in sendmsg, sendpage, recvmsg, close, disconnect,shutdown, destroy sock [Sabrina] - removed unused chtls_free_kmap [chtls.h] - rebase to top of net-next v14: -Reverse christmas tree style for variable declarations for various functions in chtls_hw.c, chtls_io.c [Stefano Brivio] - replaced break with return in tcp_state_to_flowc_state [Stefano Brivio] - renamed tlstx_seq_number to tlstx_incr_seqnum [Stefano Brivio] - use bool for corked, should_push and send_should_push [Stefano Brivio] - removed "Reviewed-by" tag for Stefano, Sabrina, Dave Watson v13: handle clean ctx free for HW_RECORD in tls_sk_proto_close -removed SOCK_INLINE [chtls.h], using csk_conn_inline instead in send_abort_rpl,chtls_send_abort_rpl,chtls_sendmsg,chtls_sendpage -removed sk_no_receive [chtls_io.c] replaced with sk_shutdown & RCV_SHUTDOWN in chtls_pt_recvmsg, peekmsg and chtls_recvmsg -cleaned chtls_expansion_size [Stefano Brivio] - u8 conf:3 in tls_sw_context to add TLS_HW_RECORD -removed is_tls_skb, using tls_skb_inline [Stefano Brivio] -reverse christmas tree formatting in chtls_io.c, chtls_cm.c [Stefano Brivio] -fixed build warning reported by kbuild robot -retained ctx conf enum in chtls_main vs earlier versions, tls_prots not used in chtls. -cleanup [removed syn_sent, base_prot, added synq] [Michael Werner] - passing struct fw_wr_hdr * to ofldtxq_stop [Casey] - rebased on top of the current net-next v12: patch against net-next -fixed build error [reported by Julia] -replace set_queue with skb_set_queue_mapping [Sabrina] -copyright year correction [chtls] v11: formatting and cleanup, few function rename and error handling [Stefano Brivio] - ctx freed later for TLS_HW_RECORD - split tx and rx in different patch v10: fixed following based on the review comments of Sabrina Dubroca -docs header added for struct tls_device [tls.h] -changed TLS_FULL_HW to TLS_HW_RECORD -similary using tls-hw-record instead of tls-inline for ethtool feature config -added more description to patch sets -replaced kmalloc/vmalloc/kfree with kvzalloc/kvfree -reordered the patch sequence -formatted entire patch for func return values v9: corrected __u8 and similar usage -create_ctx to alloc tls_context -tls_hw_prot before sk !establish check v8: tls_main.c cleanup comment [Dave Watson] v7: func name change, use sk->sk_prot where required v6: modify prot only for FULL_HW -corrected commit message for patch 11 v5: set TLS_FULL_HW for registered inline tls drivers -set TLS_FULL_HW prot for offload connection else move to TLS_SW_TX -Case handled for interface with same IP [Dave Miller] -Removed Specific IP and INADDR_ANY handling [v4] v4: removed chtls ULP type, retained tls ULP -registered chtls with net tls -defined struct tls_device to register the Inline drivers -ethtool interface tls-inline to enable Inline TLS for interface -prot update to support inline TLS v3: fixed the kbuild test issues -made few funtions static -initialized few variables v2: fixed the following based on the review comments of Stephan Mueller, Stefano Brivio and Hannes Frederic -Added more details in cover letter -Fixed indentation and formating issues -Using aes instead of aes-generic -memset key info after programing the key on chip -reordered the patch sequence ==================== Signed-off-by: David S. Miller commit bd7f48576660022b0779c5c7bf384ec1e8ca83c8 Author: Atul Gupta Date: Sat Mar 31 21:42:03 2018 +0530 crypto: chtls - Makefile Kconfig Entry for Inline TLS as another driver dependent on cxgb4 and chcr Signed-off-by: Atul Gupta Signed-off-by: David S. Miller drivers/crypto/chelsio/Kconfig | 11 +++++++++++ drivers/crypto/chelsio/Makefile | 1 + drivers/crypto/chelsio/chtls/Makefile | 4 ++++ 3 files changed, 16 insertions(+) commit d25f2f71f653b78e8bd055cfe8fd70ef8f514f2b Author: Atul Gupta Date: Sat Mar 31 21:42:02 2018 +0530 crypto: chtls - Program the TLS session Key Initialize the space reserved for storing the TLS keys, get and free the location where key is stored for the TLS connection. Program the Tx and Rx key as received from user in struct tls12_crypto_info_aes_gcm_128 and understood by hardware. added socket option TLS_RX Signed-off-by: Atul Gupta Signed-off-by: David S. Miller drivers/crypto/chelsio/chtls/chtls_hw.c | 412 ++++++++++++++++++++++++++++++++ 1 file changed, 412 insertions(+) commit b647993fca1460937bd05f07c87a8234054a68f7 Author: Atul Gupta Date: Sat Mar 31 21:42:01 2018 +0530 crypto: chtls - Inline TLS record Rx handler for record receive. plain text copied to user buffer Signed-off-by: Atul Gupta Signed-off-by: Michael Werner Signed-off-by: David S. Miller drivers/crypto/chelsio/chtls/chtls_io.c | 602 +++++++++++++++++++++++++++++- drivers/crypto/chelsio/chtls/chtls_main.c | 1 + 2 files changed, 602 insertions(+), 1 deletion(-) commit 36bedb3f2e5b81832b5895363ed3fedb9ff1e8d0 Author: Atul Gupta Date: Sat Mar 31 21:42:00 2018 +0530 crypto: chtls - Inline TLS record Tx TLS handler for record transmit. Create Inline TLS work request and post to FW. Create Inline TLS record CPLs for hardware Signed-off-by: Atul Gupta Signed-off-by: Michael Werner Signed-off-by: David S. Miller drivers/crypto/chelsio/chtls/chtls_io.c | 1222 +++++++++++++++++++++++++++++ drivers/crypto/chelsio/chtls/chtls_main.c | 2 + 2 files changed, 1224 insertions(+) commit cc35c88ae4db219611e204375d6a4248bc0e84d6 Author: Atul Gupta Date: Sat Mar 31 21:41:59 2018 +0530 crypto : chtls - CPL handler definition Exchange messages with hardware to program the TLS session CPL handlers for messages received from chip. Signed-off-by: Atul Gupta Signed-off-by: Michael Werner Signed-off-by: David S. Miller drivers/crypto/chelsio/chtls/chtls_cm.c | 2126 +++++++++++++++++++++++++++++++ net/ipv4/tcp_minisocks.c | 1 + 2 files changed, 2127 insertions(+) commit a089439478734a6a0aa2eabbc03113e0c34db282 Author: Atul Gupta Date: Sat Mar 31 21:41:58 2018 +0530 crypto: chtls - Register chtls with net tls Register chtls as Inline TLS driver, chtls is ULD to cxgb4. Setsockopt to program (tx/rx) keys on chip. Support AES GCM of key size 128. Support both Inline Rx and Tx. Signed-off-by: Atul Gupta Reviewed-by: Casey Leedom Reviewed-by: Michael Werner Signed-off-by: David S. Miller drivers/crypto/chelsio/chtls/chtls_main.c | 575 ++++++++++++++++++++++++++++++ 1 file changed, 575 insertions(+) commit a6779341a173aa8cedb5985e0c21c5d7c94c270a Author: Atul Gupta Date: Sat Mar 31 21:41:57 2018 +0530 crypto: chtls - structure and macro for Inline TLS Define Inline TLS state, connection management info. Supporting macros definition. Signed-off-by: Atul Gupta Reviewed-by: Michael Werner Signed-off-by: David S. Miller drivers/crypto/chelsio/chtls/chtls.h | 482 ++++++++++++++++++++++++++++++++ drivers/crypto/chelsio/chtls/chtls_cm.h | 203 ++++++++++++++ 2 files changed, 685 insertions(+) commit 639d28a1a40785ba36eec57b4d5d6b21be67196f Author: Atul Gupta Date: Sat Mar 31 21:41:56 2018 +0530 crypto: chcr - Inline TLS Key Macros Define macro for programming the TLS Key context Signed-off-by: Atul Gupta Signed-off-by: David S. Miller drivers/crypto/chelsio/chcr_algo.h | 42 +++++++++++++++++++++++++++++ drivers/crypto/chelsio/chcr_core.h | 55 +++++++++++++++++++++++++++++++++++++- 2 files changed, 96 insertions(+), 1 deletion(-) commit e383f2483425c267654d7ba184843f79d39feb4a Author: Atul Gupta Date: Sat Mar 31 21:41:55 2018 +0530 cxgb4: LLD driver changes to support TLS Read the Inline TLS capability from firmware. Determine the area reserved for storing the keys Dump the Inline TLS tx and rx records count. Signed-off-by: Atul Gupta Reviewed-by: Michael Werner Reviewed-by: Casey Leedom Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 32 +++++-- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 7 ++ drivers/net/ethernet/chelsio/cxgb4/sge.c | 107 ++++++++++++++++++++++-- 3 files changed, 131 insertions(+), 15 deletions(-) commit e108708968e33da102dd38bd2dce37904842a319 Author: Atul Gupta Date: Sat Mar 31 21:41:54 2018 +0530 cxgb4: Inline TLS FW Interface Key area size in hw-config file. CPL struct for TLS request and response. Work request for Inline TLS. Signed-off-by: Atul Gupta Reviewed-by: Casey Leedom Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 122 ++++++++++++++++++- drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 2 + drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 165 +++++++++++++++++++++++++- 3 files changed, 283 insertions(+), 6 deletions(-) commit e0be6bea2583486ec4ed98e36437d82ea8190811 Author: Atul Gupta Date: Sat Mar 31 21:41:53 2018 +0530 ethtool: enable Inline TLS in HW Ethtool option enables TLS record offload on HW, user configures the feature for netdev capable of Inline TLS. This allows user to define custom sk_prot for Inline TLS sock Signed-off-by: Atul Gupta Signed-off-by: David S. Miller include/linux/netdev_features.h | 2 ++ net/core/ethtool.c | 1 + 2 files changed, 3 insertions(+) commit dd0bed1665d6ca17efd747a90a0bb804b4bf2005 Author: Atul Gupta Date: Sat Mar 31 21:41:52 2018 +0530 tls: support for Inline tls record Facility to register Inline TLS drivers to net/tls. Setup TLS_HW_RECORD prot to listen on offload device. Cases handled - Inline TLS device exists, setup prot for TLS_HW_RECORD - Atleast one Inline TLS exists, sets TLS_HW_RECORD. - If non-inline device establish connection, move to TLS_SW_TX Signed-off-by: Atul Gupta Reviewed-by: Steve Wise Signed-off-by: David S. Miller include/net/tls.h | 32 ++++++++++++++- net/tls/tls_main.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 142 insertions(+), 4 deletions(-) commit d4069fe6fc91d496e4d1fe38b1a8b71aeb181c50 Merge: 70ae722 7828f20 Author: David S. Miller Date: Sat Mar 31 23:33:04 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2018-03-31 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Add raw BPF tracepoint API in order to have a BPF program type that can access kernel internal arguments of the tracepoints in their raw form similar to kprobes based BPF programs. This infrastructure also adds a new BPF_RAW_TRACEPOINT_OPEN command to BPF syscall which returns an anon-inode backed fd for the tracepoint object that allows for automatic detach of the BPF program resp. unregistering of the tracepoint probe on fd release, from Alexei. 2) Add new BPF cgroup hooks at bind() and connect() entry in order to allow BPF programs to reject, inspect or modify user space passed struct sockaddr, and as well a hook at post bind time once the port has been allocated. They are used in FB's container management engine for implementing policy, replacing fragile LD_PRELOAD wrapper intercepting bind() and connect() calls that only works in limited scenarios like glibc based apps but not for other runtimes in containerized applications, from Andrey. 3) BPF_F_INGRESS flag support has been added to sockmap programs for their redirect helper call bringing it in line with cls_bpf based programs. Support is added for both variants of sockmap programs, meaning for tx ULP hooks as well as recv skb hooks, from John. 4) Various improvements on BPF side for the nfp driver, besides others this work adds BPF map update and delete helper call support from the datapath, JITing of 32 and 64 bit XADD instructions as well as offload support of bpf_get_prandom_u32() call. Initial implementation of nfp packet cache has been tackled that optimizes memory access (see merge commit for further details), from Jakub and Jiong. 5) Removal of struct bpf_verifier_env argument from the print_bpf_insn() API has been done in order to prepare to use print_bpf_insn() soon out of perf tool directly. This makes the print_bpf_insn() API more generic and pushes the env into private data. bpftool is adjusted as well with the print_bpf_insn() argument removal, from Jiri. 6) Couple of cleanups and prep work for the upcoming BTF (BPF Type Format). The latter will reuse the current BPF verifier log as well, thus bpf_verifier_log() is further generalized, from Martin. 7) For bpf_getsockopt() and bpf_setsockopt() helpers, IPv4 IP_TOS read and write support has been added in similar fashion to existing IPv6 IPV6_TCLASS socket option we already have, from Nikita. 8) Fixes in recent sockmap scatterlist API usage, which did not use sg_init_table() for initialization thus triggering a BUG_ON() in scatterlist API when CONFIG_DEBUG_SG was enabled. This adds and uses a small helper sg_init_marker() to properly handle the affected cases, from Prashant. 9) Let the BPF core follow IDR code convention and therefore use the idr_preload() and idr_preload_end() helpers, which would also help idr_alloc_cyclic() under GFP_ATOMIC to better succeed under memory pressure, from Shaohua. 10) Last but not least, a spelling fix in an error message for the BPF cookie UID helper under BPF sample code, from Colin. ==================== Signed-off-by: David S. Miller commit 70ae7222c61d4f19c844c8fe75f053f8976b9552 Merge: 5749d6a f2d1c72 Author: David S. Miller Date: Sat Mar 31 23:25:40 2018 -0400 Merge branch 'inet-frags-bring-rhashtables-to-IP-defrag' Eric Dumazet says: ==================== inet: frags: bring rhashtables to IP defrag IP defrag processing is one of the remaining problematic layer in linux. It uses static hash tables of 1024 buckets, and up to 128 items per bucket. A work queue is supposed to garbage collect items when host is under memory pressure, and doing a hash rebuild, changing seed used in hash computations. This work queue blocks softirqs for up to 25 ms when doing a hash rebuild, occurring every 5 seconds if host is under fire. Then there is the problem of sharing this hash table for all netns. It is time to switch to rhashtables, and allocate one of them per netns to speedup netns dismantle, since this is a critical metric these days. Lookup is now using RCU, and 64bit hosts can now provision whatever amount of memory needed to handle the expected workloads. v2: Addressed Herbert and Kirill feedbacks (Use rhashtable_free_and_destroy(), and split the big patch into small units) v3: Removed the extra add_frag_mem_limit(...) from inet_frag_create() Removed the refcount_inc_not_zero() call from inet_frags_free_cb(), as we can exploit del_timer() return value. v4: kbuild robot feedback about one missing static (squashed) Additional patches : inet: frags: do not clone skb in ip_expire() ipv6: frags: rewrite ip6_expire_frag_queue() rhashtable: reorganize struct rhashtable layout inet: frags: reorganize struct netns_frags inet: frags: get rid of ipfrag_skb_cb/FRAG_CB ipv6: frags: get rid of ip6frag_skb_cb/FRAG6_CB inet: frags: get rid of nf_ct_frag6_skb_cb/NFCT_FRAG6_CB ==================== Signed-off-by: David S. Miller commit f2d1c724fca176ddbd32a9397df49221afbcb227 Author: Eric Dumazet Date: Sat Mar 31 12:59:00 2018 -0700 inet: frags: get rid of nf_ct_frag6_skb_cb/NFCT_FRAG6_CB nf_ct_frag6_queue() uses skb->cb[] to store the fragment offset, meaning that we could use two cache lines per skb when finding the insertion point, if for some reason inet6_skb_parm size is increased in the future. By using skb->ip_defrag_offset instead of skb->cb[] we pack all the fields in a single cache line, matching what we did for IPv4. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/netfilter/nf_conntrack_reasm.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) commit 219badfaade986a2c3d99abd4eb6d83f4f9ed2fb Author: Eric Dumazet Date: Sat Mar 31 12:58:59 2018 -0700 ipv6: frags: get rid of ip6frag_skb_cb/FRAG6_CB ip6_frag_queue uses skb->cb[] to store the fragment offset, meaning that we could use two cache lines per skb when finding the insertion point, if for some reason inet6_skb_parm size is increased in the future. By using skb->ip_defrag_offset instead of skb->cb[], we pack all the fields in a single cache line, matching what we did for IPv4. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/reassembly.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) commit bf66337140c64c27fa37222b7abca7e49d63fb57 Author: Eric Dumazet Date: Sat Mar 31 12:58:58 2018 -0700 inet: frags: get rid of ipfrag_skb_cb/FRAG_CB ip_defrag uses skb->cb[] to store the fragment offset, and unfortunately this integer is currently in a different cache line than skb->next, meaning that we use two cache lines per skb when finding the insertion point. By aliasing skb->ip_defrag_offset and skb->dev, we pack all the fields in a single cache line and save precious memory bandwidth. Note that after the fast path added by Changli Gao in commit d6bebca92c66 ("fragment: add fast path for in-order fragments") this change wont help the fast path, since we still need to access prev->len (2nd cache line), but will show great benefits when slow path is entered, since we perform a linear scan of a potentially long list. Also, note that this potential long list is an attack vector, we might consider also using an rb-tree there eventually. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/skbuff.h | 1 + net/ipv4/ip_fragment.c | 35 ++++++++++++++--------------------- 2 files changed, 15 insertions(+), 21 deletions(-) commit c2615cf5a761b32bf74e85bddc223dfff3d9b9f0 Author: Eric Dumazet Date: Sat Mar 31 12:58:57 2018 -0700 inet: frags: reorganize struct netns_frags Put the read-mostly fields in a separate cache line at the beginning of struct netns_frags, to reduce false sharing noticed in inet_frag_kill() Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_frag.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit e5d672a0780d9e7118caad4c171ec88b8299398d Author: Eric Dumazet Date: Sat Mar 31 12:58:56 2018 -0700 rhashtable: reorganize struct rhashtable layout While under frags DDOS I noticed unfortunate false sharing between @nelems and @params.automatic_shrinking Move @nelems at the end of struct rhashtable so that first cache line is shared between all cpus, because almost never dirtied. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/rhashtable.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 05c0b86b9696802fd0ce5676a92a63f1b455bdf3 Author: Eric Dumazet Date: Sat Mar 31 12:58:55 2018 -0700 ipv6: frags: rewrite ip6_expire_frag_queue() Make it similar to IPv4 ip_expire(), and release the lock before calling icmp functions. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/reassembly.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 1eec5d5670084ee644597bd26c25e22c69b9f748 Author: Eric Dumazet Date: Sat Mar 31 12:58:54 2018 -0700 inet: frags: do not clone skb in ip_expire() An skb_clone() was added in commit ec4fbd64751d ("inet: frag: release spinlock before calling icmp_send()") While fixing the bug at that time, it also added a very high cost for DDOS frags, as the ICMP rate limit is applied after this expensive operation (skb_clone() + consume_skb(), implying memory allocations, copy, and freeing) We can use skb_get(head) here, all we want is to make sure skb wont be freed by another cpu. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ip_fragment.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 3e67f106f619dcfaf6f4e2039599bdb69848c714 Author: Eric Dumazet Date: Sat Mar 31 12:58:53 2018 -0700 inet: frags: break the 2GB limit for frags storage Some users are willing to provision huge amounts of memory to be able to perform reassembly reasonnably well under pressure. Current memory tracking is using one atomic_t and integers. Switch to atomic_long_t so that 64bit arches can use more than 2GB, without any cost for 32bit arches. Note that this patch avoids an overflow error, if high_thresh was set to ~2GB, since this test in inet_frag_alloc() was never true : if (... || frag_mem_limit(nf) > nf->high_thresh) Tested: $ echo 16000000000 >/proc/sys/net/ipv4/ipfrag_high_thresh $ grep FRAG /proc/net/sockstat FRAG: inuse 14705885 memory 16000002880 $ nstat -n ; sleep 1 ; nstat | grep Reas IpReasmReqds 3317150 0.0 IpReasmFails 3317112 0.0 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 4 ++-- include/net/inet_frag.h | 20 ++++++++++---------- net/ieee802154/6lowpan/reassembly.c | 10 +++++----- net/ipv4/ip_fragment.c | 10 +++++----- net/ipv4/proc.c | 2 +- net/ipv6/netfilter/nf_conntrack_reasm.c | 10 +++++----- net/ipv6/proc.c | 2 +- net/ipv6/reassembly.c | 6 +++--- 8 files changed, 32 insertions(+), 32 deletions(-) commit 2d44ed22e607f9a285b049de2263e3840673a260 Author: Eric Dumazet Date: Sat Mar 31 12:58:52 2018 -0700 inet: frags: remove inet_frag_maybe_warn_overflow() This function is obsolete, after rhashtable addition to inet defrag. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_frag.h | 2 -- net/ieee802154/6lowpan/reassembly.c | 5 ++--- net/ipv4/inet_fragment.c | 11 ----------- net/ipv4/ip_fragment.c | 5 ++--- net/ipv6/netfilter/nf_conntrack_reasm.c | 5 ++--- net/ipv6/reassembly.c | 5 ++--- 6 files changed, 8 insertions(+), 25 deletions(-) commit 399d1404be660d355192ff4df5ccc3f4159ec1e4 Author: Eric Dumazet Date: Sat Mar 31 12:58:51 2018 -0700 inet: frags: get rif of inet_frag_evicting() This refactors ip_expire() since one indentation level is removed. Note: in the future, we should try hard to avoid the skb_clone() since this is a serious performance cost. Under DDOS, the ICMP message wont be sent because of rate limits. Fact that ip6_expire_frag_queue() does not use skb_clone() is disturbing too. Presumably IPv6 should have the same issue than the one we fixed in commit ec4fbd64751d ("inet: frag: release spinlock before calling icmp_send()") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_frag.h | 5 ---- net/ipv4/ip_fragment.c | 65 ++++++++++++++++++++++++------------------------- net/ipv6/reassembly.c | 4 --- 3 files changed, 32 insertions(+), 42 deletions(-) commit 6befe4a78b1553edb6eed3a78b4bcd9748526672 Author: Eric Dumazet Date: Sat Mar 31 12:58:50 2018 -0700 inet: frags: remove some helpers Remove sum_frag_mem_limit(), ip_frag_mem() & ip6_frag_mem() Also since we use rhashtable we can bring back the number of fragments in "grep FRAG /proc/net/sockstat /proc/net/sockstat6" that was removed in commit 434d305405ab ("inet: frag: don't account number of fragment queues") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_frag.h | 5 ----- include/net/ip.h | 1 - include/net/ipv6.h | 7 ------- net/ipv4/ip_fragment.c | 5 ----- net/ipv4/proc.c | 6 +++--- net/ipv6/proc.c | 5 +++-- 6 files changed, 6 insertions(+), 23 deletions(-) commit 648700f76b03b7e8149d13cc2bdb3355035258a9 Author: Eric Dumazet Date: Sat Mar 31 12:58:49 2018 -0700 inet: frags: use rhashtables for reassembly units Some applications still rely on IP fragmentation, and to be fair linux reassembly unit is not working under any serious load. It uses static hash tables of 1024 buckets, and up to 128 items per bucket (!!!) A work queue is supposed to garbage collect items when host is under memory pressure, and doing a hash rebuild, changing seed used in hash computations. This work queue blocks softirqs for up to 25 ms when doing a hash rebuild, occurring every 5 seconds if host is under fire. Then there is the problem of sharing this hash table for all netns. It is time to switch to rhashtables, and allocate one of them per netns to speedup netns dismantle, since this is a critical metric these days. Lookup is now using RCU. A followup patch will even remove the refcount hold/release left from prior implementation and save a couple of atomic operations. Before this patch, 16 cpus (16 RX queue NIC) could not handle more than 1 Mpps frags DDOS. After the patch, I reach 9 Mpps without any tuning, and can use up to 2GB of storage for the fragments (exact number depends on frags being evicted after timeout) $ grep FRAG /proc/net/sockstat FRAG: inuse 1966916 memory 2140004608 A followup patch will change the limits for 64bit arches. Signed-off-by: Eric Dumazet Cc: Kirill Tkhai Cc: Herbert Xu Cc: Florian Westphal Cc: Jesper Dangaard Brouer Cc: Alexander Aring Cc: Stefan Schmidt Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 7 +- include/net/inet_frag.h | 81 ++++---- include/net/ipv6.h | 16 +- net/ieee802154/6lowpan/6lowpan_i.h | 26 +-- net/ieee802154/6lowpan/reassembly.c | 91 ++++----- net/ipv4/inet_fragment.c | 344 ++++++-------------------------- net/ipv4/ip_fragment.c | 112 +++++------ net/ipv6/netfilter/nf_conntrack_reasm.c | 51 ++--- net/ipv6/reassembly.c | 110 +++++----- 9 files changed, 265 insertions(+), 573 deletions(-) commit ae6da1f503abb5a5081f9f6c4a6881de97830f3e Author: Eric Dumazet Date: Sat Mar 31 12:58:48 2018 -0700 rhashtable: add schedule points Rehashing and destroying large hash table takes a lot of time, and happens in process context. It is safe to add cond_resched() in rhashtable_rehash_table() and rhashtable_free_and_destroy() Signed-off-by: Eric Dumazet Acked-by: Herbert Xu Signed-off-by: David S. Miller lib/rhashtable.c | 2 ++ 1 file changed, 2 insertions(+) commit 483a6e4fa055123142d8956866fe2aa9c98d546d Author: Eric Dumazet Date: Sat Mar 31 12:58:47 2018 -0700 inet: frags: refactor ipfrag_init() We need to call inet_frags_init() before register_pernet_subsys(), as a prereq for following patch ("inet: frags: use rhashtables for reassembly units") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ip_fragment.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 807f1844df4ac23594268fa9f41902d0549e92aa Author: Eric Dumazet Date: Sat Mar 31 12:58:46 2018 -0700 inet: frags: refactor lowpan_net_frag_init() We want to call lowpan_net_frag_init() earlier. Similar to commit "inet: frags: refactor ipv6_frag_init()" This is a prereq to "inet: frags: use rhashtables for reassembly units" Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ieee802154/6lowpan/reassembly.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 5b975bab23615cd0fdf67af6c9298eb01c4b9f61 Author: Eric Dumazet Date: Sat Mar 31 12:58:45 2018 -0700 inet: frags: refactor ipv6_frag_init() We want to call inet_frags_init() earlier. This is a prereq to "inet: frags: use rhashtables for reassembly units" Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/reassembly.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 093ba72914b696521e4885756a68a3332782c8de Author: Eric Dumazet Date: Sat Mar 31 12:58:44 2018 -0700 inet: frags: add a pointer to struct netns_frags In order to simplify the API, add a pointer to struct inet_frags. This will allow us to make things less complex. These functions no longer have a struct inet_frags parameter : inet_frag_destroy(struct inet_frag_queue *q /*, struct inet_frags *f */) inet_frag_put(struct inet_frag_queue *q /*, struct inet_frags *f */) inet_frag_kill(struct inet_frag_queue *q /*, struct inet_frags *f */) inet_frags_exit_net(struct netns_frags *nf /*, struct inet_frags *f */) ip6_expire_frag_queue(struct net *net, struct frag_queue *fq) Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_frag.h | 11 ++++++----- include/net/ipv6.h | 3 +-- net/ieee802154/6lowpan/reassembly.c | 13 +++++++------ net/ipv4/inet_fragment.c | 17 ++++++++++------- net/ipv4/ip_fragment.c | 9 +++++---- net/ipv6/netfilter/nf_conntrack_reasm.c | 16 +++++++++------- net/ipv6/reassembly.c | 20 ++++++++++---------- 7 files changed, 48 insertions(+), 41 deletions(-) commit 787bea7748a76130566f881c2342a0be4127d182 Author: Eric Dumazet Date: Sat Mar 31 12:58:43 2018 -0700 inet: frags: change inet_frags_init_net() return value We will soon initialize one rhashtable per struct netns_frags in inet_frags_init_net(). This patch changes the return value to eventually propagate an error. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_frag.h | 3 ++- net/ieee802154/6lowpan/reassembly.c | 11 ++++++++--- net/ipv4/ip_fragment.c | 12 +++++++++--- net/ipv6/netfilter/nf_conntrack_reasm.c | 12 +++++++++--- net/ipv6/reassembly.c | 11 +++++++++-- 5 files changed, 37 insertions(+), 12 deletions(-) commit c22af22cbdc206a0273d0e6d773bd3dfc99d2b02 Author: Eric Dumazet Date: Sat Mar 31 12:58:42 2018 -0700 ipv6: frag: remove unused field csum field in struct frag_queue is not used, remove it. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/ipv6.h | 1 - 1 file changed, 1 deletion(-) commit 5749d6af4925a9da362b37df920c2a1dc54689a1 Merge: eeb0a2a ec86f14 Author: David S. Miller Date: Sat Mar 31 23:24:20 2018 -0400 Merge branch 'bnxt_en-next' Michael Chan says: ==================== bnxt_en: Update for net-next. Misc. updates including updated firmware interface, some additional port statistics, a new IRQ assignment scheme for the RDMA driver, support for VF trust, and other changes and improvements for SRIOV. ==================== Signed-off-by: David S. Miller commit ec86f14ea5064e36ee111297bdb376dda4cba264 Author: Michael Chan Date: Sat Mar 31 13:54:21 2018 -0400 bnxt_en: Add ULP calls to stop and restart IRQs. When the driver needs to re-initailize the IRQ vectors, we make the new ulp_irq_stop() call to tell the RDMA driver to disable and free the IRQ vectors. After IRQ vectors have been re-initailized, we make the ulp_irq_restart() call to tell the RDMA driver that IRQs can be restarted. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 7 ++- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 81 ++++++++++++++++++++++++--- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 19 ++++--- 3 files changed, 90 insertions(+), 17 deletions(-) commit fbcfc8e4674156cb7eb3d8054bd4332142d2cc58 Author: Michael Chan Date: Sat Mar 31 13:54:20 2018 -0400 bnxt_en: Reserve completion rings and MSIX for bnxt_re RDMA driver. Add additional logic to reserve completion rings for the bnxt_re driver when it requests MSIX vectors. The function bnxt_cp_rings_in_use() will return the total number of completion rings used by both drivers that need to be reserved. If the network interface in up, we will close and open the NIC to reserve the new set of completion rings and re-initialize the vectors. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 39 ++++++++++++++++++++------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 3 +++ drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 39 ++++++++++++++++++++++----- 3 files changed, 65 insertions(+), 16 deletions(-) commit 4e41dc5deb6e5c36ac5f2e49575485920037b2aa Author: Michael Chan Date: Sat Mar 31 13:54:19 2018 -0400 bnxt_en: Refactor bnxt_need_reserve_rings(). Refactor bnxt_need_reserve_rings() slightly so that __bnxt_reserve_rings() can call it and remove some duplicated code. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 57 ++++++++++++++----------------- 1 file changed, 25 insertions(+), 32 deletions(-) commit e5811b8c09df9bc80eabc95339fceded23f16289 Author: Michael Chan Date: Sat Mar 31 13:54:18 2018 -0400 bnxt_en: Add IRQ remapping logic. Add remapping logic so that bnxt_en can use any arbitrary MSIX vectors. This will allow the driver to reserve one range of MSIX vectors to be used by both bnxt_en and bnxt_re. bnxt_en can now skip over the MSIX vectors used by bnxt_re. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 59 ++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 17 deletions(-) commit 08654eb213a8066b30c41e22067a9f066b40c80f Author: Michael Chan Date: Sat Mar 31 13:54:17 2018 -0400 bnxt_en: Change IRQ assignment for RDMA driver. In the current code, the range of MSIX vectors allocated for the RDMA driver is disjoint from the network driver. This creates a problem for the new firmware ring reservation scheme. The new scheme requires the reserved completion rings/MSIX vectors to be in a contiguous range. Change the logic to allocate RDMA MSIX vectors to be contiguous with the vectors used by bnxt_en on new firmware using the new scheme. The new function bnxt_get_num_msix() calculates the exact number of vectors needed by both drivers. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 31 +++++++++++++++++++++++++-- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 30 +++++++++++++++++++++++++- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 3 +++ 3 files changed, 61 insertions(+), 3 deletions(-) commit 9899bb59ff08a50aef033b4d388d223adca58a7f Author: Michael Chan Date: Sat Mar 31 13:54:16 2018 -0400 bnxt_en: Improve ring allocation logic. Currently, the driver code makes some assumptions about the group index and the map index of rings. This makes the code more difficult to understand and less flexible. Improve it by adding the grp_idx and map_idx fields explicitly to the bnxt_ring_struct as a union. The grp_idx is initialized for each tx ring and rx agg ring during init. time. We do the same for the map_idx for each cmpl ring. The grp_idx ties the tx ring to the ring group. The map_idx is the doorbell index of the ring. With this new infrastructure, we can change the ring index mapping scheme easily in the future. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 32 ++++++++++++++++--------------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 ++++ 2 files changed, 21 insertions(+), 15 deletions(-) commit 845adfe40c2a75e67ddae6639fc2b987338b7983 Author: Michael Chan Date: Sat Mar 31 13:54:15 2018 -0400 bnxt_en: Improve valid bit checking in firmware response message. When firmware sends a DMA response to the driver, the last byte of the message will be set to 1 to indicate that the whole response is valid. The driver waits for the message to be valid before reading the message. The firmware spec allows these response messages to increase in length by adding new fields to the end of these messages. The older spec's valid location may become a new field in a newer spec. To guarantee compatibility, the driver should zero the valid byte before interpreting the entire message so that any new fields not implemented by the older spec will be read as zero. For messages that are forwarded to VFs, we need to set the length and re-instate the valid bit so the VF will see the valid response. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 21 ++++++++++++++++----- drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 2 ++ 2 files changed, 18 insertions(+), 5 deletions(-) commit 596f9d55feebdf31c03172fcc82cdec62bb969ea Author: Michael Chan Date: Sat Mar 31 13:54:14 2018 -0400 bnxt_en: Improve resource accounting for SRIOV. When VFs are created, the current code subtracts the maximum VF resources from the PF's pool. This under-estimates the resources remaining in the PF pool. Instead, we should subtract the minimum VF resources. The VF minimum resources are guaranteed to the VFs and only these should be subtracted from the PF's pool. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit db4723b3cd2d836ae44382d16e6a4418ae8929dc Author: Michael Chan Date: Sat Mar 31 13:54:13 2018 -0400 bnxt_en: Check max_tx_scheduler_inputs value from firmware. When checking for the maximum pre-set TX channels for ethtool -l, we need to check the current max_tx_scheduler_inputs parameter from firmware. This parameter specifies the max input for the internal QoS nodes currently available to this function. The function's TX rings will be capped by this parameter. By adding this logic, we provide a more accurate pre-set max TX channels to the user. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 ++++++-- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 ++ drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 11 +++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) commit 00db3cba35211cd7d458d378a5931fadfa86a17c Author: Vasundhara Volam Date: Sat Mar 31 13:54:12 2018 -0400 bnxt_en: Add extended port statistics support Gather periodic extended port statistics, if the device is PF and link is up. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 45 ++++++++++++++++++++++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 6 +++ drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 32 ++++++++++++++++ 3 files changed, 81 insertions(+), 2 deletions(-) commit 699efed00df0631e39a639b49e3b8e27e62e6c89 Author: Vasundhara Volam Date: Sat Mar 31 13:54:11 2018 -0400 bnxt_en: Include additional hardware port statistics in ethtool -S. Include additional hardware port statistics in ethtool -S, which are useful for debugging. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 5 +++++ 1 file changed, 5 insertions(+) commit 746df139646ea7fd11c26f88fd95a247d2a7c94b Author: Vasundhara Volam Date: Sat Mar 31 13:54:10 2018 -0400 bnxt_en: Add support for ndo_set_vf_trust Trusted VFs are allowed to modify MAC address, even when PF has assigned one. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 41 ++++++++++++++++++++----- drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.h | 3 +- 4 files changed, 37 insertions(+), 9 deletions(-) commit 2373d8d6a7932d28b8e31ea2a70bf6c002d97ac8 Author: Scott Branden Date: Sat Mar 31 13:54:09 2018 -0400 bnxt_en: fix clear flags in ethtool reset handling Clear flags when reset command processed successfully for components specified. Fixes: 6502ad5963a5 ("bnxt_en: Add ETH_RESET_AP support") Signed-off-by: Scott Branden Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit abe93ad2e06e3c16562b5de2787e7442fa088895 Author: Michael Chan Date: Sat Mar 31 13:54:08 2018 -0400 bnxt_en: Use a dedicated VNIC mode for RDMA. If the RDMA driver is registered, use a new VNIC mode that allows RDMA traffic to be seen on the netdev in promiscuous mode. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 18 ++++++++++++++---- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) commit 1d3ef13dd48da9177e417379644be9003bc459cc Author: Michael Chan Date: Sat Mar 31 13:54:07 2018 -0400 bnxt_en: Adjust default rings for multi-port NICs. Change the default ring logic to select default number of rings to be up to 8 per port if the default rings x NIC ports <= total CPUs. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit d4f52de02f04f0a7dfcb1d0228a2ff58b06aa230 Author: Michael Chan Date: Sat Mar 31 13:54:06 2018 -0400 bnxt_en: Update firmware interface to 1.9.1.15. Minor changes, such as new extended port statistics. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 15 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 +- drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.h | 5 +- drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 289 +++++++++++++++++--------- 4 files changed, 210 insertions(+), 103 deletions(-) commit eeb0a2a526d816253705977033e98fdfbab32387 Author: Wei Yongjun Date: Sat Mar 31 06:11:41 2018 +0000 vlan: vlan_hw_filter_capable() can be static Fixes the following sparse warning: net/8021q/vlan_core.c:168:6: warning: symbol 'vlan_hw_filter_capable' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller net/8021q/vlan_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bde261e535257e81087d39ff808414e2f5aa39d Merge: e2e80c0 ab966d7 Author: David S. Miller Date: Sat Mar 31 22:31:43 2018 -0400 Merge tag 'mlx5-updates-2018-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2018-03-30 This series contains updates to mlx5 core and mlx5e netdev drivers. The main highlight of this series is the RX optimizations for striding RQ path, introduced by Tariq. First Four patches are trivial misc cleanups. - Spelling mistake fix - Dead code removal - Warning messages RX optimizations for striding RQ: 1) RX refactoring, cleanups and micro optimizations - MTU calculation simplifications, obsoletes some WQEs-to-packets translation functions and helps delete ~60 LOC. - Do not busy-wait a pending UMR completion. - post the new values of UMR WQE inline, instead of using a data pointer. - use pre-initialized structures to save calculations in datapath. 2) Use linear SKB in Striding RQ "build_skb", (Using linear SKB has many advantages): - Saves a memcpy of the headers. - No page-boundary checks in datapath. - No filler CQEs. - Significantly smaller CQ. - SKB data continuously resides in linear part, and not split to small amount (linear part) and large amount (fragment). This saves datapath cycles in driver and improves utilization of SKB fragments in GRO. - The fragments of a resulting GRO SKB follow the IP forwarding assumption of equal-size fragments. implementation details: HW writes the packets to the beginning of a stride, i.e. does not keep headroom. To overcome this we make sure we can extend backwards and use the last bytes of stride i-1. Extra care is needed for stride 0 as it has no preceding stride. We make sure headroom bytes are available by shifting the buffer pointer passed to HW by headroom bytes. This configuration now becomes default, whenever capable. Of course, this implies turning LRO off. Performance testing: ConnectX-5, single core, single RX ring, default MTU. UDP packet rate, early drop in TC layer: -------------------------------------------- | pkt size | before | after | ratio | -------------------------------------------- | 1500byte | 4.65 Mpps | 5.96 Mpps | 1.28x | | 500byte | 5.23 Mpps | 5.97 Mpps | 1.14x | | 64byte | 5.94 Mpps | 5.96 Mpps | 1.00x | -------------------------------------------- TCP streams: ~20% gain 3) Support XDP over Striding RQ: Now that linear SKB is supported over Striding RQ, we can support XDP by setting stride size to PAGE_SIZE and headroom to XDP_PACKET_HEADROOM. Striding RQ is capable of a higher packet-rate than conventional RQ. Performance testing: ConnectX-5, 24 rings, default MTU. CQE compression ON (to reduce completions BW in PCI). XDP_DROP packet rate: -------------------------------------------------- | pkt size | XDP rate | 100GbE linerate | pct% | -------------------------------------------------- | 64byte | 126.2 Mpps | 148.0 Mpps | 85% | | 128byte | 80.0 Mpps | 84.8 Mpps | 94% | | 256byte | 42.7 Mpps | 42.7 Mpps | 100% | | 512byte | 23.4 Mpps | 23.4 Mpps | 100% | -------------------------------------------------- 4) Remove mlx5 page_ref bulking in Striding RQ and use page_ref_inc only when needed. Without this bulking, we have: - no atomic ops on WQE allocation or free - one atomic op per SKB - In the default MTU configuration (1500, stride size is 2K), the non-bulking method execute 2 atomic ops as before - For larger MTUs with stride size of 4K, non-bulking method executes only a single op. - For XDP (stride size of 4K, no SKBs), non-bulking have no atomic ops per packet at all. Performance testing: ConnectX-5, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz. Single core packet rate (64 bytes). Early drop in TC: no degradation. XDP_DROP: before: 14,270,188 pps after: 20,503,603 pps, 43% improvement. ==================== Signed-off-by: David S. Miller commit e2e80c027f5adab3cc44c3d07c4484291384d278 Merge: 3be9b5f 17226f1 Author: David S. Miller Date: Sat Mar 31 22:29:12 2018 -0400 Merge tag 'rxrpc-next-20180330' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Fixes and more traces Here are some patches that add some more tracepoints to AF_RXRPC and fix some issues therein: (1) Fix the use of VERSION packets to keep firewall routes open. (2) Fix the incorrect current time usage in a tracepoint. (3) Fix Tx ring annotation corruption. (4) Fix accidental conversion of call-level abort into connection-level abort. (5) Fix calculation of resend time. (6) Remove a couple of unused variables. (7) Fix a bunch of checker warnings and an error. Note that not all warnings can be quashed as checker doesn't seem to correctly handle seqlocks. (8) Fix a potential race between call destruction and socket/net destruction. (9) Add a tracepoint to track rxrpc_local refcounting. (10) Fix an apparent leak of rxrpc_local objects. (11) Add a tracepoint to track rxrpc_peer refcounting. (12) Fix a leak of rxrpc_peer objects. ==================== Signed-off-by: David S. Miller commit 3be9b5fdc6379faf6f23cd8539ef9a6235396c5f Author: Haiyang Zhang Date: Fri Mar 30 13:57:59 2018 -0700 hv_netvsc: Clean up extra parameter from rndis_filter_receive_data() The variables, msg and data, have the same value. This patch removes the extra one. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/rndis_filter.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 49b44aa23e58d292cc1be79a5c7883ac8c927676 Author: Joe Perches Date: Fri Mar 30 12:37:30 2018 -0700 ethernet: hisilicon: hns: hns_dsaf_mac: Use generic eth_broadcast_addr Rather than use an on-stack array to copy a broadcast address, use the generic eth_broadcast_addr function to save a trivial amount of object code. Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b3834acdd78e2b626d576e90c502727da5a46e3c Merge: c679f6a 554873e Author: David S. Miller Date: Sat Mar 31 22:24:58 2018 -0400 Merge branch 'net_rwsem-fixes' Kirill Tkhai says: ==================== net_rwsem fixes there is wext_netdev_notifier_call()->wireless_nlevent_flush() netdevice notifier, which takes net_rwsem, so we can't take net_rwsem in {,un}register_netdevice_notifier(). Since {,un}register_netdevice_notifier() is executed under pernet_ops_rwsem, net_namespace_list can't change, while we holding it, so there is no need net_rwsem in these functions [1/2]. The same is in [2/2]. We make callers of __rtnl_link_unregister() take pernet_ops_rwsem, and close the race with setup_net() and cleanup_net(), so __rtnl_link_unregister() does not need it. This also fixes the problem of that __rtnl_link_unregister() does not see initializing and exiting nets. ==================== Signed-off-by: David S. Miller commit 554873e517115c4b7207259f1cadfd77d90b5395 Author: Kirill Tkhai Date: Fri Mar 30 19:38:37 2018 +0300 net: Do not take net_rwsem in __rtnl_link_unregister() This function calls call_netdevice_notifier(), which also may take net_rwsem. So, we can't use net_rwsem here. This patch makes callers of this functions take pernet_ops_rwsem, like register_netdevice_notifier() does. This will protect the modifications of net_namespace_list, and allows notifiers to take it (they won't have to care about context). Since __rtnl_link_unregister() is used on module load and unload (which are not frequent operations), this looks for me better, than make all call_netdevice_notifier() always executing in "protected net_namespace_list" context. Also, this fixes the problem we had a deal in 328fbe747ad4 "Close race between {un, }register_netdevice_notifier and ...", and guarantees __rtnl_link_unregister() does not skip exitting net. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller drivers/net/dummy.c | 2 ++ drivers/net/ifb.c | 2 ++ net/core/net_namespace.c | 1 + net/core/rtnetlink.c | 6 +++--- 4 files changed, 8 insertions(+), 3 deletions(-) commit fc1dd36992bb041b4470120aecf8986910c56088 Author: Kirill Tkhai Date: Fri Mar 30 19:38:27 2018 +0300 net: Remove net_rwsem from {, un}register_netdevice_notifier() These functions take net_rwsem, while wireless_nlevent_flush() also takes it. But down_read() can't be taken recursive, because of rw_semaphore design, which prevents it to be occupied by only readers forever. Since we take pernet_ops_rwsem in {,un}register_netdevice_notifier(), net list can't change, so these down_read()/up_read() can be removed. Fixes: f0b07bb151b0 "net: Introduce net_rwsem to protect net_namespace_list" Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/core/dev.c | 5 ----- 1 file changed, 5 deletions(-) commit c679f6a26dc3d450b76e94717850a14ff706cc58 Author: Wei Yongjun Date: Fri Mar 30 02:24:28 2018 +0000 net: hns3: remove unnecessary pci_set_drvdata() and devm_kfree() There is no need for explicit calls of devm_kfree(), as the allocated memory will be freed during driver's detach. The driver core clears the driver data to NULL after device_release. Thus, it is not needed to manually clear the device driver data to NULL. So remove the unnecessary pci_set_drvdata() and devm_kfree(). Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ---- 1 file changed, 4 deletions(-) commit ef817102586cca428d6fe0803cc232a3c929141f Author: David Ahern Date: Fri Mar 30 09:28:51 2018 -0700 netdevsim: Change nsim_devlink_setup to return error to caller Change nsim_devlink_setup to return any error back to the caller and update nsim_init to handle it. Requested-by: Jakub Kicinski Signed-off-by: David Ahern Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/netdevsim/devlink.c | 12 +++++++----- drivers/net/netdevsim/netdev.c | 6 +++++- drivers/net/netdevsim/netdevsim.h | 5 +++-- 3 files changed, 15 insertions(+), 8 deletions(-) commit 6851cf28db1c4becc25a2906ecd080c0022a9f11 Merge: 24197ee 7494cfa Author: David S. Miller Date: Sat Mar 31 22:19:59 2018 -0400 Merge branch 'tipc-slim-down-name-table' Jon Maloy says: ==================== tipc: slim down name table We clean up and improve the name binding table: - Replace the memory consuming 'sub_sequence/service range' array with an RB tree. - Introduce support for overlapping service sequences/ranges v2: #1: Fixed a missing initialization reported by David Miller #4: Obsoleted and replaced a few more macros to get a consistent terminology in the API. #5: Added new commit to fix a potential string overflow bug (it is still only in net-next) reported by Arnd Bergmann ==================== Signed-off-by: David S. Miller commit 7494cfa6d36d1556f17baa012dd93833620783db Author: Jon Maloy Date: Thu Mar 29 23:20:45 2018 +0200 tipc: avoid possible string overflow gcc points out that the combined length of the fixed-length inputs to l->name is larger than the destination buffer size: net/tipc/link.c: In function 'tipc_link_create': net/tipc/link.c:465:26: error: '%s' directive writing up to 32 bytes into a region of size between 26 and 58 [-Werror=format-overflow=] sprintf(l->name, "%s:%s-%s:unknown", self_str, if_name, peer_str); net/tipc/link.c:465:2: note: 'sprintf' output 11 or more bytes (assuming 75) into a destination of size 60 sprintf(l->name, "%s:%s-%s:unknown", self_str, if_name, peer_str); A detailed analysis reveals that the theoretical maximum length of a link name is: max self_str + 1 + max if_name + 1 + max peer_str + 1 + max if_name = 16 + 1 + 15 + 1 + 16 + 1 + 15 = 65 Since we also need space for a trailing zero we now set MAX_LINK_NAME to 68. Just to be on the safe side we also replace the sprintf() call with snprintf(). Fixes: 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values") Reported-by: Arnd Bergmann Signed-off-by: Jon Maloy Signed-off-by: David S. Miller include/uapi/linux/tipc.h | 2 +- net/tipc/link.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 7a74d39cc2927302bc236397c1fdb1fe5be209ce Author: Jon Maloy Date: Thu Mar 29 23:20:44 2018 +0200 tipc: tipc: rename address types in user api The three address type structs in the user API have names that in reality reflect the specific, non-Linux environment where they were originally created. We now give them more intuitive names, in accordance with how TIPC is described in the current documentation. struct tipc_portid -> struct tipc_socket_addr struct tipc_name -> struct tipc_service_addr struct tipc_name_seq -> struct tipc_service_range To avoid confusion, we also update some commmets and macro names to match the new terminology. For compatibility, we add macros that map all old names to the new ones. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller include/uapi/linux/tipc.h | 57 +++++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 24 deletions(-) commit 37922ea4a3105176357c8d565a9d982c4a08714a Author: Jon Maloy Date: Thu Mar 29 23:20:43 2018 +0200 tipc: permit overlapping service ranges in name table With the new RB tree structure for service ranges it becomes possible to solve an old problem; - we can now allow overlapping service ranges in the table. When inserting a new service range to the tree, we use 'lower' as primary key, and when necessary 'upper' as secondary key. Since there may now be multiple service ranges matching an indicated 'lower' value, we must also add the 'upper' value to the functions used for removing publications, so that the correct, corresponding range item can be found. These changes guarantee that a well-formed publication/withdrawal item from a peer node never will be rejected, and make it possible to eliminate the problematic backlog functionality we currently have for handling such cases. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/name_distr.c | 90 +++++++++++++-------------------------------------- net/tipc/name_distr.h | 1 - net/tipc/name_table.c | 64 +++++++++++++++++------------------- net/tipc/name_table.h | 8 ++--- net/tipc/net.c | 2 +- net/tipc/node.c | 2 +- net/tipc/socket.c | 4 +-- 7 files changed, 60 insertions(+), 111 deletions(-) commit f20889f72bd531cad88fbb571755a52cabf43424 Author: Jon Maloy Date: Thu Mar 29 23:20:42 2018 +0200 tipc: refactor name table translate function The function tipc_nametbl_translate() function is ugly and hard to follow. This can be improved somewhat by introducing a stack variable for holding the publication list to be used and re-ordering the if- clauses for selection of algorithm. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/name_table.c | 61 +++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 36 deletions(-) commit 218527fe27adaebeb81eb770459eb335517e90ee Author: Jon Maloy Date: Thu Mar 29 23:20:41 2018 +0200 tipc: replace name table service range array with rb tree The current design of the binding table has an unnecessary memory consuming and complex data structure. It aggregates the service range items into an array, which is expanded by a factor two every time it becomes too small to hold a new item. Furthermore, the arrays never shrink when the number of ranges diminishes. We now replace this array with an RB tree that is holding the range items as tree nodes, each range directly holding a list of bindings. This, along with a few name changes, improves both readability and volume of the code, as well as reducing memory consumption and hopefully improving cache hit rate. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/core.h | 1 + net/tipc/link.c | 2 +- net/tipc/name_table.c | 1032 ++++++++++++++++++++++--------------------------- net/tipc/name_table.h | 2 +- net/tipc/node.c | 4 +- net/tipc/subscr.h | 4 +- 6 files changed, 477 insertions(+), 568 deletions(-) commit 24197ee2102359b59044234347dd3504302fa97d Merge: 56c03cb 804b854 Author: David S. Miller Date: Sat Mar 31 22:19:14 2018 -0400 Merge branch 'bridge-mtu' Nikolay Aleksandrov says: ==================== net: bridge: MTU handling changes As previously discussed the recent changes break some setups and could lead to packet drops. Thus the first patch reverts the behaviour for the bridge to follow the minimum MTU but also keeps the ability to set the MTU to the maximum (out of all ports) if vlan filtering is enabled. Patch 02 is the bigger change in behaviour - we've always had trouble when configuring bridges and their MTU which is auto tuning on port events (add/del/changemtu), which means config software needs to chase it and fix it after each such event, after patch 02 we allow the user to configure any MTU (ETH_MIN/MAX limited) but once that is done the bridge stops auto tuning and relies on the user to keep the MTU correct. This should be compatible with cases that don't touch the MTU (or set it to the same value), while allowing to configure the MTU and not worry about it changing afterwards. The patches are intentionally split like this, so that if they get accepted and there are any complaints patch 02 can be reverted. ==================== Signed-off-by: David S. Miller commit 804b854d374e39f5f8bff9638fd274b9a9ca7d33 Author: Nikolay Aleksandrov Date: Fri Mar 30 13:46:19 2018 +0300 net: bridge: disable bridge MTU auto tuning if it was set manually As Roopa noted today the biggest source of problems when configuring bridge and ports is that the bridge MTU keeps changing automatically on port events (add/del/changemtu). That leads to inconsistent behaviour and network config software needs to chase the MTU and fix it on each such event. Let's improve on that situation and allow for the user to set any MTU within ETH_MIN/MAX limits, but once manually configured it is the user's responsibility to keep it correct afterwards. In case the MTU isn't manually set - the behaviour reverts to the previous and the bridge follows the minimum MTU. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br.c | 2 +- net/bridge/br_device.c | 5 ++--- net/bridge/br_if.c | 36 +++++++++++++++++++++--------------- net/bridge/br_private.h | 3 ++- 4 files changed, 26 insertions(+), 20 deletions(-) commit f40aa23339e2d06b1a8daaece5a511bb1c4f704c Author: Nikolay Aleksandrov Date: Fri Mar 30 13:46:18 2018 +0300 net: bridge: set min MTU on port events and allow user to set max Recently the bridge was changed to automatically set maximum MTU on port events (add/del/changemtu) when vlan filtering is enabled, but that actually changes behaviour in a way which breaks some setups and can lead to packet drops. In order to still allow that maximum to be set while being compatible, we add the ability for the user to tune the bridge MTU up to the maximum when vlan filtering is enabled, but that has to be done explicitly and all port events (add/del/changemtu) lead to resetting that MTU to the minimum as before. Suggested-by: Roopa Prabhu Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br.c | 2 +- net/bridge/br_device.c | 3 ++- net/bridge/br_if.c | 43 ++++++++++++++----------------------------- net/bridge/br_private.h | 2 +- 4 files changed, 18 insertions(+), 32 deletions(-) commit 56c03cbf8c4cbd413a19e8541850b0f02958fdcb Merge: 5e8b270 37c3347 Author: David S. Miller Date: Sat Mar 31 22:18:27 2018 -0400 Merge branch 'thunderx-DMAC-filtering' Vadim Lomovtsev says: ==================== net: thunderx: implement DMAC filtering support By default CN88XX BGX accepts all incoming multicast and broadcast packets and filtering is disabled. The nic driver doesn't provide an ability to change such behaviour. This series is to implement DMAC filtering management for CN88XX nic driver allowing user to enable/disable filtering and configure specific MAC addresses to filter traffic. Changes from v1: build issues: - update code in order to address compiler warnings; checkpatch.pl reported issues: - update code in order to fit 80 symbols length; - update commit descriptions in order to fit 80 symbols length; ==================== Signed-off-by: David S. Miller commit 37c3347eb247a79a3371d589175f646ea3a488de Author: Vadim Lomovtsev Date: Fri Mar 30 04:59:53 2018 -0700 net: thunderx: add ndo_set_rx_mode callback implementation for VF The ndo_set_rx_mode() is called from atomic context which causes messages response timeouts while VF to PF communication via MSIx. To get rid of that we're copy passed mc list, parse flags and queue handling of kernel request to ordered workqueue. Signed-off-by: Vadim Lomovtsev Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 110 ++++++++++++++++++++++- 1 file changed, 109 insertions(+), 1 deletion(-) commit 1b6d55f23948df5ea2b9f59b766bed91fb609b99 Author: Vadim Lomovtsev Date: Fri Mar 30 04:59:52 2018 -0700 net: thunderx: add workqueue control structures for handle ndo_set_rx_mode request The kernel calls ndo_set_rx_mode() callback from atomic context which causes messaging timeouts between VF and PF (as they’re implemented via MSIx). So in order to handle ndo_set_rx_mode() we need to get rid of it. This commit implements necessary workqueue related structures to let VF queue kernel request processing in non-atomic context later. Signed-off-by: Vadim Lomovtsev Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit aba4a2633b020064677df77e92238b1a753942fe Author: Vadim Lomovtsev Date: Fri Mar 30 04:59:51 2018 -0700 net: thunderx: add XCAST messages handlers for PF This commit is to add message handling for ndo_set_rx_mode() callback at PF side. Signed-off-by: Vadim Lomovtsev Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic_main.c | 45 +++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 4 deletions(-) commit 0b849f58f27b974f204477a71c2239986770a22c Author: Vadim Lomovtsev Date: Fri Mar 30 04:59:50 2018 -0700 net: thunderx: add new messages for handle ndo_set_rx_mode callback The kernel calls ndo_set_rx_mode() callback supplying it will all necessary info, such as device state flags, multicast mac addresses list and so on. Since we have only 128 bits to communicate with PF we need to initiate several requests to PF with small/short operation each based on input data. So this commit implements following PF messages codes along with new data structures for them: NIC_MBOX_MSG_RESET_XCAST to flush all filters configured for this particular network interface (VF) NIC_MBOX_MSG_ADD_MCAST to add new MAC address to DMAC filter registers for this particular network interface (VF) NIC_MBOX_MSG_SET_XCAST to apply filtering configuration to filter control register Signed-off-by: Vadim Lomovtsev Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit ceb9ea21cc124f8653e4bb1b06fb6e051bd408fe Author: Vadim Lomovtsev Date: Fri Mar 30 04:59:49 2018 -0700 net: thunderx: add multicast filter management support The ThunderX NIC could be partitioned to up to 128 VFs and thus represented to system. Each VF is mapped to pair BGX:LMAC, and each of VF is configured by kernel individually. Eventually the bunch of VFs could be mapped onto same pair BGX:LMAC and thus could cause several multicast filtering configuration requests to LMAC with the same MAC addresses. This commit is to add ThunderX NIC BGX filtering manipulation routines. Signed-off-by: Vadim Lomovtsev Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 144 ++++++++++++++++++++++ drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 10 +- 2 files changed, 153 insertions(+), 1 deletion(-) commit 3a34ecfd9d3f3e0c1584a80349cc7c4312ff5e91 Author: Vadim Lomovtsev Date: Fri Mar 30 04:59:48 2018 -0700 net: thunderx: add MAC address filter tracking for LMAC The ThunderX NIC has two Ethernet Interfaces (BGX) each of them could has up to four Logical MACs configured. Each of BGX has 32 filters to be configured for filtering ingress packets. The number of filters available to particular LMAC is from 8 (if we have four LMACs configured per BGX) up to 32 (in case of only one LMAC is configured per BGX). At the same time the NIC could present up to 128 VFs to OS as network interfaces, each of them kernel will configure with set of MAC addresses for filtering. So to prevent dupes in BGX filter registers from different network interfaces it is required to cache and track all filter configuration requests prior to applying them onto BGX filter registers. This commit is to update LMAC structures with control fields to allocate/releasing filters tracking list along with implementing dmac array allocate/release per LMAC. Signed-off-by: Vadim Lomovtsev Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 44 +++++++++++++++-------- 1 file changed, 30 insertions(+), 14 deletions(-) commit f8ad1f3f07e06895fe3fc18b5efd2d4b4f22b9d7 Author: Vadim Lomovtsev Date: Fri Mar 30 04:59:47 2018 -0700 net: thunderx: move filter register related macro into proper place The ThunderX NIC has set of registers which allows to configure filter policy for ingress packets. There are three possible regimes of filtering multicasts, broadcasts and unicasts: accept all, reject all and accept filter allowed only. Current implementation has enum with all of them and two generic macro for enabling filtering et all (CAM_ACCEPT) and enabling/disabling broadcast packets, which also should be corrected in order to represent register bits properly. All these values are private for driver and there is no need to ‘publish’ them via header file. This commit is to move filtering register manipulation values from header file into source with explicit assignment of exact register values to them to be used while register configuring. Signed-off-by: Vadim Lomovtsev Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 13 +++++++++++++ drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 11 ----------- 2 files changed, 13 insertions(+), 11 deletions(-) commit 5e8b270fcf1116d47e4954704fa1b7c58f272622 Merge: c0b6ede 7676693 Author: David S. Miller Date: Sat Mar 31 22:17:30 2018 -0400 Merge branch 'meson8b' Martin Blumenstingl says: ==================== Meson8m2 support for dwmac-meson8b The Meson8m2 SoC is an updated version of the Meson8 SoC. Some of the peripherals are shared with Meson8b (for example the watchdog registers and the internal temperature sensor calibration procedure). Meson8m2 also seems to include the same Gigabit MAC register layout as Meson8b. The registers in the Amlogic dwmac "glue" seem identical between Meson8b and Meson8m2. Manual testing seems to confirm this. To be extra-safe a new compatible string is added because there's no (public) documentation on the Meson8m2 SoC. This will allow us to implement any SoC-specific variations later on (if needed). ==================== Signed-off-by: David S. Miller commit 7676693c682564c0f8ffe055afbcfcc9e35ff247 Author: Martin Blumenstingl Date: Fri Mar 30 01:00:35 2018 +0200 net: stmmac: dwmac-meson8b: Add support for the Meson8m2 SoC The Meson8m2 SoC uses a similar (potentially even identical) register layout as the Meson8b and GXBB SoCs for the dwmac glue. Add a new compatible string and update the module description to indicate support for these SoCs. Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a5af1fb94ffcad1aff3bc7f8a78dae7ee266f31c Author: Martin Blumenstingl Date: Fri Mar 30 01:00:34 2018 +0200 dt-bindings: net: meson-dwmac: add support for the Meson8m2 SoC The Meson8m2 SoC uses a similar (potentially even identical) register layout for the dwmac glue as Meson8b and GXBB. Unfortunately there is no documentation available. Testing shows that both, RMII and RGMII PHYs are working if they are configured as on Meson8b. Add a new compatible string to the documentation so differences (if there are any) between Meson8m2 and the other SoCs can be taken care of within the driver. Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/meson-dwmac.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e02602bd76257e0368e4c3d4ce11a7ac86df72d2 Author: Bjorn Helgaas Date: Sat Mar 31 17:48:57 2018 -0500 PCI/DPC: Rename from pcie-dpc.c to dpc.c Rename pcie-dpc.c to dpc.c. The path "drivers/pci/pcie/pcie-dpc.c" has more occurrences of "pci" than necessary. Signed-off-by: Bjorn Helgaas drivers/pci/pcie/Makefile | 2 +- drivers/pci/pcie/dpc.c | 307 ++++++++++++++++++++++++++++++++++++++++++++ drivers/pci/pcie/pcie-dpc.c | 307 -------------------------------------------- 3 files changed, 308 insertions(+), 308 deletions(-) commit 619e6f340cec7c5d1449a2951dae5af0990bd0f5 Author: Mathieu Malaterre Date: Fri Mar 30 17:39:31 2018 -0500 PCI/IOV: Add missing prototypes for powerpc pcibios interfaces Add missing prototypes for: resource_size_t pcibios_default_alignment(void); int pcibios_sriov_enable(struct pci_dev *pdev, u16 num_vfs); int pcibios_sriov_disable(struct pci_dev *pdev); This fixes the following warnings treated as errors when using W=1: arch/powerpc/kernel/pci-common.c:236:17: error: no previous prototype for ‘pcibios_default_alignment’ [-Werror=missing-prototypes] arch/powerpc/kernel/pci-common.c:253:5: error: no previous prototype for ‘pcibios_sriov_enable’ [-Werror=missing-prototypes] arch/powerpc/kernel/pci-common.c:261:5: error: no previous prototype for ‘pcibios_sriov_disable’ [-Werror=missing-prototypes] Also, commit 978d2d683123 ("PCI: Add pcibios_iov_resource_alignment() interface") added a new function but the prototype was located in the main header instead of the CONFIG_PCI_IOV specific section. Move this function next to the newly added ones. Signed-off-by: Mathieu Malaterre Signed-off-by: Bjorn Helgaas include/linux/pci.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit cf0921bea66c55600a48009597caa5fcb1419748 Author: KarimAllah Ahmed Date: Mon Mar 19 21:06:00 2018 +0100 PCI/IOV: Use VF0 cached config registers for other VFs Cache some config data from VF0 and use it for all other VFs instead of reading it from the config space of each VF. We assume these items are the same across all associated VFs: Revision ID Class Code Subsystem Vendor ID Subsystem ID This is an optimization when enabling SR-IOV on a device with many VFs. Signed-off-by: KarimAllah Ahmed [bhelgaas: changelog, simplify comments, remove unused "device", test CONFIG_PCI_IOV instead of CONFIG_PCI_ATS, rename functions] Signed-off-by: Bjorn Helgaas drivers/pci/iov.c | 42 +++++++++++++++++++++++++++++++++++------- drivers/pci/pci.h | 4 ++++ drivers/pci/probe.c | 47 ++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 81 insertions(+), 12 deletions(-) commit 1b5d43cfb69759d8ef8d30469cea31d0c037aed5 Author: Jules Maselbas Date: Thu Mar 29 15:43:01 2018 +0100 sched/cpufreq/schedutil: Fix error path mutex unlock This patch prevents the 'global_tunables_lock' mutex from being unlocked before being locked. This mutex is not locked if the sugov_kthread_create() function fails. Signed-off-by: Jules Maselbas Acked-by: Peter Zijlstra Cc: Chris Redpath Cc: Dietmar Eggermann Cc: Linus Torvalds Cc: Mike Galbraith Cc: Patrick Bellasi Cc: Stephen Kyle Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Cc: nd@arm.com Link: http://lkml.kernel.org/r/20180329144301.38419-1-jules.maselbas@arm.com Signed-off-by: Ingo Molnar kernel/sched/cpufreq_schedutil.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 471d7ff8b51b63521c8ea35c51966ab4caa434ee Author: Nicholas Piggin Date: Wed Feb 21 05:08:29 2018 +1000 powerpc/64s: Remove POWER4 support POWER4 has been broken since at least the change 49d09bf2a6 ("powerpc/64s: Optimise MSR handling in exception handling"), which requires mtmsrd L=1 support. This was introduced in ISA v2.01, and POWER4 supports ISA v2.00. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/Makefile | 5 +- arch/powerpc/include/asm/cputable.h | 8 +- arch/powerpc/include/asm/mmu.h | 6 +- arch/powerpc/kernel/cputable.c | 36 +- arch/powerpc/kernel/prom_init.c | 10 +- arch/powerpc/kvm/emulate.c | 6 - arch/powerpc/mm/hash_utils_64.c | 9 +- arch/powerpc/perf/Makefile | 2 +- arch/powerpc/perf/power4-pmu.c | 622 --------------------------------- arch/powerpc/platforms/Kconfig.cputype | 6 +- 10 files changed, 18 insertions(+), 692 deletions(-) commit 3735eb850e6c3e7472329fea368e7d030a4d89dd Author: Nicholas Piggin Date: Wed Feb 21 05:08:28 2018 +1000 powerpc: Remove unused CPU_FTR_ARCH_201 The last usage was removed in c17b98cf6028 ("KVM: PPC: Book3S HV: Remove code for PPC970 processors") (Dec 2014). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9e9626ed3a4affe7fe0e17e98c357849ad299e50 Author: Nicholas Piggin Date: Wed Feb 21 05:08:27 2018 +1000 powerpc/64s: Fix POWER9 DD2.2 and above in DT CPU features The CPU_FTR_POWER9_DD2_1 flag is intended to be set for DD2.1 and above (which is what the cputable setup does). Fix DT CPU features quirk setup to match. Signed-off-by: Nicholas Piggin [mpe: Merge with upstream changes] Signed-off-by: Michael Ellerman arch/powerpc/kernel/dt_cpu_ftrs.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 15a3204d24a3c01b116fb7c0692b7c670cac631d Author: Nicholas Piggin Date: Wed Feb 21 05:08:26 2018 +1000 powerpc/64s: Set assembler machine type to POWER4 Rather than override the machine type in .S code (which can hide wrong or ambiguous code generation for the target), set the type to power4 for all assembly. This also means we need to be careful not to build power4-only code when we're not building for Book3S, such as the "power7" versions of copyuser/page/memcpy. Signed-off-by: Nicholas Piggin [mpe: Fix Book3E build, don't build the "power7" variants for non-Book3S] Signed-off-by: Michael Ellerman arch/powerpc/Makefile | 1 + arch/powerpc/include/asm/ppc_asm.h | 11 ++++------- arch/powerpc/kernel/entry_64.S | 2 +- arch/powerpc/kernel/exceptions-64s.S | 10 ++-------- arch/powerpc/lib/Makefile | 6 ++++-- arch/powerpc/lib/copypage_64.S | 2 ++ arch/powerpc/lib/copypage_power7.S | 3 --- arch/powerpc/lib/copyuser_64.S | 2 ++ arch/powerpc/lib/copyuser_power7.S | 3 --- arch/powerpc/lib/memcpy_64.S | 2 ++ arch/powerpc/lib/memcpy_power7.S | 3 --- 11 files changed, 18 insertions(+), 27 deletions(-) commit d50614fa45760f5ec1772509625e1bf4abe5d052 Author: Nicholas Piggin Date: Wed Feb 21 05:08:25 2018 +1000 powerpc/64s: Explicitly add vector features to CPU_FTRS_POSSIBLE ALTIVEC and VSX features are not added by to default to the POWERx CPU feature sets because they are intended to be enabled by firmware. Currently they end up in CPU_FTRS_POSSIBLE due to their inclusion in other the set for other CPUs, eg. PPC970. But they should be added individually to the CPU_FTRS_POSSIBLE set, because if we reduce the set of CPUs that are built-for they may disappear from the possible mask. It already contains CPU_FTR_VSX, so add ALTIVEC. The _COMP features should be used because they won't be present if compiled out. Signed-off-by: Nicholas Piggin [mpe: Add detail to change log] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b842bd0f7a61b129a672f8b038325e2ca5d36329 Author: Nicholas Piggin Date: Wed Feb 21 05:08:24 2018 +1000 powerpc/64s: Add all POWER9 features to CPU_FTRS_ALWAYS It's not a bug to have features missing in CPU_FTR_ALWAYS, but it is a missed opportunity for optimisation. Signed-off-by: Nicholas Piggin [mpe: Change log] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 147704534e2de30dd47171d55240c394b24f4053 Author: Mark Greer Date: Fri Mar 16 14:54:43 2018 -0700 powerpc/boot: Remove duplicate typedefs from libfdt_env.h When building a uImage or zImage using ppc6xx_defconfig and some other defconfigs, the following error occurs with GCC 4.5.1: /arch/powerpc/boot/libfdt_env.h:10:13: error: redefinition of typedef 'uint32_t' /arch/powerpc/boot/types.h:21:13: note: previous declaration of 'uint32_t' was here /arch/powerpc/boot/libfdt_env.h:11:13: error: redefinition of typedef 'uint64_t' /arch/powerpc/boot/types.h:22:13: note: previous declaration of 'uint64_t' was here The problem is that commit 656ad58ef19e (powerpc/boot: Add OPAL console to epapr wrappers) adds typedefs for uint32_t and uint64_t to type.h but doesn't remove the pre-existing (and now duplicate) typedefs from libfdt_env.h. Fix the error by removing the duplicate typedefs from libfdt_env.h Signed-off-by: Mark Greer Signed-off-by: Michael Ellerman arch/powerpc/boot/libfdt_env.h | 2 -- 1 file changed, 2 deletions(-) commit 8c1c7fb0b5ec95c392e9b585a6cf8cde254308d3 Author: Nicholas Piggin Date: Sat Nov 18 00:08:06 2017 +1000 powerpc/64s/idle: avoid sync for KVM state when waking from idle When waking from a CPU idle instruction (e.g., nap or stop), the sync for ordering the KVM secondary thread state can be avoided if there wakeup is coming from a kernel context rather than KVM context. This improves performance for ping-pong benchmark with the stop0 idle state by 0.46% for 2 threads in the same core, and 1.02% for different cores. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 3 +++ 1 file changed, 3 insertions(+) commit 3d4fbffdd703d2b968db443911f2147c732a4a48 Author: Nicholas Piggin Date: Sat Nov 18 00:08:05 2017 +1000 powerpc/64s/idle: POWER9 implement a separate idle stop function for hotplug Implement a new function to invoke stop, power9_offline_stop, which is like power9_idle_stop but used by the cpu hotplug code. Move KVM secondary state manipulation code to the offline case. Signed-off-by: Nicholas Piggin Reviewed-by: Vaidyanathan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/include/asm/processor.h | 1 + arch/powerpc/kernel/idle_book3s.S | 24 ++++++++++++++++++------ arch/powerpc/platforms/powernv/idle.c | 2 +- 3 files changed, 20 insertions(+), 7 deletions(-) commit d40b6768e45bd9213139b2d91d30c7692b6007b1 Author: Nicholas Piggin Date: Tue Mar 27 01:01:16 2018 +1000 powerpc/64s: sreset panic if there is no debugger or crash dump handlers system_reset_exception does most of its own crash handling now, invoking the debugger or crash dumps if they are registered. If not, then it goes through to die() to print stack traces, and then is supposed to panic (according to comments). However after die() prints oopses, it does its own handling which doesn't allow system_reset_exception to panic (e.g., it may just kill the current process). This patch causes sreset exceptions to return from die after it prints messages but before acting. This also stops die from invoking the debugger on 0x100 crashes. system_reset_exception similarly calls the debugger. It had been thought this was harmless (because if the debugger was disabled, neither call would fire, and if it was enabled the first call would return). However in some cases like xmon 'X' command, the debugger returns 0, which currently causes it to be entered again (first in system_reset_exception, then in die), which is confusing. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/traps.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 15b4dd7981496f51c5f9262a5e0761e48de6655f Author: Nicholas Piggin Date: Tue Mar 27 01:01:03 2018 +1000 powerpc/64s: return more carefully from sreset NMI System Reset, being an NMI, must return more carefully than other interrupts. It has traditionally returned via the nromal return from exception path, but that has a number of problems. - r13 does not get restored if returning to kernel. This is for interrupts which may cause a context switch, which sreset will never do. Interrupting OPAL (which uses a different r13) is one place where this causes breakage. - It may cause several other problems returning to kernel with preempt or TIF_EMULATE_STACK_STORE if it hits at the wrong time. It's safer just to have a simple restore and return, like machine check which is the other NMI. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 61 ++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 3 deletions(-) commit f0295e047fcf52ccb42561fb7de6942f5201b676 Author: Michael Neuling Date: Mon Mar 26 15:17:07 2018 +1100 powerpc/eeh: Fix race with driver un/bind The current EEH callbacks can race with a driver unbind. This can result in a backtraces like this: EEH: Frozen PHB#0-PE#1fc detected EEH: PE location: S000009, PHB location: N/A CPU: 2 PID: 2312 Comm: kworker/u258:3 Not tainted 4.15.6-openpower1 #2 Workqueue: nvme-wq nvme_reset_work [nvme] Call Trace: dump_stack+0x9c/0xd0 (unreliable) eeh_dev_check_failure+0x420/0x470 eeh_check_failure+0xa0/0xa4 nvme_reset_work+0x138/0x1414 [nvme] process_one_work+0x1ec/0x328 worker_thread+0x2e4/0x3a8 kthread+0x14c/0x154 ret_from_kernel_thread+0x5c/0xc8 nvme nvme1: Removing after probe failure status: -19 cpu 0x23: Vector: 300 (Data Access) at [c000000ff50f3800] pc: c0080000089a0eb0: nvme_error_detected+0x4c/0x90 [nvme] lr: c000000000026564: eeh_report_error+0xe0/0x110 sp: c000000ff50f3a80 msr: 9000000000009033 dar: 400 dsisr: 40000000 current = 0xc000000ff507c000 paca = 0xc00000000fdc9d80 softe: 0 irq_happened: 0x01 pid = 782, comm = eehd Linux version 4.15.6-openpower1 (smc@smc-desktop) (gcc version 6.4.0 (Buildroot 2017.11.2-00008-g4b6188e)) #2 SM P Tue Feb 27 12:33:27 PST 2018 enter ? for help eeh_report_error+0xe0/0x110 eeh_pe_dev_traverse+0xc0/0xdc eeh_handle_normal_event+0x184/0x4c4 eeh_handle_event+0x30/0x288 eeh_event_handler+0x124/0x170 kthread+0x14c/0x154 ret_from_kernel_thread+0x5c/0xc8 The first part is an EEH (on boot), the second half is the resulting crash. nvme probe starts the nvme_reset_work() worker thread. This worker thread starts touching the device which see a device error (EEH) and hence queues up an event in the powerpc EEH worker thread. nvme_reset_work() then continues and runs nvme_remove_dead_ctrl_work() which results in unbinding the driver from the device and hence releases all resources. At the same time, the EEH worker thread starts doing the EEH .error_detected() driver callback, which no longer works since the resources have been freed. This fixes the problem in the same way the generic PCIe AER code (in drivers/pci/pcie/aer/aerdrv_core.c) does. It makes the EEH code hold the device_lock() while performing the driver EEH callbacks and associated code. This ensures either the callbacks are no longer register, or if they are registered the driver will not be removed from underneath us. This has been broken forever. The EEH call backs were first introduced in 2005 (in 77bd7415610) but it's not clear if a lock was needed back then. Fixes: 77bd74156101 ("[PATCH] powerpc: PCI Error Recovery: PPC64 core recovery routines") Cc: stable@vger.kernel.org # v2.6.16+ Signed-off-by: Michael Neuling Reviewed-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 68 +++++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 26 deletions(-) commit bf8a1abc3ddbd6e9a8312ea7d96e5dd89c140f18 Author: Thiago Jung Bauermann Date: Thu Mar 29 16:05:43 2018 -0300 powerpc/kexec_file: Fix error code when trying to load kdump kernel kexec_file_load() on powerpc doesn't support kdump kernels yet, so it returns -ENOTSUPP in that case. I've recently learned that this errno is internal to the kernel and isn't supposed to be exposed to userspace. Therefore, change to -EOPNOTSUPP which is defined in an uapi header. This does indeed make kexec-tools happier. Before the patch, on ppc64le: # ~bauermann/src/kexec-tools/build/sbin/kexec -s -p /boot/vmlinuz kexec_file_load failed: Unknown error 524 After the patch: # ~bauermann/src/kexec-tools/build/sbin/kexec -s -p /boot/vmlinuz kexec_file_load failed: Operation not supported Fixes: a0458284f062 ("powerpc: Add support code for kexec_file_load()") Cc: stable@vger.kernel.org # v4.10+ Reported-by: Dave Young Signed-off-by: Thiago Jung Bauermann Reviewed-by: Simon Horman Reviewed-by: Dave Young Signed-off-by: Michael Ellerman arch/powerpc/kernel/machine_kexec_file_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e1405917c145edbb7d4cd520e890e44161dd7be Author: Jonathan Neuschäfer Date: Wed Mar 28 02:25:44 2018 +0200 powerpc/mm/32: Remove the reserved memory hack This hack, introduced in commit c5df7f775148 ("powerpc: allow ioremap within reserved memory regions") is now unnecessary. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Michael Ellerman arch/powerpc/mm/init_32.c | 5 ----- arch/powerpc/mm/mmu_decl.h | 1 - arch/powerpc/mm/pgtable_32.c | 3 +-- 3 files changed, 1 insertion(+), 8 deletions(-) commit 57deb8fea01f732d83711ab3b3310204d0026ba8 Author: Jonathan Neuschäfer Date: Wed Mar 28 02:25:43 2018 +0200 powerpc/wii: Don't rely on the reserved memory hack Because the two memory blocks (usually called MEM1 and MEM2) are not merged anymore, __request_region in kernel/resource.c will correctly allow reserving regions in the physical address space between MEM1 and MEM2, where many important peripherals are (GPIO, MMC, USB, ...). A previous change to __ioremap_caller in arch/powerpc/mm/pgtable_32.c ensures that multiple memblocks are properly considered in ioremap; this makes it unnecessary to set __allow_ioremap_reserved. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Michael Ellerman arch/powerpc/platforms/embedded6xx/wii.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 2bbf63264ab2e8cbc740c738f66984b2aafa29c5 Author: Jonathan Neuschäfer Date: Wed Mar 28 02:25:42 2018 +0200 powerpc/mm/32: Use page_is_ram to check for RAM On systems where there is MMIO space between different blocks of RAM in the physical address space, __ioremap_caller did not allow mapping these MMIO areas, because they were below the end RAM and thus considered RAM as well. Use the memblock-based page_is_ram function, which returns false for such MMIO holes. v2: Keep the check for p < virt_to_phys(high_memory). On 32-bit systems with high memory (memory above physical address 4GiB), the high memory is expected to be available though ioremap. The high_memory variable marks the end of low memory; comparing against it means that only ioremap requests for low RAM will be denied. Reported by Michael Ellerman. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable_32.c | 1 + 1 file changed, 1 insertion(+) commit f65e67c7e3308c0af08080782d79a8cb95c44929 Author: Jonathan Neuschäfer Date: Wed Mar 28 02:25:41 2018 +0200 powerpc/mm: Use memblock API for PPC32 page_is_ram To support accurate checking for different blocks of memory on PPC32, use the same memblock-based approach that's already used on PPC64 also on PPC32. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Michael Ellerman arch/powerpc/mm/mem.c | 4 ---- 1 file changed, 4 deletions(-) commit 2615c93e5f52db62586112793d889face99eb905 Author: Jonathan Neuschäfer Date: Wed Mar 28 02:25:40 2018 +0200 powerpc/mm: Simplify page_is_ram by using memblock_is_memory Instead of open-coding the search in page_is_ram, call memblock_is_memory. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Michael Ellerman arch/powerpc/mm/mem.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 041413b88d6e9c66582d0a38d0e82f8933d42d9a Author: Jonathan Neuschäfer Date: Sat Mar 17 16:06:17 2018 +0100 powerpc/wii.dts: Add drive slot LED The Wii has a blue LED in the disk drive slot, which is controlled via a GPIO line. Add this LED to wii.dts, and mark it as a panic-indicator. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Michael Ellerman arch/powerpc/boot/dts/wii.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 80873a0b3a826bbd5db3c76601a38bfcaaa23c9a Author: Jonathan Neuschäfer Date: Fri Feb 9 13:07:31 2018 +0100 powerpc/wii.dts: Add GPIO line names These are the GPIO line names on a Nintendo Wii, as documented in: https://wiibrew.org/wiki/Hardware/Hollywood_GPIOs Signed-off-by: Jonathan Neuschäfer Signed-off-by: Michael Ellerman arch/powerpc/boot/dts/wii.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9693d5709f8e771c21114ebca59b11e61db9774c Author: Jonathan Neuschäfer Date: Fri Feb 9 13:07:30 2018 +0100 powerpc/wii.dts: Add ngpios property The Hollywood GPIO controller supports 32 GPIOs, but on the Wii, only 24 are used. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Michael Ellerman arch/powerpc/boot/dts/wii.dts | 1 + 1 file changed, 1 insertion(+) commit 9cbaaec1cf0c9f4861c4c1dd65f3ede218c1ab2f Author: Jonathan Neuschäfer Date: Fri Feb 9 13:07:28 2018 +0100 powerpc/wii: Explicitly configure GPIO owner for poweroff pin The Hollywood chipset's GPIO controller has two sets of registers: One for access by the PowerPC CPU, and one for access by the ARM coprocessor (but both are accessible from the PPC because the memory firewall (AHBPROT) is usually disabled when booting Linux, today). The wii_power_off function currently assumes that the poweroff GPIO pin is configured for use via the ARM side, but the upcoming GPIO driver configures all pins for use via the PPC side, breaking poweroff. Configure the owner register explicitly in wii_power_off to make wii_power_off work with and without the new GPIO driver. I think the Wii can be switched to the generic gpio-poweroff driver, after the GPIO driver is merged. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Michael Ellerman arch/powerpc/platforms/embedded6xx/wii.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7ab96c0a083f3a298ae595ea142058a20c6e34f6 Author: Jonathan Neuschäfer Date: Tue Feb 6 13:37:04 2018 +0100 powerpc/wii: Probe the whole devicetree Previously, wii_device_probe would only initialize devices under the /hollywood node. After this patch, platform devices placed outside of /hollywood will also be initialized. The intended usecase for this are devices located outside of the Hollywood chip, such as GPIO LEDs and GPIO buttons. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Michael Ellerman arch/powerpc/platforms/embedded6xx/wii.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d0afc0d5a7c281f8ced3bd39f61f3328d5d3822 Author: Michael Ellerman Date: Sat Mar 31 20:57:10 2018 +1100 powerpc/64e: Fix oops due to deferral of paca allocation On 64-bit Book3E systems, in setup_tlb_core_data() we reference other CPUs pacas. But in commit 59f577743d71 ("powerpc/64: Defer paca allocation until memory topology is discovered") the allocation of non-boot-CPU pacas was deferred until later in boot. This leads to an oops: CPU maps initialized for 1 thread per core Unable to handle kernel paging request for data at address 0x8888888888888918 Faulting instruction address: 0xc000000000e2f0d0 Oops: Kernel access of bad area, sig: 11 [#1] NIP .setup_tlb_core_data+0xdc/0x160 Call Trace: .setup_tlb_core_data+0x5c/0x160 (unreliable) .setup_arch+0x80/0x348 .start_kernel+0x7c/0x598 start_here_common+0x1c/0x40 Luckily setup_tlb_core_data() is called immediately prior to smp_setup_pacas(). So simply switching their order is sufficient to fix the oops and seems unlikely to have any other unwanted side effects. Fixes: 59f577743d71 ("powerpc/64: Defer paca allocation until memory topology is discovered") Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup-common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ca9a16c3bc1582da62ef9c47fc22008447f7ae0e Author: Aneesh Kumar K.V Date: Fri Mar 30 17:27:24 2018 +0530 powerpc/kvm: Fix guest boot failure on Power9 since DAWR changes SLOF checks for 'sc 1' (hypercall) support by issuing a hcall with H_SET_DABR. Since the recent commit e8ebedbf3131 ("KVM: PPC: Book3S HV: Return error from h_set_dabr() on POWER9") changed H_SET_DABR to return H_UNSUPPORTED on Power9, we see guest boot failures, the symptom is the boot seems to just stop in SLOF, eg: SLOF *************************************************************** QEMU Starting Build Date = Sep 24 2017 12:23:07 FW Version = buildd@ release 20170724 SLOF can cope if H_SET_DABR returns H_HARDWARE. So wwitch the return value to H_HARDWARE instead of H_UNSUPPORTED so that we don't break the guest boot. That does mean we return a different error to PowerVM in this case, but that's probably not a big concern. Fixes: e8ebedbf3131 ("KVM: PPC: Book3S HV: Return error from h_set_dabr() on POWER9") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1159e09476536250c2a0173d4298d15114df7a89 Author: Harry Pan Date: Fri Mar 9 20:15:48 2018 +0800 perf/x86/intel: Enable C-state residency events for Cannon Lake Cannon Lake supports C1/C3/C6/C7, PC2/PC3/PC6/PC7/PC8/PC9/PC10 state residency counters, this patch enables those counters. ( The MSR information is based on Intel Software Developers' Manual, Vol. 4, Order No. 335592. ) Tested-by: Puthikorn Voravootivat Signed-off-by: Harry Pan Reviewed-by: Benson Leung Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Kan.liang@intel.com Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: gs0622@gmail.com Link: http://lkml.kernel.org/r/20180309121549.630-3-harry.pan@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/cstate.c | 44 +++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) commit 490d03e83da2a5e9d7db84b1ec30a9c95415787e Author: Harry Pan Date: Fri Mar 9 20:15:47 2018 +0800 perf/x86/intel: Add Cannon Lake support for RAPL profiling This patch enables RAPL counters (energy consumption counters) support for Cannon Lake processors. ( ESU and power domains refer to Intel Software Developers' Manual, Vol. 4, Order No. 335592. ) Usage example: $ perf list $ perf stat -a -e power/energy-cores/,power/energy-pkg/ sleep 10 Tested-by: Puthikorn Voravootivat Signed-off-by: Harry Pan Reviewed-by: Benson Leung Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: colin.king@canonical.com Cc: gs0622@gmail.com Cc: kan.liang@linux.intel.com Link: http://lkml.kernel.org/r/20180309121549.630-2-harry.pan@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/rapl.c | 2 ++ 1 file changed, 2 insertions(+) commit 6f1d7c45dbbadd1a3c6eb9a9a485ef1975be4760 Author: Chris Chiu Date: Sat Mar 31 10:09:31 2018 +0800 ACPI / PM: Fix keyboard wakeup from suspend-to-idle on ASUS UX331UA This issue happens on new ASUS laptop UX331UA which has modern standby mode (suspend-to-idle). Pressing keys on the PS2 keyboard can't wake up the system from suspend-to-idle which is not expected. However, pressing power button can wake up without problem. Per the engineers of ASUS, the keypress event is routed to Embedded Controller (EC) in standby mode. EC then signals the SCI event to BIOS so BIOS would Notify() power button to wake up the system. It's from BIOS perspective. What we observe here is that kernel receives the SCI event from SCI interrupt handler which informs that the GPE status bit belongs to EC needs to be handled and then queries the EC to find out what event is pending. Then execute the following ACPI _QDF method which defined in ACPI DSDT for EC to notify power button. Method (_QDF, 0, NotSerialized) // _Qxx: EC Query { Notify (PWRB, 0x80) // Status Change } With more debug messages added to analyze this problem, we find that the keypress does wake up the system from suspend-to-idle but it's back to suspend again almost immediately. As we see in the following messages, the acpi_button_notify() is invoked but acpi_pm_wakeup_event() can not really wake up the system here because acpi_s2idle_wakeup() is false. The acpi_s2idle_wakeup() returnd false because the acpi_s2idle_sync() has alrealdy exited. [ 52.987048] s2idle_loop going s2idle [ 59.713392] acpi_s2idle_wake enter [ 59.713394] acpi_s2idle_wake exit [ 59.760888] acpi_ev_gpe_detect enter [ 59.760893] acpi_s2idle_sync enter [ 59.760893] acpi_ec_query_flushed ec pending queries 0 [ 59.760953] Read registers for GPE 50-57: Status=01, Enable=01, RunEnable=01, WakeEnable=00 [ 59.760955] ACPI: EC: ===== IRQ (1) ===== [ 59.760972] ACPI: EC: EC_SC(R) = 0x28 SCI_EVT=1 BURST=0 CMD=1 IBF=0 OBF=0 [ 59.760979] ACPI: EC: +++++ Polling enabled +++++ [ 59.760979] ACPI: EC: ##### Command(QR_EC) submitted/blocked ##### [ 59.761003] acpi_s2idle_sync exit [ 59.769587] ACPI: EC: ##### Query(0xdf) started ##### [ 59.769611] ACPI: EC: ##### Query(0xdf) stopped ##### [ 59.774154] acpi_button_notify button type 1 [ 59.813175] s2idle_loop going s2idle acpi_s2idle_sync() already makes an effort to flush the EC event queue, but in this case, the EC event has yet to be generated when the call to acpi_ec_flush_work() is made. The event is generated shortly after, through the ongoing handling of the SCI interrupt which is happening on another CPU, and we must synchronize that to make sure that it has run and completed. Adding another call to acpi_os_wait_events_complete() solves this issue, since that function synchronizes with SCI interrupt completion. Signed-off-by: Chris Chiu [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki drivers/acpi/sleep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eaeb8e76cd5751e805f6e4a3fcec91d283e3b0c2 Author: Colin Ian King Date: Tue Mar 13 15:47:09 2018 +0000 x86/cpu/tme: Fix spelling: "configuation" -> "configuration" Trivial fix to spelling mistake in the pr_err_once() error message text. Signed-off-by: Colin Ian King Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/20180313154709.1015-1-colin.king@canonical.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6289f36aa7d5893d091a7a0c67eee7798719f03 Author: Cao jin Date: Fri Mar 16 16:49:44 2018 +0800 x86/build: Don't pass in -D__KERNEL__ multiple times Some ..cmd files under arch/x86 are showing two instances of -D__KERNEL__, like arch/x86/boot/ and arch/x86/realmode/rm/. __KERNEL__ is already defined in KBUILD_CPPFLAGS in the top Makefile, so it can be dropped safely. Signed-off-by: Cao jin Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Masahiro Yamada Cc: Michal Marek Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kbuild@vger.kernel.org Link: http://lkml.kernel.org/r/20180316084944.3997-1-caoj.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/Makefile | 3 +-- arch/x86/boot/compressed/Makefile | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit 19193bcad8dced863f2f720b1a76110bda07c970 Author: Waiman Long Date: Fri Mar 30 17:28:00 2018 -0400 locking/Kconfig: Restructure the lock debugging menu Two config options in the lock debugging menu that are probably the most frequently used, as far as I am concerned, is the PROVE_LOCKING and LOCK_STAT. From a UI perspective, they should be front and center. So these two options are now moved to the top of the lock debugging menu. The DEBUG_WW_MUTEX_SLOWPATH option is also added to the PROVE_LOCKING umbrella. Signed-off-by: Waiman Long Acked-by: Davidlohr Bueso Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1522445280-7767-4-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar lib/Kconfig.debug | 135 +++++++++++++++++++++++++++--------------------------- 1 file changed, 68 insertions(+), 67 deletions(-) commit f07cbebb6daf04e5c9721e5be2737a6068c7e2a2 Author: Waiman Long Date: Fri Mar 30 17:27:59 2018 -0400 locking/Kconfig: Add LOCK_DEBUGGING_SUPPORT to make it more readable There are a couples of lock debugging Kconfig options that depends on the following support options: - TRACE_IRQFLAGS_SUPPORT - STACKTRACE_SUPPORT - LOCKDEP_SUPPORT That makes those lock debugging options harder to read and understand. So a new LOCK_DEBUGGING_SUPPORT option is added that is equivalent to the above three options together. That makes the Kconfig.debug file more readable. Signed-off-by: Waiman Long Acked-by: Davidlohr Bueso Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1522445280-7767-3-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar lib/Kconfig.debug | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 5149cbac4235e12a34cf089592a8bd1c9fcfa467 Author: Waiman Long Date: Fri Mar 30 17:27:58 2018 -0400 locking/rwsem: Add DEBUG_RWSEMS to look for lock/unlock mismatches For a rwsem, locking can either be exclusive or shared. The corresponding exclusive or shared unlock must be used. Otherwise, the protected data structures may get corrupted or the lock may be in an inconsistent state. In order to detect such anomaly, a new configuration option DEBUG_RWSEMS is added which can be enabled to look for such mismatches and print warnings that that happens. Signed-off-by: Waiman Long Acked-by: Davidlohr Bueso Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1522445280-7767-2-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/rwsem.c | 4 ++++ kernel/locking/rwsem.h | 8 +++++++- lib/Kconfig.debug | 8 ++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) commit 169310f71fc820fe153ec04c6a111e444a68d6d5 Merge: b3c3975 c2a9838 Author: Ingo Molnar Date: Sat Mar 31 07:30:17 2018 +0200 Merge branch 'linus' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit 588558eb6d0e0b6edfa65a67e906c2ffeba63ff1 Author: Colin Ian King Date: Tue Mar 27 14:35:58 2018 +0100 apparmor: fix memory leak on buffer on error exit path Currently on the error exit path the allocated buffer is not free'd causing a memory leak. Fix this by kfree'ing it. Detected by CoverityScan, CID#1466876 ("Resource leaks") Fixes: 1180b4c757aa ("apparmor: fix dangling symlinks to policy rawdata after replacement") Signed-off-by: Colin Ian King Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a95b37e20db9a2b05354eec009b2188523a21c8e Author: Masahiro Yamada Date: Tue Mar 27 21:52:50 2018 +0900 kbuild: get out of Since commit 28128c61e08e ("kconfig.h: Include compiler types to avoid missed struct attributes"), pulls in kernel-space headers to unrelated places. Commit 0f9da844d877 ("MIPS: boot: Define __ASSEMBLY__ for its.S build") suppress the build error by defining __ASSEMBLY__, but ITS (i.e. DTS) is not assembly, and should not include in the first place. Looking at arch/s390/tools/Makefile, host programs gen_facilities and gen_opcode_table now pull in as well. The motivation for that commit was to define necessary attributes before any struct is defined. Obviously, this happens only in C. It is enough to include only when compiling C files, and only when compiling kernel space. Move the include to c_flags. Signed-off-by: Masahiro Yamada include/linux/kconfig.h | 3 --- scripts/Makefile.lib | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) commit df0ce17331e2501dbffc060041dfc6c5f85227b5 Author: Sargun Dhillon Date: Thu Mar 29 01:28:23 2018 +0000 security: convert security hooks to use hlist This changes security_hook_heads to use hlist_heads instead of the circular doubly-linked list heads. This should cut down the size of the struct by about half. In addition, it allows mutation of the hooks at the tail of the callback list without having to modify the head. The longer-term purpose of this is to enable making the heads read only. Signed-off-by: Sargun Dhillon Reviewed-by: Tetsuo Handa Acked-by: Casey Schaufler Signed-off-by: James Morris include/linux/lsm_hooks.h | 428 +++++++++++++------------- scripts/gcc-plugins/randomize_layout_plugin.c | 4 +- security/security.c | 22 +- 3 files changed, 227 insertions(+), 227 deletions(-) commit 7828f20e3779e4e85e55371e0e43f5006a15fb41 Merge: 807ae7d 1d43688 Author: Daniel Borkmann Date: Sat Mar 31 02:17:57 2018 +0200 Merge branch 'bpf-cgroup-bind-connect' Andrey Ignatov says: ==================== v2->v3: - rebase due to conflicts - fix ipv6=m build v1->v2: - support expected_attach_type at prog load time so that prog (incl. context accesses and calls to helpers) can be validated with regard to specific attach point it is supposed to be attached to. Later, at attach time, attach type is checked so that it must be same as at load time if it was provided - reworked hooks to rely on expected_attach_type, and reduced number of new prog types from 6 to just 1: BPF_PROG_TYPE_CGROUP_SOCK_ADDR - reused BPF_PROG_TYPE_CGROUP_SOCK for sys_bind post-hooks - add selftests for post-sys_bind hook For our container management we've been using complicated and fragile setup consisting of LD_PRELOAD wrapper intercepting bind and connect calls from all containerized applications. Unfortunately it doesn't work for apps that don't use glibc and changing all applications that run in the datacenter is not possible due to 3rd party code and libraries (despite being open source code) and sheer amount of legacy code that has to be rewritten (we're rewriting what we can in parallel) These applications are written without containers in mind and have builtin assumptions about network services. Like an application X expects to connect localhost:special_port and find service Y in there. To move application X and service Y into two different containers LD_PRELOAD approach is used to help one service connect to another without rewriting them. Moving these two applications into different L2 (netns) or L3 (vrf) network isolation scopes doesn't help to solve the problem, since applications need to see each other like they were running on the host without containers. So if app X and app Y would run in different netns something would need to punch a connectivity hole in those namespaces. That would be real layering violation (with corresponding network debugging pains), since clean l2, l3 abstraction would suddenly support something that breaks through the layers. Instead we used LD_PRELOAD (and now bpf programs) at bind/connect time to help applications discover and connect to each other. All applications are running in init_nens and there are no vrfs. After bind/connect the normal fib/neighbor core networking logic works as it should always do and the whole system is clean from network point of view and can be debugged with standard tools. We also considered resurrecting Hannes's afnetns work, but all hierarchical namespace abstraction don't work due to these builtin networking assumptions inside the apps. To run an application inside cgroup container that was not written with containers in mind we have to make an illusion of running in non-containerized environment. In some cases we remember the port and container id in the post-bind hook in a bpf map and when some other task in a different container is trying to connect to a service we need to know where this service is running. It can be remote and can be local. Both client and service may or may not be written with containers in mind and this sockaddr rewrite is providing connectivity and load balancing feature. BPF+cgroup looks to be the best solution for this problem. Hence we introduce 3 hooks: - at entry into sys_bind and sys_connect to let bpf prog look and modify 'struct sockaddr' provided by user space and fail bind/connect when appropriate - post sys_bind after port is allocated The approach works great and has zero overhead for anyone who doesn't use it and very low overhead when deployed. Different use case for this feature is to do low overhead firewall that doesn't need to inspect all packets and works at bind/connect time. ==================== Signed-off-by: Daniel Borkmann commit 1d436885b23bf4474617914d7eb15e039c83ed99 Author: Andrey Ignatov Date: Fri Mar 30 15:08:08 2018 -0700 selftests/bpf: Selftest for sys_bind post-hooks. Add selftest for attach types `BPF_CGROUP_INET4_POST_BIND` and `BPF_CGROUP_INET6_POST_BIND`. The main things tested are: * prog load behaves as expected (valid/invalid accesses in prog); * prog attach behaves as expected (load- vs attach-time attach types); * `BPF_CGROUP_INET_SOCK_CREATE` can be attached in a backward compatible way; * post-hooks return expected result and errno. Example: # ./test_sock Test case: bind4 load with invalid access: src_ip6 .. [PASS] Test case: bind4 load with invalid access: mark .. [PASS] Test case: bind6 load with invalid access: src_ip4 .. [PASS] Test case: sock_create load with invalid access: src_port .. [PASS] Test case: sock_create load w/o expected_attach_type (compat mode) .. [PASS] Test case: sock_create load w/ expected_attach_type .. [PASS] Test case: attach type mismatch bind4 vs bind6 .. [PASS] Test case: attach type mismatch bind6 vs bind4 .. [PASS] Test case: attach type mismatch default vs bind4 .. [PASS] Test case: attach type mismatch bind6 vs sock_create .. [PASS] Test case: bind4 reject all .. [PASS] Test case: bind6 reject all .. [PASS] Test case: bind6 deny specific IP & port .. [PASS] Test case: bind4 allow specific IP & port .. [PASS] Test case: bind4 allow all .. [PASS] Test case: bind6 allow all .. [PASS] Summary: 16 PASSED, 0 FAILED Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann tools/include/uapi/linux/bpf.h | 11 + tools/testing/selftests/bpf/Makefile | 4 +- tools/testing/selftests/bpf/test_sock.c | 479 ++++++++++++++++++++++++++++++++ 3 files changed, 493 insertions(+), 1 deletion(-) commit aac3fc320d9404f2665a8b1249dc3170d5fa3caf Author: Andrey Ignatov Date: Fri Mar 30 15:08:07 2018 -0700 bpf: Post-hooks for sys_bind "Post-hooks" are hooks that are called right before returning from sys_bind. At this time IP and port are already allocated and no further changes to `struct sock` can happen before returning from sys_bind but BPF program has a chance to inspect the socket and change sys_bind result. Specifically it can e.g. inspect what port was allocated and if it doesn't satisfy some policy, BPF program can force sys_bind to fail and return EPERM to user. Another example of usage is recording the IP:port pair to some map to use it in later calls to sys_connect. E.g. if some TCP server inside cgroup was bound to some IP:port_n, it can be recorded to a map. And later when some TCP client inside same cgroup is trying to connect to 127.0.0.1:port_n, BPF hook for sys_connect can override the destination and connect application to IP:port_n instead of 127.0.0.1:port_n. That helps forcing all applications inside a cgroup to use desired IP and not break those applications if they e.g. use localhost to communicate between each other. == Implementation details == Post-hooks are implemented as two new attach types `BPF_CGROUP_INET4_POST_BIND` and `BPF_CGROUP_INET6_POST_BIND` for existing prog type `BPF_PROG_TYPE_CGROUP_SOCK`. Separate attach types for IPv4 and IPv6 are introduced to avoid access to IPv6 field in `struct sock` from `inet_bind()` and to IPv4 field from `inet6_bind()` since those fields might not make sense in such cases. Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann include/linux/bpf-cgroup.h | 16 +++++-- include/uapi/linux/bpf.h | 11 +++++ kernel/bpf/syscall.c | 43 +++++++++++++++++ net/core/filter.c | 116 +++++++++++++++++++++++++++++++++++++++------ net/ipv4/af_inet.c | 18 ++++--- net/ipv6/af_inet6.c | 21 +++++--- 6 files changed, 195 insertions(+), 30 deletions(-) commit 622adafb2a12cac6042d4d0d7eb735b7621bf28c Author: Andrey Ignatov Date: Fri Mar 30 15:08:06 2018 -0700 selftests/bpf: Selftest for sys_connect hooks Add selftest for BPF_CGROUP_INET4_CONNECT and BPF_CGROUP_INET6_CONNECT attach types. Try to connect(2) to specified IP:port and test that: * remote IP:port pair is overridden; * local end of connection is bound to specified IP. All combinations of IPv4/IPv6 and TCP/UDP are tested. Example: # tcpdump -pn -i lo -w connect.pcap 2>/dev/null & [1] 478 # strace -qqf -e connect -o connect.trace ./test_sock_addr.sh Wait for testing IPv4/IPv6 to become available ... OK Load bind4 with invalid type (can pollute stderr) ... REJECTED Load bind4 with valid type ... OK Attach bind4 with invalid type ... REJECTED Attach bind4 with valid type ... OK Load connect4 with invalid type (can pollute stderr) libbpf: load bpf \ program failed: Permission denied libbpf: -- BEGIN DUMP LOG --- libbpf: 0: (b7) r2 = 23569 1: (63) *(u32 *)(r1 +24) = r2 2: (b7) r2 = 16777343 3: (63) *(u32 *)(r1 +4) = r2 invalid bpf_context access off=4 size=4 [ 1518.404609] random: crng init done libbpf: -- END LOG -- libbpf: failed to load program 'cgroup/connect4' libbpf: failed to load object './connect4_prog.o' ... REJECTED Load connect4 with valid type ... OK Attach connect4 with invalid type ... REJECTED Attach connect4 with valid type ... OK Test case #1 (IPv4/TCP): Requested: bind(192.168.1.254, 4040) .. Actual: bind(127.0.0.1, 4444) Requested: connect(192.168.1.254, 4040) from (*, *) .. Actual: connect(127.0.0.1, 4444) from (127.0.0.4, 56068) Test case #2 (IPv4/UDP): Requested: bind(192.168.1.254, 4040) .. Actual: bind(127.0.0.1, 4444) Requested: connect(192.168.1.254, 4040) from (*, *) .. Actual: connect(127.0.0.1, 4444) from (127.0.0.4, 56447) Load bind6 with invalid type (can pollute stderr) ... REJECTED Load bind6 with valid type ... OK Attach bind6 with invalid type ... REJECTED Attach bind6 with valid type ... OK Load connect6 with invalid type (can pollute stderr) libbpf: load bpf \ program failed: Permission denied libbpf: -- BEGIN DUMP LOG --- libbpf: 0: (b7) r6 = 0 1: (63) *(u32 *)(r1 +12) = r6 invalid bpf_context access off=12 size=4 libbpf: -- END LOG -- libbpf: failed to load program 'cgroup/connect6' libbpf: failed to load object './connect6_prog.o' ... REJECTED Load connect6 with valid type ... OK Attach connect6 with invalid type ... REJECTED Attach connect6 with valid type ... OK Test case #3 (IPv6/TCP): Requested: bind(face:b00c:1234:5678::abcd, 6060) .. Actual: bind(::1, 6666) Requested: connect(face:b00c:1234:5678::abcd, 6060) from (*, *) Actual: connect(::1, 6666) from (::6, 37458) Test case #4 (IPv6/UDP): Requested: bind(face:b00c:1234:5678::abcd, 6060) .. Actual: bind(::1, 6666) Requested: connect(face:b00c:1234:5678::abcd, 6060) from (*, *) Actual: connect(::1, 6666) from (::6, 39315) ### SUCCESS # egrep 'connect\(.*AF_INET' connect.trace | \ > egrep -vw 'htons\(1025\)' | fold -b -s -w 72 502 connect(7, {sa_family=AF_INET, sin_port=htons(4040), sin_addr=inet_addr("192.168.1.254")}, 128) = 0 502 connect(8, {sa_family=AF_INET, sin_port=htons(4040), sin_addr=inet_addr("192.168.1.254")}, 128) = 0 502 connect(9, {sa_family=AF_INET6, sin6_port=htons(6060), inet_pton(AF_INET6, "face:b00c:1234:5678::abcd", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 128) = 0 502 connect(10, {sa_family=AF_INET6, sin6_port=htons(6060), inet_pton(AF_INET6, "face:b00c:1234:5678::abcd", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 128) = 0 # fg tcpdump -pn -i lo -w connect.pcap 2> /dev/null # tcpdump -r connect.pcap -n tcp | cut -c 1-72 reading from file connect.pcap, link-type EN10MB (Ethernet) 17:57:40.383533 IP 127.0.0.4.56068 > 127.0.0.1.4444: Flags [S], seq 1333 17:57:40.383566 IP 127.0.0.1.4444 > 127.0.0.4.56068: Flags [S.], seq 112 17:57:40.383589 IP 127.0.0.4.56068 > 127.0.0.1.4444: Flags [.], ack 1, w 17:57:40.384578 IP 127.0.0.1.4444 > 127.0.0.4.56068: Flags [R.], seq 1, 17:57:40.403327 IP6 ::6.37458 > ::1.6666: Flags [S], seq 406513443, win 17:57:40.403357 IP6 ::1.6666 > ::6.37458: Flags [S.], seq 2448389240, ac 17:57:40.403376 IP6 ::6.37458 > ::1.6666: Flags [.], ack 1, win 342, opt 17:57:40.404263 IP6 ::1.6666 > ::6.37458: Flags [R.], seq 1, ack 1, win Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann tools/include/uapi/linux/bpf.h | 12 ++- tools/lib/bpf/libbpf.c | 2 + tools/testing/selftests/bpf/Makefile | 5 +- tools/testing/selftests/bpf/bpf_helpers.h | 2 + tools/testing/selftests/bpf/connect4_prog.c | 45 +++++++++++ tools/testing/selftests/bpf/connect6_prog.c | 61 +++++++++++++++ tools/testing/selftests/bpf/test_sock_addr.c | 104 +++++++++++++++++++++++++- tools/testing/selftests/bpf/test_sock_addr.sh | 57 ++++++++++++++ 8 files changed, 284 insertions(+), 4 deletions(-) commit d74bad4e74ee373787a9ae24197c17b7cdc428d5 Author: Andrey Ignatov Date: Fri Mar 30 15:08:05 2018 -0700 bpf: Hooks for sys_connect == The problem == See description of the problem in the initial patch of this patch set. == The solution == The patch provides much more reliable in-kernel solution for the 2nd part of the problem: making outgoing connecttion from desired IP. It adds new attach types `BPF_CGROUP_INET4_CONNECT` and `BPF_CGROUP_INET6_CONNECT` for program type `BPF_PROG_TYPE_CGROUP_SOCK_ADDR` that can be used to override both source and destination of a connection at connect(2) time. Local end of connection can be bound to desired IP using newly introduced BPF-helper `bpf_bind()`. It allows to bind to only IP though, and doesn't support binding to port, i.e. leverages `IP_BIND_ADDRESS_NO_PORT` socket option. There are two reasons for this: * looking for a free port is expensive and can affect performance significantly; * there is no use-case for port. As for remote end (`struct sockaddr *` passed by user), both parts of it can be overridden, remote IP and remote port. It's useful if an application inside cgroup wants to connect to another application inside same cgroup or to itself, but knows nothing about IP assigned to the cgroup. Support is added for IPv4 and IPv6, for TCP and UDP. IPv4 and IPv6 have separate attach types for same reason as sys_bind hooks, i.e. to prevent reading from / writing to e.g. user_ip6 fields when user passes sockaddr_in since it'd be out-of-bound. == Implementation notes == The patch introduces new field in `struct proto`: `pre_connect` that is a pointer to a function with same signature as `connect` but is called before it. The reason is in some cases BPF hooks should be called way before control is passed to `sk->sk_prot->connect`. Specifically `inet_dgram_connect` autobinds socket before calling `sk->sk_prot->connect` and there is no way to call `bpf_bind()` from hooks from e.g. `ip4_datagram_connect` or `ip6_datagram_connect` since it'd cause double-bind. On the other hand `proto.pre_connect` provides a flexible way to add BPF hooks for connect only for necessary `proto` and call them at desired time before `connect`. Since `bpf_bind()` is allowed to bind only to IP and autobind in `inet_dgram_connect` binds only port there is no chance of double-bind. bpf_bind() sets `force_bind_address_no_port` to bind to only IP despite of value of `bind_address_no_port` socket field. bpf_bind() sets `with_lock` to `false` when calling to __inet_bind() and __inet6_bind() since all call-sites, where bpf_bind() is called, already hold socket lock. Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann include/linux/bpf-cgroup.h | 31 +++++++++++++++++++++++++ include/net/addrconf.h | 7 ++++++ include/net/sock.h | 3 +++ include/net/udp.h | 1 + include/uapi/linux/bpf.h | 12 +++++++++- kernel/bpf/syscall.c | 8 +++++++ net/core/filter.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++ net/ipv4/af_inet.c | 13 +++++++++++ net/ipv4/tcp_ipv4.c | 16 +++++++++++++ net/ipv4/udp.c | 14 ++++++++++++ net/ipv6/af_inet6.c | 5 ++++ net/ipv6/tcp_ipv6.c | 16 +++++++++++++ net/ipv6/udp.c | 20 ++++++++++++++++ 13 files changed, 202 insertions(+), 1 deletion(-) commit 3679d585bbc07a1ac4448d5b478b492cad3587ce Author: Andrey Ignatov Date: Fri Mar 30 15:08:04 2018 -0700 net: Introduce __inet_bind() and __inet6_bind Refactor `bind()` code to make it ready to be called from BPF helper function `bpf_bind()` (will be added soon). Implementation of `inet_bind()` and `inet6_bind()` is separated into `__inet_bind()` and `__inet6_bind()` correspondingly. These function can be used from both `sk_prot->bind` and `bpf_bind()` contexts. New functions have two additional arguments. `force_bind_address_no_port` forces binding to IP only w/o checking `inet_sock.bind_address_no_port` field. It'll allow to bind local end of a connection to desired IP in `bpf_bind()` w/o changing `bind_address_no_port` field of a socket. It's useful since `bpf_bind()` can return an error and we'd need to restore original value of `bind_address_no_port` in that case if we changed this before calling to the helper. `with_lock` specifies whether to lock socket when working with `struct sk` or not. The argument is set to `true` for `sk_prot->bind`, i.e. old behavior is preserved. But it will be set to `false` for `bpf_bind()` use-case. The reason is all call-sites, where `bpf_bind()` will be called, already hold that socket lock. Signed-off-by: Andrey Ignatov Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann include/net/inet_common.h | 2 ++ include/net/ipv6.h | 2 ++ net/ipv4/af_inet.c | 39 ++++++++++++++++++++++++--------------- net/ipv6/af_inet6.c | 37 ++++++++++++++++++++++++------------- 4 files changed, 52 insertions(+), 28 deletions(-) commit e50b0a6f089308bec6b2d0198abed231dee4d277 Author: Andrey Ignatov Date: Fri Mar 30 15:08:03 2018 -0700 selftests/bpf: Selftest for sys_bind hooks Add selftest to work with bpf_sock_addr context from `BPF_PROG_TYPE_CGROUP_SOCK_ADDR` programs. Try to bind(2) on IP:port and apply: * loads to make sure context can be read correctly, including narrow loads (byte, half) for IP and full-size loads (word) for all fields; * stores to those fields allowed by verifier. All combination from IPv4/IPv6 and TCP/UDP are tested. Both scenarios are tested: * valid programs can be loaded and attached; * invalid programs can be neither loaded nor attached. Test passes when expected data can be read from context in the BPF-program, and after the call to bind(2) socket is bound to IP:port pair that was written by BPF-program to the context. Example: # ./test_sock_addr Attached bind4 program. Test case #1 (IPv4/TCP): Requested: bind(192.168.1.254, 4040) .. Actual: bind(127.0.0.1, 4444) Test case #2 (IPv4/UDP): Requested: bind(192.168.1.254, 4040) .. Actual: bind(127.0.0.1, 4444) Attached bind6 program. Test case #3 (IPv6/TCP): Requested: bind(face:b00c:1234:5678::abcd, 6060) .. Actual: bind(::1, 6666) Test case #4 (IPv6/UDP): Requested: bind(face:b00c:1234:5678::abcd, 6060) .. Actual: bind(::1, 6666) ### SUCCESS Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann tools/include/uapi/linux/bpf.h | 23 ++ tools/lib/bpf/libbpf.c | 6 + tools/testing/selftests/bpf/Makefile | 3 +- tools/testing/selftests/bpf/test_sock_addr.c | 486 +++++++++++++++++++++++++++ 4 files changed, 517 insertions(+), 1 deletion(-) commit 4fbac77d2d092b475dda9eea66da674369665427 Author: Andrey Ignatov Date: Fri Mar 30 15:08:02 2018 -0700 bpf: Hooks for sys_bind == The problem == There is a use-case when all processes inside a cgroup should use one single IP address on a host that has multiple IP configured. Those processes should use the IP for both ingress and egress, for TCP and UDP traffic. So TCP/UDP servers should be bound to that IP to accept incoming connections on it, and TCP/UDP clients should make outgoing connections from that IP. It should not require changing application code since it's often not possible. Currently it's solved by intercepting glibc wrappers around syscalls such as `bind(2)` and `connect(2)`. It's done by a shared library that is preloaded for every process in a cgroup so that whenever TCP/UDP server calls `bind(2)`, the library replaces IP in sockaddr before passing arguments to syscall. When application calls `connect(2)` the library transparently binds the local end of connection to that IP (`bind(2)` with `IP_BIND_ADDRESS_NO_PORT` to avoid performance penalty). Shared library approach is fragile though, e.g.: * some applications clear env vars (incl. `LD_PRELOAD`); * `/etc/ld.so.preload` doesn't help since some applications are linked with option `-z nodefaultlib`; * other applications don't use glibc and there is nothing to intercept. == The solution == The patch provides much more reliable in-kernel solution for the 1st part of the problem: binding TCP/UDP servers on desired IP. It does not depend on application environment and implementation details (whether glibc is used or not). It adds new eBPF program type `BPF_PROG_TYPE_CGROUP_SOCK_ADDR` and attach types `BPF_CGROUP_INET4_BIND` and `BPF_CGROUP_INET6_BIND` (similar to already existing `BPF_CGROUP_INET_SOCK_CREATE`). The new program type is intended to be used with sockets (`struct sock`) in a cgroup and provided by user `struct sockaddr`. Pointers to both of them are parts of the context passed to programs of newly added types. The new attach types provides hooks in `bind(2)` system call for both IPv4 and IPv6 so that one can write a program to override IP addresses and ports user program tries to bind to and apply such a program for whole cgroup. == Implementation notes == [1] Separate attach types for `AF_INET` and `AF_INET6` are added intentionally to prevent reading/writing to offsets that don't make sense for corresponding socket family. E.g. if user passes `sockaddr_in` it doesn't make sense to read from / write to `user_ip6[]` context fields. [2] The write access to `struct bpf_sock_addr_kern` is implemented using special field as an additional "register". There are just two registers in `sock_addr_convert_ctx_access`: `src` with value to write and `dst` with pointer to context that can't be changed not to break later instructions. But the fields, allowed to write to, are not available directly and to access them address of corresponding pointer has to be loaded first. To get additional register the 1st not used by `src` and `dst` one is taken, its content is saved to `bpf_sock_addr_kern.tmp_reg`, then the register is used to load address of pointer field, and finally the register's content is restored from the temporary field after writing `src` value. Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann include/linux/bpf-cgroup.h | 21 ++++ include/linux/bpf_types.h | 1 + include/linux/filter.h | 10 ++ include/uapi/linux/bpf.h | 23 +++++ kernel/bpf/cgroup.c | 36 +++++++ kernel/bpf/syscall.c | 36 +++++-- kernel/bpf/verifier.c | 1 + net/core/filter.c | 232 +++++++++++++++++++++++++++++++++++++++++++++ net/ipv4/af_inet.c | 7 ++ net/ipv6/af_inet6.c | 7 ++ 10 files changed, 366 insertions(+), 8 deletions(-) commit d7be143b67c2cf99bf93279217b1cf93a1e8a6b1 Author: Andrey Ignatov Date: Fri Mar 30 15:08:01 2018 -0700 libbpf: Support expected_attach_type at prog load Support setting `expected_attach_type` at prog load time in both `bpf/bpf.h` and `bpf/libbpf.h`. Since both headers already have API to load programs, new functions are added not to break backward compatibility for existing ones: * `bpf_load_program_xattr()` is added to `bpf/bpf.h`; * `bpf_prog_load_xattr()` is added to `bpf/libbpf.h`. Both new functions accept structures, `struct bpf_load_program_attr` and `struct bpf_prog_load_attr` correspondingly, where new fields can be added in the future w/o changing the API. Standard `_xattr` suffix is used to name the new API functions. Since `bpf_load_program_name()` is not used as heavily as `bpf_load_program()`, it was removed in favor of more generic `bpf_load_program_xattr()`. Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann tools/include/uapi/linux/bpf.h | 5 ++ tools/lib/bpf/bpf.c | 44 +++++++++++------ tools/lib/bpf/bpf.h | 17 +++++-- tools/lib/bpf/libbpf.c | 105 +++++++++++++++++++++++++++++++---------- tools/lib/bpf/libbpf.h | 8 ++++ 5 files changed, 133 insertions(+), 46 deletions(-) commit 5e43f899b03a3492ce5fc44e8900becb04dae9c0 Author: Andrey Ignatov Date: Fri Mar 30 15:08:00 2018 -0700 bpf: Check attach type at prog load time == The problem == There are use-cases when a program of some type can be attached to multiple attach points and those attach points must have different permissions to access context or to call helpers. E.g. context structure may have fields for both IPv4 and IPv6 but it doesn't make sense to read from / write to IPv6 field when attach point is somewhere in IPv4 stack. Same applies to BPF-helpers: it may make sense to call some helper from some attach point, but not from other for same prog type. == The solution == Introduce `expected_attach_type` field in in `struct bpf_attr` for `BPF_PROG_LOAD` command. If scenario described in "The problem" section is the case for some prog type, the field will be checked twice: 1) At load time prog type is checked to see if attach type for it must be known to validate program permissions correctly. Prog will be rejected with EINVAL if it's the case and `expected_attach_type` is not specified or has invalid value. 2) At attach time `attach_type` is compared with `expected_attach_type`, if prog type requires to have one, and, if they differ, attach will be rejected with EINVAL. The `expected_attach_type` is now available as part of `struct bpf_prog` in both `bpf_verifier_ops->is_valid_access()` and `bpf_verifier_ops->get_func_proto()` () and can be used to check context accesses and calls to helpers correspondingly. Initially the idea was discussed by Alexei Starovoitov and Daniel Borkmann here: https://marc.info/?l=linux-netdev&m=152107378717201&w=2 Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann include/linux/bpf.h | 5 ++++- include/linux/filter.h | 1 + include/uapi/linux/bpf.h | 5 +++++ kernel/bpf/cgroup.c | 3 ++- kernel/bpf/syscall.c | 31 ++++++++++++++++++++++++++++++- kernel/bpf/verifier.c | 6 +++--- kernel/trace/bpf_trace.c | 27 ++++++++++++++++++--------- net/core/filter.c | 39 +++++++++++++++++++++++++-------------- 8 files changed, 88 insertions(+), 29 deletions(-) commit 54dd0e0a1b255f115f8647fc6fb93273251b01b9 Author: Theodore Ts'o Date: Fri Mar 30 20:04:11 2018 -0400 ext4: add extra checks to ext4_xattr_block_get() Add explicit checks in ext4_xattr_block_get() just in case the e_value_offs and e_value_size fields in the the xattr block are corrupted in memory after the buffer_verified bit is set on the xattr block. Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/xattr.c | 26 +++++++++++++++++++------- fs/ext4/xattr.h | 11 +++++++++++ 2 files changed, 30 insertions(+), 7 deletions(-) commit 57599c7e7722daf5f8c2dba4b0e4628f5c500771 Author: David Sterba Date: Thu Mar 1 17:56:34 2018 +0100 btrfs: lift errors from add_extent_changeset to the callers The missing error handling in add_extent_changeset was hidden, so make it at least visible in the callers. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit f50f43539070c6c876bf5435fb23f898f9d81e72 Author: Liu Bo Date: Thu Mar 29 06:11:45 2018 +0800 Btrfs: print error messages when failing to read trees When mount fails to read trees like fs tree, checksum tree, extent tree, etc, there is not enough information about where went wrong. With this, messages like "BTRFS warning (device sdf): failed to read root (objectid=7): -5" would help us a bit. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) commit 38e82de8ccd1878fb5f8371b8a6f455a6bbd0325 Author: David Sterba Date: Mon Mar 26 18:29:41 2018 +0200 btrfs: user proper type for btrfs_mask_flags flags All users pass a local unsigned int and not the __uXX types that are supposed to be used for userspace interfaces. Signed-off-by: David Sterba fs/btrfs/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e79cb86be28ed8073870c22f479b3b1293ecb85 Author: David Sterba Date: Sat Mar 24 02:11:38 2018 +0100 btrfs: split dev-replace locking helpers for read and write The current calls are unclear in what way btrfs_dev_replace_lock takes the locks, so drop the argument, split the helpers and use similar naming as for read and write locks. Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 98 +++++++++++++++++++++++++------------------------- fs/btrfs/dev-replace.h | 6 ++-- fs/btrfs/reada.c | 10 +++--- fs/btrfs/scrub.c | 14 ++++---- fs/btrfs/volumes.c | 18 +++++----- 5 files changed, 74 insertions(+), 72 deletions(-) commit e7ab0af6c30f763e41a1206318d4756d270e93a0 Author: David Sterba Date: Tue Mar 27 20:08:28 2018 +0200 btrfs: remove stale comments about fs_mutex The fs_mutex has been killed in 2008, a213501153fd66e2 ("Btrfs: Replace the big fs_mutex with a collection of other locks"), still remembered in some comments. We don't have any extra needs for locking in the ACL handlers. Signed-off-by: David Sterba fs/btrfs/acl.c | 8 -------- 1 file changed, 8 deletions(-) commit 88c14590cdd6f3cafc7ea7487d5f4532db8c551e Author: David Sterba Date: Fri Mar 16 03:27:02 2018 +0100 btrfs: use RCU in btrfs_show_devname for device list traversal The show_devname callback is used to print device name in /proc/self/mounts, we need to traverse the device list consistently and read the name that's copied to a seq buffer so we don't need further locking. If the first device is being deleted at the same time, the RCU will allow us to read the device name, though it will become stale right after the RCU protection ends. This is unavoidable and the user can expect that the device will disappear from the filesystem's list at some point. The device_list_mutex was pretty heavy as it is used eg. for writing superblock and a few other IO related contexts. This can stall any application that reads the proc file for no reason. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/super.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit d1980131ca7f0776542f776ceb777cd01eb983e2 Author: David Sterba Date: Fri Mar 16 02:39:40 2018 +0100 btrfs: update barrier in should_cow_block Once there was a simple int force_cow that was used with the plain barriers, and then converted to a bit, so we should use the appropriate barrier helper. Other variables in the complex if condition do not depend on a barrier, so we should be fine in case the atomic barrier becomes a no-op. Signed-off-by: David Sterba fs/btrfs/ctree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a32bf9a30201f13097428a3327c7c67f678c760c Author: David Sterba Date: Fri Mar 16 02:21:22 2018 +0100 btrfs: use lockdep_assert_held for mutexes Using lockdep_assert_held is preferred, replace mutex_is_locked. Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 2 +- fs/btrfs/scrub.c | 4 ++-- fs/btrfs/volumes.c | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) commit a4666e688f6fbf532c6c16259bea775ee690e4b7 Author: David Sterba Date: Fri Mar 16 02:21:22 2018 +0100 btrfs: use lockdep_assert_held for spinlocks Using lockdep_assert_held is preferred, replace assert_spin_locked. Signed-off-by: David Sterba fs/btrfs/delayed-ref.c | 6 +++--- fs/btrfs/qgroup.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 581c1760415c48cca9349b198bba52dd38750765 Author: Qu Wenruo Date: Thu Mar 29 09:08:11 2018 +0800 btrfs: Validate child tree block's level and first key We have several reports about node pointer points to incorrect child tree blocks, which could have even wrong owner and level but still with valid generation and checksum. Although btrfs check could handle it and print error message like: leaf parent key incorrect 60670574592 Kernel doesn't have enough check on this type of corruption correctly. At least add such check to read_tree_block() and btrfs_read_buffer(), where we need two new parameters @level and @first_key to verify the child tree block. The new @level check is mandatory and all call sites are already modified to extract expected level from its call chain. While @first_key is optional, the following call sites are skipping such check: 1) Root node/leaf As ROOT_ITEM doesn't contain the first key, skip @first_key check. 2) Direct backref Only parent bytenr and level is known and we need to resolve the key all by ourselves, skip @first_key check. Another note of this verification is, it needs extra info from nodeptr or ROOT_ITEM, so it can't fit into current tree-checker framework, which is limited to node/leaf boundary. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/backref.c | 6 ++-- fs/btrfs/ctree.c | 28 +++++++++++---- fs/btrfs/disk-io.c | 95 +++++++++++++++++++++++++++++++++++++++++++------- fs/btrfs/disk-io.h | 8 +++-- fs/btrfs/extent-tree.c | 6 +++- fs/btrfs/print-tree.c | 10 ++++-- fs/btrfs/qgroup.c | 7 ++-- fs/btrfs/ref-verify.c | 7 +++- fs/btrfs/relocation.c | 21 ++++++++--- fs/btrfs/tree-log.c | 28 +++++++++------ 10 files changed, 170 insertions(+), 46 deletions(-) commit 3c0efdf03b2d127f0e40e30db4e7aa0429b1b79a Author: Qu Wenruo Date: Tue Mar 27 20:44:18 2018 +0800 btrfs: tests/qgroup: Fix wrong tree backref level The extent tree of the test fs is like the following: BTRFS info (device (null)): leaf 16327509003777336587 total ptrs 1 free space 3919 item 0 key (4096 168 4096) itemoff 3944 itemsize 51 extent refs 1 gen 1 flags 2 tree block key (68719476736 0 0) level 1 ^^^^^^^ ref#0: tree block backref root 5 And it's using an empty tree for fs tree, so there is no way that its level can be 1. For REAL (created by mkfs) fs tree backref with no skinny metadata, the result should look like: item 3 key (30408704 EXTENT_ITEM 4096) itemoff 3845 itemsize 51 refs 1 gen 4 flags TREE_BLOCK tree block key (256 INODE_ITEM 0) level 0 ^^^^^^^ tree block backref root 5 Fix the level to 0, so it won't break later tree level checker. Fixes: faa2dbf004e8 ("Btrfs: add sanity tests for new qgroup accounting code") Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/tests/qgroup-tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8434ec46c6e3232cebc25a910363b29f5c617820 Author: Filipe Manana Date: Mon Mar 26 23:59:12 2018 +0100 Btrfs: fix copy_items() return value when logging an inode When logging an inode, at tree-log.c:copy_items(), if we call btrfs_next_leaf() at the loop which checks for the need to log holes, we need to make sure copy_items() returns the value 1 to its caller and not 0 (on success). This is because the path the caller passed was released and is now different from what is was before, and the caller expects a return value of 0 to mean both success and that the path has not changed, while a return value of 1 means both success and signals the caller that it can not reuse the path, it has to perform another tree search. Even though this is a case that should not be triggered on normal circumstances or very rare at least, its consequences can be very unpredictable (especially when replaying a log tree). Fixes: 16e7549f045d ("Btrfs: incompatible format change to remove hole extents") Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/tree-log.c | 1 + 1 file changed, 1 insertion(+) commit 4ee3fad34a9cc2cf33303dfbd0cf554248651c86 Author: Filipe Manana Date: Mon Mar 26 23:59:00 2018 +0100 Btrfs: fix fsync after hole punching when using no-holes feature When we have the no-holes mode enabled and fsync a file after punching a hole in it, we can end up not logging the whole hole range in the log tree. This happens if the file has extent items that span more than one leaf and we punch a hole that covers a range that starts in a leaf but does not go beyond the offset of the first extent in the next leaf. Example: $ mkfs.btrfs -f -O no-holes -n 65536 /dev/sdb $ mount /dev/sdb /mnt $ for ((i = 0; i <= 831; i++)); do offset=$((i * 2 * 256 * 1024)) xfs_io -f -c "pwrite -S 0xab -b 256K $offset 256K" \ /mnt/foobar >/dev/null done $ sync # We now have 2 leafs in our filesystem fs tree, the first leaf has an # item corresponding the extent at file offset 216530944 and the second # leaf has a first item corresponding to the extent at offset 217055232. # Now we punch a hole that partially covers the range of the extent at # offset 216530944 but does go beyond the offset 217055232. $ xfs_io -c "fpunch $((216530944 + 128 * 1024 - 4000)) 256K" /mnt/foobar $ xfs_io -c "fsync" /mnt/foobar # mount to replay the log $ mount /dev/sdb /mnt # Before this patch, only the subrange [216658016, 216662016[ (length of # 4000 bytes) was logged, leaving an incorrect file layout after log # replay. Fix this by checking if there is a hole between the last extent item that we processed and the first extent item in the next leaf, and if there is one, log an explicit hole extent item. Fixes: 16e7549f045d ("Btrfs: incompatible format change to remove hole extents") Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/tree-log.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit a1840b50238bce5d106a9aeedf47a4bcdb0689ba Author: David Sterba Date: Tue Mar 27 19:04:50 2018 +0200 btrfs: use helper to set ulist aux from a qgroup We have a nice helper to do proper casting of a qgroup to a ulist aux value. And several places that could make use of it. Signed-off-by: David Sterba fs/btrfs/qgroup.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0b78877a2adadc8f41f2bd959a3ffdc9c3bc0294 Author: Qu Wenruo Date: Tue Dec 12 15:34:36 2017 +0800 Revert "btrfs: qgroups: Retry after commit on getting EDQUOT" This reverts commit 48a89bc4f2ceab87bc858a8eb189636b09c846a7. The idea to commit transaction and free some space after hitting qgroup limit is good, although the problem is it can easily cause deadlocks. One deadlock example is caused by trying to flush data while still holding it: Call Trace: __schedule+0x49d/0x10f0 schedule+0xc6/0x290 schedule_timeout+0x187/0x1c0 wait_for_completion+0x204/0x3a0 btrfs_wait_ordered_extents+0xa40/0xaf0 [btrfs] qgroup_reserve+0x913/0xa10 [btrfs] btrfs_qgroup_reserve_data+0x3ef/0x580 [btrfs] btrfs_check_data_free_space+0x96/0xd0 [btrfs] __btrfs_buffered_write+0x3ac/0xd40 [btrfs] btrfs_file_write_iter+0x62a/0xba0 [btrfs] __vfs_write+0x320/0x430 vfs_write+0x107/0x270 SyS_write+0xbf/0x150 do_syscall_64+0x1b0/0x3d0 entry_SYSCALL64_slow_path+0x25/0x25 Another can be caused by trying to commit one transaction while nesting with trans handle held by ourselves: btrfs_start_transaction() |- btrfs_qgroup_reserve_meta_pertrans() |- qgroup_reserve() |- btrfs_join_transaction() |- btrfs_commit_transaction() The retry is causing more problems than exppected when limit is enabled. At least a graceful EDQUOT is way better than deadlock. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit 4ee0d8832c2ecd08fd4ccbaa55484e6a500f2f34 Author: Qu Wenruo Date: Tue Dec 12 15:34:35 2017 +0800 btrfs: qgroup: Update trace events for metadata reservation Now trace_qgroup_meta_reserve() will have extra type parameter. And introduce two new trace events: 1) trace_qgroup_meta_free_all_pertrans() For btrfs_qgroup_free_meta_all_pertrans() 2) trace_qgroup_meta_convert() For btrfs_qgroup_convert_reserved_meta() Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 7 +++--- include/trace/events/btrfs.h | 55 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 57 insertions(+), 5 deletions(-) commit 8287475a20552af66b32c07704dbdbeeb898ac1f Author: Qu Wenruo Date: Tue Dec 12 15:34:34 2017 +0800 btrfs: qgroup: Use root::qgroup_meta_rsv_* to record qgroup meta reserved space For quota disabled->enable case, it's possible that at reservation time quota was not enabled so no bytes were really reserved, while at release time, quota was enabled so we will try to release some bytes we didn't really own. Such situation can cause metadata reserveation underflow, for both types, also less possible for per-trans type since quota enable will commit transaction. To address this, record qgroup meta reserved bytes into root::qgroup_meta_rsv_pertrans and ::prealloc. So at releasing time we won't free any bytes we didn't reserve. For DATA, it's already handled by io_tree, so nothing needs to be done there. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/ctree.h | 5 +++++ fs/btrfs/disk-io.c | 1 + fs/btrfs/qgroup.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 68 insertions(+), 4 deletions(-) commit 4f5427ccce5d9cb8e2c8f98b49e744e523d246ec Author: Qu Wenruo Date: Tue Dec 12 15:34:33 2017 +0800 btrfs: delayed-inode: Use new qgroup meta rsv for delayed inode and item Quite similar for delalloc, some modification to delayed-inode and delayed-item reservation. Also needs extra parameter for release case to distinguish normal release and error release. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) commit 9496005d6ca4cf8f5ee8f828165a8956872dc59d Author: Theodore Ts'o Date: Fri Mar 30 20:00:56 2018 -0400 ext4: add bounds checking to ext4_xattr_find_entry() Add some paranoia checks to make sure we don't stray beyond the end of the valid memory region containing ext4 xattr entries while we are scanning for a match. Also rename the function to xattr_find_entry() since it is static and thus only used in fs/ext4/xattr.c Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/xattr.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit ab966d7e4ff988a48b3ad72e7abf903aa840afd1 Author: Tariq Toukan Date: Thu Jan 4 13:09:15 2018 +0200 net/mlx5e: RX, Recycle buffer of UMR WQEs Upon a new UMR post, check if the WQE buffer contains a previous UMR WQE. If so, modify the dynamic fields instead of a whole WQE overwrite. This saves a memcpy. In current setting, after 2 WQ cycles (12 UMR posts), this will always be the case. No degradation sensed. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit b8a98a4cf3221d8140969e3f5bde09206a6cb623 Author: Tariq Toukan Date: Wed Dec 20 11:56:35 2017 +0200 net/mlx5e: Keep single pre-initialized UMR WQE per RQ All UMR WQEs of an RQ share many common fields. We use pre-initialized structures to save calculations in datapath. One field (xlt_offset) was the only reason we saved a pre-initialized copy per WQE index. Here we remove its initialization (move its calculation to datapath), and reduce the number of copies to one-per-RQ. A very small datapath calculation is added, it occurs once per a MPWQE (i.e. once every 256KB), but reduces memory consumption and gives better cache utilization. Performance testing: Tested packet rate, no degradation sensed. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 8 ++------ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 20 ++++++++------------ drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 +++- 3 files changed, 13 insertions(+), 19 deletions(-) commit 9f9e9cd50eac6ad09cb053509f2e764bddc05f18 Author: Tariq Toukan Date: Tue Nov 28 11:03:37 2017 +0200 net/mlx5e: Remove page_ref bulking in Striding RQ When many packets reside on the same page, the bulking of page_ref modifications reduces the total number of atomic operations executed. Besides the necessary 2 operations on page alloc/free, we have the following extra ops per page: - one on WQE allocation (bump refcnt to maximum possible), - zero ops for SKBs, - one on WQE free, a constant of two operations in total, no matter how many packets/SKBs actually populate the page. Without this bulking, we have: - no ops on WQE allocation or free, - one op per SKB, Comparing the two methods when PAGE_SIZE is 4K: - As mentioned above, bulking method always executes 2 operations, not more, but not less. - In the default MTU configuration (1500, stride size is 2K), the non-bulking method execute 2 ops as well. - For larger MTUs with stride size of 4K, non-bulking method executes only a single op. - For XDP (stride size of 4K, no SKBs), non-bulking method executes no ops at all! Hence, to optimize the flows with linear SKB and XDP over Striding RQ, we here remove the page_ref bulking method. Performance testing: ConnectX-5, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz. Single core packet rate (64 bytes). Early drop in TC: no degradation. XDP_DROP: before: 14,270,188 pps after: 20,503,603 pps, 43% improvement. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 47 +++++++++---------------- 2 files changed, 16 insertions(+), 32 deletions(-) commit 22f4539881944a8acc9c6f5afa7aa7f028898002 Author: Tariq Toukan Date: Wed Feb 7 14:46:36 2018 +0200 net/mlx5e: Support XDP over Striding RQ Add XDP support over Striding RQ. Now that linear SKB is supported over Striding RQ, we can support XDP by setting stride size to PAGE_SIZE and headroom to XDP_PACKET_HEADROOM. Upon a MPWQE free, do not release pages that are being XDP xmit, they will be released upon completions. Striding RQ is capable of a higher packet-rate than conventional RQ. A performance gain is expected for all cases that had a HW packet-rate bottleneck. This is the case whenever using many flows that distribute to many cores. Performance testing: ConnectX-5, 24 rings, default MTU. CQE compression ON (to reduce completions BW in PCI). XDP_DROP packet rate: -------------------------------------------------- | pkt size | XDP rate | 100GbE linerate | pct% | -------------------------------------------------- | 64byte | 126.2 Mpps | 148.0 Mpps | 85% | | 128byte | 80.0 Mpps | 84.8 Mpps | 94% | | 256byte | 42.7 Mpps | 42.7 Mpps | 100% | | 512byte | 23.4 Mpps | 23.4 Mpps | 100% | -------------------------------------------------- Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 30 +++++++++++++++++------ 3 files changed, 26 insertions(+), 8 deletions(-) commit 121e89275471dccbd5b252e40ad6a823fa0527f7 Author: Tariq Toukan Date: Tue Dec 12 15:46:49 2017 +0200 net/mlx5e: Refactor RQ XDP_TX indication Make the xdp_xmit indication available for Striding RQ by taking it out of the type-specific union. This refactor is a preparation for a downstream patch that adds XDP support over Striding RQ. In addition, use a bitmap instead of a boolean for possible future flags. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 6 +++++- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 8 +++----- 2 files changed, 8 insertions(+), 6 deletions(-) commit 619a8f2a42f1031cdbd74435b6a9191eb4913139 Author: Tariq Toukan Date: Wed Feb 7 14:41:25 2018 +0200 net/mlx5e: Use linear SKB in Striding RQ Current Striding RQ HW feature utilizes the RX buffers so that there is no wasted room between the strides. This maximises the memory utilization. This prevents the use of build_skb() (which requires headroom and tailroom), and demands to memcpy the packets headers into the skb linear part. In this patch, whenever a set of conditions holds, we apply an RQ configuration that allows combining the use of linear SKB on top of a Striding RQ. To use build_skb() with Striding RQ, the following must hold: 1. packet does not cross a page boundary. 2. there is enough headroom and tailroom surrounding the packet. We can satisfy 1 and 2 by configuring: stride size = MTU + headroom + tailoom. This is possible only when: a. (MTU - headroom - tailoom) does not exceed PAGE_SIZE. b. HW LRO is turned off. Using linear SKB has many advantages: - Saves a memcpy of the headers. - No page-boundary checks in datapath. - No filler CQEs. - Significantly smaller CQ. - SKB data continuously resides in linear part, and not split to small amount (linear part) and large amount (fragment). This saves datapath cycles in driver and improves utilization of SKB fragments in GRO. - The fragments of a resulting GRO SKB follow the IP forwarding assumption of equal-size fragments. Some implementation details: HW writes the packets to the beginning of a stride, i.e. does not keep headroom. To overcome this we make sure we can extend backwards and use the last bytes of stride i-1. Extra care is needed for stride 0 as it has no preceding stride. We make sure headroom bytes are available by shifting the buffer pointer passed to HW by headroom bytes. This configuration now becomes default, whenever capable. Of course, this implies turning LRO off. Performance testing: ConnectX-5, single core, single RX ring, default MTU. UDP packet rate, early drop in TC layer: -------------------------------------------- | pkt size | before | after | ratio | -------------------------------------------- | 1500byte | 4.65 Mpps | 5.96 Mpps | 1.28x | | 500byte | 5.23 Mpps | 5.97 Mpps | 1.14x | | 64byte | 5.94 Mpps | 5.96 Mpps | 1.00x | -------------------------------------------- TCP streams: ~20% gain Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 10 +++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 76 +++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 102 ++++++++++++++++------ include/linux/mlx5/device.h | 3 + include/linux/mlx5/mlx5_ifc.h | 7 +- 5 files changed, 153 insertions(+), 45 deletions(-) commit 43b18595d6603cb4197fb9b063915cd7802141a6 Author: Qu Wenruo Date: Tue Dec 12 15:34:32 2017 +0800 btrfs: qgroup: Use separate meta reservation type for delalloc Before this patch, btrfs qgroup is mixing per-transcation meta rsv with preallocated meta rsv, making it quite easy to underflow qgroup meta reservation. Since we have the new qgroup meta rsv types, apply it to delalloc reservation. Now for delalloc, most of its reserved space will use META_PREALLOC qgroup rsv type. And for callers reducing outstanding extent like btrfs_finish_ordered_io(), they will convert corresponding META_PREALLOC reservation to META_PERTRANS. This is mainly due to the fact that current qgroup numbers will only be updated in btrfs_commit_transaction(), that's to say if we don't keep such placeholder reservation, we can exceed qgroup limitation. And for callers freeing outstanding extent in error handler, we will just free META_PREALLOC bytes. This behavior makes callers of btrfs_qgroup_release_meta() or btrfs_qgroup_convert_meta() to be aware of which type they are. So in this patch, btrfs_delalloc_release_metadata() and its callers get an extra parameter to info qgroup to do correct meta convert/release. The good news is, even we use the wrong type (convert or free), it won't cause obvious bug, as prealloc type is always in good shape, and the type only affects how per-trans meta is increased or not. So the worst case will be at most metadata limitation can be sometimes exceeded (no convert at all) or metadata limitation is reached too soon (no free at all). Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/ctree.h | 9 ++++++--- fs/btrfs/extent-tree.c | 44 ++++++++++++++++++++++++-------------------- fs/btrfs/file.c | 15 ++++++++------- fs/btrfs/free-space-cache.c | 2 +- fs/btrfs/inode-map.c | 4 ++-- fs/btrfs/inode.c | 27 ++++++++++++++------------- fs/btrfs/ioctl.c | 10 ++++++---- fs/btrfs/ordered-data.c | 2 +- fs/btrfs/relocation.c | 13 +++++++------ 9 files changed, 69 insertions(+), 57 deletions(-) commit 64cfaef6362fc756972f477372997fbe117d79cb Author: Qu Wenruo Date: Tue Dec 12 15:34:31 2017 +0800 btrfs: qgroup: Introduce function to convert META_PREALLOC into META_PERTRANS For meta_prealloc reservation users, after btrfs_join_transaction() caller will modify tree so part (or even all) meta_prealloc reservation should be converted to meta_pertrans until transaction commit time. This patch introduces a new function, btrfs_qgroup_convert_reserved_meta() to do this for META_PREALLOC reservation user. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/qgroup.h | 8 ++++++++ 2 files changed, 64 insertions(+) commit e1211d0e896b71d395fe411d0e0a76f4bc336617 Author: Qu Wenruo Date: Tue Dec 12 15:34:30 2017 +0800 btrfs: qgroup: Don't use root->qgroup_meta_rsv for qgroup Since qgroup has seperate metadata reservation types now, we can completely get rid of the old root->qgroup_meta_rsv, which mostly acts as current META_PERTRANS reservation type. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 --- fs/btrfs/disk-io.c | 1 - fs/btrfs/qgroup.c | 33 ++++++++++++++++++++++++--------- 3 files changed, 24 insertions(+), 13 deletions(-) commit 733e03a0b26a463d75aa86083c9fab856571e7fc Author: Qu Wenruo Date: Tue Dec 12 15:34:29 2017 +0800 btrfs: qgroup: Split meta rsv type into meta_prealloc and meta_pertrans Btrfs uses 2 different methods to reseve metadata qgroup space. 1) Reserve at btrfs_start_transaction() time This is quite straightforward, caller will use the trans handler allocated to modify b-trees. In this case, reserved metadata should be kept until qgroup numbers are updated. 2) Reserve by using block_rsv first, and later btrfs_join_transaction() This is more complicated, caller will reserve space using block_rsv first, and then later call btrfs_join_transaction() to get a trans handle. In this case, before we modify trees, the reserved space can be modified on demand, and after btrfs_join_transaction(), such reserved space should also be kept until qgroup numbers are updated. Since these two types behave differently, split the original "META" reservation type into 2 sub-types: META_PERTRANS: For above case 1) META_PREALLOC: For reservations that happened before btrfs_join_transaction() of case 2) NOTE: This patch will only convert existing qgroup meta reservation callers according to its situation, not ensuring all callers are at correct timing. Such fix will be added in later patches. Signed-off-by: Qu Wenruo [ update comments ] Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 8 ++--- fs/btrfs/qgroup.c | 22 +++++++------- fs/btrfs/qgroup.h | 69 ++++++++++++++++++++++++++++++++++++++++---- fs/btrfs/transaction.c | 8 ++--- include/trace/events/btrfs.h | 5 ++-- 5 files changed, 87 insertions(+), 25 deletions(-) commit 5c40507ffb1bbbc8eeeaa6d8da181f431cb83d97 Author: Qu Wenruo Date: Tue Dec 12 15:34:28 2017 +0800 btrfs: qgroup: Cleanup the remaining old reservation counters So qgroup is switched to new separate types reservation system. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 13 ------------- fs/btrfs/qgroup.h | 1 - 2 files changed, 14 deletions(-) commit 64ee4e751a1c43b155afe2c1c07212893836f36d Author: Qu Wenruo Date: Tue Dec 12 15:34:27 2017 +0800 btrfs: qgroup: Update trace events to use new separate rsv types Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 36 +++++++++++++++++++++--------------- include/trace/events/btrfs.h | 17 ++++++++++++----- 2 files changed, 33 insertions(+), 20 deletions(-) commit 429d6275d50199dd4c3a5876754003ae06c7f927 Author: Qu Wenruo Date: Tue Dec 12 15:34:26 2017 +0800 btrfs: qgroup: Fix wrong qgroup reservation update for relationship modification When modifying qgroup relationship, for qgroup which only owns exclusive extents, we will go through quick update path. In this path, we will add/subtract exclusive and reference number for parent qgroup, since the source (child) qgroup only has exclusive extents, destination (parent) qgroup will also own or lose those extents exclusively. The same should be the same for reservation, since later reservation adding/releasing will also affect parent qgroup, without the reservation carried from child, parent will underflow reservation or have dead reservation which will never be freed. However original code doesn't do the same thing for reservation. It handles qgroup reservation quite differently: It removes qgroup reservation, as it's allocating space from the reserved qgroup for relationship adding. But does nothing for qgroup reservation if we're removing a qgroup relationship. According to the original code, it looks just like because we're adding qgroup->rfer, the code assumes we're writing new data, so it's follows the normal write routine, by reducing qgroup->reserved and adding qgroup->rfer/excl. This old behavior is wrong, and should be fixed to follow the same excl/rfer behavior. Just fix it by using the correct behavior described above. Fixes: 31193213f1f9 ("Btrfs: qgroup: Introduce a may_use to account space_info->bytes_may_use.") Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) commit dba213242fbcfc5495004ab76ca27c35ce1bf304 Author: Qu Wenruo Date: Tue Dec 12 15:34:25 2017 +0800 btrfs: qgroup: Make qgroup_reserve and its callers to use separate reservation type Since most callers of qgroup_reserve() are already defined by type, converting qgroup_reserve() is quite an easy work. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit f59c0347d4be22dad5812b5b14bf94ac0efd371a Author: Qu Wenruo Date: Tue Dec 12 15:34:24 2017 +0800 btrfs: qgroup: Introduce helpers to update and access new qgroup rsv Introduce helpers to: 1) Get total reserved space For limit calculation 2) Add/release reserved space for given type With underflow detection and warning 3) Add/release reserved space according to child qgroup Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit d4e5c92055d8933e9a2030fcbe6d0dbbec538c58 Author: Qu Wenruo Date: Tue Dec 12 15:34:23 2017 +0800 btrfs: qgroup: Skeleton to support separate qgroup reservation type Instead of single qgroup->reserved, use a new structure btrfs_qgroup_rsv to store different types of reservation. This patch only updates the header needed to compile. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 16 ++++++++++------ fs/btrfs/qgroup.h | 27 +++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 8 deletions(-) commit 0a0d4415e3389b6a2e89896808dea27d2402d154 Author: Omar Sandoval Date: Thu Jan 25 15:56:17 2018 -0800 Btrfs: delete dead code in btrfs_orphan_add() btrfs_orphan_add() has had this case commented out since it was first introduced in commit d68fc57b7e32 ("Btrfs: Metadata reservation for orphan inodes"). Most of the orphan cleanup code has been rewritten since then, so it's safe to say that this code isn't needed. Signed-off-by: Omar Sandoval Reviewed-by: Nikolay Borisov [ switch to bool ] Signed-off-by: David Sterba fs/btrfs/inode.c | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) commit 4408ea7c5fd92cbdff3b5890601b9be6610bbb33 Author: Misono, Tomohiro Date: Tue Mar 20 15:47:06 2018 +0900 btrfs: ctree.h: Fix wrong comment position about csum size Signed-off-by: Tomohiro Misono Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75cb379d2635215ad2c67750693f7dc45ad19a5f Author: Jeff Mahoney Date: Tue Mar 20 15:25:26 2018 -0400 btrfs: defer adding raid type kobject until after chunk relocation Any time the first block group of a new type is created, we add a new kobject to sysfs to hold the attributes for that type. Kobject-internal allocations always use GFP_KERNEL, making them prone to fs-reclaim races. While it appears as if this can occur any time a block group is created, the only times the first block group of a new type can be created in memory is at mount and when we create the first new block group during raid conversion. This patch adds a new list to track pending kobject additions and then handles them after we do chunk relocation. Between relocating the target chunk (or forcing allocation of a new chunk in the case of data) and removing the old chunk, we're in a safe place for fs-reclaim to occur. We're holding the volume mutex, which is already held across page faults, and the delete_unused_bgs_mutex, which will only stall the cleaner thread. Signed-off-by: Jeff Mahoney Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 6 ++++- fs/btrfs/disk-io.c | 2 ++ fs/btrfs/extent-tree.c | 60 +++++++++++++++++++++++++++++++++++--------------- fs/btrfs/sysfs.c | 2 +- fs/btrfs/volumes.c | 12 ++++++++++ 5 files changed, 62 insertions(+), 20 deletions(-) commit dc2d3005d27da41247d6c42077e335a777afc79c Author: Jeff Mahoney Date: Tue Mar 20 15:25:25 2018 -0400 btrfs: remove dead create_space_info calls Since commit 2be12ef79 (btrfs: Separate space_info create/update), we've separated out the creation and updating of the space info structures. That commit was a straightforward refactoring of the two parts of update_space_info, but we can go a step further. Since commits c59021f84 (Btrfs: fix OOPS of empty filesystem after balance) and b742bb82f (Btrfs: Link block groups of different raid types), we know that the space_info structures will be created at mount and there will only ever be, at most, three of them. This patch cleans out the create_space_info calls after __find_space_info returns NULL since __find_space_info *can't* return NULL. The initial cause for reviewing this was the kobject_add calls from create_space_info occuring in sites where fs-reclaim wasn't allowed. Now we are certain they occur only early in the mount process and are safe. Signed-off-by: Jeff Mahoney Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 6 +++--- fs/btrfs/extent-tree.c | 16 ++-------------- 2 files changed, 5 insertions(+), 17 deletions(-) commit 580c6efaf91f89fae1efda53892df41ae1e41559 Author: Liu Bo Date: Thu Mar 22 09:20:11 2018 +0800 Btrfs: replace: cache rbio when rebuild data on missing device Rebuild on missing device is as same as recover, after it's done, rbio has data which is consistent with on-disk data, so it can be cached to avoid further reads. Signed-off-by: Liu Bo Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/raid56.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 8a5a916d9a35e13576d79cc16e24611821b13e34 Author: Jeff Mahoney Date: Fri Mar 16 14:36:27 2018 -0400 btrfs: fix lockdep splat in btrfs_alloc_subvolume_writers While running btrfs/011, I hit the following lockdep splat. This is the important bit: pcpu_alloc+0x1ac/0x5e0 __percpu_counter_init+0x4e/0xb0 btrfs_init_fs_root+0x99/0x1c0 [btrfs] btrfs_get_fs_root.part.54+0x5b/0x150 [btrfs] resolve_indirect_refs+0x130/0x830 [btrfs] find_parent_nodes+0x69e/0xff0 [btrfs] btrfs_find_all_roots_safe+0xa0/0x110 [btrfs] btrfs_find_all_roots+0x50/0x70 [btrfs] btrfs_qgroup_prepare_account_extents+0x53/0x90 [btrfs] btrfs_commit_transaction+0x3ce/0x9b0 [btrfs] The percpu_counter_init call in btrfs_alloc_subvolume_writers uses GFP_KERNEL, which we can't do during transaction commit. This switches it to GFP_NOFS. ======================================================== WARNING: possible irq lock inversion dependency detected 4.12.14-kvmsmall #8 Tainted: G W -------------------------------------------------------- kswapd0/50 just changed the state of lock: (&delayed_node->mutex){+.+.-.}, at: [] __btrfs_release_delayed_node+0x3a/0x1f0 [btrfs] but this lock took another, RECLAIM_FS-unsafe lock in the past: (pcpu_alloc_mutex){+.+.+.} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Chain exists of: &delayed_node->mutex --> &found->groups_sem --> pcpu_alloc_mutex Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(pcpu_alloc_mutex); local_irq_disable(); lock(&delayed_node->mutex); lock(&found->groups_sem); lock(&delayed_node->mutex); *** DEADLOCK *** 2 locks held by kswapd0/50: #0: (shrinker_rwsem){++++..}, at: [] shrink_slab+0x7f/0x5b0 #1: (&type->s_umount_key#30){+++++.}, at: [] trylock_super+0x16/0x50 the shortest dependencies between 2nd lock and 1st lock: -> (pcpu_alloc_mutex){+.+.+.} ops: 4904 { HARDIRQ-ON-W at: __mutex_lock+0x4e/0x8c0 pcpu_alloc+0x1ac/0x5e0 alloc_kmem_cache_cpus.isra.70+0x25/0xa0 __do_tune_cpucache+0x2c/0x220 do_tune_cpucache+0x26/0xc0 enable_cpucache+0x6d/0xf0 kmem_cache_init_late+0x42/0x75 start_kernel+0x343/0x4cb x86_64_start_kernel+0x127/0x134 secondary_startup_64+0xa5/0xb0 SOFTIRQ-ON-W at: __mutex_lock+0x4e/0x8c0 pcpu_alloc+0x1ac/0x5e0 alloc_kmem_cache_cpus.isra.70+0x25/0xa0 __do_tune_cpucache+0x2c/0x220 do_tune_cpucache+0x26/0xc0 enable_cpucache+0x6d/0xf0 kmem_cache_init_late+0x42/0x75 start_kernel+0x343/0x4cb x86_64_start_kernel+0x127/0x134 secondary_startup_64+0xa5/0xb0 RECLAIM_FS-ON-W at: __kmalloc+0x47/0x310 pcpu_extend_area_map+0x2b/0xc0 pcpu_alloc+0x3ec/0x5e0 alloc_kmem_cache_cpus.isra.70+0x25/0xa0 __do_tune_cpucache+0x2c/0x220 do_tune_cpucache+0x26/0xc0 enable_cpucache+0x6d/0xf0 __kmem_cache_create+0x1bf/0x390 create_cache+0xba/0x1b0 kmem_cache_create+0x1f8/0x2b0 ksm_init+0x6f/0x19d do_one_initcall+0x50/0x1b0 kernel_init_freeable+0x201/0x289 kernel_init+0xa/0x100 ret_from_fork+0x3a/0x50 INITIAL USE at: __mutex_lock+0x4e/0x8c0 pcpu_alloc+0x1ac/0x5e0 alloc_kmem_cache_cpus.isra.70+0x25/0xa0 setup_cpu_cache+0x2f/0x1f0 __kmem_cache_create+0x1bf/0x390 create_boot_cache+0x8b/0xb1 kmem_cache_init+0xa1/0x19e start_kernel+0x270/0x4cb x86_64_start_kernel+0x127/0x134 secondary_startup_64+0xa5/0xb0 } ... key at: [] pcpu_alloc_mutex+0x70/0xa0 ... acquired at: pcpu_alloc+0x1ac/0x5e0 __percpu_counter_init+0x4e/0xb0 btrfs_init_fs_root+0x99/0x1c0 [btrfs] btrfs_get_fs_root.part.54+0x5b/0x150 [btrfs] resolve_indirect_refs+0x130/0x830 [btrfs] find_parent_nodes+0x69e/0xff0 [btrfs] btrfs_find_all_roots_safe+0xa0/0x110 [btrfs] btrfs_find_all_roots+0x50/0x70 [btrfs] btrfs_qgroup_prepare_account_extents+0x53/0x90 [btrfs] btrfs_commit_transaction+0x3ce/0x9b0 [btrfs] transaction_kthread+0x176/0x1b0 [btrfs] kthread+0x102/0x140 ret_from_fork+0x3a/0x50 -> (&fs_info->commit_root_sem){++++..} ops: 1566382 { HARDIRQ-ON-W at: down_write+0x3e/0xa0 cache_block_group+0x287/0x420 [btrfs] find_free_extent+0x106c/0x12d0 [btrfs] btrfs_reserve_extent+0xd8/0x170 [btrfs] cow_file_range.isra.66+0x133/0x470 [btrfs] run_delalloc_range+0x121/0x410 [btrfs] writepage_delalloc.isra.50+0xfe/0x180 [btrfs] __extent_writepage+0x19a/0x360 [btrfs] extent_write_cache_pages.constprop.56+0x249/0x3e0 [btrfs] extent_writepages+0x4d/0x60 [btrfs] do_writepages+0x1a/0x70 __filemap_fdatawrite_range+0xa7/0xe0 btrfs_rename+0x5ee/0xdb0 [btrfs] vfs_rename+0x52a/0x7e0 SyS_rename+0x351/0x3b0 do_syscall_64+0x79/0x1e0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 HARDIRQ-ON-R at: down_read+0x35/0x90 caching_thread+0x57/0x560 [btrfs] normal_work_helper+0x1c0/0x5e0 [btrfs] process_one_work+0x1e0/0x5c0 worker_thread+0x44/0x390 kthread+0x102/0x140 ret_from_fork+0x3a/0x50 SOFTIRQ-ON-W at: down_write+0x3e/0xa0 cache_block_group+0x287/0x420 [btrfs] find_free_extent+0x106c/0x12d0 [btrfs] btrfs_reserve_extent+0xd8/0x170 [btrfs] cow_file_range.isra.66+0x133/0x470 [btrfs] run_delalloc_range+0x121/0x410 [btrfs] writepage_delalloc.isra.50+0xfe/0x180 [btrfs] __extent_writepage+0x19a/0x360 [btrfs] extent_write_cache_pages.constprop.56+0x249/0x3e0 [btrfs] extent_writepages+0x4d/0x60 [btrfs] do_writepages+0x1a/0x70 __filemap_fdatawrite_range+0xa7/0xe0 btrfs_rename+0x5ee/0xdb0 [btrfs] vfs_rename+0x52a/0x7e0 SyS_rename+0x351/0x3b0 do_syscall_64+0x79/0x1e0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 SOFTIRQ-ON-R at: down_read+0x35/0x90 caching_thread+0x57/0x560 [btrfs] normal_work_helper+0x1c0/0x5e0 [btrfs] process_one_work+0x1e0/0x5c0 worker_thread+0x44/0x390 kthread+0x102/0x140 ret_from_fork+0x3a/0x50 INITIAL USE at: down_write+0x3e/0xa0 cache_block_group+0x287/0x420 [btrfs] find_free_extent+0x106c/0x12d0 [btrfs] btrfs_reserve_extent+0xd8/0x170 [btrfs] cow_file_range.isra.66+0x133/0x470 [btrfs] run_delalloc_range+0x121/0x410 [btrfs] writepage_delalloc.isra.50+0xfe/0x180 [btrfs] __extent_writepage+0x19a/0x360 [btrfs] extent_write_cache_pages.constprop.56+0x249/0x3e0 [btrfs] extent_writepages+0x4d/0x60 [btrfs] do_writepages+0x1a/0x70 __filemap_fdatawrite_range+0xa7/0xe0 btrfs_rename+0x5ee/0xdb0 [btrfs] vfs_rename+0x52a/0x7e0 SyS_rename+0x351/0x3b0 do_syscall_64+0x79/0x1e0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 } ... key at: [] __key.61970+0x0/0xfffffffffff9aa88 [btrfs] ... acquired at: cache_block_group+0x287/0x420 [btrfs] find_free_extent+0x106c/0x12d0 [btrfs] btrfs_reserve_extent+0xd8/0x170 [btrfs] btrfs_alloc_tree_block+0x12f/0x4c0 [btrfs] btrfs_create_tree+0xbb/0x2a0 [btrfs] btrfs_create_uuid_tree+0x37/0x140 [btrfs] open_ctree+0x23c0/0x2660 [btrfs] btrfs_mount+0xd36/0xf90 [btrfs] mount_fs+0x3a/0x160 vfs_kern_mount+0x66/0x150 btrfs_mount+0x18c/0xf90 [btrfs] mount_fs+0x3a/0x160 vfs_kern_mount+0x66/0x150 do_mount+0x1c1/0xcc0 SyS_mount+0x7e/0xd0 do_syscall_64+0x79/0x1e0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> (&found->groups_sem){++++..} ops: 2134587 { HARDIRQ-ON-W at: down_write+0x3e/0xa0 __link_block_group+0x34/0x130 [btrfs] btrfs_read_block_groups+0x33d/0x7b0 [btrfs] open_ctree+0x2054/0x2660 [btrfs] btrfs_mount+0xd36/0xf90 [btrfs] mount_fs+0x3a/0x160 vfs_kern_mount+0x66/0x150 btrfs_mount+0x18c/0xf90 [btrfs] mount_fs+0x3a/0x160 vfs_kern_mount+0x66/0x150 do_mount+0x1c1/0xcc0 SyS_mount+0x7e/0xd0 do_syscall_64+0x79/0x1e0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 HARDIRQ-ON-R at: down_read+0x35/0x90 btrfs_calc_num_tolerated_disk_barrier_failures+0x113/0x1f0 [btrfs] open_ctree+0x207b/0x2660 [btrfs] btrfs_mount+0xd36/0xf90 [btrfs] mount_fs+0x3a/0x160 vfs_kern_mount+0x66/0x150 btrfs_mount+0x18c/0xf90 [btrfs] mount_fs+0x3a/0x160 vfs_kern_mount+0x66/0x150 do_mount+0x1c1/0xcc0 SyS_mount+0x7e/0xd0 do_syscall_64+0x79/0x1e0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 SOFTIRQ-ON-W at: down_write+0x3e/0xa0 __link_block_group+0x34/0x130 [btrfs] btrfs_read_block_groups+0x33d/0x7b0 [btrfs] open_ctree+0x2054/0x2660 [btrfs] btrfs_mount+0xd36/0xf90 [btrfs] mount_fs+0x3a/0x160 vfs_kern_mount+0x66/0x150 btrfs_mount+0x18c/0xf90 [btrfs] mount_fs+0x3a/0x160 vfs_kern_mount+0x66/0x150 do_mount+0x1c1/0xcc0 SyS_mount+0x7e/0xd0 do_syscall_64+0x79/0x1e0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 SOFTIRQ-ON-R at: down_read+0x35/0x90 btrfs_calc_num_tolerated_disk_barrier_failures+0x113/0x1f0 [btrfs] open_ctree+0x207b/0x2660 [btrfs] btrfs_mount+0xd36/0xf90 [btrfs] mount_fs+0x3a/0x160 vfs_kern_mount+0x66/0x150 btrfs_mount+0x18c/0xf90 [btrfs] mount_fs+0x3a/0x160 vfs_kern_mount+0x66/0x150 do_mount+0x1c1/0xcc0 SyS_mount+0x7e/0xd0 do_syscall_64+0x79/0x1e0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 INITIAL USE at: down_write+0x3e/0xa0 __link_block_group+0x34/0x130 [btrfs] btrfs_read_block_groups+0x33d/0x7b0 [btrfs] open_ctree+0x2054/0x2660 [btrfs] btrfs_mount+0xd36/0xf90 [btrfs] mount_fs+0x3a/0x160 vfs_kern_mount+0x66/0x150 btrfs_mount+0x18c/0xf90 [btrfs] mount_fs+0x3a/0x160 vfs_kern_mount+0x66/0x150 do_mount+0x1c1/0xcc0 SyS_mount+0x7e/0xd0 do_syscall_64+0x79/0x1e0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 } ... key at: [] __key.59101+0x0/0xfffffffffff9ab78 [btrfs] ... acquired at: find_free_extent+0xcb4/0x12d0 [btrfs] btrfs_reserve_extent+0xd8/0x170 [btrfs] btrfs_alloc_tree_block+0x12f/0x4c0 [btrfs] __btrfs_cow_block+0x110/0x5b0 [btrfs] btrfs_cow_block+0xd7/0x290 [btrfs] btrfs_search_slot+0x1f6/0x960 [btrfs] btrfs_lookup_inode+0x2a/0x90 [btrfs] __btrfs_update_delayed_inode+0x65/0x210 [btrfs] btrfs_commit_inode_delayed_inode+0x121/0x130 [btrfs] btrfs_evict_inode+0x3fe/0x6a0 [btrfs] evict+0xc4/0x190 __dentry_kill+0xbf/0x170 dput+0x2ae/0x2f0 SyS_rename+0x2a6/0x3b0 do_syscall_64+0x79/0x1e0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> (&delayed_node->mutex){+.+.-.} ops: 5580204 { HARDIRQ-ON-W at: __mutex_lock+0x4e/0x8c0 btrfs_delayed_update_inode+0x46/0x6e0 [btrfs] btrfs_update_inode+0x83/0x110 [btrfs] btrfs_dirty_inode+0x62/0xe0 [btrfs] touch_atime+0x8c/0xb0 do_generic_file_read+0x818/0xb10 __vfs_read+0xdc/0x150 vfs_read+0x8a/0x130 SyS_read+0x45/0xa0 do_syscall_64+0x79/0x1e0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 SOFTIRQ-ON-W at: __mutex_lock+0x4e/0x8c0 btrfs_delayed_update_inode+0x46/0x6e0 [btrfs] btrfs_update_inode+0x83/0x110 [btrfs] btrfs_dirty_inode+0x62/0xe0 [btrfs] touch_atime+0x8c/0xb0 do_generic_file_read+0x818/0xb10 __vfs_read+0xdc/0x150 vfs_read+0x8a/0x130 SyS_read+0x45/0xa0 do_syscall_64+0x79/0x1e0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 IN-RECLAIM_FS-W at: __mutex_lock+0x4e/0x8c0 __btrfs_release_delayed_node+0x3a/0x1f0 [btrfs] btrfs_evict_inode+0x22c/0x6a0 [btrfs] evict+0xc4/0x190 dispose_list+0x35/0x50 prune_icache_sb+0x42/0x50 super_cache_scan+0x139/0x190 shrink_slab+0x262/0x5b0 shrink_node+0x2eb/0x2f0 kswapd+0x2eb/0x890 kthread+0x102/0x140 ret_from_fork+0x3a/0x50 INITIAL USE at: __mutex_lock+0x4e/0x8c0 btrfs_delayed_update_inode+0x46/0x6e0 [btrfs] btrfs_update_inode+0x83/0x110 [btrfs] btrfs_dirty_inode+0x62/0xe0 [btrfs] touch_atime+0x8c/0xb0 do_generic_file_read+0x818/0xb10 __vfs_read+0xdc/0x150 vfs_read+0x8a/0x130 SyS_read+0x45/0xa0 do_syscall_64+0x79/0x1e0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 } ... key at: [] __key.56935+0x0/0xfffffffffff96b78 [btrfs] ... acquired at: __lock_acquire+0x264/0x11c0 lock_acquire+0xbd/0x1e0 __mutex_lock+0x4e/0x8c0 __btrfs_release_delayed_node+0x3a/0x1f0 [btrfs] btrfs_evict_inode+0x22c/0x6a0 [btrfs] evict+0xc4/0x190 dispose_list+0x35/0x50 prune_icache_sb+0x42/0x50 super_cache_scan+0x139/0x190 shrink_slab+0x262/0x5b0 shrink_node+0x2eb/0x2f0 kswapd+0x2eb/0x890 kthread+0x102/0x140 ret_from_fork+0x3a/0x50 stack backtrace: CPU: 1 PID: 50 Comm: kswapd0 Tainted: G W 4.12.14-kvmsmall #8 SLE15 (unreleased) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014 Call Trace: dump_stack+0x78/0xb7 print_irq_inversion_bug.part.38+0x19f/0x1aa check_usage_forwards+0x102/0x120 ? ret_from_fork+0x3a/0x50 ? check_usage_backwards+0x110/0x110 mark_lock+0x16c/0x270 __lock_acquire+0x264/0x11c0 ? pagevec_lookup_entries+0x1a/0x30 ? truncate_inode_pages_range+0x2b3/0x7f0 lock_acquire+0xbd/0x1e0 ? __btrfs_release_delayed_node+0x3a/0x1f0 [btrfs] __mutex_lock+0x4e/0x8c0 ? __btrfs_release_delayed_node+0x3a/0x1f0 [btrfs] ? __btrfs_release_delayed_node+0x3a/0x1f0 [btrfs] ? btrfs_evict_inode+0x1f6/0x6a0 [btrfs] __btrfs_release_delayed_node+0x3a/0x1f0 [btrfs] btrfs_evict_inode+0x22c/0x6a0 [btrfs] evict+0xc4/0x190 dispose_list+0x35/0x50 prune_icache_sb+0x42/0x50 super_cache_scan+0x139/0x190 shrink_slab+0x262/0x5b0 shrink_node+0x2eb/0x2f0 kswapd+0x2eb/0x890 kthread+0x102/0x140 ? mem_cgroup_shrink_node+0x2c0/0x2c0 ? kthread_create_on_node+0x40/0x40 ret_from_fork+0x3a/0x50 Signed-off-by: Jeff Mahoney Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ba0ae78218ad8fba73ca3be725303be50f936f1 Author: Anand Jain Date: Wed Mar 14 16:29:13 2018 +0800 btrfs: drop optimal argument from find_live_mirror() Drop optimal argument from the function find_live_mirror() as we can deduce it in the function itself. Also rename optimal to preferred_mirror. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 99f92a7c1eba4e3aa82b361bbe92a7ac088fc176 Author: Anand Jain Date: Wed Mar 14 16:29:12 2018 +0800 btrfs: drop num argument from find_live_mirror() Obtain the stripes info from the map directly and so no need to pass it as an argument. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/volumes.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 0a1e458a1e49dc6cf13b05f81098e01cf79ceaa1 Author: Nikolay Borisov Date: Thu Mar 15 16:00:27 2018 +0200 btrfs: Drop fs_info parameter from __btrfs_run_delayed_refs It's provided by transaction handle. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5ead2dd02c776e2acf50d5a8cd31a90513f45433 Author: Nikolay Borisov Date: Thu Mar 15 16:00:26 2018 +0200 btrfs: Drop fs_info parameter from btrfs_finish_extent_commit It's provided by the transaction handle. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 +-- fs/btrfs/extent-tree.c | 4 ++-- fs/btrfs/transaction.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) commit 460fb20a4bba040d7a95629ef7a4e9b97bfdbb6e Author: Nikolay Borisov Date: Thu Mar 15 16:00:25 2018 +0200 btrfs: Drop fs_info parameter from btrfs_qgroup_account_extents It's provided by the transaction handle. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/qgroup.c | 4 ++-- fs/btrfs/qgroup.h | 3 +-- fs/btrfs/transaction.c | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) commit c79a70b1330b374d6f4d88f266552054a4b58d08 Author: Nikolay Borisov Date: Thu Mar 15 17:27:37 2018 +0200 btrfs: drop fs_info parameter from btrfs_run_delayed_refs It's provided by the transaction handle. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/extent-tree.c | 9 +++++---- fs/btrfs/inode.c | 4 +--- fs/btrfs/transaction.c | 23 +++++++++++------------ 4 files changed, 18 insertions(+), 20 deletions(-) commit 39d7d09dc2d60a42c70f78ebf9e56ed123a9050e Author: Nikolay Borisov Date: Thu Mar 15 14:36:29 2018 +0200 btrfs: Remove unused flush var in shrink_delalloc Added by 08e007d2e577 ("Btrfs: improve the noflush reservation") and made redundant by 17024ad0a0fd ("Btrfs: fix early ENOSPC due to delalloc"). Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 5 ----- 1 file changed, 5 deletions(-) commit 101d2dc0b2a976a9979a247eb2cf4d1e4e9ec341 Author: Nikolay Borisov Date: Thu Mar 15 14:36:28 2018 +0200 btrfs: Remove unused extent_root var from caching_thread Added by b4570aa994b8 ("btrfs: fix compiling with CONFIG_BTRFS_DEBUG enabled.") and obsoleted by 2ff7e61e0d30 ("btrfs: take an fs_info directly when the root is not used otherwise"). Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 2 -- 1 file changed, 2 deletions(-) commit 338dae1ae64f413bc058d0f2e964480add5ddacc Author: Nikolay Borisov Date: Thu Mar 15 14:36:26 2018 +0200 btrfs: remove max_active var from open_ctree Introduced by 5cdc7ad337fb ("btrfs: Replace fs_info->workers with btrfs_workqueue.") but obsoleted by 2a4581983f90 ("btrfs: factor btrfs_init_workqueues() out of open_ctree()"). Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/disk-io.c | 3 --- 1 file changed, 3 deletions(-) commit 8535dc196769b85ac6cc93f1e06986a57cb08e3d Author: Nikolay Borisov Date: Thu Mar 15 14:36:25 2018 +0200 btrfs: Remove unused root var from relink_file_extents Added in 38c227d87c49 ("Btrfs: snapshot-aware defrag") but subsequently made redundant by 0b246afa62b0 ("btrfs: root->fs_info cleanup, add fs_info convenience variables"). Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/inode.c | 2 -- 1 file changed, 2 deletions(-) commit 4eeb97c67a90a2193cb622f4df8076cba7c42023 Author: Nikolay Borisov Date: Thu Mar 15 14:36:24 2018 +0200 btrfs: Remove unused tot_len var from lzo_decompress Added already unused in a6fa6fae40ec ("btrfs: Add lzo compression support"). Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/lzo.c | 2 -- 1 file changed, 2 deletions(-) commit d6e823a578970381bec576d376eea16dac9868a1 Author: Nikolay Borisov Date: Thu Mar 15 14:36:23 2018 +0200 btrfs: Remove unused length var from scrub_handle_errored_block Added in b5d67f64f9bc ("Btrfs: change scrub to support big blocks") but rendered redundant by be50a8ddaae1 ("Btrfs: Simplify scrub_setup_recheck_block()'s argument"). Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/scrub.c | 2 -- 1 file changed, 2 deletions(-) commit a6dbceafb915e86d1a34d8d61403c59e01c2875c Author: Nikolay Borisov Date: Thu Mar 15 14:36:22 2018 +0200 btrfs: Remove unused op_key var from add_delayed_refs Added as part of 86d5f9944252 ("btrfs: convert prelimary reference tracking to use rbtrees") but never used. tmp_op_key essentially subsumed that variable. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/backref.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ba89b80268c162eca8f23c5d71eb710d65a132fe Author: Qu Wenruo Date: Wed Jan 31 13:56:15 2018 +0800 btrfs: volumes: Remove the meaningless condition of minimal nr_devs when allocating a chunk When checking the minimal nr_devs, there is one dead and meaningless condition: if (ndevs < devs_increment * sub_stripes || ndevs < devs_min) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This condition is meaningless, @devs_increment has nothing to do with @sub_stripes. In fact, in btrfs_raid_array[], profile with sub_stripes larger than 1 (RAID10) already has the @devs_increment set to 2. So no need to multiple it by @sub_stripes. And above condition is also dead. For RAID10, @devs_increment * @sub_stripes equals 4, which is also the @devs_min of RAID10. For other profiles, @sub_stripes is always 1, and since @ndevs is rounded down to @devs_increment, the condition will always be true. Remove the meaningless condition to make later reader wander less. Signed-off-by: Qu Wenruo Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6f47c706d9d4055ecdd125023577a20449c12b24 Author: Nikolay Borisov Date: Tue Mar 13 12:22:32 2018 +0200 btrfs: Document parameters of btrfs_reserve_extent This function is the entry to the extent allocator and as such has quite a number of parameters. Some of those have subtle effects on the allocation algorithm. Document the parameters. Signed-off-by: Nikolay Borisov Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit d87ff75863e92a500538ab53318c5740f196631e Author: Nikolay Borisov Date: Mon Mar 12 14:48:09 2018 +0200 btrfs: Handle error from btrfs_uuid_tree_rem call in _btrfs_ioctl_set_received_subvol As with every function which deals with modifying the btree btrfs_uuid_tree_rem can fail for any number of reasons (ie. EIO/ENOMEM). Handle return error value from this function gracefully by aborting the transaction. Fixes: dd5f9615fc5c ("Btrfs: maintain subvolume items in the UUID tree") Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ioctl.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 776c4a7ce86f4c95d9fc6307d44a4e9e1a740e40 Author: Nikolay Borisov Date: Tue Mar 13 10:26:06 2018 +0200 btrfs: Use sizeof directly instead of a constant variable The kernel would like to have all stack VLA usage removed[1]. Unfortunately using an integer constant variable as the size of an array is still considered a VLA. Instead let's use directly sizeof(var) which removes the VLA usage. Use the occasion to remove csum_size altogether and use sizeof() also for the size passed to memcmp [1]: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d0ee39349311ce823c36ece7fa066827ab8eb7af Author: David Sterba Date: Thu Mar 8 14:35:48 2018 +0100 btrfs: rename submit callbacks and drop double underscores Signed-off-by: David Sterba fs/btrfs/disk-io.c | 8 ++++---- fs/btrfs/inode.c | 23 +++++++++++------------ 2 files changed, 15 insertions(+), 16 deletions(-) commit 6c553435870bf351c594437b4ba8babbdb0bb37e Author: David Sterba Date: Thu Mar 8 13:47:33 2018 +0100 btrfs: remove unused parameters from extent_submit_bio_done_t Remove parameters not used by any of the callbacks. Signed-off-by: David Sterba fs/btrfs/disk-io.c | 6 ++---- fs/btrfs/extent_io.h | 3 +-- fs/btrfs/inode.c | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) commit d0779291b1e9666aa4aac46ffd8062e3c3b0f2ab Author: David Sterba Date: Thu Mar 8 13:47:33 2018 +0100 btrfs: remove unused parameters from extent_submit_bio_start_t Remove parameters not used by any of the callbacks. Signed-off-by: David Sterba fs/btrfs/disk-io.c | 2 -- fs/btrfs/extent_io.h | 3 +-- fs/btrfs/inode.c | 4 +--- 3 files changed, 2 insertions(+), 7 deletions(-) commit a758781d4b76c38374f155e2f2cf902e13b9e50e Author: David Sterba Date: Fri Jun 23 03:05:23 2017 +0200 btrfs: separate types for submit_bio_start and submit_bio_done The callbacks make use of different parameters that are passed to the other type unnecessarily. This patch adds separate types for each and the unused parameters will be removed. The type extent_submit_bio_hook_t keeps all parameters and can be used where the start/done types are not appropriate. Signed-off-by: David Sterba fs/btrfs/disk-io.c | 8 ++++---- fs/btrfs/disk-io.h | 4 ++-- fs/btrfs/extent_io.h | 9 +++++++++ 3 files changed, 15 insertions(+), 6 deletions(-) commit d9d19a010b8b186668ce1182bcf92ab53d11c084 Author: David Sterba Date: Mon Mar 5 16:35:29 2018 +0100 btrfs: kill tree_mod_log_set_root_pointer helper A useless wrapper around tree_mod_log_insert_root that hides missing error handling. Move it to the callers. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 0e82bcfe3c5e557ff9262eac59526e5208b84c60 Author: David Sterba Date: Mon Mar 5 16:16:54 2018 +0100 btrfs: kill tree_mod_log_set_node_key helper A trivial wrapper that can be simply opencoded and makes the GFP allocation request more visible. The error handling is now moved to the callers. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit bf1d342510bdba21b5f0c68057cd9fe6f68d0dc1 Author: David Sterba Date: Mon Mar 5 15:47:39 2018 +0100 btrfs: kill trivial wrapper tree_mod_log_eb_move The wrapper is effectively an alias for tree_mod_log_insert_move but also hides the missing error handling. To make that more visible, lift the BUG_ON to the callers. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit b1a09f1ec540408abf3a50d15dff5d9506932693 Author: David Sterba Date: Mon Mar 5 15:43:41 2018 +0100 btrfs: remove trivial locking wrappers of tree mod log The wrappers are trivial and do not bring any extra value on top of the plain locking primitives. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.c | 58 +++++++++++++++++++------------------------------------- 1 file changed, 19 insertions(+), 39 deletions(-) commit bcd24dabe080a627333fb058fdfe760dc579edf1 Author: David Sterba Date: Mon Mar 5 15:33:18 2018 +0100 btrfs: drop fs_info parameter from __tree_mod_log_oldest_root It's provided by the extent_buffer. Signed-off-by: David Sterba fs/btrfs/ctree.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit b6dfa35bd56762581bfc60b7eb9b1a4d7d10c289 Author: David Sterba Date: Mon Mar 5 15:31:18 2018 +0100 btrfs: embed tree_mod_move structure to tree_mod_elem The tree_mod_move is not used anywhere and can be embedded as anonymous structure. Signed-off-by: David Sterba fs/btrfs/ctree.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit a446a979ff4ec6784b59583b929e4656fe2f8e32 Author: David Sterba Date: Mon Mar 5 15:26:29 2018 +0100 btrfs: drop unused fs_info parameter from tree_mod_log_eb_move Signed-off-by: David Sterba fs/btrfs/ctree.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 95b757c164820d7c7262c1e546b47d79dd256c96 Author: David Sterba Date: Mon Mar 5 15:22:30 2018 +0100 btrfs: drop fs_info parameter from tree_mod_log_free_eb It's provided by the extent_buffer. Signed-off-by: David Sterba fs/btrfs/ctree.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit db7279a20b0982587729cb2a23780e42d536721b Author: David Sterba Date: Mon Mar 5 15:14:25 2018 +0100 btrfs: drop fs_info parameter from tree_mod_log_free_eb It's provided by the extent_buffer. Signed-off-by: David Sterba fs/btrfs/ctree.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit e09c2efe7eba1498bd3f9300b4aadef9b939a259 Author: David Sterba Date: Mon Mar 5 15:09:03 2018 +0100 btrfs: drop fs_info parameter from tree_mod_log_insert_key It's provided by the extent_buffer. Signed-off-by: David Sterba fs/btrfs/ctree.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit 6074d45f60760f7a8aa34883f37cd4d54cd5855e Author: David Sterba Date: Mon Mar 5 15:03:52 2018 +0100 btrfs: drop fs_info parameter from tree_mod_log_insert_move It's provided by the extent_buffer. Signed-off-by: David Sterba fs/btrfs/ctree.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 3ac6de1abd7a485f48948af9ef18139500eef9ae Author: David Sterba Date: Mon Mar 5 15:00:37 2018 +0100 btrfs: drop fs_info parameter from tree_mod_log_set_node_key It's provided by the extent_buffer. Signed-off-by: David Sterba fs/btrfs/ctree.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit b8b3d625ce67e4d4b994ae8d09308b3ab4f651d8 Author: David Sterba Date: Mon Jun 12 19:50:41 2017 +0200 btrfs: document more parameters of submit_extent_page Signed-off-by: David Sterba fs/btrfs/extent_io.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 0c8508a6e7417e1bee3cb11a681184d907909549 Author: David Sterba Date: Mon Jun 12 20:00:43 2017 +0200 btrfs: cleanup merging conditions in submit_extent_page The merge call was factored out to a separate helper but it's a trivial one and arguably we can opencode it and cache the value. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) commit 8eec8296a086cf9949dc4b91494fc944778ba5a0 Author: David Sterba Date: Tue Jun 6 19:50:13 2017 +0200 btrfs: remove redundant variable in __do_readpage The value of page_end is only stored to end, no other use. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5c2b1fd7531d837bb9a6079d4e730a889b0e303d Author: David Sterba Date: Tue Jun 6 19:22:55 2017 +0200 btrfs: assume that bio_ret is always valid in submit_extent_page All callers pass a valid pointer so we can drop the redundant checks. The call to submit_one_bio never happend and can be removed. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6ca1765b366e3a678e143de0decc3d1d39c15429 Author: Liu Bo Date: Wed Mar 7 12:08:09 2018 -0700 Btrfs: scrub: batch rebuild for raid56 In case of raid56, writes and rebuilds always take BTRFS_STRIPE_LEN(64K) as unit, however, scrub_extent() sets blocksize as unit, so rebuild process may be triggered on every block on a same stripe. A typical example would be that when we're replacing a disappeared disk, all reads on the disks get -EIO, every block (size is 4K if blocksize is 4K) would go thru these, scrub_handle_errored_block scrub_recheck_block # re-read pages one by one scrub_recheck_block # rebuild by calling raid56_parity_recover() page by page Although with raid56 stripe cache most of reads during rebuild can be avoided, the parity recover calculation(xor or raid6 algorithms) needs to be done $(BTRFS_STRIPE_LEN / blocksize) times. This makes it smarter by doing raid56 scrub/replace on stripe length. Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/scrub.c | 79 +++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 61 insertions(+), 18 deletions(-) commit 416a72022e43b4c1c5e144ec6af3f95870e8f71a Author: David Sterba Date: Fri Mar 9 14:37:01 2018 +0100 btrfs: sort and group mount option definitions Sort mount options by the primary name, followed by the 'no-' counterpart if it exists. Group the deprecated and debugging options. Enum and token defintions are synced. Signed-off-by: David Sterba fs/btrfs/super.c | 139 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 86 insertions(+), 53 deletions(-) commit 62b8e077317971b74d79c9cc501db2ae861d48b2 Author: Howard McLauchlan Date: Thu Mar 8 10:48:48 2018 -0800 btrfs: Add nossd_spread mount option Btrfs has two mount options for SSD optimizations: ssd and ssd_spread. Presently there is an option to disable all SSD optimizations, but there isn't an option to disable just ssd_spread. This patch adds a mount option nossd_spread that disables ssd_spread only. Reviewed-by: Josef Bacik Signed-off-by: Howard McLauchlan Reviewed-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/super.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 92e2f7e37004115db2ba98c6999a74ff5e41c83f Author: Nikolay Borisov Date: Mon Feb 5 10:41:16 2018 +0200 btrfs: Remove btrfs_fs_info::open_ioctl_trans Since userspace transaction have been removed we no longer have use for this field so delete it. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 - fs/btrfs/extent-tree.c | 3 +-- fs/btrfs/transaction.c | 9 +++------ 3 files changed, 4 insertions(+), 9 deletions(-) commit bcf3a3e7fb55f9238bc848147316317d099c2048 Author: Nikolay Borisov Date: Mon Feb 5 10:41:15 2018 +0200 btrfs: Remove code referencing unused TRANS_USERSPACE Now that the userspace transaction ioctls have been removed, TRANS_USERSPACE is no longer used hence we can remove it. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/transaction.c | 27 ++++++--------------------- fs/btrfs/transaction.h | 6 +----- 2 files changed, 7 insertions(+), 26 deletions(-) commit 859e682d58a2bd60f1aa2a32f712ee444faf4003 Author: Nikolay Borisov Date: Mon Feb 5 10:41:14 2018 +0200 btrfs: Remove btrfs_file_private::trans Now that the userspace transaction IOCTL have been removed, this member is no longer used so just remove it Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 - 1 file changed, 1 deletion(-) commit 7a5a07a81062915c65ce27e80608b1c819b1f936 Author: Nikolay Borisov Date: Mon Feb 5 10:41:13 2018 +0200 btrfs: Remove userspace transaction ioctls Commit 3558d4f88ec8 ("btrfs: Deprecate userspace transaction ioctls") marked the beginning of the end of userspace transaction. This commit finishes the job! There are no known users and ceph does not use the ioctl anymore. Signed-off-by: Nikolay Borisov Acked-by: Sage Weil Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 - fs/btrfs/file.c | 8 ----- fs/btrfs/ioctl.c | 95 -------------------------------------------------------- 3 files changed, 104 deletions(-) commit 4d31778aa2fa342f5f92ca4025b293a1729161d1 Author: Qu Wenruo Date: Tue Dec 19 15:44:54 2017 +0800 btrfs: qgroup: Fix root item corruption when multiple same source snapshots are created with quota enabled When multiple pending snapshots referring to the same source subvolume are executed, enabled quota will cause root item corruption, where root items are using old bytenr (no backref in extent tree). This can be triggered by fstests btrfs/152. The cause is when source subvolume is still dirty, extra commit (simplied transaction commit) of qgroup_account_snapshot() can skip dirty roots not recorded in current transaction, making root item of source subvolume not updated. Fix it by forcing recording source subvolume in current transaction before qgroup sub-transaction commit. Reported-by: Justin Maggard Signed-off-by: Qu Wenruo Reviewed-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/transaction.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 2e32ef87b074cb8098436634b649b4b2b523acbe Author: Nikolay Borisov Date: Wed Feb 14 14:37:26 2018 +0200 btrfs: Relax memory barrier in btrfs_tree_unlock When performing an unlock on an extent buffer we'd like to order the decrement of extent_buffer::blocking_writers with waking up any waiters. In such situations it's sufficient to use smp_mb__after_atomic rather than the heavy smp_mb. On architectures where atomic operations are fully ordered (such as x86 or s390) unconditionally executing a heavyweight smp_mb instruction causes a severe hit to performance while bringin no improvements in terms of correctness. The better thing is to use the appropriate smp_mb__after_atomic routine which will do the correct thing (invoke a full smp_mb or in the case of ordered atomics insert a compiler barrier). Put another way, an RMW atomic op + smp_load__after_atomic equals, in terms of semantics, to a full smp_mb. This ensures that none of the problems described in the accompanying comment of waitqueue_active occur. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/locking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c829b722dffb22aaf9e3ea1b1d88dac49bd0768 Author: Anand Jain Date: Wed Mar 7 17:29:18 2018 +0800 btrfs: add define for oldest generation Some functions can filter metadata by the generation. Add a define that will annotate such arguments. Signed-off-by: Anand Jain Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 ++ fs/btrfs/ioctl.c | 2 +- fs/btrfs/tree-defrag.c | 5 ++--- fs/btrfs/uuid-tree.c | 2 +- fs/btrfs/volumes.c | 3 ++- 5 files changed, 8 insertions(+), 6 deletions(-) commit 051c98eb11e6fd64a8306851c34ee485b5817955 Author: David Sterba Date: Wed Mar 7 15:33:22 2018 +0100 btrfs: open code trivial helper btrfs_page_exists_in_range The called function name is self explanatory. Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 6 ------ fs/btrfs/file.c | 3 ++- fs/btrfs/inode.c | 4 ++-- 3 files changed, 4 insertions(+), 9 deletions(-) commit 965aab1cfc13dacc3d5ad0d8d8eb4e0a7ea8c1d1 Author: Matthew Wilcox Date: Tue Mar 6 11:23:16 2018 -0800 btrfs: Use filemap_range_has_page() The current implementation of btrfs_page_exists_in_range() gives the wrong answer if the workingset code has stored a shadow entry in the page cache. The filemap_range_has_page() function does not have this problem, and it's shared code, so use it instead. eigned-off-by: Matthew Wilcox Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 6 ++++- fs/btrfs/inode.c | 70 -------------------------------------------------- 2 files changed, 5 insertions(+), 71 deletions(-) commit ea3886cab76f1026a5db988fa6fad997e98f3a32 Author: Tariq Toukan Date: Mon Jul 10 12:52:36 2017 +0300 net/mlx5e: Use inline MTTs in UMR WQEs When modifying the page mapping of a HW memory region (via a UMR post), post the new values inlined in WQE, instead of using a data pointer. This is a micro-optimization, inline UMR WQEs of different rings scale better in HW. In addition, this obsoletes a few control flows and helps delete ~50 LOC. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 16 ++--- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 82 +++++------------------ drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 28 ++++---- 3 files changed, 38 insertions(+), 88 deletions(-) commit e4d86a4a58b436fca0ce084ea453cc0ec8c39bb4 Author: Tariq Toukan Date: Sun Jan 7 14:15:02 2018 +0200 net/mlx5e: Do not busy-wait for UMR completion in Striding RQ Do not busy-wait a pending UMR completion. Under high HW load, busy-waiting a delayed completion would fully utilize the CPU core and mistakenly indicate a SW bottleneck. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18187fb2c3c138630f6b7c7b7ba7ab41ccd95129 Author: Tariq Toukan Date: Tue Jul 18 12:07:06 2017 +0300 net/mlx5e: Code movements in RX UMR WQE post Gets the process of a UMR WQE post in one function, in preparation for a downstream patch that inlines the WQE data. No functional change here. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 107 ++++++++++-------------- 1 file changed, 45 insertions(+), 62 deletions(-) commit 73281b78a37a1a3f392fd5b6116d04e597484529 Author: Tariq Toukan Date: Sun Feb 11 15:21:33 2018 +0200 net/mlx5e: Derive Striding RQ size from MTU In Striding RQ, each WQE serves multiple packets (hence called Multi-Packet WQE, MPWQE). The size of a MPWQE is constant (currently 256KB). Upon a ringparam set operation, we calculate the number of MPWQEs per RQ. For this, first it is needed to determine the number of packets that can reside within a single MPWQE. In this patch we use the actual MTU size instead of ETH_DATA_LEN for this calculation. This implies that a change in MTU might require a change in Striding RQ ring size. In addition, this obsoletes some WQEs-to-packets translation functions and helps delete ~60 LOC. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 63 ++++++----------- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 79 ++-------------------- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 71 ++++++++++++------- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 2 +- .../ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c | 2 +- 6 files changed, 80 insertions(+), 139 deletions(-) commit 472a1e44b3495df01c83e048667ef93dd2ea1ca0 Author: Tariq Toukan Date: Mon Mar 12 14:24:41 2018 +0200 net/mlx5e: Save MTU in channels params Knowing the MTU is required for RQ creation flow. By our design, channels creation flow is totally isolated from priv/netdev, and can be completed with access to channels params and mdev. Adding the MTU to the channels params helps preserving that. In addition, we save it in RQ to make its access faster in datapath checks. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 10 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 58 ++++++++++++---------- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 3 +- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 3 +- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 23 +++++---- 5 files changed, 52 insertions(+), 45 deletions(-) commit 533788988cb62cf8c9a065612860fb89e50662d3 Author: Talat Batheesh Date: Tue Mar 6 14:58:46 2018 +0200 net/mlx5e: IPoIB, Fix spelling mistake Fix spelling mistake in debug message text. "dettaching" -> "detaching" Signed-off-by: Talat Batheesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c75062823d8aa340615962bf261187bafa8d795 Author: Alaa Hleihel Date: Thu Feb 1 15:34:35 2018 +0200 net/mlx5: Change teardown with force mode failure message to warning With ConnectX-4, we expect the force teardown to fail in case that DC was enabled, therefore change the message from error to warning. Signed-off-by: Alaa Hleihel Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2d3907c234618c20239127f2c234b4e92adf5ef Author: Saeed Mahameed Date: Tue Feb 13 17:07:02 2018 -0800 net/mlx5: Eliminate query xsrq dead code 1. This function is not used anywhere in mlx5 driver 2. It has a memcpy statement that makes no sense and produces build warning with gcc8 drivers/net/ethernet/mellanox/mlx5/core/transobj.c: In function 'mlx5_core_query_xsrq': drivers/net/ethernet/mellanox/mlx5/core/transobj.c:347:3: error: 'memcpy' source argument is the same as destination [-Werror=restrict] Fixes: 01949d0109ee ("net/mlx5_core: Enable XRCs and SRQs when using ISSI > 0") Reported-by: Arnd Bergmann Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/transobj.c | 21 --------------------- include/linux/mlx5/transobj.h | 1 - 2 files changed, 22 deletions(-) commit 7b2117bb8ff98b7b82543f77768dfe7aca7e3746 Author: Saeed Mahameed Date: Thu Feb 1 05:37:44 2018 -0800 net/mlx5e: Use eq ptr from cq Instead of looking for the EQ of the CQ, remove that redundant code and use the eq pointer stored in the cq struct. Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit ad32eb2df801548a4b55802384fbbfbc04d76bfa Author: Bjørn Mork Date: Sun Mar 18 13:58:06 2018 +0100 PCI: Always define the of_node helpers Simply move these inline functions outside the ifdef instead of duplicating them as stubs in the !OF case. The struct device of_node field does not depend on OF. This also fixes the missing stubbed pci_bus_to_OF_node(). Signed-off-by: Bjørn Mork Signed-off-by: Bjorn Helgaas include/linux/pci.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 4e5fad429bd179a41fa8b222463397e8cc806cd1 Author: Mika Westerberg Date: Tue Mar 27 13:48:35 2018 +0300 PCI/DPC: Do not enable DPC if AER control is not allowed by the BIOS Commit eed85ff4c0da ("PCI/DPC: Enable DPC only if AER is available") made DPC control dependent whether AER is enabled in the OS. However, it does not take into account situations where BIOS has not given OS control of AER: acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI] acpi PNP0A08:00: _OSC: platform does not support [AER] acpi PNP0A08:00: _OSC: OS now controls [PCIeHotplug PME PCIeCapability] I think here it is better not to enable DPC even if the capability is available because then it would be against what "Determination of DPC Control" note in PCIe 4.0 sec 6.1.10 recommends. Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas drivers/pci/pcie/portdrv_acpi.c | 4 ++-- drivers/pci/pcie/portdrv_core.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit adf313f41a0d6495ac9b313d012a291c6dad6b21 Author: Andi Shyti Date: Fri Mar 30 11:13:10 2018 -0700 Input: stmfts, s6sy761 - update my e-mail Because I will be leaving Samsung soon, for reachability update my reference e-mail to etezian.org. Signed-off-by: Andi Shyti Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/s6sy761.c | 2 +- drivers/input/touchscreen/stmfts.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1d960003603403f28b9d391087905491b98f3923 Author: Marek Szyprowski Date: Fri Mar 30 11:12:21 2018 -0700 Input: stmfts - use async probe & suspend/resume to avoid 2s delay Executing stmfts_power_on() function lasts over 2 seconds, what significantly slows down the boot and resume processes if driver is compiled in. Avoid this delay by forcing this driver to be probed and suspended/resumed asynchronously. Signed-off-by: Marek Szyprowski Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/stmfts.c | 2 ++ 1 file changed, 2 insertions(+) commit 567b9b549cfa1cbc202762ae97b5385c29ade1e3 Author: Masaki Ota Date: Mon Jan 29 14:36:54 2018 -0800 Input: ALPS - fix TrackStick detection on Thinkpad L570 and Latitude 7370 The primary interface for the touchpad device in Thinkpad L570 is SMBus, so ALPS overlooked PS2 interface Firmware setting of TrackStick, and shipped with TrackStick otp bit is disabled. The address 0xD7 contains device number information, so we can identify the device by checking this value, but to access it we need to enable Command mode, and then re-enable the device. Devices shipped in Thinkpad L570 report either 0x0C or 0x1D as device numbers, if we see them we assume that the devices are DualPoints. The same issue exists on Dell Latitude 7370. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196929 Fixes: 646580f793 ("Input: ALPS - fix multi-touch decoding on SS4 plus touchpads") Signed-off-by: Masaki Ota Tested-by: Aaron Ma Tested-by: Jonathan Liu Tested-by: Jaak Ristioja Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit f0553ba08a19031726f120448eedc3aff1599c23 Author: Frederick Lawler Date: Thu Mar 22 16:20:55 2018 -0500 PCI/AER: Use cached AER Capability offset Replace pci_find_ext_capability(..., PCI_EXT_CAP_ID_ERR) calls with pci_dev->aer_cap. pci_dev->aer_cap is initialized in pci_init_capabilities(), which happens before any of these users of the AER Capability. Signed-off-by: Frederick Lawler Signed-off-by: Bjorn Helgaas drivers/pci/pcie/aer/aer_inject.c | 4 ++-- drivers/pci/pcie/aer/ecrc.c | 4 ++-- drivers/pci/pcie/portdrv_core.c | 14 ++++++++++---- 3 files changed, 14 insertions(+), 8 deletions(-) commit d850882b726f6db01b0792151e72e69b234aa461 Author: Bjorn Helgaas Date: Fri Mar 9 11:21:30 2018 -0600 PCI/portdrv: Rename and reverse sense of pcie_ports_auto The platform may restrict the OS's use of PCIe services, e.g., via the ACPI _OSC method. The user may use "pcie_ports=native" to force the port driver to use PCIe services even if the platform asked us not to. The "pcie_ports=native" parameter determines the setting of pcie_ports_auto. Rename this to pcie_ports_native and reverse the sense to simplify the code. Signed-off-by: Bjorn Helgaas drivers/pci/pcie/portdrv.h | 2 +- drivers/pci/pcie/portdrv_core.c | 15 ++++----------- drivers/pci/pcie/portdrv_pci.c | 15 +++++++-------- 3 files changed, 12 insertions(+), 20 deletions(-) commit 842b447f0074b93e9f7db60039fdc72ec14bef9a Author: Bjorn Helgaas Date: Fri Mar 9 11:21:29 2018 -0600 PCI/portdrv: Encapsulate pcie_ports_auto inside the port driver "pcie_ports_auto" is only used inside the PCIe port driver itself, so move it from include/linux/pci.h to portdrv.h so it's not visible to the whole kernel. Signed-off-by: Bjorn Helgaas drivers/pci/pcie/portdrv.h | 2 ++ include/linux/pci.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4c0fd7648d880d98add62552cffdf993bde65cf8 Author: Bjorn Helgaas Date: Fri Mar 9 11:21:28 2018 -0600 PCI/portdrv: Remove unnecessary "pcie_ports=auto" parameter The "pcie_ports=auto" parameter set pcie_ports_disabled and pcie_ports_auto to their compiled-in defaults, so specifying the parameter is the same as not using it at all. Remove the "pcie_ports=auto" parameter and update the documentation. Signed-off-by: Bjorn Helgaas Documentation/admin-guide/kernel-parameters.txt | 15 +++++++-------- drivers/pci/pcie/portdrv_pci.c | 3 --- 2 files changed, 7 insertions(+), 11 deletions(-) commit 1e447c57ae367c030e7b424f55a91470ae7604ca Author: Bjorn Helgaas Date: Fri Mar 9 11:21:27 2018 -0600 PCI/portdrv: Remove "pcie_hp=nomsi" kernel parameter 7570a333d8b0 ("PCI: Add pcie_hp=nomsi to disable MSI/MSI-X for pciehp driver") added the "pcie_hp=nomsi" kernel parameter to work around this error on shutdown: irq 16: nobody cared (try booting with the "irqpoll" option) Pid: 1081, comm: reboot Not tainted 3.2.0 #1 ... Disabling IRQ #16 This happened on an unspecified system (possibly involving the Integrated Device Technology, Inc. Device 807f bridge) where "an un-wanted interrupt is generated when PCI driver switches from MSI/MSI-X to INTx while shutting down the device." The implication was that the device was buggy, but it is normal for a device to use INTx after MSI/MSI-X have been disabled. The only problem was that the driver was still attached and it wasn't prepared for INTx interrupts. Prarit Bhargava fixed this issue with fda78d7a0ead ("PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown()"). There is no automated way to set this parameter, so it's not very useful for distributions or end users. It's really only useful for debugging, and we have "pci=nomsi" for that purpose. Revert 7570a333d8b0 to remove the "pcie_hp=nomsi" parameter. Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki CC: MUNEDA Takahiro CC: Kenji Kaneshige CC: Prarit Bhargava Documentation/admin-guide/kernel-parameters.txt | 4 ---- drivers/pci/pcie/portdrv.h | 12 ------------ drivers/pci/pcie/portdrv_core.c | 20 +++----------------- 3 files changed, 3 insertions(+), 33 deletions(-) commit 1b64cb87cf0013cdd04b7e1665072a00f92b830f Author: Bjorn Helgaas Date: Fri Mar 9 11:21:26 2018 -0600 PCI/portdrv: Remove unnecessary include of portdrv_pci.c doesn't use anything from . Remove the include of it. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki drivers/pci/pcie/portdrv_pci.c | 1 - 1 file changed, 1 deletion(-) commit 02bfeb484230dfd073148a17253aeb1717ce769c Author: Bjorn Helgaas Date: Fri Mar 9 11:21:25 2018 -0600 PCI/portdrv: Simplify PCIe feature permission checking Some PCIe features (AER, DPC, hotplug, PME) can be managed by either the platform firmware or the OS, so the host bridge driver may have to request permission from the platform before using them. On ACPI systems, this is done by negotiate_os_control() in acpi_pci_root_add(). The PCIe port driver later uses pcie_port_platform_notify() and pcie_port_acpi_setup() to figure out whether it can use these features. But all we need is a single bit for each service, so these interfaces are needlessly complicated. Simplify this by adding bits in the struct pci_host_bridge to show when the OS has permission to use each feature: + unsigned int native_aer:1; /* OS may use PCIe AER */ + unsigned int native_hotplug:1; /* OS may use PCIe hotplug */ + unsigned int native_pme:1; /* OS may use PCIe PME */ These are set when we create a host bridge, and the host bridge driver can clear the bits corresponding to any feature the platform doesn't want us to use. Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki drivers/acpi/pci_root.c | 13 +++++++++++-- drivers/pci/pcie/Makefile | 1 - drivers/pci/pcie/portdrv.h | 11 ----------- drivers/pci/pcie/portdrv_core.c | 42 +++++++++++++++++++++++++---------------- drivers/pci/probe.c | 10 ++++++++++ include/linux/pci.h | 3 +++ 6 files changed, 50 insertions(+), 30 deletions(-) commit 168f3ae595d6a6cee8321633f29273a7dd4fc83e Author: Bjorn Helgaas Date: Fri Mar 9 11:21:24 2018 -0600 PCI/portdrv: Remove unused PCIE_PORT_SERVICE_VC No driver registers for PCIE_PORT_SERVICE_VC, so remove it. This removes the VC "service" files from /sys/bus/pci_express/devices, e.g., 0000:07:00.0:pcie108, 0000:08:04.0:pcie208 (all the files that contained "8" as the last digit of the "pcieXXX" part). The port driver created these files for PCIe port devices that have a VC Capability. Since this reduces PCIE_PORT_DEVICE_MAXSERVICES and moves DPC down into the spot where VC used to be, the DPC sysfs files will now be named "pcieXX8". I don't think there's anything useful userspace can do with those files, so I hope nobody cares about these filenames. There is no VC driver that calls pcie_port_service_register(), so there never was a /sys/bus/pci_express/drivers/vc directory. Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Reviewed-by: Christoph Hellwig drivers/pci/pcie/portdrv.h | 6 ++---- drivers/pci/pcie/portdrv_acpi.c | 2 +- drivers/pci/pcie/portdrv_core.c | 14 ++++---------- 3 files changed, 7 insertions(+), 15 deletions(-) commit c6c889d932bb49d95273711a790d16f814cb213b Author: Bjorn Helgaas Date: Fri Mar 9 11:06:56 2018 -0600 PCI/portdrv: Remove pcie_port_bus_type link order dependency The pcie_port_bus_type must be registered before drivers that depend on it can be registered. Those drivers include: pcied_init() # PCIe native hotplug driver aer_service_init() # AER driver dpc_service_init() # DPC driver pcie_pme_service_init() # PME driver Previously we registered pcie_port_bus_type from pcie_portdrv_init(), a device_initcall. The callers of pcie_port_service_register() (above) are also device_initcalls. This is fragile because the device_initcall ordering depends on link order, which is not explicit. Register pcie_port_bus_type from pci_driver_init() along with pci_bus_type. This removes the link order dependency between portdrv and the pciehp, AER, DPC, and PCIe PME drivers. Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Reviewed-by: Christoph Hellwig drivers/pci/pci-driver.c | 44 ++++++++++++++++++++++++++++++++- drivers/pci/pcie/Makefile | 2 +- drivers/pci/pcie/portdrv_bus.c | 55 ------------------------------------------ drivers/pci/pcie/portdrv_pci.c | 13 +--------- 4 files changed, 45 insertions(+), 69 deletions(-) commit 79a011194b23302dc43f265ed4237054877768ff Author: Bjorn Helgaas Date: Fri Mar 9 11:06:56 2018 -0600 PCI/portdrv: Disable port driver in compat mode The "pcie_ports=compat" kernel parameter sets pcie_ports_disabled, which is intended to disable the PCIe port driver. But even when it was disabled, we registered pcie_portdriver so we could work around a BIOS PME issue (see fe31e69740ed ("PCI/PCIe: Clear Root PME Status bits early during system resume")). Registering the driver meant that the pcie_portdrv_probe() path called pci_enable_device(), pci_save_state(), pm_runtime_set_autosuspend_delay(), pm_runtime_use_autosuspend(), etc., even when the driver was disabled. We've since moved the BIOS PME workaround from the port driver to the core, so stop registering the PCIe port driver in compat mode. This means "pcie_ports=compat" will now be basically the same as turning off CONFIG_PCIEPORTBUS completely. Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki drivers/pci/pcie/portdrv_core.c | 3 --- drivers/pci/pcie/portdrv_pci.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) commit 3620c71484f7a19b2588e577ea732f55719f5b1f Author: Bjorn Helgaas Date: Fri Mar 9 11:06:55 2018 -0600 PCI/PM: Clear PCIe PME Status bit for Root Complex Event Collectors Per PCIe r4.0, sec 6.1.6, Root Complex Event Collectors can generate PME interrupts on behalf of Root Complex Integrated Endpoints. Linux does not currently enable PME interrupts from RC Event Collectors, but fe31e69740ed ("PCI/PCIe: Clear Root PME Status bits early during system resume") suggests PME interrupts may be enabled by the platform for ACPI- based runtime wakeup. Clear the PCIe PME Status bit for Root Complex Event Collectors during resume, just like we already do for Root Ports. If the BIOS enables PME interrupts for an event collector and neglects to clear the status bit on resume, this change should fix the same bug as fe31e69740ed (PMEs not working after waking from a sleep state), but for Root Complex Integrated Endpoints. Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki drivers/pci/pci-driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f437c51748fa1dd423a878c870ad203843a51c8d Merge: 872a100 29ab6c4 Author: Michael Ellerman Date: Sat Mar 31 00:11:24 2018 +1100 Merge branch 'topic/paca' into next Bring in yet another series that touches KVM code, and might need to be merged into the kvm-ppc branch to resolve conflicts. This required some changes in pnv_power9_force_smt4_catch/release() due to the paca array becomming an array of pointers. commit 807ae7daf5fb9ba9ef688344ae7c0d8cbebd211c Merge: 1379ef8 6ef6d84 Author: Daniel Borkmann Date: Fri Mar 30 22:50:16 2018 +0200 Merge branch 'bpf-sockmap-sg-api-fixes' Prashant Bhole says: ==================== These patches fix sg api usage in sockmap. Previously sockmap didn't use sg_init_table(), which caused hitting BUG_ON in sg api, when CONFIG_DEBUG_SG is enabled v1: added sg_init_table() calls wherever needed. v2: - Patch1 adds new helper function in sg api. sg_init_marker() - Patch2 sg_init_marker() and sg_init_table() in appropriate places Backgroud: While reviewing v1, John Fastabend raised a valid point about unnecessary memset in sg_init_table() because sockmap uses sg table which embedded in a struct. As enclosing struct is zeroed out, there is unnecessary memset in sg_init_table. So Daniel Borkmann suggested to define another static inline function in scatterlist.h which only initializes sg_magic. Also this function will be called from sg_init_table. From this suggestion I defined a function sg_init_marker() which sets sg_magic and calls sg_mark_end() ==================== Signed-off-by: Daniel Borkmann commit 6ef6d84ceee2262a8c7a4247616c7eb71268b3f9 Author: Prashant Bhole Date: Fri Mar 30 09:21:00 2018 +0900 bpf: sockmap: initialize sg table entries properly When CONFIG_DEBUG_SG is set, sg->sg_magic is initialized in sg_init_table() and it is verified in sg api while navigating. We hit BUG_ON when magic check is failed. In functions sg_tcp_sendpage and sg_tcp_sendmsg, the struct containing the scatterlist is already zeroed out. So to avoid extra memset, we use sg_init_marker() to initialize sg_magic. Fixed following things: - In bpf_tcp_sendpage: initialize sg using sg_init_marker - In bpf_tcp_sendmsg: Replace sg_init_table with sg_init_marker - In bpf_tcp_push: Replace memset with sg_init_table where consumed sg entry needs to be re-initialized. Signed-off-by: Prashant Bhole Acked-by: John Fastabend Signed-off-by: Daniel Borkmann kernel/bpf/sockmap.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit f385178679b6561d2e717567d12e07c7f927ee59 Author: Prashant Bhole Date: Fri Mar 30 09:20:59 2018 +0900 lib/scatterlist: add sg_init_marker() helper sg_init_marker initializes sg_magic in the sg table and calls sg_mark_end() on the last entry of the table. This can be useful to avoid memset in sg_init_table() when scatterlist is already zeroed out For example: when scatterlist is embedded inside other struct and that container struct is zeroed out Suggested-by: Daniel Borkmann Signed-off-by: Prashant Bhole Acked-by: John Fastabend Signed-off-by: Daniel Borkmann include/linux/scatterlist.h | 18 ++++++++++++++++++ lib/scatterlist.c | 9 +-------- 2 files changed, 19 insertions(+), 8 deletions(-) commit 0136c741ff40e03323419feec05fcd594f36a463 Author: Anson Huang Date: Wed Mar 28 11:22:38 2018 +0800 clocksource/drivers/imx-tpm: Add different counter width support Different TPM modules have different width counters which is 16-bit or 32-bit, the counter width can be read from TPM_PARAM register bit[23:16], this patch adds dynamic check for counter width to support both 16-bit and 32-bit TPM modules. Signed-off-by: Anson Huang Signed-off-by: Daniel Lezcano drivers/clocksource/timer-imx-tpm.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) commit 506a7be93ff773d5d4cf75a59f342865605b4910 Author: Anson Huang Date: Wed Mar 28 11:22:37 2018 +0800 clocksource/drivers/imx-tpm: Correct some registers operation flow According to i.MX7ULP reference manual, TPM_SC_CPWMS can ONLY be written when counter is disabled, TPM_SC_TOF is write-1-clear, TPM_C0SC_CHF is also write-1-clear, correct these registers initialization flow; Signed-off-by: Anson Huang Signed-off-by: Daniel Lezcano drivers/clocksource/timer-imx-tpm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 16328e7bd428937f557a984d8b3378387c17a930 Author: Anson Huang Date: Wed Mar 28 11:22:36 2018 +0800 clocksource/drivers/imx-tpm: Fix typo of clock name The clock name should be ipg instead of igp. Signed-off-by: Anson Huang Signed-off-by: Daniel Lezcano drivers/clocksource/timer-imx-tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc01456a0d9a3cbfec85cf23f2ce53323e8fc973 Author: Anson Huang Date: Wed Mar 28 11:22:35 2018 +0800 dt-bindings: timer: tpm: fix typo of clock name The clock name should be ipg instead of igp. Signed-off-by: Anson Huang Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/timer/nxp,tpm-timer.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c00289ecd12471ba9733e61aaf1d39883a77b16 Author: Tomer Maimon Date: Thu Mar 8 17:24:58 2018 +0200 clocksource/drivers/npcm: Add NPCM7xx timer driver Add Nuvoton BMC NPCM7xx timer driver. The clocksource Enable 24-bit TIMER0 and TIMER1 counters, while TIMER0 serve as clockevent and TIMER1 serve as clocksource. Signed-off-by: Tomer Maimon Reviewed-by: Brendan Higgins Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 8 ++ drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-npcm7xx.c | 215 ++++++++++++++++++++++++++++++++++++ 3 files changed, 224 insertions(+) commit ff2969c479d97c6221a9835ee0ab4c44513badc6 Author: Tomer Maimon Date: Thu Mar 8 17:24:57 2018 +0200 dt-binding: timer: document NPCM7xx timer DT bindings Added device tree binding documentation for Nuvoton NPCM7xx timer. Signed-off-by: Tomer Maimon Acked-by: Rob Herring Reviewed-by: Brendan Higgins Signed-off-by: Daniel Lezcano .../bindings/timer/nuvoton,npcm7xx-timer.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit b852f63aa6cee3f4846383377c414ae9c4fbc166 Author: Tal Gilboa Date: Fri Mar 30 08:32:03 2018 -0500 PCI: Add pcie_bandwidth_capable() to compute max supported link bandwidth Add pcie_bandwidth_capable() to compute the max link bandwidth supported by a device, based on the max link speed and width, adjusted by the encoding overhead. The maximum bandwidth of the link is computed as: max_link_width * max_link_speed * (1 - encoding_overhead) 2.5 and 5.0 GT/s links use 8b/10b encoding, which reduces the raw bandwidth available by 20%; 8.0 GT/s and faster links use 128b/130b encoding, which reduces it by about 1.5%. The result is in Mb/s, i.e., megabits/second, of raw bandwidth. Signed-off-by: Tal Gilboa [bhelgaas: add 16 GT/s, adjust for pcie_get_speed_cap() and pcie_get_width_cap() signatures, don't export outside drivers/pci] Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 22 ++++++++++++++++++++++ drivers/pci/pci.h | 10 ++++++++++ 2 files changed, 32 insertions(+) commit c70b65fb7f121da7d01f62588ce6abb4741f513f Author: Tal Gilboa Date: Fri Mar 30 08:24:36 2018 -0500 PCI: Add pcie_get_width_cap() to find max supported link width Add pcie_get_width_cap() to find the max link width supported by a device. Change max_link_width_show() to use pcie_get_width_cap(). Signed-off-by: Tal Gilboa [bhelgaas: return width directly instead of error and *width, don't export outside drivers/pci] Signed-off-by: Bjorn Helgaas Reviewed-by: Tariq Toukan drivers/pci/pci-sysfs.c | 10 ++-------- drivers/pci/pci.c | 18 ++++++++++++++++++ drivers/pci/pci.h | 1 + 3 files changed, 21 insertions(+), 8 deletions(-) commit 6cf57be0f78e289aaf236f8bc55c40ea6c422c75 Author: Tal Gilboa Date: Fri Mar 30 07:44:05 2018 -0500 PCI: Add pcie_get_speed_cap() to find max supported link speed Add pcie_get_speed_cap() to find the max link speed supported by a device. Change max_link_speed_show() to use pcie_get_speed_cap(). Signed-off-by: Tal Gilboa [bhelgaas: return speed directly instead of error and *speed, don't export outside drivers/pci] Signed-off-by: Bjorn Helgaas Reviewed-by: Tariq Toukan drivers/pci/pci-sysfs.c | 28 ++-------------------------- drivers/pci/pci.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ drivers/pci/pci.h | 10 ++++++++++ 3 files changed, 56 insertions(+), 26 deletions(-) commit a5040c2d8dd732252609cde84ee3cdd6f1b1f927 Author: Souvik Banerjee Date: Fri Mar 30 14:32:42 2018 -0500 blktrace: fix comment in blktrace_api.h The `__u64 time` field of the blk_io_trace struct refers to the time in nanoseconds, not in microseconds. It is set in __blk_add_trace, which does the following: t->time = ktime_to_ns(ktime_get()); ktime_to_ns returns ktime_t in nanoseconds, not microseconds. Signed-off-by: Souvik Banerjee Signed-off-by: Jens Axboe include/uapi/linux/blktrace_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17226f1240381812c3a4927dc9da2814fb71c8ac Author: David Howells Date: Fri Mar 30 21:05:44 2018 +0100 rxrpc: Fix leak of rxrpc_peer objects When a new client call is requested, an rxrpc_conn_parameters struct object is passed in with a bunch of parameters set, such as the local endpoint to use. A pointer to the target peer record is also placed in there by rxrpc_get_client_conn() - and this is removed if and only if a new connection object is allocated. Thus it leaks if a new connection object isn't allocated. Fix this by putting any peer object attached to the rxrpc_conn_parameters object in the function that allocated it. Fixes: 19ffa01c9c45 ("rxrpc: Use structs to hold connection params and protocol info") Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 2 ++ net/rxrpc/ar-internal.h | 1 + net/rxrpc/net_ns.c | 1 + net/rxrpc/peer_object.c | 21 +++++++++++++++++++++ net/rxrpc/sendmsg.c | 1 + 5 files changed, 26 insertions(+) commit 1159d4b496f57d5b8ee27c8b90b9d01c332e2e11 Author: David Howells Date: Fri Mar 30 21:05:38 2018 +0100 rxrpc: Add a tracepoint to track rxrpc_peer refcounting Add a tracepoint to track reference counting on the rxrpc_peer struct. Signed-off-by: David Howells include/trace/events/rxrpc.h | 42 ++++++++++++++++++++++++++++ net/rxrpc/ar-internal.h | 23 +++------------- net/rxrpc/peer_event.c | 2 +- net/rxrpc/peer_object.c | 65 ++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 110 insertions(+), 22 deletions(-) commit 31f5f9a1691ebef2113c8bdb3edcb8859f30f702 Author: David Howells Date: Fri Mar 30 21:05:33 2018 +0100 rxrpc: Fix apparent leak of rxrpc_local objects rxrpc_local objects cannot be disposed of until all the connections that point to them have been RCU'd as a connection object holds refcount on the local endpoint it is communicating through. Currently, this can cause an assertion failure to occur when a network namespace is destroyed as there's no check that the RCU destructors for the connections have been run before we start trying to destroy local endpoints. The kernel reports: rxrpc: AF_RXRPC: Leaked local 0000000036a41bc1 {5} ------------[ cut here ]------------ kernel BUG at ../net/rxrpc/local_object.c:439! Fix this by keeping a count of the live connections and waiting for it to go to zero at the end of rxrpc_destroy_all_connections(). Fixes: dee46364ce6f ("rxrpc: Add RCU destruction for connections and calls") Signed-off-by: David Howells net/rxrpc/ar-internal.h | 1 + net/rxrpc/call_accept.c | 2 ++ net/rxrpc/conn_client.c | 1 + net/rxrpc/conn_object.c | 8 ++++++++ net/rxrpc/conn_service.c | 1 + net/rxrpc/net_ns.c | 1 + 6 files changed, 14 insertions(+) commit 09d2bf595db4b4075ea721acd61e180d6bb18f88 Author: David Howells Date: Fri Mar 30 21:05:28 2018 +0100 rxrpc: Add a tracepoint to track rxrpc_local refcounting Add a tracepoint to track reference counting on the rxrpc_local struct. Signed-off-by: David Howells include/trace/events/rxrpc.h | 43 +++++++++++++++++++++++++++++ net/rxrpc/ar-internal.h | 27 +++--------------- net/rxrpc/call_accept.c | 3 +- net/rxrpc/local_object.c | 65 ++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 111 insertions(+), 27 deletions(-) commit d3be4d244330f7ef53242d8dc1b7f77d105e767f Author: David Howells Date: Fri Mar 30 21:05:23 2018 +0100 rxrpc: Fix potential call vs socket/net destruction race rxrpc_call structs don't pin sockets or network namespaces, but may attempt to access both after their refcount reaches 0 so that they can detach themselves from the network namespace. However, there's no guarantee that the socket still exists at this point (so sock_net(&call->socket->sk) may be invalid) and the namespace may have gone away if the call isn't pinning a peer. Fix this by (a) carrying a net pointer in the rxrpc_call struct and (b) waiting for all calls to be destroyed when the network namespace goes away. This was detected by checker: net/rxrpc/call_object.c:634:57: warning: incorrect type in argument 1 (different address spaces) net/rxrpc/call_object.c:634:57: expected struct sock const *sk net/rxrpc/call_object.c:634:57: got struct sock [noderef] * Fixes: 2baec2c3f854 ("rxrpc: Support network namespacing") Signed-off-by: David Howells net/rxrpc/ar-internal.h | 2 ++ net/rxrpc/call_accept.c | 1 + net/rxrpc/call_object.c | 16 +++++++++++++--- net/rxrpc/net_ns.c | 1 + 4 files changed, 17 insertions(+), 3 deletions(-) commit 88f2a8257c9aa7df957b1a79a104f348d60d8027 Author: David Howells Date: Fri Mar 30 21:05:17 2018 +0100 rxrpc: Fix checker warnings and errors Fix various issues detected by checker. Errors: (*) rxrpc_discard_prealloc() should be using rcu_assign_pointer to set call->socket. Warnings: (*) rxrpc_service_connection_reaper() should be passing NULL rather than 0 to trace_rxrpc_conn() as the where argument. (*) rxrpc_disconnect_client_call() should get its net pointer via the call->conn rather than call->sock to avoid a warning about accessing an RCU pointer without protection. (*) Proc seq start/stop functions need annotation as they pass locks between the functions. False positives: (*) Checker doesn't correctly handle of seq-retry lock context balance in rxrpc_find_service_conn_rcu(). (*) Checker thinks execution may proceed past the BUG() in rxrpc_publish_service_conn(). (*) Variable length array warnings from SKCIPHER_REQUEST_ON_STACK() in rxkad.c. Signed-off-by: David Howells net/rxrpc/call_accept.c | 3 ++- net/rxrpc/call_object.c | 1 + net/rxrpc/conn_client.c | 2 +- net/rxrpc/conn_object.c | 2 +- net/rxrpc/proc.c | 6 ++++++ net/rxrpc/sendmsg.c | 2 ++ 6 files changed, 13 insertions(+), 3 deletions(-) commit edb63e2b271752a9424a3d33cfcd4f434a020f9b Author: Sebastian Andrzej Siewior Date: Fri Mar 30 21:04:44 2018 +0100 rxrpc: remove unused static variables The rxrpc_security_methods and rxrpc_security_sem user has been removed in 648af7fca159 ("rxrpc: Absorb the rxkad security module"). This was noticed by kbuild test robot for the -RT tree but is also true for !RT. Reported-by: kbuild test robot Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: David Howells net/rxrpc/security.c | 3 --- 1 file changed, 3 deletions(-) commit 59299aa1028fce051adbd25aaff7c387b865cd6d Author: Marc Dionne Date: Fri Mar 30 21:04:44 2018 +0100 rxrpc: Fix resend event time calculation Commit a158bdd3 ("rxrpc: Fix call timeouts") reworked the time calculation for the next resend event. For this calculation, "oldest" will be before "now", so ktime_sub(oldest, now) will yield a negative value. When passed to nsecs_to_jiffies which expects an unsigned value, the end result will be a very large value, and a resend event scheduled far into the future. This could cause calls to stall if some packets were lost. Fix by ordering the arguments to ktime_sub correctly. Fixes: a158bdd3247b ("rxrpc: Fix call timeouts") Signed-off-by: Marc Dionne Signed-off-by: David Howells net/rxrpc/call_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57b0c9d49b94bbeb53649b7fbd264603c1ebd585 Author: David Howells Date: Fri Mar 30 21:04:44 2018 +0100 rxrpc: Don't treat call aborts as conn aborts If a call-level abort is received for the previous call to complete on a connection channel, then that abort is queued for the connection processor to handle. Unfortunately, the connection processor then assumes without checking that the abort is connection-level (ie. callNumber is 0) and distributes it over all active calls on that connection, thereby incorrectly aborting them. Fix this by discarding aborts aimed at a completed call. Further, discard all packets aimed at a call that's complete if there's currently an active call on a channel, since the DATA packets associated with the new call automatically terminate the old call. Fixes: 18bfeba50dfd ("rxrpc: Perform terminal call ACK/ABORT retransmission from conn processor") Reported-by: Marc Dionne Signed-off-by: David Howells net/rxrpc/input.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 03877bf6a30cca7d4bc3ffabd3c3e9464a7a1a19 Author: David Howells Date: Fri Mar 30 21:04:43 2018 +0100 rxrpc: Fix Tx ring annotation after initial Tx failure rxrpc calls have a ring of packets that are awaiting ACK or retransmission and a parallel ring of annotations that tracks the state of those packets. If the initial transmission of a packet on the underlying UDP socket fails then the packet annotation is marked for resend - but the setting of this mark accidentally erases the last-packet mark also stored in the same annotation slot. If this happens, a call won't switch out of the Tx phase when all the packets have been transmitted. Fix this by retaining the last-packet mark and only altering the packet state. Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code") Signed-off-by: David Howells net/rxrpc/sendmsg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f82eb88b0fa6943f58760fd7c3d1b12c1f9cf492 Author: David Howells Date: Fri Mar 30 21:04:43 2018 +0100 rxrpc: Fix a bit of time confusion The rxrpc_reduce_call_timer() function should be passed the 'current time' in jiffies, not the current ktime time. It's confusing in rxrpc_resend because that has to deal with both. Pass the correct current time in. Note that this only affects the trace produced and not the functioning of the code. Fixes: a158bdd3247b ("rxrpc: Fix call timeouts") Signed-off-by: David Howells net/rxrpc/call_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ace45bec6d77bc061c3c3d8ad99e298ea9800c2b Author: David Howells Date: Fri Mar 30 21:04:43 2018 +0100 rxrpc: Fix firewall route keepalive Fix the firewall route keepalive part of AF_RXRPC which is currently function incorrectly by replying to VERSION REPLY packets from the server with VERSION REQUEST packets. Instead, send VERSION REPLY packets to the peers of service connections to act as keep-alives 20s after the latest packet was transmitted to that peer. Also, just discard VERSION REPLY packets rather than replying to them. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 4 +++ net/rxrpc/ar-internal.h | 14 +++++++- net/rxrpc/conn_event.c | 3 ++ net/rxrpc/input.c | 2 ++ net/rxrpc/net_ns.c | 21 ++++++++++- net/rxrpc/output.c | 59 +++++++++++++++++++++++++++++- net/rxrpc/peer_event.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++++ net/rxrpc/peer_object.c | 7 +++- net/rxrpc/rxkad.c | 2 ++ 9 files changed, 204 insertions(+), 4 deletions(-) commit de05ca8526796c7e9f7c7282b7f89a818af19818 Author: Theodore Ts'o Date: Fri Mar 30 15:42:25 2018 -0400 ext4: move call to ext4_error() into ext4_xattr_check_block() Refactor the call to EXT4_ERROR_INODE() into ext4_xattr_check_block(). This simplifies the code, and fixes a problem where not all callers of ext4_xattr_check_block() were not resulting in ext4_error() getting called when the xattr block is corrupted. Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/xattr.c | 60 ++++++++++++++++++++++++++------------------------------- 1 file changed, 27 insertions(+), 33 deletions(-) commit 5f0663bb4a64f588f0a2dd6d1be68d40f9af0086 Author: Dan Williams Date: Thu Dec 21 12:25:11 2017 -0800 ext4, dax: introduce ext4_dax_aops In preparation for the dax implementation to start associating dax pages to inodes via page->mapping, we need to provide a 'struct address_space_operations' instance for dax. Otherwise, direct-I/O triggers incorrect page cache assumptions and warnings. Cc: "Theodore Ts'o" Cc: Andreas Dilger Cc: linux-ext4@vger.kernel.org Reviewed-by: Jan Kara Signed-off-by: Dan Williams fs/ext4/inode.c | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) commit 6e2608dfd93464bb26ba868b301ad5336c8c1df8 Author: Dan Williams Date: Wed Mar 7 15:26:44 2018 -0800 xfs, dax: introduce xfs_dax_aops In preparation for the dax implementation to start associating dax pages to inodes via page->mapping, we need to provide a 'struct address_space_operations' instance for dax. Otherwise, direct-I/O triggers incorrect page cache assumptions and warnings like the following: WARNING: CPU: 27 PID: 1783 at fs/xfs/xfs_aops.c:1468 xfs_vm_set_page_dirty+0xf3/0x1b0 [xfs] [..] CPU: 27 PID: 1783 Comm: dma-collision Tainted: G O 4.15.0-rc2+ #984 [..] Call Trace: set_page_dirty_lock+0x40/0x60 bio_set_pages_dirty+0x37/0x50 iomap_dio_actor+0x2b7/0x3b0 ? iomap_dio_zero+0x110/0x110 iomap_apply+0xa4/0x110 iomap_dio_rw+0x29e/0x3b0 ? iomap_dio_zero+0x110/0x110 ? xfs_file_dio_aio_read+0x7c/0x1a0 [xfs] xfs_file_dio_aio_read+0x7c/0x1a0 [xfs] xfs_file_read_iter+0xa0/0xc0 [xfs] __vfs_read+0xf9/0x170 vfs_read+0xa6/0x150 SyS_pread64+0x93/0xb0 entry_SYSCALL_64_fastpath+0x1f/0x96 ...where the default set_page_dirty() handler assumes that dirty state is being tracked in 'struct page' flags. Cc: Jeff Moyer Cc: Matthew Wilcox Cc: Ross Zwisler Suggested-by: Jan Kara Suggested-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Dan Williams fs/xfs/xfs_aops.c | 34 ++++++++++++++++++---------------- fs/xfs/xfs_aops.h | 1 + fs/xfs/xfs_iops.c | 5 ++++- 3 files changed, 23 insertions(+), 17 deletions(-) commit 15aa8a01189b7399d085cceae6775cc6899b1909 Author: Dan Williams Date: Sun Mar 11 12:03:08 2018 -0700 block, dax: remove dead code in blkdev_writepages() Block device inodes never have S_DAX set, so kill the check for DAX and diversion to dax_writeback_mapping_range(). Cc: Jeff Moyer Cc: Ross Zwisler Cc: Matthew Wilcox Cc: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Dan Williams fs/block_dev.c | 5 ----- 1 file changed, 5 deletions(-) commit f44c77630d26ca2c2a60b20c47dd9ce07c4361b3 Author: Dan Williams Date: Wed Mar 7 15:26:44 2018 -0800 fs, dax: prepare for dax-specific address_space_operations In preparation for the dax implementation to start associating dax pages to inodes via page->mapping, we need to provide a 'struct address_space_operations' instance for dax. Define some generic VFS aops helpers for dax. These noop implementations are there in the dax case to prevent the VFS from falling back to operations with page-cache assumptions, dax_writeback_mapping_range() may not be referenced in the FS_DAX=n case. Cc: Jeff Moyer Cc: Ross Zwisler Suggested-by: Matthew Wilcox Suggested-by: Jan Kara Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Suggested-by: Dave Chinner Signed-off-by: Dan Williams fs/libfs.c | 39 +++++++++++++++++++++++++++++++++++++++ include/linux/dax.h | 12 +++++++++--- include/linux/fs.h | 4 ++++ 3 files changed, 52 insertions(+), 3 deletions(-) commit 3fe0791c295cfd3cd735de7a32cc0780949c009f Author: Dan Williams Date: Sat Oct 14 17:13:45 2017 -0700 dax: store pfns in the radix In preparation for examining the busy state of dax pages in the truncate path, switch from sectors to pfns in the radix. Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Ross Zwisler Reviewed-by: Jan Kara Signed-off-by: Dan Williams drivers/dax/super.c | 15 ++++++++-- fs/dax.c | 83 ++++++++++++++++++++--------------------------------- 2 files changed, 43 insertions(+), 55 deletions(-) commit c0b6edef0bf0e33c12eaf80c676ff09def011518 Author: Lucas Bates Date: Thu Mar 29 15:58:10 2018 -0400 tc-testing: Add newline when writing test case files When using the -i feature to generate random ID numbers for test cases in tdc, the function that writes the JSON to file doesn't add a newline character to the end of the file, so we have to add our own. Signed-off-by: Lucas Bates Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tdc.py | 1 + 1 file changed, 1 insertion(+) commit ccdd0b4c35f2adb7434ed69a89bc68bb6e9089ea Author: Raghu Vatsavayi Date: Thu Mar 29 11:13:22 2018 -0700 liquidio: prevent rx queues from getting stalled This commit has fix for RX traffic issues when we stress test the driver with continuous ifconfig up/down under very high traffic conditions. Reason for the issue is that, in existing liquidio_stop function NAPI is disabled even before actual FW/HW interface is brought down via send_rx_ctrl_cmd(lio, 0). Between time frame of NAPI disable and actual interface down in firmware, firmware continuously enqueues rx traffic to host. When interrupt happens for new packets, host irq handler fails in scheduling NAPI as the NAPI is already disabled. After "ifconfig up", Host re-enables NAPI but cannot schedule it until it receives another Rx interrupt. Host never receives Rx interrupt as it never cleared the Rx interrupt it received during interface down operation. NIC Rx interrupt gets cleared only when Host processes queue and clears the queue counts. Above anomaly leads to other issues like packet overflow in FW/HW queues, backpressure. Fix: This commit fixes this issue by disabling NAPI only after informing firmware to stop queueing packets to host via send_rx_ctrl_cmd(lio, 0). send_rx_ctrl_cmd is not visible in the patch as it is already there in the code. The DOWN command also waits for any pending packets to be processed by NAPI so that the deadlock will not occur. Signed-off-by: Raghu Vatsavayi Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_core.c | 23 ++++++++++++++++++++ drivers/net/ethernet/cavium/liquidio/lio_main.c | 25 +++++++++++++--------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 23 ++++++++++++-------- .../net/ethernet/cavium/liquidio/octeon_network.h | 1 + 4 files changed, 53 insertions(+), 19 deletions(-) commit f444ec106407d600f17fa1a4bd14f84577401dec Author: Gilad Ben-Yossef Date: Mon Mar 26 08:32:18 2018 +0100 crypto: ccree - remove unused enums Remove enums definitions unused in the driver code. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu drivers/crypto/ccree/cc_hw_queue_defs.h | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) commit 900a081f6912a8985dc15380ec912752cb66025a Author: Herbert Xu Date: Mon Mar 26 08:53:25 2018 +0800 crypto: ahash - Fix early termination in hash walk When we have an unaligned SG list entry where there is no leftover aligned data, the hash walk code will incorrectly return zero as if the entire SG list has been processed. This patch fixes it by moving onto the next page instead. Reported-by: Eli Cooper Cc: Signed-off-by: Herbert Xu crypto/ahash.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a2e5d408a46372b8fba9b1af592edc6fa3fc93a9 Author: Stefan Agner Date: Sat Mar 24 12:02:42 2018 +0100 crypto: brcm - explicitly cast cipher to hash type In the AES cases enum spu_cipher_type and enum hash_type have the same values, so the assignment is fine. Explicitly cast the enum type conversion. This fixes two warnings when building with clang: drivers/crypto/bcm/cipher.c:821:34: warning: implicit conversion from enumeration type 'enum spu_cipher_type' to different enumeration type 'enum hash_type' [-Wenum-conversion] hash_parms.type = cipher_parms.type; ~ ~~~~~~~~~~~~~^~~~ drivers/crypto/bcm/cipher.c:1412:26: warning: implicit conversion from enumeration type 'enum spu_cipher_type' to different enumeration type 'enum hash_type' [-Wenum-conversion] hash_parms.type = ctx->cipher_type; ~ ~~~~~^~~~~~~~~~~ Signed-off-by: Stefan Agner Signed-off-by: Herbert Xu drivers/crypto/bcm/cipher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8f0691fc51e1ce06ccfccb7336320331a9521b9d Author: Tudor-Dan Ambarus Date: Fri Mar 23 12:42:24 2018 +0200 crypto: talitos - don't leak pointers to authenc keys In talitos's aead_setkey we save pointers to the authenc keys in a local variable of type struct crypto_authenc_keys and we don't zeroize it after use. Fix this and don't leak pointers to the authenc keys. Signed-off-by: Tudor Ambarus Reviewed-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 2 ++ 1 file changed, 2 insertions(+) commit ab6815d028f330ae9490bff01689cd234506fe97 Author: Tudor-Dan Ambarus Date: Fri Mar 23 12:42:23 2018 +0200 crypto: qat - don't leak pointers to authenc keys In qat_alg_aead_init_sessions we save pointers to the authenc keys in a local variable of type struct crypto_authenc_keys and we don't zeroize it after use. Fix this and don't leak pointers to the authenc keys. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_algs.c | 3 +++ 1 file changed, 3 insertions(+) commit a664b4b140678d06825467a52885c0e8d46ac0ed Author: Tudor-Dan Ambarus Date: Fri Mar 23 12:42:22 2018 +0200 crypto: picoxcell - don't leak pointers to authenc keys In spacc_aead_setkey we save pointers to the authenc keys in a local variable of type struct crypto_authenc_keys and we don't zeroize it after use. Fix this and don't leak pointers to the authenc keys. Signed-off-by: Tudor Ambarus Reviewed-by: Jamie Iles Signed-off-by: Herbert Xu drivers/crypto/picoxcell_crypto.c | 2 ++ 1 file changed, 2 insertions(+) commit 0e7da29d6c31f897c544c1f7499389111225566f Author: Tudor-Dan Ambarus Date: Fri Mar 23 12:42:21 2018 +0200 crypto: ixp4xx - don't leak pointers to authenc keys In ixp4xx's aead_setkey we save pointers to the authenc keys in a local variable of type struct crypto_authenc_keys and we don't zeroize it after use. Fix this and don't leak pointers to the authenc keys. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu drivers/crypto/ixp4xx_crypto.c | 2 ++ 1 file changed, 2 insertions(+) commit eb5265317585649f6ee292aafe52a88cbef04806 Author: Tudor-Dan Ambarus Date: Fri Mar 23 12:42:20 2018 +0200 crypto: chelsio - don't leak pointers to authenc keys In chcr_authenc_setkey and chcr_aead_digest_null_setkey we save pointers to the authenc keys in local variables of type struct crypto_authenc_keys and we don't zeroize them after use. Fix this and don't leak pointers to the authenc keys. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 5 +++++ 1 file changed, 5 insertions(+) commit cc4ccaafcbddb88d661143c779af08d4ed8798ae Author: Tudor-Dan Ambarus Date: Fri Mar 23 12:42:19 2018 +0200 crypto: caam/qi - don't leak pointers to authenc keys In caam/qi's aead_setkey we save pointers to the authenc keys in a local variable of type struct crypto_authenc_keys and we don't zeroize it after use. Fix this and don't leak pointers to the authenc keys. Signed-off-by: Tudor Ambarus Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg_qi.c | 2 ++ 1 file changed, 2 insertions(+) commit 61dab9726050b0ffa826f1b540e9518768914b76 Author: Tudor-Dan Ambarus Date: Fri Mar 23 12:42:18 2018 +0200 crypto: caam - don't leak pointers to authenc keys In caam's aead_setkey we save pointers to the authenc keys in a local variable of type struct crypto_authenc_keys and we don't zeroize it after use. Fix this and don't leak pointers to the authenc keys. Signed-off-by: Tudor Ambarus Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 2 ++ 1 file changed, 2 insertions(+) commit 8c9bdab21289c211ca1ca6a5f9b7537b4a600a02 Author: Herbert Xu Date: Fri Mar 23 08:14:44 2018 +0800 crypto: lrw - Free rctx->ext with kzfree The buffer rctx->ext contains potentially sensitive data and should be freed with kzfree. Cc: Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") Reported-by: Dan Carpenter Signed-off-by: Herbert Xu crypto/lrw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b1227301a8e4729409694e323b72c064c47cb6b Author: LEROY Christophe Date: Thu Mar 22 10:57:01 2018 +0100 crypto: talitos - fix IPsec cipher in length For SEC 2.x+, cipher in length must contain only the ciphertext length. In case of using hardware ICV checking, the ICV length is provided via the "extent" field of the descriptor pointer. Cc: # 4.8+ Fixes: 549bd8bc5987 ("crypto: talitos - Implement AEAD for SEC1 using HMAC_SNOOP_NO_AFEU") Reported-by: Horia Geantă Signed-off-by: Christophe Leroy Tested-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit 9def051018c08e65c532822749e857eb4b2e12e7 Author: Andy Shevchenko Date: Wed Mar 21 19:01:40 2018 +0200 crypto: Deduplicate le32_to_cpu_array() and cpu_to_le32_array() Deduplicate le32_to_cpu_array() and cpu_to_le32_array() by moving them to the generic header. No functional change implied. Signed-off-by: Andy Shevchenko Signed-off-by: Herbert Xu crypto/md4.c | 17 ----------------- crypto/md5.c | 17 ----------------- include/linux/byteorder/generic.h | 17 +++++++++++++++++ 3 files changed, 17 insertions(+), 34 deletions(-) commit 0550f5a5f0c5bac10e982c1e968db9f3f297dda3 Author: Horia Geantă Date: Tue Mar 20 09:56:12 2018 +0200 crypto: doc - clarify hash callbacks state machine Add a note that it is perfectly legal to "abandon" a request object: - call .init() and then (as many times) .update() - _not_ call any of .final(), .finup() or .export() at any point in future Link: https://lkml.kernel.org/r/20180222114741.GA27631@gondor.apana.org.au Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu Documentation/crypto/devel-algos.rst | 8 ++++++++ 1 file changed, 8 insertions(+) commit eb02c38f019726ede53eb31c3c604fd77cfedc2e Author: Herbert Xu Date: Tue Mar 20 15:52:45 2018 +0800 crypto: api - Keep failed instances alive This patch reverts commit 9c521a200bc3 ("crypto: api - remove instance when test failed") and fixes the underlying problem in a different way. To recap, prior to the reverted commit, an instance that fails a self-test is kept around. However, it would satisfy any new lookups against its name and therefore the system may accumlulate an unbounded number of failed instances for the same algorithm name. The reverted commit fixed it by unregistering the instance. Hoever, this still does not prevent the creation of the same failed instance over and over again each time the name is looked up. This patch fixes it by keeping the failed instance around, just as we would if it were a normal algorithm. However, the lookup code has been udpated so that we do not attempt to create another instance as long as this failed one is still registered. Of course, you could still force a new creation by deleting the instance from user-space. A new error (ELIBBAD) has been commandeered for this purpose and will be returned when all registered algorithm of a given name have failed the self-test. Signed-off-by: Herbert Xu crypto/algapi.c | 8 -------- crypto/api.c | 22 +++++++++++++--------- 2 files changed, 13 insertions(+), 17 deletions(-) commit 3ca1e9948940230bd2c4b17e320bbab3367fc37b Author: Herbert Xu Date: Tue Mar 20 08:05:39 2018 +0800 crypto: api - Make crypto_alg_lookup static The function crypto_alg_lookup is only usd within the crypto API and should be not be exported to the modules. This patch marks it as a static function. Signed-off-by: Herbert Xu crypto/api.c | 4 ++-- crypto/internal.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) commit 4989d4f07a8e738b33a79099ddbdd8e125a4da1b Author: Herbert Xu Date: Tue Mar 20 07:41:00 2018 +0800 crypto: api - Remove unused crypto_type lookup function The lookup function in crypto_type was only used for the implicit IV generators which have been completely removed from the crypto API. This patch removes the lookup function as it is now useless. Signed-off-by: Herbert Xu crypto/api.c | 8 +------- include/crypto/algapi.h | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) commit 6f76672bd65039d68197be12653473cb4529741f Author: Harsh Jain Date: Mon Mar 19 19:06:22 2018 +0530 crypto: chelsio - Remove declaration of static function from header It fixes compilation warning introduced in commit Fixes: 5110e65536f3 ("crypto: chelsio - Split Hash requests for...") Reported-by: Stephen Rothwell Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 291 +++++++++++++++++------------------ drivers/crypto/chelsio/chcr_crypto.h | 1 - 2 files changed, 145 insertions(+), 147 deletions(-) commit 3ad618d8e16e844b6f562ae6c9b0984fca30409e Author: Antoine Tenart Date: Mon Mar 19 09:21:21 2018 +0100 crypto: inside-secure - hmac(sha224) support This patch adds the hmac(sha224) support to the Inside Secure cryptographic engine driver. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 1 + drivers/crypto/inside-secure/safexcel.h | 1 + drivers/crypto/inside-secure/safexcel_hash.c | 56 ++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) commit 73f36ea703219115957a6a9f5dbe9d92b954eea4 Author: Antoine Tenart Date: Mon Mar 19 09:21:20 2018 +0100 crypto: inside-secure - hmac(sha256) support This patch adds the hmac(sha256) support to the Inside Secure cryptographic engine driver. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 3 +- drivers/crypto/inside-secure/safexcel.h | 1 + drivers/crypto/inside-secure/safexcel_hash.c | 80 +++++++++++++++++++++++++--- 3 files changed, 75 insertions(+), 9 deletions(-) commit 4505bb02ec87f24e4704716ef5a55b233805157d Author: Antoine Tenart Date: Mon Mar 19 09:21:19 2018 +0100 crypto: inside-secure - the context ipad/opad should use the state sz This patches uses the state size of the algorithms instead of their digest size to copy the ipad and opad in the context. This doesn't fix anything as the state and digest size are the same for many algorithms, and for all the hmac currently supported by this driver. However hmac(sha224) use the sha224 hash function which has a different digest and state size. This commit prepares the addition of such algorithms. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 15f64ee0aecdd7a65bd8a6067511e14abf159590 Author: Antoine Tenart Date: Mon Mar 19 09:21:18 2018 +0100 crypto: inside-secure - improve the skcipher token The token used for encryption and decryption of skcipher algorithms sets its stat field to "last packet". As it's a cipher only algorithm, there is not hash operation and thus the "last hash" bit should be set to tell the internal engine no hash operation should be performed. This does not fix a bug, but improves the token definition to follow exactly what's advised by the datasheet. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_cipher.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b89a815975e5dd3ffa4b4f6392eceff66c48476e Author: Antoine Tenart Date: Mon Mar 19 09:21:17 2018 +0100 crypto: inside-secure - do not access buffers mapped to the device This patches update the way the digest is copied from the state buffer to the result buffer, so that the copy only happen after the state buffer was DMA unmapped, as otherwise the buffer would be owned by the device. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 57433b582090ce0d751009e931f15a653e22ee85 Author: Antoine Tenart Date: Mon Mar 19 09:21:16 2018 +0100 crypto: inside-secure - improve the send error path This patch improves the send error path as it wasn't handling all error cases. A new label is added, and some of the goto are updated to point to the right labels, so that the code is more robust to errors. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d910708766aa1894198c34ec105a9d668988b682 Author: Antoine Tenart Date: Mon Mar 19 09:21:15 2018 +0100 crypto: inside-secure - fix a typo in a register name This patch fixes a typo in the EIP197_HIA_xDR_WR_CTRL_BUG register name, as it should be EIP197_HIA_xDR_WR_CTRL_BUF. This is a cosmetic only change. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 2 +- drivers/crypto/inside-secure/safexcel.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c2c55404bd20a3f68c3aaf40a4724b190c5a71af Author: Antoine Tenart Date: Mon Mar 19 09:21:14 2018 +0100 crypto: inside-secure - fix typo s/allways/always/ in a define Small cosmetic patch fixing one typo in the EIP197_HIA_DSE_CFG_ALLWAYS_BUFFERABLE macro, it should be _ALWAYS_. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 2 +- drivers/crypto/inside-secure/safexcel.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b869648c060fbb00bf6578d13cbe83e6f85914bc Author: Antoine Tenart Date: Mon Mar 19 09:21:13 2018 +0100 crypto: inside-secure - move the digest to the request context This patches moves the digest information from the transformation context to the request context. This fixes cases where HMAC init functions were called and override the digest value for a short period of time, as the HMAC init functions call the SHA init one which reset the value. This lead to a small percentage of HMAC being incorrectly computed under heavy load. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Suggested-by: Ofer Heifetz Signed-off-by: Antoine Tenart [Ofer here did all the work, from seeing the issue to understanding the root cause. I only made the patch.] Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 30 +++++++++++++++++----------- 1 file changed, 18 insertions(+), 12 deletions(-) commit 6f14f49ce5eb00f533133df06c663fbaea13cd50 Merge: 1dad0f9 86674a9 Author: David S. Miller Date: Fri Mar 30 13:00:11 2018 -0400 Merge branch 'ieee802154-for-davem-2018-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next Stefan Schmidt says: ==================== pull-request: ieee802154-next 2018-03-29 An update from ieee802154 for *net-next* Colin fixed a unused variable in the new mcr20a driver. Harry fixed an unitialised data read in the debugfs interface of the ca8210 driver. If there are any issues or you think these are to late for -rc1 (both can also go into -rc2 as they are simple fixes) let me know. ==================== Signed-off-by: David S. Miller commit 1dad0f9ffff735ca09ea1588a9c279a45c8978be Author: Roman Mashak Date: Thu Mar 29 08:52:37 2018 -0400 tc-testing: add connmark action tests Signed-off-by: Roman Mashak Signed-off-by: David S. Miller .../tc-testing/tc-tests/actions/connmark.json | 291 +++++++++++++++++++++ 1 file changed, 291 insertions(+) commit fe3f4e805345be01c979143fe2afaeec8dfbf79e Author: Claudiu Manoil Date: Thu Mar 29 13:58:48 2018 +0300 MAINTAINERS: Update my email address from freescale to nxp The freescale.com address will no longer be available. Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b85756341c53fd13b4b5e25104c22849274cd0d Author: Biju Das Date: Thu Mar 29 11:02:55 2018 +0100 dt-bindings: net: renesas-ravb: Add support for r8a77470 SoC Add a new compatible string for the RZ/G1C (R8A77470) SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Acked-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/renesas,ravb.txt | 1 + 1 file changed, 1 insertion(+) commit 8bafb83eeee2efb8b9b4e9dfd9fb90debe4a2417 Merge: 02281a3 8bf993a Author: David S. Miller Date: Fri Mar 30 12:32:00 2018 -0400 Merge branch 'stmmac-DWMAC5' Jose Abreu says: ==================== Fix TX Timeout and implement Safety Features Fix the TX Timeout handler to correctly reconfigure the whole system and start implementing features for DWMAC5 cores, specifically the Safety Features. Changes since v1: - Display error stats in ethtool ==================== Signed-off-by: David S. Miller commit 8bf993a5877e8a0a2f6338085f2dee7c23f524a3 Author: Jose Abreu Date: Thu Mar 29 10:40:19 2018 +0100 net: stmmac: Add support for DWMAC5 and implement Safety Features This adds initial suport for DWMAC5 and implements the Automotive Safety Package which is available from core version 5.10. The Automotive Safety Pacakge (also called Safety Features) offers us with error protection in the core by implementing ECC Protection in memories, on-chip data path parity protection, FSM parity and timeout protection and Application/CSR interface timeout protection. In case of an uncorrectable error we call stmmac_global_err() and reconfigure the whole core. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/common.h | 22 ++ drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 4 + drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 39 ++- drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 6 + drivers/net/ethernet/stmicro/stmmac/dwmac5.c | 298 +++++++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/dwmac5.h | 52 ++++ drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 + .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 39 ++- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 34 +++ 10 files changed, 494 insertions(+), 3 deletions(-) commit 34877a15f787b594649ed375943ecc65f4342e30 Author: Jose Abreu Date: Thu Mar 29 10:40:18 2018 +0100 net: stmmac: Rework and fix TX Timeout code Currently TX Timeout handler does not behaves as expected and leads to an unrecoverable state. Rework current implementation of TX Timeout handling to actually perform a complete reset of the driver state and IP. We use deferred work to init a task which will be responsible for resetting the system. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac.h | 11 ++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 67 +++++++++++++++++++++-- 2 files changed, 73 insertions(+), 5 deletions(-) commit 02281a3525c9f1c07d792d64b079a2d677ed0ea5 Author: Jisheng Zhang Date: Thu Mar 29 17:29:40 2018 +0800 net: mvneta: remove duplicate *_coal assignment The style of the rx/tx queue's *_coal member assignment is: static void foo_coal_set(...) { set the coal in hw; update queue's foo_coal member; [1] } In other place, we call foo_coal_set(pp, queue->foo_coal), so the above [1] is duplicated and could be removed. Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 4 ---- 1 file changed, 4 deletions(-) commit e7696042fe9351b90a2dc2e4e042283192ccacbe Merge: d162190 2f0aaf7 Author: David S. Miller Date: Fri Mar 30 12:20:53 2018 -0400 Merge branch 'do-not-allow-adding-routes-if-disable_ipv6-is-enabled' Lorenzo Bianconi says: ==================== do not allow adding routes if disable_ipv6 is enabled Do not allow userspace to add static ipv6 routes if disable_ipv6 is enabled. Update disable_ipv6 documentation according to that change Changes since v1: - added an extack message telling the user that IPv6 is disabled on the nexthop device - rebased on-top of net-next ==================== Signed-off-by: David S. Miller commit 2f0aaf7fb11c90645bbda447c1d26f5b0b04e984 Author: Lorenzo Bianconi Date: Thu Mar 29 11:02:25 2018 +0200 Documentation: ip-sysctl.txt: clarify disable_ipv6 Clarify that when disable_ipv6 is enabled even the ipv6 routes are deleted for the selected interface and from now it will not be possible to add addresses/routes to that interface Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 428604fb118facce1309670779a35baf27ad044c Author: Lorenzo Bianconi Date: Thu Mar 29 11:02:24 2018 +0200 ipv6: do not set routes if disable_ipv6 has been enabled Do not allow setting ipv6 routes from userspace if disable_ipv6 has been enabled. The issue can be triggered using the following reproducer: - sysctl net.ipv6.conf.all.disable_ipv6=1 - ip -6 route add a:b:c:d::/64 dev em1 - ip -6 route show a:b:c:d::/64 dev em1 metric 1024 pref medium Fix it checking disable_ipv6 value in ip6_route_info_create routine Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller net/ipv6/route.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d162190bded8b3f635d1ba1e27e63d1b4a720ba8 Merge: b9a1260 26c97c5 Author: David S. Miller Date: Fri Mar 30 11:41:18 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next The following patchset contains Netfilter/IPVS updates for your net-next tree. This batch comes with more input sanitization for xtables to address bug reports from fuzzers, preparation works to the flowtable infrastructure and assorted updates. In no particular order, they are: 1) Make sure userspace provides a valid standard target verdict, from Florian Westphal. 2) Sanitize error target size, also from Florian. 3) Validate that last rule in basechain matches underflow/policy since userspace assumes this when decoding the ruleset blob that comes from the kernel, from Florian. 4) Consolidate hook entry checks through xt_check_table_hooks(), patch from Florian. 5) Cap ruleset allocations at 512 mbytes, 134217728 rules and reject very large compat offset arrays, so we have a reasonable upper limit and fuzzers don't exercise the oom-killer. Patches from Florian. 6) Several WARN_ON checks on xtables mutex helper, from Florian. 7) xt_rateest now has a hashtable per net, from Cong Wang. 8) Consolidate counter allocation in xt_counters_alloc(), from Florian. 9) Earlier xt_table_unlock() call in {ip,ip6,arp,eb}tables, patch from Xin Long. 10) Set FLOW_OFFLOAD_DIR_* to IP_CT_DIR_* definitions, patch from Felix Fietkau. 11) Consolidate code through flow_offload_fill_dir(), also from Felix. 12) Inline ip6_dst_mtu_forward() just like ip_dst_mtu_maybe_forward() to remove a dependency with flowtable and ipv6.ko, from Felix. 13) Cache mtu size in flow_offload_tuple object, this is safe for forwarding as f87c10a8aa1e describes, from Felix. 14) Rename nf_flow_table.c to nf_flow_table_core.o, to simplify too modular infrastructure, from Felix. 15) Add rt0, rt2 and rt4 IPv6 routing extension support, patch from Ahmed Abdelsalam. 16) Remove unused parameter in nf_conncount_count(), from Yi-Hung Wei. 17) Support for counting only to nf_conncount infrastructure, patch from Yi-Hung Wei. 18) Add strict NFT_CT_{SRC_IP,DST_IP,SRC_IP6,DST_IP6} key datatypes to nft_ct. 19) Use boolean as return value from ipt_ah and from IPVS too, patch from Gustavo A. R. Silva. 20) Remove useless parameters in nfnl_acct_overquota() and nf_conntrack_broadcast_help(), from Taehee Yoo. 21) Use ipv6_addr_is_multicast() from xt_cluster, also from Taehee Yoo. 22) Statify nf_tables_obj_lookup_byhandle, patch from Fengguang Wu. 23) Fix typo in xt_limit, from Geert Uytterhoeven. 24) Do no use VLAs in Netfilter code, again from Gustavo. 25) Use ADD_COUNTER from ebtables, from Taehee Yoo. 26) Bitshift support for CONNMARK and MARK targets, from Jack Ma. 27) Use pr_*() and add pr_fmt(), from Arushi Singhal. 28) Add synproxy support to ctnetlink. 29) ICMP type and IGMP matching support for ebtables, patches from Matthias Schiffer. 30) Support for the revision infrastructure to ebtables, from Bernie Harris. 31) String match support for ebtables, also from Bernie. 32) Documentation for the new flowtable infrastructure. 33) Use generic comparison functions in ebt_stp, from Joe Perches. 34) Demodularize filter chains in nftables. 35) Register conntrack hooks in case nftables NAT chain is added. 36) Merge assignments with return in a couple of spots in the Netfilter codebase, also from Arushi. 37) Document that xtables percpu counters are stored in the same memory area, from Ben Hutchings. 38) Revert mark_source_chains() sanity checks that break existing rulesets, from Florian Westphal. 39) Use is_zero_ether_addr() in the ipset codebase, from Joe Perches. ==================== Signed-off-by: David S. Miller commit c37a3c94775855567b90f91775b9691e10bd2806 Author: Dan Carpenter Date: Thu Mar 29 12:01:53 2018 +0300 xen/acpi: off by one in read_acpi_id() If acpi_id is == nr_acpi_bits, then we access one element beyond the end of the acpi_psd[] array or we set one bit beyond the end of the bit map when we do __set_bit(acpi_id, acpi_id_present); Fixes: 59a568029181 ("xen/acpi-processor: C and P-state driver that uploads said data to hypervisor.") Signed-off-by: Dan Carpenter Reviewed-by: Joao Martins Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/xen-acpi-processor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b9a12601541eb55d07e00261a5112a4bc36fe7be Merge: caeeeda 328fbe7 Author: David S. Miller Date: Fri Mar 30 10:59:46 2018 -0400 Merge branch 'Close-race-between-un-register_netdevice_notifier-and-pernet_operations' Kirill Tkhai says: ==================== Close race between {un, }register_netdevice_notifier and pernet_operations the problem is {,un}register_netdevice_notifier() do not take pernet_ops_rwsem, and they don't see network namespaces, being initialized in setup_net() and cleanup_net(), since at this time net is not hashed to net_namespace_list. This may lead to imbalance, when a notifier is called at time of setup_net()/net is alive, but it's not called at time of cleanup_net(), for the devices, hashed to the net, and vise versa. See (3/3) for the scheme of imbalance. This patchset fixes the problem by acquiring pernet_ops_rwsem at the time of {,un}register_netdevice_notifier() (3/3). (1-2/3) are preparations in xfrm and netfilter subsystems. The problem was introduced a long ago, but backporting won't be easy, since every previous kernel version may have changes in netdevice notifiers, and they all need review and testing. Otherwise, there may be more pernet_operations, which register or unregister netdevice notifiers, and that leads to deadlock (which is was fixed in 1-2/3). This patchset is for net-next. ==================== Signed-off-by: David S. Miller commit 328fbe747ad4622f0dfa98d2e19e836f03f80c04 Author: Kirill Tkhai Date: Thu Mar 29 17:03:45 2018 +0300 net: Close race between {un, }register_netdevice_notifier() and setup_net()/cleanup_net() {un,}register_netdevice_notifier() iterate over all net namespaces hashed to net_namespace_list. But pernet_operations register and unregister netdevices in unhashed net namespace, and they are not seen for netdevice notifiers. This results in asymmetry: 1)Race with register_netdevice_notifier() pernet_operations::init(net) ... register_netdevice() ... call_netdevice_notifiers() ... ... nb is not called ... ... register_netdevice_notifier(nb) -> net skipped ... ... list_add_tail(&net->list, ..) ... Then, userspace stops using net, and it's destructed: pernet_operations::exit(net) unregister_netdevice() call_netdevice_notifiers() ... nb is called ... This always happens with net::loopback_dev, but it may be not the only device. 2)Race with unregister_netdevice_notifier() pernet_operations::init(net) register_netdevice() call_netdevice_notifiers() ... nb is called ... Then, userspace stops using net, and it's destructed: list_del_rcu(&net->list) ... pernet_operations::exit(net) unregister_netdevice_notifier(nb) -> net skipped dev_change_net_namespace() ... call_netdevice_notifiers() ... nb is not called ... unregister_netdevice() call_netdevice_notifiers() ... nb is not called ... This race is more danger, since dev_change_net_namespace() moves real network devices, which use not trivial netdevice notifiers, and if this will happen, the system will be left in unpredictable state. The patch closes the race. During the testing I found two places, where register_netdevice_notifier() is called from pernet init/exit methods (which led to deadlock) and fixed them (see previous patches). The review moved me to one more unusual registration place: raw_init() (can driver). It may be a reason of problems, if someone creates in-kernel CAN_RAW sockets, since they will be destroyed in exit method and raw_release() will call unregister_netdevice_notifier(). But grep over kernel tree does not show, someone creates such sockets from kernel space. Theoretically, there can be more places like this, and which are hidden from review, but we found them on the first bumping there (since there is no a race, it will be 100% reproducible). Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/core/dev.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9e2f6c5d78db6647eb9d7bfeb20b9e0f9ff2c56c Author: Kirill Tkhai Date: Thu Mar 29 17:03:35 2018 +0300 netfilter: Rework xt_TEE netdevice notifier Register netdevice notifier for every iptable entry is not good, since this breaks modularity, and the hidden synchronization is based on rtnl_lock(). This patch reworks the synchronization via new lock, while the rest of logic remains as it was before. This is required for the next patch. Tested via: while :; do unshare -n iptables -t mangle -A OUTPUT -j TEE --gateway 1.1.1.2 --oif lo; done Signed-off-by: Kirill Tkhai Acked-by: Pablo Neira Ayuso Signed-off-by: David S. Miller net/netfilter/xt_TEE.c | 73 +++++++++++++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 27 deletions(-) commit e9a441b6e729e16092fcc18e3962b952a01d1e3c Author: Kirill Tkhai Date: Thu Mar 29 17:03:25 2018 +0300 xfrm: Register xfrm_dev_notifier in appropriate place Currently, driver registers it from pernet_operations::init method, and this breaks modularity, because initialization of net namespace and netdevice notifiers are orthogonal actions. We don't have per-namespace netdevice notifiers; all of them are global for all devices in all namespaces. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller include/net/xfrm.h | 2 +- net/xfrm/xfrm_device.c | 2 +- net/xfrm/xfrm_policy.c | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) commit e3a2d2be510ec8a35ecd2a17a42467d417962bb7 Author: davidwang Date: Fri Mar 30 09:04:48 2018 +0800 hwmon: (via-cputemp) support new centaur CPUs New centaur CPUs (Familiy == 7) also support this cpu temperature sensor. Signed-off-by: David Wang [groeck: Dropped changelog, updated subject] Signed-off-by: Guenter Roeck drivers/hwmon/via-cputemp.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit caeeeda3444b1339dca8be22aa09e1441f90e6b7 Merge: 64e828d aa076e3 Author: David S. Miller Date: Fri Mar 30 10:40:19 2018 -0400 Merge branch 'Implement-of_get_nvmem_mac_address-helper' Mike Looijmans says: ==================== of_net: Implement of_get_nvmem_mac_address helper Posted this as a small set now, with an (optional) second patch that shows how the changes work and what I've used to test the code on a Topic Miami board. I've taken the liberty to add appropriate "Acked" and "Review" tags. v4: Replaced "6" with ETH_ALEN v3: Add patch that implements mac in nvmem for the Cadence MACB controller Remove the integrated of_get_mac_address call v2: Use of_nvmem_cell_get to avoid needing the assiciated device Use void* instead of char* Add devicetree binding doc ==================== Signed-off-by: David S. Miller commit aa076e3d220a7d2e71ef0f5213bdbbcc7e351b86 Author: Mike Looijmans Date: Thu Mar 29 07:29:49 2018 +0200 net: macb: Try to retrieve MAC addess from nvmem provider Call of_get_nvmem_mac_address() to fetch the MAC address from an nvmem cell, if one is provided in the device tree. This allows the address to be stored in an I2C EEPROM device for example. Signed-off-by: Mike Looijmans Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb_main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 9217e566bdee4583d0a9ea4879c8f5e004886eac Author: Mike Looijmans Date: Thu Mar 29 07:29:48 2018 +0200 of_net: Implement of_get_nvmem_mac_address helper It's common practice to store MAC addresses for network interfaces into nvmem devices. However the code to actually do this in the kernel lacks, so this patch adds of_get_nvmem_mac_address() for drivers to obtain the address from an nvmem cell provider. This is particulary useful on devices where the ethernet interface cannot be configured by the bootloader, for example because it's in an FPGA. Signed-off-by: Mike Looijmans Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/ethernet.txt | 2 ++ drivers/of/of_net.c | 40 ++++++++++++++++++++++ include/linux/of_net.h | 6 ++++ 3 files changed, 48 insertions(+) commit 64e828dfc4853a396d2c0b25c22a4c5066aab76a Merge: 44465c4 29a5dca Author: David S. Miller Date: Fri Mar 30 10:18:55 2018 -0400 Merge branch 'nfp-flower-handle-MTU-changes' Jakub Kicinski says: ==================== nfp: flower: handle MTU changes This set improves MTU handling for flower offload. The max MTU is correctly capped and physical port MTU is communicated to the FW (and indirectly HW). ==================== Signed-off-by: David S. Miller commit 29a5dcae2790ba7fb26ea7128cbe61ecf906ab0a Author: John Hurley Date: Wed Mar 28 18:50:07 2018 -0700 nfp: flower: offload phys port MTU change Trigger a port mod message to request an MTU change on the NIC when any physical port representor is assigned a new MTU value. The driver waits 10 msec for an ack that the FW has set the MTU. If no ack is received the request is rejected and an appropriate warning flagged. Rather than maintain an MTU queue per repr, one is maintained per app. Because the MTU ndo is protected by the rtnl lock, there can never be contention here. Portmod messages from the NIC are also protected by rtnl so we first check if the portmod is an ack and, if so, handle outside rtnl and the cmsg work queue. Acks are detected by the marking of a bit in a portmod response. They are then verfied by checking the port number and MTU value expected by the app. If the expected MTU is 0 then no acks are currently expected. Also, ensure that the packet headroom reserved by the flower firmware is considered when accepting an MTU change on any repr. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 41 ++++++++++- drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 4 +- drivers/net/ethernet/netronome/nfp/flower/main.c | 87 +++++++++++++++++++++++- drivers/net/ethernet/netronome/nfp/flower/main.h | 19 ++++++ 4 files changed, 146 insertions(+), 5 deletions(-) commit 167cebeffadd45ce1e786889ab9346c15d64389b Author: John Hurley Date: Wed Mar 28 18:50:06 2018 -0700 nfp: modify app MTU setting callbacks Rename the 'change_mtu' app callback to 'check_mtu'. This is called whenever an MTU change is requested on a netdev. It can reject the change but is not responsible for implementing it. Introduce a new 'repr_change_mtu' app callback that is hit when the MTU of a repr is to be changed. This is responsible for performing the MTU change and verifying it. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/main.c | 4 ++-- drivers/net/ethernet/netronome/nfp/nfp_app.h | 25 ++++++++++++++++------ .../net/ethernet/netronome/nfp/nfp_net_common.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 13 ++++++++++- 4 files changed, 33 insertions(+), 11 deletions(-) commit 44465c47a4a3adba98588b081e6880e9b2071fa8 Merge: 2166dc9 e679c9c Author: David S. Miller Date: Fri Mar 30 10:11:07 2018 -0400 Merge branch 'phylink-API-changes' Florian Fainelli says: ==================== phylink: API changes This patch series contains two API changes to PHYLINK which will later be used by DSA to migrate to PHYLINK. Because these are API changes that impact other outstanding work (e.g: MVPP2) I would rather get them included sooner to minimize conflicts. Thank you! Changes in v2: - added missing documentation to mac_link_{up,down} that the interface must be configured in mac_config() - added Russell's, Andrew's and my tags ==================== Signed-off-by: David S. Miller commit e679c9c1dbfdba07b2a979a076cca74b773be8ce Author: Russell King Date: Wed Mar 28 15:44:16 2018 -0700 sfp/phylink: move module EEPROM ethtool access into netdev core ethtool Provide a pointer to the SFP bus in struct net_device, so that the ethtool module EEPROM methods can access the SFP directly, rather than needing every user to provide a hook for it. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 18 ------------------ drivers/net/phy/phylink.c | 28 ---------------------------- drivers/net/phy/sfp-bus.c | 6 ++---- include/linux/netdevice.h | 3 +++ include/linux/phylink.h | 3 --- net/core/ethtool.c | 7 +++++++ 6 files changed, 12 insertions(+), 53 deletions(-) commit c6ab3008b6a6ecda22e92f96a1b9cc6b0d0b0a4e Author: Florian Fainelli Date: Wed Mar 28 15:44:15 2018 -0700 net: phy: phylink: Provide PHY interface to mac_link_{up, down} In preparation for having DSA transition entirely to PHYLINK, we need to pass a PHY interface type to the mac_link_{up,down} callbacks because we may have to make decisions on that (e.g: turn on/off RGMII interfaces etc.). We do not pass an entire phylink_link_state because not all parameters (pause, duplex etc.) are defined when the link is down, only link and interface are. Update mvneta accordingly since it currently implements phylink_mac_ops. Acked-by: Russell King Signed-off-by: Florian Fainelli Acked-by: Russell King Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 4 +++- drivers/net/phy/phylink.c | 4 +++- include/linux/phylink.h | 14 +++++++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) commit 2166dc95717d982d359b616b1acbb3d28f48c494 Author: Ronak Doshi Date: Wed Mar 28 15:38:19 2018 -0700 MAINTAINERS: update vmxnet3 driver maintainer Shrikrishna Khare would no longer maintain the vmxnet3 driver. Taking over the role of vmxnet3 maintainer. Signed-off-by: Ronak Doshi Signed-off-by: Shrikrishna Khare Signed-off-by: David S. Miller MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95e623fd98d21a42528854f657910dfbbd768df8 Merge: 9daae9b 5e6ce1f Author: David S. Miller Date: Fri Mar 30 10:03:37 2018 -0400 Merge branch 'net-Broadcom-drivers-coalescing-fixes' Florian Fainelli says: ==================== net: Broadcom drivers coalescing fixes Following Tal's review of the adaptive RX/TX coalescing feature added to the SYSTEMPORT and GENET driver a number of things showed up: - adaptive TX coalescing is not actually a good idea with the current way the estimator will program the ring, this results in a higher CPU load, NAPI on TX already does a reasonably good job at maintaining the interrupt count low - both SYSTEMPORT and GENET would suffer from the same issues while configuring coalescing parameters where the values would just not be applied correctly based on user settings, so we fix that too Tal, thanks again for your feedback, I would appreciate if you could review that the new behavior appears to be implemented correctly. Thanks! Changes in v2: - added Tal's reviewed-by to the first patch - split DIM initialization from coalescing parameters initialization - avoid duplicating the same code in bcmgenet_set_coalesce() when configuring RX rings - fixed the condition where default DIM parameters would be applied when adaptive RX coalescing would be enabled, do this only if it was disabled before ==================== Signed-off-by: David S. Miller commit 5e6ce1f1a4ca83878f2966dd67afb39b631c4320 Author: Florian Fainelli Date: Wed Mar 28 15:15:38 2018 -0700 net: bcmgenet: Fix coalescing settings handling There were a number of issues with setting the RX coalescing parameters: - we would not be preserving values that would have been configured across close/open calls, instead we would always reset to no timeout and 1 interrupt per packet, this would also prevent DIM from setting its default usec/pkts values - when adaptive RX would be turned on, we woud not be fetching the default parameters, we would stay with no timeout/1 packet per interrupt until the estimator kicks in and changes that - finally disabling adaptive RX coalescing while providing parameters would not be honored, and we would stay with whatever DIM had previously determined instead of the user requested parameters Fixes: 9f4ca05827a2 ("net: bcmgenet: Add support for adaptive RX coalescing") Signed-off-by: Florian Fainelli Reviewed-by: Tal Gilboa Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 92 +++++++++++++++++--------- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 4 +- 2 files changed, 61 insertions(+), 35 deletions(-) commit a8cdfbdf885f3d3b4940ea31696a4492afd331f7 Author: Florian Fainelli Date: Wed Mar 28 15:15:37 2018 -0700 net: systemport: Fix coalescing settings handling There were a number of issues with setting the RX coalescing parameters: - we would not be preserving values that would have been configured across close/open calls, instead we would always reset to no timeout and 1 interrupt per packet, this would also prevent DIM from setting its default usec/pkts values - when adaptive RX would be turned on, we woud not be fetching the default parameters, we would stay with no timeout/1 packet per interrupt until the estimator kicks in and changes that - finally disabling adaptive RX coalescing while providing parameters would not be honored, and we would stay with whatever DIM had previously determined instead of the user requested parameters Fixes: b6e0e875421e ("net: systemport: Implement adaptive interrupt coalescing") Signed-off-by: Florian Fainelli Reviewed-by: Tal Gilboa Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 62 +++++++++++++++++++++--------- drivers/net/ethernet/broadcom/bcmsysport.h | 4 +- 2 files changed, 46 insertions(+), 20 deletions(-) commit fd41f2bfb71ba161309797de1ae1966810c19703 Author: Florian Fainelli Date: Wed Mar 28 15:15:36 2018 -0700 net: systemport: Remove adaptive TX coalescing Adaptive TX coalescing is not currently giving us any advantages and ends up making the CPU spin more frequently until TX completion. Deny and disable adaptive TX coalescing for now and rely on static configuration, we can always add it back later. Reviewed-by: Tal Gilboa Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 61 ++++-------------------------- drivers/net/ethernet/broadcom/bcmsysport.h | 1 - 2 files changed, 8 insertions(+), 54 deletions(-) commit 9daae9bd47cff82a2a06aca23c458d6c79d09d52 Author: Gal Pressman Date: Wed Mar 28 17:46:54 2018 +0300 net: Call add/kill vid ndo on vlan filter feature toggling NETIF_F_HW_VLAN_[CS]TAG_FILTER features require more than just a bit flip in dev->features in order to keep the driver in a consistent state. These features notify the driver of each added/removed vlan, but toggling of vlan-filter does not notify the driver accordingly for each of the existing vlans. This patch implements a similar solution to NETIF_F_RX_UDP_TUNNEL_PORT behavior (which notifies the driver about UDP ports in the same manner that vids are reported). Each toggling of the features propagates to the 8021q module, which iterates over the vlans and call add/kill ndo accordingly. Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller include/linux/if_vlan.h | 24 +++++++++++ include/linux/netdevice.h | 4 ++ net/8021q/vlan.c | 21 ++++++++++ net/8021q/vlan.h | 3 ++ net/8021q/vlan_core.c | 101 ++++++++++++++++++++++++++++++++++------------ net/core/dev.c | 20 +++++++++ 6 files changed, 148 insertions(+), 25 deletions(-) commit 004c3cf1a18becf5ce56f43e8821835e34c15865 Author: Wei Yongjun Date: Wed Mar 28 12:51:09 2018 +0000 cxgb4: fix error return code in adap_init0() Fix to return a negative error code from the hash filter init error handling case instead of 0, as done elsewhere in this function. Fixes: 5c31254e35a8 ("cxgb4: initialize hash-filter configuration") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 872a100a49c3785b4577e002580ca5689d1be7a1 Author: Aneesh Kumar K.V Date: Mon Mar 26 15:34:50 2018 +0530 powerpc/mm/hash: Don't memset pgd table if not needed We need to zero-out pgd table only if we share the slab cache with pud/pmd level caches. With the support of 4PB, we don't share the slab cache anymore. Instead of removing the code completely hide it within an #ifdef. We don't need to do this with any other page table level, because they all allocate table of double the size and we take of initializing the first half corrrectly during page table zap. Signed-off-by: Aneesh Kumar K.V [mpe: Consolidate multiple #if / #ifdef into one] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgalloc.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit c2b4d8b7417a59b7f9a52d0d8402f5257cbbd398 Author: Aneesh Kumar K.V Date: Mon Mar 26 15:34:49 2018 +0530 powerpc/mm/hash64: Increase the VA range This patch increases the max virtual (effective) address value to 4PB. With 4K page size config we continue to limit ourself to 64TB. Signed-off-by: Aneesh Kumar K.V [mpe: Keep the H_PGTABLE_RANGE test, update it to work] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hash-64k.h | 2 +- arch/powerpc/include/asm/processor.h | 9 ++++++++- arch/powerpc/mm/init_64.c | 6 ------ arch/powerpc/mm/pgtable-hash64.c | 4 ++++ arch/powerpc/mm/pgtable_64.c | 5 ----- 5 files changed, 13 insertions(+), 13 deletions(-) commit f384796c40dc55b3dba25e0ee9c1afd98c6d24d1 Author: Aneesh Kumar K.V Date: Mon Mar 26 15:34:48 2018 +0530 powerpc/mm: Add support for handling > 512TB address in SLB miss For addresses above 512TB we allocate additional mmu contexts. To make it all easy, addresses above 512TB are handled with IR/DR=1 and with stack frame setup. The mmu_context_t is also updated to track the new extended_ids. To support upto 4PB we need a total 8 contexts. Signed-off-by: Aneesh Kumar K.V [mpe: Minor formatting tweaks and comment wording, switch BUG to WARN in get_ea_context().] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hash-4k.h | 6 ++ arch/powerpc/include/asm/book3s/64/hash-64k.h | 6 ++ arch/powerpc/include/asm/book3s/64/mmu.h | 33 +++++++- arch/powerpc/include/asm/mmu_context.h | 39 ++++++++++ arch/powerpc/include/asm/processor.h | 6 ++ arch/powerpc/kernel/exceptions-64s.S | 11 ++- arch/powerpc/kernel/traps.c | 12 --- arch/powerpc/mm/copro_fault.c | 2 +- arch/powerpc/mm/hash_utils_64.c | 4 +- arch/powerpc/mm/mmu_context_book3s64.c | 15 +++- arch/powerpc/mm/pgtable-hash64.c | 2 +- arch/powerpc/mm/slb.c | 108 ++++++++++++++++++++++++++ arch/powerpc/mm/slb_low.S | 11 ++- arch/powerpc/mm/slice.c | 15 +++- arch/powerpc/mm/tlb_hash64.c | 2 +- 15 files changed, 245 insertions(+), 27 deletions(-) commit 0dea04b288c06654b0de3563c5b8cdfe6130e450 Author: Aneesh Kumar K.V Date: Mon Mar 26 15:34:47 2018 +0530 powerpc/mm/slice: Consolidate return path in slice_get_unmapped_area() In a following patch, on finding a free area we will need to do allocatinon of extra contexts as needed. Consolidating the return path for slice_get_unmapped_area() will make that easier. Split into a separate patch to make review easy. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit 1a2f778970c81273c121be160fb6610be8fa423e Author: Aneesh Kumar K.V Date: Wed Mar 7 19:06:44 2018 +0530 powerpc/mm/keys: Move pte bits to correct headers Memory keys are supported only with hash translation mode. Instead of using #ifdef in generic code move the key related pte bits to respective headers Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hash-4k.h | 8 ++++++++ arch/powerpc/include/asm/book3s/64/hash-64k.h | 7 +++++++ arch/powerpc/include/asm/book3s/64/pgtable.h | 19 ------------------- 3 files changed, 15 insertions(+), 19 deletions(-) commit 16b19f1a03f6a49618611b76818f04ea9cd15fb5 Author: Frederic Barrat Date: Wed Mar 14 18:01:14 2018 +0100 powerpc/xive: Fix wrong xmon output caused by typo Signed-off-by: Frederic Barrat Signed-off-by: Michael Ellerman arch/powerpc/sysdev/xive/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e283655b5abe26462d53d5196f186c5e8863af3b Author: Aaro Koskinen Date: Fri Mar 16 22:17:28 2018 +0200 drivers: macintosh: rack-meter: really fix bogus memsets We should zero an array using sizeof instead of number of elements. Fixes the following compiler (GCC 7.3.0) warnings: drivers/macintosh/rack-meter.c: In function 'rackmeter_do_pause': drivers/macintosh/rack-meter.c:157:2: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size] drivers/macintosh/rack-meter.c:158:2: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size] Fixes: 4f7bef7a9f69 ("drivers: macintosh: rack-meter: fix bogus memsets") Reported-by: Stephen Rothwell Signed-off-by: Aaro Koskinen Signed-off-by: Michael Ellerman drivers/macintosh/rack-meter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0bfdf598900fd62869659f360d3387ed80eb71cf Author: Nicholas Piggin Date: Thu Mar 22 20:41:46 2018 +1000 powerpc/64: Fix smp_wmb barrier definition use use lwsync consistently asm/barrier.h is not always included after asm/synch.h, which meant it was missing __SUBARCH_HAS_LWSYNC, so in some files smp_wmb() would be eieio when it should be lwsync. kernel/time/hrtimer.c is one case. __SUBARCH_HAS_LWSYNC is only used in one place, so just fold it in to where it's used. Previously with my small simulator config, 377 instances of eieio in the tree. After this patch there are 55. Fixes: 46d075be585e ("powerpc: Optimise smp_wmb") Cc: stable@vger.kernel.org # v2.6.29+ Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/barrier.h | 3 ++- arch/powerpc/include/asm/synch.h | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) commit 9a2c1d31e6910b9d5e0205f9167d0b1abeea1413 Author: Wei Yongjun Date: Mon Mar 26 14:43:09 2018 +0000 powerpc/4xx: Fix error return code in ppc4xx_msi_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun [mpe: Add missing ';' to make it compile] Signed-off-by: Michael Ellerman arch/powerpc/platforms/4xx/msi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f208638680e5cb4eb0d2871ce8c29a6cfbe44dce Author: Ram Pai Date: Mon Mar 26 19:36:54 2018 -0700 powerpc/mm: Fix thread_pkey_regs_init() thread_pkey_regs_init() initializes the pkey related registers instead of initializing the fields in the task structures. Fortunately those key related registers are re-set to zero when the task gets scheduled on the cpu. However its good to fix this glaringly visible error. Fixes: 06bb53b33804 ("powerpc: store and restore the pkey state across context switches") Signed-off-by: Ram Pai Signed-off-by: Thiago Jung Bauermann Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/mm/pkeys.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e6e133c47e6bd4d5dac05b35d06634a8e5648615 Author: Naveen N. Rao Date: Wed Jan 17 17:52:24 2018 +0530 powerpc/kprobes: Fix call trace due to incorrect preempt count Michael Ellerman reported the following call trace when running ftracetest: BUG: using __this_cpu_write() in preemptible [00000000] code: ftracetest/6178 caller is opt_pre_handler+0xc4/0x110 CPU: 1 PID: 6178 Comm: ftracetest Not tainted 4.15.0-rc7-gcc6x-gb2cd1df #1 Call Trace: [c0000000f9ec39c0] [c000000000ac4304] dump_stack+0xb4/0x100 (unreliable) [c0000000f9ec3a00] [c00000000061159c] check_preemption_disabled+0x15c/0x170 [c0000000f9ec3a90] [c000000000217e84] opt_pre_handler+0xc4/0x110 [c0000000f9ec3af0] [c00000000004cf68] optimized_callback+0x148/0x170 [c0000000f9ec3b40] [c00000000004d954] optinsn_slot+0xec/0x10000 [c0000000f9ec3e30] [c00000000004bae0] kretprobe_trampoline+0x0/0x10 This is showing up since OPTPROBES is now enabled with CONFIG_PREEMPT. trampoline_probe_handler() considers itself to be a special kprobe handler for kretprobes. In doing so, it expects to be called from kprobe_handler() on a trap, and re-enables preemption before returning a non-zero return value so as to suppress any subsequent processing of the trap by the kprobe_handler(). However, with optprobes, we don't deal with special handlers (we ignore the return code) and just try to re-enable preemption causing the above trace. To address this, modify trampoline_probe_handler() to not be special. The only additional processing done in kprobe_handler() is to emulate the instruction (in this case, a 'nop'). We adjust the value of regs->nip for the purpose and delegate the job of re-enabling preemption and resetting current kprobe to the probe handlers (kprobe_handler() or optimized_callback()). Fixes: 8a2d71a3f273 ("powerpc/kprobes: Disable preemption before invoking probe handler for optprobes") Cc: stable@vger.kernel.org # v4.15+ Reported-by: Michael Ellerman Signed-off-by: Naveen N. Rao Acked-by: Ananth N Mavinakayanahalli Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit 3a52f6f980c45b0dfa667f30d3ff034d033d260f Author: Finn Thain Date: Thu Mar 29 11:36:04 2018 +1100 macintosh/adb: Use C99 initializers for struct adb_driver instances No change to object files. Cc: Benjamin Herrenschmidt Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman drivers/macintosh/adb-iop.c | 14 +++++++------- drivers/macintosh/macio-adb.c | 15 +++++++-------- drivers/macintosh/via-macii.c | 14 +++++++------- drivers/macintosh/via-pmu.c | 14 +++++++------- drivers/macintosh/via-pmu68k.c | 14 +++++++------- 5 files changed, 35 insertions(+), 36 deletions(-) commit 741de617661794246f84a21a02fc5e327bffc9ad Author: Nicholas Piggin Date: Tue Mar 27 01:02:33 2018 +1000 powerpc/powernv: Handle unknown OPAL errors in opal_nvram_write() opal_nvram_write currently just assumes success if it encounters an error other than OPAL_BUSY or OPAL_BUSY_EVENT. Have it return -EIO on other errors instead. Fixes: 628daa8d5abf ("powerpc/powernv: Add RTC and NVRAM support plus RTAS fallbacks") Cc: stable@vger.kernel.org # v3.2+ Signed-off-by: Nicholas Piggin Reviewed-by: Vasant Hegde Acked-by: Stewart Smith Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-nvram.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0f9bdfe3c77091e8704d2e510eb7c2c2c6cde524 Author: Mauricio Faria de Oliveira Date: Thu Mar 29 15:32:11 2018 -0300 powerpc/pseries: Fix clearing of security feature flags The H_CPU_BEHAV_* flags should be checked for in the 'behaviour' field of 'struct h_cpu_char_result' -- 'character' is for H_CPU_CHAR_* flags. Found by playing around with QEMU's implementation of the hypercall: H_CPU_CHAR=0xf000000000000000 H_CPU_BEHAV=0x0000000000000000 This clears H_CPU_BEHAV_FAVOUR_SECURITY and H_CPU_BEHAV_L1D_FLUSH_PR so pseries_setup_rfi_flush() disables 'rfi_flush'; and it also clears H_CPU_CHAR_L1D_THREAD_PRIV flag. So there is no RFI flush mitigation at all for cpu_show_meltdown() to report; but currently it does: Original kernel: # cat /sys/devices/system/cpu/vulnerabilities/meltdown Mitigation: RFI Flush Patched kernel: # cat /sys/devices/system/cpu/vulnerabilities/meltdown Not affected H_CPU_CHAR=0x0000000000000000 H_CPU_BEHAV=0xf000000000000000 This sets H_CPU_BEHAV_BNDS_CHK_SPEC_BAR so cpu_show_spectre_v1() should report vulnerable; but currently it doesn't: Original kernel: # cat /sys/devices/system/cpu/vulnerabilities/spectre_v1 Not affected Patched kernel: # cat /sys/devices/system/cpu/vulnerabilities/spectre_v1 Vulnerable Brown-paper-bag-by: Michael Ellerman Fixes: f636c14790ea ("powerpc/pseries: Set or clear security feature flags") Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 29ab6c4708a587bc27ea0c765ac36aef9c1a77c9 Author: Nicholas Piggin Date: Wed Feb 14 01:08:22 2018 +1000 powerpc/mm: Pass node id into create_section_mapping Signed-off-by: Nicholas Piggin [mpe: Move __map_kernel_page_nid() inside #ifdef SPARSEMEM_VMEMMAP] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hash.h | 2 +- arch/powerpc/include/asm/book3s/64/radix.h | 2 +- arch/powerpc/include/asm/sparsemem.h | 2 +- arch/powerpc/mm/hash_utils_64.c | 2 +- arch/powerpc/mm/mem.c | 4 ++-- arch/powerpc/mm/pgtable-book3s64.c | 6 +++--- arch/powerpc/mm/pgtable-radix.c | 18 +++++++++--------- 7 files changed, 18 insertions(+), 18 deletions(-) commit 2ad452ffaaa8d2f1124208e507e7b045e8ee98a6 Author: Nicholas Piggin Date: Wed Feb 14 01:08:24 2018 +1000 powerpc/64s/radix: Allocate kernel page tables node-local if possible Try to allocate kernel page tables for direct mapping and vmemmap according to the node of the memory they will map. The node is not available for the linear map in early boot, so use range allocation to allocate the page tables from the region they map, which is effectively node-local. Signed-off-by: Nicholas Piggin [mpe: Fix build error in radix__create_section_mapping()] Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable-radix.c | 104 ++++++++++++++++++++++++++++++---------- 1 file changed, 80 insertions(+), 24 deletions(-) commit 0633dafcf8921048eb1ddc8c6fcfbe1b1cf3e42c Author: Nicholas Piggin Date: Wed Feb 14 01:08:23 2018 +1000 powerpc/64s/radix: Split early page table mapping to its own function Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable-radix.c | 112 +++++++++++++++++++++++----------------- 1 file changed, 65 insertions(+), 47 deletions(-) commit f3865f9a7112590f0cae02dce05ec3c3a09ff405 Author: Nicholas Piggin Date: Wed Feb 14 01:08:21 2018 +1000 powerpc/64: Allocate per-cpu stacks node-local if possible Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_64.c | 51 ++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 19 deletions(-) commit 4890aea65ae7b5d424b5020e8be193b08a545990 Author: Nicholas Piggin Date: Wed Feb 14 01:08:20 2018 +1000 powerpc/64: Allocate pacas per node Per-node allocations are possible on 64s with radix that does not have the bolted SLB limitation. Hash would be able to do the same if all CPUs had the bottom of their node-local memory bolted as well. This is left as an exercise for the reader. Signed-off-by: Nicholas Piggin [mpe: Add dummy definition of boot_cpuid for !SMP] Signed-off-by: Michael Ellerman arch/powerpc/kernel/paca.c | 45 ++++++++++++++++++++++++++++++++++++------ arch/powerpc/kernel/setup_64.c | 4 ++++ 2 files changed, 43 insertions(+), 6 deletions(-) commit 59f577743d71bf796ceac10961bf6cfa5ca26786 Author: Nicholas Piggin Date: Wed Feb 14 01:08:19 2018 +1000 powerpc/64: Defer paca allocation until memory topology is discovered Signed-off-by: Nicholas Piggin [mpe: Rename the dummy allocate_pacas() to fix 32-bit build] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/paca.h | 6 ++- arch/powerpc/kernel/paca.c | 90 ++++++++++++-------------------------- arch/powerpc/kernel/prom.c | 5 ++- arch/powerpc/kernel/setup-common.c | 24 +++++++--- 4 files changed, 53 insertions(+), 72 deletions(-) commit 9f593f131ed463dc571290980dd12cb9e56d8ea5 Author: Nicholas Piggin Date: Wed Feb 14 01:08:18 2018 +1000 powerpc/setup: Add cpu_to_phys_id array Build an array that finds hardware CPU number from logical CPU number in firmware CPU discovery. Use that rather than setting paca of other CPUs directly, to begin with. Subsequent patch will not have pacas allocated at this point. Signed-off-by: Nicholas Piggin [mpe: Fix SMP=n build by adding #ifdef in arch_match_cpu_phys_id()] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/smp.h | 1 + arch/powerpc/kernel/prom.c | 10 ++++++++++ arch/powerpc/kernel/setup-common.c | 15 ++++++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) commit c0abd0c745bdabe027a8f013a866f385fba717b1 Author: Nicholas Piggin Date: Wed Feb 14 01:08:17 2018 +1000 powerpc/64: move default SPR recording Move this into the early setup code, and don't iterate over CPU masks. We don't want to call into sysfs so early from setup, and a future patch won't initialize CPU masks by the time this is called. Signed-off-by: Nicholas Piggin [mpe: Fold in incremental fix from Nick for DSCR handling] Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup.h | 9 +++------ arch/powerpc/kernel/setup_64.c | 8 ++++++++ arch/powerpc/kernel/sysfs.c | 20 +++++++++----------- 3 files changed, 20 insertions(+), 17 deletions(-) commit 9bd9be006c8ec0ccf7cb0422d35033af39d3f969 Author: Nicholas Piggin Date: Wed Feb 14 01:08:16 2018 +1000 powerpc/mm/numa: move numa topology discovery earlier Split sparsemem initialisation from basic numa topology discovery. Move the parsing earlier in boot, before pacas are allocated. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/setup.h | 1 + arch/powerpc/kernel/setup-common.c | 3 +++ arch/powerpc/mm/mem.c | 5 ++++- arch/powerpc/mm/numa.c | 32 +++++++++++++++++++------------- 4 files changed, 27 insertions(+), 14 deletions(-) commit b575454fa330aab2d65cf17812ca8e1f405ae80d Author: Nicholas Piggin Date: Wed Feb 14 01:08:15 2018 +1000 mm: make memblock_alloc_base_nid() non-static This will be used by powerpc to allocate per-cpu stacks and other data structures node-local where possible. Signed-off-by: Nicholas Piggin [mpe: Drop stray change to memblock_alloc_range() as noticed by akpm] Signed-off-by: Michael Ellerman include/linux/memblock.h | 3 +++ mm/memblock.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit 384e8067844fc19f9c067d6b03cbc8781f98bd5d Author: Nicholas Piggin Date: Wed Feb 14 01:08:14 2018 +1000 powerpc/64s: Allocate slb_shadow structures individually slb_shadow structures are avoided for radix environment. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/paca.c | 65 +++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 35 deletions(-) commit 499dcd41378ebab2a37a0df65735748d66e75599 Author: Nicholas Piggin Date: Wed Feb 14 01:08:13 2018 +1000 powerpc/64s: Allocate LPPACAs individually We no longer allocate lppacas in an array, so this patch removes the 1kB static alignment for the structure, and enforces the PAPR alignment requirements at allocation time. We can not reduce the 1kB allocation size however, due to existing KVM hypervisors. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/lppaca.h | 24 ++++----- arch/powerpc/kernel/machine_kexec_64.c | 15 ++++-- arch/powerpc/kernel/paca.c | 89 ++++++++++++---------------------- arch/powerpc/kvm/book3s_hv.c | 3 +- arch/powerpc/mm/numa.c | 4 +- arch/powerpc/platforms/pseries/kexec.c | 7 ++- 6 files changed, 63 insertions(+), 79 deletions(-) commit d2e60075a3d4422dc54b919f3b125d8066b839d4 Author: Nicholas Piggin Date: Wed Feb 14 01:08:12 2018 +1000 powerpc/64: Use array of paca pointers and allocate pacas individually Change the paca array into an array of pointers to pacas. Allocate pacas individually. This allows flexibility in where the PACAs are allocated. Future work will allocate them node-local. Platforms that don't have address limits on PACAs would be able to defer PACA allocations until later in boot rather than allocate all possible ones up-front then freeing unused. This is slightly more overhead (one additional indirection) for cross CPU paca references, but those aren't too common. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kvm_ppc.h | 8 ++-- arch/powerpc/include/asm/lppaca.h | 2 +- arch/powerpc/include/asm/paca.h | 4 +- arch/powerpc/include/asm/smp.h | 4 +- arch/powerpc/kernel/crash.c | 2 +- arch/powerpc/kernel/head_64.S | 19 ++++---- arch/powerpc/kernel/machine_kexec_64.c | 22 ++++----- arch/powerpc/kernel/paca.c | 70 +++++++++++++++++++--------- arch/powerpc/kernel/setup_64.c | 23 ++++----- arch/powerpc/kernel/smp.c | 10 ++-- arch/powerpc/kernel/sysfs.c | 2 +- arch/powerpc/kvm/book3s_hv.c | 31 ++++++------ arch/powerpc/kvm/book3s_hv_builtin.c | 2 +- arch/powerpc/mm/tlb-radix.c | 2 +- arch/powerpc/platforms/85xx/smp.c | 8 ++-- arch/powerpc/platforms/cell/smp.c | 4 +- arch/powerpc/platforms/powernv/idle.c | 13 +++--- arch/powerpc/platforms/powernv/setup.c | 4 +- arch/powerpc/platforms/powernv/smp.c | 2 +- arch/powerpc/platforms/powernv/subcore.c | 2 +- arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 +- arch/powerpc/platforms/pseries/lpar.c | 4 +- arch/powerpc/platforms/pseries/setup.c | 2 +- arch/powerpc/platforms/pseries/smp.c | 4 +- arch/powerpc/sysdev/xics/icp-native.c | 2 +- arch/powerpc/xmon/xmon.c | 2 +- 26 files changed, 143 insertions(+), 107 deletions(-) commit 8e0b634b132752ec3eba50afb952502b1a87d6ba Author: Nicholas Piggin Date: Wed Feb 14 01:08:11 2018 +1000 powerpc/64s: Do not allocate lppaca if we are not virtualized The "lppaca" is a structure registered with the hypervisor. This is unnecessary when running on non-virtualised platforms. One field from the lppaca (pmcregs_in_use) is also used by the host, so move the host part out into the paca (lppaca field is still updated in guest mode). Signed-off-by: Nicholas Piggin [mpe: Fix non-pseries build with some #ifdefs] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/paca.h | 12 ++++++++++-- arch/powerpc/include/asm/plpar_wrappers.h | 4 ++++ arch/powerpc/include/asm/pmc.h | 13 ++++++++++++- arch/powerpc/kernel/asm-offsets.c | 5 +++++ arch/powerpc/kernel/paca.c | 16 +++++++++++++--- arch/powerpc/kvm/book3s_hv_interrupts.S | 3 +-- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 3 +-- 7 files changed, 46 insertions(+), 10 deletions(-) commit 0834d627fbea00c1444075eb3e448e1974da452d Author: Michael Ellerman Date: Fri Mar 30 23:27:25 2018 +1100 powerpc/mpic: Check if cpu_possible() in mpic_physmask() In mpic_physmask() we loop over all CPUs up to 32, then get the hard SMP processor id of that CPU. Currently that's possibly walking off the end of the paca array, but in a future patch we will change the paca array to be an array of pointers, and in that case we will get a NULL for missing CPUs and oops. eg: Unable to handle kernel paging request for data at address 0x88888888888888b8 Faulting instruction address: 0xc00000000004e380 Oops: Kernel access of bad area, sig: 11 [#1] ... NIP .mpic_set_affinity+0x60/0x1a0 LR .irq_do_set_affinity+0x48/0x100 Fix it by checking the CPU is possible, this also fixes the code if there are gaps in the CPU numbering which probably never happens on mpic systems but who knows. Debugged-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/sysdev/mpic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26c97c5d8dac6bc56d4360561a286f52543ac07e Author: Joe Perches Date: Tue Mar 20 10:35:47 2018 -0700 netfilter: ipset: Use is_zero_ether_addr instead of static and memcmp To make the test a bit clearer and to reduce object size a little. Miscellanea: o remove now unnecessary static const array $ size ip_set_hash_mac.o* text data bss dec hex filename 22822 4619 64 27505 6b71 ip_set_hash_mac.o.allyesconfig.new 22932 4683 64 27679 6c1f ip_set_hash_mac.o.allyesconfig.old 10443 1040 0 11483 2cdb ip_set_hash_mac.o.defconfig.new 10507 1040 0 11547 2d1b ip_set_hash_mac.o.defconfig.old Signed-off-by: Joe Perches Signed-off-by: Pablo Neira Ayuso net/netfilter/ipset/ip_set_hash_mac.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit e3b5e1ec75234fb6b27708a316cdf69f9fb176a8 Author: Florian Westphal Date: Fri Mar 30 11:39:12 2018 +0200 Revert "netfilter: x_tables: ensure last rule in base chain matches underflow/policy" This reverts commit 0d7df906a0e78079a02108b06d32c3ef2238ad25. Valdis Kletnieks reported that xtables is broken in linux-next since 0d7df906a0e78 ("netfilter: x_tables: ensure last rule in base chain matches underflow/policy"), as kernel rejects the (well-formed) ruleset: [ 64.402790] ip6_tables: last base chain position 1136 doesn't match underflow 1344 (hook 1) mark_source_chains is not the correct place for such a check, as it terminates evaluation of a chain once it sees an unconditional verdict (following rules are known to be unreachable). It seems preferrable to fix libiptc instead, so remove this check again. Fixes: 0d7df906a0e78 ("netfilter: x_tables: ensure last rule in base chain matches underflow/policy") Reported-by: Valdis Kletnieks Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/arp_tables.c | 17 +---------------- net/ipv4/netfilter/ip_tables.c | 17 +---------------- net/ipv6/netfilter/ip6_tables.c | 17 +---------------- 3 files changed, 3 insertions(+), 48 deletions(-) commit 3d13de4b027d5f6276c0f9d3a264f518747d83f2 Author: Martin Kelly Date: Mon Mar 26 14:27:52 2018 -0700 iio:kfifo_buf: check for uint overflow Currently, the following causes a kernel OOPS in memcpy: echo 1073741825 > buffer/length echo 1 > buffer/enable Note that using 1073741824 instead of 1073741825 causes "write error: Cannot allocate memory" but no OOPS. This is because 1073741824 == 2^30 and 1073741825 == 2^30+1. Since kfifo rounds up to the nearest power of 2, it will actually call kmalloc with roundup_pow_of_two(length) * bytes_per_datum. Using length == 1073741825 and bytes_per_datum == 2, we get: kmalloc(roundup_pow_of_two(1073741825) * 2 or kmalloc(2147483648 * 2) or kmalloc(4294967296) or kmalloc(UINT_MAX + 1) so this overflows to 0, causing kmalloc to return ZERO_SIZE_PTR and subsequent memcpy to fail once the device is enabled. Fix this by checking for overflow prior to allocating a kfifo. With this check added, the above code returns -EINVAL when enabling the buffer, rather than causing an OOPS. Signed-off-by: Martin Kelly cc: Signed-off-by: Jonathan Cameron drivers/iio/buffer/kfifo_buf.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3d41386d556db9f720e00de3e11e45f39cb5071c Author: George Cherian Date: Fri Mar 23 03:30:31 2018 -0700 cpufreq: CPPC: Use transition_delay_us depending transition_latency With commit e948bc8fbee0 (cpufreq: Cap the default transition delay value to 10 ms) the cpufreq was not honouring the delay passed via ACPI (PCCT). Due to which on ARM based platforms using CPPC the cpufreq governor tries to change the frequency of CPUs faster than expected. This leads to continuous error messages like the following. " ACPI CPPC: PCC check channel failed. Status=0 " Earlier (without above commit) the default transition delay was taken form the value passed from PCCT. Use the same value provided by PCCT to set the transition_delay_us. Fixes: e948bc8fbee0 (cpufreq: Cap the default transition delay value to 10 ms) Signed-off-by: George Cherian Cc: 4.14+ # 4.14+ Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cppc_cpufreq.c | 3 +++ 1 file changed, 3 insertions(+) commit c043ec1ca5baae63726aae32abbe003192bc6eec Author: Martin Kelly Date: Mon Mar 26 14:27:51 2018 -0700 iio:buffer: make length types match kfifo types Currently, we use int for buffer length and bytes_per_datum. However, kfifo uses unsigned int for length and size_t for element size. We need to make sure these matches or we will have bugs related to overflow (in the range between INT_MAX and UINT_MAX for length, for example). In addition, set_bytes_per_datum uses size_t while bytes_per_datum is an int, which would cause bugs for large values of bytes_per_datum. Change buffer length to use unsigned int and bytes_per_datum to use size_t. Signed-off-by: Martin Kelly Cc: Signed-off-by: Jonathan Cameron drivers/iio/buffer/industrialio-buffer-dma.c | 2 +- drivers/iio/buffer/kfifo_buf.c | 4 ++-- include/linux/iio/buffer_impl.h | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) commit 8b29d29abc484d638213dd79a18a95ae7e5bb402 Author: Lenny Szubowicz Date: Tue Mar 27 09:56:40 2018 -0400 ACPI: acpi_pad: Fix memory leak in power saving threads Fix once per second (round_robin_time) memory leak of about 1 KB in each acpi_pad kernel idling thread that is activated. Found by testing with kmemleak. Signed-off-by: Lenny Szubowicz Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_pad.c | 3 +++ 1 file changed, 3 insertions(+) commit 648464076160ee7a4112d05eea13621790ab9d04 Author: Mario Limonciello Date: Wed Mar 28 12:01:10 2018 -0500 PM / hibernate: Change message when writing to /sys/power/resume This file is used both for setting the wakeup device without kernel command line as well as for actually waking the system (when appropriate swap header is in place). To avoid confusion on incorrect logs in system log downgrade the message to debug and make it clearer. Signed-off-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki kernel/power/hibernate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 355064675f1c997cea017ea64c8f2c216e5425d9 Author: Mario Limonciello Date: Wed Mar 28 12:01:09 2018 -0500 PM / hibernate: Make passing hibernate offsets more friendly Currently the only way to specify a hibernate offset for a swap file is on the kernel command line. Add a new /sys/power/resume_offset that lets userspace specify the offset and disk to use when initiating a hibernate cycle. Signed-off-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki Documentation/ABI/testing/sysfs-power | 14 ++++++++++++++ Documentation/power/swsusp.txt | 10 +++++++++- kernel/power/hibernate.c | 24 ++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) commit 9ba5c404bf1d6284f0269411b33394362b7ff405 Author: Ben Hutchings Date: Thu Mar 29 15:12:41 2018 +0100 netfilter: x_tables: Add note about how to free percpu counters Due to the way percpu counters are allocated and freed in blocks, it is not safe to free counters individually. Currently all callers do the right thing, but let's note this restriction. Fixes: ae0ac0ed6fcf ("netfilter: x_tables: pack percpu counter allocations") Signed-off-by: Ben Hutchings Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c47d36b3855d804b2e282f9b4eecbbd19b5453f9 Author: Arushi Singhal Date: Thu Mar 29 00:39:50 2018 +0530 netfilter: Merge assignment with return Merge assignment with return statement to directly return the value. Signed-off-by: Arushi Singhal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 5 ++--- net/netfilter/xt_hashlimit.c | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) commit a3073c17dd8cd041d5cf68f28a80a54e310f2f45 Author: Pablo Neira Ayuso Date: Wed Mar 28 12:06:50 2018 +0200 netfilter: nf_tables: use nft_set_lookup_global from nf_tables_newsetelem() Replace opencoded implementation of nft_set_lookup_global() by call to this function. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 10659cbab72b7bfee1a886018d1915a9549b6378 Author: Pablo Neira Ayuso Date: Wed Mar 28 12:06:49 2018 +0200 netfilter: nf_tables: rename to nft_set_lookup_global() To prepare shorter introduction of shorter function prefix. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 10 +++++----- net/netfilter/nf_tables_api.c | 12 ++++++------ net/netfilter/nft_dynset.c | 5 +++-- net/netfilter/nft_lookup.c | 4 ++-- net/netfilter/nft_objref.c | 5 +++-- 5 files changed, 19 insertions(+), 17 deletions(-) commit 43a605f2f722b6e08addedae8545b490fca252c4 Author: Pablo Neira Ayuso Date: Tue Mar 27 11:53:08 2018 +0200 netfilter: nf_tables: enable conntrack if NAT chain is registered Register conntrack hooks if the user adds NAT chains. Users get confused with the existing behaviour since they will see no packets hitting this chain until they add the first rule that refers to conntrack. This patch adds new ->init() and ->free() indirections to chain types that can be used by NAT chains to invoke the conntrack dependency. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 4 ++++ net/ipv4/netfilter/nft_chain_nat_ipv4.c | 12 ++++++++++++ net/ipv6/netfilter/nft_chain_nat_ipv6.c | 12 ++++++++++++ net/netfilter/nf_tables_api.c | 24 +++++++++++++++++------- 4 files changed, 45 insertions(+), 7 deletions(-) commit 02c7b25e5f54321b9063e18d4f52cce07f8e081d Author: Pablo Neira Ayuso Date: Tue Mar 27 11:53:07 2018 +0200 netfilter: nf_tables: build-in filter chain type One module per supported filter chain family type takes too much memory for very little code - too much modularization - place all chain filter definitions in one single file. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 3 + net/bridge/netfilter/Kconfig | 2 +- net/bridge/netfilter/Makefile | 1 - net/bridge/netfilter/nf_tables_bridge.c | 81 ------- net/ipv4/netfilter/Kconfig | 4 +- net/ipv4/netfilter/Makefile | 2 - net/ipv4/netfilter/nf_tables_arp.c | 60 ----- net/ipv4/netfilter/nf_tables_ipv4.c | 69 ------ net/ipv6/netfilter/Kconfig | 2 +- net/ipv6/netfilter/Makefile | 1 - net/ipv6/netfilter/nf_tables_ipv6.c | 67 ------ net/netfilter/Kconfig | 4 +- net/netfilter/Makefile | 9 +- net/netfilter/nf_tables_api.c | 3 + net/netfilter/nf_tables_inet.c | 77 ------ net/netfilter/nf_tables_netdev.c | 140 ----------- net/netfilter/nft_chain_filter.c | 398 ++++++++++++++++++++++++++++++++ 17 files changed, 414 insertions(+), 509 deletions(-) commit cc07eeb0e5ee18895241460bdccf91a4952731f9 Author: Pablo Neira Ayuso Date: Tue Mar 27 11:53:06 2018 +0200 netfilter: nf_tables: nft_register_chain_type() returns void Use WARN_ON() instead since it should not happen that neither family goes over NFPROTO_NUMPROTO nor there is already a chain of this type already registered. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 2 +- net/bridge/netfilter/nf_tables_bridge.c | 4 +++- net/ipv4/netfilter/nf_tables_arp.c | 4 +++- net/ipv4/netfilter/nf_tables_ipv4.c | 4 +++- net/ipv4/netfilter/nft_chain_nat_ipv4.c | 6 +----- net/ipv4/netfilter/nft_chain_route_ipv4.c | 4 +++- net/ipv6/netfilter/nf_tables_ipv6.c | 4 +++- net/ipv6/netfilter/nft_chain_nat_ipv6.c | 6 +----- net/ipv6/netfilter/nft_chain_route_ipv6.c | 4 +++- net/netfilter/nf_tables_api.c | 14 +++++--------- net/netfilter/nf_tables_inet.c | 4 +++- net/netfilter/nf_tables_netdev.c | 4 +--- 12 files changed, 30 insertions(+), 30 deletions(-) commit 32537e91847a5686d57d3811c075a46b2d9b6434 Author: Pablo Neira Ayuso Date: Tue Mar 27 11:53:05 2018 +0200 netfilter: nf_tables: rename struct nf_chain_type Use nft_ prefix. By when I added chain types, I forgot to use the nftables prefix. Rename enum nft_chain_type to enum nft_chain_types too, otherwise there is an overlap. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 16 ++++++++-------- net/bridge/netfilter/nf_tables_bridge.c | 2 +- net/ipv4/netfilter/nf_tables_arp.c | 2 +- net/ipv4/netfilter/nf_tables_ipv4.c | 2 +- net/ipv4/netfilter/nft_chain_nat_ipv4.c | 2 +- net/ipv4/netfilter/nft_chain_route_ipv4.c | 2 +- net/ipv6/netfilter/nf_tables_ipv6.c | 2 +- net/ipv6/netfilter/nft_chain_nat_ipv6.c | 2 +- net/ipv6/netfilter/nft_chain_route_ipv6.c | 2 +- net/netfilter/nf_tables_api.c | 18 +++++++++--------- net/netfilter/nf_tables_inet.c | 2 +- net/netfilter/nf_tables_netdev.c | 2 +- 12 files changed, 27 insertions(+), 27 deletions(-) commit 9124a20d8794663a396b5d6f91f66903848a042b Author: Joe Perches Date: Wed Mar 21 04:03:22 2018 -0700 netfilter: ebt_stp: Use generic functions for comparisons Instead of unnecessary const declarations, use the generic functions to save a little object space. $ size net/bridge/netfilter/ebt_stp.o* text data bss dec hex filename 1250 144 0 1394 572 net/bridge/netfilter/ebt_stp.o.new 1344 144 0 1488 5d0 net/bridge/netfilter/ebt_stp.o.old Signed-off-by: Joe Perches Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebt_stp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 19b351f16fd940092f2daa75773b0320f0785de9 Author: Pablo Neira Ayuso Date: Wed Mar 28 15:00:43 2018 +0200 netfilter: add flowtable documentation This patch adds initial documentation for the Netfilter flowtable infrastructure. Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Documentation/networking/nf_flowtable.txt | 112 ++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) commit 1be3ac98444066a292de02c2c12e203bdf575e7d Author: Bernie Harris Date: Wed Mar 21 15:42:16 2018 +1300 netfilter: ebtables: Add string filter This patch is part of a proposal to add a string filter to ebtables, which would be similar to the string filter in iptables. Like iptables, the ebtables filter uses the xt_string module. Signed-off-by: Bernie Harris Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_string.c | 1 + 1 file changed, 1 insertion(+) commit 39c202d228c3da5a5531be847e9b06cc9b787f31 Author: Bernie Harris Date: Wed Mar 21 15:42:15 2018 +1300 netfilter: ebtables: Add support for specifying match revision Currently ebtables assumes that the revision number of all match modules is 0, which is an issue when trying to use existing xtables matches with ebtables. The solution is to modify ebtables to allow extensions to specify a revision number, similar to iptables. This gets passed down to the kernel, which is then able to find the match module correctly. To main binary backwards compatibility, the size of the ebt_entry structures is not changed, only the size of the name field is decreased by 1 byte to make room for the revision field. Signed-off-by: Bernie Harris Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter_bridge/ebtables.h | 16 +++++++-- net/bridge/netfilter/ebtables.c | 47 ++++++++++++++++---------- 2 files changed, 42 insertions(+), 21 deletions(-) commit e8de85d5a107352ff428f735b0afc8133bcbc3e5 Author: Fabio Estevam Date: Fri Jan 26 19:23:25 2018 -0200 dt-bindings: fsl-quadspi: Add the example of two SPI NOR Improve the bindings example by adding an example of how to represent two SPI NOR devices. Signed-off-by: Fabio Estevam Acked-by: Han Xu Signed-off-by: Cyrille Pitchen Signed-off-by: Boris Brezillon .../devicetree/bindings/mtd/fsl-quadspi.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 6898b240f8a16be8323ec58ad1214dd3ed121592 Author: Fabio Estevam Date: Fri Jan 26 19:23:24 2018 -0200 mtd: fsl-quadspi: Distinguish the mtd device names Currently on a imx6sx-sdb board, which has two SPI NOR chips connected to QSPI2 the following output from /proc/mtd is seen: dev: size erasesize name mtd0: 01000000 00010000 "21e4000.qspi" mtd1: 01000000 00010000 "21e4000.qspi" Attempts to partition them on the kernel command line result in both chips with identical (and identically named) partitions, which is an inconvenient behavior. Assign a different mtd->name for each mtd device to avoid this problem. After this change the output from /proc/mtd becomes: dev: size erasesize name mtd0: 01000000 00010000 "21e4000.qspi-0" mtd1: 01000000 00010000 "21e4000.qspi-1" In order to keep mtdparts compatibility keep the mtd->name unchanged when a single SPI NOR is present. Reported-by: David Wolfe Signed-off-by: Fabio Estevam Reviewed-by: Boris Brezillon Acked-by: Han Xu Signed-off-by: Cyrille Pitchen Signed-off-by: Boris Brezillon drivers/mtd/spi-nor/fsl-quadspi.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 10996f802109c83421ca30556cfe36ffc3bebae3 Author: Tina Zhang Date: Wed Mar 28 13:49:29 2018 +0800 drm/i915/gvt: Add drm_format_mod update Add drm_format_mod update, which is omitted. Fixes: e546e281("drm/i915/gvt: Dmabuf support for GVT-g") Cc: stable@vger.kernel.org Signed-off-by: Tina Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/dmabuf.c | 1 + 1 file changed, 1 insertion(+) commit 65eff272330c72689fb5e20dd6491826fd87a39c Author: Xiong Zhang Date: Wed Mar 28 05:30:14 2018 +0800 drm/i915/gvt: Disable primary/sprite/cursor plane at virtual display initialization Much error exist in host dmesg during guest boot up with loca display enabled. gvt: vgpu 1: invalid range gmadr 0x0 size 0x0 This error happens when qemu get dmabuf info in case that the virtual display plane is enabled but its base address is an invalid 0, such case may be true before guest enable its plane. At this moment, its state is copied from host where the plane may be enabled. This patch disable primary/sprite/cursor plane at virtual display initialization, so intel_vgpu_decode_primary/cursor/sprite could return early as plane is disabled, then plane base check is skipped and error message disapper. Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/display.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a733390f9a79876635013e57da25f91b6e78ffe6 Author: Xiong Zhang Date: Wed Mar 28 05:30:13 2018 +0800 drm/i915/gvt: Delete redundant error message in fb_decode.c Much error message exist in host dmesg when guest boot up with local display enabled. [ 167.680011] gvt: vgpu 1: invalid range gmadr 0x0 size 0x0 [ 167.680013] gvt: vgpu 1: invalid gma address: 0 The second error line duplicate with the first error line, so this patch remove this redundant error message and make the next error message much clearer. Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/fb_decoder.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) commit f4c43db356198d8091442f593871b0beb5c139b2 Author: Changbin Du Date: Tue Mar 27 15:35:15 2018 +0800 drm/i915/gvt: Cancel dma map when resetting ggtt entries Ditto, don't forget ggtt entries during reset. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 22 +++++++++++++++++----- drivers/gpu/drm/i915/gvt/gtt.h | 2 +- 2 files changed, 18 insertions(+), 6 deletions(-) commit 7598e8700e9a507496660219924ca8c5aa3088d6 Author: Changbin Du Date: Tue Mar 27 15:35:14 2018 +0800 drm/i915/gvt: Missed to cancel dma map for ggtt entries We have canceled dma map for ppgtt entries. Also we need to do it for ggtt entries when them are invalidated. This can fix task hung issue as: [13517.791767] INFO: task gvt_service_thr:1081 blocked for more than 120 seconds. [13517.792584] Not tainted 4.14.15+ #3 [13517.793417] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [13517.794267] gvt_service_thr D 0 1081 2 0x80000000 [13517.795132] Call Trace: [13517.795996] ? __schedule+0x493/0x77b [13517.796859] schedule+0x79/0x82 [13517.797740] schedule_preempt_disabled+0x5/0x6 [13517.798614] __mutex_lock.isra.0+0x2b5/0x445 [13517.799504] ? __switch_to_asm+0x24/0x60 [13517.800381] ? intel_gvt_cleanup+0x10/0x10 [13517.801261] ? intel_gvt_schedule+0x19/0x2b9 [13517.802107] intel_gvt_schedule+0x19/0x2b9 [13517.802954] ? intel_gvt_cleanup+0x10/0x10 [13517.803824] gvt_service_thread+0xe3/0x10d [13517.804704] ? wait_woken+0x68/0x68 [13517.805588] kthread+0x118/0x120 [13517.806478] ? kthread_create_on_node+0x3a/0x3a [13517.807381] ? call_usermodehelper_exec_async+0x113/0x11a [13517.808307] ret_from_fork+0x35/0x40 v3: split out ggtt reset case. v2: also unmap ggtt during reset. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit 27f394a7718d00ad16c59c616638cb46c6cd6a9d Author: Tyson Nottingham Date: Fri Mar 30 00:56:10 2018 -0400 ext4: don't show data= option if defaulted Previously, mount -l would show data= even if the ext4 default journaling mode was being used. Change this to be consistent with the rest of the options. Ext4 already did the right thing when the journaling mode being used matched the one specified in the superblock's default mount options. The reason it failed to do the right thing for the ext4 defaults is that, when set, they were never included in sbi->s_def_mount_opt (unlike the superblock's defaults, which were). Signed-off-by: Tyson Nottingham Signed-off-by: Theodore Ts'o fs/ext4/super.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ceec03764a3921d03aefe4cc9b3b14cf8527ceff Author: Tyson Nottingham Date: Fri Mar 30 00:53:33 2018 -0400 ext4: omit init_itable=n in procfs when disabled Don't show init_itable=n in /proc/fs/ext4//options when filesystem is mounted with noinit_itable. Signed-off-by: Tyson Nottingham Signed-off-by: Theodore Ts'o fs/ext4/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68afa7e0836263e28ebf272e56a110a56ffdabb6 Author: Tyson Nottingham Date: Fri Mar 30 00:51:10 2018 -0400 ext4: show more binary mount options in procfs Previously, /proc/fs/ext4//options would only show binary options if they were set (1 in the options bit mask). E.g. it would show "grpid" if it was set, but it would not show "nogrpid" if grpid was not set. This seems sensible, but when an option is absent from the file, it can be hard for the unfamiliar to know what is being used. E.g. if there isn't a (no)grpid entry, nogrpid is in effect. But if there isn't a (no)auto_da_alloc entry, auto_da_alloc is in effect. If there isn't a (minixdf|bsddf) entry, it turns out bsddf is in effect. It all depends on how the option is implemented. It's clearer to be explicit, so print the corresponding option regardless of whether it means a 1 or a 0 in the bit mask. Note that options which do not have an explicit disable option aren't indicated as being disabled even with this change (e.g. dax). Signed-off-by: Tyson Nottingham Signed-off-by: Theodore Ts'o fs/ext4/super.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit bc1420ae56266fa2c5a8e452d55f744ca98fe42f Author: Tyson Nottingham Date: Fri Mar 30 00:41:34 2018 -0400 ext4: simplify kobject usage Replace kset with generic kobject provided by kobject_create_and_add(), since the latter is sufficient. Signed-off-by: Tyson Nottingham Signed-off-by: Theodore Ts'o fs/ext4/sysfs.c | 45 ++++++++++++--------------------------------- 1 file changed, 12 insertions(+), 33 deletions(-) commit 6ca06829fba6019913f524772ec189f1dc7ec3c8 Author: Tyson Nottingham Date: Fri Mar 30 00:13:10 2018 -0400 ext4: remove unused parameters in sysfs code Signed-off-by: Tyson Nottingham Signed-off-by: Theodore Ts'o fs/ext4/sysfs.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit c2e5df762601157f9c101025f10f873ae792e6cb Author: Tyson Nottingham Date: Fri Mar 30 00:03:38 2018 -0400 ext4: null out kobject* during sysfs cleanup Make cleanup of ext4_feat kobject consistent with similar objects. Signed-off-by: Tyson Nottingham Signed-off-by: Theodore Ts'o fs/ext4/sysfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 18db4b4e6fc31eda838dd1c1296d67dbcb3dc957 Author: Theodore Ts'o Date: Thu Mar 29 22:10:35 2018 -0400 ext4: don't allow r/w mounts if metadata blocks overlap the superblock If some metadata block, such as an allocation bitmap, overlaps the superblock, it's very likely that if the file system is mounted read/write, the results will not be pretty. So disallow r/w mounts for file systems corrupted in this particular way. Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/super.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a45403b51582a87872927a3e0fc0a389c26867f1 Author: Theodore Ts'o Date: Thu Mar 29 22:10:31 2018 -0400 ext4: always initialize the crc32c checksum driver The extended attribute code now uses the crc32c checksum for hashing purposes, so we should just always always initialize it. We also want to prevent NULL pointer dereferences if one of the metadata checksum features is enabled after the file sytsem is originally mounted. This issue has been assigned CVE-2018-1094. https://bugzilla.kernel.org/show_bug.cgi?id=199183 https://bugzilla.redhat.com/show_bug.cgi?id=1560788 Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/super.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 8e4b5eae5decd9dfe5a4ee369c22028f90ab4c44 Author: Theodore Ts'o Date: Thu Mar 29 21:56:09 2018 -0400 ext4: fail ext4_iget for root directory if unallocated If the root directory has an i_links_count of zero, then when the file system is mounted, then when ext4_fill_super() notices the problem and tries to call iput() the root directory in the error return path, ext4_evict_inode() will try to free the inode on disk, before all of the file system structures are set up, and this will result in an OOPS caused by a NULL pointer dereference. This issue has been assigned CVE-2018-1092. https://bugzilla.kernel.org/show_bug.cgi?id=199179 https://bugzilla.redhat.com/show_bug.cgi?id=1560777 Reported-by: Wen Xu Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/inode.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b65125fa57973baeabc3a6fe2f8c1179bd45fd95 Author: Matias Bjørling Date: Fri Mar 30 00:05:24 2018 +0200 lightnvm: remove function name in strings For the sysfs functions, the function names are embedded into their error strings. If the function name later changes, the string may not be updated accordingly. Update the strings to use __func__ to avoid this. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5565b0ca50b5b82e0439f6e4dc7fbb122cd0b025 Author: Dan Carpenter Date: Fri Mar 30 00:05:23 2018 +0200 lightnvm: pblk: remove some unnecessary NULL checks Smatch complains that flush_workqueue() dereferences the work queue pointer but then we check if it's NULL on the next line when it's too late. These NULL checks can be removed because the module won't load if we can't allocate the work queues. Signed-off-by: Dan Carpenter Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-gc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9156f360a77f9b975645a66af5ae8f7f68eccded Author: Hans Holmberg Date: Fri Mar 30 00:05:22 2018 +0200 lightnvm: pblk: don't recover unwritten lines If the line has not been written to, we should not try to recover any data from it, so check the state of the chunks in the line before attempting to read smeta. Signed-off-by: Hans Holmberg Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-recovery.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 3b2a3ad11946b62a17dd6c24fba6aecf7fdbfc44 Author: Javier González Date: Fri Mar 30 00:05:21 2018 +0200 lightnvm: pblk: implement 2.0 support Implement 2.0 support in pblk. This includes the address formatting and mapping paths, as well as the sysfs entries for them. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 56 ++++++++++-- drivers/lightnvm/pblk-sysfs.c | 46 +++++++--- drivers/lightnvm/pblk.h | 196 ++++++++++++++++++++++++++++++++---------- 3 files changed, 234 insertions(+), 64 deletions(-) commit 32ef9412c1142c64b372b83d3740f234f4226317 Author: Javier González Date: Fri Mar 30 00:05:20 2018 +0200 lightnvm: pblk: implement get log report chunk In preparation of pblk supporting 2.0, implement the get log report chunk in pblk. Also, define the chunk states as given in the 2.0 spec. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 138 +++++++++++++++++++++++---- drivers/lightnvm/pblk-init.c | 222 ++++++++++++++++++++++++++++++------------- drivers/lightnvm/pblk.h | 7 ++ include/linux/lightnvm.h | 13 +++ 4 files changed, 298 insertions(+), 82 deletions(-) commit bb845ae45c3d669ee814ce9f0ed51f2915ee55a0 Author: Javier González Date: Fri Mar 30 00:05:19 2018 +0200 lightnvm: pblk: rename ppaf* to addrf* In preparation for 2.0 support in pblk, rename variables referring to the address format to addrf and reserve ppaf for the 1.2 path. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 8 ++++---- drivers/lightnvm/pblk-sysfs.c | 4 ++-- drivers/lightnvm/pblk.h | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) commit 7ad5039ee557f0a427a0768e43c28d0236d56ba3 Author: Javier González Date: Fri Mar 30 00:05:18 2018 +0200 lightnvm: pblk: check for supported version At this point, only 1.2 spec is supported, thus check for it. Also, since device-side L2P is only supported in the 1.2 spec, make sure to only check its value under 1.2. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit a294c199455187d124b0760fa8f86c13cdaa4b25 Author: Javier González Date: Fri Mar 30 00:05:17 2018 +0200 lightnvm: implement get log report chunk helpers The 2.0 spec provides a report chunk log page that can be retrieved using the stangard nvme get log page. This replaces the dedicated get/put bad block table in 1.2. This patch implements the helper functions to allow targets retrieve the chunk metadata using get log page. It makes nvme_get_log_ext available outside of nvme core so that we can use it form lightnvm. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 11 +++++++ drivers/nvme/host/core.c | 4 +-- drivers/nvme/host/lightnvm.c | 74 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/lightnvm.h | 24 ++++++++++++++ 4 files changed, 111 insertions(+), 2 deletions(-) commit 7100d50a7e58a6884368001e2b1a32b7169c072c Author: Javier González Date: Fri Mar 30 00:05:16 2018 +0200 lightnvm: make address conversions depend on generic device On address conversions, use the generic device, instead of the target device. This allows to use conversions outside of the target's realm. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 4 ++-- include/linux/lightnvm.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 694715137482b10d5be83b1dadf9a3cdee2ce1bc Author: Javier González Date: Fri Mar 30 00:05:15 2018 +0200 lightnvm: add support for 2.0 address format Add support for 2.0 address format. Also, align address bits for 1.2 and 2.0 to be able to operate on channel and luns without requiring a format conversion. Use a generic address format for this purpose. Also, convert the generic operations to the generic format in pblk. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 20 ++++----- drivers/lightnvm/pblk-core.c | 10 ++--- drivers/lightnvm/pblk-map.c | 4 +- drivers/lightnvm/pblk-sysfs.c | 4 +- drivers/lightnvm/pblk.h | 4 +- include/linux/lightnvm.h | 101 +++++++++++++++++++++++++++++++----------- 6 files changed, 95 insertions(+), 48 deletions(-) commit a40afad90b9a253b282183eb9365f1cc14aeff77 Author: Javier González Date: Fri Mar 30 00:05:14 2018 +0200 lightnvm: normalize geometry nomenclature Normalize nomenclature for naming channels, luns, chunks, planes and sectors as well as derivations in order to improve readability. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 89 +++++++++++++++++++++---------------------- drivers/lightnvm/pblk-core.c | 4 +- drivers/lightnvm/pblk-init.c | 30 +++++++-------- drivers/lightnvm/pblk-sysfs.c | 4 +- drivers/lightnvm/pblk.h | 20 +++++----- drivers/nvme/host/lightnvm.c | 54 +++++++++++++------------- include/linux/lightnvm.h | 16 ++++---- 7 files changed, 108 insertions(+), 109 deletions(-) commit 3f48021bad73696421e2725c856b9b3aec7f567c Author: Javier González Date: Fri Mar 30 00:05:13 2018 +0200 lightnvm: complete geo structure with maxoc* Complete the generic geometry structure with the maxoc and maxocpu felds, present in the 2.0 spec. Also, expose them through sysfs. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 17 +++++++++++++++++ include/linux/lightnvm.h | 2 ++ 2 files changed, 19 insertions(+) commit f1d4e8121f3fc25f9be94c6de6b8f5f788ad0265 Author: Javier González Date: Fri Mar 30 00:05:12 2018 +0200 lightnvm: add shorten OCSSD version in geo Create a shorten version to use in the generic geometry. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 6 ++++++ include/linux/lightnvm.h | 8 ++++++++ 2 files changed, 14 insertions(+) commit 3cb98f84d368b3bbe07a2d5bf938e31f74567620 Author: Javier González Date: Fri Mar 30 00:05:11 2018 +0200 lightnvm: add minor version to generic geometry Separate the version between major and minor on the generic geometry and represent it through sysfs in the 2.0 path. The 1.2 path only shows the major version to preserve the existing user space interface. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 4 ++-- drivers/nvme/host/lightnvm.c | 25 ++++++++++++++++++++----- include/linux/lightnvm.h | 3 ++- 3 files changed, 24 insertions(+), 8 deletions(-) commit e46f4e4822bdecf9bcbc2e71b2a3ae7f37464a2d Author: Javier González Date: Fri Mar 30 00:05:10 2018 +0200 lightnvm: simplify geometry structure Currently, the device geometry is stored redundantly in the nvm_id and nvm_geo structures at a device level. Moreover, when instantiating targets on a specific number of LUNs, these structures are replicated and manually modified to fit the instance channel and LUN partitioning. Instead, create a generic geometry around nvm_geo, which can be used by (i) the underlying device to describe the geometry of the whole device, and (ii) instances to describe their geometry independently. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 70 +++----- drivers/lightnvm/pblk-core.c | 16 +- drivers/lightnvm/pblk-gc.c | 2 +- drivers/lightnvm/pblk-init.c | 117 +++++++------- drivers/lightnvm/pblk-read.c | 2 +- drivers/lightnvm/pblk-recovery.c | 14 +- drivers/lightnvm/pblk-rl.c | 2 +- drivers/lightnvm/pblk-sysfs.c | 35 ++-- drivers/lightnvm/pblk-write.c | 2 +- drivers/lightnvm/pblk.h | 83 ++++------ drivers/nvme/host/lightnvm.c | 337 +++++++++++++++++++++++---------------- include/linux/lightnvm.h | 196 +++++++++++------------ 12 files changed, 451 insertions(+), 425 deletions(-) commit 43d47127219de1dd674b917c1835baa14c4c1768 Author: Javier González Date: Fri Mar 30 00:05:09 2018 +0200 lightnvm: pblk: refactor init/exit sequences Refactor init and exit sequences to eliminate dependencies among init modules and improve readability. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 405 +++++++++++++++++++++---------------------- 1 file changed, 202 insertions(+), 203 deletions(-) commit 9d7aa4a484872cb2b4dc81bd6f058cb8351ca9ed Author: Heiner Litz Date: Fri Mar 30 00:05:08 2018 +0200 lightnvm: Avoid validation of default op value Fixes: 38401d231de65 ("lightnvm: set target over-provision on create ioctl") Signed-off-by: Heiner Litz Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 40f962d78a969e3b476451ebc82deffdee4309c2 Author: Johannes Thumshirn Date: Fri Mar 30 00:05:07 2018 +0200 lightnvm: centralize permission check for lightnvm ioctl Currently all functions for handling the lightnvm core ioctl commands do a check for CAP_SYS_ADMIN. Change this to fail early in nvm_ctl_ioctl(), so we don't have to duplicate the permission checks all over. Signed-off-by: Johannes Thumshirn Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) commit a38c78d82dd38ce178c994a777751fae61ae31c8 Author: Heiner Litz Date: Fri Mar 30 00:05:06 2018 +0200 lightnvm: fix bad block initialization fix reading bad block device information to correctly setup the per line blk_bitmap during lightnvm initialization Signed-off-by: Heiner Litz Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 96257a8a7f3183613550c41a909819e028372b61 Author: Matias Bjørling Date: Fri Mar 30 00:05:05 2018 +0200 nvme: lightnvm: add late setup of block size and metadata The nvme driver sets up the size of the nvme namespace in two steps. First it initializes the device with standard logical block and metadata sizes, and then sets the correct logical block and metadata size. Due to the OCSSD 2.0 specification relies on the namespace to expose these sizes for correct initialization, let it be updated appropriately on the LightNVM side as well. Signed-off-by: Matias Bjørling Acked-by: Keith Busch Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 3 --- drivers/nvme/host/core.c | 2 ++ drivers/nvme/host/lightnvm.c | 8 ++++++++ drivers/nvme/host/nvme.h | 2 ++ 4 files changed, 12 insertions(+), 3 deletions(-) commit 89a09c5643e01f5e5d3c5f2e720053473a60a90b Author: Matias Bjørling Date: Fri Mar 30 00:05:04 2018 +0200 lightnvm: remove nvm_dev_ops->max_phys_sect The value of max_phys_sect is always static. Instead of defining it in the nvm_dev_ops structure, declare it as a global value. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 28 +++++++--------------------- drivers/lightnvm/pblk-init.c | 9 ++++----- drivers/lightnvm/pblk-recovery.c | 8 ++------ drivers/nvme/host/lightnvm.c | 5 +---- include/linux/lightnvm.h | 5 ++--- 5 files changed, 16 insertions(+), 39 deletions(-) commit af569398c390810fca773c903a85b71dfd870bb0 Author: Matias Bjørling Date: Fri Mar 30 00:05:03 2018 +0200 lightnvm: remove max_rq_size The field is no longer used. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 1 - include/linux/lightnvm.h | 2 -- 2 files changed, 3 deletions(-) commit 62771fe0aa28b5d329f3e53a2e0f805f73433752 Author: Matias Bjørling Date: Fri Mar 30 00:05:02 2018 +0200 lightnvm: add 2.0 geometry identification Implement the geometry data structures for 2.0 and enable a drive to be identified as one, including exposing the appropriate 2.0 sysfs entries. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 8 +- drivers/nvme/host/lightnvm.c | 338 ++++++++++++++++++++++++++++++++++++------- include/linux/lightnvm.h | 11 +- 3 files changed, 299 insertions(+), 58 deletions(-) commit c6ac3f35d46b3c9999838dd13e7e113674f22ffa Author: Matias Bjørling Date: Fri Mar 30 00:05:01 2018 +0200 lightnvm: flatten nvm_id_group into nvm_id There are no groups in the 2.0 specification, make sure that the nvm_id structure is flattened before 2.0 data structures are added. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 25 +++++----- drivers/nvme/host/lightnvm.c | 106 +++++++++++++++++++++---------------------- include/linux/lightnvm.h | 53 +++++++++++----------- 3 files changed, 89 insertions(+), 95 deletions(-) commit a04e0cf93aee6b5e59e84ab66253f09eb71d621b Author: Matias Bjørling Date: Fri Mar 30 00:05:00 2018 +0200 lightnvm: make 1.2 data structures explicit Make the 1.2 data structures explicit, so it will be easy to identify the 2.0 data structures. Also fix the order of which the nvme_nvm_* are declared, such that they follow the nvme_nvm_command order. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 82 ++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 41 deletions(-) commit e411b33117d1967d2a5784ed32385e566a871d12 Author: Javier González Date: Fri Mar 30 00:04:59 2018 +0200 lightnvm: pblk: refactor bad block identification In preparation for the OCSSD 2.0 spec. bad block identification, refactor the current code to generalize bad block get/set functions and structures. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 3 - drivers/lightnvm/pblk-init.c | 209 ++++++++++++++++++++++--------------------- drivers/lightnvm/pblk.h | 6 -- 3 files changed, 109 insertions(+), 109 deletions(-) commit 3c05ef115c696392d9703be3fe014100ec77864d Author: Hans Holmberg Date: Fri Mar 30 00:04:58 2018 +0200 lightnvm: pblk: prevent race in pblk_rb_flush_point_set Make sure that we are not advancing the sync pointer while we're adding bios to the write buffer entry completion list. This race condition results in bios not completing and was identified by a hang when running xfstest generic/113. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-rb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b966c50b14de56cd73d40d3fa87b48bbab6e5c8a Author: Hans Holmberg Date: Fri Mar 30 00:04:57 2018 +0200 lightnvm: pblk: allow allocation of new lines during shutdown When shutting down pblk the write buffer is flushed and if the current line can't fit the data in the write buffer we need to allocate a new line, so remove the check that prevents this. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 7 ------- 1 file changed, 7 deletions(-) commit 7be970b2258654ca48bdf35d532b2eeef038fe91 Author: Hans Holmberg Date: Fri Mar 30 00:04:56 2018 +0200 lightnvm: pblk: delete writer kick timer before stopping thread Unless we delete the timer that wakes up the write thread before we stop the thread we risk re-starting the thread, so delete the timer first. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d149bfabeb889b7ee5cd6491bc6d2b5b20c4abd Author: Hans Holmberg Date: Fri Mar 30 00:04:55 2018 +0200 lightnvm: pblk: add padding distribution sysfs attribute When pblk receives a sync, all data up to that point in the write buffer must be comitted to persistent storage, and as flash memory comes with a minimal write size there is a significant cost involved both in terms of time for completing the sync and in terms of write amplification padded sectors for filling up to the minimal write size. In order to get a better understanding of the costs involved for syncs, Add a sysfs attribute to pblk: padded_dist, showing a normalized distribution of sectors padded. In order to facilitate measurements of specific workloads during the lifetime of the pblk instance, the distribution can be reset by writing 0 to the attribute. Do this by introducing counters for each possible padding: {0..(minimal write size - 1)} and calculate the normalized distribution when showing the attribute. Signed-off-by: Hans Holmberg Signed-off-by: Javier González Rearranged total_buckets statement in pblk_sysfs_get_padding_dist Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 16 +++++++- drivers/lightnvm/pblk-rb.c | 17 +++++---- drivers/lightnvm/pblk-sysfs.c | 87 ++++++++++++++++++++++++++++++++++++++++++- drivers/lightnvm/pblk.h | 6 ++- 4 files changed, 113 insertions(+), 13 deletions(-) commit ff12581ec702d6c4607f614107d4816c21c6be56 Author: Matias Bjørling Date: Fri Mar 30 00:04:54 2018 +0200 lightnvm: remove multiple groups in 1.2 data structure Only one id group from the 1.2 specification is supported. Make sure that only the first group is accessible. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d8a39caee02bf893e23ff26cbd10173ff2ba681f Author: Matias Bjørling Date: Fri Mar 30 00:04:53 2018 +0200 lightnvm: remove mlc pairs structure The known implementations of the 1.2 specification, and upcoming 2.0 implementation all expose a sequential list of pages to write. Remove the data structure, as it is no longer needed. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 76758390f83e5abc3bfc776d793480836d17120c Author: Hans Holmberg Date: Fri Mar 30 00:04:52 2018 +0200 lightnvm: pblk: export write amplification counters to sysfs In a SSD, write amplification, WA, is defined as the average number of page writes per user page write. Write amplification negatively affects write performance and decreases the lifetime of the disk, so it's a useful metric to add to sysfs. In plkb's case, the number of writes per user sector is the sum of: (1) number of user writes (2) number of sectors written by the garbage collector (3) number of sectors padded (i.e. due to syncs) This patch adds persistent counters for 1-3 and two sysfs attributes to export these along with WA calculated with five decimals: write_amp_mileage: the accumulated write amplification stats for the lifetime of the pblk instance write_amp_trip: resetable stats to facilitate delta measurements, values reset at creation and if 0 is written to the attribute. 64-bit counters are used as a 32 bit counter would wrap around already after about 17 TB worth of user data. It will take a long long time before the 64 bit sector counters wrap around. The counters are stored after the bad block bitmap in the first emeta sector of each written line. There is plenty of space in the first emeta sector, so we don't need to bump the major version of the line data format. Signed-off-by: Hans Holmberg Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-cache.c | 4 ++ drivers/lightnvm/pblk-core.c | 6 +++ drivers/lightnvm/pblk-init.c | 11 +++++- drivers/lightnvm/pblk-map.c | 2 + drivers/lightnvm/pblk-rb.c | 3 ++ drivers/lightnvm/pblk-recovery.c | 25 ++++++++++++ drivers/lightnvm/pblk-sysfs.c | 85 +++++++++++++++++++++++++++++++++++++++- drivers/lightnvm/pblk.h | 42 ++++++++++++++++---- 8 files changed, 168 insertions(+), 10 deletions(-) commit d0ab0b1ab991f48fc1fb579490df397d5f819913 Author: Hans Holmberg Date: Fri Mar 30 00:04:51 2018 +0200 lightnvm: pblk: check data lines version on recovery As a preparation for future bumps of data line persistent storage versions, we need to start checking the emeta line version during recovery. Also slit up the current emeta/smeta version into two bytes (major,minor). Recovering lines with the same major number as the current pblk data line version must succeed. This means that any changes in the persistent format must be: (1) Backward compatible: if we switch back to and older kernel, recovery of lines stored with major == current_major and minor > current_minor must succeed. (2) Forward compatible: switching to a newer kernel, recovery of lines stored with major=current_major and minor < minor must handle the data format differences gracefully(i.e. initialize new data structures to default values). If we detect lines that have a different major number than the current we must abort recovery. The user must manually migrate the data in this case. Previously the version stored in the emeta header was copied from smeta, which has version 1, so we need to set the minor version to 1. Signed-off-by: Hans Holmberg Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 9 ++++++++- drivers/lightnvm/pblk-recovery.c | 26 ++++++++++++++++++++++++-- drivers/lightnvm/pblk.h | 16 ++++++++++++++-- 3 files changed, 46 insertions(+), 5 deletions(-) commit cfe1c9e2e2a34ccaf2ba01d2c435d65207335ca1 Author: Hans Holmberg Date: Fri Mar 30 00:04:50 2018 +0200 lightnvm: pblk: handle bad sectors in the emeta area correctly Unless we check if there are bad sectors in the entire emeta-area we risk ending up with valid bitmap / available sector count inconsistency. This results in lines with a bad chunk at the last LUN marked as bad, so go through the whole emeta area and mark up the invalid sectors. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 8f37d1913f096b530242f7815ac0be3c20888ef9 Author: Matias Bjørling Date: Fri Mar 30 00:04:49 2018 +0200 lightnvm: remove chnl_offset in nvme_nvm_identity The identity structure is initialized to zero in the beginning of the nvme_nvm_identity function. The chnl_offset is separately set to zero. Since both the variable and assignment is never changed, remove them. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5da84cf6037690835c7b1ea91b4158ed768df712 Author: Markus Elfring Date: Fri Mar 30 00:04:48 2018 +0200 lightnvm/pblk-gc: Delete an error message for a failed memory allocation in pblk_gc_line_prepare_ws() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-gc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1379ef828a18d8f81c526b25e4d5685caa2cfd65 Merge: 2252743 2e3f6c5 Author: Daniel Borkmann Date: Fri Mar 30 00:09:44 2018 +0200 Merge branch 'bpf-sockmap-ingress' John Fastabend says: ==================== This series adds the BPF_F_INGRESS flag support to the redirect APIs. Bringing the sockmap API in-line with the cls_bpf redirect APIs. We add it to both variants of sockmap programs, the first patch adds support for tx ulp hooks and the third patch adds support for the recv skb hooks. Patches two and four add tests for the corresponding ingress redirect hooks. Follow on patches can address busy polling support, but next series from me will move the sockmap sample program into selftests. v2: added static to function definition caught by kbuild bot v3: fixed an error branch with missing mem_uncharge in recvmsg op moved receive_queue check outside of RCU region ==================== Signed-off-by: Daniel Borkmann commit 2e3f6c5ff253b545b3916300d02871fcc101d4a7 Author: John Fastabend Date: Wed Mar 28 12:49:30 2018 -0700 bpf: sockmap, more BPF_SK_SKB_STREAM_VERDICT tests Add BPF_SK_SKB_STREAM_VERDICT tests for ingress hook. While we do this also bring stream tests in-line with MSG based testing. A map for skb options is added for userland to push options at BPF programs. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann samples/sockmap/sockmap_kern.c | 21 ++++++++++++++++++--- samples/sockmap/sockmap_test.sh | 20 +++++++++++++++++++- samples/sockmap/sockmap_user.c | 23 +++++++++++++++++++++++ 3 files changed, 60 insertions(+), 4 deletions(-) commit fa246693a111fab32bd51d20f07a347e42773ee9 Author: John Fastabend Date: Wed Mar 28 12:49:25 2018 -0700 bpf: sockmap, BPF_F_INGRESS flag for BPF_SK_SKB_STREAM_VERDICT: Add support for the BPF_F_INGRESS flag in skb redirect helper. To do this convert skb into a scatterlist and push into ingress queue. This is the same logic that is used in the sk_msg redirect helper so it should feel familiar. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann include/linux/filter.h | 1 + kernel/bpf/sockmap.c | 94 ++++++++++++++++++++++++++++++++++++++++---------- net/core/filter.c | 2 +- 3 files changed, 78 insertions(+), 19 deletions(-) commit 2596f64cb2ff5767166bee4e812734747c7a0474 Author: John Fastabend Date: Wed Mar 28 12:49:20 2018 -0700 bpf: sockmap, add BPF_F_INGRESS tests Add a set of tests to verify ingress flag in redirect helpers works correctly with various msg sizes. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann samples/sockmap/sockmap_kern.c | 41 +++++++++++++++++++++++++++++++---------- samples/sockmap/sockmap_test.sh | 22 +++++++++++++++++++++- samples/sockmap/sockmap_user.c | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 11 deletions(-) commit 8934ce2fd08171e8605f7fada91ee7619fe17ab8 Author: John Fastabend Date: Wed Mar 28 12:49:15 2018 -0700 bpf: sockmap redirect ingress support Add support for the BPF_F_INGRESS flag in sk_msg redirect helper. To do this add a scatterlist ring for receiving socks to check before calling into regular recvmsg call path. Additionally, because the poll wakeup logic only checked the skb recv queue we need to add a hook in TCP stack (similar to write side) so that we have a way to wake up polling socks when a scatterlist is redirected to that sock. After this all that is needed is for the redirect helper to push the scatterlist into the psock receive queue. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann include/linux/filter.h | 1 + include/net/sock.h | 1 + kernel/bpf/sockmap.c | 198 ++++++++++++++++++++++++++++++++++++++++++++++++- net/core/filter.c | 2 +- net/ipv4/tcp.c | 10 ++- 5 files changed, 207 insertions(+), 5 deletions(-) commit 44016b3466407ff2766aeccb0ef2adca677c5106 Author: Bharat Potnuri Date: Thu Mar 29 17:10:13 2018 +0530 iw_cxgb4: print mapped ports correctly c4iw_ep_common structure holds the mapped addresses, so while printing them, use appropriate pointers. Fixes: bab572f1d ("iw_cxgb4: Guard against null cm_id in dump_ep/qp") Signed-off-by: Potnuri Bharat Teja Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb4/device.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 86afad7d87f535ebb1a0e978bc32a8c58ac99268 Author: Martin Kepplinger Date: Tue Mar 27 14:59:50 2018 +0200 Documentation/process: update FUSE project website According to the old project site, https://sourceforge.net/projects/fuse/ the project has moved to https://github.com/libfuse/ so we update the link to point to the latest libfuse release. Signed-off-by: Martin Kepplinger Signed-off-by: Jonathan Corbet Documentation/process/changes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d404d57955a6f67365423f9d0b89ad1881799087 Author: Mauro Carvalho Chehab Date: Thu Mar 29 10:58:59 2018 -0400 docs: kernel-doc: fix parsing of arrays The logic with parses array has a bug that prevents it to parse arrays like: struct { ... struct { u64 msdu[IEEE80211_NUM_TIDS + 1]; ... ... Fix the parser to accept it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18845557fd6fc1998f2d0d8c30467f86db587529 Merge: e15f20e 14c9994 Author: David S. Miller Date: Thu Mar 29 16:24:06 2018 -0400 Merge tag 'wireless-drivers-next-for-davem-2018-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.17 Smaller new features to various drivers but nothing really out of ordinary. Major changes: ath10k * enable chip temperature measurement for QCA6174/QCA9377 * add firmware memory dump for QCA9984 * enable buffer STA on TDLS link for QCA6174 * support different beacon internals in multiple interface scenario for QCA988X/QCA99X0/QCA9984/QCA4019 iwlwifi * support for new PCI IDs for the 9000 family * support for a new firmware API version * support for advanced dwell and Optimized Connectivity Experience (OCE) in scanning btrsi * fix kconfig dependencies wil6210 * support multiple virtual interfaces ==================== Signed-off-by: David S. Miller commit e15f20ea33b8e5074145abe464b4b48acea505d9 Merge: e3e67a4 c470bdc Author: David S. Miller Date: Thu Mar 29 16:23:26 2018 -0400 Merge tag 'mac80211-next-for-davem-2018-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== We have a fair number of patches, but many of them are from the first bullet here: * EAPoL-over-nl80211 from Denis - this will let us fix some long-standing issues with bridging, races with encryption and more * DFS offload support from the qtnfmac folks * regulatory database changes for the new ETSI adaptivity requirements * various other fixes and small enhancements ==================== Signed-off-by: David S. Miller commit e40238dedb484c8a19f8257e4ef5d77d038f9ad8 Author: Anton Ivanov Date: Mon Mar 5 13:29:05 2018 +0000 Fix vector raw inintialization logic Vector RAW in UML needs to BPF filter its own MAC only if QDISC_BYPASS has failed. If QDISC_BYPASS is successful, the frames originated locally are not visible to readers on the raw socket. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger arch/um/drivers/vector_kern.c | 7 ++++++- arch/um/drivers/vector_kern.h | 1 + arch/um/drivers/vector_user.c | 22 +++++++++++++--------- arch/um/drivers/vector_user.h | 1 + 4 files changed, 21 insertions(+), 10 deletions(-) commit ce471fdbc6173eed5af52df3dca179a509f483d9 Author: Anton Ivanov Date: Mon Mar 5 10:41:42 2018 +0000 Migrate vector timers to new timer API The patches for the UML vector drivers were in-flight when the timer changes happened and were not covered by them. This change migrates vector_kern.c to use the new timer API. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger arch/um/drivers/vector_kern.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 530ba6c7cb3c22435a4d26de47037bb6f86a5329 Author: Jason A. Donenfeld Date: Thu Dec 14 03:23:37 2017 +0100 um: Compile with modern headers Recent libcs have gotten a bit more strict, so we actually need to include the right headers and use the right types. This enables UML to compile again. Signed-off-by: Jason A. Donenfeld Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger arch/um/os-Linux/file.c | 1 + arch/um/os-Linux/signal.c | 1 + arch/x86/um/stub_segv.c | 1 + 3 files changed, 3 insertions(+) commit 218b9e3eb8b53785a98dfa2e4b7c700103085d33 Author: Parav Pandit Date: Thu Mar 29 13:26:33 2018 +0300 RDMA/cma: Move rdma_cm_state to cma_priv.h rdma_cm_state enum is internal to rdma_cm kernel module. It is not required to expose state enums to ULP modules. So lets keep its scope limited to rdma_cm module in cma_priv.h file. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cma_priv.h | 14 ++++++++++++++ include/rdma/rdma_cm.h | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) commit fd59015d68ee5bb0397a13cc02dbce9525f7c593 Author: Parav Pandit Date: Thu Mar 29 13:26:32 2018 +0300 IB/addr: Constify dst_entry pointer Make dst_entry pointer as const struct dst_entry* to improve code readablity to make sure that dst structure fields are not modified by various functions which are using it. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/addr.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 8cd1b5bd70cccda6854088825e725a513ec919c6 Author: Lukas Wunner Date: Thu Mar 29 21:35:54 2018 +0200 ALSA: hda - Silence PM ops build warning The system sleep PM ops azx_suspend() and azx_resume() were previously called by vga_switcheroo, but commit 07f4f97d7b4b ("vga_switcheroo: Use device link for HDA controller") removed their invocation. Unfortunately the commit neglected to update the #ifdef surrounding the two functions, so if CONFIG_PM_SLEEP is *not* enabled but all three of CONFIG_PM, CONFIG_VGA_SWITCHEROO and CONFIG_SND_HDA_CODEC_HDMI *are* enabled, the compiler now emits the following warning: sound/pci/hda/hda_intel.c:1024:12: warning: 'azx_resume' defined but not used [-Wunused-function] static int azx_resume(struct device *dev) ^~~~~~~~~~ sound/pci/hda/hda_intel.c:989:12: warning: 'azx_suspend' defined but not used [-Wunused-function] static int azx_suspend(struct device *dev) ^~~~~~~~~~~ Silence by updating the #ifdef. Because the #ifdef block now uses the same condition as the one immediately succeeding it, the two blocks can be collapsed together, shaving off another two lines. Fixes: 07f4f97d7b4b ("vga_switcheroo: Use device link for HDA controller") Reviewed-by: Takashi Iwai Reported-by: Arnd Bergmann Signed-off-by: Lukas Wunner Link: https://patchwork.kernel.org/patch/10313441/ Link: https://patchwork.freedesktop.org/patch/msgid/b8e70e34a9acbd4f0a1a6c7673cea96888ae9503.1522323444.git.lukas@wunner.de sound/pci/hda/hda_intel.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6f57c933a49afb30d987f0ba7db4f52452f7d638 Author: Jason Gunthorpe Date: Tue Mar 27 14:18:47 2018 -0600 RDMA: Use u64_to_user_ptr everywhere This is already used in many places, get the rest of them too, only to make the code a bit clearer & simpler. Signed-off-by: Jason Gunthorpe drivers/infiniband/core/ucm.c | 18 +++++++++--------- drivers/infiniband/core/ucma.c | 20 ++++++++++---------- drivers/infiniband/core/uverbs_cmd.c | 2 +- drivers/infiniband/hw/hfi1/user_exp_rcv.c | 4 ++-- drivers/infiniband/hw/qib/qib_diag.c | 2 +- drivers/infiniband/hw/qib/qib_file_ops.c | 8 ++++---- 6 files changed, 27 insertions(+), 27 deletions(-) commit 5b2cc79de8782ea98ef22cddb26fcd566c565094 Author: Leon Romanovsky Date: Tue Mar 27 20:40:49 2018 +0300 RDMA/nldev: Provide netdevice name and index Export the net device name and index to easily find connection between IB devices and relevant net devices. We also updated the comment regarding the devices without FW. Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise Signed-off-by: Jason Gunthorpe drivers/infiniband/core/nldev.c | 31 ++++++++++++++++++++++++++----- include/uapi/rdma/rdma_netlink.h | 13 +++++++++++++ 2 files changed, 39 insertions(+), 5 deletions(-) commit 99dae690255e90f5cbefcc76ad92b35cdf87d14d Author: Zhu Yanjun Date: Wed Mar 21 04:08:37 2018 -0400 IB/rxe: optimize mcast recv process In mcast recv process, the function skb_clone is used. In fact, the refcount can be increased to replace cloning a new skb since the original skb will not be modified before it is freed. This can make the performance better and save the memory. CC: Srinivas Eeda CC: Junxiao Bi Signed-off-by: Zhu Yanjun Reviewed-by: Yuval Shaia Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_recv.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit a343e3f89e365a598ab4061fd2bc9ed5daf1905d Author: Colin Ian King Date: Thu Mar 29 13:11:07 2018 +0100 qedr: Fix spelling mistake: "hanlde" -> "handle" Trivial fix to spelling mistake in DP_ERR message text Signed-off-by: Colin Ian King Reviewed-by: Shamir Rabinovitch Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/qedr/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cbd4a5bcb25b5ed0c1c64bc969b893cad9b78acc Author: Al Viro Date: Thu Mar 29 15:08:21 2018 -0400 d_genocide: move export to definition Signed-off-by: Al Viro fs/dcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 42177007aa277af3e37bf2ae3efdfe795c81d700 Author: Al Viro Date: Sun Mar 11 15:15:46 2018 -0400 fold dentry_lock_for_move() into its sole caller and clean it up Signed-off-by: Al Viro fs/dcache.c | 49 +++++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 26 deletions(-) commit 076515fc926793e162fc6525bed1679ef2bbf269 Author: Al Viro Date: Sat Mar 10 23:15:52 2018 -0500 make non-exchanging __d_move() copy ->d_parent rather than swap them Currently d_move(from, to) does the following: * name/parent of from <- old name/parent of to, from hashed there * to is unhashed * name of to is preserved * if from used to be detached, to gets detached * if from used to be attached, parent of to <- old parent of from. That's both user-visibly bogus and complicates reasoning a lot. Much saner semantics would be * name/parent of from <- name/parent of to, from hashed there. * to is unhashed * name/parent of to is unchanged. The price, of course, is that old parent of from might lose a reference. However, * all potentially cross-directory callers of d_move() have both parents pinned directly; typically, dentries themselves are grabbed only after we have grabbed and locked both parents. IOW, the decrement of old parent's refcount in case of d_move() won't reach zero. * __d_move() from d_splice_alias() is done to detached alias. No refcount decrements in that case * __d_move() from __d_unalias() *can* get the refcount to zero. So let's grab a reference to alias' old parent before calling __d_unalias() and dput() it after we'd dropped rename_lock. That does make d_splice_alias() potentially blocking. However, it has no callers in non-sleepable contexts (and the case where we'd grown that dget/dput pair is _very_ rare, so performance is not an issue). Another thing that needs adjustment is unlocking in the end of __d_move(); folded it in. And cleaned the remnants of bogus ordering from the "lock them in the beginning" counterpart - it's never been right and now (well, for 7 years now) we have that thing always serialized on rename_lock anyway. Signed-off-by: Al Viro fs/dcache.c | 93 ++++++++++++++++++++----------------------------------------- 1 file changed, 30 insertions(+), 63 deletions(-) commit a7498968338da9b928f5d8054acc8be6ed2bc14c Author: Al Viro Date: Sat Mar 10 16:40:33 2018 -0500 oprofilefs: don't oops on allocation failure ... just short-circuit the creation of potential children Signed-off-by: Al Viro drivers/oprofile/oprofilefs.c | 3 +++ 1 file changed, 3 insertions(+) commit 5bf1ddf7ee0e23598a620ef9ea2b0f00e804859d Author: Al Viro Date: Fri Mar 9 18:06:03 2018 -0500 lustre: get rid of pointless casts to struct dentry * ... when feeding const struct dentry * to primitives taking exactly that. Signed-off-by: Al Viro drivers/staging/lustre/lustre/llite/dcache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cd1c0c9321999737073dcfc3364e194e02604bce Author: Al Viro Date: Thu Mar 8 11:01:22 2018 -0500 debugfs_lookup(): switch to lookup_one_len_unlocked() Signed-off-by: Al Viro fs/debugfs/inode.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a03ece5ff2bd7a9abaa0e8ddfe5f79d79e5984c8 Author: Al Viro Date: Thu Mar 8 11:00:45 2018 -0500 fold lookup_real() into __lookup_hash() Signed-off-by: Al Viro fs/namei.c | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) commit 903ddaf49329076862d65f7284d825759ff67bd6 Author: Al Viro Date: Wed Mar 7 12:47:04 2018 -0500 take out orphan externs (empty_string/slash_string) Signed-off-by: Al Viro include/linux/dcache.h | 2 -- 1 file changed, 2 deletions(-) commit 7a5cf791a747640adb2a1b5e3838321b26953a23 Author: Al Viro Date: Mon Mar 5 19:15:50 2018 -0500 split d_path() and friends into a separate file Those parts of fs/dcache.c are pretty much self-contained. Signed-off-by: Al Viro fs/Makefile | 2 +- fs/d_path.c | 470 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/dcache.c | 467 +---------------------------------------------------------- 3 files changed, 472 insertions(+), 467 deletions(-) commit 43986d63b60fd0152d9038ee3f0f9294efa8c983 Author: Al Viro Date: Sun Feb 25 02:47:29 2018 -0500 dcache.c: trim includes Signed-off-by: Al Viro fs/dcache.c | 3 --- 1 file changed, 3 deletions(-) commit 8f04da2adbdffed8dc4b2feb00ec3b3d84683885 Author: John Ogness Date: Fri Feb 23 00:50:24 2018 +0100 fs/dcache: Avoid a try_lock loop in shrink_dentry_list() shrink_dentry_list() holds dentry->d_lock and needs to acquire dentry->d_inode->i_lock. This cannot be done with a spin_lock() operation because it's the reverse of the regular lock order. To avoid ABBA deadlocks it is done with a trylock loop. Trylock loops are problematic in two scenarios: 1) PREEMPT_RT converts spinlocks to 'sleeping' spinlocks, which are preemptible. As a consequence the i_lock holder can be preempted by a higher priority task. If that task executes the trylock loop it will do so forever and live lock. 2) In virtual machines trylock loops are problematic as well. The VCPU on which the i_lock holder runs can be scheduled out and a task on a different VCPU can loop for a whole time slice. In the worst case this can lead to starvation. Commits 47be61845c77 ("fs/dcache.c: avoid soft-lockup in dput()") and 046b961b45f9 ("shrink_dentry_list(): take parent's d_lock earlier") are addressing exactly those symptoms. Avoid the trylock loop by using dentry_kill(). When pruning ancestors, the same code applies that is used to kill a dentry in dput(). This also has the benefit that the locking order is now the same. First the inode is locked, then the parent. Signed-off-by: John Ogness Signed-off-by: Al Viro fs/dcache.c | 41 ++++++++++------------------------------- 1 file changed, 10 insertions(+), 31 deletions(-) commit f657a666fd1b1b9fe59963943c74c245ae66f4cc Author: Al Viro Date: Fri Feb 23 21:25:42 2018 -0500 get rid of trylock loop around dentry_kill() In case when trylock in there fails, deal with it directly in dentry_kill(). Note that in cases when we drop and retake ->d_lock, we need to recheck whether to retain the dentry. Another thing is that dropping/retaking ->d_lock might have ended up with negative dentry turning into positive; that, of course, can happen only once... Signed-off-by: Al Viro fs/dcache.c | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) commit 62d9956cefe6ecc4b43a7fae37af78ba7adaceaa Author: Al Viro Date: Tue Mar 6 21:37:31 2018 -0500 handle move to LRU in retain_dentry() Signed-off-by: Al Viro fs/dcache.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit a338579f2f3d6a15c78f1dc7de4c248b4183fcea Author: Al Viro Date: Fri Feb 23 21:07:24 2018 -0500 dput(): consolidate the "do we need to retain it?" into an inlined helper Signed-off-by: Al Viro fs/dcache.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit 8b987a46a1e0e93d4cb4babea06ea274e2e2b658 Author: Al Viro Date: Fri Feb 23 22:11:34 2018 -0500 split the slow part of lock_parent() off Turn the "trylock failed" part into uninlined __lock_parent(). Signed-off-by: Al Viro fs/dcache.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 65d8eb5a8f5480756105173de147ef5d60163e2f Author: Al Viro Date: Fri Feb 23 22:07:35 2018 -0500 now lock_parent() can't run into killed dentry all remaining callers hold either a reference or ->i_lock Signed-off-by: Al Viro fs/dcache.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 3b3f09f48ba78c0634e929849860a6447d057eed Author: Al Viro Date: Fri Feb 23 21:54:18 2018 -0500 get rid of trylock loop in locking dentries on shrink list In case of trylock failure don't re-add to the list - drop the locks and carefully get them in the right order. For shrink_dentry_list(), somebody having grabbed a reference to dentry means that we can kick it off-list, so if we find dentry being modified under us we don't need to play silly buggers with retries anyway - off the list it is. The locking logics taken out into a helper of its own; lock_parent() is no longer used for dentries that can be killed under us. [fix from Eric Biggers folded] Signed-off-by: Al Viro fs/dcache.c | 104 +++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 67 insertions(+), 37 deletions(-) commit e3e67a4f07433d0159dcbd2abe7d6bdf6e1268c8 Merge: 7ae665f 7f20d83 Author: David S. Miller Date: Thu Mar 29 15:04:22 2018 -0400 Merge branch 'dsa-Add-ATU-VTU-statistics' Andrew Lunn says: ==================== Add ATU/VTU statistics Previous patches have added basic support for Address Translation Unit and VLAN translation Unit violation interrupts. Add statistics counters for when these occur, which can be accessed using ethtool. Downgrade one of the particularly spammy warnings from VTU violations to debug only, now that we have a counter for it. ==================== Signed-off-by: David S. Miller commit 7f20d834ea14346c0abef63525ee40a7d2ba0de7 Author: Andrew Lunn Date: Wed Mar 28 23:50:29 2018 +0200 net: dsa: mv88e6xxx: Make VTU miss violations less spammy VTU miss violations can happen under normal conditions. Don't spam the kernel log, downgrade the output to debug level only. The statistics counter will indicate it is happening, if anybody not debugging is interested. Signed-off-by: Andrew Lunn Reported-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global1_vtu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 65f60e4582bd321f4df1433a22f717f18e60f721 Author: Andrew Lunn Date: Wed Mar 28 23:50:28 2018 +0200 net: dsa: mv88e6xxx: Keep ATU/VTU violation statistics Count the numbers of various ATU and VTU violation statistics and return them as part of the ethtool -S statistics. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 50 ++++++++++++++++++++++++++++----- drivers/net/dsa/mv88e6xxx/chip.h | 13 ++++++--- drivers/net/dsa/mv88e6xxx/global1_atu.c | 12 +++++--- drivers/net/dsa/mv88e6xxx/global1_vtu.c | 8 ++++-- drivers/net/dsa/mv88e6xxx/serdes.c | 15 ++++++---- drivers/net/dsa/mv88e6xxx/serdes.h | 8 +++--- 6 files changed, 78 insertions(+), 28 deletions(-) commit 7ae665f132a62e67ccef1ef0994acba51abc2400 Author: Arnd Bergmann Date: Wed Mar 28 16:14:56 2018 +0200 sctp: fix unused lable warning The proc file cleanup left a label possibly unused: net/sctp/protocol.c: In function 'sctp_defaults_init': net/sctp/protocol.c:1304:1: error: label 'err_init_proc' defined but not used [-Werror=unused-label] This adds an #ifdef around it to match the respective 'goto'. Fixes: d47d08c8ca05 ("sctp: use proc_remove_subtree()") Signed-off-by: Arnd Bergmann Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/protocol.c | 2 ++ 1 file changed, 2 insertions(+) commit 75498aa1aff5dfed0124557dfa0b6b2906b14fa6 Author: Wei Yongjun Date: Wed Mar 28 12:51:55 2018 +0000 net: cavium: use module_pci_driver to simplify the code Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/cavium/common/cavium_ptp.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 335ab8ba617ec5bdc0c1595aae875304277e2495 Author: Wei Yongjun Date: Wed Mar 28 12:51:19 2018 +0000 net: bcmgenet: return NULL instead of plain integer Fixes the following sparse warning: drivers/net/ethernet/broadcom/genet/bcmgenet.c:1351:16: warning: Using plain integer as NULL pointer Signed-off-by: Wei Yongjun Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99fe29d3a25f813146816b322367b4c6a0fdec84 Author: Dan Carpenter Date: Wed Mar 28 14:48:36 2018 +0300 test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment() The skb_segment() function returns error pointers on error. It never returns NULL. Fixes: 76db8087c4c9 ("net: bpf: add a test for skb_segment in test_bpf module") Signed-off-by: Dan Carpenter Acked-by: Daniel Borkmann Reviewed-by: Yonghong Song Signed-off-by: David S. Miller lib/test_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce3fd194fcc6fbdc00ce095a852f22df97baa401 Author: Eric Biggers Date: Thu Mar 29 14:31:42 2018 -0400 ext4: limit xattr size to INT_MAX ext4 isn't validating the sizes of xattrs where the value of the xattr is stored in an external inode. This is problematic because ->e_value_size is a u32, but ext4_xattr_get() returns an int. A very large size is misinterpreted as an error code, which ext4_get_acl() translates into a bogus ERR_PTR() for which IS_ERR() returns false, causing a crash. Fix this by validating that all xattrs are <= INT_MAX bytes. This issue has been assigned CVE-2018-1095. https://bugzilla.kernel.org/show_bug.cgi?id=199185 https://bugzilla.redhat.com/show_bug.cgi?id=1560793 Reported-by: Wen Xu Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org Fixes: e50e5129f384 ("ext4: xattr-in-inode support") fs/ext4/xattr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 981f1f803516666d3e02f1d707a7f4b0ebf41967 Author: Russell King Date: Wed Mar 28 11:18:25 2018 +0100 sfp: allow cotsworks modules Cotsworks modules fail the checksums - it appears that Cotsworks reprograms the EEPROM at the end of production with the final product information (serial, date code, and exact part number for module options) and fails to update the checksum. Work around this by detecting the Cotsworks name in the manufacturer field, and reducing the checksum failures to warnings rather than a hard error. Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/sfp.c | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) commit 5593e3340f32f43eede742a96cbf9603fbe6003b Merge: 50bc60c ccfa110 Author: David S. Miller Date: Thu Mar 29 14:29:56 2018 -0400 Merge branch 'qed-flash-upgrade-support' Sudarsana Reddy Kalluru says: ==================== qed*: Flash upgrade support. The patch series adds adapter flash upgrade support for qed/qede drivers. Please consider applying it to net-next branch. ==================== Signed-off-by: David S. Miller commit ccfa110cfecd1a200dc302aedbbda859fb237a09 Author: Sudarsana Reddy Kalluru Date: Wed Mar 28 05:14:23 2018 -0700 qede: Ethtool flash update support. The patch adds ethtool callback implementation for flash update. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3a69cae80cdd1b5c8b23137cba2a80ecfec4cef5 Author: Sudarsana Reddy Kalluru Date: Wed Mar 28 05:14:22 2018 -0700 qed: Adapter flash update support. This patch adds the required driver support for updating the flash or non volatile memory of the adapter. At highlevel, flash upgrade comprises of reading the flash images from the input file, validating the images and writing them to the respective paritions. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 338 +++++++++++++++++++++++++++++ include/linux/qed/qed_if.h | 19 ++ 2 files changed, 357 insertions(+) commit 62e4d4386a954eb071ecd4a72105ea222157f11d Author: Sudarsana Reddy Kalluru Date: Wed Mar 28 05:14:21 2018 -0700 qed: Add APIs for flash access. This patch adds APIs for flash access. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 7 ++ drivers/net/ethernet/qlogic/qed/qed_hsi.h | 7 +- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 121 ++++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_mcp.h | 34 +++++++++ 4 files changed, 168 insertions(+), 1 deletion(-) commit d8bf47af24a28d90bbcd5d58d6dc6c5a40f4f91a Author: Sudarsana Reddy Kalluru Date: Wed Mar 28 05:14:20 2018 -0700 qed: Fix PTT entry leak in the selftest error flow. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_selftest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 43645ce03e0063d7c4a5001215ca815188778881 Author: Sudarsana Reddy Kalluru Date: Wed Mar 28 05:14:19 2018 -0700 qed: Populate nvm image attribute shadow. This patch adds support for populating the flash image attributes. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 8 +++ drivers/net/ethernet/qlogic/qed/qed_dev.c | 24 ++++++- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 98 +++++++++++++++++++------- drivers/net/ethernet/qlogic/qed/qed_mcp.h | 22 ++++-- drivers/net/ethernet/qlogic/qed/qed_selftest.c | 6 +- 5 files changed, 120 insertions(+), 38 deletions(-) commit 27aa8962817afdf7754e719a8a072584a747aff3 Merge: f497b6c 31c8b0d Author: Radim Krčmář Date: Thu Mar 29 20:20:13 2018 +0200 Merge tag 'kvm-ppc-next-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc KVM PPC update for 4.17 - Improvements for the radix page fault handler for HV KVM on POWER9. commit 50bc60cb155c813157fdca5b3b05194cd325d3e9 Author: Michal Kalderon Date: Wed Mar 28 11:42:16 2018 +0300 qed*: Utilize FW 8.33.11.0 This FW contains several fixes and features RDMA Features - SRQ support - XRC support - Memory window support - RDMA low latency queue support - RDMA bonding support RDMA bug fixes - RDMA remote invalidate during retransmit fix - iWARP MPA connect interop issue with RTR fix - iWARP Legacy DPM support - Fix MPA reject flow - iWARP error handling - RQ WQE validation checks MISC - Fix some HSI types endianity - New Restriction: vlan insertion in core_tx_bd_data can't be set for LB packets ETH - HW QoS offload support - Fix vlan, dcb and sriov flow of VF sending a packet with inband VLAN tag instead of default VLAN - Allow GRE version 1 offloads in RX flow - Allow VXLAN steering iSCSI / FcoE - Fix bd availability checking flow - Support 256th sge proerly in iscsi/fcoe retransmit - Performance improvement - Fix handle iSCSI command arrival with AHS and with immediate - Fix ipv6 traffic class configuration DEBUG - Update debug utilities Signed-off-by: Michal Kalderon Signed-off-by: Tomer Tayar Signed-off-by: Manish Rangankar Signed-off-by: Ariel Elior Acked-by: Jason Gunthorpe Signed-off-by: David S. Miller drivers/infiniband/hw/qedr/qedr_hsi_rdma.h | 4 +- drivers/infiniband/hw/qedr/verbs.c | 4 +- drivers/net/ethernet/qlogic/qed/qed_debug.c | 415 +++-- drivers/net/ethernet/qlogic/qed/qed_dev.c | 4 +- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 1892 ++++++++++---------- .../net/ethernet/qlogic/qed/qed_init_fw_funcs.c | 103 +- drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 7 - drivers/net/ethernet/qlogic/qed/qed_l2.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 13 - include/linux/qed/common_hsi.h | 2 +- include/linux/qed/eth_common.h | 2 +- include/linux/qed/iscsi_common.h | 4 +- include/linux/qed/rdma_common.h | 2 + include/linux/qed/roce_common.h | 3 + 14 files changed, 1310 insertions(+), 1147 deletions(-) commit 18dcbe12fe9fca0ab825f7eff993060525ac2503 Author: Eric Dumazet Date: Tue Mar 27 19:49:42 2018 -0700 ipv6: export ip6 fragments sysctl to unprivileged users IPv4 was changed in commit 52a773d645e9 ("net: Export ip fragment sysctl to unprivileged users") The only sysctl that is not per-netns is not used : ip6frag_secret_interval Signed-off-by: Eric Dumazet Cc: Nikolay Borisov Signed-off-by: David S. Miller net/ipv6/reassembly.c | 4 ---- 1 file changed, 4 deletions(-) commit 697fefc7c1531f75ecd9623a4a4cbd47fab32ca8 Author: Intiyaz Basha Date: Tue Mar 27 19:25:18 2018 -0700 liquidio: Prioritize control messages During heavy tx traffic, control messages (sent by liquidio driver to NIC firmware) sometimes do not get processed in a timely manner. Reason is: the low-level metadata of control messages and that of egress network packets indicate that they have the same priority. Fix it by setting a higher priority for control messages through the new ctrl_qpg field in the oct_txpciq struct. It is the NIC firmware that does the actual setting of priority by writing to the new ctrl_qpg field; the host driver treats that value as opaque and just assigns it to pki_ih3->qpg Signed-off-by: Intiyaz Basha Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/liquidio_common.h | 8 ++++++-- drivers/net/ethernet/cavium/liquidio/request_manager.c | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) commit b349e0b5ec5d7be57ac243fb08ae8b994c928165 Merge: 6e2135c 37923ed Author: David S. Miller Date: Thu Mar 29 14:10:31 2018 -0400 Merge branch 'net-Allow-FIB-notifiers-to-fail-add-and-replace' David Ahern says: ==================== net: Allow FIB notifiers to fail add and replace I wanted to revisit how resource overload is handled for hardware offload of FIB entries and rules. At the moment, the in-kernel fib notifier can tell a driver about a route or rule add, replace, and delete, but the notifier can not affect the action. Specifically, in the case of mlxsw if a route or rule add is going to overflow the ASIC resources the only recourse is to abort hardware offload. Aborting offload is akin to taking down the switch as the path from data plane to the control plane simply can not support the traffic bandwidth of the front panel ports. Further, the current state of FIB notifiers is inconsistent with other resources where a driver can affect a user request - e.g., enslavement of a port into a bridge or a VRF. As a result of the work done over the past 3+ years, I believe we are at a point where we can bring consistency to the stack and offloads, and reliably allow the FIB notifiers to fail a request, pushing an error along with a suitable error message back to the user. Rather than aborting offload when the switch is out of resources, userspace is simply prevented from adding more routes and has a clear indication of why. This set does not resolve the corner case where rules or routes not supported by the device are installed prior to the driver getting loaded and registering for FIB notifications. In that case, hardware offload has not been established and it can refuse to offload anything, sending errors back to userspace via extack. Since conceptually the driver owns the netdevices associated with its asic, this corner case mainly applies to unsupported rules and any races during the bringup phase. Patch 1 fixes call_fib_notifiers to extract the errno from the encoded response from handlers. Patches 2-5 allow the call to call_fib_notifiers to fail the add or replace of a route or rule. Patch 6 adds a simple resource controller to netdevsim to illustrate how a FIB resource controller can limit the number of route entries. Changes since RFC - correct return code for call_fib_notifier - dropped patch 6 exporting devlink symbols - limited example resource controller to init_net only - updated Kconfig for netdevsim to use MAY_USE_DEVLINK - updated cover letter regarding startup case noted by Ido ==================== Signed-off-by: David S. Miller commit 37923ed6b8cea94d7d76038e2f72c57a0b45daab Author: David Ahern Date: Tue Mar 27 18:22:00 2018 -0700 netdevsim: Add simple FIB resource controller via devlink Add devlink support to netdevsim and use it to implement a simple, profile based resource controller. Only one controller is needed per namespace, so the first netdevsim netdevice in a namespace registers with devlink. If that device is deleted, the resource settings are deleted. The resource controller allows a user to limit the number of IPv4 and IPv6 FIB entries and FIB rules. The resource paths are: /IPv4 /IPv4/fib /IPv4/fib-rules /IPv6 /IPv6/fib /IPv6/fib-rules The IPv4 and IPv6 top level resources are unlimited in size and can not be changed. From there, the number of FIB entries and FIB rule entries are unlimited by default. A user can specify a limit for the fib and fib-rules resources: $ devlink resource set netdevsim/netdevsim0 path /IPv4/fib size 96 $ devlink resource set netdevsim/netdevsim0 path /IPv4/fib-rules size 16 $ devlink resource set netdevsim/netdevsim0 path /IPv6/fib size 64 $ devlink resource set netdevsim/netdevsim0 path /IPv6/fib-rules size 16 $ devlink dev reload netdevsim/netdevsim0 such that the number of rules or routes is limited (96 ipv4 routes in the example above): $ for n in $(seq 1 32); do ip ro add 10.99.$n.0/24 dev eth1; done Error: netdevsim: Exceeded number of supported fib entries. $ devlink resource show netdevsim/netdevsim0 netdevsim/netdevsim0: name IPv4 size unlimited unit entry size_min 0 size_max unlimited size_gran 1 dpipe_tables non resources: name fib size 96 occ 96 unit entry size_min 0 size_max unlimited size_gran 1 dpipe_tables ... With this template in place for resource management, it is fairly trivial to extend and shows one way to implement a simple counter based resource controller typical of network profiles. Currently, devlink only supports initial namespace. Code is in place to adapt netdevsim to a per namespace controller once the network namespace issues are resolved. Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/Kconfig | 1 + drivers/net/netdevsim/Makefile | 4 + drivers/net/netdevsim/devlink.c | 294 ++++++++++++++++++++++++++++++++++++++ drivers/net/netdevsim/fib.c | 263 ++++++++++++++++++++++++++++++++++ drivers/net/netdevsim/netdev.c | 12 +- drivers/net/netdevsim/netdevsim.h | 43 ++++++ 6 files changed, 616 insertions(+), 1 deletion(-) commit 2233000cba40ee0784a2d5b5e2b2c38c1159a7ef Author: David Ahern Date: Tue Mar 27 18:21:59 2018 -0700 net/ipv6: Move call_fib6_entry_notifiers up for route adds Move call to call_fib6_entry_notifiers for new IPv6 routes to right before the insertion into the FIB. At this point notifier handlers can decide the fate of the new route with a clean path to delete the potential new entry if the notifier returns non-0. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit c1d7ee67acb54b7dc1408929ff70dfe46993e517 Author: David Ahern Date: Tue Mar 27 18:21:58 2018 -0700 net/ipv4: Allow notifier to fail route replace Add checking to call to call_fib_entry_notifiers for IPv4 route replace. Allows a notifier handler to fail the replace. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 6635f311eab40b6d97eb884f371be41d0f5a3ed6 Author: David Ahern Date: Tue Mar 27 18:21:57 2018 -0700 net/ipv4: Move call_fib_entry_notifiers up for new routes Move call to call_fib_entry_notifiers for new IPv4 routes to right before the call to fib_insert_alias. At this point the only remaining failure path is memory allocations in fib_insert_node. Handle that very unlikely failure with a call to call_fib_entry_notifiers to tell drivers about it. At this point notifier handlers can decide the fate of the new route with a clean path to delete the potential new entry if the notifier returns non-0. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 9776d32537d2bbc251fd1de651e2bb2439474bde Author: David Ahern Date: Tue Mar 27 18:21:56 2018 -0700 net: Move call_fib_rule_notifiers up in fib_nl_newrule Move call_fib_rule_notifiers up in fib_nl_newrule to the point right before the rule is inserted into the list. At this point there are no more failure paths within the core rule code, so if the notifier does not fail then the rule will be inserted into the list. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller net/core/fib_rules.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c30d9356e9e8ed0735c1215e187b03d3ae8b4966 Author: David Ahern Date: Tue Mar 27 18:21:55 2018 -0700 net: Fix fib notifer to return errno Notifier handlers use notifier_from_errno to convert any potential error to an encoded format. As a consequence the other side, call_fib_notifier{s} in this case, needs to use notifier_to_errno to return the error from the handler back to its caller. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller net/core/fib_notifier.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 6e2135ce54b72f8b2b20cef2a06ae6acb77a3431 Merge: 038d49b db75373 Author: David S. Miller Date: Thu Mar 29 14:01:40 2018 -0400 Merge tag 'mlx5-updates-2018-03-27' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2018-03-27 (Misc updates & SQ recovery) This series contains Misc updates and cleanups for mlx5e rx path and SQ recovery feature for tx path. From Tariq: (RX updates) - Disable Striding RQ when PCI devices, striding RQ limits the use of CQE compression feature, which is very critical for slow PCI devices performance, in this change we will prefer CQE compression over Striding RQ only on specific "slow" PCIe links. - RX path cleanups - Private flag to enable/disable striding RQ From Eran: (TX fast recovery) - TX timeout logic improvements, fast SQ recovery and TX error reporting if a HW error occurs while transmitting on a specific SQ, the driver will ignore such error and will wait for TX timeout to occur and reset all the rings. Instead, the current series improves the resiliency for such HW errors by detecting TX completions with errors, which will report them and perform a fast recover for the specific faulty SQ even before a TX timeout is detected. ==================== Signed-off-by: David S. Miller commit 038d49baab571800e3077b9d322a004f95c8aa8f Merge: 906edee91 152f253 Author: David S. Miller Date: Thu Mar 29 13:47:54 2018 -0400 Merge branch 'Introduce-net_rwsem-to-protect-net_namespace_list' Kirill Tkhai says: ==================== Introduce net_rwsem to protect net_namespace_list The series introduces fine grained rw_semaphore, which will be used instead of rtnl_lock() to protect net_namespace_list. This improves scalability and allows to do non-exclusive sleepable iteration for_each_net(), which is enough for most cases. scripts/get_maintainer.pl gives enormous list of people, and I add all to CC. Note, that this patch is independent of "Close race between {un, }register_netdevice_notifier and pernet_operations": https://patchwork.ozlabs.org/project/netdev/list/?series=36495 Signed-off-by: Kirill Tkhai ==================== Signed-off-by: David S. Miller commit 152f253152cc08f5d26ba76659723d2d83b363f8 Author: Kirill Tkhai Date: Thu Mar 29 19:21:20 2018 +0300 net: Remove rtnl_lock() in nf_ct_iterate_destroy() rtnl_lock() doesn't protect net::ct::count, and it's not needed for__nf_ct_unconfirmed_destroy() and for nf_queue_nf_hook_drop(). Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/nf_conntrack_core.c | 2 -- 1 file changed, 2 deletions(-) commit ec9c780925c57588637e1dbd8650d294107311c0 Author: Kirill Tkhai Date: Thu Mar 29 19:21:09 2018 +0300 ovs: Remove rtnl_lock() from ovs_exit_net() Here we iterate for_each_net() and removes vport from alive net to the exiting net. ovs_net::dps are protected by ovs_mutex(), and the others, who change it (ovs_dp_cmd_new(), __dp_destroy()) also take it. The same with datapath::ports list. So, we remove rtnl_lock() here. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/openvswitch/datapath.c | 2 -- 1 file changed, 2 deletions(-) commit 350311aab4c0b2477f9cf3fb03cef2e4cd6c3b18 Author: Kirill Tkhai Date: Thu Mar 29 19:20:56 2018 +0300 security: Remove rtnl_lock() in selinux_xfrm_notify_policyload() rt_genid_bump_all() consists of ipv4 and ipv6 part. ipv4 part is incrementing of net::ipv4::rt_genid, and I see many places, where it's read without rtnl_lock(). ipv6 part calls __fib6_clean_all(), and it's also called without rtnl_lock() in other places. So, rtnl_lock() here was used to iterate net_namespace_list only, and we can remove it. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller security/selinux/include/xfrm.h | 2 -- 1 file changed, 2 deletions(-) commit 10256debb918aea083d0ddada64d29014c642a7b Author: Kirill Tkhai Date: Thu Mar 29 19:20:44 2018 +0300 net: Don't take rtnl_lock() in wireless_nlevent_flush() This function iterates over net_namespace_list and flushes the queue for every of them. What does this rtnl_lock() protects?! Since we may add skbs to net::wext_nlevents without rtnl_lock(), it does not protects us about queuers. It guarantees, two threads can't flush the queue in parallel, that can change the order, but since skb can be queued in any order, it doesn't matter, how many threads do this in parallel. In case of several threads, this will be even faster. So, we can remove rtnl_lock() here, as it was used for iteration over net_namespace_list only. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/wireless/wext-core.c | 4 ---- 1 file changed, 4 deletions(-) commit f0b07bb151b098d291fd1fd71ef7a2df56fb124a Author: Kirill Tkhai Date: Thu Mar 29 19:20:32 2018 +0300 net: Introduce net_rwsem to protect net_namespace_list rtnl_lock() is used everywhere, and contention is very high. When someone wants to iterate over alive net namespaces, he/she has no a possibility to do that without exclusive lock. But the exclusive rtnl_lock() in such places is overkill, and it just increases the contention. Yes, there is already for_each_net_rcu() in kernel, but it requires rcu_read_lock(), and this can't be sleepable. Also, sometimes it may be need really prevent net_namespace_list growth, so for_each_net_rcu() is not fit there. This patch introduces new rw_semaphore, which will be used instead of rtnl_mutex to protect net_namespace_list. It is sleepable and allows not-exclusive iterations over net namespaces list. It allows to stop using rtnl_lock() in several places (what is made in next patches) and makes less the time, we keep rtnl_mutex. Here we just add new lock, while the explanation of we can remove rtnl_lock() there are in next patches. Fine grained locks generally are better, then one big lock, so let's do that with net_namespace_list, while the situation allows that. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller drivers/infiniband/core/roce_gid_mgmt.c | 2 ++ include/linux/rtnetlink.h | 1 + include/net/net_namespace.h | 1 + net/core/dev.c | 5 +++++ net/core/fib_notifier.c | 2 ++ net/core/net_namespace.c | 18 +++++++++++++----- net/core/rtnetlink.c | 5 +++++ net/netfilter/nf_conntrack_core.c | 2 ++ net/openvswitch/datapath.c | 2 ++ net/wireless/wext-core.c | 2 ++ security/selinux/include/xfrm.h | 2 ++ 11 files changed, 37 insertions(+), 5 deletions(-) commit 097ccca726ffedb277c104aba45c59d075969e51 Author: Xiaolei Li Date: Thu Mar 29 09:34:59 2018 +0800 mtd: nand: Fix some function description mismatches in core.c In core.c, some function descriptions do not match function definitions. Just fix these mismatches. Signed-off-by: Xiaolei Li Signed-off-by: Boris Brezillon drivers/mtd/nand/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5e86d9d122d0d6fae00d9dff41c22d6f4d09f566 Author: Abhi Das Date: Thu Mar 29 10:41:27 2018 -0700 gfs2: time journal recovery steps accurately This patch spits out the time taken by the various steps in the journal recover process. Previously, the journal recovery time didn't account for finding the journal head in the log which takes up a significant portion of time. Signed-off-by: Abhi Das Signed-off-by: Bob Peterson fs/gfs2/recovery.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit dc1baa715bbfbb1902da942d06497e79b40e7bc7 Author: Eric Sandeen Date: Wed Mar 28 17:48:08 2018 -0700 xfs: do not log/recover swapext extent owner changes for deleted inodes Today if we run xfs_fsr and crash[1], log replay can fail because the recovery code tries to instantiate the donor inode from disk to replay the swapext, but it's been deleted and we get verifier failures when we try to read the inode off disk with i_mode == 0. This fixes both sides: We don't log the swapext change if the inode has been deleted, and we don't try to recover it either. [1] or if systemd doesn't cleanly unmount root, as it is wont to do ... Signed-off-by: Eric Sandeen Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_inode.c | 4 ++++ fs/xfs/xfs_log_recover.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) commit 5267c5e09c25e2ee6242b37833a9bdf9d97f54a2 Author: Johan Hovold Date: Thu Mar 29 14:35:40 2018 +0200 Revert "USB: serial: ftdi_sio: add Id for Physik Instrumente E-870" This reverts commit 79a0b33165d8d8ec0840fcfc74fd0a8f219abeee. Turns out this is not an FTDI device after all. Fixes: 79a0b33165d8 ("USB: serial: ftdi_sio: add Id for Physik Instrumente E-870") Reported-by: Martin Teichmann Cc: stable Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/ftdi_sio.c | 1 - drivers/usb/serial/ftdi_sio_ids.h | 1 - 2 files changed, 2 deletions(-) commit af6f8529098aeb0e56a68671b450cf74e7a64fcd Author: Heinrich Schuchardt Date: Thu Mar 29 10:48:28 2018 -0500 usb: musb: gadget: misplaced out of bounds check musb->endpoints[] has array size MUSB_C_NUM_EPS. We must check array bounds before accessing the array and not afterwards. Signed-off-by: Heinrich Schuchardt Signed-off-by: Bin Liu Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_gadget_ep0.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 906edee91e79af5a348f1ad1b3f9b4b948db3db7 Merge: 36fc2d7 3432261 Author: David S. Miller Date: Thu Mar 29 12:06:11 2018 -0400 Merge branch 'net-bgmac-Couple-of-small-bgmac-changes' Florian Fainelli says: ==================== net: bgmac: Couple of small bgmac changes This patch series addresses two minor issues with the bgmac driver: - provides the interface name through /proc/interrupts rather than "bgmac" - makes sure the interrupts are masked during probe, in case the block was not properly reset ==================== Signed-off-by: David S. Miller commit 34322615cbaa0f54305f7818bb74c70bb50f47a8 Author: Florian Fainelli Date: Tue Mar 27 16:20:02 2018 -0700 net: bgmac: Mask interrupts during probe We can have interrupts left enabled form e.g: the bootloader which used the network device for network boot. Make sure we have those disabled as early as possible to avoid spurious interrupts. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 2 ++ 1 file changed, 2 insertions(+) commit d72e7c21b54bd7a6caa08a8eb62257d4e4196ab3 Author: Florian Fainelli Date: Tue Mar 27 16:20:01 2018 -0700 net: bgmac: Use interface name to request interrupt When the system contains several BGMAC adapters, it is nice to be able to tell which one is which by looking at /proc/interrupts. Use the network device name as a name to request_irq() with. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36fc2d727ee711f901c120046d63b8d7e341a744 Merge: 492caff 1bae5d2 Author: David S. Miller Date: Thu Mar 29 12:02:08 2018 -0400 Merge tag 'rxrpc-next-20180327' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Tracing updates Here are some patches that update tracing in AF_RXRPC and AFS: (1) Add a tracepoint for tracking resend events. (2) Use debug_ids in traces rather than pointers (as pointers are now hashed) and allow use of the same debug_id in AFS calls as in the corresponding AF_RXRPC calls. This makes filtering the trace output much easier. (3) Add a tracepoint for tracking call completion. ==================== Signed-off-by: David S. Miller commit 492caffa8a1a405f661c111acabfe6b8b9645db8 Author: Moritz Fischer Date: Tue Mar 27 14:43:15 2018 -0700 net: ethernet: nixge: Add support for National Instruments XGE netdev Add support for the National Instruments XGE 1/10G network device. It uses the EEPROM on the board via NVMEM. Signed-off-by: Moritz Fischer Signed-off-by: David S. Miller drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile | 1 + drivers/net/ethernet/ni/Kconfig | 27 + drivers/net/ethernet/ni/Makefile | 1 + drivers/net/ethernet/ni/nixge.c | 1310 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 1340 insertions(+) commit 75530a78de21267f0dc76fbc67d2253e89233d54 Author: Moritz Fischer Date: Tue Mar 27 14:43:14 2018 -0700 dt-bindings: net: Add bindings for National Instruments XGE netdev This adds bindings for the NI XGE 1G/10G network device. Reviewed-by: Rob Herring Signed-off-by: Moritz Fischer Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/nixge.txt | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 56455e0998dd3a8096eb3fdc2c8e870a29a77bef Merge: 5d22d47 415a132 Author: David S. Miller Date: Thu Mar 29 11:22:31 2018 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2018-03-29 1) Remove a redundant pointer initialization esp_input_set_header(). From Colin Ian King. 2) Mark the xfrm kmem_caches as __ro_after_init. From Alexey Dobriyan. 3) Do the checksum for an ipsec offlad packet in software if the device does not advertise NETIF_F_HW_ESP_TX_CSUM. From Shannon Nelson. 4) Use booleans for true and false instead of integers in xfrm_policy_cache_flush(). From Gustavo A. R. Silva Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 86674a97f5055f4c7f406563408096e8cf9364ff Author: Harry Morris Date: Wed Mar 28 11:54:27 2018 +0100 ieee802154: ca8210: fix uninitialised data read In ca8210_test_int_user_write() a user can request the transfer of a frame with a length field (command.length) that is longer than the actual buffer provided (len). In this scenario the driver will copy the buffer contents into the uninitialised command[] buffer, then transfer bytes over the SPI even though only bytes had been populated, potentially leaking sensitive kernel memory. Also the first 6 bytes of the command buffer must be initialised in case a malformed, short packet is written and the uninitialised bytes are read in ca8210_test_check_upstream. Reported-by: Domen Puncer Kugler Signed-off-by: Harry Morris Tested-by: Harry Morris Signed-off-by: Stefan Schmidt drivers/net/ieee802154/ca8210.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit bd03143007eb9b03a7f2316c677780561b68ba2a Author: Thomas Gleixner Date: Mon Mar 26 15:29:57 2018 +0200 alarmtimer: Init nanosleep alarm timer on stack syszbot reported the following debugobjects splat: ODEBUG: object is on stack, but not annotated WARNING: CPU: 0 PID: 4185 at lib/debugobjects.c:328 RIP: 0010:debug_object_is_on_stack lib/debugobjects.c:327 [inline] debug_object_init+0x17/0x20 lib/debugobjects.c:391 debug_hrtimer_init kernel/time/hrtimer.c:410 [inline] debug_init kernel/time/hrtimer.c:458 [inline] hrtimer_init+0x8c/0x410 kernel/time/hrtimer.c:1259 alarm_init kernel/time/alarmtimer.c:339 [inline] alarm_timer_nsleep+0x164/0x4d0 kernel/time/alarmtimer.c:787 SYSC_clock_nanosleep kernel/time/posix-timers.c:1226 [inline] SyS_clock_nanosleep+0x235/0x330 kernel/time/posix-timers.c:1204 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 This happens because the hrtimer for the alarm nanosleep is on stack, but the code does not use the proper debug objects initialization. Split out the code for the allocated use cases and invoke hrtimer_init_on_stack() for the nanosleep related functions. Reported-by: syzbot+a3e0726462b2e346a31d@syzkaller.appspotmail.com Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: syzkaller-bugs@googlegroups.com Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1803261528270.1585@nanos.tec.linutronix.de kernel/time/alarmtimer.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit 6ed70cf342de03c7b11cd4eb032705faeb29d284 Author: Alexander Shishkin Date: Thu Mar 29 15:06:48 2018 +0300 perf/x86/pt, coresight: Clean up address filter structure This is a cosmetic patch that deals with the address filter structure's ambiguous fields 'filter' and 'range'. The former stands to mean that the filter's *action* should be to filter the traces to its address range if it's set or stop tracing if it's unset. This is confusing and hard on the eyes, so this patch replaces it with 'action' enum. The 'range' field is completely redundant (meaning that the filter is an address range as opposed to a single address trigger), as we can use zero size to mean the same thing. Signed-off-by: Alexander Shishkin Acked-by: Mathieu Poirier Acked-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: Will Deacon Link: http://lkml.kernel.org/r/20180329120648.11902-1-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/pt.c | 13 ++++-- drivers/hwtracing/coresight/coresight-etm-perf.c | 59 +++++++++++------------- include/linux/perf_event.h | 14 ++++-- kernel/events/core.c | 26 +++++++---- 4 files changed, 63 insertions(+), 49 deletions(-) commit 2d074918fb1568f398777343ff9a28049fb86337 Merge: 78282be f67b150 Author: Ingo Molnar Date: Thu Mar 29 16:03:48 2018 +0200 Merge branch 'perf/urgent' into perf/core Conflicts: kernel/events/hw_breakpoint.c Signed-off-by: Ingo Molnar commit fffb64127adc3eea6a19ceefdc88d171f68b9d34 Author: Andreas Gruenbacher Date: Thu Mar 29 06:50:32 2018 -0700 gfs2: Zero out fallocated blocks in fallocate_chunk Instead of zeroing out fallocated blocks in gfs2_iomap_alloc, zero them out in fallocate_chunk, much higher up the call stack. This gets rid of gfs2's abuse of the IOMAP_ZERO flag as well as the gfs2 specific zeronew buffer flag. I can't think of a reason why zeroing out the blocks in gfs2_iomap_alloc would have any benefits: there is no additional locking at that level that would add protection to the newly allocated blocks. While at it, change fallocate over from gs2_block_map to gfs2_iomap_begin. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson Acked-by: Christoph Hellwig fs/gfs2/bmap.c | 13 ------------- fs/gfs2/file.c | 29 ++++++++++++++--------------- fs/gfs2/incore.h | 3 --- 3 files changed, 14 insertions(+), 31 deletions(-) commit 027fa4dee935d25cef5994af1b8864eb00dcffac Author: Richard Zhu Date: Wed Mar 28 15:11:01 2018 +0800 ahci: imx: add the imx8qm ahci sata support - There are three PHY lanes on iMX8QM, and can be used in the following three cases 1. a two lanes PCIE_A, and a single lane SATA. 2. a single lane PCIE_A, a single lane PCIE_B and a single lane SATA. 3. a two lanes PCIE_A, and a single lane PCIE_B. The configuration of the iMX8QM AHCI SATA is relied on the usage of PCIE ports in the case 1 and 2. Use standalone iMX8 AHCI SATA probe and enable functions to enable iMX8QM AHCI SATA support. - To save power consumption, PHY CLKs can be gated off after the configurations are done. - The impedance ratio should be configured refer to differnet REXT values. 0x6c <--> REXT value is 85Ohms 0x80 (default value) <--> REXT value is 100Ohms. In general, REXT value should be 85ohms in standalone PCIE HW board design, and 100ohms in SATA standalone HW board design. When the PCIE and the SATA are enabled simultaneously in the HW board design. The REXT value would be set to 85ohms. Configure the SATA PHY impedance ratio to 0x6c in default. Signed-off-by: Richard Zhu Reviewed-by: Hans de Goede Signed-off-by: Tejun Heo drivers/ata/ahci_imx.c | 332 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 332 insertions(+) commit d4f96fd5c249defda290299f9646287dd3df0803 Merge: 29d049b f746a02 57c2695 b6d57f1 70ca608 6d7cf02 9fe77e0 7868805 f51dc89 Author: Joerg Roedel Date: Thu Mar 29 15:24:40 2018 +0200 Merge branches 'x86/amd', 'x86/vt-d', 'arm/rockchip', 'arm/omap', 'arm/mediatek', 'arm/exynos', 'arm/renesas', 'arm/smmu' and 'core' into next commit 7868805969942a424118b7da5233946e53ce69be Author: Robin Murphy Date: Thu Mar 29 12:24:52 2018 +0100 iommu/io-pgtable-arm: Avoid warning with 32-bit phys_addr_t It's not entirely unreasonable for io-pgtable-arm to be built for configurations with 32-bit phys_addr_t, where the compiler rightly raises a warning about the 36-bit shift. That particular code path should never actually *run* on those systems, but we still want it to compile cleanly, which is easily done by using an unambiguous u64 as the intermediate type instead. Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/io-pgtable-arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c470bdc1aaf36669e04ba65faf1092b2d1c6cabe Author: Emmanuel Grumbach Date: Mon Mar 26 16:21:04 2018 +0300 mac80211: don't WARN on bad WMM parameters from buggy APs Apparently, some APs are buggy enough to send a zeroed WMM IE. Don't WARN on this since this is not caused by a bug on the client's system. This aligns the condition of the WARNING in drv_conf_tx with the validity check in ieee80211_sta_wmm_params. We will now pick the default values whenever we get a zeroed WMM IE. This has been reported here: https://bugzilla.kernel.org/show_bug.cgi?id=199161 Fixes: f409079bb678 ("mac80211: sanity check CW_min/CW_max towards driver") Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg net/mac80211/mlme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 14c99949a3398a655c47b262ca8e2e83edfae7fd Merge: 63f5be0 a72c926 Author: Kalle Valo Date: Thu Mar 29 15:55:28 2018 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.17. Major changes: ath10k * enable chip temperature measurement for QCA6174/QCA9377 * add firmware memory dump for QCA9984 * enable buffer STA on TDLS link for QCA6174 * support different beacon internals in multiple interface scenario for QCA988X/QCA99X0/QCA9984/QCA4019 commit b3c39758c8a6972f02b43f83dba7fe7a352371b9 Author: Tetsuo Handa Date: Tue Mar 27 19:41:41 2018 +0900 lockdep: Make the lock debug output more useful The lock debug output in print_lock() has a few shortcomings: - It prints the hlock->acquire_ip field in %px and %pS format. That's redundant information. - It lacks information about the lock object itself. The lock class is not helpful to identify a particular instance of a lock. Change the output so it prints: - hlock->instance to allow identification of a particular lock instance. - only the %pS format of hlock->ip_acquire which is sufficient to decode the actual code line with faddr2line. The resulting output is: 3 locks held by a.out/31106: #0: 00000000b0f753ba (&mm->mmap_sem){++++}, at: copy_process.part.41+0x10d5/0x1fe0 #1: 00000000ef64d539 (&mm->mmap_sem/1){+.+.}, at: copy_process.part.41+0x10fe/0x1fe0 #2: 00000000b41a282e (&mapping->i_mmap_rwsem){++++}, at: copy_process.part.41+0x12f2/0x1fe0 [ tglx: Massaged changelog ] Signed-off-by: Tetsuo Handa Signed-off-by: Thomas Gleixner Acked-by: Michal Hocko Acked-by: David Rientjes Acked-by: Peter Zijlstra Cc: linux-mm@kvack.org Cc: Borislav Petkov Link: https://lkml.kernel.org/r/201803271941.GBE57310.tVSOJLQOFFOHFM@I-love.SAKURA.ne.jp kernel/locking/lockdep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 86f690e8bfd124c38940e7ad58875ef383003348 Merge: 45ea83f 72ef0f2 Author: Greg Kroah-Hartman Date: Thu Mar 29 14:15:13 2018 +0200 Merge tag 'stm-intel_th-for-greg-20180329' of git://git.kernel.org/pub/scm/linux/kernel/git/ash/stm into char-misc-next Alexander writes: stm class/intel_th: Updates for 4.17 These are: * Mass conversion to GPL-2 SPDX header * Moved "hwtracing" to now its own submenu, to uncrowd the parent menu a bit * Added MAINTAINERS entry for drivers/hwtracing * Somewhat small Trace Hub fixes * Added ACPI glue layer for the Trace Hub * Added more module parameters to dummy_stm for better test coverage commit 1dd2eefb8efa97b6b495c4f09fa8232727b93db1 Merge: 4d191c7 018f6fb Author: Johannes Berg Date: Thu Mar 29 14:04:07 2018 +0200 Merge branch 'eapol-over-nl80211' into mac80211-next This is the EAPoL over nl80211 patchset from Denis Kenzior, minus some infrastructure patches I'd split out and applied earlier. Denis described it as follows: This patchset adds support for running 802.11 authentication mechanisms (e.g. 802.1X, 4-Way Handshake, etc) over NL80211 instead of putting them onto the network device. This has the advantage of fixing several long-standing race conditions that result from userspace operating on multiple transports in order to manage a 802.11 connection (e.g. NL80211 and wireless netdev, wlan0, etc). For example, userspace would sometimes see 4-Way handshake packets before NL80211 signaled that the connection has been established. Leading to ugly hacks or having the STA wait for retransmissions from the AP. This also provides a way to mitigate a particularly nasty race condition where the encryption key could be set prior to the 4-way handshake packet 4/4 being sent. This would result in the packet being sent encrypted and discarded by the peer. The mitigation strategy for this race is for userspace to explicitly tell the kernel that a particular EAPoL packet should not be encrypted. To make this possible this patchset introduces a new NL80211 command and several new attributes. A userspace that is capable of processing EAPoL packets over NL80211 includes a new NL80211_ATTR_CONTROL_PORT_OVER_NL80211 attribute in its NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT requests being sent to the kernel. The previously added NL80211_ATTR_SOCKET_OWNER attribute must also be included. The latter is used by the kernel to send NL80211_CMD_CONTROL_PORT_FRAME notifications back to userspace via a netlink unicast. If the NL80211_ATTR_CONTROL_PORT_OVER_NL80211 attribute is not specified, then legacy behavior is kept and control port packets continue to flow over the network interface. If control port over nl80211 transport is requested, then control port packets are intercepted just prior to being handed to the network device and sent over netlink via the NL80211_CMD_CONTROL_PORT_FRAME notification. NL80211_ATTR_CONTROL_PORT_ETHERTYPE and NL80211_ATTR_MAC are included to specify the control port frame protocol and source address respectively. If the control port frame was received unencrypted then NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT flag is also included. NL80211_ATTR_FRAME attribute contains the raw control port frame with all transport layer headers stripped (e.g. this would be the raw EAPoL frame). Userspace can reply to control port frames either via legacy methods (by sending frames to the network device) or via NL80211_CMD_CONTROL_PORT_FRAME request. Userspace would included NL80211_ATTR_FRAME with the raw control port frame as well as NL80211_Attr_MAC and NL80211_ATTR_CONTROL_PORT_ETHERTYPE attributes to specify the destination address and protocol respectively. This allows Pre-Authentication (protocol 0x88c7) frames to be sent via this mechanism as well. Finally, NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT flag can be included to tell the driver to send the frame unencrypted, e.g. for 4-Way handshake 4/4 frames. The proposed patchset has been tested in a mac80211_hwsim based environment with hostapd and iwd. Signed-off-by: Johannes Berg commit 018f6fbf540d7bd7223b7d0b29651c1dd5e1c606 Author: Denis Kenzior Date: Mon Mar 26 12:52:51 2018 -0500 mac80211: Send control port frames over nl80211 If userspace requested control port frames to go over 80211, then do so. The control packets are intercepted just prior to delivery of the packet to the underlying network device. Pre-authentication type frames (protocol: 0x88c7) are also forwarded over nl80211. Signed-off-by: Denis Kenzior Signed-off-by: Johannes Berg net/mac80211/cfg.c | 6 ++++++ net/mac80211/ibss.c | 1 + net/mac80211/ieee80211_i.h | 1 + net/mac80211/iface.c | 2 ++ net/mac80211/main.c | 2 ++ net/mac80211/mlme.c | 2 ++ net/mac80211/rx.c | 33 ++++++++++++++++++++++++++++----- 7 files changed, 42 insertions(+), 5 deletions(-) commit 911806491425d79107cadddbde11b42bbdfe38c8 Author: Denis Kenzior Date: Mon Mar 26 12:52:50 2018 -0500 mac80211: Add support for tx_control_port Signed-off-by: Denis Kenzior Signed-off-by: Johannes Berg net/mac80211/cfg.c | 1 + net/mac80211/ieee80211_i.h | 3 +++ net/mac80211/tx.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) commit 1224f5831a22977f30c1842874be12c58608cee7 Author: Denis Kenzior Date: Mon Mar 26 12:52:49 2018 -0500 nl80211: Add control_port_over_nl80211 to mesh_setup Signed-off-by: Denis Kenzior Signed-off-by: Johannes Berg include/net/cfg80211.h | 3 +++ net/wireless/nl80211.c | 9 +++++++++ 2 files changed, 12 insertions(+) commit c3bfe1f6fc98e7185ff5ee9279ba259fe484597c Author: Denis Kenzior Date: Mon Mar 26 12:52:48 2018 -0500 nl80211: Add control_port_over_nl80211 for ibss Signed-off-by: Denis Kenzior Signed-off-by: Johannes Berg include/net/cfg80211.h | 3 +++ net/wireless/nl80211.c | 9 +++++++++ 2 files changed, 12 insertions(+) commit 64bf3d4bc2b0725b3c5ffadd982a9746bfc738b7 Author: Denis Kenzior Date: Mon Mar 26 12:52:43 2018 -0500 nl80211: Add CONTROL_PORT_OVER_NL80211 attribute Signed-off-by: Denis Kenzior Signed-off-by: Johannes Berg include/net/cfg80211.h | 3 +++ include/uapi/linux/nl80211.h | 14 +++++++++++++- net/wireless/nl80211.c | 26 ++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) commit 2576a9ace47eba28a682d249d1d6402f891808c9 Author: Denis Kenzior Date: Mon Mar 26 12:52:42 2018 -0500 nl80211: Implement TX of control port frames This commit implements the TX side of NL80211_CMD_CONTROL_PORT_FRAME. Userspace provides the raw EAPoL frame using NL80211_ATTR_FRAME. Userspace should also provide the destination address and the protocol type to use when sending the frame. This is used to implement TX of Pre-authentication frames. If CONTROL_PORT_ETHERTYPE_NO_ENCRYPT is specified, then the driver will be asked not to encrypt the outgoing frame. A new EXT_FEATURE flag is introduced so that nl80211 code can check whether a given wiphy has capability to pass EAPoL frames over nl80211. Signed-off-by: Denis Kenzior Signed-off-by: Johannes Berg include/net/cfg80211.h | 9 ++++++ include/uapi/linux/nl80211.h | 3 ++ net/wireless/nl80211.c | 71 +++++++++++++++++++++++++++++++++++++++++++- net/wireless/rdev-ops.h | 15 ++++++++++ net/wireless/trace.h | 26 ++++++++++++++++ 5 files changed, 123 insertions(+), 1 deletion(-) commit 6a671a50f8199b3e1fe49fa8afff0fc8335da79c Author: Denis Kenzior Date: Mon Mar 26 12:52:41 2018 -0500 nl80211: Add CMD_CONTROL_PORT_FRAME API This commit also adds cfg80211_rx_control_port function. This is used to generate a CMD_CONTROL_PORT_FRAME event out to userspace. The conn_owner_nlportid is used as the unicast destination. This means that userspace must specify NL80211_ATTR_SOCKET_OWNER flag if control port over nl80211 routing is requested in NL80211_CMD_CONNECT, NL80211_CMD_ASSOCIATE, NL80211_CMD_START_AP or IBSS/mesh join. Signed-off-by: Denis Kenzior [johannes: fix return value of cfg80211_rx_control_port()] Signed-off-by: Johannes Berg include/net/cfg80211.h | 22 +++++++++++++++++ include/uapi/linux/nl80211.h | 13 ++++++++++ net/wireless/nl80211.c | 58 ++++++++++++++++++++++++++++++++++++++++++++ net/wireless/trace.h | 21 ++++++++++++++++ 4 files changed, 114 insertions(+) commit 71e6882b0ae7e30acf8864a5ddc897f45bcae6a0 Merge: f3f59fb aa08192 Author: Thomas Gleixner Date: Thu Mar 29 13:21:29 2018 +0200 Merge tag 'irqchip-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates for 4.17 from Marc Zyngier: - New Qualcomm PDC irqchip - New Microsemi Ocelot irqchip - Suspend/resume support for some oddball GICv3 irqchip - Better GIC/GICv3 support for kexec - Various cleanups and fixes commit 4dc2375c1a4e88ed2701f6961e0e4f9a7696ad3c Author: Rafael J. Wysocki Date: Tue Mar 27 23:58:45 2018 +0200 cpuidle: poll_state: Avoid invoking local_clock() too often Rik reports that he sees an increase in CPU use in one benchmark due to commit 612f1a22f067 "cpuidle: poll_state: Add time limit to poll_idle()" that caused poll_idle() to call local_clock() in every iteration of the loop. Utilization increase generally means more non-idle time with respect to total CPU time (on the average) which implies reduced CPU frequency. Doug reports that limiting the rate of local_clock() invocations in there causes much less power to be drawn during a CPU-intensive parallel workload (with idle states 1 and 2 disabled to enforce more state 0 residency). These two reports together suggest that executing local_clock() on multiple CPUs in parallel at a high rate may cause chips to get hot and trigger thermal/power limits on them to kick in, so reduce the rate of local_clock() invocations in poll_idle() to avoid that issue. Fixes: 612f1a22f067 "cpuidle: poll_state: Add time limit to poll_idle()" Reported-by: Rik van Riel Reported-by: Doug Smythies Signed-off-by: Rafael J. Wysocki Tested-by: Rik van Riel Reviewed-by: Rik van Riel drivers/cpuidle/poll_state.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 64bdff698092aa6be28c3b248f887022eec77902 Author: Rafael J. Wysocki Date: Wed Mar 14 12:27:21 2018 +0100 PM: cpuidle/suspend: Add s2idle usage and time state attributes Add a new attribute group called "s2idle" under the sysfs directory of each cpuidle state that supports the ->enter_s2idle callback and put two new attributes, "usage" and "time", into that group to represent the number of times the given state was requested for suspend-to-idle and the total time spent in suspend-to-idle after requesting that state, respectively. That will allow diagnostic information related to suspend-to-idle to be collected without enabling advanced debug features and analyzing dmesg output. Signed-off-by: Rafael J. Wysocki Documentation/ABI/testing/sysfs-devices-system-cpu | 25 ++++++++++ drivers/cpuidle/cpuidle.c | 9 ++++ drivers/cpuidle/sysfs.c | 54 ++++++++++++++++++++++ include/linux/cpuidle.h | 4 ++ 4 files changed, 92 insertions(+) commit 8919d779f1fd1ea8b06a46249f1a13c835b736af Author: Marek Szyprowski Date: Tue Mar 13 16:04:51 2018 +0100 cpuidle: Enable coupled cpuidle support on Exynos3250 platform All the needed code has been already merged to mach-exynos core in commit af9971144dde ("ARM: EXYNOS: add coupled cpuidle support for Exynos3250"), so enable support for coupled variant also for Exynos3250 SoCs. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle-exynos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a37b969a61c1efcd16da9c9ab3b237235c48560c Author: Rafael J. Wysocki Date: Wed Mar 14 15:08:57 2018 +0100 cpuidle: poll_state: Add time limit to poll_idle() If poll_idle() is allowed to spin until need_resched() returns 'true', it may actually spin for a much longer time than expected by the idle governor, since set_tsk_need_resched() is not always called by the timer interrupt handler. If that happens, the CPU may spend much more time than anticipated in the "polling" state. To prevent that from happening, limit the time of the spinning loop in poll_idle(). Suggested-by: Peter Zijlstra Signed-off-by: Rafael J. Wysocki Tested-by: Doug Smythies drivers/cpuidle/poll_state.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit aa08192a254d362a4d5317647a81de6996961aef Author: Aniruddha Banerjee Date: Wed Mar 28 19:12:00 2018 +0530 irqchip/gic: Take lock when updating irq type Most MMIO GIC register accesses use a 1-hot bit scheme that avoids requiring any form of locking. This isn't true for the GICD_ICFGRn registers, which require a RMW sequence. Unfortunately, we seem to be missing a lock for these particular accesses, which could result in a race condition if changing the trigger type on any two interrupts within the same set of 16 interrupts (and thus controlled by the same CFGR register). Introduce a private lock in the GIC common comde for this particular case, making it cover both GIC implementations in one go. Cc: stable@vger.kernel.org Signed-off-by: Aniruddha Banerjee [maz: updated changelog] Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-common.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 72ef0f24d587d38f235334aef69afe611bba0d16 Author: Randy Dunlap Date: Tue Oct 3 16:27:30 2017 -0700 hwtracing: Add HW tracing support menu Make a "HW tracing support" menu and move 2 entries into it. (No change in Coresight, which is ARM-specific and is only listed for ARM & ARM64.) This makes the Device Drivers menu more consistent and prevents these drivers from being listed at the top level of the Device Drivers menu. Signed-off-by: Randy Dunlap Signed-off-by: Alexander Shishkin drivers/Kconfig | 4 +--- drivers/hwtracing/Kconfig | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) commit 57c26957bd87a9f3b84043d0ee9cf47852a82ff9 Author: Jeffy Chen Date: Fri Mar 23 15:38:14 2018 +0800 iommu/rockchip: Support sharing IOMMU between masters There would be some masters sharing the same IOMMU device. Put them in the same iommu group and share the same iommu domain. Signed-off-by: Jeffy Chen Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 0f181d3cf7d984b1af33d34557a8285852b0d3ec Author: Jeffy Chen Date: Fri Mar 23 15:38:13 2018 +0800 iommu/rockchip: Add runtime PM support When the power domain is powered off, the IOMMU cannot be accessed and register programming must be deferred until the power domain becomes enabled. Add runtime PM support, and use runtime PM device link from IOMMU to master to enable and disable IOMMU. Signed-off-by: Jeffy Chen Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 181 +++++++++++++++++++++++++++++------------ 1 file changed, 129 insertions(+), 52 deletions(-) commit 4d88a8a4c345cd16f634df855148cfb2a59a204a Author: Jeffy Chen Date: Fri Mar 23 15:38:12 2018 +0800 iommu/rockchip: Fix error handling in init It's hard to undo bus_set_iommu() in the error path, so move it to the end of rk_iommu_probe(). Signed-off-by: Jeffy Chen Reviewed-by: Tomasz Figa Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 5fd577c3eac3bdb9aebfec01e9b3d7f07a14f2dd Author: Jeffy Chen Date: Fri Mar 23 15:38:11 2018 +0800 iommu/rockchip: Use OF_IOMMU to attach devices automatically Converts the rockchip-iommu driver to use the OF_IOMMU infrastructure, which allows attaching master devices to their IOMMUs automatically according to DT properties. Signed-off-by: Jeffy Chen Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 135 ++++++++++++----------------------------- 1 file changed, 40 insertions(+), 95 deletions(-) commit 9176a303d971dc0fb35469c531c0d263667d2277 Author: Jeffy Chen Date: Fri Mar 23 15:38:10 2018 +0800 iommu/rockchip: Use IOMMU device for dma mapping operations Use the first registered IOMMU device for dma mapping operations, and drop the domain platform device. This is similar to exynos iommu driver. Signed-off-by: Jeffy Chen Reviewed-by: Tomasz Figa Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 85 ++++++++++++------------------------------ 1 file changed, 24 insertions(+), 61 deletions(-) commit 8fa9eb39c614acbabaecefd5507a426b45fa4704 Author: Jeffy Chen Date: Fri Mar 23 15:38:09 2018 +0800 dt-bindings: iommu/rockchip: Add clock property Add clock property, since we are going to control clocks in rockchip iommu driver. Signed-off-by: Jeffy Chen Reviewed-by: Robin Murphy Reviewed-by: Rob Herring Signed-off-by: Joerg Roedel Documentation/devicetree/bindings/iommu/rockchip,iommu.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit f2e3a5f557ad27f6a6f447717090a39cea238d6a Author: Tomasz Figa Date: Fri Mar 23 15:38:08 2018 +0800 iommu/rockchip: Control clocks needed to access the IOMMU Current code relies on master driver enabling necessary clocks before IOMMU is accessed, however there are cases when the IOMMU should be accessed while the master is not running yet, for example allocating V4L2 videobuf2 buffers, which is done by the VB2 framework using DMA mapping API and doesn't engage the master driver at all. This patch fixes the problem by letting clocks needed for IOMMU operation to be listed in Device Tree and making the driver enable them for the time of accessing the hardware. Signed-off-by: Tomasz Figa Signed-off-by: Jeffy Chen Acked-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 50 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) commit bf2a5e717a47d042ca5f9f438cf186633f23033b Author: Tomasz Figa Date: Fri Mar 23 15:38:06 2018 +0800 iommu/rockchip: Fix TLB flush of secondary IOMMUs Due to the bug in current code, only first IOMMU has the TLB lines flushed in rk_iommu_zap_lines. This patch fixes the inner loop to execute for all IOMMUs and properly flush the TLB. Signed-off-by: Tomasz Figa Signed-off-by: Jeffy Chen Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 0416bf6479acef646ad8c7396f73ecd936aa84bb Author: Tomasz Figa Date: Fri Mar 23 15:38:05 2018 +0800 iommu/rockchip: Use iopoll helpers to wait for hardware This patch converts the rockchip-iommu driver to use the in-kernel iopoll helpers to wait for certain status bits to change in registers instead of an open-coded custom macro. Signed-off-by: Tomasz Figa Signed-off-by: Jeffy Chen Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 75 ++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 36 deletions(-) commit f6717d727c9a2b0742ac23234a347db0d3ad718a Author: Tomasz Figa Date: Fri Mar 23 15:38:04 2018 +0800 iommu/rockchip: Fix error handling in attach Currently if the driver encounters an error while attaching device, it will leave the IOMMU in an inconsistent state. Even though it shouldn't really happen in reality, let's just add proper error path to keep things consistent. Signed-off-by: Tomasz Figa Signed-off-by: Jeffy Chen Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d0b912bd4c23fd8589584b1b0d582acb1230c795 Author: Jeffy Chen Date: Fri Mar 23 15:38:03 2018 +0800 iommu/rockchip: Request irqs in rk_iommu_probe() Move request_irq to the end of rk_iommu_probe(). Suggested-by: Robin Murphy Signed-off-by: Jeffy Chen Acked-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) commit 6d9ffaad7eddefaa0a166ba612665aef5264e352 Author: Jeffy Chen Date: Fri Mar 23 15:38:02 2018 +0800 iommu/rockchip: Fix error handling in probe Add missing iommu_device_sysfs_remove in error path. Signed-off-by: Jeffy Chen Reviewed-by: Tomasz Figa Acked-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 2 ++ 1 file changed, 2 insertions(+) commit 98b72b94def91be0d7918cbba6a150d97047f175 Author: Jeffy Chen Date: Fri Mar 23 15:38:01 2018 +0800 iommu/rockchip: Prohibit unbind and remove Removal of IOMMUs cannot be done reliably. This is similar to exynos iommu driver. Signed-off-by: Jeffy Chen Reviewed-by: Tomasz Figa Acked-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit be9cae2479f48d18f7a449ba91677ae97df11f3e Author: Sebastian Reichel Date: Thu Mar 29 17:52:49 2018 +0800 usb: chipidea: imx: Fix ULPI on imx53 Traditionally, PORTSC should be set before initializing ULPI phys. But setting PORTSC before powering on the phy results in a kernel freeze on imx53 based GE PPD. As a workaround this initializes the phy early in the imx platform code and disables phy power management from the core. Signed-off-by: Fabien Lahoudere Signed-off-by: Sebastian Reichel Signed-off-by: Peter Chen Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/ci_hdrc_imx.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 04e163794b07bbbd581604bed57ff876e835fd51 Author: Sebastian Reichel Date: Thu Mar 29 17:52:48 2018 +0800 usb: chipidea: imx: Cleanup ci_hdrc_imx_platform_flag Some trivial cleanups, that do not change functionality. Signed-off-by: Sebastian Reichel Signed-off-by: Peter Chen Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/ci_hdrc_imx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 274a1874bd7966eeb80b1a217b4e627e45c5fc73 Author: Michael Trimarchi Date: Thu Mar 29 17:52:47 2018 +0800 usb: chipidea: usbmisc: small clean up The register write can be done outside the if and else condition Signed-off-by: Michael Trimarchi Signed-off-by: Peter Chen Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/usbmisc_imx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 26250d540d2baf32e265e9e6df120b9be5962587 Author: Michael Trimarchi Date: Thu Mar 29 17:52:46 2018 +0800 usb: chipidea: usbmisc: evdo can be set e/o reset evdo bit can be set or reset. We can not trust evdo bit status after bootloader stage Signed-off-by: Michael Trimarchi Signed-off-by: Peter Chen Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/usbmisc_imx.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 9618d0934980c4b0d8d4b455ef10ba6b435e52c8 Author: Michael Trimarchi Date: Thu Mar 29 17:52:45 2018 +0800 usb: chipidea: usbmisc: evdo is only specific to OTG port The USB_PHY_CTRL_FUNC is used specific for OTG port as described in user manual. EVDO need to be set only for index 0 that correspond to OTG port Signed-off-by: Michael Trimarchi Signed-off-by: Peter Chen Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/usbmisc_imx.c | 3 +++ 1 file changed, 3 insertions(+) commit 049b5e2ae30b3c2f870cc9550af6f9a947fbd5b5 Author: Thomas Avery Date: Wed Mar 28 18:26:34 2018 -0400 staging: rtl8723bs: Remove yield call, replace with cond_resched() Remove yield() call. Yield does not guarantee progress, cond_resched() is a safer alternative Signed-off-by: Thomas Avery Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c22da34a1b9996ffc6aadb4804422e04fe28b7e1 Author: Thomas Avery Date: Wed Mar 28 18:26:22 2018 -0400 staging: rtl8723bs: Replace yield() call with cond_resched() Remove yield call(). yield does not guarantee progress, and should not be used. cond_resched() is a safe alternative. Signed-off-by: Thomas Avery Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8040b57ad89c1fda7f9e96a3b163b7617a2ab265 Author: Quytelda Kahja Date: Tue Mar 27 01:41:15 2018 -0700 staging: rtl8723bs: Remove unecessary newlines from 'odm.h'. Remove duplicate newlines and newlines before closing braces. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/odm.h | 27 --------------------------- 1 file changed, 27 deletions(-) commit ec57f8641fbca07bbb61a75bd4760fd7aef86860 Author: Quytelda Kahja Date: Tue Mar 27 01:41:14 2018 -0700 staging: rtl8723bs: Rework 'struct _ODM_Phy_Status_Info_' coding style. Change the typedef'd 'struct _ODM_Phy_Status_Info_' into 'struct odm_phy_info' and change the members to snake case in order to meet the coding style guidelines. Members: * u8 RxPWDBAll -> rx_pwd_ba11 * u8 SignalQuality -> signal_quality * s8 RxMIMOSignalQuality -> rx_mimo_signal_quality * u8 RxMIMOEVMdbm -> rx_mimo_evm_dbm * u8 RxMIMOSignalStrength -> rx_mimo_signal_strength * u16 Cfo_short -> cfo_short * u16 Cfo_tail -> cfo_tail * s8 RxPower -> rx_power * s8 RecvSignalPower -> recv_signal_power * u8 BTRxRSSIPercentage -> bt_rx_rssi_percentage * u8 SignalStrength -> signal_strength * s8 RxPwr -> rx_pwr * u8 RxSNR -> rx_snr * u8 BandWidth => band_width * u8 btCoexPwrAdjust -> bt_coex_pwr_adjust Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_com.c | 10 +-- drivers/staging/rtl8723bs/hal/odm.h | 49 +++++++------ drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 98 +++++++++++++------------- drivers/staging/rtl8723bs/hal/odm_HWConfig.h | 2 +- drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 3 +- drivers/staging/rtl8723bs/include/rtw_mlme.h | 2 +- drivers/staging/rtl8723bs/include/rtw_recv.h | 10 +-- 7 files changed, 90 insertions(+), 84 deletions(-) commit 3df3602ac74b641f54149599c78d3606b467f58e Author: Quytelda Kahja Date: Tue Mar 27 01:41:13 2018 -0700 staging: rtl8723bs: Rework 'struct _ODM_Per_Pkt_Info_' coding style. Change the typedef'd 'struct _ODM_Per_Pkt_Info_' into 'struct odm_packet_info' and change the members to snake case in order to meet the coding style guidelines. Members: * u8 DataRate -> data_rate * u8 StationID -> station_id * bool bPacketMatchBSSID -> bssid_match * bool bPacketToSelf -> to_self * bool bPacketBeacon -> is_beacon * bool bToSelf -> (removed because it isn't used) Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/odm.h | 16 +++++------ drivers/staging/rtl8723bs/hal/odm_CfoTracking.c | 4 +-- drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 26 ++++++++--------- drivers/staging/rtl8723bs/hal/odm_HWConfig.h | 2 +- drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 37 +++++++++++++------------ 5 files changed, 43 insertions(+), 42 deletions(-) commit 9f534f7ee8558dd327f63fe07a9127eb32789065 Author: Quytelda Kahja Date: Tue Mar 27 01:41:12 2018 -0700 staging: rtl8723bs: Replace NULL pointer comparison with '!'. Replace the comparison of 'precvbuf' to 'NULL' with '!precvbuf'. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ff7c1aadd1a061bd360d831415eb15438361842 Author: Quytelda Kahja Date: Tue Mar 27 01:41:11 2018 -0700 staging: rtl8723bs: Factor out rtl8723bs_recv_tasklet() sections. Factor out code from rtl8723bs_recv_tasklet() into helper methods to unindent lines over 80 characters. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 95 +++++++++++++++++++------- 1 file changed, 69 insertions(+), 26 deletions(-) commit e39c83fe8a5382e7402bf7602f1637fafd060228 Author: Quytelda Kahja Date: Tue Mar 27 01:41:10 2018 -0700 staging: rtl8723bs: Fix function signature that goes over 80 characters. Wrap the function parameters for rtl8723bs_c2h_packet_handler() so the function signature doesn't exceed 80 characters. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b37f9e1c38017f35876df149033df6372ae3591d Author: Quytelda Kahja Date: Tue Mar 27 01:41:09 2018 -0700 staging: rtl8723bs: Fix lines too long in update_recvframe_attrib(). Fix lines over the 80 character limit in update_recvframe_attrib(). Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 30 +++++++++++++++++++------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 7cb4604143ef55aa319b6781f9f6e2a8b7a84e5d Author: Quytelda Kahja Date: Tue Mar 27 01:41:08 2018 -0700 staging: rtl8723bs: Remove unnecessary blank lines in 'rtl8723bs_recv.c'. Condense multiple blank lines to one, and remove blank lines before braces. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 7 ------- 1 file changed, 7 deletions(-) commit 85e790fc97672ab940c54d74f37ac79f94981974 Author: Quytelda Kahja Date: Tue Mar 27 01:41:07 2018 -0700 staging: rtl8723bs: Change camel case to snake case in 'rtl8723bs_recv.c'. Linux kernel coding style dictates the use of snake case for variable naming. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 3087985a65327a6d578c12b9f4df7e75d00462da Author: Quytelda Kahja Date: Tue Mar 27 01:41:06 2018 -0700 staging: rtl8723bs: Add missing braces in else statement. The style rule to leave out braces in single line conditional statements doesn't apply when one branch is multiple lines. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4041eeb8fc1440b8d8fc4d83eb2f91f00307f34c Author: Quytelda Kahja Date: Tue Mar 27 01:41:05 2018 -0700 staging: rtl8723bs: Add spaces around ternary operators. The Linux kernel coding style calls for spaces around binary and ternary operators. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbfa0358a29686227d23b4530700e2b23949ef34 Author: Quytelda Kahja Date: Tue Mar 27 01:41:04 2018 -0700 staging: rtl8723bs: Fix lines with trailing open parentheses. Realign the arguments for update_recvframe_attrib() and update_recvframe_phyinfo() so there is no trailing open parenthesis. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 7d0b4f3c9300f43b65125115f5728e1a5d39e270 Author: Quytelda Kahja Date: Tue Mar 27 01:41:03 2018 -0700 staging: rtl8723bs: Remove unnecessary length #define's. This driver statically defines constants representing the size of certain structs using literal integers as values. Replace those constants with the sizeof() macro. Other length constants are already defined in 'linux/ieee80211.h'; remove those #define's. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 6 +++--- drivers/staging/rtl8723bs/include/ieee80211.h | 16 ---------------- 2 files changed, 3 insertions(+), 19 deletions(-) commit 5befa937e8daaebcde81b9423eb93f3ff2e918f7 Author: Quytelda Kahja Date: Tue Mar 27 01:41:02 2018 -0700 staging: rtl8723bs: Fix IEEE80211 authentication algorithm constants. This driver's local ieee80211 include file defines the constants AUTH_ALG_* to represent authenication algorithm options. However, these constants are defined in 'linux/ieee80211.h' as WLAN_AUTH_*, and have the correct values. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/include/ieee80211.h | 4 ---- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 16 ++++++++-------- 2 files changed, 8 insertions(+), 12 deletions(-) commit 79652e2c9bc40422ea044d08464b7f12f016c590 Author: Quytelda Kahja Date: Tue Mar 27 01:41:01 2018 -0700 staging: rtl8723bs: Fix alignment in rtw_wx_set_auth(). Realign the function parameters and comment blocks to match the kernel coding style. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 86c0205ba20c4766dd28a7f5c34afdebccda22e2 Author: Quytelda Kahja Date: Tue Mar 27 01:41:00 2018 -0700 staging: rtl8723bs: Remove braces from single statement conditionals. Several conditionals in rtw_wx_set_auth() contain a comment then a single statement. Move the comments to the top of the conditionals so that braces can be removed from the statements, which saves space and makes the code more readable. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 41ed8df9bd50489f8d9157645e979775ecb65102 Author: Quytelda Kahja Date: Tue Mar 27 01:40:59 2018 -0700 staging: rtl8723bs: Remove unecessary braces from switch statement. The switch statement in rtw_wx_set_auth() wraps individual cases in braces for no reason. Remove those braces and unindent the code. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 50 ++++++++++++-------------- 1 file changed, 23 insertions(+), 27 deletions(-) commit 5933a3c34e93737d53fe3e89cf5ce39ea0b37c39 Author: Quytelda Kahja Date: Tue Mar 27 01:40:58 2018 -0700 staging: rtl8723bs: Fix newlines in rtw_wx_set_auth(). There are a lot of extra newlines in this function that waste space. Remove those newlines, but add one newline before the return statement. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit c3e96015be4fe69e31acabfe5b8b6e03bd621f1f Author: Quytelda Kahja Date: Tue Mar 27 01:40:57 2018 -0700 staging: rtl8723bs: Replace RTW_IEEE80211_STYPE_* with IEEE80211_STYPE_*. This driver defines the constants RTW_IEEE80211_STYPE_*, but all these values are already defined in 'linux/ieee80211.h' as IEEE80211_STYPE_*. Remove the locally defined constants, and substitute the kernel constants. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 2 +- drivers/staging/rtl8723bs/include/ieee80211.h | 43 ----------------------- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +- 3 files changed, 2 insertions(+), 45 deletions(-) commit d95908d567d2766c9b29662d185af24c370307a9 Author: Quytelda Kahja Date: Tue Mar 27 01:40:56 2018 -0700 staging: rtl8723bs: Replace RTW_IEEE80211_FTYPE_* with IEEE80211_FTYPE_*. This driver defines the constants RTW_IEEE80211_FTYPE_*, but all these values are already defined in 'linux/ieee80211.h' as IEEE80211_FTYPE_*. Remove the locally defined constants, and substitute the kernel constants. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 2 +- drivers/staging/rtl8723bs/include/ieee80211.h | 5 ----- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 ++-- 3 files changed, 3 insertions(+), 8 deletions(-) commit bea9145ac48d8dc08bb9889ac9024b8bc6e4a10a Author: Quytelda Kahja Date: Tue Mar 27 01:40:55 2018 -0700 staging: rtl8723bs: Replace RTW_IEEE80211_FCTL_* with IEEE80211_FCTL_*. This driver defines the constants RTW_IEEE80211_FCTL_* for frame control constants, but all these values are already defined in 'linux/ieee80211.h' as IEEE80211_FCTL_*. Remove the locally defined constants, and substitute the kernel constants. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 2 +- drivers/staging/rtl8723bs/include/ieee80211.h | 18 ++---------------- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 6 +++--- 3 files changed, 6 insertions(+), 20 deletions(-) commit 15800332d90fbf098e2d2df0a6b4408d1e1ab544 Author: Quytelda Kahja Date: Tue Mar 27 01:40:54 2018 -0700 staging: rtl8723bs: Remove #defines shadowing enums in 'linux/ieee80211.h' The modified file includes 'linux/ieee80211.h', but #define's many constants that shadow enum members in the header. This will create a conflict if the values are ever changed in the kernel. Remove these Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/include/ieee80211.h | 56 --------------------------- 1 file changed, 56 deletions(-) commit de9c06518cf1601a51ea561b9d8406f79475b4fc Author: Rene Hickersberger Date: Tue Mar 27 18:14:37 2018 +0200 drivers: staging: rtl8192e: fixed a space coding style issue There was a weird space before the struct which is now removed. Signed-off-by: Rene Hickersberger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl819x_BAProc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 250f26c5848c26577c29e200983ef16189376a37 Author: Colin Ian King Date: Sun Mar 25 18:05:21 2018 +0100 staging: r8822be: fix typos in header guard macros The macros for __PHYDMKFREE_H__ and __PHYDM_FEATURES_H__ contain typos and don't match the #if guard check. Defined them correctly. Cleans up clang warnings: warning: '__PHYDMKFREE_H__' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] warning: '__PHYDM_FEATURES_H__' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/phydm/phydm_features.h | 2 +- drivers/staging/rtlwifi/phydm/phydm_kfree.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 626118b472d2eb45f83a0276a18d3e6a01c69f6a Author: Kirill Marinushkin Date: Fri Mar 23 20:32:54 2018 +0100 staging: bcm2835-audio: Release resources on module_exit() In the current implementation, `rmmod snd_bcm2835` does not release resources properly. It causes an oops when trying to list sound devices. This commit fixes it. The details WRT allocation / free are described below. Device structure WRT allocation: pdev \childdev[] \card \chip \pcm \ctl Allocation / register sequence: * childdev: devm_kzalloc - freed during driver detach * childdev: device_initialize - freed during device_unregister * pdev: devres_alloc - freed during driver detach * childdev: device_add - removed during device_unregister * pdev, childdev: devres_add - freed during driver detach * card: snd_card_new - freed during snd_card_free * chip: kzalloc - freed during kfree * card, chip: snd_device_new - freed during snd_device_free * chip: new_pcm - TODO: free pcm * chip: new_ctl - TODO: free ctl * card: snd_card_register - unregistered during snd_card_free Free / unregister sequence: * card: snd_card_free * card, chip: snd_device_free * childdev: device_unregister * chip: kfree Steps to reproduce the issue before this commit: ~~~~ $ rmmod snd_bcm2835 $ aplay -L [ 138.648130] Unable to handle kernel paging request at virtual address 7f1343c0 [ 138.660415] pgd = ad8f0000 [ 138.665567] [7f1343c0] *pgd=3864c811, *pte=00000000, *ppte=00000000 [ 138.674887] Internal error: Oops: 7 [#1] SMP ARM [ 138.683571] Modules linked in: sha256_generic cfg80211 rfkill snd_pcm snd_timer snd fixed uio_pdrv_genirq uio ip_tables x_tables ipv6 [last unloaded: snd_bcm2835 ] [ 138.706594] CPU: 3 PID: 463 Comm: aplay Tainted: G WC 4.15.0-rc1-v 7+ #6 [ 138.719833] Hardware name: BCM2835 [ 138.726016] task: b877ac00 task.stack: aebec000 [ 138.733408] PC is at try_module_get+0x38/0x24c [ 138.740813] LR is at snd_ctl_open+0x58/0x194 [snd] [ 138.748485] pc : [<801c4d5c>] lr : [<7f0e6b2c>] psr: 20000013 [ 138.757709] sp : aebedd60 ip : aebedd88 fp : aebedd84 [ 138.765884] r10: 00000000 r9 : 00000004 r8 : 7f0ed440 [ 138.774040] r7 : b7e469b0 r6 : 7f0e6b2c r5 : afd91900 r4 : 7f1343c0 [ 138.783571] r3 : aebec000 r2 : 00000001 r1 : b877ac00 r0 : 7f1343c0 [ 138.793084] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 138.803300] Control: 10c5387d Table: 2d8f006a DAC: 00000055 [ 138.812064] Process aplay (pid: 463, stack limit = 0xaebec210) [ 138.820868] Stack: (0xaebedd60 to 0xaebee000) [ 138.828207] dd60: 00000000 b848d000 afd91900 00000000 b7e469b0 7f0ed440 aebedda4 aebedd88 [ 138.842371] dd80: 7f0e6b2c 801c4d30 afd91900 7f0ea4dc 00000000 b7e469b0 aebeddcc aebedda8 [ 138.856611] dda0: 7f0e250c 7f0e6ae0 7f0e2464 b8478ec0 b7e469b0 afd91900 7f0ea388 00000000 [ 138.870864] ddc0: aebeddf4 aebeddd0 802ce590 7f0e2470 8090ab64 afd91900 afd91900 b7e469b0 [ 138.885301] dde0: afd91908 802ce4e4 aebede1c aebeddf8 802c57b4 802ce4f0 afd91900 aebedea8 [ 138.900110] de00: b7fa4c00 00000000 00000000 00000004 aebede3c aebede20 802c6ba8 802c56b4 [ 138.915260] de20: aebedea8 00000000 aebedf5c 00000000 aebedea4 aebede40 802d9a68 802c6b58 [ 138.930661] de40: b874ddd0 00000000 00000000 00000001 00000041 00000000 afd91900 aebede70 [ 138.946402] de60: 00000000 00000000 00000002 b7e469b0 b8a87610 b8d6ab80 801852f8 00080000 [ 138.962314] de80: aebedf5c aebedea8 00000001 80108464 aebec000 00000000 aebedf4c aebedea8 [ 138.978414] dea0: 802dacd4 802d970c b8a87610 b8d6ab80 a7982bc6 00000009 af363019 b9231480 [ 138.994617] dec0: 00000000 b8c038a0 b7e469b0 00000101 00000002 00000238 00000000 00000000 [ 139.010823] dee0: 00000000 aebedee8 00080000 0000000f aebedf3c aebedf00 802ed7e4 80843f94 [ 139.027025] df00: 00000003 00080000 b9231490 b9231480 00000000 00080000 af363000 00000000 [ 139.043229] df20: 00000005 00000002 ffffff9c 00000000 00080000 ffffff9c af363000 00000003 [ 139.059430] df40: aebedf94 aebedf50 802c6f70 802dac70 aebec000 00000000 00000001 00000000 [ 139.075629] df60: 00020000 00000004 00000100 00000001 7ebe577c 0002e038 00000000 00000005 [ 139.091828] df80: 80108464 aebec000 aebedfa4 aebedf98 802c7060 802c6e6c 00000000 aebedfa8 [ 139.108025] dfa0: 801082c0 802c7040 7ebe577c 0002e038 7ebe577c 00080000 00000b98 e81c8400 [ 139.124222] dfc0: 7ebe577c 0002e038 00000000 00000005 7ebe57e4 00a20af8 7ebe57f0 76f87394 [ 139.140419] dfe0: 00000000 7ebe55c4 76ec88e8 76df1d9c 60000010 7ebe577c 00000000 00000000 [ 139.156715] [<801c4d5c>] (try_module_get) from [<7f0e6b2c>] (snd_ctl_open+0x58/0x194 [snd]) [ 139.173222] [<7f0e6b2c>] (snd_ctl_open [snd]) from [<7f0e250c>] (snd_open+0xa8/0x14c [snd]) [ 139.189683] [<7f0e250c>] (snd_open [snd]) from [<802ce590>] (chrdev_open+0xac/0x188) [ 139.205465] [<802ce590>] (chrdev_open) from [<802c57b4>] (do_dentry_open+0x10c/0x314) [ 139.221347] [<802c57b4>] (do_dentry_open) from [<802c6ba8>] (vfs_open+0x5c/0x88) [ 139.236788] [<802c6ba8>] (vfs_open) from [<802d9a68>] (path_openat+0x368/0x944) [ 139.248270] [<802d9a68>] (path_openat) from [<802dacd4>] (do_filp_open+0x70/0xc4) [ 139.263731] [<802dacd4>] (do_filp_open) from [<802c6f70>] (do_sys_open+0x110/0x1d4) [ 139.279378] [<802c6f70>] (do_sys_open) from [<802c7060>] (SyS_open+0x2c/0x30) [ 139.290647] [<802c7060>] (SyS_open) from [<801082c0>] (ret_fast_syscall+0x0/0x28) [ 139.306021] Code: e3c3303f e5932004 e2822001 e5832004 (e5943000) [ 139.316265] ---[ end trace 7f3f7f6193b663ed ]--- [ 139.324956] note: aplay[463] exited with preempt_count 1 ~~~~ Signed-off-by: Kirill Marinushkin Cc: Eric Anholt Cc: Stefan Wahren Cc: Greg Kroah-Hartman Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: Michael Zoran Cc: Andy Shevchenko Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/bcm2835-audio/bcm2835.c | 54 ++++++++++------------ 1 file changed, 25 insertions(+), 29 deletions(-) commit e10b178176f7d1ee9b3cdab223061d8764c5c17f Author: Paul McQuade Date: Tue Mar 27 20:07:24 2018 +0100 staging: comedi: s626: Use Preferred kernel type Change to kenel type u8 or u16 instead of uint8_t or uint16_t Signed-off-by: Paul McQuade Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/s626.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8e2ff0e4b526179e75cdcd221d94c8ff93070889 Author: Nishka Dasgupta Date: Sat Mar 24 08:03:57 2018 +0000 staging: mt7621-dts: Replace spaces with tabs in indentation Replace spaces with tabs in indentation. Issue found with checkpatch. Signed-off-by: Nishka Dasgupta Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-dts/mt7621.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7423c4e399cfc5b03b62e34735df520e4c789531 Author: Quytelda Kahja Date: Wed Mar 28 22:51:49 2018 -0700 staging: ks7010: Remove unused member 'reg_net' from 'ks_wlan_private'. 'reg_net' is never used in this driver. Signed-off-by: Quytelda Kahja x Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan.h | 1 - 1 file changed, 1 deletion(-) commit f40cd66b45b3fc2822e3abb254929c6e2820ab91 Author: Quytelda Kahja Date: Wed Mar 28 22:51:48 2018 -0700 staging: ks7010: Change mac_address_valid to a bool instead of int. 'mac_address_valid' is only ever assigned 0 or 1, so it makes more sense to use a bool type for this variable. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 4 ++-- drivers/staging/ks7010/ks_wlan.h | 2 +- drivers/staging/ks7010/ks_wlan_net.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 019ec78508d5dd21589c3ff60ecbe90a54a7a14b Author: Quytelda Kahja Date: Wed Mar 28 22:51:45 2018 -0700 staging: ks7010: Remove unecessary cast. The driver casts '&ks_wlan_handler_def' to 'struct iw_handler_def *', but it is already of that type. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8f7cac0a4b2f94d28b252086a808089d53ad926 Author: Sergio Paracuellos Date: Wed Mar 28 17:24:28 2018 +0200 staging: ks7010: replace uint8_t in favour of u8 in michael_get_mic This commit replaces uint8_t parameter for preferred one u8 in michael_get_mic function. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/michael_mic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d89799a04d7c5b531a7e4cfc24fa9cd85f8a033 Author: Sergio Paracuellos Date: Wed Mar 28 17:24:27 2018 +0200 staging: ks7010: replace uint8_t in favour of u8 in michael_append This commit replaces param which is uint8_t in michael_append function in favour of preferred one u8. It also removes no more needed casts when calling this function. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/michael_mic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a63be5d947553ea18ac23b44b1dc93adca4e227b Author: Sergio Paracuellos Date: Wed Mar 28 17:24:26 2018 +0200 staging: ks7010: replace uint8_t in favour of u8 in michael_init This commit replaces uint8_t for preferred one u8 in parameter of michael_init function. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/michael_mic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0a2a25460a755db63750eeea89a74657e7eda0d Author: Sergio Paracuellos Date: Wed Mar 28 17:24:25 2018 +0200 staging: ks7010: remove some dead code from ks_wlan_set_essid function This commit removes death code which is not being used at all. The statements which are contained inside the else block of preprocessor #if 1 directive are no sense. Also remove #if 1 preprocessor stuff just because it is just true and being executed always. This change improves a bit readability of ks_wlan_set_essid function. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 15 --------------- 1 file changed, 15 deletions(-) commit c61cc2cc3be358da10121d119356dfe67fe240f2 Author: Sergio Paracuellos Date: Wed Mar 28 17:24:24 2018 +0200 staging: ks7010: replace MichaelBlockFunction macro with inline function This commit replaces MichaelBlockFunction macro with similar inline function renaming it to michael_block. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/michael_mic.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit f7380a88dacc9a52e4329a79cacf4665e9b2047b Author: Sergio Paracuellos Date: Wed Mar 28 17:24:23 2018 +0200 staging: ks7010: replace GetUInt32 macro with get_unaligned_le32 This commit replaces custom GetUInt32 macro with get_unaligned_le32 which is included in the linux kernel. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/michael_mic.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 8da5b3e7f794cce95eb420bf42b65c14886cc85c Author: Sergio Paracuellos Date: Wed Mar 28 17:24:22 2018 +0200 staging: ks7010: replace PutUInt32 macro with put_unaligned_le32() This commit replaces PutUInt32 custom macro with put_unaligned_le32 function included in the linux kernel. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/michael_mic.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 9018154f1bac0a3c30ea9b174d5e7f5e4fd3570c Author: Sergio Paracuellos Date: Wed Mar 28 17:24:21 2018 +0200 staging: ks7010: avoid camel cases in MichaelGetMIC function This commit avoid camel cases in MichaelGetMIC function and params renaming it to michael_get_mic. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/michael_mic.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit ca0bda153137cc23204d2a7f47e952c0f41d7b1a Author: Sergio Paracuellos Date: Wed Mar 28 17:24:20 2018 +0200 staging: ks7010: replace macro MichaelClear with inline function This commit replaces MichaelClear macro with similar inline function renaming it to michael_clear. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/michael_mic.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 79955850b18081e58a17ecf44e03fae2d0e3628d Author: Sergio Paracuellos Date: Wed Mar 28 17:24:19 2018 +0200 staging: ks7010: avoid camel cases in MichaelAppend function This commit avoid camel cases in MichaelAppend function and params renaming it to michael_append. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/michael_mic.c | 45 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 23 deletions(-) commit 808a05c007cdf408b6ca640bf5673538b68ddd30 Author: Sergio Paracuellos Date: Wed Mar 28 17:24:18 2018 +0200 staging: ks7010: avoid camel cases for MichaelInitFunction This commit avoid camel cases in MichaelInitFunction signature and params renaming it to michael_init. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/michael_mic.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit c9be56329a398cf24a5f665850b3ba7fc4064b2d Author: Sergio Paracuellos Date: Wed Mar 28 17:24:17 2018 +0200 staging: ks7010: avoid camel cases in MichaelMICFunction This commit replace camel cases for name and params used in MichaelMICFunction. This improves a bit readability. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 24 ++++++++++++------------ drivers/staging/ks7010/michael_mic.c | 15 +++++++-------- drivers/staging/ks7010/michael_mic.h | 5 ++--- 3 files changed, 21 insertions(+), 23 deletions(-) commit 4d191c75365a0067a9d5b8c8746b1bd9310c5a70 Author: Johannes Berg Date: Thu Mar 29 11:14:30 2018 +0200 mac80211: remove shadowing duplicated variable We already have 'ifmgd' here, and it's already assigned to the same value, so remove the duplicate. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 2 -- 1 file changed, 2 deletions(-) commit db3bdcb9c3ffc628c5284d7ed03a704295ba1214 Author: Manikanta Pubbisetty Date: Wed Mar 28 18:34:19 2018 +0530 mac80211: allow AP_VLAN operation on crypto controlled devices In the current implementation, mac80211 advertises the support of AP_VLANs based on the driver's support for AP mode; it also blocks encrypted AP_VLAN operation on devices advertising SW_CRYPTO_CONTROL. The implementation seems weird in it's current form and could be often confusing, this is because there can be drivers advertising both SW_CRYPTO_CONTROL and AP mode support (ex: ath10k) in which case AP_VLAN will still be supported but only in open BSS and not in secured BSS. When SW_CRYPTO_CONTROL is enabled, it makes more sense if the decision to support AP_VLANs is left to the driver. Mac80211 can then allow AP_VLAN operations depending on the driver support. Signed-off-by: Manikanta Pubbisetty Signed-off-by: Johannes Berg net/mac80211/key.c | 8 +++++--- net/mac80211/main.c | 8 ++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) commit 19d3577e35e0cbb42694811b096e749a0f89a824 Author: Haim Dreyfuss Date: Wed Mar 28 13:24:11 2018 +0300 cfg80211: Add API to allow querying regdb for wmm_rule In general regulatory self managed devices maintain their own regulatory profiles thus it doesn't have to query the regulatory database on country change. ETSI has recently introduced a new channel access mechanism for 5GHz that all wlan devices need to comply with. These values are stored in the regulatory database. There are self managed devices which can't maintain these values on their own. Add API to allow self managed regulatory devices to query the regulatory database for high band wmm rule. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho [johannes: fix documentation] Signed-off-by: Johannes Berg include/net/cfg80211.h | 28 ++++++++++++++++++++++++++ net/wireless/reg.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) commit 1ca5033101032f49e798d2f07971d87d48bda3ed Merge: c91815b 79a0b33 Author: Greg Kroah-Hartman Date: Thu Mar 29 11:22:53 2018 +0200 Merge tag 'usb-serial-4.17-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.17-rc1 Here are the USB-serial updates for 4.17-rc1, including a reimplementation of the option-driver interface masking which allows for a more compact notation when adding new device entries. Included are also a couple of clean ups and a new ftdi_sio device id. All but the device-id commit have been in linux-next (without any reported issues). Signed-off-by: Johan Hovold commit e552af058148498c8a0874edf6b022caea9cb2b7 Author: Haim Dreyfuss Date: Wed Mar 28 13:24:10 2018 +0300 mac80211: limit wmm params to comply with ETSI requirements ETSI has recently added new requirements that restrict the WMM parameter values for 5GHz frequencies. We need to take care of the following scenarios in order to comply with these new requirements: 1. When using mac80211 default values; 2. When the userspace tries to configure its own values; 3. When associating to an AP which advertises WWM IE. When associating to an AP, the client uses the values in the advertised WMM IE. But the AP may not comply with the new ETSI requirements, so the client needs to check the current regulatory rules and use those limits accordingly. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/cfg.c | 3 +++ net/mac80211/ieee80211_i.h | 4 ++++ net/mac80211/mlme.c | 1 + net/mac80211/util.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+) commit 5bf16a11ba2940c67d0b3a2154813bb42e8c6281 Author: Johannes Berg Date: Tue Feb 27 11:22:15 2018 +0100 cfg80211: don't require RTNL held for regdomain reads The whole code is set up to allow RCU reads of this data, but then uses rtnl_dereference() which requires the RTNL. Convert it to rcu_dereference_rtnl() which makes it require only RCU or the RTNL, to allow RCU-protected reading of the data. Reviewed-by: Coelho, Luciano Signed-off-by: Johannes Berg net/wireless/reg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 230ebaa189af44d50dccb4a1846e39ca594e347b Author: Haim Dreyfuss Date: Wed Mar 28 13:24:09 2018 +0300 cfg80211: read wmm rules from regulatory database ETSI EN 301 893 v2.1.1 (2017-05) standard defines a new channel access mechanism that all devices (WLAN and LAA) need to comply with. The regulatory database can now be loaded into the kernel and also has the option to load optional data. In order to be able to comply with ETSI standard, we add wmm_rule into regulatory rule and add the option to read its value from the regulatory database. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho [johannes: fix memory leak in error path] Signed-off-by: Johannes Berg include/net/regulatory.h | 28 +++++++++ net/wireless/reg.c | 148 ++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 169 insertions(+), 7 deletions(-) commit a72c92629108bb8ad756f31b74791c51e1de2af4 Author: Joe Perches Date: Wed Mar 21 03:32:52 2018 -0700 ath: Remove unnecessary ath_bcast_mac and use eth_broadcast_addr Remove the static array and use the generic routine to set the Ethernet broadcast address. Signed-off-by: Joe Perches Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath.h | 2 -- drivers/net/wireless/ath/ath5k/attach.c | 2 +- drivers/net/wireless/ath/ath9k/htc_drv_init.c | 2 +- drivers/net/wireless/ath/ath9k/init.c | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) commit b44d419b98fae759b4f746186b1d1c8d01d962f2 Author: Dan Carpenter Date: Thu Mar 29 12:03:19 2018 +0300 ALSA: usb-audio: silence a static checker warning We recently made "format" a u64 variable so now static checkers complain that this shift will wrap around if format is more than 31. I don't think it makes a difference for runtime, but it's simple to silence the warning. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai sound/usb/format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b3fdb50f88195a9814a8301fad6325868881bb6 Author: Rajkumar Manoharan Date: Wed Mar 28 12:40:24 2018 +0300 ath10k: fix vdev stats for 10.4 firmware Currently vdev stats displayed in fw_stats are applicable only for TLV based firmware and fix it for 10.4 firmware as of now. The vdev stats in 10.4 firmware is split into two parts (vdev_stats, vdev_stats_extended). The actual stats are captured only in extended vdev stats. In order to enable vdev stats, appropriate feature bit will be set on extended resource config. As FTM related counters are available only on newer 10.4 based firmware, these counters will be displayed only on valid data. Signed-off-by: Rajkumar Manoharan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 6 +- drivers/net/wireless/ath/ath10k/core.h | 21 +++++ drivers/net/wireless/ath/ath10k/wmi.c | 151 ++++++++++++++++++++++++++++----- drivers/net/wireless/ath/ath10k/wmi.h | 27 +++++- 4 files changed, 184 insertions(+), 21 deletions(-) commit 91493e8e10f0f495b04a5c32096d56ea1f254c93 Author: Christian Lamparter Date: Wed Mar 28 12:19:55 2018 +0300 ath10k: fix recent bandwidth conversion bug The commit "cfg80211: make RATE_INFO_BW_20 the default" changed the index of RATE_INFO_BW_20, but the updates to ath10k missed the special bandwidth calculation case in ath10k_update_per_peer_tx_stats(). This will fix below warning, WARNING: CPU: 0 PID: 609 at net/wireless/util.c:1254 cfg80211_calculate_bitrate+0x174/0x220 invalid rate bw=1, mcs=9, nss=2 (unwind_backtrace) from (cfg80211_calculate_bitrate+0x174/0x220) (cfg80211_calculate_bitrate) from (nl80211_put_sta_rate+0x44/0x1dc)from (nl80211_put_sta_rate) from (nl80211_send_station+0x388/0xaf0) (nl80211_get_station+0xa8/0xec) [ end trace da8257d6a850e91a ] Fixes: 842be75c77cb ("cfg80211: make RATE_INFO_BW_20 the default") Signed-off-by: Christian Lamparter Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 42 ++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 18 deletions(-) commit 8ebee73b574ad3dd1f14d461f65ceaffbd637650 Author: Anilkumar Kolli Date: Wed Mar 28 12:19:40 2018 +0300 ath10k: advertize beacon_int_min_gcd This patch fixes regression caused by 0c317a02ca98 ("cfg80211: support virtual interfaces with different beacon intervals"), with this change cfg80211 expects the driver to advertize 'beacon_int_min_gcd' to support different beacon intervals in multivap scenario. This support is added for, QCA988X/QCA99X0/QCA9984/QCA4019. Verifed AP + mesh bring up on QCA9984 with beacon interval 100msec and 1000msec respectively. Frimware: firmware-5.bin_10.4-3.5.3-00053 Fixes: 0c317a02ca98 ("cfg80211: support virtual interfaces with different beacon intervals") Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 2 ++ 1 file changed, 2 insertions(+) commit 9cdd005750293c0e7e9276546e02b290d0bafeb0 Author: Yingying Tang Date: Wed Mar 28 12:15:35 2018 +0300 ath10k: fix TDLS peer TX data failure issue on encryped AP For WPA encryption, QCA6174 firmware(version: WLAN.RM.4.4) will unblock data when M4 was sent successfully. For other encryption which didn't need 4-way handshake firmware will unblock the data when peer authorized. Since TDLS is 3-way handshake host need send authorize cmd to firmware to unblock data. Signed-off-by: Yingying Tang Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 4 ++++ 1 file changed, 4 insertions(+) commit c3816c9ee12c235dde8f382619a38a5ce86fb548 Author: Yingying Tang Date: Wed Mar 28 12:15:23 2018 +0300 ath10k: avoid to set WEP key for TDLS peer TDLS peer do not need WEP key. Setting WEP key will lead to TDLS setup failure. Add fix to avoid setting WEP key for TDLS peer. Signed-off-by: Yingying Tang Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c9f8d114660c68b43918f671bd8fc6bdf3bdbd8 Author: Yingying Tang Date: Wed Mar 28 12:13:07 2018 +0300 ath10k: enable TDLS peer inactivity detection Enable TDLS peer inactivity detetion feature. QCA6174 firmware(version: WLAN.RM.4.4) support TDLS link inactivity detecting. Set related parameters in TDLS WMI command to enable this feature. Signed-off-by: Yingying Tang Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi-tlv.c | 52 +++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi-tlv.h | 7 +++++ drivers/net/wireless/ath/ath10k/wmi.h | 1 + 3 files changed, 60 insertions(+) commit 802ca335496e0c30518434d59f744596eff079b0 Author: Yingying Tang Date: Wed Mar 28 12:12:52 2018 +0300 ath10k: enable TDLS peer buffer STA feature Enable TDLS peer buffer STA feature. QCA6174 firmware(version: WLAN.RM.4.4) support TDLS peer buffer STA, it reports this capability through wmi service map in wmi service ready event. Set related parameter in TDLS WMI command to enable this feature. Signed-off-by: Yingying Tang Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 3 +++ drivers/net/wireless/ath/ath10k/wmi-tlv.c | 3 +++ 2 files changed, 6 insertions(+) commit f276ba06e8b2db6d43b78964ec89b827d6b33537 Author: Daniel Mack Date: Tue Mar 27 11:26:58 2018 +0300 wcn36xx: dequeue all pending indicator messages In case wcn36xx_smd_rsp_process() is called more than once before hal_ind_work was dispatched, the messages will end up in hal_ind_queue, but wcn36xx_ind_smd_work() will only look at the first message in that list. Fix this by dequeing the messages from the list in a loop, and only stop when it's empty. This issue was found during a review of the driver. In my tests, that race never actually occured. Signed-off-by: Daniel Mack Reviewed-by: Bjorn Andersson Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/smd.c | 95 +++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 43 deletions(-) commit e5f9908155c96d945b6d1053701b6168c4e8decc Author: Loic Poulain Date: Tue Mar 27 11:26:57 2018 +0300 wcn36xx: Fix firmware crash due to corrupted buffer address wcn36xx_start_tx function retrieves the buffer descriptor from the channel control queue to start filling tx buffer information. However, nothing prevents this same buffer to be concurrently accessed in a concurent tx call, leading to potential buffer coruption and firmware crash (observed during iperf test). The channel control queue should only be accessed and updated with the channel lock. Fix this issue by using a local buffer descriptor which will be copied in the thread-safe wcn36xx_dxe_tx_frame. Note that buffer descriptor size is few bytes so the introduced copy overhead is insignificant. Moreover, this allows to keep the locked section minimal. Signed-off-by: Loic Poulain Signed-off-by: Ramon Fried Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/dxe.c | 13 ++++--------- drivers/net/wireless/ath/wcn36xx/dxe.h | 3 ++- drivers/net/wireless/ath/wcn36xx/txrx.c | 32 ++++++++++---------------------- 3 files changed, 16 insertions(+), 32 deletions(-) commit ee35eecb08220978f68a6987f71c5132f40d4a10 Author: Ramon Fried Date: Tue Mar 27 11:26:55 2018 +0300 wcn36xx: turn off probe response offloading It appears that the WCN36xx firmware doesn't actually respond to probe requests. Until it's resolved, switch the probe response responsibility to the 802.11 layer to allow creation of hidden SSID AP's. Signed-off-by: Ramon Fried Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/main.c | 2 -- 1 file changed, 2 deletions(-) commit 219cc084c67061ee7eafc47e68874d451fa2fff8 Author: Anilkumar Kolli Date: Tue Mar 27 11:26:52 2018 +0300 ath10k: add memory dump support QCA9984 QCA9984/QCA99X0/QCA4019 chipsets have 8 memory regions, dump all of them to the firmware coredump file. Some of the regions need to be read using ioread() so add new region types for them. Signed-off-by: Anilkumar Kolli [kvalo: refactoring etc] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/coredump.c | 90 ++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/coredump.h | 2 + drivers/net/wireless/ath/ath10k/pci.c | 43 ++++++++++++++ 3 files changed, 135 insertions(+) commit 10c2288430817981cab70fc4b78e405765be93b1 Author: Kalle Valo Date: Tue Mar 27 11:26:50 2018 +0300 ath10k: refactor ath10k_pci_dump_memory() in preparation for QCA9984 support As QCA9984 needs two region types refactor the code to make it easier add the new types. No functional changes. Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 55 +++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 19 deletions(-) commit 606204bb863fa3b0bb54929d79b4dc46338f9180 Author: Sathishkumar Muruganandam Date: Tue Mar 27 11:26:46 2018 +0300 ath10k: suppress "Unknown eventid: 36925" warnings FW has Smart Logging feature enabled by default for detecting failures and processing FATAL_CONDITION_EVENTID (36925 - 0x903D) back to host. Since ath10k doesn't implement the Smart Logging and FATAL CONDITION EVENT processing yet, suppressing the unknown event ID warning by moving this under ATH10K_DBG_WMI. Simulated the same issue by having associated STA powered off when ping flood was running from AP backbone. This triggerd STA KICKOUT in AP followed by FATAL CONDITION event 36925. Issue was reproduced and verified in below DUT ------------------------------------------------ AP mode of OpenWRT QCA9984 running 6.0.8 with FW ver 10.4-3.5.3-00053 Signed-off-by: Sathishkumar Muruganandam Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi.c | 1 + 1 file changed, 1 insertion(+) commit e3814bec380f6f848ab619abcdfff320a839cabc Author: Ryan Hsu Date: Tue Mar 27 11:25:38 2018 +0300 ath10k: add FW API 6 firmware image for QCA9377 Firmware WLAN.TF.2.1-00014-QCARMSWP-1 now supports reading the board ID information and also required 9 IRAM bank, which older ath10k version don't have the support will fail to be enabled, so in order to maintain the backward compatibility, we need to update the FW API to 6. Signed-off-by: Ryan Hsu Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 1 + 1 file changed, 1 insertion(+) commit e98199a8c27f6ac8900307bc611ca4b15467f324 Author: Ryan Hsu Date: Tue Mar 27 11:25:36 2018 +0300 ath10k: enable QCA6174/QCA9377 to read the chip temperature The firmware of QCA6174/QCA9377 already support the feature, just enable it to be able to handle the get_temperature command and process the event. You can read the temperature by using the hwmon interface, cat /sys/class/ieee80211/phy*/device/hwmon/hwmon2/temp1_input Verified with the following hardware and software combination, QCA6174, only firmware-4.bin doesn't support this, otherwise all support. QCA9377, all the firmwares upstreamed support this command Signed-off-by: Ryan Hsu Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi-tlv.c | 39 +++++++++++++++++++++++++++++-- drivers/net/wireless/ath/ath10k/wmi-tlv.h | 11 +++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) commit 55cc11da69895a680940c1733caabc37be685f5e Author: Karthikeyan Periyasamy Date: Tue Mar 27 11:25:29 2018 +0300 Revert "ath10k: send (re)assoc peer command when NSS changed" This reverts commit 55884c045d31a29cf69db8332d1064a1b61dd159. When Ath10k is in AP mode and an unassociated STA sends a VHT action frame (Operating Mode Notification for the NSS change) periodically to AP this causes ath10k to call ath10k_station_assoc() which sends WMI_PEER_ASSOC_CMDID during NSS update. Over the time (with a certain client it can happen within 15 mins when there are over 500 of these VHT action frames) continuous calls of WMI_PEER_ASSOC_CMDID cause firmware to assert due to resource exhaust. To my knowledge setting WMI_PEER_NSS peer param itself enough to handle NSS updates and no need to call ath10k_station_assoc(). So revert the original commit from 2014 as it's unclear why the change was really needed. Now the firmware assert doesn't happen anymore. Issue observed in QCA9984 platform with firmware version:10.4-3.5.3-00053. This Change tested in QCA9984 with firmware version: 10.4-3.5.3-00053 and QCA988x platform with firmware version: 10.2.4-1.0-00036. Firmware Assert log: ath10k_pci 0002:01:00.0: firmware crashed! (guid e61f1274-9acd-4c5b-bcca-e032ea6e723c) ath10k_pci 0002:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe ath10k_pci 0002:01:00.0: kconfig debug 1 debugfs 1 tracing 0 dfs 1 testmode 1 ath10k_pci 0002:01:00.0: firmware ver 10.4-3.5.3-00053 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast crc32 4c56a386 ath10k_pci 0002:01:00.0: board_file api 2 bmi_id 0:4 crc32 c2271344 ath10k_pci 0002:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal otp max-sta 512 raw 0 hwcrypto 1 ath10k_pci 0002:01:00.0: firmware register dump: ath10k_pci 0002:01:00.0: [00]: 0x0000000A 0x000015B3 0x00981E5F 0x00975B31 ath10k_pci 0002:01:00.0: [04]: 0x00981E5F 0x00060530 0x00000011 0x00446C60 ath10k_pci 0002:01:00.0: [08]: 0x0042F1FC 0x00458080 0x00000017 0x00000000 ath10k_pci 0002:01:00.0: [12]: 0x00000009 0x00000000 0x00973ABC 0x00973AD2 ath10k_pci 0002:01:00.0: [16]: 0x00973AB0 0x00960E62 0x009606CA 0x00000000 ath10k_pci 0002:01:00.0: [20]: 0x40981E5F 0x004066DC 0x00400000 0x00981E34 ath10k_pci 0002:01:00.0: [24]: 0x80983B48 0x0040673C 0x000000C0 0xC0981E5F ath10k_pci 0002:01:00.0: [28]: 0x80993DEB 0x0040676C 0x00431AB8 0x0045D0C4 ath10k_pci 0002:01:00.0: [32]: 0x80993E5C 0x004067AC 0x004303C0 0x0045D0C4 ath10k_pci 0002:01:00.0: [36]: 0x80994AAB 0x004067DC 0x00000000 0x0045D0C4 ath10k_pci 0002:01:00.0: [40]: 0x809971A0 0x0040681C 0x004303C0 0x00441B00 ath10k_pci 0002:01:00.0: [44]: 0x80991904 0x0040688C 0x004303C0 0x0045D0C4 ath10k_pci 0002:01:00.0: [48]: 0x80963AD3 0x00406A7C 0x004303C0 0x009918FC ath10k_pci 0002:01:00.0: [52]: 0x80960E80 0x00406A9C 0x0000001F 0x00400000 ath10k_pci 0002:01:00.0: [56]: 0x80960E51 0x00406ACC 0x00400000 0x00000000 ath10k_pci 0002:01:00.0: Copy Engine register dump: ath10k_pci 0002:01:00.0: index: addr: sr_wr_idx: sr_r_idx: dst_wr_idx: dst_r_idx: ath10k_pci 0002:01:00.0: [00]: 0x0004a000 15 15 3 3 ath10k_pci 0002:01:00.0: [01]: 0x0004a400 17 17 212 213 ath10k_pci 0002:01:00.0: [02]: 0x0004a800 21 21 20 21 ath10k_pci 0002:01:00.0: [03]: 0x0004ac00 25 25 27 25 ath10k_pci 0002:01:00.0: [04]: 0x0004b000 515 515 144 104 ath10k_pci 0002:01:00.0: [05]: 0x0004b400 28 28 155 156 ath10k_pci 0002:01:00.0: [06]: 0x0004b800 12 12 12 12 ath10k_pci 0002:01:00.0: [07]: 0x0004bc00 1 1 1 1 ath10k_pci 0002:01:00.0: [08]: 0x0004c000 0 0 127 0 ath10k_pci 0002:01:00.0: [09]: 0x0004c400 1 1 1 1 ath10k_pci 0002:01:00.0: [10]: 0x0004c800 0 0 0 0 ath10k_pci 0002:01:00.0: [11]: 0x0004cc00 0 0 0 0 ath10k_pci 0002:01:00.0: CE[1] write_index 212 sw_index 213 hw_index 0 nentries_mask 0x000001ff ath10k_pci 0002:01:00.0: CE[2] write_index 20 sw_index 21 hw_index 0 nentries_mask 0x0000007f ath10k_pci 0002:01:00.0: CE[5] write_index 155 sw_index 156 hw_index 0 nentries_mask 0x000001ff ath10k_pci 0002:01:00.0: DMA addr: nbytes: meta data: byte swap: gather: ath10k_pci 0002:01:00.0: [455]: 0x580c0042 0 0 0 0 ath10k_pci 0002:01:00.0: [456]: 0x594a0010 0 0 0 1 ath10k_pci 0002:01:00.0: [457]: 0x580c0042 0 0 0 0 ath10k_pci 0002:01:00.0: [458]: 0x594a0038 0 0 0 1 ath10k_pci 0002:01:00.0: [459]: 0x580c0a42 0 0 0 0 ath10k_pci 0002:01:00.0: [460]: 0x594a0060 0 0 0 1 ath10k_pci 0002:01:00.0: [461]: 0x580c0c42 0 0 0 0 ath10k_pci 0002:01:00.0: [462]: 0x594a0010 0 0 0 1 ath10k_pci 0002:01:00.0: [463]: 0x580c0c42 0 0 0 0 ath10k_pci 0002:01:00.0: [464]: 0x594a0038 0 0 0 1 ath10k_pci 0002:01:00.0: [465]: 0x580c0a42 0 0 0 0 ath10k_pci 0002:01:00.0: [466]: 0x594a0060 0 0 0 1 ath10k_pci 0002:01:00.0: [467]: 0x580c0042 0 0 0 0 ath10k_pci 0002:01:00.0: [468]: 0x594a0010 0 0 0 1 ath10k_pci 0002:01:00.0: [469]: 0x580c1c42 0 0 0 0 ath10k_pci 0002:01:00.0: [470]: 0x594a0010 0 0 0 1 ath10k_pci 0002:01:00.0: [471]: 0x580c1c42 0 0 0 0 ath10k_pci 0002:01:00.0: [472]: 0x594a0010 0 0 0 1 ath10k_pci 0002:01:00.0: [473]: 0x580c1c42 0 0 0 0 ath10k_pci 0002:01:00.0: [474]: 0x594a0010 0 0 0 1 ath10k_pci 0002:01:00.0: [475]: 0x580c0642 0 0 0 0 ath10k_pci 0002:01:00.0: [476]: 0x594a0038 0 0 0 1 ath10k_pci 0002:01:00.0: [477]: 0x580c0842 0 0 0 0 ath10k_pci 0002:01:00.0: [478]: 0x594a0060 0 0 0 1 ath10k_pci 0002:01:00.0: [479]: 0x580c0042 0 0 0 0 ath10k_pci 0002:01:00.0: [480]: 0x594a0010 0 0 0 1 ath10k_pci 0002:01:00.0: [481]: 0x580c0042 0 0 0 0 ath10k_pci 0002:01:00.0: [482]: 0x594a0038 0 0 0 1 ath10k_pci 0002:01:00.0: [483]: 0x580c0842 0 0 0 0 ath10k_pci 0002:01:00.0: [484]: 0x594a0060 0 0 0 1 ath10k_pci 0002:01:00.0: [485]: 0x580c0642 0 0 0 0 ath10k_pci 0002:01:00.0: [486]: 0x594a0010 0 0 0 1 ath10k_pci 0002:01:00.0: [487]: 0x580c0642 0 0 0 0 ath10k_pci 0002:01:00.0: [488]: 0x594a0038 0 0 0 1 ath10k_pci 0002:01:00.0: [489]: 0x580c0842 0 0 0 0 ath10k_pci 0002:01:00.0: [490]: 0x594a0060 0 0 0 1 ath10k_pci 0002:01:00.0: [491]: 0x580c0042 0 0 0 0 ath10k_pci 0002:01:00.0: [492]: 0x58174040 0 1 0 0 ath10k_pci 0002:01:00.0: [493]: 0x5a946040 0 1 0 0 ath10k_pci 0002:01:00.0: [494]: 0x59909040 0 1 0 0 ath10k_pci 0002:01:00.0: [495]: 0x5ae5a040 0 1 0 0 ath10k_pci 0002:01:00.0: [496]: 0x58096040 0 1 0 0 ath10k_pci 0002:01:00.0: [497]: 0x594a0010 0 0 0 1 ath10k_pci 0002:01:00.0: [498]: 0x580c0642 0 0 0 0 ath10k_pci 0002:01:00.0: [499]: 0x5c1e0040 0 1 0 0 ath10k_pci 0002:01:00.0: [500]: 0x58153040 0 1 0 0 ath10k_pci 0002:01:00.0: [501]: 0x58129040 0 1 0 0 ath10k_pci 0002:01:00.0: [502]: 0x5952f040 0 1 0 0 ath10k_pci 0002:01:00.0: [503]: 0x59535040 0 1 0 0 ath10k_pci 0002:01:00.0: [504]: 0x594a0010 0 0 0 1 ath10k_pci 0002:01:00.0: [505]: 0x580c0042 0 0 0 0 ath10k_pci 0002:01:00.0: [506]: 0x594a0010 0 0 0 1 ath10k_pci 0002:01:00.0: [507]: 0x580c0042 0 0 0 0 ath10k_pci 0002:01:00.0: [508]: 0x594a0010 0 0 0 1 ath10k_pci 0002:01:00.0: [509]: 0x580c0042 0 0 0 0 ath10k_pci 0002:01:00.0: [510]: 0x594a0010 0 0 0 1 ath10k_pci 0002:01:00.0: [511]: 0x580c0042 0 0 0 0 ath10k_pci 0002:01:00.0: [512]: 0x5adcc040 0 1 0 0 ath10k_pci 0002:01:00.0: [513]: 0x5cf3d040 0 1 0 0 ath10k_pci 0002:01:00.0: [514]: 0x5c1e9040 64 1 0 0 ath10k_pci 0002:01:00.0: [515]: 0x00000000 0 0 0 0 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4415d58c47e5a48dfd202c63fcfd3d6e653e543b Author: Timothy Redaelli Date: Tue Mar 27 11:25:25 2018 +0300 ath9k: fix DFS detector synchronization some userspace programs (e.g. hostapd) need to set the regulatory domain before selecting the operating channel. Synchronize DFS detector regardless of the value of ah->curchan, to avoid situations where wireless scan can't be done on some 5GHz sub-bands, because dfs_region is constantly UNSET. Acked-by: Felix Fietkau Signed-off-by: Timothy Redaelli Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/init.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 466a306142c002b40deaa58da94741af4153d1c4 Author: Denis Kenzior Date: Mon Mar 26 12:52:47 2018 -0500 nl80211: Add SOCKET_OWNER support to START_AP Signed-off-by: Denis Kenzior Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 2 ++ net/wireless/ap.c | 1 + net/wireless/nl80211.c | 3 +++ 3 files changed, 6 insertions(+) commit 188c1b3c04d69e842122daf201f07a34fcfad039 Author: Denis Kenzior Date: Mon Mar 26 12:52:46 2018 -0500 nl80211: Add SOCKET_OWNER support to JOIN_MESH Signed-off-by: Denis Kenzior [johannes: fix race with wdev lock/unlock by just acquiring once] Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 2 ++ net/wireless/core.h | 4 ---- net/wireless/mesh.c | 16 +--------------- net/wireless/nl80211.c | 10 ++++++++-- 4 files changed, 11 insertions(+), 21 deletions(-) commit 29d049be9438278c47253a74cf8d0ddf36bd5d68 Author: Sebastian Andrzej Siewior Date: Thu Mar 22 16:22:42 2018 +0100 iommu/amd: Return proper error code in irq_remapping_alloc() In the unlikely case when alloc_irq_table() is not able to return a remap table then "ret" will be assigned with an error code. Later, the code checks `index' and if it is negative (which it is because it is initialized with `-1') and then then function properly aborts but returns `-1' instead `-ENOMEM' what was intended. In order to correct this, I assign -ENOMEM to index. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2cd1083d79a0a8c223af430ca97884c28a1e2fc0 Author: Sebastian Andrzej Siewior Date: Thu Mar 22 16:22:41 2018 +0100 iommu/amd: Make amd_iommu_devtable_lock a spin_lock Before commit 0bb6e243d7fb ("iommu/amd: Support IOMMU_DOMAIN_DMA type allocation") amd_iommu_devtable_lock had a read_lock() user but now there are none. In fact, after the mentioned commit we had only write_lock() user of the lock. Since there is no reason to keep it as writer lock, change its type to a spin_lock. I *think* that we might even be able to remove the lock because all its current user seem to have their own protection. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 993ca6e063a69a0c65ca42ed449b6bc1b3844151 Author: Sebastian Andrzej Siewior Date: Thu Mar 22 16:22:40 2018 +0100 iommu/amd: Drop the lock while allocating new irq remap table The irq_remap_table is allocated while the iommu_table_lock is held with interrupts disabled. >From looking at the call sites, all callers are in the early device initialisation (apic_bsp_setup(), pci_enable_device(), pci_enable_msi()) so make sense to drop the lock which also enables interrupts and try to allocate that memory with GFP_KERNEL instead GFP_ATOMIC. Since during the allocation the iommu_table_lock is dropped, we need to recheck if table exists after the lock has been reacquired. I *think* that it is impossible that the "devid" entry appears in irq_lookup_table while the lock is dropped since the same device can only be probed once. However I check for both cases, just to be sure. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 63 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 18 deletions(-) commit 2fcc1e8ac4a8514c64f946178fc36c2e30e56a41 Author: Sebastian Andrzej Siewior Date: Thu Mar 22 16:22:39 2018 +0100 iommu/amd: Factor out setting the remap table for a devid Setting the IRQ remap table for a specific devid (or its alias devid) includes three steps. Those three steps are always repeated each time this is done. Introduce a new helper function, move those steps there and use that function instead. The compiler can still decide if it is worth to inline. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 4fde541c9dc114c5b448ad34b0286fe8b7c550f1 Author: Sebastian Andrzej Siewior Date: Thu Mar 22 16:22:38 2018 +0100 iommu/amd: Use `table' instead `irt' as variable name in amd_iommu_update_ga() The variable of type struct irq_remap_table is always named `table' except in amd_iommu_update_ga() where it is called `irt'. Make it consistent and name it also `table'. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fde65dd3d3096e8f6ecc7bbe544eb91f4220772c Author: Sebastian Andrzej Siewior Date: Thu Mar 22 16:22:37 2018 +0100 iommu/amd: Remove the special case from alloc_irq_table() alloc_irq_table() has a special ioapic argument. If set then it will pre-allocate / reserve the first 32 indexes. The argument is only once true and it would make alloc_irq_table() a little simpler if we would extract the special bits to the caller. The caller of irq_remapping_alloc() is holding irq_domain_mutex so the initialization of iommu->irte_ops->set_allocated() should not race against other user. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) commit ea6166f4b83e9cfba1c18f46a764d50045682fe5 Author: Sebastian Andrzej Siewior Date: Thu Mar 22 16:22:36 2018 +0100 iommu/amd: Split irq_lookup_table out of the amd_iommu_devtable_lock The function get_irq_table() reads/writes irq_lookup_table while holding the amd_iommu_devtable_lock. It also modifies amd_iommu_dev_table[].data[2]. set_dte_entry() is using amd_iommu_dev_table[].data[0|1] (under the domain->lock) so it should be okay. The access to the iommu is serialized with its own (iommu's) lock. So split out get_irq_table() out of amd_iommu_devtable_lock's lock. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2bc00180890427dcc092b2f2b0d03c904bcade29 Author: Sebastian Andrzej Siewior Date: Thu Mar 22 16:22:35 2018 +0100 iommu/amd: Split domain id out of amd_iommu_devtable_lock domain_id_alloc() and domain_id_free() is used for id management. Those two function share a bitmap (amd_iommu_pd_alloc_bitmap) and set/clear bits based on id allocation. There is no need to share this with amd_iommu_devtable_lock, it can use its own lock for this operation. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 779da73273fc4c4c6f41579a95e4fb7880a1720e Author: Sebastian Andrzej Siewior Date: Thu Mar 22 16:22:34 2018 +0100 iommu/amd: Turn dev_data_list into a lock less list alloc_dev_data() adds new items to dev_data_list and search_dev_data() is searching for items in this list. Both protect the access to the list with a spinlock. There is no need to navigate forth and back within the list and there is also no deleting of a specific item. This qualifies the list to become a lock less list and as part of this, the spinlock can be removed. With this change the ordering of those items within the list is changed: before the change new items were added to the end of the list, now they are added to the front. I don't think it matters but wanted to mention it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 28 ++++++++++------------------ drivers/iommu/amd_iommu_types.h | 2 +- 2 files changed, 11 insertions(+), 19 deletions(-) commit 39ffe39545cd5cb5b8cee9f0469165cf24dc62c2 Author: Sebastian Andrzej Siewior Date: Thu Mar 22 16:22:33 2018 +0100 iommu/amd: Take into account that alloc_dev_data() may return NULL find_dev_data() does not check whether the return value alloc_dev_data() is NULL. This was okay once because the pointer was returned once as-is. Since commit df3f7a6e8e85 ("iommu/amd: Use is_attach_deferred call-back") the pointer may be used within find_dev_data() so a NULL check is required. Cc: Baoquan He Fixes: df3f7a6e8e85 ("iommu/amd: Use is_attach_deferred call-back") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 2 ++ 1 file changed, 2 insertions(+) commit f8d16d3edb4dbae080df04318423c360de3c594d Author: Denis Kenzior Date: Mon Mar 26 12:52:45 2018 -0500 nl80211: Add SOCKET_OWNER support to JOIN_IBSS Signed-off-by: Denis Kenzior [johannes: fix race with wdev lock/unlock by just acquiring once] Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 2 ++ net/wireless/core.h | 8 ++++---- net/wireless/ibss.c | 27 ++++++--------------------- net/wireless/nl80211.c | 7 ++++++- 4 files changed, 18 insertions(+), 26 deletions(-) commit 63f5be0a81e0c607255e8debab16e62670305fee Merge: 6b7d5c0 378c893 Author: Kalle Valo Date: Thu Mar 29 11:32:17 2018 +0300 Merge tag 'iwlwifi-next-for-kalle-2018-03-28' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next iwlwifi patches for 4.14 * Fix a UBSAN warning; * Improvement in the net-stack/driver log syncing * An RCU lock fix in the new rate-scaling code; * Support for new PCI IDs for the 9000 family; * Support for a new API version; * Initial work for supporting the new ETSI rules; * Support for advanced dwell in scanning; * Support for OCE in scanning; * Some debugging improvements; * Other small improvements and cleanups here and there. commit f746a025d35f6c73e6021d0e37166e048cda36ed Author: Shaokun Zhang Date: Thu Mar 22 18:18:06 2018 +0800 iommu/vt-d:Remove unused variable Unused after commit <42e8c186b595> ("iommu/vt-d: Simplify io/tlb flushing in intel_iommu_unmap"), cleanup it. Cc: David Woodhouse Cc: Joerg Roedel Signed-off-by: Shaokun Zhang Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1543f226335bae25e157fd1e33f43f54458d29c2 Merge: 3eb2ce8 dcd189e Author: Joerg Roedel Date: Thu Mar 29 10:25:27 2018 +0200 Merge branch 'for-joerg/arm-smmu/updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu commit 37b1c004685a3cea420dd96aa3803da627359f60 Author: Denis Kenzior Date: Mon Mar 26 12:52:44 2018 -0500 cfg80211: Support all iftypes in autodisconnect_wk Currently autodisconnect_wk assumes that only interface types of P2P_CLIENT and STATION use conn_owner_nlportid. Change this so all interface types are supported. Signed-off-by: Denis Kenzior Signed-off-by: Johannes Berg net/wireless/sme.c | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) commit 2c390e44e46675da0e7bba5c3b921a091a60ec2c Author: Dmitry Lebed Date: Mon Mar 26 16:36:32 2018 +0300 cfg80211: enable use of non-cleared DFS channels for DFS offload Currently channel switch/start_ap to DFS channel cannot be done to non-CAC-cleared channel even if DFS offload if enabled. Make non-cleared DFS channels available if DFS offload is enabled. CAC will be started by HW after channel change, start_ap call, etc. Signed-off-by: Dmitry Lebed Signed-off-by: Johannes Berg net/wireless/chan.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 850964519a65a96aa8231ff31e28f30c2633484d Author: Dmitry Lebed Date: Mon Mar 26 16:36:31 2018 +0300 cfg80211: fix CAC_STARTED event handling Exclude CAC_STARTED event from !wdev->cac_started check, since cac_started will be set later in the same function. Signed-off-by: Dmitry Lebed Signed-off-by: Johannes Berg net/wireless/mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97f5f4254a61d7a104b5e609a6a0d9a10c73d29e Author: tamizhr@codeaurora.org Date: Tue Mar 27 19:16:17 2018 +0530 mac80211: Use proper chan_width enum in sta opmode event Bandwidth change value reported via nl80211 contains mac80211 specific enum value(ieee80211_sta_rx_bw) and which is not understand by userspace application. Map the mac80211 specific value to nl80211_chan_width enum value to avoid using wrong value in the userspace application. And used station's ht/vht capability to map IEEE80211_STA_RX_BW_20 and IEEE80211_STA_RX_BW_160 with proper nl80211 value. Signed-off-by: Tamizh chelvam Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 2 ++ net/mac80211/rx.c | 3 ++- net/mac80211/vht.c | 32 +++++++++++++++++++++++++++++++- 3 files changed, 35 insertions(+), 2 deletions(-) commit 57566b20033f23bdc9f25d5fa4c36a7287aa08d2 Author: tamizhr@codeaurora.org Date: Tue Mar 27 19:16:16 2018 +0530 mac80211: Use proper smps_mode enum in sta opmode event SMPS_MODE change value notified via nl80211 contains mac80211 specific value(ieee80211_smps_mode) and user space application will not know those values. This patch add support to map the mac80211 enum value to nl80211_smps_mode which will be understood by the userspace application. Signed-off-by: Tamizh chelvam Signed-off-by: Johannes Berg net/mac80211/ht.c | 15 +++++++++++++++ net/mac80211/ieee80211_i.h | 2 ++ net/mac80211/rx.c | 3 ++- 3 files changed, 19 insertions(+), 1 deletion(-) commit 5e78abd075e562fd5748ac3bfb067941e8baf6c7 Author: tamizhr@codeaurora.org Date: Tue Mar 27 19:16:15 2018 +0530 cfg80211: fix data type of sta_opmode_info parameter Currently bw and smps_mode are u8 type value in sta_opmode_info structure. This values filled in mac80211 from ieee80211_sta_rx_bandwidth and ieee80211_smps_mode. These enum values are specific to mac80211 and userspace/cfg80211 doesn't know about that. This will lead to incorrect result/assumption by the user space application. Change bw and smps_mode parameters to their respective enums in nl80211. Signed-off-by: Tamizh chelvam Signed-off-by: Johannes Berg include/net/cfg80211.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 79a0b33165d8d8ec0840fcfc74fd0a8f219abeee Author: Teichmann, Martin Date: Thu Mar 29 08:39:37 2018 +0200 USB: serial: ftdi_sio: add Id for Physik Instrumente E-870 This adds support for the Physik Instrumente E-870 PIShift Drive Electronics, a Piezo motor driver. Signed-off-by: Martin Teichmann Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 1 + drivers/usb/serial/ftdi_sio_ids.h | 1 + 2 files changed, 2 insertions(+) commit 94bf11bddad836380ecced299f4d5cb7d17a7dd1 Author: Boris Brezillon Date: Wed Feb 14 13:46:25 2018 +0100 mtd: fsl-quadspi: Remove unneeded driver.bus assignment platform_driver_register() takes care of assigning driver->bus to &platform_bus_type, no need to explicitly assign it in the driver. Signed-off-by: Boris Brezillon Acked-by: Han Xu Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/fsl-quadspi.c | 1 - 1 file changed, 1 deletion(-) commit 6b6de6543dd5040727afc56a69c7ba6698dd3090 Author: Boris Brezillon Date: Mon Mar 26 11:53:01 2018 +0200 mtd: rawnand: marvell: Rename ->ecc_clk into ->core_clk The core clock field was badly named ->ecc_clk which might lead to some confusion. Rename it ->core_clk. Signed-off-by: Boris Brezillon Acked-by: Miquel Raynal drivers/mtd/nand/raw/marvell_nand.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit bb00ff2f4a746db95a44758d45bd3f715169ef6f Author: Miquel Raynal Date: Wed Mar 21 14:01:57 2018 +0100 mtd: rawnand: s3c2410: enhance the probe function error path Prepare the migration of the lpc32xx_slc driver to use nand_scan() by cleaning the error path in the probe function. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/s3c2410.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 0eaa879be623f5e209e79a40f5e281f9c5c9170b Author: Miquel Raynal Date: Wed Mar 21 14:01:53 2018 +0100 mtd: rawnand: tango: fix probe function error path An error after nand_scan_tail() should trigger a nand_cleanup(). The helper mtd_device_parse_register() returns an error code that should be checked and nand_cleanup() called accordingly. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/tango_nand.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5a3e8cde101209edb962ed42091db257f9f5ce5c Author: Miquel Raynal Date: Wed Mar 21 14:01:52 2018 +0100 mtd: rawnand: sh_flctl: fix the probe function error path An error after nand_scan_tail() should trigger a nand_cleanup(). The helper mtd_device_parse_register() returns an error code that should be checked and nand_cleanup() called accordingly. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/sh_flctl.c | 4 ++++ 1 file changed, 4 insertions(+) commit 122bb3cb8b009aaa19fd8b09df8028ba8d49c043 Author: Miquel Raynal Date: Wed Mar 21 14:01:51 2018 +0100 mtd: rawnand: omap2: fix the probe function error path An error after nand_scan_tail() should trigger a nand_cleanup(). The helper mtd_device_parse_register() returns an error code that should be checked and nand_cleanup() called accordingly. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/omap2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit be051bf28f8084bd75f6fd67b2f3fb7d4883751d Author: Miquel Raynal Date: Wed Mar 21 14:01:50 2018 +0100 mtd: rawnand: mxc: fix probe function error path An error after nand_scan_tail() should trigger a nand_cleanup(). The helper mtd_device_parse_register() returns an error code that should be checked and nand_cleanup() called accordingly. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/mxc_nand.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 4e5d1d9078eda3de65f478b248cae882e2c0a839 Author: Miquel Raynal Date: Wed Mar 21 14:01:45 2018 +0100 mtd: rawnand: denali: fix probe function error path An error after nand_scan_tail() should trigger a nand_cleanup(). The helper mtd_device_register() returns an error code that should be checked and nand_cleanup() called accordingly. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/denali.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4acc3046ed5c1641874b89fe66ef8707d81ff80e Author: Miquel Raynal Date: Wed Mar 21 14:01:44 2018 +0100 mtd: rawnand: davinci: fix probe function error path An error after nand_scan_tail() should trigger a nand_cleanup(). The helper mtd_device_register() returns an error code that should be checked and nand_cleanup() called accordingly. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/davinci_nand.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a446c998ff0cd49fa8023f607e9fc15ce45ec576 Author: Miquel Raynal Date: Wed Mar 21 14:01:43 2018 +0100 mtd: rawnand: cafe: fix probe function error path An error after nand_scan_tail() should trigger a nand_cleanup(). The helper mtd_device_parse_register() returns an error code that should be checked and nand_cleanup() called accordingly. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/cafe_nand.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5826b8802a970d2b0aaf097951de42040ee32480 Author: Miquel Raynal Date: Wed Mar 21 14:01:42 2018 +0100 mtd: rawnand: brcmnand: fix probe function error path An error after nand_scan_tail() should trigger a nand_cleanup(). The helper mtd_device_register() returns an error code that should be checked and nand_cleanup() called accordingly. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/brcmnand/brcmnand.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 15d6f118285f2ffc73fc8de75ecf7c36c3c6fe18 Author: Boris Brezillon Date: Wed Mar 21 09:36:18 2018 +0100 mtd: rawnand: sunxi: Stop supporting ECC_HW_SYNDROME mode This mode is not used by any existing setup and should not be used because it overwrites the BBMs. Let's just remove it before someone starts using it. Signed-off-by: Boris Brezillon Acked-by: Maxime Ripard Tested-by: Miquel Raynal .../devicetree/bindings/mtd/sunxi-nand.txt | 4 +- drivers/mtd/nand/raw/sunxi_nand.c | 155 +++------------------ 2 files changed, 22 insertions(+), 137 deletions(-) commit 961ba15c48dd465fdbef1b9379bd8031c374d62e Author: Gregory CLEMENT Date: Tue Mar 13 11:30:16 2018 +0100 mtd: rawnand: marvell: Fix clock resource by adding a register clock On Armada 7K/8K we need to explicitly enable the register clock. This clock is optional because not all the SoCs using this IP need it but at least for Armada 7K/8K it is actually mandatory. The binding documentation is updated accordingly. Signed-off-by: Gregory CLEMENT Signed-off-by: Boris Brezillon .../devicetree/bindings/mtd/marvell-nand.txt | 5 +++- drivers/mtd/nand/raw/marvell_nand.c | 34 ++++++++++++++++++---- 2 files changed, 32 insertions(+), 7 deletions(-) commit b756816dad0aaca4f57c857a86a6a4a85a9f478b Author: Arushi Singhal Date: Sun Mar 25 21:07:43 2018 +0530 mtd: ftl: Use DIV_ROUND_UP() The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) / (d)) but is perhaps more readable. Signed-off-by: Arushi Singhal Signed-off-by: Boris Brezillon drivers/mtd/ftl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c77a93120640057bd7c3fd7eca25c427bb6de409 Author: Xiaolei Li Date: Thu Mar 29 09:34:58 2018 +0800 mtd: Fix some function description mismatches in mtdcore.c In mtdcore.c, some function descriptions do not match function definitions. Just fix these mismatches. Signed-off-by: Xiaolei Li Signed-off-by: Boris Brezillon drivers/mtd/mtdcore.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7d5cba597dbfc55c43761e255f1be646ef3ab633 Author: Prabhakar Kushwaha Date: Wed Mar 28 11:15:52 2018 +0530 mtd: physmap_of: update struct map_info's swap as per map requirement It is not necessary for all device's maps to be CFI_HOST_ENDIAN. Maps device can be Big endian or little endian. Currently it is being taken care using CONFIG_MTD_CFI_LE_BYTE_SWAP or CONFIG_MTD_CFI_BE_BYTE_SWAP i.e. compile time. Now update struct map_info's swap field based on device characteristics defined in device tree. Signed-off-by: Jagdish Gediya Signed-off-by: Prabhakar Kushwaha Signed-off-by: Boris Brezillon drivers/mtd/maps/physmap_of_core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 147395ea40b36b8652b6df3e50a1cb745be75c93 Author: Prabhakar Kushwaha Date: Wed Mar 28 11:14:43 2018 +0530 dt-bindings: mtd-physmap: Add endianness supports Provide a way to specify the endianness to use when accessing a memory-mapped flash. Signed-off-by: Prabhakar Kushwaha Reviewed-by: Rob Herring Signed-off-by: Boris Brezillon Documentation/devicetree/bindings/mtd/mtd-physmap.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit 55a999a04159dfb33d3d3d293a70cce766f6db27 Author: Rafał Miłecki Date: Tue Mar 27 15:36:47 2018 +0200 mtd: update documentation of mtd_device_parse_register() In the commit 2c77c57d22adb ("mtd: move code adding master MTD out of mtd_add_device_partitions()") behavior of mtd_device_parse_register() has very slightly changed. It's a pretty non-significant order change to match updated function behavior. Signed-off-by: Rafał Miłecki Reviewed-by: Richard Weinberger Signed-off-by: Boris Brezillon drivers/mtd/mtdcore.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9e7eb9c90d769ad724136f47e374b2edfa351f9b Author: Cyrille Pitchen Date: Thu Mar 15 20:04:38 2018 +0100 MAINTAINERS: update maintainers for MTD and SPI NOR subsystems remove myself as MTD and SPI NOR maintainer. Signed-off-by: Cyrille Pitchen Signed-off-by: Boris Brezillon MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) commit 974f2936b360500f9658fb5b698024d2439c18bf Author: Linus Walleij Date: Sat Mar 3 23:31:45 2018 +0100 mtd: jedec_probe: add Eon EN29LV400A IDs This adds the JEDEC IDs for Eon EN29LV400A variants EN29LV400AB and EN29LV400AT. This chip is found in the D-Link DNS-313. Signed-off-by: Linus Walleij Signed-off-by: Boris Brezillon drivers/mtd/chips/jedec_probe.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 78282bec4b4a02a13b87d01fbe529396d37db926 Merge: 631fe15 109d59b Author: Ingo Molnar Date: Thu Mar 29 09:21:21 2018 +0200 Merge tag 'perf-core-for-mingo-4.17-20180328' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: - Be consistent when checking if a perf_mmap instance had its ring buffer unmmaped, fixing segfaults noticed in 'perf trace' (Kan Liang, Arnaldo Carvalho de Melo) - Avoid adding the same option multiple times to the 'diff' command in check-headers.sh (Jiri Olsa) - Add vendor event files (JSON format) to various IBM s390 models (z10EC, z10BC, z196, zEC12, zBC12, z13 and z14) (Thomas Richter) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit f6adc9fd1ff9bbe766cbb68e84a0d97f54a4f436 Author: David Lechner Date: Thu Mar 15 13:13:41 2018 -0500 ARM: davinci: da8xx: simplify CFGCHIP regmap_config Since commit 8253bb3f8255 ("regmap: potentially duplicate the name string stored in regmap"), the name field of struct regmap_config is copied in __regmap_init(), so we no longer need to worry about keeping our own copy of the name. Just use a string literal in the initialization of da8xx_cfgchip_config instead of creating a separate variable for the name. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/mach-davinci/devices-da8xx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 3424a516d9d2d3fa45c63750c15ea2bba893ea81 Author: David Lechner Date: Thu Mar 15 14:17:20 2018 -0500 ARM: davinci: da8xx: fix oops in USB PHY driver due to stack allocated platform_data This fixes a possible kernel oops due to using stack allocated platform data for the USB PHY driver on DA8XX devices. If the platform device probe is deferred, then we get a corrupt pointer for the platform data. We now use a global static struct for the platform data so that the platform data pointer does not get written over. Fixes: bdec5a6b5789 ("ARM: da8xx: use platform data for CFGCHIP syscon regmap") Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/mach-davinci/usb-da8xx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2253fc0caa800ba7c1e380446eb3fb7958a85b93 Author: Steve Wise Date: Tue Mar 27 08:38:07 2018 -0700 RDMA/CMA: Add rdma_port_space to UAPI Since the rdma_port_space enum is being passed between user and kernel for user cm_id setup, we need it in a UAPI header. So add it to rdma_user_cm.h. This also fixes the cm_id restrack changes which pass up the port space value via the RDMA_NLDEV_ATTR_RES_PS attribute. Fixes: 00313983cda6 ("RDMA/nldev: provide detailed CM_ID information") Signed-off-by: Steve Wise Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cma.c | 32 +++++++++++++++++--------------- include/rdma/rdma_cm.h | 17 ++++++----------- include/uapi/rdma/rdma_user_cm.h | 10 +++++++++- 3 files changed, 32 insertions(+), 27 deletions(-) commit 22527437e0a0c96ee3153e9d0382942b0fd4f9dd Merge: f6ef565 7c095f5 Author: Alexei Starovoitov Date: Wed Mar 28 19:36:15 2018 -0700 Merge branch 'nfp-bpf-updates' Jakub Kicinski says: ==================== This set adds support for update and delete calls from the datapath, as well as XADD instructions (32 and 64 bit) and pseudo random numbers. The XADD support depends on verifier enforcing alignment which Daniel recently added. XADD uses NFP's atomic engine which requires values to be in big endian, therefore we need to keep track of which parts of the values are used as atomics and byte swap them accordingly. Pseudo random numbers are generated using NFP's HW pseudo random number generator. Jiong tackles initial implementation of packet cache, which he describes as follows: Memory reads on NFP would first fetch data from memory to transfer-in registers, then move them from transfer-in to general registers. Given NFP is rich on transfer-in registers, they could serve as memory cache. This patch tries to identify a sequence of packet data read (BPF_LDX) that are executed sequentially, then the total access range of the sequence is calculated and attached to each read instruction, the first instruction in this sequence is marked with an cache init flag so the execution of it would bring in the whole range of packet data for the sequence. All later packet reads in this sequence would fetch data from transfer-in registers directly, no need to JIT NFP memory access. Function call, non-packet-data memory read, packet write and memcpy will invalidate the cache and start a new cache range. Cache invalidation could be improved in the future, for example packet write doesn't need to invalidate the cache if the the write destination won't be read again. ==================== Signed-off-by: Alexei Starovoitov commit 7c095f5d9bf4cbadbd4adb0adb670a38e42cd793 Author: Jakub Kicinski Date: Wed Mar 28 17:48:38 2018 -0700 nfp: bpf: improve wrong FW response warnings When FW responds with a message of wrong size or type make sure the type is checked first and included in the wrong size message. This makes it easier to figure out which FW command failed. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Reviewed-by: Jiong Wang Signed-off-by: Alexei Starovoitov drivers/net/ethernet/netronome/nfp/bpf/cmsg.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit df4a37d8b53f9fb9af722b056da5edbd9a531768 Author: Jakub Kicinski Date: Wed Mar 28 17:48:37 2018 -0700 nfp: bpf: add support for bpf_get_prandom_u32() NFP has a prng register, which we can read to obtain a u32 worth of pseudo random data. Generate code for it. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Reviewed-by: Jiong Wang Signed-off-by: Alexei Starovoitov drivers/net/ethernet/netronome/nfp/bpf/fw.h | 1 + drivers/net/ethernet/netronome/nfp/bpf/jit.c | 24 +++++++++++++++++++++-- drivers/net/ethernet/netronome/nfp/bpf/main.c | 12 ++++++++++++ drivers/net/ethernet/netronome/nfp/bpf/main.h | 4 ++++ drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 7 +++++++ drivers/net/ethernet/netronome/nfp/nfp_asm.h | 1 + 6 files changed, 47 insertions(+), 2 deletions(-) commit 41aed09cf61c00ef6c3b2648d5a193cbaf2a74d0 Author: Jakub Kicinski Date: Wed Mar 28 17:48:36 2018 -0700 nfp: bpf: add support for atomic add of unknown values Allow atomic add to be used even when the value is not guaranteed to fit into a 16 bit immediate. This requires the value to be pulled as data, and therefore use of a transfer register and a context swap. Track the information about possible lengths of the value, if it's guaranteed to be larger than 16bits don't generate the code for the optimized case at all. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Reviewed-by: Jiong Wang Signed-off-by: Alexei Starovoitov drivers/net/ethernet/netronome/nfp/bpf/jit.c | 78 ++++++++++++++++++++--- drivers/net/ethernet/netronome/nfp/bpf/main.h | 7 ++ drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 14 ++-- drivers/net/ethernet/netronome/nfp/nfp_asm.c | 1 + drivers/net/ethernet/netronome/nfp/nfp_asm.h | 3 + 5 files changed, 88 insertions(+), 15 deletions(-) commit b556ddd9c19983f3f13ab0d524f884349fead115 Author: Jakub Kicinski Date: Wed Mar 28 17:48:35 2018 -0700 nfp: bpf: expose command delay slots Allow callers to control the delay slots of commands, instead of giving them just a wait/nowait choice. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Reviewed-by: Jiong Wang Signed-off-by: Alexei Starovoitov drivers/net/ethernet/netronome/nfp/bpf/jit.c | 53 +++++++++++++--------------- 1 file changed, 24 insertions(+), 29 deletions(-) commit dcb0c27f3c989fecae42593f470a2413434aae28 Author: Jakub Kicinski Date: Wed Mar 28 17:48:34 2018 -0700 nfp: bpf: add basic support for atomic adds Implement atomic add operation for 32 and 64 bit values. Depend on the verifier to ensure alignment. Values have to be kept in big endian and swapped upon read/write. For now only support atomic add of a constant. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Reviewed-by: Jiong Wang Signed-off-by: Alexei Starovoitov drivers/net/ethernet/netronome/nfp/bpf/jit.c | 45 ++++++++++ drivers/net/ethernet/netronome/nfp/bpf/main.h | 17 ++++ drivers/net/ethernet/netronome/nfp/bpf/offload.c | 45 +++++++++- drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 105 ++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_asm.c | 1 + drivers/net/ethernet/netronome/nfp/nfp_asm.h | 2 + 6 files changed, 212 insertions(+), 3 deletions(-) commit e59ac634908f4ea90066e6db7dd7ae8ca02815ff Author: Jakub Kicinski Date: Wed Mar 28 17:48:33 2018 -0700 bpf: add parenthesis around argument of BPF_LDST_BYTES() BPF_LDST_BYTES() does not put it's argument in parenthesis when referencing it. This makes it impossible to pass pointers obtained by address-of operator (e.g. BPF_LDST_BYTES(&insn)). Add the parenthesis. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: Alexei Starovoitov include/linux/filter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bfee64deaa766ba88ff42fcbced82ad4ef6cb315 Author: Jakub Kicinski Date: Wed Mar 28 17:48:32 2018 -0700 nfp: bpf: add map deletes from the datapath Support calling map_delete_elem() FW helper from the datapath programs. For JIT checks and code are basically equivalent to map lookups. Similarly to other map helper key must be on the stack. Different pointer types are left for future extension. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Reviewed-by: Jiong Wang Signed-off-by: Alexei Starovoitov drivers/net/ethernet/netronome/nfp/bpf/jit.c | 4 ++++ drivers/net/ethernet/netronome/nfp/bpf/main.c | 3 +++ drivers/net/ethernet/netronome/nfp/bpf/main.h | 2 ++ drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 8 ++++++++ 4 files changed, 17 insertions(+) commit 44d65a47aeabc40619ad6d1900e0f54e5b5145b8 Author: Jakub Kicinski Date: Wed Mar 28 17:48:31 2018 -0700 nfp: bpf: add map updates from the datapath Support calling map_update_elem() from the datapath programs by calling into FW-provided helper. Value pointer is passed in LM pointer #2. Keeping track of old state for arg3 is not necessary, since LM pointer #2 will be always loaded in this case, the trivial optimization for value at the bottom of the stack can't be done here. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Reviewed-by: Jiong Wang Signed-off-by: Alexei Starovoitov drivers/net/ethernet/netronome/nfp/bpf/jit.c | 6 ++++++ drivers/net/ethernet/netronome/nfp/bpf/main.c | 3 +++ drivers/net/ethernet/netronome/nfp/bpf/main.h | 2 ++ drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 10 ++++++++++ 4 files changed, 21 insertions(+) commit 289c5b763018be846900da706dc582e572a13864 Author: Jakub Kicinski Date: Wed Mar 28 17:48:30 2018 -0700 nfp: bpf: add helper for basic map call checks Add a verifier helper for performing the basic state checks before a call to a map helper. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Reviewed-by: Jiong Wang Signed-off-by: Alexei Starovoitov drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 40 ++++++++++++++--------- 1 file changed, 25 insertions(+), 15 deletions(-) commit 2f46e0c1273512cbdb944f5a50cc93cf0888c3d7 Author: Jakub Kicinski Date: Wed Mar 28 17:48:29 2018 -0700 nfp: bpf: add helper for validating stack pointers Our implementation has restriction on stack pointers for function calls. Move the common checks into a helper for reuse. The state has to be encapsulated into a structure to support parameters other than BPF_REG_2. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Reviewed-by: Jiong Wang Signed-off-by: Alexei Starovoitov drivers/net/ethernet/netronome/nfp/bpf/jit.c | 4 +- drivers/net/ethernet/netronome/nfp/bpf/main.h | 14 ++++-- drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 59 ++++++++++++++--------- 3 files changed, 50 insertions(+), 27 deletions(-) commit fc4484970e7e4bf40ba958f7bc48474ddadfdbfc Author: Jakub Kicinski Date: Wed Mar 28 17:48:28 2018 -0700 nfp: bpf: rename map_lookup_stack() to map_call_stack_common() We will reuse most of map call code gen for other map calls. Rename the lookup gen function and use meta->func_id instead of hard-coding lookup. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Reviewed-by: Jiong Wang Signed-off-by: Alexei Starovoitov drivers/net/ethernet/netronome/nfp/bpf/jit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 87b10ecdced224dc0def123e1f57bc6c5ac4ac5c Author: Jiong Wang Date: Wed Mar 28 17:48:27 2018 -0700 nfp: bpf: detect packet reads could be cached, enable the optimisation This patch is the front end of this optimisation, it detects and marks those packet reads that could be cached. Then the optimisation "backend" will be activated automatically. Signed-off-by: Jiong Wang Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov drivers/net/ethernet/netronome/nfp/bpf/jit.c | 115 ++++++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/bpf/main.h | 30 +++++++ 2 files changed, 145 insertions(+) commit 91ff69e840f91016f464810e8940b99723abb5e8 Author: Jiong Wang Date: Wed Mar 28 17:48:26 2018 -0700 nfp: bpf: support unaligned read offset This patch add the support for unaligned read offset, i.e. the read offset to the start of packet cache area is not aligned to REG_WIDTH. In this case, the read area might across maximum three transfer-in registers. Signed-off-by: Jiong Wang Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov drivers/net/ethernet/netronome/nfp/bpf/jit.c | 73 ++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 3 deletions(-) commit be75923786aa28774bf2b5ef8184590a52429103 Author: Jiong Wang Date: Wed Mar 28 17:48:25 2018 -0700 nfp: bpf: read from packet data cache for PTR_TO_PACKET This patch assumes there is a packet data cache, and would try to read packet data from the cache instead of from memory. This patch only implements the optimisation "backend", it doesn't build the packet data cache, so this optimisation is not enabled. This patch has only enabled aligned packet data read, i.e. when the read offset to the start of cache is REG_WIDTH aligned. Signed-off-by: Jiong Wang Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov drivers/net/ethernet/netronome/nfp/bpf/jit.c | 80 ++++++++++++++++++++++++++- drivers/net/ethernet/netronome/nfp/bpf/main.h | 9 +++ drivers/net/ethernet/netronome/nfp/nfp_asm.h | 1 + 3 files changed, 88 insertions(+), 2 deletions(-) commit f62fd7a77717350e850f3c4a5373fe8e64871025 Author: Colin Ian King Date: Fri Mar 2 09:07:08 2018 +0000 ecryptfs: fix spelling mistake: "cadidate" -> "candidate" Trivial fix to spelling mistake in debug message text. Signed-off-by: Colin Ian King Signed-off-by: Tyler Hicks fs/ecryptfs/keystore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab13a9218c9883d1f51940b9e720c63ef54a2c07 Author: Guenter Roeck Date: Thu Jan 18 18:40:25 2018 -0800 ecryptfs: lookup: Don't check if mount_crypt_stat is NULL mount_crypt_stat is assigned to &ecryptfs_superblock_to_private(ecryptfs_dentry->d_sb)->mount_crypt_stat, and mount_crypt_stat is not the first object in struct ecryptfs_sb_info. mount_crypt_stat is therefore never NULL. At the same time, no crash in ecryptfs_lookup() has been reported, and the lookup functions in other file systems don't check if d_sb is NULL either. Given that, remove the NULL check. Signed-off-by: Guenter Roeck Signed-off-by: Tyler Hicks fs/ecryptfs/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 694f54f680f7fd8e9561928fbfc537d9afbc3d79 Merge: 9f36f9c a01c477 Author: Dave Airlie Date: Thu Mar 29 09:25:13 2018 +1000 Merge branch 'drm-misc-next-fixes' of git://anongit.freedesktop.org/drm/drm-misc into drm-next - Mask mode type garbage from userspace (Ville) Something went wrong on the misc tree side, but I'll pull the patch directly. * 'drm-misc-next-fixes' of git://anongit.freedesktop.org/drm/drm-misc: drm: Fix uabi regression by allowing garbage mode->type from userspace commit 1b90d3002e3ee39b22de5604497b20edeeee558e Author: Steve Wise Date: Tue Mar 27 10:34:38 2018 -0700 RDMA/CMA: remove RDMA_PS_SDP This is no longer supported, so remove it. Signed-off-by: Steve Wise Signed-off-by: Jason Gunthorpe include/rdma/rdma_cm.h | 1 - 1 file changed, 1 deletion(-) commit 2236d4d39035b9839944603ec4b65ce71180a9ea Author: Eric W. Biederman Date: Wed Mar 28 13:38:55 2018 -0500 ipc/shm: Fix pid freeing. The 0day kernel test build report reported an oops: > > IP: put_pid+0x22/0x5c > PGD 19efa067 P4D 19efa067 PUD 0 > Oops: 0000 [#1] > CPU: 0 PID: 727 Comm: trinity Not tainted 4.16.0-rc2-00010-g98f929b #1 > RIP: 0010:put_pid+0x22/0x5c > RSP: 0018:ffff986719f73e48 EFLAGS: 00010202 > RAX: 00000006d765f710 RBX: ffff98671a4fa4d0 RCX: ffff986719f73d40 > RDX: 000000006f6e6125 RSI: 0000000000000000 RDI: ffffffffa01e6d21 > RBP: ffffffffa0955fe0 R08: 0000000000000020 R09: 0000000000000000 > R10: 0000000000000078 R11: ffff986719f73e76 R12: 0000000000001000 > R13: 00000000ffffffea R14: 0000000054000fb0 R15: 0000000000000000 > FS: 00000000028c2880(0000) GS:ffffffffa06ad000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 0000000677846439 CR3: 0000000019fc1005 CR4: 00000000000606b0 > Call Trace: > ? ipc_update_pid+0x36/0x3e > ? newseg+0x34c/0x3a6 > ? ipcget+0x5d/0x528 > ? entry_SYSCALL_64_after_hwframe+0x52/0xb7 > ? SyS_shmget+0x5a/0x84 > ? do_syscall_64+0x194/0x1b3 > ? entry_SYSCALL_64_after_hwframe+0x42/0xb7 > Code: ff 05 e7 20 9b 03 58 c9 c3 48 ff 05 85 21 9b 03 48 85 ff 74 4f 8b 47 04 8b 17 48 ff 05 7c 21 9b 03 48 83 c0 03 48 c1 e0 04 ff ca <48> 8b 44 07 08 74 1f 48 ff 05 6c 21 9b 03 ff 0f 0f 94 c2 48 ff > RIP: put_pid+0x22/0x5c RSP: ffff986719f73e48 > CR2: 0000000677846439 > ---[ end trace ab8c5cb4389d37c5 ]--- > Kernel panic - not syncing: Fatal exception In newseg when changing shm_cprid and shm_lprid from pid_t to struct pid* I misread the kvmalloc as kvzalloc and thought shp was initialized to 0. As that is not the case it is not safe to for the error handling to address shm_cprid and shm_lprid before they are initialized. Therefore move the cleanup of shm_cprid and shm_lprid from the no_file error cleanup path to the no_id error cleanup path. Ensuring that an early error exit won't cause the oops above. Reported-by: kernel test robot Reviewed-by: Nagarathnam Muthusamy Signed-off-by: Eric W. Biederman ipc/shm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c28d62cf52d791ba5f6db7ce525ed06b86291c82 Author: Peter Zijlstra Date: Tue Mar 27 14:14:38 2018 +0200 locking/rtmutex: Handle non enqueued waiters gracefully in remove_waiter() In -RT task_blocks_on_rt_mutex() may return with -EAGAIN due to (->pi_blocked_on == PI_WAKEUP_INPROGRESS) before it added itself as a waiter. In such a case remove_waiter() must not be called because without a waiter it will trigger the BUG_ON() statement. This was initially reported by Yimin Deng. Thomas Gleixner fixed it then with an explicit check for waiters before calling remove_waiter(). Instead of an explicit NULL check before calling rt_mutex_top_waiter() make the function return NULL if there are no waiters. With that fixed the now pointless NULL check is removed from rt_mutex_slowlock(). Reported-and-debugged-by: Yimin Deng Suggested-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/CAAh1qt=DCL9aUXNxanP5BKtiPp3m+qj4yB+gDohhXPVFCxWwzg@mail.gmail.com Link: https://lkml.kernel.org/r/20180327121438.sss7hxg3crqy4ecd@linutronix.de kernel/locking/rtmutex.c | 3 +-- kernel/locking/rtmutex_common.h | 11 ++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) commit f6ef56589374670b7c1939720dfa00212bd80a5b Merge: 6f5c39f 3bbe086 Author: Daniel Borkmann Date: Wed Mar 28 22:55:20 2018 +0200 Merge branch 'bpf-raw-tracepoints' Alexei Starovoitov says: ==================== v7->v8: - moved 'u32 num_args' from 'struct tracepoint' into 'struct bpf_raw_event_map' that increases memory overhead, but can be optimized/compressed later. Now it's zero changes in tracepoint.[ch] v6->v7: - adopted Steven's bpf_raw_tp_map section approach to find tracepoint and corresponding bpf probe function instead of kallsyms approach. dropped kernel_tracepoint_find_by_name() patch v5->v6: - avoid changing semantics of for_each_kernel_tracepoint() function, instead introduce kernel_tracepoint_find_by_name() helper v4->v5: - adopted Daniel's fancy REPEAT macro in bpf_trace.c in patch 6 v3->v4: - adopted Linus's CAST_TO_U64 macro to cast any integer, pointer, or small struct to u64. That nicely reduced the size of patch 1 v2->v3: - with Linus's suggestion introduced generic COUNT_ARGS and CONCATENATE macros (or rather moved them from apparmor) that cleaned up patch 6 - added patch 4 to refactor trace_iwlwifi_dev_ucode_error() from 17 args to 4 Now any tracepoint with >12 args will have build error v1->v2: - simplified api by combing bpf_raw_tp_open(name) + bpf_attach(prog_fd) into bpf_raw_tp_open(name, prog_fd) as suggested by Daniel. That simplifies bpf_detach as well which is now simple close() of fd. - fixed memory leak in error path which was spotted by Daniel. - fixed bpf_get_stackid(), bpf_perf_event_output() called from raw tracepoints - added more tests - fixed allyesconfig build caught by buildbot v1: This patch set is a different way to address the pressing need to access task_struct pointers in sched tracepoints from bpf programs. The first approach simply added these pointers to sched tracepoints: https://lkml.org/lkml/2017/12/14/753 which Peter nacked. Few options were discussed and eventually the discussion converged on doing bpf specific tracepoint_probe_register() probe functions. Details here: https://lkml.org/lkml/2017/12/20/929 Patch 1 is kernel wide cleanup of pass-struct-by-value into pass-struct-by-reference into tracepoints. Patches 2 and 3 are minor cleanups to address allyesconfig build Patch 4 refactor trace_iwlwifi_dev_ucode_error from 17 to 4 args Patch 5 introduces COUNT_ARGS macro Patch 6 introduces BPF_RAW_TRACEPOINT api. the auto-cleanup and multiple concurrent users are must have features of tracing api. For bpf raw tracepoints it looks like: // load bpf prog with BPF_PROG_TYPE_RAW_TRACEPOINT type prog_fd = bpf_prog_load(...); // receive anon_inode fd for given bpf_raw_tracepoint // and attach bpf program to it raw_tp_fd = bpf_raw_tracepoint_open("xdp_exception", prog_fd); Ctrl-C of tracing daemon or cmdline tool will automatically detach bpf program, unload it and unregister tracepoint probe. More details in patch 6. Patch 7 - trivial support in libbpf Patches 8, 9 - user space tests samples/bpf/test_overhead performance on 1 cpu: tracepoint base kprobe+bpf tracepoint+bpf raw_tracepoint+bpf task_rename 1.1M 769K 947K 1.0M urandom_read 789K 697K 750K 755K ==================== Signed-off-by: Daniel Borkmann commit 3bbe0869884ceebffd59d5519c1d560207c6e116 Author: Alexei Starovoitov Date: Wed Mar 28 12:05:40 2018 -0700 selftests/bpf: test for bpf_get_stackid() from raw tracepoints similar to traditional traceopint test add bpf_get_stackid() test from raw tracepoints and reduce verbosity of existing stackmap test Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_progs.c | 91 ++++++++++++++++++++++++-------- 1 file changed, 70 insertions(+), 21 deletions(-) commit 4662a4e53890badf4da17e441606a2885f29d56d Author: Alexei Starovoitov Date: Wed Mar 28 12:05:39 2018 -0700 samples/bpf: raw tracepoint test add empty raw_tracepoint bpf program to test overhead similar to kprobe and traditional tracepoint tests Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann samples/bpf/Makefile | 1 + samples/bpf/bpf_load.c | 14 ++++++++++++++ samples/bpf/test_overhead_raw_tp_kern.c | 17 +++++++++++++++++ samples/bpf/test_overhead_user.c | 12 ++++++++++++ 4 files changed, 44 insertions(+) commit a0fe3e574b50461c4811ce81811f0eaefda62871 Author: Alexei Starovoitov Date: Wed Mar 28 12:05:38 2018 -0700 libbpf: add bpf_raw_tracepoint_open helper add bpf_raw_tracepoint_open(const char *name, int prog_fd) api to libbpf Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann tools/include/uapi/linux/bpf.h | 11 +++++++++++ tools/lib/bpf/bpf.c | 11 +++++++++++ tools/lib/bpf/bpf.h | 1 + 3 files changed, 23 insertions(+) commit c4f6699dfcb8558d138fe838f741b2c10f416cf9 Author: Alexei Starovoitov Date: Wed Mar 28 12:05:37 2018 -0700 bpf: introduce BPF_RAW_TRACEPOINT Introduce BPF_PROG_TYPE_RAW_TRACEPOINT bpf program type to access kernel internal arguments of the tracepoints in their raw form. >From bpf program point of view the access to the arguments look like: struct bpf_raw_tracepoint_args { __u64 args[0]; }; int bpf_prog(struct bpf_raw_tracepoint_args *ctx) { // program can read args[N] where N depends on tracepoint // and statically verified at program load+attach time } kprobe+bpf infrastructure allows programs access function arguments. This feature allows programs access raw tracepoint arguments. Similar to proposed 'dynamic ftrace events' there are no abi guarantees to what the tracepoints arguments are and what their meaning is. The program needs to type cast args properly and use bpf_probe_read() helper to access struct fields when argument is a pointer. For every tracepoint __bpf_trace_##call function is prepared. In assembler it looks like: (gdb) disassemble __bpf_trace_xdp_exception Dump of assembler code for function __bpf_trace_xdp_exception: 0xffffffff81132080 <+0>: mov %ecx,%ecx 0xffffffff81132082 <+2>: jmpq 0xffffffff811231f0 where TRACE_EVENT(xdp_exception, TP_PROTO(const struct net_device *dev, const struct bpf_prog *xdp, u32 act), The above assembler snippet is casting 32-bit 'act' field into 'u64' to pass into bpf_trace_run3(), while 'dev' and 'xdp' args are passed as-is. All of ~500 of __bpf_trace_*() functions are only 5-10 byte long and in total this approach adds 7k bytes to .text. This approach gives the lowest possible overhead while calling trace_xdp_exception() from kernel C code and transitioning into bpf land. Since tracepoint+bpf are used at speeds of 1M+ events per second this is valuable optimization. The new BPF_RAW_TRACEPOINT_OPEN sys_bpf command is introduced that returns anon_inode FD of 'bpf-raw-tracepoint' object. The user space looks like: // load bpf prog with BPF_PROG_TYPE_RAW_TRACEPOINT type prog_fd = bpf_prog_load(...); // receive anon_inode fd for given bpf_raw_tracepoint with prog attached raw_tp_fd = bpf_raw_tracepoint_open("xdp_exception", prog_fd); Ctrl-C of tracing daemon or cmdline tool that uses this feature will automatically detach bpf program, unload it and unregister tracepoint probe. On the kernel side the __bpf_raw_tp_map section of pointers to tracepoint definition and to __bpf_trace_*() probe function is used to find a tracepoint with "xdp_exception" name and corresponding __bpf_trace_xdp_exception() probe function which are passed to tracepoint_probe_register() to connect probe with tracepoint. Addition of bpf_raw_tracepoint doesn't interfere with ftrace and perf tracepoint mechanisms. perf_event_open() can be used in parallel on the same tracepoint. Multiple bpf_raw_tracepoint_open("xdp_exception", prog_fd) are permitted. Each with its own bpf program. The kernel will execute all tracepoint probes and all attached bpf programs. In the future bpf_raw_tracepoints can be extended with query/introspection logic. __bpf_raw_tp_map section logic was contributed by Steven Rostedt Signed-off-by: Alexei Starovoitov Signed-off-by: Steven Rostedt (VMware) Acked-by: Steven Rostedt (VMware) Signed-off-by: Daniel Borkmann include/asm-generic/vmlinux.lds.h | 10 +++ include/linux/bpf_types.h | 1 + include/linux/trace_events.h | 42 +++++++++ include/linux/tracepoint-defs.h | 6 ++ include/trace/bpf_probe.h | 92 +++++++++++++++++++ include/trace/define_trace.h | 1 + include/uapi/linux/bpf.h | 11 +++ kernel/bpf/syscall.c | 78 ++++++++++++++++ kernel/trace/bpf_trace.c | 183 ++++++++++++++++++++++++++++++++++++++ 9 files changed, 424 insertions(+) commit cf14f27f82af78e713f8a57c477cf9233faf8b30 Author: Alexei Starovoitov Date: Wed Mar 28 12:05:36 2018 -0700 macro: introduce COUNT_ARGS() macro move COUNT_ARGS() macro from apparmor to generic header and extend it to count till twelve. COUNT() was an alternative name for this logic, but it's used for different purpose in many other places. Similarly for CONCATENATE() macro. Suggested-by: Linus Torvalds Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann include/linux/kernel.h | 7 +++++++ security/apparmor/include/path.h | 7 +------ 2 files changed, 8 insertions(+), 6 deletions(-) commit 4fe43c2c00349557fdf4e6d61a67ebbe670412b8 Author: Alexei Starovoitov Date: Wed Mar 28 12:05:35 2018 -0700 net/wireless/iwlwifi: fix iwlwifi_dev_ucode_error tracepoint fix iwlwifi_dev_ucode_error tracepoint to pass pointer to a table instead of all 17 arguments by value. dvm/main.c and mvm/utils.c have 'struct iwl_error_event_table' defined with very similar yet subtly different fields and offsets. tracepoint is still common and using definition of 'struct iwl_error_event_table' from dvm/commands.h while copying fields. Long term this tracepoint probably should be split into two. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann drivers/net/wireless/intel/iwlwifi/dvm/main.c | 7 +--- .../wireless/intel/iwlwifi/iwl-devtrace-iwlwifi.h | 39 ++++++++++------------ drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 7 +--- 4 files changed, 21 insertions(+), 33 deletions(-) commit 14624a9387c4d80766d1fdd237b0d110a0a1b43d Author: Alexei Starovoitov Date: Wed Mar 28 12:05:34 2018 -0700 net/mac802154: disambiguate mac80215 vs mac802154 trace events two trace events defined with the same name and both unused. They conflict in allyesconfig build. Rename one of them. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann net/mac802154/trace.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d992ee6c1ec3c9949d87877bdb44faa7f9cc60ce Author: Alexei Starovoitov Date: Wed Mar 28 12:05:33 2018 -0700 net/mediatek: disambiguate mt76 vs mt7601u trace events two trace events defined with the same name and both unused. They conflict in allyesconfig build. Rename one of them. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann drivers/net/wireless/mediatek/mt7601u/trace.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c105547501016897194358b11451608a8d5f9a02 Author: Alexei Starovoitov Date: Wed Mar 28 12:05:32 2018 -0700 treewide: remove large struct-pass-by-value from tracepoint arguments - fix trace_hfi1_ctxt_info() to pass large struct by reference instead of by value - convert 'type array[]' tracepoint arguments into 'type *array', since compiler will warn that sizeof('type array[]') == sizeof('type *array') and later should be used instead The CAST_TO_U64 macro in the later patch will enforce that tracepoint arguments can only be integers, pointers, or less than 8 byte structures. Larger structures should be passed by reference. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann drivers/infiniband/hw/hfi1/file_ops.c | 2 +- drivers/infiniband/hw/hfi1/trace_ctxts.h | 12 ++++++------ include/trace/events/f2fs.h | 2 +- net/wireless/trace.h | 2 +- sound/firewire/amdtp-stream-trace.h | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) commit f497b6c25d0f62ca0a2ef3b5612d8a2e022f54a4 Author: Liran Alon Date: Fri Mar 23 03:01:34 2018 +0300 KVM: nVMX: Optimization: Dont set KVM_REQ_EVENT when VMExit with nested_run_pending When vCPU runs L2 and there is a pending event that requires to exit from L2 to L1 and nested_run_pending=1, vcpu_enter_guest() will request an immediate-exit from L2 (See req_immediate_exit). Since now handling of req_immediate_exit also makes sure to set KVM_REQ_EVENT, there is no need to also set it on vmx_vcpu_run() when nested_run_pending=1. This optimizes cases where VMRESUME was executed by L1 to enter L2 and there is no pending events that require exit from L2 to L1. Previously, this would have set KVM_REQ_EVENT unnecessarly. Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Krish Sadhukhan Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 8 -------- 1 file changed, 8 deletions(-) commit 1a680e355c947783ee968124a712fdad186af6f6 Author: Liran Alon Date: Fri Mar 23 03:01:33 2018 +0300 KVM: nVMX: Require immediate-exit when event reinjected to L2 and L1 event pending In case L2 VMExit to L0 during event-delivery, VMCS02 is filled with IDT-vectoring-info which vmx_complete_interrupts() makes sure to reinject before next resume of L2. While handling the VMExit in L0, an IPI could be sent by another L1 vCPU to the L1 vCPU which currently runs L2 and exited to L0. When L0 will reach vcpu_enter_guest() and call inject_pending_event(), it will note that a previous event was re-injected to L2 (by IDT-vectoring-info) and therefore won't check if there are pending L1 events which require exit from L2 to L1. Thus, L0 enters L2 without immediate VMExit even though there are pending L1 events! This commit fixes the issue by making sure to check for L1 pending events even if a previous event was reinjected to L2 and bailing out from inject_pending_event() before evaluating a new pending event in case an event was already reinjected. The bug was observed by the following setup: * L0 is a 64CPU machine which runs KVM. * L1 is a 16CPU machine which runs KVM. * L0 & L1 runs with APICv disabled. (Also reproduced with APICv enabled but easier to analyze below info with APICv disabled) * L1 runs a 16CPU L2 Windows Server 2012 R2 guest. During L2 boot, L1 hangs completely and analyzing the hang reveals that one L1 vCPU is holding KVM's mmu_lock and is waiting forever on an IPI that he has sent for another L1 vCPU. And all other L1 vCPUs are currently attempting to grab mmu_lock. Therefore, all L1 vCPUs are stuck forever (as L1 runs with kernel-preemption disabled). Observing /sys/kernel/debug/tracing/trace_pipe reveals the following series of events: (1) qemu-system-x86-19066 [030] kvm_nested_vmexit: rip: 0xfffff802c5dca82f reason: EPT_VIOLATION ext_inf1: 0x0000000000000182 ext_inf2: 0x00000000800000d2 ext_int: 0x00000000 ext_int_err: 0x00000000 (2) qemu-system-x86-19054 [028] kvm_apic_accept_irq: apicid f vec 252 (Fixed|edge) (3) qemu-system-x86-19066 [030] kvm_inj_virq: irq 210 (4) qemu-system-x86-19066 [030] kvm_entry: vcpu 15 (5) qemu-system-x86-19066 [030] kvm_exit: reason EPT_VIOLATION rip 0xffffe00069202690 info 83 0 (6) qemu-system-x86-19066 [030] kvm_nested_vmexit: rip: 0xffffe00069202690 reason: EPT_VIOLATION ext_inf1: 0x0000000000000083 ext_inf2: 0x0000000000000000 ext_int: 0x00000000 ext_int_err: 0x00000000 (7) qemu-system-x86-19066 [030] kvm_nested_vmexit_inject: reason: EPT_VIOLATION ext_inf1: 0x0000000000000083 ext_inf2: 0x0000000000000000 ext_int: 0x00000000 ext_int_err: 0x00000000 (8) qemu-system-x86-19066 [030] kvm_entry: vcpu 15 Which can be analyzed as follows: (1) L2 VMExit to L0 on EPT_VIOLATION during delivery of vector 0xd2. Therefore, vmx_complete_interrupts() will set KVM_REQ_EVENT and reinject a pending-interrupt of 0xd2. (2) L1 sends an IPI of vector 0xfc (CALL_FUNCTION_VECTOR) to destination vCPU 15. This will set relevant bit in LAPIC's IRR and set KVM_REQ_EVENT. (3) L0 reach vcpu_enter_guest() which calls inject_pending_event() which notes that interrupt 0xd2 was reinjected and therefore calls vmx_inject_irq() and returns. Without checking for pending L1 events! Note that at this point, KVM_REQ_EVENT was cleared by vcpu_enter_guest() before calling inject_pending_event(). (4) L0 resumes L2 without immediate-exit even though there is a pending L1 event (The IPI pending in LAPIC's IRR). We have already reached the buggy scenario but events could be furthered analyzed: (5+6) L2 VMExit to L0 on EPT_VIOLATION. This time not during event-delivery. (7) L0 decides to forward the VMExit to L1 for further handling. (8) L0 resumes into L1. Note that because KVM_REQ_EVENT is cleared, the LAPIC's IRR is not examined and therefore the IPI is still not delivered into L1! Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Jim Mattson Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit a042c26fd8e7c475636f967957e7130595478829 Author: Liran Alon Date: Fri Mar 23 03:01:32 2018 +0300 KVM: x86: Fix misleading comments on handling pending exceptions The reason that exception.pending should block re-injection of NMI/interrupt is not described correctly in comment in code. Instead, it describes why a pending exception should be injected before a pending NMI/interrupt. Therefore, move currently present comment to code-block evaluating a new pending event which explains why exception.pending is evaluated first. In addition, create a new comment describing that exception.pending blocks re-injection of NMI/interrupt because the exception was queued by handling vmexit which was due to NMI/interrupt delivery. Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Signed-off-by: Krish Sadhukhan [Used a comment from Sean J . - Radim] Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 04140b4144cd888c080cddbb2be2ec603f00d081 Author: Liran Alon Date: Fri Mar 23 03:01:31 2018 +0300 KVM: x86: Rename interrupt.pending to interrupt.injected For exceptions & NMIs events, KVM code use the following coding convention: *) "pending" represents an event that should be injected to guest at some point but it's side-effects have not yet occurred. *) "injected" represents an event that it's side-effects have already occurred. However, interrupts don't conform to this coding convention. All current code flows mark interrupt.pending when it's side-effects have already taken place (For example, bit moved from LAPIC IRR to ISR). Therefore, it makes sense to just rename interrupt.pending to interrupt.injected. This change follows logic of previous commit 664f8e26b00c ("KVM: X86: Fix loss of exception which has not yet been injected") which changed exception to follow this coding convention as well. It is important to note that in case !lapic_in_kernel(vcpu), interrupt.pending usage was and still incorrect. In this case, interrrupt.pending can only be set using one of the following ioctls: KVM_INTERRUPT, KVM_SET_VCPU_EVENTS and KVM_SET_SREGS. Looking at how QEMU uses these ioctls, one can see that QEMU uses them either to re-set an "interrupt.pending" state it has received from KVM (via KVM_GET_VCPU_EVENTS interrupt.pending or via KVM_GET_SREGS interrupt_bitmap) or by dispatching a new interrupt from QEMU's emulated LAPIC which reset bit in IRR and set bit in ISR before sending ioctl to KVM. So it seems that indeed "interrupt.pending" in this case is also suppose to represent "interrupt.injected". However, kvm_cpu_has_interrupt() & kvm_cpu_has_injectable_intr() is misusing (now named) interrupt.injected in order to return if there is a pending interrupt. This leads to nVMX/nSVM not be able to distinguish if it should exit from L2 to L1 on EXTERNAL_INTERRUPT on pending interrupt or should re-inject an injected interrupt. Therefore, add a FIXME at these functions for handling this issue. This patch introduce no semantics change. Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Jim Mattson Signed-off-by: Krish Sadhukhan Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/irq.c | 26 ++++++++++++++++++++++++-- arch/x86/kvm/vmx.c | 2 +- arch/x86/kvm/x86.c | 8 ++++---- arch/x86/kvm/x86.h | 6 +++--- 5 files changed, 33 insertions(+), 11 deletions(-) commit 7c5a6a5970af76b3a303757487d50b18d6830f66 Author: Liran Alon Date: Fri Mar 23 03:01:30 2018 +0300 KVM: VMX: No need to clear pending NMI/interrupt on inject realmode interrupt kvm_inject_realmode_interrupt() is called from one of the injection functions which writes event-injection to VMCS: vmx_queue_exception(), vmx_inject_irq() and vmx_inject_nmi(). All these functions are called just to cause an event-injection to guest. They are not responsible of manipulating the event-pending flag. The only purpose of kvm_inject_realmode_interrupt() should be to emulate real-mode interrupt-injection. This was also incorrect when called from vmx_queue_exception(). Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Jim Mattson Signed-off-by: Krish Sadhukhan Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 5 ----- 1 file changed, 5 deletions(-) commit 773e8a0425c923bc02668a2d6534a5ef5a43cc69 Author: Vitaly Kuznetsov Date: Tue Mar 20 15:02:11 2018 +0100 x86/kvm: use Enlightened VMCS when running on Hyper-V Enlightened VMCS is just a structure in memory, the main benefit besides avoiding somewhat slower VMREAD/VMWRITE is using clean field mask: we tell the underlying hypervisor which fields were modified since VMEXIT so there's no need to inspect them all. Tight CPUID loop test shows significant speedup: Before: 18890 cycles After: 8304 cycles Static key is being used to avoid performance penalty for non-Hyper-V deployments. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Radim Krčmář Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 301 +++++++++++++++++++++++++++++++++++++++++-- arch/x86/kvm/vmx_evmcs.h | 324 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 615 insertions(+), 10 deletions(-) commit 5431390b3039624a371549926f74a1c470b2ecaa Author: Vitaly Kuznetsov Date: Tue Mar 20 15:02:10 2018 +0100 x86/hyper-v: detect nested features TLFS 5.0 says: "Support for an enlightened VMCS interface is reported with CPUID leaf 0x40000004. If an enlightened VMCS interface is supported, additional nested enlightenments may be discovered by reading the CPUID leaf 0x4000000A (see 2.4.11)." Signed-off-by: Vitaly Kuznetsov Reviewed-by: Michael Kelley Reviewed-by: Thomas Gleixner Signed-off-by: Radim Krčmář arch/x86/include/asm/hyperv-tlfs.h | 4 ++++ arch/x86/include/asm/mshyperv.h | 1 + arch/x86/kernel/cpu/mshyperv.c | 5 +++++ 3 files changed, 10 insertions(+) commit 68d1eb72ee99e26576913aa6824f7a703ca06b90 Author: Vitaly Kuznetsov Date: Tue Mar 20 15:02:09 2018 +0100 x86/hyper-v: define struct hv_enlightened_vmcs and clean field bits The definitions are according to the Hyper-V TLFS v5.0. KVM on Hyper-V will use these. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Michael Kelley Acked-by: Thomas Gleixner Signed-off-by: Radim Krčmář arch/x86/include/asm/hyperv-tlfs.h | 200 +++++++++++++++++++++++++++++++++++++ 1 file changed, 200 insertions(+) commit a46d15cc1ae5af905afac2af4cc0c188c2eb59b0 Author: Vitaly Kuznetsov Date: Tue Mar 20 15:02:08 2018 +0100 x86/hyper-v: allocate and use Virtual Processor Assist Pages Virtual Processor Assist Pages usage allows us to do optimized EOI processing for APIC, enable Enlightened VMCS support in KVM and more. struct hv_vp_assist_page is defined according to the Hyper-V TLFS v5.0b. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Thomas Gleixner Acked-by: Thomas Gleixner Signed-off-by: Radim Krčmář arch/x86/hyperv/hv_init.c | 43 +++++++++++++++++++++++++++++++++++--- arch/x86/include/asm/hyperv-tlfs.h | 13 ++++++++++++ arch/x86/include/asm/mshyperv.h | 13 ++++++++++++ 3 files changed, 66 insertions(+), 3 deletions(-) commit d4abc577bb03a3facc0f21cc1f2c6b27cd0f5d07 Author: Ladi Prosek Date: Tue Mar 20 15:02:07 2018 +0100 x86/kvm: rename HV_X64_MSR_APIC_ASSIST_PAGE to HV_X64_MSR_VP_ASSIST_PAGE The assist page has been used only for the paravirtual EOI so far, hence the "APIC" in the MSR name. Renaming to match the Hyper-V TLFS where it's called "Virtual VP Assist MSR". Signed-off-by: Ladi Prosek Signed-off-by: Vitaly Kuznetsov Acked-by: Thomas Gleixner Signed-off-by: Radim Krčmář arch/x86/include/asm/hyperv-tlfs.h | 10 +++++----- arch/x86/kvm/hyperv.c | 8 ++++---- arch/x86/kvm/lapic.h | 2 +- arch/x86/kvm/x86.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) commit 415bd1cd3a42897f61a92cda0a9f9d7b04c28fb7 Author: Vitaly Kuznetsov Date: Tue Mar 20 15:02:06 2018 +0100 x86/hyper-v: move definitions from TLFS to hyperv-tlfs.h mshyperv.h now only contains fucntions/variables we define in kernel, all definitions from TLFS should go to hyperv-tlfs.h. 'enum hv_cpuid_function' is removed as we already have this info in hyperv-tlfs.h, code in mshyperv.c is adjusted accordingly. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Michael Kelley Acked-by: Thomas Gleixner Signed-off-by: Radim Krčmář arch/x86/include/asm/hyperv-tlfs.h | 57 ++++++++++++++++++++++++++++ arch/x86/include/asm/mshyperv.h | 78 +------------------------------------- arch/x86/kernel/cpu/mshyperv.c | 15 ++++---- 3 files changed, 66 insertions(+), 84 deletions(-) commit 5a485803221777013944cbd1a7cd5c62efba3ffa Author: Vitaly Kuznetsov Date: Tue Mar 20 15:02:05 2018 +0100 x86/hyper-v: move hyperv.h out of uapi hyperv.h is not part of uapi, there are no (known) users outside of kernel. We are making changes to this file to match current Hyper-V Hypervisor Top-Level Functional Specification (TLFS, see: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs) and we don't want to maintain backwards compatibility. Move the file renaming to hyperv-tlfs.h to avoid confusing it with mshyperv.h. In future, all definitions from TLFS should go to it and all kernel objects should go to mshyperv.h or include/linux/hyperv.h. Signed-off-by: Vitaly Kuznetsov Acked-by: Thomas Gleixner Signed-off-by: Radim Krčmář MAINTAINERS | 2 +- arch/x86/hyperv/hv_init.c | 2 +- arch/x86/include/asm/hyperv-tlfs.h | 432 +++++++++++++++++++++++++++++++++++ arch/x86/include/asm/kvm_host.h | 1 + arch/x86/include/asm/mshyperv.h | 2 +- arch/x86/include/uapi/asm/hyperv.h | 425 ---------------------------------- arch/x86/include/uapi/asm/kvm_para.h | 1 - arch/x86/kernel/cpu/mshyperv.c | 2 +- drivers/hv/connection.c | 1 - drivers/hv/hv.c | 1 - drivers/hv/hyperv_vmbus.h | 1 + drivers/hv/vmbus_drv.c | 1 - include/linux/hyperv.h | 1 - 13 files changed, 438 insertions(+), 434 deletions(-) commit 21e94acaaa37f03ce0ed79b098670b5f66ddb77e Author: Andrew Jones Date: Mon Mar 26 14:38:02 2018 +0200 KVM: trivial documentation cleanups Add missing entries to the index and ensure the entries are in alphabetical order. Also amd-memory-encryption.rst is an .rst not a .txt. Signed-off-by: Andrew Jones Signed-off-by: Radim Krčmář Documentation/virtual/kvm/00-INDEX | 10 +++++++--- Documentation/virtual/kvm/api.txt | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) commit 34226b6b70980a8f81fff3c09a2c889f77edeeff Author: Wanpeng Li Date: Sat Mar 24 21:17:24 2018 -0700 KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized static_key_disable_cpuslocked(): static key 'virt_spin_lock_key+0x0/0x20' used before call to jump_label_init() WARNING: CPU: 0 PID: 0 at kernel/jump_label.c:161 static_key_disable_cpuslocked+0x61/0x80 RIP: 0010:static_key_disable_cpuslocked+0x61/0x80 Call Trace: static_key_disable+0x16/0x20 start_kernel+0x192/0x4b3 secondary_startup_64+0xa5/0xb0 Qspinlock will be choosed when dedicated pCPUs are available, however, the static virt_spin_lock_key is set in kvm_spinlock_init() before jump_label_init() has been called, which will result in a WARN(). This patch fixes it by delaying the virt_spin_lock_key setup to .smp_prepare_cpus(). Reported-by: Davidlohr Bueso Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Davidlohr Bueso Signed-off-by: Wanpeng Li Fixes: b2798ba0b876 ("KVM: X86: Choose qspinlock when dedicated physical CPUs are available") Signed-off-by: Radim Krčmář arch/x86/kernel/kvm.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 1f97e01a385703c18ceb853c894ea09736161233 Author: Cole Robinson Date: Fri Mar 23 18:07:18 2018 -0400 tools/kvm_stat: Remove unused function Unused since added in 18e8f4100 Signed-off-by: Cole Robinson Reviewed-and-tested-by: Stefan Raspl Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 3 --- 1 file changed, 3 deletions(-) commit 0866c31bf32fbd05dd25b6ed4976fa9134773227 Author: Cole Robinson Date: Fri Mar 23 18:07:17 2018 -0400 tools/kvm_stat: Don't use deprecated file() $ python3 tools/kvm/kvm_stat/kvm_stat Traceback (most recent call last): File "tools/kvm/kvm_stat/kvm_stat", line 1668, in main() File "tools/kvm/kvm_stat/kvm_stat", line 1639, in main assign_globals() File "tools/kvm/kvm_stat/kvm_stat", line 1618, in assign_globals for line in file('/proc/mounts'): NameError: name 'file' is not defined open() is the python3 way, and works on python2.6+ Signed-off-by: Cole Robinson Reviewed-and-tested-by: Stefan Raspl Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ade1ae84c9236cbb58de4b17f770f2791106676 Author: Cole Robinson Date: Fri Mar 23 18:07:16 2018 -0400 tools/kvm_stat: Fix python3 syntax $ python3 tools/kvm/kvm_stat/kvm_stat File "tools/kvm/kvm_stat/kvm_stat", line 1137 def sortkey((_k, v)): ^ SyntaxError: invalid syntax Fix it in a way that's compatible with python2 and python3 Signed-off-by: Cole Robinson Tested-by: Stefan Raspl Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8566ac8b8e7cac5814fb744ff5159d1797a1a6bd Author: Babu Moger Date: Fri Mar 16 16:37:26 2018 -0400 KVM: SVM: Implement pause loop exit logic in SVM Bring the PLE(pause loop exit) logic to AMD svm driver. While testing, we found this helping in situations where numerous pauses are generated. Without these patches we could see continuos VMEXITS due to pause interceptions. Tested it on AMD EPYC server with boot parameter idle=poll on a VM with 32 vcpus to simulate extensive pause behaviour. Here are VMEXITS in 10 seconds interval. Pauses 810199 504 Total 882184 325415 Signed-off-by: Babu Moger [Prevented the window from dropping below the initial value. - Radim] Signed-off-by: Radim Krčmář arch/x86/kvm/svm.c | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++-- arch/x86/kvm/x86.h | 2 + 2 files changed, 105 insertions(+), 3 deletions(-) commit 1d8fb44a728b7a34604307976a7d2a003bc84f16 Author: Babu Moger Date: Fri Mar 16 16:37:25 2018 -0400 KVM: SVM: Add pause filter threshold This patch adds the support for pause filtering threshold. This feature support is indicated by CPUID Fn8000_000A_EDX. See AMD APM Vol 2 Section 15.14.4 Pause Intercept Filtering for more details. In this mode, a 16-bit pause filter threshold field is added in VMCB. The threshold value is a cycle count that is used to reset the pause counter. As with simple pause filtering, VMRUN loads the pause count value from VMCB into an internal counter. Then, on each pause instruction the hardware checks the elapsed number of cycles since the most recent pause instruction against the pause Filter Threshold. If the elapsed cycle count is greater than the pause filter threshold, then the internal pause count is reloaded from VMCB and execution continues. If the elapsed cycle count is less than the pause filter threshold, then the internal pause count is decremented. If the count value is less than zero and pause intercept is enabled, a #VMEXIT is triggered. If advanced pause filtering is supported and pause filter threshold field is set to zero, the filter will operate in the simpler, count only mode. Signed-off-by: Babu Moger Signed-off-by: Radim Krčmář arch/x86/include/asm/svm.h | 3 ++- arch/x86/kvm/svm.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit c8e88717cfc6b36bedea22368d97667446318291 Author: Babu Moger Date: Fri Mar 16 16:37:24 2018 -0400 KVM: VMX: Bring the common code to header file This patch brings some of the code from vmx to x86.h header file. Now, we can share this code between vmx and svm. Modified couple functions to make it common. Signed-off-by: Babu Moger Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 51 +++++++++------------------------------------------ arch/x86/kvm/x86.h | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 42 deletions(-) commit 18abdc3425aa546424672d3b1f932ecc55132368 Author: Babu Moger Date: Fri Mar 16 16:37:23 2018 -0400 KVM: VMX: Remove ple_window_actual_max Get rid of ple_window_actual_max, because its benefits are really minuscule and the logic is complicated. The overflows(and underflow) are controlled in __ple_window_grow and _ple_window_shrink respectively. Suggested-by: Radim Krčmář Signed-off-by: Babu Moger [Fixed potential wraparound and change the max to UINT_MAX. - Radim] Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) commit 7fbc85a5fb2b018d7030cba53f4c42ab90304acd Author: Babu Moger Date: Fri Mar 16 16:37:22 2018 -0400 KVM: VMX: Fix the module parameters for vmx The vmx module parameters are supposed to be unsigned variants. Also fixed the checkpatch errors like the one below. WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +module_param(ple_gap, uint, S_IRUGO); Signed-off-by: Babu Moger [Expanded uint to unsigned int in code. - Radim] Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 8aeaf4a0d22c6b3ab00003e3412e934852e7a112 Author: Luca Scalabrino Date: Wed Mar 21 14:38:21 2018 +0100 ARM: 8751/1: Add support for Cortex-R8 processor Cortex-R8 has identical initialisation requirements to Cortex-R7, so hook it up in proc-v7.S in the same way. Signed-off-by: Luca Scalabrino Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/mm/proc-v7.S | 11 +++++++++++ 1 file changed, 11 insertions(+) commit ee333554fed55555a986a90bb097ac7f9d6f05bf Author: Jinbum Park Date: Tue Mar 6 01:39:24 2018 +0100 ARM: 8749/1: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE CONFIG_FORTIFY_SOURCE detects various overflows at compile-time. (6974f0c4555e ("include/linux/string.h: add the option of fortified string.h functions) ARCH_HAS_FORTIFY_SOURCE means that the architecture can be built and run with CONFIG_FORTIFY_SOURCE. Since ARM can be built and run with that flag like other architectures, select ARCH_HAS_FORTIFY_SOURCE as default. Acked-by: Kees Cook Signed-off-by: Jinbum Park Signed-off-by: Russell King arch/arm/Kconfig | 1 + arch/arm/boot/compressed/misc.c | 5 +++++ 2 files changed, 6 insertions(+) commit 53fedcc09c66c68e0fa7ccef0fe9c15f96dca452 Author: Eric Biggers Date: Wed Mar 28 11:15:09 2018 -0700 f2fs: reserve bits for fs-verity Reserve an F2FS feature flag and inode flag for fs-verity. This is an in-development feature that is planned be discussed at LSF/MM 2018 [1]. It will provide file-based integrity and authenticity for read-only files. Most code will be in a filesystem-independent module, with smaller changes needed to individual filesystems that opt-in to supporting the feature. An early prototype supporting F2FS is available [2]. Reserving the F2FS on-disk bits for fs-verity will prevent users of the prototype from conflicting with other new F2FS features. Note that we're reserving the inode flag in f2fs_inode.i_advise, which isn't really appropriate since it's not a hint or advice. But ->i_advise is already being used to hold the 'encrypt' flag; and F2FS's ->i_flags uses the generic FS_* values, so it seems ->i_flags can't be used for an F2FS-specific flag without additional work to remove the assumption that ->i_flags uses the generic flags namespace. [1] https://marc.info/?l=linux-fsdevel&m=151690752225644 [2] https://git.kernel.org/pub/scm/linux/kernel/git/mhalcrow/linux.git/log/?h=fs-verity-dev Signed-off-by: Eric Biggers Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 ++ 1 file changed, 2 insertions(+) commit 378c8931342f99c5a6fce21e38ef46ac39395464 Author: Shahar S Matityahu Date: Thu Dec 28 10:19:43 2017 +0200 iwlwifi: wrt: add fw force restart via triggers We can set triggers that cause a debug data collection when something of interest happens (e.g. when too many probes are lost conscutively). Normally, this triggers don't cause the FW to be restarted, but in some cases that may be desired, so we recover from the problem. To support this, add a flag that indicates that the FW should be restarted when the trigger fires. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 6 ++++++ drivers/net/wireless/intel/iwlwifi/fw/file.h | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) commit 9b137866f9a2699698cfffb0b7729331a419d617 Author: Sara Sharon Date: Wed Dec 27 12:16:33 2017 +0200 iwlwifi: mvm: save low latency causes in an enum Currently we have a boolean variable for each cause. This costs space, and requires to check each separately when determining low latency. Since we have another cause incoming, convert it to an enum. While at it, move the retrieval of the prev value and the assignment of the new value to be inside iwl_mvm_update_low_latency and save the need for each caller to do it separately. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 11 +++---- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 36 +++++++++++++++++----- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 8 +++-- 3 files changed, 38 insertions(+), 17 deletions(-) commit 8f27036a0e380c6ede67a8d2a132327fcb760ace Author: Emmanuel Grumbach Date: Mon Feb 5 12:44:44 2018 +0200 iwlwifi: bump the max API version for 9000 and 22000 devices We are now ready to load 38.ucode Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 4 +++- drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 976ea7b2c61c0cb91c5cd79fcc7df82a73b6a540 Author: Haim Dreyfuss Date: Sun Oct 29 14:38:37 2017 +0200 iwlwifi: api: Add geographic profile information to MCC_UPDATE_CMD Some geographic profiles require specific handling. For example ETSI profile requires special channel access handling. Add geographic profile information to MCC_UPDATE response to allow it. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 9e5053ad9d590e095829a8bb07adbbdbd893f0f9 Author: Luca Coelho Date: Wed Mar 28 11:15:09 2018 +0300 iwlwifi: add a bunch of new 9000 PCI IDs A lot of new PCI IDs were added for the 9000 series. Add them to the list of supported PCI IDs. Cc: stable@vger.kernel.org # 4.13+ Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 157 +++++++++++++++++++++++++- 1 file changed, 155 insertions(+), 2 deletions(-) commit 66fa2424df16b213b9ed4ea1b9edca49c89ae415 Author: Ayala Beker Date: Wed Dec 13 15:20:21 2017 +0200 iwlwifi: fw api: support the new scan request FW API version Remove fragmented_dwell_time and add num_of_fragments to support the new API version. Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/api/scan.h | 67 +++++++++---- drivers/net/wireless/intel/iwlwifi/fw/file.h | 3 + drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 6 ++ drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 114 ++++++++++++++++------- 4 files changed, 136 insertions(+), 54 deletions(-) commit d270e7b8fa8e68c6d08910e353b7674b182dc1c2 Author: Ilan Peer Date: Mon Jan 22 16:44:09 2018 +0200 iwlwifi: mvm: Allow iwl_mvm_mac_mgd_prepare_tx() when associated The FW does not allocate quota air time for the binding of a station MAC before iwlmvm indicates that it is associated. Currently iwlmvm indicates that the MAC is associated only after hearing a beacon from the AP. In case a deauthentication frame is sent before the MAC is associated, the frame might not be sent as the corresponding binding is not scheduled. To handle such cases, set IEEE80211_HW_DEAUTH_NEED_MGD_TX_PREP in the HW flags, requesting mac80211 to call the mgd_prepare_tx() callback before transmitting a deauthentication frame if associated but no beacon was heard from the AP. In addition, do not warn in iwl_mvm_mac_mgd_prepare_tx() when already associated as now the callback can be called also when associated. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8f691af967293319668058efdc10f560b65bd651 Author: Zamir, Roee Date: Thu May 11 11:56:15 2017 +0300 iwlwifi: mvm: add support for oce Add support for Optimized Connectivity Experience (OCE). Get capabilities from the fw, expose them with nl80211, and enable them in UMAC scan if the relevant nl80211 flags are set by the userspace. Signed-off-by: Roee Zamir Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/api/scan.h | 6 ++++++ drivers/net/wireless/intel/iwlwifi/fw/file.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 11 +++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 6 ++++++ drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 21 ++++++++++++++++++++- 5 files changed, 44 insertions(+), 1 deletion(-) commit c1a7515393e403758a684fd0a2372af466675b15 Author: Zamir, Roee Date: Thu Mar 30 16:34:51 2017 +0300 iwlwifi: mvm: add adaptive dwell support Update the scan command API with support for adaptive dwell. Adaptive dwell is a type of scan that dynamically changes the time it remains on each channel listening for beacons or probe responses. Signed-off-by: Roee Zamir Signed-off-by: Beni Lev Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/constants.h | 2 + drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 98 ++++++++++++++-------- 2 files changed, 67 insertions(+), 33 deletions(-) commit 6f5c39fa5cd4a78c5432021e981aa8f79437a32c Author: Nikita V. Shirokov Date: Mon Mar 26 08:36:57 2018 -0700 bpf: Add sock_ops R/W access to ipv4 tos Sample usage for tos ... bpf_getsockopt(skops, SOL_IP, IP_TOS, &v, sizeof(v)) ... where skops is a pointer to the ctx (struct bpf_sock_ops). Signed-off-by: Nikita V. Shirokov Signed-off-by: Daniel Borkmann net/core/filter.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit e2efacb6a54ab54626da3507be1008d0040492cc Author: Yazen Ghannam Date: Mon Mar 26 14:15:25 2018 -0500 Revert "x86/mce/AMD: Collect error info even if valid bits are not set" This reverts commit 4b1e84276a6172980c5bf39aa091ba13e90d6dad. Software uses the valid bits to decide if the values can be used for further processing or other actions. So setting the valid bits will have software act on values that it shouldn't be acting on. The recommendation to save all the register values does not mean that the values are always valid. Signed-off-by: Yazen Ghannam Signed-off-by: Thomas Gleixner Cc: tony.luck@intel.com Cc: Yazen Ghannam Cc: bp@suse.de Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/20180326191526.64314-1-Yazen.Ghannam@amd.com arch/x86/kernel/cpu/mcheck/mce.c | 14 -------------- 1 file changed, 14 deletions(-) commit 8ecd2953d0a1b78748b36f5bed6f233f5bd6d6ea Author: Stephen Rothwell Date: Wed Mar 28 18:41:25 2018 +1100 ipc/shm: fix up for struct file no longer being available in shm.h Stephen Rothewell wrote: > After merging the userns tree, today's linux-next build (powerpc > ppc64_defconfig) produced this warning: > > In file included from include/linux/sched.h:16:0, > from arch/powerpc/lib/xor_vmx_glue.c:14: > include/linux/shm.h:17:35: error: 'struct file' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] > bool is_file_shm_hugepages(struct file *file); > ^~~~ > > and many, many more (most warnings, but some errors - arch/powerpc is > mostly built with -Werror) I dug through this and I discovered that the error was caused by the removal of struct shmid_kernel from shm.h when building on powerpc. Except for observing the existence of "struct file *shm_file" in struct shmid_kernel I have no clue why the structure move would cause such a failure. I suspect shm.h always needed the forward declaration and someting had been confusing gcc into not issuing the warning. --EWB Fixes: a2e102cd3cdd ("shm: Move struct shmid_kernel into ipc/shm.c") Signed-off-by: Stephen Rothwell Signed-off-by: Eric W. Biederman include/linux/shm.h | 2 ++ 1 file changed, 2 insertions(+) commit 466d1493ea830789a2f063f478aaed2e324f0d3d Author: Dan Williams Date: Wed Mar 28 10:44:50 2018 -0700 acpi, nfit: rework NVDIMM leaf method detection Some BIOSen do not handle 0-byte transfer lengths for the _LSR and _LSW (label storage read/write) methods. This causes Linux to fallback to the deprecated _DSM path, or otherwise disable label support. Introduce acpi_nvdimm_has_method() to detect whether a method is available rather than calling the method, require _LSI and _LSR to be paired, and require read support before enabling write support. Cc: Fixes: 4b27db7e26cd ("acpi, nfit: add support for the _LS...") Suggested-by: Erik Schmauss Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 41 +++++++++++++++++++++-------------------- drivers/acpi/nfit/nfit.h | 5 ++--- 2 files changed, 23 insertions(+), 23 deletions(-) commit 5717cb89ed0d22f338f56f3d8d0a1538fbac6d39 Merge: 3ac3a2f 326e7ba Author: Arnd Bergmann Date: Wed Mar 28 18:09:29 2018 +0200 Merge tag 'imx-dt-4.17-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt Pull "i.MX device tree updates for 4.17, round 2" Shawn Guo: - Add missing property '#sound-dai-cells' for sgtl5000 codec node in imx6ul-isiot board to fix warning seen with DTC 1.4.6. - Use stdout-path instead of linux,stdout-path to fix DTC warning reported by DTC 1.4.6. * tag 'imx-dt-4.17-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx6ul-isiot: Pass the required '#sound-dai-cells' ARM: dts: imx6-phytec: Use the standard 'stdout-path' property commit ebc57e399b8efb68293f206333985a3394c3acf8 Author: Alexander Shishkin Date: Wed Aug 23 09:59:55 2017 +0300 intel_th: Add ACPI glue layer The Trace Hub devices now can be enumerated as ACPI devices, which translates into "Host Debugger mode". There are two IDs: one for PCH Trace Hub, and one for the uncore Trace Hub. These are expected to stay the same across all platforms. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/Kconfig | 12 ++++++ drivers/hwtracing/intel_th/Makefile | 3 ++ drivers/hwtracing/intel_th/acpi.c | 79 +++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) commit 282ffec565c2e9fe18bbb48c19767cccd2437f11 Author: Alexander Shishkin Date: Wed Aug 23 09:52:00 2017 +0300 intel_th: Allow forcing host mode through drvdata Some devices can only operate in host mode, so we need means of communicating this to the core driver on per-device basis. This adds a flag to drvdata to signal host-only capability to the core. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/core.c | 6 ++++-- drivers/hwtracing/intel_th/intel_th.h | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) commit 661b0df8489a35da4ee8acaaf43f204a913ccfc9 Author: Alexander Shishkin Date: Wed Aug 23 09:47:19 2017 +0300 intel_th: Pick up irq number from resources Platform devices pass their IRQs around as resources, so as a convenience for the glue layer code, allow them pass the IRQ to the core driver in the resources array. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit c2d2c7de972d7a08533bde622c36ff6feb112907 Author: Alexander Shishkin Date: Thu Mar 1 10:17:25 2018 +0200 intel_th: Don't touch switch routing in host mode When the Trace Hub is operating in Host Debugger mode, it is up to the debugger to configure master routing even for the software sources. Do not do this in the driver in this case. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9ad577087165478c9d9be82b15ed9bf2db5835f5 Author: Alexander Shishkin Date: Thu Mar 1 10:15:32 2018 +0200 intel_th: Use correct method of finding hub Since commit 8edc514b01e9 ("intel_th: Make SOURCE devices children of the root device") the hub is not the parent of SOURCE devices any more, so the new helper function should be used for that instead of always using the parent. The intel_th_set_output() path, however, still uses the old logic, leading to the hub driver structure being aliased with something else, like struct pci_driver or struct acpi_driver, and an incorrect call to an address inferred from that, potentially resulting in a crash. Fixes: 8edc514b01e9 ("intel_th: Make SOURCE devices children of the root device") Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50352fa730328b2e946fb912d495653b627c0bf9 Author: Alexander Shishkin Date: Wed Mar 28 18:46:15 2018 +0300 intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate This adds SPDX GPL-2.0 header to the Trace Hub driver and removes the GPLv2 boilerplate text. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/core.c | 10 +--------- drivers/hwtracing/intel_th/debug.c | 10 +--------- drivers/hwtracing/intel_th/debug.h | 10 +--------- drivers/hwtracing/intel_th/gth.c | 10 +--------- drivers/hwtracing/intel_th/gth.h | 10 +--------- drivers/hwtracing/intel_th/intel_th.h | 10 +--------- drivers/hwtracing/intel_th/msu.c | 10 +--------- drivers/hwtracing/intel_th/msu.h | 10 +--------- drivers/hwtracing/intel_th/pci.c | 10 +--------- drivers/hwtracing/intel_th/pti.c | 10 +--------- drivers/hwtracing/intel_th/pti.h | 10 +--------- drivers/hwtracing/intel_th/sth.c | 10 +--------- drivers/hwtracing/intel_th/sth.h | 10 +--------- 13 files changed, 13 insertions(+), 117 deletions(-) commit 4f0c7c6a12906e3571abb3c2b93eca8f727f4c9c Author: Alexander Shishkin Date: Fri Feb 23 13:19:43 2018 +0200 stm class: Make dummy's master/channel ranges configurable To allow for more flexible testing of the stm class, make it possible to specify the ranges of masters and channels that the dummy_stm devices cover. This is done via module parameters. Signed-off-by: Alexander Shishkin drivers/hwtracing/stm/dummy_stm.c | 24 +++++++++++++++++++++--- include/uapi/linux/stm.h | 4 ++++ 2 files changed, 25 insertions(+), 3 deletions(-) commit 9ea393d8d8377b6da8ee25c6a114ec24c0687c7c Author: Alexander Shishkin Date: Wed Mar 28 18:43:57 2018 +0300 stm class: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate This adds SPDX GPL-2.0 header to to stm core files and removes the GPLv2 boilerplate text. Signed-off-by: Alexander Shishkin drivers/hwtracing/stm/console.c | 10 +--------- drivers/hwtracing/stm/core.c | 10 +--------- drivers/hwtracing/stm/dummy_stm.c | 10 +--------- drivers/hwtracing/stm/heartbeat.c | 10 +--------- drivers/hwtracing/stm/policy.c | 10 +--------- drivers/hwtracing/stm/stm.h | 10 +--------- include/linux/stm.h | 10 +--------- include/uapi/linux/stm.h | 9 --------- 8 files changed, 7 insertions(+), 72 deletions(-) commit e89f5b37015309a8bdf0b21d08007580b92f92a4 Author: Christoph Hellwig Date: Wed Mar 28 15:35:35 2018 +0200 dma-mapping: Don't clear GFP_ZERO in dma_alloc_attrs Revert the clearing of __GFP_ZERO in dma_alloc_attrs and move it to dma_direct_alloc for now. While most common architectures always zero dma cohereny allocations (and x86 did so since day one) this is not documented and at least arc and s390 do not zero without the explicit __GFP_ZERO argument. Fixes: 57bf5a8963f8 ("dma-mapping: clear harmful GFP_* flags in common code") Reported-by: Evgeniy Didin Reported-by: Sebastian Ott Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Gleixner Tested-by: Evgeniy Didin Cc: iommu@lists.linux-foundation.org Link: https://lkml.kernel.org/r/20180328133535.17302-2-hch@lst.de include/linux/dma-mapping.h | 8 ++------ lib/dma-direct.c | 3 +++ 2 files changed, 5 insertions(+), 6 deletions(-) commit 3ac3a2f9b22e519bce4bdac688dcb00e3c1556da Merge: fd55382 aba054a Author: Arnd Bergmann Date: Wed Mar 28 17:17:49 2018 +0200 Merge tag 'uniphier-dt-v4.17-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt Pull "UniPhier ARM SoC DT updates for v4.17 (2nd)" from Masahiro Yamada: - add syscon property to sound nodes - add more ethernet pin groups - add ethernet support for PXs3 SoC * tag 'uniphier-dt-v4.17-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: arm64: dts: uniphier: add ethernet node for PXs3 ARM: dts: uniphier: add pinctrl groups of ethernet for second instance ARM: dts: uniphier: add syscon property for UniPhier sound system arm64: dts: uniphier: add syscon property for UniPhier sound system commit fd553821a91ab3109e4fcb0ad902c737f90a3d12 Merge: 3eb8d21 3783f1e Author: Arnd Bergmann Date: Wed Mar 28 17:17:00 2018 +0200 Merge tag 'v4.17-rockchip-dts64-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt Pull "Rockchip dts64 changes for 4.17" from Heiko Stübner: The rk3399 gained support its Cadence displayport controller and some minor additions like pins for 2ch i2s0 and the cif test clocks as well as a default rate for ACLK_VIO that should be 400MHz according to the TRM. The rk3328 got uart dmas fixed - a non-critical fix, as nobody was using that so far. New boards are the rk3328-based roc-rk3328-cc, the rk3368-based Lion-SOM + baseborad from Theobroma Systems and a standalone variant of the Sapphire board, as a lot of people where using that without the Exkavator baseboard. Sapphire also saw a lot of small cleanups of things that are not part of the actual Sapphire board, but the baseboard instead. The rk3399-puma board got i2s and tsadc support and Gru got its DP node enabled. * tag 'v4.17-rockchip-dts64-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: remove keep-power-in-suspend from sdhci of rk3399-sapphire arm64: dts: rockchip: assign clock rate for ACLK_VIO on rk3399 arm64: dts: rockchip: add a standalone version of the rk3399 sapphire arm64: dts: rockchip: move rk3399-sapphire pwr_btn to daughterboard arm64: dts: rockchip: move rk3399-sapphire i2s2 to daughterboard arm64: dts: rockchip: move rk3399-sapphire sdio to excavator baseboard arm64: dts: rockchip: enable I2S codec on rk3399-puma-haikou arm64: dts: rockchip: move i2s0 node from baseboard to SoM on rk3399-puma arm64: dts: rockchip: vdd_log on rk3399-sapphire is not an i2c slave arm64: dts: rockchip: add Haikou baseboard with RK3368-uQ7 SoM arm64: dts: rockchip: add RK3368-uQ7 (Lion) SoM dt-bindings: add RK3368-uQ7 SoM and EVK base board arm64: dts: rockchip: Fix RK3328 UART DMAs arm64: dts: rockchip: enable DP for rk3399-gru arm64: dts: rockchip: add cdn-dp node for rk3399. arm64: dts: rockchip: add i2s0-2ch-bus pins on rk3399 arm64: dts: rockchip: enable tsadc on rk3399-puma arm64: dts: rockchip: add roc-rk3328-cc board arm64: dts: rockchip: Add cif test clocks for rk3399 commit 3eb8d21ac6c90db1fa8eb440fcdf770e3e815d89 Merge: 7733911 8dc9b97 Author: Arnd Bergmann Date: Wed Mar 28 17:15:43 2018 +0200 Merge tag 'v4.17-rockchip-dts32-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt Pull "Rockchip dts32 changes for 4.17" from Heiko Stübner: For general soc-specific changes the rk322x socs got their correct grf compatible set. Other than that there are some board-specific changes like the Rock2 getting its otg port, recovery and power keys enabled. The vyasa board gained an enabled emmc node and the phyCORE boards got UHS speeds in their sd card and a fixed sd-card power supply. Finally the veyron boards dropped a nonstandard and unused property. * tag 'v4.17-rockchip-dts32-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: enable USB-OTG port on Radxa Rock2 Square ARM: dts: rockchip: add recovery button for Rock2 Square ARM: dts: rockchip: add power key for Rock2 Square ARM: dts: rockchip: Add eMMC node for rk3288-vyasa ARM: dts: rockchip: Support UHS mode for SD card on phyCORE-RK3288 RDK ARM: dts: rockchip: Fix supply node for card's power on phycore som ARM: dts: rockchip: add "rockchip,rk3228-grf" compatible for rk322x grf node ARM: dts: rockchip: drop veyron's nonstandard 'backlight-boot-off' commit 84985460569570f5cca5fabbfb811e11b07bc916 Merge: 064fe81 03151b8 Author: Arnd Bergmann Date: Wed Mar 28 17:14:29 2018 +0200 Merge tag 'v4.17-rockchip-soc32-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/soc Pull "Rockchip soc32 changes for 4.17" from Heiko Stübner: Fix for the legacy pmu-regmap in the smp-code to have a real name and therefore not create a dummy* entry in debugfs. * tag 'v4.17-rockchip-soc32-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: rockchip: Set name of pmu regmap_config in smp code commit 7df3f0bb5f90e3470de2798452000e221420059c Merge: 7f95de5 b127199 Author: Arnd Bergmann Date: Wed Mar 28 17:08:34 2018 +0200 Merge tag 'v4.17-rockchip-drivers-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/drivers Pull "Rockchip driver changes for 4.17" from Heiko Stübner: Rockchip soc drivers containing conversion of the power-domain driver to use the clk-bulk APIs and two more socs to disable jtag-switching. On the plus-side the issue we see with that are _supposed_ to be fixed in hardware in upcoming socs, so maybe this can be the last of those. * tag 'v4.17-rockchip-drivers-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: soc: rockchip: power-domain: Add a sanity check on pd->num_clks soc: rockchip: power-domain: use clk_bulk APIs soc: rockchip: disable jtag switching for RK3128 SoCs soc: rockchip: disable jtag switching for RK3228/RK3229 SoCs commit 7f95de5e4a27d3cda21f7223c22f22ab6c5b3def Merge: f8d6dc7 0089313 Author: Arnd Bergmann Date: Wed Mar 28 17:02:22 2018 +0200 Merge tag 'reset-for-4.17-2' of git://git.pengutronix.de/git/pza/linux into next/drivers Pull "Reset controller changes for v4.17, part 2" from Philipp Zabel: This tag contains reset lookup support, similar to pwm lookups, for legacy non-DT platforms, a few new reset controls and a Kconfig fix for uniphier SoCs, as well as a new driver for the STM32MP1 peripheral reset controller. The reset lookups are merged from a separate, immutable branch, that may also be merged into the davinci tree. * tag 'reset-for-4.17-2' of git://git.pengutronix.de/git/pza/linux: reset: uniphier: add ethernet reset control support for PXs3 reset: stm32mp1: Enable stm32mp1 reset driver dt-bindings: reset: add STM32MP1 resets reset: uniphier: add Pro4/Pro5/PXs2 audio systems reset control reset: imx7: add 'depends on HAS_IOMEM' to fix unmet dependency reset: modify the way reset lookup works for board files reset: add support for non-DT systems commit 272641206100e89656038180da12eff4f03d79d1 Author: Dan Haab Date: Tue Mar 27 11:24:34 2018 -0600 MIPS: BCM47XX: Add Luxul XAP1500/XWR1750 WiFi LEDs Some Luxul devices use PCIe connected GPIO LEDs that are not available until the PCI subsytem and its drivers load. Using the same array for these LEDs would block registering any LEDs until all GPIOs become available. This may be undesired behavior as some LEDs should be available as early as possible (e.g. system status LED). This patch will allow registering available LEDs while deferring these PCIe GPIO connected 'extra' LEDs until they become available. Signed-off-by: Dan Haab Cc: Ralf Baechle Cc: Hauke Mehrtens Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18952/ Signed-off-by: James Hogan arch/mips/bcm47xx/leds.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 7c9b845e79eadd074820e36d426502a9c54cafcf Author: Bartlomiej Zolnierkiewicz Date: Wed Mar 28 16:34:29 2018 +0200 video: fbdev: s3c-fb: remove dead platform code for Exynos and S5PV210 platforms Exynos5, Exynos4 and S5PV210 platforms have been converted to use Device Tree and Exynos DRM driver long time ago. Remove dead platform code for these platforms and update Kconfig s3c-fb entry accordingly. Acked-by: Jingoo Han Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/Kconfig | 3 +- drivers/video/fbdev/s3c-fb.c | 162 ------------------------------------------- 2 files changed, 1 insertion(+), 164 deletions(-) commit 46953e6aab262dc4fc1a7b00019d3852bc0fe90d Author: Markus Elfring Date: Wed Mar 28 16:34:29 2018 +0200 video: au1100fb: Delete an unnecessary variable initialisation in au1100fb_drv_probe() The local variable "fbdev" will be reassigned by a following statement. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/au1100fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db66f0252e2f17a469397a6fc4a100ed558e6775 Author: Markus Elfring Date: Wed Mar 28 16:34:29 2018 +0200 video: au1100fb: Improve a size determination in au1100fb_drv_probe() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/au1100fb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 29914badc59b23e496231c3234f7d3f3f35708c4 Author: Markus Elfring Date: Wed Mar 28 16:34:29 2018 +0200 video: au1100fb: Delete an error message for a failed memory allocation in au1100fb_drv_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/au1100fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3af04d5c459485ce3f4e18c6331515092ca85be4 Author: Markus Elfring Date: Wed Mar 28 16:34:29 2018 +0200 video/console/sticore: Delete an error message for a failed memory allocation in sti_try_rom_generic() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Cc: Helge Deller Cc: "James E. J. Bottomley" Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/console/sticore.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d6f586163f86e91c34ccca72e2d9374bc77d990a Author: Markus Elfring Date: Wed Mar 28 16:34:29 2018 +0200 video: ARM CLCD: Improve a size determination in clcdfb_probe() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Cc: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/amba-clcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c97d7879f8cd3d1a35ca83cc60d70cfda71fa878 Author: Markus Elfring Date: Wed Mar 28 16:34:29 2018 +0200 video: ARM CLCD: Delete an error message for a failed memory allocation in clcdfb_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Cc: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/amba-clcd.c | 1 - 1 file changed, 1 deletion(-) commit 2b797d332199eb4dc54019e686221661eff5e2c9 Author: Markus Elfring Date: Wed Mar 28 16:34:28 2018 +0200 video: matroxfb: Delete an error message for a failed memory allocation in matroxfb_crtc2_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/matrox/matroxfb_crtc2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c116568689d2ddddc878a8c55cd9e84d27b88e94 Author: Markus Elfring Date: Wed Mar 28 16:34:28 2018 +0200 video: s3c-fb: Improve a size determination in s3c_fb_probe() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Jingoo Han Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/s3c-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00f3b8f1cf1b4711e91a543ebe1289b7415150cd Author: Markus Elfring Date: Wed Mar 28 16:34:28 2018 +0200 video: s3c-fb: Delete an error message for a failed memory allocation in s3c_fb_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Jingoo Han Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/s3c-fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d43f4b5d50837ea4f0713b101faf7a4cf069e4b6 Author: Markus Elfring Date: Wed Mar 28 16:34:28 2018 +0200 video: fsl-diu-fb: Delete an error message for a failed memory allocation in fsl_diu_init() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Timur Tabi Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/fsl-diu-fb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 3d2ad0a1b7f0bcc65da57152b98a08633b410e63 Author: Markus Elfring Date: Wed Mar 28 16:34:28 2018 +0200 video: ssd1307fb: Improve a size determination in ssd1307fb_probe() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Cc: Arnd Bergmann Cc: Bastian Stender Cc: Jyri Sarha Cc: Tomi Valkeinen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/ssd1307fb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 668912549db0fa4fedc3aae3fc389b492958a275 Author: Markus Elfring Date: Wed Mar 28 16:34:28 2018 +0200 video: smscufx: Delete an error message for a failed memory allocation in ufx_realloc_framebuffer() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Cc: Steve Glendinning Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/smscufx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4befd0cf21cd8ab11f45b9601b37fe8bc91de29f Author: Markus Elfring Date: Wed Mar 28 16:34:28 2018 +0200 video: smscufx: Return an error code only as a constant in ufx_realloc_framebuffer() * Return an error code without storing it in an intermediate variable. * Delete the label "error" and local variable "retval" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Cc: Steve Glendinning Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/smscufx.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit daa0524bc0a07048e33fdb61cae30467ef4ceff7 Author: Markus Elfring Date: Wed Mar 28 16:34:27 2018 +0200 video: smscufx: Less checks in ufx_usb_probe() after error detection Up to four checks could be repeated by the ufx_usb_probe() function during error handling even if the relevant properties can be determined for the involved variables before by source code analysis. * Return directly after a call of the function "kzalloc" failed at the beginning. * Adjust jump targets so that extra checks can be omitted at the end. * Delete initialisations for the variables "info" and "retval" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Cc: Steve Glendinning Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/smscufx.c | 46 ++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 27 deletions(-) commit 3c097b069bb82391fcad73373eccbca8400636e7 Author: Markus Elfring Date: Wed Mar 28 16:34:27 2018 +0200 video: udlfb: Return an error code only as a constant in dlfb_realloc_framebuffer() * Return an error code without storing it in an intermediate variable. * Delete the label "error" and local variable "retval" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Cc: Bernie Thompson Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/udlfb.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit b78f8ca82b5f3ee4bf6b3979624ef76fa3de7611 Author: Markus Elfring Date: Wed Mar 28 16:34:27 2018 +0200 video/fbdev/stifb: Delete an error message for a failed memory allocation in stifb_init_fb() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Cc: Helge Deller Cc: "James E. J. Bottomley" Cc: Rolf Eike Beer Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/stifb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f9815f945aff2204b8afbbb9d2182024eb44a194 Author: Markus Elfring Date: Wed Mar 28 16:34:27 2018 +0200 video/fbdev/stifb: Return -ENOMEM after a failed kzalloc() in stifb_init_fb() Replace an error code for the indication of a memory allocation failure in this function. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2: Initial git repository build") Suggested-by: Rolf Eike Beer Signed-off-by: Markus Elfring Cc: Helge Deller Cc: "James E. J. Bottomley" Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/stifb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfb810f85992071ef715188163afb34c1701dc85 Author: Gustavo A. R. Silva Date: Wed Mar 28 16:34:27 2018 +0200 video: fbdev: aty128fb: use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Cc: Paul Mackerras Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/aty/aty128fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e393cb1cd93c398a16ad28252a8f9b8e9d11721a Author: Colin Ian King Date: Wed Mar 28 16:34:27 2018 +0200 fbdev: aty: fix missing indentation in if statement There is a missing indentation following an if statement, fix this. Detected by Coccinelle: drivers/video/fbdev/aty/mach64_ct.c:183:2-15: code aligned with following code on line 184 Signed-off-by: Colin Ian King Cc: Philippe Ombredanne Cc: Thomas Gleixner Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/aty/mach64_ct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65896545b69ffaac947c12e11d3dcc57fd1fb772 Author: Dave Martin Date: Wed Mar 28 10:50:49 2018 +0100 arm64: uaccess: Fix omissions from usercopy whitelist When the hardend usercopy support was added for arm64, it was concluded that all cases of usercopy into and out of thread_struct were statically sized and so didn't require explicit whitelisting of the appropriate fields in thread_struct. Testing with usercopy hardening enabled has revealed that this is not the case for certain ptrace regset manipulation calls on arm64. This occurs because the sizes of usercopies associated with the regset API are dynamic by construction, and because arm64 does not always stage such copies via the stack: indeed the regset API is designed to avoid the need for that by adding some bounds checking. This is currently believed to affect only the fpsimd and TLS registers. Because the whitelisted fields in thread_struct must be contiguous, this patch groups them together in a nested struct. It is also necessary to be able to determine the location and size of that struct, so rather than making the struct anonymous (which would save on edits elsewhere) or adding an anonymous union containing named and unnamed instances of the same struct (gross), this patch gives the struct a name and makes the necessary edits to code that references it (noisy but simple). Care is needed to ensure that the new struct does not contain padding (which the usercopy hardening would fail to protect). For this reason, the presence of tp2_value is made unconditional, since a padding field would be needed there in any case. This pads up to the 16-byte alignment required by struct user_fpsimd_state. Acked-by: Kees Cook Reported-by: Mark Rutland Fixes: 9e8084d3f761 ("arm64: Implement thread_struct whitelist for hardened usercopy") Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/include/asm/processor.h | 38 +++++++++++++++++++----------- arch/arm64/kernel/fpsimd.c | 47 +++++++++++++++++++------------------- arch/arm64/kernel/process.c | 6 ++--- arch/arm64/kernel/ptrace.c | 30 ++++++++++++------------ arch/arm64/kernel/signal.c | 3 ++- arch/arm64/kernel/signal32.c | 3 ++- arch/arm64/kernel/sys_compat.c | 2 +- 7 files changed, 72 insertions(+), 57 deletions(-) commit d01d327406d9c36e066181240ac078b636871de8 Author: Davidlohr Bueso Date: Mon Mar 26 14:09:25 2018 -0700 irqchip/gic: Update supports_deactivate static key to modern api No changes in semantics -- key init is true; replace static_key_slow_dec with static_branch_disable static_key_true with static_branch_likely The first is because we never actually do any couterpart incs, thus there is really no reference counting semantics going on. Use the more proper static_branch_disable() construct. Also added a '_key' suffix to supports_deactivate, for better self documentation. Cc: Thomas Gleixner Cc: Jason Cooper Signed-off-by: Davidlohr Bueso Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 20 ++++++++++---------- drivers/irqchip/irq-gic.c | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 21 deletions(-) commit 20b8547277a6e8ee1d928792c1b2782c9a2a6cf5 Author: Dave Martin Date: Wed Mar 28 10:50:48 2018 +0100 arm64: fpsimd: Split cpu field out from struct fpsimd_state In preparation for using a common representation of the FPSIMD state for tasks and KVM vcpus, this patch separates out the "cpu" field that is used to track the cpu on which the state was most recently loaded. This will allow common code to operate on task and vcpu contexts without requiring the cpu field to be stored at the same offset from the FPSIMD register data in both cases. This should avoid the need for messing with the definition of those parts of struct vcpu_arch that are exposed in the KVM user ABI. The resulting change is also convenient for grouping and defining the set of thread_struct fields that are supposed to be accessible to copy_{to,from}_user(), which includes user_fpsimd_state but should exclude the cpu field. This patch does not amend the usercopy whitelist to match: that will be addressed in a subsequent patch. Signed-off-by: Dave Martin [will: inline fpsimd_flush_state for now] Signed-off-by: Will Deacon arch/arm64/include/asm/fpsimd.h | 29 ++--------------------------- arch/arm64/include/asm/processor.h | 4 ++-- arch/arm64/kernel/fpsimd.c | 37 ++++++++++++++++++------------------- arch/arm64/kernel/ptrace.c | 10 +++++----- arch/arm64/kernel/signal.c | 3 +-- arch/arm64/kernel/signal32.c | 3 +-- 6 files changed, 29 insertions(+), 57 deletions(-) commit 7f170499f734c417290518aa50cac11953bf8161 Author: Philip Elcan Date: Tue Mar 27 21:55:32 2018 -0400 arm64: tlbflush: avoid writing RES0 bits Several of the bits of the TLBI register operand are RES0 per the ARM ARM, so TLBI operations should avoid writing non-zero values to these bits. This patch adds a macro __TLBI_VADDR(addr, asid) that creates the operand register in the correct format and honors the RES0 bits. Acked-by: Mark Rutland Signed-off-by: Philip Elcan Signed-off-by: Will Deacon arch/arm64/include/asm/tlbflush.h | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit dd60d217062f4527f4a94af8b3a2e9666c26f903 Author: Andi Kleen Date: Tue Jul 25 17:20:32 2017 -0700 KVM: x86: Fix perf timer mode IP reporting KVM and perf have a special backdoor mechanism to report the IP for interrupts re-executed after vm exit. This works for the NMIs that perf normally uses. However when perf is in timer mode it doesn't work because the timer interrupt doesn't get this special treatment. This is common when KVM is running nested in another hypervisor which may not implement the PMU, so only timer mode is available. Call the functions to set up the backdoor IP also for non NMI interrupts. I renamed the functions to set up the backdoor IP reporting to be more appropiate for their new use. The SVM change is only compile tested. v2: Moved the functions inline. For the normal interrupt case the before/after functions are now called from x86.c, not arch specific code. For the NMI case we still need to call it in the architecture specific code, because it's already needed in the low level *_run functions. Signed-off-by: Andi Kleen [Removed unnecessary calls from arch handle_external_intr. - Radim] Signed-off-by: Radim Krčmář arch/x86/kvm/svm.c | 4 ++-- arch/x86/kvm/vmx.c | 4 ++-- arch/x86/kvm/x86.c | 17 ++++------------- arch/x86/kvm/x86.h | 14 ++++++++++++-- 4 files changed, 20 insertions(+), 19 deletions(-) commit 7d3d88401fb75081e731d62c1c79584413525aa6 Author: Haridhar Kalvala Date: Wed Mar 28 14:16:10 2018 +0800 HID: google: Enable PM Full On mode when adjusting backlight hammer LED backlight brightness is not getting set when USB device is in suspend state. This patch fixes the issue by requesting USB HID device to be in FULLON mode, so that sending hardware output report and hardware raw request won't fail to set brightness, and set device back to NORMAL mode once this call returns. Signed-off-by: Haridhar Kalvala Reviewed-by: Dmitry Torokhov Signed-off-by: Nicolas Boichat Signed-off-by: Jiri Kosina drivers/hid/hid-google-hammer.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit abe7a4586f0cf0ef35ed5f713ccfd4eb0770a5ac Merge: d32ef54 dc6ed61 Author: Radim Krčmář Date: Wed Mar 28 16:09:09 2018 +0200 Merge tag 'kvm-arm-for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm KVM/ARM updates for v4.17 - VHE optimizations - EL2 address space randomization - Variant 3a mitigation for Cortex-A57 and A72 - The usual vgic fixes - Various minor tidying-up commit 8bda3e269ec0d044ff4af7ede6d3b144f8493aae Author: Maciej W. Rozycki Date: Mon Mar 26 19:11:51 2018 +0100 MIPS: Make the default for PHYSICAL_START always 64-bit Make the default for PHYSICAL_START always 64-bit, ensuring that a correct sign-extended value is used if a 32-bit image is loaded by a 64-bit system, and matching how the load address is set in platform Makefile fragments (arch/mips/*/Platform) in the absence of the PHYSICAL_START configuration option. Of course PHYSICAL_START itself is a misnomer as the load address is virtual rather than physical (or otherwise sign-extension would not apply). Fixes: 7aa1c8f47e7e ("MIPS: kdump: Add support") Signed-off-by: Maciej W. Rozycki Cc: Ralf Baechle Cc: Maxim Uvarov Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18939/ Signed-off-by: James Hogan arch/mips/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 20cfb7a04f0a8b7f8f45cf630e23524d51bb3cd9 Author: Colin Ian King Date: Wed Mar 28 11:07:01 2018 +0100 samples/bpf: fix spelling mistake: "revieve" -> "receive" Trivial fix to spelling mistake in error message text Signed-off-by: Colin Ian King Signed-off-by: Daniel Borkmann samples/bpf/cookie_uid_helper_example.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 206b1c6012a8a3792948ed699f3973d7be13f6db Author: Al Viro Date: Mon Mar 19 14:29:17 2018 -0400 alpha: get rid of pointless insn in ret_from_kernel_thread It used to clear a3, so that signal handling on return to userland would've passed zero r0 to do_work_pending(), preventing the syscall restart logics from triggering. It had been pointless all along, since we only go there after successful do_execve(). Which does clear regs->r0 on alpha, preventing the syscall restart logics just fine, no extra help needed. Good thing, that, since back in 2012 do_work_pending() has lost the second argument, shifting the registers used to pass that thing from a3 to a2. Commit that had done that adjusted the entry.S code accordingly, but missed that one. As the result, we were left with useless insn in ret_from_kernel_thread and confusing comment to go with it. Get rid of both... Signed-off-by: Al Viro arch/alpha/kernel/entry.S | 1 - 1 file changed, 1 deletion(-) commit e4eacd6b899abc5fa2a0b6d20d5c430feba96858 Author: Al Viro Date: Sun Mar 18 12:58:18 2018 -0400 alpha: switch pci syscalls to SYSCALL_DEFINE Signed-off-by: Al Viro arch/alpha/kernel/pci-noop.c | 15 +++++++-------- arch/alpha/kernel/pci.c | 5 +++-- 2 files changed, 10 insertions(+), 10 deletions(-) commit f61e64310b75733d782e930d1fb404b84699eed6 Author: Greg Ungerer Date: Wed Mar 28 17:12:18 2018 +1000 m68k: set dma and coherent masks for platform FEC ethernets As of commit 205e1b7f51e4 ("dma-mapping: warn when there is no coherent_dma_mask") the Freescale FEC driver is issuing the following warning on driver initialization on ColdFire systems: WARNING: CPU: 0 PID: 1 at ./include/linux/dma-mapping.h:516 0x40159e20 Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 4.16.0-rc7-dirty #4 Stack from 41833dd8: 41833dd8 40259c53 40025534 40279e26 00000003 00000000 4004e514 41827000 400255de 40244e42 00000204 40159e20 00000009 00000000 00000000 4024531d 40159e20 40244e42 00000204 00000000 00000000 00000000 00000007 00000000 00000000 40279e26 4028d040 40226576 4003ae88 40279e26 418273f6 41833ef8 7fffffff 418273f2 41867028 4003c9a2 4180ac6c 00000004 41833f8c 4013e71c 40279e1c 40279e26 40226c16 4013ced2 40279e26 40279e58 4028d040 00000000 Call Trace: [<40025534>] 0x40025534 [<4004e514>] 0x4004e514 [<400255de>] 0x400255de [<40159e20>] 0x40159e20 [<40159e20>] 0x40159e20 It is not fatal, the driver and the system continue to function normally. As per the warning the coherent_dma_mask is not set on this device. There is nothing special about the DMA memory coherency on this hardware so we can just set the mask to 32bits in the platform data for the FEC ethernet devices. Signed-off-by: Greg Ungerer arch/m68k/coldfire/device.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 95dff480bb7b7b5ea534ebf00a18ff57eb897669 Merge: c0b3467 5239650 Author: Michael Ellerman Date: Wed Mar 28 22:59:50 2018 +1100 Merge branch 'fixes' into next Merge our fixes branch from the 4.16 cycle. There were a number of important fixes merged, in particular some Power9 workarounds that we want in next for testing purposes. There's also been some conflicting changes in the CPU features code which are best merged and tested before going upstream. commit f47ecc0cf3d3d8e5d487b8392335ff151e4251f1 Author: Nishka Dasgupta Date: Sat Mar 24 11:59:17 2018 +0000 staging: vt6655: Delete unused typedef enum _chip_type Delete unused typedef enum _chip_type. Signed-off-by: Nishka Dasgupta Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_cfg.h | 4 ---- 1 file changed, 4 deletions(-) commit 02769c265f15b85a706a119abec63986525d74b6 Author: Nishka Dasgupta Date: Sat Mar 24 11:59:16 2018 +0000 staging: vt6655: Delete unused typedef struct _version Delete unused typedef struct _version. Signed-off-by: Nishka Dasgupta Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_cfg.h | 7 ------- 1 file changed, 7 deletions(-) commit 7e131ddea86b7e51f82a9391328e14c52df74348 Author: Nishka Dasgupta Date: Sat Mar 24 11:59:15 2018 +0000 staging: vt6655: Delete unused typedef enum _CARD_STATUS_TYPE Delete unused typedef enum _CARD_STATUS_TYPE. Signed-off-by: Nishka Dasgupta Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.h | 6 ------ 1 file changed, 6 deletions(-) commit f45de8cf2f4b05d913975f346b652ece0fcd7ff1 Author: Nishka Dasgupta Date: Sat Mar 24 11:59:14 2018 +0000 staging: vt6655: Delete unused enum CARD_PKT_TYPE Delete unused enum CARD_PKT_TYPE. Signed-off-by: Nishka Dasgupta Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.h | 7 ------- 1 file changed, 7 deletions(-) commit dc6ed61d2f824a595033744fc1f3bf4cb98768b5 Author: Marc Zyngier Date: Wed Mar 28 12:46:07 2018 +0100 arm64: Add temporary ERRATA_MIDR_ALL_VERSIONS compatibility macro MIDR_ALL_VERSIONS is changing, and won't have the same meaning in 4.17, and the right thing to use will be ERRATA_MIDR_ALL_VERSIONS. In order to cope with the merge window, let's add a compatibility macro that will allow a relatively smooth transition, and that can be removed post 4.17-rc1. Signed-off-by: Marc Zyngier arch/arm64/kernel/cpu_errata.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f1ed9dbd0620baba5dd83e16bb3dc2a46b78de31 Author: Quytelda Kahja Date: Mon Mar 26 02:18:30 2018 -0700 staging: rtl8723bs: Remove duplicate #defines. The modified file includes 'linux/ieee80211.h', but redefines many constants that already exist in the header. This will create a conflict if the values are ever changed in the kernel. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/include/ieee80211.h | 12 ------------ 1 file changed, 12 deletions(-) commit 527947677bbd96ebb6190ea92d5a2f0529599a3a Author: Sergio Paracuellos Date: Mon Mar 26 18:52:52 2018 +0200 staging: ks7010: factor out some functions from hostif_init This commit factors out some init functions from hostif_init to improve readability. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 77 ++++++++++++++++++++++++++------------ 1 file changed, 53 insertions(+), 24 deletions(-) commit 07934dc8a2786b574c60724ae06699430f2ae7c9 Author: Sergio Paracuellos Date: Mon Mar 26 18:52:51 2018 +0200 staging: ks7010: avoid camel case in function name get_DWORD This commit renames function get_DWORD into get_dword to avoid camel case. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit ef3f0d5f8224325aa007c52a1449bf8b19e8448e Author: Sergio Paracuellos Date: Mon Mar 26 18:52:50 2018 +0200 staging: ks7010: avoid camel case in function name get_WORD This commit renames get_WORD function into get_word to avoid camel case. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 232a8bac79c3bb1444e51a55aedcf53c4ecb617e Author: Sergio Paracuellos Date: Mon Mar 26 18:52:49 2018 +0200 staging: ks7010: avoid camel case in function name get_BYTE This commit renames get_BYTE function in favour of get_byte to avoid camel case. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit d1c4520dafba7d1a424940f50d2805f1fb9e5cac Author: Sergio Paracuellos Date: Mon Mar 26 18:52:47 2018 +0200 staging: ks7010: use GENMASK instead of custom defines in SME_WEP_VAL_MASK This commits replaces custom defines that were been used to define a mask using GENMASK macro from linux bitops header file. With this change the "WARNING: line over 80 characters" warning message reported by checkpatch script is also removed. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55189ccbaec04d79226f250a31ce5b96f47116b0 Author: Quytelda Kahja Date: Fri Mar 23 23:40:43 2018 -0700 staging: ks7010: Fix spelling mistakes. Fix two spelling mistakes in comments. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.h | 2 +- drivers/staging/ks7010/ks_wlan.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 16b102e7815251687b0890d7bf1e9650de0b1cd9 Author: Sergio Paracuellos Date: Fri Mar 23 14:05:09 2018 +0100 staging: ks7010: use lower case names in michael_mic_t struct fields Replace upper case fields and camel cases for fields included in michael_mic_t structure Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 8 +++--- drivers/staging/ks7010/michael_mic.c | 54 ++++++++++++++++++------------------ drivers/staging/ks7010/michael_mic.h | 14 +++++----- 3 files changed, 38 insertions(+), 38 deletions(-) commit 291b93ca2c50c8d4b712b92da30182f00193c174 Author: Fengguang Wu Date: Mon Mar 26 21:41:30 2018 +0200 staging: wilc1000: fix memdup.cocci warnings drivers/staging/wilc1000/host_interface.c:946:32-39: WARNING opportunity for kmemdup drivers/staging/wilc1000/host_interface.c:970:30-37: WARNING opportunity for kmemdup Use kmemdup rather than duplicating its implementation Generated by: scripts/coccinelle/api/memdup.cocci Fixes: aaea2164bdff ("staging: wilc1000: check for kmalloc allocation failures") CC: Colin Ian King Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 2415fa8f941f71dda5a9a47e5e3cf77a6584516b Author: HariPrasath Elango Date: Mon Mar 26 18:51:55 2018 +0530 staging: wilc1000: remove unused return variable In this function,removed the unused integer variable as it is not actually used to return function success or failure. Return is a pointer to net_device structure. Signed-off-by: HariPrasath Elango Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/linux_mon.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit fe014d4e6b55a56d81d152ac1643ee6f44bf096c Author: Ajay Singh Date: Mon Mar 26 17:16:03 2018 +0530 staging: wilc1000: free memory allocated for general info message from firmware Free allocated memory for failure scenario while processing the information message received from the firmware. Added NULL check and used kmemdup in the flow of handling information message. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 48 ++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 17 deletions(-) commit 158152be0ae6b492ef7d590237be245f4810ef05 Author: Ajay Singh Date: Mon Mar 26 17:16:02 2018 +0530 staging: wilc1000: split handle_rcvd_gnrl_async_info() to avoid leading tabs Fix 'Too many leading tabs' issue found by checkpatch.pl script in handle_rcvd_gnrl_async_info(). Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 286 ++++++++++++++++-------------- 1 file changed, 149 insertions(+), 137 deletions(-) commit 3b5f10dbea184d2201207e78eb548c267c0474e2 Author: Ajay Singh Date: Mon Mar 26 17:16:01 2018 +0530 staging: wilc1000: free allocated memory in wilc_add_rx_gtk() Free memory allocated in wilc_add_rx_gtk() before returing from the function. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 2dc916f48ca300d0d6f6468b8cfe78d29c4f8423 Author: Ajay Singh Date: Mon Mar 26 17:16:00 2018 +0530 staging: wilc1000: fix to free allocated memory in wilc_add_ptk() Free allocated memory in wilc_add_ptk() when it fails to enqueue the command. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 8d5b5e6a26d187221c541a8fb0c59ab8ad536888 Author: Ajay Singh Date: Mon Mar 26 17:15:59 2018 +0530 staging: wilc1000: free allocated memory after processing wilc_send_config_pkt() Free allocated memory after completing wilc_send_config_pkt() function. Remove unncessary use of 'stamac' pointer in handle_get_inactive_time(). Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit c26bdea4e709f8918c239f16235b4b7208fbc1cb Author: Ajay Singh Date: Mon Mar 26 17:15:58 2018 +0530 staging: wilc1000: free memory allocated in add wep key functions Free memory allocated for wep key when command enqueue is failed. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 7ab3e668aa9c74fe63fd28d47178d27142cc520d Author: Ajay Singh Date: Mon Mar 26 17:15:57 2018 +0530 staging: wilc1000: free allocated memory in edit and add station functions Added fix to free the allocated memory in case of failure to enqueue the command. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 25b951332da01e4e4d5e9d8d36518b46e1e4015c Author: Ajay Singh Date: Mon Mar 26 17:15:56 2018 +0530 staging: wilc1000: avoid 'NULL' pointer access in wilc_network_info_received() Added 'NULL' check before accessing the allocated memory. Free up the memory incase of failure to enqueue the command. Used kmemdup instead of kmalloc & memcpy. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 56294f87149fc83a7eb642d6b2ea55a82ba8cd78 Author: Ajay Singh Date: Mon Mar 26 17:15:55 2018 +0530 staging: wilc1000: remove unused global variables related to p2p Cleanup patch to remove the unused global variables defined for p2p. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 59 ------------------------------- 1 file changed, 59 deletions(-) commit 4a8ae3353694014241b3f44303c3a597e9ef0c15 Author: Alexander Shishkin Date: Wed Mar 28 14:30:27 2018 +0300 MAINTAINERS: Bestow upon myself the care for drivers/hwtracing Although all components of drivers/hwtracing are Maintained, the directory itself isn't, which leads to confusion when people want to patch the Kconfig file, for example. This adds an entry to the MAINTAINERS file with myself as a maintainer. Signed-off-by: Alexander Shishkin MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) commit a0306db6e5758b0488c79e739de3c0ffe47ea62f Merge: 4bc07aa 3eb2ce8 Author: Greg Kroah-Hartman Date: Wed Mar 28 13:33:37 2018 +0200 Merge 4.16-rc7 into staging-next We want the IIO and staging driver fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 45ea83f02dc090c477261ac6c93aa2097edca601 Author: Stephen Hemminger Date: Tue Mar 27 15:01:04 2018 -0700 hv: add SPDX license id to Kconfig Missing license on Kconfig file. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 76241271aaf73c683da6f103e9b5722db3122392 Author: Stephen Hemminger Date: Tue Mar 27 15:01:03 2018 -0700 hv: add SPDX license to trace Missing license on Hyper-V VMBUS tracing files. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_trace.c | 2 ++ drivers/hv/hv_trace.h | 2 ++ 2 files changed, 4 insertions(+) commit 238064f13d057390a8c5e1a6a80f4f0a0ec46499 Author: Dexuan Cui Date: Tue Mar 27 15:01:02 2018 -0700 Drivers: hv: vmbus: do not mark HV_PCIE as perf_device The pci-hyperv driver's channel callback hv_pci_onchannelcallback() is not really a hot path, so we don't need to mark it as a perf_device, meaning with this patch all HV_PCIE channels' target_cpu will be CPU0. Signed-off-by: Dexuan Cui Cc: stable@vger.kernel.org Cc: Stephen Hemminger Cc: K. Y. Srinivasan Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f68b1a12591edd791603b1670717fc31bda0c863 Author: Dexuan Cui Date: Tue Mar 27 15:01:01 2018 -0700 Drivers: hv: vmbus: respect what we get from hv_get_synint_state() I didn't really hit a bug, but just happened to notice the redundant line. Signed-off-by: Dexuan Cui Cc: Stephen Hemminger Cc: K. Y. Srinivasan Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv.c | 1 - 1 file changed, 1 deletion(-) commit b5b38200ebe54879a7264cb6f33821f61c586a7e Author: Kees Cook Date: Tue Mar 27 14:06:14 2018 -0700 /dev/mem: Avoid overwriting "err" in read_mem() Successes in probe_kernel_read() would mask failures in copy_to_user() during read_mem(). Reported-by: Brad Spengler Fixes: 22ec1a2aea73 ("/dev/mem: Add bounce buffer for copy-out") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/char/mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit adc91ab7854195f107c137aa197ddfe8b82a2331 Author: Marc Zyngier Date: Wed Mar 28 11:59:13 2018 +0100 Revert "arm64: KVM: Use SMCCC_ARCH_WORKAROUND_1 for Falkor BP hardening" Creates far too many conflicts with arm64/for-next/core, to be resent post -rc1. This reverts commit f9f5dc19509bbef6f5e675346f1a7d7b846bdb12. Signed-off-by: Marc Zyngier arch/arm64/include/asm/cpucaps.h | 2 +- arch/arm64/include/asm/kvm_asm.h | 2 ++ arch/arm64/kernel/bpi.S | 8 ++++++ arch/arm64/kernel/cpu_errata.c | 55 ++++++++++++++++++++++++++-------------- arch/arm64/kvm/hyp/entry.S | 12 +++++++++ arch/arm64/kvm/hyp/switch.c | 10 ++++++++ 6 files changed, 69 insertions(+), 20 deletions(-) commit b24d0d5b12a678b96676348976982686fbe222b4 Merge: 4ac0d3f 3eb2ce8 Author: Greg Kroah-Hartman Date: Wed Mar 28 12:27:35 2018 +0200 Merge 4.16-rc7 into char-misc-next We want the hyperv fix in here for merging and testing. Signed-off-by: Greg Kroah-Hartman commit 9a233bb8025105db9a60b5d761005cc5a6c77f3d Author: Luca Coelho Date: Mon Dec 18 20:13:07 2017 +0200 iwlwifi: mvm: check if mac80211_queue is valid in iwl_mvm_disable_txq Sometimes iwl_mvm_disable_txq() may be called with mac80211_queue == IEEE80211_INVAL_HW_QUEUE, and this would cause us to use BIT(0xFF) which is way too large for the u16 we used to store it in hw_queue_to_mac820211. If this happens the following UBSAN warning will be generated: [ 167.185167] UBSAN: Undefined behaviour in drivers/net/wireless/intel/iwlwifi/mvm/utils.c:838:5 [ 167.185171] shift exponent 255 is too large for 64-bit type 'long unsigned int' Fix that by checking that it is not IEEE80211_INVAL_HW_QUEUE and, while at it, add a warning if the queue number is larger than IEEE80211_MAX_QUEUES. Fixes: 34e10860ae8d ("iwlwifi: mvm: remove references to queue_info in new TX path") Reported-by: Paul Menzel Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 759931c79fc3c8c4748269a5c2e7d48563baa6d5 Author: Mordechay Goodstein Date: Tue Dec 19 10:24:44 2017 +0000 iwlwifi: set default timstamp marker cmd In case debug configuration is started with LDBG cmd also start timestamp marker for syncing logs witn the FW. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 4 ++++ drivers/net/wireless/intel/iwlwifi/fw/debugfs.c | 24 +++++++++++++++--------- drivers/net/wireless/intel/iwlwifi/fw/debugfs.h | 5 +++++ 3 files changed, 24 insertions(+), 9 deletions(-) commit b0c9835c883c71013191e8ec1b8d006bb4c05697 Author: Sara Sharon Date: Mon Dec 18 14:10:47 2017 +0200 iwlwifi: mvm: move TSO segment to a separate function This makes future bail-outs from transmitting an AMSDU more readable. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 158 +++++++++++++++------------- 1 file changed, 83 insertions(+), 75 deletions(-) commit f4f155e5ec04d381b2f0870817d93dbdc259aa63 Author: Sara Sharon Date: Tue Dec 19 09:19:32 2017 +0200 iwlwifi: mvm: take RCU lock before dereferencing RCU isn't properly locked. Fixes: 46d372af9935 ("iwlwifi: mvm: rs: new rate scale API - add FW notifications") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e4d7220813e986a99eff2b98d882d5290dd58078 Author: Sara Sharon Date: Tue Dec 19 11:09:41 2017 +0200 iwlwifi: mvm: flip AMSDU addresses only for 9000 family Hardware bug was fixed in later generation. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 6b7d5c0745905b71127d0c1ae6eeddc09bbdaad8 Merge: c03a5aa 9b9322d Author: Kalle Valo Date: Wed Mar 28 11:57:34 2018 +0300 Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git Requested by Luca, needed for upcoming patch "iwlwifi: add a bunch of new 9000 PCI IDs". commit 07344b15a994acadbe439aa4e75127ed1ccca099 Author: Tom Lendacky Date: Tue Mar 27 17:07:11 2018 -0500 x86/boot: Fix SEV boot failure from change to __PHYSICAL_MASK_SHIFT In arch/x86/boot/compressed/kaslr_64.c, CONFIG_AMD_MEM_ENCRYPT support was initially #undef'd to support SME with minimal effort. When support for SEV was added, the #undef remained and some minimal support for setting the encryption bit was added for building identity mapped pagetable entries. Commit b83ce5ee9147 ("x86/mm/64: Make __PHYSICAL_MASK_SHIFT always 52") changed __PHYSICAL_MASK_SHIFT from 46 to 52 in support of 5-level paging. This change resulted in SEV guests failing to boot because the encryption bit was no longer being automatically masked out. The compressed boot path now requires sme_me_mask to be defined in order for the pagetable functions, such as pud_present(), to properly mask out the encryption bit (currently bit 47) when evaluating pagetable entries. Add an sme_me_mask variable in arch/x86/boot/compressed/mem_encrypt.S, which is set when SEV is active, delete the #undef CONFIG_AMD_MEM_ENCRYPT from arch/x86/boot/compressed/kaslr_64.c and use sme_me_mask when building the identify mapped pagetable entries. Fixes: b83ce5ee9147 ("x86/mm/64: Make __PHYSICAL_MASK_SHIFT always 52") Signed-off-by: Tom Lendacky Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Brijesh Singh Cc: "Kirill A. Shutemov" Cc: "H. Peter Anvin" Link: https://lkml.kernel.org/r/20180327220711.8702.55842.stgit@tlendack-t1.amdoffice.net arch/x86/boot/compressed/kaslr_64.c | 14 ++++---------- arch/x86/boot/compressed/mem_encrypt.S | 17 ++++++++++------- arch/x86/boot/compressed/misc.h | 2 +- 3 files changed, 15 insertions(+), 18 deletions(-) commit 9b9a51354cae933f5640b5bb73bbcd32f989122f Author: Eric Dumazet Date: Tue Mar 27 20:22:33 2018 -0700 x86/msr: Make rdmsrl_safe_on_cpu() scheduling safe as well When changing rdmsr_safe_on_cpu() to schedule, it was missed that __rdmsr_safe_on_cpu() was also used by rdmsrl_safe_on_cpu() Make rdmsrl_safe_on_cpu() a wrapper instead of copy/pasting the code which was added for the completion handling. Fixes: 07cde313b2d2 ("x86/msr: Allow rdmsr_safe_on_cpu() to schedule") Reported-by: kbuild test robot Signed-off-by: Eric Dumazet Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Eric Dumazet Cc: "H. Peter Anvin" Link: https://lkml.kernel.org/r/20180328032233.153055-1-edumazet@google.com arch/x86/lib/msr-smp.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 5da795b061a139b55d7393e79c7af688c58a4267 Author: Zhipeng Gong Date: Mon Mar 26 15:18:56 2018 +0800 drm/i915/gvt: Make MI_USER_INTERRUPT nop in cmd parser GVT-g dispatches request to host i915 and depends on i915 notify ring interrupt mechanism to check completion of request. For now MI_USER_INTERRUPT in guest requests is passed through in GVT-g cmd parser and i915 does not use it, which causes unnecessary interrupt handling in i915. On the other hand, if several requests from guest are combined into one request in and contain MI_USER_INTERRUPT in the middle of combined request. GVT-g still has to wait on the whole request to complete to inject user interrupts to guest. This patch makes all the MI_USER_INTERRUPT nop to save some interrupt handling. Here is test result to run glmark2 on guest for 10 seconds: host master interrupts number is reduced from 16021 to 11162 host user interrupts number is reduced from 7936 to 3536 v2: - revise commit message. (Kevin) Reviewed-by: Kevin Tian Signed-off-by: Zhipeng Gong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 1 + 1 file changed, 1 insertion(+) commit ac0fd9cfc837d1d30cb958dc34769e90aad43078 Author: Gustavo A. R. Silva Date: Thu Mar 22 12:27:54 2018 -0500 drm/i915/gvt: Mark expected switch fall-through in handle_g2v_notification In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1466154 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 1 + 1 file changed, 1 insertion(+) commit 92fa7a13c845c91f6a8177250474bbcab7fcf45e Author: Martin Schwidefsky Date: Tue Mar 20 13:33:43 2018 +0100 s390/kvm: improve stack frame constants in entry.S The code in sie64a uses the stack frame passed to the function to store some temporary data in the empty1 array (see struct stack_frame in asm/processor.h. Replace the __SF_EMPTY+x constants with a properly defined offset: s/__SF_EMPTY/__SF_SIE_CONTROL/, s/__SF_EMPTY+8/__SF_SIE_SAVEAREA/, s/__SF_EMPTY+16/__SF_SIE_REASON/, s/__SF_EMPTY+24/__SF_SIE_FLAGS/. Reviewed-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky arch/s390/kernel/asm-offsets.c | 1 + arch/s390/kernel/entry.S | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) commit e5b98199deb013609af7106a1fb9e779a7f6744a Author: Martin Schwidefsky Date: Mon Mar 26 15:23:33 2018 +0200 s390/lpp: use assembler alternatives for the LPP instruction With the new macros for CPU alternatives the MACHINE_FLAG_LPP check around the LPP instruction can be optimized. After this is done the flag can be removed. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/cpu_mf.h | 4 ++-- arch/s390/include/asm/setup.h | 2 -- arch/s390/kernel/early.c | 2 -- arch/s390/kernel/entry.S | 14 ++++++-------- 4 files changed, 8 insertions(+), 14 deletions(-) commit b058661a993aafc718ce713221bb1d57588c3710 Author: Martin Schwidefsky Date: Mon Mar 26 15:27:36 2018 +0200 s390/entry.S: use assembler alternatives Replace the open coded alternatives for the BPOFF, BPON, BPENTER, and BPEXIT macros with the new magic from asm/alternatives-asm.h to make the code easier to read. Signed-off-by: Martin Schwidefsky arch/s390/kernel/entry.S | 56 ++++++------------------------------------------ 1 file changed, 7 insertions(+), 49 deletions(-) commit fba9eb7946251d6e420df3bdf7bc45195be7be9a Author: Martin Schwidefsky Date: Mon Mar 19 18:07:31 2018 +0100 s390: add assembler macros for CPU alternatives Add a header with macros usable in assembler files to emit alternative code sequences. It works analog to the alternatives for inline assmeblies in C files, with the same restrictions and capabilities. The syntax is ALTERNATIVE "", \ "", \ "" and ALTERNATIVE_2 "", \ "", \ "", "", \ "" Reviewed-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/include/asm/alternative-asm.h | 108 ++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) commit d424986f1d6b16079b3231db0314923f4f8deed1 Author: Martin Schwidefsky Date: Wed Mar 21 09:38:21 2018 +0100 s390: add sysfs attributes for spectre Set CONFIG_GENERIC_CPU_VULNERABILITIES and provide the two functions cpu_show_spectre_v1 and cpu_show_spectre_v2 to report the spectre mitigations. Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 1 + arch/s390/kernel/nospec-branch.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) commit bc035599718412cfba9249aa713f90ef13f13ee9 Author: Martin Schwidefsky Date: Tue Mar 20 16:33:43 2018 +0100 s390: report spectre mitigation via syslog Add a boot message if either of the spectre defenses is active. The message is "Spectre V2 mitigation: execute trampolines." or "Spectre V2 mitigation: limited branch prediction." Signed-off-by: Martin Schwidefsky arch/s390/kernel/nospec-branch.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 6e179d64126b909f0b288fa63cdbf07c531e9b1d Author: Martin Schwidefsky Date: Fri Mar 23 13:04:49 2018 +0100 s390: add automatic detection of the spectre defense Automatically decide between nobp vs. expolines if the spectre_v2=auto kernel parameter is specified or CONFIG_EXPOLINE_AUTO=y is set. The decision made at boot time due to CONFIG_EXPOLINE_AUTO=y being set can be overruled with the nobp, nospec and spectre_v2 kernel parameters. Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 2 +- arch/s390/Makefile | 2 +- arch/s390/include/asm/nospec-branch.h | 6 ++-- arch/s390/kernel/alternative.c | 1 + arch/s390/kernel/module.c | 11 +++--- arch/s390/kernel/nospec-branch.c | 68 +++++++++++++++++++++-------------- 6 files changed, 52 insertions(+), 38 deletions(-) commit b2e2f43a01bace1a25bdbae04c9f9846882b727a Author: Martin Schwidefsky Date: Fri Mar 23 17:09:39 2018 +0100 s390: move nobp parameter functions to nospec-branch.c Keep the code for the nobp parameter handling with the code for expolines. Both are related to the spectre v2 mitigation. Signed-off-by: Martin Schwidefsky arch/s390/kernel/Makefile | 4 ++-- arch/s390/kernel/alternative.c | 23 ----------------------- arch/s390/kernel/nospec-branch.c | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 25 deletions(-) commit b9dd652499d645707dda2b835a905455e3718157 Author: Sebastian Ott Date: Wed Jun 29 19:32:31 2016 +0200 s390/cio: add util_string sysfs attribute Export utility strings as a chpid's binary sysfs attribute. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky drivers/s390/cio/chp.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 0e11f6443f522f89509495b13ef1f3745640144d Author: Christoph Hellwig Date: Wed Feb 21 07:54:49 2018 -0800 fs: move I_DIRTY_INODE to fs.h And use it in a few more places rather than opencoding the values. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/ext4/inode.c | 4 ++-- fs/fs-writeback.c | 9 +++------ fs/gfs2/super.c | 2 +- include/linux/fs.h | 3 ++- 4 files changed, 8 insertions(+), 10 deletions(-) commit f35562549ff9ecb9114f380843b3ac778c2a781e Author: Christoph Hellwig Date: Wed Feb 21 07:54:48 2018 -0800 ubifs: fix bogus __mark_inode_dirty(I_DIRTY_SYNC | I_DIRTY_DATASYNC) call I_DIRTY_DATASYNC is a strict superset of I_DIRTY_SYNC semantics, as in mark dirty to be written out by fdatasync as well. So dirtying for both flags makes no sense. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/ubifs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c2acd2d193595f2919583fd6e32b09ca8e85e94 Author: Christoph Hellwig Date: Wed Feb 21 07:54:47 2018 -0800 ntfs: fix bogus __mark_inode_dirty(I_DIRTY_SYNC | I_DIRTY_DATASYNC) call I_DIRTY_DATASYNC is a strict superset of I_DIRTY_SYNC semantics, as in mark dirty to be written out by fdatasync as well. So dirtying for both flags makes no sense. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/ntfs/mft.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 937d3305126da49067da74280d72b457555a0aee Author: Christoph Hellwig Date: Wed Feb 21 07:54:46 2018 -0800 gfs2: fix bogus __mark_inode_dirty(I_DIRTY_SYNC | I_DIRTY_DATASYNC) calls I_DIRTY_DATASYNC is a strict superset of I_DIRTY_SYNC semantics, as in mark dirty to be written out by fdatasync as well. So dirtying for both flags makes no sense. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/gfs2/xattr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cab64df194667dc5d9d786f0a895f647f5501c0d Author: Christoph Hellwig Date: Tue Mar 20 11:30:14 2018 +0100 fs: fold open_check_o_direct into do_dentry_open do_dentry_open is where we do the actual open of the file, so this is where we should do our O_DIRECT sanity check to cover all potential callers. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/internal.h | 1 - fs/namei.c | 7 +------ fs/open.c | 44 ++++++++++++++++++-------------------------- 3 files changed, 19 insertions(+), 33 deletions(-) commit 0d72038c303c616a63415a07366f916b5edc3830 Author: Bjorn Andersson Date: Tue Mar 27 14:06:43 2018 -0700 rpmsg: smd: Use announce_create to process any receive work It is possible that incoming data arrives before the client driver has reached a point in the probe method where adequate context for handling the incoming message has been established. In the event that the client's callback function returns an error the message will be left on the FIFO and by invoking the receive handler after the device has been probed the message will be picked off the FIFO and the callback invoked again. Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_smd.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 7586516ca043d55ed1ca563df72bc216c948cad4 Author: Bjorn Andersson Date: Tue Mar 27 14:06:42 2018 -0700 rpmsg: Only invoke announce_create for rpdev with endpoints For special rpmsg devices without a primary endpoint there is nothing to announce so don't call the backend announce create function if we didn't create an endpoint. Signed-off-by: Bjorn Andersson drivers/rpmsg/rpmsg_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ddf12d397aee75dbd24dd02be07c1372e3008f6 Author: Bjorn Andersson Date: Tue Mar 27 14:06:41 2018 -0700 rpmsg: smd: Fix container_of macros The container_of macros should not use the same name for the parameter as the member to use for lookup, as this will result in a compilation error unless the passed parameter has the same name as the member. Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_smd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9f36f9c8eed847ee8920ecac689bbf3dd4660774 Merge: cb17aa5 1679ae8 Author: Dave Airlie Date: Wed Mar 28 14:49:19 2018 +1000 Merge tag 'drm-amdkfd-next-2018-03-27' of git://people.freedesktop.org/~gabbayo/linux into drm-next - GPUVM support for dGPUs - KFD events support for dGPUs - Fix live-lock situation when restoring multiple evicted processes - Fix VM page table allocation on large-bar systems - Fix for build failure on frv architecture * tag 'drm-amdkfd-next-2018-03-27' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: Use ordered workqueue to restore processes drm/amdgpu: Fix acquiring VM on large-BAR systems drm/amdkfd: Add module option for testing large-BAR functionality drm/amdkfd: Kmap event page for dGPUs drm/amdkfd: Add ioctls for GPUVM memory management drm/amdkfd: Add TC flush on VMID deallocation for Hawaii drm/amdkfd: Allocate CWSR trap handler memory for dGPUs drm/amdkfd: Add per-process IDR for buffer handles drm/amdkfd: Aperture setup for dGPUs drm/amdkfd: Remove limit on number of GPUs drm/amdkfd: Populate DRM render device minor drm/amdkfd: Create KFD VMs on demand drm/amdgpu: Add kfd2kgd interface to acquire an existing VM drm/amdgpu: Add helper to turn an existing VM into a compute VM drm/amdgpu: Fix initial validation of PD BO for KFD VMs drm/amdgpu: Move KFD-specific fields into struct amdgpu_vm drm/amdkfd: fix uninitialized variable use drm/amdkfd: add missing include of mm.h commit cb17aa521e0e00db92463ad306660f3f23ae9657 Merge: 2b4f44ee 300efa9 Author: Dave Airlie Date: Wed Mar 28 14:47:26 2018 +1000 Merge tag 'drm-intel-next-fixes-2018-03-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Display fixes for booting with MST hub lid closed and display freezing after hibernation (fd.o bugs 105470 & 105196) - Fix for a very rare interrupt handling race resulting in GPU hang * tag 'drm-intel-next-fixes-2018-03-27' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915: Fix hibernation with ACPI S0 target state drm/i915/execlists: Use a locked clear_bit() for synchronisation with interrupt drm/i915: Specify which engines to reset following semaphore/event lockups drm/i915/dp: Write to SET_POWER dpcd to enable MST hub. commit 2b4f44eec2be2688511c2b617d0e1b4f94c45ba4 Merge: 33d009c 3eb2ce8 Author: Dave Airlie Date: Wed Mar 28 14:30:41 2018 +1000 Backmerge tag 'v4.16-rc7' into drm-next Linux 4.16-rc7 This was requested by Daniel, and things were getting a bit hard to reconcile, most of the conflicts were trivial though. commit f23f5bece686a76598335141a091934f7eb0998c Author: Keith Busch Date: Tue Mar 27 09:39:06 2018 -0600 blk-mq: Allow PCI vector offset for mapping queues The PCI interrupt vectors intended to be associated with a queue may not start at 0; a driver may allocate pre_vectors for special use. This patch adds an offset parameter so blk-mq may find the intended affinity mask and updates all drivers using this API accordingly. Cc: Don Brace Cc: Cc: Signed-off-by: Keith Busch Reviewed-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-pci.c | 6 ++++-- drivers/nvme/host/pci.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 2 +- include/linux/blk-mq-pci.h | 3 ++- 5 files changed, 9 insertions(+), 6 deletions(-) commit d21b0f238adf4641a72f4b0dd4a2b10aa36d09f5 Author: Yunlei He Date: Mon Mar 26 17:32:23 2018 +0800 f2fs: Add a segment type check in inplace write This patch add a segment type check in IPU, in case of something wrong with blkadd in dnode. Signed-off-by: Yunlei He Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2f52052929842ac21a958ab5f07aab01312cc0b2 Author: Yunlong Song Date: Thu Mar 22 10:08:40 2018 +0800 f2fs: no need to initialize zero value for GFP_F2FS_ZERO Since f2fs_inode_info is allocated with flag GFP_F2FS_ZERO, so we do not need to initialize zero value for its member any more. Signed-off-by: Yunlong Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 5 ----- 1 file changed, 5 deletions(-) commit 780de47cf6cb5f524cd98ec8ffbffc3da5696e17 Author: Chao Yu Date: Tue Mar 20 23:08:30 2018 +0800 f2fs: don't track new nat entry in nat set Nat entry set is used only in checkpoint(), and during checkpoint() we won't flush new nat entry with unallocated address, so we don't need to add new nat entry into nat set, then nat_entry_set::entry_cnt can indicate actual entry count we need to flush in checkpoint(). Signed-off-by: Yunlei He Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 29 +++++++++++++++++++++++++---- fs/f2fs/node.h | 1 + 2 files changed, 26 insertions(+), 4 deletions(-) commit df033caf51c01edf3d2bfc61b41a9f1e566743ed Author: Chao Yu Date: Tue Mar 20 23:08:29 2018 +0800 f2fs: clean up with F2FS_BLK_ALIGN Clean up F2FS_BYTES_TO_BLK(x + F2FS_BLKSIZE - 1) with F2FS_BLK_ALIGN(x). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 3 +-- fs/f2fs/node.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 357325764d7eabc4d2169d26af079b441fd48bc5 Author: Stefan Agner Date: Sat Mar 24 11:48:00 2018 +0100 spi: spi-atmel: Use correct enum for DMA transfer direction Use enum dma_transfer_direction as required by the functions dmaengine_prep_slave_(sg|single)() instead of enum dma_data_direction. This won't change behavior in practice as the enum values are equivalent. This fixes two warnings when building with clang: drivers/spi/spi-atmel.c:771:12: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] DMA_FROM_DEVICE, ^~~~~~~~~~~~~~~ ... Signed-off-by: Stefan Agner Acked-by: Nicolas Ferre Reviewed-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi-atmel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 36fd679f45a25a7c634b3dbec35a2d7fdb832a65 Merge: bca334e a265b03 4b75291 d3e4ecc 37ad490 Author: Mark Brown Date: Wed Mar 28 10:33:53 2018 +0800 Merge remote-tracking branches 'regulator/topic/88pg86x', 'regulator/topic/dt', 'regulator/topic/formatting' and 'regulator/topic/gpio' into regulator-next commit bca334e3eac026f143ddf36835d3af8ba3c9a4f1 Merge: 9a13ce3 6a2e3c3 Author: Mark Brown Date: Wed Mar 28 10:33:51 2018 +0800 Merge remote-tracking branch 'regulator/topic/qcom_smd' into regulator-next commit 9a13ce38ebdac3ff3c1c5135978ab7f2cde02632 Merge: 9dc886a 3cdb741 Author: Mark Brown Date: Wed Mar 28 10:33:49 2018 +0800 Merge remote-tracking branch 'regulator/topic/qcom' into regulator-next commit 9dc886a255f7b3ff5ffbf03321321bc6978f6895 Merge: 3eb2ce8 3096686 Author: Mark Brown Date: Wed Mar 28 10:33:48 2018 +0800 Merge remote-tracking branch 'regulator/topic/core' into regulator-next commit 445bb423f6a3c50788529a33b82e45148001e855 Merge: 38a72a9 755d440 Author: Mark Brown Date: Wed Mar 28 10:32:03 2018 +0800 Merge remote-tracking branch 'asoc/topic/zx_aud96p22' into asoc-next commit 38a72a9f86302e60c2b54fe00ea1700767434f6f Merge: a1c83f6 2822e66 60edb20 91cd000 61fc060 Author: Mark Brown Date: Wed Mar 28 10:31:58 2018 +0800 Merge remote-tracking branches 'asoc/topic/wm9090', 'asoc/topic/wm9712', 'asoc/topic/wm9713' and 'asoc/topic/wm_adsp' into asoc-next commit a1c83f69def14206f23c150a324190aa50c3ac27 Merge: 3c4d35c bf338e5 00a6941 708ebb3b 5d61ef8 1417c5f Author: Mark Brown Date: Wed Mar 28 10:31:54 2018 +0800 Merge remote-tracking branches 'asoc/topic/wm8991', 'asoc/topic/wm8994', 'asoc/topic/wm8995', 'asoc/topic/wm8996' and 'asoc/topic/wm9081' into asoc-next commit 3c4d35cc239822721cdf49260dd870cd7348fe54 Merge: 0d1b288 98020a7 e3a68fd cbc23b7 ab38ff3 51bef5c Author: Mark Brown Date: Wed Mar 28 10:31:49 2018 +0800 Merge remote-tracking branches 'asoc/topic/wm8978', 'asoc/topic/wm8983', 'asoc/topic/wm8985', 'asoc/topic/wm8988' and 'asoc/topic/wm8990' into asoc-next commit 0d1b2881d7f91927a57dd67411fe9d6e11c85fd7 Merge: 5a33ab4 e075fc1 ce8d101 f4ee271 58a6597 3e32a3f Author: Mark Brown Date: Wed Mar 28 10:31:44 2018 +0800 Merge remote-tracking branches 'asoc/topic/wm8960', 'asoc/topic/wm8961', 'asoc/topic/wm8962', 'asoc/topic/wm8971' and 'asoc/topic/wm8974' into asoc-next commit 5a33ab48c397d7dc465f3040c9fa4239d7ca894c Merge: deb66f3 825a52a 58bd293 46a9100 78e89b8 69b626e6 Author: Mark Brown Date: Wed Mar 28 10:31:39 2018 +0800 Merge remote-tracking branches 'asoc/topic/wm8900', 'asoc/topic/wm8903', 'asoc/topic/wm8904', 'asoc/topic/wm8940' and 'asoc/topic/wm8955' into asoc-next commit deb66f3f749da524e07ceb7f046ef7fe39d9ae10 Merge: 179ef21 22d15fc 502cb3a 51e42c9 d6ae5c1 cf73dce Author: Mark Brown Date: Wed Mar 28 10:31:34 2018 +0800 Merge remote-tracking branches 'asoc/topic/wm8753', 'asoc/topic/wm8770', 'asoc/topic/wm8776', 'asoc/topic/wm8782' and 'asoc/topic/wm8804' into asoc-next commit 179ef216bb0838179cd76f5a10a96e6cc6b81bfd Merge: 3b04e29 6b41308 cde596c 840680d 9b6a00f f081a22 Author: Mark Brown Date: Wed Mar 28 10:31:30 2018 +0800 Merge remote-tracking branches 'asoc/topic/wm8728', 'asoc/topic/wm8731', 'asoc/topic/wm8737', 'asoc/topic/wm8741' and 'asoc/topic/wm8750' into asoc-next commit 3b04e29f819673b52b1f635c852c3d99271cf8d0 Merge: a1fd0f4 4bf8ae8 09f7fcf 8f5a593 56fc4d2 e5ac140 Author: Mark Brown Date: Wed Mar 28 10:31:25 2018 +0800 Merge remote-tracking branches 'asoc/topic/wm8523', 'asoc/topic/wm8524', 'asoc/topic/wm8580', 'asoc/topic/wm8711' and 'asoc/topic/wm8727' into asoc-next commit a1fd0f4199444edf46ed5a43212b480d10c6b3a9 Merge: 32a6c5a 908b530 6119583 2621a9a 822e70a 51bf02c Author: Mark Brown Date: Wed Mar 28 10:31:20 2018 +0800 Merge remote-tracking branches 'asoc/topic/wm2200', 'asoc/topic/wm5100', 'asoc/topic/wm8350', 'asoc/topic/wm8400' and 'asoc/topic/wm8510' into asoc-next commit 32a6c5ab549a6ad7e30c8886a6b2eb4b533e4a14 Merge: 7fa89d6 635b1c1 559ab39 b5311ee 39506cf e5449af Author: Mark Brown Date: Wed Mar 28 10:31:15 2018 +0800 Merge remote-tracking branches 'asoc/topic/vc4_hdmi', 'asoc/topic/wl1273', 'asoc/topic/wm0010', 'asoc/topic/wm1250-ev1' and 'asoc/topic/wm2000' into asoc-next commit 7fa89d6132e5f865c47936262af122ace74aac94 Merge: ec67b19 c68e7f5 83eca9f 2ab7fb0 b40822d 7c3c20f Author: Mark Brown Date: Wed Mar 28 10:31:10 2018 +0800 Merge remote-tracking branches 'asoc/topic/twl4030', 'asoc/topic/twl6040', 'asoc/topic/uda134x', 'asoc/topic/uda1380' and 'asoc/topic/uniphier' into asoc-next commit ec67b19f952ce8eb40b27260815c7eec2d23426e Merge: 4ec7e20 b154dc5 68fb425 cd21ac8 05bdcf1 c3fd6a1 Author: Mark Brown Date: Wed Mar 28 10:31:04 2018 +0800 Merge remote-tracking branches 'asoc/topic/tlv320aic32x4', 'asoc/topic/tlv320aic3x', 'asoc/topic/tlv320dac33', 'asoc/topic/topology' and 'asoc/topic/tscs42xx' into asoc-next commit 4ec7e204ea8bde75a55add9877b9ab3a9784aab1 Merge: 02a8fe8 3d3db94 064f668 ff06ac2 1514613 a16be2a Author: Mark Brown Date: Wed Mar 28 10:30:59 2018 +0800 Merge remote-tracking branches 'asoc/topic/tda7419', 'asoc/topic/tfa9879', 'asoc/topic/tlv320aic23', 'asoc/topic/tlv320aic26' and 'asoc/topic/tlv320aic31xx' into asoc-next commit 02a8fe81bea8ba5a37390f6f030d3ce7b78be409 Merge: e8c768d 79a4ad1 459bc02 2be04ba a06919f fbf3c93 Author: Mark Brown Date: Wed Mar 28 10:30:54 2018 +0800 Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086', 'asoc/topic/tas571x', 'asoc/topic/tas5720' and 'asoc/topic/tas6424' into asoc-next commit e8c768dad0de0e1a88dbf6838d9fc83d52927be7 Merge: 4e8f557 8955778 049c1bf 6eb17d7 77f4be16 7ec9b87 Author: Mark Brown Date: Wed Mar 28 10:30:49 2018 +0800 Merge remote-tracking branches 'asoc/topic/sta529', 'asoc/topic/sti-sas', 'asoc/topic/stm32', 'asoc/topic/sun4i' and 'asoc/topic/sun8i' into asoc-next commit 4e8f557b89580d594fe5e42ace3735eac4c4344b Merge: 810dee5 17875fe ad4771e b63aecb ee18359 1f6440c Author: Mark Brown Date: Wed Mar 28 10:30:45 2018 +0800 Merge remote-tracking branches 'asoc/topic/ssm2518', 'asoc/topic/ssm2602', 'asoc/topic/ssm4567', 'asoc/topic/sta32x' and 'asoc/topic/sta350' into asoc-next commit 810dee58b0102ec68416e15c46830be47ffd6400 Merge: da2495f 4218bcf e0b9f3a 33d9245 8c6086b 3860978 Author: Mark Brown Date: Wed Mar 28 10:30:40 2018 +0800 Merge remote-tracking branches 'asoc/topic/sirf-audio', 'asoc/topic/sn95031', 'asoc/topic/soc-dapm', 'asoc/topic/spdif_receiver' and 'asoc/topic/spdif_transmitter' into asoc-next commit da2495fbcbf892d2ad1c6dcfcc9ffe89973b54f6 Merge: 8ee67bb 5ba04c6 c4e50b1 8fcfe24 f49f49a Author: Mark Brown Date: Wed Mar 28 10:30:35 2018 +0800 Merge remote-tracking branches 'asoc/topic/rt5670', 'asoc/topic/sgtl5000', 'asoc/topic/si476x' and 'asoc/topic/sirf' into asoc-next commit 8ee67bb80a61fef7e130acf8c7c74722d535fd80 Merge: bffd643 79223bf 6b2d992 ce571b8 ca04dd8 Author: Mark Brown Date: Wed Mar 28 10:30:29 2018 +0800 Merge remote-tracking branches 'asoc/topic/rt5645', 'asoc/topic/rt5651', 'asoc/topic/rt5659' and 'asoc/topic/rt5660' into asoc-next commit bffd6430c67c90b203219f630e022f9df0276250 Merge: 5c19015 40d2677 890861a 01f8902f 46295e5 d5a41b5 Author: Mark Brown Date: Wed Mar 28 10:30:24 2018 +0800 Merge remote-tracking branches 'asoc/topic/rt298', 'asoc/topic/rt5514', 'asoc/topic/rt5616', 'asoc/topic/rt5631' and 'asoc/topic/rt5640' into asoc-next commit 5c19015418b6b3322d573dee9210a7c9760d3ffe Merge: 7275949 8dc906d 8b597ff f8a9a29 f548dd4 8153362 Author: Mark Brown Date: Wed Mar 28 10:30:19 2018 +0800 Merge remote-tracking branches 'asoc/topic/pistachio', 'asoc/topic/pxa', 'asoc/topic/rsnd', 'asoc/topic/rt274' and 'asoc/topic/rt286' into asoc-next commit 7275949eb51d813723923dad6f83be92ec0c520f Merge: b886120 2eec0a1 b1d0db0 415bc3a 61cf1c4 b53117c Author: Mark Brown Date: Wed Mar 28 10:30:13 2018 +0800 Merge remote-tracking branches 'asoc/topic/msm8916-wcd-digital', 'asoc/topic/mtk', 'asoc/topic/nau8540', 'asoc/topic/nau8810' and 'asoc/topic/nau8824' into asoc-next commit b886120a510486cd4f0f9c239a08d22b8d38b8fb Merge: 2d8432d ec4bf5a 78c97ec de24047 a9886cd 732ae45 Author: Mark Brown Date: Wed Mar 28 10:30:07 2018 +0800 Merge remote-tracking branches 'asoc/topic/max98927', 'asoc/topic/mc13783', 'asoc/topic/mediatek', 'asoc/topic/ml26124' and 'asoc/topic/msm8916-wcd-analog' into asoc-next commit 2d8432d8603d2d27f31474f5d583fafb5378e462 Merge: 5c5bb9a 0b3eda2 fbf60d9 b3e9c3f cf9cb34 6f2b5d0 Author: Mark Brown Date: Wed Mar 28 10:30:01 2018 +0800 Merge remote-tracking branches 'asoc/topic/max9850', 'asoc/topic/max9860', 'asoc/topic/max9867', 'asoc/topic/max98925' and 'asoc/topic/max98926' into asoc-next commit 5c5bb9a2458cf9dfa6c65aa2eb493c7038a0eea8 Merge: 8d8084d b50c32b 2dd1637 4b51e9f 1ae91ac 41572b5 Author: Mark Brown Date: Wed Mar 28 10:29:56 2018 +0800 Merge remote-tracking branches 'asoc/topic/max98090', 'asoc/topic/max98095', 'asoc/topic/max98357a', 'asoc/topic/max98371' and 'asoc/topic/max98373' into asoc-next commit 8d8084d85984b3fa4464c72c4db0a785fb10238f Merge: 89314db f572634 b48e6ef f5d5240 fa8d915 3f64507 Author: Mark Brown Date: Wed Mar 28 10:29:50 2018 +0800 Merge remote-tracking branches 'asoc/topic/isabelle', 'asoc/topic/jz4740', 'asoc/topic/lm49453', 'asoc/topic/max9759' and 'asoc/topic/max98088' into asoc-next commit 89314dbf6188f59feb43b904b73fff95d5bb2cd8 Merge: 165879a 38e8899 7c8d905 790d631 40aa60a Author: Mark Brown Date: Wed Mar 28 10:29:46 2018 +0800 Merge remote-tracking branches 'asoc/topic/hdmi-codec', 'asoc/topic/ics43432', 'asoc/topic/imx-wm8962' and 'asoc/topic/inno_rk3036' into asoc-next commit 165879a90b16b3e3a7ead59e5a082de01cd7af1a Merge: 323a56e 0600b3e 9c4f509 cb3981b 2e78a55 993709b Author: Mark Brown Date: Wed Mar 28 10:29:40 2018 +0800 Merge remote-tracking branches 'asoc/topic/fsl_esai', 'asoc/topic/fsl_ssi', 'asoc/topic/fsl_utils', 'asoc/topic/generic-dmaengine' and 'asoc/topic/gtm601' into asoc-next commit 323a56ed227da5ec584673f48fa1f342dbb16fee Merge: e540808 97a865d 02009ee 2ff5297 da4ce56 fc734c24 Author: Mark Brown Date: Wed Mar 28 10:29:36 2018 +0800 Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/es7134', 'asoc/topic/es8316', 'asoc/topic/es8328' and 'asoc/topic/fsl' into asoc-next commit e540808131a7e4ffd52acd44f493341881a5a176 Merge: f499cf3 1d37ce9 192ce2f 35fc975 15b7c5d Author: Mark Brown Date: Wed Mar 28 10:29:31 2018 +0800 Merge remote-tracking branches 'asoc/topic/da7219', 'asoc/topic/da732x', 'asoc/topic/da9055' and 'asoc/topic/dmic' into asoc-next commit f499cf3542d124ad528f7b3fd01710abb2a61ea4 Merge: 651c939 d0fdfe3 0338753 c0153b1 2918d9c bc596c4 Author: Mark Brown Date: Wed Mar 28 10:29:26 2018 +0800 Merge remote-tracking branches 'asoc/topic/cx20442', 'asoc/topic/cygnus', 'asoc/topic/da7210', 'asoc/topic/da7213' and 'asoc/topic/da7218' into asoc-next commit 651c939fdc3c9ea42aa84a2b5ff217f6199a313d Merge: ae32cf8 092631b 99a9f45 97b5660 0ec65b6 534cf41 Author: Mark Brown Date: Wed Mar 28 10:29:21 2018 +0800 Merge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/cs42xx8', 'asoc/topic/cs43130', 'asoc/topic/cs4349' and 'asoc/topic/cs53l30' into asoc-next commit ae32cf888c457068707ef1e785e3a3f47f37d381 Merge: 7ffd9d4 cac308f c926140 1fa4985 9665a74 e48f746 Author: Mark Brown Date: Wed Mar 28 10:29:16 2018 +0800 Merge remote-tracking branches 'asoc/topic/cs4271', 'asoc/topic/cs42l42', 'asoc/topic/cs42l51', 'asoc/topic/cs42l52' and 'asoc/topic/cs42l56' into asoc-next commit 7ffd9d486d01106d5ab92c0f5e844c60edabeeeb Merge: 2236a28 cefcf59 8a6e7dd 86c2edd aebbf9c 70c9a80 Author: Mark Brown Date: Wed Mar 28 10:29:11 2018 +0800 Merge remote-tracking branches 'asoc/topic/cs35l33', 'asoc/topic/cs35l34', 'asoc/topic/cs35l35', 'asoc/topic/cs4265' and 'asoc/topic/cs4270' into asoc-next commit 2236a28f288b715e7bf99ab6f6fc0dca4c735333 Merge: 53ccd1a b305d8c 4f404f3 fa64370 Author: Mark Brown Date: Wed Mar 28 10:29:07 2018 +0800 Merge remote-tracking branches 'asoc/topic/cpcap', 'asoc/topic/cq93vc' and 'asoc/topic/cs35l32' into asoc-next commit 53ccd1aa83f59e966e0d332a161eaa6f581139af Merge: 6f4103b 7dd0f7c 1f598e6 f6d4b05 6ca1118 90e678d Author: Mark Brown Date: Wed Mar 28 10:29:01 2018 +0800 Merge remote-tracking branches 'asoc/topic/arizona', 'asoc/topic/atmel', 'asoc/topic/bd28623', 'asoc/topic/blackfin' and 'asoc/topic/bt-sco' into asoc-next commit 6f4103b645ce1acf46c97a843e60ca21c5830218 Merge: 7212b7b 12132de af3acca fd7c728 c778b77 4c50e1e Author: Mark Brown Date: Wed Mar 28 10:28:55 2018 +0800 Merge remote-tracking branches 'asoc/topic/ak5386', 'asoc/topic/ak5558', 'asoc/topic/alc5623', 'asoc/topic/alc5632' and 'asoc/topic/amd' into asoc-next commit 7212b7b61e8cb1bc67ff1f2837cc161e1b01ff7f Merge: 5eed6fe 5aea27d 3637292 2b5c3e4 fe439c7 57188d8 Author: Mark Brown Date: Wed Mar 28 10:28:49 2018 +0800 Merge remote-tracking branches 'asoc/topic/ak4554', 'asoc/topic/ak4613', 'asoc/topic/ak4641', 'asoc/topic/ak4642' and 'asoc/topic/ak4671' into asoc-next commit 5eed6fe345c2fd48cc07c9c354c8453b4ce977fc Merge: 231b560 a056558 9310161 61feead de03af5 d229c0b Author: Mark Brown Date: Wed Mar 28 10:28:43 2018 +0800 Merge remote-tracking branches 'asoc/topic/adav80x', 'asoc/topic/ads117x', 'asoc/topic/ak4104', 'asoc/topic/ak4458' and 'asoc/topic/ak4535' into asoc-next commit 231b5607e531cc939818dcf4317f496985d5b67a Merge: cce67af 463c5f8 0d12540 c90ef8c f305fe8 ba7a3a9 Author: Mark Brown Date: Wed Mar 28 10:28:38 2018 +0800 Merge remote-tracking branches 'asoc/topic/ad73311', 'asoc/topic/adau1373', 'asoc/topic/adau17x1', 'asoc/topic/adau1977' and 'asoc/topic/adau7002' into asoc-next commit cce67af3b85047c4c77de3183d08ddc92417a121 Merge: 848272e 5783994 aeb90fd 6aa89ef 683adc8 89cea5c Author: Mark Brown Date: Wed Mar 28 10:28:30 2018 +0800 Merge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/ab8500', 'asoc/topic/ac97', 'asoc/topic/ad1836' and 'asoc/topic/ad193x' into asoc-next commit 848272e9a38e78bf0c746774a93ed2ab0a5b7f13 Merge: 36e82da 4718840 Author: Mark Brown Date: Wed Mar 28 10:26:30 2018 +0800 Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next commit 36e82da9e5fead7ac7550bace50e8082e74c8c69 Merge: 8c081fa 20ebbd2 Author: Mark Brown Date: Wed Mar 28 10:26:28 2018 +0800 Merge remote-tracking branch 'asoc/topic/rt5665' into asoc-next commit 8c081faf45ebc31ef3e1961a135275f7d57f7edb Merge: 78a1287 5bdef14 Author: Mark Brown Date: Wed Mar 28 10:26:26 2018 +0800 Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-next commit 78a1287b35dae35d908551830ff192e88e6bd670 Merge: 9189811 d5e90ba Author: Mark Brown Date: Wed Mar 28 10:26:25 2018 +0800 Merge remote-tracking branch 'asoc/topic/pcm5102a' into asoc-next commit 91898117e66960e061b4409d0711d4e8a9a99c7c Merge: 09a37cb 29751c1 Author: Mark Brown Date: Wed Mar 28 10:26:23 2018 +0800 Merge remote-tracking branch 'asoc/topic/pcm3168a' into asoc-next commit 09a37cbca3cac346826779a3b8d76230d600484c Merge: 5bb93a3 d66827d Author: Mark Brown Date: Wed Mar 28 10:26:21 2018 +0800 Merge remote-tracking branch 'asoc/topic/pcm3008' into asoc-next commit 5bb93a335ddf83e6a946fb9c715a617c0853ba9a Merge: 8f7b85a c044cfd Author: Mark Brown Date: Wed Mar 28 10:26:19 2018 +0800 Merge remote-tracking branch 'asoc/topic/pcm186x' into asoc-next commit 8f7b85a71407719814eefc759e46729ea6f4d2de Merge: 0334a53 db0a11d Author: Mark Brown Date: Wed Mar 28 10:26:17 2018 +0800 Merge remote-tracking branch 'asoc/topic/pcm179x' into asoc-next commit 0334a5374981cc0e3ff5886c6b87e432e052d51e Merge: 338f803 e4fe156 Author: Mark Brown Date: Wed Mar 28 10:26:15 2018 +0800 Merge remote-tracking branch 'asoc/topic/pcm1789' into asoc-next commit 338f803ace62586ee8c22bb2176cce50997896dc Merge: e22d7d5 7dbbaa51 Author: Mark Brown Date: Wed Mar 28 10:26:13 2018 +0800 Merge remote-tracking branch 'asoc/topic/pcm1681' into asoc-next commit e22d7d54f2fbe6cc400a08b0d1709f03645db9ac Merge: 5b6d710 3c14646 Author: Mark Brown Date: Wed Mar 28 10:26:12 2018 +0800 Merge remote-tracking branch 'asoc/topic/pcm' into asoc-next commit 5b6d7104f65c6a9271da71db5be01d08c04584ea Merge: 342fd47 2759ba9 Author: Mark Brown Date: Wed Mar 28 10:26:09 2018 +0800 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next commit 342fd472e8486fa77aa54028861e2eba86e90bd4 Merge: 9914574 5b2d15b Author: Mark Brown Date: Wed Mar 28 10:26:08 2018 +0800 Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next commit 9914574db3a582f5ddce76896b48ffd4620072e0 Merge: dd4232c f7e73b26 Author: Mark Brown Date: Wed Mar 28 10:26:06 2018 +0800 Merge remote-tracking branch 'asoc/topic/core' into asoc-next commit dd4232c55fdf907569c1b4ceee01549174a1a84b Merge: 219248c 7ecbd6a Author: Mark Brown Date: Wed Mar 28 10:26:03 2018 +0800 Merge remote-tracking branch 'asoc/topic/component-platform' into asoc-next commit 219248cc3ffc8729860e3ae3b31698d165f54f1b Merge: 5259b17 e0a663f Author: Mark Brown Date: Wed Mar 28 10:23:30 2018 +0800 Merge tag 'asoc-v4.16-4' into asoc-next ASoC: Updates for v4.16 With the merge window having been delayed for another week here's another batch of updates that came in during that week. There's a few important fixes in here, mainly a fix for I/O on a number of devices caused by some of the component rework and a fix for a potential issue if more than one component in a link provides compressed operations. # gpg: Signature made Mon 29 Jan 2018 20:40:13 HKT # gpg: using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0 # gpg: issuer "broonie@kernel.org" # gpg: key 0D9EACE2CD7BEEBC: no public key for trusted key - skipped # gpg: key 0D9EACE2CD7BEEBC marked as ultimately trusted # gpg: key CCB0A420AF88CD16: no public key for trusted key - skipped # gpg: key CCB0A420AF88CD16 marked as ultimately trusted # gpg: key 162614E316005C11: no public key for trusted key - skipped # gpg: key 162614E316005C11 marked as ultimately trusted # gpg: key A730C53A5621E907: no public key for trusted key - skipped # gpg: key A730C53A5621E907 marked as ultimately trusted # gpg: key 276568D75C6153AD: no public key for trusted key - skipped # gpg: key 276568D75C6153AD marked as ultimately trusted # gpg: Good signature from "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] commit 5259b17bbf03d0efaf8c09dc208261f36e5b463a Merge: b12d1e4 279df19 3795e0c a01df75 267e2c6 Author: Mark Brown Date: Wed Mar 28 10:23:19 2018 +0800 Merge remote-tracking branches 'asoc/fix/mtk', 'asoc/fix/rt5659', 'asoc/fix/ssm2602' and 'asoc/fix/topology' into asoc-linus commit b12d1e4fbbbb28379df53acc5a993cf42a0ce552 Merge: 3eb2ce8 dead99e Author: Mark Brown Date: Wed Mar 28 10:23:16 2018 +0800 Merge remote-tracking branch 'asoc/fix/component' into asoc-linus commit c3fd6a1d1a133d191e6fb09d0fe277330f35c525 Author: Fabio Estevam Date: Sat Mar 24 12:17:17 2018 -0300 ASoC: tscs42xx: Remove owner assignment from i2c_driver Structure i2c_driver does not need to set the owner field, as this will be populated by the driver core. Generated by scripts/coccinelle/api/platform_no_drv_owner.cocci. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/codecs/tscs42xx.c | 1 - 1 file changed, 1 deletion(-) commit de2404701469a7e8d557b8d7b4d35bda5b262cac Author: Ryder Lee Date: Tue Mar 27 09:32:25 2018 +0800 ASoC: mediatek: remove "simple-mfd" in the example Remove compatible string "simple-mfd" in the example as we have already added devm_of_platform_populate() in the parent driver. Signed-off-by: Ryder Lee Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7bb5e54515dbcef7c390506c1339bff6bf220b1c Author: Geert Uytterhoeven Date: Tue Mar 27 15:04:25 2018 +0200 spi: sh-msiof: Document R-Car M3-N support Document support for the MSIOF module in the Renesas M3-N (r8a77965) SoC. No driver update is needed. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/sh-msiof.txt | 1 + 1 file changed, 1 insertion(+) commit b305d8c21cf9c009ce4995084cb44151c7306fc9 Author: Kuninori Morimoto Date: Wed Mar 28 01:51:02 2018 +0000 ASoC: cpcap: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cpcap.c | 152 +++++++++++++++++++++++------------------------ 1 file changed, 73 insertions(+), 79 deletions(-) commit 2759ba9bf811f81c31d14e32f8cff022d54dce1f Author: Kuninori Morimoto Date: Wed Mar 28 01:49:36 2018 +0000 ASoC: Intel: bytcr_rt5651: don't use codec anymore commit aeec6cc08215 ("ASoC: Intel: bytcr_rt5651: Configure PLL1 before using it") is using codec->dev, but codec is replaced to component. Let's use component Fixes: aeec6cc08215 ("ASoC: Intel: bytcr_rt5651: Configure PLL1 before using it") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4c50e1e3e2c29899c0226f7ad56d7266e814f2b3 Author: Kuninori Morimoto Date: Wed Mar 28 01:48:07 2018 +0000 ASoC: amd: don't use codec anymore commit c88d31153356 ("ASoC: amd: Enable da7219 master clock using common clock framework") is using rtd->codec, but codec is replaced to component. Let's use component Fixes: c88d31153356 ("ASoC: amd: Enable da7219 master clock using common clock framework") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/amd/acp-da7219-max98357a.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3cdb741efa02c5053a738d5816b70de11c4d6364 Author: Bjorn Andersson Date: Tue Mar 27 08:53:01 2018 -0700 regulator: qcom: smd: Add pm8998 and pmi8998 regulators Add the pm8998 and pmi8998 regulators as used in the MSM8998 platform. Signed-off-by: Bjorn Andersson Signed-off-by: Mark Brown .../bindings/regulator/qcom,smd-rpm-regulator.txt | 48 ++++++++ drivers/regulator/qcom_smd-regulator.c | 121 +++++++++++++++++++++ include/linux/soc/qcom/smd-rpm.h | 1 + 3 files changed, 170 insertions(+) commit db75373c91b0cfb6a68ad6ae88721e4e21ae6261 Author: Eran Ben Elisha Date: Tue Dec 26 16:02:24 2017 +0200 net/mlx5e: Recover Send Queue (SQ) from error state An error TX completion (CQE) which arrived on a specific SQ indicates that this SQ got moved by the hardware to error state, which means all pending and incoming TX requests are dropped or will be dropped and no further "Good" CQEs will be generated for that SQ. Before this patch TX completions (CQEs) were not monitored and were handled as a regular CQE. This caused the SQ to stay in an error state, making it useless for xmiting new packets. Mitigation plan: In case of an error completion, schedule a recovery work which would do the following: - Mark the TXQ as DRV_XOFF to disable new packets to arrive from the stack - NAPI to flush all pending SQ WQEs (via flush_in_error_en bit) to release SW and HW resources(SKB, DMA, etc) and have the SQ and CQ consumer/producer indices synced. - Modify the SQ state ERR -> RST -> RDY (restart the SQ). - Reactivate the SQ and reset SQ cc and pc If we identify two consecutive requests for SQ recover in less than 500 msecs, drop the recover request to avoid CPU overload, as this scenario most likely happened due to a severe repeated bug. In addition, add SQ recover SW counter to monitor successful recoveries. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 6 ++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 115 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 3 + drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 2 + drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 10 +- 5 files changed, 134 insertions(+), 2 deletions(-) commit 16cc14d817338fc297970d2d9d146c88ec87474d Author: Eran Ben Elisha Date: Tue Jan 9 16:21:16 2018 +0200 net/mlx5e: Dump xmit error completions Monitor and dump xmit error completions. In addition, add err_cqe counter to track the number of error completion per send queue. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+) commit 1acae6b030164217b9c6a52245eade730057152b Author: Eran Ben Elisha Date: Sun Dec 31 12:55:26 2017 +0200 mlx5: Move dump error CQE function out of mlx5_ib for code sharing Move mlx5_ib dump error CQE implementation to mlx5 CQ header file in order to use it in a downstream patch from mlx5e. In addition, use print_hex_dump instead of manual dumping of the buffer. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/cq.c | 8 +------- include/linux/mlx5/cq.h | 6 ++++++ 2 files changed, 7 insertions(+), 7 deletions(-) commit 2816077127230ef52cc7497903e71def45747611 Author: Eran Ben Elisha Date: Tue Dec 26 15:17:05 2017 +0200 mlx5_{ib,core}: Add query SQ state helper function Move query SQ state function from mlx5_ib to mlx5_core in order to have it in shared code. It will be used in a downstream patch from mlx5e. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/qp.c | 14 +----------- drivers/net/ethernet/mellanox/mlx5/core/transobj.c | 25 ++++++++++++++++++++++ include/linux/mlx5/transobj.h | 1 + 3 files changed, 27 insertions(+), 13 deletions(-) commit bfc647d52e67dc756c605e9a50d45b71054c2533 Author: Eran Ben Elisha Date: Tue Jan 16 17:25:06 2018 +0200 net/mlx5e: Move all TX timeout logic to be under state lock Driver callback for handling TX timeout should access some internal resources (SQ, CQ) in order to decide if the tx timeout work should be scheduled. These resources might be unavailable if channels are closed in parallel (ifdown for example). The state lock is the mechanism to protect from such races. Move all TX timeout logic to be in the work under a state lock. In addition, Move the work from the global WQ to mlx5e WQ to make sure this work is flushed when device is detached.. Also, move the mlx5e_tx_timeout_work code to be next to the TX timeout NDO for better code locality. Fixes: 3947ca185999 ("net/mlx5e: Implement ndo_tx_timeout callback") Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 61 +++++++++++++---------- 1 file changed, 34 insertions(+), 27 deletions(-) commit c4554fbccaa3306f65954ed0f1dab7abce7889f8 Author: Gal Pressman Date: Sun Jan 21 10:52:17 2018 +0200 net/mlx5e: Remove unused max inline related code Commit 58d522912ac7 ("net/mlx5e: Support TX packet copy into WQE") introduced the max inline WQE as an ethtool tunable. One commit later, that functionality was made dependent on BlueFlame. Commit 6982ab609768 ("net/mlx5e: Xmit, no write combining") removed BlueFlame support, and with it the max inline WQE. This patch cleans up the leftovers from the removed feature. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 -- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 32 ++-------------------- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 11 -------- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 1 - 4 files changed, 2 insertions(+), 45 deletions(-) commit 2ccb0a79018c9fafa913654163adc9dbac1280c5 Author: Tariq Toukan Date: Wed Feb 7 14:51:45 2018 +0200 net/mlx5e: Add ethtool priv-flag for Striding RQ Add a control private flag in ethtool to enable/disable Striding RQ feature. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 7 ++++ .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 38 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 20 ++++++++---- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 3 +- 4 files changed, 60 insertions(+), 8 deletions(-) commit 2a0f561bf81c13d36910c7312ac8c67f83320a07 Author: Tariq Toukan Date: Sun Feb 18 11:37:06 2018 +0200 net/mlx5e: Do not reset Receive Queue params on every type change Do not implicit a call to mlx5e_init_rq_type_params() upon every change in RQ type. It should be called only on channels creation. Fixes: 2fc4bfb7250d ("net/mlx5e: Dynamic RQ type infrastructure") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 15 +++++++-------- drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 3 ++- 3 files changed, 10 insertions(+), 11 deletions(-) commit b0cedc844c00991d323c13b82d651d372dcbbb12 Author: Tariq Toukan Date: Wed Feb 7 13:28:35 2018 +0200 net/mlx5e: Remove rq_headroom field from params It can be derived from other params, calculate it via the dedicated function when needed. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 20 +++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) commit f1e4fc9b4b02ec728b06ad09d6cdf5a9bb7ec372 Author: Tariq Toukan Date: Wed Feb 7 13:21:30 2018 +0200 net/mlx5e: Remove RQ MPWQE fields from params Introduce functions to calculate them when needed. They can be derived from other params. This will simplify transition between RQ configurations. In general, any parameter that is not explicitly set or controlled, but derived from other parameters, should not have a control-path field itself, but a getter function. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 7 ++-- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 13 +++----- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 38 +++++++++++++++------- 3 files changed, 35 insertions(+), 23 deletions(-) commit 24fd07abfa3584b91f65002956d3d5a5db169185 Author: Tariq Toukan Date: Thu Feb 15 18:27:06 2018 +0200 net/mlx5e: Use no-offset function in skb header copy In copying skb header to skb->data, replace the call to skb_copy_to_linear_data_offset() with a zero offset with the call to the no-offset function skb_copy_to_linear_data(). Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit bd658dda423781dbe775a2d87d662a3145ec05a6 Author: Tariq Toukan Date: Mon Nov 27 10:35:12 2017 +0200 net/mlx5e: Separate dma base address and offset in dma_sync call Pass the base dma address and offset to dma_sync_single_range_for_cpu(), instead of doing the pre-calculation. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 73faf36c5ae6b300490f0a5f2835fa702adef0e1 Author: Tariq Toukan Date: Tue Nov 21 17:43:50 2017 +0200 net/mlx5e: Remove unused define MLX5_MPWRQ_STRIDES_PER_PAGE Clean it up as it's not in use. Fixes: d9d9f156f380 ("net/mlx5e: Expand WQE stride when CQE compression is enabled") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 -- 1 file changed, 2 deletions(-) commit 291f445eab9b2b11c8dd05ae1a0943c328cb9b6b Author: Tariq Toukan Date: Sun Feb 11 11:58:30 2018 +0200 net/mlx5e: Disable Striding RQ when PCI is slower than link We turn the feature off for servers with PCI BW bounded by a threshold (16G) and lower than MAX LINK BW. This improves the effectiveness of CQE compression feature, that is defaulted to ON for the same case. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 0608d4dbaf4ee30a33def4c31b78bc664c80ff79 Author: Tariq Toukan Date: Wed Jan 17 17:39:07 2018 +0200 net/mlx5e: Unify slow PCI heuristic Get the link/pci speed query and logic into a single function. Unify the heuristics and use a single PCI threshold (16G) for all. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 31 ++++++++++------------ .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 5 ++++ 2 files changed, 19 insertions(+), 17 deletions(-) commit 6873842235d678a245a378669f35e145df2441b9 Author: Yoshihiro Shimoda Date: Tue Mar 13 17:18:18 2018 +0900 pwm: rcar: Add suspend/resume support This patch adds suspend/resume support for Renesas PWM driver. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Thierry Reding drivers/pwm/pwm-rcar.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit f2e6142cdc10b1b7edea8d65b07293f152e4d110 Author: Hien Dang Date: Tue Mar 13 17:18:17 2018 +0900 pwm: rcar: Use PM Runtime to control module clock Runtime PM API (pm_runtime_get_sync/pm_runtime_put) should be used to control module clock instead of clk_prepare_enable and clk_disable_unprepare. Signed-off-by: Hien Dang Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Thierry Reding drivers/pwm/pwm-rcar.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit aa7c49328bd84cda3c4674b70eb10db0a94f89ab Author: Yoshihiro Shimoda Date: Fri Mar 9 20:53:17 2018 +0900 dt-bindings: pwm: rcar: Add bindings for R-Car M3N support This patch adds bindings for R-Car M3N. No driver update is needed. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt | 1 + 1 file changed, 1 insertion(+) commit 6225f9c64b40bc8a22503e9cda70f55d7a9dd3c6 Author: Ryo Kodama Date: Fri Mar 9 20:24:21 2018 +0900 pwm: rcar: Fix a condition to prevent mismatch value setting to duty This patch fixes an issue that is possible to set mismatch value to duty for R-Car PWM if we input the following commands: # cd /sys/class/pwm// # echo 0 > export # cd pwm0 # echo 30 > period # echo 30 > duty_cycle # echo 0 > duty_cycle # cat duty_cycle 0 # echo 1 > enable --> Then, the actual duty_cycle is 30, not 0. So, this patch adds a condition into rcar_pwm_config() to fix this issue. Signed-off-by: Ryo Kodama [shimoda: revise the commit log and add Fixes and Cc tags] Fixes: ed6c1476bf7f ("pwm: Add support for R-Car PWM Timer") Cc: Cc: # v4.4+ Signed-off-by: Yoshihiro Shimoda Signed-off-by: Thierry Reding drivers/pwm/pwm-rcar.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 8bbf5b426160343b554117eb9abdf4dad9a50e65 Author: Arvind Yadav Date: Thu Mar 8 15:27:37 2018 +0530 pwm: sysfs: Use put_device() instead of kfree() Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav Signed-off-by: Thierry Reding drivers/pwm/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8422c7439ea9c4e08198cec7edd5faf3890c4dd7 Author: Andre Przywara Date: Sun Mar 18 23:28:46 2018 +0000 dt-bindings: pwm: sunxi: Add new compatible strings The PWM controllers found in the Allwinner A64 and H5 SoCs are fully compatible to the PWM controllers found in the A13 and H3. Add new compatible strings for those SoCs to the binding document, so that they can be safely used, together with a fallback string (preferably "allwinner,sun5i-a13-pwm"). Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/pwm-sun4i.txt | 2 ++ 1 file changed, 2 insertions(+) commit 7b4c7c567d77dabbf7f5d561ba26425902cfafca Author: Andre Przywara Date: Sun Mar 18 23:28:45 2018 +0000 pwm: sun4i: Simplify controller mapping At the moment we assign our supported compatible strings to a respective instance of our sun4i_pwm_data structure, even though some of them are the same. To avoid further clutter, split out the three different combinations of features we have at the moment and name them accordingly. This should make it more obvious which compatible string to use for new SoCs. Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Thierry Reding drivers/pwm/pwm-sun4i.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) commit 6a89bb6cc021ce5938c8edfa57b61cff38553c51 Author: Andre Przywara Date: Sun Mar 18 23:28:44 2018 +0000 pwm: sun4i: Drop unused .has_rdy member Commit a054c4d68408 ("pwm: sun4i: Drop legacy callbacks") dropped the only user of the .has_rdy member in our sun4i_pwm_data struct. Consequently we don't need to store this anymore for the various SoCs, which paves the way for further simplifications. Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Thierry Reding drivers/pwm/pwm-sun4i.c | 6 ------ 1 file changed, 6 deletions(-) commit 989ae7a5b2f965dc5e6de132f1d8c0ea8c23c3c5 Author: Alexandre Belloni Date: Sun Feb 25 02:55:58 2018 +0100 pwm: sun4i: Properly check current state Correctly extract the prescaler value from CTRL_REG before comparing it to PWM_PRESCAL_MASK. Also, check that both PWM_CLK_GATING and PWM_EN to ensure the PWM is enabled instead of relying on only one of those. Fixes: 93e0dfb2c52f ("pwm: sun4i: Improve hardware read out") Signed-off-by: Alexandre Belloni Signed-off-by: Thierry Reding drivers/pwm/pwm-sun4i.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 120cc2fff40096fb99d96d8671ad7469dd44862f Author: Corentin Labbe Date: Thu Jan 18 20:58:14 2018 +0100 pwm: Remove depends on AVR32 AVR32 is gone, so no more need to depend on it. Signed-off-by: Corentin Labbe Signed-off-by: Thierry Reding drivers/pwm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6ea025f6ea1fb1455e59e2008d88f5c72f0d210 Author: Gerald Baeza Date: Fri Feb 23 14:36:04 2018 +0100 pwm: stm32: LPTimer: Use 3 cells ->of_xlate() STM32 Low-Power Timer supports generic 3 cells PWM to encode PWM number, period and polarity. Signed-off-by: Gerald Baeza Signed-off-by: Fabrice Gasnier Signed-off-by: Thierry Reding drivers/pwm/pwm-stm32-lp.c | 2 ++ 1 file changed, 2 insertions(+) commit e7c4b02c2642a5ff3704bd86ff23a6a7a0f4e279 Author: Gerald Baeza Date: Fri Feb 23 14:36:03 2018 +0100 dt-bindings: pwm-stm32-lp: Add #pwm-cells STM32 Low-Power Timer supports generic 3 cells PWM to encode PWM number, period and polarity. Signed-off-by: Gerald Baeza Signed-off-by: Fabrice Gasnier Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/pwm-stm32-lp.txt | 3 +++ 1 file changed, 3 insertions(+) commit 4eb67a209645a87b8aca070aa9735eed90177829 Author: Fabrice Gasnier Date: Wed Feb 14 11:04:33 2018 +0100 pwm: stm32: Protect common prescaler for all channels There may be a race, when configuring two PWM channels, with different prescaler values, when there's no active channel yet. Add mutex lock to avoid concurrent access on PWM apply state. This is also precursor patch for PWM capture support. Signed-off-by: Fabrice Gasnier Reviewed-by: Benjamin Gaignard Signed-off-by: Thierry Reding drivers/pwm/pwm-stm32.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 3af0bdd1d027292d40c7f1d13420bc298b3e1660 Author: Fabrice Gasnier Date: Wed Feb 14 11:04:32 2018 +0100 pwm: stm32: Remove unused struct device dev is never assigned or used. Remove it. Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm") Signed-off-by: Fabrice Gasnier Reviewed-by: Benjamin Gaignard Signed-off-by: Thierry Reding drivers/pwm/pwm-stm32.c | 1 - 1 file changed, 1 deletion(-) commit 04c0a4e00dc11fedc0b0a8593adcf0f4310505d4 Author: Sean Wang Date: Fri Mar 2 16:49:14 2018 +0800 pwm: mediatek: Improve precision in rate calculation Add a way that turning resolution from in nanosecond into in picosecond to improve noticeably almost 4.5% precision. It's necessary to hold the new resolution with type u64 and thus related operations on u64 are applied instead in those rate calculations. And the patch has a dependency on [1]. [1] http://lists.infradead.org/pipermail/linux-mediatek/2018-March/012225.html Cc: stable@vger.kernel.org Fixes: caf065f8fd58 ("pwm: Add MediaTek PWM support") Signed-off-by: Sean Wang Signed-off-by: Thierry Reding drivers/pwm/pwm-mediatek.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit f3617876364c0471b4779a0d05539f210693e45f Author: Sean Wang Date: Mon Mar 26 18:02:01 2018 +0800 pwm: mediatek: Remove redundant MODULE_ALIAS entries MODULE_ALIAS exports information to allow the module to be auto-loaded at boot for the drivers registered using legacy platform registration. However, currently the driver is always used by DT-only platform, MODULE_ALIAS is redundant and should be removed properly. Signed-off-by: Sean Wang Signed-off-by: Thierry Reding drivers/pwm/pwm-mediatek.c | 1 - 1 file changed, 1 deletion(-) commit 360cc036563db27881ce08049f69138438f2ddd0 Author: Sean Wang Date: Thu Mar 1 16:19:12 2018 +0800 pwm: mediatek: Fix up PWM4 and PWM5 malfunction on MT7623 Since the offset for both registers, PWMDWIDTH and PWMTHRES, used to control PWM4 or PWM5 are distinct from the other PWMs, whose wrong programming on PWM hardware causes waveform cannot be output as expected. Thus, the patch adds the extra condition for fixing up the weird case to let PWM4 or PWM5 able to work on MT7623. v1 -> v2: use pwm45_fixup naming instead of pwm45_quirk v2 -> v3: add more tags for Reviewed-by, Fixes, and Cc stable Cc: stable@vger.kernel.org Fixes: caf065f8fd58 ("pwm: Add MediaTek PWM support") Signed-off-by: Sean Wang Reviewed-by: Matthias Brugger Cc: Zhi Mao Cc: John Crispin Cc: Matthias Brugger Signed-off-by: Thierry Reding drivers/pwm/pwm-mediatek.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit b419006275dbc05d73c5659b62c635b47a410a19 Author: Paul Cercueil Date: Sat Jan 6 17:58:43 2018 +0100 pwm: jz4740: Enable for all Ingenic SoCs This driver works perfectly with all the versions of the SoCs from Ingenic that are supported upstream. This makes the driver usable on JZ4740, JZ4770 and JZ4780 SoCs. Signed-off-by: Paul Cercueil Signed-off-by: Thierry Reding drivers/pwm/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cc20173304e4f54c0ccabe0c0636b05c2410a4be Author: Paul Cercueil Date: Sat Jan 6 17:58:42 2018 +0100 pwm: jz4740: Add support for devicetree Add support for probing the pwm-jz4740 directly from devicetree. Signed-off-by: Paul Cercueil Reviewed-by: Rob Herring Signed-off-by: Thierry Reding .../devicetree/bindings/pwm/ingenic,jz47xx-pwm.txt | 25 ++++++++++++++++++++++ drivers/pwm/pwm-jz4740.c | 14 ++++++++++++ 2 files changed, 39 insertions(+) commit 174dcc8eaec5fd53f9d6f3aa3068e8415a9c0d35 Author: Paul Cercueil Date: Sat Jan 6 17:58:41 2018 +0100 pwm: jz4740: Implement ->set_polarity() This permits clients of this driver to specify the polarity to use for their PWM channel. Signed-off-by: Paul Cercueil Signed-off-by: Thierry Reding drivers/pwm/pwm-jz4740.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 190fb9c4d130f23b64d73e9921afb9a502340455 Author: Parav Pandit Date: Sun Mar 25 13:40:23 2018 +0300 IB/core: Refer to RoCE port property to decide building cache IB core maintains the GID cache entries for the GID table. This cache table has to be maintained regardless of HCA's support of GID table. For IB and iWarp ports, cache is created by querying the HCA. For RoCE cache is created based on netdev events. Therefore just refer to the RoCE port property of the {device, port} to decide whether to build cache by querying HCA or from netdev events. There is no need to check if HCA support GID table or not. ib_cache_update() referred to RoCE attribute before validating port. Though in all current callers port is valid, it is incorrect to query RoCE port property before validating the port. Therefore, rdma_protocol_roce() check is done after rdma_is_port_valid() verifies that port is valid. Fixes: 115b68aa6ea4 ("IB/ocrdma: Removed GID add/del null routines") Reviewed-by: Daniel Jurgens Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 22d24f75a19399bd8c4822541c60e853a16a1956 Author: Parav Pandit Date: Sun Mar 25 13:40:22 2018 +0300 IB/core: Search GID only for IB link layer Even though API is only used by IPoIB driver, its incorrect to refer RoCE GID table property to search for GID. Look for only IB link layer to search for the GID. Fixes: dbb12562f7c2 ("IB/{core, ipoib}: Simplify ib_find_gid to search only for IB link layer") Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ab7cb4bf362dc3b85fd8ddac3b16949404be96b Author: Parav Pandit Date: Sun Mar 25 13:40:21 2018 +0300 IB/core: Refer to RoCE port property instead of GID table property ib_find_gid_by_filter() searches GID with filter only for RoCE link layer regardless of HCA's support for GID table. Therefore, right way to lookup is compare RoCE port property and not the GID table property. Fixes: 99b27e3b5da0 ("IB/cache: Add ib_find_gid_by_filter cache API") Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3401857ea347e86a51adb844c5e9207dcdc0139b Author: Parav Pandit Date: Sun Mar 25 13:40:20 2018 +0300 IB/core: Generate GID change event regardless of RoCE GID table property Due to following reasons, GID table event is generated regardless of GID table property. 1. GID table cache is maintained at ib core layer regardless of link layer. 2. GID change event has no relation with IB link layer. 3. GID change event also doesn't depend on whether HCA supports GID table or not. Fixes: f3906bd36087 ("IB/core: Refactor GID cache's ib_dispatch_event") Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cache.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 97c45c2c28cd291e06778d9d36a0f60ee74726bc Author: Parav Pandit Date: Sun Mar 25 13:40:19 2018 +0300 IB/cm: Block processing alternate path handling RoCE Rx cm messages Due to below reasons, it is better to not support alternate path receive messages for RoCE in near term. 1. Alternate path for RoCE is not supported at rdmacm layer. 2. It is not supported in uverbs/core layer for RoCE. 3. Alternate path for IPv6 for link local address cannot resolve route determinstically without a valid incoming interface id whose usecase make sense only with dual port mode. 4. init_av_from_path while processing LAP messages for IB and RoCE can lead to adding duplicate entry of AV into the port list, leads to list corruption. 5. rdma-core userspace a well known userspace implementation has removed support of libucm which use ucm.ko module, which is the only module that can trigger alternate path related messages. 6. ucm kernel module is requested to be removed from the IB core in patch [1]. [1] https://patchwork.kernel.org/patch/10268503/ Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit df56b1712d57863e9686673bb13803dcd8a82f7a Author: Maarten ter Huurne Date: Sat Jan 6 17:58:40 2018 +0100 pwm: jz4740: Make disable operation compatible with TCU2 mode On the JZ4750 and later SoCs, channel 1 and 2 operate in a different way (TCU2 mode) as the other channels. If a TCU2 mode counter is stopped before its PWM functionality is disabled, the output is not guaranteed to return to the initial level. Signed-off-by: Maarten ter Huurne Signed-off-by: Thierry Reding drivers/pwm/pwm-jz4740.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 1f6eefeb7cd45360397fb5d3f08ce9ec41e80b17 Author: Fabio Estevam Date: Tue Jan 2 11:01:59 2018 -0200 pwm: imx: Let PWM be active during suspend On a imx6q-cubox-i board, which has an LED driven by PWM, when the system goes into suspend the PWM block is disabled by default, then the PWM pin goes to logic level zero and turn on the LED during suspend, which is not really the behaviour we want to see. By keeping the PWM enabled during suspend via STOPEN bit, the pwm-leds driver sets the brightness to zero in suspend and then the LED is turned off as expected. So always set the STOPEN to fix the PWM behaviour in suspend. Signed-off-by: Fabio Estevam Signed-off-by: Thierry Reding drivers/pwm/pwm-imx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1bae5d229532b4e8dfd5728cb3b8373bc9eec9eb Author: David Howells Date: Tue Mar 27 23:08:20 2018 +0100 rxrpc: Trace call completion Add a tracepoint to track rxrpc calls moving into the completed state and to log the completion type and the recorded error value and abort code. Signed-off-by: David Howells include/trace/events/rxrpc.h | 33 +++++++++++++++++++++++++++++++++ net/rxrpc/ar-internal.h | 1 + 2 files changed, 34 insertions(+) commit a25e21f0bcd25673b91b97b9805db33350feec0f Author: David Howells Date: Tue Mar 27 23:03:00 2018 +0100 rxrpc, afs: Use debug_ids rather than pointers in traces In rxrpc and afs, use the debug_ids that are monotonically allocated to various objects as they're allocated rather than pointers as kernel pointers are now hashed making them less useful. Further, the debug ids aren't reused anywhere nearly as quickly. In addition, allow kernel services that use rxrpc, such as afs, to take numbers from the rxrpc counter, assign them to their own call struct and pass them in to rxrpc for both client and service calls so that the trace lines for each will have the same ID tag. Signed-off-by: David Howells fs/afs/internal.h | 1 + fs/afs/rxrpc.c | 12 ++-- include/net/af_rxrpc.h | 11 ++- include/trace/events/afs.h | 69 +++++++++---------- include/trace/events/rxrpc.h | 155 ++++++++++++++++++++++--------------------- net/rxrpc/af_rxrpc.c | 7 +- net/rxrpc/ar-internal.h | 8 +-- net/rxrpc/call_accept.c | 18 +++-- net/rxrpc/call_object.c | 15 +++-- net/rxrpc/conn_event.c | 3 +- net/rxrpc/input.c | 6 +- net/rxrpc/sendmsg.c | 3 +- 12 files changed, 163 insertions(+), 145 deletions(-) commit 827efed6a66ef8a1c071400b5952fee4a5ffedf9 Author: David Howells Date: Tue Mar 27 23:02:47 2018 +0100 rxrpc: Trace resend Add a tracepoint to trace packet resend events and to dump the Tx annotation buffer for added illumination. Signed-off-by: David Howells include/trace/events/rxrpc.h | 24 ++++++++++++++++++++++++ net/rxrpc/call_event.c | 1 + 2 files changed, 25 insertions(+) commit 204e17baa6fd2ec02deca08cdcb60aad77cbd043 Author: Geert Uytterhoeven Date: Fri Mar 2 15:39:45 2018 +0100 dt-bindings: pwm: renesas-tpu: Correct SoC part numbers and family names R8A73A4 (not R8A77A4) is R-Mobile APE6, R8A7740 is R-Mobile (not R-Car) A1. Signed-off-by: Geert Uytterhoeven Acked-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3b8ad2c1effedf2fed4ad989612386b5cff11289 Author: Geert Uytterhoeven Date: Tue Dec 19 17:02:06 2017 +0100 dt-bindings: pwm: renesas-tpu: Correct example TPU register block size The Timer Pulse Unit on R-Mobile A1 has registers that lie outside the declared register block. Enlarge the register block size to fix this. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d7e72858d9d84abbbb49e98e2dafeee2f7fd9b6 Author: Fabrizio Castro Date: Wed Dec 20 11:15:43 2017 +0000 dt-bindings: pwm: rcar: Document r8a774[35] PWM bindings This patch adds compatible strings specific to r8a774[35], no driver change is needed as the fallback compatible string will activate the right code. Also, this patch replaces the example with a DT snippet used for adding PWM0 support to an r8a7743 based platform as the r8a7743 is now the first platform fully compatible with this driver and its PWM DT nodes refer to up-to-date code. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Rob Herring Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 3ba111a0182265b65e303c969294b8033ce9d122 Author: Fabrizio Castro Date: Tue Dec 19 13:34:59 2017 +0000 dt-bindings: pwm: renesas-tpu: Document r8a774[35] support Document r8a774[35] specific compatible strings. No driver change is needed as the fallback compatible string "renesas,tpu" activates the right code in the driver. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Rob Herring Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 708aa931bd09459bd3c1bcbcbf1e335087b0c951 Author: Markus Elfring Date: Fri Dec 15 18:55:11 2017 +0100 pwm: atmel-tcb: Delete an error message for a failed memory allocation Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Thierry Reding drivers/pwm/pwm-atmel-tcb.c | 1 - 1 file changed, 1 deletion(-) commit 31c8b0d0694a1f7e3b46df0d1341a874ecb5e0de Author: Paul Mackerras Date: Thu Mar 1 15:14:02 2018 +1100 KVM: PPC: Book3S HV: Use __gfn_to_pfn_memslot() in page fault handler This changes the hypervisor page fault handler for radix guests to use the generic KVM __gfn_to_pfn_memslot() function instead of using get_user_pages_fast() and then handling the case of VM_PFNMAP vmas specially. The old code missed the case of VM_IO vmas; with this change, VM_IO vmas will now be handled correctly by code within __gfn_to_pfn_memslot. Currently, __gfn_to_pfn_memslot calls hva_to_pfn, which only uses __get_user_pages_fast for the initial lookup in the cases where either atomic or async is set. Since we are not setting either atomic or async, we do our own __get_user_pages_fast first, for now. This also adds code to check for the KVM_MEM_READONLY flag on the memslot. If it is set and this is a write access, we synthesize a data storage interrupt for the guest. In the case where the page is not normal RAM (i.e. page == NULL in kvmppc_book3s_radix_page_fault(), we read the PTE from the Linux page tables because we need the mapping attribute bits as well as the PFN. (The mapping attribute bits indicate whether accesses have to be non-cacheable and/or guarded.) Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_radix.c | 148 ++++++++++++++++++++------------- 1 file changed, 88 insertions(+), 60 deletions(-) commit 6106d888a050567b00cd36933ae80e9a3087e3bb Author: Markus Elfring Date: Fri Dec 15 18:29:49 2017 +0100 pwm: puv3: Delete an error message for a failed memory allocation Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Thierry Reding drivers/pwm/pwm-puv3.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d7a131d3a4a20e7f03de30e85ae082dd68b4e11c Author: Benjamin Gaignard Date: Tue Dec 5 15:57:21 2017 +0100 pwm: stm32: Adopt SPDX identifier Add SPDX identifier to make it easier to determine the license of the file. Signed-off-by: Benjamin Gaignard Acked-by: Philippe Ombredanne Signed-off-by: Thierry Reding drivers/pwm/pwm-stm32-lp.c | 3 +-- drivers/pwm/pwm-stm32.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit e945130b52bea65d15f9bdf54949d4cb7a88db7f Author: Mark Bloch Date: Tue Mar 27 15:51:05 2018 +0300 IB/core: Protect against concurrent access to hardware stats Currently access to hardware stats buffer isn't protected, this can result in multiple writes and reads at the same time to the same memory location. This can lead to providing an incorrect value to the user. Add a mutex to protect against it. Fixes: b40f4757daa1 ("IB/core: Make device counter infrastructure dynamic") Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/sysfs.c | 34 ++++++++++++++++++++++++++++------ include/rdma/ib_verbs.h | 4 ++++ 2 files changed, 32 insertions(+), 6 deletions(-) commit 0d79cbf83be07bb38a1224f47fd0e2b163310442 Author: Eric W. Biederman Date: Fri Mar 23 23:56:19 2018 -0500 ipc/smack: Tidy up from the change in type of the ipc security hooks Rename the variables shp, sma, msq to isp. As that is how the code already refers to those variables. Collapse smack_of_shm, smack_of_sem, and smack_of_msq into smack_of_ipc, as the three functions had become completely identical. Collapse smack_shm_alloc_security, smack_sem_alloc_security and smack_msg_queue_alloc_security into smack_ipc_alloc_security as the three functions had become identical. Collapse smack_shm_free_security, smack_sem_free_security and smack_msg_queue_free_security into smack_ipc_free_security as the three functions had become identical. Requested-by: Casey Schaufler Signed-off-by: "Eric W. Biederman" security/smack/smack_lsm.c | 197 +++++++++++++-------------------------------- 1 file changed, 58 insertions(+), 139 deletions(-) commit 50ab44b1c5d1b13305ce8acb74c8e50e0dcbaedc Author: Eric W. Biederman Date: Fri Mar 23 23:41:55 2018 -0500 ipc: Directly call the security hook in ipc_ops.associate After the last round of cleanups the shm, sem, and msg associate operations just became trivial wrappers around the appropriate security method. Simplify things further by just calling the security method directly. Signed-off-by: "Eric W. Biederman" ipc/msg.c | 10 +--------- ipc/sem.c | 10 +--------- ipc/shm.c | 10 +--------- 3 files changed, 3 insertions(+), 27 deletions(-) commit 51d6f2635b39709ee5e62479be23d423b760292c Author: Eric W. Biederman Date: Fri Mar 23 01:11:29 2018 -0500 ipc/sem: Fix semctl(..., GETPID, ...) between pid namespaces Today the last process to update a semaphore is remembered and reported in the pid namespace of that process. If there are processes in any other pid namespace querying that process id with GETPID the result will be unusable nonsense as it does not make any sense in your own pid namespace. Due to ipc_update_pid I don't think you will be able to get System V ipc semaphores into a troublesome cache line ping-pong. Using struct pids from separate process are not a problem because they do not share a cache line. Using struct pid from different threads of the same process are unlikely to be a problem as the reference count update can be avoided. Further linux futexes are a much better tool for the job of mutual exclusion between processes than System V semaphores. So I expect programs that are performance limited by their interprocess mutual exclusion primitive will be using futexes. So while it is possible that enhancing the storage of the last rocess of a System V semaphore from an integer to a struct pid will cause a performance regression because of the effect of frequently updating the pid reference count. I don't expect that to happen in practice. This change updates semctl(..., GETPID, ...) to return the process id of the last process to update a semphore inthe pid namespace of the calling process. Fixes: b488893a390e ("pid namespaces: changes to show virtual ids to user") Signed-off-by: "Eric W. Biederman" ipc/sem.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 39a4940eaa185910bb802ca9829c12268fd2c855 Author: Eric W. Biederman Date: Fri Mar 23 00:42:21 2018 -0500 ipc/msg: Fix msgctl(..., IPC_STAT, ...) between pid namespaces Today msg_lspid and msg_lrpid are remembered in the pid namespace of the creator and the processes that last send or received a sysvipc message. If you have processes in multiple pid namespaces that is just wrong. The process ids reported will not make the least bit of sense. This fix is slightly more susceptible to a performance problem than the related fix for System V shared memory. By definition the pids are updated by msgsnd and msgrcv, the fast path of System V message queues. The only concern over the previous implementation is the incrementing and decrementing of the pid reference count. As that is the only difference and multiple updates by of the task_tgid by threads in the same process have been shown in af_unix sockets to create a cache line ping-pong between cpus of the same processor. In this case I don't expect cache lines holding pid reference counts to ping pong between cpus. As senders and receivers update different pids there is a natural separation there. Further if multiple threads of the same process either send or receive messages the pid will be updated to the same value and ipc_update_pid will avoid the reference count update. Which means in the common case I expect msg_lspid and msg_lrpid to remain constant, and reference counts not to be updated when messages are sent. In rare cases it may be possible to trigger the issue which was observed for af_unix sockets, but it will require multiple processes with multiple threads to be either sending or receiving messages. It just does not feel likely that anyone would do that in practice. This change updates msgctl(..., IPC_STAT, ...) to return msg_lspid and msg_lrpid in the pid namespace of the process calling stat. This change also updates cat /proc/sysvipc/msg to return print msg_lspid and msg_lrpid in the pid namespace of the process that opened the proc file. Fixes: b488893a390e ("pid namespaces: changes to show virtual ids to user") Reviewed-by: Nagarathnam Muthusamy Signed-off-by: "Eric W. Biederman" ipc/msg.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 98f929b1bd4d0b7c7a77d0d9776d1b924db2e454 Author: Eric W. Biederman Date: Fri Mar 23 00:29:57 2018 -0500 ipc/shm: Fix shmctl(..., IPC_STAT, ...) between pid namespaces. Today shm_cpid and shm_lpid are remembered in the pid namespace of the creator and the processes that last touched a sysvipc shared memory segment. If you have processes in multiple pid namespaces that is just wrong, and I don't know how this has been over-looked for so long. As only creation and shared memory attach and shared memory detach update the pids I do not expect there to be a repeat of the issues when struct pid was attached to each af_unix skb, which in some notable cases cut the performance in half. The problem was threads of the same process updating same struct pid from different cpus causing the cache line to be highly contended and bounce between cpus. As creation, attach, and detach are expected to be rare operations for sysvipc shared memory segments I do not expect that kind of cache line ping pong to cause probems. In addition because the pid is at a fixed location in the structure instead of being dynamic on a skb, the reference count of the pid does not need to be updated on each operation if the pid is the same. This ability to simply skip the pid reference count changes if the pid is unchanging further reduces the likelihood of the a cache line holding a pid reference count ping-ponging between cpus. Fixes: b488893a390e ("pid namespaces: changes to show virtual ids to user") Reviewed-by: Nagarathnam Muthusamy Signed-off-by: "Eric W. Biederman" ipc/shm.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit dea4bd1975e36e3127a95e74c3670ea8d7f4796f Author: Arnd Bergmann Date: Thu Feb 22 16:57:38 2018 +0100 soc: qcom: qmi: add CONFIG_NET dependency Access to the socket API and the root network namespace is only available when networking is enabled: ERROR: "kernel_sendmsg" [drivers/soc/qcom/qmi_helpers.ko] undefined! ERROR: "sock_release" [drivers/soc/qcom/qmi_helpers.ko] undefined! ERROR: "sock_create_kern" [drivers/soc/qcom/qmi_helpers.ko] undefined! ERROR: "kernel_getsockname" [drivers/soc/qcom/qmi_helpers.ko] undefined! ERROR: "init_net" [drivers/soc/qcom/qmi_helpers.ko] undefined! ERROR: "kernel_recvmsg" [drivers/soc/qcom/qmi_helpers.ko] undefined! Adding a dependency on CONFIG_NET lets us build it in all randconfig builds. Fixes: 9b8a11e82615 ("soc: qcom: Introduce QMI encoder/decoder") Acked-by: Andy Gross Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 1 + drivers/soc/qcom/Kconfig | 2 +- samples/Kconfig | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit c8d75a980fab886a9c716567e6b47cc414ad84ee Author: Majd Dibbiny Date: Thu Mar 22 15:34:04 2018 +0200 IB/mlx5: Respect new UMR capabilities In some firmware configuration, UMR usage from Virtual Functions is restricted. This information is published to the driver using new capability bits. Avoid using UMRs in these cases and use the Firmware slow-path flow to create mkeys and populate them with Virtual to Physical address translation. Older drivers that do not have this patch, will end up using memory keys that aren't populated with Virtual to Physical address translation that is done part of the UMR work. Reviewed-by: Mark Bloch Signed-off-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Tested-by: Laurence Oberman Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mr.c | 35 ++++++++++++++++++++++++++++++----- drivers/infiniband/hw/mlx5/qp.c | 21 ++++++++++++++++++--- include/linux/mlx5/mlx5_ifc.h | 6 +++++- 3 files changed, 53 insertions(+), 9 deletions(-) commit ea8af0d2f2b5b16da4553205ddaf225e0a057e03 Author: Majd Dibbiny Date: Thu Mar 22 15:34:03 2018 +0200 IB/mlx5: Enable ECN capable bits for UD RoCE v2 QPs When working with RC QPs, the FW sets the ECN capable bits for all the RoCE v2 packets. On the other hand, for UD QPs, the driver needs to set the the ECN capable bits in the Address Handler since the HW generates each packet according to the Address Handler and not the QP context. If ECN is not enabled in NIC or switch, these bits are ignored. Fixes: 2811ba51b049 ("IB/mlx5: Add RoCE fields to Address Vector") Reviewed-by: Mark Bloch Signed-off-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/ah.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit be23fb9a2c1d33037c1499a04e93bb0c03cf73d6 Author: Matan Barak Date: Thu Mar 22 11:52:02 2018 +0200 IB/uverbs: UAPI pointers should use __aligned_u64 type The ioctl() UAPIs are meant to be used by both user-space and kernel ioctl() handlers. Mostly, these UAPI structs tend to consist of simple types, but sometimes user-space pointers may be passed between user-space and kernel. We would like to avoid dereferencing a user-space pointer in the kernel, thus - we always define RDMA_UAPI_PTR as a __aligned_u64 type. Fixes: 1f7ff9d5d36a ('IB/uverbs: Move to new headers and make naming consistent') Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe include/uapi/rdma/ib_user_ioctl_verbs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 819b60286e4e99e499d966ea55d5ef8fb9151b13 Merge: f64705b 26b9906 Author: Jason Gunthorpe Date: Tue Mar 27 14:32:49 2018 -0600 Merge branch '32compat' The design of the uAPI had intended all structs to share the same layout on 32 and 64 bit compiles. Unfortunately over the years some errors have crept in. This series fixes all the incompatabilities. It goes along with a userspace rdma-core series that causes the providers to use these structs directly and then does various self-checks on the command formation. Those checks were combined with output from pahole on 32 and 64 bit compiles to confirm that the structure layouts are the same. This series does not make implicit padding explicit, as long as the implicit padding is the same on 32 and 64 bit compiles. Finally, the issue is put to rest by using __aligned_u64 in the uapi headers, if new code copies that type, and is checked in userspace, it is unlikely we will see problems in future. There are two patches that break the ABI for a 32 bit kernel, one for rxe and one for mlx4. Both patches have notes, but the overall feeling from Doug and I is that providing compat is just too difficult and not necessary since there is no real user of a 32 bit userspace and 32 bit kernel for various good reasons. The 32 bit userspace / 64 bit kernel case however does seem to have some real users and does need to work as designed. * 32compat: RDMA: Change all uapi headers to use __aligned_u64 instead of __u64 RDMA/rxe: Fix uABI structure layouts for 32/64 compat RDMA/mlx4: Fix uABI structure layouts for 32/64 compat RDMA/qedr: Fix uABI structure layouts for 32/64 compat RDMA/ucma: Fix uABI structure layouts for 32/64 compat RDMA: Remove minor pahole differences between 32/64 commit 26b9906612c3553189d7d1673ee116ffac474d53 Author: Jason Gunthorpe Date: Tue Mar 20 14:19:51 2018 -0600 RDMA: Change all uapi headers to use __aligned_u64 instead of __u64 The new auditing standard for the subsystem will be to only use __aligned_64 in uapi headers to try and prevent 32/64 compat bugs from existing in the future. Changing all existing usage will help ensure new developers copy the right idea. The before/after of this patch was tested using pahole on 32 and 64 bit compiles to confirm it has no change in the structure layout, so this patch is a NOP. Signed-off-by: Jason Gunthorpe include/uapi/rdma/bnxt_re-abi.h | 14 ++-- include/uapi/rdma/cxgb3-abi.h | 12 +-- include/uapi/rdma/cxgb4-abi.h | 24 +++--- include/uapi/rdma/hfi/hfi1_ioctl.h | 32 ++++---- include/uapi/rdma/hfi/hfi1_user.h | 4 +- include/uapi/rdma/hns-abi.h | 14 ++-- include/uapi/rdma/i40iw-abi.h | 12 +-- include/uapi/rdma/ib_user_cm.h | 48 +++++------ include/uapi/rdma/ib_user_mad.h | 4 +- include/uapi/rdma/ib_user_verbs.h | 158 ++++++++++++++++++------------------- include/uapi/rdma/mlx4-abi.h | 24 +++--- include/uapi/rdma/mlx5-abi.h | 40 +++++----- include/uapi/rdma/mthca-abi.h | 10 +-- include/uapi/rdma/nes-abi.h | 6 +- include/uapi/rdma/ocrdma-abi.h | 30 +++---- include/uapi/rdma/qedr-abi.h | 16 ++-- include/uapi/rdma/rdma_user_cm.h | 34 ++++---- include/uapi/rdma/rdma_user_rxe.h | 22 +++--- include/uapi/rdma/vmw_pvrdma-abi.h | 48 +++++------ 19 files changed, 276 insertions(+), 276 deletions(-) commit f2e9bfac13c904e5cfe58612002acde6f058dc83 Author: Jason Gunthorpe Date: Tue Mar 20 14:19:50 2018 -0600 RDMA/rxe: Fix uABI structure layouts for 32/64 compat With 32 bit compilation several of the fields become misaligned here. Fixing this is an ABI break for 32 bit rxe and it is in well used portions of the rxe ABI. To handle this we bump the ABI version, as expected. However the user space driver doesn't handle it properly today, so all existing user space continues to work. Updated userspace will start to require the necessary kernel version. We don't expect there to be any 32 bit users of rxe. Most likely cases, such as ARM 32 already generally don't work because rxe does not handle the CPU cache properly on its shared with userspace pages. Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe.h | 6 +++++- include/uapi/rdma/rdma_user_rxe.h | 12 ++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) commit 366380a0c835b742da64ae2f800c65fa87692683 Author: Jason Gunthorpe Date: Tue Mar 20 14:19:49 2018 -0600 RDMA/mlx4: Fix uABI structure layouts for 32/64 compat rss_caps in struct mlx4_uverbs_ex_query_device_resp is misaligned on 32 bit compared to 64 bit, add explicit padding. The rss caps were introduced recently and are very rarely used in user space, mainly for DPDK. We don't expect there to be a real 32 bit user, so this change is done without compat considerations. Fixes: 09d208b258a2 ("IB/mlx4: Add report for RSS capabilities by vendor channel") Signed-off-by: Jason Gunthorpe include/uapi/rdma/mlx4-abi.h | 1 + 1 file changed, 1 insertion(+) commit 71e80a4781afbc4b1130b88109ddd8850201c78a Author: Jason Gunthorpe Date: Tue Mar 20 14:19:48 2018 -0600 RDMA/qedr: Fix uABI structure layouts for 32/64 compat struct qedr_alloc_ucontext_resp is a different length in 32 and 64 bit compiles due to implicit compiler padding. The structs alloc_pd_uresp, create_cq_uresp and create_qp_uresp are not padded by the compiler, but in user space the compiler pads them due to the way the core and driver structs are concatenated. Make this padding explicit and consistent for future sanity. The kernel driver can already handle the user buffer being smaller than required and copies correctly, so no compat or ABI break happens from introducing the explicit padding. Acked-by: Michal Kalderon Signed-off-by: Jason Gunthorpe include/uapi/rdma/qedr-abi.h | 4 ++++ 1 file changed, 4 insertions(+) commit 611cb92b082ad16b2fe1258e51d5aca7de540dfb Author: Jason Gunthorpe Date: Tue Mar 20 14:19:47 2018 -0600 RDMA/ucma: Fix uABI structure layouts for 32/64 compat The rdma_ucm_event_resp is a different length on 32 and 64 bit compiles. The kernel requires it to be the expected length or longer so 32 bit builds running on a 64 bit kernel will not work. Retain full compat by having all kernels accept a struct with or without the trailing reserved field. Signed-off-by: Jason Gunthorpe drivers/infiniband/core/ucma.c | 9 +++++++-- include/uapi/rdma/rdma_user_cm.h | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) commit 38b48808b9af55f02cb226a1f09b7a5e67104569 Author: Jason Gunthorpe Date: Tue Mar 20 14:19:46 2018 -0600 RDMA: Remove minor pahole differences between 32/64 To help automatic detection we want pahole to report the same struct layouts for 32 and 64 bit compiles. These cases are all implicit padding added at the end of embedded structs as part of a union. The added reserved fields have no impact on the ABI. Signed-off-by: Jason Gunthorpe include/uapi/rdma/rdma_user_rxe.h | 2 ++ include/uapi/rdma/vmw_pvrdma-abi.h | 1 + 2 files changed, 3 insertions(+) commit b76354cdfefb68bc017065850a34d486887a4f7b Author: Shaohua Li Date: Tue Mar 27 11:53:21 2018 -0700 bpf: follow idr code convention Generally we do a preload before doing idr allocation. This also help improve the allocation success rate in memory pressure. Cc: Daniel Borkmann Cc: Alexei Starovoitov Signed-off-by: Shaohua Li Signed-off-by: Daniel Borkmann kernel/bpf/syscall.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3148ffbdb9162baa28545809d675d3bf9339d6a1 Author: Omar Sandoval Date: Mon Mar 26 21:39:12 2018 -0700 loop: use killable lock in ioctls Even after the previous patch to drop lo_ctl_mutex while calling vfs_getattr(), there are other cases where we can end up sleeping for a long time while holding lo_ctl_mutex. Let's avoid the uninterruptible sleep from the ioctls. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/loop.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 2d1d4c1e591fd40bd7dafd868a249d7d00e215d5 Author: Omar Sandoval Date: Mon Mar 26 21:39:11 2018 -0700 loop: don't call into filesystem while holding lo_ctl_mutex We hit an issue where a loop device on NFS was stuck in loop_get_status() doing vfs_getattr() after the NFS server died, which caused a pile-up of uninterruptible processes waiting on lo_ctl_mutex. There's no reason to hold this lock while we wait on the filesystem; let's drop it so that other processes can do their thing. We need to grab a reference on lo_backing_file while we use it, and we can get rid of the check on lo_device, which has been unnecessary since commit a34c0ae9ebd6 ("[PATCH] loop: remove the bio remapping capability") in the linux-history tree. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/loop.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit 2bd9b4385fd7ece4f0c64f38bea7726a810a06af Author: Bjorn Andersson Date: Thu Mar 15 11:12:44 2018 -0700 Revert "rpmsg: smd: Create device for all channels" In an effort to pick up channels that are in a funky state we optimistically tried to open all channels that we found, with the addition that we failed if the other side did not handshake the opening. But as we're starting the modem a second time all channels are found - in a "funky" state - and we try to open them. But the modem firmware requires the IPCRTR to be up in order to initialize. So any channels we try to open before that will fail and will not be opened again. This takes care of the regression, at the cost of reintroducing the previous behavior of handling of channels with "funky" states. Reverts commit c12fc4519f60 ("rpmsg: smd: Create device for all channels") Reported-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_smd.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5d22d47b9ed96eddb35821dc2cc4f629f45827f7 Merge: c709002 a8e8fbeb Author: David S. Miller Date: Tue Mar 27 13:33:21 2018 -0400 Merge branch 'sfc-filter-locking' Edward Cree says: ==================== sfc: rework locking around filter management The use of a spinlock to protect filter state combined with the need for a sleeping operation (MCDI) to apply that state to the NIC (on EF10) led to unfixable race conditions, around the handling of filter restoration after an MC reboot. So, this patch series removes the requirement to be able to modify the SW filter table from atomic context, by using a workqueue to request asynchronous filter operations (which are needed for ARFS). Then, the filter table locks are changed to mutexes, replacing the dance of spinlocks and 'busy' flags. Also, a mutex is added to protect the RSS context state, since otherwise a similar race is possible around restoring that after an MC reboot. While we're at it, fix a couple of other related bugs. ==================== Signed-off-by: David S. Miller commit a8e8fbebde5ded18e94c36220397521021d941ce Author: Edward Cree Date: Tue Mar 27 17:44:51 2018 +0100 sfc: fix flow type handling for RSS filters The FLOW_RSS flag was causing us to insert UDP filters when TCP was wanted. Fixes: 42356d9a137b ("sfc: support RSS spreading of ethtool ntuple filters") Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ethtool.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit e0a65e3c5e3b7b11ec9320524b8fcc210f2026e9 Author: Edward Cree Date: Tue Mar 27 17:44:36 2018 +0100 sfc: protect list of RSS contexts under a mutex Otherwise races are possible between ethtool ops and efx_ef10_rx_restore_rss_contexts(). Also, don't try to perform the restore on every reset, only after an MC reboot, otherwise we'll leak RSS contexts on the NIC. Fixes: 42356d9a137b ("sfc: support RSS spreading of ethtool ntuple filters") Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 32 ++++++++++++++--- drivers/net/ethernet/sfc/efx.c | 14 ++++++-- drivers/net/ethernet/sfc/efx.h | 4 +-- drivers/net/ethernet/sfc/ethtool.c | 66 +++++++++++++++++++++++------------ drivers/net/ethernet/sfc/net_driver.h | 2 ++ drivers/net/ethernet/sfc/nic.h | 3 ++ 6 files changed, 89 insertions(+), 32 deletions(-) commit 31b842955211f427a099f78a6a63d18a6bbc8d55 Author: Edward Cree Date: Tue Mar 27 17:44:21 2018 +0100 sfc: return a better error if filter insertion collides with MC reboot If some other operation gets the MCDI lock ahead of us and performs an MC reboot, then our attempt to insert the filter will fail with EINVAL, because the destination VI (spec->dmaq_id, MC_CMD_FILTER_OP_IN_RX_QUEUE) does not exist. But the caller's request (which might e.g. be an ethtool ntuple request from userland) isn't invalid, it just got unlucky; so return EAGAIN. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 7 +++++++ 1 file changed, 7 insertions(+) commit fc7a6c287ff395eb64745292b4d398e64152cfb6 Author: Edward Cree Date: Tue Mar 27 17:42:57 2018 +0100 sfc: use a semaphore to lock farch filters too With this change, the spinlock efx->filter_lock is no longer used and is thus removed. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/farch.c | 67 +++++++++++++++++------------------ drivers/net/ethernet/sfc/net_driver.h | 2 -- 2 files changed, 33 insertions(+), 36 deletions(-) commit c2bebe37c6b686817f795b6b63599ed4472775fa Author: Edward Cree Date: Tue Mar 27 17:42:28 2018 +0100 sfc: give ef10 its own rwsem in the filter table instead of filter_lock efx->filter_lock remains in place for use on farch, but EF10 now ignores it. EFX_EF10_FILTER_FLAG_BUSY is no longer needed, hence it is removed. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 361 ++++++++++++++-------------------- drivers/net/ethernet/sfc/efx.c | 1 - drivers/net/ethernet/sfc/net_driver.h | 2 +- 3 files changed, 151 insertions(+), 213 deletions(-) commit 3af0f34290f6192756ee1d9c2d5fe27222267035 Author: Edward Cree Date: Tue Mar 27 17:41:59 2018 +0100 sfc: replace asynchronous filter operations Instead of having an efx->type->filter_rfs_insert() method, just use workitems with a worker function that calls efx->type->filter_insert(). The only user of this is efx_filter_rfs(), which now queues a call to efx_filter_rfs_work(). Similarly, efx_filter_rfs_expire() is now a worker function called on a new channel->filter_work work_struct, so the method efx->type->filter_rfs_expire_one() is no longer called in atomic context. We also add a new mutex efx->rps_mutex to protect the RPS state (efx-> rps_expire_channel, efx->rps_expire_index, and channel->rps_flow_id) so that the taking of efx->filter_lock can be moved to efx->type->filter_rfs_expire_one(). Thus, all filter table functions are now called in a sleepable context, allowing them to use sleeping locks in a future patch. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 161 +++------------------------------- drivers/net/ethernet/sfc/efx.c | 15 +++- drivers/net/ethernet/sfc/efx.h | 7 +- drivers/net/ethernet/sfc/farch.c | 17 ++-- drivers/net/ethernet/sfc/net_driver.h | 10 +-- drivers/net/ethernet/sfc/nic.h | 2 - drivers/net/ethernet/sfc/rx.c | 119 +++++++++++++++++-------- drivers/net/ethernet/sfc/siena.c | 1 - 8 files changed, 124 insertions(+), 208 deletions(-) commit c709002c23f91d90eb6ee2d4efbb548a8fe3cc80 Merge: cdcfeb0 8518e9b Author: David S. Miller Date: Tue Mar 27 13:18:10 2018 -0400 Merge branch 'pernet-all-async' Kirill Tkhai says: ==================== Make pernet_operations always read locked All the pernet_operations are converted, and the last one is in this patchset (nfsd_net_ops acked by J. Bruce Fields). So, it's the time to kill pernet_operations::async field, and make setup_net() and cleanup_net() always require the rwsem only read locked. All further pernet_operations have to be developed to fit this rule. Some of previous patches added a comment to struct pernet_operations about that. Also, this patchset renames net_sem to pernet_ops_rwsem to make the target area of the rwsem is more clear visible, and adds more comments. ==================== Signed-off-by: David S. Miller commit 8518e9bb98b602eca0717d5aaad63ccbe56539d2 Author: Kirill Tkhai Date: Tue Mar 27 18:02:32 2018 +0300 net: Add more comments This adds comments to different places to improve readability. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller include/net/net_namespace.h | 4 ++++ net/core/net_namespace.c | 2 ++ net/core/rtnetlink.c | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) commit 4420bf21fb6c0306e36ad58ade1e741fba57ce65 Author: Kirill Tkhai Date: Tue Mar 27 18:02:23 2018 +0300 net: Rename net_sem to pernet_ops_rwsem net_sem is some undefined area name, so it will be better to make the area more defined. Rename it to pernet_ops_rwsem for better readability and better intelligibility. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller include/linux/rtnetlink.h | 2 +- include/net/net_namespace.h | 12 +++++++----- net/core/net_namespace.c | 40 ++++++++++++++++++++-------------------- net/core/rtnetlink.c | 4 ++-- 4 files changed, 30 insertions(+), 28 deletions(-) commit 2f635ceeb22ba13c307236d69795fbb29cfa3e7c Author: Kirill Tkhai Date: Tue Mar 27 18:02:13 2018 +0300 net: Drop pernet_operations::async Synchronous pernet_operations are not allowed anymore. All are asynchronous. So, drop the structure member. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller drivers/infiniband/core/cma.c | 1 - drivers/net/bonding/bond_main.c | 1 - drivers/net/geneve.c | 1 - drivers/net/gtp.c | 1 - drivers/net/ipvlan/ipvlan_main.c | 1 - drivers/net/loopback.c | 1 - drivers/net/ppp/ppp_generic.c | 1 - drivers/net/ppp/pppoe.c | 1 - drivers/net/vrf.c | 1 - drivers/net/vxlan.c | 1 - drivers/net/wireless/mac80211_hwsim.c | 1 - fs/lockd/svc.c | 1 - fs/nfs/blocklayout/rpc_pipefs.c | 1 - fs/nfs/dns_resolve.c | 1 - fs/nfs/inode.c | 1 - fs/nfs_common/grace.c | 1 - fs/nfsd/nfsctl.c | 1 - fs/proc/proc_net.c | 1 - include/net/net_namespace.h | 6 ------ kernel/audit.c | 1 - lib/kobject_uevent.c | 1 - net/8021q/vlan.c | 1 - net/bridge/br.c | 1 - net/bridge/br_netfilter_hooks.c | 1 - net/bridge/netfilter/ebtable_broute.c | 1 - net/bridge/netfilter/ebtable_filter.c | 1 - net/bridge/netfilter/ebtable_nat.c | 1 - net/bridge/netfilter/nf_log_bridge.c | 1 - net/caif/caif_dev.c | 1 - net/can/af_can.c | 1 - net/can/bcm.c | 1 - net/can/gw.c | 1 - net/core/dev.c | 2 -- net/core/fib_notifier.c | 1 - net/core/fib_rules.c | 1 - net/core/net-procfs.c | 2 -- net/core/net_namespace.c | 2 -- net/core/pktgen.c | 1 - net/core/rtnetlink.c | 1 - net/core/sock.c | 2 -- net/core/sock_diag.c | 1 - net/core/sysctl_net_core.c | 1 - net/dccp/ipv4.c | 1 - net/dccp/ipv6.c | 1 - net/ieee802154/6lowpan/reassembly.c | 1 - net/ieee802154/core.c | 1 - net/ipv4/af_inet.c | 2 -- net/ipv4/arp.c | 1 - net/ipv4/devinet.c | 1 - net/ipv4/fib_frontend.c | 1 - net/ipv4/fou.c | 1 - net/ipv4/icmp.c | 1 - net/ipv4/igmp.c | 1 - net/ipv4/ip_fragment.c | 1 - net/ipv4/ip_gre.c | 3 --- net/ipv4/ip_vti.c | 1 - net/ipv4/ipip.c | 1 - net/ipv4/ipmr.c | 1 - net/ipv4/netfilter/arp_tables.c | 1 - net/ipv4/netfilter/arptable_filter.c | 1 - net/ipv4/netfilter/ip_tables.c | 1 - net/ipv4/netfilter/ipt_CLUSTERIP.c | 1 - net/ipv4/netfilter/iptable_filter.c | 1 - net/ipv4/netfilter/iptable_mangle.c | 1 - net/ipv4/netfilter/iptable_nat.c | 1 - net/ipv4/netfilter/iptable_raw.c | 1 - net/ipv4/netfilter/iptable_security.c | 1 - net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 1 - net/ipv4/netfilter/nf_defrag_ipv4.c | 1 - net/ipv4/netfilter/nf_log_arp.c | 1 - net/ipv4/netfilter/nf_log_ipv4.c | 1 - net/ipv4/ping.c | 1 - net/ipv4/proc.c | 1 - net/ipv4/raw.c | 1 - net/ipv4/route.c | 4 ---- net/ipv4/sysctl_net_ipv4.c | 1 - net/ipv4/tcp_ipv4.c | 2 -- net/ipv4/tcp_metrics.c | 1 - net/ipv4/udp.c | 2 -- net/ipv4/udplite.c | 1 - net/ipv4/xfrm4_policy.c | 1 - net/ipv6/addrconf.c | 2 -- net/ipv6/addrlabel.c | 1 - net/ipv6/af_inet6.c | 1 - net/ipv6/fib6_rules.c | 1 - net/ipv6/icmp.c | 1 - net/ipv6/ila/ila_xlat.c | 1 - net/ipv6/ip6_fib.c | 1 - net/ipv6/ip6_flowlabel.c | 1 - net/ipv6/ip6_gre.c | 1 - net/ipv6/ip6_tunnel.c | 1 - net/ipv6/ip6_vti.c | 1 - net/ipv6/ip6mr.c | 1 - net/ipv6/mcast.c | 1 - net/ipv6/ndisc.c | 1 - net/ipv6/netfilter/ip6_tables.c | 1 - net/ipv6/netfilter/ip6table_filter.c | 1 - net/ipv6/netfilter/ip6table_mangle.c | 1 - net/ipv6/netfilter/ip6table_nat.c | 1 - net/ipv6/netfilter/ip6table_raw.c | 1 - net/ipv6/netfilter/ip6table_security.c | 1 - net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 1 - net/ipv6/netfilter/nf_conntrack_reasm.c | 1 - net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | 1 - net/ipv6/netfilter/nf_log_ipv6.c | 1 - net/ipv6/ping.c | 1 - net/ipv6/proc.c | 1 - net/ipv6/raw.c | 1 - net/ipv6/reassembly.c | 1 - net/ipv6/route.c | 3 --- net/ipv6/seg6.c | 1 - net/ipv6/sit.c | 1 - net/ipv6/sysctl_net_ipv6.c | 1 - net/ipv6/tcp_ipv6.c | 1 - net/ipv6/udplite.c | 1 - net/ipv6/xfrm6_policy.c | 1 - net/ipv6/xfrm6_tunnel.c | 1 - net/kcm/kcmproc.c | 1 - net/kcm/kcmsock.c | 1 - net/key/af_key.c | 1 - net/l2tp/l2tp_core.c | 1 - net/l2tp/l2tp_ppp.c | 1 - net/mpls/af_mpls.c | 1 - net/netfilter/core.c | 1 - net/netfilter/ipset/ip_set_core.c | 1 - net/netfilter/ipvs/ip_vs_core.c | 2 -- net/netfilter/ipvs/ip_vs_ftp.c | 1 - net/netfilter/ipvs/ip_vs_lblc.c | 1 - net/netfilter/ipvs/ip_vs_lblcr.c | 1 - net/netfilter/nf_conntrack_netlink.c | 1 - net/netfilter/nf_conntrack_proto_gre.c | 1 - net/netfilter/nf_conntrack_standalone.c | 1 - net/netfilter/nf_log.c | 1 - net/netfilter/nf_log_netdev.c | 1 - net/netfilter/nf_synproxy_core.c | 1 - net/netfilter/nf_tables_api.c | 1 - net/netfilter/nfnetlink.c | 1 - net/netfilter/nfnetlink_acct.c | 1 - net/netfilter/nfnetlink_cttimeout.c | 1 - net/netfilter/nfnetlink_log.c | 1 - net/netfilter/nfnetlink_queue.c | 1 - net/netfilter/x_tables.c | 1 - net/netfilter/xt_hashlimit.c | 1 - net/netfilter/xt_recent.c | 1 - net/netlink/af_netlink.c | 2 -- net/netlink/genetlink.c | 1 - net/openvswitch/datapath.c | 1 - net/packet/af_packet.c | 1 - net/phonet/pn_dev.c | 1 - net/rds/tcp.c | 1 - net/rxrpc/net_ns.c | 1 - net/sched/act_api.c | 1 - net/sched/act_bpf.c | 1 - net/sched/act_connmark.c | 1 - net/sched/act_csum.c | 1 - net/sched/act_gact.c | 1 - net/sched/act_ife.c | 1 - net/sched/act_ipt.c | 2 -- net/sched/act_mirred.c | 1 - net/sched/act_nat.c | 1 - net/sched/act_pedit.c | 1 - net/sched/act_police.c | 1 - net/sched/act_sample.c | 1 - net/sched/act_simple.c | 1 - net/sched/act_skbedit.c | 1 - net/sched/act_skbmod.c | 1 - net/sched/act_tunnel_key.c | 1 - net/sched/act_vlan.c | 1 - net/sched/cls_api.c | 1 - net/sched/sch_api.c | 1 - net/sctp/protocol.c | 2 -- net/sunrpc/auth_gss/auth_gss.c | 1 - net/sunrpc/sunrpc_syms.c | 1 - net/sysctl_net.c | 1 - net/tipc/core.c | 1 - net/unix/af_unix.c | 1 - net/wireless/core.c | 1 - net/wireless/wext-core.c | 1 - net/xfrm/xfrm_policy.c | 1 - net/xfrm/xfrm_user.c | 1 - security/selinux/hooks.c | 1 - security/smack/smack_netfilter.c | 1 - 182 files changed, 206 deletions(-) commit 094374e5e173c6639eccf6a2af5e1357a0869848 Author: Kirill Tkhai Date: Tue Mar 27 18:02:01 2018 +0300 net: Reflect all pernet_operations are converted All pernet_operations are reviewed and converted, hooray! Reflect this in core code: setup_net() and cleanup_net() will take down_read() always. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/core/net_namespace.c | 43 ++++++------------------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) commit 67441c2472ddd19f75ef900ac93e71543066f25e Author: Kirill Tkhai Date: Tue Mar 27 18:01:51 2018 +0300 net: Convert nfsd_net_ops These pernet_operations look similar to rpcsec_gss_net_ops, they just create and destroy another caches. So, they also can be async. Signed-off-by: Kirill Tkhai Acked-by: J. Bruce Fields Signed-off-by: David S. Miller fs/nfsd/nfsctl.c | 1 + 1 file changed, 1 insertion(+) commit cdcfeb0fb473e34e012b9a78b5cb377a6ad1434d Author: Yan Markman Date: Tue Mar 27 16:49:05 2018 +0200 net: mvpp2: Use relaxed I/O in data path Use relaxed I/O on the hot path. This achieves significant performance improvements. On a 10G link, this makes a basic iperf TCP test go from an average of 4.5 Gbits/sec to about 9.40 Gbits/sec. Signed-off-by: Yan Markman [Maxime: Commit message, cosmetic changes] Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 43 +++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 13 deletions(-) commit 615b2665fd20c327b631ff1e79426775de748094 Author: Helge Deller Date: Sun Mar 25 23:53:22 2018 +0200 parisc: Fix out of array access in match_pci_device() As found by the ubsan checker, the value of the 'index' variable can be out of range for the bc[] array: UBSAN: Undefined behaviour in arch/parisc/kernel/drivers.c:655:21 index 6 is out of range for type 'char [6]' Backtrace: [<104fa850>] __ubsan_handle_out_of_bounds+0x68/0x80 [<1019d83c>] check_parent+0xc0/0x170 [<1019d91c>] descend_children+0x30/0x6c [<1059e164>] device_for_each_child+0x60/0x98 [<1019cd54>] parse_tree_node+0x40/0x54 [<1019d86c>] check_parent+0xf0/0x170 [<1019d91c>] descend_children+0x30/0x6c [<1059e164>] device_for_each_child+0x60/0x98 [<1019d938>] descend_children+0x4c/0x6c [<1059e164>] device_for_each_child+0x60/0x98 [<1019cd54>] parse_tree_node+0x40/0x54 [<1019cffc>] hwpath_to_device+0xa4/0xc4 Signed-off-by: Helge Deller Cc: stable@vger.kernel.org arch/parisc/kernel/drivers.c | 4 ++++ 1 file changed, 4 insertions(+) commit a77ab0e7ce232a62adac3d85b9ae66d0f48385ac Author: Helge Deller Date: Sun Mar 25 18:52:58 2018 +0200 parisc: Add code generator for Qemu/SeaBIOS machine info Qemu now supports emulating PA-RISC machines. For that a forked version of SeaBIOS available at https://github.com/hdeller/seabios-hppa is used which requires some information about the emulated machine. This patch adds code to generate a header file with the necessary information for SeaBIOS. The information is extracted from the firmware the current kernel is running on. Tested on a B160L workstation. Signed-off-by: Helge Deller arch/parisc/kernel/drivers.c | 171 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) commit b845f66f78bf42a4ce98e5cfe0e94fab41dd0742 Author: Helge Deller Date: Sun Mar 25 14:04:22 2018 +0200 parisc/pci: Switch LBA PCI bus from Hard Fail to Soft Fail mode Carlo Pisani noticed that his C3600 workstation behaved unstable during heavy I/O on the PCI bus with a VIA VT6421 IDE/SATA PCI card. To avoid such instability, this patch switches the LBA PCI bus from Hard Fail mode into Soft Fail mode. In this mode the bus will return -1UL for timed out MMIO transactions, which is exactly how the x86 (and most other architectures) PCI busses behave. This patch is based on a proposal by Grant Grundler and Kyle McMartin 10 years ago: https://www.spinics.net/lists/linux-parisc/msg01027.html Cc: Carlo Pisani Cc: Kyle McMartin Reviewed-by: Grant Grundler Signed-off-by: Helge Deller drivers/parisc/lba_pci.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit d5654e156bc4d68a87bbaa6d7e020baceddf6e68 Author: Helge Deller Date: Sat Mar 24 21:18:25 2018 +0100 parisc: Fix HPMC handler by increasing size to multiple of 16 bytes Make sure that the HPMC (High Priority Machine Check) handler is 16-byte aligned and that it's length in the IVT is a multiple of 16 bytes. Otherwise PDC may decide not to call the HPMC crash handler. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org arch/parisc/kernel/hpmc.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c14b302c44f61dce219e1f4026d3c9248e81fbd2 Author: Helge Deller Date: Sat Mar 24 21:00:14 2018 +0100 parisc: Directly call machine_power_off() in power button driver Signed-off-by: Helge Deller Tested-by: Matt Turner drivers/parisc/power.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 24002d59376e2d19a2a523fe88d5b32e691a43af Author: Helge Deller Date: Sat Mar 24 20:49:39 2018 +0100 parisc: machine_power_off() should call pm_power_off() Signed-off-by: Helge Deller Tested-by: Matt Turner arch/parisc/kernel/process.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2a3f53d5530c02d7bc7c78b11e6a2c24dc767e9c Author: Helge Deller Date: Tue Mar 13 20:56:16 2018 +0100 parisc/Kconfig: SMP kernels boot on all machines I'm not aware of any machines which won't be able to run our SMP kernel. Refine the Kconfig help text. Signed-off-by: Helge Deller arch/parisc/Kconfig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit acc2a51add8efac2c8925eb981792c0f11c88dfb Author: Dan Carpenter Date: Tue Mar 6 13:06:19 2018 +0300 parisc: Silence uninitialized variable warning in dbl_to_sgl_fcnvff() Smatch warns that is_tiny can be used uninitialized: arch/parisc/math-emu/fcnvff.c:297 dbl_to_sgl_fcnvff() error: uninitialized symbol 'is_tiny'. This code is very old so that suggests the bug doesn't have a huge affect in real life. But I've read the code and it seems like a reasonable warning. Either way it should be harmless to initialize it to false and silence the static checker warning. Signed-off-by: Dan Carpenter Signed-off-by: Helge Deller arch/parisc/math-emu/fcnvff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b86db40e1ecc910c73b6bed8368816d9ae378fb6 Author: Helge Deller Date: Sun Mar 4 22:26:11 2018 +0100 parisc: Move various functions and strings to init section Signed-off-by: Helge Deller arch/parisc/kernel/drivers.c | 22 +++++++++++----------- arch/parisc/kernel/hardware.c | 12 ++++++------ 2 files changed, 17 insertions(+), 17 deletions(-) commit d5b59a71204b0a9a55eda633347b1214642bead3 Author: Helge Deller Date: Tue Sep 26 00:21:27 2017 +0200 parisc: Convert MAP_TYPE to cover 4 bits on parisc On parisc we want to be as much as possible compatible to the major architectures like x86. Those architectures have MAP_TYPE defined as 0x0f which covers MAP_SHARED and MAP_PRIVATE and leaves two more bits unused. In contrast, on parisc we have MAP_TYPE defined to 0x03 which covers MAP_SHARED and MAP_PRIVATE only. But we don't have the 2 bits free as x86. Usually that's not a problem, but during the discussions for pmem+dax support the idea came up to use the two remaining bits of MAP_TYPE (on x86 and others) for the new MAP_DIRECT and MAP_SYNC flags. One requirement is, that an old kernel should correctly handle MAP_DIRECT and MAP_SYNC and fail on those if set. This only works if MAP_TYPE has 4 bits. Even though the pmem+dax people now choosed another solution via MAP_SHARED_VALIDATE, let's still proceed to be more compatible to x86 by adding two more bits for future usage. Signed-off-by: Helge Deller Signed-off-by: John David Anglin arch/parisc/include/uapi/asm/mman.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 184b922cb632371aa63a1d0ae5d9d9ea6434552d Author: Helge Deller Date: Sun Mar 4 21:10:09 2018 +0100 parisc: Force to various endian types for sparse Signed-off-by: Helge Deller arch/parisc/include/asm/io.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3a67ca192c2b1c67b6bbe940f4746200eb427fae Author: Helge Deller Date: Sun Mar 4 21:00:39 2018 +0100 parisc/gscps2: Fix sparse warnings Signed-off-by: Helge Deller drivers/input/serio/gscps2.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 2d76978d53afb93de46ae54f722e0e24e9b2a39b Author: Helge Deller Date: Sun Mar 4 20:58:39 2018 +0100 parisc/led: Fix sparse warnings Annotate user buffer and use NULL to avoid sparse warnings. Signed-off-by: Helge Deller drivers/parisc/led.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c92826ef5a23422d36fb3dbe685e9215119eadc7 Author: Helge Deller Date: Sun Mar 4 20:57:30 2018 +0100 parisc/parport_gsc: Use NULL to avoid sparse warning Signed-off-by: Helge Deller drivers/parport/parport_gsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ce7ad780d80d7df119a1985606a7ae9fe6b00ff Author: Helge Deller Date: Sun Mar 4 20:56:22 2018 +0100 parisc/stifb: Use fb_memset() to avoid sparse warning Signed-off-by: Helge Deller drivers/video/fbdev/stifb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aba054a1cd45d87ce473fea6cabbf4b2dc677569 Author: Kunihiko Hayashi Date: Tue Mar 27 19:32:46 2018 +0900 arm64: dts: uniphier: add ethernet node for PXs3 Add nodes of the AVE ethernet controller for PXs3 and the boards. This SoC has two controllers. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada .../arm64/boot/dts/socionext/uniphier-pxs3-ref.dts | 22 +++++++++++++ arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 36 ++++++++++++++++++++++ 2 files changed, 58 insertions(+) commit 9ca6129d007681c54c27a4cf147982a2296fb8cf Author: Kunihiko Hayashi Date: Tue Mar 27 19:32:45 2018 +0900 ARM: dts: uniphier: add pinctrl groups of ethernet for second instance Add pinctrl groups of ethernet, such as "ether1_rgmii" and "ether1_rmii". These are used for second ethernet instance. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-pinctrl.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 109d59b900e78834c66657dd4748fcedb9a1fe8d Author: Thomas Richter Date: Mon Mar 26 10:25:38 2018 +0200 perf vendor events s390: Add JSON files for IBM z14 Add CPU measurement counter facility event description files (json files) for IBM z14. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Cc: Heiko Carstens Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180326082538.2258-5-tmricht@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/s390/cf_z14/basic.json | 50 ++++ tools/perf/pmu-events/arch/s390/cf_z14/crypto.json | 98 +++++++ .../perf/pmu-events/arch/s390/cf_z14/extended.json | 320 +++++++++++++++++++++ tools/perf/pmu-events/arch/s390/mapfile.csv | 1 + 4 files changed, 469 insertions(+) commit bc17f949d6feb633e579ee7e7dd58d9200073215 Author: Thomas Richter Date: Mon Mar 26 10:25:37 2018 +0200 perf vendor events s390: Add JSON files for IBM z13 Add CPU measurement counter facility event description files (json files) for IBM z13. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Cc: Heiko Carstens Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180326082538.2258-4-tmricht@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/s390/cf_z13/basic.json | 74 +++++ tools/perf/pmu-events/arch/s390/cf_z13/crypto.json | 98 ++++++ .../perf/pmu-events/arch/s390/cf_z13/extended.json | 338 +++++++++++++++++++++ tools/perf/pmu-events/arch/s390/mapfile.csv | 1 + 4 files changed, 511 insertions(+) commit 3fb1a23155e91bd00281425041ec2381e435dcc2 Author: Thomas Richter Date: Mon Mar 26 10:25:36 2018 +0200 perf vendor events s390: Add JSON files for IBM zEC12 zBC12 Add CPU measurement counter facility event description files (json files) for IBM zEC12 and zBC12. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Cc: Heiko Carstens Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180326082538.2258-3-tmricht@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/s390/cf_zec12/basic.json | 74 +++++++ .../perf/pmu-events/arch/s390/cf_zec12/crypto.json | 98 ++++++++++ .../pmu-events/arch/s390/cf_zec12/extended.json | 212 +++++++++++++++++++++ tools/perf/pmu-events/arch/s390/mapfile.csv | 1 + 4 files changed, 385 insertions(+) commit 0a73d21e9bdf43124241c3253dadc5044e239647 Author: Thomas Richter Date: Mon Mar 26 10:25:35 2018 +0200 perf vendor events s390: Add JSON files for IBM z196 Add CPU measurement counter facility event description files (json files) for IBM z196. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Cc: Heiko Carstens Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180326082538.2258-2-tmricht@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/s390/cf_z196/basic.json | 74 +++++++++++ .../perf/pmu-events/arch/s390/cf_z196/crypto.json | 98 ++++++++++++++ .../pmu-events/arch/s390/cf_z196/extended.json | 146 +++++++++++++++++++++ tools/perf/pmu-events/arch/s390/mapfile.csv | 1 + 4 files changed, 319 insertions(+) commit cfbb9be8119dec38a2adefeb8fac526dd66a1d16 Author: Thomas Richter Date: Mon Mar 26 10:25:34 2018 +0200 perf vendor events s390: Add JSON files for IBM z10EC z10BC Add CPU measurement counter facility event description files (JSON files) for IBM z10EC and z10BC. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Cc: Heiko Carstens Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180326082538.2258-1-tmricht@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/s390/cf_z10/basic.json | 74 ++++++++++++++ tools/perf/pmu-events/arch/s390/cf_z10/crypto.json | 98 ++++++++++++++++++ .../perf/pmu-events/arch/s390/cf_z10/extended.json | 110 +++++++++++++++++++++ tools/perf/pmu-events/arch/s390/mapfile.csv | 2 + 4 files changed, 284 insertions(+) commit 895e3b06fc2ce438adc62cb13d31ea001dcfda16 Author: Arnaldo Carvalho de Melo Date: Mon Mar 26 11:42:15 2018 -0300 perf mmap: Be consistent when checking for an unmaped ring buffer The previous patch is insufficient to cure the reported 'perf trace' segfault, as it only cures the perf_mmap__read_done() case, moving the segfault to perf_mmap__read_init() functio, fix it by doing the same refcount check. Cc: Adrian Hunter Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Wang Nan Fixes: 8872481bd048 ("perf mmap: Introduce perf_mmap__read_init()") Link: https://lkml.kernel.org/r/20180326144127.GF18897@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/mmap.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit f58385f629c87a9e210108b39c1f4950d0363ad2 Author: Kan Liang Date: Mon Mar 26 09:42:09 2018 -0400 perf mmap: Fix accessing unmapped mmap in perf_mmap__read_done() There is a segmentation fault when running 'perf trace'. For example: [root@jouet e]# perf trace -e *chdir -o /tmp/bla perf report --ignore-vmlinux -i ../perf.data The perf_mmap__consume() could unmap the mmap. It needs to check the refcnt in perf_mmap__read_done(). Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Kan Liang Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: ee023de05f35 ("perf mmap: Introduce perf_mmap__read_done()") Link: http://lkml.kernel.org/r/1522071729-16776-1-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/mmap.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b4c786e5aa69c5a75ac3932f81fdf8e8c120c03b Author: Jiri Olsa Date: Wed Mar 21 15:05:15 2018 +0100 perf build: Fix check-headers.sh opts assignment Currently the "opts" variable is not zero-ed and we keep on adding to it, ending up with: $ check-headers.sh 2>&1 + opts=' "-B"' + opts=' "-B" "-B"' + opts=' "-B" "-B" "-B"' + opts=' "-B" "-B" "-B" "-B"' + opts=' "-B" "-B" "-B" "-B" "-B"' + opts=' "-B" "-B" "-B" "-B" "-B" "-B"' Fix this by initializing it in the check() function, right before starting the loop. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180321140515.2252-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/check-headers.sh | 1 + 1 file changed, 1 insertion(+) commit c6185e285c5c7cfeab739bae7f206ced695f09c7 Author: Helge Deller Date: Tue Mar 27 17:58:32 2018 +0200 ipmi/parisc: Add IPMI chassis poweroff for certain HP PA-RISC and IA-64 servers This patch allows HP PA-RISC servers like rp3410/rp3440 and the HP C8000 workstation with an IPMI controller that predate IPMI 1.5 to use the standard poweroff or powercycle commands. These systems firmware don't set the chassis capability bit in the Get Device ID, but they do implement the standard poweroff and powercycle commands. Signed-off-by: Helge Deller Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_poweroff.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 415eb2a1aaa4881cf85bd86c683356fdd8094a23 Author: Guenter Roeck Date: Mon Mar 26 19:50:31 2018 -0700 hwmon: (nct6775) Fix writing pwmX_mode pwmX_mode is defined in the ABI as 0=DC mode, 1=pwm mode. The chip register bit is set to 1 for DC mode. This got mixed up, and writing 1 into pwmX_mode resulted in DC mode enabled. Fix it up by using the ABI definition throughout the driver for consistency. Fixes: 77eb5b3703d99 ("hwmon: (nct6775) Add support for pwm, pwm_mode, ... ") Signed-off-by: Guenter Roeck drivers/hwmon/nct6775.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 623760257b39632ffc5051fc88167b546dcfa791 Author: Colin Ian King Date: Tue Mar 27 15:30:01 2018 +0100 ALSA: usb-audio: fix memory leak on cval With the current exit return path of the ctl_info allocation failure cval is not being freed resulting in a memory leak. Fix this by kfree'ing it on the return. Detected by CoverityScan, CID#1466878 ("Resource Leak") Fixes: 21e9b3e931f7 ("ALSA: usb-audio: fix uac control query argument") Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/usb/mixer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5f75a1863eb737bc99e3ef3a5fbf9e7207775b97 Merge: 4171ec0 7118617 Author: David S. Miller Date: Tue Mar 27 11:05:23 2018 -0400 Merge tag 'mlx5-updates-2018-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2018-03-22 (Misc updates) This series includes misc updates for mlx5 core and netdev dirver, Highlights: From Inbar, three patches to add support for PFC stall prevention statistics and enable/disable through new ethtool tunable, as requested from previous submission. From Moshe, four patches, added more drop counters: - drop counter for netdev steering miss - drop counter for when VF logical link is down - drop counter for when netdev logical link is down. From Or, three patches to support vlan push/pop offload via tc HW action, for newer HW (Connectx-5 and onward) via HW steering flow actions rather than the emulated path for the older HW brands. And five more misc small trivial patches. ==================== Signed-off-by: David S. Miller commit 4171ec060073e1789cb868f43585983c69ff767b Author: Intiyaz Basha Date: Mon Mar 26 13:40:27 2018 -0700 liquidio: Removed duplicate Tx queue status check Napi is checking Tx queue status and waking the Tx queue if required. Same operation is being done while freeing every Tx buffer. So removed the duplicate operation of checking Tx queue status from the Tx buffer free functions. Signed-off-by: Intiyaz Basha Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 28 --------------------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 29 ---------------------- 2 files changed, 57 deletions(-) commit e32ac25018558f7bcab387708187ab5aa2733cf8 Author: Joe Perches Date: Mon Mar 26 08:35:01 2018 -0700 ipv6: addrconf: Use normal debugging style Remove local ADBG macro and use netdev_dbg/pr_debug Miscellanea: o Remove unnecessary debug message after allocation failure as there already is a dump_stack() on the failure paths o Leave the allocation failure message on snmp6_alloc_dev as there is one code path that does not do a dump_stack() Signed-off-by: Joe Perches Signed-off-by: David S. Miller net/ipv6/addrconf.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) commit cd464197f2378499db134d6c44af3b4e3c0c14b5 Author: Lucas Bates Date: Mon Mar 26 10:46:14 2018 -0400 tc-testing: Correct compound statements for namespace execution If tdc is executing test cases inside a namespace, only the first command in a compound statement will be executed inside the namespace by tdc. As a result, the subsequent commands are not executed inside the namespace and the test will fail. Example: for i in {x..y}; do args="foo"; done && tc actions add $args The namespace execution feature will prepend 'ip netns exec' to the command: ip netns exec tcut for i in {x..y}; do args="foo"; done && \ tc actions add $args So the actual tc command is not parsed by the shell as being part of the namespace execution. Enclosing these compound statements inside a bash invocation with proper escape characters resolves the problem by creating a subshell inside the namespace. Signed-off-by: Lucas Bates Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tc-tests/actions/gact.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e1a22d13eb1f302afd692583777e27828d375a39 Author: Wei Yongjun Date: Mon Mar 26 14:33:13 2018 +0000 tipc: tipc_node_create() can be static Fixes the following sparse warning: net/tipc/node.c:336:18: warning: symbol 'tipc_node_create' was not declared. Should it be static? Signed-off-by: Wei Yongjun Acked-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c76f2481b60a62814f4cb1678e48efa3385895aa Author: Wei Yongjun Date: Mon Mar 26 14:32:44 2018 +0000 tipc: fix error handling in tipc_udp_enable() Release alloced resource before return from the error handling case in tipc_udp_enable(), otherwise will cause memory leak. Fixes: 52dfae5c85a4 ("tipc: obtain node identity from interface by default") Signed-off-by: Wei Yongjun Acked-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/udp_media.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6a91ded32d6c8a6d0aee1928bb741e31577af24f Author: Wei Yongjun Date: Mon Mar 26 14:32:27 2018 +0000 net: aquantia: Make function hw_atl_utils_mpi_set_speed() static Fixes the following sparse warning: drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c:508:5: warning: symbol 'hw_atl_utils_mpi_set_speed' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 776d7c5f69ebae12bde4383bea177c3e16732077 Merge: 8daf1a2 0c6d9b4 Author: David S. Miller Date: Tue Mar 27 10:47:23 2018 -0400 Merge branch 'net-mvpp2-Remove-unnecessary-dynamic-allocs' Maxime Chevallier says: ==================== net: mvpp2: Remove unnecessary dynamic allocs Some utility functions in mvpp2 make use of dynamic alloc to exchange temporary objects representing Parser Entries (which are generic filtering entries in the PPv2 controller). These objects are small (44 bytes each), we can use the stack to exchange them. Some previous discussion on this topic showed that the mvpp2_prs_hw_read, which initializes a struct mvpp2_prs_entry based on one of its fields, can easily lead to erroneous code if we don't zero-out the struct beforehand : https://lkml.org/lkml/2018/3/21/739 To fix this, I propose to rename mvpp2_prs_hw_read into mvpp2_prs_init_from_hw, make it zero-out the struct and take the index as a parameter. That's what's done in the first patch of the series. The second patch is the V3 of ("net: mvpp2: Don't use dynamic allocs for local variables"), making use of mvpp2_prs_init_from_hw and taking previous comments into account. ==================== Signed-off-by: David S. Miller commit 0c6d9b44145d8134ebe4e9ebfa02e0dd23744723 Author: Maxime Chevallier Date: Mon Mar 26 15:34:23 2018 +0200 net: mvpp2: Don't use dynamic allocs for local variables Some helper functions that search for given entries in the TCAM filter on PPv2 controller make use of dynamically alloced temporary variables, allocated with GFP_KERNEL. These functions can be called in atomic context, and dynamic alloc is not really needed in these cases anyways. This commit gets rid of dynamic allocs and use stack allocation in the following functions, and where they're used : - mvpp2_prs_flow_find - mvpp2_prs_vlan_find - mvpp2_prs_double_vlan_find - mvpp2_prs_mac_da_range_find For all these functions, instead of returning an temporary object representing the TCAM entry, we simply return the TCAM id that matches the requested entry. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 286 +++++++++++++++-------------------- 1 file changed, 125 insertions(+), 161 deletions(-) commit 47e0e14eb1a688c0868385e02db263093d2df6db Author: Maxime Chevallier Date: Mon Mar 26 15:34:22 2018 +0200 net: mvpp2: Make mvpp2_prs_hw_read a parser entry init function The mvpp2_prs_hw_read function uses the 'index' field of the struct mvpp2_prs_entry to initialize the rest of the fields. This makes it unclear from a caller's perspective, who needs to manipulate a struct that is not entirely initialized. This commit makes it an init function for prs_entry, by passing it the index as a parameter. The function now zeroes the entry, and sets the index field before doing all other init from HW. The function is renamed 'mvpp2_prs_init_from_hw' to make that clear. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 48 ++++++++++++++---------------------- 1 file changed, 19 insertions(+), 29 deletions(-) commit 8daf1a2d7e40685054ebae680733d822ced6df62 Author: Colin Ian King Date: Mon Mar 26 12:27:12 2018 +0100 net/ncsi: check for null return from call to nla_nest_start The call to nla_nest_start calls nla_put which can lead to a NULL return so it's possible for attr to become NULL and we can potentially get a NULL pointer dereference on attr. Fix this by checking for a NULL return. Detected by CoverityScan, CID#1466125 ("Dereference null return") Fixes: 955dc68cb9b2 ("net/ncsi: Add generic netlink family") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller net/ncsi/ncsi-netlink.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5306653850b444452937834adc5a5ac63bae275e Author: Xin Long Date: Mon Mar 26 16:55:00 2018 +0800 sctp: remove unnecessary asoc in sctp_has_association After Commit dae399d7fdee ("sctp: hold transport instead of assoc when lookup assoc in rx path"), it put transport instead of asoc in sctp_has_association. Variable 'asoc' is not used any more. So this patch is to remove it, while at it, it also changes the return type of sctp_has_association to bool, and does the same for it's caller sctp_endpoint_is_peeled_off. Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller include/net/sctp/structs.h | 8 ++++---- net/sctp/endpointola.c | 8 ++++---- net/sctp/input.c | 13 ++++++------- 3 files changed, 14 insertions(+), 15 deletions(-) commit f6d297df4dd47ef949540e4a201230d0c5308325 Author: Takashi Iwai Date: Tue Mar 27 14:32:23 2018 +0200 ALSA: pcm: Fix mutex unbalance in OSS emulation ioctls The previous fix 40cab6e88cb0 ("ALSA: pcm: Return -EBUSY for OSS ioctls changing busy streams") introduced some mutex unbalance; the check of runtime->oss.rw_ref was inserted in a wrong place after the mutex lock. This patch fixes the inconsistency by rewriting with the helper functions to lock/unlock parameters with the stream check. Fixes: 40cab6e88cb0 ("ALSA: pcm: Return -EBUSY for OSS ioctls changing busy streams") Reported-by: Dan Carpenter Cc: Signed-off-by: Takashi Iwai sound/core/oss/pcm_oss.c | 67 ++++++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 25 deletions(-) commit 77339114bd474b88713cfc18d6a7f3af381863e9 Merge: 2fc2544 eb59e09 Author: Arnd Bergmann Date: Tue Mar 27 16:10:10 2018 +0200 Merge tag 'mvebu-dt-4.17-spdx' of git://git.infradead.org/linux-mvebu into next/dt Pull "mvebu SPDX dt for 4.17: from Gregory CLEMENT: convert to the SPDX-License-Identifier for the Kirkwood and the Armada based device tree files. Compared to the series submitted most of the patch have been squashed: the result is grouped by SoC, boards, type of licenses and the patches that were explicitly acked on the mailing list. * tag 'mvebu-dt-4.17-spdx' of git://git.infradead.org/linux-mvebu: arm: dts: kirkwood*.dts: use SPDX-License-Identifier for board using GPL-2.0+ arm: dts: kirkwood*.dts: use SPDX-License-Identifier for boards using GPL-2.0+/MIT arm: dts: kirkwood*.dts: use SPDX-License-Identifier for boards using GPL-2.0 arm: dts: armada-385-turris-omnia: use SPDX-License-Identifier arm: dts: armada-385-db-ap: use SPDX-License-Identifier arm: dts: armada-388-rd: use SPDX-License-Identifier arm: dts: armada-xp-db-xc3-24g4xg: use SPDX-License-Identifier arm: dts: armada-xp-db-dxbc2: use SPDX-License-Identifier arm: dts: armada-370-db: use SPDX-License-Identifier arm: dts: armada-*.dts: use SPDX-License-Identifier for most of the Armada based board arm: dts: armada-xp-98dx: use SPDX-License-Identifier for prestara 98d SoCs arm: dts: armada-*.dtsi: use SPDX-License-Identifier for most of the Armada SoCs commit 2fc2544e3cc174c63c83b954e010d2c1f6cd3f62 Merge: 610bf41 29e36c1 Author: Arnd Bergmann Date: Tue Mar 27 16:09:13 2018 +0200 Merge tag 'mvebu-dt-4.17-2' of git://git.infradead.org/linux-mvebu into next/dt Pull "mvebu dt for 4.17 (part 2)" from Gregory CLEMENT: - add SFP module support on the clearfog (Armada 388 based board) - disable internal RTC node for Linksys boards (Armada 38x based boards) * tag 'mvebu-dt-4.17-2' of git://git.infradead.org/linux-mvebu: ARM: dts: armada388-clearfog: add SFP module support ARM: dts: armada-385-linksys: Disable internal RTC commit f8d6dc78b8b994cf6903879ab6abf3cb25b76daf Merge: b701b41 7f9badf Author: Arnd Bergmann Date: Tue Mar 27 15:57:19 2018 +0200 Merge tag 'scmi-fixes-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/drivers Pull "ARM SCMI fixes/cleanups for v4.17" from Sudeep Holla: Couple of fixes for build warning due to uninitialised variable and static checker warning for passing NULL pointer to PTR_ERR. It also contains cleanup suggested by Stephen Boyd in SCMI clock driver using the new devm_of_clk_add_hw_provider() API. * tag 'scmi-fixes-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: clk: scmi: use devm_of_clk_add_hw_provider() API and drop scmi_clocks_remove firmware: arm_scmi: prevent accessing rate_discrete uninitialized hwmon: (scmi) return -EINVAL when sensor information is unavailable commit 13d5a30a1e78fb6ce3f1dcddf8c14bd0a81b3bb3 Merge: 34fd03b d9314c47 Author: David S. Miller Date: Tue Mar 27 09:56:13 2018 -0400 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2018-03-26 This series contains updates to i40e only. Jake provides several patches which remove the need for cmpxchg64(), starting with moving I40E_FLAG_[UDP]_FILTER_SYNC from pf->flags to pf->state since they are modified during run time possibly when the RTNL lock is not held so they should be a state bits and not flags. Moved additional "flags" which should be state fields, into pf->state. Ensure we hold the RTNL lock for the entire sequence of preparing for reset and when resuming, which will protect the flags related to interrupt scheme under RTNL lock so that their modification is properly threaded. Finally, cleanup the use of cmpxchg64() since it is no longer needed. Cleaned up the holes in the feature flags created my moving some flags to the state field. Björn Töpel adds XDP_REDIRECT support as well as tweaking the page counting for XDP_REDIRECT so that it will function properly. ==================== Signed-off-by: David S. Miller commit b701b41bb4f6304e95fffb1c2b2f0bb9158a2245 Merge: 3262b82 90c29ed Author: Arnd Bergmann Date: Tue Mar 27 15:56:11 2018 +0200 Merge tag 'qcom-drivers-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/drivers Pull "Qualcomm ARM Based Driver Updates for v4.17" from Andy Gross: * Fix NV upload increment in wcnss_ctrl * Add support in rmtfs-mem driver for assigning memory * tag 'qcom-drivers-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/agross/linux: soc: qcom: wcnss_ctrl: Fix increment in NV upload soc: qcom: rmtfs-mem: Add support for assigning memory to remote commit dafd6c496381c1cd1f5ba9ad953e810bdcc931bc Author: Colin Ian King Date: Tue Mar 27 14:26:01 2018 +0100 libata: ensure host is free'd on error exit paths The host structure is not being kfree'd on two error exit paths leading to memory leaks. Add in new err_free label and kfree host. Detected by CoverityScan, CID#1466103 ("Resource leak") Fixes: 2623c7a5f279 ("libata: add refcounting to ata_host") Signed-off-by: Colin Ian King Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3262b82d0ce66ca9af08ef2cdabc6ce418ebca28 Merge: 03836dd f842c41 Author: Arnd Bergmann Date: Tue Mar 27 15:54:23 2018 +0200 Merge tag 'amlogic-drivers' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/drivers Pull "Amlogic driver updates for v4.17" from Kevin Hilman: - socinfo: add more IDs for newer SoC detection - firmware: update init to use module_platform_driver_probe - soc: mix. VPU power controller fixes * tag 'amlogic-drivers' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: amlogic: meson-gx-socinfo: Update soc ids firmware: meson-sm: rework meson_sm_init to use module_platform_driver_probe meson-gx-socinfo: make local function meson_gx_socinfo_init static meson-mx-socinfo: Make local function meson_mx_socinfo_init() static soc: amlogic: meson-gx-pwrc-vpu: fix error on shutdown when domain is powered off soc: amlogic: meson-gx-pwrc-vpu: don't print error message on probe deferral commit 03836dd07f43a17b3681d3fc75ea40833fda49b6 Merge: 498b565 9f99712 Author: Arnd Bergmann Date: Tue Mar 27 15:53:04 2018 +0200 Merge tag 'v4.16-next-soc' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into next/drivers Pull "ARM: mediatek: updates for soc drivers for v4.16-next" from Matthias Brugger: scpsy: - mt2712: update power domains to reflect design changes in the SoC - fix initialisation of power subdomains - add support for mt7623a SoC - use defines for mt2701 bus protection mask * tag 'v4.16-next-soc' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: soc: mediatek: update power domain data of MT2712 dt-bindings: soc: update MT2712 power dt-bindings soc: mediatek: fix the mistaken pointer accessed when subdomains are added soc: mediatek: add SCPSYS power domain driver for MediaTek MT7623A SoC soc: mediatek: avoid hardcoded value with bus_prot_mask dt-bindings: soc: add header files required for MT7623A SCPSYS dt-binding dt-bindings: soc: add SCPSYS binding for MT7623 and MT7623A SoC commit 498b5651542d391dc5fa2e5c63ad2a2bbd144cc2 Merge: d099446 4c817cc Author: Arnd Bergmann Date: Tue Mar 27 15:51:58 2018 +0200 Merge tag 'tegra-for-4.17-soc-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers Pull "soc/tegra: Changes for v4.17-rc1" from Thierry Reding: This contains more Tegra194 support as well as an implementation for the MBIST workaround needed to avoid some memory-related issues on Tegra210. * tag 'tegra-for-4.17-soc-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: pmc: Use the new reset APIs to manage reset controllers soc/tegra: pmc: Pass PMC to tegra_powergate_power_up() soc/tegra: pmc: MBIST work around for Tegra210 soc/tegra: pmc: Add Tegra194 compatibility string soc/tegra: Add Tegra194 SoC configuration option commit 348f3cde84ab5b1f53cd3c0eaac1ca99a4dcb148 Author: Baolin Wang Date: Mon Mar 5 10:56:52 2018 +0800 gpio: Add Spreadtrum PMIC EIC driver support The Spreadtrum PMIC EIC controller contains only one bank of debounce EIC, and this bank contains 16 EICs. Each EIC can only be used as input mode, as well as supporting the debounce and the capability to trigger interrupts when detecting input signals. Signed-off-by: Baolin Wang Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 8 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-pmic-eic-sprd.c | 330 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 339 insertions(+) commit 25518e024e3a6e5715d672f1daa91e1d100f7436 Author: Baolin Wang Date: Mon Mar 5 10:56:51 2018 +0800 gpio: Add Spreadtrum EIC driver support The Spreadtrum digital-chip EIC controller has 4 sub-modules: debounce EIC, latch EIC, async EIC and sync EIC, and each sub-module can has multiple banks and each bank contains 8 EICs. Each EIC can only be used as input mode, and has the capability to trigger interrupts when detecting input signals. Signed-off-by: Baolin Wang Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 8 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-eic-sprd.c | 606 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 615 insertions(+) commit be520cbc8513ea796c00825e8189d98d67ead33f Author: Baolin Wang Date: Mon Mar 5 10:56:50 2018 +0800 dt-bindings: gpio: Add Spreadtrum EIC controller documentation This patch adds the device tree bindings for the Spreadtrum EIC controller. The EIC can be seen as a special type of GPIO, which can only be used as input mode. Signed-off-by: Baolin Wang Reviewed-by: Rob Herring Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/gpio-eic-sprd.txt | 97 ++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit d0994465d0eaeab1627697d88eccfa32bbd39714 Merge: 3bea9c5 1320f76 Author: Arnd Bergmann Date: Tue Mar 27 15:50:57 2018 +0200 Merge tag 'tegra-for-4.17-firmware' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers Pull "firmware: Changes for v4.17-rc1" from Thierry Reding: These changes are rather small, with just a fix for a return value check and some preparatory work for Tegra194 BPMP support. * tag 'tegra-for-4.17-firmware' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: adjust tested variable firmware: tegra: Simplify channel management commit 064fe81ef23d72854e7f17fd58a945e4fd0d0f3f Merge: 9302849 5aa6d80 Author: Arnd Bergmann Date: Tue Mar 27 15:48:52 2018 +0200 Merge tag 'omap-for-v4.17/soc-pt2-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc Pull "Two omap5 specific aux control module patches for v4.17" from Tony Lindgren: On omap5 there is an aux control module that we are not handling currently for clocks, so let's add support for it. * tag 'omap-for-v4.17/soc-pt2-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP5: control: add support for control module wkup pad config ARM: omap2+: control: add support for auxiliary control module instances commit 930284942694bcb10a41c017d87e04aafbe2626e Merge: 59162c9 ae35c48 Author: Arnd Bergmann Date: Tue Mar 27 15:47:58 2018 +0200 Merge tag 'samsung-soc-4.17-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/soc Pull "Samsung mach/soc changes for v4.17, part two" from Krzysztof Kozłowski: 1. Fix coupled CPU idle freeze on Exynos4210. 2. Simplify hot-path in coupled CPU idle. * tag 'samsung-soc-4.17-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: EXYNOS: Simplify code in coupled CPU idle hot path ARM: EXYNOS: Fix coupled CPU idle freeze on Exynos4210 commit 59162c936692ff064c12676e708c8ef82a82436d Merge: 8650b9f 01d675f Author: Arnd Bergmann Date: Tue Mar 27 15:45:03 2018 +0200 Merge tag 'renesas-soc-for-v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Pull "Renesas ARM Based SoC Updates for v4.17" from Simon Horman: 01d675f159e0 ARM: shmobile: rcar-gen2: Add watchdog support 58adf1ba0d22 ARM: shmobile: Add watchdog support * SoC - Identify R-Car V3H (r8a77980) and M3N (r8a77965) - Enable R-Car Gen2 regulator quirk for Stout board with H3 (r8a7790) SoC Marek Vaust says "Regulator setup is suboptimal on H2 Stout too. The Stout newly has two DA9210 regulators, so the quirk is extended to handle another DA9210 at i2c address 0x70." - Add watchdog support This is the SoC portion of the following solution. It is not yet enabled in DT as it is not functional without clock dependencies in place. Fabrizio Castro says "this series has been around for some time as RFC, and it has collected useful comments from the community along the way. The solution proposed by this patch set works for most R-Car Gen2 and RZ/G1 devices, but not all of them. We now know that for some R-Car Gen2 early revisions there is no proper software fix. Anyway, no product has been built around early revisions, but development boards mounting early revisions (basically prototypes) are still out there. As a result, this series isn't enabling the internal watchdog on R-Car Gen2 boards, developers may enable it in board specific device trees if needed. This series has been tested by me on the iwg20d, iwg22d, Lager, Alt, and Koelsch boards. The problem =========== To deal with SMP on R-Car Gen2 and RZ/G1, we install a reset vector to ICRAM1 and we program the [S]BAR registers so that when we turn ON the non-boot CPUs they are redirected to the reset vector installed by Linux in ICRAM1, and eventually they continue the execution to RAM, where the SMP bring-up code will take care of the rest. The content of the [S]BAR registers survives a watchdog triggered reset, and as such after the watchdog fires the boot core will try and execute the SMP bring-up code instead of jumping to the bootrom code. The fix ======= The main strategy for the solution is to let the reset vector decide if it needs to jump to shmobile_boot_fn or to the bootrom code. In a watchdog triggered reset scenario, since the [S]BAR registers keep their values, the boot CPU will jump into the newly designed reset vector, the assembly routine will eventually test WOVF (a bit in register RWTCSRA that indicates if the watchdog counter has overflown, the value of this bit gets retained in this scenario), and jump to the bootrom code which will in turn load up the bootloader, etc. When bringing up SMP or using CPU hotplug, the reset vector will jump to shmobile_boot_fn instead." * R-Car Rst - Add support for R-Car V3H (r8a77980) and V3H (r8a77980) * R-Car SYSC - Mark rcar_sysc_matches[] __initconst Geert Uytterhoeven says "This frees another 1764 bytes (arm32/shmobile_defconfig) or 1000 bytes (arm64/renesas_defconfig) of memory after kernel init." - Fix power area parents Sergei Shtylyov says "According to the figure 9.2(b) of the R-Car Series, 3rd Generation User’s Manual: Hardware Rev. 0.80 the A2IRn and A2SCn power areas in R8A77970 have the A3IR area as a parent, thus the SYSC driver has those parents wrong.." - Add support for R-Car V3H (r8a77980) and V3H (r8a77980) * tag 'renesas-soc-for-v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: rcar-gen2: Add watchdog support ARM: shmobile: Add watchdog support ARM: shmobile: rcar-gen2: Fix error check in regulator quirk soc: renesas: rcar-rst: Add support for R-Car M3-N ARM: shmobile: stout: enable R-Car Gen2 regulator quirk soc: renesas: rcar-sysc: Add R-Car M3-N support soc: renesas: Identify R-Car M3-N soc: renesas: rcar-sysc: add R8A77980 support dt-bindings: power: add R8A77980 SYSC power domain definitions soc: renesas: r8a77970-sysc: fix power area parents soc: renesas: rcar-rst: Enable watchdog as reset trigger for Gen2 soc: renesas: rcar-rst: add R8A77980 support soc: renesas: identify R-Car V3H soc: renesas: rcar-sysc: Mark rcar_sysc_matches[] __initconst commit eb59e09203312de2112b63e0f4c4b4278e4daab9 Author: Gregory CLEMENT Date: Thu Mar 15 17:06:28 2018 +0100 arm: dts: kirkwood*.dts: use SPDX-License-Identifier for board using GPL-2.0+ Follow the recent trend for the license description Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-b3.dts | 5 +---- arch/arm/boot/dts/kirkwood-blackarmor-nas220.dts | 3 +-- arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 6 +----- arch/arm/boot/dts/kirkwood-netgear_readynas_nv+_v2.dts | 6 +----- arch/arm/boot/dts/kirkwood-nsa320.dts | 5 +---- arch/arm/boot/dts/kirkwood-nsa325.dts | 5 +---- arch/arm/boot/dts/kirkwood-ts419-6281.dts | 6 +----- arch/arm/boot/dts/kirkwood-ts419-6282.dts | 6 +----- arch/arm/boot/dts/kirkwood-ts419.dtsi | 6 +----- 9 files changed, 9 insertions(+), 39 deletions(-) commit b3820aa10c1bc9ee99cbec46cccb7cb0d8e112f7 Author: Gregory CLEMENT Date: Thu Mar 15 16:48:27 2018 +0100 arm: dts: kirkwood*.dts: use SPDX-License-Identifier for boards using GPL-2.0+/MIT Follow the recent trend for the license description, and also fix the wrongly stated X11 to MIT. As already pointed on the DT ML, the X11 license text [1] is explicitly for the X Consortium and has a couple of extra clauses. The MIT license text [2] is actually what the current DT files claim. [1] https://spdx.org/licenses/X11.html [2] https://spdx.org/licenses/MIT.html Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-linkstation-6282.dtsi | 39 +--------------------- .../boot/dts/kirkwood-linkstation-duo-6281.dtsi | 39 +--------------------- arch/arm/boot/dts/kirkwood-linkstation-lsqvl.dts | 39 +--------------------- arch/arm/boot/dts/kirkwood-linkstation-lsvl.dts | 39 +--------------------- arch/arm/boot/dts/kirkwood-linkstation-lswsxl.dts | 39 +--------------------- arch/arm/boot/dts/kirkwood-linkstation-lswvl.dts | 39 +--------------------- arch/arm/boot/dts/kirkwood-linkstation-lswxl.dts | 39 +--------------------- arch/arm/boot/dts/kirkwood-linkstation.dtsi | 39 +--------------------- 8 files changed, 8 insertions(+), 304 deletions(-) commit f79b55d9b9e06547a9b9fad0d6948e1ce8d00865 Author: Wei Yongjun Date: Sun Mar 25 00:40:48 2018 +0100 gpio: ath79: Fix potential NULL dereference in ath79_gpio_probe() platform_get_resource() may return NULL, add proper check to avoid potential NULL dereferencing. This is detected by Coccinelle semantic patch. @@ expression pdev, res, n, t, e, e1, e2; @@ res = platform_get_resource(pdev, t, n); + if (!res) + return -EINVAL; ... when != res == NULL e = devm_ioremap(e1, res->start, e2); Signed-off-by: Wei Yongjun [albeu@free.fr: Fixed patch to apply on current tree] Signed-off-by: Alban Bedel Signed-off-by: Linus Walleij drivers/gpio/gpio-ath79.c | 2 ++ 1 file changed, 2 insertions(+) commit e7822263a7a596fbc9120df02c1c56693a306a74 Author: Gregory CLEMENT Date: Thu Mar 15 16:57:25 2018 +0100 arm: dts: kirkwood*.dts: use SPDX-License-Identifier for boards using GPL-2.0 Follow the recent trend for the license description Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-d2net.dts | 4 +--- arch/arm/boot/dts/kirkwood-db-88f6281.dts | 4 +--- arch/arm/boot/dts/kirkwood-db-88f6282.dts | 4 +--- arch/arm/boot/dts/kirkwood-db.dtsi | 5 +---- arch/arm/boot/dts/kirkwood-dir665.dts | 4 +--- arch/arm/boot/dts/kirkwood-ds109.dts | 4 +--- arch/arm/boot/dts/kirkwood-ds110jv10.dts | 4 +--- arch/arm/boot/dts/kirkwood-ds111.dts | 4 +--- arch/arm/boot/dts/kirkwood-ds112.dts | 4 +--- arch/arm/boot/dts/kirkwood-ds209.dts | 4 +--- arch/arm/boot/dts/kirkwood-ds210.dts | 4 +--- arch/arm/boot/dts/kirkwood-ds212.dts | 4 +--- arch/arm/boot/dts/kirkwood-ds212j.dts | 4 +--- arch/arm/boot/dts/kirkwood-ds409.dts | 4 +--- arch/arm/boot/dts/kirkwood-ds409slim.dts | 4 +--- arch/arm/boot/dts/kirkwood-ds411.dts | 4 +--- arch/arm/boot/dts/kirkwood-ds411j.dts | 4 +--- arch/arm/boot/dts/kirkwood-ds411slim.dts | 4 +--- arch/arm/boot/dts/kirkwood-laplug.dts | 4 +--- arch/arm/boot/dts/kirkwood-linksys-viper.dts | 4 +--- arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts | 5 +---- arch/arm/boot/dts/kirkwood-nas2big.dts | 4 +--- arch/arm/boot/dts/kirkwood-net2big.dts | 4 +--- arch/arm/boot/dts/kirkwood-net5big.dts | 4 +--- arch/arm/boot/dts/kirkwood-netxbig.dtsi | 4 +--- arch/arm/boot/dts/kirkwood-openblocks_a7.dts | 4 +--- arch/arm/boot/dts/kirkwood-openrd-base.dts | 5 +---- arch/arm/boot/dts/kirkwood-openrd-client.dts | 5 +---- arch/arm/boot/dts/kirkwood-openrd-ultimate.dts | 5 +---- arch/arm/boot/dts/kirkwood-openrd.dtsi | 5 +---- arch/arm/boot/dts/kirkwood-pogo_e02.dts | 4 +--- arch/arm/boot/dts/kirkwood-rd88f6192.dts | 5 +---- arch/arm/boot/dts/kirkwood-rd88f6281-a.dts | 5 +---- arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts | 5 +---- arch/arm/boot/dts/kirkwood-rd88f6281.dtsi | 5 +---- arch/arm/boot/dts/kirkwood-rs212.dts | 4 +--- arch/arm/boot/dts/kirkwood-rs409.dts | 4 +--- arch/arm/boot/dts/kirkwood-rs411.dts | 4 +--- arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi | 3 +-- arch/arm/boot/dts/kirkwood-sheevaplug-esata.dts | 3 +-- arch/arm/boot/dts/kirkwood-sheevaplug.dts | 3 +-- arch/arm/boot/dts/kirkwood-synology.dtsi | 4 +--- arch/arm/boot/dts/kirkwood-t5325.dts | 4 +--- 43 files changed, 43 insertions(+), 136 deletions(-) commit 8650b9feb0d8e7e9cc79ca118e1bb606188de899 Merge: 63fdfbf 99e3a1e6 Author: Arnd Bergmann Date: Tue Mar 27 15:42:18 2018 +0200 Merge tag 'sunxi-core-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/soc Pull "Allwinner core changes for 4.17" from Maxime Ripard: Here is our bunch of changes for mach-sunxi for this release cycle. This is basically only about bringing the SMP support to the A80, which has a bug in hardware and cannot use PSCI like the other SoCs we have. * tag 'sunxi-core-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: sunxi: mc-smp: Split out SoC-specific device node lookup sequence ARM: sunxi: mc-smp: Use DT enable-method for sun9i A80 SMP ARM: sunxi: mc-smp: Fix "lookback" typo ARM: sun9i: smp: Support cpu0 hotplug dt-bindings: ARM: sunxi: Document A80 SoC secure SRAM usage by SMP hotplug ARM: sun9i: smp: Support CPU/cluster power down and hotplugging for cpu1~7 ARM: sun9i: Support SMP bring-up on A80 commit 63fdfbf5a76e175ad0476c8fed9db98fe9758b88 Author: Stefan Agner Date: Sun Mar 18 21:34:41 2018 +0100 ARM: multi_v7_defconfig: add NXP FlexCAN IP support Enable FlexCAN support as module by default. FlexCAN can be found on various NXP designs such as the i.MX and Vybrid SoC family. Signed-off-by: Stefan Agner Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 76b5bce4bb5ea9e57c465cc7c67b1b632518772d Author: Stefan Agner Date: Sun Mar 18 21:34:37 2018 +0100 ARM: multi_v7_defconfig: enable thermal driver for i.MX devices Enable the i.MX thermal driver required for i.MX SoC family. Signed-off-by: Stefan Agner Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit efec24d8b16746a9a2e0e6513e7fdd0abdbe6074 Author: Stefan Agner Date: Sun Mar 18 21:34:39 2018 +0100 ARM: multi_v7_defconfig: add RN5T618 PMIC family support This allows to successfully boot Colibri iMX7 which is using the Ricoh RN5T567 PMIC. Signed-off-by: Stefan Agner Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 18c9f1225565a151fa65f4b6f77d9a2bfd4545f6 Author: Stefan Agner Date: Sun Mar 18 21:34:42 2018 +0100 ARM: multi_v7_defconfig: add NXP graphics drivers Enable drivers to support NXP graphics IPs such as: - Etnaviv (e.g. i.MX6) - DCU (e.g. Vybrid LS1021A) - mxsfb (e.g. i.MX6UL/ULL/7) Signed-off-by: Stefan Agner Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 1f9b3e66502a368dc2bea2686bb6da45c2ed7ce9 Author: Stefan Agner Date: Sun Mar 18 21:34:40 2018 +0100 ARM: multi_v7_defconfig: add GPMI NAND controller support Add GPMI NAND controller support as required by some NXP i.MX6/7 based boards. Signed-off-by: Stefan Agner Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 0027736351a352cb7ce5ea866c5c6d3d9cbe1fe8 Author: Stefan Agner Date: Sun Mar 18 21:34:36 2018 +0100 ARM: multi_v7_defconfig: add OCOTP driver for NXP SoCs Enable on-chip OTP NVMEM support for NXP i.MX and VF610 SoCs. Since OTP values might be required by drivers required during boot, make sure the driver is built-in (e.g. i.MX thermal driver). Signed-off-by: Stefan Agner Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 89b0b4e2d3686dfc499c018922028791b954d7d9 Merge: 6cb9215 691bf5d Author: Linus Walleij Date: Tue Mar 27 15:34:40 2018 +0200 Merge branch 'gpio-reserved-ranges' into devel commit 691bf5d5a7bfedc60b7218f4d9b915bf356df767 Author: Stephen Boyd Date: Fri Mar 23 09:34:53 2018 -0700 pinctrl: qcom: Don't allow protected pins to be requested Some qcom platforms make some GPIOs or pins unavailable for use by non-secure operating systems, and thus reading or writing the registers for those pins will cause access control issues and reset the device. With a DT/ACPI property to describe the set of pins that are available for use, parse the available pins and set the irq valid bits for gpiolib to know what to consider 'valid'. This should avoid any issues with gpiolib. Furthermore, implement the pinmux_ops::request function so that pinmux can also make sure to not use pins that are unavailable. Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd Tested-by: Timur Tabi Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-msm.c | 65 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 3 deletions(-) commit e6a49623a212b3921defbfec8f82dafe6445e96d Author: Stefan Agner Date: Sun Mar 18 21:34:38 2018 +0100 ARM: multi_v7_defconfig: configure I2C driver built-in PMIC often require the I2C bus, and the PMIC regulators might be necessary to power on eMMC/SD-card or other supplies required for successful boot. Make sure I2C driver for i.MX devices is built-in. Signed-off-by: Stefan Agner Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 726cb3ba49692bdae6caff457755e7cdb432efa4 Author: Stephen Boyd Date: Fri Mar 23 09:34:52 2018 -0700 gpiolib: Support 'gpio-reserved-ranges' property Some qcom platforms make some GPIOs or pins unavailable for use by non-secure operating systems, and thus reading or writing the registers for those pins will cause access control issues. Add support for a DT property to describe the set of GPIOs that are available for use so that higher level OSes are able to know what pins to avoid reading/writing. Non-DT platforms can add support by directly updating the chip->valid_mask. Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd Tested-by: Timur Tabi Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpiolib-of.c | 24 +++++++++++++++++++++++ drivers/gpio/gpiolib.c | 46 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/gpio/driver.h | 16 ++++++++++++++++ 3 files changed, 86 insertions(+) commit ace56935ff48879239d79129c7882ea2ff1b4804 Author: Stephen Boyd Date: Fri Mar 23 09:34:51 2018 -0700 gpiolib: Change bitmap allocation to kmalloc_array We don't need to clear out these bits when we set them immediately after. Use kmalloc_array() to skip clearing the bits. Suggested-by: Andy Shevchenko Signed-off-by: Stephen Boyd Tested-by: Timur Tabi Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4371f6e079294369ecb4cfa03aaeb60831e8b91 Author: Stephen Boyd Date: Fri Mar 23 09:34:50 2018 -0700 gpiolib: Extract mask allocation into subroutine We're going to use similar code to allocate and set all the bits in a mask for valid gpios to use. Extract the code from the irqchip version so it can be reused. Signed-off-by: Stephen Boyd Tested-by: Timur Tabi Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit b9c725ed73b7cecc7c9bc4b752ab3eb975ef9330 Author: Stephen Boyd Date: Fri Mar 23 09:34:49 2018 -0700 dt-bindings: gpio: Add a gpio-reserved-ranges property Some qcom platforms make some GPIOs or pins unavailable for use by non-secure operating systems, and thus reading or writing the registers for those pins will cause access control issues. Introduce a DT property to describe the set of GPIOs that are available for use so that higher level OSes are able to know what pins to avoid reading/writing. Cc: Grant Likely Cc: Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd Reviewed-by: Rob Herring Tested-by: Timur Tabi Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/gpio.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d28db34a561ade68d30acc3d66d3cd8d9f26bcc9 Author: Kunihiko Hayashi Date: Tue Mar 27 21:23:27 2018 +0900 arm64: defconfig: add CONFIG_UNIPHIER_THERMAL and CONFIG_SNI_AVE Enable the thermal monitor driver and the AVE ethernet driver implemented on UniPhier SoCs. Signed-off-by: Kunihiko Hayashi Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 99600b165f7c68f329610ec1184e43fb1a67ad9a Merge: 34dacef 83d6e27 Author: Arnd Bergmann Date: Tue Mar 27 15:29:06 2018 +0200 Merge tag 'stratix10_defconfig_for_v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/soc Pull "ARM64: stratix10: defconfig updates for 4.17" from Dinh Nguyen: -enables STMMAC_ETH controller that is present on Stratix10 * tag 'stratix10_defconfig_for_v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: defconfig: enable stmmac ethernet to defconfig Signed-off-by: Arnd Bergmann commit 34dacef1c3299cd3588301e9515c11ae90147698 Merge: b899e52 372bed6 Author: Arnd Bergmann Date: Tue Mar 27 15:27:23 2018 +0200 Merge tag 'omap-for-v4.17/defconfig-pt2-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc Pull "Second set of defconfig changes for omap variants for v4.17" from Tony Lindgren: This series enables more devices working on droid4 to make it easier for people and distros to use out of the box. * tag 'omap-for-v4.17/defconfig-pt2-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: multi_v7_defconfig: Enable CPCAP related options mostly as loadable modules ARM: omap2plus_defconfig: Add UINPUT ARM: omap2plus_defconfig: Enable MDM6600 USB PHY ARM: omap2plus_defconfig: Add AUDIO_GRAPH_CARD ARM: omap2plus_defconfig: Enable PWM_VIBRA commit b899e522612d2a82bbb5d2a557c77ba4dcb0fbaf Merge: fa00c44 c1da37a Author: Arnd Bergmann Date: Tue Mar 27 15:26:32 2018 +0200 Merge tag 'qcom-arm64-defconfig-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/soc Pull "Qualcomm ARM64 Based defconfig Updates for v4.17" from Andy Gross: * Enable cpufreq governors, QCOM TSENS, and QCOM APCS driver * tag 'qcom-arm64-defconfig-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: defconfig: enable more cpufreq governors arm64: defconfig: enable thermal sensor on QCOM platforms arm64: defconfig: Enable the APCS IPC driver on Qualcomm platforms Signed-off-by: Arnd Bergmann commit fa00c449b732e4ecf836a52bdd227cce9a546753 Merge: 8d361e4 59ff3af Author: Arnd Bergmann Date: Tue Mar 27 15:24:47 2018 +0200 Merge tag 'armsoc-versatile-drm-defconfig' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/soc Pull "defconfig changes for Versatile DRM" from Linus Walleij: This augments the RealView and Versatile defconfig to use the PL111 DRM driver rather than the old fbdev driver. * tag 'armsoc-versatile-drm-defconfig' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: defconfig: Configure Versatile boards to use PL111 DRM ARM: defconfig: Update Versatile defconfig ARM: defconfig: Switch RealView boards to use P111 DRM ARM: defconfig: Update RealView defconfig commit 8d361e40180c534da2d788a1334e18c80021a8d5 Merge: 8045f29 266c157 Author: Arnd Bergmann Date: Tue Mar 27 15:22:43 2018 +0200 Merge tag 'amlogic-defconfig' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/soc Pull "Amlogic defconfig fixes for v4.17" from Kevin Hilman * tag 'amlogic-defconfig' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: defconfig: enable MESON EFUSE commit 0fdd2cd6741f470e32753b010b0329f973a9d983 Author: Gregory CLEMENT Date: Thu Mar 15 15:21:38 2018 +0100 arm: dts: armada-385-turris-omnia: use SPDX-License-Identifier Follow the recent trend for the license description, and also fix the wrongly stated X11 to MIT. As already pointed on the DT ML, the X11 license text [1] is explicitly for the X Consortium and has a couple of extra clauses. The MIT license text [2] is actually what the current DT files claim. [1] https://spdx.org/licenses/X11.html [2] https://spdx.org/licenses/MIT.html Cc: Uwe Kleine-König Acked-by: Uwe Kleine-König Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-turris-omnia.dts | 35 +-------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) commit 696241a4ae3ca7999206426e73c435f8b6c7feef Author: Gregory CLEMENT Date: Thu Mar 15 15:21:25 2018 +0100 arm: dts: armada-385-db-ap: use SPDX-License-Identifier Follow the recent trend for the license description, and also fix the wrongly stated X11 to MIT. As already pointed on the DT ML, the X11 license text [1] is explicitly for the X Consortium and has a couple of extra clauses. The MIT license text [2] is actually what the current DT files claim. [1] https://spdx.org/licenses/X11.html [2] https://spdx.org/licenses/MIT.html Cc: Maxime Ripard Acked-by: Maxime Ripard Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-db-ap.dts | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) commit 681ca8a8d1698e48609627fb079f8e29c0d00a19 Author: Gregory CLEMENT Date: Thu Mar 15 12:04:08 2018 +0100 arm: dts: armada-388-rd: use SPDX-License-Identifier Follow the recent trend for the license description, and also fix the wrongly stated X11 to MIT. As already pointed on the DT ML, the X11 license text [1] is explicitly for the X Consortium and has a couple of extra clauses. The MIT license text [2] is actually what the current DT files claim. [1] https://spdx.org/licenses/X11.html [2] https://spdx.org/licenses/MIT.html Cc: Gregory CLEMENT Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-rd.dts | 39 +------------------------------------ 1 file changed, 1 insertion(+), 38 deletions(-) commit 34456c7acd1df9c8862a5a049797b89d413aef4e Author: Gregory CLEMENT Date: Thu Mar 15 12:04:17 2018 +0100 arm: dts: armada-xp-db-xc3-24g4xg: use SPDX-License-Identifier Follow the recent trend for the license description, and also fix the wrongly stated X11 to MIT. As already pointed on the DT ML, the X11 license text [1] is explicitly for the X Consortium and has a couple of extra clauses. The MIT license text [2] is actually what the current DT files claim. [1] https://spdx.org/licenses/X11.html [2] https://spdx.org/licenses/MIT.html Cc: Chris Packham Acked-by: Chris Packham Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts | 39 +-------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) commit 45d33aa5d7cf27ff95bee7021e11bb3bc228848c Author: Gregory CLEMENT Date: Thu Mar 15 12:04:15 2018 +0100 arm: dts: armada-xp-db-dxbc2: use SPDX-License-Identifier Follow the recent trend for the license description, and also fix the wrongly stated X11 to MIT. As already pointed on the DT ML, the X11 license text [1] is explicitly for the X Consortium and has a couple of extra clauses. The MIT license text [2] is actually what the current DT files claim. [1] https://spdx.org/licenses/X11.html [2] https://spdx.org/licenses/MIT.html Cc: Chris Packham Acked-by: Chris Packham Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-xp-db-dxbc2.dts | 39 +------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) commit c04ceb9aeeeefe4aca59cb20805193bee8b67e10 Author: Gregory CLEMENT Date: Thu Mar 15 12:03:49 2018 +0100 arm: dts: armada-370-db: use SPDX-License-Identifier Follow the recent trend for the license description, and also fix the wrongly stated X11 to MIT. As already pointed on the DT ML, the X11 license text [1] is explicitly for the X Consortium and has a couple of extra clauses. The MIT license text [2] is actually what the current DT files claim. [1] https://spdx.org/licenses/X11.html [2] https://spdx.org/licenses/MIT.html Cc: Thomas Petazzoni Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-370-db.dts | 39 +------------------------------------ 1 file changed, 1 insertion(+), 38 deletions(-) commit ca36855ef06db83d2fa49e853a47454ccd97cd3b Author: Gregory CLEMENT Date: Thu Mar 15 12:03:52 2018 +0100 arm: dts: armada-*.dts: use SPDX-License-Identifier for most of the Armada based board Follow the recent trend for the license description, and also fix the wrongly stated X11 to MIT. As already pointed on the DT ML, the X11 license text [1] is explicitly for the X Consortium and has a couple of extra clauses. The MIT license text [2] is actually what the current DT files claim. [1] https://spdx.org/licenses/X11.html [2] https://spdx.org/licenses/MIT.html Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-370-dlink-dns327l.dts | 39 +--------------------- arch/arm/boot/dts/armada-370-mirabox.dts | 39 +--------------------- arch/arm/boot/dts/armada-370-netgear-rn102.dts | 39 +--------------------- arch/arm/boot/dts/armada-370-netgear-rn104.dts | 39 +--------------------- arch/arm/boot/dts/armada-370-rd.dts | 39 +--------------------- arch/arm/boot/dts/armada-370-seagate-nas-2bay.dts | 5 +-- arch/arm/boot/dts/armada-370-seagate-nas-4bay.dts | 5 +-- arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi | 5 +-- .../dts/armada-370-seagate-personal-cloud-2bay.dts | 5 +-- .../boot/dts/armada-370-seagate-personal-cloud.dts | 5 +-- .../dts/armada-370-seagate-personal-cloud.dtsi | 5 +-- arch/arm/boot/dts/armada-370-synology-ds213j.dts | 39 +--------------------- arch/arm/boot/dts/armada-375-db.dts | 39 +--------------------- arch/arm/boot/dts/armada-385-linksys-caiman.dts | 34 +------------------ arch/arm/boot/dts/armada-385-linksys-cobra.dts | 34 +------------------ arch/arm/boot/dts/armada-385-linksys-rango.dts | 34 +------------------ arch/arm/boot/dts/armada-385-linksys-shelby.dts | 34 +------------------ arch/arm/boot/dts/armada-385-linksys.dtsi | 34 +------------------ arch/arm/boot/dts/armada-385-synology-ds116.dts | 33 +----------------- arch/arm/boot/dts/armada-388-clearfog-base.dts | 38 +-------------------- arch/arm/boot/dts/armada-388-clearfog-pro.dts | 38 +-------------------- arch/arm/boot/dts/armada-388-clearfog.dts | 38 +-------------------- arch/arm/boot/dts/armada-388-clearfog.dtsi | 38 +-------------------- arch/arm/boot/dts/armada-388-db.dts | 39 +--------------------- arch/arm/boot/dts/armada-388-gp.dts | 33 +----------------- .../arm/boot/dts/armada-38x-solidrun-microsom.dtsi | 38 +-------------------- arch/arm/boot/dts/armada-390-db.dts | 39 +--------------------- arch/arm/boot/dts/armada-395-gp.dts | 33 +----------------- arch/arm/boot/dts/armada-398-db.dts | 39 +--------------------- arch/arm/boot/dts/armada-xp-axpwifiap.dts | 39 +--------------------- arch/arm/boot/dts/armada-xp-db.dts | 38 +-------------------- arch/arm/boot/dts/armada-xp-gp.dts | 39 +--------------------- arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 39 +--------------------- arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 33 +----------------- arch/arm/boot/dts/armada-xp-matrix.dts | 39 +--------------------- arch/arm/boot/dts/armada-xp-netgear-rn2120.dts | 39 +--------------------- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 39 +--------------------- arch/arm/boot/dts/armada-xp-synology-ds414.dts | 39 +--------------------- 38 files changed, 38 insertions(+), 1185 deletions(-) commit 6cb9215baeb9c1ed336a5e8905f7ad7c4698acc9 Author: Bartosz Golaszewski Date: Sun Mar 4 13:45:51 2018 +0100 gpio: mockup: fix a potential crash when creating debugfs entries If we failed to create the top debugfs directory, we must not try to create the child nodes. We currently only check if gpio_mockup_dbg_dir is not NULL, but it can also contain an errno if debugfs is disabled in build options. Use IS_ERR_OR_NULL() instead. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a711e0dd4e68f6b202db3f9e2c0086a8780da25 Author: H. Nikolaus Schaller Date: Sat Mar 10 12:00:01 2018 +0100 gpio: pca953x: add compatibility for pcal6524 and pcal9555a The Pyra-Handheld originally used the tca6424 but recently we have replaced it by the pin and package compatible pcal6524. So let's add this to the bindings and the driver. And while we are at it, the pcal9555a does not have a compatible entry either but is already supported by the device id table. Signed-off-by: H. Nikolaus Schaller Reviewed-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/gpio-pca953x.txt | 2 ++ drivers/gpio/gpio-pca953x.c | 4 ++++ 2 files changed, 6 insertions(+) commit e6bf37736f6495fb87ce5525d1f6fd2adce307f1 Author: Phil Edworthy Date: Mon Mar 12 18:30:56 2018 +0000 gpio: dwapb: Add support for a bus clock Enable an optional bus clock provided by DT. Signed-off-by: Phil Edworthy Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-dwapb.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 13b5319e92a94036ce2131f76510e108428daec8 Author: Laura Abbott Date: Fri Mar 9 16:10:20 2018 -0800 gpio: Remove VLA from xra1403 driver The new challenge is to remove VLAs from the kernel (see https://lkml.org/lkml/2018/3/7/621) This patch replaces a VLA with an appropriate call to kmalloc_array. Signed-off-by: Laura Abbott Reviewed-by: Nandor Han Signed-off-by: Linus Walleij drivers/gpio/gpio-xra1403.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 48da181dac478bb517aae2483e69f3eeec24172c Author: Laura Abbott Date: Fri Mar 9 16:10:19 2018 -0800 gpio: Remove VLA from MAX3191X driver The new challenge is to remove VLAs from the kernel (see https://lkml.org/lkml/2018/3/7/621) This patch replaces several a VLA with an appropriate call to kmalloc_array. Signed-off-by: Laura Abbott Reviewed-and-tested-by: Lukas Wunner Signed-off-by: Linus Walleij drivers/gpio/gpio-max3191x.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 8045f297548f1e1a52f1045a52661856477d0a15 Merge: 9b95a1b 740c01f Author: Arnd Bergmann Date: Tue Mar 27 15:17:53 2018 +0200 Merge tag 'omap-for-v4.17/defconfig-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc Pull "Defconfig updates for omap variants for v4.17 merge window" from Tony Lindgren: We need to enable MMC_SDHCI option in both omap2plus_defconfig and multi_v7_defconfig so systems are able to mount root when the dts files get updated for sdhci. Then let's update omap2plus_defconfig so we can patch it easier. And as Arnd noticed earlier, just running make savedefconfig will accidentally drop few Kconfig options. This is happening because some options are no longer available as loadable modules like LIRC. Or new dependencies have been added such as SND_OSSEMUL for selecting SOUND_OSS_CORE. So we first move the unchanged options around to their make savedefconfig suggested place, then update the options to prevent make savedefconfig dropping some options accidentally, and then finally drop the unused options. And after that we enable options DRM_OMAP and 8250_OMAP. These both have been around for years now. And we do have 8250_OMAP warn about console being redirected with SERIAL_8250_OMAP_TTYO_FIXUP option that is enabled by default. Some users may need to update their inittab to use ttyS* instead of ttyO* though. If this turns out to be a problem, we may want to introduce a separate compatible for 8250-omap. But I think we're good to go with the SERIAL_8250_OMAP_TTYO_FIXUP warning now. Let's not update multi_v7_defconfig yet though and first see how 8250_OMAP change plays out. We also enable few new options for PM on am335x and am437x, and CEC in omap2plus_defconfig. Naturally similar options can be later on added to multi_v7_defconfig, but in this series we only enable OTG, MUSB and the related PHYs in multi_v7_defconfig to make it more usable for distros. * tag 'omap-for-v4.17/defconfig-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: multi_v7_defconfig: Enable USB gadget configfs as loadable module ARM: multi_v7_defconfig: Enable various USB PHYs found on omap variants ARM: multi_v7_defconfig: Enable OTG and MUSB as loadable modules ARM: omap2plus_defconfig: Enable 8250_OMAP ARM: omap2plus_defconfig: Switch to use omapdrm by default ARM: omap2plus_defconfig: Enable CEC ARM: omap2plus_defconfig: Enable am335x and am437x PM options ARM: omap2plus_defconfig: Drop unneeded options ARM: omap2plus_defconfig: Add SND_OSSEMUL ARM: omap2plus_defconfig: Update LIRC options ARM: omap2plus_defconfig: Select MFD_TI_LMU ARM: omap2plus_defconfig: Add SERIAL_DEV for bluetooth ARM: omap2plus_defconfig: Update for moved options ARM: omap2plus_defconfig: Enable CONFIG_MMC_SDHCI_OMAP ARM: multi_v7_defconfig: Enable CONFIG_MMC_SDHCI_OMAP Signed-off-by: Arnd Bergmann commit 4fc97ef94bbfa185d16b3e44199b7559d0668747 Author: Kunihiko Hayashi Date: Mon Mar 19 17:13:14 2018 +0900 pinctrl: uniphier: add UART hardware flow control pin-mux settings UniPhier SoCs have the following pins for hardware flow control of UART: XRTS, XCTS and for modem control of UART: XDTR, XDSR, XDCD, XRI The port number with the flow control is SoC-dependent. Signed-off-by: Kunihiko Hayashi Acked-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c | 5 ++++- drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c | 5 ++++- drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c | 5 ++++- drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c | 5 ++++- drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c | 5 ++++- drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c | 5 ++++- drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c | 5 ++++- drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c | 5 ++++- drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c | 5 ++++- 9 files changed, 36 insertions(+), 9 deletions(-) commit 9b95a1b8bad0d2311f1c1615bd5ae2e707786e99 Merge: 89fe3e9 a20d139 Author: Arnd Bergmann Date: Tue Mar 27 15:13:50 2018 +0200 Merge tag 'renesas-defconfig-for-v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Pull "Renesas ARM Based SoC Defconfig Updates for v4.17" from Simon Horman: Updates to shmobile defconfig: * Redresh defconfig to ease future maintenence overhead * Disable CONFIG_EMBEDDED Geert Uytterhoeven says "CONFIG_EXPERT exposes too many config options that do not matter for development. E.g. it prohibits using the default values for the various SH_SCI options. However, CONFIG_EMBEDDED selects CONFIG_EXPERT, so it cannot be disabled. Hence disable CONFIG_EMBEDDED, and compensate for the loss of CONFIG_DEBUG_KERNEL by enabling the latter. Actual impact, all harmless: - CONFIG_NAMESPACES=y (plus a few related CONFIG_*_NS options), - CONFIG_SYSCTL_SYSCALL=n, - CONFIG_SERIAL_SH_SCI_NR_UARTS changed from 20 to 18, - Some HID support became enabled, - CONFIG_DEBUG_MEMORY_INIT=y," * Enable RZA1 pin controller This allows the Genmai board with RZ/A1 (r7s72100) SoC to once again boot using the shmobile defconfig. * tag 'renesas-defconfig-for-v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: defconfig: Disable CONFIG_EMBEDDED ARM: shmobile: defconfig: Refresh ARM: shmobile: Enable RZA1 pin controller commit 89fe3e9b552bbea5fa47d3d855ed471fa9185c8e Merge: 6a5f82e f3768b0 Author: Arnd Bergmann Date: Tue Mar 27 15:12:54 2018 +0200 Merge tag 'renesas-arm64-defconfig-for-v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Pull "Renesas ARM64 Based SoC Defconfig Updates for v4.17" from Simon Horman: Enable the following to allow them to be more widely exercised: * Newly added R8A77965 and R8A77980 SoCs * PWM and USB as used on R-Car Gen3 SoCs * tag 'renesas-arm64-defconfig-for-v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: defconfig: enable R8A77965 SoC arm64: defconfig: Enable PWM and USB for R-Car arm64: defconfig: enable R8A77980 SoC commit dcd189e6d2eca4663da6120463fbff0995bc06eb Author: Robin Murphy Date: Mon Mar 26 13:35:15 2018 +0100 iommu/arm-smmu-v3: Support 52-bit virtual address Stage 1 input addresses are effectively 64-bit in SMMUv3 anyway, so really all that's involved is letting io-pgtable know the appropriate upper bound for T0SZ. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 6619c9138533597dc0ff52155d263f14e8578ca2 Author: Robin Murphy Date: Mon Mar 26 13:35:14 2018 +0100 iommu/arm-smmu-v3: Support 52-bit physical address Implement SMMUv3.1 support for 52-bit physical addresses. Since a 52-bit OAS implies 64KB translation granule support, permitting level 1 block entries there is simple, and the rest is just extending address fields. Tested-by: Nate Watterson Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) commit 6c89928ff7a0f7b4ebc2ac1acab9f99d5f50ed75 Author: Robin Murphy Date: Mon Mar 26 13:35:13 2018 +0100 iommu/io-pgtable-arm: Support 52-bit physical address Bring io-pgtable-arm in line with the ARMv8.2-LPA feature allowing 52-bit physical addresses when using the 64KB translation granule. This will be supported by SMMUv3.1. Tested-by: Nate Watterson Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm.c | 67 ++++++++++++++++++++++++++++++------------ 1 file changed, 49 insertions(+), 18 deletions(-) commit 7417b99c49e5bb77e04d64c915da2ee4bfcbf8a8 Author: Robin Murphy Date: Mon Mar 26 13:35:12 2018 +0100 iommu/arm-smmu-v3: Clean up queue definitions As with registers and tables, use GENMASK and the bitfield accessors consistently for queue fields, to save some lines and ease maintenance a little. This now leaves everything in a nice state where all named field definitions expect to be used with bitfield accessors (although since single-bit fields can still be used directly we leave some of those uses as-is to avoid unnecessary churn), while the few remaining *_MASK definitions apply exclusively to in-place values. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 128 +++++++++++++++++++------------------------- 1 file changed, 55 insertions(+), 73 deletions(-) commit ba08bdcbf7fd6c3b3a94496ca15b5b66dbea5034 Author: Robin Murphy Date: Mon Mar 26 13:35:11 2018 +0100 iommu/arm-smmu-v3: Clean up table definitions As with registers, use GENMASK and the bitfield accessors consistently for table fields, to save some lines and ease maintenance a little. This also catches a subtle off-by-one wherein bit 5 of CD.T0SZ was missing. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 149 ++++++++++++++++++-------------------------- 1 file changed, 59 insertions(+), 90 deletions(-) commit cbcee19ac4a2c960d73b8951476f0fe5e5628319 Author: Robin Murphy Date: Mon Mar 26 13:35:10 2018 +0100 iommu/arm-smmu-v3: Clean up register definitions The FIELD_{GET,PREP} accessors provided by linux/bitfield.h allow us to define multi-bit register fields solely in terms of their bit positions via GENMASK(), without needing explicit *_SHIFT and *_MASK definitions. As well as the immediate reduction in lines of code, this avoids the awkwardness of values sometimes being pre-shifted and sometimes not, which means we can factor out some common values like memory attributes. Furthermore, it also makes it trivial to verify the definitions against the architecture spec, on which note let's also fix up a few field names to properly match the current release (IHI0070B). Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 174 ++++++++++++++++++++------------------------ 1 file changed, 77 insertions(+), 97 deletions(-) commit 1cf9e54e91aac61e1a6c2bbacd0b571c6ca09131 Author: Robin Murphy Date: Mon Mar 26 13:35:09 2018 +0100 iommu/arm-smmu-v3: Clean up address masking Before trying to add the SMMUv3.1 support for 52-bit addresses, make things bearable by cleaning up the various address mask definitions to use GENMASK_ULL() consistently. The fact that doing so reveals (and fixes) a latent off-by-one in Q_BASE_ADDR_MASK only goes to show what a jolly good idea it is... Tested-by: Nate Watterson Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 53 ++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 32 deletions(-) commit 940ded9c21fde7c47c64d5cc74e22300fb89e6b7 Author: Nate Watterson Date: Sat Jan 20 13:08:04 2018 -0500 iommu/arm-smmu-v3: limit reporting of MSI allocation failures Currently, the arm-smmu-v3 driver expects to allocate MSIs for all SMMUs with FEAT_MSI set. This results in unwarranted "failed to allocate MSIs" warnings being printed on systems where FW was either deliberately configured to force the use of SMMU wired interrupts -or- is altogether incapable of describing SMMU MSI topology (ACPI IORT prior to rev.C). Remedy this by checking msi_domain before attempting to allocate SMMU MSIs. Acked-by: Marc Zyngier Signed-off-by: Nate Watterson Signed-off-by: Sinan Kaya Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4c8996d7d7334c1adfbfdaaddc979094f7811ce6 Author: Robin Murphy Date: Mon Oct 30 12:14:02 2017 +0000 iommu/arm-smmu-v3: Warn about missing IRQs It is annoyingly non-obvious when DMA transactions silently go missing due to undetected SMMU faults. Help skip the first few debugging steps in those situations by making it clear when we have neither wired IRQs nor MSIs with which to raise error conditions. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6a5f82e06a565edb6d2cc915b2180f68d3647c3a Merge: 93be39b dc7073b Author: Arnd Bergmann Date: Tue Mar 27 15:11:46 2018 +0200 Merge tag 'tegra-for-4.17-arm64-defconfig' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/soc Pull "arm64: Default configuration updates for v4.17-rc1" from Thierry Reding: Enable the BPMP thermal and CPU frequency drivers as well as make sure that the Tegra SMMU is enabled by default because there's no fun without it. Also enable initial Tegra194 support. * tag 'tegra-for-4.17-arm64-defconfig' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: defconfig: Enable the Tegra SMMU by default arm64: defconfig: Enable CONFIG_TEGRA_BPMP_THERMAL arm64: defconfig: Enable CONFIG_ARM_TEGRA186_CPUFREQ arm64: defconfig: Enable NVIDIA Tegra194 support commit 93be39bf1a83b8b44d06755ddebc2c8b2408c25b Merge: 18b6843 8bc2c29 Author: Arnd Bergmann Date: Tue Mar 27 15:10:12 2018 +0200 Merge tag 'imx-defconfig-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/soc Pull "i.MX defconfig updates for 4.17" from Shawn Guo: - Re-sync defconfig files by running savedefconfig. - Enable generic fsl-asoc-card driver for imx_v4_v5_defconfig. - Enable MAG3110 magnetometer sensor driver, AC97 and WM8962 codec driver, DA9062/63 PMIC, RTC and Watchdog support for imx_v6_v7_defconfig. * tag 'imx-defconfig-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: mxs_defconfig: Re-sync defconfig ARM: imx_v4_v5_defconfig: Use the generic fsl-asoc-card driver ARM: imx_v4_v5_defconfig: Re-sync defconfig ARM: imx_v6_v7_defconfig: Select CONFIG_SND_SOC_WM8962 explicitly ARM: imx_v6_v7_defconfig: Re-sync defconfig ARM: imx_v6_v7_defconfig: Enable Dialog Semiconductor DA9062 driver ARM: imx_v6_v7_defconfig: Enable AC97 codec support ARM: imx: Update imx_v6_v7_defconfig for mag3110 support ARM: imx_v6_v7_defconfig: enable OP-TEE ARM: imx_v6_v7_defconfig: select the CONFIG_CPUFREQ_DT commit 18b6843f9628917b2f3162273a4fd18a208fe76e Author: Arnd Bergmann Date: Thu Mar 15 10:36:33 2018 +0100 ARM: imx: fix imx6sll-only build When selecting SOC_IMX6SLL but not SOC_IMX6SL, we get a link error: arch/arm/mach-imx/mach-imx6sl.o: In function `imx6sl_init_late': mach-imx6sl.c:(.init.text+0x14): undefined reference to `imx6sl_cpuidle_init' This adds the missing line to the Makefile to also build the cpuidle support that we need here. Fixes: dee5dee2a5b2 ("ARM: imx: Add basic msl support for imx6sll") Acked-by: Shawn Guo Signed-off-by: Arnd Bergmann arch/arm/mach-imx/Makefile | 1 + 1 file changed, 1 insertion(+) commit da395584b8614010f5dc386afc42cbcd368eed6c Author: Arnd Bergmann Date: Mon Feb 5 23:06:43 2018 +0100 ARM: imx: select ARM_CPU_SUSPEND for CPU_IDLE as well The cpuidle support calls cpu_suspend(), which is compiled conditionally, and fails to link unless something selects CONFIG_ARM_CPU_SUSPEND. arch/arm/mach-imx/cpuidle-imx6sx.o: In function `imx6sx_enter_wait': cpuidle-imx6sx.c:(.text+0x6c): undefined reference to `cpu_suspend' This adds an explicit select statement here. Acked-by: Shawn Guo Signed-off-by: Arnd Bergmann arch/arm/mach-imx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8a830904991931106c96ff1ee0588d1ca9ea5f0 Author: Icenowy Zheng Date: Fri Mar 16 22:02:10 2018 +0800 pinctrl: sunxi: add support for the Allwinner H6 main pin controller The Allwinner H6 SoC has two pin controllers, one main controller (called CPUX-PORT in user manual) and one controller in CPUs power domain (called CPUS-PORT in user manual). This commit introduces support for the main pin controller on H6. The pin bank A and B are not wired out and hidden from the SoC's documents, however it's shown that the "ATE" (an AC200 chip co-packaged with the H6 die) is connected to the main SoC die via these pin banks. The information about these banks is just copied from the BSP pinctrl driver, but re-formatted to fit the mainline pinctrl driver format. The GPIO functions are dropped, as they're impossible to use -- except a GPIO&IRQ only pin (PB20) which might be the IRQ of ATE. Signed-off-by: Icenowy Zheng Acked-by: Rob Herring Reviewed-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Linus Walleij .../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + drivers/pinctrl/sunxi/Kconfig | 4 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-sun50i-h6.c | 614 +++++++++++++++++++++ 4 files changed, 620 insertions(+) commit d816b3cc77e4316164321623851a6750de13ef21 Author: Gregory CLEMENT Date: Thu Mar 15 14:51:29 2018 +0100 arm: dts: armada-xp-98dx: use SPDX-License-Identifier for prestara 98d SoCs Follow the recent trend for the license description, and also fix the wrongly stated X11 to MIT. As already pointed on the DT ML, the X11 license text [1] is explicitly for the X Consortium and has a couple of extra clauses. The MIT license text [2] is actually what the current DT files claim. [1] https://spdx.org/licenses/X11.html [2] https://spdx.org/licenses/MIT.html Cc: Chris Packham Acked-by: Chris Packham Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 39 +------------------------------ arch/arm/boot/dts/armada-xp-98dx3336.dtsi | 39 +------------------------------ arch/arm/boot/dts/armada-xp-98dx4251.dtsi | 39 +------------------------------ 3 files changed, 3 insertions(+), 114 deletions(-) commit 69f5689b6b4ac5bb77079ddef6b357bcaadb962c Author: Gregory CLEMENT Date: Thu Mar 15 14:40:56 2018 +0100 arm: dts: armada-*.dtsi: use SPDX-License-Identifier for most of the Armada SoCs Follow the recent trend for the license description, and also fix the wrongly stated X11 to MIT. As already pointed on the DT ML, the X11 license text [1] is explicitly for the X Consortium and has a couple of extra clauses. The MIT license text [2] is actually what the current DT files claim. [1] https://spdx.org/licenses/X11.html [2] https://spdx.org/licenses/MIT.html Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-370-xp.dtsi | 39 +------------------------------- arch/arm/boot/dts/armada-370.dtsi | 39 +------------------------------- arch/arm/boot/dts/armada-375.dtsi | 39 +------------------------------- arch/arm/boot/dts/armada-380.dtsi | 39 +------------------------------- arch/arm/boot/dts/armada-385.dtsi | 39 +------------------------------- arch/arm/boot/dts/armada-388.dtsi | 34 +--------------------------- arch/arm/boot/dts/armada-38x.dtsi | 39 +------------------------------- arch/arm/boot/dts/armada-390.dtsi | 39 +------------------------------- arch/arm/boot/dts/armada-395.dtsi | 39 +------------------------------- arch/arm/boot/dts/armada-398.dtsi | 39 +------------------------------- arch/arm/boot/dts/armada-39x.dtsi | 39 +------------------------------- arch/arm/boot/dts/armada-xp-mv78230.dtsi | 39 +------------------------------- arch/arm/boot/dts/armada-xp-mv78260.dtsi | 39 +------------------------------- arch/arm/boot/dts/armada-xp-mv78460.dtsi | 39 +------------------------------- arch/arm/boot/dts/armada-xp.dtsi | 39 +------------------------------- 15 files changed, 15 insertions(+), 565 deletions(-) commit 35817d34bd07b4e1cd597e054fa2bd9c9c111aab Author: Icenowy Zheng Date: Fri Mar 16 22:02:09 2018 +0800 pinctrl: sunxi: change irq_bank_base to irq_bank_map The Allwinner H6 SoC have its pin controllers with the first IRQ-capable GPIO bank at IRQ bank 1 and the second bank at IRQ bank 5. Change the current code that uses IRQ bank base to a IRQ bank map, in order to support the case that holes exist among IRQ banks. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c | 4 +++- drivers/pinctrl/sunxi/pinctrl-sun8i-v3s.c | 4 +++- drivers/pinctrl/sunxi/pinctrl-sunxi.h | 7 +++++-- 3 files changed, 11 insertions(+), 4 deletions(-) commit 29e36c1f63d16c6fe895fa4e33b01e45a11f96de Author: Russell King Date: Tue Feb 27 16:02:02 2018 +0000 ARM: dts: armada388-clearfog: add SFP module support Add SFP module support for Clearfog using the SFP phylink support. Signed-off-by: Russell King Tested-by: Andrew Lunn Tested-by: Baruch Siach Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dtsi | 45 ++++++++---------------------- 1 file changed, 12 insertions(+), 33 deletions(-) commit aab9581a7d99d353653c90ddb2cfc84a34416e71 Author: Hauke Mehrtens Date: Sat Mar 17 16:47:50 2018 +0100 ARM: dts: armada-385-linksys: Disable internal RTC The internal RTC does not work correctly on these Linksys boards based on Marvell SoCs. For me it only shows Wed Dec 31 23:59:59 1969 and for others it is off by 3 minutes in 10 minutes running, this was reported by multiple users. On the Linksys Mamba device the device tree comment says that no crystal is connected to the internal RTC, this is probably also true for the other devices. Signed-off-by: Hauke Mehrtens Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 29dfc6bbcc5e1ef7ce1008c4713387efb8f567d2 Author: Icenowy Zheng Date: Fri Mar 16 22:02:08 2018 +0800 pinctrl: sunxi: introduce IRQ bank conversion function The Allwinner H6 SoC have its pin controllers with the first IRQ-capable GPIO bank at IRQ bank 1 and the second bank at IRQ bank 5. Some refactors in the sunxi pinctrl framework are needed. This commit introduces a IRQ bank conversion function, which replaces the "(bank_base + bank)" code in IRQ register access. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sunxi.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 4b0d6c5a0014beef5423a380f12b9411ebf0c907 Author: Icenowy Zheng Date: Fri Mar 16 22:02:07 2018 +0800 pinctrl: sunxi: refactor irq related register function to have desc As the new H6 SoC has holes in the IRQ registers, refactor the IRQ related register function for getting the full pinctrl desc structure. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sunxi.c | 22 ++++++++++------------ drivers/pinctrl/sunxi/pinctrl-sunxi.h | 26 ++++++++++++++++++-------- 2 files changed, 28 insertions(+), 20 deletions(-) commit 610bf412e44fd4cff2b9959714437ca92dc0c697 Merge: 38d03be ee9c643 Author: Arnd Bergmann Date: Tue Mar 27 15:03:02 2018 +0200 Merge tag 'imx-dt64-4.17-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt Pull "Freescale arm64 device tree fixups for 4.17" from Shawn Guo: - It reverts a couple of patches that "fix" DTC warnings on IFC memory controller in a wrong way. We will start over agagin to address the DTC warnings later. * tag 'imx-dt64-4.17-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: Revert "dt-bindings: ifc: Fix the unit address format in the examples" Revert "arm64: dts: fsl: fix ifc simple-bus unit address format warnings" commit 38d03be7cb343364a05cf9523c7e261a15495682 Merge: c3a694a 6d97d5a Author: Arnd Bergmann Date: Tue Mar 27 15:00:31 2018 +0200 Merge tag 'socfpga_dts_for_v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/dt Pull "SoCFPGA DTS updates for v4.17" from Dinh Nguyen: - Fix GIC PPI warning - Stratix10 platform updates - Disable over-current for Arria10 devkit - Enable watchdog timer * tag 'socfpga_dts_for_v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm: dts: socfpga: fix GIC PPI warning arm64: dts: stratix10: disable false USB overcurrent on devkit arm64: dts: stratix10: enable watchdog timer on the S10 devkit commit c3a694ac3bbf91dcc3adb0ae4e37331131bc8a75 Merge: 190e313 984c770 Author: Arnd Bergmann Date: Tue Mar 27 14:59:34 2018 +0200 Merge tag 'omap-for-v4.17/dt-pt2-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Pull "Second set of dts changes for omap variants for v4.17" from Tony Lindgren: This series of patches configures few new drivers and adds omap5 specific nodes: - Enable USB OTG mode for xhci on am437x - A series of changes to configure aux control module instance on omap5 mostly to get the audio clocks configured - A series of changes to update droid4 for MDM6600 modem USB PHY and UART1 pinctrl * tag 'omap-for-v4.17/dt-pt2-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: omap4-droid4: Configure uart1 pins ARM: dts: omap4-droid4: Configure MDM6600 USB PHY ARM: dts: omap4-droid4: Fix USB PHY port naming ARM: dts: omap5-board-common: Add phandle for mclk clock for twl6040 ARM: dts: omap5: add fref_xtal_ck support ARM: dts: omap5: add support for control module wkup pad config dt-bindings: omap5: ctrl: Support for control module wkup pad config ARM: dts: am43xx: Enable dual-role mode for USB1 commit 190e3138f9577885691540dca59c2f07540bde04 Merge: cafc870 a7affb1 Author: Arnd Bergmann Date: Tue Mar 27 14:58:00 2018 +0200 Merge tag 'sunxi-h3-h5-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Pull "Allwinner H3/H5 changes for 4.17" from Maxime Ripard: Here is our usual bunch of changes to the common DTSI shared between arm and arm64, and their associated device trees. Even though the diffstat is quite big, it's been mostly just cleanups. The big feature is that the HDMI is now suported on H3 and H5 boards. * tag 'sunxi-h3-h5-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: allwinner: H5: Add Xunlong Orange Pi Zero Plus ARM: dts: sun8i-h3: Add Mali node ARM64: dts: sun50i: h5: Enable HDMI output on H5 boards ARM: dts: sun8i: h3: Enable HDMI output on H3 boards ARM: dts: sunxi: h3/h5: Add HDMI pipeline ARM: dts: sun8i: h2-plus: remove unnecessary mmc1_pins node ARM: dts: sunxi: h3-h5: rename mmc0_pins_a and mmc1_pins_a ARM: dts: sunxi: h3-h5: Move pinctrl of mmc1 from dts to dtsi ARM: dts: sunxi: h3-h5: Move pinctrl of mmc0 from dts to dtsi ARM: dts: sunxi: h3-h5: remove mmc0 card detection pin from pinctrl ARM: dts: sun8i: h2+: add support for Banana Pi M2 Zero board ARM: dts: sunxi: Switch MMC nodes away from cd-inverted property ARM: dts: nanopi-neo-air: Add WiFi / eMMC commit c0b346729b5dd3c7d0232f043f5b15947ffc7978 Merge: 34a286a 9654153 Author: Michael Ellerman Date: Tue Mar 27 23:55:49 2018 +1100 Merge branch 'topic/ppc-kvm' into next Merge the DAWR series, which touches arch code and KVM code and may need to be merged into the kvm-ppc tree. commit 9654153158d3e0684a1bdb76dbababdb7111d5a0 Author: Michael Neuling Date: Tue Mar 27 15:37:24 2018 +1100 powerpc: Disable DAWR in the base POWER9 CPU features Using the DAWR on POWER9 can cause xstops, hence we need to disable it. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 622aa35e8f6a077f034fe4ad053b6a2e9d278414 Author: Michael Neuling Date: Tue Mar 27 15:37:23 2018 +1100 powerpc: Disable DAWR on POWER9 via CPU feature quirk This disables the DAWR on all POWER9 CPUs via cpu feature quirk. Using the DAWR on POWER9 can cause xstops, hence we need to disable it. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/kernel/dt_cpu_ftrs.c | 3 +++ 1 file changed, 3 insertions(+) commit b53221e7042764d7456933d47a83b31372ce9dac Author: Michael Neuling Date: Tue Mar 27 15:37:22 2018 +1100 KVM: PPC: Book3S HV: Handle migration with POWER9 disabled DAWR POWER9 with the DAWR disabled causes problems for partition migration. Either we have to fail the migration (since we lose the DAWR) or we silently drop the DAWR and allow the migration to pass. This patch does the latter and allows the migration to pass (at the cost of silently losing the DAWR). This is not ideal but hopefully the best overall solution. This approach has been acked by Paulus. With this patch kvmppc_set_one_reg() will store the DAWR in the vcpu but won't actually set it on POWER9 hardware. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_hv_rmhandlers.S | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e8ebedbf3131ce2db0c7092a27f752ab365eef53 Author: Michael Neuling Date: Tue Mar 27 15:37:21 2018 +1100 KVM: PPC: Book3S HV: Return error from h_set_dabr() on POWER9 POWER7 compat mode guests can use h_set_dabr on POWER9. POWER9 should use the DAWR but since it's disabled there we can't. This returns H_UNSUPPORTED on a h_set_dabr() on POWER9 where the DAWR is disabled. Current Linux guests ignore this error, so they will silently not get the DAWR (sigh). The same error code is being used by POWERVM in this case. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/include/asm/hvcall.h | 1 + arch/powerpc/kvm/book3s_hv_rmhandlers.S | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) commit 398e712c007fbd0bf996d25eb6b39d8314c50db4 Author: Michael Neuling Date: Tue Mar 27 15:37:20 2018 +1100 KVM: PPC: Book3S HV: Return error from h_set_mode(SET_DAWR) on POWER9 Return H_P2 on a h_set_mode(SET_DAWR) on POWER9 where the DAWR is disabled. Current Linux guests ignore this error, so they will silently not get the DAWR (sigh). The same error code is being used by POWERVM in this case. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_hv.c | 2 ++ 1 file changed, 2 insertions(+) commit cafc87023b0da4a5627f6cb1d857811b30a0398c Merge: 2b7bee1 c916eb9 Author: Arnd Bergmann Date: Tue Mar 27 14:55:26 2018 +0200 Merge tag 'sunxi-dt64-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Pull "Allwinner arm64 DT changes for 4.17" from Maxime Ripard: We've had for this release a pretty good progress on the arm64 front as well: - The A64 now has SPDIF support - The H6 is now supported (even though at an early stage) - The TERES-I laptop from Olimex has seen some early support as well * tag 'sunxi-dt64-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: a64: Add support for TERES-I laptop arm64: dts: allwinner: a64: add simplefb for A64 SoC arm64: dts: allwinner: a64: Add watchdog arm64: dts: allwinner: a64: Add i2c0 pins arm64: allwinner: h6: add support for Pine H64 board arm64: allwinner: h6: add the basical Allwinner H6 DTSI file arm64: dts: sunxi: Switch MMC nodes away from cd-inverted property arm64: dts: allwinner: a64: Add DAI nodes arm64: dts: allwinner: a64: Add SPDIF to the Pine64 arm64: dts: allwinner: a64: Add SPDIF to the A64 arm64: dts: allwinner: a64: Add the SPDIF block and pin commit 9bc2bd5d9d8d3eddf410075e2eea70bb493dfa26 Author: Michael Neuling Date: Tue Mar 27 15:37:19 2018 +1100 powerpc: Update xmon to use ppc_breakpoint_available() The 'bd' command will now print an error and not set the breakpoint on P9. Signed-off-by: Michael Neuling [mpe: Unsplit quoted string] Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2b7bee1a6df3e666e2ebf3e523ca9c1a98f931dd Merge: 692989c dbb6d86 Author: Arnd Bergmann Date: Tue Mar 27 14:53:57 2018 +0200 Merge tag 'sunxi-dt-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Pull "Allwinner DT changes for 4.17" from Maxime Ripard: There is a bunch of significant additions for this release cycle: - The A83t now has HDMI support - The A80 finally has SMP support (without PSCI, unfortunately) - The A80 has preliminary display support And also: - a number of boards based on old (A10, A20) SoCs now have the HDMI support enabled. - The display frontend is enabled on the A33, allowing to use it for hardware display scaling - New boards: Olimex A20-SOM204 variants * tag 'sunxi-dt-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (39 commits) ARM: dts: sun9i: cubieboard4: Enable VGA display output ARM: dts: sun9i: Add pinmux settings for LCD0 RGB888 output. ARM: dts: sun9i: Add device nodes for documented display pipelines for A80 ARM: dts: sun8i: reference tablet design: Enable PMIC power supplies ARM: dts: sun8i: a33: Enable A33 internal audio codec on A33-OLinuXino ARM: dts: sun8i: a33: Enable PMIC power supplies on A33-OLinuXino ARM: dts: sun8i: a33: Drop sunxi-common-regulators.dtsi for A33-OLinuXino ARM: dts: sun8i: a33: Drop GPIO pinmux settings for A33-OLinuXino ARM: dts: sun9i: Add enable-method for SMP support for the A80 SoC ARM: dts: sun8i: h3: Add eMMC for NanoPi M1 Plus ARM: dts: sun8i: a711: set regulator for each cluster of CPUs ARM: dts: sun8i: a83t: add stable OPP tables and CPUfreq ARM: dts: sun8i: a83t: add cpu0 and cpu100 labels ARM: dtsi: axp81x: remove IP name from DT node name ARM: dtsi: sun8i: a711: enable battery power supply subnode ARM: dtsi: axp81x: add battery power supply subnode ARM: dtsi: axp81x: add node for ADC ARM: dtsi: axp22x: add node for ADC ARM: dtsi: axp209: add node for ADC ARM: dts: sun7i: Enable HDMI support on the Orange Pi mini ... commit 692989c334bba18a4256d0a9664a18ca0a8f8a7b Merge: 11293cb 26f2cac Author: Arnd Bergmann Date: Tue Mar 27 14:52:57 2018 +0200 Merge tag 'at91-ab-4.17-dt2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/dt Pull "AT91 DT for 4.17 #2" from Alexandre Belloni: Pinctrl fixes, the UART pullups were discussed back in 2016. * tag 'at91-ab-4.17-dt2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: dts: at91sam9260: pullup rx on usart0 ARM: dts: at91rm9200: pullup rx on uart0 ARM: dts: at91: fixes uart pinctrl, set pullup on rx, clear pullup on tx ARM: dts: at91: at91sam9g25: fix mux-mask pinctrl property commit 85ce9a5d57bec126d19610d6e77f9e6e4eaea635 Author: Michael Neuling Date: Tue Mar 27 15:37:18 2018 +1100 powerpc: Update ptrace to use ppc_breakpoint_available() This updates the ptrace code to use ppc_breakpoint_available(). We now advertise via PPC_PTRACE_GETHWDBGINFO zero breakpoints when the DAWR is missing (ie. POWER9). This results in GDB falling back to software emulation of the breakpoint (which is slow). For the features advertised by PPC_PTRACE_GETHWDBGINFO, we keep advertising DAWR as if we don't GDB assumes 1 breakpoint irrespective of the number of breakpoints advertised. GDB then fails later when trying to set this one breakpoint. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/kernel/hw_breakpoint.c | 3 +++ arch/powerpc/kernel/ptrace.c | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) commit 404b27d66ed657ebccb08a9c8f8f65523e9b666b Author: Michael Neuling Date: Tue Mar 27 15:37:17 2018 +1100 powerpc: Add ppc_breakpoint_available() Add ppc_breakpoint_available() to determine if a breakpoint is available currently via the DAWR or DABR. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/include/asm/debug.h | 1 + arch/powerpc/kernel/process.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit bc774b8c110f7d90d13257b95b5a22f5bb7fd71b Author: Wei-Ning Huang Date: Thu Mar 15 09:28:25 2018 +0800 HID: google: add google hammer HID driver Add Google hammer HID driver. This driver allow us to control hammer keyboard backlight and support future features. Signed-off-by: Wei-Ning Huang Signed-off-by: Nicolas Boichat Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 6 ++ drivers/hid/Makefile | 1 + drivers/hid/hid-google-hammer.c | 124 ++++++++++++++++++++++++++++++++++++++++ drivers/hid/hid-ids.h | 3 + 4 files changed, 134 insertions(+) commit 34a286a4ac576d3d9ea3ac2bc7bbd4216a1f7ac7 Author: Sam Bobroff Date: Mon Mar 19 13:49:23 2018 +1100 powerpc/eeh: Add eeh_state_active() helper Checking for a "fully active" device state requires testing two flag bits, which is open coded in several places, so add a function to do it. Signed-off-by: Sam Bobroff Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/eeh.h | 6 ++++++ arch/powerpc/kernel/eeh.c | 19 ++++++------------- arch/powerpc/platforms/powernv/eeh-powernv.c | 9 ++------- 3 files changed, 14 insertions(+), 20 deletions(-) commit 54048cf876615285363f6f6c21014bf2462ebe0d Author: Sam Bobroff Date: Wed Mar 21 13:06:40 2018 +1100 powerpc/eeh: Factor out common code eeh_reset_device() The caller will always pass NULL for 'rmv_data' when 'eeh_aware_driver' is true, so the first two calls to eeh_pe_dev_traverse() can be combined without changing behaviour as can the two arms of the final 'if' block. This should not change behaviour. Signed-off-by: Sam Bobroff Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) commit d3136d771292b87cfc217a528aa50acec0b2b84f Author: Sam Bobroff Date: Mon Mar 19 13:49:04 2018 +1100 powerpc/eeh: Remove always-true tests in eeh_reset_device() eeh_reset_device() tests the value of 'bus' more than once but the only caller, eeh_handle_normal_device() does this test itself and will never pass NULL. So, remove the dead tests. This should not change behaviour. Signed-off-by: Sam Bobroff Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5fd13460af36f5c6c958165d697950e676fad7c6 Author: Sam Bobroff Date: Mon Mar 19 13:48:55 2018 +1100 powerpc/eeh: Clarify arguments to eeh_reset_device() It is currently difficult to understand the behaviour of eeh_reset_device() due to the way it's parameters are used. In particular, when 'bus' is NULL, it's value is still necessary so the same value is looked up again locally under a different name ('frozen_bus') but behaviour is changed. To clarify this, add a new parameter 'driver_eeh_aware', and have the caller set it when it would have passed NULL for 'bus' and always pass a value for 'bus'. Then change any test that was on 'bus' to one on '!driver_eeh_aware' and replace uses of 'frozen_bus' with 'bus'. Also update the function's comment. This should not change behaviour. Signed-off-by: Sam Bobroff Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit cd95f804ac49c457c483309a58362acbc8654063 Author: Sam Bobroff Date: Mon Mar 19 13:47:02 2018 +1100 powerpc/eeh: Rename frozen_bus to bus in eeh_handle_normal_event() The name "frozen_bus" is misleading: it's not necessarily frozen, it's just the PE's PCI bus. Signed-off-by: Sam Bobroff Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5b86ac9e91715224ae9e8ee2b544f7392b7fc8b2 Author: Sam Bobroff Date: Mon Mar 19 13:46:51 2018 +1100 powerpc/eeh: Remove misleading test in eeh_handle_normal_event() Remove a test that checks if "frozen_bus" is NULL, because it cannot have changed since it was tested at the start of the function and so must be true here. Signed-off-by: Sam Bobroff Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 63457b144b0e3dccb9482bfe7506deb0b958e20d Author: Sam Bobroff Date: Mon Mar 19 13:46:40 2018 +1100 powerpc/eeh: Fix misleading comment in __eeh_addr_cache_get_device() Commit "0ba178888b05 powerpc/eeh: Remove reference to PCI device" removed a call to pci_dev_get() from __eeh_addr_cache_get_device() but did not update the comment to match. Signed-off-by: Sam Bobroff Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_cache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 37fd8125873031d5c450293bce827c3bf397287d Author: Sam Bobroff Date: Mon Mar 19 13:46:30 2018 +1100 powerpc/eeh: Manage EEH_PE_RECOVERING inside eeh_handle_normal_event() Currently the EEH_PE_RECOVERING flag for a PE is managed by both the caller and callee of eeh_handle_normal_event() (among other places not considered here). This is complicated by the fact that the PE may or may not have been invalidated by the call. So move the callee's handling into eeh_handle_normal_event(), which clarifies it and allows the return type to be changed to void (because it no longer needs to indicate at the PE has been invalidated). This should not change behaviour except in eeh_event_handler() where it was previously possible to cause eeh_pe_state_clear() to be called on an invalid PE, which is now avoided. Signed-off-by: Sam Bobroff Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/eeh_event.h | 2 +- arch/powerpc/kernel/eeh_driver.c | 29 +++++++++++------------------ arch/powerpc/kernel/eeh_event.c | 2 -- 3 files changed, 12 insertions(+), 21 deletions(-) commit 68701780712f7ddb2fa81032aa1b4a949949ddf8 Author: Sam Bobroff Date: Mon Mar 19 13:46:20 2018 +1100 powerpc/eeh: Remove eeh_handle_event() The function eeh_handle_event(pe) does nothing other than switching between calling eeh_handle_normal_event(pe) and eeh_handle_special_event(). However it is only called in two places, one where pe can't be NULL and the other where it must be NULL (see eeh_event_handler()) so it does nothing but obscure the flow of control. So, remove it. Signed-off-by: Sam Bobroff Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/eeh_event.h | 3 ++- arch/powerpc/kernel/eeh_driver.c | 42 +++++++++++++----------------------- arch/powerpc/kernel/eeh_event.c | 4 ++-- 3 files changed, 19 insertions(+), 30 deletions(-) commit d41ce7b1bcc3e1d02cc9da3b83c0fe355fcb68e0 Author: Alexey Kardashevskiy Date: Tue Feb 13 16:51:35 2018 +1100 powerpc/powernv/npu: Do not try invalidating 32bit table when 64bit table is enabled GPUs and the corresponding NVLink bridges get different PEs as they have separate translation validation entries (TVEs). We put these PEs to the same IOMMU group so they cannot be passed through separately. So the iommu_table_group_ops::set_window/unset_window for GPUs do set tables to the NPU PEs as well which means that iommu_table's list of attached PEs (iommu_table_group_link) has both GPU and NPU PEs linked. This list is used for TCE cache invalidation. The problem is that NPU PE has just a single TVE and can be programmed to point to 32bit or 64bit windows while GPU PE has two (as any other PCI device). So we end up having an 32bit iommu_table struct linked to both PEs even though only the 64bit TCE table cache can be invalidated on NPU. And a relatively recent skiboot detects this and prints errors. This changes GPU's iommu_table_group_ops::set_window/unset_window to make sure that NPU PE is only linked to the table actually used by the hardware. If there are two tables used by an IOMMU group, the NPU PE will use the last programmed one which with the current use scenarios is expected to be a 64bit one. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) commit b574df94883df4d37f1b9d648867d623496ca3b1 Author: Alexey Kardashevskiy Date: Thu Feb 1 16:07:25 2018 +1100 powerpc/mm: Fix typo in comments Fixes: 912cc87a6 "powerpc/mm/radix: Add LPID based tlb flush helpers" Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a8c0bf3c621e0acc01451e27fe47c41138e13d0d Author: Alexey Kardashevskiy Date: Tue Jan 9 16:52:14 2018 +1100 powerpc/lpar/debug: Initialize flags before printing debug message With enabled DEBUG, there is a compile error: "error: ‘flags’ is used uninitialized in this function". This moves pr_devel() little further where @flags are initialized. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/lpar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 79b4686857029cdea97d0102d179aef2f58e5acb Author: Alexey Kardashevskiy Date: Tue Jan 9 16:45:20 2018 +1100 powerpc/init: Do not advertise radix during client-architecture-support Currently the pseries kernel advertises radix MMU support even if the actual support is disabled via the CONFIG_PPC_RADIX_MMU option. This adds a check for CONFIG_PPC_RADIX_MMU to avoid advertising radix to the hypervisor. Suggested-by: Paul Mackerras Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/kernel/prom_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bde709a70884bfc790da6fbc4467c91e8d41c51b Author: Mauricio Faria de Oliveira Date: Fri Mar 9 17:45:58 2018 -0300 powerpc/mm: Fix section mismatch warning in stop_machine_change_mapping() Fix the warning messages for stop_machine_change_mapping(), and a number of other affected functions in its call chain. All modified functions are under CONFIG_MEMORY_HOTPLUG, so __meminit is okay (keeps them / does not discard them). Boot-tested on powernv/power9/radix-mmu and pseries/power8/hash-mmu. $ make -j$(nproc) CONFIG_DEBUG_SECTION_MISMATCH=y vmlinux ... MODPOST vmlinux.o WARNING: vmlinux.o(.text+0x6b130): Section mismatch in reference from the function stop_machine_change_mapping() to the function .meminit.text:create_physical_mapping() The function stop_machine_change_mapping() references the function __meminit create_physical_mapping(). This is often because stop_machine_change_mapping lacks a __meminit annotation or the annotation of create_physical_mapping is wrong. WARNING: vmlinux.o(.text+0x6b13c): Section mismatch in reference from the function stop_machine_change_mapping() to the function .meminit.text:create_physical_mapping() The function stop_machine_change_mapping() references the function __meminit create_physical_mapping(). This is often because stop_machine_change_mapping lacks a __meminit annotation or the annotation of create_physical_mapping is wrong. ... Signed-off-by: Mauricio Faria de Oliveira Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/mm/mem.c | 4 ++-- arch/powerpc/mm/pgtable-book3s64.c | 4 ++-- arch/powerpc/mm/pgtable-radix.c | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) commit d6fbe1c55c55c6937cbea3531af7da84ab7473c3 Author: Michael Ellerman Date: Tue Mar 27 23:01:53 2018 +1100 powerpc/64s: Wire up cpu_show_spectre_v2() Add a definition for cpu_show_spectre_v2() to override the generic version. This has several permuations, though in practice some may not occur we cater for any combination. The most verbose is: Mitigation: Indirect branch serialisation (kernel only), Indirect branch cache disabled, ori31 speculation barrier enabled We don't treat the ori31 speculation barrier as a mitigation on its own, because it has to be *used* by code in order to be a mitigation and we don't know if userspace is doing that. So if that's all we see we say: Vulnerable, ori31 speculation barrier enabled Signed-off-by: Michael Ellerman arch/powerpc/kernel/security.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 56986016cb8cd9050e601831fe89f332b4e3c46e Author: Michael Ellerman Date: Tue Mar 27 23:01:52 2018 +1100 powerpc/64s: Wire up cpu_show_spectre_v1() Add a definition for cpu_show_spectre_v1() to override the generic version. Currently this just prints "Not affected" or "Vulnerable" based on the firmware flag. Although the kernel does have array_index_nospec() in a few places, we haven't yet audited all the powerpc code to see where it's necessary, so for now we don't list that as a mitigation. Signed-off-by: Michael Ellerman arch/powerpc/kernel/security.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2e4a16161fcd324b1f9bf6cb6856529f7eaf0689 Author: Michael Ellerman Date: Tue Mar 27 23:01:51 2018 +1100 powerpc/pseries: Use the security flags in pseries_setup_rfi_flush() Now that we have the security flags we can simplify the code in pseries_setup_rfi_flush() because the security flags have pessimistic defaults. Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/setup.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit 37c0bdd00d3ae83369ab60a6712c28e11e6458d5 Author: Michael Ellerman Date: Tue Mar 27 23:01:50 2018 +1100 powerpc/powernv: Use the security flags in pnv_setup_rfi_flush() Now that we have the security flags we can significantly simplify the code in pnv_setup_rfi_flush(), because we can use the flags instead of checking device tree properties and because the security flags have pessimistic defaults. Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/setup.c | 41 +++++++++------------------------- 1 file changed, 10 insertions(+), 31 deletions(-) commit ff348355e9c72493947be337bb4fae4fc1a41eba Author: Michael Ellerman Date: Tue Mar 27 23:01:49 2018 +1100 powerpc/64s: Enhance the information in cpu_show_meltdown() Now that we have the security feature flags we can make the information displayed in the "meltdown" file more informative. Signed-off-by: Michael Ellerman arch/powerpc/include/asm/security_features.h | 1 + arch/powerpc/kernel/security.c | 30 ++++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) commit 8ad33041563a10b34988800c682ada14b2612533 Author: Michael Ellerman Date: Tue Mar 27 23:01:48 2018 +1100 powerpc/64s: Move cpu_show_meltdown() This landed in setup_64.c for no good reason other than we had nowhere else to put it. Now that we have a security-related file, that is a better place for it so move it. Signed-off-by: Michael Ellerman arch/powerpc/kernel/security.c | 11 +++++++++++ arch/powerpc/kernel/setup_64.c | 8 -------- 2 files changed, 11 insertions(+), 8 deletions(-) commit 77addf6e95c8689e478d607176b399a6242a777e Author: Michael Ellerman Date: Tue Mar 27 23:01:47 2018 +1100 powerpc/powernv: Set or clear security feature flags Now that we have feature flags for security related things, set or clear them based on what we see in the device tree provided by firmware. Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/setup.c | 56 ++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit f636c14790ead6cc22cf62279b1f8d7e11a67116 Author: Michael Ellerman Date: Tue Mar 27 23:01:46 2018 +1100 powerpc/pseries: Set or clear security feature flags Now that we have feature flags for security related things, set or clear them based on what we receive from the hypercall. Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/setup.c | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 9a868f634349e62922c226834aa23e3d1329ae7f Author: Michael Ellerman Date: Tue Mar 27 23:01:44 2018 +1100 powerpc: Add security feature flags for Spectre/Meltdown This commit adds security feature flags to reflect the settings we receive from firmware regarding Spectre/Meltdown mitigations. The feature names reflect the names we are given by firmware on bare metal machines. See the hostboot source for details. Arguably these could be firmware features, but that then requires them to be read early in boot so they're available prior to asm feature patching, but we don't actually want to use them for patching. We may also want to dynamically update them in future, which would be incompatible with the way firmware features work (at the moment at least). So for now just make them separate flags. Signed-off-by: Michael Ellerman arch/powerpc/include/asm/security_features.h | 65 ++++++++++++++++++++++++++++ arch/powerpc/kernel/Makefile | 2 +- arch/powerpc/kernel/security.c | 15 +++++++ 3 files changed, 81 insertions(+), 1 deletion(-) commit c4bc36628d7f8b664657d8bd6ad1c44c177880b7 Author: Michael Ellerman Date: Tue Mar 27 23:01:45 2018 +1100 powerpc/pseries: Add new H_GET_CPU_CHARACTERISTICS flags Add some additional values which have been defined for the H_GET_CPU_CHARACTERISTICS hypercall. Signed-off-by: Michael Ellerman arch/powerpc/include/asm/hvcall.h | 3 +++ 1 file changed, 3 insertions(+) commit 267e2c6fd7ca3d4076d20f9d52d49dc91addfe9d Author: Liam Girdwood Date: Tue Mar 27 12:04:04 2018 +0100 ASoC: topology: Fix kcontrol name string handling Fix the topology kcontrol string handling so that string pointer references are strdup()ed instead of being copied. This fixes issues with kcontrol templates on the stack or ones that are freed. Remember and free the strings too when topology is unloaded. Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/soc-topology.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 11293cb75bdc799afe77f28e64d5c16f0cdff9cc Merge: aeb7008 4e461e6 Author: Arnd Bergmann Date: Tue Mar 27 14:39:10 2018 +0200 Merge tag 'amlogic-dt-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt Pull "Amlogic 32-bit DT updates for v4.17" from Kevin Hilman: - odroid-c1: add microSD, ethernet, USB reset - add reset controller - fix requesting GPIOs greater than GPIOZ_3 * tag 'amlogic-dt-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: dts: meson8b: the CBUS GPIO controller only has 83 GPIOs ARM: dts: meson8b-odroidc1: add microSD support ARM: dts: meson8b: add the I2C clocks ARM: dts: meson8b-odroidc1: ethernet support ARM: dts: meson8b: extend ethernet controller description ARM: dts: meson8: add the USB reset line ARM: dts: meson8: add the reset controller ARM: dts: meson8b: grow the reset controller memory zone commit aeb700861aad363ffcd93f98747582c82e286640 Merge: 2430bcd 84d9bba Author: Arnd Bergmann Date: Tue Mar 27 14:32:03 2018 +0200 Merge tag 'qcom-dts-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt Pull "Qualcomm Device Tree Changes for v4.17" from Andy Gross: * Add initial DTS file for Samsung Galaxy S5 * Fixups for castor touchscreen node * Fixup QS600 at23 manufacturer * Add XOADC and IIO to APQ8064 * tag 'qcom-dts-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: dts: msm8974: castor: Fix typo and add startup delay in touchscreen node ARM: dts: add XOADC and IIO HWMON to APQ8064 ARM: dts: use 'atmel' as at24 manufacturer for qcom-apq8064-cm-qs600 ARM: dts: qcom: Add initial DTS file for Samsung Galaxy S5 phone commit 2430bcda3678dc031e442b700f8a694b093a9851 Merge: b6f67b0 e723795 Author: Arnd Bergmann Date: Tue Mar 27 14:30:49 2018 +0200 Merge tag 'qcom-arm64-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt Pull "Qualcomm ARM64 Updates for v4.17" from Andy Gross: * Fix GIC_CPU_MASK_SIMPLE and SPI5 config on MSM8996 * Add SDM845 and kryo385 documentation * Add MSM8916 cooling maps, cpu frequency scaling, APCS, and A53 PLL * Switch APCS to use mailbox on MSM8916 * Add rmtfs-mem on MSM8996 * tag 'qcom-arm64-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: dts: qcom: Fix SPI5 config on MSM8996 dt-bindings: qcom: Add SDM845 bindings dt-bindings: arm: Document kryo385 cpu arm64: dts: msm8916: Add cpu cooling maps arm64: dts: msm8996: Add rmtfs sharedmem node arm64: dts: qcom: msm8916: Add CPU frequency scaling support arm64: dts: qcom: msm8916: Add clock properties to the APCS node arm64: dts: qcom: msm8916: Probe the APCS mailbox driver arm64: dts: qcom: msm8916: Add msm8916 A53 PLL DT node arm64: dts: msm8996: Fix wrong use of GIC_CPU_MASK_SIMPLE() commit b6f67b039c64572adced5d5c0f01dc944e251bc2 Author: Viresh Kumar Date: Fri Feb 9 14:28:08 2018 +0530 ARM64: dts: meson: Remove "cooling-{min|max}-level" for gpio-fan node The "cooling-min-level" and "cooling-max-level" properties are not parsed by any part of the kernel currently and the max cooling state of gpio-fan cooling device is found by referring to the "gpio-fan,speed-map" instead. Remove the unused properties from the gpio-fan node. Signed-off-by: Viresh Kumar Acked-by: Neil Armstrong Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 -- 1 file changed, 2 deletions(-) commit 953042d1536b0c089e00f096c69a75118b00b9f4 Author: Viresh Kumar Date: Fri Feb 9 14:28:07 2018 +0530 ARM: dts: gemini: Remove "cooling-{min|max}-level" for gpio-fan node The "cooling-min-level" and "cooling-max-level" properties are not parsed by any part of the kernel currently and the max cooling state of gpio-fan cooling device is found by referring to the "gpio-fan,speed-map" instead. Remove the unused properties from the gpio-fan node. Signed-off-by: Viresh Kumar Acked-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/boot/dts/gemini-dlink-dns-313.dts | 2 -- 1 file changed, 2 deletions(-) commit f65f2df29d7b4e77318635ec33e95d801a9e40dd Author: Viresh Kumar Date: Fri Feb 9 14:28:06 2018 +0530 ARM64: dts: meson: Remove "cooling-{min|max}-level" for CPU nodes The "cooling-min-level" and "cooling-max-level" properties are not parsed by any part of the kernel currently and the max cooling state of a CPU cooling device is found by referring to the cpufreq table instead. Remove the unused properties from the CPU nodes. Signed-off-by: Viresh Kumar Acked-by: Neil Armstrong Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 4 ---- 1 file changed, 4 deletions(-) commit 8408e650bb0f99b60045a569804f8bd07a3cca78 Merge: c073f31 e65857a Author: Arnd Bergmann Date: Tue Mar 27 14:24:01 2018 +0200 Merge tag 'armsoc-versatile-drm-dts' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/dt Pull "DTS changes for RealView+Versatile" from Linus Walleij: This augments the RealView and Versatile device trees to properly define the VGA and panel connectors in preparation for DRM. * tag 'armsoc-versatile-drm-dts' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: dts: Augment panel setting for Versatile ARM: dts: Add Versatile IB2 device tree ARM: dts: Augment VGA connector bridge on Realview PBX ARM: dts: Augment VGA connector bridge on Realview EB ARM: dts: Augment VGA connector bridge on PB1176 ARM: dts: Augment VGA connector bridge on PB11MPcore commit c073f31a969accd4d07345fe72e7a9e7b582f93b Merge: 7c9e7cb c339f0e Author: Arnd Bergmann Date: Tue Mar 27 14:21:05 2018 +0200 Merge tag 'amlogic-dt64' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt Pull "Amlogic 64-bit DT updates for v4.17" from Kevin Hilman: - AXG: add/enable UART_A, I2C, RMII, system controller, HW RNG - accept MAC from u-boot environment - misc. fixes * tag 'amlogic-dt64' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: dts: meson-gx: make efuse read-only ARM64: dts: meson: bump mali450 clk to 744MHz meson-gx-socinfo: Add package id for S905H ARM64: dts: meson-gxbb-wetek: add a wetek specific dtsi to cleanup hub and play2 ARM64: dts: meson: reduce odroid-c2 eMMC maximum rate ARM64: dts: amlogic: Convert to new-style SPDX license identifiers ARM64: dts: meson-axg: fix pwm_AO_cd compatible ARM64: dts: meson-axg: add sec_AO system controller ARM64: dts: meson: accept MAC addr from u-boot environment ARM64: dts: meson s905x: accept MAC addr from u-boot environment ARM64: dts: meson-axg: enable the UART_A controller ARM64: dts: meson-axg: complete the pinctrl info for UART_AO_A ARM64: dts: meson-axg: uart: Add the pinctrl info description ARM64: dts: meson-axg: uart: drop legacy compatible name from EE UART ARM64: dts: meson-axg: add RMII pins for ethernet controller ARM64: dts: meson-axg: enable I2C Master-1 for the audio speaker ARM64: dts: meson-axg: describe pin DT info for I2C controller ARM64: dts: meson-axg: add I2C DT info for Meson-AXG SoC ARM64: meson-axg: enable hardware rng commit 7c9e7cb344dbb17cb4d9681c65479efaad2df713 Merge: 97be8ab 003456f Author: Arnd Bergmann Date: Tue Mar 27 14:19:44 2018 +0200 Merge tag 'mvebu-dt64-4.17-2' of git://git.infradead.org/linux-mvebu into next/dt Pull "mvebu dt64 for 4.17 (part 2)" from Gregory CLEMENT: - Add registers clock for all the peripheral nodes that had been yet converted for CP110 (Armada 7K/8K) - Document URL for schematic for the EspressoBin (Armada 3720) * tag 'mvebu-dt64-4.17-2' of git://git.infradead.org/linux-mvebu: arm64: dts: armada-3720-espressobin: Document URL for schematic ARM64: dts: marvell: armada-cp110: Add registers clock for the PCIe nodes ARM64: dts: marvell: armada-cp110: Add registers clock for the NAND node ARM64: dts: marvell: armada-cp110: Add registers clock for the crypto node ARM64: dts: marvell: armada-cp110: Add registers clock for the trng node ARM64: dts: marvell: armada-cp110: Add registers clock for XOR engine nodes ARM64: dts: marvell: armada-cp110: Add registers clock for USB host nodes commit 97be8ab23dc1eacf4ea96649520463b9cf597a45 Merge: 00730c5 5f59955 Author: Arnd Bergmann Date: Tue Mar 27 14:18:41 2018 +0200 Merge tag 'v4.16-next-dts64' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into next/dt Pull "ARM: mediatek: dts64 updates for v4.16-next" from Matthias Brugger: - mt2712e add auxadc devcie mt7622: - fix clock bindings description - add nodes for mmc, usb, SATA, PCI, ethernet, cpufreq, PMIC mt6380, pinctrl, scpsys and clock devices * tag 'v4.16-next-dts64' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm64: dts: mt2712: Add auxadc device node. dt-bindings: clock: mediatek: add missing required #reset-cells arm64: dts: mt7622: add mmc related device nodes arm64: dts: mt7622: add usb device nodes arm64: dts: mt7622: add SATA device nodes arm64: dts: mt7622: add PCIe device nodes arm64: dts: mt7622: add ethernet device nodes arm64: dts: mt7622: add flash related device nodes arm64: dts: mt7622: add SoC and peripheral related device nodes arm64: dts: mt7622: turn uart0 clock to real ones arm64: dts: mt7622: add cpufreq related device nodes arm64: dts: mt7622: add PMIC MT6380 related nodes arm64: dts: mt7622: add pinctrl related device nodes arm64: dts: mt7622: add power domain controller device nodes arm64: dts: mt7622: add clock controller device nodes commit 00730c5be86401d9eb143951854432b96880f9be Merge: 7c006f5 c10a98c Author: Arnd Bergmann Date: Tue Mar 27 14:17:37 2018 +0200 Merge tag 'v4.16-next-dts32' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into next/dt Pull "ARM: mediatek: dts32 updates for v4.16-next" from Matthias Brugger: mt7623: - fix style issues of the dts - add cpu clock properties - add PCI controller - add mt7623 reference board banapi-r2: - enable missing uarts - fix regulator for mmc - fix USB initialization * tag 'v4.16-next-dts32' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm: dts: mt7623: add PCIe related nodes arm: dts: mt7623: use - instead of _ in DT node name arm: dts: mt7623: remove useless property pinctrl-names at node switch@0 arm: dts: mt7623: add related clock properties to cpu[1-3] nodes arm: dts: mt7623: enable three available UARTs on bananapi-r2 arm: dts: mt7623: fix the regulators mmc should use on bananapi-r2 arm: dts: mt7623: fix USB initialization fails on bananapi-r2 dt-bindings: arm: mediatek: add support for more mt7623 reference boards commit 2a58fca9a7b4a3953c3e983ef80e36df85293a7c Author: Will Deacon Date: Tue Feb 27 10:50:20 2018 +0000 arm64: cmpxchg: Include linux/compiler.h in asm/cmpxchg.h We need linux/compiler.h for unreachable(), so #include it here. Reported-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/include/asm/cmpxchg.h | 1 + 1 file changed, 1 insertion(+) commit c9406e514b95e825af20967430786a234d2dcabd Author: Will Deacon Date: Tue Feb 27 10:48:31 2018 +0000 arm64: move percpu cmpxchg implementation from cmpxchg.h to percpu.h We want to avoid pulling linux/preempt.h into cmpxchg.h, since that can introduce a circular dependency on linux/bitops.h. linux/preempt.h is only needed by the per-cpu cmpxchg implementation, which is better off alongside the per-cpu xchg implementation in percpu.h, so move it there and add the missing #include. Reported-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/include/asm/cmpxchg.h | 26 -------------------------- arch/arm64/include/asm/percpu.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 26 deletions(-) commit e8a2d040fee54606ff62cc1f22e14ad9b2677f15 Author: Will Deacon Date: Mon Feb 19 11:39:23 2018 +0000 arm64: cmpxchg: Include build_bug.h instead of bug.h for BUILD_BUG Having asm/cmpxchg.h pull in linux/bug.h is problematic because this ends up pulling in the atomic bitops which themselves may be built on top of atomic.h and cmpxchg.h. Instead, just include build_bug.h for the definition of BUILD_BUG. Signed-off-by: Will Deacon arch/arm64/include/asm/cmpxchg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a624f145c0d40903cb73090f51797e480bd1295 Author: Will Deacon Date: Mon Feb 19 13:08:56 2018 +0000 arm64: lse: Include compiler_types.h and export.h for out-of-line LL/SC When the LL/SC atomics are moved out-of-line, they are annotated as notrace and exported to modules. Ensure we pull in the relevant include files so that these macros are defined when we need them. Acked-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/include/asm/lse.h | 3 +++ 1 file changed, 3 insertions(+) commit b4f9b39074878ede60d3e7bdc64a2d89ed5e9297 Author: Will Deacon Date: Tue Feb 13 17:43:23 2018 +0000 arm64: fpsimd: include in fpsimd.h fpsimd.h uses the __init annotation, so pull in linux/init.h Acked-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/include/asm/fpsimd.h | 1 + 1 file changed, 1 insertion(+) commit 6a28ba26f8c8557d93fe7c8a82888fb1420b81a9 Author: Colin Ian King Date: Wed Mar 21 10:24:13 2018 +0000 dmaengine: dw-axi-dmac: fix spelling mistake: "catched" -> "caught" Trivial fix to spelling mistake in dev_err error message text Signed-off-by: Colin Ian King Signed-off-by: Vinod Koul drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f31b323675c11e41c117a4d31be3e93a9f79a07c Author: Peter Ujfalusi Date: Wed Mar 21 10:30:22 2018 +0200 dmaengine: edma: Check the memory allocation for the memcpy dma device If the allocation fails then disable the memcpy support. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/edma.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 65bd053fbf46c44b9862cb1e7d76ee84f90e386e Author: Alexander Monakov Date: Thu Mar 1 23:25:36 2018 +0300 drivers/perf: arm_pmu_platform: do not warn about affinity on uniprocessor If there is exactly one CPU present, there is no ambiguity: do not warn that PMU setup would need to guess IRQ affinity. Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Alexander Monakov Signed-off-by: Will Deacon drivers/perf/arm_pmu_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcd9f8315e6af1bbe6878c1084b142211f3d7e1f Author: Arnd Bergmann Date: Thu Feb 22 12:47:05 2018 +0100 perf: arm_spe: include linux/vmalloc.h for vmap() On linux-next, I get a build failure in some configurations: drivers/perf/arm_spe_pmu.c: In function 'arm_spe_pmu_setup_aux': drivers/perf/arm_spe_pmu.c:857:14: error: implicit declaration of function 'vmap'; did you mean 'swap'? [-Werror=implicit-function-declaration] buf->base = vmap(pglist, nr_pages, VM_MAP, PAGE_KERNEL); ^~~~ swap drivers/perf/arm_spe_pmu.c:857:37: error: 'VM_MAP' undeclared (first use in this function); did you mean 'VM_MPX'? buf->base = vmap(pglist, nr_pages, VM_MAP, PAGE_KERNEL); ^~~~~~ VM_MPX drivers/perf/arm_spe_pmu.c:857:37: note: each undeclared identifier is reported only once for each function it appears in drivers/perf/arm_spe_pmu.c: In function 'arm_spe_pmu_free_aux': drivers/perf/arm_spe_pmu.c:878:2: error: implicit declaration of function 'vunmap'; did you mean 'iounmap'? [-Werror=implicit-function-declaration] vmap() is declared in linux/vmalloc.h, so we should include that header file. Acked-by: Mark Rutland Signed-off-by: Arnd Bergmann [will: add additional missing #includes reported by Mark] Signed-off-by: Will Deacon drivers/perf/arm_spe_pmu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 7c006f5eea90ab5a1a0c771e4a5156d3407183da Merge: cdcdbbf 720b5fc Author: Arnd Bergmann Date: Tue Mar 27 14:11:05 2018 +0200 Merge tag 'samsung-dt-4.17-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Pull "Samsung DTS ARM changes for v4.17, part two" from Krzysztof Kozłowski: 1. Fix audio on Exynos5250 Chromebook Snow. 2. Enable HDMI audio Chromebook Snow, Peach Pit and Peach Pi. 3. Fix debounce of "OK" key on Midas (Trats2, Galaxy S3) boards. * tag 'samsung-dt-4.17-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Add #sound-dai-cells property to exynos5250 i2s nodes ARM: dts: exynos: Fix "debounce-interval" property misspelling in Midas ARM: dts: exynos: Enable HDMI audio support on Peach Pi ARM: dts: exynos: Enable HDMI audio support on Peach Pit ARM: dts: exynos: Enable HDMI audio on Snow Chromebook ARM: dts: exynos: Add missing clock and DAI properties to the max98095 node in Snow Chromebook ARM: dts: exynos: Add audio clocks configuration for Snow Chromebook ARM: dts: exynos: Add #sound-dai-cells property to hdmi node in exynos5250.dtsi commit 27a3ba538b831ef61e3fda3951ff30158d4ce934 Author: Fabio Estevam Date: Fri Mar 16 19:47:01 2018 -0300 pinctrl: msm8998: Remove owner assignment from platform_driver platform_driver does not need to set the owner field, as this will be populated by the driver core. Generated by scripts/coccinelle/api/platform_no_drv_owner.cocci. Signed-off-by: Fabio Estevam Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-msm8998.c | 1 - 1 file changed, 1 deletion(-) commit c5637476bbf9bb86c7f0413b8f4822a73d8d2d07 Author: Maxime Jayat Date: Thu Feb 22 12:39:55 2018 +0100 dmaengine: at_xdmac: fix rare residue corruption Despite the efforts made to correctly read the NDA and CUBC registers, the order in which the registers are read could sometimes lead to an inconsistent state. Re-using the timeline from the comments, this following timing of registers reads could lead to reading NDA with value "@desc2" and CUBC with value "MAX desc1": INITD -------- ------------ |____________________| _______________________ _______________ NDA @desc2 \/ @desc3 _______________________/\_______________ __________ ___________ _______________ CUBC 0 \/ MAX desc1 \/ MAX desc2 __________/\___________/\_______________ | | | | Events:(1)(2) (3)(4) (1) check_nda = @desc2 (2) initd = 1 (3) cur_ubc = MAX desc1 (4) cur_nda = @desc2 This is allowed by the condition ((check_nda == cur_nda) && initd), despite cur_ubc and cur_nda being in the precise state we don't want. This error leads to incorrect residue computation. Fix it by inversing the order in which CUBC and INITD are read. This makes sure that NDA and CUBC are always read together either _before_ INITD goes to 0 or _after_ it is back at 1. The case where NDA is read before INITD is at 0 and CUBC is read after INITD is back at 1 will be rejected by check_nda and cur_nda being different. Fixes: 53398f488821 ("dmaengine: at_xdmac: fix residue corruption") Cc: stable@vger.kernel.org Signed-off-by: Maxime Jayat Acked-by: Ludovic Desroches Signed-off-by: Vinod Koul drivers/dma/at_xdmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a5af5c9f877ae682a07a87c42191dcab11599c51 Author: Katsuhiro Suzuki Date: Wed Mar 14 15:35:35 2018 +0900 pinctrl: uniphier: divide I2S and S/PDIF audio out pin-mux group This patch divides large pin-mux group 'aio' of UniPhier LD11/LD20 to 2 groups as following: aout1 : 8ch I2S output: AO1DACCK, AO1BCK, AO1LRCK, AO1D[0-2] aoutiec1: S/PDIF output : AO1IEC, AO1ARC Signed-off-by: Katsuhiro Suzuki Acked-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c | 15 ++++++++++----- drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c | 15 ++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) commit 38eae3fa9dc8f27b1d4f5ee18b807544977c3530 Author: Katsuhiro Suzuki Date: Wed Mar 14 14:11:37 2018 +0900 pinctrl: uniphier: add PXs2 Audio in/out pin-mux settings The UniPhier PXs2 SoC audio core use following 25 pins: ain1 : 2ch I2S input : AI1ADCCK, AI1BCK, AI1D0, AI1LRCK ain2 : 8ch I2S input : AI2ADCCK, AI2BCK, AI2D[0-3], AI2LRCK ainiec1 : S/PDIF input : XIRQ17 (for AO1IEC) aout2 : 8ch I2S output: AO2BCK, AO2D0, AO2DACCK, AO2LRCK PORT226, 227, 230 (for AO2D[1-3]) aout3 : 2ch I2S output: AO3BCK, AO3DMIX, AO3DACCK, AO3LRCK aoutiec1: S/PDIF output : PORT132(for AO1IEC) aoutiec2: S/PDIF output : AO2IEC Signed-off-by: Katsuhiro Suzuki Acked-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit cdcdbbf350b544a05c13108c47955d39314f605f Merge: e5bdf77 a24a5821 Author: Arnd Bergmann Date: Tue Mar 27 13:32:53 2018 +0200 Merge tag 'renesas-dt-for-v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Pull "Renesas ARM Based SoC DT Updates for v4.17" from Simon Horman: * Silk board with R-Car E2 (r8a7794) SoC - Add r1ex24002 EEPROM to DT Magnus Damm says "Extend the Silk board support to include U14 which is an I2C based EEPROM hooked up to the I2C1 bus." - Add GPIO keys to DT Magnus Damm says "Extend the Silk board support to include SW3, SW4, SW6 and SW12. They are all connected via GPIO lines and handled by the gpio-keys driver" * Marzen board with R-Car H1 (r7a7779) SoC - Add SDHI0 VCCQ Regulator Magnus Damm says "Add support for the on-board voltage regulator hooked up to GPIO3_20 on r8a7779 Marzen. The board schematics describes the regulator as U4 TPS2110A. Input wise, U4 has D0 fixed to ground, D1 tied to GPIO3_20 while IN1 is fixed to 3.3V and IN2 is fixed to 1.8V. OUT goes to the pull-ups for the data pins of SDHI0." * Porter board with R-Car M3W (r8a7791) SoC - Fix HDMI output routing Laurent Pinchart says "The HDMI encoder is connected to the RGB output of the DU, which is port@0, not port@1." * iWave Systems RZ/G1E SODIMM System On Module (iW-RainboW-G22M-SM) and iWave Systems RZ/G1M Qseven System On Module (iW-RainboW-G20M-Qseven) - Enable cmt0 * Stout board with R-Car H2 (r8a7790) SoC - Initial support * Lager board with R-Car H2 (r8a7790) SoC - Add CEC clock for HDMI transmitter Niklas Söderlund says "The adv7511 on the Lager board has a 12 MHz fixed clock for the CEC block. Specify this in the dts to enable CEC support." - Move cec_clock to root node By definition nodes without a bus address do not belong on the bus * kzm9d board with EMMA Mobile EV2 (EMEV2) SoC - Fix "debounce-interval" property misspelling * RZ/G1M (r8a7743) and RZ/G1H (r8a7745) SoCs - Add IPMMU DT nodes - Add VSP support * R-Car Gen2 boards - Use I2C demuxer for This allows run-time switching between alternate I2C IP blocks * R-Car Gen2 and RZ/G1 SoCs - Clean up DT files to ease future maintenance + add soc node for IP attached to the bus + sort subnodes of soc and root node + consistently use single space after = * R-Car H2 (r8a7790), M3-W (r8a7791) and M3-N (r7a7793) SoCs - Reduce size of thermal registers According to the "User's Manual: Hardware" v2.00 the registers at base 0xe61f0000 extend to an offset of 0x10, rather than 0x14 which is the case on the r8a73a4 (R-Mobile APE6). This should not have any runtime affect as mapping granularity is PAGE_SIZE. * tag 'renesas-dt-for-v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (47 commits) ARM: dts: silk: Add GPIO keys to DT ARM: dts: silk: Add r1ex24002 EEPROM to DT ARM: dts: marzen: Add SDHI0 VCCQ Regulator ARM: dts: stout: Initial r8a7790 Stout board support ARM: dts: lager: Move cec_clock to root node ARM: dts: kzm9d: Fix "debounce-interval" property misspelling ARM: dts: gose: use demuxer for I2C4 ARM: dts: gose: use demuxer for I2C2 ARM: dts: silk: use demuxer for I2C1 ARM: dts: alt: use demuxer for I2C1 ARM: dts: porter: use demuxer for I2C2 ARM: dts: koelsch: use demuxer for I2C4 ARM: dts: koelsch: use demuxer for I2C2 ARM: dts: lager: use demuxer for IIC3/I2C3 ARM: dts: lager: use demuxer for IIC2/I2C2 ARM: dts: r8a7745: Add VSP support ARM: dts: r8a7743: Add VSP support ARM: dts: r8a7745: Add IPMMU DT nodes ARM: dts: r8a7743: Add IPMMU DT nodes ARM: dts: r8a7745: sort subnodes of soc node ... commit e5bdf7775eb8310a3c3a0d6ca55c94e868fcf76f Merge: f02e046 09bea76 Author: Arnd Bergmann Date: Tue Mar 27 13:30:50 2018 +0200 Merge tag 'renesas-dt-bindings-for-v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Pull "Renesas ARM Based SoC DT Bindings Updates for v4.17" from Simon Horman: * Document the bindings for: - R-Car V3H (r8a77980) SoC - Condor board with V3H (r8a77980) SoC - Stout (ADAS Starterkit) board with R-Car H2 (r8a7790) SoC - R-Car M3-N (r8a77965) SoC - Salvator-X and Salvator-XS boards with R-Car M3-N (r8a77965) SoC * Document that Armadillo-800 is compatibie with R-Mobile A1 (r8a7740) SoC * Document part numbers of Wheat and V3MSK boards * tag 'renesas-dt-bindings-for-v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas: dt-bindings: arm: Document Renesas R-Car M3-N-based Salvator-X board dt-bindings: arm: Document Renesas R-Car M3-N-based Salvator-XS board dt-bindings: arm: Document Renesas V3MSK and Wheat board part numbers dt-bindings: arm: Document SoC compatible value for Armadillo-800 EVA dt-bindings: arm: Document R-Car M3-N SoC DT bindings dt-bindings: arm: Document Renesas H2-based Stout DT bindings dt-bindings: arm: document Condor board bindings dt-bindings: arm: document R8A77980 SoC bindings commit f02e0468c4ddca24f904766a048ce135071ae80f Merge: d45357e ca565be Author: Arnd Bergmann Date: Tue Mar 27 13:28:10 2018 +0200 Merge tag 'renesas-arm64-dt-for-v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Pull "Renesas ARM64 Based SoC DT Updates for v4.17" from Simon Horman: * R-Car Gen3 boards and SoCs - Make phy-mode of EtherAVB a board-specific property. The SoC DTs file now uses "rgmii" and boards override this with "rgmii-txid" as appropriate. Previously "rgmii-txid" was used in SoC DTs but this did not describe that more sophiticated functionality is a board rather than SoC property. * Condor board with R-Car V3H (r8a77980) SoC - Initial upstream support * Condor board with R-Car V3H (r8a77980) SoC - Initial upstream support * R-Car D3 (r8a77995) - Add I2C nodes and then describing the PCA9654 I/O expander connected to the I2C0 bus. * Eagle board with R-Car V3M (r8a77970) SoC - Enable PFC support for configuring SCIF0 pins This uses PFC support added to the V3M DT - Describe EtherAVB PHY IRQ This uses support for GPIO added to the V3M DT - Enable I2C0 support Sergei Shtylyov says "The I2C0 bus is populated by ON Semiconductor PCA9653 I/O expander and Analog Devices ADV7511W HDMI transmitter (but we're only describing the former chip now)." * R-Car V3M (r8a77970) SoCs - Add PFC support - Describe GPIO devices - Describe I2C devices - Srt subnodes of root node alphabetically to eas future maintence overhead * Draak board with R-Car D3 (r8a77995) SoC - Enable SDHI2 Wolfram Sang says "The single SDHI controller is connected to eMMC." - Enable DU Kieran Bingham says "Enable the DU, providing only the VGA output for now." * R-Car D3 (r8a77995) and V3M (r8a77970) SoCs - Move nodes which have no reg property out of bus By deffinition the bus only has hardware with an address on the bus - Remove non-existing STBE region from EtherAVB Stream Buffer for EtherAVB-IF (STBE) is not present on these SoCs * R-Car D3 (r8a77995) SoC - Add FCPV, VSP and DU support Kieran Bingham says "The r8a77995-d3 platform supports 3 VSP instances. One VSPBS can be used as a dual-input image blender, while two VSPD instances can be utilised as part of a display (DU) pipeline. Add support for these, along with their required FCPV nodes." * Salvator-X and Salvator-XS boards with R-Car Gen3 SoCs - Add GPIO extender This is a basis for follow-up work to configure the GPIOs of the extender * Salvator-X and Salvator-XS board with R-Car M3-N (r8a77965) SoC - Initial upstream support * R-Car H3 (r8a7795) and M3-W (r8a7796) SoCs - Add OPPs table for cpu devices This, along with recently upstreamed Z and Z2 clock support allows use of CPUFreq with both A57 and A53 CPUs. - Add thermal cooling management Allows the use of CPUFreq as a cooling device on A57 CPUs - Correct register size of thermal node Niklas Söderlund says "To be able to read fused calibration values from hardware the size of the register resource of TSC1 needs to be incremented to cover one more register which holds the information if the calibration values have been fused or not. Instead of increasing TSC1 size to the value from the datasheet update all TSC's size to the smallest granularity of the address decoder circuitry" - Fix register mappings on VSPs Kieran Bingham says "The VSPD includes a CLUT on RPF2. Ensure that the register space is mapped correctly to support this." * R-Car H3 (r8a7795) SoC - Move SCIF node into alphabetical order to ease future maintenance overhead - Add IPMMU-PV1 device node This resolves an oversight when IPMMU nodes were added to the H3 DT. All IPMMU devices should now be described in DT. - Add missing SYS-DMAC2 dmas Geert Uytterhoeven says "On R-Car H3, on-chip peripheral modules that can make use of DMA are wired to either SYS-DMAC0 only, or to both SYS-DMAC1 and SYS-DMAC2. Add the missing DMA properties pointing to SYS-DMAC2 for HSCIF[0-2], SCIF[0125], and I2C[0-2]. These were initially left out because early firmware versions prohibited using SYS-DMAC2. This restriction has been lifted in IPL and Secure Monitor Rev1.0.6 (released on Feb 25, 2016)." * tag 'renesas-arm64-dt-for-v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (69 commits) arm64: dts: renesas: v3msk: add SCIF0 pins arm64: dts: renesas: r8a7795: Add missing SYS-DMAC2 dmas arm64: dts: renesas: r8a7795: Add IPMMU-PV1 device node arm64: dts: renesas: r8a77970: sort subnodes of root node alphabetically arm64: dts: renesas: eagle: add I2C0 support arm64: dts: renesas: r8a77970: add I2C support arm64: dts: renesas: r8a77965-salvator-xs: Add SoC name to file header arm64: dts: renesas: r8a77965: Add EtherAVB device node arm64: dts: renesas: r8a77970: Set EtherAVB phy mode to "rgmii" arm64: dts: renesas: r8a77995: Set EtherAVB phy mode to "rgmii" arm64: dts: renesas: r8a7795: Set EtherAVB phy mode to "rgmii" arm64: dts: renesas: r8a7796: Set EtherAVB phy mode to "rgmii" arm64: dts: renesas: v3msk: Override EtherAVB phy-mode arm64: dts: renesas: eagle: Override EtherAVB phy-mode arm64: dts: renesas: draak: Override EtherAVB phy-mode arm64: dts: renesas: ulcb: Override EtherAVB phy-mode arm64: dts: renesas: salvator-common: Override EtherAVB phy-mode arm64: dts: renesas: r8a77965: Add INTC-EX device node arm64: dts: renesas: r8a77965: Add IIC-DVFS device node arm64: dts: renesas: Add support for Salvator-XS with R-Car M3-N ... commit d45357e40e0f70ebef15abb62d2a5e22fcdb02ea Merge: b2fc264 0f2754c Author: Arnd Bergmann Date: Tue Mar 27 13:27:04 2018 +0200 Merge tag 'tegra-for-4.17-arm64-dt' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt Pull "arm64: tegra: Device tree changes for v4.17-rc1" from Thierry Reding: Adds initial support for the P2972-0000 development board based on Tegra194 and enables the AHCI controller on Jetson TX1. * tag 'tegra-for-4.17-arm64-dt' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Enable AHCI on Jetson TX1 arm64: tegra: Add SATA node for Tegra210 arm64: tegra: Add device tree for the Tegra194 P2972-0000 board arm64: tegra: Add Tegra194 chip device tree commit b2fc2640e875ca9a45bfd176689a4f632cade2a9 Merge: 2d78b1d 4957a2f Author: Arnd Bergmann Date: Tue Mar 27 13:19:34 2018 +0200 Merge tag 'tegra-for-4.17-arm-dt' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt Pull "ARM: tegra: Device tree changes for v4.17-rc1" from Thierry Reding: Support for the VDE is added on Tegra30 along with some general cleanup and some improvements to the various Toradex boards. * tag 'tegra-for-4.17-arm-dt' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: apalis-tk1: Support v1.2 hardware revision ARM: tegra: apalis-tk1: Copyright period, spurious newlines ARM: tegra: apalis-tk1: Hog group for ethernet, PCIe, reset GPIOs ARM: tegra: apalis-tk1: Add missing as3722 gpio0 configuration ARM: tegra: apalis-tk1: Activate PWM pin muxing for pwm3 ARM: tegra: apalis-tk1: Set critical trips ARM: tegra: apalis/colibri: Remove unneeded reg property ARM: tegra: apalis/colibri: Use correct compatible for RTC ARM: tegra: Fix I2C bus frequencies on Apalis/Colibri ARM: tegra: venice2: Remove duplicate pcie-1 node ARM: tegra: beaver: Remove invalid uses of rsvd1 ARM: tegra: Use proper IRQ type definitions ARM: tegra: Fix ULPI regression on Tegra20 ARM: tegra: Add unit address to VDE IRAM area ARM: tegra: Add video decoder node on Tegra30 ARM: tegra: Add IRAM node on Tegra30 commit 2d78b1dafc0b23fd04f27c6932b67f063ca0858d Merge: 4f21a12 2c73055 Author: Arnd Bergmann Date: Tue Mar 27 13:17:12 2018 +0200 Merge tag 'tegra-for-4.17-dt-bindings' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt Pull "dt-bindings: Tegra changes for v4.17-rc1" from Thierry Reding: Mostly cleanup of existing bindings and initial support for Tegra194. * tag 'tegra-for-4.17-dt-bindings' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt/bindings: Fix binding examples for Tegra GMI controller dt-bindings: phy: Clarify ULPI PHY source clock dt-bindings: tegra: Add documentation for nvidia,tegra194-pmc dt-bindings: tegra: Add missing chips and NVIDIA boards commit 3f251cf0abec2afb6eca67f71380670dd55bdebe Author: Will Deacon Date: Tue Mar 27 12:04:51 2018 +0100 Revert "arm64: Revert L1_CACHE_SHIFT back to 6 (64-byte cache line size)" This reverts commit 1f85b42a691cd8329ba82dbcaeec80ac1231b32a. The internal dma-direct.h API has changed in -next, which collides with us trying to use it to manage non-coherent DMA devices on systems with unreasonably large cache writeback granules. This isn't at all trivial to resolve, so revert our changes for now and we can revisit this after the merge window. Effectively, this just restores our behaviour back to that of 4.16. Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 - arch/arm64/include/asm/cache.h | 6 +++--- arch/arm64/include/asm/dma-direct.h | 43 ------------------------------------- arch/arm64/kernel/cpufeature.c | 9 ++++++-- arch/arm64/mm/dma-mapping.c | 17 --------------- arch/arm64/mm/init.c | 3 +-- 6 files changed, 11 insertions(+), 68 deletions(-) commit 12eb369125abe92bfc55e9ce198200f5807b63ff Author: Will Deacon Date: Tue Mar 27 11:51:12 2018 +0100 arm64: cpufeature: Avoid warnings due to unused symbols An allnoconfig build complains about unused symbols due to functions that are called via conditional cpufeature and cpu_errata table entries. Annotate these as __maybe_unused if they are likely to be generic, or predicate their compilation on the same option as the table entry if they are specific to a given alternative. Signed-off-by: Will Deacon arch/arm64/kernel/cpu_errata.c | 6 +++--- arch/arm64/kernel/cpufeature.c | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) commit 67bbd7a8d6bcdc44cc27105ae8c374e9176ceaf1 Author: Eric Dumazet Date: Fri Mar 23 14:58:18 2018 -0700 x86/cpuid: Allow cpuid_read() to schedule High latencies can be observed caused by a daemon periodically reading CPUID on all cpus. On KASAN enabled kernels ~10ms latencies can be observed. Even without KASAN, sending an IPI to a CPU, which is in a deep sleep state or in a long hard IRQ disabled section, waiting for the answer can consume hundreds of microseconds. cpuid_read() is invoked in preemptible context, so it can be converted to sleep instead of busy wait. Switching to smp_call_function_single_async() and a completion allows to reschedule and reduces CPU usage and latencies. Signed-off-by: Eric Dumazet Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Cc: Hugh Dickins Cc: Borislav Petkov Cc: Eric Dumazet Link: https://lkml.kernel.org/r/20180323215818.127774-2-edumazet@google.com arch/x86/kernel/cpuid.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit 07cde313b2d21f728cec2836db7cdb55476f7a26 Author: Eric Dumazet Date: Fri Mar 23 14:58:17 2018 -0700 x86/msr: Allow rdmsr_safe_on_cpu() to schedule High latencies can be observed caused by a daemon periodically reading various MSR on all cpus. On KASAN enabled kernels ~10ms latencies can be observed simply reading one MSR. Even without KASAN, sending an IPI to a CPU, which is in a deep sleep state or in a long hard IRQ disabled section, waiting for the answer can consume hundreds of microseconds. All usage sites are in preemptible context, convert rdmsr_safe_on_cpu() to use a completion instead of busy polling. Overall daemon cpu usage was reduced by 35 %, and latencies caused by msr_read() disappeared. Signed-off-by: Eric Dumazet Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Cc: Hugh Dickins Cc: Borislav Petkov Cc: Eric Dumazet Link: https://lkml.kernel.org/r/20180323215818.127774-1-edumazet@google.com arch/x86/lib/msr-smp.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) commit 547edaca247abf910e32f0cd883ba83b8fc6d0ed Author: Kirill A. Shutemov Date: Thu Mar 15 16:49:06 2018 +0300 x86/mm: Update comment in detect_tme() regarding x86_phys_bits As Kai pointed out, the primary reason for adjusting x86_phys_bits is to reflect that the the address space is reduced and not the ability to communicate the available physical address space to virtual machines. Suggested-by: Kai Huang Signed-off-by: Kirill A. Shutemov Signed-off-by: Thomas Gleixner Cc: Tom Lendacky Cc: Dave Hansen Cc: linux-mm@kvack.org Link: https://lkml.kernel.org/r/20180315134907.9311-2-kirill.shutemov@linux.intel.com arch/x86/kernel/cpu/intel.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit e10734e5a0285220f46a37e8bbdfb241acebb04b Author: Sean Wang Date: Thu Mar 15 15:40:37 2018 +0800 dmaengine: mediatek: update MAINTAINERS entry with MediaTek DMA driver I work for MediaTek and maintain SoC targeting to home gateway and also will keep extending and testing the function. Signed-off-by: Sean Wang Signed-off-by: Vinod Koul MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 548c4597e984b79aad8190235d664f1c3a433f94 Author: Sean Wang Date: Thu Mar 15 15:40:36 2018 +0800 dmaengine: mediatek: Add MediaTek High-Speed DMA controller for MT7622 and MT7623 SoC MediaTek High-Speed DMA controller (HSDMA) on MT7622 and MT7623 SoC has a single ring is dedicated to memory-to-memory transfer through ring based descriptor management. Even though there is only one physical ring available inside HSDMA, the driver can be easily extended to the support of multiple virtual channels processing simultaneously by means of DMA_VIRTUAL_CHANNELS effort. Signed-off-by: Sean Wang Cc: Randy Dunlap Cc: Fengguang Wu Cc: Julia Lawall Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 + drivers/dma/Makefile | 1 + drivers/dma/mediatek/Kconfig | 13 + drivers/dma/mediatek/Makefile | 1 + drivers/dma/mediatek/mtk-hsdma.c | 1056 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 1073 insertions(+) commit 33f32c0e1eb710fb9bca647e0e9b439d88961ea9 Author: Sean Wang Date: Thu Mar 15 15:40:35 2018 +0800 dt-bindings: dmaengine: Add MediaTek High-Speed DMA controller bindings Document the devicetree bindings for MediaTek High-Speed DMA controller which could be found on MT7623 SoC or other similar Mediatek SoCs. Signed-off-by: Sean Wang Reviewed-by: Rob Herring Signed-off-by: Vinod Koul .../devicetree/bindings/dma/mtk-hsdma.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 47a9973d3ed8994589c845c8b1a293a475a549a9 Author: Andy Shevchenko Date: Tue Mar 20 20:08:00 2018 +0200 x86/PCI: Fix a potential regression when using dmi_get_bios_year() dmi_get_bios_year() may return 0 when it cannot parse the BIOS date string. Previously this has been checked in pci_acpi_crs_quirks(). Update the code to restore old behaviour. Reported-by: Jean Delvare Signed-off-by: Andy Shevchenko Reviewed-by: Jean Delvare Reviewed-by: Rafael J. Wysocki Acked-by: Thomas Gleixner Cc: Bjorn Helgaas Cc: Linus Torvalds Cc: Lukas Wunner Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: linux-acpi@vger.kernel.org Cc: linux-pci@vger.kernel.org Fixes: 69c42d493db4 ("x86/pci: Simplify code by using the new dmi_get_bios_year() helper") Signed-off-by: Ingo Molnar arch/x86/pci/acpi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3af345258617e0412059c1ab6462495947f73e89 Author: Andy Shevchenko Date: Tue Mar 20 20:07:59 2018 +0200 firmware/dmi_scan: Uninline dmi_get_bios_year() helper Uninline dmi_get_bios_year() which, in particular, allows us to optimize it in the future. While doing this, convert the function to return an error code when BIOS date is not present or not parsable, or CONFIG_DMI=n. Additionally, during the move, add a bit of documentation. Suggested-by: Bjorn Helgaas Suggested-by: Rafael J. Wysocki Signed-off-by: Andy Shevchenko Reviewed-by: Jean Delvare Reviewed-by: Rafael J. Wysocki Acked-by: Thomas Gleixner Cc: Bjorn Helgaas Cc: Linus Torvalds Cc: Lukas Wunner Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: linux-acpi@vger.kernel.org Cc: linux-pci@vger.kernel.org Fixes: 492a1abd61e4 ("dmi: Introduce the dmi_get_bios_year() helper function") Signed-off-by: Ingo Molnar drivers/firmware/dmi_scan.c | 20 ++++++++++++++++++++ include/linux/dmi.h | 11 ++--------- 2 files changed, 22 insertions(+), 9 deletions(-) commit 75a24b822d383489badd343cab4cb171d09f93ef Author: Martin Kelly Date: Mon Mar 26 11:18:23 2018 -0700 kfifo: fix inaccurate comment The comment in __kfifo_alloc says we round down, but we actually round up, so correct it. Signed-off-by: Martin Kelly Signed-off-by: Jiri Kosina lib/kfifo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c03a5aacde0c86f6dabab8f17a6d1911ee13b6c4 Author: Lorenzo Bianconi Date: Sat Mar 17 15:01:39 2018 +0100 mt76x2: fix warning in ieee80211_get_key_rx_seq() Fall back to software encryption for hw unsupported ciphers in order to fix the following warning in ieee80211_get_key_rx_seq routine: WARNING: CPU: 1 PID: 1277 at backports-2017-11-01/net/mac80211/key.c: 1010 mt76_wcid_key_setup+0x6c/0x138 [mt76] CPU: 1 PID: 1277 Comm: hostapd Tainted: G W 4.9.86 #0 Stack : 00000000 00000000 80527b4a 00000042 80523824 00000000 00000000 80520000 8fd79a9c 804bbda7 80454c84 00000001 000004fd 80523824 8f7e4ba0 8eceda12 00000010 8006af94 00000001 80520000 804c1f04 804c1f08 80459890 8ec999b4 00000003 800a7840 8f7e4ba0 8eceda12 8121de20 00000000 00000001 00c999b4 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ... Call Trace: [<8000f52c>] show_stack+0x70/0x8c [<801d8d04>] dump_stack+0x94/0xd0 [<8002bcd4>] __warn+0x110/0x118 [<8002bd70>] warn_slowpath_null+0x1c/0x2c [<8f0415cc>] mt76_wcid_key_setup+0x6c/0x138 [mt76] [<8f1311b4>] mt76x2_dma_cleanup+0xa38/0x1048 [mt76x2e] Fixes: 30ce7f4456ae ("mt76: validate rx CCMP PN") Signed-off-by: Lorenzo Bianconi Acked-by: Felix Fietkau Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6958b027435aa54d82bbef09a007fd287f439977 Author: Lorenzo Bianconi Date: Sat Mar 17 12:29:27 2018 +0100 mt76x2: fix possible NULL pointer dereferencing in mt76x2_tx() Fix a theoretical NULL pointer dereferencing in mt76x2_tx routine that can occurs for injected frames in a monitor vif since vif pointer could be NULL for that interfaces Fixes: 23405236460b ("mt76: fix transmission of encrypted mgmt frames") Signed-off-by: Lorenzo Bianconi Acked-by: Felix Fietkau Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt76/mt76x2_tx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit db2ad7c25a9a01aaa53f8a74ff8ce6f35e61179f Author: Lorenzo Bianconi Date: Thu Mar 15 18:24:20 2018 +0100 mt76: use mt76_poll_msec routine in mt76pci_load_firmware() Use mt76_poll_msec() in mt76pci_load_firmware to check if the firmware has been started instead of explicitly poll MCU running register Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit b1c2d0f2507bf56d9f4dbd46dc4b99240fbd187c Author: Takashi Iwai Date: Fri Mar 16 16:41:49 2018 +0100 brcmsmac: allocate ucode with GFP_KERNEL The brcms_ucode_init_buf() duplicates the ucode chunks via kmemdup() with GFP_ATOMIC as a precondition of wl->lock acquired. This caused allocation failures sometimes as reported in the bugzilla below. When looking at the the real usage, one can find that it's called solely from brcms_request_fw(), and it's obviously outside the lock. Hence we can use GFP_KERNEL there safely for avoiding such allocation errors. Bugzilla: http://bugzilla.suse.com/show_bug.cgi?id=1085174 Signed-off-by: Takashi Iwai Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 48eaee3f272a5bfe6986d07c51f6975d3c2f74d1 Author: Arend Van Spriel Date: Thu Mar 22 21:28:31 2018 +0100 brcmfmac: add kerneldoc for struct brcmf_bus::msgbuf This field did not have kerneldoc description so adding it now. Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 1 + 1 file changed, 1 insertion(+) commit bf291b7247e53f52a4236c0b55a5df046d6177df Author: Arend Van Spriel Date: Thu Mar 22 21:28:30 2018 +0100 brcmfmac: get rid of brcmf_fw_get_full_name() The function was pretty minimal and now it is called only from one place so just get rid of it. Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 18c2b20e276e04476a3350b4a92c1dfad725d45d Author: Arend Van Spriel Date: Thu Mar 22 21:28:29 2018 +0100 brcmfmac: get rid of brcmf_fw_map_chip_to_name() The function is no longer used so removing it. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/firmware.c | 53 ---------------------- .../broadcom/brcm80211/brcmfmac/firmware.h | 4 -- 2 files changed, 57 deletions(-) commit bf7a7b37f6ef5090a2bae7e7ae23cd26b741cca4 Author: Arend Van Spriel Date: Thu Mar 22 21:28:28 2018 +0100 brcmfmac: add extension to .get_fwname() callbacks This changes the bus layer api by having the caller provide an extension. With this the callback can use brcmf_fw_alloc_request() to get the needed firmware name. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 6 +-- .../wireless/broadcom/brcm80211/brcmfmac/common.c | 43 +++------------------- .../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 27 +++++++------- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 26 +++++++------ .../net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 27 ++++++++------ 5 files changed, 51 insertions(+), 78 deletions(-) commit 2baa3aaee27f137b8db9a9224d0fe9b281d28e34 Author: Arend Van Spriel Date: Thu Mar 22 21:28:27 2018 +0100 brcmfmac: introduce brcmf_fw_alloc_request() function The function brcmf_fw_alloc_request() takes a list of required files and allocated the struct brcmf_fw_request instance accordingly. The request can be modified by the caller before being passed to the brcmf_fw_request_firmwares() function. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/firmware.c | 58 ++++++++++++++++++++++ .../broadcom/brcm80211/brcmfmac/firmware.h | 11 ++++ .../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 58 ++++++++++++---------- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 38 ++++++++------ .../net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 42 +++++++++------- 5 files changed, 147 insertions(+), 60 deletions(-) commit d09ae51a4b676151edaf572bcd5f272b5532639f Author: Arend Van Spriel Date: Thu Mar 22 21:28:26 2018 +0100 brcmfmac: pass struct in brcmf_fw_get_firmwares() Make the function brcmf_fw_get_firmwares() a bit more easy to extend using a structure to pass the request parameters. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/firmware.c | 175 ++++++++++++++------- .../broadcom/brcm80211/brcmfmac/firmware.h | 43 +++-- .../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 38 ++++- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 32 +++- .../net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 43 ++++- 5 files changed, 245 insertions(+), 86 deletions(-) commit 41f573dbb534f14e62a4a5411f602c970cad1d77 Author: Arend Van Spriel Date: Thu Mar 22 21:28:25 2018 +0100 brcmfmac: derive firmware filenames from basename mapping Instead of defining individual filenames for firmware and nvram use a basename and derive the names from that. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/firmware.c | 31 ++++++--- .../broadcom/brcm80211/brcmfmac/firmware.h | 24 ++----- .../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 56 ++++++++--------- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 73 +++++++++++----------- .../net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 10 +-- 5 files changed, 96 insertions(+), 98 deletions(-) commit 34789d0cf682c643862792750a06c31ccf016cbc Author: Arend Van Spriel Date: Thu Mar 22 21:28:24 2018 +0100 brcmfmac: use wiphy debugfs dir entry The driver used to create a brcmfmac dir entry at the top level debugfs mount point. This moves the debugfs entries into the wiphy debugfs dir entry. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 6 ++++ .../wireless/broadcom/brcm80211/brcmfmac/common.c | 5 --- .../wireless/broadcom/brcm80211/brcmfmac/core.c | 11 +++--- .../wireless/broadcom/brcm80211/brcmfmac/debug.c | 42 ++-------------------- .../wireless/broadcom/brcm80211/brcmfmac/debug.h | 17 --------- .../wireless/broadcom/brcm80211/brcmfmac/feature.c | 3 ++ .../wireless/broadcom/brcm80211/brcmfmac/feature.h | 7 ++++ .../broadcom/brcm80211/brcmfmac/fwsignal.c | 11 +++--- .../broadcom/brcm80211/brcmfmac/fwsignal.h | 1 + .../wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 8 +++-- .../wireless/broadcom/brcm80211/brcmfmac/proto.c | 3 +- .../wireless/broadcom/brcm80211/brcmfmac/proto.h | 7 ++++ 12 files changed, 47 insertions(+), 74 deletions(-) commit 856d5a011c86b59f6564be4508912fb1d866adfc Author: Arend Van Spriel Date: Thu Mar 22 21:28:23 2018 +0100 brcmfmac: allocate struct brcmf_pub instance using wiphy_new() Rework the driver so the wiphy instance holds the main driver information in its private buffer. Previously it held struct brcmf_cfg80211_info instance so a bit of reorg was needed. This was done so that the wiphy name or its parent device can be shown in debug output. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/btcoex.c | 2 +- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 86 ++++++++++------------ .../broadcom/brcm80211/brcmfmac/cfg80211.h | 17 +++-- .../wireless/broadcom/brcm80211/brcmfmac/common.c | 2 + .../wireless/broadcom/brcm80211/brcmfmac/core.c | 27 +++++-- .../wireless/broadcom/brcm80211/brcmfmac/core.h | 1 + .../net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 2 +- 7 files changed, 76 insertions(+), 61 deletions(-) commit c88cfa075de356ddf40c668896b2126340f19ba4 Author: Arend Van Spriel Date: Thu Mar 22 21:28:22 2018 +0100 brcmfmac: use brcmf_chip_name() for consistency When logging the chip id/revision information make use of brcmf_chip_name() so it is always the same. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 5 ++--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 7 +++++-- 2 files changed, 7 insertions(+), 5 deletions(-) commit 756a2b390874d274f2f615921318ef0856ff9313 Author: Arend Van Spriel Date: Thu Mar 22 21:28:21 2018 +0100 brcmfmac: use brcmf_chip_name() to store name in revinfo The chip id can either be four or five digits. For the chip name either the hexadecimal value needs to be taken (four digits) or the decimal value (five digits). The function brcmf_chip_name() does this conversion so use it to store the name in driver revision info. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/chip.c | 9 +++++---- .../wireless/broadcom/brcm80211/brcmfmac/chip.h | 3 ++- .../wireless/broadcom/brcm80211/brcmfmac/common.c | 23 ++++++++++++++++------ .../wireless/broadcom/brcm80211/brcmfmac/core.c | 10 +--------- .../wireless/broadcom/brcm80211/brcmfmac/core.h | 3 +-- 5 files changed, 26 insertions(+), 22 deletions(-) commit 1170f6d1be6a39e1a115a2c0f50923eb4ce2a7ec Author: Arend Van Spriel Date: Thu Mar 22 21:28:20 2018 +0100 brcmfmac: do not convert linux error to firmware error string In case of a linux error brcmf_fil_cmd_data() blurts an error message in which the error code is translated to an error string. However, it maps it to a firmware error string which should not happen. Simply print only the numeric error code and be done with it. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0089313d8595b76422b189b44c55556cb1004190 Merge: 5573fe8 e2749bb Author: Philipp Zabel Date: Tue Mar 27 10:45:36 2018 +0200 Merge branch 'reset/lookup' into reset/next Merge the reset lookup support for non-DT platforms, from an immutable branch provided for merging into the davinci tree. commit e153292ae4d1e0c5b27677db9356725f5b614134 Author: Colin Ian King Date: Mon Mar 19 10:40:54 2018 +0000 rtlwifi: rtl8821ae: fix spelling mistake: "Aboslute" -> "Absolute" Trivial fix to spelling mistake in RT_TRACE message text. Signed-off-by: Colin Ian King Acked-by: Larry Finger drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 692f5deccdae665925cd9542d460fe4771835be5 Author: Kevin Lo Date: Sat Mar 17 22:26:07 2018 +0800 rtlwifi: correct comment Correct comment. Set bit 3 and bit 4 of 0x0005 register (REG_APS_FSMCO + 1) to 0 which means disable WL suspend, not enable WL suspend. Signed-off-by: Kevin Lo Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8188ee/pwrseq.h | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/pwrseq.h | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/pwrseq.h | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8723be/pwrseq.h | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/pwrseq.h | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) commit c3788947251565efa69ae0e1cfa9a1b697429ae9 Author: Ping-Ke Shih Date: Tue Mar 6 09:25:50 2018 +0800 rtlwifi: btcoex: Add new but dummy definitions introduced by 8822b btcoex support multiple platforms, but this drivers doesn't support full functions yet, so this commit adds dummy definitions. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 9 +++++++++ drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 3 +++ 2 files changed, 12 insertions(+) commit b82f5e0fd2a224df544d3383836274a195f2549d Author: Ping-Ke Shih Date: Tue Mar 6 09:25:49 2018 +0800 rtlwifi: btcoex: new definitions introduced by 8822be New constant and variables definitions are used by btcoex of 8822b, so this commit add them. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 0843e98a3b9a373f63465fcfbcac31108fd6c3a3 Author: Ping-Ke Shih Date: Tue Mar 6 09:25:48 2018 +0800 rtlwifi: btcoex: add assoc type v2 to connection notify In connection notify v1, btcoex only need to know start/end association, and it will discriminate 2G and 5G band in v2. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 14 +++++++++++--- .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) commit c3468950ef802c659c0ac215e757163833bc563f Author: Ping-Ke Shih Date: Tue Mar 6 09:25:47 2018 +0800 rtlwifi: btcoex: Add pre- and post- normal LPS function Normal LPS is decomposed into pre- and post- parts, so we can issue H2C with TDMA parameters in the "critical section" that dirver can't change LPS state at the moment. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 22 ++++++++++++++++++++++ .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 2 ++ 2 files changed, 24 insertions(+) commit 7fd34dc4d827d3ba87e650cbb36aa0cbeca50d79 Author: Ping-Ke Shih Date: Tue Mar 6 09:25:46 2018 +0800 rtlwifi: btcoex: Add interaction with phydm Get phydm's counter and version from the module phydm that is not submitted so we implement dummy functions. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 38 ++++++++++++++++++++++ .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 6 ++++ 2 files changed, 44 insertions(+) commit 1f0ab4fbacc60d24e76e311bdd8975a32312672f Author: Ping-Ke Shih Date: Tue Mar 6 09:25:45 2018 +0800 rtlwifi: btcoex: Add rate table for the use of btcoex The btcoex use the rate to rsolve IOT issue that some APs reduce TX rate quickly, so it uses the RX rate as a clue to decide TDMA. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit 123068f2eb30ad4e05dc9d0732d8cc05a82e6983 Author: Ping-Ke Shih Date: Tue Mar 6 09:25:44 2018 +0800 rtlwifi: btcoex: Get status of multichannel concurrence btcoex does different decision according to MCC or SCC status, but driver is still SCC currently. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 3 +++ drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 8 ++++++++ 2 files changed, 11 insertions(+) commit a1ee1a09cbba06a5927030df466536d556914e0e Author: Ping-Ke Shih Date: Tue Mar 6 09:25:43 2018 +0800 rtlwifi: btcoex: Add customer_id to do special deal to oem vendor Add customer_id field in structure, and then this is a clue to implement the behavior defined by vendor LENOVO_CHINA. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 1 + drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 + 2 files changed, 2 insertions(+) commit 5ffd1155d536d337058dfc677b1256e7d11e4e59 Author: Ping-Ke Shih Date: Tue Mar 6 09:25:42 2018 +0800 rtlwifi: btcoex: Add enum DM_INFO for btcoex to query dm's counters btcoex uses dm's counters to check the environment is noisy or not. If it is clean, btcoex set more time slots to WiFi so that it can transmit as soon as possible. That will save time, and BT will have more time slots after WiFi traffic is complete. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/wifi.h | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 757a9eb8df1f224991a3358b59781d842ebce4ff Author: Ping-Ke Shih Date: Tue Mar 6 09:25:41 2018 +0800 rtlwifi: remove redundant statement found by static checker smatch reports "rtl_is_special_data() warn: inconsistent indenting", but it is an obvious redundant statement so remove it. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 1 - 1 file changed, 1 deletion(-) commit 91b9e6844240fc79e1155ac6fe36d2cebc292718 Author: Ping-Ke Shih Date: Tue Mar 6 09:25:40 2018 +0800 rtlwifi: Add modifier static to functions reported by sparse sparse reports some functions were not declared, so add 'static' as modifier. Remove an unused function btc8821a1ant_is_wifi_status_changed() exposed due to 'static'. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 1 + .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 6 ++-- .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 33 ---------------------- .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 4 +-- 4 files changed, 6 insertions(+), 38 deletions(-) commit 864db4d5085349fcfa1f260b5bcd2adde3d7f2ed Author: Amitkumar Karwar Date: Tue Mar 20 19:10:41 2018 +0530 rsi: fix kernel panic observed on 64bit machine Following kernel panic is observed on 64bit machine while loading the driver. It is fixed if we pass dynamically allocated memory to SDIO for DMA. BUG: unable to handle kernel paging request at ffffeb04000172e0 IP: sg_miter_stop+0x56/0x70 PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI Modules linked in: rsi_sdio(OE+) rsi_91x(OE) btrsi(OE) rfcomm bluetooth ecdh_generic mac80211 mmc_block fuse xt_CHECKSUM iptable_mangle drm_kms_helper mmc_core serio_raw drm firewire_ohci tg3 CPU: 0 PID: 4003 Comm: insmod Tainted: G OE 4.16.0-rc1+ #27 Hardware name: Dell Inc. Latitude E5500 /0DW634, BIOS A19 06/13/2013 RIP: 0010:sg_miter_stop+0x56/0x70 RSP: 0018:ffff88007d003e78 EFLAGS: 00010002 RAX: 0000000000000003 RBX: 0000000000000004 RCX: 0000000000000000 RDX: ffffeb04000172c0 RSI: ffff88002f58002c RDI: ffff88007d003e80 RBP: 0000000000000004 R08: ffff88007d003e80 R09: 0000000000000008 R10: 0000000000000003 R11: 0000000000000001 R12: 0000000000000004 R13: ffff88002f580028 R14: 0000000000000000 R15: 0000000000000004 FS: 00007f35c29db700(0000) GS:ffff88007d000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffeb04000172e0 CR3: 000000007038e000 CR4: 00000000000406f0 Call Trace: sg_copy_buffer+0xc6/0xf0 sdhci_tasklet_finish+0x170/0x260 [sdhci] tasklet_action+0xf4/0x100 __do_softirq+0xef/0x26e irq_exit+0xbe/0xd0 do_IRQ+0x4a/0xc0 common_interrupt+0xa2/0xa2 Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_sdio.c | 32 +++++++++++++++++++++----------- drivers/net/wireless/rsi/rsi_sdio.h | 2 ++ 2 files changed, 23 insertions(+), 11 deletions(-) commit 90b12aebe54b9157a28f5131203f48ad943ba79a Author: Amitkumar Karwar Date: Tue Mar 20 19:10:40 2018 +0530 rsi: fix error path handling in SDIO probe We miss to release IRQ in certain error path in SDIO probe which causes following kernel panic. This patch corrects error path handling BUG: unable to handle kernel NULL pointer dereference at (null) IP: (null) PGD 0 P4D 0 Oops: 0010 [#1] SMP PTI Call Trace: ? call_timer_fn+0x29/0x120 ? run_timer_softirq+0x1da/0x420 ? timer_interrupt+0x11/0x20 ? __do_softirq+0xef/0x26e ? irq_exit+0xbe/0xd0 ? do_IRQ+0x4a/0xc0 ? common_interrupt+0xa2/0xa2 ? cpuidle_enter_state+0x118/0x250 ? do_idle+0x186/0x1e0 ? cpu_startup_entry+0x6f/0x80 ? start_kernel+0x47c/0x49c ? secondary_startup_64+0xa5/0xb0 Fixes: 50117605770c ("rsi: improve RX handling in SDIO interface") Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_sdio.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit a31f9314114cc884b9979c16b6e147e37ac729d6 Author: Colin Ian King Date: Wed Mar 14 14:12:39 2018 +0000 rsi: remove redundant duplicate assignment of buffer_size Variable buffer_size is re-assigned the same value, this duplicated assignment is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/rsi/rsi_91x_usb.c:140:4: warning: Value stored to 'buffer_size' is never read Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_usb.c | 1 - 1 file changed, 1 deletion(-) commit 7bbd523c73c9fe0dac7938065f7f5a7167f59b5d Author: Linus Walleij Date: Thu Mar 22 11:18:30 2018 +0100 rtc: ab8500: Drop AB8540 support The AB8540 was an evolved version of the AB8500, but it was never mass produced or put into products, only reference designs exist. The upstream support was never completed and it is unlikely that this will happen so drop the support for now to simplify maintenance of the AB8500. Cc: Loic Pallardy Signed-off-by: Linus Walleij Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ab8500.c | 55 ------------------------------------------------ 1 file changed, 55 deletions(-) commit c7d50d2b728cc29535fbc1de7cae25ab14629642 Author: Mathieu Malaterre Date: Thu Feb 1 17:47:14 2018 +0100 rtc: remove a warning during scripts/kernel-doc step During compilation using W=1 one would get: drivers/rtc/systohc.c:11: info: Scanning doc for rtc_set_ntp_time drivers/rtc/systohc.c:23: warning: bad line: ( Signed-off-by: Mathieu Malaterre Signed-off-by: Alexandre Belloni drivers/rtc/systohc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9dddb1bdf60b9eeb8e37d92afe53f6bc69aa6410 Author: Alexandre Belloni Date: Mon Mar 12 03:00:53 2018 +0100 rtc: 88pm860x: remove artificial limitation The 88pm860x supports time up to 2106 (it is a 32 bit counter). Also, the year will never be before 1970 as the RTC core forbids that. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-88pm860x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit df15ee19da4615705b82a3975410d42c8da406e0 Author: Alexandre Belloni Date: Sat Mar 10 14:29:28 2018 +0100 rtc: 88pm80x: remove artificial limitation The 88pm80x supports time up to 2106 (it is a 32 bit counter). Also, the year will never be before 1970 as the RTC core forbids that. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-88pm80x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88c998743105806f6564ccb660b5b993dba0e741 Author: Alexandre Belloni Date: Sat Mar 10 06:35:08 2018 +0100 rtc: st-lpc: remove artificial limitation The LPC RTC supports dates way beyond 2038, don't limit it artificially as the kernel handles dates after 2038 properly. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-st-lpc.c | 16 ---------------- 1 file changed, 16 deletions(-) commit f441f98f5834a7f9734f6b183b5580f510344a87 Author: Alexandre Belloni Date: Sat Mar 10 06:32:00 2018 +0100 rtc: mrst: remove artificial limitation The hardware supports years up to 100 so don't limit the year to 2038 artificially. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-mrst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 844cba65bf92863ebdb05047eeb843d895d6b7c2 Author: Alexandre Belloni Date: Thu Mar 8 23:32:51 2018 +0100 rtc: mv: remove artificial limitation Dates after 2038 actually fit on 32 bits. The counter will overflow in 2106. Also, it is bad practice to reset the RTC to a default value. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-mv.c | 12 ------------ 1 file changed, 12 deletions(-) commit b3a5ac42ab18b7d1a8f2f072ca0ee76a3b754a43 Author: Alexandre Belloni Date: Thu Mar 8 23:27:31 2018 +0100 rtc: hctosys: Ensure system time doesn't overflow time_t On 32bit platforms, time_t is still a signed 32bit long. If it is overflowed, userspace and the kernel cant agree on the current system time. This causes multiple issues, in particular with systemd: https://github.com/systemd/systemd/issues/1143 A good workaround is to simply avoid using hctosys which is something I greatly encourage as the time is better set by userspace. However, many distribution enable it and use systemd which is rendering the system unusable in case the RTC holds a date after 2038 (and more so after 2106). Many drivers have workaround for this case and they should be eliminated so there is only one place left to fix when userspace is able to cope with dates after the 31bit overflow. Acked-by: Arnd Bergmann Signed-off-by: Alexandre Belloni drivers/rtc/hctosys.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5573fe85c7e6f94613a357bfcbcec2b57492a8ed Author: Kunihiko Hayashi Date: Fri Mar 23 14:12:34 2018 +0900 reset: uniphier: add ethernet reset control support for PXs3 Add reset lines for ethernet controller on PXs3 SoC. Signed-off-by: Kunihiko Hayashi Acked-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/reset-uniphier.c | 2 ++ 1 file changed, 2 insertions(+) commit 197858b68532d415f21a5a92fb6661c67c6c9a97 Author: Gabriel Fernandez Date: Mon Mar 19 08:25:51 2018 +0100 reset: stm32mp1: Enable stm32mp1 reset driver stm32mp1 RCC IP 1 has a reset SET register and a reset CLEAR register. Writing '0' on reset SET register has no effect Writing '1' on reset SET register activates the reset of the corresponding peripheral Writing '0' on reset CLEAR register has no effect Writing '1' on reset CLEAR register releases the reset of the corresponding peripheral See Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.txt Signed-off-by: Gabriel Fernandez Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 6 +++ drivers/reset/Makefile | 1 + drivers/reset/reset-stm32mp1.c | 115 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 122 insertions(+) commit dae5af9762c8f03233b68401ecc4fab4befae11c Author: Gabriel Fernandez Date: Mon Mar 19 08:25:50 2018 +0100 dt-bindings: reset: add STM32MP1 resets This patch adds the reset binding entry for STM32MP1 Signed-off-by: Gabriel Fernandez Reviewed-by: Rob Herring Signed-off-by: Philipp Zabel .../devicetree/bindings/reset/st,stm32mp1-rcc.txt | 6 ++ include/dt-bindings/reset/stm32mp1-resets.h | 108 +++++++++++++++++++++ 2 files changed, 114 insertions(+) commit b06b631c8b67aafd57cfbc0313bdfec0db62cacb Author: Katsuhiro Suzuki Date: Thu Mar 8 17:09:29 2018 +0900 reset: uniphier: add Pro4/Pro5/PXs2 audio systems reset control Add reset lines for audio subsystem (AIO) on UniPhier Pro4/Pro5/PXs2 SoCs. Signed-off-by: Katsuhiro Suzuki Acked-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/reset-uniphier.c | 3 +++ 1 file changed, 3 insertions(+) commit 8fa566206efdef4d3ec7f13bed36302f9969f2ef Author: Masahiro Yamada Date: Tue Mar 6 20:15:11 2018 +0900 reset: imx7: add 'depends on HAS_IOMEM' to fix unmet dependency This config select's MFD_SYSCON, but does not depend on HAS_IOMEM. Compile testing on architecture without HAS_IOMEM causes "unmet direct dependencies" in Kconfig phase. Detected by "make ARCH=score allyesconfig". Signed-off-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 1 + 1 file changed, 1 insertion(+) commit e2749bb998701e21cdb8b34486b82fc1c051ab41 Author: Bartosz Golaszewski Date: Fri Mar 23 14:04:48 2018 +0100 reset: modify the way reset lookup works for board files Commit 7af1bb19f1d7 ("reset: add support for non-DT systems") introduced reset control lookup mechanism for boards that still use board files. The routine used to register lookup entries takes the corresponding reset_controlled_dev structure as argument. It's been determined however that for the first user of this new interface - davinci psc driver - it will be easier to register the lookup entries using the reset controller device name. This patch changes the way lookup entries are added. Signed-off-by: Bartosz Golaszewski [p.zabel@pengutronix.de: added missing ERR_PTR] Signed-off-by: Philipp Zabel drivers/reset/core.c | 38 +++++++++++++++++++++++++++++++------- include/linux/reset-controller.h | 14 ++++++++------ 2 files changed, 39 insertions(+), 13 deletions(-) commit 6691dffab0ab6301bb7b489b1dcf9f5efdef202f Author: Bartosz Golaszewski Date: Wed Feb 28 14:08:57 2018 +0100 reset: add support for non-DT systems The reset framework only supports device-tree. There are some platforms however, which need to use it even in legacy, board-file based mode. An example of such architecture is the DaVinci family of SoCs which supports both device tree and legacy boot modes and we don't want to introduce any regressions. We're currently working on converting the platform from its hand-crafted clock API to using the common clock framework. Part of the overhaul will be representing the chip's power sleep controller's reset lines using the reset framework. This changeset extends the core reset code with a new reset lookup entry structure. It contains data allowing the reset core to associate reset lines with devices by comparing the dev_id and con_id strings. It also provides a function allowing drivers to register lookup entries with the framework. The new lookup function is only called as a fallback in case the of_node field is NULL and doesn't change anything for current users. Tested with a dummy reset driver with several lookup entries. An example lookup table registration from a driver can be found below: static struct reset_control_lookup foobar_reset_lookup[] = { RESET_LOOKUP("foo.0", "foo", 15), RESET_LOOKUP("bar.0", NULL, 5), }; foobar_probe() { ... reset_controller_add_lookup(&rcdev, foobar_reset_lookup, ARRAY_SIZE(foobar_reset_lookup)); ... } Cc: Sekhar Nori Cc: Kevin Hilman Cc: David Lechner Signed-off-by: Bartosz Golaszewski Signed-off-by: Philipp Zabel drivers/reset/core.c | 72 +++++++++++++++++++++++++++++++++++++++- include/linux/reset-controller.h | 28 ++++++++++++++++ 2 files changed, 99 insertions(+), 1 deletion(-) commit 921bc6cf807ceb2ab8005319cf39f33494d6b100 Author: Michael Ellerman Date: Wed Mar 14 19:40:42 2018 -0300 powerpc/rfi-flush: Call setup_rfi_flush() after LPM migration We might have migrated to a machine that uses a different flush type, or doesn't need flushing at all. Signed-off-by: Michael Ellerman Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/mobility.c | 3 +++ arch/powerpc/platforms/pseries/pseries.h | 2 ++ arch/powerpc/platforms/pseries/setup.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) commit 0063d61ccfc011f379a31acaeba6de7c926fed2c Author: Mauricio Faria de Oliveira Date: Wed Mar 14 19:40:41 2018 -0300 powerpc/rfi-flush: Differentiate enabled and patched flush types Currently the rfi-flush messages print 'Using flush' for all enabled_flush_types, but that is not necessarily true -- as now the fallback flush is always enabled on pseries, but the fixup function overwrites its nop/branch slot with other flush types, if available. So, replace the 'Using flush' messages with ' flush is available'. Also, print the patched flush types in the fixup function, so users can know what is (not) being used (e.g., the slower, fallback flush, or no flush type at all if flush is disabled via the debugfs switch). Suggested-by: Michael Ellerman Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_64.c | 6 +++--- arch/powerpc/lib/feature-fixups.c | 9 ++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) commit 84749a58b6e382f109abf1e734bc4dd43c2c25bb Author: Michael Ellerman Date: Wed Mar 14 19:40:40 2018 -0300 powerpc/rfi-flush: Always enable fallback flush on pseries This ensures the fallback flush area is always allocated on pseries, so in case a LPAR is migrated from a patched to an unpatched system, it is possible to enable the fallback flush in the target system. Signed-off-by: Michael Ellerman Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/setup.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit abf110f3e1cea40f5ea15e85f5d67c39c14568a7 Author: Michael Ellerman Date: Wed Mar 14 19:40:39 2018 -0300 powerpc/rfi-flush: Make it possible to call setup_rfi_flush() again For PowerVM migration we want to be able to call setup_rfi_flush() again after we've migrated the partition. To support that we need to check that we're not trying to allocate the fallback flush area after memblock has gone away (i.e., boot-time only). Signed-off-by: Michael Ellerman Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Michael Ellerman arch/powerpc/include/asm/setup.h | 2 +- arch/powerpc/kernel/setup_64.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 1e2a9fc7496955faacbbed49461d611b704a7505 Author: Michael Ellerman Date: Wed Mar 14 19:40:38 2018 -0300 powerpc/rfi-flush: Move the logic to avoid a redo into the debugfs code rfi_flush_enable() includes a check to see if we're already enabled (or disabled), and in that case does nothing. But that means calling setup_rfi_flush() a 2nd time doesn't actually work, which is a bit confusing. Move that check into the debugfs code, where it really belongs. Signed-off-by: Michael Ellerman Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_64.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit ac96588d9831bd047ab4cf54850cc69b44855337 Author: Madhavan Srinivasan Date: Sun Mar 4 17:26:28 2018 +0530 powerpc/perf: Add blacklisted events for Power9 DD2.2 These events either do not count, or do not count correctly, so to prevent user confusion block counting them at all. Signed-off-by: Madhavan Srinivasan [mpe: Change log] Signed-off-by: Michael Ellerman arch/powerpc/perf/power9-events-list.h | 15 +++++++++++++++ arch/powerpc/perf/power9-pmu.c | 22 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit 64acab4e4fca19706e907bec435cc2acb65c83f3 Author: Madhavan Srinivasan Date: Sun Mar 4 17:26:27 2018 +0530 powerpc/perf: Add blacklisted events for Power9 DD2.1 These events either do not count, or do not count correctly, so to prevent user confusion block counting them at all. Signed-off-by: Madhavan Srinivasan [mpe: Change log] Signed-off-by: Michael Ellerman arch/powerpc/perf/power9-events-list.h | 13 +++++++++++++ arch/powerpc/perf/power9-pmu.c | 26 ++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) commit b58064da046243f0c988afd939997e9317dc6d48 Author: Madhavan Srinivasan Date: Sun Mar 4 17:26:26 2018 +0530 powerpc/perf: Infrastructure to support addition of blacklisted events Introduce code to support addition of blacklisted events for a processor version. Blacklisted events are events that are known to not count correctly on that CPU revision, and so should be prevented from being counted so as to avoid user confusion. A 'pointer' and 'int' variable to hold the number of events are added to 'struct power_pmu', along with a generic function to loop through the list to validate the given event. Generic function 'is_event_blacklisted' is called in power_pmu_event_init() to detect and reject early. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/include/asm/perf_event_server.h | 2 ++ arch/powerpc/perf/core-book3s.c | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) commit cd1231d7035fea894118d5155ff984cdaf1ac1a2 Author: Madhavan Srinivasan Date: Wed Mar 21 17:10:26 2018 +0530 powerpc/perf: Prevent kernel address leak via perf_get_data_addr() Sampled Data Address Register (SDAR) is a 64-bit register that contains the effective address of the storage operand of an instruction that was being executed, possibly out-of-order, at or around the time that the Performance Monitor alert occurred. In certain scenario SDAR happen to contain the kernel address even for userspace only sampling. Add checks to prevent it. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/core-book3s.c | 4 ++++ 1 file changed, 4 insertions(+) commit bb19af816025d495376bd76bf6fbcf4244f9a06d Author: Madhavan Srinivasan Date: Wed Mar 21 17:10:25 2018 +0530 powerpc/perf: Prevent kernel address leak to userspace via BHRB buffer The current Branch History Rolling Buffer (BHRB) code does not check for any privilege levels before updating the data from BHRB. This could leak kernel addresses to userspace even when profiling only with userspace privileges. Add proper checks to prevent it. Acked-by: Balbir Singh Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/core-book3s.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e1ebd0e5b9d0a10ba65e63a3514b6da8c6a5a819 Author: Michael Ellerman Date: Wed Mar 21 17:10:24 2018 +0530 powerpc/perf: Fix kernel address leak via sampling registers Current code in power_pmu_disable() does not clear the sampling registers like Sampling Instruction Address Register (SIAR) and Sampling Data Address Register (SDAR) after disabling the PMU. Since these are userspace readable and could contain kernel addresses, add code to explicitly clear the content of these registers. Also add a "context synchronizing instruction" to enforce no further updates to these registers as suggested by Power ISA v3.0B. From section 9.4, on page 1108: "If an mtspr instruction is executed that changes the value of a Performance Monitor register other than SIAR, SDAR, and SIER, the change is not guaranteed to have taken effect until after a subsequent context synchronizing instruction has been executed (see Chapter 11. "Synchronization Requirements for Context Alterations" on page 1133)." Signed-off-by: Madhavan Srinivasan [mpe: Massage change log and add ISA reference] Signed-off-by: Michael Ellerman arch/powerpc/perf/core-book3s.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit dbfcf3cb9c681aa0c5d0bb46068f98d5b1823dd3 Author: Paul Mackerras Date: Thu Feb 16 16:03:39 2017 +1100 powerpc/64: Call H_REGISTER_PROC_TBL when running as a HPT guest on POWER9 On POWER9, since commit cc3d2940133d ("powerpc/64: Enable use of radix MMU under hypervisor on POWER9", 2017-01-30), we set both the radix and HPT bits in the client-architecture-support (CAS) vector, which tells the hypervisor that we can do either radix or HPT. According to PAPR, if we use this combination we are promising to do a H_REGISTER_PROC_TBL hcall later on to let the hypervisor know whether we are doing radix or HPT. We currently do this call if we are doing radix but not if we are doing HPT. If the hypervisor is able to support both radix and HPT guests, it would be entitled to defer allocation of the HPT until the H_REGISTER_PROC_TBL call, and to fail any attempts to create HPTEs until the H_REGISTER_PROC_TBL call. Thus we need to do a H_REGISTER_PROC_TBL call when we are doing HPT; otherwise we may crash at boot time. This adds the code to call H_REGISTER_PROC_TBL in this case, before we attempt to create any HPT entries using H_ENTER. Fixes: cc3d2940133d ("powerpc/64: Enable use of radix MMU under hypervisor on POWER9") Cc: stable@vger.kernel.org # v4.11+ Signed-off-by: Paul Mackerras Reviewed-by: Suraj Jitindar Singh Signed-off-by: Michael Ellerman arch/powerpc/mm/hash_utils_64.c | 6 ++++++ arch/powerpc/platforms/pseries/lpar.c | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) commit 300efa9eea451bdcf3b5a1eb292222e06e85bb2c Author: Imre Deak Date: Thu Mar 22 16:36:42 2018 +0200 drm/i915: Fix hibernation with ACPI S0 target state After commit dd9f31c7a3887950cbd0d49eb9d43f7a1518a356 Author: Imre Deak Date: Wed Aug 16 17:46:07 2017 +0300 drm/i915/gen9+: Set same power state before hibernation image save/restore during hibernation/suspend the power domain functionality got disabled, after which resume could leave it incorrectly disabled if the ACPI target state was S0 during suspend and i915 was not loaded by the loader kernel. This was caused by not considering if we resumed from hibernation as the condition for power domains reiniting. Fix this by simply tracking if we suspended power domains during system suspend and reinit power domains accordingly during resume. This will result in reiniting power domains always when resuming from hibernation, regardless of the platform and whether or not i915 is loaded by the loader kernel. The reason we didn't catch this earlier is that the enabled/disabled state of power domains during PMSG_FREEZE/PMSG_QUIESCE is platform and kernel config dependent: on my SKL the target state is S4 during PMSG_FREEZE and (with the driver loaded in the loader kernel) S0 during PMSG_QUIESCE. On the reporter's machine it's S0 during PMSG_FREEZE but (contrary to this) power domains are not initialized during PMSG_QUIESCE since i915 is not loaded in the loader kernel, or it's loaded but without the DMC firmware being available. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105196 Reported-and-tested-by: amn-bas@hotmail.com Fixes: dd9f31c7a388 ("drm/i915/gen9+: Set same power state before hibernation image save/restore") Cc: amn-bas@hotmail.com Cc: Ville Syrjälä Cc: Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180322143642.26883-1-imre.deak@intel.com (cherry picked from commit 0f90603c33bdf6575cfdc81edd53f3f13ba166fb) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 22 ++++++++++------------ drivers/gpu/drm/i915/i915_drv.h | 2 +- 2 files changed, 11 insertions(+), 13 deletions(-) commit 76cb9d314a5385020c3adabf563df8efe71c6325 Author: Chris Wilson Date: Wed Mar 21 09:10:27 2018 +0000 drm/i915/execlists: Use a locked clear_bit() for synchronisation with interrupt We were relying on the uncached reads when processing the CSB to provide ourselves with the serialisation with the interrupt handler (so we could detect new interrupts in the middle of processing the old one). However, in commit 767a983ab255 ("drm/i915/execlists: Read the context-status HEAD from the HWSP") those uncached reads were eliminated (on one path at least) and along with them our serialisation. The result is that we would very rarely miss notification of a new interrupt and leave a context-switch unprocessed, hanging the GPU. Fixes: 767a983ab255 ("drm/i915/execlists: Read the context-status HEAD from the HWSP") Signed-off-by: Chris Wilson Cc: Michel Thierry Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Reviewed-by: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20180321091027.21034-1-chris@chris-wilson.co.uk (cherry picked from commit 9153e6b7c85edbc89e874e5c83f86217c53dcfaf) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_lrc.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 8f30c4085b72485c05e85d56e9a84098da2ba5b7 Author: Chris Wilson Date: Tue Mar 20 10:04:48 2018 +0000 drm/i915: Specify which engines to reset following semaphore/event lockups If the GPU is stuck waiting for an event or for a semaphore, we need to reset the GPU in order to recover. We have to tell the reset routine which engines we want reset, but we were still using the old interface and declaring it as "not-fatal". Fixes: 14b730fcb8d9 ("drm/i915/tdr: Prepare error handler to accept mask of hung engines") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Michel Thierry Reviewed-by: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20180320100449.1360-1-chris@chris-wilson.co.uk (cherry picked from commit ca98317b89428e6ac17be0938b467ed78654dd56) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_hangcheck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a7d58dc2997b6ca5bc1eaa4bd8d019cf7c4a148 Author: Dhinakaran Pandiyan Date: Tue Mar 13 22:48:25 2018 -0700 drm/i915/dp: Write to SET_POWER dpcd to enable MST hub. If bios sets up an MST output and hardware state readout code sees this is an SST configuration, when disabling the encoder we end up calling ->post_disable_dp() hook instead of the MST version. Consequently, we write to the DP_SET_POWER dpcd to set it D3 state. Further along when we try enable the encoder in MST mode, POWER_UP_PHY transaction fails to power up the MST hub. This results in continuous link training failures which keep the system busy delaying boot. We could identify bios MST boot discrepancy and handle it accordingly but a simple way to solve this is to write to the DP_SET_POWER dpcd for MST too. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105470 Cc: Ville Syrjälä Cc: Jani Nikula Reviewed-by: Ville Syrjälä Reported-by: Laura Abbott Cc: stable@vger.kernel.org Fixes: 5ea2355a100a ("drm/i915/mst: Use MST sideband message transactions for dpms control") Tested-by: Laura Abbott Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180314054825.1718-1-dhinakaran.pandiyan@intel.com (cherry picked from commit ad260ab32a4d94fa974f58262f8000472d34fd5b) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_ddi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 44f98a9332e4b97b0215a1c38e647bc0cd8e5a5f Author: Tobin C. Harding Date: Thu Mar 15 13:31:25 2018 +1100 rsi: Remove stack VLA usage The use of stack Variable Length Arrays needs to be avoided, as they can be a vector for stack exhaustion, which can be both a runtime bug (kernel Oops) or a security flaw (overwriting memory beyond the stack). Also, in general, as code evolves it is easy to lose track of how big a VLA can get. Thus, we can end up having runtime failures that are hard to debug. As part of the directive[1] to remove all VLAs from the kernel, and build with -Wvla. Currently rsi code uses a VLA based on a function argument to `rsi_sdio_load_data_master_write()`. The function call chain is Both these functions rsi_sdio_reinit_device() rsi_probe() start the call chain: rsi_hal_device_init() rsi_load_fw() auto_fw_upgrade() ping_pong_write() rsi_sdio_load_data_master_write() [Without familiarity with the code] it appears that none of the 4 locks mutex rx_mutex tx_mutex tx_bus_mutex are held when `rsi_sdio_load_data_master_write()` is called. It is therefore safe to use kmalloc with GFP_KERNEL. We can avoid using the VLA by using `kmalloc()` and free'ing the memory on all exit paths. Change buffer from 'u8 array' to 'u8 *'. Call `kmalloc()` to allocate memory for the buffer. Using goto statement to call `kfree()` on all return paths. It can be expected that this patch will result in a small increase in overhead due to the use of `kmalloc()` however this code is only called on initialization (and re-initialization) so this overhead should not degrade performance. [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Tobin C. Harding Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_sdio.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 6c20495b7debf1f937027526306df3d5daeeb7bc Author: Ganapathi Bhat Date: Thu Mar 15 11:50:32 2018 +0530 mwifiex: remove warnings in mwifiex_cmd_append_11n_tlv() Fix the following sparse warning in mwifiex_cmd_append_11n_tlv: drivers/net/wireless/marvell/mwifiex/11n.c:358:65: warning: invalid assignment: &= drivers/net/wireless/marvell/mwifiex/11n.c:358:65: left side has type restricted __le16 drivers/net/wireless/marvell/mwifiex/11n.c:358:65: right side has type int drivers/net/wireless/marvell/mwifiex/11n.c:360:65: warning: invalid assignment: &= drivers/net/wireless/marvell/mwifiex/11n.c:360:65: left side has type restricted __le16 drivers/net/wireless/marvell/mwifiex/11n.c:360:65: right side has type int drivers/net/wireless/marvell/mwifiex/11n.c:366:65: warning: invalid assignment: &= drivers/net/wireless/marvell/mwifiex/11n.c:366:65: left side has type restricted __le16 drivers/net/wireless/marvell/mwifiex/11n.c:366:65: right side has type int drivers/net/wireless/marvell/mwifiex/11n.c:368:65: warning: invalid assignment: &= drivers/net/wireless/marvell/mwifiex/11n.c:368:65: left side has type restricted __le16 drivers/net/wireless/marvell/mwifiex/11n.c:368:65: right side has type int Fixes: 77423fa73927 ("mwifiex: fix incorrect ht capability problem") Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/11n.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 2ef00c53049b6a8758d118188992da01d75f3628 Author: Joe Perches Date: Fri Mar 23 15:54:37 2018 -0700 wireless: Use octal not symbolic permissions Prefer the direct use of octal for permissions. Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace and some typing. Miscellanea: o Whitespace neatening around these conversions. Signed-off-by: Joe Perches Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath5k/base.c | 6 +- drivers/net/wireless/ath/ath5k/debug.c | 37 +++---- drivers/net/wireless/ath/ath5k/sysfs.c | 8 +- drivers/net/wireless/ath/ath6kl/debug.c | 43 ++++---- drivers/net/wireless/ath/ath9k/common-debug.c | 9 +- drivers/net/wireless/ath/ath9k/common-spectral.c | 10 +- drivers/net/wireless/ath/ath9k/debug.c | 40 ++++---- drivers/net/wireless/ath/ath9k/debug_sta.c | 6 +- drivers/net/wireless/ath/ath9k/dfs_debug.c | 4 +- drivers/net/wireless/ath/ath9k/htc_drv_debug.c | 16 +-- drivers/net/wireless/ath/ath9k/tx99.c | 4 +- drivers/net/wireless/ath/carl9170/debug.c | 8 +- drivers/net/wireless/ath/carl9170/main.c | 4 +- drivers/net/wireless/ath/wcn36xx/debug.c | 5 +- .../wireless/broadcom/brcm80211/brcmfmac/common.c | 6 +- .../wireless/broadcom/brcm80211/brcmsmac/debug.c | 2 +- .../broadcom/brcm80211/brcmsmac/mac80211_if.c | 2 +- drivers/net/wireless/cisco/airo.c | 6 +- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 29 +++--- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 51 +++++----- drivers/net/wireless/intel/ipw2x00/libipw_module.c | 2 +- drivers/net/wireless/intel/iwlegacy/3945-mac.c | 35 +++---- drivers/net/wireless/intel/iwlegacy/4965-mac.c | 19 ++-- drivers/net/wireless/intel/iwlegacy/4965-rs.c | 8 +- drivers/net/wireless/intel/iwlegacy/common.c | 4 +- drivers/net/wireless/intel/iwlegacy/debug.c | 58 ++++++----- drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c | 78 +++++++-------- drivers/net/wireless/intel/iwlwifi/dvm/rs.c | 16 +-- drivers/net/wireless/intel/iwlwifi/fw/debugfs.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 43 ++++---- .../net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 40 +++----- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 110 ++++++++++----------- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 6 +- drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 12 +-- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 12 +-- drivers/net/wireless/intersil/p54/main.c | 2 +- drivers/net/wireless/mediatek/mt76/debugfs.c | 10 +- .../net/wireless/mediatek/mt76/mt76x2_debugfs.c | 8 +- drivers/net/wireless/mediatek/mt7601u/debugfs.c | 16 ++- drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2800pci.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2x00debug.c | 64 ++++++------ drivers/net/wireless/ralink/rt2x00/rt61pci.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt73usb.c | 2 +- drivers/net/wireless/ray_cs.c | 8 +- drivers/net/wireless/st/cw1200/debug.c | 6 +- drivers/net/wireless/st/cw1200/main.c | 2 +- drivers/net/wireless/ti/wl18xx/main.c | 27 +++-- drivers/net/wireless/ti/wlcore/main.c | 8 +- drivers/net/wireless/ti/wlcore/sdio.c | 2 +- drivers/net/wireless/ti/wlcore/sysfs.c | 7 +- 53 files changed, 427 insertions(+), 486 deletions(-) commit ee9c64307b6203151a20ec33e6f51ae1cac1bb6e Author: Fabio Estevam Date: Mon Mar 26 13:20:43 2018 -0300 Revert "dt-bindings: ifc: Fix the unit address format in the examples" This reverts commit 4e017f1419397473cf3db6e9fa020013998b1aa4. As explained by Rob Herring: "This "fix" is wrong. Memory controllers with chip selects should have the chip select in the unit-address. The correct fix here is you should drop "simple-bus"." Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3ed984780074260769aa30c04c4d83e08b1401ec Author: Fabio Estevam Date: Mon Mar 26 13:20:42 2018 -0300 Revert "arm64: dts: fsl: fix ifc simple-bus unit address format warnings" This reverts commit f81d7af7957539b7808961f929f945381530acb9. As explained by Rob Herring: "This "fix" is wrong. Memory controllers with chip selects should have the chip select in the unit-address. The correct fix here is you should drop "simple-bus"." Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts | 6 +++--- arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 6 +++--- arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts | 6 +++--- arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts | 4 ++-- arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts | 6 +++--- arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts | 4 ++-- arch/arm64/boot/dts/freescale/fsl-ls208xa-qds.dtsi | 6 +++--- 7 files changed, 19 insertions(+), 19 deletions(-) commit 6c59f64b7ecf2bccbe73931d7d573d66ed13b537 Author: Frank Asseg Date: Mon Mar 12 19:57:06 2018 +0100 tools/thermal: tmon: fix for segfault Fixes a segfault occurring when e.g. is pressed multiple times in the ncurses tmon application. The segfault is caused by incrementing cur_thermal_record in the main function without checking if it's value reached NR_THERMAL_RECORD immediately. Since the boundary check only occurred in update_thermal_data a race condition existed, which lead to an attempted read beyond the last element of the trec array. The fix was implemented by moving the cur_thermal_record incrementation to the update_thermal_data function using a temporary variable on which the boundary condition is checked before updating cur_thread_record, so that the variable is never incremented beyond the trec array's boundary. It seems the segfault does not occur on every machine: On a HP EliteBook G4 the segfault happens, while it does not happen on a Thinkpad T540p. Signed-off-by: Frank Asseg Signed-off-by: Jiri Kosina tools/thermal/tmon/sysfs.c | 12 +++++++----- tools/thermal/tmon/tmon.c | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) commit b903036aad6c46f0c94b3a58c86f7467776a5dcf Author: Geert Uytterhoeven Date: Fri Mar 2 14:43:23 2018 +0100 net: Spelling s/stucture/structure/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Jiri Kosina drivers/net/ethernet/ti/tlan.c | 2 +- drivers/net/wireless/atmel/atmel.c | 2 +- include/net/iw_handler.h | 2 +- net/socket.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit bade9835a22e03a00d6cb94350984620bf808f83 Author: Johannes Thumshirn Date: Fri Feb 9 14:20:45 2018 +0100 edd: don't spam log if no EDD information is present We've had reports from users being concerned about messages like: [ 4.487246] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found [ 4.487251] EDD information not available. While these are more or less irrelevant, tell edd.c to not annoy anyone. Signed-off-by: Johannes Thumshirn Signed-off-by: Jiri Kosina drivers/firmware/edd.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 1897a9691e384f6e30b8e8e30fc75d00e402e0ca Author: Jaak Ristioja Date: Fri Feb 9 11:22:16 2018 +0200 Documentation: Fix early-microcode.txt references after file rename The file Documentation/x86/early-microcode.txt was renamed to Documentation/x86/microcode.txt in 0e3258753f81, but it was still referenced by its old name in a three places: * Documentation/x86/00-INDEX * arch/x86/Kconfig * arch/x86/kernel/cpu/microcode/amd.c This commit updates these references accordingly. Fixes: 0e3258753f81 ("x86/microcode: Document the three loading methods") Signed-off-by: Jaak Ristioja Signed-off-by: Jiri Kosina Documentation/x86/00-INDEX | 4 ++-- arch/x86/Kconfig | 2 +- arch/x86/kernel/cpu/microcode/amd.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 13cf912b2da3d79377d8335492077b7225ce67f9 Author: Rohit Visavalia Date: Mon Jan 29 15:11:26 2018 +0530 tracing: Block comments should align the * on each line Resolved Block comments use * on subsequent lines checkpatch warning. Issue found by checkpatch. Signed-off-by: Rohit Visavalia Signed-off-by: Jiri Kosina kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc8282a730215f1ffab5959556b20e99c7ff6cef Author: Masanari Iida Date: Tue Jan 16 00:18:36 2018 +0900 treewide: Fix typos in printk This patch fixes spelling typos found in printk. Signed-off-by: Masanari Iida Acked-by: Randy Dunlap Signed-off-by: Jiri Kosina drivers/fmc/fmc-core.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +- drivers/gpu/drm/i915/intel_cdclk.c | 4 ++-- drivers/net/ethernet/qlogic/qed/qed_int.c | 2 +- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +- drivers/scsi/aacraid/src.c | 4 ++-- drivers/scsi/qedi/qedi_fw.c | 2 +- fs/orangefs/orangefs-utils.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) commit 2f097267e70e2775780bee117d0c62011b740f4c Author: Markus Elfring Date: Mon Jan 8 09:57:10 2018 +0100 GenWQE: Fix a typo in two comments Add a missing character in two words of these descriptions. Signed-off-by: Markus Elfring Acked-by: Frank Haverkamp Signed-off-by: Jiri Kosina drivers/misc/genwqe/card_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 255dd5b79d5474dad3ecebe99be7818684921abd Author: Arnd Bergmann Date: Thu Mar 15 22:18:24 2018 +0100 Bluetooth: btrsi: rework dependencies The linkage between the bluetooth driver and the wireless driver is not defined properly, leading to build problems such as: warning: (BT_HCIRSI) selects RSI_COEX which has unmet direct dependencies (NETDEVICES && WLAN && WLAN_VENDOR_RSI && BT_HCIRSI && RSI_91X) drivers/net/wireless/rsi/rsi_91x_main.o: In function `rsi_read_pkt': (.text+0x205): undefined reference to `rsi_bt_ops' As the dependency is actually the reverse (RSI_91X uses the BT_RSI driver, not the other way round), this changes the dependency to match, and enables the bluetooth driver from the RSI_COEX symbol. Fixes: 38aa4da50483 ("Bluetooth: btrsi: add new rsi bluetooth driver") Acked-by; Marcel Holtmann Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/bluetooth/Kconfig | 4 +--- drivers/net/wireless/rsi/Kconfig | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) commit 97b0c7c0df3efd7048ed39d7e2dee34cafd55887 Author: Rafał Miłecki Date: Wed Mar 14 13:10:44 2018 +0100 mtd: ofpart: add of_match_table with "fixed-partitions" This allows using this parser with any flash driver that takes care of setting of_node (using mtd_set_of_node helper) correctly. Up to now support for "fixed-partitions" DT compatibility string was working only with flash drivers that were specifying "ofpart" (manually or by letting mtd use the default set of parsers). This matches existing bindings documentation. Signed-off-by: Rafał Miłecki Reviewed-by: Brian Norris Tested-by: Brian Norris Reviewed-by: Richard Weinberger Signed-off-by: Boris Brezillon drivers/mtd/ofpart.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c0faf43482e7f7dfb6d61847cb93d17748560b24 Author: Rafał Miłecki Date: Wed Mar 14 13:10:43 2018 +0100 mtd: rename "ofpart" parser to "fixed-partitions" as it fits it better Type "ofpart" means that OF should be used to get partitioning info and this driver supports "fixed-partitions" binding only. Renaming it should lead to less confusion especially when parsers for new compatibility strings start to appear. Signed-off-by: Rafał Miłecki Reviewed-by: Richard Weinberger Signed-off-by: Boris Brezillon drivers/mtd/mtdpart.c | 4 ++-- drivers/mtd/ofpart.c | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) commit 5b644aa012f67fd211138a067b9f351f30bdcc60 Author: Rafał Miłecki Date: Wed Mar 14 13:10:42 2018 +0100 mtd: partitions: add of_match_table parser matching for the "ofpart" type In order to properly support compatibility strings as described in the bindings/mtd/partition.txt "ofpart" type should be treated as an indication for looking into OF. MTD should check "compatible" property and search for a matching parser rather than blindly trying the one supporting "fixed-partitions". It also means that existing "fixed-partitions" parser should get renamed to use a more meaningful name. This commit achievies that aim by introducing a new mtd_part_of_parse(). It works by looking for a matching parser for every string in the "compatibility" property (starting with the most specific one). Please note that driver-specified parsers still take a precedence. It's assumed that driver providing a parser type has a good reason for that (e.g. having platform data with device-specific info). Also doing otherwise could break existing setups. The same applies to using default parsers (including "cmdlinepart") as some overwrite DT data with cmdline argument. Partition parsers can now provide an of_match_table to enable flash<-->parser matching via device tree as documented in the mtd/partition.txt. This support is currently limited to built-in parsers as it uses request_module() and friends. This should be sufficient for most cases though as compiling parsers as modules isn't a common choice. Signed-off-by: Brian Norris Signed-off-by: Rafał Miłecki Tested-by: Peter Rosin Reviewed-by: Richard Weinberger Signed-off-by: Boris Brezillon drivers/mtd/mtdpart.c | 116 +++++++++++++++++++++++++++++++++++++---- include/linux/mtd/partitions.h | 1 + 2 files changed, 108 insertions(+), 9 deletions(-) commit abd5f00844ec7fa507064ee4a22b3605c64c7d31 Merge: 996bfed 6767b30 Author: Kalle Valo Date: Tue Mar 27 10:06:18 2018 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.17. Major changes: wil6210 * support multiple virtual interfaces commit fc5d1073cae299de4517755a910df4f12a6a438f Author: David Rientjes Date: Mon Mar 26 23:27:21 2018 -0700 x86/mm/32: Remove unused node_memmap_size_bytes() & CONFIG_NEED_NODE_MEMMAP_SIZE logic node_memmap_size_bytes() has been unused since the v3.9 kernel, so remove it. Signed-off-by: David Rientjes Cc: Dave Hansen Cc: Laura Abbott Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Fixes: f03574f2d5b2 ("x86-32, mm: Rip out x86_32 NUMA remapping code") Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1803262325540.256524@chino.kir.corp.google.com Signed-off-by: Ingo Molnar arch/x86/Kconfig | 4 ---- arch/x86/mm/numa_32.c | 11 ----------- include/linux/mmzone.h | 5 ----- mm/sparse.c | 22 ---------------------- 4 files changed, 42 deletions(-) commit 0bc91d4ba77156ae9217d25ed7c434540f950d05 Merge: 565977a 3eb2ce8 Author: Ingo Molnar Date: Tue Mar 27 08:43:39 2018 +0200 Merge tag 'v4.16-rc7' into x86/mm, to fix up conflict Conflicts: arch/x86/mm/init_64.c Signed-off-by: Ingo Molnar commit 306a4f3ca7f3c7dfa473ebd19d66e40e59d99734 Author: Robert Rosengren Date: Mon Mar 26 07:24:49 2018 +0200 ALSA: aloop: Mark paused device as inactive Show paused ALSA aloop device as inactive, i.e. the control "PCM Slave Active" set as false. Notification sent upon state change. This makes it possible for client capturing from aloop device to know if data is expected. Without it the client expects data even if playback is paused. Signed-off-by: Robert Rosengren Signed-off-by: Takashi Iwai sound/drivers/aloop.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 631fe154edb0a37308d0116a0f9b7bba9dca6218 Author: Davidlohr Bueso Date: Mon Mar 26 14:09:27 2018 -0700 perf/x86: Update rdpmc_always_available static key to the modern API No changes in refcount semantics -- use DEFINE_STATIC_KEY_FALSE() for initialization and replace: static_key_slow_inc|dec() => static_branch_inc|dec() static_key_false() => static_branch_unlikely() Added a '_key' suffix to rdpmc_always_available, for better self-documentation. Signed-off-by: Davidlohr Bueso Cc: Davidlohr Bueso Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akpm@linux-foundation.org Link: http://lkml.kernel.org/r/20180326210929.5244-5-dave@stgolabs.net Signed-off-by: Ingo Molnar arch/x86/events/core.c | 6 +++--- arch/x86/include/asm/mmu_context.h | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) commit b720342849fe685310fca01748a32730a6eca5aa Author: Davidlohr Bueso Date: Mon Mar 26 14:09:26 2018 -0700 sched/core: Update preempt_notifier_key to modern API No changes in refcount semantics, use DEFINE_STATIC_KEY_FALSE() for initialization and replace: static_key_slow_inc|dec() => static_branch_inc|dec() static_key_false() => static_branch_unlikely() Signed-off-by: Davidlohr Bueso Cc: Davidlohr Bueso Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akpm@linux-foundation.org Link: http://lkml.kernel.org/r/20180326210929.5244-4-dave@stgolabs.net Signed-off-by: Ingo Molnar kernel/sched/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7dac4a1726a9c64a517d595c40e95e2d0d135f6f Author: Theodore Ts'o Date: Mon Mar 26 23:54:10 2018 -0400 ext4: add validity checks for bitmap block numbers An privileged attacker can cause a crash by mounting a crafted ext4 image which triggers a out-of-bounds read in the function ext4_valid_block_bitmap() in fs/ext4/balloc.c. This issue has been assigned CVE-2018-1093. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199181 BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1560782 Reported-by: Wen Xu Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/balloc.c | 16 ++++++++++++++-- fs/ext4/ialloc.c | 7 +++++++ 2 files changed, 21 insertions(+), 2 deletions(-) commit c6c848572f4da0e34ffe0a35364b4db871e13e42 Author: Francis Therien Date: Mon Mar 26 15:59:00 2018 -0700 Input: xpad - add PDP device id 0x02a4 Adds support for a PDP Xbox One controller with device ID (0x06ef:0x02a4). The Product string for this device is "PDP Wired Controller for Xbox One - Stealth Series | Phantom Black". Signed-off-by: Francis Therien Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 4621c9660459cd256e395e129bce6cd0f79a8ca3 Author: Pali Rohár Date: Mon Mar 26 15:31:58 2018 -0700 Input: alps - report pressure of v3 and v7 trackstick ALPS v3 and v7 packet formats reports trackstick pressure. This information is already parsed in unused "z" variable. ALPS SS4 S2 devices already reports trackstick pressure as ABS_PRESSURE attribute, therefore reports pressure in the same way also for v3 and v7. This patch also updates parsing v3 pressure information, it is also stored in 7 bits. Signed-off-by: Pali Rohár Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 68ef4836cd3ca283b89843d6ad603ce258ba087d Author: Marcus Folkesson Date: Sat Mar 17 11:00:58 2018 -0700 Input: pxrc - new driver for PhoenixRC Flight Controller Adapter This driver let you plug in your RC controller to the adapter and use it as input device in various RC simulators. Signed-off-by: Marcus Folkesson Signed-off-by: Dmitry Torokhov Documentation/input/devices/pxrc.rst | 57 +++++++ drivers/input/joystick/Kconfig | 10 ++ drivers/input/joystick/Makefile | 1 + drivers/input/joystick/pxrc.c | 303 +++++++++++++++++++++++++++++++++++ 4 files changed, 371 insertions(+) commit 85f46fbf5e242ef923fd313722e65cb6d2170149 Author: Marcus Folkesson Date: Sat Mar 17 10:54:13 2018 -0700 Input: usbtouchscreen - do not rely on input_dev->users If the device is unused and suspended, a call to open will cause the device to autoresume through the call to usb_autopm_get_interface(). input_dev->users is already incremented by the input subsystem, therefore this expression will always be evaluated to true: if (input->users || usbtouch->type->irq_always) result = usb_submit_urb(usbtouch->irq, GFP_NOIO); The same URB will then be fail when resubmitted in usbtouch_open(). Introduce usbtouch->is_open to keep track of the state instead. Signed-off-by: Marcus Folkesson Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/usbtouchscreen.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 12e510dbc57b29b4314cd792851532bea76b4715 Author: Marcus Folkesson Date: Sat Mar 17 10:52:39 2018 -0700 Input: usbtouchscreen - fix deadlock in autosuspend usb_autopm_get_interface() that is called in usbtouch_open() does an autoresume if the device is suspended. input_dev->mutex used in usbtouch_resume() is in this case already taken by the input subsystem and will cause a deadlock. Signed-off-by: Marcus Folkesson Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/usbtouchscreen.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 34fd03b9e6a6c91bf79585a63d649b4c301f6757 Merge: 336f2c0 e94d447 Author: David S. Miller Date: Mon Mar 26 18:20:02 2018 -0400 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2018-03-26 This patch series adds the ice driver, which will support the Intel(R) E800 Series of network devices. This is the first phase in the release of this driver where we implement basic transmit and receive. The idea behind the multi-phase release is to aid in code review as well as testing. Subsequent phases will implement advanced features (like SR-IOV, tunnelling, flow director, QoS, etc.) that build upon the previous phase(s). Each phase will be submitted as a patch series. ==================== Signed-off-by: David S. Miller commit d54d27c9571245e4990bb8d020b109b92115683b Merge: 5893ed1 58c442f Author: James Morris Date: Tue Mar 27 09:16:31 2018 +1100 Merge branch 'smack-for-4.17' of git://github.com/cschaufler/next-smack into next-smack Pull request from Casey. commit d9314c474d4fc1985e836b92fba4c40dd84885a7 Author: Björn Töpel Date: Thu Mar 22 16:14:34 2018 +0100 i40e: add support for XDP_REDIRECT The driver now acts upon the XDP_REDIRECT return action. Two new ndos are implemented, ndo_xdp_xmit and ndo_xdp_flush. XDP_REDIRECT action enables XDP program to redirect frames to other netdevs. Signed-off-by: Björn Töpel Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 2 + drivers/net/ethernet/intel/i40e/i40e_txrx.c | 74 +++++++++++++++++++++++++---- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 2 + 3 files changed, 68 insertions(+), 10 deletions(-) commit 8ce29c679a6ecefb88dc794260f4e91a284eed9a Author: Björn Töpel Date: Thu Mar 22 16:14:33 2018 +0100 i40e: tweak page counting for XDP_REDIRECT This commit tweaks the page counting for XDP_REDIRECT to function properly. XDP_REDIRECT support will be added in a future commit. The current page counting scheme assumes that the reference count cannot decrease until the received frame is sent to the upper layers of the networking stack. This assumption does not hold for the XDP_REDIRECT action, since a page (pointed out by xdp_buff) can have its reference count decreased via the xdp_do_redirect call. To work around that, we now start off by a large page count and then don't allow a refcount less than two. Signed-off-by: Björn Töpel Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 8f769dd14a4364bdce1f5afda267cf2f758f8a47 Author: Jacob Keller Date: Fri Mar 16 01:26:37 2018 -0700 i40e: re-number feature flags to remove gaps Remove the gaps created by the recent refactor of various feature flags that have moved to the state field. Use only a u32 now that we have fewer than 32 flags in the field. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 57 ++++++++++++++++------------------ 1 file changed, 26 insertions(+), 31 deletions(-) commit 886ff146a73627c287262a7d92ddfb50baa29552 Author: Jacob Keller Date: Fri Mar 16 01:26:36 2018 -0700 i40e: stop using cmpxchg flow in i40e_set_priv_flags() Now that the only places which modify flags are either (a) during initialization prior to creating a netdevice, or (b) while holding the rtnl lock, we no longer need the cmpxchg64 call in i40e_set_priv_flags. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 88893cf787d3062c631cc20b875068eb11756e03 Author: Michael Ellerman Date: Fri Mar 23 20:44:27 2018 +1100 selftests: Print the test we're running to /dev/kmsg Some tests cause the kernel to print things to the kernel log buffer (ie. printk), in particular oops and warnings etc. However when running all the tests in succession it's not always obvious which test(s) caused the kernel to print something. We can narrow it down by printing which test directory we're running in to /dev/kmsg, if it's writable. Example output: [ 170.149149] kselftest: Running tests in powerpc [ 305.300132] kworker/dying (71) used greatest stack depth: 7776 bytes left [ 808.915456] kselftest: Running tests in pstore Signed-off-by: Michael Ellerman Signed-off-by: Shuah Khan tools/testing/selftests/Makefile | 1 + 1 file changed, 1 insertion(+) commit f0ee70a042e267a517e943220e18ae62d3c1995a Author: Jacob Keller Date: Fri Mar 16 01:26:35 2018 -0700 i40e: hold the RTNL lock while changing interrupt schemes When we suspend and resume, we need to clear and re-enable the interrupt scheme. This was previously not done while holding the RTNL lock, which could be problematic, because we are actually destroying and re-creating queues. Hold the RTNL lock for the entire sequence of preparing for reset, and when resuming. This additionally protects the flags related to interrupt scheme under RTNL lock so that their modification is properly threaded. This is part of a larger effort to remove the need for cmpxchg64 in i40e_set_priv_flags(). Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 5f76a704b8df9b4da898a230ac40d143eaca9cd8 Author: Jacob Keller Date: Fri Mar 16 01:26:34 2018 -0700 i40e: move client flags into state bits The iWarp client flags are all potentially changed when the RTNL lock is not held, so they should not be part of the pf->flags variable. Instead, move them into the state field so that we can use atomic bit operations. This is part of a larger effort to remove cmpxchg64 in i40e_set_priv_flags() Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 7 ++++--- drivers/net/ethernet/intel/i40e/i40e_client.c | 7 +++---- drivers/net/ethernet/intel/i40e/i40e_main.c | 22 ++++++++++------------ 3 files changed, 17 insertions(+), 19 deletions(-) commit 0605c45ce5f33a51e0b23e1d36f2e56db3c95f58 Author: Jacob Keller Date: Fri Mar 16 01:26:33 2018 -0700 i40e: move I40E_FLAG_TEMP_LINK_POLLING to state field This flag is modified outside of the RTNL lock and thus should not be part of the pf->flags variable. Use a state bit instead, so that we can use atomic bit operations. This is part of a larger effort to remove cmpxchg64 in i40e_set_priv_flags() Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 3 ++- drivers/net/ethernet/intel/i40e/i40e_main.c | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 71186172b71fe7266eaa768f028c20725202dfd5 Author: Aviv Heller Date: Thu Aug 17 16:44:16 2017 +0300 net/mlx5e: Add VLAN offload features to hw_enc_features We support outer VLAN offload in driver and HW regardless of whether an encapsulation is present in the next headers. Exposing this in hw_enc_features will allow us to offload outer VLANs in cases where encapsulation protocols like VXLAN and IPsec are used. Signed-off-by: Aviv Heller Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 +++ 1 file changed, 3 insertions(+) commit be0f780bc50a00216ca9c7dc63485e2fc31bf8c8 Author: Gal Pressman Date: Thu Jan 11 18:46:20 2018 +0200 net/mlx5e: Add a helper macro in set features ndo Add a new macro to prevent copy-pasting the same code for each new feature. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 26 ++++++++++------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 707129dceaf4b8c4721425d75e855aed4fd7b832 Author: Gal Pressman Date: Wed Jan 31 14:45:40 2018 +0200 net/mlx5e: Make choose LRO timeout function static The function is used in en_main.c only, we can make it static and remove its declaration from en.h Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit acac5ec0c2e77b79c7861db43d50640999d5d37b Author: Gal Pressman Date: Thu Jan 11 16:24:06 2018 +0200 net/mlx5e: Remove redundant check in get ethtool stats ethtool core code makes sure data isn't NULL before calling get_ethtool_stats, testing it again in the driver is redundant. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 --- 1 file changed, 3 deletions(-) commit 957f6ba8adc7be401a74ccff427e4cfd88d3bfcb Author: Leon Romanovsky Date: Tue Jan 2 16:49:56 2018 +0200 net/mlx5: Protect from command bit overflow The system with CONFIG_UBSAN enabled on produces the following error during driver initialization. The reason to it that max_reg_cmds can be larger enough to cause to "1 << max_reg_cmds" overflow the unsigned long. ================================================================================ UBSAN: Undefined behaviour in drivers/net/ethernet/mellanox/mlx5/core/cmd.c:1805:42 signed integer overflow: -2147483648 - 1 cannot be represented in type 'int' CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.15.0-rc2-00032-g06cda2358d9b-dirty #724 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org 04/01/2014 Call Trace: dump_stack+0xe9/0x18f ? dma_virt_alloc+0x81/0x81 ubsan_epilogue+0xe/0x4e handle_overflow+0x187/0x20c mlx5_cmd_init+0x73a/0x12b0 mlx5_load_one+0x1c3d/0x1d30 init_one+0xd02/0xf10 pci_device_probe+0x26c/0x3b0 driver_probe_device+0x622/0xb40 __driver_attach+0x175/0x1b0 bus_for_each_dev+0xef/0x190 bus_add_driver+0x2db/0x490 driver_register+0x16b/0x1e0 __pci_register_driver+0x177/0x1b0 init+0x6d/0x92 do_one_initcall+0x15b/0x270 kernel_init_freeable+0x2d8/0x3d0 kernel_init+0x14/0x190 ret_from_fork+0x24/0x30 ================================================================================ Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6acfbf38a98a4c455f5b8c827854e1dc201be745 Author: Or Gerlitz Date: Wed Jan 31 18:36:03 2018 +0200 net/mlx5e: Offload tc vlan push/pop using HW action Currently, we are emulating the offload of vlan push/pop actions using global setup as done by commit f5f82476090f ("net/mlx5: E-Switch, Support VLAN actions in the offloads mode"). With newer NICs, we can apply a flow action for that matter, do that while keeping the emulated path for the older HW brands. Signed-off-by: Or Gerlitz Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 15 ++++++++----- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 10 ++++++++- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 26 +++++++++++++++++----- 3 files changed, 40 insertions(+), 11 deletions(-) commit 0c06897a9ac7e2db9ad2df15bc6511e8ab88378f Author: Or Gerlitz Date: Sun Jan 28 20:14:20 2018 +0200 net/mlx5: Add core support for vlan push/pop steering action Newer NICs (ConnectX-5 and onward) can apply vlan pop or push as an action taking place during flow steering. Add the core bits for that. Signed-off-by: Or Gerlitz Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/diag/fs_tracepoint.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 3 --- drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 10 +++++++++- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 4 +++- include/linux/mlx5/fs.h | 7 +++++++ include/linux/mlx5/mlx5_ifc.h | 16 ++++++++++++++-- 6 files changed, 35 insertions(+), 7 deletions(-) commit aa24670ef66cb38e667d7bb039f5ce29d926f2e0 Author: Or Gerlitz Date: Tue Jan 30 14:13:28 2018 +0000 net/mlx5: E-Switch, Use same source for offloaded actions check Align the checks for modify header and encap actions with the rest of the code. Signed-off-by: Or Gerlitz Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7cbaf9a3ea09ea36c7101e7b244f734f9c09c72b Author: Moshe Shemesh Date: Thu Feb 8 15:09:57 2018 +0200 net/mlx5e: Add interface down dropped packets statistics Added the following packets drop counter: Rx interface down dropped packets - counts packets which were received while the ETH interface was down. This counter will be shown on ethtool as a new counter called rx_if_down_packets. The implementation allocates a q_counter for drop rq which gets all the received traffic while the interface is down. Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 46 +++++++++++++-------- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 48 ++++++++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 1 + 4 files changed, 69 insertions(+), 29 deletions(-) commit aaabd0783b1cf46569f5fc1c60d79709815497fc Author: Moshe Shemesh Date: Sun Jan 14 00:56:25 2018 +0200 net/mlx5: Add packet dropped while vport down statistics Added the following packets dropped while vport down statistics: Rx dropped while vport down - counts packets which were steered by e-switch to a vport, but dropped since the vport was down. This counter will be shown on ip link tool as part of the vport rx_dropped counter. Tx dropped while vport down - counts packets which were transmitted by a vport, but dropped due to vport logical link down. This counter will be shown on ip link tool as part of the vport tx_dropped counter. The counters are read from FW by command QUERY_VNIC_ENV. Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 31 +++++++++++++++++++---- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 26 +++++++++++++++++++ include/linux/mlx5/mlx5_ifc.h | 4 ++- include/linux/mlx5/vport.h | 3 +++ 4 files changed, 58 insertions(+), 6 deletions(-) commit 5c298143be17f5100656b9c140af672c644116d9 Author: Moshe Shemesh Date: Tue Dec 26 16:46:29 2017 +0200 net/mlx5e: Add vnic steering drop statistics Added the following packets drop counter: Rx steering missed dropped packets - counts packets which were dropped due to miss on NIC rx steering rules. This counter will be shown on ethtool as a new counter called rx_steer_missed_packets. Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 65 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 5 ++ include/linux/mlx5/mlx5_ifc.h | 3 +- 3 files changed, 72 insertions(+), 1 deletion(-) commit 61c5b5c9178288a4caa3e39095aafb391c5100f6 Author: Moshe Shemesh Date: Sun Jan 7 16:45:27 2018 +0200 net/mlx5: Add support for QUERY_VNIC_ENV command Add support for new FW command QUERY_VNIC_ENV. The command is used by the driver to query vnic diagnostic statistics from FW. Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 2 ++ include/linux/mlx5/mlx5_ifc.h | 50 ++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) commit 2afa609f5c970185a8cae73f6a4caadf97fbea54 Author: Inbar Karmy Date: Mon Nov 20 18:06:20 2017 +0200 net/mlx5e: PFC stall prevention support Implement set/get functions to configure PFC stall prevention timeout by tunables api through ethtool. By default the stall prevention timeout is configured to 8 sec. Timeout range is: 80-8000 msec. Enabling stall prevention with the auto timeout will set the timeout to 100 msec. Signed-off-by: Inbar Karmy Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 57 +++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/port.c | 64 +++++++++++++++++++--- include/linux/mlx5/mlx5_ifc.h | 17 ++++-- include/linux/mlx5/port.h | 6 ++ 4 files changed, 132 insertions(+), 12 deletions(-) commit e1577c1c881b09e9f15a743a4a1907815b74d0f7 Author: Inbar Karmy Date: Mon Nov 20 16:14:30 2017 +0200 ethtool: Add support for configuring PFC stall prevention in ethtool In the event where the device unexpectedly becomes unresponsive for a long period of time, flow control mechanism may propagate pause frames which will cause congestion spreading to the entire network. To prevent this scenario, when the device is stalled for a period longer than a pre-configured timeout, flow control mechanisms are automatically disabled. This patch adds support for the ETHTOOL_PFC_STALL_PREVENTION as a tunable. This API provides support for configuring flow control storm prevention timeout (msec). Signed-off-by: Inbar Karmy Cc: Michal Kubecek Cc: Andrew Lunn Signed-off-by: Saeed Mahameed include/uapi/linux/ethtool.h | 4 ++++ net/core/ethtool.c | 6 ++++++ 2 files changed, 10 insertions(+) commit 134201aeadf3109ac9982ea81a79ec68442a07d1 Author: Jacob Keller Date: Fri Mar 16 01:26:32 2018 -0700 i40e: move AUTO_DISABLED flags into the state field The two Flow Directory auto disable flags are used at run time to mark when the flow director features needed to be disabled. Thus the flags could change even when the RTNL lock is not held. They also have some code constructions which really should be test_and_set or test_and_clear using atomic bit operations. Create new state fields to mark this, and stop including them in pf->flags. This is part of a larger effort to remove the need for cmpxchg64 in i40e_set_priv_flags(). Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 5 +++-- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 ++-- drivers/net/ethernet/intel/i40e/i40e_main.c | 23 +++++++++-------------- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 21 +++++++++++++-------- 4 files changed, 27 insertions(+), 26 deletions(-) commit 41898c66ef02628326827e503c4fd78e71bc13f7 Author: Jacob Keller Date: Fri Mar 16 01:26:31 2018 -0700 i40e: move I40E_FLAG_UDP_FILTER_SYNC to the state field This flag is modified during run time, possibly even when the RTNL lock is not held. Additionally it has a few places which should be using test_and_set or test_and_clear atomic bit operations. Create a new state bit __I40E_UDP_SYNC_PENDING and use it instead of the ole I40E_FLAG_UDP_FILTER_SYNC flag. This is part of a larger effort to remove the need for using cmpxchg64 in i40e_set_priv_flags. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 3 ++- drivers/net/ethernet/intel/i40e/i40e_main.c | 10 ++++------ 2 files changed, 6 insertions(+), 7 deletions(-) commit 2fcb12df7d2fa5a004fc3e7f589e58a08f7ed8c9 Author: Inbar Karmy Date: Thu Aug 17 16:39:47 2017 +0300 net/mlx5e: Expose PFC stall prevention counters Add the needed capability bit and counters to device spec description. Expose the following two counters in ethtool: tx_pause_storm_warning_events: when the device is stalled for a period longer than a pre-configured watermark, the counter increase, allowing the debug utility an insight into current device status. tx_pause_storm_error_events: when the device is stalled for a period longer than a pre-configured timeout, the pause transmission is disabled, and the counter increase. Signed-off-by: Inbar Karmy Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 19 ++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/fw.c | 3 +++ include/linux/mlx5/device.h | 4 ++++ include/linux/mlx5/mlx5_ifc.h | 28 +++++++++++++++++++--- 4 files changed, 50 insertions(+), 4 deletions(-) commit bfe040c3851ad09e0944de7b0973a71323610e23 Author: Jacob Keller Date: Fri Mar 16 01:26:30 2018 -0700 i40e: move I40E_FLAG_FILTER_SYNC to a state bit The I40E_FLAG_FILTER_SYNC flag is modified during run time possibly when the RTNL lock is not held. Thus, it should not be part of pf->flags, and instead should be using atomic bit operations in the pf->state field. Create a __I40E_MACVLAN_SYNC_PENDING state bit, and use it instead of the old I40E_FLAG_FILTER_SYNC flag. This is part of a larger effort to remove the need for cmpxchg64 in i40e_set_priv_flags(). Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 3 ++- drivers/net/ethernet/intel/i40e/i40e_main.c | 16 +++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) commit e94d4478669357cd742170c77fc28d6db2040ce4 Author: Anirudh Venkataramanan Date: Tue Mar 20 07:58:19 2018 -0700 ice: Implement filter sync, NDO operations and bump version This patch implements multiple pieces of functionality: 1. Added ice_vsi_sync_filters, which is called through the service task to push filter updates to the hardware. 2. Add support to enable/disable promiscuous mode on an interface. Enabling/disabling promiscuous mode on an interface results in addition/removal of a promisc filter rule through ice_vsi_sync_filters. 3. Implement handlers for ndo_set_mac_address, ndo_change_mtu, ndo_poll_controller and ndo_set_rx_mode. This patch also marks the end of the driver addition by bumping up the driver version. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice.h | 14 + drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 21 + drivers/net/ethernet/intel/ice/ice_common.c | 28 ++ drivers/net/ethernet/intel/ice/ice_common.h | 3 + drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | 12 + drivers/net/ethernet/intel/ice/ice_main.c | 567 +++++++++++++++++++++++- drivers/net/ethernet/intel/ice/ice_switch.c | 77 ++++ drivers/net/ethernet/intel/ice/ice_switch.h | 2 + drivers/net/ethernet/intel/ice/ice_type.h | 5 + 9 files changed, 728 insertions(+), 1 deletion(-) commit 0b28b702e72a6ff90d417689159f72e8891fed78 Author: Anirudh Venkataramanan Date: Tue Mar 20 07:58:18 2018 -0700 ice: Support link events, reset and rebuild Link events are posted to a PF's admin receive queue (ARQ). This patch adds the ability to detect and process link events. This patch also adds the ability to process resets. The driver can process the following resets: 1) EMP Reset (EMPR) 2) Global Reset (GLOBR) 3) Core Reset (CORER) 4) Physical Function Reset (PFR) EMPR is the largest level of reset that the driver can handle. An EMPR resets the manageability block and also the data path, including PHY and link for all the PFs. The affected PFs are notified of this event through a miscellaneous interrupt. GLOBR is a subset of EMPR. It does everything EMPR does except that it doesn't reset the manageability block. CORER is a subset of GLOBR. It does everything GLOBR does but doesn't reset PHY and link. PFR is a subset of CORER and affects only the given physical function. In other words, PFR can be thought of as a CORER for a single PF. Since only the issuing PF is affected, a PFR doesn't result in the miscellaneous interrupt being triggered. All the resets have the following in common: 1) Tx/Rx is halted and all queues are stopped. 2) All the VSIs and filters programmed for the PF are lost and have to be reprogrammed. 3) Control queue interfaces are reset and have to be reprogrammed. In the rebuild flow, control queues are reinitialized, VSIs are reallocated and filters are restored. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice.h | 19 + drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 19 + drivers/net/ethernet/intel/ice/ice_common.c | 60 +++ drivers/net/ethernet/intel/ice/ice_common.h | 5 + drivers/net/ethernet/intel/ice/ice_hw_autogen.h | 2 + drivers/net/ethernet/intel/ice/ice_main.c | 581 +++++++++++++++++++++++- drivers/net/ethernet/intel/ice/ice_type.h | 1 + 7 files changed, 681 insertions(+), 6 deletions(-) commit 30656177c4080460b936709ff6648f201d7d2c1a Author: Alex Williamson Date: Wed Mar 21 12:46:21 2018 -0600 vfio/pci: Add ioeventfd support The ioeventfd here is actually irqfd handling of an ioeventfd such as supported in KVM. A user is able to pre-program a device write to occur when the eventfd triggers. This is yet another instance of eventfd-irqfd triggering between KVM and vfio. The impetus for this is high frequency writes to pages which are virtualized in QEMU. Enabling this near-direct write path for selected registers within the virtualized page can improve performance and reduce overhead. Specifically this is initially targeted at NVIDIA graphics cards where the driver issues a write to an MMIO register within a virtualized region in order to allow the MSI interrupt to re-trigger. Reviewed-by: Peter Xu Reviewed-by: Alexey Kardashevskiy Signed-off-by: Alex Williamson drivers/vfio/pci/vfio_pci.c | 35 ++++++++++++ drivers/vfio/pci/vfio_pci_private.h | 19 ++++++ drivers/vfio/pci/vfio_pci_rdwr.c | 111 ++++++++++++++++++++++++++++++++++++ include/uapi/linux/vfio.h | 27 +++++++++ 4 files changed, 192 insertions(+) commit 07fd7ef3a1c25a11015bb5821c9c5982f722d4a2 Author: Alex Williamson Date: Wed Mar 21 12:46:21 2018 -0600 vfio/pci: Use endian neutral helpers The iowriteXX/ioreadXX functions assume little endian hardware and convert to little endian on a write and from little endian on a read. We currently do our own explicit conversion to negate this. Instead, add some endian dependent defines to avoid all byte swaps. There should be no functional change other than big endian systems aren't penalized with wasted swaps. Reviewed-by: Alexey Kardashevskiy Signed-off-by: Alex Williamson drivers/vfio/pci/vfio_pci_rdwr.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit 0d77ed3589ac054d197ccde7231e36f9e032426c Author: Alex Williamson Date: Wed Mar 21 12:46:20 2018 -0600 vfio/pci: Pull BAR mapping setup from read-write path This creates a common helper that we'll use for ioeventfd setup. Reviewed-by: Peter Xu Reviewed-by: Eric Auger Reviewed-by: Alexey Kardashevskiy Signed-off-by: Alex Williamson drivers/vfio/pci/vfio_pci_rdwr.c | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) commit 5513b920a4f7869acffc8e6d800aebee608409e0 Author: Anirudh Venkataramanan Date: Tue Mar 20 07:58:17 2018 -0700 ice: Update Tx scheduler tree for VSI multi-Tx queue support This patch adds the ability for a VSI to use multiple Tx queues. More specifically, the patch 1) Provides the ability to update the Tx scheduler tree in the firmware. The driver can configure the Tx scheduler tree by adding/removing multiple Tx queues per TC per VSI. 2) Allows a VSI to reconfigure its Tx queues during runtime. 3) Synchronizes the Tx scheduler update operations using locks. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice.h | 7 + drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 28 + drivers/net/ethernet/intel/ice/ice_common.c | 54 ++ drivers/net/ethernet/intel/ice/ice_common.h | 3 + drivers/net/ethernet/intel/ice/ice_main.c | 20 +- drivers/net/ethernet/intel/ice/ice_sched.c | 886 ++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_sched.h | 4 + drivers/net/ethernet/intel/ice/ice_type.h | 7 + 8 files changed, 1006 insertions(+), 3 deletions(-) commit fcea6f3da546b93050f3534aadea7bd96c1d7349 Author: Anirudh Venkataramanan Date: Tue Mar 20 07:58:16 2018 -0700 ice: Add stats and ethtool support This patch implements a watchdog task to get packet statistics from the device. This patch also adds support for the following ethtool operations: ethtool devname ethtool -s devname [msglvl N] [msglevel type on|off] ethtool -g|--show-ring devname ethtool -G|--set-ring devname [rx N] [tx N] ethtool -i|--driver devname ethtool -d|--register-dump devname [raw on|off] [hex on|off] [file name] ethtool -k|--show-features|--show-offload devname ethtool -K|--features|--offload devname feature on|off ethtool -P|--show-permaddr devname ethtool -S|--statistics devname ethtool -a|--show-pause devname ethtool -A|--pause devname [autoneg on|off] [rx on|off] [tx on|off] ethtool -r|--negotiate devname CC: Andrew Lunn CC: Jakub Kicinski CC: Stephen Hemminger Signed-off-by: Anirudh Venkataramanan Acked-by: Stephen Hemminger Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/Makefile | 3 +- drivers/net/ethernet/intel/ice/ice.h | 28 +- drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 43 ++ drivers/net/ethernet/intel/ice/ice_common.c | 195 +++++ drivers/net/ethernet/intel/ice/ice_common.h | 5 + drivers/net/ethernet/intel/ice/ice_ethtool.c | 940 ++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_hw_autogen.h | 80 ++ drivers/net/ethernet/intel/ice/ice_main.c | 469 +++++++++++- drivers/net/ethernet/intel/ice/ice_type.h | 70 ++ 9 files changed, 1828 insertions(+), 5 deletions(-) commit d76a60ba7afb89523c88cf2ed3a044ce4180289e Author: Anirudh Venkataramanan Date: Tue Mar 20 07:58:15 2018 -0700 ice: Add support for VLANs and offloads This patch adds support for VLANs. When a VLAN is created a switch filter is added to direct the VLAN traffic to the corresponding VSI. When a VLAN is deleted, the filter is deleted as well. This patch also adds support for the following hardware offloads. 1) VLAN tag insertion/stripping 2) Receive Side Scaling (RSS) 3) Tx checksum and TCP segmentation 4) Rx checksum Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice.h | 19 + drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 62 +++ drivers/net/ethernet/intel/ice/ice_common.c | 188 ++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 13 + drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | 169 +++++++ drivers/net/ethernet/intel/ice/ice_main.c | 601 +++++++++++++++++++++++- drivers/net/ethernet/intel/ice/ice_switch.c | 169 +++++++ drivers/net/ethernet/intel/ice/ice_switch.h | 4 + drivers/net/ethernet/intel/ice/ice_txrx.c | 405 +++++++++++++++- drivers/net/ethernet/intel/ice/ice_txrx.h | 17 + 10 files changed, 1631 insertions(+), 16 deletions(-) commit 1991a55dc87e8f2557bc90d7f0062b7110ab8437 Merge: ab17ed7 d66e536 Author: Wim Van Sebroeck Date: Mon Mar 26 20:48:27 2018 +0200 Merge branch 'v4.17-rc1' commit d66e53649c18377edc08d48901e658e4fd491d46 Author: Alexey Khoroshilov Date: Sat Mar 24 00:36:46 2018 +0300 watchdog: davinci_wdt: fix error handling in davinci_wdt_probe() clk_disable_unprepare() was added to one error path, but there is another one. The patch makes sure clk is disabled at the both of them. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/davinci_wdt.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 2b245cb29421abbad508e93cdfedf81adc12edf1 Author: Anirudh Venkataramanan Date: Tue Mar 20 07:58:14 2018 -0700 ice: Implement transmit and NAPI support This patch implements ice_start_xmit (the handler for ndo_start_xmit) and related functions. ice_start_xmit ultimately calls ice_tx_map, where the Tx descriptor is built and posted to the hardware by bumping the ring tail. This patch also implements ice_napi_poll, which is invoked when there's an interrupt on the VSI's queues. The interrupt can be due to either a completed Tx or an Rx event. In case of a completed Tx/Rx event, resources are reclaimed. Additionally, in case of an Rx event, the skb is fetched and passed up to the network stack. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice.h | 1 + drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | 46 ++ drivers/net/ethernet/intel/ice/ice_main.c | 55 ++ drivers/net/ethernet/intel/ice/ice_txrx.c | 1026 +++++++++++++++++++++++- drivers/net/ethernet/intel/ice/ice_txrx.h | 45 ++ 5 files changed, 1171 insertions(+), 2 deletions(-) commit cdedef59deb020e78721d820a5692100128c8c73 Author: Anirudh Venkataramanan Date: Tue Mar 20 07:58:13 2018 -0700 ice: Configure VSIs for Tx/Rx This patch configures the VSIs to be able to send and receive packets by doing the following: 1) Initialize flexible parser to extract and include certain fields in the Rx descriptor. 2) Add Tx queues by programming the Tx queue context (implemented in ice_vsi_cfg_txqs). Note that adding the queues also enables (starts) the queues. 3) Add Rx queues by programming Rx queue context (implemented in ice_vsi_cfg_rxqs). Note that this only adds queues but doesn't start them. The rings will be started by calling ice_vsi_start_rx_rings on interface up. 4) Configure interrupts for VSI queues. 5) Implement ice_open and ice_stop. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/Makefile | 3 +- drivers/net/ethernet/intel/ice/ice.h | 36 +- drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 86 ++ drivers/net/ethernet/intel/ice/ice_common.c | 602 ++++++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 13 + drivers/net/ethernet/intel/ice/ice_hw_autogen.h | 59 ++ drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | 246 +++++ drivers/net/ethernet/intel/ice/ice_main.c | 1186 ++++++++++++++++++++++- drivers/net/ethernet/intel/ice/ice_sched.c | 105 ++ drivers/net/ethernet/intel/ice/ice_sched.h | 5 + drivers/net/ethernet/intel/ice/ice_status.h | 2 + drivers/net/ethernet/intel/ice/ice_txrx.c | 361 +++++++ drivers/net/ethernet/intel/ice/ice_txrx.h | 75 ++ drivers/net/ethernet/intel/ice/ice_type.h | 2 + 14 files changed, 2752 insertions(+), 29 deletions(-) commit 9daf8208dd4dee4e13079bd0520a5fb8d20e8b06 Author: Anirudh Venkataramanan Date: Tue Mar 20 07:58:12 2018 -0700 ice: Add support for switch filter programming A VSI needs traffic directed towards it. This is done by programming filter rules on the switch (embedded vSwitch) element in the hardware, which connects the VSI to the ingress/egress port. This patch introduces data structures and functions necessary to add remove or update switch rules on the switch element. This is a pretty low level function that is generic enough to add a whole range of filters. This patch also introduces two top level functions ice_add_mac and ice_remove mac which through a series of intermediate helper functions eventually call ice_aq_sw_rules to add/delete simple MAC based filters. It's worth noting that one invocation of ice_add_mac/ice_remove_mac is capable of adding/deleting multiple MAC filters. Also worth noting is the fact that the driver maintains a list of currently active filters, so every filter addition/removal causes an update to this list. This is done for a couple of reasons: 1) If two VSIs try to add the same filters, we need to detect it and do things a little differently (i.e. use VSI lists, described below) as the same filter can't be added more than once. 2) In the event of a hardware reset we can simply walk through this list and restore the filters. VSI Lists: In a multi-VSI situation, it's possible that multiple VSIs want to add the same filter rule. For example, two VSIs that want to receive broadcast traffic would both add a filter for destination MAC ff:ff:ff:ff:ff:ff. This can become cumbersome to maintain and so this is handled using a VSI list. A VSI list is resource that can be allocated in the hardware using the ice_aq_alloc_free_res admin queue command. Simply put, a VSI list can be thought of as a subscription list containing a set of VSIs to which the packet should be forwarded, should the filter match. For example, if VSI-0 has already added a broadcast filter, and VSI-1 wants to do the same thing, the filter creation flow will detect this, allocate a VSI list and update the switch rule so that broadcast traffic will now be forwarded to the VSI list which contains VSI-0 and VSI-1. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 249 ++++ drivers/net/ethernet/intel/ice/ice_common.c | 74 +- drivers/net/ethernet/intel/ice/ice_main.c | 92 ++ drivers/net/ethernet/intel/ice/ice_status.h | 3 + drivers/net/ethernet/intel/ice/ice_switch.c | 1378 +++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_switch.h | 120 ++ drivers/net/ethernet/intel/ice/ice_type.h | 21 + 7 files changed, 1935 insertions(+), 2 deletions(-) commit 3a858ba392c3b19986c40a4c170ddc37b144115f Author: Anirudh Venkataramanan Date: Tue Mar 20 07:58:11 2018 -0700 ice: Add support for VSI allocation and deallocation This patch introduces data structures and functions to alloc/free VSIs. The driver represents a VSI using the ice_vsi structure. Some noteworthy points about VSI allocation: 1) A VSI is allocated in the firmware using the "add VSI" admin queue command (implemented as ice_aq_add_vsi). The firmware returns an identifier for the allocated VSI. The VSI context is used to program certain aspects (loopback, queue map, etc.) of the VSI's configuration. 2) A VSI is deleted using the "free VSI" admin queue command (implemented as ice_aq_free_vsi). 3) The driver represents a VSI using struct ice_vsi. This is allocated and initialized as part of the ice_vsi_alloc flow, and deallocated as part of the ice_vsi_delete flow. 4) Once the VSI is created, a netdev is allocated and associated with it. The VSI's ring and vector related data structures are also allocated and initialized. 5) A VSI's queues can either be contiguous or scattered. To do this, the driver maintains a bitmap (vsi->avail_txqs) which is kept in sync with the firmware's VSI queue allocation imap. If the VSI can't get a contiguous queue allocation, it will fallback to scatter. This is implemented in ice_vsi_get_qs which is called as part of the VSI setup flow. In the release flow, the VSI's queues are released and the bitmap is updated to reflect this by ice_vsi_put_qs. CC: Shannon Nelson Signed-off-by: Anirudh Venkataramanan Acked-by: Shannon Nelson Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice.h | 72 ++ drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 199 ++++ drivers/net/ethernet/intel/ice/ice_main.c | 1111 +++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_switch.c | 115 +++ drivers/net/ethernet/intel/ice/ice_switch.h | 21 + drivers/net/ethernet/intel/ice/ice_txrx.h | 26 + drivers/net/ethernet/intel/ice/ice_type.h | 4 + 7 files changed, 1548 insertions(+) commit 940b61af02f497fcd911b9e2d75c6b8cf76b92fd Author: Anirudh Venkataramanan Date: Tue Mar 20 07:58:10 2018 -0700 ice: Initialize PF and setup miscellaneous interrupt This patch continues the initialization flow as follows: 1) Allocate and initialize necessary fields (like vsi, num_alloc_vsi, irq_tracker, etc) in the ice_pf instance. 2) Setup the miscellaneous interrupt handler. This also known as the "other interrupt causes" (OIC) handler and is used to handle non hotpath interrupts (like control queue events, link events, exceptions, etc. 3) Implement a background task to process admin queue receive (ARQ) events received by the driver. CC: Shannon Nelson Signed-off-by: Anirudh Venkataramanan Acked-by: Shannon Nelson Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice.h | 84 +++ drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 2 + drivers/net/ethernet/intel/ice/ice_common.c | 6 + drivers/net/ethernet/intel/ice/ice_common.h | 3 + drivers/net/ethernet/intel/ice/ice_controlq.c | 101 ++++ drivers/net/ethernet/intel/ice/ice_controlq.h | 8 + drivers/net/ethernet/intel/ice/ice_hw_autogen.h | 63 +++ drivers/net/ethernet/intel/ice/ice_main.c | 719 +++++++++++++++++++++++- drivers/net/ethernet/intel/ice/ice_txrx.h | 29 + drivers/net/ethernet/intel/ice/ice_type.h | 11 + 10 files changed, 1025 insertions(+), 1 deletion(-) commit dc49c77236769c571e77d49450b2dfc001d60e33 Author: Anirudh Venkataramanan Date: Tue Mar 20 07:58:09 2018 -0700 ice: Get MAC/PHY/link info and scheduler topology This patch adds code to continue the initialization flow as follows: 1) Get PHY/link information and store it 2) Get default scheduler tree topology and store it 3) Get the MAC address associated with the port and store it Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice.h | 1 + drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 261 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_common.c | 264 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 3 + drivers/net/ethernet/intel/ice/ice_sched.c | 328 ++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_sched.h | 6 + drivers/net/ethernet/intel/ice/ice_status.h | 1 + drivers/net/ethernet/intel/ice/ice_type.h | 65 +++++ 8 files changed, 929 insertions(+) commit 9c20346b6309e20f64ee8e7054914ddc92c60baf Author: Anirudh Venkataramanan Date: Tue Mar 20 07:58:08 2018 -0700 ice: Get switch config, scheduler config and device capabilities This patch adds to the initialization flow by getting switch configuration, scheduler configuration and device capabilities. Switch configuration: On boot, an L2 switch element is created in the firmware per physical function. Each physical function is also mapped to a port, to which its switch element is connected. In other words, this switch can be visualized as an embedded vSwitch that can connect a physical function's virtual station interfaces (VSIs) to the egress/ingress port. Egress/ingress filters will be eventually created and applied on this switch element. As part of the initialization flow, the driver gets configuration data from this switch element and stores it. Scheduler configuration: The Tx scheduler is a subsystem responsible for setting and enforcing QoS. As part of the initialization flow, the driver queries and stores the default scheduler configuration for the given physical function. Device capabilities: As part of initialization, the driver has to determine what the device is capable of (ex. max queues, VSIs, etc). This information is obtained from the firmware and stored by the driver. CC: Shannon Nelson Signed-off-by: Anirudh Venkataramanan Acked-by: Shannon Nelson Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/Makefile | 4 +- drivers/net/ethernet/intel/ice/ice.h | 2 + drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 209 +++++++++++++++ drivers/net/ethernet/intel/ice/ice_common.c | 231 ++++++++++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 2 + drivers/net/ethernet/intel/ice/ice_sched.c | 340 ++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_sched.h | 28 ++ drivers/net/ethernet/intel/ice/ice_switch.c | 144 ++++++++++ drivers/net/ethernet/intel/ice/ice_switch.h | 14 + drivers/net/ethernet/intel/ice/ice_type.h | 109 ++++++++ 10 files changed, 1082 insertions(+), 1 deletion(-) commit 336f2c038da1b7f3faf098f2f61bca51e19089ad Merge: 02a21de 6a170d3 Author: David S. Miller Date: Mon Mar 26 13:14:45 2018 -0400 Merge branch 'mlxsw-Offload-IPv6-multicast-routes' Ido Schimmel says: ==================== mlxsw: Offload IPv6 multicast routes Yuval says: The series is intended to allow offloading IPv6 multicast routes and is split into two parts: - First half of the patches continue extending ip6mr [& refactor ipmr] with missing bits necessary for the offloading - fib-notifications, mfc refcounting and default rule identification. - Second half of the patches extend functionality inside mlxsw, beginning with extending lower-parts to support IPv6 mroutes to host and later extending the router/mr internal APIs within the driver to accommodate support in ipv6 configurations. Lastly it adds support in the RTNL_FAMILY_IP6MR notifications, allowing driver to react and offload related routes. ==================== Signed-off-by: David S. Miller commit 6a170d326f7a0d187b33eacb0344add8e223ca11 Author: Yuval Mintz Date: Mon Mar 26 15:01:45 2018 +0300 mlxsw: spectrum: Add multicast router trap for PIMv6 Add a new trap for PIMv6 packets. As PIM already has a designated trap group [ & rate limiter], simply use the same for PIMv6 as well. Signed-off-by: Yuval Mintz Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 + drivers/net/ethernet/mellanox/mlxsw/trap.h | 1 + 2 files changed, 2 insertions(+) commit 64ed1b9e8fb7c2c5a668546795a88ada5ce77c7d Author: Yuval Mintz Date: Mon Mar 26 15:01:44 2018 +0300 mlxsw: spectrum_router: Process IP6MR fib notification Following previous patches driver is ready to handle notifications arriving from ip6mr - start processing those when they arrive following the same manner ipmr currently goes through. This should enable driver to start offloading ipv6 multicast routes. Signed-off-by: Yuval Mintz Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 6981e104a8c3300f053142142d4606d8bbfceee7 Author: Yuval Mintz Date: Mon Mar 26 15:01:43 2018 +0300 mlxsw: spectrum_mr: Add ipv6 specific operations Populate the various operation structures meant for IPv6 with logic unique to that protocol suite. Signed-off-by: Yuval Mintz Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | 56 +++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.h | 1 + 2 files changed, 57 insertions(+) commit eb35da0ce831547e5a8b09a2b315d5e27b19d41f Author: Yuval Mintz Date: Mon Mar 26 15:01:42 2018 +0300 mlxsw: spectrum_router: Make IPMR-related APIs family agnostic spectrum_router and spectrum_mr have several APIs that are used to manipulate configurations originating from ipmr fib notifications. Following previous patches all the protocol-specifics that are necessary for the configuration are hidden within spectrum_mr. This allows us to clean the API and make sure that other than choosing the mr_table based on the fib notification family, spectrum_router wouldn't care about the source of the notification when passing it onward to spectrum_mr. This would later allow us to leverage the same code for fib notifications originating from ip6mr. Signed-off-by: Yuval Mintz Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | 52 ++++++++-------------- drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.h | 8 ++-- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 33 ++++++++++---- 3 files changed, 47 insertions(+), 46 deletions(-) commit 4caef4638f0bea78aa1625ad7fa20df5076d17bf Author: Yuval Mintz Date: Mon Mar 26 15:01:41 2018 +0300 mlxsw: spectrum_mr: Convert into using mr_mfc Current multicast routing logic in driver assumes it's always meant to deal with IPv4 multicast routes, leaving several placeholders for later IPv6 support [currently usually WARN()]. This patch changes the driver's internal multicast route struct into holding a common mr_mfc instead of the IPv4 mfc_cache. The various placeholders are grouped into 2: - Functions that require only the common bits; These remain and the restriction for IPv4-only is lifted. - Function that require IPv4-specifics - for handling these functions we add sets of operations that encapsulate the protocol differences Signed-off-by: Yuval Mintz Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | 192 ++++++++++++---------- 1 file changed, 108 insertions(+), 84 deletions(-) commit 9742f866bd82f6a7fc3dafa538bd0fa2a73a1e5f Author: Yuval Mintz Date: Mon Mar 26 15:01:40 2018 +0300 mlxsw: spectrum_router: Support IPv6 multicast to host CPU A step toward offloading IPv6 routing, this adds an additional multicast routing table meant for IPv6 [with its underlying TCAM region] and populates the default rule for IPv6 multicast packets. Following this, ingress IPv6 multicast packets would be trapped and delivered to the host CPU. Signed-off-by: Yuval Mintz Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.c | 105 ++++++++++++++------- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 69 +++++++++----- .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 1 + 3 files changed, 121 insertions(+), 54 deletions(-) commit a3b66866a71434f3804eba390e9dc343c5c79f3f Author: Yuval Mintz Date: Mon Mar 26 15:01:39 2018 +0300 mlxsw: spectrum_mr: Pass protocol as part of catchall route params Since commit c011ec1bbfd6 ("mlxsw: spectrum: Add the multicast routing offloading logic") spectrum_mr did not populate the protocol portion of the catcahall_route_params; mr-tcam logic worked correctly for ipv4 since the enum value for MLXSW_SP_L3_PROTO_IPV4 is '0'. Explicitly fill the protocol as we'll soon need to differentiate between ipv4 and ipv6. Signed-off-by: Yuval Mintz Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | 1 + 1 file changed, 1 insertion(+) commit a82b1b8fc07cd0715b034d49379de964be464abc Author: Yuval Mintz Date: Mon Mar 26 15:01:38 2018 +0300 mlxsw: reg: Add register settings for IPv6 multicast routing Add new fields for the rmft register necessary for setting the IPv6 multicast FIB table. Add a matching wrapper function for filling the register in the IPv6 scenario. Signed-off-by: Yuval Mintz Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 58 +++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 14 deletions(-) commit 9a3d183ad6079997d6f11c0294c2e0f12cface94 Author: Yuval Mintz Date: Mon Mar 26 15:01:37 2018 +0300 mlxsw: reg: Configure RIF to forward IPv6 multicast packets Similarly to what was done in commit 4af5964e5888 ("mlxsw: reg: Configure RIF to forward IPv4 multicast packets by default") we now set two additional bits to allow IPv6 multicast forwarding. Signed-off-by: Yuval Mintz Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 8c13af2a219c6498071b30ea558438c74267ae4d Author: Yuval Mintz Date: Mon Mar 26 15:01:36 2018 +0300 ip6mr: Add refcounting to mfc Since ipmr and ip6mr are using the same mr_mfc struct at their core, we can now refactor the ipmr_cache_{hold,put} logic and apply refcounting to both ipmr and ip6mr. Signed-off-by: Yuval Mintz Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | 6 +++--- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 6 +++--- include/linux/mroute.h | 19 ------------------- include/linux/mroute_base.h | 13 +++++++++++++ net/ipv4/ipmr.c | 8 ++++---- net/ipv6/ip6mr.c | 6 ++++-- 6 files changed, 27 insertions(+), 31 deletions(-) commit d3c07e5b9939a055fa017f200e535ae947eb22ab Author: Yuval Mintz Date: Mon Mar 26 15:01:35 2018 +0300 ip6mr: Add API for default_rule fib Add the ability to discern whether a given FIB rule notification relates to the default rule inserted when registering ip6mr or a different one. Would later be used by drivers wishing to offload ipv6 multicast routes but unable to offload rules other than the default one. Signed-off-by: Yuval Mintz Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller include/linux/mroute6.h | 10 ++++++++++ net/ipv6/ip6mr.c | 7 +++++++ 2 files changed, 17 insertions(+) commit 088aa3eec2ce340b5d0f0f54430f5706223d5e45 Author: Yuval Mintz Date: Mon Mar 26 15:01:34 2018 +0300 ip6mr: Support fib notifications In similar fashion to ipmr, support fib notifications for ip6mr mfc and vif related events. This would later allow drivers to react to said notifications and offload the IPv6 mroutes. Signed-off-by: Yuval Mintz Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller include/net/netns/ipv6.h | 2 + net/ipv6/ip6mr.c | 112 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 106 insertions(+), 8 deletions(-) commit cdc9f9443b5c3a61c7cec807965054ee1fd29acf Author: Yuval Mintz Date: Mon Mar 26 15:01:33 2018 +0300 ipmr: Make ipmr_dump() common Since all the primitive elements used for the notification done by ipmr are now common [mr_table, mr_mfc, vif_device] we can refactor the logic for dumping them to a common file. Signed-off-by: Yuval Mintz Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller include/linux/mroute_base.h | 18 +++++++++++++++ net/ipv4/ipmr.c | 53 ++------------------------------------------- net/ipv4/ipmr_base.c | 42 +++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 51 deletions(-) commit 54c4cad97b8fd414909b78d4274a6797baa52b3b Author: Yuval Mintz Date: Mon Mar 26 15:01:32 2018 +0300 ipmr: Make MFC fib notifiers common Like vif notifications, move the notifier struct for MFC as well as its helpers into a common file; Currently they're only used by ipmr. Signed-off-by: Yuval Mintz Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 13 ++++--- include/linux/mroute.h | 6 --- include/linux/mroute_base.h | 44 ++++++++++++++++++++++ net/ipv4/ipmr.c | 26 ++----------- 4 files changed, 56 insertions(+), 33 deletions(-) commit bc67a0daf8f3bc6fa8fcb68090f3c444de7f951c Author: Yuval Mintz Date: Mon Mar 26 15:01:31 2018 +0300 ipmr: Make vif fib notifiers common The fib-notifiers are tightly coupled with the vif_device which is already common. Move the notifier struct definition and helpers to the common file; Currently they're only used by ipmr. Signed-off-by: Yuval Mintz Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller include/linux/mroute.h | 8 ------- include/linux/mroute_base.h | 53 +++++++++++++++++++++++++++++++++++++++++++++ net/ipv4/ipmr.c | 31 +++++--------------------- 3 files changed, 58 insertions(+), 34 deletions(-) commit 02a21de90c72ba433bb9eda85bb50af2e4748c2a Merge: 1c976a8 dbf7bb4 Author: David S. Miller Date: Mon Mar 26 13:03:27 2018 -0400 Merge branch 'pernet-convert-part7.1' Kirill Tkhai says: ==================== Converting pernet_operations (part #7.1) this is a resending of the 4 patches from path #7. Anna kindly reviewed them and suggested to take the patches through net tree, since there is pernet_operations::async only in net-next.git. There is Anna's acks on every header, the rest of patch has no changes. ==================== Signed-off-by: David S. Miller commit dbf7bb4437260605fffcaff9aad3514163209db1 Author: Kirill Tkhai Date: Mon Mar 26 12:29:13 2018 +0300 net: Convert nfs4blocklayout_net_ops These pernet_operations create and destroy per-net pipe and dentry, and they seem safe to be marked as async. Signed-off-by: Kirill Tkhai Acked-by: Anna Schumaker Signed-off-by: David S. Miller fs/nfs/blocklayout/rpc_pipefs.c | 1 + 1 file changed, 1 insertion(+) commit 436de500948e1176ef013468c2630f83bb72a901 Author: Kirill Tkhai Date: Mon Mar 26 12:29:04 2018 +0300 net: Convert nfs4_dns_resolver_ops These pernet_operations look similar to rpcsec_gss_net_ops, they just create and destroy another cache. Also they create and destroy directory. So, they also look safe to be async. Signed-off-by: Kirill Tkhai Acked-by: Anna Schumaker Signed-off-by: David S. Miller fs/nfs/dns_resolve.c | 1 + 1 file changed, 1 insertion(+) commit 5e804a6077dccf154047a1ffe5b5232dce579659 Author: Kirill Tkhai Date: Mon Mar 26 12:28:55 2018 +0300 net: Convert sunrpc_net_ops These pernet_operations look similar to rpcsec_gss_net_ops, they just create and destroy another caches. So, they also can be async. Signed-off-by: Kirill Tkhai Acked-by: Anna Schumaker Signed-off-by: David S. Miller net/sunrpc/sunrpc_syms.c | 1 + 1 file changed, 1 insertion(+) commit 855aeba34047f53e3665b0c3bcac80fe87ee2f7b Author: Kirill Tkhai Date: Mon Mar 26 12:28:47 2018 +0300 net: Convert rpcsec_gss_net_ops These pernet_operations initialize and destroy sunrpc_net_id refered per-net items. Only used global list is cache_list, and accesses already serialized. sunrpc_destroy_cache_detail() check for list_empty() without cache_list_lock, but when it's called from unregister_pernet_subsys(), there can't be callers in parallel, so we won't miss list_empty() in this case. Signed-off-by: Kirill Tkhai Acked-by: Anna Schumaker Signed-off-by: David S. Miller net/sunrpc/auth_gss/auth_gss.c | 1 + 1 file changed, 1 insertion(+) commit ece1397cbc89c51914fae1aec729539cfd8bd62b Author: Suzuki K Poulose Date: Mon Mar 26 15:12:49 2018 +0100 arm64: Add work around for Arm Cortex-A55 Erratum 1024718 Some variants of the Arm Cortex-55 cores (r0p0, r0p1, r1p0) suffer from an erratum 1024718, which causes incorrect updates when DBM/AP bits in a page table entry is modified without a break-before-make sequence. The work around is to skip enabling the hardware DBM feature on the affected cores. The hardware Access Flag management features is not affected. There are some other cores suffering from this errata, which could be added to the midr_list to trigger the work around. Cc: Catalin Marinas Cc: ckadabi@codeaurora.org Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon Documentation/arm64/silicon-errata.txt | 1 + arch/arm64/Kconfig | 14 ++++++++++++++ arch/arm64/kernel/cpufeature.c | 16 +++++++++++++++- 3 files changed, 30 insertions(+), 1 deletion(-) commit 05abb595bbaccc9c4290bee62086d0eeea9f0f32 Author: Suzuki K Poulose Date: Mon Mar 26 15:12:48 2018 +0100 arm64: Delay enabling hardware DBM feature We enable hardware DBM bit in a capable CPU, very early in the boot via __cpu_setup. This doesn't give us a flexibility of optionally disable the feature, as the clearing the bit is a bit costly as the TLB can cache the settings. Instead, we delay enabling the feature until the CPU is brought up into the kernel. We use the feature capability mechanism to handle it. The hardware DBM is a non-conflicting feature. i.e, the kernel can safely run with a mix of CPUs with some using the feature and the others don't. So, it is safe for a late CPU to have this capability and enable it, even if the active CPUs don't. To get this handled properly by the infrastructure, we unconditionally set the capability and only enable it on CPUs which really have the feature. Also, we print the feature detection from the "matches" call back to make sure we don't mislead the user when none of the CPUs could use the feature. Cc: Catalin Marinas Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpucaps.h | 3 +- arch/arm64/kernel/cpufeature.c | 71 ++++++++++++++++++++++++++++++++++++++++ arch/arm64/mm/proc.S | 13 ++++---- 3 files changed, 79 insertions(+), 8 deletions(-) commit 6e616864f21160d8d503523b60a53a29cecc6f24 Author: Suzuki K Poulose Date: Mon Mar 26 15:12:47 2018 +0100 arm64: Add MIDR encoding for Arm Cortex-A55 and Cortex-A35 Update the MIDR encodings for the Cortex-A55 and Cortex-A35 Cc: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cputype.h | 4 ++++ 1 file changed, 4 insertions(+) commit ba7d9233c21997eb7eb8514cfb21ff46247dc162 Author: Suzuki K Poulose Date: Mon Mar 26 15:12:46 2018 +0100 arm64: capabilities: Handle shared entries Some capabilities have different criteria for detection and associated actions based on the matching criteria, even though they all share the same capability bit. So far we have used multiple entries with the same capability bit to handle this. This is prone to errors, as the cpu_enable is invoked for each entry, irrespective of whether the detection rule applies to the CPU or not. And also this complicates other helpers, e.g, __this_cpu_has_cap. This patch adds a wrapper entry to cover all the possible variations of a capability by maintaining list of matches + cpu_enable callbacks. To avoid complicating the prototypes for the "matches()", we use arm64_cpu_capabilities maintain the list and we ignore all the other fields except the matches & cpu_enable. This ensures : 1) The capabilitiy is set when at least one of the entry detects 2) Action is only taken for the entries that "matches". This avoids explicit checks in the cpu_enable() take some action. The only constraint here is that, all the entries should have the same "type" (i.e, scope and conflict rules). If a cpu_enable() method is associated with multiple matches for a single capability, care should be taken that either the match criteria are mutually exclusive, or that the method is robust against being called multiple times. This also reverts the changes introduced by commit 67948af41f2e6818ed ("arm64: capabilities: Handle duplicate entries for a capability"). Cc: Robin Murphy Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 12 ++++++++ arch/arm64/kernel/cpu_errata.c | 55 ++++++++++++++++++++++++++++++++----- arch/arm64/kernel/cpufeature.c | 13 ++++----- 3 files changed, 66 insertions(+), 14 deletions(-) commit be5b299830c63ed76e0357473c4218c85fb388b3 Author: Suzuki K Poulose Date: Mon Mar 26 15:12:45 2018 +0100 arm64: capabilities: Add support for checks based on a list of MIDRs Add helpers for detecting an errata on list of midr ranges of affected CPUs, with the same work around. Cc: Will Deacon Cc: Mark Rutland Cc: Ard Biesheuvel Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 1 + arch/arm64/include/asm/cputype.h | 9 +++++ arch/arm64/kernel/cpu_errata.c | 81 ++++++++++++++++++++----------------- arch/arm64/kernel/cpufeature.c | 10 +++-- 4 files changed, 60 insertions(+), 41 deletions(-) commit 1df310505d6d544802016f6bae49aab836ae8510 Author: Suzuki K Poulose Date: Mon Mar 26 15:12:44 2018 +0100 arm64: Add helpers for checking CPU MIDR against a range Add helpers for checking if the given CPU midr falls in a range of variants/revisions for a given model. Cc: Will Deacon Cc: Mark Rutland Cc: Ard Biesheuvel Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 4 ++-- arch/arm64/include/asm/cputype.h | 30 ++++++++++++++++++++++++++++++ arch/arm64/kernel/cpu_errata.c | 16 +++++----------- 3 files changed, 37 insertions(+), 13 deletions(-) commit 5e7951ce19abf4113645ae789c033917356ee96f Author: Suzuki K Poulose Date: Mon Mar 26 15:12:43 2018 +0100 arm64: capabilities: Clean up midr range helpers We are about to introduce generic MIDR range helpers. Clean up the existing helpers in erratum handling, preparing them to use generic version. Cc: Will Deacon Cc: Mark Rutland Cc: Ard Biesheuvel Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/kernel/cpu_errata.c | 108 +++++++++++++++++++++++------------------ 1 file changed, 60 insertions(+), 48 deletions(-) commit 830dcc9f9a7cd26a812522a26efaacf7df6fc365 Author: Suzuki K Poulose Date: Mon Mar 26 15:12:42 2018 +0100 arm64: capabilities: Change scope of VHE to Boot CPU feature We expect all CPUs to be running at the same EL inside the kernel with or without VHE enabled and we have strict checks to ensure that any mismatch triggers a kernel panic. If VHE is enabled, we use the feature based on the boot CPU and all other CPUs should follow. This makes it a perfect candidate for a capability based on the boot CPU, which should be matched by all the CPUs (both when is ON and OFF). This saves us some not-so-pretty hooks and special code, just for verifying the conflict. The patch also makes the VHE capability entry depend on CONFIG_ARM64_VHE. Cc: Marc Zyngier Cc: Will Deacon Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 6 ++++++ arch/arm64/include/asm/virt.h | 6 ------ arch/arm64/kernel/cpufeature.c | 5 +++-- arch/arm64/kernel/smp.c | 38 ------------------------------------- 4 files changed, 9 insertions(+), 46 deletions(-) commit fd9d63da17daf09c0099e3d5e3f0c0f03d9b251b Author: Suzuki K Poulose Date: Mon Mar 26 15:12:41 2018 +0100 arm64: capabilities: Add support for features enabled early The kernel detects and uses some of the features based on the boot CPU and expects that all the following CPUs conform to it. e.g, with VHE and the boot CPU running at EL2, the kernel decides to keep the kernel running at EL2. If another CPU is brought up without this capability, we use custom hooks (via check_early_cpu_features()) to handle it. To handle such capabilities add support for detecting and enabling capabilities based on the boot CPU. A bit is added to indicate if the capability should be detected early on the boot CPU. The infrastructure then ensures that such capabilities are probed and "enabled" early on in the boot CPU and, enabled on the subsequent CPUs. Cc: Julien Thierry Cc: Will Deacon Cc: Mark Rutland Cc: Marc Zyngier Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 48 +++++++++++++++++++++++++------ arch/arm64/kernel/cpufeature.c | 57 ++++++++++++++++++++++++++++--------- 2 files changed, 83 insertions(+), 22 deletions(-) commit d3aec8a28be3b88bf75442e7c24fd9da8d69a6df Author: Suzuki K Poulose Date: Mon Mar 26 15:12:40 2018 +0100 arm64: capabilities: Restrict KPTI detection to boot-time CPUs KPTI is treated as a system wide feature and is only detected if all the CPUs in the sysetm needs the defense, unless it is forced via kernel command line. This leaves a system with a mix of CPUs with and without the defense vulnerable. Also, if a late CPU needs KPTI but KPTI was not activated at boot time, the CPU is currently allowed to boot, which is a potential security vulnerability. This patch ensures that the KPTI is turned on if at least one CPU detects the capability (i.e, change scope to SCOPE_LOCAL_CPU). Also rejetcs a late CPU, if it requires the defense, when the system hasn't enabled it, Cc: Will Deacon Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 9 +++++++++ arch/arm64/kernel/cpufeature.c | 16 +++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) commit 5c137714dd8cae464dbd5f028c07af149e6d09fc Author: Suzuki K Poulose Date: Mon Mar 26 15:12:39 2018 +0100 arm64: capabilities: Introduce weak features based on local CPU Now that we have the flexibility of defining system features based on individual CPUs, introduce CPU feature type that can be detected on a local SCOPE and ignores the conflict on late CPUs. This is applicable for ARM64_HAS_NO_HW_PREFETCH, where it is fine for the system to have CPUs without hardware prefetch turning up later. We only suffer a performance penalty, nothing fatal. Cc: Will Deacon Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 8 ++++++++ arch/arm64/kernel/cpufeature.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) commit ed478b3f9e4ac97fdbe07007fb2662415de8fe25 Author: Suzuki K Poulose Date: Mon Mar 26 15:12:38 2018 +0100 arm64: capabilities: Group handling of features and errata workarounds Now that the features and errata workarounds have the same rules and flow, group the handling of the tables. Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 73 ++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 31 deletions(-) commit fbd890b9b8497bab04c1d338bd97579a7bc53fab Author: Suzuki K Poulose Date: Mon Mar 26 15:12:37 2018 +0100 arm64: capabilities: Allow features based on local CPU scope So far we have treated the feature capabilities as system wide and this wouldn't help with features that could be detected locally on one or more CPUs (e.g, KPTI, Software prefetch). This patch splits the feature detection to two phases : 1) Local CPU features are checked on all boot time active CPUs. 2) System wide features are checked only once after all CPUs are active. Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit d69fe9a7e7214d49fe157ec20889892388d0fe23 Author: Suzuki K Poulose Date: Mon Mar 26 15:12:36 2018 +0100 arm64: capabilities: Split the processing of errata work arounds Right now we run through the errata workarounds check on all boot active CPUs, with SCOPE_ALL. This wouldn't help for detecting erratum workarounds with a SYSTEM_SCOPE. There are none yet, but we plan to introduce some: let us clean this up so that such workarounds can be detected and enabled correctly. So, we run the checks with SCOPE_LOCAL_CPU on all CPUs and SCOPE_SYSTEM checks are run only once after all the boot time CPUs are active. Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 600b9c919c2f4d07a7bf67864086aa3432224674 Author: Suzuki K Poulose Date: Mon Mar 26 15:12:35 2018 +0100 arm64: capabilities: Prepare for grouping features and errata work arounds We are about to group the handling of all capabilities (features and errata workarounds). This patch open codes the wrapper routines to make it easier to merge the handling. Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 58 +++++++++++++----------------------------- 1 file changed, 18 insertions(+), 40 deletions(-) commit cce360b54ce6ca1bcf4b0a870ec076d83606775e Author: Suzuki K Poulose Date: Mon Mar 26 15:12:34 2018 +0100 arm64: capabilities: Filter the entries based on a given mask While processing the list of capabilities, it is useful to filter out some of the entries based on the given mask for the scope of the capabilities to allow better control. This can be used later for handling LOCAL vs SYSTEM wide capabilities and more. All capabilities should have their scope set to either LOCAL_CPU or SYSTEM. No functional/flow change. Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 1 + arch/arm64/kernel/cpufeature.c | 33 ++++++++++++++++++++++----------- 2 files changed, 23 insertions(+), 11 deletions(-) commit eaac4d83daa50fc1b9b7850346e9a62adfd4647e Author: Suzuki K Poulose Date: Mon Mar 26 15:12:33 2018 +0100 arm64: capabilities: Unify the verification Now that each capability describes how to treat the conflicts of CPU cap state vs System wide cap state, we can unify the verification logic to a single place. Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 91 +++++++++++++++++++++++++++--------------- 1 file changed, 58 insertions(+), 33 deletions(-) commit 5b4747c5dce7a873e1e7fe1608835825f714267a Author: Suzuki K Poulose Date: Mon Mar 26 15:12:32 2018 +0100 arm64: capabilities: Add flags to handle the conflicts on late CPU When a CPU is brought up, it is checked against the caps that are known to be enabled on the system (via verify_local_cpu_capabilities()). Based on the state of the capability on the CPU vs. that of System we could have the following combinations of conflict. x-----------------------------x | Type | System | Late CPU | |-----------------------------| | a | y | n | |-----------------------------| | b | n | y | x-----------------------------x Case (a) is not permitted for caps which are system features, which the system expects all the CPUs to have (e.g VHE). While (a) is ignored for all errata work arounds. However, there could be exceptions to the plain filtering approach. e.g, KPTI is an optional feature for a late CPU as long as the system already enables it. Case (b) is not permitted for errata work arounds that cannot be activated after the kernel has finished booting.And we ignore (b) for features. Here, yet again, KPTI is an exception, where if a late CPU needs KPTI we are too late to enable it (because we change the allocation of ASIDs etc). Add two different flags to indicate how the conflict should be handled. ARM64_CPUCAP_PERMITTED_FOR_LATE_CPU - CPUs may have the capability ARM64_CPUCAP_OPTIONAL_FOR_LATE_CPU - CPUs may not have the cappability. Now that we have the flags to describe the behavior of the errata and the features, as we treat them, define types for ERRATUM and FEATURE. Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 68 +++++++++++++++++++++++++++++++++++++ arch/arm64/kernel/cpu_errata.c | 8 ++--- arch/arm64/kernel/cpufeature.c | 34 +++++++++---------- 3 files changed, 89 insertions(+), 21 deletions(-) commit 143ba05d867af34827faf99e0eed4de27106c7cb Author: Suzuki K Poulose Date: Mon Mar 26 15:12:31 2018 +0100 arm64: capabilities: Prepare for fine grained capabilities We use arm64_cpu_capabilities to represent CPU ELF HWCAPs exposed to the userspace and the CPU hwcaps used by the kernel, which include cpu features and CPU errata work arounds. Capabilities have some properties that decide how they should be treated : 1) Detection, i.e scope : A cap could be "detected" either : - if it is present on at least one CPU (SCOPE_LOCAL_CPU) Or - if it is present on all the CPUs (SCOPE_SYSTEM) 2) When is it enabled ? - A cap is treated as "enabled" when the system takes some action based on whether the capability is detected or not. e.g, setting some control register, patching the kernel code. Right now, we treat all caps are enabled at boot-time, after all the CPUs are brought up by the kernel. But there are certain caps, which are enabled early during the boot (e.g, VHE, GIC_CPUIF for NMI) and kernel starts using them, even before the secondary CPUs are brought up. We would need a way to describe this for each capability. 3) Conflict on a late CPU - When a CPU is brought up, it is checked against the caps that are known to be enabled on the system (via verify_local_cpu_capabilities()). Based on the state of the capability on the CPU vs. that of System we could have the following combinations of conflict. x-----------------------------x | Type | System | Late CPU | ------------------------------| | a | y | n | ------------------------------| | b | n | y | x-----------------------------x Case (a) is not permitted for caps which are system features, which the system expects all the CPUs to have (e.g VHE). While (a) is ignored for all errata work arounds. However, there could be exceptions to the plain filtering approach. e.g, KPTI is an optional feature for a late CPU as long as the system already enables it. Case (b) is not permitted for errata work arounds which requires some work around, which cannot be delayed. And we ignore (b) for features. Here, yet again, KPTI is an exception, where if a late CPU needs KPTI we are too late to enable it (because we change the allocation of ASIDs etc). So this calls for a lot more fine grained behavior for each capability. And if we define all the attributes to control their behavior properly, we may be able to use a single table for the CPU hwcaps (which cover errata and features, not the ELF HWCAPs). This is a prepartory step to get there. More bits would be added for the properties listed above. We are going to use a bit-mask to encode all the properties of a capabilities. This patch encodes the "SCOPE" of the capability. As such there is no change in how the capabilities are treated. Cc: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 105 +++++++++++++++++++++++++++++++++--- arch/arm64/kernel/cpu_errata.c | 8 +-- arch/arm64/kernel/cpufeature.c | 42 +++++++-------- 3 files changed, 124 insertions(+), 31 deletions(-) commit 1e89baed5d50d2b8d9fd420830902570270703f1 Author: Suzuki K Poulose Date: Mon Mar 26 15:12:30 2018 +0100 arm64: capabilities: Move errata processing code We have errata work around processing code in cpu_errata.c, which calls back into helpers defined in cpufeature.c. Now that we are going to make the handling of capabilities generic, by adding the information to each capability, move the errata work around specific processing code. No functional changes. Cc: Will Deacon Cc: Marc Zyngier Cc: Mark Rutland Cc: Andre Przywara Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 7 ------ arch/arm64/kernel/cpu_errata.c | 33 ---------------------------- arch/arm64/kernel/cpufeature.c | 43 ++++++++++++++++++++++++++++++++++--- 3 files changed, 40 insertions(+), 43 deletions(-) commit 5e91107b06811f0ca147cebbedce53626c9c4443 Author: Suzuki K Poulose Date: Mon Mar 26 15:12:29 2018 +0100 arm64: capabilities: Move errata work around check on boot CPU We trigger CPU errata work around check on the boot CPU from smp_prepare_boot_cpu() to make sure that we run the checks only after the CPU feature infrastructure is initialised. While this is correct, we can also do this from init_cpu_features() which initilises the infrastructure, and is called only on the Boot CPU. This helps to consolidate the CPU capability handling to cpufeature.c. No functional changes. Cc: Will Deacon Cc: Catalin Marinas Cc: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 6 ++++++ arch/arm64/kernel/smp.c | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) commit 1c976a8c52f0a6c5ed674803908bb5a8993d4980 Merge: 90c00f8 71ea534 Author: David S. Miller Date: Mon Mar 26 13:01:10 2018 -0400 Merge branch 'nfp-flower-add-ip-fragmentation-offloading-support' Pieter Jansen van Vuuren says: ==================== nfp: flower: add ip fragmentation offloading support This set allows offloading IP fragmentation classification. It Implements ip fragmentation match offloading for both IPv4 and IPv6 and offloads frag, nofrag, first and nofirstfrag classification. ==================== Signed-off-by: David S. Miller commit 71ea5343a01cad36d7c44bea07a79dd96049e6c0 Author: Pieter Jansen van Vuuren Date: Mon Mar 26 10:16:38 2018 +0200 nfp: flower: implement ip fragmentation match offload Implement ip fragmentation match offloading for both IPv4 and IPv6. Allows offloading frag, nofrag, first and nofirstfrag classification. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 3 +++ drivers/net/ethernet/netronome/nfp/flower/match.c | 12 ++++++++++++ drivers/net/ethernet/netronome/nfp/flower/offload.c | 15 +++++++++++++++ 3 files changed, 30 insertions(+) commit 07e1671cfca54edf3f0c0915ef8754013b02dfbb Author: Pieter Jansen van Vuuren Date: Mon Mar 26 10:16:37 2018 +0200 nfp: flower: refactor shared ip header in match offload Refactored shared ip header code for IPv4 and IPv6 in match offload. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 19 +++---- drivers/net/ethernet/netronome/nfp/flower/match.c | 61 +++++++++++------------ 2 files changed, 38 insertions(+), 42 deletions(-) commit c0cda3b8ee6b4b6851b2fd8b6db91fd7b0e2524a Author: Dave Martin Date: Mon Mar 26 15:12:28 2018 +0100 arm64: capabilities: Update prototype for enable call back We issue the enable() call back for all CPU hwcaps capabilities available on the system, on all the CPUs. So far we have ignored the argument passed to the call back, which had a prototype to accept a "void *" for use with on_each_cpu() and later with stop_machine(). However, with commit 0a0d111d40fd1 ("arm64: cpufeature: Pass capability structure to ->enable callback"), there are some users of the argument who wants the matching capability struct pointer where there are multiple matching criteria for a single capability. Clean up the declaration of the call back to make it clear. 1) Renamed to cpu_enable(), to imply taking necessary actions on the called CPU for the entry. 2) Pass const pointer to the capability, to allow the call back to check the entry. (e.,g to check if any action is needed on the CPU) 3) We don't care about the result of the call back, turning this to a void. Cc: Will Deacon Cc: Catalin Marinas Cc: Mark Rutland Cc: Andre Przywara Cc: James Morse Acked-by: Robin Murphy Reviewed-by: Julien Thierry Signed-off-by: Dave Martin [suzuki: convert more users, rename call back and drop results] Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 7 ++++- arch/arm64/include/asm/fpsimd.h | 4 ++- arch/arm64/include/asm/processor.h | 7 ++--- arch/arm64/kernel/cpu_errata.c | 53 +++++++++++++++++-------------------- arch/arm64/kernel/cpufeature.c | 42 ++++++++++++++++------------- arch/arm64/kernel/fpsimd.c | 5 ++-- arch/arm64/kernel/traps.c | 4 +-- arch/arm64/mm/fault.c | 3 +-- 8 files changed, 67 insertions(+), 58 deletions(-) commit f31e4b6fe227dfd7ed51c3fc0550878c7d7a8cf2 Author: Anirudh Venkataramanan Date: Tue Mar 20 07:58:07 2018 -0700 ice: Start hardware initialization This patch implements multiple pieces of the initialization flow as follows: 1) A reset is issued to ensure a clean device state, followed by initialization of admin queue interface. 2) Once the admin queue interface is up, clear the PF config and transition the device to non-PXE mode. 3) Get the NVM configuration stored in the device's non-volatile memory (NVM) using ice_init_nvm. CC: Shannon Nelson Signed-off-by: Anirudh Venkataramanan Acked-by: Shannon Nelson Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/Makefile | 3 +- drivers/net/ethernet/intel/ice/ice.h | 2 + drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 79 +++++ drivers/net/ethernet/intel/ice/ice_common.c | 405 ++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 11 + drivers/net/ethernet/intel/ice/ice_controlq.h | 3 + drivers/net/ethernet/intel/ice/ice_hw_autogen.h | 30 ++ drivers/net/ethernet/intel/ice/ice_main.c | 31 ++ drivers/net/ethernet/intel/ice/ice_nvm.c | 236 ++++++++++++++ drivers/net/ethernet/intel/ice/ice_osdep.h | 1 + drivers/net/ethernet/intel/ice/ice_status.h | 5 + drivers/net/ethernet/intel/ice/ice_type.h | 49 +++ 12 files changed, 854 insertions(+), 1 deletion(-) commit 90c00f81548e86ff92fb9f6031c2c3d70f04d50b Merge: 14ef85b 6d2e1a8 Author: David S. Miller Date: Mon Mar 26 12:47:57 2018 -0400 Merge branch 'net-driver-barriers' Sinan Kaya says: ==================== netdev: Eliminate duplicate barriers on weakly-ordered archs Code includes wmb() followed by writel() in multiple places. writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_relaxed(). I did a regex search for wmb() followed by writel() in each drivers directory. I scrubbed the ones I care about in this series. I considered "ease of change", "popular usage" and "performance critical path" as the determining criteria for my filtering. We used relaxed API heavily on ARM for a long time but it did not exist on other architectures. For this reason, relaxed architectures have been paying double penalty in order to use the common drivers. Now that relaxed API is present on all architectures, we can go and scrub all drivers to see what needs to change and what can remain. We start with mostly used ones and hope to increase the coverage over time. It will take a while to cover all drivers. Feel free to apply patches individually. Changes since v6: - bring back amazon ena and add mmiowb, remove ena_com_write_sq_doorbell_rel(). - remove extra mmiowb in bnx2x - correct spelling mistake in bnx2x: Replace doorbell barrier() with wmb() ==================== Signed-off-by: David S. Miller commit 6d2e1a8d5e25e5f4563f5ea24bcb5da1ae261b26 Author: Sinan Kaya Date: Sun Mar 25 10:39:21 2018 -0400 net: ena: Eliminate duplicate barriers on weakly-ordered archs Code includes barrier() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Create a new wrapper function with relaxed write operator. Use the new wrapper when a write is following a barrier(). Since code already has an explicit barrier call, changing writel() to writel_relaxed() and adding mmiowb() for ordering protection. Signed-off-by: Sinan Kaya Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 8 ++++++-- drivers/net/ethernet/amazon/ena/ena_eth_com.h | 8 ++++++-- drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 +++-- 3 files changed, 15 insertions(+), 6 deletions(-) commit fd141fa47c03018aa1f77c335b0f444493e145d5 Author: Sinan Kaya Date: Sun Mar 25 10:39:20 2018 -0400 bnxt_en: Eliminate duplicate barriers on weakly-ordered archs Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Create a new wrapper function with relaxed write operator. Use the new wrapper when a write is following a wmb(). Since code already has an explicit barrier call, changing writel() to writel_relaxed(). Also add mmiowb() so that write code doesn't move outside of scope. Signed-off-by: Sinan Kaya Acked-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) commit e42d8cee343a545ac2d9557a3b28708bbca2bd31 Author: Sinan Kaya Date: Sun Mar 25 10:39:19 2018 -0400 net: qlge: Eliminate duplicate barriers on weakly-ordered archs Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Create a new wrapper function with relaxed write operator. Use the new wrapper when a write is following a wmb(). Signed-off-by: Sinan Kaya Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlge/qlge.h | 16 ++++++++++++++++ drivers/net/ethernet/qlogic/qlge/qlge_main.c | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) commit 7f883c774e1bad34d5474d8a74989336631ce178 Author: Sinan Kaya Date: Sun Mar 25 10:39:18 2018 -0400 bnx2x: Eliminate duplicate barriers on weakly-ordered archs Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_relaxed(). Signed-off-by: Sinan Kaya Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 12 ++++++++---- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 4 ++-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 2 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 ++-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c | 4 +++- 6 files changed, 17 insertions(+), 11 deletions(-) commit edd874235ac20a04483f15b27251203e9508dec5 Author: Sinan Kaya Date: Sun Mar 25 10:39:17 2018 -0400 bnx2x: Replace doorbell barrier() with wmb() barrier() doesn't guarantee memory writes to be observed by the hardware on all architectures. barrier() only tells compiler not to move this code with respect to other read/writes. If memory write needs to be observed by the HW, wmb() is the right choice. Signed-off-by: Sinan Kaya Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 ++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit f9442ac498a86b1b0ec383a332be2635fbb1ed98 Author: Sinan Kaya Date: Sun Mar 25 10:39:16 2018 -0400 qlcnic: Eliminate duplicate barriers on weakly-ordered archs Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_relaxed(). Signed-off-by: Sinan Kaya Acked-by: Manish Chopra Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c95c567322e1dfaa7e0348171181aaf63aa6049 Author: Sinan Kaya Date: Sun Mar 25 10:39:15 2018 -0400 net: qla3xxx: Eliminate duplicate barriers on weakly-ordered archs Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing code to wmb() writel_relaxed() mmiowb() for multi-arch support. Signed-off-by: Sinan Kaya Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qla3xxx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7ec59eeac804a59ea6fff81e89b6e584e9955e5b Author: Anirudh Venkataramanan Date: Tue Mar 20 07:58:06 2018 -0700 ice: Add support for control queues A control queue is a hardware interface which is used by the driver to interact with other subsystems (like firmware, PHY, etc.). It is implemented as a producer-consumer ring. More specifically, an "admin queue" is a type of control queue used to interact with the firmware. This patch introduces data structures and functions to initialize and teardown control/admin queues. Once the admin queue is initialized, the driver uses it to get the firmware version. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/Makefile | 4 +- drivers/net/ethernet/intel/ice/ice.h | 1 + drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 94 +++ drivers/net/ethernet/intel/ice/ice_common.c | 130 ++++ drivers/net/ethernet/intel/ice/ice_common.h | 25 + drivers/net/ethernet/intel/ice/ice_controlq.c | 965 ++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_controlq.h | 83 ++ drivers/net/ethernet/intel/ice/ice_hw_autogen.h | 32 + drivers/net/ethernet/intel/ice/ice_main.c | 11 +- drivers/net/ethernet/intel/ice/ice_osdep.h | 72 ++ drivers/net/ethernet/intel/ice/ice_status.h | 21 + drivers/net/ethernet/intel/ice/ice_type.h | 22 + 12 files changed, 1458 insertions(+), 2 deletions(-) commit 7af8c46da57d88ce4bc074751668e0a4f6954161 Author: Andy Shevchenko Date: Mon Mar 26 14:50:27 2018 +0300 dmaengine: Fix spelling for parenthesis in dmatest documentation Fix spelling for parenthesis in dmatest documentation. Signed-off-by: Andy Shevchenko [ jc: did s/parenthesis/parentheses/ and reflowed ] Signed-off-by: Jonathan Corbet Documentation/driver-api/dmaengine/dmatest.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit bc1287b9e5150c5ff85ef4695ccdbe00a8a4d6bf Author: Andy Shevchenko Date: Mon Mar 26 14:50:26 2018 +0300 dmaengine: Make dmatest.rst indeed reST compatible Make dmatest.rst indeed reST compatible. Achieve this by fixing several formatting issues. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Corbet Documentation/driver-api/dmaengine/dmatest.rst | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit a6cd7714c0bd53f72d3ed61acbb86b07bcf6c693 Author: Andy Shevchenko Date: Mon Mar 26 14:50:25 2018 +0300 dmaengine: Add note to dmatest documentation about supported channels The documentation is not so clear for newbies in a sense of what type of the channels are supported by it. Clarify this by adding a note at the preamble of the documentation. Reported-by: "Zhu, Tony" Signed-off-by: Andy Shevchenko Acked-By: Vinod Koul Signed-off-by: Jonathan Corbet Documentation/driver-api/dmaengine/dmatest.rst | 5 +++++ 1 file changed, 5 insertions(+) commit 14ef85b431feea48987a1082d6f4f3855a3badb5 Merge: 93e9ad9 4c1d458 Author: David S. Miller Date: Mon Mar 26 12:34:20 2018 -0400 Merge branch 'sh_eth-unify-the-SoC-feature-checks' Sergei Shtylyov says: ==================== sh_eth: unify the SoC feature checks Here's a set of 5 patches against DaveM's 'net-next.git' repo. The Ether driver sometimes uses the bit fields in 'struct sh_eth_cpu_data' to check which Ether registers exist in a certain SoC and sometimes it uses sh_eth_is_{gether|rz_fast_ether}() which basically compares 2 pointers (1 of them being constant) -- the latter is definitely not a strongest feature of the RISC CPUs (be it SH or ARM), so I decided to get rid of this type of the feature checks in favour of the bit fields (I've also made use of a 32-bit value and method pointer where appropriate)... [1/5] sh_eth: add sh_eth_cpu_data::soft_reset() method [2/5] sh_eth: add sh_eth_cpu_data::edtrr_trns value [3/5] sh_eth: add sh_eth_cpu_data::xdfar_rw flag [4/5] sh_eth: add sh_eth_cpu_data::no_tx_cntr flag [5/5] sh_eth: add sh_eth_cpu_data::cexcr flag ==================== Signed-off-by: David S. Miller commit 4c1d45850d5327049bce461743179b46adc33f9e Author: Sergei Shtylyov Date: Sat Mar 24 23:12:54 2018 +0300 sh_eth: add sh_eth_cpu_data::cexcr flag GEther controllers have CERCR/CEECR instead of CNDCR on the others. Currently we are calling sh_eth_is_gether() in order to check for this, however it would be simpler to check the new 'cexcr' bitfield in the 'struct sh_eth_cpu_data'; then we'd be able to remove sh_eth_is_gether() as there would be no callers left... Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 11 +++++------ drivers/net/ethernet/renesas/sh_eth.h | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) commit ce9134dff6d90c9f9c6bfd3d32dffdadf8a8e668 Author: Sergei Shtylyov Date: Sat Mar 24 23:11:19 2018 +0300 sh_eth: add sh_eth_cpu_data::no_tx_cntrs flag RZ/A1H (R7S72100) Ether controller doesn't seem to have the TX counter registers like TROCR/CDCR/LCCR (or at least they are still undocumented like some TSU registers), so we bail out of sh_eth_get_stats() early in this case. Currently we are calling sh_eth_is_rz_fast_ether() in order to check for this, but it would be simpler to check the new 'no_tx_cntrs' bitfield in the 'struct sh_eth_cpu_data'; then we'd be able to remove sh_eth_is_rz_fast_ether() as there would be no callers left... Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 8 ++------ drivers/net/ethernet/renesas/sh_eth.h | 1 + 2 files changed, 3 insertions(+), 6 deletions(-) commit 246e30cc4fd8db8390e83617fa5ff29ad5280ad9 Author: Sergei Shtylyov Date: Sat Mar 24 23:09:55 2018 +0300 sh_eth: add sh_eth_cpu_data::xdfar_rw flag The GEther-like controllers have writeable RDFAR/TDFAR, on the others they are read-only or just absent (on R-Car). Currently we are calling sh_eth_is_{gether|rz_fast_ether}() in order to check if these registers can be written to, however it would be simpler to check the new 'xdfar_rw' bitfield in the 'struct sh_eth_cpu_data'... Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 11 +++++++---- drivers/net/ethernet/renesas/sh_eth.h | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) commit 3e416992e2fae2c3177bed157534503691dc3510 Author: Sergei Shtylyov Date: Sat Mar 24 23:08:42 2018 +0300 sh_eth: add sh_eth_cpu_data::edtrr_trns value sh_eth_get_edtrr_trns() returns the value to be written to EDTRR in order to start TX DMA -- this value is different between the GEther-like and the other controllers. We can replace this function (and thus get rid of the calls to sh_eth_is_{gether|rz_fast_ether}() by it) with a new field 'edtrr_trns' in the 'struct sh_eth_cpu_data'. Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 27 +++++++++++++++------------ drivers/net/ethernet/renesas/sh_eth.h | 1 + 2 files changed, 16 insertions(+), 12 deletions(-) commit 4ceedeb1b68e376ccfec9f8d2e46bcd541702aba Author: Sergei Shtylyov Date: Sat Mar 24 23:07:41 2018 +0300 sh_eth: add sh_eth_cpu_data::soft_reset() method sh_eth_reset() performs a software reset which is implemented in a completely different way for the GEther-like controllers vs the other controllers due to a different layout of EDMR (and other factors) -- it therefore makes sense to convert this function to a mandatory sh_eth_cpu_data::soft_reset() method and thus get rid of the runtime controller type check via sh_eth_is_{gether|rz_fast_ether}(). Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 135 ++++++++++++++++++++-------------- drivers/net/ethernet/renesas/sh_eth.h | 3 + 2 files changed, 83 insertions(+), 55 deletions(-) commit bc56e2cafa3f80954a278d74bd18349ac3cb8fa5 Author: Paolo Valente Date: Mon Mar 26 16:06:24 2018 +0200 block, bfq: lower-bound the estimated peak rate to 1 If a storage device handled by BFQ happens to be slower than 7.5 KB/s for a certain amount of time (in the order of a second), then the estimated peak rate of the device, maintained in BFQ, becomes equal to 0. The reason is the limited precision with which the rate is represented (details on the range of representable values in the comments introduced by this commit). This leads to a division-by-zero error where the estimated peak rate is used as divisor. Such a type of failure has been reported in [1]. This commit addresses this issue by: 1. Lower-bounding the estimated peak rate to 1 2. Adding and improving comments on the range of rates representable [1] https://www.spinics.net/lists/kernel/msg2739205.html Signed-off-by: Konstantin Khlebnikov Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 25 ++++++++++++++++++++++++- block/bfq-iosched.h | 2 +- 2 files changed, 25 insertions(+), 2 deletions(-) commit 93e9ad985038f269838c4c5deab4c84d87c7b5a7 Author: Richard Cochran Date: Fri Mar 23 21:24:02 2018 -0700 ptp: Fix documentation to match code. Ever since commit 3a06c7ac24f9 ("posix-clocks: Remove interval timer facility and mmap/fasync callbacks") the possibility of PHC based posix timers has been removed. In addition it will probably never make sense to implement this functionality. This patch removes the misleading text which seems to suggest that posix timers for PHC devices will ever be a thing. Signed-off-by: Richard Cochran Signed-off-by: David S. Miller Documentation/ptp/ptp.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 99f2241c4aa4e18c4e2a1d13ca1bbc37f7e6844e Merge: 0c29ba1 b50ae26 Author: David S. Miller Date: Mon Mar 26 12:12:27 2018 -0400 Merge branch 'hns3-fixes-next' Peng Li says: ==================== fix some bugs for HNS3 This patchset fixes some bugs for HNS3 driver: [Patch 1/5 - 2/5] fix 2 return vlaue issues. [Patch 3/5 - 4/5] fix 2 comments reported by code review. [Ptach 5/5] avoid sending message to IMP because IMP will not handle any message when it is resetting. ==================== Signed-off-by: David S. Miller commit b50ae26c57cb2fe8811574f6c1f92b16968e0dca Author: Peng Li Date: Sat Mar 24 11:32:47 2018 +0800 net: hns3: never send command queue message to IMP when reset IMP will not handle and command queue message any more when it is in core/global, driver should not send command queue message to IMP until reinitialize the NIC HW. This patch checks the status and avoid the message sent to IMP when reset. Signed-off-by: Peng Li Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 23 +++++++++++++++++----- .../ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 6 ++++++ 2 files changed, 24 insertions(+), 5 deletions(-) commit ea739c90650ae39307c7eb2bc6851ab78deed5df Author: Fuyun Liang Date: Sat Mar 24 11:32:46 2018 +0800 net: hns3: fix for not initializing VF rss_hash_key problem Default rss_hash_key value should be given to all vports. But just the PF rss_hash_key has the default value here. This patch adds rss_hash_key Initialization for all vports. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c8f5c0339515202e8662b6e3ae36a7b16610caf Author: Fuyun Liang Date: Sat Mar 24 11:32:45 2018 +0800 net: hns3: fix for the wrong shift problem in hns3_set_txbd_baseinfo Third parameter of hnae_set_field is shift, But a mask is given. This patch fixes it by replacing HNS3_TXD_BDTYPE_M with HNS3_TXD_BDTYPE_S. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da44a00f06df1f823ea449065e79581ee624de4b Author: Fuyun Liang Date: Sat Mar 24 11:32:44 2018 +0800 net: hns3: fix for returning wrong value problem in hns3_get_rss_indir_size The return type of hns3_get_rss_indir_size is u32. But a negative value is returned. This patch fixes it by replacing the negative value with zero. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3bd6d258b1d5f76744567855d1376358a94f127d Author: Fuyun Liang Date: Sat Mar 24 11:32:43 2018 +0800 net: hns3: fix for returning wrong value problem in hns3_get_rss_key_size The return type of hns3_get_rss_key_size is u32. But a negative value is returned. This patch fixes it by replacing the negative value with zero. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c29ba1b43df1eb7d8beb03fc929d2dac4c15f7e Author: Colin Ian King Date: Fri Mar 23 23:51:57 2018 +0000 net: qualcomm: rmnet: check for null ep to avoid null pointer dereference The call to rmnet_get_endpoint can potentially return NULL so check for this to avoid any subsequent null pointer dereferences on a NULL ep. Detected by CoverityScan, CID#1465385 ("Dereference null return value") Fixes: 23790ef12082 ("net: qualcomm: rmnet: Allow to configure flags for existing devices") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 2 ++ 1 file changed, 2 insertions(+) commit d3757ba4c1421d2ad00d2bf97119005e37ad2902 Author: Joe Perches Date: Fri Mar 23 16:34:44 2018 -0700 ethernet: Use octal not symbolic permissions Prefer the direct use of octal for permissions. Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace and some typing. Miscellanea: o Whitespace neatening around these conversions. Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/ethernet/8390/apne.c | 2 +- drivers/net/ethernet/8390/lib8390.c | 2 +- drivers/net/ethernet/8390/ne.c | 2 +- drivers/net/ethernet/8390/ne2k-pci.c | 2 +- drivers/net/ethernet/8390/smc-ultra.c | 2 +- drivers/net/ethernet/8390/stnic.c | 2 +- drivers/net/ethernet/8390/wd.c | 2 +- drivers/net/ethernet/altera/altera_tse_main.c | 6 +- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 10 +- drivers/net/ethernet/amd/xgbe/xgbe-main.c | 2 +- drivers/net/ethernet/broadcom/bnx2.c | 2 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 12 +-- drivers/net/ethernet/broadcom/sb1250-mac.c | 10 +- drivers/net/ethernet/broadcom/tg3.c | 6 +- drivers/net/ethernet/brocade/bna/bnad.c | 2 +- drivers/net/ethernet/brocade/bna/bnad_debugfs.c | 10 +- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 2 +- drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 6 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 112 ++++++++++----------- .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 10 +- drivers/net/ethernet/ec_bhf.c | 2 +- drivers/net/ethernet/emulex/benet/be_main.c | 6 +- drivers/net/ethernet/ibm/ehea/ehea_main.c | 7 +- drivers/net/ethernet/ibm/ibmveth.c | 2 +- drivers/net/ethernet/intel/igb/igb_hwmon.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c | 2 +- drivers/net/ethernet/marvell/mvneta.c | 8 +- drivers/net/ethernet/marvell/skge.c | 2 +- drivers/net/ethernet/marvell/sky2.c | 2 +- drivers/net/ethernet/mellanox/mlx4/main.c | 16 +-- drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | 10 +- drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 32 +++--- .../net/ethernet/netronome/nfp/nfp_net_debugfs.c | 6 +- .../net/ethernet/qlogic/netxen/netxen_nic_main.c | 14 +-- drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | 30 +++--- drivers/net/ethernet/qualcomm/qca_debug.c | 2 +- drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 4 +- drivers/net/ethernet/sfc/mcdi_mon.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 26 ++--- drivers/net/ethernet/sun/niu.c | 10 +- 40 files changed, 194 insertions(+), 195 deletions(-) commit d61e40385655fbba659fc3d81df9bdf1b848e263 Author: Joe Perches Date: Fri Mar 23 15:54:39 2018 -0700 drivers/net: Use octal not symbolic permissions Prefer the direct use of octal for permissions. Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace and some typing. Miscellanea: o Whitespace neatening around these conversions. Signed-off-by: Joe Perches Reviewed-by: Wei Liu Signed-off-by: David S. Miller drivers/net/bonding/bond_procfs.c | 2 +- drivers/net/bonding/bond_sysfs.c | 73 +++++++++++++++++----------------- drivers/net/bonding/bond_sysfs_slave.c | 4 +- drivers/net/caif/caif_serial.c | 32 +++++++-------- drivers/net/caif/caif_spi.c | 16 ++++---- drivers/net/caif/caif_virtio.c | 16 ++++---- drivers/net/can/at91_can.c | 3 +- drivers/net/can/cc770/cc770.c | 4 +- drivers/net/can/cc770/cc770_isa.c | 16 ++++---- drivers/net/can/grcan.c | 4 +- drivers/net/can/janz-ican3.c | 6 +-- drivers/net/can/sja1000/sja1000_isa.c | 14 +++---- drivers/net/can/softing/softing_main.c | 4 +- drivers/net/can/spi/mcp251x.c | 2 +- drivers/net/can/usb/esd_usb2.c | 6 +-- drivers/net/can/vcan.c | 2 +- drivers/net/hamradio/bpqether.c | 3 +- drivers/net/hamradio/yam.c | 2 +- drivers/net/hyperv/netvsc_drv.c | 4 +- drivers/net/ieee802154/at86rf230.c | 2 +- drivers/net/phy/spi_ks8995.c | 2 +- drivers/net/ppp/ppp_generic.c | 2 +- drivers/net/ppp/pppoe.c | 2 +- drivers/net/usb/cdc_ncm.c | 12 +++--- drivers/net/usb/hso.c | 8 ++-- drivers/net/xen-netback/xenbus.c | 4 +- drivers/net/xen-netfront.c | 6 +-- 27 files changed, 124 insertions(+), 127 deletions(-) commit d6444062f8f07c346a21bd815af4a3dc8b231574 Author: Joe Perches Date: Fri Mar 23 15:54:38 2018 -0700 net: Use octal not symbolic permissions Prefer the direct use of octal for permissions. Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace and some typing. Miscellanea: o Whitespace neatening around these conversions. Signed-off-by: Joe Perches Signed-off-by: David S. Miller net/8021q/vlanproc.c | 6 ++--- net/appletalk/atalk_proc.c | 8 +++--- net/atm/atm_sysfs.c | 12 ++++----- net/atm/clip.c | 2 +- net/atm/lec.c | 2 +- net/atm/proc.c | 2 +- net/ax25/af_ax25.c | 6 ++--- net/bluetooth/rfcomm/tty.c | 4 +-- net/bridge/br_sysfs_br.c | 2 +- net/bridge/br_sysfs_if.c | 36 ++++++++++++------------- net/can/af_can.c | 2 +- net/can/gw.c | 2 +- net/ceph/ceph_common.c | 2 +- net/core/net-procfs.c | 6 ++--- net/core/net-sysfs.c | 12 ++++----- net/core/sock.c | 2 +- net/decnet/af_decnet.c | 2 +- net/decnet/dn_dev.c | 2 +- net/decnet/dn_neigh.c | 2 +- net/decnet/dn_route.c | 2 +- net/dns_resolver/dns_key.c | 2 +- net/ipv4/arp.c | 2 +- net/ipv4/fib_trie.c | 6 ++--- net/ipv4/igmp.c | 4 +-- net/ipv4/ipconfig.c | 2 +- net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +- net/ipv4/ping.c | 2 +- net/ipv4/proc.c | 6 ++--- net/ipv4/raw.c | 2 +- net/ipv4/route.c | 4 +-- net/ipv4/tcp_ipv4.c | 2 +- net/ipv4/udp.c | 2 +- net/ipv6/addrconf.c | 2 +- net/ipv6/anycast.c | 2 +- net/ipv6/ip6_flowlabel.c | 2 +- net/ipv6/mcast.c | 4 +-- net/ipv6/proc.c | 6 ++--- net/ipv6/raw.c | 2 +- net/ipv6/route.c | 2 +- net/kcm/kcmproc.c | 4 +-- net/l2tp/l2tp_ppp.c | 2 +- net/llc/llc_proc.c | 4 +-- net/mac80211/rc80211_minstrel.c | 2 +- net/mac80211/rc80211_minstrel_debugfs.c | 8 +++--- net/mac80211/rc80211_minstrel_ht_debugfs.c | 8 +++--- net/netfilter/nf_conntrack_netbios_ns.c | 2 +- net/netfilter/nf_conntrack_snmp.c | 2 +- net/netfilter/nf_conntrack_standalone.c | 2 +- net/netfilter/nf_log.c | 2 +- net/netfilter/nf_synproxy_core.c | 2 +- net/netfilter/xt_IDLETIMER.c | 2 +- net/netfilter/xt_recent.c | 4 +-- net/netrom/af_netrom.c | 6 ++--- net/rose/af_rose.c | 8 +++--- net/rxrpc/af_rxrpc.c | 2 +- net/sctp/proc.c | 16 ++++++------ net/sunrpc/auth_gss/svcauth_gss.c | 2 +- net/sunrpc/cache.c | 10 +++---- net/sunrpc/debugfs.c | 6 ++--- net/sunrpc/rpc_pipe.c | 42 +++++++++++++++--------------- net/wireless/wext-proc.c | 2 +- net/x25/x25_proc.c | 12 ++++----- net/xfrm/xfrm_proc.c | 2 +- 63 files changed, 161 insertions(+), 161 deletions(-) commit 72c44e35f02a1cb4032e476c398a7234badcf49f Author: Brian Foster Date: Fri Mar 23 17:54:32 2018 -0700 xfs: clean up xfs_mount allocation and dynamic initializers Most of the generic data structures embedded in xfs_mount are dynamically initialized immediately after mp is allocated. A few fields are left out and initialized during the xfs_mountfs() sequence, after mp has been attached to the superblock. To clean this up and help prevent premature access of associated fields, refactor xfs_mount allocation and all dependent init calls into a new helper. This self-documents that all low level data structures (i.e., locks, trees, etc.) should be initialized before xfs_mount is attached to the superblock. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_sb.c | 1 - fs/xfs/xfs_mount.c | 2 -- fs/xfs/xfs_super.c | 39 +++++++++++++++++++++++++++++---------- 3 files changed, 29 insertions(+), 13 deletions(-) commit cb6219a2f564920c6e96e99d174cae3df88fe1bc Merge: c2b72e8 070f2d7 Author: David S. Miller Date: Mon Mar 26 11:34:07 2018 -0400 Merge branch 'Drop-NETDEV_UNREGISTER_FINAL' Kirill Tkhai says: ==================== Drop NETDEV_UNREGISTER_FINAL (was unnamed) This series drops unused NETDEV_UNREGISTER_FINAL after some preparations. v2: New patch [2/3]. Use switch() in [1/3]. The first version was acked by Jason Gunthorpe, and [1/3] was acked by David Ahern. Since there are differences to v1, I haven't added Acked-by tags of people. It would be nice, if you fill OK to tag v2 too. ==================== Acked-by: Jason Gunthorpe Signed-off-by: David S. Miller commit 070f2d7e264acd6316fc24092b7f51a18c75ac9c Author: Kirill Tkhai Date: Fri Mar 23 19:47:39 2018 +0300 net: Drop NETDEV_UNREGISTER_FINAL Last user is gone after bdf5bd7f2132 "rds: tcp: remove register_netdevice_notifier infrastructure.", so we can remove this netdevice command. This allows to delete rtnl_lock() in netdev_run_todo(), which is hot path for net namespace unregistration. dev_change_net_namespace() and netdev_wait_allrefs() have rcu_barrier() before NETDEV_UNREGISTER_FINAL call, and the source commits say they were introduced to delemit the call with NETDEV_UNREGISTER, but this patch leaves them on the places, since they require additional analysis, whether we need in them for something else. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller drivers/infiniband/hw/qedr/main.c | 4 ++-- include/linux/netdevice.h | 1 - include/rdma/ib_verbs.h | 4 ++-- net/core/dev.c | 7 ------- 4 files changed, 4 insertions(+), 12 deletions(-) commit 3e0c2dbfea28dd29a3316a4c9774947425a9facd Author: Kirill Tkhai Date: Fri Mar 23 19:47:29 2018 +0300 infiniband: Replace usnic_ib_netdev_event_to_string() with netdev_cmd_to_name() This function just calls netdev_cmd_to_name(). Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller drivers/infiniband/hw/usnic/usnic_ib_main.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit ede2762d93ff16e0974f7446516b46b1022db213 Author: Kirill Tkhai Date: Fri Mar 23 19:47:19 2018 +0300 net: Make NETDEV_XXX commands enum { } This patch is preparation to drop NETDEV_UNREGISTER_FINAL. Since the cmd is used in usnic_ib_netdev_event_to_string() to get cmd name, after plain removing NETDEV_UNREGISTER_FINAL from everywhere, we'd have holes in event2str[] in this function. Instead of that, let's make NETDEV_XXX commands names available for everyone, and to define netdev_cmd_to_name() in the way we won't have to shaffle names after their numbers are changed. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller drivers/infiniband/hw/usnic/usnic_ib_main.c | 15 +------ include/linux/netdevice.h | 69 +++++++++++++++-------------- net/core/dev.c | 20 +++++++++ 3 files changed, 57 insertions(+), 47 deletions(-) commit c2b72e8e10abfb54099828f8fdc68b8b0174e4e4 Author: Madalin Bucur Date: Fri Mar 23 09:52:25 2018 -0500 fsl/fman: remove unnecessary set_dma_ops() call and HAS_DMA dependency The platform device is no longer used for DMA mapping so the (questionable) setting of the DMA ops done here is no longer needed. Removing it together with the HAS_DMA dependency that it required. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/Kconfig | 1 - drivers/net/ethernet/freescale/fman/mac.c | 1 - 2 files changed, 2 deletions(-) commit 40a94f7a6b5b1e7dee2bfd6a29c08fbf761f60de Merge: 996bfed 469e3d7 Author: David S. Miller Date: Mon Mar 26 11:29:11 2018 -0400 Merge branch 'ethernet-ave-add-UniPhier-PXs3-support' Kunihiko Hayashi says: ==================== net: ethernet: ave: add UniPhier PXs3 support Add ethernet controller support on UniPhier PXs3 SoC. ==================== Signed-off-by: David S. Miller commit 469e3d79b85caf4e218ad55a65c18f7e81541f55 Author: Kunihiko Hayashi Date: Fri Mar 23 21:30:37 2018 +0900 net: ethernet: ave: add UniPhier PXs3 support Add a compatible string and SoC data for ethernet controller on UniPhier PXs3 SoC. Signed-off-by: Kunihiko Hayashi Signed-off-by: David S. Miller drivers/net/ethernet/socionext/sni_ave.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8396764154c6365bfeb9cc851b9746511a151255 Author: Kunihiko Hayashi Date: Fri Mar 23 21:30:36 2018 +0900 dt-bindings: net: ave: add PXs3 support Add a compatible string for ethernet controller on UniPhier PXs3 SoC. Signed-off-by: Kunihiko Hayashi Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt | 1 + 1 file changed, 1 insertion(+) commit 837f08fdecbe4b2ffc7725624342e73b886665a8 Author: Anirudh Venkataramanan Date: Tue Mar 20 07:58:05 2018 -0700 ice: Add basic driver framework for Intel(R) E800 Series This patch adds a basic driver framework for the Intel(R) E800 Ethernet Series of network devices. There is no functionality right now other than the ability to load. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher Documentation/networking/ice.txt | 39 +++++++ MAINTAINERS | 1 + drivers/net/ethernet/intel/Kconfig | 14 +++ drivers/net/ethernet/intel/Makefile | 1 + drivers/net/ethernet/intel/ice/Makefile | 10 ++ drivers/net/ethernet/intel/ice/ice.h | 34 ++++++ drivers/net/ethernet/intel/ice/ice_devids.h | 19 ++++ drivers/net/ethernet/intel/ice/ice_main.c | 158 ++++++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_type.h | 28 +++++ 9 files changed, 304 insertions(+) commit 6767b302e1c961f0775abaa068495aa137331191 Author: Ramon Fried Date: Sun Mar 11 14:01:43 2018 +0200 wcn36xx: Check DXE IRQ reason IRQ reason was not cheked for errors. Although error handing is not currently supported, it will be nice to output an error value to the log if the DMA operation failed. Signed-off-by: Ramon Fried Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/dxe.c | 50 +++++++++++++++++++++++++++++----- drivers/net/wireless/ath/wcn36xx/dxe.h | 4 +++ 2 files changed, 47 insertions(+), 7 deletions(-) commit e5d04670904ffe21591573e1aa76a0158f939241 Author: Ramon Fried Date: Sun Mar 11 14:01:18 2018 +0200 wcn36xx: calculate DXE default channel values DXE channel defaults used hardcoded magic values. Added bit definitions of the control register and calculate this values in compilation for clarity. Signed-off-by: Ramon Fried Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/dxe.h | 104 +++++++++++++++++++++++++++++++-- 1 file changed, 99 insertions(+), 5 deletions(-) commit 6ced7958168fa77bdf9cca2ee8c7dcef5965a5cf Author: Ramon Fried Date: Sun Mar 4 18:31:34 2018 +0200 wcn36xx: calculate DXE control registers values DXE descriptor control registers used hardcoded magic values. Added bit definitions of the control register and calculate this values in compilation for clarity. No functional changes. Signed-off-by: Ramon Fried Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/dxe.c | 6 +- drivers/net/wireless/ath/wcn36xx/dxe.h | 112 +++++++++++++++++++++++++++++---- 2 files changed, 103 insertions(+), 15 deletions(-) commit 1fb148f51e6ceb367e3b5e1fccbd3756bf48e9fd Author: Peter Große Date: Tue Mar 6 15:57:18 2018 +0100 ath9k: spelling s/premble/preamble/ Signed-off-by: Peter Große Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/common-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 221b6ec69ed9c56b6cd9a124a387a9472f14284e Author: Sebastian Gottschall Date: Sat Mar 3 05:10:44 2018 +0100 ath9k: fix crash in spectral scan Fixes crash seen on arm smp systems (gateworks ventana imx6): Unable to handle kernel NULL pointer dereference at virtual address 00000014 pgd = 80004000 [00000014] *pgd=00000000 Internal error: Oops - BUG: 17 [#1] PREEMPT SMP ARM Modules linked in: ip6table_filter nf_conntrack_ipv6 ip6_tables nf_log_ipv6 nf_defrag_ipv6 shortcut_fe ipcomp6 xfrm_ipcomp xfrm6_tunnel xfrm6_mode_tunnel xfrm6_mode_transport xfrm6_mode_ro xfrm6_mode_beet ip6_tunnel tunnel6 mip6 ah6 esp6 xfrm_algo sit ip_tunnel tunnel4 ipv6 ath10k_pci ath10k_core ath9k ath mac80211 cfg80211 compat ath_pci ath_hal(P) caamalg authencesn authenc caamrng caamhash caam_jr caam cdc_ncm usbnet usbcore sky2 imx2_wdt CPU: 0 PID: 3 Comm: ksoftirqd/0 Tainted: P 4.9.85 #19 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) task: bf064980 task.stack: bf07c000 PC is at relay_buf_full+0xc/0x30 LR is at _674+0x740/0xf10 [ath9k] pc : [<8018bce0>] lr : [<7f1aa604>] psr: 80000013 sp : bf07dbf0 ip : bf07dc00 fp : bf07dbfc r10: 0000003f r9 : bf130e00 r8 : 809044b0 r7 : 00000000 r6 : be67a9f0 r5 : 00000000 r4 : 809043e4 r3 : c0864c24 r2 : 00000000 r1 : 00000004 r0 : 00000000 Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 10c5387d Table: 4e6a004a DAC: 00000055 Process ksoftirqd/0 (pid: 3, stack limit = 0xbf07c210) Stack: (0xbf07dbf0 to 0xbf07e000) dbe0: bf07dd04 bf07dc00 7f1aa604 8018bce0 dc00: 00004014 be59e010 bf07dc34 bf07dc18 7f1a7084 7f19c07c be59c010 be6470a0 dc20: 0000096c be648954 bf07dc6c bf07dc38 7f1c286c bf07dd90 bf07dc5c bf07dc48 dc40: 8029ea4c 0000003c 00000001 be59c010 00000094 00000000 00000000 00000000 dc60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 dc80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 dca0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 dcc0: 00000000 00000000 00000000 00000000 00000000 00000000 8010ef24 00000030 dce0: be94f5e8 be6485a0 bddf0200 be59c010 be6465a0 be6415a0 bf07ddf4 bf07dd08 dd00: 7f1cf800 7f1aa55c 1fc38c4c 00000000 bf07dd58 cccccccd 66666667 be640bc0 dd20: bf07dd54 be6415a0 1fc38c4c 00000000 00000000 be59c038 be67a9c0 be59e010 dd40: be67a9f0 be647170 8090c904 be59c010 00000000 00000001 1fc38e84 00000000 dd60: be640bc0 bddf0200 00000200 00000010 0000003f 00000002 20000013 be59c010 dd80: 8092d940 bf7ca2c0 bf07ddb4 bf07dd98 1fc38c4c 2602003f 0100ff1b 80ff1b00 dda0: 00808080 00000000 00000000 80808080 80808080 80808080 80808080 00008080 ddc0: 00000000 00000000 7f1b62b8 00000002 be6470ec be6470f0 00000000 bf07de98 dde0: 8092d940 be6415a0 bf07de94 bf07ddf8 7f1d1ed8 7f1cf1fc 00000000 00000000 de00: bf7cc4c0 00000400 be6470f0 bf07de18 8015165c be59c010 8090453c 8090453c de20: bf07dec4 be6465a0 8014f614 80148884 0000619a 00000001 bf07c000 00000100 de40: bf07de78 00000001 7f327850 00000002 afb50401 bf064980 bf07de9c bf07de68 de60: bf064a00 803cc668 bf064a00 be6470b4 be6470b8 80844180 00000000 bf07de98 de80: 8092d940 bf07c000 bf07dec4 bf07de98 80124d18 7f1d1c44 80124c94 00000000 dea0: 00000006 80902098 80902080 40000006 00000100 bf07c000 bf07df24 bf07dec8 dec0: 8012501c 80124ca0 bf7cc4c0 bf064980 be95e1c0 04208040 80902d00 000061c7 dee0: 0000000a 80600b54 8092d940 808441f8 80902080 bf07dec8 bf03b200 bf07c000 df00: bf03b200 8090fe54 00000000 00000000 00000000 00000000 bf07df34 bf07df28 df20: 80125148 80124f28 bf07df5c bf07df38 8013deb4 8012511c 00000000 bf03b240 df40: bf03b200 8013dc90 00000000 00000000 bf07dfac bf07df60 8013ad40 8013dc9c df60: 70448040 00000001 00000000 bf03b200 00000000 00030003 bf07df78 bf07df78 df80: 00000000 00000000 bf07df88 bf07df88 bf03b240 8013ac48 00000000 00000000 dfa0: 00000000 bf07dfb0 80107760 8013ac54 00000000 00000000 00000000 00000000 dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 8c120004 1190ad04 Backtrace: [<8018bcd4>] (relay_buf_full) from [<7f1aa604>] (_674+0x740/0xf10 [ath9k]) [<7f1aa550>] (_674 [ath9k]) from [<7f1cf800>] (_582+0x14b4/0x3708 [ath9k]) r10:be6415a0 r9:be6465a0 r8:be59c010 r7:bddf0200 r6:be6485a0 r5:be94f5e8 r4:00000030 [<7f1cf1f0>] (_582 [ath9k]) from [<7f1d1ed8>] (_735+0x2a0/0xec4 [ath9k]) r10:be6415a0 r9:8092d940 r8:bf07de98 r7:00000000 r6:be6470f0 r5:be6470ec r4:00000002 [<7f1d1c38>] (_735 [ath9k]) from [<80124d18>] (tasklet_action+0x84/0xf8) r10:bf07c000 r9:8092d940 r8:bf07de98 r7:00000000 r6:80844180 r5:be6470b8 r4:be6470b4 [<80124c94>] (tasklet_action) from [<8012501c>] (__do_softirq+0x100/0x1f4) r10:bf07c000 r9:00000100 r8:40000006 r7:80902080 r6:80902098 r5:00000006 r4:00000000 r3:80124c94 [<80124f1c>] (__do_softirq) from [<80125148>] (run_ksoftirqd+0x38/0x4c) r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:8090fe54 r5:bf03b200 r4:bf07c000 [<80125110>] (run_ksoftirqd) from [<8013deb4>] (smpboot_thread_fn+0x224/0x260) [<8013dc90>] (smpboot_thread_fn) from [<8013ad40>] (kthread+0xf8/0x100) r9:00000000 r8:00000000 r7:8013dc90 r6:bf03b200 r5:bf03b240 r4:00000000 [<8013ac48>] (kthread) from [<80107760>] (ret_from_fork+0x14/0x34) r7:00000000 r6:00000000 r5:8013ac48 r4:bf03b240 Code: e89da800 e1a0c00d e92dd800 e24cb004 (e5901014) ---[ end trace dddf11ac9111b272 ]--- Kernel panic - not syncing: Fatal exception in interrupt CPU1: stopping CPU: 1 PID: 0 Comm: swapper/1 Tainted: P D 4.9.85 #19 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) Backtrace: [<8010a708>] (dump_backtrace) from [<8010a99c>] (show_stack+0x18/0x1c) r7:bf093f58 r6:20000193 r5:809168e8 r4:00000000 [<8010a984>] (show_stack) from [<802a09c4>] (dump_stack+0x94/0xa8) [<802a0930>] (dump_stack) from [<8010d184>] (handle_IPI+0xe8/0x180) r7:bf093f58 r6:00000000 r5:00000001 r4:808478c4 [<8010d09c>] (handle_IPI) from [<801013e8>] (gic_handle_irq+0x78/0x7c) r7:f4000100 r6:bf093f58 r5:f400010c r4:8090467c [<80101370>] (gic_handle_irq) from [<8010b378>] (__irq_svc+0x58/0x8c) Exception stack(0xbf093f58 to 0xbf093fa0) 3f40: bf7d62a0 00000000 3f60: 0010a5f4 80113460 bf092000 809043e4 00000002 80904434 bf092008 412fc09a 3f80: 00000000 bf093fb4 bf093fb8 bf093fa8 8010804c 80108050 60000013 ffffffff r9:bf092000 r8:bf092008 r7:bf093f8c r6:ffffffff r5:60000013 r4:80108050 [<80108014>] (arch_cpu_idle) from [<80553c2c>] (default_idle_call+0x30/0x34) [<80553bfc>] (default_idle_call) from [<80158394>] (cpu_startup_entry+0xc4/0xfc) [<801582d0>] (cpu_startup_entry) from [<8010ce40>] (secondary_start_kernel+0x168/0x174) r7:8092d2f8 r4:80913568 [<8010ccd8>] (secondary_start_kernel) from [<10101488>] (0x10101488) r5:00000055 r4:4f07806a Rebooting in 10 seconds.. Reboot failed -- System halted Signed-off-by: Sebastian Gottschall Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/common-spectral.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 8b2d93dd22615cb7f3046a5a2083a6f8bb8052ed Author: Karthikeyan Periyasamy Date: Mon Mar 12 17:09:40 2018 +0530 ath10k: Fix kernel panic while using worker (ath10k_sta_rc_update_wk) When attempt to run worker (ath10k_sta_rc_update_wk) after the station object (ieee80211_sta) delete will trigger the kernel panic. This problem arise in AP + Mesh configuration, Where the current node AP VAP and neighbor node mesh VAP MAC address are same. When the current mesh node try to establish the mesh link with neighbor node, driver peer creation for the neighbor mesh node fails due to duplication MAC address. Already the AP VAP created with same MAC address. It is caused by the following scenario steps. Steps: 1. In above condition, ath10k driver sta_state callback (ath10k_sta_state) fails to do the state change for a station from IEEE80211_STA_NOTEXIST to IEEE80211_STA_NONE due to peer creation fails. Sta_state callback is called from ieee80211_add_station() to handle the new station (neighbor mesh node) request from the wpa_supplicant. 2. Concurrently ath10k receive the sta_rc_update callback notification from the mesh_neighbour_update() to handle the beacon frames of the above neighbor mesh node. since its atomic callback, ath10k driver queue the work (ath10k_sta_rc_update_wk) to handle rc update. 3. Due to driver sta_state callback fails (step 1), mac80211 free the station object. 4. When the worker (ath10k_sta_rc_update_wk) scheduled to run, it will access the station object which is already deleted. so it will trigger kernel panic. Added the peer exist check in sta_rc_update callback before queue the work. Kernel Panic log: Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = c0204000 [00000000] *pgd=00000000 Internal error: Oops: 17 [#1] PREEMPT SMP ARM CPU: 1 PID: 1833 Comm: kworker/u4:2 Not tainted 3.14.77 #1 task: dcef0000 ti: d72b6000 task.ti: d72b6000 PC is at pwq_activate_delayed_work+0x10/0x40 LR is at pwq_activate_delayed_work+0xc/0x40 pc : [] lr : [] psr: 40000193 sp : d72b7f18 ip : 0000007a fp : d72b6000 r10: 00000000 r9 : dd404414 r8 : d8c31998 r7 : d72b6038 r6 : 00000004 r5 : d4907ec8 r4 : dcee1300 r3 : ffffffe0 r2 : 00000000 r1 : 00000001 r0 : 00000000 Flags: nZcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel Control: 10c5787d Table: 595bc06a DAC: 00000015 ... Process kworker/u4:2 (pid: 1833, stack limit = 0xd72b6238) Stack: (0xd72b7f18 to 0xd72b8000) 7f00: 00000001 dcee1300 7f20: 00000001 c02410dc d8c31980 dd404400 dd404400 c0242790 d8c31980 00000089 7f40: 00000000 d93e1340 00000000 d8c31980 c0242568 00000000 00000000 00000000 7f60: 00000000 c02474dc 00000000 00000000 000000f8 d8c31980 00000000 00000000 7f80: d72b7f80 d72b7f80 00000000 00000000 d72b7f90 d72b7f90 d72b7fac d93e1340 7fa0: c0247404 00000000 00000000 c0208d20 00000000 00000000 00000000 00000000 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [] (pwq_activate_delayed_work) from [] (pwq_dec_nr_in_flight+0x58/0xc4) [] (pwq_dec_nr_in_flight) from [] (worker_thread+0x228/0x360) [] (worker_thread) from [] (kthread+0xd8/0xec) [] (kthread) from [] (ret_from_fork+0x14/0x34) Code: e92d4038 e1a05000 ebffffbc[69210.619376] SMP: failed to stop secondary CPUs Rebooting in 3 seconds.. Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 9ef0f58ed7b4a55da4a64641d538e0d9e46579ac Author: Carl Huang Date: Mon Mar 5 14:44:02 2018 +0800 ath10k: fix use-after-free in ath10k_wmi_cmd_send_nowait The skb may be freed in tx completion context before trace_ath10k_wmi_cmd is called. This can be easily captured when KASAN(Kernel Address Sanitizer) is enabled. The fix is to move trace_ath10k_wmi_cmd before the send operation. As the ret has no meaning in trace_ath10k_wmi_cmd then, so remove this parameter too. Signed-off-by: Carl Huang Tested-by: Brian Norris Reviewed-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/trace.h | 12 ++++-------- drivers/net/wireless/ath/ath10k/wmi.c | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) commit 6b8a127bf66d395705153fdaf3fc0b52bedd2e9f Author: Ramon Fried Date: Wed Mar 14 12:14:11 2018 +0200 wcn36xx: reduce verbosity of drivers messages Whenever the WLAN interface is started the FW version and caps are printed. The caps now will be displayed only in debug mode. Firmware version will be displayed only once on first startup of the interface. Change-Id: I4db6ea7f384fe15eebe4c3ddb1d1ccab00094332 Signed-off-by: Ramon Fried Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/main.c | 3 ++- drivers/net/wireless/ath/wcn36xx/smd.c | 18 ++++++++++-------- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 2 ++ 3 files changed, 14 insertions(+), 9 deletions(-) commit ba21ac6cdaef2d0dd51bccbd86547b7f34f7bdc1 Author: Sriram R Date: Wed Mar 14 12:14:10 2018 +0200 ath: fix false radar detection in JP region This fixes false radar detection (of radar type 7) in Japan region by correcting the radar pulse type to Chirp as per specification. Signed-off-by: Sriram R Signed-off-by: Kalle Valo drivers/net/wireless/ath/dfs_pattern_detector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc64d05220f3e34cf432a166b83c8fff14cd7a3d Author: Maharaja Kennadyrajan Date: Wed Mar 14 12:14:08 2018 +0200 ath10k: debugfs support to get final TPC stats for 10.4 variants Export the final Transmit Power Control (TPC) value, which is the minimum of control power and existing TPC value to user space via a new debugfs file "tpc_stats_final" to help with debugging. It works with the new wmi cmd and event introduced in 10.4 firmware branch. WMI command ID: WMI_PDEV_GET_TPC_TABLE_CMDID WMI event ID: WMI_PDEV_TPC_TABLE_EVENTID cat /sys/kernel/debug/ieee80211/phyX/ath10k/tpc_stats_final $ cat /sys/kernel/debug/ieee80211/phyX/ath10k/tpc_stats_final TPC config for channel 5180 mode 10 CTL = 0x 0 Reg. Domain = 58 Antenna Gain = 0 Reg. Max Antenna Gain = 0 Power Limit = 60 Reg. Max Power = 60 Num tx chains = 2 Num supported rates = 109 ******************* CDD POWER TABLE **************** No. Preamble Rate_code tpc_value1 tpc_value2 tpc_value3 0 CCK 0x40 0 0 1 CCK 0x41 0 0 [...] 107 HTCUP 0x 0 46 46 108 HTCUP 0x 0 46 46 ******************* STBC POWER TABLE **************** No. Preamble Rate_code tpc_value1 tpc_value2 tpc_value3 0 CCK 0x40 0 0 1 CCK 0x41 0 0 [...] 107 HTCUP 0x 0 46 46 108 HTCUP 0x 0 46 46 *********************************** TXBF not supported ********************************** The existing tpc_stats debugfs file provides the dump which is minimum of target power and regulatory domain. cat /sys/kernel/debug/ieee80211/phyX/ath10k/tpc_stats Hardware_used: QCA4019 Firmware version: firmware-5.bin_10.4-3.0-00209 Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.h | 22 +++ drivers/net/wireless/ath/ath10k/debug.c | 107 +++++++++++ drivers/net/wireless/ath/ath10k/debug.h | 10 + drivers/net/wireless/ath/ath10k/wmi-ops.h | 20 ++ drivers/net/wireless/ath/ath10k/wmi.c | 308 ++++++++++++++++++++++++++++-- drivers/net/wireless/ath/ath10k/wmi.h | 66 +++++++ 6 files changed, 518 insertions(+), 15 deletions(-) commit caee728ab761fa1255ff636aec13c87a3d01364d Author: Vasanthakumar Thiagarajan Date: Wed Mar 14 12:14:06 2018 +0200 ath10k: add sta rx packet stats per tid Added per tid sta counters for the following - Total number MSDUs received from firmware - Number of MSDUs received with errors like decryption, crc, mic ,etc. - Number of MSDUs dropped in the driver - A-MPDU/A-MSDU subframe stats - Number of MSDUS passed to mac80211 All stats other than A-MPDU stats are only for received data frames. A-MPDU stats might have stats for management frames when monitor interface is active where management frames are notified both in wmi and HTT interfaces. These per tid stats can be enabled with tid bitmask through a debugfs like below echo > /sys/kernel/debug/ieee80211/phyX/ath10k/sta_tid_stats_mask tid 16 (tid_bitmask 0x10000) is used for non-qos data/management frames The stats are read from /sys/kernel/debug/ieee80211/phyX/netdev\:wlanX/stations//dump_tid_stats Sample output: To enable rx stats for tid 0, 5 and 6, echo 0x00000061 > /sys/kernel/debug/ieee80211/phy0/ath10k/sta_tid_stats_mask cat /sys/kernel/debug/ieee80211/phy0/netdev\:wlan15/stations/8c\:fd\:f0\:0a\:8e\:df/dump_tid_stats Driver Rx pkt stats per tid, ([tid] count) ------------------------------------------ MSDUs from FW [00] 2567 [05] 3178 [06] 1089 MSDUs unchained [00] 0 [05] 0 [06] 0 MSDUs locally dropped:chained [00] 0 [05] 0 [06] 0 MSDUs locally dropped:filtered [00] 0 [05] 0 [06] 0 MSDUs queued for mac80211 [00] 2567 [05] 3178 [06] 1089 MSDUs with error:fcs_err [00] 0 [05] 0 [06] 2 MSDUs with error:tkip_err [00] 0 [05] 0 [06] 0 MSDUs with error:crypt_err [00] 0 [05] 0 [06] 0 MSDUs with error:peer_idx_inval [00] 0 [05] 0 [06] 0 A-MPDU num subframes upto 10 [00] 2567 [05] 3178 [06] 1087 A-MPDU num subframes 11-20 [00] 0 [05] 0 [06] 0 A-MPDU num subframes 21-30 [00] 0 [05] 0 [06] 0 A-MPDU num subframes 31-40 [00] 0 [05] 0 [06] 0 A-MPDU num subframes 41-50 [00] 0 [05] 0 [06] 0 A-MPDU num subframes 51-60 [00] 0 [05] 0 [06] 0 A-MPDU num subframes >60 [00] 0 [05] 0 [06] 0 A-MSDU num subframes 1 [00] 2567 [05] 3178 [06] 1089 A-MSDU num subframes 2 [00] 0 [05] 0 [06] 0 A-MSDU num subframes 3 [00] 0 [05] 0 [06] 0 A-MSDU num subframes 4 [00] 0 [05] 0 [06] 0 A-MSDU num subframes >4 [00] 0 [05] 0 [06] 0 Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.h | 45 ++++ drivers/net/wireless/ath/ath10k/debug.c | 47 +++++ drivers/net/wireless/ath/ath10k/debug.h | 31 +++ drivers/net/wireless/ath/ath10k/debugfs_sta.c | 286 ++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/htt_rx.c | 71 ++++++- 5 files changed, 470 insertions(+), 10 deletions(-) commit d558fb51ad3dc7d5f1287d55d0f2e0646af36253 Author: Matias Bjørling Date: Wed Mar 21 20:27:07 2018 +0100 nvme: make nvme_get_log_ext non-static Enable the lightnvm integration to use the nvme_get_log_ext() function. Signed-off-by: Matias Bjørling Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 +- drivers/nvme/host/nvme.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit e929f06d9eaab4dba14e730ef18aa85b76465db9 Author: Christoph Hellwig Date: Tue Mar 20 20:41:35 2018 +0100 nvmet: constify struct nvmet_fabrics_ops Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/target/core.c | 12 ++++++------ drivers/nvme/target/fc.c | 4 ++-- drivers/nvme/target/loop.c | 4 ++-- drivers/nvme/target/nvmet.h | 10 +++++----- drivers/nvme/target/rdma.c | 4 ++-- 5 files changed, 17 insertions(+), 17 deletions(-) commit a5d18612295a0556bc66e8dddb19515f262c3612 Author: Christoph Hellwig Date: Tue Mar 20 20:41:34 2018 +0100 nvmet: refactor configfs transport type handling Have a common table of mappings from numerical transport ids to names, and zero the transport specific area in common code in nvmet_addr_trtype_store. Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/target/configfs.c | 61 ++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 32 deletions(-) commit f871749a9fa40a1c2d09aaf66776e32a0a638881 Author: Max Gurtovoy Date: Tue Mar 20 14:20:41 2018 +0200 nvmet: move device_uuid configfs attr definition to suitable place Signed-off-by: Max Gurtovoy Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/target/configfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b435ecea2a4d0b5cd5be2c5497c3461435f3f3a7 Author: Nitzan Carmi Date: Tue Mar 20 11:07:30 2018 +0000 nvme: Add .stop_ctrl to nvme ctrl ops For consistancy reasons, any fabric-specific works (e.g error recovery/reconnect) should be canceled in nvme_stop_ctrl, as for all other NVMe pending works (e.g. scan, keep alive). The patch aims to simplify the logic of the code, as we now only rely on a vague demand from any fabric to flush its private workqueues at the beginning of .delete_ctrl op. Signed-off-by: Nitzan Carmi Reviewed-by: Max Gurtovoy Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 ++ drivers/nvme/host/nvme.h | 1 + drivers/nvme/host/rdma.c | 12 +++++++++--- 3 files changed, 12 insertions(+), 3 deletions(-) commit 187c0832ee80250036adb386b5ffa8f4bcb0ff1e Author: Nitzan Carmi Date: Tue Mar 20 11:07:29 2018 +0000 nvme-rdma: Allow DELETING state change failure in error_recovery While error recovery is ongoing, it is OK to move ctrl to DELETING state (from concurrent delete_work). Thus we don't need a warning for that case. Signed-off-by: Nitzan Carmi Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2079699c10c8c60a9572540c2f77d045abf036eb Author: Keith Busch Date: Mon Mar 19 10:53:50 2018 -0600 nvme: Skip checking heads without namespaces If a task is holding a reference to a namespace on a removed controller, the head will not be released. If the same controller is added again later, its namespaces may not be successfully added. Instead, the user will see kernel message "Duplicate IDs for nsid ". This patch fixes that by skipping heads that don't have namespaces when considering if a new namespace is safe to add. Reported-by: Alex Gagniuc Cc: stable@vger.kernel.org Signed-off-by: Keith Busch Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 1 + 1 file changed, 1 insertion(+) commit 9bad0404ecd7594265cef04e176adeaa4ffbca4a Author: Max Gurtovoy Date: Wed Feb 28 13:12:39 2018 +0200 nvme-rdma: Don't flush delete_wq by default during remove_one The .remove_one function is called for any ib_device removal. In case the removed device has no reference in our driver, there is no need to flush the work queue. Reviewed-by: Israel Rukshin Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit a3dd7d0022c347207ae931c753a6dc3e6e8fcbc1 Author: Max Gurtovoy Date: Wed Feb 28 13:12:38 2018 +0200 nvmet-rdma: Don't flush system_wq by default during remove_one The .remove_one function is called for any ib_device removal. In case the removed device has no reference in our driver, there is no need to flush the system work queue. Reviewed-by: Israel Rukshin Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/target/rdma.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit e1a2ee249b19c3a65de893150d2045099c693bc3 Author: Israel Rukshin Date: Wed Mar 14 10:22:45 2018 +0000 nvmet-rdma: Fix use after free in nvmet_rdma_cm_handler() We free nvmet rdma queues while handling rdma_cm events. In order to avoid this we destroy the qp and the queue after destroying the cm_id which guarantees that all rdma_cm events are done. Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/target/rdma.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit be9bddeb0a3ff017d9f56db99d67518c8a1b29cf Author: Israel Rukshin Date: Wed Mar 14 10:22:44 2018 +0000 nvmet-rdma: Remove unused queue state Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/target/rdma.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 9d625f7792875e8119ac3f364f3fd71b8bfc1294 Author: James Smart Date: Wed Feb 28 14:49:11 2018 -0800 nvmet_fc: prevent new io rqsts in possible isr completions When a bio completion calls back into the transport for a back-end io device, the request completion path can free the transport io job structure allowing it to be reused for other operations. The transport has a defer_rcv queue which holds temporary cmd rcv ops while waitng for io job structures. when the job frees, if there's a cmd waiting, it is picked up and submitted for processing, which can call back out to the bio path if it's a read. Unfortunately, what is unknown is the context of the original bio done call, and it may be in a state (softirq) that is not compatible with submitting the new bio in the same calling sequence. This is especially true when using scsi back-end devices as scsi is in softirq when it makes the done call. Correct by scheduling the io to be started via workq rather than calling the start new io path inline to the original bio done path. Signed-off-by: James Smart Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/target/fc.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 0cdd5fca876b1e9c56ca01186ba650b680248b35 Author: James Smart Date: Mon Mar 5 20:55:49 2018 -0800 nvme_fc: on remoteport reuse, set new nport_id and role. When reattaching to a removed remoteport that has not yet been fully deleted as it's waiting for reconnect timeouts, be sure to re-set the ports nport id and role. Signed-off-by: James Smart Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 2 ++ 1 file changed, 2 insertions(+) commit b12740d316fa89f3f6191b71f986cf3b9383d379 Author: James Smart Date: Wed Feb 28 14:49:10 2018 -0800 nvme_fc: fix abort race on teardown with lld reject Another abort race: An io request is started, becomes active, and is attempted to be started with the lldd. At the same time the controller is stopped/torndown and an itterator is run to abort the ios. As the io is active, it is added to the outstanding aborted io count. However on the original io request thread, the driver ends up rejecting the io due to the condition that induced the controller teardown. The driver reject path didn't check whether it was in the outstanding io count. This left the count outstanding stopping controller teardown. Correct by, in the driver reject case, setting the state to inactive and checking whether it was in the outstanding io count. Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 041018c634e44d8697879b241e17a9466f2e83ed Author: James Smart Date: Mon Mar 12 09:32:22 2018 -0700 nvme_fc: io timeout should defer abort to ctrl reset The current nvme_fc code, when an io times out, will abort the io on the fc link, then call the error recovery routine to reset the controller. It is during the reset of the controller that the transport will wait for all ios to be aborted before sending a Disconnect LS to the target. However, the reset routine only waits for the io which it generates the abort for to complete. Any io that was aborted just prior to the reset isn't in it's list to wait for. Thus the Disconnect is getting sent before the aborts have completed. Correct by removing the abort in the timeout handler. The reset will generate the abort. At that point the timeout handler can be simplified to request the reset (via the error handler) and restart the timeout timer. Also fixes a small typo in a comment in the reset handler. Signed-off-by: James Smart Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit cf25809bec2c7df4b45df5b2196845d9a4a3c89b Author: James Smart Date: Tue Mar 13 09:48:07 2018 -0700 nvme_fc: fix ctrl create failures racing with workq items If there are errors during initial controller create, the transport will teardown the partially initialized controller struct and free the ctlr memory. Trouble is - most of those errors can occur due to asynchronous events happening such io timeouts and subsystem connectivity failures. Those failures invoke async workq items to reset the controller and attempt reconnect. Those may be in progress as the main thread frees the ctrl memory, resulting in NULL ptr oops. Prevent this from happening by having the main ctrl failure thread changing state to DELETING followed by synchronously cancelling any pending queued work item. The change of state will prevent the scheduling of resets or reconnect events. Signed-off-by: James Smart Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 467c77d4cbefaaf65e2f44fe102d543a52fcae5b Author: Jarosław Janik Date: Sun Mar 11 19:51:56 2018 +0100 nvme-pci: disable APST for Samsung NVMe SSD 960 EVO + ASUS PRIME Z370-A Yet another "incompatible" Samsung NVMe SSD 960 EVO and Asus motherboard combination. 960 EVO device disappears from PCIe bus within few minutes after boot-up when APST is in use and never gets back. Forcing NVME_QUIRK_NO_APST is the only way to make this drive work with this particular motherboard. NVME_QUIRK_NO_DEEPEST_PS doesn't work, upgrading motherboard's BIOS didn't help either. Since this is a desktop motherboard, the only drawback of not using APST is increased device temperature. Signed-off-by: Jarosław Janik Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 77d0612da0e61cb2903ecd0be02444e4c958c672 Author: Max Gurtovoy Date: Sun Mar 11 17:46:06 2018 +0200 nvme: centralize ctrl removal prints nvme_delete_ctrl can be called from various contexts in parallel, and cause duplicated information prints, even though the specific context doesn't perform the actual removal. Instead, print the information when the actual removal occurs. Signed-off-by: Max Gurtovoy Reviewed-by: Johannes Thumshirn Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 3 +++ drivers/nvme/host/fc.c | 13 +++++-------- drivers/nvme/host/rdma.c | 4 ---- 3 files changed, 8 insertions(+), 12 deletions(-) commit 97c122233f73e91ceed5038e6e59fc5009305f7e Author: Keith Busch Date: Thu Mar 8 14:50:32 2018 -0700 nvme-pci: Add .get_address ctrl callback The nvme-fabrics exports the controller address to sysfs, and we'd like to have parity with this feature for PCIe. This patch provides the appropiate callback and returns the controller address as the pci domain:bus:device.function. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 70da6094a646f0f2d823e077614840cf21055580 Author: Matias Bjørling Date: Mon Feb 26 13:55:40 2018 +0100 nvme: implement log page low/high offset and dwords NVMe 1.2.1 extends the get log page interface to include 64 bit offset and increases the number of dwords to 32 bits. Implement for future use. Signed-off-by: Matias Bjørling Reviewed-by: Johannes Thumshirn Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) commit 765cc031cddde40bdc279e8e2697571c7956c54e Author: Jianchao Wang Date: Mon Feb 12 20:54:46 2018 +0800 nvme: change namespaces_mutext to namespaces_rwsem namespaces_mutext is used to synchronize the operations on ctrl namespaces list. Most of the time, it is a read operation. On the other hand, there are many interfaces in nvme core that need this lock, such as nvme_wait_freeze, and even more interfaces will be added. If we use mutex here, circular dependency could be introduced easily. For example: context A context B nvme_xxx nvme_xxx hold namespaces_mutext require namespaces_mutext sync context B So it is better to change it from mutex to rwsem. Reviewed-by: Keith Busch Signed-off-by: Jianchao Wang Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 64 +++++++++++++++++++++---------------------- drivers/nvme/host/multipath.c | 4 +-- drivers/nvme/host/nvme.h | 2 +- 3 files changed, 35 insertions(+), 35 deletions(-) commit 6f8e0d787e3727ed70116e3523f4ecb86887c000 Author: Jianchao Wang Date: Mon Feb 12 20:54:44 2018 +0800 nvme: fix the dangerous reference of namespaces list nvme_remove_namespaces and nvme_remove_invalid_namespaces reference the ctrl->namespaces list w/o holding namespaces_mutext. It is ok to invoke nvme_ns_remove there, but what if there is others. To be safer, reference the ctrl->namespaces list under namespaces_mutext. Reviewed-by: Keith Busch Signed-off-by: Jianchao Wang Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 9a915a5be7dc320743034a17394e08eb438baf33 Author: Jianchao Wang Date: Mon Feb 12 20:57:24 2018 +0800 nvme-pci: quiesce IO queues prior to disabling device HMB accesses Quiesce IO queues prior to disabling device HMB accesses. A controller using HMB may relay on it to efficiently complete IO commands. Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jianchao Wang Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit cf4182f3d06cec0546c69123f4104a2b69d07be2 Author: Thomas Tai Date: Thu Feb 8 13:38:30 2018 -0500 Documentation: nvme: Documentation for nvme fault injection Add examples to show how to use nvme fault injection. Signed-off-by: Thomas Tai Reviewed-by: Eric Saint-Etienne Signed-off-by: Karl Volz Reviewed-by: Keith Busch Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe Documentation/fault-injection/fault-injection.txt | 8 ++ .../fault-injection/nvme-fault-injection.txt | 116 +++++++++++++++++++++ 2 files changed, 124 insertions(+) commit b9e03857f2e22788db6ccb67512a6604a6b4f6db Author: Thomas Tai Date: Thu Feb 8 13:38:29 2018 -0500 nvme: Add fault injection feature Linux's fault injection framework provides a systematic way to support error injection via debugfs in the /sys/kernel/debug directory. This patch uses the framework to add error injection to NVMe driver. The fault injection source code is stored in a separate file and only linked if CONFIG_FAULT_INJECTION_DEBUG_FS kernel config is selected. Once the error injection is enabled, NVME_SC_INVALID_OPCODE with no retry will be injected into the nvme_end_request. Users can change the default status code and no retry flag via debufs. Following example shows how to enable and inject an error. For more examples, refer to Documentation/fault-injection/nvme-fault-injection.txt How to enable nvme fault injection: First, enable CONFIG_FAULT_INJECTION_DEBUG_FS kernel config, recompile the kernel. After booting up the kernel, do the following. How to inject an error: mount /dev/nvme0n1 /mnt echo 1 > /sys/kernel/debug/nvme0n1/fault_inject/times echo 100 > /sys/kernel/debug/nvme0n1/fault_inject/probability cp a.file /mnt Expected Result: cp: cannot stat ‘/mnt/a.file’: Input/output error Message from dmesg: FAULT_INJECTION: forcing a failure. name fault_inject, interval 1, probability 100, space 0, times 1 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.15.0-rc8+ #2 Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 Call Trace: dump_stack+0x5c/0x7d should_fail+0x148/0x170 nvme_should_fail+0x2f/0x50 [nvme_core] nvme_process_cq+0xe7/0x1d0 [nvme] nvme_irq+0x1e/0x40 [nvme] __handle_irq_event_percpu+0x3a/0x190 handle_irq_event_percpu+0x30/0x70 handle_irq_event+0x36/0x60 handle_fasteoi_irq+0x78/0x120 handle_irq+0xa7/0x130 ? tick_irq_enter+0xa8/0xc0 do_IRQ+0x43/0xc0 common_interrupt+0xa2/0xa2 RIP: 0010:native_safe_halt+0x2/0x10 RSP: 0018:ffffffff82003e90 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffdd RAX: ffffffff817a10c0 RBX: ffffffff82012480 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 000000008e38ce64 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff82012480 R13: ffffffff82012480 R14: 0000000000000000 R15: 0000000000000000 ? __sched_text_end+0x4/0x4 default_idle+0x18/0xf0 do_idle+0x150/0x1d0 cpu_startup_entry+0x6f/0x80 start_kernel+0x4c4/0x4e4 ? set_init_arg+0x55/0x55 secondary_startup_64+0xa5/0xb0 print_req_error: I/O error, dev nvme0n1, sector 9240 EXT4-fs error (device nvme0n1): ext4_find_entry:1436: inode #2: comm cp: reading directory lblock 0 Signed-off-by: Thomas Tai Reviewed-by: Eric Saint-Etienne Signed-off-by: Karl Volz Reviewed-by: Keith Busch Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/Makefile | 1 + drivers/nvme/host/core.c | 2 + drivers/nvme/host/fault_inject.c | 79 ++++++++++++++++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 27 ++++++++++++++ 4 files changed, 109 insertions(+) commit 42595eb7d0095897823b89344e497b69d08d91c1 Author: Minwoo Im Date: Thu Feb 8 22:56:31 2018 +0900 nvme: use define instead of magic value for identify size NVME_IDENTIFY_DATA_SIZE was added to linux/nvme.h by following commit. commit 0add5e8e588c ("nvmet: use NVME_IDENTIFY_DATA_SIZE") Make it use NVME_IDENTIFY_DATA_SIZE define instead of magic value 0x1000 in case of identify data size. Reviewed-by: Johannes Thumshirn Signed-off-by: Minwoo Im Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7bfca0cfe60554faa6e9dafa97a4282fb035576b Author: Sagi Grimberg Date: Thu Jan 25 13:56:46 2018 +0200 iscsi-target: use common inet_addr_is_any Instead of open-coding it. Reviewed-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Signed-off-by: Sagi Grimberg Cc: "Nicholas A. Bellinger" Cc: target-devel@vger.kernel.org Signed-off-by: Jens Axboe drivers/target/iscsi/iscsi_target.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) commit 4c65268588102014837b2d09e5a02557e5d3fc9e Author: Sagi Grimberg Date: Wed Jan 24 20:27:10 2018 +0200 nvmet: don't return "any" ip address in discovery log page Its perfectly valid to assign a nvmet port to listen on "any" IP address (traddr 0.0.0.0 for ipv4 address family) for IP based transport ports. However, we must not return this address in discovery log entries. Instead we need to return the address where the request was accepted on (req->port address). Since this is nvme transport specific, introduce an optional .disc_traddr interface that is designed to check that a port in question is bound to "any" IP address and if so, set the traddr from the port where the request came from. Reviewed-by: Johannes Thumshirn Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/discovery.c | 30 +++++++++++++++++++++++++++--- drivers/nvme/target/nvmet.h | 2 ++ drivers/nvme/target/rdma.c | 18 ++++++++++++++++++ 3 files changed, 47 insertions(+), 3 deletions(-) commit a470143fc83924251647143ff042bd2843e296cf Author: Sagi Grimberg Date: Wed Jan 24 20:24:24 2018 +0200 net/utils: Introduce inet_addr_is_any Can be useful to check INET_ANY address for both ipv4/ipv6 addresses. Reviewed-by: Bart Van Assche Signed-off-by: Sagi Grimberg Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Jens Axboe include/linux/inet.h | 1 + net/core/utils.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) commit 738947f0f3cf77baeab5176a2eb50bf9dccc6236 Author: Martin Kepplinger Date: Fri Mar 23 08:32:31 2018 +0100 Documentation: magic-numbers: Fix typo This fixes a little then / them confusion. Signed-off-by: Martin Kepplinger Signed-off-by: Jonathan Corbet Documentation/process/magic-number.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52c37d410d4864bda40ba2408863ed43d1548c9e Author: Martin Kepplinger Date: Thu Mar 22 13:06:56 2018 +0100 Documentation: admin-guide: add kvmconfig, xenconfig and tinyconfig commands Add kvmconfig, xenconfig and tinyconfig to the list of alternative configuration commands. Descriptions are directly taken from the Makefile. Signed-off-by: Martin Kepplinger Signed-off-by: Jonathan Corbet Documentation/admin-guide/README.rst | 7 +++++++ 1 file changed, 7 insertions(+) commit b520e49befd02358f7cd6526ea01dcd9bf0f5e61 Author: Pali Rohár Date: Wed Mar 21 21:03:36 2018 +0100 Input: alps - Update documentation for trackstick v3 format Bits for M, R and L buttons are already processed in alps. Other newly documented bits not yet. Signed-off-by: Pali Rohár Signed-off-by: Jonathan Corbet Documentation/input/devices/alps.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f0f56716fc3e5d547fd7811eb218a30ed0695605 Author: Kunihiko Hayashi Date: Fri Mar 23 10:30:53 2018 +0900 ata: ahci-platform: add reset control support Add support to get and control a list of resets for the device as optional and shared. These resets must be kept de-asserted until the device is enabled. This is specified as shared because some SoCs like UniPhier series have common reset controls with all ahci controller instances. Signed-off-by: Kunihiko Hayashi Reviewed-by: Hans de Goede Signed-off-by: Tejun Heo .../devicetree/bindings/ata/ahci-platform.txt | 1 + drivers/ata/ahci.h | 1 + drivers/ata/libahci_platform.c | 24 +++++++++++++++++++--- 3 files changed, 23 insertions(+), 3 deletions(-) commit fcc6dd4b7b4dfc57ba19f988cfa5ac335de885d5 Author: Sebastian Ott Date: Wed Jun 22 19:42:40 2016 +0200 s390/chsc: query utility strings via fmt3 channel path descriptor Add support for format 3 channel path descriptors and use them to gather utility strings. Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky arch/s390/include/asm/css_chars.h | 6 ++++-- drivers/s390/cio/chp.c | 1 + drivers/s390/cio/chp.h | 1 + drivers/s390/cio/chsc.c | 3 +++ drivers/s390/cio/chsc.h | 7 +++++++ 5 files changed, 16 insertions(+), 2 deletions(-) commit ded27d8d2eae2aefe7d03d3e7c3fbdcd1fd501fc Author: Sebastian Ott Date: Thu Jun 29 13:27:22 2017 +0200 s390/cio: rename struct channel_path_desc Rename struct channel_path_desc to struct channel_path_desc_fmt0 to fit the scheme. Provide a macro for the function wrappers that gather this and related data from firmware. Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ccwdev.h | 2 +- arch/s390/include/asm/chpid.h | 2 +- drivers/s390/block/dasd_eckd.c | 2 +- drivers/s390/cio/chp.c | 10 +++---- drivers/s390/cio/chp.h | 4 +-- drivers/s390/cio/chsc.c | 56 +++++++++++++++------------------------ drivers/s390/cio/chsc.h | 4 +-- drivers/s390/cio/device_ops.c | 4 +-- drivers/s390/net/qeth_core_main.c | 2 +- 9 files changed, 36 insertions(+), 50 deletions(-) commit 135a8b4ce5d737115571f08c6d0649f1aed6a48a Author: Sebastian Ott Date: Thu Mar 15 15:03:43 2018 +0100 s390/cio: fix unbind of io_subchannel_driver If the io_subchannel_driver is unbound from a subchannel it bluntly kills all I/O on the subchannel and sets the ccw_device state to not operable before deregistering the ccw_device. However, for online devices we should set the device offline (disband path groups etc.) which does not happen if the device is in not oper state. Simply deregister the ccw device - ccw_device_remove is smart enough to set the device offline properly. If everything fails call io_subchannel_quiesce afterwards as a safeguard. Reported-by: Shalini Chellathurai Saroja Signed-off-by: Sebastian Ott Acked-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/device.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 88bf319fc2d6d971ef8692c2cae7f96708340461 Author: Julian Wiedmann Date: Tue Mar 6 17:58:49 2018 +0100 s390/qdio: split up CCQ handling for EQBS / SQBS Get rid of the confusing two-stage translation in a hot path, and only handle CCQs that we anticipate for the respective command. Any unexpected value (such as CCQ 97 (rc == 1) for SQBS) should be considered a severe HW/driver bug, and traced as such. Signed-off-by: Julian Wiedmann Reviewed-by: Benjamin Block Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_main.c | 77 +++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 44 deletions(-) commit dae55b6fef58530c13df074bcc182c096609339e Author: Julian Wiedmann Date: Mon Mar 5 09:39:38 2018 +0100 s390/qdio: don't retry EQBS after CCQ 96 Immediate retry of EQBS after CCQ 96 means that we potentially misreport the state of buffers inspected during the first EQBS call. This occurs when 1. the first EQBS finds all inspected buffers still in the initial state set by the driver (ie INPUT EMPTY or OUTPUT PRIMED), 2. the EQBS terminates early with CCQ 96, and 3. by the time that the second EQBS comes around, the state of those previously inspected buffers has changed. If the state reported by the second EQBS is 'driver-owned', all we know is that the previous buffers are driver-owned now as well. But we can't tell if they all have the same state. So for instance - the second EQBS reports OUTPUT EMPTY, but any number of the previous buffers could be OUTPUT ERROR by now, - the second EQBS reports OUTPUT ERROR, but any number of the previous buffers could be OUTPUT EMPTY by now. Effectively, this can result in both over- and underreporting of errors. If the state reported by the second EQBS is 'HW-owned', that doesn't guarantee that the previous buffers have not been switched to driver-owned in the mean time. So for instance - the second EQBS reports INPUT EMPTY, but any number of the previous buffers could be INPUT PRIMED (or INPUT ERROR) by now. This would result in failure to process pending work on the queue. If it's the final check before yielding initiative, this can cause a (temporary) queue stall due to IRQ avoidance. Fixes: 25f269f17316 ("[S390] qdio: EQBS retry after CCQ 96") Cc: #v3.2+ Signed-off-by: Julian Wiedmann Reviewed-by: Benjamin Block Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_main.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit c11a3dfd6fedd5266c2f9d7286981dc804dfb7cc Author: Julian Wiedmann Date: Wed Mar 7 14:19:43 2018 +0100 s390/qdio: restrict buffer merging to eligible devices Only attempt to merge PENDING into EMPTY buffers for devices where the PENDING state is actually expected (ie. IQD with CQ). This might speed up the hot path a little bit. Signed-off-by: Julian Wiedmann Reviewed-by: Ursula Braun Reviewed-by: Benjamin Block Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0cf1e05157b9e5530dcc3ca9fec9bf617fc93375 Author: Julian Wiedmann Date: Wed Mar 7 14:01:01 2018 +0100 s390/qdio: don't merge ERROR output buffers On an Output queue, both EMPTY and PENDING buffer states imply that the buffer is ready for completion-processing by the upper-layer drivers. So for a non-QEBSM Output queue, get_buf_states() merges mixed batches of PENDING and EMPTY buffers into one large batch of EMPTY buffers. The upper-layer driver (ie. qeth) later distuingishes PENDING from EMPTY by inspecting the slsb_state for QDIO_OUTBUF_STATE_FLAG_PENDING. But the merge logic in get_buf_states() contains a bug that causes us to erronously also merge ERROR buffers into such a batch of EMPTY buffers (ERROR is 0xaf, EMPTY is 0xa1; so ERROR & EMPTY == EMPTY). Effectively, most outbound ERROR buffers are currently discarded silently and processed as if they had succeeded. Note that this affects _all_ non-QEBSM device types, not just IQD with CQ. Fix it by explicitly spelling out the exact conditions for merging. For extracting the "get initial state" part out of the loop, this relies on the fact that get_buf_states() is never called with a count of 0. The QEBSM path already strictly requires this, and the two callers with variable 'count' make sure of it. Fixes: 104ea556ee7f ("qdio: support asynchronous delivery of storage blocks") Cc: #v3.2+ Signed-off-by: Julian Wiedmann Reviewed-by: Ursula Braun Reviewed-by: Benjamin Block Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_main.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) commit 152485bf76907ac7a2cc0a63b0822b23ef25da56 Author: Julian Wiedmann Date: Wed Dec 6 08:53:33 2017 +0100 s390/qdio: simplify math in get_*_buffer_frontier() When determining the buffer count that get_buf_states() should be queried for, 'count' is capped at 127 buffers. So the check q->first_to_check == (q->first_to_check + count) % 128 can be reduced to count == 0 This helps to emphasize that get_buf_states() is really only called with count > 0. Signed-off-by: Julian Wiedmann Reviewed-by: Benjamin Block Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_main.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit dd3b8c329aa270027fba61a02a12600972dc3983 Author: Guan Xuetao Date: Wed Mar 21 21:10:56 2018 +0800 MAINTAINERS: UNICORE32: Change email account Change email account for unicore32 arch and pkunity soc drivers Since old email server mprc.pku.edu.cn was blocked in recent years Signed-off-by: Guan Xuetao Cc: Arnd Bergmann Signed-off-by: Arnd Bergmann MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 04b0297863d46121439535012b42748cf5c58c5e Author: Arnd Bergmann Date: Fri Mar 9 21:04:46 2018 +0100 staging: iio: remove iio-trig-bfin-timer driver The blackfin architecture is getting removed, so the timer trigger driver is now obsolete. Since this is the last remaining iio trigger driver in staging, I'm removing the entire directory. Acked-by: Greg Kroah-Hartman Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann MAINTAINERS | 1 - drivers/staging/iio/Kconfig | 1 - drivers/staging/iio/Makefile | 1 - drivers/staging/iio/trigger/Kconfig | 19 -- drivers/staging/iio/trigger/Makefile | 5 - drivers/staging/iio/trigger/iio-trig-bfin-timer.c | 292 ---------------------- drivers/staging/iio/trigger/iio-trig-bfin-timer.h | 25 -- 7 files changed, 344 deletions(-) commit b8ac14d388c3ee830ed23f7bb0677b6d173d8111 Author: Arnd Bergmann Date: Fri Mar 9 11:41:32 2018 +0100 tty: hvc: remove tile driver The Tile architecture is obsolete and getting removed from the kernel, this removes the corresponding console driver as well. Acked-by: Greg Kroah-Hartman Signed-off-by: Arnd Bergmann drivers/tty/hvc/Makefile | 1 - drivers/tty/hvc/hvc_tile.c | 196 --------------------------------------------- 2 files changed, 197 deletions(-) commit e6bf3cc5850acb2ca9e53959059aaeff3c4e2e1f Author: Arnd Bergmann Date: Fri Mar 9 17:16:06 2018 +0100 tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers The blackfin architecture is getting removed, so these drivers are not needed any more. Acked-by: Greg Kroah-Hartman Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/tty/Kconfig | 13 -- drivers/tty/Makefile | 1 - drivers/tty/bfin_jtag_comm.c | 353 ---------------------------------------- drivers/tty/hvc/Kconfig | 9 - drivers/tty/hvc/Makefile | 1 - drivers/tty/hvc/hvc_bfin_jtag.c | 104 ------------ 6 files changed, 481 deletions(-) commit b716d38c9b7c48e79ad94aa0b4aa749e7400a59d Author: Arnd Bergmann Date: Fri Mar 9 16:01:20 2018 +0100 serial: remove tile uart driver The tile architecture is getting removed, and this driver is useless without it. Acked-by: Greg Kroah-Hartman Signed-off-by: Arnd Bergmann drivers/tty/serial/Kconfig | 9 - drivers/tty/serial/Makefile | 1 - drivers/tty/serial/tilegx.c | 689 -------------------------------------------- 3 files changed, 699 deletions(-) commit ece2ca9647bc6f7a17486ae2804014da8440d098 Author: Arnd Bergmann Date: Fri Mar 9 16:27:09 2018 +0100 serial: remove m32r_sio driver The m32r architecture is getting removed, so we don't need this any more. Acked-by: Nicolas Pitre Acked-by: Greg Kroah-Hartman Signed-off-by: Arnd Bergmann drivers/tty/serial/Kconfig | 29 - drivers/tty/serial/Makefile | 1 - drivers/tty/serial/m32r_sio.c | 1053 ------------------------------------- drivers/tty/serial/m32r_sio_reg.h | 150 ------ 4 files changed, 1233 deletions(-) commit aa1fbc719e3c4f27b802ba40c8c4b40a1a95f15b Author: Arnd Bergmann Date: Fri Mar 9 17:06:39 2018 +0100 serial: remove blackfin drivers The blackfin architecture is getting removed, so both the bfin_uart and bfin_sport_uart can be removed as well. Acked-by: Greg Kroah-Hartman Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/tty/serial/Kconfig | 149 ---- drivers/tty/serial/Makefile | 2 - drivers/tty/serial/bfin_sport_uart.c | 937 -------------------- drivers/tty/serial/bfin_sport_uart.h | 86 -- drivers/tty/serial/bfin_uart.c | 1551 ---------------------------------- 5 files changed, 2725 deletions(-) commit aa4afa2cddf069405fa9dc326074071fb475fbac Author: Arnd Bergmann Date: Fri Mar 9 17:45:30 2018 +0100 serial: remove cris/etrax uart drivers The cris architecture is getting removed, so we don't need the uart driver any more. Acked-by: Greg Kroah-Hartman Acked-by: Jesper Nilsson Signed-off-by: Arnd Bergmann .../bindings/serial/axis,etraxfs-uart.txt | 22 - drivers/tty/serial/Kconfig | 11 - drivers/tty/serial/Makefile | 2 - drivers/tty/serial/crisv10.c | 4248 -------------------- drivers/tty/serial/crisv10.h | 133 - drivers/tty/serial/etraxfs-uart.c | 960 ----- 6 files changed, 5376 deletions(-) commit c4094c818f82c347a184e545eb2051a11182d606 Author: Aaron Wu Date: Thu Mar 15 18:50:17 2018 +0800 usb: Remove Blackfin references in USB support The website is no longer used for tracking bugs. Signed-off-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/usb/gadget/function/f_uac1_legacy.c | 2 -- drivers/usb/gadget/function/u_uac1_legacy.c | 2 -- drivers/usb/gadget/function/u_uac1_legacy.h | 2 -- drivers/usb/gadget/legacy/audio.c | 2 -- 4 files changed, 8 deletions(-) commit da2827a298f8a2159f31466759cbba2dd4f1b65f Author: Arnd Bergmann Date: Fri Mar 9 22:45:26 2018 +0100 usb: isp1362: remove blackfin arch glue The blackfin architecture is getting removed, and this is the last remaining architecture specific setting, so the various hacks can be removed now. From all I can tell, there are no remaining in-tree users of the driver, but it could be used by out-of-tree platform ports. I've marked the driver as 'depends on COMPILE_TEST', short of removing it outright. It was originally written for some ARM PXA machines using the same chip, but that platform never really worked and the code has been removed a long time ago. Acked-by: Greg Kroah-Hartman Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/usb/host/Kconfig | 1 + drivers/usb/host/isp1362.h | 46 ---------------------------------------------- 2 files changed, 1 insertion(+), 46 deletions(-) commit a9762b704f5d5e167bbc261573621782b90efbc4 Author: Arnd Bergmann Date: Fri Mar 9 17:37:54 2018 +0100 usb: musb: remove blackfin port The blackfin architecture is getting removed, so we can clean up all the special cases in the musb driver. Acked-by: Greg Kroah-Hartman Acked-by: Aaron Wu Acked-by: Bin Liu Cc: Stephen Rothwell [arnd: adding in fixups from Aaron and Stephen] Signed-off-by: Arnd Bergmann .../driver-api/usb/writing_musb_glue_layer.rst | 3 - drivers/usb/musb/Kconfig | 12 +- drivers/usb/musb/Makefile | 1 - drivers/usb/musb/blackfin.c | 623 --------------------- drivers/usb/musb/blackfin.h | 81 --- drivers/usb/musb/musb_core.c | 7 +- drivers/usb/musb/musb_core.h | 43 -- drivers/usb/musb/musb_debugfs.c | 2 - drivers/usb/musb/musb_dma.h | 11 - drivers/usb/musb/musb_gadget.c | 56 +- drivers/usb/musb/musb_host.c | 12 +- drivers/usb/musb/musb_regs.h | 182 ------ drivers/usb/musb/musbhsdma.c | 5 - drivers/usb/musb/musbhsdma.h | 64 --- include/linux/usb/musb.h | 7 - 15 files changed, 13 insertions(+), 1096 deletions(-) commit 03f4c9abd73284193f70e64da1a266d393650530 Author: Arnd Bergmann Date: Fri Mar 9 16:10:20 2018 +0100 usb: host: remove tilegx platform glue The tile architecture is getting removed, so the ehci and ohci platform glue drivers are no longer needed. In case of ohci, this is the last one to define a PLATFORM_DRIVER macro, so we can remove even more. Acked-by: Greg Kroah-Hartman Acked-by: Alan Stern Signed-off-by: Arnd Bergmann drivers/usb/host/ehci-hcd.c | 5 - drivers/usb/host/ehci-tilegx.c | 207 ----------------------------------------- drivers/usb/host/ohci-hcd.c | 18 ---- drivers/usb/host/ohci-tilegx.c | 196 -------------------------------------- include/linux/usb/tilegx.h | 35 ------- 5 files changed, 461 deletions(-) commit 4dab216d1fc1ec6783df1b78de5a00df1a7d6991 Author: Arnd Bergmann Date: Fri Mar 9 21:12:18 2018 +0100 pwm: remove pwm-bfin driver The blackfin architecture is getting removed, so this driver is now obsolete as well. Acked-by: Thierry Reding Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/pwm/Kconfig | 9 --- drivers/pwm/Makefile | 1 - drivers/pwm/pwm-bfin.c | 157 ------------------------------------------------- 3 files changed, 167 deletions(-) commit e58af24ccd8d235c7aaa0ef0fc63a18c5d2cb88e Author: Arnd Bergmann Date: Fri Mar 9 17:21:55 2018 +0100 i2c: remove bfin-twi driver The blackfin architecture is getting removed, so the twi driver can also be removed. Acked-by: Aaron Wu Acked-by: Wolfram Sang Signed-off-by: Arnd Bergmann drivers/i2c/busses/Kconfig | 18 - drivers/i2c/busses/Makefile | 1 - drivers/i2c/busses/i2c-bfin-twi.c | 737 -------------------------------------- 3 files changed, 756 deletions(-) commit 47838669de9d9e1411fab9323f2ac1457d1944d2 Author: Arnd Bergmann Date: Fri Mar 9 21:10:44 2018 +0100 spi: remove blackfin related host drivers The blackfin architecture is getting removed, so these won't be needed any more. Acked-by: Mark Brown Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/spi/Kconfig | 19 - drivers/spi/Makefile | 3 - drivers/spi/spi-adi-v3.c | 984 ---------------------------- drivers/spi/spi-bfin-sport.c | 919 -------------------------- drivers/spi/spi-bfin5xx.c | 1462 ------------------------------------------ 5 files changed, 3387 deletions(-) commit 011bf62430f49e7ce436dbbd9dbec490156442a5 Author: Arnd Bergmann Date: Fri Mar 9 21:01:17 2018 +0100 watchdog: remove bfin_wdt driver The blackfin architecture is getting removed, so this driver has become obsolete. Acked-by: Guenter Roeck Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann Documentation/watchdog/watchdog-parameters.txt | 5 - drivers/watchdog/Kconfig | 13 - drivers/watchdog/Makefile | 3 - drivers/watchdog/bfin_wdt.c | 476 ------------------------- 4 files changed, 497 deletions(-) commit c7b2d3e52d7be208480944b2434ddf9e0ef9b58d Author: Arnd Bergmann Date: Fri Mar 9 18:18:54 2018 +0100 can: remove bfin_can driver The blackfin architecture is getting removed, so this one is now obsolete. Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/net/can/Kconfig | 9 - drivers/net/can/Makefile | 1 - drivers/net/can/bfin_can.c | 784 --------------------------------------------- 3 files changed, 794 deletions(-) commit 7ec164a18dc69ab4f347a11885c25421a71feea6 Author: Arnd Bergmann Date: Fri Mar 9 18:13:20 2018 +0100 mmc: remove bfin_sdh driver The blackfin architecture is getting removed, so this one is obsolete now as well. Acked-by: Ulf Hansson Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/mmc/host/Kconfig | 19 -- drivers/mmc/host/Makefile | 1 - drivers/mmc/host/bfin_sdh.c | 679 -------------------------------------------- 3 files changed, 699 deletions(-) commit c957ea5c797cfccffeee92e0af8e0e99212dd755 Author: Arnd Bergmann Date: Fri Mar 9 17:24:55 2018 +0100 input: misc: remove blackfin rotary driver The blackfin architecture is getting removed, so this one is obsolete as well. Acked-by: Dmitry Torokhov Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/input/misc/Kconfig | 9 - drivers/input/misc/Makefile | 1 - drivers/input/misc/bfin_rotary.c | 294 ------------------------------ include/linux/platform_data/bfin_rotary.h | 117 ------------ 4 files changed, 421 deletions(-) commit 01b7649598c6ad36d07b037ecf6548f6c7fdd083 Author: Arnd Bergmann Date: Fri Mar 9 18:11:52 2018 +0100 input: keyboard: remove bf54x driver The blackfin architecture is getting removed, so this driver is now obsolete. Acked-by: Dmitry Torokhov Signed-off-by: Arnd Bergmann drivers/input/keyboard/Kconfig | 9 - drivers/input/keyboard/Makefile | 1 - drivers/input/keyboard/bf54x-keys.c | 396 ------------------------------------ 3 files changed, 406 deletions(-) commit c44734a875e0529c16a797257978fd9d2182a7ac Author: Arnd Bergmann Date: Fri Mar 9 18:10:45 2018 +0100 ata: remove bf54x driver The blackfin architecture is getting removed, so this driver is obsolete as well. Acked-by: Tejun Heo Signed-off-by: Arnd Bergmann drivers/ata/Kconfig | 9 - drivers/ata/Makefile | 1 - drivers/ata/pata_bf54x.c | 1703 ---------------------------------------------- 3 files changed, 1713 deletions(-) commit f59b2dc2de63652cad750efc2ad1012eb1bb342f Author: Arnd Bergmann Date: Fri Mar 9 18:16:31 2018 +0100 pinctrl: remove adi2/blackfin drivers The blackfin architecture is getting removed, so these are now obsolete. Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/pinctrl/Kconfig | 19 - drivers/pinctrl/Makefile | 3 - drivers/pinctrl/pinctrl-adi2-bf54x.c | 588 --------------- drivers/pinctrl/pinctrl-adi2-bf60x.c | 517 ------------- drivers/pinctrl/pinctrl-adi2.c | 1114 ---------------------------- drivers/pinctrl/pinctrl-adi2.h | 75 -- include/linux/platform_data/pinctrl-adi2.h | 40 - 7 files changed, 2356 deletions(-) commit 9a95e8d25a140ba95654b34b44f531d0c485c7a7 Author: Arnd Bergmann Date: Fri Mar 9 17:46:54 2018 +0100 gpio: remove etraxfs driver The cris architecture is getting removed, so we no longer need the etraxfs driver. Signed-off-by: Arnd Bergmann .../devicetree/bindings/gpio/gpio-etraxfs.txt | 22 - drivers/gpio/Kconfig | 9 - drivers/gpio/Makefile | 1 - drivers/gpio/gpio-etraxfs.c | 475 --------------------- 4 files changed, 507 deletions(-) commit 9a1651dcc123e8650d8da0b31fd6dc94940a935d Author: Arnd Bergmann Date: Fri Mar 9 17:41:49 2018 +0100 cpufreq: remove cris specific drivers The cris architecture is getting removed, including the artpec3 and etraxfs SoCs, so these cpufreq drivers are now unused. Acked-by: Viresh Kumar Acked-by: Rafael J. Wysocki Acked-by: Jesper Nilsson Signed-off-by: Arnd Bergmann drivers/cpufreq/Makefile | 2 - drivers/cpufreq/cris-artpec3-cpufreq.c | 93 ---------------------------------- drivers/cpufreq/cris-etraxfs-cpufreq.c | 92 --------------------------------- 3 files changed, 187 deletions(-) commit 9a3daf58f98bae1d40a3629a8e59c98589801a11 Author: Arnd Bergmann Date: Fri Mar 9 17:32:20 2018 +0100 cpufreq: remove blackfin driver The blackfin architecture is getting removed, so this driver is now obsolete. Acked-by: Viresh Kumar Acked-by: Rafael J. Wysocki Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/cpufreq/Makefile | 1 - drivers/cpufreq/blackfin-cpufreq.c | 217 ------------------------------------- 2 files changed, 218 deletions(-) commit 1e81bf79e3a89c6be8133658a3c123b079d56c11 Author: Arnd Bergmann Date: Fri Mar 9 16:24:48 2018 +0100 media: platform: remove m32r specific arv driver The m32r architecture is getting removed, so this one is no longer needed. Acked-by: Mauro Carvalho Chehab Signed-off-by: Arnd Bergmann drivers/media/platform/Kconfig | 20 - drivers/media/platform/Makefile | 2 - drivers/media/platform/arv.c | 884 ---------------------------------------- 3 files changed, 906 deletions(-) commit 3e3a5f7d5731f4db3b252d09332732bd051a8468 Author: Arnd Bergmann Date: Fri Mar 9 17:30:07 2018 +0100 media: platform: remove blackfin capture driver The blackfin architecture is getting removed, so the video capture driver is also obsolete. Acked-by: Mauro Carvalho Chehab Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/media/platform/Kconfig | 2 - drivers/media/platform/Makefile | 2 - drivers/media/platform/blackfin/Kconfig | 16 - drivers/media/platform/blackfin/Makefile | 2 - drivers/media/platform/blackfin/bfin_capture.c | 989 ------------------------- drivers/media/platform/blackfin/ppi.c | 361 --------- include/media/blackfin/bfin_capture.h | 39 - include/media/blackfin/ppi.h | 94 --- 8 files changed, 1505 deletions(-) commit c14094a48d00768ee2a1defff1fee0e51dbe15bb Author: Arnd Bergmann Date: Fri Mar 9 23:08:08 2018 +0100 fbdev: s1d13xxxfb: remove m32r specific hacks The m32r architecture is being removed, so this is no longer needed. Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Arnd Bergmann drivers/video/fbdev/s1d13xxxfb.c | 10 ---------- 1 file changed, 10 deletions(-) commit e3ed8b436bc32102ac2995940bc3a63c09755b63 Author: Arnd Bergmann Date: Fri Mar 9 17:02:41 2018 +0100 fbdev: remove blackfin drivers The blackfin architecture is getting removed, this removes the associated fbdev drivers as well. Acked-by: Bartlomiej Zolnierkiewicz Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/video/fbdev/Kconfig | 103 ---- drivers/video/fbdev/Makefile | 5 - drivers/video/fbdev/bf537-lq035.c | 891 --------------------------------- drivers/video/fbdev/bf54x-lq043fb.c | 764 ---------------------------- drivers/video/fbdev/bfin-lq035q1-fb.c | 864 -------------------------------- drivers/video/fbdev/bfin-t350mcqb-fb.c | 669 ------------------------- drivers/video/fbdev/bfin_adv7393fb.c | 828 ------------------------------ drivers/video/fbdev/bfin_adv7393fb.h | 319 ------------ include/linux/fb.h | 3 +- 9 files changed, 1 insertion(+), 4445 deletions(-) commit 8cbfbae85085bdd0bdafc085b1ed14abe0349573 Author: Arnd Bergmann Date: Fri Mar 9 16:32:20 2018 +0100 video/logo: remove obsolete logo files The blackfin and m32r architectures are getting removed, so it's time to clean up the logos as well. Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Arnd Bergmann drivers/video/logo/Kconfig | 15 - drivers/video/logo/Makefile | 3 - drivers/video/logo/logo.c | 12 - drivers/video/logo/logo_blackfin_clut224.ppm | 1127 ---------------------- drivers/video/logo/logo_blackfin_vga16.ppm | 1127 ---------------------- drivers/video/logo/logo_m32r_clut224.ppm | 1292 -------------------------- include/linux/linux_logo.h | 3 - 7 files changed, 3579 deletions(-) commit 02741b8ae1ed2439b7f67bcc7ab5040469b65e7a Author: Arnd Bergmann Date: Fri Mar 9 16:21:50 2018 +0100 pcmcia: remove blackfin driver The blackfin architecture is getting removed, so this one is no longer needed either. Acked-by: Dominik Brodowski Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/pcmcia/Kconfig | 7 - drivers/pcmcia/Makefile | 1 - drivers/pcmcia/bfin_cf_pcmcia.c | 316 ---------------------------------------- 3 files changed, 324 deletions(-) commit 10a27a29de9d20825d07e3bbd4187eb292a1d0df Author: Arnd Bergmann Date: Fri Mar 9 16:20:26 2018 +0100 pcmcia: remove m32r drivers The m32r architecture is getting removed, so these drivers are no longer needed. Acked-by: Dominik Brodowski Signed-off-by: Arnd Bergmann drivers/pcmcia/Kconfig | 19 -- drivers/pcmcia/Makefile | 2 - drivers/pcmcia/m32r_cfc.c | 786 ---------------------------------------------- drivers/pcmcia/m32r_cfc.h | 88 ------ drivers/pcmcia/m32r_pcc.c | 763 -------------------------------------------- drivers/pcmcia/m32r_pcc.h | 66 ---- 6 files changed, 1724 deletions(-) commit dabad54949930844d237af4b55c14eaff829c888 Author: Aaron Wu Date: Thu Mar 15 18:50:11 2018 +0800 misc: Remove Blackfin DSP echo support Remove Blackfin DSP echo support Signed-off-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/misc/echo/echo.c | 73 ------------------------------------------------ drivers/misc/echo/fir.h | 50 --------------------------------- 2 files changed, 123 deletions(-) commit 64f5fdd951d5e1558d355aefbe661739eef0c8e4 Author: Arnd Bergmann Date: Fri Mar 9 17:20:23 2018 +0100 char: remove blackfin OTP driver The blackfin architecture is getting removed, so we don't need this driver any more. Acked-by: Greg Kroah-Hartman Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/char/Kconfig | 28 ------ drivers/char/Makefile | 1 - drivers/char/bfin-otp.c | 237 ------------------------------------------------ 3 files changed, 266 deletions(-) commit 315e80e7fb25b46bf1c155a96a264d79b1c1d6f4 Author: Arnd Bergmann Date: Fri Mar 9 15:41:52 2018 +0100 char: remove tile-srom.c The tile architecture is being removed, so we no longer need this driver. Acked-by: Greg Kroah-Hartman Signed-off-by: Arnd Bergmann drivers/char/Kconfig | 11 -- drivers/char/Makefile | 1 - drivers/char/tile-srom.c | 475 ----------------------------------------------- 3 files changed, 487 deletions(-) commit 59fc07b3e9d926bdb28c4a3e3e81f103a05e5fd4 Author: Arnd Bergmann Date: Fri Mar 9 16:15:59 2018 +0100 char: remove obsolete ds1302 rtc driver The m32r architecture was the only user of the old-style rtc driver for ds1302. The architecture is getting removed now, and we have a modern driver for the same hardware in drivers/rtc/rtc-ds1302.c, so this one won't be missed. Acked-by: Greg Kroah-Hartman Signed-off-by: Arnd Bergmann drivers/char/Kconfig | 9 -- drivers/char/Makefile | 1 - drivers/char/ds1302.c | 357 -------------------------------------------------- 3 files changed, 367 deletions(-) commit 111f750389e0862ad01080fa39e84beb94cbfc8f Author: Arnd Bergmann Date: Fri Mar 9 18:15:27 2018 +0100 rtc: remove bfin driver The blackfin architecture is getting removed, so this one is now obsolete. Acked-by: Alexandre Belloni Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/rtc/Kconfig | 10 -- drivers/rtc/Makefile | 1 - drivers/rtc/rtc-bfin.c | 448 ------------------------------------------------- 3 files changed, 459 deletions(-) commit fca94ec61363b0d9839e45ebab14d6e257c4f34b Author: Arnd Bergmann Date: Fri Mar 9 15:59:10 2018 +0100 rtc: remove tile driver The tile architecture is getting removed, so this driver is no longer needed. Acked-by: Alexandre Belloni Signed-off-by: Arnd Bergmann drivers/rtc/Kconfig | 7 --- drivers/rtc/Makefile | 1 - drivers/rtc/rtc-tile.c | 146 ------------------------------------------------- 3 files changed, 154 deletions(-) commit 889ce12b1650b3c388634451872638a08faf6d6b Author: Arnd Bergmann Date: Fri Mar 9 16:05:23 2018 +0100 raid: remove tile specific raid6 implementation The Tile architecture is getting removed, so we no longer need this either. Acked-by: Ard Biesheuvel Signed-off-by: Arnd Bergmann include/linux/raid/pq.h | 1 - lib/raid6/Makefile | 6 ---- lib/raid6/algos.c | 3 -- lib/raid6/test/Makefile | 7 ---- lib/raid6/tilegx.uc | 87 ------------------------------------------------- 5 files changed, 104 deletions(-) commit d98983fbf27fbfc2210a1b9411aed84bf2004d0a Author: Arnd Bergmann Date: Fri Mar 9 16:35:21 2018 +0100 net: smsc: remove m32r/mn10300 specific smc91x configuration The m32r and mn10300 architectures are getting removed, so this part can be cleaned up as well. Acked-by: Nicolas Pitre Signed-off-by: Arnd Bergmann drivers/net/ethernet/smsc/Kconfig | 2 +- drivers/net/ethernet/smsc/smc91x.h | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) commit 3f2df32c9cb60f411a10725c12aa6e4555143d5f Author: Arnd Bergmann Date: Fri Mar 9 17:43:16 2018 +0100 net: remove cris etrax ethernet driver The cris architecture is getting removed, so we don't need the ethernet driver any more either. Acked-by: Jesper Nilsson Signed-off-by: Arnd Bergmann drivers/net/Makefile | 1 - drivers/net/cris/Makefile | 1 - drivers/net/cris/eth_v10.c | 1742 -------------------------------------------- 3 files changed, 1744 deletions(-) commit 8eb97ff5a4ec941da1976a99a74760dd9aea41e2 Author: Arnd Bergmann Date: Fri Mar 9 23:04:04 2018 +0100 net: 8390: remove m32r specific bits The m32r architecture is getting removed, so we can kill off the architecture specific hacks in this driver. Acked-by: Dominik Brodowski Signed-off-by: Arnd Bergmann drivers/net/ethernet/8390/Kconfig | 3 +-- drivers/net/ethernet/8390/ne.c | 23 ++--------------------- 2 files changed, 3 insertions(+), 23 deletions(-) commit 768a032d0e73f962ec13cd05b722d9744d2cf903 Author: Arnd Bergmann Date: Fri Mar 9 18:21:04 2018 +0100 net: adi: remove blackfin ethernet drivers The blackfin architecture is getting removed, so the bfin_mac driver is now obsolete. Acked-by: Dominik Brodowski Acked-by: Aaron Wu Signed-off-by: Arnd Bergmann drivers/net/ethernet/Kconfig | 1 - drivers/net/ethernet/Makefile | 1 - drivers/net/ethernet/adi/Kconfig | 66 -- drivers/net/ethernet/adi/Makefile | 5 - drivers/net/ethernet/adi/bfin_mac.c | 1881 ----------------------------------- drivers/net/ethernet/adi/bfin_mac.h | 104 -- include/linux/bfin_mac.h | 30 - 7 files changed, 2088 deletions(-) commit 32a675ed3eaea58430270972404ec3159816adf5 Author: Arnd Bergmann Date: Fri Mar 9 15:56:56 2018 +0100 net: tile: remove ethernet drivers The tile architecture is obsolete and getting removed. From all I can tell, later ARM based products use a different ethernet driver, so we should remove this one as well. Signed-off-by: Arnd Bergmann drivers/net/ethernet/Kconfig | 1 - drivers/net/ethernet/Makefile | 1 - drivers/net/ethernet/tile/Kconfig | 18 - drivers/net/ethernet/tile/Makefile | 11 - drivers/net/ethernet/tile/tilegx.c | 2279 --------------------------------- drivers/net/ethernet/tile/tilepro.c | 2397 ----------------------------------- 6 files changed, 4707 deletions(-) commit 0833f7634ff89d8dd631925fb551e3d1864066d5 Author: Arnd Bergmann Date: Fri Mar 9 11:39:10 2018 +0100 edac: remove tile driver The Tile architecture is obsolete and getting removed from the kernel, this driver appears to only be used there, and not on the ARM based successors (Tile-Mx, BlueField), so we should remove it as well. Acked-by: Borislav Petkov Acked-by: Mauro Carvalho Chehab Signed-off-by: Arnd Bergmann drivers/edac/Kconfig | 8 -- drivers/edac/Makefile | 2 - drivers/edac/tile_edac.c | 265 ----------------------------------------------- 3 files changed, 275 deletions(-) commit e53a05a49e10c7cfc5ee8d381ff3574ce4a3faf5 Author: Tobias Klauser Date: Wed Mar 14 17:51:25 2018 +0100 scripts/checkstack.pl: remove blackfin support The Blackfin port has been removed from the kernel, also remove the blackfin specific bits from the checkstack.pl script. Signed-off-by: Tobias Klauser Signed-off-by: Arnd Bergmann scripts/checkstack.pl | 3 --- 1 file changed, 3 deletions(-) commit 4aaacfc669941d4faed3c105f38368b463d0f59d Author: Arnd Bergmann Date: Fri Mar 9 16:29:02 2018 +0100 ktest: remove obsolete architectures A number of architectures are being removed from the kernel, so we no longer need to test them. Acked-by: Steven Rostedt (VMware) Signed-off-by: Arnd Bergmann tools/testing/ktest/examples/crosstests.conf | 31 +--------------------------- 1 file changed, 1 insertion(+), 30 deletions(-) commit 82831598a621f1ec2e6136fdb11805c7917159ca Author: Arnd Bergmann Date: Fri Mar 9 16:03:47 2018 +0100 recordmcount.pl: drop blackin and tile support These two architectures are getting removed, so we no longer need the special cases. Acked-by: Steven Rostedt (VMware) Signed-off-by: Arnd Bergmann scripts/recordmcount.pl | 8 -------- 1 file changed, 8 deletions(-) commit 1ea5afd42a16058f9301a46c8969787c7baa7eea Author: Arnd Bergmann Date: Fri Mar 9 12:02:36 2018 +0100 Documentation: arch-support: remove obsolete architectures A number of architecture ports are obsolete and getting dropped, so we no longer want to track the respective features. We already removed the lines for metag and mn10300, this does the same edits for all the others. For the remaining 21 architectures, this shows how many are known to implement each given feature: 19 time/modern-timekeeping/arch-support.txt 19 time/clockevents/arch-support.txt 15 core/tracehook/arch-support.txt 14 core/generic-idle-thread/arch-support.txt 13 locking/lockdep/arch-support.txt 12 io/dma-api-debug/arch-support.txt 11 debug/kgdb/arch-support.txt 10 time/virt-cpuacct/arch-support.txt 9 debug/kretprobes/arch-support.txt 9 debug/kprobes/arch-support.txt 8 vm/THP/arch-support.txt 8 vm/pte_special/arch-support.txt 8 vm/numa-memblock/arch-support.txt 8 io/sg-chain/arch-support.txt 7 perf/kprobes-event/arch-support.txt 7 locking/rwsem-optimized/arch-support.txt 7 debug/gcov-profile-all/arch-support.txt 7 core/jump-labels/arch-support.txt 7 core/BPF-JIT/arch-support.txt 6 vm/ELF-ASLR/arch-support.txt 6 time/context-tracking/arch-support.txt 6 seccomp/seccomp-filter/arch-support.txt 6 debug/stackprotector/arch-support.txt 5 time/irq-time-acct/arch-support.txt 5 io/dma-contiguous/arch-support.txt 5 debug/uprobes/arch-support.txt 4 vm/ioremap_prot/arch-support.txt 4 time/arch-tick-broadcast/arch-support.txt 4 perf/perf-stackdump/arch-support.txt 4 perf/perf-regs/arch-support.txt 3 debug/KASAN/arch-support.txt 2 vm/PG_uncached/arch-support.txt 2 vm/huge-vmap/arch-support.txt 2 sched/numa-balancing/arch-support.txt 2 sched/membarrier-sync-core/arch-support.txt 2 locking/cmpxchg-local/arch-support.txt 2 debug/optprobes/arch-support.txt 2 debug/kprobes-on-ftrace/arch-support.txt 1 vm/TLB/arch-support.txt 1 locking/queued-spinlocks/arch-support.txt 1 locking/queued-rwlocks/arch-support.txt 1 debug/user-ret-profiler/arch-support.txt 0 lib/strncasecmp/arch-support.txt Note that the list does not include riscv or nds32 yet, these still need to be added. Signed-off-by: Arnd Bergmann Documentation/admin-guide/README.rst | 4 ++-- Documentation/features/core/BPF-JIT/arch-support.txt | 6 ------ Documentation/features/core/generic-idle-thread/arch-support.txt | 6 ------ Documentation/features/core/jump-labels/arch-support.txt | 6 ------ Documentation/features/core/tracehook/arch-support.txt | 6 ------ Documentation/features/debug/KASAN/arch-support.txt | 6 ------ Documentation/features/debug/gcov-profile-all/arch-support.txt | 6 ------ Documentation/features/debug/kgdb/arch-support.txt | 6 ------ Documentation/features/debug/kprobes-on-ftrace/arch-support.txt | 6 ------ Documentation/features/debug/kprobes/arch-support.txt | 6 ------ Documentation/features/debug/kretprobes/arch-support.txt | 6 ------ Documentation/features/debug/optprobes/arch-support.txt | 6 ------ Documentation/features/debug/stackprotector/arch-support.txt | 6 ------ Documentation/features/debug/uprobes/arch-support.txt | 6 ------ Documentation/features/debug/user-ret-profiler/arch-support.txt | 6 ------ Documentation/features/io/dma-api-debug/arch-support.txt | 6 ------ Documentation/features/io/dma-contiguous/arch-support.txt | 6 ------ Documentation/features/io/sg-chain/arch-support.txt | 6 ------ Documentation/features/lib/strncasecmp/arch-support.txt | 6 ------ Documentation/features/locking/cmpxchg-local/arch-support.txt | 6 ------ Documentation/features/locking/lockdep/arch-support.txt | 6 ------ Documentation/features/locking/queued-rwlocks/arch-support.txt | 6 ------ Documentation/features/locking/queued-spinlocks/arch-support.txt | 6 ------ Documentation/features/locking/rwsem-optimized/arch-support.txt | 6 ------ Documentation/features/perf/kprobes-event/arch-support.txt | 6 ------ Documentation/features/perf/perf-regs/arch-support.txt | 6 ------ Documentation/features/perf/perf-stackdump/arch-support.txt | 6 ------ Documentation/features/sched/membarrier-sync-core/arch-support.txt | 6 ------ Documentation/features/sched/numa-balancing/arch-support.txt | 6 ------ Documentation/features/seccomp/seccomp-filter/arch-support.txt | 6 ------ Documentation/features/time/arch-tick-broadcast/arch-support.txt | 6 ------ Documentation/features/time/clockevents/arch-support.txt | 6 ------ Documentation/features/time/context-tracking/arch-support.txt | 6 ------ Documentation/features/time/irq-time-acct/arch-support.txt | 6 ------ Documentation/features/time/modern-timekeeping/arch-support.txt | 6 ------ Documentation/features/time/virt-cpuacct/arch-support.txt | 6 ------ Documentation/features/vm/ELF-ASLR/arch-support.txt | 6 ------ Documentation/features/vm/PG_uncached/arch-support.txt | 6 ------ Documentation/features/vm/THP/arch-support.txt | 6 ------ Documentation/features/vm/TLB/arch-support.txt | 6 ------ Documentation/features/vm/huge-vmap/arch-support.txt | 6 ------ Documentation/features/vm/ioremap_prot/arch-support.txt | 6 ------ Documentation/features/vm/numa-memblock/arch-support.txt | 6 ------ Documentation/features/vm/pte_special/arch-support.txt | 6 ------ 44 files changed, 2 insertions(+), 260 deletions(-) commit a0673fdbcd42105261646cd4f3447455b5854a32 Author: Arnd Bergmann Date: Fri Mar 9 15:47:15 2018 +0100 asm-generic: clean up asm/unistd.h The score architecture used a number of old system calls for compatibility with a traditional libc port, all architectures that got added later skip these. With score out of the way, we can finally clean up the syscall list to no longer provide these. Signed-off-by: Arnd Bergmann include/uapi/asm-generic/unistd.h | 163 -------------------------------------- 1 file changed, 163 deletions(-) commit a402ab8cc7b0578c445f348c9010e62ab390bee8 Author: Arnd Bergmann Date: Thu Mar 15 13:30:51 2018 +0100 asm-generic: siginfo: define ia64 si_codes unconditionally Unlike system call numbers the assignment of si_codes has never had a reason to be made per architecture. Some architectures have had unique conditions to report and reporting those conditions needed new si_codes. Nothing has ever needed si_codes to have different values on different architectures. The si_code space is vast so even with defining all si_codes on all architectures there is no danger in running out of si_code values. The history of the si_codes BUS_MCEERR_AR, BUS_MCEER_AO, SEGV_BNDERR, and SEGV_PKUERR show that a need of one architecture frequently becomes a need of another architecture which makes sharing si_codes between architectures a positive benefit and something to be encouraged. Where there are no conflicts with the historical ia64 arch specific si_codes and any other si_codes make them generic si_codes. We might need them on another architecture someday. This leaves only the good example of arch generic si_codes in the kernel for future architectures and architecture enhancments to follow. Without bad examples to follow it should be easy to avoid the mistakes of the past. Reported-by: Eric W. Biederman [arnd: took Eric's changelog text] Signed-off-by: Arnd Bergmann include/uapi/asm-generic/siginfo.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 3f664931b33565641fdf1fdd3ff067def60e7f53 Author: Arnd Bergmann Date: Fri Mar 9 11:31:48 2018 +0100 asm-generic: siginfo: remove obsolete #ifdefs The frv, tile and blackfin architectures are being removed, so we can clean up this header by removing all the special cases except those for ia64. The SEGV_BNDERR and BUS_MCEERR_AR si_code macros are now defined unconditionally on all remaining architectures. Acked-by: "Eric W. Biederman" Signed-off-by: Arnd Bergmann include/uapi/asm-generic/siginfo.h | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) commit a687a5337063af99ebd0eebaa6f4b4cf2e07c21b Author: Arnd Bergmann Date: Wed Mar 7 23:30:54 2018 +0100 treewide: simplify Kconfig dependencies for removed archs A lot of Kconfig symbols have architecture specific dependencies. In those cases that depend on architectures we have already removed, they can be omitted. Acked-by: Kalle Valo Acked-by: Alexandre Belloni Signed-off-by: Arnd Bergmann block/bounce.c | 2 +- drivers/ide/Kconfig | 2 +- drivers/ide/ide-generic.c | 12 +----------- drivers/input/joystick/analog.c | 2 +- drivers/isdn/hisax/Kconfig | 10 +++++----- drivers/net/ethernet/davicom/Kconfig | 2 +- drivers/net/ethernet/smsc/Kconfig | 6 +++--- drivers/net/wireless/cisco/Kconfig | 2 +- drivers/pwm/Kconfig | 2 +- drivers/rtc/Kconfig | 2 +- drivers/spi/Kconfig | 4 ++-- drivers/usb/musb/Kconfig | 2 +- drivers/video/console/Kconfig | 3 +-- drivers/watchdog/Kconfig | 6 ------ drivers/watchdog/Makefile | 6 ------ fs/Kconfig.binfmt | 5 ++--- fs/minix/Kconfig | 2 +- include/linux/ide.h | 7 +------ init/Kconfig | 5 ++--- lib/Kconfig.debug | 13 +++++-------- lib/test_user_copy.c | 2 -- mm/Kconfig | 7 ------- mm/percpu.c | 4 ---- 23 files changed, 31 insertions(+), 77 deletions(-) commit 4e07db9c8db87e3b71be4c3cd626ddc9bacd5a1e Author: Ivan Gorinov Date: Thu Mar 22 14:35:47 2018 -0700 x86/devicetree: Use CPU description from Device Tree Current x86 Device Tree implementation does not support multiprocessing. Use new DT bindings to describe the processors. Signed-off-by: Ivan Gorinov Signed-off-by: Thomas Gleixner Reviewed-by: Andy Shevchenko Cc: Mark Rutland Cc: Rob Herring Cc: Frank Rowand Link: https://lkml.kernel.org/r/c291fb2cef51b730b59916d7745be0eaa4378c6c.1521753738.git.ivan.gorinov@intel.com arch/x86/kernel/devicetree.c | 45 ++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) commit 7f2e85840871f199057e65232ebde846192ed989 Author: Ivan Gorinov Date: Thu Mar 22 14:35:33 2018 -0700 of/Documentation: Specify local APIC ID in "reg" Use the "reg" property to specify the processor's local APIC ID instead of setting it to the CPU node index in Device Tree. Local APIC ID is assigned by hardware and visible in the APIC ID register. Some processor models allow APIC ID to be changed by software, but CPUID instruction executed with %eax = 0x0b always returns the initial ID in %edx. Local APIC ID does not match the node index in many systems. Signed-off-by: Ivan Gorinov Signed-off-by: Thomas Gleixner Reviewed-by: Andy Shevchenko Reviewed-by: Rob Herring Cc: Mark Rutland Cc: Rob Herring Cc: Frank Rowand Link: https://lkml.kernel.org/r/4b1a471a56ac0ebd7510f4759afce9104595d6da.1521753738.git.ivan.gorinov@intel.com Documentation/devicetree/bindings/x86/ce4100.txt | 37 ++++++++++++++++++------ 1 file changed, 28 insertions(+), 9 deletions(-) commit 4759700a71ab109c67376360e9f00e2fed6b3807 Author: Liu Bo Date: Fri Mar 2 16:10:41 2018 -0700 Btrfs: dev-replace: make sure target is identical to source when raid56 rebuild fails In the last step of scrub_handle_error_block, we try to combine good copies on all possible mirrors, this works fine for raid1 and raid10, but not for raid56 as it's doing parity rebuild. If parity rebuild doesn't get back with correct data which matches its checksum, in case of replace we'd rather write what is stored in the source device than the data calculuated from parity. Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/scrub.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit d6a691350b5d5381fad04a6dbf31bb6f393089b5 Author: Liu Bo Date: Fri Mar 2 16:10:39 2018 -0700 Btrfs: raid56: remove redundant async_missing_raid56 async_missing_raid56() is identical to async_read_rebuild(). Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/raid56.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit 005d67127fa9dfb3382f2c9e918feed7a243a7fe Author: Su Yue Date: Mon Mar 5 17:13:37 2018 +0800 btrfs: adjust return values of btrfs_inode_by_name Previously, btrfs_inode_by_name() returned 0 which left caller to check objectid of location even location if the type was invalid. Let btrfs_inode_by_name() return -EUCLEAN if a corrupted location of a dir entry is found. Removal of label out_err also simplifies the function. Signed-off-by: Su Yue Reviewed-by: David Sterba [ drop unlikely ] Signed-off-by: David Sterba fs/btrfs/inode.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 9b99b11564446600f3a3ce394a841d525b7993e7 Author: Anand Jain Date: Tue Feb 27 12:41:59 2018 +0800 btrfs: rename btrfs_close_extra_device to btrfs_free_extra_devids This function btrfs_close_extra_devices() is about freeing extra devids which once it may have belonged to this filesystem. So rename it and add the comment. The _devid suffix is appropriate as this function won't handle devices which are outside of the filesytem being mounted. Signed-off-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/disk-io.c | 8 ++++---- fs/btrfs/volumes.c | 6 +++++- fs/btrfs/volumes.h | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) commit d02c0e20194bfd3066bff2505b2540a14f3fa3d2 Author: Nikolay Borisov Date: Fri Mar 2 09:43:15 2018 +0200 btrfs: Remove root argument from cow_file_range_inline This argument is always set to the root of the inode, which is also passed. So let's get a reference inside the function and simplify the arg list. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 895a72be411e9a6b40c1062f0f54faca2bb03568 Author: Liu Bo Date: Fri Mar 2 18:05:49 2018 -0700 Btrfs: send: fix typo in TLV_PUT According to tlv_put()'s prototype, data and attrlen needs to be exchanged in the macro, but seems all callers are already aware of this misorder and are therefore not affected. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/send.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e5b84f7a258a8344947e8b955b8c2648008d8ccc Author: Nikolay Borisov Date: Tue Feb 27 17:37:18 2018 +0200 btrfs: Remove root argument from btrfs_log_dentry_safe Now that nothing uses the root arg of btrfs_log_dentry_safe it can be safely removed. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/file.c | 2 +- fs/btrfs/tree-log.c | 2 +- fs/btrfs/tree-log.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit f882274b2df2a2533b4fc81713838778d4ac12d6 Author: Nikolay Borisov Date: Tue Feb 27 17:37:17 2018 +0200 btrfs: Remove root arg from btrfs_log_inode_parent btrfs_log_inode_parent is called from 2 places (btrfs_log_dentry_safe and btrfs_log_new_name) both of which pass inode->root as the root argument and the inode itself. Remove the redundant root argument and get a reference to the root directly from the inode, also remove redundant root != inode->root check from the same function. No functional change. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tree-log.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 448f3a17ac538f6e5b0fa94259cb41f3f019394f Author: Nikolay Borisov Date: Tue Feb 27 17:37:16 2018 +0200 btrfs: Remove redundant comment from btrfs_search_forward This function always sets keep_locks to 1 and saves the old value of keep_locks which is restored at the end. So there is no way it can be called without keep_locks being set. Remove comment imposing redundant requirement on callers. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.c | 3 --- 1 file changed, 3 deletions(-) commit 738c93d42c277d790cd49372c9bf24bcfea13306 Author: David Sterba Date: Tue Feb 27 15:48:59 2018 +0100 btrfs: move btrfs_listxattr prototype to xattr.h There's a proper header for xattr handlers. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 --- fs/btrfs/xattr.h | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) commit bcadd7050a43216e6ace936c23b4055fb5966ca1 Author: David Sterba Date: Tue Feb 27 15:48:57 2018 +0100 btrfs: adjust return type of btrfs_getxattr The xattr_handler::get prototype returns int, use it. The only ssize_t exception is the per-inode listxattr handler. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/xattr.c | 2 +- fs/btrfs/xattr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ab0d09361662b7593fe166d27ad49b8852a2ef3e Author: David Sterba Date: Tue Feb 27 15:48:54 2018 +0100 btrfs: drop extern from function declarations Extern for functions does not make any difference, there are only a few so let's remove them before it's too late. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent_io.h | 4 ++-- fs/btrfs/xattr.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 7852781d94b30096ca0f273aa776d2dbcca6d640 Author: David Sterba Date: Tue Feb 27 15:48:52 2018 +0100 btrfs: drop underscores from exported xattr functions Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/acl.c | 6 +++--- fs/btrfs/props.c | 6 +++--- fs/btrfs/xattr.c | 12 ++++++------ fs/btrfs/xattr.h | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) commit ffa7c4296e93b25fc302c209ae488e57aad4c973 Author: Filipe Manana Date: Tue Feb 6 20:40:40 2018 +0000 Btrfs: send, do not issue unnecessary truncate operations When send finishes processing an inode representing a regular file, it always issues a truncate operation for that file, even if its size did not change or the last write sets the file size correctly. In the most common cases, the issued write operations set the file to correct size (either full or incremental sends) or the file size did not change (for incremental sends), so the only case where a truncate operation is needed is when a file size becomes smaller in the send snapshot when compared to the parent snapshot. By not issuing unnecessary truncate operations we reduce the stream size and save time in the receiver. Currently truncating a file to the same size triggers writeback of its last page (if it's dirty) and waits for it to complete (only if the file size is not aligned with the filesystem's sector size). This is being fixed by another patch and is independent of this change (that patch's title is "Btrfs: skip writeback of last page when truncating file to same size"). The following script was used to measure time spent by a receiver without this change applied, with this change applied, and without this change and with the truncate fix applied (the fix to not make it start and wait for writeback to complete). $ cat test_send.sh #!/bin/bash SRC_DEV=/dev/sdc DST_DEV=/dev/sdd SRC_MNT=/mnt/sdc DST_MNT=/mnt/sdd mkfs.btrfs -f $SRC_DEV >/dev/null mkfs.btrfs -f $DST_DEV >/dev/null mount $SRC_DEV $SRC_MNT mount $DST_DEV $DST_MNT echo "Creating source filesystem" for ((t = 0; t < 10; t++)); do ( for ((i = 1; i <= 20000; i++)); do xfs_io -f -c "pwrite -S 0xab 0 5000" \ $SRC_MNT/file_$i > /dev/null done ) & worker_pids[$t]=$! done wait ${worker_pids[@]} echo "Creating and sending snapshot" btrfs subvolume snapshot -r $SRC_MNT $SRC_MNT/snap1 >/dev/null /usr/bin/time -f "send took %e seconds" \ btrfs send -f $SRC_MNT/send_file $SRC_MNT/snap1 /usr/bin/time -f "receive took %e seconds" \ btrfs receive -f $SRC_MNT/send_file $DST_MNT umount $SRC_MNT umount $DST_MNT The results, which are averages for 5 runs for each case, were the following: * Without this change average receive time was 26.49 seconds standard deviation of 2.53 seconds * Without this change and with the truncate fix average receive time was 12.51 seconds standard deviation of 0.32 seconds * With this change and without the truncate fix average receive time was 10.02 seconds standard deviation of 1.11 seconds Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/send.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 213e8c5520ed1ecc5401a3a0f716b51a7318bda9 Author: Filipe Manana Date: Tue Feb 6 20:40:31 2018 +0000 Btrfs: skip writeback of last page when truncating file to same size When we truncate a file to the same size and that size is not aligned with the sector size, we end up triggering writeback (and wait for it to complete) of the last page. This is unncessary as we can not have delayed allocation beyond the inode's i_size and the goal of truncating a file to its own size is to discard prealloc extents (allocated via the fallocate(2) system call). Besides the unnecessary IO start and wait, it also breaks the oppurtunity for larger contiguous extents on disk, as before the last dirty page there might be other dirty pages. This scenario is probably not very common in general, however it is common for btrfs receive implementations because currently the send stream always issues a truncate operation for each processed inode as the last operation for that inode (this truncate operation is not always needed and the send implementation will be addressed to avoid them). So improve this by not starting and waiting for writeback of the inode's last page when we are truncating to exactly the same size. The following script was used to quickly measure the time a receive operation takes: $ cat test_send.sh #!/bin/bash SRC_DEV=/dev/sdc DST_DEV=/dev/sdd SRC_MNT=/mnt/sdc DST_MNT=/mnt/sdd mkfs.btrfs -f $SRC_DEV >/dev/null mkfs.btrfs -f $DST_DEV >/dev/null mount $SRC_DEV $SRC_MNT mount $DST_DEV $DST_MNT echo "Creating source filesystem" for ((t = 0; t < 10; t++)); do ( for ((i = 1; i <= 20000; i++)); do xfs_io -f -c "pwrite -S 0xab 0 5000" \ $SRC_MNT/file_$i > /dev/null done ) & worker_pids[$t]=$! done wait ${worker_pids[@]} echo "Creating and sending snapshot" btrfs subvolume snapshot -r $SRC_MNT $SRC_MNT/snap1 >/dev/null /usr/bin/time -f "send took %e seconds" \ btrfs send -f $SRC_MNT/send_file $SRC_MNT/snap1 /usr/bin/time -f "receive took %e seconds" \ btrfs receive -f $SRC_MNT/send_file $DST_MNT umount $SRC_MNT umount $DST_MNT The results for 5 runs were the following: * Without this change average receive time was 26.49 seconds standard deviation of 2.53 seconds * With this change average receive time was 12.51 seconds standard deviation of 0.32 seconds Reported-by: Robbie Ko Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/inode.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit ed5d5f37e653b606c93b2d5f1cdd155be6fefce0 Author: Liu Bo Date: Tue Feb 27 18:10:58 2018 -0700 Btrfs: dev-replace: skip prealloc extents when copy nocow pages It doens't make sense to process prealloc extents as pages will be filled with zero when reading prealloc extents. Signed-off-by: Liu Bo Reviewed-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/scrub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d612ac59efc3b57858f310c8471d7ee2779658c9 Author: Anand Jain Date: Mon Feb 26 16:46:05 2018 +0800 btrfs: unify types for metadata_ratio and data_chunk_allocations We have btrfs_fs_info::data_chunk_allocations and btrfs_fs_info::metadata_ratio declared as unsigned which would be unsinged int and kernel style prefers unsigned int over bare unsigned. So this patch changes them to u32. Signed-off-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/ctree.h | 4 ++-- fs/btrfs/super.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit de224b7c56baa335bde9afcb4aa68f03c38f5f42 Author: Nikolay Borisov Date: Wed Feb 14 10:53:36 2018 +0200 btrfs: Remove redundant memory barriers around dio_private error status Using any kind of memory barriers around atomic operations which have a return value is redundant, since those operations themselves are fully ordered. atomic_t.txt states: - RMW operations that have a return value are fully ordered; Fully ordered primitives are ordered against everything prior and everything subsequent. Therefore a fully ordered primitive is like having an smp_mb() before and an smp_mb() after the primitive. Given this let's replace the extra memory barriers with comments. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 16db5758fef8c71b0353a7b5505496d6f9229820 Author: Anand Jain Date: Tue Feb 20 22:50:36 2018 +0800 btrfs: remove assert in btrfs_init_dev_replace_tgtdev() In the same function we just ran btrfs_alloc_device() which means the btrfs_device::resized_list is sure to be empty and we are protected with the btrfs_fs_info::volume_mutex. Signed-off-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/volumes.c | 1 - 1 file changed, 1 deletion(-) commit e67c718b5b9a306bde7e966be7b4ca48fa063d73 Author: David Sterba Date: Mon Feb 19 17:24:18 2018 +0100 btrfs: add more __cold annotations The __cold functions are placed to a special section, as they're expected to be called rarely. This could help i-cache prefetches or help compiler to decide which branches are more/less likely to be taken without any other annotations needed. Though we can't add more __exit annotations, it's still possible to add __cold (that's also added with __exit). That way the following function categories are tagged: - printf wrappers, error messages - exit helpers Signed-off-by: David Sterba fs/btrfs/backref.c | 2 +- fs/btrfs/backref.h | 2 +- fs/btrfs/compression.c | 2 +- fs/btrfs/compression.h | 2 +- fs/btrfs/ctree.h | 9 +++++---- fs/btrfs/delayed-inode.c | 2 +- fs/btrfs/delayed-inode.h | 2 +- fs/btrfs/delayed-ref.c | 2 +- fs/btrfs/delayed-ref.h | 2 +- fs/btrfs/disk-io.c | 2 +- fs/btrfs/disk-io.h | 2 +- fs/btrfs/extent_io.c | 2 +- fs/btrfs/extent_io.h | 2 +- fs/btrfs/extent_map.c | 2 +- fs/btrfs/extent_map.h | 2 +- fs/btrfs/file.c | 2 +- fs/btrfs/inode.c | 2 +- fs/btrfs/ordered-data.c | 2 +- fs/btrfs/ordered-data.h | 2 +- fs/btrfs/send.c | 1 + fs/btrfs/super.c | 2 +- fs/btrfs/sysfs.c | 2 +- fs/btrfs/tree-checker.c | 3 +++ 23 files changed, 29 insertions(+), 24 deletions(-) commit ffc5a3794f9779c1a09e18e6d75bb6cc22b37523 Author: David Sterba Date: Mon Feb 19 17:24:15 2018 +0100 btrfs: add (the only possible) __exit annotation Recently, the __init annotations have been added. There's unfortunatelly only one case where we can add __exit, because most of the cleanup helpers are also called from the __init phase. As the __exit annotated functions get discarded completely for a built-in code, we'd miss them from the init phase. Signed-off-by: David Sterba fs/btrfs/volumes.c | 2 +- fs/btrfs/volumes.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ccb0e7d1c1bc222966085550e27957c17138b629 Author: Anand Jain Date: Thu Feb 15 01:11:37 2018 +0800 btrfs: verify subvolid mount parameter We aren't verifying the parameter passed to the subvolid mount option, so we won't report and fail the mount if a junk value is specified for example, -o subvolid=abc. This patch verifies the subvolid option with match_u64. Up to now the memparse function accepts the K/M/G/ suffixes, that are usually meant for size values and do not make sense for a subvolume it. Signed-off-by: Anand Jain Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba fs/btrfs/super.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 5811375325420052fcadd944792a416a43072b7f Author: Liu Bo Date: Wed Jan 31 17:09:13 2018 -0700 Btrfs: fix unexpected cow in run_delalloc_nocow Fstests generic/475 provides a way to fail metadata reads while checking if checksum exists for the inode inside run_delalloc_nocow(), and csum_exist_in_range() interprets error (-EIO) as inode having checksum and makes its caller enter the cow path. In case of free space inode, this ends up with a warning in cow_file_range(). The same problem applies to btrfs_cross_ref_exist() since it may also read metadata in between. With this, run_delalloc_nocow() bails out when errors occur at the two places. cc: v2.6.28+ Fixes: 17d217fe970d ("Btrfs: fix nodatasum handling in balancing code") Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/inode.c | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) commit 9678c54388b6a6b309ff7ee5c8d23fa9eba7c06f Author: Nikolay Borisov Date: Mon Jan 8 11:45:05 2018 +0200 btrfs: Remove custom crc32c init code The custom crc32 init code was introduced in 14a958e678cd ("Btrfs: fix btrfs boot when compiled as built-in") to enable using btrfs as a built-in. However, later as pointed out by 60efa5eb2e88 ("Btrfs: use late_initcall instead of module_init") this wasn't enough and finally btrfs was switched to late_initcall which comes after the generic crc32c implementation is initiliased. The latter commit superseeded the former. Now that we don't have to maintain our own code let's just remove it and switch to using the generic implementation. Despite touching a lot of files the patch is really simple. Here is the gist of the changes: 1. Select LIBCRC32C rather than the low-level modules. 2. s/btrfs_crc32c/crc32c/g 3. replace hash.h with linux/crc32c.h 4. Move the btrfs namehash funcs to ctree.h and change the tree accordingly. I've tested this with btrfs being both a module and a built-in and xfstest doesn't complain. Does seem to fix the longstanding problem of not automatically selectiong the crc32c module when btrfs is used. Possibly there is a workaround in dracut. The modinfo confirms that now all the module dependencies are there: before: depends: zstd_compress,zstd_decompress,raid6_pq,xor,zlib_deflate after: depends: libcrc32c,zstd_compress,zstd_decompress,raid6_pq,xor,zlib_deflate Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ add more info to changelog from mails ] Signed-off-by: David Sterba fs/btrfs/Kconfig | 3 +-- fs/btrfs/Makefile | 2 +- fs/btrfs/check-integrity.c | 4 ++-- fs/btrfs/ctree.h | 16 ++++++++++++++ fs/btrfs/dir-item.c | 1 - fs/btrfs/disk-io.c | 4 ++-- fs/btrfs/extent-tree.c | 10 ++++----- fs/btrfs/hash.c | 54 ---------------------------------------------- fs/btrfs/hash.h | 43 ------------------------------------ fs/btrfs/inode-item.c | 1 - fs/btrfs/inode.c | 1 - fs/btrfs/props.c | 2 +- fs/btrfs/send.c | 4 ++-- fs/btrfs/super.c | 14 ++++-------- fs/btrfs/tree-checker.c | 1 - fs/btrfs/tree-log.c | 2 +- 16 files changed, 35 insertions(+), 127 deletions(-) commit df91f56adce1fc131e05368a0ad0ea72afd9a79a Author: Nikolay Borisov Date: Mon Jan 8 11:45:04 2018 +0200 libcrc32c: Add crc32c_impl function This function returns a string with the currently in-use implementation of the crc32c algorithm, i.e crc32c-generic (for unoptimised, generic implementation) or crc32c-intel for the sse optimised version. This will be used by btrfs. Signed-off-by: Nikolay Borisov Acked-by: Herbert Xu [ use crypto_shash_driver_name as suggested by Herbert ] Signed-off-by: David Sterba include/linux/crc32c.h | 1 + lib/libcrc32c.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 3e72ee8874f42ddbe72a090044f7c03740158183 Author: Qu Wenruo Date: Tue Jan 30 18:20:45 2018 +0800 btrfs: Refactor __get_raid_index() to btrfs_bg_flags_to_raid_index() Function __get_raid_index() is used to convert block group flags into raid index, which can be used to get various info directly from btrfs_raid_array[]. Refactor this function a little: 1) Rename to btrfs_bg_flags_to_raid_index() Double underline prefix is normally for internal functions, while the function is used by both extent-tree and volumes. Although the name is a little longer, but it should explain its usage quite well. 2) Move it to volumes.h and make it static inline Just several if-else branches, really no need to define it as a normal function. This also makes later code re-use between kernel and btrfs-progs easier. 3) Remove function get_block_group_index() Really no need to do such a simple thing as an exported function. Signed-off-by: Qu Wenruo Reviewed-by: Anand Jain Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 -- fs/btrfs/extent-tree.c | 41 ++++++++++------------------------------- fs/btrfs/volumes.c | 2 +- fs/btrfs/volumes.h | 22 ++++++++++++++++++++++ 4 files changed, 33 insertions(+), 34 deletions(-) commit 2f659546c9048931c2b8e146824a892b74a8e33c Author: Qu Wenruo Date: Thu Jan 25 14:56:18 2018 +0800 btrfs: tree-checker: Replace root parameter with fs_info When inspecting the error message with real corruption, the "root=%llu" always shows "1" (root tree), instead of the correct owner. The problem is that we are getting @root from page->mapping->host, which points the same btree inode, so we will always get the same root. This makes the root owner output meaningless, and harder to port tree-checker to btrfs-progs. So get rid of the false and meaningless @root parameter and replace it with @fs_info. To get the owner, we can only rely on btrfs_header_owner() now. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 6 +- fs/btrfs/tree-checker.c | 147 ++++++++++++++++++++++++------------------------ fs/btrfs/tree-checker.h | 7 ++- 3 files changed, 82 insertions(+), 78 deletions(-) commit 393da91819e35af538ef97c7c6a04899e2fbfe0e Author: Liu Bo Date: Fri Jan 5 12:51:16 2018 -0700 Btrfs: add tracepoint for em's EEXIST case This is adding a tracepoint 'btrfs_handle_em_exist' to help debug the subtle bugs around merge_extent_mapping. Signed-off-by: Liu Bo Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent_map.c | 3 +++ include/trace/events/btrfs.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit 5d23515be66904fa3b1b5d6bd72d2199cd2447ab Author: Nikolay Borisov Date: Wed Jan 31 10:52:04 2018 +0200 btrfs: Move qgroup rescan on quota enable to btrfs_quota_enable Currently btrfs_run_qgroups is doing a bit too much. Not only is it responsible for synchronizing in-memory state of qgroups to disk but it also contains code to trigger the initial qgroup rescan when quota is enabled initially. This condition is detected by checking that BTRFS_FS_QUOTA_ENABLED is not set and BTRFS_FS_QUOTA_ENABLING is set. Nothing really requires from the code to be structured (and scattered) the way it is so let's streamline things. First move the quota rescan code into btrfs_quota_enable, where its invocation is closer to the use. This also makes the FS_QUOTA_ENABLING flag redundant so let's remove it as well. This has been tested with a full xfstest run with qgroups enabled on the scratch device of every xfstest and no regressions were observed. Signed-off-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 - fs/btrfs/qgroup.c | 35 ++++++++++------------------------- 2 files changed, 10 insertions(+), 26 deletions(-) commit 7ce311d552e473a5176f8bb143fb45de64b8bd81 Author: Gu JinXiang Date: Thu Jan 11 16:12:18 2018 +0800 btrfs: use reada direction enum instead of constant value in load_free_space_tree load_free_space_tree calls either function load_free_space_bitmaps or load_free_space_extents. And either of those two will lead to call btrfs_next_item. So in function load_free_space_tree, use READA_FORWARD to read forward ahead. This also changes the value from READA_BACK to READA_FORWARD, since according to the logic, it should reada_for_search forward, not backward. Signed-off-by: Gu JinXiang Reviewed-by: Nikolay Borisov [ update changelog ] Signed-off-by: David Sterba fs/btrfs/free-space-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 019599ada73ce8ac0b0d60705819eba95df54630 Author: Gu Jinxiang Date: Thu Jan 11 16:12:17 2018 +0800 btrfs: use reada direction enum instead of constant value in populate_free_space_tree populate_free_space_tree calls function btrfs_search_slot_for_read with parameter int find_higher = 1, it means that, if no exact match is found, then use the next higher item. So in function populate_free_space_tree, use READA_FORWARD to read forward ahead. This also changes the value from READA_BACK to READA_FORWARD, since according to the logic, it should reada_for_search forward, not backward. Signed-off-by: Gu JinXiang Reviewed-by: Nikolay Borisov [ update changelog ] Signed-off-by: David Sterba fs/btrfs/free-space-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1c3fac2a95b14e36333528e408e76d90c93bbf7 Author: Nikolay Borisov Date: Tue Jan 16 09:31:58 2018 +0200 btrfs: Remove btrfs_inode::delayed_iput_count delayed_iput_count wa supposed to be used to implement, well, delayed iput. The idea is that we keep accumulating the number of iputs we do until eventually the inode is deleted. Turns out we never really switched the delayed_iput_count from 0 to 1, hence all conditional code relying on the value of that member being different than 0 was never executed. This, as it turns out, didn't cause any problem due to the simple fact that the generic inode's i_count member was always used to count the number of iputs. So let's just remove the unused member and all unused code. This patch essentially provides no functional changes. While at it, also add proper documentation for btrfs_add_delayed_iput Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ reformat comment ] Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 1 - fs/btrfs/inode.c | 27 +++++++++++++-------------- 2 files changed, 13 insertions(+), 15 deletions(-) commit 793ff2c88c6397b3531c08cc4f920619b56a9def Author: Qu Wenruo Date: Wed Jan 31 14:16:34 2018 +0800 btrfs: volumes: Cleanup stripe size calculation Cleanup the following things: 1) open coded SZ_16M round up 2) use min() to replace open-coded size comparison 3) code style Signed-off-by: Qu Wenruo Reviewed-by: Nikolay Borisov Reviewed-by: Gu Jinxiang [ reformat comment ] Signed-off-by: David Sterba fs/btrfs/volumes.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit da07d4ab33e6207f77615acc4c17a19a4793980d Author: Nikolay Borisov Date: Fri Jan 12 16:21:05 2018 +0200 btrfs: Streamline btrfs_delalloc_reserve_metadata initial operations The behavior of btrfs_delalloc_reserve_metadata depends on whether the inode we are allocating for is the freespace inode or not. As it stands if we are the free node we set 'flush' and 'delalloc_lock' variable to certain values. Subsequently we check the values of those vars and act accordingly. Instead, simplify things by having 1 if which checks whether we are the freespace inode or not and do any specific operation in either branches of that if. This makes the code a bit easier to understand, as an added bonus it also shrinks the compiled size: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-17 (-17) Function old new delta btrfs_delalloc_reserve_metadata 1876 1859 -17 Total: Before=85966, After=85949, chg -0.02% No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: Edmund Nadolski Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b1b8e38622ea044ccdee0460253e428cb6e9038e Author: Anand Jain Date: Mon Jan 22 14:49:37 2018 -0800 btrfs: insert newly opened device to the end of the list Add opened device to the tail of dev_alloc_list instead of head, so that it maintains the same order as dev_list. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8e10cd3f8dd3b15ea49f820a0d2decf3c654b13 Author: Anand Jain Date: Mon Jan 22 14:49:36 2018 -0800 btrfs: keep device list sorted By maintaining the device list sorted lets us reproduce the problems related to missing chunk in the degraded mode much more consistent. So fix this by sorting the devices by devid within the kernel. So that we know which device is assigned to the struct fs_info::latest_bdev when all the devices are having and same SB generation. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov [ update changelog ] Signed-off-by: David Sterba fs/btrfs/volumes.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 3d5addafd0c49d57afe867339ec1cc535d23715e Author: Liu Bo Date: Thu Jan 25 11:02:55 2018 -0700 Btrfs: do not check inode's runtime flags under root->orphan_lock It's not necessary to hold ->orphan_lock when checking inode's runtime flags. Signed-off-by: Liu Bo Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/inode.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit bc5511d0eda1c2534aa3cedb485eae1fc354f2dc Author: Nikolay Borisov Date: Tue Jan 23 14:46:53 2018 +0200 btrfs: Use schedule_timeout_interruptible Instead of manually fiddling with the state of the task (RUNNING->INTERRUPTIBLE->RUNNING) again just use schedule_timeout_interruptible which adjusts the task state as needed. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f9cacae3145a07c8a2b699f18824df0cf7778431 Author: Nikolay Borisov Date: Fri Feb 9 11:30:18 2018 +0200 btrfs: Move error handling of btrfs_start_dirty_block_groups closer to call site Even though btrfs_start_dirty_block_groups is fairly in the beginning of btrfs_commit_transaction outside of the critical section defined by the transaction states it can only be run by a single comitter. In other words it defines its own critical section thanks to the BTRFS_TRANS_DIRTY_BG run flag and ro_block_group_mutex. However, its error handling is outside of this critical section which is a bit counter-intuitive. So move the error handling righ after the function is executed and let the sole runner of dirty block groups handle the return value. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/transaction.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 7ef2d6a7228f54f337a6fcb2e40de41bcc826ef2 Author: Anand Jain Date: Fri Jan 5 10:47:07 2018 +0800 btrfs: not a disk error if the bio_add_page fails bio_add_page() can fail for logical reasons as from the bio_add_page() comments: /* * This will only fail if either bio->bi_vcnt == bio->bi_max_vecs or * it's a cloned bio. */ Here we have just allocated the bio, so both of those failures can't occur. So drop the check. We can also drop the error stats for write error. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/scrub.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 4117f207d4b0d85ab78fec9cb138ed9c2a4b9f20 Author: Qu Wenruo Date: Mon Jan 22 13:50:54 2018 +0800 btrfs: Add chunk allocation ENOSPC debug message for enospc_debug mount option Enospc_debug makes extent allocator print more debug messages, however for chunk allocation, there is no debug message for enospc_debug at all. This patch will add message for the following parts of chunk allocator: 1) No rw device at all Quite rare, but at least output one message for this case. 2) Not enough space for some device This debug message is quite handy for unbalanced disks with stripe based profiles (RAID0/10/5/6). 3) Not enough free devices This debug message should tell us if current chunk allocator is working correctly under minimal device requirements. Although in most cases, we will hit other ENOSPC before we even hit a chunk allocator ENOSPC, but such debug info won't help. Signed-off-by: Qu Wenruo Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/volumes.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 566b1760b42be7c99c02e894b1ec9a707c2e83d1 Author: Anand Jain Date: Thu Feb 15 18:07:59 2018 +0800 btrfs: use ASSERT to report logical error in cow_file_range() Use ASSERT to report logical error in cow_file_range(), also move it a bit closer to when the num_bytes is derived. The extent start could be (u64)-1 in some cases, the assert should catch that we do not accidentally pass it to cow_file_range. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3752d22fcea160cc2493e34f5e0e41cdd7fdd921 Author: Anand Jain Date: Thu Feb 15 12:29:38 2018 +0800 btrfs: cow_file_range() num_bytes and disk_num_bytes are same This patch deletes local variable disk_num_bytes as its value is same as num_bytes in the function cow_file_range(). Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 2afb9653bf56a32ac4955527357428a8c4fdd5b8 Author: Anand Jain Date: Thu Feb 15 11:36:07 2018 +0800 btrfs: remove unused function btrfs_async_submit_limit() Commit [1] removed the need to use btrfs_async_submit_limit(), so delete it. [1] commit 736cd52e0c720103f52ab9da47b6cc3af6b083f6 Btrfs: remove nr_async_submits and async_submit_draining Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 8 -------- fs/btrfs/disk-io.h | 1 - 2 files changed, 9 deletions(-) commit 86d750a48a6d22435265abf525d8a27fa636db26 Author: Yang Shi Date: Sat Nov 18 07:02:16 2017 +0800 btrfs: remove unused hardirq.h Preempt counter APIs have been split out, currently, hardirq.h just includes irq_enter/exit APIs which are not used by btrfs at all. So, remove the unused hardirq.h. Signed-off-by: Yang Shi Signed-off-by: David Sterba fs/btrfs/extent_map.c | 1 - 1 file changed, 1 deletion(-) commit 9a3daff320260723b9e64b5b3b9c6592a0cd006a Author: Nikolay Borisov Date: Fri Dec 15 12:05:37 2017 +0200 btrfs: Add enospc_debug printing in metadata_reserve_bytes Currently when enospc_debug mount option is turned on we do not print any debug info in case metadata reservation failures happen. Fix this by adding the necessary hook in reserve_metadata_bytes. Signed-off-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 45ae2c1841c31c90077cf427c09ea0e83e381026 Author: Nikolay Borisov Date: Thu Feb 8 18:25:18 2018 +0200 btrfs: Document consistency of transaction->io_bgs list The reason why io_bgs can be modified without holding any lock is non-obvious. Document it and reference that documentation from the respective call sites. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/disk-io.c | 4 ++++ fs/btrfs/extent-tree.c | 9 +++++++-- fs/btrfs/transaction.h | 16 ++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) commit bf6d7d4900c0d0c15dcd1baa1b65e6519bf4abef Author: Nikolay Borisov Date: Thu Feb 8 18:25:17 2018 +0200 btrfs: Remove invalid null checks from btrfs_cleanup_dirty_bgs list_first_entry is essentially a wrapper over cotnainer_of. The latter can never return null even if it's working on inconsistent list since it will either crash or return some offset in the wrong struct. Additionally, for the dirty_bgs list the iteration is done under dirty_bgs_lock which ensures consistency of the list. Signed-off-by: Nikolay Borisov Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 9 --------- 1 file changed, 9 deletions(-) commit 8f2ceaa7b42a6df21eed621b88037af2c4cd8257 Author: Anand Jain Date: Tue Feb 13 11:53:43 2018 +0800 btrfs: log, when replace, is canceled by the user For debugging or administration purposes, we would want to know if and when the user cancels the replace, to complement the existing messages when dev-replace starts or finishes. Signed-off-by: Anand Jain Reviewed-by: David Sterba [ update changelog, fold fix for RCU warning from Nikolay ] Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit acf18c56fdcb952a06650282192e3b4ca1855c5e Author: Anand Jain Date: Sat Feb 24 19:43:56 2018 +0800 btrfs: fix null pointer deref when target device is missing The replace target device can be missing when mounted with -o degraded, but we wont allocate a missing btrfs_device to it. So check the device before accessing. BUG: unable to handle kernel NULL pointer dereference at 00000000000000b0 IP: btrfs_destroy_dev_replace_tgtdev+0x43/0xf0 [btrfs] Call Trace: btrfs_dev_replace_cancel+0x15f/0x180 [btrfs] btrfs_ioctl+0x2216/0x2590 [btrfs] do_vfs_ioctl+0x625/0x650 SyS_ioctl+0x4e/0x80 do_syscall_64+0x5d/0x160 entry_SYSCALL64_slow_path+0x25/0x25 This patch has been moved in front of patch "btrfs: log, when replace, is canceled by the user" that could reproduce the crash if the system reboots inside btrfs_dev_replace_start before the btrfs_dev_replace_finishing call. $ mkfs /dev/sda $ mount /dev/sda mnt $ btrfs replace start /dev/sda /dev/sdb $ mount po degraded /dev/sdb mnt Signed-off-by: Anand Jain [ added reproducer description from mail ] Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eceff22a8067fa5f587d1bab0eb66503d33b7164 Author: Anand Jain Date: Tue Feb 13 17:50:47 2018 +0800 btrfs: add a comment to mark the deprecated mount option The options alloc_start and subvolrootid are deprecated, comment them in the tokens list. And leave them as it is. No functional changes. Signed-off-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d3740608646f72fb94705a853946f647abcfaec4 Author: Anand Jain Date: Tue Feb 13 17:50:46 2018 +0800 btrfs: manage commit mount option as %u As the commit mount option is unsigned so manage it as %u for token verifications, instead of %d. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/super.c | 26 ++++++++++---------------- 2 files changed, 11 insertions(+), 17 deletions(-) commit 02453bdeb02482cb405700dca70d158b4c042e71 Author: Anand Jain Date: Tue Feb 13 17:50:45 2018 +0800 btrfs: manage check_int_print_mask mount option as %u As check_int_print_mask mount option is unsigned so manage it as %u for token verifications, instead of %d. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/super.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 764cb8b43d4d8047460ed0e530fc109434c346f2 Author: Anand Jain Date: Tue Feb 13 17:50:44 2018 +0800 btrfs: manage metadata_ratio mount option as %u As metadata_ratio mount option is unsinged so manage it as %u for token verifications, instead of %d. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/super.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit f7b885befd05fa4f546cdc3e6c9a3b4a30484cd1 Author: Anand Jain Date: Tue Feb 13 17:50:42 2018 +0800 btrfs: manage thread_pool mount option as %u The mount option thread_pool is always unsigned. Manage it that way all around. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 4 ++-- fs/btrfs/super.c | 13 ++++++------- 3 files changed, 9 insertions(+), 10 deletions(-) commit ba020491c8d08ec500ce1ddfd0715168a0ab9241 Author: Anand Jain Date: Tue Feb 13 12:35:44 2018 +0800 btrfs: extent_buffer_uptodate() make it static and inline extent_buffer_uptodate() is a trivial wrapper around test_bit() and nothing else. So make it static and inline, save on code space and call indirection. Before: text data bss dec hex filename 1131257 82898 18992 1233147 12d0fb fs/btrfs/btrfs.ko After: text data bss dec hex filename 1131090 82898 18992 1232980 12d054 fs/btrfs/btrfs.ko Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 5 ----- fs/btrfs/extent_io.h | 6 +++++- 2 files changed, 5 insertions(+), 6 deletions(-) commit 70458a58190ab3aa0267e539cac7c8dcb6dc5dd9 Author: Nikolay Borisov Date: Wed Feb 7 17:55:50 2018 +0200 btrfs: Remove fs_info argument of btrfs_write_and_wait_transaction We already pass btrfs_trans_handle which contains a reference to the fs_info so use that. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/transaction.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e9b919b1f73f1a363988ae1b9fba66f83a221f2e Author: Nikolay Borisov Date: Wed Feb 7 17:55:49 2018 +0200 btrfs: Remove fs_info argument from btrfs_update_commit_device_bytes_used We already pass the btrfs_transaction which references fs_info so no need to pass the later as an argument. Also use the opportunity to shorten transaction->trans. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/transaction.c | 2 +- fs/btrfs/volumes.c | 8 ++++---- fs/btrfs/volumes.h | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) commit 08d50ca32cd0554699b7680fbda97c94f49c73f2 Author: Nikolay Borisov Date: Wed Feb 7 17:55:48 2018 +0200 btrfs: Remove fs_info argument from create_pending_snapshots/create_pending_snapshot We already pass the trans handle which has a reference to fs_info to create_pending_snapshot so we can refer to it directly. Doing this obviates the need to pass the fs_info to create_pending_snapshots as well. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/transaction.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 16916a88d43c5f82c20a810e54d1a7f0d3d3a9ca Author: Nikolay Borisov Date: Wed Feb 7 17:55:47 2018 +0200 btrfs: Remove fs_info argument from switch_commit_roots We already have the fs_info from the passed transaction so use it directly. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/transaction.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 97cb39bb912c8092c5570578f2eb1b2988ac1af8 Author: Nikolay Borisov Date: Wed Feb 7 17:55:46 2018 +0200 btrfs: Remove root argument of cleanup_transaction The only thing the passed root is used for is: 1. get a reference to the fs_info and to 2. call trace_btrfs_transaction_commit. We can achieve 1) by simply referring to the fs_info from passed trans object. As far as 2) is concerned cleanup_transaction is called from only one place and the 'root' argument passed is the one from the trans handle. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/transaction.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 9386d8bc58e2088f05d2d49a9b8af626ebbe687b Author: Nikolay Borisov Date: Wed Feb 7 17:55:45 2018 +0200 btrfs: Don't pass fs_info to commit_cowonly_roots We already pass a transaction handle which refrences the fs_info so we can grab it from there. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/transaction.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7e4443d9eb33a4fefb8e929cbbacd9ad58727244 Author: Nikolay Borisov Date: Wed Feb 7 17:55:44 2018 +0200 btrfs: Don't pass fs_info to commit_fs_roots We already pass the transaction handle which has a reference to the fs_info. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/transaction.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e5c304e651e6ab13495d4aabb5e7d5d37933dc04 Author: Nikolay Borisov Date: Wed Feb 7 17:55:43 2018 +0200 btrfs: Don't pass fs_info to btrfs_run_delayed_items/_nr We already pass the transaction which has a reference to the fs_info, so use that. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 6 ++---- fs/btrfs/delayed-inode.h | 6 ++---- fs/btrfs/extent-tree.c | 2 +- fs/btrfs/transaction.c | 8 ++++---- fs/btrfs/tree-log.c | 12 ++++-------- 5 files changed, 13 insertions(+), 21 deletions(-) commit b84acab38f58b775f8cd3f38422c610a75b3eb70 Author: Nikolay Borisov Date: Wed Feb 7 17:55:42 2018 +0200 btrfs: Don't pass fs_info to __btrfs_run_delayed_items We already pass the transaction handle, which contains a refrence to the fs_info so grab it from there. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 21217054203cd10f26ba133352046895c16cd3de Author: Nikolay Borisov Date: Wed Feb 7 17:55:41 2018 +0200 btrfs: Don't pass fs_info arg to btrfs_start_dirty_block_groups It can be referenced from the passed transaction so no point in passing it as a function argument. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 +-- fs/btrfs/extent-tree.c | 4 ++-- fs/btrfs/transaction.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) commit 6c686b359a2dc501353ea61adcca441dd1473e91 Author: Nikolay Borisov Date: Wed Feb 7 17:55:40 2018 +0200 btrfs: Remove fs_info argument from btrfs_create_pending_block_groups It can be referenced from the passed transaciton so no point in passing it as function argument. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 +-- fs/btrfs/extent-tree.c | 10 +++++----- fs/btrfs/transaction.c | 6 +++--- 3 files changed, 9 insertions(+), 10 deletions(-) commit dc60c525cff11a5e60073cd1f618023b28b64ff1 Author: Nikolay Borisov Date: Wed Feb 7 17:55:39 2018 +0200 btrfs: Remove fs_info argument from btrfs_trans_release_metadata All current callers of this function just get a reference to the trans->fs_info member and pass it as the second argument. Collapse this into the function itself. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/transaction.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit c9b577c01ac91a82fce697c445cfac2bcd8a49f6 Author: Nikolay Borisov Date: Wed Feb 7 17:55:38 2018 +0200 btrfs: Open code btrfs_write_and_wait_marked_extents btrfs_write_and_wait_transaction is essentially a wrapper of btrfs_write_and_wait_marked_extents with the addition of calling clear_btree_io_tree. Having the code split doesn't really bring any benefit. Open code the later into the former and add proper documentation header. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ reformat comment ] Signed-off-by: David Sterba fs/btrfs/transaction.c | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) commit 0e34693f7bb149273b747194b3988801a9ca8c8e Author: Nikolay Borisov Date: Wed Feb 7 17:55:37 2018 +0200 btrfs: Make btrfs_trans_release_metadata private to transaction.c This function is only ever used in __btrfs_end_transaction and btrfs_commit_transaction so there is no need to export it via header. Let's move it closer to where it's used, make it static and remove it from the header. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 -- fs/btrfs/extent-tree.c | 18 ------------------ fs/btrfs/transaction.c | 19 +++++++++++++++++++ 3 files changed, 19 insertions(+), 20 deletions(-) commit 15fc1283f631552ffedebd14e4fd5a36438e7d2a Author: Anand Jain Date: Mon Feb 12 23:36:25 2018 +0800 btrfs: open code btrfs_init_dev_replace_tgtdev_for_resume() btrfs_init_dev_replace_tgtdev_for_resume() initializes replace target device in a few simple steps, so do it at the parent function. Moreover, there isn't any other caller so just open code it. Signed-off-by: Anand Jain Reviewed-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 10 ++++++++-- fs/btrfs/volumes.c | 13 ------------- fs/btrfs/volumes.h | 2 -- 3 files changed, 8 insertions(+), 17 deletions(-) commit 18e67c73dc6ea5bc5d9591abf92f8841290c4fcc Author: Anand Jain Date: Mon Feb 12 23:33:31 2018 +0800 btrfs: btrfs_dev_replace_cancel() can return int Current u64 return from btrfs_dev_replace_cancel() was probably done to match the btrfs_ioctl_dev_replace_args::result. However as our actual return value fits in int, and it further gets typecast to u64, so just return int. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 4 ++-- fs/btrfs/dev-replace.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 17d202b9738887c60b4903937b569df1e266eabb Author: Anand Jain Date: Mon Feb 12 23:33:30 2018 +0800 btrfs: rename __btrfs_dev_replace_cancel() Remove __ which is for the special functions. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 2 +- fs/btrfs/dev-replace.h | 2 +- fs/btrfs/ioctl.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 97282031a64ca72aabf6482f9c32d1bcc931cde2 Author: Anand Jain Date: Mon Feb 12 23:33:29 2018 +0800 btrfs: open code btrfs_dev_replace_cancel() btrfs_dev_replace_cancel() calls __btrfs_dev_replace_cancel() for the actual cancel so just open code it. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 10 +--------- fs/btrfs/dev-replace.h | 3 +-- fs/btrfs/ioctl.c | 3 ++- 3 files changed, 4 insertions(+), 12 deletions(-) commit af89e0dc2ce3177d07c4af4028b8a7b88733d07e Author: Nikolay Borisov Date: Wed Feb 7 11:19:10 2018 +0200 btrfs: Don't hardcode the csum size in btrfs_ordered_sum_size Currently the function uses a hardcoded value for the checksum size of a sector. This is fine, given that we currently support only a single algorithm, whose checksum is 4 bytes == sizeof(u32). Despite not having other algorithms, btrfs' design supports using a different algorithm whith different space requirements. To future-proof the code query the size of the currently used algorithm from the in-memory copy of the super block. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: Qu Wenruo Reviewed-by: Su Yue Signed-off-by: David Sterba fs/btrfs/ordered-data.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 97dc231e8990d484874e75e9f30a2f11fcf035c2 Author: Colin Ian King Date: Mon Jan 8 23:06:32 2018 +0000 Btrfs: extent map selftest: add missing void parameter to btrfs_test_extent_map Add a missing void parameter to function btrfs_test_extent_map, fixes sparse warning: warning: non-ANSI function declaration of function 'btrfs_test_extent_map' Signed-off-by: Colin Ian King Signed-off-by: David Sterba fs/btrfs/tests/extent-map-tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a61f8808833115bc32dd44a9d0ce10039b9399d Author: Colin Ian King Date: Fri Jan 12 16:52:58 2018 +0000 btrfs: remove redundant check on ret and goto The check for a non-zero ret is redundant as the goto will jump to the very next statement anyway. Remove this extraneous code. Detected by CoverityScan, CID#1463784 ("Identical code for different branches") Signed-off-by: Colin Ian King Signed-off-by: David Sterba fs/btrfs/tests/btrfs-tests.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7806c6eb15f227a484c368bbaf07da9978f57869 Author: Nikolay Borisov Date: Fri Dec 15 12:06:18 2017 +0200 btrfs: Remove unused btrfs_start_transaction_lflush function Commit 0e8c36a9fd81 ("Btrfs: fix lots of orphan inodes when the space is not enough") changed the way transaction reservation is made in btrfs_evict_node and as a result this function became unused. This has been the status quo for 5 years in which time no one noticed, so I'd say it's safe to assume it's unlikely it will ever be used again. Historical note: there were more attempts to remove the function, the reasoning was missing and only based on some static analysis tool reports. Other reason for rejection was that there seemed to be connection to BTRFS_RESERVE_FLUSH_LIMIT and that would need to be removeed to. This was not correct so removing the function is all we can do. Signed-off-by: Nikolay Borisov [ add the note ] Signed-off-by: David Sterba fs/btrfs/transaction.c | 8 -------- fs/btrfs/transaction.h | 3 --- 2 files changed, 11 deletions(-) commit b6a535faed06c2bdfaf55b00025dfdcb1eadf980 Author: Howard McLauchlan Date: Fri Feb 2 11:09:01 2018 -0800 btrfs: print error if primary super block write fails Presently, failing a primary super block write but succeeding in at least one super block write in general will appear to users as if nothing important went wrong. However, upon unmounting and re-mounting, the file system will be in a rolled back state. This was discovered with a BCC program that uses bpf_override_return() to fail super block writes. This patch outputs an error clarifying that the primary super block write has failed, so users can expect potentially erroneous behaviour. It also forces wait_dev_supers() to return an error to its caller if the primary super block write fails. Signed-off-by: Howard McLauchlan Reviewed-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 062d4d1f4085c3135fc159fb7eac96c31b4f47f9 Author: Qu Wenruo Date: Tue Jan 30 18:20:46 2018 +0800 btrfs: Refactor parameter of BTRFS_MAX_DEVS() from root to fs_info Signed-off-by: Qu Wenruo Reviewed-by: Anand Jain Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/volumes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit af2679e4a7f68f5b99593f61e9cdb8b5b69b0bec Author: Liu Bo Date: Thu Jan 25 11:02:48 2018 -0700 Btrfs: enhance leak debug checker for extent state and extent buffer This prints out eb->bflags since it contains some useful information, e.g. whether eb is dirty. Signed-off-by: Liu Bo Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ecd685580c8feb9a91c758257a66355a673594d9 Author: Finn Thain Date: Sun Mar 11 23:38:28 2018 -0400 m68k/mac: Remove bogus "FIXME" comment This code works fine. The comment is misleading so remove it. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/misc.c | 4 ---- 1 file changed, 4 deletions(-) commit 6df2afba7a87afa71d4baf9875ec846d3040f9bb Author: Finn Thain Date: Sun Mar 11 23:38:28 2018 -0400 m68k/mac: Enable RTC for 100-series PowerBooks According to Apple's Developer Notes, all of the early PowerBook models have their RTC connected to VIA1. Use the VIA clock ops as appropriate. This was tested on a PowerBook 170. Don't use the VIA ops when not appropriate. Calling unimplemented clock or PRAM getter or setter ops can now result in an error instead of failing silently. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/misc.c | 70 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 29 deletions(-) commit 31b1c780177d02d470109bdcf9899a3433c9fa93 Author: Finn Thain Date: Sun Mar 11 23:38:28 2018 -0400 m68k/mac: Clean up whitespace and remove redundant parentheses Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/misc.c | 64 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 27 deletions(-) commit 5043694eb8270a19040fb798f6d6f1dbd86c7a3c Author: Dave Martin Date: Fri Mar 23 18:08:31 2018 +0000 arm64/sve: Document firmware support requirements in Kconfig Use of SVE by EL2 and below requires explicit support in the firmware. There is no means to hide the presence of SVE from EL2, so a kernel configured with CONFIG_ARM64_SVE=y will typically not work correctly on SVE capable hardware unless the firmware does include the appropriate support. This is not expected to pose a problem in the wild, since platform integrators are responsible for ensuring that they ship up-to-date firmware to support their hardware. However, developers may hit the issue when using mismatched compoments. In order to draw attention to the issue and how to solve it, this patch adds some Kconfig text giving a brief explanation and details of compatible firmware versions. Signed-off-by: Dave Martin Acked-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/Kconfig | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 8bc2c29b550c1c9bb923079cca13c4669572ce6a Author: Fabio Estevam Date: Fri Mar 16 14:10:09 2018 -0300 ARM: mxs_defconfig: Re-sync defconfig Re-sync the defconfig by doing: make savedefconfig cp defconfig arch/arm/configs/mxs_defconfig So keep it in sync to help further changes in defconfig. The explanation for removing the Kconfig symbols: CONFIG_FHANDLE=y: verified that it is still selected selected CONFIG_DEVPTS_MULTIPLE_INSTANCES=y: does not exist anymore CONFIG_NVMEM=y: verified that it is still selected CONFIG_LOCKUP_DETECTOR=y: need to select CONFIG_SOFTLOCKUP_DETECTOR now CONFIG_TIMER_STATS=y: does not exist anymore Boot tested on a imx28evk. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/configs/mxs_defconfig | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit f7e797b95adc36f8c1fb6af5d4fd5c63ecbfb7c1 Author: Fabio Estevam Date: Sat Mar 3 17:05:48 2018 -0300 ARM: imx_v4_v5_defconfig: Use the generic fsl-asoc-card driver fsl-asoc-card machine driver also supports sgtl5000, so use it favor of the imx-sgtl5000 machine driver, which will be probably be removed in the future. Tested on a imx25-pdk board. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/configs/imx_v4_v5_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f0dc7437265d67f582c0a0cdb1c528665a8bfa32 Author: Fabio Estevam Date: Sat Mar 3 17:05:47 2018 -0300 ARM: imx_v4_v5_defconfig: Re-sync defconfig Re-sync the defconfig by doing: make savedefconfig cp defconfig arch/arm/configs/imx_v4_v5_defconfig So keep it in sync to help further changes in defconfig. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/configs/imx_v4_v5_defconfig | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c91815b596245fd7da349ecc43c8def670d2269e Author: Felipe Balbi Date: Mon Mar 26 13:14:47 2018 +0300 usb: dwc3: gadget: never call ->complete() from ->ep_queue() This is a requirement which has always existed but, somehow, wasn't reflected in the documentation and problems weren't found until now when Tuba Yavuz found a possible deadlock happening between dwc3 and f_hid. She described the situation as follows: spin_lock_irqsave(&hidg->write_spinlock, flags); // first acquire /* we our function has been disabled by host */ if (!hidg->req) { free_ep_req(hidg->in_ep, hidg->req); goto try_again; } [...] status = usb_ep_queue(hidg->in_ep, hidg->req, GFP_ATOMIC); => [...] => usb_gadget_giveback_request => f_hidg_req_complete => spin_lock_irqsave(&hidg->write_spinlock, flags); // second acquire Note that this happens because dwc3 would call ->complete() on a failed usb_ep_queue() due to failed Start Transfer command. This is, anyway, a theoretical situation because dwc3 currently uses "No Response Update Transfer" command for Bulk and Interrupt endpoints. It's still good to make this case impossible to happen even if the "No Reponse Update Transfer" command is changed. Reported-by: Tuba Yavuz Signed-off-by: Felipe Balbi Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/gadget.c | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) commit eaa358c7790338d83bb6a31258bdc077de120414 Author: Felipe Balbi Date: Mon Mar 26 13:14:46 2018 +0300 usb: gadget: udc: core: update usb_ep_queue() documentation Mention that ->complete() should never be called from within usb_ep_queue(). Signed-off-by: Felipe Balbi Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/core.c | 3 +++ 1 file changed, 3 insertions(+) commit b91ed9d8082c394dda63f94f935219cd0a565938 Author: Ritesh Harjani Date: Fri Mar 16 19:13:02 2018 +0530 quota: Kill an unused extern entry form quota.h Kill an unused extern entry from quota.h which is leftover of below patch. [f32764bd2: quota: Convert quota statistics to generic percpu_counter] Signed-off-by: Ritesh Harjani Signed-off-by: Jan Kara include/linux/quota.h | 1 - 1 file changed, 1 deletion(-) commit f8a695c4b43d02c89b8bba9ba6058fd5db1bc71d Author: Mauro Carvalho Chehab Date: Mon Mar 26 05:59:25 2018 -0400 media: v4l2-ioctl: rename a temp var that stores _IOC_SIZE(cmd) Instead of just calling it as "size", let's name it as "ioc_size", as it reflects better its contents. As this is constant along the function, also mark it as const. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ioctl.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 53d473fc1e38751b5369373423d58c86a3444b3b Author: Alban Bedel Date: Sat Mar 24 23:47:22 2018 +0100 usb: host: Remove the deprecated ATH79 USB host config options The options USB_EHCI_ATH79 and USB_OHCI_ATH79 only enable the generic EHCI and OHCI platform drivers, and have been marked as deprecated since 2012. These can be safely removed if we make sure that USB_EHCI_ROOT_HUB_TT still get enabled for the EHCI driver. This is now done be selecting this option when the EHCI platform driver is enabled on the ATH79 platform. Signed-off-by: Alban Bedel Signed-off-by: Greg Kroah-Hartman arch/mips/Kconfig | 1 + drivers/usb/host/Kconfig | 25 ------------------------- 2 files changed, 1 insertion(+), 25 deletions(-) commit 97eba3260e7c4e65e1c085301c2330110bd6aa2b Author: Wei Yongjun Date: Mon Mar 26 06:43:57 2018 +0000 usb: roles: Fix return value check in intel_xhci_usb_probe() In case of error, the function devm_ioremap_nocache() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: f6fb9ec02be1 ("usb: roles: Add Intel xHCI USB role switch driver") Signed-off-by: Wei Yongjun Reviewed-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/usb/roles/intel-xhci-usb-role-switch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7d8b44c54e0c7c8f688e3a07f17e6083f849f01f Author: Marc Zyngier Date: Fri Mar 23 14:57:09 2018 +0000 KVM: arm/arm64: vgic-its: Fix potential overrun in vgic_copy_lpi_list vgic_copy_lpi_list() parses the LPI list and picks LPIs targeting a given vcpu. We allocate the array containing the intids before taking the lpi_list_lock, which means we can have an array size that is not equal to the number of LPIs. This is particularly obvious when looking at the path coming from vgic_enable_lpis, which is not a command, and thus can run in parallel with commands: vcpu 0: vcpu 1: vgic_enable_lpis its_sync_lpi_pending_table vgic_copy_lpi_list intids = kmalloc_array(irq_count) MAPI(lpi targeting vcpu 0) list_for_each_entry(lpi_list_head) intids[i++] = irq->intid; At that stage, we will happily overrun the intids array. Boo. An easy fix is is to break once the array is full. The MAPI command will update the config anyway, and we won't miss a thing. We also make sure that lpi_list_count is read exactly once, so that further updates of that value will not affect the array bound check. Cc: stable@vger.kernel.org Fixes: ccb1d791ab9e ("KVM: arm64: vgic-its: Fix pending table sync") Reviewed-by: Andre Przywara Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier virt/kvm/arm/vgic/vgic-its.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 67b5b673ad4d469186edddecfe59909a9fd4b643 Author: Marc Zyngier Date: Fri Mar 9 14:59:40 2018 +0000 KVM: arm/arm64: vgic: Disallow Active+Pending for level interrupts It was recently reported that VFIO mediated devices, and anything that VFIO exposes as level interrupts, do no strictly follow the expected logic of such interrupts as it only lowers the input line when the guest has EOId the interrupt at the GIC level, rather than when it Acked the interrupt at the device level. THe GIC's Active+Pending state is fundamentally incompatible with this behaviour, as it prevents KVM from observing the EOI, and in turn results in VFIO never dropping the line. This results in an interrupt storm in the guest, which it really never expected. As we cannot really change VFIO to follow the strict rules of level signalling, let's forbid the A+P state altogether, as it is in the end only an optimization. It ensures that we will transition via an invalid state, which we can use to notify VFIO of the EOI. Reviewed-by: Eric Auger Tested-by: Eric Auger Tested-by: Shunyong Yang Signed-off-by: Marc Zyngier virt/kvm/arm/vgic/vgic-v2.c | 54 +++++++++++++++++++++++++-------------------- virt/kvm/arm/vgic/vgic-v3.c | 54 +++++++++++++++++++++++++-------------------- 2 files changed, 60 insertions(+), 48 deletions(-) commit 7fafcfdf6377b18b2a726ea554d6e593ba44349f Author: Yavuz, Tuba Date: Fri Mar 23 17:00:38 2018 +0000 USB: gadget: f_midi: fixing a possible double-free in f_midi It looks like there is a possibility of a double-free vulnerability on an error path of the f_midi_set_alt function in the f_midi driver. If the path is feasible then free_ep_req gets called twice: req->complete = f_midi_complete; err = usb_ep_queue(midi->out_ep, req, GFP_ATOMIC); => ... usb_gadget_giveback_request => f_midi_complete (CALLBACK) (inside f_midi_complete, for various cases of status) free_ep_req(ep, req); // first kfree if (err) { ERROR(midi, "%s: couldn't enqueue request: %d\n", midi->out_ep->name, err); free_ep_req(midi->out_ep, req); // second kfree return err; } The double-free possibility was introduced with commit ad0d1a058eac ("usb: gadget: f_midi: fix leak on failed to enqueue out requests"). Found by MOXCAFE tool. Signed-off-by: Tuba Yavuz Fixes: ad0d1a058eac ("usb: gadget: f_midi: fix leak on failed to enqueue out requests") Acked-by: Felipe Balbi Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_midi.c | 3 ++- drivers/usb/gadget/u_f.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 447a5647c9e7ab97780541f546a90e2620caa487 Author: Joe Perches Date: Wed Mar 21 15:09:32 2018 -0700 treewide: Align function definition open/close braces Some functions definitions have either the initial open brace and/or the closing brace outside of column 1. Move those braces to column 1. This allows various function analyzers like gnu complexity to work properly for these modified functions. Signed-off-by: Joe Perches Acked-by: Andy Shevchenko Acked-by: Paul Moore Acked-by: Alex Deucher Acked-by: Dave Chinner Reviewed-by: Darrick J. Wong Acked-by: Alexandre Belloni Acked-by: Martin K. Petersen Acked-by: Takashi Iwai Acked-by: Mauro Carvalho Chehab Acked-by: Rafael J. Wysocki Acked-by: Nicolin Chen Acked-by: Martin K. Petersen Acked-by: Steven Rostedt (VMware) Signed-off-by: Jiri Kosina arch/x86/include/asm/atomic64_32.h | 2 +- drivers/acpi/custom_method.c | 2 +- drivers/acpi/fan.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/media/i2c/msp3400-kthreads.c | 2 +- drivers/message/fusion/mptsas.c | 2 +- drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c | 2 +- drivers/net/wireless/ath/ath9k/xmit.c | 2 +- drivers/platform/x86/eeepc-laptop.c | 2 +- drivers/rtc/rtc-ab-b5ze-s3.c | 2 +- drivers/scsi/dpt_i2o.c | 2 +- drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +- fs/locks.c | 2 +- fs/ocfs2/stack_user.c | 2 +- fs/xfs/xfs_export.c | 2 +- kernel/audit.c | 6 +++--- kernel/trace/trace_printk.c | 4 ++-- lib/raid6/sse2.c | 14 +++++++------- sound/soc/fsl/fsl_dma.c | 2 +- 19 files changed, 28 insertions(+), 28 deletions(-) commit 4c1de0414a134086e9587dc9e7c85cd557c83034 Author: Daniel Kurtz Date: Mon Mar 12 10:45:30 2018 -0600 pinctrl/amd: poll InterruptEnable bits in enable_irq In certain cases interrupt enablement will be delayed relative to when the InterruptEnable bits are written. One example of this is when a GPIO's "debounce" logice is first enabled. After enabling debounce, there is a 900 us "warm up" period during which InterruptEnable[0] (bit 11) will read as 0 despite being written 1. During this time InterruptSts will not be updated, nor will interrupts be delivered, even if the GPIO's interrupt configuration has been written to the register. To work around this delay, poll the InterruptEnable bits after setting them to ensure interrupts have truly been enabled in hardware before returning from the irq_enable handler. Signed-off-by: Daniel Kurtz Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 44edff1bbc48595a041f65a725203763e3590a73 Author: Alexandre Belloni Date: Thu Mar 22 13:35:00 2018 +0100 pinctrl: ocelot: fix gpio direction Bits have to be cleared in DEVCPU_GCB:GPIO:GPIO_OE for input and set for output. ocelot_gpio_set_direction() got it wrong and this went unnoticed when the driver was reworked. Reported-by: Gregory Clement Signed-off-by: Alexandre Belloni Acked-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-ocelot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6c462d3ecc69a23802f588d53abec003f2d35c1 Author: Zhiyong Tao Date: Thu Mar 22 10:58:43 2018 +0800 pinctrl: mtk: fix check warnings. This patch fixes check warnings. Signed-off-by: Zhiyong Tao Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mtk-mt2701.h | 840 +++++++++----------------- drivers/pinctrl/mediatek/pinctrl-mtk-mt6397.h | 123 ++-- drivers/pinctrl/mediatek/pinctrl-mtk-mt8127.h | 429 +++++-------- drivers/pinctrl/mediatek/pinctrl-mtk-mt8135.h | 609 +++++++------------ drivers/pinctrl/mediatek/pinctrl-mtk-mt8173.h | 405 +++++-------- 5 files changed, 802 insertions(+), 1604 deletions(-) commit 6af8df4c670a19158182e9f55fc0decb1cf8baa6 Author: Zhiyong Tao Date: Thu Mar 22 10:58:42 2018 +0800 pintcrl: mtk: support bias-disable of generic and special pins simultaneously For generic pins, parameter "arg" is 0 or 1. For special pins, bias-disable is set by R0R1, so we need transmited "00" to set bias-disable When we set "bias-disable" as high-z property, the parameter should be "MTK_PUPD_SET_R1R0_00". Signed-off-by: Zhiyong Tao Reviewed-by: Sean Wang Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 8670710ff8feda2183474f5e0e9cbb4071761e47 Author: Zhiyong Tao Date: Thu Mar 22 10:58:41 2018 +0800 pinctrl: add mt2712 pinctrl driver The commit includes mt2712 pinctrl driver. Signed-off-by: Zhiyong Tao Reviewed-by: Sean Wang Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/Kconfig | 7 + drivers/pinctrl/mediatek/Makefile | 1 + drivers/pinctrl/mediatek/pinctrl-mt2712.c | 633 +++++++++ drivers/pinctrl/mediatek/pinctrl-mtk-mt2712.h | 1757 +++++++++++++++++++++++++ 4 files changed, 2398 insertions(+) commit 45dcb54f014d3d1f5cc3919b5f0c97087d7cb3dd Author: David Lechner Date: Mon Feb 19 15:57:07 2018 -0600 pinctrl: pinctrl-single: Fix pcs_request_gpio() when bits_per_mux != 0 This fixes pcs_request_gpio() in the pinctrl-single driver when bits_per_mux != 0. It appears this was overlooked when the multiple pins per register feature was added. Fixes: 4e7e8017a80e ("pinctrl: pinctrl-single: enhance to configure multiple pins of different modules") Signed-off-by: David Lechner Acked-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-single.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit a8ff510dbc2a4f1e17b97e35f9607c47a1df89a9 Author: William Breathitt Gray Date: Thu Mar 22 09:00:59 2018 -0400 gpio: ws16c48: Implement get_multiple callback The WinSystems WS16C48 device provides 48 lines of digital I/O accessed via six 8-bit ports. Since eight input lines are acquired on a single port input read, the WS16C48 GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the ws16c48_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-ws16c48.c | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 41b251318a6359848eef98b630ed578fad2cfbe6 Author: William Breathitt Gray Date: Thu Mar 22 09:00:42 2018 -0400 gpio: gpio-mm: Implement get_multiple callback The Diamond Systems GPIO-MM series of devices contain two 82C55A devices, which each feature three 8-bit ports of I/O. Since eight input lines are acquired on a single port input read, the GPIO-MM GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the gpiomm_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-gpio-mm.c | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit f72b10713cf5a9f6a425bdbd8da093cb02990d4d Author: William Breathitt Gray Date: Thu Mar 22 09:00:31 2018 -0400 gpio: 104-idi-48: Implement get_multiple callback The ACCES I/O 104-IDI-48 series of devices provides 48 optically-isolated inputs accessed via six 8-bit ports. Since eight input lines are acquired on a single port input read, the 104-IDI-48 GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the idi_48_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-idi-48.c | 47 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit d2d02bcdd52b889ec1bcabf8d0da6f3c2b87e9fc Author: William Breathitt Gray Date: Thu Mar 22 09:00:11 2018 -0400 gpio: 104-dio-48e: Implement get_multiple callback The ACCES I/O 104-DIO-48E series of devices contain two Programmable Peripheral Interface (PPI) chips of type 82C55, which each feature three 8-bit ports of I/O. Since eight input lines are acquired on a single port input read, the 104-DIO-48E GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the dio48e_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-dio-48e.c | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit ca37081595a2fa1d67c962d416392d36ae8d05ad Author: William Breathitt Gray Date: Thu Mar 22 09:00:00 2018 -0400 gpio: pcie-idio-24: Implement get_multiple/set_multiple callbacks The ACCES I/O PCIe-IDIO-24 series of devices provides 24 optically-isolated digital I/O accessed via six 8-bit ports. Since eight input lines are acquired on a single port input read -- and similarly eight output lines are set on a single port output write -- the PCIe-IDIO-24 GPIO driver may improve multiple I/O reads/writes by utilizing a get_multiple/set_multiple callbacks. This patch implements the idio_24_gpio_get_multiple function which serves as the respective get_multiple callback, and implements the idio_24_gpio_set_multiple function which serves as the respective set_multiple callback. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-pcie-idio-24.c | 117 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) commit 810ebfc5efca9a05c57e5d2bad0f944b0f24267d Author: William Breathitt Gray Date: Thu Mar 22 08:59:48 2018 -0400 gpio: pci-idio-16: Implement get_multiple callback The ACCES I/O PCI-IDIO-16 series of devices provides 16 optically-isolated digital inputs accessed via two 8-bit ports. Since eight input lines are acquired on a single port input read, the PCI-IDIO-16 GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the idio_16_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-pci-idio-16.c | 50 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 15f59cfff92bcbbb67e1b7ebb4d10b845797bdeb Author: William Breathitt Gray Date: Thu Mar 22 08:59:37 2018 -0400 gpio: 104-idio-16: Implement get_multiple callback The ACCES I/O 104-IDIO-16 series of devices provides 16 optically-isolated digital inputs accessed via two 8-bit ports. Since eight input lines are acquired on a single port input read, the 104-IDIO-16 GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the idio_16_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-idio-16.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 2abb5fad3a9336ea02bf832175b9e4fd5b946e47 Merge: 639a53d 77d2e05 Author: Daniel Borkmann Date: Mon Mar 26 09:58:18 2018 +0200 Merge branch 'bpf-verifier-log-btf-prep' Martin KaFai Lau says: ==================== This patch set has some changes and clean-up works for the bpf_verifier_log. They are the prep works for the BTF (BPF Type Format). ==================== Signed-off-by: Daniel Borkmann commit 77d2e05abd45886dcad2b632c738cf46b9f7c19e Author: Martin KaFai Lau Date: Sat Mar 24 11:44:23 2018 -0700 bpf: Add bpf_verifier_vlog() and bpf_verifier_log_needed() The BTF (BPF Type Format) verifier needs to reuse the current BPF verifier log. Hence, it requires the following changes: (1) Expose log_write() in verifier.c for other users. Its name is renamed to bpf_verifier_vlog(). (2) The BTF verifier also needs to check 'log->level && log->ubuf && !bpf_verifier_log_full(log);' independently outside of the current log_write(). It is because the BTF verifier will do one-check before making multiple calls to btf_verifier_vlog to log the details of a type. Hence, this check is also re-factored to a new function bpf_verifier_log_needed(). Since it is re-factored, we can check it before va_start() in the current bpf_verifier_log_write() and verbose(). Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann include/linux/bpf_verifier.h | 7 +++++++ kernel/bpf/verifier.c | 19 +++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) commit b9193c1b61ddb97da4713155b0d580e41fb544ac Author: Martin KaFai Lau Date: Sat Mar 24 11:44:22 2018 -0700 bpf: Rename bpf_verifer_log bpf_verifer_log => bpf_verifier_log Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann include/linux/bpf_verifier.h | 6 +++--- kernel/bpf/verifier.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit e25283bf83bd97a61007ab383695f4872e2eb43f Author: David Rientjes Date: Sun Mar 25 14:04:30 2018 -0700 x86/apic: Finish removing unused callbacks The ->cpu_mask_to_apicid() and ->vector_allocation_domain() callbacks are now unused, so remove them. Signed-off-by: David Rientjes Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: baab1e84b112 ("x86/apic: Remove unused callbacks") Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1803251403540.80485@chino.kir.corp.google.com Signed-off-by: Ingo Molnar arch/x86/include/asm/apic.h | 16 ---------------- 1 file changed, 16 deletions(-) commit dcae058a8da9c3cfc0055c7937ccd1a3dd0382a8 Author: zhenwei.pi Date: Mon Mar 26 01:44:03 2018 -0400 ext4: fix comments in ext4_swap_extents() "mark_unwritten" in comment and "unwritten" in the function arguments is mismatched. Signed-off-by: zhenwei.pi Signed-off-by: Theodore Ts'o fs/ext4/extents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 043d20d1592a194b96fb19282396e46cda633180 Author: Goldwyn Rodrigues Date: Mon Mar 26 01:32:50 2018 -0400 ext4: use generic_writepages instead of __writepage/write_cache_pages Code cleanup. Instead of writing an internal static function, use the available generic_writepages(). Signed-off-by: Goldwyn Rodrigues Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit 996bfed118748c128ad4b6c05c09fd2f5fdfa1b4 Merge: da18ab3 28bf831 Author: David S. Miller Date: Sun Mar 25 21:27:38 2018 -0400 Merge tag 'wireless-drivers-next-for-davem-2018-03-24' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.17 The biggest changes are the bluetooth related patches to the rsi driver. It adds a new bluetooth driver which communicates directly with the wireless driver and the interface is defined in include/net/rsi_91x.h. Major changes: wl1251 * read the MAC address from the NVS file rtlwifi * enable mac80211 fast-tx support mt76 * add capability to select tx/rx antennas mt7601 * let mac80211 validate rx CCMP Packet Number (PN) rsi * bluetooth: add new btrsi driver * btcoex support with the new btrsi driver ==================== Signed-off-by: David S. Miller commit da18ab32d78b6414267d3e5c8c9b5ab34a6d3321 Author: kbuild test robot Date: Sat Mar 24 03:47:42 2018 +0800 tipc: tipc_disc_addr_trial_msg() can be static Fixes: 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values") Signed-off-by: Fengguang Wu Acked-by: Jon Maloy jon.maloy@ericsson.com Signed-off-by: David S. Miller net/tipc/discover.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 050e85c97f6151be1689a22810a7240fa7457557 Author: Dan Carpenter Date: Fri Mar 23 14:36:15 2018 +0300 ibmvnic: Potential NULL dereference in clean_one_tx_pool() There is an && vs || typo here, which potentially leads to a NULL dereference. Fixes: e9e1e97884b7 ("ibmvnic: Update TX pool cleaning routine") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f1417f9f0ed3f367502011b187a293cea0e2435 Author: Ganesh Goudar Date: Fri Mar 23 17:05:49 2018 +0530 cxgb4: support new ISSI flash parts Add support for new 32MB and 64MB ISSI (Integrated Silicon Solution, Inc.) FLASH parts. Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit b46f7da1f360b755c9e20118a54b8dde9c4d8b5c Author: Ganesh Goudar Date: Fri Mar 23 17:03:10 2018 +0530 cxgb4: depend on firmware event for link status Depend on the firmware sending us link status changes, rather than assuming that the link goes down upon L1 configuration. Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 -- 1 file changed, 2 deletions(-) commit bd79aceed53b22766c87c1cf5ddf4639a488c3f4 Author: Arjun Vynipadath Date: Fri Mar 23 15:48:46 2018 +0530 cxgb4: copy vlan_id in ndo_get_vf_config Copy vlan_id to get it displayed in vf info. Signed-off-by: Arjun Vynipadath Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudhar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 843bd7db79c861b49e2912d723625f5fa8e94502 Author: Arjun Vynipadath Date: Fri Mar 23 15:25:10 2018 +0530 cxgb4: Setup FW queues before registering netdev When NetworkManager is enabled, there are chances that interface up is called even before probe completes. This means we have not yet allocated the FW sge queues, hence rest of ingress queue allocation wont be proper. Fix this by calling setup_fw_sge_queues() before register_netdev(). Fixes: 0fbc81b3ad51 ('chcr/cxgb4i/cxgbit/RDMA/cxgb4: Allocate resources dynamically for all cxgb4 ULD's') Signed-off-by: Arjun Vynipadath Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 2db956906d024825db29993066164afca46870ae Merge: 9259f13 9f4ca05 Author: David S. Miller Date: Sun Mar 25 20:48:26 2018 -0400 Merge branch 'broadcom-Adaptive-interrupt-coalescing' Florian Fainelli says: ==================== net: broadcom: Adaptive interrupt coalescing This patch series adds adaptive interrupt coalescing for the Gigabit Ethernet drivers SYSTEMPORT and GENET. This really helps lower the interrupt count and system load, as measured by vmstat for a Gigabit TCP RX session: SYSTEMPORT: without: 1 0 0 192188 0 25472 0 0 0 0 122100 38870 1 42 57 0 0 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.0 sec 1.03 GBytes 884 Mbits/sec with: 1 0 0 192288 0 25468 0 0 0 0 58806 44401 0 100 0 0 0 [ 5] 0.0-10.0 sec 1.04 GBytes 888 Mbits/sec GENET: without: 1 0 0 1170404 0 25420 0 0 0 0 130785 63402 2 85 12 0 0 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.0 sec 1.04 GBytes 888 Mbits/sec with: 1 0 0 1170560 0 25420 0 0 0 0 50610 48477 0 100 0 0 0 [ 5] 0.0-10.0 sec 1.05 GBytes 899 Mbits/sec Please look at the implementation and let me know if you see any problems, this was largely inspired by bnxt_en. ==================== Signed-off-by: David S. Miller commit 9f4ca05827a27ec73bf63a42732f1978b8a779af Author: Florian Fainelli Date: Thu Mar 22 18:19:33 2018 -0700 net: bcmgenet: Add support for adaptive RX coalescing Unlike the moder modern SYSTEMPORT hardware, we do not have a configurable TDMA timeout, which limits us to implement adaptive RX interrupt coalescing only. We have each of our RX rings implement a bcmgenet_net_dim structure which holds an interrupt counter, number of packets, bytes, and a container for a net_dim instance. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 109 +++++++++++++++++++++---- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 12 +++ 2 files changed, 103 insertions(+), 18 deletions(-) commit b6e0e875421ef6debfbe05d3aa99ac788d886074 Author: Florian Fainelli Date: Thu Mar 22 18:19:32 2018 -0700 net: systemport: Implement adaptive interrupt coalescing Implement support for adaptive RX and TX interrupt coalescing using net_dim. We have each of our TX ring and our single RX ring implement a bcm_sysport_net_dim structure which holds an interrupt counter, number of packets, bytes, and a container for a net_dim instance. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 141 ++++++++++++++++++++++++++--- drivers/net/ethernet/broadcom/bcmsysport.h | 14 +++ 2 files changed, 140 insertions(+), 15 deletions(-) commit 9259f134a7dd1372ab142b2860994b993db34917 Merge: 808679e 71f74ae Author: David S. Miller Date: Sun Mar 25 20:43:42 2018 -0400 Merge branch 'mv88e6xxx-module-reloading' Andrew Lunn says: ==================== Fixes to allow mv88e6xxx module to be reloaded As reported by Uwe Kleine-König, the interrupt trigger is first configured by DT and then reconfigured to edge. This results in a failure on EPROBE_DEFER, or if the module is unloaded and reloaded. A second crash happens on module reload due to a missing call to the common IRQ free code when using polled interrupts. With these fixes in place, it becomes possible to load and unload the kernel modules a few times without it crashing. v2: Fix the ü in Künig a couple of times v3: But the ü should be an ö! ==================== Signed-off-by: David S. Miller commit 71f74ae48c7fd08ffa0c447dfcea6c7fd3dfefc6 Author: Andrew Lunn Date: Sun Mar 25 23:43:15 2018 +0200 net: dsa: mv88e6xxx: Call the common IRQ free code When free'ing the polled IRQs, call the common irq free code. Otherwise the interrupts are left registered, and when we come to load the driver a second time, we get an Opps. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+) commit 422a9fd604a0c2206d40e3eb34f726172a147ccf Author: Andrew Lunn Date: Sun Mar 25 23:43:14 2018 +0200 net: dsa: mv88e6xxx: Use the DT IRQ trigger mode By calling request_threaded_irq() with the flag IRQF_TRIGGER_FALLING we override the trigger mode provided in device tree. And the interrupt is actually active low, which is what all the current device tree descriptions use. Suggested-by: Uwe Kleine-König Signed-off-by: Andrew Lunn Acked-by: Uwe Kleine-König Tested-by: Uwe Kleine-König Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 808679e7fa8018321ccfb227628175b84d2a5ff9 Author: Roman Mashak Date: Sun Mar 25 17:20:06 2018 -0400 tc-testing: updated police, mirred, skbedit and skbmod with more tests Added extra test cases for control actions (reclassify, pipe etc.), cookies, max index value and police args sanity check. Signed-off-by: Roman Mashak Signed-off-by: David S. Miller .../tc-testing/tc-tests/actions/mirred.json | 192 +++++++++++++++++++++ .../tc-testing/tc-tests/actions/police.json | 144 ++++++++++++++++ .../tc-testing/tc-tests/actions/skbedit.json | 168 ++++++++++++++++++ .../tc-testing/tc-tests/actions/skbmod.json | 24 +++ 4 files changed, 528 insertions(+) commit 33d009cd889490838c5db9b9339856c9e3d3facc Merge: b4eec0f 09695ad Author: Dave Airlie Date: Mon Mar 26 10:01:11 2018 +1000 Merge branch 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-next Last pull for 4.17. Highlights: - Vega12 support - A few more bug fixes and cleanups for powerplay * 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux: (77 commits) drm/amd/pp: clean header file hwmgr.h drm/amd/pp: use mlck_table.count for array loop index limit drm/amdgpu: Add an ATPX quirk for hybrid laptop drm/amdgpu: fix spelling mistake: "asssert" -> "assert" drm/amd/pp: Add new asic support in pp_psm.c drm/amd/pp: Clean up powerplay code on Vega12 drm/amd/pp: Add smu irq handlers for legacy asics drm/amd/pp: Fix set wrong temperature range on smu7 drm/amdgpu: Don't change preferred domian when fallback GTT v5 drm/amdgpu: Fix NULL ptr on driver unload due to init failure. drm/amdgpu: fix "mitigate workaround for i915" drm/amd/pp: Add smu irq handlers in sw_init instand of hw_init drm/amd/pp: Refine register_thermal_interrupt function drm/amdgpu: Remove wrapper layer of cgs irq handling drm/amd/powerplay: Return per DPM level clock drm/amd/powerplay: Remove the SOC floor voltage setting drm/amdgpu: no job timeout setting on compute queues drm/amdgpu: add vega12 pci ids (v2) drm/amd/powerplay: add the hw manager for vega12 (v4) drm/amd/powerplay: add the smu manager for vega12 (v4) ... commit 9e09686850478eb70fb93a32678da924742ccd36 Merge: 74b4bed c5d24bd Author: David S. Miller Date: Sun Mar 25 17:07:41 2018 -0400 Merge branch 'hv_netvsc-Fix-improve-RX-path-error-handling' Haiyang Zhang says: ==================== hv_netvsc: Fix/improve RX path error handling Fix the status code returned to the host. Also add range check for rx packet offset and length. ==================== Signed-off-by: David S. Miller commit c5d24bdd29cc6373331967b5034da21c12805f72 Author: Haiyang Zhang Date: Thu Mar 22 12:01:14 2018 -0700 hv_netvsc: Add range checking for rx packet offset and length This patch adds range checking for rx packet offset and length. It may only happen if there is a host side bug. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 1 + drivers/net/hyperv/netvsc.c | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) commit 5c71dadbb45970a8f0544a27ae8f1cbd9750e516 Author: Haiyang Zhang Date: Thu Mar 22 12:01:13 2018 -0700 hv_netvsc: Fix the return status in RX path As defined in hyperv_net.h, the NVSP_STAT_SUCCESS is one not zero. Some functions returns 0 when it actually means NVSP_STAT_SUCCESS. This patch fixes them. In netvsc_receive(), it puts the last RNDIS packet's receive status for all packets in a vmxferpage which may contain multiple RNDIS packets. This patch puts NVSP_STAT_FAIL in the receive completion if one of the packets in a vmxferpage fails. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 8 ++++++-- drivers/net/hyperv/netvsc_drv.c | 2 +- drivers/net/hyperv/rndis_filter.c | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) commit 74b4bed972acf967a65d2aaf29c13b429c8cb927 Merge: 0374016 76db808 Author: David S. Miller Date: Sun Mar 25 16:46:05 2018 -0400 Merge branch 'net-permit-skb_segment-on-head_frag-frag_list-skb' Yonghong Song says: ==================== net: permit skb_segment on head_frag frag_list skb One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at function skb_segment(), line 3667. The bpf program attaches to clsact ingress, calls bpf_skb_change_proto to change protocol from ipv4 to ipv6 or from ipv6 to ipv4, and then calls bpf_redirect to send the changed packet out. ... 3665 while (pos < offset + len) { 3666 if (i >= nfrags) { 3667 BUG_ON(skb_headlen(list_skb)); ... The triggering input skb has the following properties: list_skb = skb->frag_list; skb->nfrags != NULL && skb_headlen(list_skb) != 0 and skb_segment() is not able to handle a frag_list skb if its headlen (list_skb->len - list_skb->data_len) is not 0. Patch #1 provides a simple solution to avoid BUG_ON. If list_skb->head_frag is true, its page-backed frag will be processed before the list_skb->frags. Patch #2 provides a test case in test_bpf module which constructs a skb and calls skb_segment() directly. The test case is able to trigger the BUG_ON without Patch #1. The patch has been tested in the following setup: ipv6_host <-> nat_server <-> ipv4_host where nat_server has a bpf program doing ipv4<->ipv6 translation and forwarding through clsact hook bpf_skb_change_proto. Changelog: v5 -> v6: . Added back missed BUG_ON(!nfrags) for zero skb_headlen(skb) case, plus a couple of cosmetic changes, from Alexander. v4 -> v5: . Replace local variable head_frag with a static inline function skb_head_frag_to_page_desc which gets the head_frag on-demand. This makes code more readable and also does not increase the stack size, from Alexander. . Remove the "if(nfrags)" guard for skb_orphan_frags and skb_zerocopy_clone as I found that they can handle zero-frag skb (with non-zero skb_headlen(skb)) properly. . Properly release segment list from skb_segment() in the test, from Eric. v3 -> v4: . Remove dynamic memory allocation and use rewinding for both index and frag to remove one branch in fast path, from Alexander. . Fix a bunch of issues in test_bpf skb_segment() test, including proper way to allocate skb, proper function argument for skb_add_rx_frag and not freeint skb, etc., from Eric. v2 -> v3: . Use starting frag index -1 (instead of 0) to special process head_frag before other frags in the skb, from Alexander Duyck. v1 -> v2: . Removed never-hit BUG_ON, spotted by Linyu Yuan. ==================== Signed-off-by: David S. Miller commit 76db8087c4c991dcd17f5ea8ac0eafd0696ab450 Author: Yonghong Song Date: Wed Mar 21 16:31:04 2018 -0700 net: bpf: add a test for skb_segment in test_bpf module Without the previous commit, "modprobe test_bpf" will have the following errors: ... [ 98.149165] ------------[ cut here ]------------ [ 98.159362] kernel BUG at net/core/skbuff.c:3667! [ 98.169756] invalid opcode: 0000 [#1] SMP PTI [ 98.179370] Modules linked in: [ 98.179371] test_bpf(+) ... which triggers the bug the previous commit intends to fix. The skbs are constructed to mimic what mlx5 may generate. The packet size/header may not mimic real cases in production. But the processing flow is similar. Signed-off-by: Yonghong Song Signed-off-by: David S. Miller lib/test_bpf.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 2 deletions(-) commit 13acc94eff122b260a387d68668bf9d670738e6a Author: Yonghong Song Date: Wed Mar 21 16:31:03 2018 -0700 net: permit skb_segment on head_frag frag_list skb One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at function skb_segment(), line 3667. The bpf program attaches to clsact ingress, calls bpf_skb_change_proto to change protocol from ipv4 to ipv6 or from ipv6 to ipv4, and then calls bpf_redirect to send the changed packet out. 3472 struct sk_buff *skb_segment(struct sk_buff *head_skb, 3473 netdev_features_t features) 3474 { 3475 struct sk_buff *segs = NULL; 3476 struct sk_buff *tail = NULL; ... 3665 while (pos < offset + len) { 3666 if (i >= nfrags) { 3667 BUG_ON(skb_headlen(list_skb)); 3668 3669 i = 0; 3670 nfrags = skb_shinfo(list_skb)->nr_frags; 3671 frag = skb_shinfo(list_skb)->frags; 3672 frag_skb = list_skb; ... call stack: ... #1 [ffff883ffef03558] __crash_kexec at ffffffff8110c525 #2 [ffff883ffef03620] crash_kexec at ffffffff8110d5cc #3 [ffff883ffef03640] oops_end at ffffffff8101d7e7 #4 [ffff883ffef03668] die at ffffffff8101deb2 #5 [ffff883ffef03698] do_trap at ffffffff8101a700 #6 [ffff883ffef036e8] do_error_trap at ffffffff8101abfe #7 [ffff883ffef037a0] do_invalid_op at ffffffff8101acd0 #8 [ffff883ffef037b0] invalid_op at ffffffff81a00bab [exception RIP: skb_segment+3044] RIP: ffffffff817e4dd4 RSP: ffff883ffef03860 RFLAGS: 00010216 RAX: 0000000000002bf6 RBX: ffff883feb7aaa00 RCX: 0000000000000011 RDX: ffff883fb87910c0 RSI: 0000000000000011 RDI: ffff883feb7ab500 RBP: ffff883ffef03928 R8: 0000000000002ce2 R9: 00000000000027da R10: 000001ea00000000 R11: 0000000000002d82 R12: ffff883f90a1ee80 R13: ffff883fb8791120 R14: ffff883feb7abc00 R15: 0000000000002ce2 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 #9 [ffff883ffef03930] tcp_gso_segment at ffffffff818713e7 Signed-off-by: David S. Miller net/core/skbuff.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit 0374016579d0ef5d86655e48645ccc05678e0cf5 Merge: ee7a60c ed93a39 Author: David S. Miller Date: Sun Mar 25 16:24:34 2018 -0400 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2018-03-23 This series contains updates to ixgbe and ixgbevf only. Paul adds status register reads to reduce a potential race condition where registers can read 0xFFFFFFFF during a PCI reset, which in turn causes the driver to remove the adapter. Then fixes an assignment operation with an "OR" operation. Shannon Nelson provides several IPsec offload cleanups to ixgbe, as well as a patch to enable TSO with IPsec offload. Tony provides the much anticipated XDP support for ixgbevf. Currently, pass, drop and XDP_TX actions are supported, as well as meta data and stats reporting. Björn Töpel tweaks the page counting for XDP_REDIRECT, since a page can have its reference count decreased via the xdp_do_redirect() call. ==================== Signed-off-by: David S. Miller commit ee7a60c9657e21ca28be66fa5c5df39963f99c38 Merge: 94cb549 c9614a1 Author: David S. Miller Date: Sun Mar 25 16:18:55 2018 -0400 Merge branch 'liquidio-Tx-queue-cleanup' Intiyaz Basha says: ==================== liquidio: Tx queue cleanup Moved some common function to octeon_network.h Removed some unwanted functions and checks. ==================== Signed-off-by: David S. Miller commit c9614a166338664153cbf1de9f329a03a5748466 Author: Intiyaz Basha Date: Fri Mar 23 17:37:44 2018 -0700 liquidio: Renamed txqs_start to start_txqs For consistency renaming txqs_start to start_txqs Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 2 +- drivers/net/ethernet/cavium/liquidio/octeon_network.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 736b7ea555d05b3febf3ee56afd17834f2d20bc2 Author: Intiyaz Basha Date: Fri Mar 23 17:37:41 2018 -0700 liquidio: Renamed txqs_stop to stop_txqs For consistency renaming txqs_stop to stop_txqs Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 4 ++-- drivers/net/ethernet/cavium/liquidio/octeon_network.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit a96d8ad31dd92735b88cfcc5db666d3c57a17b52 Author: Intiyaz Basha Date: Fri Mar 23 17:37:39 2018 -0700 liquidio: Renamed txqs_wake to wake_txqs For consistency renaming txqs_wake to wake_txqs Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 4 ++-- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 4 ++-- drivers/net/ethernet/cavium/liquidio/octeon_network.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit fc756d0f51c855719ec6a26f6b4d8bdf24ee2e94 Author: Intiyaz Basha Date: Fri Mar 23 17:37:36 2018 -0700 liquidio: Function call skb_iq for deriving queue from skb Using skb_iq function for deriving queue from skb Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 3 +-- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit dd69debce4a13df39aad6d218a743c4d9a0cf6f3 Author: Intiyaz Basha Date: Fri Mar 23 17:37:33 2018 -0700 liquidio: Removed one line function wake_q Removing one line function wake_q Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 14 ++------------ drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 12 +----------- 2 files changed, 3 insertions(+), 23 deletions(-) commit 78a202f00d0970544ee96803b5b1c1fe65f8a433 Author: Intiyaz Basha Date: Fri Mar 23 17:37:30 2018 -0700 liquidio: Removed one line function stop_q Removing one line function stop_q Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 12 +----------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 12 +----------- 2 files changed, 2 insertions(+), 22 deletions(-) commit 2a2fabaf35fca27b35eaf16331b2c1a1377c0516 Author: Intiyaz Basha Date: Fri Mar 23 17:37:28 2018 -0700 liquidio: Removed netif_is_multiqueue check Removing checks for netif_is_multiqueue. Configuring single queue will be a multiqueue netdev with one queues. Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_core.c | 18 ++--- drivers/net/ethernet/cavium/liquidio/lio_main.c | 93 +++++++--------------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 55 ++++--------- .../net/ethernet/cavium/liquidio/octeon_network.h | 50 ++++-------- 4 files changed, 64 insertions(+), 152 deletions(-) commit a8c4a79264b690465b859495cfb42d41d0283264 Author: Intiyaz Basha Date: Fri Mar 23 17:37:25 2018 -0700 liquidio: Removed start_txq function Removing start_txq function from VF and PF files Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 16 +--------------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 16 +--------------- drivers/net/ethernet/cavium/liquidio/octeon_network.h | 16 ++++++++++------ 3 files changed, 12 insertions(+), 36 deletions(-) commit c5662c8c6dffd97b347e52d79025e38a88e8a077 Author: Intiyaz Basha Date: Fri Mar 23 17:37:20 2018 -0700 liquidio: Removed one line function stop_txq Removing one line function stop_txq Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 5da052a6bd92afb76b226da4afeb1afb66edf080 Author: Intiyaz Basha Date: Fri Mar 23 17:37:17 2018 -0700 liquidio: Moved common function skb_iq to to octeon_network.h Moving common function skb_iq to to octeon_network.h Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 10 ---------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 10 ---------- drivers/net/ethernet/cavium/liquidio/octeon_network.h | 10 ++++++++++ 3 files changed, 10 insertions(+), 20 deletions(-) commit 5f8baa7a8e7e3f6db640187ef3fa2799107cd1c9 Author: Intiyaz Basha Date: Fri Mar 23 17:37:07 2018 -0700 liquidio: Moved common function txqs_start to octeon_network.h Moving common function txqs_start to octeon_network.h Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 16 ---------------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 16 ---------------- drivers/net/ethernet/cavium/liquidio/octeon_network.h | 17 +++++++++++++++++ 3 files changed, 17 insertions(+), 32 deletions(-) commit 95fbba1846d751cccd49c0a896230b3093254b71 Author: Intiyaz Basha Date: Fri Mar 23 17:36:58 2018 -0700 liquidio: Moved common function txqs_wake to octeon_network.h Moving common function txqs_wake to octeon_network.h Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 28 ---------------------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 27 --------------------- .../net/ethernet/cavium/liquidio/octeon_network.h | 27 +++++++++++++++++++++ 3 files changed, 27 insertions(+), 55 deletions(-) commit a28a47f1203a7708ab001b3cb7962d391cc14ce8 Author: Intiyaz Basha Date: Fri Mar 23 17:36:56 2018 -0700 liquidio: Moved common function txqs_stop to octeon_network.h Moving common function txqs_stop to octeon_network.h Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 16 ---------------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 16 ---------------- drivers/net/ethernet/cavium/liquidio/octeon_network.h | 16 ++++++++++++++++ 3 files changed, 16 insertions(+), 32 deletions(-) commit 18492685e479fd4d8e1dca836f57c11b6800f083 Author: Masahiro Yamada Date: Fri Mar 23 02:00:14 2018 +0900 kconfig: use yylineno option instead of manual lineno increments Tracking the line number by hand is error-prone since you need to increment it in every \n matching pattern. If '%option yylineno' is set, flex defines 'yylineno' to contain the current line number and automatically updates it each time it reads a \n character. This is much more convenient although the lexer does not initializes yylineno, so you need to set it to 1 each time you start reading a new file, and restore it you go back to the previous file. I tested this with DEBUG_PARSE, and confirmed the same dump message was produced. I removed the perf-report option. Otherwise, I see the following message: %option yylineno entails a performance penalty ONLY on rules that can match newline characters Signed-off-by: Masahiro Yamada scripts/kconfig/lkc.h | 1 + scripts/kconfig/zconf.l | 20 +++++++++----------- 2 files changed, 10 insertions(+), 11 deletions(-) commit 379a8eb8eb1a55344e1cf976fa589a12c68b60a7 Author: Masahiro Yamada Date: Fri Mar 23 02:00:13 2018 +0900 kconfig: detect recursive inclusion earlier Currently, the recursive inclusion is not detected when the offending file is about to be included; it is detected the offending file is about to include the *next* file. This is because the detection loop does not involve the file being included. Do this check against the file that is about to be included so that the recursive inclusion is detected before unneeded parsing happens. Signed-off-by: Masahiro Yamada scripts/kconfig/zconf.l | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 32a94b8b0c3e5ae575919850c5e49e936b704d45 Author: Masahiro Yamada Date: Fri Mar 23 02:00:12 2018 +0900 kconfig: remove duplicated file name and lineno of recursive inclusion As in the unit test, the error message for the recursive inclusion looks like this: Kconfig.inc1:4: recursive inclusion detected. Inclusion path: current file : 'Kconfig.inc1' included from: 'Kconfig.inc3:1' included from: 'Kconfig.inc2:3' included from: 'Kconfig.inc1:4' The 'Kconfig.inc1:4' is duplicated in the first and last lines. Also, the single quotes do not help readability. Change the message like follows: Recursive inclusion detected. Inclusion path: current file : Kconfig.inc1 included from: Kconfig.inc3:1 included from: Kconfig.inc2:3 included from: Kconfig.inc1:4 Signed-off-by: Masahiro Yamada scripts/kconfig/tests/err_recursive_inc/expected_stderr | 11 ++++++----- scripts/kconfig/zconf.l | 9 ++++----- 2 files changed, 10 insertions(+), 10 deletions(-) commit 26561514cc9defed09a043dfaedc900274b76ff2 Author: Masahiro Yamada Date: Thu Mar 15 15:25:27 2018 +0900 kconfig: do not include both curses.h and ncurses.h for nconfig nconf.h includes and "ncurses.h", but it does not need to include both. Generally, it should fall back to curses.h only when ncurses.h is not found. But, looks like it has never happened; these includes have been here for many years since commit 692d97c380c6 ("kconfig: new configuration interface (nconfig)"), and nobody has complained about hard-coding of ncurses.h . Let's simply drop the curses.h inclusion. I replaced "ncurses.h" with since it is not a local file. Signed-off-by: Masahiro Yamada scripts/kconfig/nconf.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f8f69dc0b4e070d4a4d39889a85424913cc922d5 Author: Masahiro Yamada Date: Tue Mar 13 18:56:08 2018 +0900 kconfig: make unmet dependency warnings readable Currently, the unmet dependency warnings end up with endlessly long expressions, most of which are false positives. Here is test code to demonstrate how it currently works. [Test Case] config DEP1 def_bool y config DEP2 bool "DEP2" config A bool "A" select E config B bool "B" depends on DEP2 select E config C bool "C" depends on DEP1 && DEP2 select E config D def_bool n select E config E bool depends on DEP1 && DEP2 [Result] $ make config scripts/kconfig/conf --oldaskconfig Kconfig * * Linux Kernel Configuration * DEP2 (DEP2) [N/y/?] (NEW) n A (A) [N/y/?] (NEW) y warning: (A && B && D) selects E which has unmet direct dependencies (DEP1 && DEP2) Here, I see some points to be improved. First, '(A || B || D)' would make more sense than '(A && B && D)'. I am not sure if this is intentional, but expr_simplify_unmet_dep() turns OR expressions into AND, like follows: case E_OR: return expr_alloc_and( Second, we see false positives. 'A' is a real unmet dependency. 'B' is false positive because 'DEP1' is fixed to 'y', and 'B' depends on 'DEP2'. 'C' was correctly dropped by expr_simplify_unmet_dep(). 'D' is also false positive because it has no chance to be enabled. Current expr_simplify_unmet_dep() cannot avoid those false positives. After all, I decided to use the same helpers as used for printing reverse dependencies in the help. With this commit, unreadable warnings (most of the reported symbols are false positives) in the real world: $ make ARCH=score allyesconfig scripts/kconfig/conf --allyesconfig Kconfig warning: (HWSPINLOCK_QCOM && AHCI_MTK && STMMAC_PLATFORM && DWMAC_IPQ806X && DWMAC_LPC18XX && DWMAC_OXNAS && DWMAC_ROCKCHIP && DWMAC_SOCFPGA && DWMAC_STI && TI_CPSW && PINCTRL_GEMINI && PINCTRL_OXNAS && PINCTRL_ROCKCHIP && PINCTRL_DOVE && PINCTRL_ARMADA_37XX && PINCTRL_STM32 && S3C2410_WATCHDOG && VIDEO_OMAP3 && VIDEO_S5P_FIMC && USB_XHCI_MTK && RTC_DRV_AT91SAM9 && LPC18XX_DMAMUX && VIDEO_OMAP4 && COMMON_CLK_GEMINI && COMMON_CLK_ASPEED && COMMON_CLK_NXP && COMMON_CLK_OXNAS && COMMON_CLK_BOSTON && QCOM_ADSP_PIL && QCOM_Q6V5_PIL && QCOM_GSBI && ATMEL_EBI && ST_IRQCHIP && RESET_IMX7 && PHY_HI6220_USB && PHY_RALINK_USB && PHY_ROCKCHIP_PCIE && PHY_DA8XX_USB) selects MFD_SYSCON which has unmet direct dependencies (HAS_IOMEM) warning: (PINCTRL_AT91 && PINCTRL_AT91PIO4 && PINCTRL_OXNAS && PINCTRL_PISTACHIO && PINCTRL_PIC32 && PINCTRL_MESON && PINCTRL_NOMADIK && PINCTRL_MTK && PINCTRL_MT7622 && GPIO_TB10X) selects OF_GPIO which has unmet direct dependencies (GPIOLIB && OF && HAS_IOMEM) warning: (FAULT_INJECTION_STACKTRACE_FILTER && LATENCYTOP && LOCKDEP) selects FRAME_POINTER which has unmet direct dependencies (DEBUG_KERNEL && (CRIS || M68K || FRV || UML || SUPERH || BLACKFIN || MN10300 || METAG) || ARCH_WANT_FRAME_POINTERS) will be turned into: $ make ARCH=score allyesconfig scripts/kconfig/conf --allyesconfig Kconfig WARNING: unmet direct dependencies detected for MFD_SYSCON Depends on [n]: HAS_IOMEM [=n] Selected by [y]: - PINCTRL_STM32 [=y] && PINCTRL [=y] && (ARCH_STM32 || COMPILE_TEST [=y]) && OF [=y] - RTC_DRV_AT91SAM9 [=y] && RTC_CLASS [=y] && (ARCH_AT91 || COMPILE_TEST [=y]) - RESET_IMX7 [=y] && RESET_CONTROLLER [=y] - PHY_HI6220_USB [=y] && (ARCH_HISI && ARM64 || COMPILE_TEST [=y]) - PHY_RALINK_USB [=y] && (RALINK || COMPILE_TEST [=y]) - PHY_ROCKCHIP_PCIE [=y] && (ARCH_ROCKCHIP && OF [=y] || COMPILE_TEST [=y]) WARNING: unmet direct dependencies detected for OF_GPIO Depends on [n]: GPIOLIB [=y] && OF [=y] && HAS_IOMEM [=n] Selected by [y]: - PINCTRL_MTK [=y] && PINCTRL [=y] && (ARCH_MEDIATEK || COMPILE_TEST [=y]) && OF [=y] - PINCTRL_MT7622 [=y] && PINCTRL [=y] && (ARCH_MEDIATEK || COMPILE_TEST [=y]) && OF [=y] && (ARM64 || COMPILE_TEST [=y]) WARNING: unmet direct dependencies detected for FRAME_POINTER Depends on [n]: DEBUG_KERNEL [=y] && (CRIS || M68K || FRV || UML || SUPERH || BLACKFIN || MN10300 || METAG) || ARCH_WANT_FRAME_POINTERS [=n] Selected by [y]: - LATENCYTOP [=y] && DEBUG_KERNEL [=y] && STACKTRACE_SUPPORT [=y] && PROC_FS [=y] && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC && !X86 Signed-off-by: Masahiro Yamada Reviewed-by: Petr Vorel scripts/kconfig/expr.c | 42 ------------------------------------------ scripts/kconfig/expr.h | 1 - scripts/kconfig/symbol.c | 35 +++++++++++++++++++++++------------ 3 files changed, 23 insertions(+), 55 deletions(-) commit f622f8279581626170154d77d67e67bcb227ca2f Author: Masahiro Yamada Date: Tue Mar 13 18:56:07 2018 +0900 kconfig: warn unmet direct dependency of tristate symbols selected by y Commit 246cf9c26bf1 ("kbuild: Warn on selecting symbols with unmet direct dependencies") forcibly promoted ->dir_dep.tri to yes from mod. So, the unmet direct dependencies of tristate symbols are not reported. [Test Case] config MODULES def_bool y option modules config A def_bool y select B config B tristate "B" depends on m This causes unmet dependency because 'B' is forced 'y' ignoring 'depends on m'. This should be warned. On the other hand, the following case ('B' is bool) should not be warned, so 'depends on m' for bool symbols should be naturally treated as 'depends on y'. [Test Case2 (not unmet dependency)] config MODULES def_bool y option modules config A def_bool y select B config B bool "B" depends on m Signed-off-by: Masahiro Yamada scripts/kconfig/symbol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e2c75e7667c737148de6cdd522edf2163b4c61d3 Author: Masahiro Yamada Date: Tue Mar 13 18:12:12 2018 +0900 kconfig: tests: test if recursive inclusion is detected If recursive inclusion is detected, it should fail with error messages. Test this. This also tests the line numbers in the error message, fixed by commit 5ae6fcc4bb82 ("kconfig: fix line number in recursive inclusion error message"). Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson scripts/kconfig/tests/err_recursive_inc/Kconfig | 1 + scripts/kconfig/tests/err_recursive_inc/Kconfig.inc1 | 4 ++++ scripts/kconfig/tests/err_recursive_inc/Kconfig.inc2 | 3 +++ scripts/kconfig/tests/err_recursive_inc/Kconfig.inc3 | 1 + scripts/kconfig/tests/err_recursive_inc/__init__.py | 10 ++++++++++ scripts/kconfig/tests/err_recursive_inc/expected_stderr | 5 +++++ 6 files changed, 24 insertions(+) commit 29c434f367ea7b95bea7057105507c05abdc1297 Author: Masahiro Yamada Date: Tue Mar 13 18:12:11 2018 +0900 kconfig: tests: test if recursive dependencies are detected Recursive dependency should be detected and warned. Test this. This indirectly tests the line number increments. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson scripts/kconfig/tests/warn_recursive_dep/Kconfig | 62 ++++++++++++++++++++++ .../kconfig/tests/warn_recursive_dep/__init__.py | 9 ++++ .../tests/warn_recursive_dep/expected_stderr | 30 +++++++++++ 3 files changed, 101 insertions(+) commit 3e4888c2e3d77d70edb905364cd70059a52a1343 Author: Masahiro Yamada Date: Tue Mar 13 18:12:10 2018 +0900 kconfig: tests: test randconfig for choice in choice Commit 3b9a19e08960 ("kconfig: loop as long as we changed some symbols in randconfig") fixed randconfig where a choice contains a sub-choice. Prior to that commit, the sub-choice values were not set. I am not sure whether this is an intended feature or just something people discovered works, but it is used in the real world; drivers/usb/gadget/legacy/Kconfig is source'd in a choice context, then creates a sub-choice in it. For the test case in this commit, there are 3 possible results. Case 1: CONFIG_A=y # CONFIG_B is not set Case 2: # CONFIG_A is not set CONFIG_B=y CONFIG_C=y # CONFIG_D is not set Case 3: # CONFIG_A is not set CONFIG_B=y # CONFIG_C is not set CONFIG_D=y CONFIG_E=y So, this test iterates several times, and checks if the result is either of the three. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson scripts/kconfig/tests/rand_nested_choice/Kconfig | 33 ++++++++++++++++++++++ .../kconfig/tests/rand_nested_choice/__init__.py | 16 +++++++++++ .../tests/rand_nested_choice/expected_stdout0 | 2 ++ .../tests/rand_nested_choice/expected_stdout1 | 4 +++ .../tests/rand_nested_choice/expected_stdout2 | 5 ++++ 5 files changed, 60 insertions(+) commit beaaddb625400e4a561d2d8443f9df2aa3f9a899 Author: Masahiro Yamada Date: Tue Mar 13 18:12:09 2018 +0900 kconfig: tests: test defconfig when two choices interact Commit fbe98bb9ed3d ("kconfig: Fix defconfig when one choice menu selects options that another choice menu depends on") fixed defconfig when two choices interact (i.e. calculating the visibility of a choice requires to calculate another choice). The test code in that commit log was based on the real world example, and complicated. So, I shrunk it down to the following: defconfig.choice: ---8<--- CONFIG_CHOICE_VAL0=y ---8<--- ---8<--- config MODULES def_bool y option modules choice prompt "Choice" config CHOICE_VAL0 tristate "Choice 0" config CHOICE_VAL1 tristate "Choice 1" endchoice choice prompt "Another choice" depends on CHOICE_VAL0 config DUMMY bool "dummy" endchoice ---8<--- Prior to commit fbe98bb9ed3d, $ scripts/kconfig/conf --defconfig=defconfig.choice Kconfig.choice resulted in: CONFIG_MODULES=y CONFIG_CHOICE_VAL0=m # CONFIG_CHOICE_VAL1 is not set CONFIG_DUMMY=y where the expected result would be: CONFIG_MODULES=y CONFIG_CHOICE_VAL0=y # CONFIG_CHOICE_VAL1 is not set CONFIG_DUMMY=y Roughly, this weird behavior happened like this: Symbols are calculated a couple of times. First, all symbols are calculated in conf_read(). The first 'choice' is evaluated to 'y' due to the SYMBOL_DEF_USER flag, but sym_calc_choice() clears it unless all of its choice values are explicitly set by the user. conf_set_all_new_symbols() clears all SYMBOL_VALID flags. Then, only choices are calculated. Here, the SYMBOL_DEF_USER for the first choice has been forgotten, so it is evaluated to 'm'. set_all_choice_values() sets SYMBOL_DEF_USER again to choice symbols. When calculating the second choice, due to 'depends on CHOICE_VAL0', it triggers the calculation of CHOICE_VAL0. As a result, SYMBOL_VALID is set for CHOICE_VAL0. Symbols except choices get the final chance of re-calculation in conf_write(). In a normal case, CHOICE_VAL0 would be re-calculated, then the first choice would be indirectly re-calculated with the SYMBOL_DEF_USER which has been recalled by set_all_choice_values(), which would be evaluated to 'y'. But, in this case, CHOICE_VAL0 has already been marked as SYMBOL_VALID, so this re-calculation does not happen. Then, =m from the conf_set_all_new_symbols() phase is written out to the .config file. Add a unit test for this naive case. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson scripts/kconfig/tests/inter_choice/Kconfig | 23 ++++++++++++++++++++++ scripts/kconfig/tests/inter_choice/__init__.py | 14 +++++++++++++ scripts/kconfig/tests/inter_choice/defconfig | 1 + scripts/kconfig/tests/inter_choice/expected_config | 4 ++++ 4 files changed, 42 insertions(+) commit ee236610653ede74c91f4c35f731047f5b76d667 Author: Masahiro Yamada Date: Tue Mar 13 18:12:08 2018 +0900 kconfig: tests: check visibility of tristate choice values in y choice If tristate choice values depend on symbols set to 'm', they should be hidden when the choice containing them is changed from 'm' to 'y' (i.e. exclusive choice). This issue was fixed by commit fa64e5f6a35e ("kconfig/symbol.c: handle choice_values that depend on 'm' symbols"). Add a test case to avoid regression. For the input in this unit test, there is a room for argument if "# CONFIG_CHOICE1 is not set" should be written to the .config file. After commit fa64e5f6a35e, this line was written to the .config file. With commit cb67ab2cd2b8 ("kconfig: do not write choice values when their dependency becomes n"), it is not written now. In this test, "# CONFIG_CHOICE1 is not set" is don't care. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson scripts/kconfig/tests/choice_value_with_m_dep/Kconfig | 19 +++++++++++++++++++ .../kconfig/tests/choice_value_with_m_dep/__init__.py | 15 +++++++++++++++ scripts/kconfig/tests/choice_value_with_m_dep/config | 2 ++ .../tests/choice_value_with_m_dep/expected_config | 3 +++ .../tests/choice_value_with_m_dep/expected_stdout | 4 ++++ 5 files changed, 43 insertions(+) commit 930c429a656fdba0c7f76b9a36ec2698f946e8e3 Author: Masahiro Yamada Date: Tue Mar 13 18:12:07 2018 +0900 kconfig: tests: check unneeded "is not set" with unmet dependency Commit cb67ab2cd2b8 ("kconfig: do not write choice values when their dependency becomes n") fixed a problem where "# CONFIG_... is not set" for choice values are wrongly written into the .config file when they are once visible, then become invisible later. Add a test for this naive case. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson scripts/kconfig/tests/no_write_if_dep_unmet/Kconfig | 14 ++++++++++++++ .../kconfig/tests/no_write_if_dep_unmet/__init__.py | 19 +++++++++++++++++++ scripts/kconfig/tests/no_write_if_dep_unmet/config | 1 + .../tests/no_write_if_dep_unmet/expected_config | 5 +++++ 4 files changed, 39 insertions(+) commit b76960c0f6b25d447a1493c4388defb9e8e76c63 Author: Masahiro Yamada Date: Tue Mar 13 18:12:06 2018 +0900 kconfig: tests: test if new symbols in choice are asked If new choice values are added with new dependency, and they become visible during user configuration, oldconfig should recognize them as (NEW), and ask the user for choice. This issue was fixed by commit 5d09598d488f ("kconfig: fix new choices being skipped upon config update"). This is a subtle corner case. Add a test case to avoid breakage. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson scripts/kconfig/tests/new_choice_with_dep/Kconfig | 37 ++++++++++++++++++++++ .../kconfig/tests/new_choice_with_dep/__init__.py | 14 ++++++++ scripts/kconfig/tests/new_choice_with_dep/config | 3 ++ .../tests/new_choice_with_dep/expected_stdout | 10 ++++++ 4 files changed, 64 insertions(+) commit 49ac3c0c3aa3b7636961b72a40ddb03e6609f594 Author: Masahiro Yamada Date: Tue Mar 13 18:12:05 2018 +0900 kconfig: tests: test automatic submenu creation If a symbols has dependency on the preceding symbol, the menu entry should become the submenu of the preceding one, and displayed with deeper indentation. This is done by restructuring the menu tree in menu_finalize(). It is a bit complicated computation, so let's add a test case. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson scripts/kconfig/tests/auto_submenu/Kconfig | 50 ++++++++++++++++++++++ scripts/kconfig/tests/auto_submenu/__init__.py | 12 ++++++ scripts/kconfig/tests/auto_submenu/expected_stdout | 10 +++++ 3 files changed, 72 insertions(+) commit 1903c511905984685e0a299421bc4c8b6fc1344b Author: Masahiro Yamada Date: Tue Mar 13 18:12:04 2018 +0900 kconfig: tests: add basic choice tests The calculation of 'choice' is a bit complicated part in Kconfig. The behavior of 'y' choice is intuitive. If choice values are tristate, the choice can be 'm' where each value can be enabled independently. Also, if a choice is marked as 'optional', the whole choice can be invisible. Test basic functionality of choice. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson scripts/kconfig/tests/choice/Kconfig | 54 ++++++++++++++++++++++ scripts/kconfig/tests/choice/__init__.py | 40 ++++++++++++++++ .../kconfig/tests/choice/alldef_expected_config | 5 ++ .../kconfig/tests/choice/allmod_expected_config | 9 ++++ scripts/kconfig/tests/choice/allno_expected_config | 5 ++ .../kconfig/tests/choice/allyes_expected_config | 9 ++++ .../kconfig/tests/choice/oldask0_expected_stdout | 10 ++++ scripts/kconfig/tests/choice/oldask1_config | 2 + .../kconfig/tests/choice/oldask1_expected_stdout | 15 ++++++ 9 files changed, 149 insertions(+) commit 022a4bf6b59dfdb192ca8aef291c7346f984e511 Author: Masahiro Yamada Date: Tue Mar 13 18:12:03 2018 +0900 kconfig: tests: add framework for Kconfig unit testing Many parts in Kconfig are so cryptic and need refactoring. However, its complexity prevents us from moving forward. There are several naive corner cases where it is difficult to notice breakage. If those are covered by unit tests, we will be able to touch the code with more confidence. Here is a simple test framework based on pytest. The conftest.py provides a fixture useful to run commands such as 'oldaskconfig' etc. and to compare the resulted .config, stdout, stderr with expectations. How to add test cases? ---------------------- For each test case, you should create a subdirectory under scripts/kconfig/tests/ (so test cases are separated from each other). Every test case directory should contain the following files: - __init__.py: describes test functions - Kconfig: the top level Kconfig file for the test To do a useful job, test cases generally need additional data like input .config and information about expected results. How to run tests? ----------------- You need python3 and pytest. Then, run "make testconfig". O= option is supported. If V=1 is given, detailed logs captured during tests are displayed. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson scripts/kconfig/Makefile | 8 ++ scripts/kconfig/tests/conftest.py | 291 ++++++++++++++++++++++++++++++++++++++ scripts/kconfig/tests/pytest.ini | 7 + 3 files changed, 306 insertions(+) commit e9781b52d4e0e3381351d3483cfd173a968dcbe6 Author: Masahiro Yamada Date: Tue Mar 13 18:12:02 2018 +0900 kbuild: add PYTHON2 and PYTHON3 variables The variable 'PYTHON' allows users to specify a proper executable name in case the default 'python' does not work. However, this does not address the case where both Python 2.x and 3.x scripts are used in one source tree. PEP 394 (https://www.python.org/dev/peps/pep-0394/) provides a convention for Python scripts portability. Here is a quotation: In order to tolerate differences across platforms, all new code that needs to invoke the Python interpreter should not specify 'python', but rather should specify either 'python2' or 'python3'. This distinction should be made in shebangs, when invoking from a shell script, when invoking via the system() call, or when invoking in any other context. One exception to this is scripts that are deliberately written to be source compatible with both Python 2.x and 3.x. Such scripts may continue to use python on their shebang line without affecting their portability. To meet this requirement, this commit adds new variables 'PYTHON2' and 'PYTHON3'. arch/ia64/scripts/unwcheck.py is the only script that has ever used $(PYTHON). Recent commit bd5edbe67794 ("ia64: convert unwcheck.py to python3") converted it to be compatible with both Python 2.x and 3.x, so this is the exceptional case where the use of 'python' is allowed. So, I did not touch arch/ia64/Makefile. tools/perf/Makefile.config sets PYTHON and PYTHON2 by itself, so it is not affected by this commit. Signed-off-by: Masahiro Yamada Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2a61625835c7c89c5f00de458a213d59ac54db21 Author: Ulf Magnusson Date: Thu Mar 1 12:18:01 2018 +0100 kconfig: remove redundant streamline_config.pl prerequisite The local{yes,mod}config targets currently have streamline_config.pl as a prerequisite. This is redundant, because streamline_config.pl is a checked-in file with no prerequisites. Remove the prerequisite and reference streamline_config.pl directly in the recipe of the rule instead. Signed-off-by: Ulf Magnusson Signed-off-by: Masahiro Yamada scripts/kconfig/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 911a91c39cabcb6adb2a78f4f9777abb4c032b75 Author: Masahiro Yamada Date: Thu Mar 1 15:34:37 2018 +0900 kconfig: rename silentoldconfig to syncconfig As commit cedd55d49dee ("kconfig: Remove silentoldconfig from help and docs; fix kconfig/conf's help") mentioned, 'silentoldconfig' is a historical misnomer. That commit removed it from help and docs since it is an internal interface. If so, it should be allowed to rename it to something more intuitive. 'syncconfig' is the one I came up with because it updates the .config if necessary, then synchronize include/generated/autoconf.h and include/config/* with it. You should not manually invoke 'silentoldcofig'. Display warning if used in case existing scripts are doing wrong. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson Documentation/kbuild/kconfig.txt | 2 +- Documentation/networking/i40e.txt | 2 +- Makefile | 2 +- scripts/kconfig/Makefile | 13 ++++++++++--- scripts/kconfig/conf.c | 20 ++++++++++---------- 5 files changed, 23 insertions(+), 16 deletions(-) commit 81d2bc2273052e49c46a791f45aeb09802d76b93 Author: Masahiro Yamada Date: Thu Mar 1 15:34:36 2018 +0900 kconfig: invoke oldconfig instead of silentoldconfig from local*config The purpose of local{yes,mod}config is to arrange the .config file based on actually loaded modules. It is unnecessary to update include/generated/autoconf.h and include/config/* stuff here. They will be updated as needed during the build. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson scripts/kconfig/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2aad9b896213860bd169ebb3ae70caf82d471f3f Author: Masahiro Yamada Date: Wed Feb 28 09:15:24 2018 +0900 kconfig: hide irrelevant sub-menus for oldconfig Historically, "make oldconfig" has changed its behavior several times, quieter or louder. (I attached the history below.) Currently, it is not as quiet as it should be. This commit addresses it. Test Case --------- ---------------------------(Kconfig)---------------------------- menu "menu" config FOO bool "foo" menu "sub menu" config BAR bool "bar" endmenu endmenu menu "sibling menu" config BAZ bool "baz" endmenu ---------------------------------------------------------------- ---------------------------(.config)---------------------------- CONFIG_BAR=y CONFIG_BAZ=y ---------------------------------------------------------------- With the Kconfig and .config above, "make silentoldconfig" and "make oldconfig" work differently, like follows: $ make silentoldconfig scripts/kconfig/conf --silentoldconfig Kconfig * * Restart config... * * * menu * foo (FOO) [N/y/?] (NEW) y # # configuration written to .config # $ make oldconfig scripts/kconfig/conf --oldconfig Kconfig * * Restart config... * * * menu * foo (FOO) [N/y/?] (NEW) y * * sub menu * bar (BAR) [Y/n/?] y # # configuration written to .config # Both hide "sibling node" since it is irrelevant. The difference is that silentoldconfig hides "sub menu" whereas oldconfig does not. The behavior of silentoldconfig is preferred since the "sub menu" does not contain any new symbol. The root cause is in conf(). There are three input modes that can call conf(); oldaskconfig, oldconfig, and silentoldconfig. Everytime conf() encounters a menu entry, it calls check_conf() to check if it contains new symbols. If no new symbol is found, the menu is just skipped. Currently, this happens only when input_mode == silentoldconfig. The oldaskconfig enters into the check_conf() loop as silentoldconfig, so oldaskconfig works likewise for the second loop or later, but it never happens for oldconfig. So, irrelevant sub-menus are shown for oldconfig. Change the test condition to "input_mode != oldaskconfig". This is false only for the first loop of oldaskconfig; it must ask the user all symbols, so no need to call check_conf(). History of oldconfig -------------------- [0] Originally, "make oldconfig" was as loud as "make config" (It showed the entire .config file) [1] Commit cd9140e1e73a ("kconfig: make oldconfig is now less chatty") made oldconfig quieter, but it was still less quieter than silentoldconfig. (oldconfig did not hide sub-menus) [2] Commit 204c96f60904 ("kconfig: fix silentoldconfig") changed the input_mode of oldconfig to "ask_silent" from "ask_new". So, oldconfig really became as quiet as silentoldconfig. (oldconfig hided irrelevant sub-menus) [3] Commit 4062f1a4c030 ("kconfig: use long options in conf") made oldconfig as loud as [0] due to misconversion. [4] Commit 14828349719a ("kconfig: fix make oldconfig") addressed the misconversion of [3], but it made oldconfig quieter only to the same level as [1], not [2]. This commit is restoring the behavior of [2]. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson scripts/kconfig/conf.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 99f0b6578bab440586befe2cdb6db8e38fec3acd Author: Masahiro Yamada Date: Wed Feb 28 09:15:23 2018 +0900 kconfig: remove redundant input_mode test for check_conf() loop check_conf() never increments conf_cnt for listnewconfig, so conf_cnt is always zero. In other words, conf_cnt is not zero, "input_mode != listnewconfig" is met. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson scripts/kconfig/conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bb3a5b085cd6f98aad10be9bd87532ff26ae086 Author: Masahiro Yamada Date: Wed Feb 28 09:15:22 2018 +0900 kconfig: remove unneeded input_mode test in conf() conf() is never called for listnewconfig / olddefconfig. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson scripts/kconfig/conf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 59a80b5e892ddee09139f7d7942effdf1ca532e4 Author: Masahiro Yamada Date: Wed Feb 28 09:15:21 2018 +0900 kconfig: do not call check_conf() for olddefconfig check_conf() traverses the menu tree, but it is completely no-op for olddefconfig because the following if-else block does nothing. if (input_mode == listnewconfig) { ... } else if (input_mode != olddefconfig) { ... } As the help message says, olddefconfig automatically sets new symbols to their default value. There is no room for manual intervention. So, calling check_conf() for olddefconfig is odd in the first place. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson scripts/kconfig/conf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f467c5640c29ad258c3cd8186a776c82fc3b8057 Author: Ulf Magnusson Date: Fri Feb 23 12:49:01 2018 +0100 kconfig: only write '# CONFIG_FOO is not set' for visible symbols === Background === - Visible n-valued bool/tristate symbols generate a '# CONFIG_FOO is not set' line in the .config file. The idea is to remember the user selection without having to set a Makefile variable. Having n correspond to the variable being undefined in the Makefiles makes for easy CONFIG_* tests. - Invisible n-valued bool/tristate symbols normally do not generate a '# CONFIG_FOO is not set' line, because user values from .config files have no effect on invisible symbols anyway. Currently, there is one exception to this rule: Any bool/tristate symbol that gets the value n through a 'default' property generates a '# CONFIG_FOO is not set' line, even if the symbol is invisible. Note that this only applies to explicitly given defaults, and not when the symbol implicitly defaults to n (like bool/tristate symbols without 'default' properties do). This is inconsistent, and seems redundant: - As mentioned, the '# CONFIG_FOO is not set' won't affect the symbol once the .config is read back in. - Even if the symbol is invisible at first but becomes visible later, there shouldn't be any harm in recalculating the default value rather than viewing the '# CONFIG_FOO is not set' as a previous user value of n. === Changes === Change sym_calc_value() to only set SYMBOL_WRITE (write to .config) for non-n-valued 'default' properties. Note that SYMBOL_WRITE is always set for visible symbols regardless of whether they have 'default' properties or not, so this change only affects invisible symbols. This reduces the size of the x86 .config on my system by about 1% (due to removed '# CONFIG_FOO is not set' entries). One side effect of (and the main motivation for) this change is making the following two definitions behave exactly the same: config FOO bool config FOO bool default n With this change, neither of these will generate a '# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied). That might make it clearer to people that a bare 'default n' is redundant. This change only affects generated .config files and not autoconf.h: autoconf.h only includes #defines for non-n bool/tristate symbols. === Testing === The following testing was done with the x86 Kconfigs: - .config files generated before and after the change were compared to verify that the only difference is some '# CONFIG_FOO is not set' entries disappearing. A couple of these were inspected manually, and most turned out to be from redundant 'default n/def_bool n' properties. - The generated include/generated/autoconf.h was compared before and after the change and verified to be identical. - As a sanity check, the same modification was done to Kconfiglib. The Kconfiglib test suite was then run to check for any mismatches against the output of the C implementation. Signed-off-by: Ulf Magnusson Signed-off-by: Masahiro Yamada scripts/kconfig/symbol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d9119b5925a03b9a3191fa3e93b4091651d8ad25 Author: Eugeniu Rosca Date: Sat Feb 24 16:24:18 2018 +0100 kconfig: Print reverse dependencies in groups Surprisingly or not, disabling a CONFIG option (which is assumed to be unneeded) may be not so trivial. Especially it is not trivial, when this CONFIG option is selected by a dozen of other configs. Before the moment commit 1ccb27143360 ("kconfig: make "Selected by:" and "Implied by:" readable") popped up in v4.16-rc1, it was an absolute pain to break down the "Selected by" reverse dependency expression in order to identify all those configs which select (IOW *do not allow disabling*) a certain feature (assumed to be not needed). This patch tries to make one step further by putting at users' fingertips the revdep top level OR sub-expressions grouped/clustered by the tristate value they evaluate to. This should allow the users to directly concentrate on and tackle the _active_ reverse dependencies. To give some numbers and quantify the complexity of certain reverse dependencies, assuming commit 617aebe6a97e ("Merge tag 'usercopy-v4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux"), ARCH=arm64 and vanilla arm64 defconfig, here is the top 10 CONFIG options with the highest amount of top level "||" sub-expressions/tokens that make up the final "Selected by" reverse dependency expression. | Config | All revdep | Active revdep | |-------------------|------------|---------------| | REGMAP_I2C | 212 | 9 | | CRC32 | 167 | 25 | | FW_LOADER | 128 | 5 | | MFD_CORE | 124 | 9 | | FB_CFB_IMAGEBLIT | 114 | 2 | | FB_CFB_COPYAREA | 111 | 2 | | FB_CFB_FILLRECT | 110 | 2 | | SND_PCM | 103 | 2 | | CRYPTO_HASH | 87 | 19 | | WATCHDOG_CORE | 86 | 6 | The story behind the above is that users need to visually review/evaluate 212 expressions which *potentially* select REGMAP_I2C in order to identify the expressions which *actually* select REGMAP_I2C, for a particular ARCH and for a particular defconfig used. To make this experience smoother, change the way reverse dependencies are displayed to the user from [1] to [2]. [1] Old representation of DMA_ENGINE_RAID: Selected by: - AMCC_PPC440SPE_ADMA [=n] && DMADEVICES [=y] && (440SPe || 440SP) - BCM_SBA_RAID [=m] && DMADEVICES [=y] && (ARM64 [=y] || ... - FSL_RAID [=n] && DMADEVICES [=y] && FSL_SOC && ... - INTEL_IOATDMA [=n] && DMADEVICES [=y] && PCI [=y] && X86_64 - MV_XOR [=n] && DMADEVICES [=y] && (PLAT_ORION || ARCH_MVEBU [=y] ... - MV_XOR_V2 [=y] && DMADEVICES [=y] && ARM64 [=y] - XGENE_DMA [=n] && DMADEVICES [=y] && (ARCH_XGENE [=y] || ... - DMATEST [=n] && DMADEVICES [=y] && DMA_ENGINE [=y] [2] New representation of DMA_ENGINE_RAID: Selected by [y]: - MV_XOR_V2 [=y] && DMADEVICES [=y] && ARM64 [=y] Selected by [m]: - BCM_SBA_RAID [=m] && DMADEVICES [=y] && (ARM64 [=y] || ... Selected by [n]: - AMCC_PPC440SPE_ADMA [=n] && DMADEVICES [=y] && (440SPe || ... - FSL_RAID [=n] && DMADEVICES [=y] && FSL_SOC && ... - INTEL_IOATDMA [=n] && DMADEVICES [=y] && PCI [=y] && X86_64 - MV_XOR [=n] && DMADEVICES [=y] && (PLAT_ORION || ARCH_MVEBU [=y] ... - XGENE_DMA [=n] && DMADEVICES [=y] && (ARCH_XGENE [=y] || ... - DMATEST [=n] && DMADEVICES [=y] && DMA_ENGINE [=y] Suggested-by: Masahiro Yamada Signed-off-by: Eugeniu Rosca Reviewed-by: Petr Vorel Reviewed-by: Ulf Magnusson Signed-off-by: Masahiro Yamada scripts/kconfig/expr.c | 18 ++++++++++++------ scripts/kconfig/expr.h | 3 ++- scripts/kconfig/menu.c | 12 ++++++------ 3 files changed, 20 insertions(+), 13 deletions(-) commit 9a47ceec543bfb703fbe2f8d584850b582caf1a6 Author: Masahiro Yamada Date: Tue Feb 20 17:18:47 2018 +0900 kconfig: clean-up reverse dependency help implementation This commit splits out the special E_OR handling ('-' instead of '||') into a dedicated helper expr_print_revdev(). Restore the original expr_print() prior to commit 1ccb27143360 ("kconfig: make "Selected by:" and "Implied by:" readable"). This makes sense because: - We need to chop those expressions only when printing the reverse dependency, and only when E_OR is encountered - Otherwise, it should be printed as before, so fall back to expr_print() This also improves the behavior; for a single line, it was previously displayed in the same line as "Selected by", like this: Selected by: A [=n] && B [=n] This will be displayed in a new line, consistently: Selected by: - A [=n] && B [=n] Signed-off-by: Masahiro Yamada Reviewed-by: Petr Vorel scripts/kconfig/expr.c | 36 +++++++++++++++++++++--------------- scripts/kconfig/menu.c | 4 ++-- 2 files changed, 23 insertions(+), 17 deletions(-) commit 84af7a6194e493fae312a2b7fa5a3b51f76d9282 Author: Ulf Magnusson Date: Fri Feb 16 21:22:55 2018 +0100 checkpatch: kconfig: prefer 'help' over '---help---' IMO, we should discourage '---help---' for new help texts, even in cases where it would be consistent with other help texts in the file. This will help if we ever want to get rid of '---help---' in the future. Also simplify the code to only check for exactly '---help---'. Since commit c2264564df3d ("kconfig: warn of unhandled characters in Kconfig commands"), '---help---' is a proper keyword and can only appear in that form. Prior to that commit, '---help---' working was more of a syntactic quirk. Signed-off-by: Ulf Magnusson Signed-off-by: Masahiro Yamada scripts/checkpatch.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 678ae162dd2fdda97879680426029dffc3e96041 Author: Ulf Magnusson Date: Fri Feb 16 21:22:54 2018 +0100 checkpatch: kconfig: check help texts for menuconfig and choice Currently, only Kconfig symbols are checked for a missing or short help text, and are only checked if they are defined with the 'config' keyword. To make the check more general, extend it to also check help texts for choices and for symbols defined with the 'menuconfig' keyword. This increases the accuracy of the check for symbols that would already have been checked as well, since e.g. a 'menuconfig' symbol after a help text will be recognized as ending the preceding symbol/choice definition. To increase the accuracy of the check further, also recognize 'if', 'endif', 'menu', 'endmenu', 'endchoice', and 'source' as ending a symbol/choice definition. Signed-off-by: Ulf Magnusson Signed-off-by: Masahiro Yamada scripts/checkpatch.pl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 86adf1a07e896f19a799abe65e3f4a1a26ac142e Author: Ulf Magnusson Date: Fri Feb 16 21:22:53 2018 +0100 checkpatch: kconfig: recognize more prompts when checking help texts The check for a missing or short help text only considers symbols with a prompt, but doesn't recognize any of the following as a prompt: bool 'foo' tristate 'foo' prompt "foo" prompt 'foo' Make the check recognize those too. Signed-off-by: Ulf Magnusson Signed-off-by: Masahiro Yamada scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 127668cf766d0ede207457f9f5f26f5e40ce4127 Author: Masahiro Yamada Date: Mon Mar 19 20:26:13 2018 +0900 kbuild: clean up link rule of composite modules cmd_link_multi-link is used only for cmd_link_multi-m. Signed-off-by: Masahiro Yamada scripts/Makefile.build | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5e18f0290f2eccb0f64e87fbfca6395f11985b4b Author: Masahiro Yamada Date: Mon Mar 19 20:26:12 2018 +0900 kbuild: clean up archive rule of built-in.a With the incremental linking entirely dropped, we can simplify the Makefile. While I am here, I renamed cmd_link_o_target to cmd_ar_builtin. Signed-off-by: Masahiro Yamada scripts/Makefile.build | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 7657f60e8ffad587fabc74873b5f42083a60c3cf Author: Masahiro Yamada Date: Mon Mar 19 20:26:11 2018 +0900 kbuild: remove partial section mismatch detection for built-in.a When built-in.o was incrementally linked with 'ld -r', the section mismatch analysis for the individual built-in.o was possible when CONFIG_DEBUG_SECTION_MISMATCH was enabled. With the migration to the thin archive, built-in.a (former, built-in.o) is no longer an ELF file. So, the modpost does nothing useful. scripts/mod/modpost.c just checks the header to bail out, as follows: /* Is this a valid ELF file? */ if ((hdr->e_ident[EI_MAG0] != ELFMAG0) || (hdr->e_ident[EI_MAG1] != ELFMAG1) || (hdr->e_ident[EI_MAG2] != ELFMAG2) || (hdr->e_ident[EI_MAG3] != ELFMAG3)) { /* Not an ELF file - silently ignore it */ return 0; } We have the full analysis in the final link stage anyway, so we would not miss the section mismatching. I do not see a good reason to require extra linking only for the purpose of the per-directory analysis. Just get rid of this part. Signed-off-by: Masahiro Yamada scripts/Makefile.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f605005a50fc1443a14b4e8c9c1727881f8f96ae Author: Masahiro Yamada Date: Mon Mar 19 20:26:10 2018 +0900 net: liquidio: clean up Makefile for simpler composite object handling Now, Kbuild nicely handles composite objects to avoid multiple definition. Makefiles can simply add the same objects multiple times across composite objects. Signed-off-by: Masahiro Yamada drivers/net/ethernet/cavium/liquidio/Makefile | 51 +++++++++------------------ 1 file changed, 16 insertions(+), 35 deletions(-) commit dc35da16a2e23db04822f0129cd5b28b7b0e72b4 Author: Masahiro Yamada Date: Mon Mar 19 20:26:09 2018 +0900 lib: zstd: clean up Makefile for simpler composite object handling Now, Kbuild nicely handles composite objects to avoid multiple definition. Makefiles can simply add the same objects multiple times across composite objects. Signed-off-by: Masahiro Yamada lib/zstd/Makefile | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit f98fe47ce51dee6d97dd91bbeccdde23f043c754 Author: Masahiro Yamada Date: Mon Mar 19 20:26:08 2018 +0900 kbuild: link $(real-obj-y) instead of $(obj-y) into built-in.a In Kbuild, Makefiles can add the same object to obj-y multiple times. So, obj-y += foo.o obj-y += foo.o is fine. However, this is not true when the same object is added multiple times via composite objects. For example, obj-y += foo.o bar.o foo-objs := foo-bar-common.o foo-only.o bar-objs := foo-bar-common.o bar-only.o causes build error because two instances of foo-bar-common.o are linked into the vmlinux. Makefiles tend to invent ugly work-around, for example - lib/zstd/Makefile - drivers/net/ethernet/cavium/liquidio/Makefile The technique used in Kbuild to avoid the multiple definition error is to use $(filter $(obj-y), $^). Here, $^ lists the names of all the prerequisites with duplicated names removed. By replacing it with $(filter $(real-obj-y), $^) we can do likewise for composite objects. For built-in objects, we do not need to keep the composite object structure. We can simply expand them, and link $(real-obj-y) to built-in.a. Signed-off-by: Masahiro Yamada scripts/Makefile.build | 21 +++++++-------------- scripts/Makefile.lib | 7 +++---- 2 files changed, 10 insertions(+), 18 deletions(-) commit f5f336812c233976ad84995110c2266cd94c5cd0 Author: Masahiro Yamada Date: Mon Mar 19 20:26:07 2018 +0900 kbuild: rename real-objs-y/m to real-obj-y/m When I was refactoring Makefiles, I stupidly mistook 'real-obj-y' for 'real-objs-y' over and over again. Finally, I decide to rename it to 'real-obj-y'. This is consistent with 'obj-y', 'subdir-obj-y'. Signed-off-by: Masahiro Yamada scripts/Makefile.build | 24 ++++++++++++------------ scripts/Makefile.lib | 8 ++++---- 2 files changed, 16 insertions(+), 16 deletions(-) commit c0152e9a6b4484b44e77e0cc49c6c3b2e3417782 Author: Masahiro Yamada Date: Mon Mar 19 18:01:27 2018 +0900 kbuild: move modname and modname-multi close to modname_flags Just a cosmetic change to put related code close together. Signed-off-by: Masahiro Yamada Reviewed-by: Cao jin scripts/Makefile.build | 2 -- scripts/Makefile.lib | 14 ++++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) commit fe852ac200311bcbbb0a8c84096e4cd44ea623d9 Author: Masahiro Yamada Date: Mon Mar 19 18:01:26 2018 +0900 kbuild: simplify modname calculation modname can be calculated much more simply. If modname-multi is empty, it is a single-used object. So, modname = $(basetarget). Otherwise, modname = $(modname-multi). Signed-off-by: Masahiro Yamada Reviewed-by: Cao jin scripts/Makefile.build | 12 +----------- scripts/Makefile.lib | 7 ------- 2 files changed, 1 insertion(+), 18 deletions(-) commit c96a294eb6972742ed9d55f8d4afa7e0051c0942 Author: Cao jin Date: Mon Mar 19 18:01:25 2018 +0900 kbuild: fix modname for composite modules Commit cf4f21938e13 ("kbuild: Allow to specify composite modules with modname-m") added modname-m support, but missed to update the corresponding multi-objs-m & modname-multi definition. Signed-off-by: Cao jin Signed-off-by: Masahiro Yamada scripts/Makefile.lib | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aeacb019b61c4ea7689085574bd03d2c0810f119 Author: Masahiro Yamada Date: Mon Mar 19 18:01:24 2018 +0900 kbuild: define KBUILD_MODNAME even if multiple modules share objects Currently, KBUILD_MODNAME is defined only when $(modname) contains just one word. If an object is shared among multiple modules, undefined KBUILD_MODNAME could cause a build error. For example, if CONFIG_DYNAMIC_DEBUG is enabled, any call of printk() populates .modname, then fails to build due to undefined KBUILD_MODNAME. Take the following code as an example: obj-m += foo.o obj-m += bar.o foo-objs := foo-bar-common.o foo-only.o bar-objs := foo-bar-common.o bar-only.o In this case, there is room for argument what to define for KBUILD_MODNAME when foo-bar-common.o is being compiled. "foo", "bar", or what else? One idea is to define colon-separated modules that share the object, in this case, "bar:foo" (modules are sorted alphabetically by $(sort ...)). Signed-off-by: Masahiro Yamada Reviewed-by: Cao jin scripts/Makefile.lib | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 8cd0e46d3f0ce730a5c7d1e9e75765b24b72013a Author: Masahiro Yamada Date: Mon Mar 19 18:01:23 2018 +0900 kbuild: remove unnecessary $(subst $(obj)/, , ...) in modname-multi In the context ... $(obj)/%.s: $(src)/%.c FORCE $(call if_changed_dep,cc_s_c) $(obj)/%.i: $(src)/%.c FORCE $(call if_changed_dep,cpp_i_c) $(obj)/%.o: $(src)/%.c $(recordmcount_source) $(objtool_dep) FORCE $(call cmd,force_checksrc) $(call if_changed_rule,cc_o_c) $(obj)/%.lst: $(src)/%.c FORCE $(call if_changed_dep,cc_lst_c) '$*' returns the stem of the target (the part of '%'), so $(obj)/ has already been ripped off. $(subst $(obj)/,,$*.o) is the same as $*.o Signed-off-by: Masahiro Yamada Reviewed-by: Cao jin scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a670b0b4aed129dc11b465c1c330bfe9202023e5 Author: Michael Forney Date: Sun Mar 18 17:54:02 2018 -0700 kbuild: Use ls(1) instead of stat(1) to obtain file size stat(1) is not standardized and different implementations have their own (conflicting) flags for querying the size of a file. ls(1) provides the same information (value of st.st_size) in the 5th column, except when the file is a character or block device. This output is standardized[0]. The -n option turns on -l, which writes lines formatted like "%s %u %s %s %u %s %s\n", , , , , , , but instead of writing the and , it writes the numeric owner and group IDs (this avoids /etc/passwd and /etc/group lookups as well as potential field splitting issues). The field is specified as "the value that would be returned for the file in the st_size field of struct stat". To avoid duplicating logic in several locations in the tree, create scripts/file-size.sh and update callers to use that instead of stat(1). [0] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ls.html#tag_20_73_10 Signed-off-by: Michael Forney Signed-off-by: Masahiro Yamada arch/arm/boot/deflate_xip_data.sh | 2 +- arch/powerpc/boot/wrapper | 2 +- scripts/Makefile.lib | 2 +- scripts/file-size.sh | 4 ++++ scripts/link-vmlinux.sh | 4 ++-- 5 files changed, 9 insertions(+), 5 deletions(-) commit 3fdc7d3fe4c04bab0305838cf662ae30051cc192 Author: Masahiro Yamada Date: Fri Mar 16 16:37:15 2018 +0900 kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS If CONFIG_TRIM_UNUSED_KSYMS is enabled and the kernel is built from a pristine state, the vmlinux is linked twice. [1] A user runs 'make' [2] First build with empty autoksyms.h [3] adjust_autoksyms.sh updates autoksyms.h and recurses 'make vmlinux' --------(begin sub-make)-------- [4] Second build with new autoksyms.h [5] link-vmlinux.sh is invoked because vmlinux is missing ---------(end sub-make)--------- [6] link-vmlinux.sh is invoked again despite vmlinux is up-to-date. The reason of [6] is probably because Make already decided to update vmlinux at the time of [2] because vmlinux was missing when Make built up the dependency graph. Because if_changed is implemented based on $?, this issue can be narrowed down to how Make handles $?. You can test it with the following simple code: [Test Makefile] A: B @echo newer prerequisite: $? cp B A B: C cp C B touch A [Result] $ rm -f A B $ touch C $ make cp C B touch A newer prerequisite: B cp B A Here, 'A' has been touched in the recipe of 'B'. So, the dependency 'A: B' has already been met before the recipe of 'A' is executed. However, Make does not notice the fact that the recipe of 'B' also updates 'A' as a side-effect. The situation is similar in this case; the vmlinux has actually been updated in the vmlinux_prereq target. Make cannot predict this, so judges the vmlinux is old. link-vmlinux.sh is costly, so it is better to not run it when unneeded. Split CONFIG_TRIM_UNUSED_KSYMS recursion to a dedicated target. The reason of commit 2441e78b1919 ("kbuild: better abstract vmlinux sequential prerequisites") was to cater to CONFIG_BUILD_DOCSRC, but it was later removed by commit 184892925118 ("samples: move blackfin gptimers-example from Documentation"). Signed-off-by: Masahiro Yamada Acked-by: Nicolas Pitre Makefile | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit fbfa9be9904e2c0d0c97d860fd071089d21dd9be Author: Masahiro Yamada Date: Fri Mar 16 16:37:14 2018 +0900 kbuild: move include/config/ksym/* to include/ksym/* The idea of using fixdep was inspired by Kconfig, but autoksyms belongs to a different group. So, I want to move those touched files under include/config/ksym/ to include/ksym/. The directory include/ksym/ can be removed by 'make clean' because it is meaningless for the external module building. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Pitre .gitignore | 1 + Makefile | 2 +- scripts/Kbuild.include | 2 +- scripts/adjust_autoksyms.sh | 2 +- scripts/basic/fixdep.c | 8 ++++---- 5 files changed, 8 insertions(+), 7 deletions(-) commit 1f50b80a093836743b5b579b3fab33eb2f6834f2 Author: Masahiro Yamada Date: Fri Mar 16 16:37:13 2018 +0900 kbuild: move CONFIG_TRIM_UNUSED_KSYMS code unneeded for external module The external module building does not need to parse this code because KBUILD_MODULES is always set anyway. Move this code inside the "ifeq ($(KBUILD_EXTMOD),) ... endif" block. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Pitre Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 07a422bb213adb7ee1afbb2347ce6922c60a558a Author: Masahiro Yamada Date: Fri Mar 16 16:37:12 2018 +0900 kbuild: restore autoksyms.h touch to the top Makefile Commit d3fc425e819b ("kbuild: make sure autoksyms.h exists early") moved the code that touches autoksyms.h to scripts/kconfig/Makefile with obscure reason. From Nicolas' comment [1], he did not seem to be sure about the root cause. I guess I figured it out, so here is a fix-up I think is more correct. According to the error log in the original post [2], the build failed in scripts/mod/devicetable-offsets.c scripts/mod/Makefile is descended from scripts/Makefile, which is invoked from the top-level Makefile by the 'scripts' target. To build vmlinux and/or modules, Kbuild descend into $(vmlinux-dirs). This depends on 'prepare' and 'scripts' as follows: $(vmlinux-dirs): prepare scripts Because there is no dependency between 'prepare' and 'scripts', the parallel building can execute them simultaneously. 'prepare' depends on 'prepare1', which touched autoksyms.h, while 'scripts' descends into script/, then scripts/mod/, which needs if CONFIG_TRIM_UNUSED_KSYMS. It was the reason of the race. I am not happy to have unrelated code in the Kconfig Makefile, so getting it back to the top Makefile. I removed the standalone test target because I want to use it to create an empty autoksyms.h file. Here is a little improvement; unnecessary autoksyms.h is not created when CONFIG_TRIM_UNUSED_KSYMS is disabled. [1] https://lkml.org/lkml/2016/11/30/734 [2] https://lkml.org/lkml/2016/11/30/531 Signed-off-by: Masahiro Yamada Acked-by: Nicolas Pitre Makefile | 12 +++++++----- scripts/kconfig/Makefile | 2 -- 2 files changed, 7 insertions(+), 7 deletions(-) commit d8821622c889d9dbc1a31b16e726717394954596 Author: Masahiro Yamada Date: Fri Mar 16 16:37:11 2018 +0900 kbuild: move 'scripts' target below Just a trivial change to prepare for the next commit. This target is still invisible from external module building. Signed-off-by: Masahiro Yamada Makefile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit baa16684b0eb4e590c7e0e65fff4d348c877bc4e Author: Masahiro Yamada Date: Fri Mar 16 16:37:10 2018 +0900 kbuild: remove wrong 'touch' in adjust_autoksyms.sh The comment mentions it creates autoksyms.h in case it is missing, but the actual code touches it when it does exists. The build system creates it anyway because and need it. The code would not have worked as intended, and people have not noticed it. This is a proof that we can simply remove it. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Pitre scripts/adjust_autoksyms.sh | 3 --- 1 file changed, 3 deletions(-) commit ce99d0bf312daf0178e640da9e3c93b773a67e7d Author: Masahiro Yamada Date: Fri Mar 16 16:37:09 2018 +0900 kbuild: clear LDFLAGS in the top Makefile Currently LDFLAGS is not cleared, so same flags are accumulated in LDFLAGS when the top Makefile is recursively invoked. I found unneeded rebuild for ARCH=arm64 when CONFIG_TRIM_UNUSED_KSYMS is enabled. If include/generated/autoksyms.h is updated, the top Makefile is recursively invoked, then arch/arm64/Makefile adds one more '-maarch64linux'. Due to the command line change, modules are rebuilt needlessly. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Pitre Makefile | 1 + 1 file changed, 1 insertion(+) commit bd0f98eba6840d99b791b36a01b83fc62d55235f Author: Masahiro Yamada Date: Wed Feb 28 19:14:24 2018 +0900 kbuild: remove internally used LDFLAGS_vmlinux from kbuild.txt Documentation/kbuild/makefiles.txt lists variables used in Makefile whereas Documentation/kbuild/kbuild.txt describes user assignable parameters given via environments or the command line. The top Makefile and arch/*/Makefile accumulate proper linker flags to LDFLAGS_vmlinux. So, users can not override it from the command line. Generally, per-file options are not supposed to be user-assignable. Remove the misleading entry from kbuild.txt. If we need a way to append user-specific flags for linking the kernel, LDFLAGS_KERNEL would be a consistent choice because we already expose LDFLAGS_MODULE counter-part to users. Signed-off-by: Masahiro Yamada Documentation/kbuild/kbuild.txt | 4 ---- 1 file changed, 4 deletions(-) commit 35cd02bee6e3f2825ce254159102b788116872d9 Author: Masahiro Yamada Date: Wed Feb 28 19:14:23 2018 +0900 kbuild: remove command line interface LDFLAGS_MODULE from makefiles.txt Documentation/kbuild/makefiles.txt lists variables used in Makefile whereas Documentation/kbuild/kbuild.txt describes user assignable parameters given via environments or the command line. LDFLAGS_MODULE is a command line interface, so it should be dropped from makefiles.txt. Some lines below in this file, it is clearly explained that KBUILD_LDFLAGS_MODULE is the right one for the internal use: KBUILD_LDFLAGS_MODULE Options for $(LD) when linking modules $(KBUILD_LDFLAGS_MODULE) is used to add arch-specific options used when linking modules. This is often a linker script. From commandline LDFLAGS_MODULE shall be used (see kbuild.txt). Then, kbuild.txt explains LDFLAGS_MODULE, like follows: LDFLAGS_MODULE -------------------------------------------------- Additional options used for $(LD) when linking modules. Signed-off-by: Masahiro Yamada Documentation/kbuild/makefiles.txt | 6 ------ 1 file changed, 6 deletions(-) commit 0294e6f4a0006856e1f36b8cd8fa088d9e499e98 Author: Masahiro Yamada Date: Fri Feb 23 13:56:53 2018 +0900 kbuild: simplify ld-option implementation Currently, linker options are tested by the coordination of $(CC) and $(LD) because $(LD) needs some object to link. As commit 86a9df597cdd ("kbuild: fix linker feature test macros when cross compiling with Clang") addressed, we need to make sure $(CC) and $(LD) agree the underlying architecture of the passed object. This could be a bit complex when we combine tools from different groups. For example, we can use clang for $(CC), but we still need to rely on GCC toolchain for $(LD). So, I was searching for a way of standalone testing of linker options. A trick I found is to use '-v'; this not only prints the version string, but also tests if the given option is recognized. If a given option is supported, $ aarch64-linux-gnu-ld -v --fix-cortex-a53-843419 GNU ld (Linaro_Binutils-2017.11) 2.28.2.20170706 $ echo $? 0 If unsupported, $ aarch64-linux-gnu-ld -v --fix-cortex-a53-843419 GNU ld (crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04) 2.23.1 aarch64-linux-gnu-ld: unrecognized option '--fix-cortex-a53-843419' aarch64-linux-gnu-ld: use the --help option for usage information $ echo $? 1 Gold works likewise. $ aarch64-linux-gnu-ld.gold -v --fix-cortex-a53-843419 GNU gold (Linaro_Binutils-2017.11 2.28.2.20170706) 1.14 masahiro@pug:~/ref/linux$ echo $? 0 $ aarch64-linux-gnu-ld.gold -v --fix-cortex-a53-999999 GNU gold (Linaro_Binutils-2017.11 2.28.2.20170706) 1.14 aarch64-linux-gnu-ld.gold: --fix-cortex-a53-999999: unknown option aarch64-linux-gnu-ld.gold: use the --help option for usage information $ echo $? 1 LLD too. $ ld.lld -v --gc-sections LLD 7.0.0 (http://llvm.org/git/lld.git 4a0e4190e74cea19f8a8dc625ccaebdf8b5d1585) (compatible with GNU linkers) $ echo $? 0 $ ld.lld -v --fix-cortex-a53-843419 LLD 7.0.0 (http://llvm.org/git/lld.git 4a0e4190e74cea19f8a8dc625ccaebdf8b5d1585) (compatible with GNU linkers) $ echo $? 0 $ ld.lld -v --fix-cortex-a53-999999 ld.lld: error: unknown argument: --fix-cortex-a53-999999 LLD 7.0.0 (http://llvm.org/git/lld.git 4a0e4190e74cea19f8a8dc625ccaebdf8b5d1585) (compatible with GNU linkers) $ echo $? 1 Signed-off-by: Masahiro Yamada Tested-by: Nick Desaulniers scripts/Kbuild.include | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 22340a06534a10296209bc2d02365a2770ded8fc Author: Masahiro Yamada Date: Sun Feb 11 17:40:29 2018 +0900 kbuild: process mixture of clean/build targets one by one Support parallel building of clean, config, and build targets in a single command. For example, make -j clean all or make -j mrproper defconfig all They should be handled one by one. Signed-off-by: Masahiro Yamada Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit f49821ee32b76b1a356fab17316eb62430182ecf Author: Nicholas Piggin Date: Sun Feb 11 00:25:04 2018 +1000 kbuild: rename built-in.o to built-in.a Incremental linking is gone, so rename built-in.o to built-in.a, which is the usual extension for archive files. This patch does two things, first is a simple search/replace: git grep -l 'built-in\.o' | xargs sed -i 's/built-in\.o/built-in\.a/g' The second is to invert nesting of nested text manipulations to avoid filtering built-in.a out from libs-y2: -libs-y2 := $(filter-out %.a, $(patsubst %/, %/built-in.a, $(libs-y))) +libs-y2 := $(patsubst %/, %/built-in.a, $(filter-out %.a, $(libs-y))) Signed-off-by: Nicholas Piggin Signed-off-by: Masahiro Yamada Documentation/kbuild/makefiles.txt | 16 ++++++++-------- Documentation/process/changes.rst | 2 +- Makefile | 14 +++++++------- arch/blackfin/kernel/bfin_ksyms.c | 2 +- arch/powerpc/kernel/Makefile | 2 +- drivers/s390/Makefile | 2 +- lib/Kconfig.debug | 4 ++-- scripts/Makefile.build | 10 +++++----- scripts/Makefile.lib | 6 +++--- scripts/link-vmlinux.sh | 20 ++++++++++---------- scripts/namespace.pl | 2 +- usr/initramfs_data.S | 2 +- 12 files changed, 41 insertions(+), 41 deletions(-) commit 6358d6e8b9846c2ff6fd1d4ad2809145635dd813 Author: Nicholas Piggin Date: Sun Feb 11 00:25:03 2018 +1000 kbuild: remove incremental linking option This removes the old `ld -r` incremental link option, which has not been selected by any architecture since June 2017. Signed-off-by: Nicholas Piggin Signed-off-by: Masahiro Yamada Documentation/kbuild/makefiles.txt | 10 ++++- arch/Kconfig | 6 --- scripts/Makefile.build | 32 +++++--------- scripts/link-vmlinux.sh | 91 ++++++++++++++------------------------ 4 files changed, 51 insertions(+), 88 deletions(-) commit 1fe7d2bb24d7db6175e0b0a31d8fe03dc6ffb16e Author: Michael Forney Date: Tue Feb 6 22:41:17 2018 -0800 kbuild: Improve portability of some sed invocations * Use BREs where EREs aren't necessary. * Pass -E instead of -r to use EREs. This will be standardized in the next POSIX revision[0]. GNU sed supports this since 4.2 (May 2009), and busybox since 1.22.0 (Jan 2014). * Use the [:space:] character class instead of ` \t` in bracket expressions. In bracket expressions, POSIX says that loses its special meaning, so a conforming implementation cannot expand \t to [1]. * In BREs, use interval expressions (\{n,m\}) instead of non-standard features like \+ and \?. * Use a loop instead of -s flag. There are still plenty of other cases of non-standard sed invocations (use of ERE features in BREs, in-place editing), but this fixes some core ones. [0] http://austingroupbugs.net/view.php?id=528 [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_05 Signed-off-by: Michael Forney Signed-off-by: Masahiro Yamada scripts/Kbuild.include | 2 +- scripts/Makefile.build | 2 +- scripts/adjust_autoksyms.sh | 4 +++- scripts/gen_initramfs_list.sh | 2 +- scripts/headers_install.sh | 10 +++++----- 5 files changed, 11 insertions(+), 9 deletions(-) commit ae0c553c24c009596c3a3e903433824fe050c547 Author: Sami Tolvanen Date: Thu Nov 30 15:38:26 2017 -0800 kbuild: add clang-version.sh Based on gcc-version.sh, clang-version.sh prints out the correct version of clang. Signed-off-by: Sami Tolvanen Tested-by: Nick Desaulniers Signed-off-by: Masahiro Yamada scripts/clang-version.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 819671ff849b07b9831b91de879ddc5da4b333d4 Author: Dominik Brodowski Date: Sun Mar 11 11:34:25 2018 +0100 syscalls: define and explain goal to not call syscalls in the kernel The syscall entry points to the kernel defined by SYSCALL_DEFINEx() and COMPAT_SYSCALL_DEFINEx() should only be called from userspace through kernel entry points, but not from the kernel itself. This will allow cleanups and optimizations to the entry paths *and* to the parts of the kernel code which currently need to pretend to be userspace in order to make use of syscalls. Signed-off-by: Dominik Brodowski Documentation/process/adding-syscalls.rst | 32 +++++++++++++++++++++++++++++++ include/linux/syscalls.h | 7 +++++++ 2 files changed, 39 insertions(+) commit ab60368ab6a452466885ef4edf0cefd089465132 Author: Petr Vorel Date: Fri Mar 23 14:41:08 2018 +0100 ima: Fallback to the builtin hash algorithm IMA requires having it's hash algorithm be compiled-in due to it's early use. The default IMA algorithm is protected by Kconfig to be compiled-in. The ima_hash kernel parameter allows to choose the hash algorithm. When the specified algorithm is not available or available as a module, IMA initialization fails, which leads to a kernel panic (mknodat syscall calls ima_post_path_mknod()). Therefore as fallback we force IMA to use the default builtin Kconfig hash algorithm. Fixed crash: $ grep CONFIG_CRYPTO_MD4 .config CONFIG_CRYPTO_MD4=m [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.12.14-2.3-default root=UUID=74ae8202-9ca7-4e39-813b-22287ec52f7a video=1024x768-16 plymouth.ignore-serial-consoles console=ttyS0 console=tty resume=/dev/disk/by-path/pci-0000:00:07.0-part3 splash=silent showopts ima_hash=md4 ... [ 1.545190] ima: Can not allocate md4 (reason: -2) ... [ 2.610120] BUG: unable to handle kernel NULL pointer dereference at (null) [ 2.611903] IP: ima_match_policy+0x23/0x390 [ 2.612967] PGD 0 P4D 0 [ 2.613080] Oops: 0000 [#1] SMP [ 2.613080] Modules linked in: autofs4 [ 2.613080] Supported: Yes [ 2.613080] CPU: 0 PID: 1 Comm: systemd Not tainted 4.12.14-2.3-default #1 [ 2.613080] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014 [ 2.613080] task: ffff88003e2d0040 task.stack: ffffc90000190000 [ 2.613080] RIP: 0010:ima_match_policy+0x23/0x390 [ 2.613080] RSP: 0018:ffffc90000193e88 EFLAGS: 00010296 [ 2.613080] RAX: 0000000000000000 RBX: 000000000000000c RCX: 0000000000000004 [ 2.613080] RDX: 0000000000000010 RSI: 0000000000000001 RDI: ffff880037071728 [ 2.613080] RBP: 0000000000008000 R08: 0000000000000000 R09: 0000000000000000 [ 2.613080] R10: 0000000000000008 R11: 61c8864680b583eb R12: 00005580ff10086f [ 2.613080] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000008000 [ 2.613080] FS: 00007f5c1da08940(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000 [ 2.613080] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.613080] CR2: 0000000000000000 CR3: 0000000037002000 CR4: 00000000003406f0 [ 2.613080] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2.613080] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2.613080] Call Trace: [ 2.613080] ? shmem_mknod+0xbf/0xd0 [ 2.613080] ima_post_path_mknod+0x1c/0x40 [ 2.613080] SyS_mknod+0x210/0x220 [ 2.613080] entry_SYSCALL_64_fastpath+0x1a/0xa5 [ 2.613080] RIP: 0033:0x7f5c1bfde570 [ 2.613080] RSP: 002b:00007ffde1c90dc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000085 [ 2.613080] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5c1bfde570 [ 2.613080] RDX: 0000000000000000 RSI: 0000000000008000 RDI: 00005580ff10086f [ 2.613080] RBP: 00007ffde1c91040 R08: 00005580ff10086f R09: 0000000000000000 [ 2.613080] R10: 0000000000104000 R11: 0000000000000246 R12: 00005580ffb99660 [ 2.613080] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000002 [ 2.613080] Code: 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 57 41 56 44 8d 14 09 41 55 41 54 55 53 44 89 d3 09 cb 48 83 ec 38 48 8b 05 c5 03 29 01 <4c> 8b 20 4c 39 e0 0f 84 d7 01 00 00 4c 89 44 24 08 89 54 24 20 [ 2.613080] RIP: ima_match_policy+0x23/0x390 RSP: ffffc90000193e88 [ 2.613080] CR2: 0000000000000000 [ 2.613080] ---[ end trace 9a9f0a8a73079f6a ]--- [ 2.673052] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009 [ 2.673052] [ 2.675337] Kernel Offset: disabled [ 2.676405] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009 Signed-off-by: Petr Vorel Signed-off-by: Mimi Zohar security/integrity/ima/ima_crypto.c | 2 ++ security/integrity/ima/ima_main.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) commit 1c070b18d448211644cc0050e6c9a4a204bbcf63 Author: Martin Townsend Date: Thu Mar 22 13:46:01 2018 +0000 ima: Add smackfs to the default appraise/measure list This is required to use SMACK and IMA/EVM together. Add it to the default nomeasure/noappraise list like other pseudo filesystems. Signed-off-by: Martin Townsend Acked-by: Casey Schaufler Signed-off-by: Mimi Zohar security/integrity/ima/ima_policy.c | 2 ++ 1 file changed, 2 insertions(+) commit 70946c4ac2a9e036e3cf7048cd670507f5074b04 Author: Sascha Hauer Date: Thu Mar 1 13:38:45 2018 +0100 evm: check for remount ro in progress before writing EVM might update the evm xattr while the VFS performs a remount to readonly mode. This is not properly checked for, additionally check the s_readonly_remount superblock flag before writing. The bug can for example be observed with UBIFS. UBIFS checks the free space on the device before and after a remount. With EVM enabled the free space sometimes differs between both checks. Signed-off-by: Sascha Hauer Signed-off-by: Mimi Zohar security/integrity/evm/evm_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f5e51fa368fd6612608bc36f39e55cde08ce0039 Author: Thiago Jung Bauermann Date: Thu Mar 15 17:33:42 2018 -0300 ima: Improvements in ima_appraise_measurement() Replace nested ifs in the EVM xattr verification logic with a switch statement, making the code easier to understand. Also, add comments to the if statements in the out section and constify the cause variable. Signed-off-by: Mimi Zohar Signed-off-by: Thiago Jung Bauermann Acked-by: Serge Hallyn security/integrity/ima/ima_appraise.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) commit 1775cb87b063cd60a5021c38412f6024f93cc376 Author: Thiago Jung Bauermann Date: Wed Mar 14 17:20:18 2018 -0300 ima: Simplify ima_eventsig_init() The "goto out" statement doesn't have any purpose since there's no cleanup to be done when returning early, so remove it. This also makes the rc variable unnecessary so remove it as well. Also, the xattr_len and fmt variables are redundant so remove them as well. Signed-off-by: Thiago Jung Bauermann Acked-by: Serge Hallyn Signed-off-by: Mimi Zohar security/integrity/ima/ima_template_lib.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 11c60f23ed1367298207efb3bbf985203a95f480 Author: Thiago Jung Bauermann Date: Wed Mar 14 17:20:17 2018 -0300 integrity: Remove unused macro IMA_ACTION_RULE_FLAGS This macro isn't used anymore since commit 0d73a55208e9 ("ima: re-introduce own integrity cache lock"), so remove it. Signed-off-by: Thiago Jung Bauermann Acked-by: Serge Hallyn Signed-off-by: Mimi Zohar security/integrity/integrity.h | 1 - 1 file changed, 1 deletion(-) commit e456ef88ae8c9ffd303e970c28dcce4474c3d356 Author: Tycho Andersen Date: Thu Mar 8 16:08:36 2018 -0700 ima: drop vla in ima_audit_measurement() In keeping with the directive to get rid of VLAs [1], let's drop the VLA from ima_audit_measurement(). We need to adjust the return type of ima_audit_measurement, because now this function can fail if an allocation fails. [1]: https://lkml.org/lkml/2018/3/7/621 v2: just use audit_log_format instead of doing a second allocation v3: ignore failures in ima_audit_measurement() Signed-off-by: Tycho Andersen Signed-off-by: Mimi Zohar security/integrity/ima/ima_api.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit fac37c628fd5d68fd7298d9b57ae8601ee1b4723 Author: Jiandi An Date: Tue Mar 6 23:26:26 2018 -0600 ima: Fix Kconfig to select TPM 2.0 CRB interface TPM_CRB driver provides TPM CRB 2.0 support. If it is built as a module, the TPM chip is registered after IMA init. tpm_pcr_read() in IMA fails and displays the following message even though eventually there is a TPM chip on the system. ima: No TPM chip found, activating TPM-bypass! (rc=-19) Fix IMA Kconfig to select TPM_CRB so TPM_CRB driver is built in the kernel and initializes before IMA. Signed-off-by: Jiandi An Signed-off-by: Mimi Zohar security/integrity/ima/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 4d8d5a392ae110d9b5889afd2b4beef9a09e712d Author: Kai-Heng Feng Date: Sat Mar 24 03:26:36 2018 +0800 usb: core: Add USB_QUIRK_DELAY_CTRL_MSG to usbcore quirks There's a new quirk, USB_QUIRK_DELAY_CTRL_MSG. Add it to usbcore quirks for completeness. Signed-off-by: Kai-Heng Feng Signed-off-by: Greg Kroah-Hartman Documentation/admin-guide/kernel-parameters.txt | 4 +++- drivers/usb/core/quirks.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) commit a030501499b032bd218e1d01c07677bab6a0d53f Author: Kai-Heng Feng Date: Sat Mar 24 03:26:35 2018 +0800 usb: core: Copy parameter string correctly and remove superfluous null check strsep() slices string, so the string gets copied by param_set_copystring() at the end of quirks_param_set() is not the original value. Fix that by calling param_set_copystring() earlier. The null check for val is unnecessary, the caller of quirks_param_set() does not pass null string. Remove the superfluous null check. This is found by Smatch. Fixes: 027bd6cafd9a ("usb: core: Add "quirks" parameter for usbcore") Cc: Dan Carpenter Signed-off-by: Kai-Heng Feng Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 73c6d3b284cf7b31c03fdaa2476f48f8da0932f8 Author: Benson Leung Date: Sat Mar 24 10:40:27 2018 -0700 USB: announce bcdDevice as well as idVendor, idProduct. Print bcdDevice which is used by vendors to identify different versions of the same product (or different versions of firmware). Adding this to the logs will be useful for support purposes. Match the %2x.%02x formatting that's used by lsusb -v for this same value. Signed-off-by: Benson Leung Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a0ac7b3ca941fbbf96b48df7de6542d18d8d92f3 Merge: 7054e4e 980b68e Author: Ingo Molnar Date: Sun Mar 25 10:38:15 2018 +0200 Merge tag 'perf-core-for-mingo-4.17-20180323' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: - Move non-TUI specific annotation routines out of the TUI browser so that it can be used in other UIs, and to demonstrate that introduce a 'perf annotate --stdio2' option that will apply those formatting routines to provide a non-interactive annotation mode (Arnaldo Carvalho de Melo) - Add 'P' hotkey to the annotation TUI, so dump the current annotated symbol to a file, easing report thru e-mail, by getting rid of the spaces + right hand side scrollbar chars (Arnaldo Carvalho de Melo) - Support --ignore-vmlinux to 'perf report' and 'perf annotate', that was already present in 'perf top', to use /proc/{kcore,kallsyms}, allowing to see what is in fact running (patched stuff, alternatives, ftrace, etc), not the initial state of the kernel (vmlinux) (Arnaldo Carvalho de Melo) - Support 'jump' instructions to a different function, treating them as 'call' instructions (Arnaldo Carvalho de Melo) - Fix some jump artifacts when using vmlinux + ASM functions, where the ELF symtab for instance, for entry_SYSCALL_64 includes that and what comes after the 'syscall_return_via_sysret' label, but the objdump -dS prints the jump targets + offsets using the syscall_return_via_sysret address, which was confusing 'perf annotate'. See the cset comments for further info (Arnaldo Carvalho de Melo) - Report error from dwfl_attach_state() in the unwind code (Martin Vuille) - Reference Py_None before returning it in the python extension (Petr Machata) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 03f1fc09180b345582889a344b012d069b3a6dbe Author: Eric W. Biederman Date: Fri Mar 23 00:22:05 2018 -0500 ipc/util: Helpers for making the sysvipc operations pid namespace aware Capture the pid namespace when /proc/sysvipc/msg /proc/sysvipc/shm and /proc/sysvipc/sem are opened, and make it available through the new helper ipc_seq_pid_ns. This makes it possible to report the pids in these files in the pid namespace of the opener of the files. Implement ipc_update_pid. A simple impline helper that will only update a struct pid pointer if the new value does not equal the old value. This removes the need for wordy code sequences like: old = object->pid; object->pid = new; put_pid(old); and old = object->pid; if (old != new) { object->pid = new; put_pid(old); } Allowing the following to be written instead: ipc_update_pid(&object->pid, new); Which is easier to read and ensures that the pid reference count is not touched the old and the new values are the same. Not touching the reference count in this case is important to help avoid issues like af_unix experienced, where multiple threads of the same process managed to bounce the struct pid between cpu cache lines, but updating the pids reference count. Signed-off-by: "Eric W. Biederman" ipc/util.c | 9 +++++++++ ipc/util.h | 11 +++++++++++ 2 files changed, 20 insertions(+) commit f83a396d06d499029fe6d32e326605a2b5ca4eff Author: Eric W. Biederman Date: Thu Mar 22 21:45:50 2018 -0500 ipc: Move IPCMNI from include/ipc.h into ipc/util.h The definition IPCMNI is only used in ipc/util.h and ipc/util.c. So there is no reason to keep it in a header file that the whole kernel can see. Move it into util.h to simplify future maintenance. Signed-off-by: "Eric W. Biederman" include/linux/ipc.h | 2 -- ipc/util.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) commit 34b56df922b10ac2876f268c522951785bf333fd Author: Eric W. Biederman Date: Thu Mar 22 21:37:34 2018 -0500 msg: Move struct msg_queue into ipc/msg.c All of the users are now in ipc/msg.c so make the definition local to that file to make code maintenance easier. AKA to prevent rebuilding the entire kernel when struct msg_queue changes. Signed-off-by: "Eric W. Biederman" include/linux/msg.h | 18 ------------------ ipc/msg.c | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 18 deletions(-) commit a2e102cd3cdd8b7a14e08716510707b15802073f Author: Eric W. Biederman Date: Thu Mar 22 21:34:44 2018 -0500 shm: Move struct shmid_kernel into ipc/shm.c All of the users are now in ipc/shm.c so make the definition local to that file to make code maintenance easier. AKA to prevent rebuilding the entire kernel when struct shmid_kernel changes. Signed-off-by: "Eric W. Biederman" include/linux/shm.h | 22 ---------------------- ipc/shm.c | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 22 deletions(-) commit a00315d1b334d9f869975d53e3b3b3eb37c6c17e Author: Russell King Date: Wed Aug 31 08:49:48 2016 +0100 ARM: sa1100/h3xxx: switch h3xxx PCMCIA to use gpiod APIs Switch h3xxx's PCMCIA implementation to use the gpiod APIs where possible. Signed-off-by: Russell King arch/arm/mach-sa1100/h3xxx.c | 17 +++++++++++++++++ drivers/pcmcia/sa1100_h3600.c | 16 +++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) commit 780febd5b709fd9db80830ea656de96bbe3e5001 Author: Russell King Date: Wed Aug 31 08:49:47 2016 +0100 ARM: sa1100/cerf: convert to generic CF sockets Convert Cerf to use the generic CF socket support. Signed-off-by: Russell King arch/arm/mach-sa1100/cerf.c | 18 +++++++-- drivers/pcmcia/Makefile | 1 - drivers/pcmcia/sa1100_cerf.c | 86 ----------------------------------------- drivers/pcmcia/sa1100_generic.c | 3 -- drivers/pcmcia/sa1100_generic.h | 1 - 5 files changed, 15 insertions(+), 94 deletions(-) commit 29786e9b6551b822de66aa64b07e21eeb36ded89 Author: Russell King Date: Wed Aug 31 08:49:47 2016 +0100 ARM: sa1100/assabet: convert to generic CF sockets Convert Assabet to use the generic CF socket support. Signed-off-by: Russell King arch/arm/mach-sa1100/Kconfig | 2 + arch/arm/mach-sa1100/assabet.c | 39 ++++++++++- arch/arm/mach-sa1100/include/mach/assabet.h | 6 -- drivers/pcmcia/Makefile | 1 - drivers/pcmcia/sa1100_assabet.c | 100 ---------------------------- drivers/pcmcia/sa1100_generic.c | 3 - drivers/pcmcia/sa1100_generic.h | 1 - 7 files changed, 40 insertions(+), 112 deletions(-) commit 0920ca103f8d8b53619bb69fa34185013f448ca2 Author: Russell King Date: Wed Aug 31 08:49:47 2016 +0100 ARM: sa1100: provide infrastructure to support generic CF sockets Provide the SoC-level infrastructure to support the generic CF sockets. Signed-off-by: Russell King arch/arm/mach-sa1100/clock.c | 2 ++ arch/arm/mach-sa1100/generic.c | 44 +++++++++++++++++++++++++++++++++++++++++- arch/arm/mach-sa1100/generic.h | 8 ++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) commit 7be893aa2d6a11d3ff16fe5f614cb94d1cfc9149 Author: Russell King Date: Wed Aug 31 08:49:47 2016 +0100 pcmcia: sa1100: provide generic CF support Provide generic non-voltage sensing socket support for StrongARM platforms using the gpiolib and regulator subsystems to obtain the resources to control the socket. Acked-by: Dominik Brodowski (for drivers/pcmcia) Signed-off-by: Russell King drivers/pcmcia/sa1100_generic.c | 103 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 98 insertions(+), 5 deletions(-) commit 398432eddea4197880a067718e2711d3f5f11d18 Author: Wolfram Sang Date: Tue Mar 20 21:54:38 2018 +0100 i2c: make i2c_check_addr_validity() static After previous refactoring, there is only one user in the same file left. Make the function static now. [wsa: added 'int' to bare 'unsigned'] Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 2 +- drivers/i2c/i2c-core.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit a1de3253a8840bf373e7c6330f21b7807c6c0536 Author: Hiromitsu Yamasaki Date: Tue Mar 20 22:04:14 2018 +0100 i2c: rcar: fix mask value of prohibited bit According to documentation, Bit 7 of ICMSR is unused and 0 should be written to it. Fix the mask accordingly. Signed-off-by: Hiromitsu Yamasaki [wsa: edited commit message] Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-rcar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9d952aa2c8a46ba577b77619cc53e3df95507095 Author: Wolfram Sang Date: Tue Mar 20 22:53:20 2018 +0100 dt-bindings: i2c: document R8A77965 bindings R-Car M3-N (R8A77965) SoC has a R-Car Gen3-compatible I2C controller. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 1 + 1 file changed, 1 insertion(+) commit 0b884c22c5b7f6ef985b3d39fed06ad1f8296042 Merge: eb49778 84e1062 Author: Wolfram Sang Date: Sat Mar 24 13:39:18 2018 +0100 Merge tag 'at24-4.17-updates-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-4.17 "three new special cases for device tree compatible strings" commit eb49778c8c6cbe075cf90d741ccf16f674a8db4e Author: Chris Packham Date: Wed Jul 5 22:13:58 2017 +1200 i2c: pca-platform: drop gpio from platform data Now that the i2c-pca-plaform driver is using the device managed API for gpios there is no need for the reset gpio to be specified via i2c_pca9564_pf_platform_data. Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang arch/blackfin/mach-bf561/boards/acvilon.c | 1 - arch/sh/boards/board-sh7785lcr.c | 1 - include/linux/i2c-pca-platform.h | 3 --- 3 files changed, 5 deletions(-) commit 7562dee282244aade6fa183487bf2fcecaa42a20 Author: Chris Packham Date: Wed Jul 5 22:13:57 2017 +1200 i2c: pca-platform: use device_property_read_u32 Use device_property_read_u32 instead of of_property_read_u32_index to lookup the "clock-frequency" property. Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-pca-platform.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 06783261751a44c63680e94005a4763151bc1134 Author: Chris Packham Date: Wed Jul 5 22:13:56 2017 +1200 i2c: pca-platform: unconditionally use devm_gpiod_get_optional Allow for the reset-gpios property to be defined in the device tree or via a GPIO lookup table. Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-pca-platform.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) commit df0d32348aa81208a0037b959dc23c4739439c02 Author: Chris Packham Date: Wed Jul 5 22:13:55 2017 +1200 sh: sh7785lcr: add GPIO lookup table for i2c controller reset Define the GPIO connected to the PCA9564 using a GPIO lookup table. This will allow the i2c-pca-platform driver to use the device managed APIs to lookup the gpio instead of using platform_data. Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang arch/sh/boards/board-sh7785lcr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7545c7dba169c4c29ba5f6ab8706267a84c0febe Author: Abhishek Sahu Date: Mon Mar 12 18:45:02 2018 +0530 i2c: qup: reorganization of driver code to remove polling for qup v2 Following are the major issues in current driver code 1. The current driver simply assumes the transfer completion whenever its gets any non-error interrupts and then simply do the polling of available/free bytes in FIFO. 2. The block mode is not working properly since no handling in being done for OUT_BLOCK_WRITE_REQ and IN_BLOCK_READ_READ. 3. An i2c transfer can contain multiple message and QUP v2 supports reconfiguration during run in which the mode should be same for all the sub transfer. Currently the mode is being programmed before every sub transfer which is functionally wrong. If one message is less than FIFO length and other message is greater than FIFO length, then transfers will fail. Because of above, i2c v2 transfers of size greater than 64 are failing with following error message i2c_qup 78b6000.i2c: timeout for fifo out full To make block mode working properly and move to use the interrupts instead of polling, major code reorganization is required. Following are the major changes done in this patch 1. Remove the polling of TX FIFO free space and RX FIFO available bytes and move to interrupts completely. QUP has QUP_MX_OUTPUT_DONE, QUP_MX_INPUT_DONE, OUT_BLOCK_WRITE_REQ and IN_BLOCK_READ_REQ interrupts to handle FIFO’s properly so check all these interrupts. 2. Determine the mode for transfer before starting by checking all the tx/rx data length in each message. The complete message can be transferred either in DMA mode or Programmed IO by FIFO/Block mode. in DMA mode, both tx and rx uses same mode but in PIO mode, the TX and RX can be in different mode. 3. During write, For FIFO mode, TX FIFO can be directly written without checking for FIFO space. For block mode, the QUP will generate OUT_BLOCK_WRITE_REQ interrupt whenever it has block size of available space. 4. During read, both TX and RX FIFO will be used. TX will be used for writing tags and RX will be used for receiving the data. In QUP, TX and RX can operate in separate mode so configure modes accordingly. 5. For read FIFO mode, wait for QUP_MX_INPUT_DONE interrupt which will be generated after all the bytes have been copied in RX FIFO. For read Block mode, QUP will generate IN_BLOCK_READ_REQ interrupts whenever it has block size of available data. 6. Split the transfer in chunk of one QUP block size(256 bytes) and schedule each block separately. QUP v2 supports reconfiguration during run in which QUP can transfer multiple blocks without issuing a stop events. 7. Port the SMBus block read support for new code changes. Signed-off-by: Abhishek Sahu Reviewed-by: Sricharan R Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qup.c | 900 +++++++++++++++++++++++++------------------ 1 file changed, 515 insertions(+), 385 deletions(-) commit fbfab1ab065879370541caf0e514987368eb41b2 Author: Abhishek Sahu Date: Mon Mar 12 18:45:01 2018 +0530 i2c: qup: reorganization of driver code to remove polling for qup v1 Following are the major issues in current driver code 1. The current driver simply assumes the transfer completion whenever its gets any non-error interrupts and then simply do the polling of available/free bytes in FIFO. 2. The block mode is not working properly since no handling in being done for OUT_BLOCK_WRITE_REQ and IN_BLOCK_READ_REQ. Because of above, i2c v1 transfers of size greater than 32 are failing with following error message i2c_qup 78b6000.i2c: timeout for fifo out full To make block mode working properly and move to use the interrupts instead of polling, major code reorganization is required. Following are the major changes done in this patch 1. Remove the polling of TX FIFO free space and RX FIFO available bytes and move to interrupts completely. QUP has QUP_MX_OUTPUT_DONE, QUP_MX_INPUT_DONE, OUT_BLOCK_WRITE_REQ and IN_BLOCK_READ_REQ interrupts to handle FIFO’s properly so check all these interrupts. 2. During write, For FIFO mode, TX FIFO can be directly written without checking for FIFO space. For block mode, the QUP will generate OUT_BLOCK_WRITE_REQ interrupt whenever it has block size of available space. 3. During read, both TX and RX FIFO will be used. TX will be used for writing tags and RX will be used for receiving the data. In QUP, TX and RX can operate in separate mode so configure modes accordingly. 4. For read FIFO mode, wait for QUP_MX_INPUT_DONE interrupt which will be generated after all the bytes have been copied in RX FIFO. For read Block mode, QUP will generate IN_BLOCK_READ_REQ interrupts whenever it has block size of available data. Signed-off-by: Abhishek Sahu Reviewed-by: Sricharan R Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qup.c | 366 ++++++++++++++++++++++++++----------------- 1 file changed, 223 insertions(+), 143 deletions(-) commit f7714b4e451bdcb7918b9aad14af22684ceac638 Author: Abhishek Sahu Date: Mon Mar 12 18:45:00 2018 +0530 i2c: qup: send NACK for last read sub transfers According to I2c specification, “If a master-receiver sends a repeated START condition, it sends a not-acknowledge (A) just before the repeated START condition”. QUP v2 supports sending of NACK without stop with QUP_TAG_V2_DATARD_NACK so added the same. Signed-off-by: Abhishek Sahu Reviewed-by: Austin Christ Reviewed-by: Andy Gross Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6f2f0f6465acbd59391c43352ff0df77df1f01db Author: Abhishek Sahu Date: Mon Mar 12 18:44:59 2018 +0530 i2c: qup: fix buffer overflow for multiple msg of maximum xfer len The BAM mode requires buffer for start tag data and tx, rx SG list. Currently, this is being taken for maximum transfer length (65K). But an I2C transfer can have multiple messages and each message can be of this maximum length so the buffer overflow will happen in this case. Since increasing buffer length won’t be feasible since an I2C transfer can contain any number of messages so this patch does following changes to make i2c transfers working for multiple messages case. 1. Calculate the required buffers for 2 maximum length messages (65K * 2). 2. Split the descriptor formation and descriptor scheduling. The idea is to fit as many messages in one DMA transfers for 65K threshold value (max_xfer_sg_len). Whenever the sg_cnt is crossing this, then schedule the BAM transfer and subsequent transfer will again start from zero. Signed-off-by: Abhishek Sahu Reviewed-by: Andy Gross Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qup.c | 194 ++++++++++++++++++++++++------------------- 1 file changed, 110 insertions(+), 84 deletions(-) commit ecb6e1e5f4352055a5761b945a833a925d51bf8d Author: Abhishek Sahu Date: Mon Mar 12 18:44:58 2018 +0530 i2c: qup: change completion timeout according to transfer length Currently the completion timeout is being taken according to maximum transfer length which is too high if SCL is operating in high frequency. This patch calculates timeout on the basis of one-byte transfer time and uses the same for completion timeout. Signed-off-by: Abhishek Sahu Reviewed-by: Andy Gross Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qup.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 08f15963bc751bc818294c0f75a9aaca299c4052 Author: Abhishek Sahu Date: Mon Mar 12 18:44:57 2018 +0530 i2c: qup: use the complete transfer length to choose DMA mode Currently each message length in complete transfer is being checked for determining DMA mode and if any of the message length is less than FIFO length then non DMA mode is being used which will increase overhead. DMA can be used for any length and it should be determined with complete transfer length. Now, this patch selects DMA mode if the total length is greater than FIFO length. Signed-off-by: Abhishek Sahu Reviewed-by: Austin Christ Reviewed-by: Andy Gross Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qup.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 3f450d3eea14799b14192231840c1753a660f150 Author: Abhishek Sahu Date: Mon Mar 12 18:44:56 2018 +0530 i2c: qup: proper error handling for i2c error in BAM mode Currently the i2c error handling in BAM mode is not working properly in stress condition. 1. After an error, the FIFO are being written with FLUSH and EOT tags which should not be required since already these tags have been written in BAM descriptor itself. 2. QUP state is being moved to RESET in IRQ handler in case of error. When QUP HW encounters an error in BAM mode then it moves the QUP STATE to PAUSE state. In this case, I2C_FLUSH command needs to be executed while moving to RUN_STATE by writing to the QUP_STATE register with the I2C_FLUSH bit set to 1. 3. In Error case, sometimes, QUP generates more than one interrupt which will trigger the complete again. After an error, the flush operation will be scheduled after doing reinit_completion which should be triggered by BAM IRQ callback. If the second QUP IRQ comes during this time then it will call the complete and the transfer function will assume the all the BAM HW descriptors have been completed. 4. The release DMA is being called after each error which will free the DMA tx and rx channels. The error like NACK is very common in I2C transfer and every time this will be overhead. Now, since the error handling is proper so this release channel can be completely avoided. Signed-off-by: Abhishek Sahu Reviewed-by: Sricharan R Reviewed-by: Austin Christ Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qup.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 7e6c35fe602df6821b3e7db5b1ba656162750fda Author: Abhishek Sahu Date: Mon Mar 12 18:44:55 2018 +0530 i2c: qup: fix the transfer length for BAM RX EOT FLUSH tags In case of FLUSH operation, BAM copies INPUT EOT FLUSH (0x94) instead of normal EOT (0x93) tag in input data stream when an input EOT tag is received during flush operation. So only one tag will be written instead of 2 separate tags. Signed-off-by: Abhishek Sahu Reviewed-by: Andy Gross Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c5adc0fa63a930e3313c74bb7c1d4d158130eb41 Author: Abhishek Sahu Date: Mon Mar 12 18:44:54 2018 +0530 i2c: qup: schedule EOT and FLUSH tags at the end of transfer The role of FLUSH and EOT tag is to flush already scheduled descriptors in BAM HW in case of error. EOT is required only when descriptors are scheduled in RX FIFO. If all the messages are WRITE, then only FLUSH tag will be used. A single BAM transfer can have multiple read and write messages. The EOT and FLUSH tags should be scheduled at the end of BAM HW descriptors. Since the READ and WRITE can be present in any order so for some of the cases, these tags are not being written correctly. Following is one of the example READ, READ, READ, READ Currently EOT and FLUSH tags are being written after each READ. If QUP gets NACK for first READ itself, then flush will be triggered. It will look for first FLUSH tag in TX FIFO and will stop there so only descriptors for first READ descriptors be flushed. All the scheduled descriptors should be cleared to generate BAM DMA completion. Now this patch is scheduling FLUSH and EOT only once after all the descriptors. So, flush will clear all the scheduled descriptors and BAM will generate the completion interrupt. Signed-off-by: Abhishek Sahu Reviewed-by: Sricharan R Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qup.c | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) commit 6d5f37f166bb07b04b4d42e9d1f5427b7931cd3c Author: Abhishek Sahu Date: Mon Mar 12 18:44:53 2018 +0530 i2c: qup: remove redundant variables for BAM SG count The rx_nents and tx_nents are redundant. rx_buf and tx_buf can be used for total number of SG entries. Since rx_buf and tx_buf give the impression that it is buffer instead of count so rename it to tx_cnt and rx_cnt for giving it more meaningful variable name. Signed-off-by: Abhishek Sahu Reviewed-by: Austin Christ Reviewed-by: Andy Gross Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qup.c | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) commit eb422b539c1f39faf576826b54be93e84d9cb32a Author: Abhishek Sahu Date: Mon Mar 12 18:44:52 2018 +0530 i2c: qup: minor code reorganization for use_dma 1. Assigns use_dma in qup_dev structure itself which will help in subsequent patches to determine the mode in IRQ handler. 2. Does minor code reorganization for loops to reduce the unnecessary comparison and assignment. Signed-off-by: Abhishek Sahu Reviewed-by: Austin Christ Reviewed-by: Andy Gross Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qup.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 7239872fb3400b21a8f5547257f9f86455867bd6 Author: Abhishek Sahu Date: Mon Mar 12 18:44:51 2018 +0530 i2c: qup: fixed releasing dma without flush operation completion The QUP BSLP BAM generates the following error sometimes if the current I2C DMA transfer fails and the flush operation has been scheduled “bam-dma-engine 7884000.dma: Cannot free busy channel” If any I2C error comes during BAM DMA transfer, then the QUP I2C interrupt will be generated and the flush operation will be carried out to make I2C consume all scheduled DMA transfer. Currently, the same completion structure is being used for BAM transfer which has already completed without reinit. It will make flush operation wait_for_completion_timeout completed immediately and will proceed for freeing the DMA resources where the descriptors are still in process. Signed-off-by: Abhishek Sahu Acked-by: Sricharan R Reviewed-by: Austin Christ Reviewed-by: Andy Gross Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qup.c | 2 ++ 1 file changed, 2 insertions(+) commit 0668bc44a42672626666e4f66aa1f2c22528e8a5 Author: Abhishek Sahu Date: Mon Mar 12 18:44:50 2018 +0530 i2c: qup: fix copyrights and update to SPDX identifier The file has been updated from 2016 to 2018 so fixed the copyright years. Signed-off-by: Abhishek Sahu Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qup.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit ab17ed70f79abbfdc7f0878836816267df2835a7 Merge: 2e8ebed 2e62c49 Author: Wim Van Sebroeck Date: Sat Mar 24 10:20:26 2018 +0100 Merge branch 'v4.17-rc1' commit 2e62c4988bbf2b514aa7672c2ee5252531c7155f Author: Marcus Folkesson Date: Fri Mar 16 16:14:11 2018 +0100 watchdog: add SPDX identifiers for watchdog subsystem - Add SPDX identifier - Remove boiler plate license text - If MODULE_LICENSE and boiler plate does not match, go for boiler plate license Signed-off-by: Marcus Folkesson Acked-by: Adam Thomson Acked-by: Baruch Siach Acked-by: Charles Keepax Acked-by: Keiji Hayashibara Acked-by: Johannes Thumshirn Acked-by: Florian Fainelli Acked-by: Mans Rullgard Acked-by: Matthias Brugger Acked-by: Michal Simek Acked-by: Neil Armstrong Acked-by: Nicolas Ferre Acked-by: Thierry Reding Acked-by: Tomas Winkler Acked-by: Patrice Chotard Acked-by: William Breathitt Gray Reviewed-by: Eric Anholt Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/ar7_wdt.c | 14 +---------- drivers/watchdog/at91rm9200_wdt.c | 5 +--- drivers/watchdog/at91sam9_wdt.c | 5 +--- drivers/watchdog/at91sam9_wdt.h | 5 +--- drivers/watchdog/bcm2835_wdt.c | 5 +--- drivers/watchdog/bcm47xx_wdt.c | 5 +--- drivers/watchdog/bcm63xx_wdt.c | 5 +--- drivers/watchdog/bcm7038_wdt.c | 12 ++-------- drivers/watchdog/bcm_kona_wdt.c | 9 +------ drivers/watchdog/cadence_wdt.c | 5 +--- drivers/watchdog/da9052_wdt.c | 6 +---- drivers/watchdog/da9055_wdt.c | 6 +---- drivers/watchdog/da9062_wdt.c | 10 +------- drivers/watchdog/da9063_wdt.c | 5 +--- drivers/watchdog/digicolor_wdt.c | 5 +--- drivers/watchdog/ebc-c384_wdt.c | 1 + drivers/watchdog/mei_wdt.c | 12 ++-------- drivers/watchdog/mena21_wdt.c | 4 +--- drivers/watchdog/meson_gxbb_wdt.c | 50 +-------------------------------------- drivers/watchdog/mtk_wdt.c | 11 +-------- drivers/watchdog/mtx-1_wdt.c | 11 +-------- drivers/watchdog/of_xilinx_wdt.c | 8 ++----- drivers/watchdog/st_lpc_wdt.c | 6 +---- drivers/watchdog/tangox_wdt.c | 6 +---- drivers/watchdog/tegra_wdt.c | 10 +------- drivers/watchdog/uniphier_wdt.c | 10 +------- drivers/watchdog/wm831x_wdt.c | 5 +--- drivers/watchdog/wm8350_wdt.c | 5 +--- 28 files changed, 31 insertions(+), 210 deletions(-) commit 6ffa3402211acc30e47e691e14d62f3fd065a54e Author: Milton Miller Date: Thu Mar 15 11:02:06 2018 -0500 watchdog: aspeed: Allow configuring for alternate boot Allow the device tree to specify a watchdog to fallover to the alternate boot source. The aspeeed watchdog can set a latch directing flash chip select 0 to chip select 1, allowing boot from an alternate media if the watchdog is not reset in time. On the ast2400 bank 1 also goes to flash bank 1, while on the ast2500 the chip selects are swapped. Also clear the secondary boot bit during the machine restart operation. Otherwise, the system will switch to the alternate boot after every reboot, which is not desired. Signed-off-by: Milton Miller Signed-off-by: Eddie James Reviewed-by: Joel Stanley Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/aspeed_wdt.c | 4 ++++ 1 file changed, 4 insertions(+) commit 975b7f0fe669c313f925d60d67bce21f109b0f13 Author: Joel Stanley Date: Tue Mar 13 16:47:26 2018 +1030 watchdog: Add Nuvoton NPCM watchdog driver The Nuvoton NPCM750 has a watchdog implemented as a single register inside the timer peripheral. This driver exposes that watchdog as a standard watchdog device with coarse timeout intervals, limited by the combination of prescaler and counter that is provided by the hardware. The calculation is taken from the Nuvoton vendor tree. The watchdog is left running if a bootloader had it going. The rate is the one specified in the device tree, or the default value (obtained from the datasheet). There is a pre-timeout IRQ that is wired up. This timeout always occurs 1024 clocks before the timeout. Signed-off-by: Joel Stanley Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 11 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/npcm_wdt.c | 254 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 266 insertions(+) commit 1daa85d13f39144e43508fdd364ecbbaffbf35dc Author: Joel Stanley Date: Tue Mar 13 16:47:25 2018 +1030 dt-bindings: watchdog: Add Nuvoton NPCM description These bindings describe the watchdog IP as used by the Nuvoton NPCM750 (Poleg) BMC SoC. Reviewed-by: Rob Herring Signed-off-by: Joel Stanley Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck .../bindings/watchdog/nuvoton,npcm-wdt.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 568fa7e087ef98bc85b5aa31ea7c9252c1305c1f Author: Andrew Chant Date: Fri Mar 23 19:25:24 2018 -0700 ALSA: usb-audio: update clock valid control Make the "clock valid" control a global control instead of a mixer so that it doesn't appear in mixer applications. Additionally, remove the check for writeability prohibited by spec, and Use common code to read the control value. Tested with a UAC2 Audio device that presents a clock validity control. The control still shows up in /proc usbmixer but not in alsamixer. Signed-off-by: Andrew Chant Signed-off-by: Takashi Iwai sound/usb/mixer.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit 5a222e8494524d04cc8de63726644759e5b132f7 Author: Andrew Chant Date: Fri Mar 23 19:25:23 2018 -0700 ALSA: usb-audio: UAC2 jack detection This implements UAC2 jack detection support, presenting jack status as a boolean read-only mono mixer. The presence of any channel in the UAC2_TE_CONNECTOR control for a terminal will result in the mixer saying the jack is connected. Mixer naming follows the convention in sound/core/ctljack.c, terminating the mixer with " Jack". For additional clues as to which jack is being presented, the name is prefixed with " - Input Jack" or " - Output Jack" depending on if it's an input or output terminal. This is required because terminal names are ambiguous between inputs and outputs and often duplicated - Bidirectional terminal types (0x400 -> 0x4FF) "... may be used separately for input only or output only. These types require two Terminal descriptors. Both have the same type." (quote from "USB Device Class Definition for Terminal Types") Since bidirectional terminal types are common for headphone adapters, this distinguishes between two otherwise identically-named jack controls. Tested with a UAC2 audio device with connector control capability. Signed-off-by: Andrew Chant Signed-off-by: Takashi Iwai sound/usb/mixer.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) commit ea2301b6220117398a1de4f4bc853fbe886d5e08 Merge: 0803e60 99fec39 Author: Ingo Molnar Date: Sat Mar 24 09:25:26 2018 +0100 Merge branch 'linus' into x86/dma, to resolve a conflict with upstream Conflicts: arch/x86/mm/init_64.c Signed-off-by: Ingo Molnar commit 7054e4e0b165ba74562adef96a6b1c53fb9600a4 Merge: 5701dd1 c917e0f2 Author: Ingo Molnar Date: Sat Mar 24 09:21:47 2018 +0100 Merge branch 'perf/urgent' into perf/core, to pick up fixes With the cherry-picked perf/urgent commit merged separately we can now merge all the fixes without conflicts. Signed-off-by: Ingo Molnar commit 5701dd1e87d5b3e72226a6cc9b83ef740b4a3dd0 Merge: ecd380b 2c2a9bb Author: Ingo Molnar Date: Sat Mar 24 09:21:14 2018 +0100 Merge branch 'perf/urgent' into perf/core, to resolve conflicts Pick up a cherry-picked commit. Signed-off-by: Ingo Molnar commit 94cb5492409219ee3f9468616dd58af314029f76 Author: Davide Caratti Date: Fri Mar 23 19:31:30 2018 +0100 net/sched: act_vlan: declare push_vid with host byte order use u16 in place of __be16 to suppress the following sparse warnings: net/sched/act_vlan.c:150:26: warning: incorrect type in assignment (different base types) net/sched/act_vlan.c:150:26: expected restricted __be16 [usertype] push_vid net/sched/act_vlan.c:150:26: got unsigned short net/sched/act_vlan.c:151:21: warning: restricted __be16 degrades to integer net/sched/act_vlan.c:208:26: warning: incorrect type in assignment (different base types) net/sched/act_vlan.c:208:26: expected unsigned short [unsigned] [usertype] tcfv_push_vid net/sched/act_vlan.c:208:26: got restricted __be16 [usertype] push_vid Signed-off-by: Davide Caratti Signed-off-by: David S. Miller net/sched/act_vlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit affaa0c724c14c914625647efe7b95dfbe8d08f2 Author: Davide Caratti Date: Fri Mar 23 19:09:39 2018 +0100 net/sched: remove tcf_idr_cleanup() tcf_idr_cleanup() is no more used, so remove it. Suggested-by: Cong Wang Signed-off-by: Davide Caratti Signed-off-by: David S. Miller include/net/act_api.h | 1 - net/sched/act_api.c | 8 -------- 2 files changed, 9 deletions(-) commit 353def80c3d37a8e4a196b6856df4bc8c67304bf Author: Ido Schimmel Date: Fri Mar 23 21:03:58 2018 +0300 mlxsw: spectrum_span: Prevent duplicate mirrors In net commit 8175f7c4736f ("mlxsw: spectrum: Prevent duplicate mirrors") we prevented the user from mirroring more than once from a single binding point (port-direction pair). The fix was essentially reverted in a merge conflict resolution when net was merged into net-next. Restore it. Fixes: 03fe2debbb27 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net") Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_span.c | 28 ++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) commit fa4493f0d9b3ac8f36743f1a26e2318b449ee4c8 Author: Dave Chinner Date: Fri Mar 23 10:22:54 2018 -0700 xfs: remove dead inode version setting code We can only get into the branch if CRCs are enabled, so there's no need to check inside the branch for CRCs being enabled.... Signed-Off-By: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_inode_buf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ee457001ed6c6f31ddad69c24c1da8f377d8472d Author: Dave Chinner Date: Fri Mar 23 10:22:53 2018 -0700 xfs: catch inode allocation state mismatch corruption We recently came across a V4 filesystem causing memory corruption due to a newly allocated inode being setup twice and being added to the superblock inode list twice. From code inspection, the only way this could happen is if a newly allocated inode was not marked as free on disk (i.e. di_mode wasn't zero). Running the metadump on an upstream debug kernel fails during inode allocation like so: XFS: Assertion failed: ip->i_d.di_nblocks == 0, file: fs/xfs/xfs_inod= e.c, line: 838 ------------[ cut here ]------------ kernel BUG at fs/xfs/xfs_message.c:114! invalid opcode: 0000 [#1] PREEMPT SMP CPU: 11 PID: 3496 Comm: mkdir Not tainted 4.16.0-rc5-dgc #442 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/0= 1/2014 RIP: 0010:assfail+0x28/0x30 RSP: 0018:ffffc9000236fc80 EFLAGS: 00010202 RAX: 00000000ffffffea RBX: 0000000000004000 RCX: 0000000000000000 RDX: 00000000ffffffc0 RSI: 000000000000000a RDI: ffffffff8227211b RBP: ffffc9000236fce8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000bec R11: f000000000000000 R12: ffffc9000236fd30 R13: ffff8805c76bab80 R14: ffff8805c77ac800 R15: ffff88083fb12e10 FS: 00007fac8cbff040(0000) GS:ffff88083fd00000(0000) knlGS:0000000000000= 000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fffa6783ff8 CR3: 00000005c6e2b003 CR4: 00000000000606e0 Call Trace: xfs_ialloc+0x383/0x570 xfs_dir_ialloc+0x6a/0x2a0 xfs_create+0x412/0x670 xfs_generic_create+0x1f7/0x2c0 ? capable_wrt_inode_uidgid+0x3f/0x50 vfs_mkdir+0xfb/0x1b0 SyS_mkdir+0xcf/0xf0 do_syscall_64+0x73/0x1a0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Extracting the inode number we crashed on from an event trace and looking at it with xfs_db: xfs_db> inode 184452204 xfs_db> p core.magic = 0x494e core.mode = 0100644 core.version = 2 core.format = 2 (extents) core.nlinkv2 = 1 core.onlink = 0 ..... Confirms that it is not a free inode on disk. xfs_repair also trips over this inode: ..... zero length extent (off = 0, fsbno = 0) in ino 184452204 correcting nextents for inode 184452204 bad attribute fork in inode 184452204, would clear attr fork bad nblocks 1 for inode 184452204, would reset to 0 bad anextents 1 for inode 184452204, would reset to 0 imap claims in-use inode 184452204 is free, would correct imap would have cleared inode 184452204 ..... disconnected inode 184452204, would move to lost+found And so we have a situation where the directory structure and the inobt thinks the inode is free, but the inode on disk thinks it is still in use. Where this corruption came from is not possible to diagnose, but we can detect it and prevent the kernel from oopsing on lookup. The reproducer now results in: $ sudo mkdir /mnt/scratch/{0,1,2,3,4,5}{0,1,2,3,4,5} mkdir: cannot create directory =E2=80=98/mnt/scratch/00=E2=80=99: File ex= ists mkdir: cannot create directory =E2=80=98/mnt/scratch/01=E2=80=99: File ex= ists mkdir: cannot create directory =E2=80=98/mnt/scratch/03=E2=80=99: Structu= re needs cleaning mkdir: cannot create directory =E2=80=98/mnt/scratch/04=E2=80=99: Input/o= utput error mkdir: cannot create directory =E2=80=98/mnt/scratch/05=E2=80=99: Input/o= utput error .... And this corruption shutdown: [ 54.843517] XFS (loop0): Corruption detected! Free inode 0xafe846c not= marked free on disk [ 54.845885] XFS (loop0): Internal error xfs_trans_cancel at line 1023 = of file fs/xfs/xfs_trans.c. Caller xfs_create+0x425/0x670 [ 54.848994] CPU: 10 PID: 3541 Comm: mkdir Not tainted 4.16.0-rc5-dgc #= 443 [ 54.850753] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIO= S 1.10.2-1 04/01/2014 [ 54.852859] Call Trace: [ 54.853531] dump_stack+0x85/0xc5 [ 54.854385] xfs_trans_cancel+0x197/0x1c0 [ 54.855421] xfs_create+0x425/0x670 [ 54.856314] xfs_generic_create+0x1f7/0x2c0 [ 54.857390] ? capable_wrt_inode_uidgid+0x3f/0x50 [ 54.858586] vfs_mkdir+0xfb/0x1b0 [ 54.859458] SyS_mkdir+0xcf/0xf0 [ 54.860254] do_syscall_64+0x73/0x1a0 [ 54.861193] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 54.862492] RIP: 0033:0x7fb73bddf547 [ 54.863358] RSP: 002b:00007ffdaa553338 EFLAGS: 00000246 ORIG_RAX: 0000= 000000000053 [ 54.865133] RAX: ffffffffffffffda RBX: 00007ffdaa55449a RCX: 00007fb73= bddf547 [ 54.866766] RDX: 0000000000000001 RSI: 00000000000001ff RDI: 00007ffda= a55449a [ 54.868432] RBP: 00007ffdaa55449a R08: 00000000000001ff R09: 00005623a= 8670dd0 [ 54.870110] R10: 00007fb73be72d5b R11: 0000000000000246 R12: 000000000= 00001ff [ 54.871752] R13: 00007ffdaa5534b0 R14: 0000000000000000 R15: 00007ffda= a553500 [ 54.873429] XFS (loop0): xfs_do_force_shutdown(0x8) called from line 1= 024 of file fs/xfs/xfs_trans.c. Return address = ffffffff814cd050 [ 54.882790] XFS (loop0): Corruption of in-memory data detected. Shutt= ing down filesystem [ 54.884597] XFS (loop0): Please umount the filesystem and rectify the = problem(s) Note that this crash is only possible on v4 filesystemsi or v5 filesystems mounted with the ikeep mount option. For all other V5 filesystems, this problem cannot occur because we don't read inodes we are allocating from disk - we simply overwrite them with the new inode information. Signed-Off-By: Dave Chinner Reviewed-by: Carlos Maiolino Tested-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_icache.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit b83e4c3ced2bc08a5e0d3b796de4e795e342d8b6 Author: Darrick J. Wong Date: Fri Mar 23 10:06:57 2018 -0700 xfs: xfs_scrub_iallocbt_xref_rmap_inodes should use xref_set_corrupt In xfs_scrub_iallocbt_xref_rmap_inodes we're checking inodes against rmap records, so we should use xfs_scrub_btree_xref_set_corrupt if we encounter discrepancies here so that we know that it's a cross referencing error, not necessarily a corruption in the inobt itself. The userspace xfs_scrub program will try to repair outright corruptions in the agi/inobt prior to phase 3 so that the inode scan will proceed. If only a cross-referencing error is noted, the repair program defers the repair attempt until it can check the other space metadata at least once. It is therefore essential that the inobt scrubber can correctly distinguish between corruptions and "unable to cross-reference something else with this inobt". The same reasoning applies to "xfs: record inode buf errors as a xref error in inobt scrubber". Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/scrub/ialloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5927268f5a04c3b25683e52a0017aa5a9e8eee70 Author: Darrick J. Wong Date: Fri Mar 23 10:06:56 2018 -0700 xfs: flag inode corruption if parent ptr doesn't get us a real inode If a directory's parent inode pointer doesn't point to an inode, the directory should be flagged as corrupt. Enable IGET_UNTRUSTED here so that _iget will return -EINVAL if the inobt does not confirm that the inode is present and allocated and we can flag the directory corruption. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/scrub/parent.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 6a96c5650568a2218712d43ec16f3f82296a6c53 Author: Darrick J. Wong Date: Fri Mar 23 10:06:56 2018 -0700 xfs: don't accept inode buffers with suspicious unlinked chains When we're verifying inode buffers, sanity-check the unlinked pointer. We don't want to run the risk of trying to purge something that's obviously broken. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_inode_buf.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 8bb82bc12a9e75dd47047d9a2e53135cc5e5787b Author: Darrick J. Wong Date: Fri Mar 23 10:06:55 2018 -0700 xfs: move inode extent size hint validation to libxfs Extent size hint validation is used by scrub to decide if there's an error, and it will be used by repair to decide to remove the hint. Since these use the same validation functions, move them to libxfs. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_inode_buf.c | 105 ++++++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_inode_buf.h | 5 ++ fs/xfs/scrub/inode.c | 100 +++++----------------------------------- 3 files changed, 122 insertions(+), 88 deletions(-) commit 1b44a6aecc1193336f228204d2f3ae9f7737e78c Author: Darrick J. Wong Date: Fri Mar 23 10:06:55 2018 -0700 xfs: record inode buf errors as a xref error in inobt scrubber During the inode btree scrubs we try to confirm the freemask bits against the inode records. If the inode buffer read fails, this is a cross-referencing error, not a corruption of the inode btree itself. Use the xref_process_error call here. Found via core.version middlebit fuzz in xfs/415. The userspace xfs_scrub program will try to repair outright corruptions in the agi/inobt prior to phase 3 so that the inode scan will proceed. If only a cross-referencing error is noted, the repair program defers the repair attempt until it can check the other space metadata at least once. It is therefore essential that the inobt scrubber can correctly distinguish between corruptions and "unable to cross-reference something else with this inobt". Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/scrub/ialloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7e56d9eaea1397efbac7e6813cbb74066586fdd4 Author: Darrick J. Wong Date: Fri Mar 23 10:06:54 2018 -0700 xfs: remove xfs_buf parameter from inode scrub methods Now that we no longer do raw inode buffer scrubbing, the bp parameter is no longer used anywhere we're dealing with an inode, so remove it and all the useless NULL parameters that go with it. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/scrub/attr.c | 2 +- fs/xfs/scrub/bmap.c | 4 +- fs/xfs/scrub/common.c | 22 ++++------ fs/xfs/scrub/common.h | 13 +++--- fs/xfs/scrub/dir.c | 2 +- fs/xfs/scrub/inode.c | 106 +++++++++++++++++++++++------------------------- fs/xfs/scrub/quota.c | 2 +- fs/xfs/scrub/rtbitmap.c | 3 +- fs/xfs/scrub/trace.h | 31 +++----------- 9 files changed, 74 insertions(+), 111 deletions(-) commit d0018ad88909a959e17132d694a7ad917a14883f Author: Darrick J. Wong Date: Fri Mar 23 10:06:54 2018 -0700 xfs: inode scrubber shouldn't bother with raw checks The inode scrubber tries to _iget the inode prior to running checks. If that _iget call fails with corruption errors that's an automatic fail, regardless of whether it was the inode buffer read verifier, the ifork verifier, or the ifork formatter that errored out. Therefore, get rid of the raw mode scrub code because it's not needed. Found by trying to fix some test failures in xfs/379 and xfs/415. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/scrub/inode.c | 102 +++++++-------------------------------------------- 1 file changed, 13 insertions(+), 89 deletions(-) commit 5e777b62b0bcb645f165fe5e056fe8862782affc Author: Darrick J. Wong Date: Fri Mar 23 10:06:53 2018 -0700 xfs: bmap scrubber should do rmap xref with bmap for sparse files When we're scanning an extent mapping inode fork, ensure that every rmap record for this ifork has a corresponding bmbt record too. This (mostly) provides the ability to cross-reference rmap records with bmap data. The rmap scrubber cannot do the xref on its own because that requires taking an ilock with the agf lock held, which violates our locking order rules (inode, then agf). Note that we only do this for forks that are in btree format due to the increased complexity; or forks that should have data but suspiciously have zero extents because the inode could have just had its iforks zapped by the inode repair code and now we need to reclaim the old extents. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/scrub/bmap.c | 170 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 169 insertions(+), 1 deletion(-) commit 6edb181053f067cee64d4239830062cb40ddab00 Author: Darrick J. Wong Date: Fri Mar 23 10:06:53 2018 -0700 xfs: refactor inode buffer verifier error logging When the inode buffer verifier encounters an error, it's much more helpful to print a buffer from the offending inode instead of just the start of the inode chunk buffer. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_inode_buf.c | 4 +++- fs/xfs/xfs_error.c | 29 ++++++++++++++++++++++++----- fs/xfs/xfs_error.h | 3 +++ 3 files changed, 30 insertions(+), 6 deletions(-) commit 90a58f95717b46f67756580ad5f8b698304e4bad Author: Darrick J. Wong Date: Fri Mar 23 10:06:52 2018 -0700 xfs: refactor inode verifier error logging Refactor some of the inode verifier failure logging call sites to use the new xfs_inode_verifier_error method which dumps the offending buffer as well as the code location of the failed check. This trims the output, makes it clearer to the admin that repair must be run, and gives the developers more details to work from. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_bmap.c | 5 +++-- fs/xfs/libxfs/xfs_inode_fork.c | 15 +++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) commit 30b0984d9117dd14c895265886d34335856b712b Author: Darrick J. Wong Date: Fri Mar 23 10:06:52 2018 -0700 xfs: refactor bmap record validation Refactor the bmap validator into a more complete helper that looks for extents that run off the end of the device, overflow into the next AG, or have invalid flag states. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_bmap.c | 46 +++++++++++++++++++++++++++++++++++++++--- fs/xfs/libxfs/xfs_bmap.h | 3 +++ fs/xfs/libxfs/xfs_bmap_btree.h | 14 ------------- fs/xfs/libxfs/xfs_inode_fork.c | 12 +++++++---- 4 files changed, 54 insertions(+), 21 deletions(-) commit 6915ef35c0350e87a104cb4c4ab2121c81ca7a34 Author: Darrick J. Wong Date: Fri Mar 23 10:06:51 2018 -0700 xfs: sanity-check the unused space before trying to use it In xfs_dir2_data_use_free, we examine on-disk metadata and ASSERT if it doesn't make sense. Since a carefully crafted fuzzed image can cause the kernel to crash after blowing a bunch of assertions, let's move those checks into a validator function and rig everything up to return EFSCORRUPTED to userspace. Found by lastbit fuzzing ltail.bestcount via xfs/391. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_dir2.h | 2 +- fs/xfs/libxfs/xfs_dir2_block.c | 59 +++++++++++++++++++------------- fs/xfs/libxfs/xfs_dir2_data.c | 78 ++++++++++++++++++++++++++++++++---------- fs/xfs/libxfs/xfs_dir2_leaf.c | 10 ++++-- fs/xfs/libxfs/xfs_dir2_node.c | 11 ++++-- 5 files changed, 111 insertions(+), 49 deletions(-) commit a27ba2607e60312554cbcd43fc660b2c7f29dc9c Author: Brian Foster Date: Thu Mar 15 10:51:58 2018 -0700 xfs: detect agfl count corruption and reset agfl The struct xfs_agfl v5 header was originally introduced with unexpected padding that caused the AGFL to operate with one less slot than intended. The header has since been packed, but the fix left an incompatibility for users who upgrade from an old kernel with the unpacked header to a newer kernel with the packed header while the AGFL happens to wrap around the end. The newer kernel recognizes one extra slot at the physical end of the AGFL that the previous kernel did not. The new kernel will eventually attempt to allocate a block from that slot, which contains invalid data, and cause a crash. This condition can be detected by comparing the active range of the AGFL to the count. While this detects a padding mismatch, it can also trigger false positives for unrelated flcount corruption. Since we cannot distinguish a size mismatch due to padding from unrelated corruption, we can't trust the AGFL enough to simply repopulate the empty slot. Instead, avoid unnecessarily complex detection logic and and use a solution that can handle any form of flcount corruption that slips through read verifiers: distrust the entire AGFL and reset it to an empty state. Any valid blocks within the AGFL are intentionally leaked. This requires xfs_repair to rectify (which was already necessary based on the state the AGFL was found in). The reset mitigates the side effect of the padding mismatch problem from a filesystem crash to a free space accounting inconsistency. The generic approach also means that this patch can be safely backported to kernels with or without a packed struct xfs_agfl. Check the AGF for an invalid freelist count on initial read from disk. If detected, set a flag on the xfs_perag to indicate that a reset is required before the AGFL can be used. In the first transaction that attempts to use a flagged AGFL, reset it to empty, warn the user about the inconsistency and allow the freelist fixup code to repopulate the AGFL with new blocks. The xfs_perag flag is cleared to eliminate the need for repeated checks on each block allocation operation. This allows kernels that include the packing fix commit 96f859d52bcb ("libxfs: pack the agfl header structure so XFS_AGFL_SIZE is correct") to handle older unpacked AGFL formats without a filesystem crash. Suggested-by: Dave Chinner Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by Dave Chiluk Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_alloc.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_mount.h | 1 + fs/xfs/xfs_trace.h | 9 ++++- 3 files changed, 103 insertions(+), 1 deletion(-) commit 3e4da466bfa1dea40b2b23130a9dc4acebcc9f14 Author: Christoph Hellwig Date: Tue Mar 13 23:15:30 2018 -0700 xfs: unwind the try_again loop in xfs_log_force Instead split out a __xfs_log_fore_lsn helper that gets called again with the already_slept flag set to true in case we had to sleep. This prepares for aio_fsync support. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 72 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 30 deletions(-) commit 93806299b56b22df8fec9b78cb4c9c41d283ee2a Author: Christoph Hellwig Date: Tue Mar 13 23:15:29 2018 -0700 xfs: refactor xfs_log_force_lsn Use the the smallest possible loop as preable to find the correct iclog buffer, and then use gotos for unwinding to straighten the code. Also fix the top of function comment while we're at it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 142 ++++++++++++++++++++++++------------------------------- 1 file changed, 62 insertions(+), 80 deletions(-) commit 1180b4c757aab5506f1be367000364dd5cf5cd02 Author: John Johansen Date: Thu Mar 15 22:31:38 2018 -0700 apparmor: fix dangling symlinks to policy rawdata after replacement When policy replacement occurs the symlinks in the profile directory need to be updated to point to the new rawdata, otherwise once the old rawdata is removed the symlink becomes broken. Fix this by dynamically generating the symlink everytime it is read. These links are used enough that their value needs to be cached and this way we can avoid needing locking to read and update the link value. Fixes: a481f4d917835 ("apparmor: add custom apparmorfs that will be used by policy namespace files") BugLink: http://bugs.launchpad.net/bugs/1755563 Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 126 +++++++++++++++++++++++++++++++---------- 1 file changed, 95 insertions(+), 31 deletions(-) commit d53c9f4d212c25b09670a71e2a993071d1e637a2 Author: Dan Carpenter Date: Mon Mar 19 12:12:31 2018 +0300 apparmor: Fix an error code in verify_table_headers() We accidentally return a positive EPROTO instead of a negative -EPROTO. Since 71 is not an error pointer, that means it eventually results in an Oops in the caller. Fixes: d901d6a298dc ("apparmor: dfa split verification of table headers") Signed-off-by: Dan Carpenter Signed-off-by: John Johansen security/apparmor/match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a61ecd329cfa951b7d36c13e9e2a07e7761c0e89 Author: Colin Ian King Date: Fri Mar 23 23:34:22 2018 +0000 apparmor: fix error returns checks by making size a ssize_t Currently variable size is a unsigned size_t, hence comparisons to see if it is less than zero (for error checking) will always be false. Fix this by making size a ssize_t Detected by CoverityScan, CID#1466080 ("Unsigned compared against 0") Fixes: 8e51f9087f40 ("apparmor: Add support for attaching profiles via xattr, presence and value") Signed-off-by: Colin Ian King Signed-off-by: John Johansen security/apparmor/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 797195a376dc9ffa0341e64f28f9ffe5d1ed184f Author: Jan-Marek Glogowski Date: Mon Feb 12 13:08:51 2018 +0100 platform/x86: fujitsu-laptop: Support Lifebook U7x7 hotkeys Generate input events for hotkeys present in Fujitsu Lifebook U727 and U757 laptops: - Fn+F1 (KEY_MICMUTE) - Fn+F5 (KEY_RFKILL) Signed-off-by: Jan-Marek Glogowski Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit ef0f62264b2a9e6fc73476ed22ade1ff1f3ad7f3 Author: Vadim Pasternak Date: Tue Feb 13 22:09:36 2018 +0000 platform/x86: mlx-platform: Add physical bus number auto detection mlx-platform does not provide a bus number to i2c-mlxcpld, assuming it is always one. On some x86 systems, other i2c drivers may probe before i2c-mlxcpld, causing bus one to be busy. Make mlx-platform determine which adapter number is free prior to activating i2c-mlxpld, adjusting the mux base numbers accordingly. Update the mlxreg-hotplug pdata similarly. This adds an explicit mlx-platform build dependency on I2C, update the Kconfig accordingly. Add the missing REGMAP dependency while we're at it. Signed-off-by: Vadim Pasternak [dvhart: Rewrite commit message more concisely] [dvhart: Add build dependencies] Signed-off-by: Darren Hart (VMware) drivers/platform/mellanox/mlxreg-hotplug.c | 12 ++++--- drivers/platform/x86/Kconfig | 1 + drivers/platform/x86/mlx-platform.c | 53 ++++++++++++++++++++++++++++-- include/linux/platform_data/mlxreg.h | 2 ++ 4 files changed, 62 insertions(+), 6 deletions(-) commit f709e1bfb0c643a866b909d101442c7a7f425655 Author: Vadim Pasternak Date: Tue Feb 13 22:09:35 2018 +0000 platform/mellanox: mlxreg-hotplug: Change input for device create routine Change the first input parameter in mlxreg_hotplug_device_create to the pointer to mlxreg_hotplug private data in order to use the fields from the private data structure. Signed-off-by: Vadim Pasternak [dvhart: Cleaned up commit message] Signed-off-by: Darren Hart (VMware) drivers/platform/mellanox/mlxreg-hotplug.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d726f6b1997528354e1053accbb6223981e81802 Author: Vadim Pasternak Date: Tue Feb 13 22:09:34 2018 +0000 platform/x86: mlx-platform: Add deffered bus functionality mlx-platform activates i2c-mux-reg, which creates buses needed by mlxreg-hotplug. If the mlxreg-hotplug probe runs before the i2c-mux-reg probe completes, it may attempt to connect a device to an adapter number that has not been created yet, and fail. Make mlx-platform driver record the highest bus number in mlxreg-hotplug platform data and defer mlxreg-hotplug probe until all the buses are created. Signed-off-by: Vadim Pasternak [dvhart: rewrite commit message more concisely] Signed-off-by: Darren Hart (VMware) drivers/platform/mellanox/mlxreg-hotplug.c | 7 +++++++ drivers/platform/x86/mlx-platform.c | 10 ++++++++++ include/linux/platform_data/mlxreg.h | 2 ++ 3 files changed, 19 insertions(+) commit d066f144d66728b8187bda5ef966b44c58935484 Author: Vadim Pasternak Date: Tue Feb 13 22:09:33 2018 +0000 platform/x86: mlx-platform: Use define for the channel numbers Add define for the channels number for mux device, instead of using hardcoded value inside the code in order to improve code readability. Signed-off-by: Vadim Pasternak Signed-off-by: Darren Hart (VMware) drivers/platform/x86/mlx-platform.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ed93a39871282fc0dbc2fecd0d04ea0ddad54353 Author: Björn Töpel Date: Thu Mar 22 10:02:36 2018 +0100 ixgbe: tweak page counting for XDP_REDIRECT The current page counting scheme assumes that the reference count cannot decrease until the received frame is sent to the upper layers of the networking stack. This assumption does not hold for the XDP_REDIRECT action, since a page (pointed out by xdp_buff) can have its reference count decreased via the xdp_do_redirect call. To work around that, we now start off by a large page count and then don't allow a refcount less than two. Signed-off-by: Björn Töpel Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2eb34bafb352d2ddd02b184c73f3ec4706a4cc12 Author: Tony Nguyen Date: Fri Mar 16 15:34:06 2018 -0700 ixgbevf: Add XDP queue stats reporting XDP stats are included in TX stats, however, they are not reported in TX queue stats since they are setup on different queues. Add reporting for XDP queue stats to provide consistency between the total stats and per queue stats. Signed-off-by: Tony Nguyen Acked-by: John Fastabend Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ethtool.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit be8333322effadce697bcee749c827d6e14b4d31 Author: Tony Nguyen Date: Fri Mar 16 15:34:05 2018 -0700 ixgbevf: Add support for meta data Add support for XDP meta data when using build skb. Based on commit 366a88fe2f40 ("bpf, ixgbe: add meta data support") Signed-off-by: Tony Nguyen Acked-by: John Fastabend Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 29 +++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit efecfd5f803d5957ccf003310bff432c6ebd653b Author: Tony Nguyen Date: Fri Mar 16 15:34:04 2018 -0700 ixgbevf: Delay tail write for XDP packets Current XDP implementation hits the tail on every XDP_TX; change the driver to only hit the tail after packet processing is complete. Based on commit 7379f97a4fce ("ixgbe: delay tail write to every 'n' packets") Signed-off-by: Tony Nguyen Acked-by: John Fastabend Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 30 ++++++++++++++--------- 1 file changed, 18 insertions(+), 12 deletions(-) commit 21092e9ce8b1395f45b2648c839a6d60b21c46e8 Author: Tony Nguyen Date: Fri Mar 16 15:34:03 2018 -0700 ixgbevf: Add support for XDP_TX action This implements the XDP_TX action which is modeled on the ixgbe implementation. However instead of using CPU id to determine which XDP queue to use, this uses the received RX queue index, which is similar to i40e. Doing this eliminates the restriction that number of CPUs not exceed number of XDP queues that ixgbe has. Also, based on the number of queues available, the number of TX queues may be reduced when an XDP program is loaded in order to accommodate the XDP queues. Based largely on commit 33fdc82f0883 ("ixgbe: add support for XDP_TX action") Signed-off-by: Tony Nguyen Acked-by: John Fastabend Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ethtool.c | 35 ++- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 20 +- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 271 +++++++++++++++++++--- 3 files changed, 294 insertions(+), 32 deletions(-) commit c7aec59657b60f3a29fc7d3274ebefd698879301 Author: Tony Nguyen Date: Fri Mar 16 15:34:02 2018 -0700 ixgbevf: Add XDP support for pass and drop actions Implement XDP_PASS and XDP_DROP based on the ixgbe implementation. Based largely on commit 924708081629 ("ixgbe: add XDP support for pass and drop actions"). Signed-off-by: Tony Nguyen Acked-by: John Fastabend Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ethtool.c | 9 +- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 10 +- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 201 ++++++++++++++++++---- 3 files changed, 178 insertions(+), 42 deletions(-) commit 70da6824c3db2b0ab3088a5451eda6aa2302c51f Author: Shannon Nelson Date: Fri Mar 16 11:09:07 2018 -0700 ixgbe: enable TSO with IPsec offload Fix things up to support TSO offload in conjunction with IPsec hw offload. This raises throughput with IPsec offload on to nearly line rate. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 9 ++++++-- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 31 ++++++++++++++++++-------- 2 files changed, 29 insertions(+), 11 deletions(-) commit 1db685e6766da5b9929043f4d60dfbb69f7c57c5 Author: Shannon Nelson Date: Fri Mar 16 11:09:06 2018 -0700 ixgbe: no need for esp trailer if GSO There is no need to calculate the trailer length if we're doing a GSO/TSO, as there is no trailer added to the packet data. Also, don't bother clearing the flags field as it was already cleared earlier. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 37 +++++++++++++++----------- 1 file changed, 21 insertions(+), 16 deletions(-) commit 871dd09bdb02957e259ff672876b04891f356d10 Author: Shannon Nelson Date: Fri Mar 16 11:09:05 2018 -0700 ixgbe: remove unneeded ipsec test in TX path Since the ipsec data fields will be zero anyway in the non-ipsec case, we can remove the conditional jump. Suggested-by: Alexander Duyck Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2137aec017fa1fd3ddbd3b01f59e506abef2fef0 Author: Shannon Nelson Date: Fri Mar 16 11:09:04 2018 -0700 ixgbe: no need for ipsec csum feature check With the patch commit f8aa2696b4af ("esp: check the NETIF_F_HW_ESP_TX_CSUM bit before segmenting") we no longer need to protect ourself from checksum offload requests on IPsec packets, so we can remove the check in our .ndo_features_check callback. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 ------ 1 file changed, 6 deletions(-) commit 9bf1e20f65796382e3b5ef28d0881f7e8fae0c92 Author: Paul Greenwalt Date: Thu Mar 15 08:22:07 2018 -0400 ixgbe: fix read-modify-write in x550 phy setup Replaced an assignment operation with an OR operation. The variable assignment was overwriting the value read from the PHY register. The OR operation sets only the intended register bits. The bits that were being overwritten are reserved, so the assignment had no functional impact. Reported by: Shannon Nelson Signed-off-by: Paul Greenwalt Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e97a90f7069b740575bcb1dae86596e0484b8957 Author: Claudio Scordino Date: Tue Mar 13 11:35:40 2018 +0100 sched/cpufreq: Rate limits for SCHED_DEADLINE When the SCHED_DEADLINE scheduling class increases the CPU utilization, it should not wait for the rate limit, otherwise it may miss some deadline. Tests using rt-app on Exynos5422 with up to 10 SCHED_DEADLINE tasks have shown reductions of even 10% of deadline misses with a negligible increase of energy consumption (measured through Baylibre Cape). Signed-off-by: Claudio Scordino Signed-off-by: Thomas Gleixner Reviewed-by: Rafael J. Wysocki Acked-by: Viresh Kumar Cc: Juri Lelli Cc: Joel Fernandes Cc: Vincent Guittot Cc: linux-pm@vger.kernel.org Cc: Peter Zijlstra Cc: Morten Rasmussen Cc: Patrick Bellasi Cc: Todd Kjos Cc: Dietmar Eggemann Link: https://lkml.kernel.org/r/1520937340-2755-1-git-send-email-claudio@evidence.eu.com kernel/sched/cpufreq_schedutil.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit a26cf1c9fe3c2e3b671b490aeb708ea72fb5ac0a Merge: 78e5dfe 681c617 Author: Michael Ellerman Date: Sat Mar 24 08:43:18 2018 +1100 Merge branch 'topic/ppc-kvm' into next This brings in two series from Paul, one of which touches KVM code and may need to be merged into the kvm-ppc tree to resolve conflicts. commit 1aa37845f7601ce9159cd08fdf381cfb5f494c12 Author: Paul Greenwalt Date: Mon Mar 12 09:22:55 2018 -0400 ixgbe: add status reg reads to ixgbe_check_remove Add status register reads and delay between reads to ixgbe_check_remove. Registers can read 0xFFFFFFFF during PCI reset, which causes the driver to remove the adapter. The additional status register reads can reduce the chance of this race condition. If the status register is not 0xFFFFFFFF, then ixgbe_check_remove returns the value of the register being read. Signed-off-by: Paul Greenwalt Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_common.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 31 ++++++++++++++++--------- 2 files changed, 21 insertions(+), 11 deletions(-) commit 40cab6e88cb0b6c56d3f30b7491a20e803f948f6 Author: Takashi Iwai Date: Fri Mar 23 08:03:26 2018 +0100 ALSA: pcm: Return -EBUSY for OSS ioctls changing busy streams OSS PCM stream management isn't modal but it allows ioctls issued at any time for changing the parameters. In the previous hardening patch ("ALSA: pcm: Avoid potential races between OSS ioctls and read/write"), we covered these races and prevent the corruption by protecting the concurrent accesses via params_lock mutex. However, this means that some ioctls that try to change the stream parameter (e.g. channels or format) would be blocked until the read/write finishes, and it may take really long. Basically changing the parameter while reading/writing is an invalid operation, hence it's even more user-friendly from the API POV if it returns -EBUSY in such a situation. This patch adds such checks in the relevant ioctls with the addition of read/write access refcount. Cc: Signed-off-by: Takashi Iwai include/sound/pcm_oss.h | 1 + sound/core/oss/pcm_oss.c | 36 +++++++++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 9 deletions(-) commit 02a5d6925cd34c3b774bdb8eefb057c40a30e870 Author: Takashi Iwai Date: Thu Mar 22 18:10:14 2018 +0100 ALSA: pcm: Avoid potential races between OSS ioctls and read/write Although we apply the params_lock mutex to the whole read and write operations as well as snd_pcm_oss_change_params(), we may still face some races. First off, the params_lock is taken inside the read and write loop. This is intentional for avoiding the too long locking, but it allows the in-between parameter change, which might lead to invalid pointers. We check the readiness of the stream and set up via snd_pcm_oss_make_ready() at the beginning of read and write, but it's called only once, by assuming that it remains ready in the rest. Second, many ioctls that may change the actual parameters (i.e. setting runtime->oss.params=1) aren't protected, hence they can be processed in a half-baked state. This patch is an attempt to plug these holes. The stream readiness check is moved inside the read/write inner loop, so that the stream is always set up in a proper state before further processing. Also, each ioctl that may change the parameter is wrapped with the params_lock for avoiding the races. The issues were triggered by syzkaller in a few different scenarios, particularly the one below appearing as GPF in loopback_pos_update. Reported-by: syzbot+c4227aec125487ec3efa@syzkaller.appspotmail.com Cc: Signed-off-by: Takashi Iwai sound/core/oss/pcm_oss.c | 134 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 106 insertions(+), 28 deletions(-) commit 13d3047c81505cc0fb9bdae7810676e70523c8bf Author: Mika Westerberg Date: Mon Feb 12 13:55:23 2018 +0300 ACPI / hotplug / PCI: Check presence of slot itself in get_slot_status() Mike Lothian reported that plugging in a USB-C device does not work properly in his Dell Alienware system. This system has an Intel Alpine Ridge Thunderbolt controller providing USB-C functionality. In these systems the USB controller (xHCI) is hotplugged whenever a device is connected to the port using ACPI-based hotplug. The ACPI description of the root port in question is as follows: Device (RP01) { Name (_ADR, 0x001C0000) Device (PXSX) { Name (_ADR, 0x02) Method (_RMV, 0, NotSerialized) { // ... } } Here _ADR 0x02 means device 0, function 2 on the bus under root port (RP01) but that seems to be incorrect because device 0 is the upstream port of the Alpine Ridge PCIe switch and it has no functions other than 0 (the bridge itself). When we get ACPI Notify() to the root port resulting from connecting a USB-C device, Linux tries to read PCI_VENDOR_ID from device 0, function 2 which of course always returns 0xffffffff because there is no such function and we never find the device. In Windows this works fine. Now, since we get ACPI Notify() to the root port and not to the PXSX device we should actually start our scan from there as well and not from the non-existent PXSX device. Fix this by checking presence of the slot itself (function 0) if we fail to do that otherwise. While there use pci_bus_read_dev_vendor_id() in get_slot_status(), which is the recommended way to read Device and Vendor IDs of devices on PCI buses. Link: https://bugzilla.kernel.org/show_bug.cgi?id=198557 Reported-by: Mike Lothian Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Cc: Greg Kroah-Hartman Cc: stable@vger.kernel.org drivers/pci/hotplug/acpiphp_glue.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit f3b906d720e429a3acd95f8cbd4fda366fb1659d Author: Nobutaka Okabe Date: Fri Mar 23 19:21:13 2018 +0900 ALSA: usb-audio: Integrate native DSD support for ITF-USB based DACs. Integrate the native DSD support quirk codes of "ITF-USB DSD" based DACs. Now, "is_itf_usb_dsd_2alts_dac()" and "is_itf_usb_dsd_3alts_dac()" is integrated into one function "is_itf_usb_dsd_dac()". So, remove the logic to distinguish UD-501 and UD-501V2 by the "Product Name". The integration is possible by changing the following two functions. - snd_usb_select_mode_quirk(): Change the determination condition of the DSD mode switch command, from the altset number being used, to the audio format being played. Actually, this operation is same as playback using ASIO driver in Windows environment. - snd_usb_interface_dsd_format_quirk(): To which altset supports native DSD is determined by the number of altsets. Previously, it's a constant "2" or "3". Signed-off-by: Nobutaka Okabe Signed-off-by: Takashi Iwai sound/usb/quirks.c | 84 +++++++++++++++--------------------------------------- 1 file changed, 23 insertions(+), 61 deletions(-) commit 74dc71f83e500b2c6bb0d01a947e1b7231456dd8 Author: Nobutaka Okabe Date: Fri Mar 23 19:20:00 2018 +0900 ALSA: usb-audio: FIX native DSD support for TEAC UD-501 DAC There are two versions of TEAC UD-501, the normal version and the vendor updated version(UD-501V2). They have the same VID/PID, but the num of the altsetting is different, UD-501 has 2 altsets for stream, and UD-501V2 has 3. So, add the logic to distinguish them by the Product Name, not by the PID. Signed-off-by: Nobutaka Okabe Signed-off-by: Takashi Iwai sound/usb/quirks.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) commit 71426535f49fe6034d0e0db77608b91a0c1a022d Author: Nobutaka Okabe Date: Fri Mar 23 19:18:22 2018 +0900 ALSA: usb-audio: Add native DSD support for Luxman DA-06 Add native DSD support quirk for Luxman DA-06 DAC, by adding the PID/VID 1852:5065. Rename "is_marantz_denon_dac()" function to "is_itf_usb_dsd_2alts_dac()" to cover broader device family sharing the same USB audio implementation(*). For the same reason, rename "is_teac_dsd_dac()" function to "is_itf_usb_dsd_3alts_dac()". (*) These devices have the same USB controller "ITF-USB DSD", supplied by INTERFACE Co., Ltd. "ITF-USB DSD" USB controller has two patterns, Pattern 1. (2 altsets version) - Altset 0: for control - Altset 1: for stream (S32) - Altset 2: for stream (S32, DSD_U32) Pattern 2. (3 altsets version) - Altset 0: for control - Altset 1: for stream (S16) - Altset 2: for stream (S32) - Altset 3: for stream (S32, DSD_U32) "is_itf_usb_dsd_2alts_dac()" returns true, if the DAC has "Pattern 1" USB controller, and "is_itf_usb_dsd_3alts_dac()" returns true, if "Pattern2". Signed-off-by: Nobutaka Okabe Signed-off-by: Takashi Iwai sound/usb/quirks.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) commit 3446b1e962b387b8cec53e85fdd9392da25a2737 Merge: 21e9b3e b002148 Author: Takashi Iwai Date: Fri Mar 23 22:02:24 2018 +0100 Merge branch 'for-linus' into for-next Back-merge for applying more series of fixes for USB DSD support. Signed-off-by: Takashi Iwai commit f64705b8715a090cd5526a2c082eeb199a51e8b2 Author: Jason Gunthorpe Date: Mon Mar 19 11:30:43 2018 -0600 RDMA/ocrdma: Fix structure layout for ocrdma_alloc_pd The udata's for alloc_pd cannot contain u64s due to alignment constraints. Switch the two never-used u64's to arrays of u32 to reduce the required struct alignment to 4 bytes. These reserved fields are totally unnecessary, never written and never read. Signed-off-by: Jason Gunthorpe include/uapi/rdma/ocrdma-abi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ed807f6aaf787b83885a571268c5d803068f60a6 Merge: 5893ed1 2be8ffe Author: James Morris Date: Sat Mar 24 07:48:26 2018 +1100 Merge tag 'tpmdd-next-20180323' of git://git.infradead.org/users/jjs/linux-tpmdd into next-tpm tpmdd updates for Linux 4.17 from Jarkko: "This release contains only bug fixes. There are no new major features added." commit 980b68ec0694f250e967cb18c5705ef5de10fdd5 Author: Arnaldo Carvalho de Melo Date: Fri Mar 23 12:26:39 2018 -0300 perf annotate: Use absolute addresses to calculate jump target offsets These types of jumps were confusing the annotate browser: entry_SYSCALL_64 /lib/modules/4.16.0-rc5-00086-gdf09348f78dc/build/vmlinux entry_SYSCALL_64 /lib/modules/4.16.0-rc5-00086-gdf09348f78dc/build/vmlinux Percent│ffffffff81a00020: swapgs │ffffffff81a00128: ↓ jae ffffffff81a00139 │ffffffff81a00155: → jmpq *0x825d2d(%rip) # ffffffff82225e88 I.e. the syscall_return_via_sysret function is actually "inside" the entry_SYSCALL_64 function, and the offsets in jumps like these (+0x53) are relative to syscall_return_via_sysret, not to syscall_return_via_sysret. Or this may be some artifact in how the assembler marks the start and end of a function and how this ends up in the ELF symtab for vmlinux, i.e. syscall_return_via_sysret() isn't "inside" entry_SYSCALL_64, but just right after it. From readelf -sw vmlinux: 80267: ffffffff81a00020 315 NOTYPE GLOBAL DEFAULT 1 entry_SYSCALL_64 316: ffffffff81a000e6 0 NOTYPE LOCAL DEFAULT 1 syscall_return_via_sysret 0xffffffff81a00020 + 315 > 0xffffffff81a000e6 So instead of looking for offsets after that last '+' sign, calculate offsets for jump target addresses that are inside the function being disassembled from the absolute address, 0xffffffff81a00139 in this case, subtracting from it the objdump address for the start of the function being disassembled, entry_SYSCALL_64() in this case. So, before this patch: entry_SYSCALL_64 /lib/modules/4.16.0-rc5-00086-gdf09348f78dc/build/vmlinux Percent│ pop %r10 │ pop %r9 │ pop %r8 │ pop %rax │ pop %rsi │ pop %rdx │ pop %rsi │ mov %rsp,%rdi │ mov %gs:0x5004,%rsp │ pushq 0x28(%rdi) │ pushq (%rdi) │ push %rax │ ↑ jmp 6c │ mov %cr3,%rdi │ ↑ jmp 62 │ mov %rdi,%rax │ and $0x7ff,%rdi │ bt %rdi,%gs:0x2219a │ ↑ jae 53 │ btr %rdi,%gs:0x2219a │ mov %rax,%rdi │ ↑ jmp 5b After: entry_SYSCALL_64 /lib/modules/4.16.0-rc5-00086-gdf09348f78dc/build/vmlinux 0.65 │ → jne swapgs_restore_regs_and_return_to_usermode │ pop %r10 │ pop %r9 │ pop %r8 │ pop %rax │ pop %rsi │ pop %rdx │ pop %rsi │ mov %rsp,%rdi │ mov %gs:0x5004,%rsp │ pushq 0x28(%rdi) │ pushq (%rdi) │ push %rax │ ↓ jmp 132 │ mov %cr3,%rdi │ ┌──jmp 128 │ │ mov %rdi,%rax │ │ and $0x7ff,%rdi │ │ bt %rdi,%gs:0x2219a │ │↓ jae 119 │ │ btr %rdi,%gs:0x2219a │ │ mov %rax,%rdi │ │↓ jmp 121 │119:│ mov %rax,%rdi │ │ bts $0x3f,%rdi │121:│ or $0x800,%rdi │128:└─→or $0x1000,%rdi │ mov %rdi,%cr3 │132: pop %rax │ pop %rdi │ pop %rsp │ → jmpq *0x825d2d(%rip) # ffffffff82225e88 With those at least navigating to the right destination, an improvement for these cases seems to be to be to somehow mark those inner functions, which in this case could be: entry_SYSCALL_64 /lib/modules/4.16.0-rc5-00086-gdf09348f78dc/build/vmlinux │syscall_return_via_sysret: │ pop %r15 │ pop %r14 │ pop %r13 │ pop %r12 │ pop %rbp │ pop %rbx │ pop %rsi │ pop %r10 │ pop %r9 │ pop %r8 │ pop %rax │ pop %rsi │ pop %rdx │ pop %rsi │ mov %rsp,%rdi │ mov %gs:0x5004,%rsp │ pushq 0x28(%rdi) │ pushq (%rdi) │ push %rax │ ↓ jmp 132 │ mov %cr3,%rdi │ ┌──jmp 128 │ │ mov %rdi,%rax │ │ and $0x7ff,%rdi │ │ bt %rdi,%gs:0x2219a │ │↓ jae 119 │ │ btr %rdi,%gs:0x2219a │ │ mov %rax,%rdi │ │↓ jmp 121 │119:│ mov %rax,%rdi │ │ bts $0x3f,%rdi │121:│ or $0x800,%rdi │128:└─→or $0x1000,%rdi │ mov %rdi,%cr3 │132: pop %rax │ pop %rdi │ pop %rsp │ → jmpq *0x825d2d(%rip) # ffffffff82225e88 This all gets much better viewed if one uses 'perf report --ignore-vmlinux' forcing the usage of /proc/kcore + /proc/kallsyms, when the above actually gets down to: # perf report --ignore-vmlinux ## do '/64', will show the function names containing '64', ## navigate to /entry_SYSCALL_64_after_hwframe.annotation, ## press 'A' to annotate, then 'P' to print that annotation ## to a file ## From another xterm (or see on screen, this 'P' thing is for ## getting rid of those right side scroll bars/spaces): # cat /entry_SYSCALL_64_after_hwframe.annotation entry_SYSCALL_64_after_hwframe() /proc/kcore Event: cycles:ppp Percent Disassembly of section load0: ffffffff9aa00044 : 11.97 push %rax 4.85 push %rdi push %rsi 2.59 push %rdx 2.27 push %rcx 0.32 pushq $0xffffffffffffffda 1.29 push %r8 xor %r8d,%r8d 1.62 push %r9 0.65 xor %r9d,%r9d 1.62 push %r10 xor %r10d,%r10d 5.50 push %r11 xor %r11d,%r11d 3.56 push %rbx xor %ebx,%ebx 4.21 push %rbp xor %ebp,%ebp 2.59 push %r12 0.97 xor %r12d,%r12d 3.24 push %r13 xor %r13d,%r13d 2.27 push %r14 xor %r14d,%r14d 4.21 push %r15 xor %r15d,%r15d 0.97 mov %rsp,%rdi 5.50 → callq do_syscall_64 14.56 mov 0x58(%rsp),%rcx 7.44 mov 0x80(%rsp),%r11 0.32 cmp %rcx,%r11 → jne swapgs_restore_regs_and_return_to_usermode 0.32 shl $0x10,%rcx 0.32 sar $0x10,%rcx 3.24 cmp %rcx,%r11 → jne swapgs_restore_regs_and_return_to_usermode 2.27 cmpq $0x33,0x88(%rsp) 1.29 → jne swapgs_restore_regs_and_return_to_usermode mov 0x30(%rsp),%r11 8.74 cmp %r11,0x90(%rsp) → jne swapgs_restore_regs_and_return_to_usermode 0.32 test $0x10100,%r11 → jne swapgs_restore_regs_and_return_to_usermode 0.32 cmpq $0x2b,0xa0(%rsp) 0.65 → jne swapgs_restore_regs_and_return_to_usermode I.e. using kallsyms makes the function start/end be done differently than using what is in the vmlinux ELF symtab and actually the hits goes to entry_SYSCALL_64_after_hwframe, which is a GLOBAL() after the start of entry_SYSCALL_64: ENTRY(entry_SYSCALL_64) UNWIND_HINT_EMPTY pushq $__USER_CS /* pt_regs->cs */ pushq %rcx /* pt_regs->ip */ GLOBAL(entry_SYSCALL_64_after_hwframe) pushq %rax /* pt_regs->orig_ax */ PUSH_AND_CLEAR_REGS rax=$-ENOSYS And it goes and ends at: cmpq $__USER_DS, SS(%rsp) /* SS must match SYSRET */ jne swapgs_restore_regs_and_return_to_usermode /* * We win! This label is here just for ease of understanding * perf profiles. Nothing jumps here. */ syscall_return_via_sysret: /* rcx and r11 are already restored (see code above) */ UNWIND_HINT_EMPTY POP_REGS pop_rdi=0 skip_r11rcx=1 So perhaps some people should really just play with '--ignore-vmlinux' to force /proc/kcore + kallsyms. One idea is to do both, i.e. have a vmlinux annotation and a kcore+kallsyms one, when possible, and even show the patched location, etc. Reported-by: Linus Torvalds Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-r11knxv8voesav31xokjiuo6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c448234cfe46ec5abc0014dca8b3b49989bffe9e Author: Arnaldo Carvalho de Melo Date: Fri Mar 23 10:57:08 2018 -0300 perf annotate: Defer searching for comma in raw line till it is needed That strchr() in jump__scnprintf() needs to be nuked somehow, as it, IIRC is already done in jump__parse() and if needed at scnprintf() time, should be stashed in the struct filled in parse() time. For now jus defer it to just before where it is used. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-j0t5hagnphoz9xw07bh3ha3g@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e4cc91b8027dbbb8a1f7c24cdecf58cd0b50375f Author: Arnaldo Carvalho de Melo Date: Fri Mar 23 10:50:35 2018 -0300 perf annotate: Support jumping from one function to another For instance: entry_SYSCALL_64 /lib/modules/4.16.0-rc5-00086-gdf09348f78dc/build/vmlinux 5.50 │ → callq do_syscall_64 14.56 │ mov 0x58(%rsp),%rcx 7.44 │ mov 0x80(%rsp),%r11 0.32 │ cmp %rcx,%r11 │ → jne swapgs_restore_regs_and_return_to_usermode 0.32 │ shl $0x10,%rcx 0.32 │ sar $0x10,%rcx 3.24 │ cmp %rcx,%r11 │ → jne swapgs_restore_regs_and_return_to_usermode 2.27 │ cmpq $0x33,0x88(%rsp) 1.29 │ → jne swapgs_restore_regs_and_return_to_usermode │ mov 0x30(%rsp),%r11 8.74 │ cmp %r11,0x90(%rsp) │ → jne swapgs_restore_regs_and_return_to_usermode 0.32 │ test $0x10100,%r11 │ → jne swapgs_restore_regs_and_return_to_usermode 0.32 │ cmpq $0x2b,0xa0(%rsp) 0.65 │ → jne swapgs_restore_regs_and_return_to_usermode It'll behave just like a "call" instruction, i.e. press enter or right arrow over one such line and the browser will navigate to the annotated disassembly of that function, which when exited, via left arrow or esc, will come back to the calling function. Now to support jump to an offset on a different function... Reported-by: Linus Torvalds Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-78o508mqvr8inhj63ddtw7mo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 23 ++++++++++++++++++----- tools/perf/util/annotate.c | 6 ++++-- 2 files changed, 22 insertions(+), 7 deletions(-) commit 2eff061162819e00ec6379874ceb47caef17bcba Author: Arnaldo Carvalho de Melo Date: Fri Mar 23 10:12:33 2018 -0300 perf annotate: Add "_local" to jump/offset validation routines Because they all really check if we can access data structures/visual constructs where a "jump" instruction targets code in the same function, i.e. things like: __pthread_mutex_lock /usr/lib64/libpthread-2.26.so 1.95 │ mov __pthread_force_elision,%ecx │ ┌──test %ecx,%ecx 0.07 │ ├──je 60 │ │ test $0x300,%esi │ │↓ jne 60 │ │ or $0x100,%esi │ │ mov %esi,0x10(%rdi) │ 42:│ mov %esi,%edx │ │ lea 0x16(%r8),%rsi │ │ mov %r8,%rdi │ │ and $0x80,%edx │ │ add $0x8,%rsp │ │→ jmpq __lll_lock_elision │ │ nop 0.29 │ 60:└─→and $0x80,%esi 0.07 │ mov $0x1,%edi 0.29 │ xor %eax,%eax 2.53 │ lock cmpxchg %edi,(%r8) And not things like that "jmpq __lll_lock_elision", that instead should behave like a "call" instruction and "jump" to the disassembly of "___lll_lock_elision". Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-3cwx39u3h66dfw9xjrlt7ca2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 2 +- tools/perf/util/annotate.c | 9 ++++----- tools/perf/util/annotate.h | 14 +++++++++++--- 3 files changed, 16 insertions(+), 9 deletions(-) commit 83428f2fad48e16fddff0cb445cb4fedf5afe4ab Author: Petr Machata Date: Thu Mar 22 00:57:32 2018 +0100 perf python: Reference Py_None before returning it Python None objects are handled just like all the other objects with respect to their reference counting. Before returning Py_None, its reference count thus needs to be bumped. Signed-off-by: Petr Machata Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Petr Machata Link: http://lkml.kernel.org/r/b1e565ecccf68064d8d54f37db5d028dda8fa522.1521675563.git.petrm@mellanox.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/python.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1679ae8f8f4148766423066aeb3dbb0a985a373a Author: Felix Kuehling Date: Fri Mar 23 15:30:36 2018 -0400 drm/amdkfd: Use ordered workqueue to restore processes Restoring multiple processes concurrently can lead to live-locks where each process prevents the other from validating all its BOs. v2: fix duplicate check of same variable Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_module.c | 6 +++++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 30 ++++++++++++++++++++++++++---- 3 files changed, 32 insertions(+), 6 deletions(-) commit 810955ba712fc5c517b5e999fd69bfd20251effb Author: Felix Kuehling Date: Fri Mar 23 15:30:35 2018 -0400 drm/amdgpu: Fix acquiring VM on large-BAR systems On large-BAR systems the VM page tables for compute are accessed by the CPU. Always allow CPU access to the page directory so that it can be used later by the CPU when a VM is converted to a compute VM. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0803e6051c1562e1525c3e044313390bf8b35c2b Author: Christoph Hellwig Date: Fri Mar 23 18:49:30 2018 +0100 swiotlb: Make swiotlb_{alloc,free}_buffer depend on CONFIG_DMA_DIRECT_OPS Otherwise this causes unused symbol warnings for configs that build swiotlb.c only for use by xen-swiotlb.c and that don't otherwise select CONFIG_DMA_DIRECT_OPS, which is possible on arm. Fixes: 16e73adbca76 ("dma/swiotlb: Remove swiotlb_{alloc,free}_coherent()") Reported-by: Stephen Rothwell Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Gleixner Cc: iommu@lists.linux-foundation.org Cc: konrad.wilk@oracle.com Link: https://lkml.kernel.org/r/20180323174930.17767-1-hch@lst.de lib/swiotlb.c | 2 ++ 1 file changed, 2 insertions(+) commit d32ef547fdbbeb9c4351f9d3bc84dec998a3be8c Author: Dan Carpenter Date: Sat Mar 17 14:48:27 2018 +0300 kvm: x86: hyperv: delete dead code in kvm_hv_hypercall() "rep_done" is always zero so the "(((u64)rep_done & 0xfff) << 32)" expression is just zero. We can remove the "res" temporary variable as well and just use "ret" directly. Signed-off-by: Dan Carpenter Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit ea89c065482179b2bf9f9b6788b06a6e0c68a73b Author: Thomas Gleixner Date: Fri Mar 23 00:05:29 2018 +0100 x86/tsc: Get rid of rdtscll() Commit 99770737ca7e ("x86/asm/tsc: Add rdtscll() merge helper") added rdtscll() in August 2015 along with the comment: /* Deprecated, keep it for a cycle for easier merging: */ 12 cycles later it's really overdue for removal. Signed-off-by: Thomas Gleixner arch/x86/events/msr.c | 3 ++- arch/x86/include/asm/msr.h | 3 --- arch/x86/kernel/cpu/mcheck/mce-inject.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) commit bb491ce67aa7c1635e5ae4f2f304a7d13d3dbe71 Author: Andreas Gruenbacher Date: Fri Mar 23 07:33:25 2018 -0700 gfs2: Check for the end of metadata in punch_hole When punching a hole or truncating an inode down to a given size, also check if the truncate point / start of the hole is within the range we have metadata for. Otherwise, we can end up freeing blocks that shouldn't be freed, corrupting the inode, or crashing the machine when trying to punch a hole into the void. When growing an inode via truncate, we set the new size but we don't allocate additional levels of indirect blocks and grow the inode height. When shrinking that inode again, the new size may still point beyond the end of the inode's metadata. Fixes xfstest generic/476. Debugged-by: Bob Peterson Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/bmap.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 156383b190cd1b240a4c8636c9ce7a2a42938b24 Author: Joel Stanley Date: Thu Mar 22 15:53:36 2018 +1030 Documentation: Mention why %p prints ptrval When debugging recent kernels, people will see '(ptrval)' but there isn't much information as to what that means. Briefly describe why it's there. Signed-off-by: Joel Stanley Acked-by: Tobin C. Harding Signed-off-by: Jonathan Corbet Documentation/core-api/printk-formats.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bf02d491237eea10290bd379bf7fc8c37ac6c3b4 Author: Mauro Carvalho Chehab Date: Fri Mar 23 06:51:06 2018 -0300 COPYING: use the new text with points to the license files Now that we have a new COPYING file with points to the Linux license files, replace it with the old content. This patch does: 1 file changed, 0 insertions(+), 0 deletions(-) rename COPYING.new => COPYING (100%) Reviewed-by: Greg Kroah-Hartman Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet COPYING | 358 ++---------------------------------------------------------- COPYING.new | 18 --- 2 files changed, 10 insertions(+), 366 deletions(-) commit 88de995ccf48acaf4eced7ef485118b6bc65b880 Author: Mauro Carvalho Chehab Date: Fri Mar 23 06:51:05 2018 -0300 COPYING: create a new file with points to the Kernel license files With the addition of SPDX patchset, the contents of COPYING file is now duplicated at two other files under LICENSE: LICENSES/preferred/GPL-2.0 LICENSES/exceptions/Linux-syscall-note It is easy to check that the contents of the licence written on those files are identical with COPYING using: $ diff -upr COPYING LICENSES/preferred/GPL-2.0 $ diff -upr COPYING LICENSES/exceptions/Linux-syscall-note|less Also, a new file was added, with describes how SPDX should work at the Kernel source files: Documentation/process/license-rules.rst Instead fo having it copying the contents of two files, and not even mentioning the third one, replace it by a file whose content points to the other tree files, preserving the Kernel's license. Adjust license-rules.rst accordingly. Please notice that this file preserves the Kernel license as is, without any changes. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet COPYING.new | 18 ++++++++++++++++++ Documentation/process/license-rules.rst | 20 +++++++++++--------- 2 files changed, 29 insertions(+), 9 deletions(-) commit 81811c162d4da1ececef14a1efc9602e86d29ef5 Author: Sean Christopherson Date: Tue Mar 20 12:17:21 2018 -0700 KVM: SVM: add struct kvm_svm to hold SVM specific KVM vars Add struct kvm_svm, which is analagous to struct vcpu_svm, along with a helper to_kvm_svm() to retrieve kvm_svm from a struct kvm *. Move the SVM specific variables and struct definitions out of kvm_arch and into kvm_svm. Cc: Tom Lendacky Cc: Brijesh Singh Cc: Suravee Suthikulpanit Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 18 ------ arch/x86/kvm/svm.c | 134 +++++++++++++++++++++++----------------- 2 files changed, 79 insertions(+), 73 deletions(-) commit 40bbb9d03f05d08b10a7ec1a5c229e1a3f3fc3a9 Author: Sean Christopherson Date: Tue Mar 20 12:17:20 2018 -0700 KVM: VMX: add struct kvm_vmx to hold VMX specific KVM vars Add struct kvm_vmx, which wraps struct kvm, and a helper to_kvm_vmx() that retrieves 'struct kvm_vmx *' from 'struct kvm *'. Move the VMX specific variables out of kvm_arch and into kvm_vmx. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 4 ---- arch/x86/kvm/vmx.c | 46 +++++++++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 19 deletions(-) commit 2ac52ab861b920b56e349244e14f957bb349010e Author: Sean Christopherson Date: Tue Mar 20 12:17:19 2018 -0700 KVM: x86: move setting of ept_identity_map_addr to vmx.c Add kvm_x86_ops->set_identity_map_addr and set ept_identity_map_addr in VMX specific code so that ept_identity_map_addr can be moved out of 'struct kvm_arch' in a future patch. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/svm.c | 6 ++++++ arch/x86/kvm/vmx.c | 7 +++++++ arch/x86/kvm/x86.c | 3 +-- 4 files changed, 15 insertions(+), 2 deletions(-) commit 434a1e94469d3b603f1efabfb044182de4cf88ef Author: Sean Christopherson Date: Tue Mar 20 12:17:18 2018 -0700 KVM: x86: define SVM/VMX specific kvm_arch_[alloc|free]_vm Define kvm_arch_[alloc|free]_vm in x86 as pass through functions to new kvm_x86_ops vm_alloc and vm_free, and move the current allocation logic as-is to SVM and VMX. Vendor specific alloc/free functions set the stage for SVM/VMX wrappers of 'struct kvm', which will allow us to move the growing number of SVM/VMX specific member variables out of 'struct kvm_arch'. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 13 +++++++++++++ arch/x86/kvm/svm.c | 12 ++++++++++++ arch/x86/kvm/vmx.c | 12 ++++++++++++ 3 files changed, 37 insertions(+) commit f452518c982e57538e6d49da0a2c80eef22087ab Author: Mathias Kresin Date: Thu Mar 22 23:31:39 2018 +0100 net: phy: intel-xway: add VR9 v1.1 phy ids The phys embedded into the v1.1 of the VR9 SoC are using different phy ids. Add the phy ids to use the driver for this VR9 version as well. Signed-off-by: Mathias Kresin Signed-off-by: David S. Miller drivers/net/phy/intel-xway.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 5b73d9955fb4b0e3c37f8f6c71910293246c89dc Author: Mathias Kresin Date: Thu Mar 22 23:31:38 2018 +0100 net: phy: intel-xway: add VR9 version number The VR9 phy ids are matching only for the SoC version 1.2. Rename the macros and change the names to take this into account. Signed-off-by: Mathias Kresin Signed-off-by: David S. Miller drivers/net/phy/intel-xway.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d5eabf0c8faf8ce8f8c5cfcba67c40592cbb498d Author: kbuild test robot Date: Fri Mar 23 05:31:07 2018 +0800 net: hns3: hclge_inform_reset_assert_to_vf() can be static Fixes: 2bfbd35d8ecd ("net: hns3: Changes required in PF mailbox to support VF reset") Signed-off-by: Fengguang Wu Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7281d591332b9dd0b48a0db3007fa7f99ee8ecc Author: Gustavo A. R. Silva Date: Thu Mar 22 15:08:49 2018 -0500 qed: Use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Gustavo A. R. Silva Acked-by: Sudarsana Kalluru Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6e3e764b5bc83d36c6a634ebe465feddab3f7066 Author: Gustavo A. R. Silva Date: Thu Mar 22 14:59:27 2018 -0500 dpaa_eth: use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f215a3d2448ae77253f0b93dcc37114779f51778 Author: Steve Wise Date: Thu Mar 22 12:53:35 2018 -0700 iw_cxgb4: Add ib_device->get_netdev support This is useful to rdma ULPs. Signed-off-by: Steve Wise Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb4/provider.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 19415dbf3097d3eace4fc756cdf49cad0e697134 Merge: 5946194 52dfae5 Author: David S. Miller Date: Fri Mar 23 13:12:19 2018 -0400 Merge branch 'tipc-introduce-128-bit-auto-configurable-node-id' Jon Maloy says: ==================== tipc: introduce 128-bit auto-configurable node id We introduce a 128-bit free-format node identity as an alternative to the legacy structured 32-bit node address. We also make configuration of this identity optional; if a bearer is enabled without a pre-configured node id it will be set automatically based on the used interface's MAC or IP address. ==================== Signed-off-by: David S. Miller commit 52dfae5c85a4c1078e9f1d5e8947d4a25f73dd81 Author: Jon Maloy Date: Thu Mar 22 20:42:52 2018 +0100 tipc: obtain node identity from interface by default Selecting and explicitly configuring a TIPC node identity may be unwanted in some cases. In this commit we introduce a default setting if the identity has not been set at the moment the first bearer is enabled. We do this by using a raw copy of a unique identifier from the used interface: MAC address in the case of an L2 bearer, IPv4/IPv6 address in the case of a UDP bearer. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bearer.c | 24 +++++++++++++++--------- net/tipc/net.h | 1 + net/tipc/udp_media.c | 13 +++++++++++++ 3 files changed, 29 insertions(+), 9 deletions(-) commit 25b0b9c4e835ffaa65b61c3efe2e28acf84d0259 Author: Jon Maloy Date: Thu Mar 22 20:42:51 2018 +0100 tipc: handle collisions of 32-bit node address hash values When a 32-bit node address is generated from a 128-bit identifier, there is a risk of collisions which must be discovered and handled. We do this as follows: - We don't apply the generated address immediately to the node, but do instead initiate a 1 sec trial period to allow other cluster members to discover and handle such collisions. - During the trial period the node periodically sends out a new type of message, DSC_TRIAL_MSG, using broadcast or emulated broadcast, to all the other nodes in the cluster. - When a node is receiving such a message, it must check that the presented 32-bit identifier either is unused, or was used by the very same peer in a previous session. In both cases it accepts the request by not responding to it. - If it finds that the same node has been up before using a different address, it responds with a DSC_TRIAL_FAIL_MSG containing that address. - If it finds that the address has already been taken by some other node, it generates a new, unused address and returns it to the requester. - During the trial period the requesting node must always be prepared to accept a failure message, i.e., a message where a peer suggests a different (or equal) address to the one tried. In those cases it must apply the suggested value as trial address and restart the trial period. This algorithm ensures that in the vast majority of cases a node will have the same address before and after a reboot. If a legacy user configures the address explicitly, there will be no trial period and messages, so this protocol addition is completely backwards compatible. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/addr.c | 3 +- net/tipc/bearer.c | 3 +- net/tipc/core.c | 2 + net/tipc/core.h | 2 + net/tipc/discover.c | 126 ++++++++++++++++++++++++++++++++++++++++++++-------- net/tipc/link.c | 26 +++++++---- net/tipc/link.h | 4 +- net/tipc/msg.h | 23 +++++++++- net/tipc/net.c | 4 +- net/tipc/node.c | 85 ++++++++++++++++++++++++++++++++--- net/tipc/node.h | 3 +- 11 files changed, 236 insertions(+), 45 deletions(-) commit d50ccc2d3909fc1b4d40e4af16b026f05dc68707 Author: Jon Maloy Date: Thu Mar 22 20:42:50 2018 +0100 tipc: add 128-bit node identifier We add a 128-bit node identity, as an alternative to the currently used 32-bit node address. For the sake of compatibility and to minimize message header changes we retain the existing 32-bit address field. When not set explicitly by the user, this field will be filled with a hash value generated from the much longer node identity, and be used as a shorthand value for the latter. We permit either the address or the identity to be set by configuration, but not both, so when the address value is set by a legacy user the corresponding 128-bit node identity is generated based on the that value. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller include/uapi/linux/tipc_netlink.h | 2 + net/tipc/addr.c | 81 ++++++++++++++++++++++++++++++++------- net/tipc/addr.h | 28 +++++++++++--- net/tipc/core.c | 4 +- net/tipc/core.h | 6 ++- net/tipc/discover.c | 4 +- net/tipc/link.c | 6 ++- net/tipc/name_distr.c | 6 +-- net/tipc/net.c | 51 ++++++++++++++++-------- net/tipc/net.h | 4 +- net/tipc/node.c | 8 +--- net/tipc/node.h | 4 +- 12 files changed, 148 insertions(+), 56 deletions(-) commit 23fd3eace088ab1872ee59c19191a119ec779ac9 Author: Jon Maloy Date: Thu Mar 22 20:42:49 2018 +0100 tipc: remove direct accesses to own_addr field in struct tipc_net As a preparation to changing the addressing structure of TIPC we replace all direct accesses to the tipc_net::own_addr field with the function dedicated for this, tipc_own_addr(). There are no changes to program logics in this commit. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/addr.c | 6 +++--- net/tipc/addr.h | 2 +- net/tipc/discover.c | 3 ++- net/tipc/link.c | 9 ++++----- net/tipc/name_distr.c | 11 ++++++----- net/tipc/name_table.c | 6 +++--- net/tipc/net.c | 31 +++++++++++++------------------ net/tipc/socket.c | 23 ++++++++++------------- 8 files changed, 42 insertions(+), 49 deletions(-) commit b89afb116ca2830cc982624f93e888860868a84b Author: Jon Maloy Date: Thu Mar 22 20:42:48 2018 +0100 tipc: allow closest-first lookup algorithm when legacy address is configured The removal of an internal structure of the node address has an unwanted side effect. - Currently, if a user is sending an anycast message with destination domain 0, the tipc_namebl_translate() function will use the 'closest- first' algorithm to first look for a node local destination, and only when no such is found, will it resort to the cluster global 'round- robin' lookup algorithm. - Current users can get around this, and enforce unconditional use of global round-robin by indicating a destination as Z.0.0 or Z.C.0. - This option disappears when we make the node address flat, since the lookup algorithm has no way of recognizing this case. So, as long as there are node local destinations, the algorithm will always select one of those, and there is nothing the sender can do to change this. We solve this by eliminating the 'closest-first' option, which was never a good idea anyway, for non-legacy users, but only for those. To distinguish between legacy users and non-legacy users we introduce a new flag 'legacy_addr_format' in struct tipc_core, to be set when the user configures a legacy-style Z.C.N node address. Hence, when a legacy user indicates a zero lookup domain 'closest-first' is selected, and in all other cases we use 'round-robin'. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/addr.c | 12 +++++++----- net/tipc/addr.h | 2 +- net/tipc/core.h | 3 ++- net/tipc/discover.c | 13 ++++++------- net/tipc/name_table.c | 8 +++++--- net/tipc/net.c | 2 +- 6 files changed, 22 insertions(+), 18 deletions(-) commit 2026364149db36c6a2c0c8cae8362fe9a7f954dd Author: Jon Maloy Date: Thu Mar 22 20:42:47 2018 +0100 tipc: remove restrictions on node address values Nominally, TIPC organizes network nodes into a three-level network hierarchy consisting of the levels 'zone', 'cluster' and 'node'. This hierarchy is reflected in the node address format, - it is sub-divided into an 8-bit zone id, and 12 bit cluster id, and a 12-bit node id. However, the 'zone' and 'cluster' levels have in reality never been fully implemented,and never will be. The result of this has been that the first 20 bits the node identity structure have been wasted, and the usable node identity range within a cluster has been limited to 12 bits. This is starting to become a problem. In the following commits, we will need to be able to connect between nodes which are using the whole 32-bit value space of the node address. We therefore remove the restrictions on which values can be assigned to node identity, -it is from now on only a 32-bit integer with no assumed internal structure. Isolation between clusters is now achieved only by setting different values for the 'network id' field used during neighbor discovery, in practice leading to the latter becoming the new cluster identity. The rules for accepting discovery requests/responses from neighboring nodes now become: - If the user is using legacy address format on both peers, reception of discovery messages is subject to the legacy lookup domain check in addition to the cluster id check. - Otherwise, the discovery request/response is always accepted, provided both peers have the same network id. This secures backwards compatibility for users who have been using zone or cluster identities as cluster separators, instead of the intended 'network id'. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/addr.c | 50 +------------------------------------------------- net/tipc/addr.h | 11 ----------- net/tipc/bearer.c | 27 ++++----------------------- net/tipc/discover.c | 15 +++++++-------- net/tipc/link.c | 6 ++---- net/tipc/net.c | 4 ++-- net/tipc/node.c | 8 ++------ net/tipc/node.h | 5 +++-- 8 files changed, 21 insertions(+), 105 deletions(-) commit b39e465e56ec38ca64b4c0affeb6411eb0ed7267 Author: Jon Maloy Date: Thu Mar 22 20:42:46 2018 +0100 tipc: some cleanups in the file discover.c To facilitate the coming changes in the neighbor discovery functionality we make some renaming and refactoring of that code. The functional changes in this commit are trivial, e.g., that we move the message sending call in tipc_disc_timeout() outside the spinlock protected region. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bearer.c | 8 +- net/tipc/bearer.h | 2 +- net/tipc/discover.c | 303 +++++++++++++++++++++++++--------------------------- net/tipc/discover.h | 8 +- 4 files changed, 155 insertions(+), 166 deletions(-) commit cb30a63384bc91d5da06e1cede1115f666a29271 Author: Jon Maloy Date: Thu Mar 22 20:42:45 2018 +0100 tipc: refactor function tipc_enable_bearer() As a preparation for the next commits we try to reduce the footprint of the function tipc_enable_bearer(), while hopefully making is simpler to follow. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bearer.c | 136 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 70 insertions(+), 66 deletions(-) commit 1fe56e0cafd7e4cf26f3582aad0c7705fceff498 Author: Arend van Spriel Date: Thu Mar 15 10:55:25 2018 +0100 drivers: base: remove check for callback in coredump_store() The check for the .coredump() callback in coredump_store() is redundant. It is already assured the device driver implements the callback upon creating the coredump sysfs entry. Signed-off-by: Arend van Spriel Signed-off-by: Greg Kroah-Hartman drivers/base/dd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 594619497f3d6d4b8d8440e6d380e8da9dcc9eeb Author: Gustavo A. R. Silva Date: Thu Mar 22 13:44:56 2018 -0500 net/mlx5: Fix use-after-free _rule_ is being freed and then dereferenced by accessing rule->ctx Fix this by copying the value returned by PTR_ERR(rule->ctx) into a local variable for its safe use after freeing _rule_ Addresses-Coverity-ID: 1466041 ("Read from pointer after free") Fixes: 05564d0ae075 ("net/mlx5: Add flow-steering commands for FPGA IPSec implementation") Reviewed-by: Yuval Shaia Signed-off-by: Gustavo A. R. Silva Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 953cc3e8117013bd39a3b94e28361ce94ad63075 Author: Mike Looijmans Date: Tue Mar 20 09:15:41 2018 +0100 clk: Add driver for the si544 clock generator chip This patch adds the driver and devicetree documentation for the Silicon Labs SI544 clock generator chip. This is an I2C controlled oscillator capable of generating clock signals ranging from 200kHz to 1500MHz. Signed-off-by: Mike Looijmans [sboyd: assign max_freq to 0 in is_valid_frequency() to squelch warning] Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/silabs,si544.txt | 25 ++ drivers/clk/Kconfig | 9 + drivers/clk/Makefile | 1 + drivers/clk/clk-si544.c | 411 +++++++++++++++++++++ 4 files changed, 446 insertions(+) commit f145749dd49d00430e1e735656c757a3552dcd4e Merge: 885b0d4 b2864fb Author: David S. Miller Date: Fri Mar 23 13:00:47 2018 -0400 Merge branch 'pernet-convert-part11' Kirill Tkhai says: ==================== Converting pernet_operations (part #11) this series continues to review and to convert pernet_operations to make them possible to be executed in parallel for several net namespaces at the same time. I thought last series was last, but there is one new pernet_operations came to kernel. This is udp_sysctl_ops, and here we convert it. Also, David Howells acked rxrpc_net_ops, so I resend the patch in case of it should be queued by patchwork: https://www.spinics.net/lists/netdev/msg490678.html ==================== Signed-off-by: David S. Miller commit b2864fbdc5ab6bb4750b00580b67070bd0ab3762 Author: Kirill Tkhai Date: Thu Mar 22 21:34:55 2018 +0300 net: Convert rxrpc_net_ops These pernet_operations modifies rxrpc_net_id-pointed per-net entities. There is external link to AF_RXRPC in fs/afs/Kconfig, but it seems there is no other pernet_operations interested in that per-net entities. Signed-off-by: Kirill Tkhai Acked-by: David Howells Signed-off-by: David S. Miller net/rxrpc/net_ns.c | 1 + 1 file changed, 1 insertion(+) commit fc18999ed2a217f249e9880363b28a89c839737e Author: Kirill Tkhai Date: Thu Mar 22 21:34:46 2018 +0300 net: Convert udp_sysctl_ops These pernet_operations just initialize udp4 defaults. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv4/udp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 885b0d4375a102d002bc654b4b68da46ba060032 Author: Petr Machata Date: Thu Mar 22 20:14:47 2018 +0200 mlxsw: spectrum_span: Fix initialization of struct mlxsw_sp_span_parms Since the first element of struct mlxsw_sp_span_parms is a pointer, to zero-initialize this structure the correct notation is not = {0}, but rather = {NULL}, as reported by sparse. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 440ea4ae182820cfced77cee2b7f3e6eaa8ac5d3 Author: Davide Caratti Date: Thu Mar 22 19:12:19 2018 +0100 tc-testing: add selftests for 'bpf' action Test d959: Add cBPF action with valid bytecode Test f84a: Add cBPF action with invalid bytecode Test e939: Add eBPF action with valid object-file Test 282d: Add eBPF action with invalid object-file Test d819: Replace cBPF bytecode and action control Test 6ae3: Delete cBPF action Test 3e0d: List cBPF actions Test 55ce: Flush BPF actions Test ccc3: Add cBPF action with duplicate index Test 89c7: Add cBPF action with invalid index Test 7ab9: Add cBPF action with cookie Changes since v1: - use index=2^32-1 in test ccc3, add tests 7a89, 89c7 (thanks Roman Mashak) - added test 282d Signed-off-by: Davide Caratti Signed-off-by: David S. Miller .../selftests/tc-testing/tc-tests/actions/bpf.json | 289 +++++++++++++++++++++ 1 file changed, 289 insertions(+) commit 114cc9c4b18232452f7dcc8bb3e5749f8d9a6837 Author: Parav Pandit Date: Wed Mar 21 17:16:35 2018 +0200 IB/cma: Resolve route only while receiving CM requests Currently CM request for RoCE follows following flow. rdma_create_id() rdma_resolve_addr() rdma_resolve_route() For RC QPs: rdma_connect() ->cma_connect_ib() ->ib_send_cm_req() ->cm_init_av_by_path() ->ib_init_ah_attr_from_path() For UD QPs: rdma_connect() ->cma_resolve_ib_udp() ->ib_send_cm_sidr_req() ->cm_init_av_by_path() ->ib_init_ah_attr_from_path() In both the flows, route is already resolved before sending CM requests. Therefore, code is refactored to avoid resolving route second time in ib_cm layer. ib_init_ah_attr_from_path() is extended to resolve route when it is not yet resolved for RoCE link layer. This is achieved by caller setting route_resolved field in path record whenever it has route already resolved. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cm.c | 5 +++++ drivers/infiniband/core/cma.c | 1 + drivers/infiniband/core/sa_query.c | 5 +++++ include/rdma/ib_sa.h | 8 ++++++++ 4 files changed, 19 insertions(+) commit 4ac0d3fb13d5acc138d8be7c45715567c2e2ec47 Author: Bartosz Golaszewski Date: Fri Mar 23 17:15:02 2018 +0100 eeprom: at24: use SPDX identifier instead of GPL boiler-plate Replace the GPL (or later) header with the SPDX identifier for GPL-2.0+. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit fc3fcb4ff1960e9f0b72b1d4855f7e0bcf18b7f2 Author: Wei Yongjun Date: Thu Mar 22 02:11:48 2018 +0000 clk: davinci: Remove redundant dev_err calls There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun Reviewed-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/pll.c | 4 +--- drivers/clk/davinci/psc.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) commit 82792a070b168a9659c78e6a19efe5b6d1a7ce73 Author: Nikolay Aleksandrov Date: Fri Mar 23 18:27:06 2018 +0200 net: bridge: fix direct access to bridge vlan_enabled and use helper We need to use br_vlan_enabled() helper otherwise we'll break builds without bridge vlans: net/bridge//br_if.c: In function ‘br_mtu’: net/bridge//br_if.c:458:8: error: ‘const struct net_bridge’ has no member named ‘vlan_enabled’ if (br->vlan_enabled) ^ net/bridge//br_if.c:462:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ scripts/Makefile.build:324: recipe for target 'net/bridge//br_if.o' failed Fixes: 419d14af9e07 ("bridge: Allow max MTU when multiple VLANs present") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa584d28f3f1fed1e3f91e5c4f82448c012820f9 Merge: ce33f28 472f5f3 Author: Stephen Boyd Date: Fri Mar 23 09:40:52 2018 -0700 Merge tag 'clk-renesas-for-v4.17-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull Renesas clk driver updates from Geert Uytterhoeven: - Fix the incorrect display clock on R-Car M3-N, - Always use readl()/writel(), - Small fixes. * tag 'clk-renesas-for-v4.17-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: cpg-mssr: Adjust r8a77980 ifdef clk: renesas: rcar-gen3: Always use readl()/writel() clk: renesas: sh73a0: Always use readl()/writel() clk: renesas: rza1: Always use readl()/writel() clk: renesas: rcar-gen2: Always use readl()/writel() clk: renesas: r8a7740: Always use readl()/writel() clk: renesas: r8a73a4: Always use readl()/writel() clk: renesas: mstp: Always use readl()/writel() clk: renesas: div6: Always use readl()/writel() clk: renesas: r8a77965: Replace DU2 clock commit c2fd8756c5c3a3187094a4e7d7a6c87aa8033901 Author: Kunihiko Hayashi Date: Fri Mar 23 14:11:41 2018 +0900 clk: uniphier: add ethernet clock control support for PXs3 Add clock control for ethernet controller on PXs3 SoC. Signed-off-by: Kunihiko Hayashi Acked-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-sys.c | 2 ++ 1 file changed, 2 insertions(+) commit 639a53da7c8cea7e476fed5e9ce6b1fa1bcce05a Merge: ae06c70 337682c Author: Daniel Borkmann Date: Fri Mar 23 17:38:57 2018 +0100 Merge branch 'bpf-print-insns-api' Jiri Olsa says: ==================== This patchset removes struct bpf_verifier_env argument from print_bpf_insn function (patch 1) and changes user space bpftool user to use it that way (patch 2). ==================== Reviewed-by: Quentin Monnet Signed-off-by: Daniel Borkmann commit 337682ca7e3cdce81fe3436bf59782d071c967e6 Author: Jiri Olsa Date: Fri Mar 23 11:41:29 2018 +0100 bpftool: Adjust to new print_bpf_insn interface Change bpftool to skip the removed struct bpf_verifier_env argument in print_bpf_insn. It was passed as NULL anyway. No functional change intended. Signed-off-by: Jiri Olsa Signed-off-by: Daniel Borkmann tools/bpf/bpftool/xlated_dumper.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit abe0884011f1a569bc1254b70c41525b755e8037 Author: Jiri Olsa Date: Fri Mar 23 11:41:28 2018 +0100 bpf: Remove struct bpf_verifier_env argument from print_bpf_insn We use print_bpf_insn in user space (bpftool and soon perf), so it'd be nice to keep it generic and strip it off the kernel struct bpf_verifier_env argument. This argument can be safely removed, because its users can use the struct bpf_insn_cbs::private_data to pass it. By changing the argument type we can no longer have clean 'verbose' alias to 'bpf_verifier_log_write' in verifier.c. Instead we're adding the 'verbose' cb_print callback and removing the alias. This way we have new cb_print callback in place, and all the 'verbose(env, ...) calls in verifier.c will cleanly cast to 'verbose(void *, ...)' so no other change is needed. Signed-off-by: Jiri Olsa Signed-off-by: Daniel Borkmann kernel/bpf/disasm.c | 52 +++++++++++++++++++++++++-------------------------- kernel/bpf/disasm.h | 5 +---- kernel/bpf/verifier.c | 44 ++++++++++++++++++++++++++----------------- 3 files changed, 54 insertions(+), 47 deletions(-) commit 726fef09b8018e58f1930fc7bc0a46e8d12ed8c1 Author: Linus Walleij Date: Thu Mar 22 11:16:18 2018 +0100 clk: ux500: Drop AB8540/9540 support The AB8540 was an evolved version of the AB8500, but it was never mass produced or put into products, only reference designs exist. The upstream support was never completed and it is unlikely that this will happen so drop the support for now to simplify maintenance of the AB8500. Cc: Loic Pallardy Signed-off-by: Linus Walleij Acked-by: Ulf Hansson Signed-off-by: Stephen Boyd drivers/clk/ux500/Makefile | 2 - drivers/clk/ux500/abx500-clk.c | 16 -- drivers/clk/ux500/u8540_clk.c | 597 ----------------------------------------- drivers/clk/ux500/u9540_clk.c | 18 -- 4 files changed, 633 deletions(-) commit 26b99db0b6e8590fce30c98af04898de59194a12 Merge: 7928b2c f422fa5 Author: Stephen Boyd Date: Fri Mar 23 09:35:40 2018 -0700 Merge tag 'sunxi-clk-for-4.17' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull Allwinner clock changes from Maxime Ripard: Our usual bunch of changes for the next merge window. The most significant addition is the support of the H6 clock unit. Other than that, there's a bunch of fixes for the video clocks on the H3 and H5, and some Kconfig cleanup. * tag 'sunxi-clk-for-4.17' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: add missing hdmi-slow clock for H6 CCU clk: sunxi-ng: add support for the Allwinner H6 CCU dt-bindings: add device tree binding for Allwinner H6 main CCU clk: sunxi-ng: Support fixed post-dividers on NKMP style clocks clk: sunxi-ng: h3: h5: export CLK_PLL_VIDEO clk: sunxi-ng: h3: h5: Allow some clocks to set parent rate clk: sunxi-ng: h3: h5: Add minimal rate for video PLL clk: sunxi-ng: Add check for minimal rate to NM PLLs clk: sunxi-ng: Use u64 for calculation of nkmp rate clk: sunxi-ng: Mask nkmp factors when setting register clk: sunxi-ng: remove select on obsolete SUNXI_CCU_X kconfig name commit 452a26138a8355a8502d91317cab10419332ce58 Merge: ae06c70 b6c535b Author: David S. Miller Date: Fri Mar 23 12:25:55 2018 -0400 Merge branch 'tls-RX' Dave Watson says: ==================== TLS Rx TLS tcp socket RX implementation, to match existing TX code. This patchset completes the software TLS socket, allowing full bi-directional communication over TLS using normal socket syscalls, after the handshake has been done in userspace. Only the symmetric encryption is done in the kernel. This allows usage of TLS sockets from within the kernel (for example with network block device, or from bpf). Performance can be better than userspace, with appropriate crypto routines [1]. sk->sk_socket->ops must be overridden to implement splice_read and poll, but otherwise the interface & implementation match TX closely. strparser is used to parse TLS framing on receive. There are Openssl RX patches that work with this interface [2], as well as a testing tool using the socket interface directly (without cmsg support) [3]. An example tcp socket setup is: // Normal tcp socket connect/accept, and TLS handshake // using any TLS library. setsockopt(sock, SOL_TCP, TCP_ULP, "tls", sizeof("tls")); struct tls12_crypto_info_aes_gcm_128 crypto_info_rx; // Fill in crypto_info based on negotiated keys. setsockopt(sock, SOL_TLS, TLS_RX, &crypto_info, sizeof(crypto_info_rx)); // You can optionally TLX_TX as well. char buffer[16384]; int ret = recv(sock, buffer, 16384); // cmsg can be received using recvmsg and a msg_control // of type TLS_GET_RECORD_TYPE will be set. V1 -> V2 * For too-small framing errors, return EBADMSG, to match openssl error code semantics. Docs and commit logs about this also updated. RFC -> V1 * Refactor 'tx' variable names to drop tx * Error return codes changed per discussion * Only call skb_cow_data based on in-place decryption, drop unnecessary frag list check. [1] Recent crypto patchset to remove copies, resulting in optimally zero copies vs. userspace's one, vs. previous kernel's two. https://marc.info/?l=linux-crypto-vger&m=151931242406416&w=2 [2] https://github.com/Mellanox/openssl/commits/tls_rx2 [3] https://github.com/ktls/af_ktls-tool/tree/RX ==================== Signed-off-by: David S. Miller commit b6c535b1638b32ff7817d78956b7232100570b5d Author: Dave Watson Date: Thu Mar 22 10:10:44 2018 -0700 tls: Add receive path documentation Add documentation on rx path setup and cmsg interface. Signed-off-by: Dave Watson Signed-off-by: David S. Miller Documentation/networking/tls.txt | 66 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) commit c46234ebb4d1eee5e09819f49169e51cfc6eb909 Author: Dave Watson Date: Thu Mar 22 10:10:35 2018 -0700 tls: RX path for ktls Add rx path for tls software implementation. recvmsg, splice_read, and poll implemented. An additional sockopt TLS_RX is added, with the same interface as TLS_TX. Either TLX_RX or TLX_TX may be provided separately, or together (with two different setsockopt calls with appropriate keys). Control messages are passed via CMSG in a similar way to transmit. If no cmsg buffer is passed, then only application data records will be passed to userspace, and EIO is returned for other types of alerts. EBADMSG is passed for decryption errors, and EMSGSIZE is passed for framing too big, and EBADMSG for framing too small (matching openssl semantics). EINVAL is returned for TLS versions that do not match the original setsockopt call. All are unrecoverable. strparser is used to parse TLS framing. Decryption is done directly in to userspace buffers if they are large enough to support it, otherwise sk_cow_data is called (similar to ipsec), and buffers are decrypted in place and copied. splice_read always decrypts in place, since no buffers are provided to decrypt in to. sk_poll is overridden, and only returns POLLIN if a full TLS message is received. Otherwise we wait for strparser to finish reading a full frame. Actual decryption is only done during recvmsg or splice_read calls. Signed-off-by: Dave Watson Signed-off-by: David S. Miller include/net/tls.h | 27 ++- include/uapi/linux/tls.h | 2 + net/tls/Kconfig | 1 + net/tls/tls_main.c | 62 ++++- net/tls/tls_sw.c | 587 ++++++++++++++++++++++++++++++++++++++++++----- 5 files changed, 609 insertions(+), 70 deletions(-) commit 583715853a25b4f2720b847e4fb8e37727299152 Author: Dave Watson Date: Thu Mar 22 10:10:26 2018 -0700 tls: Refactor variable names Several config variables are prefixed with tx, drop the prefix since these will be used for both tx and rx. Signed-off-by: Dave Watson Signed-off-by: David S. Miller include/net/tls.h | 2 +- net/tls/tls_main.c | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) commit f4a8e43f1f0abc0e93ed5ee132288ee4142afde1 Author: Dave Watson Date: Thu Mar 22 10:10:15 2018 -0700 tls: Pass error code explicitly to tls_err_abort Pass EBADMSG explicitly to tls_err_abort. Receive path will pass additional codes - EMSGSIZE if framing is larger than max TLS record size, EINVAL if TLS version mismatch. Signed-off-by: Dave Watson Signed-off-by: David S. Miller include/net/tls.h | 6 +++--- net/tls/tls_sw.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit dbe425599ba05c7415f632e6f5f018453098eb69 Author: Dave Watson Date: Thu Mar 22 10:10:06 2018 -0700 tls: Move cipher info to a separate struct Separate tx crypto parameters to a separate cipher_context struct. The same parameters will be used for rx using the same struct. tls_advance_record_sn is modified to only take the cipher info. Signed-off-by: Dave Watson Signed-off-by: David S. Miller include/net/tls.h | 26 +++++++++++++----------- net/tls/tls_main.c | 8 ++++---- net/tls/tls_sw.c | 58 ++++++++++++++++++++++++++++-------------------------- 3 files changed, 49 insertions(+), 43 deletions(-) commit 69ca9293e8dd9323c6cde579e1855d6ce9489a46 Author: Dave Watson Date: Thu Mar 22 10:09:53 2018 -0700 tls: Generalize zerocopy_from_iter Refactor zerocopy_from_iter to take arguments for pages and size, such that it can be used for both tx and rx. RX will also support zerocopy direct to output iter, as long as the full message can be copied at once (a large enough userspace buffer was provided). Signed-off-by: Dave Watson Signed-off-by: David S. Miller net/tls/tls_sw.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) commit ae06c70b135886d7d6252f3090146f01a3f3b80c Author: Jeff Kirsher Date: Thu Mar 22 10:08:48 2018 -0700 intel: add SPDX identifiers to all the Intel drivers Add the SPDX identifiers to all the Intel wired LAN driver files, as outlined in Documentation/process/license-rules.rst. Signed-off-by: Jeff Kirsher Tested-by: Aaron Brown Signed-off-by: David S. Miller drivers/net/ethernet/intel/e100.c | 1 + drivers/net/ethernet/intel/e1000/Makefile | 1 + drivers/net/ethernet/intel/e1000/e1000.h | 1 + drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 1 + drivers/net/ethernet/intel/e1000/e1000_hw.c | 1 + drivers/net/ethernet/intel/e1000/e1000_hw.h | 1 + drivers/net/ethernet/intel/e1000/e1000_main.c | 1 + drivers/net/ethernet/intel/e1000/e1000_osdep.h | 1 + drivers/net/ethernet/intel/e1000/e1000_param.c | 1 + drivers/net/ethernet/intel/e1000e/80003es2lan.c | 1 + drivers/net/ethernet/intel/e1000e/80003es2lan.h | 1 + drivers/net/ethernet/intel/e1000e/82571.c | 1 + drivers/net/ethernet/intel/e1000e/82571.h | 1 + drivers/net/ethernet/intel/e1000e/Makefile | 1 + drivers/net/ethernet/intel/e1000e/defines.h | 1 + drivers/net/ethernet/intel/e1000e/e1000.h | 1 + drivers/net/ethernet/intel/e1000e/ethtool.c | 1 + drivers/net/ethernet/intel/e1000e/hw.h | 1 + drivers/net/ethernet/intel/e1000e/ich8lan.c | 1 + drivers/net/ethernet/intel/e1000e/ich8lan.h | 1 + drivers/net/ethernet/intel/e1000e/mac.c | 1 + drivers/net/ethernet/intel/e1000e/mac.h | 1 + drivers/net/ethernet/intel/e1000e/manage.c | 1 + drivers/net/ethernet/intel/e1000e/manage.h | 1 + drivers/net/ethernet/intel/e1000e/netdev.c | 1 + drivers/net/ethernet/intel/e1000e/nvm.c | 1 + drivers/net/ethernet/intel/e1000e/nvm.h | 1 + drivers/net/ethernet/intel/e1000e/param.c | 1 + drivers/net/ethernet/intel/e1000e/phy.c | 1 + drivers/net/ethernet/intel/e1000e/phy.h | 1 + drivers/net/ethernet/intel/e1000e/ptp.c | 1 + drivers/net/ethernet/intel/e1000e/regs.h | 1 + drivers/net/ethernet/intel/fm10k/Makefile | 1 + drivers/net/ethernet/intel/fm10k/fm10k.h | 1 + drivers/net/ethernet/intel/fm10k/fm10k_common.c | 1 + drivers/net/ethernet/intel/fm10k/fm10k_common.h | 1 + drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c | 1 + drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c | 1 + drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 1 + drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 1 + drivers/net/ethernet/intel/fm10k/fm10k_main.c | 1 + drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 1 + drivers/net/ethernet/intel/fm10k/fm10k_mbx.h | 1 + drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 1 + drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 1 + drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 1 + drivers/net/ethernet/intel/fm10k/fm10k_pf.h | 1 + drivers/net/ethernet/intel/fm10k/fm10k_tlv.c | 1 + drivers/net/ethernet/intel/fm10k/fm10k_tlv.h | 1 + drivers/net/ethernet/intel/fm10k/fm10k_type.h | 1 + drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 1 + drivers/net/ethernet/intel/fm10k/fm10k_vf.h | 1 + drivers/net/ethernet/intel/i40e/Makefile | 1 + drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_adminq.c | 1 + drivers/net/ethernet/intel/i40e/i40e_adminq.h | 1 + drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 1 + drivers/net/ethernet/intel/i40e/i40e_alloc.h | 1 + drivers/net/ethernet/intel/i40e/i40e_client.c | 1 + drivers/net/ethernet/intel/i40e/i40e_client.h | 1 + drivers/net/ethernet/intel/i40e/i40e_common.c | 1 + drivers/net/ethernet/intel/i40e/i40e_dcb.c | 1 + drivers/net/ethernet/intel/i40e/i40e_dcb.h | 1 + drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c | 1 + drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 1 + drivers/net/ethernet/intel/i40e/i40e_devids.h | 1 + drivers/net/ethernet/intel/i40e/i40e_diag.c | 1 + drivers/net/ethernet/intel/i40e/i40e_diag.h | 1 + drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 1 + drivers/net/ethernet/intel/i40e/i40e_hmc.c | 1 + drivers/net/ethernet/intel/i40e/i40e_hmc.h | 1 + drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c | 1 + drivers/net/ethernet/intel/i40e/i40e_lan_hmc.h | 1 + drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + drivers/net/ethernet/intel/i40e/i40e_nvm.c | 1 + drivers/net/ethernet/intel/i40e/i40e_osdep.h | 1 + drivers/net/ethernet/intel/i40e/i40e_prototype.h | 1 + drivers/net/ethernet/intel/i40e/i40e_ptp.c | 1 + drivers/net/ethernet/intel/i40e/i40e_register.h | 1 + drivers/net/ethernet/intel/i40e/i40e_status.h | 1 + drivers/net/ethernet/intel/i40e/i40e_trace.h | 1 + drivers/net/ethernet/intel/i40e/i40e_txrx.c | 1 + drivers/net/ethernet/intel/i40e/i40e_txrx.h | 1 + drivers/net/ethernet/intel/i40e/i40e_type.h | 1 + drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 1 + drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 1 + drivers/net/ethernet/intel/i40evf/Makefile | 1 + drivers/net/ethernet/intel/i40evf/i40e_adminq.c | 1 + drivers/net/ethernet/intel/i40evf/i40e_adminq.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_alloc.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_common.c | 1 + drivers/net/ethernet/intel/i40evf/i40e_devids.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_hmc.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_lan_hmc.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_osdep.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_prototype.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_register.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_status.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_trace.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 1 + drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_type.h | 1 + drivers/net/ethernet/intel/i40evf/i40evf.h | 1 + drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 1 + drivers/net/ethernet/intel/i40evf/i40evf_main.c | 1 + drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 1 + drivers/net/ethernet/intel/igb/Makefile | 1 + drivers/net/ethernet/intel/igb/e1000_82575.c | 1 + drivers/net/ethernet/intel/igb/e1000_82575.h | 1 + drivers/net/ethernet/intel/igb/e1000_defines.h | 1 + drivers/net/ethernet/intel/igb/e1000_hw.h | 1 + drivers/net/ethernet/intel/igb/e1000_i210.c | 1 + drivers/net/ethernet/intel/igb/e1000_i210.h | 1 + drivers/net/ethernet/intel/igb/e1000_mac.c | 1 + drivers/net/ethernet/intel/igb/e1000_mac.h | 1 + drivers/net/ethernet/intel/igb/e1000_mbx.c | 1 + drivers/net/ethernet/intel/igb/e1000_mbx.h | 1 + drivers/net/ethernet/intel/igb/e1000_nvm.c | 1 + drivers/net/ethernet/intel/igb/e1000_nvm.h | 1 + drivers/net/ethernet/intel/igb/e1000_phy.c | 1 + drivers/net/ethernet/intel/igb/e1000_phy.h | 1 + drivers/net/ethernet/intel/igb/e1000_regs.h | 1 + drivers/net/ethernet/intel/igb/igb.h | 1 + drivers/net/ethernet/intel/igb/igb_ethtool.c | 1 + drivers/net/ethernet/intel/igb/igb_hwmon.c | 1 + drivers/net/ethernet/intel/igb/igb_main.c | 1 + drivers/net/ethernet/intel/igb/igb_ptp.c | 1 + drivers/net/ethernet/intel/igbvf/Makefile | 1 + drivers/net/ethernet/intel/igbvf/defines.h | 1 + drivers/net/ethernet/intel/igbvf/ethtool.c | 1 + drivers/net/ethernet/intel/igbvf/igbvf.h | 1 + drivers/net/ethernet/intel/igbvf/mbx.c | 1 + drivers/net/ethernet/intel/igbvf/mbx.h | 1 + drivers/net/ethernet/intel/igbvf/netdev.c | 1 + drivers/net/ethernet/intel/igbvf/regs.h | 1 + drivers/net/ethernet/intel/igbvf/vf.c | 1 + drivers/net/ethernet/intel/igbvf/vf.h | 1 + drivers/net/ethernet/intel/ixgb/Makefile | 1 + drivers/net/ethernet/intel/ixgb/ixgb.h | 1 + drivers/net/ethernet/intel/ixgb/ixgb_ee.h | 1 + drivers/net/ethernet/intel/ixgb/ixgb_hw.h | 1 + drivers/net/ethernet/intel/ixgb/ixgb_ids.h | 1 + drivers/net/ethernet/intel/ixgb/ixgb_osdep.h | 1 + drivers/net/ethernet/intel/ixgbe/Makefile | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_common.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.c | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_model.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_x540.h | 1 + drivers/net/ethernet/intel/ixgbevf/Makefile | 1 + drivers/net/ethernet/intel/ixgbevf/defines.h | 1 + drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 1 + drivers/net/ethernet/intel/ixgbevf/mbx.h | 1 + drivers/net/ethernet/intel/ixgbevf/regs.h | 1 + drivers/net/ethernet/intel/ixgbevf/vf.h | 1 + 168 files changed, 168 insertions(+) commit 419d14af9e07fb5ca32b1b1614793c6b1e242152 Author: Chas Williams <3chas3@gmail.com> Date: Thu Mar 22 11:34:06 2018 -0400 bridge: Allow max MTU when multiple VLANs present If the bridge is allowing multiple VLANs, some VLANs may have different MTUs. Instead of choosing the minimum MTU for the bridge interface, choose the maximum MTU of the bridge members. With this the user only needs to set a larger MTU on the member ports that are participating in the large MTU VLANS. Signed-off-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Nikolay Aleksandrov Acked-by: Roopa Prabhu Signed-off-by: David S. Miller net/bridge/br.c | 2 +- net/bridge/br_device.c | 2 +- net/bridge/br_if.c | 26 ++++++++++++++++++++++---- net/bridge/br_private.h | 2 +- 4 files changed, 25 insertions(+), 7 deletions(-) commit bda7fab54828bbef2164bb23c0f6b1a7d05cc718 Author: Jay Vosburgh Date: Thu Mar 22 14:42:41 2018 +0000 virtio-net: Fix operstate for virtio when no VIRTIO_NET_F_STATUS The operstate update logic will leave an interface in the default UNKNOWN operstate if the interface carrier state never changes from the default carrier up state set at creation. This includes the case of an explicit call to netif_carrier_on, as the carrier on to on transition has no effect on operstate. This affects virtio-net for the case that the virtio peer does not support VIRTIO_NET_F_STATUS (the feature that provides carrier state updates). Without this feature, the virtio specification states that "the link should be assumed active," so, logically, the operstate should be UP instead of UNKNOWN. This has impact on user space applications that use the operstate to make availability decisions for the interface. Resolve this by changing the virtio probe logic slightly to call netif_carrier_off for both the "with" and "without" VIRTIO_NET_F_STATUS cases, and then the existing call to netif_carrier_on for the "without" case will cause an operstate transition. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Ben Hutchings Signed-off-by: Jay Vosburgh Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9de0018d1fa97f8db9a39fcb69b55266c52835b Author: David Ahern Date: Fri Mar 23 08:09:48 2018 -0700 devlink: Remove top_hierarchy arg for DEVLINK disabled path Earlier change missed the path where CONFIG_NET_DEVLINK is disabled. Thanks to Jiri for spotting. Fixes: 145307460ba9 ("devlink: Remove top_hierarchy arg to devlink_resource_register") Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/devlink.h | 1 - 1 file changed, 1 deletion(-) commit e9acf05255cbf72dc32169957d2895cbfd12c7e1 Author: Jia-Ju Bai Date: Sun Mar 18 22:50:38 2018 +0800 crypto: cavium - Replace mdelay with msleep in cpt_device_init cpt_device_init() is never called in atomic context. The call chain ending up at cpt_device_init() is: [1] cpt_device_init() <- cpt_probe() cpt_probe() is only set as ".probe" in pci_driver structure "cpt_pci_driver". Despite never getting called from atomic context, cpt_device_init() calls mdelay(100), i.e. busy wait for 100ms. That is not necessary and can be replaced with msleep to avoid busy waiting. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/cptpf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0063ec4459dcf1583c7aa84ada0f7125450d9245 Author: Gary R Hook Date: Wed Mar 14 17:15:52 2018 -0500 crypto: doc - Document remaining members in struct crypto_alg Add missing comments for union members ablkcipher, blkcipher, cipher, and compress. This silences complaints when building the htmldocs. Fixes: 0d7f488f0305a (crypto: doc - cipher data structures) Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu include/linux/crypto.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9678a8dc53c129599be45e7172b3a0fe6efa7989 Author: Arnd Bergmann Date: Wed Mar 14 16:35:32 2018 +0100 crypto: bfin_crc - remove blackfin CRC driver The blackfin architecture is getting removed, so this driver won't be used any more. Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 7 - drivers/crypto/Makefile | 1 - drivers/crypto/bfin_crc.c | 753 ---------------------------------------------- drivers/crypto/bfin_crc.h | 124 -------- 4 files changed, 885 deletions(-) commit 6aaf49b495b446ff6eec0ac983f781ca0dc56a73 Author: Leonard Crestez Date: Tue Mar 13 22:17:23 2018 +0200 crypto: arm,arm64 - Fix random regeneration of S_shipped The decision to rebuild .S_shipped is made based on the relative timestamps of .S_shipped and .pl files but git makes this essentially random. This means that the perl script might run anyway (usually at most once per checkout), defeating the whole purpose of _shipped. Fix by skipping the rule unless explicit make variables are provided: REGENERATE_ARM_CRYPTO or REGENERATE_ARM64_CRYPTO. This can produce nasty occasional build failures downstream, for example for toolchains with broken perl. The solution is minimally intrusive to make it easier to push into stable. Another report on a similar issue here: https://lkml.org/lkml/2018/3/8/1379 Signed-off-by: Leonard Crestez Cc: Reviewed-by: Masahiro Yamada Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/Makefile | 2 ++ arch/arm64/crypto/Makefile | 2 ++ 2 files changed, 4 insertions(+) commit 4bc07aa4f030d4d3e551ce8d96ca15b6424a5641 Author: Ioana Radulescu Date: Fri Mar 23 10:23:36 2018 -0500 staging: fsl-dpaa2/eth: Use debug level for message The driver remove() function prints a message when the operation is completed. Make this a debug level message to avoid polluting the kernel log wih too much information. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb428ee0e3ca6c8ea6fdfdf24a5918f739933119 Author: Vitaly Andrianov Date: Tue Mar 13 13:33:31 2018 -0400 hwrng: ks-sa - add hw_random driver Keystone Security Accelerator module has a hardware random generator sub-module. This commit adds the driver for this sub-module. Signed-off-by: Vitaly Andrianov [t-kristo@ti.com: dropped one unnecessary dev_err message] Signed-off-by: Tero Kristo Signed-off-by: Murali Karicheri Signed-off-by: Herbert Xu drivers/char/hw_random/Kconfig | 7 + drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/ks-sa-rng.c | 257 +++++++++++++++++++++++++++++++++++++ 3 files changed, 265 insertions(+) commit 2805894c1ee0e598d59f055b8225ce4d0d6b2a19 Author: Vitaly Andrianov Date: Tue Mar 13 13:33:30 2018 -0400 dt-bindings: rng: add bindings doc for Keystone SA HWRNG driver The Keystone SA module has a hardware random generator module. This commit adds binding doc for the KS2 SA HWRNG driver. Signed-off-by: Vitaly Andrianov Signed-off-by: Murali Karicheri Reviewed-by: Rob Herring Signed-off-by: Herbert Xu Documentation/devicetree/bindings/rng/ks-sa-rng.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 1d17cbfbb55cd80890312dd8c64d0008b25b05c0 Author: Gregory CLEMENT Date: Tue Mar 13 17:48:42 2018 +0100 crypto: inside-secure - fix clock resource by adding a register clock On Armada 7K/8K we need to explicitly enable the register clock. This clock is optional because not all the SoCs using this IP need it but at least for Armada 7K/8K it is actually mandatory. The binding documentation is updated accordingly. Signed-off-by: Gregory CLEMENT Signed-off-by: Herbert Xu .../bindings/crypto/inside-secure-safexcel.txt | 6 +++- drivers/crypto/inside-secure/safexcel.c | 34 ++++++++++++++++------ drivers/crypto/inside-secure/safexcel.h | 1 + 3 files changed, 31 insertions(+), 10 deletions(-) commit 5b37689653cbe73d24760428c236feb15ccad2aa Author: Gregory CLEMENT Date: Tue Mar 13 17:48:41 2018 +0100 crypto: inside-secure - improve clock initialization The clock is optional, but if it is present we should managed it. If there is an error while trying getting it, we should exit and report this error. So instead of returning an error only in the -EPROBE case, turn it in an other way and ignore the clock only if it is not present (-ENOENT case). Signed-off-by: Gregory CLEMENT Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit f962eb46e7a9b98a58d2483f5eb216e738fec732 Author: Gregory CLEMENT Date: Tue Mar 13 17:48:40 2018 +0100 crypto: inside-secure - fix clock management In this driver the clock is got but never put when the driver is removed or if there is an error in the probe. Using the managed version of clk_get() allows to let the kernel take care of it. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") cc: stable@vger.kernel.org Signed-off-by: Gregory CLEMENT Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efa94457e57f7b45207554db6e7f1fdaabd0f198 Author: weiyongjun \(A\) Date: Tue Mar 13 14:54:03 2018 +0000 crypto: inside-secure - fix missing unlock on error in safexcel_ahash_send_req() Add the missing unlock before return from function safexcel_ahash_send_req() in the error handling case. Fixes: cff9a17545a3 ("crypto: inside-secure - move cache result dma mapping to request") Signed-off-by: Wei Yongjun Acked-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0108aab1161532c9b62a0d05b8115f4d0b529831 Author: Markus Elfring Date: Mon Mar 12 14:18:23 2018 +0100 crypto: talitos - Delete an error message for a failed memory allocation in talitos_edesc_alloc() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 1 - 1 file changed, 1 deletion(-) commit 83d6e27e6856edf30845df8708b3b1e226ba5c7f Author: Dinh Nguyen Date: Fri Feb 23 17:24:59 2018 -0600 arm64: defconfig: enable stmmac ethernet to defconfig This patch enables the CONFIG_STMMAC_ETH to the default arm64 defconfig: -CONFIG_STMMAC_ETH=m +CONFIG_STMMAC_ETH=y +CONFIG_DWMAC_IPQ806X=m +CONFIG_DWMAC_MESON=m +CONFIG_DWMAC_ROCKCHIP=m +CONFIG_DWMAC_SUNXI=m +CONFIG_DWMAC_SUN8I=m The STMMAC ethernet controller is on the Stratix10 platform, and thus needs driver to be in the kernel image for NFS to work. Signed-off-by: Dinh Nguyen arch/arm64/configs/defconfig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4f794097797f551917b68797e39f25fcb17d5b3a Author: Jeremy Kerr Date: Wed Mar 21 10:52:38 2018 +0800 serial: expose buf_overrun count through proc interface The buf_overrun count is only every written, and not exposed to userspace anywhere. This means that dropped characters due to flip buffer overruns are never visible to userspace. The /proc/tty/driver/serial file exports a bunch of metrics (including hardware overruns) already, so add the buf_overrun (as "bo:") to this file. Signed-off-by: Jeremy Kerr Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 2 ++ 1 file changed, 2 insertions(+) commit 03fe2debbb2771fb90881e4ce8109b09cf772a5c Merge: 6686c45 f36b753 Author: David S. Miller Date: Fri Mar 23 11:24:57 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Fun set of conflict resolutions here... For the mac80211 stuff, these were fortunately just parallel adds. Trivially resolved. In drivers/net/phy/phy.c we had a bug fix in 'net' that moved the function phy_disable_interrupts() earlier in the file, whilst in 'net-next' the phy_error() call from this function was removed. In net/ipv4/xfrm4_policy.c, David Ahern's changes to remove the 'rt_table_id' member of rtable collided with a bug fix in 'net' that added a new struct member "rt_mtu_locked" which needs to be copied over here. The mlxsw driver conflict consisted of net-next separating the span code and definitions into separate files, whilst a 'net' bug fix made some changes to that moved code. The mlx5 infiniband conflict resolution was quite non-trivial, the RDMA tree's merge commit was used as a guide here, and here are their notes: ==================== Due to bug fixes found by the syzkaller bot and taken into the for-rc branch after development for the 4.17 merge window had already started being taken into the for-next branch, there were fairly non-trivial merge issues that would need to be resolved between the for-rc branch and the for-next branch. This merge resolves those conflicts and provides a unified base upon which ongoing development for 4.17 can be based. Conflicts: drivers/infiniband/hw/mlx5/main.c - Commit 42cea83f9524 (IB/mlx5: Fix cleanup order on unload) added to for-rc and commit b5ca15ad7e61 (IB/mlx5: Add proper representors support) add as part of the devel cycle both needed to modify the init/de-init functions used by mlx5. To support the new representors, the new functions added by the cleanup patch needed to be made non-static, and the init/de-init list added by the representors patch needed to be modified to match the init/de-init list changes made by the cleanup patch. Updates: drivers/infiniband/hw/mlx5/mlx5_ib.h - Update function prototypes added by representors patch to reflect new function names as changed by cleanup patch drivers/infiniband/hw/mlx5/ib_rep.c - Update init/de-init stage list to match new order from cleanup patch ==================== Signed-off-by: David S. Miller commit 34d43faf3aa80f72617da5f2d460262c1e0bbf48 Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:21 2018 +0100 eeprom: at24: simplify the i2c functionality checking Save one call and make code prettier by checking the i2c functionality in the beginning of at24_probe(), saving the relevant values and reusing them later. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit df3da615e3f020d4b689eb23d33d10f285db2fb6 Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:20 2018 +0100 eeprom: at24: fix a line break Align the broken line with the opening parenthesis to stay consistent with the rest of the driver code. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit de5db101fc89fbbbf26abc7eeb3d48c40ca25105 Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:19 2018 +0100 eeprom: at24: tweak newlines Remove the newline between the nvmem registration and its return value check. This is consistent with the rest of the driver code. Add a missing newline between two pdata checks to stay consistent with all the others. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 551a12669d85b5121e66bf39ff194efd7d1d9ac0 Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:18 2018 +0100 eeprom: at24: refactor at24_probe() The code in at24_probe() is pretty mangled. It can be cleaned up a bit by doing things one by one. Let's group the code by logic: parse and verify pdata, initialize the regmap, allocate and fill the fields of at24_data, allocate dummy i2c devices, initialize pm & register with nvmem. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 7c2806642ecf3adabec005cc78ff2bf444d4acba Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:17 2018 +0100 eeprom: at24: remove at24_platform_data from at24_data Not all fields from at24_platform_data are needed in at24_data. Let's keep just the ones we need and not carry the whole platform_data structure all the time. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit feb2f19b1e8ff467d794f02805f0cb30282f426b Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:16 2018 +0100 eeprom: at24: move platform data processing into a separate routine This driver can receive its device data from different sources depending on the system. Move the entire code processing platform data, device tree and acpi into a separate function. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 70 ++++++++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 30 deletions(-) commit 48b6a7d1ee7068c6e3e0ca6fd46aca98fdd11319 Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:15 2018 +0100 eeprom: at24: switch to using probe_new() from the i2c framework Use the new probe() style for i2c drivers. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f1a640c5dc701f661d4359d86601a845a41858d0 Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:14 2018 +0100 eeprom: at24: provide and use at24_base_client_dev() Use a helper function for accessing the device struct of the base i2c client. This routine is named in a way that reflects its purpose unlike the previously hand-coded dereferencing. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 11288b7c70d89b2587cca3dc5dd004df49ff8daf Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:13 2018 +0100 eeprom: at24: readability tweak in at24_probe() Use a helper variable for the size we want to allocate with devm_kzalloc() and save an ugly line break. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 021c7d7b6713c75b3605fba4317fffc8e2e83ca1 Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:12 2018 +0100 eeprom: at24: use a helper variable for dev We use the &client->dev construct all over in at24_probe(). Use a helper variable which is more readable and allows to avoid a couple unnecessary line breaks. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 48 ++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 25 deletions(-) commit f2adff66604d8e565ecd5d11e637df1527986506 Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:11 2018 +0100 eeprom: at24: rename chip to pdata in at24_probe() Reflect the purpose of this variable: it contains platform data so name it such. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 1f77d1859c3a43a22ae35f68051014c30728efee Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:10 2018 +0100 eeprom: at24: rename at24_get_pdata() As preparation for at24_probe() refactoring: rename at24_get_pdata() to at24_properties_to_pdata(). We're doing it because we'll move the pdata parsing code into a separate function which will be called at24_get_pdata(). Current routine with that name actually parses the device properties so change its name to reflect its purpose. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7c7f428eda52bbd72e8bef55298e5156f3e0ca9e Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:09 2018 +0100 eeprom: at24: don't check if byte_len is a power of 2 We support certain models the size of which is not a power of 2. This is not a reason to emit a warning. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 3 --- 1 file changed, 3 deletions(-) commit 53998fa89a5bfa16d279f48dac3a99e4bd0d0dd6 Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:08 2018 +0100 eeprom: at24: make struct initialization uniform in at24_probe() When zeroing structs, use "{ }" everywhere. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4fee330f9402878e6e4c6d21f8d42e3ead37c5b Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:07 2018 +0100 eeprom: at24: drop redundant variable in at24_write() We can reuse ret instead of defining a loop-local status variable. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit eb27fde2731b6cb5818493b8ac18e01f427e335f Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:06 2018 +0100 eeprom: at24: drop redundant variable in at24_read() We can reuse ret instead of defining a loop-local status variable. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 14263b893a524e967cdb0d39d94b6ed2bb9400c5 Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:05 2018 +0100 eeprom: at24: remove code separators These are just two left-overs from times when this driver was bigger. They are not really useful anymore. Remove them. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 4 ---- 1 file changed, 4 deletions(-) commit 5ca2b5b70e1a50389a4e21cf3ee0bef3052268dc Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:03 2018 +0100 eeprom: at24: arrange local variables Arrange declarations of local variables by line length as visually it's easier to read. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 8cdc4e7e6d55081660d51574eee7f7456ae15c4c Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:02 2018 +0100 eeprom: at24: remove nvmem_config from at24_data This structure only needs to exist during the call to nvmem_register(). Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit d154316dde64651d8a84c0e7ce5962ac1787f379 Author: Bartosz Golaszewski Date: Mon Mar 19 10:17:01 2018 +0100 eeprom: at24: disable regmap locking We use our own mutex for locking. Disable the regmap-specific locking. Signed-off-by: Bartosz Golaszewski Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at24.c | 1 + 1 file changed, 1 insertion(+) commit a6fb6012ed4ec0450389693421a954a4c3740bec Author: Steven Rostedt (VMware) Date: Thu Mar 22 19:28:54 2018 -0400 init: Fix initcall0 name as it is "pure" not "early" The early_initcall() functions get assigned to __initcall_start[]. These are called by do_pre_smp_initcalls(). The initcall_levels[] array starts with __initcall0_start[], and initcall_levels[] are to match the initcall_level_names[] array. The first name in that array is "early", but that is not correct. As pure_initcall() functions get assigned to __initcall0_start[] array. Change the first name in initcall_level_names[] array to "pure". Signed-off-by: Steven Rostedt (VMware) init/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e4cf2bf6d1c198a90ccc0df5ffd8e0d4ea36b48 Author: Dan Carpenter Date: Fri Mar 23 14:37:36 2018 +0300 tracing: Fix a potential NULL dereference We forgot to set the error code on this path so we return ERR_PTR(0) which is NULL. It results in a NULL dereference in the caller. Link: http://lkml.kernel.org/r/20180323113735.GC28518@mwanda Fixes: 100719dcef44 ("tracing: Add simple expression support to hist triggers") Acked-by: Tom Zanussi Signed-off-by: Dan Carpenter Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 1 + 1 file changed, 1 insertion(+) commit c84f259c8772d439fc6f014405c735d31943cf18 Author: Devang Panchal Date: Wed Mar 21 11:04:35 2018 +0530 eeprom: at25: sizeof t should be sizeof(t) Resolved checkpatch warning "sizeof t should be sizeof(t)" issue found by checkpatch. Signed-off-by: Devang Panchal Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at25.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 009749d73186e0b02bbff6c26ef5e059285b7860 Author: Ioana Radulescu Date: Fri Mar 23 08:44:13 2018 -0500 staging: fsl-dpaa2/eth: Change max number of Tx queues We use DPAA2_ETH_MAX_TX_QUEUES to dimension the array holding information on Tx queues. At most, we can have one queue per cpu. Until now we used the NR_CPUS macro to set the upper limit on number of Tx queues. However, the platforms that the DPAA2 Ethernet driver supports have at most 16 cores, whereas NR_CPUS is Kconfigurable and can be much higher. Avoid allocating memory we'll never use, by setting DPAA2_ETH_MAX_TX_QUEUES to 16. Same for DPAA2_ETH_MAX_DPCONS. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa722c0039adc833983eb09dc94d355fde3d8462 Author: Ioana Radulescu Date: Fri Mar 23 08:44:12 2018 -0500 staging: fsl-dpaa2/eth: Fix SGT allocation We mistakenly allocate space for too many entries in the scatter-gather table of multi buffer egress frames. While it doesn't have a negative impact from a functional point of view, it wastes resources so fix it. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2718e6fd33aa0ea86a450704ba8c19032709927 Author: Ioana Radulescu Date: Fri Mar 23 08:44:11 2018 -0500 staging: fsl-dpaa2/eth: Cleanup TX frame freeing code Cleanup code in free_tx_fd() that deals with S/G frames: - remove local variables that aren't really needed - in the frame sw annotation area, store the actual SG table buffer size, which is needed on free, rather then recompute it based on number of S/G entries Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 17 +++++------------ drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 2 +- 2 files changed, 6 insertions(+), 13 deletions(-) commit e018f1fd99adcd8e467ac60796ea93f5d86d2afe Author: Ioana Radulescu Date: Fri Mar 23 08:44:10 2018 -0500 staging: fsl-dpaa2/eth: Change link settings on the fly Newer MC versions allow us to change link settings while the interface is up. Only check interface status if we are using an old version. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 311cffa5e2c86532c0e3b7ba11a860424c4647d7 Author: Ioana Radulescu Date: Fri Mar 23 08:44:09 2018 -0500 staging: fsl-dpaa2/eth: Add DPNI version check The DPAA2 Ethernet driver assumes the DPNI objects that it uses to build network interfaces have a minimum supported API version, but until now it did nothing to enforce this requirement. Add a check at probe time to make sure the DPNI object is compatible with the set of MC commands we intend to use on it. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 15 +++++++++++++++ drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 10 ++++++++++ drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c | 11 ++--------- 3 files changed, 27 insertions(+), 9 deletions(-) commit 2a6c7f34fd18ef535459c39676a31044dd1a9091 Author: Ioana Radulescu Date: Fri Mar 23 08:44:08 2018 -0500 staging: fsl-dpaa2/eth: Remove packed attribute Structure dpaa2_fas is naturally aligned, so no need to use the __packed attribute explicitly. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c5c0e461793a7d64a9b7d250993def709d4d07e Author: Ioana Radulescu Date: Fri Mar 23 08:44:07 2018 -0500 staging: fsl-dpaa2/eth: Remove unused field Remove dpio_id field in struct dpaa2_eth_channel, which wasn't used anywhere in the code. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 1 - 1 file changed, 1 deletion(-) commit 7472dd9f649958be6a8880ed439233c8414a7b34 Author: Ioana Radulescu Date: Fri Mar 23 08:44:06 2018 -0500 staging: fsl-dpaa2/eth: Move print message Let the driver remove() function print an informative message after it finishes removing the network interface, not at an arbitrary point during cleanup. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fdc9b53201aca9211a515aaa6df9e458783de756 Author: Ioana Radulescu Date: Fri Mar 23 08:44:05 2018 -0500 staging: fsl-dpaa2/eth: Use generic irq handler For the link state interrupt, we used a dummy non-threaded irq handler, which had the same implementation as the generic irq_default_primary_handler() function. Give up on using our own irq handler and let the kernel use the generic one instead. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 4554af3492fa2d0035357e02ebfcc24215aa4384 Author: Christian Lütke-Stetzkamp Date: Wed Mar 21 23:25:38 2018 +0100 staging: mt7621-dma: Fixing parenthesis alignment Fixes checkpatch check: PARENTHESIS_ALIGNMENT Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-dma/mtk-hsdma.c | 29 +++++++++-------- drivers/staging/mt7621-dma/ralink-gdma.c | 55 ++++++++++++++++---------------- 2 files changed, 43 insertions(+), 41 deletions(-) commit 5e62653b6f20f3c14fa17fff35276e7e99fffb53 Author: Christian Lütke-Stetzkamp Date: Wed Mar 21 23:25:37 2018 +0100 staging: mt7621-dma: Removing unnecessary braces Fixes checkpatch warning: BRACES Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-dma/mtk-hsdma.c | 4 ++-- drivers/staging/mt7621-dma/ralink-gdma.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) commit 2712d0e8a99df63c4bb8ebef00f44c57dfad1788 Author: Christian Lütke-Stetzkamp Date: Wed Mar 21 23:25:36 2018 +0100 staging: mt7621-dma: Fix ident by space Fixes checkpatch error: CODE_IDENT Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-dma/ralink-gdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c48f6ac12cb5233ce767fdff5d92be551f194d61 Author: Christian Lütke-Stetzkamp Date: Wed Mar 21 23:25:35 2018 +0100 staging: mt7621-dma: Remove assignment in if Fixes checkpatch error: ASSIGN_IN_IF by adding an inner if in the else path, this also avoids calling vchan_find_desc when not needed. Signed-off-by: Christian Lütke-Stetzkamp Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-dma/ralink-gdma.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c1a3a340814376d8950a99a6300579aedcbf6ded Author: Christian Lütke-Stetzkamp Date: Wed Mar 21 23:25:34 2018 +0100 staging: mt7621-dma: Fix open brace position Fixes checkpatch error: OPEN_BRACE Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-dma/ralink-gdma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f22d82420f095c71009bdc14aeff0593ad7958fb Author: Christian Lütke-Stetzkamp Date: Wed Mar 21 23:25:33 2018 +0100 staging: mt7621-dma: Fix Spacing Fixes checkpatch error: SPACING Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-dma/mtk-hsdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c91034b21d28d88c4dd440a940e5e94837ff3e83 Author: Christian Lütke-Stetzkamp Date: Wed Mar 21 23:25:32 2018 +0100 staging: mt7621-dma: Fix Pointer Location Fixes checkpatch error: POINTER_LOCATION Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-dma/mtk-hsdma.c | 2 +- drivers/staging/mt7621-dma/ralink-gdma.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b90a6e10f114ee136314763ec5bc302044d5ee90 Author: Quytelda Kahja Date: Thu Mar 22 22:07:45 2018 -0700 staging: ks7010: Remove hostif_infrastructure_set2_request_t. The handling of hostif_infrastructure_set_request_t and hostif_infrastructure_set2_request_t is identical, with the exception of the event type value. Merge the two structs so they can be handled by a single function ('hostif_infrastructure_set_request'). Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 50 +++----------------------------------- drivers/staging/ks7010/ks_hostif.h | 16 ------------ 2 files changed, 4 insertions(+), 62 deletions(-) commit 72d73d63a7c914cb1f93e89101aa3374708c66ad Author: Quytelda Kahja Date: Thu Mar 22 22:07:44 2018 -0700 staging: ks7010: Factor out repeated code for reading IEs. Some of the code for reading IEs is replicated multiple times in the switch statement for get_ap_information(). Factor that code out into read_ie(). Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit f9b280fa9f31750a71db37ceb6ae909defe68b95 Author: Quytelda Kahja Date: Thu Mar 22 22:07:43 2018 -0700 staging: ks7010: Replace memcmp() operation with ether_addr_equal(). Instead of using memcmp() to directly compare BSSIDs, use ether_addr_equal() from 'linux/etherdevice.h'. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 69a3d5bc6120879ce3a41fba2471de7fff4c72de Author: Quytelda Kahja Date: Thu Mar 22 22:07:42 2018 -0700 staging: ks7010: Remove duplicate #define's The AUTH_TYPE_OPEN_SYSTEM and AUTH_TYPE_SHARED_KEY #define lines are duplicated in ks_hostif.h. Replace them both with one set of Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 6024089f0bdad0695a54b32f2c498b2a1ae63c66 Author: Quytelda Kahja Date: Thu Mar 22 22:07:41 2018 -0700 staging: ks7010: Factor out common members in request structs. Most of the request structures defined in ks_hostif.h have common members: * __le16 phy_type; * __le16 cts_mode; * __le16 scan_type; * __le16 capability; * struct rate_set16_t rate_set; Factor out these members into a common substructure of type 'hostif_request_t'. This allows a large portion of the request initialization code in ks_hostif.c to be factored out into the 'init_request' function. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 53 +++++++++++-------------------------- drivers/staging/ks7010/ks_hostif.h | 54 ++++++++++++++++---------------------- 2 files changed, 38 insertions(+), 69 deletions(-) commit 20e9cb0a646c08918ee509ac55376bc3d436c0e1 Author: Quytelda Kahja Date: Thu Mar 22 22:07:40 2018 -0700 staging: ks7010: Fix lines over 80 characters due to comments. There are several instances where comments are spaced so far to the right they cause the line to go over the 80 character limit. Move these comments to above the statements they describe instead. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 5927cb347e69dffeb6250e59238dedf240d9e73e Author: Quytelda Kahja Date: Thu Mar 22 22:07:39 2018 -0700 staging: ks7010: Fix line over 80 characters. There is no reason for comment describing the BSSID check for loop to be spaced so far to the right. Move it above the for loop. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 71e9513b2571ea139bb3619e3a4e3a3e98ea9767 Author: Christophe JAILLET Date: Tue Mar 13 22:01:13 2018 +0100 staging: vme: vme_user: Fix some error handling paths in 'vme_user_probe()' 2 gotos in error handling paths branch to the wrong label. Fix it. Signed-off-by: Christophe JAILLET Signed-off-by: Greg Kroah-Hartman drivers/staging/vme/devices/vme_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0c27d1747b9409b7fa4f0a90f10facd4577edee4 Author: Jian Zhang Date: Fri Mar 23 18:49:09 2018 +0800 Staging: comedi: fix multiple line dereference coding style issue in cb_pcidas64.c This is a patch to the cb_pcidas64.c file that fixes up a multiple line dereference warning found by the checkpatch.pl tool. Signed-off-by: Jian Zhang Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/cb_pcidas64.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 9eb7194690ba358db58da3180b11e526496481bc Author: Ian Abbott Date: Fri Mar 23 13:54:33 2018 +0000 staging: comedi: cb_pcidas64: Fix external_ai_queue_in_use() `external_ai_queue_in_use()` is supposed to return 1 if the external channel sequencer is in use by an AI command, else return 0. If the "read" subdevice (which is the AI subdevice) is not busy then no AI command is running so the external channel sequencer is not in use, so the function should return 0. Unfortunately, the function's "read" subdevice busy test is inverted, so the function always returns 0 when the "read" subdevice is busy. Worse, if the "read" subdevice is not busy the subsequent call to `use_internal_queue_6xxx()` results in a null pointer dereference if a previous AI command used a channel list with a length greater than 1. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/cb_pcidas64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d20e467dfadf14b9437d2b04040a3a342974ec9 Author: Ian Abbott Date: Fri Mar 23 13:54:32 2018 +0000 Revert "staging: comedi: cb_pcidas64: change params to external_ai_queue_in_use()" This reverts commit f5f3a2c6569e ("staging: comedi: cb_pcidas64: change params to external_ai_queue_in_use()"). The `external_ai_queue_in_use()` was being called from `ao_cmd()` with pointers to the "write" subdevice and AO command, but is supposed to check whether the external AI queue is currently in use by the "read" subdevice and AI command. In fact, the return value always indicated that the external AI queue was not in use in this case (because the AO command's channel list is sequential), so was fairly useless. (However, even before the reverted commit, the logic in `external_ai_queue_in_use()` was wrong. That will be corrected in a subsequent commit.) Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/cb_pcidas64.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 1e8ac83b6caf9567a8d68b3e650b7a093fd47e4b Author: Ioana Ciornei Date: Thu Mar 15 12:05:33 2018 -0500 bus: fsl-mc: add fsl_mc_allocator cleanup function The userspace support for fsl-mc requires a fsl_mc_allocator cleanup function. Add the needed function. Signed-off-by: Ioana Ciornei Signed-off-by: Greg Kroah-Hartman drivers/bus/fsl-mc/fsl-mc-allocator.c | 5 +++++ drivers/bus/fsl-mc/fsl-mc-private.h | 2 ++ 2 files changed, 7 insertions(+) commit 5b04cedeca188874d3267bc210ec10c337635ddd Author: Ioana Ciornei Date: Thu Mar 15 12:05:31 2018 -0500 bus: fsl-mc: change mc_command in fsl_mc_command The "struct mc_command" is a very generic name for a global kernel structure. Change its name in "struct fsl_mc_command". Signed-off-by: Ioana Ciornei Signed-off-by: Greg Kroah-Hartman drivers/bus/fsl-mc/dpbp.c | 12 ++--- drivers/bus/fsl-mc/dpcon.c | 14 +++--- drivers/bus/fsl-mc/dpmcp.c | 6 +-- drivers/bus/fsl-mc/dprc.c | 28 +++++------ drivers/bus/fsl-mc/fsl-mc-bus.c | 2 +- drivers/bus/fsl-mc/mc-sys.c | 20 ++++---- drivers/staging/fsl-dpaa2/ethernet/dpni.c | 84 +++++++++++++++---------------- drivers/staging/fsl-dpaa2/ethsw/dpsw.c | 64 +++++++++++------------ drivers/staging/fsl-mc/bus/dpio/dpio.c | 12 ++--- include/linux/fsl/mc.h | 10 ++-- 10 files changed, 126 insertions(+), 126 deletions(-) commit 2904e68ff2ceb6f18f2f130749e6862c90725ab6 Author: Benjamin Tissoires Date: Tue Mar 20 12:04:51 2018 +0100 HID: core: reset the quirks before calling probe again Given that now the quirk handling is done in hid-quirk.c, we can actually reset the quirks before calling .probe(), so that the drivers do not need to keep track of initial quirks. Signed-off-by: Benjamin Tissoires Acked-by: Peter Hutterer Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 2 ++ drivers/hid/hid-multitouch.c | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) commit adaabbf48fdf0ef31997e4054a88aaba16ad8b76 Author: Benjamin Tissoires Date: Tue Mar 20 12:04:50 2018 +0100 HID: multitouch: do not set HID_QUIRK_NO_INIT_REPORTS It is set by default now, so there is no point setting it in the driver Signed-off-by: Benjamin Tissoires Acked-by: Peter Hutterer Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit 39335d1cbb8fb3260ac5f18fbcc45beb690e5ebd Author: Benjamin Tissoires Date: Tue Mar 20 12:04:49 2018 +0100 HID: core: remove the need for HID_QUIRK_NO_EMPTY_INPUT There is no real point of registering an empty input node. This should be default, but given some drivers need the blank input node to set it up during input_configured, we need to postpone the check for hidinput_has_been_populated(). Signed-off-by: Benjamin Tissoires Acked-by: Peter Hutterer Signed-off-by: Jiri Kosina drivers/hid/hid-asus.c | 3 +-- drivers/hid/hid-input.c | 10 +++++----- drivers/hid/hid-multitouch.c | 1 - drivers/hid/hid-uclogic.c | 1 - include/linux/hid.h | 2 +- 5 files changed, 7 insertions(+), 10 deletions(-) commit c30e5989d6926c5c1c77c87ed1e54f506e095d74 Author: Benjamin Tissoires Date: Tue Mar 20 12:04:48 2018 +0100 HID: use BIT() macro for quirks too This should prevent future mess ups fortunately. Signed-off-by: Benjamin Tissoires Acked-by: Peter Hutterer -- include/linux/hid.h | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) Signed-off-by: Jiri Kosina include/linux/hid.h | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 1c6ef16d38091a1820e98df25900b5977e404bbd Author: Benjamin Tissoires Date: Tue Mar 20 12:04:47 2018 +0100 HID: use BIT macro instead of plain integers for flags This can lead to some hairy situation with the developer losing a day or two realizing that 4 should be after 2, not 3. Signed-off-by: Benjamin Tissoires Reviewed-by: Dmitry Torokhov Acked-by: Peter Hutterer -- include/linux/hid.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) Signed-off-by: Jiri Kosina include/linux/hid.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 843e475f944a531210c71943efe09fca346a9a03 Author: Benjamin Tissoires Date: Tue Mar 20 12:04:46 2018 +0100 HID: multitouch: remove dead zones of Razer Blade Stealth The Razer Blade Stealth detects palms too aggressively and this creates a dead zone around the touchpad. Users like being able to use their entire touchpad, so we should probably not filter out the "palm" events from the device and report them as regular touches, leaving the palm detection up to the upper stack Link: https://bugs.freedesktop.org/show_bug.cgi?id=105409 Signed-off-by: Benjamin Tissoires Acked-by: Peter Hutterer Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit d9c57a7090ba5eaef716e0ab443d6bdd06278a68 Author: Benjamin Tissoires Date: Tue Mar 20 12:04:45 2018 +0100 HID: multitouch: export a quirk for the button handling of touchpads Instead of using the class name, we better have a specific quirk for it so other classes can make use of it. Signed-off-by: Benjamin Tissoires Acked-by: Peter Hutterer Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 09695ad78f1f5f315c7e9c5090f0c7b846a43690 Author: Rex Zhu Date: Thu Mar 22 14:38:37 2018 +0800 drm/amd/pp: clean header file hwmgr.h Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.h | 3 +++ drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 15 ++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 5b2933556fe02b3576758609918694a9e2a031d0 Author: Colin Ian King Date: Wed Mar 21 18:26:53 2018 +0000 drm/amd/pp: use mlck_table.count for array loop index limit v2: use temporaries to trivially reduces object size. The for-loops process data in the mclk_table but use slck_table.count as the loop index limit. I believe these are cut-n-paste errors from the previous almost identical loops as indicated by static analysis. Fix these. Detected by CoverityScan, CID#1466001 ("Copy-paste error") Fixes: 5d97cf39ff24 ("drm/amd/pp: Add and initialize OD_dpm_table for CI/VI.") Fixes: 5e4d4fbea557 ("drm/amd/pp: Implement edit_dpm_table on smu7") Reviewed-by: Rex Zhu Signed-off-by: Colin Ian King Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 47319f7186b8746521b0ee674054b29d7b35578b Author: Tomeu Vizoso Date: Thu Mar 22 14:58:33 2018 +0100 printk: change message to pr_info To allow userspace to prevent this message from appearing in the console by changing the log priority. This matches other informative messages that the power subsystem emits when the system changes power states. Link: http://lkml.kernel.org/r/20180322135833.16602-1-tomeu.vizoso@collabora.com To: linux-kernel@vger.kernel.org Cc: kernel@collabora.com Cc: Steven Rostedt Signed-off-by: Tomeu Vizoso Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek kernel/printk/printk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d97d5aba08b26108f95dc9fb7bbe4d9436c769c Author: Philipp Puschmann Date: Fri Mar 23 10:22:15 2018 +0100 arm: dts: socfpga: fix GIC PPI warning Fixes the warning "GIC: PPI13 is secure or misconfigured" by changing the interrupt type from level_low to edge_raising Signed-off-by: Philipp Puschmann Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 956c8cd692ba2ca2dea2bb34d4102268bb5460f2 Author: Dinh Nguyen Date: Mon Mar 12 09:49:21 2018 -0500 arm64: dts: stratix10: disable false USB overcurrent on devkit Disable the USB overcurrent condition that is falsely detected on the devkit. Signed-off-by: Dinh Nguyen arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts | 1 + 1 file changed, 1 insertion(+) commit 3b0fb63f25125939735d92a58b2b89b575501b9e Author: Dinh Nguyen Date: Mon Mar 5 09:21:05 2018 -0600 arm64: dts: stratix10: enable watchdog timer on the S10 devkit Enables the watchdog0 timer on the Stratix10 devkit. Signed-off-by: Dinh Nguyen arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 2ddc8e2d2b5902b376fee51585c8eed72b8836e7 Author: Filip Alac Date: Wed Mar 21 17:28:25 2018 +0100 HID: usbhid: extend the polling interval configuration to keyboards For mouse and joystick devices user can change the polling interval via usbhid.mousepoll and usbhid.jspoll. Implement the same thing for keyboards, so user can reduce(or increase) input latency this way. This has been tested with a Cooler Master Devastator with kbpoll=32, resulting in delay between events of 32 ms(values were taken from evtest). Signed-off-by: Filip Alac Signed-off-by: Jiri Kosina Documentation/admin-guide/kernel-parameters.txt | 3 +++ drivers/hid/usbhid/hid-core.c | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) commit 681c617b7c42fce0798c2b0b472f270f28c82d56 Author: Paul Mackerras Date: Wed Mar 21 21:32:03 2018 +1100 KVM: PPC: Book3S HV: Work around TEXASR bug in fake suspend state This works around a hardware bug in "Nimbus" POWER9 DD2.2 processors, where the contents of the TEXASR can get corrupted while a thread is in fake suspend state. The workaround is for the instruction emulation code to use the value saved at the most recent guest exit in real suspend mode. We achieve this by simply not saving the TEXASR into the vcpu struct on an exit in fake suspend state. We also have to take care to set the orig_texasr field only on guest exit in real suspend state. This also means that on guest entry in fake suspend state, TEXASR will be restored to the value it had on the last exit in real suspend state, effectively counteracting any hardware-caused corruption. This works because TEXASR may not be written in suspend state. With this, the guest might see the wrong values in TEXASR if it reads it while in suspend state, but will see the correct value in non-transactional state (e.g. after a treclaim), and treclaim will work correctly. With this workaround, the code will actually run slightly faster, and will operate correctly on systems without the TEXASR bug (since TEXASR may not be written in suspend state, and is only changed by failure recording, which will have already been done before we get into fake suspend state). Therefore these changes are not made subject to a CPU feature bit. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_hv_rmhandlers.S | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 87a11bb6a7f7d131bd2112f210eff780aa25b04c Author: Suraj Jitindar Singh Date: Wed Mar 21 21:32:02 2018 +1100 KVM: PPC: Book3S HV: Work around XER[SO] bug in fake suspend mode This works around a hardware bug in "Nimbus" POWER9 DD2.2 processors, where a treclaim performed in fake suspend mode can cause subsequent reads from the XER register to return inconsistent values for the SO (summary overflow) bit. The inconsistent SO bit state can potentially be observed on any thread in the core. We have to do the treclaim because that is the only way to get the thread out of suspend state (fake or real) and into non-transactional state. The workaround for the bug is to force the core into SMT4 mode before doing the treclaim. This patch adds the code to do that, conditional on the CPU_FTR_P9_TM_XER_SO_BUG feature bit. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_hv_rmhandlers.S | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 4bb3c7a0208fc13ca70598efd109901a7cd45ae7 Author: Paul Mackerras Date: Wed Mar 21 21:32:01 2018 +1100 KVM: PPC: Book3S HV: Work around transactional memory bugs in POWER9 POWER9 has hardware bugs relating to transactional memory and thread reconfiguration (changes to hardware SMT mode). Specifically, the core does not have enough storage to store a complete checkpoint of all the architected state for all four threads. The DD2.2 version of POWER9 includes hardware modifications designed to allow hypervisor software to implement workarounds for these problems. This patch implements those workarounds in KVM code so that KVM guests see a full, working transactional memory implementation. The problems center around the use of TM suspended state, where the CPU has a checkpointed state but execution is not transactional. The workaround is to implement a "fake suspend" state, which looks to the guest like suspended state but the CPU does not store a checkpoint. In this state, any instruction that would cause a transition to transactional state (rfid, rfebb, mtmsrd, tresume) or would use the checkpointed state (treclaim) causes a "soft patch" interrupt (vector 0x1500) to the hypervisor so that it can be emulated. The trechkpt instruction also causes a soft patch interrupt. On POWER9 DD2.2, we avoid returning to the guest in any state which would require a checkpoint to be present. The trechkpt in the guest entry path which would normally create that checkpoint is replaced by either a transition to fake suspend state, if the guest is in suspend state, or a rollback to the pre-transactional state if the guest is in transactional state. Fake suspend state is indicated by a flag in the PACA plus a new bit in the PSSCR. The new PSSCR bit is write-only and reads back as 0. On exit from the guest, if the guest is in fake suspend state, we still do the treclaim instruction as we would in real suspend state, in order to get into non-transactional state, but we do not save the resulting register state since there was no checkpoint. Emulation of the instructions that cause a softpatch interrupt is handled in two paths. If the guest is in real suspend mode, we call kvmhv_p9_tm_emulation_early() to handle the cases where the guest is transitioning to transactional state. This is called before we do the treclaim in the guest exit path; because we haven't done treclaim, we can get back to the guest with the transaction still active. If the instruction is a case that kvmhv_p9_tm_emulation_early() doesn't handle, or if the guest is in fake suspend state, then we proceed to do the complete guest exit path and subsequently call kvmhv_p9_tm_emulation() in host context with the MMU on. This handles all the cases including the cases that generate program interrupts (illegal instruction or TM Bad Thing) and facility unavailable interrupts. The emulation is reasonably straightforward and is mostly concerned with checking for exception conditions and updating the state of registers such as MSR and CR0. The treclaim emulation takes care to ensure that the TEXASR register gets updated as if it were the guest treclaim instruction that had done failure recording, not the treclaim done in hypervisor state in the guest exit path. With this, the KVM_CAP_PPC_HTM capability returns true (1) even if transactional memory is not available to host userspace. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kvm_asm.h | 2 + arch/powerpc/include/asm/kvm_book3s.h | 4 + arch/powerpc/include/asm/kvm_book3s_64.h | 43 ++++++ arch/powerpc/include/asm/kvm_book3s_asm.h | 1 + arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/include/asm/ppc-opcode.h | 4 + arch/powerpc/include/asm/reg.h | 7 + arch/powerpc/kernel/asm-offsets.c | 2 + arch/powerpc/kernel/cputable.c | 1 - arch/powerpc/kernel/exceptions-64s.S | 4 +- arch/powerpc/kvm/Makefile | 7 + arch/powerpc/kvm/book3s_hv.c | 18 ++- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 143 +++++++++++++++++++- arch/powerpc/kvm/book3s_hv_tm.c | 216 ++++++++++++++++++++++++++++++ arch/powerpc/kvm/book3s_hv_tm_builtin.c | 109 +++++++++++++++ arch/powerpc/kvm/powerpc.c | 5 +- 16 files changed, 557 insertions(+), 10 deletions(-) commit 7672691a08c886e53ccbf8cdca406f8c92ec7a20 Author: Paul Mackerras Date: Wed Mar 21 21:32:00 2018 +1100 powerpc/powernv: Provide a way to force a core into SMT4 mode POWER9 processors up to and including "Nimbus" v2.2 have hardware bugs relating to transactional memory and thread reconfiguration. One of these bugs has a workaround which is to get the core into SMT4 state temporarily. This workaround is only needed when running bare-metal. This patch provides a function which gets the core into SMT4 mode by preventing threads from going to a stop state, and waking up those which are already in a stop state. Once at least 3 threads are not in a stop state, the core will be in SMT4 and we can continue. To do this, we add a "dont_stop" flag to the paca to tell the thread not to go into a stop state. If this flag is set, power9_idle_stop() just returns immediately with a return value of 0. The pnv_power9_force_smt4_catch() function does the following: 1. Set the dont_stop flag for each thread in the core, except ourselves (in fact we use an atomic_inc() in case more than one thread is calling this function concurrently). 2. See how many threads are awake, indicated by their requested_psscr field in the paca being 0. If this is at least 3, skip to step 5. 3. Send a doorbell interrupt to each thread that was seen as being in a stop state in step 2. 4. Until at least 3 threads are awake, scan the threads to which we sent a doorbell interrupt and check if they are awake now. This relies on the following properties: - Once dont_stop is non-zero, requested_psccr can't go from zero to non-zero, except transiently (and without the thread doing stop). - requested_psscr being zero guarantees that the thread isn't in a state-losing stop state where thread reconfiguration could occur. - Doing stop with a PSSCR value of 0 won't be a state-losing stop and thus won't allow thread reconfiguration. - Once threads_per_core/2 + 1 (i.e. 3) threads are awake, the core must be in SMT4 mode, since SMT modes are powers of 2. This does add a sync to power9_idle_stop(), which is necessary to provide the correct ordering between setting requested_psscr and checking dont_stop. The overhead of the sync should be unnoticeable compared to the latency of going into and out of a stop state. Because some objected to incurring this extra latency on systems where the XER[SO] bug is not relevant, I have put the test in power9_idle_stop inside a feature section. This means that pnv_power9_force_smt4_catch() WILL NOT WORK correctly on systems without the CPU_FTR_P9_TM_XER_SO_BUG feature bit set, and will probably hang the system. In order to cater for uses where the caller has an operation that has to be done while the core is in SMT4, the core continues to be kept in SMT4 after pnv_power9_force_smt4_catch() function returns, until the pnv_power9_force_smt4_release() function is called. It undoes the effect of step 1 above and allows the other threads to go into a stop state. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/asm-prototypes.h | 3 ++ arch/powerpc/include/asm/paca.h | 3 ++ arch/powerpc/include/asm/powernv.h | 1 + arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kernel/idle_book3s.S | 21 ++++++++ arch/powerpc/platforms/powernv/idle.c | 81 +++++++++++++++++++++++++++++++ 6 files changed, 110 insertions(+) commit b5af4f2793233cf37596e2c1f7b23385dc3aaa58 Author: Paul Mackerras Date: Wed Mar 21 21:31:59 2018 +1100 powerpc: Add CPU feature bits for TM bug workarounds on POWER9 v2.2 This adds a CPU feature bit which is set for POWER9 "Nimbus" DD2.2 processors which will be used to enable the hypervisor to assist hardware with the handling of checkpointed register values while the CPU is in suspend state, in order to work around hardware bugs. The hardware assistance for these workarounds introduced a new hardware bug relating to the XER[SO] bit. We add a separate feature bit for this bug in case future chips fix it while still requiring the hypervisor assistance with suspend state. When the dt_cpu_ftrs subsystem is in use, the software assistance can be enabled using a "tm-suspend-hypervisor-assist" node in the device tree, and a "tm-suspend-xer-so-bug" node enables the workarounds for the XER[SO] bug. In the absence of such nodes, a quirk enables both for POWER9 "Nimbus" DD2.2 processors. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 7 ++++++- arch/powerpc/kernel/cputable.c | 24 ++++++++++++++++++++++-- arch/powerpc/kernel/dt_cpu_ftrs.c | 5 +++++ 3 files changed, 33 insertions(+), 3 deletions(-) commit 9bbf0b576d3294b6a2fda54d1af3b88290e8b65c Author: Paul Mackerras Date: Tue Mar 20 08:46:13 2018 +1100 powerpc: Free up CPU feature bits on 64-bit machines This moves all the CPU feature bits that are only used on 32-bit machines to the top 20 bits of the CPU feature word and arranges for them to be defined only in 32-bit builds. The features that are common to 32-bit and 64-bit machines are moved to bits 0-11 of the CPU feature word. This means that for 64-bit platforms, bits 44-63 can now be used for new features that only exist on 64-bit machines. (These bit numbers are counting from the right, i.e. the LSB is bit 0.) Because CPU_FTR_L3_DISABLE_NAP moved from the low 16 bits to the high 16 bits, we have to adjust some assembly code. Also, CPU_FTR_EMB_HV moved from the high 16 bits to the low 16 bits. Note that CPU_FTR_REAL_LE only applies to 64-bit chips, because only 64-bit chips (POWER6, 7, 8, 9) have a true little-endian mode that is a CPU execution mode as opposed to being a page attribute. With this we now have 20 free CPU feature bits on 64-bit machines. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 133 ++++++++++++++++-------------- arch/powerpc/kernel/cpu_setup_6xx.S | 2 +- arch/powerpc/kernel/cpu_setup_fsl_booke.S | 2 +- 3 files changed, 73 insertions(+), 64 deletions(-) commit dd0efb3f11cc0adcb4caa192ba09ad802d1fa6c0 Author: Paul Mackerras Date: Tue Mar 20 08:46:12 2018 +1100 powerpc: Book E: Remove unused CPU_FTR_L2CSR bit The CPU_FTR_L2CSR bit is never tested anywhere, so let's reclaim the bit. The last usage was removed in 86d63363defc ("powerpc/e500mc: Remove dead L2 flushing code in idle_e500.S") (Jun 2015). Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit c0d64cf9fefd58831ce2cc81b2683bfff3760f7a Author: Paul Mackerras Date: Tue Mar 20 08:46:11 2018 +1100 powerpc: Use feature bit for RTC presence rather than timebase presence All PowerPC CPUs other than the original PPC601 have a timebase register rather than the "real-time clock" (RTC) register that the PPC601 (and the original POWER and POWER2 CPUs) had. Currently we have a CPU feature bit to indicate the presence of the timebase, but it makes more sense to use a bit to indicate the unusual situation rather than the common situation. This therefore defines a CPU_FTR_USE_RTC bit in place of the CPU_FTR_USE_TB bit, and arranges for it to be set on PPC601 systems. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 85 +++++++++++++++++-------------------- arch/powerpc/include/asm/time.h | 2 +- arch/powerpc/kernel/dt_cpu_ftrs.c | 3 +- arch/powerpc/kernel/vdso.c | 12 +++--- 4 files changed, 47 insertions(+), 55 deletions(-) commit 64627388b50158fd24d6ad88132525b95a5ef573 Author: Zhengjun Xing Date: Wed Mar 21 13:29:42 2018 +0800 USB:fix USB3 devices behind USB3 hubs not resuming at hibernate thaw USB3 hubs don't support global suspend. USB3 specification 10.10, Enhanced SuperSpeed hubs only support selective suspend and resume, they do not support global suspend/resume where the hub downstream facing ports states are not affected. When system enters hibernation it first enters freeze process where only the root hub enters suspend, usb_port_suspend() is not called for other devices, and suspend status flags are not set for them. Other devices are expected to suspend globally. Some external USB3 hubs will suspend the downstream facing port at global suspend. These devices won't be resumed at thaw as the suspend status flag is not set. A USB3 removable hard disk connected through a USB3 hub that won't resume at thaw will fail to synchronize SCSI cache, return “cmd cmplt err -71” error, and needs a 60 seconds timeout which causing system hang for 60s before the USB host reset the port for the USB3 removable hard disk to recover. Fix this by always calling usb_port_suspend() during freeze for USB3 devices. Signed-off-by: Zhengjun Xing Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/generic.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 0442d7b08600625e0bd310fb02894840fa35f070 Author: Tomeu Vizoso Date: Thu Mar 22 16:18:32 2018 +0100 usb: hub: Reduce warning to notice on power loss Currently we warn the user when the root hub lost power after resume, but the user cannot do anything about it so it should probably be a notice. This will reduce the noise in the console during suspend and resume, which is already quite significant in many systems. Signed-off-by: Tomeu Vizoso Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ccd228e0cfce2a4f44558422d25c60fcb1a6710 Author: Mauro Carvalho Chehab Date: Fri Mar 23 08:54:22 2018 -0400 media: fimc-capture: get rid of two warnings Smatch produces two warnings when building this file: ./arch/x86/include/asm/bitops.h:433:22: warning: asm output is not an lvalue ./arch/x86/include/asm/bitops.h:433:22: warning: asm output is not an lvalue On some asm instructions. I suspect that those asm instructions might not be producing the right code, so, better to use two intermediate vars, get rid of the warnings and of the risk of producing a wrong code. Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-capture.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0d2a531d00a36e378fce570cb96dbddee1f825f7 Author: Mauro Carvalho Chehab Date: Fri Mar 23 08:43:47 2018 -0400 media: dvb-usb-v2: fix a missing dependency of I2C_MUX Now that af9015 requires I2C_MUX, all drivers that select it should also depend on it. drivers/media/dvb-frontends/af9013.o: In function `af9013_remove': >> drivers/media/dvb-frontends/af9013.c:1560: undefined reference to `i2c_mux_del_adapters' drivers/media/dvb-frontends/af9013.o: In function `af9013_probe': >> drivers/media/dvb-frontends/af9013.c:1488: undefined reference to `i2c_mux_alloc' >> drivers/media/dvb-frontends/af9013.c:1495: undefined reference to `i2c_mux_add_adapter' drivers/media/dvb-frontends/af9013.c:1544: undefined reference to `i2c_mux_del_adapters' Reported-by: kbuild test robot Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86b2989361df6fd9bb3f46518b5326775c76358d Author: Mauro Carvalho Chehab Date: Fri Mar 23 08:23:23 2018 -0400 media: uvc: to the right check at uvc_ioctl_enum_framesizes() While the logic there is correct, it tricks both humans and machines, a the check if "i" var is not zero is actually to validate if the "frames" var was initialized when the loop ran for the first time. That produces the following warning: drivers/media/usb/uvc/uvc_v4l2.c:1192 uvc_ioctl_enum_framesizes() error: potentially dereferencing uninitialized 'frame'. Change the logic to do the right test instead. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_v4l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 98c1ce0ccff1617cba45e8ead236768a50545e7f Author: Mauro Carvalho Chehab Date: Fri Mar 23 07:51:07 2018 -0400 media: cec-core: fix a bug at cec_error_inj_write() If the adapter doesn't have error_inj_parse_line() ops, the write() logic won't return -EINVAL, but, instead, it will keep looping, because "count" is a non-negative number. Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6d23ee9caa6790aea047f9aca7f3c03cb8d96eb6 Merge: 6555ad1 aaeab02 Author: Greg Kroah-Hartman Date: Fri Mar 23 13:33:09 2018 +0100 Merge tag 'usb-for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-testing Felipe writes: usb: changes for v4.17 merge window Quite a lot happened in this cycle, with a total of 95 non-merge commits. The most interesting parts are listed below: Synopsys has been adding better support for USB 3.1 to dwc3. The same series also sets g_mass_storage's max speed to SSP. Roger Quadros (TI) added support for dual-role using the OTG block available in some dwc3 implementations, this makes sure that AM437x can swap roles in runtime. We have a new SoC supported in dwc3 now - Amlogic Meson GX - thanks to the work of Martin Blumenstingl. We also have a ton of changes in dwc2 (51% of all changes, in fact). The most interesting part there is the support for Hibernation (a Synopsys PM feature). Apart from these, we have our regular set of non-critical fixes all over the place. commit dcbe73ca55a42712bfd0e9966cd2d5a48355ace3 Author: Pradeep Kumar Chitrapu Date: Thu Mar 22 12:18:03 2018 -0700 mac80211: notify driver for change in multicast rates With drivers implementing rate control in driver or firmware rate_control_send_low() may not get called, and thus the driver needs to know about changes in the multicast rate. Add and use a new BSS change flag for this. Signed-off-by: Pradeep Kumar Chitrapu [rewrite commit message] Signed-off-by: Johannes Berg include/net/mac80211.h | 3 +++ net/mac80211/cfg.c | 2 ++ net/mac80211/ibss.c | 2 +- net/mac80211/mesh.c | 3 ++- net/mac80211/util.c | 3 ++- 5 files changed, 10 insertions(+), 3 deletions(-) commit a01c47737a9ca118ab75c6fd6e75739b824de830 Author: Ville Syrjälä Date: Wed Mar 21 23:12:46 2018 +0200 drm: Fix uabi regression by allowing garbage mode->type from userspace Apparently xf86-video-vmware leaves the mode->type uninitialized when feeding the mode to the kernel. Thus we have no choice but to accept the garbage in. We'll just ignore any of the bits we don't want. The mode type is just a hint anyway, and more useful for the kernel->userspace direction. Reported-by: Thomas Hellstrom CC: Thomas Hellstrom Cc: Adam Jackson Cc: Alex Deucher Fixes: c6ed6dad5cfb ("drm/uapi: Validate the mode flags/type") References: https://lists.freedesktop.org/archives/dri-devel/2018-March/170213.html Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180321211246.10152-1-ville.syrjala@linux.intel.com Tested-by: Thomas Hellstrom Reviewed-by: Maarten Lankhorst Reviewed-by: Daniel Stone drivers/gpu/drm/drm_modes.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit afdb4ca2be93d02cd1902395a7191097963dd8c1 Author: Mauro Carvalho Chehab Date: Fri Mar 23 07:48:08 2018 -0400 media: tda9840: cleanup a warning There's a false positive warning there: drivers/media/i2c/tda9840.c:79 tda9840_status() error: uninitialized symbol 'byte'. Change the code to match our coding style, in order to fix it. Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tda9840.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e771bdf595ce7b297d9d50918300220f4981b5da Author: Mauro Carvalho Chehab Date: Fri Mar 23 07:42:32 2018 -0400 media: tm6000: avoid casting just to print pointer address Instead of casting, just use %p. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/tm6000/tm6000-video.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 728d9fd9f148f03ec0bfa4891a44210a032d9663 Author: Mauro Carvalho Chehab Date: Fri Mar 23 07:33:22 2018 -0400 media: em28xx-input: improve error handling code The current I2C error handling logic makes static analyzers confused: drivers/media/usb/em28xx/em28xx-input.c:96 em28xx_get_key_terratec() error: uninitialized symbol 'b'. Change it to match the coding style we're using elsewhere. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-input.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2be09d8d8342f775a9a6a9da6b91dded0a879718 Author: Mauro Carvalho Chehab Date: Fri Mar 23 07:31:59 2018 -0400 media: zr364xx: avoid casting just to print pointer address Instead of casting, just use %p. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/zr364xx/zr364xx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5c804c6bc55bcfb217c8001b3ca49cca0f9e7047 Author: Mauro Carvalho Chehab Date: Fri Mar 23 07:30:03 2018 -0400 media: vivid-radio-rx: add a cast to avoid a warning The logic at vivid_radio_rx_g_tuner() is producint an overflow warning: drivers/media/platform/vivid/vivid-radio-rx.c:250 vivid_radio_rx_g_tuner() warn: potential negative subtraction from max '65535 - (__builtin_choose_expr( == || == , , __builtin_choose_expr( == || == , , __builtin_choose_expr( == || == , , __builtin_choose_expr( == || == , , __builtin_choose_expr( == || == , , __builtin_choose_expr( == , , (0))))))) * 65535) / delta' Add a cast to prevent that. Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-radio-rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6062ba61567f8e08f1767ae6d1c3788247da81dc Author: Mauro Carvalho Chehab Date: Fri Mar 23 07:27:21 2018 -0400 media: saa7134-alsa: don't use casts to print a buffer address Change the logic there to avoid casting, solving this warning: drivers/media/pci/saa7134/saa7134-alsa.c:276 saa7134_alsa_dma_init() warn: argument 3 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7134/saa7134-alsa.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 43e69758e6c0cc05adc4d39316f65abb120a00a0 Author: Mauro Carvalho Chehab Date: Fri Mar 23 07:24:16 2018 -0400 media: solo6x10: get rid of an address space warning Instead of using an ancillary function to avoid duplicating a small portion of code that copies data either to kernelspace or between userspace-kernelspace, duplicate the code, as it prevents static analyzers to complain about it: drivers/media/pci/solo6x10/solo6x10-g723.c:260:46: warning: cast removes address space of expression The hole idea of using __user is to make sure that the code is doing the right thing with address space, so there's no sense on use casting. Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/solo6x10/solo6x10-g723.c | 39 ++++++++++++++++++------------ 1 file changed, 24 insertions(+), 15 deletions(-) commit 6555ad13a01952c16485c82a52ad1f3e07e34b3a Author: Clemens Werther Date: Fri Mar 16 10:20:46 2018 +0100 USB: serial: ftdi_sio: add support for Harman FirmwareHubEmulator Add device id for Harman FirmwareHubEmulator to make the device auto-detectable by the driver. Signed-off-by: Clemens Werther Cc: stable Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/ftdi_sio.c | 1 + drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++ 2 files changed, 7 insertions(+) commit 1f1e82f74c0947e40144688c9e36abe4b3999f49 Author: Johan Hovold Date: Tue Mar 6 09:32:43 2018 +0100 USB: serial: cp210x: add ELDAT Easywave RX09 id Add device id for ELDAT Easywave RX09 tranceiver. Reported-by: Jan Jansen Cc: stable Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) commit 9608e5c0f079390473b484ef92334dfd3431bb89 Author: Major Hayden Date: Fri Feb 23 14:29:54 2018 -0600 USB: serial: ftdi_sio: add RT Systems VX-8 cable This patch adds a device ID for the RT Systems cable used to program Yaesu VX-8R/VX-8DR handheld radios. It uses the main FTDI VID instead of the common RT Systems VID. Signed-off-by: Major Hayden Cc: stable Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/ftdi_sio.c | 1 + drivers/usb/serial/ftdi_sio_ids.h | 3 +++ 2 files changed, 4 insertions(+) commit 70ae6a049fa9886f3d81bb35b7a806eef72351a2 Author: Mauro Carvalho Chehab Date: Fri Mar 23 07:17:19 2018 -0400 media: zoran: don't cast pointers to print them drivers/media/pci/zoran/zoran_driver.c:242 v4l_fbuffer_alloc() warn: argument 5 to %lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/zoran/zoran_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 745029187a5465972fa2daf0fa43f1d2edb48de9 Author: Lorenzo Pieralisi Date: Thu Mar 22 16:33:17 2018 +0000 PCI: pcie-xilinx-nwl: Fix mask value to disable MSIs Compiling the xilinx-nwl driver with sparse checks result in the following warning: drivers/pci/host/pcie-xilinx-nwl.c:633:38: sparse: cast truncates bits from constant value (ffffffff00000000 becomes 0) Fix it by explicitly writing 0 to mask interrupts instead of relying on a bogus cast applied to the mask bitwise complement. Reported-by: Fengguang Wu Signed-off-by: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Rob Herring Cc: Michal Simek drivers/pci/host/pcie-xilinx-nwl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9863bc49abade85cad2ef6c1f535f61c2c24f163 Author: Mauro Carvalho Chehab Date: Fri Mar 23 07:13:06 2018 -0400 media: ir-kbd-i2c: change the if logic to avoid a warning While the code is correct, it produces this warning: drivers/media/i2c/ir-kbd-i2c.c:593 zilog_ir_format() error: buffer overflow 'code_block->codes' 61 <= 173 As static analyzers may be tricked by arithmetic expressions on comparisions. So, change the order, in order to shut up this false-positive warning. That also makes easier for humans to understand that it won't be trying to go past buffer size. Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ir-kbd-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3902dab05a2a256607764ac0b5688f29ac544c7 Author: Mauro Carvalho Chehab Date: Fri Mar 23 07:10:12 2018 -0400 media: ir-kbd-i2c: improve error handling code The current I2C error handling logic makes static analyzers confused, and it doesn't follow the coding style we're using: drivers/media/i2c/ir-kbd-i2c.c:180 get_key_pixelview() error: uninitialized symbol 'b'. drivers/media/i2c/ir-kbd-i2c.c:224 get_key_knc1() error: uninitialized symbol 'b'. drivers/media/i2c/ir-kbd-i2c.c:226 get_key_knc1() error: uninitialized symbol 'b'. Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ir-kbd-i2c.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 5fd46ac9291402ba1d04e2c5ce3b295e1c13143e Author: Mauro Carvalho Chehab Date: Fri Mar 23 07:03:51 2018 -0400 media: saa7134-input: improve error handling Currently, the code produces those false-positives: drivers/media/pci/saa7134/saa7134-input.c:203 get_key_msi_tvanywhere_plus() error: uninitialized symbol 'b'. drivers/media/pci/saa7134/saa7134-input.c:251 get_key_kworld_pc150u() error: uninitialized symbol 'b'. drivers/media/pci/saa7134/saa7134-input.c:275 get_key_purpletv() error: uninitialized symbol 'b'. Improve the error handling code, making it to look like our coding style. Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7134/saa7134-input.c | 46 +++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 9 deletions(-) commit 86f181c766218390ed8fff247a6dd4c9c2c1c5ae Author: Mauro Carvalho Chehab Date: Fri Mar 23 06:56:55 2018 -0400 media: s2255drv: fix a casting warning drivers/media/usb/s2255/s2255drv.c:651 s2255_fillbuff() warn: argument 3 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/s2255/s2255drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 057bad7bc9eec71152be1b7bf1f9c2470b7db8e6 Author: Mauro Carvalho Chehab Date: Fri Mar 23 06:52:25 2018 -0400 media: ivtvfb: Cleanup some warnings drivers/media/pci/ivtv/ivtvfb.c:349 ivtvfb_prep_frame() warn: argument 3 to %08lx specifier is cast from pointer drivers/media/pci/ivtv/ivtvfb.c:360 ivtvfb_prep_frame() warn: argument 3 to %08lx specifier is cast from pointer drivers/media/pci/ivtv/ivtvfb.c:363 ivtvfb_prep_frame() warn: argument 4 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ivtv/ivtvfb.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit b1a5dea69e48c3306e47ac470e3ff9f2fc0bbe28 Author: Mauro Carvalho Chehab Date: Thu Mar 22 15:00:32 2018 -0400 media: videobuf-dma-sg: Fix a weird cast Just use %p. Fixes this warning: drivers/media/v4l2-core/videobuf-dma-sg.c:247 videobuf_dma_init_kernel() warn: argument 2 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf-dma-sg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 42eb523ff59e6591bf21954fe30db555efc695d9 Author: Mauro Carvalho Chehab Date: Fri Mar 23 06:33:36 2018 -0400 soc_camera: fix a weird cast on printk drivers/media/platform/soc_camera/soc_camera.c:790 soc_camera_mmap() warn: argument 4 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/soc_camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b65dd4c2c318f8ae666d74ba116b417b5e8263f Author: Mauro Carvalho Chehab Date: Thu Mar 22 15:16:25 2018 -0400 media: cx23885: fix a warning drivers/media/pci/cx23885/cx23885-alsa.c:92 cx23885_alsa_dma_init() warn: argument 3 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-alsa.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit aea629c1261f9a8ba06a8ee93b45ac5bd4475943 Author: Mauro Carvalho Chehab Date: Thu Mar 22 14:56:01 2018 -0400 media: cx88: fix two warnings drivers/media/pci/cx88/cx88-alsa.c:295 cx88_alsa_dma_init() warn: argument 3 to %08lx specifier is cast from pointer drivers/media/pci/cx88/cx88-alsa.c:669 snd_cx88_wm8775_volume_put() warn: potential negative subtraction from max '65535 - (32768 * left) / right' Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx88/cx88-alsa.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0df305eb50e5dc447ddb9eab71bc7394cb9e76e4 Author: Mauro Carvalho Chehab Date: Fri Mar 23 06:48:07 2018 -0400 media: solo6x10: simplify the logic at solo_p2m_dma_desc() The logic with gets a p2m_id is more complex than needed, causing false positives with static analyzers: drivers/media/pci/solo6x10/solo6x10-p2m.c:81 solo_p2m_dma_desc() error: buffer overflow 'solo_dev->p2m_dev' 4 <= s32max Make it simpler and use unsigned int. Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/solo6x10/solo6x10-p2m.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit d3c449e16fc829dba347dc72106f8d28b15896f9 Author: Mauro Carvalho Chehab Date: Fri Mar 23 06:36:26 2018 -0400 media: bttv-input: better handle errors at I2C transfer The error handling logic at get_key_pv951() is a little bit akward, with produces this false positive warning: drivers/media/pci/bt8xx/bttv-input.c:344 get_key_pv951() error: uninitialized symbol 'b'. Do a cleanup. As a side effect, it also improves its coding style. Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/bt8xx/bttv-input.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b0121ca03865ec5fa46f2ffc9d354cd5e5613023 Author: Mauro Carvalho Chehab Date: Fri Mar 23 06:23:23 2018 -0400 media: tvaudio: improve error handling The error handling logic at tvaudio is broken on several ways, as it doesn't really check right when an error occurs. Change it to return the proper error code from read/write routines and fix the errors on reads. Shuts up the following warnings: drivers/media/i2c/tvaudio.c:222 chip_read() error: uninitialized symbol 'buffer'. drivers/media/i2c/tvaudio.c:223 chip_read() error: uninitialized symbol 'buffer'. Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tvaudio.c | 92 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 72 insertions(+), 20 deletions(-) commit 89d6e45c8af8b6e9351564a15467c90e862bbfcd Author: Mauro Carvalho Chehab Date: Thu Mar 22 15:13:58 2018 -0400 media: sp887x: fix a warning drivers/media/dvb-frontends/sp887x.c:179 sp887x_initial_setup() error: memcpy() '&buf[2]' too small (30 vs 16384) This is actually a false alarm, but reverting the check order makes not only for humans to review the code, but also cleans the warning. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/sp887x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 17d7b0af062f587f9cbedce3cb6f39a784651e2f Author: Hernán Gonzalez Date: Tue Feb 27 19:17:00 2018 -0300 evm: Constify *integrity_status_msg[] There is no gain from doing this except for some self-documenting. Signed-off-by: Hernán Gonzalez Signed-off-by: Mimi Zohar security/integrity/evm/evm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a82cee3e69d8dc89dc2e9995770e7cab0a4c9d8 Author: Hernán Gonzalez Date: Tue Feb 27 19:16:59 2018 -0300 evm: Move evm_hmac and evm_hash from evm_main.c to evm_crypto.c These variables are not used where they are was defined. There is no point in declaring them there as extern. Move and constify them, saving 2 bytes. Function old new delta init_desc 273 271 -2 Total: Before=2112094, After=2112092, chg -0.00% Signed-off-by: Hernán Gonzalez Tested-by: Fengguang Wu Signed-off-by: Mimi Zohar security/integrity/evm/evm.h | 2 -- security/integrity/evm/evm_crypto.c | 3 +++ security/integrity/evm/evm_main.c | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) commit 0834136aeaf0e79fc428bfae78340e16719a2a20 Author: Mimi Zohar Date: Wed Feb 21 11:36:52 2018 -0500 fuse: define the filesystem as untrusted Files on FUSE can change at any point in time without IMA being able to detect it. The file data read for the file signature verification could be totally different from what is subsequently read, making the signature verification useless. FUSE can be mounted by unprivileged users either today with fusermount installed with setuid, or soon with the upcoming patches to allow FUSE mounts in a non-init user namespace. This patch sets the SB_I_IMA_UNVERIFIABLE_SIGNATURE flag and when appropriate sets the SB_I_UNTRUSTED_MOUNTER flag. Signed-off-by: Mimi Zohar Cc: Miklos Szeredi Cc: Seth Forshee Cc: Dongsu Park Cc: Alban Crequy Acked-by: Serge Hallyn Acked-by: "Eric W. Biederman" fs/fuse/inode.c | 3 +++ 1 file changed, 3 insertions(+) commit 9e67028e76514a8ee279d7d006dfb8069b5115ab Author: Mimi Zohar Date: Wed Feb 21 11:36:32 2018 -0500 ima: fail signature verification based on policy This patch addresses the fuse privileged mounted filesystems in environments which are unwilling to accept the risk of trusting the signature verification and want to always fail safe, but are for example using a pre-built kernel. This patch defines a new builtin policy named "fail_securely", which can be specified on the boot command line as an argument to "ima_policy=". Signed-off-by: Mimi Zohar Cc: Miklos Szeredi Cc: Seth Forshee Cc: Dongsu Park Cc: Alban Crequy Acked-by: Serge Hallyn Acked-by: "Eric W. Biederman" Documentation/admin-guide/kernel-parameters.txt | 8 +++++++- security/integrity/ima/ima_appraise.c | 11 ++++++----- security/integrity/ima/ima_main.c | 3 ++- security/integrity/ima/ima_policy.c | 5 +++++ security/integrity/integrity.h | 1 + 5 files changed, 21 insertions(+), 7 deletions(-) commit a9a4935d44b58c858a81393694bc232a96cdcbd4 Author: Mimi Zohar Date: Sat Mar 10 23:07:34 2018 -0500 ima: clear IMA_HASH The IMA_APPRAISE and IMA_HASH policies overlap. Clear IMA_HASH properly. Fixes: da1b0029f527 ("ima: support new "hash" and "dont_hash" policy actions") Signed-off-by: Mimi Zohar security/integrity/ima/ima_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d77ccdc644a59b412d8e101576134c90a0aa6797 Author: Mimi Zohar Date: Wed Feb 21 11:35:20 2018 -0500 ima: re-evaluate files on privileged mounted filesystems This patch addresses the fuse privileged mounted filesystems in a "secure" environment, with a correctly enforced security policy, which is willing to assume the inherent risk of specific fuse filesystems that are well defined and properly implemented. As there is no way for the kernel to detect file changes, the kernel ignores the cached file integrity results and re-measures, re-appraises, and re-audits the file. Signed-off-by: Mimi Zohar Cc: Miklos Szeredi Cc: Seth Forshee Cc: Dongsu Park Cc: Alban Crequy Acked-by: Serge Hallyn Acked-by: "Eric W. Biederman" security/integrity/ima/ima_main.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 57b56ac6fecb05c3192586e4892572dd13d972de Author: Mimi Zohar Date: Wed Feb 21 11:33:37 2018 -0500 ima: fail file signature verification on non-init mounted filesystems FUSE can be mounted by unprivileged users either today with fusermount installed with setuid, or soon with the upcoming patches to allow FUSE mounts in a non-init user namespace. This patch addresses the new unprivileged non-init mounted filesystems, which are untrusted, by failing the signature verification. This patch defines two new flags SB_I_IMA_UNVERIFIABLE_SIGNATURE and SB_I_UNTRUSTED_MOUNTER. Signed-off-by: Mimi Zohar Cc: Miklos Szeredi Cc: Seth Forshee Cc: Dongsu Park Cc: Alban Crequy Acked-by: Serge Hallyn Acked-by: "Eric W. Biederman" include/linux/fs.h | 2 ++ security/integrity/ima/ima_appraise.c | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) commit d906c10d8a31654cb9167c9a2ebc7d3e43820bad Author: Matthew Garrett Date: Mon Jan 8 13:36:20 2018 -0800 IMA: Support using new creds in appraisal policy The existing BPRM_CHECK functionality in IMA validates against the credentials of the existing process, not any new credentials that the child process may transition to. Add an additional CREDS_CHECK target and refactor IMA to pass the appropriate creds structure. In ima_bprm_check(), check with both the existing process credentials and the credentials that will be committed when the new process is started. This will not change behaviour unless the system policy is extended to include CREDS_CHECK targets - BPRM_CHECK will continue to check the same credentials that it did previously. After this patch, an IMA policy rule along the lines of: measure func=CREDS_CHECK subj_type=unconfined_t will trigger if a process is executed and runs as unconfined_t, ignoring the context of the parent process. This is in contrast to: measure func=BPRM_CHECK subj_type=unconfined_t which will trigger if the process that calls exec() is already executing in unconfined_t, ignoring the context that the child process executes into. Signed-off-by: Matthew Garrett Signed-off-by: Mimi Zohar Changelog: - initialize ima_creds_status Documentation/ABI/testing/ima_policy | 2 +- security/integrity/iint.c | 2 ++ security/integrity/ima/ima.h | 9 ++++---- security/integrity/ima/ima_api.c | 9 +++++--- security/integrity/ima/ima_appraise.c | 14 ++++++++++-- security/integrity/ima/ima_main.c | 42 ++++++++++++++++++++++++++--------- security/integrity/ima/ima_policy.c | 23 ++++++++++++------- security/integrity/integrity.h | 9 ++++++-- 8 files changed, 80 insertions(+), 30 deletions(-) commit 3ec30113264a7bcd389f51d1738e42da0f41bb5a Author: Matthew Garrett Date: Mon Jan 8 13:36:19 2018 -0800 security: Add a cred_getsecid hook For IMA purposes, we want to be able to obtain the prepared secid in the bprm structure before the credentials are committed. Add a cred_getsecid hook that makes this possible. Signed-off-by: Matthew Garrett Acked-by: Paul Moore Cc: Paul Moore Cc: Stephen Smalley Cc: Casey Schaufler Signed-off-by: Mimi Zohar include/linux/lsm_hooks.h | 6 ++++++ include/linux/security.h | 1 + security/security.c | 7 +++++++ security/selinux/hooks.c | 6 ++++++ security/smack/smack_lsm.c | 18 ++++++++++++++++++ 5 files changed, 38 insertions(+) commit 912d2f8228be077a1743adb797ada1dfcfe99c81 Author: Mauro Carvalho Chehab Date: Thu Mar 22 14:02:21 2018 -0400 media: v4l2-ioctl: fix some "too small" warnings While the code there is right, it produces three false positives: drivers/media/v4l2-core/v4l2-ioctl.c:2868 video_usercopy() error: copy_from_user() 'parg' too small (128 vs 16383) drivers/media/v4l2-core/v4l2-ioctl.c:2868 video_usercopy() error: copy_from_user() 'parg' too small (128 vs 16383) drivers/media/v4l2-core/v4l2-ioctl.c:2876 video_usercopy() error: memset() 'parg' too small (128 vs 16383) Store the ioctl size on a cache var, in order to suppress those. Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ioctl.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 1a086879fdd37d9e4c3dd4e49fac62f7e418e17e Author: Mauro Carvalho Chehab Date: Thu Mar 22 13:54:18 2018 -0400 media: v4l2-tpg-core: avoid buffer overflows Fix the following warnings: drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:1146 gen_twopix() error: buffer overflow 'buf[1]' 8 <= 8 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:1152 gen_twopix() error: buffer overflow 'buf[1]' 8 <= 8 Signed-off-by: Mauro Carvalho Chehab drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit baa6f19b37cc1aebf6e84ed4c451f1078693bb4b Author: Mauro Carvalho Chehab Date: Thu Mar 22 13:44:33 2018 -0400 media: ov5670: get rid of a series of __be warnings There are some troubles on this driver with respect to the usage of __be16 and __b32 macros: drivers/media/i2c/ov5670.c:1857:27: warning: incorrect type in initializer (different base types) drivers/media/i2c/ov5670.c:1857:27: expected unsigned short [unsigned] [usertype] reg_addr_be drivers/media/i2c/ov5670.c:1857:27: got restricted __be16 [usertype] drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32 drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32 drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32 drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32 drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32 drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32 drivers/media/i2c/ov5670.c:1901:13: warning: incorrect type in assignment (different base types) drivers/media/i2c/ov5670.c:1901:13: expected unsigned int [unsigned] [usertype] val drivers/media/i2c/ov5670.c:1901:13: got restricted __be32 [usertype] Fix them. Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5670.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 43d1ed0811bb2780c49fa17e90a29b27078244a7 Author: Mauro Carvalho Chehab Date: Thu Mar 22 13:22:27 2018 -0400 media: rca: declare formats var as static As warned: drivers/media/platform/rockchip/rga/rga.c:210:16: warning: symbol 'formats' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rga/rga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8395597fa4ecb0cab9241a399d78d5d3a95d928f Author: Mauro Carvalho Chehab Date: Thu Mar 22 13:19:22 2018 -0400 media: vpss: fix annotations for vpss_regs_base2 Fix those warnings: drivers/media/platform/davinci/vpss.c:510:25: warning: incorrect type in argument 1 (different address spaces) drivers/media/platform/davinci/vpss.c:510:25: expected void volatile [noderef] *addr drivers/media/platform/davinci/vpss.c:510:25: got unsigned int [usertype] *static [toplevel] [assigned] vpss_regs_base2 drivers/media/platform/davinci/vpss.c:520:34: warning: incorrect type in assignment (different address spaces) drivers/media/platform/davinci/vpss.c:520:34: expected unsigned int [usertype] *static [toplevel] [assigned] vpss_regs_base2 drivers/media/platform/davinci/vpss.c:520:34: got void [noderef] * drivers/media/platform/davinci/vpss.c:522:54: warning: incorrect type in argument 2 (different address spaces) drivers/media/platform/davinci/vpss.c:522:54: expected void volatile [noderef] *addr drivers/media/platform/davinci/vpss.c:522:54: got unsigned int [usertype] *static [toplevel] [assigned] vpss_regs_base2 Weird enough, vpss_regs_base0 and vpss_regs_base1 were properly annotated. Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21e9b3e931f78497b19b1f8f3d59d19412c1a28f Author: Andrew Chant Date: Thu Mar 22 14:39:55 2018 -0700 ALSA: usb-audio: fix uac control query argument This patch fixes code readability and should have no functional change. Correct uac control query functions to account for the 1-based indexing of USB Audio Class control identifiers. The function parameter, u8 control, should be the constant defined in audio-v2.h to identify the control to be checked for readability or writeability. This patch fixes all callers that had adjusted, and makes explicit the mapping between audio_feature_info[] array index and the associated control identifier. Signed-off-by: Andrew Chant Signed-off-by: Takashi Iwai include/linux/usb/audio-v2.h | 4 +-- sound/usb/clock.c | 5 ++-- sound/usb/mixer.c | 69 +++++++++++++++++++++++++++----------------- 3 files changed, 48 insertions(+), 30 deletions(-) commit 6eb486b66a3094cdcd68dc39c9df3a29d6a51dd5 Author: Shanker Donthineni Date: Wed Mar 21 20:58:49 2018 -0500 irqchip/gic-v3: Ensure GICR_CTLR.EnableLPI=0 is observed before enabling Booting with GICR_CTLR.EnableLPI=1 is usually a bad idea, and may result in subtle memory corruption. Detecting this is thus pretty important. On detecting that LPIs are still enabled, we taint the kernel (because we're not sure of anything anymore), and try to disable LPIs. This can fail, as implementations are allowed to implement GICR_CTLR.EnableLPI as a one-way enable, meaning the redistributors cannot be reprogrammed with new tables. Should this happen, we fail probing the redistributor and warn the user that things are pretty dire. Signed-off-by: Shanker Donthineni [maz: reworded changelog, minor comment and message changes] Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 74 ++++++++++++++++++++++++++++++-------- include/linux/irqchip/arm-gic-v3.h | 1 + 2 files changed, 61 insertions(+), 14 deletions(-) commit 2be8ffed093b91536d52b5cd2c99b52f605c9ba6 Author: James Bottomley Date: Thu Mar 22 17:32:20 2018 +0200 tpm: fix intermittent failure with self tests My Nuvoton 6xx in a Dell XPS-13 has been intermittently failing to work (necessitating a reboot). The problem seems to be that the TPM gets into a state where the partial self-test doesn't return TPM_RC_SUCCESS (meaning all tests have run to completion), but instead returns TPM_RC_TESTING (meaning some tests are still running in the background). There are various theories that resending the self-test command actually causes the tests to restart and thus triggers more TPM_RC_TESTING returns until the timeout is exceeded. There are several issues here: firstly being we shouldn't slow down the boot sequence waiting for the self test to complete once the TPM backgrounds them. It will actually make available all functions that have passed and if it gets a failure return TPM_RC_FAILURE to every subsequent command. So the fix is to kick off self tests once and if they return TPM_RC_TESTING log that as a backgrounded self test and continue on. In order to prevent other tpm users from seeing any TPM_RC_TESTING returns (which it might if they send a command that needs a TPM subsystem which is still under test), we loop in tpm_transmit_cmd until either a timeout or we don't get a TPM_RC_TESTING return. Finally, there have been observations of strange returns from a partial test. One Nuvoton is occasionally returning TPM_RC_COMMAND_CODE, so treat any unexpected return from a partial self test as an indication we need to run a full self test. [jarkko.sakkinen@linux.intel.com: cleaned up some klog messages and dropped tpm_transmit_check() helper function from James' original commit.] Fixes: 2482b1bba5122 ("tpm: Trigger only missing TPM 2.0 self tests") Cc: stable@vger.kernel.org Signed-off-by: James Bottomley Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 16 ++++++++++-- drivers/char/tpm/tpm.h | 1 + drivers/char/tpm/tpm2-cmd.c | 54 ++++++++++++---------------------------- 3 files changed, 31 insertions(+), 40 deletions(-) commit e2fb992d82c626c43ed0566e07c410e56a087af3 Author: James Bottomley Date: Wed Mar 21 11:43:48 2018 -0700 tpm: add retry logic TPM2 can return TPM2_RC_RETRY to any command and when it does we get unexpected failures inside the kernel that surprise users (this is mostly observed in the trusted key handling code). The UEFI 2.6 spec has advice on how to handle this: The firmware SHALL not return TPM2_RC_RETRY prior to the completion of the call to ExitBootServices(). Implementer’s Note: the implementation of this function should check the return value in the TPM response and, if it is TPM2_RC_RETRY, resend the command. The implementation may abort if a sufficient number of retries has been done. So we follow that advice in our tpm_transmit() code using TPM2_DURATION_SHORT as the initial wait duration and TPM2_DURATION_LONG as the maximum wait time. This should fix all the in-kernel use cases and also means that user space TSS implementations don't have to have their own retry handling. Signed-off-by: James Bottomley Cc: stable@vger.kernel.org Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 75 ++++++++++++++++++++++++++++++++-------- drivers/char/tpm/tpm.h | 1 + 2 files changed, 61 insertions(+), 15 deletions(-) commit 0803d7befa15cab5717d667a97a66214d2a4c083 Author: Chris Chiu Date: Tue Mar 20 15:36:40 2018 +0800 tpm: self test failure should not cause suspend to fail The Acer Acer Veriton X4110G has a TPM device detected as: tpm_tis 00:0b: 1.2 TPM (device-id 0xFE, rev-id 71) After the first S3 suspend, the following error appears during resume: tpm tpm0: A TPM error(38) occurred continue selftest Any following S3 suspend attempts will now fail with this error: tpm tpm0: Error (38) sending savestate before suspend PM: Device 00:0b failed to suspend: error 38 Error 38 is TPM_ERR_INVALID_POSTINIT which means the TPM is not in the correct state. This indicates that the platform BIOS is not sending the usual TPM_Startup command during S3 resume. >From this point onwards, all TPM commands will fail. The same issue was previously reported on Foxconn 6150BK8MC and Sony Vaio TX3. The platform behaviour seems broken here, but we should not break suspend/resume because of this. When the unexpected TPM state is encountered, set a flag to skip the affected TPM_SaveState command on later suspends. Cc: stable@vger.kernel.org Signed-off-by: Chris Chiu Signed-off-by: Daniel Drake Link: http://lkml.kernel.org/r/CAB4CAwfSCvj1cudi+MWaB5g2Z67d9DwY1o475YOZD64ma23UiQ@mail.gmail.com Link: https://lkml.org/lkml/2011/3/28/192 Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591031 Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 4 ++++ 1 file changed, 4 insertions(+) commit 076d356460273e3c702f46fc87471b508fb55e7b Author: Tomas Winkler Date: Sat Mar 10 17:15:45 2018 +0200 tpm2: add longer timeouts for creation commands. TPM2_CC_Create(0x153) and TPM2_CC_CreatePrimary (0x131) involve generation of crypto keys which can be a computationally intensive task. The timeout is set to 3min. Rather than increasing default timeout a new constant is added, to not stall for too long on regular commands failures. Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 3 +++ drivers/char/tpm/tpm.h | 28 ++++++++++++++++++---------- drivers/char/tpm/tpm2-cmd.c | 8 +++++--- 3 files changed, 26 insertions(+), 13 deletions(-) commit 09b17f321c15879833bbe072cf28e3f0625d3fb7 Author: Tomas Winkler Date: Tue Mar 6 11:34:15 2018 +0200 tpm_crb: use __le64 annotated variable for response buffer address use __le64 annotated variable for response buffer address as this is read in little endian format form the register. This suppresses sparse warning drivers/char/tpm/tpm_crb.c:558:18: warning: cast to restricted __le64 Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 62c09e12bbf887d01397323888d5fe89a215a7e2 Author: Winkler, Tomas Date: Mon Mar 5 14:48:26 2018 +0200 tpm: fix buffer type in tpm_transmit_cmd 1. The buffer cannot be const as it is used both for send and receive. 2. Drop useless casting to u8 *, as this is already a type of 'buf' parameter, it has just masked the 'const' issue. Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 8 ++++---- drivers/char/tpm/tpm.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 65520d46a4adbf7f23bbb6d9b1773513f7bc7821 Author: Winkler, Tomas Date: Mon Mar 5 14:48:25 2018 +0200 tpm: tpm-interface: fix tpm_transmit/_cmd kdoc Fix tmp_ -> tpm_ typo and add reference to 'space' parameter in kdoc for tpm_transmit and tpm_transmit_cmd functions. Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 888d867df4417deffc33927e6fc2c6925736fe92 Author: Tomas Winkler Date: Mon Mar 5 13:34:49 2018 +0200 tpm: cmd_ready command can be issued only after granting locality The correct sequence is to first request locality and only after that perform cmd_ready handshake, otherwise the hardware will drop the subsequent message as from the device point of view the cmd_ready handshake wasn't performed. Symmetrically locality has to be relinquished only after going idle handshake has completed, this requires that go_idle has to poll for the completion and as well locality relinquish has to poll for completion so it is not overridden in back to back commands flow. Two wrapper functions are added (request_locality relinquish_locality) to simplify the error handling. The issue is only visible on devices that support multiple localities. Fixes: 877c57d0d0ca ("tpm_crb: request and relinquish locality 0") Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 54 +++++++++++++++----- drivers/char/tpm/tpm_crb.c | 108 +++++++++++++++++++++++++++------------ drivers/char/tpm/tpm_tis_core.c | 4 +- include/linux/tpm.h | 2 +- 4 files changed, 120 insertions(+), 48 deletions(-) commit 9dc486fdf6cc0d7f635954810ab119c5db2cbb60 Author: Lin Huang Date: Tue Mar 20 10:06:28 2018 +0800 clk: rockchip: assign correct id for pclk_ddr and hclk_sd in rk3399 Since hclk_sd and pclk_ddr source clock from CPLL or GPLL, and these two PLL may change their frequency. If we do not assign right id to pclk_ddr and hclk_sd, they will alway use default cur register value, and may get the frequency exceed their signed off frequency. So assign correct Id for them, then we can assign frequency for them in dts. Signed-off-by: Lin Huang Reviewed-by: Douglas Anderson Reviewed-by: Shawn Lin Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3399.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d92d1802ced45dab0cbb1d130ace7410bcaec99 Author: Shawn Lin Date: Wed Mar 21 10:39:20 2018 +0800 clk: rockchip: Fix error return in phase clock registration The newly added clock notifier may return an error code but so far the error output in the function would only return an error pointer from registering the clock. So when the clock notifier fails the clock would be unregistered but the return would still be the clock pointer which could then not be dereferenced correctly. So fix the error handling to prevent that. Fixes: 60cf09e45fbc ("clk: rockchip: Restore the clock phase after the rate was changed") Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-mmc-phase.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 570fda972b3178f9a981d1b7ac18e05245a52eab Author: Shawn Lin Date: Wed Mar 21 10:39:20 2018 +0800 clk: rockchip: Correct the behaviour of restoring cached phase We can't restore every phase, for instance the invalid phase and the phase for coming rate which is out of the scope of boards' ability. And this patch also corrects the error path to return invalid pointer to clk if clk_notifier_register failed introduced by the same offending commit. Fixes: 60cf09e45fbc ("clk: rockchip: Restore the clock phase after the rate was changed") Reported-by: wlq Signed-off-by: Shawn Lin Tested-by: wlq Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-mmc-phase.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit ce84eca927af24ca27897ba5fee4fbeed443d5fc Author: Shawn Lin Date: Wed Mar 21 10:39:18 2018 +0800 clk: rockchip: Fix wrong parents for MMC phase clock for rk3328 commit c420c1e4db22 ("clk: rockchip: Prevent calculating mmc phase if clock rate is zero") catches some gremlins for clk-rk3328.c that the parents of MMC phase clock should be clk_{sdmmc, sdio, emmc}, but not sclk_{sdmmc, sdio, emmc}. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3328.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit aaeab02ddcc830e31c33cdb72a3c117b2d499ae2 Author: Benjamin Herrenschmidt Date: Fri Mar 23 13:44:06 2018 +1100 usb/gadget: Add an EP dispose() callback for EP lifetime tracking Some UDC may want to allocate endpoints dynamically, either because the HW supports an arbitrary large number or because (like the Aspeed BMC SoCs), the pool of HW endpoints is shared between multiple gadgets. The allocation side can be done rather easily using the existing match_ep() UDC hook. However we have no good place to "free" them. This implements a "simple" variant of this, which calls an EP dispose callback on all EPs associated with a gadget when the composite device gets unbound. This is required by my upcoming Aspeed vHub driver. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 16 ++++++++++++++++ include/linux/usb/gadget.h | 1 + 2 files changed, 17 insertions(+) commit 4b0556a441dd37e598887215bc89b49a6ef525b3 Author: Shawn Lin Date: Wed Mar 21 10:39:19 2018 +0800 clk: rockchip: Fix wrong parent for SDMMC phase clock for rk3228 commit c420c1e4db22 ("clk: rockchip: Prevent calculating mmc phase if clock rate is zero") catches one gremlin again for clk-rk3228.c that the parent of SDMMC phase clock should be sclk_sdmmc0, but not sclk_sdmmc. However, the naming of the sdmmc clocks varies in the manual with the card clock having the 0 while the hclk is named without appended 0. So standardize one one format to prevent confusion, as there also is only one (non-sdio) mmc controller on the soc. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3228.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4784e710b1653bee64e5f85d7dba70e8e62f8473 Author: Jonathan Neuschäfer Date: Fri Mar 9 00:40:24 2018 +0100 Documentation: gpio: Move drivers-on-gpio.txt to driver-api Move gpio/drivers-on-gpio.txt to driver-api/gpio/drivers-on-gpio.rst and make sure it builds cleanly as ReST. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Linus Walleij Documentation/driver-api/gpio/drivers-on-gpio.rst | 97 +++++++++++++++++++++++ Documentation/driver-api/gpio/index.rst | 1 + Documentation/gpio/00-INDEX | 3 - Documentation/gpio/drivers-on-gpio.txt | 96 ---------------------- Documentation/gpio/sysfs.txt | 5 +- 5 files changed, 100 insertions(+), 102 deletions(-) commit 6960341aa33420a8aadf1d625b486933487e6592 Author: Jonathan Neuschäfer Date: Fri Mar 9 00:40:23 2018 +0100 Documentation: gpio: Move GPIO mapping documentation to driver-api Move gpio/board.txt to driver-api/gpio/board.rst and make sure it builds cleanly as ReST. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Linus Walleij Documentation/driver-api/gpio/board.rst | 179 ++++++++++++++++++++++++++++++++ Documentation/driver-api/gpio/index.rst | 1 + Documentation/gpio/00-INDEX | 2 - Documentation/gpio/board.txt | 176 ------------------------------- 4 files changed, 180 insertions(+), 178 deletions(-) commit 4e0edc4b3fe7ee2ecb07360146479dbbeb63cd5a Author: Jonathan Neuschäfer Date: Fri Mar 9 00:40:22 2018 +0100 Documentation: gpio: Move gpiod_* consumer documentation to driver-api Move gpio/consumer.txt to driver-api/gpio/consumer.rst and make sure it builds cleanly as ReST. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Linus Walleij Documentation/driver-api/gpio/consumer.rst | 439 +++++++++++++++++++++++++++++ Documentation/driver-api/gpio/index.rst | 1 + Documentation/gpio/00-INDEX | 2 - Documentation/gpio/consumer.txt | 438 ---------------------------- 4 files changed, 440 insertions(+), 440 deletions(-) commit 7ee2c13080c99e7ba01c45841e7fd61cdd37fc65 Author: Jonathan Neuschäfer Date: Fri Mar 9 00:40:21 2018 +0100 Documentation: gpio: Move legacy documentation to driver-api Move gpio/gpio-legacy.txt to driver-api/gpio/legacy.rst and make sure it builds cleanly as ReST. Also move the legacy API reference from index.rst to legacy.rst. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Linus Walleij Documentation/driver-api/gpio/index.rst | 10 +- Documentation/driver-api/gpio/legacy.rst | 770 +++++++++++++++++++++++++++++++ Documentation/gpio/00-INDEX | 2 - Documentation/gpio/gpio-legacy.txt | 758 ------------------------------ 4 files changed, 771 insertions(+), 769 deletions(-) commit 778ea833c59a750318ec83443aa103e09e6cd3de Author: Jonathan Neuschäfer Date: Fri Mar 9 00:40:20 2018 +0100 Documentation: gpio: Move driver documentation to driver-api Move gpio/driver.txt to driver-api/gpio/driver.rst and make sure it builds cleanly as ReST. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Linus Walleij Documentation/driver-api/gpio/driver.rst | 429 +++++++++++++++++++++++++++++++ Documentation/driver-api/gpio/index.rst | 1 + Documentation/gpio/00-INDEX | 2 - Documentation/gpio/driver.txt | 427 ------------------------------ 4 files changed, 430 insertions(+), 429 deletions(-) commit 02bf219d2f627dc962b43975433dcd6ce8f02c85 Author: Jonathan Neuschäfer Date: Fri Mar 9 00:40:19 2018 +0100 Documentation: gpio: Move introduction to driver-api Move gpio/intro.txt to driver-api/gpio/intro.rst and make sure it builds cleanly as ReST. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Linus Walleij Documentation/driver-api/gpio/index.rst | 7 ++ Documentation/driver-api/gpio/intro.rst | 124 ++++++++++++++++++++++++++++++++ Documentation/gpio/00-INDEX | 2 - Documentation/gpio/gpio.txt | 119 ------------------------------ 4 files changed, 131 insertions(+), 121 deletions(-) commit 7e6332592bbcdc446b4984efab78a6c471b14fa6 Author: Jonathan Neuschäfer Date: Fri Mar 9 00:40:18 2018 +0100 Documentation: driver-api: Move gpio.rst to gpio/index.rst To make space for more files in the GPIO section, create a Documentation/driver-api/gpio/ directory. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Linus Walleij Documentation/driver-api/gpio.rst | 45 --------------------------------- Documentation/driver-api/gpio/index.rst | 45 +++++++++++++++++++++++++++++++++ Documentation/driver-api/index.rst | 2 +- 3 files changed, 46 insertions(+), 46 deletions(-) commit 29f9eeaa058013e058f360c83154394a7c39e236 Author: Jonathan Neuschäfer Date: Fri Mar 9 00:40:17 2018 +0100 MAINTAINERS: GPIO: Add Documentation/driver-api/gpio/ Steer patches to Documentation/driver-api/gpio/ into the right direction. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Linus Walleij MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 864670d534001272c8b329127dc5202306192e2a Author: Bai Ping Date: Mon Mar 19 15:16:39 2018 +0800 pinctrl: imx: Add pinctrl driver support for imx6sll Add pinctrl driver support for imx6sll. Signed-off-by: Bai Ping Acked-by: Shawn Guo Acked-by: Dong Aisheng Signed-off-by: Linus Walleij drivers/pinctrl/freescale/Kconfig | 7 + drivers/pinctrl/freescale/Makefile | 1 + drivers/pinctrl/freescale/pinctrl-imx6sll.c | 360 ++++++++++++++++++++++++++++ 3 files changed, 368 insertions(+) commit 72fd9bc8f54fa54d56adc892385d6315cf7b3494 Author: Bai Ping Date: Mon Mar 19 15:16:38 2018 +0800 dt-bindings: imx: update pinctrl doc for imx6sll Add pinctrl binding doc update for imx6sll. Signed-off-by: Bai Ping Acked-by: Shawn Guo Acked-by: Dong Aisheng Signed-off-by: Linus Walleij .../bindings/pinctrl/fsl,imx6sll-pinctrl.txt | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 67e6d3e83c18188bdc1467663c49787f8d4fdc0d Author: Javier Arteaga Date: Tue Mar 6 13:42:13 2018 +0000 pinctrl: intel: Implement intel_gpio_get_direction callback Allows querying GPIO direction from the pad config register. If the pad is not in GPIO mode, return an error. Signed-off-by: Javier Arteaga Reviewed-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 86822c2f3a7c343cadcbebae1d5f7d75de1b3cfe Author: Masahiro Yamada Date: Tue Mar 6 20:15:56 2018 +0900 pinctrl: stm32: add 'depends on HAS_IOMEM' to fix unmet dependency These configs select MFD_SYSCON, but do not depend on HAS_IOMEM. Compile testing on architecture without HAS_IOMEM causes "unmet direct dependencies" in Kconfig phase. Detected by "make ARCH=score allyesconfig". Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/stm32/Kconfig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b2f78906d5371f940b60f79edba48757f4295bb3 Author: Gustavo A. R. Silva Date: Mon Mar 5 17:49:06 2018 -0600 pinctrl: mediatek: mtk-common: use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a34ea4b40fd519a8aaeb76ce8094f8dbb2235be9 Author: Andre Przywara Date: Sat Mar 3 12:25:54 2018 +0000 pinctrl: sunxi: always look for apb block The Allwinner pinctrl device tree binding suggests that a clock named "apb" would drive the pin controller IP. However (for legacy reasons) we rely on this clock actually being the first clock defined. Since named clocks can be in any order, let's explicitly check for a clock called "apb" if there is more than one clock referenced. Kudo to Maxime for suggesting this much more elegant approach. Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sunxi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b6d09f780761fe7b0ddb586c0241c9aeba5f0b1f Author: Linus Walleij Date: Thu Mar 22 11:12:54 2018 +0100 pinctrl: nomadik: Drop U8540/9540 support The U8540 was an evolved version of the U8500, but it was never mass produced or put into products, only reference designs exist. The upstream support was never completed and it is unlikely that this will happen so drop the support for now to simplify maintenance of the U8500. Cc: Loic Pallardy Signed-off-by: Linus Walleij drivers/pinctrl/nomadik/Kconfig | 12 - drivers/pinctrl/nomadik/Makefile | 3 - drivers/pinctrl/nomadik/pinctrl-ab8540.c | 408 ------- drivers/pinctrl/nomadik/pinctrl-ab9540.c | 486 --------- drivers/pinctrl/nomadik/pinctrl-abx500.c | 197 +--- drivers/pinctrl/nomadik/pinctrl-abx500.h | 44 +- drivers/pinctrl/nomadik/pinctrl-nomadik-db8540.c | 1243 ---------------------- 7 files changed, 17 insertions(+), 2376 deletions(-) commit 76a16885a7771addc1d140018dc951dc57b40fa9 Merge: 2ba08d7 a6fff41 Author: Linus Walleij Date: Fri Mar 23 03:36:48 2018 +0100 Merge tag 'sh-pfc-for-v4.17-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.17 (take two) - Add USB pin groups on R-Car M3-N, - Add support for the new R-Car V3H SoC, - Add EtherAVB pin groups on R-Car V3M, - Miscellaneous fixes and cleanups. commit 1a5c1349d105df5196ad9025e271b02a4dc05aee Author: Eric W. Biederman Date: Thu Mar 22 21:30:56 2018 -0500 sem: Move struct sem and struct sem_array into ipc/sem.c All of the users are now in ipc/sem.c so make the definitions local to that file to make code maintenance easier. AKA to prevent rebuilding the entire kernel when one of these files is changed. Signed-off-by: "Eric W. Biederman" include/linux/sem.h | 40 +--------------------------------------- ipc/sem.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 39 deletions(-) commit d8c6e8543294428426578d74dc7aaf121e762d58 Author: Eric W. Biederman Date: Thu Mar 22 21:22:26 2018 -0500 msg/security: Pass kern_ipc_perm not msg_queue into the msg_queue security hooks All of the implementations of security hooks that take msg_queue only access q_perm the struct kern_ipc_perm member. This means the dependencies of the msg_queue security hooks can be simplified by passing the kern_ipc_perm member of msg_queue. Making this change will allow struct msg_queue to become private to ipc/msg.c. Signed-off-by: "Eric W. Biederman" include/linux/lsm_hooks.h | 12 ++++++------ include/linux/security.h | 25 ++++++++++++------------- ipc/msg.c | 18 ++++++++---------- security/security.c | 12 ++++++------ security/selinux/hooks.c | 36 ++++++++++++++++++------------------ security/smack/smack_lsm.c | 24 ++++++++++++------------ 6 files changed, 62 insertions(+), 65 deletions(-) commit 7191adff2a5566efb139c79ea03eda3d0520d44a Author: Eric W. Biederman Date: Thu Mar 22 21:08:27 2018 -0500 shm/security: Pass kern_ipc_perm not shmid_kernel into the shm security hooks All of the implementations of security hooks that take shmid_kernel only access shm_perm the struct kern_ipc_perm member. This means the dependencies of the shm security hooks can be simplified by passing the kern_ipc_perm member of shmid_kernel.. Making this change will allow struct shmid_kernel to become private to ipc/shm.c. Signed-off-by: "Eric W. Biederman" include/linux/lsm_hooks.h | 10 +++++----- include/linux/security.h | 21 ++++++++++----------- ipc/shm.c | 17 +++++++---------- security/security.c | 10 +++++----- security/selinux/hooks.c | 28 ++++++++++++++-------------- security/smack/smack_lsm.c | 22 +++++++++++----------- 6 files changed, 52 insertions(+), 56 deletions(-) commit aefad9593ec5ad4aae5346253a8b646364cd7317 Author: Eric W. Biederman Date: Thu Mar 22 20:52:43 2018 -0500 sem/security: Pass kern_ipc_perm not sem_array into the sem security hooks All of the implementations of security hooks that take sem_array only access sem_perm the struct kern_ipc_perm member. This means the dependencies of the sem security hooks can be simplified by passing the kern_ipc_perm member of sem_array. Making this change will allow struct sem and struct sem_array to become private to ipc/sem.c. Signed-off-by: "Eric W. Biederman" include/linux/lsm_hooks.h | 10 +++++----- include/linux/security.h | 21 ++++++++++----------- ipc/sem.c | 19 ++++++++----------- security/security.c | 10 +++++----- security/selinux/hooks.c | 28 ++++++++++++++-------------- security/smack/smack_lsm.c | 22 +++++++++++----------- 6 files changed, 53 insertions(+), 57 deletions(-) commit 13b40935cf64f59b93cf1c716a2033488e5a228c Author: Alex Deucher Date: Wed Mar 21 21:05:46 2018 -0500 drm/amdgpu: Add an ATPX quirk for hybrid laptop _PR3 doesn't seem to work properly, use ATPX instead. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104064 Reviewed-by: Huang Rui Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 1 + 1 file changed, 1 insertion(+) commit 27c524d1743047258f9a6a2ad813f54d35c1f8e8 Author: Maciej W. Rozycki Date: Thu Mar 22 16:30:41 2018 +0000 MIPS: Use the entry point from the ELF file header In order to fetch the correct entry point with the ISA bit included, for use by non-ELF boot loaders, parse the output of `objdump -f' for the start address recorded in the kernel executable itself, rather than using `nm' to get the value of the `kernel_entry' symbol. Sign-extend the address retrieved if 32-bit, so that execution is correctly started on 64-bit processors as well. The tool always prints the entry point using either 8 or 16 hexadecimal digits, matching the address width (aka class) of the ELF file, even in the presence of leading zeros. Signed-off-by: Maciej W. Rozycki Cc: Ralf Baechle Cc: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18912/ Signed-off-by: James Hogan arch/mips/Makefile | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 5893ed18a26d1f56b97c0290b0cbbc2d49d6de28 Merge: 7bd698b c698ca5 Author: James Morris Date: Fri Mar 23 08:26:16 2018 +1100 Merge tag 'v4.16-rc6' into next-general Merge to Linux 4.16-rc6 at the request of Jarkko, for his TPM updates. commit c685af1108d7c303f0b901413405d68eaeac4477 Author: Gabriel Matni Date: Thu Mar 22 19:15:12 2018 +0000 serial: mvebu-uart: fix tx lost characters Fixes missing characters on kernel console at low baud rates (i.e.9600). The driver should poll TX_RDY or TX_FIFO_EMP instead of TX_EMP to ensure that the transmitter holding register (THR) is ready to receive a new byte. TX_EMP tells us when it is possible to send a break sequence via SND_BRK_SEQ. While this also indicates that both the THR and the TSR are empty, it does not guarantee that a new byte can be written just yet. Fixes: 30530791a7a0 ("serial: mvebu-uart: initial support for Armada-3700 serial port") Reviewed-by: Miquel Raynal Acked-by: Gregory CLEMENT Signed-off-by: Gabriel Matni Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4eec0fa537165efc3265cdbb4bac06e6bdaf596 Merge: 2a2553c 8c5cb3c Author: Dave Airlie Date: Fri Mar 23 06:19:27 2018 +1000 Merge tag 'drm-intel-next-fixes-2018-03-22' of git://anongit.freedesktop.org/drm/drm-intel into drm-next GVT regression fix that caused guest VM GPU hang. Fix for race conditions in declaring GPU wedged (hit in CI). * tag 'drm-intel-next-fixes-2018-03-22' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915/gvt: force to set all context control bits from guest drm/i915/gvt: Update PDPs after a vGPU mm object is pinned. drm/i915/gvt: Invalidate vGPU PPGTT mm objects during a vGPU reset. drm/i915/kvmgt: Handle kzalloc failure drm/i915/gvt: fix spelling mistake: "destoried" -> "destroyed" drm/i915/gvt: Remove reduntant printing of untracked mmio drm/i915/pmu: Work around compiler warnings on some kernel configs drm/i915: Only call tasklet_kill() on the first prepare_reset drm/i915: Wrap engine->schedule in RCU locks for set-wedge protection drm/i915/icl: do not save DDI A/E sharing bit for ICL commit 2a2553cc45c889f15a1df0355891a809f17ca43d Merge: f3924ae 43bfefe Author: Dave Airlie Date: Fri Mar 23 06:18:48 2018 +1000 Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next A relative large set of various improvements for vmwgfx. Some of them have been around for a while, some are relatively new, but functionality should have been tested in our standalone repo. * 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: Bump version patchlevel and date drm/vmwgfx: use monotonic event timestamps drm/vmwgfx: Unpin the screen object backup buffer when not used drm/vmwgfx: Stricter count of legacy surface device resources drm/vmwgfx: Use kasprintf drm/vmwgfx: Get rid of the device-private suspended member drm/vmwgfx: Improve on hibernation drm/vmwgfx: Avoid pinning fbdev framebuffers drm/vmwgfx: Fix multiple command buffer context use drm/vmwgfx: Use the cpu blit utility for framebuffer to screen target blits drm/vmwgfx: Add a cpu blit utility that can be used for page-backed bos drm/ttm: Export the ttm_k[un]map_atomic_prot API. drm/ttm: Clean up kmap_atomic_prot selection code drm/vmwgfx: Cursor update fixes drm/vmwgfx: Send the correct nonblock option for atomic_commit drm/vmwgfx: Move the stdu vblank event to atomic function drm/vmwgfx: Move screen object page flip to atomic function drm/vmwgfx: Remove drm_crtc_arm_vblank_event from atomic flush drm/vmwgfx: Move surface copy cmd to atomic function drm/vmwgfx: Avoid iterating over display unit if crtc is available commit f3924ae723d84746546bd74bdefc99c17da2a467 Merge: 0c5286a 4ed75c3 Author: Dave Airlie Date: Fri Mar 23 06:16:51 2018 +1000 Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next Changes this time mostly come down to: - hook up the DRM GPU scheduler - prep work for GC7000L support, to be completed in the next cycle * 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux: (22 commits) drm/etnaviv: bump HW job limit to 4 drm/etnaviv: etnaviv_sched: Staticize functions when possible drm/etnaviv: add PTA handling to MMUv2 drm/etnaviv: add function to load the initial PTA state drm/etnaviv: handle security states drm/etnaviv: add security handling mode enum drm/etnaviv: add hardware database drm/etnaviv: add more minor features fields drm/etnaviv: update hardware headers from rnndb drm/etnaviv: add support for slave interface clock drm/etnaviv: split out and optimize MMU fault dumping drm/etnaviv: remove the need for a gpu-subsystem DT node dt-bindings: etnaviv: add slave interface clock drm/etnaviv: use correct format specifier for size_t drm/etnaviv: replace hangcheck with scheduler timeout drm/etnaviv: lock BOs after all other submit work is done drm/etnaviv: move dependency handling to scheduler drm/etnaviv: hook up DRM GPU scheduler drm/etnaviv: track fences by IDR instead of seqno drm/etnaviv: add missing major features field to debugfs ... commit 36b3f84a05d5f186316c316fd6923a4cd6fcd1f7 Author: Colin Ian King Date: Thu Mar 22 15:41:44 2018 +0000 drm/amdgpu: fix spelling mistake: "asssert" -> "assert" Trivial fix to spelling mistake in pr_err error message text Acked-by: Christian König Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ebde09b16919b8cd6aa0af186d300faf5a145fc Author: Rex Zhu Date: Wed Mar 21 18:36:50 2018 +0800 drm/amd/pp: Add new asic support in pp_psm.c In new asics(vega12), no power state management in driver, So no need to implement related callback functions. and add some ps checks in pp_psm.c Revert "drm/amd/powerplay: add new pp_psm infrastructure for vega12 (v2)" This reverts commit 7d1a63f3aa331b853e41f92d0e7890ed31de8c13. Acked-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 4 +- drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 270 ++++++++++++++++++--- .../gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.c | 262 -------------------- .../gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.h | 40 --- drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.c | 76 ------ drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.h | 40 --- 6 files changed, 239 insertions(+), 453 deletions(-) commit bbfcc8af37577c7f8950a1442c398da64de5e5b7 Author: Rex Zhu Date: Wed Mar 21 17:25:07 2018 +0800 drm/amd/pp: Clean up powerplay code on Vega12 Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 482 +-------------------- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.h | 32 -- 2 files changed, 1 insertion(+), 513 deletions(-) commit 031ec948a8dd12c4848b045fe8a64db22b91684c Author: Rex Zhu Date: Wed Mar 21 16:19:21 2018 +0800 drm/amd/pp: Add smu irq handlers for legacy asics Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 3c79684396ec2ac951e16a6d8ae55f4cdcabc7e8 Author: Rex Zhu Date: Wed Mar 21 15:48:36 2018 +0800 drm/amd/pp: Fix set wrong temperature range on smu7 Fix the issue thermal irq was always triggered as GPU under temperature range detected The low temp in default thermal policy was set to -273. so need to use int type for the low temp. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc15dfaa85e8dfc763f22caca54fa097e377ea27 Author: Chunming Zhou Date: Fri Mar 16 12:29:38 2018 +0800 drm/amdgpu: Don't change preferred domian when fallback GTT v5 v2: add sanity checking v3: make code open v4: also handle visible to invisible fallback v5: Since two fallback cases, re-use goto retry Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 16 ++-------------- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 17 deletions(-) commit 6686c459e1449a3ee5f3fd313b0a559ace7a700e Merge: 1a2e10a 2bfbd35 Author: David S. Miller Date: Thu Mar 22 15:29:05 2018 -0400 Merge branch 'hns3-VF-reset' Salil Mehta says: ==================== Add support of VF Reset to HNS3 VF driver This patch-set adds the support of VF reset to the existing VF driver. VF Reset can be triggered due to TX watchdog firing as a result of TX data-path not working. VF reset could also be a result of some internal configuration changes if that requires reset, or as a result of the PF/Core/Global/IMP(Integrated Management Processor) reset happened in the PF. Summary of Patches: * Watchdog timer trigger chnages are present in Patch 1. * Reset Service Task and related Event handling is present in Patches {2,3} * Changes to send reset request to PF, reset stack and re-initialization of the hclge device is present in Patches {4,5,6} * Changes related to ARQ (Asynchronous Receive Queue) and its event handling are present in Patches {7,8} * Changes required in PF to handle the VF Reset request and actually perform hardware VF reset is there in Patch 9. NOTE: This patch depends upon "[PATCH net-next 00/11] fix some bugs for HNS3 driver" Link: https://lkml.org/lkml/2018/3/21/72 ==================== Signed-off-by: David S. Miller commit 2bfbd35d8ecd97a4a7f1db1754908b54542fa7aa Author: Salil Mehta Date: Thu Mar 22 14:29:00 2018 +0000 net: hns3: Changes required in PF mailbox to support VF reset PF needs to assert the VF reset when it receives the request to reset from VF. After receiving request PF ackknowledges the request by replying back MBX_ASSERTING_RESET message to VF. VF then goes to pending state and wait for hardware to complete the reset. This patch contains code to handle the received VF message, inform the VF of assertion and reset the VF using cmdq interface. Signed-off-by: Salil Mehta Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 1 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 42 ++++++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) commit a15fa7d43b0b625f018c4f0c5856f9061a6d4c82 Author: Salil Mehta Date: Thu Mar 22 14:28:59 2018 +0000 net: hns3: Add *Asserting Reset* mailbox message & handling in VF Reset Asserting message is forwarded by PF to inform VF about the hardware reset which is about to happen. This might be due to the earlier VF reset request received by the PF or because PF for any reason decides to undergo reset. This message results in VF to go in pending state in which it polls the hardware to complete the reset and then further resets/tears its own stack. Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h | 1 + drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit 07a0556a3a735f57060c274c55e895682e4055e6 Author: Salil Mehta Date: Thu Mar 22 14:28:58 2018 +0000 net: hns3: Changes to support ARQ(Asynchronous Receive Queue) Current mailbox CRQ could consists of both synchronous and async responses from the PF. Synchronous responses are time critical and should be handed over to the waiting tasks/context as quickly as possible otherwise timeout occurs. Above problem gets accentuated if CRQ consists of even single async message. Hence, it is important to have quick handling of synchronous messages and maybe deferred handling of async messages This patch introduces separate ARQ(async receive queues) for the async messages. These messages are processed later with repsect to mailbox task while synchronous messages still gets processed in context to mailbox interrupt. ARQ is important as VF reset introduces some new async messages like MBX_ASSERTING_RESET which adds up to the presssure on the responses for synchronousmessages and they timeout even more quickly. Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h | 15 ++++ .../ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c | 6 ++ .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 16 +++-- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 5 ++ .../ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 83 +++++++++++++++++++--- 5 files changed, 111 insertions(+), 14 deletions(-) commit 7a01c89723301c343f75862098e4fa0885b75b3b Author: Salil Mehta Date: Thu Mar 22 14:28:57 2018 +0000 net: hns3: Add support to re-initialize the hclge device After the hardware reset we should re-fetch the configuration from PF like queue info and tc info. This might have impact on allocations made like that of TQPs. Hence, we should release all such allocations and re-allocate fresh according to new fetched configuration after reset. Signed-off-by: Salil Mehta Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 106 ++++++++++++++++++--- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 14 +++ 2 files changed, 106 insertions(+), 14 deletions(-) commit 6988eb2a9b7772d57b1d09bdf769db4c697869ea Author: Salil Mehta Date: Thu Mar 22 14:28:56 2018 +0000 net: hns3: Add support to reset the enet/ring mgmt layer After VF driver knows that hardware reset has been performed successfully, it should proceed ahead and reset the enet layer. This primarily consists of bringing down interface, clearing TX/RX rings, disassociating vectors from ring etc. Signed-off-by: Salil Mehta Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 103 ++++++++++++++++++++- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 3 + 2 files changed, 102 insertions(+), 4 deletions(-) commit a8dedb65926005e99ab23716b1c77586de83c4f4 Author: Salil Mehta Date: Thu Mar 22 14:28:55 2018 +0000 net: hns3: Add support to request VF Reset to PF VF driver depends upon PF to eventually reset the hardware. This request is made using the mailbox command. This patch adds the required function to acheive above. Signed-off-by: Salil Mehta Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 436667d2e1793995267915d2562f7b14f26c1f63 Author: Salil Mehta Date: Thu Mar 22 14:28:54 2018 +0000 net: hns3: Add VF Reset device state and its handling This introduces the hclge device reset states of "requested" and "pending" and also its handling in context to Reset Service Task. Device gets into requested state because of any VF reset request asserted from upper layers, for example due to watchdog timeout expiration. Requested state would result in eventually forwarding the VF reset request to PF which would actually reset the VF. Device will get into pending state if: 1. VF receives the acknowledgement from PF for the VF reset request it originally sent to PF. 2. Reset Service Task detects that after asserting VF reset for certain times the data-path is not working and device then decides to assert full VF reset(this means also resetting the PCIe interface). 3. PF intimates the VF that it has undergone reset. Pending state would result in VF to poll for hardware reset completion status and then resetting the stack/enet layer, which in turn means reinitializing the ring management/enet layer. Note: we would be adding support of 3. later as a separate patch. This decision should not affect VF reset as its event handling is generic in nature. Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 + .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 67 ++++++++++++++++++++-- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 5 ++ 3 files changed, 68 insertions(+), 5 deletions(-) commit 35a1e50343bdae07bffe911e2d9f7e825fafe4f1 Author: Salil Mehta Date: Thu Mar 22 14:28:53 2018 +0000 net: hns3: Add VF Reset Service Task to support event handling VF reset would involve handling of different reset related events from the stack, physical function, mailbox etc. Reset service task would be used in servicing such reset event requests and later handling the hardware completions waits and initiating the stack resets. Signed-off-by: Salil Mehta Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 31 ++++++++++++++++++++++ .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 4 +++ 2 files changed, 35 insertions(+) commit 6d4c3981a8d815466de081138f2e31e9d044c669 Author: Salil Mehta Date: Thu Mar 22 14:28:52 2018 +0000 net: hns3: Changes to make enet watchdog timeout func common for PF/VF HNS3 drivers enet layer, used for the ring management and stack interaction, is common to both VF and PF. PF already supports reset functionality to handle the network stack watchdog timeout trigger but the existing code is not generic enough to be used to support VF reset as well. This patch does following: 1. Makes the existing watchdog timeout handler in enet layer generic i.e. suitable for both VF and PF and 2. Introduces the new reset event handler for the VF code. 3. Changes existing reset event handler of PF code to initialize the reset level Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 7 +++-- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 30 +++++------------- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 2 -- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 36 ++++++++++++---------- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 14 +++++++++ 5 files changed, 46 insertions(+), 43 deletions(-) commit 356e88ebe4473a3663cf3d14727ce293a4526d34 Author: Jason Cai (Xiang Feng) Date: Thu Mar 22 12:52:16 2018 +0800 vfio/type1: Improve memory pinning process for raw PFN mapping When using vfio to pass through a PCIe device (e.g. a GPU card) that has a huge BAR (e.g. 16GB), a lot of cycles are wasted on memory pinning because PFNs of PCI BAR are not backed by struct page, and the corresponding VMA has flag VM_PFNMAP. With this change, when pinning a region which is a raw PFN mapping, it can skip unnecessary user memory pinning process, and thus, can significantly improve VM's boot up time when passing through devices via VFIO. In my test on a Xeon E5 2.6GHz, the time mapping a 16GB BAR was reduced from about 0.4s to 1.5us. Signed-off-by: Jason Cai (Xiang Feng) Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_type1.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit c9f89c3f87cfc026d88c08054710902dd52a7772 Author: Shunyong Yang Date: Wed Mar 21 12:46:23 2018 -0600 vfio-mdev/samples: change RDI interrupt condition When FIFO mode is enabled, the receive data available interrupt (UART_IIR_RDI in code) should be triggered when the number of data in FIFO is equal or larger than interrupt trigger level. This patch changes the trigger level check to ensure multiple bytes received from upper layer can trigger RDI interrupt correctly. Cc: Joey Zheng Signed-off-by: Shunyong Yang Reviewed by: Kirti Wankhede Signed-off-by: Alex Williamson samples/vfio-mdev/mtty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a2e10a24039147047cc21759ec57314c333c1ac Merge: f2d254f d9ff304 Author: David S. Miller Date: Thu Mar 22 15:12:57 2018 -0400 Merge branch 'Rework-ip_ra_chain-protection' Kirill Tkhai says: ==================== Rework ip_ra_chain protection Commit 1215e51edad1 "ipv4: fix a deadlock in ip_ra_control" made rtnl_lock() be used in raw_close(). This function is called on every RAW socket destruction, so that rtnl_mutex is taken every time. This scales very sadly. I observe cleanup_net() spending a lot of time in rtnl_lock() and raw_close() is one of the biggest rtnl user (since we have percpu net->ipv4.icmp_sk). This patchset reworks the locking: reverts the problem commit and its descendant, and introduces rtnl-independent locking. This may have a continuation, and someone may work on killing rtnl_lock() in mrtsock_destruct() in the future. v3: Change patches order: [2/5] and [3/5]. v2: Fix sparse warning [4/5], as reported by kbuild test robot. ==================== Signed-off-by: David S. Miller commit d9ff3049739e349b5380b96226f9ad766741773d Author: Kirill Tkhai Date: Thu Mar 22 12:45:40 2018 +0300 net: Replace ip_ra_lock with per-net mutex Since ra_chain is per-net, we may use per-net mutexes to protect them in ip_ra_control(). This improves scalability. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + net/core/net_namespace.c | 1 + net/ipv4/ip_sockglue.c | 15 ++++++--------- 3 files changed, 8 insertions(+), 9 deletions(-) commit 5796ef75ec7b6019eac88f66751d663d537a5cd3 Author: Kirill Tkhai Date: Thu Mar 22 12:45:32 2018 +0300 net: Make ip_ra_chain per struct net This is optimization, which makes ip_call_ra_chain() iterate less sockets to find the sockets it's looking for. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller include/net/ip.h | 13 +++++++++++-- include/net/netns/ipv4.h | 1 + net/ipv4/ip_input.c | 5 ++--- net/ipv4/ip_sockglue.c | 15 ++------------- 4 files changed, 16 insertions(+), 18 deletions(-) commit 128aaa98ad1422eacc4c74879840cb3e579cd934 Author: Kirill Tkhai Date: Thu Mar 22 12:45:22 2018 +0300 net: Revert "ipv4: fix a deadlock in ip_ra_control" This reverts commit 1215e51edad1. Since raw_close() is used on every RAW socket destruction, the changes made by 1215e51edad1 scale sadly. This clearly seen on endless unshare(CLONE_NEWNET) test, and cleanup_net() kwork spends a lot of time waiting for rtnl_lock() introduced by this commit. Previous patch moved IP_ROUTER_ALERT out of rtnl_lock(), so we revert this patch. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv4/ip_sockglue.c | 1 - net/ipv4/ipmr.c | 11 +++++++++-- net/ipv4/raw.c | 2 -- 3 files changed, 9 insertions(+), 5 deletions(-) commit 0526947f9dd019da8d550ed20177585a84b3460e Author: Kirill Tkhai Date: Thu Mar 22 12:45:12 2018 +0300 net: Move IP_ROUTER_ALERT out of lock_sock(sk) ip_ra_control() does not need sk_lock. Who are the another users of ip_ra_chain? ip_mroute_setsockopt() doesn't take sk_lock, while parallel IP_ROUTER_ALERT syscalls are synchronized by ip_ra_lock. So, we may move this command out of sk_lock. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv4/ip_sockglue.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 76d3e153d0d16032ab68e3b698c4df05acef48c5 Author: Kirill Tkhai Date: Thu Mar 22 12:45:02 2018 +0300 net: Revert "ipv4: get rid of ip_ra_lock" This reverts commit ba3f571d5dde. The commit was made after 1215e51edad1 "ipv4: fix a deadlock in ip_ra_control", and killed ip_ra_lock, which became useless after rtnl_lock() made used to destroy every raw ipv4 socket. This scales very bad, and next patch in series reverts 1215e51edad1. ip_ra_lock will be used again. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv4/ip_sockglue.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit f2d254fac13cc7c86871ea607c4ab1afa7f13e2e Author: Intiyaz Basha Date: Wed Mar 21 23:30:54 2018 -0700 liquidio: Added support for trusted VF When a VF is trusted, all promiscuous traffic will only be sent to that VF. In normal operation promiscuous traffic is sent to the PF. There can be only one trusted VF per PF Signed-off-by: Intiyaz Basha Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 116 +++++++++++++++++++++ .../net/ethernet/cavium/liquidio/liquidio_common.h | 7 ++ .../net/ethernet/cavium/liquidio/octeon_device.h | 2 + 3 files changed, 125 insertions(+) commit cf57d49c48034cb3d7eb03e813f079ceb16f1e72 Merge: 1574639 be81a85 Author: David S. Miller Date: Thu Mar 22 15:00:45 2018 -0400 Merge branch 'rmnet-next' Subash Abhinov Kasiviswanathan says: ==================== net: qualcomm: rmnet: Updates 2018-03-12 This series contains some minor updates for rmnet driver. Patch 1 contains fixes for sparse warnings. Patch 2 updates the copyright date to 2018. Patch 3 is a cleanup in receive path. Patch 4 has the new rmnet netlink attributes in uapi and updates the usage. Patch 5 has the implementation of the fill_info operation. v1->v2: Remove the force casts since the data type is changed to __be types as mentioned by David. v2->v3: Update copyright in files which actually had changes as mentioned by Joe. v3->v4: Add new netlink attributes for mux_id and flags instead of using the the vlan attributes as mentioned by David. The rmnet specific flags are also moved to uapi. The netlink updates are done as part of #4 and #5 has the fill_info operation. ==================== Signed-off-by: David S. Miller commit be81a85f5f87d3c7ae994b646d00b1d828e754a1 Author: Subash Abhinov Kasiviswanathan Date: Wed Mar 21 19:48:15 2018 -0600 net: qualcomm: rmnet: Implement fill_info This is needed to query the mux_id and flags of a rmnet device. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 14452ca3b5ce304fb2fea96dbc9ca1e4e7978551 Author: Subash Abhinov Kasiviswanathan Date: Wed Mar 21 19:48:14 2018 -0600 net: qualcomm: rmnet: Export mux_id and flags to netlink Define new netlink attributes for rmnet mux_id and flags. These flags / mux_id were earlier using vlan flags / id respectively. The flag bits are also moved to uapi and are renamed with prefix RMNET_FLAG_*. Also add the rmnet policy to handle the new netlink attributes. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 41 +++++++++++++--------- .../net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 10 +++--- .../ethernet/qualcomm/rmnet/rmnet_map_command.c | 2 +- .../net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 2 +- .../net/ethernet/qualcomm/rmnet/rmnet_private.h | 6 ---- include/uapi/linux/if_link.h | 21 +++++++++++ 6 files changed, 53 insertions(+), 29 deletions(-) commit 378e25357ac78ad02fbc98bec9b4e3baaa916c5c Author: Subash Abhinov Kasiviswanathan Date: Wed Mar 21 19:48:13 2018 -0600 net: qualcomm: rmnet: Remove unnecessary device assignment Device of the de-aggregated skb is correctly assigned after inspecting the mux_id, so remove the assignment in rmnet_map_deaggregate(). Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 1 - 1 file changed, 1 deletion(-) commit 9dcaec042600dce169ae74527e5eead349f8eb90 Author: Subash Abhinov Kasiviswanathan Date: Wed Mar 21 19:48:12 2018 -0600 net: qualcomm: rmnet: Update copyright year to 2018 Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 2 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 2 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 2 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h | 2 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c | 2 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 2 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_private.h | 2 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit 6e010dd9b16b1a320bbf8312359ac294d7e1d9a8 Author: Subash Abhinov Kasiviswanathan Date: Wed Mar 21 19:48:11 2018 -0600 net: qualcomm: rmnet: Fix casting issues Fix warnings which were reported when running with sparse (make C=1 CF=-D__CHECK_ENDIAN__) drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c:81:15: warning: cast to restricted __be16 drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:271:37: warning: incorrect type in assignment (different base types) expected unsigned short [unsigned] [usertype] pkt_len got restricted __be16 [usertype] drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:287:29: warning: incorrect type in assignment (different base types) expected unsigned short [unsigned] [usertype] pkt_len got restricted __be16 [usertype] drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:310:22: warning: cast to restricted __be16 drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:319:13: warning: cast to restricted __be16 drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c:49:18: warning: cast to restricted __be16 drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c:50:18: warning: cast to restricted __be32 drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c:74:21: warning: cast to restricted __be16 Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1574639411b3ce311b846cae7fda56bf1af7d027 Author: Colin Ian King Date: Wed Mar 21 19:34:58 2018 +0000 gre: fix TUNNEL_SEQ bit check on sequence numbering The current logic of flags | TUNNEL_SEQ is always non-zero and hence sequence numbers are always incremented no matter the setting of the TUNNEL_SEQ bit. Fix this by using & instead of |. Detected by CoverityScan, CID#1466039 ("Operands don't affect result") Fixes: 77a5196a804e ("gre: add sequence number for collect md mode.") Signed-off-by: Colin Ian King Acked-by: William Tu Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 2 +- net/ipv6/ip6_gre.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit faf4db008163607e993279b7f7aa456cb4c11e9a Author: Tal Gilboa Date: Wed Mar 21 20:33:45 2018 +0200 Documentation/networking: Add net DIM documentation Net DIM is a generic algorithm, purposed for dynamically optimizing network devices interrupt moderation. This document describes how it works and how to use it. Signed-off-by: Tal Gilboa Reviewed-by: Randy Dunlap Signed-off-by: David S. Miller Documentation/networking/net_dim.txt | 174 +++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) commit e2e031640b3a9482b137b68193b7d59b8308185c Author: Colin Ian King Date: Wed Mar 21 17:31:15 2018 +0000 net: mvpp2: use correct index on array mvpp2_pools Array mvpp2_pools is being indexed by long_log_pool, however this looks like a cut-n-paste bug and in fact should be short_log_pool. Detected by CoverityScan, CID#1466113 ("Copy-paste error") Fixes: 576193f2d579 ("net: mvpp2: jumbo frames support") Signed-off-by: Colin Ian King Acked-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5b5a3b7879d5ed5fcbf51aba4e8eed1232077de Merge: 334e767 872619d Author: David S. Miller Date: Thu Mar 22 14:44:11 2018 -0400 Merge branch 'tipc-diag' GhantaKrishnamurthy MohanKrishna says: ==================== tipc: socket diagnostics additions for AF_TIPC The following patchsets add socket diagnostics support for AF_TIPC by using the sock diag framework. The patchset was created on top of commit id: fb66cb0. New iproute2 package is needed to use this functionality which will be sent for review in a seperate mail. The commit series improves diagnosis of tipc sockets by exporting the configuration, states and statistics of sockets. The series has been co-authored by Parthasarathy Bhuvaragan and consist of two parts: 1-2: Adaptations of existing code to support sock_diag framework. We modify existing functions to support socket diagnostics. Required information about the sockets are exported. 3: Step sk_drops during packet drop. This occurs if the packet cannot be queued due to queue length exceeding configured thresholds. The diag module is optional, and if enabled it will be loaded on demand when needed. ==================== Signed-off-by: David S. Miller commit 872619d8cf810c17279335ef531a2a34f3b4e589 Author: GhantaKrishnamurthy MohanKrishna Date: Wed Mar 21 14:37:45 2018 +0100 tipc: step sk->sk_drops when rcv buffer is full Currently when tipc is unable to queue a received message on a socket, the message is rejected back to the sender with error TIPC_ERR_OVERLOAD. However, the application on this socket has no knowledge about these discards. In this commit, we try to step the sk_drops counter when tipc is unable to queue a received message. Export sk_drops using tipc socket diagnostics. Acked-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: GhantaKrishnamurthy MohanKrishna Signed-off-by: Parthasarathy Bhuvaragan Signed-off-by: David S. Miller include/uapi/linux/tipc_netlink.h | 1 + net/tipc/socket.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit c30b70deb5f4861f590031c33fd3ec6cc63f1df1 Author: GhantaKrishnamurthy MohanKrishna Date: Wed Mar 21 14:37:44 2018 +0100 tipc: implement socket diagnostics for AF_TIPC This commit adds socket diagnostics capability for AF_TIPC in netlink family NETLINK_SOCK_DIAG in a new kernel module (diag.ko). The following are key design considerations: - config TIPC_DIAG has default y, like INET_DIAG. - only requests with flag NLM_F_DUMP is supported (dump all). - tipc_sock_diag_req message is introduced to send filter parameters. - the response attributes are of TLV, some nested. To avoid exposing data structures between diag and tipc modules and avoid code duplication, the following additions are required: - export tipc_nl_sk_walk function to reuse socket iterator. - export tipc_sk_fill_sock_diag to fill the tipc diag attributes. - create a sock_diag response message in __tipc_add_sock_diag defined in diag.c and use the above exported tipc_sk_fill_sock_diag to fill response. Acked-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: GhantaKrishnamurthy MohanKrishna Signed-off-by: Parthasarathy Bhuvaragan Signed-off-by: David S. Miller include/uapi/linux/tipc_netlink.h | 18 ++++++ include/uapi/linux/tipc_sockets_diag.h | 17 +++++ net/tipc/Kconfig | 8 +++ net/tipc/Makefile | 5 ++ net/tipc/diag.c | 114 +++++++++++++++++++++++++++++++++ net/tipc/socket.c | 72 +++++++++++++++++++-- net/tipc/socket.h | 10 ++- 7 files changed, 238 insertions(+), 6 deletions(-) commit dfde331e757fd792e1c9579b72a8370ca665e5ed Author: GhantaKrishnamurthy MohanKrishna Date: Wed Mar 21 14:37:43 2018 +0100 tipc: modify socket iterator for sock_diag The current socket iterator function tipc_nl_sk_dump, handles socket locks and calls __tipc_nl_add_sk for each socket. To reuse this logic in sock_diag implementation, we do minor modifications to make these functions generic as described below. In this commit, we add a two new functions __tipc_nl_sk_walk, __tipc_nl_add_sk_info and modify tipc_nl_sk_dump, __tipc_nl_add_sk accordingly. In __tipc_nl_sk_walk we: 1. acquire and release socket locks 2. for each socket, execute the specified callback function In __tipc_nl_add_sk we: - Move the netlink attribute insertion to __tipc_nl_add_sk_info. tipc_nl_sk_dump calls tipc_nl_sk_walk with __tipc_nl_add_sk as argument. sock_diag will use these generic functions in a later commit. There is no functional change in this commit. Acked-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: GhantaKrishnamurthy MohanKrishna Signed-off-by: Parthasarathy Bhuvaragan Signed-off-by: David S. Miller net/tipc/socket.c | 65 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 24 deletions(-) commit 98f1f4e0ed26c97a697f1e007416acbc18f4a8a9 Author: Parav Pandit Date: Wed Mar 21 17:16:36 2018 +0200 IB/core: Refer to RoCE port property instead of GID table property ib_query_gid() in commit [1] refers to RoCE GID table capability of the HCA using rdma_cap_roce_gid_table(). ib_core maintains the GID table cache regardless of the HCA provider drivers capability to maintain RoCE GID table. Therefore, whether to return a GID table entry from the software cache or from HCA should be done based on whether the port is RoCE or not. [1] commit 03db3a2d81e6 ("IB/core: Add RoCE GID table management") Reviewed-by: Mark Bloch Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03286030ac0420c759fa25f5b976e40293bccaaf Author: Leon Romanovsky Date: Wed Mar 21 17:12:42 2018 +0200 RDMA/restrack: Remove ambiguity in resource track clean logic The restrack clean routine had simple, but powerful WARN_ON check to see if all resources are cleared prior to releasing device. The WARN_ON check performed very well, but lack of information which device caused to resource leak, the object type and origin made debug to be fun and challenging at the same time. The fact that all dumps were the same because restrack_clean() is called in dealloc() didn't help either. So let's fix spelling error and convert WARN_ON to be more debug friendly. The dmesg cut below gives example of how the output will look output for the case fixed in patch [1] [ 438.421372] restrack: ------------[ cut here ]------------ [ 438.423448] restrack: BUG: RESTRACK detected leak of resources on mlx5_2 [ 438.425600] restrack: Kernel PD object allocated by mlx5_ib is not freed [ 438.427753] restrack: Kernel CQ object allocated by mlx5_ib is not freed [ 438.429660] restrack: ------------[ cut here ]------------ [1] https://patchwork.kernel.org/patch/10298695/ Cc: Michal Kalderon Cc: Chuck Lever Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/restrack.c | 45 +++++++++++++++++++++++++++++++++++++- include/rdma/restrack.h | 2 +- 2 files changed, 45 insertions(+), 2 deletions(-) commit e95955773d4357a0b09a43128352047afce8f35b Author: Yixian Liu Date: Wed Mar 21 14:11:18 2018 +0800 RDMA/hns: Fix cq record doorbell enable in kernel Upon detecting both kernel and user space support record doorbell, the kernel needs to enable this capability in hardware by db_en, and it should take place before cq context configuration in hns_roce_cq_alloc. Currently, db_en is configured after cq alloc and db_map_user has similar problem. Reported-by: Xiping Zhang Fixes: 9b44703d0a21 ("RDMA/hns: Support cq record doorbell for the user space") Signed-off-by: Yixian Liu Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_cq.c | 38 +++++++++++++++------------------ 1 file changed, 17 insertions(+), 21 deletions(-) commit 761fc376c999df9febaa491bffae2f6722f423ff Author: Jason Gunthorpe Date: Tue Mar 20 13:59:50 2018 -0600 RDMA/cxgb3: Use structs to describe the uABI instead of opencoding Open coding a loose value is not acceptable for describing the uABI in RDMA. Provide the missing struct. Acked-by: Steve Wise Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb3/iwch_provider.c | 4 +++- include/uapi/rdma/cxgb3-abi.h | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 7693b331d033ecda61097007330d3e7461ff7f27 Author: Wei Yongjun Date: Thu Mar 22 02:25:07 2018 +0000 tty: serial: msm_geni_serial: Fix return value check in qcom_geni_serial_probe() In case of error, the function platform_get_resource() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: c4f528795d1a ("tty: serial: msm_geni_serial: Add serial driver support for GENI based QUP") Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/qcom_geni_serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d723522b0be497dc836b759552a1c97a814d9e86 Author: Luis R. Rodriguez Date: Wed Mar 21 15:34:30 2018 -0700 mt7601u: use firmware_request_cache() to address cache on reboot request_firmware_cache() will ensure the firmware is available on resume from suspend if on reboot the device retains the firmware. This optimization is in place given otherwise on reboot we have to reload the firmware, the opmization saves us about max 1s, minimum 10ms. Cantabile has reported back this fixes his woes with both suspend and hibernation. Reported-by: Cantabile Tested-by: Cantabile Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/net/wireless/mediatek/mt7601u/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d42c96e1cf98bdfea18e7d32e5f6cf75aac93b9 Author: Luis R. Rodriguez Date: Wed Mar 21 15:34:29 2018 -0700 firmware: add firmware_request_cache() to help with cache on reboot Some devices have an optimization in place to enable the firmware to be retaineed during a system reboot, so after reboot the device can skip requesting and loading the firmware. This can save up to 1s in load time. The mt7601u 802.11 device happens to be such a device. When these devices retain the firmware on a reboot and then suspend they can miss looking for the firmware on resume. To help with this we need a way to cache the firmware when such an optimization has taken place. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman .../driver-api/firmware/request_firmware.rst | 14 +++++++++++++ drivers/base/firmware_loader/main.c | 24 ++++++++++++++++++++++ include/linux/firmware.h | 3 +++ 3 files changed, 41 insertions(+) commit c6263a48459934c9d07153e6d7f0fa43462d8dd2 Author: Luis R. Rodriguez Date: Wed Mar 21 15:34:28 2018 -0700 firmware: fix typo on pr_info_once() when ignore_sysfs_fallback is used When the sysctl knob is used ignore the fallback mechanism we pr_info_once() to ensure its noted the knob was used. The print incorrectly states its a debugfs knob, its a sysctl knob, so correct this typo. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/fallback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12a0148711a440f5b7111f95a34dfce88cdb47d6 Author: Colin Ian King Date: Thu Mar 22 09:40:40 2018 +0000 staging: mt7621-eth: fix spelling mistake: "devictree" -> "devicetree" Trivial fix to spelling mistake in dev_err message text Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-eth/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3eb3c3e32eef50e3a3375bf1636e05f5ec4b1210 Author: Wei Yongjun Date: Thu Mar 22 02:10:07 2018 +0000 staging: mt7621-eth: fix return value check in mt7621_gsw_probe() In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: f079b6406348 ("staging: mt7621-eth: add gigabit switch driver (GSW)") Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-eth/gsw_mt7621.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9d350d806a8bc26b3b4b9f3682bbfe085944a54e Author: Wei Yongjun Date: Thu Mar 22 02:09:51 2018 +0000 staging: mt7621-eth: fix return value check in mtk_connect_phy_node() In case of error, the function of_phy_connect() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: e3cbf478f846 ("staging: mt7621-eth: add the drivers core files") Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-eth/mdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 960526d5970f80497ae500441adc2554c72dcf7e Author: Wei Yongjun Date: Thu Mar 22 02:09:39 2018 +0000 staging: mt7621-eth: fix return value check in mtk_probe() In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: e3cbf478f846 ("staging: mt7621-eth: add the drivers core files") Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-eth/mtk_eth_soc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2a5f03b60a0cf59b305f10ff2dbc6cf84b280bba Author: Wei Yongjun Date: Thu Mar 22 02:09:25 2018 +0000 staging: mt7621-gpio: mt7621: make symbol gc_map static Fixes the following sparse warning: drivers/staging/mt7621-gpio/gpio-mt7621.c:47:3: warning: symbol 'gc_map' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-gpio/gpio-mt7621.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65197a7d361f01878ac23a2cc007c19095e5d8a6 Author: Pratik Jain Date: Wed Mar 21 15:20:43 2018 +0530 Staging: xgifb: XGI_main_26.c: Refactored the function Refactored the function `XGIfb_search_refresh_rate` by removing a level of `if...else` block nesting. Removed unnecessary parantheses. Removed potential bug of array underflow. Signed-off-by: Pratik Jain Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/XGI_main_26.c | 59 +++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 29 deletions(-) commit f81746470b47d9815ecc7de5724242960a87bd2a Author: Nishka Dasgupta Date: Tue Mar 20 20:27:55 2018 +0000 staging: vt6655: Change typedef enum to enum Change typedef enum to enum. Issue found with checkpatch. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dba18d6185577531e09decfe925046664ad0329c Author: Valentin Vidic Date: Tue Mar 20 22:29:05 2018 +0100 staging: pi433: cleanup local variable Rename temporary local variable and add required blank line. Fixes checkpatch warning: WARNING: Missing a blank line after declarations Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/pi433_if.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f066ac1131c58a0fcd51dcf8da9d34902c4698ee Author: Paul McQuade Date: Tue Mar 20 20:26:21 2018 +0000 Staging:rtl8723bs:Add blank line after declaration missing a blank line after declaration checkpatch warnings. Issue found by checkpatch.pl Signed-off-by: Paul McQuade Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/recv_linux.c | 1 + 1 file changed, 1 insertion(+) commit 6fcac4593be88d03eb089f7025b9213ab69be1bb Author: Paul McQuade Date: Tue Mar 20 20:26:19 2018 +0000 Staging:rtl8723bs clean up spaces Used checkpatch.pl to clean up spaces around for statements to make it easier to read Signed-off-by: Paul McQuade Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/rtw_proc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit af1bef4aa3e7b9336883818137c64fd36f4ea7d7 Author: Paul McQuade Date: Tue Mar 20 20:26:20 2018 +0000 Staging:rtl8723bs Remove unnecessary braces Remove unnecessary parentheses highlighted by checkpatch.pl Signed-off-by: Paul McQuade Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/recv_linux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fcd353bc8b77e6f326c7109478c5993e8c6cc11e Author: Paul McQuade Date: Tue Mar 20 20:26:18 2018 +0000 Staging:rtl8723bs static variables are always 0 C standard guarantees that: global and static variables will be implicitly initialized to 0 or NULL if no explicit initializer is given. Signed-off-by: Paul McQuade Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/rtw_proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aaea2164bdff39697d0f1ec69dcae62632e37974 Author: Colin Ian King Date: Wed Mar 21 19:19:41 2018 +0000 staging: wilc1000: check for kmalloc allocation failures There are three kmalloc allocations that are not null checked which potentially could lead to null pointer dereference issues. Fix this by adding null pointer return checks. Detected by CoverityScan, CID#1466025-27 ("Dereference null return") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit a0e8045e6ecf982c73f6d4baa4683cad41a572c7 Author: HariPrasath Elango Date: Tue Mar 20 17:44:49 2018 +0530 staging: wilc1000: replace switch statement by simple if condition In this case,there is only a single switch case statement.So replacing by a simple if condition Signed-off-by: HariPrasath Elango Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 5fa7ed322b74d24dd9fb6caa3073bc129cc4a036 Author: Sergio Paracuellos Date: Tue Mar 20 18:13:14 2018 +0100 staging: ks7010: review custom bit defines using macros from bitops header file This commit reviews custom definitions using custom bit macros changing them for the ones defined in the bitops header file. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/eap_packet.h | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 38fc31e73c475733d21a204811be04755deec8a2 Author: Sergio Paracuellos Date: Tue Mar 20 18:13:13 2018 +0100 staging: ks7010: replace some custom defines with the ones in uapi/linux/if_ether.h This commit reviews some custom defines changing them for the globals defined in if_ether header file. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/eap_packet.h | 8 +------- drivers/staging/ks7010/ks_hostif.c | 8 ++++---- 2 files changed, 5 insertions(+), 11 deletions(-) commit c07040694193f2c1722cff00cc4c55b5ba4318b5 Author: Sergio Paracuellos Date: Tue Mar 20 18:13:12 2018 +0100 staging: ks7010: remove not used function signature ks_wlan_read_config_file This commit removes definition of function ks_wlan_read_config_file which is not being used at all. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_ioctl.h | 1 - 1 file changed, 1 deletion(-) commit a00c38a335a858ec87ebc6c456e779966c58934e Author: Sergio Paracuellos Date: Tue Mar 20 15:36:44 2018 +0100 staging: ks7010: remove max_event_count field which is only being used in debug This patch removes max_event_count field of sme_info structure which is a write only variable just being used for debug purposes. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 7 ------- drivers/staging/ks7010/ks_wlan.h | 4 ---- 2 files changed, 11 deletions(-) commit 31ce0d861cd1053b3950cf405c73f32ca9ed73ea Author: Sergio Paracuellos Date: Tue Mar 20 15:36:43 2018 +0100 staging: ks7010: replace KS_WLAN_DEBUG with DEBUG preprocessor directive This commit replaces custom KS_WLAN_DEBUG which is not being used anymore in favour of DEBUG which is the one included when debugging is enabled. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/Makefile | 1 - drivers/staging/ks7010/ks7010_sdio.c | 9 ++++----- drivers/staging/ks7010/ks_hostif.c | 6 +++--- drivers/staging/ks7010/ks_wlan.h | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) commit 127aaef460ebb715f22d185db2b4d4149bd91c89 Author: Justin Skists Date: Wed Mar 21 19:53:09 2018 +0000 staging: lustre: lnet: use correct 'magic' test Use the lnet_magic_accept() function to compare 'magic' against LNET_PROTO_TCP_MAGIC for the appropriate string for an error message. The original fix removed an unneeded byte-ordering cast because the define was already CPU byte-ordered and it was assumed that 'magic' was CPU byte-ordered, too. Now modify the if-statement to use the appropriate lnet_accept_magic() function in order to be consistent with similar tests. This will allow the code to be consistent with the general understanding that 'magic' should be in host-byte-order for the peer that sent the message. Fixes: 80782927e3aa ("staging: lustre: Fix unneeded byte-ordering cast") Signed-off-by: Justin Skists Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/acceptor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f65d6eb430010b123d923ea79eeb11a92118a7ab Author: HariPrasath Elango Date: Tue Mar 20 13:15:54 2018 +0530 staging: mt7621-gpio: remove redundant owner assignments of drivers Remove the reduntant owner initialization from this platform driver as the platform_driver_register() takes care of it. Signed-off-by: HariPrasath Elango Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-gpio/gpio-mt7621.c | 1 - 1 file changed, 1 deletion(-) commit 38861e433cf2dfb432723fb263d366534aaf9eb9 Author: Stefan Wahren Date: Wed Mar 21 08:08:52 2018 +0100 staging: vc04_services: Add outstanding VCHI TODOs The TODO list missed some issues before we can move the driver out of staging. Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchi/TODO | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 8d38bf03cb5f9209aeea710be698410ddd7a9e75 Author: Stefan Wahren Date: Wed Mar 21 08:08:51 2018 +0100 staging: vc04_services: Remove import of bcm2835-camera from TODO The bcm2835-camera driver has already been imported. So remove it from the TODO. Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchi/TODO | 5 ----- 1 file changed, 5 deletions(-) commit 7c1f094ac6a913e0997a2c77daf2567a775c4222 Author: Nishka Dasgupta Date: Tue Mar 20 20:47:22 2018 +0000 staging: vc04_services: bcm2835-camera: Add blank line after declaration Add blank line after declaration. Issue found with checkpatch. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/controls.c | 1 + 1 file changed, 1 insertion(+) commit 8c3696102f3e76e2ebdd981b6b2ac1de004e1aef Author: Ioana Radulescu Date: Tue Mar 20 07:04:46 2018 -0500 staging: fsl-dpaa2/eth: Defer probing if no MC portal available MC portals may not be available at the initial probing attempt due to dependencies on other modules. Check the return value of the MC portal allocation function and defer probing in case it's not available yet. For all other error cases the behaviour stays the same. Signed-off-by: Ioana Radulescu Suggested-by: Nipun Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 334e76782563ce6835270973dd47f79fcff4c261 Merge: 7381f93 8e1ed73 Author: David S. Miller Date: Thu Mar 22 13:13:37 2018 -0400 Merge branch 'mlxsw-Update-supported-firmware-version' Ido Schimmel says: ==================== mlxsw: Update supported firmware version The first patch bumps the firmware version supported by the driver. The second patch enables a feature introduced in the new version, auto-negotiation disable. ==================== Signed-off-by: David S. Miller commit 8e1ed7392c1b19db43c2b47998371cbea9babb3c Author: Tal Bar Date: Wed Mar 21 09:34:06 2018 +0200 mlxsw: spectrum: Add support for auto-negotiation disable mode In 'auto-neg off' the device have sent AN (auto-negotiation) frames with the forced speed. Thus, fix it using an_disable_admin field in Port type and speed (PTYS) register. This field indicates if speed negotiation frames would be send by the port or not. Add the field and enable/disable it for 'auto-neg on/off', make the port to start/stop sending AN (auto-negotiation) frames. Note that for SwitchX2 the behavior doesn't change (i.e support only AN enabled with forced speed). Signed-off-by: Tal Bar Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 11 ++++++++++- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 8 ++++---- drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 8 ++++---- 3 files changed, 18 insertions(+), 9 deletions(-) commit 1c6e1037800ed70448befd0f9143e0dd57db9105 Author: Tal Bar Date: Wed Mar 21 09:34:05 2018 +0200 mlxsw: spectrum: Update the supported firmware to version 13.1620.192 This new firmware contains: - Support for auto-neg disable mode Signed-off-by: Tal Bar Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7381f93ab2627af8835c8cc3fd8fb447fbed1541 Merge: 1453074 1931dc2 Author: David S. Miller Date: Thu Mar 22 13:12:03 2018 -0400 Merge branch 'fix-some-bugs-for-HNS3-driver' Peng Li says: ==================== fix some bugs for HNS3 driver This patchset fixes some bugs for HNS3 driver: [Patch 1/11 - 5/11] fix various bugs reported by hisilicon test team. [Patch 6/11 - 7/11] fix bugs about interrupt coalescing self-adaptive function. [Patch 8/11 - 11/11] fix bugs about ethtool_ops.get_link_ksettings. ==================== Signed-off-by: David S. Miller commit 1931dc20839e31af758a5f110f31200f2ea15539 Author: Fuyun Liang Date: Wed Mar 21 15:49:30 2018 +0800 net: hns3: fix for not returning problem in get_link_ksettings when phy exists When phy exists, phy_ethtool_ksettings_get function is enough to get the link ksettings. If the phy exists, get_link_ksettings function can return directly after phy_ethtool_ksettings_get is called. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4a152de95d71652b86d391298c56b4503e0b9932 Author: Fuyun Liang Date: Wed Mar 21 15:49:29 2018 +0800 net: hns3: add querying speed and duplex support to VF This patch adds support for querying speed and duplex by ethtool ethX to VF. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 8 ++++++-- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 22 ++++++++++++++++++++++ .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 4 ++++ .../ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 5 +++++ 4 files changed, 37 insertions(+), 2 deletions(-) commit 175ec96b46ef710de200c49deeb44b41390ec644 Author: Fuyun Liang Date: Wed Mar 21 15:49:28 2018 +0800 net: hns3: add get_link support to VF This patch adds ethtool_ops.get_link support to VF. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 1 + drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 8 ++++++++ 2 files changed, 9 insertions(+) commit 0979aa0bfdc6d873f495310a8680436a66ff9c81 Author: Fuyun Liang Date: Wed Mar 21 15:49:27 2018 +0800 net: hns3: fix for getting wrong link mode problem Fixed link mode is returned by hns3_get_link_ksettings. It is unreasonable. This patch fixes it by adding some related functions to get link mode from hardware. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 4 + drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 98 ++-------------------- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 2 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 83 ++++++++++++++++++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 9 ++ 5 files changed, 107 insertions(+), 89 deletions(-) commit a95e1f8666e910f43f47b5b1bec2cdf25f513f74 Author: Fuyun Liang Date: Wed Mar 21 15:49:26 2018 +0800 net: hns3: change the time interval of int_gl calculating Since we change the update rate of int_gl from every interrupt to every one hundred interrupts, the old way to get time interval by int_gl value is not accurate. This patch calculates the time interval using the jiffies value. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 46 ++++++++++++++++--------- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 1 + 2 files changed, 30 insertions(+), 17 deletions(-) commit cd9d187b07c23df4925c3a47e06367315ba794ca Author: Fuyun Liang Date: Wed Mar 21 15:49:25 2018 +0800 net: hns3: change GL update rate The interrupt coalescing self-adaptive function updates the int_gl every interrupt. The GL update rate is too faster to get a better new GL value. This patch changes the GL update rate to every one hundred interrupts. The GL update rate is defined by HNS3_INT_ADAPT_DOWN_START. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 8 ++++++++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 2 ++ 2 files changed, 10 insertions(+) commit d458c815e7901758651f2357153518d1eb0a95d0 Author: Peng Li Date: Wed Mar 21 15:49:24 2018 +0800 net: hns3: increase the max time for IMP handle command It may need more time for IMP handle some command, such as reset. This patch enlarges the max time for cmd timeout. Driver will check the IMP result every us, it may break through the loop when get the right result. So not all command need the max time. Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 2 +- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2f550a467895b8715e17ae9bd6da048e8fce8c92 Author: Yunsheng Lin Date: Wed Mar 21 15:49:23 2018 +0800 net: hns3: export pci table of hclge and hclgevf to userspace There is no module that is dependent on hclge or hclgevf's symbol, but hns_enet need them to provide ops for it to run. When there is a need to auto load the hns3 driver, the auto load will fail because hclge or hclgevf is not loaded. Hns_enet has already exported the pci table, so this patch exports the pci table for hclge and hclgevf module too. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 ++ 2 files changed, 4 insertions(+) commit 681ec3999b3d1548b97c077df77433b718b3bfb3 Author: Yunsheng Lin Date: Wed Mar 21 15:49:22 2018 +0800 net: hns3: fix for vlan table lost problem when resetting The vlan table in hardware is clear after PF/Core/IMP/Global reset, which will cause vlan tagged packets not being received problem. This patch fixes it by restoring the vlan table after reset. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 26 +++++++++++++++++++++++++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 3 +++ 2 files changed, 29 insertions(+) commit 1a426f8b40fca920f15558c9d2fa6efab6921002 Author: Peng Li Date: Wed Mar 21 15:49:21 2018 +0800 net: hns3: fix the VF queue reset flow error VF queue reset flow is different from PF queue reset flow. VF driver should stop VF queue first, then send message to PF and PF do the reset. PF should send a response to VF after PF complete the queue reset, VF can initialize the queue hw after get the response. This patch fixes the VF queue reset flow as the correct step. Signed-off-by: Peng Li Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 37 ++++++++++++++++++++++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 1 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 11 ++++--- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 10 ++++-- 4 files changed, 53 insertions(+), 6 deletions(-) commit dd72140ca9fd44c5e3ea3cb6b485f40e6751f5e9 Author: Fuyun Liang Date: Wed Mar 21 15:49:20 2018 +0800 net: hns3: reallocate tx/rx buffer after changing mtu When changing the mtu, the max frame size also will be changed. The tx buffer size and the rx buffer size to be allocated are determined by max frame size. So when max frame size is changed, the tx buffer and rx buffer need to be reallocated. When the tc_num is changed, the tx buffer and rx buffer need to be reallocated too. So calling set_mtu and buffer_alloc separately is better. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 36 +++++++++++++--------- 1 file changed, 22 insertions(+), 14 deletions(-) commit 145307460ba9c11489807de7acd3f4c7395f60b7 Author: David Ahern Date: Tue Mar 20 19:31:14 2018 -0700 devlink: Remove top_hierarchy arg to devlink_resource_register top_hierarchy arg can be determined by comparing parent_resource_id to DEVLINK_RESOURCE_ID_PARENT_TOP so it does not need to be a separate argument. Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 9 ++++----- drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 6 +++--- include/net/devlink.h | 1 - net/core/devlink.c | 4 +++- 4 files changed, 10 insertions(+), 10 deletions(-) commit 57678e5a3d5145e5f08aa1d307ba219b27b1765a Author: Shawn Lin Date: Thu Mar 22 18:56:16 2018 +0800 mmc: block: Delete gendisk before cleaning up the request queue dd if=/dev/urandom of=/dev/mmcblk1 bs=4k count=10000 with a SD card hotplug during transfer reports a warning below introduced by commit a063057d7c73 ("block: Fix a race between request queue removal and the block cgroup controller"). So we should now remove the disk, partition and bdi sysfs attributes before cleaning up the request queue associated with the disk. [ 410.331226] mmc1: card 59b4 removed [ 410.348583] WARNING: CPU: 0 PID: 5 at block/blk-core.c:785 blk_cleanup_queue+0x138/0x140 [ 410.349294] Modules linked in: [ 410.349570] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 4.16.0-rc6-next-20180321-00004-gc2ad6a7 #263 [ 410.350363] Hardware name: Excavator-RK3399 Board (DT) [ 410.350819] Workqueue: events_freezable mmc_rescan [ 410.351242] pstate: 60000005 (nZCv daif -PAN -UAO) [ 410.351663] pc : blk_cleanup_queue+0x138/0x140 [ 410.352054] lr : blk_cleanup_queue+0xac/0x140 [ 410.352436] sp : ffff0000092cbb90 [ 410.352727] x29: ffff0000092cbb90 x28: 0000000000000000 [ 410.353195] x27: ffff8000f6f23030 x26: ffff00000904e610 [ 410.353662] x25: ffff8000f17cc808 x24: ffff8000f1038200 [ 410.354128] x23: 0000000000000060 x22: 0000000000000000 [ 410.354595] x21: ffff8000f11748d8 x20: ffff8000f1038200 [ 410.355061] x19: ffff8000f1174200 x18: 0000ffff936347d8 [ 410.355528] x17: 0000ffff935b93c0 x16: ffff0000081263f8 [ 410.355994] x15: 0000000000000000 x14: 0000000000000400 [ 410.356461] x13: 0000000000000001 x12: 0000000000000001 [ 410.356927] x11: 0000000000000040 x10: ffff8000f2400028 [ 410.357393] x9 : ffff8000f2400040 x8 : 0000000000000000 [ 410.357860] x7 : ffff8000f6f3a340 x6 : ffff8000f6f3a340 [ 410.358326] x5 : ffff8000f2400000 x4 : ffff8000f6f3a340 [ 410.358792] x3 : 0000000000000000 x2 : 39c1333e45670800 [ 410.359259] x1 : 0000000000000000 x0 : 0000000000000003 [ 410.359726] Call trace: [ 410.359943] blk_cleanup_queue+0x138/0x140 [ 410.360305] mmc_cleanup_queue+0x2c/0x48 [ 410.360652] mmc_blk_remove_req+0x1c/0x98 [ 410.361005] mmc_blk_remove+0x180/0x1c0 [ 410.361343] mmc_bus_remove+0x1c/0x28 [ 410.361670] device_release_driver_internal+0x154/0x1f0 [ 410.362128] device_release_driver+0x14/0x20 [ 410.362504] bus_remove_device+0xc8/0x108 [ 410.362858] device_del+0x120/0x350 [ 410.363167] mmc_remove_card+0x5c/0xb8 [ 410.363498] mmc_sd_detect+0x40/0x78 [ 410.363813] mmc_rescan+0x19c/0x368 [ 410.364123] process_one_work+0x1ac/0x318 [ 410.364477] worker_thread+0x50/0x450 [ 410.364801] kthread+0xf8/0x128 [ 410.365081] ret_from_fork+0x10/0x18 [ 410.365395] ---[ end trace 268e87a46c28968c ]--- Reviewed-by: Bart Van Assche Signed-off-by: Shawn Lin Signed-off-by: Jens Axboe drivers/mmc/core/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ae797aaa845317bddfbf14f4b37514b017045a6 Author: David Ahern Date: Tue Mar 20 10:04:30 2018 -0700 selftests: Add multipath tests for onlink flag Add multipath tests for onlink flag: one test with onlink added to both nexthops, then tests with onlink added to only 1 nexthop. Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/fib-onlink-tests.sh | 98 ++++++++++++++++++++++++- 1 file changed, 95 insertions(+), 3 deletions(-) commit 10ecacd7943b661ed1d365e6d1749edabc2b4721 Author: Alvaro G. M Date: Thu Mar 22 15:37:44 2018 +0100 hwmon: (lm92) Add max6635 to lm92_id[] Since autodetection of this chip was removed, it makes sense to add prefix max6635 so that the device can be instantiated by its actual name. Signed-off-by: Alvaro Gamez Machado Reviewed-by: Jean Delvare Signed-off-by: Guenter Roeck Documentation/hwmon/lm92 | 2 +- drivers/hwmon/lm92.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 4ff0ce227a1e6570fd5222dae03f4bd2fa9a7c34 Author: Guenter Roeck Date: Sat Mar 10 18:59:04 2018 -0800 hwmon: (pmbus/adm1275) Add support for ADM1272 The chip is quite similar to other chips in the series, but as usual it comes with its own quirks. Signed-off-by: Guenter Roeck Documentation/hwmon/adm1275 | 20 +++++++------ drivers/hwmon/pmbus/Kconfig | 4 +-- drivers/hwmon/pmbus/adm1275.c | 67 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 80 insertions(+), 11 deletions(-) commit 05993e226ad997682929dec2c42477d5e3e6c274 Author: Alvaro G. M Date: Wed Mar 21 16:04:52 2018 +0100 hwmon: (lm92) Do not try to detect MAX6635 Maxim MAX663x family are mostly compatible with LM92, but they lack any identification register. Weakening the detect function would make it prone to false positives, and current one doesn't detect all chips. Therefore, the detect function for max6635 devices is removed in favor of explicit device instatiation. Signed-off-by: Alvaro Gamez Machado Reviewed-by: Jean Delvare Signed-off-by: Guenter Roeck Documentation/hwmon/lm92 | 4 +--- drivers/hwmon/lm92.c | 58 ------------------------------------------------ 2 files changed, 1 insertion(+), 61 deletions(-) commit bc48740bcdcbc5ab75d10fc169342123aa446e8d Merge: 0dfebaf f3910c6 Author: David S. Miller Date: Thu Mar 22 11:59:12 2018 -0400 Merge branch 'cxgb4-rdma' Raju Rangoju says: ==================== Add support for RDMA enhancements in cxgb4 Allocates the HW-resources and provide the necessary routines for the upper layer driver (rdma/iw_cxgb4) to enable the RDMA SRQ support for Chelsio adapters. Advertise support for write with immediate work request Advertise support for write with completion v3: modified memory allocation as per Stefano's suggestion v2: fixed the patching issues and also fixed the following based on review comments of Stefano Brivio - using kvzalloc instead of vzalloc - using #define instead of enum ==================== Signed-off-by: David S. Miller commit f3910c6278f380d87f8bf8e46a8db46b2d0cff27 Author: Raju Rangoju Date: Tue Mar 20 15:41:42 2018 +0530 cxgb4: Support firmware rdma write completion work request. If FW supports RDMA WRITE_COMPLETION functionality, then advertise that to the ULDs. This will be used by iw_cxgb4 to allow WRITE_COMPLETION work requests. Signed-off-by: Potnuri Bharat Teja Signed-off-by: Raju Rangoju Signed-off-by: Ganesh Goudar Signed-off-by: Steve Wise Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 6 ++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 1 + drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 2 ++ 5 files changed, 11 insertions(+) commit 43db92964039d409c8e76613f607b79f6e93ee38 Author: Raju Rangoju Date: Tue Mar 20 15:41:41 2018 +0530 cxgb4: Support firmware rdma write with immediate work request. If FW supports RDMA WRITE_WITH_IMMEDATE functionality, then advertise that to the ULDs. This will be used by iw_cxgb4 to allow WRITE_WITH_IMMEDIATE work requests. Signed-off-by: Potnuri Bharat Teja Signed-off-by: Raju Rangoju Signed-off-by: Ganesh Goudar Signed-off-by: Steve Wise Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 6 ++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 1 + drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 1 + 5 files changed, 10 insertions(+) commit c68644ef16103a2462c34e0691343d8985466eab Author: Raju Rangoju Date: Tue Mar 20 15:41:40 2018 +0530 cxgb4: Add support to query HW SRQ parameters This patch adds support to query FW for the HW SRQ table start/end, and advertise that for ULDs. Signed-off-by: Raju Rangoju Reviewed-by: Steve Wise Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 20 ++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 1 + 2 files changed, 21 insertions(+) commit e47094751ddc117c686c399af9810d57367922c9 Author: Raju Rangoju Date: Tue Mar 20 15:41:39 2018 +0530 cxgb4: Add support to initialise/read SRQ entries - This patch adds support to initialise srq table and read srq entries Signed-off-by: Raju Rangoju Reviewed-by: Steve Wise Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/Makefile | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 2 + drivers/net/ethernet/chelsio/cxgb4/srq.c | 138 ++++++++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/srq.h | 65 +++++++++++++ 4 files changed, 206 insertions(+), 1 deletion(-) commit a3cdaa69e4aefd5858af1c4e763b57e0d88ed31e Author: Raju Rangoju Date: Tue Mar 20 15:41:38 2018 +0530 cxgb4: Adds CPL support for Shared Receive Queues - Add srq table query cpl support for srq - Add cpl_abort_req_rss6 and cpl_abort_rpl_rss6 structs. - Add accessors, macros to get the SRQ IDX value. Signed-off-by: Raju Rangoju Reviewed-by: Steve Wise Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 71 +++++++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 2 + 2 files changed, 73 insertions(+) commit 0d9366d67bcf066b028e57d09c9a86ce879bcc28 Author: Eric Sandeen Date: Thu Mar 22 11:59:00 2018 -0400 ext4: don't complain about incorrect features when probing If mount is auto-probing for filesystem type, it will try various filesystems in order, with the MS_SILENT flag set. We get that flag as the silent arg to ext4_fill_super. If we're probing (silent==1) then don't complain about feature incompatibilities that are found if it looks like it's actually a different valid extN type - failed probes should be silent in this case. If the on-disk features are unknown even to ext4, then complain. Reported-by: Joakim Tjernlund Tested-by: Joakim Tjernlund Signed-off-by: Eric Sandeen Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/super.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 19d99164480a34db66941cf995bdd996cc266fc0 Author: Alexandre Belloni Date: Thu Mar 22 16:15:24 2018 +0100 irqchip: Add a driver for the Microsemi Ocelot controller The Microsemi Ocelot SoC has a pretty simple IRQ controller in its ICPU block. Add a driver for it. Signed-off-by: Alexandre Belloni Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 5 ++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-mscc-ocelot.c | 118 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+) commit c927d74ec0319abb0b232adf9dbe4e7be3791328 Author: Alexandre Belloni Date: Thu Mar 22 16:15:23 2018 +0100 dt-bindings: interrupt-controller: Add binding for the Microsemi Ocelot interrupt controller Add the Device Tree binding documentation for the Microsemi Ocelot interrupt controller that is part of the ICPU. It is connected directly to the MIPS core interrupt controller. Acked-by: Rob Herring Signed-off-by: Alexandre Belloni Signed-off-by: Marc Zyngier .../interrupt-controller/mscc,ocelot-icpu-intr.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 1d39834fba99c48edd3d4887ccd474da61a1ada7 Author: Nikolay Borisov Date: Thu Mar 22 11:52:10 2018 -0400 ext4: remove EXT4_STATE_DIOREAD_LOCK flag Commit 16c54688592c ("ext4: Allow parallel DIO reads") reworked the way locking happens around parallel dio reads. This resulted in obviating the need for EXT4_STATE_DIOREAD_LOCK flag and accompanying logic. Currently this amounts to dead code so let's remove it. No functional changes Signed-off-by: Nikolay Borisov Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/ext4.h | 17 ----------------- fs/ext4/extents.c | 19 +++++-------------- fs/ext4/inode.c | 8 -------- fs/ext4/ioctl.c | 4 ---- fs/ext4/move_extent.c | 4 ---- fs/ext4/super.c | 12 +++++------- 6 files changed, 10 insertions(+), 54 deletions(-) commit fe23cb65c2c394ea306f3714a17d46ab2e6a0af1 Author: Jiri Slaby Date: Thu Mar 22 11:50:26 2018 -0400 ext4: fix offset overflow on 32-bit archs in ext4_iomap_begin() ext4_iomap_begin() has a bug where offset returned in the iomap structure will be truncated to unsigned long size. On 64-bit architectures this is fine but on 32-bit architectures obviously not. Not many places actually use the offset stored in the iomap structure but one of visible failures is in SEEK_HOLE / SEEK_DATA implementation. If we create a file like: dd if=/dev/urandom of=file bs=1k seek=8m count=1 then lseek64("file", 0x100000000ULL, SEEK_DATA) wrongly returns 0x100000000 on unfixed kernel while it should return 0x200000000. Avoid the overflow by proper type cast. Fixes: 545052e9e35a ("ext4: Switch to iomap for SEEK_HOLE / SEEK_DATA") Signed-off-by: Jiri Slaby Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org # v4.15 fs/ext4/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0dfebaf1cd26a1b47567cba5eb11982709b04a28 Merge: 755f663 1e1205b Author: David S. Miller Date: Thu Mar 22 11:47:53 2018 -0400 Merge branch 'r8169-small-improvements' Heiner Kallweit says: ==================== r8169: series with smaller improvements w/o functional changes This series includes smaller improvements w/o intended functional changes. ==================== Signed-off-by: David S. Miller commit 1e1205b7d3e992439b812f59fe0e79bd99b8c79a Author: Heiner Kallweit Date: Tue Mar 20 07:45:42 2018 +0100 r8169: add helper tp_to_dev In several places struct device is referenced by using &tp->pci_dev->dev. Add helper tp_to_dev() to improve code readability. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 37 +++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit 73c86ee38b98203fc7ebc1006e4ffe22342107c3 Author: Heiner Kallweit Date: Tue Mar 20 07:45:40 2018 +0100 r8169: change type of argument in rtl_disable/enable_clock_request Changing the argument type to struct rtl8169_private * is more in line with the other functions in the driver and it allows to reduce the code size. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) commit cb73200c59e2f0493436a9f05835be8e37056b69 Author: Heiner Kallweit Date: Tue Mar 20 07:45:35 2018 +0100 r8169: change type of first argument in rtl_tx_performance_tweak Changing the type of the first argument to struct rtl8169_private * is more in line with the other functions in the driver and it allows to reduce the code size. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 62 ++++++++++++++---------------------- 1 file changed, 24 insertions(+), 38 deletions(-) commit 1f7aa2bc268efe8c462f1d3f8778f9040047bc75 Author: Heiner Kallweit Date: Tue Mar 20 07:45:33 2018 +0100 r8169: simplify rtl_set_mac_address Replace open-coded functionality with eth_mac_addr(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 45d8ec4d9fd5468c08f2ef0b2b132bb62dc81a3d Author: Eryu Guan Date: Thu Mar 22 11:44:59 2018 -0400 ext4: update i_disksize if direct write past ondisk size Currently in ext4 direct write path, we update i_disksize only when new eof is greater than i_size, and don't update it even when new eof is greater than i_disksize but less than i_size. This doesn't work well with delalloc buffer write, which updates i_size and i_disksize only when delalloc blocks are resolved (at writeback time), the i_disksize from direct write can be lost if a previous buffer write succeeded at write time but failed at writeback time, then results in corrupted ondisk inode size. Consider this case, first buffer write 4k data to a new file at offset 16k with delayed allocation, then direct write 4k data to the same file at offset 4k before delalloc blocks are resolved, which doesn't update i_disksize because it writes within i_size(20k), but the extent tree metadata has been committed in journal. Then writeback of the delalloc blocks fails (due to device error etc.), and i_size/i_disksize from buffer write can't be written to disk (still zero). A subsequent umount/mount cycle recovers journal and writes extent tree metadata from direct write to disk, but with i_disksize being zero. Fix it by updating i_disksize too in direct write path when new eof is greater than i_disksize but less than i_size, so i_disksize is always consistent with direct write. This fixes occasional i_size corruption in fstests generic/475. Signed-off-by: Eryu Guan Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 73fdad00b208b139cf43f3163fbc0f67e4c6047c Author: Eryu Guan Date: Thu Mar 22 11:41:25 2018 -0400 ext4: protect i_disksize update by i_data_sem in direct write path i_disksize update should be protected by i_data_sem, by either taking the lock explicitly or by using ext4_update_i_disksize() helper. But the i_disksize updates in ext4_direct_IO_write() are not protected at all, which may be racing with i_disksize updates in writeback path in delalloc buffer write path. This is found by code inspection, and I didn't hit any i_disksize corruption due to this bug. Thanks to Jan Kara for catching this bug and suggesting the fix! Reported-by: Jan Kara Suggested-by: Jan Kara Signed-off-by: Eryu Guan Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f44d6107f87936c0359358184627fd82e60bd4b0 Author: Mauro Carvalho Chehab Date: Thu Mar 22 11:40:15 2018 -0400 media: dvb_frontend: add proper __user annotations Solves those warnings: drivers/media/dvb-core/dvb_frontend.c:2297:39: warning: incorrect type in argument 1 (different address spaces) drivers/media/dvb-core/dvb_frontend.c:2297:39: expected void const [noderef] * drivers/media/dvb-core/dvb_frontend.c:2297:39: got struct dtv_property *props drivers/media/dvb-core/dvb_frontend.c:2331:39: warning: incorrect type in argument 1 (different address spaces) drivers/media/dvb-core/dvb_frontend.c:2331:39: expected void const [noderef] * drivers/media/dvb-core/dvb_frontend.c:2331:39: got struct dtv_property *props No functional changes. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 755f6633d64e5f428e5a6d13b446f1f42ee014a1 Merge: bdf5bd7 53dd9a6 Author: David S. Miller Date: Thu Mar 22 11:28:54 2018 -0400 Merge tag 'batadv-next-for-davem-20180319' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This feature/cleanup patchset includes the following patches: - avoid redundant multicast TT entries, by Linus Luessing - add netlink support for distributed arp table cache and multicast flags, by Linus Luessing (2 patches) ==================== Signed-off-by: David S. Miller commit bdf5bd7f21323493dbe5f2c723dc33f2fbb0241a Author: Sowmini Varadhan Date: Mon Mar 19 06:52:48 2018 -0700 rds: tcp: remove register_netdevice_notifier infrastructure. The netns deletion path does not need to wait for all net_devices to be unregistered before dismantling rds_tcp state for the netns (we are able to dismantle this state on module unload even when all net_devices are active so there is no dependency here). This patch removes code related to netdevice notifiers and refactors all the code needed to dismantle rds_tcp state into a ->exit callback for the pernet_operations used with register_pernet_device(). Signed-off-by: Sowmini Varadhan Reviewed-by: Kirill Tkhai Signed-off-by: David S. Miller net/rds/tcp.c | 93 +++++++++++++++-------------------------------------------- 1 file changed, 23 insertions(+), 70 deletions(-) commit 692ec06d7c92af8ca841a6367648b9b3045344fd Author: Christian Brauner Date: Mon Mar 19 13:17:31 2018 +0100 netns: send uevent messages This patch adds a receive method to NETLINK_KOBJECT_UEVENT netlink sockets to allow sending uevent messages into the network namespace the socket belongs to. Currently non-initial network namespaces are already isolated and don't receive uevents. There are a number of cases where it is beneficial for a sufficiently privileged userspace process to send a uevent into a network namespace. One such use case would be debugging and fuzzing of a piece of software which listens and reacts to uevents. By running a copy of that software inside a network namespace, specific uevents could then be presented to it. More concretely, this would allow for easy testing of udevd/ueventd. This will also allow some piece of software to run components inside a separate network namespace and then effectively filter what that software can receive. Some examples of software that do directly listen to uevents and that we have in the past attempted to run inside a network namespace are rbd (CEPH client) or the X server. Implementation: The implementation has been kept as simple as possible from the kernel's perspective. Specifically, a simple input method uevent_net_rcv() is added to NETLINK_KOBJECT_UEVENT sockets which completely reuses existing af_netlink infrastructure and does neither add an additional netlink family nor requires any user-visible changes. For example, by using netlink_rcv_skb() we can make use of existing netlink infrastructure to report back informative error messages to userspace. Furthermore, this implementation does not introduce any overhead for existing uevent generating codepaths. The struct netns got a new uevent socket member that records the uevent socket associated with that network namespace including its position in the uevent socket list. Since we record the uevent socket for each network namespace in struct net we don't have to walk the whole uevent socket list. Instead we can directly retrieve the relevant uevent socket and send the message. At exit time we can now also trivially remove the uevent socket from the uevent socket list. This keeps the codepath very performant without introducing needless overhead and even makes older codepaths faster. Uevent sequence numbers are kept global. When a uevent message is sent to another network namespace the implementation will simply increment the global uevent sequence number and append it to the received uevent. This has the advantage that the kernel will never need to parse the received uevent message to replace any existing uevent sequence numbers. Instead it is up to the userspace process to remove any existing uevent sequence numbers in case the uevent message to be sent contains any. Security: In order for a caller to send uevent messages to a target network namespace the caller must have CAP_SYS_ADMIN in the owning user namespace of the target network namespace. Additionally, any received uevent message is verified to not exceed size UEVENT_BUFFER_SIZE. This includes the space needed to append the uevent sequence number. Testing: This patch has been tested and verified to work with the following udev implementations: 1. CentOS 6 with udevd version 147 2. Debian Sid with systemd-udevd version 237 3. Android 7.1.1 with ueventd Signed-off-by: Christian Brauner Signed-off-by: David S. Miller lib/kobject_uevent.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) commit 94e5e3087a67c765be98592b36d8d187566478d5 Author: Christian Brauner Date: Mon Mar 19 13:17:30 2018 +0100 net: add uevent socket member This commit adds struct uevent_sock to struct net. Since struct uevent_sock records the position of the uevent socket in the uevent socket list we can trivially remove it from the uevent socket list during cleanup. This speeds up the old removal codepath. Note, list_del() will hit __list_del_entry_valid() in its call chain which will validate that the element is a member of the list. If it isn't it will take care that the list is not modified. Signed-off-by: Christian Brauner Signed-off-by: David S. Miller include/net/net_namespace.h | 4 +++- lib/kobject_uevent.c | 17 +++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) commit aa65f636540539e2e1fd77bdcd8fc7060d19d47b Author: Kirill Tkhai Date: Mon Mar 19 14:45:46 2018 +0300 net: Convert nf_ct_net_ops These pernet_operations register and unregister sysctl. Also, there is inet_frags_exit_net() called in exit method, which has to be safe after a560002437d3 "net: Fix hlist corruptions in inet_evict_bucket()". Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv6/netfilter/nf_conntrack_reasm.c | 1 + 1 file changed, 1 insertion(+) commit 08012631d6277cebe388971cd84fe14d1cc49a00 Author: Kirill Tkhai Date: Mon Mar 19 14:45:37 2018 +0300 net: Convert lowpan_frags_ops These pernet_operations register and unregister sysctl. Also, there is inet_frags_exit_net() called in exit method, which has to be safe after a560002437d3 "net: Fix hlist corruptions in inet_evict_bucket()". Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ieee802154/6lowpan/reassembly.c | 1 + 1 file changed, 1 insertion(+) commit 1ae7762760736d4f7e4ea43e9ed03a608685c3d9 Author: Kirill Tkhai Date: Mon Mar 19 14:39:05 2018 +0300 net: Convert can_pernet_ops These pernet_operations create and destroy /proc entries and cancel per-net timer. Also, there are unneed iterations over empty list of net devices, since all net devices must be already moved to init_net or unregistered by default_device_ops. This already was mentioned here: https://marc.info/?l=linux-can&m=150169589119335&w=2 So, it looks safe to make them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/can/af_can.c | 1 + 1 file changed, 1 insertion(+) commit 33625282adaaba93d37aa437ae9688bf0cc024a9 Author: Marc Zyngier Date: Tue Mar 20 09:46:42 2018 +0000 irqchip/gic-v3: Probe for SCR_EL3 being clear before resetting AP0Rn We would like to reset the Group-0 Active Priority Registers at boot time if they are available to us. They would be available if SCR_EL3.FIQ was not set, but we cannot directly probe this bit, and short of checking, we may end-up trapping to EL3, and the firmware may not be please to get such an exception. Yes, this is dumb. Instead, let's use PMR to find out if its value gets affected by SCR_EL3.FIQ being set. We use the fact that when SCR_EL3.FIQ is set, the LSB of the priority is lost due to the shifting back and forth of the actual priority. If we read back a 0, we know that Group0 is unavailable. In case we read a non-zero value, we can safely reset the AP0Rn register. Signed-off-by: Marc Zyngier arch/arm/include/asm/arch_gicv3.h | 6 +---- arch/arm64/include/asm/arch_gicv3.h | 5 ---- drivers/irqchip/irq-gic-v3.c | 46 ++++++++++++++++++++++++++++++++----- 3 files changed, 41 insertions(+), 16 deletions(-) commit a23deac60a8683895543c8f335c36e475948716f Author: Mauro Carvalho Chehab Date: Thu Mar 22 09:11:20 2018 -0400 media: imx-media-utils: fix a warning The logic at find_format() is a little bit confusing even for humans, and it tricks static code analyzers: drivers/staging/media/imx/imx-media-utils.c:259 find_format() error: buffer overflow 'array' 14 <= 20 Rewrite the logic in a way that it makes it clearer to understand, while prevent static analyzers to produce false positives. Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-utils.c | 81 +++++++++++++++-------------- 1 file changed, 43 insertions(+), 38 deletions(-) commit 39adb4e739050dcdb74c3465d261de8de5f224b7 Author: Mauro Carvalho Chehab Date: Thu Mar 22 09:01:11 2018 -0400 media: dvbdev: handle ENOMEM error at dvb_module_probe() If allocation of struct board_info fails, return NULL from dvb_module_probe(). Fix this warning: drivers/media/dvb-core/dvbdev.c:958 dvb_module_probe() error: potential null dereference 'board_info'. (kzalloc returns null) Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 2 ++ 1 file changed, 2 insertions(+) commit f67449fdba3b9dbdd340d8cbf17dfa711d5bd2fb Author: Hans Verkuil Date: Wed Mar 21 13:28:47 2018 -0400 media: debugfs-cec-error-inj: document CEC error inj debugfs ABI Document the core of the debugfs CEC error injection ABI. The driver specific commands are documented elsewhere and this file points to that documentation. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/ABI/testing/debugfs-cec-error-inj | 40 +++++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 41 insertions(+) commit f84a66d61e1f12fc7eba169d78885a060c04d00b Author: Hans Verkuil Date: Thu Feb 8 11:25:15 2018 -0500 media: cec-pin-error-inj.rst: document CEC Pin Error Injection The CEC Pin framework adds support for Error Injection. Document all the error injections commands and how to use it. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/cec/cec-api.rst | 1 + Documentation/media/uapi/cec/cec-pin-error-inj.rst | 325 +++++++++++++++++++++ 2 files changed, 326 insertions(+) commit 29bca25e1bc4745b021e40b81b294b319693bde0 Author: Chunfeng Yun Date: Thu Mar 22 20:12:50 2018 +0800 usb: skip phys initialization of shared hcd The phys has already been initialized when add primary hcd, including usb2 phys and usb3 phys also if exist, so needn't re-parse "phys" property again. Signed-off-by: Chunfeng Yun Reviewed-by: Roger Quadros Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3864e9451ba6463f70b1db5ac541d0a490c2c60e Author: Linus Walleij Date: Thu Mar 22 11:22:24 2018 +0100 usb: phy: ab8500: Drop AB8540/9540 support The AB8540 was an evolved version of the AB8500, but it was never mass produced or put into products, only reference designs exist. The upstream support was never completed and it is unlikely that this will happen so drop the support for now to simplify maintenance of the AB8500. Cc: Loic Pallardy Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/phy-ab8500-usb.c | 506 --------------------------------------- 1 file changed, 506 deletions(-) commit d54f063cdbe414590c97d990111ddff25c6f9593 Author: Hans de Goede Date: Tue Mar 20 15:57:13 2018 +0300 extcon: axp288: Set USB role where necessary The AXP288 BC1.2 charger detection / extcon code may seem like a strange place to add code to control the USB role-switch on devices with an AXP288, but there are 2 reasons to do this inside the axp288 extcon code: 1) On many devices the USB role is controlled by ACPI AML code, but the AML code only switches between the host and none roles, because of Windows not really using device mode. To make device mode work we need to toggle between the none/device roles based on Vbus presence, and the axp288 extcon gets interrupts on Vbus insertion / removal. 2) In order for our BC1.2 charger detection to work properly the role mux must be properly set to device mode before we do the detection. Also note the Kconfig help-text / obsolete depends on USB_PHY which are remnants from older never upstreamed code also controlling the mux from the axp288 extcon code. This commit also adds code to get notifications from the INT3496 extcon device, which is used on some devices to notify the kernel about id-pin changes instead of them being handled through AML code. This fixes: -Device mode not working on most CHT devices with an AXP288 -Host mode not working on devices with an INT3496 ACPI device -Charger-type misdetection (always SDP) on devices with an INT3496 when the USB role (always) gets initialized as host Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/extcon/Kconfig | 3 +- drivers/extcon/extcon-axp288.c | 176 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 170 insertions(+), 9 deletions(-) commit 29b4aec2f407341963b7e3b15e8756ce815abf8a Author: Hans de Goede Date: Tue Mar 20 15:57:12 2018 +0300 platform/x86: intel_cht_int33fe: Add device connections for the Type-C port We need to add device-connections for the Type-C mux/switch and usb-role code to be able to find the PI3USB30532 Type-C cross-switch and the device/host role-switch integrated in the CHT SoC. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/platform/x86/intel_cht_int33fe.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit da95cc1d9a4c7a5f0add7372527074321981bd98 Author: Hans de Goede Date: Tue Mar 20 15:57:11 2018 +0300 usb: typec: driver for Pericom PI3USB30532 Type-C cross switch Add a driver for the Pericom PI3USB30532 Type-C cross switch / mux chip found on some devices with a Type-C port. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 6 ++ drivers/usb/typec/Kconfig | 2 + drivers/usb/typec/Makefile | 1 + drivers/usb/typec/mux/Kconfig | 10 ++ drivers/usb/typec/mux/Makefile | 3 + drivers/usb/typec/mux/pi3usb30532.c | 178 ++++++++++++++++++++++++++++++++++++ 6 files changed, 200 insertions(+) commit f6fb9ec02be1c1718596622263a88ff5490d2e95 Author: Hans de Goede Date: Tue Mar 20 15:57:10 2018 +0300 usb: roles: Add Intel xHCI USB role switch driver Various Intel SoCs (Cherry Trail, Broxton and others) have an internal USB role switch for swiching the OTG USB data lines between the xHCI host controller and the dwc3 gadget controller. Note on some Cherry Trail systems there is ACPI/AML code listening to edge interrupts on the id-pin (through an _AIE ACPI method) and switching the role between ROLE_HOST and ROLE_NONE based on the id-pin. Note it does not set the role to ROLE_DEVICE, because device-mode is usually not used under Windows. The presence of AML code which modifies the cfg0 reg (on some systems) means that our read/write/modify of cfg0 may race with the AML code doing the same to avoid this we take the global ACPI lock while doing the read/write/modify. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 6 + drivers/usb/Kconfig | 2 + drivers/usb/Makefile | 2 + drivers/usb/roles/Kconfig | 14 ++ drivers/usb/roles/Makefile | 1 + drivers/usb/roles/intel-xhci-usb-role-switch.c | 192 +++++++++++++++++++++++++ 6 files changed, 217 insertions(+) commit fa31b3cb2ae143aa6e26974fcbe75689da60bdbe Author: Hans de Goede Date: Tue Mar 20 15:57:09 2018 +0300 xhci: Add Intel extended cap / otg phy mux handling The xHCI controller on various Intel SoCs has an extended cap mmio-range which contains registers to control the muxing to the xHCI (host mode) or the dwc3 (device mode) and vbus-detection for the otg usb-phy. Having a role-sw driver included in the xHCI code (under drivers/usb/host) is not desirable. So this commit adds a simple handler for this extended capability, which creates a platform device with the caps mmio region as resource, this allows us to write a separate platform role-sw driver for the role-switch. Note this commit adds a call to the new xhci_ext_cap_init() function to xhci_pci_probe(), it is added here because xhci_ext_cap_init() must be called only once. If in the future we also want to handle ext-caps on non pci xHCI HCDs from xhci_ext_cap_init() a call to it should also be added to other bus probe paths. Signed-off-by: Hans de Goede Acked-by: Mathias Nyman Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/host/Makefile | 2 +- drivers/usb/host/xhci-ext-caps.c | 90 ++++++++++++++++++++++++++++++++++++++++ drivers/usb/host/xhci-ext-caps.h | 2 + drivers/usb/host/xhci-pci.c | 5 +++ drivers/usb/host/xhci.h | 2 + 5 files changed, 100 insertions(+), 1 deletion(-) commit d0a0fa9d74b9ba3b24b43fd50c318c27dc34c06f Author: Mathias Nyman Date: Tue Mar 20 15:57:08 2018 +0300 xhci: Add option to get next extended capability in list by passing id = 0 Modify xhci_find_next_ext_cap(base, offset, id) to return the next capability offset if 0 is passed for id. Otherwise it will behave as previously and return the offset of the next capability with matching id capability id 0 is not used by xHCI (reserved) This is useful when we want to loop through all capabilities. Signed-off-by: Mathias Nyman Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ext-caps.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2000016c94b4f724cb5851486b9f9a94e8da32fc Author: Hans de Goede Date: Tue Mar 20 15:57:07 2018 +0300 usb: typec: tcpm: Use new Type-C switch/mux and usb-role-switch functions Remove the unused (not implemented anywhere) tcpc_mux_dev abstraction and replace it with calling the new typec_set_orientation, usb_role_switch_set and typec_set_mode functions. Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/Kconfig | 1 + drivers/usb/typec/fusb302/fusb302.c | 1 - drivers/usb/typec/tcpm.c | 46 ++++++++++++++++++++++++++++--------- include/linux/usb/tcpm.h | 10 -------- 4 files changed, 36 insertions(+), 22 deletions(-) commit c6962c29729cc64177f56a466766daa7de9f87ac Author: Hans de Goede Date: Tue Mar 20 15:57:06 2018 +0300 usb: typec: tcpm: Set USB role switch to device mode when configured as such Setting the mux to MUX_NONE and the switch to USB_SWITCH_DISCONNECT when the data-role is device is not correct. Plenty of devices support operating as USB device through a (separate) USB device controller. We really need 2 different versions of USB_SWITCH_CONNECT, USB_SWITCH_CONNECT_HOST and USB_SWITCH_DEVICE. Rather then modifying the tcpc_usb_switch enum for this, simply remove it and switch to the usb_role enum which provides exactly this, this will save use needing to convert betweent the 2 enums when calling an usb-role-switch driver later. Besides switching to the usb_role type, this commit also actually sets the mux to TYPEC_MUX_USB and the switch to USB_ROLE_DEVICE instead of setting both to none when the data-role is device. This commit also makes tcpm_reset_port() call tcpm_mux_set(port, TYPEC_MUX_NONE, USB_ROLE_NONE) so that the mux and switch do _not_ stay in their last mode after a detach. Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm.c | 22 +++++++++++----------- include/linux/usb/tcpm.h | 8 ++------ 2 files changed, 13 insertions(+), 17 deletions(-) commit ceeb162500c3480b660a47d509db7955a7913271 Author: Heikki Krogerus Date: Tue Mar 20 15:57:05 2018 +0300 usb: typec: Separate the definitions for data and power roles USB Type-C specification v1.2 separated the power and data roles more clearly. Dual-Role-Data term was introduced, and the meaning of DRP was changed from "Dual-Role-Port" to "Dual-Role-Power". In order to allow the port drivers to describe the capabilities of the ports more clearly according to the newest specifications, introducing separate definitions for the data roles. Reviewed-by: Guenter Roeck Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/class.c | 56 ++++++++++++++++++++++--------------- drivers/usb/typec/fusb302/fusb302.c | 1 + drivers/usb/typec/tcpm.c | 9 +++--- drivers/usb/typec/tps6598x.c | 26 +++++++++++------ drivers/usb/typec/typec_wcove.c | 1 + drivers/usb/typec/ucsi/ucsi.c | 13 +++++++-- include/linux/usb/tcpm.h | 1 + include/linux/usb/typec.h | 14 ++++++++-- 8 files changed, 80 insertions(+), 41 deletions(-) commit fde0aa6c175a4d8aa19e82b86ae0f9278bc8563b Author: Heikki Krogerus Date: Tue Mar 20 15:57:04 2018 +0300 usb: common: Small class for USB role switches USB role switch is a device that can be used to choose the data role for USB connector. With dual-role capable USB controllers, the controller itself will be the switch, but on some platforms the USB host and device controllers are separate IPs and there is a mux between them and the connector. On those platforms the mux driver will need to register the switch. With USB Type-C connectors, the host-to-device relationship is negotiated over the Configuration Channel (CC). That means the USB Type-C drivers need to be in control of the role switch. The class provides a simple API for the USB Type-C drivers for the control. For other types of USB connectors (mainly microAB) the class provides user space control via sysfs attribute file that can be used to request role swapping from the switch. Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-class-usb_role | 21 ++ drivers/usb/Kconfig | 3 + drivers/usb/common/Makefile | 1 + drivers/usb/common/roles.c | 305 +++++++++++++++++++++++++ include/linux/usb/role.h | 53 +++++ 5 files changed, 383 insertions(+) commit bdecb33af34f79cbfbb656661210f77c8b8b5b5f Author: Heikki Krogerus Date: Tue Mar 20 15:57:03 2018 +0300 usb: typec: API for controlling USB Type-C Multiplexers USB Type-C connectors consist of various muxes and switches that route the pins on the connector to the right locations. The USB Type-C drivers need to be able to control the muxes, as they are the ones that know things like the cable plug orientation, and the current mode that was negotiated with the partner. This introduces a small API for registering and controlling cable plug orientation switches, and separate small API for registering and controlling pin multiplexer/demultiplexer switches that are needed with Accessory/Alternate Modes. Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/usb/typec.rst | 73 +- drivers/usb/typec/Makefile | 1 + drivers/usb/typec/class.c | 1435 ++++++++++++++++++++++++++++++++ drivers/usb/typec/mux.c | 191 +++++ drivers/usb/typec/typec.c | 1365 ------------------------------ include/linux/usb/typec.h | 14 + include/linux/usb/typec_mux.h | 55 ++ 7 files changed, 1758 insertions(+), 1376 deletions(-) commit 6c994c504fa21843c667edece593dbfa4634b046 Author: Fengguang Wu Date: Wed Mar 7 09:42:40 2018 -0600 PCI: v3-semi: Remove unnecessary semicolon drivers/pci/host/pci-v3-semi.c:676:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Fengguang Wu Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Linus Walleij drivers/pci/host/pci-v3-semi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d17086728ca115cdb7efa40f9f4e0092648fee41 Author: Fengguang Wu Date: Wed Mar 7 09:42:39 2018 -0600 PCI: rcar: Remove unnecessary semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi drivers/pci/host/pcie-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 492d98e4f8b37ab802274c33386da36e801e9f64 Author: Fengguang Wu Date: Tue Mar 20 17:17:23 2018 +0000 PCI: faraday: Make struct faraday_pci_variant static This was generated from 0-day builder. Signed-off-by: Fengguang Wu [lorenzo.pieralisi@arm.com: reworked/split patch] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Linus Walleij drivers/pci/host/pci-ftpci100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6ec1cbf6b12531a794bbc007fbf6e74edf7fc93c Author: Hans Verkuil Date: Tue Mar 6 16:20:00 2018 -0500 media: cec: improve CEC pin event handling It turns out that the struct cec_fh event buffer size of 64 events (64 for CEC_EVENT_PIN_CEC_LOW and 64 for _HIGH) is too small. It's about 160 ms worth of events and if the Raspberry Pi is busy, then it might take too long for the application to be scheduled so that it can drain the pending events. Increase these buffers to 800 events which is at least 2 seconds worth of events. There is also a FIFO in between the interrupt and the cec-pin thread. The thread passes the events on to the CEC core. It is important that should this FIFO fill up the cec core will be informed that events have been lost so this can be communicated to the user by setting CEC_EVENT_FL_DROPPED_EVENTS. It is very hard to debug CEC problems if events were lost without informing the user of that fact. If events were dropped due to the FIFO filling up, then the debugfs status file will let you know how many events were dropped. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 8 +++++--- drivers/media/cec/cec-pin-priv.h | 10 +++++++--- drivers/media/cec/cec-pin.c | 31 +++++++++++++++++++++++-------- drivers/media/platform/vivid/vivid-cec.c | 8 ++++---- include/media/cec.h | 7 ++++--- 5 files changed, 43 insertions(+), 21 deletions(-) commit 2b76e5392d0647c35226b464269b87026578ea83 Author: Hans Verkuil Date: Thu Mar 1 02:02:24 2018 -0500 media: cec-pin: improve status log Keep track of the number of short or long start bits, the number of short or long data bits and the number of initiated or detected low drive conditions. Show this information in the status debugfs log. Helpful when debugging, particularly when doing error injection as well. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-pin-priv.h | 13 +++++++++ drivers/media/cec/cec-pin.c | 58 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 68 insertions(+), 3 deletions(-) commit f2d9b66d84f3ff5ea3aff111e6a403e04fa8bf37 Author: Heikki Krogerus Date: Tue Mar 20 15:57:02 2018 +0300 drivers: base: Unified device connection lookup Several frameworks - clk, gpio, phy, pmw, etc. - maintain lookup tables for describing connections and provide custom API for handling them. This introduces a single generic lookup table and API for the connections. The motivation for this commit is centralizing the connection lookup, but the goal is to ultimately extract the connection descriptions also from firmware by using the fwnode_graph_* functions and other mechanisms that are available. Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/device_connection.rst | 43 ++++++++ drivers/base/Makefile | 3 +- drivers/base/devcon.c | 136 +++++++++++++++++++++++++ include/linux/device.h | 22 ++++ 4 files changed, 203 insertions(+), 1 deletion(-) commit 2699126bcf18db672451b82b26a1c8e954784fad Author: Shuah Khan Date: Wed Mar 21 20:21:56 2018 -0600 usbip: tools: usbipd: exclude exported devices from exportable device list usbipd includes exported devices in response to exportable device list. Exclude exported devices from exportable device list to avoid: - import requests for devices that are exported only to fail the request. - revealing devices that are imported by a client to another client. Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/src/usbipd.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 1cbd53c8cd85a63383a075347abee8f6e3f14fbe Author: Richard Leitner Date: Tue Mar 20 11:17:13 2018 +0100 usb: core: introduce per-port over-current counters For some userspace applications information on the number of over-current conditions at specific USB hub ports is relevant. In our case we have a series of USB hardware (using the cp210x driver) which communicates using a proprietary protocol. These devices sometimes trigger an over-current situation on some hubs. In case of such an over-current situation the USB devices offer an interface for reducing the max used power. As these conditions are quite rare and imply performance reductions of the device we don't want to reduce the max power always. Therefore give user-space applications the possibility to react adequately by introducing an over_current_counter in the usb port struct which is exported via sysfs. Signed-off-by: Richard Leitner Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-bus-usb | 10 ++++++++++ drivers/usb/core/hub.c | 4 +++- drivers/usb/core/hub.h | 1 + drivers/usb/core/port.c | 10 ++++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) commit 865463fc03ed6d1685d19dbef847b0e7abcc7fbf Author: Hans Verkuil Date: Tue Oct 31 09:55:09 2017 -0400 media: cec-pin: add error injection support Implement all the error injection commands. The state machine gets new states for the various error situations, helper functions are added to detect whether an error injection is active and the actual error injections are implemented. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-pin-priv.h | 38 ++- drivers/media/cec/cec-pin.c | 548 +++++++++++++++++++++++++++++++++++---- 2 files changed, 527 insertions(+), 59 deletions(-) commit 22712b389e40ae0fa0526db8ca8b34bf8f787abf Author: Hans Verkuil Date: Tue Oct 31 09:55:09 2017 -0400 media: cec-pin-error-inj: parse/show error injection Add support to the CEC Pin framework to parse error injection commands and to show them. The next patch will do the actual implementation of this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/Kconfig | 6 + drivers/media/cec/Makefile | 4 + drivers/media/cec/cec-pin-error-inj.c | 342 ++++++++++++++++++++++++++++++++++ drivers/media/cec/cec-pin-priv.h | 71 +++++++ drivers/media/cec/cec-pin.c | 6 + 5 files changed, 429 insertions(+) commit 0ee492ad54d779e901133fcf381389e6d1067db6 Author: Hans Verkuil Date: Tue Oct 31 09:55:09 2017 -0400 media: cec-pin: create cec_pin_start_timer() function This function will be needed for injecting a custom pulse. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-pin-priv.h | 2 ++ drivers/media/cec/cec-pin.c | 21 +++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) commit 6902c88a4635360a4e0edfb1800bfa938b9119c4 Author: Hans Verkuil Date: Sun Feb 25 06:05:55 2018 -0500 media: cec-core.rst: document the error injection ops Document the new core error injection callbacks. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/cec-core.rst | 72 ++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) commit 9ca400c18ff1100a52411952d24bc4c4a15facc3 Author: Hans Verkuil Date: Tue Oct 31 09:55:09 2017 -0400 media: cec: add core error injection support Add two new ops (error_inj_show and error_inj_parse_line) to support error injection functionality for CEC adapters. If both are present, then the core will add a new error-inj debugfs file that can be used to see the current error injection commands and to set error injection commands. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-core.c | 58 ++++++++++++++++++++++++++++++++++++++++++++ include/media/cec.h | 5 ++++ 2 files changed, 63 insertions(+) commit f7b0fa6923179c51cdba0b23c0ffe9efb9e14048 Author: Sean Young Date: Thu Mar 22 06:41:16 2018 -0400 media: rc docs: fix warning for RC_PROTO_IMON This protocol was recently added and causes warnings. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Documentation/media/lirc.h.rst.exceptions | 1 + 1 file changed, 1 insertion(+) commit 93eaf301a7d2c992595baf54c1ae8b835c7bf4df Author: Mauro Carvalho Chehab Date: Thu Mar 22 07:23:48 2018 -0400 media: s5p_mfc_enc: get rid of new warnings The values of enc_y_addr and enc_c_addr are initialized by s5p_mfc_hw_call(), but, in thesis, this macro might be doing nothing, if the get_enc_frame_buffer() is not declared. That causes those GCC warnings: drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1242 enc_post_frame_start() error: uninitialized symbol 'enc_y_addr'. drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1243 enc_post_frame_start() error: uninitialized symbol 'enc_c_addr'. drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1256 enc_post_frame_start() error: uninitialized symbol 'enc_y_addr'. drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1257 enc_post_frame_start() error: uninitialized symbol 'enc_c_addr'. Change the logic by initializing those constants to zero, with should hopefully do the right thing. Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 740ba614c9727660f99d7d924987dfef8a437698 Author: Sylwester Nawrocki Date: Mon Mar 19 10:29:58 2018 -0400 media: s5p-mfc: Amend initial min, max values of HEVC hierarchical coding QP controls Valid range for those controls is specified in documentation as [0, 51], so initialize the controls to such range rather than [INT_MIN, INT_MAX]. Signed-off-by: Sylwester Nawrocki Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 11b7090d8088e0ecaec4a48d5477f91b840d585b Author: Sylwester Nawrocki Date: Mon Mar 19 10:29:16 2018 -0400 media: s5p-mfc: Ensure HEVC QP controls range is properly updated When value of V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP or V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP controls is changed we should update range of a set of HEVC quantization parameter v4l2 controls as specified in the HEVC controls documentation. Signed-off-by: Sylwester Nawrocki Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit c8e6f90d825166c7b41a1da081358bba658c4fad Author: Marek Szyprowski Date: Tue Mar 13 06:27:10 2018 -0400 media: s5p-mfc: Use real device for request_firmware() call Provide proper (real) struct device to request_firmware() call. This fixes following error messages: (NULL device *): Direct firmware load for s5p-mfc-v6-v2.fw failed with error -2 (NULL device *): Direct firmware load for s5p-mfc-v6.fw failed with error -2 into a bit more meaningful ones: s5p-mfc 11000000.codec: Direct firmware load for s5p-mfc-v6-v2.fw failed with error -2 s5p-mfc 11000000.codec: Direct firmware load for s5p-mfc-v6.fw failed with error -2 Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ce7f6aaf1fd2b03cd39848c5142c618b062e351 Author: Smitha T Murthy Date: Fri Feb 2 07:25:47 2018 -0500 media: s5p-mfc: Add support for HEVC encoder Add HEVC encoder support and necessary registers, V4L2 CIDs, and hevc encoder parameters Signed-off-by: Smitha T Murthy Acked-by: Hans Verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/regs-mfc-v10.h | 28 +- drivers/media/platform/s5p-mfc/s5p_mfc.c | 1 + drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c | 3 + drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 54 ++- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 536 ++++++++++++++++++++++++ drivers/media/platform/s5p-mfc/s5p_mfc_opr.h | 8 + drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 182 ++++++++ drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.h | 8 + 8 files changed, 818 insertions(+), 2 deletions(-) commit fc92b92a04dd8cffccdc3173361c64e96985f5a1 Author: Smitha T Murthy Date: Fri Feb 2 07:25:45 2018 -0500 media: s5p-mfc: Add VP9 decoder support Add support for codec definition and corresponding buffer requirements for VP9 decoder. Signed-off-by: Smitha T Murthy Reviewed-by: Andrzej Hajda Acked-by: Hans Verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/regs-mfc-v10.h | 6 ++++++ drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c | 3 +++ drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 1 + drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 7 +++++++ drivers/media/platform/s5p-mfc/s5p_mfc_opr.h | 2 ++ drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 26 +++++++++++++++++++++++++ 6 files changed, 45 insertions(+) commit c9fcd51c167651a34ab0e0d39f39565a44712f57 Author: Smitha T Murthy Date: Fri Feb 2 07:25:44 2018 -0500 media: s5p-mfc: Add support for HEVC decoder Add support for codec definition and corresponding buffer requirements for HEVC decoder. Signed-off-by: Smitha T Murthy Reviewed-by: Andrzej Hajda Acked-by: Hans Verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/regs-mfc-v10.h | 1 + drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c | 3 +++ drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 1 + drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 7 +++++++ drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 17 +++++++++++++++-- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.h | 3 +++ 6 files changed, 30 insertions(+), 2 deletions(-) commit 1c700fa76b8d62c405974192b51f1899d30add17 Author: Smitha T Murthy Date: Fri Feb 2 07:25:40 2018 -0500 media: s5p-mfc: Support MFCv10.10 buffer requirements Aligning the luma_dpb_size, chroma_dpb_size, mv_size and me_buffer_size for MFCv10.10. Signed-off-by: Smitha T Murthy Reviewed-by: Andrzej Hajda Acked-by: Kamil Debski Acked-by: Hans Verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/regs-mfc-v10.h | 19 +++++ drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 93 +++++++++++++++++++------ drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.h | 2 + 3 files changed, 94 insertions(+), 20 deletions(-) commit c8ffbd433a77122501197f456fb4acd59d38456b Author: Smitha T Murthy Date: Fri Feb 2 07:25:39 2018 -0500 media: s5p-mfc: Use min scratch buffer size as provided by F/W After MFC v8.0, mfc f/w lets the driver know how much scratch buffer size is required for decoder. If mfc f/w has the functionality, E_MIN_SCRATCH_BUFFER_SIZE, driver can know how much scratch buffer size is required for encoder too. Signed-off-by: Smitha T Murthy Reviewed-by: Andrzej Hajda Acked-by: Hans Verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/regs-mfc-v8.h | 2 + drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 + drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 1 + drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 5 ++ drivers/media/platform/s5p-mfc/s5p_mfc_opr.h | 4 ++ drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 68 ++++++++++++++++++------- 6 files changed, 65 insertions(+), 17 deletions(-) commit 43bfefedd0281ef476f8154397cd283a710d8baf Author: Thomas Hellstrom Date: Thu Mar 22 11:14:34 2018 +0100 drm/vmwgfx: Bump version patchlevel and date Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 37efe80ce85f76b3b30d7b4ea40550e6a5a5b71a Author: Arnd Bergmann Date: Tue Jan 16 18:18:43 2018 +0100 drm/vmwgfx: use monotonic event timestamps DRM_VMW_EVENT_FENCE_SIGNALED (struct drm_vmw_event_fence) and DRM_EVENT_VBLANK (struct drm_event_vblank) pass timestamps in 32-bit seconds/microseconds format. As of commit c61eef726a78 ("drm: add support for monotonic vblank timestamps"), other DRM drivers use monotonic times for drm_event_vblank, but vmwgfx still uses CLOCK_REALTIME for both events, which suffers from the y2038/y2106 overflow as well as time jumps. For consistency, this changes vmwgfx to use ktime_get_ts64 as well, which solves those problems and avoids the deprecated do_gettimeofday() function. This should be transparent to to user space, as long as it doesn't compare the time against the result of gettimeofday(). Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 20fb5a635a0c8478ac98f15cfafc2ea83df29565 Author: Thomas Hellstrom Date: Thu Mar 22 10:35:18 2018 +0100 drm/vmwgfx: Unpin the screen object backup buffer when not used We were relying on the pinned screen object backup buffer to be destroyed when not used. But if we hold a copy of the atomic state, like when hibernating, the backup buffer might not be destroyed since it's refcounted by the atomic state. This causes us to hibernate with a buffer pinned in VRAM. Fix this by only having the buffer pinned when it is actually used by a screen object. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 89dc15b76fd3b57d0b7d3bd3556bd6fa514e0257 Author: Thomas Hellstrom Date: Thu Mar 22 10:34:00 2018 +0100 drm/vmwgfx: Stricter count of legacy surface device resources For legacy surfaces, they were previously registered as device resources when the driver resources were created. Since they are evictable we instead register them as device resources once they are created on the device, just like for guest-backed surfaces. This has implications during hibernation where we can't hibernate with device resources active. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Deepak Rawat Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 6073a09210e06f39adabd682c282b3ee14c3d33d Author: Himanshu Jha Date: Thu Mar 22 10:33:03 2018 +0100 drm/vmwgfx: Use kasprintf Use kasprintf instead of combination of kmalloc and sprintf. Also, remove the local variables used for storing the string length as they are not required now. Signed-off-by: Himanshu Jha Reviewed-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 4e3e733b45df457147441b79cf2cb654c82ec402 Author: Thomas Hellstrom Date: Thu Mar 22 10:30:19 2018 +0100 drm/vmwgfx: Get rid of the device-private suspended member It was used to early block fbdev dirty processing. Replace it with an unprotected check of the par->dirty.active field. While this might race with the vmw_fb_off() function, we do a protected check later so the race will at worst lead to grabbing and releasing a couple of locks. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 3 --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) commit c3b9b165734492b7e42bdd898aba93e1120f9084 Author: Thomas Hellstrom Date: Thu Mar 22 10:26:37 2018 +0100 drm/vmwgfx: Improve on hibernation Make it possible to hibernate also with masters that don't switch VT at hibernation time. We save and restore modesetting state unless fbdev is active and enabled at hibernation time. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 75 +++++++++++++++++++++++++------------ drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 5 +++ drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 35 ++++++++++++----- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 48 ++++++++++++++++++++++++ 4 files changed, 130 insertions(+), 33 deletions(-) commit bf833fd36f9bdc2c86e1fdc90318e4c99b452472 Author: Thomas Hellstrom Date: Thu Mar 22 10:19:01 2018 +0100 drm/vmwgfx: Avoid pinning fbdev framebuffers fbdev framebuffers were previously pinned to be able to keep them mapped across updates. This commit introduces a mechanism that instead revalidates the map on each update, keeping the map cached across updates. The cached map is torn down if the underlying pages change. Typically on buffer object moves and swapouts. This should be nicer to the system when we have resource contention. Testing done: Basic fbdev functionality under Fedora 27. Signed-off-by: Thomas Hellstrom Signed-off-by: Sinclair Yeh Reviewed-by: Brian Paul Reviewed-by: Deepak Rawat drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c | 51 ++++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 5 +++ drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 67 +++++++++----------------------- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 23 +++++++++++ 5 files changed, 98 insertions(+), 49 deletions(-) commit dc366364c4ef809dccd063919314301f8ba01ac2 Author: Thomas Hellstrom Date: Thu Mar 22 10:15:23 2018 +0100 drm/vmwgfx: Fix multiple command buffer context use The start / stop and preempt commands don't honor the context argument but rather acts on all available contexts. Also add detection for context 1 availability. Note that currently there's no driver interface for submitting buffers using the high-priority command queue (context 1). Testing done: Change the default context for command submission to 1 instead of 0, verify basic desktop functionality including faulty command injection and recovery. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Deepak Rawat drivers/gpu/drm/vmwgfx/device_include/svga_reg.h | 12 ++++- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 57 +++++++++++------------- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 + 3 files changed, 38 insertions(+), 33 deletions(-) commit ef86cfee7d74baf2e3b883871087a684acecb595 Author: Thomas Hellstrom Date: Tue Jan 16 11:07:30 2018 +0100 drm/vmwgfx: Use the cpu blit utility for framebuffer to screen target blits This blit was previously performed using two large vmaps, one of which was teared down and remapped on each blit. Use the more resource- conserving TTM cpu blit instead. The blit is used in boundary-box computing mode which makes it possible to minimize the bounding box used in host operations. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | 23 ++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 50 ++++++++++------ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 5 +- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 105 +++++++++++---------------------- 6 files changed, 97 insertions(+), 91 deletions(-) commit 79273e1b7eb0e2007c5a9cae71af31075df8e6c5 Author: Thomas Hellstrom Date: Tue Jan 16 09:33:27 2018 +0100 drm/vmwgfx: Add a cpu blit utility that can be used for page-backed bos The utility uses kmap_atomic() instead of vmapping the whole buffer object. As a result there will be more book-keeping but on some architectures this will help avoid exhausting vmalloc space and also avoid expensive TLB flushes. The blit utility also adds a provision to compute a bounding box of changed content, which is very useful to optimize presentation speed of ill-behaved applications that don't supply proper damage regions, and for page-flips. The cost of computing the bounding box is not that expensive when done in a cpu-blit utility like this. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul drivers/gpu/drm/vmwgfx/Makefile | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_blit.c | 506 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 48 ++++ 3 files changed, 555 insertions(+), 1 deletion(-) commit b1394dc151cba4c50316ea43136b28de541c043b Author: Smitha T Murthy Date: Fri Feb 2 07:25:38 2018 -0500 media: s5p-mfc: Adding initial support for MFC v10.10 Adding the support for MFC v10.10, with new register file and necessary hw control, decoder, encoder and structural changes. Signed-off-by: Smitha T Murthy Reviewed-by: Andrzej Hajda Acked-by: Rob Herring Acked-by: Hans Verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/s5p-mfc.txt | 1 + drivers/media/platform/s5p-mfc/regs-mfc-v10.h | 35 ++++++++++++++++++++++ drivers/media/platform/s5p-mfc/s5p_mfc.c | 25 ++++++++++++++++ drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 9 +++++- drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 4 +++ drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 32 ++++++++------------ drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 16 ++++------ drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 9 ++++-- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.h | 2 ++ 9 files changed, 100 insertions(+), 33 deletions(-) commit f1a355bf9e2e32e4c1584ff4e78129bb052a2741 Author: Smitha T Murthy Date: Fri Feb 2 07:25:37 2018 -0500 media: s5p-mfc: Rename IS_MFCV8 macro This patch renames macro IS_MFCV8 to IS_MFCV8_PLUS so that the MFCv8 code can be resued for MFCv10.10 support. Since the MFCv8 specific code holds good for MFC v10.10 also. Signed-off-by: Smitha T Murthy Acked-by: Andrzej Hajda Acked-by: Hans Verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 2 +- drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 2 +- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 2 +- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 18 +++++++++--------- 4 files changed, 12 insertions(+), 12 deletions(-) commit 2f710c1bb666ffd68ed44db190238d4660766f2d Author: Linus Walleij Date: Thu Mar 22 11:22:24 2018 +0100 usb: phy: ab8500: Drop AB8540/9540 support The AB8540 was an evolved version of the AB8500, but it was never mass produced or put into products, only reference designs exist. The upstream support was never completed and it is unlikely that this will happen so drop the support for now to simplify maintenance of the AB8500. Cc: Loic Pallardy Signed-off-by: Linus Walleij Signed-off-by: Felipe Balbi drivers/usb/phy/phy-ab8500-usb.c | 506 --------------------------------------- 1 file changed, 506 deletions(-) commit 575c29bc9d9e37debffb01ee83dcb625f71e929a Author: Mauro Carvalho Chehab Date: Thu Mar 22 06:47:46 2018 -0400 media: extended-controls.rst: don't use adjustbox LaTeX adjustbox is known to cause pdf documentation build breakages with some newer Sphinx versions. So, don't use it. While here, adjust table sizes in order to better produce the pdf output. Fixes: c0da55b95bd9 ("media: v4l2: Documentation for HEVC CIDs") Cc: Smitha T Murthy Cc: Hans Verkuil Cc: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/extended-controls.rst | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) commit c0da55b95bd9818496cee1d312ce98f379f903e9 Author: Smitha T Murthy Date: Fri Feb 2 07:25:48 2018 -0500 media: v4l2: Documentation for HEVC CIDs Added V4L2 controls for HEVC encoder. with V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10 to match the code. [s.nawrocki@samsung.com]: Replaced V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN10 Signed-off-by: Smitha T Murthy Acked-by: Hans Verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/extended-controls.rst | 410 +++++++++++++++++++++ 1 file changed, 410 insertions(+) commit 2c02837bd99cda8e4f8b9cb5ea74956242b5c851 Author: Smitha T Murthy Date: Fri Feb 2 07:25:46 2018 -0500 media: v4l2: Add v4l2 control IDs for HEVC encoder Add v4l2 controls for HEVC encoder Signed-off-by: Smitha T Murthy Reviewed-by: Andrzej Hajda Acked-by: Hans Verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 119 +++++++++++++++++++++++++++++++++++ include/uapi/linux/v4l2-controls.h | 93 ++++++++++++++++++++++++++- 2 files changed, 211 insertions(+), 1 deletion(-) commit 49f607521f981e348a285113728a7a44b826ffa1 Author: Smitha T Murthy Date: Fri Feb 2 07:25:43 2018 -0500 media: v4l2: Documentation of HEVC compressed format Add V4L2 definition for HEVC compressed format which is also known as H.265. Signed-off-by: Smitha T Murthy Reviewed-by: Andrzej Hajda Reviewed-by: Stanimir Varbanov Acked-by: Hans Verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-compressed.rst | 5 +++++ 1 file changed, 5 insertions(+) commit 1c791727b73c190494a96789486e282945775d49 Author: Smitha T Murthy Date: Fri Feb 2 07:25:42 2018 -0500 media: v4l2-ioctl: add HEVC format description HEVC is a video coding format Signed-off-by: Smitha T Murthy Reviewed-by: Stanimir Varbanov Acked-by: Hans Verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ioctl.c | 1 + 1 file changed, 1 insertion(+) commit 53b2534551f179dcd065b4ead79fa1327678a0e0 Author: Smitha T Murthy Date: Fri Feb 2 07:25:41 2018 -0500 media: videodev2.h: Add v4l2 definition for HEVC Add V4L2 definition for HEVC compressed format Signed-off-by: Smitha T Murthy Reviewed-by: Andrzej Hajda Reviewed-by: Stanimir Varbanov Acked-by: Hans Verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/videodev2.h | 1 + 1 file changed, 1 insertion(+) commit dc9aec795f53c0cff46ee03e28309f75637b5f60 Author: Niklas Söderlund Date: Tue Mar 13 22:49:10 2018 -0400 media: rcar-vin: use scratch buffer and always run in continuous mode Instead of switching capture mode depending on how many buffers are available use a scratch buffer and always run in continuous mode. By using a scratch buffer the responsiveness of the capture loop is increased as it can keep running even if there are no buffers available from userspace. As soon as a userspace queues a buffer it is inserted into the capture loop and returned as soon as it is filled. This is a improvement on the previous logic where the whole capture loop was stopped and switched to single capture mode if userspace did not feed the VIN driver buffers at the same time it consumed them. To make matters worse it was difficult for the driver to reenter continuous mode if it entered single mode even if userspace started to queue buffers faster. This resulted in suboptimal performance where if userspace where delayed for a short period the ongoing capture would be slowed down and run in single mode until the capturing process where restarted. An additional effect of this change is that the capture logic can be made much simple as we know that continuous mode will always be used. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-dma.c | 187 ++++++++--------------------- drivers/media/platform/rcar-vin/rcar-vin.h | 6 +- 2 files changed, 52 insertions(+), 141 deletions(-) commit 6a8ffa8b4c519419f7b926904f02c8d1fec5b488 Author: Niklas Söderlund Date: Tue Mar 13 22:49:09 2018 -0400 media: rcar-vin: allocate a scratch buffer at stream start Before starting a capture, allocate a scratch buffer which can be used by the driver to give to the hardware if no buffers are available from userspace. The buffer is not used in this patch but prepares for future refactoring where the scratch buffer can be used to avoid the need to fallback on single capture mode if userspace can't queue buffers as fast as the VIN driver consumes them. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-dma.c | 19 +++++++++++++++++++ drivers/media/platform/rcar-vin/rcar-vin.h | 4 ++++ 2 files changed, 23 insertions(+) commit 579260a5ef48703570acf56c0ceb63aea720784b Author: Hans Verkuil Date: Tue Mar 13 14:34:12 2018 -0400 media: pixfmt-v4l2.rst: fix broken enum :c:type :c:type:: -> :c:type: Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-v4l2.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0dee3c6a611b6bd6b613da04bfab9ca64550853e Author: Hans Verkuil Date: Tue Mar 13 14:29:36 2018 -0400 media: imx.rst: fix typo Multpiple -> Multiple Signed-off-by: Hans Verkuil Acked-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/imx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 492b183bd7bcaede57381f4d06e19f1983083781 Author: Arnd Bergmann Date: Tue Mar 13 09:06:03 2018 -0400 media: ngene: avoid unused variable warning The newly added pdev variable is only used in an #ifdef, causing a build warning without CONFIG_PCI_MSI, unless we move the declaration inside the same #ifdef: drivers/media/pci/ngene/ngene-core.c: In function 'ngene_start': drivers/media/pci/ngene/ngene-core.c:1328:17: error: unused variable 'pdev' [-Werror=unused-variable] Fixes: 6795bf626482 ("media: ngene: convert kernellog printing from printk() to dev_*() macros") Signed-off-by: Arnd Bergmann Acked-by: Daniel Scheller Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9fbc5a3245f8b32ef941e39597ba7b5e15b07376 Author: Arnd Bergmann Date: Tue Mar 13 08:05:36 2018 -0400 media: v4l: omap_vout: vrfb: remove an unused variable We now get a warning after the 'dmadev' variable is no longer used: drivers/media/platform/omap/omap_vout_vrfb.c: In function 'omap_vout_prepare_vrfb': drivers/media/platform/omap/omap_vout_vrfb.c:239:21: error: unused variable 'dmadev' [-Werror=unused-variable] Fixes: 8f0aa38292f2 ("media: v4l: omap_vout: vrfb: Use the wrapper for prep_interleaved_dma()") Signed-off-by: Arnd Bergmann Reviewed-by: Peter Ujfalusi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap/omap_vout_vrfb.c | 1 - 1 file changed, 1 deletion(-) commit 2c000f4dbab0fae81ca7717b3fe5d0baa16483d1 Author: Daniel Scheller Date: Sat Mar 10 07:24:43 2018 -0500 media: ttpci: improve printing of encoded MAC address When loading the budget_av driver for ie. a KNC1 DVB-C TDA10024 card, which makes use of the ttpci eeprom check functionality (that always fails on these cards, but that's no issue at all), this is printed to the kernel log: [ 10.497333] saa7146 (0): dma buffer size 192512 [ 10.497335] dvbdev: DVB: registering new adapter (KNC1 DVB-C TDA10024) [ 10.545007] adapter failed MAC signature check [ 10.545009] encoded MAC from EEPROM was [ 10.545010] ff: [ 10.545011] ff: [ 10.545011] ff: ... [ 10.545021] ff [ 10.832422] budget_av: KNC1-4: MAC addr = 00:09:d6:6d:b3:be with the 'ff' being repeated for a total of 20 times. Improve that by using the %*phC format specifier instead dprintk()'ing every byte of the encoded MAC separately. This obsoletes the int i, and the kernel log looks cleaner: [ 3234.383153] saa7146 (0): dma buffer size 192512 [ 3234.383154] dvbdev: DVB: registering new adapter (KNC1 DVB-C TDA10024) [ 3234.428745] adapter failed MAC signature check [ 3234.428747] encoded MAC from EEPROM was ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff [ 3234.728194] budget_av: KNC1-0: MAC addr = 00:09:d6:6d:b3:be Signed-off-by: Daniel Scheller Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ttpci/ttpci-eeprom.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit e734016dd33ac35a4608ea5117cb28d6b45f5bd5 Author: Fengguang Wu Date: Tue Mar 20 17:12:12 2018 +0000 PCI: kirin: Make struct kirin_pcie_driver static This was generated from 0-day builder. Signed-off-by: Fengguang Wu [robh: add commit msg] Signed-off-by: Rob Herring [lorenzo.pieralisi@arm.com: reworked the commit log] Signed-off-by: Lorenzo Pieralisi drivers/pci/dwc/pcie-kirin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3a5f7366e02e2291c8940fa7c3fdf7f9979589c Author: Guennadi Liakhovetski Date: Fri Mar 9 12:01:08 2018 -0500 media: V4L: remove myself as soc-camera maintainer The soc-camera framework is deprecated, patches for it are very rare and only contain trivial clean up. Further I haven't got any more soc-camera systems running modern kernels. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1dd5e986a9b9794a314ee59aca3fbbbf209c2076 Author: Geert Uytterhoeven Date: Fri Mar 9 04:34:40 2018 -0500 media: dt-bindings: media: rcar_vin: Use status "okay" According to the Devicetree Specification, "ok" is not a valid status. Fixes: 47c71bd61b772cd7 ("[media] rcar_vin: add devicetree support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/rcar_vin.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c11fcf1a74d338774faa059b0aea24264c95658 Author: Thomas Hellstrom Date: Tue Jan 16 09:12:05 2018 +0100 drm/ttm: Export the ttm_k[un]map_atomic_prot API. It will be used by vmwgfx cpu blit. Reviewed-by: Christian König Reviewed-by: Brian Paul Signed-off-by: Thomas Hellstrom drivers/gpu/drm/ttm/ttm_bo_util.c | 31 ++++++++++++++++++++++++++----- include/drm/ttm/ttm_bo_api.h | 4 ++++ 2 files changed, 30 insertions(+), 5 deletions(-) commit 403c1826a456441ee983acefbd03ce7d73d1ff00 Author: Thomas Hellstrom Date: Tue Jan 16 09:02:03 2018 +0100 drm/ttm: Clean up kmap_atomic_prot selection code Use helpers to perform the kmap_atomic_prot() functionality to a) Avoid in-function ifdefs that violate the kernel coding policy, b) Facilitate exporting the functionality. This commit should not change any functionality. Reviewed-by: Christian König Signed-off-by: Thomas Hellstrom drivers/gpu/drm/ttm/ttm_bo_util.c | 64 +++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 33 deletions(-) commit 4ed75c3e525598ff1aa6aed09c419c73a4efd2f2 Author: Lucas Stach Date: Fri Mar 9 14:29:26 2018 +0100 drm/etnaviv: bump HW job limit to 4 The current limit of 2 leads to some GPU idle times, as the usual IRQ latency leads to up to 3 jobs getting signaled at once with some standard workloads. A larger HW job limit might lead to slightly worse QoS, but we accept that to not sacrifice GPU throughput in the common case. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25db875401c8aaac31a6650cb80a56cc78852694 Author: Thomas Hellstrom Date: Tue Jan 16 08:54:30 2018 +0100 drm/vmwgfx: Cursor update fixes Use drm_plane_helper_check_update also for the cursor plane. Some applications, like gdm on gnome shell still uses cursor front-buffer like rendering without notifying the kernel. We do need some kind of noficiation, but work around this for now by updating the cursor image on every cursor move. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 904efd9e3f4c8f288b1279a316eed8e177190c8f Author: Deepak Rawat Date: Tue Jan 16 08:48:09 2018 +0100 drm/vmwgfx: Send the correct nonblock option for atomic_commit Page flip can be slow for vmwgfx in some cases, like need to do surface copy to different surface or waiting for IN_FENCE_FD. Enabling nonblocking commits for vmwgfx in case userspace request it. Signed-off-by: Deepak Rawat Reviewed-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) commit ac3069e67f5659131d7ac5f54d966005bbc40af8 Author: Deepak Rawat Date: Tue Jan 16 08:44:42 2018 +0100 drm/vmwgfx: Move the stdu vblank event to atomic function Atomic ioctl can also send the same page flip flags as legacy ioctl. In those cases also need to send the vblank event to userspace. vmwgfx does not support flag DRM_MODE_PAGE_FLIP_ASYNC, so this flag is never expected. Signed-off-by: Deepak Rawat Reviewed-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 141 +++++++++++++++++++---------------- 1 file changed, 77 insertions(+), 64 deletions(-) commit aa64b3f18aeb2cc4b74e69115df434147f1ed96c Author: Deepak Rawat Date: Tue Jan 16 08:31:04 2018 +0100 drm/vmwgfx: Move screen object page flip to atomic function The dmabuf_dirty/surface_dirty in case of screen object is moved to plane atomic update, so that page flip in atomic ioctl also works. vmwgfx does not support DRM_MODE_PAGE_FLIP_ASYNC, so this flag is never expected. Signed-off-by: Deepak Rawat Reviewed-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 114 ++++++++++++++++++++--------------- 1 file changed, 64 insertions(+), 50 deletions(-) commit 3cbe87fcf026e4cdae6719511267ef020256bf5c Author: Deepak Rawat Date: Tue Jan 16 08:27:17 2018 +0100 drm/vmwgfx: Remove drm_crtc_arm_vblank_event from atomic flush The function drm_crtc_arm_vblank_event should be used for the driver which have vblank interrupt support. In case of vmwgfx we do not have vblank interrupt. Signed-off-by: Deepak Rawat Reviewed-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 4e2f9fa7ffb5324adfc62fa3da6e1e36827fd5ad Author: Deepak Rawat Date: Tue Jan 16 08:25:55 2018 +0100 drm/vmwgfx: Move surface copy cmd to atomic function When display surface is different than the framebuffer surface, atomic path do not copy the surface data. This commit moved the code to copy surface from legacy to atomic path. Signed-off-by: Deepak Rawat Reviewed-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 47 +++++++++++++++++------------------- 1 file changed, 22 insertions(+), 25 deletions(-) commit 91e9f352cd1b79772b4883fd31e04655d4a97318 Author: Deepak Rawat Date: Tue Jan 16 08:24:17 2018 +0100 drm/vmwgfx: Avoid iterating over display unit if crtc is available In case of page flip there is no need to iterate over all display unit in the function "vmw_kms_helper_dirty". If crtc is available then dirty commands is performed on that crtc only. Signed-off-by: Deepak Rawat Reviewed-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 31 +++++++++++++++++++------------ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 17 ++++++++++++----- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 19 ++++++++++++++----- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 15 +++++++++++---- 4 files changed, 56 insertions(+), 26 deletions(-) commit 4472f0fc248e3f0573301f725eff9dc9cde5cb62 Author: Masaharu Hayakawa Date: Tue Mar 20 22:42:58 2018 +0100 mmc: renesas_sdhi: replace EXT_ACC with HOST_MODE All our documentation says HOST_MODE, we don't really know where EXT_ACC came from. Rename it to reduce the confusion. Signed-off-by: Masaharu Hayakawa Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8647d26eb3f19ab0fa29f68a8bf648054c21e4bc Author: Joel Cunningham Date: Mon Mar 19 14:15:38 2018 +0000 mmc: update sdio_claim_irq documentation Update documentation for sdio_claim_irq to downgrade the wording about doing recursive claims in an IRQ handler from 'must not' to 'should not'. This clarifies that recursive claims are supported, but not the recommended (best) practice Signed-off-by: Joel Cunningham Signed-off-by: Ulf Hansson drivers/mmc/core/sdio_irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c5c685e58bab9a7f985c71b18302953d1c90b27 Author: Abbas Raza Date: Mon Mar 5 19:09:19 2018 +0530 mmc: Export host capabilities to debugfs. This patch exports the host capabilities to debugfs Signed-off-by: Abbas Raza Signed-off-by: Andrew Gabbasov [Harish: Added caps2, moved creation to mmc_add_host_debugfs] Signed-off-by: Harish Jenny K N Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/debugfs.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7d11c3ac66694097a1f409bc3559664c48390d73 Author: Roger Quadros Date: Fri Mar 16 16:44:27 2018 +0200 usb: dwc3: core: Fix broken system suspend/resume on AM437x On TI's AM437x, the DWC3 controller looses state after a system suspend/resume. We are re-initializing the controller but we miss restoring the PRTCAP register. This causes USB host to break on AM437x after a system suspend/resume. Fix this by restoring the PRTCAP register on system resume. Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 2f3090c6a8f24d92ea569b099c5bdb5679dcf08a Author: Thinh Nguyen Date: Fri Mar 16 15:35:57 2018 -0700 usb: dwc3: Check controller type before setting speed DWC_usb3 speed can only be set up to SuperSpeed. Limit the setting to SuperSpeed only should the value be higher. Otherwise, the controller will read an invalid speed value and set the device to an incorrect speed. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 80b776340c78cb2b5755e9a1a04add640c23b436 Author: Thinh Nguyen Date: Fri Mar 16 15:35:51 2018 -0700 usb: dwc3: Dump LSP and BMU debug info Dump LSP and BMU debug info. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 5 +++++ drivers/usb/dwc3/debugfs.c | 5 +++++ 2 files changed, 10 insertions(+) commit 938a5ad1d3055c6d3993e99557477f5cd5ce3f64 Author: Thinh Nguyen Date: Fri Mar 16 15:35:44 2018 -0700 usb: dwc3: Check for ESS TX/RX threshold config Check and configure TX/RX threshold for DWC_usb31. Update dwc3 structure with new fields to store these threshold configurations. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/dwc3/core.h | 8 +++++++ 2 files changed, 63 insertions(+) commit 48f80609e536bc9be12c64e4c6c69625baee7b02 Author: Thinh Nguyen Date: Fri Mar 16 15:35:38 2018 -0700 usb: dwc3: Make TX/RX threshold configurable DWC_usb31 periodic transfer at 48K+ bytes per interval may need modification to the TX/RX packet threshold to achieve optimal result. Add properties to make it configurable. By default, periodic ESS TX and RX threshold are not enabled. To enable TX or RX threshold (host mode only), both packet threshold count and max burst size properties must be set to a valid non-zero value 1-16. DWC_usb31 programming guide section 1.2.3 and 1.2.4. Cc: John Youn Reviewed-by: Rob Herring Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/dwc3.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 6743e817a4de3b70354dde588a3382f7202e5fa2 Author: Thinh Nguyen Date: Fri Mar 16 15:34:20 2018 -0700 usb: dwc3: Add DWC_usb31 GTXTHRCFG reg fields Add new GTXTHRCFG bit field macros for DWC_usb31. The GTXTHRCFG register fields for DWC_usb31 is as follows: +-------+--------------------------+-----------------------------------+ | BITS | Name | Description | +=======+==========================+===================================+ | 31:27 | reserved | | | 26 | UsbTxPktCntSel | Async ESS transmit packet | | | | threshold enable | | 25:21 | UsbTxPktCnt | Async ESS transmit packet | | | | threshold count | | 20:16 | UsbMaxTxBurstSize | Async ESS Max transmit burst size | | 15 | UsbTxThrNumPktSel_HS_Prd | HS high bandwidth periodic | | | | transmit packet threshold enable | | 14:13 | UsbTxThrNumPkt_HS_Prd | HS high bandwidth periodic | | | | transmit packet threshold count | | 12:11 | reserved | | | 10 | UsbTxThrNumPktSel_Prd | Periodic ESS transmit packet | | | | threshold enable | | 9:5 | UsbTxThrNumPkt_Prd | Periodic ESS transmit packet | | | | threshold count | | 4:0 | UsbMaxTxBurstSize_Prd | Max periodic ESS TX burst size | +-------+--------------------------+-----------------------------------+ Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 01b0e2cc7d89b6aa4084993634b3ea673caff4e8 Author: Thinh Nguyen Date: Fri Mar 16 15:34:13 2018 -0700 usb: dwc3: gadget: Check IP revision for GRXTHRCFG DWC_usb31 controller has a different UsbRxPktCnt bit fields from GRXTHRCFG register. Check for DWC_usb31 IP revision to read the appropriate value. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2fbc5bdc8fd1afa6d47223f6a4251f04c7d8fe7c Author: Thinh Nguyen Date: Fri Mar 16 15:34:07 2018 -0700 usb: dwc3: Add DWC_usb31 GRXTHRCFG bit fields Add new GRXTHRCFG bit field macros for DWC_usb31. The GRXTHRCFG register fields for DWC_usb31 is as follows: +-------+--------------------------+----------------------------------+ | BITS | Name | Description | +=======+==========================+==================================+ | 31:27 | reserved | | | 26 | UsbRxPktCntSel | Async ESS receive packet | | | | threshold enable | | 25:21 | UsbRxPktCnt | Async ESS receive packet | | | | threshold count | | 20:16 | UsbMaxRxBurstSize | Async ESS Max receive burst size | | 15 | UsbRxThrNumPktSel_HS_Prd | HS high bandwidth periodic | | | | receive packet threshold enable | | 14:13 | UsbRxThrNumPkt_HS_Prd | HS high bandwidth periodic | | | | receive packet threshold count | | 12:11 | reserved | | | 10 | UsbRxThrNumPktSel_Prd | Periodic ESS receive packet | | | | threshold enable | | 9:5 | UsbRxThrNumPkt_Prd | Periodic ESS receive packet | | | | threshold count | | 4:0 | UsbMaxRxBurstSize_Prd | Max periodic ESS RX burst size | +-------+--------------------------+----------------------------------+ Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d548a61767fad7a0e6d89b118daeed2f5b8a8c2f Author: Thinh Nguyen Date: Fri Mar 16 15:34:00 2018 -0700 usb: dwc3: Check IP revision for GTXFIFOSIZ DWC_usb31 controller has different GTXFIFOSIZE bit field for TXFDEF. Check for DWC_usb31 IP revision to read the appropriate bit fields. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0cab8d26d6e5e053b2bed3356992aaa71dc93628 Author: Thinh Nguyen Date: Fri Mar 16 15:33:54 2018 -0700 usb: dwc3: Update DWC_usb31 GTXFIFOSIZ reg fields Update two GTXFIFOSIZ bit fields for the DWC_usb31 controller. TXFDEP is a 15-bit value instead of 16-bit value, and bit 15 is TXFRAMNUM. The GTXFIFOSIZ register for DWC_usb31 is as follows: +-------+-----------+----------------------------------+ | BITS | Name | Description | +=======+===========+==================================+ | 31:16 | TXFSTADDR | Transmit FIFOn RAM Start Address | | 15 | TXFRAMNUM | Asynchronous/Periodic TXFIFO | | 14:0 | TXFDEP | TXFIFO Depth | +-------+-----------+----------------------------------+ Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 2 ++ 1 file changed, 2 insertions(+) commit fab3833338779e1e668bd58d1f76d601657304b8 Author: Thinh Nguyen Date: Fri Mar 16 15:33:48 2018 -0700 usb: dwc3: Add SoftReset PHY synchonization delay From DWC_usb31 programming guide section 1.3.2, once DWC3_DCTL_CSFTRST bit is cleared, we must wait at least 50ms before accessing the PHY domain (synchronization delay). Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit cabdf83dadfb3d83eec31e0f0638a92dbd716435 Author: Thinh Nguyen Date: Mon Mar 19 13:07:35 2018 -0700 usb: dwc3: pci: Properly cleanup resource Platform device is allocated before adding resources. Make sure to properly cleanup on error case. Cc: Fixes: f1c7e7108109 ("usb: dwc3: convert to pcim_enable_device()") Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de948a74ad6f0eefddf36d765b8f2dd6df82caa0 Author: Felipe Balbi Date: Thu Mar 22 10:45:20 2018 +0200 usb: dwc3: Makefile: fix link error on randconfig If building a kernel without FTRACE but with TRACING, dwc3.ko fails to link due to missing trace events. Fix this by using the correct Kconfig symbol on Makefile. Reported-by: Randy Dunlap Signed-off-by: Felipe Balbi drivers/usb/dwc3/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3e4eccbb8ddd2bcf906a9c2a43980b00a568eb4 Author: Mark Brown Date: Thu Mar 22 15:23:35 2018 +0800 regulator: core: Add missing blank line between functions Signed-off-by: Mark Brown drivers/regulator/core.c | 1 + 1 file changed, 1 insertion(+) commit 0731de476a37c33485af82d64041c9d193208df8 Author: Dan Williams Date: Wed Mar 21 21:22:34 2018 -0700 nfit: skip region registration for incomplete control regions Per the ACPI specification the only functional purpose for a DIMM Control Region to be mapped into the system physical address space, from an OSPM perspective, is to support block-apertures. However, there are some BIOSen that publish DIMM Control Region SPA entries for pre-boot environment consumption. Undo the kernel policy of generating disabled 'ndblk' regions when this configuration is detected. Cc: Fixes: 1f7df6f88b92 ("libnvdimm, nfit: regions (block-data-window...)") Reviewed-by: Toshi Kani Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 9f591ae60e1be026901398ef99eede91237aa3a1 Author: Gerd Hoffmann Date: Wed Mar 21 15:08:47 2018 +0100 drm/i915/gvt: throw error on unhandled vfio ioctls On unknown/unhandled ioctls the driver should return an error, so userspace knows it tried to use something unsupported. Cc: stable@vger.kernel.org Signed-off-by: Gerd Hoffmann Reviewed-by: Alex Williamson Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/kvmgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b53117c0b881d78d5d66a7e1be11d62a077c1e25 Author: John Hsu Date: Wed Mar 21 12:16:32 2018 +0800 ASoC: nau8824: recover system clock when device changes User reports an issue in Ubuntu about the device switch upon playback. We find the FLL will disalbe when switching headphone to speaker. The pulseaudio will stop the headphone and close its power. Then, it just opens the speaker and turn on its power. Therefore, the supply of system clock does the OFF event and disables FLL. But the FLL doesn't enable again when the speaker powers on. The patch adds the recovery of system clock to enable FLL again for this case. And it covers the case that system clock from MCLK. Signed-off-by: John Hsu Signed-off-by: Mark Brown sound/soc/codecs/nau8824.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) commit 6a2e3c3ea31bba91191c4c1a8a6afd7f08f9399e Author: Stephen Boyd Date: Wed Mar 21 11:48:11 2018 -0700 regulator: qcom_smd: Drop regulator/{machine,of_regulator} includes These seem to be leftovers from previous developments of the driver but they never got removed. Dropping them still allows the code to compile so everything must be fine. Signed-off-by: Stephen Boyd Signed-off-by: Mark Brown drivers/regulator/qcom_smd-regulator.c | 2 -- 1 file changed, 2 deletions(-) commit da779513d33575fc43a9ae87a95af6b4354cebaa Author: Geert Uytterhoeven Date: Wed Mar 21 09:07:23 2018 +0100 spi: sh-msiof: Use correct enum for DMA transfer direction Use enum dma_transfer_direction as required by dmaengine_prep_slave_sg() instead of enum dma_data_direction. This won't change behavior in practice as the enum values are equivalent. This fixes two warnings when building with clang: drivers/spi/spi-sh-msiof.c:755:27: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] rx->sgl, rx->nents, DMA_FROM_DEVICE, ^~~~~~~~~~~~~~~ drivers/spi/spi-sh-msiof.c:772:27: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] tx->sgl, tx->nents, DMA_TO_DEVICE, ^~~~~~~~~~~~~ Based on commit 768d59f5d0139a6f ("spi: rspi: use correct enum for DMA transfer direction"). Signed-off-by: Geert Uytterhoeven Reviewed-by: Stefan Agner Signed-off-by: Mark Brown drivers/spi/spi-sh-msiof.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd5c4facf59648581d2f1692dad7b107bf429954 Author: Mikulas Patocka Date: Wed Mar 21 12:49:29 2018 -0400 Fix slab name "biovec-(1<<(21-12))" I'm getting a slab named "biovec-(1<<(21-12))". It is caused by unintended expansion of the macro BIO_MAX_PAGES. This patch renames it to biovec-max. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: Jens Axboe block/bio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e2fb22103b99c26ae30a46512abe75526d8e4c9 Author: Mikulas Patocka Date: Wed Mar 21 12:42:25 2018 -0400 block: use 32-bit blk_status_t on Alpha Early alpha processors cannot write a single byte or word; they read 8 bytes, modify the value in registers and write back 8 bytes. The type blk_status_t is defined as one byte, it is often written asynchronously by I/O completion routines, this asynchronous modification can corrupt content of nearby bytes if these nearby bytes can be written simultaneously by another CPU. - one example of such corruption is the structure dm_io where "blk_status_t status" is written by an asynchronous completion routine and "atomic_t io_count" is modified synchronously - another example is the structure dm_buffer where "unsigned hold_count" is modified synchronously from process context and "blk_status_t write_error" is modified asynchronously from bio completion routine This patch fixes the bug by changing the type blk_status_t to 32 bits if we are on Alpha and if we are compiling for a processor that doesn't have the byte-word-extension. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org # 4.13+ Signed-off-by: Jens Axboe include/linux/blk_types.h | 5 +++++ 1 file changed, 5 insertions(+) commit ad448378825f5746c5fa37718724bc8f4e7b6945 Author: Adrian Hunter Date: Tue Mar 20 15:07:38 2018 +0200 scsi: ufs: Add support for Auto-Hibernate Idle Timer UFS host controllers may support an autonomous power management feature called the Auto-Hibernate Idle Timer. The timer is set to the number of microseconds of idle time before the UFS host controller will autonomously put the link into Hibernate state. That will save power at the expense of increased latency. Any access to the host controller interface registers will automatically put the link out of Hibernate state. So once configured, the feature is transparent to the driver. Expose the Auto-Hibernate Idle Timer value via SysFS to allow users to choose between power efficiency or lower latency. Set a default value of 150 ms. Signed-off-by: Adrian Hunter Acked-by: Stanislav Nijnikov Signed-off-by: Martin K. Petersen Documentation/ABI/testing/sysfs-driver-ufs | 14 ++++++ drivers/scsi/ufs/ufs-sysfs.c | 76 ++++++++++++++++++++++++++++++ drivers/scsi/ufs/ufshcd.c | 26 ++++++++++ drivers/scsi/ufs/ufshcd.h | 3 ++ drivers/scsi/ufs/ufshci.h | 7 +++ 5 files changed, 126 insertions(+) commit 114c1aa210494a02c26aa33f793e5b641df01989 Author: Stanislav Nijnikov Date: Thu Mar 1 12:48:06 2018 +0200 scsi: ufs: sysfs: reworking of the rpm_lvl and spm_lvl entries Read from these files will return the integer value of the chosen power management level now. Separate entries were added to show the target UFS device and UIC link states. The description of the possible power managements levels was added to the ABI file. The on-write behaviour of these entries wasn't changed. [mkp: typo] Signed-off-by: Stanislav Nijnikov Acked-by: Adrian Hunter Signed-off-by: Martin K. Petersen Documentation/ABI/testing/sysfs-driver-ufs | 67 ++++++++++++++++++++++ drivers/scsi/ufs/ufs-sysfs.c | 92 +++++++++++++++--------------- 2 files changed, 114 insertions(+), 45 deletions(-) commit b9120c016da8a98f7663df505bfaf2944cded18f Author: Alexandre Belloni Date: Tue Mar 20 14:08:01 2018 +0100 MAINTAINERS: Add entry for Microsemi MIPS SoCs Add myself as a maintainer for the Microsemi MIPS SoCs. Signed-off-by: Alexandre Belloni Cc: Ralf Baechle Cc: Allan Nielsen Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18857/ Signed-off-by: James Hogan MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6bce3deae4d51326d0f07619ab6443ba771b3fb6 Author: Alexandre Belloni Date: Tue Mar 20 14:08:00 2018 +0100 MIPS: generic: Add support for Microsemi Ocelot Introduce support for the MIPS based Microsemi Ocelot SoCs. Signed-off-by: Alexandre Belloni Cc: Ralf Baechle Cc: Allan Nielsen Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18858/ [jhogan@kernel.org: update ocelot_defconfig specification] Signed-off-by: James Hogan arch/mips/Makefile | 3 ++ arch/mips/configs/generic/board-ocelot.config | 35 ++++++++++++ arch/mips/generic/Kconfig | 16 ++++++ arch/mips/generic/Makefile | 1 + arch/mips/generic/board-ocelot.c | 78 +++++++++++++++++++++++++++ 5 files changed, 133 insertions(+) commit 6b36d31a8a997248a10059e6d8a4e31b9c8310a2 Author: Alexandre Belloni Date: Tue Mar 20 14:07:59 2018 +0100 MIPS: mscc: Add ocelot PCB123 device tree Add a device tree for the Microsemi Ocelot PCB123 evaluation board. Signed-off-by: Alexandre Belloni Cc: Ralf Baechle Cc: Rob Herring Cc: Allan Nielsen Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/18856/ Signed-off-by: James Hogan arch/mips/boot/dts/mscc/Makefile | 2 ++ arch/mips/boot/dts/mscc/ocelot_pcb123.dts | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit d843dd530d57e75a9fd1bfd694bd1f13eb5fe8d4 Author: Alexandre Belloni Date: Tue Mar 20 14:07:58 2018 +0100 MIPS: mscc: Add ocelot dtsi Add a device tree include file for the Microsemi Ocelot SoC. Signed-off-by: Alexandre Belloni Cc: Ralf Baechle Cc: Rob Herring Cc: Allan Nielsen Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/18855/ Signed-off-by: James Hogan arch/mips/boot/dts/Makefile | 1 + arch/mips/boot/dts/mscc/Makefile | 1 + arch/mips/boot/dts/mscc/ocelot.dtsi | 117 ++++++++++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+) commit 2707177e86ec9b25c0988c2cc827acbae409b376 Author: Alexandre Belloni Date: Tue Mar 20 14:07:57 2018 +0100 dt-bindings: mips: Add bindings for Microsemi SoCs Add bindings for Microsemi SoCs. Currently only Ocelot is supported. Signed-off-by: Alexandre Belloni Reviewed-by: Rob Herring Cc: Ralf Baechle Cc: Allan Nielsen Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18854/ Signed-off-by: James Hogan Documentation/devicetree/bindings/mips/mscc.txt | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 502ab004e6c4426b91460d8be8b9d4a4bf206657 Author: Michał Kępień Date: Sat Mar 10 21:43:53 2018 +0100 platform/x86: fujitsu-laptop: Revert UNSUPPORTED_CMD back to an int UNSUPPORTED_CMD was previously 0x80000000 (int), but commit 819cddae7cfa ("platform/x86: fujitsu-laptop: Clean up constants") changed it into an unsigned long due to BIT() being used to define it. As call_fext_func() returns an int, 0x80000000 would get type promoted when compared to an unsigned long, which on a 64-bit system would cause it to become 0xffffffff80000000 due to sign extension. This causes one logical condition in fujitsu-laptop to always be true and another one to always be false on 64-bit systems. Fix this by reverting UNSUPPORTED_CMD back to an int. This patch fixes the following smatch warnings: drivers/platform/x86/fujitsu-laptop.c:763 acpi_fujitsu_laptop_leds_register() warn: always true condition '(call_fext_func(device, ((1 << (12)) | (1 << (0))), 2, (1 << (16)), 0) != (1 << (31))) => (s32min-s32max != 2147483648)' drivers/platform/x86/fujitsu-laptop.c:816 acpi_fujitsu_laptop_add() warn: impossible condition '(priv->flags_supported == (1 << (31))) => (0-2147483647,18446744071562067968-u64max == 2147483648)' Fixes: 819cddae7cfa ("platform/x86: fujitsu-laptop: Clean up constants") Reported-by: Dan Carpenter Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f6c9be27ae1932410d0af044b074fd2c27945c4 Author: Meelis Roos Date: Thu Mar 8 15:44:37 2018 +0200 scsi: qla2xxx: fx00 copypaste typo Fix an obvious copy-paste error in freeing QLAFX00 response queue - the code checked for rsp->ring but freed rsp->ring_fx00. [mkp: applied by hand] Signed-off-by: Meelis Roos Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7e59e994fc69ace89f828686d82d528529ea025 Author: Meelis Roos Date: Thu Mar 8 15:44:07 2018 +0200 scsi: qla2xxx: fix error message on Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_mbx.c | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) commit 61c187e46ebb27f51b52bd0eb68b7f534a300184 Author: Don Brace Date: Wed Mar 21 13:32:37 2018 -0500 scsi: smartpqi: update driver version Reviewed-by: Scott Teel Reviewed-by: Gerry Morong Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 339faa8150fd56891105bc69fc18f5d51b8a63dd Author: Kevin Barnett Date: Wed Mar 21 13:32:31 2018 -0500 scsi: smartpqi: workaround fw bug for oq deletion Skip deleting PQI operational queues when there is an error creating a new queue group. It's not really necessary to delete the queues anyway because they get deleted during the PQI reset that is part of the error recovery path. Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 39 +++-------------------------------- 1 file changed, 3 insertions(+), 36 deletions(-) commit b3fd27e9150f7ac2a2bd3f61aa71aadb4db499b2 Author: Alexandre Belloni Date: Tue Mar 20 14:07:56 2018 +0100 dt-bindings: Add vendor prefix for Microsemi Corporation Microsemi Corporation provides semiconductor and system solutions for aerospace & defense, communications, data center and industrial markets. Signed-off-by: Alexandre Belloni Acked-by: Rob Herring Cc: Ralf Baechle Cc: Allan Nielsen Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18853/ Signed-off-by: James Hogan Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 45dce24df5b7ef569484caed9b44856dbf447e00 Author: Ching Huang Date: Thu Mar 15 14:40:25 2018 +0800 scsi: arcmsr: Change driver version to v1.40.00.05-20180309 Change driver version to v1.40.00.05-20180309 Signed-off-by: Ching Huang Signed-off-by: Martin K. Petersen drivers/scsi/arcmsr/arcmsr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2c62ebca18bc48cb7312f519e132b79cf42ea0e Author: Ching Huang Date: Thu Mar 15 14:37:40 2018 +0800 scsi: arcmsr: Sleep to avoid CPU stuck too long for waiting adapter ready Sleep to avoid CPU stuck too long for waiting adapter ready. Signed-off-by: Ching Huang Signed-off-by: Martin K. Petersen drivers/scsi/arcmsr/arcmsr_hba.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c4c1adb3490ea4b8b13da2dae8d563350ded4988 Author: Ching Huang Date: Thu Mar 15 14:33:36 2018 +0800 scsi: arcmsr: Handle adapter removed due to thunderbolt cable disconnection. Handle adapter removed due to thunderbolt cable disconnection. Signed-off-by: Ching Huang Signed-off-by: Martin K. Petersen drivers/scsi/arcmsr/arcmsr_hba.c | 80 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit 50b08240de61fcae54f6b35a25198209ac13c947 Author: Ching Huang Date: Thu Mar 15 14:26:15 2018 +0800 scsi: arcmsr: Rename ACB_F_BUS_HANG_ON to ACB_F_ADAPTER_REMOVED for adapter hot-plug Rename ACB_F_BUS_HANG_ON to ACB_F_ADAPTER_REMOVED for adapter hot-plug. Signed-off-by: Ching Huang Signed-off-by: Martin K. Petersen drivers/scsi/arcmsr/arcmsr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b143231250d705b287ac3896f41eb12a14d7826 Author: himanshu.madhani@cavium.com Date: Tue Mar 20 23:09:41 2018 -0700 scsi: qla2xxx: Update driver version to 10.00.00.06-k Signed-off-by: Himanshu Madhani Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33b28357dd0033ef0e146861cd575a9c5ed2fb5e Author: Quinn Tran Date: Tue Mar 20 23:09:40 2018 -0700 scsi: qla2xxx: Fix Async GPN_FT for FCP and FC-NVMe scan This patch combines FCP and FC-NVMe scan into single scan when driver detects FC-NVMe capability on same port. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 8 ++ drivers/scsi/qla2xxx/qla_gbl.h | 2 +- drivers/scsi/qla2xxx/qla_gs.c | 272 ++++++++++++++++++++++++++++++---------- drivers/scsi/qla2xxx/qla_init.c | 8 +- drivers/scsi/qla2xxx/qla_os.c | 10 +- 5 files changed, 229 insertions(+), 71 deletions(-) commit 60dd6e8e42077a4c25f221cf124e8ba038b86e2e Author: Darren Trapp Date: Tue Mar 20 23:09:39 2018 -0700 scsi: qla2xxx: Cleanup code to improve FC-NVMe error handling This patch cleans up ABTS handling for FC-NVMe by - Removing allocation of sp, instead pass the sp pointer for abort IOCB - Fix error handling from Trasport failure - set outstanding_cmds array to NULL for nvme completion Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_isr.c | 78 +++++++++++++++-------------------------- drivers/scsi/qla2xxx/qla_nvme.c | 2 +- 2 files changed, 29 insertions(+), 51 deletions(-) commit 623ee824e579d234b9f68c7b28ff5ab43f7c78e5 Author: Darren Trapp Date: Tue Mar 20 23:09:38 2018 -0700 scsi: qla2xxx: Fix FC-NVMe IO abort during driver reset Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_nvme.c | 17 ++++++++++++----- drivers/scsi/qla2xxx/qla_nvme.h | 2 +- drivers/scsi/qla2xxx/qla_os.c | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) commit 1cbc0efcd9bee74670d0b637f53e67c47373f544 Author: Darren Trapp Date: Tue Mar 20 23:09:37 2018 -0700 scsi: qla2xxx: Fix retry for PRLI RJT with reason of BUSY Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_init.c | 13 ++++++++++++- drivers/scsi/qla2xxx/qla_mbx.c | 7 +++++-- 3 files changed, 18 insertions(+), 4 deletions(-) commit 2e4c5d2ef76b6f04a3cb7a15bc0fee0ab029dedf Author: Darren Trapp Date: Tue Mar 20 23:09:36 2018 -0700 scsi: qla2xxx: Remove nvme_done_list Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 1 - drivers/scsi/qla2xxx/qla_gbl.h | 2 -- drivers/scsi/qla2xxx/qla_init.c | 1 - drivers/scsi/qla2xxx/qla_mid.c | 6 ------ drivers/scsi/qla2xxx/qla_nvme.c | 13 ++----------- drivers/scsi/qla2xxx/qla_os.c | 1 - 6 files changed, 2 insertions(+), 22 deletions(-) commit 870fe24f3c0b2cf40998f8ab21d4cf4e4e9cf619 Author: Darren Trapp Date: Tue Mar 20 23:09:35 2018 -0700 scsi: qla2xxx: Return busy if rport going away This patch adds mechanism to return EBUSY if rport is going away to prevent exhausting FC-NVMe layer's retry counter. Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_isr.c | 4 +++- drivers/scsi/qla2xxx/qla_nvme.c | 31 ++++++++++++++++++++----------- 3 files changed, 24 insertions(+), 12 deletions(-) commit 1763c1fd76d8e26c5e6d5a3e415e7deeeda3c5da Author: Darren Trapp Date: Tue Mar 20 23:09:34 2018 -0700 scsi: qla2xxx: Fix n2n_ae flag to prevent dev_loss on PDB change On a port db changes, this patch will set n2n_ae flag for N2N connection when requesting for Report ID Acquition MBX, instead of Loop Initialization or point to point asynchronous events. Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 2 -- drivers/scsi/qla2xxx/qla_isr.c | 3 --- drivers/scsi/qla2xxx/qla_mbx.c | 3 +++ 3 files changed, 3 insertions(+), 5 deletions(-) commit e473b3074104ee09227cfbba5f872e3ea15dd280 Author: Darren Trapp Date: Tue Mar 20 23:09:33 2018 -0700 scsi: qla2xxx: Add FC-NVMe abort processing Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_nvme.c | 36 ++++++++++++++++++------------------ drivers/scsi/qla2xxx/qla_nvme.h | 1 + 2 files changed, 19 insertions(+), 18 deletions(-) commit 9dd9686b14199a1c3e668e1cca124cd1c74b77e1 Author: Darren Trapp Date: Tue Mar 20 23:09:32 2018 -0700 scsi: qla2xxx: Add changes for devloss timeout in driver Add support for error recovery within devloss timeout, now that FC-NVMe transport support devloss timeout. Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_init.c | 8 +++ drivers/scsi/qla2xxx/qla_isr.c | 5 +- drivers/scsi/qla2xxx/qla_nvme.c | 142 +++++++++++++++++--------------------- drivers/scsi/qla2xxx/qla_nvme.h | 6 +- drivers/scsi/qla2xxx/qla_target.c | 13 ++-- drivers/scsi/qla2xxx/qla_target.h | 2 +- 7 files changed, 87 insertions(+), 90 deletions(-) commit dbe18018e3ad60fc5abfe999b49c4b37f8e7bb32 Author: Darren Trapp Date: Tue Mar 20 23:09:31 2018 -0700 scsi: qla2xxx: Set IIDMA and fcport state before qla_nvme_register_remote() Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1d4614e1e6cbaeac1fdbf4aef3cca222320d3d92 Author: himanshu.madhani@cavium.com Date: Tue Mar 20 23:09:30 2018 -0700 scsi: qla2xxx: Remove unneeded message and minor cleanup for FC-NVMe Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_nvme.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 8d7d7775268546972b62a11fe09d48493f824f41 Author: Darren Trapp Date: Tue Mar 20 23:09:29 2018 -0700 scsi: qla2xxx: Restore ZIO threshold setting Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_nvme.c | 5 ----- 1 file changed, 5 deletions(-) commit 723c7e3982d2d560d6b89cac5686e4c3d286d884 Author: Xose Vazquez Perez Date: Fri Mar 16 15:57:25 2018 +0100 scsi: devinfo: remove dasd devices from the scsi subsystem Only present through ccw bus. [mkp: applied by hand] Cc: Matthias Rudolph Cc: Takahiro Yasui Cc: Anthony Cheung Cc: Mike Christie Cc: Martin K. Petersen Cc: James E.J. Bottomley Cc: s390 ML Cc: SCSI ML Cc: device-mapper development Signed-off-by: Xose Vazquez Perez Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 10 ---------- 1 file changed, 10 deletions(-) commit c7058ae1d5a9c7f9b1fd8c6fe790a887744935e7 Author: Xose Vazquez Perez Date: Thu Mar 15 19:01:49 2018 +0100 scsi: devinfo: remove DF arrays from HP Matthias did confirm that there are no such devices. [mkp: applied by hand] Cc: Matthias Rudolph Cc: Anthony Cheung Cc: Takahiro Yasui Cc: Mike Christie Cc: Martin K. Petersen Cc: James E.J. Bottomley Cc: SCSI ML Cc: device-mapper development Signed-off-by: Xose Vazquez Perez Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 2 -- 1 file changed, 2 deletions(-) commit 5f96f42b76e00e2871033745ff029056cc725c76 Author: Xose Vazquez Perez Date: Thu Mar 15 18:32:01 2018 +0100 scsi: devinfo: add HP DISK-SUBSYSTEM device, for HP XP arrays "The DISK-SUBSYSTEM is a special model name returned when LUs are not installed. For example, when LU#0 is not installed in "OPEN-" models, LU#0 is detected as the DISK-SUBSYSTEM model": https://marc.info/?l=linux-scsi&m=125424006417825 It's missing for HP XP rebranded arrays, "HP"/"OPEN-". Only the HITACHI one is present: 13f7e5acc8b329080672c13f05f252ace5b79825 627511e3e67553b04f6917c03e39b797df210e04 Cc: Anthony Cheung Cc: Takahiro Yasui Cc: Matthias Rudolph Cc: Martin K. Petersen Cc: James E.J. Bottomley Cc: SCSI ML Signed-off-by: Xose Vazquez Perez Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 1 + 1 file changed, 1 insertion(+) commit 3565a3d01e14c33d29512ca8129365cbe38df809 Author: Geert Uytterhoeven Date: Fri Mar 16 14:51:50 2018 +0100 scsi: hisi_sas: Remove depends on HAS_DMA in case of platform dependency Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their dependencies on HAS_DMA, to prevent compiling subsystems or drivers that cannot work anyway. This simplifies the dependencies, and allows to improve compile-testing. Signed-off-by: Geert Uytterhoeven Reviewed-by: Mark Brown Acked-by: Robin Murphy Acked-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c121107d0f8473bf9aa5fe1c32adab0a40f093e2 Author: Martin K. Petersen Date: Mon Mar 19 23:01:58 2018 -0400 scsi: documentation: Obsolete documentation references Remove references to fdomain, ncr53c400a, tmscsim, and DAC960 from Documentation/scsi. Signed-off-by: Martin K. Petersen Documentation/scsi/Mylex.txt | 5 - Documentation/scsi/scsi-parameters.txt | 9 - Documentation/scsi/tmscsim.txt | 443 --------------------------------- 3 files changed, 457 deletions(-) commit 03fea736c0d0f102b604ba410e45c76e7616a077 Author: Colin Ian King Date: Mon Mar 19 10:53:41 2018 +0000 scsi: qla2xxx: fix spelling mistake: "existant" -> "existent" Trivial fix to spelling mistake in debug message text Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10ff6be6de59e1c7d0bd5d899f896ce991f4fdc2 Author: Dan Carpenter Date: Mon Mar 19 13:34:01 2018 +0300 scsi: dpt_i2o: use after free in __adpt_reset() In __adpt_reset() the problem is that adpt_hba_reset() frees "pHba" on error but we dereference it to print the name in the error message. Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen drivers/scsi/dpt_i2o.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 24268fd1ad3213079f1af09359b4243fffa95869 Author: Dan Carpenter Date: Mon Mar 19 13:33:03 2018 +0300 scsi: dpt_i2o: use after free in adpt_release() The scsi_host_put() function frees "pHba" and then we dereference it on the next line when we do "scsi_host_put(pHba->host);". [mkp: included fix from hch] Fixes: 38e09e3bb056 ("scsi: dpt_i2o: stop using scsi_unregister") Signed-off-by: Dan Carpenter Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/dpt_i2o.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 031e3601869c815582ca1d49d1ff73de58e446b0 Author: Zhichang Yuan Date: Thu Mar 15 02:15:50 2018 +0800 lib: Add generic PIO mapping method 41f8bba7f555 ("of/pci: Add pci_register_io_range() and pci_pio_to_address()") added support for PCI I/O space mapped into CPU physical memory space. With that support, the I/O ranges configured for PCI/PCIe hosts on some architectures can be mapped to logical PIO and converted easily between CPU address and the corresponding logical PIO. Based on this, PCI I/O port space can be accessed via in/out accessors that use memory read/write. But on some platforms, there are bus hosts that access I/O port space with host-local I/O port addresses rather than memory addresses. Add a more generic I/O mapping method to support those devices. With this patch, both the CPU addresses and the host-local port can be mapped into the logical PIO space with different logical/fake PIOs. After this, all the I/O accesses to either PCI MMIO devices or host-local I/O peripherals can be unified into the existing I/O accessors defined in asm-generic/io.h and be redirected to the right device-specific hooks based on the input logical PIO. Tested-by: dann frazier Signed-off-by: Zhichang Yuan Signed-off-by: Gabriele Paoloni Signed-off-by: John Garry [bhelgaas: remove -EFAULT return from logic_pio_register_range() per https://lkml.kernel.org/r/20180403143909.GA21171@ulmo, fix NULL pointer checking per https://lkml.kernel.org/r/20180403211505.GA29612@embeddedor.com] Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko include/asm-generic/io.h | 2 + include/linux/logic_pio.h | 123 ++++++++++++++++++++ lib/Kconfig | 16 +++ lib/Makefile | 2 + lib/logic_pio.c | 280 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 423 insertions(+) commit 1acfb9b7ee0b1881bb8e875b6757976e48293ec4 Author: Jay Fang Date: Mon Mar 12 17:13:32 2018 +0800 PCI: Add decoding for 16 GT/s link speed PCIe 4.0 defines the 16.0 GT/s link speed. Links can run at that speed without any Linux changes, but previously their sysfs "max_link_speed" and "current_link_speed" files contained "Unknown speed", not the expected "16.0 GT/s". Add decoding for the new 16 GT/s link speed. Signed-off-by: Jay Fang [bhelgaas: add PCI_EXP_LNKCAP2_SLS_16_0GB] Signed-off-by: Bjorn Helgaas Reviewed-by: Dongdong Liu drivers/pci/pci-sysfs.c | 6 ++++++ drivers/pci/probe.c | 2 +- drivers/pci/slot.c | 1 + include/linux/pci.h | 1 + include/uapi/linux/pci_regs.h | 7 +++++-- 5 files changed, 14 insertions(+), 3 deletions(-) commit 26f2cacde21b713f7f917d2193a76cc7636ee88e Author: Peter Rosin Date: Wed Mar 21 16:35:52 2018 +0100 ARM: dts: at91sam9260: pullup rx on usart0 For consistency with all other serial pins, add this pullup. It also prevents the signal from floating and so consuming a useless extra amount of power in crowbarred state if nothing is connected to RX. Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9260.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 43d9af3f1994d81a7aedd19990330613ad2b731c Author: Peter Rosin Date: Wed Mar 21 16:35:51 2018 +0100 ARM: dts: at91rm9200: pullup rx on uart0 For consistency with all other serial pins, add this pullup. It also prevents the signal from floating and so consuming a useless extra amount of power in crowbarred state if nothing is connected to RX. Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91rm9200.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5e04822f7db504cd2cdc9074bc79c84657222567 Author: Peter Rosin Date: Wed Mar 21 16:35:50 2018 +0100 ARM: dts: at91: fixes uart pinctrl, set pullup on rx, clear pullup on tx Remove pullup on uart TX signals, they are push-pull outputs thus pullups are pointless. Add pullup on uart RX signals, they prevent the RX signals to be left floating and so consuming a useless extra amount of power in crowbarred state if nothing is connected to RX. Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91rm9200.dtsi | 12 ++++++------ arch/arm/boot/dts/at91sam9260.dtsi | 20 ++++++++++---------- arch/arm/boot/dts/at91sam9261.dtsi | 12 ++++++------ arch/arm/boot/dts/at91sam9263.dtsi | 12 ++++++------ arch/arm/boot/dts/at91sam9g45.dtsi | 16 ++++++++-------- arch/arm/boot/dts/at91sam9n12.dtsi | 4 ++-- arch/arm/boot/dts/at91sam9rl.dtsi | 12 ++++++------ arch/arm/boot/dts/at91sam9x5.dtsi | 12 ++++++------ arch/arm/boot/dts/at91sam9x5_usart3.dtsi | 4 ++-- arch/arm/boot/dts/sama5d3.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/sama5d3_uart.dtsi | 8 ++++---- arch/arm/boot/dts/sama5d4.dtsi | 28 ++++++++++++++-------------- 12 files changed, 82 insertions(+), 82 deletions(-) commit 238f694e1b7f8297f1256c57e41f69c39576c9b4 Author: Mauro Carvalho Chehab Date: Wed Mar 21 15:48:11 2018 -0400 media: v4l2-common: fix a compilation breakage Clearly, changeset 95ce9c28601a ("media: v4l: common: Add a function to obtain best size from a list") was never tested, as it broke compilation with: drivers/media/platform/vivid/vivid-vid-cap.c: In function ‘vivid_try_fmt_vid_cap’: drivers/media/platform/vivid/vivid-vid-cap.c:565:34: error: macro "v4l2_find_nearest_size" requer 6 argumentos, mas apenas 5 foram fornecidos mp->width, mp->height); ^ drivers/media/platform/vivid/vivid-vid-cap.c:564:4: error: ‘v4l2_find_nearest_size’ undeclared (first use in this function); did you mean ‘__v4l2_find_nearest_size’? v4l2_find_nearest_size(webcam_sizes, width, height, ^~~~~~~~~~~~~~~~~~~~~~ __v4l2_find_nearest_size drivers/media/platform/vivid/vivid-vid-cap.c:564:4: note: each undeclared identifier is reported only once for each function it appears in drivers/media/i2c/ov5670.c: In function ‘ov5670_set_pad_format’: drivers/media/i2c/ov5670.c:2233:48: error: macro "v4l2_find_nearest_size" requer 6 argumentos, mas apenas 5 foram fornecidos fmt->format.width, fmt->format.height); ^ drivers/media/i2c/ov5670.c:2232:9: error: ‘v4l2_find_nearest_size’ undeclared (first use in this function); did you mean ‘__v4l2_find_nearest_size’? mode = v4l2_find_nearest_size(supported_modes, width, height, ^~~~~~~~~~~~~~~~~~~~~~ __v4l2_find_nearest_size drivers/media/i2c/ov13858.c: In function ‘ov13858_set_pad_format’: drivers/media/i2c/ov13858.c:1379:48: error: macro "v4l2_find_nearest_size" requer 6 argumentos, mas apenas 5 foram fornecidos fmt->format.width, fmt->format.height); ^ drivers/media/i2c/ov13858.c:1378:9: error: ‘v4l2_find_nearest_size’ undeclared (first use in this function); did you mean ‘__v4l2_find_nearest_size’? mode = v4l2_find_nearest_size(supported_modes, width, height, ^~~~~~~~~~~~~~~~~~~~~~ __v4l2_find_nearest_size drivers/media/i2c/ov13858.c:1378:9: note: each undeclared identifier is reported only once for each function it appears in Basically, v4l2_find_nearest_size() callers pass 5 arguments, while its definition require 6 args. Unfortunately, my build process was also broken, as it was reporting me that the compilation went fine: $ make ARCH=i386 CF=-D__CHECK_ENDIAN__ CONFIG_DEBUG_SECTION_MISMATCH=y C=1 W=1 CHECK='compile_checks' M=drivers/staging/media $ make ARCH=i386 CF=-D__CHECK_ENDIAN__ CONFIG_DEBUG_SECTION_MISMATCH=y C=1 W=1 CHECK='compile_checks' M=drivers/media *** ERRORS *** *** WARNINGS *** compilation succeeded That was due to a change here to use of linux-log-diff script that provides a diffstat between the errors output. Somehow, the logic was missing some fatal errors. Fixes: 95ce9c28601a ("media: v4l: common: Add a function to obtain best size from a list") Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-common.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b6356df3eb9ad9ae12efb4ec37d5615065e51d8b Author: Andrey Grodzovsky Date: Wed Mar 21 14:17:25 2018 -0400 drm/amdgpu: Fix NULL ptr on driver unload due to init failure. Problem: When unloading due to failure amdgpu_device_fini was called twice which was leading to NULL ptr in amdgpu_irq_disable_all. Fix: Call amdgpu_device_fini only once from amdgpu_driver_unload_kms. Reviewed-by: Alex Deucher Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - 1 file changed, 1 deletion(-) commit 2333bf9ad960eb78a3ce5de6943c2b725e50e69b Author: Christian König Date: Wed Mar 21 13:58:05 2018 +0100 drm/amdgpu: fix "mitigate workaround for i915" Mixed up exporter and importer here. E.g. while mapping the BO we need to check the importer not the exporter. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=105633 Signed-off-by: Christian König Acked-by: Alex Deucher Tested-by: Mike Lothian Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 97d82a48d7a7eca6f20b100ae19811134509406e Author: Sinan Kaya Date: Mon Mar 19 22:47:44 2018 -0400 IB/mlx4: Eliminate duplicate barriers on weakly-ordered archs Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_relaxed(). Signed-off-by: Sinan Kaya Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx4/qp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 35c6ef89661cb3a1d8767e70fbbb914bfcce776c Author: Arushi Singhal Date: Sun Mar 4 10:48:26 2018 -0500 media: staging: media: Replace "cant" with "can't" Replace "cant" with "can't". "cant" is not same as "Can not" or "Can't". Signed-off-by: Arushi Singhal Acked-by: Julia Lawall Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3296c4ae9769cab837799c0f873a1b281f4a156e Author: Rex Zhu Date: Wed Mar 21 13:10:11 2018 +0800 drm/amd/pp: Add smu irq handlers in sw_init instand of hw_init Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 ++ drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) commit 4d2003721c2bd6add6746426eec1d879432c92dd Author: Rex Zhu Date: Wed Mar 21 13:11:27 2018 +0800 drm/amd/pp: Refine register_thermal_interrupt function v2: add Vega12 support 1. delete useless argument in function register_thermal_interrupt 2. rename function name register_thermal_interrupt to register_irq_handlers Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 6 +++--- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 5 ++--- drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c | 3 +-- drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.h | 3 +-- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h | 2 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 3 +-- 9 files changed, 12 insertions(+), 16 deletions(-) commit 160b8e75932fd51a49607d32dbfa1d417977b79c Author: Rex Zhu Date: Tue Mar 20 19:19:44 2018 +0800 drm/amdgpu: Remove wrapper layer of cgs irq handling v2: add Vega12 support 1. remove struct cgs_os_ops 2. delete cgs_linux.h 3. refine the irq code for vega10, can fix set pp table failed issue. 4. add common smu irq process function Acked-by: Christian König Acked-by: Junwei Zhang Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/acp/include/acp_gfx_if.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 111 ------------------- drivers/gpu/drm/amd/display/dc/os_types.h | 2 +- drivers/gpu/drm/amd/include/cgs_common.h | 1 - drivers/gpu/drm/amd/include/cgs_linux.h | 119 --------------------- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 46 +------- drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c | 75 +++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.h | 7 ++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 35 +----- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 48 +-------- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 5 - 11 files changed, 86 insertions(+), 364 deletions(-) commit 7436854ebd4166a7c4b023031f62f24f1174d2d2 Author: Kenneth Feng Date: Tue Mar 20 14:02:07 2018 +0800 drm/amd/powerplay: Return per DPM level clock Add change to return per DPM level clock in DAL interface Signed-off-by: Kenneth Feng Reviewed-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 370 +++++++++++++++------ drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.h | 2 +- 2 files changed, 276 insertions(+), 96 deletions(-) commit 7f3f106e4431429c27d7cb5f1925d6709b51982e Author: Kenneth Feng Date: Tue Mar 20 11:39:52 2018 +0800 drm/amd/powerplay: Remove the SOC floor voltage setting Remove W/A carried over from VG10 to set VDDSOC Floor Voltage prior to enabling DPM since the VBIOS covers the floor voltage setting now Signed-off-by: Kenneth Feng Reviewed-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 8 -------- 1 file changed, 8 deletions(-) commit f0c2b16ba84a0b8b960a6d442496ce2d2e6bfa99 Author: Evan Quan Date: Thu Mar 15 09:49:01 2018 +0800 drm/amdgpu: no job timeout setting on compute queues Under some heavy computing environment(e.g. dgemm test), it takes the asic over 10+ seconds to finish the dispatched job which will trigger the timeout. It's quite confusing although it does not seem to bring any real problems. As a quick workround, we choose to not enfoce the timeout setting on compute queues. Signed-off-by: Evan Quan Acked-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dc53d543fcb4fdcd836fffaf0b12d3b1b69cde62 Author: Alex Deucher Date: Fri Sep 1 16:28:27 2017 -0400 drm/amdgpu: add vega12 pci ids (v2) v2: add additional pci ids Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2cac05dee6e309bb21424c7d59c62f662d01309e Author: Evan Quan Date: Mon Mar 19 14:23:57 2018 -0500 drm/amd/powerplay: add the hw manager for vega12 (v4) handles the driver power state setup v2: squash in the following: - handle negative temperature ranges - add vega12 thermal ranges - use ffs/fls - remove ACG code - resend NumOfDisplays message - correct max dpm levels - remove power containment settings - fix warnings - add sensors interface - delete unused overdrive arbiter - drop get_temperature callback - smu table cleanup - atomfirmware smu dpm table updates v3: rebase v4: rebase Acked-by: Christian König Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/dm_pp_interface.h | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 4 +- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 6 + drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 2444 ++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.h | 470 ++++ .../gpu/drm/amd/powerplay/hwmgr/vega12_powertune.c | 1364 +++++++++++ .../gpu/drm/amd/powerplay/hwmgr/vega12_powertune.h | 53 + .../amd/powerplay/hwmgr/vega12_processpptables.c | 430 ++++ .../amd/powerplay/hwmgr/vega12_processpptables.h | 58 + .../gpu/drm/amd/powerplay/hwmgr/vega12_thermal.c | 324 +++ .../gpu/drm/amd/powerplay/hwmgr/vega12_thermal.h | 66 + .../gpu/drm/amd/powerplay/inc/hardwaremanager.h | 14 + drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 21 + 13 files changed, 5254 insertions(+), 2 deletions(-) commit fa969db4addd05aa9bfa58ade0ed6d9c51656762 Author: Evan Quan Date: Mon Mar 19 14:18:23 2018 -0500 drm/amd/powerplay: add the smu manager for vega12 (v4) handles the driver interaction with the smu firmware v2: squash in: - s3 fix for firmware loading - smu loading through the psp - unecessary calls to is_smc_ram_running() - smu table cleanups v3: rebase v4: rebase, smu bo allocation fixes, add dpm running callback Acked-by: Christian König Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 3 +- .../gpu/drm/amd/powerplay/smumgr/vega12_smumgr.c | 561 +++++++++++++++++++++ .../gpu/drm/amd/powerplay/smumgr/vega12_smumgr.h | 62 +++ 3 files changed, 625 insertions(+), 1 deletion(-) commit d33edb6428dfbb8296d53aeb39d710d600cbbd5b Author: Evan Quan Date: Mon Mar 19 14:16:14 2018 -0500 drm/amd/powerplay: add new pp_psm infrastructure for vega12 (v2) New psm infrastructure for vega12. v2: rebase (Alex) Acked-by: Christian König Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 244 +++---------------- .../gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.c | 262 +++++++++++++++++++++ .../gpu/drm/amd/powerplay/hwmgr/pp_psm_legacy.h | 40 ++++ drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.c | 76 ++++++ drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm_new.h | 40 ++++ 6 files changed, 452 insertions(+), 212 deletions(-) commit 3503d588e72fae1ef2f1d5a6fa9f86da85cf1e85 Author: Evan Quan Date: Mon Dec 25 10:21:12 2017 +0800 drm/amd/powerplay: update ppatomfwctl (v2) Add new get_smc_dpm_information api to fetch the smu dpm info from the vbios. v2: deal with updated table format. Acked-by: Christian König Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c | 87 ++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.h | 65 ++++++++++++++++ 2 files changed, 152 insertions(+) commit c042c9b434a44db6ad869223a0f46c51a63ebb5f Author: Evan Quan Date: Mon Dec 25 10:18:54 2017 +0800 drm/amd/powerplay: add vega12_pptable.h Defines the power table format in the vbios. Acked-by: Christian König Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/vega12_pptable.h | 109 +++++++++++++++++++++ 1 file changed, 109 insertions(+) commit c4a4f4b6cbd8e058c5647d0a58c954ac8ecebe37 Author: Evan Quan Date: Mon Dec 25 10:17:57 2017 +0800 drm/amd/powerplay: add vega12_ppsmc.h Defines the smc message interface with the driver. Acked-by: Christian König Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/vega12_ppsmc.h | 123 +++++++++++++++++++++++ 1 file changed, 123 insertions(+) commit 97ea8ebe49711f22692b710d6092654f93297c3c Author: Evan Quan Date: Mon Dec 25 10:17:04 2017 +0800 drm/amd/powerplay: add new smu9_driver_if.h for vega12 (v2) Add driver firmware interface header. v2: squash in interface updates. Acked-by: Christian König Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../drm/amd/powerplay/inc/vega12/smu9_driver_if.h | 758 +++++++++++++++++++++ 1 file changed, 758 insertions(+) commit f3f8864db544ff25917bcbca46389ce38efb1d8b Author: Evan Quan Date: Mon Dec 25 10:13:31 2017 +0800 drm/amd/powerplay: update atomfirmware.h (v2) Add new smu_info table. v2: update table format. Acked-by: Christian König Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/atomfirmware.h | 82 +++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) commit 80be32b58ef8eca3a7fc477c9a1c09de42768ef7 Author: Evan Quan Date: Mon Dec 25 10:12:44 2017 +0800 drm/amd/powerplay: add vega12_inc.h Used for the powerplay implementation. Acked-by: Christian König Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega12_inc.h | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 3084eb0011b38cceaafb9312ad90fe20d343daa7 Author: Hawking Zhang Date: Mon Mar 12 18:25:15 2018 +0800 drm/amdgpu/soc15: initialize reg base for vega12 Initialize the IP offsets for vega12. Acked-by: Christian König Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + 1 file changed, 1 insertion(+) commit f559fe2bc1c1c338e5e9f4fa04e2ab12e59d1818 Author: Feifei Xu Date: Thu Dec 14 19:02:47 2017 +0800 drm/amd/soc15: Add external_rev_id for vega12. Add external_rev_id for vega12. Acked-by: Christian König Signed-off-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4a387558ea869c8623e2e81e2844ef472c55410 Author: Evan Quan Date: Mon Dec 25 13:16:11 2017 +0800 drm/amdgpu/soc15: update vega12 cg_flags Add the appropriate clockgating flags for vega12 Acked-by: Christian König Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 692069a1a4f137bb45a3d43af576de8d1ff89c7d Author: Alex Deucher Date: Tue Mar 6 22:35:19 2018 -0500 drm/amdgpu/soc15: add support for vega12 Add the IP blocks, clock and powergating flags, and common clockgating support. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/soc15.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 62b35f9ad107cb0ddc96dd8c1bb24c21a1adc546 Author: Hawking Zhang Date: Mon Mar 12 14:55:48 2018 +0800 drm/amdgpu/gfx9: add golden setting for vega12 (v3) Add gfx9_2_1 golden setting. v2: switch to soc15_program_register_sequence for golden setting programming v3: squash in additional golden updates Acked-by: Christian König Signed-off-by: Feifei Xu Reviewed-by: Ken Wang Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 44 +++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) commit 23862464f806ceab84854ba2422774b29a7225bc Author: Alex Deucher Date: Sat Sep 2 02:26:50 2017 -0400 drm/amdgpu/gfx9: add clockgating support for vega12 Same as vega10 and raven. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + 1 file changed, 1 insertion(+) commit 8b399477554b918eed48c7048bf9b11c4d3782d3 Author: Alex Deucher Date: Sat Sep 2 02:26:09 2017 -0400 drm/amdgpu/gfx9: add support for vega12 Same as vega10 and raven. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 ++ 1 file changed, 2 insertions(+) commit e5c62eddd10d0428d9102b4864cc4322749a7c41 Author: Alex Deucher Date: Sat Sep 2 02:24:39 2017 -0400 drm/amdgpu/gfx9: add gfx config for vega12 Just a place holder for now. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d5e8ef06485d4d2a1ed1bd03b259191a3022473d Author: Alex Deucher Date: Sat Sep 2 02:22:49 2017 -0400 drm/amdgpu/gfx9: Add placeholder for vega12 golden settings Fill these in when we get them. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++ 1 file changed, 3 insertions(+) commit 739ffd9b47aed90470abe36c9344881ca5ff6d24 Author: Alex Deucher Date: Sat Sep 2 02:10:18 2017 -0400 drm/amdgpu/gfx9: add support for vega12 firmware Declare and fetch the appriopriate files. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f06a32e4d265b27e029899549e48b83feab4e9e9 Author: Feifei Xu Date: Tue Mar 6 22:47:18 2018 -0500 drm/amdgpu/sdma4: Update vega12 sdma golden setting. Update vega12 sdma golden setting. Acked-by: Christian König Signed-off-by: Feifei Xu Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9acdc00c2425ad7baf4b46cbfbf3b0d523915216 Author: Hawking Zhang Date: Mon Mar 12 14:45:38 2018 +0800 drm/amdgpu/sdma4: add sdma4_0_1 support for vega12 (v3) Add sdma golden setting for vega12. v2: switch to soc15_program_register_sequence for golden register programming v3: squash in unused declaration fix Acked-by: Christian König Signed-off-by: Feifei Xu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 900bad3fe92783472ea93cc662a83a03d5a8583b Author: Alex Deucher Date: Fri Sep 1 16:50:28 2017 -0400 drm/amdgpu/sdma4: add clockgating support for vega12 Same as vega10 for now. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 1 + 1 file changed, 1 insertion(+) commit 607c26a0ea335295938e7cc1a690a86d6c4faac6 Author: Alex Deucher Date: Fri Sep 1 16:43:47 2017 -0400 drm/amdgpu/sdma4: Add placeholder for vega12 golden settings Fill these in when we get them. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 3 +++ 1 file changed, 3 insertions(+) commit 2e24ada2fc78498fd8014e5e171cdf99f4a147f3 Author: Alex Deucher Date: Fri Sep 1 16:41:07 2017 -0400 drm/amdgpu/sdma4: specify vega12 firmware Declare the firmware and fetch the proper file. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 5 +++++ 1 file changed, 5 insertions(+) commit f8d27677e1015b47367c9f16155b770c34d2bcf4 Author: Alex Deucher Date: Fri Sep 1 16:39:10 2017 -0400 drm/amdgpu/mmhub: add clockgating support for vega12 Treat it the same as vega10 for now. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 1 + 1 file changed, 1 insertion(+) commit 273a14cd1514345d66911de01d3bbe3c4c107e5c Author: Alex Deucher Date: Tue Mar 13 20:25:08 2018 -0500 drm/amdgpu/gmc9: add vega12 support (v2) Same as vega10. v2: squash in golden regs fix from Feifei Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 4 ++++ 1 file changed, 4 insertions(+) commit 57e6b6f2303e596a6493078b53be14b789e7b79f Author: Hans Verkuil Date: Sun Feb 25 06:55:32 2018 -0500 media: atomisp_fops.c: disable atomisp_compat_ioctl32 The atomisp_compat_ioctl32() code has problems. This patch disables the compat_ioctl32 support until those issues have been fixed. Contact Sakari or me for more details. Signed-off-by: Hans Verkuil Cc: # for v4.12 and up Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 06ed2a6d60c772dcf66e96e2d51bc03566c556ed Author: Corentin Labbe Date: Thu Feb 22 03:19:25 2018 -0500 media: staging: media: atomisp: Remove inclusion of non-existing directories This patch fix the following build warnings: CC [M] drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.o cc1: warning: drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bayer_ls/bayer_ls_1.0/: No such file or directory [-Wmissing-include-dirs] cc1: warning: drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/plane_io_ls/: No such file or directory [-Wmissing-include-dirs] cc1: warning: drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/yuv420_io_ls/: No such file or directory [-Wmissing-include-dirs] cc1: warning: drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/plane_io_ls/: No such file or directory [-Wmissing-include-dirs] cc1: warning: drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/yuv420_io_ls/: No such file or directory [-Wmissing-include-dirs] cc1: warning: drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a_stat_ls/: No such file or directory [-Wmissing-include-dirs] cc1: warning: drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/scale/: No such file or directory [-Wmissing-include-dirs] cc1: warning: drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/scale/scale_1.0/: No such file or directory [-Wmissing-include-dirs] cc1: warning: drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/yuv_ls: No such file or directory [-Wmissing-include-dirs] cc1: warning: drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/yuv_ls/yuv_ls_1.0/: No such file or directory [-Wmissing-include-dirs] by removing the inclusion of such directories Signed-off-by: Corentin Labbe Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/Makefile | 10 ---------- 1 file changed, 10 deletions(-) commit 0c5286a8222e1d178f57115401673ac34126a510 Merge: 78230c4 1c7095d Author: Dave Airlie Date: Thu Mar 22 05:36:14 2018 +1000 Merge tag 'drm-misc-next-2018-03-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 4.17: Cross-subsystem Changes: dt-bindings: Add emtrion vendor prefix (Jan) Core Changes: drm_print: More object size reductions (Joe) Driver Changes: vc4: Fix alpha blending on bottom plane (Stefan) panel: Add Raydium RM68200 panel support (Phillipe) panel: Add AUO G104SN02 V2 panel support (Christoph) panel: Add KEO TX31D200VM0BAA panel support (Jagan) vga_switcheroo: Use device link to bookkeep HDA runtime pm (Lukas) rockchip: More CrOS kevin patches trickling in (various sun4i: Add A80 support (Chen-Yu) sun4i: Add YUV plane support (Maxime) meson: Multiple (mostly error-path) fixups (Christophe/Wei) Cc: Stefan Schake Cc: Philippe CORNU Cc: jan.tuerk@emtrion.com Cc: Christoph Fritz Cc: Jagan Teki Cc: Lukas Wunner Cc: Joe Perches Cc: Chen-Yu Tsai Cc: Christophe JAILLET Cc: Wei Yongjun * tag 'drm-misc-next-2018-03-21' of git://anongit.freedesktop.org/drm/drm-misc: (70 commits) drm/qxl: Replace drm_gem_object_reference/unreference() with _get/put() drm/meson: Fix potential NULL dereference in meson_drv_bind_master() drm/sun4i: backend: Support YUV planes drm/sun4i: backend: Check that we only have a single YUV plane drm/sun4i: Add driver support for A80 display pipeline drm/sun4i: Add compatible strings for the A80 display pipeline drm/sun4i: Add support for A80 TCONs drm/sun4i: Add DT binding for Detail Enhancement Unit in Allwinner A80 SoC drm/sun4i: Add compatible strings for A80 TCONs drm: Reduce object size of DRM_DEV_ uses drm/doc: Put all driver docs into a separate chapter drm: dma_bufs: Fixed checkpatch issues drm: remove drm_mode_object_{un/reference} aliases drm: Add PSR version 3 macro drm/vc4_validate: Remove VLA usage drm: Make drm_mode_vrefresh() a bit more accurate drm: Nuke the useless 'ret' variable from drm_mode_convert_umode() drm/i915: Use drm_color_lut_size() drm/i915: Remove the blob->data casts drm: Introduce drm_color_lut_size() ... commit 6dc9a2568f84084e5e2a606d60a739e0779a5959 Author: Jeremy Sowden Date: Tue Dec 19 11:35:13 2017 -0500 media: atomisp: convert default struct values to use compound-literals with designated initializers The CSS API uses a lot of nested anonymous structs defined in object macros to assign default values to its data-structures. These have been changed to use compound-literals and designated initializers to make them more comprehensible and less fragile. The compound-literals can also be used in assignment, which means we can get rid of some temporary variables whose only purpose is to be initialized by one of these anonymous structs and then serve as the rvalue in an assignment expression. A lot of the members of the default struct values used by the CSS API were explicitly initialized to zero values. Designated initializers have allowed these members, and in some case whole default struct values, to be removed. Signed-off-by: Jeremy Sowden Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../hive_isp_css_common/input_formatter_global.h | 16 --- .../pci/atomisp2/css2400/ia_css_frame_public.h | 29 ++---- .../atomisp/pci/atomisp2/css2400/ia_css_pipe.h | 113 ++++++++------------- .../pci/atomisp2/css2400/ia_css_pipe_public.h | 108 +++----------------- .../atomisp/pci/atomisp2/css2400/ia_css_types.h | 64 +++--------- .../isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h | 50 +-------- .../kernels/sdis/common/ia_css_sdis_common_types.h | 31 ++---- .../isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.c | 3 +- .../runtime/binary/interface/ia_css_binary.h | 88 ++-------------- .../atomisp2/css2400/runtime/binary/src/binary.c | 3 +- .../isp_param/interface/ia_css_isp_param_types.h | 9 -- .../runtime/pipeline/interface/ia_css_pipeline.h | 24 ++--- .../css2400/runtime/pipeline/src/pipeline.c | 7 +- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 31 ++---- .../atomisp/pci/atomisp2/css2400/sh_css_legacy.h | 11 -- .../atomisp/pci/atomisp2/css2400/sh_css_metrics.h | 21 ---- 16 files changed, 116 insertions(+), 492 deletions(-) commit d82a4a14d4ab4e7e00117594750938f69d4841c5 Author: Corentin Labbe Date: Mon Jan 29 08:11:51 2018 -0500 media: staging: media: atomisp2: remove unused headers All thoses headers are not used by any source files. Lets just remove them. Signed-off-by: Corentin Labbe Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/include/linux/vlv2_plat_clock.h | 30 - .../css2400/css_2400_system/hrt/gp_regs_defs.h | 22 - .../atomisp2/css2400/css_2400_system/hrt/sp_hrt.h | 24 - .../css_2401_csi2p_system/hrt/gp_regs_defs.h | 22 - .../css2400/css_2401_csi2p_system/hrt/sp_hrt.h | 24 - .../css2400/css_2401_system/hrt/gp_regs_defs.h | 22 - .../atomisp2/css2400/css_2401_system/hrt/sp_hrt.h | 24 - .../atomisp/pci/atomisp2/css2400/css_api_version.h | 673 ----------- .../host/hive_isp_css_ddr_hrt_modified.h | 148 --- .../host/hive_isp_css_hrt_modified.h | 79 -- .../css2400/hive_isp_css_common/resource_global.h | 35 - .../css2400/hive_isp_css_common/xmem_global.h | 20 - .../atomisp2/css2400/hive_isp_css_include/bamem.h | 46 - .../css2400/hive_isp_css_include/bbb_config.h | 27 - .../css2400/hive_isp_css_include/cpu_mem_support.h | 59 - .../hive_isp_css_include/host/isp2400_config.h | 24 - .../hive_isp_css_include/host/isp2500_config.h | 29 - .../hive_isp_css_include/host/isp2600_config.h | 34 - .../hive_isp_css_include/host/isp2601_config.h | 70 -- .../css2400/hive_isp_css_include/host/isp_config.h | 24 - .../css2400/hive_isp_css_include/host/isp_op1w.h | 844 -------------- .../hive_isp_css_include/host/isp_op1w_types.h | 54 - .../css2400/hive_isp_css_include/host/isp_op2w.h | 674 ----------- .../hive_isp_css_include/host/isp_op2w_types.h | 49 - .../hive_isp_css_include/host/isp_op_count.h | 226 ---- .../hive_isp_css_include/host/osys_public.h | 20 - .../hive_isp_css_include/host/pipeline_public.h | 18 - .../hive_isp_css_include/host/ref_vector_func.h | 1221 -------------------- .../host/ref_vector_func_types.h | 385 ------ .../atomisp2/css2400/hive_isp_css_include/mpmath.h | 329 ------ .../atomisp2/css2400/hive_isp_css_include/osys.h | 47 - .../css2400/hive_isp_css_include/stream_buffer.h | 47 - .../css2400/hive_isp_css_include/vector_func.h | 38 - .../css2400/hive_isp_css_include/vector_ops.h | 31 - .../atomisp2/css2400/hive_isp_css_include/xmem.h | 46 - .../css2400/hive_isp_css_shared/socket_global.h | 53 - .../hive_isp_css_shared/stream_buffer_global.h | 26 - .../css2400/isp/kernels/aa/aa_2/ia_css_aa2_state.h | 41 - .../bayer_ls_1.0/ia_css_bayer_load_param.h | 20 - .../bayer_ls/bayer_ls_1.0/ia_css_bayer_ls_param.h | 42 - .../bayer_ls_1.0/ia_css_bayer_store_param.h | 21 - .../css2400/isp/kernels/bnlm/ia_css_bnlm_state.h | 31 - .../isp/kernels/cnr/cnr_1.0/ia_css_cnr_state.h | 33 - .../isp/kernels/cnr/cnr_2/ia_css_cnr_state.h | 33 - .../isp/kernels/dp/dp_1.0/ia_css_dp_state.h | 36 - .../css2400/isp/kernels/dpc2/ia_css_dpc2_state.h | 30 - .../isp/kernels/eed1_8/ia_css_eed1_8_state.h | 40 - .../io_ls/plane_io_ls/ia_css_plane_io_param.h | 22 - .../io_ls/plane_io_ls/ia_css_plane_io_types.h | 30 - .../io_ls/yuv420_io_ls/ia_css_yuv420_io_param.h | 22 - .../io_ls/yuv420_io_ls/ia_css_yuv420_io_types.h | 22 - .../ipu2_io_ls/plane_io_ls/ia_css_plane_io_param.h | 22 - .../ipu2_io_ls/plane_io_ls/ia_css_plane_io_types.h | 30 - .../yuv420_io_ls/ia_css_yuv420_io_param.h | 22 - .../yuv420_io_ls/ia_css_yuv420_io_types.h | 22 - .../isp/kernels/norm/norm_1.0/ia_css_norm_types.h | 21 - .../kernels/s3a_stat_ls/ia_css_s3a_stat_ls_param.h | 45 - .../s3a_stat_ls/ia_css_s3a_stat_store_param.h | 21 - .../kernels/scale/scale_1.0/ia_css_scale_param.h | 20 - .../isp/kernels/sdis/common/ia_css_sdis_param.h | 22 - .../isp/kernels/sdis/sdis_1.0/ia_css_sdis_param.h | 21 - .../isp/kernels/sdis/sdis_2/ia_css_sdis_param.h | 21 - .../xnr/xnr_3.0/ia_css_xnr3_wrapper_param.h | 20 - .../yuv_ls/yuv_ls_1.0/ia_css_yuv_load_param.h | 20 - .../yuv_ls/yuv_ls_1.0/ia_css_yuv_ls_param.h | 39 - .../yuv_ls/yuv_ls_1.0/ia_css_yuv_store_param.h | 21 - .../css2400/isp/modes/interface/isp_exprs.h | 286 ----- .../atomisp/pci/atomisp2/include/hmm/hmm_bo_dev.h | 126 -- .../atomisp/pci/atomisp2/include/mmu/sh_mmu.h | 72 -- 69 files changed, 6818 deletions(-) commit 01b610594feeb5192b06f31d8ebf93db5e032c4f Author: Corentin Labbe Date: Mon Jan 29 07:16:07 2018 -0500 media: staging: media: remove remains of VIDEO_ATOMISP_OV8858 OV8858 files are left unusable since commit 3a81c7660f80 ("media: staging: atomisp: Remove IMX sensor support") They are uncompilable since they depends on dw9718.c and vcm.c which was removed. Remove the OV8858 kconfig and files. Signed-off-by: Corentin Labbe Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/Kconfig | 12 - drivers/staging/media/atomisp/i2c/ov8858.c | 2169 ----------------------- drivers/staging/media/atomisp/i2c/ov8858.h | 1474 --------------- drivers/staging/media/atomisp/i2c/ov8858_btns.h | 1276 ------------- 4 files changed, 4931 deletions(-) commit b0e84815a805642b74d040239c4e35ea38086a01 Author: Colin Ian King Date: Fri Jan 26 09:44:24 2018 -0500 media: staging: atomisp: remove redundant assignments to various variables There are various assignments that are being made to variables that are not read and the variables are being updated later on, hence the redundant assignments can be removed. Cleans up clang warnings: drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:1950:8: warning: Value stored to 'pdata' during its initialization is never read drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:1853:29: warning: Value stored to 'asd' during its initialization is never read drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c:4505:29: warning: Value stored to 'asd' during its initialization is never read drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c:1139:30: warning: Value stored to 'asd' during its initialization is never read drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:6961:27: warning: Value stored to 'tmp_in_info' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 2 +- drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 2 +- drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 2 +- drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 1 - drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) commit a9b539a6fbb9b5c62f36799b970e29fbac469483 Author: Arnd Bergmann Date: Fri Feb 2 10:19:41 2018 -0500 media: staging: media: atomisp: remove pointless string copy gcc-8 points out that a string is copied to itself here: In file included from drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/platform_support.h:25, from drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/memory_access/memory_access.h:48, from drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c:16: In function 'strncpy', inlined from 'ia_css_debug_pipe_graph_dump_stage' at drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h:158:2: include/linux/string.h:253:9: error: '__builtin_strncpy' source argument is the same as destination [-Werror=restrict] return __builtin_strncpy(p, q, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This removes the bogus code, leaving the behavior otherwise unchanged. Signed-off-by: Arnd Bergmann Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit f87c6898abb28305d141a1fa07b3dbd52a3141d8 Author: Alona Solntseva Date: Mon Feb 5 08:14:52 2018 -0500 media: drivers: staging: media: atomisp: pci: atomisp2: css2400: fix misspellings Misspelled words are fixed in several places. Signed-off-by: Alona Solntseva Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit ca8996cf3fa5db81460fa94ccedc890ef45162e9 Author: Jacopo Mondi Date: Mon Mar 12 09:43:05 2018 -0400 media: MAINTAINERS: Add entry for Aptina MT9T112 Add entry for Aptina/Micron MT9T112 camera sensor. The driver is maintained by me for "Odd Fixes" only due to lack of suitable hardware for testing. Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit c2f9b05fd5c1290721cc1eb7646c6827fe24903f Author: Jacopo Mondi Date: Mon Mar 12 09:43:04 2018 -0400 media: arch: sh: ecovec: Use new renesas-ceu camera driver SH4 7724 Ecovec platform uses sh_mobile_ceu camera driver, which is now being replaced by a proper V4L2 camera driver named 'renesas-ceu'. Get rid of soc_camera defined components used to register sensor drivers and of platform specific enable/disable routines. Register GPIOs for sensor drivers and declare memory reserved with memblock APIs as dma capable to be used for CEU buffers. While at there re-order include directives to respect alphabetical ordering. Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab arch/sh/boards/mach-ecovec24/setup.c | 338 ++++++++++++++++----------------- arch/sh/kernel/cpu/sh4a/clock-sh7724.c | 4 +- 2 files changed, 171 insertions(+), 171 deletions(-) commit 6a26f141bf6200a1b3537c24bd4a8d37f23fbe57 Author: Jacopo Mondi Date: Mon Mar 12 09:43:03 2018 -0400 media: i2c: mt9t112: Remove soc_camera dependencies Remove soc_camera framework dependencies from mt9t112 sensor driver. - Handle clk, gpios and power routines - Register async subdev - Remove deprecated g/s_mbus_config operations - Remove driver flags - Change driver interface and add kernel doc - Adjust build system - Fix code style issues reported by checkpatch in strict mode This commit does not remove the original soc_camera based driver as long as other platforms depends on soc_camera framework. As I don't have access to a working camera module, this change has only been compile tested. Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 11 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/mt9t112.c | 403 ++++++++++++++++----------------- drivers/media/i2c/soc_camera/mt9t112.c | 2 +- include/media/i2c/mt9t112.h | 17 +- 5 files changed, 210 insertions(+), 224 deletions(-) commit 7641b04421954ea092b8fa7edbf904c3852875b5 Author: Jacopo Mondi Date: Mon Mar 12 09:43:02 2018 -0400 media: i2c: Copy mt9t112 soc_camera sensor driver Copy the soc_camera based driver in v4l2 sensor driver directory. This commit just copies the original file without modifying it. No modification to KConfig and Makefile as soc_camera framework dependencies need to be removed first in next commit. Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9t112.c | 1163 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1163 insertions(+) commit dca7b4015cb0d7a038e4bd9b903bad132b1badee Author: Alex Deucher Date: Sat Sep 2 02:05:29 2017 -0400 drm/amdgpu: add vega12 to dc support check DC is used for modesetting on vega12. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1 insertion(+) commit b6a8a2bc83f8b2c577faf5c2070f5096ae170d30 Author: Jerry (Fangzhi) Zuo Date: Wed Nov 22 14:16:13 2017 -0500 drm/amd/display: Add bios firmware info version for VG12 VG12 shows minor revision version of 2 which is not handled in bios_parser_get_firmware_info() routine. Acked-by: Christian König Signed-off-by: Jerry (Fangzhi) Zuo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 1 + 1 file changed, 1 insertion(+) commit 2325ff305e44bd061ab7f65c8683bd3fc33f30b2 Author: Alex Deucher Date: Sat Sep 2 02:01:55 2017 -0400 drm/amd/display/dm: add vega12 support Add support for vega12 to the display manager. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ 1 file changed, 4 insertions(+) commit f79f3fc1412e16ad7bbf18caca5f7c304f822eb6 Author: Alex Deucher Date: Fri Sep 1 16:37:59 2017 -0400 drm/amdgpu/virtual_dce: add vega12 support Add virtual dce support for vega12. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 1 + 1 file changed, 1 insertion(+) commit 9aa52bc48754237c692a07479f44fa6beda8b692 Author: Alex Deucher Date: Fri Sep 1 16:37:21 2017 -0400 drm/amdgpu: specify vega12 vce firmware Declare firmware and add support for the file. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 2327e6261ab2bc8dd6fa6b15e1d85c09e912631a Author: Alex Deucher Date: Fri Sep 1 16:35:30 2017 -0400 drm/amdgpu: specify vega12 uvd firmware Declare firmware and add support for the file. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 6b9c6e1b15418e0fb349b537e647ec607ae98fb7 Author: Feifei Xu Date: Fri Oct 20 10:25:55 2017 +0800 drm/amdgpu: add vega12 ucode loading method Same as vega10. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu Signed-off-by: Hawking Zhang drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 1 + 1 file changed, 1 insertion(+) commit eddfa8dfadf66c45bb3cfae8c33e81df22e3fb8c Author: Evan Quan Date: Wed Feb 7 09:34:22 2018 +0800 drm/amdgpu: initilize vega12 psp firmwares Acked-by: Christian König Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Acked-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 3 +++ 1 file changed, 3 insertions(+) commit ff13dc671de8489df3655ab30dcf1fe4a42ad9d3 Author: Alex Deucher Date: Tue Mar 6 22:18:09 2018 -0500 drm/amdgpu/psp: initial vega12 support Same as vega10 for now. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 1 + drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 ++ 2 files changed, 3 insertions(+) commit ad0ad9aa20f246a13686748dbca1da7e9f4011c8 Author: Hawking Zhang Date: Mon Mar 19 14:11:09 2018 -0500 drm/amdgpu: vega12 to smu firmware Add the cgs interface to query the smu firmware for vega12 and declare the firmware. Acked-by: Christian König Signed-off-by: Alex Deucher Signed-off-by: Hawking Zhang drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 +++ drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 1 + 2 files changed, 4 insertions(+) commit e48a3cd9cbb707e5f3531c1cd6e6fe6ee3a18212 Author: Alex Deucher Date: Fri Sep 1 16:22:35 2017 -0400 drm/amdgpu: set asic family and ip blocks for vega12 soc15 just like vega10 and raven. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3f76dcedb30383b63e60d720990e8de29b7e611a Author: Alex Deucher Date: Fri Sep 1 16:20:53 2017 -0400 drm/amdgpu: add gpu_info firmware for vega12 Stores gpu configuration details. Acked-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8fab806ad1f5a3a2d15712cc5a2dbb73daaa7261 Author: Feifei Xu Date: Thu Oct 19 17:04:54 2017 +0800 drm/amdgpu: add vega12 to asic_type enum Add vega12 to amd_asic_type enum and amdgpu_asic_name[]. Acked-by: Christian König Signed-off-by: Alex Deucher Signed-off-by: Hawking Zhang drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + include/drm/amd_asic_type.h | 1 + 2 files changed, 2 insertions(+) commit 133f97945f679ae0040a50f5933ef9a6563cb30b Author: Feifei Xu Date: Mon Oct 16 18:09:14 2017 +0800 drm/amd/include: Add ip header files for vega12. Add ip header files for IPs with a delta for vg12: GC, MMHUB, OSS Acked-by: Christian König Signed-off-by: Feifei Xu Reviewed-By: Ken Wang Signed-off-by: Alex Deucher .../drm/amd/include/asic_reg/gc/gc_9_2_1_offset.h | 7497 +++++ .../drm/amd/include/asic_reg/gc/gc_9_2_1_sh_mask.h | 31160 +++++++++++++++++++ .../include/asic_reg/mmhub/mmhub_9_3_0_offset.h | 1991 ++ .../include/asic_reg/mmhub/mmhub_9_3_0_sh_mask.h | 10265 ++++++ .../amd/include/asic_reg/oss/osssys_4_0_1_offset.h | 337 + .../include/asic_reg/oss/osssys_4_0_1_sh_mask.h | 1249 + 6 files changed, 52499 insertions(+) commit 751b1783da784299b0509adb6a9cd3024cc4f837 Author: Arnaldo Carvalho de Melo Date: Tue Mar 20 17:20:43 2018 -0300 perf annotate: Mark jumps to outher functions with the call arrow Things like this in _cpp_lex_token (gcc's cc1 program): cpp_named_operator2name@@Base+0xa72 Point to a place that is after the cpp_named_operator2name boundaries, i.e. in the ELF symbol table for cc1 cpp_named_operator2name is marked as being 32-bytes long, but it in fact is much larger than that, so we seem to need a symbols__find() routine that looks for >= current->start and < next_symbol->start, possibly just for C++ objects? For now lets just make some progress by marking jumps to outside the current function as call like. Actual navigation will come next, with further understanding of how the symbol searching and disassembly should be done. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-aiys0a0bsgm3e00hbi6fg7yy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 55 +++++++++++++++++++++++++++++++++++++++++++--- tools/perf/util/annotate.h | 1 + 2 files changed, 53 insertions(+), 3 deletions(-) commit 85a84e4f813912ab77d872ff6882dd7b435fbf4e Author: Arnaldo Carvalho de Melo Date: Tue Mar 20 16:19:08 2018 -0300 perf annotate: Pass function descriptor to its instruction parsing routines We need that to figure out if jumps have targets in a different function. E.g. _cpp_lex_token(), in /usr/libexec/gcc/x86_64-redhat-linux/5.3.1/cc1 has a line like this: jne c469be Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ris0ioziyp469pofpzix2atb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/s390/annotate/instructions.c | 5 +++-- tools/perf/util/annotate.c | 30 ++++++++++++++++------------ tools/perf/util/annotate.h | 2 +- 3 files changed, 21 insertions(+), 16 deletions(-) commit 6bd06f5a486c06023a618a86e8153b91d26f75f4 Author: Suravee Suthikulpanit Date: Wed Mar 21 12:46:19 2018 -0600 vfio/type1: Adopt fast IOTLB flush interface when unmap IOVAs VFIO IOMMU type1 currently upmaps IOVA pages synchronously, which requires IOTLB flushing for every unmapping. This results in large IOTLB flushing overhead when handling pass-through devices has a large number of mapped IOVAs. This can be avoided by using the new IOTLB flushing interface. Cc: Alex Williamson Cc: Joerg Roedel Signed-off-by: Suravee Suthikulpanit [aw - use LIST_HEAD] Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_type1.c | 126 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 115 insertions(+), 11 deletions(-) commit b2d109f24aa3062b2082d93ec1771d6e92ef8032 Author: Antti Palosaari Date: Tue Mar 13 19:27:57 2018 -0400 media: af9015: correct some coding style issues Correct coding style issues reported mostly by checkpatch.pl. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/af9015.c | 172 +++++++++++++++++----------------- 1 file changed, 88 insertions(+), 84 deletions(-) commit 8b79c7ab11c4de580972042244f078a1bb9ff0cd Author: Antti Palosaari Date: Thu Jul 13 02:42:52 2017 -0400 media: af9015: convert to regmap api Use regmap for chip register access. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/Kconfig | 1 + drivers/media/usb/dvb-usb-v2/af9015.c | 209 ++++++++++++++++++---------------- drivers/media/usb/dvb-usb-v2/af9015.h | 2 + 3 files changed, 115 insertions(+), 97 deletions(-) commit 19324414c954e68921271bfc1f4a235c90a557c6 Author: Antti Palosaari Date: Mon Jul 10 15:35:59 2017 -0400 media: dvb-usb-v2: add probe/disconnect callbacks Add probe and disconnect callbacks that behaves similarly than ones used commonly on Linux driver model. We need those to get early / late access to driver in order to use normal probe time stuff, like regmap, extra bus adapters and so. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/dvb_usb.h | 4 ++++ drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 24 ++++++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) commit 7772e380efcde7e6a2cdb731cf03b28582d6c51c Author: Antti Palosaari Date: Thu Jul 13 01:56:41 2017 -0400 media: af9015: enhance streaming config Replace static stream settings by one which enables and disables stream interface when needed (TS streaming control). 1) Configure both TS IF and USB endpoints according to current use case 2) Disable streaming USB endpoints when streaming is stopped and enable when streaming is started. Reduces sleep power consumption slightly. 3) Reduce USB buffersize slightly, from 130848 to 98136 bytes Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/af9015.c | 220 ++++++++++++++++++---------------- drivers/media/usb/dvb-usb-v2/af9015.h | 14 +-- 2 files changed, 115 insertions(+), 119 deletions(-) commit 0092293ec7981e9d46fa9103b07cfd63b3824b44 Author: Antti Palosaari Date: Mon Jun 26 07:15:27 2017 -0400 media: af9015: refactor copy firmware to slave demod Small improvements. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/af9015.c | 88 +++++++++++++++++------------------ 1 file changed, 44 insertions(+), 44 deletions(-) commit 2ffb2fa32e5aa7685bbb6d625ad8e418d74aa440 Author: Antti Palosaari Date: Mon Jun 26 06:02:59 2017 -0400 media: af9015: refactor firmware download Small revise, no functional changes. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/af9015.c | 39 +++++++++++++++-------------------- 1 file changed, 17 insertions(+), 22 deletions(-) commit ba2d559b29cbaeafe012b642a53fed23b64762ea Author: Antti Palosaari Date: Mon Jun 26 05:02:50 2017 -0400 media: af9015: use af9013 demod pid filters PID filters are moved to af9013 demod driver as those are property of demod. As pid filters are now implemented correctly by demod driver, we could enable pid filter support for possible slave demod too on dual tuner configuration. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/af9015.c | 49 +++++++++++++---------------------- 1 file changed, 18 insertions(+), 31 deletions(-) commit 83d6b7c3276fc056e65957b23c0ef7a3e9a50c18 Author: Antti Palosaari Date: Mon Jun 26 04:57:09 2017 -0400 media: af9013: add pid filter support af9013 demod has pid filter. Add support for it. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 52 ++++++++++++++++++++++++++++++++++++ drivers/media/dvb-frontends/af9013.h | 5 ++++ 2 files changed, 57 insertions(+) commit 12c6b22fbf2379e0b194289227848f4f0439e5c3 Author: Antti Palosaari Date: Fri Jun 23 05:31:49 2017 -0400 media: af9013: remove all legacy media attach releated stuff No one is binding that driver through media attach so remove it and all related dead code. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 80 ------------------------------------ drivers/media/dvb-frontends/af9013.h | 42 ++++--------------- 2 files changed, 7 insertions(+), 115 deletions(-) commit 04c611e3168e03702350bccaf5f9e83fb8f489db Author: Antti Palosaari Date: Fri Jun 23 05:17:00 2017 -0400 media: af9015: attach demod using i2c binding af9013 demod driver has i2c binding. Use it. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/af9015.c | 158 ++++++++++++++++++++-------------- drivers/media/usb/dvb-usb-v2/af9015.h | 4 +- 2 files changed, 96 insertions(+), 66 deletions(-) commit 22e59e7204a46d9f3c6abc02909927a19640f91f Author: Antti Palosaari Date: Thu Jun 22 12:18:21 2017 -0400 media: af9013: add i2c mux adapter for tuner bus Add muxed i2c adapter for demod tuner i2c bus gate control. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/Kconfig | 2 +- drivers/media/dvb-frontends/af9013.c | 126 +++++++++++++++++++++++++----- drivers/media/dvb-frontends/af9013.h | 1 + drivers/media/dvb-frontends/af9013_priv.h | 1 + 4 files changed, 111 insertions(+), 19 deletions(-) commit 3b536127f514217d18c04304cb859841ec63bda7 Author: Antti Palosaari Date: Thu Jun 22 04:24:00 2017 -0400 media: af9013: convert inittabs suitable for regmap_update_bits Convert inttabs to format (reg, mask, val) which are suitable parameters to pass directly for regmap_update_bits. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 62 +- drivers/media/dvb-frontends/af9013_priv.h | 1488 +++++++++++++++-------------- 2 files changed, 782 insertions(+), 768 deletions(-) commit 49bade9f0eef207186b240e70d1eab418e4f1678 Author: Antti Palosaari Date: Wed Jun 21 16:55:54 2017 -0400 media: af9015: fix logging Pass correct device to dev_* logging functions, which allows us to remove redundant KBUILD_MODNAME and __func__ parameters from log format. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/af9015.c | 160 +++++++++++++++++----------------- 1 file changed, 81 insertions(+), 79 deletions(-) commit b911fc89e12c0cfc47e7501e7e1d930c98d403a9 Author: Antti Palosaari Date: Mon Jun 19 02:31:56 2017 -0400 media: af9013: wrap dvbv3 statistics via dvbv5 Driver has calculated dvbv5 statistics, so use those as a base for legacy dvbv3 statistics. Wrap and convert needed values to dvbv3, remove old dvbv3 statistic implementations. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 306 +++--------------------------- drivers/media/dvb-frontends/af9013_priv.h | 68 ------- 2 files changed, 22 insertions(+), 352 deletions(-) commit 233f3ef71c1abc2f5577e4617c76f4f3168ddd6e Author: Antti Palosaari Date: Sun Jun 18 13:26:35 2017 -0400 media: af9013: dvbv5 ber and per Implement dvbv5 ber and per. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 73 +++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) commit f3bb7e22b1854e7295800bd30b4ae08e5b69e3c3 Author: Antti Palosaari Date: Sun Jun 18 06:23:15 2017 -0400 media: af9013: dvbv5 cnr Implement dvbv5 cnr. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 88 +++++++++++++++++++++++++++++-- drivers/media/dvb-frontends/af9013_priv.h | 1 + 2 files changed, 84 insertions(+), 5 deletions(-) commit 943a720f5c5c970e3961ccbf43b94cdcb645696a Author: Antti Palosaari Date: Sun Jun 18 01:17:49 2017 -0400 media: af9013: dvbv5 signal strength Implement dvbv5 signal strength estimate. We know tuner dependent -80dBm and -50dBm agc values, construct line equation and use it to map agc value to signal strength estimate. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 83 +++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 2 deletions(-) commit 7903fbe3a636dbee04e5623931013feb80aab817 Author: Antti Palosaari Date: Wed Jun 21 11:02:42 2017 -0400 media: af9013: change lock detection slightly Whilst rewritten largely, the basic logic remains same with one exception: do not return immediately on success case. We are going to add statistics that function and cannot return too early. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.c | 55 ++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 28 deletions(-) commit 35ecf2b4d24adf944b1cdce4941b3e82d0713111 Author: Sean Young Date: Sun Mar 18 06:46:02 2018 -0400 media: rc: mceusb: pid 0x0609 vid 0x031d does not under report carrier cycles This mceusb does not need the carrier count quirk, with it set it reports the carrier higher than it is. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/mceusb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 279c60fd896dcab4b4ae1016f62a7e75b19746d1 Author: A Sun Date: Fri Mar 16 15:52:09 2018 -0400 media: mceusb: add IR learning support features (IR carrier frequency measurement and wide-band/short-range receiver) Windows Media Center IR transceivers include two IR receivers; wide-band/short-range and narrow-band/long-range. The short-range (5cm distance) receiver is for IR learning and has IR carrier frequency measuring ability. Add mceusb driver support to select the short range IR receiver and enable pass through of its IR carrier frequency measurements. RC and LIRC already support these mceusb driver additions. Test platform: Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux mceusb 1-1.2:1.0: Registered Pinnacle Systems PCTV Remote USB with mce emulator interface version 1 mceusb 1-1.2:1.0: 2 tx ports (0x0 cabled) and 2 rx sensors (0x1 active) Sony TV remote control ir-ctl from v4l-utils pi@raspberrypi:~ $ ir-ctl -V IR raw version 1.12.3 pi@raspberrypi:~ $ ir-ctl -m -r ... pulse 650 space 550 pulse 650 space 600 pulse 600 space 600 pulse 1200 space 600 pulse 650 space 550 pulse 650 space 600 pulse 600 space 600 pulse 550 carrier 40004 space 16777215 ^C pi@raspberrypi:~ $ exit Signed-off-by: A Sun Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/mceusb.c | 152 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 140 insertions(+), 12 deletions(-) commit b358e747aebc4a52f20732d569ec04c6bc15d008 Author: Sean Young Date: Mon Mar 12 17:23:00 2018 -0400 media: rc: meson-ir: lower timeout and make configurable A timeout of 200ms is much longer than necessary, and delays the decoding decoding of a single scancode and the last scancode when a button is being held. This makes the remote seem sluggish. If the min_timeout and max_timeout values are set, the timeout is configurable via the LIRC_SET_REC_TIMEOUT ioctl. Tested-by: Matthias Reichl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/meson-ir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8d7a77ce56cdb5f50b83ca0c59a31362e1a5eeb4 Author: Sean Young Date: Thu Mar 8 09:42:44 2018 -0500 media: rc: meson-ir: add timeout on idle Meson doesn't seem to be able to generate timeout events in hardware. So install a software timer to generate the timeout events required by the decoders to prevent "ghost keypresses". Reported-by: Matthias Reichl Tested-by: Matthias Reichl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/meson-ir.c | 3 +-- drivers/media/rc/rc-ir-raw.c | 30 +++++++++++++++++++++++++++--- include/media/rc-core.h | 4 +++- 3 files changed, 31 insertions(+), 6 deletions(-) commit ae35c4835699933335e76ab2d6a245303592ceea Author: Marek Szyprowski Date: Wed Mar 21 10:46:39 2018 +0100 ARM: EXYNOS: Simplify code in coupled CPU idle hot path exynos_enter_aftr() is called by coupled CPU idle code every time CPU enters idle state, what can be considered as a hot path. Replace of_machine_is_compatible() call with a simple SoC revision check. of_machine_is_compatible() function performs a dozen of string comparisons during the full device tree walk, while soc_is_exynos4412() is a simple integer check on SoC revision variable. Signed-off-by: Marek Szyprowski Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Krzysztof Kozlowski arch/arm/mach-exynos/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7480dbcf983c31d8111f864c848e8a75116a87d Author: Marek Szyprowski Date: Wed Mar 21 10:45:05 2018 +0100 ARM: EXYNOS: Fix coupled CPU idle freeze on Exynos4210 Since commit 04c8b0f82c7d ("irqchip/gic: Make locking a BL_SWITCHER only feature") coupled CPU idle freezes from time to time on Exynos4210. Later commit 313c8c16ee62 ("PM / CPU: replace raw_notifier with atomic_notifier") changed the context in which the CPU idle code is executed, what results in fully reproducible freeze all the time. However, almost the same coupled CPU idle code works fine on Exynos3250 regardless of the changes made in the mentioned commits. It turned out that the IPI call used on Exynos4210 is conflicting with the change done in the first mentioned commit in GIC. Fix this by using the same code path as for Exynos3250, instead of the IPI call for synchronization with second CPU core, call dsb_sev() directly. Tested on Exynos4210-based Trats and Origen boards. Signed-off-by: Marek Szyprowski CC: # v4.13+ Acked-by: Marc Zyngier Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Krzysztof Kozlowski arch/arm/mach-exynos/pm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit a6fff41f410bf030d5cd178154b8397536e714f9 Author: Ulrich Hecht Date: Mon Mar 19 17:37:45 2018 +0100 pinctrl: sh-pfc: r8a77995: Deduplicate VIN4 pin definitions Use union vin_data and VIN_DATA_PIN_GROUP() to reduce redundancies in pin definitions. Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 154 ++++++++-------------------------- 1 file changed, 36 insertions(+), 118 deletions(-) commit a5c2949ff7bd9e04be2cdd1b52af1acf9be82ba0 Author: Ulrich Hecht Date: Mon Mar 19 17:37:44 2018 +0100 pinctrl: sh-pfc: r8a7796: Deduplicate VIN4 pin definitions Use union vin_data and VIN_DATA_PIN_GROUP() to reduce redundancies in pin definitions. Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 308 ++++++++--------------------------- 1 file changed, 72 insertions(+), 236 deletions(-) commit 9942a5b52990b8d556d85dc8a84ddebb85d9a467 Author: Ulrich Hecht Date: Mon Mar 19 17:37:43 2018 +0100 pinctrl: sh-pfc: r8a7795: Deduplicate VIN4 pin definitions Use union vin_data and VIN_DATA_PIN_GROUP() to reduce redundancies in pin definitions. Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 308 ++++++++--------------------------- 1 file changed, 72 insertions(+), 236 deletions(-) commit 4fd82963e17b9aaa32b12a136583ceaac532caf6 Author: Ulrich Hecht Date: Mon Mar 19 17:37:20 2018 +0100 pinctrl: sh-pfc: r8a77995: Correct VIN4 18-bit pins RGB666 has a pin assignment that differs from the other formats. Fixes: fbd452aeb49e552e ("pinctrl: sh-pfc: r8a77995: Add VIN4 pins, groups and function") Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a66b68ba7f288093ea17802442622ac7c0691c92 Author: Ulrich Hecht Date: Mon Mar 19 17:37:19 2018 +0100 pinctrl: sh-pfc: r8a7796: Correct VIN4 18-bit pins RGB666 has a pin assignment that differs from the other formats. Fixes: 8db6cbabac4f2a02 ("pinctrl: sh-pfc: r8a7796: Add VIN4, VIN5 pins, groups and functions") Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit b538dc5bbb40dbf214987cc2f30915275057c948 Author: Ulrich Hecht Date: Mon Mar 19 17:37:18 2018 +0100 pinctrl: sh-pfc: r8a7795: Correct VIN4 18-bit pins RGB666 has a pin assignment that differs from the other formats. Fixes: 6b4de408105fc51e ("pinctrl: sh-pfc: r8a7795: Add VIN4, VIN5 pins, groups and functions") Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 3b047a9597e4e252991899f019bbfd0271cda814 Author: Geert Uytterhoeven Date: Mon Mar 12 14:54:47 2018 +0100 pinctrl: sh-pfc: r8a77995: Rename EtherAVB "mdc" pin group to "mdio" On other Renesas SoCs, the pin group for the MDIO bus is named "mdio" instead of "mdc". Fix the inconsistency, while retaining backwards compatibility with old DTBs using a pin group alias. Fixes: 66abd968d0ef3eb1 ("pinctrl: sh-pfc: r8a77995: Add EthernetAVB pins, groups and functions") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit f7ce295cfdf67404a9332e22127ee296c3512155 Author: Geert Uytterhoeven Date: Mon Mar 12 14:55:44 2018 +0100 pinctrl: sh-pfc: r8a77965: Rename EtherAVB "mdc" pin group to "mdio" On other Renesas SoCs, the pin group for the MDIO bus is named "mdio" instead of "mdc". Fix the inconsistency, while retaining backwards compatibility with old DTBs using a pin group alias. Fixes: fa3e8b71b955af86 ("pinctrl: sh-pfc: r8a77965: Add EtherAVB groups/functions") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 350aba9a74cc3e74ce53642daa9c94326d08c6c3 Author: Geert Uytterhoeven Date: Mon Mar 12 14:53:13 2018 +0100 pinctrl: sh-pfc: r8a7796: Rename EtherAVB "mdc" pin group to "mdio" On other Renesas SoCs, the pin group for the MDIO bus is named "mdio" instead of "mdc". Fix the inconsistency, while retaining backwards compatibility with old DTBs using a pin group alias. Fixes: 41397032c4a17dff ("pinctrl: sh-pfc: r8a7796: Add group for AVB MDIO and MII pins") Fixes: 9c99a63ec74f34f7 ("pinctrl: sh-pfc: r8a7796: Add EtherAVB pins, groups and functions") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 24cfe1a9704711a62eef3bc7b921c976abd27cd2 Author: Geert Uytterhoeven Date: Mon Mar 12 14:47:54 2018 +0100 pinctrl: sh-pfc: r8a7795-es1: Rename EtherAVB "mdc" pin group to "mdio" On other Renesas SoCs, the pin group for the MDIO bus is named "mdio" instead of "mdc". Fix the inconsistency, while retaining backwards compatibility with old DTBs using a pin group alias. Fixes: b25719eb938eb39a ("pinctrl: sh-pfc: r8a7795: Add group for AVB MDIO and MII pins") Fixes: 819fd4bfcc84805c ("pinctrl: sh-pfc: r8a7795: add EtherAVB support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit cbe0dd9ad5b2290ef5946890545446d008496966 Author: Geert Uytterhoeven Date: Mon Mar 12 14:45:09 2018 +0100 pinctrl: sh-pfc: r8a7795: Rename EtherAVB "mdc" pin group to "mdio" On other Renesas SoCs, the pin group for the MDIO bus is named "mdio" instead of "mdc". Fix the inconsistency, while retaining backwards compatibility with old DTBs using a pin group alias. Fixes: 30c078de6f3785fe ("pinctrl: sh-pfc: r8a7795: Add EtherAVB pins, groups and function") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 43a51cd5d623c6142ca050dffc25d5e9972a7a12 Author: Geert Uytterhoeven Date: Mon Mar 12 14:42:09 2018 +0100 pinctrl: sh-pfc: Add SH_PFC_PIN_GROUP_ALIAS() Add a macro to refer to another pin group with a different name. This will be used to rename wrongly-named pin groups, while retaining backwards compatibility with old DTBs. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund drivers/pinctrl/sh-pfc/sh_pfc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 66e9fe1ec73929a9f7326856699d262bab8e9fb0 Author: Geert Uytterhoeven Date: Mon Mar 12 13:13:47 2018 +0100 pinctrl: sh-pfc: r8a7790: Add missing TX_ER pin to avb_mii group The pin controller drivers for all R-Car Gen2 SoCs have entries for the EtherAVB TX_ER pins in their EtherAVB MII groups, except on R-Car H2. Add the missing pin to restore consistency. Note that technically TX_ER is an optional signal in the MII bus, and thus could have its own group, but this is currently not supported by any R-Car Gen2 pin controller driver. Fixes: 19ef697d1eb7be06 ("sh-pfc: r8a7790: add EtherAVB pin groups") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6c3b6d50839151c5d8a077610b5d8c3dc1e7e7b3 Author: Kees Cook Date: Thu Mar 15 09:59:16 2018 -0700 selftests/seccomp: Allow get_metadata to XFAIL Since seccomp_get_metadata() depends on CHECKPOINT_RESTORE, XFAIL the test if the ptrace reports it as missing. Signed-off-by: Kees Cook Acked-by: Tycho Andersen Signed-off-by: Shuah Khan tools/testing/selftests/kselftest_harness.h | 26 +++++++++++++++++++++++++- tools/testing/selftests/seccomp/seccomp_bpf.c | 15 +++++++++++++-- 2 files changed, 38 insertions(+), 3 deletions(-) commit 55c1b5f4af398f5776add417ddf8ae9cc574f0b7 Author: Anders Roxell Date: Thu Mar 8 15:37:41 2018 +0100 selftests/android/ion: Makefile: fix build error Fails to build iomap_test.c due to missing include gcc -I. -I../../../../../drivers/staging/android/uapi/ -Wall -O2 -g ionmap_test.c ipcsocket.c ionutils.c -o ionmap_test ionmap_test.c:12:27: fatal error: linux/dma-buf.h: No such file or directory #include ^ compilation terminated. : recipe for target 'ionmap_test' failed make[2]: *** [ionmap_test] Error 1 In the current code, we add a new -I ../../../../../usr/include/ to the INCLUDEDIR variable. Also add ionmap_test to the .gitignore file. Fixes: ac93f7046a53 ("selftests: ion: Add simple test with the vgem driver") Signed-off-by: Anders Roxell Acked-by: Laura Abbott Signed-off-by: Shuah Khan tools/testing/selftests/android/ion/.gitignore | 1 + tools/testing/selftests/android/ion/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 472f5f391819b4b22ec040f227aea26f515b6ae2 Author: Magnus Damm Date: Tue Mar 20 16:40:16 2018 +0900 clk: renesas: cpg-mssr: Adjust r8a77980 ifdef Adjust the R8A77980-specific #ifdefs to use CLK instead of ARCH to follow same style as other SoCs. Fixes: ce15783c510a9905 ("clk: renesas: cpg-mssr: add R8A77980 support") Signed-off-by: Magnus Damm Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/renesas-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b935d524d851830b68dd8c58d3098d775d6047a Author: Geert Uytterhoeven Date: Thu Mar 15 10:44:37 2018 +0100 clk: renesas: rcar-gen3: Always use readl()/writel() The R-Car Gen3 CPG/MSSR driver (again) uses a mix of clk_readl()/clk_writel() and readl()/writel() to access the clock registers. Settle on the generic readl()/writel(). Cfr. commit 30ad3cf00e94f4a7 ("clk: renesas: rcar-gen3-cpg: Always use readl()/writel()"). Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/clk/renesas/rcar-gen3-cpg.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit f046d6a6bf2a1f0db5e2f61b5236efb1b6bebfde Author: Geert Uytterhoeven Date: Thu Mar 15 10:44:30 2018 +0100 clk: renesas: sh73a0: Always use readl()/writel() On arm32, there is no reason to use the (soon deprecated) clk_readl()/clk_writel(). Hence use the generic readl()/writel() instead. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/clk/renesas/clk-sh73a0.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit fcf371b3517771589819ffefe2aa16b31f0b0a63 Author: Geert Uytterhoeven Date: Thu Mar 15 10:44:19 2018 +0100 clk: renesas: rza1: Always use readl()/writel() On arm32, there is no reason to use the (soon deprecated) clk_readl()/clk_writel(). Hence use the generic readl()/writel() instead. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/clk/renesas/clk-rz.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c669e504a62641fd7189df13ef57d182373e36f Author: Geert Uytterhoeven Date: Thu Mar 15 10:44:09 2018 +0100 clk: renesas: rcar-gen2: Always use readl()/writel() On arm32, there is no reason to use the (soon deprecated) clk_readl()/clk_writel(). Hence use the generic readl()/writel() instead. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/clk/renesas/clk-rcar-gen2.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit f32b0696eabd7a9dc6efd6a97448742d5f2a7db0 Author: Geert Uytterhoeven Date: Thu Mar 15 10:43:57 2018 +0100 clk: renesas: r8a7740: Always use readl()/writel() On arm32, there is no reason to use the (soon deprecated) clk_readl()/clk_writel(). Hence use the generic readl()/writel() instead. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/clk/renesas/clk-r8a7740.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b86b493eb29120b82ba919e2653c863c0b3804d6 Author: Geert Uytterhoeven Date: Thu Mar 15 10:43:47 2018 +0100 clk: renesas: r8a73a4: Always use readl()/writel() On arm32, there is no reason to use the (soon deprecated) clk_readl()/clk_writel(). Hence use the generic readl()/writel() instead. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/clk/renesas/clk-r8a73a4.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 8027519840653520c256cb5e7768b60af3bc895e Author: Geert Uytterhoeven Date: Thu Mar 15 10:43:37 2018 +0100 clk: renesas: mstp: Always use readl()/writel() On arm32, there is no reason to use the (soon deprecated) clk_readl()/clk_writel(). Hence use the generic readl()/writel() instead. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/clk/renesas/clk-mstp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c733c7d9374191cac6668ce6ea074909d036d8f4 Author: Geert Uytterhoeven Date: Thu Mar 15 10:43:12 2018 +0100 clk: renesas: div6: Always use readl()/writel() On arm32/arm64, there is no reason to use the (soon deprecated) clk_readl()/clk_writel(). Hence use the generic readl()/writel() instead. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/clk/renesas/clk-div6.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit e8fd0adf105e132fd84545997bbef3d5edc2c9c1 Author: Nicolas Ferre Date: Tue Mar 13 16:20:05 2018 +0100 ARM: dts: at91: at91sam9g25: fix mux-mask pinctrl property There are only 19 PIOB pins having primary names PB0-PB18. Not all of them have a 'C' function. So the pinctrl property mask ends up being the same as the other SoC of the at91sam9x5 series. Reported-by: Marek Sieranski Signed-off-by: Nicolas Ferre Cc: # v3.8+ Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9g25.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 649c0f12defbefc303d0cb7157b090c9cfd92944 Author: Scott Wood Date: Sun Jul 16 19:16:25 2017 -0500 ktest: Set do_not_reboot=y for CONFIG_BISECT_TYPE=build Currently setting do_not_reboot is triggered by simple builds and bisect builds, but not config bisect builds. Link: http://lkml.kernel.org/r/20170717001630.10518-3-swood@redhat.com Signed-off-by: Scott Wood Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 25bc70fa0968dacb40eec37d4340163df48b06cf Author: Scott Wood Date: Sun Jul 16 19:16:24 2017 -0500 ktest: Set buildonly=1 for CONFIG_BISECT_TYPE=build Rather than adding a third copy of the same logic, rework it to cover all three buildonly cases at once. In the future, please consider using the same variable to perform the same function regardless of context... Link: http://lkml.kernel.org/r/20170717001630.10518-2-swood@redhat.com Signed-off-by: Scott Wood Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 20f2e1aa77314decf395558fd3a13875c0e56074 Author: Johan Hovold Date: Wed Mar 7 04:49:36 2018 -0500 media: cpia2_usb: drop bogus interface-release call Drop bogus call to usb_driver_release_interface() from the disconnect() callback. As the interface is already being unbound at this point, usb_driver_release_interface() simply returns early. Signed-off-by: Johan Hovold Reviewed-by: Greg Kroah-Hartman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cpia2/cpia2_usb.c | 3 --- 1 file changed, 3 deletions(-) commit b1e064c25e8fce911d0d9b8a9cca1d3183cd7130 Author: Philipp Zabel Date: Mon Jan 22 11:16:32 2018 -0500 media: imx: add 8-bit grayscale support The IPUv3 code has 8-bit grayscale capture support. Enable imx-media to use it. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-csi.c | 1 + drivers/staging/media/imx/imx-media-utils.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) commit be2068bf648fd47a042a25fe998a3c7456101ae6 Author: Jean-Michel Hautbois Date: Tue Feb 13 12:48:56 2018 -0500 media: adv7604: Add support for i2c_new_secondary_device The ADV7604 has thirteen 256-byte maps that can be accessed via the main I2C ports. Each map has it own I2C address and acts as a standard slave device on the I2C bus. Allow a device tree node to override the default addresses so that address conflicts with other devices on the same bus may be resolved at the board description level. [Kieran: Re-adapted for mainline] Signed-off-by: Jean-Michel Hautbois Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7604.c | 62 +++++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 22 deletions(-) commit 9feb786876c711a11002dd35cae6c814abe354e9 Author: Jean-Michel Hautbois Date: Tue Feb 13 12:48:53 2018 -0500 media: dt-bindings: media: adv7604: Extend bindings to allow specifying slave map addresses The ADV7604 has thirteen 256-byte maps that can be accessed via the main I2C ports. Each map has it own I2C address and acts as a standard slave device on the I2C bus. Extend the device tree node bindings to be able to override the default addresses so that address conflicts with other devices on the same bus may be resolved at the board description level. [Kieran: Re-adapted for mainline] Signed-off-by: Jean-Michel Hautbois Signed-off-by: Kieran Bingham Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/adv7604.txt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 67537fe960e5f837436403b148fcc33a356aa4bb Author: Kieran Bingham Date: Tue Feb 27 10:05:50 2018 -0500 media: i2c: adv748x: Add support for i2c_new_secondary_device The ADV748x has twelve 256-byte maps that can be accessed via the main I2C ports. Each map has it own I2C address and acts as a standard slave device on the I2C bus. Allow a device tree node to override the default addresses so that address conflicts with other devices on the same bus may be resolved at the board description level. Signed-off-by: Kieran Bingham Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv748x/adv748x-core.c | 77 +++++++++++++++----------------- drivers/media/i2c/adv748x/adv748x.h | 14 ------ 2 files changed, 36 insertions(+), 55 deletions(-) commit 6dd3791dcf3051f47898a59553aaf21cd2cf8d1d Author: Steven Rostedt (VMware) Date: Wed Mar 21 12:08:02 2018 -0400 ktest: Comment about other names than just ktest.conf ktest.pl will read any file as long as its name is specified as the first argument on the command line. Comment this fact in sample.conf. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/sample.conf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 454bfe97837a3e3a5a15b768f8293f228e0f2f06 Merge: 0466080 78262f4 Author: David S. Miller Date: Wed Mar 21 12:08:01 2018 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2018-03-21 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Add a BPF hook for sendmsg and sendfile by reusing the ULP infrastructure and sockmap. Three helpers are added along with this, bpf_msg_apply_bytes(), bpf_msg_cork_bytes(), and bpf_msg_pull_data(). The first is used to tell for how many bytes the verdict should be applied to, the second to tell that x bytes need to be queued first to retrigger the BPF program for a verdict, and the third helper is mainly for the sendfile case to pull in data for making it private for reading and/or writing, from John. 2) Improve address to symbol resolution of user stack traces in BPF stackmap. Currently, the latter stores the address for each entry in the call trace, however to map these addresses to user space files, it is necessary to maintain the mapping from these virtual addresses to symbols in the binary which is not practical for system-wide profiling. Instead, this option for the stackmap rather stores the ELF build id and offset for the call trace entries, from Song. 3) Add support that allows BPF programs attached to perf events to read the address values recorded with the perf events. They are requested through PERF_SAMPLE_ADDR via perf_event_open(). Main motivation behind it is to support building memory or lock access profiling and tracing tools with the help of BPF, from Teng. 4) Several improvements to the tools/bpf/ Makefiles. The 'make bpf' in the tools directory does not provide the standard quiet output except for bpftool and it also does not respect specifying a build output directory. 'make bpf_install' command neither respects specified destination nor prefix, all from Jiri. In addition, Jakub fixes several other minor issues in the Makefiles on top of that, e.g. fixing dependency paths, phony targets and more. 5) Various doc updates e.g. add a comment for BPF fs about reserved names to make the dentry lookup from there a bit more obvious, and a comment to the bpf_devel_QA file in order to explain the diff between native and bpf target clang usage with regards to pointer size, from Quentin and Daniel. ==================== Signed-off-by: David S. Miller commit 71569850e3242db475a15b5e2674bf2b6e81d1a7 Author: Kieran Bingham Date: Tue Feb 27 10:05:49 2018 -0500 media: i2c: adv748x: Add missing CBUS page The ADV748x has 12 pages mapped onto I2C addresses. In the existing implementation only 11 are mapped correctly in the page enumerations, which causes an off-by-one fault on pages above the infoframe definition due to a missing 'CBUS' page. This causes the address for the CEC, SDP, TXA, and TXB to be incorrectly programmed during the iterations in adv748x_initialise_clients(). Until now this has gone un-noticed due to the fact that following the creation of the clients - the device is reset and the addresses are reprogrammed in manually by the call to "adv748x_write_regs(state, adv748x_set_slave_address);" As part of moving to dynamic i2c address allocations repair this by providing the missing CBUS page definition. Signed-off-by: Kieran Bingham Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv748x/adv748x-core.c | 3 +++ drivers/media/i2c/adv748x/adv748x.h | 2 ++ 2 files changed, 5 insertions(+) commit 06aa8f3aa9c409a3973e6d338a771500fcee014c Author: Kieran Bingham Date: Tue Feb 27 10:05:48 2018 -0500 media: i2c: adv748x: Simplify regmap configuration The ADV748x has identical map configurations for each register map. The duplication of each map can be simplified using a helper macro such that each map is represented on a single line. Define ADV748X_REGMAP_CONF for this purpose use it to create the tables. Signed-off-by: Kieran Bingham Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv748x/adv748x-core.c | 109 ++++++------------------------- 1 file changed, 20 insertions(+), 89 deletions(-) commit edbd0ede0078bde5eb539e175cd7e0e89cd82df0 Author: Scott Wood Date: Sun Jul 16 19:16:23 2017 -0500 ktest: Clarify config file usage Simply telling a new user to edit "the config file" without giving any hints on where that file should go, what it should be named, or where a template can be found, is not particularly helpful. Link: http://lkml.kernel.org/r/20170717001630.10518-1-swood@redhat.com Signed-off-by: Scott Wood Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 3 ++- tools/testing/ktest/sample.conf | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 3aab15af9ad8fa8dc0399cb4b679d7cb85c20a56 Author: Hans Verkuil Date: Wed Feb 21 02:49:25 2018 -0500 media: add tuner standby op, use where needed The v4l2_subdev core s_power op was used for two different things: power on/off sensors or video decoders/encoders and to put a tuner in standby (and only the tuner!). There is no 'tuner wakeup' op, that's done automatically when the tuner is accessed. The danger with calling (s_power, 0) to put a tuner into standby is that it is usually broadcast for all subdevs. So a video receiver subdev that supports s_power will also be powered off, and since there is no corresponding (s_power, 1) they will never be powered on again. In addition, this is specifically meant for tuners only since they draw the most current. This patch adds a new tuner op called 'standby' and replaces all calls to (core, s_power, 0) by (tuner, standby). This prevents confusion between the two uses of s_power. Note that there is no overlap: bridge drivers either just want to put the tuner into standby, or they deal with powering on/off sensors. Never both. This also makes it easier to replace s_power for the remaining bridge drivers with some PM code later. Whether we want something cleaner for tuners in the future is a separate topic. There is a lot of legacy code surrounding tuners, and I am very hesitant about making changes there. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-core.c | 2 +- drivers/media/pci/cx23885/cx23885-dvb.c | 4 ++-- drivers/media/pci/cx88/cx88-cards.c | 2 +- drivers/media/pci/cx88/cx88-dvb.c | 4 ++-- drivers/media/pci/saa7134/saa7134-video.c | 2 +- drivers/media/tuners/e4000.c | 16 +++------------- drivers/media/tuners/fc2580.c | 16 +++------------- drivers/media/tuners/msi001.c | 19 +++---------------- drivers/media/usb/au0828/au0828-video.c | 4 ++-- drivers/media/usb/cx231xx/cx231xx-video.c | 2 +- drivers/media/usb/em28xx/em28xx-video.c | 4 ++-- drivers/media/v4l2-core/tuner-core.c | 15 +++------------ include/media/v4l2-subdev.h | 4 ++++ 13 files changed, 28 insertions(+), 66 deletions(-) commit 3f97df91a189ac84711467a687bef69dfd88b53c Author: Luca Ceresoli Date: Thu Mar 8 07:26:22 2018 -0500 media: vb2-core: vb2_ops: document non-interrupt-context calling Driver writers can benefit in knowing if/when callbacks are called in interrupt context. But it is not completely obvious here, so document it. Signed-off-by: Luca Ceresoli Cc: Laurent Pinchart Cc: Pawel Osciak Cc: Marek Szyprowski Cc: Kyungmin Park Cc: Mauro Carvalho Chehab Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/videobuf2-core.h | 3 +++ 1 file changed, 3 insertions(+) commit 68a06bd04e20f46a8f9c5d8c89ea4311bfefa939 Author: Luca Ceresoli Date: Thu Mar 8 07:26:21 2018 -0500 media: vb2-core: document the REQUEUEING state VB2_BUF_STATE_REQUEUEING is accepted by vb2_buffer_done() but not documented, so add it along with notes about calls in interrupt context. Signed-off-by: Luca Ceresoli Cc: Laurent Pinchart Cc: Pawel Osciak Cc: Marek Szyprowski Cc: Kyungmin Park Cc: Mauro Carvalho Chehab Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/videobuf2-core.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 45ad39999b00afde5f9d6b074da4bcaf4644c6d7 Author: Luca Ceresoli Date: Thu Mar 8 07:26:20 2018 -0500 media: vb2-core: vb2_buffer_done: consolidate docs Documentation about what start_streaming() should do on failure are scattered in two places and mostly duplicated, so consolidate them in one of the two places. Signed-off-by: Luca Ceresoli Cc: Laurent Pinchart Cc: Pawel Osciak Cc: Marek Szyprowski Cc: Kyungmin Park Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/videobuf2-core.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit dd328275e98634931419fdc652e99ebaf71bdc71 Author: Douglas Fischer Date: Fri Mar 2 10:25:43 2018 -0500 media: radio: Critical interrupt bugfix for si470x over i2c Fixed si470x_start() disabling the interrupt signal, causing tune operations to never complete. This does not affect USB radios because they poll the registers instead of using the IRQ line. Signed-off-by: Douglas Fischer [hans.verkuil@cisco.com: fixed 80 column checkpatch warning] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/si470x/radio-si470x-common.c | 8 ++++++-- drivers/media/radio/si470x/radio-si470x.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) commit 8c081b6f9a9b81a11dd453a91c302d1e6115411b Author: Douglas Fischer Date: Mon Feb 26 18:22:02 2018 -0500 media: radio: Critical v4l2 registration bugfix for si470x over i2c Added the call to v4l2_device_register() required to add a new radio device. Without this patch, it is impossible for the driver to load. This does not affect USB devices. Signed-off-by: Douglas Fischer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/si470x/radio-si470x-i2c.c | 32 +++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit 425859ff0de33a2362bec2a2c7ca486f87c13100 Author: Arnaldo Carvalho de Melo Date: Tue Mar 20 11:03:30 2018 -0300 perf annotate: No need to calculate notes->start twice Since we already set notes->start to map__rip_2objdump(map, sym->start) in symbol__annotate2(), no need to calculate that address again in symbol__calc_lines(), just use notes->start. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ycxlg8mm5ueuj21w6gi62l7g@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit d9bd766584491dbb6f96c85a27562eb1289b2ca9 Author: Arnaldo Carvalho de Melo Date: Fri Mar 16 16:57:47 2018 -0300 perf annotate browser: Add 'P' hotkey to dump annotation to file Just like we have in the histograms browser used as the main screen for 'perf top --tui' and 'perf report --tui', to print the current annotation to a file with a named composed by the symbol name and the ".annotation" suffix. Here is one example of pressing 'A' on 'perf top' to live annotate a kernel function and then press 'P' to dump that annotation, the resulting file: # cat _raw_spin_lock_irqsave.annotation _raw_spin_lock_irqsave() /proc/kcore Event: cycles:ppp 7.14 nop 21.43 push %rbx 7.14 pushfq pop %rax nop mov %rax,%rbx cli nop xor %eax,%eax mov $0x1,%edx 64.29 lock cmpxchg %edx,(%rdi) test %eax,%eax ↓ jne 2b mov %rbx,%rax pop %rbx ← retq 2b: mov %eax,%esi → callq queued_spin_lock_slowpath mov %rbx,%rax pop %rbx ← retq # Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-zzmnrwugb5vtk7bvg0rbx150@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 4 ++++ tools/perf/util/annotate.c | 31 +++++++++++++++++++++++++++++++ tools/perf/util/annotate.h | 2 ++ 3 files changed, 37 insertions(+) commit 91340c5184f316d687d4522b9aa41b56d58a49b0 Author: Arnaldo Carvalho de Melo Date: Fri Mar 16 16:27:04 2018 -0300 perf report: Introduce --ignore-vmlinux command line option We've had this in 'perf top' for quite a while, useful if one wishes to force using /proc/kcore to do annotation using the patched kernel instead of the ELF image it started from, aka vmlinux. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ircpvox4wzsv7gasrpb28fw9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-report.txt | 3 +++ tools/perf/builtin-report.c | 2 ++ 2 files changed, 5 insertions(+) commit be316409e9819423fc965e11486e6631734520ba Author: Arnaldo Carvalho de Melo Date: Fri Mar 16 15:58:35 2018 -0300 perf annotate: Introduce --ignore-vmlinux command line option This is already present in 'perf top', albeit undocumented (will fix), and is useful to use /proc/kcore instead of vmlinux and then get what is really in place, not what the kernel starts with, before alternatives, ftrace .text patching, etc, see the differences: # perf annotate --stdio2 _raw_spin_lock_irqsave _raw_spin_lock_irqsave() /lib/modules/4.16.0-rc4/build/vmlinux Event: anon group { cycles, instructions } 0.00 3.17 → callq __fentry__ 0.00 7.94 push %rbx 7.69 36.51 → callq __page_file_index mov %rax,%rbx 7.69 3.17 → callq *ffffffff82225cd0 xor %eax,%eax mov $0x1,%edx 80.77 49.21 lock cmpxchg %edx,(%rdi) test %eax,%eax ↓ jne 2b 3.85 0.00 mov %rbx,%rax pop %rbx ← retq 2b: mov %eax,%esi → callq queued_spin_lock_slowpath mov %rbx,%rax pop %rbx ← retq [root@jouet ~]# perf annotate --ignore-vmlinux --stdio2 _raw_spin_lock_irqsave _raw_spin_lock_irqsave() /proc/kcore Event: anon group { cycles, instructions } 0.00 3.17 nop 0.00 7.94 push %rbx 0.00 23.81 pushfq 7.69 12.70 pop %rax nop mov %rax,%rbx 7.69 3.17 cli nop xor %eax,%eax mov $0x1,%edx 80.77 49.21 lock cmpxchg %edx,(%rdi) test %eax,%eax ↓ jne 2b 3.85 0.00 mov %rbx,%rax pop %rbx ← retq 2b: mov %eax,%esi → callq *ffffffff820e96b0 mov %rbx,%rax pop %rbx ← retq # Diff of the output of those commands: # perf annotate --stdio2 _raw_spin_lock_irqsave > /tmp/vmlinux # perf annotate --ignore-vmlinux --stdio2 _raw_spin_lock_irqsave > /tmp/kcore # diff -y /tmp/vmlinux /tmp/kcore _raw_spin_lock_irqsave() vmlinux | _raw_spin_lock_irqsave() /proc/kcore Event: anon group { cycles, instructions } Event: anon group { cycles, instructions } 0.00 3.17 → callq __fentry__ | 0.00 3.17 nop 0.00 7.94 push %rbx 0.00 7.94 push %rbx 7.69 36.51 → callq __page_file_index | 0.00 23.81 pushfq > 7.69 12.70 pop %rax > nop mov %rax,%rbx mov %rax,%rbx 7.69 3.17 → callq *ffffffff82225cd0 | 7.69 3.17 cli > nop xor %eax,%eax xor %eax,%eax mov $0x1,%edx mov $0x1,%edx 80.77 49.21 lock cmpxchg %edx,(%rdi) 80.77 49.21 lock cmpxchg %edx,(%rdi) test %eax,%eax test %eax,%eax ↓ jne 2b ↓ jne 2b 3.85 0.00 mov %rbx,%rax 3.85 0.00 mov %rbx,%rax pop %rbx pop %rbx ← retq ← retq 2b: mov %eax,%esi 2b: mov %eax,%esi → callq queued_spin_lock_slowpath| → callq *ffffffff820e96b0 mov %rbx,%rax mov %rbx,%rax pop %rbx pop %rbx ← retq ← retq # This should be further streamlined by doing both annotations and allowing the TUI to toggle initial/current, and show the patched instructions in a slightly different color. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-wz8d269hxkcwaczr0r4rhyjg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-annotate.txt | 3 +++ tools/perf/builtin-annotate.c | 2 ++ 2 files changed, 5 insertions(+) commit 864298f224f20fb7b981b05dd0f77315c75eb189 Author: Arnaldo Carvalho de Melo Date: Fri Mar 16 15:17:23 2018 -0300 perf annotate: Add function header to --stdio2 # perf annotate --stdio2 _raw_spin_lock_irqsave _raw_spin_lock_irqsave() /lib/modules/4.16.0-rc4/build/vmlinux Event: anon group { cycles, instructions } 0.00 3.17 → callq __fentry__ 0.00 7.94 push %rbx 7.69 36.51 → callq __page_file_index mov %rax,%rbx 7.69 3.17 → callq *ffffffff82225cd0 xor %eax,%eax mov $0x1,%edx 80.77 49.21 lock cmpxchg %edx,(%rdi) test %eax,%eax ↓ jne 2b 3.85 0.00 mov %rbx,%rax pop %rbx ← retq 2b: mov %eax,%esi → callq queued_spin_lock_slowpath mov %rbx,%rax pop %rbx ← retq # Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-i86yfyzl8m194ioxgj1jo32f@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3563289208ecef339853692ecbf8690084744b53 Author: Arnaldo Carvalho de Melo Date: Fri Mar 16 14:37:33 2018 -0300 perf annotate: Use the default annotation options for --stdio2 With an empty '[annotate]' section in ~/.perfconfig: # perf record -a --all-kernel -e '{cycles,instructions}:P' sleep 5 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 2.243 MB perf.data (5513 samples) ] # perf annotate --stdio2 _raw_spin_lock | head -20 Disassembly of section .text: ffffffff81868790 <_raw_spin_lock>: _raw_spin_lock(): EXPORT_SYMBOL(_raw_spin_trylock_bh); #endif #ifndef CONFIG_INLINE_SPIN_LOCK void __lockfunc _raw_spin_lock(raw_spinlock_t *lock) { → callq __fentry__ atomic_cmpxchg(): return xadd(&v->counter, -i); } static __always_inline int atomic_cmpxchg(atomic_t *v, int old, int new) { # perf annotate --stdio2 _raw_spin_lock | head -20 → callq __fentry__ xor %eax,%eax mov $0x1,%edx 87.50 100.00 lock cmpxchg %edx,(%rdi) 6.25 0.00 test %eax,%eax ↓ jne 16 6.25 0.00 repz retq 16: mov %eax,%esi ↑ jmpq ffffffff810e96b0 # # cat ~/.perfconfig [annotate] hide_src_code = false show_linenr = true # perf annotate --stdio2 _raw_spin_lock | head -20 3 Disassembly of section .text: 5 ffffffff81868790 <_raw_spin_lock>: 6 _raw_spin_lock(): 143 EXPORT_SYMBOL(_raw_spin_trylock_bh); 144 #endif 146 #ifndef CONFIG_INLINE_SPIN_LOCK 147 void __lockfunc _raw_spin_lock(raw_spinlock_t *lock) 148 { → callq __fentry__ 150 atomic_cmpxchg(): 187 return xadd(&v->counter, -i); 188 } 190 static __always_inline int atomic_cmpxchg(atomic_t *v, int old, int new) 191 { # # cat ~/.perfconfig [annotate] hide_src_code = true show_total_period = true # perf annotate --stdio2 _raw_spin_lock | head -20 → callq __fentry__ xor %eax,%eax mov $0x1,%edx 1411316 152339 lock cmpxchg %edx,(%rdi) 344694 0 test %eax,%eax ↓ jne 16 80806 0 repz retq 16: mov %eax,%esi ↑ jmpq ffffffff810e96b0 # Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-nu4rxg5zkdtgs1b2gc40p7v7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 36d6bf8976e9188915e34cb840a5a9d5a62fb8ca Author: Douglas Fischer Date: Sun Feb 25 21:24:06 2018 -0500 media: radio: Tuning bugfix for si470x over i2c Fixed si470x_set_channel() trying to tune before chip is turned on, which causes warnings in dmesg and when probing, makes driver wait for 3s for tuning timeout. This issue did not affect USB devices because they have a different probing sequence. Signed-off-by: Douglas Fischer [hans.verkuil@cisco.com: fixed space-after-( checkpatch warning] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/si470x/radio-si470x-common.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7f0b6fde3111aec82487662ccef5a4ebecb93381 Author: Arnaldo Carvalho de Melo Date: Fri Mar 16 14:33:38 2018 -0300 perf annotate: Move the default annotate options to the library One more thing that goes from the TUI code to be used more widely, for instance it'll affect the default options used by: perf annotate --stdio2 Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-0nsz0dm0akdbo30vgja2a10e@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-annotate.c | 2 ++ tools/perf/builtin-report.c | 1 + tools/perf/builtin-top.c | 2 ++ tools/perf/ui/browser.c | 2 -- tools/perf/ui/browser.h | 1 - tools/perf/ui/browsers/annotate.c | 67 +-------------------------------------- tools/perf/util/annotate.c | 62 ++++++++++++++++++++++++++++++++++++ tools/perf/util/annotate.h | 4 +++ 8 files changed, 72 insertions(+), 69 deletions(-) commit befd2a38a632b1f27ad652fea67c8cf97ce59409 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 23:44:34 2018 -0300 perf annotate: Introduce the --stdio2 output mode This uses the TUI augmented formatting routines, modulo interactivity. # perf annotate --ignore-vmlinux --stdio2 _raw_spin_lock_irqsave _raw_spin_lock_irqsave() /proc/kcore Event: cycles:ppp Percent Disassembly of section load0: ffffffff9a8734b0 : nop push %rbx 50.00 pushfq pop %rax nop mov %rax,%rbx cli nop xor %eax,%eax mov $0x1,%edx 50.00 lock cmpxchg %edx,(%rdi) test %eax,%eax ↓ jne 2b mov %rbx,%rax pop %rbx ← retq 2b: mov %eax,%esi → callq queued_spin_lock_slowpath mov %rbx,%rax pop %rbx ← retq Tested-by: Jin Yao Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-6cte5o8z84mbivbvqlg14uh1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-annotate.txt | 2 + tools/perf/builtin-annotate.c | 23 +++++--- tools/perf/util/annotate.c | 92 ++++++++++++++++++++++++++++++ tools/perf/util/annotate.h | 5 ++ 4 files changed, 115 insertions(+), 7 deletions(-) commit 3e187c81d405474ef6361acf6d875657940cc2c0 Author: Hugues Fruchet Date: Wed Feb 28 12:20:16 2018 -0500 media: stm32-dcmi: add JPEG support Add DCMI JPEG support. Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/stm32/stm32-dcmi.c | 193 ++++++++++++++++++++++-------- 1 file changed, 146 insertions(+), 47 deletions(-) commit b4ee319480e6d8a066b9522e65cee41795496951 Author: Hugues Fruchet Date: Thu Feb 22 04:51:27 2018 -0500 media: stm32-dcmi: fix unnecessary parentheses Fix unnecessary parentheses in if conditions. Detected by checkpatch.pl --strict. Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/stm32/stm32-dcmi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a1029f552c3f66dc205eea6473e64040ca5023b5 Author: Hugues Fruchet Date: Thu Mar 8 05:46:23 2018 -0500 media: stm32-dcmi: rework overrun/error case Do not stop/restart dma on overrun or errors. Dma will be restarted on current frame transfer completion. Frame transfer completion is ensured even if overrun or error occurs by DCMI continuous capture mode which restarts data transfer at next frame sync. Do no warn on overrun while in irq thread, this slows down system and lead to more overrun errors. Use a counter instead and log errors at stop streaming. Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/stm32/stm32-dcmi.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) commit f8c5363db34e4d1bbcbaeeb5cbb2762abb876162 Author: Hugues Fruchet Date: Thu Feb 22 04:49:14 2018 -0500 media: stm32-dcmi: fix lock scheme Fix lock scheme leading to spurious freeze. Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/stm32/stm32-dcmi.c | 57 +++++++++++++------------------ 1 file changed, 24 insertions(+), 33 deletions(-) commit aebb47d4e7a9c5a4f456aa0b2e1f7d612d1c78ba Author: Aishwarya Pant Date: Fri Mar 2 23:00:19 2018 +0530 Input: trackpoint: document sysfs interface Descriptions have been collected from git commit logs, code commits and the TrackPoint System Version 4.0 Engineering Specification. Signed-off-by: Aishwarya Pant Signed-off-by: Jonathan Corbet .../ABI/testing/sysfs-devices-platform-trackpoint | 115 +++++++++++++++++++++ 1 file changed, 115 insertions(+) commit a10c5d91c340bc1ee09ca62949a23d8fc45e7c0a Author: Masanari Iida Date: Fri Mar 2 22:30:13 2018 +0900 xfs: Change URL for the project in xfs.txt The oss.sgi.com doesn't exist any more. Change it to current project URL, https://xfs.wiki.kernel.org/ Signed-off-by: Masanari Iida Reviewed-by: Darrick J. Wong Signed-off-by: Jonathan Corbet Documentation/filesystems/xfs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea841bafda3f7f9aa8b06a09f0f3e41c207af84f Author: Richard Guy Briggs Date: Wed Mar 21 04:42:21 2018 -0400 audit: add refused symlink to audit_names Audit link denied events for symlinks had duplicate PATH records rather than just updating the existing PATH record. Update the symlink's PATH record with the current dentry and inode information. See: https://github.com/linux-audit/audit-kernel/issues/21 Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore fs/namei.c | 1 + 1 file changed, 1 insertion(+) commit 2ddf0d655946657b9708bb79cd38a4248c67ac14 Author: Aishwarya Pant Date: Thu Mar 1 23:55:59 2018 +0530 char/bsr: add sysfs interface documentation Descriptions have collected from code comments and by reading through code. Signed-off-by: Aishwarya Pant Signed-off-by: Jonathan Corbet Documentation/ABI/testing/sysfs-class-bsr | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 014d8fd8805b29186448bc4e5a697b34b604587a Author: Aishwarya Pant Date: Fri Feb 23 18:24:48 2018 +0530 acpi: nfit: document sysfs interface This is an attempt to document the nfit sysfs interface. The descriptions have been collected from git commit logs and the ACPI specification 6.2. Signed-off-by: Aishwarya Pant Signed-off-by: Jonathan Corbet Documentation/ABI/testing/sysfs-bus-nfit | 233 +++++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) commit 3c91d24fcd89c6b40bc3d4741311bc046456291d Author: Sakari Ailus Date: Thu Feb 8 07:00:48 2018 -0500 media: v4l: common: Remove v4l2_find_nearest_format v4l2_find_nearest_format is not useful for drivers in finding the best matching format as it assumes a V4L2 specific struct. Drivers will use v4l2_find_nearest_size instead. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-common.c | 26 -------------------------- include/media/v4l2-common.h | 17 ----------------- 2 files changed, 43 deletions(-) commit ac53212880a1af2191fd469dab275b94cd9d13c8 Author: Sakari Ailus Date: Thu Feb 8 07:00:02 2018 -0500 media: vivid: Use v4l2_find_nearest_size Use v4l2_find_nearest_size instead of a driver specific function to find nearest matching size. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-vid-cap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit bd15134a73d8226f1961164d450016a05e9222af Author: Aishwarya Pant Date: Fri Feb 23 15:49:59 2018 +0530 block: rbd: update sysfs interface The existing sysfs interface has been updated to be in the same format as described in Documentation/ABI/README. This will be useful for scripting and tracking changes in the ABI. Attributes have been grouped by functionality and/or the date on which they were added. There are a couple of more changes: - The attributes have been annotated with file permissions RO/RW/WO. - Added description of the bus attribute supported_features Signed-off-by: Aishwarya Pant Signed-off-by: Jonathan Corbet Documentation/ABI/testing/sysfs-bus-rbd | 203 +++++++++++++++++++------------- 1 file changed, 122 insertions(+), 81 deletions(-) commit 894de53b4938f6e4eb5dd0435c60cc87b5747855 Author: Sakari Ailus Date: Thu Feb 8 06:25:20 2018 -0500 media: ov5670: Use v4l2_find_nearest_size Use v4l2_find_nearest_size instead of a driver specific function to find nearest matching size. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5670.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) commit 227b183dcbcc430a6ce29518d3b24d481597e87d Author: Sakari Ailus Date: Thu Feb 8 06:24:34 2018 -0500 media: ov13858: Use v4l2_find_nearest_size Use v4l2_find_nearest_size instead of a driver specific function to find nearest matching size. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov13858.c | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) commit 95ce9c28601afc5da0c11792601ad32dd14cdd44 Author: Sakari Ailus Date: Fri Feb 23 04:50:14 2018 -0500 media: v4l: common: Add a function to obtain best size from a list Add a function (as well as a helper macro) to obtain the best size in a list of device specific sizes. This helps writing drivers as well as aligns interface behaviour across drivers. The struct in which this information is contained in is typically specific to the driver, therefore the existing function v4l2_find_nearest_format() does not address the need. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-common.c | 30 ++++++++++++++++++++++++++++++ include/media/v4l2-common.h | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) commit 3b7ea9f015d682bb7a130f5c69e37affd8b9a9a4 Author: Eric Engestrom Date: Tue Mar 13 11:10:58 2018 +0000 Documentation/sparse: fix typo Signed-off-by: Eric Engestrom Signed-off-by: Jonathan Corbet Documentation/dev-tools/sparse.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94b9d9b7a14cbb1640868d53b27f403ed2e5b4a9 Author: Richard Guy Briggs Date: Wed Mar 21 04:42:20 2018 -0400 audit: remove path param from link denied function In commit 45b578fe4c3cade6f4ca1fc934ce199afd857edc ("audit: link denied should not directly generate PATH record") the need for the struct path *link parameter was removed. Remove the now useless struct path argument. Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore fs/namei.c | 4 ++-- include/linux/audit.h | 6 ++---- kernel/audit.c | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) commit 1dbba2cf30c9be65287d2c83ad35db72c62890ad Author: Gary R Hook Date: Wed Mar 14 17:21:38 2018 -0500 Documentation/CodingStyle: Add an example for braces Add another example of required braces when using a compound statement in a loop. Signed-off-by: Gary R Hook Signed-off-by: Jonathan Corbet Documentation/process/coding-style.rst | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2525fdcb6e8211ee9dbc270a7f882fbfb6433b55 Author: Sean Young Date: Wed Mar 7 05:55:38 2018 -0500 media: imon: rename protocol from other to imon This renames the protocol for the imon rc driver from other to imon, since it is now an known protocol. Although different name will show up in the sysfs protocol file, loading a keymap using existing ir-keytable versions still works. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/imon.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit 447dcc0cf12922fcda67731559dd970bde7b35a6 Author: Sean Young Date: Sun Dec 3 11:06:54 2017 -0500 media: rc: add new imon protocol decoder and encoder This makes it possible to use the various iMON remotes with any raw IR RC device. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/Kconfig | 9 ++ drivers/media/rc/Makefile | 1 + drivers/media/rc/ir-imon-decoder.c | 193 +++++++++++++++++++++++++++++++++ drivers/media/rc/keymaps/rc-imon-pad.c | 3 +- drivers/media/rc/rc-core-priv.h | 6 + drivers/media/rc/rc-main.c | 3 + include/media/rc-map.h | 8 +- include/uapi/linux/lirc.h | 2 + 8 files changed, 220 insertions(+), 5 deletions(-) commit 8d4068810d9926250dd2435719a080b889eb44c3 Author: Sean Young Date: Tue Mar 6 08:57:57 2018 -0500 media: rc: oops in ir_timer_keyup after device unplug If there is IR in the raw kfifo when ir_raw_event_unregister() is called, then kthread_stop() causes ir_raw_event_thread to be scheduled, decode some scancodes and re-arm timer_keyup. The timer_keyup then fires when the rc device is long gone. Cc: stable@vger.kernel.org Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8a4e8f8dfc69941eab6ede7a844fbed0c4841241 Author: Sean Young Date: Fri Jan 5 14:58:51 2018 -0500 media: rc: new driver for early iMon device These devices were supported by the lirc_imon.c driver which was removed from staging in commit f41003a23a02 ("[media] staging: lirc_imon: port remaining usb ids to imon and remove"). Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 ++ drivers/media/rc/Kconfig | 12 +++ drivers/media/rc/Makefile | 1 + drivers/media/rc/imon_raw.c | 199 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 219 insertions(+) commit 5a5d1a77085f9d11c0a946d164330af4d5412a66 Author: Mike Rapoport Date: Wed Mar 21 17:05:23 2018 +0200 docs/vm: update 00-INDEX Several files were added to Documentation/vm without updates to 00-INDEX. Fill in the missing documents Signed-off-by: Mike Rapoport Signed-off-by: Jonathan Corbet Documentation/vm/00-INDEX | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 572eca036d71e2bb2822dba633ebda4fd3e6c05a Author: Sean Young Date: Mon Mar 5 08:32:14 2018 -0500 media: rc: add keymap for iMON RSC remote Note that the stick on the remote is not supported yet. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-imon-rsc.c | 81 ++++++++++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 83 insertions(+) commit 1b450f211e009d207402ed546837ad5dbbeac276 Author: Sean Young Date: Sat Jan 6 07:24:50 2018 -0500 media: Revert "[media] staging: lirc_imon: port remaining usb ids to imon and remove" This code was ported without the necessary hardware to test. There are multiple problems which are more easily solved by writing a separate driver. This reverts commit f41003a23a02dc7299539300f74360c2a932714a. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/imon.c | 135 +++--------------------------------------------- 1 file changed, 7 insertions(+), 128 deletions(-) commit d60f6e3713ecf56408c38d761ef7fc0ce9510f16 Author: Philipp Rossak Date: Tue Feb 13 07:29:48 2018 -0500 media: dt: bindings: Update binding documentation for sunxi IR controller This patch updates documentation for Device-Tree bindings for sunxi IR controller and adds the new optional property for the base clock frequency. Signed-off-by: Philipp Rossak Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/sunxi-ir.txt | 3 +++ 1 file changed, 3 insertions(+) commit 10e712064b0454621d2974cbd353e9d5bebbae4a Author: Philipp Rossak Date: Tue Feb 13 07:29:47 2018 -0500 media: rc: update sunxi-ir driver to get base clock frequency from devicetree This patch updates the sunxi-ir driver to set the base clock frequency from devicetree. This is necessary since there are different ir receivers on the market, that operate with different frequencies. So this value could be set if the attached ir receiver needs a different base clock frequency, than the default 8 MHz. Signed-off-by: Philipp Rossak Reviewed-by: Andi Shyti Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/sunxi-cir.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 0891f959935203e6c0e6c3e62968da56eedba6bf Author: Matthew Wilcox Date: Thu Mar 15 05:06:23 2018 -0700 kernel-doc: Remove __sched markings I find the __sched annotations unaesthetic in the kernel-doc. Remove them like we remove __inline, __weak, __init and so on. Signed-off-by: Matthew Wilcox Signed-off-by: Jonathan Corbet scripts/kernel-doc | 1 + 1 file changed, 1 insertion(+) commit 3d6f22b74d919a5f32a6093666e85be110cc06de Author: Richard Zhu Date: Wed Mar 21 10:37:01 2018 +0800 ahci: imx: fix the build warning Add the default as the last entry to fix the following build warning introduced by commit. e5878732a521 ("ahci: imx: add the imx6qp ahci sata support") drivers/ata/ahci_imx.c: In function 'imx_sata_disable': drivers/ata/ahci_imx.c:478:2: warning: enumeration value 'AHCI_IMX53' not handled in switch [-Wswitch] switch (imxpriv->type) { ^~~~~~ Signed-off-by: Richard Zhu Signed-off-by: Tejun Heo drivers/ata/ahci_imx.c | 3 +++ 1 file changed, 3 insertions(+) commit 4b290af0b3a4cca68eaf80f8cf44d3cda3fe6744 Author: Jonathan Corbet Date: Wed Mar 21 09:02:53 2018 -0600 Docs: Added a pointer to the formatted docs to README Kernel.org nicely maintains an online copy of the formatted documentation; tell our users that it exists. Signed-off-by: Jonathan Corbet README | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9f4a68e416a5930a0f8024453a84afa25134c1a0 Author: Martin Kepplinger Date: Fri Mar 16 16:57:07 2018 +0100 README: Improve documentation descriptions "This file" indeed was moved once, but at some point "this file", the top-level README, becomes a file in itself. Now that time has come :) Let's describe how things are, and suggest reading "this file" first, "this file" simply being a the admin-guide README file, not a file that was once moved. Signed-off-by: Martin Kepplinger Signed-off-by: Jonathan Corbet README | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit dd206bec9a446884805370b1c16c1d7a97036777 Author: Alexey Dobriyan Date: Tue Mar 20 21:51:06 2018 +0300 pidns: simpler allocation of pid_* caches Those pid_* caches are created on demand when a process advances to the new level of pid namespace. Which means pointers are stable, write only and thus can be packed into an array instead of spreading them over and using lists(!) to find them. Both first and subsequent clone/unshare(CLONE_NEWPID) become faster. Signed-off-by: Alexey Dobriyan Signed-off-by: Eric W. Biederman kernel/pid_namespace.c | 67 ++++++++++++++++++-------------------------------- 1 file changed, 24 insertions(+), 43 deletions(-) commit 3e1d3678844b2b1f4c41818bc9a2885cbf5ccef6 Author: Steven Rostedt (VMware) Date: Wed Mar 21 10:36:08 2018 -0400 ktest: Add CONNECT_TIMEOUT to change the connection timeout time Before ktest issues a reboot, it will try to connect to the target machine to make sure that it is still alive. If the target does not respond within 5 seconds, it will power cycle the box instead of issuing a reboot. Five seconds may be too short, and ktest may unnecessarially power cycle the box. I have found 25 seconds seems to be a better timeout for this purpose. But even 25 may be too arbitrary. Add a CONNECT_TIMEOUT option to let the user determine the timeout time before rebooting. By default, it has been raised to 25 seconds. Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 7 +++++-- tools/testing/ktest/sample.conf | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) commit 8c5cb3c1c5701df8b8bcefb151547148378841e5 Merge: 22de4e7 d830307 Author: Joonas Lahtinen Date: Wed Mar 21 16:25:15 2018 +0200 Merge tag 'gvt-next-fixes-2018-03-20' of https://github.com/intel/gvt-linux into drm-intel-next-fixes gvt-next-fixes-2018-03-20 - No need warning on untracked regs (Colin) - Error handling fix for dma unmap (Changbin) - invalidate shadow ppgtt for vGPU reset (Zhi) - ensure to update shadow ppgtt after pinned (Zhi) - force guest ctx ctrl update for sanity (Zhenyu/Xiong) - one typo fix (Colin) Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180320024108.f3fdwunm55zhk6gw@zhen-hp.sh.intel.com commit 9f23b129eb35c1465aa1733884acad3d95c8fde7 Author: Steven Rostedt (VMware) Date: Wed Mar 21 10:24:20 2018 -0400 ktest: Wait for console process to exit To clean up the console processes that are forked to monitor the console, there needs to be a waitpid(). Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/ktest.pl | 3 +++ 1 file changed, 3 insertions(+) commit d2fd7344a9879c53afe63fabe068fa8349384750 Author: Rob Herring Date: Wed Mar 7 09:42:37 2018 -0600 PCI: kirin: Fix missing dependency on PCI_MSI_IRQ_DOMAIN PCIE_DW_HOST depends on PCI_MSI_IRQ_DOMAIN and since kirin selects PCIE_DW_HOST, it must also depend on PCI_MSI_IRQ_DOMAIN. This was found by 0-day once building on all arches was enabled. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi drivers/pci/dwc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit a1b363a53f0c231627d2c06a2691c17f610eab98 Author: Rob Herring Date: Wed Mar 7 09:42:36 2018 -0600 PCI: iproc: Remove dependency on ARM specific struct pci_sys_data The iproc driver is using ARM's struct pci_sys_data simply to store a private data pointer. This is completely unnecessary, so store the private data directly in bus->sysdata as is done on arm64. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Scott Branden drivers/pci/host/pcie-iproc-bcma.c | 3 +-- drivers/pci/host/pcie-iproc.c | 19 ++----------------- drivers/pci/host/pcie-iproc.h | 4 ---- 3 files changed, 3 insertions(+), 23 deletions(-) commit 84e10623c0b9c81557918804f309d66aec86a233 Author: Geert Uytterhoeven Date: Fri Mar 2 17:56:37 2018 +0100 dt-bindings: at24: add Renesas R1EX24128 Document the compatible value for the Renesas R1EX24128ASAS0A two-wire serial interface EEPROM, so it can be used in DTS files without causing checkpatch warnings. Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Acked-by: Wolfram Sang Signed-off-by: Bartosz Golaszewski Documentation/devicetree/bindings/eeprom/at24.txt | 1 + 1 file changed, 1 insertion(+) commit 3644784caa017cc3cf4188fb0bfbf3421e8aa7ad Author: Ulrich Hecht Date: Fri Mar 2 11:14:16 2018 +0100 dt-bindings: at24: add bindings for Rohm BR24T01 Both manufacturer and name variant. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Reviewed-by: Rob Herring Signed-off-by: Bartosz Golaszewski Documentation/devicetree/bindings/eeprom/at24.txt | 2 ++ 1 file changed, 2 insertions(+) commit c0a2676c911c73cf7c753083fdd8f775063d324b Author: Peter Rosin Date: Tue Jan 16 17:06:16 2018 +0100 dt-bindings: at24: add compatible for nxp,se97b The datasheet talks about the chip being an spd, but the chip is writable so atmel,24c02 is more appropriate as fallback. Signed-off-by: Peter Rosin Reviewed-by: Rob Herring Signed-off-by: Bartosz Golaszewski Documentation/devicetree/bindings/eeprom/at24.txt | 1 + 1 file changed, 1 insertion(+) commit 1c7095d2836baafd84e596dd34ba1a1293a4faa9 Merge: 2793c1d 78230c4 Author: Sean Paul Date: Wed Mar 21 09:40:55 2018 -0400 Merge airlied/drm-next into drm-misc-next Refresh -misc-next Signed-off-by: Sean Paul commit 3184a995f782c6fdab89e62d31cf7be042582bd0 Author: Paolo Bonzini Date: Wed Mar 21 14:20:18 2018 +0100 KVM: nVMX: fix vmentry failure code when L2 state would require emulation Commit 2bb8cafea80b ("KVM: vVMX: signal failure for nested VMEntry if emulation_required", 2018-03-12) introduces a new error path which does not set *entry_failure_code. Fix that to avoid a leak of L0 stack to L1. Reported-by: Radim Krčmář Reported-by: Dan Carpenter Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e40ff1d6608dd9a5e07d7bc3079c64d9d676fe15 Author: Liran Alon Date: Wed Mar 21 02:50:31 2018 +0200 KVM: nVMX: Do not load EOI-exitmap while running L2 When L1 IOAPIC redirection-table is written, a request of KVM_REQ_SCAN_IOAPIC is set on all vCPUs. This is done such that all vCPUs will now recalc their IOAPIC handled vectors and load it to their EOI-exitmap. However, it could be that one of the vCPUs is currently running L2. In this case, load_eoi_exitmap() will be called which would write to vmcs02->eoi_exit_bitmap, which is wrong because vmcs02->eoi_exit_bitmap should always be equal to vmcs12->eoi_exit_bitmap. Furthermore, at this point KVM_REQ_SCAN_IOAPIC was already consumed and therefore we will never update vmcs01->eoi_exit_bitmap. This could lead to remote_irr of some IOAPIC level-triggered entry to remain set forever. Fix this issue by delaying the load of EOI-exitmap to when vCPU is running L1. One may wonder why not just delay entire KVM_REQ_SCAN_IOAPIC processing to when vCPU is running L1. This is done in order to handle correctly the case where LAPIC & IO-APIC of L1 is pass-throughed into L2. In this case, vmcs12->virtual_interrupt_delivery should be 0. In current nVMX implementation, that results in vmcs02->virtual_interrupt_delivery to also be 0. Thus, vmcs02->eoi_exit_bitmap is not used. Therefore, every L2 EOI cause a #VMExit into L0 (either on MSR_WRITE to x2APIC MSR or APIC_ACCESS/APIC_WRITE/EPT_MISCONFIG to APIC MMIO page). In order for such L2 EOI to be broadcasted, if needed, from LAPIC to IO-APIC, vcpu->arch.ioapic_handled_vectors must be updated while L2 is running. Therefore, patch makes sure to delay only the loading of EOI-exitmap but not the update of vcpu->arch.ioapic_handled_vectors. Reviewed-by: Arbel Moshe Reviewed-by: Krish Sadhukhan Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/kvm_cache_regs.h | 5 +++++ arch/x86/kvm/x86.c | 18 ++++++++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) commit 4d0f1ce6955913c490263359eadd392574cf9fe3 Author: Joao Martins Date: Thu Mar 15 14:22:05 2018 +0000 xen/acpi: upload _PSD info for non Dom0 CPUs too All uploaded PM data from non-dom0 CPUs takes the info from vCPU 0 and changing only the acpi_id. For processors which P-state coordination type is HW_ALL (0xFD) it is OK to upload bogus P-state dependency information (_PSD), because Xen will ignore any cpufreq domains created for past CPUs. Albeit for platforms which expose coordination types as SW_ANY or SW_ALL, this will have some unintended side effects. Effectively, it will look at the P-state domain existence and *if it already exists* it will skip the acpi-cpufreq initialization and thus inherit the policy from the first CPU in the cpufreq domain. This will finally lead to the original cpu not changing target freq to P0 other than the first in the domain. Which will make turbo boost not getting enabled (e.g. for 'performance' governor) for all cpus. This patch fixes that, by also evaluating _PSD when we enumerate all ACPI processors and thus always uploading the correct info to Xen. We export acpi_processor_get_psd() for that this purpose, but change signature to not assume an existent of acpi_processor given that ACPI isn't creating an acpi_processor for non-dom0 CPUs. Signed-off-by: Joao Martins Reviewed-by: Boris Ostrovsky Acked-by: Rafael J. Wysocki Signed-off-by: Boris Ostrovsky drivers/acpi/processor_perflib.c | 11 +++++------ drivers/xen/xen-acpi-processor.c | 24 ++++++++++++++++++++++++ include/acpi/processor.h | 2 ++ 3 files changed, 31 insertions(+), 6 deletions(-) commit 36104cb9012a82e73c32a3b709257766b16bcd1d Author: Jason Andryuk Date: Mon Mar 19 12:58:04 2018 -0400 x86/xen: Delay get_cpu_cap until stack canary is established Commit 2cc42bac1c79 ("x86-64/Xen: eliminate W+X mappings") introduced a call to get_cpu_cap, which is fstack-protected. This is works on x86-64 as commit 4f277295e54c ("x86/xen: init %gs very early to avoid page faults with stack protector") ensures the stack protector is configured, but it it did not cover x86-32. Delay calling get_cpu_cap until after xen_setup_gdt has initialized the stack canary. Without this, a 32bit PV machine crashes early in boot. (XEN) Domain 0 (vcpu#0) crashed on cpu#0: (XEN) ----[ Xen-4.6.6-xc x86_64 debug=n Tainted: C ]---- (XEN) CPU: 0 (XEN) RIP: e019:[<00000000c10362f8>] And the PV kernel IP corresponds to init_scattered_cpuid_features 0xc10362f8 <+24>: mov %gs:0x14,%eax Fixes 2cc42bac1c79 ("x86-64/Xen: eliminate W+X mappings") Signed-off-by: Jason Andryuk Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky arch/x86/xen/enlighten_pv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8fe5ab411209ac6e2c7021131e622fd004506d1a Author: Simon Gaiser Date: Thu Mar 15 03:43:22 2018 +0100 xen: xenbus_dev_frontend: Verify body of XS_TRANSACTION_END By guaranteeing that the argument of XS_TRANSACTION_END is valid we can assume that the transaction has been closed when we get an XS_ERROR response from xenstore (Note that we already verify that it's a valid transaction id). Signed-off-by: Simon Gaiser Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/xenbus/xenbus_dev_frontend.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit b93008d1ac657dc67819330c5995e65e7c3e7978 Author: Simon Gaiser Date: Thu Mar 15 03:43:21 2018 +0100 xen: xenbus: Catch closing of non existent transactions Users of the xenbus functions should never close a non existent transaction (for example by trying to closing the same transaction twice) but better catch it in xs_request_exit() than to corrupt the reference counter. Signed-off-by: Simon Gaiser Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/xenbus/xenbus_xs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2a22ee6c3ab1d761bc9c04f1e4117edd55b82f09 Author: Simon Gaiser Date: Thu Mar 15 03:43:20 2018 +0100 xen: xenbus_dev_frontend: Fix XS_TRANSACTION_END handling Commit fd8aa9095a95 ("xen: optimize xenbus driver for multiple concurrent xenstore accesses") made a subtle change to the semantic of xenbus_dev_request_and_reply() and xenbus_transaction_end(). Before on an error response to XS_TRANSACTION_END xenbus_dev_request_and_reply() would not decrement the active transaction counter. But xenbus_transaction_end() has always counted the transaction as finished regardless of the response. The new behavior is that xenbus_dev_request_and_reply() and xenbus_transaction_end() will always count the transaction as finished regardless the response code (handled in xs_request_exit()). But xenbus_dev_frontend tries to end a transaction on closing of the device if the XS_TRANSACTION_END failed before. Trying to close the transaction twice corrupts the reference count. So fix this by also considering a transaction closed if we have sent XS_TRANSACTION_END once regardless of the return code. Cc: # 4.11 Fixes: fd8aa9095a95 ("xen: optimize xenbus driver for multiple concurrent xenstore accesses") Signed-off-by: Simon Gaiser Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/xenbus/xenbus_dev_frontend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c50099f856bfab9449752c4796d891858f01d9f4 Merge: 6f005302 eb7768e Author: Greg Kroah-Hartman Date: Wed Mar 21 12:55:04 2018 +0100 Merge tag 'extcon-next-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon for 4.17 Detailed description for this pull request: 1. Add exported extcon function in order to support OF graph binding - The extcon consumer driver used the "extcon = <&extcon's phandle" property in device-tree in order to bind between extcon provider and consumer driver. But, OF graph method is better than 'extcon' property. So, extcon subsystem adds the following function to support OF graph binding. : extcon_find_edev_by_node(struct device_node *node) - Create the immutable branch ("ib-extcon-drm-dt-v4.17") for both drm-misc and device-tree subsystem. This immutable branch contains the use-case of OF graph binding for EXTCON_HDMI connector between MHL device driver and extcon provider driver. 2. Fix minor issues of extcon device drivers - Remove platform_data and covert to fully use GPIO descriptor for extcon-gpio.c - Remove workaround code for id pin direction from extcon-inte-int3496.c because GPIO ACPI library does support it with generic way. - Set direction and drv flags for V5 boost GPIO because of fixing the firmware bug. commit f422fa558aada511406432bc5974d3a5bf728227 Author: Icenowy Zheng Date: Wed Mar 21 10:46:25 2018 +0800 clk: sunxi-ng: add missing hdmi-slow clock for H6 CCU The Allwinner H6 CCU has a "HDMI Slow Clock", which is currently missing in the ccu-sun50i-h6 driver. Add this missing clock to the driver. Fixes: 542353ea ("clk: sunxi-ng: add support for the Allwinner H6 CCU") Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 4 ++++ drivers/clk/sunxi-ng/ccu-sun50i-h6.h | 2 +- include/dt-bindings/clock/sun50i-h6-ccu.h | 27 ++++++++++++++------------- 3 files changed, 19 insertions(+), 14 deletions(-) commit 70ca608b2ec6dafa6bb1c2b0691852fc78f8f717 Author: Yong Wu Date: Sun Mar 18 09:52:54 2018 +0800 iommu/mediatek: Fix protect memory setting In MediaTek's IOMMU design, When a iommu translation fault occurs (HW can NOT translate the destination address to a valid physical address), the IOMMU HW output the dirty data into a special memory to avoid corrupting the main memory, this is called "protect memory". the register(0x114) for protect memory is a little different between mt8173 and mt2712. In the mt8173, bit[30:6] in the register represents [31:7] of the physical address. In the 4GB mode, the register bit[31] should be 1. While in the mt2712, the bits don't shift. bit[31:7] in the register represents [31:7] in the physical address, and bit[1:0] in the register represents bit[33:32] of the physical address if it has. Fixes: e6dec9230862 ("iommu/mediatek: Add mt2712 IOMMU support") Reported-by: Honghui Zhang Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 15 ++++++++++----- drivers/iommu/mtk_iommu.h | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) commit 9a2fe9b801f585baccf8352d82839dcd54b300cf Author: Ruslan Bilovol Date: Wed Mar 21 02:03:59 2018 +0200 ALSA: usb: initial USB Audio Device Class 3.0 support Recently released USB Audio Class 3.0 specification introduces many significant changes comparing to previous versions, like - new Power Domains, support for LPM/L1 - new Cluster descriptor - changed layout of all class-specific descriptors - new High Capability descriptors - New class-specific String descriptors - new and removed units - additional sources for interrupts - removed Type II Audio Data Formats - ... and many other things (check spec) It also provides backward compatibility through multiple configurations, as well as requires mandatory support for BADD (Basic Audio Device Definition) on each ADC3.0 compliant device This patch adds initial support of UAC3 specification that is enough for Generic I/O Profile (BAOF, BAIF) device support from BADD document. Signed-off-by: Ruslan Bilovol Reviewed-by: Greg Kroah-Hartman Signed-off-by: Takashi Iwai include/linux/usb/audio-v2.h | 4 +- include/linux/usb/audio-v3.h | 395 +++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/usb/audio.h | 1 + sound/usb/card.c | 7 +- sound/usb/card.h | 2 +- sound/usb/clock.c | 228 +++++++++++++++++++++--- sound/usb/clock.h | 4 +- sound/usb/format.c | 91 ++++++++-- sound/usb/format.h | 6 +- sound/usb/mixer.c | 337 +++++++++++++++++++++++------------ sound/usb/stream.c | 365 +++++++++++++++++++++++++++++++++---- 11 files changed, 1246 insertions(+), 194 deletions(-) commit 13cf6dec93e021ebd297619ea1926aea31b6430b Author: Dmitry Lebed Date: Thu Mar 1 12:39:15 2018 +0300 cfg80211/nl80211: add DFS offload flag Add wiphy EXT_FEATURE flag to indicate that HW or driver does all DFS actions by itself. User-space functionality already implemented in hostapd using vendor-specific (QCA) OUI to advertise DFS offload support. Need to introduce generic flag to inform about DFS offload support. For devices with DFS_OFFLOAD flag set user-space will no longer need to issue CAC or do any actions in response to "radar detected" events. HW will do everything by itself and send events to user-space to indicate that CAC was started/finished, etc. Signed-off-by: Dmitrii Lebed Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 7 +++++++ net/wireless/nl80211.c | 12 ++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) commit 2cb021f5de55b1d158fa18b0215a4613c3289a82 Author: Dmitry Lebed Date: Thu Mar 1 12:39:16 2018 +0300 cfg80211/nl80211: add CAC_STARTED event CAC_STARTED event is needed for DFS offload feature and should be generated by driver/HW if DFS_OFFLOAD is enabled. Signed-off-by: Dmitry Lebed Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 3 +++ net/wireless/mlme.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 1ad22fb5bb53ce6bf5377f25529c0a007c61c6f5 Author: Tosoni Date: Wed Mar 14 16:58:34 2018 +0000 mac80211: inform wireless layer when frame RSSI is invalid When the low-level driver returns an invalid RSSI indication, set the signal value to 0 as an indication to the upper layer. Also, skip average level computation if signal is invalid. Signed-off-by: Jean Pierre TOSONI Signed-off-by: Johannes Berg net/mac80211/mlme.c | 160 ++++++++++++++++++++++++++++------------------------ net/mac80211/rx.c | 6 +- net/mac80211/scan.c | 4 +- 3 files changed, 93 insertions(+), 77 deletions(-) commit c42e8e054d95890448494f4897837ea32aa69be2 Merge: f09a793 d58ac80 Author: Ulf Hansson Date: Wed Mar 21 11:11:30 2018 +0100 Merge branch 'fixes' into next commit ccce305bd411f1c3a15eb8ca3b3cf827e38bd47c Author: Stephen Rothwell Date: Wed Mar 21 19:06:35 2018 +1100 firmware: explicitly include vmalloc.h After some other include file changes, fixes: drivers/base/firmware_loader/fallback.c: In function 'map_fw_priv_pages': drivers/base/firmware_loader/fallback.c:232:2: error: implicit declaration of function 'vunmap'; did you mean 'kunmap'? [-Werror=implicit-function-declaration] vunmap(fw_priv->data); ^~~~~~ kunmap drivers/base/firmware_loader/fallback.c:233:18: error: implicit declaration of function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration] fw_priv->data = vmap(fw_priv->pages, fw_priv->nr_pages, 0, ^~~~ kmap drivers/base/firmware_loader/fallback.c:233:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion] fw_priv->data = vmap(fw_priv->pages, fw_priv->nr_pages, 0, ^ drivers/base/firmware_loader/fallback.c: In function 'firmware_loading_store': drivers/base/firmware_loader/fallback.c:274:4: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration] vfree(fw_priv->pages); ^~~~~ kvfree drivers/base/firmware_loader/fallback.c: In function 'fw_realloc_pages': drivers/base/firmware_loader/fallback.c:405:15: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration] new_pages = vmalloc(new_array_size * sizeof(void *)); ^~~~~~~ kvmalloc drivers/base/firmware_loader/fallback.c:405:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion] new_pages = vmalloc(new_array_size * sizeof(void *)); ^ Signed-off-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/fallback.c | 1 + 1 file changed, 1 insertion(+) commit 8cfd36a0b53aeb4ec21d81eb79706697b84dfc3d Author: Benjamin Beichler Date: Wed Mar 7 18:11:07 2018 +0100 mac80211_hwsim: fix use-after-free bug in hwsim_exit_net When destroying a net namespace, all hwsim interfaces, which are not created in default namespace are deleted. But the async deletion of the interfaces could last longer than the actual destruction of the namespace, which results to an use after free bug. Therefore use synchronous deletion in this case. Fixes: 100cb9ff40e0 ("mac80211_hwsim: Allow managing radios from non-initial namespaces") Reported-by: syzbot+70ce058e01259de7bb1d@syzkaller.appspotmail.com Signed-off-by: Benjamin Beichler Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5741a164ff6fb5abbea8548ad0f3846bad2b9aec Author: Arnd Bergmann Date: Wed Mar 14 17:30:22 2018 +0100 mtd: maps: remove bfin-async-flash driver The blackfin architecture is getting removed, so this driver has become obsolete. Signed-off-by: Arnd Bergmann Signed-off-by: Boris Brezillon drivers/mtd/maps/Kconfig | 10 -- drivers/mtd/maps/Makefile | 1 - drivers/mtd/maps/bfin-async-flash.c | 196 ------------------------------------ 3 files changed, 207 deletions(-) commit 148a1a5d74485c5595481c3a2bd78daf50cd346a Author: Stefan Agner Date: Sat Mar 3 23:26:22 2018 +0100 mtd: tests: check erase block count in page test When there is only a single erase block, the cross erase test does not report sensible errors. Warn in case there is only a single erase block instead of executing the test. Signed-off-by: Stefan Agner Signed-off-by: Boris Brezillon drivers/mtd/tests/pagetest.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit ac9cd36c7a5dc79b3d10f0110bc096918109fdf8 Author: Antonio Cardace Date: Tue Feb 13 17:52:45 2018 +0000 mtd: nftl: use %*ph to print small buffer Use %*ph format to print small buffer as hex string. Suggested-by: Andy Shevchenko Signed-off-by: Antonio Cardace Signed-off-by: Boris Brezillon drivers/mtd/nftlmount.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e7bfb3fdbde3bfeeeb64e2d73ac6babe59519c9e Author: Boris Brezillon Date: Mon Feb 12 22:03:11 2018 +0100 mtd: Stop updating erase_info->state and calling mtd_erase_callback() MTD users are no longer checking erase_info->state to determine if the erase operation failed or succeeded. Moreover, mtd_erase_callback() is now a NOP. We can safely get rid of all mtd_erase_callback() calls and all erase_info->state assignments. While at it, get rid of the erase_info->state field, all MTD_ERASE_XXX definitions and the mtd_erase_callback() function. Signed-off-by: Boris Brezillon Reviewed-by: Richard Weinberger Reviewed-by: Miquel Raynal Acked-by: Bert Kenward --- Changes in v2: - Address a few coding style issues (reported by Miquel) - Remove comments that are no longer valid (reported by Miquel) drivers/mtd/chips/cfi_cmdset_0001.c | 16 ++-------------- drivers/mtd/chips/cfi_cmdset_0002.c | 26 +++----------------------- drivers/mtd/chips/cfi_cmdset_0020.c | 3 --- drivers/mtd/chips/map_ram.c | 2 -- drivers/mtd/devices/bcm47xxsflash.c | 9 +-------- drivers/mtd/devices/block2mtd.c | 7 +------ drivers/mtd/devices/docg3.c | 16 ++-------------- drivers/mtd/devices/lart.c | 6 ------ drivers/mtd/devices/mtd_dataflash.c | 4 ---- drivers/mtd/devices/mtdram.c | 3 +-- drivers/mtd/devices/phram.c | 7 ------- drivers/mtd/devices/pmc551.c | 2 -- drivers/mtd/devices/powernv_flash.c | 12 ++---------- drivers/mtd/devices/slram.c | 7 +------ drivers/mtd/devices/spear_smi.c | 3 --- drivers/mtd/devices/sst25l.c | 3 --- drivers/mtd/devices/st_spi_fsm.c | 4 ---- drivers/mtd/lpddr/lpddr2_nvm.c | 10 ++-------- drivers/mtd/lpddr/lpddr_cmds.c | 2 -- drivers/mtd/mtdconcat.c | 1 - drivers/mtd/mtdcore.c | 6 ++---- drivers/mtd/mtdpart.c | 5 ----- drivers/mtd/nand/nand_base.c | 16 ++++------------ drivers/mtd/onenand/onenand_base.c | 17 ----------------- drivers/mtd/spi-nor/spi-nor.c | 3 --- drivers/mtd/ubi/gluebi.c | 3 --- drivers/net/ethernet/sfc/falcon/mtd.c | 11 +---------- drivers/net/ethernet/sfc/mtd.c | 11 +---------- drivers/staging/goldfish/goldfish_nand.c | 3 --- include/linux/mtd/mtd.h | 9 --------- 30 files changed, 23 insertions(+), 204 deletions(-) commit 2793c1d77aa8876e5674e901d051c79570e99db2 Author: Santha Meena Ramamoorthy Date: Tue Mar 20 11:29:27 2018 -0700 drm/qxl: Replace drm_gem_object_reference/unreference() with _get/put() Replace drm_gem_object_reference/unreference function with *_get/put() suffixes, because it is shorter and consistent with the kernel kref_get/put() functions. The following Coccinelle script was used: @@ expression e; @@ ( -drm_gem_object_reference(e); +drm_gem_object_get(e); | -drm_gem_object_unreference(e); +drm_gem_object_put(e); | -drm_gem_object_unreference_unlocked(e); +drm_gem_object_put_unlocked(e); ) Signed-off-by: Santha Meena Ramamoorthy Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1521570567-22519-1-git-send-email-santhameena13@gmail.com drivers/gpu/drm/qxl/qxl_display.c | 4 ++-- drivers/gpu/drm/qxl/qxl_dumb.c | 2 +- drivers/gpu/drm/qxl/qxl_fb.c | 6 +++--- drivers/gpu/drm/qxl/qxl_gem.c | 2 +- drivers/gpu/drm/qxl/qxl_ioctl.c | 4 ++-- drivers/gpu/drm/qxl/qxl_object.c | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) commit 796e1112176ada7ebc084491458dfbfbe3a193b6 Author: Johannes Berg Date: Wed Mar 21 09:07:02 2018 +0100 mac80211_hwsim: fix secondary MAC address assignment OR'ing in 0x40 before a memcpy() to overwrite the value doesn't do much good - flip the order of operations are reported and tested by Jouni. Fixes: cb1a5bae5684 ("mac80211_hwsim: add permanent mac address option for new radios") Reported-by: Jouni Malinen Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb7768e774d12eac1189984a62925bc3bb386e13 Merge: d368e7d 6888384 Author: Chanwoo Choi Date: Wed Mar 21 13:58:23 2018 +0900 Merge branch 'ib-extcon-drm-dt-v4.17' into extcon-next commit d368e7de5e8bac32a9121608a7d4c96a229d5af2 Author: Linus Walleij Date: Mon Feb 12 09:53:14 2018 +0100 extcon: gpio: Convert to fully use GPIO descriptor Since we are not getting the GPIO from any platform data and global GPIO numberspace, we simply get the named "extcon" GPIO directly from the device. Cut away "active low" since GPIO descriptors already know if the line is active high or low. Simplify a bit with a struct device *dev helper variable in probe() and cut the complex init() function. Signed-off-by: Linus Walleij Signed-off-by: Chanwoo Choi drivers/extcon/extcon-gpio.c | 66 ++++++++++---------------------------------- 1 file changed, 15 insertions(+), 51 deletions(-) commit a62300d99f15c4be7edafbbc2ade0246ec853778 Author: Linus Walleij Date: Mon Feb 12 09:53:13 2018 +0100 extcon: gpio: Move platform data into state container This moves the platform data settings from the platform data struct and into the state container, saving some unnecessary references and simplifying things a bit. Signed-off-by: Linus Walleij [cw00.choi: Add FIXME comment of extcon_id] Signed-off-by: Chanwoo Choi drivers/extcon/extcon-gpio.c | 63 +++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 30 deletions(-) commit 66afdedf269cf485efb5affb30c34e1f37705445 Author: Linus Walleij Date: Mon Feb 12 09:53:12 2018 +0100 extcon: gpio: Localize platform data Nothing in the entire kernel #includes so move the platform data declaration inside of the driver. Signed-off-by: Linus Walleij Signed-off-by: Chanwoo Choi drivers/extcon/extcon-gpio.c | 22 +++++++++++++++++- include/linux/extcon/extcon-gpio.h | 47 -------------------------------------- 2 files changed, 21 insertions(+), 48 deletions(-) commit eca0f13c836a0d29fc2a713330698f08b743e86a Author: Andy Shevchenko Date: Wed Feb 28 18:22:08 2018 +0200 extcon: int3496: Ignore incorrect IoRestriction for ID pin The commit 70216fd937fe ("extcon: int3496: Set the id pin to direction-input if necessary") introduced a workaround for incorrect IoRestriction mode in ACPI table. Now, when GPIO ACPI library does it in generic way, see the commit 1b2ca32ab0b8 ("gpiolib: acpi: Introduce NO_RESTRICTION quirk") for the details, just set an appropriate quirk flag instead. Reviewed-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Andy Shevchenko Signed-off-by: Chanwoo Choi drivers/extcon/extcon-intel-int3496.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit ad49aee401dd1997ec71360df6e51a91ad3cf516 Author: Hans de Goede Date: Mon Feb 19 14:20:46 2018 +0100 extcon: intel-cht-wc: Set direction and drv flags for V5 boost GPIO Sometimes (firmware bug?) the V5 boost GPIO is not configured as output by the BIOS, leading to the 5V boost convertor being permanently on, Explicitly set the direction and drv flags rather then inheriting them from the firmware to fix this. Fixes: 585cb239f4de ("extcon: intel-cht-wc: Disable external 5v boost ...") Cc: stable@vger.kernel.org Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Chanwoo Choi drivers/extcon/extcon-intel-cht-wc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 46b27ee9256dc752eb579125b0c79bb9d9574c94 Author: Rex Zhu Date: Wed Mar 21 11:04:21 2018 +0800 drm/amd/pp: Fix unable to handle kernel paging request when set pp table Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3472266fb03b98c809ab08f3c6141c10488c13b Author: Rex Zhu Date: Tue Mar 20 17:04:46 2018 +0800 drm/amd/pp: Fix gfx ring test failed on Fiji without hw avfs support caused by 'commit ca82cec868d1 ("drm/amd/pp: Simplified the avfs btc state on smu7")' Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 3 +++ drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit eb4900aa4c49e978041405ab2eeeb8538c7f736a Author: Rex Zhu Date: Tue Mar 20 16:32:07 2018 +0800 drm/amdgpu: Fix kernel NULL pointer dereference in dpm functions caused by 'commit 83e3c4615872 ("drm/amdgpu: Remove wrapper layer of smu ip functions")' BUG: unable to handle kernel NULL pointer dereference at 00000000000005d8 [ 313.241459] IP: ci_dpm_read_sensor+0x37/0xf0 [amdgpu] Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 1 + drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 1 + drivers/gpu/drm/amd/amdgpu/si_dpm.c | 1 + 3 files changed, 3 insertions(+) commit 81ce8bea035befed2ae7670bf9f9404fa3f46f71 Author: Rex Zhu Date: Tue Mar 20 16:28:56 2018 +0800 drm/amdgpu: Fix kernel NULL pointer dereference when amdgpu fini Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit e5b03032e34da84ee765ffbe4e36d344fdd04108 Author: Mikita Lipski Date: Thu Mar 15 16:53:08 2018 -0400 drm/amdgpu - Disable all irqs before disabling all CRTCs By moving amdgpu_irq_disable_all earlier in the sequence fixes an issue with disabling pflip interrupts: *ERROR* dal_irq_service_dummy_ack: called for non-implemented irq source Earlier patch fixed a memory corruption and revealed irq warnings.This way it seems to be there no obvious issues with unloading the module. Signed-off-by: Mikita Lipski Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 088e7c16170645f1e2298ec6e0029079ef603635 Author: Mikita Lipski Date: Thu Mar 15 09:37:08 2018 -0400 drm/amdgpu: Disable irq on device before destroying it Disable irq on devices before destroying them. That prevents use-after-free memory access when unloading the driver. Signed-off-by: Mikita Lipski Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ff97cba8c1b24f6017e16ca6facca3c3f32d2c00 Author: Mikita Lipski Date: Wed Mar 14 13:41:29 2018 -0400 drm/amdgpu: Use atomic function to disable crtcs with dc enabled This change fixes the deadlock when unloading the driver with displays connected. Signed-off-by: Mikita Lipski Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 864917a3b8d459ee2cfd37a1d1c9251cca88d108 Author: Tom St Denis Date: Tue Mar 20 09:13:08 2018 -0400 drm/amd/amdgpu: fix offset into page with amdgpu_iomem debugfs file The offset inside the page wasn't included in the copy call meaning the start of the page was being read/written instead. Reported-by: Jay Cornwall Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd08a8d9e8dd6b77a990372fc1233765ca9175e9 Author: Hawking Zhang Date: Mon Mar 19 17:28:28 2018 +0800 drm/amdgpu/nbio6: Correct PCIE_INDEX/DATA pair used for smn register accessing PCIE_INDEX2/DATA2 pair will be used for smn register accessing since from vega. PCIE_INDEX/DATA pair should be reserved for smu Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f004938f789963a0d3023da6e528f53bfb9f4429 Author: Andrey Grodzovsky Date: Mon Mar 19 16:48:54 2018 -0400 drm/amd/powerplay: Fix NULL pointer deref on driver unbind. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit e3ecdffac9ccdbb201a6daf158faae1060e1b565 Author: Alex Deucher Date: Thu Mar 15 17:39:45 2018 -0500 drm/amdgpu: add documentation for amdgpu_device.c Add kernel doc for the functions in amdgpu_device.c Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 439 ++++++++++++++++++++++++++++- 1 file changed, 427 insertions(+), 12 deletions(-) commit 3ac952b10dec55e50312340ca4cf8f631944ae17 Author: Alex Deucher Date: Fri Mar 16 11:04:53 2018 -0500 drm/amdgpu: add VCN to firmware query interface Need to be able to query the VCN firmware version from userspace to determine supported features, etc. Reviewed-by: Huang Rui Acked-by: Leo Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 12 ++++++++++++ include/uapi/drm/amdgpu_drm.h | 2 ++ 2 files changed, 14 insertions(+) commit 78230c46ec0a91dd4256c9e54934b3c7095a7ee3 Merge: b65bd40 037f031 Author: Dave Airlie Date: Wed Mar 21 14:07:03 2018 +1000 Merge tag 'omapdrm-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next omapdrm patches for v4.17 * Fix sparse warnings from omapdrm * HPD support for DVI connector * Big cleanup to remove static variables * tag 'omapdrm-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (69 commits) drm/omap: fix compile error when DPI is disabled drm/omap: fix compile error when debugfs is disabled drm: omapdrm: displays: panel-dsi-cm: Fix field access before set drm/omap: cleanup color space conversion drm/omap: Allow HDMI audio setup even if we do not have video configured drm/omap: fix maximum sizes drm/omap: add writeback funcs to dispc_ops drm/omap: fix scaling limits for WB drm/omap: fix WB height with interlace drm/omap: fix WBDELAYCOUNT with interlace drm/omap: fix WBDELAYCOUNT for HDMI drm/omap: set WB channel-in in wb_setup() drm/omap: Add pclk setting case when channel is DSS_WB drm/omap: dispc: disp_wb_setup to check return code drm/omap: remove leftover enums dt-bindings: display: add HPD gpio to DVI connector drm/omap: add HPD support to connector-dvi drm/omap: Init fbdev emulation only when we have displays drm/omap: cleanup fbdev init/free drm/omap: fix omap_fbdev_free() when omap_fbdev_create() wasn't called ... commit b65bd40311565a58b12f400e95e8aa0a1e3a8878 Merge: 19c800c 288e5c8 Author: Dave Airlie Date: Wed Mar 21 14:06:00 2018 +1000 Merge tag 'drm-msm-next-2018-03-20' of git://people.freedesktop.org/~robclark/linux into drm-next Updates for 4.17. Sorry, running a bit late on this, didn't have a chance to send pull-req before heading to linaro. But it has all been in linux-next for a while. Main updates: + DSI updates from 10nm / SDM845 + fix for race condition with a3xx/a4xx fence completion irq + some refactoring/prep work for eventual a6xx support (ie. when we have a userspace) + a5xx debugfs enhancements + some mdp5 fixes/cleanups to prepare for eventually merging writeback support (ie. when we have a userspace) * tag 'drm-msm-next-2018-03-20' of git://people.freedesktop.org/~robclark/linux: (36 commits) drm/msm: fix building without debugfs drm/msm/mdp5: don't pre-reserve LM's if no dual-dsi drm/msm/mdp5: add missing LM flush bits drm/msm/mdp5: print a bit more of the atomic state drm/msm/mdp5: rework CTL START signal handling drm/msm: Trigger fence completion from GPU drm/msm/dsi: fix direct caller of msm_gem_free_object() drm/msm: strip out msm_fence_cb drm/msm: rename mdp->disp drm/msm/dsi: Fix potential NULL pointer dereference in msm_dsi_modeset_init drm/msm/adreno/a5xx_debugfs: fix potential NULL pointer dereference drm/msm/dsi: Get byte_intf_clk only for versions that need it drm/msm/adreno: Use generic function to load firmware to a buffer object drm/msm/adreno: Define a list of firmware files to load per target drm/msm/adreno: Rename gpmufw to powerfw drm/msm: Pass the correct aperture end to drm_mm_init drm/msm/gpu: Set number of clocks to 0 if the list allocation fails drm/msm: Replace gem_object deprecated functions drm/msm/hdmi: fix semicolon.cocci warnings drm/msm/mdp5: Fix trailing semicolon ... commit 19c800caa682d9e20087d7b98af49301cf1ab039 Merge: 4f6dd8d 27e92f1 Author: Dave Airlie Date: Wed Mar 21 14:04:38 2018 +1000 Merge tag 'drm/tegra/for-4.17-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Changes for v4.17-rc1 This fixes mmap() for fbdev devices by providing a custom implementation based on the KMS variant. This is a fairly exotic case these days, hence why it is not flagged for stable. There is also support for dedicating one of the overlay planes to serve as a hardware cursor on older Tegra that did support hardware cursors but not RGBA formats for it. Planes will now also export the IN_FORMATS property by supporting the various block-linear tiling modifiers for RGBA pixel formats. Other than that, there's a bit of cleanup of DMA API abuse, use of the private object infrastructure for global state (rather than subclassing atomic state objects) and an implementation of ->{begin,end}_cpu_access callbacks for PRIME exported buffers, which allow users to perform cache maintenance on these buffers. * tag 'drm/tegra/for-4.17-rc1' of git://anongit.freedesktop.org/tegra/linux: drm/tegra: prime: Implement ->{begin,end}_cpu_access() drm/tegra: gem: Map pages via the DMA API drm/tegra: hub: Use private object for global state drm/tegra: fb: Properly support linear modifier drm/tegra: plane: Support format modifiers drm/tegra: dc: Dedicate overlay plane to cursor on older Tegra's drm/tegra: plane: Make tegra_plane_get_overlap_index() static drm/tegra: fb: Implement ->fb_mmap() callback drm/tegra: gem: Make __tegra_gem_mmap() available more widely drm/tegra: gem: Reshuffle declarations commit 4f6dd8d6858b6fc0a3babbd2510f99c2bc84f2cb Merge: 287d2ac 6e810eb Author: Dave Airlie Date: Wed Mar 21 13:58:43 2018 +1000 Merge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next I have accumulated some patches as we went through some internal testing for mali-dp and I was waiting for the YUV2RGB patches to land in your tree. * 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld: drm: mali-dp: Add YUV->RGB conversion support for video layers drm: mali-dp: Turn off CRTC vblank when removing module. drm: arm: malidp: Use drm_atomic_helper_shutdown() to disable planes on removal drm: arm: malidp: Don't destroy planes manually in error handlers drm/mali-dp: Fix malidp_atomic_commit_hw_done() for event sending. drm/arm/malidp: Disable pixel alpha blending for colors that do not have alpha drm: mali-dp: Fix bug on scaling with rotation drm/mali-dp: Don't enable scaling engine for planes that only rotate. drm: mali-dp: Uninitialized variable in malidp_se_check_scaling() drm/mali-dp: Align pitch size to be multiple of bus burst read size. drm/mali-dp: Rotated planes need a larger pitch size. commit ac1775012058e13ef1522938e27f5973d9e3f053 Author: Baolin Wang Date: Tue Mar 20 10:42:14 2018 +0800 spi: sprd: Add the support of restarting the system On Spreadtrum platform, we use one PMIC watchdog to reset the whole system with loading one suitable timeout value (usually 50ms) for the watchdog. In theory, we should implement the restart function in drivers/power/reset subsystem to access the PMIC watchdog with regmap. When restart the system, other cores will be stopped by IPI, but if other cores were accessing PMIC with holding the regmap mutex lock, that will cause dead-lock issue if we try to access the PMIC watchdog with regmap to restart the whole system. Thus we can implement the restart function in ADI driver to avoid this issue. Signed-off-by: Baolin Wang Signed-off-by: Mark Brown drivers/spi/spi-sprd-adi.c | 112 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) commit b1d0db067fbe2598d62b248beea5d705a0ea7642 Author: Ezequiel Garcia Date: Tue Mar 20 13:03:31 2018 -0300 ASoC: rockchip: rk3288-hdmi-analog: Select needed codecs The driver does not select all the codec drivers that needs. Fix it by selecting the analog and HDMI codecs. Cc: Sjoerd Simons Signed-off-by: Ezequiel Garcia Signed-off-by: Mark Brown sound/soc/rockchip/Kconfig | 3 +++ 1 file changed, 3 insertions(+) commit 279df1917d3e7817983bf5b3476643ec6dfd6f22 Author: Ezequiel Garcia Date: Tue Mar 20 13:03:32 2018 -0300 ASoC: rockchip: Fix compatible string in example Use the correct compatible string in the example devicetree snippet, which was probably overlooked. Signed-off-by: Ezequiel Garcia Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rockchip,rk3288-hdmi-analog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5ad3b4b240b0335f9ea7d474efa79ba8463ade7 Author: Ezequiel Garcia Date: Tue Mar 20 13:03:30 2018 -0300 ASoC: rockchip: Fix dai_name for HDMI codec Commit 24069b589b02 ("ASoC: hdmi-codec: remove multi detection support") changed the dai_name for the HDMI Codec, breaking the rk3288_hdmi_analog driver, which fails to register with a: rk3288-snd-hdmi-analog sound: ASoC: CODEC DAI hdmi-hifi.0 not registered This commit fixes the dai_name, fixing the issue. Fixes: 24069b589b02 ("ASoC: hdmi-codec: remove multi detection support") Signed-off-by: Ezequiel Garcia Signed-off-by: Mark Brown sound/soc/rockchip/rk3288_hdmi_analog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a61aa683655f3182aca6e38404ae9aac03e771ae Author: Baolin Wang Date: Tue Mar 20 10:42:13 2018 +0800 spi: sprd: Simplify the transfer function We can move the hardware spinlock protection into the ADI read/write functions to simplify the sprd_adi_transfer_one() function. Moreover this optimization can also help to access PMIC without considering the hardware spinlock using sprd_adi_read/write() functions. Signed-off-by: Baolin Wang Signed-off-by: Mark Brown drivers/spi/spi-sprd-adi.c | 64 +++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 29 deletions(-) commit 287d2ac36b6f2830ea4ef66c110abc0f47a9a658 Merge: 963976c 6da2b93 Author: Dave Airlie Date: Wed Mar 21 11:46:05 2018 +1000 Merge branch 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-next - Continued cleanup and restructuring of powerplay - Fetch VRAM type from vbios rather than hardcoding for SOC15 asics - Allow ttm to drop its backing store when drivers don't need it - DC bandwidth calc updates - Enable DC backlight control pre-DCE11 asics - Enable DC on all supported asics - DC Fixes for planes due to the way our hw is ordered vs what drm expects - DC CTM/regamma fixes - Misc cleanup and bug fixes * 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux: (89 commits) amdgpu/dm: Default PRE_VEGA ASIC support to 'y' drm/amd/pp: Remove the cgs wrapper for notify smu version on APU drm/amd/display: fix dereferencing possible ERR_PTR() drm/amd/display: Refine disable VGA drm/amdgpu: Improve documentation of bo_ptr in amdgpu_bo_create_kernel drm/radeon: Don't turn off DP sink when disconnected drm/amd/pp: Rename file name cz_* to smu8_* drm/amd/pp: Replace function/struct name cz_* with smu8_* drm/amd/pp: Remove unneeded void * casts in cz_hwmgr.c/cz_smumgr.c drm/amd/pp: Mv cz uvd/vce pg/dpm functions to cz_hwmgr.c drm/amd/pp: Remove dead header file pp_asicblocks.h drm/amd/pp: Delete dead code on cz_clockpowergating.c drm/amdgpu: Call amdgpu_ucode_fini_bo in amd_powerplay.c drm/amdgpu: Remove wrapper layer of smu ip functions drm/amdgpu: Don't compared ip_block_type with ip_block_index drm/amdgpu: Plus NULL function pointer check drm/amd/pp: Move helper functions to smu_help.c drm/amd/pp: Replace rv_* with smu10_* drm/amd/pp: Fix function parameter not correct drm/amd/pp: Add rv_copy_table_from/to_smc to smu backend function table ... commit 67b570e305d002c73453deb1eb39df9b77c927ea Merge: c88d311 fc9fdd6 Author: Mark Brown Date: Wed Mar 21 09:42:18 2018 +0800 Merge branch 'topic/intel' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-amd commit 9260f873684fb1cfb9ea10a10be3e8b888da3c0e Author: Masanari Iida Date: Tue Mar 20 21:33:09 2018 +0900 ASoC: mediatek: mt2701: Fix a typo in printk This patch fixes a spelling typo in printk Signed-off-by: Masanari Iida Signed-off-by: Mark Brown sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8a9a29c4fe9dd0dd2206cc4368efec95dc9defb Author: Nikita Yushchenko Date: Tue Mar 20 11:41:15 2018 +0300 ASoC: rsnd: set pm_ops in hibernate-compatible way Use SET_SYSTEM_SLEEP_PM_OPS() macro instead of direct assignment to .suspend and .resume fields. This makes driver working after restore from hibernation. Signed-off-by: Nikita Yushchenko Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 78262f4575c29f185947fe58952cd1beabc74f82 Author: Daniel Borkmann Date: Tue Mar 20 00:21:15 2018 +0100 bpf, doc: add description wrt native/bpf clang target and pointer size As this recently came up on netdev [0], lets add it to the BPF devel doc. [0] https://www.spinics.net/lists/netdev/msg489612.html Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Documentation/bpf/bpf_devel_QA.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 353601e7d323c700d891d0ede2bbf13c050741a5 Author: J. Bruce Fields Date: Fri Feb 16 14:29:42 2018 -0500 nfsd: create a separate lease for each delegation Currently we only take one vfs-level delegation (lease) for each file, no matter how many clients hold delegations on that file. Let's instead keep a one-to-one mapping between NFSv4 delegations and VFS delegations. This turns out to be simpler. There is still a many-to-one mapping of NFS opens to NFS files, and the delegations on one file are all associated with one struct file. The VFS can still distinguish between these delegations since we're setting fl_owner to the struct nfs4_delegation now, not to the shared file. I'm replacing at least one complicated function wholesale, which I don't like to do, but I haven't figured out how to do this more incrementally. Signed-off-by: J. Bruce Fields Reviewed-by: Jeff Layton fs/nfsd/nfs4state.c | 173 ++++++++++++++++++++-------------------------------- 1 file changed, 65 insertions(+), 108 deletions(-) commit 86d29b10eb666f72da70bd5cf9c80b4446270c8c Author: J. Bruce Fields Date: Wed Feb 21 15:27:28 2018 -0500 nfsd: move sc_file assignment into alloc_init_deleg Take an easy chance to simplify the caller a little. Signed-off-by: J. Bruce Fields Reviewed-by: Jeff Layton fs/nfsd/nfs4state.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0af6e690f0d4e8196f6cfa10bad5c9ffff565d9b Author: J. Bruce Fields Date: Wed Feb 21 15:11:03 2018 -0500 nfsd: factor out common delegation-destruction code Pull some duplicated code into a common helper. This changes the order in destroy_delegation a little, but it looks to me like that shouldn't matter. Signed-off-by: J. Bruce Fields Reviewed-by: Jeff Layton fs/nfsd/nfs4state.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit 68b18f52947bbe77bc9ddb23626f30ed5cf70641 Author: J. Bruce Fields Date: Mon Feb 19 11:38:33 2018 -0500 nfsd: make nfs4_get_existing_delegation less confusing This doesn't "get" anything. Signed-off-by: J. Bruce Fields Reviewed-by: Jeff Layton fs/nfsd/nfs4state.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 0c911f5408e49a313dd17f2f331c62c3db515f34 Author: J. Bruce Fields Date: Fri Feb 16 11:49:11 2018 -0500 nfsd4: dp->dl_stid.sc_file doesn't need locking The delegation isn't visible to anyone yet. Signed-off-by: J. Bruce Fields Reviewed-by: Jeff Layton fs/nfsd/nfs4state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 653e514e9ebcb1d6ab71c2c8bb28a3b65ffbfe15 Author: J. Bruce Fields Date: Thu Feb 15 22:08:45 2018 -0500 nfsd4: set fl_owner to delegation, not file pointer For now this makes no difference, as for files having delegations, there's a one-to-one relationship between an nfs4_file and its nfs4_delegation. Signed-off-by: J. Bruce Fields Reviewed-by: Jeff Layton fs/nfsd/nfs4state.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit cba7b3d15071fa0deb5b6e7a1c97c29d2904e6a3 Author: J. Bruce Fields Date: Thu Feb 15 15:50:49 2018 -0500 nfsd: simplify nfs4_put_deleg_lease calls Every single caller gets the file out of the delegation, so let's do that once in nfs4_put_deleg_lease. Plus we'll need it there for other reasons. Signed-off-by: J. Bruce Fields Reviewed-by: Jeff Layton fs/nfsd/nfs4state.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit b8232d3315ec746e3b5d4c9252541567e57a509b Author: J. Bruce Fields Date: Thu Feb 15 15:29:15 2018 -0500 nfsd: simplify put of fi_deleg_file fi_delegees is basically just a reference count on users of fi_deleg_file, which is cleared when fi_delegees goes to zero. The fi_deleg_file check here is redundant. Also add an assertion to make sure we don't have unbalanced puts. Signed-off-by: J. Bruce Fields Reviewed-by: Jeff Layton fs/nfsd/nfs4state.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4e461e62fc987ed5edb82e2a902fd93f4dccae8f Author: Martin Blumenstingl Date: Mon Mar 12 21:57:09 2018 +0100 ARM: dts: meson8b: the CBUS GPIO controller only has 83 GPIOs Update the "gpio-ranges" property of the CBUS GPIO controller on Meson8b because it only provides 83 GPIOs. The GPIO definitions in include/dt-bindings/gpio/meson8b-gpio.h inherited all GPIOs from Meson8 until recently. However, Meson8b does not support all GPIOs which are supported by Meson8 (Meson8b doesn't have a GPIOZ bank, most of the pins from the GPIODV bank are missing on Meson8b - just to name a few differences). The actual number of GPIOs is only 83, instead of 120 from Meson8 plus the 10 GPIOs from the DIF bank on Meson8b. Signed-off-by: Martin Blumenstingl Reviewed-by: Jerome Brunet Acked-by: Linus Walleij Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e03efbce6bebf55111ec8e22e2f545f72aff6cfd Author: Linus Lüssing Date: Sat Mar 17 21:11:14 2018 +0100 ARM: dts: meson8b-odroidc1: add microSD support The Odroid C1 features a microSD slot. This patch adds the necessary DT bindings to support it. Signed-off-by: Linus Lüssing Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b-odroidc1.dts | 58 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/meson8b.dtsi | 8 +++++ 2 files changed, 66 insertions(+) commit 6f29d07ca4b999c36d42f9cf8d1dddf9ddca3250 Author: Chuck Lever Date: Tue Mar 20 17:05:20 2018 -0400 svcrdma: Clean up rdma_build_arg_xdr Clean up: The value of the byte_count parameter is already passed to rdma_build_arg_xdr as part of the svc_rdma_op_ctxt structure. Further, without the parameter called "byte_count" there is no need to have the abbreviated "bc" automatic variable. "bc" can now be called something more intuitive. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 97cc3264508f33783ba21573204d7e0bf5b197e7 Author: Chuck Lever Date: Tue Mar 20 17:05:15 2018 -0400 svcrdma: Consult max_qp_init_rd_atom when accepting connections The target needs to return the lesser of the client's Inbound RDMA Read Queue Depth (IRD), provided in the connection parameters, and the local device's Outbound RDMA Read Queue Depth (ORD). The latter limit is max_qp_init_rd_atom, not max_qp_rd_atom. The svcrdma_ord value caps the ORD value for iWARP transports, which do not exchange ORD/IRD values at connection time. Since no other Linux kernel RDMA-enabled storage target sees fit to provide this cap, I'm removing it here too. initiator_depth is a u8, so ensure the computed ORD value does not overflow that field. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 3 --- net/sunrpc/xprtrdma/svc_rdma.c | 4 ++-- net/sunrpc/xprtrdma/svc_rdma_transport.c | 22 +++++++++------------- 3 files changed, 11 insertions(+), 18 deletions(-) commit 0c4398ff8b581b68ee02c5194654134acc31f4a7 Author: Chuck Lever Date: Tue Mar 20 17:05:09 2018 -0400 svcrdma: Use pr_err to report Receive errors Clean up: Other completion handlers use pr_err, not pr_warn. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_transport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3758a191116f110a503a0c6cb7ce89bc81841baa Author: Bjorn Helgaas Date: Thu Feb 15 15:07:39 2018 -0600 sparc/PCI: Stop reserving System ROM and Video ROM in PCI space Previously, pci_register_legacy_regions() reserved PCI address space under every PCI host bridge for the System ROM and the Video ROM, but these regions are not part of PCI address space. Previously, pci_register_legacy_regions() reserved the following areas of PCI address space under every PCI host bridge: [bus 0xa0000-0xbffff] Video RAM area (VGA frame buffer) [bus 0xc0000-0xc7fff] Video ROM [bus 0xf0000-0xfffff] System ROM It does need to reserve the [bus 0xa0000-0xbffff] region (at least if there's a possibility of a VGA device below the bridge) because VGA devices can respond to that even if they don't describe it with a BAR. But the Video ROM and System ROM areas don't seem necessary because they are not areas that legacy PCI devices respond to. They appear to be copied from x86, where they describe areas of system memory that depend on BIOS conventions. On x86, BIOS copies the option ROM of the primary VGA device to RAM at 0xc0000, and the 0xf0000-0xfffff region is reserved for the motherboard BIOS. Neither of these things applies to sparc. Stop reserving the System ROM and Video ROM regions in PCI space. Signed-off-by: Bjorn Helgaas Acked-by: David S. Miller arch/sparc/kernel/pci_common.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 6b6bc6205d98796361962ee282a063f18ba8dc57 Author: Stephen Smalley Date: Mon Mar 5 11:47:56 2018 -0500 selinux: wrap AVC state Wrap the AVC state within the selinux_state structure and pass it explicitly to all AVC functions. The AVC private state is encapsulated in a selinux_avc structure that is referenced from the selinux_state. This change should have no effect on SELinux behavior or APIs (userspace or LSM). Signed-off-by: Stephen Smalley Reviewed-by: James Morris Signed-off-by: Paul Moore security/selinux/avc.c | 284 ++++++++++++++----------- security/selinux/hooks.c | 398 ++++++++++++++++++++++++------------ security/selinux/include/avc.h | 32 ++- security/selinux/include/avc_ss.h | 3 +- security/selinux/include/security.h | 3 + security/selinux/netlabel.c | 3 +- security/selinux/selinuxfs.c | 60 ++++-- security/selinux/ss/services.c | 9 +- security/selinux/xfrm.c | 17 +- 9 files changed, 512 insertions(+), 297 deletions(-) commit 0619f0f5e36f12e100ef294f5980cfe7c93ff23e Author: Stephen Smalley Date: Tue Mar 20 11:59:11 2018 -0400 selinux: wrap selinuxfs state Move global selinuxfs state to a per-instance structure (selinux_fs_info), and include a pointer to the selinux_state in this structure. Pass this selinux_state to all security server operations, thereby ensuring that each selinuxfs instance presents a view of and acts as an interface to a particular selinux_state instance. This change should have no effect on SELinux behavior or APIs (userspace or LSM). It merely wraps the selinuxfs global state, links it to a particular selinux_state (currently always the single global selinux_state) and uses that state for all operations. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/selinuxfs.c | 438 ++++++++++++++++++++++++++----------------- 1 file changed, 261 insertions(+), 177 deletions(-) commit 274f62e1e5c74e7cbc5c965ec02b7c590da4b2fe Author: Stephen Smalley Date: Tue Mar 20 11:59:10 2018 -0400 selinux: fix handling of uninitialized selinux state in get_bools/classes If security_get_bools/classes are called before the selinux state is initialized (i.e. before first policy load), then they should just return immediately with no booleans/classes. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/ss/services.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit d3cc2cd7c8d7adfb43075036878e319d5893280d Author: Richard Haines Date: Mon Mar 19 17:33:36 2018 +0000 selinux: Update SELinux SCTP documentation Update SELinux-sctp.rst "SCTP Peer Labeling" section to reflect how the association permission is validated. Reported-by: Dominick Grift Signed-off-by: Richard Haines Signed-off-by: Paul Moore Documentation/security/SELinux-sctp.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit f75da8a8a918d7c343a2ec95d1ed99e5689e0f23 Author: Lai Jiangshan Date: Tue Mar 20 17:24:32 2018 +0800 workqueue: remove the comment about the old manager_arb mutex The manager_arb mutex doesn't exist any more. Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo kernel/workqueue.c | 1 - 1 file changed, 1 deletion(-) commit 5826cc8f5a6094ce6565a8e0008c9f07ebf724b1 Author: Lai Jiangshan Date: Tue Mar 20 17:24:05 2018 +0800 workqueue: fix the comments of nr_idle Since the worker rebinding behavior was refactored, there is no idle worker off the idle_list now. The comment is outdated and can be just removed. It also groups nr_workers and nr_idle together. Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo kernel/workqueue.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 92d7ec1d71e351f11ba503369eb78225510cfcc7 Author: Hans Ulli Kroll Date: Mon Mar 5 18:09:10 2018 +0100 leds: Fix wrong dmi_match on PC Engines APU LEDs BIOS on APU board doesn't expose board_name property, and thus we have to rely on the product_name instead. Signed-off-by: Hans Ulli Kroll Signed-off-by: Jacek Anaszewski drivers/leds/leds-apu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66569052fe5328729ff696c1ec17913907d00b5f Author: Marc Zyngier Date: Tue Mar 20 18:21:37 2018 +0000 irqchip/gic-v3: Don't try to reset AP0Rn Clearing AP0Rn has created a number of regressions, due to systems that have SCR_EL3.FIQ set. Even when addressing some obvious bugs, GIC500 platforms seem to act bizarrely (we are supposed to have 5 bits of priority, but PMR seems to behave as if we had 6...). Drop the AP0Rn reset for the time being, it is unlikely to have any effect if kexec-ing. Fixes: d6062a6d62c6 irqchip/gic-v3: Reset APgRn registers at boot time Reported-by: Shawn Lin Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 4 ---- 1 file changed, 4 deletions(-) commit 65da7d1979c229b69d3fbec63350a6ae26232ad6 Author: Marc Zyngier Date: Tue Mar 20 13:44:09 2018 +0000 irqchip/gic-v3: Do not check trigger configuration of partitionned LPIs We cannot know the trigger of partitionned PPIs ahead of time (when we instanciate the partitions), so let's not check them early. Reported-by: JeffyChen Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 971401015d14dfbb483aa6385f8bddc1afad0c32 Author: Lu Baolu Date: Fri Mar 16 12:31:36 2018 +0800 iommu/vt-d: Use real PASID for flush in caching mode If caching mode is supported, the hardware will cache none-present or erroneous translation entries. Hence, software should explicitly invalidate the PASID cache after a PASID table entry becomes present. We should issue such invalidation with the PASID value that we have changed. PASID 0 is not reserved for this case. Cc: Jacob Pan Cc: Kevin Tian Cc: Sankaran Rajesh Suggested-by: Ashok Raj Signed-off-by: Liu Yi L Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-svm.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 9b80d1f946ee40923f7bf51c69cb3a6ac6097e4a Author: Arnaldo Carvalho de Melo Date: Fri Mar 16 10:39:24 2018 -0300 perf annotate: Introduce annotation_line__filter() Out of the TUI logic that allows toggling the presentation of source code lines. Will be used in the upcoming --stdio2 mode. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-g0ckz9ajy6unswrv2iy39mxk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 19 +++++++------------ tools/perf/util/annotate.h | 4 ++++ 2 files changed, 11 insertions(+), 12 deletions(-) commit c298304bd747d6a0b733f0becb470ff07ead0317 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 23:14:51 2018 -0300 perf annotate: Use a ops table for annotation_line__write() To simplify the passing of arguments, the --stdio2 code will have to set all the fields with operations printing to stdout. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-pcs3c7vdy9ucygxflo4nl1o7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 32 +++++++++++++++------------- tools/perf/util/annotate.c | 44 ++++++++++++++++++++------------------- tools/perf/util/annotate.h | 19 ++++++++++------- 3 files changed, 53 insertions(+), 42 deletions(-) commit 9fe77e0166ae453d61954e8200b90ac7000242de Author: Biju Das Date: Wed Jan 24 15:42:00 2018 +0000 dt-bindings: iommu: ipmmu-vmsa: Add device tree support for r8a774[35] Document r8a774[35] specific compatible strings. The Renesas RZ/G1[ME] (r8a774[35]) IPMMU are identical to the R-Car Gen2 family. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Joerg Roedel Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e4aa4ae77aaa80e69b9d3335541be4ba9bd02766 Author: Rob Herring Date: Wed Mar 7 09:42:35 2018 -0600 PCI: kirin: Remove unnecessary asm/compiler.h include compiler.h is unnecessary and doesn't exist on some arches, so remove it. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi drivers/pci/dwc/pcie-kirin.c | 1 - 1 file changed, 1 deletion(-) commit c744b63b6c422776293cc526ef7887623926f33e Author: Wei Yongjun Date: Tue Mar 20 14:19:34 2018 +0000 clk: hisilicon: fix potential NULL dereference in hisi_clk_alloc() platform_get_resource() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. This is detected by Coccinelle semantic patch. @@ expression pdev, res, n, t, e, e1, e2; @@ res = platform_get_resource(pdev, t, n); + if (!res) + return -EINVAL; ... when != res == NULL e = devm_ioremap(e1, res->start, e2); Signed-off-by: Wei Yongjun Fixes: 322269163a36 ("clk: hisilicon: add hisi_clk_alloc function.") Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk.c | 2 ++ 1 file changed, 2 insertions(+) commit 58e1e2d2cd89a4aa77212eae64dd4824374e83f4 Author: David Lechner Date: Thu Mar 15 21:52:35 2018 -0500 clk: davinci: cfgchip: Add TI DA8XX USB PHY clocks This adds a new driver for the USB PHY clocks in the CFGCHIP2 syscon register on TI DA8XX-type SoCs. The USB0 (USB 2.0) PHY clock is an interesting case because it calls clk_enable() in a reentrant way. The USB 2.0 PSC only has to be enabled temporarily while we are locking the PLL, which takes place during the clk_enable() callback. Signed-off-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/da8xx-cfgchip.c | 351 ++++++++++++++++++++++++++++++++++++ 1 file changed, 351 insertions(+) commit 1e88a8d64f221208801bb279ee7452df0b6d609f Author: David Lechner Date: Thu Mar 15 21:52:34 2018 -0500 clk: davinci: New driver for TI DA8XX CFGCHIP clocks This adds a new driver for the gate and multiplexer clocks in the CFGCHIPn syscon registers on TI DA8XX-type SoCs. Signed-off-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/Makefile | 2 + drivers/clk/davinci/da8xx-cfgchip.c | 439 ++++++++++++++++++++++++ include/linux/platform_data/clk-da8xx-cfgchip.h | 21 ++ 3 files changed, 462 insertions(+) commit 0c92c71770457df9c5459190ba72350459785f37 Author: David Lechner Date: Thu Mar 15 21:52:33 2018 -0500 dt-bindings: clock: Add bindings for DA8XX CFGCHIP clocks This adds a new binding for the clocks present in the CFGCHIP syscon registers in TI DA8XX SoCs. Signed-off-by: David Lechner Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd .../bindings/clock/ti/davinci/da8xx-cfgchip.txt | 93 ++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit aad739f946a86c5dd07c3d8fc66c2795a256cfbb Author: David Lechner Date: Thu Mar 15 21:52:32 2018 -0500 clk: davinci: Add platform information for TI DM646x PSC This adds platform-specific declarations for the PSC clocks on TI DM646x based systems. Signed-off-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/Makefile | 1 + drivers/clk/davinci/psc-dm646x.c | 80 ++++++++++++++++++++++++++++++++++++++++ drivers/clk/davinci/psc.c | 1 + drivers/clk/davinci/psc.h | 1 + 4 files changed, 83 insertions(+) commit f41e5275757ed2516153b2dea616ef9e4afbfbcf Author: David Lechner Date: Thu Mar 15 21:52:31 2018 -0500 clk: davinci: Add platform information for TI DM644x PSC This adds platform-specific declarations for the PSC clocks on TI DM644x based systems. Signed-off-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/Makefile | 1 + drivers/clk/davinci/psc-dm644x.c | 83 ++++++++++++++++++++++++++++++++++++++++ drivers/clk/davinci/psc.c | 1 + drivers/clk/davinci/psc.h | 1 + 4 files changed, 86 insertions(+) commit 9ab1102cceef22c7386664f114d2713cb021d186 Author: David Lechner Date: Thu Mar 15 21:52:30 2018 -0500 clk: davinci: Add platform information for TI DM365 PSC This adds platform-specific declarations for the PSC clocks on TI DM365 based systems. Signed-off-by: David Lechner Reviewed-by: Sekhar Nori Signed-off-by: Stephen Boyd drivers/clk/davinci/Makefile | 1 + drivers/clk/davinci/psc-dm365.c | 96 +++++++++++++++++++++++++++++++++++++++++ drivers/clk/davinci/psc.c | 1 + drivers/clk/davinci/psc.h | 1 + 4 files changed, 99 insertions(+) commit b99bfca56ecb186c71ad2fe0377c99357f4e9bf5 Author: David Lechner Date: Thu Mar 15 21:52:29 2018 -0500 clk: davinci: Add platform information for TI DM355 PSC This adds platform-specific declarations for the PSC clocks on TI DM355 based systems. Signed-off-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/Makefile | 1 + drivers/clk/davinci/psc-dm355.c | 88 +++++++++++++++++++++++++++++++++++++++++ drivers/clk/davinci/psc.c | 1 + drivers/clk/davinci/psc.h | 1 + 4 files changed, 91 insertions(+) commit a47d6040629f26e0b6f8a85b4dd2dbb91de405af Author: David Lechner Date: Thu Mar 15 21:52:28 2018 -0500 clk: davinci: Add platform information for TI DA850 PSC This adds platform-specific declarations for the PSC clocks on TI DA850/ OMAP-L138/AM18XX SoCs. Signed-off-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/Makefile | 1 + drivers/clk/davinci/psc-da850.c | 149 ++++++++++++++++++++++++++++++++++++++++ drivers/clk/davinci/psc.c | 4 ++ drivers/clk/davinci/psc.h | 4 ++ 4 files changed, 158 insertions(+) commit c2952e271b94f805e8cb73d18e50394689cae508 Author: David Lechner Date: Thu Mar 15 21:52:27 2018 -0500 clk: davinci: Add platform information for TI DA830 PSC This adds platform-specific declarations for the PSC clocks on TI DA830/ OMAP-L137/AM17XX SoCs. Signed-off-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/Makefile | 1 + drivers/clk/davinci/psc-da830.c | 116 ++++++++++++++++++++++++++++++++++++++++ drivers/clk/davinci/psc.c | 2 + drivers/clk/davinci/psc.h | 3 ++ 4 files changed, 122 insertions(+) commit c6ed4d734bc7f731709dab0ffd69eed499dd5277 Author: David Lechner Date: Thu Mar 15 21:52:26 2018 -0500 clk: davinci: New driver for davinci PSC clocks This adds a new driver for mach-davinci PSC clocks. This is porting the code from arch/arm/mach-davinci/psc.c to the common clock framework and is converting it to use regmap to simplify the code. Additionally, it adds device tree support for these clocks. Note: although there are similar clocks for TI Keystone we are not able to share the code for a few reasons. The keystone clocks are device tree only and use legacy one-node-per-clock bindings. Also the keystone driver makes the assumption that there is only one PSC per SoC and uses global variables, but here we have two controllers per SoC. Signed-off-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/Makefile | 2 + drivers/clk/davinci/psc.c | 542 +++++++++++++++++++++++++++++++++++++++++++ drivers/clk/davinci/psc.h | 97 ++++++++ 3 files changed, 641 insertions(+) commit 21cdf7269f9dcd8dc22d152fbfee85e4ea57289f Author: David Lechner Date: Thu Mar 15 21:52:25 2018 -0500 dt-bindings: clock: New bindings for TI Davinci PSC This adds a new binding for the Power Sleep Controller (PSC) for the mach-davinci family of processors. Note: Although TI Keystone has a very similar PSC, we are not using the existing bindings. Keystone is using a legacy one-node-per-clock binding (actually two nodes if you count the separate reset binding for the same IP block). Also, some davinci LPSCs have quirks that aren't handled by the keystone bindings, so we would be adding one compatible string per clock with quirks instead of just a new compatible string for each controller. Signed-off-by: David Lechner Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/ti/davinci/psc.txt | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit 6ef35851a0147372e70b8a6115f4d712f30ca200 Author: David Lechner Date: Thu Mar 15 21:52:24 2018 -0500 clk: davinci: Add platform information for TI DM646x PLL This adds platform-specific declarations for the PLL clocks on TI DM646x based systems. Signed-off-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/Makefile | 1 + drivers/clk/davinci/pll-dm646x.c | 84 ++++++++++++++++++++++++++++++++++++++++ drivers/clk/davinci/pll.c | 2 + drivers/clk/davinci/pll.h | 3 ++ 4 files changed, 90 insertions(+) commit d67c13eaf79b35bedb1e0bc405416afa3bd6ee04 Author: David Lechner Date: Thu Mar 15 21:52:23 2018 -0500 clk: davinci: Add platform information for TI DM644x PLL This adds platform-specific declarations for the PLL clocks on TI DM644x based systems. Signed-off-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/Makefile | 1 + drivers/clk/davinci/pll-dm644x.c | 80 ++++++++++++++++++++++++++++++++++++++++ drivers/clk/davinci/pll.c | 2 + drivers/clk/davinci/pll.h | 3 ++ 4 files changed, 86 insertions(+) commit 650bba61fc3611e4a349fb323011fd3e7a228860 Author: David Lechner Date: Thu Mar 15 21:52:22 2018 -0500 clk: davinci: Add platform information for TI DM365 PLL This adds platform-specific declarations for the PLL clocks on TI DM365 based systems. Signed-off-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/Makefile | 1 + drivers/clk/davinci/pll-dm365.c | 145 ++++++++++++++++++++++++++++++++++++++++ drivers/clk/davinci/pll.c | 2 + drivers/clk/davinci/pll.h | 3 + 4 files changed, 151 insertions(+) commit dcdd19b269e0de71a60b50516b95b39341a0795a Author: David Lechner Date: Thu Mar 15 21:52:21 2018 -0500 clk: davinci: Add platform information for TI DM355 PLL This adds platform-specific declarations for the PLL clocks on TI DM355 based systems. Signed-off-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/Makefile | 1 + drivers/clk/davinci/pll-dm355.c | 79 +++++++++++++++++++++++++++++++++++++++++ drivers/clk/davinci/pll.c | 2 ++ drivers/clk/davinci/pll.h | 3 ++ 4 files changed, 85 insertions(+) commit 55b3caed2bf6edd5d44ccae92ed37cff00951a91 Author: David Lechner Date: Thu Mar 15 21:52:20 2018 -0500 clk: davinci: Add platform information for TI DA850 PLL This adds platform-specific declarations for the PLL clocks on TI DA850/ OMAP-L138/AM18XX SoCs. Signed-off-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/Makefile | 1 + drivers/clk/davinci/pll-da850.c | 212 ++++++++++++++++++++++++++++++++++++++++ drivers/clk/davinci/pll.c | 4 + drivers/clk/davinci/pll.h | 5 + 4 files changed, 222 insertions(+) commit c92765fdb8ffd2efc7693d5d83bb71ab8dfcad5e Author: David Lechner Date: Thu Mar 15 21:52:19 2018 -0500 clk: davinci: Add platform information for TI DA830 PLL This adds platform-specific declarations for the PLL clocks on TI DA830/ OMAP-L137/AM17XX SoCs. Signed-off-by: David Lechner Signed-off-by: Stephen Boyd drivers/clk/davinci/Makefile | 1 + drivers/clk/davinci/pll-da830.c | 70 +++++++++++++++++++++++++++++++++++++++++ drivers/clk/davinci/pll.c | 1 + drivers/clk/davinci/pll.h | 4 +++ 4 files changed, 76 insertions(+) commit 2d172691515961cad2abb4bf1b15d187bf2106cf Author: David Lechner Date: Thu Mar 15 21:52:18 2018 -0500 clk: davinci: New driver for davinci PLL clocks This adds a new driver for mach-davinci PLL clocks. This is porting the code from arch/arm/mach-davinci/clock.c to the common clock framework. Additionally, it adds device tree support for these clocks. The ifeq ($(CONFIG_COMMON_CLK), y) in the Makefile is needed to prevent compile errors until the clock code in arch/arm/mach-davinci is removed. Note: although there are similar clocks for TI Keystone we are not able to share the code for a few reasons. The keystone clocks are device tree only and use legacy one-node-per-clock bindings. Also the register layouts are a bit different, which would add even more if/else mess to the keystone clocks. And the keystone PLL driver doesn't support setting clock rates. Signed-off-by: David Lechner Signed-off-by: Stephen Boyd MAINTAINERS | 7 + drivers/clk/Makefile | 1 + drivers/clk/davinci/Makefile | 5 + drivers/clk/davinci/pll.c | 888 ++++++++++++++++++++++++++ drivers/clk/davinci/pll.h | 120 ++++ include/linux/platform_data/clk-davinci-pll.h | 21 + 6 files changed, 1042 insertions(+) commit b6e37ce2371dac0d696332d8e74c110030ab47c3 Author: David Lechner Date: Thu Mar 15 21:52:17 2018 -0500 dt-bindings: clock: Add new bindings for TI Davinci PLL clocks This adds a new binding for the PLL IP blocks in the mach-davinci family of processors. Currently, only da850 has device tree support but these bindings can also work for other SoCs in this family just by adding new compatible strings. Note: Although these PLL controllers are very similar to the TI Keystone SoCs, we are not re-using those bindings. The Keystone bindings use a legacy one-node-per-clock binding. Furthermore, the mach-davinici SoCs have a slightly different PLL register layout and a number of quirks that can't be handled by the existing bindings, so the keystone bindings could not be used as-is anyway. Signed-off-by: David Lechner Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/ti/davinci/pll.txt | 96 ++++++++++++++++++++++ 1 file changed, 96 insertions(+) commit 0466080c751ec2de9efae3ac6305225cc4326047 Merge: 6349a16 36d6ea9 Author: David S. Miller Date: Tue Mar 20 12:29:58 2018 -0400 Merge branch 'dsa-mv88e6xxx-some-fixes' Uwe Kleine-König says: ==================== net: dsa: mv88e6xxx: some fixes these patches target net-next and got approved by Andrew Lunn. Compared to (implicit) v1, I dropped the patch that I didn't know if it was right because of missing documentation on my side. But Andrew already cared for that in a patch that is now adfccf118211 in net-next. ==================== Signed-off-by: David S. Miller commit 36d6ea94b07120bfa3c7db7772175037d9799d5a Author: Uwe Kleine-König Date: Tue Mar 20 10:44:42 2018 +0100 net: dsa: mv88e6xxx: Fix interrupt name for g2 irq This changes the respective line in /proc/interrupts from 49: x x mv88e6xxx-g1 7 Edge mv88e6xxx-g1 to 49: x x mv88e6xxx-g1 7 Edge mv88e6xxx-g2 which makes more sense. Reviewed-by: Andrew Lunn Signed-off-by: Uwe Kleine-König Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a708767e40ec82079f6d2b1f01acedc352fb5d57 Author: Uwe Kleine-König Date: Tue Mar 20 10:44:41 2018 +0100 net: dsa: mv88e6xxx: Fix typo in a comment Reviewed-by: Andrew Lunn Signed-off-by: Uwe Kleine-König Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79a68b2631d8ec3e149081b1ecfb23509c040b4e Author: Uwe Kleine-König Date: Tue Mar 20 10:44:40 2018 +0100 net: dsa: mv88e6xxx: Fix name of switch 88E6141 The switch name is emitted in the kernel log, so having the right name there is nice. Fixes: 1558727a1c1b ("net: dsa: mv88e6xxx: Add support for ethernet switch 88E6141") Reviewed-by: Andrew Lunn Signed-off-by: Uwe Kleine-König Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78d9f4d49bbecd101b4e5faf19f8f70719fee2ca Author: Matthias Schiffer Date: Sun Mar 4 09:28:54 2018 +0100 netfilter: ebtables: add support for matching IGMP type We already have ICMPv6 type/code matches (which can be used to distinguish different types of MLD packets). Add support for IPv4 IGMP matches in the same way. Signed-off-by: Matthias Schiffer Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter_bridge/ebt_ip.h | 4 +++- net/bridge/netfilter/ebt_ip.c | 19 +++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) commit 5adc1668ddc42bb44fd6d006cacad74ed0cbf49d Author: Matthias Schiffer Date: Sun Mar 4 09:28:53 2018 +0100 netfilter: ebtables: add support for matching ICMP type and code We already have ICMPv6 type/code matches. This adds support for IPv4 ICMP matches in the same way. Signed-off-by: Matthias Schiffer Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter_bridge/ebt_ip.h | 13 +++++++-- net/bridge/netfilter/ebt_ip.c | 43 +++++++++++++++++++++------- 2 files changed, 43 insertions(+), 13 deletions(-) commit 7f9badfceffc6d2ae331050f1cd155a633130437 Author: Sudeep Holla Date: Tue Mar 20 11:22:48 2018 +0000 clk: scmi: use devm_of_clk_add_hw_provider() API and drop scmi_clocks_remove Commit aa795c41d9cd ("clk: Add devm_of_clk_add_hw_provider()/del_provider() APIs") adds devm_of_clk_add_hw_provider which takes care of deleting the clock provider when the clock providers device is removed. This patch makes use of devm_of_clk_add_hw_provider() instead of of_clk_add_hw_provider() so that we can eliminate the need of explicit scmi_clocks_remove for just doing of_clk_del_provider() Acked-by: Stephen Boyd Signed-off-by: Sudeep Holla drivers/clk/clk-scmi.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit a1e9b74cc2ef80131b9f955c0e1acc25285dc88c Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 19:12:39 2018 -0300 perf annotate: Finish the generalization of annotate_browser__write() We pass some more callbacks and all of annotate_browser__write() seems to be free of TUI code (except for some arrow constants, will fix). Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-5uo6yvwnxtsbe8y6v0ysaakf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 97 +++++--------------------------- tools/perf/util/annotate.c | 113 +++++++++++++++++++++++++++++++++++--- tools/perf/util/annotate.h | 13 +++-- 3 files changed, 127 insertions(+), 96 deletions(-) commit 2ba5eca10486eeb37030f8bce27cecda3763502f Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 17:54:36 2018 -0300 perf annotate: Introduce annotation_line__print_start() out of TUI code For the --tui and --stdio2 cases using callbacks for print() and set_percent_color() end up being the easiest path, real GUI remains as an exercise. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-1o7az1ng55g2g6ppr2jpeuct@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 82 ++++++++++----------------------------- tools/perf/util/annotate.c | 75 +++++++++++++++++++++++++++++++++++ tools/perf/util/annotate.h | 5 +++ 3 files changed, 101 insertions(+), 61 deletions(-) commit c52202434de2bd3e0c447c6dce992266fd7fc589 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 17:52:53 2018 -0300 perf ui browser: Add vprintf() method We'll need it for some callbacks for the upcoming annotation__line_print() routines. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-t3qiobj4ua38xzsq8cyw9ky5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browser.c | 7 ++++++- tools/perf/ui/browser.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 2f025ea0bac2f99a2800f43f139f57c226d3b08b Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 17:04:53 2018 -0300 perf annotate: Introduce annotation_line__max_percent() Out of the annotate_browser__write() routine, to be used in the --stdio2 mode. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-0he0wyy4haswqi1qb35x37do@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 7 +------ tools/perf/util/annotate.c | 14 ++++++++++++++ tools/perf/util/annotate.h | 3 +++ 3 files changed, 18 insertions(+), 6 deletions(-) commit ecda45bd6cfe0badda0e8215c5a008eaf7647716 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 16:54:11 2018 -0300 perf annotate: Introduce symbol__annotate2 method That does all the extended boilerplate the TUI browser did, leaving the symbol__annotate() function to be used by the old --stdio output mode. Now the upcoming --stdio2 output mode should just use this one to set things up. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-e2x8wuf6gvdhzdryo229vj4i@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 28 +--------------------------- tools/perf/util/annotate.c | 39 +++++++++++++++++++++++++++++++++++++++ tools/perf/util/annotate.h | 4 ++++ 3 files changed, 44 insertions(+), 27 deletions(-) commit b8b0d819858e1140e98ce858a0c839f3d03cb0f5 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 16:26:29 2018 -0300 perf annotate: Introduce init_column_widths() method out of TUI code More non-TUI stuff goes to the UI-agnostic library Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-hngv7rpqvtta69ouj7ne770q@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 14 +------------- tools/perf/util/annotate.c | 17 +++++++++++++++++ tools/perf/util/annotate.h | 1 + 3 files changed, 19 insertions(+), 13 deletions(-) commit 7232bf7a8954e4f6558e6b74fb6a2403e7a3b7be Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 16:19:59 2018 -0300 perf annotate: Move update_column_widths() to the generic lib Previous patch left it where it was to ease review, move it to its right place. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ikdjr014p7k5kachgyjrgiey@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 13 ------------- tools/perf/util/annotate.c | 13 +++++++++++++ tools/perf/util/annotate.h | 1 + 3 files changed, 14 insertions(+), 13 deletions(-) commit 9761e86e36c0957e76c1b7c328953687a1a38655 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 16:18:21 2018 -0300 perf annotate: Move the column widths from the TUI to generic lib This also will be used in other output formats, such as --stdio2. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-86h6ftebc62ij1rx8q9zkpwk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 45 +++++++++++++++++---------------------- tools/perf/util/annotate.h | 7 ++++++ 2 files changed, 26 insertions(+), 26 deletions(-) commit 5bc49f6120203c9fbe8e63fdcb9598e0ba615de7 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 15:59:01 2018 -0300 perf annotate: Introduce set_offsets() method out of TUI code More non-strictly TUI code being moved to the UI neutral annotation library, to be used in the upcoming --stdio2 output mode. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ek20dnd8z2y5v54pcepihybz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 24 ++---------------------- tools/perf/util/annotate.c | 28 ++++++++++++++++++++++++++++ tools/perf/util/annotate.h | 3 +++ 3 files changed, 33 insertions(+), 22 deletions(-) commit 1cf5f98a5edbb4b628349bea37da0aa259ded07c Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 15:52:33 2018 -0300 perf annotate: Move nr_{asm_}entries to struct annotation More non-TUI stuff. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-yd4g6q0rngq4i49hz6iymtta@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 23 +++++++++++------------ tools/perf/util/annotate.h | 2 ++ 2 files changed, 13 insertions(+), 12 deletions(-) commit 0ca693b315aa6893c9d3552fa6a5d536c38b6c4a Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 15:46:22 2018 -0300 perf annotate: Move 'start' to struct annotation Another field that is not TUI specific. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-jj3dwswndft5mln8hu9k0idv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 5 ++--- tools/perf/util/annotate.h | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) commit 4850c92e40835ea9ded3cd2051d4c95b2b69e426 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 15:43:18 2018 -0300 perf annotate: Nuke struct browser_line The information in there are all related to things already moved to struct annotation, so move those members to struct annotation_line. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-uc2b9c8iocvuuvbl7hyind84@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 66 ++++++++++++--------------------------- tools/perf/util/annotate.h | 2 ++ 2 files changed, 22 insertions(+), 46 deletions(-) commit 0db45bcfac8586c6f5b732f114f456f2f788b19f Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 15:31:56 2018 -0300 perf annotate: Move mark_jump_targets from the TUI to the annotation library This also is not TUI specific, should be used in the upcoming --stdio2 mode. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-v827xec8z3hxrmgp7bwa6ohs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 54 +++------------------------------------ tools/perf/util/annotate.c | 44 +++++++++++++++++++++++++++++++ tools/perf/util/annotate.h | 4 +++ 3 files changed, 51 insertions(+), 51 deletions(-) commit 6dcd57e8ae2080bca776d55e6e2b3d529677cae5 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 15:20:12 2018 -0300 perf annotate: Move nr_jumps to struct annotation This is another information that will be useful for the --stdio2 mode, to provide symbol statistics, so move it from the TUI and change the mark_jump_targets() method to struct annotation. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-kpgle1qxe7thajvrqleuvi80@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 13 ++++--------- tools/perf/util/annotate.h | 1 + 2 files changed, 5 insertions(+), 9 deletions(-) commit 27feb761c7211c6c35350277b6c65989b982b377 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 15:14:45 2018 -0300 perf annotate: Move jumps_percent_color to ui_browser Since all it needs is in ui_browser and annotation structs members. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-9f8c2f9aetbibcw33d615y9o@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit bc1c0f3dfa77619ad90f6fed290636cf54629d30 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 15:10:28 2018 -0300 perf annotate: Move max_jump_sources to struct annotation This is not useful only for the TUI, we'll want to somehow mark the --stdio2 lines with the most jump sources too. And moving this will allow us to change some function signatures from annotate_browser to ui_browser, reducing boilerplate. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-vyggbbqd05k3k4mvv7z9l5px@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 11 ++++++----- tools/perf/util/annotate.h | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) commit 95aa89d92de8b8da6dc1469bfc560784ab177aba Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 15:04:33 2018 -0300 perf annotate tui: Add browser__annotation() helper To reduce the boilerplate to get to the symbol being annotated from the struct browser ->priv area. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ficdyqhe9esjseflvkriskwn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 40 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 24 deletions(-) commit 6af612d2b10593cdd8bba4427741a981bdd57c86 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 12:41:39 2018 -0300 perf annotate: Move pcnt_with() to the annotation library Out of the TUI code, since now all it touches is what is in 'struct annotation'. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-kh5bbbgd7l4agv9oc5hnw0ui@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 14 +++----------- tools/perf/util/annotate.h | 5 +++++ 2 files changed, 8 insertions(+), 11 deletions(-) commit 16932d77050fb3d76bc265c21c53eeec14639d5e Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 12:33:56 2018 -0300 perf annotate: Stop using a global config struct For the TUI, that is interactive, its interesting to have a configuration that one can go on changing and then when moving from one symbol annotation to another symbol, the options set while browsing the first symbol to be kept. But since we're trying to make this code reusable by a --stdio formatter, we better have a pointer in struct annotation and in the TUI case set it to the global, but use something else for other cases, such as --stdio2. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-kv1ngr159jfu5h9ddgiuwcvg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 84 +++++++++++++++++++++++---------------- tools/perf/util/annotate.h | 1 + 2 files changed, 51 insertions(+), 34 deletions(-) commit 0553e83dc10831ac5127c86fa5a78af940fa92a2 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 11:52:32 2018 -0300 perf annotate: Move nr_events from annotate_browser to annotation struct Paving the way to move more stuff out of TUI and into the generic annotation library. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-8vqax6wgfqohelot8j8zsfvs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 11 ++++++----- tools/perf/util/annotate.h | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) commit f56c083bc4f9bca6f4d75d13b93720915185a8e8 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 11:46:23 2018 -0300 perf annotate: Move compute_ipc() to annotation library Out of the TUI code, as it has nothing specific to that UI and should be used in the other output modes as well. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-0jahghvqdodb8vu2591pkv3d@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 69 +-------------------------------------- tools/perf/util/annotate.c | 60 ++++++++++++++++++++++++++++++++++ tools/perf/util/annotate.h | 2 ++ 3 files changed, 63 insertions(+), 68 deletions(-) commit 9d6bb41d1ced7288b54a79a2c15d750085012215 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 10:47:54 2018 -0300 perf annotate: Move annotation_line array from TUI to generic code This is needed to reduce the differences between the TUI mode and the other annotation UIs, next csets will move that code to the UI-neutral annotation library. Leaving it in place for now to ease review. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-gz09ahsd5xm1eip7ura5ow6x@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 41 ++++++++++++++++++--------------------- tools/perf/util/annotate.h | 1 + 2 files changed, 20 insertions(+), 22 deletions(-) commit 0e83a7e9e592cdf60696076071b2629adc569826 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 10:35:04 2018 -0300 perf annotate tui: Move have_cycles to struct annotation This is to pave the way to have more functions shared between TUI, stdio and the upcoming stdio2 formatting, that will use the __scnprintf functions used by --tui in a --stdio fashion. This partially addresses the comments added in cset 30e863bb6f70 ("perf annotate: Compute IPC and basic block cycles"): /* * This should probably be in util/annotate.c to share with the tty * annotate, but right now we need the per byte offsets arrays, * which are only here. */ The following patches will address the rest. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-yftvybgx1s8sevs6kp1an0ft@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 20 +++++++++----------- tools/perf/util/annotate.h | 6 ++++++ 2 files changed, 15 insertions(+), 11 deletions(-) commit 00ea0eb21e9ba38636608e3eb0ac332fc022d5bb Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 10:28:06 2018 -0300 perf annotate tui: Use annotate_browser__cycles_width() mroe Instead of an open coded equivalent, will reduce a bit noise in the following patches. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-pnwn1dg9345zawhgiorpsadf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c426e5849b6019a0da7957e1acce4762c77f7c71 Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 10:26:17 2018 -0300 perf annotate: Move cycles/IPC formatting width constants outside TUI These will be used in --stdio2 so lets move it first to reduce noise in the following patches. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-fisud7pcak3prk7uwsvs3g2e@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 19 ++++++++----------- tools/perf/util/annotate.h | 3 +++ 2 files changed, 11 insertions(+), 11 deletions(-) commit 98bc80b0a199619d2987e61e42415a1ae7a1d7fb Author: Arnaldo Carvalho de Melo Date: Thu Mar 15 10:03:34 2018 -0300 perf annotate: Move annotation_options out of the TUI browser This will be useful when making parts of the TUI browser generic enough to be used for a new stdio mode, available even when the TUI is not built in, for explicit user decision or when the necessary library devel files, for the slang library currently, are not available in the build system. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-45twzienhz7ypbad0sbvojku@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 10 +--------- tools/perf/util/annotate.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 9 deletions(-) commit 555fc3b1ef4c850c635be333024dcf67bc1e7cb8 Author: Martin Vuille Date: Sun Mar 18 13:50:53 2018 -0400 perf unwind: Report error from dwfl_attach_state In verbose level 2, errors returned by libdw are reported in most cases, but not when calling dwfl_attach_state. Since elfutils v 0.160 (2014), dwfl_attach_state sets the error code to report failure cause. On failure, log the reported error. Signed-off-by: Martin Vuille Reviewed-by: Kim Phillips Link: http://lkml.kernel.org/r/20180318175053.4222-1-jpmv27@aim.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/unwind-libdw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit acaa3f13b8dd77da3c6c0fe18cb1159eef7ea286 Author: Wei Yongjun Date: Tue Mar 20 14:20:30 2018 +0000 drm/meson: Fix potential NULL dereference in meson_drv_bind_master() platform_get_resource_byname() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. This is detected by Coccinelle semantic patch. @@ expression pdev, res, n, t, e, e1, e2; @@ res = platform_get_resource_byname(pdev, t, n); + if (!res) + return -EINVAL; ... when != res == NULL e = devm_ioremap(e1, res->start, e2); Signed-off-by: Wei Yongjun Signed-off-by: Neil Armstrong Acked-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1521555630-29284-1-git-send-email-weiyongjun1@huawei.com drivers/gpu/drm/meson/meson_drv.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6349a169623159a011d3a3eaea39b4e2f751888e Merge: c846d8d 0471950 Author: David S. Miller Date: Tue Mar 20 12:11:03 2018 -0400 Merge branch 'mlxsw-Adapt-driver-to-upcoming-firmware-versions' Ido Schimmel says: ==================== mlxsw: Adapt driver to upcoming firmware versions The first two patches make sure that reserved fields are set to zero, as required by the device's programmer's reference manual (PRM). Last two patches prevent the driver from performing an invalid operation that is going to be denied by upcoming firmware versions. ==================== Signed-off-by: David S. Miller commit 04719507b756e5eb38282c33162a9c89beb6f440 Author: Ido Schimmel Date: Mon Mar 19 09:51:03 2018 +0200 mlxsw: spectrum_acl: Do not invalidate already invalid ACL groups When a new ACL group is created its region (ACL) list is initially empty. Thus, the call to mlxsw_sp_acl_tcam_group_update() would basically invalidate an already invalid (non-existent) group. Remove the unnecessary call and make the function symmetric to its del() counterpart. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c | 5 ----- 1 file changed, 5 deletions(-) commit 808be37ae323ed5585a3e6257ccb5b435bd1a4b9 Author: Ido Schimmel Date: Mon Mar 19 09:51:02 2018 +0200 mlxsw: spectrum_acl: Adapt ACL configuration to new firmware versions The driver currently creates empty ACL groups, binds them to the requested port and then fills them with actual ACLs that point to TCAM regions. However, empty ACL groups are considered invalid and upcoming firmware versions are going to forbid their binding. Work around this limitation by only performing the binding after the first ACL was added to the group. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 43 +++++++++++++--------- 1 file changed, 26 insertions(+), 17 deletions(-) commit 7e8c711661ce21ceba5be861b1b3d30f325a4db1 Author: Tal Bar Date: Mon Mar 19 09:51:01 2018 +0200 mlxsw: spectrum: Reserved field in mbox profile shouldn't be set There is no need to set some of the fields within 'mbox_config_profile', since they are reserved and capability mask should be set to zero. Signed-off-by: Tal Bar Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ---- 1 file changed, 4 deletions(-) commit 830a8b1b001d3c2b4dfaa97d0eea5b9d6b03ae62 Author: Shalom Toledo Date: Mon Mar 19 09:51:00 2018 +0200 mlxsw: pci: Set mbox dma addresses to zero when not used Some of the opcodes don't use in, out or both mboxes. In such cases, the mbox address is a reserved field and FW expects it to be zero. Signed-off-by: Shalom Toledo Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/pci.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 47db69752b22de2ac315d094fd09fac31b0d3bfc Author: Al Viro Date: Tue Mar 20 10:44:21 2018 -0400 sparc: get rid of asm wrapper for nis_syscall() just use current_pt_regs() Signed-off-by: Al Viro arch/sparc/kernel/entry.S | 7 ------- arch/sparc/kernel/sys_sparc_32.c | 5 ++--- arch/sparc/kernel/sys_sparc_64.c | 4 ++-- arch/sparc/kernel/syscalls.S | 3 --- arch/sparc/kernel/systbls.h | 2 +- 5 files changed, 5 insertions(+), 16 deletions(-) commit 3d0e354e4e51f40a58ae8bff7ded60f0c1f5c618 Author: Al Viro Date: Tue Mar 20 10:34:57 2018 -0400 sparc: switch compat {f,}truncate64() to COMPAT_SYSCALL_DEFINE ... and drop the pointless checks - sys_truncate() itself might've lacked the check when that stuff was first written, but it has already grown one by the time that stuff went into mainline. Signed-off-by: Al Viro arch/sparc/kernel/sys_sparc32.c | 14 ++++---------- arch/sparc/kernel/systbls.h | 12 ++++++------ arch/sparc/kernel/systbls_64.S | 4 ++-- 3 files changed, 12 insertions(+), 18 deletions(-) commit 8c82ccd63192a3ed66a454fdd70da2a4cc8455a1 Author: Al Viro Date: Mon Mar 19 23:48:30 2018 -0400 sparc: switch compat pread64 and pwrite64 to COMPAT_SYSCALL_DEFINE Signed-off-by: Al Viro arch/sparc/kernel/sys_sparc32.c | 18 ++++++------------ arch/sparc/kernel/systbls.h | 12 ++++++------ arch/sparc/kernel/systbls_64.S | 2 +- 3 files changed, 13 insertions(+), 19 deletions(-) commit 8ccb004677d15ebfd44470e27bc9a399b0e71e4e Author: Al Viro Date: Mon Mar 19 23:44:52 2018 -0400 convert compat sync_file_range() to COMPAT_SYSCALL_DEFINE Signed-off-by: Al Viro arch/sparc/kernel/sys_sparc32.c | 7 ++++--- arch/sparc/kernel/systbls.h | 6 +++--- arch/sparc/kernel/systbls_64.S | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) commit a0d32ad366bb4235267380b341fcae8307f51044 Author: Al Viro Date: Mon Mar 19 23:28:55 2018 -0400 switch sparc_remap_file_pages() to SYSCALL_DEFINE Signed-off-by: Al Viro arch/sparc/kernel/sys_sparc_32.c | 6 +++--- arch/sparc/kernel/systbls.h | 2 +- arch/sparc/kernel/systbls_32.S | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 6de7617e8892666073a9a8f6ba7e2f7882f4cadc Author: Al Viro Date: Mon Mar 19 23:26:39 2018 -0400 sparc: get rid of memory_ordering(2) wrapper use current_pt_regs() in it instead Signed-off-by: Al Viro arch/sparc/kernel/sys_sparc_64.c | 4 ++-- arch/sparc/kernel/syscalls.S | 3 --- arch/sparc/kernel/systbls.h | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) commit ee076e81fc14ca79334d02970cea66604f183a14 Author: Al Viro Date: Mon Mar 19 23:23:53 2018 -0400 sparc: trivial conversions to {COMPAT_,}SYSCALL_DEFINE() Signed-off-by: Al Viro arch/sparc/kernel/sys_sparc32.c | 22 +++++++++++----------- arch/sparc/kernel/sys_sparc_32.c | 16 ++++++++-------- arch/sparc/kernel/sys_sparc_64.c | 4 ++-- arch/sparc/kernel/systbls.h | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) commit b925c46c81104d170719b58e10f4375299109b8a Author: Al Viro Date: Mon Mar 19 23:08:21 2018 -0400 sparc: bury a zombie extern that had been that way for twenty years Back in January 1998, in 2.1.79 check_pending() got taken out and shot. Users in arch/sparc and arch/sparc64 got converted away from it. One of the externs (in arch/sparc) was taken out at the same time. Two other (in arch/sparc64/kernel/sys_sparc{,32}.c) got stuck. The one in sys_sparc32.c was quietly removed 6 years later by an unrelated commit. The last one kept shambling until now. It's time to end that depravity, let's bury the body... Signed-off-by: Al Viro arch/sparc/kernel/sys_sparc_64.c | 2 -- 1 file changed, 2 deletions(-) commit a00a700bdea86442c0d63a6bc7cc9d03a47e1d09 Author: Al Viro Date: Mon Mar 19 21:08:33 2018 -0400 sparc: get rid of remaining SIGN... wrappers just convert compat_sys_{readahead,fadvise64,fadvise64_64} to COMPAT_SYSCALL_DEFINE Signed-off-by: Al Viro arch/sparc/kernel/sys32.S | 28 ---------------------------- arch/sparc/kernel/sys_sparc32.c | 26 ++++++++++---------------- arch/sparc/kernel/systbls.h | 12 ++++++------ arch/sparc/kernel/systbls_64.S | 4 ++-- 4 files changed, 18 insertions(+), 52 deletions(-) commit dd19958ce8417f4b25d29c7619dbc3929ca8d6d0 Author: Al Viro Date: Mon Mar 19 20:58:52 2018 -0400 sparc: kill useless SIGN... wrappers SYSCALL_DEFINE and COMPAT_SYSCALL_DEFINE already give argument normalization. Signed-off-by: Al Viro arch/sparc/kernel/sys32.S | 10 ---------- arch/sparc/kernel/systbls_64.S | 14 +++++++------- 2 files changed, 7 insertions(+), 17 deletions(-) commit 257a1aac7a9ae82db9c84a263a883c6f17789fea Author: Khalid Aziz Date: Tue Mar 20 08:46:02 2018 -0600 sparc: Make auxiliary vectors for ADI available on 32-bit as well Commit c6202ca764ac ("sparc64: Add auxiliary vectors to report platform ADI properties") adds auxiliary vectors to report ADI capabilities on sparc64 platform only. This needs to be uniform across 64-bit and 32-bit. This patch makes the same vectors available on 32-bit as well. Signed-off-by: Khalid Aziz Cc: Khalid Aziz Signed-off-by: David S. Miller arch/sparc/include/uapi/asm/auxvec.h | 4 ---- 1 file changed, 4 deletions(-) commit 984c7706ff180e33096c57183435d925cb644576 Author: Tony Lindgren Date: Tue Mar 20 08:13:38 2018 -0700 ARM: dts: omap4-droid4: Configure uart1 pins These are needed to use the n_gsm driver for TS 27.010 UART multiplexing. Note that support for the OOB wake gpio is still missing so the UART is not yet usable for n_gsm. Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit e5b9fd7bdeb5eeca2d80ebbf68dd687bb85d1574 Author: Tony Lindgren Date: Tue Mar 20 08:13:32 2018 -0700 ARM: dts: omap4-droid4: Configure MDM6600 USB PHY Configure MDM6600 USB PHY. Cc: Marcel Partap Cc: Michael Scott Cc: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 64 ++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit fdd192037fce2d4f700a456828ca609d14b36037 Author: Tony Lindgren Date: Tue Mar 20 08:13:22 2018 -0700 ARM: dts: omap4-droid4: Fix USB PHY port naming We have a USB OCHI PHY on port 1 for mdm6600. Port 2 is using transceiverless logic (TLL) for USB EHCI for w3glte modem. Let's also fix the node name to use usb-phy while at it. Cc: Marcel Partap Cc: Michael Scott Cc: Rob Herring Cc: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6f36ee0b48ca03f89de03464cacd0931de81649e Author: Katsuhiro Suzuki Date: Tue Mar 20 11:48:24 2018 +0900 ARM: dts: uniphier: add syscon property for UniPhier sound system This patch adds syscon property for specifying soc-glue core into device-tree of PXs2 SoC. Currently, soc-glue core is used for changing the state of S/PDIF signal output pin to signal output state or Hi-Z state. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-pxs2.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6c35921dd3ae3da4f104039a2df8a35d7bbf03fb Author: Katsuhiro Suzuki Date: Tue Mar 20 11:48:23 2018 +0900 arm64: dts: uniphier: add syscon property for UniPhier sound system This patch adds syscon property for specifying soc-glue core into device-tree of LD11/LD20 SoC. Currently, soc-glue core is used for changing the state of S/PDIF signal output pin to signal output state or Hi-Z state. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 3 ++- arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 5aa6d80624d54d8aefaed8a4798b7aaa56290ccc Author: Tero Kristo Date: Wed Mar 14 15:53:13 2018 +0200 ARM: OMAP5: control: add support for control module wkup pad config Match the new compatible string in the control module driver. The base infra maps the required syscon ranges and clock registers if available. Signed-off-by: Tero Kristo Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/mach-omap2/control.c | 5 +++++ 1 file changed, 5 insertions(+) commit 04dfac09068766550e3173aac88ff70d70958050 Author: Tero Kristo Date: Wed Mar 14 15:53:10 2018 +0200 ARM: omap2+: control: add support for auxiliary control module instances Control module can have multiple instances in a system, each with separate address space and features. Add base support for these auxiliary instances, with support for syscon and clock mappings under them. Signed-off-by: Tero Kristo Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/mach-omap2/control.c | 15 +++++++++++---- include/linux/clk/ti.h | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) commit c846d8da5640a6c61d57e2c14a1a6d74b9c643b0 Author: Matthew Wilcox Date: Wed Mar 14 19:57:24 2018 -0700 mlx5: Remove call to ida_pre_get The mlx5 driver calls ida_pre_get() in a loop for no readily apparent reason. The driver uses ida_simple_get() which will call ida_pre_get() by itself and there's no need to use ida_pre_get() unless using ida_get_new(). Signed-off-by: Matthew Wilcox Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 1 - 1 file changed, 1 deletion(-) commit 1b8b7ce130119a01a066ee2a5baabb018d54c359 Author: Peter Ujfalusi Date: Wed Mar 14 15:53:15 2018 +0200 ARM: dts: omap5-board-common: Add phandle for mclk clock for twl6040 The xref_xtal clock is used by twl6040 as mclk. It is needed for the HPPLL internally. Signed-off-by: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-board-common.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f0131c67269e42248481ec886f94f94ab5b73944 Author: Tero Kristo Date: Wed Mar 14 15:53:14 2018 +0200 ARM: dts: omap5: add fref_xtal_ck support The clock is directly sourced from sys_clkin, and provides an external output clock for (typically) TWL6040 chip. Signed-off-by: Tero Kristo Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap54xx-clocks.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0b75c042b5626a231625af63e71b797608453142 Author: Tero Kristo Date: Wed Mar 14 15:53:12 2018 +0200 ARM: dts: omap5: add support for control module wkup pad config The pad configuration area under control module wkup has some miscellaneous config registers, that are not pinmux related. Add a separate area for these, and add support for syscon / clocks under this new area. Signed-off-by: Tero Kristo Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 418dbeb618a07a18f0389a482cdfea1bae181671 Author: Tero Kristo Date: Wed Mar 14 15:53:11 2018 +0200 dt-bindings: omap5: ctrl: Support for control module wkup pad config The pad configuration area under control module wkup has some miscellaneous config registers, that are not pinmux related. Add new compatible string for this section of control module. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren Documentation/devicetree/bindings/arm/omap/ctrl.txt | 1 + 1 file changed, 1 insertion(+) commit 54cab61a8a6717bdcbbab839a1fdd591721d9f15 Author: Roger Quadros Date: Fri Mar 16 13:11:43 2018 +0200 ARM: dts: am43xx: Enable dual-role mode for USB1 USB1 port is micro-AB type and can function as peripheral as well as host. Enable dual-role mode for USB1. Signed-off-by: Roger Quadros Signed-off-by: Tony Lindgren arch/arm/boot/dts/am437x-gp-evm.dts | 2 +- arch/arm/boot/dts/am437x-sk-evm.dts | 2 +- arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 372bed66bfbbc867c085c655b927a4c7fdb4870c Author: Tony Lindgren Date: Tue Mar 20 07:10:24 2018 -0700 ARM: multi_v7_defconfig: Enable CPCAP related options mostly as loadable modules We need the CPCAP MFD and regulator built-in for UART console to work, the rest can be loadable modules. Note that users probably want to also enable serial 8250_OMAP that is not yet enabled by default. Signed-off-by: Tony Lindgren arch/arm/configs/multi_v7_defconfig | 9 +++++++++ 1 file changed, 9 insertions(+) commit 0b3cbdbafd68d4688fcc2b772892437da8b1e0d1 Author: Tony Lindgren Date: Tue Mar 20 07:10:15 2018 -0700 ARM: omap2plus_defconfig: Add UINPUT This can be used for keyboard fn keys with funkeymonkey. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 1 + 1 file changed, 1 insertion(+) commit bca809d8183c62ab06942f8db3beef046c08a256 Author: Tony Lindgren Date: Tue Mar 20 07:10:07 2018 -0700 ARM: omap2plus_defconfig: Enable MDM6600 USB PHY This allows droid 4 USB modem to work. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 1 + 1 file changed, 1 insertion(+) commit ef0d46d6711f06c3dfc0b6e3af2e4d6495415d37 Author: Tony Lindgren Date: Tue Mar 20 07:09:55 2018 -0700 ARM: omap2plus_defconfig: Add AUDIO_GRAPH_CARD This is needed for audio on droid 4. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit a62c1cc1bc6255ff3bdb7f52037732d899060cad Author: Tony Lindgren Date: Tue Mar 20 07:09:46 2018 -0700 ARM: omap2plus_defconfig: Enable PWM_VIBRA We can use PWM_VIBRA on many phones like droid 4. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 1 + 1 file changed, 1 insertion(+) commit 20710b3b81895c89e92bcc32ce85c0bede1171f8 Author: Pablo Neira Ayuso Date: Tue Mar 20 12:33:51 2018 +0100 netfilter: ctnetlink: synproxy support This patch exposes synproxy information per-conntrack. Moreover, send sequence adjustment events once server sends us the SYN,ACK packet, so we can synchronize the sequence adjustment too for packets going as reply from the server, as part of the synproxy logic. Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_conntrack_common.h | 1 + include/uapi/linux/netfilter/nfnetlink_conntrack.h | 10 +++ net/ipv4/netfilter/ipt_SYNPROXY.c | 8 +- net/ipv6/netfilter/ip6t_SYNPROXY.c | 8 +- net/netfilter/nf_conntrack_netlink.c | 87 +++++++++++++++++++++- 5 files changed, 109 insertions(+), 5 deletions(-) commit f3f59fbc54b76945ebc92772bd86f60728205da3 Author: Thomas Gleixner Date: Tue Mar 20 14:17:04 2018 +0100 genirq: Remove license boilerplate/references Now that SPDX identifiers are in place, remove the boilerplate or references. The change in timings.c has been acked by the author. Signed-off-by: Thomas Gleixner Acked-by: Daniel Lezcano Cc: Kate Stewart Cc: Greg Kroah-Hartman Cc: Philippe Ombredanne Link: https://lkml.kernel.org/r/20180314212030.668321222@linutronix.de kernel/irq/debugfs.c | 7 ++----- kernel/irq/timings.c | 10 ++-------- 2 files changed, 4 insertions(+), 13 deletions(-) commit 52a65ff5603e685e9b19c2e108b3f0826dc7a86b Author: Thomas Gleixner Date: Wed Mar 14 22:15:19 2018 +0100 genirq: Add missing SPDX identifiers Add SPDX identifiers to files - which contain an explicit license boiler plate or reference - which do not contain a license reference and were not updated in the initial SPDX conversion because the license was deduced by the scanners via EXPORT_SYMBOL_GPL as GPL2.0 only. [ tglx: Moved adding identifiers from the patch which removes the references/boilerplate ] Signed-off-by: Thomas Gleixner Cc: Kate Stewart Cc: Greg Kroah-Hartman Cc: Philippe Ombredanne Link: https://lkml.kernel.org/r/20180314212030.668321222@linutronix.de kernel/irq/chip.c | 1 + kernel/irq/cpuhotplug.c | 1 + kernel/irq/debugfs.c | 1 + kernel/irq/devres.c | 1 + kernel/irq/dummychip.c | 1 + kernel/irq/generic-chip.c | 1 + kernel/irq/handle.c | 1 + kernel/irq/ipi.c | 1 + kernel/irq/irq_sim.c | 1 + kernel/irq/irqdesc.c | 1 + kernel/irq/irqdomain.c | 2 ++ kernel/irq/manage.c | 1 + kernel/irq/msi.c | 1 + kernel/irq/pm.c | 1 + kernel/irq/timings.c | 1 + 15 files changed, 16 insertions(+) commit 90cafdd521721eb588a738fae17ac70e50675686 Author: Thomas Gleixner Date: Wed Mar 14 22:15:17 2018 +0100 genirq/matrix: Cleanup SPDX identifier Use the proper SPDX-Identifier format. Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: Kate Stewart Cc: Greg Kroah-Hartman Cc: Philippe Ombredanne Link: https://lkml.kernel.org/r/20180314212030.492674761@linutronix.de kernel/irq/matrix.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 99bfce5db9c071800bdc7e9658a68e6d11aeecf6 Author: Thomas Gleixner Date: Wed Mar 14 22:15:16 2018 +0100 genirq: Cleanup top of file comments Remove pointless references to the file name itself and condense the information so it wastes less space. Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: Kate Stewart Cc: Greg Kroah-Hartman Cc: Philippe Ombredanne Link: https://lkml.kernel.org/r/20180314212030.412095827@linutronix.de kernel/irq/autoprobe.c | 2 -- kernel/irq/chip.c | 9 +++------ kernel/irq/handle.c | 7 ++----- kernel/irq/ipi.c | 2 -- kernel/irq/irqdesc.c | 5 ++--- kernel/irq/manage.c | 2 -- kernel/irq/msi.c | 2 -- kernel/irq/pm.c | 2 -- kernel/irq/proc.c | 2 -- kernel/irq/resend.c | 2 -- kernel/irq/spurious.c | 2 -- kernel/irq/timings.c | 2 -- 12 files changed, 7 insertions(+), 32 deletions(-) commit 5191d70f83fd1878c40029cffe69f6a2bf65fa0e Author: Arushi Singhal Date: Mon Mar 12 18:36:29 2018 +0530 netfilter: Replace printk() with pr_*() and define pr_fmt() Using pr_() is more concise than printk(KERN_). This patch: * Replace printks having a log level with the appropriate pr_*() macros. * Define pr_fmt() to include relevant name. * Remove redundant prefixes from pr_*() calls. * Indent the code where possible. * Remove the useless output messages. * Remove periods from messages. Signed-off-by: Arushi Singhal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_acct.c | 6 ++++-- net/netfilter/nf_conntrack_ecache.c | 6 ++++-- net/netfilter/nf_conntrack_timestamp.c | 6 ++++-- net/netfilter/nf_nat_core.c | 4 +++- net/netfilter/nf_nat_ftp.c | 7 ++++--- net/netfilter/nf_nat_irc.c | 7 ++++--- net/netfilter/nfnetlink_queue.c | 14 +++++++------- net/netfilter/xt_time.c | 13 +++++++------ 8 files changed, 37 insertions(+), 26 deletions(-) commit 472a73e00757b971d613d796374d2727b2e4954d Author: Jack Ma Date: Mon Mar 19 09:41:59 2018 +1300 netfilter: xt_conntrack: Support bit-shifting for CONNMARK & MARK targets. This patch introduces a new feature that allows bitshifting (left and right) operations to co-operate with existing iptables options. Reviewed-by: Florian Westphal Signed-off-by: Jack Ma Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/xt_connmark.h | 10 ++++ net/netfilter/xt_connmark.c | 77 +++++++++++++++++++++++------- 2 files changed, 70 insertions(+), 17 deletions(-) commit d72133e6288030121e425b89584ab3dfb68871cc Author: Taehee Yoo Date: Wed Mar 14 23:36:53 2018 +0900 netfilter: ebtables: use ADD_COUNTER macro xtables uses ADD_COUNTER macro to increase packet and byte count. ebtables also can use this. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebtables.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 5b4c6e3860daaf089c28e0161dffef7b5ad8000f Author: Gustavo A. R. Silva Date: Mon Mar 12 22:16:17 2018 -0500 netfilter: nf_tables: remove VLA usage In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation. >From a security viewpoint, the use of Variable Length Arrays can be a vector for stack overflow attacks. Also, in general, as the code evolves it is easy to lose track of how big a VLA can get. Thus, we can end up having segfaults that are hard to debug. Also, fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 1446385904add0e89f990ee0518434365e50ce86 Author: Gustavo A. R. Silva Date: Mon Mar 12 19:21:38 2018 -0500 netfilter: nfnetlink_cthelper: Remove VLA usage In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation. >From a security viewpoint, the use of Variable Length Arrays can be a vector for stack overflow attacks. Also, in general, as the code evolves it is easy to lose track of how big a VLA can get. Thus, we can end up having segfaults that are hard to debug. Also, fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_cthelper.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 8039ab43eeac029a9c47c0411918ea82c9ce87cd Author: Gustavo A. R. Silva Date: Mon Mar 12 18:14:42 2018 -0500 netfilter: cttimeout: remove VLA usage In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation. >From a security viewpoint, the use of Variable Length Arrays can be a vector for stack overflow attacks. Also, in general, as the code evolves it is easy to lose track of how big a VLA can get. Thus, we can end up having segfaults that are hard to debug. Also, fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 While at it, remove likely() notation which is not necessary from the control plane code. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_cttimeout.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit d719e3f21cf91d3f82bd827d46199ba41af2f73a Author: Pablo Neira Ayuso Date: Fri Mar 9 11:57:20 2018 +0100 netfilter: nft_ct: add NFT_CT_{SRC,DST}_{IP,IP6} All existing keys, except the NFT_CT_SRC and NFT_CT_DST are assumed to have strict datatypes. This is causing problems with sets and concatenations given the specific length of these keys is not known. Signed-off-by: Pablo Neira Ayuso Acked-by: Florian Westphal include/uapi/linux/netfilter/nf_tables.h | 12 ++++++++-- net/netfilter/nft_ct.c | 38 ++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) commit 35d8deb80c30fdb2dee3e2dac71eab00d8a6fed5 Author: Yi-Hung Wei Date: Sun Mar 4 15:29:52 2018 -0800 netfilter: conncount: Support count only use case Currently, nf_conncount_count() counts the number of connections that matches key and inserts a conntrack 'tuple' with the same key into the accounting data structure. This patch supports another use case that only counts the number of connections where 'tuple' is not provided. Therefore, proper changes are made on nf_conncount_count() to support the case where 'tuple' is NULL. This could be useful for querying statistics or debugging purpose. Signed-off-by: Yi-Hung Wei Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conncount.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 6aec208786c2a54cbf6135a0242b224e845bef98 Author: Yi-Hung Wei Date: Sun Mar 4 15:29:51 2018 -0800 netfilter: Refactor nf_conncount Remove parameter 'family' in nf_conncount_count() and count_tree(). It is because the parameter is not useful after commit 625c556118f3 ("netfilter: connlimit: split xt_connlimit into front and backend"). Signed-off-by: Yi-Hung Wei Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_count.h | 1 - net/netfilter/nf_conncount.c | 4 +--- net/netfilter/xt_connlimit.c | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) commit b5e817dcdd556da2b74c66af1cf0f44840283102 Author: Anders Roxell Date: Fri Mar 16 12:44:42 2018 +0100 firmware: arm_scmi: prevent accessing rate_discrete uninitialized gcc-5.3 and earlier warns that rate_discrete maybe-uninitialized ../drivers/firmware/arm_scmi/clock.c:185:5: warning: 'rate_discrete' may be used uninitialized in this function [-Wmaybe-uninitialized] if (rate_discrete) ^ ../drivers/firmware/arm_scmi/clock.c:128:7: note: 'rate_discrete' was declared here bool rate_discrete; ^ This patch fixing the warning by initialising rate_discrete and also using goto label for the error path. Fixes: 5f6c6430e904 ("firmware: arm_scmi: add initial support for clock protocol") Suggested-by: Arnd Bergmann Signed-off-by: Anders Roxell [sudeep.holla: added one line description to the commit message] Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/clock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c09880cef78d0ddf149cdfeb733027a806465ba2 Author: Sudeep Holla Date: Thu Mar 15 16:54:18 2018 +0000 hwmon: (scmi) return -EINVAL when sensor information is unavailable Passing NULL pointer to PTR_ERR will result in return value of 0 indicating success which is clearly not what it is intended here. This patch returns -EINVAL instead when the sensor information is not available. Fixes: b23688aefb8b ("hwmon: add support for sensors exported via ARM SCMI") Reported-by: Dan Carpenter Acked-by: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Signed-off-by: Sudeep Holla drivers/hwmon/scmi-hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3cb7bde9a6a8bfdee5917facf00afb98fee1821 Author: Daniel Gimpelevich Date: Tue Mar 20 03:58:47 2018 -0700 USB: misc: uss720: more vendor/product ID's Reporting two more VID/PID pairs that work with this driver, having used an informational webpage as a buying guide now. The page listed additional working VID/PID pairs but did not include these two. None were upstreamed. Also taking this opportunity to sort the pairs numerically. Of the two such cables now in my possession, one is white, bearing the In-System Design ISD-103 label on one side, sold as an Epson CAEUL0002 "USB to Parallel Smart Cable For Apple Macintosh Computers" (04b8:0002), and the other is black, bearing the In-System Design ISD-101 label on one side, sold as an early Belkin F5U002 (05ab:0002). Signed-off-by: Daniel Gimpelevich Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/uss720.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a8b6966034ba88190eca397e2693b5bc16790517 Author: Viresh Kumar Date: Mon Feb 26 10:39:09 2018 +0530 cpufreq: tegra186: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from tegra186 driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/tegra186-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d28b03686846f3ca62135c6f06b93e77752d581 Author: Viresh Kumar Date: Mon Feb 26 10:39:08 2018 +0530 cpufreq: speedstep: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from speedstep driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/speedstep-centrino.c | 4 ++-- drivers/cpufreq/speedstep-ich.c | 4 +++- drivers/cpufreq/speedstep-smi.c | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) commit 31f4b7a86b53cfa3b6bcef67cda62708b596cd91 Author: Viresh Kumar Date: Mon Feb 26 10:39:07 2018 +0530 cpufreq: sparc: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from sparc driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/sparc-us2e-cpufreq.c | 3 ++- drivers/cpufreq/sparc-us3-cpufreq.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit ec8d2cc62ce5dd11000c3659ffd1d64e665372bb Author: Viresh Kumar Date: Mon Feb 26 10:39:06 2018 +0530 cpufreq: sh: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from sh-cpufreq driver. The driver though prints the min/max frequency values and the same is done from the ->ready() callback now to keep the behavior unchanged. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/sh-cpufreq.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 54a277ebf20d9bfae458c4a8af4308693d619830 Author: Viresh Kumar Date: Mon Feb 26 10:39:05 2018 +0530 cpufreq: sfi: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from sfi driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/sfi-cpufreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 472ada602179fd699817ede62d2d915b4b1a191b Author: Viresh Kumar Date: Mon Feb 26 10:39:04 2018 +0530 cpufreq: scpi: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from scpi driver. Signed-off-by: Viresh Kumar Acked-by: Sudeep Holla Tested-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki drivers/cpufreq/scpi-cpufreq.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit f35750c88555513f1772fe2edb4d42b9178625b5 Author: Viresh Kumar Date: Mon Feb 26 10:39:03 2018 +0530 cpufreq: sc520: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from sc520 driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/sc520_freq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 09e390f30f44ee7a4f145af2c7c084332a52b6c1 Author: Viresh Kumar Date: Mon Feb 26 10:39:02 2018 +0530 cpufreq: s3c24xx: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from s3c24xx driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/s3c24xx-cpufreq.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 5ab508bebf25c31c959013c7a0df496f661cd735 Author: Viresh Kumar Date: Mon Feb 26 10:39:01 2018 +0530 cpufreq: qoirq: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from qoirq driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/qoriq-cpufreq.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 8ed5a219d0f01662072dfd186f98f550e4874ac3 Author: Viresh Kumar Date: Mon Feb 26 10:39:00 2018 +0530 cpufreq: pxa: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from pxa driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/pxa2xx-cpufreq.c | 4 ++-- drivers/cpufreq/pxa3xx-cpufreq.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) commit 20dfdb9c80fa56fec05683a1d797d42843dfa63a Author: Viresh Kumar Date: Mon Feb 26 10:38:59 2018 +0530 cpufreq: ppc_cbe: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from ppc_cbe driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/ppc_cbe_cpufreq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e2376d1fa075238a93a4ca188e7cee0bea924975 Author: Viresh Kumar Date: Mon Feb 26 10:38:57 2018 +0530 cpufreq: powernow: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from powernow driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/powernow-k6.c | 3 ++- drivers/cpufreq/powernow-k7.c | 3 ++- drivers/cpufreq/powernow-k8.c | 10 +--------- 3 files changed, 5 insertions(+), 11 deletions(-) commit b01b531f67a255df0d2c90fcda7c509ed55186a6 Author: Viresh Kumar Date: Mon Feb 26 10:38:56 2018 +0530 cpufreq: p4-clockmod: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from p4-clockmod driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/p4-clockmod.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b563afbaa85a05d049ad06f03bec65e71464a1b7 Author: Viresh Kumar Date: Mon Feb 26 10:38:55 2018 +0530 cpufreq: mediatek: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from mediatek driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/mediatek-cpufreq.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 2c65616b98ad357ffe867931916c1323cc985ed4 Author: Viresh Kumar Date: Mon Feb 26 10:38:54 2018 +0530 cpufreq: longhaul: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from longhaul driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/longhaul.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b6663622a39742333c0bc3bf7d99df4ba8865f34 Author: Viresh Kumar Date: Mon Feb 26 10:38:53 2018 +0530 cpufreq: ia64-acpi: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from ia64-acpi driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/ia64-acpi-cpufreq.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit c3e3cc8aa3a62a492ef7cff103a8f5cd6ff8bcef Author: Viresh Kumar Date: Mon Feb 26 10:38:52 2018 +0530 cpufreq: elanfreq: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from elanfreq driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/elanfreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0d105394450796d61d78fa04cc4445d201a3b976 Author: Viresh Kumar Date: Mon Feb 26 10:38:51 2018 +0530 cpufreq: e_powersaver: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from e_powersaver driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/e_powersaver.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 29aa18a762b8fcf6cbe3310b1f675849c171036b Author: Viresh Kumar Date: Mon Feb 26 10:38:50 2018 +0530 cpufreq: cpufreq-dt: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from cpufreq-dt driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 5d8d4f9215ca830f76c6653998e1167198f64be0 Author: Viresh Kumar Date: Mon Feb 26 10:38:49 2018 +0530 cpufreq: brcmstb: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from brcmstb driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/brcmstb-avs-cpufreq.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 3c1f5a462e799dde929411412e9f71d4e09efd16 Author: Viresh Kumar Date: Mon Feb 26 10:38:47 2018 +0530 cpufreq: arm_big_little: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from arm_big_little driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/arm_big_little.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 1a186d9e11fc53746e8d1400e2ff6037dc187a37 Author: Viresh Kumar Date: Mon Feb 26 10:38:46 2018 +0530 cpufreq: ACPI: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table in the acpi-cpufreq driver. The driver needs to crosscheck if the max frequency corresponds to the P-state 0 or not and the same is done from the ->ready() callback now. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/acpi-cpufreq.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 92c99d159c38256e221ed8b50fd48953746a90e0 Author: Viresh Kumar Date: Mon Feb 26 10:38:45 2018 +0530 cpufreq: Don't validate cpufreq table from cpufreq_generic_init() The cpufreq table is already validated by the cpufreq core and none of the users of cpufreq_generic_init() have any dependency on it to validate the table as well. Don't validate the cpufreq table anymore from cpufreq_generic_init(). Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 8d768cdcf0f517c643690aeca8101a928a6c36c8 Author: Viresh Kumar Date: Mon Feb 26 10:38:44 2018 +0530 cpufreq: imx6q: Find max freq from frequency table itself This is a preparatory commit to make policy->suspend_freq independent of validation of the cpufreq table, as a later commit would update cpufreq_generic_init() to not validate the cpufreq table any longer. The driver already assumes the order in which the frequency table is sorted and we can get the max frequency easily. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/imx6q-cpufreq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b1206122069aadabe1a8c50789277a978aaa4df7 Author: Miquel Raynal Date: Fri Mar 2 15:38:40 2018 +0100 mtd: rawnand: gpmi: use core timings instead of an empirical derivation GPMI driver timings derivation looks very empirical and does not use the known timings that the core wants to use with the NAND chip, by using local defined constants that have no special meaning from the outside world. Simplify the way all of this is computed and use the NAND core's SDR timings. Integrity of the reads/writes has been checked with nandbiterrs, speed improvements with flash_speed on a Freescale i.MX6 DualLite/Solo SABRE Automotive Board. Measures are below, variations of less than 150kiB/s between tests are common and then not significant. Speeds using mode 5 are the same, while speeds using mode 0 are quite improved (+40/50% from non-optimal computation). Forcing timings mode 0: ======================= Before this patch: ------------------ eraseblock write speed is 2298 KiB/s eraseblock read speed is 3636 KiB/s page write speed is 2136 KiB/s page read speed is 3316 KiB/s 2 page write speed is 2199 KiB/s 2 page read speed is 3468 KiB/s After this patch: ----------------- eraseblock write speed is 3232 KiB/s eraseblock read speed is 5663 KiB/s page write speed is 2915 KiB/s page read speed is 4904 KiB/s 2 page write speed is 3084 KiB/s 2 page read speed is 5267 KiB/s Forcing timings mode 5: ======================= Before this patch: ------------------ eraseblock write speed is 4338 KiB/s eraseblock read speed is 14883 KiB/s page write speed is 3786 KiB/s page read speed is 12800 KiB/s 2 page write speed is 4076 KiB/s 2 page read speed is 14065 KiB/s After this patch: ----------------- eraseblock write speed is 4309 KiB/s eraseblock read speed is 14712 KiB/s page write speed is 3764 KiB/s page read speed is 12673 KiB/s 2 page write speed is 4076 KiB/s 2 page read speed is 14065 KiB/s Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c | 605 ++++------------------------- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 40 +- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h | 103 +---- drivers/mtd/nand/raw/gpmi-nand/gpmi-regs.h | 5 + 4 files changed, 98 insertions(+), 655 deletions(-) commit 76e1a0086a0c3276b384f77905345e0fcc886fdd Author: Miquel Raynal Date: Fri Mar 2 15:38:39 2018 +0100 mtd: rawnand: gpmi: support ->setup_data_interface() Until now the GPMI driver had its own timings logic while the core already handles that and request the NAND controller drivers to support the ->setup_data_interface() hook. Implement that hook by reusing the already existing function. No real glue is necessary between core timing delays and GPMI registers because the driver already translates the ONFI timing modes into register values. Make use of the core's tREA, tRLOH and tRHOH values that allow computing more precise timings for mode [0-3] and get significantly better values (+20% with an i.MX6 Sabre Auto board). Otherwise use the existing logic. Signed-off-by: Miquel Raynal Tested-by: Han Xu Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c | 276 ++++++++--------------------- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 42 +++-- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h | 82 +++++---- 3 files changed, 150 insertions(+), 250 deletions(-) commit bd0b64340c2d66c0fe1aa99b0b23159d7e0c21f2 Author: Miquel Raynal Date: Mon Mar 19 14:47:31 2018 +0100 mtd: rawnand: get rid of the ONFI parameter page in nand_chip The NAND chip parameter page is statically allocated within the nand_chip structure, which reserves a lot of space. Even not ONFI nor JEDEC chips have it embedded. Also, only a few parameters are actually read from the parameter page after the detection. Now that there is a small nand_parameters structure that hold all needed ONFI parameters, remove the ONFI page from the nand_chip structure by just allocating it during the identification phase and removing it right after. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/nand_base.c | 34 +++++++++++++++++++++++++--------- include/linux/mtd/rawnand.h | 3 --- 2 files changed, 25 insertions(+), 12 deletions(-) commit 480139d9229e3be0530bc548da208b5f49b1ab90 Author: Miquel Raynal Date: Mon Mar 19 14:47:30 2018 +0100 mtd: rawnand: get rid of the JEDEC parameter page in nand_chip The NAND chip parameter page is statically allocated within the nand_chip structure, which reserves a lot of space. Even not ONFI nor JEDEC chips have it embedded. Also, only a few parameters are actually read from the parameter page after the detection. Now that there is a small nand_parameters structure that can held generic parameters, remove the JEDEC page from the nand_chip structure by just allocating it during the identification phase and removing it right after. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/nand_base.c | 41 +++++++++++++++++++++++++++------------- include/linux/mtd/rawnand.h | 17 +---------------- 2 files changed, 29 insertions(+), 29 deletions(-) commit 34c5c01e0c8c35c01e9353d0166bfc0eb19b571c Author: Miquel Raynal Date: Mon Mar 19 14:47:29 2018 +0100 mtd: rawnand: macronix: nack the support of changing timings for one chip The MX30LF2G18AC chip declares in its parameter page supporting SET/GET_FEATURES but when it comes to timings, experience shows that it is not the case. Unflag this feature for this particular chip in the nand_parameters structure to avoid unnecessary errors and downturns. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/nand_macronix.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 789157e41a0694e70bf80bceecd79438c3de98d6 Author: Miquel Raynal Date: Mon Mar 19 14:47:28 2018 +0100 mtd: rawnand: allow vendors to declare (un)supported features If SET/GET_FEATURES is available (from the parameter page), use a bitmap to declare what feature is actually supported. Initialize the bitmap in the core to support timing changes (only feature used by the core), also add support for Micron specific features used in Micron initialization code (in the init routine). Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/nand_base.c | 26 +++++++++++++++++++------- drivers/mtd/nand/raw/nand_micron.c | 4 ++++ include/linux/mtd/rawnand.h | 8 +++++++- 3 files changed, 30 insertions(+), 8 deletions(-) commit a97421c7532d382ab560ca153bdf9450f97c7e41 Author: Miquel Raynal Date: Mon Mar 19 14:47:27 2018 +0100 mtd: rawnand: prepare the removal of the ONFI parameter page The NAND chip parameter page is statically allocated within the nand_chip structure, which reserves a lot of space. Even not ONFI nor JEDEC chips have it embedded. Also, only a few parameters are actually read from the parameter page after the detection. ONFI-related parameters that will be used outside from the identification function are stored in a separate onfi_parameters structure embedded in nand_parameters, this small structure that already hold generic parameters. For now, the onfi_parameters structure is allocated statically. However, after some deep rework in the NAND framework, it will be possible to do dynamic allocations from the NAND identification phase, and this strcuture will then be dynamically allocated when needed. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c | 2 +- drivers/mtd/nand/raw/nand_base.c | 30 +++++++++++++------- drivers/mtd/nand/raw/nand_micron.c | 19 ++++++------- drivers/mtd/nand/raw/nand_timings.c | 12 ++++---- include/linux/mtd/rawnand.h | 47 +++++++++++++++++++------------ 5 files changed, 64 insertions(+), 46 deletions(-) commit a7affb13b271a3e451efe15e911c0c0ab2db4859 Author: Hauke Mehrtens Date: Sat Mar 17 00:17:33 2018 +0100 arm64: allwinner: H5: Add Xunlong Orange Pi Zero Plus The Xunlong Orange Pi Zero Plus is single board computer. - H5 Quad-core 64-bit Cortex-A53 - 512MB DDR3 - microSD slot - Debug TTL UART - 1000M/100M/10M Ethernet RJ45 - Realtek RTL8189FTV - Spi flash (2MB) - One USB 2.0 HOST, One USB 2.0 OTG This is based on a patch from armbian: https://github.com/armbian/build/blob/master/patch/kernel/sunxi-next/sunxi-add-orangepi-zero-plus.patch Signed-off-by: Hauke Mehrtens Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/Makefile | 1 + .../dts/allwinner/sun50i-h5-orangepi-zero-plus.dts | 143 +++++++++++++++++++++ 2 files changed, 144 insertions(+) commit 4958134df54c2c84e9c22ea042761d439164d26e Merge: c4f5287 c698ca5 Author: Greg Kroah-Hartman Date: Tue Mar 20 11:27:18 2018 +0100 Merge 4.16-rc6 into tty-next We want the serial/tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit af4a81b9cd847441e047f99c2a2bc113ba96b0cd Author: Dave Martin Date: Thu Mar 1 17:44:07 2018 +0000 arm64: fpsimd: Fix bad si_code for undiagnosed SIGFPE Currently a SIGFPE delivered in response to a floating-point exception trap may have si_code set to 0 on arm64. As reported by Eric, this is a bad idea since this is the value of SI_USER -- yet this signal is definitely not the result of kill(2), tgkill(2) etc. and si_uid and si_pid make limited sense whereas we do want to yield a value for si_addr (which doesn't exist for SI_USER). It's not entirely clear whether the architecure permits a "spurious" fp exception trap where none of the exception flag bits in ESR_ELx is set. (IMHO the architectural intent is to forbid this.) However, it does permit those bits to contain garbage if the TFV bit in ESR_ELx is 0. That case isn't currently handled at all and may result in si_code == 0 or si_code containing a FPE_FLT* constant corresponding to an exception that did not in fact happen. There is nothing sensible we can return for si_code in such cases, but SI_USER is certainly not appropriate and will lead to violation of legitimate userspace assumptions. This patch allocates a new si_code value FPE_UNKNOWN that at least does not conflict with any existing SI_* or FPE_* code, and yields this in si_code for undiagnosable cases. This is probably the best simplicity/incorrectness tradeoff achieveable without relying on implementation-dependent features or adding a lot of code. In any case, there appears to be no perfect solution possible that would justify a lot of effort here. Yielding FPE_UNKNOWN when some well-defined fp exception caused the trap is a violation of POSIX, but this is forced by the architecture. We have no realistic prospect of yielding the correct code in such cases. At present I am not aware of any ARMv8 implementation that supports trapped floating-point exceptions in any case. The new code may be applicable to other architectures for similar reasons. No attempt is made to provide ESR_ELx to userspace in the signal frame, since architectural limitations mean that it is unlikely to provide much diagnostic value, doesn't benefit existing software and would create ABI with no proven purpose. The existing mechanism for passing it also has problems of its own which may result in the wrong value being passed to userspace due to interaction with mm faults. The implied rework does not appear justified. Acked-by: "Eric W. Biederman" Reported-by: "Eric W. Biederman" Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/include/asm/esr.h | 9 +++++++++ arch/arm64/include/uapi/asm/siginfo.h | 7 ------- arch/arm64/kernel/fpsimd.c | 27 +++++++++++++++------------ 3 files changed, 24 insertions(+), 19 deletions(-) commit 3478b24c5e6fd4f27616674ea94dba8e28fbc7f7 Author: Arnd Bergmann Date: Tue Mar 13 12:45:40 2018 +0100 cpufreq: scpi: Add thermal dependency A built-in scpi cpufreq driver cannot link against a modular thermal framework: drivers/cpufreq/scpi-cpufreq.o: In function `scpi_cpufreq_ready': scpi-cpufreq.c:(.text+0x4c): undefined reference to `of_cpufreq_cooling_register' drivers/cpufreq/scpi-cpufreq.o: In function `scpi_cpufreq_exit': scpi-cpufreq.c:(.text+0x9c): undefined reference to `cpufreq_cooling_unregister' This adds a Kconfig dependency that makes sure this configuration is not possible, while allowing all configurations that can work. Note that disabling CPU_THERMAL means we don't care about the THERMAL dependency. Signed-off-by: Arnd Bergmann Acked-by: Sudeep Holla Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig.arm | 1 + 1 file changed, 1 insertion(+) commit d0266046ad54e0c964941364cd82a0d0478ce286 Author: Peter Zijlstra Date: Mon Mar 19 16:41:26 2018 +0100 x86: Remove FAST_FEATURE_TESTS Since we want to rely on static branches to avoid speculation, remove any possible fallback code for static_cpu_has. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: torvalds@linux-foundation.org Link: https://lkml.kernel.org/r/20180319154717.705383007@infradead.org arch/x86/Kconfig | 11 ----------- arch/x86/include/asm/cpufeature.h | 8 -------- 2 files changed, 19 deletions(-) commit e501ce957a786ecd076ea0cfb10b114e6e4d0f40 Author: Peter Zijlstra Date: Wed Jan 17 11:42:07 2018 +0100 x86: Force asm-goto We want to start using asm-goto to guarantee the absence of dynamic branches (and thus speculation). A primary prerequisite for this is of course that the compiler supports asm-goto. This effecively lifts the minimum GCC version to build an x86 kernel to gcc-4.5. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: torvalds@linux-foundation.org Link: https://lkml.kernel.org/r/20180319201327.GJ4043@hirez.programming.kicks-ass.net Makefile | 13 +++++++------ arch/x86/Makefile | 4 ++++ 2 files changed, 11 insertions(+), 6 deletions(-) commit 4c0ca49e6d71beab814356dc065f542ad8739f99 Merge: 7206dc9 266da65 Author: Will Deacon Date: Tue Mar 20 09:57:15 2018 +0000 Merge branch 'siginfo-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace into aarch64/for-next/core Pull in pending siginfo changes from Eric Biederman as we depend on the definition of FPE_FLTUNK for cleaning up our floating-point exception signal delivery (which is currently broken and using FPE_FIXME). commit edc39c9b4589a4ce9a69273b5a27a1459c3423d4 Merge: a06cc94 1b5f3ba4 Author: Thomas Gleixner Date: Tue Mar 20 10:56:18 2018 +0100 Merge branch 'linus' into x86/build to pick up dependencies commit 55b55abc17f238c61921360e61dde90dd9a326d1 Author: Chunyu Hu Date: Mon Mar 5 13:40:38 2018 +0800 cpufreq: cppc_cpufreq: Fix cppc_cpufreq_init() failure path Kmemleak reported the below leak. When cppc_cpufreq_init went into failure path, the cpu mask is not freed. After fix, this report is gone. And to avaoid potential NULL pointer reference, check the cpu value first. unreferenced object 0xffff800fd5ea4880 (size 128): comm "swapper/0", pid 1, jiffies 4294939510 (age 668.680s) hex dump (first 32 bytes): 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 .... ........... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] __kmalloc_node+0x278/0x634 [] alloc_cpumask_var_node+0x28/0x60 [] zalloc_cpumask_var+0x14/0x1c [] cppc_cpufreq_init+0xd0/0x19c [] do_one_initcall+0xec/0x15c [] kernel_init_freeable+0x1f4/0x2a4 [] kernel_init+0x18/0x10c [] ret_from_fork+0x10/0x18 [] 0xffffffffffffffff Signed-off-by: Chunyu Hu Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cppc_cpufreq.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit f4531b2b1929806d2bec1a2f19805031d8bc0806 Author: Miquel Raynal Date: Mon Mar 19 14:47:26 2018 +0100 mtd: rawnand: prepare the removal of ONFI/JEDEC parameter pages The NAND chip parameter page is statically allocated within the nand_chip structure, which reserves a lot of space. Even not ONFI nor JEDEC chips have it embedded. Also, only a few parameters are actually read from the parameter page after the detection. To prepare to the removal of such huge structure, a small NAND parameter structure is allocated statically and contains only very few members that are generic to all chips and actually used elsewhere in the code. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/nand_base.c | 39 +++++++++++++++++---------------------- include/linux/mtd/rawnand.h | 13 +++++++++++++ 2 files changed, 30 insertions(+), 22 deletions(-) commit bbf038618a24d72e2efc19146ef421bb1e1eda1a Author: Hans de Goede Date: Mon Mar 19 18:01:45 2018 +0100 ACPI / video: Add quirk to force acpi-video backlight on Samsung 670Z5E Just like many other Samsung models, the 670Z5E needs to use the acpi-video backlight interface rather then the native one for backlight control to work, add a quirk for this. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1557060 Cc: All applicable Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 95c513ec84f7ff35cd9d8c7ce4a99f770bd82c3b Author: Rafael J. Wysocki Date: Fri Mar 16 13:51:01 2018 +0100 ACPI: Add Time and Alarm Device (TAD) driver Introduce a driver for the ACPI Time and Alarm Device (TAD) based on Section 9.18 of ACPI 6.2. This driver only supports the system wakeup capabilities of the TAD which are mandatory. Support for the RTC capabilities of the TAD will be added to it in the future. This driver is entirely sysfs-based. It provides attributes (under the TAD platform device) to allow user space to manage the AC and DC wakeup timers of the TAD: set and read their values, set and check their expire timer wake policies, check and clear their status and check the capabilities of the TAD reported by AML. The DC timer attributes are only present if the TAD supports a separate DC alarm timer. The wakeup events handling and power management of the TAD is expected to be taken care of by the ACPI PM domain attached to its platform device. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg Tested-by: Mika Westerberg .../ABI/testing/sysfs-devices-platform-ACPI-TAD | 113 +++++ drivers/acpi/Kconfig | 13 + drivers/acpi/Makefile | 1 + drivers/acpi/acpi_tad.c | 473 +++++++++++++++++++++ 4 files changed, 600 insertions(+) commit 27664c581866c950f31ac007ea2c63fc6e2b29d5 Author: Lee, Chun-Yi Date: Tue Mar 20 13:51:26 2018 +0800 ACPI / scan: Send change uevent with offine environmental data In current design of ACPI container offline, Kernel emits KOBJ_CHANGE uevent to user space to indidate that the ejection of the container was triggered by platform. (caa73ea15 patch) A pure KOBJ_CHANGE uevent is not enough for user space to identify the purpose. For example, a "udevadm trigger" command can also be used to emit change event to all udev rules. A udev rule can not identify that the event is from kernel for offline or from udevadm for other purpose. Then the offline action in udev rule may also be triggered by udevadm tool. So, similar to the change uevent of dock, kernel sends the KOBJ_CHANGE uevent with a offline environmental data to indicate purpose. It's useful by udev rule for using ENV{EVENT} filter. Acked-by: Michal Hocko Tested-by: Michal Hocko Signed-off-by: "Lee, Chun-Yi" Signed-off-by: Rafael J. Wysocki drivers/acpi/scan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bf8c6184e0c3d4d5e005e085e9f96f478a267b20 Author: Daniel Drake Date: Tue Mar 20 12:07:35 2018 +0800 ACPI / PM: Allow deeper wakeup power states with no _SxD nor _SxW acpi_dev_pm_get_state() is used to determine the range of allowable device power states when going into S3 suspend. This is implemented by executing the _S3D and _S3W ACPI methods. Linux follows the ACPI spec behaviour in that when _S3D is implemented and _S3W is not, Linux will not go into a power state deeper than the one returned by _S3D for a wakeup-enabled device. However, this same logic is being applied to the case when neither _S3D nor _S3W are present, and the result is that this function decides that the device must stay in D0 (fully on) state. This is breaking USB wakeups on Asus V222GA and Acer XC-830. _S3D and _S3W are not present, so the USB controller is left in the D0 running state during S3, and hence it is unable to generate a PME# wake event. The ACPI spec is unclear on which power states are permissable for wakeup-enabled devices when both _S3D and _S3W are missing. However, USB wakeups work fine on these platforms under Windows, where device manager shows that they are using D3 device state for the USB controller in S3. I assume that the "max = min" clamping done by the code here is specifically written for the _S3D but no _S3W case. By making the code true to those conditions, avoiding them on these platforms, the controller will be put into D3 state and USB wakeups start working. Additionally I feel that this change makes the code more directly mirror the wording of the ACPI spec and it's associated lack of clarity. Thanks to Mathias Nyman for pointing us in the right direction. Signed-off-by: Daniel Drake Link: http://lkml.kernel.org/r/CAB4CAwf_k-WsF3zL4epm9TKAOu0h=Bv1XhXV_gY3bziOo_NPKA@mail.gmail.com https://phabricator.endlessm.com/T21410 Signed-off-by: Rafael J. Wysocki drivers/acpi/device_pm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 027bd6cafd9a1e3a109b5e5682c85ac84e804a8d Author: Kai-Heng Feng Date: Tue Mar 20 00:26:06 2018 +0800 usb: core: Add "quirks" parameter for usbcore Trying quirks in usbcore needs to rebuild the driver or the entire kernel if it's builtin. It can save a lot of time if usbcore has similar ability like "usbhid.quirks=" and "usb-storage.quirks=". Rename the original quirk detection function to "static" as we introduce this new "dynamic" function. Now users can use "usbcore.quirks=" as short term workaround before the next kernel release. Also, the quirk parameter can XOR the builtin quirks for debugging purpose. This is inspired by usbhid and usb-storage. Signed-off-by: Kai-Heng Feng Signed-off-by: Greg Kroah-Hartman Documentation/admin-guide/kernel-parameters.txt | 56 ++++++++ drivers/usb/core/quirks.c | 178 +++++++++++++++++++++++- drivers/usb/core/usb.c | 1 + drivers/usb/core/usb.h | 1 + 4 files changed, 231 insertions(+), 5 deletions(-) commit ca5a2e9a774b0a18815f23cd9cbb923966a2d8bc Author: John Youn Date: Mon Mar 19 13:06:02 2018 -0700 MAINTAINERS: Update maintainer for dwc2 Update to show Minas Harutyunyan as the new maintainer for dwc2. Signed-off-by: John Youn Acked-by: Minas Harutyunyan Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edb92eaf1d478ac52e7d258af35739c76c03efea Author: Thinh Nguyen Date: Fri Mar 16 15:36:17 2018 -0700 usb: core: urb: Check SSP isoc ep comp descriptor The maximum bytes per interval for USB SuperSpeed Plus can be set by isoc endpoint companion descriptor when it is above 48K. If the descriptor is provided, then use its value. USB 3.1 spec 9.6.8 Acked-by: Felipe Balbi Signed-off-by: Thinh Nguyen Signed-off-by: Greg Kroah-Hartman drivers/usb/core/urb.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 85a09bf492333300ca0a09199bce4cf1a5bdd5cb Merge: a8f25c3 e7f4da4 Author: Greg Kroah-Hartman Date: Tue Mar 20 10:10:46 2018 +0100 Merge tag 'phy-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next Kishon writes: phy: for 4.17 *) Add USB PHY driver for MDM6600 on Droid *) Add USB PHY driver for STM32 USB PHY Controller *) Add inno-usb2-phy driver for hi3798cv200 SoC *) Add combo phy driver (SATA/USB/PCIE) for HiSilicon STB SoCs *) Add USB3 PHY driver for Meson GXL and GXM *) Add support for R8A77965 Gen3 USB 2.0 PHY in phy-rcar-gen3-usb2 driver *) Add support for qualcomm QUSB2 V2 and QMP V3 USB3 PHY in phy-qcom-qusb2 and phy-qcom-qmp PHY driver respectively *) Add support for runtime PM in phy-qcom-qusb2 and phy-qcom-qmp PHY drivers *) Add support for Allwinner R40 USB PHY in sun4i-usb PHY driver *) Add support in rockchip-typec PHY driver to make extcon optional and fallback to working in host mode if extcon is missing *) Add support in rockchip-typec PHY driver to mux PHYs connected to DP *) Add support to configure slew rate parameters in phy-mtk-tphy PHY driver *) Add workaround for missing Vbus det interrupts on Allwinner A23/A33 *) Add USB speed related PHY modes in phy core *) Fix PHY 'structure' documentation *) Force rockchip-typec PHY to USB2 if DP-only mode is used *) Fix phy-qcom-qusb2 and phy-qcom-qmp PHY drivers to follow PHY reset and initialization sequence as per hardware programming manual *) Fix Marvell BG2CD SoC USB failure in phy-berlin-usb driver *) Minor fixes in lpc18xx-usb-otg, xusb-tegra210 and phy-rockchip-emmc PHY drivers Signed-off-by: Kishon Vijay Abraham I commit 16e73adbca76fd18733278cb688b0ddb4cad162c Author: Christoph Hellwig Date: Mon Mar 19 11:38:26 2018 +0100 dma/swiotlb: Remove swiotlb_{alloc,free}_coherent() Unused now that everyone uses swiotlb_{alloc,free}(). Tested-by: Tom Lendacky Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Cc: David Woodhouse Cc: Joerg Roedel Cc: Jon Mason Cc: Konrad Rzeszutek Wilk Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20180319103826.12853-15-hch@lst.de Signed-off-by: Ingo Molnar include/linux/swiotlb.h | 8 -------- lib/swiotlb.c | 38 -------------------------------------- 2 files changed, 46 deletions(-) commit c10f07aa27dadf5ab5b3d58c48c91a467f80db49 Author: Christoph Hellwig Date: Mon Mar 19 11:38:25 2018 +0100 dma/direct: Handle force decryption for DMA coherent buffers in common code With that in place the generic DMA-direct routines can be used to allocate non-encrypted bounce buffers, and the x86 SEV case can use the generic swiotlb ops including nice features such as using CMA allocations. Note that I'm not too happy about using sev_active() in DMA-direct, but I couldn't come up with a good enough name for a wrapper to make it worth adding. Tested-by: Tom Lendacky Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Cc: David Woodhouse Cc: Joerg Roedel Cc: Jon Mason Cc: Konrad Rzeszutek Wilk Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20180319103826.12853-14-hch@lst.de Signed-off-by: Ingo Molnar arch/x86/mm/mem_encrypt.c | 73 ++--------------------------------------------- lib/dma-direct.c | 32 +++++++++++++++++---- 2 files changed, 29 insertions(+), 76 deletions(-) commit b6e05477c10c12e36141558fc14f04b00ea634d4 Author: Christoph Hellwig Date: Mon Mar 19 11:38:24 2018 +0100 dma/direct: Handle the memory encryption bit in common code Give the basic phys_to_dma() and dma_to_phys() helpers a __-prefix and add the memory encryption mask to the non-prefixed versions. Use the __-prefixed versions directly instead of clearing the mask again in various places. Tested-by: Tom Lendacky Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Cc: David Woodhouse Cc: Joerg Roedel Cc: Jon Mason Cc: Konrad Rzeszutek Wilk Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20180319103826.12853-13-hch@lst.de Signed-off-by: Ingo Molnar arch/arm/include/asm/dma-direct.h | 4 ++-- arch/mips/cavium-octeon/dma-octeon.c | 10 ++++----- .../include/asm/mach-cavium-octeon/dma-coherence.h | 4 ++-- .../include/asm/mach-loongson64/dma-coherence.h | 10 ++++----- arch/mips/loongson64/common/dma-swiotlb.c | 4 ++-- arch/powerpc/include/asm/dma-direct.h | 4 ++-- arch/x86/Kconfig | 2 +- arch/x86/include/asm/dma-direct.h | 25 ++-------------------- arch/x86/mm/mem_encrypt.c | 2 +- arch/x86/pci/sta2x11-fixup.c | 6 +++--- include/linux/dma-direct.h | 21 ++++++++++++++++-- lib/swiotlb.c | 25 ++++++++-------------- 12 files changed, 53 insertions(+), 64 deletions(-) commit e7de6c7cc207be78369d45fb833d7d53aeda47f8 Author: Christoph Hellwig Date: Mon Mar 19 11:38:23 2018 +0100 dma/swiotlb: Remove swiotlb_set_mem_attributes() Now that set_memory_decrypted() is always available we can just call it directly. Tested-by: Tom Lendacky Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Tom Lendacky Cc: David Woodhouse Cc: Joerg Roedel Cc: Jon Mason Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20180319103826.12853-12-hch@lst.de Signed-off-by: Ingo Molnar arch/x86/include/asm/mem_encrypt.h | 2 -- arch/x86/mm/mem_encrypt.c | 8 -------- lib/swiotlb.c | 12 ++++++------ 3 files changed, 6 insertions(+), 16 deletions(-) commit b7fa07460b0f0e9fbe6d9319a0864c145bd59bcb Author: Christoph Hellwig Date: Mon Mar 19 11:38:22 2018 +0100 set_memory.h: Provide set_memory_{en,de}crypted() stubs ... to make these APIs more universally available. Tested-by: Tom Lendacky Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Tom Lendacky Cc: David Woodhouse Cc: Joerg Roedel Cc: Jon Mason Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20180319103826.12853-11-hch@lst.de Signed-off-by: Ingo Molnar include/linux/set_memory.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 178c5682447ac0e315f0f3e27664fd4e0d2721cc Author: Christoph Hellwig Date: Mon Mar 19 11:38:21 2018 +0100 x86/dma: Remove dma_alloc_coherent_gfp_flags() All dma_ops implementations used on x86 now take care of setting their own required GFP_ masks for the allocation. And given that the common code now clears harmful flags itself that means we can stop the flags in all the IOMMU implementations as well. Tested-by: Tom Lendacky Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Cc: David Woodhouse Cc: Joerg Roedel Cc: Jon Mason Cc: Konrad Rzeszutek Wilk Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20180319103826.12853-10-hch@lst.de Signed-off-by: Ingo Molnar arch/x86/include/asm/dma-mapping.h | 11 ----------- arch/x86/kernel/pci-calgary_64.c | 2 -- arch/x86/kernel/pci-dma.c | 2 -- arch/x86/mm/mem_encrypt.c | 7 ------- 4 files changed, 22 deletions(-) commit d657c5c73ca987214a6f9436e435b34fc60f332a Author: Christoph Hellwig Date: Mon Mar 19 11:38:20 2018 +0100 iommu/intel-iommu: Enable CONFIG_DMA_DIRECT_OPS=y and clean up intel_{alloc,free}_coherent() Use the dma_direct_*() helpers and clean up the code flow. Tested-by: Tom Lendacky Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Cc: David Woodhouse Cc: Joerg Roedel Cc: Jon Mason Cc: Konrad Rzeszutek Wilk Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20180319103826.12853-9-hch@lst.de Signed-off-by: Ingo Molnar drivers/iommu/Kconfig | 1 + drivers/iommu/intel-iommu.c | 62 ++++++++++++--------------------------------- 2 files changed, 17 insertions(+), 46 deletions(-) commit b468620f2a1dfdcfddfd6fa54367b8bcc1b51248 Author: Christoph Hellwig Date: Mon Mar 19 11:38:19 2018 +0100 iommu/amd_iommu: Use CONFIG_DMA_DIRECT_OPS=y and dma_direct_{alloc,free}() This cleans up the code a lot by removing duplicate logic. Tested-by: Tom Lendacky Tested-by: Joerg Roedel Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Acked-by: Joerg Roedel Cc: David Woodhouse Cc: Joerg Roedel Cc: Jon Mason Cc: Konrad Rzeszutek Wilk Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20180319103826.12853-8-hch@lst.de Signed-off-by: Ingo Molnar drivers/iommu/Kconfig | 1 + drivers/iommu/amd_iommu.c | 68 +++++++++++++++-------------------------------- 2 files changed, 22 insertions(+), 47 deletions(-) commit 51c7eeba7975c1d2a02eefd00ece6de25176f5f3 Author: Christoph Hellwig Date: Mon Mar 19 11:38:18 2018 +0100 x86/dma/amd_gart: Use dma_direct_{alloc,free}() This gains support for CMA allocations for the force_iommu case, and cleans up the code a bit. Tested-by: Tom Lendacky Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Cc: David Woodhouse Cc: Joerg Roedel Cc: Jon Mason Cc: Konrad Rzeszutek Wilk Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20180319103826.12853-7-hch@lst.de Signed-off-by: Ingo Molnar arch/x86/kernel/amd_gart_64.c | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) commit f3c39d51043dcee5dd4d51dffcfe9ce01a263582 Author: Christoph Hellwig Date: Mon Mar 19 11:38:17 2018 +0100 x86/dma/amd_gart: Look at dev->coherent_dma_mask instead of GFP_DMA We want to phase out looking at the magic GFP_DMA flag in the DMA mapping routines, so switch the gart driver to use the dev->coherent_dma_mask instead, which is used to select the GFP_DMA flag in the caller. Tested-by: Tom Lendacky Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Reviewed-by: Konrad Rzeszutek Wilk Cc: David Woodhouse Cc: Joerg Roedel Cc: Jon Mason Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20180319103826.12853-6-hch@lst.de Signed-off-by: Ingo Molnar arch/x86/kernel/amd_gart_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e4bf586778315b3fc53b728c53eefc247cfc3ff Author: Christoph Hellwig Date: Mon Mar 19 11:38:16 2018 +0100 x86/dma: Use generic swiotlb_ops The generic swiotlb DMA ops were based on the x86 ones and provide equivalent functionality, so use them. Also fix the sta2x11 case. For that SOC the DMA map ops need an additional physical to DMA address translations. For swiotlb buffers that is done throught the phys_to_dma helper, but the sta2x11_dma_ops also added an additional translation on the return value from x86_swiotlb_alloc_coherent, which is only correct if that functions returns a direct allocation and not a swiotlb buffer. With the generic swiotlb and DMA-direct code phys_to_dma is not always used and the separate sta2x11_dma_ops can be replaced with a simple bit that marks if the additional physical to DMA address translation is needed. Tested-by: Tom Lendacky Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Cc: David Woodhouse Cc: Joerg Roedel Cc: Jon Mason Cc: Konrad Rzeszutek Wilk Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20180319103826.12853-5-hch@lst.de Signed-off-by: Ingo Molnar arch/x86/include/asm/device.h | 3 +++ arch/x86/include/asm/swiotlb.h | 8 ------- arch/x86/kernel/pci-swiotlb.c | 47 +----------------------------------------- arch/x86/pci/sta2x11-fixup.c | 46 +++++------------------------------------ 4 files changed, 9 insertions(+), 95 deletions(-) commit fec777c385b6376048fc4b08f039366545b335cd Author: Christoph Hellwig Date: Mon Mar 19 11:38:15 2018 +0100 x86/dma: Use DMA-direct (CONFIG_DMA_DIRECT_OPS=y) The generic DMA-direct (CONFIG_DMA_DIRECT_OPS=y) implementation is now functionally equivalent to the x86 nommu dma_map implementation, so switch over to using it. That includes switching from using x86_dma_supported in various IOMMU drivers to use dma_direct_supported instead, which provides the same functionality. Tested-by: Tom Lendacky Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Cc: David Woodhouse Cc: Joerg Roedel Cc: Jon Mason Cc: Konrad Rzeszutek Wilk Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20180319103826.12853-4-hch@lst.de Signed-off-by: Ingo Molnar arch/x86/Kconfig | 1 + arch/x86/include/asm/dma-mapping.h | 8 ----- arch/x86/include/asm/iommu.h | 3 -- arch/x86/kernel/Makefile | 2 +- arch/x86/kernel/amd_gart_64.c | 7 ++-- arch/x86/kernel/pci-calgary_64.c | 3 +- arch/x86/kernel/pci-dma.c | 66 +------------------------------------- arch/x86/kernel/pci-swiotlb.c | 5 ++- arch/x86/pci/sta2x11-fixup.c | 2 +- drivers/iommu/amd_iommu.c | 7 ++-- drivers/iommu/intel-iommu.c | 3 +- 11 files changed, 17 insertions(+), 90 deletions(-) commit 038d07a283d62336b32cc23b62aecdf9418cfc11 Author: Christoph Hellwig Date: Mon Mar 19 11:38:14 2018 +0100 x86/dma: Remove dma_alloc_coherent_mask() These days all devices (including the ISA fallback device) have a coherent DMA mask set, so remove the workaround. Tested-by: Tom Lendacky Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Reviewed-by: Konrad Rzeszutek Wilk Cc: David Woodhouse Cc: Joerg Roedel Cc: Jon Mason Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20180319103826.12853-3-hch@lst.de Signed-off-by: Ingo Molnar arch/x86/include/asm/dma-mapping.h | 18 ++---------------- arch/x86/kernel/pci-dma.c | 10 ++++------ arch/x86/mm/mem_encrypt.c | 4 +--- drivers/xen/swiotlb-xen.c | 16 +--------------- 4 files changed, 8 insertions(+), 40 deletions(-) commit 3eb93ea3272d428aab3c03e2dd272a78a7729ba8 Merge: 5927145 565977a Author: Ingo Molnar Date: Tue Mar 20 10:01:37 2018 +0100 Merge branch 'x86/mm' into x86/dma, to pick up dependencies Signed-off-by: Ingo Molnar commit 613bd1ea387bb48b7c9a71a0bb451ac15cfbbc01 Author: Jarkko Nikula Date: Tue Mar 20 10:27:50 2018 +0200 spi: Fix unregistration of controller with fixed SPI bus number Commit 9b61e302210e (spi: Pick spi bus number from Linux idr or spi alias) ceased to unregister SPI buses with fixed bus numbers. Moreover this is visible only if CONFIG_SPI_DEBUG=y is set or when trying to re-register the same SPI controller. rmmod spi_pxa2xx_platform (with CONFIG_SPI_DEBUG=y): [ 26.788362] spi_master spi1: attempting to delete unregistered controller [spi1] modprobe spi_pxa2xx_platform: [ 37.883137] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:19.0/pxa2xx-spi.12/spi_master/spi1' [ 37.894984] CPU: 1 PID: 1467 Comm: modprobe Not tainted 4.16.0-rc4+ #21 [ 37.902384] Call Trace: ... [ 38.122680] kobject_add_internal failed for spi1 with -EEXIST, don't try to register things with the same name in the same directory. [ 38.136154] WARNING: CPU: 1 PID: 1467 at lib/kobject.c:238 kobject_add_internal+0x2a5/0x2f0 ... [ 38.513817] pxa2xx-spi pxa2xx-spi.12: problem registering spi master [ 38.521036] pxa2xx-spi: probe of pxa2xx-spi.12 failed with error -17 Fix this by not returning immediately from spi_unregister_controller() if idr_find() doesn't find controller with given ID/bus number. It finds only those controllers that were registered with dynamic SPI bus numbers. Only conditional cleanup between dynamic and fixed bus numbers is to remove allocated IDR. Fixes: 9b61e302210e (spi: Pick spi bus number from Linux idr or spi alias) Cc: stable@vger.kernel.org Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown drivers/spi/spi.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit a8f25c36f7322fd089e6d006b4e3708038882561 Merge: 225b3dc c698ca5 Author: Greg Kroah-Hartman Date: Tue Mar 20 09:56:08 2018 +0100 Merge branch 4.16-rc6 into usb-next We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 107b7d6a7ad4927e1b217cf5667ac94bab021e42 Author: Miquel Raynal Date: Mon Mar 19 14:47:25 2018 +0100 mtd: rawnand: avoid setting again the timings to mode 0 after a reset After a nand_reset_data_interface(), both the NAND chip and the NAND controller use timing mode 0. The previously defined data interface for this chip has been saved and is supposed to be restored after that. However, if the saved data interface also refers to timing mode 0, there is no need to re-apply them again. Also, as nand_setup_data_interface() uses ->set/get_features(), it could lead to issues when doing the reset at probe time as the parameter page is not available yet to know if these functions are supported or not. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/nand_base.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 415ae78ffb5d97343ada8e4c2d4bda5f6416b5ef Author: Miquel Raynal Date: Mon Mar 19 14:47:24 2018 +0100 mtd: rawnand: check ONFI timings have been acked by the chip Choosing ONFI timings when ->set/get_features() calls are supported by the NAND chip is a matter of reading the chip's ONFI parameter page and telling the chip the chosen mode (between all of the supported ones) with ->set_feature(). Add a check on whether the chip "acked" the timing mode or not. This can be a problem for NAND chips that do not follow entirely the ONFI specification. These chips actually support other modes than "mode 0", but either: 1/ do not update the timing mode register once a timing mode has been selected. or 2/ do not support the TIMING_MODE featured and thus do not require users to change the timing mode at all. These issues will be addressed in another patch that will add the feature to overwrite NAND chips features within the parameter page, from the NAND chip driver. Signed-off-by: Miquel Raynal Tested-by: Han Xu Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/nand_base.c | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) commit 29714d6bd72b2de163a89240a70550f23d25c324 Author: Miquel Raynal Date: Mon Mar 19 14:47:23 2018 +0100 mtd: rawnand: move calls to ->select_chip() in nand_setup_data_interface() After a ->set_features(TIMINGS), the chip is supposed to be working at a new speed. In order for all the transactions to be perperly handled, the NAND controller should also be configured to this same speed. Calling ->setup_data_interface() is not enough and the chip should be de-asserted/re-asserted through calls to ->select_chip(). Prepare the next change in nand_setup_data_interface() where timings will be checked after being applied. Because assertions of the CS pin will be needed from within this function, move the calls to ->select_chip() inside nand_setup_data_interface() for later consistency. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/nand_base.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 939da44758447c64a272d7a87e706872271a2fab Author: Miquel Raynal Date: Mon Mar 19 14:47:22 2018 +0100 mtd: rawnand: mxc: remove useless checks in GET/SET_FEATURES functions All the calls to the chip's hooks ->get/set_features() go through the core's wrappers nand_get/set_features() that already do the necessary checks about feature support. Remove these checks from the mxc's functions. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/mxc_nand.c | 10 ---------- 1 file changed, 10 deletions(-) commit 993447b746820259e21b6c7962523631128d5ca6 Author: Miquel Raynal Date: Mon Mar 19 14:47:21 2018 +0100 mtd: rawnand: handle differently chip/controller errors about timings Usually, the source of the error when setting/getting features does not matter (if the controller does not support sending the command or if the chip does not support the operation). When it comes to timings, if the controller fails it is an error while if the chip does not support the operation, it can be silently supposed that it already works with the maximum supported timings. Introduce some logic in nand_setup_data_interface() to handle that difference. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/nand_base.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 97baea1e6b74c73973fa0922252f880ab15450ea Author: Miquel Raynal Date: Mon Mar 19 14:47:20 2018 +0100 mtd: rawnand: use wrappers to call onfi GET/SET_FEATURES Prepare the fact that some features managed by GET/SET_FEATURES could be overloaded by vendor code. To handle this logic, use new wrappers instead of directly call the ->get/set_features() hooks. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c | 6 +-- drivers/mtd/nand/raw/nand_base.c | 89 ++++++++++++++++++++----------- drivers/mtd/nand/raw/nand_micron.c | 18 ++++--- include/linux/mtd/rawnand.h | 3 ++ 4 files changed, 74 insertions(+), 42 deletions(-) commit b958758e686aebe84672acc8871aca87d04f13a3 Author: Miquel Raynal Date: Mon Mar 19 14:47:19 2018 +0100 mtd: rawnand: rename SET/GET FEATURES related functions SET/GET FEATURES are flagged ONFI-compliant because of their name. This is not accurate as non-ONFI NAND chips support it and use it. Rename the hooks and helpers to remove the "onfi" prefix. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/bcm47xxnflash/ops_bcm4706.c | 4 +-- drivers/mtd/nand/raw/cafe_nand.c | 4 +-- drivers/mtd/nand/raw/docg4.c | 4 +-- drivers/mtd/nand/raw/fsl_elbc_nand.c | 4 +-- drivers/mtd/nand/raw/fsl_ifc_nand.c | 4 +-- drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c | 8 ++--- drivers/mtd/nand/raw/hisi504_nand.c | 4 +-- drivers/mtd/nand/raw/mpc5121_nfc.c | 4 +-- drivers/mtd/nand/raw/mxc_nand.c | 14 ++++---- drivers/mtd/nand/raw/nand_base.c | 42 +++++++++++------------- drivers/mtd/nand/raw/nand_micron.c | 16 ++++----- drivers/mtd/nand/raw/qcom_nandc.c | 4 +-- drivers/mtd/nand/raw/sh_flctl.c | 4 +-- drivers/staging/mt29f_spinand/mt29f_spinand.c | 4 +-- include/linux/mtd/rawnand.h | 17 +++++----- 15 files changed, 66 insertions(+), 71 deletions(-) commit fc2f30a4b411b9e8e19c158840598a19b768bf11 Author: Miquel Raynal Date: Mon Mar 19 14:47:18 2018 +0100 mtd: rawnand: rename default ->onfi_get/set_features() implementations Prepare future work on the ->onfi_get/set_features() hooks by renaming the core's implementation as 'default' ones. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/nand_base.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 995e8695f65db7a8b465b5c27887b32e8e5bb66e Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:59 2018 -0800 firmware: ensure the firmware cache is not used on incompatible calls request_firmware_into_buf() explicitly disables the firmware cache, meanwhile the firmware cache cannot be used when request_firmware_nowait() is used without the uevent. Enforce a sanity check for this to avoid future issues undocumented behaviours should misuses of the firmware cache happen later. One of the reasons we want to enforce this is the firmware cache is used for helping with suspend/resume, and if incompatible calls use it they can stall suspend. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 9952db75e0659d9db62d76d9a351fdae06898642 Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:58 2018 -0800 test_firmware: modify custom fallback tests to use unique files Users of the custom firmware fallback interface is are not supposed to use the firmware cache interface, this can happen if for instance the one of the APIs which use the firmware cache is used first with one firmware file and then the request_firmware_nowait(uevent=false) API is used with the same file. We'll soon become strict about this on the firmware interface to reject such calls later, so correct the test scripts to avoid such uses as well. We address this on the tests scripts by simply using unique names when testing the custom fallback interface. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/firmware/fw_fallback.sh | 20 ++++++++++++++------ tools/testing/selftests/firmware/fw_filesystem.sh | 11 +++++++++-- tools/testing/selftests/firmware/fw_lib.sh | 23 +++++++++++++++++++++++ 3 files changed, 46 insertions(+), 8 deletions(-) commit 3194d06a7e41d31ea4d8771b1ff3d93445e27403 Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:57 2018 -0800 firmware: add helper to check to see if fw cache is setup Add a helper to check if the firmware cache is already setup for a device. This will be used later. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/main.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit d15d7311550983be97dca44ad68cbc2ca001297b Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:56 2018 -0800 firmware: fix checking for return values for fw_add_devm_name() Currently fw_add_devm_name() returns 1 if the firmware cache was already set. This makes it complicated for us to check for correctness. It is actually non-fatal if the firmware cache is already setup, so just return 0, and simplify the checkers. fw_add_devm_name() adds device's name onto the devres for the device so that prior to suspend we cache the firmware onto memory, so that on resume the firmware is reliably available. We never were checking for success for this call though, meaning in some really rare cases we my have never setup the firmware cache for a device, which could in turn make resume fail. This is all theoretical, no known issues have been reported. This small issue has been present way since the addition of the devres firmware cache names on v3.7. Fixes: f531f05ae9437 ("firmware loader: store firmware name into devres list") Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 60fa74263cbeae1704908c403aba2bfd62c798e8 Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:55 2018 -0800 rename: _request_firmware_load() fw_load_sysfs_fallback() This reflects much clearer what is being done. While at it, kdoc'ify it. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/firmware/fallback-mechanisms.rst | 2 +- drivers/base/firmware_loader/fallback.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) commit b3cf21fae1fe0b3a3e8ada0a60d3fb6217ebce5b Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:54 2018 -0800 test_firmware: test three firmware kernel configs using a proc knob Since we now have knobs to twiddle what used to be set on kernel configurations we can build one base kernel configuration and modify behaviour to mimic such kernel configurations to test them. Provided you build a kernel with: CONFIG_TEST_FIRMWARE=y CONFIG_FW_LOADER=y CONFIG_FW_LOADER_USER_HELPER=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y We should now be able test all possible kernel configurations when FW_LOADER=y. Note that when FW_LOADER=m we just don't provide the built-in functionality of the built-in firmware. If you're on an old kernel and either don't have /proc/config.gz (CONFIG_IKCONFIG_PROC) or haven't enabled CONFIG_FW_LOADER_USER_HELPER we cannot run these dynamic tests, so just run both scripts just as we used to before making blunt assumptions about your setup and requirements exactly as we did before. Acked-by: Kees Cook Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/firmware/Makefile | 2 +- tools/testing/selftests/firmware/fw_lib.sh | 51 +++++++++++++++++ tools/testing/selftests/firmware/fw_run_tests.sh | 70 ++++++++++++++++++++++++ 3 files changed, 122 insertions(+), 1 deletion(-) commit f5a614519e67b429faf01ca36db90030976449cc Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:53 2018 -0800 test_firmware: expand on library with shared helpers This expands our library with as many things we could find which both scripts we use share. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/firmware/fw_fallback.sh | 31 +++----------- tools/testing/selftests/firmware/fw_filesystem.sh | 41 +++--------------- tools/testing/selftests/firmware/fw_lib.sh | 52 +++++++++++++++++++++++ 3 files changed, 63 insertions(+), 61 deletions(-) commit 2cd7a1c6dcd33e7c1a82b254871230f29866d4e9 Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:52 2018 -0800 firmware: enable to force disable the fallback mechanism at run time You currently need four different kernel builds to test the firmware API fully. By adding a proc knob to force disable the fallback mechanism completely we are able to reduce the amount of kernels you need built to test the firmware API down to two. Acked-by: Kees Cook Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/fallback.c | 5 +++++ drivers/base/firmware_loader/fallback.h | 4 ++++ drivers/base/firmware_loader/fallback_table.c | 9 +++++++++ 3 files changed, 18 insertions(+) commit ceb18132248d95b2c68e30c3df78e69175c4452f Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:51 2018 -0800 firmware: enable run time change of forcing fallback loader Currently one requires to test four kernel configurations to test the firmware API completely: 0) CONFIG_FW_LOADER=y 1) o CONFIG_FW_LOADER=y o CONFIG_FW_LOADER_USER_HELPER=y 2) o CONFIG_FW_LOADER=y o CONFIG_FW_LOADER_USER_HELPER=y o CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y 3) When CONFIG_FW_LOADER=m the built-in stuff is disabled, we have no current tests for this. We can reduce the requirements to three kernel configurations by making fw_config.force_sysfs_fallback a proc knob we flip on off. For kernels that disable CONFIG_IKCONFIG_PROC this can also enable one to inspect if CONFIG_FW_LOADER_USER_HELPER_FALLBACK was enabled at build time by checking the proc value at boot time. Acked-by: Kees Cook Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/fallback.c | 1 + drivers/base/firmware_loader/fallback.h | 4 +++- drivers/base/firmware_loader/fallback_table.c | 17 +++++++++++++++++ kernel/sysctl.c | 11 +++++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) commit 5d6d1ddd27301dc85b13b794262c8bcececf88f1 Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:50 2018 -0800 firmware: move firmware loader into its own directory This will make it much easier to manage as we manage to keep trimming componnents down into their own files to more easily manage and maintain this codebase. Suggested-by: Kees Cook Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- drivers/base/Makefile | 7 +- drivers/base/firmware_fallback.c | 661 -------------- drivers/base/firmware_fallback.h | 61 -- drivers/base/firmware_fallback_table.c | 29 - drivers/base/firmware_loader.c | 1189 ------------------------- drivers/base/firmware_loader.h | 115 --- drivers/base/firmware_loader/Makefile | 7 + drivers/base/firmware_loader/fallback.c | 661 ++++++++++++++ drivers/base/firmware_loader/fallback.h | 61 ++ drivers/base/firmware_loader/fallback_table.c | 29 + drivers/base/firmware_loader/firmware.h | 115 +++ drivers/base/firmware_loader/main.c | 1189 +++++++++++++++++++++++++ 13 files changed, 2065 insertions(+), 2061 deletions(-) commit d73f821c7aea16ad4f501fb87c8b5373a025e7f4 Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:49 2018 -0800 firmware: split firmware fallback functionality into its own file The firmware fallback code is optional. Split that code out to help distinguish the fallback functionlity from othere core firmware loader features. This should make it easier to maintain and review code changes. The reason for keeping the configuration onto a table which is built-in if you enable firmware loading is so that we can later enable the kernel after subsequent patches to tweak this configuration, even if the firmware loader is modular. This introduces no functional changes. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/Makefile | 4 +- drivers/base/firmware_fallback.c | 661 +++++++++++++++++++++++++++ drivers/base/firmware_fallback.h | 61 +++ drivers/base/firmware_fallback_table.c | 29 ++ drivers/base/firmware_loader.c | 803 +-------------------------------- drivers/base/firmware_loader.h | 115 +++++ 6 files changed, 874 insertions(+), 799 deletions(-) commit e05cb73f83918b9bde2063de08467f2261d0f5bb Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:48 2018 -0800 firmware: move loading timeout under struct firmware_fallback_config The timeout is a fallback construct, so we can just stuff the timeout configuration under struct firmware_fallback_config. While at it, add a few helpers which vets the use of getting or setting the timeout as an int. The main use of the timeout is to set a timeout for completion, and that is used as an unsigned long. There a few cases however where it makes sense to get or set the timeout as an int, the helpers annotate these use cases have been properly vetted for. Acked-by: Kees Cook Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader.c | 46 ++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 13 deletions(-) commit 5d9566b144fdbbedf64dbf0907d2933fbcfb6872 Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:47 2018 -0800 firmware: use helpers for setting up a temporary cache timeout We only use the timeout for the firmware fallback mechanism except for trying to set the timeout during the cache setup for resume/suspend. For those cases, setting the timeout should be a no-op, so just reflect this in code by adding helpers for it. This change introduces no functional changes. Acked-by: Kees Cook Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader.c | 49 ++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 19 deletions(-) commit b2e9a8553cebcb414753e0185ce6fa87e14ebf30 Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:46 2018 -0800 firmware: simplify CONFIG_FW_LOADER_USER_HELPER_FALLBACK further All CONFIG_FW_LOADER_USER_HELPER_FALLBACK really is, is just a bool, initailized at build time. Define it as such. This simplifies the logic even further, removing now all explicit #ifdefs around the code. Acked-by: Kees Cook Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit c4f528795d1add8b63652673f7262729f679c6c1 Author: Karthikeyan Ramasubramanian Date: Wed Mar 14 17:58:49 2018 -0600 tty: serial: msm_geni_serial: Add serial driver support for GENI based QUP This driver supports GENI based UART Controller in the Qualcomm SOCs. The Qualcomm Generic Interface (GENI) is a programmable module supporting a wide range of serial interfaces including UART. This driver support console operations using FIFO mode of transfer. Signed-off-by: Girish Mahadevan Signed-off-by: Karthikeyan Ramasubramanian Signed-off-by: Sagar Dharia Signed-off-by: Doug Anderson Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/Kconfig | 15 + drivers/tty/serial/Makefile | 1 + drivers/tty/serial/qcom_geni_serial.c | 1158 +++++++++++++++++++++++++++++++++ 3 files changed, 1174 insertions(+) commit 6f005302a23fa4ea611612899cd18de76e7821b9 Merge: f4d0290 ea9d7bb Author: Greg Kroah-Hartman Date: Tue Mar 20 09:11:31 2018 +0100 Merge tag 'thunderbolt-for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into char-misc-next Mike writes: thunderbolt: Changes for v4.17 merge window New features: - Intel Titan Ridge Thunderbolt 3 controller support - Preboot ACL supported, allowing more secure way to boot from Thunderbolt devices - New "USB only" security level In addition there are a couple of fixes for increasing timeout when authenticating the ICM firmware and reading root switch config space. Preventing a crash on certain Lenovo systems where ICM firmware for some reason is not always properly starting up. commit 83ac4ca943affce56a2c408ddb2f5232f478fb11 Author: Uwe Kleine König Date: Mon Mar 19 11:52:02 2018 +0100 genirq: Pass desc to __irq_free instead of irq number Given that irq_to_desc() is a radix_tree_lookup and the reverse operation is only a pointer dereference and that all callers of __free_irq already have the desc, pass the desc instead of the irq number. Signed-off-by: Uwe Kleine-König Signed-off-by: Thomas Gleixner Cc: kernel@pengutronix.de Link: https://lkml.kernel.org/r/20180319105202.9794-1-u.kleine-koenig@pengutronix.de kernel/irq/manage.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b572f6393ee54bd4173a4313da8f2fb986a11089 Author: Ryder Lee Date: Tue Mar 20 11:16:52 2018 +0800 clk: mediatek: add audsys support for MT2701 Add clock driver support for MT2701 audsys. Signed-off-by: Ryder Lee Signed-off-by: Stephen Boyd drivers/clk/mediatek/Kconfig | 6 ++ drivers/clk/mediatek/Makefile | 1 + drivers/clk/mediatek/clk-mt2701-aud.c | 186 ++++++++++++++++++++++++++++++++++ 3 files changed, 193 insertions(+) commit 037b21133e5367c833908db0226d77138ba4c5eb Author: Ryder Lee Date: Tue Mar 20 11:16:51 2018 +0800 clk: mediatek: add devm_of_platform_populate() for MT7622 audsys Add devm_of_platform_populate() to populate devices which are children of the root node. Signed-off-by: Ryder Lee Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt7622-aud.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit b3fc5c9bb373661224906bf434c09ca0de032e82 Author: Peter Zijlstra Date: Thu Mar 15 11:49:36 2018 +0100 sched/wait: Improve __var_waitqueue() code generation Since we fixed hash_64() to not suck there is no need to play games to attempt to improve the hash value on 64-bit. Also, since we don't use the bit value for the variables, use hash_ptr() directly. No change in functionality. Signed-off-by: Peter Zijlstra (Intel) Cc: George Spelvin Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/wait_bit.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 9b8cce52c4b5c08297900bfdcafc6b08d9bc4a27 Author: Peter Zijlstra Date: Thu Mar 15 11:46:30 2018 +0100 sched/wait: Remove the wait_on_atomic_t() API There are no users left (everyone got converted to wait_var_event()), remove it. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/wait_bit.h | 27 ------------- kernel/sched/wait_bit.c | 101 ----------------------------------------------- 2 files changed, 128 deletions(-) commit 6887a56b6e8ef5daf1160f2ebe5cbe38fd8819a2 Author: Peter Zijlstra Date: Thu Mar 15 11:45:44 2018 +0100 sched/wait, arch/mips: Fix and convert wait_on_atomic_t() usage to the new wait_var_event() API The old wait_on_atomic_t() is going to get removed, use the more flexible wait_var_event() API instead. And while there, fix a bug and add the missing wakeup... Signed-off-by: Peter Zijlstra (Intel) Cc: James Hogan Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/mips/kernel/process.c | 2 ++ arch/mips/kernel/traps.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit e24e960c7fe2d6068974efced0ce5bdad8e81866 Author: Peter Zijlstra Date: Thu Mar 15 11:45:01 2018 +0100 sched/wait, fs/ocfs2: Convert wait_on_atomic_t() usage to the new wait_var_event() API The old wait_on_atomic_t() is going to get removed, use the more flexible wait_var_event() API instead. No change in functionality. Signed-off-by: Peter Zijlstra (Intel) Cc: Joel Becker Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/ocfs2/filecheck.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 723c921e7dfc0b647138e58f4cdb7b7af3e98d70 Author: Peter Zijlstra Date: Thu Mar 15 11:44:34 2018 +0100 sched/wait, fs/nfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API The old wait_on_atomic_t() is going to get removed, use the more flexible wait_var_event() API instead. No change in functionality. Signed-off-by: Peter Zijlstra (Intel) Cc: Anna Schumaker Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/nfs/inode.c | 5 ----- fs/nfs/pagelist.c | 6 +++--- fs/nfs/pnfs_nfs.c | 2 +- fs/nfs/write.c | 6 +++--- 4 files changed, 7 insertions(+), 12 deletions(-) commit dc5d4afbb0bf7b7746ff5e56e1a5688ad7f29b32 Author: Peter Zijlstra Date: Thu Mar 15 11:43:43 2018 +0100 sched/wait, fs/fscache: Convert wait_on_atomic_t() usage to the new wait_var_event() API The old wait_on_atomic_t() is going to get removed, use the more flexible wait_var_event() API instead. No change in functionality. Signed-off-by: Peter Zijlstra (Intel) Cc: David Howells Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/fscache/cookie.c | 7 ++++--- include/linux/fscache-cache.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) commit 4625956a4ec20c623acbbb0c6d60fcb388387ba8 Author: Peter Zijlstra Date: Thu Mar 15 11:43:08 2018 +0100 sched/wait, fs/btrfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API The old wait_on_atomic_t() is going to get removed, use the more flexible wait_var_event() API instead. No change in functionality. Signed-off-by: Peter Zijlstra (Intel) Acked-by: David Sterba Cc: Chris Mason Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/btrfs/extent-tree.c | 14 ++++++-------- fs/btrfs/ioctl.c | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) commit ab1fbe32477619b99921a203d16de9e66526b22a Author: Peter Zijlstra Date: Thu Mar 15 11:42:28 2018 +0100 sched/wait, fs/afs: Convert wait_on_atomic_t() usage to the new wait_var_event() API The old wait_on_atomic_t() is going to get removed, use the more flexible wait_var_event() API instead. No change in functionality. Signed-off-by: Peter Zijlstra (Intel) Cc: David Howells Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/afs/cell.c | 6 +++--- fs/afs/rxrpc.c | 6 +++--- fs/afs/server.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) commit f0baa040f7a597fb099bf652c754b1a8a9e183f7 Author: Peter Zijlstra Date: Thu Mar 15 11:42:06 2018 +0100 sched/wait, drivers/media: Convert wait_on_atomic_t() usage to the new wait_var_event() API The old wait_on_atomic_t() is going to get removed, use the more flexible wait_var_event() API instead. Unlike wake_up_atomic_t(), wake_up_var() will issue the wakeup even if the variable is not 0. No change in functionality. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Stanimir Varbanov Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar drivers/media/platform/qcom/venus/hfi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d224985a5e312ab05b624143a3fd9bb91b53e52a Author: Peter Zijlstra Date: Thu Mar 15 11:41:39 2018 +0100 sched/wait, drivers/drm: Convert wait_on_atomic_t() usage to the new wait_var_event() API The old wait_on_atomic_t() is going to get removed, use the more flexible wait_var_event() API instead. Unlike wake_up_atomic_t(), wake_up_var() will issue the wakeup even if the variable is not 0. No change in functionality. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Chris Wilson Cc: Daniel Vetter Cc: David Airlie Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar drivers/gpu/drm/drm_dp_aux_dev.c | 13 +++++++------ drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 14 ++++---------- 2 files changed, 11 insertions(+), 16 deletions(-) commit 6b2bb7265f0b62605e8caee3613449ed0db270b9 Author: Peter Zijlstra Date: Thu Mar 15 11:40:33 2018 +0100 sched/wait: Introduce wait_var_event() As a replacement for the wait_on_atomic_t() API provide the wait_var_event() API. The wait_var_event() API is based on the very same hashed-waitqueue idea, but doesn't care about the type (atomic_t) or the specific condition (atomic_read() == 0). IOW. it's much more widely applicable/flexible. It shares all the benefits/disadvantages of a hashed-waitqueue approach with the existing wait_on_atomic_t/wait_on_bit() APIs. The API is modeled after the existing wait_event() API, but instead of taking a wait_queue_head, it takes an address. This addresses is hashed to obtain a wait_queue_head from the bit_wait_table. Similar to the wait_event() API, it takes a condition expression as second argument and will wait until this expression becomes true. The following are (mostly) identical replacements: wait_on_atomic_t(&my_atomic, atomic_t_wait, TASK_UNINTERRUPTIBLE); wake_up_atomic_t(&my_atomic); wait_var_event(&my_atomic, !atomic_read(&my_atomic)); wake_up_var(&my_atomic); The only difference is that wake_up_var() is an unconditional wakeup and doesn't check the previously hard-coded (atomic_read() == 0) condition here. This is of little concequence, since most callers are already conditional on atomic_dec_and_test() and the ones that are not, are trivial to make so. Tested-by: Dan Williams Signed-off-by: Peter Zijlstra (Intel) Cc: David Howells Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/wait_bit.h | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ kernel/sched/wait_bit.c | 48 +++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) commit d519329f72a6f36bc4f2b85452640cfe583b4f81 Author: Patrick Bellasi Date: Fri Mar 9 09:52:45 2018 +0000 sched/fair: Update util_est only on util_avg updates The estimated utilization of a task is currently updated every time the task is dequeued. However, to keep overheads under control, PELT signals are effectively updated at maximum once every 1ms. Thus, for really short running tasks, it can happen that their util_avg value has not been updates since their last enqueue. If such tasks are also frequently running tasks (e.g. the kind of workload generated by hackbench) it can also happen that their util_avg is updated only every few activations. This means that updating util_est at every dequeue potentially introduces not necessary overheads and it's also conceptually wrong if the util_avg signal has never been updated during a task activation. Let's introduce a throttling mechanism on task's util_est updates to sync them with util_avg updates. To make the solution memory efficient, both in terms of space and load/store operations, we encode a synchronization flag into the LSB of util_est.enqueued. This makes util_est an even values only metric, which is still considered good enough for its purpose. The synchronization bit is (re)set by __update_load_avg_se() once the PELT signal of a task has been updated during its last activation. Such a throttling mechanism allows to keep under control util_est overheads in the wakeup hot path, thus making it a suitable mechanism which can be enabled also on high-intensity workload systems. Thus, this now switches on by default the estimation utilization scheduler feature. Suggested-by: Chris Redpath Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Cc: Dietmar Eggemann Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Steve Muckle Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Cc: Viresh Kumar Link: http://lkml.kernel.org/r/20180309095245.11071-5-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 42 ++++++++++++++++++++++++++++++++++++++---- kernel/sched/features.h | 2 +- 2 files changed, 39 insertions(+), 5 deletions(-) commit a07630b8b2c16f82fd5b71d890079f4dd7599c1d Author: Patrick Bellasi Date: Fri Mar 9 09:52:44 2018 +0000 sched/cpufreq/schedutil: Use util_est for OPP selection When schedutil looks at the CPU utilization, the current PELT value for that CPU is returned straight away. In certain scenarios this can have undesired side effects and delays on frequency selection. For example, since the task utilization is decayed at wakeup time, a long sleeping big task newly enqueued does not add immediately a significant contribution to the target CPU. This introduces some latency before schedutil will be able to detect the best frequency required by that task. Moreover, the PELT signal build-up time is a function of the current frequency, because of the scale invariant load tracking support. Thus, starting from a lower frequency, the utilization build-up time will increase even more and further delays the selection of the actual frequency which better serves the task requirements. In order to reduce these kind of latencies, we integrate the usage of the CPU's estimated utilization in the sugov_get_util function. This allows to properly consider the expected utilization of a CPU which, for example, has just got a big task running after a long sleep period. Ultimately this allows to select the best frequency to run a task right after its wake-up. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Acked-by: Rafael J. Wysocki Acked-by: Viresh Kumar Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Steve Muckle Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Link: http://lkml.kernel.org/r/20180309095245.11071-4-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar kernel/sched/sched.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit f9be3e5961c5554879a491961187472e923f5ee0 Author: Patrick Bellasi Date: Fri Mar 9 09:52:43 2018 +0000 sched/fair: Use util_est in LB and WU paths When the scheduler looks at the CPU utilization, the current PELT value for a CPU is returned straight away. In certain scenarios this can have undesired side effects on task placement. For example, since the task utilization is decayed at wakeup time, when a long sleeping big task is enqueued it does not add immediately a significant contribution to the target CPU. As a result we generate a race condition where other tasks can be placed on the same CPU while it is still considered relatively empty. In order to reduce this kind of race conditions, this patch introduces the required support to integrate the usage of the CPU's estimated utilization in the wakeup path, via cpu_util_wake(), as well as in the load-balance path, via cpu_util() which is used by update_sg_lb_stats(). The estimated utilization of a CPU is defined to be the maximum between its PELT's utilization and the sum of the estimated utilization (at previous dequeue time) of all the tasks currently RUNNABLE on that CPU. This allows to properly represent the spare capacity of a CPU which, for example, has just got a big task running since a long sleep period. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Steve Muckle Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Cc: Viresh Kumar Link: http://lkml.kernel.org/r/20180309095245.11071-3-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 84 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 70 insertions(+), 14 deletions(-) commit 7f65ea42eb00bc902f1c37a71e984e4f4064cfa9 Author: Patrick Bellasi Date: Fri Mar 9 09:52:42 2018 +0000 sched/fair: Add util_est on top of PELT The util_avg signal computed by PELT is too variable for some use-cases. For example, a big task waking up after a long sleep period will have its utilization almost completely decayed. This introduces some latency before schedutil will be able to pick the best frequency to run a task. The same issue can affect task placement. Indeed, since the task utilization is already decayed at wakeup, when the task is enqueued in a CPU, this can result in a CPU running a big task as being temporarily represented as being almost empty. This leads to a race condition where other tasks can be potentially allocated on a CPU which just started to run a big task which slept for a relatively long period. Moreover, the PELT utilization of a task can be updated every [ms], thus making it a continuously changing value for certain longer running tasks. This means that the instantaneous PELT utilization of a RUNNING task is not really meaningful to properly support scheduler decisions. For all these reasons, a more stable signal can do a better job of representing the expected/estimated utilization of a task/cfs_rq. Such a signal can be easily created on top of PELT by still using it as an estimator which produces values to be aggregated on meaningful events. This patch adds a simple implementation of util_est, a new signal built on top of PELT's util_avg where: util_est(task) = max(task::util_avg, f(task::util_avg@dequeue)) This allows to remember how big a task has been reported by PELT in its previous activations via f(task::util_avg@dequeue), which is the new _task_util_est(struct task_struct*) function added by this patch. If a task should change its behavior and it runs longer in a new activation, after a certain time its util_est will just track the original PELT signal (i.e. task::util_avg). The estimated utilization of cfs_rq is defined only for root ones. That's because the only sensible consumer of this signal are the scheduler and schedutil when looking for the overall CPU utilization due to FAIR tasks. For this reason, the estimated utilization of a root cfs_rq is simply defined as: util_est(cfs_rq) = max(cfs_rq::util_avg, cfs_rq::util_est::enqueued) where: cfs_rq::util_est::enqueued = sum(_task_util_est(task)) for each RUNNABLE task on that root cfs_rq It's worth noting that the estimated utilization is tracked only for objects of interests, specifically: - Tasks: to better support tasks placement decisions - root cfs_rqs: to better support both tasks placement decisions as well as frequencies selection Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Paul Turner Cc: Rafael J . Wysocki Cc: Steve Muckle Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Cc: Viresh Kumar Link: http://lkml.kernel.org/r/20180309095245.11071-2-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar include/linux/sched.h | 29 ++++++++++++ kernel/sched/debug.c | 4 ++ kernel/sched/fair.c | 122 +++++++++++++++++++++++++++++++++++++++++++++--- kernel/sched/features.h | 5 ++ 4 files changed, 154 insertions(+), 6 deletions(-) commit 10c18c44a6494167e7a7ca3a3a61a67972017bdf Merge: 9e49e24 1b5f3ba4 Author: Ingo Molnar Date: Tue Mar 20 08:08:02 2018 +0100 Merge branch 'linus' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit 78e5dfea84dc15d69940831b3981b3014d17222e Author: Rob Herring Date: Wed Feb 28 16:44:06 2018 -0600 powerpc: dts: replace 'linux,stdout-path' with 'stdout-path' 'linux,stdout-path' has been deprecated for some time in favor of 'stdout-path'. Now dtc will warn on occurrences of 'linux,stdout-path'. Search and replace all the of occurrences with 'stdout-path'. Signed-off-by: Rob Herring Cc: Mark Rutland Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Michael Ellerman arch/powerpc/boot/dts/acadia.dts | 2 +- arch/powerpc/boot/dts/adder875-redboot.dts | 2 +- arch/powerpc/boot/dts/adder875-uboot.dts | 2 +- arch/powerpc/boot/dts/akebono.dts | 2 +- arch/powerpc/boot/dts/amigaone.dts | 2 +- arch/powerpc/boot/dts/asp834x-redboot.dts | 2 +- arch/powerpc/boot/dts/bamboo.dts | 2 +- arch/powerpc/boot/dts/c2k.dts | 2 +- arch/powerpc/boot/dts/currituck.dts | 2 +- arch/powerpc/boot/dts/ebony.dts | 2 +- arch/powerpc/boot/dts/eiger.dts | 2 +- arch/powerpc/boot/dts/ep405.dts | 2 +- arch/powerpc/boot/dts/fsl/mvme7100.dts | 2 +- arch/powerpc/boot/dts/fsp2.dts | 2 +- arch/powerpc/boot/dts/holly.dts | 2 +- arch/powerpc/boot/dts/hotfoot.dts | 2 +- arch/powerpc/boot/dts/icon.dts | 2 +- arch/powerpc/boot/dts/iss4xx-mpic.dts | 2 +- arch/powerpc/boot/dts/iss4xx.dts | 2 +- arch/powerpc/boot/dts/katmai.dts | 2 +- arch/powerpc/boot/dts/klondike.dts | 2 +- arch/powerpc/boot/dts/ksi8560.dts | 2 +- arch/powerpc/boot/dts/media5200.dts | 2 +- arch/powerpc/boot/dts/mpc8272ads.dts | 2 +- arch/powerpc/boot/dts/mpc866ads.dts | 2 +- arch/powerpc/boot/dts/mpc885ads.dts | 2 +- arch/powerpc/boot/dts/mvme5100.dts | 2 +- arch/powerpc/boot/dts/obs600.dts | 2 +- arch/powerpc/boot/dts/pq2fads.dts | 2 +- arch/powerpc/boot/dts/rainier.dts | 2 +- arch/powerpc/boot/dts/redwood.dts | 2 +- arch/powerpc/boot/dts/sam440ep.dts | 2 +- arch/powerpc/boot/dts/sequoia.dts | 2 +- arch/powerpc/boot/dts/storcenter.dts | 2 +- arch/powerpc/boot/dts/taishan.dts | 2 +- arch/powerpc/boot/dts/virtex440-ml507.dts | 2 +- arch/powerpc/boot/dts/virtex440-ml510.dts | 2 +- arch/powerpc/boot/dts/walnut.dts | 2 +- arch/powerpc/boot/dts/warp.dts | 2 +- arch/powerpc/boot/dts/xpedite5200_xmon.dts | 2 +- arch/powerpc/boot/dts/yosemite.dts | 2 +- 41 files changed, 41 insertions(+), 41 deletions(-) commit dd40c5b4c90d84d30cdb452c2d193d6fb42247df Author: Nicholas Piggin Date: Tue Mar 6 23:24:58 2018 +1000 selftests/powerpc: Add process creation benchmark Signed-off-by: Nicholas Piggin [mpe: Add SPDX, and fixup formatting] Signed-off-by: Michael Ellerman .../selftests/powerpc/benchmarks/.gitignore | 2 + .../testing/selftests/powerpc/benchmarks/Makefile | 7 +- .../selftests/powerpc/benchmarks/exec_target.c | 13 + tools/testing/selftests/powerpc/benchmarks/fork.c | 325 +++++++++++++++++++++ 4 files changed, 346 insertions(+), 1 deletion(-) commit a0828cf57acce9bf941539e1f633e9a91f9df57d Author: Markus Elfring Date: Thu Jan 19 17:15:30 2017 +0100 powerpc: Use sizeof(*foo) rather than sizeof(struct foo) It's slightly less error prone to use sizeof(*foo) rather than specifying the type. Signed-off-by: Markus Elfring [mpe: Consolidate into one patch, rewrite change log] Signed-off-by: Michael Ellerman arch/powerpc/kernel/nvram_64.c | 9 +++------ arch/powerpc/oprofile/cell/spu_task_sync.c | 2 +- arch/powerpc/oprofile/cell/vma_map.c | 4 ++-- arch/powerpc/platforms/4xx/msi.c | 2 +- arch/powerpc/platforms/4xx/ocm.c | 2 +- arch/powerpc/platforms/cell/axon_msi.c | 2 +- arch/powerpc/platforms/cell/spider-pci.c | 2 +- arch/powerpc/platforms/cell/spufs/lscsa_alloc.c | 2 +- arch/powerpc/platforms/powermac/low_i2c.c | 2 +- arch/powerpc/platforms/powermac/pfunc_core.c | 4 ++-- arch/powerpc/platforms/powernv/opal-flash.c | 4 ++-- arch/powerpc/platforms/powernv/opal-hmi.c | 2 +- arch/powerpc/platforms/powernv/opal-imc.c | 10 +++++----- arch/powerpc/platforms/powernv/opal-memory-errors.c | 2 +- arch/powerpc/platforms/powernv/opal-psr.c | 2 +- arch/powerpc/platforms/powernv/opal-sensor-groups.c | 4 ++-- arch/powerpc/platforms/powernv/opal-xscom.c | 2 +- arch/powerpc/platforms/powernv/pci-ioda.c | 2 +- arch/powerpc/platforms/ps3/mm.c | 6 ++---- drivers/macintosh/rack-meter.c | 2 +- 20 files changed, 31 insertions(+), 36 deletions(-) commit 31513207ce72fef5978e8b284e53f294c034ae51 Author: Matt Brown Date: Thu Jul 20 16:25:14 2017 +1000 powerpc: Remove unused flush_dcache_phys_range() The flush_dcache_phys_range() function is no longer used in the kernel. The last usage was removed in c40785ad305b ("powerpc/dart: Use a cachable DART"). This patch removes the function and declaration. Signed-off-by: Matt Brown [mpe: Munge change log, include commit that removed last user] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cacheflush.h | 1 - arch/powerpc/kernel/misc_64.S | 38 ----------------------------------- 2 files changed, 39 deletions(-) commit aa9532d4899ff14e50de10d261b761d157cd2ae3 Author: Matt Brown Date: Fri Aug 4 13:42:33 2017 +1000 lib/raid6: Build proper raid6test files on powerpc Previously the raid6 test Makefile did not build the POWER specific files (altivec and vpermxor). This patch fixes the bug, so that all appropriate files for powerpc are built. This patch also fixes the missing and mismatched ifdef statements to allow the altivec.uc file to be built correctly. Signed-off-by: Matt Brown Signed-off-by: Michael Ellerman lib/raid6/altivec.uc | 3 +++ lib/raid6/test/Makefile | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit 751ba79cc552c146595cd439b21c4ff8998c3b69 Author: Matt Brown Date: Fri Aug 4 13:42:32 2017 +1000 lib/raid6/altivec: Add vpermxor implementation for raid6 Q syndrome This patch uses the vpermxor instruction to optimise the raid6 Q syndrome. This instruction was made available with POWER8, ISA version 2.07. It allows for both vperm and vxor instructions to be done in a single instruction. This has been tested for correctness on a ppc64le vm with a basic RAID6 setup containing 5 drives. The performance benchmarks are from the raid6test in the /lib/raid6/test directory. These results are from an IBM Firestone machine with ppc64le architecture. The benchmark results show a 35% speed increase over the best existing algorithm for powerpc (altivec). The raid6test has also been run on a big-endian ppc64 vm to ensure it also works for big-endian architectures. Performance benchmarks: raid6: altivecx4 gen() 18773 MB/s raid6: altivecx8 gen() 19438 MB/s raid6: vpermxor4 gen() 25112 MB/s raid6: vpermxor8 gen() 26279 MB/s Signed-off-by: Matt Brown Reviewed-by: Daniel Axtens [mpe: Add VPERMXOR macro so we can build with old binutils] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc-opcode.h | 6 ++ include/linux/raid/pq.h | 4 ++ lib/raid6/.gitignore | 1 + lib/raid6/Makefile | 27 ++++++++- lib/raid6/algos.c | 4 ++ lib/raid6/test/Makefile | 17 +++++- lib/raid6/vpermxor.uc | 105 ++++++++++++++++++++++++++++++++++ 7 files changed, 161 insertions(+), 3 deletions(-) commit 827473268ee492b30b576ef156ab524a2b9f3520 Author: Dan Carpenter Date: Wed Mar 14 23:08:28 2018 +0300 of: unittest: fix an error code in of_unittest_apply_overlay() We accidentally return zero on failure instead of a negative error code. Fixes: 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT") Signed-off-by: Dan Carpenter Signed-off-by: Rob Herring drivers/of/unittest.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 41c0e939d70ddb6860e340e7532df8984783f867 Author: Kaihua Zhong Date: Wed Feb 28 12:54:54 2018 +0800 mailbox: Add support for Hi3660 mailbox Hi3660 mailbox controller is used to send message within multiple processors, MCU, HIFI, etc. It supports 32 mailbox channels and every channel can only be used for single transferring direction. Once the channel is enabled, it needs to specify the destination interrupt and acknowledge interrupt, these two interrupt vectors are used to create the connection between the mailbox and interrupt controllers. The data transferring supports two modes, one is named as "automatic acknowledge" mode so after send message the kernel doesn't need to wait for acknowledge from remote and directly return; there have another mode is to rely on handling interrupt for acknowledge. This commit is for initial version driver, which only supports "automatic acknowledge" mode to support CPU clock, which is the only one consumer to use mailbox and has been verified. Later may enhance this driver for interrupt mode (e.g. for supporting HIFI). Signed-off-by: Leo Yan Signed-off-by: Ruyi Wang Signed-off-by: Kaihua Zhong Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 8 + drivers/mailbox/Makefile | 2 + drivers/mailbox/hi3660-mailbox.c | 312 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 322 insertions(+) commit 648d1382d422076364a874b8b92b9ec3ff37874e Author: Leo Yan Date: Wed Feb 28 12:54:53 2018 +0800 dt-bindings: mailbox: Introduce Hi3660 controller binding Introduce a binding for the Hi3660 mailbox controller, the mailbox is used within application processor (AP), communication processor (CP), HIFI and MCU, etc. Acked-by: Rob Herring Signed-off-by: Leo Yan Signed-off-by: Jassi Brar .../bindings/mailbox/hisilicon,hi3660-mailbox.txt | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 83c9f08e6c6a6dc668384882de4dcf5ef4ae0ba7 Author: Christoph Hellwig Date: Mon Mar 19 08:37:53 2018 +0100 scsi: remove the old scsi_module.c initialization model After more than 15 years all users of this legacy interface are finally gone. Rest in peace! Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen Documentation/driver-api/scsi.rst | 6 -- Documentation/scsi/scsi_mid_low_api.txt | 122 +------------------------------- drivers/scsi/hosts.c | 23 ------ drivers/scsi/scsi_module.c | 73 ------------------- include/scsi/scsi_host.h | 36 ---------- 5 files changed, 1 insertion(+), 259 deletions(-) commit 616434e2aa7091f0fc5f7838af0f8bc809c8cf85 Author: Christoph Hellwig Date: Mon Mar 19 08:37:52 2018 +0100 scsi: remove the sym53c416 driver This driver hasn't seen any recent bug fixing and is one of the last drivers using the scsi_module.c infrastruture that has been deprecated 15 years ago. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen Documentation/scsi/scsi-parameters.txt | 3 - drivers/scsi/Kconfig | 18 - drivers/scsi/Makefile | 1 - drivers/scsi/sym53c416.c | 844 --------------------------------- drivers/scsi/sym53c416.h | 33 -- 5 files changed, 899 deletions(-) commit 94d4731cc5848e582e6cd510d57c41bc3be82045 Author: Christoph Hellwig Date: Mon Mar 19 08:37:51 2018 +0100 scsi: remove the NCR53c406a driver This driver hasn't seen any recent bug fixing and is one of the last drivers using the scsi_module.c infrastruture that has been deprecated 15 years ago. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 12 - drivers/scsi/Makefile | 1 - drivers/scsi/NCR53c406a.c | 1090 --------------------------------------------- 3 files changed, 1103 deletions(-) commit e184f2bf4d9f1a3c612a8c1d67e73e9cf8ab5ab9 Author: Christoph Hellwig Date: Mon Mar 19 08:37:50 2018 +0100 scsi: remove the fdomain and fdomain_cs drivers These drivers haven't seen any recent bug fixing and are two of the last drivers using the scsi_module.c infrastruture that has been deprecated 15 years ago. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen MAINTAINERS | 6 - arch/powerpc/configs/c2k_defconfig | 1 - drivers/scsi/Kconfig | 20 - drivers/scsi/Makefile | 1 - drivers/scsi/fdomain.c | 1783 ------------------------------------ drivers/scsi/fdomain.h | 24 - drivers/scsi/pcmcia/Kconfig | 9 - drivers/scsi/pcmcia/Makefile | 2 - drivers/scsi/pcmcia/fdomain_core.c | 2 - drivers/scsi/pcmcia/fdomain_stub.c | 209 ----- 10 files changed, 2057 deletions(-) commit 6937d7322ac4c56b56cc6bd5c83fd1d36ce52f5d Author: Christoph Hellwig Date: Mon Mar 19 08:37:49 2018 +0100 scsi: mvme147: stop using scsi_module.c Convert the driver to modern style probing. Given that there only is a single instance for a given board that can be done using a global struct Scsi_Host instance easily. Also fix the removal path by passing the correct cookie to free_irq, and enable it unconditionally. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/mvme147.c | 107 ++++++++++++++++++++++++++----------------------- 1 file changed, 57 insertions(+), 50 deletions(-) commit 5785bfadcdb596df7e103636c81e5ae6dd0caa5e Author: Christoph Hellwig Date: Mon Mar 19 08:37:48 2018 +0100 scsi: esas2r: remove initialization / cleanup dead wood esas2r has been converted to hotplug style initialization long ago, but kept various remant of the old-style scsi_module.c initialization around. Remove those. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/esas2r/esas2r.h | 2 -- drivers/scsi/esas2r/esas2r_init.c | 21 ------------ drivers/scsi/esas2r/esas2r_main.c | 72 +++------------------------------------ 3 files changed, 4 insertions(+), 91 deletions(-) commit fa1467fb0076143ea678ae1837b5b3bb27153329 Author: Christoph Hellwig Date: Mon Mar 19 08:34:58 2018 +0100 scsi: core: unexport scsi_host_set_state This function is only used inside the SCSI midlayer, so remove the export for it. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/hosts.c | 1 - 1 file changed, 1 deletion(-) commit 29fc9b3873607d01b1ff1ae077982cf5629010af Author: Bjorn Andersson Date: Tue Feb 13 11:04:04 2018 -0800 rpmsg: glink: Use spinlock in tx path Switch the tx_lock to a spinlock we allow clients to use rpmsg_trysend() from atomic context. In order to allow clients to sleep while waiting for space in the FIFO we release the lock temporarily around the delay; which should be replaced by sending a READ_NOTIF and waiting for the remote to signal us that space has been made available. Tested-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 33e3820dda8876792bd8135db633c741a07263be Author: Bjorn Andersson Date: Tue Feb 13 11:04:11 2018 -0800 rpmsg: smd: Use spinlock in tx path By switching the tx_lock to a spinlock we allow clients to use rpmsg_trysend() from atomic context. The mutex was interruptable as it was previously held for the duration of some client waiting for available space in the FIFO, but this was recently changed to only be held temporarily - allowing us to replace it with a spinlock. Tested-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_smd.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 37ad490bab09b7c218e37b570069cf188f2616e7 Author: Nicholas Lowell Date: Mon Mar 19 09:23:14 2018 -0400 regulator: giving regulator controlling gpios a non-empty label when used through the devicetree. When the label is empty, it causes missing information and limits diagnostics for instances such as 'cat /sys/kernel/debug/gpio' Setting the label to the regulator supply_name will point to the device using the gpio(s). Signed-off-by: Nicholas Lowell Signed-off-by: Mark Brown drivers/regulator/gpio-regulator.c | 1 + 1 file changed, 1 insertion(+) commit c88d311533563e6dadc244930a36125d592f5ec5 Author: Akshu Agrawal Date: Mon Mar 19 11:07:42 2018 +0530 ASoC: amd: Enable da7219 master clock using common clock framework DA7219 is clock master for other codecs. DA7219 has exposed clock control by using common clock framework and same is used to enable and disable clock for all codecs in the system. TEST=aplay -D hw:0,0 -vv arecord -D hw:0,0 -f dat -d 5 -vv aplay -D hw:0,1 -vv Signed-off-by: Akshu Agrawal Signed-off-by: Mark Brown sound/soc/amd/acp-da7219-max98357a.c | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit f155181d23608acd3fb46d0d6b1507b68ffa436b Author: Akshu Agrawal Date: Mon Mar 19 11:07:41 2018 +0530 ASoC: amd: Use single dai for da7219 playback and capture BT I2S is a bi-directional dai, we will use the same cpu dai for playback and capture. TEST=aplay -D hw:0,0 -vv arecord -D hw:0,0 -f dat -d 5 -vv Signed-off-by: Akshu Agrawal Signed-off-by: Mark Brown sound/soc/amd/acp-da7219-max98357a.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit dc32bb678e103afbcfa4d814489af0566307f528 Author: Sonny Rao Date: Wed Mar 14 14:36:25 2018 -0700 vhost: add vsock compat ioctl This will allow usage of vsock from 32-bit binaries on a 64-bit kernel. Signed-off-by: Sonny Rao Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael S. Tsirkin drivers/vhost/vsock.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 26b36604523f4a681a86e6cbc970ea72a2e9fb8a Author: Sonny Rao Date: Wed Mar 14 10:05:06 2018 -0700 vhost: fix vhost ioctl signature to build with clang Clang is particularly anal about signed vs unsigned comparisons and doesn't like the fact that some ioctl numbers set the MSB, so we get this error when trying to build vhost on aarch64: drivers/vhost/vhost.c:1400:7: error: overflow converting case value to switch condition type (3221794578 to 18446744072636378898) [-Werror, -Wswitch] case VHOST_GET_VRING_BASE: 3221794578 is 0xC008AF12 in hex 18446744072636378898 is 0xFFFFFFFFC008AF12 in hex Fix this by using unsigned ints in the function signature for vhost_vring_ioctl(). Signed-off-by: Sonny Rao Reviewed-by: Darren Kenny Signed-off-by: Michael S. Tsirkin drivers/vhost/vhost.c | 2 +- drivers/vhost/vhost.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 2d6d60a3d3eca50bbb20052278cb11dabcf4dff3 Author: Marc-André Lureau Date: Wed Feb 28 16:06:14 2018 +0100 fw_cfg: write vmcoreinfo details If the "etc/vmcoreinfo" fw_cfg file is present and we are not running the kdump kernel, write the addr/size of the vmcoreinfo ELF note. The DMA operation is expected to run synchronously with today qemu, but the specification states that it may become async, so we run "control" field check in a loop for eventual changes. Signed-off-by: Marc-André Lureau Signed-off-by: Michael S. Tsirkin drivers/firmware/qemu_fw_cfg.c | 145 ++++++++++++++++++++++++++++++++++++++- include/uapi/linux/qemu_fw_cfg.h | 31 +++++++++ 2 files changed, 173 insertions(+), 3 deletions(-) commit 43d4cb47f6e854ea9fe868eedf8281f81b5a1252 Author: Marc-André Lureau Date: Wed Feb 28 16:06:13 2018 +0100 crash: export paddr_vmcoreinfo_note() The following patch is going to use the symbol from the fw_cfg module, to call the function and write the note location details in the vmcoreinfo entry, so qemu can produce dumps with the vmcoreinfo note. CC: Andrew Morton CC: Hari Bathini CC: Tony Luck CC: Vivek Goyal Acked-by: Baoquan He Acked-by: Dave Young Signed-off-by: Marc-André Lureau Acked-by: Gabriel Somlo Signed-off-by: Michael S. Tsirkin kernel/crash_core.c | 1 + 1 file changed, 1 insertion(+) commit 14d1824c768d363f78e4b9e8a98b200aacc29c0f Author: Marc-André Lureau Date: Wed Feb 28 16:06:12 2018 +0100 fw_cfg: add DMA register Add an optional kernel module (or command line) parameter using the following syntax: [qemu_fw_cfg.]ioport=@[::[:]] or [qemu_fw_cfg.]mmio=@[::[:]] and initializes the register address using given or default offset. Signed-off-by: Marc-André Lureau Reviewed-by: Gabriel Somlo Signed-off-by: Michael S. Tsirkin drivers/firmware/qemu_fw_cfg.c | 53 ++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 12 deletions(-) commit 1f57bc12d87dda2d56b564d35f21b9e6bdb2bb2c Author: Marc-André Lureau Date: Wed Feb 28 16:06:11 2018 +0100 fw_cfg: add a public uapi header Create a common header file for well-known values and structures to be shared by the Linux kernel with qemu or other projects. It is based from qemu/docs/specs/fw_cfg.txt which references qemu/include/hw/nvram/fw_cfg_keys.h "for the most up-to-date and authoritative list" & vmcoreinfo.txt. Those files don't have an explicit license, but qemu/hw/nvram/fw_cfg.c is BSD-license, so Michael S. Tsirkin suggested to use the same license. The patch intentionally left out DMA & vmcoreinfo structures & defines, which are added in the commits making usage of it. Suggested-by: Michael S. Tsirkin Signed-off-by: Marc-André Lureau Signed-off-by: Michael S. Tsirkin MAINTAINERS | 1 + drivers/firmware/qemu_fw_cfg.c | 22 ++------------ include/uapi/linux/qemu_fw_cfg.h | 66 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 20 deletions(-) commit b1cc4097d15c29725060f86ecec20a1e635a541f Author: Marc-André Lureau Date: Wed Feb 28 16:06:10 2018 +0100 fw_cfg: handle fw_cfg_read_blob() error fw_cfg_read_blob() may fail, but does not return error. This may lead to surprising behaviours, like populating zero file entries (in register_file() or during read). Return an error if ACPI locking failed. Also, the following DMA read/write extension will add more error paths that should be handled appropriately. Signed-off-by: Marc-André Lureau Signed-off-by: Michael S. Tsirkin drivers/firmware/qemu_fw_cfg.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) commit 59ecab182faf84e76f4a07fee904d41e41f4780c Author: Marc-André Lureau Date: Wed Feb 28 16:06:09 2018 +0100 fw_cfg: remove inline from fw_cfg_read_blob() The function is not small and getting bigger. Let the compiler decide instead. No profiling done, hopefully unnecessary. Signed-off-by: Marc-André Lureau Signed-off-by: Michael S. Tsirkin drivers/firmware/qemu_fw_cfg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3d47a34ba6761a64b78a8b89f6bbe93b4e8455f1 Author: Marc-André Lureau Date: Wed Feb 28 16:06:08 2018 +0100 fw_cfg: fix sparse warnings around FW_CFG_FILE_DIR read Use struct fw_cfg_files to read the directory size, fixing the sparse warnings: drivers/firmware/qemu_fw_cfg.c:485:17: warning: cast to restricted __be32 Signed-off-by: Marc-André Lureau Signed-off-by: Michael S. Tsirkin drivers/firmware/qemu_fw_cfg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f295c8dba71841f007e2154143109d1517670a08 Author: Marc-André Lureau Date: Wed Feb 28 16:06:07 2018 +0100 fw_cfg: fix sparse warning reading FW_CFG_ID Use a restricted type for reading FW_CFG_ID, fixing sparse warning: drivers/firmware/qemu_fw_cfg.c:540:22: warning: cast to restricted __le32 Signed-off-by: Marc-André Lureau Signed-off-by: Michael S. Tsirkin drivers/firmware/qemu_fw_cfg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d174ea7d38bccb6a10aca036014ec74ea8f73d1c Author: Marc-André Lureau Date: Wed Feb 28 16:06:06 2018 +0100 fw_cfg: fix sparse warnings with fw_cfg_file Modify fw_cfg_sysfs_entry to store entry values, instead of reusing the restricted types. Fixes warnings such as: $ make C=1 CF=-D__CHECK_ENDIAN__ drivers/firmware/qemu_fw_cfg.o drivers/firmware/qemu_fw_cfg.c:491:29: warning: incorrect type in assignment (different base types) drivers/firmware/qemu_fw_cfg.c:491:29: expected restricted __be32 [usertype] size drivers/firmware/qemu_fw_cfg.c:491:29: got unsigned int drivers/firmware/qemu_fw_cfg.c:492:31: warning: incorrect type in assignment (different base types) drivers/firmware/qemu_fw_cfg.c:492:31: expected restricted __be16 [usertype] select drivers/firmware/qemu_fw_cfg.c:492:31: got int Signed-off-by: Marc-André Lureau Signed-off-by: Michael S. Tsirkin drivers/firmware/qemu_fw_cfg.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 8d59d5bd8f088be1366f69590729aaef2f8cb17b Author: Marc-André Lureau Date: Wed Feb 28 16:06:05 2018 +0100 fw_cfg: fix sparse warnings in fw_cfg_sel_endianness() Dispatch to the appropriate iowrite() instead of casting restricted type to u16. - if fw_cfg_is_mmio: before: iowrite16(cpu_to_be16(key)) after: iowrite16be(key) - if !fw_cfg_is_mmio: before: iowrite16(cpu_to_le16(key)) after: iowrite16(key) which is equivalent on little-endian systems, where fw_cfg IO is supported. Fixes: $ make C=1 CF=-D__CHECK_ENDIAN__ drivers/firmware/qemu_fw_cfg.o drivers/firmware/qemu_fw_cfg.c:55:33: warning: restricted __be16 degrades to integer drivers/firmware/qemu_fw_cfg.c:55:52: warning: restricted __le16 degrades to integer Signed-off-by: Marc-André Lureau Signed-off-by: Michael S. Tsirkin drivers/firmware/qemu_fw_cfg.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit c8f06a066816b17f3d1c07da9a5c4f387871c590 Author: Michael S. Tsirkin Date: Tue Mar 20 02:41:04 2018 +0200 ptr_ring: fix build Fixes after recent use of kvmalloc Signed-off-by: Michael S. Tsirkin tools/virtio/ringtest/ptr_ring.c | 5 +++++ 1 file changed, 5 insertions(+) commit 59ff3af3f2672453fc08f379ee62ae3c8cedbfa1 Author: Linus Walleij Date: Fri Mar 9 14:32:21 2018 +0100 ARM: defconfig: Configure Versatile boards to use PL111 DRM The DRM driver is now finalized for the Versatile board family, so switch the defconfig to use this driver instead of the old fbdev driver. Signed-off-by: Linus Walleij arch/arm/configs/versatile_defconfig | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit cf8518f27b6ce244dfd3f4d0f378041e0ecd516d Author: Linus Walleij Date: Fri Mar 9 14:28:07 2018 +0100 ARM: defconfig: Update Versatile defconfig This updates the Versatile defconfig to the latest savedefconfig results reflecting changes in Kconfig. We add in the Flash memory support that has been available upstream for a while now. Signed-off-by: Linus Walleij arch/arm/configs/versatile_defconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e2fc5248598747a5dd70faa07c375167828fc5d3 Author: Linus Walleij Date: Fri Mar 9 14:23:19 2018 +0100 ARM: defconfig: Switch RealView boards to use P111 DRM The DRM driver is now finalized for the RealView board family, so switch the defconfig to use this driver instead of the old fbdev driver. Signed-off-by: Linus Walleij arch/arm/configs/realview_defconfig | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 6cfb67a0368f2dad76dd54e7c2229d1fd0cad5e2 Author: Linus Walleij Date: Fri Mar 9 14:21:55 2018 +0100 ARM: defconfig: Update RealView defconfig Just update with some new results from savedefconfig so we are in sync with what has happened in Kconfig upstream. Signed-off-by: Linus Walleij arch/arm/configs/realview_defconfig | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit e65857a64f69077ca95c79028a2e7f3b580fe19e Author: Linus Walleij Date: Wed Jan 24 16:09:24 2018 +0100 ARM: dts: Augment panel setting for Versatile This adds the actual VGA DAC bridge that is used in the Versatile AB, and sets the mode to 640x480 VGA. The "clcd" clock was incorrectly named, the proper name (from bindings) is "clcdclk". So far drivers survived by just getting the first clock, but future drivers will use named clocks. We add the panel connector to the "arm,versatile-tft-panel" as well, the signals actually fork on the board, reaching both the VGA DAC and the display connector. Cc: Mali DP Maintainers Reviewed-by: Liviu Dudau Signed-off-by: Linus Walleij arch/arm/boot/dts/versatile-ab.dts | 83 +++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 2 deletions(-) commit 7fbe5f7ff26704591bda411a3d44b73e37e4f201 Author: Linus Walleij Date: Fri Jan 26 09:50:55 2018 +0100 ARM: dts: Add Versatile IB2 device tree The Versatile board can be equipped with a interface board just named "IB2". This was created in the early 2000s for prototyping GSM candybar phone form factor products. The IB2 board contains: - Cascaded interrupt controller - Enfora Enabler GSM0308 quad-band module with antenna and separate audio jack - Keypad with joystick - Sanyo 2.5" color display - A 28-pin connector for mounting a camera This adds a DTS file for the combination of the Versatile AB with an IB2 daughterboard mounted, making the LED blink and making the system controller available for drivers, such as the panel driver. The device tree bindings already exist in Documentation/devicetree/bindings/arm/arm-boards. Cc: Mali DP Maintainers Reviewed-by: Liviu Dudau Signed-off-by: Linus Walleij arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/versatile-ab-ib2.dts | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) commit 6011a15d2261b3c326172347c74095a48c150b37 Author: Linus Walleij Date: Tue Jan 23 14:19:05 2018 +0100 ARM: dts: Augment VGA connector bridge on Realview PBX The PL111 in the ARM reference platforms are connected to "panels" that are actually dumb VGA DAC connector bridges. Now that we can support the proper bridges in the DRM driver, fix this up. Cc: Mali DP Maintainers Reviewed-by: Liviu Dudau Signed-off-by: Linus Walleij arch/arm/boot/dts/arm-realview-pbx.dtsi | 82 ++++++++++++++++++++++----------- 1 file changed, 55 insertions(+), 27 deletions(-) commit 83eca9f5eda6efff71515cb9c1a373b26d2d4c5b Author: Kuninori Morimoto Date: Mon Mar 19 07:50:48 2018 +0000 ASoC: twl6040: remove duplicated remove callback We don't need 2 .remove callback Fixes: 7480389fb0d8 ("ASoC: twl6040: replace codec to component") Reported-by: Julia Lawall Reported-by: kbuild test robot Signed-off-by: Kuninori Morimoto Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/codecs/twl6040.c | 1 - 1 file changed, 1 deletion(-) commit dfdc2488c324af6a794316b4831de6e3f20c65c9 Author: Linus Walleij Date: Tue Jan 23 14:02:00 2018 +0100 ARM: dts: Augment VGA connector bridge on Realview EB The PL111 in the ARM reference platforms are connected to "panels" that are actually dumb VGA DAC connector bridges. Now that we can support the proper bridges in the DRM driver, fix this up. Cc: Mali DP Maintainers Reviewed-by: Liviu Dudau Signed-off-by: Linus Walleij arch/arm/boot/dts/arm-realview-eb.dtsi | 64 +++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 24 deletions(-) commit 40d2677bdadbd221f3e398877586a30d8065140c Author: Bard Liao Date: Mon Mar 19 18:07:29 2018 +0800 ASoC: rt298: don't turn off HV and VREF if headset is detected "HV" and "VREF" will be powered up when jack type detection process is started and will be powered off when jack type detection process is finished. It will generate an unexpected interrupt signal when they are powered up during the capture process. Codec driver will do the jack type detection process and we can't capture properly before the jack detection process is finished. This patch will not power off the "HV" and "VREF" widgets if headset is detected and it will solve the unexpected interrupt issue. As a result, it will also solve the silence data captured at the beginning in headset mic recording issue. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt298.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 768d59f5d0139a6ff09e4430ec29cdc8b436421a Author: Stefan Agner Date: Mon Mar 19 23:16:22 2018 +0100 spi: rspi: use correct enum for DMA transfer direction Use enum dma_transfer_direction as required by dmaengine_prep_slave_sg instead of enum dma_data_direction. This won't change behavior in practice as the enum values are equivalent. This fixes two warnings when building with clang: drivers/spi/spi-rspi.c:538:26: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] rx->sgl, rx->nents, DMA_FROM_DEVICE, ^~~~~~~~~~~~~~~ drivers/spi/spi-rspi.c:558:26: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] tx->sgl, tx->nents, DMA_TO_DEVICE, ^~~~~~~~~~~~~ Signed-off-by: Stefan Agner Signed-off-by: Mark Brown drivers/spi/spi-rspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8153362e757a7b971aa73e7747bdc2ca2acbe84b Author: Bard Liao Date: Mon Mar 19 18:07:12 2018 +0800 ASoC: rt286: don't turn off HV and VREF if headset is detected "HV" and "VREF" will be powered up when jack type detection process is started and will be powered off when jack type detection process is finished. It will generate an unexpected interrupt signal when they are powered up during the capture process. Codec driver will do the jack type detection process and we can't capture properly before the jack detection process is finished. This patch will not power off the "HV" and "VREF" widgets if headset is detected and it will solve the unexpected interrupt issue. As a result, it will also solve the silence data captured at the beginning in headset mic recording issue. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt286.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 3088a5c7ad990b8ac2afb6dbfeae25c67392c6e9 Author: Linus Walleij Date: Tue Jan 23 13:32:09 2018 +0100 ARM: dts: Augment VGA connector bridge on PB1176 The PL111 in the ARM reference platforms are connected to "panels" that are actually dumb VGA DAC connector bridges. Now that we can support the proper bridges in the DRM driver, fix this up. Cc: Mali DP Maintainers Reviewed-by: Liviu Dudau Signed-off-by: Linus Walleij arch/arm/boot/dts/arm-realview-pb1176.dts | 66 +++++++++++++++++++------------ 1 file changed, 40 insertions(+), 26 deletions(-) commit 82089116a56ec9a0f608b34405c8bbd0e818b84f Author: Linus Walleij Date: Fri Sep 1 09:39:57 2017 +0200 ARM: dts: Augment VGA connector bridge on PB11MPcore The PL111 in the ARM reference platforms are connected to "panels" that are actually dumb VGA DAC connector bridges. Now that we can support the proper bridges in the DRM driver, fix this up. Cc: Mali DP Maintainers Reviewed-by: Liviu Dudau Signed-off-by: Linus Walleij arch/arm/boot/dts/arm-realview-pb11mp.dts | 78 +++++++++++++++++++++---------- 1 file changed, 53 insertions(+), 25 deletions(-) commit a01df75ce737951ad13a08d101306e88c3f57cb2 Author: James Kelly Date: Mon Mar 19 21:29:50 2018 +1100 ASoC: ssm2602: Replace reg_default_raw with reg_default SSM2602 driver is broken on recent kernels (at least since 4.9). User space applications such as amixer or alsamixer get EIO when attempting to access codec controls via the relevant IOCTLs. Root cause of these failures is the regcache_hw_init function in drivers/base/regmap/regcache.c, which prevents regmap cache initalization from the reg_defaults_raw element of the regmap_config structure when registers are write only. It also disables the regmap cache entirely when all registers are write only or volatile as is the case for the SSM2602 driver. Using the reg_defaults element of the regmap_config structure rather than the reg_defaults_raw element to initalize the regmap cache avoids the logic in the regcache_hw_init function entirely. It also makes this driver consistent with other ASoC codec drivers, as this driver was the ONLY codec driver that used the reg_defaults_raw element to initalize the cache. Tested on Digilent Zybo Z7 development board which has a SSM2603 codec chip connected to a Xilinx Zynq SoC. Signed-off-by: James Kelly Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/codecs/ssm2602.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 3e3511b3c8a5ff68ef7cd3dee8ac9dd9cfe4b2aa Author: Al Viro Date: Mon Mar 19 20:48:50 2018 -0400 sparc: get rid of sys_sparc_pipe() wrappers just use current_pt_regs() Signed-off-by: Al Viro arch/sparc/kernel/entry.S | 8 -------- arch/sparc/kernel/sys_sparc_32.c | 4 ++-- arch/sparc/kernel/sys_sparc_64.c | 4 ++-- arch/sparc/kernel/syscalls.S | 3 --- arch/sparc/kernel/systbls.h | 2 +- 5 files changed, 5 insertions(+), 16 deletions(-) commit c339f0e29ce9f9cd1cd2b6759a29a298bce1e948 Author: Jerome Brunet Date: Fri Mar 16 15:50:21 2018 +0100 ARM64: dts: meson-gx: make efuse read-only efuse is one time programmable, so it is safer to deny write request to this memory, unless the user is savvy enough to remove the read-only flag from DTB Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 1 + 1 file changed, 1 insertion(+) commit f842c41adc044e4586dd232c6e889f9d46180fa8 Author: Neil Armstrong Date: Mon Mar 12 12:17:40 2018 +0100 amlogic: meson-gx-socinfo: Update soc ids Updates the Amlogic Meson SoCs IDs for the Armv8 based SoCs. It includes the new families and packages. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman drivers/soc/amlogic/meson-gx-socinfo.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 97ac00930970bc9e3982182891e350ae1764fbb5 Author: Neil Armstrong Date: Mon Mar 12 12:10:21 2018 +0100 ARM64: dts: meson: bump mali450 clk to 744MHz The Mali-450 IP can run up to 744MHz, bump the frequency using the GP0 PLL clock. Cc: Michal Lazo Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 11 +++++++---- arch/arm64/boot/dts/amlogic/meson-gxl-mali.dtsi | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) commit f6b1a3a4a72e27234a02d9095080fc811848598c Author: Alexandre Belloni Date: Wed Feb 21 22:40:23 2018 +0100 parisc: time: stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it just before returning from the callback. Signed-off-by: Alexandre Belloni Acked-by: Helge Deller Signed-off-by: Alexandre Belloni arch/parisc/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bcde6582c908bc6567c9d38f7b000d199f7f009 Author: Srinivas Kandagatla Date: Sun Mar 18 14:44:01 2018 +0000 clk: qcom: rpmcc: Add support to XO buffered clocks XO is onchip buffer clock to generate 19.2MHz. This patch adds support to 5 XO buffer clocks found on PMIC8921, these buffer clocks can be controlled from external pin or in manual mode. Signed-off-by: Srinivas Kandagatla Signed-off-by: Stephen Boyd drivers/clk/qcom/clk-rpm.c | 79 +++++++++++++++++++++++++++++++++- include/dt-bindings/clock/qcom,rpmcc.h | 5 +++ 2 files changed, 83 insertions(+), 1 deletion(-) commit f72595cf441bb534e601c609b687451cc9143f13 Author: Weiyi Lu Date: Mon Mar 12 15:03:42 2018 +0800 clk: mediatek: update clock driver of MT2712 According to ECO design change, 1. add new clock mux data and change some 2. add new clock gate data and clock factor data 3. change status register offset of infra subsystem Signed-off-by: Weiyi Lu Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt2712.c | 69 +++++++++++++++++++++++++++++++-------- 1 file changed, 55 insertions(+), 14 deletions(-) commit 8465baaecafc3d5c5b209a571ffbcc12983216f8 Author: Weiyi Lu Date: Mon Mar 12 15:03:40 2018 +0800 dt-bindings: clock: add clocks for MT2712 add new clocks according to ECO design change Signed-off-by: Weiyi Lu Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd include/dt-bindings/clock/mt2712-clk.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit cef7b18c3e8bd709b6b4b7bb67ceca662aa5f60e Author: Jeffy Chen Date: Mon Mar 19 11:58:54 2018 +0800 clk: lpc32xx: Set name of regmap_config We are now allowing to register debugfs without a valid device, and not having a valid name will end up using "dummy*" to create debugfs dir. Signed-off-by: Jeffy Chen Acked-by: Vladimir Zapolskiy Signed-off-by: Stephen Boyd drivers/clk/nxp/clk-lpc32xx.c | 1 + 1 file changed, 1 insertion(+) commit dbb6d86415353980e312c64d12cd337b1abeee74 Author: Chen-Yu Tsai Date: Thu Mar 15 19:41:36 2018 +0800 ARM: dts: sun9i: cubieboard4: Enable VGA display output The Cubieboard4 has a dumb VGA DAC connected to the output of LCD0, providing VGA output through the onboard VGA connector. The DDC lines are connected to i2c3. The VGA DAC is a GM7123, which is compatible with Analog Devices' ADV7123, except it only takes 3.3V power, and has a lower standby power consumption. The datasheet found online lists "Chengdu GoldTel Electronical Technology Co., Ltd." as its designer. The company changed its name in 2014 to "Chengdu Corpro Technology Co., Ltd.". Their website lists similar ICs, but not actually the GM7123. Enable the display pipeline with the VGA DAC and connector, and i2c3 for DDC. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 68 +++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 02104704823f811e53e177dde9331f4c9373d1cd Author: Chen-Yu Tsai Date: Thu Mar 15 19:41:35 2018 +0800 ARM: dts: sun9i: Add pinmux settings for LCD0 RGB888 output. The A80 supports RGB888 with H/V sync from LCD0. Add a pinmux setting for the needed pins. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f1317774c62956edf188ce73412b1c7c0f5effb7 Author: Chen-Yu Tsai Date: Thu Mar 15 19:41:34 2018 +0800 ARM: dts: sun9i: Add device nodes for documented display pipelines for A80 The Allwinner A80 SoC has 3 display pipelines, of which some parts are documented: - 3x display front ends (FE), documented - 2x display enhancement units (DEU), undocumented - 3x display back ends (BE), documented - 2x dynamic range controller (DRC), undocumented - 2x LCDC/TCONs, documented - 1x LCDC/TCON, undocumented, and probably not useable - 1x HDMI transmitter, undocumented but DesignWare compatible - 1x MERGE block, function unknown This patch adds device nodes for the first 2 documented pipelines: FE0 - DEU0 - - BE0 - DRC0 - TCON0 x FE1 - DEU1 - - BE1 - DRC1 - TCON1 Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80.dtsi | 381 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 381 insertions(+) commit c916eb95bc2c607c560b8da1195ecd139e87aed0 Author: Harald Geyer Date: Thu Mar 15 16:25:10 2018 +0000 arm64: dts: allwinner: a64: Add support for TERES-I laptop The TERES-I is an open hardware laptop built by Olimex using the Allwinner A64 SoC. Add the board specific .dts file, which includes the A64 .dtsi and enables the peripherals that we support so far. Signed-off-by: Harald Geyer Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/Makefile | 1 + .../boot/dts/allwinner/sun50i-a64-teres-i.dts | 265 +++++++++++++++++++++ 2 files changed, 266 insertions(+) commit c1cff65f9b16b31e731e2e75bbe06638c86e1996 Author: Harald Geyer Date: Thu Mar 15 16:25:08 2018 +0000 arm64: dts: allwinner: a64: add simplefb for A64 SoC The A64 SoC features two display pipelines, one has a LCD output, the other has a HDMI output. Add support for simplefb for the LCD output. Tested on Teres I. This patch was inspired by work of Icenowy Zheng. Signed-off-by: Harald Geyer Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit d41850437c364ef7aba9bc25c1c701699d0240e0 Author: Harald Geyer Date: Thu Mar 15 16:25:07 2018 +0000 arm64: dts: allwinner: a64: Add watchdog Add a watchdog node for the A64, automatically enabled on all boards. Since the device is compatible with an existing driver, we only reserve a new compatible string to be used together with the fall back. Tested on Olimex Teres-I. Signed-off-by: Harald Geyer Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 6 ++++-- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) commit 11239fe6a06e38a58de61d6d798afd014e770a01 Author: Harald Geyer Date: Thu Mar 15 16:25:06 2018 +0000 arm64: dts: allwinner: a64: Add i2c0 pins Add the proper pin group node to reference in board files. Reviewed-by: Andre Przywara Signed-off-by: Harald Geyer Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 494d836762e0ede6d0bf28ca89ccba786eeb65c5 Author: Icenowy Zheng Date: Fri Mar 16 22:02:15 2018 +0800 arm64: allwinner: h6: add support for Pine H64 board Pine H64 is an Allwinner H6-based SBC from Pine64, with the following features: - 1GiB/2GiB/4GiB LPDDR3 DRAM (in 4GiB situation only 3GiB is accessible) - AXP805 PMIC - Raspberry-Pi-compatible GPIO header, "Euler" GPIO header (not compatible with the "Euler" on Pine A64) and "Expansion" pin header - 2 USB 2.0 ports and 1 USB 3.0 ports - Audio jack - MicroSD slot and eMMC module slot - on-board SPI NOR flash - 1Gbps Ethernet port (via RTL8211E PHY) - HDMI port Adds initial support for it, including the UART on the Expansion pin header. Signed-off-by: Icenowy Zheng Reviewed-by: Andre Przywara Tested-by: Andre Przywara Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/Makefile | 1 + .../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 29 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) commit e54be32d0273e1b3a9b8c77c59b5c4ad73d21884 Author: Icenowy Zheng Date: Fri Mar 16 22:02:14 2018 +0800 arm64: allwinner: h6: add the basical Allwinner H6 DTSI file Allwinner H6 is a new SoC with Cortex-A53 cores from Allwinner, with its memory map fully reworked and some high-speed peripherals (PCIe, USB 3.0) introduced. This commit adds the basical DTSI file of it, including the clock support and UART support. Signed-off-by: Icenowy Zheng Reviewed-by: Andre Przywara Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 175 +++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) commit ddc389f5a4abb4c0c91202cd6dc09a28b9e2d82c Author: Maxime Ripard Date: Thu Mar 1 20:18:46 2018 +0100 drm/sun4i: backend: Support YUV planes Now that we have the guarantee that we will have only a single YUV plane, actually support them. The way it works is not really straightforward, since we first need to enable the YUV mode in the plane that we want to setup, and then we have a few registers to setup the YUV buffer and parameters. We also need to setup the color correction to actually have something displayed. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/66088c1398bd3189123f28a89a7ccc669fe9f296.1519931807.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/sun4i/sun4i_backend.c | 98 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/sun4i/sun4i_backend.h | 17 ++++++ drivers/gpu/drm/sun4i/sun4i_layer.c | 4 ++ 3 files changed, 119 insertions(+) commit 1f9c63e8de3d7b377c9d74e4a17524cfb60e6384 Author: Shawn Lin Date: Wed Mar 14 08:28:31 2018 +0800 clk: Don't show the incorrect clock phase It's found that the clock phase output from clk_summary is wrong compared to the actual phase reading from the register. cat /sys/kernel/debug/clk/clk_summary | grep sdio_sample sdio_sample 0 1 0 50000000 0 -22 It exposes an issue that clk core, clk_core_get_phase, always returns the cached core->phase which should be either updated by calling clk_set_phase or directly from the first place the clk was registered. When registering the clk, the core->phase geting from ->get_phase() may return negative value indicating error. This is quite common since the clk's phase may be highly related to its parent chain, but it was temporarily orphan when registered, since its parent chains hadn't be ready at that time, so the clk drivers decide to return error in this case. However, if no clk_set_phase is called or maybe the ->set_phase() isn't even implemented, the core->phase would never be updated. This is wrong, and we should try to update it when all its parent chains are settled down, like the way of updating clock rate for that. But it's not deserved to complicate the code now and just update it anyway when calling clk_core_get_phase, which would be much simple and enough. Signed-off-by: Shawn Lin Acked-by: Jerome Brunet Signed-off-by: Stephen Boyd drivers/clk/clk.c | 3 +++ 1 file changed, 3 insertions(+) commit 6a4a4595804548e173f0763a0e7274a3521c59a9 Author: Richard Genoud Date: Tue Mar 13 16:27:02 2018 +0100 clk: mvebu: armada-38x: add support for missing clocks Clearfog boards can come with a CPU clocked at 1600MHz (commercial) or 1333MHz (industrial). They have also some dip-switches to select a different clock (666, 800, 1066, 1200). The funny thing is that the recovery button is on the MPP34 fq selector. So, when booting an industrial board with this button down, the frequency 666MHz is selected (and the kernel didn't boot). This patch add all the missing clocks. The only mode I didn't test is 2GHz (uboot found 4294MHz instead :/ ). Fixes: 0e85aeced4d6 ("clk: mvebu: add clock support for Armada 380/385") Cc: # 3.16.x: 9593f4f56cf5: clk: mvebu: armada-38x: add support for 1866MHz variants Cc: # 3.16.x Signed-off-by: Richard Genoud Acked-by: Gregory CLEMENT Signed-off-by: Stephen Boyd drivers/clk/mvebu/armada-38x.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 2e838e7f3a8979f9f323214dccb9263fde526b11 Author: Mike Looijmans Date: Tue Mar 13 09:54:03 2018 +0100 clk: clk-gpio: Allow GPIO to sleep in set/get_parent When changing or retrieving clock parents, the caller is in a sleepable state (like prepare) so the GPIO operation need not be atomic. Replace gpiod_{g|s}et_value with gpiod_{g|s}et_value_cansleep in the {g|s}et_parent calls for the GPIO based clock mux. This fixes a "slowpath" warning when the GPIO controller is an I2C expander or something similar. Signed-off-by: Mike Looijmans Signed-off-by: Stephen Boyd drivers/clk/clk-gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3a49afb84ca074ea4cc537e80d50ee8e5484e7cd Author: Riku Voipio Date: Mon Mar 12 12:49:45 2018 +0200 clk: enable hi655x common clk automatically Without COMMON_CLK_HI655X Wifi and bluetooth are non-functional on Hikey. As suggested by Arnd, enable the driver automatically when the parent driver is selected. With sensible defaults in place, we can leave other choices for EXPERT. Cc: John Stultz Cc: Wei Xu Cc: Daniel Lezcano Suggested-by: Arnd Bergmann Signed-off-by: Riku Voipio Reviewed-by: Ulf Hansson Signed-off-by: Stephen Boyd drivers/clk/Kconfig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit da32d3539fca54f36f6069fafe6ee0e4bc7117d0 Author: Benjamin Gaignard Date: Mon Mar 12 10:32:48 2018 +0100 clk: stm32: add configuration flags for each of the stm32 drivers Add two configuration flags to be able to not compile all the time stm32f and stm32h7 drivers when ARCH_STM32 is set. That help to save some space on those small platforms. Signed-off-by: Benjamin Gaignard Acked-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/Kconfig | 14 ++++++++++++++ drivers/clk/Makefile | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) commit f9acf1057d5bfe56fcc0b8ee36787223ed3fc8be Author: Patrice Chotard Date: Mon Mar 12 10:04:07 2018 +0100 clk: stm32: Add clk entry for SDMMC2 on stm32F769 STM32F769 has 2 SDMMC port, add clock entry for the second one. Signed-off-by: Alexandre TORGUE Signed-off-by: Patrice Chotard Signed-off-by: Stephen Boyd drivers/clk/clk-stm32f4.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 185899ee8d00460a305e07ed2df178dbf7455227 Author: Matan Barak Date: Mon Mar 19 15:02:40 2018 +0200 IB/uverbs: Enable ioctl() uAPI by default for new verbs Enable the ioctl() uAPI for IB by default if the standard write() uAPI (INFINIBAND_USER_ACCESS) is enabled. Verbs that are also available under the old write() uAPI are put inside a new INFINIBAND_EXP_LEGACY_VERBS_NEW_UAPI Kconfig. Reviewed-by: Yishai Hadas Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/Kconfig | 11 +++++------ drivers/infiniband/core/uverbs_main.c | 4 ---- drivers/infiniband/core/uverbs_std_types_cq.c | 2 ++ 3 files changed, 7 insertions(+), 10 deletions(-) commit 3d64addd435997a445d201fcbbde2fa753709971 Author: Matan Barak Date: Mon Mar 19 15:02:39 2018 +0200 IB/uverbs: Add macros to simplify adding driver specific attributes Previously, adding driver specific attributes required drivers to declare all the hierarchy - object tree, object, methods and the attributes themselves. A common use case is adding a few attributes to an existing common method. In order to simplify the driver's code, we add some macros to do all these declarations automatically. Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe include/rdma/uverbs_named_ioctl.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 41b2a71fc848e200e023b7ccd502c3b96714248d Author: Matan Barak Date: Mon Mar 19 15:02:38 2018 +0200 IB/uverbs: Move ioctl path of create_cq and destroy_cq to a new file Currently, all objects are declared in uverbs_std_types. This could lead to a huge file once we implement all objects, methods and handlers. Moving each object to its own file to keep the files smaller and more readable. uverbs_std_types.c will only contain the parsing tree definition and objects without any methods. Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/Makefile | 2 +- drivers/infiniband/core/uverbs.h | 3 + drivers/infiniband/core/uverbs_std_types.c | 179 +--------------------- drivers/infiniband/core/uverbs_std_types_cq.c | 208 ++++++++++++++++++++++++++ include/rdma/uverbs_ioctl.h | 2 + 5 files changed, 217 insertions(+), 177 deletions(-) commit dfb1395573c8726353f8cca1c123b46292d18822 Author: Matan Barak Date: Mon Mar 19 15:02:37 2018 +0200 IB/uverbs: Expose parsing tree of all common objects to providers The ioctl() based uverbs is based on merging feature trees. This teaches the generic parser how to parse methods according to the provider's support. In order to support merging with the common objects, exporting the common-object-tree to the provider drivers. Reviewed-by: Yishai Hadas Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs.h | 15 +++++++++++++ drivers/infiniband/core/uverbs_std_types.c | 34 ++++++++++++++++++------------ include/rdma/uverbs_std_types.h | 23 ++------------------ 3 files changed, 37 insertions(+), 35 deletions(-) commit c66db31113948ba61682f55265df8d032e793fcc Author: Matan Barak Date: Mon Mar 19 15:02:36 2018 +0200 IB/uverbs: Safely extend existing attributes Previously, we've used UVERBS_ATTR_SPEC_F_MIN_SZ for extending existing attributes. The behavior of this flag was the kernel accepts anything bigger than the minimum size it specified. This is unsafe, since in order to safely extend an attribute, we need to make sure unknown size is zeroed. Replacing UVERBS_ATTR_SPEC_F_MIN_SZ with UVERBS_ATTR_SPEC_F_MIN_SZ_OR_ZERO, which essentially checks that the unknown size is zero. In addition, attributes are now decorated with UVERBS_ATTR_TYPE and UVERBS_ATTR_STRUCT, so we can provide the minimum and known length. Users of this flag needs to use copy_from_or_zero functions/macros. Reviewed-by: Yishai Hadas Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs_ioctl.c | 26 +++++++++- drivers/infiniband/core/uverbs_ioctl_merge.c | 2 +- drivers/infiniband/core/uverbs_std_types.c | 20 +++++--- include/rdma/ib_verbs.h | 13 +++-- include/rdma/uverbs_ioctl.h | 74 ++++++++++++++++++++++------ 5 files changed, 104 insertions(+), 31 deletions(-) commit 1f07e08fab2e895c68d4eb5a519c36be75a12078 Author: Matan Barak Date: Mon Mar 19 15:02:35 2018 +0200 IB/uverbs: Enable compact representation of uverbs_attr_spec Downstream patches extend uverbs_attr_spec with new fields. In order to save space, we move the type and flags fields to the various attribute flavors contained in the union. Reviewed-by: Yishai Hadas Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs_ioctl.c | 4 ++-- include/rdma/uverbs_ioctl.h | 34 ++++++++++++++++++++++------------ 2 files changed, 24 insertions(+), 14 deletions(-) commit 0ede73bc012c98fba244b33efbc42e48dd23ee9a Author: Matan Barak Date: Mon Mar 19 15:02:34 2018 +0200 IB/uverbs: Extend uverbs_ioctl header with driver_id Extending uverbs_ioctl header with driver_id and another reserved field. driver_id should be used in order to identify the driver. Since every driver could have its own parsing tree, this is necessary for strace support. Downstream patches take off the EXPERIMENTAL flag from the ioctl() IB support and thus we add some reserved fields for future usage. Reviewed-by: Yishai Hadas Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs_ioctl.c | 5 ++++- drivers/infiniband/hw/bnxt_re/main.c | 1 + drivers/infiniband/hw/cxgb3/iwch_provider.c | 1 + drivers/infiniband/hw/cxgb4/provider.c | 1 + drivers/infiniband/hw/hfi1/verbs.c | 2 +- drivers/infiniband/hw/hns/hns_roce_main.c | 1 + drivers/infiniband/hw/i40iw/i40iw_verbs.c | 1 + drivers/infiniband/hw/mlx4/main.c | 1 + drivers/infiniband/hw/mlx5/main.c | 1 + drivers/infiniband/hw/mthca/mthca_provider.c | 1 + drivers/infiniband/hw/nes/nes_verbs.c | 1 + drivers/infiniband/hw/ocrdma/ocrdma_main.c | 1 + drivers/infiniband/hw/qedr/main.c | 1 + drivers/infiniband/hw/qib/qib_verbs.c | 2 +- drivers/infiniband/hw/usnic/usnic_ib_main.c | 1 + drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 1 + drivers/infiniband/sw/rdmavt/vt.c | 3 ++- drivers/infiniband/sw/rxe/rxe_verbs.c | 1 + include/rdma/ib_verbs.h | 2 ++ include/rdma/rdma_vt.h | 2 +- include/uapi/rdma/rdma_user_ioctl_cmds.h | 24 +++++++++++++++++++++++- 21 files changed, 48 insertions(+), 6 deletions(-) commit 1f7ff9d5d36ae11356012a136f2d495cca910a5f Author: Matan Barak Date: Mon Mar 19 15:02:33 2018 +0200 IB/uverbs: Move to new headers and make naming consistent Use macros to make names consistent in ioctl() uAPI: The ioctl() uAPI works with object-method hierarchy. The method part also states which handler should be executed when this method is called from user-space. Therefore, we need to tie method, method's id, method's handler and the object owning this method together. Previously, this was done through explicit developer chosen names. This makes grepping the code harder. Changing the method's name, method's handler and object's name to be automatically generated based on the ids. The headers are split in a way so they be included and used by user-space. One header strictly contains structures that are used directly by user-space applications, where another header is used for internal library (i.e. libibverbs) to form the ioctl() commands. Other header simply contains the required general command structure. Reviewed-by: Yishai Hadas Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs.h | 3 + drivers/infiniband/core/uverbs_cmd.c | 118 +++++++++---------- drivers/infiniband/core/uverbs_std_types.c | 176 +++++++++++++++-------------- include/rdma/uverbs_ioctl.h | 1 + include/rdma/uverbs_named_ioctl.h | 59 ++++++++++ include/rdma/uverbs_std_types.h | 41 +++---- include/uapi/rdma/ib_user_ioctl_cmds.h | 83 ++++++++++++++ include/uapi/rdma/ib_user_ioctl_verbs.h | 53 +-------- include/uapi/rdma/rdma_user_ioctl.h | 38 +------ include/uapi/rdma/rdma_user_ioctl_cmds.h | 71 ++++++++++++ 10 files changed, 396 insertions(+), 247 deletions(-) commit 2f05b6b9208470fdd842a362135809df09834208 Author: Gabriel Fernandez Date: Fri Mar 9 07:57:31 2018 +0100 clk: stm32: Add DSI clock for STM32F469 Board This patch adds DSI clock for STM32F469 board Signed-off-by: Gabriel Fernandez Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd drivers/clk/clk-stm32f4.c | 11 ++++++++++- include/dt-bindings/clock/stm32fx-clock.h | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) commit fa6f3985056eb70ecd8051e560b726495cd1ddf0 Author: Gabriel Fernandez Date: Fri Mar 9 07:57:30 2018 +0100 clk: stm32: END_PRIMARY_CLK should be declare after CLK_SYSCLK Update of END_PRIMARY_CLK was missed, it should be after CLK_SYSCLK hsi and sysclk are overwritten by gpioa and gpiob. Signed-off-by: Gabriel Fernandez Tested-by: Philippe Cornu Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd include/dt-bindings/clock/stm32fx-clock.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit afeb079bc8d8331a18c5371519279682f563f4bf Author: Katsuhiro Suzuki Date: Thu Mar 8 17:23:32 2018 +0900 clk: uniphier: add Pro4/Pro5/PXs2 audio system clock Add clock for audio subsystem (AIO) on UniPhier Pro4/Pro5/PXs2 SoCs. Signed-off-by: Katsuhiro Suzuki Acked-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-sys.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 9cb12501f38f924567ea7ba10041d32ecd7bf809 Author: Ryder Lee Date: Tue Mar 6 17:09:30 2018 +0800 dt-bindings: clock: mediatek: add audsys support for MT2701 This patch adds a compatible string for MT2701. Signed-off-by: Ryder Lee Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt | 1 + 1 file changed, 1 insertion(+) commit 2817a92dd90ab8c53f2c03b7c4d5f8590ee36940 Author: Ryder Lee Date: Tue Mar 6 17:09:29 2018 +0800 dt-bindings: clock: mediatek: update audsys documentation to adapt MFD device The MediaTek audio hardware block that exposes functionalities that are handled by separate subsystems in the kernel. These functions are all mapped somewhere at 0x112xxxxx, and there are some control bits are mixed up with other functions within the same registers. This patch modifies example to illustrate child nodes. Signed-off-by: Ryder Lee Signed-off-by: Stephen Boyd .../bindings/arm/mediatek/mediatek,audsys.txt | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 936ceb12c5f72cd087149e3cf01347969a472801 Author: Ryder Lee Date: Tue Mar 6 17:09:26 2018 +0800 clk: mediatek: update missing clock data for MT7622 audsys Add missing clock data 'CLK_AUDIO_AFE_CONN' for MT7622 audsys. Signed-off-by: Ryder Lee Reviewed-by: Rob Herring Reviewed-by: Matthias Brugger Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt7622-aud.c | 1 + include/dt-bindings/clock/mt7622-clk.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 9258a2d5cd9577ce3175fbb64d6ccd0a77cf6fa7 Author: Jeff Layton Date: Fri Mar 16 09:47:22 2018 -0400 nfsd: move nfs4_client allocation to dedicated slabcache On x86_64, it's 1152 bytes, so we can avoid wasting 896 bytes each. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 9d7ed1355db5b00b9f9f4c333fc2b1825b0db25a Author: J. Bruce Fields Date: Thu Mar 8 15:49:48 2018 -0500 nfsd: don't require low ports for gss requests In a traditional NFS deployment using auth_unix, the clients are trusted to correctly report the credentials of their logged-in users. The server assumes that only root on client machines is allowed to send requests from low-numbered ports, so it can use the originating port number to distinguish "real" NFS clients from NFS clients run by ordinary users, to prevent ordinary users from spoofing credentials. The originating port number on a gss-authenticated request is less important. The authentication ties the request to a user, and we take it as proof that that user authorized the request. The low port number check no longer adds much. So, don't enforce low port numbers in the auth_gss case. Reviewed-by: Chuck Lever Signed-off-by: J. Bruce Fields fs/nfsd/nfsfh.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit edcc8452a05ffd2d2c8574905660c9c2572af075 Author: J. Bruce Fields Date: Wed Mar 7 15:37:35 2018 -0500 nfsd: remove unsused "cp_consecutive" field Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 1 - fs/nfsd/nfs4xdr.c | 4 ++-- fs/nfsd/xdr4.h | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) commit 554faf28198803cb58ff79a2c4891bc42d523438 Author: Colin Ian King Date: Wed Feb 7 10:29:47 2018 +0000 lockd: make nlm_ntf_refcnt and nlm_ntf_wq static The variables nlm_ntf_refcnt and nlm_ntf_wq are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: fs/lockd/svc.c:60:10: warning: symbol 'nlm_ntf_refcnt' was not declared. Should it be static? fs/lockd/svc.c:61:1: warning: symbol 'nlm_ntf_wq' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: J. Bruce Fields fs/lockd/svc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd2decac5e8ab7b326f54b40e3ac8b3b1ac935ed Author: Jeff Layton Date: Thu Feb 15 15:16:18 2018 -0500 nfsd4: send the special close_stateid in v4.0 replies as well We already send it for v4.1, but RFC7530 also notes that the stateid in the close reply is bogus. Always send the special close stateid, even in v4.0 responses. No client should put any meaning on it whatsoever. For now, we continue to increment the stateid value, though that might not be necessary either. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 3b68e6ee3cbd4a474bcc7d2ac26812f86cdf333d Author: NeilBrown Date: Wed Feb 14 12:15:06 2018 +1100 SUNRPC: cache: ignore timestamp written to 'flush' file. The interface for flushing the sunrpc auth cache was poorly designed and has caused problems a number of times. The design is that you write a timestamp, and all entries created before that time are discarded. The most obvious problem is that this is not what people actually want. They want to just flush the whole cache. The 1-second granularity can be a problem, as can the use of wall-clock time. A current problem is that code will write the current time to this file - expecting it to clear everything - and if the seconds number ticks over before this timestamp is checked, the test "then >= now" fails, and a full flush isn't forced. So lets just drop the subtleties and always flush the whole cache. The worst this could do is impose an extra cost refilling it, but that would require someone to be using non-standard tools. We still report an error if the string written is not a number, but we cause any valid number to flush the whole cache. Reported-by: "Wang, Alan 1. (NSB - CN/Hangzhou)" Signed-off-by: NeilBrown Signed-off-by: J. Bruce Fields net/sunrpc/cache.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 90a9b1473df72a8b356e7ad6c9b9c9608927b103 Author: James Ettle Date: Sun Jan 28 20:34:16 2018 +0000 sunrpc: Fix unaligned access on sparc64 Fix unaligned access in gss_{get,verify}_mic_v2() on sparc64 Signed-off-by: James Ettle Signed-off-by: J. Bruce Fields net/sunrpc/auth_gss/gss_krb5_seal.c | 5 ++++- net/sunrpc/auth_gss/gss_krb5_unseal.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) commit 89cd7aec21af26fd0c117bfc4bfc781724f201de Author: Sean Wang Date: Thu Mar 1 11:27:51 2018 +0800 clk: mediatek: fix PWM clock source by adding a fixed-factor clock The clock for which all PWM devices on MT7623 or MT2701 actually depending on has to be divided by four from its parent clock axi_sel in the clock path prior to PWM devices. Consequently, adding a fixed-factor clock axisel_d4 as one-fourth of clock axi_sel allows that PWM devices can have the correct resolution calculation. Cc: stable@vger.kernel.org Fixes: e9862118272a ("clk: mediatek: Add MT2701 clock support") Signed-off-by: Sean Wang Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt2701.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 55a5fcafe3a94e8a0777bb993d09107d362258d2 Author: Sean Wang Date: Thu Mar 1 11:27:50 2018 +0800 dt-bindings: clock: mediatek: add binding for fixed-factor clock axisel_d4 Just add binding for a fixed-factor clock axisel_d4, which would be referenced by PWM devices on MT7623 or MT2701 SoC. Cc: stable@vger.kernel.org Fixes: 1de9b21633d6 ("clk: mediatek: Add dt-bindings for MT2701 clocks") Signed-off-by: Sean Wang Reviewed-by: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Stephen Boyd include/dt-bindings/clock/mt2701-clk.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d48ce3e5ba741428ed38a665a3c6b41e6cd999be Merge: 318df9f ae30727 Author: Daniel Borkmann Date: Mon Mar 19 21:14:42 2018 +0100 Merge branch 'bpf-sockmap-ulp' John Fastabend says: ==================== This series adds a BPF hook for sendmsg and senfile by using the ULP infrastructure and sockmap. A simple pseudocode example would be, // load the programs bpf_prog_load(SOCKMAP_TCP_MSG_PROG, BPF_PROG_TYPE_SK_MSG, &obj, &msg_prog); // lookup the sockmap bpf_map_msg = bpf_object__find_map_by_name(obj, "my_sock_map"); // get fd for sockmap map_fd_msg = bpf_map__fd(bpf_map_msg); // attach program to sockmap bpf_prog_attach(msg_prog, map_fd_msg, BPF_SK_MSG_VERDICT, 0); // Add a socket 'fd' to sockmap at location 'i' bpf_map_update_elem(map_fd_msg, &i, fd, BPF_ANY); After the above snippet any socket attached to the map would run msg_prog on sendmsg and sendfile system calls. Three additional helpers are added bpf_msg_apply_bytes(), bpf_msg_cork_bytes(), and bpf_msg_pull_data(). With bpf_msg_apply_bytes BPF programs can tell the infrastructure how many bytes the given verdict should apply to. This has two cases. First, a BPF program applies verdict to fewer bytes than in the current sendmsg/sendfile msg this will apply the verdict to the first N bytes of the message then run the BPF program again with data pointers recalculated to the N+1 byte. The second case is the BPF program applies a verdict to more bytes than the current sendmsg or sendfile system call. In this case the infrastructure will cache the verdict and apply it to future sendmsg/sendfile calls until the byte limit is reached. This avoids the overhead of running BPF programs on large payloads. The helper bpf_msg_cork_bytes() handles a different case where a BPF program can not reach a verdict on a msg until it receives more bytes AND the program doesn't want to forward the packet until it is known to be "good". The example case being a user (albeit a dumb one probably) sends a N byte header in 1B system calls. The BPF program can call bpf_msg_cork_bytes with the required byte limit to reach a verdict and then the program will only be called again once N bytes are received. The last helper added in this series is bpf_msg_pull_data(). It is used to pull data in for modification or reading. Similar to how sk_pull_data() works msg_pull_data can be used to access data not in the initial (data_start, data_end) range. For sendpage() calls this is needed if any data is accessed because the BPF sendpage hook initializes the data_start and data_end pointers to zero. We do this because sendpage data is shared with the user and can be modified during or after the BPF verdict possibly invalidating any verdict the BPF program decides. For sendmsg the data is already copied by the sendmsg bpf infrastructure so we only copy the data if the user request a data range that is not already linearized. This happens if the user requests larger blocks of data that are not in a single scatterlist element. The common case seems to be accessing headers which normally are in the first scatterlist element and already linearized. For more examples please review the sample program. There are examples for all the actions and helpers there. Patches 1-8 implement the above sockmap/BPF infrastructure. The remaining patches flush out some minimal selftests and the sample sockmap program. The sockmap sample program is the main vehicle for testing this infrastructure and will be moved into selftests shortly. The final patch in this series is a simple shell script to run a set of tests. These are the tests I run after any changes to sockmap. The next task on the list after this series is to push those into selftests so we can avoid manually testing. Couple notes on future items in the pipeline, 0. move sample sockmap programs into selftests (noted above) 1. add additional support for tcp flags, most are ignored now. 2. add a Documentation/bpf/sockmap file with these details 3. support stacked ULP types to allow this and ktls to cooperate 4. Ingress flag support, redirect only supports egress here. The other redirect helpers support ingress and egress flags. 5. add optimizations, I cut a few optimizations here in the first iteration of the code for later study/implementation -v3 updates : u32 data pointers in msg_md changed to void * : page_address NULL check and flag verification in msg_pull_data : remove old note in commit msg that is no longer relevant : remove enum sk_msg_action its not used anywhere : fixup test_verifier W -> DW insn to account for data pointers : unintentionally dropped a smap_stop_tx() call in sockmap.c I propagated the ACKs forward because above changes were small one/two line changes. -v2 updates (discussion): Dave noticed that sendpage call was previously (in v1) running on the data directly. This allowed users to potentially modify the data after or during the BPF program. However doing a copy automatically even if the data is not accessed has measurable performance impact. So we added another helper modeled after the existing skb_pull_data() helper to allow users to selectively pull data from the msg. This is also useful in the sendmsg case when users need to access data outside the first scatterlist element or across scatterlist boundaries. While doing this I also unified the sendmsg and sendfile handlers a bit. Originally the sendfile call was optimized for never touching the data. I've decided for a first submission to drop this optimization and we can add it back later. It introduced unnecessary complexity, at least for a first posting, for a use case I have not entirely flushed out yet. When the use case is deployed we can add it back if needed. Then we can review concrete performance deltas as well on real-world use-cases/applications. Lastly, I reorganized the patches a bit. Now all sockmap changes are in a single patch and each helper gets its own patch. This, at least IMO, makes it easier to review because sockmap changes are not spread across the patch series. On the other hand now apply_bytes, cork_bytes logic is only activated later in the series. But that should be OK. ==================== Signed-off-by: Daniel Borkmann commit ae30727fa4beabd8403b016896eb1f714e6c0fd4 Author: John Fastabend Date: Sun Mar 18 12:58:17 2018 -0700 bpf: sockmap test script This adds the test script I am currently using to validate the latest sockmap changes. Shortly sockmap will be ported to selftests and these will be run from the infrastructure there. Until then add the script here so we have a coverage checklist when porting into selftests. Signed-off-by: John Fastabend Acked-by: David S. Miller Signed-off-by: Daniel Borkmann samples/sockmap/sockmap_test.sh | 450 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 450 insertions(+) commit 0dcbbf6785799ba05b44df2ba6bcc1195f4f945c Author: John Fastabend Date: Sun Mar 18 12:58:12 2018 -0700 bpf: sockmap sample test for bpf_msg_pull_data This adds an option to test the msg_pull_data helper. This uses two options txmsg_start and txmsg_end to let the user specify start and end bytes to pull. The options can be used with txmsg_apply, txmsg_cork options as well as with any of the basic tests, txmsg, txmsg_redir and txmsg_drop (plus noisy variants) to run pull_data inline with those tests. By giving user direct control over the variables we can easily do negative testing as well as positive tests. Signed-off-by: John Fastabend Acked-by: David S. Miller Signed-off-by: Daniel Borkmann samples/sockmap/sockmap_kern.c | 79 +++++++++++++++++++++++++------ samples/sockmap/sockmap_user.c | 32 +++++++++++++ tools/include/uapi/linux/bpf.h | 3 +- tools/testing/selftests/bpf/bpf_helpers.h | 2 + 4 files changed, 101 insertions(+), 15 deletions(-) commit e6373ce70a01292424a118d9457d927349dad51d Author: John Fastabend Date: Sun Mar 18 12:58:07 2018 -0700 bpf: sockmap add SK_DROP tests Add tests for SK_DROP. Signed-off-by: John Fastabend Acked-by: David S. Miller Signed-off-by: Daniel Borkmann samples/sockmap/sockmap_kern.c | 15 ++++++++++ samples/sockmap/sockmap_user.c | 62 +++++++++++++++++++++++++++++++----------- 2 files changed, 61 insertions(+), 16 deletions(-) commit 468b3fdea8826b232a570d95ba45272eb38919cb Author: John Fastabend Date: Sun Mar 18 12:58:02 2018 -0700 bpf: sockmap sample support for bpf_msg_cork_bytes() Add sample application support for the bpf_msg_cork_bytes helper. This lets the user specify how many bytes each verdict should apply to. Similar to apply_bytes() tests these can be run as a stand-alone test when used without other options or inline with other tests by using the txmsg_cork option along with any of the basic tests txmsg, txmsg_redir, txmsg_drop. Signed-off-by: John Fastabend Acked-by: David S. Miller Signed-off-by: Daniel Borkmann samples/sockmap/sockmap_kern.c | 53 ++++++++++++++++++++++++++----- samples/sockmap/sockmap_user.c | 19 +++++++++++ tools/include/uapi/linux/bpf.h | 3 +- tools/testing/selftests/bpf/bpf_helpers.h | 2 ++ 4 files changed, 68 insertions(+), 9 deletions(-) commit 1c16c3126ac938562a68ab7041fe74ce0de53166 Author: John Fastabend Date: Sun Mar 18 12:57:56 2018 -0700 bpf: sockmap, add sample option to test apply_bytes helper This adds an option to test the apply_bytes helper. This option lets the user specify an int on the command line specifying how much data each verdict should apply to. When this is set a map entry is set with the bytes input by the user and then the specified program --txmsg or --txmsg_redir will use the value and set the applied data. If no other option is set then a default --txmsg_apply program is run. This program will drop pkts if an error is detected on the bytes map lookup. Useful to verify the map lookup and apply helper are working and causing a hard error if it is not. Signed-off-by: John Fastabend Acked-by: David S. Miller Signed-off-by: Daniel Borkmann samples/sockmap/sockmap_kern.c | 54 +++++++++++++++++++++++++++---- samples/sockmap/sockmap_user.c | 19 ++++++++++- tools/testing/selftests/bpf/bpf_helpers.h | 3 +- 3 files changed, 68 insertions(+), 8 deletions(-) commit 6bce9d2ca65238d37890186bf41acd7f7d9a9820 Author: John Fastabend Date: Sun Mar 18 12:57:51 2018 -0700 bpf: sockmap sample, add data verification option To verify data is not being dropped or corrupted this adds an option to verify test-patterns on recv. Signed-off-by: John Fastabend Acked-by: David S. Miller Signed-off-by: Daniel Borkmann samples/sockmap/sockmap_user.c | 118 +++++++++++++++++++++++++++++------------ 1 file changed, 84 insertions(+), 34 deletions(-) commit e67463cb5d9345d762aa7325e58aaeff5bc68ee1 Author: John Fastabend Date: Sun Mar 18 12:57:46 2018 -0700 bpf: sockmap sample, add sendfile test To exercise TX ULP sendpage implementation we need a test that does a sendfile. Add sendfile test option here. Signed-off-by: John Fastabend Acked-by: David S. Miller Signed-off-by: Daniel Borkmann samples/sockmap/sockmap_user.c | 70 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 10 deletions(-) commit 4c4c3c276c099f265c8b11e0132ce826ee718e2c Author: John Fastabend Date: Sun Mar 18 12:57:41 2018 -0700 bpf: sockmap sample, add option to attach SK_MSG program Add sockmap option to use SK_MSG program types. Signed-off-by: John Fastabend Acked-by: David S. Miller Signed-off-by: Daniel Borkmann samples/bpf/bpf_load.c | 8 +++- samples/sockmap/sockmap_kern.c | 52 ++++++++++++++++++++++++ samples/sockmap/sockmap_user.c | 67 ++++++++++++++++++++++++++++--- tools/include/uapi/linux/bpf.h | 13 +++++- tools/lib/bpf/libbpf.c | 1 + tools/testing/selftests/bpf/bpf_helpers.h | 3 ++ 6 files changed, 135 insertions(+), 9 deletions(-) commit 1acc60b6a41bd4e43c3cb10e5395a5c812e158f5 Author: John Fastabend Date: Sun Mar 18 12:57:36 2018 -0700 bpf: add verifier tests for BPF_PROG_TYPE_SK_MSG Test read and writes for BPF_PROG_TYPE_SK_MSG. Signed-off-by: John Fastabend Acked-by: David S. Miller Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_verifier.c | 54 +++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 82a8616889d506cb690cfc0afb2ccadda120461d Author: John Fastabend Date: Sun Mar 18 12:57:31 2018 -0700 bpf: add map tests for BPF_PROG_TYPE_SK_MSG Add map tests to attach BPF_PROG_TYPE_SK_MSG types to a sockmap. Signed-off-by: John Fastabend Acked-by: David S. Miller Signed-off-by: Daniel Borkmann tools/include/uapi/linux/bpf.h | 10 ++++ tools/testing/selftests/bpf/Makefile | 3 +- tools/testing/selftests/bpf/bpf_helpers.h | 2 + tools/testing/selftests/bpf/sockmap_parse_prog.c | 15 +++++- tools/testing/selftests/bpf/sockmap_tcp_msg_prog.c | 33 +++++++++++++ tools/testing/selftests/bpf/sockmap_verdict_prog.c | 7 +++ tools/testing/selftests/bpf/test_maps.c | 55 ++++++++++++++++++++-- 7 files changed, 118 insertions(+), 7 deletions(-) commit 015632bb30daaaee64e1bcac07570860e0bf3092 Author: John Fastabend Date: Sun Mar 18 12:57:25 2018 -0700 bpf: sk_msg program helper bpf_sk_msg_pull_data Currently, if a bpf sk msg program is run the program can only parse data that the (start,end) pointers already consumed. For sendmsg hooks this is likely the first scatterlist element. For sendpage this will be the range (0,0) because the data is shared with userspace and by default we want to avoid allowing userspace to modify data while (or after) BPF verdict is being decided. To support pulling in additional bytes for parsing use a new helper bpf_sk_msg_pull(start, end, flags) which works similar to cls tc logic. This helper will attempt to point the data start pointer at 'start' bytes offest into msg and data end pointer at 'end' bytes offset into message. After basic sanity checks to ensure 'start' <= 'end' and 'end' <= msg_length there are a few cases we need to handle. First the sendmsg hook has already copied the data from userspace and has exclusive access to it. Therefor, it is not necessesary to copy the data. However, it may be required. After finding the scatterlist element with 'start' offset byte in it there are two cases. One the range (start,end) is entirely contained in the sg element and is already linear. All that is needed is to update the data pointers, no allocate/copy is needed. The other case is (start, end) crosses sg element boundaries. In this case we allocate a block of size 'end - start' and copy the data to linearize it. Next sendpage hook has not copied any data in initial state so that data pointers are (0,0). In this case we handle it similar to the above sendmsg case except the allocation/copy must always happen. Then when sending the data we have possibly three memory regions that need to be sent, (0, start - 1), (start, end), and (end + 1, msg_length). This is required to ensure any writes by the BPF program are correctly transmitted. Lastly this operation will invalidate any previous data checks so BPF programs will have to revalidate pointers after making this BPF call. Signed-off-by: John Fastabend Acked-by: David S. Miller Signed-off-by: Daniel Borkmann include/uapi/linux/bpf.h | 3 +- net/core/filter.c | 135 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 136 insertions(+), 2 deletions(-) commit 91843d540a139eb8070bcff8aa10089164436deb Author: John Fastabend Date: Sun Mar 18 12:57:20 2018 -0700 bpf: sockmap, add msg_cork_bytes() helper In the case where we need a specific number of bytes before a verdict can be assigned, even if the data spans multiple sendmsg or sendfile calls. The BPF program may use msg_cork_bytes(). The extreme case is a user can call sendmsg repeatedly with 1-byte msg segments. Obviously, this is bad for performance but is still valid. If the BPF program needs N bytes to validate a header it can use msg_cork_bytes to specify N bytes and the BPF program will not be called again until N bytes have been accumulated. The infrastructure will attempt to coalesce data if possible so in many cases (most my use cases at least) the data will be in a single scatterlist element with data pointers pointing to start/end of the element. However, this is dependent on available memory so is not guaranteed. So BPF programs must validate data pointer ranges, but this is the case anyways to convince the verifier the accesses are valid. Signed-off-by: John Fastabend Acked-by: David S. Miller Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann include/uapi/linux/bpf.h | 3 ++- net/core/filter.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) commit 2a100317c9ebc204a166f16294884fbf9da074ce Author: John Fastabend Date: Sun Mar 18 12:57:15 2018 -0700 bpf: sockmap, add bpf_msg_apply_bytes() helper A single sendmsg or sendfile system call can contain multiple logical messages that a BPF program may want to read and apply a verdict. But, without an apply_bytes helper any verdict on the data applies to all bytes in the sendmsg/sendfile. Alternatively, a BPF program may only care to read the first N bytes of a msg. If the payload is large say MB or even GB setting up and calling the BPF program repeatedly for all bytes, even though the verdict is already known, creates unnecessary overhead. To allow BPF programs to control how many bytes a given verdict applies to we implement a bpf_msg_apply_bytes() helper. When called from within a BPF program this sets a counter, internal to the BPF infrastructure, that applies the last verdict to the next N bytes. If the N is smaller than the current data being processed from a sendmsg/sendfile call, the first N bytes will be sent and the BPF program will be re-run with start_data pointing to the N+1 byte. If N is larger than the current data being processed the BPF verdict will be applied to multiple sendmsg/sendfile calls until N bytes are consumed. Note1 if a socket closes with apply_bytes counter non-zero this is not a problem because data is not being buffered for N bytes and is sent as its received. Signed-off-by: John Fastabend Acked-by: David S. Miller Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann include/uapi/linux/bpf.h | 3 ++- net/core/filter.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) commit 4f738adba30a7cfc006f605707e7aee847ffefa0 Author: John Fastabend Date: Sun Mar 18 12:57:10 2018 -0700 bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data This implements a BPF ULP layer to allow policy enforcement and monitoring at the socket layer. In order to support this a new program type BPF_PROG_TYPE_SK_MSG is used to run the policy at the sendmsg/sendpage hook. To attach the policy to sockets a sockmap is used with a new program attach type BPF_SK_MSG_VERDICT. Similar to previous sockmap usages when a sock is added to a sockmap, via a map update, if the map contains a BPF_SK_MSG_VERDICT program type attached then the BPF ULP layer is created on the socket and the attached BPF_PROG_TYPE_SK_MSG program is run for every msg in sendmsg case and page/offset in sendpage case. BPF_PROG_TYPE_SK_MSG Semantics/API: BPF_PROG_TYPE_SK_MSG supports only two return codes SK_PASS and SK_DROP. Returning SK_DROP free's the copied data in the sendmsg case and in the sendpage case leaves the data untouched. Both cases return -EACESS to the user. Returning SK_PASS will allow the msg to be sent. In the sendmsg case data is copied into kernel space buffers before running the BPF program. The kernel space buffers are stored in a scatterlist object where each element is a kernel memory buffer. Some effort is made to coalesce data from the sendmsg call here. For example a sendmsg call with many one byte iov entries will likely be pushed into a single entry. The BPF program is run with data pointers (start/end) pointing to the first sg element. In the sendpage case data is not copied. We opt not to copy the data by default here, because the BPF infrastructure does not know what bytes will be needed nor when they will be needed. So copying all bytes may be wasteful. Because of this the initial start/end data pointers are (0,0). Meaning no data can be read or written. This avoids reading data that may be modified by the user. A new helper is added later in this series if reading and writing the data is needed. The helper call will do a copy by default so that the page is exclusively owned by the BPF call. The verdict from the BPF_PROG_TYPE_SK_MSG applies to the entire msg in the sendmsg() case and the entire page/offset in the sendpage case. This avoids ambiguity on how to handle mixed return codes in the sendmsg case. Again a helper is added later in the series if a verdict needs to apply to multiple system calls and/or only a subpart of the currently being processed message. The helper msg_redirect_map() can be used to select the socket to send the data on. This is used similar to existing redirect use cases. This allows policy to redirect msgs. Pseudo code simple example: The basic logic to attach a program to a socket is as follows, // load the programs bpf_prog_load(SOCKMAP_TCP_MSG_PROG, BPF_PROG_TYPE_SK_MSG, &obj, &msg_prog); // lookup the sockmap bpf_map_msg = bpf_object__find_map_by_name(obj, "my_sock_map"); // get fd for sockmap map_fd_msg = bpf_map__fd(bpf_map_msg); // attach program to sockmap bpf_prog_attach(msg_prog, map_fd_msg, BPF_SK_MSG_VERDICT, 0); Adding sockets to the map is done in the normal way, // Add a socket 'fd' to sockmap at location 'i' bpf_map_update_elem(map_fd_msg, &i, fd, BPF_ANY); After the above any socket attached to "my_sock_map", in this case 'fd', will run the BPF msg verdict program (msg_prog) on every sendmsg and sendpage system call. For a complete example see BPF selftests or sockmap samples. Implementation notes: It seemed the simplest, to me at least, to use a refcnt to ensure psock is not lost across the sendmsg copy into the sg, the bpf program running on the data in sg_data, and the final pass to the TCP stack. Some performance testing may show a better method to do this and avoid the refcnt cost, but for now use the simpler method. Another item that will come after basic support is in place is supporting MSG_MORE flag. At the moment we call sendpages even if the MSG_MORE flag is set. An enhancement would be to collect the pages into a larger scatterlist and pass down the stack. Notice that bpf_tcp_sendmsg() could support this with some additional state saved across sendmsg calls. I built the code to support this without having to do refactoring work. Other features TBD include ZEROCOPY and the TCP_RECV_QUEUE/TCP_NO_QUEUE support. This will follow initial series shortly. Future work could improve size limits on the scatterlist rings used here. Currently, we use MAX_SKB_FRAGS simply because this was being used already in the TLS case. Future work could extend the kernel sk APIs to tune this depending on workload. This is a trade-off between memory usage and throughput performance. Signed-off-by: John Fastabend Acked-by: David S. Miller Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann include/linux/bpf.h | 1 + include/linux/bpf_types.h | 1 + include/linux/filter.h | 17 ++ include/uapi/linux/bpf.h | 22 +- kernel/bpf/sockmap.c | 712 +++++++++++++++++++++++++++++++++++++++++++++- kernel/bpf/syscall.c | 14 +- kernel/bpf/verifier.c | 5 +- net/core/filter.c | 106 +++++++ 8 files changed, 857 insertions(+), 21 deletions(-) commit 8c05dbf04b2882c3c0bc43fe7668c720210877f3 Author: John Fastabend Date: Sun Mar 18 12:57:05 2018 -0700 net: generalize sk_alloc_sg to work with scatterlist rings The current implementation of sk_alloc_sg expects scatterlist to always start at entry 0 and complete at entry MAX_SKB_FRAGS. Future patches will want to support starting at arbitrary offset into scatterlist so add an additional sg_start parameters and then default to the current values in TLS code paths. Signed-off-by: John Fastabend Acked-by: David S. Miller Signed-off-by: Daniel Borkmann include/net/sock.h | 2 +- net/core/sock.c | 27 ++++++++++++++++----------- net/tls/tls_sw.c | 4 ++-- 3 files changed, 19 insertions(+), 14 deletions(-) commit 312fc2b4c82e96a48cb2d0da2bd4816eb253c499 Author: John Fastabend Date: Sun Mar 18 12:57:00 2018 -0700 net: do_tcp_sendpages flag to avoid SKBTX_SHARED_FRAG When calling do_tcp_sendpages() from in kernel and we know the data has no references from user side we can omit SKBTX_SHARED_FRAG flag. This patch adds an internal flag, NO_SKBTX_SHARED_FRAG that can be used to omit setting SKBTX_SHARED_FRAG. The flag is not exposed to userspace because the sendpage call from the splice logic masks out all bits except MSG_MORE. Signed-off-by: John Fastabend Acked-by: David S. Miller Signed-off-by: Daniel Borkmann include/linux/socket.h | 1 + net/ipv4/tcp.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit ffa35660017161524b7db79b0ce293fa1af16c4d Author: John Fastabend Date: Sun Mar 18 12:56:54 2018 -0700 sockmap: convert refcnt to an atomic refcnt The sockmap refcnt up until now has been wrapped in the sk_callback_lock(). So its not actually needed any locking of its own. The counter itself tracks the lifetime of the psock object. Sockets in a sockmap have a lifetime that is independent of the map they are part of. This is possible because a single socket may be in multiple maps. When this happens we can only release the psock data associated with the socket when the refcnt reaches zero. There are three possible delete sock reference decrement paths first through the normal sockmap process, the user deletes the socket from the map. Second the map is removed and all sockets in the map are removed, delete path is similar to case 1. The third case is an asyncronous socket event such as a closing the socket. The last case handles removing sockets that are no longer available. For completeness, although inc does not pose any problems in this patch series, the inc case only happens when a psock is added to a map. Next we plan to add another socket prog type to handle policy and monitoring on the TX path. When we do this however we will need to keep a reference count open across the sendmsg/sendpage call and holding the sk_callback_lock() here (on every send) seems less than ideal, also it may sleep in cases where we hit memory pressure. Instead of dealing with these issues in some clever way simply make the reference counting a refcnt_t type and do proper atomic ops. Signed-off-by: John Fastabend Acked-by: David S. Miller Signed-off-by: Daniel Borkmann kernel/bpf/sockmap.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 2c3682f0be97a5f57c6c8b40fa154dfc77efb461 Author: John Fastabend Date: Sun Mar 18 12:56:49 2018 -0700 sock: make static tls function alloc_sg generic sock helper The TLS ULP module builds scatterlists from a sock using page_frag_refill(). This is going to be useful for other ULPs so move it into sock file for more general use. In the process remove useless goto at end of while loop. Signed-off-by: John Fastabend Acked-by: David S. Miller Signed-off-by: Daniel Borkmann include/net/sock.h | 4 ++++ net/core/sock.c | 56 ++++++++++++++++++++++++++++++++++++++++++++ net/tls/tls_sw.c | 69 ++++++------------------------------------------------ 3 files changed, 67 insertions(+), 62 deletions(-) commit c7e92def1ef4dad7a45f0fcca283da1afd003966 Author: Gregory CLEMENT Date: Wed Feb 28 15:07:51 2018 +0100 clk: mvebu: cp110: Fix clock tree representation Thanks to new documentation, we have a better view of the clock tree. There were few mistakes in the first version of this driver, the main one being the parental link between the clocks. Actually the tree is more flat that we though. Most of the IP blocks require two clocks: one for the IP itself and one for accessing the registers, and unlike what we wrote there is no link between these two clocks. The other mistakes were about the name of the clocks: the root clock is not the Audio PLL but the PLL0, and what we called the EIP clock is named the x2 Core clock and is used by other IP block than the EIP ones. Signed-off-by: Gregory CLEMENT Signed-off-by: Stephen Boyd drivers/clk/mvebu/cp110-system-controller.c | 94 ++++++++++++----------------- 1 file changed, 39 insertions(+), 55 deletions(-) commit bf4447fd1cb6158b60bd60a79998e1d029d31e68 Author: KarimAllah Ahmed Date: Sat Mar 3 05:33:10 2018 +0100 PCI/IOV: Skip BAR sizing for VFs Per PCIe r4.0, sec 9.3.4.1.11, the BAR registers in VF config space are all RO Zero, so skip sizing them. This is an optimization when enabling SR-IOV on a device with many VFs. Suggested-by: Bjorn Helgaas Signed-off-by: KarimAllah Ahmed Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 4 ++++ 1 file changed, 4 insertions(+) commit b470c154c600e427592df5237596ce0f33ce7d9f Author: Bart Van Assche Date: Fri Mar 16 10:55:57 2018 -0700 IB/srp: Disallow duplicate RDMA/CM connections According to the SRP standard the INITIATOR and TARGET PORT IDENTIFIER fields from the login request specify the I_T nexus. Whether or not an SRP target closes an existing connection for an I_T nexus when a login request is received depends on the value of the MULTICHANNEL field in the login request. The SRP initiator derives the value of the INITIATOR and TARGET PORT IDENTIFIER fields from the .id_ext, .ioc_guid, .initiator_ext .sgid members of the srp_target_port structure. This means that the .rdma_cm.dst check must be removed from srp_conn_unique(). This patch avoids that for target ports that have multiple addresses, e.g. an IPv4 and an IPv6 address, and if a connection is established to both target port addresses, that the initiator logs in alternatingly every 10 seconds to the other target port address. An SRP target must namely terminate all but one connections for a given I_T nexus if the MULTICHANNEL field has not been set in the login request. Fixes: 19f313438c77 ("IB/srp: Add RDMA/CM support") Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/srp/ib_srp.c | 3 --- 1 file changed, 3 deletions(-) commit fd73a3e618889877d32e338622a363d04d9be709 Author: Ladislav Michl Date: Fri Mar 16 11:06:26 2018 +0100 power: reset: at91-reset: Switch from the pr_*() to the dev_*() logging functions Use dev_info() instead of pr_info(). Signed-off-by: Ladislav Michl Acked-by: Nicolas Ferre Signed-off-by: Sebastian Reichel drivers/power/reset/at91-reset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab08824826d72ef9c185b7aad4e9a1e98bf2fa51 Author: Ladislav Michl Date: Fri Mar 16 11:03:25 2018 +0100 power: reset: at91-poweroff: Remove redundant dev_err call in at91_poweroff_probe() There is an error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundancy. Signed-off-by: Ladislav Michl Acked-by: Nicolas Ferre Signed-off-by: Sebastian Reichel drivers/power/reset/at91-poweroff.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 062836db01f982683e3c5bb6cbf571ee7a13016a Author: Ladislav Michl Date: Fri Mar 16 11:02:05 2018 +0100 power: reset: at91-poweroff: Switch from the pr_*() to the dev_*() logging functions Use dev_info() instead of pr_info(). Signed-off-by: Ladislav Michl Acked-by: Nicolas Ferre Signed-off-by: Sebastian Reichel drivers/power/reset/at91-poweroff.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit ecd380b8dead1bad67e3af87e2ddfe826c3da79d Merge: 134933e 1cd6188 Author: Ingo Molnar Date: Mon Mar 19 20:37:48 2018 +0100 Merge tag 'perf-core-for-mingo-4.17-20180319' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: - Fixes for problems experienced with new GCC 8 warnings, that treated as errors, broke the build, related to snprintf and casting issues. (Arnaldo Carvalho de Melo, Jiri Olsa, Josh Poinboeuf) - Fix build of new breakpoint 'perf test' entry with clang < 6, noticed on fedora 25, 26 and 27 (Arnaldo Carvalho de Melo) - Workaround problem with symbol resolution in 'perf annotate', using the symbol name already present in the objdump output (Arnaldo Carvalho de Melo) - Document 'perf top --ignore-vmlinux' (Arnaldo Carvalho de Melo) - Fix out of bounds access on array fd when cnt is 100 in one of the 'perf test' entries, detected using 'cpptest' (Colin Ian King) - Add support for the forced leader feature, i.e. 'perf report --group' for a group of events not really grouped when scheduled (without using {} to enclose the list of events in the command line) in pipe mode, e.g.: $ perf record -e cycles,instructions -o - kill | perf report --group -i - - Use right type to access array elements in 'perf probe' (Masami Hiramatsu) - Update POWER9 vendor events (those described in JSON format) (Sukadev Bhattiprolu) - Discard head in overwrite_rb_find_range() (Yisheng Xie) - Avoid setting 'quiet' to 'true' unnecessarily (Yisheng Xie) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 134933e55789ece9bca973d3502c7b8f7a9dae86 Merge: 2486836 c698ca5 Author: Ingo Molnar Date: Mon Mar 19 20:37:35 2018 +0100 Merge tag 'v4.16-rc6' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit df62ab5e0f75608919df7442654b0fab78246b7b Author: Bjorn Helgaas Date: Fri Mar 9 16:36:33 2018 -0600 PCI: Tidy comments Remove pointless comments that tell us the file name, remove blank line comments, follow multi-line comment conventions. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/access.c | 12 +++++++----- drivers/pci/ats.c | 10 ++++------ drivers/pci/bus.c | 2 -- drivers/pci/host-bridge.c | 2 +- drivers/pci/iov.c | 8 +++----- drivers/pci/mmap.c | 2 +- drivers/pci/msi.c | 3 +-- drivers/pci/pci-acpi.c | 3 +-- drivers/pci/pci-driver.c | 2 -- drivers/pci/pci-label.c | 5 +++-- drivers/pci/pci-stub.c | 3 ++- drivers/pci/pci-sysfs.c | 3 --- drivers/pci/pci.c | 9 +++++---- drivers/pci/pcie/aer/aerdrv.c | 9 +++------ drivers/pci/pcie/aer/aerdrv.h | 1 - drivers/pci/pcie/aer/aerdrv_acpi.c | 1 - drivers/pci/pcie/aer/aerdrv_core.c | 11 ++++------- drivers/pci/pcie/aer/aerdrv_errprint.c | 3 --- drivers/pci/pcie/aer/ecrc.c | 4 ++-- drivers/pci/pcie/aspm.c | 3 +-- drivers/pci/pcie/portdrv.h | 1 - drivers/pci/pcie/portdrv_core.c | 1 - drivers/pci/pcie/portdrv_pci.c | 2 -- drivers/pci/probe.c | 2 +- drivers/pci/proc.c | 4 ++-- drivers/pci/quirks.c | 14 +++++++------- drivers/pci/rom.c | 4 +--- drivers/pci/search.c | 8 ++++---- drivers/pci/setup-bus.c | 6 +----- drivers/pci/setup-irq.c | 4 +--- drivers/pci/setup-res.c | 10 +++------- drivers/pci/slot.c | 1 - drivers/pci/syscall.c | 9 +++------ drivers/pci/vpd.c | 3 +-- drivers/pci/xen-pcifront.c | 4 ++-- 35 files changed, 64 insertions(+), 105 deletions(-) commit 3133e6dd07ed4b21a19ccdbbe4f033a2e4e9aad3 Author: Bjorn Helgaas Date: Fri Mar 9 13:09:29 2018 -0600 PCI: Tidy Makefiles Indent things so they line up neatly and remove extra blank lines and superfluous comments. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/Makefile | 69 +++++++++++++++++------------------------------ drivers/pci/pcie/Makefile | 16 ++++------- 2 files changed, 29 insertions(+), 56 deletions(-) commit 66e3339df52a10da9e88c2072f26358150965088 Author: Johannes Thumshirn Date: Mon Mar 12 10:41:19 2018 +0100 mcb: Add Altera PCI ID to mcb-pci Some older PCI-attached MEN FPGAs use an Altera PCI Vendor ID instead of the MEN one. Add it to the PCI ID table so the driver automatically attaches to it. Reported-by: Ben Turner Tested-by: Ben Turner Signed-off-by: Johannes Thumshirn Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Cc: Andreas Geißler drivers/mcb/mcb-pci.c | 1 + 1 file changed, 1 insertion(+) commit 33c4c8a588e6cccf3832b84b7792f02153e0ccda Author: Johannes Thumshirn Date: Mon Mar 12 10:41:18 2018 +0100 PCI: Add Altera vendor ID Add the Altera PCI Vendor id to pci_ids.h and remove the private definitions from xillybus_pcie.c and altera-cvp.c. Signed-off-by: Johannes Thumshirn Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Acked-by: Eli Billauer Acked-by: Bjorn Helgaas Cc: Anatolij Gustschin drivers/char/xillybus/xillybus_pcie.c | 1 - drivers/fpga/altera-cvp.c | 2 -- include/linux/pci_ids.h | 2 ++ 3 files changed, 2 insertions(+), 3 deletions(-) commit c314c7ba40389876a3a4534cdef4adde56174a09 Merge: e3c72f3 12d80bc Author: David S. Miller Date: Mon Mar 19 15:12:03 2018 -0400 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2018-03-19 This series contains updates to i40e and i40evf only. Alex fixes a potential deadlock in the configure_clsflower function in i40evf, where we exit with the "IN_CRITICAL_TASK" bit set while notifying the PF of flower filters. Jan fixed an issue where it was possible to set a mode that is not allowed which resulted in link being down, so fixed the parity between i40e_set_link_ksettings() and i40e_get_link_ksettings(). Patryk fixes a bug where a backplane device was allowing the setting of link settings, which is not allowed. Shiraz fixes a crash when entering S3 because the client interface was freeing the MSIx vectors while they are still in use. Jake fixes up a function header comment to document a newly added parameter. Also cleaned up flags that were never used. Doug fixes the incorrect return type for i40e_aq_add_cloud_filters(). ==================== Signed-off-by: David S. Miller commit d59578da2bb8d69266351a399c377fc4bf4265b7 Author: NeilBrown Date: Thu Mar 15 07:22:36 2018 +1100 staging: mt7621-dts: add dts files Add device tree source for mt7621 and gnubee1 to make testing easier. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/mt7621-dts/Kconfig | 5 + drivers/staging/mt7621-dts/Makefile | 3 + drivers/staging/mt7621-dts/TODO | 5 + drivers/staging/mt7621-dts/gbpc1.dts | 143 ++++++++++ drivers/staging/mt7621-dts/mt7621.dtsi | 471 +++++++++++++++++++++++++++++++++ 7 files changed, 630 insertions(+) commit 792c11c81923da2dabbec9b124d2a106f8f370a3 Author: John Crispin Date: Thu Mar 15 07:22:36 2018 +1100 staging: mt7621-eth: mediatek: add Kconfig and Makefile This patch adds the Makefile and Kconfig required to make the driver build. Signed-off-by: John Crispin Signed-off-by: Felix Fietkau Signed-off-by: Michael Lee Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 ++ drivers/staging/Makefile | 1 + drivers/staging/mt7621-eth/Kconfig | 39 +++++++++++++++++++++++++++++++++++++ drivers/staging/mt7621-eth/Makefile | 14 +++++++++++++ 4 files changed, 56 insertions(+) commit 3497a53acd3857d748c1b297930e310d9558e96e Author: John Crispin Date: Thu Mar 15 07:22:36 2018 +1100 staging: mt7621-eth: add support for mt7621 Add support for SoCs from the mt7621 family. These all have 2 GMAC ports, both of which are attached to the same internal 1000MBit switch. Currently we only support GMAC1 as the sole CPU port. MT7621 is very similar to MT7620 with only a few registers having different offsets. MT7621 is the first SoC to have the new QDMA engine builtin. The older PDMA engine is also present. unfortunatley, to get the best performance we need to run RX on PDMA and TX on QDMA. This SoC is also the first to have TX vlan offloading and TSO6 support. NeilBrown: the driver didn't work when I tested, so I changed it to match known-working code as much as possible. This included converting to the PDMA engine for TX. Signed-off-by: John Crispin Signed-off-by: Felix Fietkau Signed-off-by: Michael Lee Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-eth/TODO | 3 + drivers/staging/mt7621-eth/soc_mt7621.c | 160 ++++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+) commit 14befc2d6139126ccd6ceb43d04b1e4719ece57f Author: John Crispin Date: Thu Mar 15 07:22:36 2018 +1100 staging: mt7621-eth: add mdio support for mt762X family NeilBrown: this patch originally contained soc-mt7620.c but as I cannot test that, I removed it. Some functions from mdio-mt7620.c are needed for soc-mt7621.c support - fixed mt7620_has_carrier() to read correct register. Original comment: Add support for SoCs from the mt7620 family. These all have one dedicated external gbit port and a builtin 5 port 100mbit switch. Additionally one of the 5 switch ports can be changed to become an additional gbit port that we can attach a phy to. MT7620 was the first SoC released after Ralink was acquired by MTK and has seen a lot of changes to the core. With MT7620 we have seen the addition of some advanced features such as TX vlan offloading, RX scatter gather and TSO. Newer MTK SoCs are based on this design. Although the builtin MT7530 is gbit capable, the builtin PHYs are only 100mbit. There are boards in the wild that use one of the gbit MACs to attach an external MT7530. For this to work a few hacks need to be applied to reorganize the MDIO address mappings and autopolling for the SoC to correctly work with the external switch. This is however not part of the series and will be part of a later series once we evaluated if we want to use DSA or switchdev. Signed-off-by: John Crispin Signed-off-by: Felix Fietkau Signed-off-by: Michael Lee Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-eth/TODO | 2 + drivers/staging/mt7621-eth/mdio_mt7620.c | 173 +++++++++++++++++++++++++++++++ 2 files changed, 175 insertions(+) commit f079b640634853419809104907e07365ad9fd272 Author: John Crispin Date: Thu Mar 15 07:22:36 2018 +1100 staging: mt7621-eth: add gigabit switch driver (GSW) The GSW is found in all of the 1000mbit SoCs. it has 5 external ports, 1-2 cpu ports and 1 further port that the internal HW offloading engine connects to. The switch core used is a MT7530, which also exists as a standalone chip. Although these SoCs (mt7620/1/3) share the same switch core, the bring up of these is slightly different. One of the reasons is that on mt7620 the switch core is mmio mapped while MT7621/3 talks to the switch via MDIO addr 0x1f. Additionally, the SoCs have different MAC types and some of them have TRGMII support. MT7621 can do 1,2gbit and MT7623 is able to do 2,6gbit. The support for the TRGMII bring up is not part of this series as the code is based on the SDK driver and has between 1500 and 2000 magic values that still need to be converted to defines. Because of these differences we have 3 separate drivers for these 3 SoCs. These drivers are very basic and only provides basic init and irq support. The SoC and switch core both have support for a special tag making DSA support possible. NeilBrown: - added setting to mt7621_hw_init to match working code from libreCMC This needs to be converted to use switchdev. Signed-off-by: John Crispin Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-eth/TODO | 1 + drivers/staging/mt7621-eth/gsw_mt7620.h | 277 +++++++++++++++++++++++++++++ drivers/staging/mt7621-eth/gsw_mt7621.c | 298 ++++++++++++++++++++++++++++++++ 3 files changed, 576 insertions(+) commit e3cbf478f846374537941895182cd1aaf16dcb91 Author: John Crispin Date: Thu Mar 15 07:22:36 2018 +1100 staging: mt7621-eth: add the drivers core files Original comment: This patch adds the main chunk of the driver. The ethernet core is used in all of the Mediatek/Ralink Wireless SoCs. Over the years we have seen various changes to * the register layout * the type of ports (single/dual gbit, internal FE/Gbit switch) * dma engine (PDMA/QDMA) and new offloading features were added, such as * checksum * VLAN TX/RX * TSO * LRO The core functionality has however remained the same allowing us to use the same code for all SoCs. The abstraction for the various SoCs uses the typical ops struct pattern which allows us to extend or override the core functionality depending on which SoC we are on. The code to bring up the switches and external ports has also been split into separate files. There are 2 types of DMA engine, PDMA and the newer QDMA. PDMA uses a typical ring buffer while QDMA uses a linked list. Unfortunatley we have the MT7621 which has a few silicon issues. Due to these issues we need to PDMA for RX and QDMA for TX. All SoCs newer than the MT7621 can can run on QDMA exclusively. Most of the SoCs have a switch frontend. Older silicon has a so called ESW (Ethernet Switch) while newer cores have a GSW (Gigabit switch). Additionally there is a MDIO bus that can be used to talk to PHYs. In these cases one switch port get changed into a normal MAC port. Some SoCs have a dual MAC, we currently only support this on MT7623. NeilBrown: - removed everything not closely related to mt7621, as that is all I can test - converted ethtool.c to new ethtool_link_ksettings interfaces. Doesn't work yet. - updated some phydev interface use: e.g. dev_name() -> phydev_name() - updated mdio to use mdiobus_get_phy() - added some missing export_symbols - updated get_stats64 interface - TX_DMA_FPORT and TX_DMA_TSO to tx dma descriptor - range checked RX_DMA_FPORT in rx dma descriptor - tell hardware what mac address was chosen - fixed MT7620_GDMA1_FWD_CFG which was using wrong value Signed-off-by: John Crispin Signed-off-by: Felix Fietkau Signed-off-by: Michael Lee Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-eth/TODO | 3 + drivers/staging/mt7621-eth/ethtool.c | 225 +++ drivers/staging/mt7621-eth/ethtool.h | 22 + drivers/staging/mt7621-eth/mdio.c | 271 ++++ drivers/staging/mt7621-eth/mdio.h | 27 + drivers/staging/mt7621-eth/mtk_eth_soc.c | 2178 ++++++++++++++++++++++++++++++ drivers/staging/mt7621-eth/mtk_eth_soc.h | 721 ++++++++++ 7 files changed, 3447 insertions(+) commit eb4afe300231100c5c2333cb327f0ec3e9c74c81 Author: John Crispin Date: Thu Mar 15 07:22:36 2018 +1100 staging: mt7621-eth: Document ralink/mediatek SoC ethernet binding Add possible dt binding for mediatek gigabit switches. Signed-off-by: John Crispin Signed-off-by: Felix Fietkau Signed-off-by: Michael Lee Cc: devicetree@vger.kernel.org Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/net/mediatek-net-gsw.txt | 48 ++++++++++++++++++++++ drivers/staging/mt7621-eth/TODO | 4 ++ 2 files changed, 52 insertions(+) commit 8b634a9c7620b15691322cd53071122d2ab249a7 Author: John Crispin Date: Thu Mar 15 07:22:35 2018 +1100 staging: mt7621-mmc: MIPS: ralink: add sdhci for mt7620a SoC NeilBrown: Added range-check on pdev->id before assigning ot host->id of_dma_configure() sets a default ->dma_mask of DMA_BIT_MASK(32), claiming devices can DMA from the full 32bit address space. The mtk-mmc driver does not support access to highmem pages, so it is really limited to the bottom 512M (actually 448M due to 64M of IO space). Setting ->dma_mask to NULL causes mmc_setup_queue() to fall-back to using BLK_BOUNCE_HIGH to tell the block layer to use a bounce-buffer for any highmem pages requiring IO. Signed-off-by: John Crispin Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/mt7621-mmc/Kconfig | 16 + drivers/staging/mt7621-mmc/Makefile | 42 + drivers/staging/mt7621-mmc/TODO | 8 + drivers/staging/mt7621-mmc/board.h | 137 ++ drivers/staging/mt7621-mmc/dbg.c | 347 ++++ drivers/staging/mt7621-mmc/dbg.h | 156 ++ drivers/staging/mt7621-mmc/mt6575_sd.h | 1001 +++++++++++ drivers/staging/mt7621-mmc/sd.c | 3074 ++++++++++++++++++++++++++++++++ 10 files changed, 4784 insertions(+) commit 0853c7a53eb369b41821b9eda22a8de55f434060 Author: John Crispin Date: Thu Mar 15 07:22:35 2018 +1100 staging: mt7621-dma: ralink: add rt2880 dma engine Signed-off-by: John Crispin Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/mt7621-dma/Kconfig | 12 + drivers/staging/mt7621-dma/Makefile | 4 + drivers/staging/mt7621-dma/TODO | 5 + drivers/staging/mt7621-dma/mtk-hsdma.c | 767 +++++++++++++++++++++++++ drivers/staging/mt7621-dma/ralink-gdma.c | 928 +++++++++++++++++++++++++++++++ 7 files changed, 1719 insertions(+) commit 1ab7f2a43558b3fbc6bfbb8fd289dd34b1e0ef82 Author: John Crispin Date: Thu Mar 15 07:22:35 2018 +1100 staging: mt7621-spi: add mt7621 support NeilBrown: The code will fail with a warning if asked to transfer more than 32 bytes at a time. So used max_transfer_size interface to tell users about this. Signed-off-by: John Crispin Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/mt7621-spi/Kconfig | 6 + drivers/staging/mt7621-spi/Makefile | 1 + drivers/staging/mt7621-spi/TODO | 5 + drivers/staging/mt7621-spi/spi-mt7621.c | 489 ++++++++++++++++++++++++++++++++ 6 files changed, 504 insertions(+) commit 16e556aa104c306958e10165d6da4ab1be4befc8 Author: John Crispin Date: Thu Mar 15 07:22:35 2018 +1100 staging: mt7621-gpio: ralink: add mt7621 gpio controller Signed-off-by: John Crispin Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/mt7621-gpio/Kconfig | 6 + drivers/staging/mt7621-gpio/Makefile | 3 + drivers/staging/mt7621-gpio/TODO | 5 + drivers/staging/mt7621-gpio/gpio-mt7621.c | 353 ++++++++++++++++++++++++++++++ 6 files changed, 370 insertions(+) commit 0317d60de8697865634ef1d973cd3a3c9a1dd302 Author: John Crispin Date: Thu Mar 15 07:22:35 2018 +1100 staging: mt7621-pinctrl: ralink: add pinctrl driver Signed-off-by: John Crispin Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/mt7621-pinctrl/Kconfig | 4 + drivers/staging/mt7621-pinctrl/Makefile | 3 + drivers/staging/mt7621-pinctrl/TODO | 6 + drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 472 ++++++++++++++++++++++++ 6 files changed, 488 insertions(+) commit 03f152e31f4ae89c37ab240f45dd77c8a916dd26 Author: John Crispin Date: Thu Mar 15 07:22:35 2018 +1100 staging: mt7621-pci: MIPS/ralink: add MT7621 pcie driver NeilBrown: forward port and hack to work on GNUBEE1 Signed-off-by: John Crispin Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/Makefile | 1 + drivers/staging/mt7621-pci/Makefile | 1 + drivers/staging/mt7621-pci/TODO | 12 + drivers/staging/mt7621-pci/pci-mt7621.c | 840 ++++++++++++++++++++++++++++++++ 4 files changed, 854 insertions(+) commit 818e0fa293ca836eba515615c64680ea916fd7cd Author: Bart Van Assche Date: Mon Mar 19 11:46:13 2018 -0700 block: Change a rcu_read_{lock,unlock}_sched() pair into rcu_read_{lock,unlock}() scsi_device_quiesce() uses synchronize_rcu() to guarantee that the effect of blk_set_preempt_only() will be visible for percpu_ref_tryget() calls that occur after the queue unfreeze by using the approach explained in https://lwn.net/Articles/573497/. The rcu read lock and unlock calls in blk_queue_enter() form a pair with the synchronize_rcu() call in scsi_device_quiesce(). Both scsi_device_quiesce() and blk_queue_enter() must either use regular RCU or RCU-sched. Since neither the RCU-protected code in blk_queue_enter() nor blk_queue_usage_counter_release() sleeps, regular RCU protection is sufficient. Note: scsi_device_quiesce() does not have to be modified since it already uses synchronize_rcu(). Reported-by: Tejun Heo Fixes: 3a0a529971ec ("block, scsi: Make SCSI quiesce and resume work reliably") Signed-off-by: Bart Van Assche Acked-by: Tejun Heo Cc: Tejun Heo Cc: Hannes Reinecke Cc: Ming Lei Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Oleksandr Natalenko Cc: Martin Steigerwald Cc: stable@vger.kernel.org # v4.15 Signed-off-by: Jens Axboe block/blk-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5259b3293617ea88842a658793ffaa61ea0e0ef4 Author: Sergio Paracuellos Date: Thu Mar 15 20:09:22 2018 +0100 staging: ks7010: replace DPRINTK traces in favour of netdev_* This commit removes custom defined DPRINTK macro and replaces all the associated debug and other traces for preferred ones netdev_*. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 84 ++++++++++----------- drivers/staging/ks7010/ks_hostif.c | 138 ++++++++++++++++++----------------- drivers/staging/ks7010/ks_wlan.h | 10 --- drivers/staging/ks7010/ks_wlan_net.c | 34 ++++----- 4 files changed, 130 insertions(+), 136 deletions(-) commit 7acf4002e348913c86015337ea0810acbb5443e0 Author: Sergio Paracuellos Date: Thu Mar 15 20:09:21 2018 +0100 staging: ks7010: remove useless DPRINTK traces This commit removes some useless traces in some source files Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 58 -------------- drivers/staging/ks7010/ks_hostif.c | 147 +++-------------------------------- drivers/staging/ks7010/ks_wlan_net.c | 56 +------------ 3 files changed, 10 insertions(+), 251 deletions(-) commit 6a9bbe53db9a5aa0be9788aa8a2c250dee55444b Author: Ioana Radulescu Date: Wed Mar 14 15:04:51 2018 -0500 staging: fsl-dpaa2/eth: Fix incorrect kfree Use netdev_alloc_frag() instead of kmalloc to allocate space for the S/G table of egress multi-buffer frames. This fixes a bug where an unaligned pointer received from the allocator would be overwritten with the 64B aligned value, leading to a wrong address being later passed to kfree. Signed-off-by: Ioana Radulescu Reported-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit bcb4f0d75bde920a3e86eeea743c6002863455fb Author: Valentin Vidic Date: Wed Mar 14 21:44:07 2018 +0100 staging: pi433: fix CamelCase for dagc enum Fixes checkpatch warnings: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/Documentation/pi433.txt | 4 ++-- drivers/staging/pi433/rf69.c | 4 ++-- drivers/staging/pi433/rf69_enum.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit e4928ac29b3d1ef70bd069cf768d86ca22d88abf Author: Valentin Vidic Date: Wed Mar 14 21:44:06 2018 +0100 staging: pi433: fix CamelCase for lnaGain enum Fixes checkpatch warning: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/Documentation/pi433.txt | 2 +- drivers/staging/pi433/pi433_if.h | 2 +- drivers/staging/pi433/rf69.c | 4 ++-- drivers/staging/pi433/rf69.h | 2 +- drivers/staging/pi433/rf69_enum.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit 9d985d127abf93d80fd038d33248ca999ac686d5 Author: Valentin Vidic Date: Wed Mar 14 21:44:05 2018 +0100 staging: pi433: fix CamelCase for DIONumber variable Fixes checkpatch warning: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.c | 4 ++-- drivers/staging/pi433/rf69.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 31e045ab546fa63ad4d7d3a9ccae5922b3f88612 Author: Valentin Vidic Date: Wed Mar 14 21:44:04 2018 +0100 staging: pi433: fix CamelCase for bitRate variables Fixes checkpatch warnings: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.c | 16 ++++++++-------- drivers/staging/pi433/rf69.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) commit 803058902bbe0f905f85fa085a242cf2f02f92ad Author: Valentin Vidic Date: Wed Mar 14 21:44:03 2018 +0100 staging: pi433: fix CamelCase for syncSize variable Fixes checkpatch warning: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4e3290dbf39e8797d9523683d3af093bbe7ba4ae Author: Valentin Vidic Date: Wed Mar 14 21:44:02 2018 +0100 staging: pi433: fix CamelCase for preambleLength variable Fixes checkpatch warning: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.c | 6 +++--- drivers/staging/pi433/rf69.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 469b84f3f2b6acfd609ffcdfb90561d42bcae9bf Author: Valentin Vidic Date: Wed Mar 14 21:44:01 2018 +0100 staging: pi433: fix CamelCase for GPIO functions Fixes checkpatch warnings: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/pi433_if.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6efb21d6d0e7b2c90a8a813c4bac85097357ce91 Author: Palle Christensen Date: Thu Mar 15 13:47:05 2018 +0100 staging:mt29f_spinand: MT29F2G failing as only 16 bits used for addressing. For NAND flash chips with more than 1Gbit (e.g. MT29F2G) more than 16 bits are necessary to address the correct page. Signed-off-by: Palle Christensen Signed-off-by: Greg Kroah-Hartman drivers/staging/mt29f_spinand/mt29f_spinand.c | 3 +++ 1 file changed, 3 insertions(+) commit 2ebd9ec4ac390fc6ca31e928ca56df76f4fa177c Author: HariPrasath Elango Date: Wed Mar 14 18:15:02 2018 +0530 staging: wilc1000: destroy initialized mutex object A mutex object that is initialized but not destroyed.This patch destroys the mutex object Signed-off-by: HariPrasath Elango Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 1 + 1 file changed, 1 insertion(+) commit 3ea60ab5fad247c9f260afdb1ef775e908529bf5 Author: HariPrasath Elango Date: Wed Mar 14 18:15:01 2018 +0530 staging: wilc1000: use kmemdup instead of kmalloc and memcpy Kmalloc followed by memcpy can be replaced by kmemdup. Signed-off-by: HariPrasath Elango Reviewed-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/linux_mon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 50413119b614209b40d6e234e74d101a80aa8378 Author: HariPrasath Elango Date: Wed Mar 14 18:15:00 2018 +0530 staging: wilc1000: Destroy mutex object in deinitialization Destroy the mutex object that is initialized in wlan_init_locks() Signed-off-by: HariPrasath Elango Reviewed-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/linux_wlan.c | 1 + 1 file changed, 1 insertion(+) commit 76c01fdd82fc6f1878741c8a1667f4073269db48 Author: HariPrasath Elango Date: Wed Mar 14 18:14:59 2018 +0530 staging: wilc1000: Fix code block alignment Fix the code alignment for a block of code to adhere to coding guidelines Signed-off-by: HariPrasath Elango Reviewed-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/linux_wlan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e1d9fc04c41840a4688ef6ce90b6dcca157ea4d7 Author: Frank Mori Hess Date: Thu Mar 15 10:25:44 2018 +0000 staging: comedi: ni_mio_common: ack ai fifo error interrupts. Ack ai fifo error interrupts in interrupt handler to clear interrupt after fifo overflow. It should prevent lock-ups after the ai fifo overflows. Cc: # v4.2+ Signed-off-by: Frank Mori Hess Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_mio_common.c | 2 ++ 1 file changed, 2 insertions(+) commit 988f4a3b6a563de800a2db934f027fe7beee76e8 Author: Pratik Jain Date: Fri Mar 16 16:18:13 2018 +0530 Staging: comedi: drivers: ni_atmio.c: fixed multi-line derefernce issue Fixed coding style issue. Signed-off-by: Pratik Jain Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_atmio.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 44f689367282cef1220c1571b44a8f85129f6148 Author: Rohit Kumar Date: Fri Mar 16 01:08:59 2018 +0530 drivers:staging:android:ashmem: Changing return type from int to loff_t Changing return type from int to loff_t. Actual return type of the function (vfs_llseek) is loff_t (long long). Here due to implicit converion from long long to int, result will be implementation defined. Signed-off-by: Rohit Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ashmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 294fb1d2a260eda409b22b9896bbeef56d8d2d26 Author: Phillip Potter Date: Thu Mar 15 18:13:30 2018 +0000 staging: android: ion: Update wording in drivers/staging/android/ion/Kconfig Changes the usage of the word 'Chose' to 'Choose' in the ION Memory Manager Kconfig. Signed-off-by: Phillip Potter Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 690dc62662efae206608f2951d0d7a7fb61ba8f7 Author: Rex Zhu Date: Fri Mar 16 16:16:27 2018 +0800 drm/amd/pp: Remove unneeded void * casts for Vega10 Removes unneeded void * casts for the following pointers: hwmgr->backend hwmgr->smu_backend Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 184 ++++++++------------- .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 15 +- .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 14 +- .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 12 +- 4 files changed, 87 insertions(+), 138 deletions(-) commit 2538090cb62ab85d8e685bf79c31cc15f41f2629 Author: Rex Zhu Date: Fri Mar 16 16:56:58 2018 +0800 drm/amd/pp: Delete get_xclk function in powerplay (v2) use asic's callback function get_xclk in amdgpu v2: squash in removal of leftover debug info (drm/amd/pp: Delete debug info in smu7_hwmgr.c) (Rex) Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 5 +--- drivers/gpu/drm/amd/include/cgs_common.h | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 27 ++-------------------- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.h | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 4 ++-- .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 4 ++-- .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.h | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 2 +- .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 +- .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 6 ++--- .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 +- 12 files changed, 15 insertions(+), 43 deletions(-) commit f9f5dc19509bbef6f5e675346f1a7d7b846bdb12 Author: Shanker Donthineni Date: Mon Mar 5 11:06:43 2018 -0600 arm64: KVM: Use SMCCC_ARCH_WORKAROUND_1 for Falkor BP hardening The function SMCCC_ARCH_WORKAROUND_1 was introduced as part of SMC V1.1 Calling Convention to mitigate CVE-2017-5715. This patch uses the standard call SMCCC_ARCH_WORKAROUND_1 for Falkor chips instead of Silicon provider service ID 0xC2001700. Cc: # 4.14+ Signed-off-by: Shanker Donthineni Signed-off-by: Marc Zyngier arch/arm64/include/asm/cpucaps.h | 2 +- arch/arm64/include/asm/kvm_asm.h | 2 -- arch/arm64/kernel/bpi.S | 8 ------ arch/arm64/kernel/cpu_errata.c | 55 ++++++++++++++-------------------------- arch/arm64/kvm/hyp/entry.S | 12 --------- arch/arm64/kvm/hyp/switch.c | 10 -------- 6 files changed, 20 insertions(+), 69 deletions(-) commit c7d30b40a240d6433eb016990632c11e3e7dcc36 Author: Rex Zhu Date: Fri Mar 16 15:26:15 2018 +0800 drm/amd/pp: Clean up header file for Vega10 Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 11 ++++++++++- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h | 2 ++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 1 - drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 11 +---------- drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h | 5 ----- 6 files changed, 13 insertions(+), 18 deletions(-) commit 3f9ca14a1d5d566ecc23718c1782cd9fa3713fc1 Author: Rex Zhu Date: Fri Mar 16 15:16:10 2018 +0800 drm/amd/pp: Move functions to smu backend table for vega10 Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 36 ++++++++--------- .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 7 ++-- drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 8 ++++ drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c | 4 +- .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 45 ++++++++++------------ .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h | 14 +------ 6 files changed, 53 insertions(+), 61 deletions(-) commit 9281c1f8a470263f8e7091027c729b36b0783eed Author: Rex Zhu Date: Fri Mar 16 13:56:18 2018 +0800 drm/amd/pp: Mark bunches of functins in vega10_smumgr.c static Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 10 +++++----- drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h | 3 --- 2 files changed, 5 insertions(+), 8 deletions(-) commit 0b10f20022b371633a34218265138e3f44f4b98d Author: Rex Zhu Date: Fri Mar 16 13:43:42 2018 +0800 drm/amd/pp: Remove dead functions in vega10_smumgr.c use smc_table_manager function to copy/save tables to/from smu. Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 38 ---------------------- .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h | 2 -- 2 files changed, 40 deletions(-) commit 699f47951e79b6e0ad33f7d7406c6a574293e339 Author: Rex Zhu Date: Fri Mar 16 12:40:16 2018 +0800 drm/amdgpu: Delete dead code when early init Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 5 ----- drivers/gpu/drm/amd/amdgpu/vi.c | 5 ----- 2 files changed, 10 deletions(-) commit 7206dc93a58fb76421c4411eefa3c003337bcb2d Author: Suzuki K Poulose Date: Mon Mar 12 10:04:14 2018 +0000 arm64: Expose Arm v8.4 features Expose the new features introduced by Arm v8.4 extensions to Arm v8-A profile. These include : 1) Data indpendent timing of instructions. (DIT, exposed as HWCAP_DIT) 2) Unaligned atomic instructions and Single-copy atomicity of loads and stores. (AT, expose as HWCAP_USCAT) 3) LDAPR and STLR instructions with immediate offsets (extension to LRCPC, exposed as HWCAP_ILRCPC) 4) Flag manipulation instructions (TS, exposed as HWCAP_FLAGM). Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon Documentation/arm64/cpu-feature-registers.txt | 10 ++++++++++ Documentation/arm64/elf_hwcaps.txt | 16 ++++++++++++++++ arch/arm64/include/asm/sysreg.h | 3 +++ arch/arm64/include/uapi/asm/hwcap.h | 4 ++++ arch/arm64/kernel/cpufeature.c | 7 +++++++ arch/arm64/kernel/cpuinfo.c | 4 ++++ 6 files changed, 44 insertions(+) commit 847ecd3fa311cde0f10a1b66c572abb136742b1d Author: Suzuki K Poulose Date: Mon Mar 12 10:04:13 2018 +0000 arm64: Documentation: cpu-feature-registers: Remove RES0 fields Remove the invisible RES0 field entries from the table, listing fields in CPU ID feature registers, as : 1) We are only interested in the user visible fields. 2) The field description may not be up-to-date, as the field could be assigned a new meaning. 3) We already explain the rules of the fields which are not visible. Cc: Catalin Marinas Cc: Will Deacon Acked-by: Mark Rutland Reviewed-by: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon Documentation/arm64/cpu-feature-registers.txt | 8 -------- 1 file changed, 8 deletions(-) commit 350e1dad0dd8c55750f9d4fa6b19cea1a0037ace Author: Ard Biesheuvel Date: Sat Mar 10 14:59:29 2018 +0000 arm64: asm: drop special versions of adr_l/ldr_l/str_l for modules Now that we started keeping modules within 4 GB of the core kernel in all cases, we no longer need to special case the adr_l/ldr_l/str_l macros for modules to deal with them being loaded farther away. Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) commit bd99f9a159b072be743c6681f81e06b9ebd370a4 Author: Arnd Bergmann Date: Tue Mar 13 12:41:41 2018 +0100 arm64: fix undefined reference to 'printk' The printk symbol was intended as a generic address that is always exported, however that turned out to be false with CONFIG_PRINTK=n: ERROR: "printk" [arch/arm64/kernel/arm64-reloc-test.ko] undefined! This changes the references to memstart_addr, which should be there regardless of configuration. Fixes: a257e02579e4 ("arm64/kernel: don't ban ADRP to work around Cortex-A53 erratum #843419") Acked-by: Ard Biesheuvel Signed-off-by: Arnd Bergmann Signed-off-by: Will Deacon arch/arm64/kernel/reloc_test_core.c | 2 +- arch/arm64/kernel/reloc_test_syms.S | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 6846b3b5127a9e041f18f0019c38c1fd08acfbaa Author: Bjorn Helgaas Date: Wed Mar 14 07:52:30 2018 -0500 PCI: Report quirks that take more than 10ms With "initcall_debug", we report how long every PCI quirk took. Even without "initcall_debug", report the runtime of any quirk that takes longer than 10ms. This is to make it easier to notice quirks that slow down boot. This was motivated by a report from Paul Menzel that PCI final quirks took half a second at boot. Link: https://lkml.kernel.org/r/44cada166e42007d27b4c3e3aa0744d7@molgen.mpg.de Reported-by: Paul Menzel Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit d89bd9195db62f51a5aaa88d887d81a7967554bd Author: Bjorn Helgaas Date: Wed Mar 14 07:42:56 2018 -0500 PCI: Report quirk timings with pci_info() instead of pr_debug() With "initcall_debug", we report how long every PCI quirk took. Previously we used pr_debug(), which means you have to figure out how to enable debug output. Log these timings using pci_info() instead so it doesn't depend on DEBUG, CONFIG_DYNAMIC_DEBUG, etc. Also, don't log anything at all unless "initcall_debug" is specified. This matches what we do in do_one_initcall_debug(). Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit f9ea894ca59a7abd931e52700bbe12e87e891c1e Author: Bjorn Helgaas Date: Mon Mar 19 13:06:34 2018 -0500 PCI/VPD: Move VPD structures to vpd.c The VPD-related structures are only used in vpd.c, so move them from drivers/pci/pci.h to vpd.c. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/pci.h | 17 ----------------- drivers/pci/vpd.c | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) commit 996058573b22a7d4e54e281fc624db4b32d85eb4 Author: Bjorn Helgaas Date: Mon Mar 19 13:06:24 2018 -0500 PCI/VPD: Move VPD quirks to vpd.c Move the VPD-related quirks from quirks.c to vpd.c, which removes the need for struct pci_vpd outside vpd.c. The goal is to encapsulate all the VPD code and structures in vpd.c. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 121 --------------------------------------------------- drivers/pci/vpd.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+), 121 deletions(-) commit b1c615c48fa93db64310e8d1a457b364a486fde8 Author: Bjorn Helgaas Date: Mon Mar 19 13:06:17 2018 -0500 PCI/VPD: Move VPD sysfs code to vpd.c Move the VPD-related sysfs code from pci-sysfs.c to vpd.c. This follows the pattern of pcie_aspm_create_sysfs_dev_files(). The goal is to encapsulate all the VPD code and structures in vpd.c. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/pci-sysfs.c | 67 +++---------------------------------------------- drivers/pci/pci.h | 2 ++ drivers/pci/vpd.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 64 deletions(-) commit f0eb77ae6b857bf8118f7a8ee0a8ba076feed70d Author: Bjorn Helgaas Date: Mon Mar 19 13:06:11 2018 -0500 PCI/VPD: Move VPD access code to vpd.c Move the VPD-related code from access.c to vpd.c. The goal is to encapsulate all the VPD code and structures in vpd.c. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/access.c | 368 -------------------------------------------------- drivers/pci/vpd.c | 369 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 369 insertions(+), 368 deletions(-) commit 61147f391a8b3bdde4c0a631dd132d85d00b90a0 Author: Bodong Wang Date: Mon Mar 19 15:10:30 2018 +0200 IB/mlx5: Packet packing enhancement for RAW QP Enable RAW QP to be able to configure burst control by modify_qp. By using burst control with rate limiting, user can achieve best performance and accuracy. The burst control information is passed by user through udata. This patch also reports burst control capability for mlx5 related hardwares, burst control is only marked as supported when both packet_pacing_burst_bound and packet_pacing_typical_size are supported. Signed-off-by: Bodong Wang Reviewed-by: Daniel Jurgens Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 4 ++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- drivers/infiniband/hw/mlx5/qp.c | 94 ++++++++++++++++++++++++++++-------- include/uapi/rdma/mlx5-abi.h | 19 +++++++- 4 files changed, 98 insertions(+), 21 deletions(-) commit 05d3ac978ed25b753bfe34fe76c50c31ee506a82 Author: Bodong Wang Date: Mon Mar 19 15:10:29 2018 +0200 net/mlx5: Packet pacing enhancement Add two new parameters: max_burst_sz and typical_pkt_size (both in bytes) to rate limit configurations. max_burst_sz: The device will schedule bursts of packets for an SQ connected to this rate, smaller than or equal to this value. Value 0x0 indicates packet bursts will be limited to the device defaults. This field should be used if bursts of packets must be strictly kept under a certain value. typical_pkt_size: When the rate limit is intended for a stream of similar packets, stating the typical packet size can improve the accuracy of the rate limiter. The expected packet size will be the same for all SQs associated with the same rate limit index. Ethernet driver is updated according to this change, but these two parameters will be kept as 0 due to lacking of proper way to get the configurations from user space which requires to change ndo_set_tx_maxrate interface. Signed-off-by: Bodong Wang Reviewed-by: Daniel Jurgens Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 19 ++++--- drivers/net/ethernet/mellanox/mlx5/core/rl.c | 63 +++++++++++++++-------- include/linux/mlx5/driver.h | 15 ++++-- include/linux/mlx5/mlx5_ifc.h | 12 ++++- 4 files changed, 76 insertions(+), 33 deletions(-) commit fec0ef3f52735e1e9ac60f8644d4015ae21c0928 Author: Andy Shevchenko Date: Wed Feb 14 17:48:00 2018 +0200 clk: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Signed-off-by: Andy Shevchenko Signed-off-by: Stephen Boyd drivers/clk/clk.c | 60 +++++++------------------------------------------------ 1 file changed, 7 insertions(+), 53 deletions(-) commit 063f12e0deb000a38ba43fd2456727ec5a604f1c Author: Peter Maydell Date: Tue Mar 6 19:47:41 2018 +0000 KVM: arm: Reserve bit in KVM_REG_ARM encoding for secure/nonsecure We have a KVM_REG_ARM encoding that we use to expose KVM guest registers to userspace. Define that bit 28 in this encoding indicates secure vs nonsecure, so we can distinguish the secure and nonsecure banked versions of a banked AArch32 register. For KVM currently, all guest registers are nonsecure, but defining the bit is useful for userspace. In particular, QEMU uses this encoding as part of its on-the-wire migration format, and needs to be able to describe secure-bank registers when it is migrating (fully emulated) EL3-enabled CPUs. Signed-off-by: Peter Maydell Signed-off-by: Marc Zyngier arch/arm/include/uapi/asm/kvm.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5fbb0df6f68e31a586b947433e93ba9654c8080f Merge: 4b472ff 27e91ad Author: Marc Zyngier Date: Mon Mar 19 17:43:01 2018 +0000 Merge tag 'kvm-arm-fixes-for-v4.16-2' into HEAD Resolve conflicts with current mainline commit df7e40425813c50cd252e6f5e348a81ef1acae56 Author: Yixian Liu Date: Mon Mar 19 21:36:07 2018 +0800 RDMA/hns: Fix init resp when alloc ucontext The data in resp will be copied from kernel to userspace, thus it needs to be initialized to zeros to avoid copying uninited stack memory. Reported-by: Dan Carpenter Fixes: e088a685eae9 ("RDMA/hns: Support rq record doorbell for the user space") Signed-off-by: Yixian Liu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b19744e965abed7ad0167c25097f405b88ce5d13 Author: Parav Pandit Date: Mon Mar 19 08:07:14 2018 +0200 IB/core: Remove unimplemented ib_peek_cq ib_peek_cq() verb doesn't seem be implemented in current code. There is some past reference to it at [1] about it being unimplemented. Lot of user documentation created out of kdoc refers to this unimplemented API. Therefore, remove unimplemented API. [1] http://lists.openfabrics.org/pipermail/ofw/2008-May/002465.html Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe include/rdma/ib_verbs.h | 12 ------------ 1 file changed, 12 deletions(-) commit 6d5b2047fe62ed83a90f0ecdf1cc9b4ae6fcc974 Author: Parav Pandit Date: Mon Mar 19 07:59:59 2018 +0200 IB/core: Use rdma_is_port_valid() Use rdma_is_port_valid() which performs port validity check instead of open coding the same check. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cache.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 958d2c1ba37680b765a089dc374cc199fb61619b Author: Jason Gunthorpe Date: Thu Mar 15 21:18:14 2018 -0600 RDMA/bnxt: Fix structure layout for bnxt_re_pd_resp What is going on here is a bit subtle, in the kernel there is no problem because the struct is copied using copy_from_user, so it can safely have an 8 byte alignment, however in userspace it must be constructed by concatenation with the ib_uverbs_alloc_pd_resp struct. This is due to the required memory layout to execute the command. Since ibv_uverbs_alloc_pd_resp is only 4 bytes long, this causes misalignment, and the user space will experience an unexpected padding. Currently it works around this via pointer maths. Make everything more robust by having the compiler reduce the alignment of the struct to 4. The userspace has assertions to ensure this works properly in all situations. Signed-off-by: Jason Gunthorpe include/uapi/rdma/bnxt_re-abi.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 7672ed33c4c15dbe9d56880683baaba4227cf940 Author: Honggang Li Date: Fri Mar 16 10:37:13 2018 +0800 IB/mlx5: Set the default active rate and width to QDR and 4X Before commit f1b65df5a232 ("IB/mlx5: Add support for active_width and active_speed in RoCE"), the mlx5_ib driver set the default active_width and active_speed to IB_WIDTH_4X and IB_SPEED_QDR. When the RoCE port is down, the RoCE port does not negotiate the active width with the remote side, causing the active width to be zero. When running userspace ibstat to view the port status, ibstat will panic as it reads an invalid width from sys file. This patch restores the original behavior. Fixes: f1b65df5a232 ("IB/mlx5: Add support for active_width and active_speed in RoCE"). Signed-off-by: Honggang Li Reviewed-by: Hal Rosenstock Reviewed-by: Noa Osherovich Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 3 +++ 1 file changed, 3 insertions(+) commit 311d0da97480d19d4ecd57f3ee264e3c232d78e5 Author: Honggang Li Date: Thu Mar 15 17:02:13 2018 +0800 IB/core: Set speed string to SDR for invalid active rates Before commit f1b65df5a232 ("IB/mlx5: Add support for active_width and active_speed in RoCE"), the mlx5_ib driver set default active_width and active_speed to IB_WIDTH_4X and IB_SPEED_QDR. Now, the active_width and active_speed are zeros if the RoCE port is in DOWN state. The speed string should be set to " SDR" instead of a blank string when active_speed is zero. Signed-off-by: Honggang Li Signed-off-by: Jason Gunthorpe drivers/infiniband/core/sysfs.c | 1 + 1 file changed, 1 insertion(+) commit f729863a8c9693527257e63975f615b53ee7622e Author: Tejun Heo Date: Wed Mar 14 12:45:15 2018 -0700 fs/aio: Use rcu_work instead of explicit rcu and work item Workqueue now has rcu_work. Use it instead of open-coding rcu -> work item bouncing. Signed-off-by: Tejun Heo fs/aio.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit 8f36aaec9c929f2864196b0799203491f6a67dc6 Author: Tejun Heo Date: Wed Mar 14 12:45:14 2018 -0700 cgroup: Use rcu_work instead of explicit rcu and work item Workqueue now has rcu_work. Use it instead of open-coding rcu -> work item bouncing. Signed-off-by: Tejun Heo include/linux/cgroup-defs.h | 2 +- kernel/cgroup/cgroup.c | 21 +++++++-------------- 2 files changed, 8 insertions(+), 15 deletions(-) commit 05f0fe6b74dbd7690a4cbd61810948b7d575576a Author: Tejun Heo Date: Wed Mar 14 12:45:13 2018 -0700 RCU, workqueue: Implement rcu_work There are cases where RCU callback needs to be bounced to a sleepable context. This is currently done by the RCU callback queueing a work item, which can be cumbersome to write and confusing to read. This patch introduces rcu_work, a workqueue work variant which gets executed after a RCU grace period, and converts the open coded bouncing in fs/aio and kernel/cgroup. v3: Dropped queue_rcu_work_on(). Documented rcu grace period behavior after queue_rcu_work(). v2: Use rcu_barrier() instead of synchronize_rcu() to wait for completion of previously queued rcu callback as per Paul. Signed-off-by: Tejun Heo Acked-by: "Paul E. McKenney" Cc: Linus Torvalds include/linux/workqueue.h | 23 ++++++++++++++++++++ kernel/workqueue.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) commit 12d80bca0bb7178bc85a32e19795ff249a5903ad Author: Paweł Jabłoński Date: Mon Mar 19 09:28:04 2018 -0700 i40e: Fix the polling mechanism of GLGEN_RSTAT.DEVSTATE This fixes the polling mechanism of GLGEN_RSTAT.DEVSTATE in the PF Reset path when Global Reset is in progress. While the driver is polling for the end of the PF Reset and the Global Reset is triggered, abandon the PF Reset path and prepare for the upcoming Global Reset. Signed-off-by: Paweł Jabłoński Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_common.c | 35 ++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 6 deletions(-) commit 6b9a9c26ef2f78911ee848446f845b77c45032f4 Author: Jacob Keller Date: Mon Mar 19 09:28:04 2018 -0700 i40evf: remove flags that are never used These flags were defined, but there is no use within the driver code, so we don't need to keep them. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf.h | 3 --- 1 file changed, 3 deletions(-) commit 3f8c8437277c51fbd7af175240112f831c590845 Author: Patryk Małek Date: Mon Mar 19 09:28:04 2018 -0700 i40e: Prevent setting link speed on I40E_DEV_ID_25G_B Setting link settings on backplane devices shouldn't be allowed. This patch adds one more device id to the list which we check that against. Signed-off-by: Patryk Małek Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 1 + 1 file changed, 1 insertion(+) commit 85925cd0b84eb16cf2dfd730758c3266a243569c Author: Doug Dziggel Date: Mon Mar 19 09:28:04 2018 -0700 i40e: Fix incorrect return types Fix return types from i40e_status to enum i40e_status_code. Signed-off-by: Doug Dziggel Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_common.c | 4 ++-- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 1cd618838b9703eabe4a75badf433382b12f6bef Author: Arnaldo Carvalho de Melo Date: Mon Mar 19 10:51:00 2018 -0300 perf tests bp_account: Fix build with clang-6 To shut up this compiler warning: CC /tmp/build/perf/tests/bp_account.o CC /tmp/build/perf/tests/task-exit.o CC /tmp/build/perf/tests/sw-clock.o tests/bp_account.c:106:20: error: pointer type mismatch ('int (*)(void)' and 'void *') [-Werror,-Wpointer-type-mismatch] void *addr = is_x ? test_function : (void *) &the_var; ^ ~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~ 1 error generated. Noticed with clang 6 on fedora rawhide. [perfbuilder@44490f0e7241 perf]$ clang -v clang version 6.0.0 (tags/RELEASE_600/final) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/bin Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/8 Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/8 Selected GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/8 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Selected multilib: .;@m64 [perfbuilder@44490f0e7241 perf]$ Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: 032db28e5fa3 ("perf tests: Add breakpoint accounting/modify test") Link: https://lkml.kernel.org/n/tip-a3jnkzh4xam0l954de5tn66d@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/bp_account.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 854e55ad289ef8888e7991f0ada85d5846f5afb9 Author: Josh Poimboeuf Date: Thu Mar 15 22:11:54 2018 -0500 objtool, perf: Fix GCC 8 -Wrestrict error Starting with recent GCC 8 builds, objtool and perf fail to build with the following error: ../str_error_r.c: In function ‘str_error_r’: ../str_error_r.c:25:3: error: passing argument 1 to restrict-qualified parameter aliases with argument 5 [-Werror=restrict] snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, %p, %zd)=%d", errnum, buf, buflen, err); The code seems harmless, but there's probably no benefit in printing the 'buf' pointer in this situation anyway, so just remove it to make GCC happy. Reported-by: Laura Abbott Signed-off-by: Josh Poimboeuf Tested-by: Laura Abbott Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/20180316031154.juk2uncs7baffctp@treble Signed-off-by: Arnaldo Carvalho de Melo tools/lib/str_error_r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0461794a1dcaf552b507e23788777f718b736a1 Author: Masami Hiramatsu Date: Sat Mar 17 21:52:25 2018 +0900 perf probe: Use right type to access array elements Current 'perf probe' converts the type of array-elements incorrectly. It always converts the types as a pointer of array. This passes the "array" type DIE to the type converter so that it can get correct "element of array" type DIE from it. E.g. ==== $ cat hello.c #include void foo(int a[]) { printf("%d\n", a[1]); } void main() { int a[3] = {4, 5, 6}; printf("%d\n", a[0]); foo(a); } $ gcc -g hello.c -o hello $ perf probe -x ./hello -D "foo a[1]" ==== Without this fix, above outputs ==== p:probe_hello/foo /tmp/hello:0x4d3 a=+4(-8(%bp)):u64 ==== The "u64" means "int *", but a[1] is "int". With this, ==== p:probe_hello/foo /tmp/hello:0x4d3 a=+4(-8(%bp)):s32 ==== So, "int" correctly converted to "s32" Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Shuah Khan Cc: Steven Rostedt Cc: Tom Zanussi Cc: linux-kselftest@vger.kernel.org Cc: linux-trace-users@vger.kernel.org Fixes: b2a3c12b7442 ("perf probe: Support tracing an entry of array") Link: http://lkml.kernel.org/r/152129114502.31874.2474068470011496356.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-finder.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 4c9cb2c2b4b5530717f74b2252f8cc4c45b2a918 Author: Arnaldo Carvalho de Melo Date: Fri Mar 16 13:28:09 2018 -0300 perf annotate: Use ops->target.name when available for unresolved call targets There is a bug where when using 'perf annotate timerqueue_add' the target for its only routine called with the 'callq' instruction, 'rb_insert_color', doesn't get resolved from its address when parsing that 'callq' instruction. That symbol resolution works when using 'perf report --tui' and then doing annotation for 'timerqueue_add' from there, the vmlinux dso->symbols rb_tree somehow gets in a state that we can't find that address, that is a bug that has to be further investigated. But since the objdump output has the function name, i.e. the raw objdump disassembled line looks like: So, before: # perf annotate timerqueue_add │ mov %rbx,%rdi │ mov %rbx,(%rdx) │ → callq *ffffffff8184dc80 │ mov 0x8(%rbp),%rdx │ test %rdx,%rdx │ ↓ je 67 # perf report │ mov %rbx,%rdi │ mov %rbx,(%rdx) │ → callq rb_insert_color │ mov 0x8(%rbp),%rdx │ test %rdx,%rdx │ ↓ je 67 And after both look the same: # perf annotate timerqueue_add │ mov %rbx,%rdi │ mov %rbx,(%rdx) │ → callq rb_insert_color │ mov 0x8(%rbp),%rdx │ test %rdx,%rdx │ ↓ je 67 From 'perf report' one can annotate and navigate to that 'rb_insert_color' function, but not directly from 'perf annotate timerqueue_add', that remains to be investigated and fixed. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-nkktz6355rhqtq7o8atr8f8r@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 3 +++ 1 file changed, 3 insertions(+) commit a8403912d04e2c8271653bb5b7f6294dc6d322ac Author: Arnaldo Carvalho de Melo Date: Fri Mar 16 16:24:34 2018 -0300 perf top: Document --ignore-vmlinux We've had this since 2013, document it. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: Willy Tarreau Fixes: fc2be6968e99 ("perf symbols: Add new option --ignore-vmlinux for perf top") Link: https://lkml.kernel.org/n/tip-0jwfueooddwfsw9r603belxi@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-top.txt | 3 +++ 1 file changed, 3 insertions(+) commit 35bea90436246507ec9c5bfc0c34d61696a572c8 Author: Jacob Keller Date: Mon Mar 19 09:28:04 2018 -0700 i40e: add doxygen comment for new mode parameter A recent patch updated the signature for i40e_aq_set_switch_config() to add a new parameter 'mode'. It forgot to document the parameter in the doxygen function header comment. Add the parameter to the function description now. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_common.c | 1 + 1 file changed, 1 insertion(+) commit ddbb8d5dd9b7f58293f196eab71449d0242c028d Author: Shiraz Saleem Date: Mon Mar 19 09:28:03 2018 -0700 i40e: Close client on suspend and restore client MSIx on resume During suspend client MSIx vectors are freed while they are still in use causing a crash on entering S3. Fix this calling client close before freeing up its MSIx vectors. Also update the client MSIx vectors on resume before client open is called. Fixes commit b980c0634fe5 ("i40e: shutdown all IRQs and disable MSI-X when suspended") Reported-by: Stefan Assmann Signed-off-by: Shiraz Saleem Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_client.c | 16 +++++++++++++--- drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) commit 88244a48d2ddebbe041ec4f07e40598cfd8bf06f Author: Patryk Małek Date: Mon Mar 19 09:28:03 2018 -0700 i40e: Prevent setting link speed on KX_X722 Setting link settings on backplane devices shouldn't be allowed. This patch adds one more device id to the list which we check that against. Signed-off-by: Patryk Małek Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 32c23b47dbd9765c6ec2542400f41f0d47a7d2c1 Author: Jan Sokolowski Date: Mon Mar 19 09:28:03 2018 -0700 i40e: Properly check allowed advertisement capabilities The i40e_set_link_ksettings and i40e_get_link_ksettings use different codepaths to check available and supported advertisement modes. This creates scenarios where it's possible to set a mode that's not allowed, resulting in a link down. Fix setting advertisement in i40e_set_link_ksettings by calling i40e_get_link_ksettings to check what modes are allowed. Signed-off-by: Jan Sokolowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit b7a313d84e853049062011d78cb04b6decd12f5c Author: Jiri Olsa Date: Mon Mar 19 09:29:02 2018 +0100 perf tools: Fix python extension build for gcc 8 The gcc 8 compiler won't compile the python extension code with the following errors (one example): python.c:830:15: error: cast between incompatible function types from \ ‘PyObject * (*)(struct pyrf_evsel *, PyObject *, PyObject *)’ \ uct _object * (*)(struct pyrf_evsel *, struct _object *, struct _object *)’} to \ ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _objeuct \ _object *)’} [-Werror=cast-function-type] .ml_meth = (PyCFunction)pyrf_evsel__open, The problem with the PyMethodDef::ml_meth callback is that its type is determined based on the PyMethodDef::ml_flags value, which we set as METH_VARARGS | METH_KEYWORDS. That indicates that the callback is expecting an extra PyObject* arg, and is actually PyCFunctionWithKeywords type, but the base PyMethodDef::ml_meth type stays PyCFunction. Previous gccs did not find this, gcc8 now does. Fixing this by silencing this warning for python.c build. Commiter notes: Do not do that for CC=clang, as it breaks the build in some clang versions, like the ones in fedora up to fedora27: fedora:25:error: unknown warning option '-Wno-cast-function-type'; did you mean '-Wno-bad-function-cast'? [-Werror,-Wunknown-warning-option] fedora:26:error: unknown warning option '-Wno-cast-function-type'; did you mean '-Wno-bad-function-cast'? [-Werror,-Wunknown-warning-option] fedora:27:error: unknown warning option '-Wno-cast-function-type'; did you mean '-Wno-bad-function-cast'? [-Werror,-Wunknown-warning-option] # those have: clang version 3.9.1 (tags/RELEASE_391/final) The one in rawhide accepts that: clang version 6.0.0 (tags/RELEASE_600/final) Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Josh Poimboeuf Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sergey Senozhatsky Link: http://lkml.kernel.org/r/20180319082902.4518-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/setup.py | 2 ++ 1 file changed, 2 insertions(+) commit 640a8af5841fd66a26e26f5b9fb5476a3755852a Author: Alexander Duyck Date: Mon Mar 19 09:28:03 2018 -0700 i40evf: Reorder configure_clsflower to avoid deadlock on error While doing some code review I noticed that we can get into a state where we exit with the "IN_CRITICAL_TASK" bit set while notifying the PF of flower filters. This patch is meant to address that plus tweak the ordering of the while loop waiting on it slightly so that we don't wait an extra period after we have failed for the last time. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 003456f564205ca3c3b8b4c9f9c22a0846d81fd7 Author: Uwe Kleine-König Date: Fri Mar 16 11:01:24 2018 +0100 arm64: dts: armada-3720-espressobin: Document URL for schematic The schematic of the espressobin is publicly available, add a comment where to find it. Signed-off-by: Uwe Kleine-König Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 3 +++ 1 file changed, 3 insertions(+) commit 80782927e3aa8be17c804c35ad310b7d6f8c1499 Author: Justin Skists Date: Sat Mar 17 09:15:41 2018 +0000 staging: lustre: Fix unneeded byte-ordering cast Fix sparse warning: CHECK drivers/staging//lustre/lnet/lnet/acceptor.c drivers/staging//lustre/lnet/lnet/acceptor.c:243:30: warning: cast to restricted __le32 LNET_PROTO_TCP_MAGIC, as a define, is already CPU byte-ordered when compared to 'magic', so no need for a cast. Signed-off-by: Justin Skists Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/acceptor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad7d95e979eb16362144893784dc3c2bdb8884b7 Author: Nishka Dasgupta Date: Thu Mar 15 17:59:15 2018 +0000 staging: sm750fb: Remove typedef Change typedef enum to enum and ensure compatibility of change. Issue found with checkpatch. Signed-off-by: Nishka Dasgupta Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_display.c | 2 +- drivers/staging/sm750fb/ddk750_display.h | 7 +++---- drivers/staging/sm750fb/sm750_hw.c | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) commit 816148138518da9362a3b0c46f3cdf3d97282008 Author: Nishka Dasgupta Date: Wed Mar 14 18:29:30 2018 +0000 staging: ks7010: Remove braces around single statement Remove braces around single statement. Issue found with checkpatch. Signed-off-by: Nishka Dasgupta Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1d49c89dc80e16b3313e60e3fadc3ebc3cde7cba Author: Nishka Dasgupta Date: Wed Mar 14 18:22:10 2018 +0000 staging: speakup: Add blank line after declaration Add blank line after declaration. Issue found with checkpatch. Signed-off-by: Nishka Dasgupta Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/spk_ttyio.c | 1 + 1 file changed, 1 insertion(+) commit b15c9d3550767d87d07d894e374e16bf8570ed9a Author: Gregory CLEMENT Date: Wed Mar 14 17:19:28 2018 +0100 ARM64: dts: marvell: armada-cp110: Add registers clock for the PCIe nodes This extra clock is needed to access the registers of the PCIe host controller used on CP110 component of the Armada 7K/8K SoCs. This follow the changes already made in the binding documentation (as well as in the driver): "PCI: armada8k: Fix clock resource by adding a register clock" Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit ef04faf106c430c3f830f93f3b2fb652b5537d7a Author: Gregory CLEMENT Date: Wed Mar 14 17:19:27 2018 +0100 ARM64: dts: marvell: armada-cp110: Add registers clock for the NAND node This extra clock is needed to access the registers of the NAND controller used on CP110 component of the Armada 7K/8K SoCs. This follow the changes already made in the binding documentation (as well as in the driver): "mtd: nand: marvell: Fix clock resource by adding a register clock" Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3c7f7f1503d20b14e22f64c27dc13522f5d60707 Author: Gregory CLEMENT Date: Wed Mar 14 17:19:26 2018 +0100 ARM64: dts: marvell: armada-cp110: Add registers clock for the crypto node This extra clock is needed to access the registers of the safexcel EIP97 used on CP110 component of the Armada 7K/8K SoCs. This follow the changes already made in the binding documentation (as well as in the driver): "crypto: inside-secure - fix clock resource by adding a register clock" Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cc4d5aed829a08c64240f43a9dc3a471989c6054 Author: Gregory CLEMENT Date: Wed Mar 14 17:19:25 2018 +0100 ARM64: dts: marvell: armada-cp110: Add registers clock for the trng node This extra clock is needed to access the registers of the harware RNG used on CP110 component of the Armada 7K/8K SoCs. This follow the changes already made in the binding documentation (as well as in the driver): "hwrng: omap - Fix clock resource by adding a register clock" Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f1ebfab99df1032166c531cd48f8f942d10fe190 Author: Gregory CLEMENT Date: Wed Mar 14 17:19:24 2018 +0100 ARM64: dts: marvell: armada-cp110: Add registers clock for XOR engine nodes This extra clock is needed to access the registers of the XOR engine controller used on CP110 component of the Armada 7K/8K SoCs. This follow the changes already made in the binding documentation (as well as in the driver): "dmaengine: mv_xor_v2: Fix clock resource by adding a register clock" Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f03ad7f6c5ca38242d9d23e6d1c087c43b66e481 Author: Gregory CLEMENT Date: Wed Mar 14 17:19:23 2018 +0100 ARM64: dts: marvell: armada-cp110: Add registers clock for USB host nodes This extra clock is needed to access the registers of the USB host controller used on Armada 7K/8K SoCs. This follow the changes already made in the binding documentation (as well as in the driver): "usb: host: xhci-plat: Fix clock resource by adding a register clock" Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ceb18f511beeb8b750f027f170eb6d901a082e9a Author: Ruslan Bilovol Date: Mon Mar 19 03:46:02 2018 +0200 ALSA: usb-audio: move audioformat quirks to quirks.c Offload USB audio interface parsing function by moving quirks to a specially designed location (quirks.c) Signed-off-by: Ruslan Bilovol Signed-off-by: Takashi Iwai sound/usb/quirks.c | 34 ++++++++++++++++++++++++++++++++++ sound/usb/quirks.h | 4 ++++ sound/usb/stream.c | 30 +----------------------------- 3 files changed, 39 insertions(+), 29 deletions(-) commit 4654eba8cbb3fcf48c6fc24fbaffa0623d9faea2 Merge: 09b9ddf a6618f4 Author: Takashi Iwai Date: Mon Mar 19 16:59:34 2018 +0100 Merge branch 'for-linus' into for-next Back-merge of for-linus branch for applying the further UAC3 patches. Signed-off-by: Takashi Iwai commit 32463556a634f3e262581ed348705081706fccd0 Author: Maxime Ripard Date: Thu Mar 1 20:18:45 2018 +0100 drm/sun4i: backend: Check that we only have a single YUV plane Just like for the frontend, a single plane can use a YUV format. Make sure we have that constraint covered in our atomic_check. This is preliminary to the actual YUV support to make sure we don't end up in an impossible to support situation. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/2f8586493d9139b12efe7e94f65e9a149f818e0e.1519931807.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/sun4i/sun4i_backend.c | 49 +++++++++++++++++++++++++++++++++-- drivers/gpu/drm/sun4i/sun4i_backend.h | 1 + 2 files changed, 48 insertions(+), 2 deletions(-) commit e3d7fbab062b877b96c09ffb43733502cdc1bd0a Author: Markus Elfring Date: Fri Feb 2 21:21:12 2018 +0100 HSI: hsi_char: Delete an error message for a failed memory allocation in hsc_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sebastian Reichel drivers/hsi/clients/hsi_char.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 852041d1ce474a9e3ab81abc851985a6d05b05ba Author: Colin Ian King Date: Fri Mar 16 14:33:01 2018 +0000 HSI: ssi_protocol: fix spelling mistake: "trigerred" -> "triggered" Trivial fix to spelling mistake in dev_err error message text. Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel drivers/hsi/clients/ssi_protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d8236d17586f373e5c2b0d4cefccd4a5bef7a92 Author: Markus Elfring Date: Fri Feb 2 20:02:17 2018 +0100 HSI: ssi_protocol: Delete an error message for a failed memory allocation in ssi_protocol_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sebastian Reichel drivers/hsi/clients/ssi_protocol.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 80fb8a850ecdcdd515e1ea3d3d97901ff0085e50 Author: Markus Elfring Date: Fri Feb 2 20:57:23 2018 +0100 HSI: ssi_protocol: Fix a typo in two comment lines Adjust two words in this description. Signed-off-by: Markus Elfring Signed-off-by: Sebastian Reichel drivers/hsi/clients/ssi_protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9ab27d1d35fda0c5fce624083e92546a8545e7e5 Author: Bartlomiej Zolnierkiewicz Date: Fri Mar 16 17:15:47 2018 +0100 ata: add Amiga Gayle PATA controller driver Add Amiga Gayle PATA controller driver. It enables libata support for the on-board IDE interfaces on some Amiga models (A600, A1200, A4000 and A4000T) and also for IDE interfaces on the Zorro expansion bus (M-Tech E-Matrix 530 expansion card). Thanks to John Paul Adrian Glaubitz and Michael Schmitz for help with testing the driver. Tested-by: John Paul Adrian Glaubitz Cc: Michael Schmitz Cc: Geert Uytterhoeven Cc: Philippe Ombredanne Cc: Andy Shevchenko Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Tejun Heo drivers/ata/Kconfig | 12 +++ drivers/ata/Makefile | 1 + drivers/ata/pata_gayle.c | 219 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 232 insertions(+) commit 334789593c3fe1dd8f5c49c5a49b7e0e43dfdf1c Author: Chen-Yu Tsai Date: Thu Mar 15 19:41:33 2018 +0800 drm/sun4i: Add driver support for A80 display pipeline This patch adds support for the compatible strings of the A80 display pipeline. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180315114136.24747-6-wens@csie.org drivers/gpu/drm/sun4i/sun4i_backend.c | 7 +++++++ drivers/gpu/drm/sun4i/sun4i_drv.c | 12 ++++++++++-- drivers/gpu/drm/sun4i/sun6i_drc.c | 1 + 3 files changed, 18 insertions(+), 2 deletions(-) commit 54fb174216d8c9a80562056eccf11e7bd7c6b96b Author: Chen-Yu Tsai Date: Thu Mar 15 19:41:32 2018 +0800 drm/sun4i: Add compatible strings for the A80 display pipeline This patch adds compatible strings for the remaining documented components of the Allwinner A80 display pipeline. Reviewed-by: Rob Herring Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180315114136.24747-5-wens@csie.org Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6664e9dc5383a6e2998fffa41bb697517de57622 Author: Chen-Yu Tsai Date: Thu Mar 15 19:41:31 2018 +0800 drm/sun4i: Add support for A80 TCONs The Allwinner A80 SoC has 2 documented TCONs. The display pipeline diagram from the user manual shows a third TCON, but it's missing an interrupt line, and its registers are not explained either. It's also not used in Allwinner's vendor BSP. The first TCON only has channel 0, for LCD panel output. The TCON hardware setup is peculiar in that the eDP reset must also be deasserted to allow access to the TCON. How the eDP module is wired in the SoC itself is never explained. The second TCON only has channel 1, and its output is connected to the HDMI encoder block. This patch adds a "needs_edp_reset" field to the tcon quirks structure, and adds quirks and compatible strings for the 2 documented TCONs. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180315114136.24747-4-wens@csie.org drivers/gpu/drm/sun4i/sun4i_tcon.c | 27 +++++++++++++++++++++++++++ drivers/gpu/drm/sun4i/sun4i_tcon.h | 1 + 2 files changed, 28 insertions(+) commit 74cf5cb58260b94156b3e74dc6e5f12a525f4654 Author: Chen-Yu Tsai Date: Thu Mar 15 19:41:30 2018 +0800 drm/sun4i: Add DT binding for Detail Enhancement Unit in Allwinner A80 SoC The display pipeline on the A80 SoC has what is called the Detail Enhancement Unit, or DEU for short, block in between the display frontend and backend. This unit can sharpen images in both luma and chroma channels. It seems to also do colorspace conversion. This patch adds the device tree binding for this hardware block. Reviewed-by: Rob Herring Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180315114136.24747-3-wens@csie.org .../bindings/display/sunxi/sun4i-drm.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit e5878732a521dd31ea6377875e49adc424503e5b Author: Richard Zhu Date: Mon Mar 19 10:02:18 2018 +0800 ahci: imx: add the imx6qp ahci sata support - Regarding to imx6q ahci sata, imx6qp ahci sata has the reset mechanism. Add the imx6qp ahci sata support in this commit. - Use the specific reset callback for imx53 sata, and use the default ahci_ops.softreset for the others. Signed-off-by: Richard Zhu Signed-off-by: Tejun Heo Documentation/devicetree/bindings/ata/imx-sata.txt | 1 + drivers/ata/ahci_imx.c | 36 +++++++++++++++++++--- include/linux/mfd/syscon/imx6q-iomuxc-gpr.h | 2 ++ 3 files changed, 35 insertions(+), 4 deletions(-) commit 70f6283a372bef685fd64564646a3b49a55be1ea Author: David Woodhouse Date: Mon Feb 19 13:01:23 2018 +0000 microblaze: Use generic pci_mmap_resource_range() Commit f719582435 ("PCI: Add pci_mmap_resource_range() and use it for ARM64") added this generic function with the intent of using it everywhere and ultimately killing the old arch-specific implementations. Let's get on with that eradication... Signed-off-by: David Woodhouse Signed-off-by: Michal Simek arch/microblaze/include/asm/pci.h | 7 +-- arch/microblaze/pci/pci-common.c | 99 ++++----------------------------------- 2 files changed, 13 insertions(+), 93 deletions(-) commit 97ccedd793ac490f1f16c57c275e9181f85ad1cb Author: Michal Simek Date: Fri Feb 23 10:11:19 2018 +0100 microblaze: Provide pgprot_device/writecombine macros for nommu These macros are required for generic mmap.c implementation created by: commit f719582435af ("PCI: Add pci_mmap_resource_range() and use it for ARM64") which Microblaze is going to use. Reported-by: kbuild test robot Suggested-by: David Woodhouse Signed-off-by: Michal Simek arch/microblaze/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) commit 3041228e0224a7ff69c575d9696319bbb40ef414 Author: Chen-Yu Tsai Date: Thu Mar 15 19:41:29 2018 +0800 drm/sun4i: Add compatible strings for A80 TCONs The A80 has 2 or 3 TCONs. The documentation and vendor kernel are very vague about the third TCON, to the point that it might not exist. In the documentation, the first TCON is missing channel 1, and the second is missing channel 0. However the vendor kernel seems to be able to use them regardless. Here we model them like the old TCONs. An oddity is that TCON0 requires the reset control for the eDP block to be deasserted, for any register access to stick. This patch adds compatible strings for TCON0 and TCON1, with TCON0 requiring an extra "edp" reset control. Reviewed-by: Rob Herring Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180315114136.24747-2-wens@csie.org Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit a84d1169164b274f13b97a23ff235c000efe3b49 Author: Arnd Bergmann Date: Thu Mar 15 17:12:40 2018 +0100 y2038: Introduce struct __kernel_old_timeval Dealing with 'struct timeval' users in the y2038 series is a bit tricky: We have two definitions of timeval that are visible to user space, one comes from glibc (or some other C library), the other comes from linux/time.h. The kernel copy is what we want to be used for a number of structures defined by the kernel itself, e.g. elf_prstatus (used it core dumps), sysinfo and rusage (used in system calls). These generally tend to be used for passing time intervals rather than absolute (epoch-based) times, so they do not suffer from the y2038 overflow. Some of them could be changed to use 64-bit timestamps by creating new system calls, others like the core files cannot easily be changed. An application using these interfaces likely also uses gettimeofday() or other interfaces that use absolute times, and pass 'struct timeval' pointers directly into kernel interfaces, so glibc must redefine their timeval based on a 64-bit time_t when they introduce their y2038-safe interfaces. The only reasonable way forward I see is to remove the 'timeval' definion from the kernel's uapi headers, and change the interfaces that we do not want to (or cannot) duplicate for 64-bit times to use a new __kernel_old_timeval definition instead. This type should be avoided for all new interfaces (those can use 64-bit nanoseconds, or the 64-bit version of timespec instead), and should be used with great care when converting existing interfaces from timeval, to be sure they don't suffer from the y2038 overflow, and only with consensus for the particular user that using __kernel_old_timeval is better than moving to a 64-bit based interface. The structure name is intentionally chosen to not conflict with user space types, and to be ugly enough to discourage its use. Note that ioctl based interfaces that pass a bare 'timeval' pointer cannot change to '__kernel_old_timeval' because the user space source code refers to 'timeval' instead, and we don't want to modify the user space sources if possible. However, any application that relies on a structure to contain an embedded 'timeval' (e.g. by passing a pointer to the member into a function call that expects a timeval pointer) is broken when that structure gets converted to __kernel_old_timeval. I don't see any way around that, and we have to rely on the compiler to produce a warning or compile failure that will alert users when they recompile their sources against a new libc. Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Cc: Stephen Boyd Cc: John Stultz Cc: Al Viro Link: https://lkml.kernel.org/r/20180315161739.576085-1-arnd@arndb.de include/linux/time32.h | 1 + include/uapi/linux/time.h | 12 ++++++++++++ kernel/time/time.c | 12 ++++++++++++ 3 files changed, 25 insertions(+) commit db87086492581c87f768b7d17d01308153ecffc1 Author: Joe Perches Date: Fri Mar 16 13:56:27 2018 -0700 drm: Reduce object size of DRM_DEV_ uses These macros are similar to the DRM_ with the addition of a struct device * to the arguments. Convert the single drm_dev_printk function into 2 separate functions. drm_dev_printk with a KERN_ * for generic use and drm_dev_dbg for conditional masked use. Remove the __func__ argument and use __builtin_return_address(0) to be similar to the DRM_ macros uses. Convert the DRM_DEV_ macros to remove now unnecessary arguments and use a consistent style. These macros are rarely used in the generic gpu/drm code so the code size does not change much for a defconfig, but when more drivers are enabled, there is ~4k savings. Many of these macros have no existing use at all. $ size -t drivers/gpu/drm/built-in.a | tail -1 1877530 44651 995 1923176 1d5868 (TOTALS) $ size -t drivers/gpu/drm/built-in.a | tail -1 1877527 44651 995 1923173 1d5865 (TOTALS) $ size -t drivers/gpu/drm/built-in.a | tail -1 17166750 2689238 108352 19964340 130a1b4 (TOTALS) $ size -t drivers/gpu/drm/built-in.a | tail -1 17168888 2691734 108352 19968974 130b3ce (TOTALS) Signed-off-by: Joe Perches Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/e5c164946e15375ac71b69b75f296efdf0b76e6d.1521233717.git.joe@perches.com drivers/gpu/drm/drm_print.c | 37 +++++++++++++----- include/drm/drm_print.h | 94 ++++++++++++++++++++++----------------------- 2 files changed, 74 insertions(+), 57 deletions(-) commit 6d544fd6f4e15a5c3d7ae50e3bfd728cb84bb968 Author: Daniel Vetter Date: Fri Mar 16 08:59:26 2018 +0100 drm/doc: Put all driver docs into a separate chapter We have quite a few driver docs now, which is great, but having them all in the top-level gpu documentation chapter makes it harder to spot the core/shared bits. Stuff them into a separate chapter and ecourage people to add even more! Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180316075926.13584-1-daniel.vetter@ffwll.ch Documentation/gpu/drivers.rst | 21 +++++++++++++++++++++ Documentation/gpu/index.rst | 9 +-------- 2 files changed, 22 insertions(+), 8 deletions(-) commit 2bcfcbfc1ddd59c9335de5d4dcd20c45354535fc Author: Paul McQuade Date: Mon Mar 19 00:52:22 2018 +0000 drm: dma_bufs: Fixed checkpatch issues Fix a couple of checkpatch issues Signed-off-by: Paul McQuade [seanpaul squashed series of 4 into one patch, and changed commit msg] Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180319005225.1545-1-paulmcquad@gmail.com drivers/gpu/drm/drm_bufs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e007488b2fbbda00bc504e37ffdc8866c8f59c5e Author: Haneen Mohammed Date: Mon Mar 19 01:58:20 2018 -0400 drm: remove drm_mode_object_{un/reference} aliases This patch remove the compatibility aliases drm_mode_object_{reference/unreference} of drm_mode_object_{get/put} since all callers have been converted to the prefered _{get/put}. Remove the helpers from the semantic patch drm-get-put-cocci. Signed-off-by: Haneen Mohammed Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180319055820.GA17502@haneen-VirtualBox include/drm/drm_mode_object.h | 24 ------------------------ scripts/coccinelle/api/drm-get-put.cocci | 10 ---------- 2 files changed, 34 deletions(-) commit 4b472ffd1513407ee3607b8e638e8695e9b487ca Author: Marc Zyngier Date: Thu Feb 15 11:49:20 2018 +0000 arm64: Enable ARM64_HARDEN_EL2_VECTORS on Cortex-A57 and A72 Cortex-A57 and A72 are vulnerable to the so-called "variant 3a" of Meltdown, where an attacker can speculatively obtain the value of a privileged system register. By enabling ARM64_HARDEN_EL2_VECTORS on these CPUs, obtaining VBAR_EL2 is not disclosing the hypervisor mappings anymore. Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier arch/arm64/kernel/cpu_errata.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit dee39247dc75465a24990cb1772c6aaced5fd910 Author: Marc Zyngier Date: Thu Feb 15 11:47:14 2018 +0000 arm64: KVM: Allow mapping of vectors outside of the RAM region We're now ready to map our vectors in weird and wonderful locations. On enabling ARM64_HARDEN_EL2_VECTORS, a vector slot gets allocated if this hasn't been already done via ARM64_HARDEN_BRANCH_PREDICTOR and gets mapped outside of the normal RAM region, next to the idmap. That way, being able to obtain VBAR_EL2 doesn't reveal the mapping of the rest of the hypervisor code. Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Documentation/arm64/memory.txt | 3 +- arch/arm64/Kconfig | 16 +++++++++ arch/arm64/include/asm/kvm_mmu.h | 78 +++++++++++++++++++++++++++++++++++----- arch/arm64/include/asm/mmu.h | 5 ++- arch/arm64/kvm/Kconfig | 2 +- arch/arm64/kvm/va_layout.c | 3 ++ 6 files changed, 95 insertions(+), 12 deletions(-) commit 4205a89b8060141ac0216a507b9f70728f056a10 Author: Marc Zyngier Date: Tue Mar 13 12:40:39 2018 +0000 arm64: Make BP hardening slot counter available We're about to need to allocate hardening slots from other parts of the kernel (in order to support ARM64_HARDEN_EL2_VECTORS). Turn the counter into an atomic_t and make it available to the rest of the kernel. Also add BP_HARDEN_EL2_SLOTS as the number of slots instead of the hardcoded 4... Acked-by: Catalin Marinas Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier arch/arm64/include/asm/mmu.h | 3 +++ arch/arm64/kernel/bpi.S | 3 ++- arch/arm64/kernel/cpu_errata.c | 9 ++++----- 3 files changed, 9 insertions(+), 6 deletions(-) commit dc2e4633ff39c9fb5ef3a5443721f0e3499b36ed Author: Marc Zyngier Date: Tue Feb 13 11:00:29 2018 +0000 arm/arm64: KVM: Introduce EL2-specific executable mappings Until now, all EL2 executable mappings were derived from their EL1 VA. Since we want to decouple the vectors mapping from the rest of the hypervisor, we need to be able to map some text somewhere else. The "idmap" region (for lack of a better name) is ideally suited for this, as we have a huge range that hardly has anything in it. Let's extend the IO allocator to also deal with executable mappings, thus providing the required feature. Acked-by: Catalin Marinas Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_mmu.h | 2 + arch/arm64/include/asm/kvm_mmu.h | 2 + virt/kvm/arm/mmu.c | 80 +++++++++++++++++++++++++++++----------- 3 files changed, 63 insertions(+), 21 deletions(-) commit 71dcb8be6d29cffff3f4a4463232f38786e97797 Author: Marc Zyngier Date: Tue Feb 27 17:38:08 2018 +0000 arm64: KVM: Allow far branches from vector slots to the main vectors So far, the branch from the vector slots to the main vectors can at most be 4GB from the main vectors (the reach of ADRP), and this distance is known at compile time. If we were to remap the slots to an unrelated VA, things would break badly. A way to achieve VA independence would be to load the absolute address of the vectors (__kvm_hyp_vector), either using a constant pool or a series of movs, followed by an indirect branch. This patches implements the latter solution, using another instance of a patching callback. Note that since we have to save a register pair on the stack, we branch to the *second* instruction in the vectors in order to compensate for it. This also results in having to adjust this balance in the invalid vector entry point. Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier arch/arm64/include/asm/cpucaps.h | 2 +- arch/arm64/kernel/bpi.S | 21 ++++++++++++ arch/arm64/kvm/hyp/hyp-entry.S | 2 ++ arch/arm64/kvm/va_layout.c | 72 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 96 insertions(+), 1 deletion(-) commit f0445dfadbb2ddce26f535b71578b36302805007 Author: Marc Zyngier Date: Tue Mar 13 12:24:02 2018 +0000 arm64: KVM: Reserve 4 additional instructions in the BPI template So far, we only reserve a single instruction in the BPI template in order to branch to the vectors. As we're going to stuff a few more instructions there, let's reserve a total of 5 instructions, which we're going to patch later on as required. We also introduce a small refactor of the vectors themselves, so that we stop carrying the target branch around. Acked-by: Catalin Marinas Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier arch/arm64/kernel/bpi.S | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) commit 4340ba80bd3a310d8eb9011df2e63c6371e28113 Author: Marc Zyngier Date: Wed Mar 14 13:28:50 2018 +0000 arm64: KVM: Move BP hardening vectors into .hyp.text section There is no reason why the BP hardening vectors shouldn't be part of the HYP text at compile time, rather than being mapped at runtime. Also introduce a new config symbol that controls the compilation of bpi.S. Acked-by: Catalin Marinas Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_mmu.h | 4 +--- arch/arm64/kernel/Makefile | 4 +--- arch/arm64/kernel/bpi.S | 6 ++++++ arch/arm64/kvm/Kconfig | 3 +++ 4 files changed, 11 insertions(+), 6 deletions(-) commit 7e80f637fd8bcdd777d3841a43f76563ffd2985a Author: Marc Zyngier Date: Mon Feb 12 17:53:00 2018 +0000 arm64: KVM: Move stashing of x0/x1 into the vector code itself All our useful entry points into the hypervisor are starting by saving x0 and x1 on the stack. Let's move those into the vectors by introducing macros that annotate whether a vector is valid or not, thus indicating whether we want to stash registers or not. The only drawback is that we now also stash registers for el2_error, but this should never happen, and we pop them back right at the start of the handling sequence. Acked-by: Catalin Marinas Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/hyp-entry.S | 56 ++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 24 deletions(-) commit 3c5e81232ea489845359f7a03a4fb52b29072db8 Author: Marc Zyngier Date: Mon Feb 12 16:50:19 2018 +0000 arm64: KVM: Move vector offsetting from hyp-init.S to kvm_get_hyp_vector We currently provide the hyp-init code with a kernel VA, and expect it to turn it into a HYP va by itself. As we're about to provide the hypervisor with mappings that are not necessarily in the memory range, let's move the kern_hyp_va macro to kvm_get_hyp_vector. No functionnal change. Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_mmu.h | 3 ++- arch/arm64/kvm/hyp-init.S | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) commit 6bb934af1f737eba51e2f3f73760715788a7e283 Author: Marc Zyngier Date: Tue Dec 5 18:45:48 2017 +0000 arm64: Update the KVM memory map documentation Update the documentation to reflect the new tricks we play on the EL2 mappings... Acked-by: Christoffer Dall Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Documentation/arm64/memory.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ed57cac83e05f2e93567e4b5c57ee58a1bf8a582 Author: Marc Zyngier Date: Sun Dec 3 18:22:49 2017 +0000 arm64: KVM: Introduce EL2 VA randomisation The main idea behind randomising the EL2 VA is that we usually have a few spare bits between the most significant bit of the VA mask and the most significant bit of the linear mapping. Those bits could be a bunch of zeroes, and could be useful to move things around a bit. Of course, the more memory you have, the less randomisation you get... Alternatively, these bits could be the result of KASLR, in which case they are already random. But it would be nice to have a *different* randomization, just to make the job of a potential attacker a bit more difficult. Inserting these random bits is a bit involved. We don't have a spare register (short of rewriting all the kern_hyp_va call sites), and the immediate we want to insert is too random to be used with the ORR instruction. The best option I could come up with is the following sequence: and x0, x0, #va_mask ror x0, x0, #first_random_bit add x0, x0, #(random & 0xfff) add x0, x0, #(random >> 12), lsl #12 ror x0, x0, #(63 - first_random_bit) making it a fairly long sequence, but one that a decent CPU should be able to execute without breaking a sweat. It is of course NOPed out on VHE. The last 4 instructions can also be turned into NOPs if it appears that there is no free bits to use. Acked-by: Catalin Marinas Reviewed-by: James Morse Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_mmu.h | 12 +++++-- arch/arm64/kvm/va_layout.c | 76 +++++++++++++++++++++++++++++++++++++--- virt/kvm/arm/mmu.c | 2 +- 3 files changed, 82 insertions(+), 8 deletions(-) commit 005e975a3bd08dce8d77746d6688cac615fe7c97 Author: Marc Zyngier Date: Fri Dec 8 14:18:27 2017 +0000 arm64: KVM: Dynamically compute the HYP VA mask As we're moving towards a much more dynamic way to compute our HYP VA, let's express the mask in a slightly different way. Instead of comparing the idmap position to the "low" VA mask, we directly compute the mask by taking into account the idmap's (VA_BIT-1) bit. No functionnal change. Acked-by: Catalin Marinas Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/va_layout.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 11d764079c9f25d1da8e10906d54da7fefec5844 Author: Marc Zyngier Date: Sun Dec 3 17:50:00 2017 +0000 arm64: insn: Allow ADD/SUB (immediate) with LSL #12 The encoder for ADD/SUB (immediate) can only cope with 12bit immediates, while there is an encoding for a 12bit immediate shifted by 12 bits to the left. Let's fix this small oversight by allowing the LSL_12 bit to be set. Reviewed-by: Christoffer Dall Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier arch/arm64/kernel/insn.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 9f2efa320d395050abd0f39842843bb460736515 Author: Marc Zyngier Date: Sun Dec 3 17:47:03 2017 +0000 arm64; insn: Add encoder for the EXTR instruction Add an encoder for the EXTR instruction, which also implements the ROR variant (where Rn == Rm). Acked-by: Catalin Marinas Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/include/asm/insn.h | 6 ++++++ arch/arm64/kernel/insn.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit e3f019b37b580c3b954419212da26ac5db412a08 Author: Marc Zyngier Date: Mon Dec 4 17:04:38 2017 +0000 KVM: arm/arm64: Move HYP IO VAs to the "idmap" range We so far mapped our HYP IO (which is essentially the GICv2 control registers) using the same method as for memory. It recently appeared that is a bit unsafe: We compute the HYP VA using the kern_hyp_va helper, but that helper is only designed to deal with kernel VAs coming from the linear map, and not from the vmalloc region... This could in turn cause some bad aliasing between the two, amplified by the upcoming VA randomisation. A solution is to come up with our very own basic VA allocator for MMIO. Since half of the HYP address space only contains a single page (the idmap), we have plenty to borrow from. Let's use the idmap as a base, and allocate downwards from it. GICv2 now lives on the other side of the great VA barrier. Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_mmu.h | 3 ++ virt/kvm/arm/mmu.c | 73 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 62 insertions(+), 14 deletions(-) commit 3ddd45565373604d4f49cb0496fc0168e3863c1f Author: Marc Zyngier Date: Wed Mar 14 15:17:33 2018 +0000 KVM: arm64: Fix HYP idmap unmap when using 52bit PA Unmapping the idmap range using 52bit PA is quite broken, as we don't take into account the right number of PGD entries, and rely on PTRS_PER_PGD. The result is that pgd_index() truncates the address, and we end-up in the weed. Let's introduce a new unmap_hyp_idmap_range() that knows about this, together with a kvm_pgd_index() helper, which hides a bit of the complexity of the issue. Fixes: 98732d1b189b ("KVM: arm/arm64: fix HYP ID map extension to 52 bits") Reported-by: James Morse Reviewed-by: Catalin Marinas Reviewed-by: Suzuki K Poulose Signed-off-by: Marc Zyngier virt/kvm/arm/mmu.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 46fef158f10d255dfe47cf3a0ab5f0965b66b1da Author: Marc Zyngier Date: Mon Mar 12 14:25:10 2018 +0000 KVM: arm/arm64: Fix idmap size and alignment Although the idmap section of KVM can only be at most 4kB and must be aligned on a 4kB boundary, the rest of the code expects it to be page aligned. Things get messy when tearing down the HYP page tables when PAGE_SIZE is 64K, and the idmap section isn't 64K aligned. Let's fix this by computing aligned boundaries that the HYP code will use. Acked-by: Catalin Marinas Reported-by: James Morse Reviewed-by: James Morse Signed-off-by: Marc Zyngier virt/kvm/arm/mmu.c | 2 ++ 1 file changed, 2 insertions(+) commit 1bb32a44aea1fe73c6f84e466a45ae559ef74559 Author: Marc Zyngier Date: Mon Dec 4 16:43:23 2017 +0000 KVM: arm/arm64: Keep GICv2 HYP VAs in kvm_vgic_global_state As we're about to change the way we map devices at HYP, we need to move away from kern_hyp_va on an IO address. One way of achieving this is to store the VAs in kvm_vgic_global_state, and use that directly from the HYP code. This requires a small change to create_hyp_io_mappings so that it can also return a HYP VA. We take this opportunity to nuke the vctrl_base field in the emulated distributor, as it is not used anymore. Acked-by: Catalin Marinas Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_mmu.h | 3 ++- arch/arm64/include/asm/kvm_mmu.h | 3 ++- arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c | 2 +- include/kvm/arm_vgic.h | 12 ++++++------ virt/kvm/arm/mmu.c | 20 +++++++++++++++----- virt/kvm/arm/vgic/vgic-init.c | 6 ------ virt/kvm/arm/vgic/vgic-v2.c | 26 ++++++++++++-------------- 7 files changed, 38 insertions(+), 34 deletions(-) commit 807a378425d27d377fdf181d1dba91539bac9294 Author: Marc Zyngier Date: Mon Dec 4 16:26:09 2017 +0000 KVM: arm/arm64: Move ioremap calls to create_hyp_io_mappings Both HYP io mappings call ioremap, followed by create_hyp_io_mappings. Let's move the ioremap call into create_hyp_io_mappings itself, which simplifies the code a bit and allows for further refactoring. Reviewed-by: Christoffer Dall Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_mmu.h | 3 ++- arch/arm64/include/asm/kvm_mmu.h | 3 ++- virt/kvm/arm/mmu.c | 24 ++++++++++++++---------- virt/kvm/arm/vgic/vgic-v2.c | 31 ++++++++----------------------- 4 files changed, 26 insertions(+), 35 deletions(-) commit b4ef04995d33a1ecfec3bdfb7776c1ac36dbe87d Author: Marc Zyngier Date: Sun Dec 3 20:04:51 2017 +0000 KVM: arm/arm64: Demote HYP VA range display to being a debug feature Displaying the HYP VA information is slightly counterproductive when using VA randomization. Turn it into a debug feature only, and adjust the last displayed value to reflect the top of RAM instead of ~0. Acked-by: Christoffer Dall Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier virt/kvm/arm/mmu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 44a497abd621a71c645f06d3d545ae2f46448830 Author: Marc Zyngier Date: Sun Dec 3 19:28:56 2017 +0000 KVM: arm/arm64: Do not use kern_hyp_va() with kvm_vgic_global_state kvm_vgic_global_state is part of the read-only section, and is usually accessed using a PC-relative address generation (adrp + add). It is thus useless to use kern_hyp_va() on it, and actively problematic if kern_hyp_va() becomes non-idempotent. On the other hand, there is no way that the compiler is going to guarantee that such access is always PC relative. So let's bite the bullet and provide our own accessor. Acked-by: Catalin Marinas Reviewed-by: James Morse Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_mmu.h | 7 +++++++ arch/arm64/include/asm/kvm_mmu.h | 20 ++++++++++++++++++++ arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) commit a1efdff442ec7bd1ad2dfa1f96c4c373f019ad46 Author: Marc Zyngier Date: Sun Dec 3 17:42:37 2017 +0000 arm64: cpufeatures: Drop the ARM64_HYP_OFFSET_LOW feature flag Now that we can dynamically compute the kernek/hyp VA mask, there is no need for a feature flag to trigger the alternative patching. Let's drop the flag and everything that depends on it. Acked-by: Christoffer Dall Acked-by: Catalin Marinas Reviewed-by: Suzuki K Poulose Signed-off-by: Marc Zyngier arch/arm64/include/asm/cpucaps.h | 2 +- arch/arm64/kernel/cpufeature.c | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) commit 2b4d1606aac27f2485061abd953ea1e103b5e26e Author: Marc Zyngier Date: Sun Dec 3 17:36:55 2017 +0000 arm64: KVM: Dynamically patch the kernel/hyp VA mask So far, we're using a complicated sequence of alternatives to patch the kernel/hyp VA mask on non-VHE, and NOP out the masking altogether when on VHE. The newly introduced dynamic patching gives us the opportunity to simplify that code by patching a single instruction with the correct mask (instead of the mind bending cumulative masking we have at the moment) or even a single NOP on VHE. This also adds some initial code that will allow the patching callback to switch to a more complex patching. Acked-by: Catalin Marinas Reviewed-by: James Morse Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_mmu.h | 46 ++++++-------------- arch/arm64/kvm/Makefile | 2 +- arch/arm64/kvm/va_layout.c | 91 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+), 34 deletions(-) commit ef3935eeebffcad148edeb81021733c262db9970 Author: Marc Zyngier Date: Sun Dec 3 17:09:08 2017 +0000 arm64: insn: Add encoder for bitwise operations using literals We lack a way to encode operations such as AND, ORR, EOR that take an immediate value. Doing so is quite involved, and is all about reverse engineering the decoding algorithm described in the pseudocode function DecodeBitMasks(). This has been tested by feeding it all the possible literal values and comparing the output with that of GAS. Acked-by: Christoffer Dall Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier arch/arm64/include/asm/insn.h | 9 +++ arch/arm64/kernel/insn.c | 136 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+) commit a264bf34424c815d4565cf1ba0e3cd56b7d5c816 Author: Marc Zyngier Date: Sun Dec 3 17:01:39 2017 +0000 arm64: insn: Add N immediate encoding We're missing the a way to generate the encoding of the N immediate, which is only a single bit used in a number of instruction that take an immediate. Acked-by: Christoffer Dall Reviewed-by: Catalin Marinas Signed-off-by: Marc Zyngier arch/arm64/include/asm/insn.h | 1 + arch/arm64/kernel/insn.c | 4 ++++ 2 files changed, 5 insertions(+) commit dea5e2a4c5bcf196f879a66cebdcca07793e8ba4 Author: Marc Zyngier Date: Sun Dec 3 12:02:14 2017 +0000 arm64: alternatives: Add dynamic patching feature We've so far relied on a patching infrastructure that only gave us a single alternative, without any way to provide a range of potential replacement instructions. For a single feature, this is an all or nothing thing. It would be interesting to have a more flexible grained way of patching the kernel though, where we could dynamically tune the code that gets injected. In order to achive this, let's introduce a new form of dynamic patching, assiciating a callback to a patching site. This callback gets source and target locations of the patching request, as well as the number of instructions to be patched. Dynamic patching is declared with the new ALTERNATIVE_CB and alternative_cb directives: asm volatile(ALTERNATIVE_CB("mov %0, #0\n", callback) : "r" (v)); or alternative_cb callback mov x0, #0 alternative_cb_end where callback is the C function computing the alternative. Reviewed-by: Christoffer Dall Reviewed-by: Catalin Marinas Signed-off-by: Marc Zyngier arch/arm64/include/asm/alternative.h | 41 ++++++++++++++++++++++++++++++---- arch/arm64/kernel/alternative.c | 43 +++++++++++++++++++++++++++--------- 2 files changed, 69 insertions(+), 15 deletions(-) commit 77f18153c080855e1c3fb520ca31a4e61530121d Author: Jiri Olsa Date: Mon Mar 19 09:29:01 2018 +0100 perf tools: Fix snprint warnings for gcc 8 With gcc 8 we get new set of snprintf() warnings that breaks the compilation, one example: tests/mem.c: In function ‘check’: tests/mem.c:19:48: error: ‘%s’ directive output may be truncated writing \ up to 99 bytes into a region of size 89 [-Werror=format-truncation=] snprintf(failure, sizeof failure, "unexpected %s", out); The gcc docs says: To avoid the warning either use a bigger buffer or handle the function's return value which indicates whether or not its output has been truncated. Given that all these warnings are harmless, because the code either properly fails due to uncomplete file path or we don't care for truncated output at all, I'm changing all those snprintf() calls to scnprintf(), which actually 'checks' for the snprint return value so the gcc stays silent. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Josh Poimboeuf Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sergey Senozhatsky Link: http://lkml.kernel.org/r/20180319082902.4518-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 22 +++++++++++----------- tools/perf/tests/attr.c | 4 ++-- tools/perf/tests/mem.c | 2 +- tools/perf/tests/pmu.c | 2 +- tools/perf/util/cgroup.c | 2 +- tools/perf/util/parse-events.c | 4 ++-- tools/perf/util/pmu.c | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) commit 9b284d8e648b9a6a297409d2adb34bcebf695818 Author: Johan Hovold Date: Wed Mar 7 11:49:56 2018 +0100 USB: serial: option: use mass-storage class define Use the USB class define rather than a magic number when refusing to bind to mass-storage interfaces. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0bf2ef9783d55f60bac1492f225c3a4fe2b363c Author: Johan Hovold Date: Wed Mar 7 11:49:55 2018 +0100 USB: serial: option: drop redundant interface-class test Drop redundant interface-class test for Samsung GT-B3730 modems for which we only match and probe the CDC data interface. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 9 --------- 1 file changed, 9 deletions(-) commit c3a65808f04a8426481b63a4fbd9392f009f6330 Author: Johan Hovold Date: Wed Mar 7 17:40:48 2018 +0100 USB: serial: option: reimplement interface masking Reimplement interface masking using device flags stored directly in the device-id table. This will make it easier to add and maintain device-id entries by using a more compact and readable notation compared to the current implementation (which manages pairs of masks in separate blacklist structs). Two convenience macros are used to flag an interface as either reserved or as not supporting modem-control requests: { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM), .driver_info = NCTRL(0) | RSVD(3) }, For now, we limit the highest maskable interface number to seven, which allows for (up to 16) additional device flags to be added later should need arise. Note that this will likely need to be backported to stable in order to make future device-id backports more manageable. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 446 +++++++++++++++----------------------------- 1 file changed, 152 insertions(+), 294 deletions(-) commit 2d0e63e030babe19c94b4453ef4b272c0aacd75a Author: Christoffer Dall Date: Thu Oct 5 17:19:19 2017 +0200 KVM: arm/arm64: Avoid VGICv3 save/restore on VHE with no IRQs We can finally get completely rid of any calls to the VGICv3 save/restore functions when the AP lists are empty on VHE systems. This requires carefully factoring out trap configuration from saving and restoring state, and carefully choosing what to do on the VHE and non-VHE path. One of the challenges is that we cannot save/restore the VMCR lazily because we can only write the VMCR when ICC_SRE_EL1.SRE is cleared when emulating a GICv2-on-GICv3, since otherwise all Group-0 interrupts end up being delivered as FIQ. To solve this problem, and still provide fast performance in the fast path of exiting a VM when no interrupts are pending (which also optimized the latency for actually delivering virtual interrupts coming from physical interrupts), we orchestrate a dance of only doing the activate/deactivate traps in vgic load/put for VHE systems (which can have ICC_SRE_EL1.SRE cleared when running in the host), and doing the configuration on every round-trip on non-VHE systems. Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_hyp.h | 2 + arch/arm/kvm/hyp/switch.c | 8 ++- arch/arm64/include/asm/kvm_hyp.h | 2 + arch/arm64/kvm/hyp/switch.c | 8 ++- virt/kvm/arm/hyp/vgic-v3-sr.c | 120 +++++++++++++++++++++++++-------------- virt/kvm/arm/vgic/vgic-v3.c | 6 ++ virt/kvm/arm/vgic/vgic.c | 9 ++- 7 files changed, 103 insertions(+), 52 deletions(-) commit 923a2e30e5745a8f94f953f7aacaafd3d551e12d Author: Christoffer Dall Date: Thu Oct 5 00:18:07 2017 +0200 KVM: arm/arm64: Move VGIC APR save/restore to vgic put/load The APRs can only have bits set when the guest acknowledges an interrupt in the LR and can only have a bit cleared when the guest EOIs an interrupt in the LR. Therefore, if we have no LRs with any pending/active interrupts, the APR cannot change value and there is no need to clear it on every exit from the VM (hint: it will have already been cleared when we exited the guest the last time with the LRs all EOIed). The only case we need to take care of is when we migrate the VCPU away from a CPU or migrate a new VCPU onto a CPU, or when we return to userspace to capture the state of the VCPU for migration. To make sure this works, factor out the APR save/restore functionality into separate functions called from the VCPU (and by extension VGIC) put/load hooks. Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_hyp.h | 2 + arch/arm64/include/asm/kvm_hyp.h | 2 + virt/kvm/arm/hyp/vgic-v3-sr.c | 124 +++++++++++++++++++++------------------ virt/kvm/arm/vgic/vgic-v2.c | 7 +-- virt/kvm/arm/vgic/vgic-v3.c | 5 ++ 5 files changed, 78 insertions(+), 62 deletions(-) commit 771621b0e2f80629948e0dc627d18b6730778c52 Author: Christoffer Dall Date: Wed Oct 4 23:42:32 2017 +0200 KVM: arm/arm64: Handle VGICv3 save/restore from the main VGIC code on VHE Just like we can program the GICv2 hypervisor control interface directly from the core vgic code, we can do the same for the GICv3 hypervisor control interface on VHE systems. We do this by simply calling the save/restore functions when we have VHE and we can then get rid of the save/restore function calls from the VHE world switch function. One caveat is that we now write GICv3 system register state before the potential early exit path in the run loop, and because we sync back state in the early exit path, we have to ensure that we read a consistent GIC state from the sync path, even though we have never actually run the guest with the newly written GIC state. We solve this by inserting an ISB in the early exit path. Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/switch.c | 13 ++++++------- virt/kvm/arm/arm.c | 1 + virt/kvm/arm/vgic/vgic.c | 21 +++++++++++++++++++-- 3 files changed, 26 insertions(+), 9 deletions(-) commit 8a43a2b34b7dc59dc6df5fa0a3b8540918bc4c58 Author: Christoffer Dall Date: Wed Oct 4 23:25:24 2017 +0200 KVM: arm/arm64: Move arm64-only vgic-v2-sr.c file to arm64 The vgic-v2-sr.c file now only contains the logic to replay unaligned accesses to the virtual CPU interface on 16K and 64K page systems, which is only relevant on 64-bit platforms. Therefore move this file to the arm64 KVM tree, remove the compile directive from the 32-bit side makefile, and remove the ifdef in the C file. Since this file also no longer saves/restores anything, rename the file to vgic-v2-cpuif-proxy.c to more accurately describe the logic in this file. Reviewed-by: Andre Przywara Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/kvm/hyp/Makefile | 1 - arch/arm64/kvm/hyp/Makefile | 2 +- arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c | 78 +++++++++++++++++++++++++++++++ virt/kvm/arm/hyp/vgic-v2-sr.c | 80 -------------------------------- 4 files changed, 79 insertions(+), 82 deletions(-) commit 75174ba6ca9dcfddda88aa420da4d7aa2b279fdf Author: Christoffer Dall Date: Thu Dec 22 20:39:10 2016 +0100 KVM: arm/arm64: Handle VGICv2 save/restore from the main VGIC code We can program the GICv2 hypervisor control interface logic directly from the core vgic code and can instead do the save/restore directly from the flush/sync functions, which can lead to a number of future optimizations. Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/kvm/hyp/switch.c | 4 --- arch/arm64/include/asm/kvm_hyp.h | 2 -- arch/arm64/kvm/hyp/switch.c | 4 --- virt/kvm/arm/hyp/vgic-v2-sr.c | 65 ---------------------------------------- virt/kvm/arm/vgic/vgic-v2.c | 63 ++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.c | 19 +++++++++++- virt/kvm/arm/vgic/vgic.h | 3 ++ 7 files changed, 84 insertions(+), 76 deletions(-) commit bb5ed7035918d265189e2623d71c8f458713d3e9 Author: Christoffer Dall Date: Thu Oct 5 00:02:41 2017 +0200 KVM: arm/arm64: Get rid of vgic_elrsr There is really no need to store the vgic_elrsr on the VGIC data structures as the only need we have for the elrsr is to figure out if an LR is inactive when we save the VGIC state upon returning from the guest. We can might as well store this in a temporary local variable. Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier include/kvm/arm_vgic.h | 2 -- virt/kvm/arm/hyp/vgic-v2-sr.c | 28 +++++++--------------------- virt/kvm/arm/hyp/vgic-v3-sr.c | 6 +++--- virt/kvm/arm/vgic/vgic-v2.c | 1 - virt/kvm/arm/vgic/vgic-v3.c | 1 - 5 files changed, 10 insertions(+), 28 deletions(-) commit b7787e6666061aea02be7ce084fe13c336acd0cf Author: Christoffer Dall Date: Tue Oct 3 17:06:15 2017 +0200 KVM: arm64: Cleanup __activate_traps and __deactive_traps for VHE and non-VHE To make the code more readable and to avoid the overhead of a function call, let's get rid of a pair of the alternative function selectors and explicitly call the VHE and non-VHE functions using the has_vhe() static key based selector instead, telling the compiler to try to inline the static function if it can. Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/switch.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit a2465629b62a82b3145dc7ef40ec6c32432cf002 Author: Christoffer Dall Date: Fri Aug 4 13:47:18 2017 +0200 KVM: arm64: Configure c15, PMU, and debug register traps on cpu load/put for VHE We do not have to change the c15 trap setting on each switch to/from the guest on VHE systems, because this setting only affects guest EL1/EL0 (and therefore not the VHE host). The PMU and debug trap configuration can also be done on vcpu load/put instead, because they don't affect how the VHE host kernel can access the debug registers while executing KVM kernel code. Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_hyp.h | 3 +++ arch/arm64/kvm/hyp/switch.c | 31 ++++++++++++++++++++++--------- arch/arm64/kvm/hyp/sysreg-sr.c | 4 ++++ 3 files changed, 29 insertions(+), 9 deletions(-) commit c16c1131fb1ccc70aac351111388bf23a97024ca Author: Christoffer Dall Date: Fri Aug 4 09:39:51 2017 +0200 KVM: arm64: Directly call VHE and non-VHE FPSIMD enabled functions There is no longer a need for an alternative to choose the right function to tell us whether or not FPSIMD was enabled for the VM, because we can simply can the appropriate functions directly from within the _vhe and _nvhe run functions. Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/switch.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit d5a21bcc29955c7df3fbd881b4c4229090331a5d Author: Christoffer Dall Date: Fri Aug 4 08:50:25 2017 +0200 KVM: arm64: Move common VHE/non-VHE trap config in separate functions As we are about to be more lazy with some of the trap configuration register read/writes for VHE systems, move the logic that is currently shared between VHE and non-VHE into a separate function which can be called from either the world-switch path or from vcpu_load/vcpu_put. Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/switch.c | 77 +++++++++++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 31 deletions(-) commit b9f8ca4db409c6cd24218bfc90eafe8a0df42927 Author: Christoffer Dall Date: Wed Dec 27 22:12:12 2017 +0100 KVM: arm64: Defer saving/restoring 32-bit sysregs to vcpu load/put When running a 32-bit VM (EL1 in AArch32), the AArch32 system registers can be deferred to vcpu load/put on VHE systems because neither the host kernel nor host userspace uses these registers. Note that we can't save DBGVCR32_EL2 conditionally based on the state of the debug dirty flag on VHE after this change, because during vcpu_load() we haven't calculated a valid debug flag yet, and when we've restored the register during vcpu_load() we also have to save it during vcpu_put(). This means that we'll always restore/save the register for VHE on load/put, but luckily vcpu load/put are called rarely, so saving an extra register unconditionally shouldn't significantly hurt performance. We can also not defer saving FPEXC32_32 because this register only holds a guest-valid value for 32-bit guests during the exit path when the guest has used FPSIMD registers and restored the register in the early assembly handler from taking the EL2 fault, and therefore we have to check if fpsimd is enabled for the guest in the exit path and save the register then, for both VHE and non-VHE guests. Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/switch.c | 17 +++++++++++------ arch/arm64/kvm/hyp/sysreg-sr.c | 15 ++++++++++----- arch/arm64/kvm/sys_regs.c | 6 ++++++ 3 files changed, 27 insertions(+), 11 deletions(-) commit a892819560c4985a699486f9c17db065c266d2da Author: Christoffer Dall Date: Wed Dec 27 21:59:09 2017 +0100 KVM: arm64: Prepare to handle deferred save/restore of 32-bit registers 32-bit registers are not used by a 64-bit host kernel and can be deferred, but we need to rework the accesses to these register to access the latest values depending on whether or not guest system registers are loaded on the CPU or only reside in memory. Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_emulate.h | 32 +++++------------ arch/arm64/kvm/regmap.c | 67 +++++++++++++++++++++++++++--------- 2 files changed, 59 insertions(+), 40 deletions(-) commit fc7563b3400ab925a32fce9e88db5dd3ddfc6bb0 Author: Christoffer Dall Date: Tue Mar 15 19:43:45 2016 +0100 KVM: arm64: Defer saving/restoring 64-bit sysregs to vcpu load/put on VHE Some system registers do not affect the host kernel's execution and can therefore be loaded when we are about to run a VCPU and we don't have to restore the host state to the hardware before the time when we are actually about to return to userspace or schedule out the VCPU thread. The EL1 system registers and the userspace state registers only affecting EL0 execution do not need to be saved and restored on every switch between the VM and the host, because they don't affect the host kernel's execution. We mark all registers which are now deffered as such in the vcpu_{read,write}_sys_reg accessors in sys-regs.c to ensure the most up-to-date copy is always accessed. Note MPIDR_EL1 (controlled via VMPIDR_EL2) is accessed from other vcpu threads, for example via the GIC emulation, and therefore must be declared as immediate, which is fine as the guest cannot modify this value. The 32-bit sysregs can also be deferred but we do this in a separate patch as it requires a bit more infrastructure. Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/sysreg-sr.c | 39 ++++++++++++++++++++++++++------- arch/arm64/kvm/sys_regs.c | 49 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 8 deletions(-) commit 6d4bd909645359b0a7619598b9ca7a1353296207 Author: Christoffer Dall Date: Wed Dec 27 20:51:04 2017 +0100 KVM: arm64: Prepare to handle deferred save/restore of ELR_EL1 ELR_EL1 is not used by a VHE host kernel and can be deferred, but we need to rework the accesses to this register to access the latest value depending on whether or not guest system registers are loaded on the CPU or only reside in memory. Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_emulate.h | 18 +++++++++++++++++- arch/arm64/kvm/inject_fault.c | 4 ++-- 2 files changed, 19 insertions(+), 3 deletions(-) commit 00536ec476601a60d976eebf6aeb9633d4fb37d9 Author: Christoffer Dall Date: Wed Dec 27 20:01:52 2017 +0100 KVM: arm/arm64: Prepare to handle deferred save/restore of SPSR_EL1 SPSR_EL1 is not used by a VHE host kernel and can be deferred, but we need to rework the accesses to this register to access the latest value depending on whether or not guest system registers are loaded on the CPU or only reside in memory. The handling of accessing the various banked SPSRs for 32-bit VMs is a bit clunky, but this will be improved in following patches which will first prepare and subsequently implement deferred save/restore of the 32-bit registers, including the 32-bit SPSRs. Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_emulate.h | 12 ++++++++++- arch/arm/kvm/emulate.c | 2 +- arch/arm64/include/asm/kvm_emulate.h | 41 +++++++++++++++++++++++++++++++----- arch/arm64/kvm/inject_fault.c | 4 ++-- virt/kvm/arm/aarch32.c | 2 +- 5 files changed, 51 insertions(+), 10 deletions(-) commit d47533dab9f50eeb7289a38035c39c9eadb1e048 Author: Christoffer Dall Date: Sat Dec 23 21:53:48 2017 +0100 KVM: arm64: Introduce framework for accessing deferred sysregs We are about to defer saving and restoring some groups of system registers to vcpu_put and vcpu_load on supported systems. This means that we need some infrastructure to access system registes which supports either accessing the memory backing of the register or directly accessing the system registers, depending on the state of the system when we access the register. We do this by defining read/write accessor functions, which can handle both "immediate" and "deferrable" system registers. Immediate registers are always saved/restored in the world-switch path, but deferrable registers are only saved/restored in vcpu_put/vcpu_load when supported and sysregs_loaded_on_cpu will be set in that case. Note that we don't use the deferred mechanism yet in this patch, but only introduce infrastructure. This is to improve convenience of review in the subsequent patches where it is clear which registers become deferred. Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 8 ++++++-- arch/arm64/kvm/sys_regs.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) commit 8d404c4c246137531f94dfee352f350d59d0e5a7 Author: Christoffer Dall Date: Wed Mar 16 15:38:53 2016 +0100 KVM: arm64: Rewrite system register accessors to read/write functions Currently we access the system registers array via the vcpu_sys_reg() macro. However, we are about to change the behavior to some times modify the register file directly, so let's change this to two primitives: * Accessor macros vcpu_write_sys_reg() and vcpu_read_sys_reg() * Direct array access macro __vcpu_sys_reg() The accessor macros should be used in places where the code needs to access the currently loaded VCPU's state as observed by the guest. For example, when trapping on cache related registers, a write to a system register should go directly to the VCPU version of the register. The direct array access macro can be used in places where the VCPU is known to never be running (for example userspace access) or for registers which are never context switched (for example all the PMU system registers). This rewrites all users of vcpu_sys_regs to one of the macros described above. No functional change. Acked-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_emulate.h | 13 ++++--- arch/arm64/include/asm/kvm_host.h | 13 ++++++- arch/arm64/include/asm/kvm_mmu.h | 2 +- arch/arm64/kvm/debug.c | 28 ++++++++++----- arch/arm64/kvm/inject_fault.c | 8 ++--- arch/arm64/kvm/sys_regs.c | 69 ++++++++++++++++++------------------ arch/arm64/kvm/sys_regs.h | 4 +-- arch/arm64/kvm/sys_regs_generic_v8.c | 4 +-- virt/kvm/arm/pmu.c | 36 +++++++++---------- 9 files changed, 101 insertions(+), 76 deletions(-) commit 52f6c4f0216427e9d922498048e4bd24f1b00232 Author: Christoffer Dall Date: Wed Oct 11 15:20:41 2017 +0200 KVM: arm64: Change 32-bit handling of VM system registers We currently handle 32-bit accesses to trapped VM system registers using the 32-bit index into the coproc array on the vcpu structure, which is a union of the coproc array and the sysreg array. Since all the 32-bit coproc indices are created to correspond to the architectural mapping between 64-bit system registers and 32-bit coprocessor registers, and because the AArch64 system registers are the double in size of the AArch32 coprocessor registers, we can always find the system register entry that we must update by dividing the 32-bit coproc index by 2. This is going to make our lives much easier when we have to start accessing system registers that use deferred save/restore and might have to be read directly from the physical CPU. Reviewed-by: Andrew Jones Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 8 -------- arch/arm64/kvm/sys_regs.c | 20 +++++++++++++++----- 2 files changed, 15 insertions(+), 13 deletions(-) commit 0c389d90ebf6ff68f9e19cbb32543084d775d351 Author: Christoffer Dall Date: Tue Oct 10 22:54:57 2017 +0200 KVM: arm64: Don't save the host ELR_EL2 and SPSR_EL2 on VHE systems On non-VHE systems we need to save the ELR_EL2 and SPSR_EL2 so that we can return to the host in EL1 in the same state and location where we issued a hypercall to EL2, but on VHE ELR_EL2 and SPSR_EL2 are not useful because we never enter a guest as a result of an exception entry that would be directly handled by KVM. The kernel entry code already saves ELR_EL1/SPSR_EL1 on exception entry, which is enough. Therefore, factor out these registers into separate save/restore functions, making it easy to exclude them from the VHE world-switch path later on. Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/sysreg-sr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 4cdecaba0146481f1503a645b8a5a41c1e8566c9 Author: Christoffer Dall Date: Tue Oct 10 22:40:13 2017 +0200 KVM: arm64: Unify non-VHE host/guest sysreg save and restore functions There is no need to have multiple identical functions with different names for saving host and guest state. When saving and restoring state for the host and guest, the state is the same for both contexts, and that's why we have the kvm_cpu_context structure. Delete one version and rename the other into simply save/restore. Reviewed-by: Andrew Jones Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_hyp.h | 6 ++---- arch/arm64/kvm/hyp/switch.c | 10 +++++----- arch/arm64/kvm/hyp/sysreg-sr.c | 18 ++---------------- 3 files changed, 9 insertions(+), 25 deletions(-) commit 0a62d43314e9f886e37fdf26a9ea9505a4e467cf Author: Christoffer Dall Date: Sun Dec 3 20:38:52 2017 +0100 KVM: arm/arm64: Remove leftover comment from kvm_vcpu_run_vhe The comment only applied to SPE on non-VHE systems, so we simply remove it. Suggested-by: Andrew Jones Acked-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/switch.c | 4 ---- 1 file changed, 4 deletions(-) commit f837453d0e10e9dd2e4444a940ccef1ed3cb243a Author: Christoffer Dall Date: Tue Oct 10 22:19:31 2017 +0200 KVM: arm64: Introduce separate VHE/non-VHE sysreg save/restore functions As we are about to handle system registers quite differently between VHE and non-VHE systems. In preparation for that, we need to split some of the handling functions between VHE and non-VHE functionality. For now, we simply copy the non-VHE functions, but we do change the use of static keys for VHE and non-VHE functionality now that we have separate functions. Reviewed-by: Andrew Jones Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_hyp.h | 12 ++++++++---- arch/arm64/kvm/hyp/switch.c | 20 ++++++++++---------- arch/arm64/kvm/hyp/sysreg-sr.c | 40 ++++++++++++++++++++++++++++++++-------- 3 files changed, 50 insertions(+), 22 deletions(-) commit 2b88104467e7742d30134f595c19e943f9c33308 Author: Christoffer Dall Date: Tue Oct 10 22:01:06 2017 +0200 KVM: arm64: Rewrite sysreg alternatives to static keys As we are about to move calls around in the sysreg save/restore logic, let's first rewrite the alternative function callers, because it is going to make the next patches much easier to read. Acked-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/sysreg-sr.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 060701f04ace30d79ee76143d37beb4fb754c3e7 Author: Christoffer Dall Date: Tue Mar 15 21:41:55 2016 +0100 KVM: arm64: Move userspace system registers into separate function There's a semantic difference between the EL1 registers that control operation of a kernel running in EL1 and EL1 registers that only control userspace execution in EL0. Since we can defer saving/restoring the latter, move them into their own function. The ARMv8 ARM (ARM DDI 0487C.a) Section D10.2.1 recommends that ACTLR_EL1 has no effect on the processor when running the VHE host, and we can therefore move this register into the EL1 state which is only saved/restored on vcpu_put/load for a VHE host. We also take this chance to rename the function saving/restoring the remaining system register to make it clear this function deals with the EL1 system registers. Reviewed-by: Andrew Jones Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/sysreg-sr.c | 48 ++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 13 deletions(-) commit 04fef057003c207ff4d9f22d2127aee2f9abecd0 Author: Christoffer Dall Date: Sat Aug 5 22:51:35 2017 +0200 KVM: arm64: Remove noop calls to timer save/restore from VHE switch The VHE switch function calls __timer_enable_traps and __timer_disable_traps which don't do anything on VHE systems. Therefore, simply remove these calls from the VHE switch function and make the functions non-conditional as they are now only called from the non-VHE switch path. Acked-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/switch.c | 2 -- virt/kvm/arm/hyp/timer-sr.c | 44 ++++++++++++++++++++++---------------------- 2 files changed, 22 insertions(+), 24 deletions(-) commit 34f8cdf1dfc218ba36b95bcc4e0d85ea42bba9fc Author: Christoffer Dall Date: Tue Oct 10 13:25:21 2017 +0200 KVM: arm64: Don't deactivate VM on VHE systems There is no need to reset the VTTBR to zero when exiting the guest on VHE systems. VHE systems don't use stage 2 translations for the EL2&0 translation regime used by the host. Reviewed-by: Andrew Jones Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/switch.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 86d05682b4f2eb88b796043c4f3b96e321f6a431 Author: Christoffer Dall Date: Fri Dec 23 00:20:38 2016 +0100 KVM: arm64: Remove kern_hyp_va() use in VHE switch function VHE kernels run completely in EL2 and therefore don't have a notion of kernel and hyp addresses, they are all just kernel addresses. Therefore don't call kern_hyp_va() in the VHE switch function. Reviewed-by: Andrew Jones Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/switch.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3f5c90b890acfa7ad0b817a67cfc5eaaf0e21f7d Author: Christoffer Dall Date: Tue Oct 3 14:02:12 2017 +0200 KVM: arm64: Introduce VHE-specific kvm_vcpu_run So far this is mostly (see below) a copy of the legacy non-VHE switch function, but we will start reworking these functions in separate directions to work on VHE and non-VHE in the most optimal way in later patches. The only difference after this patch between the VHE and non-VHE run functions is that we omit the branch-predictor variant-2 hardening for QC Falkor CPUs, because this workaround is specific to a series of non-VHE ARMv8.0 CPUs. Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_asm.h | 5 ++- arch/arm/kvm/hyp/switch.c | 2 +- arch/arm64/include/asm/kvm_asm.h | 4 ++- arch/arm64/include/asm/kvm_host.h | 7 +++++ arch/arm64/kvm/hyp/switch.c | 66 ++++++++++++++++++++++++++++++++++++++- virt/kvm/arm/arm.c | 12 ++++--- 6 files changed, 87 insertions(+), 9 deletions(-) commit dc251406bf244080adbc1a69b5a171ec4b43c93c Author: Christoffer Dall Date: Tue Oct 3 13:16:04 2017 +0200 KVM: arm64: Factor out fault info population and gic workarounds The current world-switch function has functionality to detect a number of cases where we need to fixup some part of the exit condition and possibly run the guest again, before having restored the host state. This includes populating missing fault info, emulating GICv2 CPU interface accesses when mapped at unaligned addresses, and emulating the GICv3 CPU interface on systems that need it. As we are about to have an alternative switch function for VHE systems, but VHE systems still need the same early fixup logic, factor out this logic into a separate function that can be shared by both switch functions. No functional change. Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/switch.c | 104 ++++++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 47 deletions(-) commit 014c4c77aad7660cc7c16cd23b0c3b114cf070d2 Author: Christoffer Dall Date: Tue Oct 10 20:10:08 2017 +0200 KVM: arm64: Improve debug register save/restore flow Instead of having multiple calls from the world switch path to the debug logic, each figuring out if the dirty bit is set and if we should save/restore the debug registers, let's just provide two hooks to the debug save/restore functionality, one for switching to the guest context, and one for switching to the host context, and we get the benefit of only having to evaluate the dirty flag once on each path, plus we give the compiler some more room to inline some of this functionality. Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_hyp.h | 10 ++----- arch/arm64/kvm/hyp/debug-sr.c | 56 +++++++++++++++++++++++++++------------- arch/arm64/kvm/hyp/switch.c | 6 ++--- 3 files changed, 42 insertions(+), 30 deletions(-) commit 5742d04912ebf7f2d5d169e4696bd1192ad32806 Author: Christoffer Dall Date: Tue Oct 10 19:55:56 2017 +0200 KVM: arm64: Slightly improve debug save/restore functions The debug save/restore functions can be improved by using the has_vhe() static key instead of the instruction alternative. Using the static key uses the same paradigm as we're going to use elsewhere, it makes the code more readable, and it generates slightly better code (no stack setups and function calls unless necessary). We also use a static key on the restore path, because it will be marginally faster than loading a value from memory. Finally, we don't have to conditionally clear the debug dirty flag if it's set, we can just clear it. Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/debug-sr.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 54ceb1bcf8d83e835be515d7d9e4129a73d80f4e Author: Christoffer Dall Date: Tue Oct 10 19:31:33 2017 +0200 KVM: arm64: Move debug dirty flag calculation out of world switch There is no need to figure out inside the world-switch if we should save/restore the debug registers or not, we might as well do that in the higher level debug setup code, making it easier to optimize down the line. Reviewed-by: Julien Thierry Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/debug.c | 5 +++++ arch/arm64/kvm/hyp/debug-sr.c | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) commit e72341c5126a70072a10585c45923dd55050ca79 Author: Christoffer Dall Date: Wed Dec 13 22:56:48 2017 +0100 KVM: arm/arm64: Introduce vcpu_el1_is_32bit We have numerous checks around that checks if the HCR_EL2 has the RW bit set to figure out if we're running an AArch64 or AArch32 VM. In some cases, directly checking the RW bit (given its unintuitive name), is a bit confusing, and that's not going to improve as we move logic around for the following patches that optimize KVM on AArch64 hosts with VHE. Therefore, introduce a helper, vcpu_el1_is_32bit, and replace existing direct checks of HCR_EL2.RW with the helper. Reviewed-by: Julien Grall Reviewed-by: Julien Thierry Acked-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_emulate.h | 7 ++++++- arch/arm64/kvm/hyp/switch.c | 11 +++++------ arch/arm64/kvm/hyp/sysreg-sr.c | 5 +++-- arch/arm64/kvm/inject_fault.c | 6 +++--- 4 files changed, 17 insertions(+), 12 deletions(-) commit bc192ceec37108bf6c04a5c5795fcea5f940b0de Author: Christoffer Dall Date: Tue Oct 10 10:21:18 2017 +0200 KVM: arm/arm64: Add kvm_vcpu_load_sysregs and kvm_vcpu_put_sysregs As we are about to move a bunch of save/restore logic for VHE kernels to the load and put functions, we need some infrastructure to do this. Reviewed-by: Andrew Jones Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_host.h | 3 +++ arch/arm64/include/asm/kvm_host.h | 3 +++ arch/arm64/kvm/hyp/sysreg-sr.c | 30 ++++++++++++++++++++++++++++++ virt/kvm/arm/arm.c | 2 ++ 4 files changed, 38 insertions(+) commit 3df59d8dd3c2526b33d51af9e6f66e61262de71b Author: Christoffer Dall Date: Thu Aug 3 12:09:05 2017 +0200 KVM: arm/arm64: Get rid of vcpu->arch.irq_lines We currently have a separate read-modify-write of the HCR_EL2 on entry to the guest for the sole purpose of setting the VF and VI bits, if set. Since this is most rarely the case (only when using userspace IRQ chip and interrupts are in flight), let's get rid of this operation and instead modify the bits in the vcpu->arch.hcr[_el2] directly when needed. Acked-by: Marc Zyngier Reviewed-by: Andrew Jones Reviewed-by: Julien Thierry Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_emulate.h | 9 ++------- arch/arm/include/asm/kvm_host.h | 3 --- arch/arm/kvm/emulate.c | 2 +- arch/arm/kvm/hyp/switch.c | 2 +- arch/arm64/include/asm/kvm_emulate.h | 9 ++------- arch/arm64/include/asm/kvm_host.h | 3 --- arch/arm64/kvm/hyp/switch.c | 6 ------ arch/arm64/kvm/inject_fault.c | 2 +- virt/kvm/arm/arm.c | 11 ++++++----- virt/kvm/arm/mmu.c | 6 +++--- 10 files changed, 16 insertions(+), 37 deletions(-) commit 35a84dec00a707aed97c1ff9ebb1cd1eb67c7052 Author: Shih-Wei Li Date: Thu Aug 3 11:45:21 2017 +0200 KVM: arm64: Move HCR_INT_OVERRIDE to default HCR_EL2 guest flag We always set the IMO and FMO bits in the HCR_EL2 when running the guest, regardless if we use the vgic or not. By moving these flags to HCR_GUEST_FLAGS we can avoid one of the extra save/restore operations of HCR_EL2 in the world switch code, and we can also soon get rid of the other one. This is safe, because even though the IMO and FMO bits control both taking the interrupts to EL2 and remapping ICC_*_EL1 to ICV_*_EL1 when executed at EL1, as long as we ensure that these bits are clear when running the EL1 host, we're OK, because we reset the HCR_EL2 to only have the HCR_RW bit set when returning to EL1 on non-VHE systems. Reviewed-by: Marc Zyngier Signed-off-by: Shih-Wei Li Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_arm.h | 4 ++-- arch/arm64/kvm/hyp/switch.c | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) commit 8f17f5e4698ee5e42c827e8905cf39cf61c482c2 Author: Christoffer Dall Date: Mon Oct 9 21:43:50 2017 +0200 KVM: arm64: Rework hyp_panic for VHE and non-VHE VHE actually doesn't rely on clearing the VTTBR when returning to the host kernel, and that is the current key mechanism of hyp_panic to figure out how to attempt to return to a state good enough to print a panic statement. Therefore, we split the hyp_panic function into two functions, a VHE and a non-VHE, keeping the non-VHE version intact, but changing the VHE behavior. The vttbr_el2 check on VHE doesn't really make that much sense, because the only situation where we can get here on VHE is when the hypervisor assembly code actually called into hyp_panic, which only happens when VBAR_EL2 has been set to the KVM exception vectors. On VHE, we can always safely disable the traps and restore the host registers at this point, so we simply do that unconditionally and call into the panic function directly. Acked-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/switch.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit 4464e210de9e80e38de59df052fe09ea2ff80b1b Author: Christoffer Dall Date: Sun Oct 8 17:01:56 2017 +0200 KVM: arm64: Avoid storing the vcpu pointer on the stack We already have the percpu area for the host cpu state, which points to the VCPU, so there's no need to store the VCPU pointer on the stack on every context switch. We can be a little more clever and just use tpidr_el2 for the percpu offset and load the VCPU pointer from the host context. This has the benefit of being able to retrieve the host context even when our stack is corrupted, and it has a potential performance benefit because we trade a store plus a load for an mrs and a load on a round trip to the guest. This does require us to calculate the percpu offset without including the offset from the kernel mapping of the percpu array to the linear mapping of the array (which is what we store in tpidr_el1), because a PC-relative generated address in EL2 is already giving us the hyp alias of the linear mapping of a kernel address. We do this in __cpu_init_hyp_mode() by using kvm_ksym_ref(). The code that accesses ESR_EL2 was previously using an alternative to use the _EL1 accessor on VHE systems, but this was actually unnecessary as the _EL1 accessor aliases the ESR_EL2 register on VHE, and the _EL2 accessor does the same thing on both systems. Cc: Ard Biesheuvel Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_asm.h | 15 +++++++++++++++ arch/arm64/include/asm/kvm_host.h | 15 +++++++++++++++ arch/arm64/kernel/asm-offsets.c | 1 + arch/arm64/kvm/hyp/entry.S | 6 +----- arch/arm64/kvm/hyp/hyp-entry.S | 28 ++++++++++------------------ arch/arm64/kvm/hyp/switch.c | 5 +---- arch/arm64/kvm/hyp/sysreg-sr.c | 5 +++++ 7 files changed, 48 insertions(+), 27 deletions(-) commit 829a58635497d7cc668133ac17daca9b78652661 Author: Christoffer Dall Date: Wed Nov 29 16:37:53 2017 +0100 KVM: arm/arm64: Move vcpu_load call after kvm_vcpu_first_run_init Moving the call to vcpu_load() in kvm_arch_vcpu_ioctl_run() to after we've called kvm_vcpu_first_run_init() simplifies some of the vgic and there is also no need to do vcpu_load() for things such as handling the immediate_exit flag. Reviewed-by: Julien Grall Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier virt/kvm/arm/arch_timer.c | 4 ---- virt/kvm/arm/arm.c | 22 ++++++++-------------- virt/kvm/arm/vgic/vgic-init.c | 11 ----------- 3 files changed, 8 insertions(+), 29 deletions(-) commit 7a364bd5db1cfba50f3bde115db0dadc31b0169b Author: Christoffer Dall Date: Sat Nov 25 20:25:00 2017 +0100 KVM: arm/arm64: Avoid vcpu_load for other vcpu ioctls than KVM_RUN Calling vcpu_load() registers preempt notifiers for this vcpu and calls kvm_arch_vcpu_load(). The latter will soon be doing a lot of heavy lifting on arm/arm64 and will try to do things such as enabling the virtual timer and setting us up to handle interrupts from the timer hardware. Loading state onto hardware registers and enabling hardware to signal interrupts can be problematic when we're not actually about to run the VCPU, because it makes it difficult to establish the right context when handling interrupts from the timer, and it makes the register access code difficult to reason about. Luckily, now when we call vcpu_load in each ioctl implementation, we can simply remove the call from the non-KVM_RUN vcpu ioctls, and our kvm_arch_vcpu_load() is only used for loading vcpu content to the physical CPU when we're actually going to run the vcpu. Reviewed-by: Julien Grall Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/guest.c | 3 --- virt/kvm/arm/arm.c | 9 --------- 2 files changed, 12 deletions(-) commit 288e5c8898c488298c39ff4bbf58928d30fbf99f Author: Arnd Bergmann Date: Mon Feb 26 10:49:26 2018 +0100 drm/msm: fix building without debugfs The adreno driver stopped building when CONFIG_DEBUGFS is disabled: drivers/gpu/drm/msm/adreno/adreno_device.c: In function 'adreno_load_gpu': drivers/gpu/drm/msm/adreno/adreno_device.c:153:16: error: 'const struct msm_gpu_funcs' has no member named 'debugfs_init' if (gpu->funcs->debugfs_init) { ^~ drivers/gpu/drm/msm/adreno/adreno_device.c:154:13: error: 'const struct msm_gpu_funcs' has no member named 'debugfs_init' gpu->funcs->debugfs_init(gpu, dev->primary); ^~ This adds an #ifdef around the code that references the hidden pointer. Fixes: 331dc0bc195b ("drm/msm: add a5xx specific debugfs") Signed-off-by: Arnd Bergmann Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_device.c | 2 ++ 1 file changed, 2 insertions(+) commit 61b734cb7cac6b06d0b33635622b51066e8da32f Author: Rob Clark Date: Mon Feb 19 08:31:29 2018 -0500 drm/msm/mdp5: don't pre-reserve LM's if no dual-dsi If there is only a single DSI interface, don't reserve the first two layer-mixers for the dual-DSI use-case. This was causing problems for WB, not being able to assign a LM, on 8x16, which has only two LM's and a single DSI. Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 583c13fd77c7db57add9de84a5e43fbf2be42168 Author: Rob Clark Date: Mon Feb 19 08:29:33 2018 -0500 drm/msm/mdp5: add missing LM flush bits For some reason, layer-mixer 3 and 4 were missing. LM3 is used for writeback on 8x16. Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c | 2 ++ 1 file changed, 2 insertions(+) commit 1af817909d092a35d002f7f2bdd2ef56d349e6bb Author: Rob Clark Date: Mon Feb 19 08:27:13 2018 -0500 drm/msm/mdp5: print a bit more of the atomic state Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 5 +++++ 1 file changed, 5 insertions(+) commit f9cb8d8d836e155f361c3f1bbe0802ae1f98a17e Author: Rob Clark Date: Mon Feb 19 08:17:06 2018 -0500 drm/msm/mdp5: rework CTL START signal handling For DSI cmd-mode and writeback, we need to write the CTL's START register to kick things off, but we only want to do that once both the encoder and the crtc have a chance to write their corresponding flush bits. The difficulty is that when there is a full modeset (ie. encoder state has changed) we want to defer the start until encoder->enable(). But if only plane's have changed, we want to do this from crtc->commit(). The start_mask was a previous attempt to handle this, but it didn't really do the right thing since atomic conversion. Instead track in the crtc state that the start should be deferred, set to try from encoder's (or in future writeback's) atomic_check(). This way the state is part of the atomic state, and rollback can work properly if an atomic test fails. Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c | 4 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 6 ++- drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c | 52 +++++++----------------- drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.h | 2 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_encoder.c | 5 ++- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h | 8 ++++ drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 2 +- 7 files changed, 35 insertions(+), 44 deletions(-) commit 79d57bf6fa3bcc0ec5fc3b8140c4df1d696f593b Author: Bjorn Andersson Date: Tue Feb 13 22:46:58 2018 -0800 drm/msm: Trigger fence completion from GPU Interrupt commands causes the CP to trigger an interrupt as the command is processed, regardless of the GPU being done processing previous commands. This is seen by the interrupt being delivered before the fence is written on 8974 and is likely the cause of the additional CP_WAIT_FOR_IDLE workaround found for a306, which would cause the CP to wait for the GPU to go idle before triggering the interrupt. Instead we can set the (undocumented) BIT(31) of the CACHE_FLUSH_TS which will cause a special CACHE_FLUSH_TS interrupt to be triggered from the GPU as the write event is processed. Add CACHE_FLUSH_TS to the IRQ masks of A3xx and A4xx and remove the workaround for A306. Suggested-by: Jordan Crouse Signed-off-by: Bjorn Andersson Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 1 + drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 1 + drivers/gpu/drm/msm/adreno/adreno_gpu.c | 18 ++---------------- 3 files changed, 4 insertions(+), 16 deletions(-) commit d71b6bd80d96f15f4ae393d3bec0636c960e289a Author: Rob Clark Date: Wed Feb 14 11:14:23 2018 -0500 drm/msm/dsi: fix direct caller of msm_gem_free_object() This should be using drm_gem_object_put(). Also since this is done only in driver unload path, we don't need to synchronize setting tx_gem_obj to NULL, so juse use the _unlocked() variant. Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi_host.c | 4 +--- drivers/gpu/drm/msm/msm_gem.c | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) commit 94c3e78d873f02379b2a7a7e4cfb020fd81f1bb7 Author: Rob Clark Date: Wed Feb 14 10:46:19 2018 -0500 drm/msm: strip out msm_fence_cb Remnants of pre-dma_fence fencing which got left behind by mistake. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.h | 1 - drivers/gpu/drm/msm/msm_fence.h | 2 -- 2 files changed, 3 deletions(-) commit 14be3200cd5f4ccece246f969c9c3645c3c12bd3 Author: Rob Clark Date: Mon Feb 12 08:18:27 2018 -0500 drm/msm: rename mdp->disp Since new display controller is called "dpu" instead of "mdp". Lets make the name of the toplevel directory for the display controllers a bit more generic. Signed-off-by: Rob Clark Reviewed-by: Sean Paul drivers/gpu/drm/msm/Makefile | 46 +- drivers/gpu/drm/msm/disp/mdp4/mdp4.xml.h | 1174 ++++++++++++ drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c | 670 +++++++ drivers/gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c | 190 ++ drivers/gpu/drm/msm/disp/mdp4/mdp4_dtv_encoder.c | 282 +++ drivers/gpu/drm/msm/disp/mdp4/mdp4_irq.c | 121 ++ drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 572 ++++++ drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.h | 249 +++ drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c | 503 +++++ .../gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c | 135 ++ drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_pll.c | 172 ++ drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c | 419 +++++ drivers/gpu/drm/msm/disp/mdp5/mdp5.xml.h | 1968 ++++++++++++++++++++ drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 652 +++++++ drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h | 133 ++ drivers/gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c | 230 +++ drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 1194 ++++++++++++ drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c | 779 ++++++++ drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.h | 86 + drivers/gpu/drm/msm/disp/mdp5/mdp5_encoder.c | 445 +++++ drivers/gpu/drm/msm/disp/mdp5/mdp5_irq.c | 136 ++ drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 1067 +++++++++++ drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h | 325 ++++ drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c | 282 +++ drivers/gpu/drm/msm/disp/mdp5/mdp5_mixer.c | 172 ++ drivers/gpu/drm/msm/disp/mdp5/mdp5_mixer.h | 47 + drivers/gpu/drm/msm/disp/mdp5/mdp5_pipe.c | 176 ++ drivers/gpu/drm/msm/disp/mdp5/mdp5_pipe.h | 57 + drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 1137 +++++++++++ drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 411 ++++ drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.h | 98 + drivers/gpu/drm/msm/disp/mdp_common.xml.h | 104 ++ drivers/gpu/drm/msm/disp/mdp_format.c | 191 ++ drivers/gpu/drm/msm/disp/mdp_kms.c | 149 ++ drivers/gpu/drm/msm/disp/mdp_kms.h | 148 ++ drivers/gpu/drm/msm/mdp/mdp4/mdp4.xml.h | 1174 ------------ drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 670 ------- drivers/gpu/drm/msm/mdp/mdp4/mdp4_dsi_encoder.c | 190 -- drivers/gpu/drm/msm/mdp/mdp4/mdp4_dtv_encoder.c | 282 --- drivers/gpu/drm/msm/mdp/mdp4/mdp4_irq.c | 121 -- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 572 ------ drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h | 249 --- drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c | 503 ----- drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_connector.c | 135 -- drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_pll.c | 172 -- drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c | 419 ----- drivers/gpu/drm/msm/mdp/mdp5/mdp5.xml.h | 1968 -------------------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c | 652 ------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.h | 133 -- drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c | 230 --- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 1194 ------------ drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.c | 779 -------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.h | 86 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c | 445 ----- drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c | 136 -- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 1067 ----------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 325 ---- drivers/gpu/drm/msm/mdp/mdp5/mdp5_mdss.c | 282 --- drivers/gpu/drm/msm/mdp/mdp5/mdp5_mixer.c | 172 -- drivers/gpu/drm/msm/mdp/mdp5/mdp5_mixer.h | 47 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_pipe.c | 176 -- drivers/gpu/drm/msm/mdp/mdp5/mdp5_pipe.h | 57 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 1137 ----------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_smp.c | 411 ---- drivers/gpu/drm/msm/mdp/mdp5/mdp5_smp.h | 98 - drivers/gpu/drm/msm/mdp/mdp_common.xml.h | 104 -- drivers/gpu/drm/msm/mdp/mdp_format.c | 191 -- drivers/gpu/drm/msm/mdp/mdp_kms.c | 149 -- drivers/gpu/drm/msm/mdp/mdp_kms.h | 148 -- 69 files changed, 14497 insertions(+), 14497 deletions(-) commit 52749d601a6055da3352842575408fcba6f1da46 Author: Gustavo A. R. Silva Date: Fri Feb 2 06:42:33 2018 -0600 drm/msm/dsi: Fix potential NULL pointer dereference in msm_dsi_modeset_init _dev_ is being dereferenced before it is null checked, hence there is a potential null pointer dereference. Fix this by moving the pointer dereference after _dev_ has been null checked. Fixes: d4e7f38d70ef ("drm/msm/dsi: check msm_dsi and dsi pointers before use") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5abc7dd7b5a0f51a6c7d9cb3ce72b910ba3cef7b Author: Gustavo A. R. Silva Date: Fri Feb 2 06:32:23 2018 -0600 drm/msm/adreno/a5xx_debugfs: fix potential NULL pointer dereference _minor_ is being dereferenced before it is null checked, hence there is a potential null pointer dereference. Fix this by moving the pointer dereference after _minor_ has been null checked. Fixes: 024ad8df763f ("drm/msm: add a5xx specific debugfs") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit daf9a874c9cf0dd379195362f3bd8ef8280d82cb Author: Miquel Raynal Date: Mon Mar 19 10:21:58 2018 +0100 mtd: rawnand: makes the Kconfig entry clear when it comes to raw NANDs Files have been moved in the NAND subsystem to reflect the different flavors of NAND devices. Raw/Parallel NAND devices have been moved to a "raw" subdirectory to make the difference with OneNAND and SPI NAND for instance. So adjust the Kconfig entry to clarify things. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit da76ba50963b81413ffd3613f84ee9e592220b3d Author: Manikanta Maddireddy Date: Wed Feb 28 15:30:34 2018 +0530 PCI: tegra: Add power management support Tegra186 powergate driver is implemented as power domain driver, power partition ungate/gate are registered as power_on/power_off callback functions. There are no direct functions to power gate/ungate host controller in Tegra186. Host controller driver should add "power-domains" property in device tree and implement runtime suspend and resume callback functons. Power gate and ungate is taken care by power domain driver when host controller driver calls pm_runtime_put_sync and pm_runtime_get_sync respectively. Register suspend_noirq & resume_noirq callback functions to allow PCIe to come up after resume from RAM. Both runtime and noirq pm ops share same callback functions. Signed-off-by: Manikanta Maddireddy [lorenzo.pieralisi@arm.com: squashed patch to fix compilation] Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding Tested-by: Thierry Reding drivers/pci/host/pci-tegra.c | 180 +++++++++++++++++++++++++++---------------- 1 file changed, 113 insertions(+), 67 deletions(-) commit d8303075699292008ae5b2c8fc728d455b994c26 Author: Zhenyu Wang Date: Mon Mar 19 17:09:05 2018 +0800 drm/i915/gvt: force to set all context control bits from guest Our shadow context content is from guest but with masked control reg like CTX_CONTEXT_CONTROL, we need to make sure all settings from guest would be set when this context is on hw, this trys to force mask enable bits for all to ensure every bits setting would be effective on hw. One regression found related to once inhibit bit is set, gpu engine are working on inhibit state until MI_LOAD_REG_IMM command or context image clear inhibit bit with mask bit set to 1, and val bit set to 0. In gvt-g currently workload has the highest priority, so gvt-g workload could trigger preempt context easily, preempt context set inhibit bit, then gvt-g workload is scheduled in, but gvt-g workload shadow context image usually doesn't set inhibit mask bit, so gpu is still in inhibit state when gvt workload is running. This caused gpu hang. Suggested-by: Zhang, Xiong Signed-off-by: Zhenyu Wang Reviewed-by: Zhang, Xiong drivers/gpu/drm/i915/gvt/scheduler.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 51fd62769d415d343efd993d124f5551cfe5fcba Author: Geert Uytterhoeven Date: Mon Mar 12 10:56:45 2018 +0100 m68k/defconfig: Update defconfigs for v4.16-rc5 Signed-off-by: Geert Uytterhoeven arch/m68k/configs/amiga_defconfig | 12 +++++++++++- arch/m68k/configs/apollo_defconfig | 12 +++++++++++- arch/m68k/configs/atari_defconfig | 12 +++++++++++- arch/m68k/configs/bvme6000_defconfig | 12 +++++++++++- arch/m68k/configs/hp300_defconfig | 12 +++++++++++- arch/m68k/configs/mac_defconfig | 12 +++++++++++- arch/m68k/configs/multi_defconfig | 12 +++++++++++- arch/m68k/configs/mvme147_defconfig | 12 +++++++++++- arch/m68k/configs/mvme16x_defconfig | 12 +++++++++++- arch/m68k/configs/q40_defconfig | 12 +++++++++++- arch/m68k/configs/sun3_defconfig | 12 +++++++++++- arch/m68k/configs/sun3x_defconfig | 12 +++++++++++- 12 files changed, 132 insertions(+), 12 deletions(-) commit 55496d3fe2acd1a365c43cbd613a20ecd4d74395 Author: Michael Schmitz Date: Sat Mar 3 12:04:13 2018 +1300 zorro: Set up z->dev.dma_mask for the DMA API The generic DMA API uses dev->dma_mask to check the DMA addressable memory bitmask, and warns if no mask is set or even allocated. Set z->dev.dma_coherent_mask on Zorro bus scan, and make z->dev.dma_mask to point to z->dev.dma_coherent_mask so device drivers that need DMA have everything set up to avoid warnings from dma_alloc_coherent(). Drivers can still use dma_set_mask_and_coherent() to explicitly set their DMA bit mask. Signed-off-by: Michael Schmitz [geert: Handle Zorro II with 24-bit address space] Acked-by: Christoph Hellwig Signed-off-by: Geert Uytterhoeven drivers/zorro/zorro.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 6efe2649a769bac00dbaee5214c49d80c86de2c9 Author: Alexandre Belloni Date: Wed Feb 21 22:37:24 2018 +0100 m68k/time: Stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it just before returning from the callback. Signed-off-by: Alexandre Belloni Signed-off-by: Geert Uytterhoeven arch/m68k/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31833332f79876366809ccb0614fee7df8afe9fe Author: Geert Uytterhoeven Date: Fri Feb 9 11:14:28 2018 +0100 m68k/mm: Stop printing the virtual memory layout Since commit ad67b74d2469d9b8 ("printk: hash addresses printed with %p"), the virtual memory layout printed during boot up contains "ptrval" instead of actual addresses: Memory: 268040K/276480K available (2979K kernel code, 310K rwdata, 784K rodata, 144K init, 172K bss, 8440K reserved, 0K cma-reserved) Virtual kernel memory layout: vector : 0x003d2e74 - 0x003d3274 ( 1 KiB) kmap : 0xd0000000 - 0xf0000000 ( 512 MiB) vmalloc : 0x11800000 - 0xd0000000 (3048 MiB) lowmem : 0x00000000 - 0x11000000 ( 272 MiB) .init : 0x(ptrval) - 0x(ptrval) ( 144 KiB) .text : 0x(ptrval) - 0x(ptrval) (2980 KiB) .data : 0x(ptrval) - 0x(ptrval) (1095 KiB) .bss : 0x(ptrval) - 0x(ptrval) ( 173 KiB) Instead of changing the printing to "%px", and leaking virtual memory layout information again, just remove the printing completely, cfr. e.g. commit 071929dbdd865f77 ("arm64: Stop printing the virtual memory layout"). All interesting information (actual section sizes) is already printed by mem_init_print_info() just above anyway. Signed-off-by: Geert Uytterhoeven arch/m68k/mm/init.c | 27 --------------------------- 1 file changed, 27 deletions(-) commit a64138ec15f4361c456563167bae12ed95a68d6b Author: Finn Thain Date: Sat Jan 27 18:51:40 2018 -0500 macintosh/via-pmu68k: Initialize PMU driver with setup_arch and arch_initcall The PMU watchdog will power down the system if the kernel is slow to start up, e.g. due to unpacking a large initrd. The powerpc version of this driver (via-pmu.c) has a solution for the same problem. It uses this call sequence: setup_arch find_via_pmu init_pmu ... arch_initcall via_pmu_start Bring via-pmu68k.c into line with via-pmu.c to fix this issue. Cc: Geert Uytterhoeven Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/config.c | 4 ++ drivers/macintosh/via-pmu68k.c | 89 +++++++++++++++++++++++++++++------------- 2 files changed, 65 insertions(+), 28 deletions(-) commit a1eb1cdf4e55e1ecdb4a474070450d8a648686bf Author: Finn Thain Date: Sat Jan 27 18:51:40 2018 -0500 m68k/mac: Fix apparent race condition in Baboon interrupt dispatch The algorithm used in baboon_irq() appears to be subject to a race condition: an IRQ flag could be lost if asserted between the MOV instructions from and to the interrupt flag register. However, testing shows that the write to the flag register has no effect. Rewrite this loop to remove the apparent race condition. No-one seems to know how to clear Baboon IRQ flags, or whether that's even possible, so add a comment about this. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/baboon.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) commit e5f0d2e2a153b18dcf31e1a633e210c37829d759 Author: Finn Thain Date: Sat Jan 27 18:51:40 2018 -0500 m68k/mac: Enable PDMA support for PowerBook 190 Stan's tests showed that PDMA improves sequential read performance by a factor of 5 on a PowerBook 190. Last time I tried this on a PowerBook 520 it didn't work, so let's not enable it there until it can be tested with the present mac_scsi driver. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/config.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 7642d8386ac71af0666c425264c4d7380269f62c Author: Heinrich Schuchardt Date: Sun Mar 18 15:47:40 2018 +0100 usb: dwc3: ep0: remove redundant assignment In dwc3_request *r = NULL; r = A; the first assignment has no effect. Remove it. Signed-off-by: Heinrich Schuchardt Signed-off-by: Felipe Balbi drivers/usb/dwc3/ep0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c817ccf73abaf7b06a2630e8352d82648c8bc70 Author: Vivek Gautam Date: Wed Jul 19 17:59:08 2017 +0200 soc/tegra: pmc: Use the new reset APIs to manage reset controllers Make use of of_reset_control_array_get_exclusive() to manage an array of reset controllers available with the device. Cc: Jon Hunter Cc: Thierry Reding Signed-off-by: Vivek Gautam [p.zabel@pengutronix.de: switch to hidden reset control array] Signed-off-by: Philipp Zabel Acked-by: Jon Hunter Signed-off-by: Thierry Reding drivers/soc/tegra/pmc.c | 92 ++++++++++--------------------------------------- 1 file changed, 18 insertions(+), 74 deletions(-) commit 274ce5e24170d20160d1ebc2e5e83b371646bf60 Author: Eugeniy Paltsev Date: Tue Mar 6 14:46:15 2018 +0300 dt-bindings: Document the Synopsys DW AXI DMA bindings This patch adds documentation of device tree bindings for the Synopsys DesignWare AXI DMA controller. Signed-off-by: Eugeniy Paltsev Reviewed-by: Rob Herring Signed-off-by: Vinod Koul .../devicetree/bindings/dma/snps,dw-axi-dmac.txt | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 1fe20f1b84548bbcf48b6659ea171cd46618ea3a Author: Eugeniy Paltsev Date: Tue Mar 6 14:46:14 2018 +0300 dmaengine: Introduce DW AXI DMAC driver This patch adds support for the DW AXI DMAC controller. DW AXI DMAC is a part of HSDK development board from Synopsys. In this driver implementation only DMA_MEMCPY transfers are supported. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vinod Koul MAINTAINERS | 6 + drivers/dma/Kconfig | 10 + drivers/dma/Makefile | 1 + drivers/dma/dw-axi-dmac/Makefile | 1 + drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 1008 ++++++++++++++++++++++++ drivers/dma/dw-axi-dmac/dw-axi-dmac.h | 334 ++++++++ 6 files changed, 1360 insertions(+) commit 7ecbd6a91b1e9bb90a4f3be641669347aacc5ab5 Author: Kuninori Morimoto Date: Mon Mar 19 07:27:17 2018 +0000 soc-core: don't call kfree() for component When driver register its component to ALSA SoC, almost all drivers are using snd_soc_register_component(), but soc-generic-dmaengine-pcm is using snd_soc_add_component(). Existing component function had been assumed that registered component was allocated, and it calling kfree() for it. But, the user who used snd_soc_add_component() doesn't. This patch uses devm_kzalloc() instead of kzalloc() for component, and doesn't call kree() anymore. This patch fixes commit be7ee5f32a9a ("ASoC: soc-generic-dmaengine-pcm: replace platform to component"). Allwinner H3 SoC will crash without this patch. Thanks Jernej report. Reported-by: Jernej Skrabec Signed-off-by: Kuninori Morimoto Tested-by: Jernej Skrabec Signed-off-by: Mark Brown sound/soc/soc-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c5fe47327b067432ef944714ce66ce75bb85749f Author: José Roberto de Souza Date: Fri Mar 16 18:38:28 2018 -0700 drm: Add PSR version 3 macro eDP 1.4a specification defines PSR version 3, it PSR2 with the addition of Y-coordinate support when doing selective update. Signed-off-by: José Roberto de Souza Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180317013828.24182-1-jose.souza@intel.com include/drm/drm_dp_helper.h | 1 + 1 file changed, 1 insertion(+) commit 05bdcf12905533b8628627b6634608cd3b57c607 Author: Liam Girdwood Date: Wed Mar 14 20:42:40 2018 +0000 ASoC: topology: Check widget kcontrols before deref. Validate the topology input before we dereference the pointer. Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/soc-topology.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 3c1464658ec642309453db33364e82291d98acc2 Author: Liam Girdwood Date: Wed Mar 14 20:43:51 2018 +0000 ASoC: pcm: improve debug output for DPCM BE searching. Improve the DPCM BE search debug output to make it easier to debug issues in topologies. Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/soc-pcm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b20c0d5ce1047ba03a6709a07f31f4d7178de35c Author: Zhi Wang Date: Wed Feb 7 18:12:15 2018 +0800 drm/i915/gvt: Update PDPs after a vGPU mm object is pinned. The PDPs of a shadow page will only be valid after a vGPU mm is pinned. So the PDPs in the shadow context should be updated then. Signed-off-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit 730c8ead53bf3011d33de69ff5a6cebf51e697b5 Author: Zhi Wang Date: Wed Feb 7 18:12:14 2018 +0800 drm/i915/gvt: Invalidate vGPU PPGTT mm objects during a vGPU reset. As different OSes might handling GVT PPGTT creation/destroy notification differently during a vGPU reset. A better approach is invalidating all vGPU PPGTT mm objects during vGPU reset. Signed-off-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 22 ++++++++++++++++++++++ drivers/gpu/drm/i915/gvt/gtt.h | 1 + drivers/gpu/drm/i915/gvt/vgpu.c | 1 + 3 files changed, 24 insertions(+) commit 5cd4223ea3bd29e4a17d0bd8f2adbe50e50b2e57 Author: Changbin Du Date: Mon Mar 12 15:12:34 2018 +0800 drm/i915/kvmgt: Handle kzalloc failure Out-of-memory error must be handled correctly. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/kvmgt.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 84f69ba081b8d8358f725f2a7fd12c1b6f43d445 Author: Colin Ian King Date: Mon Mar 12 12:43:58 2018 +0100 drm/i915/gvt: fix spelling mistake: "destoried" -> "destroyed" Trivial fix to spelling mistake in gvt_err error message text. Signed-off-by: Colin Ian King Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2744f862cf63c557be92ee466c6bcfddc230323 Author: Colin Xu Date: Sat Mar 17 15:31:02 2018 +0800 drm/i915/gvt: Remove reduntant printing of untracked mmio Reduntant message prints when: - linux guest creating. - dma-buf win10 guest boot. - xonotic stress testing in linux guest. Add below registers to default MMIO handler: 0xd00, RPM_CONFIG0 0xd40, RC6_LOCATION 0x65010, HSW_AUD_MISC_CTRL 0x6671c, 0x700a0, CUR_FBC_CTL 0x7239c, v2: - Should init i915_reg_t using uint32_t instead of _MMIO macro. (compiling errors) - Use defined offset in i915_reg.h (zhenyu) Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 0833721ec3658a4e9d5e58b6fa82cf9edc431e59 Author: Yunlei He Date: Thu Mar 8 16:29:13 2018 +0800 f2fs: check blkaddr more accuratly before issue a bio This patch check blkaddr more accuratly before issue a write or read bio. Signed-off-by: Yunlei He Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 2 ++ fs/f2fs/data.c | 5 +++-- fs/f2fs/f2fs.h | 1 + fs/f2fs/segment.h | 25 +++++++++++++++++++------ 4 files changed, 25 insertions(+), 8 deletions(-) commit 02117b8ae9c0549500119c42375f9e15602bf47e Author: Ritesh Harjani Date: Fri Mar 16 18:53:53 2018 +0530 f2fs: Set GF_NOFS in read_cache_page_gfp while doing f2fs_quota_read Quota code itself is serializing the operations by taking mutex_lock. It seems a below deadlock can happen if GF_NOFS is not used in f2fs_quota_read __switch_to+0x88 __schedule+0x5b0 schedule+0x78 schedule_preempt_disabled+0x20 __mutex_lock_slowpath+0xdc //mutex owner is itself mutex_lock+0x2c dquot_commit+0x30 //mutex_lock(&dqopt->dqio_mutex); dqput+0xe0 __dquot_drop+0x80 dquot_drop+0x48 f2fs_evict_inode+0x218 evict+0xa8 dispose_list+0x3c prune_icache_sb+0x58 super_cache_scan+0xf4 do_shrink_slab+0x208 shrink_slab.part.40+0xac shrink_zone+0x1b0 do_try_to_free_pages+0x25c try_to_free_pages+0x164 __alloc_pages_nodemask+0x534 do_read_cache_page+0x6c read_cache_page+0x14 f2fs_quota_read+0xa4 read_blk+0x54 find_tree_dqentry+0xe4 find_tree_dqentry+0xb8 find_tree_dqentry+0xb8 find_tree_dqentry+0xb8 qtree_read_dquot+0x68 v2_read_dquot+0x24 dquot_acquire+0x5c // mutex_lock(&dqopt->dqio_mutex); dqget+0x238 __dquot_initialize+0xd4 dquot_initialize+0x10 dquot_file_open+0x34 f2fs_file_open+0x6c do_dentry_open+0x1e4 vfs_open+0x6c path_openat+0xa20 do_filp_open+0x4c do_sys_open+0x178 Signed-off-by: Ritesh Harjani Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08fdc8a0138afaf324296a342f32ad26ec465e43 Author: Mateusz Guzik Date: Tue Oct 3 18:17:41 2017 +0200 buffer.c: call thaw_super during emergency thaw There are 2 distinct freezing mechanisms - one operates on block devices and another one directly on super blocks. Both end up with the same result, but thaw of only one of these does not thaw the other. In particular fsfreeze --freeze uses the ioctl variant going to the super block. Since prior to this patch emergency thaw was not doing a relevant thaw, filesystems frozen with this method remained unaffected. The patch is a hack which adds blind unfreezing. In order to keep the super block write-locked the whole time the code is shuffled around and the newly introduced __iterate_supers is employed. Signed-off-by: Mateusz Guzik Signed-off-by: Al Viro fs/buffer.c | 25 +------------------------ fs/super.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- include/linux/fs.h | 6 ++++++ 3 files changed, 49 insertions(+), 26 deletions(-) commit bcbd41da3b0a8a3e0f8457bb545a32f5ca3c81f5 Merge: 81796a3 9851bc7 Author: Martin Schwidefsky Date: Sun Mar 18 23:02:52 2018 -0700 Merge tag 'vfio-ccw-20180305' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into features Pull vfio-ccw patches from Cornelia Huck: A small documentation update, and reject transport mode requests (which we don't support). commit 81796a3c6a4ad3ba0408c807ec14f50e6270ec23 Author: Vasily Gorbik Date: Mon Mar 5 09:58:00 2018 +0100 s390/decompressor: trim uncompressed image head during the build It seems to be suboptimal to compress the entire image, so that we could decompress and throw away the first 68k (0x11000) during the boot process. This patch trims 0x11000 bytes during the build process and adjusts symbols in size.h accordingly. Besides making bzImage smaller, this change would also be a benefit for kaslr. It allows to decompress the kernel right to desired offset, without worrying about dead weight in front of the decompressed image. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/boot/compressed/Makefile | 16 ++++++++++++---- arch/s390/boot/compressed/head.S | 6 ++---- 2 files changed, 14 insertions(+), 8 deletions(-) commit c7260ca335a09fb186885c80bd6022318c10c541 Author: Harald Freudenberger Date: Thu Mar 1 16:40:00 2018 +0100 s390/crypto: Fix kernel crash on aes_s390 module remove. A kernel crash occurs when the aes_s390 kernel module is removed on machines < z14. This only happens on kernel version 4.15 and higher on machines not supporting MSA 8. The reason for the crash is a unconditional crypto_unregister_aead() invocation where no previous crypto_register_aead() had been called. The fix now remembers if there has been a successful registration and only then calls the unregister function upon kernel module remove. The code now crashing has been introduced with "bf7fa03 s390/crypto: add s390 platform specific aes gcm support." Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/crypto/aes_s390.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c9f52c2ddb285738219ff2231a96ba3c8f5bd746 Author: Christian Borntraeger Date: Wed Feb 28 08:26:40 2018 +0000 s390/defkeymap: fix global init to zero Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky drivers/s390/char/defkeymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 936b2161df6af5d9407d243e0257f0c2c8e59a66 Author: Christian Borntraeger Date: Wed Feb 21 11:54:07 2018 +0000 s390/sclp_tty: enable line mode tty even if there is an ascii console commit 8f50af49f564d4e5 ("s390/console: Make preferred console handling more consistent") created a separate console state for the ascii console. This has the side effect that we register no tty for the line mode interface as soon as there an ascii interface as default console. Under KVM this results in no getty program on the line mode tty if the guest has both types of interfaces. As we can have multiple ttys at the same time we do not want to disable the tty on sclp_line0 under KVM. So instead of checking for the console mode, we now check for the presence of the sclp line mode interface. As z/VM multiplexes the line mode interface on the 32xx screen we continue to disable the line mode tty for the z/VM case. CC: Peter Oberparleiter Fixes: 8f50af49f564d4e5 ("s390/console: Make preferred console handling more consistent") Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky drivers/s390/char/sclp_tty.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 579f1a2883306518ff4bbd571009604dfa8ad7b0 Author: Farhan Ali Date: Thu Feb 22 11:22:24 2018 -0500 s390/setup : enable display support for KVM guest The S390 architecture does not support any graphics hardware, but with the latest support for Virtio GPU in Linux and Virtio GPU emulation in QEMU, it's possible to enable graphics for S390 using the Virtio GPU device. To enable display we need to enable the Linux Virtual Terminal (VT) layer for S390. But the VT subsystem initializes quite early at boot so we need a dummy console driver till the Virtio GPU driver is initialized and we can run the framebuffer console. The framebuffer console over a Virtio GPU device can be run in combination with the serial SCLP console (default on S390). The SCLP console can still be accessed by management applications (eg: via Libvirt's virsh console). Signed-off-by: Farhan Ali Acked-by: Christian Borntraeger Reviewed-by: Thomas Huth Message-Id: Signed-off-by: Christian Borntraeger Acked-by: Greg Kroah-Hartman Signed-off-by: Martin Schwidefsky arch/s390/kernel/setup.c | 2 ++ drivers/tty/Kconfig | 2 +- drivers/video/console/Kconfig | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) commit aa0f2dd4de202c185b1156b1d43eb23e457e9a3c Author: Farhan Ali Date: Thu Feb 22 11:22:23 2018 -0500 s390/char : Rename EBCDIC keymap variables The Linux Virtual Terminal (VT) layer provides a default keymap which is compiled when VT layer is enabled. But at the same time we are also compiling the EBCDIC keymap and this causes the linker to complain. So let's rename the EBCDIC keymap variables to prevent linker conflict. Signed-off-by: Farhan Ali Acked-by: Christian Borntraeger Reviewed-by: Thomas Huth Message-Id: Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky drivers/s390/char/defkeymap.c | 66 ++++++++++++++++++++++--------------------- drivers/s390/char/keyboard.c | 32 ++++++++++----------- drivers/s390/char/keyboard.h | 11 ++++++++ 3 files changed, 61 insertions(+), 48 deletions(-) commit 0a3994f9da47c9dd91e54ced4d003a3a364cdc3f Author: Farhan Ali Date: Thu Feb 22 11:22:22 2018 -0500 Kconfig : Remove HAS_IOMEM dependency for Graphics support The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")' added the HAS_IOMEM dependecy for "Graphics support". This disabled the "Graphics support" menu for S390. But if we enable VT layer for S390, we would also need to enable the dummy console. So let's remove the HAS_IOMEM dependency. Move this dependency to sub menu items and console drivers that use io memory. Signed-off-by: Farhan Ali Reviewed-by: Thomas Huth Message-Id: <6e8ef238162df5be4462126be155975c722e9863.1519315352.git.alifm@linux.vnet.ibm.com> Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky drivers/video/Kconfig | 5 ++++- drivers/video/console/Kconfig | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) commit 73709e1af5163ebf5e9b0e18fe90b7e843657d36 Merge: c26dd81 c698ca5 Author: Greg Kroah-Hartman Date: Mon Mar 19 06:47:01 2018 +0100 Merge 4.16-rc6 into staging-next We want the staging fixes in here as well to handle merge/test issues. Signed-off-by: Greg Kroah-Hartman commit 793057e1c7272a4531aafc130c4d658e4b57422c Author: Ingo Molnar Date: Wed Feb 28 09:39:48 2018 +0100 vfs: Replace stray non-ASCII homoglyph characters with their ASCII equivalents Signed-off-by: Ingo Molnar Signed-off-by: Al Viro fs/ocfs2/dlmglue.c | 2 +- fs/xfs/xfs_aops.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1c94984396dc7bc40b4f6899674eaa41f29a4f6e Author: Rasmus Villemoes Date: Thu Mar 1 00:19:21 2018 +0100 vfs: make sure struct filename->iname is word-aligned I noticed that offsetof(struct filename, iname) is actually 28 on 64 bit platforms, so we always pass an unaligned pointer to strncpy_from_user. This is mostly a problem for those 64 bit platforms without HAVE_EFFICIENT_UNALIGNED_ACCESS, but even on x86_64, unaligned accesses carry a penalty. A user-space microbenchmark doing nothing but strncpy_from_user from the same (aligned) source string runs about 5% faster when the destination is aligned. That number increases to 20% when the string is long enough (~32 bytes) that we cross a cache line boundary - that's for example the case for about half the files a "git status" in a kernel tree ends up stat'ing. This won't make any real-life workloads 5%, or even 1%, faster, but path lookup is common enough that cutting even a few cycles should be worthwhile. So ensure we always pass an aligned destination pointer to strncpy_from_user. Instead of explicit padding, simply swap the refcnt and aname members, as suggested by Al Viro. Signed-off-by: Rasmus Villemoes Signed-off-by: Al Viro fs/namei.c | 2 ++ include/linux/fs.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 7bd698b3c04e61ee9e03d4c2a55003f75df14dca Author: Kees Cook Date: Fri Mar 9 11:30:20 2018 -0800 exec: Set file unwritable before LSM check The LSM check should happen after the file has been confirmed to be unchanging. Without this, we could have a race between the Time of Check (the call to security_kernel_read_file() which could read the file and make access policy decisions) and the Time of Use (starting with kernel_read_file()'s reading of the file contents). In theory, file contents could change between the two. Signed-off-by: Kees Cook Reviewed-by: Mimi Zohar Signed-off-by: James Morris fs/exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5f2b18ec8e1643410a2369f06888951cdedea0bf Author: Bart Van Assche Date: Sun Mar 18 17:36:33 2018 -0700 bcache: Fix a compiler warning in bcache_device_init() Avoid that building with W=1 triggers the following compiler warning: drivers/md/bcache/super.c:776:20: warning: comparison is always false due to limited range of data type [-Wtype-limits] d->nr_stripes > SIZE_MAX / sizeof(atomic_t)) { ^ Reviewed-by: Coly Li Reviewed-by: Michael Lyle Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 20d3a518713e394efa5a899c84574b4b79ec5098 Author: Bart Van Assche Date: Sun Mar 18 17:36:32 2018 -0700 bcache: Reduce the number of sparse complaints about lock imbalances Add more annotations for sparse to inform it about which functions do not have the same number of spin_lock() and spin_unlock() calls. Signed-off-by: Bart Van Assche Reviewed-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/journal.c | 2 ++ 1 file changed, 2 insertions(+) commit 42361469ae84c851e40cb1f94c8c9a14cdd94039 Author: Bart Van Assche Date: Sun Mar 18 17:36:31 2018 -0700 bcache: Suppress more warnings about set-but-not-used variables This patch does not change any functionality. Reviewed-by: Michael Lyle Reviewed-by: Coly Li Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe drivers/md/bcache/bset.c | 4 ++-- drivers/md/bcache/journal.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit f0d3814090ac77de94c42b7124c37ece23629197 Author: Bart Van Assche Date: Sun Mar 18 17:36:30 2018 -0700 bcache: Remove an unused variable Signed-off-by: Bart Van Assche Reviewed-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/extents.c | 2 -- 1 file changed, 2 deletions(-) commit 47344e330eabc1515cbe6061eb337100a3ab6d37 Author: Bart Van Assche Date: Sun Mar 18 17:36:29 2018 -0700 bcache: Fix kernel-doc warnings Avoid that building with W=1 triggers warnings about the kernel-doc headers. Signed-off-by: Bart Van Assche Reviewed-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/btree.c | 2 +- drivers/md/bcache/closure.c | 8 ++++---- drivers/md/bcache/request.c | 1 + drivers/md/bcache/util.c | 18 ++++++++---------- 4 files changed, 14 insertions(+), 15 deletions(-) commit 9dfbdec7b7fea1ff1b7b5d5d12980dbc7dca46c7 Author: Bart Van Assche Date: Sun Mar 18 17:36:28 2018 -0700 bcache: Annotate switch fall-through This patch avoids that building with W=1 triggers complaints about switch fall-throughs. Signed-off-by: Bart Van Assche Reviewed-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/util.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4a4e443835a43a79113cc237c472c0d268eb1e1c Author: Bart Van Assche Date: Sun Mar 18 17:36:27 2018 -0700 bcache: Add __printf annotation to __bch_check_keys() Make it possible for the compiler to verify the consistency of the format string passed to __bch_check_keys() and the arguments that should be formatted according to that format string. Signed-off-by: Bart Van Assche Reviewed-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/bset.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fd01991d5c20098c5c1ffc4dca6c821cc60a2f74 Author: Bart Van Assche Date: Sun Mar 18 17:36:26 2018 -0700 bcache: Fix indentation This patch avoids that smatch complains about inconsistent indentation. Signed-off-by: Bart Van Assche Reviewed-by: Michael Lyle Reviewed-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/btree.c | 2 +- drivers/md/bcache/writeback.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c7b7bd07404c52d8b9c6fd2fe794052ac367a818 Author: Coly Li Date: Sun Mar 18 17:36:25 2018 -0700 bcache: add io_disable to struct cached_dev If a bcache device is configured to writeback mode, current code does not handle write I/O errors on backing devices properly. In writeback mode, write request is written to cache device, and latter being flushed to backing device. If I/O failed when writing from cache device to the backing device, bcache code just ignores the error and upper layer code is NOT noticed that the backing device is broken. This patch tries to handle backing device failure like how the cache device failure is handled, - Add a error counter 'io_errors' and error limit 'error_limit' in struct cached_dev. Add another io_disable to struct cached_dev to disable I/Os on the problematic backing device. - When I/O error happens on backing device, increase io_errors counter. And if io_errors reaches error_limit, set cache_dev->io_disable to true, and stop the bcache device. The result is, if backing device is broken of disconnected, and I/O errors reach its error limit, backing device will be disabled and the associated bcache device will be removed from system. Changelog: v2: remove "bcache: " prefix in pr_error(), and use correct name string to print out bcache device gendisk name. v1: indeed this is new added in v2 patch set. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Reviewed-by: Michael Lyle Cc: Michael Lyle Cc: Junhui Tang Signed-off-by: Jens Axboe drivers/md/bcache/bcache.h | 6 ++++++ drivers/md/bcache/io.c | 14 ++++++++++++++ drivers/md/bcache/request.c | 14 ++++++++++++-- drivers/md/bcache/super.c | 21 +++++++++++++++++++++ drivers/md/bcache/sysfs.c | 15 ++++++++++++++- 5 files changed, 67 insertions(+), 3 deletions(-) commit 27a40ab9269e79b55672312b324f8f29d94463d4 Author: Coly Li Date: Sun Mar 18 17:36:24 2018 -0700 bcache: add backing_request_endio() for bi_end_io In order to catch I/O error of backing device, a separate bi_end_io call back is required. Then a per backing device counter can record I/O errors number and retire the backing device if the counter reaches a per backing device I/O error limit. This patch adds backing_request_endio() to bcache backing device I/O code path, this is a preparation for further complicated backing device failure handling. So far there is no real code logic change, I make this change a separate patch to make sure it is stable and reliable for further work. Changelog: v2: Fix code comments typo, remove a redundant bch_writeback_add() line added in v4 patch set. v1: indeed this is new added in this patch set. [mlyle: truncated commit subject] Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Reviewed-by: Michael Lyle Cc: Junhui Tang Cc: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/request.c | 93 +++++++++++++++++++++++++++++++++++-------- drivers/md/bcache/super.c | 1 + drivers/md/bcache/writeback.c | 1 + 3 files changed, 79 insertions(+), 16 deletions(-) commit df2b94313ae5b4f60d49e01d4dff5acb4c2757cf Author: Chengguang Xu Date: Sun Mar 18 17:36:23 2018 -0700 bcache: move closure debug file into debug directory In current code closure debug file is outside of debug directory and when unloading module there is lack of removing operation for closure debug file, so it will cause creating error when trying to reload module. This patch move closure debug file into "bcache" debug direcory so that the file can get deleted properly. Signed-off-by: Chengguang Xu Reviewed-by: Michael Lyle Reviewed-by: Tang Junhui Signed-off-by: Jens Axboe drivers/md/bcache/closure.c | 9 +++++---- drivers/md/bcache/closure.h | 5 +++-- drivers/md/bcache/debug.c | 14 +++++++------- drivers/md/bcache/super.c | 3 +-- 4 files changed, 16 insertions(+), 15 deletions(-) commit ca71df31661a0518ed58a1a59cf1993962153ebb Author: Tang Junhui Date: Sun Mar 18 17:36:22 2018 -0700 bcache: fix using of loop variable in memory shrink In bch_mca_scan(), There are some confusion and logical error in the use of loop variables. In this patch, we clarify them as: 1) nr: the number of btree nodes needs to scan, which will decrease after we scan a btree node, and should not be less than 0; 2) i: the number of btree nodes have scanned, includes both btree_cache_freeable and btree_cache, which should not be bigger than btree_cache_used; 3) freed: the number of btree nodes have freed. Signed-off-by: Tang Junhui Reviewed-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/btree.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit f3641c3abd1da978ee969b0203b71b86ec1bfa93 Author: Tang Junhui Date: Sun Mar 18 17:36:21 2018 -0700 bcache: fix error return value in memory shrink In bch_mca_scan(), the return value should not be the number of freed btree nodes, but the number of pages of freed btree nodes. Signed-off-by: Tang Junhui Reviewed-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 688892b3bc05e25da94866e32210e5f503f16f69 Author: Tang Junhui Date: Sun Mar 18 17:36:20 2018 -0700 bcache: fix incorrect sysfs output value of strip size Stripe size is shown as zero when no strip in back end device: [root@ceph132 ~]# cat /sys/block/sdd/bcache/stripe_size 0.0k Actually it should be 1T Bytes (1 << 31 sectors), but in sysfs interface, stripe_size was changed from sectors to bytes, and move 9 bits left, so the 32 bits variable overflows. This patch change the variable to a 64 bits type before moving bits. Signed-off-by: Tang Junhui Reviewed-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc082a55d25c837341709accaf11311c3a9af727 Author: Tang Junhui Date: Sun Mar 18 17:36:19 2018 -0700 bcache: fix inaccurate io state for detached bcache devices When we run IO in a detached device, and run iostat to shows IO status, normally it will show like bellow (Omitted some fields): Device: ... avgrq-sz avgqu-sz await r_await w_await svctm %util sdd ... 15.89 0.53 1.82 0.20 2.23 1.81 52.30 bcache0 ... 15.89 115.42 0.00 0.00 0.00 2.40 69.60 but after IO stopped, there are still very big avgqu-sz and %util values as bellow: Device: ... avgrq-sz avgqu-sz await r_await w_await svctm %util bcache0 ... 0 5326.32 0.00 0.00 0.00 0.00 100.10 The reason for this issue is that, only generic_start_io_acct() called and no generic_end_io_acct() called for detached device in cached_dev_make_request(). See the code: //start generic_start_io_acct() generic_start_io_acct(q, rw, bio_sectors(bio), &d->disk->part0); if (cached_dev_get(dc)) { //will callback generic_end_io_acct() } else { //will not call generic_end_io_acct() } This patch calls generic_end_io_acct() in the end of IO for detached devices, so we can show IO state correctly. (Modified to use GFP_NOIO in kzalloc() by Coly Li) Changelog: v2: fix typo. v1: the initial version. Signed-off-by: Tang Junhui Reviewed-by: Coly Li Reviewed-by: Hannes Reinecke Reviewed-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/request.c | 58 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 7 deletions(-) commit 7e027ca4b534b6b99a7c0471e13ba075ffa3f482 Author: Coly Li Date: Sun Mar 18 17:36:18 2018 -0700 bcache: add stop_when_cache_set_failed option to backing device When there are too many I/O errors on cache device, current bcache code will retire the whole cache set, and detach all bcache devices. But the detached bcache devices are not stopped, which is problematic when bcache is in writeback mode. If the retired cache set has dirty data of backing devices, continue writing to bcache device will write to backing device directly. If the LBA of write request has a dirty version cached on cache device, next time when the cache device is re-registered and backing device re-attached to it again, the stale dirty data on cache device will be written to backing device, and overwrite latest directly written data. This situation causes a quite data corruption. But we cannot simply stop all attached bcache devices when the cache set is broken or disconnected. For example, use bcache to accelerate performance of an email service. In such workload, if cache device is broken but no dirty data lost, keep the bcache device alive and permit email service continue to access user data might be a better solution for the cache device failure. Nix points out the issue and provides the above example to explain why it might be necessary to not stop bcache device for broken cache device. Pavel Goran provides a brilliant suggestion to provide "always" and "auto" options to per-cached device sysfs file stop_when_cache_set_failed. If cache set is retiring and the backing device has no dirty data on cache, it should be safe to keep the bcache device alive. In this case, if stop_when_cache_set_failed is set to "auto", the device failure handling code will not stop this bcache device and permit application to access the backing device with a unattached bcache device. Changelog: [mlyle: edited to not break string constants across lines] v3: fix typos pointed out by Nix. v2: change option values of stop_when_cache_set_failed from 1/0 to "auto"/"always". v1: initial version, stop_when_cache_set_failed can be 0 (not stop) or 1 (always stop). Signed-off-by: Coly Li Reviewed-by: Michael Lyle Signed-off-by: Michael Lyle Cc: Nix Cc: Pavel Goran Cc: Junhui Tang Cc: Hannes Reinecke Signed-off-by: Jens Axboe drivers/md/bcache/bcache.h | 9 ++++++ drivers/md/bcache/super.c | 78 ++++++++++++++++++++++++++++++++++++++++------ drivers/md/bcache/sysfs.c | 17 ++++++++++ 3 files changed, 94 insertions(+), 10 deletions(-) commit 771f393e8ffc9b3066e4830ee5f7391b8e8874f1 Author: Coly Li Date: Sun Mar 18 17:36:17 2018 -0700 bcache: add CACHE_SET_IO_DISABLE to struct cache_set flags When too many I/Os failed on cache device, bch_cache_set_error() is called in the error handling code path to retire whole problematic cache set. If new I/O requests continue to come and take refcount dc->count, the cache set won't be retired immediately, this is a problem. Further more, there are several kernel thread and self-armed kernel work may still running after bch_cache_set_error() is called. It needs to wait quite a while for them to stop, or they won't stop at all. They also prevent the cache set from being retired. The solution in this patch is, to add per cache set flag to disable I/O request on this cache and all attached backing devices. Then new coming I/O requests can be rejected in *_make_request() before taking refcount, kernel threads and self-armed kernel worker can stop very fast when flags bit CACHE_SET_IO_DISABLE is set. Because bcache also do internal I/Os for writeback, garbage collection, bucket allocation, journaling, this kind of I/O should be disabled after bch_cache_set_error() is called. So closure_bio_submit() is modified to check whether CACHE_SET_IO_DISABLE is set on cache_set->flags. If set, closure_bio_submit() will set bio->bi_status to BLK_STS_IOERR and return, generic_make_request() won't be called. A sysfs interface is also added to set or clear CACHE_SET_IO_DISABLE bit from cache_set->flags, to disable or enable cache set I/O for debugging. It is helpful to trigger more corner case issues for failed cache device. Changelog v4, add wait_for_kthread_stop(), and call it before exits writeback and gc kernel threads. v3, change CACHE_SET_IO_DISABLE from 4 to 3, since it is bit index. remove "bcache: " prefix when printing out kernel message. v2, more changes by previous review, - Use CACHE_SET_IO_DISABLE of cache_set->flags, suggested by Junhui. - Check CACHE_SET_IO_DISABLE in bch_btree_gc() to stop a while-loop, this is reported and inspired from origal patch of Pavel Vazharov. v1, initial version. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Reviewed-by: Michael Lyle Cc: Junhui Tang Cc: Michael Lyle Cc: Pavel Vazharov Signed-off-by: Jens Axboe drivers/md/bcache/alloc.c | 3 ++- drivers/md/bcache/bcache.h | 33 +++++++++++++++++++++++++++++++++ drivers/md/bcache/btree.c | 11 ++++++++--- drivers/md/bcache/io.c | 2 +- drivers/md/bcache/journal.c | 4 ++-- drivers/md/bcache/request.c | 26 +++++++++++++++++++------- drivers/md/bcache/super.c | 6 +++++- drivers/md/bcache/sysfs.c | 18 ++++++++++++++++++ drivers/md/bcache/util.h | 6 ------ drivers/md/bcache/writeback.c | 37 ++++++++++++++++++++++++++++--------- 10 files changed, 116 insertions(+), 30 deletions(-) commit 3fd47bfe55b00d5ac7b0a44c9301c07be39b1082 Author: Coly Li Date: Sun Mar 18 17:36:16 2018 -0700 bcache: stop dc->writeback_rate_update properly struct delayed_work writeback_rate_update in struct cache_dev is a delayed worker to call function update_writeback_rate() in period (the interval is defined by dc->writeback_rate_update_seconds). When a metadate I/O error happens on cache device, bcache error handling routine bch_cache_set_error() will call bch_cache_set_unregister() to retire whole cache set. On the unregister code path, this delayed work is stopped by calling cancel_delayed_work_sync(&dc->writeback_rate_update). dc->writeback_rate_update is a special delayed work from others in bcache. In its routine update_writeback_rate(), this delayed work is re-armed itself. That means when cancel_delayed_work_sync() returns, this delayed work can still be executed after several seconds defined by dc->writeback_rate_update_seconds. The problem is, after cancel_delayed_work_sync() returns, the cache set unregister code path will continue and release memory of struct cache set. Then the delayed work is scheduled to run, __update_writeback_rate() will reference the already released cache_set memory, and trigger a NULL pointer deference fault. This patch introduces two more bcache device flags, - BCACHE_DEV_WB_RUNNING bit set: bcache device is in writeback mode and running, it is OK for dc->writeback_rate_update to re-arm itself. bit clear:bcache device is trying to stop dc->writeback_rate_update, this delayed work should not re-arm itself and quit. - BCACHE_DEV_RATE_DW_RUNNING bit set: routine update_writeback_rate() is executing. bit clear: routine update_writeback_rate() quits. This patch also adds a function cancel_writeback_rate_update_dwork() to wait for dc->writeback_rate_update quits before cancel it by calling cancel_delayed_work_sync(). In order to avoid a deadlock by unexpected quit dc->writeback_rate_update, after time_out seconds this function will give up and continue to call cancel_delayed_work_sync(). And here I explain how this patch stops self re-armed delayed work properly with the above stuffs. update_writeback_rate() sets BCACHE_DEV_RATE_DW_RUNNING at its beginning and clears BCACHE_DEV_RATE_DW_RUNNING at its end. Before calling cancel_writeback_rate_update_dwork() clear flag BCACHE_DEV_WB_RUNNING. Before calling cancel_delayed_work_sync() wait utill flag BCACHE_DEV_RATE_DW_RUNNING is clear. So when calling cancel_delayed_work_sync(), dc->writeback_rate_update must be already re- armed, or quite by seeing BCACHE_DEV_WB_RUNNING cleared. In both cases delayed work routine update_writeback_rate() won't be executed after cancel_delayed_work_sync() returns. Inside update_writeback_rate() before calling schedule_delayed_work(), flag BCACHE_DEV_WB_RUNNING is checked before. If this flag is cleared, it means someone is about to stop the delayed work. Because flag BCACHE_DEV_RATE_DW_RUNNING is set already and cancel_delayed_work_sync() has to wait for this flag to be cleared, we don't need to worry about race condition here. If update_writeback_rate() is scheduled to run after checking BCACHE_DEV_RATE_DW_RUNNING and before calling cancel_delayed_work_sync() in cancel_writeback_rate_update_dwork(), it is also safe. Because at this moment BCACHE_DEV_WB_RUNNING is cleared with memory barrier. As I mentioned previously, update_writeback_rate() will see BCACHE_DEV_WB_RUNNING is clear and quit immediately. Because there are more dependences inside update_writeback_rate() to struct cache_set memory, dc->writeback_rate_update is not a simple self re-arm delayed work. After trying many different methods (e.g. hold dc->count, or use locks), this is the only way I can find which works to properly stop dc->writeback_rate_update delayed work. Changelog: v3: change values of BCACHE_DEV_WB_RUNNING and BCACHE_DEV_RATE_DW_RUNNING to bit index, for test_bit(). v2: Try to fix the race issue which is pointed out by Junhui. v1: The initial version for review Signed-off-by: Coly Li Reviewed-by: Junhui Tang Reviewed-by: Michael Lyle Cc: Michael Lyle Cc: Hannes Reinecke Signed-off-by: Jens Axboe drivers/md/bcache/bcache.h | 9 +++++---- drivers/md/bcache/super.c | 38 ++++++++++++++++++++++++++++++++++---- drivers/md/bcache/sysfs.c | 3 ++- drivers/md/bcache/writeback.c | 29 ++++++++++++++++++++++++++++- 4 files changed, 69 insertions(+), 10 deletions(-) commit fadd94e05c02afec7b70b0b14915624f1782f578 Author: Coly Li Date: Sun Mar 18 17:36:15 2018 -0700 bcache: quit dc->writeback_thread when BCACHE_DEV_DETACHING is set In patch "bcache: fix cached_dev->count usage for bch_cache_set_error()", cached_dev_get() is called when creating dc->writeback_thread, and cached_dev_put() is called when exiting dc->writeback_thread. This modification works well unless people detach the bcache device manually by 'echo 1 > /sys/block/bcache/bcache/detach' Because this sysfs interface only calls bch_cached_dev_detach() which wakes up dc->writeback_thread but does not stop it. The reason is, before patch "bcache: fix cached_dev->count usage for bch_cache_set_error()", inside bch_writeback_thread(), if cache is not dirty after writeback, cached_dev_put() will be called here. And in cached_dev_make_request() when a new write request makes cache from clean to dirty, cached_dev_get() will be called there. Since we don't operate dc->count in these locations, refcount d->count cannot be dropped after cache becomes clean, and cached_dev_detach_finish() won't be called to detach bcache device. This patch fixes the issue by checking whether BCACHE_DEV_DETACHING is set inside bch_writeback_thread(). If this bit is set and cache is clean (no existing writeback_keys), break the while-loop, call cached_dev_put() and quit the writeback thread. Please note if cache is still dirty, even BCACHE_DEV_DETACHING is set the writeback thread should continue to perform writeback, this is the original design of manually detach. It is safe to do the following check without locking, let me explain why, + if (!test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) && + (!atomic_read(&dc->has_dirty) || !dc->writeback_running)) { If the kenrel thread does not sleep and continue to run due to conditions are not updated in time on the running CPU core, it just consumes more CPU cycles and has no hurt. This should-sleep-but-run is safe here. We just focus on the should-run-but-sleep condition, which means the writeback thread goes to sleep in mistake while it should continue to run. 1, First of all, no matter the writeback thread is hung or not, kthread_stop() from cached_dev_detach_finish() will wake up it and terminate by making kthread_should_stop() return true. And in normal run time, bit on index BCACHE_DEV_DETACHING is always cleared, the condition !test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) is always true and can be ignored as constant value. 2, If one of the following conditions is true, the writeback thread should go to sleep, "!atomic_read(&dc->has_dirty)" or "!dc->writeback_running)" each of them independently controls the writeback thread should sleep or not, let's analyse them one by one. 2.1 condition "!atomic_read(&dc->has_dirty)" If dc->has_dirty is set from 0 to 1 on another CPU core, bcache will call bch_writeback_queue() immediately or call bch_writeback_add() which indirectly calls bch_writeback_queue() too. In bch_writeback_queue(), wake_up_process(dc->writeback_thread) is called. It sets writeback thread's task state to TASK_RUNNING and following an implicit memory barrier, then tries to wake up the writeback thread. In writeback thread, its task state is set to TASK_INTERRUPTIBLE before doing the condition check. If other CPU core sets the TASK_RUNNING state after writeback thread setting TASK_INTERRUPTIBLE, the writeback thread will be scheduled to run very soon because its state is not TASK_INTERRUPTIBLE. If other CPU core sets the TASK_RUNNING state before writeback thread setting TASK_INTERRUPTIBLE, the implict memory barrier of wake_up_process() will make sure modification of dc->has_dirty on other CPU core is updated and observed on the CPU core of writeback thread. Therefore the condition check will correctly be false, and continue writeback code without sleeping. 2.2 condition "!dc->writeback_running)" dc->writeback_running can be changed via sysfs file, every time it is modified, a following bch_writeback_queue() is alwasy called. So the change is always observed on the CPU core of writeback thread. If dc->writeback_running is changed from 0 to 1 on other CPU core, this condition check will observe the modification and allow writeback thread to continue to run without sleeping. Now we can see, even without a locking protection, multiple conditions check is safe here, no deadlock or process hang up will happen. I compose a separte patch because that patch "bcache: fix cached_dev->count usage for bch_cache_set_error()" already gets a "Reviewed-by:" from Hannes Reinecke. Also this fix is not trivial and good for a separate patch. Signed-off-by: Coly Li Reviewed-by: Michael Lyle Cc: Hannes Reinecke Cc: Huijun Tang Signed-off-by: Jens Axboe drivers/md/bcache/writeback.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 804f3c6981f5e4a506a8f14dc284cb218d0659ae Author: Coly Li Date: Sun Mar 18 17:36:14 2018 -0700 bcache: fix cached_dev->count usage for bch_cache_set_error() When bcache metadata I/O fails, bcache will call bch_cache_set_error() to retire the whole cache set. The expected behavior to retire a cache set is to unregister the cache set, and unregister all backing device attached to this cache set, then remove sysfs entries of the cache set and all attached backing devices, finally release memory of structs cache_set, cache, cached_dev and bcache_device. In my testing when journal I/O failure triggered by disconnected cache device, sometimes the cache set cannot be retired, and its sysfs entry /sys/fs/bcache/ still exits and the backing device also references it. This is not expected behavior. When metadata I/O failes, the call senquence to retire whole cache set is, bch_cache_set_error() bch_cache_set_unregister() bch_cache_set_stop() __cache_set_unregister() <- called as callback by calling clousre_queue(&c->caching) cache_set_flush() <- called as a callback when refcount of cache_set->caching is 0 cache_set_free() <- called as a callback when refcount of catch_set->cl is 0 bch_cache_set_release() <- called as a callback when refcount of catch_set->kobj is 0 I find if kernel thread bch_writeback_thread() quits while-loop when kthread_should_stop() is true and searched_full_index is false, clousre callback cache_set_flush() set by continue_at() will never be called. The result is, bcache fails to retire whole cache set. cache_set_flush() will be called when refcount of closure c->caching is 0, and in function bcache_device_detach() refcount of closure c->caching is released to 0 by clousre_put(). In metadata error code path, function bcache_device_detach() is called by cached_dev_detach_finish(). This is a callback routine being called when cached_dev->count is 0. This refcount is decreased by cached_dev_put(). The above dependence indicates, cache_set_flush() will be called when refcount of cache_set->cl is 0, and refcount of cache_set->cl to be 0 when refcount of cache_dev->count is 0. The reason why sometimes cache_dev->count is not 0 (when metadata I/O fails and bch_cache_set_error() called) is, in bch_writeback_thread(), refcount of cache_dev is not decreased properly. In bch_writeback_thread(), cached_dev_put() is called only when searched_full_index is true and cached_dev->writeback_keys is empty, a.k.a there is no dirty data on cache. In most of run time it is correct, but when bch_writeback_thread() quits the while-loop while cache is still dirty, current code forget to call cached_dev_put() before this kernel thread exits. This is why sometimes cache_set_flush() is not executed and cache set fails to be retired. The reason to call cached_dev_put() in bch_writeback_rate() is, when the cache device changes from clean to dirty, cached_dev_get() is called, to make sure during writeback operatiions both backing and cache devices won't be released. Adding following code in bch_writeback_thread() does not work, static int bch_writeback_thread(void *arg) } + if (atomic_read(&dc->has_dirty)) + cached_dev_put() + return 0; } because writeback kernel thread can be waken up and start via sysfs entry: echo 1 > /sys/block/bcache/bcache/writeback_running It is difficult to check whether backing device is dirty without race and extra lock. So the above modification will introduce potential refcount underflow in some conditions. The correct fix is, to take cached dev refcount when creating the kernel thread, and put it before the kernel thread exits. Then bcache does not need to take a cached dev refcount when cache turns from clean to dirty, or to put a cached dev refcount when cache turns from ditry to clean. The writeback kernel thread is alwasy safe to reference data structure from cache set, cache and cached device (because a refcount of cache device is taken for it already), and no matter the kernel thread is stopped by I/O errors or system reboot, cached_dev->count can always be used correctly. The patch is simple, but understanding how it works is quite complicated. Changelog: v2: set dc->writeback_thread to NULL in this patch, as suggested by Hannes. v1: initial version for review. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Reviewed-by: Michael Lyle Cc: Michael Lyle Cc: Junhui Tang Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 1 - drivers/md/bcache/writeback.c | 11 ++++++++--- drivers/md/bcache/writeback.h | 2 -- 3 files changed, 8 insertions(+), 6 deletions(-) commit 5f59955299a13196233bbc0fb72f8dd5b5ba22a1 Author: Zhiyong Tao Date: Thu Sep 21 09:26:52 2017 +0800 arm64: dts: mt2712: Add auxadc device node. Add auxadc device node for MT2712. Signed-off-by: Zhiyong Tao Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt2712-evb.dts | 4 ++++ arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 9 +++++++++ 2 files changed, 13 insertions(+) commit 4718840e76f74e5868d2001f0ca3a0e5c4292ea0 Author: Sylwester Nawrocki Date: Wed Mar 14 17:41:15 2018 +0100 ASoC: samsung: Use snd_soc_of_put_dai_link_codecs() in odroid.c Now when a helper for unreferencing device nodes is available we can get rid of the local implementation. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Signed-off-by: Mark Brown sound/soc/samsung/odroid.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 23952006ace5a54caddcda3de6f7676dfe520e86 Author: Sylwester Nawrocki Date: Wed Mar 14 17:41:14 2018 +0100 ASoC: samsung: odroid: Drop sample rates that cannot be supported from hw_params() The I2S controller can handle sample rates only up to 96000 and the CPU DAI has already related constraint set so drop the impossible 176400, 192000 switch cases. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Signed-off-by: Mark Brown sound/soc/samsung/odroid.c | 2 -- 1 file changed, 2 deletions(-) commit 1d22c337dc8f3a25638f7262e7bcb5729a34d140 Author: Sylwester Nawrocki Date: Wed Mar 14 17:41:13 2018 +0100 ASoC: samsung: odroid: Fix 32000 sample rate handling In case of sample rates lower than 44100 currently there is too low MCLK frequency set for the CODEC. Playback fails with following errors: $ speaker-test -c2 -t sine -f 1500 -l2 -r 32000 Sine wave rate is 1500.0000Hz Rate set to 32000Hz (requested 32000Hz) Buffer size range from 128 to 131072 Period size range from 64 to 65536 Using max buffer size 131072 Periods = 4 Unable to set hw params for playback: Invalid argument Setting of hwparams failed: Invalid argument [ 497.883700] max98090 1-0010: Invalid master clock frequency To fix this the I2S root clock's frequency is increased, depending on sampling rate. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Signed-off-by: Mark Brown sound/soc/samsung/odroid.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit c10a98c4f66bb5d727a6525fd3bb80b4005df123 Author: Ryder Lee Date: Wed Feb 14 11:27:34 2018 +0800 arm: dts: mt7623: add PCIe related nodes This patch adds some device nodes for the PCIe function block and updates related pinmux. Moreover, we add interrupt-map properties in both parent and children as the chip only has one IRQ per slot that is connected to all INTx and get propagated through the bridges and it also represents the root ports own interrupts. Signed-off-by: Ryder Lee Cc: Benjamin Herrenschmidt Cc: Arnd Bergmann Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt7623.dtsi | 105 ++++++++++++++++++++++++++ arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 30 ++++++++ 2 files changed, 135 insertions(+) commit 3d3db9432853b8b198722768ba0788b1bc586049 Author: Matt Porter Date: Sun Mar 18 13:22:38 2018 -0400 ASoC: add tda7419 audio processor driver Component driver for the tda7419 audio processor. Signed-off-by: Matt Porter Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/tda7419.c | 654 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 662 insertions(+) commit 050a0e1f539448474250f441332c0a7d9714d3b5 Author: Matt Porter Date: Sun Mar 18 13:22:37 2018 -0400 ASoC: add tda7419 audio processor binding DeviceTree binding for the tda7419 audio processor. Signed-off-by: Matt Porter Signed-off-by: Mark Brown .../devicetree/bindings/sound/tda7419.txt | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 9f9971266110add19b512f7b10a6d922e741368e Author: weiyi.lu@mediatek.com Date: Mon Mar 12 15:03:39 2018 +0800 soc: mediatek: update power domain data of MT2712 1. split MFG power domain into MFG/MFG_SC1/MFG_SC2/MFG_SC3 according to MT2712 ECO design change 2. add subdomain support for MT2712 Signed-off-by: Weiyi Lu Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-scpsys.c | 42 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) commit 1390515aed5e5eea8d6c2c5c08ef6d04ba4a4a50 Author: weiyi.lu@mediatek.com Date: Mon Mar 12 15:03:38 2018 +0800 dt-bindings: soc: update MT2712 power dt-bindings Add new power domains(MFG_SC1/MFG_SC2/MFG_SC3) for MT2712 according to ECO design change. Signed-off-by: Weiyi Lu Reviewed-by: Rob Herring Signed-off-by: Matthias Brugger include/dt-bindings/power/mt2712-power.h | 3 +++ 1 file changed, 3 insertions(+) commit e4fe156ae8ec5227e6cbdbca61a0f72e77a67c8b Author: Mylène Josserand Date: Thu Mar 15 17:18:25 2018 +0100 ASoC: Add bindings for PCM1789 Add a device-tree binding for Texas Instrument's PCM1789 codec. For the moment, only I2C bus is supported but SPI could be added in future. Signed-off-by: Mylène Josserand Reviewed-by: Rob Herring Signed-off-by: Mark Brown .../devicetree/bindings/sound/pcm1789.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 4ae340d1be36378505498606e6c640dd0507ad61 Author: Mylène Josserand Date: Thu Mar 15 17:18:24 2018 +0100 ASoC: codecs: Add support for PCM1789 Add Texas Instruments's PCM1789 DAC support. It is a simple DAC and does not have many registers. One particularity about this DAC is that the clocks must be always enabled. Also, an entire software reset is necessary while starting to play a sound otherwise, the clocks are not synchronized (so the DAC is not able to send data). Signed-off-by: Mylène Josserand Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 12 ++ sound/soc/codecs/Makefile | 4 + sound/soc/codecs/pcm1789-i2c.c | 62 ++++++++++ sound/soc/codecs/pcm1789.c | 274 +++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/pcm1789.h | 17 +++ 5 files changed, 369 insertions(+) commit da263026c013412110da464537e1c5532f0714ee Author: Geert Uytterhoeven Date: Fri Mar 16 14:59:45 2018 +0100 ASoC: rsnd: Document R-Car M3-W support Document support for the sound modules in the Renesas M3-W (r8a7796) SoC. No driver update is needed. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/renesas,rsnd.txt | 1 + 1 file changed, 1 insertion(+) commit c0153b126cc6e14335b142a799c9aa8990e28669 Author: weiyongjun (A) Date: Fri Mar 16 07:32:14 2018 +0000 ASoC: da7210: Use devm_snd_soc_register_component() Since the remove callback is removed, the snd_soc_unregister_component() is missing when remove device. Using devm_snd_soc_register_component() instead of snd_soc_register_component(). Fixes: d06f33aed85c ("ASoC: da7210: replace codec to component") Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown sound/soc/codecs/da7210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b84574d95c020f01410ff2ca0a38dd8fd7b644b Author: Krzysztof Kozlowski Date: Sun Mar 18 16:35:12 2018 +0100 ASoC: samsung: Mark unused Odroid compatibles as deprecated Compatible for XU4 audio is not being used. Instead the board uses the same compatible as XU3. The devices are now just compatible so they should use the same value. Mark "hardkernel,odroid-xu4-audio" as being deprecated so in this future could be removed to limit useless properties. Additionally add older compatibles appearing in the bindings. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/samsung,odroid.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 822e70a8210b7038e1f54c43ca6c76c3b9f89803 Author: weiyongjun (A) Date: Fri Mar 16 07:32:07 2018 +0000 ASoC: wm8400: Use devm_snd_soc_register_component() Since the remove callback is removed, the snd_soc_unregister_component() is missing when remove device. Using devm_snd_soc_register_component() instead of snd_soc_register_component(). Fixes: 10dc44c6462d ("ASoC: wm8400: replace codec to component") Signed-off-by: Wei Yongjun Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8400.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66717d787a092c1438d2ce7b31d47fe88b6b93ea Author: Wei Yongjun Date: Fri Mar 16 07:31:56 2018 +0000 ASoC: mediatek: mt2701: drop unnessary snd_soc_unregister_component() It's not necessary to unregister a component registered with devm_snd_soc_register_component(). Fixes: f1b5bf07365d ("ASoC: mt2701/mt8173: replace platform to componen") Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 2 -- 1 file changed, 2 deletions(-) commit 7c3c20f2bec1e8bdaadd551a4b75f1834a7cb974 Author: Katsuhiro Suzuki Date: Fri Mar 16 16:08:13 2018 +0900 ASoC: uniphier: add syscon property for UniPhier sound system This patch adds syscon property for specifying soc-glue core. Currently, soc-glue core is used for changing the state of S/PDIF signal output pin to signal output state or Hi-Z state. After resetting of SoC Hi-Z state is selected. This driver set to signal output state when syscon property is available. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown sound/soc/uniphier/aio-core.c | 21 +++++++++++++++++++++ sound/soc/uniphier/aio-cpu.c | 11 +++++++++++ sound/soc/uniphier/aio-reg.h | 3 +++ sound/soc/uniphier/aio.h | 2 ++ 4 files changed, 37 insertions(+) commit 8bde8fd64d1b8f8bc1577e28ff412553597b6adb Author: Katsuhiro Suzuki Date: Fri Mar 16 16:08:12 2018 +0900 ASoC: uniphier: add syscon property to binding document This patch adds syscon property for specifying soc-glue core into DT binding documentation. Currently, soc-glue core is used for changing the state of S/PDIF signal output pin to signal output state or Hi-Z state. If you don't need to use features on soc-glue described above you can ommit this property. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/uniphier,aio.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7c2861a6fb2c502d7b7aa85415e178f3c527a468 Author: Alexey Khoroshilov Date: Sat Mar 17 13:05:44 2018 +0300 spi: jcore: disable ref_clk after getting its rate The driver does not disable ref_clk on remove. According to the comment, the only reason to enable the clock is to get its rate. So, it should be safe to disable clk just after that. By the way, clk_prepare_enable() looks to be more appropriate than clk_enable() here. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Mark Brown drivers/spi/spi-jcore.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 6e9554a48bd1840dded782af1484ae911c14ebfd Author: Linus Walleij Date: Mon Mar 12 12:20:23 2018 +0100 gpio: ks8695: Include the right header This driver is a pure GPIO driver and should only include . Signed-off-by: Linus Walleij drivers/gpio/gpio-ks8695.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 430f64998789e80e5ed22de85c18b62d6a835dcd Author: Linus Walleij Date: Mon Mar 12 12:16:34 2018 +0100 gpio: kempld: Include the right header This driver is a pure GPIO driver and should only include . Signed-off-by: Linus Walleij drivers/gpio/gpio-kempld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96d0d03dc447993d0eaca5c4294b7560860a378b Author: Linus Walleij Date: Mon Mar 12 12:11:45 2018 +0100 gpio: janz-ttl: Use BIT() macro This makes the code more readable by using the BIT() macro. Signed-off-by: Linus Walleij drivers/gpio/gpio-janz-ttl.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 1c947b7f48783a3470611fc3eba61daac2629148 Author: Linus Walleij Date: Mon Mar 12 12:08:02 2018 +0100 gpio: janz-ttl: Include the right header This driver is a pure GPIO driver and should only include . Signed-off-by: Linus Walleij drivers/gpio/gpio-janz-ttl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3a174036f648f0a28e047bb90784051b42c3021 Author: Linus Walleij Date: Tue Mar 6 09:00:37 2018 +0100 gpio: it87: Include the right header This driver is a pure GPIO driver and should only include . Signed-off-by: Linus Walleij drivers/gpio/gpio-it87.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a8fd1f5cc3fd0a8fd06634b9dc6750f8c5b2354 Author: Linus Walleij Date: Tue Mar 6 08:56:06 2018 +0100 gpio: ich: Use BIT() macro Using BIT() makes (1 << foo) constructions easier to read, and also account for common mistakes where bit 31 is not working because of numbers being interpreted as negative unless specified as unsigned. Signed-off-by: Linus Walleij drivers/gpio/gpio-ich.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 3f4290d4dcf1cfdc242fc4d0874995c3aead72e9 Author: Linus Walleij Date: Sun Mar 4 23:44:49 2018 +0100 gpio: ich: Include the right header This driver is a pure GPIO driver and should only include . Refrain from using GPIOF_* flags in the driver, just use 1/0 to return direction. Signed-off-by: Linus Walleij drivers/gpio/gpio-ich.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f63109f0cb40bca848eef9bf096dfdb7def5e20d Author: Linus Walleij Date: Sun Mar 4 23:37:22 2018 +0100 gpio: htc-gpio: Include the right header This driver is a pure GPIO driver and should only include . Drop the include of from the platform data header as well, it serves no purpose. Signed-off-by: Linus Walleij drivers/gpio/gpio-htc-egpio.c | 1 + include/linux/platform_data/gpio-htc-egpio.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) commit 00d712a93037c7569d72cf59dc8fb930250264e8 Author: Linus Walleij Date: Sun Mar 4 23:17:31 2018 +0100 gpio: grgpio: Include the right header This driver is a pure GPIO driver and should only include . Signed-off-by: Linus Walleij drivers/gpio/gpio-grgpio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7113ea8a8f56e8d33824e215757fae9e38f3b1fb Author: Linus Walleij Date: Sun Mar 4 22:59:49 2018 +0100 gpio: ftgpio010: Drop of_gpio.h include This driver does not make use of the functions in so drop this include. Signed-off-by: Linus Walleij drivers/gpio/gpio-ftgpio010.c | 1 - 1 file changed, 1 deletion(-) commit 7275cb75b96f5cec924ea95685d906d09b6a82f4 Author: Linus Walleij Date: Fri Feb 9 00:45:50 2018 +0100 gpio: em: Use the right include The Emma Mobile (EM) GPIO driver uses the too generic include . It is a driver so it should just use . Signed-off-by: Linus Walleij drivers/gpio/gpio-em.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d90f2adee479ac885401ce77ad8493ec7d70fe97 Author: Linus Walleij Date: Fri Feb 9 00:42:39 2018 +0100 gpio: ge: Drop of_gpio.h include This driver does not make use of the functions in so drop this include. Signed-off-by: Linus Walleij drivers/gpio/gpio-ge.c | 1 - 1 file changed, 1 deletion(-) commit 1cb6610aec83a592ca04d92d6a4fadaee5611e44 Author: Linus Walleij Date: Wed Jan 24 13:55:22 2018 +0100 gpio: dln2: Include proper header This driver has no business including , it is a driver so include . GPIOF_DIR_IN/GPIOF_DIR_OUT are for consumers and should not be used in drivers to use just 1/0 instead. Signed-off-by: Linus Walleij drivers/gpio/gpio-dln2.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 58c5c276b4c2ceb2b02ecd959ad9784b997d4332 Author: Paul Mackerras Date: Sat Feb 24 20:14:37 2018 +1100 KVM: PPC: Book3S HV: Handle 1GB pages in radix page fault handler This adds code to the radix hypervisor page fault handler to handle the case where the guest memory is backed by 1GB hugepages, and put them into the partition-scoped radix tree at the PUD level. The code is essentially analogous to the code for 2MB pages. This also rearranges kvmppc_create_pte() to make it easier to follow. Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_radix.c | 129 ++++++++++++++++++++++++--------- 1 file changed, 93 insertions(+), 36 deletions(-) commit f7caf712d885713986baeac86b1b64bcbd9dcd91 Author: Paul Mackerras Date: Sat Feb 24 20:08:51 2018 +1100 KVM: PPC: Book3S HV: Streamline setting of reference and change bits When using the radix MMU, we can get hypervisor page fault interrupts with the DSISR_SET_RC bit set in DSISR/HSRR1, indicating that an attempt to set the R (reference) or C (change) bit in a PTE atomically failed. Previously we would find the corresponding Linux PTE and check the permission and dirty bits there, but this is not really necessary since we only need to do what the hardware was trying to do, namely set R or C atomically. This removes the code that reads the Linux PTE and just update the partition-scoped PTE, having first checked that it is still present, and if the access is a write, that the PTE still has write permission. Furthermore, we now check whether any other relevant bits are set in DSISR, and if there are, then we proceed with the rest of the function in order to handle whatever condition they represent, instead of returning to the guest as we did previously. Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_radix.c | 52 +++++++++++++--------------------- 1 file changed, 19 insertions(+), 33 deletions(-) commit c4c8a7643e74ebd7f2cfa80807562f16bb58c1d9 Author: Paul Mackerras Date: Fri Feb 23 21:40:49 2018 +1100 KVM: PPC: Book3S HV: Radix page fault handler optimizations This improves the handling of transparent huge pages in the radix hypervisor page fault handler. Previously, if a small page is faulted in to a 2MB region of guest physical space, that means that there is a page table pointer at the PMD level, which could never be replaced by a leaf (2MB) PMD entry. This adds the code to clear the PMD, invlidate the page walk cache and free the page table page in this situation, so that the leaf PMD entry can be created. This also adds code to check whether a PMD or PTE being inserted is the same as is already there (because of a race with another CPU that faulted on the same page) and if so, we don't replace the existing entry, meaning that we don't invalidate the PTE or PMD and do a TLB invalidation. Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_radix.c | 42 ++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 15 deletions(-) commit 39c983ea0f96a270d4876c4148e3bb2d9cd3294f Author: Paul Mackerras Date: Thu Feb 22 15:16:54 2018 +1100 KVM: PPC: Remove unused kvm_unmap_hva callback Since commit fb1522e099f0 ("KVM: update to new mmu_notifier semantic v2", 2017-08-31), the MMU notifier code in KVM no longer calls the kvm_unmap_hva callback. This removes the PPC implementations of kvm_unmap_hva(). Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_host.h | 1 - arch/powerpc/include/asm/kvm_ppc.h | 1 - arch/powerpc/kvm/book3s.c | 6 ------ arch/powerpc/kvm/book3s.h | 1 - arch/powerpc/kvm/book3s_64_mmu_hv.c | 9 --------- arch/powerpc/kvm/book3s_64_vio_hv.c | 2 +- arch/powerpc/kvm/book3s_hv.c | 1 - arch/powerpc/kvm/book3s_pr.c | 10 ---------- arch/powerpc/kvm/e500_mmu_host.c | 2 +- arch/powerpc/kvm/trace_pr.h | 15 --------------- 10 files changed, 2 insertions(+), 46 deletions(-) commit bf14721c97f39514267ed844b6d62036f76c3e51 Author: Viresh Kumar Date: Mon Mar 5 09:49:32 2018 +0530 cpufreq: powernv: Don't validate the frequency table twice The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from powernv driver. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/powernv-cpufreq.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit ef74b5bf22704bb1e7b67396704bbb41e1df0e39 Author: Joe Konno Date: Fri Mar 2 10:32:51 2018 -0800 powercap: RAPL: Add support for Cannon Lake RAPL MSRs and handling for Cannon Lake are similar to Sky Lake and Kaby Lake. Signed-off-by: Joe Konno Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl.c | 1 + 1 file changed, 1 insertion(+) commit fa54150aad84dbbd92b26ce47e6b2cf7c686dca0 Author: Rafael J. Wysocki Date: Tue Mar 13 10:47:36 2018 +0100 ACPI / PM: Reduce LPI constraints logging noise If a device referred to by ACPI LPI constrains (coming from function 1 of the Low Power S0 Idle _DSM interface) is not power-manageable via ACPI (no _PS0 method and no power resources), the code generating diagnostic information for the LPI constraints will print a message about that to the kernel log on every system suspend-resume cycle (possibly for multiple times). That is not very useful and noisy, so modify that code to disregard the LPI list entries corresponding to the devices that are not power- manageable after printing that information for them once. Signed-off-by: Rafael J. Wysocki Reviewed-by: Srinivas Pandruvada drivers/acpi/sleep.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 7e46b32bd58768b4823e767dc14d88ab59c6902e Author: Randy Dunlap Date: Fri Mar 2 16:55:54 2018 -0800 ACPI / Kconfig: Update ACPI_PROCFS_POWER help text Fix grammar and punctuation (end sentences with a period) in the Kconfig help text for ACPI_PROCFS_POWER. I was looking at this since it appears to be going away (again, some day) and I have a working script that uses this info to tell me battery usage. I can update the script to use /sys/class/power_supply (in theory) but the contents (with units) should be documented in Documentation/ABI/ before /proc/acpi/battery/ is removed (IMO). Signed-off-by: Randy Dunlap Signed-off-by: Rafael J. Wysocki drivers/acpi/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 99a31adfb2ffbdc6a5cdcec4e119830cf4c19352 Author: Christophe JAILLET Date: Wed Mar 14 20:56:39 2018 +0100 remoteproc: imx_rproc: Slightly simplify code in 'imx_rproc_probe()' We can return directly at the beginning of the function and save the 'err' label. We can also explicitly return 0 when the probe succeed. Signed-off-by: Christophe JAILLET Signed-off-by: Bjorn Andersson drivers/remoteproc/imx_rproc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 96a30d7f919f6786d8592599836d94018f9004c4 Author: Christophe JAILLET Date: Wed Mar 14 20:56:38 2018 +0100 remoteproc: imx_rproc: Re-use existing error handling path in 'imx_rproc_probe()' Avoid some code ducplication and be more future-proof. Signed-off-by: Christophe JAILLET Signed-off-by: Bjorn Andersson drivers/remoteproc/imx_rproc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit de6f83f85be94e0b7d0d324c29ccc9d78a6bb4e7 Author: Christophe JAILLET Date: Wed Mar 14 20:56:37 2018 +0100 remoteproc: imx_rproc: Fix an error handling path in 'imx_rproc_probe()' If 'of_device_get_match_data()' fails, we must undo the previous 'rproc_alloc()' call. Fixes: a0ff4aa6f010 ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver") Signed-off-by: Christophe JAILLET Signed-off-by: Bjorn Andersson drivers/remoteproc/imx_rproc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9251a71db62ca9cc7e7cf364218610b0f018c291 Author: Alex Hung Date: Wed Feb 28 19:27:55 2018 -0800 ACPI / OSI: Add OEM _OSI strings to disable NVidia RTD3 A number of Dell systems require an OEM _OSI string "Linux-Dell-Video" as a BIOS workaround to disable RTD3 which causes systems hangs when NVidia graphics cards are installed. The affected Dell systems are with system IDs: 0818, 0819, 0820, 0850, 0851, 086F, 0870, 0885 and 0886. The form of the OEM _OSI strings is defined by each OEMs and is discussed in Documentation/acpi/osi.txt. Signed-off-by: Alex Hung Signed-off-by: Rafael J. Wysocki drivers/acpi/osi.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c235edcb34651023c9eb1c5c4a7cdcaf7250d02c Author: Giulio Benetti Date: Tue Mar 13 11:16:45 2018 +0100 ARM: dts: sun8i-h3: Add Mali node The H3 has an ARM Mali 400 GPU, so add binding to our DT. Signed-off-by: Giulio Benetti Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard .../devicetree/bindings/gpu/arm,mali-utgard.txt | 1 + arch/arm/boot/dts/sun8i-h3.dtsi | 27 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit 58b369679e43187a147966253fc246081546232c Author: Sean Wang Date: Fri Feb 23 18:16:31 2018 +0800 arm: dts: mt7623: use - instead of _ in DT node name It should be good that no use "_" is in DT node name. Consequently, those nodes in certain files which have an inappropriate name containing "_" are all being replaced with "-". Signed-off-by: Sean Wang Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt7623.dtsi | 12 +++---- arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 50 +++++++++++++-------------- arch/arm/boot/dts/mt7623n-rfb-nand.dts | 6 ++-- 3 files changed, 34 insertions(+), 34 deletions(-) commit f59c89df6531a1d7c88e17f5bc7c1a1c072c4e73 Author: Sean Wang Date: Fri Feb 23 18:16:30 2018 +0800 arm: dts: mt7623: remove useless property pinctrl-names at node switch@0 The property pinctrl-names is totally superfluous. It would be good to remove the property to keep the node neatness. There is actually unnecessary to set up any pins for data path TRGMII between main SoC and MT7530. Furthermore, it's more reasonable for the pin setup of control path MDIO bus is being placed inside the node of ethernet controller. Signed-off-by: Sean Wang Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 1 - 1 file changed, 1 deletion(-) commit 8e908df628eb4fba73f69e45bee863a11ec7dec8 Author: Sean Wang Date: Fri Feb 23 18:16:29 2018 +0800 arm: dts: mt7623: add related clock properties to cpu[1-3] nodes Complement the missing clock properties cpu[1-3] should depend on. Signed-off-by: Sean Wang Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: linux-pm@vger.kernel.org Acked-by: Viresh Kumar Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt7623.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit cc2f65242eec8a552fb6b6e1e411198e8401299c Author: Sean Wang Date: Fri Feb 23 18:16:28 2018 +0800 arm: dts: mt7623: enable three available UARTs on bananapi-r2 On bpi-r2 board, totally there're four UARTs which we usually called uart[0-3] helpful to extend slow-I/O devices. Among those ones, uart2 has dedicated pin slot which is used to console log. uart[0-1] appear at the 40-pins connector and uart3 has no pinout, but just has test points (TP47 for TX and TP48 for RX, respectively) nearby uart2, but we don't enable uart3 in the patch. The missing pinctrl is also being supplemented for those newly added devices. Signed-off-by: Sean Wang Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 528a97e9b6c0e3657df179822fef386f895b3c58 Author: Sean Wang Date: Fri Feb 23 18:16:27 2018 +0800 arm: dts: mt7623: fix the regulators mmc should use on bananapi-r2 Both mmc devices on bananapi-r2 board should all use the fixed regulators as their power source instead of PMIC MT6323 exports. Signed-off-by: Sean Wang Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit e3c72f3d37e4745dc3a6ae69f5fc2bd4c31ca4eb Author: Stefano Brivio Date: Sun Mar 18 21:58:12 2018 +0100 selftests: pmtu: Drop prints to kernel log from pmtu_vti6_link_change_mtu Reported-by: David Ahern Fixes: 1fad59ea1c34 ("selftests: pmtu: Add pmtu_vti6_link_change_mtu test") Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 2 -- 1 file changed, 2 deletions(-) commit ef57e31e2b6249ed3e39897a2f09d46b4f0bb343 Merge: ef44d78 6f88284 Author: David S. Miller Date: Sun Mar 18 16:52:59 2018 -0400 Merge branch 'mv88e6xxx-auto-phy-intr' Andrew Lunn says: ==================== Automatic PHY interrupts Now that the mv88e6xxx driver either installs in interrupt handler, or polls for interrupts, it is possible to always handle PHY interrupts, rather than have phylib perform the polling. This speeds up detection of link changes and reduces the load on the MDIO bus, which is beneficial for PTP. ==================== Signed-off-by: David S. Miller commit 6f88284f3bd77a0e51de22d4956f07557bcc0dbf Author: Andrew Lunn Date: Sat Mar 17 20:32:05 2018 +0100 net: dsa: mv88e6xxx: Add MDIO interrupts for internal PHYs When registering an MDIO bus, it is possible to pass an array of interrupts, one per address on the bus. phylib will then associate the interrupt to the PHY device, if no other interrupt is provided. Some of the global2 interrupts are PHY interrupts. Place them into the MDIO bus structure. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 10 ++++++++++ drivers/net/dsa/mv88e6xxx/global2.c | 32 ++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/global2.h | 16 ++++++++++++++++ 3 files changed, 58 insertions(+) commit bc3931557d1d55584100b1ffefc248137b5cb7e1 Author: Andrew Lunn Date: Sat Mar 17 20:32:04 2018 +0100 net: dsa: mv88e6xxx: Add number of internal PHYs Add to the info structure the number of internal PHYs, if they generate interrupts. Some of the older generations of switches have internal PHYs, but no interrupt registers. In this case, set the count to zero. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 28 ++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/chip.h | 1 + 2 files changed, 29 insertions(+) commit adfccf118211520ebe22f9f46e73834211ea492d Author: Andrew Lunn Date: Sat Mar 17 20:32:03 2018 +0100 net: dsa: mv88e6xxx: Add missing g1 IRQ numbers With the recent change to polling for interrupts, it is important that the number of global 1 interrupts is listed. Without it, the driver requests an interrupt domain for zero interrupts, which returns EINVAL, and the probe fails. Add two missing entries. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+) commit ef44d78d8937146269ec3f0de966817a6d630d5e Author: Florian Fainelli Date: Sun Mar 18 11:23:05 2018 -0700 net: dsa: mv88e6xxx: Fix missing register lock in serdes_get_stats We can hit the register lock not held assertion with the following path: [ 34.170631] mv88e6085 0.1:00: Switch registers lock not held! [ 34.176510] CPU: 0 PID: 950 Comm: ethtool Not tainted 4.16.0-rc4 #143 [ 34.182985] Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree) [ 34.189519] Backtrace: [ 34.192033] [<8010c4b4>] (dump_backtrace) from [<8010c788>] (show_stack+0x20/0x24) [ 34.199680] r6:9f5dc010 r5:00000011 r4:9f5dc010 r3:00000000 [ 34.205434] [<8010c768>] (show_stack) from [<80679d38>] (dump_stack+0x24/0x28) [ 34.212719] [<80679d14>] (dump_stack) from [<804844a8>] (mv88e6xxx_read+0x70/0x7c) [ 34.220376] [<80484438>] (mv88e6xxx_read) from [<804870dc>] (mv88e6xxx_port_get_cmode+0x34/0x4c) [ 34.229257] r5:a09cd128 r4:9ee31d07 [ 34.232880] [<804870a8>] (mv88e6xxx_port_get_cmode) from [<80487e6c>] (mv88e6352_port_has_serdes+0x24/0x64) [ 34.242690] r4:9f5dc010 [ 34.245309] [<80487e48>] (mv88e6352_port_has_serdes) from [<804880b8>] (mv88e6352_serdes_get_stats+0x28/0x12c) [ 34.255389] r4:00000001 [ 34.257973] [<80488090>] (mv88e6352_serdes_get_stats) from [<804811e8>] (mv88e6xxx_get_ethtool_stats+0xb0/0xc0) [ 34.268156] r10:00000000 r9:00000000 r8:00000000 r7:a09cd020 r6:00000001 r5:9f5dc01c [ 34.276052] r4:9f5dc010 [ 34.278631] [<80481138>] (mv88e6xxx_get_ethtool_stats) from [<8064f740>] (dsa_slave_get_ethtool_stats+0xbc/0xc4) mv88e6xxx_get_ethtool_stats() calls mv88e6xxx_get_stats() which calls both chip->info->ops->stats_get_stats(), which holds the register lock, and chip->info->ops->serdes_get_stats() which does not. Have chip->info->ops->serdes_get_stats() be running with the register lock held to avoid such assertions. Fixes: 436fe17d273b ("net: dsa: mv88e6xxx: Allow the SERDES interfaces to have statistics") Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+) commit 2c97fa22daa1f9bdbdebb9880f44a50c703a9d35 Author: Sean Wang Date: Sun Feb 18 03:54:36 2018 +0800 dt-bindings: clock: mediatek: add missing required #reset-cells All ethsys, pciesys and ssusbsys internally include reset controller, so explicitly add back these missing cell definitions to related bindings and examples. Signed-off-by: Sean Wang Cc: Rob Herring Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Reviewed-by: Rob Herring Reviewed-by: Matthias Brugger Acked-by: Stephen Boyd Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt | 1 + Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt | 2 ++ Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt | 2 ++ 3 files changed, 5 insertions(+) commit 524353ea480b0094c16f2b5684ce7e0a23ab3685 Author: Icenowy Zheng Date: Fri Mar 16 22:02:13 2018 +0800 clk: sunxi-ng: add support for the Allwinner H6 CCU The Allwinner H6 SoC has a CCU which has been largely rearranged. Add support for it in the sunxi-ng CCU framework. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Kconfig | 5 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 1207 +++++++++++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-sun50i-h6.h | 56 ++ include/dt-bindings/clock/sun50i-h6-ccu.h | 124 +++ include/dt-bindings/reset/sun50i-h6-ccu.h | 73 ++ 6 files changed, 1466 insertions(+) commit 2e08e4d2ff488424919d69dd211ac860a019ac1d Author: Icenowy Zheng Date: Fri Mar 16 22:02:12 2018 +0800 dt-bindings: add device tree binding for Allwinner H6 main CCU The Allwinner H6 main CCU uses the internal oscillator of the SoC, which is different with old SoCs' main CCU. Add device tree binding for the Allwinner H6 main CCU. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/clock/sunxi-ccu.txt | 4 ++++ 1 file changed, 4 insertions(+) commit a910f251ee084230e2f8d214f1621346cec94e69 Author: Icenowy Zheng Date: Fri Mar 16 22:02:11 2018 +0800 clk: sunxi-ng: Support fixed post-dividers on NKMP style clocks On the new Allwinner H6 SoC, multiple PLL's are NMP style clocks (modelled as NKMP with no K) and have fixed post-dividers. Add fixed post divider support to the NKMP style clocks. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_nkmp.c | 20 +++++++++++++++++--- drivers/clk/sunxi-ng/ccu_nkmp.h | 2 ++ 2 files changed, 19 insertions(+), 3 deletions(-) commit 4860ae7f58fa777405239e26698193801105fb2f Author: Bob Moore Date: Wed Mar 14 16:13:10 2018 -0700 ACPICA: Update version to 20180313 Version 20180313. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a406dea82af80a2cb069f7e34e24677fe9dd580e Author: Bob Moore Date: Wed Mar 14 16:13:09 2018 -0700 ACPICA: Cleanup/simplify module-level code support This prepares the code for eventual removal of the original style of deferred execution of the MLC. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/evrgnini.c | 3 +++ drivers/acpi/acpica/nseval.c | 14 ++++++++++++ drivers/acpi/acpica/nsload.c | 24 ++++++++------------- drivers/acpi/acpica/nsparse.c | 24 +++++++++++++++++++-- drivers/acpi/acpica/psloop.c | 24 ++++++++++++++++++--- drivers/acpi/acpica/tbdata.c | 18 ++++++++++------ drivers/acpi/acpica/tbxfload.c | 11 ++++++---- drivers/acpi/acpica/utxfinit.c | 48 ++++++++++++++++-------------------------- include/acpi/actypes.h | 20 +++++++++--------- 9 files changed, 116 insertions(+), 70 deletions(-) commit b4c0de312613ca676db5bd7e696a44b56795612a Author: Erik Schmauss Date: Wed Mar 14 16:13:08 2018 -0700 ACPICA: Events: add a return on failure from acpi_hw_register_read This ensures that acpi_ev_fixed_event_detect() does not use fixed_status and and fixed_enable as uninitialized variables. Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/evevent.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 95857638889aeea1b10a16b55041adf3e3ab84c4 Author: Erik Schmauss Date: Wed Mar 14 16:13:07 2018 -0700 ACPICA: adding SPDX headers Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acapps.h | 38 ++------------------ drivers/acpi/acpica/accommon.h | 38 ++------------------ drivers/acpi/acpica/acconvert.h | 38 ++------------------ drivers/acpi/acpica/acdebug.h | 38 ++------------------ drivers/acpi/acpica/acdispat.h | 38 ++------------------ drivers/acpi/acpica/acevents.h | 38 ++------------------ drivers/acpi/acpica/acglobal.h | 38 ++------------------ drivers/acpi/acpica/achware.h | 38 ++------------------ drivers/acpi/acpica/acinterp.h | 38 ++------------------ drivers/acpi/acpica/aclocal.h | 38 ++------------------ drivers/acpi/acpica/acmacros.h | 38 ++------------------ drivers/acpi/acpica/acnamesp.h | 38 ++------------------ drivers/acpi/acpica/acobject.h | 38 ++------------------ drivers/acpi/acpica/acopcode.h | 38 ++------------------ drivers/acpi/acpica/acparser.h | 38 ++------------------ drivers/acpi/acpica/acpredef.h | 38 ++------------------ drivers/acpi/acpica/acresrc.h | 38 ++------------------ drivers/acpi/acpica/acstruct.h | 38 ++------------------ drivers/acpi/acpica/actables.h | 38 ++------------------ drivers/acpi/acpica/acutils.h | 38 ++------------------ drivers/acpi/acpica/amlcode.h | 38 ++------------------ drivers/acpi/acpica/amlresrc.h | 38 ++------------------ drivers/acpi/acpica/dbcmds.c | 38 +------------------- drivers/acpi/acpica/dbconvert.c | 38 +------------------- drivers/acpi/acpica/dbdisply.c | 38 +------------------- drivers/acpi/acpica/dbexec.c | 38 +------------------- drivers/acpi/acpica/dbfileio.c | 38 +------------------- drivers/acpi/acpica/dbhistry.c | 40 ++-------------------- drivers/acpi/acpica/dbinput.c | 38 +------------------- drivers/acpi/acpica/dbmethod.c | 38 +------------------- drivers/acpi/acpica/dbnames.c | 38 +------------------- drivers/acpi/acpica/dbobject.c | 38 +------------------- drivers/acpi/acpica/dbstats.c | 38 +------------------- drivers/acpi/acpica/dbtest.c | 38 +------------------- drivers/acpi/acpica/dbutils.c | 38 +------------------- drivers/acpi/acpica/dbxface.c | 38 +------------------- drivers/acpi/acpica/dsargs.c | 40 ++-------------------- drivers/acpi/acpica/dscontrol.c | 38 ++------------------ drivers/acpi/acpica/dsdebug.c | 38 ++------------------ drivers/acpi/acpica/dsfield.c | 40 ++-------------------- drivers/acpi/acpica/dsinit.c | 38 ++------------------ drivers/acpi/acpica/dsmethod.c | 40 ++-------------------- drivers/acpi/acpica/dsmthdat.c | 38 +------------------- drivers/acpi/acpica/dsobject.c | 38 ++------------------ drivers/acpi/acpica/dsopcode.c | 40 ++-------------------- drivers/acpi/acpica/dspkginit.c | 38 ++------------------ drivers/acpi/acpica/dsutils.c | 38 +------------------- drivers/acpi/acpica/dswexec.c | 38 ++------------------ drivers/acpi/acpica/dswload.c | 38 ++------------------ drivers/acpi/acpica/dswload2.c | 38 ++------------------ drivers/acpi/acpica/dswscope.c | 40 ++-------------------- drivers/acpi/acpica/dswstate.c | 40 ++-------------------- drivers/acpi/acpica/evevent.c | 38 ++------------------ drivers/acpi/acpica/evglock.c | 38 ++------------------ drivers/acpi/acpica/evgpe.c | 40 ++-------------------- drivers/acpi/acpica/evgpeblk.c | 38 ++------------------ drivers/acpi/acpica/evgpeinit.c | 38 ++------------------ drivers/acpi/acpica/evgpeutil.c | 38 ++------------------ drivers/acpi/acpica/evhandler.c | 38 ++------------------ drivers/acpi/acpica/evmisc.c | 38 ++------------------ drivers/acpi/acpica/evregion.c | 40 ++-------------------- drivers/acpi/acpica/evrgnini.c | 40 ++-------------------- drivers/acpi/acpica/evsci.c | 38 +------------------- drivers/acpi/acpica/evxface.c | 40 ++-------------------- drivers/acpi/acpica/evxfevnt.c | 40 ++-------------------- drivers/acpi/acpica/evxfgpe.c | 40 ++-------------------- drivers/acpi/acpica/evxfregn.c | 38 ++------------------ drivers/acpi/acpica/exconcat.c | 38 ++------------------ drivers/acpi/acpica/exconfig.c | 38 ++------------------ drivers/acpi/acpica/exconvrt.c | 38 ++------------------ drivers/acpi/acpica/excreate.c | 40 ++-------------------- drivers/acpi/acpica/exdebug.c | 38 ++------------------ drivers/acpi/acpica/exdump.c | 38 ++------------------ drivers/acpi/acpica/exfield.c | 38 ++------------------ drivers/acpi/acpica/exfldio.c | 40 ++-------------------- drivers/acpi/acpica/exmisc.c | 38 ++------------------ drivers/acpi/acpica/exmutex.c | 40 ++-------------------- drivers/acpi/acpica/exnames.c | 38 ++------------------ drivers/acpi/acpica/exoparg1.c | 38 ++------------------ drivers/acpi/acpica/exoparg2.c | 38 ++------------------ drivers/acpi/acpica/exoparg3.c | 38 ++------------------ drivers/acpi/acpica/exoparg6.c | 38 ++------------------ drivers/acpi/acpica/exprep.c | 38 ++------------------ drivers/acpi/acpica/exregion.c | 40 ++-------------------- drivers/acpi/acpica/exresnte.c | 38 ++------------------ drivers/acpi/acpica/exresolv.c | 38 ++------------------ drivers/acpi/acpica/exresop.c | 38 ++------------------ drivers/acpi/acpica/exstore.c | 38 ++------------------ drivers/acpi/acpica/exstoren.c | 38 ++------------------ drivers/acpi/acpica/exstorob.c | 38 ++------------------ drivers/acpi/acpica/exsystem.c | 40 ++-------------------- drivers/acpi/acpica/extrace.c | 40 ++-------------------- drivers/acpi/acpica/exutils.c | 40 ++-------------------- drivers/acpi/acpica/hwacpi.c | 38 ++------------------ drivers/acpi/acpica/hwesleep.c | 40 ++-------------------- drivers/acpi/acpica/hwgpe.c | 40 ++-------------------- drivers/acpi/acpica/hwpci.c | 38 +------------------- drivers/acpi/acpica/hwregs.c | 38 +------------------- drivers/acpi/acpica/hwsleep.c | 38 ++------------------ drivers/acpi/acpica/hwtimer.c | 40 ++-------------------- drivers/acpi/acpica/hwvalid.c | 38 ++------------------ drivers/acpi/acpica/hwxface.c | 40 ++-------------------- drivers/acpi/acpica/hwxfsleep.c | 40 ++-------------------- drivers/acpi/acpica/nsaccess.c | 38 +------------------- drivers/acpi/acpica/nsalloc.c | 38 +------------------- drivers/acpi/acpica/nsarguments.c | 38 ++------------------ drivers/acpi/acpica/nsconvert.c | 40 ++-------------------- drivers/acpi/acpica/nsdump.c | 40 ++-------------------- drivers/acpi/acpica/nsdumpdv.c | 38 ++------------------ drivers/acpi/acpica/nseval.c | 38 +------------------- drivers/acpi/acpica/nsinit.c | 38 ++------------------ drivers/acpi/acpica/nsload.c | 38 ++------------------ drivers/acpi/acpica/nsnames.c | 38 +------------------- drivers/acpi/acpica/nsobject.c | 38 +------------------- drivers/acpi/acpica/nsparse.c | 38 ++------------------ drivers/acpi/acpica/nspredef.c | 38 ++------------------ drivers/acpi/acpica/nsprepkg.c | 38 ++------------------ drivers/acpi/acpica/nsrepair.c | 40 ++-------------------- drivers/acpi/acpica/nsrepair2.c | 40 ++-------------------- drivers/acpi/acpica/nssearch.c | 38 +------------------- drivers/acpi/acpica/nsutils.c | 40 ++-------------------- drivers/acpi/acpica/nswalk.c | 38 ++------------------ drivers/acpi/acpica/nsxfeval.c | 38 +------------------- drivers/acpi/acpica/nsxfname.c | 38 ++------------------ drivers/acpi/acpica/nsxfobj.c | 38 +------------------- drivers/acpi/acpica/psargs.c | 40 ++-------------------- drivers/acpi/acpica/psloop.c | 38 ++------------------ drivers/acpi/acpica/psobject.c | 38 ++------------------ drivers/acpi/acpica/psopcode.c | 38 ++------------------ drivers/acpi/acpica/psopinfo.c | 38 ++------------------ drivers/acpi/acpica/psparse.c | 38 ++------------------ drivers/acpi/acpica/psscope.c | 40 ++-------------------- drivers/acpi/acpica/pstree.c | 38 ++------------------ drivers/acpi/acpica/psutils.c | 40 ++-------------------- drivers/acpi/acpica/pswalk.c | 38 ++------------------ drivers/acpi/acpica/psxface.c | 38 ++------------------ drivers/acpi/acpica/rsaddr.c | 38 +------------------- drivers/acpi/acpica/rscalc.c | 38 +------------------- drivers/acpi/acpica/rscreate.c | 38 +------------------- drivers/acpi/acpica/rsdump.c | 38 +------------------- drivers/acpi/acpica/rsdumpinfo.c | 38 +------------------- drivers/acpi/acpica/rsinfo.c | 38 +------------------- drivers/acpi/acpica/rsio.c | 38 +------------------- drivers/acpi/acpica/rsirq.c | 38 +------------------- drivers/acpi/acpica/rslist.c | 38 +------------------- drivers/acpi/acpica/rsmemory.c | 38 +------------------- drivers/acpi/acpica/rsmisc.c | 38 +------------------- drivers/acpi/acpica/rsserial.c | 38 +------------------- drivers/acpi/acpica/rsutils.c | 38 +------------------- drivers/acpi/acpica/rsxface.c | 38 +------------------- drivers/acpi/acpica/tbdata.c | 40 ++-------------------- drivers/acpi/acpica/tbfadt.c | 40 ++-------------------- drivers/acpi/acpica/tbfind.c | 38 ++------------------ drivers/acpi/acpica/tbinstal.c | 38 ++------------------ drivers/acpi/acpica/tbprint.c | 40 ++-------------------- drivers/acpi/acpica/tbutils.c | 40 ++-------------------- drivers/acpi/acpica/tbxface.c | 40 ++-------------------- drivers/acpi/acpica/tbxfload.c | 38 ++------------------ drivers/acpi/acpica/tbxfroot.c | 38 ++------------------ drivers/acpi/acpica/utaddress.c | 38 ++------------------ drivers/acpi/acpica/utalloc.c | 38 ++------------------ drivers/acpi/acpica/utascii.c | 40 ++-------------------- drivers/acpi/acpica/utbuffer.c | 38 ++------------------ drivers/acpi/acpica/utcache.c | 38 ++------------------ drivers/acpi/acpica/utcopy.c | 40 ++-------------------- drivers/acpi/acpica/utdebug.c | 40 ++-------------------- drivers/acpi/acpica/utdecode.c | 40 ++-------------------- drivers/acpi/acpica/utdelete.c | 38 +------------------- drivers/acpi/acpica/uterror.c | 38 +------------------- drivers/acpi/acpica/uteval.c | 38 ++------------------ drivers/acpi/acpica/utexcep.c | 38 +------------------- drivers/acpi/acpica/utglobal.c | 38 ++------------------ drivers/acpi/acpica/uthex.c | 40 ++-------------------- drivers/acpi/acpica/utids.c | 38 ++------------------ drivers/acpi/acpica/utinit.c | 38 ++------------------ drivers/acpi/acpica/utlock.c | 40 ++-------------------- drivers/acpi/acpica/utmath.c | 38 +------------------- drivers/acpi/acpica/utmisc.c | 38 +------------------- drivers/acpi/acpica/utmutex.c | 38 +------------------- drivers/acpi/acpica/utnonansi.c | 38 +------------------- drivers/acpi/acpica/utobject.c | 40 ++-------------------- drivers/acpi/acpica/utosi.c | 40 ++-------------------- drivers/acpi/acpica/utownerid.c | 38 +------------------- drivers/acpi/acpica/utpredef.c | 40 ++-------------------- drivers/acpi/acpica/utprint.c | 40 ++-------------------- drivers/acpi/acpica/utresdecode.c | 38 +------------------- drivers/acpi/acpica/utresrc.c | 38 +------------------- drivers/acpi/acpica/utstate.c | 38 +------------------- drivers/acpi/acpica/utstring.c | 38 +------------------- drivers/acpi/acpica/utstrsuppt.c | 38 +------------------- drivers/acpi/acpica/utstrtoul64.c | 38 +------------------- drivers/acpi/acpica/uttrack.c | 40 ++-------------------- drivers/acpi/acpica/utuuid.c | 38 ++------------------ drivers/acpi/acpica/utxface.c | 40 ++-------------------- drivers/acpi/acpica/utxferror.c | 38 +------------------- drivers/acpi/acpica/utxfinit.c | 38 ++------------------ drivers/acpi/acpica/utxfmutex.c | 38 +------------------- include/acpi/acbuffer.h | 38 ++------------------ include/acpi/acconfig.h | 40 ++-------------------- include/acpi/acexcep.h | 38 ++------------------ include/acpi/acnames.h | 38 ++------------------ include/acpi/acoutput.h | 38 ++------------------ include/acpi/acpi.h | 38 ++------------------ include/acpi/acpiosxf.h | 38 ++------------------ include/acpi/acpixf.h | 38 ++------------------ include/acpi/acrestyp.h | 38 ++------------------ include/acpi/actbl.h | 38 ++------------------ include/acpi/actbl1.h | 38 ++------------------ include/acpi/actbl2.h | 38 ++------------------ include/acpi/actbl3.h | 40 ++-------------------- include/acpi/actypes.h | 38 ++------------------ include/acpi/acuuid.h | 38 ++------------------ include/acpi/platform/acenv.h | 38 ++------------------ include/acpi/platform/acenvex.h | 38 ++------------------ include/acpi/platform/acgcc.h | 38 ++------------------ include/acpi/platform/acgccex.h | 38 ++------------------ include/acpi/platform/acintel.h | 38 ++------------------ include/acpi/platform/aclinux.h | 38 ++------------------ include/acpi/platform/aclinuxex.h | 38 ++------------------ tools/power/acpi/common/cmfsize.c | 38 ++------------------ tools/power/acpi/common/getopt.c | 38 ++------------------ .../acpi/os_specific/service_layers/oslinuxtbl.c | 40 ++-------------------- .../acpi/os_specific/service_layers/osunixdir.c | 40 ++-------------------- .../acpi/os_specific/service_layers/osunixmap.c | 40 ++-------------------- .../acpi/os_specific/service_layers/osunixxf.c | 40 ++-------------------- tools/power/acpi/tools/acpidump/acpidump.h | 38 ++------------------ tools/power/acpi/tools/acpidump/apdump.c | 40 ++-------------------- tools/power/acpi/tools/acpidump/apfiles.c | 38 ++------------------ tools/power/acpi/tools/acpidump/apmain.c | 38 ++------------------ 229 files changed, 459 insertions(+), 8357 deletions(-) commit e7d970f6fca8bc7b9587f77bf8b11fa78abd9280 Author: Bob Moore Date: Wed Mar 14 16:13:06 2018 -0700 ACPICA: Rename a global for clarity, no functional change Was acpi_gbl_parse_table_as_term_list, changed to: acpi_gbl_execute_tables_as_methods. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/evrgnini.c | 2 +- drivers/acpi/acpica/nsload.c | 2 +- drivers/acpi/acpica/nsparse.c | 2 +- drivers/acpi/acpica/tbdata.c | 2 +- drivers/acpi/acpica/tbxfload.c | 2 +- drivers/acpi/acpica/utxfinit.c | 2 +- drivers/acpi/bus.c | 6 +++--- include/acpi/acpixf.h | 7 +++---- 8 files changed, 12 insertions(+), 13 deletions(-) commit 0fe0bebf5fb905ae682b1ecfd0b51b3a89e45ee6 Author: Erik Schmauss Date: Wed Mar 14 16:13:05 2018 -0700 ACPICA: macros: fix ACPI_ERROR_NAMESPACE macro Fixing the ACPI_ERROR_NAMESPACE macros created an "unused variable" compile error when ACPI_NO_ERROR_MESSAGES was defined. This commit also fixes the above compilation errors by surrounding variables meant for debugging inside a new ACPI_ERROR_ONLY macro. Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acmacros.h | 4 +++- drivers/acpi/acpica/evgpeblk.c | 6 ++++-- drivers/acpi/acpica/psobject.c | 10 ++++++---- drivers/acpi/acpica/tbinstal.c | 6 +++--- 4 files changed, 16 insertions(+), 10 deletions(-) commit 34f206fd757c5061a67d879a74c300fafc34defb Author: Bob Moore Date: Wed Mar 14 16:13:04 2018 -0700 ACPICA: Change a compile-time option to a runtime option Changes the option to ignore package resolution errors into a runtime option. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dspkginit.c | 32 ++++++++++++++++---------------- include/acpi/acpixf.h | 10 ++++++++++ 2 files changed, 26 insertions(+), 16 deletions(-) commit e7c2c3c909c0bda8ebebfc0a11c3d94745e9b043 Author: Hans de Goede Date: Wed Mar 14 16:13:03 2018 -0700 ACPICA: Remove calling of _STA from acpi_get_object_info() As the documentatuon above its declaration indicates, acpi_get_object_info() is intended for early probe usage and as such should not call any methods which may rely on op_regions, before this commit it was also calling _STA, which on some systems does rely on op_regions. Calling _STA before things are ready leads to errors such as these (under Linux, on some hardware): [ 0.123579] ACPI Error: No handler for Region [ECRM] (00000000ba9edc4c) [generic_serial_bus] (20170831/evregion-166) [ 0.123601] ACPI Error: Region generic_serial_bus (ID=9) has no handler (20170831/exfldio-299) [ 0.123618] ACPI Error: Method parse/execution failed \_SB.I2C1.BAT1._STA, AE_NOT_EXIST (20170831/psparse-550) End 2015 support for the _SUB method was removed for exactly the same reason. Removing current_status from struct acpi_device_info only has a limited impact. Within ACPICA it is only used by 2 debug messages, both of which are modified to no longer print it with this commit. Outside of ACPICA, there was one user in Linux, which has been patched to no longer use current_status in Torvald's current master. I've not checked if free_BSD or others are using the current_status field. Signed-off-by: Hans de Goede Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dbdisply.c | 5 ++--- drivers/acpi/acpica/nsdumpdv.c | 5 ++--- drivers/acpi/acpica/nsxfname.c | 21 +++++---------------- include/acpi/actypes.h | 2 -- 4 files changed, 9 insertions(+), 24 deletions(-) commit 816772412101bd41fdab01aa7ce575b3a6392cd4 Author: Bob Moore Date: Wed Mar 14 16:13:02 2018 -0700 ACPICA: AML Debug Object: Don't ignore output of zero-length strings The implementation previously ignored null strings (""), but these could be important, especially for debug. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/exdebug.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 1c29c372b2d1d2415601041532745ce859f24126 Author: Bob Moore Date: Wed Mar 14 16:13:01 2018 -0700 ACPICA: Fix memory leak on unusual memory leak Fixes a single-object memory leak on a store-to-reference method invocation. ACPICA BZ 1439. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/psargs.c | 4 ++++ 1 file changed, 4 insertions(+) commit 87cd826b5979d91d4f2ba189e0652820f2da417f Author: Erik Schmauss Date: Wed Mar 14 16:12:59 2018 -0700 ACPICA: Events: Dispatch GPEs after enabling for the first time After being enabled for the first time, the GPEs may have STS bits already set. Setting EN bits is not sufficient to trigger the GPEs again, so this patch polls GPEs after enabling them for the first time. This is a cleaner version on top of the "GPE clear" fix generated according to Mika's report and Rafael's original Linux based fix. Based on Linux commit originated from Rafael J. Wysocki, fixed by Lv Zheng. Signed-off-by: Lv Zheng Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acevents.h | 14 ++++++++++++++ drivers/acpi/acpica/evgpeblk.c | 18 ++++++------------ drivers/acpi/acpica/evxface.c | 9 +++++++++ drivers/acpi/acpica/evxfgpe.c | 21 ++++++++++++++++++++- include/acpi/actypes.h | 1 + include/acpi/platform/aclinux.h | 1 + 6 files changed, 51 insertions(+), 13 deletions(-) commit 8d5934952f26c25431dbc21aa8ae7614bb8f88c3 Author: Erik Schmauss Date: Wed Mar 14 16:12:58 2018 -0700 ACPICA: Events: Add parallel GPE handling support to fix potential redundant _Exx evaluations There is a risk that a GPE method/handler may be invoked twice. Let's consider a case, both GPE0(RAW_HANDLER) and GPE1(_Exx) is triggered. =======================================+============================= IRQ handler (top-half) |IRQ polling =======================================+============================= acpi_ev_detect_gpe() | LOCK() | READ (GPE0-7 enable/status registers)| ^^^^^^^^^^^^ROOT CAUSE^^^^^^^^^^^^^^^| Walk GPE0 | UNLOCK() |LOCK() Invoke GPE0 RAW_HANDLER |READ (GPE1 enable/status bit) |acpi_ev_gpe_dispatch(irq=false) | CLEAR (GPE1 enable bit) | CLEAR (GPE1 status bit) LOCK() |UNLOCK() Walk GPE1 +============================= acpi_ev_gpe_dispatch(irq=true) |IRQ polling (defer) CLEAR (GPE1 enable bit) +============================= CLEAR (GPE1 status bit) |acpi_ev_async_execute_gpe_method() Walk others | Evaluate GPE1 _Exx fi | acpi_ev_async_enable_gpe() UNLOCK() | LOCK() =======================================+ SET (GPE enable bit) IRQ handler (bottom-half) | UNLOCK() =======================================+ acpi_ev_async_execute_gpe_method() | Evaluate GPE1 _Exx | acpi_ev_async_enable_gpe() | LOCK() | SET (GPE1 enable bit) | UNLOCK() | =======================================+============================= If acpi_ev_detect_gpe() is only invoked from the IRQ context, there won't be more than one _Lxx/_Exx evaluations for one status bit flagging if the IRQ handlers controlled by the underlying IRQ chip/driver (ex. APIC) are run in serial. Note that, this is a known potential gap and we had an approach, locking entire non-raw-handler processes in the top-half IRQ handler and handling all raw-handlers out of the locked loop to be friendly to those IRQ chip/driver. But the approach is too complicated while the issue is not so real, thus ACPICA treated such issue (if any) as a parallelism/quality issue of the underlying IRQ chip/driver to stop putting it on the radar. Bug in link #1 is suspiciously reflecting the same cause, and if so, it can also be fixed by this simpler approach. But it will be no excuse an ACPICA problem now if ACPICA starts to poll IRQs itself. In the changed scenario, _Exx will be evaluated from the task context due to new ACPICA provided "polling after enabling GPEs" mechanism. And the above figure uses edge-triggered GPEs demonstrating the possibility of evaluating _Exx twice for one status bit flagging. As a conclusion, there is now an increased chance of evaluating _Lxx/_Exx more than once for one status bit flagging. However this is still not a real problem if the _Lxx/_Exx checks the underlying hardware IRQ reasoning and finally just changes the 2nd and the follow-up evaluations into no-ops. Note that _Lxx should always be written in this way as a level-trigger GPE could have it's status wrongly duplicated by the underlying IRQ delivery mechanisms. But _Exx may have very low quality BIOS by BIOS to trigger real issues. For example, trigger duplicated button notifications. To solve this issue, we need to stop reading a bunch of enable/status register bits, but read only one GPE's enable/status bit. And GPE status register's W1C nature ensures that acknowledging one GPE won't affect another GPEs' status bits. Thus the hardware GPE architecture has already provided us with the mechanism of implementing such parallelism. So we can lock around one GPE handling process to achieve the parallelism: 1. If we can incorporate GPE enable bit check in detection and ensure the atomicity of the following process (top-half IRQ handler): READ (enable/status bit) if (enabled && raised) CLEAR (enable bit) and handle the GPE after this process, we can ensure that we will only invoke GPE handler once for one status bit flagging. 2. In addtion for edge-triggered GPEs, if we can ensure the atomicity of the following process (top-half IRQ handler): READ (enable/status bit) if (enabled && raised) CLEAR (enable bit) CLEAR (status bit) and handle the GPE after this process, we can ensure that we will only invoke GPE handler once for one status bit flagging. By doing a cleanup in this way, we can remove duplicate GPE handling code and ensure that all logics are collected in 1 function. And the function will be safe for both IRQ interrupt and IRQ polling, and will be safe for us to release and re-acquire acpi_gbl_gpe_lock at any time rather than raw handler only during the top-half IRQ handler. Lv Zheng. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196703 [#1] Signed-off-by: Lv Zheng Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acevents.h | 4 + drivers/acpi/acpica/evgpe.c | 233 ++++++++++++++++++++++------------------- 2 files changed, 132 insertions(+), 105 deletions(-) commit 18996f2db9186cbabe3a7e7085bfb80408b32755 Author: Erik Schmauss Date: Wed Mar 14 16:12:57 2018 -0700 ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume Unconditionally clearing ACPI IRQs during suspend/resume can lead to unexpected IRQ losts. This patch fixes this issue by removing such IRQ clearing code. If this patch triggers regression, the regression should be in the GPE handlers that cannot correctly determine some spurious triggered events as no-ops. Please report any regression related to this commit to the ACPI component on kernel bugzilla. Lv Zheng. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196249 Signed-off-by: Lv Zheng Reported-and-tested-by: Eric Bakula-Davis Tested-by: Mika Westerberg Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/evgpe.c | 9 +-------- drivers/acpi/acpica/hwgpe.c | 1 - drivers/acpi/acpica/hwsleep.c | 11 ++--------- drivers/acpi/acpica/hwxfsleep.c | 2 +- 4 files changed, 4 insertions(+), 19 deletions(-) commit 97f3c0a4b0579b646b6b10ae5a3d59f0441cc12c Author: Seunghun Han Date: Wed Mar 14 16:12:56 2018 -0700 ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c I found an ACPI cache leak in ACPI early termination and boot continuing case. When early termination occurs due to malicious ACPI table, Linux kernel terminates ACPI function and continues to boot process. While kernel terminates ACPI function, kmem_cache_destroy() reports Acpi-Operand cache leak. Boot log of ACPI operand cache leak is as follows: >[ 0.464168] ACPI: Added _OSI(Module Device) >[ 0.467022] ACPI: Added _OSI(Processor Device) >[ 0.469376] ACPI: Added _OSI(3.0 _SCP Extensions) >[ 0.471647] ACPI: Added _OSI(Processor Aggregator Device) >[ 0.477997] ACPI Error: Null stack entry at ffff880215c0aad8 (20170303/exresop-174) >[ 0.482706] ACPI Exception: AE_AML_INTERNAL, While resolving operands for [opcode_name unavailable] (20170303/dswexec-461) >[ 0.487503] ACPI Error: Method parse/execution failed [\DBG] (Node ffff88021710ab40), AE_AML_INTERNAL (20170303/psparse-543) >[ 0.492136] ACPI Error: Method parse/execution failed [\_SB._INI] (Node ffff88021710a618), AE_AML_INTERNAL (20170303/psparse-543) >[ 0.497683] ACPI: Interpreter enabled >[ 0.499385] ACPI: (supports S0) >[ 0.501151] ACPI: Using IOAPIC for interrupt routing >[ 0.503342] ACPI Error: Null stack entry at ffff880215c0aad8 (20170303/exresop-174) >[ 0.506522] ACPI Exception: AE_AML_INTERNAL, While resolving operands for [opcode_name unavailable] (20170303/dswexec-461) >[ 0.510463] ACPI Error: Method parse/execution failed [\DBG] (Node ffff88021710ab40), AE_AML_INTERNAL (20170303/psparse-543) >[ 0.514477] ACPI Error: Method parse/execution failed [\_PIC] (Node ffff88021710ab18), AE_AML_INTERNAL (20170303/psparse-543) >[ 0.518867] ACPI Exception: AE_AML_INTERNAL, Evaluating _PIC (20170303/bus-991) >[ 0.522384] kmem_cache_destroy Acpi-Operand: Slab cache still has objects >[ 0.524597] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc5 #26 >[ 0.526795] Hardware name: innotek gmb_h virtual_box/virtual_box, BIOS virtual_box 12/01/2006 >[ 0.529668] Call Trace: >[ 0.530811] ? dump_stack+0x5c/0x81 >[ 0.532240] ? kmem_cache_destroy+0x1aa/0x1c0 >[ 0.533905] ? acpi_os_delete_cache+0xa/0x10 >[ 0.535497] ? acpi_ut_delete_caches+0x3f/0x7b >[ 0.537237] ? acpi_terminate+0xa/0x14 >[ 0.538701] ? acpi_init+0x2af/0x34f >[ 0.540008] ? acpi_sleep_proc_init+0x27/0x27 >[ 0.541593] ? do_one_initcall+0x4e/0x1a0 >[ 0.543008] ? kernel_init_freeable+0x19e/0x21f >[ 0.546202] ? rest_init+0x80/0x80 >[ 0.547513] ? kernel_init+0xa/0x100 >[ 0.548817] ? ret_from_fork+0x25/0x30 >[ 0.550587] vgaarb: loaded >[ 0.551716] EDAC MC: Ver: 3.0.0 >[ 0.553744] PCI: Probing PCI hardware >[ 0.555038] PCI host bridge to bus 0000:00 > ... Continue to boot and log is omitted ... I analyzed this memory leak in detail and found acpi_ns_evaluate() function only removes Info->return_object in AE_CTRL_RETURN_VALUE case. But, when errors occur, the status value is not AE_CTRL_RETURN_VALUE, and Info->return_object is also not null. Therefore, this causes acpi operand memory leak. This cache leak causes a security threat because an old kernel (<= 4.9) shows memory locations of kernel functions in stack dump. Some malicious users could use this information to neutralize kernel ASLR. I made a patch to fix ACPI operand cache leak. Signed-off-by: Seunghun Han Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/nseval.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 95260c17b27e4bdacf85022e629fb701b42cc190 Merge: 4f9a4cd 0c8efd6 Author: Linus Walleij Date: Sun Mar 18 17:48:59 2018 +0100 Merge tag 'v4.16-rc5' into devel Linux 4.16-rc5 merged into the GPIO devel branch to resolve a nasty conflict between fixes and devel in the RCAR driver. Signed-off-by: Linus Walleij commit 9c548bb5823dfcf7a16c6e65976d84d9581208c9 Author: Guenter Roeck Date: Mon Feb 26 15:21:18 2018 -0800 sparc64: Oracle DAX driver depends on SPARC64 sparc:allmodconfig fails to build as follows. ERROR: "mdesc_release" [drivers/sbus/char/oradax.ko] undefined! ERROR: "sun4v_hvapi_register" [drivers/sbus/char/oradax.ko] undefined! ERROR: "mdesc_get_property" [drivers/sbus/char/oradax.ko] undefined! ERROR: "mdesc_node_by_name" [drivers/sbus/char/oradax.ko] undefined! ERROR: "mdesc_grab" [drivers/sbus/char/oradax.ko] undefined! ERROR: "sun4v_ccb_info" [drivers/sbus/char/oradax.ko] undefined! ERROR: "sun4v_ccb_submit" [drivers/sbus/char/oradax.ko] undefined! ERROR: "sun4v_ccb_kill" [drivers/sbus/char/oradax.ko] undefined! The symbols are only available with SPARC64 builds, thus the driver depends on it. Fixes: dd0273284c74 ("sparc64: Oracle DAX driver") Cc: Kees Cook Signed-off-by: Guenter Roeck Signed-off-by: David S. Miller drivers/sbus/char/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 88fe35293446d19c4870e581b8b78d4714fc63d2 Merge: 8f5fd92 b9fa036 Author: David S. Miller Date: Sun Mar 18 07:38:59 2018 -0700 Merge branch 'sparc64-ADI' Khalid Aziz says: ==================== Application Data Integrity feature introduced by SPARC M7 V12 changes: This series is same as v10 and v11 and was simply rebased on 4.16-rc2 kernel and patch 11 was added to update signal delivery code to use the new helper functions added by Eric Biederman. Can mm maintainers please review patches 2, 7, 8 and 9 which are arch independent, and include/linux/mm.h and mm/ksm.c changes in patch 10 and ack these if everything looks good? SPARC M7 processor adds additional metadata for memory address space that can be used to secure access to regions of memory. This additional metadata is implemented as a 4-bit tag attached to each cacheline size block of memory. A task can set a tag on any number of such blocks. Access to such block is granted only if the virtual address used to access that block of memory has the tag encoded in the uppermost 4 bits of VA. Since sparc processor does not implement all 64 bits of VA, top 4 bits are available for ADI tags. Any mismatch between tag encoded in VA and tag set on the memory block results in a trap. Tags are verified in the VA presented to the MMU and tags are associated with the physical page VA maps on to. If a memory page is swapped out and page frame gets reused for another task, the tags are lost and hence must be saved when swapping or migrating the page. A userspace task enables ADI through mprotect(). This patch series adds a page protection bit PROT_ADI and a corresponding VMA flag VM_SPARC_ADI. VM_SPARC_ADI is used to trigger setting TTE.mcd bit in the sparc pte that enables ADI checking on the corresponding page. MMU validates the tag embedded in VA for every page that has TTE.mcd bit set in its pte. After enabling ADI on a memory range, the userspace task can set ADI version tags using stxa instruction with ASI_MCD_PRIMARY or ASI_MCD_ST_BLKINIT_PRIMARY ASI. Once userspace task calls mprotect() with PROT_ADI, kernel takes following overall steps: 1. Find the VMAs covering the address range passed in to mprotect and set VM_SPARC_ADI flag. If address range covers a subset of a VMA, the VMA will be split. 2. When a page is allocated for a VA and the VMA covering this VA has VM_SPARC_ADI flag set, set the TTE.mcd bit so MMU will check the vwersion tag. 3. Userspace can now set version tags on the memory it has enabled ADI on. Userspace accesses ADI enabled memory using a virtual address that has the version tag embedded in the high bits. MMU validates this version tag against the actual tag set on the memory. If tag matches, MMU performs the VA->PA translation and access is granted. If there is a mismatch, hypervisor sends a data access exception or precise memory corruption detected exception depending upon whether precise exceptions are enabled or not (controlled by MCDPERR register). Kernel sends SIGSEGV to the task with appropriate si_code. 4. If a page is being swapped out or migrated, kernel must save any ADI tags set on the page. Kernel maintains a page worth of tag storage descriptors. Each descriptors pointsto a tag storage space and the address range it covers. If the page being swapped out or migrated has ADI enabled on it, kernel finds a tag storage descriptor that covers the address range for the page or allocates a new descriptor if none of the existing descriptors cover the address range. Kernel saves tags from the page into the tag storage space descriptor points to. 5. When the page is swapped back in or reinstantiated after migration, kernel restores the version tags on the new physical page by retrieving the original tag from tag storage pointed to by a tag storage descriptor for the virtual address range for new page. User task can disable ADI by calling mprotect() again on the memory range with PROT_ADI bit unset. Kernel clears the VM_SPARC_ADI flag in VMAs, merges adjacent VMAs if necessary, and clears TTE.mcd bit in the corresponding ptes. IOMMU does not support ADI checking. Any version tags embedded in the top bits of VA meant for IOMMU, are cleared and replaced with sign extension of the first non-version tag bit (bit 59 for SPARC M7) for IOMMU addresses. This patch series adds support for this feature in 11 patches: Patch 1/11 Tag mismatch on access by a task results in a trap from hypervisor as data access exception or a precide memory corruption detected exception. As part of handling these exceptions, kernel sends a SIGSEGV to user process with special si_code to indicate which fault occurred. This patch adds three new si_codes to differentiate between various mismatch errors. Patch 2/11 When a page is swapped or migrated, metadata associated with the page must be saved so it can be restored later. This patch adds a new function that saves/restores this metadata when updating pte upon a swap/migration. Patch 3/11 SPARC M7 processor adds new fields to control registers to support ADI feature. It also adds a new exception for precise traps on tag mismatch. This patch adds definitions for the new control register fields, new ASIs for ADI and an exception handler for the precise trap on tag mismatch. Patch 4/11 New hypervisor fault types were added by sparc M7 processor to support ADI feature. This patch adds code to handle these fault types for data access exception handler. Patch 5/11 When ADI is in use for a page and a tag mismatch occurs, processor raises "Memory corruption Detected" trap. This patch adds a handler for this trap. Patch 6/11 ADI usage is governed by ADI properties on a platform. These properties are provided to kernel by firmware. Thsi patch adds new auxiliary vectors that provide these values to userpsace. Patch 7/11 arch_validate_prot() is used to validate the new protection bits asked for by the userspace app. Validating protection bits may need the context of address space the bits are being applied to. One such example is PROT_ADI bit on sparc processor that enables ADI protection on an address range. ADI protection applies only to addresses covered by physical RAM and not other PFN mapped addresses or device addresses. This patch adds "address" to the parameters being passed to arch_validate_prot() to provide that context. Patch 8/11 When protection bits are changed on a page, kernel carries forward all protection bits except for read/write/exec. Additional code was added to allow kernel to clear PKEY bits on x86 but this requirement to clear other bits is not unique to x86. This patch extends the existing code to allow other architectures to clear any other protection bits as well on protection bit change. Patch 9/11 When a processor supports additional metadata on memory pages, that additional metadata needs to be copied to new memory pages when those pages are moved. This patch allows architecture specific code to replace the default copy_highpage() routine with arch specific version that copies the metadata as well besides the data on the page. Patch 10/11 This patch adds support for a user space task to enable ADI and enable tag checking for subsets of its address space. As part of enabling this feature, this patch adds to support manipulation of precise exception for memory corruption detection, adds code to save and restore tags on page swap and migration, and adds code to handle ADI tagged addresses for DMA. Patch 11/11 Update signal delivery code in arch/sparc/kernel/traps_64.c to use the new helper function force_sig_fault() added by commit f8ec66014ffd ("signal: Add send_sig_fault and force_sig_fault"). Changelog v12: - Rebased to 4.16-rc2 - Added patch 11 to update signal delivery functions Changelog v11: - Rebased to 4.15 Changelog v10: - Patch 1/10: Updated si_codes definitions for SEGV to match 4.14 - Patch 2/10: No changes - Patch 3/10: Updated copyright - Patch 4/10: No changes - Patch 5/10: No changes - Patch 6/10: Updated copyright - Patch 7/10: No changes - Patch 8/10: No changes - Patch 9/10: No changes - Patch 10/10: Added code to return from kernel path to set PSTATE.mcde if kernel continues execution in another thread (Suggested by Anthony) Changelog v9: - Patch 1/10: No changes - Patch 2/10: No changes - Patch 3/10: No changes - Patch 4/10: No changes - Patch 5/10: No changes - Patch 6/10: No changes - Patch 7/10: No changes - Patch 8/10: No changes - Patch 9/10: New patch - Patch 10/10: Patch 9 from v8. Added code to copy ADI tags when pages are migrated. Updated code to detect overflow and underflow of addresses when allocating tag storage. Changelog v8: - Patch 1/9: No changes - Patch 2/9: Fixed and erroneous "}" - Patch 3/9: Minor print formatting change - Patch 4/9: No changes - Patch 5/9: No changes - Patch 6/9: Added AT_ADI_UEONADI back - Patch 7/9: Added addr parameter to powerpc arch_validate_prot() - Patch 8/9: No changes - Patch 9/9: - Documentation updates - Added an IPI on mprotect(...PROT_ADI...) call and restore of TSTATE.MCDE on context switch - Removed restriction on enabling ADI on read-only memory - Changed kzalloc() for tag storage to use GFP_NOWAIT - Added code to handle overflow and underflow when allocating tag storage - Replaced sun_m7_patch_1insn_range() with sun4v_patch_1insn_range() - Added membar after restoring ADI tags in copy_user_highpage() Changelog v7: - Patch 1/9: No changes - Patch 2/9: Updated parameters to arch specific swap in/out handlers - Patch 3/9: No changes - Patch 4/9: new patch split off from patch 4/4 in v6 - Patch 5/9: new patch split off from patch 4/4 in v6 - Patch 6/9: new patch split off from patch 4/4 in v6 - Patch 7/9: new patch - Patch 8/9: new patch - Patch 9/9: - Enhanced arch_validate_prot() to enable ADI only on writable addresses backed by physical RAM - Added support for saving/restoring ADI tags for each ADI block size address range on a page on swap in/out - copy ADI tags on COW - Updated values for auxiliary vectors to not conflict with values on other architectures to avoid conflict in glibc - Disable same page merging on ADI enabled pages - Enable ADI only on writable addresses backed by physical RAM - Split parts of patch off into separate patches Changelog v6: - Patch 1/4: No changes - Patch 2/4: No changes - Patch 3/4: Added missing nop in the delay slot in sun4v_mcd_detect_precise - Patch 4/4: Eliminated instructions to read and write PSTATE as well as MCDPER and PMCDPER on every access to userspace addresses by setting PSTATE and PMCDPER correctly upon entry into kernel Changelog v5: - Patch 1/4: No changes - Patch 2/4: Replaced set_swp_pte_at() with new architecture functions arch_do_swap_page() and arch_unmap_one() that suppoprt architecture specific actions to be taken on page swap and migration - Patch 3/4: Fixed indentation issues in assembly code - Patch 4/4: - Fixed indentation issues and instrcuctions in assembly code - Removed CONFIG_SPARC64 from mdesc.c - Changed to maintain state of MCDPER register in thread info flags as opposed to in mm context. MCDPER is a per-thread state and belongs in thread info flag as opposed to mm context which is shared across threads. Added comments to clarify this is a lazily maintained state and must be updated on context switch and copy_process() - Updated code to use the new arch_do_swap_page() and arch_unmap_one() functions Testing: - All functionality was tested with 8K normal pages as well as hugepages using malloc, mmap and shm. - Multiple long duration stress tests were run using hugepages over 2+ months. Normal pages were tested with shorter duration stress tests. - Tested swapping with malloc and shm by reducing max memory and allocating three times the available system memory by active processes using ADI on allocated memory. Ran through multiple hours long runs of this test. - Tested page migration with malloc and shm by migrating data pages of active ADI test process using migratepages, back and forth between two nodes every few seconds over an hour long run. Verified page migration through /proc//numa_maps. - Tested COW support using test that forks children that read from ADI enabled pages shared with parent and other children and write to them as well forcing COW. ==================== Signed-off-by: David S. Miller commit b9fa03656b049d2db61c60233d5cde272ade0ac8 Author: Khalid Aziz Date: Wed Feb 21 10:15:53 2018 -0700 sparc64: Update signal delivery to use new helper functions Commit f8ec66014ffd ("signal: Add send_sig_fault and force_sig_fault") added new helper functions to streamline signal delivery. This patch updates signal delivery for new/updated handlers for ADI related exceptions to use the helper function. Signed-off-by: Khalid Aziz Cc: Khalid Aziz Acked-by: "Eric W. Biederman" Signed-off-by: David S. Miller arch/sparc/kernel/traps_64.c | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) commit 74a04967482faa7144b93dae3b2e913870dd421c Author: Khalid Aziz Date: Fri Feb 23 15:46:41 2018 -0700 sparc64: Add support for ADI (Application Data Integrity) ADI is a new feature supported on SPARC M7 and newer processors to allow hardware to catch rogue accesses to memory. ADI is supported for data fetches only and not instruction fetches. An app can enable ADI on its data pages, set version tags on them and use versioned addresses to access the data pages. Upper bits of the address contain the version tag. On M7 processors, upper four bits (bits 63-60) contain the version tag. If a rogue app attempts to access ADI enabled data pages, its access is blocked and processor generates an exception. Please see Documentation/sparc/adi.txt for further details. This patch extends mprotect to enable ADI (TSTATE.mcde), enable/disable MCD (Memory Corruption Detection) on selected memory ranges, enable TTE.mcd in PTEs, return ADI parameters to userspace and save/restore ADI version tags on page swap out/in or migration. ADI is not enabled by default for any task. A task must explicitly enable ADI on a memory range and set version tag for ADI to be effective for the task. Signed-off-by: Khalid Aziz Cc: Khalid Aziz Reviewed-by: Anthony Yznaga Signed-off-by: David S. Miller Documentation/sparc/adi.txt | 278 +++++++++++++++++++++++++++++ arch/sparc/include/asm/mman.h | 84 ++++++++- arch/sparc/include/asm/mmu_64.h | 17 ++ arch/sparc/include/asm/mmu_context_64.h | 51 ++++++ arch/sparc/include/asm/page_64.h | 6 + arch/sparc/include/asm/pgtable_64.h | 46 +++++ arch/sparc/include/asm/thread_info_64.h | 2 +- arch/sparc/include/asm/trap_block.h | 2 + arch/sparc/include/uapi/asm/mman.h | 2 + arch/sparc/kernel/adi_64.c | 301 ++++++++++++++++++++++++++++++++ arch/sparc/kernel/etrap_64.S | 27 ++- arch/sparc/kernel/process_64.c | 25 +++ arch/sparc/kernel/rtrap_64.S | 33 +++- arch/sparc/kernel/setup_64.c | 2 + arch/sparc/kernel/urtt_fill.S | 7 +- arch/sparc/kernel/vmlinux.lds.S | 5 + arch/sparc/mm/gup.c | 37 ++++ arch/sparc/mm/hugetlbpage.c | 14 +- arch/sparc/mm/init_64.c | 69 ++++++++ arch/sparc/mm/tsb.c | 21 +++ include/linux/mm.h | 3 + mm/ksm.c | 4 + 22 files changed, 1028 insertions(+), 8 deletions(-) commit a4602b62d9fdea41412ba765bbf32ecfc2b6a94c Author: Khalid Aziz Date: Wed Feb 21 10:15:51 2018 -0700 mm: Allow arch code to override copy_highpage() Some architectures can support metadata for memory pages and when a page is copied, its metadata must also be copied. Sparc processors from M7 onwards support metadata for memory pages. This metadata provides tag based protection for access to memory pages. To maintain this protection, the tag data must be copied to the new page when a page is migrated across NUMA nodes. This patch allows arch specific code to override default copy_highpage() and copy metadata along with page data upon migration. Signed-off-by: Khalid Aziz Cc: Khalid Aziz Reviewed-by: Anthony Yznaga Acked-by: Andrew Morton Signed-off-by: David S. Miller include/linux/highmem.h | 4 ++++ 1 file changed, 4 insertions(+) commit 2c2d57b5e769956fb36581e0d3cccdb5ea68038f Author: Khalid Aziz Date: Wed Feb 21 10:15:50 2018 -0700 mm: Clear arch specific VM flags on protection change When protection bits are changed on a VMA, some of the architecture specific flags should be cleared as well. An examples of this are the PKEY flags on x86. This patch expands the current code that clears PKEY flags for x86, to support similar functionality for other architectures as well. Signed-off-by: Khalid Aziz Cc: Khalid Aziz Reviewed-by: Anthony Yznaga Acked-by: Andrew Morton Signed-off-by: David S. Miller include/linux/mm.h | 6 ++++++ mm/mprotect.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 9035cf9a97e429e6b5291841da81c433879f5658 Author: Khalid Aziz Date: Wed Feb 21 10:15:49 2018 -0700 mm: Add address parameter to arch_validate_prot() A protection flag may not be valid across entire address space and hence arch_validate_prot() might need the address a protection bit is being set on to ensure it is a valid protection flag. For example, sparc processors support memory corruption detection (as part of ADI feature) flag on memory addresses mapped on to physical RAM but not on PFN mapped pages or addresses mapped on to devices. This patch adds address to the parameters being passed to arch_validate_prot() so protection bits can be validated in the relevant context. Signed-off-by: Khalid Aziz Cc: Khalid Aziz Reviewed-by: Anthony Yznaga Acked-by: Michael Ellerman (powerpc) Acked-by: Andrew Morton Signed-off-by: David S. Miller arch/powerpc/include/asm/mman.h | 4 ++-- arch/powerpc/kernel/syscalls.c | 2 +- include/linux/mman.h | 2 +- mm/mprotect.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit c6202ca764ac7b3728e29bca616567beb57fbac7 Author: Khalid Aziz Date: Wed Feb 21 10:15:48 2018 -0700 sparc64: Add auxiliary vectors to report platform ADI properties ADI feature on M7 and newer processors has three important properties relevant to userspace apps using ADI capabilities - (1) Size of block of memory an ADI version tag applies to, (2) Number of uppermost bits in virtual address used to encode ADI tag, and (3) The value M7 processor will force the ADI tags to if it detects uncorrectable error in an ADI tagged cacheline. Kernel can retrieve these properties for a platform through machine description provided by the firmware. This patch adds code to retrieve these properties and report them to userspace through auxiliary vectors. Signed-off-by: Khalid Aziz Cc: Khalid Aziz Reviewed-by: Anthony Yznaga Signed-off-by: David S. Miller arch/sparc/include/asm/adi.h | 6 +++ arch/sparc/include/asm/adi_64.h | 47 ++++++++++++++++++ arch/sparc/include/asm/elf_64.h | 5 ++ arch/sparc/include/uapi/asm/auxvec.h | 11 +++++ arch/sparc/kernel/Makefile | 1 + arch/sparc/kernel/adi_64.c | 96 ++++++++++++++++++++++++++++++++++++ arch/sparc/kernel/mdesc.c | 2 + 7 files changed, 168 insertions(+) commit 94addb3530bb81e7ffde2c5c50a88310f734c365 Author: Khalid Aziz Date: Wed Feb 21 10:15:47 2018 -0700 sparc64: Add handler for "Memory Corruption Detected" trap M7 and newer processors add a "Memory corruption Detected" trap with the addition of ADI feature. This trap is vectored into kernel by HV through resumable error trap with error attribute for the resumable error set to 0x00000800. Signed-off-by: Khalid Aziz Cc: Khalid Aziz Reviewed-by: Anthony Yznaga Signed-off-by: David S. Miller arch/sparc/kernel/traps_64.c | 59 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 52df948d1bff7954f416085a821e299a188424b8 Author: Khalid Aziz Date: Wed Feb 21 10:15:46 2018 -0700 sparc64: Add HV fault type handlers for ADI related faults ADI (Application Data Integrity) feature on M7 and newer processors adds new fault types for hypervisor - Invalid ASI and MCD disabled. This patch expands data access exception handler to handle these faults. Signed-off-by: Khalid Aziz Cc: Khalid Aziz Reviewed-by: Anthony Yznaga Signed-off-by: David S. Miller arch/sparc/kernel/traps_64.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 750375003deae240967eed6b13529a4bfc8ca11e Author: Khalid Aziz Date: Wed Feb 21 10:15:45 2018 -0700 sparc64: Add support for ADI register fields, ASIs and traps SPARC M7 processor adds new control register fields, ASIs and a new trap to support the ADI (Application Data Integrity) feature. This patch adds definitions for these register fields, ASIs and a handler for the new precise memory corruption detected trap. Signed-off-by: Khalid Aziz Cc: Khalid Aziz Reviewed-by: Anthony Yznaga Signed-off-by: David S. Miller arch/sparc/include/asm/hypervisor.h | 2 ++ arch/sparc/include/asm/pgtable_64.h | 2 ++ arch/sparc/include/asm/ttable.h | 10 +++++++ arch/sparc/include/uapi/asm/asi.h | 5 ++++ arch/sparc/include/uapi/asm/pstate.h | 10 +++++++ arch/sparc/kernel/entry.h | 3 ++ arch/sparc/kernel/head_64.S | 1 + arch/sparc/kernel/sun4v_mcd.S | 18 ++++++++++++ arch/sparc/kernel/traps_64.c | 54 ++++++++++++++++++++++++++++++++++++ arch/sparc/kernel/ttable_64.S | 6 ++-- 10 files changed, 109 insertions(+), 2 deletions(-) commit ca827d55ebaa24de9fca36ee24e42d6fc5119ee3 Author: Khalid Aziz Date: Wed Feb 21 10:15:44 2018 -0700 mm, swap: Add infrastructure for saving page metadata on swap If a processor supports special metadata for a page, for example ADI version tags on SPARC M7, this metadata must be saved when the page is swapped out. The same metadata must be restored when the page is swapped back in. This patch adds two new architecture specific functions - arch_do_swap_page() to be called when a page is swapped in, and arch_unmap_one() to be called when a page is being unmapped for swap out. These architecture hooks allow page metadata to be saved if the architecture supports it. Signed-off-by: Khalid Aziz Cc: Khalid Aziz Acked-by: Jerome Marchand Reviewed-by: Anthony Yznaga Acked-by: Andrew Morton Signed-off-by: David S. Miller include/asm-generic/pgtable.h | 36 ++++++++++++++++++++++++++++++++++++ mm/memory.c | 1 + mm/rmap.c | 14 ++++++++++++++ 3 files changed, 51 insertions(+) commit d84bb709aa4a6a155b1aaaf449cad21f02be4594 Author: Khalid Aziz Date: Wed Feb 21 10:15:43 2018 -0700 signals, sparc: Add signal codes for ADI violations SPARC M7 processor introduces a new feature - Application Data Integrity (ADI). ADI allows MMU to catch rogue accesses to memory. When a rogue access occurs, MMU blocks the access and raises an exception. In response to the exception, kernel sends the offending task a SIGSEGV with si_code that indicates the nature of exception. This patch adds three new signal codes specific to ADI feature: 1. ADI is not enabled for the address and task attempted to access memory using ADI 2. Task attempted to access memory using wrong ADI tag and caused a deferred exception. 3. Task attempted to access memory using wrong ADI tag and caused a precise exception. Signed-off-by: Khalid Aziz Cc: Khalid Aziz Reviewed-by: Anthony Yznaga Acked-by: "Eric W. Biederman" Signed-off-by: David S. Miller arch/x86/kernel/signal_compat.c | 2 +- include/uapi/asm-generic/siginfo.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) commit be5acd246daa04edad9d758b8be37e5e2f989243 Author: Arvind Yadav Date: Thu Mar 8 15:06:08 2018 +0530 rpmsg: smd: use put_device() if device_register fail if device_register() returned an error! Always use put_device() to give up the reference initialized. unregister device for other return error. Signed-off-by: Arvind Yadav Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_smd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a9011726c4bb37e5d6a7279bf47fcc19cd9d3e1a Author: Arvind Yadav Date: Thu Mar 8 15:06:07 2018 +0530 rpmsg: glink: use put_device() if device_register fail if device_register() returned an error! Always use put_device() to give up the reference initialized. And unregister device for other return error. Signed-off-by: Arvind Yadav Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_smem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 76f38f1f3cf8f81be3c18ecb7a65dd74afb05851 Author: Andrew Lunn Date: Sat Mar 17 20:21:09 2018 +0100 net: dsa: mv88e6xxx: Fix IRQ when loading module Handle polled interrupts correctly when loading the module. Signed-off-by: Andrew Lunn Fixes: 294d711ee8c0 ("net: dsa: mv88e6xxx: Poll when no interrupt defined") Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 202fbf4865e97b64ca2d94b7dc1a4efd6f7b0729 Author: Arnd Bergmann Date: Tue Mar 13 14:15:42 2018 +0100 of: unittest: move misplaced function declaration The overlay_data_apply() declaration is outside of the #ifdef that contains both the user and the definition, causing a compile-time warning in some configurations: drivers/of/unittest.c:48:19: error: 'overlay_data_apply' declared 'static' but never defined [-Werror=unused-function] static int __init overlay_data_apply(const char *overlay_name, int *overlay_id); This moves the declaration into the #ifdef section. Fixes: 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT") Signed-off-by: Arnd Bergmann Signed-off-by: Rob Herring drivers/of/unittest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3661daa66f07b06bccfbf48c8608dd5ceb7f30b1 Merge: fe2d55d 1fad59e Author: David S. Miller Date: Sat Mar 17 20:15:14 2018 -0400 Merge branch 'selftests-pmtu-Add-further-vti-vti6-MTU-and-PMTU-tests' Stefano Brivio says: ==================== selftests: pmtu: Add further vti/vti6 MTU and PMTU tests Patches 5/10 to 10/10 add tests to verify default MTU assignment for vti4 and vti6 interfaces, to check that MTU values set on new link and link changes are properly taken and validated, and to verify PMTU exceptions on vti4 interfaces. Patch 1/10 reverses function return codes as suggested by David Ahern. Patch 2/10 fixes the helper to fetch exceptions MTU to run in the passed namespace. Patches 3/10 and 4/10 are preparation work to make it easier to introduce those tests. v2: Reverse return codes, and make output prettier in 4/9 by using padded printf, test descriptions and buffered error strings. Remove accidental output to /dev/kmsg from 10/10 (was 9/9). ==================== Signed-off-by: David S. Miller commit 1fad59ea1c34b14f080725fc4cdfc6160651e371 Author: Stefano Brivio Date: Sat Mar 17 02:31:47 2018 +0100 selftests: pmtu: Add pmtu_vti6_link_change_mtu test This test checks that MTU configured from userspace is used on link creation and changes, and that when it's not passed from userspace, it's calculated properly from the MTU of the lower layer. Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 67 +++++++++++++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 6 deletions(-) commit 8b6022fc7839e3ba2255bb264b16b0fffe961212 Author: Stefano Brivio Date: Sat Mar 17 02:31:46 2018 +0100 selftests: pmtu: Add pmtu_vti6_link_add_mtu test Same as pmtu_vti4_link_add_mtu test, but for IPv6. Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 44 ++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) commit 719e121574497436e39536c2a888b901fbe30cfe Author: Stefano Brivio Date: Sat Mar 17 02:31:45 2018 +0100 selftests: pmtu: Add pmtu_vti4_link_add_mtu test This test checks that MTU given on vti link creation is actually configured, and that tunnel is not created with an invalid MTU value. Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 45 ++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) commit 5e84430bb83e8241c485ccce728ff5e5e80789eb Author: Stefano Brivio Date: Sat Mar 17 02:31:44 2018 +0100 selftests: pmtu: Add test_pmtu_vti4_exception test This test checks that PMTU exceptions are created only when needed on IPv4 routes with vti and xfrm, and their PMTU value is checked as well. We can't adopt the same approach as test_pmtu_vti6_exception() here, because on IPv4 administrative MTU changes won't be reflected directly on PMTU. Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 80 ++++++++++++++++++++++++++++++++----- 1 file changed, 70 insertions(+), 10 deletions(-) commit 35b49424b8a49edb6de6e7ec54bd8edb568031c2 Author: Stefano Brivio Date: Sat Mar 17 02:31:43 2018 +0100 selftests: pmtu: Add pmtu_vti6_default_mtu test Same as pmtu_vti4_default_mtu, but on IPv6 with vti6. Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit a41c789bdcc1e3d8fe0d82ee80c22aa4f4508004 Author: Stefano Brivio Date: Sat Mar 17 02:31:42 2018 +0100 selftests: pmtu: Add pmtu_vti4_default_mtu test This test checks that the MTU assigned by default to a vti (IPv4) interface created on top of veth is simply veth's MTU minus the length of the encapsulated IPv4 header. Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 86 +++++++++++++++++++++++++++++++------ 1 file changed, 73 insertions(+), 13 deletions(-) commit 36455bd1e977ef1ccd8e89018bd14d0a5b96b4e5 Author: Stefano Brivio Date: Sat Mar 17 02:31:41 2018 +0100 selftests: pmtu: Introduce support for multiple tests Introduce list of tests and their descriptions, and loop on it in main body. Tests will now just take care of calling setup with a list of "units" they need, and return 0 on success, 1 on failure, 2 if the test had to be skipped. Main script body will take care of displaying results and cleaning up after every test. Introduce guard variable so that we don't clean up twice in case of interrupts or unexpected failures. The pmtu_vti6_exception test can now run its third step even if the previous one failed, as we can return values from it. Also introduce support to display test descriptions, and display aligned OK/FAIL/SKIP test outcomes. Buffer error strings so that in case of failure we can display them right under the outcome for each test. Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 87 ++++++++++++++++++++++++++----------- 1 file changed, 61 insertions(+), 26 deletions(-) commit f2c929feeccd3d56be284b9e24e04cd3c4779a4f Author: Stefano Brivio Date: Sat Mar 17 02:31:40 2018 +0100 selftests: pmtu: Factor out MTU parsing helper ...so that it can be used for any iproute command output. Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 822d2f86c485113dc5df7648e97aaef3607c4479 Author: Stefano Brivio Date: Sat Mar 17 02:31:39 2018 +0100 selftests: pmtu: Use namespace command prefix to fetch route mtu In 7af137b72131 ("selftests: net: Introduce first PMTU test") I accidentally assumed route_get_* helpers would run from a single namespace. Make them a bit more generic, by passing the namespace command prefix as a parameter instead. Fixes: 7af137b72131 ("selftests: net: Introduce first PMTU test") Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 380e29a6b71fac7ce7a437ab2f7e305c3de8076f Author: Stefano Brivio Date: Sat Mar 17 02:31:38 2018 +0100 selftests: pmtu: Reverse return codes of functions David suggests it's more intuitive to return non-zero on failures, and zero on success. No need to introduce tail 'return 0' in functions, they will return the exit code of the last command anyway. Suggested-by: David Ahern Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit fe2d55d295cf70d5b1f1f1217cfa771bf5eb3f7f Merge: d47d08c 76c15c9 Author: David S. Miller Date: Sat Mar 17 20:12:40 2018 -0400 Merge branch 'ibmvnic-Update-TX-pool-and-TX-routines' Thomas Falcon says: ==================== ibmvnic: Update TX pool and TX routines This patch restructures the TX pool data structure and provides a separate TX pool array for TSO transmissions. This is already used in some way due to our unique DMA situation, namely that we cannot use single DMA mappings for packet data. Previously, both buffer arrays used the same pool entry. This restructuring allows for some additional cleanup in the driver code, especially in some places in the device transmit routine. In addition, it allows us to more easily track the consumer and producer indexes of a particular pool. This has been further improved by better tracking of in-use buffers to prevent possible data corruption in case an invalid buffer entry is used. v5: Fix bisectability mistake in the first patch. Removed TSO-specific data in a later patch when it is no longer used. v4: Fix error in 7th patch that causes an oops by using the older fixed value for number of buffers instead of the respective field in the tx pool data structure v3: Forgot to update TX pool cleaning function to handle new data structures. Included 7th patch for that. v2: Fix typo in 3/6 commit subject line ==================== Signed-off-by: David S. Miller commit 76c15c911b8115e565bfe3a5161a8d58b0be2d28 Author: Thomas Falcon Date: Fri Mar 16 20:00:31 2018 -0500 ibmvnic: Remove unused TSO resources in TX pool structure Finally, remove the TSO-specific fields in the TX pool strcutures. These are no longer needed with the introduction of separate buffer pools for TSO transmissions. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.h | 2 -- 1 file changed, 2 deletions(-) commit e9e1e97884b7b65e5ab0666e549e54035238fd4e Author: Thomas Falcon Date: Fri Mar 16 20:00:30 2018 -0500 ibmvnic: Update TX pool cleaning routine Update routine that cleans up any outstanding transmits that have not received completions when the device needs to close. Introduces a helper function that cleans one TX pool to make code more readable. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 40 +++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 16 deletions(-) commit 86b61a5f2e39bbee254aa4d2c5445059c7656f98 Author: Thomas Falcon Date: Fri Mar 16 20:00:29 2018 -0500 ibmvnic: Improve TX buffer accounting Improve TX pool buffer accounting to prevent the producer index from overruning the consumer. First, set the next free index to an invalid value if it is in use. If next buffer to be consumed is in use, drop the packet. Finally, if the transmit fails for some other reason, roll back the consumer index and set the free map entry to its original value. This should also be done if the DMA map fails. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit 06b3e35788a4c6f0afa931b6251ecfe20ce4787b Author: Thomas Falcon Date: Fri Mar 16 20:00:28 2018 -0500 ibmvnic: Update TX and TX completion routines Update TX and TX completion routines to account for TX pool restructuring. TX routine first chooses the pool depending on whether a packet is GSO or not, then uses it accordingly. For the completion routine to know which pool it needs to use, set the most significant bit of the correlator index to one if the packet uses the TSO pool. On completion, unset the bit and use the correlator index to release the buffer pool entry. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 55 +++++++++++++++++++------------------- drivers/net/ethernet/ibm/ibmvnic.h | 1 + 2 files changed, 29 insertions(+), 27 deletions(-) commit 3205306c6b8d5a8ede1d8222c9db6009b399299a Author: Thomas Falcon Date: Fri Mar 16 20:00:27 2018 -0500 ibmvnic: Update TX pool initialization routine Introduce function that initializes one TX pool. Use that to create each pool entry in both the standard TX pool and TSO pool arrays. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 90 ++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 42 deletions(-) commit fb79421c3c37f391efbe98258c930111e53590a1 Author: Thomas Falcon Date: Fri Mar 16 20:00:26 2018 -0500 ibmvnic: Update release TX pool routine Introduce function that frees one TX pool. Use that to release each pool in both the standard TX pool and TSO pool arrays. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit e26dc25bc0b6f66b51d740af03962a30ee33ca7e Author: Thomas Falcon Date: Fri Mar 16 20:00:25 2018 -0500 ibmvnic: Update and clean up reset TX pool routine Update TX pool reset routine to accommodate new TSO pool array. Introduce a function that resets one TX pool, and use that function to initialize each pool in both pool arrays. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 45 +++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 20 deletions(-) commit 4bd95a51b6e32c3267b8beb097bd719380147d36 Author: Thomas Falcon Date: Fri Mar 16 20:00:24 2018 -0500 ibmvnic: Generalize TX pool structure Remove some unused fields in the structure and include values describing the individual buffer size and number of buffers in a TX pool. This allows us to use these fields for TX pool buffer accounting as opposed to using hard coded values. Include a new pool array for TSO transmissions. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d47d08c8ca052df3d9fde7cfff518660335b16e7 Author: Al Viro Date: Fri Mar 16 23:32:51 2018 +0000 sctp: use proc_remove_subtree() use proc_remove_subtree() for subtree removal, both on setup failure halfway through and on teardown. No need to make simple things complex... Signed-off-by: Al Viro Signed-off-by: David S. Miller include/net/sctp/sctp.h | 11 +----- net/sctp/objcnt.c | 8 ----- net/sctp/proc.c | 90 ++++++++++++------------------------------------- net/sctp/protocol.c | 59 ++++---------------------------- 4 files changed, 28 insertions(+), 140 deletions(-) commit 90e2c7a1248d422cb21665ff6da52442c245963d Merge: a3a41d2 ec96638 Author: David S. Miller Date: Sat Mar 17 20:10:27 2018 -0400 Merge branch 'hv_netvsc-minor-enhancements' Stephen Hemminger says: ==================== hv_netvsc: minor enhancements A couple of small things for net-next ==================== Signed-off-by: David S. Miller commit ec9663812f32c03e36c8c2ccc83e52dd5a7486d9 Author: Stephen Hemminger Date: Fri Mar 16 15:44:28 2018 -0700 hv_netvsc: add trace points This adds tracepoints to the driver which has proved useful in debugging startup and shutdown race conditions. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/Makefile | 2 +- drivers/net/hyperv/netvsc.c | 26 +++++- drivers/net/hyperv/netvsc_trace.c | 7 ++ drivers/net/hyperv/netvsc_trace.h | 182 ++++++++++++++++++++++++++++++++++++++ drivers/net/hyperv/rndis_filter.c | 5 ++ 5 files changed, 220 insertions(+), 2 deletions(-) commit 0e96460e620df7f9a13c352b68b06f02eec3de94 Author: Stephen Hemminger Date: Fri Mar 16 15:44:27 2018 -0700 hv_netvsc: pass netvsc_device to rndis halt The caller has a valid pointer, pass it to rndis_filter_halt_device and avoid any possible RCU races here. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/rndis_filter.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit d4b9e425d23a2c38e2cc52f62c79773ccff0ecc4 Author: Tobin C. Harding Date: Mon Mar 12 15:27:23 2018 +1100 of: unittest: Remove VLA stack usage The kernel would like to have all stack VLA usage removed[1]. This is a test function so the execution speed is not critical. We can allocate memory for this buffer instead of using a VLA. If kmalloc() fails just return. Allocate buffer with kmalloc(). [1]: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Tobin C. Harding Signed-off-by: Rob Herring drivers/of/unittest.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit a3a41d2f9487469364aeafae0f63d39c2e7179fd Author: Grygorii Strashko Date: Thu Mar 15 15:15:50 2018 -0500 net: ethernet: ti: cpsw: enable vlan rx vlan offload In VLAN_AWARE mode CPSW can insert VLAN header encapsulation word on Host port 0 egress (RX) before the packet data if RX_VLAN_ENCAP bit is set in CPSW_CONTROL register. VLAN header encapsulation word has following format: HDR_PKT_Priority bits 29-31 - Header Packet VLAN prio (Highest prio: 7) HDR_PKT_CFI bits 28 - Header Packet VLAN CFI bit. HDR_PKT_Vid bits 27-16 - Header Packet VLAN ID PKT_Type bits 8-9 - Packet Type. Indicates whether the packet is VLAN-tagged, priority-tagged, or non-tagged. 00: VLAN-tagged packet 01: Reserved 10: Priority-tagged packet 11: Non-tagged packet This feature can be used to implement TX VLAN offload in case of VLAN-tagged packets and to insert VLAN tag in case Non-tagged packet was received on port with PVID set. As per documentation, CPSW never modifies packet data on Host egress (RX) and as result, without this feature enabled, Host port will not be able to receive properly packets which entered switch non-tagged through external Port with PVID set (when non-tagged packet forwarded from external Port with PVID set to another external Port - packet will be VLAN tagged properly). Implementation details: - on RX driver will check CPDMA status bit RX_VLAN_ENCAP BIT(19) in CPPI descriptor to identify when VLAN header encapsulation word is present. - PKT_Type = 0x01 or 0x02 then ignore VLAN header encapsulation word and pass packet as is; - if HDR_PKT_Vid = 0 then ignore VLAN header encapsulation word and pass packet as is; - In dual mac mode traffic is separated between ports using default port vlans, which are not be visible to Host and so should not be reported. Hence, check for default port vlans in dual mac mode and ignore VLAN header encapsulation word; - otherwise fill SKB with VLAN info using __vlan_hwaccel_put_tag(); - PKT_Type = 0x00 (VLAN-tagged) then strip out VLAN header from SKB. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 67 +++++++++++++++++++++++++++++++-- drivers/net/ethernet/ti/davinci_cpdma.c | 2 +- drivers/net/ethernet/ti/davinci_cpdma.h | 2 + 3 files changed, 67 insertions(+), 4 deletions(-) commit a514266ba675b28ff223ecd1fc431810ec828337 Author: Geert Uytterhoeven Date: Fri Mar 9 11:44:47 2018 +0100 of: overlay: Fix forgotten reference to of_overlay_apply() While technically the ovcs_id is still returned by of_overlay_apply(), this is an internal function. All public callers of of_overlay_remove() pass an ovcs_id returned by the public function of_overlay_fdt_apply(). Fixes: 39a751a4cb7e4798 ("of: change overlay apply input data from unflattened to FDT") Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring drivers/of/overlay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0843e61690c1d107b92234ee5c1cf6a65293d9d Author: Geert Uytterhoeven Date: Fri Mar 9 11:44:46 2018 +0100 of: Documentation: Fix forgotten reference to of_overlay_apply() Fixes: 93a6039000b5acab ("of: Documentation: of_overlay_apply() replaced by of_overlay_fdt_apply()") Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring Documentation/devicetree/overlay-notes.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d58109dcf37fc9baec354385ec9fdcd8878d174d Author: Fabrice Gasnier Date: Tue Mar 13 15:23:06 2018 +0100 iio: adc: stm32-dfsdm: fix sample rate for div2 spi clock When channel clk source is set to "CLKOUT_F" or "CLKOUT_R" (e.g. div2), sample rate is currently set to half the requested value. Fixes: eca949800d2d ("IIO: ADC: add stm32 DFSDM support for PDM microphone") Signed-off-by: Fabrice Gasnier Acked-by: Arnaud Pouliquen Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-dfsdm-adc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 7531cf59bfa082769887ec70c2029838ea139f11 Author: Fabrice Gasnier Date: Tue Mar 13 15:23:05 2018 +0100 iio: adc: stm32-dfsdm: fix successive oversampling settings When doing successive oversampling settings, it may fail to update filter parameters silently: - First time oversampling is being set, it will be successful, as fl->res is 0 initially. - Next attempts with various oversamp value may return 0 (success), but keep previous filter parameters, due to 'res' never reaches above or equal current 'fl->res'. This is particularly true when setting sampling frequency (that relies on oversamp). Typical failure without error: - run 1st test @16kHz samp freq will succeed - run new test @8kHz will succeed as well - run new test @16kHz (again): sample rate will remain 8kHz without error Fixes: e2e6771c6462 ("IIO: ADC: add STM32 DFSDM sigma delta ADC support") Signed-off-by: Fabrice Gasnier Acked-by: Arnaud Pouliquen Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-dfsdm-adc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d7cb44496a9bb458632cb3c18acb08949c210448 Author: Arjun Vynipadath Date: Thu Mar 15 17:34:14 2018 +0530 cxgb4: Fix queue free path of ULD drivers Setting sge_uld_rxq_info to NULL in free_queues_uld(). We are referencing sge_uld_rxq_info in cxgb_up(). This will fix a panic when interface is brought up after a ULDq creation failure. Fixes: 94cdb8bb993a (cxgb4: Add support for dynamic allocation of resources for ULD) Signed-off-by: Arjun Vynipadath Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudhar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 1 + 1 file changed, 1 insertion(+) commit 53d0e83f9329aa51dcc205b514dbee05cb4df309 Author: Sowmini Varadhan Date: Thu Mar 15 03:54:26 2018 -0700 rds: tcp: must use spin_lock_irq* and not spin_lock_bh with rds_tcp_conn_lock rds_tcp_connection allocation/free management has the potential to be called from __rds_conn_create after IRQs have been disabled, so spin_[un]lock_bh cannot be used with rds_tcp_conn_lock. Bottom-halves that need to synchronize for critical sections protected by rds_tcp_conn_lock should instead use rds_destroy_pending() correctly. Reported-by: syzbot+c68e51bb5e699d3f8d91@syzkaller.appspotmail.com Fixes: ebeeb1ad9b8a ("rds: tcp: use rds_destroy_pending() to synchronize netns/module teardown and rds connection/workq management") Signed-off-by: Sowmini Varadhan Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/tcp.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 3008ba5faa7a63bac2227c56b533c08fa6d54a0b Merge: 4f1aec0 e50e73e Author: David S. Miller Date: Sat Mar 17 17:11:47 2018 -0400 Merge branch 'tipc-obsolete-zone-concept' Jon Maloy says: ==================== tipc: obsolete zone concept Functionality related to the 'zone' concept was never implemented in TIPC. In this series we eliminate the remaining traces of it in the code, and can hence take a first step in reducing the footprint and complexity of the binding table. ==================== Signed-off-by: David S. Miller commit e50e73e10757ac86fcb1aaa986055049e060727a Author: Jon Maloy Date: Thu Mar 15 16:48:55 2018 +0100 tipc: some name changes We rename some lists and fields in struct publication both to make the naming more consistent and to better reflect their roles. We also update the descriptions of those lists. node_list -> local_publ cluster_list -> all_publ pport_list -> binding_sock ref -> port There are no functional changes in this commit. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/name_distr.c | 12 ++--- net/tipc/name_distr.h | 2 +- net/tipc/name_table.c | 143 ++++++++++++++++++++++++-------------------------- net/tipc/name_table.h | 38 ++++++++------ net/tipc/socket.c | 14 ++--- 5 files changed, 106 insertions(+), 103 deletions(-) commit 935439cc48ef24f0e50396be3684a0f27e609363 Author: Jon Maloy Date: Thu Mar 15 16:48:54 2018 +0100 tipc: merge two lists in struct publication The size of struct publication can be reduced further. Membership in lists 'nodesub_list' and 'local_list' is mutually exlusive, in that remote publications use the former and local publications the latter. We replace the two lists with one single, named 'binding_node' which reflects what it really is. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/name_distr.c | 20 ++++++++++---------- net/tipc/name_table.h | 5 ++--- 2 files changed, 12 insertions(+), 13 deletions(-) commit ba765ec63786583e210b55073a908a9d7ea284fa Author: Jon Maloy Date: Thu Mar 15 16:48:53 2018 +0100 tipc: remove zone_list member in struct publication As a further consequence of the previous commits, we can also remove the member 'zone_list 'in struct name_info and struct publication. Instead, we now let the member cluster_list take over the role a container of all publications of a given . We also remove the counters for the size of those lists, since they don't serve any purpose. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/name_table.c | 101 ++++++++++++++------------------------------------ net/tipc/name_table.h | 5 +-- 2 files changed, 30 insertions(+), 76 deletions(-) commit 64a52b26d5633d6efc35cdf1e0c627cc4189e55a Author: Jon Maloy Date: Thu Mar 15 16:48:52 2018 +0100 tipc: remove zone publication list in name table As a consequence of the previous commit we nan now eliminate zone scope related lists in the name table. We start with name_table::publ_list[3], which can now be replaced with two lists, one for node scope publications and one for cluster scope publications. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/core.h | 5 +++++ net/tipc/name_distr.c | 39 ++++++++++++++++++--------------------- net/tipc/name_table.c | 5 ++--- net/tipc/name_table.h | 6 ++++-- 4 files changed, 29 insertions(+), 26 deletions(-) commit 928df1880e24bcd47d6359ff86df24db3dfba3c3 Author: Jon Maloy Date: Thu Mar 15 16:48:51 2018 +0100 tipc: obsolete TIPC_ZONE_SCOPE Publications for TIPC_CLUSTER_SCOPE and TIPC_ZONE_SCOPE are in all aspects handled the same way, both on the publishing node and on the receiving nodes. Despite previous ambitions to the contrary, this is never going to change, so we take the conseqeunce of this and obsolete TIPC_ZONE_SCOPE and related macros/functions. Whenever a user is doing a bind() or a sendmsg() attempt using ZONE_SCOPE we translate this internally to CLUSTER_SCOPE, while we remain compatible with users and remote nodes still using ZONE_SCOPE. Furthermore, the non-formalized scope value 0 has always been permitted for use during lookup, with the same meaning as ZONE_SCOPE/CLUSTER_SCOPE. We now permit it even as binding scope, but for compatibility reasons we choose to not change the value of TIPC_CLUSTER_SCOPE. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller include/uapi/linux/tipc.h | 102 ++++++++++++++++++++++++---------------------- net/tipc/addr.c | 31 -------------- net/tipc/addr.h | 10 +++++ net/tipc/msg.c | 2 +- net/tipc/name_table.c | 3 +- net/tipc/net.c | 2 +- net/tipc/socket.c | 15 ++++--- 7 files changed, 77 insertions(+), 88 deletions(-) commit 4f1aec01fcb84faf79bb6fabb82a5c850b186e03 Merge: 5379457 6c77e79 Author: David S. Miller Date: Sat Mar 17 17:07:40 2018 -0400 Merge branch 'pernet-convert-part8' Kirill Tkhai says: ==================== Converting pernet_operations (part #8) this series continues to review and to convert pernet_operations to make them possible to be executed in parallel for several net namespaces at the same time. There are different operations over the tree, mostly are ipvs. ==================== Signed-off-by: David S. Miller commit 6c77e79557acd9b3b896a8075a19ef11ed887a99 Author: Kirill Tkhai Date: Thu Mar 15 12:11:44 2018 +0300 net: Convert ip_vs_ftp_ops These pernet_operations register and unregister ipvs app. register_ip_vs_app(), unregister_ip_vs_app() and register_ip_vs_app_inc() modify per-net structures, and there are no global structures touched. So, this looks safe to be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/ipvs/ip_vs_ftp.c | 1 + 1 file changed, 1 insertion(+) commit d0edfbb4ba4a88399c169cf2c26b252d39f503bc Author: Kirill Tkhai Date: Thu Mar 15 12:11:35 2018 +0300 net: Convert ipvs_core_dev_ops Exit method stops two per-net threads and cancels delayed work. Everything looks nicely per-net divided. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/ipvs/ip_vs_core.c | 1 + 1 file changed, 1 insertion(+) commit 554855ccdf37262def7fed557a5efec39f2c0f47 Author: Kirill Tkhai Date: Thu Mar 15 12:11:25 2018 +0300 net: Convert ipvs_core_ops These pernet_operations register and unregister nf hooks, /proc entries, sysctl, percpu statistics. There are several global lists, and the only list modified without exclusive locks is ip_vs_conn_tab in ip_vs_conn_flush(). We iterate the list and force the timers expire at the moment. Since there were possible several timer expirations before this patch, and since they are safe, the patch does not invent new parallelism of their destruction. These pernet_operations look safe to be converted. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/ipvs/ip_vs_core.c | 1 + 1 file changed, 1 insertion(+) commit ec716650a750334cd763024597159eea3569e207 Author: Kirill Tkhai Date: Thu Mar 15 12:11:16 2018 +0300 net: Convert ovs_net_ops These pernet_operations initialize and destroy net_generic() data pointed by ovs_net_id. Exit method destroys vports from alive net to exiting net. Since they are only pernet_operations interested in this data, and exit method is executed under exclusive global lock (ovs_mutex), they are safe to be executed in parallel. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/openvswitch/datapath.c | 1 + 1 file changed, 1 insertion(+) commit 8cec2f49dc413d6328067d22862b0bdd0f4305ec Author: Kirill Tkhai Date: Thu Mar 15 12:11:06 2018 +0300 net: Convert mpls_net_ops These pernet_operations register and unregister sysctl table. Exit methods frees platform_labels from net::mpls::platform_label. Everything is per-net, and they looks safe to be marked async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/mpls/af_mpls.c | 1 + 1 file changed, 1 insertion(+) commit 489b30b53f0540b9f8e391cbb2839cea48b5d1c1 Author: Kirill Tkhai Date: Thu Mar 15 12:10:57 2018 +0300 net: Convert l2tp_net_ops Init method is rather simple. Exit method queues del_work for every tunnel from per-net list. This seems to be safe to be marked async. Signed-off-by: Kirill Tkhai Acked-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 1 + 1 file changed, 1 insertion(+) commit e349d7d08e7044caf37a36409305edbd5af013c7 Author: George Cherian Date: Tue Feb 27 13:26:19 2018 +0000 i2c: xlp9xx: Handle NACK on DATA properly In case we receive NACK on DATA we shouldn't be resetting the controller, rather we should issue STOP command. This will terminate the current transaction and -EIO is returned. While at that handle the SMBus Quick Command properly. We shouldn't be setting the XLP9XX_I2C_CMD_READ/WRITE for such transactions. Signed-off-by: George Cherian Reviewed-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xlp9xx.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit d3898a78521cd383d287b3ed5683f914c48c3be9 Author: George Cherian Date: Tue Feb 27 13:26:18 2018 +0000 i2c: xlp9xx: Check for Bus state before every transfer I2C bus enters the STOP condition after the DATA_DONE interrupt is raised. Essentially the driver should be checking the bus state before sending any transaction. In case a transaction is initiated while the bus is busy, the prior transaction's stop condition is not achieved. Add the check to make sure the bus is not busy before every transaction. Signed-off-by: George Cherian Reviewed-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xlp9xx.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 7a20e707aae2562ad1e6fc39bbc0fa9fd47a6390 Author: Alexander Monakov Date: Thu Mar 8 16:23:53 2018 +0300 i2c: designware: suppress unneeded SDA hold time warnings The hardware may not support SDA hold time configuration, but if it is not set in the Device Tree either, there is no need to print a warning. Reported-by: Thomas Petazzoni Signed-off-by: Alexander Monakov Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52c5e62d4c4beecddc6e1b8045ce1d695fca1ba7 Author: Christoph Hellwig Date: Wed Mar 14 16:56:53 2018 +0100 block: bio_check_eod() needs to consider partitions bio_check_eod() should check partition size not the whole disk if bio->bi_partno is non-zero. Do this by moving the call to bio_check_eod() into blk_partition_remap(). Based on an earlier patch from Jiufei Xue. Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") Reported-by: Jiufei Xue Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 93 ++++++++++++++++++++++++-------------------------------- 1 file changed, 40 insertions(+), 53 deletions(-) commit 233bde21aa43516baa013ef7ac33f3427056db3e Author: Bart Van Assche Date: Wed Mar 14 15:48:06 2018 -0700 block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into It happens often while I'm preparing a patch for a block driver that I'm wondering: is a definition of SECTOR_SIZE and/or SECTOR_SHIFT available for this driver? Do I have to introduce definitions of these constants before I can use these constants? To avoid this confusion, move the existing definitions of SECTOR_SIZE and SECTOR_SHIFT into the header file such that these become available for all block drivers. Make the SECTOR_SIZE definition in the uapi msdos_fs.h header file conditional to avoid that including that header file after causes the compiler to complain about a SECTOR_SIZE redefinition. Note: the SECTOR_SIZE / SECTOR_SHIFT / SECTOR_BITS definitions have not been removed from uapi header files nor from NAND drivers in which these constants are used for another purpose than converting block layer offsets and sizes into a number of sectors. Cc: David S. Miller Cc: Mike Snitzer Cc: Dan Williams Cc: Minchan Kim Cc: Nitin Gupta Reviewed-by: Sergey Senozhatsky Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe arch/xtensa/platforms/iss/simdisk.c | 1 - drivers/block/brd.c | 1 - drivers/block/null_blk.c | 2 -- drivers/block/rbd.c | 9 -------- drivers/block/zram/zram_drv.h | 1 - drivers/ide/ide-cd.c | 8 +++---- drivers/ide/ide-cd.h | 6 +----- drivers/nvdimm/nd.h | 1 - drivers/scsi/gdth.h | 3 --- include/linux/blkdev.h | 42 +++++++++++++++++++++++++++---------- include/linux/device-mapper.h | 2 -- include/linux/ide.h | 1 - include/uapi/linux/msdos_fs.h | 2 ++ 13 files changed, 38 insertions(+), 41 deletions(-) commit ec6dcf63c55c8b09b44fe5990082b07baf139c69 Author: Bart Van Assche Date: Fri Mar 16 10:31:11 2018 -0700 blk-mq-debugfs: Show more request state information Since commit 634f9e4631a8 ("blk-mq: remove REQ_ATOM_COMPLETE usages from blk-mq") blk_rq_is_complete() only reports whether or not a request has completed for legacy queues. Hence modify the blk-mq-debugfs code such that it shows the blk-mq request state again. Fixes: 634f9e4631a8 ("blk-mq: remove REQ_ATOM_COMPLETE usages from blk-mq") Signed-off-by: Bart Van Assche Cc: Tejun Heo Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 490fba90a90eb7b741f57fefd2bcf2c1e11eb471 Author: Michael Nosthoff Date: Fri Mar 9 16:13:52 2018 +0100 iio: ad7793: implement IIO_CHAN_INFO_SAMP_FREQ This commit is a follow-up to changes made to ad_sigma_delta.h in staging: iio: ad7192: implement IIO_CHAN_INFO_SAMP_FREQ which broke ad7793 as it was not altered to match those changes. This driver predates the availability of IIO_CHAN_INFO_SAMP_FREQ attribute wherein usage has some advantages like it can be accessed by in-kernel consumers as well as reduces the code size. Therefore, use IIO_CHAN_INFO_SAMP_FREQ to implement the sampling_frequency attribute instead of using IIO_DEV_ATTR_SAMP_FREQ() macro. Move code from the functions associated with IIO_DEV_ATTR_SAMP_FREQ() into respective read and write hooks with the mask set to IIO_CHAN_INFO_SAMP_FREQ. Fixes: a13e831fcaa7 ("staging: iio: ad7192: implement IIO_CHAN_INFO_SAMP_FREQ") Signed-off-by: Michael Nosthoff Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7793.c | 75 ++++++++++++++++-------------------------------- 1 file changed, 24 insertions(+), 51 deletions(-) commit 03e73e6349662e32d9d2e64c453affcd03b864a4 Author: Gregory CLEMENT Date: Wed Mar 14 18:08:11 2018 +0100 MAINTAINERS: i2c-mv64xxx: update email address for Gregory CLEMENT Free Electrons is now Bootlin, change my email address accordingly Signed-off-by: Gregory CLEMENT Signed-off-by: Wolfram Sang MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31184d8c6ea49ea0676d100cdd7e1f102ad025b5 Author: Gregory CLEMENT Date: Wed Mar 14 18:03:40 2018 +0100 i2c: mv64xxx: Apply errata delay only in standard mode The errata FE-8471889 description has been updated. There is still a timing violation for repeated start. But the errata now states that it was only the case for the Standard mode (100 kHz), in Fast mode (400 kHz) there is no issue. This patch limit the errata fix to the Standard mode. It has been tesed successfully on the clearfog (Aramda 388 based board). Signed-off-by: Gregory CLEMENT Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mv64xxx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 74d23319fd16cae28a2cbb53a213fe0765ac2028 Author: Moritz Fischer Date: Sat Mar 10 09:40:56 2018 -0800 i2c: xiic: Make suspend function names consistent Suspend functions seem to have been copied from i2c-cadence driver. Rename the functions to match the rest of the driver. Signed-off-by: Moritz Fischer Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xiic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8efb11adeeb37a4701f0915d66eeb912cf97aa3e Merge: af50371 2d74187 Author: Wolfram Sang Date: Sat Mar 17 21:11:23 2018 +0100 Merge branch 'i2c-mux/for-next' of https://github.com/peda-r/i2c-mux into i2c/for-4.17 "These patches verify the device id of the PCA984x mux chips using standardized (but rarely implemented) i2c device identification." commit 553d16af23afdf3b6aa12ce237e469c3f6237ba3 Author: Marcus Folkesson Date: Sat Mar 17 10:52:05 2018 -0700 Input: pegasus_notetaker - do not rely on input_dev->users If the device is unused and suspended, a call to open will cause the device to autoresume through the call to usb_autopm_get_interface(). input_dev->users is already incremented by the input subsystem, therefore this expression will always be evaluated to true: if (pegasus->dev->users && usb_submit_urb(pegasus->irq, GFP_NOIO) < 0) retval = -EIO; The same URB will then be fail when resubmitted in pegasus_open(). Introduce pegasus->is_open to keep track of the state instead. Signed-off-by: Marcus Folkesson Signed-off-by: Dmitry Torokhov drivers/input/tablet/pegasus_notetaker.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1f701f6d10a4578b7b2389fd80e4ef28aeb80057 Author: Marcus Folkesson Date: Sat Mar 17 10:51:34 2018 -0700 Input: pagasus_notetaker - fix deadlock in autosuspend usb_autopm_get_interface() that is called in pegasus_open() does an autoresume if the device is suspended. input_dev->mutex used in pegasus_resume() is in this case already taken by the input subsystem and will cause a deadlock. Signed-off-by: Marcus Folkesson Signed-off-by: Dmitry Torokhov drivers/input/tablet/pegasus_notetaker.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit ff0d2cba646dc0e195317c20a0630a5c7a2e328e Author: Marcus Folkesson Date: Sat Mar 17 10:50:48 2018 -0700 Input: synaptics_usb - do not rely on input_dev->users If the device is unused and suspended, a call to open will cause the device to autoresume through the call to usb_autopm_get_interface(). input_dev->users is already incremented by the input subsystem, therefore this expression will always be evaluated to true: if ((input_dev->users || (synusb->flags & SYNUSB_IO_ALWAYS)) && usb_submit_urb(synusb->urb, GFP_NOIO) < 0) { retval = -EIO; } The same URB will then be fail when resubmitted in synusb_open(). Introduce synusb->is_open to keep track of the state instead. Signed-off-by: Marcus Folkesson Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics_usb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit b8a7cc4b5e5a0681fdeffe92b613e3e4eb769801 Author: Marcus Folkesson Date: Sat Mar 17 10:49:46 2018 -0700 Input: synaptics_usb - fix deadlock in autosuspend usb_autopm_get_interface() that is called in synusb_open() does an autoresume if the device is suspended. input_dev->mutex used in synusb_resume() is in this case already taken by the input subsystem and will cause a deadlock. Signed-off-by: Marcus Folkesson Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics_usb.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit ba521f1bd202237d2c1dea95e4213169b8c6ba01 Merge: 83fc580 3aceaa3 Author: Dmitry Torokhov Date: Sat Mar 17 10:58:05 2018 -0700 Merge branch 'psmouse' into next Merge various PS/2 handling improvements. commit 00324da71e660702dd59abaaf9a5fcfe9d4baf93 Author: Arnd Bergmann Date: Wed Mar 14 17:30:23 2018 +0100 mtd: rawnand: remove bf5xx_nand driver The blackfin architecture is getting removed, so this driver has become obsolete. Signed-off-by: Arnd Bergmann Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/Kconfig | 32 -- drivers/mtd/nand/raw/Makefile | 1 - drivers/mtd/nand/raw/bf5xx_nand.c | 861 -------------------------------------- 3 files changed, 894 deletions(-) commit a722932a5af92189af45216e642bf9eb8f5fb883 Author: Stefan Agner Date: Fri Mar 9 15:50:38 2018 +0100 mtd: rawnand: vf610_nfc: support ONFI SET/GET_FEATURES commands With the move to ->exec_op() the driver should now support ONFI SET/GET_FEATURES commands. Signed-off-by: Stefan Agner Reviewed-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/vf610_nfc.c | 2 -- 1 file changed, 2 deletions(-) commit ecc40b8df59a13dc1c1abd8abe4361e4160d29ea Author: Stefan Agner Date: Fri Mar 9 15:50:37 2018 +0100 mtd: rawnand: vf610_nfc: remove old hooks Now that the driver is using ->exec_op(), remove the old hooks. Signed-off-by: Stefan Agner Reviewed-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/vf610_nfc.c | 269 --------------------------------------- 1 file changed, 269 deletions(-) commit 1cbe30b0ddc7afa3009dbe10f1c3d34f5adbef3f Author: Stefan Agner Date: Fri Mar 9 15:50:36 2018 +0100 mtd: rawnand: vf610_nfc: make use of ->exec_op() This reworks the driver to make use of ->exec_op() callback. The command sequencer of the VF610 NFC aligns well with the new ops interface. The operations are translated to a NFC command code while filling the necessary registers. Instead of using the special status and read ID command codes (which require to read status/ID from special registers instead of the regular data area) the driver now now uses the main data buffer for all commands. This simplifies the driver as no special casing is needed. For control data (status byte, id bytes and parameter page) the driver needs to reverse byte order for little endian CPUs since the controller seems to store the bytes in big endian order in the data buffer. The current state seems to pass MTD tests on a Colibri VF61. Signed-off-by: Stefan Agner Reviewed-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/vf610_nfc.c | 424 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 412 insertions(+), 12 deletions(-) commit 051abf552468d4b80c0ccf8c69667bfab672cec0 Author: Michael McCormick Date: Thu Feb 22 11:29:24 2018 +1300 rtc: pcf85063: fix clearing bits in pcf85063_start_clock Bit clear operation was missing ~ Signed-off-by: Michael McCormick Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85063.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65d211b307655e352385bfdee7aa9754d5acb66e Author: Jeffy Chen Date: Mon Mar 12 17:51:40 2018 +0800 rtc: at91sam9: Set name of regmap_config We are now allowing to register debugfs without a valid device, and not having a valid name will end up using "dummy*" to create debugfs dir. Signed-off-by: Jeffy Chen Signed-off-by: Alexandre Belloni drivers/rtc/rtc-at91sam9.c | 1 + 1 file changed, 1 insertion(+) commit 756d5282bf04db868b1c0b93f41981dabe2af57f Author: Gustavo A. R. Silva Date: Sat Mar 10 00:27:35 2018 -0600 rtc: s5m: Remove VLA usage In preparation to enabling -Wvla, remove VLAs and replace them with fixed-length arrays instead. >From a security viewpoint, the use of Variable Length Arrays can be a vector for stack overflow attacks. Also, in general, as the code evolves it is easy to lose track of how big a VLA can get. Thus, we can end up having segfaults that are hard to debug. Also, fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s5m.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 4a681243cc2d2cea98c6b5e57224f3bcb08bce6c Author: Gustavo A. R. Silva Date: Sat Mar 10 00:27:15 2018 -0600 rtc: s5m: Move enum from rtc.h to rtc-s5m.c Move this enum to rtc-s5m.c once it is meaningless to others drivers [1]. [1] https://marc.info/?l=linux-rtc&m=152060068925948&w=2 Suggested-by: Krzysztof Kozlowski Signed-off-by: Gustavo A. R. Silva Reviewed-by: Krzysztof Kozlowski Acked-by: Lee Jones Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s5m.c | 11 +++++++++++ include/linux/mfd/samsung/rtc.h | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) commit fed9b18611f75110d5b26d650819665d528038da Author: Gustavo A. R. Silva Date: Wed Mar 7 20:27:56 2018 -0600 rtc: remove VLA usage In preparation to enabling -Wvla, remove VLA and replace it with a fixed-length array instead. >From a security viewpoint, the use of Variable Length Arrays can be a vector for stack overflow attacks. Also, in general, as the code evolves it is easy to lose track of how big a VLA can get. Thus, we can end up having segfaults that are hard to debug. Also, fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alexandre Belloni drivers/rtc/rtc-bq32k.c | 6 +++++- drivers/rtc/rtc-mcp795.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) commit 83bbc5ac63326433755592829caf02920b3d8dc0 Author: Alexandre Belloni Date: Thu Mar 8 00:13:52 2018 +0100 rtc: Add useful timestamp definitions Add commonly used timestamps for range definition. Signed-off-by: Alexandre Belloni include/linux/rtc.h | 5 +++++ 1 file changed, 5 insertions(+) commit 989515647e783221f9737ed1cf519573d26ce99b Author: Baolin Wang Date: Mon Jan 8 14:04:50 2018 +0800 rtc: Add one offset seconds to expand RTC range From our investigation for all RTC drivers, 1 driver will be expired before year 2017, 7 drivers will be expired before year 2038, 23 drivers will be expired before year 2069, 72 drivers will be expired before 2100 and 104 drivers will be expired before 2106. Especially for these early expired drivers, we need to expand the RTC range to make the RTC can still work after the expired year. So we can expand the RTC range by adding one offset to the time when reading from hardware, and subtracting it when writing back. For example, if you have an RTC that can do 100 years, and currently is configured to be based in Jan 1 1970, so it can represents times from 1970 to 2069. Then if you change the start year from 1970 to 2000, which means it can represents times from 2000 to 2099. By adding or subtracting the offset produced by moving the wrap point, all times between 1970 and 1999 from RTC hardware could get interpreted as times from 2070 to 2099, but the interpretation of dates between 2000 and 2069 would not change. Signed-off-by: Baolin Wang Signed-off-by: Alexandre Belloni drivers/rtc/class.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/rtc/interface.c | 59 ++++++++++++++++++++++++++++++++++++++++- include/linux/rtc.h | 3 +++ 3 files changed, 131 insertions(+), 1 deletion(-) commit 4c4e5df1f346f70802bf4999de13d06dbbdf7a01 Author: Baolin Wang Date: Mon Jan 8 14:04:49 2018 +0800 rtc: Factor out the RTC range validation into rtc_valid_range() The RTC range validation code can be factored into rtc_valid_range() function to avoid duplicate code. Signed-off-by: Baolin Wang Signed-off-by: Alexandre Belloni drivers/rtc/interface.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 71db049e7355f31604e2c04b6cabb71d02bd487d Author: Alexandre Belloni Date: Sat Feb 17 14:58:40 2018 +0100 rtc: Add RTC range Add a way for drivers to inform the core of the supported date/time range. The core can then check whether the date/time or alarm is in the range before calling ->set_time, ->set_mmss or ->set_alarm. It returns -ERANGE when the time is out of range. Signed-off-by: Alexandre Belloni Documentation/ABI/testing/sysfs-class-rtc | 8 ++++++++ drivers/rtc/interface.c | 14 ++++++++++++++ drivers/rtc/rtc-sysfs.c | 12 ++++++++++++ include/linux/rtc.h | 3 +++ 4 files changed, 37 insertions(+) commit 236b7187034e87bd46eb535ab4f276267ef66ee4 Author: Denis Osterland Date: Mon Mar 5 10:43:53 2018 +0000 rtc: isl1208: switch to rtc_register_device Fix possible race condition. It is not allowed to return with an error code after RTC is registered. Suggested-by: Alexandre Belloni Signed-off-by: Denis Osterland Reviewed-by: Michael Grzeschik Signed-off-by: Alexandre Belloni drivers/rtc/rtc-isl1208.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9d327c2d929161a6ca4d7ca0672414cc72100659 Author: Michael Grzeschik Date: Mon Mar 5 10:43:53 2018 +0000 rtc: isl1208: enable interrupt after context preparation The interrupt handler got enabled very early. If the interrupt cause is triggering immediately before the context is fully prepared. This can lead to undefined behaviour. Therefor we move the interrupt enable code to the end of the probe function. Signed-off-by: Michael Grzeschik Signed-off-by: Denis Osterland Signed-off-by: Alexandre Belloni drivers/rtc/rtc-isl1208.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 72dd71f0dae47183efdf92279927ff26f0ed9f3f Author: Jeffy Chen Date: Tue Feb 27 10:50:03 2018 +0800 rtc: cros-ec: return -ETIME when refused to set alarms in the past Since accessing a Chrome OS EC based rtc is a slow operation, there is a race window where if the alarm is set for the next second and the second ticks over right before calculating the alarm offset. In this case the current driver is setting a 0-second alarm, which would be considered as disabling alarms by the EC(EC_RTC_ALARM_CLEAR). This breaks, e.g., hwclock which relies on RTC_UIE_ON -> rtc_update_irq_enable(), which sets a 1-second alarm and expects it to fire an interrupt. So return -ETIME when the alarm is in the past, follow __rtc_set_alarm(). Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris Tested-by: Brian Norris Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cros-ec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 83220bf38b77a830f8e62ab1a0d0408304f9b966 Author: Mohit Aggarwal Date: Mon Mar 5 14:35:58 2018 +0530 rtc: pm8xxx: Fix issue in RTC write path In order to set time in rtc, need to disable rtc hw before writing into rtc registers. Also fixes disabling of alarm while setting rtc time. Signed-off-by: Mohit Aggarwal Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pm8xxx.c | 49 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 11 deletions(-) commit e22e2d941c948c682b0a3fb293c277993b81dc46 Author: Masahiro Yamada Date: Tue Mar 6 20:08:11 2018 +0900 rtc: at91sam: add 'depends on HAS_IOMEM' to fix unmet dependency This config select's MFD_SYSCON, but does not depend on HAS_IOMEM. Compile testing on architecture without HAS_IOMEM causes "unmet direct dependencies" in Kconfig phase. Detected by "make ARCH=score allyesconfig". Signed-off-by: Masahiro Yamada Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 6735f6dcf71e722ee2fc4fb38ed14ae0e2c119b4 Author: Alexandre Belloni Date: Sat Mar 3 00:50:29 2018 +0100 rtc: isl12026: fixup nvmem registration The probe function must not fail after rtc_register_device. Also, rename the nvmem device so it is easily identifiable in /sys/bus/nvmem. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-isl12026.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit 4731a43169b799a9b4337579793a24fcc85943f5 Author: David Daney Date: Thu Feb 22 12:04:32 2018 -0800 rtc: isl12026: new driver. The ISL12026 is a combination RTC and EEPROM device with I2C interface. The standard RTC driver interface is provided. The EEPROM is accessed via the NVMEM interface. Reviewed-by: Rob Herring Reviewed-by: Andy Shevchenko Signed-off-by: David Daney Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/isil,isl12026.txt | 28 ++ drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-isl12026.c | 505 +++++++++++++++++++++ 4 files changed, 544 insertions(+) commit 58d3d5e79ece544b50829ac409064b58fec32000 Author: Justin Chen Date: Mon Feb 26 12:09:58 2018 -0800 rtc: brcmstb-waketimer: Set wktmr prescaler The HW default is one tick per second, however instead of assuming this, lets make sure the waketimer is actually one tick per second before arming the alarm. Reviewed-by: Florian Fainelli Signed-off-by: Justin Chen Signed-off-by: Alexandre Belloni drivers/rtc/rtc-brcmstb-waketimer.c | 3 +++ 1 file changed, 3 insertions(+) commit f18046c50d2bb726538a83dfb035bfa592779e9c Author: Alexandre Belloni Date: Wed Feb 28 22:50:53 2018 +0100 rtc: fix rtc_time64_to_tm for 3477 The current correction for leap years will fail in 3477. 3476-12-31 being 3477-01-00 because this is 366 leap years after 1970 and 3477 isn't a leap year. Fix that by looping over until days is positive or zero. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 561f8281cf90051bc5f11017ac5ebb21eec45ad9 Author: Philipp Rossak Date: Mon Feb 26 22:19:01 2018 +0100 rtc: ac100: Fix ac100 determine rate bug This patch fixes a bug, that prevents the Allwinner A83T and the A80 from a successful boot. The bug is there since v4.16-rc1 and appeared after the clk branch was merged. You can find the shortend trace below: Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = (ptrval) [00000000] *pgd=00000000 Internal error: Oops: 5 [#1] SMP ARM Modules linked in: CPU: 0 PID: 49 Comm: kworker/0:1 Not tainted 4.15.0-10190-gb89e32ccd1be #2 Hardware name: Allwinner sun8i Family Workqueue: events deferred_probe_work_func PC is at clk_hw_get_rate+0x0/0x34 LR is at ac100_clkout_determine_rate+0x48/0x19c [ ... ] (clk_hw_get_rate) from (ac100_clkout_determine_rate+0x48/0x19c) (ac100_clkout_determine_rate) from (clk_core_set_rate_nolock+0x3c/0x1a0) (clk_core_set_rate_nolock) from (clk_set_rate+0x30/0x88) (clk_set_rate) from (of_clk_set_defaults+0x200/0x364) (of_clk_set_defaults) from (platform_drv_probe+0x18/0xb0) To fix that bug, we first check if the return of the clk_hw_get_parent_by_index is non zero. If it is zero we skip that clock parent. The BUG report could be found here: https://lkml.org/lkml/2018/2/10/198 Fixes: 04940631b8d2 ("rtc: ac100: Add clk output support") Signed-off-by: Philipp Rossak Acked-by: Maxime Ripard Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ac100.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 188306ac9536ec47674ffa9dd330f69927679aeb Author: Alexandre Belloni Date: Sat Feb 24 01:08:53 2018 +0100 rtc: pcf85363: set time accurately As per 8.2.6 Setting and reading the time in RTC mode, first stop the clok, then reset it before setting the date and time registers. Finally, start the clock. This uses register address wrap around from 0x2f to 0x00 for efficiency. This allows to set the clock with a millisecond accuracy (drift is not corrected in this example): RTC System 1325388767 1325388767.000029180 1325388768 1325388768.000018362 1325388769 1325388769.000006544 1325388770 1325388769.999992725 1325388771 1325388770.999974544 Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85363.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit e5aac267a10a8fd571032ffba42ccb61ea16ca80 Author: Alexandre Belloni Date: Thu Mar 1 01:42:19 2018 +0100 rtc: pcf85363: add alarm support Handle alarms, currently only on INTA Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85363.c | 159 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) commit c57849dde003db3e21d33eab906dba2202f9294e Author: Alexandre Belloni Date: Sat Feb 24 01:08:50 2018 +0100 rtc: pcf85363: add .max_register in regmap_config This helps debugging as it allows reading registers from debugfs. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85363.c | 1 + 1 file changed, 1 insertion(+) commit e2c8e1a9f7e52203c9a2712a2e35326d212ad5d7 Author: Alexandre Belloni Date: Sun Feb 25 23:15:00 2018 +0100 rtc: m41t80: remove useless indirection m41t80_get_datetime and m41t80_set_datetime are only used after casting dev to an i2c_client. Remove that useless indirection. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit 10d0c768cc6d581523d673b9d1b54213f8a5eb24 Author: Alexandre Belloni Date: Sun Feb 25 21:14:31 2018 +0100 rtc: m41t80: fix race conditions The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler, leading to: Unable to handle kernel NULL pointer dereference at virtual address 0000017c pgd = a38a2f9b [0000017c] *pgd=00000000 Internal error: Oops: 5 [#1] ARM Modules linked in: CPU: 0 PID: 613 Comm: irq/48-m41t80 Not tainted 4.16.0-rc1+ #42 Hardware name: Atmel SAMA5 PC is at mutex_lock+0x14/0x38 LR is at m41t80_handle_irq+0x1c/0x9c pc : [] lr : [] psr: 20000013 sp : dec73f30 ip : 00000000 fp : dec56d98 r10: df437cf0 r9 : c0a03008 r8 : c0145ffc r7 : df5c4300 r6 : dec568d0 r5 : df593000 r4 : 0000017c r3 : df592800 r2 : 60000013 r1 : df593000 r0 : 0000017c Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c53c7d Table: 20004059 DAC: 00000051 Process irq/48-m41t80 (pid: 613, stack limit = 0xb52d091e) Stack: (0xdec73f30 to 0xdec74000) 3f20: dec56840 df5c4300 00000001 df5c4300 3f40: c0145ffc c0146018 dec56840 ffffe000 00000001 c0146290 dec567c0 00000000 3f60: c0146084 ed7c9a62 c014615c dec56d80 dec567c0 00000000 dec72000 dec56840 3f80: c014615c c012ffc0 dec72000 dec567c0 c012fe80 00000000 00000000 00000000 3fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 29282726 2d2c2b2a [] (mutex_lock) from [] (m41t80_handle_irq+0x1c/0x9c) [] (m41t80_handle_irq) from [] (irq_thread_fn+0x1c/0x54) [] (irq_thread_fn) from [] (irq_thread+0x134/0x1c0) [] (irq_thread) from [] (kthread+0x140/0x148) [] (kthread) from [] (ret_from_fork+0x14/0x2c) Exception stack(0xdec73fb0 to 0xdec73ff8) 3fa0: 00000000 00000000 00000000 00000000 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 Code: e3c33d7f e3c3303f f5d0f000 e593300c (e1901f9f) ---[ end trace 22b027302eb7c604 ]--- genirq: exiting task "irq/48-m41t80" (613) is an active IRQ thread (irq 48) Also, there is another possible race condition. The probe function is not allowed to fail after the RTC is registered because the following may happen: CPU0: CPU1: sys_load_module() do_init_module() do_one_initcall() cmos_do_probe() rtc_device_register() __register_chrdev() cdev->owner = struct module* open("/dev/rtc0") rtc_device_unregister() module_put() free_module() module_free(mod->module_core) /* struct module *module is now freed */ chrdev_open() spin_lock(cdev_lock) cdev_get() try_module_get() module_is_live() /* dereferences already freed struct module* */ Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before requesting the IRQ and register it as late as possible. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 76384f319a9adff8cb9a87d64c62f61a5d3b7c09 Author: Sebastian Andrzej Siewior Date: Fri Feb 9 19:05:34 2018 +0100 rtc: m41t80: move m41t80_rtc_mutex to the block where it is used Without CONFIG_RTC_DRV_M41T80_WDT the compiler complains: |drivers/rtc/rtc-m41t80.c:76 ‘m41t80_rtc_mutex’ defined but not used [-Wunused-variable] Move the variable to the block where it is used. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 965271df5afdc5c641c98e1d5f32310e3ba1a5e1 Author: Alexandre Belloni Date: Wed Feb 21 16:09:27 2018 +0100 rtc: pcf85063: remove useless indirection pcf85063_get_datetime and pcf85063_set_datetime are only used after casting dev to an i2c_client. Remove that useless indirection. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85063.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 0a6b8886fd6a2117a7582ad8385c061bf7e6d0fb Author: Alexandre Belloni Date: Wed Feb 21 16:07:34 2018 +0100 rtc: pcf85063: stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it before returning from the callback. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85063.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 859a6ddbe5d95fa95a66247c290c2c266fe67bf8 Author: Alexandre Belloni Date: Wed Feb 21 16:04:27 2018 +0100 rtc: max6900: remove useless indirection max6900_i2c_read_time and max6900_i2c_set_time are only used after casting dev to an i2c_client. Remove that useless indirection. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-max6900.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit ceed43f719e61f437659569b57e171263dadda08 Author: Alexandre Belloni Date: Wed Feb 21 16:01:52 2018 +0100 rtc: max6900: stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it before returning from the callback. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-max6900.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44db5c92a7110e70b45a5caa1d56f8706b7fc76d Author: Alexandre Belloni Date: Wed Feb 21 15:47:14 2018 +0100 rtc: rs5c372: remove useless indirection rs5c372_get_datetime and rs5c372_set_datetime are only used after casting dev to an i2c_client. Remove that useless indirection. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rs5c372.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 57f454fb52f631fb94fc64bcc7e77bf9ed52be9e Author: Alexandre Belloni Date: Wed Feb 21 15:43:53 2018 +0100 rtc: rs5c372: stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it before returning from the callback. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rs5c372.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ce5abb1939d3de92e971a0a3a59c473b34ca7383 Author: Alexandre Belloni Date: Wed Feb 21 15:42:32 2018 +0100 rtc: rs5c372: remove useless message It is not necessary to print a message when the time is invalid as userspace will already get an error (and an optional dev_dbg message). Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rs5c372.c | 4 ---- 1 file changed, 4 deletions(-) commit 779e1aabb49e4f3749be659eb4edfe23db09a800 Author: Alexandre Belloni Date: Wed Feb 21 14:00:18 2018 +0100 rtc: s35390a: remove useless indirection s35390a_set_datetime, s35390a_get_datetime, s35390a_set_alarm and s35390a_read_alarm are only used after casting dev to an i2c_client. Remove that useless indirection. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s35390a.c | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) commit bb530199a84593504e4cdf1ffd4636726df4f139 Author: Alexandre Belloni Date: Wed Feb 21 13:54:46 2018 +0100 rtc: s35390a: stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it before returning from the callback. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s35390a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 488c6dfe40a6fc83329596e4b1e4cd9abf67ef1d Author: Alexandre Belloni Date: Wed Feb 21 13:52:35 2018 +0100 rtc: s35390a: remove useless message It is not necessary to print a message when the time is invalid as userspace will already get an error (and an optional dev_dbg message). Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s35390a.c | 4 ---- 1 file changed, 4 deletions(-) commit 201fac95e799c3d0304ec724d555e1251b9f6e84 Author: Alexandre Belloni Date: Wed Feb 21 11:57:05 2018 +0100 rtc: rk808: fix possible race condition The probe function is not allowed to fail after registering the RTC because the following may happen: CPU0: CPU1: sys_load_module() do_init_module() do_one_initcall() cmos_do_probe() rtc_device_register() __register_chrdev() cdev->owner = struct module* open("/dev/rtc0") rtc_device_unregister() module_put() free_module() module_free(mod->module_core) /* struct module *module is now freed */ chrdev_open() spin_lock(cdev_lock) cdev_get() try_module_get() module_is_live() /* dereferences already freed struct module* */ Switch to devm_rtc_allocate_device/rtc_register_device to register the rtc as late as possible. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rk808.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4cda172bc338abf770dcdbcf61049ef0d76b17fc Author: Alexandre Belloni Date: Wed Feb 21 11:48:46 2018 +0100 rtc: rk808: remove useless debug message At probe time, printing a message when the time is invalid doesn't have much value. Also, as the comment suggest, this is a leftover from development wherhe this was used to set the RTc to a default time. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rk808.c | 11 ----------- 1 file changed, 11 deletions(-) commit ff62af200b94e06b1430eac6e58f5f26d13c749d Author: Sheng Yong Date: Thu Mar 15 18:51:42 2018 +0800 f2fs: introduce a new mount option test_dummy_encryption This patch introduces a new mount option `test_dummy_encryption' to allow fscrypt to create a fake fscrypt context. This is used by xfstests. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.txt | 2 ++ fs/f2fs/dir.c | 4 +++- fs/f2fs/f2fs.h | 8 ++++++++ fs/f2fs/namei.c | 9 ++++++--- fs/f2fs/super.c | 28 ++++++++++++++++++++++++++++ 5 files changed, 47 insertions(+), 4 deletions(-) commit b7c409deda6bcaaa6452b015937a013dd8b481b4 Author: Sheng Yong Date: Thu Mar 15 18:51:41 2018 +0800 f2fs: introduce F2FS_FEATURE_LOST_FOUND feature This patch introduces a new feature, F2FS_FEATURE_LOST_FOUND, which is set by mkfs. mkfs creates a directory named lost+found, which saves unreachable files. If fsck finds a file which has no parent, or its parent is removed by fsck, the file will be placed under lost+found directory by fsck. lost+found directory could not be encrypted. As a result, the root directory cannot be encrypted too. So if LOST_FOUND feature is enabled, let's avoid to encrypt root directory. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 ++ fs/f2fs/super.c | 12 ++++++++++++ fs/f2fs/sysfs.c | 7 +++++++ 3 files changed, 21 insertions(+) commit da5ce874f8cabe18bc34b50856933108830663bc Author: Qiuyang Sun Date: Tue Mar 13 19:42:50 2018 +0800 f2fs: release locks before return in f2fs_ioc_gc_range() Currently, we will leave the kernel with locks still held when the gc_range is invalid. This patch fixes the bug. Signed-off-by: Qiuyang Sun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit bb1105e479fbb8b0edc6f35affec71b75e31c8c0 Author: Jaegeuk Kim Date: Fri Mar 9 17:42:28 2018 -0800 f2fs: align memory boundary for bitops For example, in arm64, free_nid_bitmap should be aligned to word size in order to use bit operations. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 +- fs/f2fs/node.c | 20 +++++++++++++++++--- include/linux/f2fs_fs.h | 4 ++++ 3 files changed, 22 insertions(+), 4 deletions(-) commit c56675750d7c45ce6cc21a67770629aaf41d1491 Author: Chao Yu Date: Fri Mar 9 14:24:22 2018 +0800 f2fs: remove unneeded set_cold_node() When setting COLD_BIT_SHIFT flag in node block, we only need to call set_cold_node() in new_node_page() and recover_inode_page() during node page initialization. So remove unneeded set_cold_node() in other places. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 2 -- fs/f2fs/inode.c | 1 - fs/f2fs/node.c | 3 ++- fs/f2fs/node.h | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) commit b91050a80cec3daf5a21f78274330df64a4936a3 Author: Hyunchul Lee Date: Thu Mar 8 19:34:38 2018 +0900 f2fs: add nowait aio support This patch adds nowait aio support[1]. Return EAGAIN if any of the following checks fail for direct I/O: - i_rwsem is not lockable - Blocks are not allocated at the write location And xfstests generic/471 is passed. [1]: 6be96d "Introduce RWF_NOWAIT and FMODE_AIO_NOWAIT" Signed-off-by: Hyunchul Lee Reviewed-by: Goldwyn Rodrigues Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 47 +++++++++++++++++++++++++++++++++++++---------- fs/f2fs/f2fs.h | 8 ++++++++ fs/f2fs/file.c | 35 +++++++++++++++++++++++++++++------ 3 files changed, 74 insertions(+), 16 deletions(-) commit 63189b785960c3346d1af347516b7438f7ada8ec Author: Chao Yu Date: Thu Mar 8 14:22:56 2018 +0800 f2fs: wrap all options with f2fs_sb_info.mount_opt This patch merges miscellaneous mount options into struct f2fs_mount_info, After this patch, once we add new mount option, we don't need to worry about recovery of it in remount_fs(), since we will recover the f2fs_sb_info.mount_opt including all options. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 2 +- fs/f2fs/dir.c | 2 +- fs/f2fs/f2fs.h | 64 +++++++------- fs/f2fs/file.c | 4 +- fs/f2fs/namei.c | 6 +- fs/f2fs/segment.c | 8 +- fs/f2fs/super.c | 226 +++++++++++++++++++++++------------------------- fs/f2fs/sysfs.c | 4 +- include/linux/f2fs_fs.h | 8 +- 9 files changed, 154 insertions(+), 170 deletions(-) commit 5d7881cadf64277c1e212721073eaabfade12f66 Author: Yunlei He Date: Wed Mar 7 16:22:50 2018 +0800 f2fs: Don't overwrite all types of node to keep node chain Currently, we enable node SSR by default, and mixed different types of node segment to do SSR more intensively. Although reuse warm node is not allowed, warm node chain will be destroyed by errors introduced by other types node chain. So we'd better forbid reusing all types of node to keep warm node chain. Signed-off-by: Yunlei He Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93cf93f17c8ef7c03d828914eaef88d8e585490d Author: Junling Zheng Date: Wed Mar 7 12:07:49 2018 +0800 f2fs: introduce mount option for fsync mode Commit "0a007b97aad6"(f2fs: recover directory operations by fsync) fixed xfstest generic/342 case, but it also increased the written data and caused the performance degradation. In most cases, there's no need to do so heavy fsync actually. So we introduce new mount option "fsync_mode={posix,strict}" to control the policy of fsync. "fsync_mode=posix" is set by default, and means that f2fs uses a light fsync, which follows POSIX semantics. And "fsync_mode=strict" means that it's a heavy fsync, which behaves in line with xfs, ext4 and btrfs, where generic/342 will pass, but the performance will regress. Signed-off-by: Junling Zheng Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.txt | 7 +++++++ fs/f2fs/dir.c | 3 ++- fs/f2fs/f2fs.h | 8 ++++++++ fs/f2fs/file.c | 3 ++- fs/f2fs/namei.c | 9 ++++++--- fs/f2fs/super.c | 26 ++++++++++++++++++++++++++ 6 files changed, 51 insertions(+), 5 deletions(-) commit eea52882d848827ca812282118cd17025a76a891 Author: Chao Yu Date: Thu Mar 1 23:40:32 2018 +0800 f2fs: fix to restore old mount option in ->remount_fs This patch fixes to restore old mount option once we encounter failure in ->remount_fs. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit deeedd71e3732fb72740eb41cf66214b2b13005e Author: Chao Yu Date: Thu Mar 1 23:40:31 2018 +0800 f2fs: wrap sb_rdonly with f2fs_readonly Use f2fs_readonly to wrap sb_rdonly for cleanup, and spread it in all places. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 4 ++-- fs/f2fs/super.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 162b27aec9abe9d555b46e3a8e7ab06e7f603cbb Author: Jaegeuk Kim Date: Thu Mar 8 20:47:33 2018 -0800 f2fs: avoid selinux denial on CAP_SYS_RESOURCE This fixes CAP_SYS_RESOURCE denial of selinux when using resgid, since it seems selinux reports it at the first place, but mostly we don't need to check this condition first. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6fd052665274b4e7570491ba272f2dbb09cbbcd5 Author: Gustavo A. R. Silva Date: Wed Mar 14 13:21:32 2018 -0500 EDAC, sb_edac: Remove variable length array usage In preparation for enabling -Wvla, remove VLA and replace it with a fixed-length array instead. Also, remove max_interleave as it is no longer needed. Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Gustavo A. R. Silva Cc: linux-edac Link: http://lkml.kernel.org/r/20180314182131.GA25259@embeddedgus Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 72816cb06e7153c22aed8776949f558b635aa2c0 Author: Christopher Bostic Date: Fri Mar 16 16:22:06 2018 -0500 hwmon: (ucd9000) Add debugfs attributes to provide mfr_status Expose the gpiN_fault fields of mfr_status as individual debugfs attributes. This provides a way for users to be easily notified of gpi faults. Also provide the whole mfr_status register in debugfs. Signed-off-by: Christopher Bostic Signed-off-by: Andrew Jeffery Signed-off-by: Eddie James Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/ucd9000.c | 138 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 137 insertions(+), 1 deletion(-) commit ca781fb7fd95ba90eda6936a27fc1e3202f99d6a Author: Christopher Bostic Date: Fri Mar 16 16:22:05 2018 -0500 hwmon: (ucd9000) Add gpio chip interface Add a struct gpio_chip and define some methods so that this device's I/O can be accessed via /sys/class/gpio. Signed-off-by: Christopher Bostic Signed-off-by: Andrew Jeffery Signed-off-by: Eddie James Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/ucd9000.c | 212 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) commit 27e92f1f1600c214bf649daddb9b88b68330a8d1 Author: Thierry Reding Date: Wed Dec 13 12:25:14 2017 +0100 drm/tegra: prime: Implement ->{begin,end}_cpu_access() These callbacks allow the exporter to swap in and pin the backing storage for buffers as well as invalidate the cache in preparation for accessing the buffer from the CPU, and flush the cache and unpin the backing storage when the CPU is done modifying the buffer. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/gem.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit bd43c9f0fa1f664b58eefdc8aab7ac3c8b2026ec Author: Thierry Reding Date: Wed Dec 13 12:22:48 2017 +0100 drm/tegra: gem: Map pages via the DMA API When allocating pages, map them with the DMA API in order to invalidate caches. This is the correct usage of the API and works just as well as faking up the SG table and using the dma_sync_sg_for_device() function. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/gem.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 0281c4149021376123b4ccdb1548692a3f6e70bd Author: Thierry Reding Date: Tue Nov 28 11:20:40 2017 +0100 drm/tegra: hub: Use private object for global state Rather than subclass the global atomic state to store the hub display clock and rate, create a private object and store this data in its state. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dc.c | 26 ----------- drivers/gpu/drm/tegra/drm.c | 36 ++------------- drivers/gpu/drm/tegra/drm.h | 14 ------ drivers/gpu/drm/tegra/hub.c | 110 ++++++++++++++++++++++++++++++++++++++++---- drivers/gpu/drm/tegra/hub.h | 17 +++++++ 5 files changed, 123 insertions(+), 80 deletions(-) commit df934cbcbff7afbc024bf05f02615917c61f6470 Author: Arnd Bergmann Date: Tue Feb 20 16:15:21 2018 +0100 clk: hisilicon: mark wdt_mux_p[] as const The symbol is in the __initconst section but not marked init, which caused a warning when building with LTO. This makes it 'const' as was obviously intended. Signed-off-by: Arnd Bergmann Fixes: c80dfd9bf54e ("clk: hisilicon: add CRG driver for Hi3516CV300 SoC") Signed-off-by: Stephen Boyd drivers/clk/hisilicon/crg-hi3516cv300.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce33f284935e08229046b30635e6aadcbab02b53 Author: Arnd Bergmann Date: Fri Feb 16 16:27:47 2018 +0100 clk: fix false-positive Wmaybe-uninitialized warning When we build this driver with on x86-32, gcc produces a false-positive warning: drivers/clk/renesas/clk-sh73a0.c: In function 'sh73a0_cpg_clocks_init': drivers/clk/renesas/clk-sh73a0.c:155:10: error: 'parent_name' may be used uninitialized in this function [-Werror=maybe-uninitialized] return clk_register_fixed_factor(NULL, name, parent_name, 0, We can work around that warning by adding a fake initialization, I tried and failed to come up with any better workaround. This is currently one of few remaining warnings for a 4.14.y randconfig build, so it would be good to also have it backported at least to that version. Older versions have more randconfig warnings, so we might not care. I had not noticed this earlier, because one patch in my randconfig test tree removes the '-ffreestanding' option on x86-32, and that avoids the warning. The -ffreestanding flag was originally global but moved into arch/i386 by Andi Kleen in commit 6edfba1b33c7 ("[PATCH] x86_64: Don't define string functions to builtin") as a 'temporary workaround'. Like many temporary hacks, this turned out to be rather long-lived, from all I can tell we still need a simple fix to asm/string_32.h before it can be removed, but I'm not sure about how to best do that. Cc: stable@vger.kernel.org Cc: Andi Kleen Signed-off-by: Arnd Bergmann Acked-by: Geert Uytterhoeven Signed-off-by: Stephen Boyd drivers/clk/renesas/clk-sh73a0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b3316a672bfbedbe0437b21937c1d6aeacbaabe4 Author: Chunyan Zhang Date: Fri Feb 9 17:55:09 2018 +0800 clk: sprd: add RTC gate for SC9860 Add a few gate clocks which are used for gating RTC for some devices on AON area of SC9860. This patch has been tested on SC9860, with this patch and proper DT configurations, the watchdog can be initialized and work well. Signed-off-by: Chunyan Zhang Signed-off-by: Stephen Boyd drivers/clk/sprd/sc9860-clk.c | 76 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit f7c14dd5b1291abaec3dda97867c5018e1b6aa01 Author: Chunyan Zhang Date: Fri Feb 9 17:48:10 2018 +0800 dt-bindings: clocks: add APB RTC gate for SC9860 Added index of RTC gate clocks which are used by some devices on aon area of SC9860, for example the Watchdog timer. Signed-off-by: Chunyan Zhang Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd include/dt-bindings/clock/sprd,sc9860-clk.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 91927ff6446c281a3aa5cf8875cf7f0853a2bb55 Author: Stephen Boyd Date: Thu Feb 1 16:33:26 2018 -0800 clk: qcom: smd-rpm: Migrate to devm_of_clk_add_hw_provider() Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/qcom/clk-smd-rpm.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 0126b23c552c2bf9aa62a6cabce8c10e983ef436 Author: Gustavo A. R. Silva Date: Tue Mar 13 09:31:51 2018 -0500 drm/vc4_validate: Remove VLA usage In preparation to enabling -Wvla, remove VLA. In this particular case use macro ARRAY_SIZE so the length of array _bo_ can be computed at preprocessing time. The use of stack Variable Length Arrays needs to be avoided, as they can be a vector for stack exhaustion, which can be both a runtime bug or a security flaw. Also, in general, as code evolves it is easy to lose track of how big a VLA can get. Thus, we can end up having runtime failures that are hard to debug. Also, fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180313143151.GA27486@embeddedgus drivers/gpu/drm/vc4/vc4_validate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e0d4ff4580c1272f4e4860bf22841ef31fd31ba Author: Dong Aisheng Date: Tue Jan 23 20:24:45 2018 +0800 clk: add more __must_check for bulk APIs we need it even when !CONFIG_HAVE_CLK because it allows us to catch missing checking return values in the non-clk compile configurations too. More test coverage. Cc: Stephen Boyd Suggested-by: Stephen Boyd Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd include/linux/clk.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 5bc5673c098b03e8de29b9f87187bed7643bd5c6 Author: Dong Aisheng Date: Fri Jan 19 21:37:15 2018 +0800 Documentation: clk: enable lock is not held for clk_is_enabled API The core does not need to hold enable lock for clk_is_enabled API. Update the doc to reflect it. Cc: Jonathan Corbet Cc: Stephen Boyd Suggested-by: Stephen Boyd Signed-off-by: Dong Aisheng [sboyd: Clarified the last sentence a little more and fixed a spelling error] Signed-off-by: Stephen Boyd Documentation/clk.txt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 93abad369a44f3b68f0581a00c4608500f293d93 Author: Lucas Stach Date: Wed Jan 17 16:02:56 2018 +0100 clk: imx: pllv2: avoid using uninitialized values Forward the errors returned by __clk_pllv2_set_rate() in the recalc rate function, to avoid using uninitialized values for the rate calculation. Signed-off-by: Lucas Stach Reviewed-by: Fabio Estevam Signed-off-by: Stephen Boyd drivers/clk/imx/clk-pllv2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 496037c015079ece7ebc1344fcab80f0618eae5e Author: Srinivas Kandagatla Date: Thu Dec 7 10:59:22 2017 +0000 clk: qcom: gcc-msm8996: Mark aggre0 noc clks as critical aggre0 bus clks are not associated with any of the drivers, so its important that these clks are always on to get peripherals on this bus working. So mark them as critical. Eventually when we have a proper bus driver these clks can be marked appropriately. Without this patch pcie on db820c is not functional. Signed-off-by: Srinivas Kandagatla Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-msm8996.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7d9a935e169b7e51a5f84caf8dfb02aad6206902 Author: Leon Romanovsky Date: Thu Mar 15 11:10:42 2018 +0200 RDMA/restrack: Don't rely on uninitialized variable in restrack_add flow The restrack code relies on the fact that object structures are zeroed at the allocation stage, the mlx4 CQ wasn't allocated with kzalloc and it caused to the following crash. [ 137.392209] general protection fault: 0000 [#1] SMP KASAN PTI [ 137.392972] CPU: 0 PID: 622 Comm: ibv_rc_pingpong Tainted: G W 4.16.0-rc1-00099-g00313983cda6 #11 [ 137.395079] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-2.fc27 04/01/2014 [ 137.396866] RIP: 0010:rdma_restrack_del+0xc8/0xf0 [ 137.397762] RSP: 0018:ffff8801b54e7968 EFLAGS: 00010206 [ 137.399008] RAX: 0000000000000000 RBX: ffff8801d8bcbae8 RCX: ffffffffb82314df [ 137.400055] RDX: dffffc0000000000 RSI: dffffc0000000000 RDI: 70696b533d454741 [ 137.401103] RBP: ffff8801d90c07a0 R08: ffff8801d8bcbb00 R09: 0000000000000000 [ 137.402470] R10: 0000000000000001 R11: ffffed0036a9cf52 R12: ffff8801d90c0ad0 [ 137.403318] R13: ffff8801d853fb20 R14: ffff8801d8bcbb28 R15: 0000000000000014 [ 137.404736] FS: 00007fb415d43740(0000) GS:ffff8801e5c00000(0000) knlGS:0000000000000000 [ 137.406074] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 137.407101] CR2: 00007fb41557df20 CR3: 00000001b580c001 CR4: 00000000003606b0 [ 137.408308] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 137.409352] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 137.410385] Call Trace: [ 137.411058] ib_destroy_cq+0x23/0x60 [ 137.411460] uverbs_free_cq+0x37/0xa0 [ 137.412040] remove_commit_idr_uobject+0x38/0xf0 [ 137.413042] _rdma_remove_commit_uobject+0x5c/0x160 [ 137.413782] ? lookup_get_idr_uobject+0x39/0x50 [ 137.414737] rdma_remove_commit_uobject+0x3b/0x70 [ 137.415742] ib_uverbs_destroy_cq+0x114/0x1d0 [ 137.416260] ? ib_uverbs_req_notify_cq+0x160/0x160 [ 137.417073] ? kernel_text_address+0x5c/0x90 [ 137.417805] ? __kernel_text_address+0xe/0x30 [ 137.418766] ? unwind_get_return_address+0x2f/0x50 [ 137.419558] ib_uverbs_write+0x453/0x6a0 [ 137.420220] ? show_ibdev+0x90/0x90 [ 137.420653] ? __kasan_slab_free+0x136/0x180 [ 137.421155] ? kmem_cache_free+0x78/0x1e0 [ 137.422192] ? remove_vma+0x83/0x90 [ 137.422614] ? do_munmap+0x447/0x6c0 [ 137.423045] ? vm_munmap+0xb0/0x100 [ 137.423481] ? SyS_munmap+0x1d/0x30 [ 137.424120] ? do_syscall_64+0xeb/0x250 [ 137.424984] ? entry_SYSCALL_64_after_hwframe+0x21/0x86 [ 137.425611] ? lru_add_drain_all+0x270/0x270 [ 137.426116] ? lru_add_drain_cpu+0xa3/0x170 [ 137.426616] ? lru_add_drain+0x11/0x20 [ 137.427058] ? free_pages_and_swap_cache+0xa6/0x120 [ 137.427672] ? tlb_flush_mmu_free+0x78/0x90 [ 137.428168] ? arch_tlb_finish_mmu+0x6d/0xb0 [ 137.428680] __vfs_write+0xc4/0x350 [ 137.430917] ? kernel_read+0xa0/0xa0 [ 137.432758] ? remove_vma+0x90/0x90 [ 137.434781] ? __kasan_slab_free+0x14b/0x180 [ 137.437486] ? remove_vma+0x83/0x90 [ 137.439836] ? kmem_cache_free+0x78/0x1e0 [ 137.442195] ? percpu_counter_add_batch+0x1d/0x90 [ 137.444389] vfs_write+0xf7/0x280 [ 137.446030] SyS_write+0xa1/0x120 [ 137.447867] ? SyS_read+0x120/0x120 [ 137.449670] ? mm_fault_error+0x180/0x180 [ 137.451539] ? _cond_resched+0x16/0x50 [ 137.453697] ? SyS_read+0x120/0x120 [ 137.455883] do_syscall_64+0xeb/0x250 [ 137.457686] entry_SYSCALL_64_after_hwframe+0x21/0x86 [ 137.459595] RIP: 0033:0x7fb415637b94 [ 137.461315] RSP: 002b:00007ffdebea7d88 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 137.463879] RAX: ffffffffffffffda RBX: 00005565022d1bd0 RCX: 00007fb415637b94 [ 137.466519] RDX: 0000000000000018 RSI: 00007ffdebea7da0 RDI: 0000000000000003 [ 137.469543] RBP: 00007ffdebea7d98 R08: 0000000000000000 R09: 00005565022d40c0 [ 137.472479] R10: 00000000000009cf R11: 0000000000000246 R12: 00005565022d2520 [ 137.475125] R13: 00000000000003e8 R14: 0000000000000000 R15: 00007ffdebea7fd0 [ 137.477760] Code: f7 e8 dd 0d 0b ff 48 c7 43 40 00 00 00 00 48 89 df e8 0d 0b 0b ff 48 8d 7b 28 c6 03 00 e8 41 0d 0b ff 48 8b 7b 28 48 85 ff 74 06 ff 4f 48 74 10 5b 48 89 ef 5d 41 5c 41 5d 41 5e e9 32 b0 ee [ 137.483375] RIP: rdma_restrack_del+0xc8/0xf0 RSP: ffff8801b54e7968 [ 137.486436] ---[ end trace 81835a1ea6722eed ]--- [ 137.488566] Kernel panic - not syncing: Fatal exception [ 137.491162] Kernel Offset: 0x36000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) Fixes: 00313983cda6 ("RDMA/nldev: provide detailed CM_ID information") Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise Signed-off-by: Jason Gunthorpe drivers/infiniband/core/restrack.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a1d803d78b9e1ff82a0e5ef9d81202b23377f9e0 Author: Brian Starkey Date: Mon Nov 13 15:27:51 2017 +0000 clk: versatile: Remove WARNs in ->round_rate() clk_round_rate() is intended to be used to round a given clock rate to the closest one achievable by the actual clock. This implies that the input to clk_round_rate() is expected to be unachievable - and such cases shouldn't be treated as exceptional. To reflect this, remove the WARN_ONs which trigger when an unachievable clock rate is passed to vexpress_osc_round_rate(). Reported-by: Vladimir Murzin Signed-off-by: Brian Starkey Acked-by: Sudeep Holla Signed-off-by: Stephen Boyd drivers/clk/versatile/clk-vexpress-osc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aff2dc6b49fc642906eaa5523c5227c50fd77c50 Author: Sudeep Holla Date: Fri Nov 10 16:06:57 2017 +0000 clk: versatile: add min/max rate boundaries for vexpress osc clock Clock framework has a provider API(clk_hw_set_rate_range) to set the min/max rate of a clock. Use the same to set the boundaries for the vexpress osc clock. Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Signed-off-by: Sudeep Holla Signed-off-by: Stephen Boyd drivers/clk/versatile/clk-vexpress-osc.c | 1 + 1 file changed, 1 insertion(+) commit 6da2b9332c572fcda94de9631f8fa514f574388a Author: Harry Wentland Date: Wed Nov 8 15:58:25 2017 -0500 amdgpu/dm: Default PRE_VEGA ASIC support to 'y' Even though we default PRE_VEGA support to 'n' upstream in amd-staging we want to keep it enabled by default. Signed-off-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59156faf810e05f5c5241f9a90e6d715d1185cd1 Author: Rex Zhu Date: Thu Mar 15 14:45:04 2018 +0800 drm/amd/pp: Remove the cgs wrapper for notify smu version on APU Refine commit f49e9bac191b ("drm/amd/pp: Get and save Rv smu version") Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 5 ----- drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c | 6 ++---- drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c | 6 +++--- 3 files changed, 5 insertions(+), 12 deletions(-) commit 6f4969ef0a2e6257c9f839eff06e6718b55c6bcd Author: Shirish S Date: Thu Mar 15 16:01:00 2018 +0530 drm/amd/display: fix dereferencing possible ERR_PTR() This patch fixes static checker warning caused by "36cc549d5986: "drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2)" Reported-by: Dan Carpenter Signed-off-by: Shirish S Reviewed-by: Harry Wentland Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+) commit 5e9a4f0873fd357bdec29b3b96667ef0cea64c46 Author: Clark Zheng Date: Thu Mar 15 14:02:06 2018 +0800 drm/amd/display: Refine disable VGA bad case won't follow normal sense, it will not enable vga1 as usual, but vga2,3,4 is on. Signed-off-by: Clark Zheng Reviewed-by: Tony Cheng Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 8 +++++++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 20 +++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) commit 35060ed6a1ffc92106904f5e4b5823ca4facfc73 Author: Vitaly Kuznetsov Date: Tue Mar 13 18:48:05 2018 +0100 x86/kvm/vmx: avoid expensive rdmsr for MSR_GS_BASE vmx_save_host_state() is only called from kvm_arch_vcpu_ioctl_run() so the context is pretty well defined and as we're past 'swapgs' MSR_GS_BASE should contain kernel's GS base which we point to irq_stack_union. Add new kernelmode_gs_base() API, irq_stack_union needs to be exported as KVM can be build as module. Acked-by: Andy Lutomirski Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini arch/x86/include/asm/processor.h | 5 +++++ arch/x86/kernel/cpu/common.c | 3 ++- arch/x86/kvm/vmx.c | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) commit 42b933b59721f288e3ce23ca79a17a973808dab9 Author: Vitaly Kuznetsov Date: Tue Mar 13 18:48:04 2018 +0100 x86/kvm/vmx: read MSR_{FS,KERNEL_GS}_BASE from current->thread vmx_save_host_state() is only called from kvm_arch_vcpu_ioctl_run() so the context is pretty well defined. Read MSR_{FS,KERNEL_GS}_BASE from current->thread after calling save_fsgs() which takes care of X86_BUG_NULL_SEG case now and will do RD[FG,GS]BASE when FSGSBASE extensions are exposed to userspace (currently they are not). Acked-by: Andy Lutomirski Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini arch/x86/include/asm/processor.h | 5 +++++ arch/x86/kernel/process_64.c | 14 ++++++++++++++ arch/x86/kvm/vmx.c | 13 ++++++++++--- 3 files changed, 29 insertions(+), 3 deletions(-) commit b31c114b82b2b55913d2cf744e6a665c2ca090ac Author: Wanpeng Li Date: Mon Mar 12 04:53:04 2018 -0700 KVM: X86: Provide a capability to disable PAUSE intercepts Allow to disable pause loop exit/pause filtering on a per VM basis. If some VMs have dedicated host CPUs, they won't be negatively affected due to needlessly intercepted PAUSE instructions. Thanks to Jan H. Schönherr's initial patch. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Jan H. Schönherr Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/svm.c | 3 ++- arch/x86/kvm/vmx.c | 17 +++++++++++++---- arch/x86/kvm/x86.c | 4 +++- arch/x86/kvm/x86.h | 9 ++++++++- 5 files changed, 27 insertions(+), 7 deletions(-) commit caa057a2cad647fb368a12c8e6c410ac4c28e063 Author: Wanpeng Li Date: Mon Mar 12 04:53:03 2018 -0700 KVM: X86: Provide a capability to disable HLT intercepts If host CPUs are dedicated to a VM, we can avoid VM exits on HLT. This patch adds the per-VM capability to disable them. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Jan H. Schönherr Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/api.txt | 2 ++ arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/cpuid.c | 5 +++++ arch/x86/kvm/svm.c | 4 +++- arch/x86/kvm/vmx.c | 24 ++++++++++++++++++++++++ arch/x86/kvm/x86.c | 3 +++ arch/x86/kvm/x86.h | 9 ++++++++- 7 files changed, 46 insertions(+), 2 deletions(-) commit 4d5422cea3b61f158d58924cbb43feada456ba5c Author: Wanpeng Li Date: Mon Mar 12 04:53:02 2018 -0700 KVM: X86: Provide a capability to disable MWAIT intercepts Allowing a guest to execute MWAIT without interception enables a guest to put a (physical) CPU into a power saving state, where it takes longer to return from than what may be desired by the host. Don't give a guest that power over a host by default. (Especially, since nothing prevents a guest from using MWAIT even when it is not advertised via CPUID.) Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Jan H. Schönherr Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/api.txt | 27 ++++++++++++++++++--------- arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/svm.c | 2 +- arch/x86/kvm/vmx.c | 9 +++++---- arch/x86/kvm/x86.c | 24 ++++++++++++++++++++---- arch/x86/kvm/x86.h | 10 +++++----- include/uapi/linux/kvm.h | 2 +- tools/include/uapi/linux/kvm.h | 2 +- 8 files changed, 53 insertions(+), 25 deletions(-) commit 4956aa3b8b59e336b77f1df0ac7ce1a94c0265f2 Merge: 2d7921c ccc40c5 Author: Paolo Bonzini Date: Fri Mar 16 22:03:18 2018 +0100 Merge tag 'kvm-s390-next-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: fixes and features - more kvm stat counters - virtio gpu plumbing. The 3 non-KVM/s390 patches have Acks from Bartlomiej Zolnierkiewicz, Heiko Carstens and Greg Kroah-Hartman but all belong together to make virtio-gpu work as a tty. So I carried them in the KVM/s390 tree. - document some KVM_CAPs - cpu-model only facilities - cleanups commit 2d7921c499afebac78b13ab9a3758261a97e07b7 Author: Arbel Moshe Date: Mon Mar 12 13:12:53 2018 +0200 KVM: x86: Add support for VMware backdoor Pseudo-PMCs VMware exposes the following Pseudo PMCs: 0x10000: Physical host TSC 0x10001: Elapsed real time in ns 0x10002: Elapsed apparent time in ns For more info refer to: https://www.vmware.com/files/pdf/techpaper/Timekeeping-In-VirtualMachines.pdf VMware allows access to these Pseduo-PMCs even when read via RDPMC in Ring3 and CR4.PCE=0. Therefore, commit modifies x86 emulator to allow access to these PMCs in this situation. In addition, emulation of these PMCs were added to kvm_pmu_rdpmc(). Signed-off-by: Arbel Moshe Signed-off-by: Liran Alon Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 8 ++++++++ arch/x86/kvm/pmu.c | 37 +++++++++++++++++++++++++++++++++++++ arch/x86/kvm/pmu.h | 6 ++++++ arch/x86/kvm/x86.c | 41 ++++++++++++++++++++++++----------------- 4 files changed, 75 insertions(+), 17 deletions(-) commit 9718420e9fd462ac6b7ea840f9e63eb6af7e1bda Author: Liran Alon Date: Mon Mar 12 13:12:52 2018 +0200 KVM: x86: SVM: Intercept #GP to support access to VMware backdoor ports If KVM enable_vmware_backdoor module parameter is set, the commit change VMX to now intercept #GP instead of being directly deliviered from CPU to guest. It is done to support access to VMware Backdoor I/O ports even if TSS I/O permission denies it. In that case: 1. A #GP will be raised and intercepted. 2. #GP intercept handler will simulate I/O port access instruction. 3. I/O port access instruction simulation will allow access to VMware backdoor ports specifically even if TSS I/O permission bitmap denies it. Note that the above change introduce slight performance hit as now #GPs are now not deliviered directly from CPU to guest but instead cause #VMExit and instruction emulation. However, this behavior is introduced only when enable_vmware_backdoor KVM module parameter is set. Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 9e86948041f2ec6b7868d4849181cb7bb1bdee70 Author: Liran Alon Date: Mon Mar 12 13:12:51 2018 +0200 KVM: x86: VMX: Intercept #GP to support access to VMware backdoor ports If KVM enable_vmware_backdoor module parameter is set, the commit change VMX to now intercept #GP instead of being directly deliviered from CPU to guest. It is done to support access to VMware backdoor I/O ports even if TSS I/O permission denies it. In that case: 1. A #GP will be raised and intercepted. 2. #GP intercept handler will simulate I/O port access instruction. 3. I/O port access instruction simulation will allow access to VMware backdoor ports specifically even if TSS I/O permission bitmap denies it. Note that the above change introduce slight performance hit as now #GPs are not deliviered directly from CPU to guest but instead cause #VMExit and instruction emulation. However, this behavior is introduced only when enable_vmware_backdoor KVM module parameter is set. Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 04789b6664a60474aeb8b07a9a94d923a217690e Author: Liran Alon Date: Mon Mar 12 13:12:50 2018 +0200 KVM: x86: Emulate only IN/OUT instructions when accessing VMware backdoor Access to VMware backdoor ports is done by one of the IN/OUT/INS/OUTS instructions. These ports must be allowed access even if TSS I/O permission bitmap don't allow it. To handle this, VMX/SVM will be changed in future commits to intercept #GP which was raised by such access and handle it by calling x86 emulator to emulate instruction. If it was one of these instructions, the x86 emulator already handles it correctly (Since commit "KVM: x86: Always allow access to VMware backdoor I/O ports") by not checking these ports against TSS I/O permission bitmap. One may wonder why checking for specific instructions is necessary as we can just forward all #GPs to the x86 emulator. There are multiple reasons for doing so: 1. We don't want the x86 emulator to be reached easily by guest by just executing an instruction that raises #GP as that exposes the x86 emulator as a bigger attack surface. 2. The x86 emulator is incomplete and therefore certain instructions that can cause #GP cannot be emulated. Such an example is "INT x" (opcode 0xcd) which reaches emulate_int() which can only emulate the instruction if vCPU is in real-mode. Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/x86.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit e23661712005fd01ad9d2bca6eb4a122b79c8b0b Author: Liran Alon Date: Mon Mar 12 13:12:49 2018 +0200 KVM: x86: Add emulation_type to not raise #UD on emulation failure Next commits are going introduce support for accessing VMware backdoor ports even though guest's TSS I/O permissions bitmap doesn't allow access. This mimic VMware hypervisor behavior. In order to support this, next commits will change VMX/SVM to intercept #GP which was raised by such access and handle it by calling the x86 emulator to emulate instruction. Since commit "KVM: x86: Always allow access to VMware backdoor I/O ports", the x86 emulator handles access to these I/O ports by not checking these ports against the TSS I/O permission bitmap. However, there could be cases that CPU rasies a #GP on instruction that fails to be disassembled by the x86 emulator (Because of incomplete implementation for example). In those cases, we would like the #GP intercept to just forward #GP as-is to guest as if there was no intercept to begin with. However, current emulator code always queues #UD exception in case emulator fails (including disassembly failures) which is not what is wanted in this flow. This commit addresses this issue by adding a new emulation_type flag that will allow the #GP intercept handler to specify that it wishes to be aware when instruction emulation fails and doesn't want #UD exception to be queued. Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/x86.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) commit 9a29d449e3fb704bd449b82b2160a041709a5425 Author: Liran Alon Date: Mon Mar 12 13:12:48 2018 +0200 KVM: x86: Always allow access to VMware backdoor I/O ports VMware allows access to these ports even if denied by TSS I/O permission bitmap. Mimic behavior. Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c4ae60e4bbf8f5fd4929d2c98543d9c163cb336b Author: Liran Alon Date: Mon Mar 12 13:12:47 2018 +0200 KVM: x86: Add module parameter for supporting VMware backdoor Support access to VMware backdoor requires KVM to intercept #GP exceptions from guest which introduce slight performance hit. Therefore, control this support by module parameter. Note that module parameter is exported as it should be consumed by kvm_intel & kvm_amd to determine if they should intercept #GP or not. This commit doesn't change semantics. It is done as a preparation for future commits. Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini Documentation/admin-guide/kernel-parameters.txt | 3 +++ arch/x86/kvm/x86.c | 4 ++++ arch/x86/kvm/x86.h | 2 ++ 3 files changed, 9 insertions(+) commit dca7f1284f49911b459da313ece5d9c6dc3291f6 Author: Sean Christopherson Date: Thu Mar 8 08:57:27 2018 -0800 KVM: x86: add kvm_fast_pio() to consolidate fast PIO code Add kvm_fast_pio() to consolidate duplicate code in VMX and SVM. Unexport kvm_fast_pio_in() and kvm_fast_pio_out(). Suggested-by: Paolo Bonzini Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 3 +-- arch/x86/kvm/svm.c | 12 ++---------- arch/x86/kvm/vmx.c | 13 ++----------- arch/x86/kvm/x86.c | 23 +++++++++++++++++++---- 4 files changed, 24 insertions(+), 27 deletions(-) commit 432baf60eee3dcacac94b8781464ab566abf0183 Author: Sean Christopherson Date: Thu Mar 8 08:57:26 2018 -0800 KVM: VMX: use kvm_fast_pio_in for handling IN I/O Fast emulation of processor I/O for IN was disabled on x86 (both VMX and SVM) some years ago due to a buggy implementation. The addition of kvm_fast_pio_in(), used by SVM, re-introduced (functional!) fast emulation of IN. Piggyback SVM's work and use kvm_fast_pio_in() on VMX instead of performing full emulation of IN. Reviewed-by: Paolo Bonzini Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 2bb8cafea80bf69c0e729bf1ad1bcd1d6c53248d Author: Sean Christopherson Date: Mon Mar 12 10:56:13 2018 -0700 KVM: vVMX: signal failure for nested VMEntry if emulation_required Fail a nested VMEntry with EXIT_REASON_INVALID_STATE if L2 guest state is invalid, i.e. vmcs12 contained invalid guest state, and unrestricted guest is disabled in L0 (and by extension disabled in L1). WARN_ON_ONCE in handle_invalid_guest_state() if we're attempting to emulate L2, i.e. nested_run_pending is true, to aid debug in the (hopefully unlikely) scenario that we somehow skip the nested VMEntry consistency check, e.g. due to a L0 bug. Note: KVM relies on hardware to detect the scenario where unrestricted guest is enabled in L0 but disabled in L1 and vmcs12 contains invalid guest state, i.e. checking emulation_required in prepare_vmcs02 is required only to handle the case were unrestricted guest is disabled in L0 since L0 never actually attempts VMLAUNCH/VMRESUME with vmcs02. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit e1de91ccab311ec8007c6e77b0dbb4e3421fd298 Author: Sean Christopherson Date: Mon Mar 5 12:04:41 2018 -0800 KVM: VMX: WARN on a MOV CR3 exit w/ unrestricted guest CR3 load/store exiting are always off when unrestricted guest is enabled. WARN on the associated CR3 VMEXIT to detect code that would re-introduce CR3 load/store exiting for unrestricted guest. Signed-off-by: Sean Christopherson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 2 ++ 1 file changed, 2 insertions(+) commit b4d185175bc13d238d96998b1dba5ddeb7c69d71 Author: Sean Christopherson Date: Mon Mar 5 12:04:40 2018 -0800 KVM: VMX: give unrestricted guest full control of CR3 Now CR3 is not forced to a host-controlled value when paging is disabled in an unrestricted guest, CR3 load/store exiting can be left disabled (for an unrestricted guest). And because CR0.WP and CR4.PAE/PSE are also not force to host-controlled values, all of ept_update_paging_mode_cr0() is no longer needed, i.e. skip ept_update_paging_mode_cr0() for an unrestricted guest. Because MOV CR3 no longer exits when paging is disabled for an unrestricted guest, vmx_decache_cr3() must always read GUEST_CR3 from the VMCS for an unrestricted guest. Signed-off-by: Sean Christopherson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5dc1f044a32d52266c5dd44532d4fcf88dbf8ad9 Author: Sean Christopherson Date: Mon Mar 5 12:04:39 2018 -0800 KVM: VMX: don't force CR4.PAE/PSE for unrestricted guest CR4.PAE - Unrestricted guest can only be enabled when EPT is enabled, and vmx_set_cr4() clears hardware CR0.PAE based on the guest's CR4.PAE, i.e. CR4.PAE always follows the guest's value when unrestricted guest is enabled. CR4.PSE - Unrestricted guest no longer uses the identity mapped IA32 page tables since CR0.PG can be cleared in hardware, thus there is no need to set CR4.PSE when paging is disabled in the guest (and EPT is enabled). Define KVM_VM_CR4_ALWAYS_ON_UNRESTRICTED_GUEST (to X86_CR4_VMXE) and use it in lieu of KVM_*MODE_VM_CR4_ALWAYS_ON when unrestricted guest is enabled, which removes the forcing of CR4.PAE. Skip the manipulation of CR4.PAE/PSE for EPT when unrestricted guest is enabled, as CR4.PAE isn't forced and so doesn't need to be manually cleared, and CR4.PSE does not need to be set when paging is disabled since the identity mapped IA32 page tables are not used. Signed-off-by: Sean Christopherson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) commit 1706bd0c023f1c7b677119ed132c7ab0b37268b4 Author: Sean Christopherson Date: Mon Mar 5 12:04:38 2018 -0800 KVM: VMX: remove CR0.WP from ..._ALWAYS_ON_UNRESTRICTED_GUEST Unrestricted guest can only be enabled when EPT is enabled, and when EPT is enabled, ept_update_paging_mode_cr0() will clear hardware CR0.WP based on the guest's CR0.WP, i.e. CR0.WP always follows the guest's value when unrestricted guest is enabled. Signed-off-by: Sean Christopherson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e90008df1678676fb7e51b4cf38ee0f18c38aeba Author: Sean Christopherson Date: Mon Mar 5 12:04:37 2018 -0800 KVM: VMX: don't configure EPT identity map for unrestricted guest An unrestricted guest can run with hardware CR0.PG==0, i.e. IA32 paging disabled, in which case there is no need to load the guest's CR3 with identity mapped IA32 page tables since hardware will effectively ignore CR3. If unrestricted guest is enabled, don't configure the identity mapped IA32 page table and always load the guest's desired CR3. Signed-off-by: Sean Christopherson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f7eaeb0ad815730dc63e8974e6f9f4d93b8ca8bb Author: Sean Christopherson Date: Mon Mar 5 12:04:36 2018 -0800 KVM: VMX: don't configure RM TSS for unrestricted guest An unrestricted guest can run with CR0.PG==0 and/or CR0.PE==0, e.g. it can run in Real Mode without requiring host emulation. The RM TSS is only used for emulating RM, i.e. it will never be used when unrestricted guest is enabled and so doesn't need to be configured. Signed-off-by: Sean Christopherson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 3 +++ 1 file changed, 3 insertions(+) commit 915e6f78bd0641da692ffa7e0b766e633e12e628 Author: Vitaly Kuznetsov Date: Thu Mar 1 15:15:14 2018 +0100 x86/kvm/hyper-v: inject #GP only when invalid SINTx vector is unmasked Hyper-V 2016 on KVM with SynIC enabled doesn't boot with the following trace: kvm_entry: vcpu 0 kvm_exit: reason MSR_WRITE rip 0xfffff8000131c1e5 info 0 0 kvm_hv_synic_set_msr: vcpu_id 0 msr 0x40000090 data 0x10000 host 0 kvm_msr: msr_write 40000090 = 0x10000 (#GP) kvm_inj_exception: #GP (0x0) KVM acts according to the following statement from TLFS: " 11.8.4 SINTx Registers ... Valid values for vector are 16-255 inclusive. Specifying an invalid vector number results in #GP. " However, I checked and genuine Hyper-V doesn't #GP when we write 0x10000 to SINTx. I checked with Microsoft and they confirmed that if either the Masked bit (bit 16) or the Polling bit (bit 18) is set to 1, then they ignore the value of Vector. Make KVM act accordingly. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Roman Kagan Signed-off-by: Radim Krčmář arch/x86/kvm/hyperv.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 98f65ad458441ea3a243395345811132ee850093 Author: Vitaly Kuznetsov Date: Thu Mar 1 15:15:13 2018 +0100 x86/kvm/hyper-v: remove stale entries from vec_bitmap/auto_eoi_bitmap on vector change When a new vector is written to SINx we update vec_bitmap/auto_eoi_bitmap but we forget to remove old vector from these masks (in case it is not present in some other SINTx). Signed-off-by: Vitaly Kuznetsov Reviewed-by: Roman Kagan Signed-off-by: Radim Krčmář arch/x86/include/uapi/asm/hyperv.h | 2 ++ arch/x86/kvm/hyperv.c | 32 ++++++++++++++++++++++---------- 2 files changed, 24 insertions(+), 10 deletions(-) commit a2e164e7f45ab21742b2e32c0195b699ae2ebfc0 Author: Vitaly Kuznetsov Date: Thu Mar 1 15:15:12 2018 +0100 x86/kvm/hyper-v: add reenlightenment MSRs support Nested Hyper-V/Windows guest running on top of KVM will use TSC page clocksource in two cases: - L0 exposes invariant TSC (CPUID.80000007H:EDX[8]). - L0 provides Hyper-V Reenlightenment support (CPUID.40000003H:EAX[13]). Exposing invariant TSC effectively blocks migration to hosts with different TSC frequencies, providing reenlightenment support will be needed when we start migrating nested workloads. Implement rudimentary support for reenlightenment MSRs. For now, these are just read/write MSRs with no effect. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Roman Kagan Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_host.h | 4 ++++ arch/x86/kvm/hyperv.c | 21 +++++++++++++++++++++ arch/x86/kvm/x86.c | 12 +++++++++++- 3 files changed, 36 insertions(+), 1 deletion(-) commit ddd6f0e94d3153951580d5b88b9d97c7e26a0e00 Author: KarimAllah Ahmed Date: Wed Feb 28 19:06:48 2018 +0100 KVM: x86: Update the exit_qualification access bits while walking an address ... to avoid having a stale value when handling an EPT misconfig for MMIO regions. MMIO regions that are not passed-through to the guest are handled through EPT misconfigs. The first time a certain MMIO page is touched it causes an EPT violation, then KVM marks the EPT entry to cause an EPT misconfig instead. Any subsequent accesses to the entry will generate an EPT misconfig. Things gets slightly complicated with nested guest handling for MMIO regions that are not passed through from L0 (i.e. emulated by L0 user-space). An EPT violation for one of these MMIO regions from L2, exits to L0 hypervisor. L0 would then look at the EPT12 mapping for L1 hypervisor and realize it is not present (or not sufficient to serve the request). Then L0 injects an EPT violation to L1. L1 would then update its EPT mappings. The EXIT_QUALIFICATION value for L1 would come from exit_qualification variable in "struct vcpu". The problem is that this variable is only updated on EPT violation and not on EPT misconfig. So if an EPT violation because of a read happened first, then an EPT misconfig because of a write happened afterwards. The L0 hypervisor will still contain exit_qualification value from the previous read instead of the write and end up injecting an EPT violation to the L1 hypervisor with an out of date EXIT_QUALIFICATION. The EPT violation that is injected from L0 to L1 needs to have the correct EXIT_QUALIFICATION specially for the access bits because the individual access bits for MMIO EPTs are updated only on actual access of this specific type. So for the example above, the L1 hypervisor will keep updating only the read bit in the EPT then resume the L2 guest. The L2 guest would end up causing another exit where the L0 *again* will inject another EPT violation to L1 hypervisor with *again* an out of date exit_qualification which indicates a read and not a write. Then this ping-pong just keeps happening without making any forward progress. The behavior of mapping MMIO regions changed in: commit a340b3e229b24 ("kvm: Map PFN-type memory regions as writable (if possible)") ... where an EPT violation for a read would also fixup the write bits to avoid another EPT violation which by acciddent would fix the bug mentioned above. This commit fixes this situation and ensures that the access bits for the exit_qualifcation is up to date. That ensures that even L1 hypervisor running with a KVM version before the commit mentioned above would still work. ( The description above assumes EPT to be available and used by L1 hypervisor + the L1 hypervisor is passing through the MMIO region to the L2 guest while this MMIO region is emulated by the L0 user-space ). Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed Signed-off-by: Radim Krčmář arch/x86/kvm/paging_tmpl.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 1df372f473f6b2790c5a614c021d1accff97a9c0 Author: Matthias Kaehlcke Date: Mon Feb 26 14:42:24 2018 -0800 KVM: x86: Make enum conversion explicit in kvm_pdptr_read() The type 'enum kvm_reg_ex' is an extension of 'enum kvm_reg', however the extension is only semantical and the compiler doesn't know about the relationship between the two types. In kvm_pdptr_read() a value of the extended type is passed to kvm_x86_ops->cache_reg(), which expects a value of the base type. Clang raises the following warning about the type mismatch: arch/x86/kvm/kvm_cache_regs.h:44:32: warning: implicit conversion from enumeration type 'enum kvm_reg_ex' to different enumeration type 'enum kvm_reg' [-Wenum-conversion] kvm_x86_ops->cache_reg(vcpu, VCPU_EXREG_PDPTR); Cast VCPU_EXREG_PDPTR to 'enum kvm_reg' to make the compiler happy. Signed-off-by: Matthias Kaehlcke Reviewed-by: Guenter Roeck Signed-off-by: Radim Krčmář arch/x86/kvm/kvm_cache_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bcc3fb95b97ac2ca223a5a870287b37f56265ac Author: Vitaly Kuznetsov Date: Fri Feb 9 14:01:33 2018 +0100 KVM: lapic: stop advertising DIRECTED_EOI when in-kernel IOAPIC is in use Devices which use level-triggered interrupts under Windows 2016 with Hyper-V role enabled don't work: Windows disables EOI broadcast in SPIV unconditionally. Our in-kernel IOAPIC implementation emulates an old IOAPIC version which has no EOI register so EOI never happens. The issue was discovered and discussed a while ago: https://www.spinics.net/lists/kvm/msg148098.html While this is a guest OS bug (it should check that IOAPIC has the required capabilities before disabling EOI broadcast) we can workaround it in KVM: advertising DIRECTED_EOI with in-kernel IOAPIC makes little sense anyway. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Radim Krčmář arch/x86/kvm/lapic.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit c51eb52b8f9835f8f4f51e390885f8ddcfe53871 Author: Janakarajan Natarajan Date: Mon Feb 5 13:24:52 2018 -0600 KVM: x86: Add support for AMD Core Perf Extension in guest Add support for AMD Core Performance counters in the guest. The base event select and counter MSRs are changed. In addition, with the core extension, there are 2 extra counters available for performance measurements for a total of 6. With the new MSRs, the logic to map them to the gp_counters[] is changed. New functions are added to check the validity of the get/set MSRs. If the guest has the X86_FEATURE_PERFCTR_CORE cpuid flag set, the number of counters available to the vcpu is set to 6. It the flag is not set then it is 4. Signed-off-by: Janakarajan Natarajan [Squashed "Expose AMD Core Perf Extension flag to guests" - Radim.] Signed-off-by: Radim Krčmář arch/x86/kvm/cpuid.c | 2 +- arch/x86/kvm/pmu_amd.c | 142 ++++++++++++++++++++++++++++++++++++++++++++----- arch/x86/kvm/x86.c | 1 + 3 files changed, 130 insertions(+), 15 deletions(-) commit e84b7119e891556d0786c6dafe53286d89f082cc Author: Janakarajan Natarajan Date: Mon Feb 5 13:24:51 2018 -0600 x86/msr: Add AMD Core Perf Extension MSRs Add the EventSelect and Counter MSRs for AMD Core Perf Extension. Signed-off-by: Janakarajan Natarajan Acked-by: Thomas Gleixner Signed-off-by: Radim Krčmář arch/x86/include/asm/msr-index.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 24868367cdcac447232ebcb2aa06e1bf91291586 Author: Mark Rutland Date: Fri Mar 16 12:51:40 2018 +0000 perf/core: Clear sibling list of detached events When perf_group_dettach() is called on a group leader, it updates each sibling's group_leader field to point to that sibling, effectively upgrading each siblnig to a group leader. After perf_group_detach has completed, the caller may free the leader event. We only remove siblings from the group leader's sibling_list when the leader has a non-empty group_node. This was fine prior to commit: 8343aae66167df67 ("perf/core: Remove perf_event::group_entry") ... as the sibling's sibling_list would be empty. However, now that we use the sibling_list field as both the list head and the list entry, this leaves each sibling with a non-empty sibling list, including the stale leader event. If perf_group_detach() is subsequently called on a sibling, it will appear to be a group leader, and we'll walk the sibling_list, potentially dereferencing these stale events. In 0day testing, this has been observed to result in kernel panics. Let's avoid this by always removing siblings from the sibling list when we promote them to leaders. Fixes: 8343aae66167df67 ("perf/core: Remove perf_event::group_entry") Signed-off-by: Mark Rutland Signed-off-by: Thomas Gleixner Cc: vincent.weaver@maine.edu Cc: Peter Zijlstra Cc: torvalds@linux-foundation.org Cc: Alexey Budankov Cc: valery.cherepennikov@intel.com Cc: linux-tip-commits@vger.kernel.org Cc: eranian@google.com Cc: acme@redhat.com Cc: alexander.shishkin@linux.intel.com Cc: davidcc@google.com Cc: kan.liang@intel.com Cc: Dmitry.Prohorov@intel.com Cc: Jiri Olsa Link: https://lkml.kernel.org/r/20180316131741.3svgr64yibc6vsid@lakrids.cambridge.arm.com kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edb39592a5877bd91b2e6ee15194268f35b04892 Author: Peter Zijlstra Date: Thu Mar 15 17:36:56 2018 +0100 perf: Fix sibling iteration Mark noticed that the change to sibling_list changed some iteration semantics; because previously we used group_list as list entry, sibling events would always have an empty sibling_list. But because we now use sibling_list for both list head and list entry, siblings will report as having siblings. Fix this with a custom for_each_sibling_event() iterator. Fixes: 8343aae66167 ("perf/core: Remove perf_event::group_entry") Reported-by: Mark Rutland Suggested-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: vincent.weaver@maine.edu Cc: alexander.shishkin@linux.intel.com Cc: torvalds@linux-foundation.org Cc: alexey.budankov@linux.intel.com Cc: valery.cherepennikov@intel.com Cc: eranian@google.com Cc: acme@redhat.com Cc: linux-tip-commits@vger.kernel.org Cc: davidcc@google.com Cc: kan.liang@intel.com Cc: Dmitry.Prohorov@intel.com Cc: jolsa@redhat.com Link: https://lkml.kernel.org/r/20180315170129.GX4043@hirez.programming.kicks-ass.net arch/alpha/kernel/perf_event.c | 2 +- arch/arm/mach-imx/mmdc.c | 2 +- arch/arm/mm/cache-l2x0-pmu.c | 2 +- arch/mips/kernel/perf_event_mipsxx.c | 2 +- arch/powerpc/perf/core-book3s.c | 2 +- arch/powerpc/perf/core-fsl-emb.c | 2 +- arch/sparc/kernel/perf_event.c | 2 +- arch/x86/events/core.c | 2 +- arch/x86/events/intel/uncore.c | 2 +- drivers/bus/arm-cci.c | 2 +- drivers/bus/arm-ccn.c | 4 ++-- drivers/perf/arm_dsu_pmu.c | 2 +- drivers/perf/arm_pmu.c | 2 +- drivers/perf/hisilicon/hisi_uncore_pmu.c | 2 +- drivers/perf/qcom_l2_pmu.c | 7 +++---- drivers/perf/qcom_l3_pmu.c | 2 +- drivers/perf/xgene_pmu.c | 4 ++-- include/linux/perf_event.h | 4 ++++ kernel/events/core.c | 34 +++++++++++++++----------------- 19 files changed, 41 insertions(+), 40 deletions(-) commit a08f6dd4190e90dc7b013435acb66770f117e8b0 Author: Yisheng Xie Date: Tue Mar 13 20:31:14 2018 +0800 perf debug: Avoid setting 'quiet' to 'true' unnecessarily When using --quiet to disable messages, we will set the 'quiet' variable to 'true' first, then check that variable to decide whether we need to call perf_quiet_option(), so no need to set 'quiet' to 'true' once more in perf_quiet_option(). Signed-off-by: Yisheng Xie Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1520944274-37001-2-git-send-email-xieyisheng1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/debug.c | 1 - 1 file changed, 1 deletion(-) commit 699db111058798bcc9f92a93767062905a561bef Author: Yisheng Xie Date: Tue Mar 13 20:31:13 2018 +0800 perf mmap: Discard head in overwrite_rb_find_range() In overwrite mode, start will be set to head in perf_mmap__read_init(). Therefore, there is no need to set the start one more time in overwrite_rb_find_range() and *start can be used as head instead of passing head to overwrite_rb_find_range(). Signed-off-by: Yisheng Xie Reviewed-by: Kan Liang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1520944274-37001-1-git-send-email-xieyisheng1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/mmap.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 53794570049d314742f156c99022914840a3d5ab Author: Yousuk Seung Date: Fri Mar 16 10:51:49 2018 -0700 net-tcp_bbr: set tp->snd_ssthresh to BDP upon STARTUP exit Set tp->snd_ssthresh to BDP upon STARTUP exit. This allows us to check if a BBR flow exited STARTUP and the BDP at the time of STARTUP exit with SCM_TIMESTAMPING_OPT_STATS. Since BBR does not use snd_ssthresh this fix has no impact on BBR's behavior. Signed-off-by: Yousuk Seung Signed-off-by: Neal Cardwell Signed-off-by: Priyaranjan Jha Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp_bbr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7156d194a0772f733865267e7207e0b08f81b02b Author: Yousuk Seung Date: Fri Mar 16 10:51:07 2018 -0700 tcp: add snd_ssthresh stat in SCM_TIMESTAMPING_OPT_STATS This patch adds TCP_NLA_SND_SSTHRESH stat into SCM_TIMESTAMPING_OPT_STATS that reports tcp_sock.snd_ssthresh. Signed-off-by: Yousuk Seung Signed-off-by: Neal Cardwell Signed-off-by: Priyaranjan Jha Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Yuchung Cheng Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller include/uapi/linux/tcp.h | 1 + net/ipv4/tcp.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 5dce837944de76b5ba9cff6d2a3ecde6f4838665 Author: Vinicius Costa Gomes Date: Fri Mar 16 10:41:14 2018 -0700 selftests/txtimestamp: Add more configurable parameters Add a way to configure if poll() should wait forever for an event, the number of packets that should be sent for each and if there should be any delay between packets. Signed-off-by: Vinicius Costa Gomes Signed-off-by: David S. Miller .../selftests/networking/timestamping/txtimestamp.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 5eb297a9a5aa5745b67ef1e7a399c0a7678d1d3f Author: Intiyaz Basha Date: Fri Mar 16 10:21:31 2018 -0700 liquidio: Simplified napi poll 1) Moved interrupt enable related code from octeon_process_droq_poll_cmd() to separate function octeon_enable_irq(). 2) Removed wrapper function octeon_process_droq_poll_cmd(), and directlyi using octeon_droq_process_poll_pkts(). 3) Removed unused macros POLL_EVENT_XXX. Signed-off-by: Intiyaz Basha Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_core.c | 7 +- drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 83 ++++++++-------------- drivers/net/ethernet/cavium/liquidio/octeon_droq.h | 11 ++- 3 files changed, 35 insertions(+), 66 deletions(-) commit 1f674e16f9ce6eb20ee2e81ae7514737376874de Author: Geert Uytterhoeven Date: Fri Mar 16 14:25:42 2018 +0100 usb: gadget: Add NO_DMA dummies for DMA mapping API Add dummies for usb_gadget_{,un}map_request{,_by_dev}(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "usb_gadget_unmap_request_by_dev" [drivers/usb/renesas_usbhs/renesas_usbhs.ko] undefined! ERROR: "usb_gadget_map_request_by_dev" [drivers/usb/renesas_usbhs/renesas_usbhs.ko] undefined! ERROR: "usb_gadget_map_request" [drivers/usb/mtu3/mtu3.ko] undefined! ERROR: "usb_gadget_unmap_request" [drivers/usb/mtu3/mtu3.ko] undefined! ERROR: "usb_gadget_map_request" [drivers/usb/gadget/udc/renesas_usb3.ko] undefined! ERROR: "usb_gadget_unmap_request" [drivers/usb/gadget/udc/renesas_usb3.ko] undefined! Signed-off-by: Geert Uytterhoeven Reviewed-by: Mark Brown Acked-by: Felipe Balbi Acked-by: Greg Kroah-Hartman Acked-by: Robin Murphy Signed-off-by: Christoph Hellwig include/linux/usb/gadget.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit bff739b6559e2fcec37cd0465c7aa37663f4baeb Author: Geert Uytterhoeven Date: Fri Mar 16 14:25:44 2018 +0100 scsi: Add NO_DMA dummies for SCSI DMA mapping API Add dummies for scsi_dma_{,un}map(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "scsi_dma_unmap" [drivers/firewire/firewire-sbp2.ko] undefined! ERROR: "scsi_dma_map" [drivers/firewire/firewire-sbp2.ko] undefined! Signed-off-by: Geert Uytterhoeven Reviewed-by: Mark Brown Acked-by: Robin Murphy Signed-off-by: Christoph Hellwig include/scsi/scsi_cmnd.h | 5 +++++ 1 file changed, 5 insertions(+) commit c1ce6c2beea38171a57c56e55875318cef9a2ad5 Author: Geert Uytterhoeven Date: Fri Mar 16 14:25:43 2018 +0100 mm: Add NO_DMA dummies for DMA pool API Add dummies for dma{,m}_pool_{create,destroy,alloc,free}(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "dma_pool_destroy" [drivers/usb/mtu3/mtu3.ko] undefined! ERROR: "dma_pool_free" [drivers/usb/mtu3/mtu3.ko] undefined! ERROR: "dma_pool_alloc" [drivers/usb/mtu3/mtu3.ko] undefined! ERROR: "dma_pool_create" [drivers/usb/mtu3/mtu3.ko] undefined! ERROR: "dma_pool_destroy" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined! ERROR: "dma_pool_free" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined! ERROR: "dma_pool_alloc" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined! ERROR: "dma_pool_create" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined! ERROR: "dma_pool_alloc" [drivers/mailbox/bcm-pdc-mailbox.ko] undefined! ERROR: "dma_pool_free" [drivers/mailbox/bcm-pdc-mailbox.ko] undefined! ERROR: "dma_pool_create" [drivers/mailbox/bcm-pdc-mailbox.ko] undefined! ERROR: "dma_pool_destroy" [drivers/mailbox/bcm-pdc-mailbox.ko] undefined! Signed-off-by: Geert Uytterhoeven Reviewed-by: Mark Brown Acked-by: Robin Murphy Signed-off-by: Christoph Hellwig include/linux/dmapool.h | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) commit ab642e952f80c66c5592f0e2c35588843a813df8 Author: Geert Uytterhoeven Date: Fri Mar 16 14:25:41 2018 +0100 dma-coherent: Add NO_DMA dummies for managed DMA API Add dummies for dmam_{alloc,free}_coherent(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "dmam_alloc_coherent" [drivers/net/ethernet/arc/arc_emac.ko] undefined! ERROR: "dmam_free_coherent" [drivers/net/ethernet/apm/xgene/xgene-enet.ko] undefined! ERROR: "dmam_alloc_coherent" [drivers/net/ethernet/apm/xgene/xgene-enet.ko] undefined! ERROR: "dmam_alloc_coherent" [drivers/mtd/nand/hisi504_nand.ko] undefined! ERROR: "dmam_alloc_coherent" [drivers/mmc/host/dw_mmc.ko] undefined! Signed-off-by: Geert Uytterhoeven Reviewed-by: Mark Brown Acked-by: Robin Murphy Signed-off-by: Christoph Hellwig include/linux/dma-mapping.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit f29ab49b5388b2f829cf99859bc5f8ad8ec4d06a Author: Geert Uytterhoeven Date: Fri Mar 16 14:25:40 2018 +0100 dma-mapping: Convert NO_DMA get_dma_ops() into a real dummy If NO_DMA=y, get_dma_ops() returns a reference to the non-existing symbol bad_dma_ops, thus causing a link failure if it is ever used. Make get_dma_ops() return NULL instead, to avoid the link failure. This allows to improve compile-testing, and limits the need to keep on sprinkling dependencies on HAS_DMA all over the place. Signed-off-by: Geert Uytterhoeven Reviewed-by: Mark Brown Acked-by: Robin Murphy Signed-off-by: Christoph Hellwig include/linux/dma-mapping.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b8124b53d1b98cf1af23f3584c774959e7634034 Merge: 8b7372c aaa4d33 Author: David S. Miller Date: Fri Mar 16 14:57:26 2018 -0400 Merge branch 'net-smc-IPv6-support' Ursula Braun says: ==================== net/smc: IPv6 support these smc patches for the net-next tree add IPv6 support. ==================== Signed-off-by: David S. Miller commit aaa4d33f6da1e1a415f4f7c299a97defd845ce7d Author: Karsten Graul Date: Fri Mar 16 15:06:41 2018 +0100 net/smc: enable ipv6 support for smc Add ipv6 support to the smc socket layer functions. Make use of the updated clc layer functions to retrieve and match ipv6 information. The indicator for ipv4 or ipv6 is the protocol constant that is provided in the socket() call with address family AF_SMC. Based-on-patch-by: Takanori Ueda Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 64 ++++++++++++++++++++++++++++++++++++++++++-------------- net/smc/smc.h | 4 +++- 2 files changed, 51 insertions(+), 17 deletions(-) commit 1a26d0201d7670fd6c9086e15504911ce240e6ff Author: Karsten Graul Date: Fri Mar 16 15:06:40 2018 +0100 net/smc: add ipv6 support to CLC layer The CLC layer is updated to support ipv6 proposal messages from peers and to match incoming proposal messages against the ipv6 addresses of the net device. struct smc_clc_ipv6_prefix is updated to provide the space for an ipv6 address (struct was not used before). SMC_CLC_MAX_LEN is updated to include the size of the proposal prefix. Existing code in net is not affected, the previous SMC_CLC_MAX_LEN value is large enough to hold ipv4 proposal messages. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/smc_clc.c | 109 +++++++++++++++++++++++++++++++++++++++++++++++------- net/smc/smc_clc.h | 13 +++++-- 2 files changed, 105 insertions(+), 17 deletions(-) commit c246d942eabc3288f5d93930663411070093ac52 Author: Karsten Graul Date: Fri Mar 16 15:06:39 2018 +0100 net/smc: restructure netinfo for CLC proposal msgs Introduce functions smc_clc_prfx_set to retrieve IP information for the CLC proposal msg and smc_clc_prfx_match to match the contents of a proposal message against the IP addresses of the net device. The new functions replace the functionality provided by smc_clc_netinfo_by_tcpsk, which is removed by this patch. The match functionality is extended to scan all ipv4 addresses of the net device for a match against the ipv4 subnet from the proposal msg. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 14 ++------ net/smc/smc_clc.c | 100 +++++++++++++++++++++++++++++++++++++++++------------- net/smc/smc_clc.h | 4 +-- 3 files changed, 82 insertions(+), 36 deletions(-) commit 8b7372c101a5f9f38a092ab2533a75fc85c6e52a Author: Ganesh Goudar Date: Fri Mar 16 14:22:57 2018 +0530 cxgb4: notify fatal error to uld drivers notify uld drivers if the adapter encounters fatal error. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/infiniband/hw/cxgb4/device.c | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 10 ++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 3 ++- 4 files changed, 14 insertions(+), 1 deletion(-) commit 948373b3ed1bcf05a237c24675b84804315aff14 Author: Dexuan Cui Date: Thu Mar 15 14:22:00 2018 +0000 PCI: hv: Only queue new work items in hv_pci_devices_present() if necessary If there is pending work in hv_pci_devices_present() we just need to add the new dr entry into the dr_list. Add a check to detect pending work items and update the code to skip queuing work if pending work items are detected. Signed-off-by: Dexuan Cui [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Michael Kelley Acked-by: Haiyang Zhang Cc: Vitaly Kuznetsov Cc: Jack Morgenstein Cc: Stephen Hemminger Cc: K. Y. Srinivasan drivers/pci/host/pci-hyperv.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit fca288c0153b2b97114b9081bc3c33c3735145b6 Author: Dexuan Cui Date: Thu Mar 15 14:21:43 2018 +0000 PCI: hv: Remove the bogus test in hv_eject_device_work() When kernel is executing hv_eject_device_work(), hpdev->state value must be hv_pcichild_ejecting; any other value would consist in a bug, therefore replace the bogus check with an explicit WARN_ON() on the condition failure detection. Signed-off-by: Dexuan Cui [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Michael Kelley Acked-by: Haiyang Zhang Cc: Vitaly Kuznetsov Cc: Jack Morgenstein Cc: Stephen Hemminger Cc: K. Y. Srinivasan drivers/pci/host/pci-hyperv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit df3f2159f4e4146d40b244725ce79ed921530b99 Author: Dexuan Cui Date: Thu Mar 15 14:21:35 2018 +0000 PCI: hv: Fix a comment typo in _hv_pcifront_read_config() Comment in _hv_pcifront_read_config() contains a typo, fix it. No functional change. Signed-off-by: Dexuan Cui [lorenzo.pieralisi@arm.com: changed commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Haiyang Zhang Cc: Vitaly Kuznetsov Cc: Stephen Hemminger Cc: K. Y. Srinivasan drivers/pci/host/pci-hyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de0aa7b2f97d348ba7d1e17a00744c989baa0cb6 Author: Dexuan Cui Date: Thu Mar 15 14:21:08 2018 +0000 PCI: hv: Fix 2 hang issues in hv_compose_msi_msg() 1. With the patch "x86/vector/msi: Switch to global reservation mode", the recent v4.15 and newer kernels always hang for 1-vCPU Hyper-V VM with SR-IOV. This is because when we reach hv_compose_msi_msg() by request_irq() -> request_threaded_irq() ->__setup_irq()->irq_startup() -> __irq_startup() -> irq_domain_activate_irq() -> ... -> msi_domain_activate() -> ... -> hv_compose_msi_msg(), local irq is disabled in __setup_irq(). Note: when we reach hv_compose_msi_msg() by another code path: pci_enable_msix_range() -> ... -> irq_domain_activate_irq() -> ... -> hv_compose_msi_msg(), local irq is not disabled. hv_compose_msi_msg() depends on an interrupt from the host. With interrupts disabled, a UP VM always hangs in the busy loop in the function, because the interrupt callback hv_pci_onchannelcallback() can not be called. We can do nothing but work it around by polling the channel. This is ugly, but we don't have any other choice. 2. If the host is ejecting the VF device before we reach hv_compose_msi_msg(), in a UP VM, we can hang in hv_compose_msi_msg() forever, because at this time the host doesn't respond to the CREATE_INTERRUPT request. This issue exists the first day the pci-hyperv driver appears in the kernel. Luckily, this can also by worked around by polling the channel for the PCI_EJECT message and hpdev->state, and by checking the PCI vendor ID. Note: actually the above 2 issues also happen to a SMP VM, if "hbus->hdev->channel->target_cpu == smp_processor_id()" is true. Fixes: 4900be83602b ("x86/vector/msi: Switch to global reservation mode") Tested-by: Adrian Suhov Tested-by: Chris Valean Signed-off-by: Dexuan Cui Signed-off-by: Lorenzo Pieralisi Reviewed-by: Michael Kelley Acked-by: Haiyang Zhang Cc: Cc: Stephen Hemminger Cc: K. Y. Srinivasan Cc: Vitaly Kuznetsov Cc: Jack Morgenstein drivers/pci/host/pci-hyperv.c | 58 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) commit 021ad274d7dc31611d4f47f7dd4ac7a224526f30 Author: Dexuan Cui Date: Thu Mar 15 14:20:53 2018 +0000 PCI: hv: Serialize the present and eject work items When we hot-remove the device, we first receive a PCI_EJECT message and then receive a PCI_BUS_RELATIONS message with bus_rel->device_count == 0. The first message is offloaded to hv_eject_device_work(), and the second is offloaded to pci_devices_present_work(). Both the paths can be running list_del(&hpdev->list_entry), causing general protection fault, because system_wq can run them concurrently. The patch eliminates the race condition. Since access to present/eject work items is serialized, we do not need the hbus->enum_sem anymore, so remove it. Fixes: 4daace0d8ce8 ("PCI: hv: Add paravirtual PCI front-end for Microsoft Hyper-V VMs") Link: https://lkml.kernel.org/r/KL1P15301MB00064DA6B4D221123B5241CFBFD70@KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM Tested-by: Adrian Suhov Tested-by: Chris Valean Signed-off-by: Dexuan Cui [lorenzo.pieralisi@arm.com: squashed semaphore removal patch] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Michael Kelley Acked-by: Haiyang Zhang Cc: # v4.6+ Cc: Vitaly Kuznetsov Cc: Jack Morgenstein Cc: Stephen Hemminger Cc: K. Y. Srinivasan drivers/pci/host/pci-hyperv.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 9749adc3b2a23c91b2eda8758ff0c650d731aa2f Author: Sukadev Bhattiprolu Date: Tue Mar 13 12:33:29 2018 -0500 perf vendor events: Update POWER9 events Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Sukadev Bhattiprolu Link: https://lkml.kernel.org/r/20180313224647.GA22960@us.ibm.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/powerpc/power9/cache.json | 25 --- .../pmu-events/arch/powerpc/power9/frontend.json | 10 - .../pmu-events/arch/powerpc/power9/marked.json | 5 - .../pmu-events/arch/powerpc/power9/memory.json | 5 - .../perf/pmu-events/arch/powerpc/power9/other.json | 241 ++++++++++++++------- .../pmu-events/arch/powerpc/power9/pipeline.json | 50 ++--- tools/perf/pmu-events/arch/powerpc/power9/pmc.json | 5 - .../arch/powerpc/power9/translation.json | 10 +- 8 files changed, 178 insertions(+), 173 deletions(-) commit 57b5de463925b9fbd1eff56a38a510495ac9c2c0 Author: Jiri Olsa Date: Wed Mar 14 10:22:05 2018 +0100 perf report: Support forced leader feature in pipe mode Stephane reported a problem with forced leader in pipe mode, where report does not force the group output. The reason is that we don't force the leader in pipe mode. This patch adds HEADER_LAST_FEATURE mark to have a point where we have all events and features received, and force the group if requested. $ perf record --group -e '{cycles, instructions}' -o - kill | perf report -i - --group SNIP # Overhead Command Shared Object Symbol # ................ ....... ................ ....................... # 28.36% 0.00% kill libc-2.25.so [.] __unregister_atfork 26.32% 0.00% kill libc-2.25.so [.] _dl_addr 26.10% 0.00% kill ld-2.25.so [.] _dl_relocate_object 17.32% 0.00% kill ld-2.25.so [.] __tunables_init 1.70% 0.01% kill [unknown] [k] 0xffffffffafa01a40 0.20% 0.00% kill ld-2.25.so [.] _start 0.00% 48.77% kill ld-2.25.so [.] do_lookup_x 0.00% 42.97% kill libc-2.25.so [.] _IO_getline 0.00% 6.35% kill ld-2.25.so [.] strcmp 0.00% 1.71% kill ld-2.25.so [.] _dl_sysdep_start 0.00% 0.19% kill ld-2.25.so [.] _dl_start Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: Stephane Eranian Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180314092205.23291-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-report.c | 57 ++++++++++++++++++++++++++++++++++----------- tools/perf/util/header.c | 11 ++++++++- 2 files changed, 53 insertions(+), 15 deletions(-) commit a2015516c5c0be932a69e1d3405c2fb03b4eacf1 Author: Jiri Olsa Date: Wed Mar 14 10:22:04 2018 +0100 perf record: Synthesize features before events in pipe mode We need to synthesize events first, because some features works on top of them (on report side). Signed-off-by: Jiri Olsa Tested-by: Stephane Eranian Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180314092205.23291-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 66790bc8e1f51831d73691954ae0b430bde614ad Author: Colin Ian King Date: Wed Mar 14 17:33:54 2018 +0000 perf tests: Fix out of bounds access on array fd when cnt is 100 Currently when cnt is 100 an array bounds overflow occurs on the assignment of fd[cnt]. Fix this by performing the bounds check on cnt before writing to fd. Detected by cppcheck: tools/perf/tests/bp_account.c:115: (warning) Either the condition 'cnt==100' is redundant or the array 'fd[100]' is accessed at index 100, which is out of bounds. Signed-off-by: Colin King Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: kernel-janitors@vger.kernel.org Fixes: 032db28e5fa3 ("perf tests: Add breakpoint accounting/modify test") Link: http://lkml.kernel.org/r/20180314173354.11250-1-colin.king@canonical.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/bp_account.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 6810158d526e483868e519befff407b91e76b3db Author: Arnaldo Carvalho de Melo Date: Wed Mar 14 10:34:11 2018 -0300 perf annotate: Use asprintf when formatting objdump command line We were using a local buffer with an arbitrary size, that would have to get increased to avoid truncation as warned by gcc 8: util/annotate.c: In function 'symbol__disassemble': util/annotate.c:1488:4: error: '%s' directive output may be truncated writing up to 4095 bytes into a region of size between 3966 and 8086 [-Werror=format-truncation=] "%s %s%s --start-address=0x%016" PRIx64 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ util/annotate.c:1498:20: symfs_filename, symfs_filename); ~~~~~~~~~~~~~~ util/annotate.c:1490:50: note: format string is defined here " -l -d %s %s -C \"%s\" 2>/dev/null|grep -v \"%s:\"|expand", ^~ In file included from /usr/include/stdio.h:861, from util/color.h:5, from util/sort.h:8, from util/annotate.c:14: /usr/include/bits/stdio2.h:67:10: note: '__builtin___snprintf_chk' output 116 or more bytes (assuming 8331) into a destination of size 8192 return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ So switch to asprintf, that will make sure enough space is available. Cc: Adrian Hunter Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-qagoy2dmbjpc9gdnaj0r3mml@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 10f354a36f9a9aa1b8bffe0abc1cd43822a85bcd Author: Sandipan Das Date: Mon Mar 12 18:14:50 2018 +0530 perf test: Fix exit code for record+probe_libc_inet_pton.sh This fixes record+probe_libc_inet_pton.sh from always exiting with code 0 and making the test pass even if the perf script output does not match the expected pattern. The issue can be observed if this test is run with the verbose flags as shown below: 60: probe libc's inet_pton & backtrace it with ping : ... ping 19602 [006] 16988.413767: probe_libc:inet_pton: (7fff9a2c42e8) 1842e8 __GI___inet_pton (/usr/lib64/libc-2.26.so) 130db4 getaddrinfo (/usr/lib64/libc-2.26.so) FAIL: expected backtrace entry 3 ".*\(.*/bin/ping.*\)$" got "" test child finished with 0 ... probe libc's inet_pton & backtrace it with ping: Ok Signed-off-by: Sandipan Das Cc: Jiri Olsa Cc: Naveen N. Rao Fixes: e07d585e2454 ("perf tests: Switch trace+probe_libc_inet_pton to use record") Link: http://lkml.kernel.org/r/20180312124450.30371-1-sandipan@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c192524e6fe8a4bd18f2549f9556b81ed9e05a86 Author: Jiri Olsa Date: Mon Mar 12 16:24:06 2018 +0100 perf machine: Fix mmap name setup Leo reported broken -k option behavior. The reason is that we used symbol_conf.vmlinux_name as a source for mmap event name, but in fact it's a vmlinux path. Moving the symbol_conf.vmlinux_name check for both host and guest to the proper place and out of the machine__set_mmap_name function. Reported-by: Leo Yan Signed-off-by: Jiri Olsa Tested-by: Leo Yan Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Fixes: commit ("8c7f1bb37b29 perf machine: Move kernel mmap name into struct machine") Link: http://lkml.kernel.org/r/20180312152406.10141-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 26e4711fc8352252f474a02429d7495652c4aef7 Author: Thomas Richter Date: Mon Mar 12 11:38:07 2018 +0100 perf stat: Make function perf_stat_evsel_id_init static Function perf_stat_evsel_id_init() has global linkage but is only used in util/stat.c. Make it static. Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180312103807.45069-2-tmricht@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat.c | 2 +- tools/perf/util/stat.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit 5eab5a7ee032acaab3da8fc95a3614fec14687ac Author: Jiri Olsa Date: Mon Mar 12 10:43:02 2018 +0100 perf llvm: Display eBPF compiling command in debug output In addition to template, display also the real compile command line with all the variables substituted. llvm compiling command template: $CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS ... llvm compiling command : /usr/bin/clang -D__KERNEL__ -D__NR_CPUS__=24 -DLINUX_VERSION_CODE=0x41000 ... Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180312094313.18738-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/llvm-utils.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit a3a4a3b37c9b911af4c375b2475cea0fd2b84d38 Author: Yisheng Xie Date: Mon Mar 12 19:25:56 2018 +0800 perf top: Fix top.call-graph config option reading When trying to add the "call-graph" variable for top into the .perfconfig file, like: [top] call-graph = fp I that perf_top_config() do not parse this variable. Fix it by calling perf_default_config() when the top.call-graph variable is set. Signed-off-by: Yisheng Xie Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Fixes: b8cbb349061e ("perf config: Bring perf_default_config to the very beginning at main()") Link: http://lkml.kernel.org/r/1520853957-36106-1-git-send-email-xieyisheng1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-top.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cff17205d6bd363703034510a84d66044aff176e Author: Yisheng Xie Date: Mon Mar 12 19:25:57 2018 +0800 perf record: Avoid duplicate call of perf_default_config() We have brought perf_default_config to the very beginning at main(), so it no need to call perf_default_config() once more for most of config in perf-record but only for record.call-graph. Signed-off-by: Yisheng Xie Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1520853957-36106-2-git-send-email-xieyisheng1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3d20c6246690219881786de10d2dda93f616d0ac Author: Martin Vuille Date: Sun Feb 11 16:24:20 2018 -0500 perf unwind: Unwind with libdw doesn't take symfs into account Path passed to libdw for unwinding doesn't include symfs path if specified, so unwinding fails because ELF file is not found. Similar to unwinding with libunwind, pass symsrc_filename instead of long_name. If there is no symsrc_filename, fallback to long_name. Signed-off-by: Martin Vuille Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/20180211212420.18388-1-jpmv27@aim.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/unwind-libdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8685f088819d21cd5aea5de4c184de427c3625d Author: Ganapatrao Kulkarni Date: Wed Mar 7 16:38:03 2018 +0530 perf vendor events arm64: Enable JSON events for ThunderX2 B0 There is MIDR change on ThunderX2 B0, adding an entry to mapfile to enable JSON events for B0. Signed-off-by: Ganapatrao Kulkarni Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Ganapatrao Kulkarni Cc: Jayachandran C Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Peter Zijlstra Cc: Robert Richter Cc: William Cohen Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20180307110803.32418-1-ganapatrao.kulkarni@cavium.com [ Fixup wrt recent patchset by John Garry ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/arm64/mapfile.csv | 1 + 1 file changed, 1 insertion(+) commit 39ce7fb31530c6d4648919e03e16c5e9286a5940 Author: Ingo Molnar Date: Wed Mar 7 16:24:30 2018 +0100 perf report: Show zero counters as well in 'perf report --stat' When recently using 'perf report --stat' it was not clear to me from the output whether a particular statistics field (LOST_SAMPLES) was not present, or just zero: fomalhaut:~> perf report --stat Aggregated stats: TOTAL events: 495984 MMAP events: 85 COMM events: 3389 EXIT events: 1605 THROTTLE events: 2 UNTHROTTLE events: 2 FORK events: 3377 SAMPLE events: 472629 MMAP2 events: 14753 FINISHED_ROUND events: 139 THREAD_MAP events: 1 CPU_MAP events: 1 TIME_CONV events: 1 I had to check the output several times to ascertain that I'm not misreading the output, that the field didn't change and that I didn't misremember the name. In fact I had to look into the perf source to make sure that zero fields are indeed not shown. With the patch applied: fomalhaut:~> perf report --stat Aggregated stats: TOTAL events: 495984 MMAP events: 85 LOST events: 0 COMM events: 3389 EXIT events: 1605 THROTTLE events: 2 UNTHROTTLE events: 2 FORK events: 3377 READ events: 0 SAMPLE events: 472629 MMAP2 events: 14753 AUX events: 0 ITRACE_START events: 0 LOST_SAMPLES events: 0 SWITCH events: 0 SWITCH_CPU_WIDE events: 0 NAMESPACES events: 0 ATTR events: 0 EVENT_TYPE events: 0 TRACING_DATA events: 0 BUILD_ID events: 0 FINISHED_ROUND events: 139 ID_INDEX events: 0 AUXTRACE_INFO events: 0 AUXTRACE events: 0 AUXTRACE_ERROR events: 0 THREAD_MAP events: 1 CPU_MAP events: 1 STAT_CONFIG events: 0 STAT events: 0 STAT_ROUND events: 0 EVENT_UPDATE events: 0 TIME_CONV events: 1 FEATURE events: 0 It's pretty clear at a glance that LOST_SAMPLES is present but zero. The original output can still be gotten via: fomalhaut:~> perf report --stat | grep -vw 0 Aggregated stats: TOTAL events: 495984 MMAP events: 85 COMM events: 3389 EXIT events: 1605 THROTTLE events: 2 UNTHROTTLE events: 2 FORK events: 3377 SAMPLE events: 472629 MMAP2 events: 14753 FINISHED_ROUND events: 139 THREAD_MAP events: 1 CPU_MAP events: 1 TIME_CONV events: 1 So I don't think there's any real loss in functionality. Signed-off-by: Ingo Molnar Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20180307152430.7e5h7e657b7bgd7q@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/stdio/hist.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit fca32340a5e8b896f57d41fd94b8b1701df25eb1 Author: Thomas Richter Date: Thu Mar 8 15:57:35 2018 +0100 perf stat: Fix core dump when flag T is used Executing command 'perf stat -T -- ls' dumps core on x86 and s390. Here is the call back chain (done on x86): # gdb ./perf .... (gdb) r stat -T -- ls ... Program received signal SIGSEGV, Segmentation fault. 0x00007ffff56d1963 in vasprintf () from /lib64/libc.so.6 (gdb) where #0 0x00007ffff56d1963 in vasprintf () from /lib64/libc.so.6 #1 0x00007ffff56ae484 in asprintf () from /lib64/libc.so.6 #2 0x00000000004f1982 in __parse_events_add_pmu (parse_state=0x7fffffffd580, list=0xbfb970, name=0xbf3ef0 "cpu", head_config=0xbfb930, auto_merge_stats=false) at util/parse-events.c:1233 #3 0x00000000004f1c8e in parse_events_add_pmu (parse_state=0x7fffffffd580, list=0xbfb970, name=0xbf3ef0 "cpu", head_config=0xbfb930) at util/parse-events.c:1288 #4 0x0000000000537ce3 in parse_events_parse (_parse_state=0x7fffffffd580, scanner=0xbf4210) at util/parse-events.y:234 #5 0x00000000004f2c7a in parse_events__scanner (str=0x6b66c0 "task-clock,{instructions,cycles,cpu/cycles-t/,cpu/tx-start/}", parse_state=0x7fffffffd580, start_token=258) at util/parse-events.c:1673 #6 0x00000000004f2e23 in parse_events (evlist=0xbe9990, str=0x6b66c0 "task-clock,{instructions,cycles,cpu/cycles-t/,cpu/tx-start/}", err=0x0) at util/parse-events.c:1713 #7 0x000000000044e137 in add_default_attributes () at builtin-stat.c:2281 #8 0x000000000044f7b5 in cmd_stat (argc=1, argv=0x7fffffffe3b0) at builtin-stat.c:2828 #9 0x00000000004c8b0f in run_builtin (p=0xab01a0 , argc=4, argv=0x7fffffffe3b0) at perf.c:297 #10 0x00000000004c8d7c in handle_internal_command (argc=4, argv=0x7fffffffe3b0) at perf.c:349 #11 0x00000000004c8ece in run_argv (argcp=0x7fffffffe20c, argv=0x7fffffffe200) at perf.c:393 #12 0x00000000004c929c in main (argc=4, argv=0x7fffffffe3b0) at perf.c:537 (gdb) It turns out that a NULL pointer is referenced. Here are the function calls: ... cmd_stat() +---> add_default_attributes() +---> parse_events(evsel_list, transaction_attrs, NULL); 3rd parameter set to NULL Function parse_events(xx, xx, struct parse_events_error *err) dives into a bison generated scanner and creates parser state information for it first: struct parse_events_state parse_state = { .list = LIST_HEAD_INIT(parse_state.list), .idx = evlist->nr_entries, .error = err, <--- NULL POINTER !!! .evlist = evlist, }; Now various functions inside the bison scanner are called to end up in __parse_events_add_pmu(struct parse_events_state *parse_state, ..) with first parameter being a pointer to above structure definition. Now the PMU event name is not found (because being executed in a VM) and this function tries to create an error message with asprintf(&parse_state->error.str, ....) which references a NULL pointer and dumps core. Fix this by providing a pointer to the necessary error information instead of NULL. Technically only the else part is needed to avoid the core dump, just lets be safe... Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180308145735.64717-1-tmricht@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 3d4caec1600e0bf34600a7b700599a20df03629e Author: John Garry Date: Thu Mar 8 18:58:36 2018 +0800 perf vendor events arm64: add HiSilicon hip08 JSON file This patch adds the HiSilicon hip08 JSON file. This platform follows the ARMv8 recommended IMPLEMENTATION DEFINED events, where applicable. Signed-off-by: John Garry Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ganapatrao Kulkarni Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: William Cohen Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lkml.kernel.org/r/1520506716-197429-12-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/arm64/hisilicon/hip08/core-imp-def.json | 122 +++++++++++++++++++++ tools/perf/pmu-events/arch/arm64/mapfile.csv | 1 + 2 files changed, 123 insertions(+) commit afe4d089621d4d90ac0e089b83752ea4515325ac Author: John Garry Date: Thu Mar 8 18:58:35 2018 +0800 perf vendor events arm64: fixup A53 to use recommended events This patch fixes the ARM Cortex-A53 json to use event definition from the ARMv8 recommended events. In addition to this change, other changes were made: - remove stray ',' - remove mirrored events in memory.json and bus.json - fixed indentation to be consistent with other ARM JSONs Signed-off-by: John Garry Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ganapatrao Kulkarni Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: William Cohen Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lkml.kernel.org/r/1520506716-197429-11-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/arm64/arm/cortex-a53/branch.json | 14 +++---- .../pmu-events/arch/arm64/arm/cortex-a53/bus.json | 22 ++--------- .../arch/arm64/arm/cortex-a53/cache.json | 40 ++++++++++---------- .../arch/arm64/arm/cortex-a53/memory.json | 14 +------ .../arch/arm64/arm/cortex-a53/other.json | 44 ++++++++++------------ .../arch/arm64/arm/cortex-a53/pipeline.json | 20 +++++----- 6 files changed, 62 insertions(+), 92 deletions(-) commit ae43053bd2595dc98f0909505dc1d7e1ed8bd239 Author: John Garry Date: Thu Mar 8 18:58:34 2018 +0800 perf vendor events arm64: Fixup ThunderX2 to use recommended events This patch fixes the Cavium ThunderX2 JSON to use event definitions from the ARMv8 recommended events. Signed-off-by: John Garry Tested-by: Ganapatrao Kulkarni Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: William Cohen Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lkml.kernel.org/r/1520506716-197429-10-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/arm64/cavium/thunderx2/core-imp-def.json | 50 +++++----------------- 1 file changed, 10 insertions(+), 40 deletions(-) commit 360b7b03afee042d71ab54ba6ea55daf53edf538 Author: John Garry Date: Thu Mar 8 18:58:33 2018 +0800 perf vendor events arm64: Add armv8-recommended.json Add JSON for ARMv8 IMPLEMENTATION DEFINED recommended events. The JSON is copied from ARMv8 architecture reference manual, available here: https://static.docs.arm.com/ddi0487/ca/DDI0487C_a_armv8_arm.pdf Originally-from: Shaokun Zhang Signed-off-by: John Garry Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ganapatrao Kulkarni Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: William Cohen Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lkml.kernel.org/r/1520506716-197429-9-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/arm64/armv8-recommended.json | 452 +++++++++++++++++++++ 1 file changed, 452 insertions(+) commit e9d32c1bf0cd7a98358ec4aa1625bf2b3459b9ac Author: John Garry Date: Thu Mar 8 18:58:32 2018 +0800 perf vendor events: Add support for arch standard events For some architectures (like arm), there are architecture- defined events. Sometimes these events may be "recommended" according to the architecture standard, in that the implementer is free ignore the "recommendation" and create its custom event. This patch adds support for parsing standard events from arch-defined JSONs, and fixing up vendor events when they have implemented these events as standard. Support is also ensured that the vendor may implement their own custom events. A new step is added to the pmu events parsing to fix up the vendor events with the arch-standard events. The arch-defined JSONs must be placed in the arch root folder for preprocessing prior to tree JSON processing. In the vendor JSON, to specify that the arch event is supported, the keyword "ArchStdEvent" should be used, like this: [ { "ArchStdEvent": "L1D_CACHE_WR", }, ] Matching is based on the "EventName" field in the architecture JSON. No other JSON objects are strictly required. However, for other objects added, these take precedence over architecture defined standard events, thus supporting separate events which have the same event code. Signed-off-by: John Garry Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ganapatrao Kulkarni Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: William Cohen Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lkml.kernel.org/r/1520506716-197429-8-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/Build | 2 + tools/perf/pmu-events/README | 6 ++ tools/perf/pmu-events/jevents.c | 167 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 172 insertions(+), 3 deletions(-) commit 82e6fdd6c01257d64009defbbea19d12ba667670 Author: John Garry Date: Thu Mar 8 18:58:31 2018 +0800 perf vendor events arm64: Relocate Cortex A53 JSONs to arm subdirectory Since jevents now supports vendor subdirectory, relocate the Cortex-A53 JSONs to arm subdirectory. Signed-off-by: John Garry Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ganapatrao Kulkarni Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: William Cohen Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lkml.kernel.org/r/1520506716-197429-7-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/arm64/arm/cortex-a53/branch.json | 27 +++++++++++ .../pmu-events/arch/arm64/arm/cortex-a53/bus.json | 22 +++++++++ .../arch/arm64/arm/cortex-a53/cache.json | 27 +++++++++++ .../arch/arm64/arm/cortex-a53/memory.json | 22 +++++++++ .../arch/arm64/arm/cortex-a53/other.json | 32 +++++++++++++ .../arch/arm64/arm/cortex-a53/pipeline.json | 52 ++++++++++++++++++++++ .../pmu-events/arch/arm64/cortex-a53/branch.json | 27 ----------- .../perf/pmu-events/arch/arm64/cortex-a53/bus.json | 22 --------- .../pmu-events/arch/arm64/cortex-a53/cache.json | 27 ----------- .../pmu-events/arch/arm64/cortex-a53/memory.json | 22 --------- .../pmu-events/arch/arm64/cortex-a53/other.json | 32 ------------- .../pmu-events/arch/arm64/cortex-a53/pipeline.json | 52 ---------------------- tools/perf/pmu-events/arch/arm64/mapfile.csv | 2 +- 13 files changed, 183 insertions(+), 183 deletions(-) commit e3b9f1e81de2083f359bacd2a94bf1c024f2ede0 Author: John Garry Date: Thu Mar 8 18:58:30 2018 +0800 perf vendor events arm64: Relocate ThunderX2 JSON to cavium subdirectory Since jevents now supports vendor subdirectory, relocate the ThunderX2 JSON to Cavium subdirectory. Signed-off-by: John Garry Tested-by: Ganapatrao Kulkarni Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: William Cohen Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lkml.kernel.org/r/1520506716-197429-6-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/arm64/cavium/thunderx2-imp-def.json | 62 ---------------------- .../arch/arm64/cavium/thunderx2/core-imp-def.json | 62 ++++++++++++++++++++++ tools/perf/pmu-events/arch/arm64/mapfile.csv | 2 +- 3 files changed, 63 insertions(+), 63 deletions(-) commit 51ce1dcc5d0d3e40e26893a7fa9e30538960ee7e Author: John Garry Date: Thu Mar 8 18:58:29 2018 +0800 perf vendor events: Add support for pmu events vendor subdirectory For some architectures (like arm), it is required to support a vendor subdirectory and not locate all the JSONs for a specific vendor in the same folder. This is because all the events for the same vendor will be placed in the same pmu events table, which may cause conflict. This conflict would be in the instance that a vendor's custom implemented events do have the same meaning on different platforms, so events in the pmu table would conflict. In addition, per list command may show events which are not even supported for a given platform. This patch adds support for a arch/vendor/platform directory hierarchy, while maintaining backwards-compatibility for existing arch/platform structure. In this, each platform would always have its own pmu events table. In generated file pmu_events.c, each platform table name is in the format pme{_vendor}_platform, like this: struct pmu_events_map pmu_events_map[] = { { .cpuid = "0x00000000420f5160", .version = "v1", .type = "core", .table = pme_cavium_thunderx2 }, { .cpuid = 0, .version = 0, .type = 0, .table = 0, }, }; Signed-off-by: John Garry Acked-by: Jiri Olsa Tested-by: Sukadev Bhattiprolu Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ganapatrao Kulkarni Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Sukadev Bhattiprolu Cc: Will Deacon Cc: William Cohen Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lkml.kernel.org/r/1520506716-197429-5-git-send-email-john.garry@huawei.com Link: http://lkml.kernel.org/r/1521047452-28565-1-git-send-email-john.garry@huawei.com [ Add missing limits.h include, fixing the build on at least all Alpine Linux versions tested (3.4 to 3.7 + edge), ] [ Applied a patch to fix reading ./.. directories in XFS, see second Link tag ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/README | 4 +++ tools/perf/pmu-events/jevents.c | 68 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 66 insertions(+), 6 deletions(-) commit 6f2f2ca3454ec4fa03fcd4507bdd7fe97303065b Author: John Garry Date: Thu Mar 8 18:58:28 2018 +0800 perf vendor events: Drop support for unused topic directories Currently a topic subdirectory is supported in the pmu-events dir, in the following sample structure: /arch/platform/subtopic/mysubtopic.json Upto 256 levels of topic subdirectories are supported. So this means that JSONs may be located in a topic dir as well as the platform dir. This topic subdirectory causes problems if we want to add support for a vendor dir in the pmu-events structure (in the form arch/platform/vendor), in that we cannot differentiate between a vendor dir and a topic dir. Since the topic dir feature is not used, drop it so it does not block adding vendor subdirectory support. Signed-off-by: John Garry Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ganapatrao Kulkarni Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: William Cohen Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lkml.kernel.org/r/1520506716-197429-4-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.c | 37 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) commit 931ef5dc5c18717d24e5b8d8a968e35638508051 Author: John Garry Date: Thu Mar 8 18:58:27 2018 +0800 perf vendor events: Fix error code in json_events() When EXPECT macro fails an assertion, the error code is not properly set after the first loop of tokens in function json_events(). This is because err is set to the return value from func function pointer call, which must be 0 to continue to loop, yet it is not reset for for each loop. I assume that this was not the intention, so change the code so err is set appropriately in EXPECT macro itself. In addition to this, the indention in EXPECT macro is tidied. The current indention alludes that the 2 statements following the if statement are in the body, which is not true. Signed-off-by: John Garry Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ganapatrao Kulkarni Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: William Cohen Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lkml.kernel.org/r/1520506716-197429-3-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4c0ab16052054946b7b28f8b0ceee57c10d64cc7 Author: John Garry Date: Thu Mar 8 18:58:26 2018 +0800 perf vendor events: Drop incomplete multiple mapfile support Currently jevents supports multiple mapfiles, but this is only in the form where mapfile basename starts with 'mapfile.csv' At the moment, no architectures actually use multiple mapfiles, so drop the support for now. This patch also solves a nuisance where, when the mapfile is edited and the text editor may create a backup, jevents may use the backup, as shown: jevents: Many mapfiles? Using pmu-events/arch/arm64/mapfile.csv~, ignoring pmu-events/arch/arm64/mapfile.csv Signed-off-by: John Garry Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ganapatrao Kulkarni Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: William Cohen Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lkml.kernel.org/r/1520506716-197429-2-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/README | 5 ++--- tools/perf/pmu-events/jevents.c | 10 ++-------- 2 files changed, 4 insertions(+), 11 deletions(-) commit 744e9a91cf898bf027dbe65cc61a5d7565335cba Author: Kim Phillips Date: Thu Mar 8 21:10:30 2018 -0600 perf tools arm64: Add libdw DWARF post unwind support for ARM64 Based on prior work: https://lkml.org/lkml/2014/5/6/395 and on how other arches add libdw unwind support. Includes support for running the unwind test, e.g., on a system with only elfutils' libdw 0.170, the test now runs, and successfully: $ ./perf test unwind 56: Test dwarf unwind : Ok Originally-by: Jean Pihet Reported-by: Christian Hansen Signed-off-by: Kim Phillips Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180308211030.4ee4a0d6ff6dc5cda1b567d4@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 2 +- tools/perf/arch/arm64/include/arch-tests.h | 12 ++++++ tools/perf/arch/arm64/tests/Build | 2 + tools/perf/arch/arm64/tests/arch-tests.c | 16 ++++++++ tools/perf/arch/arm64/util/Build | 1 + tools/perf/arch/arm64/util/unwind-libdw.c | 60 ++++++++++++++++++++++++++++++ 6 files changed, 92 insertions(+), 1 deletion(-) commit 03d9fcb701340de3446b4ff4ddb9f5407d1412f5 Author: Jiri Olsa Date: Fri Mar 9 11:14:42 2018 +0100 perf c2c report: Add cacheline address count column Adding the 'PA cnt' column grouped under data cacheline address. It shows how many times the physical addresses changed for the hist entry. It does not show the number of different physical addresses for entry, because we don't store those. We only track the number of times we got different address than we currently hold, which is not expensive and gives similar info. $ perf c2c report --stdio # ----------- Cacheline ---------- Total Tot ----- LLC Load Hitm ----- # Index Address Node PA cnt records Hitm Total Lcl Rmt # ..... .................. .... ...... ....... ....... ....... ....... ....... # 0 0xffff9ad56dca0a80 0 9 10 7.69% 2 2 0 1 0xffff9ad56dce0a80 0 9 9 7.69% 2 2 0 2 0xffff9ad37659ad80 0 1 2 3.85% 1 1 0 ... # ----- HITM ----- -- Store Refs -- --------- Data address --------- # Num Rmt Lcl L1 Hit L1 Miss Offset Node PA cnt Pid # ..... ....... ....... ....... ....... .................. .... ...... ....... # ------------------------------------------------------------- 0 0 2 3 0 0xffff9ad56dca0a80 ------------------------------------------------------------- 0.00% 0.00% 33.33% 0.00% 0x0 0 1 2510 0.00% 0.00% 33.33% 0.00% 0x4 0 1 2476 0.00% 0.00% 33.33% 0.00% 0x20 0 1 0 0.00% 100.00% 0.00% 0.00% 0x38 0 1 0 Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180309101442.9224-10-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) commit d0802b1ee2c8b95e960f46fa14fe0fee562cb79a Author: Jiri Olsa Date: Fri Mar 9 11:14:41 2018 +0100 perf c2c report: Add span header over cacheline data Forcing the NUMA node output to be grouped with the "Cacheline" column in both "Shared Data Cache Line Table" and "Shared Cache Line Distribution Pareto" tables. Before: # Total Tot ----- LLC Load Hitm ----- # Index Cacheline Node records Hitm Total Lcl Rmt # ..... .................. .... ....... ....... ....... ....... ....... # 0 0x7f0830100000 0 84 10.53% 8 8 0 1 0xffff922a93154200 0 3 2.63% 2 2 0 2 0xffff922a93154500 0 4 2.63% 2 2 0 After: # ------- Cacheline ------ Total Tot ----- LLC Load Hitm ----- # Index Address Node records Hitm Total Lcl Rmt # ..... .................. .... ....... ....... ....... ....... ....... # 0 0x7f0830100000 0 84 10.53% 8 8 0 1 0xffff922a93154200 0 3 2.63% 2 2 0 2 0xffff922a93154500 0 4 2.63% 2 2 0 Before: # ----- HITM ----- -- Store Refs -- Data address # Num Rmt Lcl L1 Hit L1 Miss Offset Node Pid # ..... ....... ....... ....... ....... .................. .... ....... # ------------------------------------------------------------- 0 0 8 32 2 0x7f0830100000 ------------------------------------------------------------- 0.00% 75.00% 21.88% 0.00% 0x18 0 1791 0.00% 12.50% 37.50% 0.00% 0x18 0 1791 0.00% 0.00% 34.38% 0.00% 0x18 0 1791 After: # ----- HITM ----- -- Store Refs -- ----- Data address ----- # Num Rmt Lcl L1 Hit L1 Miss Offset Node Pid # ..... ....... ....... ....... ....... .................. .... ....... # ------------------------------------------------------------- 0 0 8 32 2 0x7f0830100000 ------------------------------------------------------------- 0.00% 75.00% 21.88% 0.00% 0x18 0 1791 0.00% 12.50% 37.50% 0.00% 0x18 0 1791 0.00% 0.00% 34.38% 0.00% 0x18 0 1791 Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180309101442.9224-9-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 63 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 58 insertions(+), 5 deletions(-) commit 7f834c2e84bbcf94a1ed65a2ae648129e1901370 Author: Jiri Olsa Date: Fri Mar 9 11:14:40 2018 +0100 perf c2c report: Display node for cacheline address Adding the NUMA node info for the data cacheline. Adding the new column to both "Shared Data Cache Line Table" and "Shared Cache Line Distribution Pareto". Note the new 'Node' column next to the 'Cacheline'. $ perf c2c report --stdio ================================================= Shared Data Cache Line Table ================================================= # # Total Tot ----- LLC Load Hitm ----- # Index Cacheline Node records Hitm Total Lcl Rmt # ..... .................. .... ....... ....... ....... ....... ....... # 0 0x7f0830100000 0 84 10.53% 8 8 0 1 0xffff922a93154200 0 3 2.63% 2 2 0 2 0xffff922a93154500 0 4 2.63% 2 2 0 ... Note the new 'Node' column next to the 'Offset'. ================================================= Shared Cache Line Distribution Pareto ================================================= # # ----- HITM ----- -- Store Refs -- Data address # Num Rmt Lcl L1 Hit L1 Miss Offset Node Pid # ..... ....... ....... ....... ....... .................. .... ....... # ------------------------------------------------------------- 0 0 8 32 2 0x7f0830100000 ------------------------------------------------------------- 0.00% 75.00% 21.88% 0.00% 0x18 0 1791 0.00% 12.50% 37.50% 0.00% 0x18 0 1791 0.00% 0.00% 34.38% 0.00% 0x18 0 1791 Using the mem2node object to get the NUMA node data. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180309101442.9224-8-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 119 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 114 insertions(+), 5 deletions(-) commit bc229c21f2c79ef0f7b30d3a2fce8c2886ffa6c7 Author: Jiri Olsa Date: Fri Mar 9 11:14:39 2018 +0100 perf c2c report: Call calc_width() only for displayed entries There's no need to calculate column widths for entries that are not going to be displayed. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180309101442.9224-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3773138828b38f3f1364ef318cd876b16182388a Author: Jiri Olsa Date: Fri Mar 9 11:14:38 2018 +0100 perf c2c report: Make calc_width work with struct c2c_hist_entry We are going to calculate tje column width based on the struct c2c_hist_entry data, so making calc_width to work with struct c2c_hist_entry. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180309101442.9224-6-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 8fab7843a15078814764e01c303d175c92b500c1 Author: Jiri Olsa Date: Fri Mar 9 11:14:37 2018 +0100 perf c2c record: Record physical addresses in samples We are going to display NUMA node information in following patches. For this we need to have physical address data in the sample. Adding --phys-data as a default option for perf c2c record. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180309101442.9224-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-c2c.txt | 2 +- tools/perf/builtin-c2c.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 8185850ad603acfc66f5b3d284955809dffa5d2c Author: Jiri Olsa Date: Fri Mar 9 11:14:36 2018 +0100 perf tests: Add mem2node object test Adding mem2node object automated test. The test prepares few artificial nodes - memory maps and verifies the mem2node object returns proper node values to given addresses. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180309101442.9224-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 4 +++ tools/perf/tests/mem2node.c | 75 +++++++++++++++++++++++++++++++++++++++++ tools/perf/tests/tests.h | 1 + 4 files changed, 81 insertions(+) commit 4acf6142de3fbc4fc9cc8da0a1aec073f05b724f Author: Jiri Olsa Date: Fri Mar 9 11:14:35 2018 +0100 perf tools: Add mem2node object Adding mem2node object to allow the easy lookup of the node for the physical address. It has following interface: int mem2node__init(struct mem2node *map, struct perf_env *env); void mem2node__exit(struct mem2node *map); int mem2node__node(struct mem2node *map, u64 addr); The mem2node__toolsinit initialize object from the perf data file MEM_TOPOLOGY feature data. Following calls to mem2node__node will return node number for given physical address. The mem2node__exit function frees the object. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180309101442.9224-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/Build | 1 + tools/perf/util/mem2node.c | 134 +++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/mem2node.h | 19 +++++++ 3 files changed, 154 insertions(+) commit e725920cdb1c79fdc71f2f164f59be8c411cad68 Author: Jiri Olsa Date: Fri Mar 9 11:14:34 2018 +0100 perf env: Free memory nodes data Forgot to free env's memory nodes, adding needed code to perf_env__exit. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180309101442.9224-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/env.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4c6994806f708559c2812b73501406e21ae5dcd0 Author: Joseph Qi Date: Fri Mar 16 14:51:27 2018 +0800 blk-throttle: fix race between blkcg_bio_issue_check() and cgroup_rmdir() We've triggered a WARNING in blk_throtl_bio() when throttling writeback io, which complains blkg->refcnt is already 0 when calling blkg_get(), and then kernel crashes with invalid page request. After investigating this issue, we've found it is caused by a race between blkcg_bio_issue_check() and cgroup_rmdir(), which is described below: writeback kworker cgroup_rmdir cgroup_destroy_locked kill_css css_killed_ref_fn css_killed_work_fn offline_css blkcg_css_offline blkcg_bio_issue_check rcu_read_lock blkg_lookup spin_trylock(q->queue_lock) blkg_destroy spin_unlock(q->queue_lock) blk_throtl_bio spin_lock_irq(q->queue_lock) ... spin_unlock_irq(q->queue_lock) rcu_read_unlock Since rcu can only prevent blkg from releasing when it is being used, the blkg->refcnt can be decreased to 0 during blkg_destroy() and schedule blkg release. Then trying to blkg_get() in blk_throtl_bio() will complains the WARNING. And then the corresponding blkg_put() will schedule blkg release again, which result in double free. This race is introduced by commit ae1188963611 ("blkcg: consolidate blkg creation in blkcg_bio_issue_check()"). Before this commit, it will lookup first and then try to lookup/create again with queue_lock. Since revive this logic is a bit drastic, so fix it by only offlining pd during blkcg_css_offline(), and move the rest destruction (especially blkg_put()) into blkcg_css_free(), which should be the right way as discussed. Fixes: ae1188963611 ("blkcg: consolidate blkg creation in blkcg_bio_issue_check()") Reported-by: Jiufei Xue Signed-off-by: Joseph Qi Acked-by: Tejun Heo Signed-off-by: Jens Axboe block/blk-cgroup.c | 78 ++++++++++++++++++++++++++++++++++++---------- include/linux/blk-cgroup.h | 1 + 2 files changed, 63 insertions(+), 16 deletions(-) commit 2f0e9d804935970a4ce0f58dd046b41881bfd8f3 Author: Ville Syrjälä Date: Tue Mar 13 17:07:58 2018 +0200 drm: Make drm_mode_vrefresh() a bit more accurate Do the refresh rate calculation with a single division. This gives us slightly more accurate results, especially for interlaced since we don't just double the final truncated result. We do lose one bit compared to the old way, so with an interlaced mode the new code can only handle ~2GHz instead of the ~4GHz the old code handeled. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180313150759.27620-2-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_modes.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit ce627a1b10e6dd506fad4655588d7d75cd86e41c Merge: 320bd6d b0f3deb Author: David S. Miller Date: Fri Mar 16 12:31:19 2018 -0400 Merge branch 'rtnl_lock_killable' Kirill Tkhai says: ==================== Introduce rtnl_lock_killable() rtnl_lock() is widely used mutex in kernel. Some of kernel code does memory allocations under it. In case of memory deficit this may invoke OOM killer, but the problem is a killed task can't exit if it's waiting for the mutex. This may be a reason of deadlock and panic. This patchset adds a new primitive, which responds on SIGKILL, and it allows to use it in the places, where we don't want to sleep forever. Also, the first place is made to use it. ==================== Signed-off-by: David S. Miller commit b0f3debc9a1284d6b861e3f7cce0d119e6cd601d Author: Kirill Tkhai Date: Wed Mar 14 22:17:28 2018 +0300 net: Use rtnl_lock_killable() in register_netdev() This patch adds rtnl_lock_killable() to one of hot path using rtnl_lock(). Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/core/dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 79ffdfc6522ae33d8a33e971070c08ee5f27439b Author: Kirill Tkhai Date: Wed Mar 14 22:17:20 2018 +0300 net: Add rtnl_lock_killable() rtnl_lock() is widely used mutex in kernel. Some of kernel code does memory allocations under it. In case of memory deficit this may invoke OOM killer, but the problem is a killed task can't exit if it's waiting for the mutex. This may be a reason of deadlock and panic. This patch adds a new primitive, which responds on SIGKILL, and it allows to use it in the places, where we don't want to sleep forever. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller include/linux/rtnetlink.h | 1 + net/core/rtnetlink.c | 6 ++++++ 2 files changed, 7 insertions(+) commit df550548c6339e0d032af4a7f9bd7200ab0c827b Author: Ville Syrjälä Date: Tue Mar 13 17:07:57 2018 +0200 drm: Nuke the useless 'ret' variable from drm_mode_convert_umode() No need to store the return value in a variable since we don't have to do any unwinding. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180313150759.27620-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_modes.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit a24a5821a684a62ae2c53a214eaf2ad4f4f0dbcf Author: Magnus Damm Date: Mon Feb 19 20:49:51 2018 +0900 ARM: dts: silk: Add GPIO keys to DT Extend the Silk board support to include SW3, SW4, SW6 and SW12. They are all connected via GPIO lines and handled by the gpio-keys driver. Signed-off-by: Magnus Damm Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794-silk.dts | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 7f8f74cd8d28f0b14b004c6c1640df439e5c2108 Author: Magnus Damm Date: Mon Feb 19 20:49:42 2018 +0900 ARM: dts: silk: Add r1ex24002 EEPROM to DT Extend the Silk board support to include U14 which is an I2C based EEPROM hooked up to the I2C1 bus. Signed-off-by: Magnus Damm Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794-silk.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 56bac953b15087dbced6951248ca05a6f0888831 Author: Magnus Damm Date: Mon Feb 19 21:37:58 2018 +0900 ARM: dts: marzen: Add SDHI0 VCCQ Regulator Add support for the on-board voltage regulator hooked up to GPIO3_20 on r8a7779 Marzen. The board schematics describes the regulator as U4 TPS2110A. Input wise, U4 has D0 fixed to ground, D1 tied to GPIO3_20 while IN1 is fixed to 3.3V and IN2 is fixed to 1.8V. OUT goes to the pull-ups for the data pins of SDHI0. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7779-marzen.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 92bcfdb334ca7fc4c029927d25a89adcf34d0529 Author: Marek Vasut Date: Thu Feb 15 19:49:19 2018 +0100 ARM: dts: stout: Initial r8a7790 Stout board support Stout base board support making use of 1 GiB of memory, the Renesas H2 r8a7790 SoC with the SCIFA0 serial port and CA15 with ARM architected timer. Furthermore, this device tree contains entries for: - 4x LEDs - SDHI SD/MMC controller - Display unit with HDMI output - SH fast ethernet controller - QSPI controller with S25FL512S attached to it - I2C controller with DA9210 and DA 9063 PMICs Signed-off-by: Marek Vasut Acked-by: Wolfram Sang Signed-off-by: Simon Horman arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r8a7790-stout.dts | 363 ++++++++++++++++++++++++++++++++++++ 2 files changed, 364 insertions(+) commit fe61513f1611def2535962954be4bb4fc2cb182c Author: Geert Uytterhoeven Date: Tue Feb 13 14:40:45 2018 +0100 ARM: dts: lager: Move cec_clock to root node cec-clock is a fixed clock generator that is not controlled by i2c-12 and thus should not be a child of the i2c-12 bus node. Rather, it should be a child of the root node of the DT. Fixes: c5aa87977626e778 ("ARM: dts: lager: Add CEC clock for HDMI transmitter") Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790-lager.dts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b1798f2a97dacade8c6db97074b0f36327c77bcc Author: Geert Uytterhoeven Date: Tue Feb 13 15:15:29 2018 +0100 ARM: dts: kzm9d: Fix "debounce-interval" property misspelling "debounce_interval" was never supported. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/emev2-kzm9d.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1871f0fcba5debf21d5b0475e6a064dc5c21a026 Author: Stephen Boyd Date: Fri Mar 16 09:21:40 2018 -0700 clk: samsung: Mark a few things static Running sparse on the samsung clk directory has some noise that we can fix to look for future problems easier. drivers/clk/samsung/clk-s3c2443.c:111:26: warning: symbol 's3c2443_common_muxes' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:139:26: warning: symbol 's3c2443_common_dividers' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:152:27: warning: symbol 's3c2443_common_gates' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:186:28: warning: symbol 's3c2443_common_aliases' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:241:26: warning: symbol 's3c2416_dividers' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:247:26: warning: symbol 's3c2416_muxes' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:253:27: warning: symbol 's3c2416_gates' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:263:28: warning: symbol 's3c2416_aliases' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:291:26: warning: symbol 's3c2443_dividers' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:296:27: warning: symbol 's3c2443_gates' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:305:28: warning: symbol 's3c2443_aliases' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:321:26: warning: symbol 's3c2450_dividers' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:328:26: warning: symbol 's3c2450_muxes' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:334:27: warning: symbol 's3c2450_gates' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:345:28: warning: symbol 's3c2450_aliases' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:368:33: warning: symbol 's3c2443_common_frate_clks' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2443.c:464:49: warning: Using plain integer as NULL pointer drivers/clk/samsung/clk-s3c2443.c:470:49: warning: Using plain integer as NULL pointer drivers/clk/samsung/clk-s3c2443.c:476:49: warning: Using plain integer as NULL pointer drivers/clk/samsung/clk-s3c2412.c:96:26: warning: symbol 's3c2412_dividers' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2412.c:108:35: warning: symbol 's3c2412_ffactor' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2412.c:128:26: warning: symbol 's3c2412_muxes' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2412.c:146:27: warning: symbol 's3c2412_gates' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2412.c:177:28: warning: symbol 's3c2412_aliases' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2412.c:227:33: warning: symbol 's3c2412_common_frate_clks' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2412.c:292:43: warning: Using plain integer as NULL pointer drivers/clk/samsung/clk-s3c2410.c:98:26: warning: symbol 's3c2410_common_muxes' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:114:26: warning: symbol 's3c2410_common_dividers' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:119:27: warning: symbol 's3c2410_common_gates' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:138:28: warning: symbol 's3c2410_common_aliases' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:203:26: warning: symbol 's3c2410_dividers' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:207:35: warning: symbol 's3c2410_ffactor' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:218:28: warning: symbol 's3c2410_aliases' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:272:26: warning: symbol 's3c244x_common_muxes' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:277:35: warning: symbol 's3c244x_common_ffactor' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:294:26: warning: symbol 's3c244x_common_dividers' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:302:27: warning: symbol 's3c244x_common_gates' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:306:28: warning: symbol 's3c244x_common_aliases' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:321:26: warning: symbol 's3c2440_muxes' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:325:27: warning: symbol 's3c2440_gates' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:331:35: warning: symbol 's3c2442_ffactor' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:337:26: warning: symbol 's3c2442_muxes' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:346:33: warning: symbol 's3c2410_common_frate_clks' was not declared. Should it be static? drivers/clk/samsung/clk-s3c2410.c:471:49: warning: Using plain integer as NULL pointer drivers/clk/samsung/clk-s3c2410.c:477:49: warning: Using plain integer as NULL pointer drivers/clk/samsung/clk-s3c2410.c:483:49: warning: Using plain integer as NULL pointer Signed-off-by: Stephen Boyd drivers/clk/samsung/clk-s3c2410.c | 40 +++++++++++++++++++-------------------- drivers/clk/samsung/clk-s3c2412.c | 14 +++++++------- drivers/clk/samsung/clk-s3c2443.c | 38 ++++++++++++++++++------------------- 3 files changed, 46 insertions(+), 46 deletions(-) commit 5f990d316085aca11b04dc0f63d6df5e508d73c7 Author: Jonas Rabenstein Date: Wed Mar 7 17:55:56 2018 +0100 block: sed-opal: fix u64 short atom length The length must be given as bytes and not as 4 bit tuples. Reviewed-by: Scott Bauer Signed-off-by: Jonas Rabenstein Signed-off-by: Jens Axboe block/sed-opal.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit c7e4e0d7ccc35dc7a0c4fbdb76318fb2f88e73a3 Merge: 7928b2c 182c084 Author: Stephen Boyd Date: Fri Mar 16 09:11:27 2018 -0700 Merge tag 'clk-v4.17-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk into clk-samsung Pull samsung clk driver updates from Sylwester Nawrocki: This change set includes the PLL rate definition fixes and an addition of compile time PLL rate validation macros. It adds definitions of some missing clocks and extends the PLL rate tables required in the sound subsystem. In order to handle dependencies of clocks on the power domains a clock provider sub-driver is added for Exynos5 SoCs. In newer Exynos SoCs there is no need to do such things as the clocks/power domain relations are more clearly defined and better documented. * tag 'clk-v4.17-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk: (21 commits) clk: samsung: Add fout=196608001 Hz EPLL rate entry for exynos4412 clk: samsung: exynos5250: Add missing clocks for FIMC LITE SYSMMU devices clk: samsung: exynos5420: Add more entries to EPLL rate table clk: samsung: exynos5420: Add CLK_SET_RATE_PARENT flag to mout_mau_epll_clk clk: samsung: exynos5250: Move PD-dependent clocks to Exynos5 sub-CMU clk: samsung: exynos5420: Move PD-dependent clocks to Exynos5 sub-CMU clk: samsung: Add Exynos5 sub-CMU clock driver soc: samsung: pm_domains: Add blacklisting clock handling clk: samsung: Add compile time PLL rate validators clk: samsung: s3c2410: Fix PLL rates clk: samsung: exynos7: Fix PLL rates clk: samsung: exynos5433: Fix PLL rates clk: samsung: exynos5260: Fix PLL rates clk: samsung: exynos5250: Fix PLL rates clk: samsung: exynos3250: Fix PLL rates clk: exynos5433: Extend list of available AUD_PLL output frequencies clk: exynos5433: Add CLK_IGNORE_UNUSED flag to sclk_ioclk_i2s1_bclk clk: samsung: Add a git tree entry to MAINTAINERS clk: samsung: Remove redundant dev_err call in exynos_audss_clk_probe() clk: samsung: Remove redundant dev_err call in exynos5433_cmu_probe() ... commit 91fab9d26bcbf8614c2389ead327aa704768b639 Merge: 7928b2c c35b518 Author: Stephen Boyd Date: Fri Mar 16 09:09:49 2018 -0700 Merge tag 'tegra-for-4.17-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into clk-tegra Pull tegra clk driver updates from Thierry Reding: This contains preliminary work for the MBIST workaround implemented in the Tegra PMC driver. There's also some fixes to various clocks for bugs that went unnoticed for a long time. * tag 'tegra-for-4.17-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: clk: tegra: Fix pll_u rate configuration clk: tegra: Specify VDE clock rate clk: tegra20: Correct PLL_C_OUT1 setup clk: tegra: Mark HCLK, SCLK and EMC as critical clk: tegra: MBIST work around for Tegra210 clk: tegra: add fence_delay for clock registers clk: tegra: Add la clock for Tegra210 commit 320bd6de79ef0de1ece7c184469a722de690ccb0 Author: Tonghao Zhang Date: Tue Mar 13 21:57:17 2018 -0700 doc: Change the udp/sctp rmem/wmem default value. The SK_MEM_QUANTUM was changed from PAGE_SIZE to 4096. Signed-off-by: Tonghao Zhang Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1e8029515816f771b9b3751f24f19fe6df4c72ae Author: Tonghao Zhang Date: Tue Mar 13 21:57:16 2018 -0700 udp: Move the udp sysctl to namespace. This patch moves the udp_rmem_min, udp_wmem_min to namespace and init the udp_l3mdev_accept explicitly. The udp_rmem_min/udp_wmem_min affect udp rx/tx queue, with this patch namespaces can set them differently. Signed-off-by: Tonghao Zhang Signed-off-by: David S. Miller include/net/netns/ipv4.h | 3 ++ net/ipv4/sysctl_net_ipv4.c | 32 ++++++++--------- net/ipv4/udp.c | 86 +++++++++++++++++++++++++++------------------- net/ipv6/udp.c | 52 ++++++++++++++-------------- 4 files changed, 96 insertions(+), 77 deletions(-) commit 1a3713c7cd8c903264065a79c9b29517eec5152e Author: Ard Biesheuvel Date: Sat Mar 10 15:21:54 2018 +0000 crypto: arm64/sha256-neon - play nice with CONFIG_PREEMPT kernels Tweak the SHA256 update routines to invoke the SHA256 block transform block by block, to avoid excessive scheduling delays caused by the NEON algorithm running with preemption disabled. Also, remove a stale comment which no longer applies now that kernel mode NEON is actually disallowed in some contexts. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/sha256-glue.c | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) commit 870c163a0ee6486bf0a313d47da927400bcb131b Author: Ard Biesheuvel Date: Sat Mar 10 15:21:53 2018 +0000 crypto: arm64/aes-blk - add 4 way interleave to CBC-MAC encrypt path CBC MAC is strictly sequential, and so the current AES code simply processes the input one block at a time. However, we are about to add yield support, which adds a bit of overhead, and which we prefer to align with other modes in terms of granularity (i.e., it is better to have all routines yield every 64 bytes and not have an exception for CBC MAC which yields every 16 bytes) So unroll the loop by 4. We still cannot perform the AES algorithm in parallel, but we can at least merge the loads and stores. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-modes.S | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit a8f8a69e82b6ecfbaa869987955b1dbd5ae7f612 Author: Ard Biesheuvel Date: Sat Mar 10 15:21:52 2018 +0000 crypto: arm64/aes-blk - add 4 way interleave to CBC encrypt path CBC encryption is strictly sequential, and so the current AES code simply processes the input one block at a time. However, we are about to add yield support, which adds a bit of overhead, and which we prefer to align with other modes in terms of granularity (i.e., it is better to have all routines yield every 64 bytes and not have an exception for CBC encrypt which yields every 16 bytes) So unroll the loop by 4. We still cannot perform the AES algorithm in parallel, but we can at least merge the loads and stores. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-modes.S | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) commit 55868b45cffdb7b4d7f9eddd3d4f1262cf645885 Author: Ard Biesheuvel Date: Sat Mar 10 15:21:51 2018 +0000 crypto: arm64/aes-blk - remove configurable interleave The AES block mode implementation using Crypto Extensions or plain NEON was written before real hardware existed, and so its interleave factor was made build time configurable (as well as an option to instantiate all interleaved sequences inline rather than as subroutines) We ended up using INTERLEAVE=4 with inlining disabled for both flavors of the core AES routines, so let's stick with that, and remove the option to configure this at build time. This makes the code easier to modify, which is nice now that we're adding yield support. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/Makefile | 3 - arch/arm64/crypto/aes-modes.S | 237 +++++++----------------------------------- 2 files changed, 40 insertions(+), 200 deletions(-) commit 4bf7e7a19df127391ddc5c47888bc62ef1bfd0ad Author: Ard Biesheuvel Date: Sat Mar 10 15:21:50 2018 +0000 crypto: arm64/chacha20 - move kernel mode neon en/disable into loop When kernel mode NEON was first introduced on arm64, the preserve and restore of the userland NEON state was completely unoptimized, and involved saving all registers on each call to kernel_neon_begin(), and restoring them on each call to kernel_neon_end(). For this reason, the NEON crypto code that was introduced at the time keeps the NEON enabled throughout the execution of the crypto API methods, which may include calls back into the crypto API that could result in memory allocation or other actions that we should avoid when running with preemption disabled. Since then, we have optimized the kernel mode NEON handling, which now restores lazily (upon return to userland), and so the preserve action is only costly the first time it is called after entering the kernel. So let's put the kernel_neon_begin() and kernel_neon_end() calls around the actual invocations of the NEON crypto code, and run the remainder of the code with kernel mode NEON disabled (and preemption enabled) Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/chacha20-neon-glue.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 78ad7b08d8e096e5f00bc2cbeba9ef6d24be1bc4 Author: Ard Biesheuvel Date: Sat Mar 10 15:21:49 2018 +0000 crypto: arm64/aes-bs - move kernel mode neon en/disable into loop When kernel mode NEON was first introduced on arm64, the preserve and restore of the userland NEON state was completely unoptimized, and involved saving all registers on each call to kernel_neon_begin(), and restoring them on each call to kernel_neon_end(). For this reason, the NEON crypto code that was introduced at the time keeps the NEON enabled throughout the execution of the crypto API methods, which may include calls back into the crypto API that could result in memory allocation or other actions that we should avoid when running with preemption disabled. Since then, we have optimized the kernel mode NEON handling, which now restores lazily (upon return to userland), and so the preserve action is only costly the first time it is called after entering the kernel. So let's put the kernel_neon_begin() and kernel_neon_end() calls around the actual invocations of the NEON crypto code, and run the remainder of the code with kernel mode NEON disabled (and preemption enabled) Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-neonbs-glue.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) commit 6833817472702658bdce64ea56bb90813be85557 Author: Ard Biesheuvel Date: Sat Mar 10 15:21:48 2018 +0000 crypto: arm64/aes-blk - move kernel mode neon en/disable into loop When kernel mode NEON was first introduced on arm64, the preserve and restore of the userland NEON state was completely unoptimized, and involved saving all registers on each call to kernel_neon_begin(), and restoring them on each call to kernel_neon_end(). For this reason, the NEON crypto code that was introduced at the time keeps the NEON enabled throughout the execution of the crypto API methods, which may include calls back into the crypto API that could result in memory allocation or other actions that we should avoid when running with preemption disabled. Since then, we have optimized the kernel mode NEON handling, which now restores lazily (upon return to userland), and so the preserve action is only costly the first time it is called after entering the kernel. So let's put the kernel_neon_begin() and kernel_neon_end() calls around the actual invocations of the NEON crypto code, and run the remainder of the code with kernel mode NEON disabled (and preemption enabled) Note that this requires some reshuffling of the registers in the asm code, because the XTS routines can no longer rely on the registers to retain their contents between invocations. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-glue.c | 95 ++++++++++++++++++------------------- arch/arm64/crypto/aes-modes.S | 90 +++++++++++++++++------------------ arch/arm64/crypto/aes-neonbs-glue.c | 14 +++--- 3 files changed, 97 insertions(+), 102 deletions(-) commit bd2ad885e30d2c72996e051d9a81bd1f2694eba0 Author: Ard Biesheuvel Date: Sat Mar 10 15:21:47 2018 +0000 crypto: arm64/aes-ce-ccm - move kernel mode neon en/disable into loop When kernel mode NEON was first introduced on arm64, the preserve and restore of the userland NEON state was completely unoptimized, and involved saving all registers on each call to kernel_neon_begin(), and restoring them on each call to kernel_neon_end(). For this reason, the NEON crypto code that was introduced at the time keeps the NEON enabled throughout the execution of the crypto API methods, which may include calls back into the crypto API that could result in memory allocation or other actions that we should avoid when running with preemption disabled. Since then, we have optimized the kernel mode NEON handling, which now restores lazily (upon return to userland), and so the preserve action is only costly the first time it is called after entering the kernel. So let's put the kernel_neon_begin() and kernel_neon_end() calls around the actual invocations of the NEON crypto code, and run the remainder of the code with kernel mode NEON disabled (and preemption enabled) Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-ce-ccm-glue.c | 47 ++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 24 deletions(-) commit 702202f1d421af535b3074930344276f5361dd0e Author: Ard Biesheuvel Date: Sat Mar 10 15:21:46 2018 +0000 crypto: testmgr - add a new test case for CRC-T10DIF In order to be able to test yield support under preempt, add a test vector for CRC-T10DIF that is long enough to take multiple iterations (and thus possible preemption between them) of the primary loop of the accelerated x86 and arm64 implementations. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/testmgr.h | 259 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 259 insertions(+) commit 14de52112ee70ca289fa77bf2d9cbc79fd2c811f Author: Kees Cook Date: Thu Mar 8 13:57:02 2018 -0800 crypto: ecc - Remove stack VLA usage On the quest to remove all VLAs from the kernel[1], this switches to a pair of kmalloc regions instead of using the stack. This also moves the get_random_bytes() after all allocations (and drops the needless "nbytes" variable). [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Kees Cook Reviewed-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/ecc.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit b698a9f4c5c52317db486b069190c7e3d2b97e7e Author: Gary R Hook Date: Wed Mar 7 11:31:14 2018 -0600 crypto: ccp - Validate buffer lengths for copy operations The CCP driver copies data between scatter/gather lists and DMA buffers. The length of the requested copy operation must be checked against the available destination buffer length. Reported-by: Maciej S. Szmigiero Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-ops.c | 108 +++++++++++++++++++++++++++++++------------ 1 file changed, 78 insertions(+), 30 deletions(-) commit 3d053d53fcbe7343c89895bcfa2d6bc598740d55 Author: Kamil Konieczny Date: Wed Mar 7 11:49:33 2018 +0100 crypto: hash - Prevent use of req->result in ahash update Prevent improper use of req->result field in ahash update, init, export and import functions in drivers code. A driver should use ahash request context if it needs to save internal state. Signed-off-by: Kamil Konieczny Signed-off-by: Herbert Xu include/crypto/hash.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 5bfa7ac3883e702a0a0a33a8449b044d7dab3efe Author: Peter Wu Date: Wed Mar 7 00:53:15 2018 +0100 crypto: virtio - remove dependency on CRYPTO_AUTHENC virtio_crypto does not use function crypto_authenc_extractkeys, remove this unnecessary dependency. Compiles fine and passes cryptodev-linux cipher and speed tests from https://wiki.qemu.org/Features/VirtioCrypto Fixes: dbaf0624ffa5 ("crypto: add virtio-crypto driver") Signed-off-by: Peter Wu Signed-off-by: Herbert Xu drivers/crypto/virtio/Kconfig | 1 - drivers/crypto/virtio/virtio_crypto_common.h | 1 - 2 files changed, 2 deletions(-) commit cd83a8a7c3eaffe985c6c8913c84da06a59fbe5d Author: Gilad Ben-Yossef Date: Tue Mar 6 09:44:43 2018 +0000 crypto: testmgr - introduce SM4 tests Add testmgr tests for the newly introduced SM4 ECB symmetric cipher. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu crypto/tcrypt.c | 3 ++ crypto/testmgr.c | 9 ++++ crypto/testmgr.h | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 143 insertions(+) commit 747c8ce4e710cf2d72d115f84b2d0d6f4aa504b4 Author: Gilad Ben-Yossef Date: Tue Mar 6 09:44:42 2018 +0000 crypto: sm4 - introduce SM4 symmetric cipher algorithm Introduce the SM4 cipher algorithms (OSCCA GB/T 32907-2016). SM4 (GBT.32907-2016) is a cryptographic standard issued by the Organization of State Commercial Administration of China (OSCCA) as an authorized cryptographic algorithms for the use within China. SMS4 was originally created for use in protecting wireless networks, and is mandated in the Chinese National Standard for Wireless LAN WAPI (Wired Authentication and Privacy Infrastructure) (GB.15629.11-2003). Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu crypto/Kconfig | 25 ++++++ crypto/Makefile | 1 + crypto/sm4_generic.c | 244 +++++++++++++++++++++++++++++++++++++++++++++++++++ include/crypto/sm4.h | 28 ++++++ 4 files changed, 298 insertions(+) commit 5110e65536f35e854f5d520b913505dbdbe22787 Author: Harsh Jain Date: Tue Mar 6 10:37:52 2018 +0530 crypto: chelsio -Split Hash requests for large scatter gather list Send multiple WRs to H/W when No. of entries received in scatter list cannot be sent in single request. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 358 ++++++++++++++++++++++++++--------- drivers/crypto/chelsio/chcr_algo.h | 10 +- drivers/crypto/chelsio/chcr_core.h | 6 +- drivers/crypto/chelsio/chcr_crypto.h | 32 +++- 4 files changed, 298 insertions(+), 108 deletions(-) commit 7ffb911882a34a0d1f05ba64d78bf9b61d1e4179 Author: Harsh Jain Date: Tue Mar 6 10:37:51 2018 +0530 crypto: chelsio - Fix iv passed in fallback path for rfc3686 We use ctr(aes) to fallback rfc3686(ctr) request. Send updated IV to fallback path. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fb78dba1667d63ab5ebed19724477a2f1e08717 Author: Harsh Jain Date: Tue Mar 6 10:37:50 2018 +0530 crypto: chelsio - Update IV before sending request to HW CBC Decryption requires Last Block as IV. In case src/dst buffer are same last block will be replaced by plain text. This patch copies the Last Block before sending request to HW. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 1d693cf65006d2e15fd19e89d4b364309ca63ec4 Author: Harsh Jain Date: Tue Mar 6 10:37:49 2018 +0530 crypto: chelsio - Fix src buffer dma length ulptx header cannot have length > 64k. Adjust length accordingly. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 125d01caae3030451a00a11dbd4e8cecae4efab3 Author: Harsh Jain Date: Tue Mar 6 10:37:48 2018 +0530 crypto: chelsio - Use kernel round function to align lengths Replace DIV_ROUND_UP to roundup or rounddown Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 73 ++++++++++++++++++-------------------- drivers/crypto/chelsio/chcr_algo.h | 1 - 2 files changed, 34 insertions(+), 40 deletions(-) commit a6ab6402c4e5ffd3379ba6adfbd2c74101a879c0 Author: Vladimir Zapolskiy Date: Tue Mar 6 00:21:00 2018 +0200 hwrng: mxc-rnga - add driver support on boards with device tree The driver works well on i.MX31 powered boards with device description taken from board device tree, the only change to add to the driver is the missing OF device id, the affected list of included headers and indentation in platform driver struct are beautified a little. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Fabio Estevam Reviewed-by: Kim Phillips Signed-off-by: Herbert Xu drivers/char/hw_random/mxc-rnga.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 9885b1bd953640abb7c1de158a2475f23ee13fc8 Author: Vladimir Zapolskiy Date: Tue Mar 6 00:20:59 2018 +0200 dt-bindings: rng: Document Freescale i.MX21 and i.MX31 RNGA compatibles Freescale i.MX21 and i.MX31 SoCs contain a Random Number Generator Accelerator module (RNGA), which is replaced by RNGB and RNGC modules on later i.MX SoC series, the change adds a new compatible property to describe the controller. Since all versions of Freescale RNG modules are legacy, apparently the documentation file has no more potential for further extensions, nevertheless generalize it by removing explicit RNGC specifics. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Rob Herring Reviewed-by: Fabio Estevam Signed-off-by: Herbert Xu Documentation/devicetree/bindings/rng/imx-rng.txt | 20 ++++++++++++++++++++ Documentation/devicetree/bindings/rng/imx-rngc.txt | 21 --------------------- 2 files changed, 20 insertions(+), 21 deletions(-) commit 91a2abb78f940ac821345cb7cc376dca94336c2f Author: Eric Biggers Date: Mon Mar 5 11:17:07 2018 -0800 crypto: arm64/speck - add NEON-accelerated implementation of Speck-XTS Add a NEON-accelerated implementation of Speck128-XTS and Speck64-XTS for ARM64. This is ported from the 32-bit version. It may be useful on devices with 64-bit ARM CPUs that don't have the Cryptography Extensions, so cannot do AES efficiently -- e.g. the Cortex-A53 processor on the Raspberry Pi 3. It generally works the same way as the 32-bit version, but there are some slight differences due to the different instructions, registers, and syntax available in ARM64 vs. in ARM32. For example, in the 64-bit version there are enough registers to hold the XTS tweaks for each 128-byte chunk, so they don't need to be saved on the stack. Benchmarks on a Raspberry Pi 3 running a 64-bit kernel: Algorithm Encryption Decryption --------- ---------- ---------- Speck64/128-XTS (NEON) 92.2 MB/s 92.2 MB/s Speck128/256-XTS (NEON) 75.0 MB/s 75.0 MB/s Speck128/256-XTS (generic) 47.4 MB/s 35.6 MB/s AES-128-XTS (NEON bit-sliced) 33.4 MB/s 29.6 MB/s AES-256-XTS (NEON bit-sliced) 24.6 MB/s 21.7 MB/s The code performs well on higher-end ARM64 processors as well, though such processors tend to have the Crypto Extensions which make AES preferred. For example, here are the same benchmarks run on a HiKey960 (with CPU affinity set for the A73 cores), with the Crypto Extensions implementation of AES-256-XTS added: Algorithm Encryption Decryption --------- ----------- ----------- AES-256-XTS (Crypto Extensions) 1273.3 MB/s 1274.7 MB/s Speck64/128-XTS (NEON) 359.8 MB/s 348.0 MB/s Speck128/256-XTS (NEON) 292.5 MB/s 286.1 MB/s Speck128/256-XTS (generic) 186.3 MB/s 181.8 MB/s AES-128-XTS (NEON bit-sliced) 142.0 MB/s 124.3 MB/s AES-256-XTS (NEON bit-sliced) 104.7 MB/s 91.1 MB/s Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/arm64/crypto/Kconfig | 6 + arch/arm64/crypto/Makefile | 3 + arch/arm64/crypto/speck-neon-core.S | 352 ++++++++++++++++++++++++++++++++++++ arch/arm64/crypto/speck-neon-glue.c | 282 +++++++++++++++++++++++++++++ 4 files changed, 643 insertions(+) commit 6c51ddddac46ab124a3f10fd17cf34979670c1ce Author: Markus Elfring Date: Mon Mar 5 13:50:13 2018 +0100 crypto: ccp - Use memdup_user() rather than duplicating its implementation Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Brijesh Singh Acked-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/psp-dev.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit 859844e5c285c42e8f2a273d7ee3c0c0df6a074a Merge: 1ad2ff0 654d3a7 Author: David S. Miller Date: Fri Mar 16 11:28:40 2018 -0400 Merge branch 'net-ipv6-Address-checks-need-to-consider-the-L3-domain' David Ahern says: ==================== net/ipv6: Address checks need to consider the L3 domain IPv6 prohibits a local address from being used as a gateway for a route. However, it is ok for the gateway to be a local address in a different L3 domain (e.g., VRF). This allows, for example, veth pairs to connect VRFs. ip6_route_info_create calls ipv6_chk_addr_and_flags for gateway addresses to determine if the address is a local one, but ipv6_chk_addr_and_flags does not currently consider L3 domains. As a result routes can not be added in one VRF with a nexthop that points to a local address in a second VRF. Resolve by comparing the l3mdev for the passed in device and requiring an l3mdev match with the device containing an address. The intent of checking for an address on the specified device versus any device in the domain is mantained by a new argument to skip the check between the passed in device and the device with the address. Patch 1 moves the gateway validation from ip6_route_info_create into a helper; the function is long enough and refactoring drops the indent level. Patch 2 adds a skip_dev_check argument to ipv6_chk_addr_and_flags to allow a device to always be passed yet skip the device check when looking at addresses and fixes up a few ipv6_chk_addr callers that pass a NULL device. Patch 3 adds l3mdev checks to ipv6_chk_addr_and_flags. Patches 4 and 5 do some refactoring to the fib_tests script and then patch 6 adds nexthop validation tests. v4 - separated l3mdev check into a separate patch (patch 3 of this set) as suggested by Kirill - consolidated dev and ipv6_chk_addr_and_flags call into 1 if (Kirill) - added a temp variable for gw type (Kirill) v3 - set skip_dev_check in ipv6_chk_addr based on dev == NULL (per comment from Ido) v2 - handle 2 variations of route spec with sane error path - add test cases ==================== Signed-off-by: David S. Miller commit 654d3a7821e838dd7608d88922d8d3db9bdb95b4 Author: David Ahern Date: Tue Mar 13 08:29:41 2018 -0700 selftests: fib_tests: Add IPv6 nexthop spec tests Add series of tests for valid and invalid nexthop specs for IPv6. $ TEST=fib_nexthop_test ./fib_tests.sh ... IPv6 nexthop tests TEST: Directly connected nexthop, unicast address [ OK ] TEST: Directly connected nexthop, unicast address with device [ OK ] TEST: Gateway is linklocal address [ OK ] TEST: Gateway is linklocal address, no device [ OK ] TEST: Gateway can not be local unicast address [ OK ] TEST: Gateway can not be local unicast address, with device [ OK ] TEST: Gateway can not be a local linklocal address [ OK ] TEST: Gateway can be local address in a VRF [ OK ] TEST: Gateway can be local address in a VRF, with device [ OK ] TEST: Gateway can be local linklocal address in a VRF [ OK ] TEST: Redirect to VRF lookup [ OK ] TEST: VRF route, gateway can be local address in default VRF [ OK ] TEST: VRF route, gateway can not be a local address [ OK ] TEST: VRF route, gateway can not be a local addr with device [ OK ] Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/fib_tests.sh | 180 ++++++++++++++++++++++++++++++- 1 file changed, 178 insertions(+), 2 deletions(-) commit a511858c7536fab15a59a0a2aee14c5a909da23a Author: David Ahern Date: Tue Mar 13 08:29:40 2018 -0700 selftests: fib_tests: Allow user to run a specific test Allow a user to run just a specific fib test by setting the TEST environment variable. Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/fib_tests.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 171a48717beeacb66be85c1e8e401111d3a0262c Author: David Ahern Date: Tue Mar 13 08:29:39 2018 -0700 selftests: fib_tests: Use an alias for ip command Replace 'ip -netns testns' with the alias IP. Shortens the line lengths and makes running the commands manually a bit easier. Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/fib_tests.sh | 169 ++++++++++++++++--------------- 1 file changed, 85 insertions(+), 84 deletions(-) commit 1893ff20275b9b9be4892b5b5785788ce45abdea Author: David Ahern Date: Tue Mar 13 08:29:38 2018 -0700 net/ipv6: Add l3mdev check to ipv6_chk_addr_and_flags Lookup the L3 master device for the passed in device. Only consider addresses on netdev's with the same master device. If the device is not enslaved or is NULL, then the l3mdev is NULL which means only devices not enslaved (ie, in the default domain) are considered. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller net/ipv6/addrconf.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 232378e8db4780bc7145d7a0ee47f5f80a41ad6b Author: David Ahern Date: Tue Mar 13 08:29:37 2018 -0700 net/ipv6: Change address check to always take a device argument ipv6_chk_addr_and_flags determines if an address is a local address and optionally if it is an address on a specific device. For example, it is called by ip6_route_info_create to determine if a given gateway address is a local address. The address check currently does not consider L3 domains and as a result does not allow a route to be added in one VRF if the nexthop points to an address in a second VRF. e.g., $ ip route add 2001:db8:1::/64 vrf r2 via 2001:db8:102::23 Error: Invalid gateway address. where 2001:db8:102::23 is an address on an interface in vrf r1. ipv6_chk_addr_and_flags needs to allow callers to always pass in a device with a separate argument to not limit the address to the specific device. The device is used used to determine the L3 domain of interest. To that end add an argument to skip the device check and update callers to always pass a device where possible and use the new argument to mean any address in the domain. Update a handful of users of ipv6_chk_addr with a NULL dev argument. This patch handles the change to these callers without adding the domain check. ip6_validate_gw needs to handle 2 cases - one where the device is given as part of the nexthop spec and the other where the device is resolved. There is at least 1 VRF case where deferring the check to only after the route lookup has resolved the device fails with an unintuitive error "RTNETLINK answers: No route to host" as opposed to the preferred "Error: Gateway can not be a local address." The 'no route to host' error is because of the fallback to a full lookup. The check is done twice to avoid this error. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller include/net/addrconf.h | 4 ++-- net/ipv6/addrconf.c | 11 ++++++++--- net/ipv6/anycast.c | 9 ++++++--- net/ipv6/datagram.c | 5 +++-- net/ipv6/ip6_tunnel.c | 12 ++++++++---- net/ipv6/ndisc.c | 2 +- net/ipv6/route.c | 19 +++++++++++++++---- 7 files changed, 43 insertions(+), 19 deletions(-) commit 9fbb704c3385adf5f9adfce7fd3c0bf31aa4da6d Author: David Ahern Date: Tue Mar 13 08:29:36 2018 -0700 net/ipv6: Refactor gateway validation on route add Move gateway validation code from ip6_route_info_create into ip6_validate_gw. Code move plus adjustments to handle the potential reset of dev and idev and to make checkpatch happy. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller net/ipv6/route.c | 120 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 66 insertions(+), 54 deletions(-) commit 1ad2ff028f36c8cdbf149db740eb36aead7b375e Merge: 2b221d2 f3b249e Author: David S. Miller Date: Fri Mar 16 11:14:34 2018 -0400 Merge branch 'macb-Introduce-phy-handle-DT-functionality' Brad Mouring says: ==================== net: macb: Introduce phy-handle DT functionality Consider the situation where a macb netdev is connected through a phydev that sits on a mii bus other than the one provided to this particular netdev. This situation is what this patchset aims to accomplish through the existing phy-handle optional binding. This optional binding (as described in the ethernet DT bindings doc) directs the netdev to the phydev to use. This is precisely the situation this patchset aims to solve, so it makes sense to introduce the functionality to this driver (where the physical layout discussed was encountered). The devicetree snippet would look something like this: ... ethernet@feedf00d { ... phy-handle = <&phy0> // the first netdev is physically wired to phy0 ... phy0: phy@0 { ... reg = <0x0> // MDIO address 0 ... } phy1: phy@1 { ... reg = <0x1> // MDIO address 1 ... } ... } ethernet@deadbeef { ... phy-handle = <&phy1> // tells the driver to use phy1 on the // first mac's mdio bus (it's wired thusly) ... } ... The work done to add the phy_node in the first place (dacdbb4dfc1a1: "net: macb: add fixed-link node support") will consume the device_node (if found). v2: Reorganization of mii probe/init functions, suggested by Andrew Lunn v3: Moved some of the bus init code back into init (erroneously moved to probe) some style issues, and an unintialized variable warning addressed. v4: Add Reviewed-by: tags Skip fallback code if phy-handle phandle is found v5: Cleanup formatting issues Fix compile failure introduced in 1/4 "net: macb: Reorganize macb_mii bringup" Fix typo in "Documentation: macb: Document phy-handle binding" ==================== Signed-off-by: David S. Miller commit f3b249e652792290cea1db45fa58e51c69cdd68e Author: Brad Mouring Date: Tue Mar 13 16:32:16 2018 -0500 Documentation: macb: Document phy-handle binding Document the existence of the optional binding, directing to the general ethernet document that describes this binding. Signed-off-by: Brad Mouring Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/macb.txt | 1 + 1 file changed, 1 insertion(+) commit 2105a5d3acd778e20634f25950cc9254ea408efe Author: Brad Mouring Date: Tue Mar 13 16:32:15 2018 -0500 net: macb: Add phy-handle DT support This optional binding (as described in the ethernet DT bindings doc) directs the netdev to the phydev to use. This is useful for a phy chip that has >1 phy in it, and two netdevs are using the same phy chip (i.e. the second mac's phy lives on the first mac's MDIO bus) The devicetree snippet would look something like this: ethernet@feedf00d { ... phy-handle = <&phy0> // the first netdev is physically wired to phy0 ... phy0: phy@0 { ... reg = <0x0> // MDIO address 0 ... } phy1: phy@1 { ... reg = <0x1> // MDIO address 1 ... } ... } ethernet@deadbeef { ... phy-handle = <&phy1> // tells the driver to use phy1 on the // first mac's mdio bus (it's wired thusly) ... } The work done to add the phy_node in the first place (dacdbb4dfc1a1: "net: macb: add fixed-link node support") will consume the device_node (if found). Signed-off-by: Brad Mouring Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit cb732e9a26f336ddd3e7ef4dba84ce190d1e175e Author: Brad Mouring Date: Tue Mar 13 16:32:14 2018 -0500 net: macb: Remove redundant poll irq assignment In phy_device's general probe, this device will already be set for phy register polling, rendering this code redundant. Signed-off-by: Brad Mouring Suggested-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 739de9a1563a19459c82d0d8c4d1cc8eb55ddf4e Author: Brad Mouring Date: Tue Mar 13 16:32:13 2018 -0500 net: macb: Reorganize macb_mii bringup The macb mii setup (mii_probe() and mii_init()) previously was somewhat interspersed, likely a result of organic growth and hacking. This change moves mii bus registration into mii_init and probing the bus for devices into mii_probe. Signed-off-by: Brad Mouring Suggested-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb_main.c | 79 +++++++++++++++++--------------- 1 file changed, 41 insertions(+), 38 deletions(-) commit 2b221d20db7583fa8f36d4545554786fcf93ca8e Author: Stephen Hemminger Date: Tue Mar 13 12:24:19 2018 -0700 doc: remove out of date links and info from packet mmap The packet_mmap documentation had links to no longer existing web sites; replace with other site which has similar example. Support for packet mmap has been in mainline versions of libpcap for several years. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller Documentation/networking/packet_mmap.txt | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit 225b3dc92da1a3198cf687b13435fef952757a8f Author: Gustavo A. R. Silva Date: Fri Mar 16 08:21:08 2018 -0500 USB: wusbcore: crypto: Remove VLA usage In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation instead. The use of stack Variable Length Arrays needs to be avoided, as they can be a vector for stack exhaustion, which can be both a runtime bug or a security flaw. Also, in general, as code evolves it is easy to lose track of how big a VLA can get. Thus, we can end up having runtime failures that are hard to debug. Also, fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 Notice that in this particular case, an alternative to kzalloc is kcalloc, in which case the code would look as follows instead: iv = kcalloc(crypto_skcipher_ivsize(tfm_cbc), sizeof(*iv), GFP_KERNEL); but if the data type of _iv_ never changes, or the type size is always one byte, kzalloc is good enough. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/wusbcore/crypto.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 7bb9aedac66cc768b255e60f97a137935dd818d8 Author: Andy Shevchenko Date: Fri Mar 16 16:17:23 2018 +0200 USB: host: sl811: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/usb/host/sl811-hcd.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 0ee78c101425aae681c631ba59c6ac7f44b1d83a Author: Mathias Nyman Date: Fri Mar 16 16:33:06 2018 +0200 xhci: Show what USB release number the xHC supports from protocol capablity xhci driver displays the supported xHC USB revision in a message during driver load: "Host supports USB 3.1 Enhanced SuperSpeed" Get the USB minor revision number from the xhci protocol capability. This will show the correct supported revisions for new USB 3.2 and later hosts Don't rely on the SBRN (serial bus revision number) register, it's often showing 0x30 (USB3.0) for hosts that support USB 3.1 Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit f5249461b504d35aa1a40140983b7ec415807d9e Author: Mathias Nyman Date: Fri Mar 16 16:33:04 2018 +0200 xhci: Clear the host side toggle manually when endpoint is soft reset Some devices use a clear endpoint halt request as a soft reset, even if the endpoint is not halted. This will clear the toggle and sequence on the device side. xHCI however refuses to reset a non-halted endpoint, so instead we need to issue a configure endpoint command on xHCI to clear its host side toggle and sequence, and get it in sync with the device side. This is a respin of a old patch that was reverted as it had a stale endpoint context dequeue value which caused regression. commit 27082e2654dc ("xhci: Clear the host side toggle manually when endpoint is 'soft reset'") Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 5 ++- drivers/usb/host/xhci.c | 105 ++++++++++++++++++++++++++++++++++++------- drivers/usb/host/xhci.h | 2 + 3 files changed, 95 insertions(+), 17 deletions(-) commit 15febf5eede9ff9d3180d257441e9a2fbb3f0ae6 Author: Mathias Nyman Date: Fri Mar 16 16:33:03 2018 +0200 xhci: refactor xhci_urb_enqueue a bit with minor changes make the local ep_state variable a pointer to the actual ring ep_state. This allows us to read fresh ep_state values every time, will be useful later. Also move the streams check out from bulk only case. Even if only bulk tranfers can use streams we shouldn't continue if those flags are set. Main reason for this change is really code readability and grouping functionality Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit a38fe33889095c5d7b1eb094d977fc3f2bab7ebd Author: Mathias Nyman Date: Fri Mar 16 16:33:02 2018 +0200 xhci: Don't always run the default stop endpoint command completion handler The default stop endpoint completion handler will give back cancelled URBs, and clean, or move past those canceller TRBs on the ring. This is not always the preferred action. If the stop endpoint command issuer is waiting for a completion skip the default handler and just call the completion. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a400efe455f7b61ac9a801ac8d0d01f8c8d82dd5 Author: Mathias Nyman Date: Fri Mar 16 16:33:01 2018 +0200 xhci: zero usb device slot_id member when disabling and freeing a xhci slot set udev->slot_id to zero when disabling and freeing the xhci slot. Prevents usb core from calling xhci with a stale slot id. xHC controller may be reset during resume to recover from some error. All slots are unusable as they are disabled and freed. xhci driver starts slot enumeration again from 1 in the order they are enabled. In the worst case a stale udev->slot_id for one device matches a newly enabled slot_id for a different device, causing us to perform a action on the wrong device. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 2 ++ 1 file changed, 2 insertions(+) commit 0c341910cb3d2376cd438b074634b173af8a2a52 Author: Lu Baolu Date: Fri Mar 16 16:33:00 2018 +0200 usb: xhci: Remove ep_trb from finish_td() Function argument ep_trb for finish_td() isn't needed anymore. Cleanup it. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5fee5a5afa9ff1e4a242a492d5ce181974fbd969 Author: Lu Baolu Date: Fri Mar 16 16:32:59 2018 +0200 usb: xhci: Remove ep_trb from xhci_cleanup_halted_endpoint() Function argument ep_trb for xhci_cleanup_halted_endpoint() isn't needed anymore. Cleanup it. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 29f653393e740b159933b03de25f929bec7b31b7 Author: Dan Carpenter Date: Fri Mar 16 16:32:58 2018 +0200 usb: xhci: Clean up error code in xhci_dbc_tty_register_device() tty_port_register_device() returns error pointers on error, never NULL. The IS_ERR_OR_NULL() function returns either 1 or 0 so it means we return 1 on error instead of a proper error code. The caller only checks for zero vs non-zero so this doesn't affect runtime. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-dbgtty.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6ef6386ef7c15bea21afce06f951c87de7e2a562 Author: Marc Zyngier Date: Fri Mar 16 14:35:17 2018 +0000 irqchip/gic-v3: Loudly complain about the use of IRQ_TYPE_NONE There is a huge number of broken device trees out there. Just grepping through the tree for the use of IRQ_TYPE_NONE in conjunction with the GIC is scary. People just don't realise that IRQ_TYPE_NONE just doesn't exist, and you just get whatever junk was there before. So let's make them aware of the issue. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 5 +++++ 1 file changed, 5 insertions(+) commit 83a86fbb5b56b5eed8a476cc3fe214077d7c4f49 Author: Marc Zyngier Date: Fri Mar 16 14:35:17 2018 +0000 irqchip/gic: Loudly complain about the use of IRQ_TYPE_NONE There is a huge number of broken device trees out there. Just grepping through the tree for the use of IRQ_TYPE_NONE in conjunction with the GIC is scary. People just don't realise that IRQ_TYPE_NONE just doesn't exist, and you just get whatever junk was there before. So let's make them aware of the issue. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic.c | 5 +++++ 1 file changed, 5 insertions(+) commit bbb68468641547d56c83012670bcaf77f3dacd64 Author: Mark Rutland Date: Fri Mar 16 12:51:40 2018 +0000 perf/core: Clear sibling list of detached events When perf_group_dettach() is called on a group leader, it updates each sibling's group_leader field to point to that sibling, effectively upgrading each siblnig to a group leader. After perf_group_detach has completed, the caller may free the leader event. We only remove siblings from the group leader's sibling_list when the leader has a non-empty group_node. This was fine prior to commit: 8343aae66167df67 ("perf/core: Remove perf_event::group_entry") ... as the sibling's sibling_list would be empty. However, now that we use the sibling_list field as both the list head and the list entry, this leaves each sibling with a non-empty sibling list, including the stale leader event. If perf_group_detach() is subsequently called on a sibling, it will appear to be a group leader, and we'll walk the sibling_list, potentially dereferencing these stale events. In 0day testing, this has been observed to result in kernel panics. Let's avoid this by always removing siblings from the sibling list when we promote them to leaders. Fixes: 8343aae66167df67 ("perf/core: Remove perf_event::group_entry") Signed-off-by: Mark Rutland Signed-off-by: Thomas Gleixner Cc: vincent.weaver@maine.edu Cc: Peter Zijlstra Cc: torvalds@linux-foundation.org Cc: Alexey Budankov Cc: valery.cherepennikov@intel.com Cc: linux-tip-commits@vger.kernel.org Cc: eranian@google.com Cc: acme@redhat.com Cc: alexander.shishkin@linux.intel.com Cc: davidcc@google.com Cc: kan.liang@intel.com Cc: Dmitry.Prohorov@intel.com Cc: Jiri Olsa Link: https://lkml.kernel.org/r/20180316131741.3svgr64yibc6vsid@lakrids.cambridge.arm.com kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7eb709f29593aced51901cb53565477762800722 Author: Peter Zijlstra Date: Thu Mar 15 17:36:56 2018 +0100 perf: Fix sibling iteration Mark noticed that the change to sibling_list changed some iteration semantics; because previously we used group_list as list entry, sibling events would always have an empty sibling_list. But because we now use sibling_list for both list head and list entry, siblings will report as having siblings. Fix this with a custom for_each_sibling_event() iterator. Fixes: 8343aae66167 ("perf/core: Remove perf_event::group_entry") Reported-by: Mark Rutland Suggested-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: vincent.weaver@maine.edu Cc: alexander.shishkin@linux.intel.com Cc: torvalds@linux-foundation.org Cc: alexey.budankov@linux.intel.com Cc: valery.cherepennikov@intel.com Cc: eranian@google.com Cc: acme@redhat.com Cc: linux-tip-commits@vger.kernel.org Cc: davidcc@google.com Cc: kan.liang@intel.com Cc: Dmitry.Prohorov@intel.com Cc: jolsa@redhat.com Link: https://lkml.kernel.org/r/20180315170129.GX4043@hirez.programming.kicks-ass.net arch/alpha/kernel/perf_event.c | 2 +- arch/arm/mach-imx/mmdc.c | 2 +- arch/arm/mm/cache-l2x0-pmu.c | 2 +- arch/mips/kernel/perf_event_mipsxx.c | 2 +- arch/powerpc/perf/core-book3s.c | 2 +- arch/powerpc/perf/core-fsl-emb.c | 2 +- arch/sparc/kernel/perf_event.c | 2 +- arch/x86/events/core.c | 2 +- arch/x86/events/intel/uncore.c | 2 +- drivers/bus/arm-cci.c | 2 +- drivers/bus/arm-ccn.c | 4 ++-- drivers/perf/arm_dsu_pmu.c | 2 +- drivers/perf/arm_pmu.c | 2 +- drivers/perf/hisilicon/hisi_uncore_pmu.c | 2 +- drivers/perf/qcom_l2_pmu.c | 6 ++---- drivers/perf/qcom_l3_pmu.c | 2 +- drivers/perf/xgene_pmu.c | 4 ++-- include/linux/perf_event.h | 4 ++++ kernel/events/core.c | 34 +++++++++++++++----------------- 19 files changed, 40 insertions(+), 40 deletions(-) commit fc804f65d46236c211f530174904c1ed70db5888 Author: Rajvi Jingar Date: Thu Mar 8 09:28:36 2018 -0800 x86/tsc: Convert ART in nanoseconds to TSC Device drivers use get_device_system_crosststamp() to produce precise system/device cross-timestamps. The PHC clock and ALSA interfaces, for example, make the cross-timestamps available to user applications. On Intel platforms, get_device_system_crosststamp() requires a TSC value derived from ART (Always Running Timer) to compute the monotonic raw and realtime system timestamps. Starting with Intel Goldmont platforms, the PCIe root complex supports the PTM time sync protocol. PTM requires all timestamps to be in units of nanoseconds. The Intel root complex hardware propagates system time derived from ART in units of nanoseconds performing the conversion as follows: ART_NS = ART * 1e9 / When user software requests a cross-timestamp, the system timestamps (generally read from device registers) must be converted to TSC by the driver software as follows: TSC = ART_NS * TSC_KHZ / 1e6 This is valid when CPU feature flag X86_FEATURE_TSC_KNOWN_FREQ is set indicating that tsc_khz is derived from CPUID[15H]. Drivers should check whether this flag is set before conversion to TSC is attempted. Suggested-by: Christopher S. Hall Signed-off-by: Rajvi Jingar Signed-off-by: Thomas Gleixner Cc: peterz@infradead.org Link: https://lkml.kernel.org/r/1520530116-4925-1-git-send-email-rajvi.jingar@intel.com arch/x86/include/asm/tsc.h | 1 + arch/x86/kernel/tsc.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) commit ce3db6aade20e0aef88878ef65f3e066175bf3bc Author: Govindarajulu Varadarajan Date: Tue Mar 13 05:24:33 2018 -0700 enic: drop IP proto check for vxlan tunnel delete Commit d11790941dd3 ("enic: Add vxlan offload support for IPv6 pkts") added vxlan offload support for IPv6 pkts. Required change in enic_udp_tunnel_del was not made. This creates a bug where once user adds IPv6 tunnel, hw offload for that cannot be deleted. This patch removes check for IP proto in tunnel delete path. Driver need not check for IP proto since same UDP port cannot be used to create two tunnels. Fixes: d11790941dd3 ("enic: Add vxlan offload support for IPv6 pkts") Signed-off-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 650b4eca47399420a1644056c41b66735e250d35 Author: Colin Ian King Date: Mon Mar 12 17:25:38 2018 +0000 rxrpc: remove redundant initialization of variable 'len' The variable 'len' is being initialized with a value that is never read and it is re-assigned later, hence the initialization is redundant and can be removed. Cleans up clang warning: net/rxrpc/recvmsg.c:275:15: warning: Value stored to 'len' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: David S. Miller net/rxrpc/recvmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80343b3e477f3b3b5a01be664a526878a18eb57d Author: Ville Syrjälä Date: Fri Feb 23 21:25:06 2018 +0200 drm/i915: Use drm_color_lut_size() Avoid all the sizeof(drm_color_lut) business by using drm_color_lut_size() to convert the blob length into number of LUT entries. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180223192506.29992-6-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_color.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit d5517a39dce40f57665c714823843eea4f8dd7b6 Author: Ville Syrjälä Date: Fri Feb 23 21:25:05 2018 +0200 drm/i915: Remove the blob->data casts Now that blob->data is void* again we don't need to cast it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180223192506.29992-5-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_color.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 41204dfeed93f2c7668cf8aa5086bcd96eccaa35 Author: Ville Syrjälä Date: Thu Mar 15 17:23:38 2018 +0200 drm: Introduce drm_color_lut_size() Provide a small helper to convert the blob length in bytes to the number of LUT entries. v2: Add kerneldoc (Daniel) Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180315152338.7248-1-ville.syrjala@linux.intel.com include/drm/drm_color_mgmt.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d2a24edb532e6599755fc1bbd080cf57e0dd72c3 Author: Ville Syrjälä Date: Thu Mar 15 17:22:41 2018 +0200 drm: Verify gamma/degamma LUT size While we want to potentially support multiple different gamma/degamma LUT sizes we can (and should) at least check that the blob length is a multiple of the LUT entry size. v2: s/expected_size_mod/expected_elem_size/ (Daniel) Add kernel doc (Daniel) v3: s/we/were/ typo in the docs Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180315152241.7113-1-ville.syrjala@linux.intel.com Documentation/gpu/drm-kms.rst | 3 +++ drivers/gpu/drm/drm_atomic.c | 39 +++++++++++++++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 4 deletions(-) commit 11b83e3fbc419678828982fbbf5c07ef9bf202f0 Author: Ville Syrjälä Date: Fri Feb 23 21:25:02 2018 +0200 drm: Remove now pointelss blob->data casts Now that blob->data is void* again we don't need the casts anymore. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180223192506.29992-2-ville.syrjala@linux.intel.com Reviewed-by: Shashank Sharma Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_atomic.c | 3 +-- drivers/gpu/drm/drm_atomic_helper.c | 2 +- drivers/gpu/drm/drm_edid.c | 3 +-- drivers/gpu/drm/drm_fb_helper.c | 2 +- drivers/gpu/drm/drm_plane.c | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) commit 9c60583c0b0fd6f3a5b61fda3eb604ce218b9d25 Author: Ville Syrjälä Date: Fri Feb 23 21:25:01 2018 +0200 Revert "drm: Use a flexible array member for blob property data" Using a flexible array for the blob data was a mistake by me. It forces all users of the blob data to cast blob->data to something else. void* is clearly superior so let's go back to the original scheme. Not a clean revert as the code has moved. This reverts commit d63f5e6bf6f2a1573ea39c9937cdf5ab0b3a4b77. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180223192506.29992-1-ville.syrjala@linux.intel.com Reviewed-by: Shashank Sharma Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_property.c | 1 + include/drm/drm_property.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 22de4e7a531b623962e62ee6d3a39a7e51bdf90e Author: Tvrtko Ursulin Date: Wed Mar 14 08:05:35 2018 +0000 drm/i915/pmu: Work around compiler warnings on some kernel configs Arnd Bergman reports: """ The conditional spinlock confuses gcc into thinking the 'flags' value might contain uninitialized data: drivers/gpu/drm/i915/i915_pmu.c: In function '__i915_pmu_event_read': arch/x86/include/asm/paravirt_types.h:573:3: error: 'flags' may be used uninitialized in this function [-Werror=maybe-uninitialized] The code is correct, but it's easy to see how the compiler gets confused here. This avoids the problem by pulling the lock outside of the function into its only caller. """ On deeper look it seems this is caused by paravirt spinlocks implementation when CONFIG_PARAVIRT_DEBUG is set, which by being complicated, manages to convince gcc locked parameter can be changed externally (impossible). Work around it by removing the conditional locking parameters altogether. (It was never the most elegant code anyway.) Slight penalty we now pay is an additional irqsave spin lock/unlock cycle on the event enable path. But since enable is not a fast path, that is preferrable to the alternative solution which was doing MMIO under irqsave spinlock. Signed-off-by: Tvrtko Ursulin Reported-by: Arnd Bergmann Fixes: 1fe699e30113 ("drm/i915/pmu: Fix sleep under atomic in RC6 readout") Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: Imre Deak Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: David Airlie Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180314080535.17490-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit ad055fb8e010e4ff37f66aeed1d380329bddce67) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_pmu.c | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) commit 73e2232aa3253d77935112bfc218700f6a2f1000 Author: Chris Wilson Date: Wed Mar 7 13:42:26 2018 +0000 drm/i915: Only call tasklet_kill() on the first prepare_reset tasklet_kill() will spin waiting for the current tasklet to be executed. However, if tasklet_disable() has been called, then the tasklet is never executed but permanently put back onto the runlist until tasklet_enable() is called. Ergo, we cannot use tasklet_kill() inside a disable/enable pair. This is the case when we call set-wedge from inside i915_reset(), and another request was submitted to us concurrent to the reset. Fixes: 963ddd63c314 ("drm/i915: Suspend submission tasklets around wedging") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180307134226.25492-6-chris@chris-wilson.co.uk (cherry picked from commit 68ad361285a9cc73b259f59adbaafde196c15987) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 7e9d3a4a1b21fd8a595774697f4047e7505deea6 Author: Chris Wilson Date: Wed Mar 7 13:42:25 2018 +0000 drm/i915: Wrap engine->schedule in RCU locks for set-wedge protection Similar to the staging around handling of engine->submit_request, we need to stop adding to the execlists->queue prior to calling engine->cancel_requests. cancel_requests will move requests from the queue onto the timeline, so if we add a request onto the queue after that point, it will be lost. Fixes: af7a8ffad9c5 ("drm/i915: Use rcu instead of stop_machine in set_wedged") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180307134226.25492-5-chris@chris-wilson.co.uk (cherry picked from commit 47650db02dd52267953df81438c93cf8a0eb0e5e) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 13 +++++++------ drivers/gpu/drm/i915/i915_request.c | 2 ++ 2 files changed, 9 insertions(+), 6 deletions(-) commit 84d4ebdb6c72988a1acddb1856b12427a287149d Author: Jani Nikula Date: Tue Mar 6 12:41:55 2018 +0200 drm/i915/icl: do not save DDI A/E sharing bit for ICL We don't want to preserve the DDI A 4 lane bit on ICL. Fixes: 3d2011cfa41f ("drm/i915/icl: remove port A/E lane sharing limitation.") Cc: Mahesh Kumar Cc: Paulo Zanoni Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180306104155.3526-1-jani.nikula@intel.com (cherry picked from commit 1e6aa7e55c28ecd842b8b4599e4273c2429ee061) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_ddi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit e7f4da4c44fe74e1c9277bac9b12ea1ef4eb70db Author: Thierry Reding Date: Wed Mar 14 11:02:18 2018 +0100 phy: tegra: xusb: Uncomment register write The reason why this was originally commented out is no longer clear. The UPHY driver for SATA works fine with or without this change. The reset value of the XDIGCLK_EN bit is 0, so unless programmed by the bootloader this shouldn't make a difference anyway. Define a macro for this bit and uncomment the code. This also fixes a coverity issue brought to my attention by Rohith because not only is the XDIGCLK_EN field modification commented out, but also the register write which causes none of the earlier modifications of the register value to be written to the register and the value being overwritten. Reported-by: Rohith Seelaboyina Signed-off-by: Thierry Reding Signed-off-by: Kishon Vijay Abraham I drivers/phy/tegra/xusb-tegra210.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ec1fcd7b7e6f50dd6e259ca76c6e41e2346b3afe Author: Enric Balletbo i Serra Date: Thu Mar 1 16:25:10 2018 +0100 phy: rockchip-typec: fall back to working in host-mode if extcon is missing. Right now the rockchip type-c phy does fail probing when no extcon is detected. Some boards get the cable-state via the extcon interface and have this supported, other boards seem to use the fusb302 chip or another but the driver currently does not seem to utilize the extcon interface to report the cable-state. And, other, just connect the type-c to a standard USB-A port so use no controller at all. A missing extcon shouldn't fail to probe, instead, should just fall back to working in host-mode if it cannot get the extcon. Fixes: c301b327aea898af ("arm64: dts: rockchip: add usb3-phy otg-port support for rk3399") Reported-by: Vicente Bergas Signed-off-by: Enric Balletbo i Serra Reviewed-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-typec.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 21bf9bc2a99e7b519b0035155209aeea2bc90696 Author: Enric Balletbo i Serra Date: Thu Mar 1 16:25:11 2018 +0100 dt-bindings: phy-rockchip-typec: move extcon property to be optional. The extcon property is used to detect the cable-state but some boards just connect the type-c phy to a regular USB-A connector without any power-delivery and thus no controller reporting the cable-state. So the extcon property is not really a required property, move it to be optional instead. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt | 2 ++ 1 file changed, 2 insertions(+) commit 866d4087f30170187b2d456e7f40cd4e7f29041b Author: Chris Zhong Date: Fri Feb 16 13:09:55 2018 +0100 phy: rockchip-typec: support DP phy switch There are 2 Type-c PHYs in RK3399, but only one DP controller. Hence only one PHY can connect to DP controller at one time, the other should be disconnected. The GRF_SOC_CON26 register has a switch bit to do it, set this bit means enable PHY 1, clear this bit means enable PHY 0. Signed-off-by: Chris Zhong Signed-off-by: Enric Balletbo i Serra Reviewed-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-typec.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 5eac5e9c0f515f8e452321b159b4093065dfc757 Author: Chris Zhong Date: Fri Feb 16 13:09:54 2018 +0100 phy: rockchip-typec: force to USB2 if DP at 4 lanes mode The usb3tousb2_en BIT will be clear to 0 in probe(), it make USB controller work at USB3 mode, and if the USB phy is turned on with DP only mode(4 lanes DP), the rockchip_usb3_phy_power_on() will return directly, so usb3_host_disable and usb3_host_port these 2 BIT will keep a same value as coreboot. In coreboot, these 3 BITs are set as USB2 mode, but now one of the bits is changed to USB3, it make USB controller work at a unknown status. These 3 BITs should be changed to USB2, if the Type-C works at 4 lanes mode, and then switch it back to USB3 mode, when USB disconnect. Signed-off-by: Chris Zhong Signed-off-by: Enric Balletbo i Serra Reviewed-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-typec.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit f293f7409f6b2850d45a9fb8689003d8fa6fe453 Author: William wu Date: Fri Feb 16 13:09:53 2018 +0100 phy: rockchip-typec: enable usb3 host during usb3 phy power on We have forced usb3 to work in usb2 only mode in firmware by setting usb3tousb2_en (bit3 of GRF_USB3PHY0/1_CON0) to 1, and setting host_u3_port_disable (bit0 of GRF_USB3OTG0/1_CON1) to 1 and host_u3_port (bit15~12 of GRF_USB3OTG0/1_CON1) to 0. So we need to re-enable usb3 host. Note that the RK3399 TRM suggests that we should keep the whole usb3 controller in reset for the duration of the Type-C PHY initialization. However, it's hard to assert the reset in the current framework of reset. And according to the TRM, it doesn't require that we should clear the usb3tousb2 bit before pipe ready. So let's enable the usb3 host after pipe ready to avoid the Type-C PHY initialization failure. Signed-off-by: William wu Signed-off-by: Enric Balletbo i Serra Reviewed-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-typec.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6912d4f40bc7b8a40604f2fa02bb5545e39d1a35 Author: Enric Balletbo i Serra Date: Fri Feb 16 13:09:52 2018 +0100 dt-bindings: phy-rockchip-typec: deprecate some register properties. As now the following register properties are in the driver, document as deprecated these properties and recommend to not use them on new bindings. The deprecated properties are: - rockchip,typec-conn-dir : the register of type-c connector direction - rockchip,usb3tousb2-en : the register of type-c force usb3 to usb2 enable control. - rockchip,external-psm : the register of type-c phy external psm clock selection. - rockchip,pipe-status : the register of type-c phy pipe status. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Heiko Stuebner Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/phy-rockchip-typec.txt | 33 +++++----------------- 1 file changed, 7 insertions(+), 26 deletions(-) commit 0fbc47d9e426a934668dbfeb0db26da6f0b7f35c Author: Enric Balletbo i Serra Date: Fri Feb 16 13:09:51 2018 +0100 phy: rockchip-typec: deprecate some DT properties for various register fields. Adding properties for various register fields in the DT doesn't scale and this information should be in the driver instead. Before this patch these registers (description below) were specified in the DT, every register node contained 3 sections: offset, enable bit, write mask bit. - rockchip,typec-conn-dir : the register of type-c connector direction, for type-c phy0, it must be <0xe580 0 16>; for type-c phy1, it must be <0xe58c 0 16>; - rockchip,usb3tousb2-en : the register of type-c force usb3 to usb2 enable control. for type-c phy0, it must be <0xe580 3 19>; for type-c phy1, it must be <0xe58c 3 19>; - rockchip,external-psm : the register of type-c phy external psm clock selection. for type-c phy0, it must be <0xe588 14 30>; for type-c phy1, it must be <0xe594 14 30>; - rockchip,pipe-status : the register of type-c phy pipe status. for type-c phy0, it must be <0xe5c0 0 0>; for type-c phy1, it must be <0xe5c0 16 16>; After this patch these register definitions are in the driver. So can be removed from the DT. Note that there are 2 type-c phys for RK3399 with different offsets, the driver checks the phy base address of the running instance and applies the right offsets. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-typec.c | 112 +++++++++++++++++------------- 1 file changed, 63 insertions(+), 49 deletions(-) commit 5d1ebbda0318b1ba55eaa1fae3fd867af17b0774 Author: Tony Lindgren Date: Thu Mar 8 18:37:50 2018 -0800 phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4 Let's add support for the GPIO controlled USB PHY on the MDM6600 modem. It is used on some Motorola Mapphone series of phones and tablets such as Droid 4. The MDM6600 is hardwired to the first OHCI port in the Droid 4 case, and is controlled by several GPIOs. The USB PHY is integrated into the MDM6600 device it seems. We know this as we get L3 errors from omap-usb-host if trying to use the PHY before MDM6600 is configured. The GPIOs controlling MDM6600 are used to power device on and off, to configure the USB start-up mode (normal mode versus USB flashing), and they also tell the state of the MDM6600 device. The two start-up mode GPIOs are dual-purposed and used for out of band (OOB) wake-up for USB and TS 27.010 serial mux. But we need to configure the USB start-up mode first to get MDM6600 booted in the right mode to be usable in the first place. Note that the Motorola Mapphone Linux kernel tree has a "radio-ctrl" driver for modems. But it really does not control the radio at all, it just controls the modem power and start-up mode for USB. So I came to the conclusion that we're better off having this done in the USB PHY driver. For adding support for USB flashing mode, we can later on add a kernel module option for flash_mode=1 or something similar. Also note that currently there is no PM runtime support for the OHCI on omap variant SoCs. So for low(er) power idle states, currenty both ohci-platform and phy-mapphone-mdm6600 must be unloaded or unbound. For reference here is what I measured for total power consumption on an idle Droid 4 with and without USB related MDM6600 modules: idle lcd off phy-mapphone-mdm6600 ohci-platform 153mW 284mW 344mW So it seems that MDM6600 is currently not yet idling even with it's radio turned off, but that's something that is beyond the control of this USB PHY driver. This patch does get us to the point where modem data and GPS are usable with libqmi and ModemManager for example. Voice calls need more audio driver work. Cc: devicetree@vger.kernel.org Cc: Mark Rutland Cc: Marcel Partap Cc: Michael Scott Cc: Rob Herring Reviewed-by: Rob Herring Signed-off-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I .../bindings/phy/phy-mapphone-mdm6600.txt | 29 ++ drivers/phy/motorola/Kconfig | 8 + drivers/phy/motorola/Makefile | 1 + drivers/phy/motorola/phy-mapphone-mdm6600.c | 542 +++++++++++++++++++++ 4 files changed, 580 insertions(+) commit ba8b0ee81fbbc249e60f84bf097bd56e8047c742 Author: Pengcheng Li Date: Fri Mar 9 22:47:01 2018 +0800 phy: add inno-usb2-phy driver for hi3798cv200 SoC It adds inno-usb2-phy driver for hi3798cv200 SoC USB 2.0 support. One inno-usb2-phy device can support up to two PHY ports. While there is device level reference clock and power reset to be controlled, each PHY port has its own utmi reset that needs to assert/de-assert as needed. Hi3798cv200 needs to access PHY port0 register via particular peripheral syscon controller register to control PHY, like turning on PHY clock. Signed-off-by: Pengcheng Li Signed-off-by: Jiancheng Xue Signed-off-by: Shawn Guo Signed-off-by: Kishon Vijay Abraham I drivers/phy/hisilicon/Kconfig | 10 ++ drivers/phy/hisilicon/Makefile | 1 + drivers/phy/hisilicon/phy-hisi-inno-usb2.c | 197 +++++++++++++++++++++++++++++ 3 files changed, 208 insertions(+) commit d581ba62f34be6a190116523521875a021109b02 Author: Pengcheng Li Date: Fri Mar 9 22:47:00 2018 +0800 dt-bindings: add bindings doc for HiSilicon INNO USB2 PHY It adds device tree bindings document for HiSilicon INNO USB2 PHY. Signed-off-by: Pengcheng Li Signed-off-by: Jiancheng Xue Signed-off-by: Shawn Guo Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/phy-hisi-inno-usb2.txt | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit 0147b57e731f128d68469d8032d53c0da89c8aae Author: Yoshihiro Shimoda Date: Mon Mar 5 14:32:45 2018 +0900 dt-bindings: rcar-gen3-phy-usb3: Add bindings for r8a77965 This patch adds bindings for r8a77965 (R-Car M3-N). Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb3.txt | 2 ++ 1 file changed, 2 insertions(+) commit 44e42df6b91813c9d271044e35a7642402abf98c Author: Yoshihiro Shimoda Date: Mon Mar 5 14:32:44 2018 +0900 phy: rcar-gen3-usb2: Add support for r8a77965 This patch adds support for r8a77965 (R-Car M3-N). This SoC has dedicated pins. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Kishon Vijay Abraham I drivers/phy/renesas/phy-rcar-gen3-usb2.c | 4 ++++ 1 file changed, 4 insertions(+) commit b1ba68f33c0caa937032615833e3321d03d877b4 Author: Yoshihiro Shimoda Date: Mon Mar 5 14:32:43 2018 +0900 dt-bindings: rcar-gen3-phy-usb2: Add bindings for r8a77965 This patch adds support for r8a77965 (R-Car M3-N). Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 2 ++ 1 file changed, 2 insertions(+) commit 94c358da3a0545205c6c6a50ae26141f1c73acfa Author: Amelie Delaunay Date: Fri Mar 2 15:56:25 2018 +0100 phy: stm32: add support for STM32 USB PHY Controller (USBPHYC) This patch adds phy transceiver driver for STM32 USB PHY Controller (USBPHYC) that provides dual port High-Speed phy for OTG (single port) and EHCI/OHCI host controller (two ports). One port of the phy is shared between the two USB controllers through a UTMI+ switch. [fengguang.wu@intel.com: Make stm32_usbphyc_get_pll_params() to be static] Signed-off-by: Fengguang Wu Signed-off-by: Amelie Delaunay Signed-off-by: Kishon Vijay Abraham I drivers/phy/st/Kconfig | 14 ++ drivers/phy/st/Makefile | 1 + drivers/phy/st/phy-stm32-usbphyc.c | 461 +++++++++++++++++++++++++++++++++++++ 3 files changed, 476 insertions(+) commit 0a00ac97d29e65093c0d4c7c4f5827528168b73a Author: Chris Zhong Date: Fri Feb 16 13:09:56 2018 +0100 drm/rockchip: cdn-dp: remove the DP phy switch There are 2 Type-c PHYs in RK3399, but only one DP controller. Hence only one PHY can connect to DP controller at one time, the other should be disconnected. The GRF_SOC_CON26 register has a switch bit to do it, set this bit means enable PHY 1, clear this bit means enable PHY 0. If the board has 2 Type-C ports, the DP driver get the phy id from devm_of_phy_get_by_index, and then control this switch according to this id. But some others board only has one Type-C port, it may be PHY 0 or PHY 1. The dts node id can not tell us the correct PHY id. Hence move this switch to PHY driver, the PHY driver can distinguish between PHY 0 and PHY 1, and then write the correct register bit. Signed-off-by: Chris Zhong Signed-off-by: Enric Balletbo i Serra [The phy-changes are in the phy-tree now and the cdn-dp wasn't enabled at all so far, so this change can go through drm-misc alone without causing issues when testing drm-misc] Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180216120956.19034-6-enric.balletbo@collabora.com drivers/gpu/drm/rockchip/cdn-dp-core.c | 7 ------- 1 file changed, 7 deletions(-) commit 79375ea3ec527f746d5beae8c8f6e8a58740d4a8 Author: Arnd Bergmann Date: Fri Mar 9 23:14:56 2018 +0100 mm: remove obsolete alloc_remap() Tile was the only remaining architecture to implement alloc_remap(), and since that is being removed, there is no point in keeping this function. Removing all callers simplifies the mem_map handling. Reviewed-by: Pavel Tatashin Signed-off-by: Arnd Bergmann include/linux/bootmem.h | 9 --------- mm/page_alloc.c | 5 +---- mm/sparse.c | 15 --------------- 3 files changed, 1 insertion(+), 28 deletions(-) commit 1a8429132e1d2ada3832db5b4a0802c49affb750 Author: Arnd Bergmann Date: Fri Mar 9 23:11:26 2018 +0100 mm: remove blackfin MPU support The CONFIG_MPU option was only defined on blackfin, and that architecture is now being removed, so the respective code can be simplified. A lot of other microcontrollers have an MPU, but I suspect that if we want to bring that support back, we'd do it differently anyway. Signed-off-by: Arnd Bergmann kernel/module.c | 4 ---- mm/nommu.c | 20 -------------------- 2 files changed, 24 deletions(-) commit e05a959f4b9ae8d9693a8a7347d42d9e45edb3b6 Author: Arnd Bergmann Date: Fri Mar 9 21:55:53 2018 +0100 procfs: remove CONFIG_HARDWALL dependency Hardwall is a tile specific feature, and with the removal of the tile architecture, this has become dead code, so let's remove it. Alexey Dobriyan Signed-off-by: Arnd Bergmann fs/proc/base.c | 9 --------- 1 file changed, 9 deletions(-) commit c690eddc2f3b44b24520f4a77cc3a4c9bde7d571 Author: Jesper Nilsson Date: Sun Mar 11 11:05:23 2018 +0100 CRIS: Drop support for the CRIS port The port was added back in 2000 so it's no longer even a good source of inspiration for newer ports (if it ever was) The last SoC (ARTPEC-3) with a CRIS main CPU was launched in 2008. Coupled with time and working developer board hardware being in low supply, it's time to drop the port from Linux. So long and thanks for all the fish! Signed-off-by: Jesper Nilsson Signed-off-by: Arnd Bergmann Documentation/00-INDEX | 2 - Documentation/cris/README | 195 - Documentation/devicetree/bindings/cris/axis.txt | 9 - Documentation/devicetree/bindings/cris/boards.txt | 8 - .../interrupt-controller/axis,crisv32-intc.txt | 23 - MAINTAINERS | 10 - arch/cris/Kconfig | 595 -- arch/cris/Kconfig.debug | 41 - arch/cris/Makefile | 104 - arch/cris/arch-v10/Kconfig | 399 -- arch/cris/arch-v10/README.mm | 244 - arch/cris/arch-v10/drivers/Kconfig | 561 -- arch/cris/arch-v10/drivers/Makefile | 11 - arch/cris/arch-v10/drivers/axisflashmap.c | 413 -- arch/cris/arch-v10/drivers/eeprom.c | 852 --- arch/cris/arch-v10/drivers/gpio.c | 857 --- arch/cris/arch-v10/drivers/i2c.c | 699 -- arch/cris/arch-v10/drivers/i2c.h | 18 - arch/cris/arch-v10/drivers/sync_serial.c | 1463 ---- arch/cris/arch-v10/kernel/Makefile | 18 - arch/cris/arch-v10/kernel/crisksyms.c | 17 - arch/cris/arch-v10/kernel/debugport.c | 560 -- arch/cris/arch-v10/kernel/dma.c | 288 - arch/cris/arch-v10/kernel/entry.S | 978 --- arch/cris/arch-v10/kernel/fasttimer.c | 835 --- arch/cris/arch-v10/kernel/head.S | 620 -- arch/cris/arch-v10/kernel/io_interface_mux.c | 1183 ---- arch/cris/arch-v10/kernel/irq.c | 236 - arch/cris/arch-v10/kernel/kgdb.c | 1128 --- arch/cris/arch-v10/kernel/process.c | 180 - arch/cris/arch-v10/kernel/ptrace.c | 204 - arch/cris/arch-v10/kernel/setup.c | 107 - arch/cris/arch-v10/kernel/shadows.c | 37 - arch/cris/arch-v10/kernel/signal.c | 440 -- arch/cris/arch-v10/kernel/time.c | 268 - arch/cris/arch-v10/kernel/traps.c | 134 - arch/cris/arch-v10/lib/Makefile | 6 - arch/cris/arch-v10/lib/checksum.S | 119 - arch/cris/arch-v10/lib/checksumcopy.S | 127 - arch/cris/arch-v10/lib/csumcpfruser.S | 65 - arch/cris/arch-v10/lib/dram_init.S | 147 - arch/cris/arch-v10/lib/hw_settings.S | 61 - arch/cris/arch-v10/lib/memset.c | 259 - arch/cris/arch-v10/lib/string.c | 236 - arch/cris/arch-v10/lib/usercopy.c | 511 -- arch/cris/arch-v10/mm/Makefile | 6 - arch/cris/arch-v10/mm/fault.c | 96 - arch/cris/arch-v10/mm/init.c | 256 - arch/cris/arch-v10/mm/tlb.c | 179 - arch/cris/arch-v10/output_arch.ld | 2 - arch/cris/arch-v32/Kconfig | 211 - arch/cris/arch-v32/drivers/Kconfig | 263 - arch/cris/arch-v32/drivers/Makefile | 12 - arch/cris/arch-v32/drivers/axisflashmap.c | 592 -- arch/cris/arch-v32/drivers/cryptocop.c | 3522 ---------- arch/cris/arch-v32/drivers/iop_fw_load.c | 230 - arch/cris/arch-v32/drivers/mach-a3/Makefile | 5 - arch/cris/arch-v32/drivers/mach-a3/nandflash.c | 177 - arch/cris/arch-v32/drivers/mach-fs/Makefile | 5 - arch/cris/arch-v32/drivers/mach-fs/nandflash.c | 171 - arch/cris/arch-v32/drivers/pci/Makefile | 5 - arch/cris/arch-v32/drivers/pci/bios.c | 74 - arch/cris/arch-v32/drivers/sync_serial.c | 1715 ----- arch/cris/arch-v32/kernel/Makefile | 18 - arch/cris/arch-v32/kernel/cache.c | 34 - arch/cris/arch-v32/kernel/cacheflush.S | 100 - arch/cris/arch-v32/kernel/crisksyms.c | 26 - arch/cris/arch-v32/kernel/debugport.c | 232 - arch/cris/arch-v32/kernel/entry.S | 909 --- arch/cris/arch-v32/kernel/fasttimer.c | 793 --- arch/cris/arch-v32/kernel/head.S | 439 -- arch/cris/arch-v32/kernel/irq.c | 520 -- arch/cris/arch-v32/kernel/kgdb.c | 1593 ----- arch/cris/arch-v32/kernel/kgdb_asm.S | 552 -- arch/cris/arch-v32/kernel/process.c | 180 - arch/cris/arch-v32/kernel/ptrace.c | 492 -- arch/cris/arch-v32/kernel/setup.c | 163 - arch/cris/arch-v32/kernel/signal.c | 541 -- arch/cris/arch-v32/kernel/time.c | 345 - arch/cris/arch-v32/kernel/traps.c | 196 - arch/cris/arch-v32/lib/Makefile | 7 - arch/cris/arch-v32/lib/checksum.S | 89 - arch/cris/arch-v32/lib/checksumcopy.S | 95 - arch/cris/arch-v32/lib/csumcpfruser.S | 70 - arch/cris/arch-v32/lib/delay.c | 29 - arch/cris/arch-v32/lib/memset.c | 259 - arch/cris/arch-v32/lib/strcmp.S | 21 - arch/cris/arch-v32/lib/string.c | 236 - arch/cris/arch-v32/lib/usercopy.c | 458 -- arch/cris/arch-v32/mach-a3/Kconfig | 111 - arch/cris/arch-v32/mach-a3/Makefile | 8 - arch/cris/arch-v32/mach-a3/arbiter.c | 635 -- arch/cris/arch-v32/mach-a3/dma.c | 184 - arch/cris/arch-v32/mach-a3/dram_init.S | 119 - arch/cris/arch-v32/mach-a3/hw_settings.S | 54 - arch/cris/arch-v32/mach-a3/pinmux.c | 389 -- arch/cris/arch-v32/mach-fs/Kconfig | 198 - arch/cris/arch-v32/mach-fs/Makefile | 8 - arch/cris/arch-v32/mach-fs/arbiter.c | 405 -- arch/cris/arch-v32/mach-fs/dma.c | 229 - arch/cris/arch-v32/mach-fs/dram_init.S | 117 - arch/cris/arch-v32/mach-fs/hw_settings.S | 71 - arch/cris/arch-v32/mach-fs/pinmux.c | 328 - arch/cris/arch-v32/mm/Makefile | 4 - arch/cris/arch-v32/mm/init.c | 163 - arch/cris/arch-v32/mm/intmem.c | 157 - arch/cris/arch-v32/mm/l2cache.c | 30 - arch/cris/arch-v32/mm/mmu.S | 211 - arch/cris/arch-v32/mm/tlb.c | 209 - arch/cris/arch-v32/output_arch.ld | 2 - arch/cris/boot/.gitignore | 2 - arch/cris/boot/Makefile | 25 - arch/cris/boot/compressed/Makefile | 36 - arch/cris/boot/compressed/README | 24 - arch/cris/boot/compressed/decompress_v10.lds | 31 - arch/cris/boot/compressed/decompress_v32.lds | 31 - arch/cris/boot/compressed/head_v10.S | 127 - arch/cris/boot/compressed/head_v32.S | 146 - arch/cris/boot/compressed/misc.c | 377 - arch/cris/boot/dts/Makefile | 5 - arch/cris/boot/dts/artpec3.dtsi | 47 - arch/cris/boot/dts/dev88.dts | 68 - arch/cris/boot/dts/etraxfs.dtsi | 47 - arch/cris/boot/dts/p1343.dts | 77 - arch/cris/boot/rescue/Makefile | 53 - arch/cris/boot/rescue/head_v10.S | 358 - arch/cris/boot/rescue/head_v32.S | 27 - arch/cris/boot/rescue/kimagerescue.S | 142 - arch/cris/boot/rescue/rescue_v10.lds | 21 - arch/cris/boot/rescue/rescue_v32.lds | 44 - arch/cris/boot/rescue/testrescue.S | 25 - arch/cris/boot/tools/build.c | 288 - arch/cris/configs/artpec_3_defconfig | 40 - arch/cris/configs/dev88_defconfig | 48 - arch/cris/configs/etrax-100lx_defconfig | 23 - arch/cris/configs/etrax-100lx_v2_defconfig | 42 - arch/cris/configs/etraxfs_defconfig | 40 - arch/cris/include/arch-v10/arch/bitops.h | 74 - arch/cris/include/arch-v10/arch/bug.h | 74 - arch/cris/include/arch-v10/arch/cache.h | 9 - arch/cris/include/arch-v10/arch/checksum.h | 30 - arch/cris/include/arch-v10/arch/delay.h | 21 - arch/cris/include/arch-v10/arch/dma.h | 75 - arch/cris/include/arch-v10/arch/io.h | 173 - arch/cris/include/arch-v10/arch/io_interface_mux.h | 76 - arch/cris/include/arch-v10/arch/irq.h | 162 - arch/cris/include/arch-v10/arch/irqflags.h | 46 - arch/cris/include/arch-v10/arch/memmap.h | 23 - arch/cris/include/arch-v10/arch/mmu.h | 108 - arch/cris/include/arch-v10/arch/offset.h | 34 - arch/cris/include/arch-v10/arch/page.h | 31 - arch/cris/include/arch-v10/arch/pgtable.h | 18 - arch/cris/include/arch-v10/arch/processor.h | 70 - arch/cris/include/arch-v10/arch/swab.h | 31 - arch/cris/include/arch-v10/arch/system.h | 40 - arch/cris/include/arch-v10/arch/thread_info.h | 13 - arch/cris/include/arch-v10/arch/timex.h | 31 - arch/cris/include/arch-v10/arch/tlb.h | 14 - arch/cris/include/arch-v10/arch/uaccess.h | 651 -- arch/cris/include/arch-v10/arch/unistd.h | 149 - arch/cris/include/arch-v32/arch/bitops.h | 65 - arch/cris/include/arch-v32/arch/bug.h | 41 - arch/cris/include/arch-v32/arch/cache.h | 22 - arch/cris/include/arch-v32/arch/checksum.h | 30 - arch/cris/include/arch-v32/arch/cryptocop.h | 159 - arch/cris/include/arch-v32/arch/delay.h | 29 - arch/cris/include/arch-v32/arch/dma.h | 1 - arch/cris/include/arch-v32/arch/hwregs/Makefile | 187 - .../arch-v32/arch/hwregs/asm/ata_defs_asm.h | 223 - .../arch-v32/arch/hwregs/asm/bif_core_defs_asm.h | 320 - .../arch-v32/arch/hwregs/asm/bif_dma_defs_asm.h | 496 -- .../arch-v32/arch/hwregs/asm/bif_slave_defs_asm.h | 250 - .../arch-v32/arch/hwregs/asm/config_defs_asm.h | 132 - .../include/arch-v32/arch/hwregs/asm/cpu_vect.h | 41 - .../arch-v32/arch/hwregs/asm/cris_defs_asm.h | 115 - .../arch-v32/arch/hwregs/asm/cris_supp_reg.h | 11 - .../arch-v32/arch/hwregs/asm/dma_defs_asm.h | 369 - .../arch-v32/arch/hwregs/asm/eth_defs_asm.h | 499 -- .../arch-v32/arch/hwregs/asm/gio_defs_asm.h | 277 - .../include/arch-v32/arch/hwregs/asm/intr_vect.h | 39 - .../arch-v32/arch/hwregs/asm/intr_vect_defs_asm.h | 356 - .../arch-v32/arch/hwregs/asm/irq_nmi_defs_asm.h | 70 - .../arch-v32/arch/hwregs/asm/marb_defs_asm.h | 580 -- .../arch-v32/arch/hwregs/asm/mmu_defs_asm.h | 213 - .../arch-v32/arch/hwregs/asm/mmu_supp_reg.h | 8 - .../arch-v32/arch/hwregs/asm/rt_trace_defs_asm.h | 143 - .../arch-v32/arch/hwregs/asm/ser_defs_asm.h | 360 - .../arch-v32/arch/hwregs/asm/sser_defs_asm.h | 463 -- .../arch-v32/arch/hwregs/asm/strcop_defs_asm.h | 85 - .../arch-v32/arch/hwregs/asm/strmux_defs_asm.h | 101 - .../arch-v32/arch/hwregs/asm/timer_defs_asm.h | 230 - arch/cris/include/arch-v32/arch/hwregs/ata_defs.h | 223 - .../include/arch-v32/arch/hwregs/bif_core_defs.h | 285 - .../include/arch-v32/arch/hwregs/bif_dma_defs.h | 474 -- .../include/arch-v32/arch/hwregs/bif_slave_defs.h | 250 - .../include/arch-v32/arch/hwregs/config_defs.h | 143 - arch/cris/include/arch-v32/arch/hwregs/cpu_vect.h | 42 - arch/cris/include/arch-v32/arch/hwregs/dma.h | 128 - arch/cris/include/arch-v32/arch/hwregs/dma_defs.h | 437 -- arch/cris/include/arch-v32/arch/hwregs/eth_defs.h | 379 - .../include/arch-v32/arch/hwregs/extmem_defs.h | 370 - .../cris/include/arch-v32/arch/hwregs/iop/Makefile | 147 - .../arch/hwregs/iop/asm/iop_crc_par_defs_asm.h | 172 - .../arch/hwregs/iop/asm/iop_dmc_in_defs_asm.h | 322 - .../arch/hwregs/iop/asm/iop_dmc_out_defs_asm.h | 350 - .../arch/hwregs/iop/asm/iop_fifo_in_defs_asm.h | 235 - .../hwregs/iop/asm/iop_fifo_in_extra_defs_asm.h | 156 - .../arch/hwregs/iop/asm/iop_fifo_out_defs_asm.h | 255 - .../hwregs/iop/asm/iop_fifo_out_extra_defs_asm.h | 159 - .../arch/hwregs/iop/asm/iop_mpu_defs_asm.h | 178 - .../arch/hwregs/iop/asm/iop_reg_space_asm.h | 45 - .../arch/hwregs/iop/asm/iop_sap_in_defs_asm.h | 183 - .../arch/hwregs/iop/asm/iop_sap_out_defs_asm.h | 347 - .../arch/hwregs/iop/asm/iop_scrc_in_defs_asm.h | 112 - .../arch/hwregs/iop/asm/iop_scrc_out_defs_asm.h | 106 - .../arch/hwregs/iop/asm/iop_spu_defs_asm.h | 574 -- .../arch/hwregs/iop/asm/iop_sw_cfg_defs_asm.h | 1053 --- .../arch/hwregs/iop/asm/iop_sw_cpu_defs_asm.h | 1759 ----- .../arch/hwregs/iop/asm/iop_sw_mpu_defs_asm.h | 1777 ----- .../arch/hwregs/iop/asm/iop_sw_spu_defs_asm.h | 692 -- .../arch/hwregs/iop/asm/iop_timer_grp_defs_asm.h | 238 - .../arch/hwregs/iop/asm/iop_trigger_grp_defs_asm.h | 158 - .../arch/hwregs/iop/asm/iop_version_defs_asm.h | 65 - .../arch-v32/arch/hwregs/iop/iop_crc_par_defs.h | 233 - .../arch-v32/arch/hwregs/iop/iop_dmc_in_defs.h | 326 - .../arch-v32/arch/hwregs/iop/iop_dmc_out_defs.h | 327 - .../arch-v32/arch/hwregs/iop/iop_fifo_in_defs.h | 256 - .../arch/hwregs/iop/iop_fifo_in_extra_defs.h | 165 - .../arch-v32/arch/hwregs/iop/iop_fifo_out_defs.h | 279 - .../arch/hwregs/iop/iop_fifo_out_extra_defs.h | 165 - .../arch-v32/arch/hwregs/iop/iop_mpu_defs.h | 191 - .../arch-v32/arch/hwregs/iop/iop_mpu_macros.h | 765 -- .../arch-v32/arch/hwregs/iop/iop_reg_space.h | 45 - .../arch-v32/arch/hwregs/iop/iop_sap_in_defs.h | 180 - .../arch-v32/arch/hwregs/iop/iop_sap_out_defs.h | 307 - .../arch-v32/arch/hwregs/iop/iop_scrc_in_defs.h | 161 - .../arch-v32/arch/hwregs/iop/iop_scrc_out_defs.h | 147 - .../arch-v32/arch/hwregs/iop/iop_spu_defs.h | 454 -- .../arch-v32/arch/hwregs/iop/iop_sw_cfg_defs.h | 1043 --- .../arch-v32/arch/hwregs/iop/iop_sw_cpu_defs.h | 854 --- .../arch-v32/arch/hwregs/iop/iop_sw_mpu_defs.h | 894 --- .../arch-v32/arch/hwregs/iop/iop_sw_spu_defs.h | 553 -- .../arch-v32/arch/hwregs/iop/iop_timer_grp_defs.h | 250 - .../arch/hwregs/iop/iop_trigger_grp_defs.h | 171 - .../arch-v32/arch/hwregs/iop/iop_version_defs.h | 100 - .../include/arch-v32/arch/hwregs/irq_nmi_defs.h | 105 - .../include/arch-v32/arch/hwregs/marb_bp_defs.h | 206 - arch/cris/include/arch-v32/arch/hwregs/marb_defs.h | 476 -- arch/cris/include/arch-v32/arch/hwregs/reg_rdwr.h | 18 - .../include/arch-v32/arch/hwregs/rt_trace_defs.h | 174 - arch/cris/include/arch-v32/arch/hwregs/ser_defs.h | 309 - arch/cris/include/arch-v32/arch/hwregs/sser_defs.h | 332 - arch/cris/include/arch-v32/arch/hwregs/strcop.h | 58 - .../include/arch-v32/arch/hwregs/strcop_defs.h | 110 - arch/cris/include/arch-v32/arch/hwregs/supp_reg.h | 79 - arch/cris/include/arch-v32/arch/intmem.h | 10 - arch/cris/include/arch-v32/arch/irq.h | 125 - arch/cris/include/arch-v32/arch/irqflags.h | 47 - arch/cris/include/arch-v32/arch/memmap.h | 1 - arch/cris/include/arch-v32/arch/mmu.h | 111 - arch/cris/include/arch-v32/arch/offset.h | 36 - arch/cris/include/arch-v32/arch/page.h | 23 - arch/cris/include/arch-v32/arch/pgtable.h | 18 - arch/cris/include/arch-v32/arch/processor.h | 54 - arch/cris/include/arch-v32/arch/swab.h | 25 - arch/cris/include/arch-v32/arch/system.h | 38 - arch/cris/include/arch-v32/arch/thread_info.h | 14 - arch/cris/include/arch-v32/arch/timex.h | 32 - arch/cris/include/arch-v32/arch/tlb.h | 15 - arch/cris/include/arch-v32/arch/uaccess.h | 730 -- arch/cris/include/arch-v32/arch/unistd.h | 156 - arch/cris/include/arch-v32/mach-a3/mach/arbiter.h | 35 - arch/cris/include/arch-v32/mach-a3/mach/dma.h | 59 - .../mach-a3/mach/hwregs/asm/clkgen_defs_asm.h | 165 - .../mach-a3/mach/hwregs/asm/ddr2_defs_asm.h | 267 - .../mach-a3/mach/hwregs/asm/gio_defs_asm.h | 850 --- .../mach-a3/mach/hwregs/asm/pinmux_defs_asm.h | 573 -- .../mach-a3/mach/hwregs/asm/pio_defs_asm.h | 338 - .../arch-v32/mach-a3/mach/hwregs/asm/reg_map_asm.h | 100 - .../mach-a3/mach/hwregs/asm/timer_defs_asm.h | 229 - .../arch-v32/mach-a3/mach/hwregs/clkgen_defs.h | 160 - .../arch-v32/mach-a3/mach/hwregs/ddr2_defs.h | 282 - .../arch-v32/mach-a3/mach/hwregs/gio_defs.h | 838 --- .../arch-v32/mach-a3/mach/hwregs/intr_vect.h | 47 - .../arch-v32/mach-a3/mach/hwregs/intr_vect_defs.h | 342 - .../mach/hwregs/iop/asm/iop_reg_space_asm.h | 32 - .../mach/hwregs/iop/asm/iop_sap_in_defs_asm.h | 110 - .../mach/hwregs/iop/asm/iop_sap_out_defs_asm.h | 277 - .../mach/hwregs/iop/asm/iop_sw_cfg_defs_asm.h | 740 -- .../mach/hwregs/iop/asm/iop_sw_cpu_defs_asm.h | 951 --- .../mach/hwregs/iop/asm/iop_sw_mpu_defs_asm.h | 1087 --- .../mach/hwregs/iop/asm/iop_sw_spu_defs_asm.h | 524 -- .../mach/hwregs/iop/asm/iop_version_defs_asm.h | 62 - .../mach-a3/mach/hwregs/iop/iop_reg_space.h | 32 - .../mach-a3/mach/hwregs/iop/iop_sap_in_defs.h | 142 - .../mach-a3/mach/hwregs/iop/iop_sap_out_defs.h | 232 - .../mach-a3/mach/hwregs/iop/iop_sw_cfg_defs.h | 726 -- .../mach-a3/mach/hwregs/iop/iop_sw_cpu_defs.h | 523 -- .../mach-a3/mach/hwregs/iop/iop_sw_mpu_defs.h | 649 -- .../mach-a3/mach/hwregs/iop/iop_sw_spu_defs.h | 442 -- .../mach-a3/mach/hwregs/iop/iop_version_defs.h | 97 - .../arch-v32/mach-a3/mach/hwregs/l2cache_defs.h | 143 - .../arch-v32/mach-a3/mach/hwregs/marb_bar_defs.h | 483 -- .../arch-v32/mach-a3/mach/hwregs/marb_foo_defs.h | 627 -- .../arch-v32/mach-a3/mach/hwregs/pinmux_defs.h | 313 - .../arch-v32/mach-a3/mach/hwregs/pio_defs.h | 372 - .../include/arch-v32/mach-a3/mach/hwregs/reg_map.h | 104 - .../arch-v32/mach-a3/mach/hwregs/strmux_defs.h | 121 - .../arch-v32/mach-a3/mach/hwregs/timer_defs.h | 266 - arch/cris/include/arch-v32/mach-a3/mach/memmap.h | 11 - arch/cris/include/arch-v32/mach-a3/mach/pinmux.h | 46 - .../cris/include/arch-v32/mach-a3/mach/startup.inc | 84 - arch/cris/include/arch-v32/mach-fs/mach/arbiter.h | 29 - arch/cris/include/arch-v32/mach-fs/mach/dma.h | 80 - .../mach-fs/mach/hwregs/asm/bif_core_defs_asm.h | 320 - .../mach-fs/mach/hwregs/asm/config_defs_asm.h | 132 - .../mach-fs/mach/hwregs/asm/gio_defs_asm.h | 277 - .../mach-fs/mach/hwregs/asm/pinmux_defs_asm.h | 633 -- .../arch-v32/mach-fs/mach/hwregs/asm/reg_map_asm.h | 97 - .../mach-fs/mach/hwregs/asm/timer_defs_asm.h | 230 - .../arch-v32/mach-fs/mach/hwregs/bif_core_defs.h | 285 - .../arch-v32/mach-fs/mach/hwregs/bif_dma_defs.h | 474 -- .../arch-v32/mach-fs/mach/hwregs/bif_slave_defs.h | 250 - .../arch-v32/mach-fs/mach/hwregs/config_defs.h | 143 - .../arch-v32/mach-fs/mach/hwregs/gio_defs.h | 296 - .../arch-v32/mach-fs/mach/hwregs/intr_vect.h | 42 - .../arch-v32/mach-fs/mach/hwregs/intr_vect_defs.h | 229 - .../arch-v32/mach-fs/mach/hwregs/marb_bp_defs.h | 206 - .../arch-v32/mach-fs/mach/hwregs/marb_defs.h | 476 -- .../arch-v32/mach-fs/mach/hwregs/pinmux_defs.h | 358 - .../include/arch-v32/mach-fs/mach/hwregs/reg_map.h | 105 - .../arch-v32/mach-fs/mach/hwregs/strmux_defs.h | 128 - .../arch-v32/mach-fs/mach/hwregs/timer_defs.h | 267 - arch/cris/include/arch-v32/mach-fs/mach/memmap.h | 25 - arch/cris/include/arch-v32/mach-fs/mach/pinmux.h | 37 - .../cris/include/arch-v32/mach-fs/mach/startup.inc | 76 - arch/cris/include/asm/Kbuild | 31 - arch/cris/include/asm/asm-offsets.h | 1 - arch/cris/include/asm/axisflashmap.h | 62 - arch/cris/include/asm/bitops.h | 51 - arch/cris/include/asm/bug.h | 5 - arch/cris/include/asm/bugs.h | 21 - arch/cris/include/asm/cache.h | 7 - arch/cris/include/asm/cacheflush.h | 33 - arch/cris/include/asm/checksum.h | 83 - arch/cris/include/asm/delay.h | 28 - arch/cris/include/asm/dma.h | 22 - arch/cris/include/asm/eshlibld.h | 113 - arch/cris/include/asm/etraxi2c.h | 37 - arch/cris/include/asm/fasttimer.h | 48 - arch/cris/include/asm/fb.h | 13 - arch/cris/include/asm/ftrace.h | 1 - arch/cris/include/asm/hw_irq.h | 5 - arch/cris/include/asm/io.h | 26 - arch/cris/include/asm/irq.h | 14 - arch/cris/include/asm/irqflags.h | 1 - arch/cris/include/asm/mmu.h | 11 - arch/cris/include/asm/mmu_context.h | 35 - arch/cris/include/asm/page.h | 74 - arch/cris/include/asm/pci.h | 44 - arch/cris/include/asm/pgalloc.h | 64 - arch/cris/include/asm/pgtable.h | 297 - arch/cris/include/asm/processor.h | 59 - arch/cris/include/asm/ptrace.h | 15 - arch/cris/include/asm/segment.h | 9 - arch/cris/include/asm/serial.h | 10 - arch/cris/include/asm/shmparam.h | 9 - arch/cris/include/asm/signal.h | 24 - arch/cris/include/asm/stacktrace.h | 9 - arch/cris/include/asm/string.h | 21 - arch/cris/include/asm/swab.h | 8 - arch/cris/include/asm/switch_to.h | 13 - arch/cris/include/asm/termios.h | 52 - arch/cris/include/asm/thread_info.h | 91 - arch/cris/include/asm/timex.h | 25 - arch/cris/include/asm/tlb.h | 20 - arch/cris/include/asm/tlbflush.h | 42 - arch/cris/include/asm/uaccess.h | 361 - arch/cris/include/asm/ucontext.h | 13 - arch/cris/include/asm/unaligned.h | 14 - arch/cris/include/asm/unistd.h | 37 - arch/cris/include/asm/user.h | 53 - arch/cris/include/uapi/arch-v10/arch/sv_addr.agh | 7306 -------------------- arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h | 140 - arch/cris/include/uapi/arch-v10/arch/svinto.h | 65 - arch/cris/include/uapi/arch-v10/arch/user.h | 47 - arch/cris/include/uapi/arch-v32/arch/cryptocop.h | 123 - arch/cris/include/uapi/arch-v32/arch/user.h | 42 - arch/cris/include/uapi/asm/Kbuild | 22 - arch/cris/include/uapi/asm/byteorder.h | 9 - arch/cris/include/uapi/asm/elf.h | 91 - arch/cris/include/uapi/asm/elf_v10.h | 85 - arch/cris/include/uapi/asm/elf_v32.h | 77 - arch/cris/include/uapi/asm/ethernet.h | 22 - arch/cris/include/uapi/asm/etraxgpio.h | 83 - arch/cris/include/uapi/asm/ioctls.h | 12 - arch/cris/include/uapi/asm/param.h | 11 - arch/cris/include/uapi/asm/posix_types.h | 31 - arch/cris/include/uapi/asm/ptrace.h | 6 - arch/cris/include/uapi/asm/ptrace_v10.h | 119 - arch/cris/include/uapi/asm/ptrace_v32.h | 119 - arch/cris/include/uapi/asm/rs485.h | 19 - arch/cris/include/uapi/asm/setup.h | 7 - arch/cris/include/uapi/asm/sigcontext.h | 25 - arch/cris/include/uapi/asm/signal.h | 117 - arch/cris/include/uapi/asm/stat.h | 82 - arch/cris/include/uapi/asm/swab.h | 3 - arch/cris/include/uapi/asm/sync_serial.h | 133 - arch/cris/include/uapi/asm/termbits.h | 236 - arch/cris/include/uapi/asm/termios.h | 46 - arch/cris/include/uapi/asm/unistd.h | 369 - arch/cris/kernel/Makefile | 17 - arch/cris/kernel/asm-offsets.c | 60 - arch/cris/kernel/crisksyms.c | 69 - arch/cris/kernel/irq.c | 72 - arch/cris/kernel/module.c | 82 - arch/cris/kernel/process.c | 81 - arch/cris/kernel/profile.c | 87 - arch/cris/kernel/ptrace.c | 68 - arch/cris/kernel/setup.c | 214 - arch/cris/kernel/stacktrace.c | 76 - arch/cris/kernel/sys_cris.c | 36 - arch/cris/kernel/time.c | 73 - arch/cris/kernel/traps.c | 241 - arch/cris/kernel/vmlinux.lds.S | 138 - arch/cris/mm/Makefile | 6 - arch/cris/mm/fault.c | 390 -- arch/cris/mm/init.c | 69 - arch/cris/mm/ioremap.c | 90 - arch/cris/mm/tlb.c | 117 - 430 files changed, 99983 deletions(-) commit bb9d812643d8a121df7d614a2b9c60193a92deb0 Author: Arnd Bergmann Date: Fri Mar 9 14:13:42 2018 +0100 arch: remove tile port The Tile architecture port was added by Chris Metcalf in 2010, and maintained until early 2018 when he orphaned it due to his departure from Mellanox, and nobody else stepped up to maintain it. The product line is still around in the form of the BlueField SoC, but no longer uses the Tile architecture. There are also still products for sale with Tile-GX SoCs, notably the Mikrotik CCR router family. The products all use old (linux-3.3) kernels with lots of patches and won't be upgraded by their manufacturers. There have been efforts to port both OpenWRT and Debian to these, but both projects have stalled and are very unlikely to be continued in the future. Given that we are reasonably sure that nobody is still using the port with an upstream kernel any more, it seems better to remove it now while the port is in a good shape than to let it bitrot for a few years first. Cc: Chris Metcalf Cc: John Paul Adrian Glaubitz Link: http://www.mellanox.com/page/npu_multicore_overview Link: https://jenkins.debian.net/view/rebootstrap/job/rebootstrap_tilegx_gcc7/ Signed-off-by: Arnd Bergmann Documentation/ioctl/ioctl-number.txt | 1 - MAINTAINERS | 13 - Makefile | 8 - arch/tile/Kbuild | 3 - arch/tile/Kconfig | 481 ---- arch/tile/Kconfig.debug | 26 - arch/tile/Makefile | 77 - arch/tile/configs/tilegx_defconfig | 411 ---- arch/tile/configs/tilepro_defconfig | 524 ----- arch/tile/gxio/Kconfig | 34 - arch/tile/gxio/Makefile | 11 - arch/tile/gxio/dma_queue.c | 176 -- arch/tile/gxio/iorpc_globals.c | 89 - arch/tile/gxio/iorpc_mpipe.c | 593 ----- arch/tile/gxio/iorpc_mpipe_info.c | 102 - arch/tile/gxio/iorpc_trio.c | 350 --- arch/tile/gxio/iorpc_uart.c | 77 - arch/tile/gxio/iorpc_usb_host.c | 99 - arch/tile/gxio/kiorpc.c | 61 - arch/tile/gxio/mpipe.c | 584 ----- arch/tile/gxio/trio.c | 49 - arch/tile/gxio/uart.c | 87 - arch/tile/gxio/usb_host.c | 91 - arch/tile/include/arch/mpipe.h | 371 --- arch/tile/include/arch/mpipe_constants.h | 42 - arch/tile/include/arch/mpipe_def.h | 39 - arch/tile/include/arch/mpipe_shm.h | 521 ----- arch/tile/include/arch/mpipe_shm_def.h | 23 - arch/tile/include/arch/spr_def.h | 109 - arch/tile/include/arch/trio.h | 111 - arch/tile/include/arch/trio_constants.h | 36 - arch/tile/include/arch/trio_def.h | 41 - arch/tile/include/arch/trio_pcie_intfc.h | 229 -- arch/tile/include/arch/trio_pcie_intfc_def.h | 32 - arch/tile/include/arch/trio_pcie_rc.h | 156 -- arch/tile/include/arch/trio_pcie_rc_def.h | 24 - arch/tile/include/arch/trio_shm.h | 125 - arch/tile/include/arch/trio_shm_def.h | 19 - arch/tile/include/arch/uart.h | 300 --- arch/tile/include/arch/uart_def.h | 120 - arch/tile/include/arch/usb_host.h | 26 - arch/tile/include/arch/usb_host_def.h | 19 - arch/tile/include/asm/Kbuild | 18 - arch/tile/include/asm/asm-offsets.h | 1 - arch/tile/include/asm/atomic.h | 210 -- arch/tile/include/asm/atomic_32.h | 297 --- arch/tile/include/asm/atomic_64.h | 200 -- arch/tile/include/asm/backtrace.h | 162 -- arch/tile/include/asm/barrier.h | 100 - arch/tile/include/asm/bitops.h | 94 - arch/tile/include/asm/bitops_32.h | 126 - arch/tile/include/asm/bitops_64.h | 95 - arch/tile/include/asm/cache.h | 64 - arch/tile/include/asm/cacheflush.h | 160 -- arch/tile/include/asm/checksum.h | 42 - arch/tile/include/asm/cmpxchg.h | 132 -- arch/tile/include/asm/compat.h | 233 -- arch/tile/include/asm/current.h | 31 - arch/tile/include/asm/delay.h | 34 - arch/tile/include/asm/device.h | 33 - arch/tile/include/asm/div64.h | 17 - arch/tile/include/asm/dma-mapping.h | 50 - arch/tile/include/asm/dma.h | 25 - arch/tile/include/asm/elf.h | 182 -- arch/tile/include/asm/fixmap.h | 87 - arch/tile/include/asm/ftrace.h | 42 - arch/tile/include/asm/futex.h | 166 -- arch/tile/include/asm/hardirq.h | 45 - arch/tile/include/asm/hardwall.h | 30 - arch/tile/include/asm/highmem.h | 71 - arch/tile/include/asm/homecache.h | 123 - arch/tile/include/asm/hugetlb.h | 122 - arch/tile/include/asm/hv_driver.h | 60 - arch/tile/include/asm/ide.h | 25 - arch/tile/include/asm/insn.h | 59 - arch/tile/include/asm/io.h | 509 ---- arch/tile/include/asm/irq.h | 87 - arch/tile/include/asm/irq_work.h | 15 - arch/tile/include/asm/irqflags.h | 311 --- arch/tile/include/asm/jump_label.h | 58 - arch/tile/include/asm/kdebug.h | 28 - arch/tile/include/asm/kexec.h | 65 - arch/tile/include/asm/kgdb.h | 71 - arch/tile/include/asm/kmap_types.h | 28 - arch/tile/include/asm/kprobes.h | 83 - arch/tile/include/asm/linkage.h | 51 - arch/tile/include/asm/mmu.h | 32 - arch/tile/include/asm/mmu_context.h | 137 -- arch/tile/include/asm/mmzone.h | 70 - arch/tile/include/asm/module.h | 40 - arch/tile/include/asm/page.h | 345 --- arch/tile/include/asm/pci.h | 229 -- arch/tile/include/asm/percpu.h | 52 - arch/tile/include/asm/perf_event.h | 22 - arch/tile/include/asm/pgalloc.h | 164 -- arch/tile/include/asm/pgtable.h | 518 ----- arch/tile/include/asm/pgtable_32.h | 122 - arch/tile/include/asm/pgtable_64.h | 172 -- arch/tile/include/asm/pmc.h | 64 - arch/tile/include/asm/processor.h | 368 --- arch/tile/include/asm/ptrace.h | 97 - arch/tile/include/asm/sections.h | 44 - arch/tile/include/asm/setup.h | 57 - arch/tile/include/asm/sigframe.h | 33 - arch/tile/include/asm/signal.h | 29 - arch/tile/include/asm/smp.h | 139 -- arch/tile/include/asm/spinlock.h | 24 - arch/tile/include/asm/spinlock_32.h | 109 - arch/tile/include/asm/spinlock_64.h | 138 -- arch/tile/include/asm/spinlock_types.h | 60 - arch/tile/include/asm/stack.h | 73 - arch/tile/include/asm/string.h | 34 - arch/tile/include/asm/switch_to.h | 77 - arch/tile/include/asm/syscall.h | 111 - arch/tile/include/asm/syscalls.h | 70 - arch/tile/include/asm/thread_info.h | 167 -- arch/tile/include/asm/tile-desc.h | 19 - arch/tile/include/asm/tile-desc_32.h | 553 ----- arch/tile/include/asm/tile-desc_64.h | 483 ---- arch/tile/include/asm/timex.h | 52 - arch/tile/include/asm/tlb.h | 25 - arch/tile/include/asm/tlbflush.h | 123 - arch/tile/include/asm/topology.h | 52 - arch/tile/include/asm/traps.h | 93 - arch/tile/include/asm/uaccess.h | 411 ---- arch/tile/include/asm/unaligned.h | 43 - arch/tile/include/asm/unistd.h | 20 - arch/tile/include/asm/user.h | 21 - arch/tile/include/asm/vdso.h | 55 - arch/tile/include/asm/vga.h | 39 - arch/tile/include/asm/word-at-a-time.h | 43 - arch/tile/include/gxio/common.h | 40 - arch/tile/include/gxio/dma_queue.h | 161 -- arch/tile/include/gxio/iorpc_globals.h | 38 - arch/tile/include/gxio/iorpc_mpipe.h | 144 -- arch/tile/include/gxio/iorpc_mpipe_info.h | 50 - arch/tile/include/gxio/iorpc_trio.h | 104 - arch/tile/include/gxio/iorpc_uart.h | 40 - arch/tile/include/gxio/iorpc_usb_host.h | 46 - arch/tile/include/gxio/kiorpc.h | 29 - arch/tile/include/gxio/mpipe.h | 1871 --------------- arch/tile/include/gxio/trio.h | 298 --- arch/tile/include/gxio/uart.h | 105 - arch/tile/include/gxio/usb_host.h | 87 - arch/tile/include/hv/drv_mpipe_intf.h | 605 ----- arch/tile/include/hv/drv_mshim_intf.h | 50 - arch/tile/include/hv/drv_pcie_rc_intf.h | 38 - arch/tile/include/hv/drv_srom_intf.h | 41 - arch/tile/include/hv/drv_trio_intf.h | 199 -- arch/tile/include/hv/drv_uart_intf.h | 33 - arch/tile/include/hv/drv_usb_host_intf.h | 39 - arch/tile/include/hv/drv_xgbe_impl.h | 300 --- arch/tile/include/hv/drv_xgbe_intf.h | 615 ----- arch/tile/include/hv/hypervisor.h | 2656 --------------------- arch/tile/include/hv/iorpc.h | 714 ------ arch/tile/include/hv/netio_errors.h | 122 - arch/tile/include/hv/netio_intf.h | 2975 ------------------------ arch/tile/include/hv/syscall_public.h | 42 - arch/tile/include/uapi/arch/abi.h | 101 - arch/tile/include/uapi/arch/chip.h | 22 - arch/tile/include/uapi/arch/chip_tilegx.h | 259 --- arch/tile/include/uapi/arch/chip_tilepro.h | 259 --- arch/tile/include/uapi/arch/icache.h | 94 - arch/tile/include/uapi/arch/interrupts.h | 20 - arch/tile/include/uapi/arch/interrupts_32.h | 310 --- arch/tile/include/uapi/arch/interrupts_64.h | 279 --- arch/tile/include/uapi/arch/intreg.h | 71 - arch/tile/include/uapi/arch/opcode.h | 22 - arch/tile/include/uapi/arch/opcode_tilegx.h | 1407 ----------- arch/tile/include/uapi/arch/opcode_tilepro.h | 1473 ------------ arch/tile/include/uapi/arch/sim.h | 644 ----- arch/tile/include/uapi/arch/sim_def.h | 506 ---- arch/tile/include/uapi/arch/spr_def.h | 27 - arch/tile/include/uapi/arch/spr_def_32.h | 256 -- arch/tile/include/uapi/arch/spr_def_64.h | 217 -- arch/tile/include/uapi/asm/Kbuild | 24 - arch/tile/include/uapi/asm/auxvec.h | 24 - arch/tile/include/uapi/asm/bitsperlong.h | 27 - arch/tile/include/uapi/asm/byteorder.h | 20 - arch/tile/include/uapi/asm/cachectl.h | 43 - arch/tile/include/uapi/asm/hardwall.h | 52 - arch/tile/include/uapi/asm/kvm_para.h | 2 - arch/tile/include/uapi/asm/mman.h | 43 - arch/tile/include/uapi/asm/ptrace.h | 99 - arch/tile/include/uapi/asm/setup.h | 22 - arch/tile/include/uapi/asm/sigcontext.h | 44 - arch/tile/include/uapi/asm/siginfo.h | 27 - arch/tile/include/uapi/asm/signal.h | 28 - arch/tile/include/uapi/asm/stat.h | 5 - arch/tile/include/uapi/asm/swab.h | 24 - arch/tile/include/uapi/asm/unistd.h | 38 - arch/tile/kernel/Makefile | 38 - arch/tile/kernel/asm-offsets.c | 84 - arch/tile/kernel/backtrace.c | 683 ------ arch/tile/kernel/compat.c | 117 - arch/tile/kernel/compat_signal.c | 172 -- arch/tile/kernel/early_printk.c | 75 - arch/tile/kernel/entry.S | 64 - arch/tile/kernel/ftrace.c | 239 -- arch/tile/kernel/hardwall.c | 1096 --------- arch/tile/kernel/head_32.S | 183 -- arch/tile/kernel/head_64.S | 279 --- arch/tile/kernel/hvglue.S | 76 - arch/tile/kernel/hvglue_trace.c | 270 --- arch/tile/kernel/intvec_32.S | 1906 --------------- arch/tile/kernel/intvec_64.S | 1564 ------------- arch/tile/kernel/irq.c | 280 --- arch/tile/kernel/jump_label.c | 62 - arch/tile/kernel/kgdb.c | 497 ---- arch/tile/kernel/kprobes.c | 527 ----- arch/tile/kernel/machine_kexec.c | 298 --- arch/tile/kernel/mcount_64.S | 211 -- arch/tile/kernel/messaging.c | 115 - arch/tile/kernel/module.c | 231 -- arch/tile/kernel/pci-dma.c | 607 ----- arch/tile/kernel/pci.c | 592 ----- arch/tile/kernel/pci_gx.c | 1592 ------------- arch/tile/kernel/perf_event.c | 1005 -------- arch/tile/kernel/pmc.c | 118 - arch/tile/kernel/proc.c | 160 -- arch/tile/kernel/process.c | 659 ------ arch/tile/kernel/ptrace.c | 316 --- arch/tile/kernel/reboot.c | 51 - arch/tile/kernel/regs_32.S | 145 -- arch/tile/kernel/regs_64.S | 145 -- arch/tile/kernel/relocate_kernel_32.S | 269 --- arch/tile/kernel/relocate_kernel_64.S | 263 --- arch/tile/kernel/setup.c | 1743 -------------- arch/tile/kernel/signal.c | 411 ---- arch/tile/kernel/single_step.c | 786 ------- arch/tile/kernel/smp.c | 287 --- arch/tile/kernel/smpboot.c | 269 --- arch/tile/kernel/stack.c | 539 ----- arch/tile/kernel/sys.c | 130 -- arch/tile/kernel/sysfs.c | 266 --- arch/tile/kernel/tile-desc_32.c | 2605 --------------------- arch/tile/kernel/tile-desc_64.c | 2218 ------------------ arch/tile/kernel/time.c | 306 --- arch/tile/kernel/tlb.c | 104 - arch/tile/kernel/traps.c | 421 ---- arch/tile/kernel/unaligned.c | 1603 ------------- arch/tile/kernel/usb.c | 71 - arch/tile/kernel/vdso.c | 197 -- arch/tile/kernel/vdso/Makefile | 117 - arch/tile/kernel/vdso/vdso.S | 28 - arch/tile/kernel/vdso/vdso.lds.S | 89 - arch/tile/kernel/vdso/vdso32.S | 28 - arch/tile/kernel/vdso/vgettimeofday.c | 198 -- arch/tile/kernel/vdso/vrt_sigreturn.S | 30 - arch/tile/kernel/vmlinux.lds.S | 105 - arch/tile/kvm/Kconfig | 39 - arch/tile/lib/Makefile | 19 - arch/tile/lib/atomic_32.c | 206 -- arch/tile/lib/atomic_asm_32.S | 205 -- arch/tile/lib/cacheflush.c | 167 -- arch/tile/lib/checksum.c | 89 - arch/tile/lib/cpumask.c | 54 - arch/tile/lib/delay.c | 45 - arch/tile/lib/exports.c | 94 - arch/tile/lib/memchr_32.c | 71 - arch/tile/lib/memchr_64.c | 69 - arch/tile/lib/memcpy_32.S | 544 ----- arch/tile/lib/memcpy_64.c | 367 --- arch/tile/lib/memcpy_user_64.c | 85 - arch/tile/lib/memmove.c | 63 - arch/tile/lib/memset_32.c | 143 -- arch/tile/lib/memset_64.c | 142 -- arch/tile/lib/spinlock_32.c | 251 -- arch/tile/lib/spinlock_64.c | 97 - arch/tile/lib/spinlock_common.h | 64 - arch/tile/lib/strchr_32.c | 64 - arch/tile/lib/strchr_64.c | 62 - arch/tile/lib/string-endian.h | 44 - arch/tile/lib/strlen_32.c | 36 - arch/tile/lib/strlen_64.c | 35 - arch/tile/lib/strnlen_32.c | 47 - arch/tile/lib/strnlen_64.c | 48 - arch/tile/lib/uaccess.c | 24 - arch/tile/lib/usercopy_32.S | 89 - arch/tile/lib/usercopy_64.S | 89 - arch/tile/mm/Makefile | 9 - arch/tile/mm/elf.c | 165 -- arch/tile/mm/extable.c | 30 - arch/tile/mm/fault.c | 924 -------- arch/tile/mm/highmem.c | 277 --- arch/tile/mm/homecache.c | 428 ---- arch/tile/mm/hugetlbpage.c | 348 --- arch/tile/mm/init.c | 956 -------- arch/tile/mm/migrate.h | 56 - arch/tile/mm/migrate_32.S | 192 -- arch/tile/mm/migrate_64.S | 167 -- arch/tile/mm/mmap.c | 93 - arch/tile/mm/pgtable.c | 550 ----- drivers/pci/quirks.c | 19 - samples/kprobes/kprobe_example.c | 8 - tools/arch/tile/include/asm/barrier.h | 16 - tools/arch/tile/include/uapi/asm/bitsperlong.h | 27 - tools/arch/tile/include/uapi/asm/mman.h | 16 - tools/scripts/Makefile.arch | 11 +- tools/testing/ktest/ktest.pl | 2 - 300 files changed, 1 insertion(+), 69477 deletions(-) commit 4ba66a9760722ccbb691b8f7116cad2f791cca7b Author: Arnd Bergmann Date: Wed Mar 7 22:23:24 2018 +0100 arch: remove blackfin port The Analog Devices Blackfin port was added in 2007 and was rather active for a while, but all work on it has come to a standstill over time, as Analog have changed their product line-up. Aaron Wu confirmed that the architecture port is no longer relevant, and multiple people suggested removing blackfin independently because of some of its oddities like a non-working SMP port, and the amount of duplication between the chip variants, which cause extra work when doing cross-architecture changes. Link: https://docs.blackfin.uclinux.org/ Acked-by: Aaron Wu Acked-by: Bryan Wu Cc: Steven Miao Cc: Mike Frysinger Signed-off-by: Arnd Bergmann Documentation/00-INDEX | 2 - Documentation/admin-guide/kernel-parameters.rst | 1 - Documentation/admin-guide/kernel-parameters.txt | 2 +- Documentation/blackfin/00-INDEX | 6 - Documentation/blackfin/bfin-gpio-notes.txt | 71 - Documentation/blackfin/bfin-spi-notes.txt | 16 - MAINTAINERS | 45 - arch/blackfin/Clear_BSD.txt | 33 - arch/blackfin/Kconfig | 1463 -------- arch/blackfin/Kconfig.debug | 258 -- arch/blackfin/Makefile | 168 - arch/blackfin/boot/.gitignore | 3 - arch/blackfin/boot/Makefile | 71 - arch/blackfin/boot/install.sh | 57 - arch/blackfin/configs/BF518F-EZBRD_defconfig | 121 - arch/blackfin/configs/BF526-EZBRD_defconfig | 158 - arch/blackfin/configs/BF527-AD7160-EVAL_defconfig | 104 - arch/blackfin/configs/BF527-EZKIT-V2_defconfig | 188 - arch/blackfin/configs/BF527-EZKIT_defconfig | 181 - arch/blackfin/configs/BF527-TLL6527M_defconfig | 178 - arch/blackfin/configs/BF533-EZKIT_defconfig | 114 - arch/blackfin/configs/BF533-STAMP_defconfig | 124 - arch/blackfin/configs/BF537-STAMP_defconfig | 136 - arch/blackfin/configs/BF538-EZKIT_defconfig | 133 - arch/blackfin/configs/BF548-EZKIT_defconfig | 207 -- arch/blackfin/configs/BF561-ACVILON_defconfig | 149 - arch/blackfin/configs/BF561-EZKIT-SMP_defconfig | 112 - arch/blackfin/configs/BF561-EZKIT_defconfig | 114 - arch/blackfin/configs/BF609-EZKIT_defconfig | 154 - arch/blackfin/configs/BlackStamp_defconfig | 108 - arch/blackfin/configs/CM-BF527_defconfig | 129 - arch/blackfin/configs/CM-BF533_defconfig | 76 - arch/blackfin/configs/CM-BF537E_defconfig | 107 - arch/blackfin/configs/CM-BF537U_defconfig | 96 - arch/blackfin/configs/CM-BF548_defconfig | 170 - arch/blackfin/configs/CM-BF561_defconfig | 104 - arch/blackfin/configs/DNP5370_defconfig | 118 - arch/blackfin/configs/H8606_defconfig | 87 - arch/blackfin/configs/IP0X_defconfig | 91 - arch/blackfin/configs/PNAV-10_defconfig | 111 - arch/blackfin/configs/SRV1_defconfig | 88 - arch/blackfin/configs/TCM-BF518_defconfig | 131 - arch/blackfin/configs/TCM-BF537_defconfig | 95 - arch/blackfin/include/asm/Kbuild | 28 - arch/blackfin/include/asm/asm-offsets.h | 1 - arch/blackfin/include/asm/atomic.h | 47 - arch/blackfin/include/asm/barrier.h | 86 - arch/blackfin/include/asm/bfin-global.h | 95 - arch/blackfin/include/asm/bfin-lq035q1.h | 40 - arch/blackfin/include/asm/bfin5xx_spi.h | 86 - arch/blackfin/include/asm/bfin_can.h | 728 ---- arch/blackfin/include/asm/bfin_dma.h | 165 - arch/blackfin/include/asm/bfin_pfmon.h | 44 - arch/blackfin/include/asm/bfin_ppi.h | 181 - arch/blackfin/include/asm/bfin_sdh.h | 161 - arch/blackfin/include/asm/bfin_serial.h | 429 --- arch/blackfin/include/asm/bfin_simple_timer.h | 27 - arch/blackfin/include/asm/bfin_sport.h | 71 - arch/blackfin/include/asm/bfin_sport3.h | 107 - arch/blackfin/include/asm/bfin_twi.h | 214 -- arch/blackfin/include/asm/bfin_watchdog.h | 30 - arch/blackfin/include/asm/bfrom.h | 90 - arch/blackfin/include/asm/bitops.h | 140 - arch/blackfin/include/asm/blackfin.h | 88 - arch/blackfin/include/asm/bug.h | 73 - arch/blackfin/include/asm/cache.h | 70 - arch/blackfin/include/asm/cacheflush.h | 118 - arch/blackfin/include/asm/cdef_LPBlackfin.h | 309 -- arch/blackfin/include/asm/checksum.h | 44 - arch/blackfin/include/asm/clocks.h | 74 - arch/blackfin/include/asm/cmpxchg.h | 132 - arch/blackfin/include/asm/context.S | 407 --- arch/blackfin/include/asm/cplb.h | 153 - arch/blackfin/include/asm/cplbinit.h | 66 - arch/blackfin/include/asm/cpu.h | 24 - arch/blackfin/include/asm/def_LPBlackfin.h | 697 ---- arch/blackfin/include/asm/delay.h | 51 - arch/blackfin/include/asm/dma-mapping.h | 46 - arch/blackfin/include/asm/dma.h | 349 -- arch/blackfin/include/asm/dpmc.h | 794 ----- arch/blackfin/include/asm/early_printk.h | 36 - arch/blackfin/include/asm/elf.h | 135 - arch/blackfin/include/asm/entry.h | 178 - arch/blackfin/include/asm/exec.h | 1 - arch/blackfin/include/asm/fixed_code.h | 30 - arch/blackfin/include/asm/flat.h | 62 - arch/blackfin/include/asm/ftrace.h | 73 - arch/blackfin/include/asm/gpio.h | 234 -- arch/blackfin/include/asm/gptimers.h | 337 -- arch/blackfin/include/asm/hardirq.h | 17 - arch/blackfin/include/asm/io.h | 49 - arch/blackfin/include/asm/ipipe.h | 209 -- arch/blackfin/include/asm/ipipe_base.h | 75 - arch/blackfin/include/asm/irq.h | 41 - arch/blackfin/include/asm/irq_handler.h | 66 - arch/blackfin/include/asm/irqflags.h | 289 -- arch/blackfin/include/asm/kgdb.h | 169 - arch/blackfin/include/asm/l1layout.h | 37 - arch/blackfin/include/asm/linkage.h | 13 - arch/blackfin/include/asm/mem_init.h | 500 --- arch/blackfin/include/asm/mem_map.h | 84 - arch/blackfin/include/asm/mmu.h | 36 - arch/blackfin/include/asm/mmu_context.h | 218 -- arch/blackfin/include/asm/module.h | 22 - arch/blackfin/include/asm/nand.h | 40 - arch/blackfin/include/asm/nmi.h | 14 - arch/blackfin/include/asm/page.h | 22 - arch/blackfin/include/asm/page_offset.h | 11 - arch/blackfin/include/asm/pci.h | 13 - arch/blackfin/include/asm/pda.h | 73 - arch/blackfin/include/asm/perf_event.h | 1 - arch/blackfin/include/asm/pgtable.h | 104 - arch/blackfin/include/asm/pm.h | 31 - arch/blackfin/include/asm/portmux.h | 1204 ------- arch/blackfin/include/asm/processor.h | 145 - arch/blackfin/include/asm/pseudo_instructions.h | 18 - arch/blackfin/include/asm/ptrace.h | 42 - arch/blackfin/include/asm/reboot.h | 20 - arch/blackfin/include/asm/rwlock.h | 7 - arch/blackfin/include/asm/scb.h | 21 - arch/blackfin/include/asm/sections.h | 67 - arch/blackfin/include/asm/segment.h | 13 - arch/blackfin/include/asm/smp.h | 54 - arch/blackfin/include/asm/spinlock.h | 81 - arch/blackfin/include/asm/spinlock_types.h | 28 - arch/blackfin/include/asm/string.h | 38 - arch/blackfin/include/asm/switch_to.h | 39 - arch/blackfin/include/asm/syscall.h | 96 - arch/blackfin/include/asm/thread_info.h | 98 - arch/blackfin/include/asm/time.h | 46 - arch/blackfin/include/asm/timex.h | 23 - arch/blackfin/include/asm/tlb.h | 22 - arch/blackfin/include/asm/tlbflush.h | 2 - arch/blackfin/include/asm/trace.h | 106 - arch/blackfin/include/asm/traps.h | 131 - arch/blackfin/include/asm/uaccess.h | 234 -- arch/blackfin/include/asm/unistd.h | 22 - arch/blackfin/include/asm/vga.h | 1 - arch/blackfin/include/mach-common/irq.h | 58 - arch/blackfin/include/mach-common/pll.h | 86 - arch/blackfin/include/mach-common/ports-a.h | 26 - arch/blackfin/include/mach-common/ports-b.h | 26 - arch/blackfin/include/mach-common/ports-c.h | 26 - arch/blackfin/include/mach-common/ports-d.h | 26 - arch/blackfin/include/mach-common/ports-e.h | 26 - arch/blackfin/include/mach-common/ports-f.h | 26 - arch/blackfin/include/mach-common/ports-g.h | 26 - arch/blackfin/include/mach-common/ports-h.h | 26 - arch/blackfin/include/mach-common/ports-i.h | 26 - arch/blackfin/include/mach-common/ports-j.h | 26 - arch/blackfin/include/uapi/asm/Kbuild | 25 - arch/blackfin/include/uapi/asm/bfin_sport.h | 137 - arch/blackfin/include/uapi/asm/byteorder.h | 7 - arch/blackfin/include/uapi/asm/cachectl.h | 21 - arch/blackfin/include/uapi/asm/fcntl.h | 18 - arch/blackfin/include/uapi/asm/fixed_code.h | 39 - arch/blackfin/include/uapi/asm/ioctls.h | 8 - arch/blackfin/include/uapi/asm/poll.h | 17 - arch/blackfin/include/uapi/asm/posix_types.h | 31 - arch/blackfin/include/uapi/asm/ptrace.h | 171 - arch/blackfin/include/uapi/asm/sigcontext.h | 62 - arch/blackfin/include/uapi/asm/siginfo.h | 16 - arch/blackfin/include/uapi/asm/signal.h | 8 - arch/blackfin/include/uapi/asm/stat.h | 70 - arch/blackfin/include/uapi/asm/swab.h | 51 - arch/blackfin/include/uapi/asm/unistd.h | 448 --- arch/blackfin/kernel/.gitignore | 1 - arch/blackfin/kernel/Makefile | 44 - arch/blackfin/kernel/asm-offsets.c | 164 - arch/blackfin/kernel/bfin_dma.c | 612 ---- arch/blackfin/kernel/bfin_gpio.c | 1208 ------- arch/blackfin/kernel/bfin_ksyms.c | 126 - arch/blackfin/kernel/cplb-mpu/Makefile | 10 - arch/blackfin/kernel/cplb-mpu/cplbinit.c | 102 - arch/blackfin/kernel/cplb-mpu/cplbmgr.c | 379 --- arch/blackfin/kernel/cplb-nompu/Makefile | 11 - arch/blackfin/kernel/cplb-nompu/cplbinit.c | 212 -- arch/blackfin/kernel/cplb-nompu/cplbmgr.c | 227 -- arch/blackfin/kernel/cplbinfo.c | 180 - arch/blackfin/kernel/debug-mmrs.c | 1891 ---------- arch/blackfin/kernel/dma-mapping.c | 172 - arch/blackfin/kernel/dumpstack.c | 177 - arch/blackfin/kernel/early_printk.c | 271 -- arch/blackfin/kernel/entry.S | 59 - arch/blackfin/kernel/exception.c | 45 - arch/blackfin/kernel/fixed_code.S | 155 - arch/blackfin/kernel/flat.c | 84 - arch/blackfin/kernel/ftrace-entry.S | 207 -- arch/blackfin/kernel/ftrace.c | 125 - arch/blackfin/kernel/gptimers.c | 383 --- arch/blackfin/kernel/ipipe.c | 397 --- arch/blackfin/kernel/irqchip.c | 132 - arch/blackfin/kernel/kgdb.c | 473 --- arch/blackfin/kernel/kgdb_test.c | 114 - arch/blackfin/kernel/module.c | 292 -- arch/blackfin/kernel/nmi.c | 287 -- arch/blackfin/kernel/perf_event.c | 482 --- arch/blackfin/kernel/process.c | 438 --- arch/blackfin/kernel/pseudodbg.c | 191 -- arch/blackfin/kernel/ptrace.c | 413 --- arch/blackfin/kernel/reboot.c | 115 - arch/blackfin/kernel/setup.c | 1468 -------- arch/blackfin/kernel/shadow_console.c | 111 - arch/blackfin/kernel/signal.c | 287 -- arch/blackfin/kernel/stacktrace.c | 54 - arch/blackfin/kernel/sys_bfin.c | 88 - arch/blackfin/kernel/time-ts.c | 400 --- arch/blackfin/kernel/time.c | 160 - arch/blackfin/kernel/trace.c | 988 ------ arch/blackfin/kernel/traps.c | 585 ---- arch/blackfin/kernel/vmlinux.lds.S | 271 -- arch/blackfin/lib/Makefile | 12 - arch/blackfin/lib/ashldi3.c | 35 - arch/blackfin/lib/ashrdi3.c | 36 - arch/blackfin/lib/divsi3.S | 199 -- arch/blackfin/lib/gcclib.h | 24 - arch/blackfin/lib/ins.S | 118 - arch/blackfin/lib/lshrdi3.c | 35 - arch/blackfin/lib/memchr.S | 47 - arch/blackfin/lib/memcmp.S | 92 - arch/blackfin/lib/memcpy.S | 124 - arch/blackfin/lib/memmove.S | 93 - arch/blackfin/lib/memset.S | 87 - arch/blackfin/lib/modsi3.S | 57 - arch/blackfin/lib/muldi3.S | 74 - arch/blackfin/lib/outs.S | 68 - arch/blackfin/lib/smulsi3_highpart.S | 38 - arch/blackfin/lib/strcmp.S | 43 - arch/blackfin/lib/strcpy.S | 35 - arch/blackfin/lib/strncmp.S | 52 - arch/blackfin/lib/strncpy.S | 85 - arch/blackfin/lib/udivsi3.S | 277 -- arch/blackfin/lib/umodsi3.S | 49 - arch/blackfin/lib/umulsi3_highpart.S | 31 - arch/blackfin/mach-bf518/Kconfig | 320 -- arch/blackfin/mach-bf518/Makefile | 5 - arch/blackfin/mach-bf518/boards/Kconfig | 18 - arch/blackfin/mach-bf518/boards/Makefile | 6 - arch/blackfin/mach-bf518/boards/ezbrd.c | 794 ----- arch/blackfin/mach-bf518/boards/tcm-bf518.c | 739 ---- arch/blackfin/mach-bf518/dma.c | 98 - arch/blackfin/mach-bf518/include/mach/anomaly.h | 170 - arch/blackfin/mach-bf518/include/mach/bf518.h | 214 -- .../blackfin/mach-bf518/include/mach/bfin_serial.h | 14 - arch/blackfin/mach-bf518/include/mach/blackfin.h | 43 - arch/blackfin/mach-bf518/include/mach/cdefBF512.h | 1043 ------ arch/blackfin/mach-bf518/include/mach/cdefBF514.h | 80 - arch/blackfin/mach-bf518/include/mach/cdefBF516.h | 178 - arch/blackfin/mach-bf518/include/mach/cdefBF518.h | 56 - arch/blackfin/mach-bf518/include/mach/defBF512.h | 1304 ------- arch/blackfin/mach-bf518/include/mach/defBF514.h | 48 - arch/blackfin/mach-bf518/include/mach/defBF516.h | 392 --- arch/blackfin/mach-bf518/include/mach/defBF518.h | 67 - arch/blackfin/mach-bf518/include/mach/dma.h | 33 - arch/blackfin/mach-bf518/include/mach/gpio.h | 62 - arch/blackfin/mach-bf518/include/mach/irq.h | 205 -- arch/blackfin/mach-bf518/include/mach/mem_map.h | 70 - arch/blackfin/mach-bf518/include/mach/pll.h | 1 - arch/blackfin/mach-bf518/include/mach/portmux.h | 223 -- arch/blackfin/mach-bf518/ints-priority.c | 78 - arch/blackfin/mach-bf527/Kconfig | 325 -- arch/blackfin/mach-bf527/Makefile | 5 - arch/blackfin/mach-bf527/boards/Kconfig | 38 - arch/blackfin/mach-bf527/boards/Makefile | 11 - arch/blackfin/mach-bf527/boards/ad7160eval.c | 868 ----- arch/blackfin/mach-bf527/boards/cm_bf527.c | 992 ------ arch/blackfin/mach-bf527/boards/ezbrd.c | 891 ----- arch/blackfin/mach-bf527/boards/ezkit.c | 1335 -------- arch/blackfin/mach-bf527/boards/tll6527m.c | 946 ----- arch/blackfin/mach-bf527/dma.c | 98 - arch/blackfin/mach-bf527/include/mach/anomaly.h | 290 -- arch/blackfin/mach-bf527/include/mach/bf527.h | 237 -- .../blackfin/mach-bf527/include/mach/bfin_serial.h | 14 - arch/blackfin/mach-bf527/include/mach/blackfin.h | 37 - arch/blackfin/mach-bf527/include/mach/cdefBF522.h | 1095 ------ arch/blackfin/mach-bf527/include/mach/cdefBF525.h | 421 --- arch/blackfin/mach-bf527/include/mach/cdefBF527.h | 178 - arch/blackfin/mach-bf527/include/mach/defBF522.h | 1309 ------- arch/blackfin/mach-bf527/include/mach/defBF525.h | 678 ---- arch/blackfin/mach-bf527/include/mach/defBF527.h | 391 --- arch/blackfin/mach-bf527/include/mach/dma.h | 38 - arch/blackfin/mach-bf527/include/mach/gpio.h | 69 - arch/blackfin/mach-bf527/include/mach/irq.h | 204 -- arch/blackfin/mach-bf527/include/mach/mem_map.h | 70 - arch/blackfin/mach-bf527/include/mach/pll.h | 1 - arch/blackfin/mach-bf527/include/mach/portmux.h | 220 -- arch/blackfin/mach-bf527/ints-priority.c | 79 - arch/blackfin/mach-bf533/Kconfig | 96 - arch/blackfin/mach-bf533/Makefile | 5 - arch/blackfin/mach-bf533/boards/H8606.c | 452 --- arch/blackfin/mach-bf533/boards/Kconfig | 42 - arch/blackfin/mach-bf533/boards/Makefile | 11 - arch/blackfin/mach-bf533/boards/blackstamp.c | 523 --- arch/blackfin/mach-bf533/boards/cm_bf533.c | 582 ---- arch/blackfin/mach-bf533/boards/ezkit.c | 551 --- arch/blackfin/mach-bf533/boards/ip0x.c | 319 -- arch/blackfin/mach-bf533/boards/stamp.c | 919 ----- arch/blackfin/mach-bf533/dma.c | 78 - arch/blackfin/mach-bf533/include/mach/anomaly.h | 383 --- arch/blackfin/mach-bf533/include/mach/bf533.h | 138 - .../blackfin/mach-bf533/include/mach/bfin_serial.h | 14 - arch/blackfin/mach-bf533/include/mach/blackfin.h | 23 - arch/blackfin/mach-bf533/include/mach/cdefBF532.h | 682 ---- arch/blackfin/mach-bf533/include/mach/defBF532.h | 831 ----- arch/blackfin/mach-bf533/include/mach/dma.h | 26 - arch/blackfin/mach-bf533/include/mach/gpio.h | 33 - arch/blackfin/mach-bf533/include/mach/irq.h | 92 - arch/blackfin/mach-bf533/include/mach/mem_map.h | 139 - arch/blackfin/mach-bf533/include/mach/pll.h | 1 - arch/blackfin/mach-bf533/include/mach/portmux.h | 71 - arch/blackfin/mach-bf533/ints-priority.c | 44 - arch/blackfin/mach-bf537/Kconfig | 118 - arch/blackfin/mach-bf537/Makefile | 5 - arch/blackfin/mach-bf537/boards/Kconfig | 49 - arch/blackfin/mach-bf537/boards/Makefile | 12 - arch/blackfin/mach-bf537/boards/cm_bf537e.c | 945 ----- arch/blackfin/mach-bf537/boards/cm_bf537u.c | 802 ----- arch/blackfin/mach-bf537/boards/dnp5370.c | 413 --- arch/blackfin/mach-bf537/boards/minotaur.c | 585 ---- arch/blackfin/mach-bf537/boards/pnav10.c | 538 --- arch/blackfin/mach-bf537/boards/stamp.c | 3019 ---------------- arch/blackfin/mach-bf537/boards/tcm_bf537.c | 792 ----- arch/blackfin/mach-bf537/dma.c | 98 - arch/blackfin/mach-bf537/include/mach/anomaly.h | 241 -- arch/blackfin/mach-bf537/include/mach/bf537.h | 108 - .../blackfin/mach-bf537/include/mach/bfin_serial.h | 14 - arch/blackfin/mach-bf537/include/mach/blackfin.h | 33 - arch/blackfin/mach-bf537/include/mach/cdefBF534.h | 1736 ---------- arch/blackfin/mach-bf537/include/mach/cdefBF537.h | 178 - arch/blackfin/mach-bf537/include/mach/defBF534.h | 1470 -------- arch/blackfin/mach-bf537/include/mach/defBF537.h | 377 -- arch/blackfin/mach-bf537/include/mach/dma.h | 31 - arch/blackfin/mach-bf537/include/mach/gpio.h | 69 - arch/blackfin/mach-bf537/include/mach/irq.h | 184 - arch/blackfin/mach-bf537/include/mach/mem_map.h | 147 - arch/blackfin/mach-bf537/include/mach/pll.h | 1 - arch/blackfin/mach-bf537/include/mach/portmux.h | 152 - arch/blackfin/mach-bf537/ints-priority.c | 214 -- arch/blackfin/mach-bf538/Kconfig | 166 - arch/blackfin/mach-bf538/Makefile | 6 - arch/blackfin/mach-bf538/boards/Kconfig | 13 - arch/blackfin/mach-bf538/boards/Makefile | 5 - arch/blackfin/mach-bf538/boards/ezkit.c | 987 ------ arch/blackfin/mach-bf538/dma.c | 141 - arch/blackfin/mach-bf538/ext-gpio.c | 158 - arch/blackfin/mach-bf538/include/mach/anomaly.h | 215 -- arch/blackfin/mach-bf538/include/mach/bf538.h | 103 - .../blackfin/mach-bf538/include/mach/bfin_serial.h | 14 - arch/blackfin/mach-bf538/include/mach/blackfin.h | 33 - arch/blackfin/mach-bf538/include/mach/cdefBF538.h | 1960 ----------- arch/blackfin/mach-bf538/include/mach/cdefBF539.h | 240 -- arch/blackfin/mach-bf538/include/mach/defBF538.h | 1749 ---------- arch/blackfin/mach-bf538/include/mach/defBF539.h | 152 - arch/blackfin/mach-bf538/include/mach/dma.h | 41 - arch/blackfin/mach-bf538/include/mach/gpio.h | 81 - arch/blackfin/mach-bf538/include/mach/irq.h | 148 - arch/blackfin/mach-bf538/include/mach/mem_map.h | 74 - arch/blackfin/mach-bf538/include/mach/pll.h | 1 - arch/blackfin/mach-bf538/include/mach/portmux.h | 114 - arch/blackfin/mach-bf538/ints-priority.c | 73 - arch/blackfin/mach-bf548/Kconfig | 383 --- arch/blackfin/mach-bf548/Makefile | 5 - arch/blackfin/mach-bf548/boards/Kconfig | 19 - arch/blackfin/mach-bf548/boards/Makefile | 6 - arch/blackfin/mach-bf548/boards/cm_bf548.c | 1268 ------- arch/blackfin/mach-bf548/boards/ezkit.c | 2199 ------------ arch/blackfin/mach-bf548/dma.c | 139 - arch/blackfin/mach-bf548/include/mach/anomaly.h | 301 -- arch/blackfin/mach-bf548/include/mach/bf548.h | 105 - .../blackfin/mach-bf548/include/mach/bf54x-lq043.h | 36 - arch/blackfin/mach-bf548/include/mach/bf54x_keys.h | 23 - .../blackfin/mach-bf548/include/mach/bfin_serial.h | 16 - arch/blackfin/mach-bf548/include/mach/blackfin.h | 49 - arch/blackfin/mach-bf548/include/mach/cdefBF542.h | 554 --- arch/blackfin/mach-bf548/include/mach/cdefBF544.h | 913 ----- arch/blackfin/mach-bf548/include/mach/cdefBF547.h | 796 ----- arch/blackfin/mach-bf548/include/mach/cdefBF548.h | 761 ----- arch/blackfin/mach-bf548/include/mach/cdefBF549.h | 302 -- .../mach-bf548/include/mach/cdefBF54x_base.h | 2633 -------------- arch/blackfin/mach-bf548/include/mach/defBF542.h | 763 ----- arch/blackfin/mach-bf548/include/mach/defBF544.h | 630 ---- arch/blackfin/mach-bf548/include/mach/defBF547.h | 1034 ------ arch/blackfin/mach-bf548/include/mach/defBF548.h | 399 --- arch/blackfin/mach-bf548/include/mach/defBF549.h | 186 - .../mach-bf548/include/mach/defBF54x_base.h | 2294 ------------- arch/blackfin/mach-bf548/include/mach/dma.h | 72 - arch/blackfin/mach-bf548/include/mach/gpio.h | 210 -- arch/blackfin/mach-bf548/include/mach/irq.h | 454 --- arch/blackfin/mach-bf548/include/mach/mem_map.h | 84 - arch/blackfin/mach-bf548/include/mach/pll.h | 1 - arch/blackfin/mach-bf548/include/mach/portmux.h | 318 -- arch/blackfin/mach-bf548/ints-priority.c | 116 - arch/blackfin/mach-bf561/Kconfig | 213 -- arch/blackfin/mach-bf561/Makefile | 9 - arch/blackfin/mach-bf561/atomic.S | 945 ----- arch/blackfin/mach-bf561/boards/Kconfig | 30 - arch/blackfin/mach-bf561/boards/Makefile | 8 - arch/blackfin/mach-bf561/boards/acvilon.c | 543 --- arch/blackfin/mach-bf561/boards/cm_bf561.c | 556 --- arch/blackfin/mach-bf561/boards/ezkit.c | 688 ---- arch/blackfin/mach-bf561/boards/tepla.c | 162 - arch/blackfin/mach-bf561/coreb.c | 64 - arch/blackfin/mach-bf561/dma.c | 114 - arch/blackfin/mach-bf561/hotplug.c | 40 - arch/blackfin/mach-bf561/include/mach/anomaly.h | 353 -- arch/blackfin/mach-bf561/include/mach/bf561.h | 200 -- .../blackfin/mach-bf561/include/mach/bfin_serial.h | 14 - arch/blackfin/mach-bf561/include/mach/blackfin.h | 41 - arch/blackfin/mach-bf561/include/mach/cdefBF561.h | 1460 -------- arch/blackfin/mach-bf561/include/mach/defBF561.h | 1402 -------- arch/blackfin/mach-bf561/include/mach/dma.h | 39 - arch/blackfin/mach-bf561/include/mach/gpio.h | 67 - arch/blackfin/mach-bf561/include/mach/irq.h | 236 -- arch/blackfin/mach-bf561/include/mach/mem_map.h | 219 -- arch/blackfin/mach-bf561/include/mach/pll.h | 56 - arch/blackfin/mach-bf561/include/mach/portmux.h | 97 - arch/blackfin/mach-bf561/include/mach/smp.h | 32 - arch/blackfin/mach-bf561/ints-priority.c | 87 - arch/blackfin/mach-bf561/secondary.S | 192 -- arch/blackfin/mach-bf561/smp.c | 172 - arch/blackfin/mach-bf609/Kconfig | 1684 --------- arch/blackfin/mach-bf609/Makefile | 7 - arch/blackfin/mach-bf609/boards/Kconfig | 13 - arch/blackfin/mach-bf609/boards/Makefile | 5 - arch/blackfin/mach-bf609/boards/ezkit.c | 2191 ------------ arch/blackfin/mach-bf609/clock.c | 409 --- arch/blackfin/mach-bf609/dma.c | 202 -- arch/blackfin/mach-bf609/dpm.S | 158 - arch/blackfin/mach-bf609/include/mach/anomaly.h | 137 - arch/blackfin/mach-bf609/include/mach/bf609.h | 93 - .../blackfin/mach-bf609/include/mach/bfin_serial.h | 17 - arch/blackfin/mach-bf609/include/mach/blackfin.h | 25 - arch/blackfin/mach-bf609/include/mach/cdefBF609.h | 15 - .../mach-bf609/include/mach/cdefBF60x_base.h | 3254 ------------------ arch/blackfin/mach-bf609/include/mach/defBF609.h | 286 -- .../mach-bf609/include/mach/defBF60x_base.h | 3596 -------------------- arch/blackfin/mach-bf609/include/mach/dma.h | 116 - arch/blackfin/mach-bf609/include/mach/gpio.h | 165 - arch/blackfin/mach-bf609/include/mach/irq.h | 319 -- arch/blackfin/mach-bf609/include/mach/mem_map.h | 86 - arch/blackfin/mach-bf609/include/mach/pll.h | 1 - arch/blackfin/mach-bf609/include/mach/pm.h | 25 - arch/blackfin/mach-bf609/include/mach/portmux.h | 349 -- arch/blackfin/mach-bf609/ints-priority.c | 156 - arch/blackfin/mach-bf609/pm.c | 361 -- arch/blackfin/mach-bf609/scb.c | 363 -- arch/blackfin/mach-common/Makefile | 17 - arch/blackfin/mach-common/arch_checks.c | 66 - arch/blackfin/mach-common/cache-c.c | 85 - arch/blackfin/mach-common/cache.S | 124 - arch/blackfin/mach-common/clock.h | 28 - arch/blackfin/mach-common/clocks-init.c | 121 - arch/blackfin/mach-common/dpmc.c | 164 - arch/blackfin/mach-common/dpmc_modes.S | 320 -- arch/blackfin/mach-common/entry.S | 1711 ---------- arch/blackfin/mach-common/head.S | 229 -- arch/blackfin/mach-common/interrupt.S | 326 -- arch/blackfin/mach-common/ints-priority.c | 1366 -------- arch/blackfin/mach-common/pm.c | 301 -- arch/blackfin/mach-common/scb-init.c | 52 - arch/blackfin/mach-common/smp.c | 432 --- arch/blackfin/mm/Makefile | 5 - arch/blackfin/mm/blackfin_sram.h | 14 - arch/blackfin/mm/init.c | 122 - arch/blackfin/mm/isram-driver.c | 411 --- arch/blackfin/mm/maccess.c | 97 - arch/blackfin/mm/sram-alloc.c | 899 ----- arch/blackfin/oprofile/Makefile | 14 - arch/blackfin/oprofile/bfin_oprofile.c | 18 - include/linux/cpuhotplug.h | 1 - samples/Kconfig | 6 - samples/Makefile | 2 +- samples/blackfin/Makefile | 1 - samples/blackfin/gptimers-example.c | 91 - scripts/checkpatch.pl | 26 - 475 files changed, 2 insertions(+), 123907 deletions(-) commit f09a7931bcbc29a188d24c8b8f9523587c428204 Merge: a677b67 47b7de2 Author: Ulf Hansson Date: Fri Mar 16 10:06:19 2018 +0100 Merge branch 'fixes' into next commit 318df9f01cffabf120b36daa96dfca273e46cbbf Merge: 68de5ef cc5b340 Author: Daniel Borkmann Date: Fri Mar 16 09:25:00 2018 +0100 Merge branch 'bpf-tools-build-improvements' Jakub Kicinski says: ==================== As promised this series addresses nits and minor issues in tools/bpf build infra. One GCC-7 warning which is nice to get rid of. Dependencies when built with OUTPUT are fixed. make clean will now remove the FEATURE-DUMP.* files. PHONY target is also updated to match reality. ==================== Signed-off-by: Daniel Borkmann commit cc5b3403f0248ca5f40539d33f0e127ccca25dd2 Author: Jakub Kicinski Date: Thu Mar 15 23:26:17 2018 -0700 tools: bpf: remove feature detection output bpf tools use feature detection for libbfd dependency, clean up the output files on make clean. Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/Makefile | 2 ++ tools/bpf/bpftool/Makefile | 2 ++ 2 files changed, 4 insertions(+) commit 8050ea4653c21e14681d9e00390c6886556a2640 Author: Jakub Kicinski Date: Thu Mar 15 23:26:16 2018 -0700 tools: bpf: cleanup PHONY target There is no FORCE target in the Makefile and some of the PHONY targets are missing, update the list. Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5fc73dceb060688f01c2ee225a2b42cf47352ba Author: Jakub Kicinski Date: Thu Mar 15 23:26:15 2018 -0700 tools: bpftool: fix potential format truncation GCC 7 complains: xlated_dumper.c: In function ‘print_call’: xlated_dumper.c:179:10: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 249 and 253 [-Wformat-truncation=] "%+d#%s", insn->off, sym->name); Add a bit more space to the buffer so it can handle the entire string and integer without truncation. Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/xlated_dumper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90126e3a40843de369a496db160ab22bdd6f4c48 Author: Jakub Kicinski Date: Thu Mar 15 23:26:14 2018 -0700 tools: bpftool: fix dependency file path Auto-generated dependency files are in the OUTPUT directory, we need to include them from there. This fixes object files not being rebuilt after header changes. Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 194303d60b68a8038979560e5f4ca493bbb3cf37 Author: Amelie Delaunay Date: Fri Mar 2 15:56:24 2018 +0100 dt-bindings: phy: add support for STM32 USB PHY Controller (USBPHYC) This patch adds the device tree bindings description for STM32 USBPHYC (USB PHY Controller). Signed-off-by: Amelie Delaunay Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/phy-stm32-usbphyc.txt | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit bb0e500bedb8aaab986878aa90b99582d201576c Author: Masahiro Yamada Date: Tue Mar 6 20:18:49 2018 +0900 phy: add 'depends on HAS_IOMEM' to fix unmet dependency These configs select MFD_SYSCON, but do not depend on HAS_IOMEM. Compile testing on architecture without HAS_IOMEM causes "unmet direct dependencies" in Kconfig phase. Detected by "make ARCH=score allyesconfig". Signed-off-by: Masahiro Yamada Signed-off-by: Kishon Vijay Abraham I drivers/phy/hisilicon/Kconfig | 1 + drivers/phy/ralink/Kconfig | 1 + drivers/phy/rockchip/Kconfig | 1 + 3 files changed, 3 insertions(+) commit 115de9fd682ccdc6b7c3142287339dbada7a7807 Author: Martin Blumenstingl Date: Sat Mar 3 19:47:00 2018 +0100 phy: amlogic: add USB3 PHY support for Meson GXL and GXM This adds a new driver for the USB3 PHY found on Meson GXL and GXM SoCs (both SoCs are using the same USB PHY register layout). Unfortunately there is no documentation for this PHY in the public S905X datasheet (published for example by Khadas). What we know so far about this PHY: - even though the Meson GXL and GXM SoCs do not expose an USB3 port (the dwc3 controller only has USB2 ports enabled) we need to initialize the USB3 PHY (specifically USB_R1_U3H_FLADJ_30MHZ_REG_MASK). Without this initialization high-speed USB devices (especially USB hard disks and thumb drives, slower devices like mice do not seem to be affected) - on some boards the USB3 PHY starts in "device mode" - we want to bring it into a known state (by switching it to host mode for now). - it is responsible for the OTG detection and for switching the first USB2 PHY between host and peripheral (aka device) mode. an interrupt can be used to detect changes between host and device mode. There are five inputs to this register area: - the clock and reset line for the USB3 PHY itself - the clock and reset line for the peripheral mode and OTG detection logic (on the GXL and GXM SoCs these are the same clock and reset line as for the USB3 PHY itself, but Amlogic sees this as two different components - even though they share the same register space - so they have to be passed individually to allow specifying different inputs on other SoCs if needed) - the interrupt for the OTG detection logic The whole OTG detection logic is not implemented yet. Signed-off-by: Martin Blumenstingl Tested-by: Yixun Lan Tested-by: Neil Armstrong Signed-off-by: Kishon Vijay Abraham I drivers/phy/amlogic/Kconfig | 12 ++ drivers/phy/amlogic/Makefile | 1 + drivers/phy/amlogic/phy-meson-gxl-usb3.c | 282 +++++++++++++++++++++++++++++++ 3 files changed, 295 insertions(+) commit 324e46cee18739efbbed49b30a9100cb7bd0d35e Author: Martin Blumenstingl Date: Sat Mar 3 19:46:59 2018 +0100 dt-bindings: phy: Add support for the USB3 PHY on Amlogic Meson GXL SoCs Amlogic Meson GXL SoCs use a dwc3 controller with two (GXM - a variant for GXL, has three) USB2 ports. The first USB2 port supports host and peripheral (also called "device") mode. While the dwc3 controller has no USB3 port enabled we still need the USB3 PHY to be initialized. Otherwise high-speed USB transfers (for example with a USB flash drive) may time out (most often seen on boards with mainline u-boot, where the bootloader does not initialize the USB3 PHY registers). Signed-off-by: Martin Blumenstingl Reviewed-by: Rob Herring Tested-by: Yixun Lan Tested-by: Neil Armstrong Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/meson-gxl-usb3-phy.txt | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit ae3f672cab5d1fef9fc4c6436e9d7e347eba0b13 Author: Alexander Monakov Date: Sun Mar 4 21:18:07 2018 +0300 phy: berlin-usb: adjust USB_PHY_RX_CTRL init flags Make the value written into the USB_PHY_RX_CTRL configuration register match 0xAA79 value written by manufacturer-supplied kernels for Sony NSZ-GS7 (Berlin2 SoC), Google Chromecast and Valve Steam Link (BG2CD). This fixes timeouts communicating to the internal hub on Steam Link. Cc: Kishon Vijay Abraham I Cc: Antoine Tenart Signed-off-by: Alexander Monakov Reviewed-by: Matthias Brugger Signed-off-by: Kishon Vijay Abraham I drivers/phy/marvell/phy-berlin-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c55fbcb8cf6b3653103f046232ada503e482b57d Author: Chunfeng Yun Date: Mon Mar 12 13:25:40 2018 +0800 dt-bindings: phy-mtk-tphy: add properties for U2 slew rate calibrate Add two properties of ref_clk and coefficient used by U2 slew rate calibrate which may vary on different SoCs Signed-off-by: Chunfeng Yun Reviewed-by: Matthias Brugger Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/phy-mtk-tphy.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 8833ebf4f8530834ff8f95f309145f5e2da02999 Author: Chunfeng Yun Date: Mon Mar 12 13:25:39 2018 +0800 phy: phy-mtk-tphy: add configurable parameters for slew rate calibrate There are two parameters, ref_clk and coefficient, for U2 slew rate calibrate which may vary on different SoCs, here allow them to be configurable Signed-off-by: Chunfeng Yun Reviewed-by: Matthias Brugger Signed-off-by: Kishon Vijay Abraham I drivers/phy/mediatek/phy-mtk-tphy.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 4036325609abf29f0dfdffb6e598c56645820f4e Author: Chunfeng Yun Date: Mon Mar 12 13:25:38 2018 +0800 phy: phy-mtk-tphy: keep default value of mcu_bus_ck_gate_en The default value of mcu_bus_ck_gate_en is 1, if clear it, will prevent system to enter deep idle mode, so keep its default value and without affecting PCIe function. Signed-off-by: Chunfeng Yun Signed-off-by: Kishon Vijay Abraham I drivers/phy/mediatek/phy-mtk-tphy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 124380cb0e7a5fb704a81d135e5b7b4904c1ef95 Author: Alexey Khoroshilov Date: Fri Feb 23 00:40:11 2018 +0300 phy: lpc18xx-usb-otg: error handling in lpc18xx_usb_otg_phy_power_on() If regmap_update_bits() fails in lpc18xx_usb_otg_phy_power_on(), lpc->clk is left enabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-lpc18xx-usb-otg.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 6fc61ee69433e7e0433cabd36f78bb5fb3b26524 Author: Greentime Hu Date: Wed Mar 7 17:45:16 2018 +0800 nds32: To use the generic dump_stack() Use the generic dump_stack() instead of nds32 one because they are doing the same thing. Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/kernel/traps.c | 12 ------------ 1 file changed, 12 deletions(-) commit e115807657633432b97549d3bd83a74179603c0c Author: Greentime Hu Date: Wed Mar 7 16:59:23 2018 +0800 nds32: fix building failed if using elf toolchain. OUTPUT_FORMAT is not necessary here and the elf toolchain doesn't support these formats. Since kernel should be built pass with elf or Linux toolchain. This can be removed from vdso.ld.S These are the built failed messages. VDSOL arch/nds32/kernel/vdso/vdso.so.dbg /home/users/greentime/tmp/nds32le-elf-newlib-v3-upstream-b224/bin/../lib/gcc/nds32le-elf/8.0.1/../../../../nds32le-elf/bin/ld: target elf32-nds32le-linux not found collect2: error: ld returned 1 exit status make[1]: *** [arch/nds32/kernel/vdso/vdso.so.dbg] Error 1 make: *** [vdso_prepare] Error 2 Signed-off-by: Greentime Hu arch/nds32/kernel/vdso/vdso.lds.S | 1 - 1 file changed, 1 deletion(-) commit c601a89115cbc3ccd51468295d28cfae47cc5410 Author: Greentime Hu Date: Thu Mar 1 10:55:54 2018 +0800 nios2: add ioremap_nocache declaration before include asm-generic/io.h. A commit for the nds32 architecture bootstrap("asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU") will move the ioremap_nocache out of the CONFIG_MMU ifdef. This means that in order to suppress re-definition errors we need to setup #define's before importing asm-generic/io.h. Signed-off-by: Greentime Hu Reviewed-by: Tobias Klauser arch/nios2/include/asm/io.h | 1 + 1 file changed, 1 insertion(+) commit d78a62fb347380576c0f6953cc33019b7a8995ea Author: Greentime Hu Date: Thu Mar 1 10:54:07 2018 +0800 nds32: fix building failed if using older version gcc. It will be built failed because these options are not supported by older version gcc. Signed-off-by: Greentime Hu arch/nds32/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 99a954874e7b9f0c8058476575593b3beb5731a5 Author: Joe Perches Date: Tue Mar 13 15:02:15 2018 -0700 drm: Reduce object size of DRM_ERROR and DRM_DEBUG uses drm_printk is used for both DRM_ERROR and DRM_DEBUG with unnecessary arguments that can be removed by creating separate functins. Create specific functions for these calls to reduce x86/64 defconfig size by ~20k. Modify the existing macros to use the specific calls. new: $ size -t drivers/gpu/drm/built-in.a | tail -1 1876562 44542 995 1922099 1d5433 (TOTALS) old: $ size -t drivers/gpu/drm/built-in.a | tail -1 1897565 44542 995 1943102 1da63e (TOTALS) Miscellanea: o intel_display requires a change to use the specific calls. Signed-off-by: Joe Perches Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/016b5cb84cede20fd0f91ed6965421d99fd5f2ce.1520978414.git.joe@perches.com drivers/gpu/drm/drm_print.c | 28 +++++++++++++++++++++------- drivers/gpu/drm/i915/intel_display.c | 15 ++++----------- include/drm/drm_print.h | 27 ++++++++++++++------------- 3 files changed, 39 insertions(+), 31 deletions(-) commit 326e7ba992cbe17c12d4235f65d72c6e222a73a1 Author: Fabio Estevam Date: Thu Mar 15 15:29:29 2018 -0300 ARM: dts: imx6ul-isiot: Pass the required '#sound-dai-cells' DTC now warns about missing #sound-dai-cells: /sound/simple-audio-card,codec: Missing property '#sound-dai-cells' in node /soc/aips-bus@2100000/i2c@21a0000/codec@a or bad phandle (referred from sound-dai[0]) Pass the required '#sound-dai-cells' property to fix it. Reported-by: Arnd Bergmann Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-isiot.dtsi | 1 + 1 file changed, 1 insertion(+) commit 863c53fcffa305e4b8090da1809e568c89cc453a Author: Fabio Estevam Date: Thu Mar 15 15:29:28 2018 -0300 ARM: dts: imx6-phytec: Use the standard 'stdout-path' property Use the standard 'stdout-path' property to fix the following DTC warnings: arch/arm/boot/dts/imx6dl-phytec-mira-rdk-nand.dtb: Warning (chosen_node_stdout_path): /chosen:linux,stdout-path: Use 'stdout-path' instead Reported-by: Arnd Bergmann Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl-phytec-mira-rdk-nand.dts | 2 +- arch/arm/boot/dts/imx6q-phytec-mira-rdk-emmc.dts | 2 +- arch/arm/boot/dts/imx6q-phytec-mira-rdk-nand.dts | 2 +- arch/arm/boot/dts/imx6qp-phytec-mira-rdk-nand.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 6d06c9aa3816c26144f54d18c5b63ba9ff026fb9 Author: Guy Levi Date: Thu Mar 15 16:56:40 2018 +0200 IB/mlx4: Add Scatter FCS support over WQ creation As a default, for Ethernet packets, the device scatters only the payload of ingress packets. The scatter FCS feature lets the user to get the FCS (Ethernet's frame check sequence) in the received WR's buffer as a 4 Bytes trailer following the packet's payload. Reviewed-by: Yishai Hadas Signed-off-by: Guy Levi Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx4/main.c | 21 +++++++++++++-------- drivers/infiniband/hw/mlx4/mlx4_ib.h | 1 + drivers/infiniband/hw/mlx4/qp.c | 19 ++++++++++++++++++- 3 files changed, 32 insertions(+), 9 deletions(-) commit 9c71172c4a2f6695fdfb89780da160f579a002c2 Author: Yishai Hadas Date: Thu Mar 15 16:56:39 2018 +0200 IB/mlx4: Report TSO capabilities Report to the user area the TSO device capabilities, it includes the max_tso size and the QP types that support it. The TSO is applicable only when when of the ports is ETH and the device supports it. uresp logic around rss_caps is updated to fix a till-now harmless bug computing the length of the structure to copy. The code did not handle the implicit padding before rss_caps correctly. This is necessay to copy tss_caps successfully. Reviewed-by: Mark Bloch Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx4/main.c | 22 ++++++++++++++++++++-- include/uapi/rdma/mlx4-abi.h | 9 +++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) commit 546b1452fdcccdcc98962b324cab6d74fc976fe9 Author: Henry Orosco Date: Wed Mar 14 14:45:23 2018 -0500 i40iw: Tear-down connection after CQP Modify QP failure There is no explicit tear-down sequence initiated on connections if the Control QP OP, Modify QP to close, fails. Fix this by triggering a driver generated Asynchronous Event (AE) on Modify QP failures and tear-down the connection on receipt of the AE. This fix can be generalized to other Modify QP failures (i.e. RTS->TERM, IDLE->RTS, etc) as any modify failure will require a connection tear-down. Fixes: d37498417947 ("i40iw: add files for iwarp interface") Signed-off-by: Henry Orosco Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/i40iw/i40iw.h | 1 + drivers/infiniband/hw/i40iw/i40iw_cm.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_hw.c | 2 ++ drivers/infiniband/hw/i40iw/i40iw_verbs.c | 35 +++++++++++++++++++++++-------- 4 files changed, 30 insertions(+), 10 deletions(-) commit a8b9234b1272de7a2af87e076fad51ba096a3c30 Author: Henry Orosco Date: Wed Mar 14 14:45:22 2018 -0500 i40iw: Refactor of driver generated AEs The flush CQP OP can be used to optionally generate Asynchronous Events (AEs) in addition to QP flush. Consolidate all HW AE generation code under a new function i40iw_gen_ae which use the flush CQP OP to only generate AEs. Signed-off-by: Henry Orosco Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/i40iw/i40iw.h | 5 +++ drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 56 ++++++++++++++++++++++++++++--- drivers/infiniband/hw/i40iw/i40iw_d.h | 5 ++- drivers/infiniband/hw/i40iw/i40iw_hw.c | 33 ++++++++++++++++++ drivers/infiniband/hw/i40iw/i40iw_type.h | 11 ++++++ drivers/infiniband/hw/i40iw/i40iw_utils.c | 8 ++--- 6 files changed, 108 insertions(+), 10 deletions(-) commit 7f86260b5f44d93ab20d3e9afda0e3f48d005ffe Author: Jason Gunthorpe Date: Wed Mar 14 16:01:50 2018 -0600 RDMA/cxgb4: Use structs to describe the uABI instead of opencoding Open coding a loose value is not acceptable for describing the uABI in RDMA. Provide the missing struct. Reviewed-by: Steve Wise Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb4/provider.c | 4 +++- include/uapi/rdma/cxgb4-abi.h | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 633fb4d9fdaa613308c136293107f28e08e85d25 Author: Jason Gunthorpe Date: Wed Mar 14 14:39:42 2018 -0600 RDMA/hns: Use structs to describe the uABI instead of opencoding Open coding a loose value is not acceptable for describing the uABI in RDMA. Provide the missing struct. Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_pd.c | 5 ++++- include/uapi/rdma/hns-abi.h | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 9a657b4c4a9073037121331bb54663bf11f08342 Author: Jason Gunthorpe Date: Tue Mar 13 22:01:32 2018 -0600 RDMA/i40iw: Move uapi header to include/uapi All of these defines are part of the uABI for the driver, this header duplicates providers/i40iw/i40iw-abi.h in rdma-core. Acked-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe MAINTAINERS | 1 + drivers/infiniband/hw/i40iw/i40iw.h | 2 +- drivers/infiniband/hw/i40iw/i40iw_ucontext.h | 107 --------------------------- include/uapi/rdma/i40iw-abi.h | 107 +++++++++++++++++++++++++++ 4 files changed, 109 insertions(+), 108 deletions(-) commit 48962f5c6fffcb676dd6ebd70f7869cfc6cc8356 Author: Jason Gunthorpe Date: Tue Mar 13 16:26:46 2018 -0600 RDMA/mlx4: Move flag constants to uapi header MLX4_USER_DEV_CAP_LARGE_CQE (via mlx4_ib_alloc_ucontext_resp.dev_caps) and MLX4_IB_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET (via mlx4_uverbs_ex_query_device_resp.comp_mask) are copied directly to userspace and form part of the uAPI. Move them to the uapi header where they belong. Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx4/main.c | 2 +- drivers/infiniband/hw/mlx4/mlx4_ib.h | 4 ---- drivers/net/ethernet/mellanox/mlx4/fw.c | 1 + drivers/net/ethernet/mellanox/mlx4/main.c | 1 + include/linux/mlx4/device.h | 4 ---- include/uapi/rdma/mlx4-abi.h | 8 ++++++++ 6 files changed, 11 insertions(+), 9 deletions(-) commit 0c43ab371bcb07d9ed9c95ea116e6d1d703b56ca Author: Jason Gunthorpe Date: Tue Mar 13 16:33:18 2018 -0600 RDMA/rxe: Use structs to describe the uABI instead of opencoding Open coding pointer math is not acceptable for describing the uABI in RDMA. Provide structs for all the cases. The udata is casted to the struct as close to the verbs entry point as possible for maximum clarity. Function signatures and so forth are revised to allow for this. Tested-by: Yuval Shaia Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_cq.c | 13 +++++----- drivers/infiniband/sw/rxe/rxe_loc.h | 13 ++++++---- drivers/infiniband/sw/rxe/rxe_qp.c | 26 ++++++++++--------- drivers/infiniband/sw/rxe/rxe_queue.c | 24 ++++-------------- drivers/infiniband/sw/rxe/rxe_queue.h | 5 ++-- drivers/infiniband/sw/rxe/rxe_srq.c | 44 +++++++++++--------------------- drivers/infiniband/sw/rxe/rxe_verbs.c | 48 +++++++++++++++++++++++++++++++---- include/uapi/rdma/rdma_user_rxe.h | 22 ++++++++++++++++ 8 files changed, 116 insertions(+), 79 deletions(-) commit b92ec0fe3224dbce7d50fb6cbfaf4eaf4a6f0359 Author: Jason Gunthorpe Date: Tue Mar 13 16:33:17 2018 -0600 RDMA/rxe: Get rid of confusing udata parameter to rxe_cq_chk_attr It isn't used and it couldn't possibly ever be used correctly. Tested-by: Yuval Shaia Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_cq.c | 2 +- drivers/infiniband/sw/rxe/rxe_loc.h | 2 +- drivers/infiniband/sw/rxe/rxe_verbs.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 95da6e96f1e74e6ddfb347f7a8310f419bb47bf7 Author: Tejun Heo Date: Wed Mar 14 12:45:10 2018 -0700 RDMAVT: Fix synchronization around percpu_ref rvt_mregion uses percpu_ref for reference counting and RCU to protect accesses from lkey_table. When a rvt_mregion needs to be freed, it first gets unregistered from lkey_table and then rvt_check_refs() is called to wait for in-flight usages before the rvt_mregion is freed. rvt_check_refs() seems to have a couple issues. * It has a fast exit path which tests percpu_ref_is_zero(). However, a percpu_ref reading zero doesn't mean that the object can be released. In fact, the ->release() callback might not even have started executing yet. Proceeding with freeing can lead to use-after-free. * lkey_table is RCU protected but there is no RCU grace period in the free path. percpu_ref uses RCU internally but it's sched-RCU whose grace periods are different from regular RCU. Also, it generally isn't a good idea to depend on internal behaviors like this. To address the above issues, this patch removes the fast exit and adds an explicit synchronize_rcu(). Signed-off-by: Tejun Heo Acked-by: Dennis Dalessandro Cc: Mike Marciniszyn Cc: linux-rdma@vger.kernel.org Cc: Linus Torvalds Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rdmavt/mr.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 561e5d48968be22fc71af6a0e13af6edae595dbe Author: Sinan Kaya Date: Tue Mar 13 23:20:24 2018 -0400 RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs Code includes wmb() followed by writel() in multiple places. writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_relaxed(). Signed-off-by: Sinan Kaya Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/qedr/verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7b48221cf41a90cf4bfc36e6d699b7fa4169c970 Author: Yixian Liu Date: Thu Mar 15 15:23:14 2018 +0800 RDMA/hns: Fix cqn type and init resp This patch changes the type of cqn from u32 to u64 to keep userspace and kernel consistent, initializes resp both for cq and qp to zeros, and also changes the condition judgment of outlen considering future caps extension. Suggested-by: Jason Gunthorpe Fixes: e088a685eae9 (hns: Support rq record doorbell for the user space) Fixes: 9b44703d0a21 (hns: Support cq record doorbell for the user space) Signed-off-by: Yixian Liu Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_cq.c | 15 +++++++-------- drivers/infiniband/hw/hns/hns_roce_qp.c | 8 ++++---- include/uapi/rdma/hns-abi.h | 3 +-- 3 files changed, 12 insertions(+), 14 deletions(-) commit e41a7c41947d33dbca16d1695460c121342a4601 Author: Parav Pandit Date: Tue Mar 13 16:06:23 2018 +0200 IB/core: Move rdma_addr_find_l2_eth_by_grh to core_priv.h Before commit [1], rdma_addr_find_l2_eth_by_grh() was an exported function and therefore declaration in include/rdma/ib_addr.h was fine. But now that its scope is limited to ib_core module, its better to have it in core_priv.h. [1] commit 1060f8653414 ("IB/{core/cm}: Fix generating a return AH for RoCEE") Reviewed-by: Daniel Jurgens Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/core_priv.h | 5 +++++ include/rdma/ib_addr.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) commit 374200b154ae48e8f011fb74dab21f80459f9e47 Author: Felix Kuehling Date: Thu Mar 15 17:27:53 2018 -0400 drm/amdkfd: Add module option for testing large-BAR functionality Simulate large-BAR system by exporting only visible memory. This limits the amount of available VRAM to the size of the BAR, but enables CPU access to VRAM. Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 5 +++++ drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 3 +++ drivers/gpu/drm/amd/amdkfd/kfd_module.c | 5 +++++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 6 ++++++ 4 files changed, 19 insertions(+) commit 0fc8011f89feb8b2c3008583b777d097e1974660 Author: Felix Kuehling Date: Thu Mar 15 17:27:52 2018 -0400 drm/amdkfd: Kmap event page for dGPUs The events page must be accessible in user mode by the GPU and CPU as well as in kernel mode by the CPU. On dGPUs user mode virtual addresses are managed by the Thunk's GPU memory allocation code. Therefore we can't allocate the memory in kernel mode like we do on APUs. But KFD still needs to map the memory for kernel access. To facilitate this, the Thunk provides the buffer handle of the events page to KFD when creating the first event. Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 56 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_events.c | 31 ++++++++++++++++-- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 ++ 3 files changed, 87 insertions(+), 2 deletions(-) commit 5ec7e02854b3b9b55936c3b44b8acfb85e333f49 Author: Felix Kuehling Date: Thu Mar 15 17:27:51 2018 -0400 drm/amdkfd: Add ioctls for GPUVM memory management v2: * Fix error handling after kfd_bind_process_to_device in kfd_ioctl_map_memory_to_gpu v3: * Add ioctl to acquire VM from a DRM FD v4: * Return number of successful map/unmap operations in failure cases * Facilitate partial retry after failed map/unmap * Added comments with parameter descriptions to new APIs * Defined AMDKFD_IOC_FREE_MEMORY_OF_GPU write-only Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 377 ++++++++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 8 + drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 2 + include/uapi/linux/kfd_ioctl.h | 97 +++++- 4 files changed, 483 insertions(+), 1 deletion(-) commit 552764b680a65d6069ad651b356d5465082939d0 Author: Felix Kuehling Date: Thu Mar 15 17:27:50 2018 -0400 drm/amdkfd: Add TC flush on VMID deallocation for Hawaii On GFX7 the CP does not perform a TC flush when queues are unmapped. To avoid TC eviction from accessing an invalid VMID, flush it explicitly before releasing a VMID. v2: Fix unnecessary list_for_each_entry_safe v3: Moved allocation to kfd_process_device_init_vm Signed-off-by: Amber Lin Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Oded Gabbay .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 22 ++++++++++++- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 37 ++++++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 ++ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 34 ++++++++++++++++++++ 4 files changed, 95 insertions(+), 1 deletion(-) commit f35751b87034f0c2d11e60cdfb0179c4f1a7e296 Author: Felix Kuehling Date: Thu Mar 15 17:27:49 2018 -0400 drm/amdkfd: Allocate CWSR trap handler memory for dGPUs Add helpers for allocating GPUVM memory in kernel mode and use them to allocate memory for the CWSR trap handler. v2: Use dev instead of pdd->dev in kfd_process_free_gpuvm v3: * Cleaned up and simplified kfd_process_alloc_gpuvm * Moved allocation for dGPU to kfd_process_device_init_vm Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_process.c | 137 ++++++++++++++++++++++++++++--- 1 file changed, 127 insertions(+), 10 deletions(-) commit 52b29d73340da6cbb10ba42b0a28e7fb795afe9c Author: Felix Kuehling Date: Thu Mar 15 17:27:48 2018 -0400 drm/amdkfd: Add per-process IDR for buffer handles Also used for cleaning up on process termination. v2: Refactored cleanup on process termination Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 11 +++++ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 73 ++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) commit d01994c24cb28b6f200138d98cbfc17b6bd967c5 Author: Felix Kuehling Date: Thu Mar 15 17:27:47 2018 -0400 drm/amdkfd: Aperture setup for dGPUs Set up the GPUVM aperture for SVM (shared virtual memory) that allows sharing a part of virtual address space between GPUs and CPUs. Report the size of the GPUVM aperture that is supported by KGD accurately. The low part of the GPUVM aperture is reserved for kernel use. This is for kernel-allocated buffers that are only accessed on the GPU: - CWSR trap handler - IB for submitting commands in user-mode context from kernel mode Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 37 ++++++++++++++++++++++------ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 4 +++ 2 files changed, 33 insertions(+), 8 deletions(-) commit c7bcbfa4f8d1e0e1078adfe959d4b65542bccf66 Author: Felix Kuehling Date: Thu Mar 15 17:27:46 2018 -0400 drm/amdkfd: Remove limit on number of GPUs Currently the number of GPUs is limited by aperture placement options available on GFX7 and GFX8 hardware. This limitation is not necessary. Scratch and LDS represent per-work-item and per-work-group storage respectively. Different work-items and work-groups use the same virtual address to access their own data. Work running on different GPUs is by definition in different work-groups (different dispatches, in fact). That means the same virtual addresses can be used for these apertures on different GPUs. Add a new AMDKFD_IOC_GET_PROCESS_APERTURES_NEW ioctl that removes the artificial limitation on the number of GPUs that can be supported. The new ioctl allows user mode to query the number of GPUs to allocate enough memory for all GPUs to be reported. This deprecates AMDKFD_IOC_GET_PROCESS_APERTURES. Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 94 ++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 22 +++---- include/uapi/linux/kfd_ioctl.h | 27 +++++++- 3 files changed, 128 insertions(+), 15 deletions(-) commit 7c9b717196b1afd368436c258994ed6054717c7a Author: Oak Zeng Date: Thu Mar 15 17:27:45 2018 -0400 drm/amdkfd: Populate DRM render device minor Populate DRM render device minor in kfd topology Signed-off-by: Oak Zeng Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 4 ++++ drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 1 + 2 files changed, 5 insertions(+) commit b84394e206a748ce34beeed462f237474f3c6c00 Author: Felix Kuehling Date: Thu Mar 15 17:27:44 2018 -0400 drm/amdkfd: Create KFD VMs on demand Instead of creating all VMs on process creation, create them when a process is bound to a device. This will later allow registering an existing VM from a DRM render node FD at runtime, before the process is bound to the device. This way the render node VM can be used for KFD instead of creating our own redundant VM. Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 ++ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 60 ++++++++++++++++++++++++++------ 2 files changed, 53 insertions(+), 10 deletions(-) commit ede0dd86f45adf2b7083bb161f6bc81da5fe2bad Author: Felix Kuehling Date: Thu Mar 15 17:27:43 2018 -0400 drm/amdgpu: Add kfd2kgd interface to acquire an existing VM This allows acquiring an existing VM from a render node FD to use it for a compute process. Such VMs get destroyed when the original file descriptor is released. Added a callback from amdgpu_vm_fini to handle KFD VM destruction correctly in this case. v2: * Removed vm->vm_context check in amdgpu_amdkfd_gpuvm_destroy_cb, check vm->process_info earlier instead Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 6 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 166 +++++++++++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 + drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 2 + 6 files changed, 124 insertions(+), 55 deletions(-) commit b236fa1d339670cc997b68c31be57855bbabc126 Author: Felix Kuehling Date: Thu Mar 15 17:27:42 2018 -0400 drm/amdgpu: Add helper to turn an existing VM into a compute VM v2: Removed updating and checking of vm->vm_context v3: Enable amdgpu_vm_clear_bo in amdgpu_vm_make_compute Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 67 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 + 2 files changed, 68 insertions(+) commit 3486625bbfb629621f8a2402e2b24e7ab0a86ef4 Author: Felix Kuehling Date: Thu Mar 15 17:27:41 2018 -0400 drm/amdgpu: Fix initial validation of PD BO for KFD VMs Make sure the PD BO is valid and attach the eviction fence during VM creation. This ensures that the pd_phys_address is actually valid and an eviction that would invalidate it triggers a KFD process eviction like it should. v2: Use uninterruptible waiting in initial PD validation Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 5b21d3e5fd2110df5a57a508188308351e698a5a Author: Felix Kuehling Date: Thu Mar 15 17:27:40 2018 -0400 drm/amdgpu: Move KFD-specific fields into struct amdgpu_vm Remove struct amdkfd_vm and move the fields into struct amdgpu_vm. This will allow turning a VM created by a DRM render node into a KFD VM. v2: Removed vm_context field Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 21 ------ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 88 +++++++++++------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 9 +++ 3 files changed, 50 insertions(+), 68 deletions(-) commit cb12a8e2fa5fc6381aa8ae542276099a64dee6e9 Author: Parav Pandit Date: Tue Mar 13 16:06:22 2018 +0200 IB/cm: Introduce and use helper function to get cm_port from path Introduce and use helper function get_cm_port_from_path() to get cm_port based on the the path record entry. Reviewed-by: Daniel Jurgens Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cm.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 0a5141593567fca3e1d64da756b8d1b490f6c600 Author: Parav Pandit Date: Tue Mar 13 16:06:20 2018 +0200 IB/core: Refactor ib_init_ah_attr_from_path() for RoCE Resolving route for RoCE for a path record is needed only for the received CM requests. Therefore, (a) ib_init_ah_attr_from_path() is refactored first to isolate the code of resolving route. (b) Setting dlid, path bits is not needed for RoCE. Additionally ah attribute initialization is done from the path record entry, so it is better to refer to path record entry type for different link layer instead of ah attribute type while initializing ah attribute itself. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/sa_query.c | 199 +++++++++++++++++++------------------ include/rdma/ib_sa.h | 5 + 2 files changed, 108 insertions(+), 96 deletions(-) commit a22af59ea9a5f9496c37bc4e4654da45a4e0ca2a Author: Parav Pandit Date: Tue Mar 13 16:06:18 2018 +0200 IB/cm: Add and use a helper function to add cm_id's to the port list Add and use helper function add_cm_id_to_port_list() to attach cm_id to port list. Reviewed-by: Daniel Jurgens Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cm.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit 115b68aa6ea4bb7dca1cbf66cb99cefc274180cb Author: Parav Pandit Date: Tue Mar 13 16:06:17 2018 +0200 IB/ocrdma: Removed GID add/del null routines add_gid() and del_gid() are optional callback routines. ib_core ignores invoking them while updating GID table entries if they are not implemented by provider drivers. Therefore remove them. Reviewed-by: Daniel Jurgens Reviewed-by: Mark Bloch Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 -- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 16 ---------------- drivers/infiniband/hw/ocrdma/ocrdma_verbs.h | 10 ---------- 3 files changed, 28 deletions(-) commit a9c06aeba9977e71b81ef3e107cb588e00dae150 Author: Parav Pandit Date: Tue Mar 13 16:06:16 2018 +0200 IB/core: Remove rdma_resolve_ip_route() as exported symbol rdma_resolve_ip_route() is used only by ib_core module. Therefore it is removed as an exported symbol. Reviewed-by: Daniel Jurgens Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/addr.c | 1 - drivers/infiniband/core/core_priv.h | 6 ++++++ include/rdma/ib_addr.h | 4 ---- 3 files changed, 6 insertions(+), 5 deletions(-) commit 4f21a12082447c83082bb77c2d1c8567d19541ab Author: Rob Herring Date: Thu Mar 1 21:25:00 2018 +0100 ARM: dts: stih4xx: Add missing #sound-dai-cells dtc now gives the following warnings: arch/arm/boot/dts/stih410-b2120.dtb: Warning (sound_dai_property): /soc/sound/simple-audio-card,dai-link@0/codec: Missing property '#sound-dai-cells' in node /soc/sti-display-subsystem/sti-hdmi@8d04000 or bad phandle (referred from sound-dai[0]) arch/arm/boot/dts/stih407-b2120.dtb: Warning (sound_dai_property): /soc/sound/simple-audio-card,dai-link@0/codec: Missing property '#sound-dai-cells' in node /soc/sti-display-subsystem/sti-hdmi@8d04000 or bad phandle (referred from sound-dai[0]) arch/arm/boot/dts/stih410-b2260.dtb: Warning (sound_dai_property): /soc/sound/simple-audio-card,dai-link@0/codec: Missing property '#sound-dai-cells' in node /soc/sti-display-subsystem/sti-hdmi@8d04000 or bad phandle (referred from sound-dai[0]) Add the missing #sound-dai-cells property. Cc: Patrice Chotard Signed-off-by: Rob Herring Signed-off-by: Arnd Bergmann arch/arm/boot/dts/stih407.dtsi | 1 + arch/arm/boot/dts/stih410.dtsi | 1 + 2 files changed, 2 insertions(+) commit 266da65e9156d93e1126e185259a4aae68188d0e Author: Dave Martin Date: Thu Mar 1 17:44:06 2018 +0000 signal: Add FPE_FLTUNK si_code for undiagnosable fp exceptions Some architectures cannot always report accurately what kind of floating-point exception triggered a floating-point exception trap. This can occur with fp exceptions occurring on lanes in a vector instruction on arm64 for example. Rather than have every architecture come up with its own way of describing such a condition, this patch adds a common FPE_FLTUNK si_code value to report that an fp exception caused a trap but we cannot be certain which kind of fp exception it was. Signed-off-by: Dave Martin Signed-off-by: Eric W. Biederman arch/x86/kernel/signal_compat.c | 2 +- include/uapi/asm-generic/siginfo.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 614bae98cb18674644817bedc1a767ce2a286196 Merge: 7a76aad 4e017f1 Author: Arnd Bergmann Date: Thu Mar 15 16:25:44 2018 +0100 Merge tag 'imx-dt64-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt Pull "Freescale arm64 device tree updates for 4.17" from Shawn Guo: - Move cpu_thermal device out of bus node to fix DTC simple_bus_reg warning seen with W=1 switch. - Fix IFC child nodes' unit-address to eliminate DTC simple_bus_reg warnings. - Add a dummy size memory 'reg' property for LS1046A device tree to avoid unit_address_vs_reg DTC warning, and the real size will be filled by bootloader. - Update ls208xa-qds board device tree to fix unit_address_vs_reg warnings with DSPI device. - Add idle-states for LS1012A and LS1043A, and correct arm,psci-suspend-param setting for already added idle-states. - DPAA QBMan portal and watchdog device addition. * tag 'imx-dt64-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: ifc: Fix the unit address format in the examples arm64: dts: ls1046a: add a dummy memory 'reg' property arm64: dts: fsl: fix ifc simple-bus unit address format warnings arm64: dts: fsl: update the cpu idle node arm64: dts: ls1043a: add cpu idle support arm64: dts: ls1012a: add cpu idle support arm64: dts: ls208xa-qds: Fix the 'reg' property arm64: dts: ls208xa-qds: Pass unit name to dspi child nodes arm64: dts: ls208xa: Move cpu_thermal out of bus node arm64: dts: ls1088a: Move cpu_thermal out of bus node arm64: dts: ls1046a: Move cpu_thermal out of bus node arm64: dts: ls1043a: Move cpu_thermal out of bus node arm64: dts: ls1012a: Move cpu_thermal out of bus node arm64: dts: Add DPAA QBMan portal 9 arm64: dts: ls1088a: add DT node of watchdog commit 7a76aad0262e7eed6d7aca3b4c95e4621601d779 Merge: fed925e f4be9b7 Author: Arnd Bergmann Date: Thu Mar 15 16:06:55 2018 +0100 Merge tag 'imx-dt-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt Pull "i.MX device tree updates for 4.17" from Shawn Guo: - New board support: phyBOARD-Mira i.MX6 boards; Advantech DMS-BA16 i.MX6Q board; Toradex Colibri iMX6ULL boards. - ZII RDU board updates: add RAVE SP device; disable on-chip watchdog as the external watchdog is being used instead; improve USDHC node regarding to voltage and SDIO capability. - i.MX6UL/ULL updates: cpufreq clock cleanup; add IOMUXC_SNVS pins and missing daisy chain configurations; add more devices like WDOG3, UART8, PMU, architected timer etc. - Hummingboard updates: correct USBOTG-ID pin; remove mention of nonexistent node. - Fix compatibles of atmel eeprom devices. - A couple of improvements on i.MX25 pinfunc header regarding to eSDHC pins. - A bunch of patches from Fabio and Marco to fix DTC warnings seen with W=1 switch. - Remove GPU subsystem nodes, as they are not needed by the etnaviv driver anymore and have been removed from the binding. - Add FIFO depth definition for i.MX25 SSI devices. - Add missing '#sound-dai-cells' for sgtl5000 codec which is complained by DTC. - Miscellaneous and random updates. * tag 'imx-dt-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (66 commits) ARM: dts: i.MX25: define SSI FIFO depth ARM: dts: vf610m4: Remove the zero length reg property ARM: dts: vf610m4: Remove skeleton.dtsi inclusion ARM: dts: vf500: Remove the zero length reg property ARM: dts: vf: Add memory node unit name ARM: dts: vf500: Remove skeleton.dtsi inclusion ARM: dts: imx7s: add temperature monitor support ARM: dts: imx: Add missing #sound-dai-cells for sgtl5000 codec ARM: dts: imx51-zii-rdu1: Add node for RAVE SP device ARM: dts: imx6: RDU2: Add RAVE SP device ARM: dts: imx5: Pass the memory unit-address ARM: dts: imx7s: add spba-bus abstraction ARM: dts: imx6dl-icore-rqs: Fix invalid PHY address assignment for ethernet ARM: dts: imx6ul: add wdog3 node ARM: dts: imx7: add CPU PMU support ARM: dts: imx6dl-colibri-eval-v3: Add chosen node ARM: dts: imx6: Pass memory unit-adress ARM: dts: imx6dl: remove 'lcdif' node ARM: dts: hummingboard: Remove mention of nonexistent node ARM: dts: imx6qdl-hummingboard: fix USBOTG-ID pin ... commit fed925ea70f6a8bb1a60baad1146f251770cc777 Merge: f3ccc2b 303aa1b Author: Arnd Bergmann Date: Thu Mar 15 16:01:18 2018 +0100 Merge tag 'imx-dt-newclk-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt Pull "i.MX device tree update with new clock for 4.17" from Shawn Guo: - Add CAAM and Keypad device node for i.MX7S/D SoC device tree. - Add clock support for i.MX7 SNVS RTC device. * tag 'imx-dt-newclk-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx7s: add Keypad Port module ARM: dts: imx7s: add CAAM device node ARM: dts: imx7s: add snvs rtc clock clk: imx: imx7d: add the Keypad Port module clock clk: imx7d: add CAAM clock clk: imx: imx7d: add the snvs clock commit f3ccc2b445ce1d800ef9776a0a3fcc85762d380a Merge: 5b5c7ff 7f9f76b Author: Arnd Bergmann Date: Thu Mar 15 16:00:06 2018 +0100 Merge tag 'uniphier-dt-v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt Pull "UniPhier ARM SoC DT updates for v4.17" from Masahiro Yamada: - add sound support - add ethernet support - use proper SPDX-License-Identifier style * tag 'uniphier-dt-v4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: ARM: dts: uniphier: add sound node for PXs2 arm64: dts: uniphier: use proper SPDX-License-Identifier style ARM: dts: uniphier: use proper SPDX-License-Identifier style arm64: dts: uniphier: add fixed regulators for audio codec arm64: dts: uniphier: add AVE ethernet node ARM: dts: uniphier: add AVE ethernet node arm64: dts: uniphier: add compress audio out for LD11/LD20 arm64: dts: uniphier: add speaker out for LD11/LD20 boards arm64: dts: uniphier: add sound node ARM: dts: uniphier: add audio in/out pin-mux node commit 9e694d9c18dde0fa57ec067043b581bd57c9fb65 Author: Toshi Kani Date: Fri Feb 23 14:59:22 2018 -0700 libnvdimm, label: change nvdimm_num_label_slots per UEFI 2.7 sizeof_namespace_index() fails when NVDIMM devices have the minimum 1024 bytes label storage area. nvdimm_num_label_slots() returns 3 slots while the area is only big enough for 2 slots. Change nvdimm_num_label_slots() to calculate a number of label slots according to UEFI 2.7 spec. Signed-off-by: Toshi Kani Signed-off-by: Dan Williams drivers/nvdimm/label.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit 5ac08a341303dd2105d7b5dc26b38b0d85ac726b Author: Parav Pandit Date: Tue Mar 13 16:06:15 2018 +0200 IB/cma: Use rdma_protocol_roce() and remove cma_protocol_roce_dev_port() rdma_protocol_roce() API from the ib_core already provides a way to detect whether a given device+port is RoCE or not. Therefore, make use of it and avoid implementing it again in rdmacm module. Reviewed-by: Daniel Jurgens Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cma.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 563c4ba3bd2b8b0b21c65669ec2226b1cfa1138b Author: Parav Pandit Date: Tue Mar 13 16:06:14 2018 +0200 IB/core: Honor port_num while resolving GID for IB link layer ah_attr contains the port number to which cm_id is bound. However, while searching for GID table for matching GID entry, the port number is ignored. This could cause the wrong GID to be used when the ah_attr is converted to an AH. Reviewed-by: Daniel Jurgens Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/multicast.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 6d337179f28cc50ddd7e224f677b4cda70b275fc Author: Parav Pandit Date: Tue Mar 13 16:06:13 2018 +0200 IB/core: Honor return status of ib_init_ah_from_mcmember() The return status of ib_init_ah_from_mcmember() is ignored by cma_ib_mc_handler(). Honor it and return error event if ah attribute initialization failed. Reviewed-by: Daniel Jurgens Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cma.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit b26c4a1138dff34cff507bafa4c87e365f4145a6 Author: Parav Pandit Date: Tue Mar 13 16:06:12 2018 +0200 IB/{core, ipoib}: Simplify ib_find_gid() for unused ndev ib_find_gid() is only used by IPoIB driver. For IB link layer, GID table entries are not based on netdevice. Netdevice parameter is unused here. Therefore, it is removed. Reviewed-by: Daniel Jurgens Reviewed-by: Mark Bloch Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Jason Gunthorpe drivers/infiniband/core/device.c | 3 +-- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 2 +- include/rdma/ib_verbs.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) commit 6612b4983f7e8d295a7503452719b113464b395f Author: Parav Pandit Date: Tue Mar 13 16:06:11 2018 +0200 IB/core: Fix comments of GID query functions Exported symbol's comments should be with function definition and not in the header file. Therefore comments of ib_find_cached_gid() and ib_find_cached_gid_by_port() functions are moved closer to their definitions. The function name in then comment is different than the actual function name, fix it to be same as ib_cache_gid_find_by_filter(). Also current comment section of ib_find_cached_gid_by_port() contains the desciption of ib_find_cached_gid(), fix that as well. Reviewed-by: Daniel Jurgens Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cache.c | 31 +++++++++++++++++++++++++++++-- include/rdma/ib_cache.h | 29 ----------------------------- 2 files changed, 29 insertions(+), 31 deletions(-) commit fcb3029a8d89487470f2e175645a9a993949233c Author: Arnd Bergmann Date: Thu Mar 15 16:38:04 2018 +0100 cpu/hotplug: Fix unused function warning The cpuhp_is_ap_state() function is no longer called outside of the CONFIG_SMP #ifdef section, causing a harmless warning: kernel/cpu.c:129:13: error: 'cpuhp_is_ap_state' defined but not used [-Werror=unused-function] This moves the function into the #ifdef to get a clean build again. Fixes: 17a2f1ced028 ("cpu/hotplug: Merge cpuhp_bp_states and cpuhp_ap_states") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Lai Jiangshan Cc: "Paul E. McKenney" Link: https://lkml.kernel.org/r/20180315153829.3819606-1-arnd@arndb.de kernel/cpu.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 64350f1b7f00862991395ec98d56125f6ff0a00f Author: Andrey Grodzovsky Date: Wed Mar 14 11:45:22 2018 -0400 drm/amdgpu: Improve documentation of bo_ptr in amdgpu_bo_create_kernel and amdgpu_bo_create_reserved. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0aee4c259849099cb07ead6cd7fff74e561d5225 Author: Neil Horman Date: Mon Mar 12 14:15:25 2018 -0400 sctp: Fix double free in sctp_sendmsg_to_asoc syzbot/kasan detected a double free in sctp_sendmsg_to_asoc: BUG: KASAN: use-after-free in sctp_association_free+0x7b7/0x930 net/sctp/associola.c:332 Read of size 8 at addr ffff8801d8006ae0 by task syzkaller914861/4202 CPU: 1 PID: 4202 Comm: syzkaller914861 Not tainted 4.16.0-rc4+ #258 Hardware name: Google Google Compute Engine/Google Compute Engine 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x24d lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report+0x23c/0x360 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 sctp_association_free+0x7b7/0x930 net/sctp/associola.c:332 sctp_sendmsg+0xc67/0x1a80 net/sctp/socket.c:2075 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:763 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xca/0x110 net/socket.c:639 SYSC_sendto+0x361/0x5c0 net/socket.c:1748 SyS_sendto+0x40/0x50 net/socket.c:1716 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 This was introduced by commit: f84af33 sctp: factor out sctp_sendmsg_to_asoc from sctp_sendmsg As the newly refactored function moved the wait_for_sndbuf call to a point after the association was connected, allowing for peeloff events to occur, which in turn caused wait_for_sndbuf to return -EPIPE which was not caught by the logic that determines if an association should be freed or not. Fix it the easy way by returning the ordering of sctp_primitive_ASSOCIATE and sctp_wait_for_sndbuf to the old order, to ensure that EPIPE will not happen. Tested by myself using the syzbot reproducers with positive results Signed-off-by: Neil Horman CC: davem@davemloft.net CC: Xin Long Reported-by: syzbot+a4e4112c3aff00c8cfd8@syzkaller.appspotmail.com Reviewed-by: Xin Long Signed-off-by: David S. Miller net/sctp/socket.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 0c3d5a96d5e5e6d5662d335a3bdfb76f35433f18 Author: Joe Perches Date: Mon Mar 12 08:07:12 2018 -0700 net: drivers/net: Remove unnecessary skb_copy_expand OOM messages skb_copy_expand without __GFP_NOWARN already does a dump_stack on OOM so these messages are redundant. Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/qca_spi.c | 1 - drivers/net/usb/lg-vl600.c | 6 +----- drivers/net/wimax/i2400m/usb-rx.c | 3 --- drivers/net/wireless/ti/wl1251/tx.c | 4 +--- drivers/usb/gadget/function/f_eem.c | 1 - net/mac80211/rx.c | 5 +---- net/netfilter/nfnetlink_queue.c | 5 +---- 7 files changed, 4 insertions(+), 21 deletions(-) commit 182c084da5d1e4d7c02d913de154cf5167521580 Author: Sylwester Nawrocki Date: Wed Mar 14 12:32:26 2018 +0100 clk: samsung: Add fout=196608001 Hz EPLL rate entry for exynos4412 This additional frequency is required for HDMI audio support on Odroid U3 board. Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos4.c | 1 + 1 file changed, 1 insertion(+) commit 4ae4b5c0dbaa499f2fd9215caac6e474c8dd477f Author: Thierry Reding Date: Thu Mar 15 16:45:45 2018 +0100 drm/tegra: fb: Properly support linear modifier Instead of relying on the tiling attached to a buffer object, make sure to set the proper tiling for linear buffers. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/fb.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit e90124cb46bdb6b8dd642e0066207ace0fc3f972 Author: Thierry Reding Date: Thu Mar 15 16:44:04 2018 +0100 drm/tegra: plane: Support format modifiers Pass the list of valid format modifiers to planes upon initialization and implement the ->format_mod_supported() callback so that userspace can query for the valid combinations of formats and modifiers. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dc.c | 26 +++++++++++++++++++++++++- drivers/gpu/drm/tegra/dc.h | 1 + drivers/gpu/drm/tegra/hub.c | 15 ++++++++++++++- drivers/gpu/drm/tegra/plane.c | 16 ++++++++++++++++ 4 files changed, 56 insertions(+), 2 deletions(-) commit 80d9f3a0fdb8c1129921147780661ed0a2cae2a1 Merge: c292566 089915f Author: David S. Miller Date: Thu Mar 15 14:04:57 2018 -0400 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2018-03-14 This series contains updates to i40e and i40evf only. Corentin Labbe cleans up the left over FCoE files in the i40e driver. Gustavo A R Silva fixes a cut and paste error. Paweł fixes a race condition when the VF driver is loaded on a host and virsh is trying to attach it to the virtual machine and set a MAC address. Resolve the issue by adding polling in i40e_ndo_set_vf_mac() when the VF is in reset mode. Jake cleans up i40e_vlan_rx_register() since this only used in a single location, so just inline the contents of the function. Created a helper function to proper update the per-filter statistics when we delete it. Factored out the re-enabling ATR and SB rules. Fixed an issue when re-enabling ATR after the last TCPv4 filter is removed and ntuple is still active, we were not restoring the TCPv4 filter input set. Filip modifies the permission check function to ensure that it knows how many filters are being requested, which allows the check to ensure that the total number of filters in a single request does not cause us to go over the limit. Mariusz fixed an issue where the wrong calculation of partition id was being done on OCP PHY mezzanine cards, which in turn caused wake on LAN to be disabled on certain ports. ==================== Signed-off-by: David S. Miller commit 36de6f518f2e323cb82683d1ee5f62c48b05e8ee Author: Toshi Kani Date: Fri Feb 23 14:59:21 2018 -0700 libnvdimm, label: change min label storage size per UEFI 2.7 UEFI 2.7 defines in page 758 that: Initial Label Storage Area Configuration : The minimum size of the Label Storage Area is large enough to hold 2 index blocks and 2 labels. The mininum index block size is 256 bytes, and the minimum label size is also 256 bytes. Change ND_LABEL_MIN_SIZE to (256 * 4) so that NVDIMM devices with the minimum label storage area do not fail with the size check in nvdimm_init_config_data(). Signed-off-by: Toshi Kani Signed-off-by: Dan Williams drivers/nvdimm/label.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df79b81b2e6a801c134c3e06c647715a316b4a92 Author: Christoph Hellwig Date: Tue Mar 13 23:15:33 2018 -0700 xfs: minor cleanup for xfs_reflink_end_cow Use xfs_iext_prev_extent to skip to the previous extent instead of opencoding it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_reflink.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 1d4352de511f4c9b6f4466c8fd4cfc25b14869b7 Author: Christoph Hellwig Date: Tue Mar 13 23:15:32 2018 -0700 xfs: minor cleanup for xfs_get_blocks Simplify the control flow a bit in preparation for O_ATOMIC-related changes. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit f5c54717bf2b9e052bb69d6ee19fe22e87817079 Author: Christoph Hellwig Date: Tue Mar 13 23:15:32 2018 -0700 xfs: remove xfs_zero_range This helper doesn't add any real value over just calling iomap_zero_range directly, so remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 11 ++++------- fs/xfs/xfs_file.c | 48 +++++++----------------------------------------- fs/xfs/xfs_inode.h | 4 ---- fs/xfs/xfs_iops.c | 4 +++- 4 files changed, 14 insertions(+), 53 deletions(-) commit c7dbe3f2c41969845b8ea000fc5e025d4987a8fb Author: Christoph Hellwig Date: Tue Mar 13 23:15:31 2018 -0700 xfs: assert that xfs_reflink_allocate_cow is called with XFS_ILOCK_EXCL Now that we convert COW preallocations from unwritten to real on every call this function needs to be called with the ilock held exclusively. Fortunately we already do that, but update the assert to match. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_reflink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d9df3c1631b0cb7eb4e59c934271adf0ead2f55 Author: Christoph Hellwig Date: Tue Mar 13 23:15:31 2018 -0700 xfs: don't use XFS_BMAPI_ENTRIRE in xfs_get_blocks There is no reason to get a mapping bigger than what we were asked for. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5bcffe300ca708203ca926c17f7a509d4a01403d Author: Christoph Hellwig Date: Tue Mar 13 23:15:30 2018 -0700 xfs: fix the check for COW extents in xfs_swap_extents i_cnextents does not include delayed allocated extents, so switch to the inode fork size check that we already use in other places instead. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8f347c4232d5fc097599b711a3385722a6834005 Author: Boris Brezillon Date: Mon Feb 12 22:03:10 2018 +0100 mtd: Unconditionally update ->fail_addr and ->addr in part_erase() ->fail_addr and ->addr can be updated no matter the result of parent->_erase(), we just need to remove the code doing the same thing in mtd_erase_callback() to avoid adjusting those fields twice. Note that this can be done because all MTD users have been converted to not pass an erase_info->callback() and are thus only taking the ->addr_fail and ->addr fields into account after part_erase() has returned. While we're at it, get rid of the erase_info->mtd field which was only needed to let mtd_erase_callback() get the partition device back. Signed-off-by: Boris Brezillon Reviewed-by: Richard Weinberger drivers/mtd/ftl.c | 1 - drivers/mtd/inftlmount.c | 3 --- drivers/mtd/mtdblock.c | 1 - drivers/mtd/mtdchar.c | 1 - drivers/mtd/mtdconcat.c | 1 - drivers/mtd/mtdoops.c | 1 - drivers/mtd/mtdpart.c | 16 ++++------------ drivers/mtd/mtdswap.c | 2 -- drivers/mtd/nand/nand_base.c | 1 - drivers/mtd/nand/nand_bbt.c | 1 - drivers/mtd/nftlmount.c | 1 - drivers/mtd/rfd_ftl.c | 1 - drivers/mtd/sm_ftl.c | 1 - drivers/mtd/tests/mtd_test.c | 1 - drivers/mtd/tests/speedtest.c | 1 - drivers/mtd/ubi/io.c | 1 - fs/jffs2/erase.c | 1 - include/linux/mtd/mtd.h | 3 ++- 18 files changed, 6 insertions(+), 32 deletions(-) commit 8ddfb47294c0f45a476a92ecf1e56cb5990c5468 Author: Arend van Spriel Date: Fri Feb 9 10:13:57 2018 +0100 drivers: base: add description for .coredump() callback Commit 3c47d19ff4dc ("drivers: base: add coredump driver ops") added a new callback in struct device_driver, but not a kerneldoc description so here it is. Fixes: 3c47d19ff4dc ("drivers: base: add coredump driver ops") Signed-off-by: Arend van Spriel Signed-off-by: Greg Kroah-Hartman include/linux/device.h | 1 + 1 file changed, 1 insertion(+) commit 884cfd9023ce6afe8bcf181ec988d8516eb32bf0 Author: Boris Brezillon Date: Mon Feb 12 22:03:09 2018 +0100 mtd: Stop assuming mtd_erase() is asynchronous None of the mtd->_erase() implementations work in an asynchronous manner, so let's simplify MTD users that call mtd_erase(). All they need to do is check the value returned by mtd_erase() and assume that != 0 means failure. Signed-off-by: Boris Brezillon Reviewed-by: Richard Weinberger drivers/mtd/devices/bcm47xxsflash.c | 3 -- drivers/mtd/ftl.c | 51 ++++---------------- drivers/mtd/inftlmount.c | 5 +- drivers/mtd/mtdblock.c | 20 -------- drivers/mtd/mtdchar.c | 33 +------------ drivers/mtd/mtdconcat.c | 48 ++----------------- drivers/mtd/mtdcore.c | 8 ++-- drivers/mtd/mtdoops.c | 19 -------- drivers/mtd/mtdpart.c | 2 - drivers/mtd/mtdswap.c | 32 ------------- drivers/mtd/nftlmount.c | 4 +- drivers/mtd/rfd_ftl.c | 92 +++++++++++-------------------------- drivers/mtd/sm_ftl.c | 18 -------- drivers/mtd/sm_ftl.h | 4 -- drivers/mtd/tests/mtd_test.c | 4 -- drivers/mtd/tests/speedtest.c | 6 --- drivers/mtd/ubi/io.c | 35 -------------- fs/jffs2/erase.c | 36 ++------------- include/linux/mtd/mtd.h | 2 - 19 files changed, 52 insertions(+), 370 deletions(-) commit f4d029098428da68b47eaba8094b5c0887a9edc8 Author: Joel Stanley Date: Mon Feb 19 17:54:22 2018 +1030 misc: aspeed-lpc-ctrl: Enable FWH and A2H bridge cycles To date this driver has relied on prevous state from out of tree hacks and vendor u-boot trees in order to have the host be able to access data over the LPC bus. Now we explicitly enable the AHB to LPC bridge and FWH cycles from when the user first configures the address to map. We chose to do this then as before that time there is no way for the kernel to know where it is safe to point the LPC window. Tested-by: Lei YU Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley Reviewed-by: Cyril Bur Signed-off-by: Greg Kroah-Hartman drivers/misc/aspeed-lpc-ctrl.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 99aad9e3a9d28c1b998cb157c85e17db957e8ae5 Author: Joel Stanley Date: Mon Feb 19 17:54:21 2018 +1030 misc: aspeed-lpc: Request and enable LPC clock The LPC device needs to ensure it's clock is enabled before it can do anything. In the past the clock was enabled and left running by u-boot, however Linux now has an upstream clock driver that disables unused clocks. Tested-by: Lei YU Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley Reviewed-by: Cyril Bur Signed-off-by: Greg Kroah-Hartman drivers/misc/aspeed-lpc-ctrl.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit eb105eace9521063c2b8786e09879043ec643d26 Author: Joel Stanley Date: Mon Feb 19 17:54:20 2018 +1030 dt-bindings: aspeed-lpc: Document LPC Host Interface Controller The LPC Host Interface Controller is part of a BMC SoC that is used for communication with the host. Reviewed-by: Rob Herring Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/mfd/aspeed-lpc.txt | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit c26dd817d99bc50acf2667ee27c39414a7a6638e Author: Baruch Siach Date: Thu Feb 22 21:44:53 2018 +0200 uapi: remove telephony headers ixjuser.h includes the telephony.h header. Other than that no kernel code uses any of these headers. The last user of the ixjuser.h header has been removed in commit 7326446c728 (Staging: remove telephony drivers), more than 5 years ago. Signed-off-by: Baruch Siach Signed-off-by: Greg Kroah-Hartman include/uapi/linux/ixjuser.h | 721 ----------------------------------------- include/uapi/linux/telephony.h | 263 --------------- 2 files changed, 984 deletions(-) commit e2fea54e4592b5dccd97fc338d12bba95a2d16f0 Author: Michael Moese Date: Mon Mar 5 16:24:21 2018 +0100 8250-men-mcb: add support for 16z025 and 16z057 Add support for two MEN UARTs (16z025 and 16z057) to the 8250_men_mcb driver. The 16z025 consists of up to four ports, the 16z057 has exactly four ports. Apart from that, all of them share the Port settings. Signed-off-by: Michael Moese Reported-by: Ben Turner Tested-by: Ben Turner Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_men_mcb.c | 125 ++++++++++++++++++++++++--------- drivers/tty/serial/8250/Kconfig | 5 +- 2 files changed, 94 insertions(+), 36 deletions(-) commit 474cca5fd894de99afc69274e8b25524ae62d7ee Author: Arvind Yadav Date: Mon Mar 12 17:06:53 2018 +0530 misc: ocxl: use put_device() instead of device_unregister() if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav Reviewed-by: Uwe Kleine-König Acked-by: Andrew Donnellan Signed-off-by: Greg Kroah-Hartman drivers/misc/ocxl/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fbe9f35dfcd83d94ec9bf4f68a9e0d7cc0550b5 Author: Arvind Yadav Date: Mon Mar 12 17:06:52 2018 +0530 misc: mic: Release reference count and memory for VOP device Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Release allocated memory for vop device in vop_release_dev(). Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/misc/mic/bus/vop_bus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1b723413aada7383a4b24ded93ed26eee1b3a3ca Author: Yisheng Xie Date: Mon Jan 29 19:48:16 2018 +0800 devres: combine function devm_ioremap* When I tried to use devm_ioremap function and review related code, I found devm_ioremap_* almost have the similar realize with each other, which can be combined. In the former version, I have tried to kill ioremap_cache to reduce the size of devres, which can not work for ioremap is not the same as ioremap_nocache in some ARCHs likes ia64. Therefore, as the suggestion of Christophe, I introduce a help function __devm_ioremap, let devm_ioremap* inline and call __devm_ioremap with different devm_ioremap_type. After apply the patch, the size of devres.o can be reduce from 8216 Bytes to 8052 Bytes in my compile environment. Suggested-by: Greg KH Suggested-by: Christophe LEROY Signed-off-by: Yisheng Xie Reviewed-by: Christophe LEROY Signed-off-by: Greg Kroah-Hartman lib/devres.c | 78 +++++++++++++++++++++++++++++------------------------------- 1 file changed, 38 insertions(+), 40 deletions(-) commit f87deada80fe483e2286e29cd866dc66ddc2b6bc Author: Gavin Schenk Date: Wed Feb 14 15:25:02 2018 +0100 siox: fix possible buffer overflow in device_add_store Width 20 given in format string is larger than destination buffer 'type[20]', use %19s to prevent overflowing it. Fixes: bbecb07fa0af ("siox: new driver framework for eckelmann SIOX") Cc: stable Reported-by: David Binderman Signed-off-by: Gavin Schenk Reviewed-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/siox/siox-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58eb5b6707477ff458db3ee522aac317da719e2a Author: Arnd Bergmann Date: Thu Mar 15 16:34:08 2018 +0100 pstore: fix crypto dependencies The new crypto API use causes some problems with Kconfig dependencies, including this link error: fs/pstore/platform.o: In function `pstore_register': platform.c:(.text+0x248): undefined reference to `crypto_has_alg' platform.c:(.text+0x2a0): undefined reference to `crypto_alloc_base' fs/pstore/platform.o: In function `pstore_unregister': platform.c:(.text+0x498): undefined reference to `crypto_destroy_tfm' crypto/lz4hc.o: In function `lz4hc_sdecompress': lz4hc.c:(.text+0x1a): undefined reference to `LZ4_decompress_safe' crypto/lz4hc.o: In function `lz4hc_decompress_crypto': lz4hc.c:(.text+0x5a): undefined reference to `LZ4_decompress_safe' crypto/lz4hc.o: In function `lz4hc_scompress': lz4hc.c:(.text+0xaa): undefined reference to `LZ4_compress_HC' crypto/lz4hc.o: In function `lz4hc_mod_init': lz4hc.c:(.init.text+0xf): undefined reference to `crypto_register_alg' lz4hc.c:(.init.text+0x1f): undefined reference to `crypto_register_scomp' lz4hc.c:(.init.text+0x2f): undefined reference to `crypto_unregister_alg' The problem is that with CONFIG_CRYPTO=m, we must not 'select CRYPTO_LZ4' from a bool symbol, or call crypto API functions from a built-in module. This turns the sub-options into 'tristate' ones so the dependencies are honored, and makes the pstore itself select the crypto core if necessary. Fixes: cb3bee0369bc ("pstore: Use crypto compress API") Signed-off-by: Arnd Bergmann Signed-off-by: Kees Cook fs/pstore/Kconfig | 19 ++++++++++--------- fs/pstore/platform.c | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 20 deletions(-) commit 3ba9faedc180097805613dac7a866432852cc4e5 Author: Alexandre Belloni Date: Tue Feb 6 23:05:34 2018 +0100 char: nvram: disable on ARM /dev/nvram was never meant to be used alongside the RTC CMOS driver from drivers/rtc as it already expose the NVRAM through another interface.. Anyway, the last defconfig to enable it properly was removed in 2010 so prevent ARM users from selecting it. Signed-off-by: Alexandre Belloni Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/char/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75a898051d3d2a105b3a0ca8be6e356429a68457 Author: Colin Ian King Date: Wed Feb 7 13:23:27 2018 +0000 misc: rtsx: make various functions static The functions rts5260_get_ocpstat, rts5260_get_ocpstat2, rts5260_clear_ocpstat, rts5260_process_ocp, rts5260_init_hw and rts5260_set_aspm are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'rts5260_get_ocpstat' was not declared. Should it be static? symbol 'rts5260_get_ocpstat2' was not declared. Should it be static? symbol 'rts5260_clear_ocpstat' was not declared. Should it be static? symbol 'rts5260_process_ocp' was not declared. Should it be static? symbol 'rts5260_init_hw' was not declared. Should it be static? symbol 'rts5260_set_aspm' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/misc/cardreader/rts5260.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f33ff110ef31bd250bb8a16cfc4e883aa2b36767 Author: Srivatsa S. Bhat Date: Mon Feb 5 18:25:27 2018 -0800 block, char_dev: Use correct format specifier for unsigned ints register_blkdev() and __register_chrdev_region() treat the major number as an unsigned int. So print it the same way to avoid absurd error statements such as: "... major requested (-1) is greater than the maximum (511) ..." (and also fix off-by-one bugs in the error prints). While at it, also update the comment describing register_blkdev(). Signed-off-by: Srivatsa S. Bhat Reviewed-by: Logan Gunthorpe Signed-off-by: Greg Kroah-Hartman block/genhd.c | 19 +++++++++++-------- fs/char_dev.c | 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) commit 652d703b21eb1caf2673c10bd58e4b0121dc7c50 Author: Srivatsa S. Bhat Date: Mon Feb 5 18:25:09 2018 -0800 char_dev: Fix off-by-one bugs in find_dynamic_major() CHRDEV_MAJOR_DYN_END and CHRDEV_MAJOR_DYN_EXT_END are valid major numbers. So fix the loop iteration to include them in the search for free major numbers. While at it, also remove a redundant if condition ("cd->major != i"), as it will never be true. Signed-off-by: Srivatsa S. Bhat Reviewed-by: Logan Gunthorpe Signed-off-by: Greg Kroah-Hartman fs/char_dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bd329f028f1cd51c7623c326147af07c6d832193 Author: Arvind Yadav Date: Fri Mar 9 14:09:59 2018 +0000 slimbus: core: use put_device() instead of kfree() Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/slimbus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48a44387189ce575cbfe48b5467884b6576cdaf2 Author: Arnd Bergmann Date: Thu Mar 15 17:49:40 2018 +0100 drm/amdkfd: fix uninitialized variable use When CONFIG_ACPI is disabled, we never initialize the acpi_table structure in kfd_create_crat_image_virtual: drivers/gpu/drm/amd/amdkfd/kfd_crat.c: In function 'kfd_create_crat_image_virtual': drivers/gpu/drm/amd/amdkfd/kfd_crat.c:888:40: error: 'acpi_table' may be used uninitialized in this function [-Werror=maybe-uninitialized] The undefined behavior also happens for any other acpi_get_table() failure, but then the compiler can't warn about it. This adds an error check that prevents the structure from being used in error, avoiding both the undefined behavior and the warning about it. Fixes: 520b8fb755cc ("drm/amdkfd: Add topology support for CPUs") Signed-off-by: Arnd Bergmann Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 219c7b06f3da9ac2b51ed671881b20f1b127daef Author: Mathieu Malaterre Date: Sat Mar 10 19:06:45 2018 +0100 powerpc: Mark the variable earlycon_acpi_spcr_enable maybe_unused Re-use the object-like macro EARLYCON_USED_OR_UNUSED to mark `earlycon_acpi_spcr_enable` as maybe_unused. Fix the following warning (treated as error in W=1) CC arch/powerpc/kernel/setup-common.o In file included from ./include/linux/serial_8250.h:14:0, from arch/powerpc/kernel/setup-common.c:33: ./include/linux/serial_core.h:382:19: error: ‘earlycon_acpi_spcr_enable’ defined but not used [-Werror=unused-const-variable=] static const bool earlycon_acpi_spcr_enable; ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Mathieu Malaterre Signed-off-by: Greg Kroah-Hartman include/linux/serial_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d8f68619e4f530e19c17e7c0d04f0a791891a77 Author: Bich HEMON Date: Thu Mar 15 08:44:46 2018 +0000 serial: stm32: fix initialization of RS485 mode Configure RS485 mode during port initialization. Fixes: 1bcda09d2910 ("serial: stm32: add support for RS485 hardware control mode") Signed-off-by: Bich Hemon Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 4 ++++ 1 file changed, 4 insertions(+) commit dcba51bbb9e0cc7f80d36eb20a033a4dff2ce9cc Author: Boris Brezillon Date: Mon Feb 12 22:03:08 2018 +0100 mtd: Get rid of unused fields in struct erase_info Some fields are not used by MTD drivers, users or core code. Moreover, those fields are not documented, so get rid of them to avoid any confusion. Signed-off-by: Boris Brezillon Reviewed-by: Richard Weinberger include/linux/mtd/mtd.h | 5 ----- 1 file changed, 5 deletions(-) commit c585da9f5f6186739f0b123b8a5b6353e425f51b Author: Boris Brezillon Date: Mon Feb 12 22:03:07 2018 +0100 mtd: Initialize ->fail_addr early in mtd_erase() mtd_erase() can return an error before ->fail_addr is initialized to MTD_FAIL_ADDR_UNKNOWN. Move this initialization at the very beginning of the function. Signed-off-by: Boris Brezillon Reviewed-by: Richard Weinberger drivers/mtd/mtdcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f0a37a8db81ea9c7034e0fff4a430b221019fc50 Author: Antonio Cardace Date: Mon Feb 12 18:41:30 2018 +0000 mtd: st_spi_fsm: use %*ph to print small buffer Use %*ph format to print small buffer as hex string. Suggested-by: Andy Shevchenko Signed-off-by: Antonio Cardace Signed-off-by: Boris Brezillon drivers/mtd/devices/st_spi_fsm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d40a18fec04ae6dc6f6760923aa5f487d1af2444 Author: Colin Ian King Date: Sat Jan 20 22:09:34 2018 +0000 mtd: block2mtd: remove redundant initialization of 'bdev' Pointer bdev is being initialized however this value is never read as bdev is assigned an updated value from the returned call to blkdev_get_by_path. Remove the redundant assignment. Cleans up clang warning: drivers/mtd/devices/block2mtd.c:228:23: warning: Value stored to 'bdev' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Boris Brezillon drivers/mtd/devices/block2mtd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85bd2de4f6d4f2bbf3839e08b94cb439f2a413ee Author: Arnd Bergmann Date: Tue Mar 13 13:11:43 2018 +0100 mailbox: tegra: relax TEGRA_HSP_MBOX Kconfig dependencies With the addition of the ARCH_TEGRA_194_SOC driver, we get a new Kconfig warning: warning: (ARCH_TEGRA_186_SOC && ARCH_TEGRA_194_SOC) selects TEGRA_HSP_MBOX which has unmet direct dependencies (MAILBOX && ARCH_TEGRA_186_SOC) It looks like the dependency is a bit too strict here, allowing the driver to be built for any Tegra chip avoids the problem. Fixes: 6f9ed07fde03 ("soc/tegra: Add Tegra194 SoC configuration option") Signed-off-by: Arnd Bergmann Acked-by: Thierry Reding Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6de84023d31bc40931d0a789b75964db8728e553 Author: Souptick Joarder Date: Sat Feb 17 15:11:13 2018 +0530 maillbox: bcm-flexrm-mailbox: Use dma_pool_zalloc() Use dma_pool_zalloc() instead of dma_pool_alloc + memset Signed-off-by: Souptick Joarder Signed-off-by: Jassi Brar drivers/mailbox/bcm-flexrm-mailbox.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 828814e6a4cf2337be7cfde0b35b60a13cbc1ee7 Author: Masahiro Yamada Date: Fri Mar 9 22:03:52 2018 +0900 mtd: rawnand: remove STANDALONE compile mode of nand_ecc This file can not be built independently any more. We would have to bring in more to resolve mtd_to_nand(mtd)->ecc.size, for example. It is difficult to notice a breakage since nobody compiles this mode. It is not worth fixing or maintaining in my opinion. Remove. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/nand_ecc.c | 20 -------------------- 1 file changed, 20 deletions(-) commit a3f73c8cf43858455a979d0f8354815e1443c496 Author: Michel Dänzer Date: Wed Mar 14 18:14:04 2018 +0100 drm/radeon: Don't turn off DP sink when disconnected Turning off the sink in this case causes various issues, because userspace expects it to stay on until it turns it off explicitly. Instead, turn the sink off and back on when a display is connected again. This dance seems necessary for link training to work correctly. Bugzilla: https://bugs.freedesktop.org/105308 Cc: stable@vger.kernel.org Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_connectors.c | 31 ++++++++++++------------------ 1 file changed, 12 insertions(+), 19 deletions(-) commit 3bea9c5885d923ab6b231c55f2bf6acaf648e316 Merge: 697a3a8 f40a1e3 Author: Arnd Bergmann Date: Thu Mar 15 16:23:33 2018 +0100 Merge tag 'imx-drivers-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/drivers Pull "i.MX drivers update for 4.17" from Shawn Guo: - Set GENPD_FLAG_ALWAYS_ON flag for ARM power domain to avoid incorrect power state in sysfs pm_genpd_summary output. * tag 'imx-drivers-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx: gpc: ARM power domain should be always-on commit 0240f307213e4fb238eeacbf4bc18c7a13ac4774 Merge: 8694360 dee5dee Author: Arnd Bergmann Date: Thu Mar 15 16:10:32 2018 +0100 Merge tag 'imx-soc-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/soc Pull "i.MX SoC changes for 4.17" from Shawn Guo: - Add i.MX 6SoloLiteLite (i.MX6SLL) SoC support on top of the existing i.MX6SL platform code. - Improve the SoC revision mapping by utilizing the MAJOR field of ANATOP DIGPROG register. - Add CPUIDLE_FLAG_TIMER_STOP flag for cpuidle ARM power off state, so that we can use ARM generic timer for some i.MX6 SoC. - Set low-power interrupt mask for i.MX25 to support STOP mode. - Drop EPIT driver as there is no user of it. - Simplify the error path of imx6_pm_get_base() a bit. * tag 'imx-soc-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: Add basic msl support for imx6sll ARM: imx: pm-imx6: Return the error directly ARM: imx: avic: set low-power interrupt mask for imx25 ARM: imx: Improve the soc revision calculation flow ARM: imx: add timer stop flag to ARM power off state ARM: imx: Remove epit support commit 8694360b281c91b419c1eb050b53422adcef218e Author: Neil Armstrong Date: Wed Mar 14 09:35:44 2018 +0100 ARM: configs: add OXNAS v6 defconfig This patchs adds the minimal defconfig for the OXNAS ARMv6 SoCs including the OX820 SoC and needed minimal configurations. Signed-off-by: Neil Armstrong Signed-off-by: Arnd Bergmann arch/arm/configs/oxnas_v6_defconfig | 93 +++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit eeea6953c42f85d19e565a4d3a49c1530f602e22 Author: Leon Romanovsky Date: Tue Mar 13 15:29:28 2018 +0200 RDMA/mlx5: Simplify clean and destroy MR calls The failure to destroy the MRs is printed on mlx5_core layer as error and it makes warning prints useless. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 40 ++++++++++------------------------------ 1 file changed, 10 insertions(+), 30 deletions(-) commit c985bd0ed732c8ce7a2e3d91988a09c5a9c1c0c9 Author: Leon Romanovsky Date: Tue Mar 13 15:29:27 2018 +0200 RDMA/mlx5: Guard ODP specific assignments with specific CONFIG "live" is needed for ODP only and is better to be guarded by appropriate CONFIG. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4638a3b2428a66db6e2d934ff200e254763f78a7 Author: Leon Romanovsky Date: Tue Mar 13 15:29:26 2018 +0200 RDMA/mlx5: Unify error flows in rereg MR failure paths According to the IBTA spec 1.3, the driver failure in MR reregister shall release old and new MRs. C11-20: If the CI returns any other error, the CI shall invalidate both "old" and "new" registrations, and release any associated resources. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit ea30f013765865f50fbfb6460aea2b18df19c978 Author: Leon Romanovsky Date: Tue Mar 13 15:29:25 2018 +0200 RDMA/mlx5: Return proper value for not-supported command Return -EOPNOTSUPP value to the user for unsupported reg_user_mr. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4289861d88d6c7b5e4c8cc7fe2ad6cdf0cdfc366 Author: Leon Romanovsky Date: Tue Mar 13 15:29:24 2018 +0200 RDMA/mlx5: Protect from NULL pointer derefence The mlx5_ib_alloc_implicit_mr() can fail to acquire pages and the returned mr pointer won't be valid. Ensure that it is not error prior to access. Cc: # 4.10 Fixes: 81713d3788d2 ("IB/mlx5: Add implicit MR support") Reported-by: Noa Osherovich Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 2 ++ 1 file changed, 2 insertions(+) commit 34e40f6338c730572874bc3d6fe330c7f2b63013 Author: Rex Zhu Date: Wed Mar 14 20:05:12 2018 +0800 drm/amd/pp: Rename file name cz_* to smu8_* Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 1991 -------------------- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.h | 311 --- drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c | 1991 ++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.h | 311 +++ drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 891 --------- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.h | 99 - drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c | 891 +++++++++ drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.h | 99 + 10 files changed, 3294 insertions(+), 3294 deletions(-) commit 47ce4a9f84d783ae0243a449de64a20c7fafe6a4 Author: Rex Zhu Date: Wed Mar 14 17:29:54 2018 +0800 drm/amd/pp: Replace function/struct name cz_* with smu8_* hw ip smu8 was used on CZ/ST, so use smu8 as the prefix of the function/struct name in powerplay. Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 890 ++++++++++++----------- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.h | 71 +- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 8 +- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 562 +++++++------- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.h | 82 +-- 5 files changed, 806 insertions(+), 807 deletions(-) commit ce1ace35b7b9e64fab7b0a261bee488e6d69c343 Author: Rex Zhu Date: Tue Mar 13 16:50:44 2018 +0800 drm/amd/pp: Remove unneeded void * casts in cz_hwmgr.c/cz_smumgr.c Removes unneeded void * casts for the following pointers: hwmgr->backend hwmgr->smu_backend Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 86 ++++++++++++------------ drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 34 +++++----- 2 files changed, 60 insertions(+), 60 deletions(-) commit 2bfc270cbffc6837213d34abfce2d1ad5c44a37b Author: Rex Zhu Date: Tue Mar 13 15:44:42 2018 +0800 drm/amd/pp: Mv cz uvd/vce pg/dpm functions to cz_hwmgr.c 1. delete cz_clockpowergating.c/.h files 2. mark uvd/vce dpm/pg functions static Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- .../drm/amd/powerplay/hwmgr/cz_clockpowergating.c | 131 --------------- .../drm/amd/powerplay/hwmgr/cz_clockpowergating.h | 33 ---- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 175 ++++++++++++++++----- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.h | 8 - 5 files changed, 140 insertions(+), 209 deletions(-) commit bcd8377b6f9810329ad958378a56c7ba0febf7f8 Author: Rex Zhu Date: Tue Mar 13 15:35:17 2018 +0800 drm/amd/pp: Remove dead header file pp_asicblocks.h Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher .../amd/powerplay/hwmgr/smu7_clockpowergating.h | 1 - drivers/gpu/drm/amd/powerplay/inc/pp_asicblocks.h | 47 ---------------------- 2 files changed, 48 deletions(-) commit 015aae53d095b03981fc8fcc5736000c38d8f53f Author: Rex Zhu Date: Tue Mar 13 15:27:06 2018 +0800 drm/amd/pp: Delete dead code on cz_clockpowergating.c Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher .../drm/amd/powerplay/hwmgr/cz_clockpowergating.c | 78 ---------------------- .../drm/amd/powerplay/hwmgr/cz_clockpowergating.h | 3 - 2 files changed, 81 deletions(-) commit 2dac5936e50084e42354c50b3d9723f5f0a2eb63 Author: Rex Zhu Date: Mon Mar 12 19:53:01 2018 +0800 drm/amdgpu: Call amdgpu_ucode_fini_bo in amd_powerplay.c make it symmetric with amdgpu_ucode_init_bo in amd_powerplay.c refine the "commit b22558bb4ff8fc9fe925222f90297d7a03a5fb20" Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) commit b905090d2bae2e6189511714a7b88691b439c5a1 Author: Rex Zhu Date: Mon Mar 12 19:52:23 2018 +0800 drm/amdgpu: Remove wrapper layer of smu ip functions 1. delete amdgpu_powerplay.c used for wrapping smu ip functions 2. delete struct pp_instance, 3. make struct hwmgr as the smu hw handle. Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 - drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 285 ----------- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.h | 33 -- drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 16 +- drivers/gpu/drm/amd/amdgpu/cik.c | 15 +- drivers/gpu/drm/amd/amdgpu/cik_dpm.h | 7 +- drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 16 +- drivers/gpu/drm/amd/amdgpu/si.c | 8 +- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 16 +- drivers/gpu/drm/amd/amdgpu/si_dpm.h | 3 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 5 +- drivers/gpu/drm/amd/amdgpu/vi.c | 13 +- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 3 +- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 611 ++++++++++-------------- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 50 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 16 +- drivers/gpu/drm/amd/powerplay/inc/pp_instance.h | 36 -- 19 files changed, 336 insertions(+), 804 deletions(-) commit 5b2a3d2c153eb49343091e5394201d4f7e5554ed Author: Rex Zhu Date: Wed Mar 14 15:38:48 2018 +0800 drm/amdgpu: Don't compared ip_block_type with ip_block_index Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5771632723aea8a7c994846b084bdb44000f82e6 Author: Rex Zhu Date: Mon Mar 12 19:50:38 2018 +0800 drm/amdgpu: Plus NULL function pointer check Reviewed-by: Alex Deucher Reviewed-by: Christian König Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 8e68627958f2fe9cf2f106656e007b8d3cd7cc47 Author: Rex Zhu Date: Fri Mar 9 19:52:26 2018 +0800 drm/amd/pp: Move helper functions to smu_help.c Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 513 +--------------------- drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c | 536 +++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.h | 180 ++++++++ drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 155 +------ 5 files changed, 723 insertions(+), 663 deletions(-) commit c425688520990d6cec769faaa97f4af45d361fd1 Author: Rex Zhu Date: Tue Mar 6 17:28:38 2018 +0800 drm/amd/pp: Replace rv_* with smu10_* Powerplay is for the hw ip smu, for RV, smu10 is used, so use smu10 as the prefix of the files name/function name. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 6 +- drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 1042 -------------------- drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.h | 322 ------ drivers/gpu/drm/amd/powerplay/hwmgr/rv_inc.h | 43 - drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 1042 ++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.h | 322 ++++++ drivers/gpu/drm/amd/powerplay/hwmgr/smu10_inc.h | 43 + drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 346 ------- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.h | 50 - .../gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c | 346 +++++++ .../gpu/drm/amd/powerplay/smumgr/smu10_smumgr.h | 50 + 14 files changed, 1809 insertions(+), 1809 deletions(-) commit 63fa37f0c512481bd942e84b596ad58e1d4c84e2 Author: Shreeya Patel Date: Thu Feb 22 22:01:22 2018 +0530 mtd: rawnand: Replace printk() with appropriate pr_*() macro Using pr_() is more concise than printk(KERN_). Replace printks having a log level with the appropriate pr_*() macros. Define pr_fmt() and remove other additional macros from the replaced printks. Signed-off-by: Shreeya Patel Signed-off-by: Boris Brezillon drivers/mtd/nand/raw/ams-delta.c | 4 +- drivers/mtd/nand/raw/cafe_nand.c | 4 +- drivers/mtd/nand/raw/cs553x_nand.c | 9 +++-- drivers/mtd/nand/raw/diskonchip.c | 76 +++++++++++++++++++----------------- drivers/mtd/nand/raw/fsl_elbc_nand.c | 4 +- drivers/mtd/nand/raw/fsl_ifc_nand.c | 2 +- drivers/mtd/nand/raw/nand_bch.c | 12 +++--- drivers/mtd/nand/raw/nandsim.c | 15 ++++--- drivers/mtd/nand/raw/r852.c | 5 ++- drivers/mtd/nand/raw/r852.h | 9 ++--- drivers/mtd/nand/raw/sh_flctl.c | 2 +- drivers/mtd/nand/raw/sm_common.c | 5 +-- 12 files changed, 75 insertions(+), 72 deletions(-) commit 567cc73a1be96ee84fb5b4086538297105835064 Author: Rex Zhu Date: Tue Mar 13 13:40:00 2018 +0800 drm/amd/pp: Fix function parameter not correct caused by "commit dcefb7668e5b4fb56099b16d1790cd3056322b03" Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d8a81d926ec76546d34efcb1fd104c117785000 Author: Rex Zhu Date: Wed Mar 7 16:14:38 2018 +0800 drm/amd/pp: Add rv_copy_table_from/to_smc to smu backend function table Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 3 +- drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 5 ++ drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 61 ++++++++++++++---------- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.h | 11 +---- 4 files changed, 44 insertions(+), 36 deletions(-) commit 56088be9afd5ae3bcf60232388751d0e58bd01e8 Author: Rex Zhu Date: Wed Mar 7 16:12:05 2018 +0800 drm/amd/pp: Add new smu backend function smc_table_manager Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 2 ++ drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 8 ++++++++ 3 files changed, 11 insertions(+) commit 7a67f4559dc25df128d934986cb8a980051cc804 Author: Rex Zhu Date: Fri Mar 9 19:00:14 2018 +0800 drm/amd/pp: Mark internal functions as static in rv_smumgr.c Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 88c1a70d582f6c2fc06ae65ea31844fd712d8b36 Author: Rex Zhu Date: Fri Mar 9 18:57:37 2018 +0800 drm/amd/pp: Add rv_read_arg_from_smc to smu backend function table Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 12 ++++++------ drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 12 +++++------- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.h | 1 - 3 files changed, 11 insertions(+), 14 deletions(-) commit 52911e03565c896be5a5bdb155df2d512e1b9f3e Author: Rex Zhu Date: Wed Mar 7 13:49:03 2018 +0800 drm/amd/pp: Remove meanless return value check in RV In send_message_to_smu helper functions, Print out the error code for debug if smu failed to response. The helper functions always return true, so no need to check their return value. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 72 +++++------------ drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 98 ++++++++---------------- 2 files changed, 53 insertions(+), 117 deletions(-) commit 7f8e66b60342f2dbefb86ce4d5a65e47b4acf70d Author: Rex Zhu Date: Wed Mar 7 13:32:45 2018 +0800 drm/amd/pp: Delete is_smc_ram_running function on RV 1. There is a race condition when another ip also use same register pairs 2. check once at boot up by GetDriverIfVersion message is sufficient to check SMU health. so delete is_smc_ram_running check. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 27 ------------------------ drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.h | 1 - 2 files changed, 28 deletions(-) commit 847e82615bce500e85480b55967c0159cedcb00e Author: Rex Zhu Date: Wed Mar 7 16:40:21 2018 +0800 drm/amd/pp: Clean up header file include smu7_smumgr.h should not be included in rv and vega, The common functions for all smu7 asics are put in smu_smumgr.c. Not include cgs interface in smumgr.c. the code used cgs interface has been deleted. Not include smu_ucode_xfer_vi.h in rv/vega Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 3 +-- drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 1 - drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 6 ++---- 3 files changed, 3 insertions(+), 7 deletions(-) commit fd06518d576ee3f0a51a9b1201f25608b774e60f Author: Rex Zhu Date: Wed Mar 14 16:14:59 2018 +0800 drm/amd/pp: Fix memory leak in error path in smumgr Free the backend structure if we fail to allocate device memory. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 32 ++++++++++++++-------- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 4 ++- .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 4 ++- .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 4 ++- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 18 +++++++----- .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 4 ++- 6 files changed, 43 insertions(+), 23 deletions(-) commit 116af45059139e8a156c9993bc4aa94625bd9c5e Author: Rex Zhu Date: Fri Mar 9 18:07:59 2018 +0800 drm/amd/pp: Simplified the avfs btc state on smu7 AVFS feature support/not support is enough to driver. so remove the complex define of the avfs btc state. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 14 +--- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 2 +- drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 21 ------ drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 70 ++++++------------ .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 83 +++++++--------------- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 4 +- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.h | 7 +- 7 files changed, 51 insertions(+), 150 deletions(-) commit 3bb271f3cabc464a94dd9fc24df234f3c18d139b Author: Andrey Grodzovsky Date: Wed Mar 14 14:07:49 2018 -0400 drm/amd/powerplay: Fix KASAN user after free on driver unload. Reusing local handle to initialize BO without resetting it to NULL is wrong since it causes amdgpu_bo_create_reserved to skip new BO creation and just reuse the given pointer for pinning. Reviewed-by: Rex Zhu Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 22 ++++------ .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 49 +++++++--------------- 2 files changed, 23 insertions(+), 48 deletions(-) commit b6d57f1da7e81cb056619d41cf015ebe306c296c Author: Jeffy Chen Date: Thu Mar 1 19:22:08 2018 +0800 iommu/omap: Increase group ref in .device_group() Increase group refcounting in omap_iommu_device_group(). Signed-off-by: Jeffy Chen Signed-off-by: Joerg Roedel drivers/iommu/omap-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b5c7ffe8d37d3434c3b9a984d4484542e96599b Merge: 206c12f 3719a1b Author: Arnd Bergmann Date: Thu Mar 15 15:54:24 2018 +0100 Merge tag 'aspeed-4.17-devicetree' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into next/dt Pull "ASPEED device tree updates for 4.17" from Joel Stanley: Updates to OpenPower BMC systems: A number of updates to use recently merged drivers, including moving to upstreamed IPMI BT nodes, a temp sensor for Romulus, and adding simple-reset for UARTs. This includes more of Palmetto's device tree, so that it's ever so close to booting the host with an upstream kernel. New machines: Add Qualcomm Centriq ARM64 server reference platform, which will run OpenBMC on an AST2500. * tag 'aspeed-4.17-devicetree' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: dts: aspeed: Add Qualcomm Centriq 2400 REP BMC ARM: dts: aspeed: romulus: Add w83773g temp sensor ARM: dts: aspeed: romulus: hog GPIOS7 ARM: dts: romulus: Remove MAX31785 device ARM: dts: palmetto: Request mux as per strapping configuration ARM: dts: palmetto: Enable rear UART ARM: dts: aspeed: Add LPC reset controller node ARM: dts: aspeed: Add Palmetto GPIO hogs ARM: dts: palmetto: Add LEDs and GPIO keys ARM: dts: aspeed: Add LPC clock phandles ARM: dts: aspeed-g5: Update LPC node ARM: dts: aspeed: Enable IPMI BT node on OpenPower machines ARM: dts: aspeed: Add IPMI BT node commit 26777d37216c976cf6fd196700133a38aa2c4b0f Author: Boris Brezillon Date: Sun Feb 18 17:05:16 2018 +0100 mtd: Move onenand code base to drivers/mtd/nand/onenand Move onenand code base to the drivers/mtd/nand directory in the hope that someday someone will patch it to use the generic NAND helpers. If it never happens, at least we'll have all NAND related support in a single directory and not spread over the drivers/mtd/ directory. Signed-off-by: Boris Brezillon MAINTAINERS | 2 +- drivers/mtd/Kconfig | 2 - drivers/mtd/Makefile | 2 +- drivers/mtd/nand/Kconfig | 2 + drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/onenand/Kconfig | 71 + drivers/mtd/nand/onenand/Makefile | 14 + drivers/mtd/nand/onenand/generic.c | 116 + drivers/mtd/nand/onenand/omap2.c | 660 +++++ drivers/mtd/nand/onenand/onenand_base.c | 4031 +++++++++++++++++++++++++++++++ drivers/mtd/nand/onenand/onenand_bbt.c | 248 ++ drivers/mtd/nand/onenand/samsung.c | 1012 ++++++++ drivers/mtd/nand/onenand/samsung.h | 59 + drivers/mtd/onenand/Kconfig | 71 - drivers/mtd/onenand/Makefile | 14 - drivers/mtd/onenand/generic.c | 116 - drivers/mtd/onenand/omap2.c | 660 ----- drivers/mtd/onenand/onenand_base.c | 4031 ------------------------------- drivers/mtd/onenand/onenand_bbt.c | 248 -- drivers/mtd/onenand/samsung.c | 1012 -------- drivers/mtd/onenand/samsung.h | 59 - 21 files changed, 6216 insertions(+), 6215 deletions(-) commit 801492c508f617d5bdc383b98b4a49d7de90c154 Author: Boris Brezillon Date: Sun Feb 18 17:05:15 2018 +0100 mtd: onenand: Get rid of comments giving the file path inside the file itself Some files add a comment giving the path of the file inside the Linux tree, which is pretty useless since the reader had to find the file to open it. Getting rid of these comments will also allow us to easily move these files around when needed. Signed-off-by: Boris Brezillon drivers/mtd/onenand/generic.c | 2 -- drivers/mtd/onenand/omap2.c | 2 -- drivers/mtd/onenand/onenand_base.c | 2 -- drivers/mtd/onenand/onenand_bbt.c | 2 -- 4 files changed, 8 deletions(-) commit 565977a3d929fc4427769117a8ac976ec16776d5 Author: Toshi Kani Date: Wed Mar 14 14:59:32 2018 -0600 x86/mm: Remove pointless checks in vmalloc_fault vmalloc_fault() sets user's pgd or p4d from the kernel page table. Once it's set, all tables underneath are identical. There is no point of following the same page table with two separate pointers and make sure they see the same with BUG(). Remove the pointless checks in vmalloc_fault(). Also rename the kernel pgd/p4d pointers to pgd_k/p4d_k so that their names are consistent in the file. Suggested-by: Andy Lutomirski Signed-off-by: Toshi Kani Signed-off-by: Thomas Gleixner Cc: linux-mm@kvack.org Cc: Borislav Petkov Cc: Gratian Crisan Link: https://lkml.kernel.org/r/20180314205932.7193-1-toshi.kani@hpe.com arch/x86/mm/fault.c | 56 ++++++++++++++++------------------------------------- 1 file changed, 17 insertions(+), 39 deletions(-) commit 90ca3859f5ea90050d00e695355934b37357e7bb Author: Gary R Hook Date: Thu Mar 8 18:34:41 2018 -0600 iommu/amd: Use dev_err to send events to the system log Remove printk and use a more preferable error logging function. Signed-off-by: Gary R Hook Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 55 ++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 27 deletions(-) commit 7f9f76b10dbe3f2585a21699312f74ed2b544b84 Author: Katsuhiro Suzuki Date: Wed Mar 14 14:26:58 2018 +0900 ARM: dts: uniphier: add sound node for PXs2 This patch adds audio controller, external codec and simple card node of UniPhier AIO sound system for PXs2 SoCs. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-pxs2-gentil.dts | 24 +++++++++++++ arch/arm/boot/dts/uniphier-pxs2-vodka.dts | 37 ++++++++++++++++++++ arch/arm/boot/dts/uniphier-pxs2.dtsi | 54 ++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+) commit 05f7e3d18673a35d1f6f2a7b61c5b0b895324b76 Author: Masahiro Yamada Date: Sat Mar 10 22:18:41 2018 +0900 arm64: dts: uniphier: use proper SPDX-License-Identifier style According to Documentation/process/license-rules.rst, move the SPDX License Identifier to the very top of the file. I used C++ comment style not only for the SPDX line but for the entire block because this seems Linus' preference [1]. I also dropped the parentheses to follow the examples in that document. [1] https://lkml.org/lkml/2017/11/25/133 Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts | 16 +++++++--------- arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts | 14 ++++++-------- arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 14 ++++++-------- arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts | 16 +++++++--------- arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts | 14 ++++++-------- arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 14 ++++++-------- arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dts | 14 ++++++-------- arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 14 ++++++-------- 8 files changed, 50 insertions(+), 66 deletions(-) commit ea566a4b61b98ad98a959db59acb1243b7a9952b Author: Masahiro Yamada Date: Sat Mar 10 22:18:01 2018 +0900 ARM: dts: uniphier: use proper SPDX-License-Identifier style According to Documentation/process/license-rules.rst, move the SPDX License Identifier to the very top of the file. I used C++ comment style not only for the SPDX line but for the entire block because this seems Linus' preference [1]. I also dropped the parentheses to follow the examples in that document. [1] https://lkml.org/lkml/2017/11/25/133 Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ld4-ref.dts | 14 ++++++-------- arch/arm/boot/dts/uniphier-ld4.dtsi | 14 ++++++-------- arch/arm/boot/dts/uniphier-ld6b-ref.dts | 14 ++++++-------- arch/arm/boot/dts/uniphier-ld6b.dtsi | 14 ++++++-------- arch/arm/boot/dts/uniphier-pinctrl.dtsi | 14 ++++++-------- arch/arm/boot/dts/uniphier-pro4-ace.dts | 14 ++++++-------- arch/arm/boot/dts/uniphier-pro4-ref.dts | 14 ++++++-------- arch/arm/boot/dts/uniphier-pro4-sanji.dts | 14 ++++++-------- arch/arm/boot/dts/uniphier-pro4.dtsi | 14 ++++++-------- arch/arm/boot/dts/uniphier-pro5.dtsi | 14 ++++++-------- arch/arm/boot/dts/uniphier-pxs2-gentil.dts | 14 ++++++-------- arch/arm/boot/dts/uniphier-pxs2-vodka.dts | 14 ++++++-------- arch/arm/boot/dts/uniphier-pxs2.dtsi | 14 ++++++-------- arch/arm/boot/dts/uniphier-ref-daughter.dtsi | 14 ++++++-------- arch/arm/boot/dts/uniphier-sld8-ref.dts | 14 ++++++-------- arch/arm/boot/dts/uniphier-sld8.dtsi | 14 ++++++-------- arch/arm/boot/dts/uniphier-support-card.dtsi | 14 ++++++-------- 17 files changed, 102 insertions(+), 136 deletions(-) commit 8191f4db123455e90a6508b13d87aa21f8ca6f1d Author: Katsuhiro Suzuki Date: Wed Feb 28 18:32:47 2018 +0900 arm64: dts: uniphier: add fixed regulators for audio codec This patch adds regulators that have fixed voltage for audio codec on UniPhier LD11/20 Global boards. This patch fixes warnings about TAS57xx audio codec such as "tas571x 0-001b: 0-001b supply AVDD not found, using dummy regulator". Signed-off-by: Katsuhiro Suzuki Signed-off-by: Masahiro Yamada .../boot/dts/socionext/uniphier-ld11-global.dts | 20 ++++++++++++++++++++ .../boot/dts/socionext/uniphier-ld20-global.dts | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) commit c73730ee4c9a2ef3d5f45f31cf780a15c02927a5 Author: Kunihiko Hayashi Date: Wed Feb 14 18:30:29 2018 +0900 arm64: dts: uniphier: add AVE ethernet node Add nodes of the AVE ethernet controller for LD11 and LD20 SoCs and the boards. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts | 11 +++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts | 11 +++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 16 ++++++++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts | 13 +++++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts | 11 +++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 18 ++++++++++++++++++ 6 files changed, 80 insertions(+) commit e3cc931921d25bd213452e7b645295e87770a9b3 Author: Kunihiko Hayashi Date: Wed Feb 14 18:30:28 2018 +0900 ARM: dts: uniphier: add AVE ethernet node Add nodes of the AVE ethernet controller for Pro4, PXs2, LD6b SoCs and the boards. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ld6b-ref.dts | 11 +++++++++++ arch/arm/boot/dts/uniphier-pro4-ace.dts | 11 +++++++++++ arch/arm/boot/dts/uniphier-pro4-ref.dts | 11 +++++++++++ arch/arm/boot/dts/uniphier-pro4-sanji.dts | 11 +++++++++++ arch/arm/boot/dts/uniphier-pro4.dtsi | 18 ++++++++++++++++++ arch/arm/boot/dts/uniphier-pxs2-gentil.dts | 11 +++++++++++ arch/arm/boot/dts/uniphier-pxs2-vodka.dts | 11 +++++++++++ arch/arm/boot/dts/uniphier-pxs2.dtsi | 18 ++++++++++++++++++ 8 files changed, 102 insertions(+) commit d812b0d500040b8c7b9c7a93f29be0a010eb09d1 Author: Johannes Thumshirn Date: Wed Mar 14 19:25:08 2018 +0100 device-dax: use module_nd_driver Use module_nd_driver() instead of having module_init() and module_exit() callbacks which just call nd_driver_register() and nd_driver_unregister(). Signed-off-by: Johannes Thumshirn Signed-off-by: Dan Williams drivers/dax/pmem.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 03e908437d007d8a8583c4ea19c737fff2ef6edc Author: Johannes Thumshirn Date: Wed Mar 14 19:25:07 2018 +0100 libnvdimm, pmem: use module_nd_driver Use module_nd_driver() instead of having module_init() and module_exit() callbacks which just call nd_driver_register() and nd_driver_unregister(). Signed-off-by: Johannes Thumshirn Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit acc625de6612e74eb88ae9f97b345c4fb8af6014 Author: Katsuhiro Suzuki Date: Tue Feb 13 22:01:56 2018 +0900 arm64: dts: uniphier: add compress audio out for LD11/LD20 This patch adds compress audio node for S/PDIF on UniPhier LD11/20 global boards. And adds settings of AIO for it. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts | 18 +++++++++++++++++- arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) commit 5aad7e2d270ccfbeeadc6bd8d89cd2d7d5c34117 Author: Katsuhiro Suzuki Date: Tue Feb 13 22:01:55 2018 +0900 arm64: dts: uniphier: add speaker out for LD11/LD20 boards This patch adds codec node for TI TAS571x on UniPhier LD11/20 global boards. And adds settings of AIO for speaker out. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Masahiro Yamada .../boot/dts/socionext/uniphier-ld11-global.dts | 22 ++++++++++++++++++++++ .../boot/dts/socionext/uniphier-ld20-global.dts | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) commit fb21a0acaa2b7f6ac76d4b3b33aa6b0312a09a49 Author: Katsuhiro Suzuki Date: Tue Feb 13 22:01:54 2018 +0900 arm64: dts: uniphier: add sound node This patch adds audio controller, codec and simple card node of UniPhier AIO sound system for LD11/20 SoCs. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Masahiro Yamada .../boot/dts/socionext/uniphier-ld11-global.dts | 24 +++++ arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 94 +++++++++++++++++++ .../boot/dts/socionext/uniphier-ld20-global.dts | 24 +++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 103 +++++++++++++++++++++ 4 files changed, 245 insertions(+) commit 71cfdd0bad3ad91680e6b82cac634154cf56376e Author: Johannes Thumshirn Date: Wed Mar 14 19:25:06 2018 +0100 libnvdimm: provide module_nd_driver wrapper Provide a module_nd_driver() wrapper over simple nd_driver_register() nd_driver_unregister() combinations in module_init() and module_exit() respectively. Note an explicit nd_driver_unregister() had to be implemented as nd bus drivers did call device_unregister() direcly in the module_exit() function. Signed-off-by: Johannes Thumshirn Signed-off-by: Dan Williams include/linux/nd.h | 6 ++++++ 1 file changed, 6 insertions(+) commit ee6ed857c8058177614b21a0efbf27e02c4e2a77 Author: Andreas Gruenbacher Date: Thu Mar 15 07:17:17 2018 -0700 gfs2: gfs2_iomap_end tracepoint: log block address In the gfs2_iomap_end tracepoint, log the physical block address, just as in the gfs2_bmap tracepoint. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/trace_gfs2.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 606c18372d539d194df2b2d181d3b1b790ad72f9 Author: Katsuhiro Suzuki Date: Wed Mar 14 14:17:32 2018 +0900 ARM: dts: uniphier: add audio in/out pin-mux node The UniPhier AIO audio system needs I2S data in/out lines and clock signal pins to connect external codec chip. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-pinctrl.dtsi | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit bbe4b3af9d9e3172fb9aa1f8dcdfaedcb381fc64 Author: Lu Baolu Date: Sat Feb 24 13:42:27 2018 +0800 iommu/vt-d: Fix a potential memory leak A memory block was allocated in intel_svm_bind_mm() but never freed in a failure path. This patch fixes this by free it to avoid memory leakage. Cc: Ashok Raj Cc: Jacob Pan Cc: # v4.4+ Signed-off-by: Lu Baolu Fixes: 2f26e0a9c9860 ('iommu/vt-d: Add basic SVM PASID support') Signed-off-by: Joerg Roedel drivers/iommu/intel-svm.c | 1 + 1 file changed, 1 insertion(+) commit 1a4e90f25b2ceca3152efa6f7a9e0565c52e34c1 Author: Marc Zyngier Date: Tue Feb 20 20:25:04 2018 +0000 iommu/rockchip: Perform a reset on shutdown Trying to do a kexec whilst the iommus are still on is proving to be a challenging exercise. It is terribly unsafe, as we're reusing the memory allocated for the page tables, leading to a likely crash. Let's implement a shutdown method that will at least try to stop DMA from going crazy behind our back. Note that we need to be extra cautious when doing so, as the IOMMU may not be clocked if controlled by a another master, as typical on Rockchip system. Suggested-by: Robin Murphy Signed-off-by: Marc Zyngier Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit a677b67b6994e491f564f9ef773c49a1cd0d9720 Merge: 8ef0797 c658dc5 Author: Ulf Hansson Date: Thu Mar 15 14:43:28 2018 +0100 Merge branch 'fixes' into next commit 8ef0797a898b166016d486d6f30ce6044f800ddb Author: Dirk Behme Date: Wed Mar 14 14:50:09 2018 +0000 mmc: core: Disable HPI for certain Micron (Numonyx) eMMC cards Certain Micron eMMC v4.5 cards might get broken when HPI feature is used and hence this patch disables the HPI feature for such buggy cards. In U-Boot, these cards are reported as Manufacturer: Micron (ID: 0xFE) OEM: 0x4E Name: MMC32G Revision: 19 (0x13) Serial: 959241022 Manufact. date: 8/2015 (0x82) CRC: 0x00 Tran Speed: 52000000 Rd Block Len: 512 MMC version 4.5 High Capacity: Yes Capacity: 29.1 GiB Boot Partition Size: 16 MiB Bus Width: 8-bit According to JEDEC JEP106 manufacturer 0xFE is Numonyx, which was bought by Micron. Signed-off-by: Dirk Behme Signed-off-by: Mark Craske Cc: # 4.8+ Signed-off-by: Ulf Hansson drivers/mmc/core/card.h | 1 + drivers/mmc/core/quirks.h | 6 ++++++ 2 files changed, 7 insertions(+) commit a0e9576634f0bcfa5c4d8efdcf8c9b28298d7570 Author: Bastian Stender Date: Thu Mar 8 15:08:11 2018 +0100 mmc: block: fix updating ext_csd caches on ioctl call PARTITION_CONFIG is cached in mmc_card->ext_csd.part_config and the currently active partition in mmc_blk_data->part_curr. These caches do not always reflect changes if the ioctl call modifies the PARTITION_CONFIG registers, e.g. by changing BOOT_PARTITION_ENABLE. Write the PARTITION_CONFIG value extracted from the ioctl call to the cache and update the currently active partition accordingly. This ensures that the user space cannot change the values behind the kernel's back. The next call to mmc_blk_part_switch() will operate on the data set by the ioctl and reflect the changes appropriately. Signed-off-by: Bastian Stender Signed-off-by: Jan Luebbe Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit cb1214d27a3ef8817a7a208d546aa9f947bf5f7d Author: Maxime Ripard Date: Thu Mar 8 15:52:53 2018 +0100 mmc: sunxi: Set our device drvdata earlier As soon as the pm_runtime_enable hook is called, our runtime_suspend and runtime_resume hooks can be called as well. However, we only set the device drvdata that we will use after we have registered into the MMC core. Move that earlier so that we don't have a race that could lead to a crash. Signed-off-by: Maxime Ripard Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d81819419b2be4eee6643681ce0366856a772ba9 Author: Maxime Ripard Date: Thu Mar 8 15:52:52 2018 +0100 mmc: sunxi: Move the reset deassertion before enabling the clocks As per Allwinner guidelines, the reset line should be deasserted before turning the clocks on. Implement it in our driver as well. Signed-off-by: Maxime Ripard Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 774c010350a16f44705971e8aff457580628c76e Author: Maxime Ripard Date: Thu Mar 8 15:52:51 2018 +0100 mmc: sunxi: Move resources management to separate functions We've had all our resources management, and especially the clocks and reset sequence, done directly as part of the probe. As we want to implement runtime_pm, we'll obviously want to have that moved outside of the probe so that we can call do it in our runtime suspend and resume hooks without too much duplication. Signed-off-by: Maxime Ripard Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 142 +++++++++++++++++++++++++------------------ 1 file changed, 82 insertions(+), 60 deletions(-) commit e382ab741252471383e9990583258e3054f66963 Author: tianshuliang Date: Thu Mar 8 09:01:34 2018 +0800 mmc: dw_mmc: add support for hi3798cv200 specific extensions of dw-mshc Hi3798CV200 SoC extends the dw-mshc controller for additional clock and bus control. Add support for these extensions. Signed-off-by: tianshuliang Signed-off-by: Jiancheng Xue Signed-off-by: Shawn Guo Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 9 ++ drivers/mmc/host/Makefile | 1 + drivers/mmc/host/dw_mmc-hi3798cv200.c | 202 ++++++++++++++++++++++++++++++++++ drivers/mmc/host/dw_mmc.h | 6 + 4 files changed, 218 insertions(+) commit 8a9cdf985258d3409e5647fbcb8a573da35ee4f8 Author: tianshuliang Date: Thu Mar 8 09:01:33 2018 +0800 dt-bindings: mmc: add bindings for hi3798cv200-dw-mshc Hisilicon hi3798cv200 SoC extends the dw-mshc controller for additional clock control. Add device tree bindings for hi3798cv200-dw-mshc. Signed-off-by: tianshuliang Signed-off-by: Jiancheng Xue Signed-off-by: Shawn Guo Reviewed-by: Rob Herring Signed-off-by: Ulf Hansson .../bindings/mmc/hi3798cv200-dw-mshc.txt | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 974e85e90c84a32f49b70c6615f1e8f156f38a3c Author: Harish Jenny K N Date: Wed Mar 7 10:31:42 2018 +0530 mmc: core: Export card RCA register via sysfs This patch exports RCA register to sysfs which will help in reading the disk identification information. Reviewed-by: Shawn Lin Signed-off-by: Harish Jenny K N Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 2 ++ drivers/mmc/core/sd.c | 2 ++ 2 files changed, 4 insertions(+) commit 82d1f1178a8578599fb52e697ee8ce8b68f1efd0 Author: Andy Shevchenko Date: Thu Mar 15 15:23:43 2018 +0200 lib/kobject: Join string literals back There is no need to split string literals. Moreover, it would be simpler to grep for an actual code line, when debugging, by using almost any part of the string literal in question. While here, replace printk(LEVEL) by pr_lvl() macros. No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman lib/kobject.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) commit 3aaba245dfa33270a464d3098b8cce2a2af32784 Author: Arvind Yadav Date: Sun Mar 11 11:25:51 2018 +0530 driver core: cpu: use put_device() if device_register fail if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/base/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c1cc0d51140fbcbb3c8cb08ee7e92020dda9c1af Author: Arvind Yadav Date: Sun Mar 11 11:25:50 2018 +0530 driver core: node: use put_device() if device_register fail if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/base/node.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c8ae1674cd0d688661a8b85b8b2d940516933322 Author: Arvind Yadav Date: Sun Mar 11 11:25:49 2018 +0530 driver core: platform: use put_device() if device_register fail if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/base/platform.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ef49ec1dc35112b17f7e928aa08fcab60240bf1d Author: Arvind Yadav Date: Sun Mar 11 11:25:48 2018 +0530 base: soc: use put_device() instead of kfree() Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/base/soc.c | 2 ++ 1 file changed, 2 insertions(+) commit 9de9a449482677a75f1edd2049268a7efc40fc96 Author: Gaku Inami Date: Tue Feb 13 11:06:40 2018 +0900 Revert "base: arch_topology: fix section mismatch build warnings" This reverts commit 452562abb5b7 ("base: arch_topology: fix section mismatch build warnings"). It causes the notifier call hangs in some use-cases. In some cases with using maxcpus, some of cpus are booted first and then the remaining cpus are booted. As an example, some users who want to realize fast boot up often use the following procedure. 1) Define all CPUs on device tree (CA57x4 + CA53x4) 2) Add "maxcpus=4" in bootargs 3) Kernel boot up with CA57x4 4) After kernel boot up, CA53x4 is booted from user When kernel init was finished, CPUFREQ_POLICY_NOTIFIER was not still unregisterd. This means that "__init init_cpu_capacity_callback()" will be called after kernel init sequence. To avoid this problem, it needs to remove __init{,data} annotations by reverting this commit. Also, this commit was needed to fix kernel compile issue below. However, this issue was also fixed by another patch: commit 82d8ba717ccb ("arch_topology: Fix section miss match warning due to free_raw_capacity()") in v4.15 as well. Whereas commit 452562abb5b7 added all the missing __init annotations, commit 82d8ba717ccb removed it from free_raw_capacity(). WARNING: vmlinux.o(.text+0x548f24): Section mismatch in reference from the function init_cpu_capacity_callback() to the variable .init.text:$x The function init_cpu_capacity_callback() references the variable __init $x. This is often because init_cpu_capacity_callback lacks a __init annotation or the annotation of $x is wrong. Fixes: 82d8ba717ccb ("arch_topology: Fix section miss match warning due to free_raw_capacity()") Cc: stable Signed-off-by: Gaku Inami Reviewed-by: Dietmar Eggemann Tested-by: Dietmar Eggemann Acked-by: Sudeep Holla Signed-off-by: Greg Kroah-Hartman drivers/base/arch_topology.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8de602885cd8bf56b05b668aee574bd8a241c33f Author: Ulf Magnusson Date: Mon Feb 5 02:21:16 2018 +0100 misc: atmel: Remove CPU_AT32AP700X (AVR32) reference The CPU_AT32AP700X symbol symbol went away when when AVR32 was removed in commit 26202873bb51 ("avr32: remove support for AVR32 architecture") Remove the prompt from ATMEL_TCB_CLKSRC_BLOCK. The prompt condition could never be satisfied now. Discovered with the https://github.com/ulfalizer/Kconfiglib/blob/master/examples/list_undefined.py script. Signed-off-by: Ulf Magnusson Signed-off-by: Greg Kroah-Hartman drivers/misc/Kconfig | 1 - 1 file changed, 1 deletion(-) commit eb5ecd1a40e2098f805fb63cb07817ac48826e40 Author: Suravee Suthikulpanit Date: Wed Feb 21 14:19:45 2018 +0700 iommu/amd: Add support for fast IOTLB flushing Since AMD IOMMU driver currently flushes all TLB entries when page size is more than one, use the same interface for both iommu_ops.flush_iotlb_all() and iommu_ops.iotlb_sync(). Cc: Joerg Roedel Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit e36df28f532f882965404d58e240f2e058b61f45 Author: Dave Young Date: Tue Feb 13 15:28:34 2018 +0800 printk: move dump stack related code to lib/dump_stack.c dump_stack related stuff should belong to lib/dump_stack.c thus move them there. Also conditionally compile lib/dump_stack.c since dump_stack code does not make sense if printk is disabled. Link: http://lkml.kernel.org/r/20180213072834.GA24784@dhcp-128-65.nay.redhat.com To: Steven Rostedt Cc: linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org Cc: Andi Kleen Signed-off-by: Dave Young Suggested-by: Steven Rostedt Suggested-by: Sergey Senozhatsky Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek include/linux/printk.h | 7 ++++-- kernel/printk/printk.c | 60 -------------------------------------------------- lib/Makefile | 3 ++- lib/dump_stack.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 63 deletions(-) commit 9f446d83b233d2773fd934eed41d795484a08422 Author: Dmitry Osipenko Date: Thu Mar 15 04:00:25 2018 +0300 drm/tegra: dc: Dedicate overlay plane to cursor on older Tegra's Older Tegra's do not support RGBA format for the cursor, but instead overlay plane could be used for it. Since there is no much use for the overlays on a regular desktop and HW-accelerated cursor is much better than a SW cursor, let's dedicate one overlay plane to the mouse cursor. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dc.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) commit 5e2e86f12cba9591b4ad3c1e7f76e149319af9e7 Author: Dmitry Osipenko Date: Thu Mar 15 11:37:05 2018 +0100 drm/tegra: plane: Make tegra_plane_get_overlap_index() static This function is not used outside of the file and can be static. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/plane.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 13cc36d76bc4f5a9801ae32630bc8240ba0cc522 Author: Benjamin Gaignard Date: Fri Mar 9 10:42:50 2018 -0800 x86/rtc: Stop using deprecated functions rtc_time_to_tm() and rtc_tm_to_time() are deprecated because they rely on 32bits variables and that will make rtc break in y2038/2016. Use the proper y2038 safe functions. Signed-off-by: Benjamin Gaignard Signed-off-by: John Stultz Signed-off-by: Thomas Gleixner Cc: Prarit Bhargava Cc: Arnd Bergmann Cc: Richard Cochran Cc: Stephen Boyd Cc: Miroslav Lichvar Cc: Alexandre Belloni Link: https://lkml.kernel.org/r/1520620971-9567-5-git-send-email-john.stultz@linaro.org arch/x86/kernel/rtc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7022a4a0ece6122e337e1c23af91128398209c8d Author: Fabio Estevam Date: Fri Feb 16 18:16:10 2018 -0200 drm/bridge: dw-hdmi: Remove unused hdmi_enable_overflow_interrupts() The cable_plugin member never receives an assignment, so it is always false, which causes hdmi_enable_overflow_interrupts() to never be called as per the logic below: if (hdmi->cable_plugin && hdmi->sink_is_hdmi) hdmi_enable_overflow_interrupts(hdmi); This has been the case since the driver was originally introduced in commit 9aaf880ed4ee ("imx-drm: Add mx6 hdmi transmitter support"). Remove the cable_plugin element and the hdmi_enable_overflow_interrupts() function that is never called. Signed-off-by: Fabio Estevam Tested-by: Laurent Pinchart # On R-Car H3 Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1518812170-22687-1-git-send-email-festevam@gmail.com drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 9 --------- 1 file changed, 9 deletions(-) commit e060d376cc6185dde7e852c028de36614e2201fa Author: Wolfram Sang Date: Mon Mar 5 21:48:42 2018 +0100 mmc: renesas_sdhi: fix WP detection Commit "mmc: renesas_sdhi: use MMC_CAP2_NO_WRITE_PROTECT instead of TMIO own flag" activated MMC_CAP2_NO_WRITE_PROTECT for Renesas SDHI which incorrectly disabled WP altogether instead of only disabling the internal mechanism. Since the whole WP handling has been reworked, we can simply disable this capability to re-enable WP GPIOs. Signed-off-by: Wolfram Sang Reviewed-by: Masahiro Yamada Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_internal_dmac.c | 1 - drivers/mmc/host/renesas_sdhi_sys_dmac.c | 3 --- 2 files changed, 4 deletions(-) commit 97a0c3134f0594389fac704759f83c38ac7d1c17 Author: Markus Elfring Date: Mon Mar 5 11:33:21 2018 +0100 mmc: core: Use memdup_user() rather than duplicating its implementation Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit e988867fd774d00aeaf5d3c332032bf5b97a4147 Author: John Keeping Date: Thu Mar 1 10:36:25 2018 +0000 mmc: dw_mmc-rockchip: correct property names in debug Following up the device tree fixed in commits e78c637127ee ("ARM: dts: rockchip: Fix DWMMC clocks") and ca9eee95a2de ("arm64: dts: rockchip: Fix DWMMC clocks", 2018-02-15), avoid confusion by using the correct property name in the debug output if clocks are not found. Signed-off-by: John Keeping Reviewed-by: Robin Murphy Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3715ce57f4d26d09fc1813d157286abc5aa319a5 Author: Shawn Lin Date: Tue Feb 27 09:26:35 2018 +0800 mmc: sd: Remove redundant err assignment from mmc_read_switch Variable err would be firstly initialized by the return value of mmc_sd_switch(). Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/sd.c | 2 -- 1 file changed, 2 deletions(-) commit 1e178270dfcf2b576b0060b382836219dcda83b5 Author: Shawn Lin Date: Tue Feb 27 09:26:34 2018 +0800 mmc: sdio: Check the return value of sdio_enable_4bit_bus Since we could move card->host->caps & MMC_CAP_4_BIT_DATA ahead of mmc_sdio_init_uhs_card, in mmc_host_uhs(). So there we could save this bit to check that. Also, if the process of sdio_enable_4bit_bus goes wrong, we should bails out early. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/sdio.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit d6743a8a1ae38269a41094ad14d7ef86199f661d Author: Shawn Lin Date: Tue Feb 27 08:49:25 2018 +0800 mmc: core: Don't try UHS-I mode if 4-bit mode isn't supported Per SD specification physical layer v4.0, section 3.9.4, it says "UHS-I supports only 4-bit mode. Host shall select 4-bit mode by ACMD6. However mmc_sd_init_uhs_card() still go ahead to initialize the cards anyway, whether card or host won't support 4-bit mode. This breaks the platforms which could support UHS-I mode but on some certain boards only support 1-bit mode with a UHS-I card inserted, as all the tuning process is broken due to this. Alternatively, we should check the return value from mmc_set_bus_width() to see if host could finish the request to switch the bus width on its side. But that needs more thing to do than this patch that just bails out early to try high speed mode if 4-bit mode isn't available for whatever reason. And this patch could also fix the same problem for sdio since R4_18V_PRESENT won't be set for ocr when mmc_sdio_init_card() finds mmc_host_uhs() is false. Note that this patch doesn't keep the checking of card->scr.sda_spec3 and comparing card->scr.bus_widths with SD_SCR_BUS_WIDTH_4 within mmc_sd_init_uhs_card() since if the sd cards response with SD_ROCR_S18A, it definitely supports UHS-I mode, which implicitly means these checkings are always true. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/host.h | 3 ++- drivers/mmc/core/sd.c | 16 +++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) commit 812dd0202379a242f764f75aa30abfbef4398ba4 Author: Jaehoon Chung Date: Fri Feb 23 15:41:38 2018 +0900 arm64: dts: hi3660: remove 'num-slots' property for dwmmc Since 'num-slots' had already deprecated, remove the property in device-tree file. Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 09cdb2894a804913f7c2258a05fb3f43f26bd06d Author: Jaehoon Chung Date: Fri Feb 23 15:41:37 2018 +0900 ARM: dts: lpc18xx: remove 'num-slots' property for dwmmc Since 'num-slots' had already deprecated, remove the property in device-tree file. Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson arch/arm/boot/dts/lpc18xx.dtsi | 1 - 1 file changed, 1 deletion(-) commit a6306eb6a5f7038a8ba2eefb254efe4ead5ce05e Author: Jaehoon Chung Date: Fri Feb 23 15:41:36 2018 +0900 arm64: dts: stratix10: remove 'num-slots' property for dwmmc Since 'num-slots' had already deprecated, remove the property in device-tree file. Signed-off-by: Jaehoon Chung Acked-by: Dinh Nguyen Signed-off-by: Ulf Hansson arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts | 1 - 1 file changed, 1 deletion(-) commit 984f624e94b42440998cc6e4a1a6fed4d9c74888 Author: Jaehoon Chung Date: Fri Feb 23 15:41:35 2018 +0900 ARM: dts: socfpga: remove 'num-slots' property for dwmmc Since 'num-slots' had already deprecated, remove the property in device-tree file. Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson arch/arm/boot/dts/socfpga_arria10_socdk_sdmmc.dts | 1 - arch/arm/boot/dts/socfpga_arria5.dtsi | 1 - arch/arm/boot/dts/socfpga_cyclone5.dtsi | 1 - arch/arm/boot/dts/socfpga_vt.dts | 1 - 4 files changed, 4 deletions(-) commit 01b653c2199b55ea798f9b4e224d055317524d8f Author: Jaehoon Chung Date: Fri Feb 23 15:41:34 2018 +0900 mmc: dw_mmc: remove the deprecated "num-slots" 'num-slots' property had already deprecated. Remove the 'nom-slots' property that is kept to maintain the compatibility. Signed-off-by: Jaehoon Chung Reviewed-by: Rob Herring Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | 5 ----- drivers/mmc/host/dw_mmc-pci.c | 1 - drivers/mmc/host/dw_mmc.c | 4 ---- drivers/mmc/host/dw_mmc.h | 2 -- 4 files changed, 12 deletions(-) commit 86b93a4825d8fa22f05e712a0e70b7406e1df1b5 Author: Jaehoon Chung Date: Fri Feb 23 15:41:33 2018 +0900 mmc: dw_mmc: remove the deprecated "clock-freq-min-max" property 'clock-freq-min-max' property had already deprecated. Remove the 'clock-freq-min-max' property that is kept to maintain the compatibility. Signed-off-by: Jaehoon Chung Reviewed-by: Rob Herring Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/synopsys-dw-mshc.txt | 4 ---- drivers/mmc/host/dw_mmc.c | 15 ++++----------- 2 files changed, 4 insertions(+), 15 deletions(-) commit 7420f482ea5163bf6dae39a5c7628d5397cd6307 Author: Oded Gabbay Date: Thu Mar 15 10:08:35 2018 +0200 drm/amdkfd: add missing include of mm.h This patch fixes kernel build in ARCH=frv Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 + 1 file changed, 1 insertion(+) commit 84d9bba0762e0a8e5dc66d25826a306e26177e6f Author: Craig Tatlor Date: Tue Mar 13 16:46:38 2018 +0000 ARM: dts: msm8974: castor: Fix typo and add startup delay in touchscreen node The compatible string was mistakenly pulled from the downstream tree and the startup delay property is needed to prevent io errors on initial page select. Reviewed-by: Bjorn Andersson Signed-off-by: Craig Tatlor Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e1735d9a98ab5593484bbba1933e362a261e0de0 Author: Varun Prakash Date: Sun Mar 11 18:02:13 2018 +0530 scsi: csiostor: add support for 32 bit port capabilities 32 bit port capabilities are required to support new speeds which can not be supported using 16 bit port capabilities. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/csiostor/csio_attr.c | 16 ++- drivers/scsi/csiostor/csio_hw.c | 275 ++++++++++++++++++++++++++++++++++++- drivers/scsi/csiostor/csio_hw.h | 59 ++++++++ drivers/scsi/csiostor/csio_lnode.c | 8 ++ drivers/scsi/csiostor/csio_mb.c | 70 ++++++---- drivers/scsi/csiostor/csio_mb.h | 9 +- 6 files changed, 395 insertions(+), 42 deletions(-) commit 1929e82e37d9c43ce7063025877a779ac649d1e0 Author: Stephen Kitt Date: Thu Mar 8 22:38:41 2018 +0100 scsi: bfa: remove VLA In preparation to enabling -Wvla, remove VLAs and replace them with fixed-length arrays instead. bfad_bsg.c uses a variable-length array declaration to measure the size of a putative array; this can be replaced by the product of the size of an element and the number of elements, avoiding the VLA altogether. This was prompted by https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Stephen Kitt Reviewed-by: Kees Cook Signed-off-by: Martin K. Petersen drivers/scsi/bfa/bfad_bsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88b13609afca8ed2992c107c15326b4a8142e5da Author: Stephen Kitt Date: Thu Mar 8 21:51:58 2018 +0100 scsi: aic7xxx: aic79xx: remove VLAs In preparation to enabling -Wvla, remove VLAs and replace them with fixed-length arrays instead. The arrays fixed here, using the number of constant sections, aren't really VLAs, but they appear so to the compiler. Replace the array sizes with a pre-processor-level constant instead using ARRAY_SIZE. This was prompted by https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Stephen Kitt Reviewed-by: Kees Cook Signed-off-by: Martin K. Petersen drivers/scsi/aic7xxx/aic79xx_core.c | 8 ++++---- drivers/scsi/aic7xxx/aic79xx_seq.h_shipped | 3 +-- drivers/scsi/aic7xxx/aic7xxx_core.c | 8 ++++---- drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped | 3 +-- drivers/scsi/aic7xxx/aicasm/aicasm.c | 3 +-- 5 files changed, 11 insertions(+), 14 deletions(-) commit 2e8c3002e350f4aa6b1c4c9d5a0409926e6eb556 Author: John Pittman Date: Wed Mar 14 09:52:36 2018 -0400 scsi: scsi_dh_alua: Correct comment for alua_alloc_pg() In the comment for function alua_alloc_pg() the argument '@h' is mistakenly referred to. Fix this by replacing it with the correct argument reference, '@tpgs', and provide a short description. Signed-off-by: John Pittman Reviewed-by Laurence Oberman Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50041071b5716eb1585c68a482989ab9fc885968 Author: Christoph Hellwig Date: Wed Mar 14 12:48:34 2018 +0100 scsi: documentation: remove ChangeLog.1992-1997 This 20+ year old changelog has no useful information for kernel development or users, so remove it. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen Documentation/scsi/ChangeLog.1992-1997 | 2023 -------------------------------- 1 file changed, 2023 deletions(-) commit 1dc09e120c83143bdccf2e445f604666e7eebc11 Author: Christoph Hellwig Date: Wed Mar 14 12:48:25 2018 +0100 scsi: aha1740: stop using scsi_unregister aha1740 doesn't use scsi_register, so it should not use scsi_unregister either. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/aha1740.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59ee56697b0f89a1778ffa24ee3bf9a826a97e1d Author: Christoph Hellwig Date: Wed Mar 14 12:48:24 2018 +0100 scsi: ips: don't set .detect and .release in the host template Since moving away from using scsi_module.c these were never called. The implementations are called directly, though so they remain. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/ips.c | 4 ---- 1 file changed, 4 deletions(-) commit 38e09e3bb056b90d70308fe1e3db387ef976ce6e Author: Christoph Hellwig Date: Wed Mar 14 12:48:23 2018 +0100 scsi: dpt_i2o: stop using scsi_unregister dpt_i2o doesn't use scsi_register, so it should not use scsi_unregister either. Also refactor the module exit path to make a little more sense. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/dpt_i2o.c | 16 ++++------------ drivers/scsi/dpti.h | 1 - 2 files changed, 4 insertions(+), 13 deletions(-) commit 6b1745caa14ae0afccf1c6ee4c814fd8d5df3dcd Author: Martin K. Petersen Date: Tue Mar 13 15:06:22 2018 -0400 scsi: eata: eata-pio: Deprecate legacy EATA drivers These two drivers do not appear to be in active use. Deprecate them. Suggested-by: Christoph Hellwig Signed-off-by: Martin K. Petersen Documentation/scsi/scsi-parameters.txt | 2 - MAINTAINERS | 6 - drivers/scsi/Kconfig | 62 - drivers/scsi/Makefile | 2 - drivers/scsi/eata.c | 2571 -------------------------------- drivers/scsi/eata_generic.h | 401 ----- drivers/scsi/eata_pio.c | 966 ------------ drivers/scsi/eata_pio.h | 54 - 8 files changed, 4064 deletions(-) commit fab2e466e9dfe47371b54a54b86f6630feced80e Author: Colin Ian King Date: Tue Mar 13 12:08:49 2018 +0000 scsi: lpfc: make several unions static, fix non-ANSI prototype There are several unions that are local to the source and do not need to be in global scope, so make them static. Also add in a missing void parameter to functions lpfc_nvme_cmd_template and lpfc_nvmet_cmd_template to clean up non-ANSI warning. Cleans up sparse warnings: drivers/scsi/lpfc/lpfc_nvme.c:68:19: warning: symbol 'lpfc_iread_cmd_template' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_nvme.c:69:19: warning: symbol 'lpfc_iwrite_cmd_template' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_nvme.c:70:19: warning: symbol 'lpfc_icmnd_cmd_template' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_nvme.c:74:24: warning: non-ANSI function 'lpfc_tsend_cmd_template' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_nvmet.c:78:19: warning: symbol 'lpfc_treceive_cmd_template' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_nvmet.c:79:19: warning: symbol 'lpfc_trsp_cmd_template' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_nvmet.c:83:25: warning: non-ANSI function declaration of function 'lpfc_nvmet_cmd_template' Signed-off-by: Colin Ian King Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 8 ++++---- drivers/scsi/lpfc/lpfc_nvmet.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit 68de5ef4c786f63bf19b146fa009ee9208318d0b Merge: 6d8cb04 81f77fd Author: Daniel Borkmann Date: Thu Mar 15 01:14:01 2018 +0100 Merge branch 'bpf-stackmap-build-id' Song Liu says: ==================== This work follows up discussion at Plumbers'17 on improving addr->sym resolution of user stack traces. The following links have more information of the discussion: http://www.linuxplumbersconf.org/2017/ocw/proposals/4764 https://lwn.net/Articles/734453/ Section "Stack traces and kprobes" Currently, bpf stackmap store address for each entry in the call trace. To map these addresses to user space files, it is necessary to maintain the mapping from these virtual address to symbols in the binary. Usually, the user space profiler (such as perf) has to scan /proc/pid/maps at the beginning of profiling, and monitor mmap2() calls afterwards. Given the cost of maintaining the address map, this solution is not practical for system wide profiling that is always on. This patch tries to address this with a variation to stackmap. Instead of storing addresses, the variation stores ELF file build_id + offset. After profiling, a user space tool will look up these functions with build_id (to find the binary or shared library) and the offset. I also updated bcc/cc library for the stackmap (no python/lua support yet). You can find the work at: https://github.com/liu-song-6/bcc/commits/bpf_get_stackid_v02 Changes v5 -> v6: 1. When kernel stack is added to stackmap with build_id, use fallback mechanism to store ip (status == BPF_STACK_BUILD_ID_IP). Changes v4 -> v5: 1. Only allow build_id lookup in non-nmi context. Added comment and commit message to highlight this limitation. 2. Minor fix reported by kbuild test robot. Changes v3 -> v4: 1. Add fallback when build_id lookup failed. In this case, status is set to BPF_STACK_BUILD_ID_IP, and ip of this entry is saved. 2. Handle cases where vma is only part of the file (vma->vm_pgoff != 0). Thanks to Teng for helping me identify this issue! 3. Address feedbacks for previous versions. ==================== Signed-off-by: Daniel Borkmann commit 81f77fd0deeb866d65ccc79733df8d2af5217c82 Author: Song Liu Date: Wed Mar 14 10:23:22 2018 -0700 bpf: add selftest for stackmap with BPF_F_STACK_BUILD_ID test_stacktrace_build_id() is added. It accesses tracepoint urandom_read with "dd" and "urandom_read" and gathers stack traces. Then it reads the stack traces from the stackmap. urandom_read is a statically link binary that reads from /dev/urandom. test_stacktrace_build_id() calls readelf to read build ID of urandom_read and compares it with build ID from the stackmap. Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann tools/include/uapi/linux/bpf.h | 22 +++ tools/testing/selftests/bpf/Makefile | 12 +- tools/testing/selftests/bpf/test_progs.c | 164 ++++++++++++++++++++- .../selftests/bpf/test_stacktrace_build_id.c | 60 ++++++++ tools/testing/selftests/bpf/urandom_read.c | 22 +++ 5 files changed, 278 insertions(+), 2 deletions(-) commit 615755a77b2461ed78dfafb8a6649456201949c7 Author: Song Liu Date: Wed Mar 14 10:23:21 2018 -0700 bpf: extend stackmap to save binary_build_id+offset instead of address Currently, bpf stackmap store address for each entry in the call trace. To map these addresses to user space files, it is necessary to maintain the mapping from these virtual address to symbols in the binary. Usually, the user space profiler (such as perf) has to scan /proc/pid/maps at the beginning of profiling, and monitor mmap2() calls afterwards. Given the cost of maintaining the address map, this solution is not practical for system wide profiling that is always on. This patch tries to solve this problem with a variation of stackmap. This variation is enabled by flag BPF_F_STACK_BUILD_ID. Instead of storing addresses, the variation stores ELF file build_id + offset. Build ID is a 20-byte unique identifier for ELF files. The following command shows the Build ID of /bin/bash: [user@]$ readelf -n /bin/bash ... Build ID: XXXXXXXXXX ... With BPF_F_STACK_BUILD_ID, bpf_get_stackid() tries to parse Build ID for each entry in the call trace, and translate it into the following struct: struct bpf_stack_build_id_offset { __s32 status; unsigned char build_id[BPF_BUILD_ID_SIZE]; union { __u64 offset; __u64 ip; }; }; The search of build_id is limited to the first page of the file, and this page should be in page cache. Otherwise, we fallback to store ip for this entry (ip field in struct bpf_stack_build_id_offset). This requires the build_id to be stored in the first page. A quick survey of binary and dynamic library files in a few different systems shows that almost all binary and dynamic library files have build_id in the first page. Build_id is only meaningful for user stack. If a kernel stack is added to a stackmap with BPF_F_STACK_BUILD_ID, it will automatically fallback to only store ip (status == BPF_STACK_BUILD_ID_IP). Similarly, if build_id lookup failed for some reason, it will also fallback to store ip. User space can access struct bpf_stack_build_id_offset with bpf syscall BPF_MAP_LOOKUP_ELEM. It is necessary for user space to maintain mapping from build id to binary files. This mostly static mapping is much easier to maintain than per process address maps. Note: Stackmap with build_id only works in non-nmi context at this time. This is because we need to take mm->mmap_sem for find_vma(). If this changes, we would like to allow build_id lookup in nmi context. Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann include/uapi/linux/bpf.h | 22 ++++ kernel/bpf/stackmap.c | 257 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 257 insertions(+), 22 deletions(-) commit 58ca9ac1463d07d24b9fa8befe065192abca6f76 Author: Tony Luck Date: Mon Mar 12 11:24:30 2018 -0700 EDAC, skx_edac: Detect non-volatile DIMMs This just covers the topology function of the EDAC driver. We locate which DIMM slots are populated with NVDIMMs and query the NFIT and SMBIOS tables to get the size. Reviewed-by: Jean Delvare Signed-off-by: Tony Luck Cc: Aristeu Rozanski Cc: Dan Williams Cc: Len Brown Cc: Mauro Carvalho Chehab Cc: Qiuxu Zhuo Cc: "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org Cc: linux-edac Cc: linux-nvdimm@lists.01.org Link: http://lkml.kernel.org/r/20180312182430.10335-6-tony.luck@intel.com Signed-off-by: Borislav Petkov drivers/edac/Kconfig | 5 +++- drivers/edac/skx_edac.c | 67 ++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 65 insertions(+), 7 deletions(-) commit 2d873449a202d02e0c4d90009fb2beb7013ac575 Merge: 06892cc bd8602c Author: Doug Ledford Date: Wed Mar 14 18:49:12 2018 -0400 Merge branch 'k.o/wip/dl-for-rc' into k.o/wip/dl-for-next Due to bug fixes found by the syzkaller bot and taken into the for-rc branch after development for the 4.17 merge window had already started being taken into the for-next branch, there were fairly non-trivial merge issues that would need to be resolved between the for-rc branch and the for-next branch. This merge resolves those conflicts and provides a unified base upon which ongoing development for 4.17 can be based. Conflicts: drivers/infiniband/hw/mlx5/main.c - Commit 42cea83f9524 (IB/mlx5: Fix cleanup order on unload) added to for-rc and commit b5ca15ad7e61 (IB/mlx5: Add proper representors support) add as part of the devel cycle both needed to modify the init/de-init functions used by mlx5. To support the new representors, the new functions added by the cleanup patch needed to be made non-static, and the init/de-init list added by the representors patch needed to be modified to match the init/de-init list changes made by the cleanup patch. Updates: drivers/infiniband/hw/mlx5/mlx5_ib.h - Update function prototypes added by representors patch to reflect new function names as changed by cleanup patch drivers/infiniband/hw/mlx5/ib_rep.c - Update init/de-init stage list to match new order from cleanup patch Signed-off-by: Doug Ledford commit ed0df3ce9e7591b91927879f5808d055d41dfcc8 Merge: 7928b2c 4ee3fd4 Author: Stephen Boyd Date: Wed Mar 14 15:38:48 2018 -0700 Merge tag 'v4.17-rockchip-clk-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip Pull Rockchip clk driver updates from Heiko Stuebner: The rk3328 got the most love this time, preparing it for supplying actual display output in the future and actually protecting all necessary clocks. The rk3399 simply got a special 1.6GHz rate that is going to be needed for a board and the core code got a fix to actually free allocated memory in error case as well as making sure the clock-phases don't return bad values and stay the same on rate changes. * tag 'v4.17-rockchip-clk-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: Add 1.6GHz PLL rate for rk3399 clk: rockchip: Restore the clock phase after the rate was changed clk: rockchip: Prevent calculating mmc phase if clock rate is zero clk: rockchip: Free the memory on the error path clk: rockchip: document hdmi_phy external input for rk3328 clk: rockchip: add flags for rk3328 dclk_lcdc clk: rockchip: remove ignore_unused flag from rk3328 vio_h2p clocks clk: rockchip: protect all remaining rk3328 interconnect clocks clk: rockchip: export sclk_hdmi_sfc on rk3328 clk: rockchip: remove HCLK_VIO from rk3328 dt header clk: rockchip: fix hclk_vio_niu on rk3328 commit 5d1c04dde0eb396aec781c825a025e69c48b67cd Author: Stephen Boyd Date: Wed Mar 14 15:36:31 2018 -0700 clk: meson: Drop unused local variable and add static Fixes the following warnings: drivers/clk/meson/meson8b.c:512:19: warning: symbol 'meson8b_mpeg_clk_div' was not declared. Should it be static? drivers/clk/meson/meson8b.c:526:19: warning: symbol 'meson8b_clk81' was not declared. Should it be static? drivers/clk/meson/meson8b.c:540:19: warning: symbol 'meson8b_cpu_in_sel' was not declared. Should it be static? drivers/clk/meson/meson8b.c:591:19: warning: symbol 'meson8b_cpu_scale_div' was not declared. Should it be static? drivers/clk/meson/meson8b.c:608:19: warning: symbol 'meson8b_cpu_scale_out_sel' was not declared. Should it be static? drivers/clk/meson/meson8b.c:626:19: warning: symbol 'meson8b_cpu_clk' was not declared. Should it be static? drivers/clk/meson/gxbb.c:392:27: warning: symbol 'gxbb_gp0_init_regs' was not declared. Should it be static? drivers/clk/meson/gxbb.c:439:27: warning: symbol 'gxl_gp0_init_regs' was not declared. Should it be static? drivers/clk/meson/axg.c:195:27: warning: symbol 'axg_gp0_init_regs' was not declared. Should it be static? drivers/clk/meson/axg.c:248:27: warning: symbol 'axg_hifi_init_regs' was not declared. Should it be static? drivers/clk/meson/meson8b.c: In function 'meson8b_clkc_probe': drivers/clk/meson/meson8b.c:1052:14: warning: unused variable 'clk' [-Wunused-variable] Signed-off-by: Stephen Boyd drivers/clk/meson/axg.c | 4 ++-- drivers/clk/meson/gxbb.c | 4 ++-- drivers/clk/meson/meson8b.c | 13 ++++++------- 3 files changed, 10 insertions(+), 11 deletions(-) commit 186dcd4ab2400d2d97329dbb515b9648151fedba Merge: 7928b2c 5b13ef6 Author: Stephen Boyd Date: Wed Mar 14 15:16:23 2018 -0700 Merge tag 'clk-for-v4.17-1' of https://github.com/BayLibre/clk-meson into clk-amlogic Pull amlogic clk driver updates from Neil Armstrong: - pll fixes for GXBB, GXL and AXG - use regmap in clock controllers for GXBB, GXL and AXG - general clock updates for Meson8, GXBB, GXL and AXG (Based on the clk-helpers topic branch as a dependency) * tag 'clk-for-v4.17-1' of https://github.com/BayLibre/clk-meson: (49 commits) clk: meson: clean-up clk81 clocks clk: meson: add fdiv clock gates clk: meson: add mpll pre-divider clk: meson: axg: add hifi pll clock clk: meson: axg: add hifi clock bindings clk: meson: add ROUND_CLOSEST to the pll driver clk: meson: add gp0 frac parameter for axg and gxl clk: meson: improve pll driver results with frac clk: meson: remove special gp0 lock loop clk: meson: poke pll CNTL last clk: meson: add fractional part of meson8b fixed_pll clk: meson: use hhi syscon if available clk: meson: remove obsolete cpu_clk clk: meson: rework meson8b cpu clock clk: meson: split divider and gate part of mpll clk: meson: migrate plls clocks to clk_regmap clk: meson: migrate the audio divider clock to clk_regmap clk: meson: migrate mplls clocks to clk_regmap clk: meson: add regmap helpers for parm clk: meson: migrate muxes to clk_regmap ... commit cc4d07a41113f60fc514308fb073c567938412fc Merge: 84b7bba a551039 Author: Stephen Boyd Date: Wed Mar 14 15:14:08 2018 -0700 Merge tag 'clk-imx-4.17-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-imx Pull i.MX clock misc updates from Shawn Guo: - A correction on i.MX6SX CKO clock mux options. - A fix on i.MX7D Video PLL clock tree to include the missing dividers. - Update i.MX6UL/ULL clock driver to add epdc_podf instead of sim_podf clock for i.MX6ULL. * tag 'clk-imx-4.17-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: clk: imx6ull: Add epdc_podf instead of sim_podf clk: imx: imx7d: correct video pll clock tree clk: imx: imx6sx: update cko mux options commit 06892cc190550807d332c95a0114c7e175584012 Author: Andrew Morton Date: Tue Mar 13 15:06:45 2018 -0700 drivers/infiniband/ulp/srpt/ib_srpt.c: fix build with gcc-4.4.4 gcc-4.4.4 has issues with initialization of anonymous unions: drivers/infiniband/ulp/srpt/ib_srpt.c: In function 'srpt_zerolength_write': drivers/infiniband/ulp/srpt/ib_srpt.c:854: error: unknown field 'wr_cqe' specified in initializer drivers/infiniband/ulp/srpt/ib_srpt.c:854: warning: initialization makes integer from pointer without a cast Work aound this. Fixes: 2a78cb4db487 ("IB/srpt: Fix an out-of-bounds stack access in srpt_zerolength_write()") Cc: Bart Van Assche Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Signed-off-by: Andrew Morton Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6ee687735e745eafae9e6b93d1ea70bc52e7ad07 Author: Andrew Morton Date: Tue Mar 13 14:51:57 2018 -0700 drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4 gcc-4.4.4 has issues with initialization of anonymous unions. drivers/infiniband/core/verbs.c: In function '__ib_drain_sq': drivers/infiniband/core/verbs.c:2204: error: unknown field 'wr_cqe' specified in initializer drivers/infiniband/core/verbs.c:2204: warning: initialization makes integer from pointer without a cast Work around this. Fixes: a1ae7d0345edd5 ("RDMA/core: Avoid that ib_drain_qp() triggers an out-of-bounds stack access") Cc: Bart Van Assche Cc: Steve Wise Cc: Sagi Grimberg Cc: Jason Gunthorpe Cc: Signed-off-by: Andrew Morton Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 84b7bbacd8246c49e519de06a58a2a1c2e987f6f Merge: 7928b2c 1691cc3 Author: Stephen Boyd Date: Wed Mar 14 15:12:31 2018 -0700 Merge tag 'clk-imx-4.17-newid' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-imx Pull i.MX new clock additions from Shawn Guo: - New clocks for i.MX7D SNVS, CAAM and Keypad. * tag 'clk-imx-4.17-newid' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: clk: imx: imx7d: add the Keypad Port module clock clk: imx7d: add CAAM clock clk: imx: imx7d: add the snvs clock commit 401fd20f1f61678d3f71778d32911a941cc70f04 Merge: 7928b2c 3c13933 Author: Stephen Boyd Date: Wed Mar 14 14:44:55 2018 -0700 Merge tag 'ti-clk-for-4.17' of https://github.com/t-kristo/linux-pm into clk-ti Pull TI SoC clock updates for 4.17 from Tero Kristo: * tag 'ti-clk-for-4.17' of https://github.com/t-kristo/linux-pm: clk: keystone: sci-clk: add support for dynamically probing clocks clk: ti: add support for clock latching to mux clocks clk: ti: add support for clock latching to divider clocks clk: ti: add generic support for clock latching clk: ti: add support for register read-modify-write low-level operation dt-bindings: clock: ti: add latching support to mux and divider clocks commit db4d52d31b21ad87b1f8d5388f5d39d58cacdbd5 Merge: 7928b2c 7ce36da9 Author: Stephen Boyd Date: Wed Mar 14 14:37:27 2018 -0700 Merge tag 'clk-renesas-for-v4.17-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull renesas clk driver updates for v4.17 from Geert Uytterhoeven: - Update legacy DT Kconfig default, - Add support for CPU (Z/Z2) clocks on R-Car H3 and M3-W, - Add support for the watchdog module clocks on R-Car Gen2 and RZ/G1, - Add support for the new R-Car M3-N and V3H SoCs. * tag 'clk-renesas-for-v4.17-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: cpg-mssr: Add support for R-Car M3-N clk: renesas: cpg-mssr: add R8A77980 support dt-bindings: clock: add R8A77980 CPG core clock definitions clk: renesas: r8a7792: Add rwdt clock clk: renesas: r8a7794: Add rwdt clock clk: renesas: r8a7791/r8a7793: Add rwdt clock clk: renesas: r8a7790: Add rwdt clock clk: renesas: r8a7745: Add rwdt clock clk: renesas: r8a7743: Add rwdt clock clk: renesas: r8a7796: Add Z2 clock clk: renesas: r8a7796: Add Z clock clk: renesas: r8a7795: Add Z2 clock clk: renesas: r8a7795: Add Z clock clk: renesas: rcar-gen3: Add Z2 clock divider support clk: renesas: rcar-gen3: Add Z clock divider support clk: renesas: Stop enabling legacy DT clock support by default commit a91f77ef155e90b738c0d716844e31e136e9c6b4 Author: Stephen Boyd Date: Wed Mar 14 14:34:16 2018 -0700 clk: hisilicon: Mark phase_ops static Sparse rightfully complains: drivers/clk/hisilicon/clk-hisi-phase.c:88:22: warning: symbol 'clk_phase_ops' was not declared. Should it be static? drivers/clk/hisilicon/clk-hisi-phase.c:88:22: warning: symbol 'clk_phase_ops' was not declared. Should it be static? Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk-hisi-phase.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e26a20339d222b538c1174cec2da45202319aa99 Merge: 7928b2c d1b0399 Author: Stephen Boyd Date: Wed Mar 14 14:32:29 2018 -0700 Merge tag 'clk-hi3798cv200-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-hisi Pull Hi3798CV200 clock driver updates for 4.17 from Shawn Guo: - Add COMBPHY0 and USB2_OTG_UTMI clock support. - Correct the parent clock of HISTB_IR_CLK. - Fix unregister call sequence in hi3798cv200_clk_register() function. - A coding-style improvement on Hi3798CV200 driver code indent. - Add a HiSilicon specific phase clock type and using the type for eMMC clocks on Hi3798CV200. * tag 'clk-hi3798cv200-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: clk: hi3798cv200: add emmc sample and drive clock clk: hisilicon: add hisi phase clock support clk: hi3798cv200: add COMBPHY0 clock support clk: hi3798cv200: fix define indentation clk: hi3798cv200: add support for HISTB_USB2_OTG_UTMI_CLK clk: hi3798cv200: correct IR clock parent clk: hi3798cv200: fix unregister call sequence in error path commit 2f51d6e8e485b5efd5983c2454c54815eec02a46 Author: Feifei Xu Date: Tue Mar 6 22:42:33 2018 -0500 drm/amdgpu/sdma4: Remove unused header file from sdma_v4_0.c Remove mmhub header files inclusion which not used. Signed-off-by: Feifei Xu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 -- 1 file changed, 2 deletions(-) commit fcb7d51571e6ab542e3e6e84ae29c8f541460ca8 Author: Alex Deucher Date: Fri Sep 1 16:47:54 2017 -0400 drm/amdgpu/sdma4: use num_instances for clock/powergating config Rather then relying on the asic type for the second instance. Makes it more consistent with the rest of the code. Reviewed-by: Christian König Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit da42960918b4985abd1891c2f60d774706b58061 Author: Alex Deucher Date: Tue Mar 6 23:01:46 2018 -0500 drm/amdgpu: remove trailing whitespace from soc15ip.h no intended functional change. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/vega10_ip_offset.h | 286 ++++++++++++------------- 1 file changed, 143 insertions(+), 143 deletions(-) commit a423f79ad74710bf4d0c16bf0435ad84830dd35c Author: Alex Deucher Date: Tue Mar 13 20:43:00 2018 -0500 drm/amdgpu/powerplay/vega10: fix memory leak in error path Free the backend structure if we fail to allocate device memory. Reviewed-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit daf8809626c0ee7a152f9c34058fc3b43385dd51 Author: Michel Dänzer Date: Fri Mar 9 18:26:18 2018 +0100 drm/amdgpu/dce: Don't turn off DP sink when disconnected Turning off the sink in this case causes various issues, because userspace expects it to stay on until it turns it off explicitly. Instead, turn the sink off and back on when a display is connected again. This dance seems necessary for link training to work correctly. Bugzilla: https://bugs.freedesktop.org/105308 Cc: stable@vger.kernel.org Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 31 ++++++++++---------------- 1 file changed, 12 insertions(+), 19 deletions(-) commit c30c950ed82b72b61fb9382d7c6fdd4d4181ae56 Author: Colin Ian King Date: Tue Mar 13 13:22:17 2018 +0000 drm/amd/pp: remove redundant pointer internal_buf The pointer internal_buf is assigned a value but the pointer is never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/smu7_smumgr.c:630:2: warning: Value stored to 'internal_buf' is never read Reviewed-by: Rex Zhu Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 2 -- 1 file changed, 2 deletions(-) commit 5494d8640ffc1df6096fd37943948ab46a152850 Author: Alex Deucher Date: Fri Mar 9 15:14:11 2018 -0500 drm/amdgpu: move getting pcie info to common code No need to replicate it in several places. Reviewed-by: Rex Zhu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++- drivers/gpu/drm/amd/amdgpu/cik.c | 2 -- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 -- drivers/gpu/drm/amd/amdgpu/vi.c | 2 -- 5 files changed, 5 insertions(+), 9 deletions(-) commit 3cdfe700567a653ba18dfe012f74b6b75b4bd946 Author: Alex Deucher Date: Fri Mar 9 15:22:28 2018 -0500 drm/amdgpu/soc15: always load the psp module Regardless of whether the user has selected psp fw loading or not. It's still needed for GPU reset among other things. There are already guards in place to avoid setting up the full psp if PSP fw loading is not enabled. Reviewed-by: Rex Zhu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 454bbbf915cd089d326cf39a1929bb8cee47d1d4 Author: Alex Deucher Date: Fri Mar 9 15:19:44 2018 -0500 drm/amdgpu: use adev->firmware to determine whether to load the PSP module The per device firmware load method is limited to what makes sense for that asic rather than whatever arbitrary value may have been set by the user. Reviewed-by: Rex Zhu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19aede779138c0514b8e96c24473f22aaf21be65 Author: Alex Deucher Date: Fri Mar 9 15:06:35 2018 -0500 drm/amdgpu: move firmware loading type setup to common code No need to replicate it in several places. Reviewed-by: Rex Zhu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ drivers/gpu/drm/amd/amdgpu/cik.c | 2 -- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 -- drivers/gpu/drm/amd/amdgpu/vi.c | 3 --- 4 files changed, 2 insertions(+), 7 deletions(-) commit a9f3636019747cc05b16911e6476ebf2fd2febe1 Author: Alex Deucher Date: Thu Mar 8 15:47:04 2018 -0500 drm/amdgpu/psp: add a few more fw load type checks We already checked and returned early in most of the IP functions, fill in the rest as well. Reviewed-by: Rex Zhu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2a7b58293dd0f188d27491a8d07b145a9487e172 Author: Shirish S Date: Tue Mar 13 11:55:11 2018 +0530 drm/amd/display: Check msg->size before starting aux transfer This patch adds an essential check related to the size of the payload to be transferred via aux channel. Without this check dal_ddc_service_read_dpcd_data() is fed with inappropriate payload size leading to deadlocks. Signed-off-by: Shirish S Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 3 +++ 1 file changed, 3 insertions(+) commit 17ac50368f83ead67f9e3c9b9704f927f214da9d Author: Dmytro Laktyushkin Date: Fri Feb 16 13:18:59 2018 -0500 drm/amd/display: clean up dcn pplib notification call We have unused variables being populated when notifying pplib. This change amends that. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 4 +-- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 18 ++++------- drivers/gpu/drm/amd/display/dc/dc.h | 4 +-- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 35 +++++----------------- 4 files changed, 15 insertions(+), 46 deletions(-) commit 14d6f644368de1a890b747547f36cef0423fbec8 Author: Yongqiang Sun Date: Mon Mar 5 10:28:34 2018 -0500 drm/amd/display: Fixed dim around 1sec when resume from S3 (v2) root cause: DMCU try to perform a smoothness brightness change.Incorrect initial brightness level causes the 1 sec dim. Change: Cache brightness level in stream, and clear it when edp backlight on. If brightness level in stream is 0, set brightness with ramp value is 0. DMCU will set the brightness without smoothness transition. v2: squash in null pointer fix (Harry) Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 7 +++++++ drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 + drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 +++- 3 files changed, 11 insertions(+), 1 deletion(-) commit cc6c98485f8e61fb3d6c51821fc75384e5a3a9c3 Author: Palmer Dabbelt Date: Wed Mar 7 15:57:28 2018 -0800 RISC-V: Move to the new GENERIC_IRQ_MULTI_HANDLER handler The existing mechanism for handling IRQs on RISC-V is pretty ugly: the irq entry code selects the handler via Kconfig dependencies. Use the new generic IRQ handling infastructure, which allows boot time registration of the low level entry handler. This does add an additional load to the interrupt latency, but there's a lot of tuning left to be done there on RISC-V so it's OK for now. Signed-off-by: Palmer Dabbelt Signed-off-by: Thomas Gleixner Reviewed-by: Christoph Hellwig Acked-by: Stafford Horne Cc: jonas@southpole.se Cc: catalin.marinas@arm.com Cc: Will Deacon Cc: linux@armlinux.org.uk Cc: stefan.kristiansson@saunalahti.fi Cc: openrisc@lists.librecores.org Cc: linux-riscv@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lkml.kernel.org/r/20180307235731.22627-3-palmer@sifive.com arch/riscv/Kconfig | 1 + arch/riscv/include/asm/Kbuild | 1 + arch/riscv/kernel/entry.S | 7 +++---- arch/riscv/kernel/irq.c | 13 ------------- 4 files changed, 5 insertions(+), 17 deletions(-) commit caacdbf4aa567ab5e8de1a4070195c5d3e8f1340 Author: Palmer Dabbelt Date: Wed Mar 7 15:57:27 2018 -0800 genirq: Add CONFIG_GENERIC_IRQ_MULTI_HANDLER The arm multi irq handler registration mechanism has been copied into a handful of architectures, including arm64 and openrisc. RISC-V needs the same mechanism. Instead of adding yet another copy for RISC-V copy the arm implementation into the core code depending on a new Kconfig symbol: CONFIG_GENERIC_MULTI_IRQ_HANDLER. Subsequent patches will convert the various architectures. Signed-off-by: Palmer Dabbelt Signed-off-by: Thomas Gleixner Cc: jonas@southpole.se Cc: catalin.marinas@arm.com Cc: Will Deacon Cc: linux@armlinux.org.uk Cc: stefan.kristiansson@saunalahti.fi Cc: openrisc@lists.librecores.org Cc: shorne@gmail.com Cc: linux-riscv@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lkml.kernel.org/r/20180307235731.22627-2-palmer@sifive.com include/linux/irq.h | 18 ++++++++++++++++++ kernel/irq/Kconfig | 5 +++++ kernel/irq/handle.c | 15 +++++++++++++++ 3 files changed, 38 insertions(+) commit 43c9fc509fa59d602f9c303d02b33db015022881 Author: Martin Wilck Date: Wed Feb 14 21:45:43 2018 +0100 rdma_rxe: make rxe work over 802.1q VLAN devices This patch fixes RDMA/rxe over 802.1q VLAN devices. Without it, I observed the following behavior: a) adding a VLAN device to RXE via rxe_net_add() creates a non-functional RDMA device. This is caused by the logic in enum_all_gids_of_dev_cb() / is_eth_port_of_netdev(), which only considers networks connected to "upper devices" of the configured network device, resulting in an empty set of gids for a VLAN interface that is an "upper device" itself. Later attempts to connect via this rdma device fail in cma_acuire_dev() because no gids can be resolved. b) adding the master device of the VLAN device instead seems to work initially, target addresses via VLAN devices are resolved successfully. But the connection times out because no 802.1q VLAN headers are inserted in the ethernet packets, which are therefore never received. This happens because the RXE layer sends the packets via the master device rather than the VLAN device. The problem could be solved by changing either a) or b). My thinking was that the logic in a) was created deliberately, thus I decided to work on b). It turns out that the information about the VLAN interface for the gid at hand is available in the AV information. My patch converts the RXE code to use this netdev instead of rxe->ndev. With this change, RXE over vlan works on my test system. Signed-off-by: Martin Wilck Reviewed-by: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_net.c | 54 ++++++++++++++++++++++++++++++++---- drivers/infiniband/sw/rxe/rxe_recv.c | 2 +- 2 files changed, 49 insertions(+), 7 deletions(-) commit 2a54bd6e08164b80f2a322a8b1935f6ab55d1846 Author: Jerry (Fangzhi) Zuo Date: Fri Mar 2 13:35:53 2018 -0500 drm/amd/display: Use actual TG instance instead of pipe instance Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 10 +++++----- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit d1aaad05d0c39c8bf796e556ebbcc4ed6f4d799a Author: Harry Wentland Date: Fri Mar 2 17:19:27 2018 -0500 drm/amd/display: Check for HW blocks in HWSS, rather than DC core for cursor Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 3 +-- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 9 ++++++--- 2 files changed, 7 insertions(+), 5 deletions(-) commit 3760f76cbebb455deaaa3e64ad5feb25222e65a9 Author: Oak Zeng Date: Thu Mar 8 16:44:47 2018 -0500 drm/amdgpu: Move IH clientid defs to separate file This is preparation for sharing client ID definitions between amdgpu and amdkfd Signed-off-by: Oak Zeng Reviewed-by: Chunming Zhou Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 43 +------------ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 +-- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 4 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 8 +-- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 4 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 +-- drivers/gpu/drm/amd/include/soc15_ih_clientid.h | 70 ++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 6 +- 12 files changed, 98 insertions(+), 67 deletions(-) commit e36ec85998d2ca1bf09bbd9fcb2e2df1e23c8388 Author: Dmytro Laktyushkin Date: Mon Feb 26 14:37:25 2018 -0500 drm/amd/display: update dce_calcs to latest version Bw spreadsheet was updated while dce_calcs was not Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 160 +++++++++++++++-------- drivers/gpu/drm/amd/display/dc/inc/dce_calcs.h | 6 + 2 files changed, 110 insertions(+), 56 deletions(-) commit 45bb8dd696eaff9c96afd2b210f0d8cf5025dd65 Author: Yongqiang Sun Date: Wed Feb 28 17:14:50 2018 -0500 drm/amd/display: Set disp clk in a safe way to avoid over high dpp clk. (v2) Increase clock, if current dpp div is 0 and request dpp div is 1, request clk is higher than maximum dpp clk as per dpm table. set dispclk to the value of maximum supported dpp clk set div to 1 set dispclk to request value. Decrease clock, currrent dpp div is 1 and request dpp div is 0, current clk is higher than maximum dpp clk as per dpm table. set dispclk to the value of maximum supported dpp clk set div to 0 set dispclk to request value. v2: squash in !DCN build fix Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 19 +++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 142 +++++++++++++++++---- 3 files changed, 139 insertions(+), 23 deletions(-) commit 5231f5d1124eef853573cb3d2e3dc3c4ddc43e22 Author: Samson Tam Date: Thu Mar 1 11:06:34 2018 -0500 drm/amd/display: add support for regkey "LCDFreeSyncDefault" Signed-off-by: Samson Tam Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/modules/freesync/freesync.c | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit df534fff0d23ba55a5880e592ec2901fdc09fdf6 Author: Shirish S Date: Tue Feb 27 14:48:13 2018 +0530 drm/amd/display: Correct the plane enumeration order (v2) The order of planes is given by the order they are enumerated by kms. Planes with a higher ID appears above planes with a lower ID. Currently the planes are enumerated in the wrong order, putting the nv12 only plane after the two RGBA planes. This patch corrects the plane enumeration order such that all the overlay planes are initialized first then the primary planes. Due to this change in order the dc_add_plane_to_context() shall receive the planes in reverse order hence this patch reverses the parsing of planes in DM side itself. v2: drop local reverse macro for upstream Signed-off-by: Shirish S Signed-off-by: Pratik Vishwakarma Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 77 ++++++++++++++++------- 1 file changed, 53 insertions(+), 24 deletions(-) commit baa00fcde447d420fb3eba434f5ee7e04df90234 Author: Arnd Bergmann Date: Tue Mar 13 13:06:20 2018 +0100 RDMA/i40iw: include linux/irq.h We get a build failure on ARM unless the header is included explicitly: drivers/infiniband/hw/i40iw/i40iw_verbs.c: In function 'i40iw_get_vector_affinity': drivers/infiniband/hw/i40iw/i40iw_verbs.c:2747:9: error: implicit declaration of function 'irq_get_affinity_mask'; did you mean 'irq_create_affinity_masks'? [-Werror=implicit-function-declaration] return irq_get_affinity_mask(msix_vec->irq); ^~~~~~~~~~~~~~~~~~~~~ irq_create_affinity_masks drivers/infiniband/hw/i40iw/i40iw_verbs.c:2747:9: error: returning 'int' from a function with return type 'const struct cpumask *' makes pointer from integer without a cast [-Werror=int-conversion] return irq_get_affinity_mask(msix_vec->irq); Fixes: 7e952b19eb63 ("i40iw: Implement get_vector_affinity API") Signed-off-by: Arnd Bergmann Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_verbs.c | 1 + 1 file changed, 1 insertion(+) commit 9eee21376b62bba656533438d2a9f0d966d4e487 Author: Vitaly Prosyak Date: Wed Feb 28 10:44:54 2018 -0600 drm/amd/display: Fix handling of linear transfer function Signed-off-by: Vitaly Prosyak Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3f7194bce26ed39055439ebcf608fab43e846f2e Author: Tony Cheng Date: Wed Feb 21 16:41:19 2018 -0500 drm/amd/display: dal 3.1.38 Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64ed6a2eba3cb4146d2ff731293939ae84fad740 Author: Anthony Koo Date: Wed Feb 28 11:37:51 2018 -0500 drm/amd/display: Add variable refresh rate parameters to DC structures Time stamping will be part of surface, and will be updated when address is flipped. FreeSync parameters will be attached to stream, as it adjusts the timing dynamically. Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 12 +++++++++++- drivers/gpu/drm/amd/display/dc/dc_stream.h | 2 ++ drivers/gpu/drm/amd/display/dc/dc_types.h | 18 ++++++++++++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) commit a3e1737ed61c8b6ea078f477eee612e26f9d2561 Author: Anthony Koo Date: Thu Feb 22 09:50:25 2018 -0500 drm/amd/display: Implement stats logging Stats will be used for debug purposes Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/logger.c | 3 +- drivers/gpu/drm/amd/display/include/logger_types.h | 1 + .../drm/amd/display/modules/freesync/freesync.c | 129 ++++++-- .../gpu/drm/amd/display/modules/inc/mod_freesync.h | 9 + .../gpu/drm/amd/display/modules/inc/mod_stats.h | 65 ++++ drivers/gpu/drm/amd/display/modules/stats/stats.c | 334 +++++++++++++++++++++ 6 files changed, 510 insertions(+), 31 deletions(-) commit e18d3086733bd150f87594a754ae983329fb0ba1 Author: Eric Yang Date: Wed Feb 28 14:45:36 2018 -0500 drm/amd/display: early return if not in vga mode in disable_vga The work around for hw bug causes S3 resume failure. Don't execute disable vga logic if not in vga mode. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 4 +++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 10 +++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) commit d54ee946032be661b7645f30f7fa6ae10caa9bc3 Author: Mikita Lipski Date: Tue Feb 27 16:22:29 2018 -0500 drm/amd/display: Enable backlight support for pre-DCE11 ASICs Initializing ABM and DMCU modules for dce 80/81/83/100 as in DCE110 Adding constructors and destructors for each module. Adding register list for DMCU in dce80 as some registers are missing in dce80 from the basic list. DMCU is never used, so it would not have any functional impact. Signed-off-by: Mikita Lipski Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h | 35 +++++++++ .../drm/amd/display/dc/dce100/dce100_resource.c | 50 +++++++++++++ .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 87 ++++++++++++++++++++++ 3 files changed, 172 insertions(+) commit a4056c2a6344c64bd62234458a314e6aecce226f Author: Krunoslav Kovac Date: Fri Feb 23 17:51:33 2018 -0500 drm/amd/display: use HW hdr mult for brightness boost In MPO scenario when playing SDR clip in HDR desktop mode, Win is boosting desktop and requests driver to boost MPO. But driver boosting is currently done in regamma which is stream property and thus shared between grph and video. Redesigning the boosting in RV: use CM_HDR_MULT register which was added for this scenario. It also has the benefit that it can be done in HIRQL. Signed-off-by: Krunoslav Kovac Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 3 --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 16 ++++++++++++---- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 9 +++++++++ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 20 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 3 +++ 6 files changed, 45 insertions(+), 7 deletions(-) commit 713d451d2df321f1f6128eb6aeeadbefb521a9c9 Author: Bhawanpreet Lakha Date: Fri Feb 23 14:32:53 2018 -0500 drm/amd/display: Use MACROS instead of dm_logger Use DC_LOGGER macro for logs. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 14 +++++--------- drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 3 +-- drivers/gpu/drm/amd/display/dc/dml/dml_logger.h | 7 +++++-- 3 files changed, 11 insertions(+), 13 deletions(-) commit f0ba51e83a1845fe14ad37f7d5884be3f98908fc Author: Bhawanpreet Lakha Date: Fri Feb 23 14:21:46 2018 -0500 drm/amd/display: Move DTRACE and dml_print defines These MACROS are only being used by a few files but gets pulled in by dc.h Signed-off-by: Bhawanpreet Lakha Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/dml/display_rq_dlg_helpers.c | 1 + .../gpu/drm/amd/display/dc/dml/dml_common_defs.h | 2 -- .../gpu/drm/amd/display/dc/dml/dml_inline_defs.h | 1 + drivers/gpu/drm/amd/display/dc/dml/dml_logger.h | 35 ++++++++++++++++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) commit 8e437c799158be80aa1ae27f362e30081e2a1e9f Author: Yongqiang Sun Date: Tue Feb 27 15:06:31 2018 -0500 drm/amd/display: Modified set bandwidth sequence. This change make sure bandwidth is set properly. For increase bandwidth, set bandwidth before backend and front end programming. For decrease bandwidth, set bandwidth after. To avoid smu hang when reboot and dpms due to 0 disp clk, keep min disp clock as 100Mhz. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +-- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 40 ++++++++++++++++------ .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 6 ++++ 3 files changed, 38 insertions(+), 12 deletions(-) commit d03f3f6304336b85737d77393d55cd4d89154c72 Author: Eric Yang Date: Tue Feb 27 15:34:30 2018 -0500 drm/amd/display: fix check condition for edp power control Per discussion with VBIOS team, the orginal check is not correct in all cases on latest VBIOS. Additional check is needed. This change should maintain old behaviour on older VBIOS. Signed-off-by: Eric Yang Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 14 ++++++++++---- .../gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 10 +++++++--- 2 files changed, 17 insertions(+), 7 deletions(-) commit 90e3103e1966c5553b2a0ba9e699b9bf2fdb5ae7 Author: Bhawanpreet Lakha Date: Tue Feb 27 12:12:46 2018 -0500 drm/amd/display: Fix takover from VGA mode HW Engineer's Notes: During switch from vga->extended, if we set the VGA_TEST_ENABLE and then hit the VGA_TEST_RENDER_START, then the DCHUBP timing gets updated correctly. Then vBIOS will have it poll for the VGA_TEST_RENDER_DONE and unset VGA_TEST_ENABLE, to leave it in the same state as before. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 10 ++++++++-- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 10 ++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) commit 316178f072013575bd13b34df21af355aaa56e83 Author: Jerry (Fangzhi) Zuo Date: Fri Feb 23 14:49:14 2018 -0500 drm/amd/display: Allow passing of syspll id to get_smu_clock_info Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Hersen Wu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 6 +++--- drivers/gpu/drm/amd/display/dc/bios/command_table2.c | 5 +++-- drivers/gpu/drm/amd/display/dc/bios/command_table2.h | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) commit 623a7e96cd73a46d15f64b1c5e1f4ea3548271f2 Author: Yongqiang Sun Date: Thu Feb 22 16:50:39 2018 -0500 drm/amd/display: Remove 300Mhz minimum disp clk limit. 300Mhz disp clk limit was a workaround that was fixed in SMU and is no longer needed. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +++++ drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 -- 3 files changed, 5 insertions(+), 5 deletions(-) commit 5e3e341cee51a755b81a660806bfcad3fdcfc906 Author: Leo (Sunpeng) Li Date: Fri Feb 23 12:59:03 2018 -0500 drm/amd/display: Convert CTM to 2's complement DRM's documentation for the color transform matrix does not specify whether the values are in signed-magnitude, or 2's complement. Therefore, it was assumed to use 2's complement. However, existing usermode implementations use signed-magnitude. Therefore, conform to existing standards, and convert to 2's complement internally. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit a7596f25db13b1f5a2f8a068d8e9a60a23e34451 Author: SivapiriyanKumarasamy Date: Fri Feb 23 19:01:07 2018 -0500 drm/amd/display: Varibright add null check Add null check for stream update Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Krunoslav Kovac Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9aef1a31709076660f7d5f638ab5ecadea4ca856 Author: SivapiriyanKumarasamy Date: Fri Feb 23 13:04:13 2018 -0500 drm/amd/display: Varibright fix bug and review comments Fix bug and make changes from review 132656 Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 14 +++++++----- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 5 +++++ drivers/gpu/drm/amd/display/dc/dc.h | 5 ----- drivers/gpu/drm/amd/display/dc/dc_stream.h | 4 ++-- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 25 ++++++++++++++++------ .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 + drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 ++ 7 files changed, 37 insertions(+), 19 deletions(-) commit aa5a5777304228819a52562d346bc3eb1b4873fa Author: SivapiriyanKumarasamy Date: Tue Feb 13 17:37:23 2018 -0500 drm/amd/display: Vari-bright looks disabled near end of MM14 Avoid hanging DMCU by setting abm level only when OTG unblanked Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 8 +++++ drivers/gpu/drm/amd/display/dc/dc.h | 5 ++++ drivers/gpu/drm/amd/display/dc/dc_stream.h | 4 +++ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 35 ++++++++++++++-------- 4 files changed, 40 insertions(+), 12 deletions(-) commit d5400aab15761cd836e3d5d0ad34c330784bbe1a Author: Leo (Sunpeng) Li Date: Tue Feb 20 16:03:48 2018 -0500 drm/amd/display: Use correct error codes Should return -ENOMEM when allocation fails. Also, just return the error code instead of using a variable. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 8c45c5db842f9fdfd292b18dcad1b245dd7e1948 Author: Leo (Sunpeng) Li Date: Tue Feb 20 15:46:09 2018 -0500 drm/amd/display: Fix memleaks when atomic check fails. While checking plane states for updates during atomic check, we create dc_plane_states in preparation. These dc states should be freed if something errors. Although the input transfer function is also freed by dc_plane_state_release(), we should free it (on error) under the same scope as where it is created. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 34 +++++++++++++++++------ 1 file changed, 25 insertions(+), 9 deletions(-) commit d179664a2a4f5a06edabf7171bcd65a9e33bcf15 Author: Harry Wentland Date: Thu Mar 8 20:44:15 2018 -0500 drm/amdgpu: Remove some unused elements from amdgpu_connector struct They were used by amdgpu_dm at some point but since it has its own amdgpu_dm_connector now these aren't needed anymore. Signed-off-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 29 ----------------------------- 1 file changed, 29 deletions(-) commit a59b3c80fd0041223ccf720504974a543b81b1d0 Author: Alex Deucher Date: Thu Mar 8 09:56:01 2018 -0500 drm/amdgpu: save/restore backlight level in legacy dce code Save/restore the backlight level scratch register in S3/S4 so the backlight level comes back at the previously requested level. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=199047 Fixes: 4ec6ecf48c64d (drm/amdgpu: drop scratch regs save and restore from S3/S4 handling) Acked-by: Michel Dänzer Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 1 + drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/atombios_encoders.h | 5 +++++ drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 8 ++++++++ 7 files changed, 40 insertions(+), 2 deletions(-) commit 0660b58c9038f5ef94b8fe33716449945ea786e5 Author: Christian König Date: Fri Mar 9 14:44:32 2018 +0100 drm/radeon: fix prime teardown order We unmapped imported DMA-bufs when the GEM handle was dropped, not when the hardware was done with the buffere. Signed-off-by: Christian König Reviewed-by: Michel Dänzer CC: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_gem.c | 2 -- drivers/gpu/drm/radeon/radeon_object.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit 7f8fb919655ef3011b01bb114fef42107957860a Author: Christian König Date: Fri Mar 9 14:42:54 2018 +0100 drm/amdgpu: fix prime teardown order We unmapped imported DMA-bufs when the GEM handle was dropped, not when the hardware was done with the buffere. Signed-off-by: Christian König Reviewed-by: Michel Dänzer CC: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit eab3de23a1639ec9419c1f9239ce651d3c82e7d6 Author: Christian König Date: Wed Mar 14 14:48:17 2018 -0500 drm/amdgpu: explicit give BO type to amdgpu_bo_create Drop the "kernel" and sg parameter and give the BO type to create explicit to amdgpu_bo_create instead of figuring it out from the parameters. Signed-off-by: Christian König Reviewed-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 5 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 8 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 7 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 46 ++++++++++-------------- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 11 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 7 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 11 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 11 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++--- 12 files changed, 60 insertions(+), 66 deletions(-) commit c44ef998f25eaddcd78924f98e5baed602d933e6 Author: Ilya Lesokhin Date: Tue Mar 13 15:18:48 2018 +0200 IB/mlx5: Maintain a single emergency page The mlx5 driver needs to be able to issue invalidation to ODP MRs even if it cannot allocate memory. To this end it preallocates emergency pages to use when the situation arises. This flow should be extremely rare enough, that we don't need to worry about contention and therefore a single emergency page is good enough. Signed-off-by: Ilya Lesokhin Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 42 +++++++++++++++++++++++++----------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 6 +++--- drivers/infiniband/hw/mlx5/mr.c | 11 +++++----- 3 files changed, 37 insertions(+), 22 deletions(-) commit 65edd0e758b8a215825fb3ee685c8eaf6a9cc0d0 Author: Daniel Jurgens Date: Tue Mar 13 15:18:47 2018 +0200 IB/mlx5: Only synchronize RCU once when removing mkeys Instead synchronizing RCU in a loop when removing mkeys in a batch do it once at the end before freeing them. The result is only waiting for one RCU grace period instead of many serially. Signed-off-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 44 ++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 16 deletions(-) commit 72f7cc09b143cf972c8c7571fc95d1017ba76c3d Author: Mark Bloch Date: Tue Mar 13 15:18:46 2018 +0200 IB/mlx5: Expose more priorities for bypass namespace BYPASS namespace is used by the RDMA side to insert flow rules into the vport RX flow tables. Currently only 8 priorities are exposed, increase this to 16 to allow more flexibility. This change will also cause the BYPASS namespace to use 32 levels (as apposed to 16 today) of flow tables, 16 levels for regular rules and 16 for don't trap rules. Reviewed-by: Maor Gottlieb Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/linux/mlx5/device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c62adb7def71d7e0b4ba44f8da81a448eb53d6d5 Author: Bart Van Assche Date: Mon Mar 12 13:55:55 2018 -0700 IB/srp: Fix IPv6 address parsing Split IPv6 addresses at the colon that separates the IPv6 address and the port number instead of at a colon in the middle of the IPv6 address. Check whether the IPv6 address is surrounded with square brackets. Fixes: 19f313438c77 ("IB/srp: Add RDMA/CM support") Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) commit e3364dfc6a76e8d3432f3efd130f3dda6ddd698c Author: Christian König Date: Tue Feb 20 19:42:40 2018 +0100 drm/amdgpu: initial validate the prime BOs into the CPU domain Just set the GTT domain as mandatory, so that the BO is validated into it on first use. This allows us to setup the sg table later on. Signed-off-by: Christian König Acked-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 82dee2418946737b5efa8d84e07ef921727018bc Author: Christian König Date: Tue Feb 20 19:09:56 2018 +0100 drm/amdgpu: drop the backing store when DMA-buf imports are evicted Instead of moving this to the SYSTEM domain just drop the backing store and let the resulting allocation be freed. Signed-off-by: Christian König Acked-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 536bbeba9bd9ab6dc9d175a76a04aa10ea049fea Author: Christian König Date: Wed Feb 28 09:48:22 2018 +0100 drm/ttm: move initializing ttm->sg into ttm_tt_init_fields Better to set this with all other fields as well. Signed-off-by: Christian König Reviewed-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_tt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit dde5da2379319c08ceb2295467df6e60a3cf5da1 Author: Christian König Date: Thu Feb 22 10:18:14 2018 +0100 drm/ttm: add bo as parameter to the ttm_tt_create callback Instead of calculating the size in bytes just to recalculate the number of pages from it pass the BO directly to the function. Signed-off-by: Christian König Reviewed-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++++---- drivers/gpu/drm/ast/ast_ttm.c | 6 +++--- drivers/gpu/drm/bochs/bochs_mm.c | 5 ++--- drivers/gpu/drm/cirrus/cirrus_ttm.c | 6 +++--- drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 5 ++--- drivers/gpu/drm/mgag200/mgag200_ttm.c | 6 +++--- drivers/gpu/drm/nouveau/nouveau_bo.c | 10 ++++------ drivers/gpu/drm/nouveau/nouveau_sgdma.c | 7 +++---- drivers/gpu/drm/nouveau/nouveau_ttm.h | 4 ++-- drivers/gpu/drm/qxl/qxl_ttm.c | 8 ++++---- drivers/gpu/drm/radeon/radeon_ttm.c | 12 ++++++------ drivers/gpu/drm/ttm/ttm_agp_backend.c | 6 +++--- drivers/gpu/drm/ttm/ttm_tt.c | 29 ++++++++++++++--------------- drivers/gpu/drm/virtio/virtgpu_ttm.c | 7 +++---- drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | 10 +++++----- drivers/staging/vboxvideo/vbox_ttm.c | 5 ++--- include/drm/ttm/ttm_bo_driver.h | 6 ++---- include/drm/ttm/ttm_tt.h | 22 ++++++++++------------ 18 files changed, 75 insertions(+), 87 deletions(-) commit 5d95109815493e273a2ef9010df0939aa3cfe10f Author: Christian König Date: Tue Feb 20 15:35:21 2018 +0100 drm/ttm: add ttm_bo_pipeline_gutting Allows us to gut a BO of it's backing store when the driver says that it isn't needed any more. Signed-off-by: Christian König Acked-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 15 ++++++++++++--- drivers/gpu/drm/ttm/ttm_bo_util.c | 24 ++++++++++++++++++++++++ include/drm/ttm/ttm_bo_driver.h | 9 +++++++++ 3 files changed, 45 insertions(+), 3 deletions(-) commit 48527e5296edc7b952fb2c1c40fd8c388cc935ed Author: Monk Liu Date: Mon Jan 15 13:44:30 2018 +0800 drm/amdgpu: refactoring mailbox to fix TDR handshake bugs(v2) this patch actually refactor mailbox implmentations, and all below changes are needed together to fix all those mailbox handshake issues exposured by heavey TDR test. 1)refactor all mailbox functions based on byte accessing for mb_control reason is to avoid touching non-related bits when writing trn/rcv part of mailbox_control, this way some incorrect INTR sent to hypervisor side could be avoided, and it fixes couple handshake bug. 2)trans_msg function re-impled: put a invalid logic before transmitting message to make sure the ACK bit is in a clear status, otherwise there is chance that ACK asserted already before transmitting message and lead to fake ACK polling. (hypervisor side have some tricks to workaround ACK bit being corrupted by VF FLR which hase an side effects that may make guest side ACK bit asserted wrongly), and clear TRANS_MSG words after message transferred. 3)for mailbox_flr_work, it is also re-worked: it takes the mutex lock first if invoked, to block gpu recover's participate too early while hypervisor side is doing VF FLR. (hypervisor sends FLR_NOTIFY to guest before doing VF FLR and sentds FLR_COMPLETE after VF FLR done, and the FLR_NOTIFY will trigger interrupt to guest which lead to mailbox_flr_work being invoked) This can avoid the issue that mailbox trans msg being cleared by its VF FLR. 4)for mailbox_rcv_irq IRQ routine, it should only peek msg and schedule mailbox_flr_work, instead of ACK to hypervisor itself, because FLR_NOTIFY msg sent from hypervisor side doesn't need VF's ACK (this is because VF's ACK would lead to hypervisor clear its trans_valid/msg, and this would cause handshake bug if trans_valid/msg is cleared not due to correct VF ACK but from a wrong VF ACK like this "FLR_NOTIFY" one) This fixed handshake bug that sometimes GUEST always couldn't receive "READY_TO_ACCESS_GPU" msg from hypervisor. 5)seperate polling time limite accordingly: POLL ACK cost no more than 500ms POLL MSG cost no more than 12000ms POLL FLR finish cost no more than 500ms 6) we still need to set adev into in_gpu_reset mode after we received FLR_NOTIFY from host side, this can prevent innocent app wrongly succesed to open amdgpu dri device. FLR_NOFITY is received due to an IDLE hang detected from hypervisor side which indicating GPU is already die in this VF. v2: use MACRO as the offset of mailbox_control register don't test if NOTIFY_CMPL event in rcv_msg since it won't recieve that message anymore Signed-off-by: Monk Liu Reviewed-by: Pixel Ding Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 196 ++++++++++++++++++---------------- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h | 7 +- 2 files changed, 109 insertions(+), 94 deletions(-) commit 421a2a30c121660c4628e4494dcca1fceab8a4be Author: Monk Liu Date: Thu Jan 4 18:13:20 2018 +0800 drm/amdgpu: implement mmio byte access helper for MB mailbox registers can be accessed with a byte boundry according to BIF team, so this patch prepares register byte access and will be used by following patches. Actually, for mailbox registers once the byte field is touched even not changed, the mailbox behaves, so we need the byte width accessing to those sort of regs. Signed-off-by: Monk Liu Reviewed-by: Pixel Ding Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) commit 1e09b05386f32efbebb798cf0341eca4b424c960 Author: Hawking Zhang Date: Thu Mar 8 18:01:24 2018 +0800 drm/amdgpu: query vram type from atombios The vram type for dGPU is stored in umc_info while sys mem type for APU is stored in integratedsysteminfo Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 95 +++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 4 +- include/uapi/drm/amdgpu_drm.h | 1 + 4 files changed, 94 insertions(+), 7 deletions(-) commit bc227cfa444c692fcb0a860c5a9b5f9abb9c2b2b Author: Tom St Denis Date: Fri Mar 9 06:16:55 2018 -0500 drm/amd/amdgpu: Add missing "DDR4" label The commit d296278fd372003fc69588acfd0c0c5edbdf4874 added support for detecting DDR4 but omitted the label that is printed out in amdgpu_bo_init() resulting in a KASAN error. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit edc3d27cbb37280b13479e9d5ea125d1ffe24e59 Author: Emily Deng Date: Thu Mar 8 10:49:09 2018 +0800 drm/amdgpu: Correct the amdgpu_ucode_fini_bo place for Tonga The amdgpu_ucode_fini_bo should be called after gfx_v8_0_hw_fini, or it will have KCQ disable failed issue. For Tonga, as it firstly finishes SMC block, and the SMC hw fini will call amdgpu_ucode_fini, which will lead the amdgpu_ucode_fini_bo called before gfx_v8_0_hw_fini, this is incorrect. Signed-off-by: Emily Deng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) commit 58e955d9defad833f9a23c38521d7bbf01097b1d Author: Emily Deng Date: Thu Mar 8 09:35:19 2018 +0800 drm/amdgpu: Correct the place of amdgpu_pm_sysfs_fini The amdgpu_pm_sysfs_fini should call before amdgpu_device_ip_fini, or the adev->pm.dpm_enabled would be set to 0, then the device files related to pp won't be removed by amdgpu_pm_sysfs_fini when unload driver. Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e89d0d332b7554f149648d293c2b6c77b79be529 Author: Christian König Date: Fri Feb 23 16:08:51 2018 +0100 drm/amdgpu: stop allocating a page array for prime shared BOs We don't need the page array for prime shared BOs, stop allocating it. Signed-off-by: Christian König Reviewed-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 75a57669cbc881032c60615a31bfc6bfab4c813c Author: Christian König Date: Fri Feb 23 15:12:00 2018 +0100 drm/ttm: add ttm_sg_tt_init This allows drivers to only allocate dma addresses, but not a page array. Signed-off-by: Christian König Reviewed-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_tt.c | 54 ++++++++++++++++++++++++++++++++++++-------- include/drm/ttm/ttm_tt.h | 2 ++ 2 files changed, 47 insertions(+), 9 deletions(-) commit 81f5ec025514865fb930d3a665a10a339b113da8 Author: Christian König Date: Thu Feb 22 09:23:44 2018 +0100 drm/ttm: move ttm_tt defines into ttm_tt.h Let's stop mangling everything in a single header and create one header per object instead. Signed-off-by: Christian König Reviewed-by: Roger He Acked-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_tt.c | 6 - include/drm/ttm/ttm_bo_driver.h | 237 +--------------------------------- include/drm/ttm/ttm_tt.h | 272 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 273 insertions(+), 242 deletions(-) commit b0d8bef8ed805ca92eb91e86acf3ce89cbebc8ce Merge: 82b691b fc6eabb Author: Thomas Gleixner Date: Wed Mar 14 20:37:31 2018 +0100 Merge branch 'linus' into irq/core to pick up dependencies. commit 089915f0f23f1a09b4aecebe88212c5a4fef37fa Author: Jacob Keller Date: Thu Mar 8 14:52:11 2018 -0800 i40e: restore TCPv4 input set when re-enabling ATR When we re-enable ATR we need to restore the input set for TCPv4 filters, in order for ATR to function correctly. We already do this for the normal case of re-enabling ATR when disabling ntuple support. However, when re-enabling ATR after the last TCPv4 filter is removed (but when ntuple support is still active), we did not restore the TCPv4 filter input set. This can cause problems if the TCPv4 filters from FDir had changed the input set, as ATR will no longer behave as expected. When clearing the ATR auto-disable flag, make sure we restore the TCPv4 input set to avoid this. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 19b1f54099b6ee334acbfbcfbdffd1d1f057216d Author: Leon Romanovsky Date: Sun Mar 11 13:51:35 2018 +0200 RDMA/verbs: Simplify modify QP check All callers to ib_modify_qp_is_ok() provides enum ib_qp_state makes the checks of out-of-scope redundant. Let's remove them together with updating function signature to return boolean result. Signed-off-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 20 ++++++++------------ include/rdma/ib_verbs.h | 6 +++--- 2 files changed, 11 insertions(+), 15 deletions(-) commit fbf1795c969ae81a0c292ca0ee0baa944da4ede3 Author: Leon Romanovsky Date: Sun Mar 11 13:51:34 2018 +0200 RDMA/pvrdma: Properly annotate QP states QP states provided by core layer are converted to enum ib_qp_state and better to use internal variable in that type instead of int. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88de869bbe4fb669ae92f19225a90b07d8173ccb Author: Leon Romanovsky Date: Sun Mar 11 13:51:33 2018 +0200 RDMA/uverbs: Ensure validity of current QP state value The QP state is internal enum which is checked at the driver level by calling to ib_modify_qp_is_ok(). Move this check closer to user and leave kernel users to be checked by compiler. Signed-off-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 75a4598209cbe45540baa316c3b51d9db222e96e Author: Leon Romanovsky Date: Sun Mar 11 13:51:32 2018 +0200 RDMA/mlx5: Fix NULL dereference while accessing XRC_TGT QPs mlx5 modify_qp() relies on FW that the error will be thrown if wrong state is supplied. The missing check in FW causes the following crash while using XRC_TGT QPs. [ 14.769632] BUG: unable to handle kernel NULL pointer dereference at (null) [ 14.771085] IP: mlx5_ib_modify_qp+0xf60/0x13f0 [ 14.771894] PGD 800000001472e067 P4D 800000001472e067 PUD 14529067 PMD 0 [ 14.773126] Oops: 0002 [#1] SMP PTI [ 14.773763] CPU: 0 PID: 365 Comm: ubsan Not tainted 4.16.0-rc1-00038-g8151138c0793 #119 [ 14.775192] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org 04/01/2014 [ 14.777522] RIP: 0010:mlx5_ib_modify_qp+0xf60/0x13f0 [ 14.778417] RSP: 0018:ffffbf48001c7bd8 EFLAGS: 00010246 [ 14.779346] RAX: 0000000000000000 RBX: ffff9a8f9447d400 RCX: 0000000000000000 [ 14.780643] RDX: 0000000000000000 RSI: 000000000000000a RDI: 0000000000000000 [ 14.781930] RBP: 0000000000000000 R08: 00000000000217b0 R09: ffffffffbc9c1504 [ 14.783214] R10: fffff4a180519480 R11: ffff9a8f94523600 R12: ffff9a8f9493e240 [ 14.784507] R13: ffff9a8f9447d738 R14: 000000000000050a R15: 0000000000000000 [ 14.785800] FS: 00007f545b466700(0000) GS:ffff9a8f9fc00000(0000) knlGS:0000000000000000 [ 14.787073] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 14.787792] CR2: 0000000000000000 CR3: 00000000144be000 CR4: 00000000000006b0 [ 14.788689] Call Trace: [ 14.789007] _ib_modify_qp+0x71/0x120 [ 14.789475] modify_qp.isra.20+0x207/0x2f0 [ 14.790010] ib_uverbs_modify_qp+0x90/0xe0 [ 14.790532] ib_uverbs_write+0x1d2/0x3c0 [ 14.791049] ? __handle_mm_fault+0x93c/0xe40 [ 14.791644] __vfs_write+0x36/0x180 [ 14.792096] ? handle_mm_fault+0xc1/0x210 [ 14.792601] vfs_write+0xad/0x1e0 [ 14.793018] SyS_write+0x52/0xc0 [ 14.793422] do_syscall_64+0x75/0x180 [ 14.793888] entry_SYSCALL_64_after_hwframe+0x21/0x86 [ 14.794527] RIP: 0033:0x7f545ad76099 [ 14.794975] RSP: 002b:00007ffd78787468 EFLAGS: 00000287 ORIG_RAX: 0000000000000001 [ 14.795958] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f545ad76099 [ 14.797075] RDX: 0000000000000078 RSI: 0000000020009000 RDI: 0000000000000003 [ 14.798140] RBP: 00007ffd78787470 R08: 00007ffd78787480 R09: 00007ffd78787480 [ 14.799207] R10: 00007ffd78787480 R11: 0000000000000287 R12: 00005599ada98760 [ 14.800277] R13: 00007ffd78787560 R14: 0000000000000000 R15: 0000000000000000 [ 14.801341] Code: 4c 8b 1c 24 48 8b 83 70 02 00 00 48 c7 83 cc 02 00 00 00 00 00 00 48 c7 83 24 03 00 00 00 00 00 00 c7 83 2c 03 00 00 00 00 00 00 00 00 00 00 00 48 8b 83 70 02 00 00 c7 40 04 00 00 00 00 4c [ 14.804012] RIP: mlx5_ib_modify_qp+0xf60/0x13f0 RSP: ffffbf48001c7bd8 [ 14.804838] CR2: 0000000000000000 [ 14.805288] ---[ end trace 3f1da0df5c8b7c37 ]--- Cc: syzkaller Reported-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bc2a3a6cdb00c7e3c04735370fb5777d3cae22d2 Author: Mariusz Stachura Date: Thu Mar 8 14:52:10 2018 -0800 i40e: fix for wrong partition id calculation on OCP mezz cards This patch overwrites number of ports for X722 devices with support for OCP PHY mezzanine. The old method with checking if port is disabled in the PRTGEN_CNF register cannot be used in this case. When the OCP is removed, ports were seen as disabled, which resulted in wrong calculation of partition id, that caused WoL to be disabled on certain ports. Signed-off-by: Mariusz Stachura Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_common.c | 23 ++++++++++++++++++++++- drivers/net/ethernet/intel/i40e/i40e_type.h | 3 +++ 2 files changed, 25 insertions(+), 1 deletion(-) commit 01c96952847d6478e47ebe8194217b40b922d791 Author: Jacob Keller Date: Thu Mar 8 14:52:09 2018 -0800 i40e: factor out re-enable functions for ATR and SB A future patch needs to expand on the logic for re-enabling ATR. Doing so would cause some code to break the 80-character line limit. To reduce the level of indentation, factor out helper functions for re-enabling ATR and SB rules. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 48 +++++++++++++++++++---------- 1 file changed, 32 insertions(+), 16 deletions(-) commit 6ac6d5a7ff424354074d21a68c2018a8b6fe4fc6 Author: Jacob Keller Date: Thu Mar 8 14:52:08 2018 -0800 i40e: track filter type statistics when deleting invalid filters When hardware has trouble with a particular filter, we delete it from the list. Unfortunately, we did not properly update the per-filter statistic when doing so. Create a helper function to handle this, and properly reduce the necessary counter so that it tracks the number of active filters properly. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 56 ++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 8 deletions(-) commit 745dd37f9d67c75d6cf1a1bebfcca71bdeb7a34c Merge: 0242874 18a9552 Author: Thomas Gleixner Date: Wed Mar 14 20:23:25 2018 +0100 Merge branch 'x86/urgent' into x86/mm to pick up dependencies commit 03ce7b1d23498c97bc530a1296852af0cdd2fe77 Author: Filip Sadowski Date: Thu Mar 8 14:52:07 2018 -0800 i40e: Fix permission check for VF MAC filters When VF requests adding of MAC filters the checking is done against number of already present MAC filters not adding them at the same time. It makes it possible to add a bunch of filters at once possibly exceeding acceptable limit of I40E_VC_MAX_MAC_ADDR_PER_VF filters. This happens because when checking vf->num_mac, we do not check how many filters are being requested at once. Modify the check function to ensure that it knows how many filters are being requested. This allows the check to ensure that the total number of filters in a single request does not cause us to go over the limit. Additionally, move the check to within the lock to ensure that the vf->num_mac is checked while holding the lock to maintain consistency. We could have simply moved the call to i40e_vf_check_permission to within the loop, but this could cause a request to be non-atomic, and add some but not all the addresses, while reporting an error code. We want to avoid this behavior so that users are not confused about which filters have or have not been added. Signed-off-by: Filip Sadowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 79 ++++++++++++++-------- 1 file changed, 51 insertions(+), 28 deletions(-) commit 2972b00797588b5cfdd8369612cca8415a4e9e73 Author: Jacob Keller Date: Thu Mar 8 14:52:06 2018 -0800 i40e: Cleanup i40e_vlan_rx_register We used to use the function i40e_vlan_rx_register as a way to hook into the now defunct .ndo_vlan_rx_register netdev hook. This was removed but we kept the function around because we still used it internally to control enabling or disabling of VLAN stripping. As pointed out in upstream review, VLAN stripping is only used in a single location and the previous function is quite small, just inline it into i40e_restore_vlan() rather than carrying the function separately. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) commit 028daf80117376b22909becd9720daaefdfceff4 Author: Paweł Jabłoński Date: Thu Mar 8 14:52:05 2018 -0800 i40e: Fix attach VF to VM issue Fix for "Resource temporarily unavailable" problem when virsh is trying to attach a device to VM. When the VF driver is loaded on host and virsh is trying to attach it to the VM and set a MAC address, it ends with a race condition between i40e_reset_vf and i40e_ndo_set_vf_mac functions. The bug is fixed by adding polling in i40e_ndo_set_vf_mac function For when the VF is in Reset mode. Signed-off-by: Paweł Jabłoński Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 20dd9147c96e0dfd628fe42840e8f8d5ccd077c5 Author: Gustavo A R Silva Date: Thu Feb 15 11:44:35 2018 -0600 i40evf/i40evf_main: Fix variable assignment in i40evf_parse_cls_flower It seems this is a copy-paste error and that the proper variable to use in this particular case is _src_ instead of _dst_. Addresses-Coverity-ID: 1465282 ("Copy-paste error") Fixes: 0075fa0fadd0 ("i40evf: Add support to apply cloud filters") Signed-off-by: Gustavo A R Silva Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f71e2b11ceed122343a0ec5c3c10fefb91c2838 Author: Corentin Labbe Date: Sun Jan 28 20:22:30 2018 +0000 i40e: remove i40e_fcoe files i40e_fcoe support was removed via commit 9eed69a9147c ("i40e: Drop FCoE code from core driver files") But this left files in place but un-compilable. Let's finish the cleaning. Signed-off-by: Corentin Labbe Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 1571 --------------------------- drivers/net/ethernet/intel/i40e/i40e_fcoe.h | 127 --- 2 files changed, 1698 deletions(-) commit ccc40c53c07ba22cfe711cd625f9f0c77f272ae6 Author: Christian Borntraeger Date: Thu Mar 8 12:48:05 2018 +0000 KVM: s390: provide counters for all interrupt injects/delivery For testing the exitless interrupt support it turned out useful to have separate counters for inject and delivery of I/O interrupt. While at it do the same for all interrupt types. For timer related interrupts (clock comparator and cpu timer) we even had no delivery counters. Fix this as well. On this way some counters are being renamed to have a similar name. Signed-off-by: Christian Borntraeger Reviewed-by: Cornelia Huck arch/s390/include/asm/kvm_host.h | 25 +++++++++++++++++++++---- arch/s390/kvm/interrupt.c | 25 +++++++++++++++++++++---- arch/s390/kvm/kvm-s390.c | 24 +++++++++++++++++++++--- 3 files changed, 63 insertions(+), 11 deletions(-) commit 32de0749097ea5be5af7f06bc26cf4e06958ac0f Author: QingFeng Hao Date: Fri Mar 2 11:56:47 2018 +0100 KVM: add machine check counter to kvm_stat This counter can be used for administration, debug or test purposes. Suggested-by: Vladislav Mironov Signed-off-by: QingFeng Hao Reviewed-by: Christian Borntraeger Reviewed-by: Cornelia Huck Reviewed-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 1 + arch/s390/kvm/interrupt.c | 1 + arch/s390/kvm/kvm-s390.c | 1 + 3 files changed, 3 insertions(+) commit 258400304225a219a2d98f29fe957df98789a843 Author: Farhan Ali Date: Thu Feb 22 11:22:24 2018 -0500 s390/setup: enable display support for KVM guest The S390 architecture does not support any graphics hardware, but with the latest support for Virtio GPU in Linux and Virtio GPU emulation in QEMU, it's possible to enable graphics for S390 using the Virtio GPU device. To enable display we need to enable the Linux Virtual Terminal (VT) layer for S390. But the VT subsystem initializes quite early at boot so we need a dummy console driver till the Virtio GPU driver is initialized and we can run the framebuffer console. The framebuffer console over a Virtio GPU device can be run in combination with the serial SCLP console (default on S390). The SCLP console can still be accessed by management applications (eg: via Libvirt's virsh console). Signed-off-by: Farhan Ali Acked-by: Christian Borntraeger Reviewed-by: Thomas Huth Message-Id: Signed-off-by: Christian Borntraeger Acked-by: Greg Kroah-Hartman arch/s390/kernel/setup.c | 2 ++ drivers/tty/Kconfig | 2 +- drivers/video/console/Kconfig | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) commit daea5469e184209420770fcf47f3db3d7a6d04ee Author: Farhan Ali Date: Thu Feb 22 11:22:23 2018 -0500 s390/char: Rename EBCDIC keymap variables The Linux Virtual Terminal (VT) layer provides a default keymap which is compiled when VT layer is enabled. But at the same time we are also compiling the EBCDIC keymap and this causes the linker to complain. So let's rename the EBCDIC keymap variables to prevent linker conflict. Signed-off-by: Farhan Ali Acked-by: Christian Borntraeger Acked-by: Heiko Carstens Reviewed-by: Thomas Huth Message-Id: Signed-off-by: Christian Borntraeger drivers/s390/char/defkeymap.c | 66 ++++++++++++++++++++++--------------------- drivers/s390/char/keyboard.c | 32 ++++++++++----------- drivers/s390/char/keyboard.h | 11 ++++++++ 3 files changed, 61 insertions(+), 48 deletions(-) commit 5c420fcb100d5074cd983b0107f4f78c3503c9e2 Author: Farhan Ali Date: Thu Feb 22 11:22:22 2018 -0500 Kconfig: Remove HAS_IOMEM dependency for Graphics support The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")' added the HAS_IOMEM dependecy for "Graphics support". This disabled the "Graphics support" menu for S390. But if we enable VT layer for S390, we would also need to enable the dummy console. So let's remove the HAS_IOMEM dependency. Move this dependency to sub menu items and console drivers that use io memory. Signed-off-by: Farhan Ali Reviewed-by: Thomas Huth Message-Id: <6e8ef238162df5be4462126be155975c722e9863.1519315352.git.alifm@linux.vnet.ibm.com> Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Christian Borntraeger drivers/video/Kconfig | 5 ++++- drivers/video/console/Kconfig | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) commit 4ed8773b5055363f1666345dd5ae5af12c7c6268 Author: Sebastian Ott Date: Mon Jan 29 16:12:30 2018 +0100 KVM: s390: fix fallthrough annotation A case statement in kvm_s390_shadow_tables uses fallthrough annotations which are not recognized by gcc because they are hidden within a block. Move these annotations out of the block to fix (W=1) warnings like below: arch/s390/kvm/gaccess.c: In function 'kvm_s390_shadow_tables': arch/s390/kvm/gaccess.c:1029:26: warning: this statement may fall through [-Wimplicit-fallthrough=] case ASCE_TYPE_REGION1: { ^ Signed-off-by: Sebastian Ott Reviewed-by: Cornelia Huck Reviewed-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/gaccess.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit a5e0acea9ed644d622281a4a8fde94a2e24ec7e8 Author: Christian Borntraeger Date: Fri Feb 23 07:57:33 2018 +0000 KVM: s390: add exit io request stats and simplify code We want to count IO exit requests in kvm_stat. At the same time we can get rid of the handle_noop function. Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 1 + arch/s390/kvm/intercept.c | 17 ++++------------- arch/s390/kvm/kvm-s390.c | 1 + 3 files changed, 6 insertions(+), 13 deletions(-) commit 5c2b4d5b78144dfe3e8769b52ae89f34d0efe3af Author: Christian Borntraeger Date: Thu Feb 22 13:40:04 2018 +0000 KVM: document KVM_CAP_S390_[BPB|PSW|GMAP|COW] commit 35b3fde6203b ("KVM: s390: wire up bpb feature") has no documentation for KVM_CAP_S390_BPB. While adding this let's also add other missing capabilities like KVM_CAP_S390_PSW, KVM_CAP_S390_GMAP and KVM_CAP_S390_COW. Reviewed-by: Cornelia Huck Reviewed-by: David Hildenbrand Reviewed-by: Janosch Frank Signed-off-by: Christian Borntraeger Documentation/virtual/kvm/api.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 163cf842f5837334bc69aaf09ad38e11f4573914 Author: Arnd Bergmann Date: Tue Mar 13 14:18:46 2018 +0100 debugobjects: Avoid another unused variable warning debug_objects_maxchecked is only updated in __debug_check_no_obj_freed(), and only read in debug_objects_maxchecked, unfortunately both of these are optional and depend on different Kconfig symbols. When both CONFIG_DEBUG_OBJECTS_FREE and CONFIG_DEBUG_FS are disabled this warning is emitted: lib/debugobjects.c:56:14: error: 'debug_objects_maxchecked' defined but not used [-Werror=unused-variable] Rather than trying to add more complex #ifdef protections, mark the variable as __maybe_unused so it can be silently dropped when usused. Fixes: bd9dcd046509 ("debugobjects: Export max loops counter") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Acked-by: Yang Shi Cc: Waiman Long Link: https://lkml.kernel.org/r/20180313131857.158876-1-arnd@arndb.de lib/debugobjects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 720b5fc3ca0f72b30452089d0510cd1e81a3df6d Author: Sylwester Nawrocki Date: Tue Mar 13 18:12:20 2018 +0100 ARM: dts: exynos: Add #sound-dai-cells property to exynos5250 i2s nodes The #sound-dai-cells property may be required to reference the CPU DAI properly. This change is required for Snow HDMI audio. Signed-off-by: Sylwester Nawrocki Reported-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5250.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit ad4365f138363cc9c2271d4181bc35e3f06551de Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:45 2018 -0800 firmware: enable to split firmware_class into separate target files The firmware loader code has grown quite a bit over the years. The practice of stuffing everything we need into one file makes the code hard to follow. In order to split the firmware loader code into different components we must pick a module name and a first object target file. We must keep the firmware_class name to remain compatible with scripts which have been relying on the sysfs loader path for years, so the old module name stays. We can however rename the C file without affecting the module name. The firmware_class used to represent the idea that the code was a simple sysfs firmware loader, provided by the struct class firmware_class. The sysfs firmware loader used to be the default, today its only the fallback mechanism. This only renames the target code then to make emphasis of what the code does these days. With this change new features can also use a new object files. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/base/Makefile | 1 + drivers/base/firmware_class.c | 1940 ---------------------------------------- drivers/base/firmware_loader.c | 1940 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1941 insertions(+), 1940 deletions(-) commit 9cc853203c3bf4d3b0c466c5525750c071624b05 Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:44 2018 -0800 test_firmware: replace syfs fallback check with kconfig_has helper Now that we have a kconfig checker just use that instead of relying on testing a sysfs directory being present, since our requirements are spelled out. Acked-by: Kees Cook Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/firmware/fw_fallback.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ef557787f4f04b62d7a50101154ffe1614b88a7a Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:43 2018 -0800 test_firmware: enable custom fallback testing on limited kernel configs When a kernel is not built with: CONFIG_HAS_FW_LOADER_USER_HELPER_FALLBACK=y We don't currently enable testing fw_fallback.sh. For kernels that still enable the fallback mechanism, its possible to use the async request firmware API call request_firmware_nowait() using the custom interface to use the fallback mechanism, so we should be able to test this but we currently cannot. We can enable testing without CONFIG_HAS_FW_LOADER_USER_HELPER_FALLBACK=y by relying on /proc/config.gz (CONFIG_IKCONFIG_PROC), if present. If you don't have this we'll have no option but to rely on old heuristics for now. We stuff the new kconfig_has() helper into our shared library as we'll later expando on its use elsewhere. Acked-by: Kees Cook Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/firmware/config | 4 ++++ tools/testing/selftests/firmware/fw_fallback.sh | 6 +++++- tools/testing/selftests/firmware/fw_lib.sh | 24 ++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) commit 29a1c00ce1df8a75bea6e6a86876a10c8dcc2c59 Author: Luis R. Rodriguez Date: Sat Mar 10 06:14:42 2018 -0800 test_firmware: add simple firmware firmware test library We'll expland on this later, for now just add basic module checker. While at it, move this all to use /bin/bash as we'll have much more flexibility with it. Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/firmware/fw_fallback.sh | 7 ++-- tools/testing/selftests/firmware/fw_filesystem.sh | 20 ++--------- tools/testing/selftests/firmware/fw_lib.sh | 44 +++++++++++++++++++++++ 3 files changed, 51 insertions(+), 20 deletions(-) commit bb0829a741792b56c908d7745bc0b2b540293bcc Author: Colin Ian King Date: Tue Feb 27 16:21:05 2018 +0000 mei: remove dev_err message on an unsupported ioctl Currently the driver spams the kernel log on unsupported ioctls which is unnecessary as the ioctl returns -ENOIOCTLCMD to indicate this anyway. I suspect this was originally for debugging purposes but it really is not required so remove it. Signed-off-by: Colin Ian King Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/main.c | 1 - 1 file changed, 1 deletion(-) commit af336cabe08363ba8493e7d7e5d070353eb30caa Author: Alexander Usyskin Date: Sun Feb 25 20:07:05 2018 +0200 mei: limit the number of queued writes Limit the number of queued writes per client. Writes above this threshold are blocked till place in the transmit queue is available. The limit is configurable via sysfs and defaults to 50. The implementation should provide blocking I/O behavior. Prior to this change one would end up in the hands of OOM. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-class-mei | 9 ++++ drivers/misc/mei/bus.c | 17 +++++++ drivers/misc/mei/client.c | 82 +++++++++++++++++++------------ drivers/misc/mei/debugfs.c | 7 +-- drivers/misc/mei/init.c | 1 + drivers/misc/mei/main.c | 65 ++++++++++++++++++++++++ drivers/misc/mei/mei_dev.h | 8 +++ 7 files changed, 154 insertions(+), 35 deletions(-) commit 257355a44b9929e55d6fd47bfff66971dc4de948 Author: Tomas Winkler Date: Sun Feb 25 20:07:04 2018 +0200 mei: make module referencing local to the bus.c Module reference counting is relevant only to the mei client devices. Make the implementation clean and move it to bus.c Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/bus.c | 66 ++++++++++++++++++++++++---------------------- drivers/misc/mei/client.c | 5 ---- drivers/misc/mei/mei_dev.h | 2 -- 3 files changed, 34 insertions(+), 39 deletions(-) commit 6de3ff900090a9913cebfdc6e9c6c4b65e96393c Author: Arnd Bergmann Date: Tue Mar 13 18:23:06 2018 +0000 PCI: tegra: Add PCI_MSI_IRQ_DOMAIN kconfig dependency Building the tegra PCIe host driver without MSI results in a link failure: drivers/pci/host/pci-tegra.o:(.data+0x70): undefined reference to `pci_msi_unmask_irq' drivers/pci/host/pci-tegra.o:(.data+0x74): undefined reference to `pci_msi_mask_irq' This adds the same dependency that everyone else uses. Signed-off-by: Arnd Bergmann [lorenzo.pieralisi@arm.com: rewrote commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/host/Kconfig | 1 + 1 file changed, 1 insertion(+) commit dbb3fb45edfff70ac62e5b841a8da634f7e3c1d9 Author: Patrice Chotard Date: Wed Mar 14 18:22:07 2018 +0100 ARM: dts: STi: Remove "console=ttyASN" from bootargs for STi boards As serial interface is already specified into stdout-path property, "console=ttyASN,115200" from bootargs can be removed. Signed-off-by: Patrice Chotard Signed-off-by: Greg Kroah-Hartman arch/arm/boot/dts/stih407-b2120.dts | 2 +- arch/arm/boot/dts/stih410-b2120.dts | 2 +- arch/arm/boot/dts/stih410-b2260.dts | 2 +- arch/arm/boot/dts/stih418-b2199.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit bb479444d17b950bcbd84d8d4ace04b9b24061cb Author: Dong Aisheng Date: Fri Mar 9 14:47:19 2018 +0000 nvmem: imx-ocotp: remove unused dead code remove unused dead code Cc: Srinivas Kandagatla Cc: Shawn Guo Signed-off-by: Dong Aisheng Acked-by: Shawn Guo Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 2 -- 1 file changed, 2 deletions(-) commit a1078b440fdf1b43024b1e2c9806bdd39ae6502a Author: Dong Aisheng Date: Fri Mar 9 14:47:18 2018 +0000 dt-bindings: nvmem: imx-ocotp: update the binding to reflect data cells imx-ocotp is implemented based on nvmem which can have data cells as child node. Update the binding doc to reflect it to be more easily understood by users. Cc: Srinivas Kandagatla Cc: Rob Herring Cc: Mark Rutland Cc: Shawn Guo Signed-off-by: Dong Aisheng Acked-by: Shawn Guo Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/nvmem/imx-ocotp.txt | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit 0ab09d651b5858f9bc7d5f74e725334a661828e0 Author: Icenowy Zheng Date: Fri Mar 9 14:47:17 2018 +0000 nvmem: sunxi-sid: fix H3 SID controller support It seems that doing some operation will make the value pre-read on H3 SID controller wrong again, so all operation should be performed by register. Change the SID reading to use register only. Signed-off-by: Icenowy Zheng Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/sunxi_sid.c | 71 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 21 deletions(-) commit 80b820cae421a424c2a1cd37bb714c47519086cd Author: Andrey Yurovsky Date: Fri Mar 9 14:47:16 2018 +0000 nvmem: add i.MX7 support to snvs-lpgpr The i.MX7 family has similar SNVS hardware so make the snvs-lpgpr support it along with the i.MX6 family. The register interface is the same except for the number and offset of the general purpose registers. Signed-off-by: Andrey Yurovsky Reviewed-by: Oleksij Rempel Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/nvmem/snvs-lpgpr.txt | 3 ++- drivers/nvmem/Kconfig | 4 ++-- drivers/nvmem/snvs_lpgpr.c | 27 +++++++++++++++++----- 3 files changed, 25 insertions(+), 9 deletions(-) commit b7743a9944ed781e233cd63305bf5430d501061f Author: Andrey Smirnov Date: Fri Mar 9 14:47:15 2018 +0000 nvmem: bcm-ocotp: Do not use "&pdev->dev" explicitly There's "dev" variable for this already. Use it. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/bcm-ocotp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b28b7381b0e8c0aaba04de2055a8dccb7f8d105d Author: Andrey Smirnov Date: Fri Mar 9 14:47:14 2018 +0000 nvmem: imx-iim: Do not use "&pdev->dev" explicitly There's already "dev" variable for that. Use it. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-iim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e84d1f960d52f37d1974705cb2fef81bd1f61a55 Author: Andrey Smirnov Date: Fri Mar 9 14:47:13 2018 +0000 nvmem: rockchip-efuse: Do not use "&pdev->dev" explicitly There's "dev" variable for this already. Use it. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/rockchip-efuse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d5007f75abdc612831af39b1654ba1b4a8182f5b Author: Andrey Smirnov Date: Fri Mar 9 14:47:12 2018 +0000 nvmem: vf610-ocotp: Do not use "&pdev->dev" explicitly There already a "dev" variable for that. Use it. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/vf610-ocotp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7b4e76cb179301efeeb9a3f601c00b585622f89a Author: Andrey Smirnov Date: Fri Mar 9 14:47:11 2018 +0000 nvmem: rockchip-efuse: Make use of of_device_get_match_data() Simplify code a bit by using of_device_get_match_data() instead of of_match_device(). Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/rockchip-efuse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0e189891f668f0aedf09baa8e8cd69ee6515c278 Author: Andrey Smirnov Date: Fri Mar 9 14:47:10 2018 +0000 nvmem: snvs_lpgpr: Convert commas to semicolons Looks like commas were accidentally used where semicolons were supposed to be. Fix that. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/snvs_lpgpr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e5692efe8120abfb72cb4156be2f2d9a2ffc859b Author: Andrey Smirnov Date: Fri Mar 9 14:47:09 2018 +0000 nvmem: qfprom: Convert to use devm_nvmem_register() Drop all of the code related to .remove hook and make use of devm_nvmem_register() instead. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/qfprom.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit b2236dbd771a26ed3580b113e45b7a145550c8d9 Author: Andrey Smirnov Date: Fri Mar 9 14:47:08 2018 +0000 nvmem: bcm-ocotp: Convert to use devm_nvmem_register() Drop all of the code related to .remove hook and make use of devm_nvmem_register() instead. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/bcm-ocotp.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 547a2c9b0eba57bb4e7a7e624e8f86b6c6c3a57d Author: Andrey Smirnov Date: Fri Mar 9 14:47:07 2018 +0000 nvmem: imx-iim: Convert to use devm_nvmem_register() Drop all of the code related to .remove hook and make use of devm_nvmem_register() instead. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-iim.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit b005b2f52ea66ca09d372dfbcac68242c1addfdd Author: Andrey Smirnov Date: Fri Mar 9 14:47:06 2018 +0000 nvmem: lpc18xx_otp: Convert to use devm_nvmem_register() Drop all of the code related to .remove hook and make use of devm_nvmem_register() instead. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/lpc18xx_otp.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 90696a4097e35fcbded56ce923854141b01a2d04 Author: Andrey Smirnov Date: Fri Mar 9 14:47:05 2018 +0000 nvmem: meson-efuse: Convert to use devm_nvmem_register() Drop all of the code related to .remove hook and make use of devm_nvmem_register() instead. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/meson-efuse.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 7afbde9eb0a24e9d6be10744cfad9099bb7f062a Author: Andrey Smirnov Date: Fri Mar 9 14:47:04 2018 +0000 nvmem: meson-mx-efuse: Convert to use devm_nvmem_register() Drop all of the code related to .remove hook and make use of devm_nvmem_register() instead. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/meson-mx-efuse.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 7e68a6454636bec29e6acc56e910282d81c4023d Author: Andrey Smirnov Date: Fri Mar 9 14:47:03 2018 +0000 nvmem: mtk-efuse: Convert to use devm_nvmem_register() Drop all of the code related to .remove hook and make use of devm_nvmem_register() instead. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/mtk-efuse.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit f4bec713938afe763494e350ea6e0f81dff9d229 Author: Andrey Smirnov Date: Fri Mar 9 14:47:02 2018 +0000 nvmem: rockchip-efuse: Convert to use devm_nvmem_register() Drop all of the code related to .remove hook and make use of devm_nvmem_register() instead. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/rockchip-efuse.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 5557acf6b3c8dde1d03c0080303d17f2552828f5 Author: Andrey Smirnov Date: Fri Mar 9 14:47:01 2018 +0000 nvmem: snvs_lgpr: Convert to use devm_nvmem_register() Drop all of the code related to .remove hook and make use of devm_nvmem_register() instead. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/snvs_lpgpr.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 45ff8ef7fa6e87f96bdcf1e979f143a78918954c Author: Andrey Smirnov Date: Fri Mar 9 14:47:00 2018 +0000 nvmem: uniphier-efuse: Convert to use devm_nvmem_register() Drop all of the code related to .remove hook and make use of devm_nvmem_register() instead. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/uniphier-efuse.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit a830274f7e94bf06efefefb43955dbf07400e3d8 Author: Andrey Smirnov Date: Fri Mar 9 14:46:59 2018 +0000 nvmem: imx-ocotp: Convert to use devm_nvmem_register() Drop all of the code related to .remove hook and make use of devm_nvmem_register() instead. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit fae8e89e83b06540b09ce36d557122466704c633 Author: Andrey Smirnov Date: Fri Mar 9 14:46:58 2018 +0000 nvmem: vf610-ocotp: Convert to use devm_nvmem_register() Drop all of the code related to .remove hook and make use of devm_nvmem_register() instead. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/vf610-ocotp.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) commit f1f50eca5f90527d2cca3479cda08883958777f6 Author: Andrey Smirnov Date: Fri Mar 9 14:46:57 2018 +0000 nvmem: Introduce devm_nvmem_(un)register() Introduce devm_nvmem_register()/devm_nvmem_unregister() to make .remove() unnecessary in trivial drivers. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 59 ++++++++++++++++++++++++++++++++++++++++++ include/linux/nvmem-provider.h | 17 ++++++++++++ 2 files changed, 76 insertions(+) commit fd0f4906a3cdf2fedc980764a073f2313bdf1f47 Author: Andrey Smirnov Date: Fri Mar 9 14:46:56 2018 +0000 nvmem: core: Allow specifying device name verbatim Add code to allow avoid having nvmem core append a numeric suffix to the end of the name by passing config->id of -1. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 11 ++++++++--- include/linux/nvmem-provider.h | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-) commit 0b2ed745e76debad33410870c4850ef2ca42f5e3 Author: Andrey Smirnov Date: Fri Mar 9 14:46:55 2018 +0000 nvmem: Document struct nvmem_config Add a simple description of struct nvmem_config and its fields. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman include/linux/nvmem-provider.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 29ea6be366560f9dba60d0995ae18e54c8b6a04f Author: Johannes Thumshirn Date: Mon Mar 12 10:41:19 2018 +0100 mcb: add Altera PCI ID to mcb-pci Some older PCI attached MEN FPGAs use an Altera PCI Vendor ID instead of the MEN one. Add it to the PCI ID table so the driver automatically attaches to it. Signed-off-by: Johannes Thumshirn Reported-by: Ben Turner Tested-by: Ben Turner Cc: Andreas Geißler Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/mcb/mcb-pci.c | 1 + 1 file changed, 1 insertion(+) commit c4ccc893ce2ab819171f797e8b2c702cc87cb84a Author: Johannes Thumshirn Date: Mon Mar 12 10:41:18 2018 +0100 PCI: Add Altera vendor ID Add the Altera PCI Vendor id to pci_ids.h and remove the private definitions from xillybus_pcie.c and altera-cvp.c. Signed-off-by: Johannes Thumshirn Cc: Bjorn Helgaas Cc: Eli Billauer Cc: Anatolij Gustschin Acked-by: Eli Billauer Acked-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/char/xillybus/xillybus_pcie.c | 1 - drivers/fpga/altera-cvp.c | 2 -- include/linux/pci_ids.h | 2 ++ 3 files changed, 2 insertions(+), 3 deletions(-) commit e6b965705685c7fc2f24a68410529f86c08c7277 Author: Christoph Hellwig Date: Tue Mar 13 23:15:29 2018 -0700 xfs: refactor xfs_log_force Streamline the conditionals so that it is more obvious which specific case form the top of the function comments is being handled. Use gotos only for early returns. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 144 ++++++++++++++++++++++++------------------------------- 1 file changed, 63 insertions(+), 81 deletions(-) commit 656de4ffaffd921e1b45de4150c86ba50da135e9 Author: Christoph Hellwig Date: Tue Mar 13 23:15:28 2018 -0700 xfs: merge _xfs_log_force_lsn and xfs_log_force_lsn Switch to a single interface for flushing the log to a specific LSN, which gives consistent trace point coverage and a less confusing interface. The was only a single user of the previous xfs_log_force_lsn function, which now also passes a NULL log_flushed argument. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_export.c | 2 +- fs/xfs/xfs_file.c | 4 ++-- fs/xfs/xfs_inode.c | 2 +- fs/xfs/xfs_log.c | 18 ++---------------- fs/xfs/xfs_log.h | 9 ++------- fs/xfs/xfs_trans.c | 2 +- 6 files changed, 9 insertions(+), 28 deletions(-) commit 60e5bb7844ec75a2f54ea76d8ceec5c79172ce7e Author: Christoph Hellwig Date: Tue Mar 13 23:15:28 2018 -0700 xfs: merge _xfs_log_force and xfs_log_force Switch to a single interface for flushing the whole log, which gives consistent trace point coverage, and removes the unused log_flushed argument for the previous _xfs_log_force callers. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/scrub/common.c | 2 +- fs/xfs/xfs_extent_busy.c | 3 +-- fs/xfs/xfs_log.c | 26 +++++--------------------- fs/xfs/xfs_log.h | 6 +----- 4 files changed, 8 insertions(+), 29 deletions(-) commit 2b56c2857fde3c7f74174dd2fe3d7b8833d82744 Author: Christoph Hellwig Date: Tue Mar 13 23:15:27 2018 -0700 xfs: remove the unused log_flushed variable in xfs_extent_busy_flush Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_extent_busy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4f7aa2fd8c94d621e62131f3d6506a88ad9b0926 Author: Christoph Hellwig Date: Tue Mar 13 23:15:27 2018 -0700 xfs: remove an outdated comment for xfs_inode_item_committing The function now does something, and that something is central to our inode logging scheme. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_inode_item.c | 4 ---- 1 file changed, 4 deletions(-) commit 2022ab36fefc8cb6483b767e3ff9d099087c52d9 Author: Christoph Hellwig Date: Tue Mar 13 23:15:26 2018 -0700 xfs: remove misleading comment text on xfs_inode_item_unlock Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_inode_item.c | 3 --- 1 file changed, 3 deletions(-) commit f3aa2c6f98e53cffc0e26ea9868154b2d4b2c75e Author: Christopher Bostic Date: Mon Feb 12 15:45:49 2018 +1030 fsi: core: Add check for master property no-scan-on-init Prior to scanning a master check if the optional property no-scan-on-init is present. If it is then avoid scanning. This is necessary in cases where a master scan could interfere with another FSI master on the same bus. Signed-off-by: Christopher Bostic Acked-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit dd7987392324960cb0184a4564b06e15c66d3f55 Author: Christopher Bostic Date: Mon Feb 12 15:45:48 2018 +1030 dt-bindings: fsi: Add optional property no-scan-on-init Add an optional FSI master property 'no-scan-on-init. This can be specified to indicate that a master should not be automatically scanned at init time. This is required in cases where a scan could interfere with another FSI master on the same bus. Signed-off-by: Christopher Bostic Acked-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/fsi/fsi.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit e0c24bddf07c7735860fe654061938218732c92d Author: Jeremy Kerr Date: Mon Feb 12 15:45:47 2018 +1030 fsi: master: Clarify master lifetimes & fix use-after-free in hub master Once we call fsi_master_unregister, the core will put_device, potentially freeing the hub master. This change adds a comment explaining the lifetime of an allocated fsi_master. We then add a reference from the driver to the hub master, so it stays around until we've finished ->remove(). Signed-off-by: Jeremy Kerr Tested-by: Christopher Bostic Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-master-hub.c | 21 ++++++++++++++++++--- drivers/fsi/fsi-master.h | 15 +++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) commit 638bd9ac847e8cb25f59b6bdca29830ece477ed6 Author: Christopher Bostic Date: Mon Feb 12 15:45:46 2018 +1030 fsi: core: Reduce console output during normal scan To reduce amount of console output during boot / power up make all normal path scan related messages debug type. Signed-off-by: Christopher Bostic Acked-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 4 ++-- drivers/fsi/fsi-master-hub.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit f6a2f8eb73f0dfa7e9293a3ba08f6fcb61dfbbe1 Author: Jeremy Kerr Date: Mon Feb 12 15:45:45 2018 +1030 fsi: Match fsi slaves and engines to available dt nodes This change populates device tree nodes for scanned FSI slaves and engines. If the master populates ->of_node of the FSI master device, we'll look for matching slaves, and under those slaves we'll look for matching engines. This means that FSI drivers will have their ->of_node pointer populated if there's a corresponding DT node, which they can use for further device discover. Presence of device tree nodes is optional, and only required for fsi device drivers that need extra properties, or subordinate devices, to be enumerated. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/Kconfig | 1 + drivers/fsi/fsi-core.c | 99 +++++++++++++++++++++++++++++++++++++++++++ drivers/fsi/fsi-master-gpio.c | 4 ++ drivers/fsi/fsi-master-hub.c | 4 ++ 4 files changed, 108 insertions(+) commit 889ee9fe472af1a2407e3e604498a5edaf7f98ce Author: Jeremy Kerr Date: Mon Feb 12 15:45:44 2018 +1030 dt-bindings: fsi: Add specification for FSI busses This change introduces a proposed layout for describing FSI busses in the device tree. While the bus is probe-able, we'd still like a method of describing subordinate (eg i2c) busses that are behind FSI devices. The FSI core will be responsible for matching probed slaves & engines to their device tree nodes, so the FSI device drivers' probe() functions will be passed a struct device with the appropriate of_node populated where a matching DT node is found. Signed-off-by: Jeremy Kerr Acked-by: Joel Stanley Acked-by: Brad Bishop Acked-by: Eddie James Acked-by: Rob Herring Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/fsi/fsi.txt | 144 ++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) commit 99f039e97bf8aa045d719b8e0a39ecdf396e362a Author: Eddie James Date: Mon Feb 12 15:45:43 2018 +1030 fsi: Fix one and two byte bus reads/writes Address checker fixed to allow one and two byte reads/writes. Address alignments for each size verified. Signed-off-by: Edward James Signed-off-by: Christopher Bostic Acked-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit b8bd146d38da5f4e683929412d59f93ad4d961c5 Author: Jeremy Kerr Date: Mon Feb 12 15:45:42 2018 +1030 fsi: master-gpio: Add external mode This change introduces an 'external mode' for GPIO-based FSI masters, allowing the clock and data lines to be driven by an external source. For example, external mode is selected by a user when an external debug device is attached to the FSI pins. To do this, we need to set specific states for the trans, mux and enable GPIOs, and prevent access to clk & data from the FSI core code (by returning EBUSY). External mode is controlled by a sysfs attribute, so add the relevant information to Documentation/ABI/ Signed-off-by: Jeremy Kerr Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman .../ABI/testing/sysfs-driver-fsi-master-gpio | 10 +++ drivers/fsi/fsi-master-gpio.c | 78 +++++++++++++++++++++- 2 files changed, 86 insertions(+), 2 deletions(-) commit 29d9b9271184dac6d981fc85b25afb8ae0ff0204 Author: Jeremy Kerr Date: Mon Feb 12 15:45:41 2018 +1030 fsi: master-gpio: Add locking during break and link enable Currently, we perform GPIO accesses in fsi_master_gpio_break and fsi_master_link_enable, without holding cmd_lock. This change adds the appropriate locking. Signed-off-by: Jeremy Kerr Reviewed-by: Joel Stanley Reviewed-by: Christopher Bostic Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-master-gpio.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 15362d69c4c88a8f1762b319281c976d293cfe47 Author: Jeremy Kerr Date: Mon Feb 12 15:45:40 2018 +1030 fsi: Add fsi_master_rescan() We'll want non-core fsi code to trigger a rescan, so introduce a non-static fsi_master_rescan() function. Use this for the existing unscan/scan behaviour too. Signed-off-by: Jeremy Kerr Reviewed-by: Joel Stanley Reviewed-by: Christopher Bostic Signed-off-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 10 ++++++++-- drivers/fsi/fsi-master.h | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) commit c292566a7779f88ed63d555b1015ab29ca0d5530 Merge: c469012 30f6ebf Author: David S. Miller Date: Wed Mar 14 13:48:28 2018 -0400 Merge branch 'sctp-add-support-for-some-sctp-auth-APIs-from-RFC6458' Xin Long says: ==================== sctp: add support for some sctp auth APIs from RFC6458 This patchset mainly adds support for SCTP AUTH Information for sendmsg, described in RFC6458: 5.3.8. SCTP AUTH Information Structure (SCTP_AUTHINFO) and also adds a sockopt described in RFC6458: 8.3.4. Deactivate a Shared Key (SCTP_AUTH_DEACTIVATE_KEY) and two types of events for AUTHENTICATION_EVENT described in RFC6458: 6.1.8. SCTP_AUTHENTICATION_EVENT: - SCTP_AUTH_NO_AUTH - SCTP_AUTH_FREE_KEY After this patchset, we have fully support for sctp_sendv in kernel. Note that this patchset won't touch that sctp options merge conflict. ==================== Signed-off-by: David S. Miller commit 30f6ebf65bc46161c5aaff1db2e6e7c76aa4a06b Author: Xin Long Date: Wed Mar 14 19:05:34 2018 +0800 sctp: add SCTP_AUTH_NO_AUTH type for AUTHENTICATION_EVENT This patch is to add SCTP_AUTH_NO_AUTH type for AUTHENTICATION_EVENT, as described in section 6.1.8 of RFC6458. SCTP_AUTH_NO_AUTH: This report indicates that the peer does not support SCTP authentication as defined in [RFC4895]. Note that the implementation is quite similar as that of SCTP_ADAPTATION_INDICATION. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/command.h | 1 + include/uapi/linux/sctp.h | 1 + net/sctp/sm_sideeffect.c | 13 +++++++++++++ net/sctp/sm_statefuns.c | 43 +++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 56 insertions(+), 2 deletions(-) commit ec2e506c680deaa8e1a087986db6d73ba63a04be Author: Xin Long Date: Wed Mar 14 19:05:33 2018 +0800 sctp: add SCTP_AUTH_FREE_KEY type for AUTHENTICATION_EVENT This patch is to add SCTP_AUTH_FREE_KEY type for AUTHENTICATION_EVENT, as described in section 6.1.8 of RFC6458. SCTP_AUTH_FREE_KEY: This report indicates that the SCTP implementation will no longer use the key identifier specified in auth_keynumber. After deactivating a key, it would never be used again, which means it's refcnt can't be held/increased by new chunks. But there may be some chunks in out queue still using it. So only when refcnt is 1, which means no chunk in outqueue is using/holding this key either, this EVENT would be sent. When users receive this notification, they could do DEL_KEY sockopt to remove this shkey, and also tell the peer that this key won't be used in any chunk thoroughly from now on, then the peer can remove it as well safely. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/uapi/linux/sctp.h | 6 +++++- net/sctp/auth.c | 14 ++++++++++++++ net/sctp/sm_make_chunk.c | 20 +++++++++++++++++++- net/sctp/sm_statefuns.c | 2 +- net/sctp/socket.c | 19 ++++++++++++++++++- 5 files changed, 57 insertions(+), 4 deletions(-) commit 601590ec155aadf5daa17a6f63a06d1bba5b5ce9 Author: Xin Long Date: Wed Mar 14 19:05:32 2018 +0800 sctp: add sockopt SCTP_AUTH_DEACTIVATE_KEY This patch is to add sockopt SCTP_AUTH_DEACTIVATE_KEY, as described in section 8.3.4 of RFC6458. This set option indicates that the application will no longer send user messages using the indicated key identifier. Note that RFC requires that only deactivated keys that are no longer used by an association can be deleted, but for the backward compatibility, it is not to check deactivated when deleting or replacing one sh_key. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/auth.h | 12 ++++++------ include/uapi/linux/sctp.h | 1 + net/sctp/auth.c | 46 +++++++++++++++++++++++++++++++++++++++++++--- net/sctp/socket.c | 31 +++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+), 9 deletions(-) commit 3ff547c06a7d75d72d37dae2c064fcf0672e56c0 Author: Xin Long Date: Wed Mar 14 19:05:31 2018 +0800 sctp: add support for SCTP AUTH Information for sendmsg This patch is to add support for SCTP AUTH Information for sendmsg, as described in section 5.3.8 of RFC6458. With this option, you can provide shared key identifier used for sending the user message. It's also a necessary send info for sctp_sendv. Note that it reuses sinfo->sinfo_tsn to indicate if this option is set and sinfo->sinfo_ssn to save the shkey ID which can be 0. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 1 + include/uapi/linux/sctp.h | 14 +++++++++++++- net/sctp/chunk.c | 11 ++++++++++- net/sctp/socket.c | 23 +++++++++++++++++++++++ 4 files changed, 47 insertions(+), 2 deletions(-) commit 1b1e0bc9947427ae58bbe7de0ce9cfd591b589b9 Author: Xin Long Date: Wed Mar 14 19:05:30 2018 +0800 sctp: add refcnt support for sh_key With refcnt support for sh_key, chunks auth sh_keys can be decided before enqueuing it. Changing the active key later will not affect the chunks already enqueued. Furthermore, this is necessary when adding the support for authinfo for sendmsg in next patch. Note that struct sctp_chunk can't be grown due to that performance drop issue on slow cpu, so it just reuses head_skb memory for shkey in sctp_chunk. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/auth.h | 9 +++-- include/net/sctp/sm.h | 3 +- include/net/sctp/structs.h | 9 +++-- net/sctp/auth.c | 86 +++++++++++++++++++++++----------------------- net/sctp/chunk.c | 5 +++ net/sctp/output.c | 18 ++++++++-- net/sctp/sm_make_chunk.c | 15 ++++++-- net/sctp/sm_statefuns.c | 11 +++--- net/sctp/socket.c | 6 ++++ 9 files changed, 104 insertions(+), 58 deletions(-) commit 7129707ec2356ef9ef9cce469ad14eb37fbbe67e Author: Darren Hart (VMware) Date: Mon Mar 12 23:28:00 2018 -0700 platform/x86: Fix dell driver init order Update the initcall ordering to satisfy the following dependency ordering: 1. DCDBAS, ACPI_WMI 2. DELL_SMBIOS, DELL_RBTN 3. DELL_LAPTOP, DELL_WMI By assigning them to the following initcall levels: subsys_initcall: DCDBAS, ACPI_WMI module_init: DELL_SMBIOS, DELL_RBTN late_initcall: DELL_LAPTOP, DELL_WMI Cc: Dominik Brodowski Cc: Mario.Limonciello@dell.com Signed-off-by: Darren Hart (VMware) drivers/firmware/dcdbas.c | 2 +- drivers/platform/x86/dell-smbios-base.c | 2 +- drivers/platform/x86/dell-wmi.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit c469012729bda6515779590d9588d3e36fdf449d Merge: 5677629a 97cdbc4 Author: David S. Miller Date: Wed Mar 14 13:40:44 2018 -0400 Merge branch 'smc-fixes' Ursula Braun says: ==================== net/smc: fixes 2018-03-14 here are smc changes for the net-next tree. The first patch enables SMC to work with mlx5-RoCE-devices. Patches 2 and 3 deal with link group freeing. ==================== Signed-off-by: David S. Miller commit 97cdbc4213df101228564b8d27090cc1f9a26332 Author: Karsten Graul Date: Wed Mar 14 11:01:02 2018 +0100 net/smc: schedule free_work when link group is terminated The free_work worker must be scheduled when the link group is abnormally terminated. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/smc_core.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 268ffcc4ebfc8b10c1502357dfb82ce6af0770ac Author: Ursula Braun Date: Wed Mar 14 11:01:01 2018 +0100 net/smc: free link group without pending free_work only Make sure there is no pending or running free_work worker for the link group when freeing the link group. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 1 + net/smc/smc_core.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit c9f4c6cf53bfafb639386a4c094929f13f573e04 Author: Ursula Braun Date: Wed Mar 14 11:01:00 2018 +0100 net/smc: pay attention to MAX_ORDER for CQ entries smc allocates a certain number of CQ entries for used RoCE devices. For mlx5 devices the chosen constant number results in a large allocation causing this warning: [13355.124656] WARNING: CPU: 3 PID: 16535 at mm/page_alloc.c:3883 __alloc_pages_nodemask+0x2be/0x10c0 [13355.124657] Modules linked in: smc_diag(O) smc(O) xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp bridge stp llc ip6table_filter ip6_tables iptable_filter mlx5_ib ib_core sunrpc mlx5_core s390_trng rng_core ghash_s390 prng aes_s390 des_s390 des_generic sha512_s390 sha256_s390 sha1_s390 sha_common ptp pps_core eadm_sch dm_multipath dm_mod vhost_net tun vhost tap sch_fq_codel kvm ip_tables x_tables autofs4 [last unloaded: smc] [13355.124672] CPU: 3 PID: 16535 Comm: kworker/3:0 Tainted: G O 4.14.0uschi #1 [13355.124673] Hardware name: IBM 3906 M04 704 (LPAR) [13355.124675] Workqueue: events smc_listen_work [smc] [13355.124677] task: 00000000e2f22100 task.stack: 0000000084720000 [13355.124678] Krnl PSW : 0704c00180000000 000000000029da76 (__alloc_pages_nodemask+0x2be/0x10c0) [13355.124681] R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3 [13355.124682] Krnl GPRS: 0000000000000000 00550e00014080c0 0000000000000000 0000000000000001 [13355.124684] 000000000029d8b6 00000000f3bfd710 0000000000000000 00000000014080c0 [13355.124685] 0000000000000009 00000000ec277a00 0000000000200000 0000000000000000 [13355.124686] 0000000000000000 00000000000001ff 000000000029d8b6 0000000084723720 [13355.124708] Krnl Code: 000000000029da6a: a7110200 tmll %r1,512 000000000029da6e: a774ff29 brc 7,29d8c0 #000000000029da72: a7f40001 brc 15,29da74 >000000000029da76: a7f4ff25 brc 15,29d8c0 000000000029da7a: a7380000 lhi %r3,0 000000000029da7e: a7f4fef1 brc 15,29d860 000000000029da82: 5820f0c4 l %r2,196(%r15) 000000000029da86: a53e0048 llilh %r3,72 [13355.124720] Call Trace: [13355.124722] ([<000000000029d8b6>] __alloc_pages_nodemask+0xfe/0x10c0) [13355.124724] [<000000000013bd1e>] s390_dma_alloc+0x6e/0x148 [13355.124733] [<000003ff802eeba6>] mlx5_dma_zalloc_coherent_node+0x8e/0xe0 [mlx5_core] [13355.124740] [<000003ff802eee18>] mlx5_buf_alloc_node+0x70/0x108 [mlx5_core] [13355.124744] [<000003ff804eb410>] mlx5_ib_create_cq+0x558/0x898 [mlx5_ib] [13355.124749] [<000003ff80407d40>] ib_create_cq+0x48/0x88 [ib_core] [13355.124751] [<000003ff80109fba>] smc_ib_setup_per_ibdev+0x52/0x118 [smc] [13355.124753] [<000003ff8010bcb6>] smc_conn_create+0x65e/0x728 [smc] [13355.124755] [<000003ff801081a2>] smc_listen_work+0x2d2/0x540 [smc] [13355.124756] [<0000000000162c66>] process_one_work+0x1be/0x440 [13355.124758] [<0000000000162f40>] worker_thread+0x58/0x458 [13355.124759] [<0000000000169e7e>] kthread+0x14e/0x168 [13355.124760] [<00000000009ce8be>] kernel_thread_starter+0x6/0xc [13355.124762] [<00000000009ce8b8>] kernel_thread_starter+0x0/0xc [13355.124762] Last Breaking-Event-Address: [13355.124764] [<000000000029da72>] __alloc_pages_nodemask+0x2ba/0x10c0 [13355.124764] ---[ end trace 34be38b581c0b585 ]--- This patch reduces the smc constant for the maximum number of allocated completion queue entries SMC_MAX_CQE by 2 to avoid high round up values in the mlx5 code, and reduces the number of allocated completion queue entries even more, if the final allocation for an mlx5 device hits the MAX_ORDER limit. Reported-by: Ihnken Menssen Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/smc_ib.c | 10 +++++++++- net/smc/smc_wr.h | 1 - 2 files changed, 9 insertions(+), 2 deletions(-) commit 5677629a5a091a62512427534404b509fe6c615d Author: Veerasenareddy Burru Date: Tue Mar 13 22:04:45 2018 -0700 liquidio: Add support for liquidio 10GBase-T NIC Added ethtool changes to show port type as TP (Twisted Pair) for 10GBASE-T ports. Same driver and firmware works for liquidio NIC with SFP+ ports or TP ports. Signed-off-by: Veerasenareddy Burru Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 24 ++++++++++++++++------ .../net/ethernet/cavium/liquidio/liquidio_common.h | 12 +++++++++-- 2 files changed, 28 insertions(+), 8 deletions(-) commit 59655a5b6c837e392e873629591069c898585592 Author: Jason Wang Date: Wed Mar 14 11:23:40 2018 +0800 tuntap: XDP_TX can use native XDP Now we have ndo_xdp_xmit, switch to use it instead of the slow generic XDP TX routine. XDP_TX on TAP gets ~20% improvements from ~1.5Mpps to ~1.8Mpps on 2.60GHz Core(TM) i7-5600U. Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/tun.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 83fc580dcc2f0f36114477c4ac7adbe5c32329a3 Author: Jeffy Chen Date: Thu Mar 8 16:03:27 2018 -0800 Input: gpio-keys - add support for wakeup event action Add support for specifying event actions to trigger wakeup when using the gpio-keys input device as a wakeup source. This would allow the device to configure when to wakeup the system. For example a gpio-keys input device for pen insert, may only want to wakeup the system when ejecting the pen. Suggested-by: Brian Norris Signed-off-by: Jeffy Chen Reviewed-by: Rob Herring Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/gpio-keys.txt | 8 ++ drivers/input/keyboard/gpio_keys.c | 145 +++++++++++++++++++-- include/dt-bindings/input/gpio-keys.h | 13 ++ include/linux/gpio_keys.h | 2 + 4 files changed, 154 insertions(+), 14 deletions(-) commit 7085123333e2ee2686086fc49bc3117bacd86105 Author: Gustavo A. R. Silva Date: Wed Mar 14 10:07:32 2018 -0700 Input: appletouch - use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Dmitry Torokhov drivers/input/mouse/appletouch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 815df9ac6c993c526c6ef82d970890a1f4b51f2f Merge: e676d81 7f61e6c Author: David S. Miller Date: Wed Mar 14 13:12:15 2018 -0400 Merge branch 'sfc-support-FEC-configuration' Edward Cree says: ==================== sfc: support FEC configuration Implements the ethtool get & set fecparam operations. ==================== Signed-off-by: David S. Miller commit 7f61e6c6279bcb340489ab6b781835da700f1c4b Author: Edward Cree Date: Wed Mar 14 14:21:26 2018 +0000 sfc: support FEC configuration through ethtool As well as 'auto' and the forced 'off', 'rs' and 'baser' states, we also handle combinations of settings (since the fecparam->fec field is a bitmask), where auto|rs and auto|baser specify a preferred FEC mode but will fall back to the other if the cable or link partner doesn't support it. rs|baser (with or without auto bit) means prefer FEC even where auto wouldn't use it, but let FW choose which encoding to use. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ethtool.c | 32 ++++++++ drivers/net/ethernet/sfc/mcdi_port.c | 150 ++++++++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/net_driver.h | 8 ++ 3 files changed, 190 insertions(+) commit f215347cc0fcf76933d6bdab95e253724b823625 Author: Edward Cree Date: Wed Mar 14 14:21:00 2018 +0000 sfc: update MCDI protocol headers Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mcdi_pcol.h | 2822 +++++++++++++++++++++------------- 1 file changed, 1776 insertions(+), 1046 deletions(-) commit e676d81c8990f511d60698a1a8abaa438b3f9d3d Author: John Allen Date: Wed Mar 14 10:41:29 2018 -0500 ibmvnic: Fix reset return from closed state The case in which we handle a reset from the state where the device is closed seems to be bugged for all types of reset. For most types of reset we currently exit the reset routine correctly, but don't set the state to indicate that we are back in the "closed" state. For some specific cases, we don't exit the reset routine at all and resetting will cause a closed device to be opened. This patch fixes the problem by unconditionally checking the reset_state and correctly setting the adapter state before returning. Signed-off-by: John Allen Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 57adbeea6451cedfeda257fe77749512894dff29 Author: Bo Yan Date: Tue Mar 13 11:24:31 2018 -0600 coresight: etm4x: Fix bit shifting ctxid_pid and vmid_val in config are of type u64. When an integer 0xFF is being left shifted more than 32 bits, the behavior is undefined. The fix is to specify 0xFF as an unsigned long. Detected by Coverity scan: CID 37650, 37651 (Bad bit shift operation) Signed-off-by: Bo Yan Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 831c326fcd0e8e2a6ece952f898a1ec9b1dc1004 Author: Leo Yan Date: Tue Mar 13 11:24:30 2018 -0600 coresight: Use %px to print pcsr instead of %p Commit ad67b74d2469 ("printk: hash addresses printed with %p") lets printk specifier %p to hash all addresses before printing, this was resulting in the high 32 bits of pcsr can only output zeros. So module cannot completely print pc value and it's pointless for debugging purpose. This patch fixes this by using %px to print pcsr instead. Cc: Mathieu Poirier Signed-off-by: Leo Yan Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-cpu-debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65d9982d7e523a1a8e7c9af012da0d166f72fc56 Author: Mike Frysinger Date: Mon Jan 29 17:08:21 2018 -0500 vt: change SGR 21 to follow the standards ECMA-48 [1] (aka ISO 6429) has defined SGR 21 as "doubly underlined" since at least March 1984. The Linux kernel has treated it as SGR 22 "normal intensity" since it was added in Linux-0.96b in June 1992. Before that, it was simply ignored. Other terminal emulators have either ignored it, or treat it as double underline now. xterm for example added support in its 304 release (May 2014) [2] where it was previously ignoring it. Changing this behavior shouldn't be an issue: - It isn't a named capability in ncurses's terminfo database, so no script is using libtinfo/libcurses to look this up, or using tput to query & output the right sequence. - Any script assuming SGR 21 will reset intensity in all terminals already do not work correctly on non-Linux VTs (including running under screen/tmux/etc...). - If someone has written a script that only runs in the Linux VT, and they're using SGR 21 (instead of SGR 22), the output should still be readable. imo it's important to change this as the Linux VT's non-conformance is sometimes used as an argument for other terminal emulators to not implement SGR 21 at all, or do so incorrectly. [1]: https://www.ecma-international.org/publications/standards/Ecma-048.htm [2]: https://github.com/ThomasDickey/xterm-snapshots/commit/2fd29cb98d214cb536bcafbee00bc73b3f1eeb9d Signed-off-by: Mike Frysinger Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3993a16309c7efc93dee772a9279a34bc88cdcb5 Author: Maruyama Shohei Date: Wed Mar 14 09:55:24 2018 -0700 Input: silead - add Chuwi Hi8 support This commit add ACPI support for Chuwi Hi8 tablet. On the ACPI table of the tablet, GSL1680 is registered as MSSL0001, so the driver does not recognize the device. This commit resolve it. Signed-off-by: Shohei Maruyama Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/silead.c | 1 + 1 file changed, 1 insertion(+) commit fecae16e696933c8ef5bf971a3fde2aadeaee613 Author: Andy Shevchenko Date: Wed Feb 7 19:47:58 2018 +0000 parport: Replace short License header by SPDX identifier No functional changes involved. Tested-by: Nikola Ciprich Signed-off-by: Andy Shevchenko Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_serial.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 4af5781ad1245fdc8b2faaef72b5ce756639b0c2 Author: Andy Shevchenko Date: Wed Feb 7 19:47:57 2018 +0000 parport: Sort headers alphabetically While here, remove init.h inclusion since we are not using it directly and module.h will do this for us. No functional changes intended. Tested-by: Nikola Ciprich Signed-off-by: Andy Shevchenko Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_serial.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b0b0a6438ea5d20ff4b0f64af0f210029d146079 Author: Andy Shevchenko Date: Wed Feb 7 19:47:56 2018 +0000 parport: Switch to use module_pci_driver() macro Eliminate some boilerplate code by using module_pci_driver() instead of init/exit, moving the salient bits from init into probe. Tested-by: Nikola Ciprich Signed-off-by: Andy Shevchenko Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_serial.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 82dfabf1c4d5f76d2ed854ae30e4af7f7291bf0c Author: Andy Shevchenko Date: Wed Feb 7 19:47:55 2018 +0000 parport: Convert printk(KERN_WARN) to dev_warn() dev_warn() will print device name with associated driver, no need to keep this open coded. While here, adjust indentation in the rest of dev_dbg() calls. Tested-by: Nikola Ciprich Signed-off-by: Andy Shevchenko Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_serial.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 96edf5376e9250eb61d2bbc5432c13846878edb2 Author: Andy Shevchenko Date: Wed Feb 7 19:47:54 2018 +0000 parport: Don't shadow error codes in ->probe() When ->probe() calls helper functions return theirs error codes instead of shadowing them. Tested-by: Nikola Ciprich Signed-off-by: Andy Shevchenko Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_serial.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ad8ce834bfec77c8ae2fbb3a0593ae87bdecebcb Author: Andy Shevchenko Date: Wed Feb 7 19:47:53 2018 +0000 parport: Convert to use managed functions pcim_* and devm_* This makes the error handling much more simpler than open-coding everything and in addition makes the probe function smaller an tidier. Tested-by: Nikola Ciprich Signed-off-by: Andy Shevchenko Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_serial.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 1089c91111a13e93955057e37f6772c0af629a2a Author: Andy Shevchenko Date: Wed Feb 7 19:47:52 2018 +0000 parport: PCI core handles power state for us There is no need to repeat the work that is already done in the PCI driver core. The patch removes excerpts from suspend and resume callbacks. Note that there is no more calls performed to enable or disable a PCI device during suspend-resume cycle. Nowadays they seems to be superflous. Someone can read more in [1]. While here, convert calls to new driver API. [1] https://www.kernel.org/doc/ols/2009/ols2009-pages-319-330.pdf Tested-by: Nikola Ciprich Signed-off-by: Andy Shevchenko Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_serial.c | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) commit ec8e3893b41d56293f98d499de7dc123d362b2d5 Author: Andy Shevchenko Date: Wed Feb 7 19:47:51 2018 +0000 parport: Add support for BrainBoxes PX272/PX306 MIO card This adds support for BrainBoxes Multi I/O cards (4+1 serial + 1 parallel port): 02:00.0 0702: 135a:4100 (rev 02) Subsystem: 135a:0443 Flags: fast devsel, IRQ 18 Memory at f7d02000 (32-bit, non-prefetchable) [size=128] I/O ports at e000 [size=128] I/O ports at e080 [size=64] I/O ports at e0c0 [size=16] Memory at f7d01000 (32-bit, non-prefetchable) [size=128] Memory at f7d00000 (32-bit, non-prefetchable) [size=128] Capabilities: [50] MSI: Enable- Count=1/4 Maskable- 64bit+ Capabilities: [78] Power Management version 3 Capabilities: [80] Express Legacy Endpoint, MSI 01 Capabilities: [100] Virtual Channel Capabilities: [800] Advanced Error Reporting Reported-by: Nikola Ciprich Tested-by: Nikola Ciprich Signed-off-by: Andy Shevchenko Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_serial.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 520656c03c545011d1da702a261e2c782808b79f Author: Markus Elfring Date: Wed Feb 7 19:47:50 2018 +0000 parport: ax88796: Delete an unnecessary variable initialisation in parport_ax88796_probe() The local variable "pp" will eventually be set to an appropriate pointer a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_ax88796.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e50654da591efecb02fd9dab032152e4c5d0ca2 Author: Markus Elfring Date: Wed Feb 7 19:47:49 2018 +0000 parport: ax88796: Improve a size determination in parport_ax88796_probe() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_ax88796.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6906e7efa8071f911fd92a35cec57473bca3074 Author: Markus Elfring Date: Wed Feb 7 19:47:48 2018 +0000 parport: ax88796: Delete an error message for a failed memory allocation in parport_ax88796_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_ax88796.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b857cacd748e524d5603ddbbe630bdcfb74bd3f6 Author: Sudip Mukherjee Date: Sun Jan 28 23:22:09 2018 +0000 pps: generator: use new parport device model Modify pps generator driver to use the new parallel port device model. Signed-off-by: Sudip Mukherjee Acked-by: Rodolfo Giometti Signed-off-by: Greg Kroah-Hartman drivers/pps/generators/pps_gen_parport.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit fb56d97df70e7c29c4072c02d1d756641891cee9 Author: Sudip Mukherjee Date: Sun Jan 28 23:22:08 2018 +0000 pps: client: use new parport device model Modify pps client driver to use the new parallel port device model. In that process, added an index to mention the device number when we have more than one parallel port. Signed-off-by: Sudip Mukherjee Acked-by: Rodolfo Giometti Signed-off-by: Greg Kroah-Hartman drivers/pps/clients/pps_parport.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 823f7923833c6cc2b16e601546d607dcfb368004 Author: Alexander Gerasiov Date: Sun Feb 4 02:50:22 2018 +0300 parport_pc: Add support for WCH CH382L PCI-E single parallel port card. WCH CH382L is a PCI-E adapter with 1 parallel port. It is similair to CH382 but serial ports are not soldered on board. Detected as Serial controller: Device 1c00:3050 (rev 10) (prog-if 05 [16850]) Signed-off-by: Alexander Gerasiov Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_pc.c | 4 ++++ 1 file changed, 4 insertions(+) commit ced68234b6a244355aeab07c2681bc49f695eaed Author: Willem de Bruijn Date: Wed Mar 14 12:49:19 2018 -0400 sock: remove zerocopy sockopt restriction on closed tcp state Socket option SO_ZEROCOPY determines whether the kernel ignores or processes flag MSG_ZEROCOPY on subsequent send calls. This to avoid changing behavior for legacy processes. Limiting the state change to closed sockets is annoying with passive sockets and not necessary for correctness. Once created, zerocopy skbs are processed based on their private state, not this socket flag. Remove the constraint. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller Documentation/networking/msg_zerocopy.rst | 5 ----- net/core/sock.c | 2 -- 2 files changed, 7 deletions(-) commit c9ab800167e1fc7b87a069b85b53a7eef414b4ae Author: Michael Ellerman Date: Wed Mar 14 09:38:47 2018 -0700 Input: analog - use get_cycles() on PPC The analog joystick driver spits a warning at us: drivers/input/joystick/analog.c:176:2: warning: #warning Precise timer not defined for this architecture. PPC has get_cycles() so use that. Signed-off-by: Michael Ellerman Signed-off-by: Dmitry Torokhov drivers/input/joystick/analog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed8cffda27dea6fd3dafb3ee881c5a786edac9ca Author: Christophe Jaillet Date: Tue Mar 13 21:33:11 2018 +0100 regulator: gpio: Fix some error handling paths in 'gpio_regulator_probe()' Re-order error handling code and gotos to avoid leaks in error handling paths. Fixes: 9f946099fe19 ("regulator: gpio: fix parsing of gpio list") Signed-off-by: Christophe JAILLET Signed-off-by: Mark Brown drivers/regulator/gpio-regulator.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit bc3cc75281b3c2b1c5355d88d147b66a753bb9a5 Author: Christophe Jaillet Date: Tue Mar 13 19:36:58 2018 +0100 spi: bcm-qspi: fIX some error handling paths For some reason, commit c0368e4db4a3 ("spi: bcm-qspi: Fix use after free in bcm_qspi_probe() in error path") has updated some gotos, but not all of them. This looks spurious, so fix it. Fixes: fa236a7ef240 ("spi: bcm-qspi: Add Broadcom MSPI driver") Signed-off-by: Christophe JAILLET Signed-off-by: Mark Brown drivers/spi/spi-bcm-qspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2dff24d73291f0f3c70aea841994b076b6233828 Author: Razvan Stefanescu Date: Wed Mar 14 10:55:58 2018 -0500 staging: fsl-dpaa2/ethsw: Add TODO Add a TODO file describing what needs to be added/changed before the driver can be moved out of staging. Signed-off-by: Razvan Stefanescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethsw/TODO | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit da13889821d7a63b243415caf2d7d59c927a1fcc Author: Razvan Stefanescu Date: Wed Mar 14 10:55:57 2018 -0500 staging: fsl-dpaa2/ethsw: Add README Add a README file describing the driver architecture, components and interfaces. Signed-off-by: Razvan Stefanescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethsw/README | 106 +++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) commit 282d4df215e5e97fb7d6fadf8ba7e0208b915acb Author: Razvan Stefanescu Date: Wed Mar 14 10:55:56 2018 -0500 staging: fsl-dpaa2/ethsw: Add maintainer for Ethernet Switch driver Signed-off-by: Razvan Stefanescu Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit b2b3212b16bbb8d3571f1534b83fc0e7b2714533 Author: Razvan Stefanescu Date: Wed Mar 14 10:55:55 2018 -0500 staging: fsl-dpaa2/ethsw: Add ethtool support Add driver information, link details and hardware statistics to be reported via ethtool -S. Signed-off-by: Razvan Stefanescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethsw/Makefile | 2 +- drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h | 13 ++ drivers/staging/fsl-dpaa2/ethsw/dpsw.c | 32 +++++ drivers/staging/fsl-dpaa2/ethsw/dpsw.h | 32 +++++ drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c | 182 ++++++++++++++++++++++++ drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 1 + drivers/staging/fsl-dpaa2/ethsw/ethsw.h | 2 + 7 files changed, 263 insertions(+), 1 deletion(-) commit 44baaa43d7cc3492bcc59fb1040a3175a6229c5a Author: Razvan Stefanescu Date: Wed Mar 14 10:55:54 2018 -0500 staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver Introduce the DPAA2 Ethernet Switch driver, which manages Datapath Switch (DPSW) objects discovered on the MC bus. Suggested-by: Alexandru Marginean Signed-off-by: Razvan Stefanescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethsw/Makefile | 2 +- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 1507 ++++++++++++++++++++++++++++++ drivers/staging/fsl-dpaa2/ethsw/ethsw.h | 65 ++ 3 files changed, 1573 insertions(+), 1 deletion(-) commit 0006351fd1aa4439953d88991e5d4d231373c6d5 Author: Razvan Stefanescu Date: Wed Mar 14 10:55:53 2018 -0500 staging: fsl-dpaa2/ethsw: Add APIs for DPSW object Add the command build/parse APIs for operating on DPSW objects through the DPAA2 Management Complex. Signed-off-by: Razvan Stefanescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/Kconfig | 8 + drivers/staging/fsl-dpaa2/Makefile | 1 + drivers/staging/fsl-dpaa2/ethsw/Makefile | 10 + drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h | 333 +++++++++ drivers/staging/fsl-dpaa2/ethsw/dpsw.c | 1091 ++++++++++++++++++++++++++++ drivers/staging/fsl-dpaa2/ethsw/dpsw.h | 554 ++++++++++++++ 6 files changed, 1997 insertions(+) commit 80765597bc587feae8dbc8ce97a0f32e12a6e625 Author: Steven Rostedt (VMware) Date: Fri Mar 9 13:19:28 2018 -0500 tracing: Rewrite filter logic to be simpler and faster Al Viro reviewed the filter logic of ftrace trace events and found it to be very troubling. It creates a binary tree based on the logic operators and walks it during tracing. He sent myself and Tom Zanussi a long explanation (and formal proof) of how to do the string parsing better and end up with a program array that can be simply iterated to come up with the correct results. I took his ideas and his pseudo code and rewrote the filter logic based on them. In doing so, I was able to remove a lot of code, and have a much more condensed filter logic in the process. I wrote a very long comment describing the methadology that Al proposed in my own words. For more info on how this works, read the comment above predicate_parse(). Suggested-by: Al Viro Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.h | 15 +- kernel/trace/trace_events_filter.c | 2311 ++++++++++++++++-------------------- 2 files changed, 1054 insertions(+), 1272 deletions(-) commit 6ca1118551ca5bb267e75faa6b944679ca195423 Author: Arnd Bergmann Date: Wed Mar 14 17:26:06 2018 +0100 ASoC: remove blackfin drivers The blackfin architecture is getting removed, so the ASoC drivers are all obsolete as well. Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown MAINTAINERS | 7 - sound/soc/Kconfig | 1 - sound/soc/Makefile | 1 - sound/soc/blackfin/Kconfig | 205 ------ sound/soc/blackfin/Makefile | 40 -- sound/soc/blackfin/bf5xx-ac97-pcm.c | 480 -------------- sound/soc/blackfin/bf5xx-ac97.c | 388 ----------- sound/soc/blackfin/bf5xx-ac97.h | 57 -- sound/soc/blackfin/bf5xx-ad1836.c | 109 --- sound/soc/blackfin/bf5xx-ad193x.c | 131 ---- sound/soc/blackfin/bf5xx-ad1980.c | 109 --- sound/soc/blackfin/bf5xx-ad73311.c | 212 ------ sound/soc/blackfin/bf5xx-i2s-pcm.c | 373 ----------- sound/soc/blackfin/bf5xx-i2s-pcm.h | 17 - sound/soc/blackfin/bf5xx-i2s.c | 391 ----------- sound/soc/blackfin/bf5xx-sport.c | 1102 ------------------------------- sound/soc/blackfin/bf5xx-sport.h | 174 ----- sound/soc/blackfin/bf5xx-ssm2602.c | 126 ---- sound/soc/blackfin/bf6xx-i2s.c | 239 ------- sound/soc/blackfin/bf6xx-sport.c | 425 ------------ sound/soc/blackfin/bf6xx-sport.h | 82 --- sound/soc/blackfin/bfin-eval-adau1373.c | 173 ----- sound/soc/blackfin/bfin-eval-adau1701.c | 113 ---- sound/soc/blackfin/bfin-eval-adau1x61.c | 142 ---- sound/soc/blackfin/bfin-eval-adau1x81.c | 129 ---- sound/soc/blackfin/bfin-eval-adav80x.c | 145 ---- 26 files changed, 5371 deletions(-) commit 478325f188657d0e503d1f88cdaf516c792352c5 Author: Steven Rostedt (VMware) Date: Thu Mar 8 17:53:20 2018 -0500 tracing: Clean up and document pred_funcs_##type creation and use The pred_funcs_##type arrays consist of five functions that are assigned based on the ops. The array must be in the same order of the ops each function represents. The PRED_FUNC_START macro denotes the op enum that starts the op that maps to the pred_funcs_##type arrays. This is all very subtle and prone to bugs if the code is changed. Add comments describing how PRED_FUNC_START and pred_funcs_##type array is used, and also a PRED_FUNC_MAX that is the maximum number of functions in the arrays. Clean up select_comparison_fn() that assigns the predicates to the pred_funcs_##type array function as well as add protection in case an op is passed in that does not map correctly to the array. Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_filter.c | 46 ++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 14 deletions(-) commit 0f2754cee38fd2bc42f446d299ff0c53815dc5bd Author: Preetham Ramchandra Date: Mon Mar 12 17:10:32 2018 +0530 arm64: tegra: Enable AHCI on Jetson TX1 Enable AHCI on Jetson TX1 and add sata phy node. Signed-off-by: Preetham Chandru R Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 6cb60ec43fd794319e2d31bfea1f9f88a1b897f7 Author: Preetham Ramchandra Date: Mon Mar 12 17:10:31 2018 +0530 arm64: tegra: Add SATA node for Tegra210 Populate the SATA node for Tegra210. Signed-off-by: Preetham Ramchandra Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e9baef0d86162add1205eb07bae08e9efc2f1ae0 Author: Steven Rostedt (VMware) Date: Thu Mar 8 15:32:50 2018 -0500 tracing: Combine enum and arrays into single macro in filter code Instead of having a separate enum that is the index into another array, like a string array, make a single macro that combines them into a single list, and then the two can not get out of sync. This makes it easier to add and remove items. The macro trick is: #define DOGS \ C( JACK, "Jack Russell") \ C( ITALIAN, "Italian Greyhound") \ C( GERMAN, "German Shepherd") #undef C #define C(a, b) a enum { DOGS }; #undef C #define C(a, b) b static char dogs[] = { DOGS }; Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_filter.c | 112 ++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 64 deletions(-) commit 1d37ce929c71f430389db3042a8b23536cede1e5 Author: Colin Ian King Date: Wed Mar 14 14:28:25 2018 +0000 ASoC: da7219: make structure da7219_dai_clks_ops static structure da7219_dai_clks_ops is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: sound/soc/codecs/da7219.c:1777:22: warning: symbol 'da7219_dai_clks_ops' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/codecs/da7219.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90e0fb05e5c1b1cf6a59c4f888f500e2b1feffc4 Author: Katsuhiro Suzuki Date: Wed Mar 14 21:39:00 2018 +0900 ASoC: uniphier: evea: add switch for changing source of line-in This patch adds mixer switch for changing audio source of line-in. We can choose one of LIN1, 2, 3, default is LIN1. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown sound/soc/uniphier/evea.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 17a2f1ced0280068897990b0dd25ce70555b8ac7 Author: Lai Jiangshan Date: Fri Dec 1 21:50:05 2017 +0800 cpu/hotplug: Merge cpuhp_bp_states and cpuhp_ap_states cpuhp_bp_states and cpuhp_ap_states have different set of steps without any conflicting steps, so that they can be merged. The original `[CPUHP_BRINGUP_CPU] = { },` is removed, because the new cpuhp_hp_states has CPUHP_ONLINE index which is larger than CPUHP_BRINGUP_CPU. Signed-off-by: Lai Jiangshan Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Boris Ostrovsky Cc: "Paul E. McKenney" Link: https://lkml.kernel.org/r/20171201135008.21633-1-jiangshanlai@gmail.com kernel/cpu.c | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) commit 34d232eb2d0947f1a5430cbb193781e6562496ce Author: Preetham Ramchandra Date: Mon Mar 12 17:10:38 2018 +0530 ata: change Tegra124 to Tegra ahci_tegra driver now supports Tegra124, Tegra132 and Tegra210, so change Tegra124 to Tegra. Signed-off-by: Preetham Chandru R Acked-by: Thierry Reding Signed-off-by: Tejun Heo drivers/ata/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 294840feefb7fefb49a276544cbd29aac28e5e7d Author: Preetham Ramchandra Date: Mon Mar 12 17:10:37 2018 +0530 ata: ahci_tegra: Add AHCI support for Tegra210 Add support for the AHCI-compliant Serial ATA host controller on the Tegra210 system-on-chip. Signed-off-by: Preetham Chandru R Acked-by: Thierry Reding Signed-off-by: Tejun Heo drivers/ata/ahci_tegra.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 01fbf60b0e6fb9932a26959bbf338b9b5b193592 Author: Preetham Ramchandra Date: Mon Mar 12 17:10:36 2018 +0530 ata: ahci_tegra: disable DIPM Tegra does not support DIPM and it should be disabled. Signed-off-by: Preetham Chandru R Acked-by: Thierry Reding Signed-off-by: Tejun Heo drivers/ata/ahci_tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 502717ccf7720e785fdc1c9202d1b3930fd08038 Author: Preetham Ramchandra Date: Mon Mar 12 17:10:35 2018 +0530 ata: ahci_tegra: disable devslp for Tegra124 Tegra124 does not support devslp and it should be disabled. Signed-off-by: Preetham Chandru R Acked-by: Thierry Reding Signed-off-by: Tejun Heo drivers/ata/ahci_tegra.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 43ee827b562b092f594375945aec9178f9b5cca4 Author: Preetham Ramchandra Date: Mon Mar 12 17:10:34 2018 +0530 ata: ahci_tegra: initialize regulators from soc struct Get the regulator names to be initialized from soc structure and initialize them. Signed-off-by: Preetham Chandru R Acked-by: Thierry Reding Signed-off-by: Tejun Heo drivers/ata/ahci_tegra.c | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) commit 56337b5576074ece867054b1ec231017a1a0a6b8 Author: Preetham Ramchandra Date: Mon Mar 12 17:10:33 2018 +0530 ata: ahci_tegra: Update initialization sequence Update the controller initialization sequence and move Tegra124 specifics to tegra124_ahci_init. Signed-off-by: Preetham Chandru R Acked-by: Thierry Reding Signed-off-by: Tejun Heo drivers/ata/ahci_tegra.c | 288 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 224 insertions(+), 64 deletions(-) commit 6431243f1506d1cd964a6c54d3d95e87a30f8a93 Author: Preetham Ramchandra Date: Mon Mar 12 17:10:30 2018 +0530 dt-bindings: Tegra210: add binding documentation This adds bindings documentation for the AHCI controller on Tegra210. Signed-off-by: Preetham Chandru R Acked-by: Thierry Reding Signed-off-by: Tejun Heo .../bindings/ata/nvidia,tegra124-ahci.txt | 36 ++++++++++++++-------- 1 file changed, 24 insertions(+), 12 deletions(-) commit 05454c1bde91fb013c0431801001da82947e6b5a Author: Mathias Kresin Date: Thu May 11 08:18:24 2017 +0200 MIPS: ath79: Fix AR724X_PLL_REG_PCIE_CONFIG offset According to the QCA u-boot source the "PCIE Phase Lock Loop Configuration (PCIE_PLL_CONFIG)" register is for all SoCs except the QCA955X and QCA956X at offset 0x10. Since the PCIE PLL config register is only defined for the AR724x fix only this value. The value is wrong since the day it was added and isn't used by any driver yet. Signed-off-by: Mathias Kresin Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16048/ Signed-off-by: James Hogan arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60c5d8932f069901e34c816a97332b1b2b982955 Author: Daniel Golle Date: Sat Jun 3 20:20:14 2017 +0200 MIPS: pci-mt7620: Enable PCIe on MT7688 Use PCIe support for MT7628AN also on MT7688. Tested on WRTNODE2R. Signed-off-by: Daniel Golle Cc: John Crispin Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: linux-mediatek@lists.infradead.org Patchwork: https://patchwork.linux-mips.org/patch/16223/ Signed-off-by: James Hogan arch/mips/pci/pci-mt7620.c | 1 + 1 file changed, 1 insertion(+) commit ca565be2b526a731d02a2fbff96fb0572567ea55 Author: Sergei Shtylyov Date: Tue Mar 13 22:26:01 2018 +0300 arm64: dts: renesas: v3msk: add SCIF0 pins Add the (previously omitted) SCIF0 pin data to the V3M Starter Kit board's device tree. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c5e3d2070f75666242333081f369bc949c1731f0 Author: Frédéric Danis Date: Wed Mar 14 14:17:31 2018 +0100 serdev: Fix typo in serdev_device_alloc Fix function name in serdev_device_alloc() definition Signed-off-by: Frédéric Danis Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29d1df72ce2ac187d457990fe445a16212dcfa19 Author: Gustavo A. R. Silva Date: Wed Mar 14 03:07:27 2018 -0500 pktgen: Fix memory leak in pktgen_if_write _buf_ is an array and the one that must be freed is _tp_ instead. Fixes: a870a02cc963 ("pktgen: use dynamic allocation for debug print buffer") Reported-by: Wang Jian Signed-off-by: Gustavo A. R. Silva Acked-by: Arnd Bergmann Signed-off-by: David S. Miller net/core/pktgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ec4eb71b4956548a9c652f6c26232995916008c Author: Arvind Yadav Date: Tue Mar 6 15:54:06 2018 +0530 w1: use put_device() if device_register() fail If device_register() returned an error! Always use put_device() to give up the reference initialized in device_register(). Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/w1/w1.c | 1 + 1 file changed, 1 insertion(+) commit d366c30d19f474c23e14111ac7198cee8a69103e Author: Patrice Chotard Date: Wed Mar 7 18:35:33 2018 +0100 ARM: dts: STi: Fix aliases property name for STi boards Update serial aliases from "ttyASN" to more common "serialN". Since dtc v1.4.6-9-gaadd0b65c987, aliases property name must be lowercase only. This allows to fix following dtc warnings: arch/arm/boot/dts/stih418-b2199.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-' arch/arm/boot/dts/stih407-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-' arch/arm/boot/dts/stih410-b2260.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-' arch/arm/boot/dts/stih410-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-' Signed-off-by: Patrice Chotard Signed-off-by: Greg Kroah-Hartman arch/arm/boot/dts/stih407-b2120.dts | 2 +- arch/arm/boot/dts/stih410-b2120.dts | 2 +- arch/arm/boot/dts/stih410-b2260.dts | 2 +- arch/arm/boot/dts/stih418-b2199.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit dfd9190ce8f4c96076849fe4d1ad7dbe3b92bb3d Author: Patrice Chotard Date: Wed Mar 7 18:35:32 2018 +0100 tty: st-asc: Update tty alias Since dtc v1.4.6-9-gaadd0b65c987, aliases property name must include only lowercase and '-'. After having updated all STi boards serial aliases from "ttyASN" to "serialN", st-asc driver need to be updated accordingly as tty aliases id is retrieved using of_alias_get_id(). Signed-off-by: Patrice Chotard Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/st-asc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 25a28906ebee1b1093a6f72fb6d44b9441f48ebc Author: Haneen Mohammed Date: Sun Mar 11 17:33:13 2018 -0600 drm/vmwgfx: replace drm_*_unreference with drm_*_put This patch replace instances of drm_framebuffer_unreference with _put() suffix, because it is shorter and consistent with the kernel use of *_get/put() suffixes. This was done with the following Coccinelle script: @r@ expression e; @@ ( -drm_framebuffer_reference(e); +drm_framebuffer_get(e); | -drm_framebuffer_unreference(e); +drm_framebuffer_put(e); ) Signed-off-by: Haneen Mohammed Acked-by: Sinclair Yeh Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180311233313.GA19721@Haneen drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit b3cbd8a56774610f5361c8007d66bf8cc695ad53 Author: Sergei Shtylyov Date: Tue Mar 13 22:54:42 2018 +0300 pinctrl: sh-pfc: r8a77970: Add EtherAVB pin groups Add the EtherAVB pin groups to the R8A77970 PFC driver. Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a77970.c | 98 +++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) commit 1c85f2fa68a4616f437424b18a229d331c699456 Author: Marc Zyngier Date: Tue Feb 20 13:01:20 2018 +0000 drm/rockchip: Don't use spin_lock_irqsave in interrupt context The rockchip DRM driver is quite careful to disable interrupts when taking a lock that is also taken in interrupt context, which is a good thing. What is a bit over the top is to use spin_lock_irqsave when already in interrupt context, as you cannot take another interrupt again, and disabling interrupt is just pure overhead. Switching to the non _irqsave version in interrupt context is more logical, and less heavy handed. Signed-off-by: Marc Zyngier Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180220130120.5254-4-marc.zyngier@arm.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 76f1416e6428dfcebba2134aa8c37963f8f71439 Author: Marc Zyngier Date: Tue Feb 20 13:01:19 2018 +0000 drm/rockchip: Do not use memcpy for MMIO addresses memcpy is only meant to be used for memory, and only that. MMIO accessors should be used to access MMIO regions, preferably the ones that correspond to the size of the register accessed. Let's convert the bulk register copy to writel/readl_relaxed, which is the correct API. Signed-off-by: Marc Zyngier Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180220130120.5254-3-marc.zyngier@arm.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 5f9e93fed4d45e9a8f84728aff1a8f2ab8922902 Author: Marc Zyngier Date: Tue Feb 20 13:01:18 2018 +0000 drm/rockchip: Clear all interrupts before requesting the IRQ Calling request_irq() followed by disable_irq() is usually a bad idea, specially if the interrupt can be pending, and you're not yet in a position to handle it. This is exactly what happens on my kevin system when rebooting in a second kernel using kexec: Some interrupt is left pending from the previous kernel, and we take it too early, before disable_irq() could do anything. Let's clear the pending interrupts as we initialize the HW, and move the interrupt request after that point. This ensures that we're in a sane state when the interrupt is requested. Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier [adapted to recent rockchip-drm changes] Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180220130120.5254-2-marc.zyngier@arm.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 1bcda09d291081a7732fcaa9d1745312404a4e36 Author: Bich HEMON Date: Mon Mar 12 09:50:05 2018 +0000 serial: stm32: add support for RS485 hardware control mode Implement Driver Enable signal (DE) to activate the transmission mode of the external transceiver. Signed-off-by: Yves Coppeaux Signed-off-by: Bich Hemon Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 130 ++++++++++++++++++++++++++++++++++++++- drivers/tty/serial/stm32-usart.h | 3 + 2 files changed, 132 insertions(+), 1 deletion(-) commit 241672cb4b166da3d2f4deb66bac335f44e04d4a Author: Bich HEMON Date: Mon Mar 12 09:50:04 2018 +0000 dt-bindings: serial: stm32: add RS485 optional properties Add options for enabling RS485 hardware control and configuring Driver Enable signal: - rs485-rts-delay - rs485-rx-during-tx - rs485-rts-active-low - linux,rs485-enabled-at-boot-time Signed-off-by: Bich Hemon Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/st,stm32-usart.txt | 2 ++ 1 file changed, 2 insertions(+) commit ce290a19609d5ecd4a240a4750e0ed9a476cf015 Author: Christian Brauner Date: Tue Mar 13 17:55:27 2018 +0100 selftests: add devpts selftests This adds tests to check: - bind-mounts from /dev/pts/ptmx to /dev/ptmx work - non-standard mounts of devpts work - bind-mounts of /dev/pts/ptmx to locations that do not resolve to a valid slave pty path under the originating devpts mount fail Signed-off-by: Christian Brauner Acked-by: "Eric W. Biederman" Acked-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/Makefile | 1 + tools/testing/selftests/filesystems/.gitignore | 1 + tools/testing/selftests/filesystems/Makefile | 2 +- tools/testing/selftests/filesystems/devpts_pts.c | 313 +++++++++++++++++++++++ 4 files changed, 316 insertions(+), 1 deletion(-) commit 4e15f760a43c7cb88e2b7ad6882501ccab5de29f Author: Christian Brauner Date: Tue Mar 13 17:55:26 2018 +0100 devpts: comment devpts_mntget() Signed-off-by: Christian Brauner Acked-by: "Eric W. Biederman" Acked-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman fs/devpts/inode.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit a319b01d9095da6f6c54bd20c1f1300762506255 Author: Christian Brauner Date: Tue Mar 13 17:55:25 2018 +0100 devpts: resolve devpts bind-mounts Most libcs will still look at /dev/ptmx when opening the master fd of a pty device. When /dev/ptmx is a bind-mount of /dev/pts/ptmx and the TIOCGPTPEER ioctl() is used to safely retrieve a file descriptor for the slave side of the pty based on the master fd, the /proc/self/fd/{0,1,2} symlinks will point to /. A very simply reproducer for this issue presupposing a libc that uses TIOCGPTPEER in its openpty() implementation is: unshare --mount mount --bind /dev/pts/ptmx /dev/ptmx chmod 666 /dev/ptmx script ls -al /proc/self/fd/0 Having bind-mounts of /dev/pts/ptmx to /dev/ptmx not working correctly is a regression. In addition, it is also a fairly common scenario in containers employing user namespaces. The reason for the current failure is that the kernel tries to verify the useability of the devpts filesystem without resolving the /dev/ptmx bind-mount first. This will lead it to detect that the dentry is escaping its bind-mount. The reason is that while the devpts filesystem mounted at /dev/pts has the devtmpfs mounted at /dev as its parent mount: 21 -- -- / /dev -- 21 -- / /dev/pts devtmpfs and devpts are on different devices -- -- 0:6 / /dev -- -- 0:20 / /dev/pts This has the consequence that the pathname of the parent directory of the devpts filesystem mount at /dev/pts is /. So if /dev/ptmx is a bind-mount of /dev/pts/ptmx then the /dev/ptmx bind-mount and the devpts mount at /dev/pts will end up being located on the same device which is recorded in the superblock of their vfsmount. This means the parent directory of the /dev/ptmx bind-mount will be /ptmx: -- -- ---- /ptmx /dev/ptmx Without the bind-mount resolution patch the kernel will now perform the bind-mount escape check directly on /dev/ptmx. The function responsible for this is devpts_ptmx_path() which calls pts_path() which in turn calls path_parent_directory(). Based on the above explanation, path_parent_directory() will yield / as the parent directory for the /dev/ptmx bind-mount and not the expected /dev. Thus, the kernel detects that /dev/ptmx is escaping its bind-mount and will set /proc//fd/ to /. This patch changes the logic to first resolve any bind-mounts. After the bind-mounts have been resolved (i.e. we have traced it back to the associated devpts mount) devpts_ptmx_path() can be called. In order to guarantee correct path generation for the slave file descriptor the kernel now requires that a pts directory is found in the parent directory of the ptmx bind-mount. This implies that when doing bind-mounts the ptmx bind-mount and the devpts mount should have a common parent directory. A valid example is: mount -t devpts devpts /dev/pts mount --bind /dev/pts/ptmx /dev/ptmx an invalid example is: mount -t devpts devpts /dev/pts mount --bind /dev/pts/ptmx /ptmx This allows us to support: - calling open on ptmx devices located inside non-standard devpts mounts: mount -t devpts devpts /mnt master = open("/mnt/ptmx", ...); slave = ioctl(master, TIOCGPTPEER, ...); - calling open on ptmx devices located outside the devpts mount with a common ancestor directory: mount -t devpts devpts /dev/pts mount --bind /dev/pts/ptmx /dev/ptmx master = open("/dev/ptmx", ...); slave = ioctl(master, TIOCGPTPEER, ...); while failing on ptmx devices located outside the devpts mount without a common ancestor directory: mount -t devpts devpts /dev/pts mount --bind /dev/pts/ptmx /ptmx master = open("/ptmx", ...); slave = ioctl(master, TIOCGPTPEER, ...); in which case save path generation cannot be guaranteed. Signed-off-by: Christian Brauner Suggested-by: Eric Biederman Suggested-by: Linus Torvalds Reviewed-by: "Eric W. Biederman" Acked-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman fs/devpts/inode.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 7d71109df186d630a41280670c8d71d0cf9b0da9 Author: Christian Brauner Date: Tue Mar 13 17:55:24 2018 +0100 devpts: hoist out check for DEVPTS_SUPER_MAGIC Hoist the check whether we have already found a suitable devpts filesystem out of devpts_ptmx_path() in preparation for the devpts bind-mount resolution patch. This is a non-functional change. Signed-off-by: Christian Brauner Reviewed-by: "Eric W. Biederman" Acked-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman fs/devpts/inode.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit dc7073b0234ee6f48a8e609cd2def777de1e2d26 Author: Thierry Reding Date: Wed Mar 14 12:10:14 2018 +0100 arm64: defconfig: Enable the Tegra SMMU by default Display and graphics can't work together without an SMMU, so it is effectively always getting enabled anyway. Signed-off-by: Thierry Reding arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 70ae9cf015a165c33b63c9c7718f5a3c70e51f96 Author: Bogdan Purcareata Date: Fri Mar 2 04:23:59 2018 -0600 staging: fsl-mc: Move DPCON out of staging Move the source files out of staging into their final locations: - dpcon.c goes to drivers/bus/fsl-mc/, next to the core infrastructure - dpcon-cmd.h gets merged into drivers/bus/fsl-mc/fsl-mc-private.h, next to the other internally used APIs - dpcon.h gets merged into include/linux/fsl/mc.h, exposing the public API Update references in the dpaa2-eth staging driver. DPCON stands for Data Path Concentrator - an interface between DPIO (Data Path IO) and its users (e.g. dpaa2-eth). You can read more about DPIO in Documentation/networking/dpaa2/overview.rst Signed-off-by: Bogdan Purcareata Reviewed-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/bus/fsl-mc/Makefile | 1 + drivers/bus/fsl-mc/dpcon.c | 222 +++++++++++++++++++++++++ drivers/bus/fsl-mc/fsl-mc-private.h | 48 ++++++ drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 1 - drivers/staging/fsl-mc/bus/Makefile | 1 - drivers/staging/fsl-mc/bus/dpcon-cmd.h | 53 ------ drivers/staging/fsl-mc/bus/dpcon.c | 222 ------------------------- drivers/staging/fsl-mc/include/dpcon.h | 79 --------- include/linux/fsl/mc.h | 66 ++++++++ 9 files changed, 337 insertions(+), 356 deletions(-) commit 9c692d5ae7ea84d221d7504b7ebef07ea8f3ff27 Author: Bogdan Purcareata Date: Fri Mar 2 04:23:58 2018 -0600 staging: fsl-mc: Move DPBP out of staging Move the source files out of staging into their final locations: - dpbp.c goes to drivers/bus/fsl-mc/, next to the core infrastructure - dpbp-cmd.h gets merged into drivers/bus/fsl-mc/fsl-mc-private.h, next to the other internally used APIs - dpbp.h gets merged into include/linux/fsl/mc.h, exposing the public API Update references in the dpaa2-eth staging driver. DPBP stands for Data Path Buffer Pool - you can read more about the object in Documentation/networking/dpaa2/overview.rst Signed-off-by: Bogdan Purcareata Reviewed-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/bus/fsl-mc/Makefile | 1 + drivers/bus/fsl-mc/dpbp.c | 186 +++++++++++++++++++++++++ drivers/bus/fsl-mc/fsl-mc-private.h | 39 ++++++ drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 2 +- drivers/staging/fsl-mc/bus/Makefile | 3 +- drivers/staging/fsl-mc/bus/dpbp-cmd.h | 44 ------ drivers/staging/fsl-mc/bus/dpbp.c | 186 ------------------------- drivers/staging/fsl-mc/include/dpbp.h | 53 ------- include/linux/fsl/mc.h | 42 ++++++ 9 files changed, 270 insertions(+), 286 deletions(-) commit d64c2a76123f0300b08d0557ad56e9d599872a36 Author: Greg Kroah-Hartman Date: Wed Mar 14 13:12:26 2018 +0100 staging: irda: remove the irda network stack and drivers No one has publicly stepped up to maintain this broken codebase for devices that no one uses anymore, so let's just drop the whole thing. If someone really wants/needs it, we can revert this and they can fix the code up to work properly. Cc: David S. Miller Signed-off-by: Greg Kroah-Hartman Documentation/networking/irda.txt | 10 - drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 2 - drivers/staging/irda/TODO | 4 - drivers/staging/irda/drivers/Kconfig | 398 --- drivers/staging/irda/drivers/Makefile | 44 - drivers/staging/irda/drivers/act200l-sir.c | 250 -- drivers/staging/irda/drivers/actisys-sir.c | 245 -- drivers/staging/irda/drivers/ali-ircc.c | 2217 -------------- drivers/staging/irda/drivers/ali-ircc.h | 227 -- drivers/staging/irda/drivers/au1k_ir.c | 985 ------- drivers/staging/irda/drivers/bfin_sir.c | 819 ------ drivers/staging/irda/drivers/bfin_sir.h | 93 - drivers/staging/irda/drivers/donauboe.c | 1732 ----------- drivers/staging/irda/drivers/donauboe.h | 362 --- drivers/staging/irda/drivers/esi-sir.c | 157 - drivers/staging/irda/drivers/girbil-sir.c | 252 -- drivers/staging/irda/drivers/irda-usb.c | 1906 ------------ drivers/staging/irda/drivers/irda-usb.h | 175 -- drivers/staging/irda/drivers/irtty-sir.c | 570 ---- drivers/staging/irda/drivers/irtty-sir.h | 34 - drivers/staging/irda/drivers/kingsun-sir.c | 634 ---- drivers/staging/irda/drivers/ks959-sir.c | 912 ------ drivers/staging/irda/drivers/ksdazzle-sir.c | 813 ------ drivers/staging/irda/drivers/litelink-sir.c | 199 -- drivers/staging/irda/drivers/ma600-sir.c | 253 -- drivers/staging/irda/drivers/mcp2120-sir.c | 224 -- drivers/staging/irda/drivers/mcs7780.c | 990 ------- drivers/staging/irda/drivers/mcs7780.h | 165 -- drivers/staging/irda/drivers/nsc-ircc.c | 2410 ---------------- drivers/staging/irda/drivers/nsc-ircc.h | 281 -- drivers/staging/irda/drivers/old_belkin-sir.c | 146 - drivers/staging/irda/drivers/pxaficp_ir.c | 1075 ------- drivers/staging/irda/drivers/sa1100_ir.c | 1150 -------- drivers/staging/irda/drivers/sh_sir.c | 810 ------ drivers/staging/irda/drivers/sir-dev.h | 191 -- drivers/staging/irda/drivers/sir_dev.c | 987 ------- drivers/staging/irda/drivers/sir_dongle.c | 133 - drivers/staging/irda/drivers/smsc-ircc2.c | 3026 -------------------- drivers/staging/irda/drivers/smsc-ircc2.h | 191 -- drivers/staging/irda/drivers/smsc-sio.h | 100 - drivers/staging/irda/drivers/stir4200.c | 1134 -------- drivers/staging/irda/drivers/tekram-sir.c | 225 -- drivers/staging/irda/drivers/toim3232-sir.c | 358 --- drivers/staging/irda/drivers/via-ircc.c | 1593 ----------- drivers/staging/irda/drivers/via-ircc.h | 846 ------ drivers/staging/irda/drivers/vlsi_ir.c | 1872 ------------ drivers/staging/irda/drivers/vlsi_ir.h | 757 ----- drivers/staging/irda/drivers/w83977af.h | 53 - drivers/staging/irda/drivers/w83977af_ir.c | 1285 --------- drivers/staging/irda/drivers/w83977af_ir.h | 198 -- drivers/staging/irda/include/net/irda/af_irda.h | 87 - drivers/staging/irda/include/net/irda/crc.h | 29 - drivers/staging/irda/include/net/irda/discovery.h | 95 - .../staging/irda/include/net/irda/ircomm_core.h | 106 - .../staging/irda/include/net/irda/ircomm_event.h | 83 - drivers/staging/irda/include/net/irda/ircomm_lmp.h | 36 - .../staging/irda/include/net/irda/ircomm_param.h | 147 - drivers/staging/irda/include/net/irda/ircomm_ttp.h | 37 - drivers/staging/irda/include/net/irda/ircomm_tty.h | 121 - .../irda/include/net/irda/ircomm_tty_attach.h | 92 - drivers/staging/irda/include/net/irda/irda.h | 115 - .../staging/irda/include/net/irda/irda_device.h | 285 -- drivers/staging/irda/include/net/irda/iriap.h | 108 - .../staging/irda/include/net/irda/iriap_event.h | 85 - .../staging/irda/include/net/irda/irias_object.h | 108 - .../staging/irda/include/net/irda/irlan_client.h | 42 - .../staging/irda/include/net/irda/irlan_common.h | 230 -- drivers/staging/irda/include/net/irda/irlan_eth.h | 32 - .../staging/irda/include/net/irda/irlan_event.h | 81 - .../staging/irda/include/net/irda/irlan_filter.h | 35 - .../staging/irda/include/net/irda/irlan_provider.h | 52 - drivers/staging/irda/include/net/irda/irlap.h | 311 -- .../staging/irda/include/net/irda/irlap_event.h | 129 - .../staging/irda/include/net/irda/irlap_frame.h | 167 -- drivers/staging/irda/include/net/irda/irlmp.h | 295 -- .../staging/irda/include/net/irda/irlmp_event.h | 98 - .../staging/irda/include/net/irda/irlmp_frame.h | 62 - drivers/staging/irda/include/net/irda/irmod.h | 109 - drivers/staging/irda/include/net/irda/irqueue.h | 96 - drivers/staging/irda/include/net/irda/irttp.h | 210 -- drivers/staging/irda/include/net/irda/parameters.h | 100 - drivers/staging/irda/include/net/irda/qos.h | 101 - drivers/staging/irda/include/net/irda/timer.h | 102 - drivers/staging/irda/include/net/irda/wrapper.h | 58 - drivers/staging/irda/net/Kconfig | 96 - drivers/staging/irda/net/Makefile | 17 - drivers/staging/irda/net/af_irda.c | 2694 ----------------- drivers/staging/irda/net/discovery.c | 417 --- drivers/staging/irda/net/ircomm/Kconfig | 12 - drivers/staging/irda/net/ircomm/Makefile | 8 - drivers/staging/irda/net/ircomm/ircomm_core.c | 563 ---- drivers/staging/irda/net/ircomm/ircomm_event.c | 246 -- drivers/staging/irda/net/ircomm/ircomm_lmp.c | 350 --- drivers/staging/irda/net/ircomm/ircomm_param.c | 501 ---- drivers/staging/irda/net/ircomm/ircomm_ttp.c | 350 --- drivers/staging/irda/net/ircomm/ircomm_tty.c | 1329 --------- .../staging/irda/net/ircomm/ircomm_tty_attach.c | 987 ------- drivers/staging/irda/net/ircomm/ircomm_tty_ioctl.c | 291 -- drivers/staging/irda/net/irda_device.c | 316 -- drivers/staging/irda/net/iriap.c | 1085 ------- drivers/staging/irda/net/iriap_event.c | 496 ---- drivers/staging/irda/net/irias_object.c | 555 ---- drivers/staging/irda/net/irlan/Kconfig | 14 - drivers/staging/irda/net/irlan/Makefile | 7 - drivers/staging/irda/net/irlan/irlan_client.c | 559 ---- .../staging/irda/net/irlan/irlan_client_event.c | 511 ---- drivers/staging/irda/net/irlan/irlan_common.c | 1176 -------- drivers/staging/irda/net/irlan/irlan_eth.c | 340 --- drivers/staging/irda/net/irlan/irlan_event.c | 60 - drivers/staging/irda/net/irlan/irlan_filter.c | 240 -- drivers/staging/irda/net/irlan/irlan_provider.c | 408 --- .../staging/irda/net/irlan/irlan_provider_event.c | 233 -- drivers/staging/irda/net/irlap.c | 1207 -------- drivers/staging/irda/net/irlap_event.c | 2316 --------------- drivers/staging/irda/net/irlap_frame.c | 1407 --------- drivers/staging/irda/net/irlmp.c | 1996 ------------- drivers/staging/irda/net/irlmp_event.c | 886 ------ drivers/staging/irda/net/irlmp_frame.c | 476 --- drivers/staging/irda/net/irmod.c | 199 -- drivers/staging/irda/net/irnet/Kconfig | 13 - drivers/staging/irda/net/irnet/Makefile | 7 - drivers/staging/irda/net/irnet/irnet.h | 522 ---- drivers/staging/irda/net/irnet/irnet_irda.c | 1885 ------------ drivers/staging/irda/net/irnet/irnet_irda.h | 178 -- drivers/staging/irda/net/irnet/irnet_ppp.c | 1189 -------- drivers/staging/irda/net/irnet/irnet_ppp.h | 116 - drivers/staging/irda/net/irnetlink.c | 162 -- drivers/staging/irda/net/irproc.c | 96 - drivers/staging/irda/net/irqueue.c | 912 ------ drivers/staging/irda/net/irsysctl.c | 258 -- drivers/staging/irda/net/irttp.c | 1886 ------------ drivers/staging/irda/net/parameters.c | 584 ---- drivers/staging/irda/net/qos.c | 771 ----- drivers/staging/irda/net/timer.c | 231 -- drivers/staging/irda/net/wrapper.c | 492 ---- include/uapi/linux/irda.h | 252 -- 137 files changed, 69241 deletions(-) commit c72654356da4b6a0e1ddd2f07a43a36b12be223e Author: HariPrasath Elango Date: Wed Mar 14 15:53:31 2018 +0530 staging: pi433: Remove comments inside code Remove comments inbetween code as in this case. Signed-off-by: HariPrasath Elango Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/pi433_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b83b8b1881c4da43f3eb72111434ec23a3f15fff Author: Ivan Safonov Date: Fri Mar 9 19:49:23 2018 +0300 staging:r8188eu: Use lib80211 to support TKIP Custom TKIP decryption replaced with lib80211 implementation. MIC check use lib80211 too. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/Kconfig | 1 + drivers/staging/rtl8188eu/core/rtw_recv.c | 161 ++++++++------------------ drivers/staging/rtl8188eu/core/rtw_security.c | 92 +++++++-------- 3 files changed, 94 insertions(+), 160 deletions(-) commit 474e1dc5e249a63b4b1dfaedcd56ebc999a1acd7 Author: Eric Anholt Date: Fri Mar 9 10:44:17 2018 -0800 staging: vc04_services: Remove vchiq_queue_bulk_{transmit,receive}. These are dead code, including in the downstream Raspberry Pi tree. Signed-off-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 20 -------------------- .../vc04_services/interface/vchiq_arm/vchiq_if.h | 10 ---------- 2 files changed, 30 deletions(-) commit 50c0d8709d3d7a7c83fb58dc2f8cff9f3ad1e21a Author: Eric Anholt Date: Fri Mar 9 10:44:16 2018 -0800 staging: vc04_services: Mark the "DT bindings" job done. Now we just need to get the other drivers merged and finish the style cleanups/garbage collecting so we can get out of staging. Signed-off-by: Eric Anholt Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchi/TODO | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 614fa22119d6f406beac500fe30bc5c0b60ec34a Author: Eric Anholt Date: Fri Mar 9 10:44:15 2018 -0800 ARM: dts: bcm2835: Add VCHIQ node to the Raspberry Pi boards. (v3) The VCHIQ firmware communication channel operates in parallel with our other mailbox-based channel. This is the communication channel that exposes the firmware's media decode/encode and ISP interfaces. Signed-off-by: Eric Anholt Acked-by: Stefan Wahren (v2) Signed-off-by: Greg Kroah-Hartman arch/arm/boot/dts/bcm2835-rpi.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 68883dc0db43f4943d4dab3c5d31e703d4ebb435 Author: Eric Anholt Date: Fri Mar 9 10:44:14 2018 -0800 dt-bindings: soc: Add a binding for the Broadcom VCHIQ services. (v3) The VCHIQ communication channel can be provided by BCM283x and Capri SoCs, to communicate with the VPU-side OS services. Signed-off-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 14dd37fc7b65f6f7e362d44acad4603d4db4821d Author: Eric Anholt Date: Fri Mar 9 10:44:13 2018 -0800 staging: vc04_services: Remove cache-line-size property (v3) It's been tempting to replace this with (L1) cache_line_size(), but that's really not what the value is about. It's about coordinating the condition for the pagelist fragment behavior between the two sides. However, the property was not accepted for the upstream DT binding, so we have to use the firmware's fallback value. Signed-off-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman .../interface/vchiq_arm/vchiq_2835_arm.c | 20 +++++++++++--------- .../interface/vchiq_arm/vchiq_pagelist.h | 1 - 2 files changed, 11 insertions(+), 10 deletions(-) commit 8b0217965418f2bd27214b075e8d538f1b75df48 Author: Greg Kroah-Hartman Date: Wed Mar 14 13:02:48 2018 +0100 staging: ccree: remove ccree staging driver copy The ccree driver is now in the cryptodev tree, so remove it from drivers/staging as it's no longer needed here. Based on a patch from Gilad, but the mailing list didn't like it :( Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/ccree/Kconfig | 27 - drivers/staging/ccree/Makefile | 7 - drivers/staging/ccree/TODO | 10 - drivers/staging/ccree/cc_aead.c | 2704 ------------------------------ drivers/staging/ccree/cc_aead.h | 109 -- drivers/staging/ccree/cc_buffer_mgr.c | 1651 ------------------ drivers/staging/ccree/cc_buffer_mgr.h | 74 - drivers/staging/ccree/cc_cipher.c | 1165 ------------- drivers/staging/ccree/cc_cipher.h | 74 - drivers/staging/ccree/cc_crypto_ctx.h | 170 -- drivers/staging/ccree/cc_debugfs.c | 101 -- drivers/staging/ccree/cc_debugfs.h | 32 - drivers/staging/ccree/cc_driver.c | 474 ------ drivers/staging/ccree/cc_driver.h | 194 --- drivers/staging/ccree/cc_fips.c | 111 -- drivers/staging/ccree/cc_fips.h | 37 - drivers/staging/ccree/cc_hash.c | 2296 ------------------------- drivers/staging/ccree/cc_hash.h | 114 -- drivers/staging/ccree/cc_host_regs.h | 142 -- drivers/staging/ccree/cc_hw_queue_defs.h | 590 ------- drivers/staging/ccree/cc_ivgen.c | 280 ---- drivers/staging/ccree/cc_ivgen.h | 55 - drivers/staging/ccree/cc_kernel_regs.h | 167 -- drivers/staging/ccree/cc_lli_defs.h | 59 - drivers/staging/ccree/cc_pm.c | 122 -- drivers/staging/ccree/cc_pm.h | 57 - drivers/staging/ccree/cc_request_mgr.c | 713 -------- drivers/staging/ccree/cc_request_mgr.h | 51 - drivers/staging/ccree/cc_sram_mgr.c | 107 -- drivers/staging/ccree/cc_sram_mgr.h | 65 - 32 files changed, 11761 deletions(-) commit 45b7c73226541e39ca4d6f3c5987aa1db2fb054c Author: Eric Anholt Date: Fri Mar 9 10:44:12 2018 -0800 staging: vc04_services: Replace "firmware" node with a compatible lookup. This was requested by Rob Herring in DT bindings review. Signed-off-by: Eric Anholt Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 64b8e6854e72d1bfffc35484d3a6189c8dcdf056 Author: Ji-Hun Kim Date: Tue Mar 13 15:09:15 2018 +0900 staging: rtl8723bs: core: rtw_cmd: remove unnecessary initialization Clean up checkpatch error: ERROR: do not initialise globals to 0 Signed-off-by: Ji-Hun Kim Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3127c7a7cc476a807406b686fede34a72954dec Author: Ajay Singh Date: Wed Mar 7 07:43:59 2018 +0530 staging: wilc1000: fix line over 80 char issue in handle_scan_done() Fix 'line over 80 characters' issue found by checkpatch.pl script in handle_scan_done(). Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit f3a46b0fccb3687b7bcd911d73db1583e32c1174 Author: Ajay Singh Date: Wed Mar 7 07:43:58 2018 +0530 staging: wilc1000: rename variables using camelCase in handle_rcvd_gnrl_async_info() Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 86 +++++++++++++++---------------- 1 file changed, 43 insertions(+), 43 deletions(-) commit 88be64aad1fc596cd44bc7bc1a23e66e3a3f583c Author: Ajay Singh Date: Wed Mar 7 07:43:57 2018 +0530 staging: wilc1000: rename WILC_HostIf_PackStaParam to avoid camelCase Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d956839de0d0ae4b5ad70f284349f0399ac641d2 Author: Ajay Singh Date: Wed Mar 7 07:43:56 2018 +0530 staging: wilc1000: rename variables prefix using datatype 'u8' Rename variables with datatype 'u8' in their name to follow the linux coding style. Renamed following variables: u8abort_running_scan pu8Buffer pu8keybuf pu8msa u8remain_on_chan_flag Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/coreconfigurator.c | 28 +++--- drivers/staging/wilc1000/host_interface.c | 135 ++++++++++++++-------------- 2 files changed, 81 insertions(+), 82 deletions(-) commit 0e7ba8eb977977087dd52f6384fb8514424ca43d Author: Ajay Singh Date: Wed Mar 7 07:43:55 2018 +0530 staging: wilc1000: fix line over 80 character in handle_disconnect() Refactor handle_disconnect() to avoid line over 80 characters issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 90 +++++++++++++++---------------- 1 file changed, 45 insertions(+), 45 deletions(-) commit 54300bfb880f2f03d56e0897073e0b930a2991c7 Author: Ajay Singh Date: Wed Mar 7 07:43:54 2018 +0530 staging: wilc1000: fix line over 80 char in handle_connect() Fix 'line over 80 characters' issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 48 +++++++++++++++++-------------- 1 file changed, 27 insertions(+), 21 deletions(-) commit 03ed9089cbe00d75093ec3cdbefeecb7093b2daa Author: Ajay Singh Date: Wed Mar 7 07:43:53 2018 +0530 staging: wilc1000: fix line over 80 char in handle_scan() Fix 'line over 80 character' issue reported by checkpatch.pl script in handle_scan(). Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 3e488a958a3c1d9705b833fbec414ca4fd333458 Author: Ajay Singh Date: Wed Mar 7 07:43:52 2018 +0530 staging: wilc1000: rename label 'ERRORHANDLER' to avoid uppercase name Cleanup patch to avoid use of uppercase for label names, to follow linux coding style. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 54 +++++++++++++++---------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit f32aeb0ecd0bcd8dd45edb16e3471bd5c02d6be7 Author: Ajay Singh Date: Wed Mar 7 07:43:51 2018 +0530 staging: wilc1000: rename strConnectInfo to avoid camelCase Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 56 +++++++++++++++---------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit ec90c21b4624230a4197b927ac5292582be43321 Author: Ajay Singh Date: Wed Mar 7 07:43:50 2018 +0530 staging: wilc1000: rename pstrHostIFconnectAttr to avoid camelCase issue Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 104 +++++++++++++++--------------- 1 file changed, 52 insertions(+), 52 deletions(-) commit 648cd9a69e59e12001fcc1ab2cf2f50b20e65f3c Author: Ajay Singh Date: Wed Mar 7 07:02:30 2018 +0530 staging: wilc1000: fix line over 80 char in cfg_scan_result() Refactor cfg_scan_result() API to avoid 'line over 80 chars' issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 148 +++++++++++----------- 1 file changed, 77 insertions(+), 71 deletions(-) commit 7d61592731f4b951803b25b46d112b1280c8ff26 Author: Ajay Singh Date: Wed Mar 7 07:02:29 2018 +0530 staging: wilc1000: rename pJoinParams to avoid camelCase Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a15b48bebf3218709b26e436f7f29ce1946fe7ef Author: Ajay Singh Date: Wed Mar 7 07:02:28 2018 +0530 staging: wilc1000: fix line over 80 char in mgmt_tx_cancel_wait() Fix 'line over 80 char' issue found in checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0a0dac38d4060d2bd9d5a16e999a2f8ee337d04e Author: Ajay Singh Date: Wed Mar 7 07:02:27 2018 +0530 staging: wilc1000: fix line over 80 char for cfg parse RX and TX function Fix 'line over 80 characters' issue found by checkpatch.pl script. Moved the common code from wilc_wfi_cfg_parse_tx_action() & wilc_wfi_cfg_parse_rx_action() to new function to avoid checkpatch issue. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 67 +++++++++++------------ 1 file changed, 32 insertions(+), 35 deletions(-) commit 6fa02f2d0b721ca3658c558d068fd96e68f733ea Author: Ajay Singh Date: Wed Mar 7 07:02:26 2018 +0530 staging: wilc1000: fix line over 80 char in get_key() & set_default_key() Fix 'line over 80 characters' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f3a5aa287e4afdc09a4136b3cede0655ba811f51 Author: Ajay Singh Date: Wed Mar 7 07:02:25 2018 +0530 staging: wilc1000: fix line over 80 char in change_virtual_intf() Fix 'line over 80 char' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 228f3cdb01b13417210825ee9b947d1cd08b60f6 Author: Ajay Singh Date: Wed Mar 7 07:02:24 2018 +0530 staging: wilc1000: rename au8ScanChanList to avoid camelCase Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a0e317cf92447930d9c0ec639a3d411db475a648 Author: Ajay Singh Date: Wed Mar 7 07:02:23 2018 +0530 staging: wilc1000: rename CfgScanResult to avoid camelCase Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 09c65f7bdea5bdad0ed44f77342dc1f54191eee5 Author: Ajay Singh Date: Wed Mar 7 07:02:22 2018 +0530 staging: wilc1000: rename pstrNetworkInfo to avoid camelCase Fix 'Avoid camleCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 51 +++++++++++------------ 1 file changed, 25 insertions(+), 26 deletions(-) commit 02567aa6e17060ce67da84de082b0be9acf0eac4 Author: Ajay Singh Date: Wed Mar 7 07:02:21 2018 +0530 staging: wilc1000: rename strHiddenNetwork to avoid camelCase Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 65fa72d34360c571b058afeb0e64367d3eaf064b Author: Samuel Thibault Date: Sat Mar 10 11:56:27 2018 +0100 staging: speakup: Add unicode support to the speakup_dummy driver This extends spk_io_ops with a synth_out_unicode which takes a u16 character instead of just a byte, and extends spk_ttyio to implement it to emit utf-8. spk_do_catch_up_unicode can then be introduced to benefit from synth_out_unicode, and speakup_dummy made to use spk_do_catch_up_unicode instead of spk_do_catch_up. Signed-off-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/speakup_dummy.c | 2 +- drivers/staging/speakup/spk_priv.h | 1 + drivers/staging/speakup/spk_ttyio.c | 18 ++++++++++++++++++ drivers/staging/speakup/spk_types.h | 1 + drivers/staging/speakup/synth.c | 25 +++++++++++++++++++++---- 5 files changed, 42 insertions(+), 5 deletions(-) commit b8461ff7747416dca950aad43415f214cfcdbfa3 Author: Colin Ian King Date: Mon Mar 12 23:36:05 2018 +0000 staging: comedi: adl_pci6208: remove redundant initialization of 'val' Variable 'val' is initialized with a value that is never read, it is updated with a new value again after intitialization. Remove the redundant initialization and move the declaration and assignment into the scope of the for-loop. Cleans up clang warning: drivers/staging/comedi/drivers/adl_pci6208.c:61:15: warning: Value stored to 'val' during its initialization is never read Signed-off-by: Colin Ian King Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/adl_pci6208.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8b6f053790d94cceb323c2754fcd69c1286778b8 Author: Sergio Paracuellos Date: Sun Mar 11 12:11:44 2018 +0100 staging: ks7010: replace custom rotation operations in favour of the kernel ones This patch replaces custom ROR32 and ROL32 macros for the ones included in bitops header of the linux kernel. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/michael_mic.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit ae91ce5db517626168a970806e650122a9b6d9f7 Author: Arnd Bergmann Date: Tue Mar 13 14:05:16 2018 +0100 staging: lustre: fid: avoid false-positive uninitialized variable warning One of Neil's recent cleanups apparently has led the code to get to a state where gcc tracks the 'seqnr' variable just enough to see that it is sometimes initialized in seq_client_alloc_seq(), but not enough that it can prove this initialization to be reliable before the use of that variable: drivers/staging/lustre/lustre/fid/fid_request.c: In function 'seq_client_alloc_fid': drivers/staging/lustre/lustre/fid/fid_request.c:245:22: error: 'seqnr' may be used uninitialized in this function [-Werror=maybe-uninitialized] The code seems to be otherwise correct, and I could not come up with a good way to simplify it further, so this adds a fake initialization to shut up that warning. Signed-off-by: Arnd Bergmann Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fid/fid_request.c | 1 + 1 file changed, 1 insertion(+) commit 7a76eaf41a545fad34f17ea36da41b5e7df38616 Author: Arnd Bergmann Date: Tue Mar 13 14:03:44 2018 +0100 staging: lustre: use module_name() macro for debug printf We now allow lustre to be built when CONFIG_MODULES is disabled, but that causes a build failure: In file included from drivers/staging/lustre/include/linux/libcfs/libcfs.h:42, from drivers/staging/lustre/lustre/obdclass/lu_object.c:44: drivers/staging/lustre/lustre/obdclass/lu_object.c: In function 'lu_context_key_degister': drivers/staging/lustre/lustre/obdclass/lu_object.c:1410:51: error: dereferencing pointer to incomplete type 'struct module' This particular case can be avoided by using the module_name() macro that was designed exactly to handle printing the name of a module in all configurations. Signed-off-by: Arnd Bergmann Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/lu_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6deae96b42eb1fa84938088087de0bd748f53093 Author: Tony Luck Date: Mon Mar 12 11:24:29 2018 -0700 firmware, DMI: Add function to look up a handle and return DIMM size When we first scan the SMBIOS table, save the size of the DIMM. Provide a function for other code (EDAC driver) to look up the size of a DIMM from its SMBIOS handle. Reviewed-by: Jean Delvare Signed-off-by: Tony Luck Cc: Aristeu Rozanski Cc: Dan Williams Cc: Len Brown Cc: Mauro Carvalho Chehab Cc: Qiuxu Zhuo Cc: "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org Cc: linux-nvdimm@lists.01.org Link: http://lkml.kernel.org/r/20180312182430.10335-5-tony.luck@intel.com Signed-off-by: Borislav Petkov drivers/firmware/dmi_scan.c | 31 +++++++++++++++++++++++++++++++ include/linux/dmi.h | 2 ++ 2 files changed, 33 insertions(+) commit 23222f8f8dce6a6d014bc5b7107a83ebe2a9c022 Author: Tony Luck Date: Mon Mar 12 11:24:28 2018 -0700 acpi, nfit: Add function to look up nvdimm device and provide SMBIOS handle EDAC driver needs to look up attributes of NVDIMMs provided in SMBIOS. Provide a function that looks up an acpi_nfit_memory_map from a device handle (node/socket/mc/channel/dimm) and returns the SMBIOS handle. Also pass back the "flags" so we can see if the NVDIMM is OK. Acked-by: Dan Williams Signed-off-by: Tony Luck Cc: "Rafael J. Wysocki" Cc: Aristeu Rozanski Cc: Dan Williams Cc: Erik Schmauss Cc: Jean Delvare Cc: Len Brown Cc: Mauro Carvalho Chehab Cc: Qiuxu Zhuo Cc: Robert Moore Cc: devel@acpica.org Cc: linux-acpi@vger.kernel.org Cc: linux-nvdimm@lists.01.org Link: http://lkml.kernel.org/r/20180312182430.10335-4-tony.luck@intel.com Signed-off-by: Borislav Petkov drivers/acpi/nfit/core.c | 27 +++++++++++++++++++++++++++ include/acpi/nfit.h | 18 ++++++++++++++++++ 2 files changed, 45 insertions(+) commit 6e810eb508f4b937bc2a718bd4e5cd74cca55500 Author: Mihail Atanassov Date: Tue Nov 7 15:30:46 2017 +0000 drm: mali-dp: Add YUV->RGB conversion support for video layers Internally Mali DP uses an RGB pipeline so video layers that support YUV input buffers need to convert the input data to RGB. The YUV buffers can have various encodings and this patch introduces support for BT.601, BT.709 and BT.2020 encodings, both limited and full ranges. This patch adds support for specifying the color encoding of the input buffers for the planes that are backed by the video layers and programs the YUV2RGB coefficients into hardware based on the selected encoding. Signed-off-by: Mihail Atanassov [updated to use standard properties] Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_hw.c | 14 +++---- drivers/gpu/drm/arm/malidp_hw.h | 3 +- drivers/gpu/drm/arm/malidp_planes.c | 79 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/arm/malidp_regs.h | 11 +----- 4 files changed, 90 insertions(+), 17 deletions(-) commit 57085dca982bd042f64aa23f5e03747595b2c8c0 Author: Liviu Dudau Date: Tue Feb 27 18:23:06 2018 +0000 drm: mali-dp: Turn off CRTC vblank when removing module. When unbinding the mali-dp driver the drm_vblank_cleanup() function warns us that the vblanks are still enabled. Fix that by calling drm_crtc_vblank_off() in the malidp_unbind() function. Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 828f207077c699a8363415efbcb2a6d8a11bb100 Author: Laurent Pinchart Date: Wed Jan 17 23:55:30 2018 +0200 drm: arm: malidp: Use drm_atomic_helper_shutdown() to disable planes on removal The plane cleanup handler currently calls drm_plane_helper_disable(), which is a legacy helper function. Replace it with a call to drm_atomic_helper_shutdown() at removal time. Signed-off-by: Laurent Pinchart Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_drv.c | 1 + drivers/gpu/drm/arm/malidp_planes.c | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) commit 084ffbd7fd147ce6e114d82298c84f143d4fff7f Author: Laurent Pinchart Date: Wed Jan 17 23:55:29 2018 +0200 drm: arm: malidp: Don't destroy planes manually in error handlers The top-level error handler calls drm_mode_config_cleanup() which will destroy all planes. There's no need to destroy them manually in lower error handlers. As plane cleanup is now handled entirely by drm_mode_config_cleanup(), we must ensure that the plane .destroy() handler frees allocated memory for the plane object that was freed by malidp_de_planes_destroy(). Do so by replacing the call to devm_kfree() in the .destroy() handler by kfree(). devm_kfree() is currently a no-op as the plane memory is allocated with kzalloc(), not devm_kzalloc(). Signed-off-by: Laurent Pinchart Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_crtc.c | 10 ++-------- drivers/gpu/drm/arm/malidp_drv.c | 1 - drivers/gpu/drm/arm/malidp_drv.h | 1 - drivers/gpu/drm/arm/malidp_planes.c | 13 +------------ 4 files changed, 3 insertions(+), 22 deletions(-) commit d862b2d622530d14072f3ae417a0525fb7361410 Author: Liviu Dudau Date: Thu Mar 1 16:38:02 2018 +0000 drm/mali-dp: Fix malidp_atomic_commit_hw_done() for event sending. Mali DP hardware has a 'go' bit (config_valid) for making the new scene parameters active at the next page flip. The problem with the current code is that the driver first sets this bit and then proceeds to wait for confirmation from the hardware that the configuration has been updated before arming the vblank event. As config_valid is actually asserted by the hardware after the vblank event, during the prefetch phase, when we get to arming the vblank event we are going to send it at the next vblank, in effect halving the vblank rate from the userspace perspective. Fix it by sending the userspace event from the IRQ handler, when we handle the config_valid interrupt, which syncs with the time when the hardware is active with the new parameters. Reported-by: Alexandru-Cosmin Gheorghe Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_drv.c | 32 +++++++++++++++++--------------- drivers/gpu/drm/arm/malidp_drv.h | 1 + drivers/gpu/drm/arm/malidp_hw.c | 12 +++++++++--- 3 files changed, 27 insertions(+), 18 deletions(-) commit f0437819ad82088d4a07732222912345b5b98767 Author: Ayan Halder Date: Tue Jan 23 16:49:29 2018 +0000 drm/arm/malidp: Disable pixel alpha blending for colors that do not have alpha Mali dp needs to disable pixel alpha blending (use layer alpha blending) to display color formats that do not contain alpha bits per pixel This patch depends on: "[PATCH v2 01/19] drm/fourcc: Add a alpha field to drm_format_info" Signed-off-by: Ayan Kumar Halder Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_planes.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit 6cc3a505dcd60894a3ecefcbb40058873924bcf0 Author: Ayan Halder Date: Tue Dec 19 16:20:16 2017 +0000 drm: mali-dp: Fix bug on scaling with rotation In the case, when the user wants to scale and rotate a layer by 90/270 degrees, the scaling engine input dimensions' parameters ie width and height needs to be swapped with respect to the layer's input dimensions. This means scaling engine input height should be set to layer's input width and scaling engine input width should be set to layer's input height. Signed-off-by: Ayan Halder Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_crtc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit e0521c05c13cca593d386533c61a646ab3dbcfd9 Author: Liviu Dudau Date: Fri Dec 15 16:42:19 2017 +0000 drm/mali-dp: Don't enable scaling engine for planes that only rotate. Currently the scaling engine gets enabled for a plane where the input size differs from the composition size. As rotation is done natively by the plane's hardware layer, we don't need the scaling engine to be enabled. Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_planes.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit f2f2c85c66202edcb623626b3babce7850d8b4fb Author: Dan Carpenter Date: Sat Dec 9 14:46:13 2017 +0300 drm: mali-dp: Uninitialized variable in malidp_se_check_scaling() We use "mc" without initializing it if scaling is not necessary. Fixes: 28ce675b7474 ("drm: mali-dp: Add plane upscaling support") Signed-off-by: Dan Carpenter Reviewed-by: Mihail Atanassov Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_planes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5ed4fdfa58f091a65cb533cc6b8f47ade4cc4475 Author: Liviu Dudau Date: Tue Dec 5 15:29:00 2017 +0000 drm/mali-dp: Align pitch size to be multiple of bus burst read size. Mali DP hardware needs pitch line sizes aligned to the bus burst size for reads, so take that into consideration when allocating dumb buffers. If the layer is rotated then the stride size requirement is even larger for some hardware versions, so allocate for the worst case scenario. Update the ->dumb_create() hook to a driver specific function that sets the correct pitch size. Reported-by: Ayan Halder Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_drv.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit fcad73b9b1fb9580fd43f1349fd8ab34d5d456e9 Author: Liviu Dudau Date: Tue Dec 5 16:51:03 2017 +0000 drm/mali-dp: Rotated planes need a larger pitch size. Rotated planes need a pitch size that is aligned to 8 bytes for older DP500 and DP550 and at least 64 bytes for DP650. Replace the malidp_hw_pitch_valid() function with one that calculates the correct pitch alignment to take into account rotation. Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_hw.h | 12 +++++++++--- drivers/gpu/drm/arm/malidp_planes.c | 4 +++- 2 files changed, 12 insertions(+), 4 deletions(-) commit 6761f0ac6649002890827e39cb541df6b71ec617 Merge: fdff862 9aa5134 Author: Greg Kroah-Hartman Date: Wed Mar 14 12:32:11 2018 +0100 Merge tag 'iio-for-4.17b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Second set of new device support, features and cleanup for IIO in the 4.17 cycle The uptick in staging cleanup is partly due to GSoC Applications process being underway and one of Daniel's tasks being to try cleaning up an IIO driver to move out of staging. Naturally there is some normal staging cleanup progress in here as well. New device support * Microchip mcp4018 - New driver supproting MCP4017, MCP4018 and MCP4019 digital pots. * On Semiconductor lv0104cs - New driver to support this ambient light sensor. Cleanup * axp20x_adc - remove a !! in favour of clear ternary operator. * ad2s1210 (staging cleanup) - Reorganise to avoid ending a line with [ - Remove some unnecessary defines. - Remove unsed variable. * ad5380 - Replace magic 0 with IIO_CHAN_INFO_RAW * ad5764 - Replace magic 0 with IIO_CHA_INFO_RAW * ad7150 (staging cleanup) - Align arguements with parenthesis. * ad7152 (staging cleanup) - Align arguements. * ad7746 (staging cleanup) - Align arguements. * ad7816 - Remove pointless void pointer cast. * ade7753 - Replace IIO_DEV_ATTR_CH_OFF with equivalent to avoid confusing checkpatch (this macro didn't really help anyway). Also drop the macro from the meter.h header. * ade7754 (staging cleanup) - Add names to funciton definition arguements. - Align arguements with open parenthesis where possible. * ade7758 (staging cleanup) - Remove __func__ from dev_dbg statements as provided by dynamic debug anyway. - Align arguements with open parenthesis where possible. * ade7759 (staging cleanup) - Replace IIO_DEV_ATTR_CH_OFF with equiavalent to avoid confusing checkpatch. * adis16201 (staging cleanup) - Headers in alphabetical order. - Blank lines before returns. * adis16209 (staging cleanup) - Headers in alphabetical order - Change some definition names to make them more meaningful (2 rounds of this). - Add explicit _REG prefix to register names to make them obviously different from fields within those registers. - Remove some superflous comments and group definitions better. - Use a switch statement to make it semantically obvious that we only have two options (rather than an unlimited 'else'). - Use sign_extent32 instead of open coding. * adt7316 (staging cleanup) - Move an export next to symbol. * bmc150 - drop redundant __func__ in dynamic debug. * ccs811 - Rename varaible to better reflect what it does. * cros_ec - Reduce sampling frequency before suspending to avoid preventing suspend. * dummy - Correct whitespace in Kconfig. - Add extra description in Kconfig. * ds1803 - Remove a VLA which we always know is 2 long. * hid-sensor-accel - Replace magic number 0 by IIO_CHAN_INFO_RAW. * hid-sensor-gyro - Replace magic number 0 by IIO_CHAN_INFO_RAW. * hid-sensor-light - Replace magic number 0 by IIO_CHAN_INFO_RAW. * hid-sensor-magn - Replace magic number 0 by IIO_CHAN_INFO_RAW. * lm3533 - Replace magic number 0 by IIO_CHAN_INFO_RAW * mlx90632 - Squash a smatch warning - no runtime effect. * stm32_dfsdm: - Cleanup the dt bindings. * sx9500 - Add GPIO ACPI mapping table to behave correctly when firmware doesn't provide the mapping. * tsl2x7x (staging cleanup) - Fix the proximity sensor functionality. - Remove platform data provided power functions. There are much better ways to do this these days. - Introduce some common functions to avoid various repititions. - Stop using mutex_trylock when mutex_lock and wait a bit is fine. - Improve error handling in various places. - Drop some 'Camel case' (which wasn't actually strickly camel case but was a bit odd. - Drop some _available sysfs attributes for things that don't exist (for particular supported parts). commit 001f86137d3fca3c9002beaa7609c666715ebc70 Author: Tony Luck Date: Mon Mar 12 11:24:27 2018 -0700 EDAC: Add new memory type for non-volatile DIMMs There are now non-volatile versions of DIMMs. Add a new entry to "enum mem_type" and a new string in edac_mem_types[]. Signed-off-by: Tony Luck Cc: "Rafael J. Wysocki" Cc: Aristeu Rozanski Cc: Dan Williams Cc: Jean Delvare Cc: Len Brown Cc: Mauro Carvalho Chehab Cc: Qiuxu Zhuo Cc: linux-acpi@vger.kernel.org Cc: linux-edac Cc: linux-nvdimm@lists.01.org Link: http://lkml.kernel.org/r/20180312182430.10335-3-tony.luck@intel.com Signed-off-by: Borislav Petkov drivers/edac/edac_mc.c | 3 ++- include/linux/edac.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 7004263bd4f4c79da9ca2a1d04d38d4d6ed609ab Author: Alexandre Belloni Date: Sat Feb 17 00:43:23 2018 +0100 powerpc/5200: dts: digsy_mtc.dts: fix rv3029 compatible The proper compatible for rv3029 is microcrystal,rv3029. Acked-by: Anatolij Gustschin Signed-off-by: Alexandre Belloni Signed-off-by: Michael Ellerman arch/powerpc/boot/dts/digsy_mtc.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 890ae7979758568734881ad0f382c4064e2386c3 Author: Alexandre Belloni Date: Wed Feb 21 22:46:33 2018 +0100 powerpc/time: stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it just before returning from the callback. Signed-off-by: Alexandre Belloni Signed-off-by: Michael Ellerman arch/powerpc/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea9d7bb798900096f26c585957d6ad9c532417e6 Author: Mika Westerberg Date: Fri Mar 9 13:17:01 2018 +0300 thunderbolt: Prevent crash when ICM firmware is not running On Lenovo ThinkPad Yoga 370 (and possibly some other Lenovo models as well) the Thunderbolt host controller sometimes comes up in such way that the ICM firmware is not running properly. This is most likely an issue in BIOS/firmware but as side-effect driver crashes the kernel due to NULL pointer dereference: BUG: unable to handle kernel NULL pointer dereference at 0000000000000980 IP: pci_write_config_dword+0x5/0x20 Call Trace: pcie2cio_write+0x3b/0x70 [thunderbolt] icm_driver_ready+0x168/0x260 [thunderbolt] ? tb_ctl_start+0x50/0x70 [thunderbolt] tb_domain_add+0x73/0xf0 [thunderbolt] nhi_probe+0x182/0x300 [thunderbolt] local_pci_probe+0x42/0xa0 ? pci_match_device+0xd9/0x100 pci_device_probe+0x146/0x1b0 driver_probe_device+0x315/0x480 ... Instead of crashing update the driver to bail out gracefully if we encounter such situation. Fixes: f67cf491175a ("thunderbolt: Add support for Internal Connection Manager (ICM)") Reported-by: Jordan Glover Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Cc: stable@vger.kernel.org drivers/thunderbolt/icm.c | 3 +++ 1 file changed, 3 insertions(+) commit ce31ddd5c40c0662ffb9957b868fbd58f6eac5b3 Author: zain wang Date: Fri Mar 9 23:22:57 2018 +0100 drm/bridge: analogix_dp: Only wait for panel ACK on PSR entry We currently wait for the panel to mirror our intended PSR state before continuing on both PSR enter and PSR exit. This is really only important to do when we're entering PSR, since we want to be sure the last frame we pushed is being served from the panel's internal fb before shutting down the soc blocks (vop/analogix). This patch changes the behavior such that we only wait for the panel to complete the PSR transition when we're entering PSR, and to skip verification when we're exiting. Cc: Stéphane Marchesin Cc: Sonny Rao Signed-off-by: zain wang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra Tested-by: Marek Szyprowski Reviewed-by: Archit Taneja Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180309222327.18689-7-enric.balletbo@collabora.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 ++-- drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 2 +- drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) commit d6dd77ebcd22ca226171e3ff7bce7e6025ed0595 Author: Tony Luck Date: Mon Mar 12 11:24:26 2018 -0700 EDAC: Drop duplicated array of strings for memory type names Somehow we ended up with two separate arrays of strings to describe the "enum mem_type" values. In edac_mc.c we have an exported list edac_mem_types[] that is used by a couple of drivers in debug messaged. In edac_mc_sysfs.c we have a private list that is used to display values in: /sys/devices/system/edac/mc/mc*/dimm*/dimm_mem_type /sys/devices/system/edac/mc/mc*/csrow*/mem_type This list was missing a value for MEM_LRDDR3. The string values in the two lists were different :-( Combining the lists, I kept the values so that the sysfs output will be unchanged as some scripts may depend on that. Reported-by: Borislav Petkov Acked-by: Borislav Petkov Signed-off-by: Tony Luck Cc: "Rafael J. Wysocki" Cc: Aristeu Rozanski Cc: Dan Williams Cc: Jean Delvare Cc: Len Brown Cc: Mauro Carvalho Chehab Cc: Qiuxu Zhuo Cc: linux-acpi@vger.kernel.org Cc: linux-edac Cc: linux-nvdimm@lists.01.org Link: http://lkml.kernel.org/r/20180312182430.10335-2-tony.luck@intel.com Signed-off-by: Borislav Petkov drivers/edac/edac_mc.c | 40 ++++++++++++++++++++-------------------- drivers/edac/edac_mc_sysfs.c | 26 ++------------------------ 2 files changed, 22 insertions(+), 44 deletions(-) commit 5b23fceec1ff94305c5d1accde018cae27448005 Author: Marek Szyprowski Date: Tue Mar 13 11:46:12 2018 +0100 clk: samsung: exynos5250: Add missing clocks for FIMC LITE SYSMMU devices FIMC LITE SYSMMU devices are defined in exynos5250.dtsi, but clocks for them are not instantiated by Exynos5250 clock provider driver. Add needed definitions for those clocks to fix IOMMU probe failure: ERROR: could not get clock /soc/sysmmu@13c40000:sysmmu(0) exynos-sysmmu 13c40000.sysmmu: Failed to get device clock(s)! exynos-sysmmu: probe of 13c40000.sysmmu failed with error -38 ERROR: could not get clock /soc/sysmmu@13c50000:sysmmu(0) exynos-sysmmu 13c50000.sysmmu: Failed to get device clock(s)! exynos-sysmmu: probe of 13c50000.sysmmu failed with error -38 Signed-off-by: Marek Szyprowski Fixes: bfed1074f213 ("clk: exynos5250: Add missing sysmmu clocks for DISP and ISP blocks") Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5250.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 920181ce84692653094d9a3e04e05c06177edf5d Author: Derek Basehore Date: Wed Feb 28 21:48:20 2018 -0800 irqchip/gic-v3-its: Add ability to resend MAPC on resume This adds functionality to resend the MAPC command to an ITS node on resume. If the ITS is powered down during suspend and the collections are not backed by memory, the ITS will lose that state. This just sets up the known state for the collections after the ITS is restored. Signed-off-by: Derek Basehore Reviewed-by: Brian Norris Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 86 ++++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 38 deletions(-) commit dba0bc7b76dcf80f82f5a7542605d4abc52808f2 Author: Derek Basehore Date: Wed Feb 28 21:48:18 2018 -0800 irqchip/gic-v3-its: Add ability to save/restore ITS state Some platforms power off GIC logic in suspend, so we need to save/restore state. The distributor and redistributor registers need to be handled in firmware code due to access permissions on those registers, but the ITS registers can be restored in the kernel. We limit this to systems where the ITS collections are implemented in HW (as opposed to being backed by memory tables), as they are the only ones that cannot be dealt with by the firmware. Signed-off-by: Derek Basehore [maz: fixed changelog, dropped DT property, limited to HCC being >0] Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 107 +++++++++++++++++++++++++++++++++++++ include/linux/irqchip/arm-gic-v3.h | 3 +- 2 files changed, 109 insertions(+), 1 deletion(-) commit f736d65df0acefcb50f7f7c6ad6070e7b954c79a Author: Marc Zyngier Date: Sun Feb 25 11:27:04 2018 +0000 irqchip/gic-v3: Allow LPIs to be disabled from the command line For most GICv3 implementations, enabling LPIs is a one way switch. Once they're on, there is no turning back, which completely kills kexec (pending tables will always be live, and we can't tell the secondary kernel where they are). This is really annoying if you plan to use Linux as a bootloader, as it pretty much guarantees that the secondary kernel won't be able to use MSIs, and may even see some memory corruption. Bad. A workaround for this unfortunate situation is to allow the kernel not to enable LPIs, even if the feature is present in the HW. This would allow Linux-as-a-bootloader to leave LPIs alone, and let the secondary kernel to do whatever it wants with them. Let's introduce a boolean "irqchip.gicv3_nolpi" command line option that serves that purpose. Signed-off-by: Marc Zyngier Documentation/admin-guide/kernel-parameters.txt | 8 ++++++++ drivers/irqchip/irq-gic-v3.c | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) commit d6062a6d62c643a06c393745d032da3e6441d4bd Author: Marc Zyngier Date: Fri Mar 9 14:53:19 2018 +0000 irqchip/gic-v3: Reset APgRn registers at boot time Booting a crash kernel while in an interrupt handler is likely to leave the Active Priority Registers with some state that is not relevant to the new kernel, and is likely to lead to erratic behaviours such as interrupts not firing as their priority is already active. As a sanity measure, wipe the APRs clean on startup. We make sure to wipe both group 0 and 1 registers in order to avoid any surprise. Signed-off-by: Marc Zyngier arch/arm/include/asm/arch_gicv3.h | 41 +++++++++++++++++++++++++++++---------- drivers/irqchip/irq-gic-v3.c | 23 ++++++++++++++++++++++ 2 files changed, 54 insertions(+), 10 deletions(-) commit c5e1035c9687025373b7c48a08efb37f5329916b Author: Marc Zyngier Date: Fri Mar 9 14:53:19 2018 +0000 irqchip/gic-v2: Reset APRn registers at boot time Booting a crash kernel while in an interrupt handler is likely to leave the Active Priority Registers with some state that is not relevant to the new kernel, and is likely to lead to erratic behaviours such as interrupts not firing as their priority is already active. As a sanity measure, wipe the APRs clean on startup. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 1ae8862e27e2b68542294747ae473fb3e1024f74 Author: Archana Sathyakumar Date: Wed Feb 28 10:27:30 2018 -0700 dt-bindings/interrupt-controller: pdc: Describe PDC device binding Add device binding documentation for the PDC Interrupt controller on QCOM SoC's like the SDM845. The interrupt-controller can be used to sense edge low interrupts and wakeup interrupts when the GIC is non-operational. Cc: devicetree@vger.kernel.org Signed-off-by: Archana Sathyakumar Signed-off-by: Lina Iyer Reviewed-by: Rob Herring Signed-off-by: Marc Zyngier .../bindings/interrupt-controller/qcom,pdc.txt | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) commit f55c73aef8904ca41ff99618a3a9cf538eb88626 Author: Archana Sathyakumar Date: Wed Feb 28 10:27:29 2018 -0700 irqchip/pdc: Add PDC interrupt controller for QCOM SoCs The Power Domain Controller (PDC) on QTI SoCs like SDM845 houses an interrupt controller along with other domain control functions to handle interrupt related functions like handle falling edge or active low which are not detected at the GIC and handle wakeup interrupts. The interrupt controller is on an always-on domain for the purpose of waking up the processor. Only a subset of the processor's interrupts are routed through the PDC to the GIC. The PDC powers on the processors' domain, when in low power mode and replays pending interrupts so the GIC may wake up the processor. Signed-off-by: Archana Sathyakumar Signed-off-by: Lina Iyer Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 9 ++ drivers/irqchip/Makefile | 1 + drivers/irqchip/qcom-pdc.c | 311 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 321 insertions(+) commit 734e036a9e1052da0b4b22bc320f6b30964e346d Author: Geert Uytterhoeven Date: Mon Feb 12 14:55:12 2018 +0100 irqchip/renesas-irqc: Use wakeup_path i.s.o. explicit clock handling Since commit 6f46aedb9c85873b ("irqchip: renesas-irqc: Add wake-up support"), when an IRQ is used for wakeup, the INTC block's module clock is manually kept running during system suspend, to make sure the device stays active. However, this explicit clock handling is merely a workaround for a failure to properly communicate wakeup information to the device core. Instead, set the device's power.wakeup_path field, to indicate this device is part of the wakeup path. Depending on the PM Domain's active_wakeup configuration, the genpd core code will keep the device enabled (and the clock running) during system suspend when needed. This allows for the removal of all explicit clock handling code from the driver. Reviewed-by: Ulf Hansson Signed-off-by: Geert Uytterhoeven Signed-off-by: Marc Zyngier drivers/irqchip/irq-renesas-irqc.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 66bf8252cf0d79ba693183d6b858885a19825d10 Author: Geert Uytterhoeven Date: Mon Feb 12 14:55:11 2018 +0100 irqchip/renesas-intc-irqpin: Use wakeup_path i.s.o. explicit clock handling Since commit 705bc96c2c15313c ("irqchip: renesas-intc-irqpin: Add minimal runtime PM support"), when an IRQ is used for wakeup, the INTC block's module clock (if exists) is manually kept running during system suspend, to make sure the device stays active. However, this explicit clock handling is merely a workaround for a failure to properly communicate wakeup information to the device core. Instead, set the device's power.wakeup_path field, to indicate this device is part of the wakeup path. Depending on the PM Domain's active_wakeup configuration, the genpd core code will keep the device enabled (and the clock running) during system suspend when needed. This allows for the removal of all explicit clock handling code from the driver. Reviewed-by: Ulf Hansson Signed-off-by: Geert Uytterhoeven Signed-off-by: Marc Zyngier drivers/irqchip/irq-renesas-intc-irqpin.c | 40 +++++++++++++------------------ 1 file changed, 16 insertions(+), 24 deletions(-) commit a8efe516316472ac771ba3f591295c7515e46172 Author: Arnd Bergmann Date: Tue Mar 13 21:59:54 2018 +0100 drm/panel: rm68200: Add backlight dependency Like many other panel drivers, this one fails to build when backlight support is disabled: drivers/gpu/drm/panel/panel-raydium-rm68200.o: In function `rm68200_probe': panel-raydium-rm68200.c:(.text+0x14a): undefined reference to `devm_of_find_backlight' This adds the appropriate dependency. Note that while include/linux/backlight.h provides a stub inline when backlight support is not enabled, this isn't enough to deal with the case where backlight support is built as a module but the panel driver is built-in, in which case linking will still fail as above. One way to avoid this is to add a dependency such as this: depends on BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=n but that is rather complex and misses the point that the panel support is mostly useless without backlight support. Fixes: 2b7ed18bed1a ("drm/panel: Add support for Raydium RM68200 panel driver") Signed-off-by: Arnd Bergmann [treding@nvidia.com: clarify the need for the dependency] Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180313210015.3344380-1-arnd@arndb.de drivers/gpu/drm/panel/Kconfig | 1 + 1 file changed, 1 insertion(+) commit e334d48b2cd4aa5d8557b766ef0cbb3072d6c5ba Author: zain wang Date: Fri Mar 9 23:22:55 2018 +0100 drm/rockchip: add mutex vop lock Add a lock to vop to avoid disabling the crtc while waiting for a line flag while enabling psr. If we disable in the middle of waiting for the line flag, we'll end up timing out or worse. Signed-off-by: zain wang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180309222327.18689-5-enric.balletbo@collabora.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 30 +++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit f9d5680596f2dac390918e6aec3e174db03633a3 Author: zain wang Date: Fri Mar 9 23:22:56 2018 +0100 drm/bridge: analogix_dp: add fast link train for eDP We would meet a short black screen when exit PSR with the full link training, In this case, we should use fast link train instead of full link training. Signed-off-by: zain wang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra Tested-by: Marek Szyprowski Reviewed-by: Archit Taneja [dropped header reordering] Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180309222327.18689-6-enric.balletbo@collabora.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 130 +++++++++++++++++---- drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 3 + 2 files changed, 108 insertions(+), 25 deletions(-) commit 243e398aab8dc0ba966dbcfef189b5a616e74a78 Author: zain wang Date: Fri Mar 9 23:22:54 2018 +0100 drm/bridge: analogix_dp: Don't change psr while bridge is disabled There is a race between AUX CH bring-up and enabling bridge which will cause link training to fail. To avoid hitting it, don't change psr state while enabling the bridge. Cc: Tomeu Vizoso Cc: Sean Paul Signed-off-by: zain wang Signed-off-by: Caesar Wang [seanpaul fixed up the commit message a bit and renamed *_supported to *_enabled] Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra Tested-by: Marek Szyprowski Reviewed-by: Archit Taneja Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180309222327.18689-4-enric.balletbo@collabora.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 15 ++++++++------- drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 2 +- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +- include/drm/bridge/analogix_dp.h | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) commit baa2f0240144c28502c09902f6a116138a354561 Author: Sean Paul Date: Fri Mar 9 23:22:53 2018 +0100 drm/rockchip: Remove analogix psr worker Now that the spinlocks and timers are gone, we can remove the psr worker located in rockchip's analogix driver and do the enable/disable directly. This should simplify the code and remove races on disable. Cc: 征增 王 Cc: Stéphane Marchesin Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180309222327.18689-3-enric.balletbo@collabora.com drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 31 ++----------------------- 1 file changed, 2 insertions(+), 29 deletions(-) commit 1d38e421bebd6ca24283dd88c4416378ee89825e Author: Yakir Yang Date: Fri Mar 9 23:22:52 2018 +0100 drm/bridge: analogix_dp: detect Sink PSR state after configuring the PSR Make sure the request PSR state takes effect in analogix_dp_send_psr_spd() function, or print the sink PSR error state if we failed to apply the requested PSR setting. Cc: 征增 王 Cc: Stéphane Marchesin Signed-off-by: Yakir Yang [seanpaul changed timeout loop to a readx poll] Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra Tested-by: Marek Szyprowski Reviewed-by: Archit Taneja Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180309222327.18689-2-enric.balletbo@collabora.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 6 ++-- drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 6 ++-- drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 35 +++++++++++++++++++--- 3 files changed, 37 insertions(+), 10 deletions(-) commit 182b1917109892ab9f26d66bfdcbc4ba6f0a0a65 Author: Toke Høiland-Jørgensen Date: Tue Feb 27 19:09:44 2018 +0200 ath9k: Protect queue draining by rcu_read_lock() When ath9k was switched over to use the mac80211 intermediate queues, node cleanup now drains the mac80211 queues. However, this call path is not protected by rcu_read_lock() as it was previously entirely internal to the driver which uses its own locking. This leads to a possible rcu_dereference() without holding rcu_read_lock(); but only if a station is cleaned up while having packets queued on the TXQ. Fix this by adding the rcu_read_lock() to the caller in ath9k. Fixes: 50f08edf9809 ("ath9k: Switch to using mac80211 intermediate software queues.") Cc: stable@vger.kernel.org Reported-by: Ben Greear Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/xmit.c | 4 ++++ 1 file changed, 4 insertions(+) commit 38a1390e02b7bfd02cabc98238e859c07d86a6d3 Author: Rakesh Pillai Date: Tue Feb 27 19:09:07 2018 +0200 ath10k: dma unmap mgmt tx buffer if wmi cmd send fails WCN3990 sends mgmt frames by reference via WMI. The host dma maps the mgmt frame and sends the physical address to the firmware in the wmi command. Since the dma mapping is done in the gen_mgmt_tx and if the wmi command send fails, the corresponding mgmt frame is not being dma unmapped. Fix the missing dma unmapping of mgmt tx frame when wmi command sending fails for mgmt tx by reference via WMI. The already exisiting mgmt tx using copy by value does not need such dma unmapping. Add a separate wmi-tlv op for mgmt tx via ref, which takes care of unmapping the dma address, in case of wmi command sending failure. Signed-off-by: Rakesh Pillai Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 28 +++++++++++++++++++----- drivers/net/wireless/ath/ath10k/wmi-ops.h | 36 ++++++++++++++++++++++++------- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 22 ++++++++----------- 3 files changed, 60 insertions(+), 26 deletions(-) commit 53dd9a68ba683986ec90497586f94b941bb748a0 Author: Linus Lüssing Date: Tue Mar 13 11:41:13 2018 +0100 batman-adv: add multicast flags netlink support Dump the list of multicast flags entries via the netlink socket. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich include/uapi/linux/batman_adv.h | 62 +++++++++++ net/batman-adv/multicast.c | 237 ++++++++++++++++++++++++++++++++++++++++ net/batman-adv/multicast.h | 18 +++ net/batman-adv/netlink.c | 12 ++ 4 files changed, 329 insertions(+) commit 41aeefcc38a2643a62db46818a70a781efb40d99 Author: Linus Lüssing Date: Tue Mar 13 11:41:12 2018 +0100 batman-adv: add DAT cache netlink support Dump the list of DAT cache entries via the netlink socket. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich include/uapi/linux/batman_adv.h | 20 +++++ net/batman-adv/distributed-arp-table.c | 152 +++++++++++++++++++++++++++++++++ net/batman-adv/distributed-arp-table.h | 8 ++ net/batman-adv/netlink.c | 76 ++++++++++------- 4 files changed, 223 insertions(+), 33 deletions(-) commit 007bb7d6c77ef2243dabf9c4132afa68bec82817 Author: Sukadev Bhattiprolu Date: Fri Feb 9 19:49:27 2018 -0800 powerpc/vas: Add a couple of trace points Add a couple of trace points in the VAS driver Signed-off-by: Sukadev Bhattiprolu [mpe: Add SPDX tag to new header] Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas-trace.h | 113 ++++++++++++++++++++++++++++ arch/powerpc/platforms/powernv/vas-window.c | 9 +++ 2 files changed, 122 insertions(+) commit 45ddea8a73a25461387eb8e87f3e0ecca084799b Author: Sukadev Bhattiprolu Date: Fri Feb 9 11:49:06 2018 -0600 powerpc/vas: Fix cleanup when VAS is not configured When VAS is not configured, unregister the platform driver. Also simplify cleanup by delaying vas debugfs init until we know VAS is configured. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas-debug.c | 11 +++++++++++ arch/powerpc/platforms/powernv/vas.c | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) commit 720c84046c26444fe825f8614ddceb5c46539e67 Author: Mark Hairgrove Date: Fri Feb 9 19:20:06 2018 -0800 powerpc/npu-dma.c: Fix crash after __mmu_notifier_register failure pnv_npu2_init_context wasn't checking the return code from __mmu_notifier_register. If __mmu_notifier_register failed, the npu_context was still assigned to the mm and the caller wasn't given any indication that things went wrong. Later on pnv_npu2_destroy_context would be called, which in turn called mmu_notifier_unregister and dropped mm->mm_count without having incremented it in the first place. This led to various forms of corruption like mm use-after-free and mm double-free. __mmu_notifier_register can fail with EINTR if a signal is pending, so this case can be frequent. This patch calls opal_npu_destroy_context on the failure paths, and makes sure not to assign mm->context.npu_context until past the failure points. Signed-off-by: Mark Hairgrove Acked-By: Alistair Popple Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/npu-dma.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) commit c2be663d5307fb9751a562ac664fa78cd7a00e2b Author: Christophe Lombard Date: Tue Feb 20 14:48:56 2018 +0100 cxl: Fix timebase synchronization status on P9 The PSL Timebase register is updated by the PSL to maintain the timebase. On P9, the Timebase value is only provided by the CAPP as received the last time a timebase request was performed. The timebase requests are initiated through the adapter configuration or application registers. The specific sysfs entry "/sys/class/cxl/cardxx/psl_timebase_synced" is now dynamically updated according the content of the PSL Timebase register. Fixes: f24be42aab37 ("cxl: Add psl9 specific code") Signed-off-by: Christophe Lombard Reviewed-by: Vaibhav Jain Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/pci.c | 17 ----------------- drivers/misc/cxl/sysfs.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 17 deletions(-) commit 07b8dc5523d2af82064a31a919ace75c67308cff Author: Colin Ian King Date: Tue Mar 13 15:50:24 2018 +0000 usb: dwc2: fix spelling mistake: "genereted" -> "generated" Trivial fix to spelling mistake in dev_warn warning message text. Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 037f03155b7d87e85168b4296516bfda5c9f6380 Author: Tomi Valkeinen Date: Wed Mar 14 10:24:43 2018 +0200 drm/omap: fix compile error when DPI is disabled When CONFIG_OMAP2_DSS_DPI is disabled, compilation fails due to: drivers/gpu/drm/omapdrm/dss/dss.h:388:25: error: conflicting types for ‘port’ struct device_node *port, ^~~~ Fix this by renaming the first parameter correctly. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dss.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83df2d4ed559442cdb5a1364c69aef3e682dceb0 Author: Tomi Valkeinen Date: Wed Mar 14 10:23:52 2018 +0200 drm/omap: fix compile error when debugfs is disabled When compiling with CONFIG_OMAP2_DSS_DEBUGFS disabled, build fails due to: drivers/gpu/drm/omapdrm/dss/dss.c:1474:10: error: ‘dss_debug_dump_clocks’ undeclared (first use in this function); did you mean ‘dispc_dump_clocks’? dss_debug_dump_clocks, dss); ^~~~~~~~~~~~~~~~~~~~~ dispc_dump_clocks Fix this by moving the required functions outside #if defined(CONFIG_OMAP2_DSS_DEBUGFS). In the long term, we perhaps want to try to get all the debugfs support left out if debugfs is not enabled. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dss.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 2c17a4368aad2b88b68e4390c819e226cf320f70 Author: Giulio Benetti Date: Tue Mar 13 18:54:37 2018 +0100 drm/sun4i: Handle DRM_BUS_FLAG_PIXDATA_*EDGE Handle both positive and negative dclk polarity, according to bus_flags, taking care of this: On A20 and similar SoCs, the only way to achieve Positive Edge (Rising Edge), is setting dclk clock phase to 2/3(240°). By default TCON works in Negative Edge(Falling Edge), this is why phase is set to 0 in that case. Unfortunately there's no way to logically invert dclk through IO_POL register. The only acceptable way to work, triple checked with scope, is using clock phase set to 0° for Negative Edge and set to 240° for Positive Edge. On A33 and similar SoCs there would be a 90° phase option, but it divides also dclk by 2. This patch is a way to avoid quirks all around TCON and DOTCLOCK drivers for using A33 90° phase divided by 2 and consequently increase code complexity. Signed-off-by: Giulio Benetti Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/1520963677-124239-1-git-send-email-giulio.benetti@micronovasrl.com drivers/gpu/drm/sun4i/sun4i_tcon.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit e4e4b7ad50cfd6e8ee4dc358cf4eeeb29b612f35 Author: Giulio Benetti Date: Tue Mar 13 12:20:19 2018 +0100 drm/sun4i: add lvds mode_valid function mode_valid function is missing for lvds. Add it making it pointed by encoder helper functions. Signed-off-by: Giulio Benetti Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/1520940019-68977-1-git-send-email-giulio.benetti@micronovasrl.com drivers/gpu/drm/sun4i/sun4i_lvds.c | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit cde8b7548272640437d2fa691ae211f940066f6b Author: Giulio Benetti Date: Tue Mar 13 12:36:57 2018 +0100 drm/sun4i: move rgb mode_valid from connector to encoder mode_valid function must be connected to encoder. Otherwise it could get not be called by drm in the case there's a bridge connected to encoder instead of a panel. Move mode_valid function pointer to encoder helper functions, changing its prototype according to encoder helper function pointer. Signed-off-by: Giulio Benetti Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/1520941017-81177-1-git-send-email-giulio.benetti@micronovasrl.com drivers/gpu/drm/sun4i/sun4i_rgb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cf1ba1d73a33944d8c1a75370a35434bf146b8a7 Author: Mikhail Lappo Date: Fri Feb 2 16:17:46 2018 -0200 thermal: imx: Fix race condition in imx_thermal_probe() When device boots with T > T_trip_1 and requests interrupt, the race condition takes place. The interrupt comes before THERMAL_DEVICE_ENABLED is set. This leads to an attempt to reading sensor value from irq and disabling the sensor, based on the data->mode field, which expected to be THERMAL_DEVICE_ENABLED, but still stays as THERMAL_DEVICE_DISABLED. Afher this issue sensor is never re-enabled, as the driver state is wrong. Fix this problem by setting the 'data' members prior to requesting the interrupts. Fixes: 37713a1e8e4c ("thermal: imx: implement thermal alarm interrupt handling") Cc: Signed-off-by: Mikhail Lappo Signed-off-by: Fabio Estevam Reviewed-by: Philipp Zabel Acked-by: Dong Aisheng Signed-off-by: Zhang Rui drivers/thermal/imx_thermal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e540c3c901934e23e5eaa9adec8aba1af317220c Author: John Johansen Date: Tue Mar 13 20:53:08 2018 -0700 apparmor: update MAINTAINERS file git and wiki locations The apparmor information in the MAINTAINERS file is out of date update it to the correct git reference for the master apparmor tree. And update the wiki location to use apparmor.net which forwards to the current wiki location on gitlab.com. Signed-off-by: John Johansen MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3719a1b130566cf91c3b3ec4707e1ed61bff6d54 Author: Ken Chen Date: Wed Feb 21 15:17:26 2018 +0800 ARM: dts: aspeed: Add Qualcomm Centriq 2400 REP BMC The Qualcomm Centriq 2400 REP (Reference Evaluation Platform) is an aarch64 Armv8 server platform with an ast2520 BMC. Signed-off-by: Ken Chen Acked-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/Makefile | 1 + .../boot/dts/aspeed-bmc-arm-centriq2400-rep.dts | 225 +++++++++++++++++++++ 2 files changed, 226 insertions(+) commit 0765a1d2d3737ac111da93115908cbcbd284034e Author: Lei YU Date: Wed Jan 17 13:56:56 2018 +0800 ARM: dts: aspeed: romulus: Add w83773g temp sensor Signed-off-by: Lei YU Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 00569f7ec490a15456122379f7686a0d659a3601 Author: Lei YU Date: Thu Dec 28 16:38:06 2017 +0800 ARM: dts: aspeed: romulus: hog GPIOS7 GPIOS7 shall be pulled low for CPLD to continue the power up sequence. With this hogged as pull-low, the CPLD workaround can be removed in OpenBMC. Signed-off-by: Lei YU Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 9739ae8459831aa97ce67a1208397ea56d81826e Author: Joel Stanley Date: Thu Jan 18 14:10:25 2018 -0600 ARM: dts: romulus: Remove MAX31785 device Romulus uses ASPEED's fan tach instead of max31785: * Pass1's max31785 is always reset by CPLD * Pass2's max31785 is not connected Signed-off-by: Lei YU Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 5 ----- 1 file changed, 5 deletions(-) commit 963976cfe9c54d4d9e725e61c90c47a4af6b5ea2 Merge: 6fa7324 cf07a60 Author: Dave Airlie Date: Wed Mar 14 14:53:01 2018 +1000 Merge tag 'drm-intel-next-2018-03-08' of git://anongit.freedesktop.org/drm/drm-intel into drm-next UAPI Changes: - Query uAPI interface (used for GPU topology information currently) * Mesa: https://patchwork.freedesktop.org/series/38795/ Driver Changes: - Increase PSR2 size for CNL (DK) - Avoid retraining LSPCON link unnecessarily (Ville) - Decrease request signaling latency (Chris) - GuC error capture fix (Daniele) * tag 'drm-intel-next-2018-03-08' of git://anongit.freedesktop.org/drm/drm-intel: (127 commits) drm/i915: Update DRIVER_DATE to 20180308 drm/i915: add schedule out notification of preempted but completed request drm/i915: expose rcs topology through query uAPI drm/i915: add query uAPI drm/i915: add rcs topology to error state drm/i915/debugfs: add rcs topology entry drm/i915/debugfs: reuse max slice/subslices already stored in sseu drm/i915: store all subslice masks drm/i915/guc: work around gcc-4.4.4 union initializer issue drm/i915/cnl: Add Wa_2201832410 drm/i915/icl: Gen11 forcewake support drm/i915/icl: Add Indirect Context Offset for Gen11 drm/i915/icl: Enhanced execution list support drm/i915/icl: new context descriptor support drm/i915/icl: Correctly initialize the Gen11 engines drm/i915: Assert that the request is indeed complete when signaled from irq drm/i915: Handle changing enable_fbc parameter at runtime better. drm/i915: Track whether the DP link is trained or not drm/i915: Nuke intel_dp->channel_eq_status drm/i915: Move SST DP link retraining into the ->post_hotplug() hook ... commit 6fa7324ac5489ad43c4b6351355b869bc5458bef Merge: 0b8eeac5 a110244 Author: Dave Airlie Date: Wed Mar 14 11:06:38 2018 +1000 Merge tag 'drm-amdkfd-next-2018-03-11' of git://people.freedesktop.org/~gabbayo/linux into drm-next Major points for this pull request: - Add dGPU support for amdkfd initialization code and queue handling. It's not complete support since the GPUVM part is missing (the under debate stuff). - Enable PCIe atomics for dGPU if present - Various adjustments to the amdgpu<-->amdkfd interface for dGPUs - Refactor IOMMUv2 code to allow loading amdkfd without IOMMUv2 in the system - Add HSA process eviction code in case of system memory pressure - Various fixes and small changes * tag 'drm-amdkfd-next-2018-03-11' of git://people.freedesktop.org/~gabbayo/linux: (24 commits) uapi: Fix type used in ioctl parameter structures drm/amdkfd: Implement KFD process eviction/restore drm/amdkfd: Add GPUVM virtual address space to PDD drm/amdkfd: Remove unaligned memory access drm/amdkfd: Centralize IOMMUv2 code and make it conditional drm/amdgpu: Add submit IB function for KFD drm/amdgpu: Add GPUVM memory management functions for KFD drm/amdgpu: add amdgpu_sync_clone drm/amdgpu: Update kgd2kfd_shared_resources for dGPU support drm/amdgpu: Add KFD eviction fence drm/amdgpu: Remove unused kfd2kgd interface drm/amdgpu: Fix wrong mask in get_atc_vmid_pasid_mapping_pasid drm/amdgpu: Fix header file dependencies drm/amdgpu: Replace kgd_mem with amdgpu_bo for kernel pinned gtt mem drm/amdgpu: remove useless BUG_ONs drm/amdgpu: Enable KFD initialization on dGPUs drm/amdkfd: Add dGPU device IDs and device info drm/amdkfd: Add dGPU support to kernel_queue_init drm/amdkfd: Add dGPU support to the MQD manager drm/amdkfd: Add dGPU support to the device queue manager ... commit 0b8eeac5c6ca6dcb19cce04bf8910006ac73dbd3 Merge: 62ccb65 60beecc Author: Dave Airlie Date: Wed Mar 14 10:59:16 2018 +1000 Merge tag 'drm-misc-next-2018-03-09-3' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 4.17: UAPI Changes: plane: Add color encoding/range properties (Jyri) nouveau: Replace iturbt_709 property with color_encoding property (Ville) Core Changes: atomic: Move plane clipping into plane check helper (Ville) property: Multiple new property checks/verification (Ville) Driver Changes: rockchip: Fixes & improvements for rk3399/chromebook plus (various) sun4i: Add H3/H5 HDMI support (Jernej) i915: Add support for limited/full-range ycbcr toggling (Ville) pl111: Add bandwidth checking/limiting (Linus) Cc: Jernej Skrabec Cc: Jyri Sarha Cc: Ville Syrjälä Cc: Linus Walleij * tag 'drm-misc-next-2018-03-09-3' of git://anongit.freedesktop.org/drm/drm-misc: (85 commits) drm/rockchip: Don't use atomic constructs for psr drm/rockchip: analogix_dp: set psr activate/deactivate when enable/disable bridge drm/rockchip: dw_hdmi: Move HDMI vpll clock enable to bind() drm/rockchip: inno_hdmi: reorder clk_disable_unprepare call in unbind drm/rockchip: inno_hdmi: Fix error handling path. drm/rockchip: dw-mipi-dsi: Fix connector and encoder cleanup. drm/nouveau: Replace the iturbt_709 prop with the standard COLOR_ENCODING prop drm/pl111: Use max memory bandwidth for resolution drm/bridge: sii902x: Retry status read after DDI I2C drm/pl111: Handle the RealView variant separately drm/pl111: Make the default BPP a per-variant variable drm: simple_kms_helper: Fix .mode_valid() documentation bridge: Elaborate a bit on dumb VGA bridges in Kconfig drm/atomic: Add new reverse iterator over all plane state (V2) drm: Reject bad property flag combinations drm: Make property flags u32 drm/uapi: Deprecate DRM_MODE_PROP_PENDING drm: WARN when trying to add enum value > 63 to a bitmask property drm: WARN when trying add enum values to non-enum/bitmask properties drm: Reject replacing property enum values ... commit 62ccb6533920ce6e8a18ef7c5ee3f98783a1a42a Author: Dave Airlie Date: Wed Mar 14 10:54:55 2018 +1000 drm/amd/pp: fix missing CONFIG_ACPI. This was stopping me building on ARM after last pull. Signed-off-by: Dave Airlie drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 ++ 1 file changed, 2 insertions(+) commit b9590ad4c4f2fedc364016613f2af74ea7758bea Author: John Johansen Date: Sat Mar 3 01:59:02 2018 -0800 apparmor: remove POLICY_MEDIATES_SAFE The unpack code now makes sure every profile has a dfa so the safe version of POLICY_MEDIATES is no longer needed. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 2 +- security/apparmor/include/policy.h | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) commit 56974a6fcfef69ee0825bd66ed13e92070ac5224 Author: John Johansen Date: Tue Jul 18 23:18:33 2017 -0700 apparmor: add base infastructure for socket mediation version 2 - Force an abi break. Network mediation will only be available in v8 abi complaint policy. Provide a basic mediation of sockets. This is not a full net mediation but just whether a spcific family of socket can be used by an application, along with setting up some basic infrastructure for network mediation to follow. the user space rule hav the basic form of NETWORK RULE = [ QUALIFIERS ] 'network' [ DOMAIN ] [ TYPE | PROTOCOL ] DOMAIN = ( 'inet' | 'ax25' | 'ipx' | 'appletalk' | 'netrom' | 'bridge' | 'atmpvc' | 'x25' | 'inet6' | 'rose' | 'netbeui' | 'security' | 'key' | 'packet' | 'ash' | 'econet' | 'atmsvc' | 'sna' | 'irda' | 'pppox' | 'wanpipe' | 'bluetooth' | 'netlink' | 'unix' | 'rds' | 'llc' | 'can' | 'tipc' | 'iucv' | 'rxrpc' | 'isdn' | 'phonet' | 'ieee802154' | 'caif' | 'alg' | 'nfc' | 'vsock' | 'mpls' | 'ib' | 'kcm' ) ',' TYPE = ( 'stream' | 'dgram' | 'seqpacket' | 'rdm' | 'raw' | 'packet' ) PROTOCOL = ( 'tcp' | 'udp' | 'icmp' ) eg. network, network inet, Signed-off-by: John Johansen Acked-by: Seth Arnold security/apparmor/.gitignore | 1 + security/apparmor/Makefile | 43 +++- security/apparmor/apparmorfs.c | 2 + security/apparmor/file.c | 30 +++ security/apparmor/include/apparmor.h | 3 +- security/apparmor/include/audit.h | 6 + security/apparmor/include/net.h | 106 ++++++++++ security/apparmor/include/perms.h | 5 +- security/apparmor/include/policy.h | 11 + security/apparmor/lib.c | 5 +- security/apparmor/lsm.c | 392 +++++++++++++++++++++++++++++++++++ security/apparmor/net.c | 187 +++++++++++++++++ security/apparmor/policy_unpack.c | 3 +- 13 files changed, 786 insertions(+), 8 deletions(-) commit a870a02cc963de35452bbed932560ed69725c4f2 Author: Arnd Bergmann Date: Tue Mar 13 21:58:39 2018 +0100 pktgen: use dynamic allocation for debug print buffer After the removal of the VLA, we get a harmless warning about a large stack frame: net/core/pktgen.c: In function 'pktgen_if_write': net/core/pktgen.c:1710:1: error: the frame size of 1076 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] The function was previously shown to be safe despite hitting the 1024 bye warning level. To get rid of the annoyging warning, while keeping it readable, this changes it to use strndup_user(). Obviously this is not a fast path, so the kmalloc() overhead can be disregarded. Fixes: 35951393bbff ("pktgen: Remove VLA usage") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller net/core/pktgen.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 4ee3fd4abeca30d530fe67972f1964f7454259d6 Author: Derek Basehore Date: Tue Mar 13 13:37:19 2018 -0700 clk: rockchip: Add 1.6GHz PLL rate for rk3399 We need this rate to generate 100, 200, and 228.57MHz from the same PLL. 228.57MHz is useful for a pixel clock when the VPLL is used for an external display. Signed-off-by: Derek Basehore Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3399.c | 1 + 1 file changed, 1 insertion(+) commit fd1eabd8800461d4ce1665b005e745353dfb3e49 Author: Lukas Wunner Date: Sat Mar 3 10:53:24 2018 +0100 drm/nouveau: Runtime suspend despite HDA being unbound Commit 5addcf0a5f0f ("nouveau: add runtime PM support (v0.9)") prevents runtime suspend of the GPU if its integrated HDA controller is not bound to a driver. The rationale appears to be that probing the HDA fails if the GPU is in D3cold. However we now use a device link to ensure that the GPU is runtime resumed while the HDA controller is probed, rendering this safety measure obsolete. Remove it. Cc: Dave Airlie Cc: Ben Skeggs Cc: Takashi Iwai Cc: Alex Deucher Cc: Rafael J. Wysocki Reviewed-by: Peter Wu Tested-by: Denis Lisov # Nvidia Optimus Tested-by: Peter Wu # Nvidia Optimus Tested-by: Lukas Wunner # MacBook Pro Signed-off-by: Lukas Wunner Link: https://patchwork.freedesktop.org/patch/msgid/77e0ab74f3377ea9b6acf8fab624acfb4f7dbeca.1520068884.git.lukas@wunner.de drivers/gpu/drm/nouveau/nouveau_drm.c | 44 ----------------------------------- drivers/gpu/drm/nouveau/nouveau_drv.h | 1 - 2 files changed, 45 deletions(-) commit b67ae78efae0d5be5d9c7a507e67cd02971b32e1 Author: Lukas Wunner Date: Sat Mar 3 10:53:24 2018 +0100 vga_switcheroo: Let HDA autosuspend on mux change When switching the display on muxed machines, we currently force the HDA controller into runtime suspend on the previously used GPU and into runtime active state on the newly used GPU. That's unnecessary if the GPU uses driver power control, we can just let the audio device autosuspend or autoresume as it sees fit. Cc: Dave Airlie Cc: Ben Skeggs Cc: Takashi Iwai Cc: Alex Deucher Reviewed-by: Peter Wu Signed-off-by: Lukas Wunner Link: https://patchwork.freedesktop.org/patch/msgid/098ed883460eb4976a899eac6f5192fefc877c0f.1520068884.git.lukas@wunner.de drivers/gpu/vga/vga_switcheroo.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 07f4f97d7b4bf325d9f558c5b58230387e4e57e0 Author: Lukas Wunner Date: Sat Mar 3 10:53:24 2018 +0100 vga_switcheroo: Use device link for HDA controller Back in 2013, runtime PM for GPUs with integrated HDA controller was introduced with commits 0d69704ae348 ("gpu/vga_switcheroo: add driver control power feature. (v3)") and 246efa4a072f ("snd/hda: add runtime suspend/resume on optimus support (v4)"). Briefly, the idea was that the HDA controller is forced on and off in unison with the GPU. The original code is mostly still in place even though it was never a 100% perfect solution: E.g. on access to the HDA controller, the GPU is powered up via vga_switcheroo_runtime_resume_hdmi_audio() but there are no provisions to keep it resumed until access to the HDA controller has ceased: The GPU autosuspends after 5 seconds, rendering the HDA controller inaccessible. Additionally, a kludge is required when hda_intel.c probes: It has to check whether the GPU is powered down (check_hdmi_disabled()) and defer probing if so. However in the meantime (in v4.10) the driver core has gained a feature called device links which promises to solve such issues in a clean way: It allows us to declare a dependency from the HDA controller (consumer) to the GPU (supplier). The PM core then automagically ensures that the GPU is runtime resumed as long as the HDA controller's ->probe hook is executed and whenever the HDA controller is accessed. By default, the HDA controller has a dependency on its parent, a PCIe Root Port. Adding a device link creates another dependency on its sibling: PCIe Root Port ^ ^ | | | | HDA ===> GPU The device link is not only used for runtime PM, it also guarantees that on system sleep, the HDA controller suspends before the GPU and resumes after the GPU, and on system shutdown the HDA controller's ->shutdown hook is executed before the one of the GPU. It is a complete solution. Using this functionality is as simple as calling device_link_add(), which results in a dmesg entry like this: pci 0000:01:00.1: Linked as a consumer to 0000:01:00.0 The code for the GPU-governed audio power management can thus be removed (except where it's still needed for legacy manual power control). The device link is added in a PCI quirk rather than in hda_intel.c. It is therefore legal for the GPU to runtime suspend to D3cold even if the HDA controller is not bound to a driver or if CONFIG_SND_HDA_INTEL is not enabled, for accesses to the HDA controller will cause the GPU to wake up regardless if they're occurring outside of hda_intel.c (think config space readout via sysfs). Contrary to the previous implementation, the HDA controller's power state is now self-governed, rather than GPU-governed, whereas the GPU's power state is no longer fully self-governed. (The HDA controller needs to runtime suspend before the GPU can.) It is thus crucial that runtime PM is always activated on the HDA controller even if CONFIG_SND_HDA_POWER_SAVE_DEFAULT is set to 0 (which is the default), lest the GPU stays awake. This is achieved by setting the auto_runtime_pm flag on every codec and the AZX_DCAPS_PM_RUNTIME flag on the HDA controller. A side effect is that power consumption might be reduced if the GPU is in use but the HDA controller is not, because the HDA controller is now allowed to go to D3hot. Before, it was forced to stay in D0 as long as the GPU was in use. (There is no reduction in power consumption on my Nvidia GK107, but there might be on other chips.) The code paths for legacy manual power control are adjusted such that runtime PM is disabled during power off, thereby preventing the PM core from resuming the HDA controller. Note that the device link is not only added on vga_switcheroo capable systems, but for *any* GPU with integrated HDA controller. The idea is that the HDA controller streams audio via connectors located on the GPU, so the GPU needs to be on for the HDA controller to do anything useful. This commit implicitly fixes an unbalanced runtime PM ref upon unbind of hda_intel.c: On ->probe, a runtime PM ref was previously released under the condition "azx_has_pm_runtime(chip) || hda->use_vga_switcheroo", but on ->remove a runtime PM ref was only acquired under the first of those conditions. Thus, binding and unbinding the driver twice on a vga_switcheroo capable system caused the runtime PM refcount to drop below zero. The issue is resolved because the AZX_DCAPS_PM_RUNTIME flag is now always set if use_vga_switcheroo is true. For more information on device links please refer to: https://www.kernel.org/doc/html/latest/driver-api/device_link.html Documentation/driver-api/device_link.rst Cc: Dave Airlie Cc: Ben Skeggs Cc: Alex Deucher Cc: Rafael J. Wysocki Acked-by: Bjorn Helgaas Reviewed-by: Takashi Iwai Reviewed-by: Peter Wu Tested-by: Kai Heng Feng # AMD PowerXpress Tested-by: Mike Lothian # AMD PowerXpress Tested-by: Denis Lisov # Nvidia Optimus Tested-by: Peter Wu # Nvidia Optimus Tested-by: Lukas Wunner # MacBook Pro Signed-off-by: Lukas Wunner Link: https://patchwork.freedesktop.org/patch/msgid/51bd38360ff502a8c42b1ebf4405ee1d3f27118d.1520068884.git.lukas@wunner.de drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 - drivers/gpu/drm/nouveau/nouveau_drm.c | 2 - drivers/gpu/drm/radeon/radeon_drv.c | 2 - drivers/gpu/vga/vga_switcheroo.c | 115 +++----------------------------- drivers/pci/quirks.c | 39 +++++++++++ include/linux/pci_ids.h | 1 + include/linux/vga_switcheroo.h | 6 -- include/sound/hdaudio.h | 3 - sound/pci/hda/hda_intel.c | 36 +++++++--- sound/pci/hda/hda_intel.h | 3 - 10 files changed, 73 insertions(+), 136 deletions(-) commit 8948ca1a12c9a039361bbc3e4627064153971d57 Author: Lukas Wunner Date: Sat Mar 3 10:53:24 2018 +0100 vga_switcheroo: Deduplicate power state tracking If DRM drivers use runtime PM, they currently notify vga_switcheroo whenever they ->runtime_suspend or ->runtime_resume to update vga_switcheroo's internal power state tracking. That's essentially a duplication of a functionality performed by the PM core as it already tracks the GPU's power state and vga_switcheroo can always query it. Introduce a new internal helper vga_switcheroo_pwr_state() which does just that if runtime PM is used, or falls back to vga_switcheroo's internal power state tracking if manual power control is used. Drop a redundant power state check in set_audio_state() while at it. This removes one of the two purposes of the notification mechanism implemented by vga_switcheroo_set_dynamic_switch(). The other one is power management of the audio device and we'll remove that next. Cc: Dave Airlie Cc: Ben Skeggs Cc: Takashi Iwai Cc: Alex Deucher Cc: Rafael J. Wysocki Reviewed-by: Peter Wu Tested-by: Kai Heng Feng # AMD PowerXpress Tested-by: Mike Lothian # AMD PowerXpress Tested-by: Denis Lisov # Nvidia Optimus Tested-by: Peter Wu # Nvidia Optimus Tested-by: Lukas Wunner # MacBook Pro Signed-off-by: Lukas Wunner Link: https://patchwork.freedesktop.org/patch/msgid/0aa49d735b988aa04524a8dc339582ace33f0f94.1520068884.git.lukas@wunner.de drivers/gpu/vga/vga_switcheroo.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) commit dcac86b7d0be71563d6219ce52c9918e44b84f0a Author: Lukas Wunner Date: Sat Mar 3 10:53:24 2018 +0100 vga_switcheroo: Update PCI current_state on power change When cutting power to a GPU and its integrated HDA controller, their cached current_state should be updated to D3cold to reflect reality. We currently rely on the DRM and HDA drivers to do that, however: - The HDA driver updates the current_state in azx_vs_set_state(), which will no longer be called with driver power control once we migrate to device links. (It will still be called with manual power control.) - If the HDA device is not bound, its current_state remains at D0 even though the GPU driver may decide to go to D3cold. - The DRM drivers update the current_state using pci_set_power_state() which can't put the device into a deeper power state than D3hot if the GPU is not deemed power-manageable by the platform (even though it *is* power-manageable by some nonstandard means, such as a _DSM). Centralize updating the current_state of the GPU and HDA controller in vga_switcheroo's ->runtime_suspend hook to overcome these deficiencies. The GPU and HDA controller are two functions of the same PCI device (VGA class device on function 0 and audio device on function 1) and no other PCI devices reside on the same bus since this is a PCIe point-to-point link, so we can just walk the bus and update the current_state of all devices. On ->runtime_resume, the HDA controller is in D0uninitialized state. Resume to D0active and then let it autosuspend as it sees fit. Note that vga_switcheroo_init_domain_pm_ops() is not supposed to be called by hybrid graphics laptops which power down the GPU via its root port's _PR3 resources and consequently vga_switcheroo_runtime_suspend() is not used. On those laptops, the root port is power-manageable by the platform (instead of by a nonstandard means) and the current_state is therefore updated by the PCI core through the following call chain: pci_set_power_state() __pci_complete_power_transition() pci_bus_set_current_state() Resuming to D0active happens through: pci_set_power_state() __pci_start_power_transition() pci_wakeup_bus() Cc: Dave Airlie Cc: Ben Skeggs Cc: Takashi Iwai Cc: Alex Deucher Cc: Bjorn Helgaas Cc: Rafael J. Wysocki Reviewed-by: Peter Wu Tested-by: Kai Heng Feng # AMD PowerXpress Tested-by: Mike Lothian # AMD PowerXpress Tested-by: Denis Lisov # Nvidia Optimus Tested-by: Peter Wu # Nvidia Optimus Tested-by: Lukas Wunner # MacBook Pro Signed-off-by: Lukas Wunner Link: https://patchwork.freedesktop.org/patch/msgid/8416958482c8c42d6f311ea5c1e5a65ccf21f5db.1520068884.git.lukas@wunner.de drivers/gpu/vga/vga_switcheroo.c | 2 ++ 1 file changed, 2 insertions(+) commit 2a4d2c4240c00e7db8fb64e377bd2180cc30b146 Author: Lukas Wunner Date: Sat Mar 3 10:53:24 2018 +0100 PCI: Make pci_wakeup_bus() & pci_bus_set_current_state() public There are PCI devices which are power-manageable by a nonstandard means, such as a custom ACPI method. One example are discrete GPUs in hybrid graphics laptops, another are Thunderbolt controllers in Macs. Such devices can't be put into D3cold with pci_set_power_state() because pci_platform_power_transition() fails with -ENODEV. Instead they're put into D3hot by pci_set_power_state() and subsequently into D3cold by invoking the nonstandard means. However as a consequence the cached current_state is incorrectly left at D3hot. What we need to do is walk the hierarchy below such a PCI device on powerdown and update the current_state to D3cold. On powerup the PCI device itself and the hierarchy below it is in D0uninitialized, so we need to walk the hierarchy again and wake all devices, causing them to be put into D0active and then letting them autosuspend as they see fit. To this end make pci_wakeup_bus() & pci_bus_set_current_state() public so PCI drivers don't have to reinvent the wheel. Cc: Rafael J. Wysocki Acked-by: Bjorn Helgaas Signed-off-by: Lukas Wunner Link: https://patchwork.freedesktop.org/patch/msgid/2962443259e7faec577274b4ef8c54aad66f9a94.1520068884.git.lukas@wunner.de drivers/pci/pci.c | 8 ++++---- include/linux/pci.h | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) commit 5775b843a619b3c93f946e2b55a208d9f0f48b59 Author: Rafael J. Wysocki Date: Sat Mar 3 10:53:24 2018 +0100 PCI: Restore config space on runtime resume despite being unbound We leave PCI devices not bound to a driver in D0 during runtime suspend. But they may have a parent which is bound and can be transitioned to D3cold at runtime. Once the parent goes to D3cold, the unbound child may go to D3cold as well. When the child goes to D3cold, its internal state, including configuration of BARs, MSI, ASPM, MPS, etc., is lost. One example are recent hybrid graphics laptops which cut power to the discrete GPU when the root port above it goes to ACPI power state D3. Users may provoke this by unbinding the GPU driver and allowing runtime PM on the GPU via sysfs: The PM core will then treat the GPU as "suspended", which in turn allows the root port to runtime suspend, causing the power resources listed in its _PR3 object to be powered off. The GPU's BARs will be uninitialized when a driver later probes it. Another example are hybrid graphics laptops where the GPU itself (rather than the root port) is capable of runtime suspending to D3cold. If the GPU's integrated HDA controller is not bound and the GPU's driver decides to runtime suspend to D3cold, the HDA controller's BARs will be uninitialized when a driver later probes it. Fix by saving and restoring config space over a runtime suspend cycle even if the device is not bound. Acked-by: Bjorn Helgaas Tested-by: Peter Wu # Nvidia Optimus Tested-by: Lukas Wunner # MacBook Pro Signed-off-by: Rafael J. Wysocki [lukas: add commit message, bikeshed code comments for clarity] Signed-off-by: Lukas Wunner Link: https://patchwork.freedesktop.org/patch/msgid/92fb6e6ae2730915eb733c08e2f76c6a313e3860.1520068884.git.lukas@wunner.de drivers/pci/pci-driver.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 6140e14b0b7ea2dcf60ed7ce2a2ed96880ae1dce Merge: fdda85f 437fe66 Author: Arnd Bergmann Date: Tue Mar 13 22:39:35 2018 +0100 Merge tag 'arm-soc/for-4.17/defconfig' of https://github.com/Broadcom/stblinux into next/soc Pull "Broadcom defconfig changes for 4.17" from Florian Fainelli: This pull request contains multi_v7_defconfig changes for Broadcom ARM-based SoC for 4.17, please pull the following: - Tuomas enables the BCM2835 AUX driver which is necessary to provide console on the Raspberry Pi 3 - Stefan turns on support for the BCM43438 Bluetooth adapter connected via UART on the Raspberry Pi Zero Wireless and he also turns on support for the thermal driver on the Pi 2 and 3. * tag 'arm-soc/for-4.17/defconfig' of https://github.com/Broadcom/stblinux: ARM: multi_v7_defconfig: Enable thermal driver for RPi 2/3 ARM: bcm2385_defconfig: Enable BT support for BCM43438 ARM: multi_v7_defconfig: Enable serial console on RPi 3 commit 206c12fc48fc31cb4ddaa38c48638df9eb0715ef Merge: 90d4806 e5c851e Author: Arnd Bergmann Date: Tue Mar 13 22:38:04 2018 +0100 Merge tag 'arm-soc/for-4.17/devicetree' of https://github.com/Broadcom/stblinux into next/dt Pull "Broadcom devicetree changes for 4.17" from Florian Fainelli: This pull request contains Broadcom ARM-based SoCs devicetree changes for 4.17, please pull the following: - Henry fixes the pin functions for the JTAG pins, nothing uses this for now, but it could be backported eventually if deemed appropriate - Stefan fixes the register ranges for the bcm2835-i2s nodes in the binding document definition, he then fixes the probing of the bcm2835-i2s driver by providing an appropriate register range and a missing clock. Stefan also makes sure that the appropriate pull settings are applied to the pins used on the Raspberry Pi Zero Wireless, he then adds the necessary UART node to connected to the BCM43438 Bluetooth adapter on the Pi Zero W. He finally enables USB OTG mode on the Pi Zero W since he became usable again - Baruch adds the necessary Device Tree nodes to support the Raspberry Pi GPIO expander which is controlled via the VC4 firmware - Hiroshi adds the missing LEDs on the Buffalo WZR-900DHP router - Eric adds the DPI hardware block into the BCM283x Device Tree include file for future use when an actual panel is available - Florian updates the Northstar Plus platforms to use port 8 of the internal switch as the CPU/management port since necessary code was added in the b53 switch driver to support that * tag 'arm-soc/for-4.17/devicetree' of https://github.com/Broadcom/stblinux: ARM: dts: NSP: Switch to port 8 for CPU port ARM: bcm2835: Add the DPI hardware to the device tree. ARM: dts: BCM5301X: add missing LEDs for Buffalo WZR-900DHP ARM: dts: bcm2835-rpi-zero-w: Enable OTG mode ARM: dts: bcm2835-rpi-zero-w: Add bcm43438 serial slave ARM: dts: bcm283x: Apply pull settings to Zero W relevant groups ARM: dts: bcm2837-rpi-3-b: add GPIO expander ARM: dts: bcm2835: make the firmware node into a bus ARM: dts: bcm283x: Fix probing of bcm2835-i2s dt-bindings: bcm283x: Fix register ranges of bcm2835-i2s ARM: dts: bcm283x: Fix pin function of JTAG pins commit 8a18e911d0da6192735e15bf2aebcc99655cf8c6 Author: Zhu Yanjun Date: Sun Mar 11 23:30:28 2018 -0400 IB: remove duplicate header files In hfi.h, the header file opa_addr.h is included twice. In vt.h, the header file mmap.h is included twice. Signed-off-by: Zhu Yanjun Acked-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/hfi.h | 1 - drivers/infiniband/sw/rdmavt/vt.h | 1 - 2 files changed, 2 deletions(-) commit 86188a8810ed0b73ce6653daa3c4bc29e8a79a7c Author: Yixian Liu Date: Fri Mar 9 18:36:32 2018 +0800 RDMA/hns: Support cq record doorbell for kernel space This patch updates to support cq record doorbell for the kernel space. Signed-off-by: Yixian Liu Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cq.c | 17 ++++++++++++++++- drivers/infiniband/hw/hns/hns_roce_device.h | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 19 +------------------ 3 files changed, 18 insertions(+), 19 deletions(-) commit 472bc0fbd47cb89f72607328b6b09b4a962ec200 Author: Yixian Liu Date: Fri Mar 9 18:36:31 2018 +0800 RDMA/hns: Support rq record doorbell for kernel space This patch updates to support rq record doorbell for the kernel space. Signed-off-by: Yixian Liu Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_db.c | 112 ++++++++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_device.h | 6 ++ drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 15 +--- drivers/infiniband/hw/hns/hns_roce_main.c | 5 ++ drivers/infiniband/hw/hns/hns_roce_qp.c | 17 ++++- 5 files changed, 142 insertions(+), 13 deletions(-) commit 9b44703d0a21980441cb120ffe4c6880dd453191 Author: Yixian Liu Date: Fri Mar 9 18:36:30 2018 +0800 RDMA/hns: Support cq record doorbell for the user space This patch updates to support cq record doorbell for the user space. Signed-off-by: Yixian Liu Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cq.c | 42 ++++++++++++++++++++++++----- drivers/infiniband/hw/hns/hns_roce_device.h | 6 +++++ drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 10 +++++++ drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 3 +++ include/uapi/rdma/hns-abi.h | 7 +++++ 5 files changed, 62 insertions(+), 6 deletions(-) commit e088a685eae94a0607b8f7b99949a0e14d748813 Author: Yixian Liu Date: Fri Mar 9 18:36:29 2018 +0800 RDMA/hns: Support rq record doorbell for the user space This patch adds interfaces and definitions to support the rq record doorbell for the user space. Signed-off-by: Yixian Liu Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/Makefile | 2 +- drivers/infiniband/hw/hns/hns_roce_db.c | 68 +++++++++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_device.h | 46 ++++++++++++++++++- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 26 ++++++++++- drivers/infiniband/hw/hns/hns_roce_main.c | 5 +++ drivers/infiniband/hw/hns/hns_roce_qp.c | 53 +++++++++++++++++++++- include/uapi/rdma/hns-abi.h | 5 +++ 7 files changed, 200 insertions(+), 5 deletions(-) commit 2623c7a5f2799569d8bb05eb211da524a8144cb3 Author: Taras Kondratiuk Date: Fri Mar 9 08:34:41 2018 +0000 libata: add refcounting to ata_host After commit 9a6d6a2ddabb ("ata: make ata port as parent device of scsi host") manual driver unbind/remove causes use-after-free. Unbind unconditionally invokes devres_release_all() which calls ata_host_release() and frees ata_host/ata_port memory while it is still being referenced as a parent of SCSI host. When SCSI host is finally released scsi_host_dev_release() calls put_device(parent) and accesses freed ata_port memory. Add reference counting to make sure that ata_host lives long enough. Bug report: https://lkml.org/lkml/2017/11/1/945 Fixes: 9a6d6a2ddabb ("ata: make ata port as parent device of scsi host") Cc: Tejun Heo Cc: Lin Ming Cc: linux-ide@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Taras Kondratiuk Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 44 ++++++++++++++++++++++++++++++++++-------- drivers/ata/libata-transport.c | 4 ++++ drivers/ata/libata.h | 2 ++ include/linux/libata.h | 1 + 4 files changed, 43 insertions(+), 8 deletions(-) commit 036ef0a1a867511ff1b4ecb3e5b185267216dab0 Author: Bart Van Assche Date: Wed Mar 7 16:57:56 2018 -0800 RDMA/bnxt_re: Remove an unused variable This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Selvin Xavier Cc: Devesh Sharma Cc: Somnath Kotur Cc: Sriharsha Basavapatna Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8932ff803d72804316ea85fe6705e0867f827d65 Author: Bart Van Assche Date: Wed Mar 7 16:56:03 2018 -0800 IB/hfi1: Fix a kernel-doc warning Avoid that building with W=1 causes the following warning to appear: drivers/infiniband/hw/hfi1/qp.c:484: warning: Cannot understand * on line 484 - I thought it was a doc line Signed-off-by: Bart Van Assche Cc: Mike Marciniszyn Cc: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/qp.c | 1 - 1 file changed, 1 deletion(-) commit 5a1e0baa34fdf458a42e5ff99e3b04d909ba99ea Author: Bjorn Helgaas Date: Tue Mar 13 15:03:36 2018 -0500 PCI/MSI: Don't set up INTx if MSI or MSI-X is enabled If MSI or MSI-X is enabled, the device uses that. It uses INTx only if both MSI and MSI-X are disabled (see PCIe r4.0, sec 7.7.1.2), so if a device already has MSI or MSI-X enabled, there's no need to set up its legacy INTx interrupt. bba6f6fc68e7 ("[PATCH] MSI-X: fix resume crash") changed the cris, frv, x86, and ia64 arches to skip INTx setup when MSI is enabled. The cris and frv arches have since been removed. 16cf0ebc35dd ("x86/PCI: Do not use interrupt links for devices using MSI-X") extended that by changing x86 to also skip INTx setup when MSI-X is enabled. Change ia64 to skip INTx setup when either MSI or MSI-X is enabled by applying the logic from 16cf0ebc35dd to ia64 as well as x86. Tested-by: Tony Luck Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko arch/ia64/pci/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 01d675f159e0f0792947fb823cf2425da4d747ad Author: Fabrizio Castro Date: Mon Feb 12 17:44:19 2018 +0000 ARM: shmobile: rcar-gen2: Add watchdog support This patch adds watchdog support by installing shmobile_boot_vector_gen2 to ICRAM1 when enough memory is available, in which case we also keep a copy of MPIDR to complete the reset vector logic. Signed-off-by: Fabrizio Castro Signed-off-by: Ramesh Shanmugasundaram Signed-off-by: Simon Horman arch/arm/mach-shmobile/platsmp-apmu.c | 1 + arch/arm/mach-shmobile/pm-rcar-gen2.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) commit 58adf1ba0d227754d9bc763c667f10efe0053ce5 Author: Fabrizio Castro Date: Wed Feb 28 17:40:22 2018 +0000 ARM: shmobile: Add watchdog support On R-Car Gen2 and RZ/G1 platforms, we use the SBAR registers to make non boot CPUs run a routine designed to bring up SMP and deal with hot plug. The value contained in the SBAR registers is not initialized by a WDT triggered reset, which means that after a WDT triggered reset we jump to the SMP bring up routine, preventing the system from executing the bootrom code. The purpose of this patch is to jump to the bootrom code in case of a WDT triggered reset, and keep the SMP functionality untouched. In order to tell if the code had been called due to the WDT overflowing we are testing WOVF from register RWTCSRA. The new function shmobile_boot_vector_gen2 isn't replacing shmobile_boot_vector for backward compatibility reasons. The kernel will install the best option (either shmobile_boot_vector or shmobile_boot_vector_gen2) to ICRAM1 after parsing the device tree, according to the amount of memory available. Since shmobile_boot_vector has become bigger, "reg" property of nodes compatible with "renesas,smp-sram" now need to be set to a value greater or equal to "<0 0x60>". Signed-off-by: Fabrizio Castro Signed-off-by: Ramesh Shanmugasundaram Reviewed-by: Geert Uytterhoeven [simon: dropped #ifdef from common.h] Signed-off-by: Simon Horman arch/arm/mach-shmobile/common.h | 4 +++ arch/arm/mach-shmobile/headsmp.S | 55 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) commit 2ea32cd6c783637127086bcedefccc07266f4651 Merge: 29cf1351 31135eb Author: Doug Ledford Date: Tue Mar 13 15:49:34 2018 -0400 Merge tag 'mlx5-updates-2018-02-28-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into k.o/wip/dl-for-next mlx5-updates-2018-02-28-2 (IPSec-2) This series follows our previous one to lay out the foundations for IPSec in user-space and extend current kernel netdev IPSec support. As noted in our previous pull request cover letter "mlx5-updates-2018-02-28-1 (IPSec-1)", the IPSec mechanism will be supported through our flow steering mechanism. Therefore, we need to change the initialization order. Furthermore, IPsec is also supported in both egress and ingress. Since our current flow steering is egress only, we add an empty (only implemented through FPGA steering ops) egress namespace to handle that case. We also implement the required flow steering callbacks and logic in our FPGA driver. We extend the FPGA support for ESN and modifying a xfrm too. Therefore, we add support for some new FPGA command interface that supports them. The other required bits are added too. The new features and requirements are advertised via cap bits. Last but not least, we revise our driver's accel_esp API. This API will be shared between our netdev and IB driver, so we need to have all the required functionality from both worlds. Regards, Aviad and Matan Signed-off-by: Doug Ledford commit e5c851ef012b4b63ea50228da3451f3cfb690c45 Merge: 3746fd7 ae67cfc Author: Florian Fainelli Date: Tue Mar 13 11:44:16 2018 -0700 Merge tag 'bcm2835-dt-next-2018-03-13' into devicetree/next This pull request brings in one last patch to add the BCM2835 DPI controller to the device tree. Signed-off-by: Florian Fainelli commit eb21089c32054ecd6957d294a7125bbf100ff328 Author: Geert Uytterhoeven Date: Mon Mar 12 15:24:14 2018 +0100 arm64: dts: renesas: r8a7795: Add missing SYS-DMAC2 dmas On R-Car H3, on-chip peripheral modules that can make use of DMA are wired to either SYS-DMAC0 only, or to both SYS-DMAC1 and SYS-DMAC2. Add the missing DMA properties pointing to SYS-DMAC2 for HSCIF[0-2], SCIF[0125], and I2C[0-2]. These were initially left out because early firmware versions prohibited using SYS-DMAC2. This restriction has been lifted in IPL and Secure Monitor Rev1.0.6 (released on Feb 25, 2016). Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 50 +++++++++++++++++++------------- 1 file changed, 30 insertions(+), 20 deletions(-) commit 9dd660eb1c201304b5d79012695fc6bca57f99a0 Author: Simon Horman Date: Tue Mar 6 10:34:30 2018 +0100 arm64: dts: renesas: r8a7795: Add IPMMU-PV1 device node Add r8a7795 IPMMU-PV1 and keep it disabled by default. This device is not present in r8a7795 ES1.x and is removed from the DT of those SoCs. This corrects an omission in 3b7e7848f0e8 ("arm64: dts: renesas: r8a7795: Add IPMMU device nodes") This does not have any runtime effect. Reported-by: Yoshihiro Shimoda Signed-off-by: Simon Horman Reviewed-by: Yoshihiro Shimoda arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi | 1 + arch/arm64/boot/dts/renesas/r8a7795.dtsi | 9 +++++++++ 2 files changed, 10 insertions(+) commit c7a99343cc30704c1d173de9bbe06adaa5e96101 Author: Geert Uytterhoeven Date: Mon Mar 5 18:24:55 2018 +0100 arm64: dts: renesas: r8a77970: sort subnodes of root node alphabetically Sort root sub-nodes alphabetically for allow for easier maintenance of this file. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7859eb31e4d457496ace72965f2fbb50e836ef12 Author: Sergei Shtylyov Date: Sat Mar 3 22:07:16 2018 +0300 arm64: dts: renesas: eagle: add I2C0 support Define the Eagle board dependent part of the I2C0 device node. The I2C0 bus is populated by ON Semiconductor PCA9653 I/O expander and Analog Devices ADV7511W HDMI transmitter (but we're only describing the former chip now). Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit cbfa278e20913a9b8380278149fa7e4068ea82e2 Author: Sergei Shtylyov Date: Sat Mar 3 22:06:21 2018 +0300 arm64: dts: renesas: r8a77970: add I2C support Define the generic R8A77970 parts of the I2C[0-4] device node. Based on the original (and large) patch by Daisuke Matsushita . Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970.dtsi | 93 +++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit 972952d39fc1e2274c273ec9f1a47bcce30a5722 Author: Geert Uytterhoeven Date: Fri Mar 2 13:02:21 2018 +0100 arm64: dts: renesas: r8a77965-salvator-xs: Add SoC name to file header Document clearly which SoC this DTS applies to, to distinguish from Salvator-XS boards equipped with other SoCs. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 862a61d0e4705409271639fca8776020b6cff4a8 Author: Jacopo Mondi Date: Tue Feb 27 11:22:54 2018 +0100 arm64: dts: renesas: r8a77965: Add EtherAVB device node Populate the ethernet@e6800000 device node to enable Ethernet interface for R-Car M3-N (R8A77965) SoC. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 43 ++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) commit 95c969d12ea19062077448a0081dc657232edd1d Author: Jacopo Mondi Date: Tue Feb 27 11:22:53 2018 +0100 arm64: dts: renesas: r8a77970: Set EtherAVB phy mode to "rgmii" Set the "phy-mode" property of EtherAVB device to "rgmii" and let board files override it if the installed PHY layer provides delays for the RX/TX channels. Signed-off-by: Jacopo Mondi Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9131e54d1a834b085766d6318a28b03942fa455 Author: Jacopo Mondi Date: Tue Feb 27 11:22:52 2018 +0100 arm64: dts: renesas: r8a77995: Set EtherAVB phy mode to "rgmii" Set the "phy-mode" property of EtherAVB device to "rgmii" and let board files override it if the installed PHY layer provides delays for the RX/TX channels. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd685e2eba1decc5cfd17e1005144400d53831f8 Author: Jacopo Mondi Date: Tue Feb 27 11:22:51 2018 +0100 arm64: dts: renesas: r8a7795: Set EtherAVB phy mode to "rgmii" Set the "phy-mode" property of EtherAVB device to "rgmii" and let board files override it if the installed PHY layer provides delays for the RX/TX channels. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2402dfd57ea00753dd29159a576e1dd93fdedc2 Author: Jacopo Mondi Date: Tue Feb 27 11:22:50 2018 +0100 arm64: dts: renesas: r8a7796: Set EtherAVB phy mode to "rgmii" Set the "phy-mode" property of EtherAVB device to "rgmii" and let board files override it if the installed PHY layer provides delays for the RX/TX channels. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9dcd1f26b9914864e0218712a666b23cf7e589c8 Author: Jacopo Mondi Date: Tue Feb 27 11:22:49 2018 +0100 arm64: dts: renesas: v3msk: Override EtherAVB phy-mode As the PHY interface installed on the V3MSK board provides TX and RX channels delays, make the "phy-mode" property a board-specific one, meant to override the one specified in the SoC DTSI. Follow up patches will reset the r8a77970 SoC DTSI to use "rgmii" mode and let the board file override that. Signed-off-by: Jacopo Mondi Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts | 1 + 1 file changed, 1 insertion(+) commit e5daa084cc9f6019a905785f0dfd1ffb146a519a Author: Jacopo Mondi Date: Tue Feb 27 11:22:48 2018 +0100 arm64: dts: renesas: eagle: Override EtherAVB phy-mode As the PHY interface installed on the Eagle board provides TX and RX channels delays, make the "phy-mode" property a board-specific one, meant to override the one specified in the SoC DTSI. Follow up patches will reset the r8a77970 SoC DTSI to use "rgmii" mode and let the board file override that. Signed-off-by: Jacopo Mondi Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 1 + 1 file changed, 1 insertion(+) commit 9c63dcd4df91687a8378d0af1c25429c5ef23a82 Author: Jacopo Mondi Date: Tue Feb 27 11:22:47 2018 +0100 arm64: dts: renesas: draak: Override EtherAVB phy-mode As the PHY interface installed on the Draak board, provides TX channel delay, make the "phy-mode" property a board-specific one, meant to override the one specified in the SoC DTSI. Follow up patches will reset the r8a77995 SoC DTSI to use "rgmii" mode and let the board file override that. Signed-off-by: Jacopo Mondi Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 1 + 1 file changed, 1 insertion(+) commit b3635b18bba8fc6bd57b7747d97fc46afcf551b8 Author: Jacopo Mondi Date: Tue Feb 27 11:22:46 2018 +0100 arm64: dts: renesas: ulcb: Override EtherAVB phy-mode As the PHY interface installed on the ULCB board provides TX channel delay, make the "phy-mode" property a board-specific one, meant to override the one specified in the SoC DTSI. Follow up patches will reset the r8a7795/96 SoC DTSI to use "rgmii" mode\ and let the board files override that. Signed-off-by: Jacopo Mondi Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb.dtsi | 1 + 1 file changed, 1 insertion(+) commit 3438ff82ddbaa430ccfcc11fe877691a7e326ae0 Author: Jacopo Mondi Date: Tue Feb 27 11:22:45 2018 +0100 arm64: dts: renesas: salvator-common: Override EtherAVB phy-mode As the PHY interface installed on the Salvator-X[S] board, provides TX channel delay, make the "phy-mode" property a board-specific one, meant to override the one specified in the SoC DTSI. Follow up patches will reset the r8a7795/96/965 SoC DTSI to use "rgmii" mode and let the board files override that. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/salvator-common.dtsi | 1 + 1 file changed, 1 insertion(+) commit ba03b432f56e29a8ee639d9e9787da283b2ed09c Author: Geert Uytterhoeven Date: Mon Feb 26 16:42:23 2018 +0100 arm64: dts: renesas: r8a77965: Add INTC-EX device node Populate the device node for the Interrupt Controller for External Devices (INTC-EX) on R-Car M3-N, which serves external IRQ pins IRQ[0-5]. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit be9fc0971a5c27b791608cf9705a04fe96dbd395 Author: Arnd Bergmann Date: Tue Mar 13 12:44:53 2018 +0100 net: fix sysctl_fb_tunnels_only_for_init_net link error The new variable is only available when CONFIG_SYSCTL is enabled, otherwise we get a link error: net/ipv4/ip_tunnel.o: In function `ip_tunnel_init_net': ip_tunnel.c:(.text+0x278b): undefined reference to `sysctl_fb_tunnels_only_for_init_net' net/ipv6/sit.o: In function `sit_init_net': sit.c:(.init.text+0x4c): undefined reference to `sysctl_fb_tunnels_only_for_init_net' net/ipv6/ip6_tunnel.o: In function `ip6_tnl_init_net': ip6_tunnel.c:(.init.text+0x39): undefined reference to `sysctl_fb_tunnels_only_for_init_net' This adds an extra condition, keeping the traditional behavior when CONFIG_SYSCTL is disabled. Fixes: 79134e6ce2c9 ("net: do not create fallback tunnels for non-default namespaces") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller include/linux/netdevice.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2e8ebed6ede01f187f8a06bbae3e3b3325bda36c Merge: 1462eec 8c08837 Author: Wim Van Sebroeck Date: Tue Mar 13 19:14:41 2018 +0100 Merge branch 'v4.16-fixes' commit 8c088370c2a684acad45e0035d9f2dfd85087db0 Author: Brian Norris Date: Fri Mar 9 19:46:07 2018 -0800 watchdog: dw: save/restore control and timeout across suspend/resume Some platforms lose this state in suspend. It should be safe to do this unconditionally. Signed-off-by: Brian Norris Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/dw_wdt.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit a81abbb412341e9e3b2d42ed7d310cf71fbb84a8 Author: Brian Norris Date: Fri Mar 9 19:46:06 2018 -0800 watchdog: dw: RMW the control register RK3399 has rst_pulse_length in CONTROL_REG[4:2], determining the length of pulse to issue for system reset. We shouldn't clobber this value, because that might make the system reset ineffective. On RK3399, we're seeing that a value of 000b (meaning 2 cycles) yields an unreliable (partial?) reset, and so we only fully reset after the watchdog fires a second time. If we retain the system default (010b, or 8 clock cycles), then the watchdog reset is much more reliable. Read-modify-write retains the system value and improves reset reliability. It seems we were intentionally clobbering the response mode previously, to ensure we performed a system reset (we don't support an interrupt notification), so retain that explicitly. Signed-off-by: Brian Norris Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/dw_wdt.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 3c578cd4bc52b6e65d65be1abad9a8aa489ec207 Author: Alexey Khoroshilov Date: Fri Mar 9 00:21:48 2018 +0300 watchdog: sprd_wdt: Fix error handling in sprd_wdt_enable() If clk_prepare_enable(wdt->rtc_enable) fails, wdt->enable clock is left enabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sprd_wdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d2fc8db691bf3197d43b2afb553311a9bf257bff Author: Milton Miller Date: Fri Mar 9 15:58:19 2018 -0600 watchdog: aspeed: Fix translation of reset mode to ctrl register Assert RESET_SYSTEM bit for any reset and set MODE field from reset type. The watchdog control register has a RESET_SYSTEM bit that is really closer to activate a reset, and RESET_SYSTEM_MODE field that chooses how much to reset. Before this patch, a node without these optional property would do a SOC reset, but a node with properties requesting a cpu or SOC reset would do nothing and a node requesting a system reset would do a SOC reset. Fixes: b7f0b8ad25f3 ("drivers/watchdog: ASPEED reference dev tree properties for config") Signed-off-by: Milton Miller Signed-off-by: Eddie James Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/aspeed_wdt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 8952792267fb3e14c8498e6ea9284e0da3f91a1f Author: Geert Uytterhoeven Date: Mon Feb 26 16:42:22 2018 +0100 arm64: dts: renesas: r8a77965: Add IIC-DVFS device node Populate the device node for the IIC Bus Interface for DVFS (IIC for DVFS) on R-Car M3-N, and add an alias to fix its bus number. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 19591a9b416669419110c8da3f4096d219b810ac Author: Takeshi Kihara Date: Mon Feb 19 19:20:55 2018 +0100 arm64: dts: renesas: Add support for Salvator-XS with R-Car M3-N Add initial support for the Renesas Salvator-XS (Salvator-X 2nd version) development board equipped with an R-Car M3-N SiP. Most features are enabled through the shared salvator-xs.dtsi board description. The memory configuration is specific to the M3-N SiP. Signed-off-by: Takeshi Kihara [geert: Switch to SPDX-License-Identifier, update patch description] Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/Makefile | 2 +- .../arm64/boot/dts/renesas/r8a77965-salvator-xs.dts | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) commit fe6746059b165ab42e8aa0a2c7b7bf307baad660 Author: Jacopo Mondi Date: Fri Feb 23 14:40:59 2018 +0100 arm64: dts: renesas: r8a77965: Move usb2_phy1 up Move "usb2_ph1" place-holder device node next to "usb2_phy0" one. Signed-off-by: Jacopo Mondi Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f5af77016bcd80bfe850ca41da51d65bd31f8051 Author: Jacopo Mondi Date: Fri Feb 23 14:40:58 2018 +0100 arm64: dts: renesas: r8a77965: Add #interrupt-cells property Add "#interrupt-cells" property and "interrupt-controller" label to "interrupt-controller@e61c0000" device node. This silences the following DTC compiler warnings: Warning (interrupts_property): Missing interrupt-controller or interrupt-map property in /soc/interrupt-controller@e61c0000 Warning (interrupts_property): Missing #interrupt-cells in interrupt-parent /soc/interrupt-controller@e61c000 Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit eccdd3f13a6a166d70c7094d09ef365411882a59 Author: Jacopo Mondi Date: Fri Feb 23 14:40:57 2018 +0100 arm64: dts: renesas: r8a77965: Add #pwm-cells property Add "#pwm-cells" property to "pwm@e6e31000" device node. This silences the following DTC compiler warning: Warning (pwms_property): Missing property '#pwm-cells' in node /soc/pwm@e6e31000 or bad phandle (referred from /backlight:pwms[0]) Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 1 + 1 file changed, 1 insertion(+) commit 8a93a581457af7475aa8e874402d6ec1e4ee665c Author: Jacopo Mondi Date: Fri Feb 23 14:40:56 2018 +0100 arm64: dts: renesas: r8a77965: Add #phy-cells property Add "#phy-cells" property to "usb-phy@e65ee000" device node. This silences the following DTC compiler warning: Warning (phys_property): Missing property '#phy-cells' in node /soc/usb-phy@e65ee000 or bad phandle (referred from /soc/usb@ee020000:phys[0]) Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 1 + 1 file changed, 1 insertion(+) commit 217a7d465b120f3227df592a12bbee9bac165613 Author: Jacopo Mondi Date: Fri Feb 23 14:40:55 2018 +0100 arm64: dts: renesas: r8a77965: Remove stale reg property Remove "reg" property from cache-controller-0 device node as it does not have any unit address. This silences the following DTC compiler warning: Warning (unit_address_vs_reg): Node /cpus/cache-controller-0 has a reg or ranges property, but no unit name Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 1 - 1 file changed, 1 deletion(-) commit ba8b5ad0afdda734001176f59d23a4ab31e61e7a Author: Jacopo Mondi Date: Fri Feb 23 14:40:54 2018 +0100 arm64: dts: renesas: r8a77965: Add #address-cells and #size-cells Add "#address-cells" and "#size-cells" properties to all place-holder nodes that have children nodes defined by salvator-x[s].dtsi device tree. This silences the following DTC compiler warnings: Warning (reg_format): "reg" property in /soc/.. has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) Warning (avoid_default_addr_size): Relying on default #address-cells value for /soc/... Warning (avoid_default_addr_size): Relying on default #size-cells value for /soc/... Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 9e1b00a2ef43049617e1d3e99e258e7b2d9f98ea Author: Jacopo Mondi Date: Fri Feb 23 14:40:53 2018 +0100 arm64: dts: renesas: r8a77965: Add "reg" properties Add "reg" properties to place-holder nodes with unit address defined for R-Car M3-N SoC. This silences the following DTC compiler warning: Warning (unit_address_vs_reg): Node /soc/... has a unit name, but no reg property Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit e34ca96b81a241523f79a244b5551135cf069852 Author: Jacopo Mondi Date: Tue Feb 20 16:12:18 2018 +0100 arm64: dts: renesas: r8a77965: Add GPIO nodes Add GPIO nodes to r8a77965 SoC device tree file. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 104 +++++++++++++++++++++++++++--- 1 file changed, 96 insertions(+), 8 deletions(-) commit 0ea5b2fd38db56aad29e4b6a2028fccde438a110 Author: Jacopo Mondi Date: Tue Feb 20 16:12:16 2018 +0100 arm64: dts: renesas: r8a77965: Add SCIF device nodes Add SCIF[0-5] device nodes for M3-N (r8a77965) SoC. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 85 ++++++++++++++++++++++++++++--- 1 file changed, 79 insertions(+), 6 deletions(-) commit 838c1121ca592bd39e33d5687af3eea9fc9d0700 Author: Jacopo Mondi Date: Tue Feb 20 16:12:13 2018 +0100 arm64: dts: renesas: r8a77965: Add dmac device nods Add dmac[0-2] device nodes for R-Car M3-N (r8a77965) SoC. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 96 ++++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 3 deletions(-) commit 5a2cd7e84945bc9acfcada18cb5f66cda9c1529e Author: Jacopo Mondi Date: Tue Feb 20 16:12:11 2018 +0100 arm64: dts: renesas: Add R-Car Salvator-x M3-N support Add basic support for R-Car Salvator-X M3-N (R8A77965) board. Based on original work from: Takeshi Kihara Magnus Damm Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/Makefile | 1 + arch/arm64/boot/dts/renesas/r8a77965-salvator-x.dts | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) commit df863d6f95f57dbb4f7c2f5ec2f230809551b17f Author: Jacopo Mondi Date: Tue Feb 20 16:12:10 2018 +0100 arm64: dts: renesas: initial R8A77965 SoC device tree Basic support for the Gen 3 R-Car M3-N SoC. Based on original work from: Takeshi Kihara Magnus Damm Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 490 ++++++++++++++++++++++++++++++ 1 file changed, 490 insertions(+) commit fd60ea3171c7429a37c5b47a9893f96c704f990d Author: Jacopo Mondi Date: Tue Feb 20 16:12:09 2018 +0100 arm64: add Renesas R8A77965 support Add configuration option for the R-Car M3-N (R8A77965) SoC. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/Kconfig.platforms | 6 ++++++ 1 file changed, 6 insertions(+) commit 85618efe149082b50f846834356b3bc23c4d1141 Author: Dien Pham Date: Mon Jan 29 19:21:21 2018 +0100 arm64: dts: renesas: r8a7795: Update OPPs to support CA53 dfs Describe frequencies, other than the default for CA53 cores. This is a pre-requisite for using providing alternative frequencies for use with CPUFreq with these cores. Signed-off-by: Dien Pham Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit fbdad84cc759abc469e476ee2518d77280e80cd0 Author: Dien Pham Date: Mon Jan 29 19:21:20 2018 +0100 arm64: dts: renesas: r8a7796: Update OPPs to support CA53 dfs Describe frequencies, other than the default for CA53 cores. This is a pre-requisite for using providing alternative frequencies for use with CPUFreq with these cores. Signed-off-by: Dien Pham Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 17cb960f29c29ee07bf6848ada3265f4be55972e Author: Christoph Hellwig Date: Tue Mar 13 17:28:41 2018 +0100 bsg: split handling of SCSI CDBs vs transport requeues The current BSG design tries to shoe-horn the transport-specific passthrough commands into the overall framework for SCSI passthrough requests. This has a couple problems: - each passthrough queue has to set the QUEUE_FLAG_SCSI_PASSTHROUGH flag despite not dealing with SCSI commands at all. Because of that these queues could also incorrectly accept SCSI commands from in-kernel users or through the legacy SCSI_IOCTL_SEND_COMMAND ioctl. - the real SCSI bsg queues also incorrectly accept bsg requests of the BSG_SUB_PROTOCOL_SCSI_TRANSPORT type - the bsg transport code is almost unredable because it tries to reuse different SCSI concepts for its own purpose. This patch instead adds a new bsg_ops structure to handle the two cases differently, and thus solves all of the above problems. Another side effect is that the bsg-lib queues also don't need to embedd a struct scsi_request anymore. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe block/bsg-lib.c | 158 +++++++++++++++-------- block/bsg.c | 262 +++++++++++++++++--------------------- drivers/scsi/scsi_lib.c | 4 +- drivers/scsi/scsi_sysfs.c | 3 +- drivers/scsi/scsi_transport_sas.c | 1 - include/linux/bsg-lib.h | 4 +- include/linux/bsg.h | 35 +++-- 7 files changed, 250 insertions(+), 217 deletions(-) commit ef6fa64f9b8e1611854077ea9213f2eef2428cd2 Author: Christoph Hellwig Date: Tue Mar 13 17:28:40 2018 +0100 bsg-lib: remove bsg_job.req Users of the bsg-lib interface should only use the bsg_job data structure and not know about implementation details of it. Signed-off-by: Christoph Hellwig Reviewed-by: Benjamin Block Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe block/bsg-lib.c | 14 ++++++-------- include/linux/bsg-lib.h | 1 - 2 files changed, 6 insertions(+), 9 deletions(-) commit 31156ec378c2ed10330c8c06bbf36fb7d7a55506 Author: Christoph Hellwig Date: Tue Mar 13 17:28:39 2018 +0100 bsg-lib: introduce a timeout field in struct bsg_job The zfcp driver wants to know the timeout for a bsg job, so add a field to struct bsg_job for it in preparation of not exposing the request to the bsg-lib users. Signed-off-by: Christoph Hellwig Reviewed-by: Benjamin Block Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe block/bsg-lib.c | 1 + drivers/s390/scsi/zfcp_fc.c | 4 ++-- include/linux/bsg-lib.h | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) commit 28bf8312a983a7873997bf3faf4c2b4e62e4abc0 Author: Ganapathi Bhat Date: Fri Mar 9 23:45:26 2018 +0530 mwifiex: get_channel from firmware At present driver gets chan_type by referring to IEEE80211_HT_PARAM_CHA_SEC_OFFSET, in ASSOC response. Sometimes AP shows IEEE80211_HT_PARAM_CHA_SEC_OFFSET as above/below in assoc response, even if the association is done on HT20 channel only. So, it will be accurate to get econdary channel offset from firmware. Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 40 ++++++++++++++-------- drivers/net/wireless/marvell/mwifiex/decl.h | 17 +++++++++ drivers/net/wireless/marvell/mwifiex/fw.h | 7 ++++ drivers/net/wireless/marvell/mwifiex/main.h | 16 ++++++++- drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 22 ++++++++++++ drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 19 ++++++++++ drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 12 +++++++ 7 files changed, 117 insertions(+), 16 deletions(-) commit 77423fa739274a4c7b0e7ad90ca52ef22bdbe84e Author: Ganapathi Bhat Date: Fri Mar 9 23:45:25 2018 +0530 mwifiex: fix incorrect ht capability problem IEEE80211_CHAN_NO_HT40PLUS and IEEE80211_CHAN_NO_HT40PLUS channel flags tell if HT40 operation is allowed on a channel or not. This patch ensures ht_capability information is modified accordingly so that we don't end up creating a HT40 connection when it's not allowed for current regulatory domain. Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/11n.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 53a7094204b7f2b9016648b5c4b5ece8e810a461 Author: Ganapathi Bhat Date: Fri Mar 9 23:45:24 2018 +0530 Revert "mwifiex: fix incorrect ht capability problem" This reverts commit bcc920e8f08336cbbdcdba7c4449c27137e6b4b9. Drivers gets hardware info and updates ht_cap field of wiphy->bands during initialization. Once updated during init, ht_cap must not be modified as it reflects the capability supported by hardwawre. Above patch tries to modify the ht_cap field and this results in wrongly advertising capabilities during association. Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 44 +----------------------- 1 file changed, 1 insertion(+), 43 deletions(-) commit eaab43e505d01ed19f63e08e52252cbc1c69b9b9 Author: Xinming Hu Date: Thu Mar 8 13:54:02 2018 +0800 mwifiex: correct antenna number with high bits reserved High bits of antenna number are reserved in hardware spec, using low 4 bits represent supported antenna. Signed-off-by: Cathy Luo Signed-off-by: Xinming Hu Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cmdevt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a6cf02e6485a80ec0f708e1f72ee95abc3426b84 Author: Randy Dunlap Date: Fri Mar 2 18:03:30 2018 -0800 net/wireless: fix spaces and grammar copy/paste in vendor Kconfig help text Lots of the wireless driver vendor Kconfig symol help text says "questions about cards." (2 spaces between "about" and "cards") Besides dropping one of those spaces, it also needs some other word inserted there. Instead of putting each vendor's name there, I chose to say "these" cards in all of the Kconfig help text. Cc: Kalle Valo Signed-off-by: Randy Dunlap Signed-off-by: Kalle Valo drivers/net/wireless/admtek/Kconfig | 4 ++-- drivers/net/wireless/ath/Kconfig | 4 ++-- drivers/net/wireless/atmel/Kconfig | 4 ++-- drivers/net/wireless/broadcom/Kconfig | 4 ++-- drivers/net/wireless/cisco/Kconfig | 4 ++-- drivers/net/wireless/intel/Kconfig | 4 ++-- drivers/net/wireless/intersil/Kconfig | 4 ++-- drivers/net/wireless/marvell/Kconfig | 4 ++-- drivers/net/wireless/mediatek/Kconfig | 4 ++-- drivers/net/wireless/quantenna/Kconfig | 4 ++-- drivers/net/wireless/ralink/Kconfig | 4 ++-- drivers/net/wireless/realtek/Kconfig | 4 ++-- drivers/net/wireless/rsi/Kconfig | 4 ++-- drivers/net/wireless/st/Kconfig | 4 ++-- drivers/net/wireless/ti/Kconfig | 4 ++-- drivers/net/wireless/zydas/Kconfig | 4 ++-- 16 files changed, 32 insertions(+), 32 deletions(-) commit a24853aab59184ebd19c5e078c7b29e1c316e3a1 Author: Arvind Yadav Date: Thu Mar 8 11:53:24 2018 +0530 ssb: use put_device() if device_register fail Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav Signed-off-by: Kalle Valo drivers/ssb/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79ca239a68f8f006ed872a023d97fbadf9d1577d Author: Matt Redfearn Date: Thu Mar 1 09:58:12 2018 +0000 bcma: Prevent build of PCI host features in module Attempting to build bcma.ko with BCMA_DRIVER_PCI_HOSTMODE=y results in a build error due to use of symbols not exported from vmlinux: ERROR: "pcibios_enable_device" [drivers/bcma/bcma.ko] undefined! ERROR: "register_pci_controller" [drivers/bcma/bcma.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1 To prevent this, don't allow the host mode feature to be built if CONFIG_BCMA=m Signed-off-by: Matt Redfearn Signed-off-by: Kalle Valo drivers/bcma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b2d15bbd1eeb3d787c8e6459a8cb2645f336050 Author: Srinivas Kandagatla Date: Sat Mar 10 02:37:27 2018 +0000 ASoC: dapm: add support to pinctrl dapm Purpose of having pinctrl dapm is to dynamically put the pins in low power state when they are not actively used by the audio and saving power. Without this each driver has to set the pinctrl states, either during probe or dynamically depending on the callbacks received from ASoC core. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown include/sound/soc-dapm.h | 16 ++++++++++++++++ sound/soc/soc-dapm.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) commit a1854fae1414dd8edfff4857fd26c3e355d43e19 Author: Prameela Rani Garnepudi Date: Wed Feb 28 13:08:28 2018 +0530 rsi: improve RX packet handling in USB interface Curretly, RX packet processing is done sequencially. To improve the efficiency, RX skb queue is introduced. Here, while preparing RX URB skb is allocated and used for RX buffer. When rx done handler is called, enqueue the skb to rx_q and set the thread event. RX thread is modified to dequeue packets from skb queue and process further. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_usb.c | 110 ++++++++++++++++------------- drivers/net/wireless/rsi/rsi_91x_usb_ops.c | 35 ++++----- drivers/net/wireless/rsi/rsi_hal.h | 1 + drivers/net/wireless/rsi/rsi_main.h | 1 - drivers/net/wireless/rsi/rsi_usb.h | 5 +- 5 files changed, 78 insertions(+), 74 deletions(-) commit 8809f08cdc0b57765c190abe0853a394513f6d2f Author: Prameela Rani Garnepudi Date: Wed Feb 28 13:08:27 2018 +0530 rsi: use dynamic RX control blocks instead of MAX_RX_URB Currently 2 RX control blocks are allocated by default. If wifi alone mode is used rx control block 2 is unusable. So, changes are done accordingly in all places to use RX control blocks dynamically based on coex mode check. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_usb.c | 34 ++++++++++++++++++------------ drivers/net/wireless/rsi/rsi_91x_usb_ops.c | 5 +++-- 2 files changed, 23 insertions(+), 16 deletions(-) commit 50117605770c9ce94b8f395d7a774c6b029475dc Author: Prameela Rani Garnepudi Date: Wed Feb 28 13:08:26 2018 +0530 rsi: improve RX handling in SDIO interface Currently, RX packets are handled in interrupt context in SDIO interface. To improve the efficiency of processing RX packets, RX thread and RX skb queues are introduced. When the packet is read from device, driver prepares skb, add to RX queue and trigger RX thread event. RX thread processes the packets from RX queue. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_sdio.c | 45 +++++++++++++++----- drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 64 +++++++++++++++++++++++------ drivers/net/wireless/rsi/rsi_main.h | 1 + drivers/net/wireless/rsi/rsi_sdio.h | 8 ++++ 4 files changed, 94 insertions(+), 24 deletions(-) commit 2e78a5562ebc2e4bbdfd7f7729385b3acc94c36e Author: Olivier Moysan Date: Tue Mar 13 17:27:08 2018 +0100 ASoC: dmaengine_pcm: document process callback Add missing description of process callback. Fixes: 78648092ef46 ("ASoC: dmaengine_pcm: add processing support") Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown include/sound/dmaengine_pcm.h | 2 ++ 1 file changed, 2 insertions(+) commit 681805b1401be32b12956a891be276061c24aecb Author: Prameela Rani Garnepudi Date: Tue Feb 27 19:56:18 2018 +0530 rsi: sdio changes to support BT Queue number is correctly updated for BT traffic. Also, kzalloc instead of kmalloc is used for Rx packet allocation. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_sdio.c | 2 ++ drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 898b255339310944965309a465309317ed5538ae Author: Prameela Rani Garnepudi Date: Tue Feb 27 19:56:17 2018 +0530 rsi: add module parameter operating mode Operating mode determines the support for other protocols. This is made as module parameter for better usage. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Siva Rebbagondla Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_main.c | 48 ++++++++++++++++++++++++++++++--- drivers/net/wireless/rsi/rsi_91x_sdio.c | 10 ++++++- drivers/net/wireless/rsi/rsi_91x_usb.c | 10 ++++++- drivers/net/wireless/rsi/rsi_common.h | 2 +- drivers/net/wireless/rsi/rsi_hal.h | 11 ++++++++ 5 files changed, 74 insertions(+), 7 deletions(-) commit 716b840c76417e608af3a8d354028604045ec46f Author: Siva Rebbagondla Date: Tue Feb 27 19:56:16 2018 +0530 rsi: handle BT traffic in driver BT frames are passed through coex and hal modules to BUS. After firmware is loaded, based on the operating mode CARD READY frame comes for each protocol. When BT card ready is received, BT attach is called. Protocol operations are exchanged between the modules at initialization time. Build flag CONFIG_RSI_COEX is introduced to enable coex support if CONFIG_BT_RSIHCI is enabled. Coex operations are valid if coex mode is greater than 1 only. Signed-off-by: Siva Rebbagondla Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_coex.c | 4 ++- drivers/net/wireless/rsi/rsi_91x_core.c | 20 +++++++++--- drivers/net/wireless/rsi/rsi_91x_hal.c | 39 +++++++++++++++++++++++ drivers/net/wireless/rsi/rsi_91x_main.c | 49 +++++++++++++++++++++++++++-- drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 1 + drivers/net/wireless/rsi/rsi_common.h | 1 + drivers/net/wireless/rsi/rsi_hal.h | 10 ++++++ drivers/net/wireless/rsi/rsi_main.h | 3 ++ 8 files changed, 118 insertions(+), 9 deletions(-) commit 38aa4da504837ba8b9c04941e843642f129661eb Author: Prameela Rani Garnepudi Date: Tue Feb 27 19:56:15 2018 +0530 Bluetooth: btrsi: add new rsi bluetooth driver Redpine bluetooth driver is a thin driver which depends on 'rsi_91x' driver for transmitting and receiving packets to/from device. It creates hci interface when attach() is called from 'rsi_91x' module. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Siva Rebbagondla Acked-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/bluetooth/Kconfig | 12 +++ drivers/bluetooth/Makefile | 2 + drivers/bluetooth/btrsi.c | 188 +++++++++++++++++++++++++++++++++++++++++++++ include/net/rsi_91x.h | 4 +- 4 files changed, 205 insertions(+), 1 deletion(-) commit 2108df3c4b1856588ca2e7f641900c2bbf38467e Author: Prameela Rani Garnepudi Date: Tue Feb 27 19:56:14 2018 +0530 rsi: add coex support With BT support, driver has to handle two streams of data (i.e. wlan and BT). Actual coex implementation is in firmware. Coex module just schedule the packets to firmware by taking them from the corresponding paths. Structures for module and protocol operations are introduced for this purpose. Protocol operations structure is global structure which can be shared among different modules. Move initialization of coex and operating mode values to rsi_91x_init(). Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Siva Rebbagondla Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/Kconfig | 9 ++ drivers/net/wireless/rsi/Makefile | 1 + drivers/net/wireless/rsi/rsi_91x_coex.c | 177 ++++++++++++++++++++++++++++++++ drivers/net/wireless/rsi/rsi_91x_hal.c | 17 +-- drivers/net/wireless/rsi/rsi_91x_main.c | 38 ++++++- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 2 +- drivers/net/wireless/rsi/rsi_91x_sdio.c | 1 + drivers/net/wireless/rsi/rsi_91x_usb.c | 2 + drivers/net/wireless/rsi/rsi_coex.h | 37 +++++++ drivers/net/wireless/rsi/rsi_main.h | 6 ++ drivers/net/wireless/rsi/rsi_mgmt.h | 3 + include/net/rsi_91x.h | 20 ++++ 12 files changed, 303 insertions(+), 10 deletions(-) commit 4c10d56a76bb1d40ea6bede579d1522cbcdc438e Author: Prameela Rani Garnepudi Date: Tue Feb 27 19:56:13 2018 +0530 rsi: add header file rsi_91x The common parameters used by wlan and bt modules are add to a new header file "rsi_91x.h" defined in 'include/net' Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Siva Rebbagondla Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_main.h | 12 ++---------- include/net/rsi_91x.h | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 10 deletions(-) commit a4302bff28e2f35ea2471804978c7a601aa05999 Author: Siva Rebbagondla Date: Tue Feb 27 19:56:12 2018 +0530 rsi: add bluetooth rx endpoint USB endpoint 1 is used for WLAN which is presently in use. USB endpoint 2 is introduced for BT Rx traffic. Enumeration of Rx BT endpoint and submitting Rx BT URB are added. >From /sys/kernel/debug/usb/devices, Ad=81(I) is for WLAN EP IN and Ad=01(O) is for Wlan EP OUT. Ad=82(I) is for BT EP IN and Ad=02(O) is for BT EP OUT. T: Bus=01 Lev=01 Prnt=01 Port=09 Cnt=03 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1618 ProdID=9113 Rev= 0.02 S: Manufacturer=Redpine Signals, Inc. S: Product=Wireless USB Network Module S: SerialNumber=000000000001 C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA I:* If#= 0 Alt= 0 #EPs= 6 Cls=00(>ifc ) Sub=00 Prot=00 Driver=(none) E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Siva Rebbagondla Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_usb.c | 37 ++++++++++++++++++++-------------- drivers/net/wireless/rsi/rsi_usb.h | 6 +++--- 2 files changed, 25 insertions(+), 18 deletions(-) commit 1100f81bbcd1ace918ce63fa3be1b854bca6baf2 Author: Prameela Rani Garnepudi Date: Tue Feb 27 19:56:11 2018 +0530 rsi: add rx control block to handle rx packets in USB Rx bluetooth endpoint shall be added in further patches. Rx control block is introduced here to handle Rx packets properly. Separate function is written to initialize the RX control blocks. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Siva Rebbagondla Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_main.c | 4 +- drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 2 +- drivers/net/wireless/rsi/rsi_91x_usb.c | 75 +++++++++++++++++++++++------ drivers/net/wireless/rsi/rsi_91x_usb_ops.c | 35 +++++++++----- drivers/net/wireless/rsi/rsi_common.h | 2 +- drivers/net/wireless/rsi/rsi_main.h | 2 +- drivers/net/wireless/rsi/rsi_usb.h | 10 +++- 7 files changed, 96 insertions(+), 34 deletions(-) commit a9eab62d41646cbf5d8b3408c9d4617bb9678e71 Author: Lorenzo Bianconi Date: Fri Mar 9 10:41:41 2018 +0100 mt7601u: let mac80211 validate rx CCMP PN Apparently the hardware does not perform CCMP PN validation so let mac80211 take care of possible replay attacks in sw. Moreover indicate ICV and MIC had been stripped setting corresponding bits in ieee80211_rx_status. The fix has been validated using 4.2.1 and 4.1.3 tests from the WiFi Alliance vulnerability detection tool. Fixes: c869f77d6abb ("add mt7601u driver") Acked-by: Jakub Kicinski Tested-by: David Park Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt7601u/initvals.h | 1 + drivers/net/wireless/mediatek/mt7601u/mac.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 2f04652f891a1911981988f6ce0c8a83098e9002 Author: Lorenzo Bianconi Date: Wed Mar 7 10:25:50 2018 +0100 mt7601u: simplify mt7601u_mcu_msg_alloc signature Remove mt7601u_dev parameter from mt7601u_mcu_msg_alloc signature since dev pointer is never used in routine body Signed-off-by: Lorenzo Bianconi Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt7601u/mcu.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit fbae9c7490b76a84356dcbd9bca566209271c49e Author: Lorenzo Bianconi Date: Wed Feb 28 23:20:12 2018 +0100 mt76x2: remove unnecessary len variable in mt76x2_eeprom_load() Substitute unnecessary len variable in mt76x2_eeprom_load() with MT7662_EEPROM_SIZE macro since len is used just to store eeprom default size. Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3fb2f6a4db98037890c52f12efa5c351a7bf6c77 Author: Lorenzo Bianconi Date: Wed Feb 28 15:26:57 2018 +0100 mt7601u: remove a warning in mt7601u_efuse_physical_size_check() Fix the following sparse warning in mt7601u_efuse_physical_size_check: - drivers/net/wireless/mediatek/mt7601u/eeprom.c:77:27: warning: Variable length array is used Signed-off-by: Lorenzo Bianconi Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt7601u/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ebdc3e0692fdea0c61b41a4e05f3b6790b24e8e Author: Lorenzo Bianconi Date: Sat Feb 24 16:54:14 2018 +0100 mt76x2: add mac80211 {set,get}_antenna callbacks Add capability to select tx/rx antennas. Possible values are: - 1: to use only the first antenna - 2: to use only the second antenna - 3: to use both of them Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt76/mac80211.c | 9 ++++ drivers/net/wireless/mediatek/mt76/mt76.h | 1 + drivers/net/wireless/mediatek/mt76/mt76x2.h | 1 + drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 36 ++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt76x2_phy.c | 55 +++++++++++++++++------- drivers/net/wireless/mediatek/mt76/mt76x2_regs.h | 2 + 6 files changed, 88 insertions(+), 16 deletions(-) commit 551e1ef4d29134ff1bb01869d522dbae0438032e Author: Lorenzo Bianconi Date: Sat Feb 24 16:54:13 2018 +0100 mt76: add mt76_init_stream_cap routine Add mt76_init_stream_cap utility routine to set ht/vht sta capabilities related to number of streams currently used by the device (it will be used by mac80211 set_antenna callback) Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt76/mac80211.c | 56 +++++++++++++++++++-------- 1 file changed, 39 insertions(+), 17 deletions(-) commit 24114a5f9470f75b47bdd6d40f4fc784326a9b58 Author: Lorenzo Bianconi Date: Sat Feb 24 16:54:12 2018 +0100 mt76: initialize available_antennas_{tx,rx} info Initialize available_antennas related info in wiphy data structure according to antenna_mask field; antenna_mask info is initialized in device specific code and will be used in mac80211 {set,get}_antenna callbacks Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt76/mac80211.c | 3 +++ drivers/net/wireless/mediatek/mt76/mt76.h | 2 ++ drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 3 +++ 3 files changed, 8 insertions(+) commit a55efe1d416c345a73bef38848e1ac7109560e12 Author: Gustavo A. R. Silva Date: Mon Mar 5 15:35:57 2018 -0600 ipvs: use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_lblc.c | 4 ++-- net/netfilter/ipvs/ip_vs_lblcr.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 72597135cdd2fe524f9a185d7f954c2c3980f3ee Author: Florian Westphal Date: Tue Mar 6 08:26:00 2018 +0100 netfilter: x_tables: fix build with CONFIG_COMPAT=n I placed the helpers within CONFIG_COMPAT section, move them outside. Fixes: 472ebdcd15ebdb ("netfilter: x_tables: check error target size too") Fixes: 07a9da51b4b6ae ("netfilter: x_tables: check standard verdicts in core") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 62 ++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) commit fc9fdd61c4809b14faa9b84fe3d8f4167a836326 Author: Sanyog Kale Date: Tue Mar 13 09:02:25 2018 +0530 ASoC: Intel: Skylake: Disable clock and power gating during FW/LIB download In order to achieve better DMA performance and reduce download time for firmware and library, it is recommended to disable dynamic clock and power gating. In some scenarios, DMA may wait to accumulate more data and last chunk of data never gets completed if dynamic clock and power gating is kept enabled. This patch adds support to disable/enable dynamic clock and power gating and use it during firmware and library download. Signed-off-by: Rakesh Ughreja Signed-off-by: Sanyog Kale Signed-off-by: Guneshwor Singh Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 7 ++++++- sound/soc/intel/skylake/skl-pcm.c | 7 ++++++- sound/soc/intel/skylake/skl-sst-ipc.h | 3 +++ sound/soc/intel/skylake/skl.c | 27 +++++++++++++++++++++++++++ sound/soc/intel/skylake/skl.h | 4 ++++ 5 files changed, 46 insertions(+), 2 deletions(-) commit aff8d2bed9e5a33f40611063de62003c0f3abe9f Author: Sylwester Nawrocki Date: Mon Mar 12 19:49:39 2018 +0100 ASoC: samsung: Add HDMI audio support for Snow This patch updates the driver so, in addition to current DT bindings, it also can also use the new DT bindings with cpu, codec subnodes which allow to support sound on the HDMI interface. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Signed-off-by: Mark Brown sound/soc/samsung/snow.c | 224 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 177 insertions(+), 47 deletions(-) commit ea3f79e2c40172b8c476260c1e33dbb419789d85 Author: Sylwester Nawrocki Date: Mon Mar 12 19:49:38 2018 +0100 ASoC: samsung: Snow DT bindings update The new DT bindings are introduced so sound on the HDMI interface can also be supported. The exisiting CPU and CODEC DAI phandle properties are marked as deprecated. Signed-off-by: Sylwester Nawrocki Reviewed-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/snow.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 0f9d0e355d7c3fa5756313765a77961074017845 Author: Adam Thomson Date: Tue Mar 13 09:07:54 2018 +0000 ASoC: da7219: clkdev_drop usage depends on CONFIG_COMMON_CLK Fixes: ASoC: da7219: Add common clock usage for providing DAI clks clkdev_drop usage in the codec remove function should be dependent on if CONFIG_COMMON_CLK is defined for the platform, otherwise it can cause build failures for platforms that do not support this. The clkdev_* functions are still defined for those platforms, in headers and source but the functions are not linked in. This patch resolves this issue, so clkdev_drop is only used if CONFIG_COMMON_CLK is defined. Signed-off-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7219.c | 2 ++ 1 file changed, 2 insertions(+) commit 1e04204eff99b520737315af882f7fb61a9443be Author: Jacopo Mondi Date: Tue Mar 13 16:18:20 2018 +0100 clk: renesas: r8a77965: Replace DU2 clock R-Car M3-N does not have the DU2 unit but it has DU3 instead. Fix the module clock definition to reflect that. Fixes: 7ce36da900c0a2ff ("clk: renesas: cpg-mssr: Add support for R-Car M3-N") Reported-by: Yoshihiro Shimoda Signed-off-by: Jacopo Mondi Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a77965-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6056415d3a513846f774e7bbee0de0460b1c15df Author: Kirill Tkhai Date: Tue Mar 13 13:55:55 2018 +0300 net: Add comment about pernet_operations methods and synchronization Make locking scheme be visible for users, and provide a comment what for we are need exit_batch() methods, and when it should be used. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller include/net/net_namespace.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 8b4e6b3ca2ed63917e18303005fdd34a586e86db Author: Arjun Vynipadath Date: Tue Mar 13 16:24:45 2018 +0530 cxgb4: Add HMA support HMA(Host Memory Access) maps a part of host memory for T6-SO memfree cards. This commit does the following: - Query FW to check if we have HMA support. If yes, the params will return HMA size configured in FW. We will dma map memory based on this size. - Also contains changes to get HMA memory information via debugfs. Signed-off-by: Arjun Vynipadath Signed-off-by: Santosh Rastapur Signed-off-by: Michael Werner Signed-off-by: Ganesh GR Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 13 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 10 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 228 ++++++++++++++++++++- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +- drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 56 +++++ 5 files changed, 303 insertions(+), 6 deletions(-) commit 74b8da705caff32d599474b3c49fd6a5c65fe03e Merge: d98985d c939a5e Author: David S. Miller Date: Tue Mar 13 11:24:57 2018 -0400 Merge branch 'pernet-convert-part6' Kirill Tkhai says: ==================== Converting pernet_operations (part #6) this series continues to review and to convert pernet_operations to make them possible to be executed in parallel for several net namespaces in the same time. There are sctp, tipc and rds in this series. ==================== Signed-off-by: David S. Miller commit c939a5e4d597d635dee4eab2f27308d50fa606f7 Author: Kirill Tkhai Date: Tue Mar 13 13:37:21 2018 +0300 net: Convert rds_tcp_net_ops These pernet_operations create and destroy sysctl table and listen socket. Also, exit method flushes global workqueue and work. Everything looks per-net safe, so we can mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/rds/tcp.c | 1 + 1 file changed, 1 insertion(+) commit afbbc374ab1281f2e5c18278a62a47fb906f0fa4 Author: Kirill Tkhai Date: Tue Mar 13 13:37:11 2018 +0300 net: Convert tipc_net_ops TIPC looks concentrated in itself, and other pernet_operations seem not touching its entities. tipc_net_ops look pernet-divided, and they should be safe to be executed in parallel for several net the same time. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/tipc/core.c | 1 + 1 file changed, 1 insertion(+) commit bfdfa38ff0e26463e418235c0be03c0f0eca4569 Author: Kirill Tkhai Date: Tue Mar 13 13:37:02 2018 +0300 net: Convert sctp_ctrlsock_ops These pernet_operations create and destroy net::sctp::ctl_sock. Since pernet_operations do not send sctp packets each other, they look safe to be marked as async. Signed-off-by: Kirill Tkhai Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/protocol.c | 1 + 1 file changed, 1 insertion(+) commit 2e01ae0ef2db96c530249563383f479f8d9ca183 Author: Kirill Tkhai Date: Tue Mar 13 13:36:51 2018 +0300 net: Convert sctp_defaults_ops These pernet_operations have a deal with sysctl, /proc entries and statistics. Also, there are freeing of net::sctp::addr_waitq queue and net::sctp::local_addr_list in exit method. All of them look pernet-divided, and it seems these items are only interesting for sctp_defaults_ops, which are safe to be executed in parallel. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/sctp/protocol.c | 1 + 1 file changed, 1 insertion(+) commit d98985dd6c2dc69e2ad5f5482a5237fb9487ed99 Author: Wei Yongjun Date: Tue Mar 13 03:03:30 2018 +0000 sctp: fix error return code in sctp_sendmsg_new_asoc() Return error code -EINVAL in the address len check error handling case since 'err' can be overwrite to 0 by 'err = sctp_verify_addr()' in the for loop. Fixes: 2c0dbaa0c43d ("sctp: add support for SCTP_DSTADDRV4/6 Information for sendmsg") Signed-off-by: Wei Yongjun Acked-by: Neil Horman Reviewed-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/socket.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 09b9ddfaa18317f463085d602cf5f60a5fa88665 Author: Takashi Iwai Date: Tue Mar 13 11:31:25 2018 +0100 ALSA: pcm: Use krealloc() for resizing the rules array Just a minor simplification. Change from kcalloc() shouldn't matter as each array element is fully initialized. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_lib.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 5730f9f744cfe20b771adc33f3b476b95d3eebba Author: Takashi Iwai Date: Tue Mar 13 11:18:57 2018 +0100 ALSA: pcm: Remove VLA usage A helper function used by snd_pcm_hw_refine() still keeps using VLA for timestamps of hw constraint rules that are non-fixed size. Let's replace the VLA with a simple kmalloc() array. Reference: https://lkml.org/lkml/2018/3/7/621 Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 7083a45ad0df78546b3a735f0090b075efdf44e3 Author: Thomas Falcon Date: Mon Mar 12 21:05:26 2018 -0500 ibmvnic: Fix recent errata commit Sorry, one of the patches I sent in an earlier series has some dumb mistakes. One was that I had changed the parameter for the errata workaround function but forgot to make that change in the code that called it. The second mistake was a forgotten return value at the end of the function in case the workaround was not needed. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 697a3a873c2cd085f8ee18e20f993e3c731e1b8d Author: Arnd Bergmann Date: Tue Mar 13 10:37:33 2018 +0100 cpufreq: scmi: add thermal dependency A built-in scmi cpufreq driver cannot link against a modular thermal framework: drivers/cpufreq/scmi-cpufreq.o: In function `scmi_cpufreq_ready': scmi-cpufreq.c:(.text+0x40): undefined reference to `of_cpufreq_cooling_register' drivers/cpufreq/scmi-cpufreq.o: In function `scmi_cpufreq_exit': scmi-cpufreq.c:(.text+0x88): undefined reference to `cpufreq_cooling_unregister' This adds a Kconfig dependency that makes sure this configuration is not possible, while allowing all configurations that can work. Note that disabling CPU_THERMAL means we don't care about the THERMAL dependency. Acked-by: Sudeep Holla Signed-off-by: Arnd Bergmann drivers/cpufreq/Kconfig.arm | 1 + 1 file changed, 1 insertion(+) commit 32ff77e8cc9e66cc4fb38098f64fd54cc8f54573 Author: Milind Chabbi Date: Mon Mar 12 14:45:47 2018 +0100 perf/core: Implement fast breakpoint modification via _IOC_MODIFY_ATTRIBUTES Problem and motivation: Once a breakpoint perf event (PERF_TYPE_BREAKPOINT) is created, there is no flexibility to change the breakpoint type (bp_type), breakpoint address (bp_addr), or breakpoint length (bp_len). The only option is to close the perf event and configure a new breakpoint event. This inflexibility has a significant performance overhead. For example, sampling-based, lightweight performance profilers (and also concurrency bug detection tools), monitor different addresses for a short duration using PERF_TYPE_BREAKPOINT and change the address (bp_addr) to another address or change the kind of breakpoint (bp_type) from "write" to a "read" or vice-versa or change the length (bp_len) of the address being monitored. The cost of these modifications is prohibitive since it involves unmapping the circular buffer associated with the perf event, closing the perf event, opening another perf event and mmaping another circular buffer. Solution: The new ioctl flag for perf events, PERF_EVENT_IOC_MODIFY_ATTRIBUTES, introduced in this patch takes a pointer to a struct perf_event_attr as an argument to update an old breakpoint event with new address, type, and size. This facility allows retaining a previous mmaped perf events ring buffer and avoids having to close and reopen another perf event. This patch supports only changing PERF_TYPE_BREAKPOINT event type; future implementations can extend this feature. The patch replicates some of its functionality of modify_user_hw_breakpoint() in kernel/events/hw_breakpoint.c. modify_user_hw_breakpoint cannot be called directly since perf_event_ctx_lock() is already held in _perf_ioctl(). Evidence: Experiments show that the baseline (not able to modify an already created breakpoint) costs an order of magnitude (~10x) more than the suggested optimization (having the ability to dynamically modifying a configured breakpoint via ioctl). When the breakpoints typically do not trap, the speedup due to the suggested optimization is ~10x; even when the breakpoints always trap, the speedup is ~4x due to the suggested optimization. Testing: tests posted at https://github.com/linux-contrib/perf_event_modify_bp demonstrate the performance significance of this patch. Tests also check the functional correctness of the patch. Signed-off-by: Milind Chabbi [ Using modify_user_hw_breakpoint_check function. ] [ Reformated PERF_EVENT_IOC_*, so the values are all in one column. ] Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Frederic Weisbecker Cc: Hari Bathini Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Michael Ellerman Cc: Namhyung Kim Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/20180312134548.31532-8-jolsa@kernel.org Signed-off-by: Ingo Molnar include/linux/hw_breakpoint.h | 7 +++++ include/uapi/linux/perf_event.h | 23 +++++++++-------- kernel/events/core.c | 48 +++++++++++++++++++++++++++++++++++ kernel/events/hw_breakpoint.c | 2 +- tools/include/uapi/linux/perf_event.h | 23 +++++++++-------- 5 files changed, 80 insertions(+), 23 deletions(-) commit 032db28e5fa3594dfa3df585c54d8b612657f537 Author: Jiri Olsa Date: Mon Mar 12 14:45:48 2018 +0100 perf tests: Add breakpoint accounting/modify test Adding test that: - detects the number of watch/break-points, skip test if any is missing - detects PERF_EVENT_IOC_MODIFY_ATTRIBUTES ioctl, skip test if it's missing - detects if watchpoints and breakpoints share same slots - create all possible watchpoints on cpu 0 - change one of it to breakpoint - in case wp and bp do not share slots, we create another watchpoint to ensure the slot accounting is correct Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Frederic Weisbecker Cc: Hari Bathini Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Michael Ellerman Cc: Milind Chabbi Cc: Namhyung Kim Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/20180312134548.31532-9-jolsa@kernel.org Signed-off-by: Ingo Molnar tools/perf/tests/Build | 1 + tools/perf/tests/bp_account.c | 195 ++++++++++++++++++++++++++++++++++++++++ tools/perf/tests/builtin-test.c | 4 + tools/perf/tests/tests.h | 1 + 4 files changed, 201 insertions(+) commit 8ae74abe78e3742072287317e8a2c324ea5ce7bc Merge: 9ba3204 f10b09e Author: David S. Miller Date: Tue Mar 13 10:09:46 2018 -0400 Merge branch 'ibmvnic-Fix-VLAN-and-other-device-errata' Thomas Falcon says: ==================== ibmvnic: Fix VLAN and other device errata This patch series contains fixes for VLAN and other backing hardware errata. The VLAN fixes are mostly to account for the additional four bytes VLAN header in TX descriptors and buffers, when applicable. The other fixes for device errata are to pad small packets to avoid a possible connection error that can occur when some devices attempt to transmit small packets. The other fixes are GSO related. Some devices cannot handle a smaller MSS or a packet with a single segment, so disable GSO in those cases. v2: Fix style mistake (unneeded brackets) in patch 3/4 ==================== Signed-off-by: David S. Miller commit f10b09ef687f3134c26027d2a38a9d4cd3bb9cb7 Author: Thomas Falcon Date: Mon Mar 12 11:51:05 2018 -0500 ibmvnic: Handle TSO backing device errata TSO packets with one segment or with an MSS less than 224 can cause errors on some backing devices, so disable GSO in those cases. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 1f247a6f9e5d1b5a1e57d66829ee52dbafac256f Author: Thomas Falcon Date: Mon Mar 12 11:51:04 2018 -0500 ibmvnic: Pad small packets to minimum MTU size Some backing devices cannot handle small packets well, so pad any small packets to avoid that. It was recommended that the VNIC driver should not send packets smaller than the minimum MTU value provided by firmware, so pad small packets to be at least that long. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 8dff66cc4195bfaeb8764e7e1b62f2d13f311773 Author: Thomas Falcon Date: Mon Mar 12 11:51:03 2018 -0500 ibmvnic: Account for VLAN header length in TX buffers The extra four bytes of a VLAN packet was throwing off TX buffer entry values used by the driver. Account for those bytes when in buffer size and buffer entry calculations Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit da75e3b6a0292fc926f4773f58c5ff6b8db5a179 Author: Thomas Falcon Date: Mon Mar 12 11:51:02 2018 -0500 ibmvnic: Account for VLAN tag in L2 Header descriptor If a VLAN tag is present in the Ethernet header, account for that when providing the L2 header to firmware. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 014a32b30e9d81b47ef82b9995b52c3a0c8b4082 Author: Nicholas Piggin Date: Wed Mar 7 11:37:17 2018 +1000 powerpc/mm/slice: remove radix calls to the slice code This is a tidy up which removes radix MMU calls into the slice code. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/hugetlb.h | 8 ++++---- arch/powerpc/mm/hugetlbpage.c | 6 ++++-- arch/powerpc/mm/slice.c | 17 ++++------------- 3 files changed, 12 insertions(+), 19 deletions(-) commit d262bd5a73998252d1cdf632bedaf1ca540839d8 Author: Nicholas Piggin Date: Wed Mar 7 11:37:16 2018 +1000 powerpc/mm/slice: Use const pointers to cached slice masks where possible The slice_mask cache was a basic conversion which copied the slice mask into caller's structures, because that's how the original code worked. In most cases the pointer can be used directly instead, saving a copy and an on-stack structure. On POWER8, this increases vfork+exec+exit performance by 0.3% and reduces time to mmap+munmap a 64kB page by 2%. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 79 ++++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 41 deletions(-) commit 74907558301f6540422ed1f4012af241b2c91733 Author: Nicholas Piggin Date: Wed Mar 7 11:37:15 2018 +1000 powerpc/mm/slice: remove dead code This code is never compiled in, and it gets broken by the next patch, so remove it. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 6 ------ 1 file changed, 6 deletions(-) commit b8c93549142077da10a02329378a8cfa46ce511c Author: Nicholas Piggin Date: Wed Mar 7 11:37:14 2018 +1000 powerpc/mm/slice: Switch to 3-operand slice bitops helpers This converts the slice_mask bit operation helpers to be the usual 3-operand kind, which allows 2 inputs to set a different output without an extra copy, which is used in the next patch. Adds slice_copy_mask, which will be used in the next patch. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) commit ae3066bd1cbe58e596c791f72a36e576df5d9ed1 Author: Nicholas Piggin Date: Wed Mar 7 11:37:13 2018 +1000 powerpc/mm/slice: implement slice_check_range_fits Rather than build slice masks from a range then use that to check for fit in a candidate mask, implement slice_check_range_fits that checks if a range fits in a mask directly. This allows several structures to be removed from stacks, and also we don't expect a huge range in a lot of these cases, so building and comparing a full mask is going to be more expensive than testing just one or two bits of the range. On POWER8, this increases vfork+exec+exit performance by 0.3% and reduces time to mmap+munmap a 64kB page by 5%. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 62 +++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 28 deletions(-) commit 5709f7cfd8305252dc327206bd674ad65ca4d77f Author: Nicholas Piggin Date: Wed Mar 7 11:37:12 2018 +1000 powerpc/mm/slice: implement a slice mask cache Calculating the slice mask can become a signifcant overhead for get_unmapped_area. This patch adds a struct slice_mask for each page size in the mm_context, and keeps these in synch with the slices psize arrays and slb_addr_limit. On Book3S/64 this adds 288 bytes to the mm_context_t for the slice mask caches. On POWER8, this increases vfork+exec+exit performance by 9.9% and reduces time to mmap+munmap a 64kB page by 28%. Reduces time to mmap+munmap by about 10% on 8xx. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu.h | 18 +++++ arch/powerpc/include/asm/mmu-8xx.h | 10 +++ arch/powerpc/mm/slice.c | 112 +++++++++++++++++++------------ 3 files changed, 98 insertions(+), 42 deletions(-) commit 830fd2d45aa11631325404904d02c7b530d40119 Author: Nicholas Piggin Date: Wed Mar 7 11:37:11 2018 +1000 powerpc/mm/slice: pass pointers to struct slice_mask where possible Pass around const pointers to struct slice_mask where possible, rather than copies of slice_mask, to reduce stack and call overhead. checkstack.pl gives, before: 0x00000d1c slice_get_unmapped_area [slice.o]: 592 0x00001864 is_hugepage_only_range [slice.o]: 448 0x00000754 slice_find_area_topdown [slice.o]: 400 0x00000484 slice_find_area_bottomup.isra.1 [slice.o]: 272 0x000017b4 slice_set_range_psize [slice.o]: 224 0x00000a4c slice_find_area [slice.o]: 128 0x00000160 slice_check_fit [slice.o]: 112 after: 0x00000ad0 slice_get_unmapped_area [slice.o]: 448 0x00001464 is_hugepage_only_range [slice.o]: 288 0x000006c0 slice_find_area [slice.o]: 144 0x0000016c slice_check_fit [slice.o]: 128 0x00000528 slice_find_area_bottomup.isra.2 [slice.o]: 128 0x000013e4 slice_set_range_psize [slice.o]: 128 This increases vfork+exec+exit performance by 1.5%. Reduces time to mmap+munmap a 64kB page by 17%. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 84 ++++++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 39 deletions(-) commit 5a807e04bd2a704821f7027b06c7025c96e015f9 Author: Nicholas Piggin Date: Wed Mar 7 11:37:10 2018 +1000 powerpc/mm/slice: tidy lpsizes and hpsizes update loops Make these loops look the same, and change their form so the important part is not wrapped over so many lines. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 1753dd1830367709144f68f539554dadd7a7ccba Author: Nicholas Piggin Date: Wed Mar 7 11:37:09 2018 +1000 powerpc/mm/slice: Simplify and optimise slice context initialisation The slice state of an mm gets zeroed then initialised upon exec. This is the only caller of slice_set_user_psize now, so that can be removed and instead implement a faster and simplified approach that requires no locking or checking existing state. This speeds up vfork+exec+exit performance on POWER8 by 3%. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/slice.h | 8 ++-- arch/powerpc/mm/mmu_context_book3s64.c | 9 +---- arch/powerpc/mm/mmu_context_nohash.c | 5 +-- arch/powerpc/mm/slice.c | 72 +++++++++------------------------- 4 files changed, 23 insertions(+), 71 deletions(-) commit ab83dc794c9d8870e4844cca9a2945b782b8ee7e Author: Michael Ellerman Date: Thu Mar 8 13:54:42 2018 +1100 powerpc/xmon: Move empty plpar_set_ciabr() into plpar_wrappers.h Now that plpar_wrappers.h has an #ifdef PSERIES we can move the empty version of plpar_set_ciabr() which xmon wants into there. Signed-off-by: Michael Ellerman arch/powerpc/include/asm/plpar_wrappers.h | 6 ++++++ arch/powerpc/xmon/xmon.c | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-) commit 7c09c1869c9ceb8b356e23161d2ceb0ed0849ac5 Author: Michael Ellerman Date: Thu Mar 8 13:54:41 2018 +1100 powerpc: Rename plapr routines to plpar Back in 2013 we added some hypercall wrappers which misspelled "plpar" (P-series Logical PARtition) as "plapr". Visually they're hard to distinguish and it almost doesn't matter, but it is confusing when grepping to miss some calls because of the typo. They've also started spreading, so before they take over let's fix them all to be "plpar". Signed-off-by: Michael Ellerman arch/powerpc/include/asm/plpar_wrappers.h | 6 +++--- arch/powerpc/platforms/pseries/setup.c | 2 +- arch/powerpc/platforms/pseries/smp.c | 2 +- arch/powerpc/xmon/xmon.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit 5017e875e497c00dbc17558161fec3ff30b2b4a9 Author: Michael Ellerman Date: Thu Mar 8 13:54:40 2018 +1100 powerpc/pseries: Make plpar_wrappers.h safe to include when PSERIES=n Currently plpar_wrappers.h is not safe to include when CONFIG_PPC_PSERIES=n, or at least it can be depending on other config options and so on. Fix that by wrapping the entire content in an ifdef. Signed-off-by: Michael Ellerman arch/powerpc/include/asm/plpar_wrappers.h | 4 ++++ 1 file changed, 4 insertions(+) commit 16560e88320d276036b393d4ba51cf0184f6caca Author: Michael Ellerman Date: Thu Mar 8 13:54:39 2018 +1100 powerpc/pseries: Move smp_query_cpu_stopped() etc. out of plpar_wrappers.h smp_query_cpu_stopped() and related #defines are currently in plpar_wrappers.h. The function actually does an RTAS call, not an hcall, and basically has nothing to do with plpar_wrappers.h Move it into pseries.h, where it can easily be used by the only two callers in pseries/smp.c and pseries/hotplug-cpu.c. Signed-off-by: Michael Ellerman arch/powerpc/include/asm/plpar_wrappers.h | 8 -------- arch/powerpc/platforms/pseries/pseries.h | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) commit f002612b9d86613bc6fde0a444e0095225f6053e Author: Kamlakant Patel Date: Tue Mar 13 16:32:27 2018 +0530 ipmi_ssif: Fix kernel panic at msg_done_handler This happens when BMC doesn't return any data and the code is trying to print the value of data[2]. Getting following crash: [ 484.728410] Unable to handle kernel NULL pointer dereference at virtual address 00000002 [ 484.736496] pgd = ffff0000094a2000 [ 484.739885] [00000002] *pgd=00000047fcffe003, *pud=00000047fcffd003, *pmd=0000000000000000 [ 484.748158] Internal error: Oops: 96000005 [#1] SMP [...] [ 485.101451] Call trace: [...] [ 485.188473] [] msg_done_handler+0x668/0x700 [ipmi_ssif] [ 485.195249] [] ipmi_ssif_thread+0x110/0x128 [ipmi_ssif] [ 485.202038] [] kthread+0x108/0x138 [ 485.206994] [] ret_from_fork+0x10/0x30 [ 485.212294] Code: aa1903e1 aa1803e0 b900227f 95fef6a5 (39400aa3) Adding a check to validate the data len before printing data[2] to fix this issue. Signed-off-by: Kamlakant Patel Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_ssif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 60cf09e45fbcbbbb3162f02e0923a25ae7f5627e Author: Shawn Lin Date: Fri Mar 9 09:51:03 2018 +0800 clk: rockchip: Restore the clock phase after the rate was changed There are many factors affecting the clock phase, including clock rate, temperature, logic voltage and silicon process, etc. But clock rate is the most significant one here, and the driver should be aware of the change of the clock rate. As mmc controller need a fixed phase after tuning was completed, at least before explicitly doing re-tune, so this patch try to restore the clock phase by monitoring the event of rate change. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-mmc-phase.c | 39 +++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit 3783f1eb8a8db3747e753c4aa972124e1309db4e Author: Shawn Lin Date: Tue Mar 6 15:09:13 2018 +0800 arm64: dts: rockchip: remove keep-power-in-suspend from sdhci of rk3399-sapphire sdhci for rk3399-sapphire works for eMMC but keep-power-in-suspend is an optional property for SDIO. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 1 - 1 file changed, 1 deletion(-) commit bc48fa1b9d3b04106055b27078da824cd209865a Author: Corey Minyard Date: Thu Feb 15 16:58:26 2018 -0600 ipmi:pci: Blacklist a Realtek "IPMI" device Realtek has some sort of "Virtual" IPMI device on the PCI bus as a KCS controller, but whatever it is, it's not one. Ignore it if seen. Reported-by: Chris Chiu Signed-off-by: Corey Minyard Tested-by: Daniel Drake drivers/char/ipmi/ipmi_si_pci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 491f833134ac474434e1c950925c58b2ac13ca72 Author: Guneshwor Singh Date: Tue Mar 13 16:40:08 2018 +0530 ALSA: hda: Add Icelake PCI ID Icelake is a next generation Intel platform. Add PCI ID for it. Signed-off-by: Guneshwor Singh Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 3 +++ 1 file changed, 3 insertions(+) commit 93619fdec96fa1cd19e5dffc5031cf4c63e6b431 Author: Colin Ian King Date: Tue Mar 13 10:54:06 2018 +0000 power: reset: make function sc27xx_poweroff_shutdown static The function sc27xx_poweroff_shutdown is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: drivers/power/reset/sc27xx-poweroff.c:28:6: warning: symbol 'sc27xx_poweroff_shutdown' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel drivers/power/reset/sc27xx-poweroff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c936b12f15019b38edb5f8bae77bb5b0046d1b7 Author: Neil Armstrong Date: Tue Mar 13 11:07:50 2018 +0100 drm/meson: Add support for DMT modes on HDMI This patch adds support for DMT display modes over HDMI. The modes timings configurations are from the Amlogic Vendor linux tree and tested over multiples monitors. Previously only a selected number of CEA modes were supported. Only these following modes are supported with these changes: - 640x480@60Hz - 800x600@60Hz - 1024x768@60Hz - 1152x864@75Hz - 1280x1024@60Hz - 1600x1200@60Hz - 1920x1080@60Hz The associated code to handle the clock rates is also added. Acked-by: Jerome Brunet Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1520935670-14187-1-git-send-email-narmstrong@baylibre.com drivers/gpu/drm/meson/meson_dw_hdmi.c | 22 +-- drivers/gpu/drm/meson/meson_vclk.c | 219 ++++++++++++++++++++- drivers/gpu/drm/meson/meson_venc.c | 347 +++++++++++++++++++++++++++++++++- drivers/gpu/drm/meson/meson_venc.h | 1 + 4 files changed, 570 insertions(+), 19 deletions(-) commit 2c18107b9d58972588cd45d89b8f58d0f033c110 Author: Christophe JAILLET Date: Mon Mar 12 21:15:10 2018 +0100 drm/meson: Fix some error handling paths in 'meson_drv_bind_master()' If one of these functions fail, we whould free 'drm', as alreadry done in the other error handling paths, below and above. Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller") Signed-off-by: Christophe JAILLET Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/df47e03d36c2cf7bc37ec3105fc47c16555bd946.1520885192.git.christophe.jaillet@wanadoo.fr drivers/gpu/drm/meson/meson_drv.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit dcacf65139e3deff5381eb9799a46667fd146333 Author: Christophe JAILLET Date: Mon Mar 12 21:15:09 2018 +0100 drm/meson: Use drm_dev_put() instead of drm_dev_unref() According to 'drivers/gpu/drm/drm_drv.c', 'drm_dev_unref()' is just a compatibility alias for 'drm_dev_put()'. So use the latter instead. Signed-off-by: Christophe JAILLET Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/d4ce46077d3ada7149c4555acfdda8ade4a6cf50.1520885192.git.christophe.jaillet@wanadoo.fr drivers/gpu/drm/meson/meson_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e770f6bf18182bc3af6ceec30189b6c323cbc157 Author: Christophe JAILLET Date: Mon Mar 12 21:15:08 2018 +0100 drm/meson: Fix an un-handled error path in 'meson_drv_bind_master()' 'drm_vblank_init()' can fail. So handle this (unlikely) error. Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller") Signed-off-by: Christophe JAILLET Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/6cbf3d70ac3904489c7194c895225c4103aebb96.1520885192.git.christophe.jaillet@wanadoo.fr drivers/gpu/drm/meson/meson_drv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5b13ef64eebdc9e989fac2a3eb9aaa252a3edda6 Author: Jerome Brunet Date: Mon Feb 19 12:21:46 2018 +0100 clk: meson: clean-up clk81 clocks clk81 is a composite clock which parents all the peripheral clocks of the platform. It is a critical clock which is used as provided by the bootloader. We don't want to change its rate or reparent it, ever. Remove the CLK_IGNORE_UNUSED on the mux and divider. These clock can't gate so the flag is useless, and the gate is already critical, so the clock won't ever be unused. Remove CLK_SET_RATE_NO_REPARENT from mux, it is useless since the mux is read-only. Remove CLK_SET_RATE_PARENT from the gate and divider and use ro_ops for the divider. A peripheral clock should not try to change the rate of clk81. Stopping the rate propagation is good way to make sure such request would be ignored. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/gxbb.c | 6 ++---- drivers/clk/meson/meson8b.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) commit 05f814402d6174369b3b29832cbb5eb5ed287059 Author: Jerome Brunet Date: Mon Feb 19 12:21:45 2018 +0100 clk: meson: add fdiv clock gates Fdiv fixed dividers clocks of the fixed_pll can actually gate independently. We never had an issue so far because these clocks were provided 'enabled' by the bootloader. Add these gates to enable/disable the clocks when required. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/axg.c | 95 ++++++++++++++++++++++++++++++++++++----- drivers/clk/meson/axg.h | 7 +++- drivers/clk/meson/gxbb.c | 100 +++++++++++++++++++++++++++++++++++++++----- drivers/clk/meson/gxbb.h | 7 +++- drivers/clk/meson/meson8b.c | 95 ++++++++++++++++++++++++++++++++++++----- drivers/clk/meson/meson8b.h | 7 +++- 6 files changed, 278 insertions(+), 33 deletions(-) commit 513b67ac39b0ef91761d94d1d6e31bb84e380744 Author: Jerome Brunet Date: Mon Feb 19 12:21:44 2018 +0100 clk: meson: add mpll pre-divider mpll clocks parent can actually be divided by 1 or 2. So far, this divider has always been set to 1, so the calculation was correct. Now that we know it exists, model the tree correctly. If we ever get a platform where the divider is different, we won't get into trouble Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/axg.c | 24 ++++++++++++++++++++---- drivers/clk/meson/axg.h | 3 ++- drivers/clk/meson/gxbb.c | 23 ++++++++++++++++++++--- drivers/clk/meson/gxbb.h | 3 ++- drivers/clk/meson/meson8b.c | 22 +++++++++++++++++++--- drivers/clk/meson/meson8b.h | 3 ++- 6 files changed, 65 insertions(+), 13 deletions(-) commit 093c3fac4619d267136dc4cb87b916c692fa07db Author: Jerome Brunet Date: Mon Feb 19 12:21:43 2018 +0100 clk: meson: axg: add hifi pll clock Add the hifi pll to the axg clock controller. This clock maybe used as an input of the axg audio clock controller. It uses the same settings table as the gp0 pll but has a frac parameter allowing more precision. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/axg.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/clk/meson/axg.h | 2 +- 2 files changed, 56 insertions(+), 1 deletion(-) commit a4fb7df25de26d12feec4e96687121ec28480a71 Author: Jerome Brunet Date: Mon Feb 19 12:21:42 2018 +0100 clk: meson: axg: add hifi clock bindings Add the new HIFI pll to axg clock bindings Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong include/dt-bindings/clock/axg-clkc.h | 1 + 1 file changed, 1 insertion(+) commit 0a1be867b92a5afb93bce62e12ef76b7c2b777fd Author: Jerome Brunet Date: Mon Feb 19 12:21:41 2018 +0100 clk: meson: add ROUND_CLOSEST to the pll driver Provide an option for the pll driver to round to the rate closest to the requested rate, instead of systematically rounding down. This may allow the provided rate to be closer to the requested rate when rounding up is not an issue Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/clk-pll.c | 17 +++++++++++++---- drivers/clk/meson/clkc.h | 2 ++ 2 files changed, 15 insertions(+), 4 deletions(-) commit c77de0e5c95a249fd2d4105dbc619f436ec96345 Author: Jerome Brunet Date: Mon Feb 19 12:21:40 2018 +0100 clk: meson: add gp0 frac parameter for axg and gxl Add the frac parameter for the gp0 pll of the axg and gxl. This allows to achieve rates between the fixed settings provided by the table. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/axg.c | 7 ++++++- drivers/clk/meson/gxbb.c | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) commit 8289aafa4f361050b05f77a35d3167259530a473 Author: Jerome Brunet Date: Mon Feb 19 12:21:39 2018 +0100 clk: meson: improve pll driver results with frac Finding the appropriate settings of meson plls is too tricky to be done entirely at runtime, using calculation only. Many combination of m, n and od won't lock which is why we are using a table for this. However, for plls having a fractional parameters, it is possible to improve on the result provided by the table by calculating the frac parameter. This change adds the calculation of frac when the parameter is available and the rate provided by the table is not an exact match for the requested rate. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/clk-pll.c | 137 +++++++++++++++++++++++++++++--------------- drivers/clk/meson/clkc.h | 13 +---- 2 files changed, 91 insertions(+), 59 deletions(-) commit c178b003bfcfde5a973c6ba6a45ca60fb1470fc6 Author: Jerome Brunet Date: Mon Feb 19 12:21:38 2018 +0100 clk: meson: remove special gp0 lock loop After testing, it appears that the gxl (and axg) does not require the special locking/reset loop which was initially added for it. All the values present in the gxl table can locked with the simple lock checking loop. The change switches the gxl and axg gp0 back to the simple lock checking loop and removes the code no longer required. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/axg.c | 1 - drivers/clk/meson/clk-pll.c | 12 +----------- drivers/clk/meson/clkc.h | 2 -- drivers/clk/meson/gxbb.c | 1 - 4 files changed, 1 insertion(+), 15 deletions(-) commit 117863e8424791e310f299072080d7b745dbec83 Author: Jerome Brunet Date: Mon Feb 19 12:21:37 2018 +0100 clk: meson: poke pll CNTL last Poking CNTL first may take the PLL out of reset while we are still applying the initial settings, including the filter values initialization. This is the case for the axg and gxl gp0 pll. Doing this poke last ensures the pll stays in reset while the initial settings are applied. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/axg.c | 2 +- drivers/clk/meson/gxbb.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 2eab2d7cab2804f767b84cbdd06d291214d61df4 Author: Jerome Brunet Date: Mon Feb 19 12:21:36 2018 +0100 clk: meson: add fractional part of meson8b fixed_pll Add the missing frac parameter to the meson8b fixed_pll. It seems to be always on this platform, so the rate remains unchanged Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/meson8b.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7a4ea10c01cdda3d66aa98af258f150d863aee24 Author: Rafael J. Wysocki Date: Tue Mar 13 10:07:49 2018 +0100 Revert "ACPI: battery: Add the ThinkPad "Not Charging" quirk" Revert commit 91eea70e5e5c (ACPI: battery: Add the ThinkPad "Not Charging" quirk) as it is reported to cause user space to misbehave. That appears to be due to bugs in user space, so this commit will go in again after the bugs have been fixed and the fixes have been delivered to users. Link: https://marc.info/?l=linux-acpi&m=152089585129589&w=2 Reported-by: Pavel Machek Signed-off-by: Rafael J. Wysocki drivers/acpi/battery.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) commit 4162dd5b3a17f2bf20abbaa7229028e7bc021523 Author: Jerome Brunet Date: Mon Feb 12 15:58:46 2018 +0100 clk: meson: use hhi syscon if available On gxbb and axg, try to get the hhi regmap from the parent DT node, which should be the HHI system controller once the necessary changes have been made in amlogic's DTs Until then, if getting regmap through the system controller fails, the clock controller will fall back to the old way, requesting memory region directly and then registering the regmap itself. This should allow a smooth transition to syscon Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/Kconfig | 2 ++ drivers/clk/meson/axg.c | 43 ++++++++++++++++++++++++++++++------------- drivers/clk/meson/gxbb.c | 39 ++++++++++++++++++++++++++++----------- 3 files changed, 60 insertions(+), 24 deletions(-) commit 03a6519e9cd4d04f1ec2b0cb77d4ebbf7680c3a5 Author: Jerome Brunet Date: Mon Feb 12 15:58:45 2018 +0100 clk: meson: remove obsolete cpu_clk meson8b cpu_clk has been replaced by a set of divider and mux clocks. meson_cpu_clk is no longer used and can be removed Acked-by: Martin Blumenstingl Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/Makefile | 2 +- drivers/clk/meson/clk-cpu.c | 178 -------------------------------------------- drivers/clk/meson/clkc.h | 11 --- 3 files changed, 1 insertion(+), 190 deletions(-) commit 251b6fd38bcb9c8fafdc67851d09fddb79efb049 Author: Jerome Brunet Date: Mon Feb 12 15:58:44 2018 +0100 clk: meson: rework meson8b cpu clock Instead of migrating meson cpu_clk to clk_regmap, like the other meson clock drivers, we take advantage of the massive rework to get rid of it completely, and solve (the first part) of the related FIXME notice. As pointed out in the code comments, the cpu_clk should be modeled with dividers and muxes it is made of, instead of one big composite clock. The cpu_clk was not working correctly to enable dvfs on meson8b. It hangs quite often when changing the cpu clock rate. This new implementation, based on simple elements improves the situation but the platform will still hang from time to time. This is not acceptable so, until we can make the mechanism around the cpu clock stable, the cpu clock subtree has been put in read-only mode, preventing any change of the cpu clock The notifier and read-write operation will be added back when we have a solution to the problem. Cc: Martin Blumenstingl Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/meson8b.c | 173 +++++++++++++++++++++++++++++--------------- drivers/clk/meson/meson8b.h | 7 +- 2 files changed, 119 insertions(+), 61 deletions(-) commit d610b54f77002bbddca54c10d9488c2faa7ff102 Author: Jerome Brunet Date: Mon Feb 12 15:58:43 2018 +0100 clk: meson: split divider and gate part of mpll The mpll clock is a kind of fractional divider which can gate. When the RW operation have been added, enable/disable ops have been mistakenly inserted in this driver. These ops are essentially a poor copy/paste of the generic gate ops. This change removes the gate ops from the mpll driver and inserts a generic gate clock on each mpll divider, simplifying the mpll driver and reducing code duplication. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/axg.c | 100 +++++++++++++++++++++++++++++++------------ drivers/clk/meson/axg.h | 6 ++- drivers/clk/meson/clk-mpll.c | 44 ------------------- drivers/clk/meson/clkc.h | 1 - drivers/clk/meson/gxbb.c | 78 ++++++++++++++++++++++++--------- drivers/clk/meson/gxbb.h | 5 ++- drivers/clk/meson/meson8b.c | 75 +++++++++++++++++++++++--------- drivers/clk/meson/meson8b.h | 6 ++- 8 files changed, 197 insertions(+), 118 deletions(-) commit 722825dcd54b2e427c1aee54a7992eb4ab04a49d Author: Jerome Brunet Date: Mon Feb 12 15:58:42 2018 +0100 clk: meson: migrate plls clocks to clk_regmap Rework meson pll driver to use clk_regmap and move meson8b, gxbb and axg's clock using meson_clk_pll to clk_regmap. This rework is not just about clk_regmap, there a serious clean-up of the driver code: * Add lock and reset field: Previously inferred from the n field. * Simplify the reset logic: Code seemed to apply reset differently but in fact it was always the same -> assert reset, apply params, de-assert reset. The 2 lock checking loops have been kept for now, as they seem to be necessary. * Do the sequence of init register pokes only at .init() instead of in .set_rate(). Redoing the init on every set_rate() is not necessary Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/axg.c | 213 +++++++++++----------- drivers/clk/meson/clk-pll.c | 243 ++++++++++--------------- drivers/clk/meson/clkc.h | 36 +--- drivers/clk/meson/gxbb.c | 424 +++++++++++++++++++++++++------------------- drivers/clk/meson/meson8b.c | 149 +++++++++------- 5 files changed, 535 insertions(+), 530 deletions(-) commit 88a4e1283681e0f07048b2bd867cc81fbbae57cc Author: Jerome Brunet Date: Mon Feb 12 15:58:41 2018 +0100 clk: meson: migrate the audio divider clock to clk_regmap Rework meson audio divider driver to use clk_regmap and move gxbb clock using meson_clk_audio_divider to clk_regmap. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/clk-audio-divider.c | 63 +++++++++++------------------------ drivers/clk/meson/clkc.h | 5 +-- drivers/clk/meson/gxbb.c | 30 +++++------------ 3 files changed, 30 insertions(+), 68 deletions(-) commit c763e61ae8cbc9424e95b23a4d4ad5d2d7a71dcd Author: Jerome Brunet Date: Mon Feb 12 15:58:40 2018 +0100 clk: meson: migrate mplls clocks to clk_regmap Rework meson mpll driver to use clk_regmap and move meson8b, gxbb and axg clocks using meson_clk_mpll to clk_regmap Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/axg.c | 245 +++++++++++++++++++++---------------------- drivers/clk/meson/clk-mpll.c | 102 +++++++----------- drivers/clk/meson/clkc.h | 4 +- drivers/clk/meson/gxbb.c | 161 ++++++++++++++-------------- drivers/clk/meson/meson8b.c | 155 ++++++++++++++------------- 5 files changed, 313 insertions(+), 354 deletions(-) commit f510c32a6af6123bc0638bfe869728bf8be71027 Author: Jerome Brunet Date: Mon Feb 12 15:58:39 2018 +0100 clk: meson: add regmap helpers for parm Meson clock drivers are using struct parm to describe each field of the clock provider. Providing helpers to access these fields with regmap helps to keep drivers readable Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/clkc.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 2513a28c108b0584989927195ba5230e296762ec Author: Jerome Brunet Date: Mon Feb 12 15:58:38 2018 +0100 clk: meson: migrate muxes to clk_regmap Move meson8b, gxbb and axg clocks using clk_mux to clk_regmap Also remove a few useless tables in the process Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/axg.c | 60 ++++----- drivers/clk/meson/gxbb.c | 310 +++++++++++++++++++++----------------------- drivers/clk/meson/meson8b.c | 27 ++-- 3 files changed, 184 insertions(+), 213 deletions(-) commit f06ddd2852b3f45cf37e2abd6b0de4f9cec80f0f Author: Jerome Brunet Date: Mon Feb 12 15:58:37 2018 +0100 clk: meson: migrate dividers to clk_regmap Move meson8b, gxbb and axg clocks using clk_divider to clk_regmap Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/axg.c | 61 ++++++------- drivers/clk/meson/gxbb.c | 217 ++++++++++++++++++++++---------------------- drivers/clk/meson/meson8b.c | 23 ++--- 3 files changed, 142 insertions(+), 159 deletions(-) commit 7f9768a5405192d49c5d963f5e29c740315efca7 Author: Jerome Brunet Date: Mon Feb 12 15:58:36 2018 +0100 clk: meson: migrate gates to clk_regmap Move meson8b, gxbb and axg clocks using clk_gate to clk_regmap Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/Kconfig | 4 +- drivers/clk/meson/axg.c | 72 ++++++------ drivers/clk/meson/clkc.h | 20 ++-- drivers/clk/meson/gxbb.c | 266 +++++++++++++++++++++++--------------------- drivers/clk/meson/meson8b.c | 39 +++---- 5 files changed, 206 insertions(+), 195 deletions(-) commit 161f6e5baabdecb7057696bc4ce006d0d94091ec Author: Jerome Brunet Date: Mon Feb 12 15:58:35 2018 +0100 clk: meson: add regmap to the clock controllers This change registers a regmap in meson8b, gxbb and axg controllers. The clock are still accessing their registers directly through iomem. Once all clocks handled by these controllers have been move to regmap, the regmap register will be removed and replaced with a syscon request. This is needed because other drivers, such as the HDMI driver, need to access the HHI register region Acked-by: Martin Blumenstingl Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/Kconfig | 2 ++ drivers/clk/meson/axg.c | 15 ++++++++++++++- drivers/clk/meson/gxbb.c | 33 +++++++++++++++++++++++---------- drivers/clk/meson/meson8b.c | 14 +++++++++++++- 4 files changed, 52 insertions(+), 12 deletions(-) commit 1f932d99710d70572f8703641db9a878a6dbd063 Author: Jerome Brunet Date: Mon Feb 12 15:58:34 2018 +0100 clk: meson: remove superseded aoclk_gate_regmap aoclk_gate_regmap has been replaced by meson's clk_regmap. It is no longer necessary so, remove it Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/gxbb-aoclk-regmap.c | 46 ----------------------------------- drivers/clk/meson/gxbb-aoclk.h | 10 -------- 2 files changed, 56 deletions(-) commit 81c7fcac9b5ffe5744bb1437d991739be7053528 Author: Jerome Brunet Date: Mon Feb 12 15:58:33 2018 +0100 clk: meson: switch gxbb ao_clk to clk_regmap Drop the gxbb ao specific regmap based clock and use the meson clk_regmap based clock instead. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/Kconfig | 1 + drivers/clk/meson/Makefile | 2 +- drivers/clk/meson/gxbb-aoclk.c | 20 ++++++++++---------- drivers/clk/meson/gxbb-aoclk.h | 1 - 4 files changed, 12 insertions(+), 12 deletions(-) commit ea11dda9e091aba0fe6497108477699286a2d036 Author: Jerome Brunet Date: Mon Feb 12 15:58:32 2018 +0100 clk: meson: add regmap clocks Meson clock controllers need to move the classical iomem registers to regmap. This is triggered because the HHI controllers found on the GXBB and GXL host more than just clocks. To properly handle this, we would like to migrate HHI to syscon. Also GXBB AO clock controller already use regmap, AXG AO and Audio clock controllers will as well. The purpose of this change is to provide a common structure to these meson controllers (and possibly others) for regmap based clocks. This change provides the basic gate, mux and divider, based on the helpers provided by the related generic clocks Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/Kconfig | 4 + drivers/clk/meson/Makefile | 1 + drivers/clk/meson/clk-regmap.c | 166 +++++++++++++++++++++++++++++++++++++++++ drivers/clk/meson/clk-regmap.h | 111 +++++++++++++++++++++++++++ 4 files changed, 282 insertions(+) commit 7b174c5ebe46c739b0802d0781a32788f5259d2c Author: Jerome Brunet Date: Mon Feb 12 15:58:31 2018 +0100 clk: meson: remove obsolete comments Over time things changes in CCF and issues have been fixed in meson controllers. Now, clk81 is decently modeled by read-only PLLs, a mux, a divider and a gate. We can remove the FIXME comments related to clk81. Also remove the comment about devm_clk_hw_register, as there is apparently nothing wrong with it. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/axg.c | 5 ----- drivers/clk/meson/gxbb.c | 6 ------ drivers/clk/meson/meson8b.c | 1 - 3 files changed, 12 deletions(-) commit 14bd7b9c8d3f4cc1f06563630b30adae7838f301 Author: Jerome Brunet Date: Mon Feb 12 15:58:30 2018 +0100 clk: meson: only one loop index is necessary in probe We don't need several loop index variables in the probe function This is far from being critical but since we are doing a vast rework of meson clock controllers, now is the time to lower the entropy a bit Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/axg.c | 8 ++++---- drivers/clk/meson/gxbb.c | 13 ++++++------- drivers/clk/meson/meson8b.c | 8 ++++---- 3 files changed, 14 insertions(+), 15 deletions(-) commit 332b32a23225e01cdfac4fb6cb1c76553f906cb5 Author: Jerome Brunet Date: Mon Feb 12 15:58:29 2018 +0100 clk: meson: use devm_of_clk_add_hw_provider There is no remove callbacks in meson's clock controllers and of_clk_del_provider is never called if of_clk_add_hw_provider has been executed, introducing a potential memory leak. Fixing this by the using the devm variant. In reality, the leak would never happen since these controllers are never unloaded once in use ... still, this is worth cleaning. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/axg.c | 4 ++-- drivers/clk/meson/gxbb.c | 5 +++-- drivers/clk/meson/meson8b.c | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) commit 323346d31d68542b133088c7fe043c234f26eee4 Author: Jerome Brunet Date: Mon Feb 12 15:58:28 2018 +0100 clk: meson: use dev pointer where possible The 'dev' pointer is directly available in gxbb and axg clock controller, so consistently use it instead of going the through the 'pdev' pointer once in while Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/axg.c | 8 ++++---- drivers/clk/meson/gxbb.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 867a5a129a265e8ff65daaea27ab83b24995db81 Merge: f5edaef 6c00e7b Author: Neil Armstrong Date: Tue Mar 13 10:03:12 2018 +0100 Merge branch 'topic/pll-fixes' into next/drivers commit 498f0478aba425ba5555a72e72fe1ce9ee45a0bd Author: Roger Quadros Date: Fri Mar 9 14:47:04 2018 +0200 usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume In the following test we get stuck by sleeping forever in _dwc3_set_mode() after which dual-role switching doesn't work. On dra7-evm's dual-role port, - Load g_zero gadget driver and enumerate to host - suspend to mem - disconnect USB cable to host and connect otg cable with Pen drive in it. - resume system - we sleep indefinitely in _dwc3_set_mode due to. dwc3_gadget_exit()->usb_del_gadget_udc()->udc_stop()-> dwc3_gadget_stop()->wait_event_lock_irq() To fix this instead of waiting indefinitely with wait_event_lock_irq() we use wait_event_interruptible_lock_irq_timeout() and print and error message if there was a timeout. Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 365b7673c34fed58b0a04ee4a7a51102c65ccd2e Author: Grigor Tovmasyan Date: Fri Jan 19 14:43:01 2018 +0400 usb: dwc2: Make dwc2_force_mode() static Declared dwc2_force_mode() function as static, because it was used only in core.c file, for fixing sparse error. Acked-by: John Youn Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 531ef5ebea96394ddb7f554d4d88e017dde30a59 Author: Amelie Delaunay Date: Tue Feb 13 09:28:12 2018 +0100 usb: dwc2: add support for host mode external vbus supply This patch adds a way to enable an external vbus supply in host mode, when dwc2 drvvbus signal is not used. This patch is very similar to the one done in U-Boot dwc2 driver [1]. It also adds dynamic vbus supply management depending on the role and state of the core. [1] https://lists.denx.de/pipermail/u-boot/2017-March/283434.html Signed-off-by: Amelie Delaunay Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 2 ++ drivers/usb/dwc2/hcd.c | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit 13b1f8e25bfd1d6b96278421f934efdd35be9d5b Author: Vardan Mikayelyan Date: Fri Feb 16 12:56:03 2018 +0400 usb: dwc2: Force mode optimizations If the dr_mode is USB_DR_MODE_OTG, forcing the mode is needed during driver probe to get the host and device specific HW parameters. Then we clear the force mode bits so that the core operates in OTG mode. The force mode bits should not be touched at any other time during the driver lifetime and they should be preserved whenever the GUSBCFG register is written to. The force mode bit values will persist across soft resets of the core. If the dr_mode is either USB_DR_MODE_HOST or USB_DR_MODE_PERIPHERAL, the force mode is set just once at probe to configure the core as either a host or peripheral. Given the above, we no longer need any other reset delays, force delays, or any forced modes anywhere else in the driver. So replace all calls to dwc2_core_reset_and_force_dr_mode() with dwc2_core_reset() and remove all other unnecessary delays. Also remove the dwc2_force_mode_if_needed() function since the "if needed" part is already taken care of by the polling in dwc2_force_mode(). Finally, remove all other calls to dwc2_clear_force_mode(). Tested-by: Stefan Wahren Signed-off-by: John Youn Signed-off-by: Vardan Mikayelyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 61 +++++++++++---------------------------------- drivers/usb/dwc2/core.h | 6 ++--- drivers/usb/dwc2/hcd.c | 6 ++--- drivers/usb/dwc2/params.c | 12 ++------- drivers/usb/dwc2/platform.c | 9 ++++++- 5 files changed, 29 insertions(+), 65 deletions(-) commit 03ea6d6e9e1ff1b0222eb723eee5990d3511cc4d Author: John Youn Date: Fri Feb 16 14:12:28 2018 +0400 usb: dwc2: Enable power down Enable the power down option based on the core capability. Signed-off-by: John Youn Signed-off-by: Vardan Mikayelyan Signed-off-by: Artur Petrosyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/params.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit f260b2508557dc2ffbe45192510b5dfdef44a21d Author: Vardan Mikayelyan Date: Fri Feb 16 14:12:02 2018 +0400 usb: dwc2: Change hub-control to allow hibernation Affected cases: ClearPortFeature's USB_PORT_FEAT_SUSPEND SetPortFeature's USB_PORT_FEAT_SUSPEND USB_PORT_FEAT_RESET Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 65c9c4c6b01fe6febf516586489679770a0d8443 Author: Vardan Mikayelyan Date: Fri Feb 16 14:11:35 2018 +0400 usb: dwc2: Add dwc2_handle_gpwrdn_intr() handler The GPWRDN interrupts are those that occur in both Host and Device mode while core is in hibernated state. Export dwc2_core_init to be able to use it in GPWRDN_IDSTS interrupt handler. Here we have duplicated init functions in host and gadget sides so I have left things as it was(used corresponing functions for host and gadget), maybe in the future we'll resolve this problem and will use dwc2_core_init for both sides. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Artur Petrosyan Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 3 ++ drivers/usb/dwc2/core_intr.c | 117 +++++++++++++++++++++++++++++++++++++++++++ drivers/usb/dwc2/hcd.c | 2 +- 3 files changed, 121 insertions(+), 1 deletion(-) commit 97861781dafffe5a9c9cbd0d2a14c9e7ae81d27b Author: Vardan Mikayelyan Date: Fri Feb 16 14:11:07 2018 +0400 usb: dwc2: Allow entering hibernation from USB_SUSPEND interrupt Do changes to allow entering hibernated state from USB_SUSPEND interrupt. All code is added under if conditions and mustn't impact existing functionality. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core_intr.c | 52 +++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 20 deletions(-) commit 624815ce322dda89714d887c6445dbd6ca45af31 Author: Vardan Mikayelyan Date: Fri Feb 16 14:10:39 2018 +0400 usb: dwc2: Add dwc2_enter_hibernation(), dwc2_exit_hibernation() These are wrapper functions which are calling device or host enter/exit hibernation functions. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 38 ++++++++++++++++++++++++++++++++++++++ drivers/usb/dwc2/core.h | 3 +++ 2 files changed, 41 insertions(+) commit c5c403dc43365d1669e5a36829356b1bfddbd39e Author: Vardan Mikayelyan Date: Fri Feb 16 14:10:13 2018 +0400 usb: dwc2: Add host/device hibernation functions Add host/device hibernation functions which must be wrapped by core's dwc2_enter_hibernation()/dwc2_exit_hibernation() functions. Make dwc2_backup_global_registers dwc2_restore_global_register non-static to use them in both host/gadget sides. Added function names: dwc2_gadget_enter_hibernation() dwc2_gadget_exit_hibernation() dwc2_host_enter_hibernation() dwc2_host_exit_hibernation() Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Artur Petrosyan Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 4 +- drivers/usb/dwc2/core.h | 18 ++++ drivers/usb/dwc2/gadget.c | 176 ++++++++++++++++++++++++++++++++++++ drivers/usb/dwc2/hcd.c | 223 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 419 insertions(+), 2 deletions(-) commit 94d2666c588cefc86709822153fa11ab770ada54 Author: Vardan Mikayelyan Date: Fri Feb 16 14:09:46 2018 +0400 usb: dwc2: Add helper functions for restore routine Add common (host/device) helper functions, which will be called while exiting from hibernation, from both sides. dwc2_restore_essential_regs() dwc2_hib_restore_common() Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Artur Petrosyan Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 136 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/dwc2/core.h | 3 ++ 2 files changed, 139 insertions(+) commit 66a360962952822764c57240d5787d68e2b41c13 Author: Vardan Mikayelyan Date: Fri Feb 16 14:09:19 2018 +0400 usb: dwc2: Changes in registers backup/restore functions Move hptxfsiz to host register's backup/restore functions, not needed to have it in global register's backup/restore functions. Add backup for glpmcfg, and read/write for gi2cctl and pcgcctl. As requires programming guide. Affected functions: dwc2_backup_host_registers() dwc2_restore_host_registers() dwc2_backup_global_registers() dwc2_restore_global_registers() Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 8 ++++++-- drivers/usb/dwc2/core.h | 6 ++++-- drivers/usb/dwc2/hcd.c | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) commit fa389a6d77264ae1b1263dc83c63503593e21ca9 Author: Vardan Mikayelyan Date: Fri Feb 16 14:08:53 2018 +0400 usb: dwc2: gadget: Add remote_wakeup_allowed flag It will be set once corresponding set_feature command comes. True if device is allowed to wake-up host by remote-wakeup signalling. This is preparation for remote wake-up support implementation, it will not be implemented until gadget stack provide interface for bringing remote wake-up signalling. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 3 +++ drivers/usb/dwc2/gadget.c | 5 +++++ 2 files changed, 8 insertions(+) commit 20fe440982e72dc6440297d7111d71ac2cda70dd Author: Vardan Mikayelyan Date: Fri Feb 16 14:08:27 2018 +0400 usb: dwc2: core: Add hibernated flag Added a flag to indicate that core is in hibernation, it is used to determine the hibernation state of the core. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 2 ++ drivers/usb/dwc2/platform.c | 1 + 2 files changed, 3 insertions(+) commit 9a5d2816b8560320ac625e8ae6cfc0d36ea0f52b Author: Vardan Mikayelyan Date: Fri Feb 16 14:08:00 2018 +0400 usb: dwc2: gadget: Fix dwc2_restore_device_registers Add parameter remote_wakeup to dwc2_restore_device_registers() to be able to restore device registers according to programming guide for dwc-otg. It says that in case of rem_wakeup DCTL must not be restored here. Remove setting of DCTL_PWRONPRGDONE from this function, because it will be done in function responsible for exiting from hibernation. WA for enabled EPx's IN and OUT in DDMA mode. On entering to hibernation wrong value read and saved from DIEPDMAx, as result BNA interrupt asserted on hibernation exit by restoring from saved area. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Artur Petrosyan Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 2 +- drivers/usb/dwc2/core.h | 5 +++-- drivers/usb/dwc2/gadget.c | 38 ++++++++++++++++++++++++++------------ 3 files changed, 30 insertions(+), 15 deletions(-) commit af7c2bd37867f51e8e3975b98a0d4ee8802d5110 Author: Vardan Mikayelyan Date: Fri Feb 16 14:07:33 2018 +0400 usb: dwc2: gadget: Moved dtxfsiz backup array place Moved dtxfsiz from dwc2_gregs_backup to dwc2_dregs_backup, because it is device register. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 8 ++------ drivers/usb/dwc2/core.h | 4 ++-- drivers/usb/dwc2/gadget.c | 2 ++ 3 files changed, 6 insertions(+), 8 deletions(-) commit 631a23108c1a90b726ca99f1f90d48a91737f43d Author: Vardan Mikayelyan Date: Fri Feb 16 14:07:05 2018 +0400 usb: dwc2: Add hibernation field into dwc2_hw_params Add parameter and it's initialization, needed for hibernation. Reimplement dwc2_set_param_power_down() to support hibernation too. Now 'power_down' parameter can be initialized with 0, 1 or 2. 0 - No 1 - Partial power down 2 - Hibernation Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 2 +- drivers/usb/dwc2/core.h | 12 ++++++++++-- drivers/usb/dwc2/hcd.c | 4 ++-- drivers/usb/dwc2/params.c | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 5 deletions(-) commit 41ba9b9b95beb8bb101a40c6badbbe49da6af9cd Author: Vardan Mikayelyan Date: Fri Feb 16 14:06:36 2018 +0400 usb: dwc2: Rename hibernation to partial_power_down No-op change, only rename. This code was misnamed originally. It was only responsible for partial power down and not for hibernation. Rename core_params->hibernation to core_params->power_down, dwc2_set_param_hibernation() to dwc2_set_param_power_down(). Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 14 +++++++------- drivers/usb/dwc2/core.h | 12 ++++++------ drivers/usb/dwc2/core_intr.c | 14 +++++++------- drivers/usb/dwc2/debugfs.c | 2 +- drivers/usb/dwc2/gadget.c | 6 +++--- drivers/usb/dwc2/hcd.c | 26 +++++++++++++------------- drivers/usb/dwc2/params.c | 2 +- 7 files changed, 38 insertions(+), 38 deletions(-) commit 7455f8b7f0b3f3409f50e52ae6fd23fbd1a611dd Author: John Youn Date: Wed Jan 24 17:44:51 2018 +0400 usb: dwc2: Enable LPM Set 'lpm_capable' flag in the gadget structure so indicating that LPM is supported. Signed-off-by: John Youn Signed-off-by: Sevak Arakelyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 4 ++++ 1 file changed, 4 insertions(+) commit f09cc79b4b338e3bb60370f5443f475d2248bcca Author: Roger Quadros Date: Tue Feb 27 13:30:19 2018 +0200 usb: dwc3: add dual role support using OTG block This is useful on platforms (e.g. TI AM437x) that don't have ID available on a GPIO but do have the OTG block. We can obtain the ID state via the OTG block and use it for dual-role switching. Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 67 ++++++- drivers/usb/dwc3/core.h | 29 +++ drivers/usb/dwc3/drd.c | 489 ++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 557 insertions(+), 28 deletions(-) commit 43bcf64e5cdc3da44363eb2be157c3c99b5d4e7c Author: Dmitry Osipenko Date: Sun Dec 17 20:02:39 2017 +0300 usb: phy: tegra: Increase PHY clock stabilization timeout This fixes "utmi_phy_clk_enable: timeout waiting for phy to stabilize" error message. Signed-off-by: Dmitry Osipenko Signed-off-by: Felipe Balbi drivers/usb/phy/phy-tegra-usb.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 5864470a6e6bf2d4d67fb719b012f88ea48eb656 Author: Mike Looijmans Date: Wed Feb 21 16:04:01 2018 +0100 usb: phy-generic: Use gpiod_set_value_cansleep The nop_reset and shutdown methods are called in a context that can sleep, so use gpiod_set_value_cansleep instead of gpiod_set_value. If you've connected the reset line to a GPIO expander, you'd get a kernel "slowpath" warning with gpiod_set_value. Signed-off-by: Mike Looijmans Signed-off-by: Felipe Balbi drivers/usb/phy/phy-generic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3589cce2b92ba8a11372f2c707adc9eb623efa67 Author: Jaejoong Kim Date: Tue Feb 27 11:04:22 2018 +0900 usb: gadget: udc: Use scnprintf() instead of snprintf() The show() method should use scnprintf() not snprintf() because snprintf() may returns a value that exceeds its second argument. Signed-off-by: Jaejoong Kim Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/core.c | 4 ++-- drivers/usb/gadget/udc/dummy_hcd.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit daaecc6541d014dca073473ec8a4120c0babbeb4 Author: Roger Quadros Date: Tue Feb 27 12:54:37 2018 +0200 usb: dwc3: prevent setting PRTCAP to OTG from debugfs We don't support PRTCAP == OTG yet, so prevent user from setting it via debugfs. Fixes: 41ce1456e1db ("usb: dwc3: core: make dwc3_set_mode() work properly") Cc: # v4.12+ Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 3 +++ 1 file changed, 3 insertions(+) commit 4cff75c7fe3dc86f374ec37e028750a62723dc2e Author: Roger Quadros Date: Tue Feb 27 13:29:11 2018 +0200 usb: dwc3: core.h: add some register definitions Add OTG and GHWPARAMS6 register definitions Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 82 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit e8284db48f1f5fde93285479d18ae528ec27dce4 Author: Martin Blumenstingl Date: Sun Feb 11 22:15:17 2018 +0100 usb: dwc3: of-simple: add support for the Amlogic Meson GXL and AXG SoCs Amlogic Meson GXL and AXG SoCs come with a (host-only) dwc3 USB controller. To use this controller a clock has to be enabled and a reset line has to be pulsed. Enabling the clock works identical to other SoCs. However, the reset line has to be pulsed (using reset_control_reset) instead of using a level reset (reset_control_{assert,deassert}). Signed-off-by: Martin Blumenstingl Tested-by: Yixun Lan Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-of-simple.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ff0a632f08759e31f45b06fee27bc71c826c6b11 Author: Martin Blumenstingl Date: Sun Feb 11 22:15:16 2018 +0100 usb: dwc3: of-simple: add support for shared and pulsed reset lines Some SoCs (such as Amlogic Meson GXL for example) share the reset line with other components (in case of the Meson GXL example there's a shared reset line between the USB2 PHYs, USB3 PHYs and the dwc3 controller). Additionally SoC implementations may prefer a reset pulse over level resets. For now this falls back to the old defaults, which are: - reset lines are exclusive - level resets are being used Signed-off-by: Martin Blumenstingl Tested-by: Yixun Lan Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-of-simple.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit a5d411962c444377d0de0dc89502dbaf2e2a34e2 Author: Martin Blumenstingl Date: Sun Feb 11 22:15:15 2018 +0100 dt-bindings: usb: add support for dwc3 controller on Amlogic Meson GX Amlogic Meson GX SoCs (GXL and AXG) come with a (host-only) dwc3 USB controller. This requires a clock to be enabled and a reset line to be pulsed to get the hardware into a known state. Add the documentation for this IP block, similar to "qcom,dwc3.txt". Signed-off-by: Martin Blumenstingl Reviewed-by: Rob Herring Tested-by: Yixun Lan Signed-off-by: Felipe Balbi .../devicetree/bindings/usb/amlogic,dwc3.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit c1d5df69f55b997b327e68c24be43cf6686304bb Author: Gustavo A. R. Silva Date: Tue Jan 23 09:45:31 2018 -0600 usb: dwc2: gadget: Use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Acked-by: John Youn Signed-off-by: Gustavo A. R. Silva Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88b02f2cb1e13e1ab161c5cb2d5c69f76fe05be2 Author: Grigor Tovmasyan Date: Wed Jan 24 17:44:25 2018 +0400 usb: dwc2: Add core state checking Added core state checking in dwc2_hsotg_ep_queue() function to make sure that application will submit requests only in L0 state. Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c655557c12ded72a41a8d04e868a10b74d957f22 Author: Grigor Tovmasyan Date: Wed Jan 24 17:43:58 2018 +0400 usb: dwc2: Add call_gadget() function call Added call_gadget() function call when entering to L1 state to inform gadget that core is in L1 state. Did the same thing when exiting from L1 state to inform gadget that core is in L0 state. Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core_intr.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 21b0340580f14d6e657439f7b7ce8cb98842dcaa Author: Sevak Arakelyan Date: Wed Jan 24 17:43:32 2018 +0400 usb: dwc2: gadget: Configure the core to enable LPM Configure core in device mode to support LPM according to programming guide. Device will start giving valid responses for LPM tokens. After this patch device side LPM will start working. Signed-off-by: Sevak Arakelyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 2 ++ drivers/usb/dwc2/core_intr.c | 1 + drivers/usb/dwc2/gadget.c | 26 ++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) commit 376f04015944785d0634a288c9e1d1adb4439162 Author: Sevak Arakelyan Date: Wed Jan 24 17:43:06 2018 +0400 usb: dwc2: Enable LPM Transaction Received interrupt Enable "LPM Transaction Received" interrupt for receive an interrupt when host will send LPM token. Signed-off-by: Sevak Arakelyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core_intr.c | 5 +++-- drivers/usb/dwc2/gadget.c | 3 ++- drivers/usb/dwc2/hcd.c | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) commit d2521849d695a2c1f849611f39349faa70eed85f Author: Sevak Arakelyan Date: Wed Jan 24 17:42:40 2018 +0400 usb: dwc2: gadget: LPM interrupt handler This interrupt indicates that an LPM transaction was received on the USB bus. After getting this interrupt we are going from L0 state to L1 state. Signed-off-by: Sevak Arakelyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core_intr.c | 63 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 273d576c4d41d0577551176040c9c78d30c0cf16 Author: Sevak Arakelyan Date: Wed Jan 24 17:42:14 2018 +0400 usb: dwc2: gadget: Add functionality to exit from LPM L1 state Add a function which will be called if device is in L1 sleep state and Resume/Remote Wakeup Detected interrupt is asserted. Signed-off-by: Sevak Arakelyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core_intr.c | 52 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 6f80b6de0ecf65077b53c86967c714d42f4299e0 Author: Sevak Arakelyan Date: Wed Jan 24 17:41:48 2018 +0400 usb: dwc2: Add core parameters for LPM support Add lpm, lpm_clock_gating, besl, hird_threshold_en and hird_threshold core parameters. These will indicate LPM and LPM Errata support as well as chosen L1 sleeping mode for the core and PHY. Signed-off-by: Sevak Arakelyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 20 ++++++++++++++++++++ drivers/usb/dwc2/debugfs.c | 5 +++++ drivers/usb/dwc2/params.c | 13 +++++++++++++ 3 files changed, 38 insertions(+) commit 391f8081d20bf1fcffc5556f94f3cf75c4d14e01 Author: Sevak Arakelyan Date: Wed Jan 24 17:41:22 2018 +0400 usb: dwc2: Rename GLPMCFG... definitions Make field names of GLPMCFG register in definitions to be the same with the databook. Signed-off-by: Sevak Arakelyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/hw.h | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) commit 600a490e180fb95e487b180f00985567c00fa9a9 Author: Razmik Karapetyan Date: Wed Jan 24 17:40:56 2018 +0400 usb: dwc2: Backup and restore PCGCCTL1 register Backup PCGCCTL1 register when entering hibernation mode and restore it after exiting from hibernation, to keep active ACG feature. Signed-off-by: Razmik Karapetyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 2 ++ drivers/usb/dwc2/core.h | 1 + 2 files changed, 3 insertions(+) commit 66e77a24a8c36ff83f0a12f44d23d8141e82fa3b Author: Razmik Karapetyan Date: Wed Jan 24 17:40:29 2018 +0400 usb: dwc2: Add ACG support to the driver Added function for supporting Active Clock Gating functionality in the driver. PCGCCTL1 (Power and Clock Control) register will be used for controlling the core`s active clock gating feature, and the previously reserved 12th bit in GHWCFG4 now indicates that the controller supports the Dynamic Power Reduction (Active Clock Gating) during no traffic scenarios such as L0, idle, resume and suspend states. dwc2_enable_acg() function sets GATEEN bit in PCGCCTL1 register and enables ACG, if it supported. According to ACG functional specification, enabling of ACG feature in host mode done in host initialization, before turning Vbus on, specifically in dwc2_core_host_init function. Enabling of ACG feature in device mode done in device initialization, before clearing the SftDiscon bit in DCTL. This bit was cleared in dwc2_hsotg_core_connect() function.So dwc2_enable_acg() called before dwc2_core_connect() calls. Signed-off-by: Razmik Karapetyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 14 ++++++++++++++ drivers/usb/dwc2/core.h | 4 ++++ drivers/usb/dwc2/gadget.c | 12 ++++++++++-- drivers/usb/dwc2/hcd.c | 5 +++++ drivers/usb/dwc2/hw.h | 5 +++++ drivers/usb/dwc2/params.c | 3 +++ 6 files changed, 41 insertions(+), 2 deletions(-) commit 42c6a25235677ad3568af080b0569e05a9f849fc Author: Stefan Wahren Date: Mon Feb 12 21:20:08 2018 +0100 usb: dwc2: Print error if unable to set DMA coherent mask We better print an error in case probing of dwc2 fails on setting the DMA coherent mask. Signed-off-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/platform.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3df034081021fa4b6967ce3364bc7d867ec1c870 Author: Ludovic Desroches Date: Thu Feb 1 10:34:32 2018 +0100 usb: gadget: udc: atmel: convert to use GPIO descriptors Use GPIO descriptors instead of relying on the old method. Include irq.h header since it is needed and was indirectly included through of_gpio.h. Reviewed-by: Linus Walleij Signed-off-by: Ludovic Desroches Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/atmel_usba_udc.c | 51 ++++++++++++++------------------- drivers/usb/gadget/udc/atmel_usba_udc.h | 4 ++- 2 files changed, 25 insertions(+), 30 deletions(-) commit 7c55984e191f0f5436c1cd1d1e1a3c297458cfba Author: Ludovic Desroches Date: Thu Feb 1 10:34:31 2018 +0100 usb: gadget: udc: atmel: remove code related to platform stuff With the removal of AVR platforms, code related to platform stuff is useless. Signed-off-by: Ludovic Desroches Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/atmel_usba_udc.c | 73 +-------------------------------- 1 file changed, 2 insertions(+), 71 deletions(-) commit 12814a3f8f9b247531d7863170cc82b3fe4218fd Author: Grigor Tovmasyan Date: Tue Feb 6 19:07:38 2018 +0400 usb: dwc2: Fix interval type issue The maximum value that unsigned char can hold is 255, meanwhile the maximum value of interval is 2^(bIntervalMax-1)=2^15. Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecd29dabb2ba2e4a29339bf55129fd1058107206 Author: Vardan Mikayelyan Date: Fri Jan 19 14:46:30 2018 +0400 usb: dwc2: pci: Handle error cleanup in probe The probe function doesn't properly handle errors. Fix it so that it properly handles cleanup. Acked-by: John Youn Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fb50aacdcf124d98ed93d4cc87867aa60011b52d Author: Vardan Mikayelyan Date: Fri Jan 19 14:46:04 2018 +0400 usb: dwc2: pci: Move devm_kzalloc() before platform_device_add() After platform_device_add(), if we error out, we must do platform_device_unregister(), which also does the put. So lets move devm_kzalloc() to simplify error handling and avoid calling of platform_device_unregister(). Acked-by: John Youn Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a127cccd869b4418dcfaefe96bfa672287b32719 Author: Vardan Mikayelyan Date: Fri Jan 19 14:45:38 2018 +0400 usb: dwc2: pci: Move usb_phy_generic_register() Move usb_phy_generic_register() function call to the top, to simplify error handling. If this fails we can simply return instead of cleaning up. Acked-by: John Youn Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/pci.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b10129de2ef40613bdaaa6993bda5360fbaa3224 Author: Vardan Mikayelyan Date: Fri Jan 19 14:45:12 2018 +0400 usb: dwc2: pci: Replace kzalloc() with devm_kzalloc() Use devm_kzalloc() and remove the unnecessary kfree(). Acked-by: John Youn Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8f55fd6041323dd528e85d4303519d053110a5d4 Author: Minas Harutyunyan Date: Fri Jan 19 14:44:46 2018 +0400 usb: dwc2: Change TxFIFO and RxFIFO flushing flow Before flushing fifos required to check AHB master state and lush when AHB master is in IDLE state. Acked-by: John Youn Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 92a8dd26464e1f21f1d869ec53717bd2c1200d63 Author: Minas Harutyunyan Date: Fri Jan 19 14:44:20 2018 +0400 usb: dwc2: host: Fix transaction errors in host mode Added missing GUSBCFG programming in host mode, which fixes transaction errors issue on HiKey and Altera Cyclone V boards. These field even if was programmed in device mode (in function dwc2_hsotg_core_init_disconnected()) will be resetting to POR values after core soft reset applied. So, each time when switching to host mode required to set this field to correct value. Acked-by: John Youn Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit a82c7abdf8fc3b09c4a0ed2eee6d43ecef2ccdb0 Author: Minas Harutyunyan Date: Fri Jan 19 14:43:53 2018 +0400 usb: dwc2: hcd: Fix host channel halt flow According databook in Buffer and External DMA mode non-split periodic channels can't be halted. Acked-by: John Youn Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 9d729a7a7ac531b1de335d7b9ae8bd4de8036ab9 Author: Razmik Karapetyan Date: Fri Jan 19 14:43:27 2018 +0400 usb: dwc2: Remove unnecessary debug prints Removed unnecessary debug prints about DMA mode for host side from dwc2_gahbcfg_init() function. Acked-by: John Youn Signed-off-by: Razmik Karapetyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit e890f1dae3ae15525f1331bcb749f2b5f4d08cd5 Author: Grigor Tovmasyan Date: Fri Jan 19 14:42:35 2018 +0400 usb: dwc2: Delete unused functionality Deleted dwc2_hcd_dump_frrem() function, because it used undefined parameters from dwc2_hsotg structure. The function body was in #ifdef statement and was never compiled. Also removed that parameters from dwc2_hsotg structure, which were used only in dwc2_hcd_dump_frrem() function. And also delete dwc2_sample_frrem macro, because without dwc2_hcd_dump_frrem() function it's lose its purpose. Acked-by: John Youn Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 18 ------------- drivers/usb/dwc2/hcd.c | 70 ------------------------------------------------- drivers/usb/dwc2/hcd.h | 56 --------------------------------------- 3 files changed, 144 deletions(-) commit abd064a19d81001412281501819622d1568309e0 Author: Razmik Karapetyan Date: Fri Jan 19 14:42:08 2018 +0400 usb: dwc2: Rename bit set/clear function names Renamed __orr32 and __bic32 function names to more descriptive dwc2_set_bit and dwc2_clear_bit respectively. Acked-by: John Youn Signed-off-by: Razmik Karapetyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit d84845522d93f92e2278c082f195f83ebd7dfe26 Author: Razmik Karapetyan Date: Fri Jan 19 14:41:42 2018 +0400 usb: dwc2: Update GINTSTS_GOUTNAKEFF interrupt handling Disabled only unmasked endpoints based on DAINTMSK register. This will allow to minimize GINTSTS_GOUTNAKEFF interrupt handling. Acked-by: John Youn Signed-off-by: Razmik Karapetyan Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 689efb2619b58fa21da6c9b96b74f5d1fb8d2b46 Author: Razmik Karapetyan Date: Fri Jan 19 14:41:16 2018 +0400 usb: dwc2: Update dwc2_handle_incomplete_isoc_out() function In 'for' loop skipped masked and non-ISOC EPs. Also breaked 'for' loop after setting SGOUTNAK in DCTL,when one enabled EP was detected. This will allow to minimize incomplete ISOC OUT interrupt handling. Acked-by: John Youn Signed-off-by: Razmik Karapetyan Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 1b4977c793d3d9818ff04df1a09f3c60166626fa Author: Razmik Karapetyan Date: Fri Jan 19 14:40:49 2018 +0400 usb: dwc2: Update dwc2_handle_incomplete_isoc_in() function Disabled only that ISOC endpoints,for which interrupt bit was set in the DAINTMSK register. This will allow to minimize incomplete ISOC IN interrupt handling. Acked-by: John Youn Signed-off-by: Razmik Karapetyan Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 1b52d2fac4075e8e32a95ad81b521fdab1e1678c Author: Razmik Karapetyan Date: Fri Jan 19 14:40:23 2018 +0400 usb: dwc2: Set AHB burst size to INCR Changed AHB burst size from INCR4 to INCR by default. With this value driver shows excellent DMA performance. Acked-by: John Youn Signed-off-by: Razmik Karapetyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 2 +- drivers/usb/dwc2/params.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d1ac8c802dce92971d1cc81f82a3466b2104e787 Author: Razmik Karapetyan Date: Fri Jan 19 14:39:57 2018 +0400 usb: dwc2: Use AHB burst size parameter In dwc2_hsotg_core_init_disconnected() function used AHB burst size parameter, instead of calculating already calculated value. Acked-by: John Youn Signed-off-by: Razmik Karapetyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79d6b8c51cb85e27f189e0ffd0b68a0162477e47 Author: Sevak Arakelyan Date: Fri Jan 19 14:39:31 2018 +0400 usb: dwc2: Update bit polling functionality Move dwc2_hsotg_wait_bit_set function to core.c so it can be used anywhere in the code. Added dwc2_hsotg_wait_bit_clear function in core.c. Replace all the parts of register bit polling code with dwc2_hsotg_wait_bit_set or dwc2_hsotg_wait_bit_clear functions calls depends on code logic. Acked-by: John Youn Signed-off-by: Sevak Arakelyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 108 +++++++++++++++++++++++++++------------------- drivers/usb/dwc2/core.h | 5 +++ drivers/usb/dwc2/gadget.c | 38 ++-------------- drivers/usb/dwc2/hcd.c | 18 +++----- 4 files changed, 79 insertions(+), 90 deletions(-) commit d14ccaba8dc7aa1f137ef93349b08196ce0f0347 Author: Gevorg Sahakyan Date: Tue Jan 16 16:21:46 2018 +0400 usb: dwc2: Remove version check in GSNPSID Only check the ID portion of the GSNPSID register and don’t check the version. This will allow the driver to work with version 4.00a and later of the DWC_hsotg IP. Acked-by: John Youn Signed-off-by: Gevorg Sahakyan Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 5 +++++ drivers/usb/dwc2/hw.h | 1 + drivers/usb/dwc2/params.c | 11 +++++------ 3 files changed, 11 insertions(+), 6 deletions(-) commit 946ef68ad4e45aa048a5fb41ce8823ed29da866a Author: Lars-Peter Clausen Date: Fri Jan 12 11:26:16 2018 +0100 usb: gadget: ffs: Let setup() return USB_GADGET_DELAYED_STATUS Some UDC drivers (like the DWC3) expect that the response to a setup() request is queued from within the setup function itself so that it is available as soon as setup() has completed. Upon receiving a setup request the function fs driver creates an event that is made available to userspace. And only once userspace has acknowledged that event the response to the setup request is queued. So it violates the requirement of those UDC drivers and random failures can be observed. This is basically a race condition and if userspace is able to read the event and queue the response fast enough all is good. But if it is not, for example because other processes are currently scheduled to run, the USB host that sent the setup request will observe an error. To avoid this the gadget framework provides the USB_GADGET_DELAYED_STATUS return code. If a setup() callback returns this value the UDC driver is aware that response is not yet available and can uses the appropriate methods to handle this case. Since in the case of function fs the response will never be available when the setup() function returns make sure that this status code is used. This fixed random occasional failures that were previously observed on a DWC3 based system under high system load. Signed-off-by: Lars-Peter Clausen Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4058ebf33cb0be88ca516f968eda24ab7b6b93e4 Author: Lars-Peter Clausen Date: Fri Jan 12 11:05:02 2018 +0100 usb: gadget: ffs: Execute copy_to_user() with USER_DS set When using a AIO read() operation on the function FS gadget driver a URB is submitted asynchronously and on URB completion the received data is copied to the userspace buffer associated with the read operation. This is done from a kernel worker thread invoking copy_to_user() (through copy_to_iter()). And while the user space process memory is made available to the kernel thread using use_mm(), some architecture require in addition to this that the operation runs with USER_DS set. Otherwise the userspace memory access will fail. For example on ARM64 with Privileged Access Never (PAN) and User Access Override (UAO) enabled the following crash occurs. Internal error: Accessing user space memory with fs=KERNEL_DS: 9600004f [#1] SMP Modules linked in: CPU: 2 PID: 1636 Comm: kworker/2:1 Not tainted 4.9.0-04081-g8ab2dfb-dirty #487 Hardware name: ZynqMP ZCU102 Rev1.0 (DT) Workqueue: events ffs_user_copy_worker task: ffffffc87afc8080 task.stack: ffffffc87a00c000 PC is at __arch_copy_to_user+0x190/0x220 LR is at copy_to_iter+0x78/0x3c8 [...] [] __arch_copy_to_user+0x190/0x220 [] ffs_user_copy_worker+0x70/0x130 [] process_one_work+0x1dc/0x460 [] worker_thread+0x50/0x4b0 [] kthread+0xd8/0xf0 [] ret_from_fork+0x10/0x50 Address this by placing a set_fs(USER_DS) before of the copy operation and revert it again once the copy operation has finished. This patch is analogous to commit d7ffde35e31a ("vhost: use USER_DS in vhost_worker thread") which addresses the same underlying issue. Signed-off-by: Lars-Peter Clausen Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 4 ++++ 1 file changed, 4 insertions(+) commit 28af04b4a7879a027cb23c1d616a60e31ff4af7c Author: Thinh Nguyen Date: Wed Jan 10 13:17:13 2018 -0800 usb: gadget: mass_storage: Set max_speed to SSP Increase max_speed of the mass_storage driver for UDCs that support SuperSpeed Plus. The composite driver will pass this value to UDC core to set the device speed on probe (actual speed may be different depending on whether the USB controller supports it or other external factors). Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi drivers/usb/gadget/legacy/mass_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92af4dcb4e1c5f58dc337bc97bdffd4e853dbc93 Author: Thomas Gleixner Date: Thu Mar 1 17:33:38 2018 +0100 tracing: Unify the "boot" and "mono" tracing clocks Unify the "boot" and "mono" tracing clocks and document the new behaviour. Signed-off-by: Thomas Gleixner Cc: Dmitry Torokhov Cc: John Stultz Cc: Jonathan Corbet Cc: Kevin Easton Cc: Linus Torvalds Cc: Mark Salyzyn Cc: Michael Kerrisk Cc: Peter Zijlstra Cc: Petr Mladek Cc: Prarit Bhargava Cc: Sergey Senozhatsky Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20180301165150.489635255@linutronix.de Signed-off-by: Ingo Molnar Documentation/trace/ftrace.txt | 14 +++----------- include/linux/timekeeping.h | 6 ------ kernel/trace/trace.c | 2 +- 3 files changed, 4 insertions(+), 18 deletions(-) commit 127bfa5f4342e63d83a0b07ece376c2e8878e4a5 Author: Thomas Gleixner Date: Thu Mar 1 17:33:37 2018 +0100 hrtimer: Unify MONOTONIC and BOOTTIME clock behavior Now that th MONOTONIC and BOOTTIME clocks are indentical remove all the special casing. The user space visible interfaces still support both clocks, but their behavior is identical. Signed-off-by: Thomas Gleixner Cc: Dmitry Torokhov Cc: John Stultz Cc: Jonathan Corbet Cc: Kevin Easton Cc: Linus Torvalds Cc: Mark Salyzyn Cc: Michael Kerrisk Cc: Peter Zijlstra Cc: Petr Mladek Cc: Prarit Bhargava Cc: Sergey Senozhatsky Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20180301165150.410218515@linutronix.de Signed-off-by: Ingo Molnar include/linux/hrtimer.h | 2 -- kernel/time/hrtimer.c | 16 ++-------------- kernel/time/timekeeping.c | 4 +--- kernel/time/timekeeping.h | 1 - 4 files changed, 3 insertions(+), 20 deletions(-) commit 7250a4047aa6106006c2c9b5aff91d7d3fb77962 Author: Thomas Gleixner Date: Thu Mar 1 17:33:36 2018 +0100 posix-timers: Unify MONOTONIC and BOOTTIME clock behavior Now that the MONOTONIC and BOOTTIME clocks are indentical remove all the special casing. The user space visible interfaces still support both clocks, but their behavior is identical. Signed-off-by: Thomas Gleixner Cc: Dmitry Torokhov Cc: John Stultz Cc: Jonathan Corbet Cc: Kevin Easton Cc: Linus Torvalds Cc: Mark Salyzyn Cc: Michael Kerrisk Cc: Peter Zijlstra Cc: Petr Mladek Cc: Prarit Bhargava Cc: Sergey Senozhatsky Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20180301165150.315745557@linutronix.de Signed-off-by: Ingo Molnar kernel/time/posix-timers.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) commit d6c7270e913db75ca5fdc79915ba780e97ae2857 Author: Thomas Gleixner Date: Thu Mar 1 17:33:35 2018 +0100 timekeeping: Remove boot time specific code Now that the MONOTONIC and BOOTTIME clocks are the same, remove all the special handling from timekeeping. Keep wrappers for the existing users of the *boot* timekeeper interfaces. Signed-off-by: Thomas Gleixner Cc: Dmitry Torokhov Cc: John Stultz Cc: Jonathan Corbet Cc: Kevin Easton Cc: Linus Torvalds Cc: Mark Salyzyn Cc: Michael Kerrisk Cc: Peter Zijlstra Cc: Petr Mladek Cc: Prarit Bhargava Cc: Sergey Senozhatsky Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20180301165150.236279497@linutronix.de Signed-off-by: Ingo Molnar include/linux/timekeeping.h | 42 +++++++++++++++++------------------------- kernel/time/timekeeping.c | 31 ------------------------------- 2 files changed, 17 insertions(+), 56 deletions(-) commit f2d6fdbfd2389a38598d448cb8dc09d946c1b87e Author: Thomas Gleixner Date: Thu Mar 1 17:33:34 2018 +0100 Input: Evdev - unify MONOTONIC and BOOTTIME clock behavior Now that the MONOTONIC and BOOTTIME clocks are indentical, remove all the special casing. The user space visible interfaces still support both clocks, but their behavior is identical. Signed-off-by: Thomas Gleixner Cc: Dmitry Torokhov Cc: John Stultz Cc: Jonathan Corbet Cc: Kevin Easton Cc: Linus Torvalds Cc: Mark Salyzyn Cc: Michael Kerrisk Cc: Peter Zijlstra Cc: Petr Mladek Cc: Prarit Bhargava Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: linux-input@vger.kernel.org Link: http://lkml.kernel.org/r/20180301165150.155899327@linutronix.de Signed-off-by: Ingo Molnar drivers/input/evdev.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit d6ed449afdb38f89a7b38ec50e367559e1b8f71f Author: Thomas Gleixner Date: Thu Mar 1 17:33:33 2018 +0100 timekeeping: Make the MONOTONIC clock behave like the BOOTTIME clock The MONOTONIC clock is not fast forwarded by the time spent in suspend on resume. This is only done for the BOOTTIME clock. The reason why the MONOTONIC clock is not forwarded is historical: the original Linux implementation was using jiffies as a base for the MONOTONIC clock and jiffies have never been advanced after resume. At some point when timekeeping was unified in the core code, the MONONOTIC clock was advanced after resume which also advanced jiffies causing interesting side effects. As a consequence the the MONOTONIC clock forwarding was disabled again and the BOOTTIME clock was introduced, which allows to read time since boot. Back then it was not possible to completely distangle the MONOTONIC clock and jiffies because there were still interfaces which exposed the MONOTONIC clock behaviour based on the timer wheel and therefore jiffies. As of today none of the MONOTONIC clock facilities depends on jiffies anymore so the forwarding can be done seperately. This is achieved by forwarding the variables which are used for the jiffies update after resume before the tick is restarted, In timekeeping resume, the change is rather simple. Instead of updating the offset between the MONOTONIC clock and the REALTIME/BOOTTIME clocks, advance the time keeper base for the MONOTONIC and the MONOTONIC_RAW clocks by the time spent in suspend. The MONOTONIC clock is now the same as the BOOTTIME clock and the offset between the REALTIME and the MONOTONIC clocks is the same as before suspend. There might be side effects in applications, which rely on the (unfortunately) well documented behaviour of the MONOTONIC clock, but the downsides of the existing behaviour are probably worse. There is one obvious issue. Up to now it was possible to retrieve the time spent in suspend by observing the delta between the MONOTONIC clock and the BOOTTIME clock. This is not longer available, but the previously introduced mechanism to read the active non-suspended monotonic time can mitigate that in a detectable fashion. Signed-off-by: Thomas Gleixner Cc: Andrew Morton Cc: Dmitry Torokhov Cc: John Stultz Cc: Jonathan Corbet Cc: Kevin Easton Cc: Linus Torvalds Cc: Mark Salyzyn Cc: Michael Kerrisk Cc: Peter Zijlstra Cc: Petr Mladek Cc: Prarit Bhargava Cc: Sergey Senozhatsky Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20180301165150.062975504@linutronix.de Signed-off-by: Ingo Molnar kernel/time/tick-common.c | 15 +++++++++++++++ kernel/time/tick-internal.h | 6 ++++++ kernel/time/tick-sched.c | 9 +++++++++ kernel/time/timekeeping.c | 7 ++++--- 4 files changed, 34 insertions(+), 3 deletions(-) commit 72199320d49dbafa1a99f94f1cd60dc90035c154 Author: Thomas Gleixner Date: Thu Mar 1 17:33:32 2018 +0100 timekeeping: Add the new CLOCK_MONOTONIC_ACTIVE clock The planned change to unify the behaviour of the MONOTONIC and BOOTTIME clocks vs. suspend removes the ability to retrieve the active non-suspended time of a system. Provide a new CLOCK_MONOTONIC_ACTIVE clock which returns the active non-suspended time of the system via clock_gettime(). This preserves the old behaviour of CLOCK_MONOTONIC before the BOOTTIME/MONOTONIC unification. This new clock also allows applications to detect programmatically that the MONOTONIC and BOOTTIME clocks are identical. Signed-off-by: Thomas Gleixner Cc: Dmitry Torokhov Cc: John Stultz Cc: Jonathan Corbet Cc: Kevin Easton Cc: Linus Torvalds Cc: Mark Salyzyn Cc: Michael Kerrisk Cc: Peter Zijlstra Cc: Petr Mladek Cc: Prarit Bhargava Cc: Sergey Senozhatsky Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20180301165149.965235774@linutronix.de Signed-off-by: Ingo Molnar include/linux/timekeeper_internal.h | 2 ++ include/linux/timekeeping.h | 1 + include/uapi/linux/time.h | 1 + kernel/time/posix-stubs.c | 2 ++ kernel/time/posix-timers.c | 13 +++++++++++++ kernel/time/timekeeping.c | 36 ++++++++++++++++++++++++++++++++++++ 6 files changed, 55 insertions(+) commit 5f970521d3279d99adcdebf329631e36cb9f0deb Author: Jiri Olsa Date: Mon Mar 12 14:45:46 2018 +0100 perf/core: Move perf_event_attr::sample_max_stack into perf_copy_attr() Move the sample_max_stack check and setup into perf_copy_attr(), so we have all perf_event_attr initial setup in one place and can easily compare attrs in the new ioctl introduced in following change. Suggested-by: Peter Zijlstra Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Frederic Weisbecker Cc: Hari Bathini Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Michael Ellerman Cc: Milind Chabbi Cc: Namhyung Kim Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/20180312134548.31532-7-jolsa@kernel.org Signed-off-by: Ingo Molnar kernel/events/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 705feaf321c37e4dca3637fd5cb3b275f17a06c9 Author: Jiri Olsa Date: Mon Mar 12 14:45:45 2018 +0100 hw_breakpoint: Add perf_event_attr fields check in __modify_user_hw_breakpoint() And rename it to modify_user_hw_breakpoint_check(). We are about to use modify_user_hw_breakpoint_check() for user space breakpoints modification, we must be very strict to check only the fields we can change have changed. As Peter explained: "Suppose someone does: attr = malloc(sizeof(*attr)); // uninitialized memory attr->type = BP; attr->bp_addr = new_addr; attr->bp_type = bp_type; attr->bp_len = bp_len; ioctl(fd, PERF_IOC_MOD_ATTR, &attr); And feeds absolute shite for the rest of the fields. Then we later want to extend IOC_MOD_ATTR to allow changing attr::sample_type but we can't, because that would break the above application." I'm making this check optional because we already export modify_user_hw_breakpoint() and with this check we could break existing users. Suggested-by: Peter Zijlstra Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Frederic Weisbecker Cc: Hari Bathini Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Michael Ellerman Cc: Milind Chabbi Cc: Namhyung Kim Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/20180312134548.31532-6-jolsa@kernel.org Signed-off-by: Ingo Molnar kernel/events/hw_breakpoint.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 18ff57b220610a699947f20b156a8245ca7eee98 Author: Jiri Olsa Date: Mon Mar 12 14:45:44 2018 +0100 hw_breakpoint: Factor out __modify_user_hw_breakpoint() function Moving out all the functionality without the events disabling/enabling calls, because we want to call another disabling/enabling functions in following change. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Frederic Weisbecker Cc: Hari Bathini Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Michael Ellerman Cc: Milind Chabbi Cc: Namhyung Kim Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/20180312134548.31532-5-jolsa@kernel.org Signed-off-by: Ingo Molnar kernel/events/hw_breakpoint.c | 46 +++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 17 deletions(-) commit ea6a9d530c1779b9bd30944b803820c462f01eac Author: Jiri Olsa Date: Mon Mar 12 14:45:43 2018 +0100 hw_breakpoint: Add modify_bp_slot() function Add the modify_bp_slot() function to keep slot numbers correct when changing the breakpoint type. Using existing __release_bp_slot()/__reserve_bp_slot() call sequence to update the slot counts. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Frederic Weisbecker Cc: Hari Bathini Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Michael Ellerman Cc: Milind Chabbi Cc: Namhyung Kim Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/20180312134548.31532-4-jolsa@kernel.org Signed-off-by: Ingo Molnar kernel/events/hw_breakpoint.c | 46 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) commit 1ad9ff7dea4c42bee43f98b7d7ce8037ee22e133 Author: Jiri Olsa Date: Mon Mar 12 14:45:42 2018 +0100 hw_breakpoint: Pass bp_type argument to __reserve_bp_slot|__release_bp_slot() Passing bp_type argument to __reserve_bp_slot() and __release_bp_slot() functions, so we can pass another bp_type than the one defined in bp->attr.bp_type. This will be handy in following change that fixes breakpoint slot counts during its modification. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Frederic Weisbecker Cc: Hari Bathini Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Michael Ellerman Cc: Milind Chabbi Cc: Namhyung Kim Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/20180312134548.31532-3-jolsa@kernel.org Signed-off-by: Ingo Molnar kernel/events/hw_breakpoint.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit cbd9d9f114f9e5931ba199f4450667656b892f32 Author: Jiri Olsa Date: Mon Mar 12 14:45:41 2018 +0100 hw_breakpoint: Pass bp_type directly as find_slot_idx() argument Pass bp_type directly as a find_slot_idx() argument, so we don't need to have whole event to get the breakpoint slot type. It will be used in following changes. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Frederic Weisbecker Cc: Hari Bathini Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Michael Ellerman Cc: Milind Chabbi Cc: Namhyung Kim Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/20180312134548.31532-2-jolsa@kernel.org Signed-off-by: Ingo Molnar kernel/events/hw_breakpoint.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e82d70cf965072a3872ea97b7d8df4b6f29fc09f Author: Mathieu Malaterre Date: Thu Mar 8 22:31:59 2018 +1100 powerpc/32: Add missing prototypes for (early|machine)_init() early_init() and machine_init() have no prototype, add one in asm-prototypes.h. Fixes the following warnings (treated as error in W=1): arch/powerpc/kernel/setup_32.c:68:30: error: no previous prototype for ‘early_init’ arch/powerpc/kernel/setup_32.c:99:21: error: no previous prototype for ‘machine_init’ Signed-off-by: Mathieu Malaterre [mpe: Move them to asm-prototypes.h, drop other functions] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/asm-prototypes.h | 3 +++ arch/powerpc/kernel/setup_32.c | 1 + 2 files changed, 4 insertions(+) commit d15a261d876da3267c8c706ef21e7fdf10c582be Author: Mathieu Malaterre Date: Wed Mar 7 21:32:55 2018 +0100 powerpc/32: Make some functions static These functions can all be static, make it so. Signed-off-by: Mathieu Malaterre [mpe: Combine a patch of Mathieu's with some other static conversions] Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_32.c | 7 +++---- arch/powerpc/mm/init_32.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) commit ef85dffd4251ff6c23056651f6f83bdce83cd1cf Author: Mathieu Malaterre Date: Fri Mar 2 20:50:51 2018 +0100 powerpc: Avoid comparison of unsigned long >= 0 in __access_ok() Rewrite function-like macro into regular static inline function to avoid a warning during macro expansion. Fix warning (treated as error in W=1): ./arch/powerpc/include/asm/uaccess.h:52:35: error: comparison of unsigned expression >= 0 is always true (((size) == 0) || (((size) - 1) <= ((segment).seg - (addr))))) ^ Suggested-by: Segher Boessenkool Signed-off-by: Mathieu Malaterre Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/uaccess.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 603b892200e653dd7e86a0e4a315561534d97441 Author: Mathieu Malaterre Date: Wed Mar 7 21:34:35 2018 +0100 powerpc: Avoid comparison of unsigned long >= 0 in pfn_valid() Rewrite comparison since all values compared are of type `unsigned long`. Instead of using unsigned properties and rewriting the original code as: (originally suggested by Segher Boessenkool ) #define pfn_valid(pfn) \ (((pfn) - ARCH_PFN_OFFSET) < (max_mapnr - ARCH_PFN_OFFSET)) Prefer a static inline function to make code as readable as possible. Fix a warning (treated as error in W=1): arch/powerpc/include/asm/page.h:129:32: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits] #define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr) ^ Suggested-by: Christophe Leroy Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/include/asm/page.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 4f1f40f7b2b4487f582ecafec64076e430c72b22 Author: Mathieu Malaterre Date: Fri Mar 2 20:49:18 2018 +0100 powerpc/prom: Remove warning on array size when empty When neither CONFIG_ALTIVEC, nor CONFIG_VSX or CONFIG_PPC64 is defined, the array feature_properties is defined as an empty array, which in turn triggers the following warning (treated as error on W=1): arch/powerpc/kernel/prom.c: In function ‘check_cpu_feature_properties’: arch/powerpc/kernel/prom.c:298:16: error: comparison of unsigned expression < 0 is always false for (i = 0; i < ARRAY_SIZE(feature_properties); ++i, ++fp) { ^ Suggested-by: Michael Ellerman Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/kernel/prom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bf7fb32dd5fc8a6bd25aaab05d3acddd1223ba03 Author: Mathieu Malaterre Date: Sun Feb 25 18:22:35 2018 +0100 powerpc: Add missing prototypes for ppc_select() & ppc_fadvise64_64() Add missing prototypes for ppc_select() & ppc_fadvise64_64() to header asm-prototypes.h. Fix the following warnings (treated as errors in W=1) arch/powerpc/kernel/syscalls.c:87:1: error: no previous prototype for ‘ppc_select’ arch/powerpc/kernel/syscalls.c:119:6: error: no previous prototype for ‘ppc_fadvise64_64’ Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/include/asm/asm-prototypes.h | 4 ++++ 1 file changed, 4 insertions(+) commit b0d876da1d1cd33a1c28049512a136e61d0ff371 Author: Mathieu Malaterre Date: Sun Feb 25 18:22:34 2018 +0100 powerpc: Add missing prototypes for hw_breakpoint_handler() & arch_unregister_hw_breakpoint() In commit 5aae8a537080 ("powerpc, hw_breakpoints: Implement hw_breakpoints for 64-bit server processors") function hw_breakpoint_handler() and arch_unregister_hw_breakpoint() were added without function prototypes in hw_breakpoint.h header. Fix the following warning(s) (treated as error in W=1): arch/powerpc/kernel/hw_breakpoint.c:106:6: error: no previous prototype for ‘arch_unregister_hw_breakpoint’ arch/powerpc/kernel/hw_breakpoint.c:209:5: error: no previous prototype for ‘hw_breakpoint_handler’ Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/include/asm/hw_breakpoint.h | 2 ++ 1 file changed, 2 insertions(+) commit b53875c4b4f212a7a8e505e2d1063500cdc9431e Author: Mathieu Malaterre Date: Sun Feb 25 18:22:33 2018 +0100 powerpc: Add missing prototypes for sys_sigreturn() & sys_rt_sigreturn() Two functions did not have a prototype defined in signal.h header. Fix the following two warnings (treated as errors in W=1): arch/powerpc/kernel/signal_32.c:1135:6: error: no previous prototype for ‘sys_rt_sigreturn’ arch/powerpc/kernel/signal_32.c:1422:6: error: no previous prototype for ‘sys_sigreturn’ Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/kernel/signal.h | 5 +++++ 1 file changed, 5 insertions(+) commit 0d60619e1c0ca20eb26103610349923451827688 Author: Mathieu Malaterre Date: Sun Feb 25 18:22:32 2018 +0100 powerpc: Add missing prototype for sys_debug_setcontext() In commit 81e7009ea46c ("powerpc: merge ppc signal.c and ppc64 signal32.c") the function sys_debug_setcontext was added without a prototype. Fix compilation warning (treated as error in W=1): arch/powerpc/kernel/signal_32.c:1227:5: error: no previous prototype for ‘sys_debug_setcontext’ Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/include/asm/asm-prototypes.h | 4 ++++ 1 file changed, 4 insertions(+) commit 23a6d8b9634897add6ebff32372f34348387b1ee Author: Mathieu Malaterre Date: Sun Feb 25 18:22:31 2018 +0100 powerpc: Add missing prototype for init_IRQ() A function init_IRQ() was added without a prototype declared in header irq.h. Fix the following warning (treated as error in W=1): arch/powerpc/kernel/irq.c:662:13: error: no previous prototype for ‘init_IRQ’ Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/include/asm/irq.h | 1 + 1 file changed, 1 insertion(+) commit f5246862f82f1e16bbf84cda4cddf287672b30fe Author: Mathieu Malaterre Date: Sun Feb 25 18:22:29 2018 +0100 powerpc: Add missing prototype for arch_irq_work_raise() In commit 4f8b50bbbe63 ("irq_work, ppc: Fix up arch hooks") a new function arch_irq_work_raise() was added without a prototype in header irq_work.h. Fix the following warning (treated as error in W=1): arch/powerpc/kernel/time.c:523:6: error: no previous prototype for ‘arch_irq_work_raise’ Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/include/asm/irq_work.h | 1 + 1 file changed, 1 insertion(+) commit fd70d9f96d8182a67e28b99c999157262f2096e9 Author: Mathieu Malaterre Date: Sun Feb 25 18:22:28 2018 +0100 powerpc: Add missing prototype for arch_dup_task_struct() In commit 55ccf3fe3f9a ("fork: move the real prepare_to_copy() users to arch_dup_task_struct()") a new arch_dup_task_struct() was added without a prototype declared in thread_info.h header. Fix the following warning (treated as error in W=1): arch/powerpc/kernel/process.c:1609:5: error: no previous prototype for ‘arch_dup_task_struct’ Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/include/asm/thread_info.h | 1 + 1 file changed, 1 insertion(+) commit 848092faa0c7687a99bf465808f7dae5bb5ca6be Author: Mathieu Malaterre Date: Sun Feb 25 18:22:27 2018 +0100 powerpc: Add missing prototype for time_init() The function time_init did not have a prototype defined in the time.h header. Fix the following warning (treated as error in W=1): arch/powerpc/kernel/time.c:1068:13: error: no previous prototype for ‘time_init’ Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/include/asm/time.h | 1 + 1 file changed, 1 insertion(+) commit 8b604faff7d421904ebd1fa65d642f566f4a6648 Author: Mathieu Malaterre Date: Sun Feb 25 18:22:26 2018 +0100 powerpc: Add missing prototype for hdec_interrupt In commit dabe859ec636 ("powerpc: Give hypervisor decrementer interrupts their own handler") an empty body function was added, but no prototype was declared. Fix warning (treated as error in W=1): arch/powerpc/kernel/time.c:629:6: error: no previous prototype for ‘hdec_interrupt’ Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/include/asm/time.h | 1 + 1 file changed, 1 insertion(+) commit 45b4d27a3897d6094bcf84bc87743954e038620a Author: Mathieu Malaterre Date: Sun Feb 25 18:22:25 2018 +0100 powerpc: Add missing prototype for slb_miss_bad_addr() In commit f0f558b131db ("powerpc/mm: Preserve CFAR value on SLB miss caused by access to bogus address"), the function slb_miss_bad_addr() was added without a prototype. This commit adds it. Fix a warning (treated as error in W=1): arch/powerpc/kernel/traps.c:1498:6: error: no previous prototype for ‘slb_miss_bad_addr’ Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/include/asm/asm-prototypes.h | 1 + 1 file changed, 1 insertion(+) commit 1cdf039bf82a39d816ca4b8161b01c0acfca3e62 Author: Mathieu Malaterre Date: Sun Feb 25 18:22:23 2018 +0100 powerpc/kernel: Make function __giveup_fpu() static __giveup_fpu() is never called outside process.c, so it can be static. That also means we don't need an empty definition in switch_to.h Signed-off-by: Mathieu Malaterre [mpe: Also drop the empty version, rewrite change log] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/switch_to.h | 1 - arch/powerpc/kernel/process.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) commit 8b51e679a54e808bdf1f2cc6552cf25577f0a3ea Author: Mathieu Malaterre Date: Sun Feb 25 18:22:22 2018 +0100 powerpc/embedded6xx: Make functions flipper_pic_init() & ug_udbg_putc() static Change signature of two functions, adding static keyword to prevent the following two warnings (treated as errors on W=1): arch/powerpc/platforms/embedded6xx/flipper-pic.c:135:28: error: no previous prototype for ‘flipper_pic_init’ arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c:172:6: error: no previous prototype for ‘ug_udbg_putc’ Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/platforms/embedded6xx/flipper-pic.c | 2 +- arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 67b464a89c21c9edd45ad15c457bb5f25dadecfd Author: Mathieu Malaterre Date: Sun Feb 25 18:22:19 2018 +0100 powerpc/32: Mark both tmp variables as unused Since the value of `tmp` is never intended to be read, declare both `tmp` variables as unused. Fix warning (treated as error in W=1): arch/powerpc/kernel/signal_32.c: In function ‘sys_swapcontext’: arch/powerpc/kernel/signal_32.c:1048:16: error: variable ‘tmp’ set but not used arch/powerpc/kernel/signal_32.c: In function ‘sys_debug_setcontext’: arch/powerpc/kernel/signal_32.c:1234:16: error: variable ‘tmp’ set but not used Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/kernel/signal_32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 174b701d3dcd14514f869e2bc08ac404b16fdb9d Author: Mathieu Malaterre Date: Sun Feb 25 18:22:17 2018 +0100 powerpc/32: Move the inline keyword at the beginning of function declaration The inline keyword was not at the beginning of the function declaration. Fix the following warning (treated as error in W=1): arch/powerpc/lib/sstep.c:283:1: error: ‘inline’ is not at beginning of declaration static int nokprobe_inline copy_mem_in(u8 *dest, unsigned long ea, int nb, arch/powerpc/lib/sstep.c:388:1: error: ‘inline’ is not at beginning of declaration static int nokprobe_inline copy_mem_out(u8 *dest, unsigned long ea, int nb, Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65e13c202d7826dc3497c32961008db03fb3eb4b Author: Mathieu Malaterre Date: Wed Jan 31 08:54:43 2018 +0100 powerpc/epapr: Move register keyword at the beginning of declaration Fix warning for all register unsigned long (0,3-12) that appear during W=1 compilation: ./arch/powerpc/include/asm/epapr_hcalls.h:479:2: warning: ‘register’ is not at beginning of declaration [-Wold-style-declaration] unsigned long register r[\d] asm("r[\d]"); Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 97c6f25d5828b497e3e802b1f7c70187c88df623 Author: Simon Guo Date: Wed Mar 7 16:46:04 2018 +0800 PCI/hotplug: ppc: correct a php_slot usage after free In pnv_php_unregister_one(), pnv_php_put_slot() might kfree php_slot structure. But there is pci_hp_deregister() after that with php_slot reference. This patch moves pnv_php_put_slot() to the end of function. Signed-off-by: Simon Guo Signed-off-by: Michael Ellerman drivers/pci/hotplug/pnv_php.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ee573e8ef034e687c420cb10911371488d14b10 Author: Balbir Singh Date: Thu Mar 8 11:36:06 2018 +1100 powerpc/powernv/mce: Don't silently restart the machine On MCE the current code will restart the machine with ppc_md.restart(). This case was extremely unlikely since prior to that a skiboot call is made and that resulted in a checkstop for analysis. With newer skiboots, on P9 we don't checkstop the box by default, instead we return back to the kernel to extract useful information at the time of the MCE. While we still get this information, this patch converts the restart to a panic(), so that if configured a dump can be taken and we can track and probably debug the potential issue causing the MCE. Signed-off-by: Balbir Singh Reviewed-by: Nicholas Piggin Reviewed-by: Stewart Smith Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9dbcbfa1fe0c3b556e889ea213a73eb80d74307b Author: Philippe Bergheaud Date: Fri Mar 2 10:56:12 2018 +0100 cxl: read PHB indications from the device tree Configure the P9 XSL_DSNCTL register with PHB indications found in the device tree, or else use legacy hard-coded values. Signed-off-by: Philippe Bergheaud Reviewed-by: Frederic Barrat Reviewed-by: Christophe Lombard Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 2 +- drivers/misc/cxl/cxllib.c | 2 +- drivers/misc/cxl/pci.c | 48 ++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 45 insertions(+), 7 deletions(-) commit d6a90bb83b5084829558788ea5b8818c9be3da63 Author: Philippe Bergheaud Date: Fri Mar 2 10:56:11 2018 +0100 powerpc/powernv: Enable tunneled operations P9 supports PCI tunneled operations (atomics and as_notify). This patch adds support for tunneled operations on powernv, with a new API, to be called by device drivers: pnv_pci_enable_tunnel() Enable tunnel operations, tell driver the 16-bit ASN indication used by kernel. pnv_pci_disable_tunnel() Disable tunnel operations. pnv_pci_set_tunnel_bar() Tell kernel the Tunnel BAR Response address used by driver. This function uses two new OPAL calls, as the PBCQ Tunnel BAR register is configured by skiboot. pnv_pci_get_as_notify_info() Return the ASN info of the thread to be woken up. Signed-off-by: Philippe Bergheaud Reviewed-by: Frederic Barrat Reviewed-by: Christophe Lombard Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal-api.h | 4 +- arch/powerpc/include/asm/opal.h | 2 + arch/powerpc/include/asm/pnv-pci.h | 6 ++ arch/powerpc/platforms/powernv/opal-wrappers.S | 2 + arch/powerpc/platforms/powernv/pci-cxl.c | 8 -- arch/powerpc/platforms/powernv/pci.c | 135 +++++++++++++++++++++++++ 6 files changed, 148 insertions(+), 9 deletions(-) commit 2b74e2a9b39df40a2b489af2d24079617c61ee0e Author: Alistair Popple Date: Fri Mar 2 16:18:45 2018 +1100 powerpc/powernv/npu: Fix deadlock in mmio_invalidate() When sending TLB invalidates to the NPU we need to send extra flushes due to a hardware issue. The original implementation would lock the all the ATSD MMIO registers sequentially before unlocking and relocking each of them sequentially to do the extra flush. This introduced a deadlock as it is possible for one thread to hold one ATSD register whilst waiting for another register to be freed while the other thread is holding that register waiting for the one in the first thread to be freed. For example if there are two threads and two ATSD registers: Thread A Thread B ---------------------- Acquire 1 Acquire 2 Release 1 Acquire 1 Wait 1 Wait 2 Both threads will be stuck waiting to acquire a register resulting in an RCU stall warning or soft lockup. This patch solves the deadlock by refactoring the code to ensure registers are not released between flushes and to ensure all registers are either acquired or released together and in order. Fixes: bbd5ff50afff ("powerpc/powernv/npu-dma: Add explicit flush when sending an ATSD") Signed-off-by: Alistair Popple Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/npu-dma.c | 229 +++++++++++++++++++------------ 1 file changed, 141 insertions(+), 88 deletions(-) commit c554ac91ce2213faa91c51c45423770218cccce3 Author: Christophe Leroy Date: Tue Feb 27 12:25:55 2018 +0100 powerpc/8xx: fix cpm_cascade() dual end of interrupt cpm_cascade() doesn't have to call eoi() as it is already called by handle_fasteoi_irq() And cpm_get_irq() will always return an unsigned int so the test is useless Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/platforms/8xx/m8xx_setup.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 3d4f5f58484c8f86bfd9a97f152db6399d2b88d7 Author: Anshuman Khandual Date: Sat Mar 3 14:54:02 2018 +0530 powerpc/mm: Drop the function native_register_proc_table() This is left over from the segment table implementation and not getting called from any where now. Hence just drop it. Suggested-by: Aneesh Kumar K.V Signed-off-by: Anshuman Khandual Signed-off-by: Michael Ellerman arch/powerpc/mm/hash_native_64.c | 15 --------------- 1 file changed, 15 deletions(-) commit 94322ed8e857e3b2a33cf75118051af9baaa110f Author: Vaibhav Jain Date: Thu Feb 15 21:19:24 2018 +0530 cxl: Check if PSL data-cache is available before issue flush request PSL9D doesn't have a data-cache that needs to be flushed before resetting the card. However when cxl tries to flush data-cache on such a card, it times-out as PSL_Control register never indicates flush operation complete due to missing data-cache. This is usually indicated in the kernel logs with this message: "WARNING: cache flush timed out" To fix this the patch checks PSL_Debug register CDC-Field(BIT:27) which indicates the absence of a data-cache and sets a flag 'no_data_cache' in 'struct cxl_native' to indicate this. When cxl_data_cache_flush() is called it checks the flag and if set bails out early without requesting a data-cache flush operation to the PSL. Signed-off-by: Vaibhav Jain Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 4 ++++ drivers/misc/cxl/native.c | 11 ++++++++++- drivers/misc/cxl/pci.c | 19 +++++++++++++------ 3 files changed, 27 insertions(+), 7 deletions(-) commit 02b63b420223db3e33e19cc0aaf346371e8efe48 Author: Vaibhav Jain Date: Thu Feb 15 11:49:36 2018 +0530 cxl: Remove function write_timebase_ctrl_psl9() for PSL9 For PSL9 the contents of PSL_TB_CTLSTAT register have changed in PSL9 and all of the register is now readonly. Hence we don't need an sl_ops implementation for 'write_timebase_ctrl' for to populate this register for PSL9. Hence this patch removes function write_timebase_ctrl_psl9() and its references from the code. Signed-off-by: Vaibhav Jain Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/pci.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 03ebb419b896e0fb2da3f34b57d45e62cafe4009 Author: Vaibhav Jain Date: Fri Feb 9 09:39:16 2018 +0530 cxl: Enable NORST bit in PSL_DEBUG register for PSL9 We enable the NORST bit by default for debug afu images to prevent reset of AFU trace-data on a PCI link drop. For production AFU images this bit is always ignored and PSL gets reconfigured anyways thereby resetting the trace data. So setting this bit for non-debug images doesn't have any impact. Signed-off-by: Vaibhav Jain Reviewed-by: Christophe Lombard Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman drivers/misc/cxl/pci.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1ff3b404019adf9d605224e1dce0677a0375d274 Author: Vaibhav Jain Date: Sun Mar 4 23:01:32 2018 +0530 powerpc/xmon: Clear all breakpoints when xmon is disabled via debugfs Presently when xmon is disabled by debugfs any existing instruction/data-access breakpoints set are not disabled. This may lead to kernel oops when those breakpoints are hit as the necessary debugger hooks aren't installed. Hence this patch introduces a new function named clear_all_bpt() which is called when xmon is disabled via debugfs. The function will unpatch/clear all the trap and ciabr/dab based breakpoints. Signed-off-by: Vaibhav Jain Reviewed-by: Balbir Singh [mpe: Fix build break when CONFIG_DEBUG_FS=n] Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit e1368d0c9edbc366e45216e7295fd61ae55c2b12 Author: Vaibhav Jain Date: Sun Mar 4 23:00:25 2018 +0530 powerpc/xmon: Setup debugger hooks when first break-point is set Presently sysrq key for xmon('x') is registered during kernel init irrespective of the value of kernel param 'xmon'. Thus xmon is enabled even if 'xmon=off' is passed on the kernel command line. However this doesn't enable the kernel debugger hooks needed for instruction or data breakpoints. Thus when a break-point is hit with xmon=off a kernel oops of the form below is reported: Oops: Exception in kernel mode, sig: 5 [#1] < snip > Trace/breakpoint trap To fix this the patch checks and enables debugger hooks when an instruction or data break-point is set via xmon console. Signed-off-by: Vaibhav Jain Reviewed-by: Balbir Singh [mpe: Just printf directly, no need for static const char[]] Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit b395e55b49ecd56ea28dc629f4ca4c6239fc07c3 Author: Gustavo Romero Date: Mon Mar 5 15:48:55 2018 -0500 selftests/powerpc: Skip tm-unavailable if TM is not enabled Some processor revisions do not support transactional memory, and additionally kernel support can be disabled. In either case the tm-unavailable test should be skipped, otherwise it will fail with a SIGILL. That commit also sets this selftest to be called through the test harness as it's done for other TM selftests. Finally, it avoids using "ping" as a thread name since it's ambiguous and can be confusing when shown, for instance, in a kernel backtrace log. Fixes: 77fad8bfb1d2 ("selftests/powerpc: Check FP/VEC on exception in TM") Signed-off-by: Gustavo Romero Reviewed-by: Cyril Bur Signed-off-by: Michael Ellerman .../testing/selftests/powerpc/tm/tm-unavailable.c | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 58935176ad17976b7a7f6ea25c0ceb2ca4308a30 Author: Mathieu Malaterre Date: Wed Feb 14 22:15:18 2018 +0100 powerpc/via-pmu: Fix section mismatch warning Make the struct via_pmu_driver const to avoid following warning: WARNING: vmlinux.o(.data+0x4739c): Section mismatch in reference from the variable via_pmu_driver to the function .init.text:pmu_init() The variable via_pmu_driver references the function __init pmu_init() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console Signed-off-by: Mathieu Malaterre Suggested-by: Laurent Vivier Reviewed-by: Laurent Vivier Signed-off-by: Michael Ellerman drivers/macintosh/via-pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1373cc31074dff09419d616c2ce911eea624cff5 Author: Sukadev Bhattiprolu Date: Tue Dec 19 17:10:29 2017 -0800 powerpc/powernv/vas: Fix order of cleanup in vas_window_init_dbgdir() Fix the order of cleanup to ensure we free the name buffer in case of an error creating 'hvwc' or 'info' files. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas-debug.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2f65272a2a304ec6aa32ad9a45b1506929406321 Author: Sukadev Bhattiprolu Date: Tue Jan 16 18:50:39 2018 -0800 powerpc/powernv/vas: Remove a stray line in Makefile Remove a bogus line from arch/powerpc/platforms/powernv/Makefile that was added by commit ece4e51 ("powerpc/vas: Export HVWC to debugfs"). Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/Makefile | 1 - 1 file changed, 1 deletion(-) commit 9c96c932871efeabe82fcfdc952f35810484b510 Author: Laurent Dufour Date: Mon Aug 22 18:53:02 2016 +0200 selftest/powerpc: Add test for sigreturn in transaction Ensure that kernel is throwing away the suspended transaction when sigreturn() is called otherwise it if fails to restore the signal frame's TM SPRS. Signed-off-by: Laurent Dufour Reviewed-by: Cyril Bur [mpe: Add have_htm() check, minor formatting, add SPDX tag] Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/tm/Makefile | 2 +- tools/testing/selftests/powerpc/tm/tm-sigreturn.c | 92 +++++++++++++++++++++++ 2 files changed, 93 insertions(+), 1 deletion(-) commit 47d703e1d55f068c737c0c9f0c18f080fb08242b Author: Larry Finger Date: Tue Jan 30 08:23:51 2018 -0600 macintosh: Add module license to ans-lcd In kernel 4.15, the modprobe step on my PowerBook G4 started complaining that there was no module license for ans-lcd. Signed-off-by: Larry Finger Signed-off-by: Michael Ellerman drivers/macintosh/ans-lcd.c | 1 + 1 file changed, 1 insertion(+) commit 2852aab819574fbcd9fa2cba8a263479506c5f70 Merge: 4bd1377 6df3877 Author: Michael Ellerman Date: Tue Mar 13 15:08:41 2018 +1100 Merge two commits from 'kvm-ppc-fixes' into next This merges two commits from the `kvm-ppc-fixes` branch into next, as they fix build breaks we are seeing while testing next. commit 92eb506262a2a3da9aeaece7017e77490da907dd Author: Stephen Kitt Date: Fri Mar 9 23:32:11 2018 +0100 scsi: device_handler: remove VLAs In preparation to enabling -Wvla, remove VLAs and replace them with fixed-length arrays instead. scsi_dh_{alua,emc,rdac} use variable-length array declarations to store command blocks, with the appropriate size as determined by COMMAND_SIZE. This patch replaces these with fixed-sized arrays using MAX_COMMAND_SIZE, so that the array size can be determined at compile time. This was prompted by https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Stephen Kitt Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 8 ++++---- drivers/scsi/device_handler/scsi_dh_emc.c | 2 +- drivers/scsi/device_handler/scsi_dh_rdac.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit e32ec6579f5b3134cb27cc063c17da0bb8cd29c7 Author: Finn Thain Date: Wed Mar 7 17:56:41 2018 +1100 scsi: jazz_esp, sun3x_esp: Pass struct device pointer in dma calls In jazz_esp and sun3x_esp, the esp_driver_ops methods pass esp->dev in dma api calls as if it was a pointer to a struct device. But it actually points to a struct platform_device. Fix this. Cc: Thomas Bogendoerfer Signed-off-by: Finn Thain Reviewed-by: Thomas Bogendoerfer Signed-off-by: Martin K. Petersen drivers/scsi/jazz_esp.c | 2 +- drivers/scsi/sun3x_esp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 40ec66b1bf4352315025b821f7a5aead3d8ea645 Author: Xiang Chen Date: Wed Mar 7 20:25:14 2018 +0800 scsi: hisi_sas: add v3 hw MODULE_DEVICE_TABLE() Export device table of v3 hw to userspace, or auto probe will fail for v3 hw. Also change the module alias to include "pci", instead of "platform". Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 15c38e31c47c0f2cd7e959054258714991a6a2d6 Author: Xiaofei Tan Date: Wed Mar 7 20:25:13 2018 +0800 scsi: hisi_sas: modify some register config for hip08 Do some modifications for register configuring for hip08. In future, to reduce kernel churn with patches to modify registers, any registers which may change between board models (mostly PHY/SERDES related) should be set in ACPI reset handler. Signed-off-by: Xiaofei Tan Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit edafeef4f28ded4ea9ba7876cc35861d43c7b2b1 Author: Xiang Chen Date: Wed Mar 7 20:25:12 2018 +0800 scsi: hisi_sas: Code cleanup and minor bug fixes The patch does some code cleanup and fixes some small bugs: - Correct return status of phy_up_v3_hw() and phy_bcast_v3_hw() - Add static for function phy_get_max_linkrate_v3_hw() - Change exception return status when no reset method - Change magic value to ts->stat in slot_complete_vx_hw() - Remove unnecessary check for dev_is_sata() - Fix some issues of alignment and indents (Authored by Xiaofei Tan in another patch, but added here to be practical) Signed-off-by: Xiaofei Tan Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 14 +++++++------- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 4 +++- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 10 ++++++---- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 28 +++++++++++++++++----------- 4 files changed, 33 insertions(+), 23 deletions(-) commit 6bf6db518cd10ad57e659607d0abece1b81956c6 Author: Xiaofei Tan Date: Wed Mar 7 20:25:11 2018 +0800 scsi: hisi_sas: fix return value of hisi_sas_task_prep() It is an implicit regulation that error code that function returned should be negative. But hisi_sas_task_prep() doesn't follow this. This may cause problems in the upper layer code. For example, in sas_expander.c of libsas, smp_execute_task_sg() may return the number of bytes of underrun. It will be conflicted with the scenaio lldd_execute_task() return an positive error code. This patch change the return value from SAS_PHY_DOWN to -ECOMM in hisi_sas_task_prep(). Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 36996a1e6dff4e5835faeb00ba920ccb9a07aa52 Author: Xiang Chen Date: Wed Mar 7 20:25:10 2018 +0800 scsi: hisi_sas: remove unused variable hisi_sas_devices.running_req The structure element hisi_sas_devices.running_req to count how many commands are active is in effect only ever written in the code, so remove it. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 1 - drivers/scsi/hisi_sas/hisi_sas_main.c | 9 --------- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 3 --- 3 files changed, 13 deletions(-) commit bb9abc4af5449d2a72cda876be950988e8b2b888 Author: Xiaofei Tan Date: Wed Mar 7 20:25:09 2018 +0800 scsi: hisi_sas: increase timer expire of internal abort task The current 110ms expiry time is not long enough for the internal abort task. The reason is that the internal abort task could be blocked in HW if the HW is retrying to set up link. The internal abort task will be executed only when the retry process finished. The maximum time is 5s for the retry of setting up link. So, the timer expire should be more than 5s. This patch increases it from 110ms to 6s. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0006ce29e87ba357f64ee73e92c8aefc270fd315 Author: Xiaofei Tan Date: Wed Mar 7 20:25:08 2018 +0800 scsi: hisi_sas: fix the issue of setting linkrate register It is not right to set the register PROG_PHY_LINK_RATE while PHY is still enabled. So if we want to change PHY linkrate, we need to disable PHY before setting the register PROG_PHY_LINK_RATE, and then start-up PHY. This patch is to fix this issue. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 5 +++-- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 5 +++-- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) commit eba8c20c7178af9673ad842b0f68251c891c8546 Author: Xiaofei Tan Date: Wed Mar 7 20:25:07 2018 +0800 scsi: hisi_sas: fix the issue of link rate inconsistency In sysfs, there are two files about minimum linkrate, and also two files for maximum linkrate. Take maximum linkrate example, maximum_linkrate_hw is read-only and indicated by the register HARD_PHY_LINKRATE, and maximum_linkrate is read-write and corresponding to the register PROG_PHY_LINK_RATE. But in the function phy_up_v*_hw(), we get *_linkrate value from HARD_PHY_LINKRATE. It is not right. This patch is to fix this issue. Unreferenced PHY-interrupt enum is also removed for v3 hw. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 2 ++ drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 1 - drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 8 +------- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 13 +------------ 4 files changed, 4 insertions(+), 20 deletions(-) commit 67c2bf23314170a17f2aefec4f0aaa4881b72181 Author: Xiaofei Tan Date: Wed Mar 7 20:25:06 2018 +0800 scsi: hisi_sas: support the property of signal attenuation for v2 hw The register SAS_PHY_CTRL is configured according to signal quality. The signal quality is calculated by signal attenuation of hardware physical link. It may be different for different PCB layout. So, in order to give better support to new board, this patch add support to reading the devicetree property, "hisilicon,signal-attenuation". Of course, we still keep an default value in driver to adapt old board. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 39 +++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit 4c40db995eb54c3ee8cb5a8340640f49395d5f9e Author: Xiaofei Tan Date: Wed Mar 7 20:25:05 2018 +0800 scsi: hisi_sas: dt-bindings: add an property of signal attenuation For some new boards with hip07 chipset we are required to set PHY config registers differently. The hw property which determines how to set these registers is in the PHY signal attenuation readings. This patch add an devicetree property, "hisilicon,signal-attenuation", which is used to describe the signal attenuation of an board. Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Reviewed-by: Rob Herring Signed-off-by: Martin K. Petersen Documentation/devicetree/bindings/scsi/hisilicon-sas.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit 1875ede02ed5e176a18dccbca84abc28d5b3e141 Author: Douglas Gilbert Date: Tue Mar 6 22:19:49 2018 -0500 scsi: core: Make SCSI Status CONDITION MET equivalent to GOOD The SCSI PRE-FETCH (10 or 16) command is present both on hard disks and some SSDs. It is useful when the address of the next block(s) to be read is known but it is not following the LBA of the current READ (so read-ahead won't help). It returns two "good" SCSI Status values. If the requested blocks have fitted (or will most likely fit (when the IMMED bit is set)) into the disk's cache, it returns CONDITION MET. If it didn't (or will not) fit then it returns GOOD status. The goal of this patch is to stop the SCSI subsystem treating the CONDITION MET SCSI status as an error. The current state makes the PRE-FETCH command effectively unusable via pass-throughs. Signed-off-by: Douglas Gilbert Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 11 +++++++++++ include/scsi/scsi.h | 2 ++ 2 files changed, 13 insertions(+) commit 217c55cd0cea8f03a5ef2faf68681bb10ae22573 Author: James Smart Date: Mon Mar 5 12:04:10 2018 -0800 scsi: lpfc: Change Copyright of 12.0.0.1 modified files to 2018 Updated Copyright in files updated as part of 12.0.0.1 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.h | 2 +- drivers/scsi/lpfc/lpfc_scsi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit cb942d8e50d31ef9fa883c26b07a49916f0c190b Author: James Smart Date: Mon Mar 5 12:04:09 2018 -0800 scsi: lpfc: update driver version to 12.0.0.1 Update the driver version to 12.0.0.1 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f44ac12f1dcccf4a6315cbe34129adb7aa8497ba Author: James Smart Date: Mon Mar 5 12:04:08 2018 -0800 scsi: lpfc: Memory allocation error during driver start-up on power8 The driver fails to allocate command buffers in the routine lpfc_new_scsi_buf_s4 There is an inconsistency between lpfc_mem_alloc(), where the phba->lpfc_sg_dma_buf_pool is created, and lpfc_new_scsi_buf_s4(), when we allocate a buffer from the pool and check the alignment. The alignment should be on a page boundary, based on LPFC_SLI3_BG_ENABLED in sli3_options, for both cases. Fix by explicitly tracking sli4 vs sli3 and BG options. The result is that phba->cfg_sg_dma_buf_size is now set correctly for SLI-4. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 4 ++++ drivers/scsi/lpfc/lpfc_init.c | 2 +- drivers/scsi/lpfc/lpfc_scsi.c | 7 ++++++- drivers/scsi/lpfc/lpfc_sli.c | 19 ++++++++++--------- 4 files changed, 21 insertions(+), 11 deletions(-) commit e29d74f8eb1450b0b6c4736210d76cb56ef40e1d Author: James Smart Date: Mon Mar 5 12:04:07 2018 -0800 scsi: lpfc: Fix mailbox wait for POST_SGL mbox command POST_SGL_PAGES mailbox command failed with status (timeout). wait_event_interruptible_timeout when called from mailbox wait interface, gets interrupted, and will randomly fail. Behavior seems very specific to 1 particular server type. Fix by changing from wait_event_interruptible_timeout to wait_for_completion_timeout. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 34 ++++++++++++---------------------- drivers/scsi/lpfc/lpfc_sli.h | 1 + 2 files changed, 13 insertions(+), 22 deletions(-) commit a3da825b499f495f959052b848e893550ddaf626 Author: James Smart Date: Mon Mar 5 12:04:06 2018 -0800 scsi: lpfc: Fix SCSI lun discovery when port configured for both SCSI and NVME When a port is configured for NVME and SCSI Initiator support and it probes a target supporting both SCSI and NVME, NVME devices are discovered, but SCSI devices are not. The nlp_fc4_type for all NPorts should be cleared on Link Up or just before GID_FTs get issued, as opposed to just during GID_FT cmpl. RSCN activity as well as Link Up can trigger GID_FT. One GID_FT may complete before the next one is issued. Fix by clearng nlp_fc4_type on link up and just before both GID_FTs are issued. During port swapping, copy nlp_fc4_type to the new ndlp Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_ct.c | 1 - drivers/scsi/lpfc/lpfc_els.c | 1 + drivers/scsi/lpfc/lpfc_hbadisc.c | 5 +++++ 3 files changed, 6 insertions(+), 1 deletion(-) commit bd3061bab3328db40d5d27491fa07a030a12e153 Author: James Smart Date: Mon Mar 5 12:04:05 2018 -0800 scsi: lpfc: Streamline NVME Targe6t WQE setup To reduce latency when initializing WQE content, created templates for the most common wqes. This reduces the number of operations taken to set the content. It's not a lot of speed up, but every bit helps. This patch updates the NVME target path. [mkp: fixed typo] Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_crtn.h | 1 + drivers/scsi/lpfc/lpfc_init.c | 1 + drivers/scsi/lpfc/lpfc_nvmet.c | 293 ++++++++++++++++++++++++++--------------- 3 files changed, 191 insertions(+), 104 deletions(-) commit 5fd1108517d9c75eab828e7b1d6d541eee2857f8 Author: James Smart Date: Mon Mar 5 12:04:04 2018 -0800 scsi: lpfc: Streamline NVME Initiator WQE setup To reduce latency when initializing WQE content, create templates for the most common wqes. This reduces the number of operations taken to set the content. It's not a lot of speed up, but every bit helps. This patch updates the NVME initiator path. [mkp: fixed typo] Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_crtn.h | 1 + drivers/scsi/lpfc/lpfc_hw4.h | 1 + drivers/scsi/lpfc/lpfc_init.c | 1 + drivers/scsi/lpfc/lpfc_nvme.c | 327 ++++++++++++++++++++++++++---------------- 4 files changed, 203 insertions(+), 127 deletions(-) commit 205e8240a1b42d32c08b0fae5778cbaa336c9c7f Author: James Smart Date: Mon Mar 5 12:04:03 2018 -0800 scsi: lpfc: Code cleanup for 128byte wqe data type The driver is very sloppy about the WQE structure passed between routines. The base struct type is a 64byte wqe. But in many routines they typecast and access 128byte wqes. There were a couple of cases in the past (corrected already) where the typecasts were incorrectly done and the 64byte buffer was accessed as a 128 byte buffer. Clean this up by properly declaring wqe's as 128byte wqe's and removing the typecasts. 64byte wqes are considered a subset of the 128byte wqes. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_hw4.h | 11 +++++-- drivers/scsi/lpfc/lpfc_nvme.c | 25 +++++++------- drivers/scsi/lpfc/lpfc_nvmet.c | 12 +++---- drivers/scsi/lpfc/lpfc_sli.c | 74 ++++++++++++++++++------------------------ drivers/scsi/lpfc/lpfc_sli.h | 5 ++- 5 files changed, 61 insertions(+), 66 deletions(-) commit 0709263abe0de70a798dcdf481d5dd489ca4752e Author: James Smart Date: Mon Mar 5 12:04:02 2018 -0800 scsi: lpfc: Fix NVME Initiator FirstBurst First Burst support was not properly indicated in NVMe PRLI. Correct the bit position and the logic to check and set first burst support. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nportdisc.c | 15 ++++++++++++++- drivers/scsi/lpfc/lpfc_nvme.h | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) commit 917d59ac5e26a45dce8b00d38bb0a338a7f22f23 Author: James Smart Date: Sat Mar 10 10:28:48 2018 -0800 scsi: lpfc: Add missing unlock in WQ full logic Commit 6e8e1c14c61e ("scsi: lpfc: Add WQ Full Logic for NVME Target") fails the static checker. Checker correctly identified a missing unlock on a return path. Add the unlock. Fixes: 6e8e1c14c61e ("scsi: lpfc: Add WQ Full Logic for NVME Target") Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 1 + 1 file changed, 1 insertion(+) commit 8b1bb6dcba76b0fceffff77a25e990f30b10d139 Author: Souptick Joarder Date: Thu Mar 8 18:41:57 2018 +0530 scsi: ipr: Use dma_pool_zalloc() Use dma_pool_zalloc() instead of dma_pool_alloc + memset Signed-off-by: Souptick Joarder Acked-by: Brian King Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9ba32046fc2d19697e1a208ce81663239e78e41f Author: Roman Mashak Date: Mon Mar 12 16:07:02 2018 -0400 tc-testing: updated gact tests with batch test cases Signed-off-by: Roman Mashak Signed-off-by: David S. Miller .../tc-testing/tc-tests/actions/gact.json | 73 +++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) commit 08486add3a8d22cd3e41cb59028fc397abdcb279 Author: Roman Mashak Date: Mon Mar 12 16:06:37 2018 -0400 tc-testing: add TC vlan action tests Signed-off-by: Roman Mashak Signed-off-by: David S. Miller .../tc-testing/tc-tests/actions/vlan.json | 410 +++++++++++++++++++++ 1 file changed, 410 insertions(+) commit a5510399e9535b9348adb70c09faa3de51541f9b Author: Leonard Crestez Date: Mon Mar 12 16:59:25 2018 +0200 clk: imx6ull: Add epdc_podf instead of sim_podf This is one of the differences between 6ul and 6ull: imx6ull has no sim but has epdc and this clock is redefined on the same bit. This can be verified in the Reference Manuals. Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx6ul.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c69851e940bcdaf202d20ca7099145d9b7ec7368 Author: Heiner Kallweit Date: Sun Mar 11 15:00:37 2018 +0100 net: phy: set link state to down when creating the phy_device Currently the link state is initialized to "up" when the phy_device is being created. This is not consistent with the phy state being initialized to PHY_DOWN. Usually this doen't do any harm because the link state is updated once the PHY reaches state PHY_AN. However e.g. if a LAN port isn't used and the PHY remains down this inconsistency remains and calls to functions like phy_print_status() give false results. Therefore change the initialization to link being down. Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6a06cbbb5f7fd03589cff9178314af04c568826 Author: Chao Yu Date: Wed Feb 28 17:07:27 2018 +0800 f2fs: support hot file extension This patch supports to recognize hot file extension in f2fs, so that we can allocate proper hot segment location for its data, which can lead to better hot/cold seperation in filesystem. In addition, we changes a bit on query/add/del operation method for extension_list sysfs entry as below: - Query: cat /sys/fs/f2fs//extension_list - Add: echo 'extension' > /sys/fs/f2fs//extension_list - Del: echo '!extension' > /sys/fs/f2fs//extension_list - Add: echo '[h/c]extension' > /sys/fs/f2fs//extension_list - Del: echo '[h/c]!extension' > /sys/fs/f2fs//extension_list - [h] means add/del hot file extension - [c] means add/del cold file extension Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++- fs/f2fs/f2fs.h | 6 ++- fs/f2fs/namei.c | 79 ++++++++++++++++++++++++--------- fs/f2fs/segment.c | 3 +- fs/f2fs/sysfs.c | 30 ++++++++++--- include/linux/f2fs_fs.h | 3 +- 6 files changed, 96 insertions(+), 31 deletions(-) commit 1dc0f8991d4d93194fb7a3ac3164e05e8b24ad02 Author: Chao Yu Date: Tue Feb 27 22:45:24 2018 +0800 f2fs: fix to avoid race in between atomic write and background GC Sqlite user Background GC - move_data_block : move page #1 - f2fs_is_atomic_file - f2fs_ioc_start_atomic_write - f2fs_ioc_commit_atomic_write - commit_inmem_pages : commit page #1 & set node #2 dirty - f2fs_submit_page_write - f2fs_update_data_blkaddr - set_page_dirty : set node #2 dirty - f2fs_do_sync_file - fsync_node_pages : commit node #1 & node #2, then sudden power-cut In a race case, we may check FI_ATOMIC_FILE flag before starting atomic write flow, then we will commit meta data before data with reversed order, after a sudden pow-cut, database transaction will be inconsistent. So we'd better to exclude gc/atomic_write to each other by using lock instead of flag checking. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 3 +++ 1 file changed, 3 insertions(+) commit b27bc8091ccf22f66ab105d10fa4f5cdeaef05a2 Author: Jaegeuk Kim Date: Mon Feb 26 15:40:30 2018 -0800 f2fs: do gc in greedy mode for whole range if gc_urgent mode is set Otherwise, f2fs conducts GC on 8GB range only based on slow cost-benefit. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit dee02f0d62fcb5033fe26f86941b9e3bdc450b74 Author: Jaegeuk Kim Date: Thu Feb 22 23:30:55 2018 -0800 f2fs: issue discard aggressively in the gc_urgent mode This patch avoids to skip discard commands when user sets gc_urgent mode. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 782911f491e72857d67e93661580cf32e67df7b5 Author: Jaegeuk Kim Date: Sun Feb 25 01:04:57 2018 -0800 f2fs: set readdir_ra by default It gives general readdir improvement. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 1 + 1 file changed, 1 insertion(+) commit 84b89e5d943d8d6b997fcebb4609373e1b3e4b03 Author: Jaegeuk Kim Date: Thu Feb 22 14:09:30 2018 -0800 f2fs: add auto tuning for small devices If f2fs is running on top of very small devices, it's worth to avoid abusing free LBAs. In order to achieve that, this patch introduces some parameter tuning. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.h | 2 ++ fs/f2fs/super.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) commit 079396270b0f1e98496ef7672dd754bdd42574dc Author: Jaegeuk Kim Date: Sun Feb 18 08:50:49 2018 -0800 f2fs: add mount option for segment allocation policy This patch adds an mount option, "alloc_mode=%s" having two options, "default" and "reuse". In "alloc_mode=reuse" case, f2fs starts to allocate segments from 0'th segment all the time to reassign segments. It'd be useful for small-sized eMMC parts. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.txt | 2 ++ fs/f2fs/f2fs.h | 8 ++++++++ fs/f2fs/segment.c | 5 +++++ fs/f2fs/super.c | 26 ++++++++++++++++++++++++++ 4 files changed, 41 insertions(+) commit 69babac019337b35aae5644ccf8089243c749d4c Author: Jaegeuk Kim Date: Mon Feb 26 09:19:47 2018 -0800 f2fs: don't stop GC if GC is contended Let's do GC as much as possible, while gc_urgent is set. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 846ae671ad368e344a2b141c0f19e1014b27a0dd Author: Chao Yu Date: Mon Feb 26 22:04:13 2018 +0800 f2fs: expose extension_list sysfs entry This patch adds a sysfs entry 'extension_list' to support query/add/del item in extension list. Query: cat /sys/fs/f2fs//extension_list Add: echo 'extension' > /sys/fs/f2fs//extension_list Del: echo '!extension' > /sys/fs/f2fs//extension_list Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 9 +++++++ fs/f2fs/f2fs.h | 4 +++- fs/f2fs/file.c | 4 ++-- fs/f2fs/namei.c | 42 ++++++++++++++++++++++++++++++--- fs/f2fs/super.c | 2 +- fs/f2fs/sysfs.c | 40 +++++++++++++++++++++++++++++++ include/linux/f2fs_fs.h | 3 ++- 7 files changed, 96 insertions(+), 8 deletions(-) commit 17cd07ae95073c298af92c1ba14ac58ce84de33b Author: Chao Yu Date: Sun Feb 25 23:38:21 2018 +0800 f2fs: fix to set KEEP_SIZE bit in f2fs_zero_range As Jayashree Mohan reported: A simple workload to reproduce this would be : 1. create foo 2. Write (8K - 16K) // foo size = 16K now 3. fsync() 4. falloc zero_range , keep_size (4202496 - 4210688) // foo size must be 16K 5. fdatasync() Crash now On recovery, we see that the file size is 4210688 and not 16K, which violates the semantics of keep_size flag. We have a test case to reproduce this using CrashMonkey on 4.15 kernel. Try this out by simply running : ./c_harness -f /dev/sda -d /dev/cow_ram0 -t f2fs -e 102400 -P -v tests/generic_468_zero.so The root cause is that we miss to set KEEP_SIZE bit correctly in zero_range when zeroing block cross EOF with FALLOC_FL_KEEP_SIZE, let's fix this missing case. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d0d3f1b329b01a9e16609eeadcc6d4fae0afc7c8 Author: Chao Yu Date: Sun Feb 11 22:53:20 2018 +0800 f2fs: introduce sb_lock to make encrypt pwsalt update exclusive f2fs_super_block.encrypt_pw_salt can be udpated and persisted concurrently, result in getting different pwsalt in separated threads, so let's introduce sb_lock to exclude concurrent accessers. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 1 + fs/f2fs/file.c | 19 +++++++++++-------- fs/f2fs/super.c | 2 ++ 3 files changed, 14 insertions(+), 8 deletions(-) commit 8fe326cb996f89bac50cee2fdb4febfcca6eb297 Author: Colin Ian King Date: Wed Feb 21 18:13:40 2018 +0000 f2fs: remove redundant initialization of pointer 'p' Pointer p is initialized with a value that is never read and is later re-assigned a new value, hence the initialization is redundant and can be removed. Cleans up clang warning: fs/f2fs/extent_cache.c:463:19: warning: Value stored to 'p' during its initialization is never read Signed-off-by: Colin Ian King Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46706d5917f4457a6befe7a39a15c89dbb1ce9ca Author: Gao Xiang Date: Sat Feb 10 12:12:51 2018 +0800 f2fs: flush cp pack except cp pack 2 page at first Previously, we attempt to flush the whole cp pack in a single bio, however, when suddenly powering off at this time, we could get into an extreme scenario that cp pack 1 page and cp pack 2 page are updated and latest, but payload or current summaries are still partially outdated. (see reliable write in the UFS specification) This patch submits the whole cp pack except cp pack 2 page at first, and then writes the cp pack 2 page with an extra independent bio with pre-io barrier. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 69 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 23 deletions(-) commit ccd31cb28ff2113a2de96ebf19a02b3c920b9fd1 Author: Sheng Yong Date: Tue Feb 6 12:31:17 2018 +0800 f2fs: clean up f2fs_sb_has_xxx functions This patch introduces F2FS_FEATURE_FUNCS to clean up the definitions of different f2fs_sb_has_xxx functions. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 2 +- fs/f2fs/f2fs.h | 51 +++++++++++++-------------------------------------- fs/f2fs/file.c | 6 +++--- fs/f2fs/segment.c | 4 ++-- fs/f2fs/super.c | 14 +++++++------- fs/f2fs/sysfs.c | 4 ++-- 6 files changed, 28 insertions(+), 53 deletions(-) commit 3bb09a0e7e807e2cb7a97e35d5075d0d82bd4085 Author: Tiezhu Yang Date: Tue Feb 6 08:21:45 2018 +0800 f2fs: remove redundant check of page type when submit bio This patch removes redundant check of page type when submit bio to make the logic more clear. Signed-off-by: Tiezhu Yang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit fb0e72c8b94903be3a7e742ab0a4b53b89e7ee35 Author: Chao Yu Date: Sat Feb 3 17:44:39 2018 +0800 f2fs: fix to handle looped node chain during recovery There is no checksum in node block now, so bit-transition from hardware can make node_footer.next_blkaddr being corrupted w/o any detection, result in node chain becoming looped one. For this condition, during recovery, in order to avoid running into dead loop, let's detect it and just skip out. Signed-off-by: Yunlei He Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/recovery.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 0f9ec2a8f65d72a454e99fb4f7351d7e01070385 Author: Jaegeuk Kim Date: Wed Feb 7 17:01:48 2018 -0800 f2fs: handle quota for orphan inodes This is to detect dquot_initialize errors early from evict_inode for orphan inodes. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 8b3a0ca0fde161c9716d4f0e8d81bf30fc004604 Author: Hyunchul Lee Date: Wed Jan 31 11:36:59 2018 +0900 f2fs: Add the 'whint_mode' mount option to f2fs documentation Signed-off-by: Hyunchul Lee Reviewed-by: Chao Yu [Jaegeuk Kim: Add the write-hint policy in f2fs doc.] Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.txt | 66 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit f2e703f9a3caa91e4f3f0a8f5d3fe92dbea05623 Author: Hyunchul Lee Date: Wed Jan 31 11:36:58 2018 +0900 f2fs: support passing down write hints to block layer with F2FS policy Add 'whint_mode=fs-based' mount option. In this mode, F2FS passes down write hints with its policy. * whint_mode=fs-based. F2FS passes down hints with its policy. User F2FS Block ---- ---- ----- META WRITE_LIFE_MEDIUM; HOT_NODE WRITE_LIFE_NOT_SET WARM_NODE " COLD_NODE WRITE_LIFE_NONE ioctl(COLD) COLD_DATA WRITE_LIFE_EXTREME extension list " " -- buffered io WRITE_LIFE_EXTREME COLD_DATA WRITE_LIFE_EXTREME WRITE_LIFE_SHORT HOT_DATA WRITE_LIFE_SHORT WRITE_LIFE_NOT_SET WARM_DATA WRITE_LIFE_LONG WRITE_LIFE_NONE " " WRITE_LIFE_MEDIUM " " WRITE_LIFE_LONG " " -- direct io WRITE_LIFE_EXTREME COLD_DATA WRITE_LIFE_EXTREME WRITE_LIFE_SHORT HOT_DATA WRITE_LIFE_SHORT WRITE_LIFE_NOT_SET WARM_DATA WRITE_LIFE_NOT_SET WRITE_LIFE_NONE " WRITE_LIFE_NONE WRITE_LIFE_MEDIUM " WRITE_LIFE_MEDIUM WRITE_LIFE_LONG " WRITE_LIFE_LONG Many thanks to Chao Yu and Jaegeuk Kim for comments to implement this patch. Signed-off-by: Hyunchul Lee Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 1 + fs/f2fs/segment.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++--------- fs/f2fs/super.c | 5 +++++ 3 files changed, 54 insertions(+), 9 deletions(-) commit 0cdd31953967b25c216ddcb630ec9a6bb8a91371 Author: Hyunchul Lee Date: Wed Jan 31 11:36:57 2018 +0900 f2fs: support passing down write hints given by users to block layer Add the 'whint_mode' mount option that controls which write hints are passed down to block layer. There are "off" and "user-based" mode. The default mode is "off". 1) whint_mode=off. F2FS only passes down WRITE_LIFE_NOT_SET. 2) whint_mode=user-based. F2FS tries to pass down hints given by users. User F2FS Block ---- ---- ----- META WRITE_LIFE_NOT_SET HOT_NODE " WARM_NODE " COLD_NODE " ioctl(COLD) COLD_DATA WRITE_LIFE_EXTREME extension list " " -- buffered io WRITE_LIFE_EXTREME COLD_DATA WRITE_LIFE_EXTREME WRITE_LIFE_SHORT HOT_DATA WRITE_LIFE_SHORT WRITE_LIFE_NOT_SET WARM_DATA WRITE_LIFE_NOT_SET WRITE_LIFE_NONE " " WRITE_LIFE_MEDIUM " " WRITE_LIFE_LONG " " -- direct io WRITE_LIFE_EXTREME COLD_DATA WRITE_LIFE_EXTREME WRITE_LIFE_SHORT HOT_DATA WRITE_LIFE_SHORT WRITE_LIFE_NOT_SET WARM_DATA WRITE_LIFE_NOT_SET WRITE_LIFE_NONE " WRITE_LIFE_NONE WRITE_LIFE_MEDIUM " WRITE_LIFE_MEDIUM WRITE_LIFE_LONG " WRITE_LIFE_LONG Many thanks to Chao Yu and Jaegeuk Kim for comments to implement this patch. Signed-off-by: Hyunchul Lee Reviewed-by: Chao Yu [Jaegeuk Kim: avoid build warning] [Chao Yu: fix to restore whint_mode in ->remount_fs] Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 26 +++++++++++++++++++----- fs/f2fs/f2fs.h | 9 +++++++++ fs/f2fs/segment.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/f2fs/super.c | 31 ++++++++++++++++++++++++++++- 4 files changed, 119 insertions(+), 6 deletions(-) commit cd36d7a17f9da68be9aa67185ba3ad7969934a19 Author: Chao Yu Date: Wed Jan 31 09:30:34 2018 +0800 f2fs: fix to clear CP_TRIMMED_FLAG Once CP_TRIMMED_FLAG is set, after a reboot, we will never issue discard before LBA becomes invalid again, fix it by clearing the flag in checkpoint without CP_TRIMMED reason. Fixes: 1f43e2ad7bff ("f2fs: introduce CP_TRIMMED_FLAG to avoid unneeded discard") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 2 ++ 1 file changed, 2 insertions(+) commit 199bc3fef29cacf672e7e5cd49d296c1fdc1a891 Author: Chao Yu Date: Thu Jan 25 19:40:08 2018 +0800 f2fs: support large nat bitmap Previously, we will store all nat version bitmap in checkpoint pack block, so our total node entry number has a limitation which caused total node number can not exceed (3900 * 8) block * 455 node/block = 14196000. So that once user wants to create more nodes in large size image, it becomes a bottleneck, that's unreasonable. This patch detects the new layout of nat/sit version bitmap in image in order to enable supporting large nat bitmap. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 6 ++++++ include/linux/f2fs_fs.h | 1 + 2 files changed, 7 insertions(+) commit bf617f7a92edc6bb2909db2bfa4576f50b280ee5 Author: Chao Yu Date: Sat Jan 27 17:29:49 2018 +0800 f2fs: fix to check extent cache in f2fs_drop_extent_tree If noextent_cache mount option is on, we will never initialize extent tree in inode, but still we're going to access it in f2fs_drop_extent_tree, result in kernel panic as below: BUG: unable to handle kernel NULL pointer dereference at 0000000000000038 IP: _raw_write_lock+0xc/0x30 Call Trace: ? f2fs_drop_extent_tree+0x41/0x70 [f2fs] f2fs_fallocate+0x5a0/0xdd0 [f2fs] ? common_file_perm+0x47/0xc0 ? apparmor_file_permission+0x1a/0x20 vfs_fallocate+0x15b/0x290 SyS_fallocate+0x44/0x70 do_syscall_64+0x6e/0x160 entry_SYSCALL64_slow_path+0x25/0x25 This patch fixes to check extent cache status before using in f2fs_drop_extent_tree. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 3 +++ 1 file changed, 3 insertions(+) commit 4d817ae099883b08fddd46dee3a916bbf93e9161 Author: Chao Yu Date: Sat Jan 27 17:29:48 2018 +0800 f2fs: restrict inline_xattr_size configuration This patch limits to enable inline_xattr_size mount option only if both extra_attr and flexible_inline_xattr feature is on in current image. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b94929d975c8423defc9aededb0f499ff936b509 Author: Yunlong Song Date: Mon Jan 29 11:37:45 2018 +0800 f2fs: fix heap mode to reset it back Commit 7a20b8a61eff81bdb7097a578752a74860e9d142 ("f2fs: allocate node and hot data in the beginning of partition") introduces another mount option, heap, to reset it back. But it does not do anything for heap mode, so fix it. Cc: stable@vger.kernel.org Signed-off-by: Yunlong Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 5 +++-- fs/f2fs/segment.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) commit 0964fc1a82a310c2effb6722446b9cc86db55aa3 Author: Sheng Yong Date: Mon Jan 29 19:13:15 2018 +0800 f2fs: fix potential corruption in area before F2FS_SUPER_OFFSET sb_getblk does not guarantee the buffer head is uptodate. If bh is not uptodate, the data (may be used as boot code) in area before F2FS_SUPER_OFFSET may get corrupted when super block is committed. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit bdbc90fa55af632f8a883a3d93c54a08708ed80a Author: Yunlong Song Date: Wed Feb 28 20:31:52 2018 +0800 f2fs: don't put dentry page in pagecache into highmem Previous dentry page uses highmem, which will cause panic in platforms using highmem (such as arm), since the address space of dentry pages from highmem directly goes into the decryption path via the function fscrypt_fname_disk_to_usr. But sg_init_one assumes the address is not from highmem, and then cause panic since it doesn't call kmap_high but kunmap_high is triggered at the end. To fix this problem in a simple way, this patch avoids to put dentry page in pagecache into highmem. Signed-off-by: Yunlong Song Reviewed-by: Chao Yu [Jaegeuk Kim: fix coding style] Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 23 +++++------------------ fs/f2fs/f2fs.h | 6 ------ fs/f2fs/inline.c | 3 +-- fs/f2fs/inode.c | 2 +- fs/f2fs/namei.c | 32 ++++++++------------------------ fs/f2fs/recovery.c | 11 +++++------ include/linux/f2fs_fs.h | 1 - 7 files changed, 20 insertions(+), 58 deletions(-) commit 3746fd75cbb7ccfa79d330859354754263268653 Author: Florian Fainelli Date: Tue Feb 27 12:45:19 2018 -0800 ARM: dts: NSP: Switch to port 8 for CPU port Now that we have added support for pre-pended Broadcom tags with commit 11606039604c ("net: dsa: b53: Support prepended Broadcom tags") we can switch all the Northstar Plus reference boards to use port 8 for the CPU port. This allows us to prepare room for supporting the Flow Accelerator 2 NAPT offload, and frees up port 5 to be made fully configurable for the modes that it supports: internal, SGMII, RGMII etc. Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm958622hr.dts | 6 +++--- arch/arm/boot/dts/bcm958623hr.dts | 6 +++--- arch/arm/boot/dts/bcm958625hr.dts | 6 +++--- arch/arm/boot/dts/bcm958625k.dts | 6 +++--- arch/arm/boot/dts/bcm988312hr.dts | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) commit f5edaefee2d621f4e7628f1421c58a2361572d3a Author: Jerome Brunet Date: Wed Feb 14 14:43:40 2018 +0100 clk: qcom: use divider_ro_round_rate helper There is now an helper function to round the rate when the divider is read-only. Let's use it Signed-off-by: Jerome Brunet Signed-off-by: Michael Turquette Signed-off-by: Stephen Boyd drivers/clk/qcom/clk-regmap-divider.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit b15ee490e16324c35b51f04bad54ae45a2cefd29 Author: Jerome Brunet Date: Wed Feb 14 14:43:39 2018 +0100 clk: divider: read-only divider can propagate rate change When a divider clock has CLK_DIVIDER_READ_ONLY set, it means that the register shall be left un-touched, but it does not mean the clock should stop rate propagation if CLK_SET_RATE_PARENT is set This is properly handled in qcom clk-regmap-divider but it was not in the generic divider To fix this situation, introduce a new helper function divider_ro_round_rate, on the same model as divider_round_rate. Fixes: e6d5e7d90be9 ("clk-divider: Fix READ_ONLY when divider > 1") Signed-off-by: Jerome Brunet Tested-By: David Lechner Signed-off-by: Michael Turquette Signed-off-by: Stephen Boyd drivers/clk/clk-divider.c | 36 ++++++++++++++++++++++++++++++------ include/linux/clk-provider.h | 15 +++++++++++++++ 2 files changed, 45 insertions(+), 6 deletions(-) commit fe3f338f0cb2ed4d4f06da054c21ae2f8a36ef2d Author: Jerome Brunet Date: Wed Feb 14 14:43:38 2018 +0100 clk: fix mux clock documentation The mux documentation mentions the non-existing parameter width instead of mask, so just sed this. The table field is missing in the documentation of clk_mux. Add a small blurb explaining what it is Fixes: 9d9f78ed9af0 ("clk: basic clock hardware types") Signed-off-by: Jerome Brunet Signed-off-by: Michael Turquette Signed-off-by: Stephen Boyd include/linux/clk-provider.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 541debae0adf0bee96137724fa1ce81d3102d14c Author: Jerome Brunet Date: Wed Feb 14 14:43:37 2018 +0100 clk: call the clock init() callback before any other ops callback Some clocks may need to initialize things, whatever it is, before being able to properly operate. Move the .init() call before any other callback, such recalc_rate() or get_phase(), so the clock is properly setup before being used. Signed-off-by: Jerome Brunet Signed-off-by: Michael Turquette Signed-off-by: Stephen Boyd drivers/clk/clk.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 77deb66d262f8512130ff75ec5ea8e31070b41ed Author: Jerome Brunet Date: Wed Feb 14 14:43:34 2018 +0100 clk: mux: add helper function for index/value translation Add helper functions for the translation between parent index and register value in the generic multiplexer function. The purpose of this change is avoid duplicating the code in other clock providers, using the same generic logic. Signed-off-by: Jerome Brunet Signed-off-by: Michael Turquette Signed-off-by: Stephen Boyd drivers/clk/clk-mux.c | 75 +++++++++++++++++++++++++------------------- include/linux/clk-provider.h | 4 +++ 2 files changed, 47 insertions(+), 32 deletions(-) commit e6d3cc7b1fac3d7f1313faf8ac9b23830113e3ec Author: Jerome Brunet Date: Wed Feb 14 14:43:33 2018 +0100 clk: divider: export clk_div_mask() helper Export clk_div_mask() in clk-provider header so every clock providers derived from the generic clock divider may share the definition instead of redefining it. Signed-off-by: Jerome Brunet Signed-off-by: Michael Turquette Signed-off-by: Stephen Boyd drivers/clk/clk-divider.c | 24 +++++++++++------------- include/linux/clk-provider.h | 1 + 2 files changed, 12 insertions(+), 13 deletions(-) commit c4e50b1d87fbbeabb2d7f286af673666f507acb9 Author: Fabio Estevam Date: Mon Mar 12 18:28:09 2018 -0300 ASoC: sgtl5000: Pass the required '#sound-dai-cells' DTC now warns about missing #sound-dai-cells: arch/arm/boot/dts/imx6ul-geam.dtb: Warning (sound_dai_property): /sound/simple-audio-card,codec: Missing property '#sound-dai-cells' in node /soc/aips-bus@2100000/i2c@21a0000/codec@a or bad phandle (referred from sound-dai[0]) Pass the required '#sound-dai-cells' property to improve the documentation. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/sgtl5000.txt | 3 +++ 1 file changed, 3 insertions(+) commit 83f7e38906f19614c493ad494611e3116ed26554 Merge: b2c9272 b03254d Author: David S. Miller Date: Mon Mar 12 17:30:02 2018 -0400 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2018-03-12 This series contains updates to ixgbe and ixgbevf only. Shannon Nelson provides three fixes to the ipsec portion of ixgbe. Make sure we are using 128-bit authentication, since it is the only size supported for hardware offload. Fixed the transmit trailer length calculation for ipsec by finding the padding value and adding it to the authentication length, then save it off so that we can put it in the transmit descriptor to tell the device where to stop the checksum calculation. Lastly, cleaned up useless and dead code. Tonghao Zhang adds a ethtool stat for receive length errors, since the driver was already collecting this counter. Arnd Bergmann fixed a warning about an used variable by "rephrasing" the code so that the compiler can see the use of the variable in question. Paul fixes an issue where "HIDE_VLAN" was being cleared on VF reset, so ensure to set "HIDE_VLAN" when port VLAN is enabled after a VF reset. ==================== Signed-off-by: David S. Miller commit 6b2d99247b62d288b5b320fcea46c164ab733e49 Author: Hans de Goede Date: Mon Mar 12 20:34:36 2018 +0100 ASoC: rt5651: Fix jack-dectect typo in the dt-bindings documentation Fix the jack-dectect typo in the dt-bindings documentation. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rt5651.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0f2d4f162f4f54b431420df23122901a6ccd641e Author: Hans de Goede Date: Mon Mar 12 20:34:35 2018 +0100 ASoC: rt5651: move definitions of dt-binding constants to include/dt-bindings Move the definitions of constants used in the dt-bindings from include/sound/rt5651.h to include/dt-bindings/sound/rt5651.h. As dt-bindings headers may also be parsed by the dt-compiler, they cannot use enums, only defines, so this commit also changes the code declaring the constants to use defines. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown include/dt-bindings/sound/rt5651.h | 15 +++++++++++++++ include/sound/rt5651.h | 36 ------------------------------------ sound/soc/codecs/rt5651.h | 4 ++-- 3 files changed, 17 insertions(+), 38 deletions(-) commit 4716007c23abeb0e42015786794539454aff487b Author: Darren Hart Date: Sat Mar 10 16:12:16 2018 -0800 platform/x86: dell-smbios: Resolve dependency error on ACPI_WMI Similarly to DCDBAS for DELL_SMBIOS_SMM, if DELL_SMBIOS_WMI is enabled, DELL_SMBIOS becomes dependent on ACPI_WMI. Update the depends lines to prevent a configuration where DELL_SMBIOS=y and either backend dependency =m. Update the comment accordingly. Cc: Mario Limonciello Cc: Andy Shevchenko Cc: Dominik Brodowski Signed-off-by: Darren Hart (VMware) drivers/platform/x86/Kconfig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c10496c8d233aa3fa7c5419939083025dbfe33e9 Author: Ville Syrjälä Date: Mon Mar 5 16:49:19 2018 +0200 drm: Fix some coding style issues Put an empty line between the variable declarations and the code, and use tabs for alignment. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180305144919.2881-3-ville.syrjala@linux.intel.com Acked-by: Daniel Vetter drivers/gpu/drm/drm_framebuffer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b03254d797b6b5b7f50a94be0805510114b4d6d1 Author: Paul Greenwalt Date: Thu Mar 8 07:26:08 2018 -0500 ixgbe: fix disabling hide VLAN on VF reset If port VLAN is enabled, set PFQDE.HIDE_VLAN during VF reset. Setting only PFQDE.PFQDE during VF reset was clearing PFQDE.HIDE_VLAN. Signed-off-by: Paul Greenwalt Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b2c9272ae7d366e85ab277f528c3dddb7f268b12 Author: Salvatore Mesoraca Date: Sun Mar 11 22:07:50 2018 +0100 net: rds: drop VLA in rds_walk_conn_path_info() Avoid VLA[1] by using an already allocated buffer passed by the caller. [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Salvatore Mesoraca Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/connection.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f1cb9d68b4d8789d7f48bd293772095430860d86 Author: Salvatore Mesoraca Date: Sun Mar 11 22:07:49 2018 +0100 net: rds: drop VLA in rds_for_each_conn_info() Avoid VLA[1] by using an already allocated buffer passed by the caller. [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Salvatore Mesoraca Signed-off-by: David S. Miller net/rds/connection.c | 2 +- net/rds/ib.c | 3 +++ net/rds/rds.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) commit ae67cfc4f6abb379e5bbe9a5616f00b23bbecb01 Author: Eric Anholt Date: Fri Mar 9 15:36:39 2018 -0800 ARM: bcm2835: Add the DPI hardware to the device tree. It's currently marked disabled, as it's not useful without a panel associated with it and the GPIO pins routed to ALT2. Signed-off-by: Eric Anholt Acked-by: Stefan Wahren arch/arm/boot/dts/bcm283x.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit bde8b3887add8368ecf0ca71117baf2fd56a6fc9 Author: Ranjani Sridharan Date: Fri Mar 9 11:11:17 2018 -0800 ASoC: topology: create TLV data for dapm widgets This patch adds the change required to create the TLV data for dapm widget kcontrols from topology. This also fixes the following TLV read error shown in amixer while showing the card control contents. "amixer: Control hw:1 element TLV read error: No such device or address" Signed-off-by: Ranjani Sridharan Signed-off-by: Mark Brown sound/soc/soc-topology.c | 3 +++ 1 file changed, 3 insertions(+) commit ca7796683ff63fb1917d205d4e0173c5dadfb37d Author: Sylwester Nawrocki Date: Fri Mar 9 18:48:57 2018 +0100 ASoC: samsung: Drop uneeded RCLKSRC setting in the Snow driver The RCLKSRC mux input 0 is a default configuration after reset, so there is no need for this explicit snd_soc_dai_set_sysclk() call. Also, this static mux clock configuration can be specified in DT. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Signed-off-by: Mark Brown sound/soc/samsung/snow.c | 5 ----- 1 file changed, 5 deletions(-) commit 954b54dea0ebfd2ead48e6bb12a165025227f4b3 Author: Arnd Bergmann Date: Thu Mar 1 00:17:36 2018 +0100 ixgbevf: fix unused variable warning The new ixgbevf_set_rx_buffer_len() function causes a harmless warnings in configurations with large page size: drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c: In function 'ixgbevf_set_rx_buffer_len': drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:1758:15: error: unused variable 'max_frame' [-Werror=unused-variable] This rephrases the code so that the compiler can see the use of that variable, making it slightly easier to read in the process. Fixes: f15c5ba5b6cd ("ixgbevf: add support for using order 1 pages to receive large frames") Signed-off-by: Arnd Bergmann Tested-by: Andrew Bowers Acked-by: Alexander Duyck Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e656805c1b7888c3e79cf26b040b83e6cfd102d6 Author: Tonghao Zhang Date: Wed Feb 28 03:59:09 2018 -0800 ixgbe: Add receive length error counter ixgbe enabled rlec counter and the rx_error used it. We can export the counter directly via ethtool -S ethX. Signed-off-by: Tonghao Zhang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 1 + 1 file changed, 1 insertion(+) commit 995e73e55f46dcfae863d72de674447008a85887 Author: Sylwester Nawrocki Date: Fri Mar 9 18:48:55 2018 +0100 ASoC: samsung: i2s: Fix rclk_srcrate handling As the RCLK clock may be updated through the common clk API before each snd_soc_dai_ops::trigger call, it is not enough to update i2s->rclk_srcrate only once after it has been initially set to 0. To avoid wrong PSR values we always get RCLK frequency from the CLK_I2S_RCLK_SRC clock, when that clock is available. Fixes: e1417fdf3011 "ASoC: samsung: i2s: Ensure the RCLK rate is properly determined" Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3600cd78d7ac37114c87c7ba42f720dccbc4a5aa Merge: d9e5751 9468576 Author: Mark Brown Date: Mon Mar 12 11:02:30 2018 -0700 Merge branch 'topic/of' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-samsung commit 5c4aa458634f545e75845b5a20276ffe1c43459e Author: Shannon Nelson Date: Thu Feb 22 11:09:57 2018 -0800 ixgbe: remove unneeded ipsec state free callback With commit 7f05b467a735 ("xfrm: check for xdo_dev_state_free") we no longer need to add an empty callback function to the driver, so now let's remove the useless code. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 13 ------------- 1 file changed, 13 deletions(-) commit 946857636d279486eaa47c930930185631f28fce Author: Sylwester Nawrocki Date: Fri Mar 9 18:48:54 2018 +0100 ASoC: Add snd_soc_of_put_dai_link_codecs() helper function The code for dereferencing device nodes in the 'codecs' array is moved to a separate function so we can avoid open coding that in drivers. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown include/sound/soc.h | 1 + sound/soc/soc-core.c | 32 +++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) commit 0076096b35953deb90005e5d6d3fe4c8468f4518 Author: Geert Uytterhoeven Date: Tue Feb 13 15:15:30 2018 +0100 ARM: dts: exynos: Fix "debounce-interval" property misspelling in Midas "debounce-inteval" was never supported. Signed-off-by: Geert Uytterhoeven Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412-midas.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ae418e6e25baadf3b75c7572d5b4fa5b749e1e3 Author: Shannon Nelson Date: Thu Feb 22 11:09:56 2018 -0800 ixgbe: fix ipsec trailer length Fix up the Tx trailer length calculation. We can't believe the trailer len from the xstate information because it was calculated before the packet was put together and padding added. This bit of code finds the padding value in the trailer, adds it to the authentication length, and saves it so later we can put it into the Tx descriptor to tell the device where to stop the checksum calculation. Fixes: 592594704761 ("ixgbe: process the Tx ipsec offload") Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 68c1fb2d30209757f9a9f6e5ea587ea3bb8724c0 Author: Shannon Nelson Date: Thu Feb 22 11:09:55 2018 -0800 ixgbe: check for 128-bit authentication Make sure the Security Association is using a 128-bit authentication, since that's the only size that the hardware offload supports. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 16 +++++++++++----- drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.h | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) commit dead99e8579b6e2ebdf1e9c819e67d7f4a5cedbb Author: Peter Ujfalusi Date: Mon Mar 12 16:24:23 2018 +0200 ASoC: soc-io: Fix snd_soc_component_update_bits_legacy After the codec to component conversion codecs with custom read/write function will no longer able to use update_bits as their io callbacks are registered at component->driver level and not in component level. To not complicate the code further, lets just use the snd_soc_component_read/snd_soc_component_write function and let them sort out the correct io function to call. Fixes: d0ff8ba57d965 ("ASoC: add Component level .read/.write") Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/soc-io.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 2889312616aecf1a1153be0fab19206a6b1f768f Merge: 493ea0c 59dd2a8 3189566 Author: Mark Brown Date: Mon Mar 12 09:50:42 2018 -0700 Merge remote-tracking branches 'regmap/topic/debugfs' and 'regmap/topic/mmio-clk' into regmap-next commit 493ea0c8a6bdcdd014a5c586b91953960c7c9260 Merge: f981c6c fb44f3c Author: Mark Brown Date: Mon Mar 12 09:50:40 2018 -0700 Merge remote-tracking branch 'regmap/topic/bulk' into regmap-next commit f981c6cc14aa1c6cfd4154d2f93846bf83a4725a Merge: aa584ba 86effbe b8f9a03 Author: Mark Brown Date: Mon Mar 12 09:50:35 2018 -0700 Merge remote-tracking branches 'regmap/fix/i2c' and 'regmap/fix/volatile' into regmap-linus commit aa584bada6c2114371a415d134f09fc376c8e07b Merge: d2f2bb8 f00e710 Author: Mark Brown Date: Mon Mar 12 09:50:32 2018 -0700 Merge remote-tracking branch 'regmap/fix/core' into regmap-linus commit d2f2bb84877398709a12f3198a4a85c1c765eaf3 Merge: 0c8efd6 71df179 Author: Mark Brown Date: Mon Mar 12 09:50:31 2018 -0700 Merge remote-tracking branch 'regmap/fix/cache' into regmap-linus commit b50c32bd28e399cd4672a1e43645399e5bd1eb85 Author: Sylwester Nawrocki Date: Fri Mar 9 18:48:52 2018 +0100 ASoC: max98090: Add #sound-dai-cells property documentation MAX98090 CODEC supports 1 input DAI, adding the #sound-dai-cells property helps to reference the DAI in DT in a standard way. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/max98090.txt | 2 ++ 1 file changed, 2 insertions(+) commit c9d066650cd5adf4ed4bf5734386699e765222b7 Author: Peter Ujfalusi Date: Mon Mar 12 16:24:22 2018 +0200 ASoC: twl6040: Add back missing write callback We need to have the write callback to use the code. Fixes: 7480389fb0d8 ("ASoC: twl6040: replace codec to component") Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/codecs/twl6040.c | 1 + 1 file changed, 1 insertion(+) commit ce571b80e2b2411d5cdfa78888a6865f918621c6 Author: Bard Liao Date: Mon Mar 12 19:50:09 2018 +0800 ASoC: rt5659: Separate adc 1/2 clock control The control bits of ADC 1 and 2 clock are different. We have to separate it. Signed-off-by: Zhong An Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5659.c | 38 ++++++++++++++++++++++++++++++++------ sound/soc/codecs/rt5659.h | 12 ++++++++---- 2 files changed, 40 insertions(+), 10 deletions(-) commit 50b123087c48bd979c716eb5d207202dda3f4a46 Merge: 2fa0b7f 3795e0c Author: Mark Brown Date: Mon Mar 12 09:35:26 2018 -0700 Merge branch 'fix/rt5659' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5659 commit 3795e0c7d5c8b81d4ae32129b860aaa169945ce3 Author: Bard Liao Date: Mon Mar 12 19:50:08 2018 +0800 ASoC: rt5659: fix wrong control register for ADC2 power The control register for ADC L2 and R2 is RT5659_PWR_DIG_1 not RT5659_PWR_DIG_2. Signed-off-by: Zhong An Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5659.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9849ef555c7212f4ae93d752cfa1232488ec7c83 Author: Bard Liao Date: Mon Mar 12 19:50:07 2018 +0800 ASoC: rt5659: fix wrong bit define for ADC L2 power. RT5659_PWR_ADC_L2_BIT should be 2. Signed-off-by: Zhong An Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5659.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce3077ee80d6ac1087c06441f4c63ce5f13ef12c Author: Nikolay Borisov Date: Fri Feb 23 13:45:29 2018 +0200 direct-io: Remove unused DIO_SKIP_DIO_COUNT logic This flag was added by fe0f07d08ee3 ("direct-io: only inc/deci inode->i_dio_count for file systems") as means to optimise the atomic modificaiton of the variable for blockdevices. However with the advent of 542ff7bf18c6 ("block: new direct I/O implementation") it became unused. So let's remove it. Reviewed-by: Christoph Hellwig Signed-off-by: Nikolay Borisov Signed-off-by: Jens Axboe fs/direct-io.c | 6 ++---- include/linux/fs.h | 3 --- 2 files changed, 2 insertions(+), 7 deletions(-) commit c8f4c36f81623002165dce874fa60bb0c154b10e Author: Nikolay Borisov Date: Fri Feb 23 13:45:28 2018 +0200 direct-io: Remove unused DIO_ASYNC_EXTEND flag This flag was added by 6039257378e4 ("direct-io: add flag to allow aio writes beyond i_size") to support XFS. However, with the rework of XFS' DIO's path to use iomap in acdda3aae146 ("xfs: use iomap_dio_rw") it became redundant. So let's remove it. Reviewed-by: Christoph Hellwig Signed-off-by: Nikolay Borisov Signed-off-by: Jens Axboe fs/direct-io.c | 3 +-- include/linux/fs.h | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) commit 2c81ee0a28c085582a84f3822e8a22e028a909d0 Author: Gustavo A. R. Silva Date: Mon Mar 12 17:06:55 2018 +0100 video: fbdev: via: remove VLA usage In preparation to enabling -Wvla, remove VLA usage. Also, fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Eric Engestrom Reviewed-by: Emil Velikov Cc: Florian Tobias Schandinat Cc: Kees Cook Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/via/via_aux_sii164.c | 2 +- drivers/video/fbdev/via/via_aux_vt1631.c | 2 +- drivers/video/fbdev/via/via_aux_vt1632.c | 2 +- drivers/video/fbdev/via/via_aux_vt1636.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit df7a84a8baf1caf01ded61356b68d5d978b37789 Author: Gustavo A. R. Silva Date: Mon Mar 12 17:06:54 2018 +0100 video: fbdev: vermilion: use 64-bit arithmetic instead of 32-bit Cast _pitch_ to u64 in order to give the compiler complete information about the proper arithmetic to use. Notice that this variable is being used in a context that expects an expression of type u64 (64 bits, unsigned). The expression pitch * var->yres_virtual is currently being evaluated using 32-bit arithmetic and the result of the operation is being stored into variable mem, which is a variable of type u64. Based on that, chances are there is a potential integer overflow as a result of the operation. Addresses-Coverity-ID: 200655 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/vermilion/vermilion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2a348014aad8bdf1466e027aa1dad2f099b7de6 Author: Vladimir Zapolskiy Date: Mon Mar 12 17:06:54 2018 +0100 video: of: display_timing: Remove of_display_timings_exist() function Since introduction of of_display_timings_exist() function in commit cc3f414cf2e40 ("video: add of helper for display timings/videomode") it didn't attract any users, and the function has no potential, because of_get_display_timings() covers its functionality and does more. Drop the unused exported function from the kernel. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/of_display_timing.c | 20 -------------------- include/video/of_display_timing.h | 5 ----- 2 files changed, 25 deletions(-) commit 9cbaf4d969ec4f5eb7a4e97afade374ee8056ef1 Author: Mathieu Malaterre Date: Mon Mar 12 17:06:54 2018 +0100 video: offb: Deallocate the color map The function offb_destroy did not deallocate the color map leaving some memory around after destruction. Call the color map deallocate function to remove the memory leak. Handle another case where color map should have been deallocated during an error code path. Fix memory leaks reported by kmemleak: # dmesg ... [ 1884.719941] kmemleak: 3 new suspected memory leaks (see /sys/kernel/debug/kmemleak) # cat /sys/kernel/debug/kmemleak unreferenced object 0xde3d9000 (size 512): comm "swapper", pid 1, jiffies 4294892827 (age 1906.784s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 aa aa aa aa aa aa aa aa ................ 55 55 55 55 55 55 55 55 ff ff ff ff ff ff ff ff UUUUUUUU........ backtrace: [] fb_alloc_cmap_gfp+0x54/0x15c [] offb_init_nodriver+0x8e8/0xa3c [] offb_init+0xd0/0x164 [<322f82a3>] do_one_initcall+0x4c/0x178 [] kernel_init_freeable+0x138/0x1cc [<2a17fa0e>] kernel_init+0x24/0x118 [<4079749a>] ret_from_kernel_thread+0x5c/0x64 unreferenced object 0xde3d9200 (size 512): comm "swapper", pid 1, jiffies 4294892827 (age 1906.784s) hex dump (first 32 bytes): 00 00 00 00 aa aa aa aa 00 00 00 00 55 55 aa aa ............UU.. 55 55 55 55 ff ff ff ff 55 55 55 55 ff ff ff ff UUUU....UUUU.... backtrace: [<4bf3594d>] fb_alloc_cmap_gfp+0x6c/0x15c [] offb_init_nodriver+0x8e8/0xa3c [] offb_init+0xd0/0x164 [<322f82a3>] do_one_initcall+0x4c/0x178 [] kernel_init_freeable+0x138/0x1cc [<2a17fa0e>] kernel_init+0x24/0x118 [<4079749a>] ret_from_kernel_thread+0x5c/0x64 unreferenced object 0xde3d9600 (size 512): comm "swapper", pid 1, jiffies 4294892827 (age 1906.784s) hex dump (first 32 bytes): 00 00 aa aa 00 00 aa aa 00 00 aa aa 00 00 aa aa ................ 55 55 ff ff 55 55 ff ff 55 55 ff ff 55 55 ff ff UU..UU..UU..UU.. backtrace: [<23a3ea03>] fb_alloc_cmap_gfp+0x84/0x15c [] offb_init_nodriver+0x8e8/0xa3c [] offb_init+0xd0/0x164 [<322f82a3>] do_one_initcall+0x4c/0x178 [] kernel_init_freeable+0x138/0x1cc [<2a17fa0e>] kernel_init+0x24/0x118 [<4079749a>] ret_from_kernel_thread+0x5c/0x64 Signed-off-by: Mathieu Malaterre Cc: Rob Herring Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/offb.c | 2 ++ 1 file changed, 2 insertions(+) commit 069ee21a8234459473b238e65701d2e79c194ec7 Author: Mathieu Malaterre Date: Mon Mar 12 17:06:54 2018 +0100 fbdev: Fix loading of module radeonfb on PowerMac When the linux kernel is build with (typical kernel ship with Debian installer): CONFIG_FB=y CONFIG_FB_OF=y CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_FB_RADEON=m The offb driver takes precedence over module radeonfb. It is then impossible to load the module, error reported is: [ 96.551486] radeonfb 0000:00:10.0: enabling device (0006 -> 0007) [ 96.551526] radeonfb 0000:00:10.0: BAR 0: can't reserve [mem 0x98000000-0x9fffffff pref] [ 96.551531] radeonfb (0000:00:10.0): cannot request region 0. [ 96.551545] radeonfb: probe of 0000:00:10.0 failed with error -16 This patch reproduce the behavior of the module radeon, so as to make it possible to load radeonfb when offb is first loaded, see commit a56f7428d753 ("drm/radeon: Add early unregister of firmware fb's"). Signed-off-by: Mathieu Malaterre Link: https://bugs.debian.org/826629#57 Link: https://bugzilla.kernel.org/show_bug.cgi?id=119741 Suggested-by: Lennart Sorensen Cc: Benjamin Herrenschmidt Cc: Tomi Valkeinen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/aty/radeon_base.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit e3419c6aef02a74735e766832f5c271ed2b24361 Author: Ulf Magnusson Date: Mon Mar 12 17:06:53 2018 +0100 video: fbdev: kconfig: Add help text to FB_I810_I2C The FB_I810_I2C symbol previously had a blank help text, which was removed in e9829ac4e5fd ("video: fbdev: kconfig: Remove blank help text"). Give it a proper help text, derived from commit 74f6ae84b23 ("[PATCH] i810fb: Add > i2c/DDC support"). Signed-off-by: Ulf Magnusson Cc: Masahiro Yamada Cc: "Luis R . Rodriguez" Cc: Randy Dunlap Cc: Dan Carpenter Cc: Paul Bolle Cc: Arnd Bergmann Cc: Michal Simek Cc: Hans de Goede Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) commit f06a51a08f9d0389cdc6c30423417ea7cb89eded Author: Ulf Magnusson Date: Mon Mar 12 17:06:53 2018 +0100 video: console: kconfig: Remove AVR32 dep. from VGA_CONSOLE The AVR32 symbol was removed in commit 26202873bb51 ("avr32: remove support for AVR32 architecture"). Signed-off-by: Ulf Magnusson Cc: Mark Brown Cc: Corentin Labbe Cc: Viresh Kumar Cc: Matthias Brugger Cc: Thierry Reding Cc: Daniel Vetter Cc: LEROY Christophe Cc: Sean Paul Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/console/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c58cb8ae73383b194c96c7907613892398ab6aae Author: Ladislav Michl Date: Mon Mar 12 17:06:53 2018 +0100 video: udlfb: Use already defined BPP constant Replace const variable with already defined constant. Signed-off-by: Ladislav Michl Cc: Bernie Thompson Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/udlfb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 115e77597efcc94cb1f6cbb7df5cf7ce8feb8632 Author: Ladislav Michl Date: Mon Mar 12 17:06:53 2018 +0100 video: udlfb: Fix unaligned access Driver generates lots of alignment trap exceptions on ARM. Fix that by replacing typecasting of odd addresses with byte shifting and remove uneccessary typecasting. Signed-off-by: Ladislav Michl Cc: Bernie Thompson Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/udlfb.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit a81265222e90ac71a4b43e8a4effb59472f845d6 Author: Ludovic Desroches Date: Mon Mar 12 17:06:52 2018 +0100 video: fbdev: atmel_lcdfb: convert to use GPIO descriptors Use GPIO descriptors instead of relying on the old method. Signed-off-by: Ludovic Desroches Acked-by: Nicolas Ferre Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko Cc: Alexandre Belloni Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/atmel_lcdfb.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) commit 5908986ef3481b7ac783642733a4ab91c15c7550 Author: Arnd Bergmann Date: Mon Mar 12 17:06:52 2018 +0100 video: fbdev: sis: avoid mismatched prototypes Building with LTO enabled reveals some functions whose prototypes in the header are different from the definition: drivers/video/fbdev/sis/sis_main.h:765:0: error: type of 'SiS_SetCH70xxANDOR' does not match original declaration [-Werror=lto-type-mismatch] extern void SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg, drivers/video/fbdev/sis/init301.c:8937:0: note: type mismatch in parameter 4 SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg, drivers/video/fbdev/sis/init301.c:8937:0: note: type 'short unsigned int' should match type 'unsigned char' drivers/video/fbdev/sis/init301.c:8937:0: note: 'SiS_SetCH70xxANDOR' was previously declared here The root cause appears to be the way that header files are used in this driver, where they contain both static variable and declarations for symbols in other files. To clean that up, I'm changing all mixed headers to only contain declarations the way we normally do in C, or contain only static variables, and move the rest to a more appropriate place. Once that is done, the headers can be included in the other files as well, and guarantee that the prototypes match. There are a few headers that now only contain static variables, and I'm leaving those alone here as the patch is already too big. These could be trivially moved into the respective .c files. Signed-off-by: Arnd Bergmann Cc: Thomas Winischhofer Cc: Nicolas Pitre Cc: Andi Kleen Cc: "Gustavo A. R. Silva" , Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sis/init.h | 76 --------- drivers/video/fbdev/sis/init301.c | 326 +++++++++++++++++++++++++++++++++++++ drivers/video/fbdev/sis/init301.h | 320 ------------------------------------ drivers/video/fbdev/sis/sis.h | 131 +++++++++++++++ drivers/video/fbdev/sis/sis_main.c | 51 ++++++ drivers/video/fbdev/sis/sis_main.h | 117 ------------- 6 files changed, 508 insertions(+), 513 deletions(-) commit 1aa9b8ada01ece155bbb6b7d0b447f5f5341d7ba Author: Corentin Labbe Date: Mon Mar 12 17:06:52 2018 +0100 video: remove unused kconfig SH_LCD_MIPI_DSI SH_LCD_MIPI_DSI is unused since commit 18b6562c243f ("fbdev: sh_mipi_dsi: remove driver") so no need to keep it. Fixes: 18b6562c243f ("fbdev: sh_mipi_dsi: remove driver") Signed-off-by: Corentin Labbe Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/Kconfig | 3 --- 1 file changed, 3 deletions(-) commit c19457f0aed7fae73bb40e68ffcc72f36e3966a5 Author: Al Viro Date: Fri Feb 23 21:02:31 2018 -0500 d_delete(): get rid of trylock loop just grab ->i_lock first; we have a positive dentry, nothing's going to happen to inode Signed-off-by: Al Viro fs/dcache.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) commit c1d0c1a2b51e86124b7ba8ff9054698e2036d8e7 Author: John Ogness Date: Fri Feb 23 00:50:21 2018 +0100 fs/dcache: Move dentry_kill() below lock_parent() A subsequent patch will modify dentry_kill() to call lock_parent(). Move the dentry_kill() implementation "as is" below lock_parent() first. This will help simplify the review of the subsequent patch with dentry_kill() changes. Signed-off-by: John Ogness Signed-off-by: Al Viro fs/dcache.c | 62 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit 06080d100d921848b35196850ec17310469e06ba Author: John Ogness Date: Fri Feb 23 00:50:20 2018 +0100 fs/dcache: Remove stale comment from dentry_kill() Commit 0d98439ea3c6 ("vfs: use lockred "dead" flag to mark unrecoverably dead dentries") removed the `ref' parameter in dentry_kill() but its documentation remained. Remove it. Signed-off-by: John Ogness Signed-off-by: Al Viro fs/dcache.c | 1 - 1 file changed, 1 deletion(-) commit 0632a9ac7bc0a32f8251a53b3925775f0a7c4da6 Author: Al Viro Date: Wed Mar 7 00:49:10 2018 -0500 take write_seqcount_invalidate() into __d_drop() ... and reorder it with making d_unhashed() true. Signed-off-by: Al Viro fs/dcache.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 95713fb8aa039e9cd89ff545b62bd2a860c36e39 Author: Greg Kroah-Hartman Date: Mon Mar 12 16:30:40 2018 +0100 Revert "usb: core: Add "quirks" parameter for usbcore" This reverts commit b27560e4d9e5240b5544c9c5650c7442e482646e as it breaks the build for some arches :( Reported-by: kbuild test robot Cc: Kai-Heng Feng Signed-off-by: Greg Kroah-Hartman diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 1d1d53f85ddd..70a7398c20e2 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -4368,6 +4368,61 @@ usbcore.nousb [USB] Disable the USB subsystem + usbcore.quirks= + [USB] A list of quirks entries to supplement or + override the built-in usb core quirk list. List + entries are separated by commas. Each entry has + the form VID:PID:Flags where VID and PID are Vendor + and Product ID values (4-digit hex numbers) and + Flags is a set of characters, each corresponding + to a common usb core quirk flag as follows: + a = USB_QUIRK_STRING_FETCH_255 (string + descriptors must not be fetched using + a 255-byte read); + b = USB_QUIRK_RESET_RESUME (device can't resume + correctly so reset it instead); + c = USB_QUIRK_NO_SET_INTF (device can't handle + Set-Interface requests); + d = USB_QUIRK_CONFIG_INTF_STRINGS (device can't + handle its Configuration or Interface + strings); + e = USB_QUIRK_RESET (device can't be reset + (e.g morph devices), don't use reset); + f = USB_QUIRK_HONOR_BNUMINTERFACES (device has + more interface descriptions than the + bNumInterfaces count, and can't handle + talking to these interfaces); + g = USB_QUIRK_DELAY_INIT (device needs a pause + during initialization, after we read + the device descriptor); + h = USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL (For + high speed and super speed interrupt + endpoints, the USB 2.0 and USB 3.0 spec + require the interval in microframes (1 + microframe = 125 microseconds) to be + calculated as interval = 2 ^ + (bInterval-1). + Devices with this quirk report their + bInterval as the result of this + calculation instead of the exponent + variable used in the calculation); + i = USB_QUIRK_DEVICE_QUALIFIER (device can't + handle device_qualifier descriptor + requests); + j = USB_QUIRK_IGNORE_REMOTE_WAKEUP (device + generates spurious wakeup, ignore + remote wakeup capability); + k = USB_QUIRK_NO_LPM (device can't handle Link + Power Management); + l = USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL + (Device reports its bInterval as linear + frames instead of the USB 2.0 + calculation); + m = USB_QUIRK_DISCONNECT_SUSPEND (Device needs + to be disconnected before suspend to + prevent spurious wakeup) + Example: quirks=0781:5580:bk,0a5c:5834:gij + usbhid.mousepoll= [USBHID] The interval which mice are to be polled at. diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index f4a548471f0f..42faaeead81b 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -11,6 +11,143 @@ #include #include "usb.h" +struct quirk_entry { + u16 vid; + u16 pid; + u32 flags; +}; + +static DEFINE_MUTEX(quirk_mutex); + +static struct quirk_entry *quirk_list; +static unsigned int quirk_count; + +static char quirks_param[128]; + +static int quirks_param_set(const char *val, const struct kernel_param *kp) +{ + char *p, *field; + u16 vid, pid; + u32 flags; + size_t i; + + mutex_lock(&quirk_mutex); + + if (!val || !*val) { + quirk_count = 0; + kfree(quirk_list); + quirk_list = NULL; + goto unlock; + } + + for (quirk_count = 1, i = 0; val[i]; i++) + if (val[i] == ',') + quirk_count++; + + if (quirk_list) { + kfree(quirk_list); + quirk_list = NULL; + } + + quirk_list = kcalloc(quirk_count, sizeof(struct quirk_entry), + GFP_KERNEL); + if (!quirk_list) { + mutex_unlock(&quirk_mutex); + return -ENOMEM; + } + + for (i = 0, p = (char *)val; p && *p;) { + /* Each entry consists of VID:PID:flags */ + field = strsep(&p, ":"); + if (!field) + break; + + if (kstrtou16(field, 16, &vid)) + break; + + field = strsep(&p, ":"); + if (!field) + break; + + if (kstrtou16(field, 16, &pid)) + break; + + field = strsep(&p, ","); + if (!field || !*field) + break; + + /* Collect the flags */ + for (flags = 0; *field; field++) { + switch (*field) { + case 'a': + flags |= USB_QUIRK_STRING_FETCH_255; + break; + case 'b': + flags |= USB_QUIRK_RESET_RESUME; + break; + case 'c': + flags |= USB_QUIRK_NO_SET_INTF; + break; + case 'd': + flags |= USB_QUIRK_CONFIG_INTF_STRINGS; + break; + case 'e': + flags |= USB_QUIRK_RESET; + break; + case 'f': + flags |= USB_QUIRK_HONOR_BNUMINTERFACES; + break; + case 'g': + flags |= USB_QUIRK_DELAY_INIT; + break; + case 'h': + flags |= USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL; + break; + case 'i': + flags |= USB_QUIRK_DEVICE_QUALIFIER; + break; + case 'j': + flags |= USB_QUIRK_IGNORE_REMOTE_WAKEUP; + break; + case 'k': + flags |= USB_QUIRK_NO_LPM; + break; + case 'l': + flags |= USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL; + break; + case 'm': + flags |= USB_QUIRK_DISCONNECT_SUSPEND; + break; + /* Ignore unrecognized flag characters */ + } + } + + quirk_list[i++] = (struct quirk_entry) + { .vid = vid, .pid = pid, .flags = flags }; + } + + if (i < quirk_count) + quirk_count = i; + +unlock: + mutex_unlock(&quirk_mutex); + + return param_set_copystring(val, kp); +} + +static const struct kernel_param_ops quirks_param_ops = { + .set = quirks_param_set, + .get = param_get_string, +}; + +static struct kparam_string quirks_param_string = { + .maxlen = sizeof(quirks_param), + .string = quirks_param, +}; + +module_param_cb(quirks, &quirks_param_ops, &quirks_param_string, 0644); +MODULE_PARM_DESC(quirks, "Add/modify USB quirks by specifying quirks=vendorID:productID:quirks"); + /* Lists of quirky USB devices, split in device quirks and interface quirks. * Device quirks are applied at the very beginning of the enumeration process, * right after reading the device descriptor. They can thus only match on device @@ -320,8 +457,8 @@ static int usb_amd_resume_quirk(struct usb_device *udev) return 0; } -static u32 __usb_detect_quirks(struct usb_device *udev, - const struct usb_device_id *id) +static u32 usb_detect_static_quirks(struct usb_device *udev, + const struct usb_device_id *id) { u32 quirks = 0; @@ -339,21 +476,43 @@ static u32 __usb_detect_quirks(struct usb_device *udev, return quirks; } +static u32 usb_detect_dynamic_quirks(struct usb_device *udev) +{ + u16 vid = le16_to_cpu(udev->descriptor.idVendor); + u16 pid = le16_to_cpu(udev->descriptor.idProduct); + int i, flags = 0; + + mutex_lock(&quirk_mutex); + + for (i = 0; i < quirk_count; i++) { + if (vid == quirk_list[i].vid && pid == quirk_list[i].pid) { + flags = quirk_list[i].flags; + break; + } + } + + mutex_unlock(&quirk_mutex); + + return flags; +} + /* * Detect any quirks the device has, and do any housekeeping for it if needed. */ void usb_detect_quirks(struct usb_device *udev) { - udev->quirks = __usb_detect_quirks(udev, usb_quirk_list); + udev->quirks = usb_detect_static_quirks(udev, usb_quirk_list); /* * Pixart-based mice would trigger remote wakeup issue on AMD * Yangtze chipset, so set them as RESET_RESUME flag. */ if (usb_amd_resume_quirk(udev)) - udev->quirks |= __usb_detect_quirks(udev, + udev->quirks |= usb_detect_static_quirks(udev, usb_amd_resume_quirk_list); + udev->quirks ^= usb_detect_dynamic_quirks(udev); + if (udev->quirks) dev_dbg(&udev->dev, "USB quirks for this device: %x\n", udev->quirks); @@ -372,7 +531,7 @@ void usb_detect_interface_quirks(struct usb_device *udev) { u32 quirks; - quirks = __usb_detect_quirks(udev, usb_interface_quirk_list); + quirks = usb_detect_static_quirks(udev, usb_interface_quirk_list); if (quirks == 0) return; @@ -380,3 +539,11 @@ void usb_detect_interface_quirks(struct usb_device *udev) quirks); udev->quirks |= quirks; } + +void usb_release_quirk_list(void) +{ + mutex_lock(&quirk_mutex); + kfree(quirk_list); + quirk_list = NULL; + mutex_unlock(&quirk_mutex); +} diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 2f5fbc56a9dd..0adb6345ff2e 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -1259,6 +1259,7 @@ static void __exit usb_exit(void) if (usb_disabled()) return; + usb_release_quirk_list(); usb_deregister_device_driver(&usb_generic_driver); usb_major_cleanup(); usb_deregister(&usbfs_driver); diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 149cc7480971..546a2219454b 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h @@ -36,6 +36,7 @@ extern void usb_deauthorize_interface(struct usb_interface *); extern void usb_authorize_interface(struct usb_interface *); extern void usb_detect_quirks(struct usb_device *udev); extern void usb_detect_interface_quirks(struct usb_device *udev); +extern void usb_release_quirk_list(void); extern int usb_remove_device(struct usb_device *udev); extern int usb_get_device_descriptor(struct usb_device *dev, Documentation/admin-guide/kernel-parameters.txt | 55 -------- drivers/usb/core/quirks.c | 177 +----------------------- drivers/usb/core/usb.c | 1 - drivers/usb/core/usb.h | 1 - 4 files changed, 5 insertions(+), 229 deletions(-) commit 54587be4962eb60645a7c4fccaa42c0793bf7a6a Author: Frank Rowand Date: Thu Mar 8 14:39:05 2018 -0800 of: unittest: local return value variable related cleanups Several more style issues became apparent while creating "of: unittest: remove unneeded local return value variables". Correct those issues. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/unittest.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit 06c4697894992b0977f1f4f079ba50da5eccf76a Author: Frank Rowand Date: Thu Mar 8 14:39:04 2018 -0800 of: unittest: remove unneeded local return value variables A common pattern in many unittest functions is to save the return value of a function in a local variable, then test the value of the local variable, without using that return value for any further purpose. Remove the local return value variable for these cases. A second common pattern is: ret = some_test_function(many, parameters, ...); if (unittest(ret == 0, "error message format", ...)) return; This pattern is more clear when the local variable 'ret' is used, due to the long lines caused by the parameters to the test function and the long format and data parameters of unittest(). The local variable is retained in these cases. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/unittest.c | 89 ++++++++++++++------------------------------------- 1 file changed, 24 insertions(+), 65 deletions(-) commit 2a38f6da6014f1e1922361370dbe9a15a828386e Author: Peter Rosin Date: Thu Mar 8 20:58:29 2018 +0100 dt-bindings: trivial: add various mcp4017/18/19 potentiometers They come in 5 kOhm, 10 kOhm, 50 kOhm and 100 kOhm variations. Signed-off-by: Peter Rosin Signed-off-by: Rob Herring Documentation/devicetree/bindings/trivial-devices.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 3ed898e8cd0588152d9f0d7f472387c4af7f640e Author: Wei Yongjun Date: Mon Mar 12 12:25:24 2018 +0000 mlxsw: spectrum_kvdl: Make some functions static Fixes the following sparse warnings: drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:371:5: warning: symbol 'mlxsw_sp_kvdl_single_occ_get' was not declared. Should it be static? drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:384:5: warning: symbol 'mlxsw_sp_kvdl_chunks_occ_get' was not declared. Should it be static? drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:397:5: warning: symbol 'mlxsw_sp_kvdl_large_chunks_occ_get' was not declared. Should it be static? Signed-off-by: Wei Yongjun Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit de8d5ab2ff6edc8e26822965a30b6aa4e9332025 Author: Gal Pressman Date: Mon Mar 12 11:48:49 2018 +0200 net: Make RX-FCS and HW GRO mutually exclusive Same as LRO, hardware GRO cannot be enabled with RX-FCS. When both are requested, hardware GRO will be dropped. Suggested-by: David Miller Signed-off-by: Gal Pressman Signed-off-by: David S. Miller net/core/dev.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 678f4bda35483473ae7ad674ece4c7c43a000888 Author: Salvatore Mesoraca Date: Sun Mar 11 22:12:04 2018 +0100 net: llc: drop VLA in llc_sap_mcast() Avoid a VLA[1] by using a real constant expression instead of a variable. The compiler should be able to optimize the original code and avoid using an actual VLA. Anyway this change is useful because it will avoid a false positive with -Wvla, it might also help the compiler generating better code. [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Salvatore Mesoraca Signed-off-by: David S. Miller net/llc/llc_sap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c16b1a9ccf70630004f3700532313ca0bcf3e663 Author: Colin Ian King Date: Sun Mar 11 17:55:47 2018 +0100 lan743x: make functions lan743x_csr_read and lan743x_csr_read static Functions lan743x_csr_read and lan743x_csr_read are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warning: drivers/net/ethernet/microchip/lan743x_main.c:56:5: warning: symbol lan743x_csr_read' was not declared. Should it be static? drivers/net/ethernet/microchip/lan743x_main.c:61:6: warning: symbol 'lan743x_csr_write' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/microchip/lan743x_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8e8af97a3fa43e1cd2e9e714d3b79536ff98d8a9 Author: Colin Ian King Date: Sun Mar 11 17:42:33 2018 +0100 lan743x: remove some redundant variables and assignments Function lan743x_phy_init assigns pointer 'netdev' but this is never read and hence it can be removed. The return error code handling can also be cleaned up to remove the variable 'ret'. Function lan743x_phy_link_status_change assigns pointer 'phy' twice and this is never read, so it also can be removed. Finally, function lan743x_tx_napi_poll initializes pointer 'adapter' and then re-assigns the same value into this pointer a little later on so this second assignment is redundant and can be also removed. Cleans up clang warnings: drivers/net/ethernet/microchip/lan743x_main.c:951:2: warning: Value stored to 'netdev' is never read drivers/net/ethernet/microchip/lan743x_main.c:971:3: warning: Value stored to 'phy' is never read drivers/net/ethernet/microchip/lan743x_main.c:1583:26: warning: Value stored to 'adapter' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/microchip/lan743x_main.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit bdf08fc5412045f7648a49791d98cd04f72c1c1f Author: Colin Ian King Date: Sun Mar 11 17:27:56 2018 +0100 rds: remove redundant variable 'sg_off' Variable sg_off is assigned a value but it is never read, hence it is redundant and can be removed. Cleans up clang warning: net/rds/message.c:373:2: warning: Value stored to 'sg_off' is never read Signed-off-by: Colin Ian King Acked-by: Sowmini Varadhan Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/message.c | 2 -- 1 file changed, 2 deletions(-) commit bbfa047a25c379e467536c5ed2ba00c0cb602ca1 Author: David S. Miller Date: Mon Mar 12 11:09:33 2018 -0400 ipv6: Use ip6_multipath_hash_policy() in rt6_multipath_hash(). Make use of the new helper. Suggested-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27a9ae9b9f0e2099ea0d9cddcfb9cd8ff98ee27a Merge: 129cf5f 99db522 Author: David S. Miller Date: Mon Mar 12 11:07:16 2018 -0400 Merge branch 'mlxsw-Removing-dependency-of-mlxsw-on-GRE' Ido Schimmel says: ==================== mlxsw: Removing dependency of mlxsw on GRE Petr says: mlxsw_spectrum supports offloading of a tc action mirred egress mirror to a gretap or ip6gretap netdevice, which necessitates calls to functions defined in ip_gre, ip6_gre and ip6_tunnel modules. Previously this was enabled by introducing a hard dependency of MLXSW_SPECTRUM on NET_IPGRE and IPV6_GRE. However the rest of mlxsw is careful about picking which modules are absolutely required, and therefore the better approach is to make mlxsw_spectrum tolerant of absence of one or both of the GRE flavors. One way this might be resolved is by keeping the code in mlxsw_spectrum intact, and defining defaults for functions that mlxsw_spectrum depends on. The downsides are that other modules end up littered with these do-nothing defaults; that the driver ends up carrying quite a bit of dead code; and that the driver ends up having to explicitly depend on IPV6_TUNNEL to prevent configurations where mlxsw_spectrum is compiled in and and ip6_tunnel is a module, something that it currently can treat as an implementation detail of the IPV6_GRE dependency. Alternatively, the driver should just bite the bullet and ifdef-out the code that handles configurations that are not supported. Since that's what we are doing for IPv6 dependency, let's do the same for the GRE flavors. Patch #1 introduces a wrapper function for determining the value of ipv6.sysctl.multipath_hash_policy, which defaults to 0 on non-IPv6 builds. That function is then used from spectrum_router.c, instead of the direct variable reference that was introduced there during the short window when the Spectrum driver had a hard dependency on IPv6. Patch #2 moves one function to keep together in one block all the callbacks for handling (IPv4) gretap mirroring. Patch #3 then introduces the ifdefs to hide the irrelevant code. ==================== Signed-off-by: David S. Miller commit 99db5229db81e2b12d213ff7533fcaee1206e2f0 Author: Petr Machata Date: Sun Mar 11 09:45:49 2018 +0200 mlxsw: spectrum: Don't depend on ip_gre and ip6_gre mlxsw_spectrum supports offloading of a tc action mirred egress mirror to a gretap or an ip6gretap netdevice, which necessitates calls to functions defined in ip_gre, ip6_gre and ip6_tunnel modules. Previously this was enabled by introducing a hard dependency of MLXSW_SPECTRUM on NET_IPGRE and IPV6_GRE. However the rest of mlxsw is careful about picking which modules are absolutely required, and therefore the better approach is to make mlxsw_spectrum tolerant of absence of one or both of the GRE flavors. Hence rework the NET_IPGRE and IPV6_GRE dependencies to just guard matching modularity, and hide the corresponding code in spectrum_span.c in an #if IS_ENABLED. Mark mlxsw_sp_span_entry_tunnel_parms_common as maybe unused, to muffle warnings if neither GRE flavor is selected, which seems cleaner than introducing a composite #if. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Kconfig | 6 ++---- drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c | 10 +++++++++- 2 files changed, 11 insertions(+), 5 deletions(-) commit 36a1c3bd4a1503ee5561d7c2714b6f0fce049089 Author: Petr Machata Date: Sun Mar 11 09:45:48 2018 +0200 mlxsw: spectrum: Move mlxsw_sp_span_gretap4_route() Move the function next to the rest of gretap4 functions. Thus the generic functions shared between gretap4 and gretap6 are in one block at the beginning, followed by a gretap4 block, followed by a gretap6 block. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_span.c | 66 +++++++++++----------- 1 file changed, 33 insertions(+), 33 deletions(-) commit 918ee5073b0e253649083d731a88588b5c1723a3 Author: Petr Machata Date: Sun Mar 11 09:45:47 2018 +0200 net: ipv6: Introduce ip6_multipath_hash_policy() In order to abstract away access to the ipv6.sysctl.multipath_hash_policy variable, which is not available on systems compiled without IPv6 support, introduce a wrapper function ip6_multipath_hash_policy() that falls back to 0 on non-IPv6 systems. Use this wrapper from mlxsw/spectrum_router instead of a direct reference. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Acked-by: David Ahern Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +- include/net/ipv6.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) commit 0bc66fd3b688ae33ac073de7e79ba1223ecc465c Author: Colin Ian King Date: Mon Mar 12 15:01:00 2018 +0000 ALSA: echoaudio: remove redundant initialization of pointer 'pipe' The pointer 'pipe' is being initialized with a value that is never read and it is re-assigned later, hence the initialization is redundant and can be removed. Also remove pointer 'runtime' as it is no longer required. Cleans up clang warning: sound/pci/echoaudio/echoaudio.c:740:20: warning: Value stored to 'pipe' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/pci/echoaudio/echoaudio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 129cf5f7f19658db343edbdfbda5b95d2756cb2a Author: Ganesh Goudar Date: Sat Mar 10 19:27:52 2018 +0530 cxgb4/cxgb4vf: check fw caps to set link mode mask check firmware capabilities before setting ethtool link mode mask, also add few missing speeds. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 24 ++++++++------ .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 37 ++++++++++++++-------- 2 files changed, 38 insertions(+), 23 deletions(-) commit 7cbe543cae9b57cf4f9e710d1cec8dc3dd3c6dda Author: Ganesh Goudar Date: Sat Mar 10 17:34:50 2018 +0530 cxgb4: do not display 50Gbps as unsupported speed 50Gbps is a supported speed, Stop reporting it as unsupported speed. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 87a7c4b3c3570feed2edb9478c3bdd474f43a239 Author: Veerasenareddy Burru Date: Sat Mar 10 00:17:35 2018 -0800 liquidio: fix ndo_change_mtu to always return correct status to the caller In a scenario where the command queued to firmware get dropped or times out, MTU change from host will not propagate to firmware. So, it is required for host driver to wait for response from firmware or timeout and then return correct status to caller of ndo_change_mtu. Also moved the common code for MTU change from PF and VF driver files to common file lio_core.c Signed-off-by: Veerasenareddy Burru Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_core.c | 94 +++++++++++++++++++--- drivers/net/ethernet/cavium/liquidio/lio_main.c | 70 ++++++---------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 67 +++------------ .../net/ethernet/cavium/liquidio/liquidio_common.h | 3 +- .../net/ethernet/cavium/liquidio/octeon_network.h | 20 +++++ 5 files changed, 141 insertions(+), 113 deletions(-) commit 33801b94741d6c3be9713c10aa627477216c21e2 Author: leilei.lin Date: Tue Mar 6 17:36:37 2018 +0800 perf/core: Fix installing cgroup events on CPU There's two problems when installing cgroup events on CPUs: firstly list_update_cgroup_event() only tries to set cpuctx->cgrp for the first event, if that mismatches on @cgrp we'll not try again for later additions. Secondly, when we install a cgroup event into an active context, only issue an event reprogram when the event matches the current cgroup context. This avoids a pointless event reprogramming. Signed-off-by: leilei.lin [ Improved the changelog and comments. ] Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: brendan.d.gregg@gmail.com Cc: eranian@gmail.com Cc: linux-kernel@vger.kernel.org Cc: yang_oliver@hotmail.com Link: http://lkml.kernel.org/r/20180306093637.28247-1-linxiulei@gmail.com Signed-off-by: Ingo Molnar kernel/events/core.c | 46 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) commit 8d5bce0c37fa10f21dbdd6a6d8fcba85202fe24e Author: Peter Zijlstra Date: Fri Mar 9 14:56:27 2018 +0100 perf/core: Optimize perf_rotate_context() event scheduling The event schedule order (as per perf_event_sched_in()) is: - cpu pinned - task pinned - cpu flexible - task flexible But perf_rotate_context() will unschedule cpu-flexible even if it doesn't need a rotation. Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/events/core.c | 60 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 23 deletions(-) commit 8703a7cfe148f73062c568e9a8549ce692104864 Author: Peter Zijlstra Date: Mon Nov 13 14:28:44 2017 +0100 perf/core: Fix tree based event rotation Similar to how first programming cpu=-1 and then cpu=# is wrong, so is rotating both. It was especially wrong when we were still programming the PMU in this same order, because in that scenario we might never actually end up running cpu=# events at all. Cure this by using the active_list to pick the rotation event; since at programming we already select the left-most event. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Arnaldo Carvalho de Melo Cc: David Carrillo-Cisneros Cc: Dmitri Prokhorov Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Valery Cherepennikov Cc: Vince Weaver Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/events/core.c | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) commit 6e6804d2fa0eff6520f3a2b48ff52bcb9dc25a9d Author: Peter Zijlstra Date: Mon Nov 13 14:28:41 2017 +0100 perf/core: Simpify perf_event_groups_for_each() The last argument is, and always must be, the same. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Arnaldo Carvalho de Melo Cc: David Carrillo-Cisneros Cc: Dmitri Prokhorov Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Valery Cherepennikov Cc: Vince Weaver Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/events/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 6668128a9e25f7a11d25359e46df2541e6b43fc9 Author: Peter Zijlstra Date: Mon Nov 13 14:28:38 2017 +0100 perf/core: Optimize ctx_sched_out() When an event group contains more events than can be scheduled on the hardware, iterating the full event group for ctx_sched_out is a waste of time. Keep track of the events that got programmed on the hardware, such that we can iterate this smaller list in order to schedule them out. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Arnaldo Carvalho de Melo Cc: David Carrillo-Cisneros Cc: Dmitri Prokhorov Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Valery Cherepennikov Cc: Vince Weaver Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/perf_event.h | 5 +++++ kernel/events/core.c | 53 +++++++++++++++++++++++++--------------------- 2 files changed, 34 insertions(+), 24 deletions(-) commit 8343aae66167df6708128a778e750d48dbe31302 Author: Peter Zijlstra Date: Mon Nov 13 14:28:33 2017 +0100 perf/core: Remove perf_event::group_entry Now that all the grouping is done with RB trees, we no longer need group_entry and can replace the whole thing with sibling_list. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Arnaldo Carvalho de Melo Cc: David Carrillo-Cisneros Cc: Dmitri Prokhorov Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Valery Cherepennikov Cc: Vince Weaver Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/alpha/kernel/perf_event.c | 2 +- arch/arm/mach-imx/mmdc.c | 2 +- arch/arm/mm/cache-l2x0-pmu.c | 2 +- arch/mips/kernel/perf_event_mipsxx.c | 2 +- arch/powerpc/perf/core-book3s.c | 2 +- arch/powerpc/perf/core-fsl-emb.c | 2 +- arch/sparc/kernel/perf_event.c | 2 +- arch/x86/events/core.c | 2 +- arch/x86/events/intel/uncore.c | 2 +- drivers/bus/arm-cci.c | 2 +- drivers/bus/arm-ccn.c | 2 +- drivers/perf/arm_dsu_pmu.c | 2 +- drivers/perf/arm_pmu.c | 2 +- drivers/perf/hisilicon/hisi_uncore_pmu.c | 3 +-- drivers/perf/qcom_l2_pmu.c | 4 ++-- drivers/perf/qcom_l3_pmu.c | 2 +- drivers/perf/xgene_pmu.c | 2 +- include/linux/perf_event.h | 5 ----- kernel/events/core.c | 37 ++++++++++++++++---------------- 19 files changed, 36 insertions(+), 43 deletions(-) commit 1cac7b1ae3579457200213303fc28ca13b75592f Author: Peter Zijlstra Date: Mon Nov 13 14:28:30 2017 +0100 perf/core: Fix event schedule order Scheduling in events with cpu=-1 before events with cpu=# changes semantics and is undesirable in that it would priorize these events. Given that groups->index is across all groups we actually have an inter-group ordering, meaning we can merge-sort two groups, which is just what we need to preserve semantics. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Arnaldo Carvalho de Melo Cc: David Carrillo-Cisneros Cc: Dmitri Prokhorov Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Valery Cherepennikov Cc: Vince Weaver Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/events/core.c | 157 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 108 insertions(+), 49 deletions(-) commit 161c85fab7875f306eee9655dee71068feeb14ce Author: Peter Zijlstra Date: Mon Nov 13 14:28:27 2017 +0100 perf/core: Cleanup the rb-tree code Trivial comment and code fixups.. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Arnaldo Carvalho de Melo Cc: David Carrillo-Cisneros Cc: Dmitri Prokhorov Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Valery Cherepennikov Cc: Vince Weaver Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/events/core.c | 84 +++++++++++++++++++++++++--------------------------- 1 file changed, 40 insertions(+), 44 deletions(-) commit 8e1a2031e4b556b01ca53cd1fb2d83d811a6605b Author: Alexey Budankov Date: Fri Sep 8 11:47:03 2017 +0300 perf/cor: Use RB trees for pinned/flexible groups Change event groups into RB trees sorted by CPU and then by a 64bit index, so that multiplexing hrtimer interrupt handler would be able skipping to the current CPU's list and ignore groups allocated for the other CPUs. New API for manipulating event groups in the trees is implemented as well as adoption on the API in the current implementation. pinned_group_sched_in() and flexible_group_sched_in() API are introduced to consolidate code enabling the whole group from pinned and flexible groups appropriately. Signed-off-by: Alexey Budankov Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Carrillo-Cisneros Cc: Dmitri Prokhorov Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Valery Cherepennikov Cc: Vince Weaver Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/372f9c8b-0cfe-4240-e44d-83d863d40813@linux.intel.com Signed-off-by: Ingo Molnar include/linux/perf_event.h | 16 ++- kernel/events/core.c | 307 +++++++++++++++++++++++++++++++++++++-------- 2 files changed, 267 insertions(+), 56 deletions(-) commit 9e5b127d6f33468143d90c8a45ca12410e4c3fa7 Author: Peter Zijlstra Date: Fri Mar 9 12:52:04 2018 +0100 perf/core: Fix perf_output_read_group() Mark reported his arm64 perf fuzzer runs sometimes splat like: armv8pmu_read_counter+0x1e8/0x2d8 armpmu_event_update+0x8c/0x188 armpmu_read+0xc/0x18 perf_output_read+0x550/0x11e8 perf_event_read_event+0x1d0/0x248 perf_event_exit_task+0x468/0xbb8 do_exit+0x690/0x1310 do_group_exit+0xd0/0x2b0 get_signal+0x2e8/0x17a8 do_signal+0x144/0x4f8 do_notify_resume+0x148/0x1e8 work_pending+0x8/0x14 which asserts that we only call pmu::read() on ACTIVE events. The above callchain does: perf_event_exit_task() perf_event_exit_task_context() task_ctx_sched_out() // INACTIVE perf_event_exit_event() perf_event_set_state(EXIT) // EXIT sync_child_event() perf_event_read_event() perf_output_read() perf_output_read_group() leader->pmu->read() Which results in doing a pmu::read() on an !ACTIVE event. I _think_ this is 'new' since we added attr.inherit_stat, which added the perf_event_read_event() to the exit path, without that perf_event_read_output() would only trigger from samples and for @event to trigger a sample, it's leader _must_ be ACTIVE too. Still, adding this check makes it consistent with the @sub case for the siblings. Reported-and-Tested-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/events/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fdda85f6969cadf4fda8c1eb15c1ac7ec8798bcd Merge: 40590db 0b81292 Author: Arnd Bergmann Date: Mon Mar 12 15:27:14 2018 +0100 Merge tag 'pxa-for-4.17' of https://github.com/rjarzmik/linux into next/soc Pull "This is the pxa changes for v4.17 cycle" from Robert Jarzmik: - minor changes for property API - clock API fix for ULPI driver warning It exceptionally contains a merge from the mtd tree from Boris to prevent any merge conflicts in the PXA tree. * tag 'pxa-for-4.17' of https://github.com/rjarzmik/linux: ARM: pxa/raumfeld: use PROPERTY_ENTRY_U32() directly ARM: pxa: ulpi: fix ulpi timeout and slowpath warn ARM: pxa: cm-x300: remove inline directive ARM: pxa: fix static checker warning in pxa3xx-ulpi MAINTAINERS: remove entry for deleted pxa3xx_nand driver arm: dts: pxa: use reworked NAND controller driver dt-bindings: mtd: remove pxa3xx NAND controller documentation mtd: nand: remove useless fields from pxa3xx NAND platform data mtd: nand: remove deprecated pxa3xx_nand driver mtd: nand: use Marvell reworked NAND controller driver with all platforms commit 40590db64fabb35d9e19d66bd0880dda9631ab6a Merge: 431bc5e ed08b63 Author: Arnd Bergmann Date: Mon Mar 12 15:18:53 2018 +0100 Merge tag 'at91-ab-4.17-soc' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/soc Pull "AT91 SoC for 4.17: from Alexandre Belloni: - Rename Atmel to Microhip in MAINTAINERS, Documentation and Kconfig * tag 'at91-ab-4.17-soc' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: at91: Kconfig: Update company to Microchip Documentation: at91: Update Microchip SoC documentation MAINTAINERS: ARM: at91: update entry for ARM/Microchip commit 431bc5ee0f7549e9a05963f8baf5b46b0c94d1ee Merge: 242b205 5fc9907 Author: Arnd Bergmann Date: Mon Mar 12 15:17:57 2018 +0100 Merge tag 'hisi-defconfig-for-4.17' of git://github.com/hisilicon/linux-hisi into next/soc Pull "ARM64: hisilicon: defconfig updates for 4.17" from Wei Xu: - Enable deadline IO scheduler to improve the performnace for some usecaese without changing the default IO scheduler * tag 'hisi-defconfig-for-4.17' of git://github.com/hisilicon/linux-hisi: arm64: defconfig: enable IOSCHED_DEADLINE commit a39bd851dccfdcb89db3d9a6b03283aaf15f310c Author: Bjorn Helgaas Date: Fri Mar 9 11:06:54 2018 -0600 PCI/PM: Clear PCIe PME Status bit in core, not PCIe port driver fe31e69740ed ("PCI/PCIe: Clear Root PME Status bits early during system resume") added a .resume_noirq() callback to the PCIe port driver to clear the PME Status bit during resume to work around a BIOS issue. The BIOS evidently enabled PME interrupts for ACPI-based runtime wakeups but did not clear the PME Status bit during resume, which meant PMEs after resume did not trigger interrupts because PME Status did not transition from cleared to set. The fix was in the PCIe port driver, so it worked when CONFIG_PCIEPORTBUS was set. But I think we *always* want the fix because the platform may use PME interrupts even if Linux is built without the PCIe port driver. Move the fix from the port driver to the PCI core so we can work around this "PME doesn't work after waking from a sleep state" issue regardless of CONFIG_PCIEPORTBUS. [bhelgaas: folded in warning fix from Arnd Bergmann : https://lkml.kernel.org/r/20180328134747.2062348-1-arnd@arndb.de] Signed-off-by: Bjorn Helgaas drivers/pci/pci-driver.c | 13 +++++++++++++ drivers/pci/pcie/portdrv_pci.c | 15 --------------- 2 files changed, 13 insertions(+), 15 deletions(-) commit dcb0453d71e361d4718bb566d99e6ae498284419 Author: Bjorn Helgaas Date: Fri Mar 9 11:06:53 2018 -0600 PCI/PM: Move pcie_clear_root_pme_status() to core Move pcie_clear_root_pme_status() from the port driver to the PCI core so it will be available even when the port driver isn't present. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Reviewed-by: Christoph Hellwig drivers/pci/pci.c | 9 +++++++++ drivers/pci/pci.h | 1 + drivers/pci/pcie/portdrv.h | 2 -- drivers/pci/pcie/portdrv_pci.c | 9 --------- 4 files changed, 10 insertions(+), 11 deletions(-) commit 90d4806b8ddfbf0999618244e0cfba61aeafda8c Author: Murali Karicheri Date: Mon Mar 12 09:10:07 2018 +0200 ARM: dts: Keystone: add ECC error handler support Add emif node for keystone2 devices, which is used for ECC support. Signed-off-by: Murali Karicheri [t-kristo@ti.com: made emif enabled by default for all keystone2 devices] Signed-off-by: Tero Kristo Acked-by: Santosh Shilimkar Signed-off-by: Arnd Bergmann arch/arm/boot/dts/keystone-k2g.dtsi | 6 ++++++ arch/arm/boot/dts/keystone.dtsi | 7 +++++++ 2 files changed, 13 insertions(+) commit 4cd6847c28c5bce7fb2b4da04b465603d49ceb73 Author: Tero Kristo Date: Mon Mar 12 09:10:06 2018 +0200 ARM: dts: keystone-k2g: add watchdog support Add a watchdog node for keystone-k2g, with the corresponding clock and power domain handles. Signed-off-by: Tero Kristo Signed-off-by: Arnd Bergmann arch/arm/boot/dts/keystone-k2g.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 189e542b93949e94517afb4d7b26e7f52d713369 Merge: 9f07438 6fa65ed Author: Arnd Bergmann Date: Mon Mar 12 15:05:54 2018 +0100 Merge tag 'at91-ab-4.17-dt' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/dt Pull "AT91 DT for 4.17" from Alexandre Belloni: Not much this cycle, mainly changes on the Axentia boards from Peter and a cleanup from Bartosz: - use 'atmel' as at24 manufacturer - device addition and fixes for axentia boards - fix sama5d4 pinctrl compatible * tag 'at91-ab-4.17-dt' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: dts: at91: use 'atmel' as at24 manufacturer for at91sam9263ek ARM: dts: at91: use 'atmel' as at24 manufacturer for at91-sama5d2_ptc_ek ARM: dts: at91: use 'atmel' as at24 manufacturer for at91sam9g20ek ARM: dts: at91: use 'atmel' as at24 manufacturer for at91sam9260ek ARM: dts: at91: use 'atmel' as at24 manufacturer for sama5d34ek ARM: dts: at91: sama5d4: fix pinctrl compatible string ARM: dts: at91: tse850: make the sound dai cell count explicit ARM: dts: at91: nattis: add lvds-encoder ARM: dts: at91: nattis: use up-to-date mtd partitions ARM: dts: at91: tse850: use the correct compatible for the eeprom ARM: dts: at91: nattis: use the correct compatible for the eeprom ARM: dts: at91: sam9rl: Properly assign copyright commit 9f07438dd120c84513af0b8b25cbdec391ac0473 Merge: a3138e2 597667d Author: Arnd Bergmann Date: Mon Mar 12 15:00:48 2018 +0100 Merge tag 'mvebu-dt64-4.17-1' of git://git.infradead.org/linux-mvebu into next/dt Pull "mvebu dt64 for 4.17 (part 1)" from Gregory CLEMENT: - convert to the SPDX-License-Identifier - add missing clocks (for the registers) on some of the peripherals - use the new nand driver - add more uart for Armada 7K/8K SoCs * tag 'mvebu-dt64-4.17-1' of git://git.infradead.org/linux-mvebu: ARM64: dts: marvell: armada-cp110: Add apb_pclk clock for the uart nodes arm64: dts: marvell: use reworked NAND controller driver on Armada 8K arm64: dts: marvell: use reworked NAND controller driver on Armada 7K ARM64: dts: marvell: armada-cp110: Add registers clock for sata node arm64: dts: marvell: armada-8080-db: use SPDX-License-Identifier arm64: dts: marvell: armada-8040-mcbin: use SPDX-License-Identifier arm64: dts: marvell: armada-8040-db: use SPDX-License-Identifier arm64: dts: marvell: armada-7040-db: use SPDX-License-Identifier arm64: dts: marvell: armada-3720-espressobin: use SPDX-License-Identifier arm64: dts: marvell: armada-3720-db: use SPDX-License-Identifier arm64: dts: marvell: use SPDX-License-Identifier for Armada SoCs arm64: dts: marvell: mcbin: fix board name typo arm64: dts: marvell: mcbin: enable uart headers arm64: dts: marvell: add CP110 uart peripherals ARM64: dts: marvell: armada-cp110: Add registers clock for I2C nodes ARM64: dts: marvell: armada-cp110: Add registers clock for SPI nodes commit a3138e20a2dead5c0459af46085504ed64a08c9d Merge: dce8efa a83aeb3 Author: Arnd Bergmann Date: Mon Mar 12 14:59:23 2018 +0100 Merge tag 'mvebu-dt-4.17-1' of git://git.infradead.org/linux-mvebu into next/dt Pull "mvebu dt for 4.17 (part 1)" from Gregory CLEMENT: Most of them are small fixes or cleanup. Only the change on the clearfog will have a noticeable effect allowing to use the i2c at an higher frequency. * tag 'mvebu-dt-4.17-1' of git://git.infradead.org/linux-mvebu: ARM: dts: armada388-clearfog: increase speed of i2c0 to 400kHz arm: dts: kirkwood: fix error in #sound-dai-cells size ARM: dts: kirkwood: Fix "debounce-interval" property misspelling ARM: dts: armada: netgear-rn*: fix rtc node name commit dce8efa0575c8d9b5f9f9ae41437200c6d3e0bf3 Merge: 4bb4ace 928c4a5 Author: Arnd Bergmann Date: Mon Mar 12 14:57:49 2018 +0100 Merge tag 'hisi-arm64-dt-for-4.17' of git://github.com/hisilicon/linux-hisi into next/dt Pull "ARM64: DT: Hisilicon SoC DT updates for 4.17" from Wei Xu: - Add XGE CPLD control support for hip07 SoC - Disable the SMMU on hip06 and hip07 SoCs becuase of the hardware limitation - Enable HS200 mode for the MMC controller on hi6220 hikey board - Remove "cooling-{min|max}-level" this kind unused properties for hi6220 SoC - Add watchdog node for hi6220 SoC - Remove "CPU_NAP" idle state on hikey960 board since it is not stable and useless with the updated firmware * tag 'hisi-arm64-dt-for-4.17' of git://github.com/hisilicon/linux-hisi: arm64: dts: Hi3660: Remove 'CPU_NAP' idle state arm64: dts: hi6220: enable watchdog ARM64: dts: hi6220: Remove "cooling-{min|max}-level" for CPU nodes arm64: dts: hikey: Enable HS200 mode on eMMC arm64: dts: hisi: Disable hisilicon smmu node on hip06/hip07 arm64: dts: hisi: add hns-dsaf cpld control for the hip07 SoC commit 4bb4aceae96946e03fefefccb0e8b4c8716279fc Merge: 36719eb ba5c7a0 Author: Arnd Bergmann Date: Mon Mar 12 14:53:21 2018 +0100 Merge tag 'xilinx-dt-for-4.17' of https://github.com/Xilinx/linux-xlnx into next/dt Pull "arm: Xilinx(Zynq and ZynqMP) DT changes for v4.17" from Michal Simek: - Use SPDX license identifier - Add Xilinx ZynqMP boards zcu100-revC, zcu102-revA/revB/rev1.0, zcu104-revA, zcu106-revA, zcu111-revA, zc1751 dc1/dc2/dc3/dc4 - Add Xilinx Zynq boards cc108, zc770 dc1/dc2/dc3/dc4 - Add Digilent Zybo Z7 - Minor fixes in current DTSes * tag 'xilinx-dt-for-4.17' of https://github.com/Xilinx/linux-xlnx: (22 commits) arm: dts: zynq: Add Digilent Zybo Z7 board arm: zynq: Add support for Xilinx zc770 xm013 dc4 board arm: zynq: Add support for Xilinx zc770 xm012 dc3 board arm: zynq: Add support for Xilinx zc770 xm011 dc2 board arm: zynq: Add support for Xilinx zc770 xm010 dc1 board arm: zynq: Add Xilinx cc108 board arm: zynq: Add missing address node name in microzed board arm: dts: zynq: Use SPDX-License-Identifier arm: zynq: Use i2c-mux instead of i2cswitch for pca9548 arm64: zynqmp: Add support for Xilinx zc1751 arm64: zynqmp: Add support for Xilinx zc12XX boards arm64: zynqmp: Add support for Xilinx zcu111-revA arm64: zynqmp: Add support for Xilinx zcu106-revA arm64: zynqmp: Add support for Xilinx zcu104-revA arm64: zynqmp: Add support for Xilinx zcu102 arm64: zynqmp: Add support for Xilinx zcu100-revC dt-bindings: xilinx: Add description for ZynqMP arm64: zynqmp: Add 8-bit bus width property for ep108 arm64: zynqmp: Added OOB timing settings in zynqmp-ep108.dts arm64: zynqmp: Add SPDX license identifier ... commit 75dd56c0cd68847809e6e75d6fcc234e6e6711d5 Merge: fc5a7f0 f72c14a Author: Sebastian Reichel Date: Mon Mar 12 14:35:10 2018 +0100 Merge branch 'fixes' into for-next Merge for-stable fixes branch into for-next development branch. Signed-off-by: Sebastian Reichel commit fc5a7f0339d0641c0df14a9ed8af49c9992f9bef Author: Gustavo A. R. Silva Date: Fri Mar 9 12:27:08 2018 -0600 power: supply: da9150-fg: remove VLA usage In preparation to enabling -Wvla, remove VLA usage and replace it with fixed-length arrays. DA9150_QIF_LONG_SIZE (4 bytes) is the biggest size of an attribute which can be accessed [1]. Fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 [1] https://marc.info/?l=kernel-hardening&m=152059600524753&w=2 Signed-off-by: Gustavo A. R. Silva Acked-by: Adam Thomson Signed-off-by: Sebastian Reichel drivers/power/supply/da9150-fg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c6b4f46b414a1d0cf9122effc2fad444554d507 Author: Sebastian Reichel Date: Thu Feb 22 21:06:33 2018 +0100 ARM: dts: omap3-n900: Add link between battery and charger This adds information, that the battery is charged by the charger. The Linux kernel uses this information to refresh battery information when the power-supply changes. Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel arch/arm/boot/dts/omap3-n900.dts | 1 + 1 file changed, 1 insertion(+) commit 90ad4cc203c025788ccaf70dc1e57fbf43702c4d Author: Sebastian Reichel Date: Wed Feb 21 12:42:20 2018 +0100 power: supply: bq2415x: add DT referencing support Add support for using bq2415x together with power_supply_am_i_supplied(). Signed-off-by: Sebastian Reichel drivers/power/supply/bq2415x_charger.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f72c14ad8c6631a0a42115e74164f9b5faf4c724 Author: Sebastian Reichel Date: Thu Feb 15 21:28:40 2018 +0100 power: supply: bq27xxx: support missing supplier device power_supply_am_i_supplied() can return negative error codes. In this case we should assume, that no charger is connected and the battery should be marked as DISCHARGING instead of NOT_CHARGING. Reported-by: Merlijn Wajer Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66ec32fc7cd116dab5c02603ea8ec28ff92da3b5 Author: Pierre Bourdon Date: Tue Feb 20 16:03:18 2018 +0100 max17042: propagate of_node to power supply device max17042_get_status uses the core power_supply_am_i_supplied. That function relies on DT properties to figure out the power supply topology, and will error out without DT. Fixes max17042 battery status being reported as "unknown". Signed-off-by: Pierre Bourdon Signed-off-by: Andre Heider Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 1 + 1 file changed, 1 insertion(+) commit c35b518f9ba06c9de79fb3ff62eed7462d804995 Author: Marcel Ziswiler Date: Fri Feb 23 00:04:51 2018 +0100 clk: tegra: Fix pll_u rate configuration Turns out latest upstream U-Boot does not configure/enable pll_u which leaves it at some default rate of 500 kHz: root@apalis-t30:~# cat /sys/kernel/debug/clk/clk_summary | grep pll_u pll_u 3 3 0 500000 0 Of course this won't quite work leading to the following messages: [ 6.559593] usb 2-1: new full-speed USB device number 2 using tegra- ehci [ 11.759173] usb 2-1: device descriptor read/64, error -110 [ 27.119453] usb 2-1: device descriptor read/64, error -110 [ 27.389217] usb 2-1: new full-speed USB device number 3 using tegra- ehci [ 32.559454] usb 2-1: device descriptor read/64, error -110 [ 47.929777] usb 2-1: device descriptor read/64, error -110 [ 48.049658] usb usb2-port1: attempt power cycle [ 48.759475] usb 2-1: new full-speed USB device number 4 using tegra- ehci [ 59.349457] usb 2-1: device not accepting address 4, error -110 [ 59.509449] usb 2-1: new full-speed USB device number 5 using tegra- ehci [ 70.069457] usb 2-1: device not accepting address 5, error -110 [ 70.079721] usb usb2-port1: unable to enumerate USB device Fix this by actually allowing the rate also being set from within the Linux kernel. Signed-off-by: Marcel Ziswiler Tested-by: Jon Hunter Signed-off-by: Thierry Reding drivers/clk/tegra/clk-pll.c | 2 ++ 1 file changed, 2 insertions(+) commit c485ad63abb4b30a3654e80fef9708a181447965 Author: Dmitry Osipenko Date: Wed Jan 10 16:59:44 2018 +0300 clk: tegra: Specify VDE clock rate Currently VDE clock rate is determined by clock config left from bootloader, let's not rely on it and explicitly specify the clock rate in the CCF driver. Signed-off-by: Dmitry Osipenko Acked-by: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra114.c | 1 + drivers/clk/tegra/clk-tegra124.c | 2 +- drivers/clk/tegra/clk-tegra20.c | 1 + drivers/clk/tegra/clk-tegra30.c | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) commit ea141d5819db989eb688cee2713b664faba4f1ca Author: Dmitry Osipenko Date: Wed Jan 10 16:59:43 2018 +0300 clk: tegra20: Correct PLL_C_OUT1 setup PLL_C_OUT_1 can't produce 216 MHz defined in the init_table. Let's set it to 240 MHz and explicitly specify HCLK rate for consistency. Signed-off-by: Dmitry Osipenko Acked-by: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra20.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2dcabf053c6ecde46f7aa3612c5a57fb8bd185c4 Author: Dmitry Osipenko Date: Wed Jan 10 16:59:42 2018 +0300 clk: tegra: Mark HCLK, SCLK and EMC as critical Machine dies if HCLK, SCLK or EMC is disabled. Hence mark these clocks as critical. Signed-off-by: Dmitry Osipenko Acked-by: Peter De Schrijver Cc: # v4.16 Signed-off-by: Thierry Reding drivers/clk/tegra/clk-emc.c | 2 +- drivers/clk/tegra/clk-tegra-periph.c | 2 +- drivers/clk/tegra/clk-tegra-super-gen4.c | 8 +++++--- drivers/clk/tegra/clk-tegra114.c | 3 +-- drivers/clk/tegra/clk-tegra124.c | 7 +++---- drivers/clk/tegra/clk-tegra20.c | 23 ++++++++++------------- drivers/clk/tegra/clk-tegra210.c | 3 +-- drivers/clk/tegra/clk-tegra30.c | 14 ++++---------- 8 files changed, 26 insertions(+), 36 deletions(-) commit 4876234acc5441e325f262eec48672ee7f4a0cc6 Author: Corey Minyard Date: Thu Mar 8 14:57:53 2018 -0600 ipmi: Remove ACPI SPMI probing from the system interface driver The IPMI spec states: The purpose of the SPMI Table is to provide a mechanism that can be used by the OSPM (an ACPI term for “OS Operating System-directed configuration and Power Management” essentially meaning an ACPI-aware OS or OS loader) very early in the boot process, e.g., before the ability to execute ACPI control methods in the OS is available. When we are probing IPMI in Linux, ACPI control methods are available, so we shouldn't be probing using SPMI. It could cause some confusion during the probing process. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_platform.c | 154 ----------------------------------- 1 file changed, 154 deletions(-) commit 7d287a5d5f809ee34fd510bec8beeb1bb1eb07cb Author: ShuFan Lee Date: Mon Mar 12 19:55:24 2018 +0800 staging: typec: modify parameter of tcpci_irq The parameter, dev_id, of tcpci_irq should be tcpci_chip. Remove definition of TCPC_CC_STATUS_DRPRST in tcpci.h. Fixes: 8f9439022648("staging: typec: handle vendor defined part and modify drp toggling flow") Signed-off-by: ShuFan Lee Reviewed-by: Li Jun Tested-by: Li Jun Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpci.c | 4 ++-- drivers/staging/typec/tcpci.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) commit 4866b1dce0389013a268f0ab63f7229b30c6e5fe Author: Corey Minyard Date: Thu Mar 8 15:00:28 2018 -0600 ipmi: Remove ACPI SPMI probing from the SSIF (I2C) driver The IPMI spec states: The purpose of the SPMI Table is to provide a mechanism that can be used by the OSPM (an ACPI term for “OS Operating System-directed configuration and Power Management” essentially meaning an ACPI-aware OS or OS loader) very early in the boot process, e.g., before the ability to execute ACPI control methods in the OS is available. When we are probing IPMI in Linux, ACPI control methods are available, so we shouldn't be probing using SPMI. It could cause some confusion during the probing process. Signed-off-by: Corey Minyard Tested-by: Jiandi An drivers/char/ipmi/ipmi_ssif.c | 105 ------------------------------------------ 1 file changed, 105 deletions(-) commit 02428742639bc3300c8c527b054d0ec0bdf5571d Author: Andy Shevchenko Date: Tue Feb 20 20:05:06 2018 +0200 x86/platform/intel-mid: Add special handling for ACPI HW reduced platforms When switching to ACPI HW reduced platforms we still want to initialize timers. Override x86_init.acpi.reduced_hw_init to achieve that. Signed-off-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki Cc: Eric Biederman Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Thomas Gleixner Cc: linux-acpi@vger.kernel.org Link: http://lkml.kernel.org/r/20180220180506.65523-3-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/intel-mid.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 81b53e5ff21e09b42525cfa08f2b0af2b8c5f465 Author: Andy Shevchenko Date: Tue Feb 20 20:05:05 2018 +0200 ACPI, x86/boot: Introduce the ->reduced_hw_early_init() ACPI callback Some ACPI hardware reduced platforms need to initialize certain devices defined by the ACPI hardware specification even though in principle those devices should not be present in an ACPI hardware reduced platform. To allow that to happen, make it possible to override the generic x86_init callbacks and provide a custom legacy_pic value, add a new ->reduced_hw_early_init() callback to struct x86_init_acpi and make acpi_reduced_hw_init() use it. Signed-off-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki Cc: Eric Biederman Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Thomas Gleixner Cc: linux-acpi@vger.kernel.org Link: http://lkml.kernel.org/r/20180220180506.65523-2-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/x86_init.h | 2 ++ arch/x86/kernel/acpi/boot.c | 2 +- arch/x86/kernel/x86_init.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) commit 50beba07a0e42ebd4454adc97515a2a2a969645b Author: Andy Shevchenko Date: Tue Feb 20 20:05:04 2018 +0200 ACPI, x86/boot: Split out acpi_generic_reduce_hw_init() and export This is a preparation patch to allow override the hardware reduced initialization on ACPI enabled platforms. No functional change intended. Signed-off-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki Cc: Eric Biederman Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Thomas Gleixner Cc: linux-acpi@vger.kernel.org Link: http://lkml.kernel.org/r/20180220180506.65523-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/acpi.h | 4 ++++ arch/x86/kernel/acpi/boot.c | 22 +++++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) commit ac605bee0bfab40fd5d11964705e907d2d5a32de Author: Dmitry Vyukov Date: Mon Jan 29 18:26:07 2018 +0100 locking/atomic, asm-generic, x86: Add comments for atomic instrumentation The comments are factored out from the code changes to make them easier to read. Add them separately to explain some non-obvious aspects. Signed-off-by: Dmitry Vyukov Cc: Andrew Morton Cc: Andrey Ryabinin Cc: Linus Torvalds Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: kasan-dev@googlegroups.com Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/cc595efc644bb905407012d82d3eb8bac3368e7a.1517246437.git.dvyukov@google.com Signed-off-by: Ingo Molnar arch/x86/include/asm/atomic.h | 4 ++++ include/asm-generic/atomic-instrumented.h | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) commit a35353bb9eb1990a44a0d7585f99e9589bcdb682 Author: Dmitry Vyukov Date: Mon Jan 29 18:26:06 2018 +0100 locking/atomic, asm-generic: Add KASAN instrumentation to atomic operations KASAN uses compiler instrumentation to intercept all memory accesses. But it does not see memory accesses done in assembly code. One notable user of assembly code is atomic operations. Frequently, for example, an atomic reference decrement is the last access to an object and a good candidate for a racy use-after-free. Add manual KASAN checks to atomic operations. Signed-off-by: Dmitry Vyukov Cc: Andrew Morton , Cc: Andrey Ryabinin , Cc: Linus Torvalds Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon , Cc: kasan-dev@googlegroups.com Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/2fa6e7f0210fd20fe404e5b67e6e9213af2b69a1.1517246437.git.dvyukov@google.com Signed-off-by: Ingo Molnar include/asm-generic/atomic-instrumented.h | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 8bf705d130396e69c04cd8e6e010244ad2ce71f4 Author: Dmitry Vyukov Date: Mon Jan 29 18:26:05 2018 +0100 locking/atomic/x86: Switch atomic.h to use atomic-instrumented.h Add arch_ prefix to all atomic operations and include . This will allow to add KASAN instrumentation to all atomic ops. Signed-off-by: Dmitry Vyukov Cc: Andrew Morton Cc: Andrey Ryabinin Cc: Linus Torvalds Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: kasan-dev@googlegroups.com Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/54f0eb64260b84199e538652e079a89b5423ad41.1517246437.git.dvyukov@google.com Signed-off-by: Ingo Molnar arch/x86/include/asm/atomic.h | 102 ++++++++++++++++++----------------- arch/x86/include/asm/atomic64_32.h | 106 ++++++++++++++++++------------------ arch/x86/include/asm/atomic64_64.h | 108 ++++++++++++++++++------------------- arch/x86/include/asm/cmpxchg.h | 12 ++--- arch/x86/include/asm/cmpxchg_32.h | 8 +-- arch/x86/include/asm/cmpxchg_64.h | 4 +- 6 files changed, 172 insertions(+), 168 deletions(-) commit b06ed71a624ba088a3e3e3ac7d4185f48c7c1660 Author: Dmitry Vyukov Date: Mon Jan 29 18:26:04 2018 +0100 locking/atomic, asm-generic: Add asm-generic/atomic-instrumented.h The new header allows to wrap per-arch atomic operations and add common functionality to all of them. Signed-off-by: Dmitry Vyukov Acked-by: Mark Rutland Cc: Andrew Morton Cc: Andrey Ryabinin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: kasan-dev@googlegroups.com Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/31040b4e126bce801d2cc85a9c444b4332a88aa8.1517246437.git.dvyukov@google.com Link: http://lkml.kernel.org/r/4ffbfa72c29134ac87b1f69da1506a5720590b5d.1497690003.git.dvyukov@google.com Signed-off-by: Ingo Molnar include/asm-generic/atomic-instrumented.h | 393 ++++++++++++++++++++++++++++++ 1 file changed, 393 insertions(+) commit 9884afa2fdce71cd35bb79303f9050f0d76e3d03 Merge: fbfcd01 0c8efd6 Author: Ingo Molnar Date: Mon Mar 12 12:14:57 2018 +0100 Merge tag 'v4.16-rc5' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit 24c517856af6511be1339dd55edd131160e37aac Author: Kirill A. Shutemov Date: Mon Mar 5 19:25:53 2018 +0300 x86/pconfig: Provide defines and helper to run MKTME_KEY_PROG leaf MKTME_KEY_PROG allows to manipulate MKTME keys in the CPU. Signed-off-by: Kirill A. Shutemov Cc: Dave Hansen Cc: Kai Huang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tom Lendacky Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180305162610.37510-6-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/intel_pconfig.h | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit be7825c19b4866ddc7b1431740b69ede2eeb93c1 Author: Kirill A. Shutemov Date: Mon Mar 5 19:25:52 2018 +0300 x86/pconfig: Detect PCONFIG targets Intel PCONFIG targets are enumerated via new CPUID leaf 0x1b. This patch detects all supported targets of PCONFIG and implements helper to check if the target is supported. Signed-off-by: Kirill A. Shutemov Cc: Dave Hansen Cc: Kai Huang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tom Lendacky Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180305162610.37510-5-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/intel_pconfig.h | 15 +++++++ arch/x86/kernel/cpu/Makefile | 2 +- arch/x86/kernel/cpu/intel_pconfig.c | 82 ++++++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+), 1 deletion(-) commit cb06d8e3d020c30fe10ae711c925a5319ab82c88 Author: Kirill A. Shutemov Date: Mon Mar 5 19:25:50 2018 +0300 x86/tme: Detect if TME and MKTME is activated by BIOS IA32_TME_ACTIVATE MSR (0x982) can be used to check if BIOS has enabled TME and MKTME. It includes which encryption policy/algorithm is selected for TME or available for MKTME. For MKTME, the MSR also enumerates how many KeyIDs are available. We would need to exclude KeyID bits from physical address bits. detect_tme() would adjust cpuinfo_x86::x86_phys_bits accordingly. We have to do this even if we are not going to use KeyID bits ourself. VM guests still have to know that these bits are not usable for physical address. Signed-off-by: Kirill A. Shutemov Cc: Dave Hansen Cc: Kai Huang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tom Lendacky Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180305162610.37510-3-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/intel.c | 90 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) commit 3c76db70eb70a0fbd40b3e0dec8f69ca344d1ff8 Merge: 194a974 7958b22 Author: Ingo Molnar Date: Mon Mar 12 12:10:03 2018 +0100 Merge branch 'x86/pti' into x86/mm, to pick up dependencies Signed-off-by: Ingo Molnar commit 0629a01920c0f8a3f825361b24863d760610884a Author: Sean Wang Date: Fri Feb 23 18:16:26 2018 +0800 arm: dts: mt7623: fix USB initialization fails on bananapi-r2 Fix that USB initialization fails as below runtime log is present during booting on bananapi-r2 board by adding missing regulators the USB device requires. Current regulators USB device uses are being updated with the correct ones to reflect real configurations which are all from fixed regulators rather than MT6323 one's output. xhci-mtk 1a1c0000.usb: 1a1c0000.usb supply vbus not found, using dummy regulator xhci-mtk 1a240000.usb: 1a240000.usb supply vbus not found, using dummy regulator Cc: stable@vger.kernel.org Fixes: f4ff257cd160 ("arm: dts: mt7623: add support for Bananapi R2 (BPI-R2) board") Signed-off-by: Sean Wang [mb: update kernel log in commit message] Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 194a9749c73d650c0b1dfdee04fb0bdf0a888ba8 Author: Kirill A. Shutemov Date: Mon Mar 12 13:02:46 2018 +0300 x86/boot/compressed/64: Handle 5-level paging boot if kernel is above 4G This patch addresses a shortcoming in current boot process on machines that supports 5-level paging. If a bootloader enables 64-bit mode with 4-level paging, we might need to switch over to 5-level paging. The switching requires the disabling paging. It works fine if kernel itself is loaded below 4G. But if the bootloader put the kernel above 4G (not sure if anybody does this), we would lose control as soon as paging is disabled, because the code becomes unreachable to the CPU. This patch implements a trampoline in lower memory to handle this situation. We only need the memory for a very short time, until the main kernel image sets up own page tables. We go through the trampoline even if we don't have to: if we're already in 5-level paging mode or if we don't need to switch to it. This way the trampoline gets tested on every boot. Signed-off-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Cyrill Gorcunov Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180312100246.89175-5-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/head_64.S | 69 +++++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 16 deletions(-) commit 0a1756bd2897951c03c1cb671bdfd40729ac2177 Author: Kirill A. Shutemov Date: Mon Mar 12 13:02:45 2018 +0300 x86/boot/compressed/64: Use page table in trampoline memory If a bootloader enables 64-bit mode with 4-level paging, we might need to switch over to 5-level paging. The switching requires the disabling paging. It works fine if kernel itself is loaded below 4G. But if the bootloader put the kernel above 4G (i.e. in kexec() case), we would lose control as soon as paging is disabled, because the code becomes unreachable to the CPU. To handle the situation, we need a trampoline in lower memory that would take care of switching on 5-level paging. Apart from the trampoline code itself we also need a place to store top-level page table in lower memory as we don't have a way to load 64-bit values into CR3 in 32-bit mode. We only really need 8 bytes there as we only use the very first entry of the page table. But we allocate a whole page anyway. This patch switches 32-bit code to use page table in trampoline memory. Signed-off-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Cyrill Gorcunov Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180312100246.89175-4-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/head_64.S | 47 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 24 deletions(-) commit f7ff53e4702be9ac49deacd518dd243de45c9980 Author: Kirill A. Shutemov Date: Mon Mar 12 13:02:44 2018 +0300 x86/boot/compressed/64: Use stack from trampoline memory As the first step on using trampoline memory, let's make 32-bit code use stack there. Separate stack is required to return back from trampoline and we cannot user stack from 64-bit mode as it may be above 4G. Signed-off-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Cyrill Gorcunov Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180312100246.89175-3-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/head_64.S | 6 ++++++ 1 file changed, 6 insertions(+) commit 7beebaccd5083d61e975acb581bd528b9326e7c4 Author: Kirill A. Shutemov Date: Mon Mar 12 13:02:43 2018 +0300 x86/boot/compressed/64: Make sure we have a 32-bit code segment When kernel starts in 64-bit mode we inherit the GDT from the bootloader. It may cause a problem if the GDT doesn't have a 32-bit code segment where we expect it to be. Load our own GDT with known segments. Signed-off-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Cyrill Gorcunov Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180312100246.89175-2-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/head_64.S | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 948e068454568789792f9f10c3242c2bfb8ddbdc Author: Sylwester Nawrocki Date: Mon Mar 12 11:23:27 2018 +0100 clk: samsung: exynos5420: Add more entries to EPLL rate table Adding these EPLL output frequency entries allows to support all required audio sample rates on the CODEC and the HDMI interface on Peach-Pit Chromebook. Signed-off-by: Sylwester Nawrocki Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5420.c | 3 +++ 1 file changed, 3 insertions(+) commit 06255a92793925474ea806d0c46ed8a82c49bcc7 Author: Sylwester Nawrocki Date: Wed Mar 7 17:46:55 2018 +0100 clk: samsung: exynos5420: Add CLK_SET_RATE_PARENT flag to mout_mau_epll_clk This allows changing the EPLL output frequency through the audio subsystem clock tree leaf clocks. This change is needed to support audio on the HDMI interface on Peach-Pi(t) Chromebook. Signed-off-by: Sylwester Nawrocki Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5420.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 03151b8989257bfcee6cfd5f06d9a4a06b781cf3 Author: Jeffy Chen Date: Mon Mar 12 17:51:42 2018 +0800 ARM: rockchip: Set name of pmu regmap_config in smp code We are now allowing to register debugfs without a valid device, and not having a valid name will end up using "dummy*" to create debugfs dir. Signed-off-by: Jeffy Chen Signed-off-by: Heiko Stuebner arch/arm/mach-rockchip/platsmp.c | 1 + 1 file changed, 1 insertion(+) commit 3f7f3b0fb4563947424673d9b6786f46111462d9 Author: Shunqian Zheng Date: Mon Mar 12 09:50:48 2018 +0800 arm64: dts: rockchip: assign clock rate for ACLK_VIO on rk3399 The ACLK_VIO is a parent clock used by a several children, its suggested clock rate is 400MHz. Right now it gets 400MHz because it sources from CPLL(800M) and divides by 2 after reset. It's good not to rely on default values like this, so let's explicitly set it. NOTE: it's expected that at least one board may override cru node and set the CPLL to 1.6 GHz. On that board it will be very important to be explicit about aclk-vio being 400 MHz. Signed-off-by: Shunqian Zheng Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 6 ++++-- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit 03781e40890c18bdea40092355b61431d0073c1d Author: Sai Praneeth Date: Mon Mar 12 09:43:55 2018 +0000 x86/efi: Use efi_switch_mm() rather than manually twiddling with %cr3 Use helper function efi_switch_mm() to switch to/from efi_mm when invoking any UEFI runtime services. Likewise, we need to switch back to previous mm (mm context stolen by efi_mm) after the above calls return successfully. We can use efi_switch_mm() helper function only with x86_64 kernel and "efi=old_map" disabled because, x86_32 and efi=old_map do not use efi_pgd, rather they use swapper_pg_dir. Tested-by: Bhupesh Sharma [ardb: add #include of sched/task.h for task_lock/_unlock] Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Ard Biesheuvel Reviewed-by: Matt Fleming Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Lee, Chun-Yi Cc: Linus Torvalds Cc: Michael S. Tsirkin Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Ricardo Neri Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-efi@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/efi.h | 25 +++++++++------------- arch/x86/platform/efi/efi_64.c | 41 +++++++++++++++++++----------------- arch/x86/platform/efi/efi_thunk_64.S | 2 +- 3 files changed, 33 insertions(+), 35 deletions(-) commit 3ede3417f8d59fff5c07339b310b343468c81b07 Author: Sai Praneeth Date: Mon Mar 12 09:43:54 2018 +0000 x86/efi: Replace efi_pgd with efi_mm.pgd Since the previous patch added support for efi_mm, let's handle efi_pgd through efi_mm and remove global variable efi_pgd. Tested-by: Bhupesh Sharma Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Ard Biesheuvel Reviewed-by: Matt Fleming Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Lee, Chun-Yi Cc: Linus Torvalds Cc: Michael S. Tsirkin Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Ricardo Neri Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-efi@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/mm/debug_pagetables.c | 6 +++--- arch/x86/platform/efi/efi_64.c | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) commit fbfcd0199170984bd3c2812e49ed0fe7b226959a Author: Andrea Parri Date: Tue Feb 27 05:00:58 2018 +0100 locking/xchg/alpha: Remove superfluous memory barriers from the _local() variants The following two commits: 79d442461df74 ("locking/xchg/alpha: Clean up barrier usage by using smp_mb() in place of __ASM__MB") 472e8c55cf662 ("locking/xchg/alpha: Fix xchg() and cmpxchg() memory ordering bugs") ... ended up adding unnecessary barriers to the _local() variants on Alpha, which the previous code took care to avoid. Fix them by adding the smp_mb() into the cmpxchg() macro rather than into the ____cmpxchg() variants. Reported-by: Will Deacon Signed-off-by: Andrea Parri Cc: Alan Stern Cc: Andrew Morton Cc: Ivan Kokshaysky Cc: Linus Torvalds Cc: Matt Turner Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Richard Henderson Cc: Thomas Gleixner Cc: linux-alpha@vger.kernel.org Fixes: 472e8c55cf662 ("locking/xchg/alpha: Fix xchg() and cmpxchg() memory ordering bugs") Fixes: 79d442461df74 ("locking/xchg/alpha: Clean up barrier usage by using smp_mb() in place of __ASM__MB") Link: http://lkml.kernel.org/r/1519704058-13430-1-git-send-email-parri.andrea@gmail.com Signed-off-by: Ingo Molnar arch/alpha/include/asm/cmpxchg.h | 20 ++++++++++++++++---- arch/alpha/include/asm/xchg.h | 27 --------------------------- 2 files changed, 16 insertions(+), 31 deletions(-) commit 9e49e2447c6385e45c6fddd70d6c0e917e21b669 Author: Peter Zijlstra Date: Tue Feb 27 17:05:10 2018 +0100 sched/core: Remove TASK_ALL It's unused: $ git grep "\" | wc -l 1 ... and it is also dangerous, kill the bugger. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180227160510.10829-1-bigeasy@linutronix.de Signed-off-by: Ingo Molnar include/linux/sched.h | 1 - 1 file changed, 1 deletion(-) commit d7119224bfe6e8efbf821a52db7da9530d790f07 Author: Chen-Yu Tsai Date: Fri Jan 19 17:25:41 2018 +0800 phy: allwinner: sun4i-usb: poll vbus changes on A23/A33 when driving VBUS The AXP223 PMIC, like the AXP221, does not generate VBUS change interrupts when N_VBUSEN is used to drive VBUS for the OTG port on the board. This was not noticed until recently, as most A23/A33 boards use a GPIO pin that does not support interrupts for OTG ID detection. This forces the driver to use polling. However the A33-OlinuXino uses a pin that does support interrupts, so the driver uses them. However the VBUS interrupt never fires, and the driver never gets to update the VBUS status. This results in musb timing out waiting for VBUS to rise. This was worked around for the AXP221 by resorting to polling changes in commit 91d96f06a760 ("phy-sun4i-usb: Add workaround for missing Vbus det interrupts on A31"). This patch adds the A23 and A33 to the list of SoCs that need the workaround. Fixes: fc1f45ed3043 ("phy-sun4i-usb: Add support for the usb-phys on the sun8i-a33 SoC") Fixes: 123dfdbcfaf5 ("phy-sun4i-usb: Add support for the usb-phys on the sun8i-a23 SoC") Cc: # 4.3.x: 68dbc2ce77bb phy-sun4i-usb: Use of_match_node to get model specific config data Cc: # 4.3.x: 5cf700ac9d50 phy: phy-sun4i-usb: Fix optional gpios failing probe Cc: # 4.3.x: 04e59a0211ff phy-sun4i-usb: Fix irq free conditions to match request conditions Cc: # 4.3.x: 91d96f06a760 phy-sun4i-usb: Add workaround for missing Vbus det interrupts on A31 Cc: # 4.3.x Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Kishon Vijay Abraham I drivers/phy/allwinner/phy-sun4i-usb.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit a5b162b2ecb013ed517ab5ce90079117ada743f4 Author: Kirill A. Shutemov Date: Mon Mar 5 11:16:41 2018 +0300 x86/mm: Do not use paravirtualized calls in native_set_p4d() In 4-level paging mode, native_set_p4d() updates the entry in the top-level page table. With PTI, update to the top-level kernel page table requires update to the userspace copy of the table as well, using pti_set_user_pgd(). native_set_p4d() uses p4d_val() and pgd_val() to convert types between p4d_t and pgd_t. p4d_val() and pgd_val() are paravirtualized and we must not use them in native helpers, as they crash the boot in paravirtualized environments. Replace p4d_val() and pgd_val() with native_p4d_val() and native_pgd_val() in native_set_p4d(). Reported-by: Fengguang Wu Signed-off-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 91f606a8fa68 ("x86/mm: Replace compile-time checks for 5-level paging with runtime-time checks") Link: http://lkml.kernel.org/r/20180305081641.4290-1-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable_64.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3f4a9729c4f46198981a049bd8ad5a19764176c3 Author: Sean Wang Date: Fri Feb 23 18:16:24 2018 +0800 dt-bindings: arm: mediatek: add support for more mt7623 reference boards Update binding document for more mt7623[A,N] reference boards being supported. Signed-off-by: Sean Wang Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/arm/mediatek.txt | 9 +++++++++ 1 file changed, 9 insertions(+) commit fdff86229f9f736959c66b8999c098f940828a26 Author: Ioana Radulescu Date: Fri Mar 9 12:40:56 2018 -0600 staging: fsl-dpaa2/eth: allow the driver to compile multi-arch Drop dependency on ARCH_LAYERSCAPE (which in turn depends on ARM64), thus allowing this driver to compile on all architectures supported by the fsl-mc bus driver. This was compile tested on: - powerpc (corenet_basic_defconfig, ppc64_defconfig) - x86 (i386_defconfig, x86_64_defconfig, needs CONFIG_OF) - arm64 (defconfig) Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 504e7a5c5a9b942583827f9c141c513da505e1bd Author: Ioana Radulescu Date: Fri Mar 9 12:40:55 2018 -0600 staging: fsl-dpaa2/eth: Use __leXX types where needed One MC command structure got away with using uXX fields instead of __leXX. Fix it. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpni-cmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4451c287eb26ae40501689f9ee8cd17ae9220ccc Author: Christoph Fritz Date: Sat Dec 16 14:13:36 2017 +0100 drm/panel: Add support for AUO G104SN02 V2 panel This patch adds support for AUO G104SN02 V2 800x600 10.4" panel to DRM simple panel driver. Signed-off-by: Christoph Fritz Signed-off-by: Stefan Riedmueller Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1513430016.1930.4.camel@googlemail.com .../bindings/display/panel/auo,g104sn02.txt | 12 ++++++++++ drivers/gpu/drm/panel/panel-simple.c | 26 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit 7ff9288c55b1dd364ab15bcad75a17c72023e919 Author: Wei Yongjun Date: Wed Jan 3 03:08:58 2018 +0000 drm/panel: ili9322: Make local symbols static Fixes the following sparse warnings: drivers/gpu/drm/panel/panel-ilitek-ili9322.c:182:12: warning: symbol 'ili9322_inputs' was not declared. Should it be static? drivers/gpu/drm/panel/panel-ilitek-ili9322.c:343:28: warning: symbol 'ili9322_regmap_config' was not declared. Should it be static? Also change ili9322_inputs to 'const char * const' to avoid chackpatch warning. Signed-off-by: Wei Yongjun Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1514948938-19996-1-git-send-email-weiyongjun1@huawei.com drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8bf7cca9d3d028ef9a6e90c5c3bb306878f576d6 Author: jan.tuerk@emtrion.com Date: Thu Nov 23 13:55:52 2017 +0100 dt-bindings: Add vendor prefix for emtrion GmbH emtrion is a system integrator and manufacturer of embedded systems. Website: https://www.emtrion.de Signed-off-by: Jan Tuerk Reviewed-by: Andreas Färber Acked-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20171123125600.41562-3-jan.tuerk@emtrion.com Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 36b649760e94968e0495b73284aaf07eed0a328f Author: Ard Biesheuvel Date: Mon Mar 12 08:45:00 2018 +0000 efi: Use string literals for efi_char16_t variable initializers Now that we unambiguously build the entire kernel with -fshort-wchar, it is no longer necessary to open code efi_char16_t[] initializers as arrays of characters, and we can move to the L"xxx" notation instead. Signed-off-by: Ard Biesheuvel Cc: Arnd Bergmann Cc: Linus Torvalds Cc: Lukas Wunner Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180312084500.10764-6-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/boot/compressed/eboot.c | 3 ++- arch/x86/platform/efi/quirks.c | 8 +++++--- drivers/firmware/efi/libstub/Makefile | 2 +- drivers/firmware/efi/libstub/secureboot.c | 12 +++--------- drivers/firmware/efi/libstub/tpm.c | 7 ++----- 5 files changed, 13 insertions(+), 19 deletions(-) commit 136d5d57e35cc6985c57d23d0c823133e3508bed Author: Ard Biesheuvel Date: Mon Mar 12 08:44:59 2018 +0000 efi/esrt: Fix handling of early ESRT table mapping As reported by Tyler, efi_esrt_init() will return without releasing the ESRT table header mapping if it encounters a table with an unexpected version. Replacing the 'return' with 'goto err_memunmap' would fix this particular occurrence, but, as it turns out, the code is rather peculiar to begin with: - it never uses the header mapping after memcpy()'ing out its contents, - it maps and unmaps the entire table without ever looking at the contents. So let's refactor this code to unmap the table header right after the memcpy() so we can get rid of the error handling path altogether, and drop the second mapping entirely. Reported-by: Tyler Baicar Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Jones Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180312084500.10764-5-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/esrt.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 7e904a91bf6049071ef9d605a52f863ae774081d Author: Sai Praneeth Date: Mon Mar 12 08:44:56 2018 +0000 efi: Use efi_mm in x86 as well as ARM Presently, only ARM uses mm_struct to manage EFI page tables and EFI runtime region mappings. As this is the preferred approach, let's make this data structure common across architectures. Specially, for x86, using this data structure improves code maintainability and readability. Tested-by: Bhupesh Sharma [ardb: don't #include the world to get a declaration of struct mm_struct] Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Ard Biesheuvel Reviewed-by: Matt Fleming Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Lee, Chun-Yi Cc: Linus Torvalds Cc: Michael S. Tsirkin Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Ricardo Neri Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180312084500.10764-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/include/asm/efi.h | 1 + arch/x86/platform/efi/efi_64.c | 3 +++ drivers/firmware/efi/arm-runtime.c | 9 --------- drivers/firmware/efi/efi.c | 9 +++++++++ include/linux/efi.h | 2 ++ 5 files changed, 15 insertions(+), 9 deletions(-) commit b0599e2801df79d571c9e9a763b174b9f0edc558 Merge: f779ca7 116fef6 Author: Ingo Molnar Date: Mon Mar 12 10:03:09 2018 +0100 Merge branch 'x86/mm' into efi/core This commit in x86/mm changed EFI code: 116fef640859: x86/mm/dump_pagetables: Add the EFI pagetable to the debugfs 'page_tables' directory So merge in that commit plus its dependencies, before continuing with EFI work. Signed-off-by: Ingo Molnar commit 2dab3bf851fa2204d4a99549f1c4d34390840691 Author: Philippe CORNU Date: Fri Jan 19 12:05:16 2018 +0100 drm/panel: otm8009a: Adopt SPDX identifiers Add SPDX identifiers to OriseTech OTM8009a panel driver. Signed-off-by: Philippe Cornu Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180119110516.4916-1-philippe.cornu@st.com drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6abd061df903be386f62163b093786708d481b09 Author: Baruch Siach Date: Mon Jan 22 18:01:42 2018 +0200 drm/panel: lvds: Fix driver description heading Cc: Laurent Pinchart Signed-off-by: Baruch Siach Reviewed-by: Laurent Pinchart Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/f80a5dd350b057d925d36f5857b5724c88da50df.1516636902.git.baruch@tkos.co.il drivers/gpu/drm/panel/panel-lvds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8cfe83419cdbcd6a1255083a332c62dae8f6fe6c Author: Jagan Teki Date: Sun Feb 4 23:19:28 2018 +0530 drm/panel: simple: Add support for KEO TX31D200VM0BAA This adds support for the Kaohsiung Opto-Electronics., TX31D200VM0BAA 12.3" HSXGA LVDS panel, which can be supported by the simple panel driver. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1517766571-409-5-git-send-email-jagan@amarulasolutions.com .../bindings/display/panel/koe,tx31d200vm0baa.txt | 25 ++++++++++++++++++++ drivers/gpu/drm/panel/panel-simple.c | 27 ++++++++++++++++++++++ 2 files changed, 52 insertions(+) commit ded8d7fe8d363d20430d38c402768056e38cc3eb Author: Philippe CORNU Date: Mon Feb 5 10:45:32 2018 +0100 drm/panel: otm8009a: Add support for the optional power-supply Add support for the optional power-supply. Note: A "dummy regulator" is returned by devm_regulator_get() if the optional regulator is not present in the device tree, simplifying the source code when enabling/disabling the regulator. Signed-off-by: Philippe Cornu Reviewed-by: Yannick Fertré Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180205094532.23547-3-philippe.cornu@st.com drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit afa22ac79d5e45d2d7c3e388d38bb9401b8d2f2c Author: Chen-Yu Tsai Date: Mon Mar 12 12:21:16 2018 +0800 ARM: dts: sun8i: reference tablet design: Enable PMIC power supplies The A23/A33 reference tablet design has a DC barrel tied to the ACIN of the PMIC. And being a tablet, it has a Li-Po battery. Enable both power supplies in the device tree. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 683ad26121ed3ae47b204583eb7b220c700101fe Author: Philippe CORNU Date: Mon Feb 5 10:45:31 2018 +0100 dt-bindings/display/panel: otm8009a: Add optional power-supply property Some boards use a dedicated voltage regulator for this panel. Add & document this related optional power-supply property. Signed-off-by: Philippe Cornu Reviewed-by: Yannick Fertré Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180205094532.23547-2-philippe.cornu@st.com Documentation/devicetree/bindings/display/panel/orisetech,otm8009a.txt | 2 ++ 1 file changed, 2 insertions(+) commit c100a583601d357f923c41af5434dc1f8d07890f Author: Baoquan He Date: Fri Mar 2 13:18:01 2018 +0800 kdump, vmcoreinfo: Export pgtable_l5_enabled value User-space utilities examining crash-kernels need to know if the crashed kernel was in 5-level paging mode or not. So write 'pgtable_l5_enabled' to vmcoreinfo, which covers these three cases: pgtable_l5_enabled == 0 when: - Compiled with !CONFIG_X86_5LEVEL - Compiled with CONFIG_X86_5LEVEL=y while CPU has no 'la57' flag pgtable_l5_enabled != 0 when: - Compiled with CONFIG_X86_5LEVEL=y and CPU has 'la57' flag Signed-off-by: Baoquan He Acked-by: Kirill A. Shutemov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: douly.fnst@cn.fujitsu.com Cc: dyoung@redhat.com Cc: ebiederm@xmission.com Cc: kirill.shutemov@linux.intel.com Cc: vgoyal@redhat.com Link: http://lkml.kernel.org/r/20180302051801.19594-1-bhe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/machine_kexec_64.c | 1 + 1 file changed, 1 insertion(+) commit 65263e970ab53dc992a0de7917549c76e4bc7f88 Author: Chen-Yu Tsai Date: Mon Mar 12 12:23:56 2018 +0800 ARM: dts: sun8i: a33: Enable A33 internal audio codec on A33-OLinuXino The A33-OLinuXino routes the SoC's headphone output to a headphone jack, and the microphone input to a microphone jack. Power to the microphone is provided by MBIAS. This patch enables the various parts of the codec, and adds widgets and routes for simple-card. HBIAS is connected to the microphone jack as well, but in a manner that is confusing and likely does not provide power. This part is left out of this patch. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 42e681f3b30fb359a7b11db9b0f03e6a2babae4b Author: Chen-Yu Tsai Date: Mon Mar 12 12:23:55 2018 +0800 ARM: dts: sun8i: a33: Enable PMIC power supplies on A33-OLinuXino The A33-OLinuXino has a DC jack wired to the onboard PMIC's ACIN pins. There is also a battery connector, wired to the PMIC's battery charger. Enable the power supplies for both these components. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit c5440962f436fa6bcba8f9ca3b37b70133b587f0 Author: Chen-Yu Tsai Date: Mon Mar 12 12:23:54 2018 +0800 ARM: dts: sun8i: a33: Drop sunxi-common-regulators.dtsi for A33-OLinuXino None of the common regulators defined in sunxi-common-regulators.dtsi are used for the A33-OLinuXino. Drop the include. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 1 - 1 file changed, 1 deletion(-) commit 4f8ecb0041831e65d0d3a80f73f8242c637ef25c Author: Chen-Yu Tsai Date: Mon Mar 12 12:23:53 2018 +0800 ARM: dts: sun8i: a33: Drop GPIO pinmux settings for A33-OLinuXino Normal GPIO usage does not need an additional pinmix setting. Exclusive usage of the pin will be guaranteed by the driver. Drop the extra pinmux settings. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) commit e9d0e6330eb81ca49bdd8849cc52b3b0f70ed5cb Author: Kirill A. Shutemov Date: Mon Feb 26 21:04:51 2018 +0300 x86/boot/compressed/64: Prepare new top-level page table for trampoline If trampoline code would need to switch between 4- and 5-level paging modes, we have to use a page table in trampoline memory. Having it in trampoline memory guarantees that it's below 4G and we can point CR3 to it from 32-bit trampoline code. We only use the page table if the desired paging mode doesn't match the mode we are in. Otherwise the page table is unused and trampoline code wouldn't touch CR3. For 4- to 5-level paging transition, we set up current (4-level paging) CR3 as the first and the only entry in a new top-level page table. For 5- to 4-level paging transition, copy page table pointed by first entry in the current top-level page table as our new top-level page table. If the page table is used by trampoline we would need to copy it to new page table outside trampoline and update CR3 before restoring trampoline memory. Tested-by: Borislav Petkov Signed-off-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Andy Shevchenko Cc: Cyrill Gorcunov Cc: Eric Biederman Cc: H. Peter Anvin Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180226180451.86788-6-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/pgtable_64.c | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 32fcefa2bfc8961987e91d1daeb00624b4176d2e Author: Kirill A. Shutemov Date: Mon Feb 26 21:04:50 2018 +0300 x86/boot/compressed/64: Set up trampoline memory This patch clears up trampoline memory and copies trampoline code in place. It's not yet used though. Tested-by: Borislav Petkov Signed-off-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Andy Shevchenko Cc: Cyrill Gorcunov Cc: Eric Biederman Cc: H. Peter Anvin Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180226180451.86788-5-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/head_64.S | 3 ++- arch/x86/boot/compressed/pgtable.h | 9 +++++++++ arch/x86/boot/compressed/pgtable_64.c | 7 +++++++ 3 files changed, 18 insertions(+), 1 deletion(-) commit fb5268354d20b82c12569e325b0d051c09f983f7 Author: Kirill A. Shutemov Date: Mon Feb 26 21:04:49 2018 +0300 x86/boot/compressed/64: Save and restore trampoline memory The memory area we found for trampoline shouldn't contain anything useful. But let's preserve the data anyway. Just to be on safe side. paging_prepare() would save the data into a buffer. cleanup_trampoline() would restore it back once we are done with the trampoline. Tested-by: Borislav Petkov Signed-off-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Andy Shevchenko Cc: Cyrill Gorcunov Cc: Eric Biederman Cc: H. Peter Anvin Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180226180451.86788-4-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/head_64.S | 10 ++++++++++ arch/x86/boot/compressed/pgtable_64.c | 13 +++++++++++++ 2 files changed, 23 insertions(+) commit 3548e131ec6a82208f36e68d31947b0fe244c7a7 Author: Kirill A. Shutemov Date: Mon Feb 26 21:04:48 2018 +0300 x86/boot/compressed/64: Find a place for 32-bit trampoline If a bootloader enables 64-bit mode with 4-level paging, we might need to switch over to 5-level paging. The switching requires the disabling of paging, which works fine if kernel itself is loaded below 4G. But if the bootloader puts the kernel above 4G (not sure if anybody does this), we would lose control as soon as paging is disabled, because the code becomes unreachable to the CPU. To handle the situation, we need a trampoline in lower memory that would take care of switching on 5-level paging. This patch finds a spot in low memory for a trampoline. The heuristic is based on code in reserve_bios_regions(). We find the end of low memory based on BIOS and EBDA start addresses. The trampoline is put just before end of low memory. It's mimic approach taken to allocate memory for realtime trampoline. Tested-by: Borislav Petkov Signed-off-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Andy Shevchenko Cc: Cyrill Gorcunov Cc: Eric Biederman Cc: H. Peter Anvin Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180226180451.86788-3-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/misc.c | 6 ++++++ arch/x86/boot/compressed/pgtable.h | 11 +++++++++++ arch/x86/boot/compressed/pgtable_64.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) commit 9f7bae2db15bfd8598744bd10ad1d05fcfe02ebf Author: Sean Paul Date: Thu Feb 8 12:48:52 2018 -0500 drm/panel: simple: Use display_timing for lq123p1jx31 Convert the sharp lq123p1jx31 from using a fixed mode to specifying a display timing with min/typ/max values. This allows us to capture the timings set forth in the datasheet as well as the additional values that we've cleared with the display vendor to avoid interference with the digitizer on the Samsung Chromebook Plus (kevin). A follow-on patch will specify the override mode for kevin devices. Changes in v2: - None Changes in v3: - None Cc: Doug Anderson Cc: Eric Anholt Cc: Heiko Stuebner Cc: Jeffy Chen Cc: Rob Herring Cc: Stéphane Marchesin Cc: Thierry Reding Cc: devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Sean Paul Tested-by: Enric Balletbo i Serra Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180208174855.55620-6-seanpaul@chromium.org drivers/gpu/drm/panel/panel-simple.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 98ccf4002294d849a8a78bd422e6f759c3471cb7 Author: Sean Paul Date: Thu Feb 8 12:48:49 2018 -0500 dt-bindings: Add headings to simple-panel bindings In preparation for a new subnode section in a follow-on patch, add explicit headings to the existings sections for simple-panel. Changes in v2: - Added Changes in v3: - None Cc: Doug Anderson Cc: Eric Anholt Cc: Heiko Stuebner Cc: Jeffy Chen Cc: Rob Herring Cc: Stéphane Marchesin Cc: Thierry Reding Cc: devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Sean Paul Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180208174855.55620-3-seanpaul@chromium.org Documentation/devicetree/bindings/display/panel/simple-panel.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 5100964d66f39d1c1100025d5bcd5dc3d2b3a859 Author: Sean Paul Date: Thu Feb 8 12:48:48 2018 -0500 dt-bindings: Clarify timing subnode use as panel-timing Add a note in the documentation explaining when it's appropriate to use the display-timings subnode on its own, as well as the preferred name to use (panel-timing). Changes in v3: - Added Cc: Doug Anderson Cc: Eric Anholt Cc: Heiko Stuebner Cc: Jeffy Chen Cc: Rob Herring Cc: Stéphane Marchesin Cc: Thierry Reding Cc: devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Sean Paul Reviewed-by: Rob Herring Acked-by: Thierry Reding Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180208174855.55620-2-seanpaul@chromium.org Documentation/devicetree/bindings/display/panel/display-timing.txt | 5 +++++ 1 file changed, 5 insertions(+) commit a403d798182f4f7be5e9bab56cfa37e9828fd92a Author: Kirill A. Shutemov Date: Mon Feb 26 21:04:47 2018 +0300 x86/boot/compressed/64: Describe the logic behind the LA57 check The patch explains the LA57 check in more details. Tested-by: Borislav Petkov Signed-off-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Andy Shevchenko Cc: Cyrill Gorcunov Cc: Eric Biederman Cc: H. Peter Anvin Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180226180451.86788-2-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/pgtable_64.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 2b7ed18bed1ade79aa538c8e3dc2cc5c0889fa96 Author: Philippe CORNU Date: Fri Mar 2 16:32:22 2018 +0100 drm/panel: Add support for Raydium RM68200 panel driver This patch adds Raydium Semiconductor Corporation RM68200 5.5" 720x1280 TFT LCD panel driver (MIPI-DSI video mode). Signed-off-by: Philippe Cornu Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180302153222.4377-3-philippe.cornu@st.com drivers/gpu/drm/panel/Kconfig | 8 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-raydium-rm68200.c | 448 ++++++++++++++++++++++++++ 3 files changed, 457 insertions(+) commit d1b0399543cec5fa5d3a2d33b525a7cd7912e635 Author: tianshuliang Date: Mon Mar 5 15:01:32 2018 +0800 clk: hi3798cv200: add emmc sample and drive clock It adds eMMC sample clock HISTB_MMC_SAMPLE_CLK and drive clock HISTB_MMC_DRV_CLK support for Hi3798cv200 SoC. Signed-off-by: tianshuliang Signed-off-by: Jiancheng Xue Signed-off-by: Shawn Guo drivers/clk/hisilicon/crg-hi3798cv200.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 811f67cc16ec76c3953ca1b9d7c34e3f0c17f779 Author: tianshuliang Date: Mon Mar 5 15:01:31 2018 +0800 clk: hisilicon: add hisi phase clock support Add a phase clock type for HiSilicon SoCs,which supports clk_set_phase operation. Signed-off-by: tianshuliang Signed-off-by: Jiancheng Xue Signed-off-by: Shawn Guo drivers/clk/hisilicon/Makefile | 2 +- drivers/clk/hisilicon/clk-hisi-phase.c | 121 +++++++++++++++++++++++++++++++++ drivers/clk/hisilicon/clk.c | 24 +++++++ drivers/clk/hisilicon/clk.h | 19 ++++++ 4 files changed, 165 insertions(+), 1 deletion(-) commit c6a8245e013f961a242e8fc0f6ecb9661c3358cc Author: Philippe CORNU Date: Fri Mar 2 16:32:21 2018 +0100 dt-bindings: display: panel: Add support for Raydium RM68200 DSI panel The Raydium Semiconductor Corporation RM68200 is a 5.5" 720x1280 TFT LCD panel connected using a MIPI-DSI video interface. Reviewed-by: Rob Herring Signed-off-by: Philippe Cornu Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180302153222.4377-2-philippe.cornu@st.com .../bindings/display/panel/raydium,rm68200.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 4e017f1419397473cf3db6e9fa020013998b1aa4 Author: Fabio Estevam Date: Sat Mar 10 14:06:21 2018 -0300 dt-bindings: ifc: Fix the unit address format in the examples DTC warnings will be seen if these examples are used in a real dts file due to a mismatch in the unit address notation. Align the unit address notation to what is done in the real dts files as per commit f81d7af79575 ("arm64: dts: fsl: fix ifc simple-bus unit address format warnings") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f4be9b77fac3d8141add1d84e75199f0e0ddd5a3 Author: Martin Kaiser Date: Tue Mar 6 22:58:19 2018 +0100 ARM: dts: i.MX25: define SSI FIFO depth According to the i.MX25 reference manuals, each SSI has four FIFOs. All of those FIFOs can store up to 15 entries. The fsl_ssi driver's internal default for the FIFO depth in 8. Set our non-default FIFO depth explicitly in the Device Tree. Signed-off-by: Martin Kaiser Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx25.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 5651e5e094591f479adad5830ac1bc45196a39b3 Author: Eric Anholt Date: Fri Mar 9 15:33:32 2018 -0800 drm/panel: simple: Fix the bus format for the Ontat panel This fixes bad color output. When I was first testing the device I had the DPI hardware set to 666 mode, but apparently in the refactor to use the bus_format information from the panel driver, I failed to actually update the panel. Signed-off-by: Eric Anholt Fixes: e8b6f561b2ee ("drm/panel: simple: Add the 7" DPI panel from Adafruit") Cc: Thierry Reding Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180309233332.1769-1-eric@anholt.net drivers/gpu/drm/panel/panel-simple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ab32086d0becee56c75a8ba21f16ac08b80f304 Author: Brian Foster Date: Fri Mar 9 14:02:32 2018 -0800 xfs: account only rmapbt-used blocks against rmapbt perag res The rmapbt perag metadata reservation reserves blocks for the reverse mapping btree (rmapbt). Since the rmapbt uses blocks from the agfl and perag accounting is updated as blocks are allocated from the allocation btrees, the reservation actually accounts blocks as they are allocated to (or freed from) the agfl rather than the rmapbt itself. While this works for blocks that are eventually used for the rmapbt, not all agfl blocks are destined for the rmapbt. Blocks that are allocated to the agfl (and thus "reserved" for the rmapbt) but then used by another structure leads to a growing inconsistency over time between the runtime tracking of rmapbt usage vs. actual rmapbt usage. Since the runtime tracking thinks all agfl blocks are rmapbt blocks, it essentially believes that less future reservation is required to satisfy the rmapbt than what is actually necessary. The inconsistency is rectified across mount cycles because the perag reservation is initialized based on the actual rmapbt usage at mount time. The problem, however, is that the excessive drain of the reservation at runtime opens a window to allocate blocks for other purposes that might be required for the rmapbt on a subsequent mount. This problem can be demonstrated by a simple test that runs an allocation workload to consume agfl blocks over time and then observe the difference in the agfl reservation requirement across an unmount/mount cycle: mount ...: xfs_ag_resv_init: ... resv 3193 ask 3194 len 3194 ... ... : xfs_ag_resv_alloc_extent: ... resv 2957 ask 3194 len 1 umount...: xfs_ag_resv_free: ... resv 2956 ask 3194 len 0 mount ...: xfs_ag_resv_init: ... resv 3052 ask 3194 len 3194 As the above tracepoints show, the reservation requirement reduces from 3194 blocks to 2956 blocks as the workload runs. Without any other changes in the filesystem, the same reservation requirement jumps from 2956 to 3052 blocks over a umount/mount cycle. To address this divergence, update the RMAPBT reservation to account blocks used for the rmapbt only rather than all blocks filled into the agfl. This patch makes several high-level changes toward that end: 1.) Reintroduce an AGFL reservation type to serve as an accounting no-op for blocks allocated to (or freed from) the AGFL. 2.) Invoke RMAPBT usage accounting from the actual rmapbt block allocation path rather than the AGFL allocation path. The first change is required because agfl blocks are considered free blocks throughout their lifetime. The perag reservation subsystem is invoked unconditionally by the allocation subsystem, so we need a way to tell the perag subsystem (via the allocation subsystem) to not make any accounting changes for blocks filled into the AGFL. The second change causes the in-core RMAPBT reservation usage accounting to remain consistent with the on-disk state at all times and eliminates the risk of leaving the rmapbt reservation underfilled. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_ag_resv.c | 4 ++++ fs/xfs/libxfs/xfs_ag_resv.h | 31 +++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_alloc.c | 18 ++++++------------ fs/xfs/libxfs/xfs_rmap_btree.c | 4 ++++ fs/xfs/xfs_mount.h | 1 + 5 files changed, 46 insertions(+), 12 deletions(-) commit 215928633502a7296fec42614463bb49859787d6 Author: Brian Foster Date: Fri Mar 9 14:01:59 2018 -0800 xfs: rename agfl perag res type to rmapbt The AGFL perag reservation type accounts all allocations that feed into (or are released from) the allocation group free list (agfl). The purpose of the reservation is to support worst case conditions for the reverse mapping btree (rmapbt). As such, the agfl reservation usage accounting only considers rmapbt usage when the in-core counters are initialized at mount time. This implementation inconsistency leads to divergence of the in-core and on-disk usage accounting over time. In preparation to resolve this inconsistency and adjust the AGFL reservation into an rmapbt specific reservation, rename the AGFL reservation type and associated accounting fields to something more rmapbt-specific. Also fix up a couple tracepoints that incorrectly use the AGFL reservation type to pass the agfl state of the associated extent where the raw reservation type is expected. Note that this patch does not change perag reservation behavior. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_ag_resv.c | 35 ++++++++++++++++++----------------- fs/xfs/libxfs/xfs_alloc.c | 20 +++++++++----------- fs/xfs/xfs_mount.h | 10 +++++----- fs/xfs/xfs_reflink.c | 2 +- 4 files changed, 33 insertions(+), 34 deletions(-) commit b3fed434822d0873269231f77e23fc801da32569 Author: Brian Foster Date: Fri Mar 9 14:01:58 2018 -0800 xfs: account format bouncing into rmapbt swapext tx reservation The extent swap mechanism requires a unique implementation for rmapbt enabled filesystems. Because the rmapbt tracks extent owner information, extent swap must individually unmap and remap each extent between the two inodes. The rmapbt extent swap transaction block reservation currently accounts for the worst case bmapbt block and rmapbt block consumption based on the extent count of each inode. There is a corner case that exists due to the extent swap implementation that is not covered by this reservation, however. If one of the associated inodes is just over the max extent count used for extent format inodes (i.e., the inode is in btree format by a single extent), the unmap/remap cycle of the extent swap can bounce the inode between extent and btree format multiple times, almost as many times as there are extents in the inode (if the opposing inode happens to have one less, for example). Each back and forth cycle involves a block free and allocation, which isn't a problem except for that the initial transaction reservation must account for the total number of block allocations performed by the chain of deferred operations. If not, a block reservation overrun occurs and the filesystem shuts down. Update the rmapbt extent swap block reservation to check for this situation and add some block reservation slop to ensure the entire operation succeeds. We'd never likely require reservation for both inodes as fsr wouldn't defrag the file in that case, but the additional reservation is constrained by the data fork size so be cautious and check for both. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) commit 3e78b9a4689f722538d4d3457fc10c4bf1d9cf6a Author: Brian Foster Date: Fri Mar 9 14:01:58 2018 -0800 xfs: shutdown if block allocation overruns tx reservation The ->t_blk_res_used field tracks how many blocks have been used in the current transaction. This should never exceed the block reservation (->t_blk_res) for a particular transaction. We currently assert this condition in the transaction block accounting code, but otherwise take no additional action should this situation occur. The overrun generally has no effect if space ends up being available and the associated transaction commits. If the transaction is duplicated, however, the current block usage is used to determine the remaining block reservation to be transferred to the new transaction. If usage exceeds reservation, this calculation underflows and creates a transaction with an invalid and excessive reservation. When the second transaction commits, the release of unused blocks corrupts the in-core free space counters. With lazy superblock accounting enabled, this inconsistency eventually trickles to the on-disk superblock and corrupts the filesystem. Replace the transaction block usage accounting assert with an explicit overrun check. If the transaction overruns the reservation, shutdown the filesystem immediately to prevent corruption. Add a new assert to xfs_trans_dup() to catch any callers that might induce this invalid state in the future. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_trans.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 57e809561118a4db2e19d31282761ca062fd6014 Author: Matthew Wilcox Date: Wed Mar 7 14:59:39 2018 -0800 xfs: Rename xa_ elements to ail_ This is a simple rename, except that xa_ail becomes ail_head. Signed-off-by: Matthew Wilcox Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf_item.c | 10 ++-- fs/xfs/xfs_dquot.c | 4 +- fs/xfs/xfs_dquot_item.c | 11 ++-- fs/xfs/xfs_inode_item.c | 22 +++---- fs/xfs/xfs_log.c | 6 +- fs/xfs/xfs_log_recover.c | 80 ++++++++++++------------- fs/xfs/xfs_trans.c | 18 +++--- fs/xfs/xfs_trans_ail.c | 152 +++++++++++++++++++++++------------------------ fs/xfs/xfs_trans_buf.c | 4 +- fs/xfs/xfs_trans_priv.h | 42 ++++++------- 10 files changed, 175 insertions(+), 174 deletions(-) commit ae23395d8858a0c91de978a60b317ec8468b2aba Author: Dave Chinner Date: Tue Mar 6 17:30:34 2018 -0800 inode: don't memset the inode address space twice Noticed when looking at why cycling 600k inodes/s through the inode cache was taking a total of 8% cpu in memset() during inode initialisation. There is no need to zero the inode.i_data structure twice. This increases single threaded bulkstat throughput from ~200,000 inodes/s to ~220,000 inodes/s, so we save a substantial amount of CPU time per inode init by doing this. Signed-Off-By: Dave Chinner Reviewed-by: Jan Kara Reviewed-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/inode.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit a78ee256c325ecfaec13cafc41b315bd4e1dd518 Author: Dave Chinner Date: Tue Mar 6 17:08:32 2018 -0800 xfs: convert XFS_AGFL_SIZE to a helper function The AGFL size calculation is about to get more complex, so lets turn the macro into a function first and remove the macro. Signed-off-by: Dave Chinner [darrick: forward port to newer kernel, simplify the helper] Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_alloc.c | 31 ++++++++++++++++++++++++------- fs/xfs/libxfs/xfs_alloc.h | 2 ++ fs/xfs/libxfs/xfs_format.h | 13 +------------ fs/xfs/scrub/agheader.c | 6 +++--- fs/xfs/xfs_fsops.c | 2 +- 5 files changed, 31 insertions(+), 23 deletions(-) commit 6231848c3aa5c7378fb0dd7a7fff53e9db7edd09 Author: Darrick J. Wong Date: Tue Mar 6 17:08:31 2018 -0800 xfs: check for cow blocks before trying to clear them There's no point in allocating a transaction and locking the inode in preparation to clear cow blocks if there actually are any cow fork extents. Therefore, move the xfs_reflink_cancel_cow_range hunk to xfs_inactive and check the cow ifp first. This makes inode reclamation run faster. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_inode.c | 5 +++++ fs/xfs/xfs_super.c | 9 --------- 2 files changed, 5 insertions(+), 9 deletions(-) commit 3f883f5bb197b6fe4e6f461362782aa7b0e89cb6 Author: Darrick J. Wong Date: Tue Mar 6 17:08:31 2018 -0800 xfs: convert a few more directory asserts to corruption Yet another round of playing whack-a-mole with directory code that asserts on corrupt on-disk metadata when it really should be returning -EFSCORRUPTED instead of ASSERTing. Found by a xfs/391 crash while lastbit fuzzing of ltail.bestcount. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_dir2_leaf.c | 3 ++- fs/xfs/libxfs/xfs_dir2_node.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit 8241f7f983b972823431d762f7c3c9fe0f2a7b00 Author: Darrick J. Wong Date: Tue Mar 6 17:08:30 2018 -0800 xfs: don't iunlock the quota ip when quota block In xfs_qm_dqalloc, we join the locked quota inode to the transaction we use to allocate blocks. If the allocation or mapping fails, we're not allowed to unlock the inode because the transaction code is in charge of unlocking it for us. Therefore, remove the iunlock call to avoid blowing asserts about unbalanced locking + mount hang. Found by corrupting the AGF and allocating space in the filesystem (quotacheck) immediately after mount. The upcoming agfl wrapping fixup test will trigger this scenario. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_dquot.c | 2 -- 1 file changed, 2 deletions(-) commit 19957a181608d25c8f4136652d0ea00b3738972d Author: Vratislav Bendel Date: Tue Mar 6 17:07:44 2018 -0800 xfs: Correctly invert xfs_buftarg LRU isolation logic Due to an inverted logic mistake in xfs_buftarg_isolate() the xfs_buffers with zero b_lru_ref will take another trip around LRU, while isolating buffers with non-zero b_lru_ref. Additionally those isolated buffers end up right back on the LRU once they are released, because b_lru_ref remains elevated. Fix that circuitous route by leaving them on the LRU as originally intended. Signed-off-by: Vratislav Bendel Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4df0f7f145f2ac143039e2c569d17a25354f411d Author: Dave Chinner Date: Tue Mar 6 17:07:22 2018 -0800 xfs: fix transaction allocation deadlock in IO path xfs_trans_alloc() does GFP_KERNEL allocation, and we can call it while holding pages locked for writeback in the ->writepages path. The memory allocation is allowed to wait on pages under writeback, and so can wait on pages that are tagged as writeback by the caller. This affects both pre-IO submission and post-IO submission paths. Hence xfs_setsize_trans_alloc(), xfs_reflink_end_cow(), xfs_iomap_write_unwritten() and xfs_reflink_cancel_cow_range(). xfs_iomap_write_unwritten() already does the right thing, but the others don't. Fix them. Signed-Off-By: Dave Chinner Fixes: 281627df3eb5 ("xfs: log file size updates at I/O completion time") Fixes: 43caeb187deb9 ("xfs: move mappings from cow fork to data fork after copy-write)" Reviewed-by: Eric Sandeen Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.c | 3 ++- fs/xfs/xfs_reflink.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit c3b1b13190aec6d7450971b5ff10beaec04af558 Author: Christoph Hellwig Date: Tue Mar 6 17:04:00 2018 -0800 xfs: implement the lazytime mount option Use the VFS dirty inode tracking for lazytime inodes only, and just log them in ->dirty_inode. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_iops.c | 13 ++++++++++++- fs/xfs/xfs_super.c | 23 +++++++++++++++++++++++ fs/xfs/xfs_trans_inode.c | 14 ++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) commit 0d07e5573ffb3f3b941ca4c2df44f386319b1686 Author: Christoph Hellwig Date: Tue Mar 6 17:03:31 2018 -0800 fs: don't clear I_DIRTY_TIME before calling mark_inode_dirty_sync __mark_inode_dirty already takes care of that, and for the XFS lazytime implementation we need to know that ->dirty_inode was called because I_DIRTY_TIME was set. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/inode.c | 1 - fs/sync.c | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) commit bcab2ebfa1ad9fb4b9a58df60a365b6efb33f1cd Author: Nikolay Borisov Date: Tue Mar 6 17:03:30 2018 -0800 xfs: Remove dead code from inode recover function The memcpy is guarded by a check which is performed a right before we call xfs_log_dinode_to_disk. At this point we are sure this check will always be false otherwise we would have errored out. So let's remove this dead weight. Signed-off-by: Nikolay Borisov Reviewed-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_recover.c | 7 ------- 1 file changed, 7 deletions(-) commit e157ebdcb3acd16221f1e5f84c6e371e15d37b6e Author: Carlos Maiolino Date: Tue Mar 6 17:03:30 2018 -0800 Cleanup old XFS_BTREE_* traces Remove unused legacy btree traces from IRIX era. Signed-off-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_alloc_btree.c | 8 +-- fs/xfs/libxfs/xfs_bmap_btree.c | 4 +- fs/xfs/libxfs/xfs_btree.c | 125 +++---------------------------------- fs/xfs/libxfs/xfs_btree.h | 19 ------ fs/xfs/libxfs/xfs_ialloc_btree.c | 9 +-- fs/xfs/libxfs/xfs_refcount_btree.c | 5 -- fs/xfs/libxfs/xfs_rmap_btree.c | 8 +-- 7 files changed, 14 insertions(+), 164 deletions(-) commit 4603fa744c0702c76d607e5fafe35655b77a6efd Author: Eric Sandeen Date: Tue Mar 6 17:03:29 2018 -0800 xfs: remove unused m_dmevmask from xfs_mount struct The dmevmask structure member is a dmapi leftover; it's set here and there but never actually used. Remove it. Signed-off-by: Eric Sandeen Reviewed-by: Bill O'Donnell Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_recover.c | 9 --------- fs/xfs/xfs_mount.c | 2 -- fs/xfs/xfs_mount.h | 1 - 3 files changed, 12 deletions(-) commit cb0a8d23024e7bd234dea4d0fc5c4902a8dda766 Author: Dave Chinner Date: Tue Mar 6 17:03:28 2018 -0800 xfs: fall back to vmalloc when allocation log vector buffers When using large directory blocks, we regularly see memory allocations of >64k being made for the shadow log vector buffer. When we are under memory pressure, kmalloc() may not be able to find contiguous memory chunks large enough to satisfy these allocations easily, and if memory is fragmented we can potentially stall here. TO avoid this problem, switch the log vector buffer allocation to use kmem_alloc_large(). This will allow failed allocations to fall back to vmalloc and so remove the dependency on large contiguous regions of memory being available. This should prevent slowdowns and potential stalls when memory is low and/or fragmented. Signed-Off-By: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/kmem.c | 6 +++--- fs/xfs/kmem.h | 8 +++++++- fs/xfs/xfs_log_cil.c | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) commit 8b4c6ed2ed0e3d53e93e20e3f20cadf0d1a47483 Merge: daa1370 2097fde Author: David S. Miller Date: Sun Mar 11 22:53:33 2018 -0400 Merge branch 'hns3-next' Peng Li says: ==================== fix some bugs for HNS3 driver This patchset fixes some bugs for HNS3 driver: [Patch 1/12 - Patch 8/12] fix various bugs for PF driver. [Patch 9/12 - Patch 12/12] fix issues when change the us mac address of PF/VF device to an existent one in the mac_vlan table. ==================== Signed-off-by: David S. Miller commit 2097fdefa5c2c22c3165b3c9020ddb8ed610c371 Author: Jian Shen Date: Sat Mar 10 11:29:33 2018 +0800 net: hns3: add result checking for VF when modify unicast mac address VF changes unicast mac address by sending mailbox msg to PF, then PF completes the mac address modification. It may fail when the target uc mac address is already in the mac_vlan table. VF should be aware of it by reading the message result. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 2 +- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 +- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) commit d07b6bb4350040e10be8483640ae1b2bf37a3e5e Author: Jian Shen Date: Sat Mar 10 11:29:32 2018 +0800 net: hns3: add existence checking before adding unicast mac address It's not allowed to add two same unicast mac address entries to the mac_vlan table. When modify the uc mac address of a VF device to the same value with the PF device's, the PF device will lose its entry of the mac_vlan table. Lookup the mac address in the mac_vlan table, and add it if the entry is inexistent. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit eefd00a5d70378feae66c073105c548075609482 Author: Jian Shen Date: Sat Mar 10 11:29:31 2018 +0800 net: hns3: fix return value error of hclge_get_mac_vlan_cmd_status() Error code -EIO was used to indicate mutilple errors in function hclge_get_mac_vlan_cmd_status().This patch fixes it by using error code depending on the error type. For no space error, return -ENOSPC. For entry not found, return -ENOENT. For command send fail, return -EIO. For invalid op code, return -EINVAL. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit aa7a795eecca4cd02557d2fd3cbc128ecc1e93c9 Author: Jian Shen Date: Sat Mar 10 11:29:30 2018 +0800 net: hns3: fix error type definition of return value An enum type variable was used to store an "int" type return value. This patch fixes it. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5d02a58dae60bf71a32625ec510b116ee22faebc Author: Yunsheng Lin Date: Sat Mar 10 11:29:29 2018 +0800 net: hns3: fix for buffer overflow smatch warning This patch fixes the buffer overflow warning by refactoring hclgevf_bind_ring_to_vector and hclge_get_ring_chain_from_mbx. Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Fixes: dde1a86e93ca ("net: hns3: Add mailbox support to PF driver") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h | 2 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 19 ++++--- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 60 ++++++++++------------ 3 files changed, 39 insertions(+), 42 deletions(-) commit f96818a7cc864ac612c157b5c5e8c57c4b3e0136 Author: Yunsheng Lin Date: Sat Mar 10 11:29:28 2018 +0800 net: hns3: fix for loopback failure when vlan filter is enable When vlan ctag filter is enabled, the loopback selftest fails because loopback selftest does not support vlan. This patch fixes it by disabling the vlan ctag filter when runnig loopback selftest. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 64fd2300fcc15f5660e72754c2207d25cb6a0cba Author: Peng Li Date: Sat Mar 10 11:29:27 2018 +0800 net: hns3: add support for querying pfc puase packets statistic This patch add support for querying pfc puase packets statistic in hclge_ieee_getpfc, which is used to tell user how many pfc puase packets have been sent and received by this mac port. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 14 ++++++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 53 ++++++++++++++++++++++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 6 +++ 3 files changed, 73 insertions(+) commit f8d291f00bb33c97b8c9dd643277d6300d05559d Author: Peng Li Date: Sat Mar 10 11:29:26 2018 +0800 net: hns3: fix rx path skb->truesize reporting bug Original skb->truesize reports the received packet size, not the actual buffer size NIC driver allocated(1 Page). The linux net protocol will misjudge the true size of rx queue. Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit e98d7183f609ba48cfe5c5132b99f4c6ccab31c6 Author: Fuyun Liang Date: Sat Mar 10 11:29:25 2018 +0800 net: hns3: unify the pause params setup function Since the firmware cmd to setup mac pause params is the same as the firmware cmd to pfc pause params, this patch unifies the pause params setup function. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 23 +++++++++++----------- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 2 +- 3 files changed, 13 insertions(+), 14 deletions(-) commit 20e4bf982b72e5716233542d73b1e516485b71fb Author: Fuyun Liang Date: Sat Mar 10 11:29:24 2018 +0800 net: hns3: fix for ipv6 address loss problem after setting channels The function of dev_close and dev_open is just likes ifconfig down and ifconfig up. The ipv6 address will be lost after dev_close and dev_open are called. This patch uses hns3_nic_net_stop to replace dev_close and uses hns3_nic_net_open to replace dev_open. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8cc6c1f77ba024fac4fb0cecc359a7c6a0df443c Author: Fuyun Liang Date: Sat Mar 10 11:29:23 2018 +0800 net: hns3: fix for netdev not running problem after calling net_stop and net_open The link status update function is called by timer every second. But net_stop and net_open may be called with very short intervals. The link status update function can not detect the link state has changed. It causes the netdev not running problem. This patch fixes it by updating the link state in ae_stop function. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +++ drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 3 +++ 2 files changed, 6 insertions(+) commit 590980558bd0f49ff598909464661298aad74819 Author: Fuyun Liang Date: Sat Mar 10 11:29:22 2018 +0800 net: hns3: add existence check when remove old uc mac address When driver is in initial state, the mac_vlan table table is empty. So the delete operation for mac address must fail. Existence check is needed here. Otherwise, the error message will make user confused. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 ++- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++-- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 17 +++++++---------- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 2 ++ .../net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 10 +++++++--- 5 files changed, 20 insertions(+), 16 deletions(-) commit daa13701a95e4b88ab5628aaa6698bd59db9d3d9 Merge: f44b188 59be45c Author: David S. Miller Date: Sun Mar 11 22:44:24 2018 -0400 Merge branch 'selftests-forwarding-Tweaks-and-a-new-test' Ido Schimmel says: ==================== selftests: forwarding: Tweaks and a new test First patch adds a new test for VLAN-unaware bridges. Next two patches make the tests fail in case they are missing interfaces or dependencies. Last patch allows one to create the veth interfaces even without the optional configuration file. ==================== Signed-off-by: David S. Miller commit 59be45c375e6decce4216dc85fcc8ddf46d38c68 Author: Ido Schimmel Date: Sun Mar 11 09:57:25 2018 +0200 selftests: forwarding: Allow creation of interfaces without a config file Some users want to be able to run the tests without a configuration file which is useful when one needs to test both virtual and physical interfaces on the same machine. Move the defines that set the type of interface to create and whether to create it away from the optional configuration file to the library like the rest of the defines. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/forwarding.config.sample | 9 ++++----- tools/testing/selftests/net/forwarding/lib.sh | 2 ++ 2 files changed, 6 insertions(+), 5 deletions(-) commit 231b85abaaeef119811a9f036245c94bd5483415 Author: Ido Schimmel Date: Sun Mar 11 09:57:24 2018 +0200 selftests: forwarding: Exit with error when missing interfaces Returning 0 gives a false sense of success when the required modules did not even manage to be initialized and register the required net devices. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff0162af9e7b2e33d4d40f41130c65ba416ba059 Author: Ido Schimmel Date: Sun Mar 11 09:57:23 2018 +0200 selftests: forwarding: Exit with error when missing dependencies We already return an error when some dependencies (e.g., 'jq') are missing so lets be consistent and do that for all. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a021ab56468db57868a9bc6721b7dfbec672a15 Author: Ido Schimmel Date: Sun Mar 11 09:57:22 2018 +0200 selftests: forwarding: Add a test for VLAN-unaware bridge Similar to the VLAN-aware bridge test, test the VLAN-unaware bridge and make sure that ping, FDB learning and flooding work as expected. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller .../net/forwarding/bridge_vlan_unaware.sh | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) commit 688838442147d9dd94c2ef7c2c31a35cf150c5fa Author: Maciej Purski Date: Tue Feb 27 08:11:34 2018 +0100 drm/bridge/sii8620: use micro-USB cable detection logic to detect MHL Currently MHL chip must be turned on permanently to detect MHL cable. It duplicates micro-USB controller's (MUIC) functionality and consumes unnecessary power. Lets use extcon attached to MUIC to enable MHL chip only if it detects MHL cable. Signed-off-by: Maciej Purski Signed-off-by: Andrzej Hajda Acked-by: Andrzej Hajda Reviewed-by: Chanwoo Choi Signed-off-by: Chanwoo Choi drivers/gpu/drm/bridge/sil-sii8620.c | 97 ++++++++++++++++++++++++++++++++++-- 1 file changed, 94 insertions(+), 3 deletions(-) commit 73ce2ce129783813e1ebc37d2c757fe5e0fab1ef Author: Sean Wang Date: Fri Feb 9 02:07:59 2018 +0800 soc: mediatek: fix the mistaken pointer accessed when subdomains are added Fix the pointer to struct scp_subdomian not being moved forward when each sub-domain is expected to be iteratively added through pm_genpd_add_subdomain call. Cc: stable@vger.kernel.org Fixes: 53fddb1a66dd ("soc: mediatek: reduce code duplication of scpsys_probe across all SoCs") Reported-by: Weiyi Lu Signed-off-by: Sean Wang Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-scpsys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c932ba8c38ba59d430a6e1d9600c0b8c4a029cce Author: Sean Wang Date: Wed Feb 7 18:22:50 2018 +0800 soc: mediatek: add SCPSYS power domain driver for MediaTek MT7623A SoC Add SCPSYS power domain driver for MT7623A SoC. The MT7623A's power domains are the subset of MT7623 SoC's ones. As MT7623 SoC has full features whereas MT7623A is being designed just for router applications. Thus, MT7623A doesn't include those power domains multimedia function belongs to. In order to avoid certain errors undoubtedly happening at registering those power domains on MT7623A SoC using the existing MT7623 SCPSYS driver, it's required to define another setup specifically for MT7623A SoC. Signed-off-by: Sean Wang Reviewed-by: Ulf Hansson Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-scpsys.c | 55 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit c59c9c85e36aa09cfd901cc15a0d8d3772c18195 Author: Sean Wang Date: Wed Feb 7 18:22:49 2018 +0800 soc: mediatek: avoid hardcoded value with bus_prot_mask use a meaningful definition for bus_prot_mask instead of just hardcoded for it. Signed-off-by: Sean Wang Reviewed-by: Ulf Hansson Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-scpsys.c | 5 +++-- include/linux/soc/mediatek/infracfg.h | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit 0c1a2c17f60fc120cd6a6033ffdb5c336078a0a3 Author: Sean Wang Date: Wed Feb 7 18:22:48 2018 +0800 dt-bindings: soc: add header files required for MT7623A SCPSYS dt-binding Add relevant header files required for dt-bindings of SCPSYS power domain control for subsystems found on MT7623A SoC. Signed-off-by: Sean Wang Cc: Rob Herring Reviewed-by: Rob Herring Reviewed-by: Ulf Hansson [mb: clean-up commit message] Signed-off-by: Matthias Brugger include/dt-bindings/power/mt7623a-power.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b6853f821658e660dc1f0d694f04d64c1bdbdb7e Author: Sean Wang Date: Wed Feb 7 18:22:47 2018 +0800 dt-bindings: soc: add SCPSYS binding for MT7623 and MT7623A SoC document the binding for enabling SCPSYS on MediaTek MT7623 and MT7623A SoC. Where MT7623 SoC has the same definition about power domains with MT2701, so it's fine to using MT2701 ones as MT7623's fallback. Signed-off-by: Sean Wang Reviewed-by: Rob Herring Reviewed-by: Ulf Hansson Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/soc/mediatek/scpsys.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3a430067838a4e47ff473999b2f6a5a7be92dba7 Author: Gabriel Fernandez Date: Thu Mar 8 17:54:05 2018 +0100 clk: stm32mp1: add Debug clocks RCC manages clock for debug and trace. Signed-off-by: Gabriel Fernandez Signed-off-by: Michael Turquette drivers/clk/clk-stm32mp1.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 44cd455a8edb4026ae2c1c6fb6895523712c4896 Author: Gabriel Fernandez Date: Thu Mar 8 17:54:04 2018 +0100 clk: stm32mp1: add MCO clocks Two micro-controller clock output (MCO) pins are available: MCO1 and MCO2. For each output, it is possible to select a clock source. The selected clock can be divided thanks to configurable prescaler. Signed-off-by: Gabriel Fernandez Signed-off-by: Michael Turquette drivers/clk/clk-stm32mp1.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 2c87c9d33117446dab774a7e1b23806802f95c98 Author: Gabriel Fernandez Date: Thu Mar 8 17:54:03 2018 +0100 clk: stm32mp1: add RTC clock This patch adds the RTC clock. Signed-off-by: Gabriel Fernandez Signed-off-by: Michael Turquette drivers/clk/clk-stm32mp1.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 1f80590b6bdabffc90b9ed6a2d05dd9d24122879 Author: Gabriel Fernandez Date: Thu Mar 8 17:54:02 2018 +0100 clk: stm32mp1: add Peripheral & Kernel Clocks Each peripheral requires a bus interface clock. Some peripherals need also a dedicated clock for their communication interface, this clock is generally asynchronous with respect to the bus interface clock (peripheral clock), and is named kernel clock. For each IP, Peripheral clock and Kernel are generally gating with same gate. Also, Kernel clocks can share a same multiplexer. This patch introduces a mechanism to manage a gate with several clocks and to manage a shared multiplexer (mgate and mmux). Signed-off-by: Gabriel Fernandez Signed-off-by: Michael Turquette drivers/clk/clk-stm32mp1.c | 847 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 820 insertions(+), 27 deletions(-) commit 799b6a125ef0187579611bc153558bf01766d103 Author: Gabriel Fernandez Date: Thu Mar 8 17:54:01 2018 +0100 clk: stm32mp1: add Kernel timers This patch adds Kernel timers. This patch adds timers kernel clock. Timers are gather into two groups corresponding to the APB bus they are attached to. Each group has its own prescaler, managed in this patch. Signed-off-by: Gabriel Fernandez Signed-off-by: Michael Turquette drivers/clk/clk-stm32mp1.c | 185 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) commit e51d297e9a923556e45e5491f5dd29888e38889e Author: Gabriel Fernandez Date: Thu Mar 8 17:54:00 2018 +0100 clk: stm32mp1: add Sub System clocks The RCC handles three sub-system clocks: ck_mpuss, ck_axiss and ck_mcuss. This patch adds also some MUX system and several prescalers. Signed-off-by: Gabriel Fernandez Signed-off-by: Michael Turquette drivers/clk/clk-stm32mp1.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) commit a97703c59f653f75814865c22ae6b16f5c477530 Author: Gabriel Fernandez Date: Thu Mar 8 17:53:59 2018 +0100 clk: stm32mp1: add Post-dividers for PLL Each PLL has 3 outputs with post-dividers. pll1_p is dedicated for Cortex-A7 pll1_q is not connected pll1_r is not connected pll2_p is dedicated for AXI pll2_q is dedicated for GPU pll2_r is dedicated for DDR pll3_p is dedicated for mcu pll3_q is for Peripheral Kernel Clock pll3_r is for Peripheral Kernel Clock pll4_p is for Peripheral Kernel Clock pll4_q is for Peripheral Kernel Clock pll4_r is for Peripheral Kernel Clock Signed-off-by: Gabriel Fernandez Signed-off-by: Michael Turquette drivers/clk/clk-stm32mp1.c | 221 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 221 insertions(+) commit c6cf4d3248980c5e1998ce21f3c2d86502f7e1a9 Author: Gabriel Fernandez Date: Thu Mar 8 17:53:58 2018 +0100 clk: stm32mp1: add PLL clocks STMP32MP1 has 4 PLLs. PLL supports integer and fractional mode. Each PLL has 3 output dividers (p, q, r) Signed-off-by: Gabriel Fernandez Signed-off-by: Michael Turquette drivers/clk/clk-stm32mp1.c | 209 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) commit dc32eaac4926b02fddba3ff02030827429394ad7 Author: Gabriel Fernandez Date: Thu Mar 8 17:53:57 2018 +0100 clk: stm32mp1: add Source Clocks for PLLs This patch adds source clocks for PLLs This patch also introduces MUX clock API. Signed-off-by: Gabriel Fernandez Signed-off-by: Michael Turquette drivers/clk/clk-stm32mp1.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 8e6c27c0d79ae42f845892206a47c42531e14141 Author: Gabriel Fernandez Date: Thu Mar 8 17:53:56 2018 +0100 clk: stm32mp1: add MP1 gate for hse/hsi/csi oscillators MP1 Gate is a gate with a set and a clear register. Signed-off-by: Gabriel Fernandez Signed-off-by: Michael Turquette drivers/clk/clk-stm32mp1.c | 143 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) commit 9bee94e7b7dac0bb049c488b8eaa9a48854ddb8f Author: Gabriel Fernandez Date: Thu Mar 8 17:53:55 2018 +0100 clk: stm32mp1: Introduce STM32MP1 clock driver This patch introduces the mechanism to probe stm32mp1 driver. It also defines registers definition. This patch also introduces the generic mechanism to register a clock (a simple gate, divider and fixed factor). All clocks will be defined in one table. Signed-off-by: Gabriel Fernandez Signed-off-by: Michael Turquette drivers/clk/Kconfig | 6 + drivers/clk/Makefile | 1 + drivers/clk/clk-stm32mp1.c | 364 ++++++++++++++++++++++++++++++ include/dt-bindings/clock/stm32mp1-clks.h | 254 +++++++++++++++++++++ 4 files changed, 625 insertions(+) commit 605add0c7bbf5ecb9eeef02c605e47dfd2980acb Author: Gabriel Fernandez Date: Thu Mar 8 17:53:54 2018 +0100 dt-bindings: Document STM32MP1 Reset Clock Controller (RCC) bindings The RCC block is responsible of the management of the clock and reset generation for the complete circuit. Signed-off-by: Gabriel Fernandez Reviewed-by: Rob Herring Signed-off-by: Michael Turquette .../devicetree/bindings/clock/st,stm32mp1-rcc.txt | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 2c002a3049f78733211b52e5e65137b292f0e8dd Author: Sean Wang Date: Sun Feb 18 03:54:50 2018 +0800 arm64: dts: mt7622: add mmc related device nodes add mmc device nodes and proper setup for used pins Signed-off-by: Sean Wang Signed-off-by: Jimin Wang Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 106 +++++++++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7622.dtsi | 20 +++++ 2 files changed, 126 insertions(+) commit 0f12d5b3c77af2ba86f69743d362980ec9c9325b Author: Chunfeng Yun Date: Sun Feb 18 03:54:48 2018 +0800 arm64: dts: mt7622: add usb device nodes add xhci node and usb3 phy nodes Signed-off-by: Chunfeng Yun Signed-off-by: Sean Wang Tested-by: Jumin Li Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 28 +++++++++++++++ arch/arm64/boot/dts/mediatek/mt7622.dtsi | 51 ++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) commit a39251eeb65b33207bd7d877fbb95a7a6b8d4c43 Author: Ryder Lee Date: Sun Feb 18 03:54:47 2018 +0800 arm64: dts: mt7622: add SATA device nodes This patch adds SATA support fot MT7622. Signed-off-by: Ryder Lee Signed-off-by: Sean Wang Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 8 ++++++ arch/arm64/boot/dts/mediatek/mt7622.dtsi | 40 ++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) commit 26907b5354daab98b50c0bd9098c770a68369dc4 Author: Ryder Lee Date: Sun Feb 18 03:54:46 2018 +0800 arm64: dts: mt7622: add PCIe device nodes This patch adds PCIe support for MT7622. Signed-off-by: Ryder Lee Signed-off-by: Sean Wang [mb: fix type in commit message] Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 10 ++++ arch/arm64/boot/dts/mediatek/mt7622.dtsi | 74 ++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) commit 5f599b3a0bb8e24300eac5654a74f2e2af256f04 Author: Sean Wang Date: Sun Feb 18 03:54:45 2018 +0800 arm64: dts: mt7622: add ethernet device nodes add ethernet device nodes which enable GMAC1 with SGMII interface Signed-off-by: Sean Wang Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 22 ++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7622.dtsi | 31 ++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) commit 23beb1adb5f625e66bae442892c9e6c4720895c6 Author: Sean Wang Date: Sun Feb 18 03:54:44 2018 +0800 arm64: dts: mt7622: add flash related device nodes add nodes for NOR flash, parallel Nand flash with error correction code support. Signed-off-by: Sean Wang Cc: RogerCC Lin Cc: Guochun Mao Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 21 +++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7622.dtsi | 34 ++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) commit ae457b7679c4175115c58ec90b36f9ecc855731c Author: Sean Wang Date: Sun Feb 18 03:54:43 2018 +0800 arm64: dts: mt7622: add SoC and peripheral related device nodes Add watchdog, rtc, auxadc, cir, efuse, rng, uart[1-4], pwm, i2c[0-2], spi[0-1], btif and thermal related nodes. Signed-off-by: Sean Wang Cc: Andrew-CT Chen Cc: Zhiyong Tao Cc: Zhi Mao Cc: Jun Gao Cc: Leilk Liu Cc: Matthias Brugger Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 54 ++++++ arch/arm64/boot/dts/mediatek/mt7622.dtsi | 264 +++++++++++++++++++++++++++ 2 files changed, 318 insertions(+) commit 13f36c326cef1aaf373b83f46df95fa42b70f426 Author: Sean Wang Date: Sun Feb 18 03:54:42 2018 +0800 arm64: dts: mt7622: turn uart0 clock to real ones This patch also cleans up two oscillators that provide clocks for MT7623. Switch the uart clocks to the real ones while at it. Signed-off-by: Sean Wang Cc: Matthias Brugger Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622.dtsi | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit a5a80f78657f7d7b9b73bc67d0a18d5997c91168 Author: Sean Wang Date: Sun Feb 18 03:54:41 2018 +0800 arm64: dts: mt7622: add cpufreq related device nodes Add clocks, regulators and opp information into cpu nodes. In addition, the power supply for cpu nodes is deployed on mt7622-rfb1 board. Signed-off-by: Sean Wang Cc: Viresh Kumar Acked-by: Viresh Kumar Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 12 +++++++ arch/arm64/boot/dts/mediatek/mt7622.dtsi | 52 ++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) commit c4ff2adeb1be343545770df165acb2cc9513ac9a Author: Sean Wang Date: Sun Feb 18 03:54:40 2018 +0800 arm64: dts: mt7622: add PMIC MT6380 related nodes Enable pwrap and MT6380 on mt7622-rfb1 board. Also add all mt6380 regulator nodes in an alone file to allow similar boards using MT6380 able to resue the configuration. Signed-off-by: Sean Wang Cc: Mark Brown Cc: Matthias Brugger Cc: Philippe Ombredanne Acked-by: Philippe Ombredanne [mb: add missing space] Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6380.dtsi | 86 ++++++++++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 8 +++ arch/arm64/boot/dts/mediatek/mt7622.dtsi | 12 ++++ 3 files changed, 106 insertions(+) commit 3725ba3f55749987cf6f4294459dc9141255f540 Author: Sean Wang Date: Sun Feb 18 03:54:39 2018 +0800 arm64: dts: mt7622: add pinctrl related device nodes add pinctrl device nodes and rfb1 board, additionally include all pin groups possible being used on rfb1 board and available gpio keys. Signed-off-by: Sean Wang Cc: Matthias Brugger Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 200 +++++++++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7622.dtsi | 7 + 2 files changed, 207 insertions(+) commit 925bd27f772d61b39bc1adde4f76062f29c7ed56 Author: Sean Wang Date: Sun Feb 18 03:54:38 2018 +0800 arm64: dts: mt7622: add power domain controller device nodes add power domain controller nodes Signed-off-by: Sean Wang Cc: Matthias Brugger Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit d7167881e03ed89e249acb536e8462584ce48004 Author: Sean Wang Date: Sun Feb 18 03:54:37 2018 +0800 arm64: dts: mt7622: add clock controller device nodes Add clock controller nodes for MT7622 and include header for topckgen, infracfg, pericfg, apmixedsys, ethsys, sgmiisys, pciesys and ssusbsys for those devices nodes to be added afterwards. In addition, provides an oscillator node for the source of PLLs and dummy clock for PWARP to complement missing support of clock gate for the wrapper circuit in the driver. Signed-off-by: Sean Wang Cc: Stephen Boyd Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622.dtsi | 76 ++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit d1ed7c558612630ce4c48e440a6fdd8d4785f6a3 Author: Linus Walleij Date: Sat Feb 24 23:45:56 2018 +0100 leds: Extends disk trigger for reads and writes This adds two new disk triggers for triggering on reads and writes respectively, named "disk-read" and "disk-write". The use case comes from working on the D-Link DNS-313 NAS box. This features an RGB LED for disk activity. with these two triggers I can couple the green LED to read activity and the red LED to write activity, which gives the appropriate user feedback about what is happening on the disk. When tested it gave exactly the feedback desired. The in-kernel interface is simply changed to pass a bool indicating if the activity is write activity and update each trigger (and the composite "disk-activity" trigger) depending on what is passed in. Signed-off-by: Linus Walleij Reviewed-by: Bartlomiej Zolnierkiewicz Acked-by: Pavel Machek Acked-by: Tejun Heo Acked-by: David S. Miller Signed-off-by: Jacek Anaszewski drivers/ata/libata-core.c | 2 +- drivers/ide/ide-disk.c | 2 +- drivers/leds/trigger/ledtrig-disk.c | 12 +++++++++++- include/linux/leds.h | 4 ++-- 4 files changed, 15 insertions(+), 5 deletions(-) commit bae0f445c1e7e12193169f373d84e90b722d3598 Author: Sylwester Nawrocki Date: Fri Mar 9 18:22:50 2018 +0100 ARM: dts: exynos: Enable HDMI audio support on Peach Pi This patch adds new cpu, codec subnodes according to the updated "google,snow-audio-max98091" DT bindings and the I2S clock tree configuration so sound on the HDMI interface can be also supported. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5800-peach-pi.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit ed7d1307077e0b4d70bff172130b2de938533ac5 Author: Sylwester Nawrocki Date: Fri Mar 9 18:22:49 2018 +0100 ARM: dts: exynos: Enable HDMI audio support on Peach Pit This patch adds new cpu, codec subnodes according to the updated "google,snow-audio-max98090" DT bindings and the I2S clock tree configuration so sound on the HDMI interface can also be supported. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5420-peach-pit.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 6ab569936d609b7aecfa33ef3c2d60ebdef6dc2b Author: Sylwester Nawrocki Date: Fri Mar 9 18:22:48 2018 +0100 ARM: dts: exynos: Enable HDMI audio on Snow Chromebook This patch adds new cpu, codec subnodes according to the updated "google,snow-audio-max98095" DT bindings and the I2S clock tree configuration so sound on the HDMI interface can also be supported. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5250-snow-common.dtsi | 3 +++ arch/arm/boot/dts/exynos5250-snow.dts | 8 ++++++++ arch/arm/boot/dts/exynos5250.dtsi | 1 + 3 files changed, 12 insertions(+) commit e9eefc3f8ce09eb2262d7d817980816132158196 Author: Sylwester Nawrocki Date: Fri Mar 9 18:22:47 2018 +0100 ARM: dts: exynos: Add missing clock and DAI properties to the max98095 node in Snow Chromebook This patch adds missing clocks, clock-names properties so the CODEC can properly handle its master clock. Without this change sound on exynos5250-snow doesn't work. Missing #sound-dai-cells property is also added so it is possible to specify the DAI links properly for HDMI audio support. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5250-snow.dts | 3 +++ 1 file changed, 3 insertions(+) commit c7d59e4b4e96dfa07dd5e4fef1897e54921a4560 Author: Sylwester Nawrocki Date: Fri Mar 9 18:22:46 2018 +0100 ARM: dts: exynos: Add audio clocks configuration for Snow Chromebook Currently the audio subsystem clocks are not configured properly on Snow and sound is not working. The MAX98095 CODEC is not getting its master clock on the MCLK pin connected to the SOC's CLKOUT GPIO. This patch adds CLKOUT and other clocks configuration so HDMI audio can also be supported. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5250-snow-common.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit bd98a24267c9ccd120e03ffbdb6e17ffa405db50 Author: Sylwester Nawrocki Date: Fri Mar 9 18:22:45 2018 +0100 ARM: dts: exynos: Add #sound-dai-cells property to hdmi node in exynos5250.dtsi This property is required for specifying link between the HDMI IP block and the SoC's audio subsystem. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5250.dtsi | 1 + 1 file changed, 1 insertion(+) commit c4fb5f37001514c0004d17b79cf74a499b9bc320 Merge: cdb06e9 338c464 Author: Ingo Molnar Date: Sun Mar 11 10:42:16 2018 +0100 Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull RCU updates from Paul E. McKenney: - Miscellaneous fixes, perhaps most notably removing obsolete code whose only purpose in life was to gather information for the now-removed RCU debugfs facility. Other notable changes include removing NO_HZ_FULL_ALL in favor of the nohz_full kernel boot parameter, minor optimizations for expedited grace periods, some added tracing, creating an RCU-specific workqueue using Tejun's new WQ_MEM_RECLAIM flag, and several cleanups to code and comments. - SRCU cleanups and optimizations. - Torture-test updates, perhaps most notably the adding of ARMv8 support, but also including numerous cleanups and usability fixes. Signed-off-by: Ingo Molnar commit 81820059a42848742dbabd4d606737093c84e260 Author: Guenter Roeck Date: Wed Feb 21 13:09:39 2018 -0800 hwmon: (nct6775) Add support for NCT6796D NCT6796D is mostly compatible to NCT6795D. It supports an additional pwm control and fan speed channel. While we are at it, update documentation for NCT6795D. Signed-off-by: Guenter Roeck Documentation/hwmon/nct6775 | 56 ++++++++------- drivers/hwmon/Kconfig | 5 +- drivers/hwmon/nct6775.c | 172 +++++++++++++++++++++++++++++++------------- 3 files changed, 157 insertions(+), 76 deletions(-) commit 1b20624090d905fdf8e52f058020e585249c1af9 Author: Guenter Roeck Date: Wed Feb 21 13:09:38 2018 -0800 hwmon: (nct6775) Initialize boolean variables with declaration Initialize boolean flags in nct6775_check_fan_inputs() while declaring them instead of several times throughout the code. Signed-off-by: Guenter Roeck drivers/hwmon/nct6775.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) commit 00fd4cfe5bf86cb26ce8623408d2945da92dffcd Author: Guenter Roeck Date: Wed Feb 21 13:09:37 2018 -0800 hwmon: (nct6775) Improve fan6/pwm6 support Improve fan6/pwm6 detection on NCT6795D. Add support for fan pulses for fans 4..6 and fan min limits for fan6. Signed-off-by: Guenter Roeck drivers/hwmon/nct6775.c | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) commit e2617262f14b8b9eaa44b3dc1bf0cd573fcfc275 Author: Guenter Roeck Date: Wed Feb 21 13:09:36 2018 -0800 hwmon: (nct6775) Use NUM_FAN consistently The size of some of the arrays using the number of fans is hardcoded. Use NUM_FAN consistently throughout the driver. Signed-off-by: Guenter Roeck drivers/hwmon/nct6775.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 47591baa713cb23db7ea012bc1710f58efc14abf Author: Hao Peng Date: Thu Mar 1 22:48:30 2018 +0800 hwmon: (g762) handle cleanup with devm_add_action Simplify code and use devm_add_action() to handle cleanup. Signed-off-by: Peng Hao [groeck: Dropped unnecessary dummy function and NULL check] Signed-off-by: Guenter Roeck drivers/hwmon/g762.c | 53 ++++++++++++++-------------------------------------- 1 file changed, 14 insertions(+), 39 deletions(-) commit b20edea9a666235c91175ab654e440345afdcdef Author: Danilo Bargen Date: Fri Feb 2 11:42:35 2018 +0100 hwmon: (sht3x) Update data sheet URL The previously used URL is dead. Sensirion provides permalinks for their product datasheets at https://www.sensirion.com/en/about-us/links/. Signed-off-by: Danilo Bargen Signed-off-by: Guenter Roeck Documentation/hwmon/sht3x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e1d6fe961e4eb7e1f5ffaabdc86fa64ce285eaa Author: Danilo Bargen Date: Fri Feb 2 11:40:52 2018 +0100 hwmon: (sht21) Update data sheet URLs The previously used URLs are dead. Sensirion provides permalinks for their product datasheets at https://www.sensirion.com/en/about-us/links/. Signed-off-by: Danilo Bargen Signed-off-by: Guenter Roeck Documentation/hwmon/sht21 | 6 +++--- drivers/hwmon/sht21.c | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) commit ecb29abd4cb0670c616fb563a078f25d777ce530 Author: Guenter Roeck Date: Sat Mar 10 17:55:47 2018 -0800 hwmon: (pmbus/adm1275) Accept negative page register values A negative page register value means that no page needs to be selected. This is used by status register read operations and needs to be accepted. The failure to do so so results in missed status and limit registers. Fixes: da8e48ab483e1 ("hwmon: (pmbus) Always call _pmbus_read_byte in core driver") Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/adm1275.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a46f8cd696624ef757be0311eb28f119c36778e8 Author: Guenter Roeck Date: Sat Mar 10 17:49:47 2018 -0800 hwmon: (pmbus/max8688) Accept negative page register values A negative page register value means that no page needs to be selected. This is used by status register evaluations and needs to be accepted. Fixes: da8e48ab483e1 ("hwmon: (pmbus) Always call _pmbus_read_byte in core driver") Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/max8688.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 567f6989fd2ac1078d6908fe1bb45932bbeb1b00 Author: Steven Rostedt (VMware) Date: Fri Feb 23 09:45:27 2018 -0500 tracing: Embed replace_filter_string() helper function The replace_filter_string() frees the current string and then copies a given string. But in the two locations that it was used, the allocation happened right after the filter was allocated (nothing to replace). There's no need for this to be a helper function. Embedding the allocation in the two places where it was called will make changing the code in the future easier. Also make the variable consistent (always use "filter_string" as the name, as it was used in one instance as "filter_str") Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_filter.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) commit 404a3add43c9c42fe48b61341badfcb9cca165cc Author: Steven Rostedt (VMware) Date: Thu Feb 22 23:26:11 2018 -0500 tracing: Only add filter list when needed replace_system_preds() creates a filter list to free even when it doesn't really need to have it. Only save filters that require synchronize_sched() in the filter list to free. This will allow the code to be updated a bit easier in the future. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_filter.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit c7399708b3cd9004205923c3d139dcc7d067a8a4 Author: Steven Rostedt (VMware) Date: Thu Feb 22 23:17:54 2018 -0500 tracing: Remove filter allocator helper The __alloc_filter() function does nothing more that allocate the filter. There's no reason to have it as a helper function. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_filter.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 559d421267d1594c541143489d9ee9a869dc6093 Author: Steven Rostedt (VMware) Date: Thu Feb 22 23:14:04 2018 -0500 tracing: Use trace_seq instead of open code string appending The filter code does open code string appending to produce an error message. Instead it can be simplified by using trace_seq function helpers. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_filter.c | 57 +++++++++++++++----------------------- 1 file changed, 23 insertions(+), 34 deletions(-) commit a0ff08fd4e3f8b1cbc18950a8bf1f9067f7e700a Author: Steven Rostedt (VMware) Date: Thu Feb 22 22:32:51 2018 -0500 tracing: Remove BUG_ON() from append_filter_string() There's no reason to BUG if there's a bug in the filtering code. Simply do a warning and return. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f06eec4d0f2c784788ed2e9aa12c9227c2341771 Author: Rajvi Jingar Date: Mon Jan 15 20:52:11 2018 -0600 selftests: ftrace: Add inter-event hist triggers testcases This adds inter-event hist triggers testcases which covers following: - create/remove synthetic event - disable histogram for synthetic event - extended error support - field variable support - histogram variables - histogram trigger onmatch action - histogram trigger onmax action - histogram trigger onmatch-onmax action - simple expression support - combined histogram Here is the test result. === Ftrace unit tests === [1] event trigger - test extended error support [PASS] [2] event trigger - test field variable support [PASS] [3] event trigger - test inter-event combined histogram trigger [PASS] [4] event trigger - test inter-event histogram trigger onmatch action [PASS] [5] event trigger - test inter-event histogram trigger onmatch-onmax action [PASS] [6] event trigger - test inter-event histogram trigger onmax action [PASS] [7] event trigger - test synthetic event create remove [PASS] Link: http://lkml.kernel.org/r/e07ef1e72f7bf0f84dc87c9b736d6dc91b4b0b49.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Rajvi Jingar Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) tools/testing/selftests/ftrace/test.d/functions | 7 +++ .../inter-event/trigger-extended-error-support.tc | 39 +++++++++++++++ .../inter-event/trigger-field-variable-support.tc | 54 ++++++++++++++++++++ .../trigger-inter-event-combined-hist.tc | 58 ++++++++++++++++++++++ .../inter-event/trigger-onmatch-action-hist.tc | 50 +++++++++++++++++++ .../trigger-onmatch-onmax-action-hist.tc | 50 +++++++++++++++++++ .../inter-event/trigger-onmax-action-hist.tc | 48 ++++++++++++++++++ .../trigger-synthetic-event-createremove.tc | 54 ++++++++++++++++++++ 8 files changed, 360 insertions(+) commit 89e270c1df0c56d6ce3c2d9ed3347b527c684b16 Author: Tom Zanussi Date: Mon Jan 15 20:52:10 2018 -0600 tracing: Add inter-event blurb to HIST_TRIGGERS config option So that users know that inter-event tracing is supported as part of the HIST_TRIGGERS option, include text to that effect in the help text. Link: http://lkml.kernel.org/r/a38e24231d8d980be636b56d35814570acfd167a.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4708abc6c68b41a656afb431818d5c57d7fdfd24 Author: Steven Rostedt (VMware) Date: Wed Feb 7 17:29:46 2018 -0500 tracing: Use the ring-buffer nesting to allow synthetic events to be traced Synthetic events can be done within the recording of other events. Notify the ring buffer via ring_buffer_nest_start() and ring_buffer_nest_end() that this is intended and not to block it due to its recursion protection. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 8e012066fe0de5ff5be606836f9075511bce5604 Author: Steven Rostedt (VMware) Date: Wed Feb 7 17:26:32 2018 -0500 ring-buffer: Add nesting for adding events within events The ring-buffer code has recusion protection in case tracing ends up tracing itself, the ring-buffer will detect that it was called at the same context (normal, softirq, interrupt or NMI), and not continue to record the event. With the histogram synthetic events, they are called while tracing another event at the same context. The recusion protection triggers because it detects tracing at the same context and stops it. Add ring_buffer_nest_start() and ring_buffer_nest_end() that will notify the ring buffer that a trace is about to happen within another trace and that it is intended, and not to trigger the recursion blocking. Signed-off-by: Steven Rostedt (VMware) include/linux/ring_buffer.h | 3 +++ kernel/trace/ring_buffer.c | 57 ++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 57 insertions(+), 3 deletions(-) commit a4072fe85ba3671720cab0788291af953db27318 Author: Tom Zanussi Date: Mon Jan 15 20:52:08 2018 -0600 tracing: Add a clock attribute for hist triggers The default clock if timestamps are used in a histogram is "global". If timestamps aren't used, the clock is irrelevant. Use the "clock=" param only if you want to override the default "global" clock for a histogram with timestamps. Link: http://lkml.kernel.org/r/427bed1389c5d22aa40c3e0683e30cc3d151e260.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Rajvi Jingar Signed-off-by: Steven Rostedt (VMware) Documentation/trace/histogram.txt | 11 +++++++++- kernel/trace/trace_events_hist.c | 42 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 49 insertions(+), 4 deletions(-) commit d71bd34d78bb78b9e6f8a0be3952d5fa470a260a Author: Tom Zanussi Date: Mon Jan 15 20:52:07 2018 -0600 tracing: Make tracing_set_clock() non-static Allow tracing code outside of trace.c to access tracing_set_clock(). Some applications may require a particular clock in order to function properly, such as latency calculations. Also, add an accessor returning the current clock string. Link: http://lkml.kernel.org/r/6d1c53e9ee2163f54e1849f5376573f54f0e6009.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 2 +- kernel/trace/trace.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 033cbceefa9d439a15f59263327812dfabfbdc6c Author: Tom Zanussi Date: Mon Jan 15 20:52:06 2018 -0600 tracing: Add inter-event hist trigger Documentation Add background and details on inter-event hist triggers, including hist variables, synthetic events, and actions. Link: http://lkml.kernel.org/r/b0414efb66535aa52aa7411f58c3d56724027fce.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Baohong Liu Signed-off-by: Steven Rostedt (VMware) Documentation/trace/histogram.txt | 381 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 381 insertions(+) commit f404da6e1d46ced7d3b53377f1e140c486ea7350 Author: Tom Zanussi Date: Mon Jan 15 20:52:05 2018 -0600 tracing: Add 'last error' error facility for hist triggers With the addition of variables and actions, it's become necessary to provide more detailed error information to users about syntax errors. Add a 'last error' facility accessible via the erroring event's 'hist' file. Reading the hist file after an error will display more detailed information about what went wrong, if information is available. This extended error information will be available until the next hist trigger command for that event. # echo xxx > /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger echo: write error: Invalid argument # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/hist ERROR: Couldn't yyy: zzz Last command: xxx Also add specific error messages for variable and action errors. Link: http://lkml.kernel.org/r/64e9c422fc8aeafcc2f7a3b4328c0cffe7969129.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) Documentation/trace/histogram.txt | 20 +++++ kernel/trace/trace_events_hist.c | 164 ++++++++++++++++++++++++++++++++++---- 2 files changed, 170 insertions(+), 14 deletions(-) commit 7e8b88a30b085d4205b6afcc5e577604978b1268 Author: Tom Zanussi Date: Mon Jan 15 20:52:04 2018 -0600 tracing: Add hist trigger support for variable reference aliases Add support for alias=$somevar where alias can be used as onmatch.xxx($alias). Aliases are a way of creating a new name for an existing variable, for flexibly in making naming more clear in certain cases. For example in the below the user perhaps feels that using $new_lat in the synthetic event invocation is opaque or doesn't fit well stylistically with previous triggers, so creates an alias of $new_lat named $latency and uses that in the call instead: # echo 'hist:keys=next_pid:new_lat=common_timestamp.usecs' > /sys/kernel/debug/tracing/events/sched/sched_switch/trigger # echo 'hist:keys=pid:latency=$new_lat: onmatch(sched.sched_switch).wake2($latency,pid)' > /sys/kernel/debug/tracing/events/synthetic/wake1/trigger Link: http://lkml.kernel.org/r/ef20a65d921af3a873a6f1e8c71407c926d5586f.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 74 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 67 insertions(+), 7 deletions(-) commit 8b7622bf94a44b3f912e6492bf500e86171300b8 Author: Tom Zanussi Date: Mon Jan 15 20:52:03 2018 -0600 tracing: Add cpu field for hist triggers A common key to use in a histogram is the cpuid - add a new cpu 'synthetic' field named 'cpu' for that purpose. Link: http://lkml.kernel.org/r/89537645bfc957e0d76e2cacf5f0ada88691a6cc.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) Documentation/trace/histogram.txt | 15 +++++++++++++++ kernel/trace/trace_events_hist.c | 28 +++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) commit ec5ce0987541087dbea5af346bdb85eb04b0f0a2 Author: Tom Zanussi Date: Mon Jan 15 20:52:02 2018 -0600 tracing: Allow whitespace to surround hist trigger filter The existing code only allows for one space before and after the 'if' specifying the filter for a hist trigger. Add code to make that more permissive as far as whitespace goes. Specifically, we want to allow spaces in the trigger itself now that we have additional syntax (onmatch/onmax) where spaces are more natural e.g. spaces after commas in param lists. Link: http://lkml.kernel.org/r/1053090c3c308d4f431accdeb59dff4b511d4554.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) commit 50450603ec9cb808d39b1461fe67a81d82b37129 Author: Tom Zanussi Date: Mon Jan 15 20:52:01 2018 -0600 tracing: Add 'onmax' hist trigger action support Add an 'onmax(var).save(field,...)' hist trigger action which is invoked whenever an event exceeds the current maximum. The end result is that the trace event fields or variables specified as the onmax.save() params will be saved if 'var' exceeds the current maximum for that hist trigger entry. This allows context from the event that exhibited the new maximum to be saved for later reference. When the histogram is displayed, additional fields displaying the saved values will be printed. As an example the below defines a couple of hist triggers, one for sched_wakeup and another for sched_switch, keyed on pid. Whenever a sched_wakeup occurs, the timestamp is saved in the entry corresponding to the current pid, and when the scheduler switches back to that pid, the timestamp difference is calculated. If the resulting latency exceeds the current maximum latency, the specified save() values are saved: # echo 'hist:keys=pid:ts0=common_timestamp.usecs \ if comm=="cyclictest"' >> \ /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger # echo 'hist:keys=next_pid:\ wakeup_lat=common_timestamp.usecs-$ts0:\ onmax($wakeup_lat).save(next_comm,prev_pid,prev_prio,prev_comm) \ if next_comm=="cyclictest"' >> \ /sys/kernel/debug/tracing/events/sched/sched_switch/trigger When the histogram is displayed, the max value and the saved values corresponding to the max are displayed following the rest of the fields: # cat /sys/kernel/debug/tracing/events/sched/sched_switch/hist { next_pid: 3728 } hitcount: 199 \ max: 123 next_comm: cyclictest prev_pid: 0 \ prev_prio: 120 prev_comm: swapper/3 { next_pid: 3730 } hitcount: 1321 \ max: 15 next_comm: cyclictest prev_pid: 0 \ prev_prio: 120 prev_comm: swapper/1 { next_pid: 3729 } hitcount: 1973\ max: 25 next_comm: cyclictest prev_pid: 0 \ prev_prio: 120 prev_comm: swapper/0 Totals: Hits: 3493 Entries: 3 Dropped: 0 Link: http://lkml.kernel.org/r/006907f71b1e839bb059337ec3c496f84fcb71de.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 331 ++++++++++++++++++++++++++++++++++----- 1 file changed, 296 insertions(+), 35 deletions(-) commit c282a386a39771588fe4cfdc01bbb8a255092e38 Author: Tom Zanussi Date: Mon Jan 15 20:52:00 2018 -0600 tracing: Add 'onmatch' hist trigger action support Add an 'onmatch(matching.event).(param list)' hist trigger action which is invoked with the set of variables or event fields named in the 'param list'. The result is the generation of a synthetic event that consists of the values contained in those variables and/or fields at the time the invoking event was hit. As an example the below defines a simple synthetic event using a variable defined on the sched_wakeup_new event, and shows the event definition with unresolved fields, since the sched_wakeup_new event with the testpid variable hasn't been defined yet: # echo 'wakeup_new_test pid_t pid; int prio' >> \ /sys/kernel/debug/tracing/synthetic_events # cat /sys/kernel/debug/tracing/synthetic_events wakeup_new_test pid_t pid; int prio The following hist trigger both defines a testpid variable and specifies an onmatch() trace action that uses that variable along with a non-variable field to generate a wakeup_new_test synthetic event whenever a sched_wakeup_new event occurs, which because of the 'if comm == "cyclictest"' filter only happens when the executable is cyclictest: # echo 'hist:testpid=pid:keys=$testpid:\ onmatch(sched.sched_wakeup_new).wakeup_new_test($testpid, prio) \ if comm=="cyclictest"' >> \ /sys/kernel/debug/tracing/events/sched/sched_wakeup_new/trigger Creating and displaying a histogram based on those events is now just a matter of using the fields and new synthetic event in the tracing/events/synthetic directory, as usual: # echo 'hist:keys=pid,prio:sort=pid,prio' >> \ /sys/kernel/debug/tracing/events/synthetic/wakeup_new_test/trigger Link: http://lkml.kernel.org/r/8c2a574bcb7530c876629c901ecd23911b14afe8.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Rajvi Jingar Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 488 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 475 insertions(+), 13 deletions(-) commit 02205a6752f223779a1b0e9e8ffacbea6e717851 Author: Tom Zanussi Date: Mon Jan 15 20:51:59 2018 -0600 tracing: Add support for 'field variables' Users should be able to directly specify event fields in hist trigger 'actions' rather than being forced to explicitly create a variable for that purpose. Add support allowing fields to be used directly in actions, which essentially does just that - creates 'invisible' variables for each bare field specified in an action. If a bare field refers to a field on another (matching) event, it even creates a special histogram for the purpose (since variables can't be defined on an existing histogram after histogram creation). Here's a simple example that demonstrates both. Basically the onmatch() action creates a list of variables corresponding to the parameters of the synthetic event to be generated, and then uses those values to generate the event. So for the wakeup_latency synthetic event 'call' below the first param, $wakeup_lat, is a variable defined explicitly on sched_switch, where 'next_pid' is just a normal field on sched_switch, and prio is a normal field on sched_waking. Since the mechanism works on variables, those two normal fields just have 'invisible' variables created internally for them. In the case of 'prio', which is on another event, we actually need to create an additional hist trigger and define the invisible variable on that, since once a hist trigger is defined, variables can't be added to it later. echo 'wakeup_latency u64 lat; pid_t pid; int prio' >> /sys/kernel/debug/tracing/synthetic_events echo 'hist:keys=pid:ts0=common_timestamp.usecs >> /sys/kernel/debug/tracing/events/sched/sched_waking/trigger echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0: onmatch(sched.sched_waking).wakeup_latency($wakeup_lat,next_pid,prio) >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger Link: http://lkml.kernel.org/r/8e8dcdac1ea180ed7a3689e1caeeccede9dc42b3.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 531 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 530 insertions(+), 1 deletion(-) commit 4b147936fa509650beaf638b331573c23ba4d609 Author: Tom Zanussi Date: Mon Jan 15 20:51:58 2018 -0600 tracing: Add support for 'synthetic' events Synthetic events are user-defined events generated from hist trigger variables saved from one or more other events. To define a synthetic event, the user writes a simple specification consisting of the name of the new event along with one or more variables and their type(s), to the tracing/synthetic_events file. For instance, the following creates a new event named 'wakeup_latency' with 3 fields: lat, pid, and prio: # echo 'wakeup_latency u64 lat; pid_t pid; int prio' >> \ /sys/kernel/debug/tracing/synthetic_events Reading the tracing/synthetic_events file lists all the currently-defined synthetic events, in this case the event we defined above: # cat /sys/kernel/debug/tracing/synthetic_events wakeup_latency u64 lat; pid_t pid; int prio At this point, the synthetic event is ready to use, and a histogram can be defined using it: # echo 'hist:keys=pid,prio,lat.log2:sort=pid,lat' >> \ /sys/kernel/debug/tracing/events/synthetic/wakeup_latency/trigger The new event is created under the tracing/events/synthetic/ directory and looks and behaves just like any other event: # ls /sys/kernel/debug/tracing/events/synthetic/wakeup_latency enable filter format hist id trigger Although a histogram can be defined for it, nothing will happen until an action tracing that event via the trace_synth() function occurs. The trace_synth() function is very similar to all the other trace_* invocations spread throughout the kernel, except in this case the trace_ function and its corresponding tracepoint isn't statically generated but defined by the user at run-time. How this can be automatically hooked up via a hist trigger 'action' is discussed in a subsequent patch. Link: http://lkml.kernel.org/r/c68df2284b7d172669daf9be29db62ad49bbc559.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi [fix noderef.cocci warnings, sizeof pointer for kcalloc of event->fields] Signed-off-by: Fengguang Wu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 895 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 893 insertions(+), 2 deletions(-) commit 0212e2aa30e112363aa559f30f6c24ae095f3e78 Author: Tom Zanussi Date: Mon Jan 15 20:51:57 2018 -0600 tracing: Add hist trigger action hook Add a hook for executing extra actions whenever a histogram entry is added or updated. The default 'action' when a hist entry is added to a histogram is to update the set of values associated with it. Some applications may want to perform additional actions at that point, such as generate another event, or compare and save a maximum. Add a simple framework for doing that; specific actions will be implemented on top of it in later patches. Link: http://lkml.kernel.org/r/9482ba6a3eaf5ca6e60954314beacd0e25c05b24.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 106 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 2 deletions(-) commit 067fe038e70f6e64960d26a79c4df5f1413d0f13 Author: Tom Zanussi Date: Mon Jan 15 20:51:56 2018 -0600 tracing: Add variable reference handling to hist triggers Add the necessary infrastructure to allow the variables defined on one event to be referenced in another. This allows variables set by a previous event to be referenced and used in expressions combining the variable values saved by that previous event and the event fields of the current event. For example, here's how a latency can be calculated and saved into yet another variable named 'wakeup_lat': # echo 'hist:keys=pid,prio:ts0=common_timestamp ... # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp-$ts0 ... In the first event, the event's timetamp is saved into the variable ts0. In the next line, ts0 is subtracted from the second event's timestamp to produce the latency. Further users of variable references will be described in subsequent patches, such as for instance how the 'wakeup_lat' variable above can be displayed in a latency histogram. Link: http://lkml.kernel.org/r/b1d3e6975374e34d501ff417c20189c3f9b2c7b8.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 2 + kernel/trace/trace.h | 3 + kernel/trace/trace_events_hist.c | 661 +++++++++++++++++++++++++++++++++++- kernel/trace/trace_events_trigger.c | 6 + 4 files changed, 656 insertions(+), 16 deletions(-) commit 19a9facd0fe33a3e376923383958b2c86cbd3994 Author: Tom Zanussi Date: Mon Jan 15 20:51:55 2018 -0600 tracing: Add hist_field 'type' field Future support for synthetic events requires hist_field 'type' information, so add a field for that. Also, make other hist_field attribute usage consistent (size, is_signed, etc). Link: http://lkml.kernel.org/r/3fd12a2e86316b05151ba0d7c68268e780af2c9d.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit df35d93bbff0297617edf105e6b4057a3953a1a9 Author: Tom Zanussi Date: Mon Jan 15 20:51:54 2018 -0600 tracing: Pass tracing_map_elt to hist_field accessor functions Some accessor functions, such as for variable references, require access to a corrsponding tracing_map_elt. Add a tracing_map_elt param to the function signature and update the accessor functions accordingly. Link: http://lkml.kernel.org/r/e0f292b068e9e4948da1d5af21b5ae0efa9b5717.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 91 +++++++++++++++++++++++++--------------- 1 file changed, 57 insertions(+), 34 deletions(-) commit af6a29bcaf8ff260222a953536c13c167d5c4649 Author: Tom Zanussi Date: Mon Jan 15 20:51:53 2018 -0600 tracing: Generalize per-element hist trigger data Up until now, hist triggers only needed per-element support for saving 'comm' data, which was saved directly as a private data pointer. In anticipation of the need to save other data besides 'comm', add a new hist_elt_data struct for the purpose, and switch the current 'comm'-related code over to that. Link: http://lkml.kernel.org/r/4502c338c965ddf5fc19fb1ec4764391e001ed4b.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 76 +++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 33 deletions(-) commit 100719dcef447aa0c90301f919e81ae477b32bf2 Author: Tom Zanussi Date: Mon Jan 15 20:51:52 2018 -0600 tracing: Add simple expression support to hist triggers Add support for simple addition, subtraction, and unary expressions (-(expr) and expr, where expr = b-a, a+b, a+b+c) to hist triggers, in order to support a minimal set of useful inter-event calculations. These operations are needed for calculating latencies between events (timestamp1-timestamp0) and for combined latencies (latencies over 3 or more events). In the process, factor out some common code from key and value parsing. Link: http://lkml.kernel.org/r/9a9308ead4fe32a433d9c7e95921fb798394f6b2.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi [kbuild test robot fix, add static to parse_atom()] Signed-off-by: Fengguang Wu [ Replaced '//' comments with normal /* */ comments ] Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 487 +++++++++++++++++++++++++++++++++------ 1 file changed, 413 insertions(+), 74 deletions(-) commit 2ece94fbd25c70543dd073d10569e08c3e3b4a7f Author: Tom Zanussi Date: Mon Jan 15 20:51:51 2018 -0600 tracing: Move get_hist_field_flags() Move get_hist_field_flags() to make it more easily accessible for new code (and keep the move separate from new functionality). Link: http://lkml.kernel.org/r/32470f0a7047ec7a6e84ba5ec89d6142cc6ede7d.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 44 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 1a361dfcf261d68f081a12133aa8d0d6d6cca34f Author: Tom Zanussi Date: Mon Jan 15 20:51:50 2018 -0600 tracing: Account for variables in named trigger compatibility Named triggers must also have the same set of variables in order to be considered compatible - update the trigger match test to account for that. The reason for this requirement is that named triggers with variables are meant to allow one or more events to set the same variable. Link: http://lkml.kernel.org/r/a17eae6328a99917f9d5c66129c9fcd355279ee9.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 30350d65ac5676c6d08d4fc935bc9a9cb0fd4ed3 Author: Tom Zanussi Date: Mon Jan 15 20:51:49 2018 -0600 tracing: Add variable support to hist triggers Add support for saving the value of a current event's event field by assigning it to a variable that can be read by a subsequent event. The basic syntax for saving a variable is to simply prefix a unique variable name not corresponding to any keyword along with an '=' sign to any event field. Both keys and values can be saved and retrieved in this way: # echo 'hist:keys=next_pid:vals=$ts0:ts0=common_timestamp ... # echo 'hist:timer_pid=common_pid:key=$timer_pid ...' If a variable isn't a key variable or prefixed with 'vals=', the associated event field will be saved in a variable but won't be summed as a value: # echo 'hist:keys=next_pid:ts1=common_timestamp:... Multiple variables can be assigned at the same time: # echo 'hist:keys=pid:vals=$ts0,$b,field2:ts0=common_timestamp,b=field1 ... Multiple (or single) variables can also be assigned at the same time using separate assignments: # echo 'hist:keys=pid:vals=$ts0:ts0=common_timestamp:b=field1:c=field2 ... Variables set as above can be used by being referenced from another event, as described in a subsequent patch. Link: http://lkml.kernel.org/r/fc93c4944d9719dbcb1d0067be627d44e98e2adc.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Baohong Liu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 370 ++++++++++++++++++++++++++++++++++----- 1 file changed, 331 insertions(+), 39 deletions(-) commit 860f9f6b02e9e846c4cfb3505efed331a910d0b7 Author: Tom Zanussi Date: Mon Jan 15 20:51:48 2018 -0600 tracing: Add usecs modifier for hist trigger timestamps Appending .usecs onto a common_timestamp field will cause the timestamp value to be in microseconds instead of the default nanoseconds. A typical latency histogram using usecs would look like this: # echo 'hist:keys=pid,prio:ts0=common_timestamp.usecs ... # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0 ... This also adds an external trace_clock_in_ns() to trace.c for the timestamp conversion. Link: http://lkml.kernel.org/r/4e813705a170b3e13e97dc3135047362fb1a39f3.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) Documentation/trace/histogram.txt | 1 + kernel/trace/trace.c | 13 +++++++++++-- kernel/trace/trace.h | 2 ++ kernel/trace/trace_events_hist.c | 28 ++++++++++++++++++++++------ 4 files changed, 36 insertions(+), 8 deletions(-) commit b559d003a226911979ceb8469db4c9b621c3bc09 Author: Tom Zanussi Date: Mon Jan 15 20:51:47 2018 -0600 tracing: Add hist_data member to hist_field Allow hist_data access via hist_field. Some users of hist_fields require or will require more access to the associated hist_data. Link: http://lkml.kernel.org/r/d04cd0768f5228ebb4ac0ba4a847bc4d14d4826f.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 2734b629525a9dae5bf217cbf0a9651da93d2108 Author: Tom Zanussi Date: Mon Jan 15 20:51:46 2018 -0600 tracing: Add per-element variable support to tracing_map In order to allow information to be passed between trace events, add support for per-element variables to tracing_map. This provides a means for histograms to associate a value or values with an entry when it's saved or updated, and retrieved by a subsequent event occurrences. Variables can be set using tracing_map_set_var() and read using tracing_map_read_var(). tracing_map_var_set() returns true or false depending on whether or not the variable has been set or not, which is important for event-matching applications. tracing_map_read_var_once() reads the variable and resets it to the 'unset' state, implementing read-once variables, which are also important for event-matching uses. Link: http://lkml.kernel.org/r/7fa001108252556f0c6dd9d63145eabfe3370d1a.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/tracing_map.c | 108 +++++++++++++++++++++++++++++++++++++++++++++ kernel/trace/tracing_map.h | 11 +++++ 2 files changed, 119 insertions(+) commit ad42febe51ae0a2e875f507a37a6329277f75fdd Author: Tom Zanussi Date: Mon Jan 15 20:51:45 2018 -0600 tracing: Add hist trigger timestamp support Add support for a timestamp event field. This is actually a 'pseudo-' event field in that it behaves like it's part of the event record, but is really part of the corresponding ring buffer event. To make use of the timestamp field, users can specify "common_timestamp" as a field name for any histogram. Note that this doesn't make much sense on its own either as either a key or value, but needs to be supported even so, since follow-on patches will add support for making use of this field in time deltas. The common_timestamp 'field' is not a bona fide event field - so you won't find it in the event description - but rather it's a synthetic field that can be used like a real field. Note that the use of this field requires the ring buffer be put into 'absolute timestamp' mode, which saves the complete timestamp for each event rather than an offset. This mode will be enabled if and only if a histogram makes use of the "common_timestamp" field. Link: http://lkml.kernel.org/r/97afbd646ed146e26271f3458b4b33e16d7817c2.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Baohong Liu [kasan use-after-free fix] Signed-off-by: Vedang Patel Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 94 ++++++++++++++++++++++++++++++---------- 1 file changed, 71 insertions(+), 23 deletions(-) commit 9b1ae035c9304ed1e183de3b3bb08eafd01a7553 Author: Tom Zanussi Date: Mon Jan 15 20:51:44 2018 -0600 tracing: Break out hist trigger assignment parsing This will make it easier to add variables, and makes the parsing code cleaner regardless. Link: http://lkml.kernel.org/r/e574b3291bbe15e35a4dfc87e5395aa715701c98.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Rajvi Jingar Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 72 ++++++++++++++++++++++++++++------------ 1 file changed, 51 insertions(+), 21 deletions(-) commit fbd302cbebe9408699fd11a4eb423d0a466058b9 Author: Tom Zanussi Date: Mon Jan 15 20:51:43 2018 -0600 tracing: Add ring buffer event param to hist field functions Some events such as timestamps require access to a ring_buffer_event struct; add a param so that hist field functions can access that. Link: http://lkml.kernel.org/r/2ff4af18e72b6002eb86b26b2a7f39cef7d1dfe4.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) commit 1ac4f51c0eb518e04ff3455f0c7d17ad9187eb27 Author: Tom Zanussi Date: Mon Jan 15 20:51:42 2018 -0600 tracing: Give event triggers access to ring_buffer_event The ring_buffer event can provide a timestamp that may be useful to various triggers - pass it into the handlers for that purpose. Link: http://lkml.kernel.org/r/6de592683b59fa70ffa5d43d0109896623fc1367.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) include/linux/trace_events.h | 14 ++++++----- kernel/trace/trace.h | 9 +++---- kernel/trace/trace_events_hist.c | 11 +++++---- kernel/trace/trace_events_trigger.c | 47 +++++++++++++++++++++++-------------- 4 files changed, 49 insertions(+), 32 deletions(-) commit 2c1ea60b195da6c4661ec5e4d61f68b8b34e113b Author: Tom Zanussi Date: Mon Jan 15 20:51:41 2018 -0600 tracing: Add timestamp_mode trace file Add a new option flag indicating whether or not the ring buffer is in 'absolute timestamp' mode. Currently this is only set/unset by hist triggers that make use of a common_timestamp. As such, there's no reason to make this writeable for users - its purpose is only to allow users to determine unequivocally whether or not the ring buffer is in that mode (although absolute timestamps can coexist with the normal delta timestamps, when the ring buffer is in absolute mode, timestamps written while absolute mode is in effect take up more space in the buffer, and are not as efficient). Link: http://lkml.kernel.org/r/e8aa7b1cde1cf15014e66545d06ac6ef2ebba456.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) Documentation/trace/ftrace.txt | 24 +++++++++++++++++++++ kernel/trace/trace.c | 47 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) commit dc4e2801d400b0346fb281ce9cf010d611e2243c Author: Tom Zanussi Date: Mon Jan 15 20:51:40 2018 -0600 ring-buffer: Redefine the unimplemented RINGBUF_TYPE_TIME_STAMP RINGBUF_TYPE_TIME_STAMP is defined but not used, and from what I can gather was reserved for something like an absolute timestamp feature for the ring buffer, if not a complete replacement of the current time_delta scheme. This code redefines RINGBUF_TYPE_TIME_STAMP to implement absolute time stamps. Another way to look at it is that it essentially forces extended time_deltas for all events. The motivation for doing this is to enable time_deltas that aren't dependent on previous events in the ring buffer, making it feasible to use the ring_buffer_event timetamps in a more random-access way, for purposes other than serial event printing. To set/reset this mode, use tracing_set_timestamp_abs() from the previous interface patch. Link: http://lkml.kernel.org/r/477b362dba1ce7fab9889a1a8e885a62c472f041.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) include/linux/ring_buffer.h | 12 ++--- kernel/trace/ring_buffer.c | 104 ++++++++++++++++++++++++++++++++------------ 2 files changed, 83 insertions(+), 33 deletions(-) commit 00b4145298aeb05a2d110117ed18148cb21ebd14 Author: Tom Zanussi Date: Mon Jan 15 20:51:39 2018 -0600 ring-buffer: Add interface for setting absolute time stamps Define a new function, tracing_set_time_stamp_abs(), which can be used to enable or disable the use of absolute timestamps rather than time deltas for a trace array. Only the interface is added here; a subsequent patch will add the underlying implementation. Link: http://lkml.kernel.org/r/ce96119de44c7fe0ee44786d15254e9b493040d3.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Baohong Liu Signed-off-by: Steven Rostedt (VMware) include/linux/ring_buffer.h | 2 ++ kernel/trace/ring_buffer.c | 11 +++++++++++ kernel/trace/trace.c | 33 ++++++++++++++++++++++++++++++++- kernel/trace/trace.h | 3 +++ 4 files changed, 48 insertions(+), 1 deletion(-) commit c193707dde77ace92a649cd59a17e105e2fbeaef Author: Vedang Patel Date: Mon Jan 15 20:51:38 2018 -0600 tracing: Remove code which merges duplicates We now have the logic to detect and remove duplicates in the tracing_map hash table. The code which merges duplicates in the histogram is redundant now. So, modify this code just to detect duplicates. The duplication detection code is still kept to ensure that any rare race condition which might cause duplicates does not go unnoticed. Link: http://lkml.kernel.org/r/55215cf59e2674391bdaf772fdafc4c393352b03.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Vedang Patel Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 11 ------ kernel/trace/tracing_map.c | 83 +++------------------------------------- kernel/trace/tracing_map.h | 7 ---- 3 files changed, 6 insertions(+), 95 deletions(-) commit cbf4100efb8f279b6f35917b748b2239019c7a96 Author: Vedang Patel Date: Mon Jan 15 20:51:37 2018 -0600 tracing: Add support to detect and avoid duplicates A duplicate in the tracing_map hash table is when 2 different entries have the same key and, as a result, the key_hash. This is possible due to a race condition in the algorithm. This race condition is inherent to the algorithm and not a bug. This was fine because, until now, we were only interested in the sum of all the values related to a particular key (the duplicates are dealt with in tracing_map_sort_entries()). But, with the inclusion of variables[1], we are interested in individual values. So, it will not be clear what value to choose when there are duplicates. So, the duplicates need to be removed. The duplicates can occur in the code in the following scenarios: - A thread is in the process of adding a new element. It has successfully executed cmpxchg() and inserted the key. But, it is still not done acquiring the trace_map_elt struct, populating it and storing the pointer to the struct in the value field of tracing_map hash table. If another thread comes in at this time and wants to add an element with the same key, it will not see the current element and add a new one. - There are multiple threads trying to execute cmpxchg at the same time, one of the threads will succeed and the others will fail. The ones which fail will go ahead increment 'idx' and add a new element there creating a duplicate. This patch detects and avoids the first condition by asking the thread which detects the duplicate to loop one more time. There is also a possibility of infinite loop if the thread which is trying to insert goes to sleep indefinitely and the one which is trying to insert a new element detects a duplicate. Which is why, the thread loops for map_size iterations before returning NULL. The second scenario is avoided by preventing the threads which failed cmpxchg() from incrementing idx. This way, they will loop around and check if the thread which succeeded in executing cmpxchg() had the same key. [1] http://lkml.kernel.org/r/cover.1498510759.git.tom.zanussi@linux.intel.com Link: http://lkml.kernel.org/r/e178e89ec399240331d383bd5913d649713110f4.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Vedang Patel Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/tracing_map.c | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) commit 442c9484619085bd2b7c92efad5189dadd71ab2a Author: Tom Zanussi Date: Mon Jan 15 20:51:36 2018 -0600 tracing: Add Documentation for log2 modifier Add a line for the log2 modifier, to keep it aligned with tracing/README. Link: http://lkml.kernel.org/r/a419028bccab155749a4b8702d5b97af75f1578f.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) Documentation/trace/histogram.txt | 1 + 1 file changed, 1 insertion(+) commit b8df4a3634e08ad5fcba248c67941bac3b167ef3 Author: Tom Zanussi Date: Mon Jan 15 20:51:35 2018 -0600 tracing: Move hist trigger Documentation to histogram.txt The hist trigger Documentation takes up a large part of events.txt - since it will be getting even larger, move it to a separate file. Link: http://lkml.kernel.org/r/92761155ea4f529e590821b1e02207fe8619f248.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) Documentation/trace/events.txt | 1548 +----------------------------------- Documentation/trace/histogram.txt | 1568 +++++++++++++++++++++++++++++++++++++ 2 files changed, 1569 insertions(+), 1547 deletions(-) commit 1c4bfce1c6045a7c5191949f6bd74662fb9bf02d Author: Gustavo A. R. Silva Date: Sat Mar 10 10:16:41 2018 -0800 Input: stmpe-keypad - remove VLA usage In preparation to enabling -Wvla, remove VLA and replace it with a fixed-length array instead. Fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Dmitry Torokhov drivers/input/keyboard/stmpe-keypad.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 9aa5134ac486b48c4c8ac14571e6034131f040f8 Author: Rodrigo Siqueira Date: Fri Mar 9 20:46:25 2018 -0300 staging:iio:ad2s1210: Remove old_data from ad2s1210_state The variable old_data is a bool type, which only receives the value 'true' in the function ad2s1210_config_write and ad2s1210_config_read. There is no other use for this variable. This patch removes old_data from the ad2s1210_state and from all the function that use it. Signed-off-by: Rodrigo Siqueira Signed-off-by: Jonathan Cameron drivers/staging/iio/resolver/ad2s1210.c | 3 --- 1 file changed, 3 deletions(-) commit a8cf0d829af69e64aa1cbf9bc8816389c5cce5e9 Author: Rodrigo Siqueira Date: Fri Mar 9 20:46:05 2018 -0300 staging:iio:ad2s1210: Remove unused #define directive This patch removes some #define directives not used in the code. Signed-off-by: Rodrigo Siqueira Signed-off-by: Jonathan Cameron drivers/staging/iio/resolver/ad2s1210.c | 10 ---------- 1 file changed, 10 deletions(-) commit 23c537ae0e2f109165ef231edc25155a64427cc1 Author: Rodrigo Siqueira Date: Fri Mar 9 20:45:50 2018 -0300 staging:iio:ad2s1210: Remove end of line with '[' This patch fixes the checkpatch.pl check: iio/resolver/ad2s1210.c:202: CHECK: Lines should not end with a '[' Signed-off-by: Rodrigo Siqueira Signed-off-by: Jonathan Cameron drivers/staging/iio/resolver/ad2s1210.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6e2e828de05acbe2f4e070b3d51129fb1220b17d Author: Tom Lebreux Date: Thu Mar 8 18:56:07 2018 -0500 staging:iio:ad7150: Align arguments to match open parenthesis This fixes the following checkpatch.pl CHECK: Alignment should match open parenthesis Signed-off-by: Tom Lebreux Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7150.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d6570e198062c47cbe02bc2321c0514ffc57bc2f Author: Tom Lebreux Date: Thu Mar 8 18:19:04 2018 -0500 staging:iio:ad7152: Align arguments to match open parenthesis This patch fixes checkpatch.pl CHECK for alignment. Signed-off-by: Tom Lebreux Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7152.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5214ad6dcc1bf72ea60a72741a0143356b8d66b7 Author: Peter Rosin Date: Thu Mar 8 20:58:30 2018 +0100 iio: potentiometer: mcp4018: driver for Microchip digital potentiometers Add support for Microchip digital potentiometers and rheostats MCP4017, MCP4018, MCP4019 They all have one wiper with 128 steps and come in 5, 10, 50 and 100 kOhm variations. Datasheet: http://www.microchip.com/downloads/en/DeviceDoc/22147a.pdf Signed-off-by: Peter Rosin Signed-off-by: Jonathan Cameron MAINTAINERS | 3 +- drivers/iio/potentiometer/Kconfig | 11 ++ drivers/iio/potentiometer/Makefile | 1 + drivers/iio/potentiometer/mcp4018.c | 194 ++++++++++++++++++++++++++++++++++++ 4 files changed, 208 insertions(+), 1 deletion(-) commit d90f21408bf923aee0fd778fa6fb877ea006a198 Author: David Veenstra Date: Thu Mar 8 10:48:13 2018 +0100 Staging: iio: ad7746: Adjust arguments to match open parenthesis This patch clears all checkpatch.pl CHECKS, about alignment not matching open parenthesis, whenever it is possible without going beyond 80 columns. Signed-off-by: David Veenstra Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7746.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1237a3d4a04827d62eceb664e56898f84c909524 Author: David Veenstra Date: Thu Mar 8 10:47:29 2018 +0100 Staging: iio: adt7316: Move symbol export to definition This patch clears the following checkpatch.pl warning: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable +EXPORT_SYMBOL_GPL(adt7316_pm_ops); Signed-off-by: David Veenstra Signed-off-by: Jonathan Cameron drivers/staging/iio/addac/adt7316.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a937729c9358f1c66a444af1f4f64ececc9a2f68 Author: Himanshu Jha Date: Fri Mar 9 00:15:33 2018 +0530 iio: potentiometer: ds1803: Remove VLA usage In preparation to enabling -Wvla, remove VLA usage and replace it with fixed a fixed length array and therefore, prevent potential stack overflow attacks. Fixed as a part of the discussion to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 Cc: keescook@chromium.org Signed-off-by: Himanshu Jha Signed-off-by: Jonathan Cameron drivers/iio/potentiometer/ds1803.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ab5b72453672ea18a176925becc40888df435ce Author: Brian Masney Date: Sat Mar 3 20:49:42 2018 -0500 staging: iio: tsl2x7x: make proximity sensor function correctly The bits for setting up the proximity diode were not setup correctly and this was causing the proximity sensor to not function correctly. This patch sets up the correct bit mask in tsl2x7x_chip_on() based on what the data sheet expects. From page 35 of the TSL2771 data sheet: https://ams.com/eng/content/download/250264/976045/file/TSL2771_DS000105_3-00.pdf - Bits 0-1 is the ALS gain control - Bits 2-3 is reserved (The proximity gain control on other tsl2x7x chips) - Bits 4-5 is the proximity diode select - Bits 6-7 is the LED drive strength tsl2x7x_chip_on() had the power and diode hardcoded, so these are extracted out into the settings so that these fields can be configured in the platform data. The default prox_gain is changed from 1 (2X gain) to 0 (1X gain) since the proximity gain control on the TSL2771, TMD2771, and other chips have these fields listed as reserved, and to write 0 into those bits. Verified that the proximity sensor now works correctly on a TSL2771 hooked up to a Raspberry Pi 2. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 25 ++++++++++++++----------- drivers/staging/iio/light/tsl2x7x.h | 2 ++ 2 files changed, 16 insertions(+), 11 deletions(-) commit 8d923921f9ae2a1bc20ce37a2abcc2dbce16188e Author: Brian Masney Date: Sat Mar 3 20:49:41 2018 -0500 staging: iio: tsl2x7x: remove unnecessary sysfs attribute The tsl2771 and tmd2771 devices create the in_proximity0_calibscale_available sysfs attribute. These two particular devices do not support changing the proximity gain value on the chip so this patch removes that sysfs attribute. As expected, these two devices already did not create the IIO_CHAN_INFO_CALIBSCALE channel and proximity0_calibrate sysfs attribute. Page 38 of the tsl2772 data sheet shows that the proximity gain can be adjusted with bits 2-3 on the control register: https://ams.com/eng/content/download/291503/1066377/file/TSL2772_DS000181_2-00.pdf Page 35 of the tsl2771 and tmd2771 data sheets shows that bits 2-3 on the control register are reserved and changing the proximity gain is not supported: https://ams.com/eng/content/download/250264/976045/file/TSL2771_DS000105_3-00.pdf https://ams.com/eng/content/download/250283/976077/file/TMD2771_DS000177_2-00.pdf Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 1 - 1 file changed, 1 deletion(-) commit 8514976685e664df8cdeaf737a3f73e1e33bc7bd Author: Brian Masney Date: Sat Mar 3 20:49:39 2018 -0500 staging: iio: tsl2x7x: add missing error checks The functions in_illuminance0_calibrate_store() and in_illuminance0_lux_table_store() did not have complete error handling in place. This patch adds the missing error handling. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit dbe0f59c7cdaf3815fa6cb13cd925e9736f33388 Author: Brian Masney Date: Sat Mar 3 20:49:38 2018 -0500 staging: iio: tsl2x7x: add error handling to tsl2x7x_prox_cal() tsl2x7x_prox_cal() did not have any error checks. This patch adds the missing error handling and ensures that any errors are reported to user space via in_proximity0_calibrate_store(). Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) commit 6f80ff9ec8533991c854082cce1ea3e024da36a5 Author: Brian Masney Date: Sat Mar 3 20:49:37 2018 -0500 staging: iio: tsl2x7x: correct 'Avoid CamelCase' warning from checkpatch The statP and calP variables triggered an 'Avoid CamelCase' warning from checkpatch.pl. This patch renames these variables to stat and cal to fix this warning. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 07ab2f4fac0f6ef62d8201713068bfbc8cba7f1a Author: Brian Masney Date: Sat Mar 3 20:49:36 2018 -0500 staging: iio: tsl2x7x: correctly return errors in tsl2x7x_get_prox() Not all errors that occurred in tsl2x7x_get_prox() were correctly reported in the return value. This patch changes the error handling so that errors are now returned properly. Note that the ret variable is from the call to tsl2x7x_read_status(), and it already has the correct error check. The -EINVAL error code is for an unexpected value in the register. This patch also corrects an unnecessary word wrap in the call to le16_to_cpup() while changes are being made to this code. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit a0722d05a19542616a42b6239165d7ac9c542057 Author: Brian Masney Date: Sat Mar 3 20:49:35 2018 -0500 staging: iio: tsl2x7x: convert mutex_trylock() to mutex_lock() The driver uses mutex_lock() and mutex_trylock() in several places. Convert the mutex_trylock() to mutex_lock() for consistency with other IIO light drivers in mainline. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit f5d9bca666078871f27eef6b18e507498840eb70 Author: Brian Masney Date: Sat Mar 3 20:49:34 2018 -0500 staging: iio: tsl2x7x: add common function for writing to the control register There were four places where the same chunk of code was used to write to the control register. This patch creates a common function tsl2x7x_write_control_reg() to reduce duplicate code. The function tsl2x7x_chip_off() did not correctly return an error code so this patch also corrects that issue. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 54 +++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 29 deletions(-) commit 107eb59bc15ccd999b8cd297172691673396ec8f Author: Brian Masney Date: Sat Mar 3 20:49:33 2018 -0500 staging: iio: tsl2x7x: add common function for reading chip status There were three places where the same chunk of code was used to read the chip status. This patch creates a common function tsl2x7x_read_status() to reduce duplicate code. This patch also corrects tsl2x7x_event_handler() to properly check for an error after reading the chip status. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 40 ++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 16 deletions(-) commit eac15d8ded8f23a7cda681e2b2c7b86cf8535688 Author: Brian Masney Date: Sat Mar 3 20:49:32 2018 -0500 staging: iio: tsl2x7x: add common function for clearing interrupts There were three places where the same chunk of code was used to clear interrupts. This patch creates a common function tsl2x7x_clear_interrupts() to reduce duplicate code. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 52 +++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 28 deletions(-) commit a4a214143ef899a5eb46707f3049f38134d63ccd Author: Brian Masney Date: Sat Mar 3 20:49:31 2018 -0500 staging: iio: tsl2x7x: remove power functions from tsl2X7X_platform_data The tsl2X7X_platform_data structure contains the platform_power, power_on, and power_off function pointers. These power management functions should not be in the platform data. These functions were likely used before the regulator framework was put in place. There are no users of these functions in the mainline kernel. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 18 ------------------ drivers/staging/iio/light/tsl2x7x.h | 4 ---- 2 files changed, 22 deletions(-) commit 1462eecfc534fbfe85645d632527b358354fa3f4 Merge: 089bcaa 977f6f6 Author: Wim Van Sebroeck Date: Sat Mar 10 11:46:24 2018 +0100 Merge branch 'v4.16-fixes' commit 089bcaa87e772beb005068a5ef28c71bb895d01d Author: Fabrizio Castro Date: Mon Mar 5 15:30:26 2018 +0000 watchdog: renesas_wdt: Add restart handler On iWave's boards iwg20d and iwg22d the only way to reboot the system is by means of the watchdog. This patch adds a restart handler to rwdt_ops, and also makes sure we keep its priority to the lowest level, in order to not override other more effective handlers. Signed-off-by: Fabrizio Castro Signed-off-by: Ramesh Shanmugasundaram Reviewed-by: Guenter Roeck Reviewed-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/renesas_wdt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 3fe95e6c68e6258410e85488af9e1b1ff545b831 Author: Fabrizio Castro Date: Mon Mar 5 15:30:25 2018 +0000 watchdog: renesas_wdt: Add R-Car Gen2 support Due to commits: * "ARM: shmobile: Add watchdog support", * "ARM: shmobile: rcar-gen2: Add watchdog support", and * "soc: renesas: rcar-rst: Enable watchdog as reset trigger for Gen2", we now have everything we needed for the watchdog to work on Gen2 and RZ/G1. However, on early revisions of some R-Car Gen2 SoCs, and depending on SMP configuration, the system may fail to restart on watchdog time-out, and lock up instead. Specifically: - On R-Car H2 ES1.0 and M2-W ES1.0, watchdog restart fails unless only the first CPU core is in use (using e.g. the "maxcpus=1" kernel commandline option). - On R-Car V2H ES1.1, watchdog restart fails unless SMP is disabled completely (using CONFIG_SMP=n during build configuration, or using the "nosmp" or "maxcpus=0" kernel commandline options). This commit adds "renesas,rcar-gen2-wdt" as compatible string for R-Car Gen2 and RZ/G1, but also prevents the system from using the watchdog driver in cases where the system would fail to restart by blacklisting the affected SoCs, using the minimum known working revisions (ES2.0 on R-Car H2, and ES3.0 on M2-W), and taking the actual SMP software configuration into account. Signed-off-by: Fabrizio Castro Signed-off-by: Ramesh Shanmugasundaram [Geert: blacklisting logic] Signed-off-by: Geert Uytterhoeven Acked-by: Wolfram Sang Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/renesas_wdt.c | 49 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 5 deletions(-) commit 07278ca1ccc9a1241f14a8aaa4f2430b7b217c3f Author: Fabrizio Castro Date: Mon Mar 5 15:30:24 2018 +0000 watchdog: renesas_wdt: Add suspend/resume support On R-Car Gen2 and RZ/G1 the watchdog IP clock needs to be always ON, on R-Car Gen3 we power the IP down during suspend. This commit adds suspend/resume support, so that the watchdog counting "pauses" during suspend on all of the SoCs compatible with this driver and on those we are now adding support for (R-Car Gen2 and RZ/G1). Signed-off-by: Fabrizio Castro Signed-off-by: Ramesh Shanmugasundaram Reviewed-by: Wolfram Sang Reviewed-by: Guenter Roeck Reviewed-by: Geert Uytterhoeven Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/renesas_wdt.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 977f6f68331f94bb72ad84ee96b7b87ce737d89d Author: Igor Pylypiv Date: Tue Mar 6 23:47:25 2018 -0800 watchdog: f71808e_wdt: Fix WD_EN register read F71808FG_FLAG_WD_EN defines bit position, not a bitmask Signed-off-by: Igor Pylypiv Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Cc: stable drivers/watchdog/f71808e_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd5c0ba2cd78a4c116726ead84f8f37dc92d043e Author: Alan Stern Date: Wed Mar 7 09:27:40 2018 -0800 tools/memory-model: Finish the removal of rb-dep, smp_read_barrier_depends(), and lockless_dereference() Commit: bf28ae562744 ("tools/memory-model: Remove rb-dep, smp_read_barrier_depends, and lockless_dereference") was merged too early, while it was still in RFC form. This patch adds in the missing pieces. Akira pointed out some typos in the original patch, and he noted that cheatsheet.txt should indicate that READ_ONCE() now implies an address dependency. Andrea suggested documenting the relationship betwwen unsuccessful RMW operations and address dependencies. Andrea pointed out that the macro for rcu_dereference() in linux.def should now use the "once" annotation instead of "deref". He also suggested that the comments should mention commit: 5a8897cc7631 ("locking/atomics/alpha: Add smp_read_barrier_depends() to _release()/_relaxed() atomics") ... as an important precursor, and he contributed commit: cb13b424e986 ("locking/xchg/alpha: Add unconditional memory barrier to cmpxchg()") which is another prerequisite. Suggested-by: Akira Yokosawa Suggested-by: Andrea Parri Signed-off-by: Alan Stern [ Fixed read_read_lock() typo reported by Akira. ] Signed-off-by: Paul E. McKenney Acked-by: Andrea Parri Acked-by: Akira Yokosawa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: boqun.feng@gmail.com Cc: dhowells@redhat.com Cc: j.alglave@ucl.ac.uk Cc: linux-arch@vger.kernel.org Cc: luc.maranget@inria.fr Cc: npiggin@gmail.com Cc: will.deacon@arm.com Fixes: bf28ae562744 ("tools/memory-model: Remove rb-dep, smp_read_barrier_depends, and lockless_dereference") Link: http://lkml.kernel.org/r/1520443660-16858-4-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar tools/memory-model/Documentation/cheatsheet.txt | 6 +++--- tools/memory-model/Documentation/explanation.txt | 4 ++-- tools/memory-model/linux-kernel.def | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit ff1fe5e079730f138c98b268ce2e8482a1d954b4 Author: Paul E. McKenney Date: Wed Mar 7 09:27:39 2018 -0800 tools/memory-model: Add documentation of new litmus test The litmus-tests/README file lacks any mention of the new litmus test ISA2+pooncelock+pooncelock+pombonce.litmus. This commit therefore adds a description of this test. Reported-by: Alan Stern Signed-off-by: Paul E. McKenney Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akiyks@gmail.com Cc: boqun.feng@gmail.com Cc: dhowells@redhat.com Cc: j.alglave@ucl.ac.uk Cc: linux-arch@vger.kernel.org Cc: luc.maranget@inria.fr Cc: npiggin@gmail.com Cc: parri.andrea@gmail.com Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1520443660-16858-3-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar tools/memory-model/litmus-tests/README | 6 ++++++ 1 file changed, 6 insertions(+) commit d095c12c53c7b941ad4ea96dc229a08296b37d2e Author: Paul E. McKenney Date: Wed Mar 7 09:27:38 2018 -0800 tools/memory-model: Remove mention of docker/gentoo image Because the docker and gentoo images haven't been updated in quite some time, they are likely to provide more confusion than help. This commit therefore removes mention of them from the README file. Reported-by: Alan Stern Signed-off-by: Paul E. McKenney Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akiyks@gmail.com Cc: boqun.feng@gmail.com Cc: dhowells@redhat.com Cc: j.alglave@ucl.ac.uk Cc: linux-arch@vger.kernel.org Cc: luc.maranget@inria.fr Cc: npiggin@gmail.com Cc: parri.andrea@gmail.com Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1520443660-16858-2-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar tools/memory-model/README | 15 --------------- 1 file changed, 15 deletions(-) commit f28f0868feb1e79b460131bac37230e303a5f6a4 Author: Paul E. McKenney Date: Wed Mar 7 09:27:37 2018 -0800 locking/memory-barriers: De-emphasize smp_read_barrier_depends() some more This commit makes further changes to memory-barrier.txt to further de-emphasize smp_read_barrier_depends(), but leaving some discussion for historical purposes. Signed-off-by: Paul E. McKenney Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akiyks@gmail.com Cc: boqun.feng@gmail.com Cc: dhowells@redhat.com Cc: j.alglave@ucl.ac.uk Cc: linux-arch@vger.kernel.org Cc: luc.maranget@inria.fr Cc: npiggin@gmail.com Cc: parri.andrea@gmail.com Cc: stern@rowland.harvard.edu Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1520443660-16858-1-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar Documentation/memory-barriers.txt | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit d88f1f1fdb9f8f60602b406c89342e113a19df7f Merge: 04860d4 cdb06e9 Author: Ingo Molnar Date: Sat Mar 10 10:19:28 2018 +0100 Merge branch 'linus' into locking/core, to pick up fixes and dependencies Signed-off-by: Ingo Molnar commit 99e3a1e6fedd3b8713a1398772ad7da3796c6908 Author: Chen-Yu Tsai Date: Thu Mar 8 23:00:12 2018 +0800 ARM: sunxi: mc-smp: Split out SoC-specific device node lookup sequence The multi-cluster SMP code maps the address spaces of several hardware control blocks. The device nodes for them are SoC-specific. To help with supporting other SoCs to re-use this code, these bits should be split out to a separate function tied to the enable-method string. This patch splits out and groups the device node lookup sequence, and adds new data structures to have the newly created function tied to the enable method string. This structure can also be used to encode other differences between the SoCs. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai arch/arm/mach-sunxi/mc_smp.c | 126 +++++++++++++++++++++++++++++-------------- 1 file changed, 86 insertions(+), 40 deletions(-) commit 8591743f12636a247bdab56c8c355ea9686f2d97 Author: Chen-Yu Tsai Date: Thu Mar 8 23:00:10 2018 +0800 ARM: sunxi: mc-smp: Use DT enable-method for sun9i A80 SMP Instead of having an early init function check the machine compatible and installing multi-cluster SMP support for the A80 if it matches, use a new cpu enable-method string. This makes the platform support future proof in case anyone manages to add PSCI support. The original init code for the SMP support is changed into the .prepare_cpus callback in the smp_operations structure. Instead of panicing when resources are missing like on some platforms, our code merely guards against engaging SMP or CPU hotplug and returns an error. Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Chen-Yu Tsai Documentation/devicetree/bindings/arm/cpus.txt | 1 + arch/arm/mach-sunxi/mc_smp.c | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) commit c161daea999b9b707d9ffde28ce978d14d5a1185 Author: Chen-Yu Tsai Date: Thu Mar 8 23:00:09 2018 +0800 ARM: sunxi: mc-smp: Fix "lookback" typo The sunxi_mc_smp_lookback function is modeled after the mcpm_loopback function in the MCPM framework. "lookback" was a typo introduced when the new function was added. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai arch/arm/mach-sunxi/mc_smp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 651f97f58bbb43670e9c2d365938f4582ce40423 Author: Chen-Yu Tsai Date: Thu Mar 8 23:00:11 2018 +0800 ARM: dts: sun9i: Add enable-method for SMP support for the A80 SoC Using the enable-method property for SMP support would allow future PSCI implementations to override any in-OS support. This is better than just matching against the machine compatible, and then having to determine whether other methods are available or not. This adds enable-method properties to all CPU nodes. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai arch/arm/boot/dts/sun9i-a80.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 78b98e3c5a66d569a53b8f57b6a698f912794a43 Author: Miroslav Lichvar Date: Fri Mar 9 10:42:48 2018 -0800 timekeeping/ntp: Determine the multiplier directly from NTP tick length When the length of the NTP tick changes significantly, e.g. when an NTP/PTP application is correcting the initial offset of the clock, a large value may accumulate in the NTP error before the multiplier converges to the correct value. It may then take a very long time (hours or even days) before the error is corrected. This causes the clock to have an unstable frequency offset, which has a negative impact on the stability of synchronization with precise time sources (e.g. NTP/PTP using hardware timestamping or the PTP KVM clock). Use division to determine the correct multiplier directly from the NTP tick length and replace the iterative approach. This removes the last major source of the NTP error. The only remaining source is now limited resolution of the multiplier, which is corrected by adding 1 to the multiplier when the system clock is behind the NTP time. Signed-off-by: Miroslav Lichvar Signed-off-by: John Stultz Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Prarit Bhargava Cc: Richard Cochran Cc: Stephen Boyd Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1520620971-9567-3-git-send-email-john.stultz@linaro.org Signed-off-by: Ingo Molnar include/linux/timekeeper_internal.h | 2 + kernel/time/timekeeping.c | 138 ++++++++++++------------------------ 2 files changed, 49 insertions(+), 91 deletions(-) commit c2cda2a5bda9f1369c9d1ab54a20571c13cf2743 Author: Miroslav Lichvar Date: Fri Mar 9 10:42:47 2018 -0800 timekeeping/ntp: Don't align NTP frequency adjustments to ticks When the timekeeping multiplier is changed, the NTP error is updated to correct the clock for the delay between the tick and the update of the clock. This error is corrected in later updates and the clock appears as if the frequency was changed exactly on the tick. Remove this correction to keep the point where the frequency is effectively changed at the time of the update. This removes a major source of the NTP error. Signed-off-by: Miroslav Lichvar Signed-off-by: John Stultz Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Prarit Bhargava Cc: Richard Cochran Cc: Stephen Boyd Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1520620971-9567-2-git-send-email-john.stultz@linaro.org Signed-off-by: Ingo Molnar kernel/time/timekeeping.c | 3 --- 1 file changed, 3 deletions(-) commit b54290e51accea4f696f5dacef8e609d0ccbe54a Author: Nicolas Pitre Date: Thu Mar 8 21:12:04 2018 -0500 ARM: simplify and fix linker script for TCM Let's put the TCM stuff in the __init section directly. No need for a separately freed memory area. Remove redundant linker sections, as well as comments that were more confusing than no comments at all. Finally make it XIP compatible by using LOAD_OFFSET in the section LMA specification. Signed-off-by: Nicolas Pitre Tested-by: Chris Brandt arch/arm/kernel/vmlinux-xip.lds.S | 8 +++--- arch/arm/kernel/vmlinux.lds.S | 8 +++--- arch/arm/kernel/vmlinux.lds.h | 52 +++++---------------------------------- arch/arm/mm/init.c | 11 --------- 4 files changed, 14 insertions(+), 65 deletions(-) commit c3146c43db4974f4571bd9d42b172ca03a9137c6 Author: Nicolas Pitre Date: Thu Mar 8 20:19:48 2018 -0500 ARM: linker script: factor out TCM bits This is a plain move with identical results, and therefore still broken in the XIP case. Signed-off-by: Nicolas Pitre Tested-by: Chris Brandt arch/arm/kernel/vmlinux-xip.lds.S | 55 +---------------------------------- arch/arm/kernel/vmlinux.lds.S | 55 +---------------------------------- arch/arm/kernel/vmlinux.lds.h | 60 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 108 deletions(-) commit 9147095896fb321ae10ec5a5f789079318137ac9 Author: Nicolas Pitre Date: Thu Mar 1 22:17:03 2018 -0500 ARM: linker script: factor out vectors and stubs Signed-off-by: Nicolas Pitre Tested-by: Chris Brandt arch/arm/kernel/vmlinux-xip.lds.S | 21 +-------------------- arch/arm/kernel/vmlinux.lds.S | 21 +-------------------- arch/arm/kernel/vmlinux.lds.h | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 40 deletions(-) commit d9a46e6e714178f6ce7fe2c536c59542a2964f6f Author: Nicolas Pitre Date: Thu Mar 1 17:32:28 2018 -0500 ARM: linker script: factor out unwinding table sections Signed-off-by: Nicolas Pitre Tested-by: Chris Brandt arch/arm/kernel/vmlinux-xip.lds.S | 15 +-------------- arch/arm/kernel/vmlinux.lds.S | 15 +-------------- arch/arm/kernel/vmlinux.lds.h | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 28 deletions(-) commit 47b4c77dc3565993e4925fb1c0cf00790f3b1eee Author: Nicolas Pitre Date: Mon Mar 5 16:34:03 2018 -0500 ARM: linker script: factor out stuff for the .text section Move common entries to vmlinux.lds.h as ARM_TEXT. Signed-off-by: Nicolas Pitre Tested-by: Chris Brandt arch/arm/kernel/vmlinux-xip.lds.S | 19 +------------------ arch/arm/kernel/vmlinux.lds.S | 19 +------------------ arch/arm/kernel/vmlinux.lds.h | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 36 deletions(-) commit ab42fad00953301c0d25d71340bf194868bd3df9 Author: Nicolas Pitre Date: Mon Mar 5 16:34:03 2018 -0500 ARM: linker script: factor out stuff for the DISCARD section Move common entries to vmlinux.lds.h and leave XIP and non-XIP entries in their respective file. The ARM_NOMMU_KEEP() and ARM_NOMMU_DISCARD() macros are added to be usable within the definition of ARM_DISCARD macro. Signed-off-by: Nicolas Pitre Tested-by: Chris Brandt arch/arm/kernel/vmlinux-xip.lds.S | 19 +++---------------- arch/arm/kernel/vmlinux.lds.S | 18 ++---------------- arch/arm/kernel/vmlinux.lds.h | 20 ++++++++++++++++++++ 3 files changed, 25 insertions(+), 32 deletions(-) commit 2f181e0ba8db654cf9e1b6abe454aebca9587448 Author: Nicolas Pitre Date: Tue Feb 27 22:39:27 2018 -0500 ARM: linker script: factor out some common definitions between XIP and non-XIP Lots of duplications between vmlinux.lds.S and vmlinux-xip.lds.S. This may lead to one file being updated but not the other. For example, SOFTIRQENTRY_TEXT and HYPERVISOR_TEXT were missing from the XIP version. This creates vmlinux.lds.h where a bunch of common defines are moved. Signed-off-by: Nicolas Pitre Tested-by: Chris Brandt arch/arm/kernel/vmlinux-xip.lds.S | 35 +++------------------------------- arch/arm/kernel/vmlinux.lds.S | 38 +------------------------------------ arch/arm/kernel/vmlinux.lds.h | 40 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 69 deletions(-) commit b8c9c8f0190f4004d3d4364edb2dea5978dfc824 Author: Arnd Bergmann Date: Wed Mar 7 21:46:52 2018 +0100 arch: remove score port The Sunplus S+core architecture was added in 2009 by Chen Liqin, who has been co-maintaining it with Lennox Wu since then, but after they both left the company, nobody else has shown any interest in the port and it has seen almost no activity other than tree-wide changes. The gcc port was removed a few years ago due to the inactivity. While the sunplus website still advertises products with unspecified RISC cores that might be S+core based, it's very clear that the Linux port is completely abandoned at this point. This removes all files related to the architecture. Acked-by: Lennox Wu Link: http://www.sunplus.com/ Signed-off-by: Arnd Bergmann MAINTAINERS | 7 - arch/score/Kconfig | 108 ------ arch/score/Kconfig.debug | 29 -- arch/score/Makefile | 44 --- arch/score/boot/Makefile | 15 - arch/score/configs/spct6600_defconfig | 84 ---- arch/score/include/asm/Kbuild | 13 - arch/score/include/asm/asm-offsets.h | 1 - arch/score/include/asm/asmmacro.h | 162 -------- arch/score/include/asm/atomic.h | 8 - arch/score/include/asm/bitops.h | 11 - arch/score/include/asm/bug.h | 18 - arch/score/include/asm/bugs.h | 7 - arch/score/include/asm/cache.h | 8 - arch/score/include/asm/cacheflush.h | 49 --- arch/score/include/asm/checksum.h | 244 ------------ arch/score/include/asm/cmpxchg.h | 48 --- arch/score/include/asm/delay.h | 29 -- arch/score/include/asm/device.h | 7 - arch/score/include/asm/div64.h | 7 - arch/score/include/asm/dma.h | 9 - arch/score/include/asm/elf.h | 98 ----- arch/score/include/asm/emergency-restart.h | 7 - arch/score/include/asm/exec.h | 7 - arch/score/include/asm/fixmap.h | 83 ---- arch/score/include/asm/ftrace.h | 4 - arch/score/include/asm/futex.h | 7 - arch/score/include/asm/hardirq.h | 7 - arch/score/include/asm/hw_irq.h | 4 - arch/score/include/asm/io.h | 9 - arch/score/include/asm/irq.h | 26 -- arch/score/include/asm/irq_regs.h | 12 - arch/score/include/asm/irqflags.h | 121 ------ arch/score/include/asm/kdebug.h | 7 - arch/score/include/asm/kmap_types.h | 7 - arch/score/include/asm/linkage.h | 8 - arch/score/include/asm/local.h | 7 - arch/score/include/asm/local64.h | 1 - arch/score/include/asm/mmu.h | 7 - arch/score/include/asm/mmu_context.h | 116 ------ arch/score/include/asm/module.h | 36 -- arch/score/include/asm/page.h | 94 ----- arch/score/include/asm/pci.h | 4 - arch/score/include/asm/percpu.h | 7 - arch/score/include/asm/pgalloc.h | 86 ----- arch/score/include/asm/pgtable-bits.h | 25 -- arch/score/include/asm/pgtable.h | 270 ------------- arch/score/include/asm/processor.h | 104 ----- arch/score/include/asm/ptrace.h | 26 -- arch/score/include/asm/scoreregs.h | 52 --- arch/score/include/asm/segment.h | 22 -- arch/score/include/asm/setup.h | 37 -- arch/score/include/asm/shmparam.h | 7 - arch/score/include/asm/string.h | 9 - arch/score/include/asm/switch_to.h | 12 - arch/score/include/asm/syscalls.h | 9 - arch/score/include/asm/thread_info.h | 90 ----- arch/score/include/asm/timex.h | 9 - arch/score/include/asm/tlb.h | 18 - arch/score/include/asm/tlbflush.h | 143 ------- arch/score/include/asm/topology.h | 7 - arch/score/include/asm/uaccess.h | 373 ------------------ arch/score/include/asm/ucontext.h | 1 - arch/score/include/asm/unaligned.h | 7 - arch/score/include/asm/user.h | 22 -- arch/score/include/uapi/asm/Kbuild | 6 - arch/score/include/uapi/asm/auxvec.h | 4 - arch/score/include/uapi/asm/bitsperlong.h | 7 - arch/score/include/uapi/asm/byteorder.h | 7 - arch/score/include/uapi/asm/errno.h | 7 - arch/score/include/uapi/asm/fcntl.h | 7 - arch/score/include/uapi/asm/ioctl.h | 7 - arch/score/include/uapi/asm/ioctls.h | 7 - arch/score/include/uapi/asm/ipcbuf.h | 7 - arch/score/include/uapi/asm/kvm_para.h | 2 - arch/score/include/uapi/asm/mman.h | 7 - arch/score/include/uapi/asm/msgbuf.h | 7 - arch/score/include/uapi/asm/param.h | 7 - arch/score/include/uapi/asm/posix_types.h | 7 - arch/score/include/uapi/asm/ptrace.h | 66 ---- arch/score/include/uapi/asm/resource.h | 7 - arch/score/include/uapi/asm/sembuf.h | 7 - arch/score/include/uapi/asm/setup.h | 10 - arch/score/include/uapi/asm/shmbuf.h | 7 - arch/score/include/uapi/asm/sigcontext.h | 23 -- arch/score/include/uapi/asm/signal.h | 7 - arch/score/include/uapi/asm/socket.h | 7 - arch/score/include/uapi/asm/sockios.h | 7 - arch/score/include/uapi/asm/stat.h | 7 - arch/score/include/uapi/asm/statfs.h | 7 - arch/score/include/uapi/asm/swab.h | 7 - arch/score/include/uapi/asm/termbits.h | 7 - arch/score/include/uapi/asm/termios.h | 7 - arch/score/include/uapi/asm/types.h | 7 - arch/score/include/uapi/asm/unistd.h | 13 - arch/score/kernel/Makefile | 12 - arch/score/kernel/asm-offsets.c | 214 ---------- arch/score/kernel/entry.S | 493 ------------------------ arch/score/kernel/head.S | 70 ---- arch/score/kernel/irq.c | 111 ------ arch/score/kernel/module.c | 132 ------- arch/score/kernel/process.c | 118 ------ arch/score/kernel/ptrace.c | 386 ------------------- arch/score/kernel/setup.c | 160 -------- arch/score/kernel/signal.c | 308 --------------- arch/score/kernel/sys_call_table.c | 13 - arch/score/kernel/sys_score.c | 50 --- arch/score/kernel/time.c | 90 ----- arch/score/kernel/traps.c | 346 ----------------- arch/score/kernel/vmlinux.lds.S | 91 ----- arch/score/lib/Makefile | 8 - arch/score/lib/ashldi3.c | 46 --- arch/score/lib/ashrdi3.c | 48 --- arch/score/lib/checksum.S | 255 ------------ arch/score/lib/checksum_copy.c | 53 --- arch/score/lib/cmpdi2.c | 44 --- arch/score/lib/libgcc.h | 37 -- arch/score/lib/lshrdi3.c | 47 --- arch/score/lib/string.S | 156 -------- arch/score/lib/ucmpdi2.c | 38 -- arch/score/mm/Makefile | 6 - arch/score/mm/cache.c | 281 -------------- arch/score/mm/extable.c | 40 -- arch/score/mm/fault.c | 237 ------------ arch/score/mm/init.c | 109 ------ arch/score/mm/pgtable.c | 52 --- arch/score/mm/tlb-miss.S | 199 ---------- arch/score/mm/tlb-score.c | 251 ------------ tools/arch/score/include/uapi/asm/bitsperlong.h | 7 - tools/arch/score/include/uapi/asm/mman.h | 7 - 130 files changed, 7716 deletions(-) commit 553b085c2075f6a4a2591108554f830fa61e881f Author: Arnd Bergmann Date: Wed Mar 7 21:36:19 2018 +0100 arch: remove m32r port The Mitsubishi/Renesas m32r architecture has been around for many years, but the Linux port has been obsolete for a very long time as well, with the last significant updates done for linux-2.6.14. While some m32r microcontrollers are still being marketed by Renesas, those are apparently no longer possible to support, mainly due to the lack of an external memory interface. Hirokazu Takata was the maintainer until the architecture got marked Orphaned in 2014. Link: http://www.linux-m32r.org/ Link: https://www.renesas.com/en-eu/products/microcontrollers-microprocessors/m32r.html Cc: Hirokazu Takata Signed-off-by: Arnd Bergmann MAINTAINERS | 5 - arch/m32r/Kconfig | 419 ----------- arch/m32r/Kconfig.debug | 22 - arch/m32r/Makefile | 63 -- arch/m32r/boot/Makefile | 19 - arch/m32r/boot/compressed/Makefile | 51 -- arch/m32r/boot/compressed/boot.h | 60 -- arch/m32r/boot/compressed/head.S | 177 ----- arch/m32r/boot/compressed/install.sh | 57 -- arch/m32r/boot/compressed/m32r_sio.c | 77 -- arch/m32r/boot/compressed/misc.c | 93 --- arch/m32r/boot/compressed/vmlinux.lds.S | 31 - arch/m32r/boot/compressed/vmlinux.scr | 9 - arch/m32r/boot/setup.S | 185 ----- arch/m32r/configs/m32104ut_defconfig | 144 ---- arch/m32r/configs/m32700ut.smp_defconfig | 85 --- arch/m32r/configs/m32700ut.up_defconfig | 84 --- arch/m32r/configs/mappi.nommu_defconfig | 46 -- arch/m32r/configs/mappi.smp_defconfig | 62 -- arch/m32r/configs/mappi.up_defconfig | 60 -- arch/m32r/configs/mappi2.opsp_defconfig | 65 -- arch/m32r/configs/mappi2.vdec2_defconfig | 64 -- arch/m32r/configs/mappi3.smp_defconfig | 62 -- arch/m32r/configs/oaks32r_defconfig | 43 -- arch/m32r/configs/opsput_defconfig | 63 -- arch/m32r/configs/usrv_defconfig | 78 -- arch/m32r/include/asm/Kbuild | 13 - arch/m32r/include/asm/addrspace.h | 57 -- arch/m32r/include/asm/asm-offsets.h | 1 - arch/m32r/include/asm/assembler.h | 231 ------ arch/m32r/include/asm/atomic.h | 275 ------- arch/m32r/include/asm/barrier.h | 16 - arch/m32r/include/asm/bitops.h | 274 ------- arch/m32r/include/asm/bug.h | 5 - arch/m32r/include/asm/bugs.h | 20 - arch/m32r/include/asm/cache.h | 9 - arch/m32r/include/asm/cachectl.h | 27 - arch/m32r/include/asm/cacheflush.h | 73 -- arch/m32r/include/asm/checksum.h | 202 ----- arch/m32r/include/asm/cmpxchg.h | 225 ------ arch/m32r/include/asm/dcache_clear.h | 29 - arch/m32r/include/asm/delay.h | 1 - arch/m32r/include/asm/device.h | 10 - arch/m32r/include/asm/div64.h | 1 - arch/m32r/include/asm/dma.h | 13 - arch/m32r/include/asm/elf.h | 132 ---- arch/m32r/include/asm/emergency-restart.h | 7 - arch/m32r/include/asm/fb.h | 20 - arch/m32r/include/asm/flat.h | 143 ---- arch/m32r/include/asm/ftrace.h | 1 - arch/m32r/include/asm/futex.h | 6 - arch/m32r/include/asm/hardirq.h | 10 - arch/m32r/include/asm/hw_irq.h | 4 - arch/m32r/include/asm/io.h | 225 ------ arch/m32r/include/asm/irq.h | 91 --- arch/m32r/include/asm/irq_regs.h | 1 - arch/m32r/include/asm/irqflags.h | 104 --- arch/m32r/include/asm/kdebug.h | 1 - arch/m32r/include/asm/kmap_types.h | 13 - arch/m32r/include/asm/linkage.h | 8 - arch/m32r/include/asm/local.h | 341 --------- arch/m32r/include/asm/local64.h | 1 - arch/m32r/include/asm/m32102.h | 315 -------- arch/m32r/include/asm/m32104ut/m32104ut_pld.h | 161 ---- arch/m32r/include/asm/m32700ut/m32700ut_lan.h | 103 --- arch/m32r/include/asm/m32700ut/m32700ut_lcd.h | 55 -- arch/m32r/include/asm/m32700ut/m32700ut_pld.h | 259 ------- arch/m32r/include/asm/m32r.h | 161 ---- arch/m32r/include/asm/m32r_mp_fpga.h | 314 -------- arch/m32r/include/asm/mappi2/mappi2_pld.h | 150 ---- arch/m32r/include/asm/mappi3/mappi3_pld.h | 142 ---- arch/m32r/include/asm/mc146818rtc.h | 30 - arch/m32r/include/asm/mmu.h | 22 - arch/m32r/include/asm/mmu_context.h | 167 ---- arch/m32r/include/asm/mmzone.h | 54 -- arch/m32r/include/asm/opsput/opsput_lan.h | 52 -- arch/m32r/include/asm/opsput/opsput_lcd.h | 55 -- arch/m32r/include/asm/opsput/opsput_pld.h | 255 ------- arch/m32r/include/asm/page.h | 90 --- arch/m32r/include/asm/pci.h | 7 - arch/m32r/include/asm/percpu.h | 7 - arch/m32r/include/asm/pgalloc.h | 82 -- arch/m32r/include/asm/pgtable-2level.h | 76 -- arch/m32r/include/asm/pgtable.h | 348 --------- arch/m32r/include/asm/processor.h | 127 ---- arch/m32r/include/asm/ptrace.h | 44 -- arch/m32r/include/asm/rtc.h | 66 -- arch/m32r/include/asm/s1d13806.h | 200 ----- arch/m32r/include/asm/segment.h | 11 - arch/m32r/include/asm/serial.h | 10 - arch/m32r/include/asm/setup.h | 32 - arch/m32r/include/asm/shmparam.h | 7 - arch/m32r/include/asm/signal.h | 25 - arch/m32r/include/asm/smp.h | 113 --- arch/m32r/include/asm/spinlock.h | 308 -------- arch/m32r/include/asm/spinlock_types.h | 24 - arch/m32r/include/asm/string.h | 14 - arch/m32r/include/asm/switch_to.h | 51 -- arch/m32r/include/asm/syscall.h | 9 - arch/m32r/include/asm/termios.h | 52 -- arch/m32r/include/asm/thread_info.h | 126 ---- arch/m32r/include/asm/timex.h | 28 - arch/m32r/include/asm/tlb.h | 21 - arch/m32r/include/asm/tlbflush.h | 98 --- arch/m32r/include/asm/topology.h | 7 - arch/m32r/include/asm/types.h | 13 - arch/m32r/include/asm/uaccess.h | 515 ------------- arch/m32r/include/asm/ucontext.h | 13 - arch/m32r/include/asm/unaligned.h | 19 - arch/m32r/include/asm/unistd.h | 51 -- arch/m32r/include/asm/user.h | 53 -- arch/m32r/include/asm/vga.h | 21 - arch/m32r/include/asm/xor.h | 7 - arch/m32r/include/uapi/asm/Kbuild | 7 - arch/m32r/include/uapi/asm/auxvec.h | 4 - arch/m32r/include/uapi/asm/bitsperlong.h | 2 - arch/m32r/include/uapi/asm/byteorder.h | 11 - arch/m32r/include/uapi/asm/errno.h | 7 - arch/m32r/include/uapi/asm/fcntl.h | 2 - arch/m32r/include/uapi/asm/ioctl.h | 2 - arch/m32r/include/uapi/asm/ioctls.h | 7 - arch/m32r/include/uapi/asm/ipcbuf.h | 2 - arch/m32r/include/uapi/asm/mman.h | 1 - arch/m32r/include/uapi/asm/msgbuf.h | 32 - arch/m32r/include/uapi/asm/param.h | 8 - arch/m32r/include/uapi/asm/posix_types.h | 26 - arch/m32r/include/uapi/asm/ptrace.h | 118 --- arch/m32r/include/uapi/asm/resource.h | 7 - arch/m32r/include/uapi/asm/sembuf.h | 26 - arch/m32r/include/uapi/asm/setup.h | 12 - arch/m32r/include/uapi/asm/shmbuf.h | 43 -- arch/m32r/include/uapi/asm/sigcontext.h | 40 - arch/m32r/include/uapi/asm/signal.h | 118 --- arch/m32r/include/uapi/asm/socket.h | 108 --- arch/m32r/include/uapi/asm/sockios.h | 14 - arch/m32r/include/uapi/asm/stat.h | 88 --- arch/m32r/include/uapi/asm/statfs.h | 7 - arch/m32r/include/uapi/asm/swab.h | 11 - arch/m32r/include/uapi/asm/termbits.h | 201 ----- arch/m32r/include/uapi/asm/termios.h | 44 -- arch/m32r/include/uapi/asm/types.h | 1 - arch/m32r/include/uapi/asm/unistd.h | 336 --------- arch/m32r/kernel/.gitignore | 1 - arch/m32r/kernel/Makefile | 12 - arch/m32r/kernel/align.c | 585 -------------- arch/m32r/kernel/asm-offsets.c | 15 - arch/m32r/kernel/entry.S | 553 -------------- arch/m32r/kernel/head.S | 284 ------- arch/m32r/kernel/irq.c | 44 -- arch/m32r/kernel/m32r_ksyms.c | 89 --- arch/m32r/kernel/module.c | 203 ----- arch/m32r/kernel/process.c | 154 ---- arch/m32r/kernel/ptrace.c | 708 ----------------- arch/m32r/kernel/setup.c | 424 ----------- arch/m32r/kernel/signal.c | 336 --------- arch/m32r/kernel/smp.c | 836 --------------------- arch/m32r/kernel/smpboot.c | 627 ---------------- arch/m32r/kernel/sys_m32r.c | 91 --- arch/m32r/kernel/syscall_table.S | 328 -------- arch/m32r/kernel/time.c | 199 ----- arch/m32r/kernel/traps.c | 324 -------- arch/m32r/kernel/vmlinux.lds.S | 79 -- arch/m32r/lib/Makefile | 7 - arch/m32r/lib/ashxdi3.S | 294 -------- arch/m32r/lib/checksum.S | 320 -------- arch/m32r/lib/csum_partial_copy.c | 59 -- arch/m32r/lib/delay.c | 130 ---- arch/m32r/lib/libgcc.h | 24 - arch/m32r/lib/memcpy.S | 93 --- arch/m32r/lib/memset.S | 179 ----- arch/m32r/lib/strlen.S | 118 --- arch/m32r/lib/ucmpdi2.c | 18 - arch/m32r/lib/usercopy.c | 362 --------- arch/m32r/mm/Makefile | 13 - arch/m32r/mm/cache.c | 89 --- arch/m32r/mm/discontig.c | 163 ---- arch/m32r/mm/extable.c | 20 - arch/m32r/mm/fault-nommu.c | 134 ---- arch/m32r/mm/fault.c | 550 -------------- arch/m32r/mm/init.c | 152 ---- arch/m32r/mm/ioremap-nommu.c | 52 -- arch/m32r/mm/ioremap.c | 111 --- arch/m32r/mm/mmu.S | 355 --------- arch/m32r/mm/page.S | 82 -- arch/m32r/oprofile/Makefile | 10 - arch/m32r/oprofile/init.c | 22 - arch/m32r/platforms/Makefile | 10 - arch/m32r/platforms/m32104ut/Makefile | 1 - arch/m32r/platforms/m32104ut/io.c | 298 -------- arch/m32r/platforms/m32104ut/setup.c | 139 ---- arch/m32r/platforms/m32700ut/Makefile | 1 - .../platforms/m32700ut/dot.gdbinit_200MHz_16MB | 249 ------ .../platforms/m32700ut/dot.gdbinit_300MHz_32MB | 249 ------ .../platforms/m32700ut/dot.gdbinit_400MHz_32MB | 249 ------ arch/m32r/platforms/m32700ut/io.c | 395 ---------- arch/m32r/platforms/m32700ut/setup.c | 451 ----------- arch/m32r/platforms/mappi/Makefile | 1 - arch/m32r/platforms/mappi/dot.gdbinit | 242 ------ arch/m32r/platforms/mappi/dot.gdbinit.nommu | 245 ------ arch/m32r/platforms/mappi/dot.gdbinit.smp | 344 --------- arch/m32r/platforms/mappi/io.c | 326 -------- arch/m32r/platforms/mappi/setup.c | 175 ----- arch/m32r/platforms/mappi2/Makefile | 1 - arch/m32r/platforms/mappi2/dot.gdbinit.vdec2 | 233 ------ arch/m32r/platforms/mappi2/io.c | 384 ---------- arch/m32r/platforms/mappi2/setup.c | 172 ----- arch/m32r/platforms/mappi3/Makefile | 1 - arch/m32r/platforms/mappi3/dot.gdbinit | 224 ------ arch/m32r/platforms/mappi3/io.c | 406 ---------- arch/m32r/platforms/mappi3/setup.c | 221 ------ arch/m32r/platforms/oaks32r/Makefile | 1 - arch/m32r/platforms/oaks32r/dot.gdbinit.nommu | 154 ---- arch/m32r/platforms/oaks32r/io.c | 229 ------ arch/m32r/platforms/oaks32r/setup.c | 114 --- arch/m32r/platforms/opsput/Makefile | 1 - arch/m32r/platforms/opsput/dot.gdbinit | 218 ------ arch/m32r/platforms/opsput/io.c | 395 ---------- arch/m32r/platforms/opsput/setup.c | 448 ----------- arch/m32r/platforms/usrv/Makefile | 1 - arch/m32r/platforms/usrv/io.c | 225 ------ arch/m32r/platforms/usrv/setup.c | 213 ------ tools/arch/m32r/include/uapi/asm/bitsperlong.h | 2 - tools/arch/m32r/include/uapi/asm/mman.h | 7 - 223 files changed, 27243 deletions(-) commit fd8773f9f544955f6f47dc2ac3ab85ad64376b7f Author: Arnd Bergmann Date: Wed Mar 7 21:21:59 2018 +0100 arch: remove frv port The Fujitsu FRV kernel port has been around for a long time, but has not seen regular updates in several years and instead was marked 'Orphaned' in 2016 by long-time maintainer David Howells. The SoC product line apparently is apparently still around in the form of the Socionext Milbeaut image processor, but this one no longer uses the FRV CPU cores. This removes all FRV specific files from the kernel. Link: http://www.socionext.com/en/products/assp/milbeaut/ Cc: David Howells Signed-off-by: Arnd Bergmann Documentation/00-INDEX | 2 - Documentation/frv/README.txt | 51 - Documentation/frv/atomic-ops.txt | 134 -- Documentation/frv/booting.txt | 182 --- Documentation/frv/clock.txt | 65 - Documentation/frv/configuring.txt | 125 -- Documentation/frv/features.txt | 310 ---- Documentation/frv/gdbinit | 102 -- Documentation/frv/gdbstub.txt | 130 -- Documentation/frv/kernel-ABI.txt | 262 --- Documentation/frv/mmu-layout.txt | 306 ---- MAINTAINERS | 4 - arch/frv/Kconfig | 386 ----- arch/frv/Kconfig.debug | 49 - arch/frv/Makefile | 90 -- arch/frv/boot/Makefile | 76 - arch/frv/defconfig | 39 - arch/frv/include/asm/Kbuild | 12 - arch/frv/include/asm/asm-offsets.h | 1 - arch/frv/include/asm/atomic.h | 224 --- arch/frv/include/asm/atomic_defs.h | 175 -- arch/frv/include/asm/ax88796.h | 22 - arch/frv/include/asm/barrier.h | 23 - arch/frv/include/asm/bitops.h | 325 ---- arch/frv/include/asm/bug.h | 56 - arch/frv/include/asm/bugs.h | 14 - arch/frv/include/asm/busctl-regs.h | 41 - arch/frv/include/asm/cache.h | 23 - arch/frv/include/asm/cacheflush.h | 105 -- arch/frv/include/asm/checksum.h | 180 --- arch/frv/include/asm/cmpxchg.h | 171 -- arch/frv/include/asm/cpu-irqs.h | 81 - arch/frv/include/asm/current.h | 30 - arch/frv/include/asm/delay.h | 50 - arch/frv/include/asm/div64.h | 1 - arch/frv/include/asm/dm9000.h | 37 - arch/frv/include/asm/dma-mapping.h | 18 - arch/frv/include/asm/dma.h | 125 -- arch/frv/include/asm/elf.h | 140 -- arch/frv/include/asm/emergency-restart.h | 6 - arch/frv/include/asm/fpu.h | 12 - arch/frv/include/asm/ftrace.h | 1 - arch/frv/include/asm/futex.h | 22 - arch/frv/include/asm/gdb-stub.h | 146 -- arch/frv/include/asm/gpio-regs.h | 116 -- arch/frv/include/asm/hardirq.h | 26 - arch/frv/include/asm/highmem.h | 149 -- arch/frv/include/asm/hw_irq.h | 16 - arch/frv/include/asm/io.h | 414 ----- arch/frv/include/asm/irc-regs.h | 53 - arch/frv/include/asm/irq.h | 30 - arch/frv/include/asm/irq_regs.h | 27 - arch/frv/include/asm/irqflags.h | 158 -- arch/frv/include/asm/kdebug.h | 1 - arch/frv/include/asm/kmap_types.h | 8 - arch/frv/include/asm/linkage.h | 7 - arch/frv/include/asm/local.h | 7 - arch/frv/include/asm/local64.h | 1 - arch/frv/include/asm/math-emu.h | 302 ---- arch/frv/include/asm/mb-regs.h | 200 --- arch/frv/include/asm/mb86943a.h | 42 - arch/frv/include/asm/mb93091-fpga-irqs.h | 42 - arch/frv/include/asm/mb93093-fpga-irqs.h | 29 - arch/frv/include/asm/mb93493-irqs.h | 50 - arch/frv/include/asm/mb93493-regs.h | 281 ---- arch/frv/include/asm/mem-layout.h | 86 - arch/frv/include/asm/mmu.h | 41 - arch/frv/include/asm/mmu_context.h | 50 - arch/frv/include/asm/module.h | 22 - arch/frv/include/asm/page.h | 74 - arch/frv/include/asm/pci.h | 40 - arch/frv/include/asm/percpu.h | 7 - arch/frv/include/asm/perf_event.h | 15 - arch/frv/include/asm/pgalloc.h | 69 - arch/frv/include/asm/pgtable.h | 528 ------ arch/frv/include/asm/processor.h | 110 -- arch/frv/include/asm/ptrace.h | 41 - arch/frv/include/asm/sections.h | 40 - arch/frv/include/asm/segment.h | 44 - arch/frv/include/asm/serial-regs.h | 44 - arch/frv/include/asm/serial.h | 14 - arch/frv/include/asm/setup.h | 26 - arch/frv/include/asm/shmparam.h | 8 - arch/frv/include/asm/signal.h | 7 - arch/frv/include/asm/smp.h | 10 - arch/frv/include/asm/spinlock.h | 17 - arch/frv/include/asm/spr-regs.h | 416 ----- arch/frv/include/asm/string.h | 50 - arch/frv/include/asm/switch_to.h | 35 - arch/frv/include/asm/syscall.h | 123 -- arch/frv/include/asm/termios.h | 15 - arch/frv/include/asm/thread_info.h | 116 -- arch/frv/include/asm/timer-regs.h | 106 -- arch/frv/include/asm/timex.h | 27 - arch/frv/include/asm/tlb.h | 28 - arch/frv/include/asm/tlbflush.h | 73 - arch/frv/include/asm/topology.h | 13 - arch/frv/include/asm/types.h | 22 - arch/frv/include/asm/uaccess.h | 285 ---- arch/frv/include/asm/ucontext.h | 13 - arch/frv/include/asm/unaligned.h | 22 - arch/frv/include/asm/unistd.h | 34 - arch/frv/include/asm/user.h | 80 - arch/frv/include/asm/vga.h | 17 - arch/frv/include/asm/virtconvert.h | 41 - arch/frv/include/asm/xor.h | 1 - arch/frv/include/uapi/asm/Kbuild | 5 - arch/frv/include/uapi/asm/auxvec.h | 4 - arch/frv/include/uapi/asm/bitsperlong.h | 2 - arch/frv/include/uapi/asm/byteorder.h | 7 - arch/frv/include/uapi/asm/errno.h | 8 - arch/frv/include/uapi/asm/fcntl.h | 2 - arch/frv/include/uapi/asm/ioctl.h | 2 - arch/frv/include/uapi/asm/ioctls.h | 11 - arch/frv/include/uapi/asm/ipcbuf.h | 2 - arch/frv/include/uapi/asm/kvm_para.h | 2 - arch/frv/include/uapi/asm/mman.h | 2 - arch/frv/include/uapi/asm/msgbuf.h | 33 - arch/frv/include/uapi/asm/param.h | 9 - arch/frv/include/uapi/asm/poll.h | 11 - arch/frv/include/uapi/asm/posix_types.h | 27 - arch/frv/include/uapi/asm/ptrace.h | 61 - arch/frv/include/uapi/asm/registers.h | 233 --- arch/frv/include/uapi/asm/resource.h | 8 - arch/frv/include/uapi/asm/sembuf.h | 27 - arch/frv/include/uapi/asm/setup.h | 19 - arch/frv/include/uapi/asm/shmbuf.h | 44 - arch/frv/include/uapi/asm/sigcontext.h | 27 - arch/frv/include/uapi/asm/signal.h | 37 - arch/frv/include/uapi/asm/socket.h | 109 -- arch/frv/include/uapi/asm/sockios.h | 15 - arch/frv/include/uapi/asm/stat.h | 101 -- arch/frv/include/uapi/asm/statfs.h | 8 - arch/frv/include/uapi/asm/swab.h | 11 - arch/frv/include/uapi/asm/termbits.h | 204 --- arch/frv/include/uapi/asm/termios.h | 47 - arch/frv/include/uapi/asm/types.h | 12 - arch/frv/include/uapi/asm/unistd.h | 349 ---- arch/frv/kernel/.gitignore | 1 - arch/frv/kernel/Makefile | 24 - arch/frv/kernel/asm-offsets.c | 96 -- arch/frv/kernel/break.S | 792 --------- arch/frv/kernel/cmode.S | 189 --- arch/frv/kernel/debug-stub.c | 258 --- arch/frv/kernel/dma.c | 463 ------ arch/frv/kernel/entry-table.S | 329 ---- arch/frv/kernel/entry.S | 1519 ----------------- arch/frv/kernel/frv_ksyms.c | 109 -- arch/frv/kernel/futex.c | 223 --- arch/frv/kernel/gdb-io.c | 215 --- arch/frv/kernel/gdb-io.h | 55 - arch/frv/kernel/gdb-stub.c | 2149 ------------------------- arch/frv/kernel/head-mmu-fr451.S | 374 ----- arch/frv/kernel/head-uc-fr401.S | 311 ---- arch/frv/kernel/head-uc-fr451.S | 174 -- arch/frv/kernel/head-uc-fr555.S | 347 ---- arch/frv/kernel/head.S | 638 -------- arch/frv/kernel/head.inc | 50 - arch/frv/kernel/irq-mb93091.c | 157 -- arch/frv/kernel/irq-mb93093.c | 129 -- arch/frv/kernel/irq-mb93493.c | 147 -- arch/frv/kernel/irq.c | 159 -- arch/frv/kernel/local.h | 59 - arch/frv/kernel/local64.h | 1 - arch/frv/kernel/module.c | 27 - arch/frv/kernel/pm-mb93093.c | 65 - arch/frv/kernel/pm.c | 352 ---- arch/frv/kernel/process.c | 275 ---- arch/frv/kernel/ptrace.c | 377 ----- arch/frv/kernel/setup.c | 1178 -------------- arch/frv/kernel/signal.c | 426 ----- arch/frv/kernel/sleep.S | 373 ----- arch/frv/kernel/switch_to.S | 489 ------ arch/frv/kernel/sys_frv.c | 44 - arch/frv/kernel/sysctl.c | 221 --- arch/frv/kernel/time.c | 122 -- arch/frv/kernel/traps.c | 642 -------- arch/frv/kernel/uaccess.c | 100 -- arch/frv/kernel/vmlinux.lds.S | 136 -- arch/frv/lib/Makefile | 8 - arch/frv/lib/__ashldi3.S | 40 - arch/frv/lib/__ashrdi3.S | 41 - arch/frv/lib/__lshrdi3.S | 40 - arch/frv/lib/__muldi3.S | 32 - arch/frv/lib/__negdi2.S | 28 - arch/frv/lib/__ucmpdi2.S | 45 - arch/frv/lib/atomic-lib.c | 8 - arch/frv/lib/atomic-ops.S | 62 - arch/frv/lib/atomic64-ops.S | 68 - arch/frv/lib/cache.S | 98 -- arch/frv/lib/checksum.c | 166 -- arch/frv/lib/insl_ns.S | 52 - arch/frv/lib/insl_sw.S | 40 - arch/frv/lib/memcpy.S | 135 -- arch/frv/lib/memset.S | 182 --- arch/frv/lib/outsl_ns.S | 59 - arch/frv/lib/outsl_sw.S | 45 - arch/frv/mb93090-mb00/Makefile | 16 - arch/frv/mb93090-mb00/flash.c | 90 -- arch/frv/mb93090-mb00/pci-dma-nommu.c | 176 -- arch/frv/mb93090-mb00/pci-dma.c | 118 -- arch/frv/mb93090-mb00/pci-frv.c | 193 --- arch/frv/mb93090-mb00/pci-frv.h | 33 - arch/frv/mb93090-mb00/pci-irq.c | 62 - arch/frv/mb93090-mb00/pci-vdk.c | 419 ----- arch/frv/mm/Makefile | 9 - arch/frv/mm/cache-page.c | 71 - arch/frv/mm/dma-alloc.c | 183 --- arch/frv/mm/elf-fdpic.c | 114 -- arch/frv/mm/extable.c | 49 - arch/frv/mm/fault.c | 328 ---- arch/frv/mm/highmem.c | 86 - arch/frv/mm/init.c | 144 -- arch/frv/mm/kmap.c | 51 - arch/frv/mm/mmu-context.c | 210 --- arch/frv/mm/pgalloc.c | 157 -- arch/frv/mm/tlb-flush.S | 184 --- arch/frv/mm/tlb-miss.S | 629 -------- tools/arch/frv/include/uapi/asm/bitsperlong.h | 2 - tools/arch/frv/include/uapi/asm/mman.h | 7 - 220 files changed, 28837 deletions(-) commit 739d875dd6982618020d30f58f8acf10f6076e6d Author: David Howells Date: Thu Mar 8 09:48:46 2018 +0000 mn10300: Remove the architecture Remove the MN10300 arch as the hardware is defunct. Suggested-by: Arnd Bergmann Signed-off-by: David Howells cc: Masahiro Yamada cc: linux-am33-list@redhat.com Signed-off-by: Arnd Bergmann Documentation/00-INDEX | 2 - .../features/core/BPF-JIT/arch-support.txt | 1 - .../core/generic-idle-thread/arch-support.txt | 1 - .../features/core/jump-labels/arch-support.txt | 1 - .../features/core/tracehook/arch-support.txt | 1 - .../features/debug/KASAN/arch-support.txt | 1 - .../debug/gcov-profile-all/arch-support.txt | 1 - Documentation/features/debug/kgdb/arch-support.txt | 1 - .../debug/kprobes-on-ftrace/arch-support.txt | 1 - .../features/debug/kprobes/arch-support.txt | 1 - .../features/debug/kretprobes/arch-support.txt | 1 - .../features/debug/optprobes/arch-support.txt | 1 - .../features/debug/stackprotector/arch-support.txt | 1 - .../features/debug/uprobes/arch-support.txt | 1 - .../debug/user-ret-profiler/arch-support.txt | 1 - .../features/io/dma-api-debug/arch-support.txt | 1 - .../features/io/dma-contiguous/arch-support.txt | 1 - .../features/io/sg-chain/arch-support.txt | 1 - .../features/lib/strncasecmp/arch-support.txt | 1 - .../locking/cmpxchg-local/arch-support.txt | 1 - .../features/locking/lockdep/arch-support.txt | 1 - .../locking/queued-rwlocks/arch-support.txt | 1 - .../locking/queued-spinlocks/arch-support.txt | 1 - .../locking/rwsem-optimized/arch-support.txt | 1 - .../features/perf/kprobes-event/arch-support.txt | 1 - .../features/perf/perf-regs/arch-support.txt | 1 - .../features/perf/perf-stackdump/arch-support.txt | 1 - .../sched/membarrier-sync-core/arch-support.txt | 1 - .../features/sched/numa-balancing/arch-support.txt | 1 - .../seccomp/seccomp-filter/arch-support.txt | 1 - .../time/arch-tick-broadcast/arch-support.txt | 1 - .../features/time/clockevents/arch-support.txt | 1 - .../time/context-tracking/arch-support.txt | 1 - .../features/time/irq-time-acct/arch-support.txt | 1 - .../time/modern-timekeeping/arch-support.txt | 1 - .../features/time/virt-cpuacct/arch-support.txt | 1 - .../features/vm/ELF-ASLR/arch-support.txt | 1 - .../features/vm/PG_uncached/arch-support.txt | 1 - Documentation/features/vm/THP/arch-support.txt | 1 - Documentation/features/vm/TLB/arch-support.txt | 1 - .../features/vm/huge-vmap/arch-support.txt | 1 - .../features/vm/ioremap_prot/arch-support.txt | 1 - .../features/vm/numa-memblock/arch-support.txt | 1 - .../features/vm/pte_special/arch-support.txt | 1 - Documentation/mn10300/ABI.txt | 149 -- Documentation/mn10300/compartmentalisation.txt | 60 - MAINTAINERS | 8 - arch/mn10300/Kconfig | 499 ----- arch/mn10300/Kconfig.debug | 156 -- arch/mn10300/Makefile | 99 - arch/mn10300/boot/.gitignore | 1 - arch/mn10300/boot/Makefile | 28 - arch/mn10300/boot/compressed/Makefile | 22 - arch/mn10300/boot/compressed/head.S | 151 -- arch/mn10300/boot/compressed/misc.c | 393 ---- arch/mn10300/boot/compressed/misc.h | 18 - arch/mn10300/boot/compressed/vmlinux.lds | 9 - arch/mn10300/boot/install.sh | 67 - arch/mn10300/boot/tools/build.c | 191 -- arch/mn10300/configs/asb2303_defconfig | 67 - arch/mn10300/configs/asb2364_defconfig | 87 - arch/mn10300/include/asm/Kbuild | 13 - arch/mn10300/include/asm/asm-offsets.h | 1 - arch/mn10300/include/asm/atomic.h | 161 -- arch/mn10300/include/asm/bitops.h | 232 --- arch/mn10300/include/asm/bug.h | 37 - arch/mn10300/include/asm/bugs.h | 20 - arch/mn10300/include/asm/busctl-regs.h | 151 -- arch/mn10300/include/asm/cache.h | 60 - arch/mn10300/include/asm/cacheflush.h | 164 -- arch/mn10300/include/asm/checksum.h | 79 - arch/mn10300/include/asm/cmpxchg.h | 115 -- arch/mn10300/include/asm/cpu-regs.h | 353 ---- arch/mn10300/include/asm/current.h | 37 - arch/mn10300/include/asm/debugger.h | 43 - arch/mn10300/include/asm/delay.h | 19 - arch/mn10300/include/asm/div64.h | 115 -- arch/mn10300/include/asm/dma-mapping.h | 21 - arch/mn10300/include/asm/dma.h | 117 -- arch/mn10300/include/asm/dmactl-regs.h | 16 - arch/mn10300/include/asm/elf.h | 153 -- arch/mn10300/include/asm/emergency-restart.h | 1 - arch/mn10300/include/asm/exceptions.h | 121 -- arch/mn10300/include/asm/fpu.h | 132 -- arch/mn10300/include/asm/frame.inc | 97 - arch/mn10300/include/asm/ftrace.h | 1 - arch/mn10300/include/asm/futex.h | 1 - arch/mn10300/include/asm/gdb-stub.h | 182 -- arch/mn10300/include/asm/hardirq.h | 49 - arch/mn10300/include/asm/highmem.h | 131 -- arch/mn10300/include/asm/hw_irq.h | 14 - arch/mn10300/include/asm/intctl-regs.h | 71 - arch/mn10300/include/asm/io.h | 325 ---- arch/mn10300/include/asm/irq.h | 40 - arch/mn10300/include/asm/irq_regs.h | 28 - arch/mn10300/include/asm/irqflags.h | 215 --- arch/mn10300/include/asm/kdebug.h | 22 - arch/mn10300/include/asm/kgdb.h | 81 - arch/mn10300/include/asm/kmap_types.h | 7 - arch/mn10300/include/asm/kprobes.h | 55 - arch/mn10300/include/asm/linkage.h | 20 - arch/mn10300/include/asm/local.h | 1 - arch/mn10300/include/asm/local64.h | 1 - arch/mn10300/include/asm/mc146818rtc.h | 1 - arch/mn10300/include/asm/mmu.h | 20 - arch/mn10300/include/asm/mmu_context.h | 163 -- arch/mn10300/include/asm/module.h | 22 - arch/mn10300/include/asm/nmi.h | 16 - arch/mn10300/include/asm/page.h | 130 -- arch/mn10300/include/asm/page_offset.h | 12 - arch/mn10300/include/asm/pci.h | 84 - arch/mn10300/include/asm/percpu.h | 1 - arch/mn10300/include/asm/pgalloc.h | 56 - arch/mn10300/include/asm/pgtable.h | 494 ----- arch/mn10300/include/asm/pio-regs.h | 233 --- arch/mn10300/include/asm/processor.h | 171 -- arch/mn10300/include/asm/ptrace.h | 26 - arch/mn10300/include/asm/reset-regs.h | 60 - arch/mn10300/include/asm/rtc-regs.h | 86 - arch/mn10300/include/asm/rtc.h | 28 - arch/mn10300/include/asm/rwlock.h | 125 -- arch/mn10300/include/asm/serial-regs.h | 191 -- arch/mn10300/include/asm/serial.h | 36 - arch/mn10300/include/asm/setup.h | 18 - arch/mn10300/include/asm/shmparam.h | 7 - arch/mn10300/include/asm/signal.h | 33 - arch/mn10300/include/asm/smp.h | 109 -- arch/mn10300/include/asm/smsc911x.h | 1 - arch/mn10300/include/asm/spinlock.h | 180 -- arch/mn10300/include/asm/spinlock_types.h | 21 - arch/mn10300/include/asm/string.h | 32 - arch/mn10300/include/asm/switch_to.h | 49 - arch/mn10300/include/asm/syscall.h | 117 -- arch/mn10300/include/asm/termios.h | 14 - arch/mn10300/include/asm/thread_info.h | 160 -- arch/mn10300/include/asm/timer-regs.h | 452 ----- arch/mn10300/include/asm/timex.h | 34 - arch/mn10300/include/asm/tlb.h | 34 - arch/mn10300/include/asm/tlbflush.h | 154 -- arch/mn10300/include/asm/topology.h | 1 - arch/mn10300/include/asm/types.h | 22 - arch/mn10300/include/asm/uaccess.h | 297 --- arch/mn10300/include/asm/ucontext.h | 22 - arch/mn10300/include/asm/unaligned.h | 20 - arch/mn10300/include/asm/unistd.h | 47 - arch/mn10300/include/asm/user.h | 53 - arch/mn10300/include/asm/vga.h | 17 - arch/mn10300/include/asm/xor.h | 1 - arch/mn10300/include/uapi/asm/Kbuild | 6 - arch/mn10300/include/uapi/asm/auxvec.h | 4 - arch/mn10300/include/uapi/asm/bitsperlong.h | 2 - arch/mn10300/include/uapi/asm/byteorder.h | 7 - arch/mn10300/include/uapi/asm/errno.h | 2 - arch/mn10300/include/uapi/asm/fcntl.h | 2 - arch/mn10300/include/uapi/asm/ioctl.h | 2 - arch/mn10300/include/uapi/asm/ioctls.h | 7 - arch/mn10300/include/uapi/asm/ipcbuf.h | 2 - arch/mn10300/include/uapi/asm/kvm_para.h | 2 - arch/mn10300/include/uapi/asm/mman.h | 7 - arch/mn10300/include/uapi/asm/msgbuf.h | 32 - arch/mn10300/include/uapi/asm/param.h | 19 - arch/mn10300/include/uapi/asm/posix_types.h | 46 - arch/mn10300/include/uapi/asm/ptrace.h | 85 - arch/mn10300/include/uapi/asm/resource.h | 2 - arch/mn10300/include/uapi/asm/sembuf.h | 26 - arch/mn10300/include/uapi/asm/setup.h | 5 - arch/mn10300/include/uapi/asm/shmbuf.h | 43 - arch/mn10300/include/uapi/asm/sigcontext.h | 53 - arch/mn10300/include/uapi/asm/signal.h | 126 -- arch/mn10300/include/uapi/asm/socket.h | 108 -- arch/mn10300/include/uapi/asm/sockios.h | 14 - arch/mn10300/include/uapi/asm/stat.h | 79 - arch/mn10300/include/uapi/asm/statfs.h | 1 - arch/mn10300/include/uapi/asm/swab.h | 43 - arch/mn10300/include/uapi/asm/termbits.h | 202 -- arch/mn10300/include/uapi/asm/termios.h | 84 - arch/mn10300/include/uapi/asm/types.h | 12 - arch/mn10300/include/uapi/asm/unistd.h | 355 ---- arch/mn10300/kernel/Makefile | 29 - arch/mn10300/kernel/asm-offsets.c | 108 -- arch/mn10300/kernel/cevt-mn10300.c | 137 -- arch/mn10300/kernel/csrc-mn10300.c | 34 - arch/mn10300/kernel/entry.S | 772 -------- arch/mn10300/kernel/fpu-low.S | 258 --- arch/mn10300/kernel/fpu-nofpu-low.S | 39 - arch/mn10300/kernel/fpu-nofpu.c | 31 - arch/mn10300/kernel/fpu.c | 177 -- arch/mn10300/kernel/gdb-io-serial-low.S | 91 - arch/mn10300/kernel/gdb-io-serial.c | 174 -- arch/mn10300/kernel/gdb-io-ttysm-low.S | 93 - arch/mn10300/kernel/gdb-io-ttysm.c | 303 --- arch/mn10300/kernel/gdb-low.S | 115 -- arch/mn10300/kernel/gdb-stub.c | 1924 -------------------- arch/mn10300/kernel/head.S | 442 ----- arch/mn10300/kernel/internal.h | 40 - arch/mn10300/kernel/io.c | 30 - arch/mn10300/kernel/irq.c | 356 ---- arch/mn10300/kernel/kgdb.c | 502 ----- arch/mn10300/kernel/kprobes.c | 656 ------- arch/mn10300/kernel/mn10300-debug.c | 58 - arch/mn10300/kernel/mn10300-serial-low.S | 194 -- arch/mn10300/kernel/mn10300-serial.c | 1790 ------------------ arch/mn10300/kernel/mn10300-serial.h | 130 -- arch/mn10300/kernel/mn10300-watchdog-low.S | 66 - arch/mn10300/kernel/mn10300-watchdog.c | 205 --- arch/mn10300/kernel/mn10300_ksyms.c | 39 - arch/mn10300/kernel/module.c | 156 -- arch/mn10300/kernel/process.c | 175 -- arch/mn10300/kernel/profile-low.S | 72 - arch/mn10300/kernel/profile.c | 51 - arch/mn10300/kernel/ptrace.c | 386 ---- arch/mn10300/kernel/rtc.c | 46 - arch/mn10300/kernel/setup.c | 283 --- arch/mn10300/kernel/sigframe.h | 33 - arch/mn10300/kernel/signal.c | 431 ----- arch/mn10300/kernel/smp-low.S | 97 - arch/mn10300/kernel/smp.c | 1186 ------------ arch/mn10300/kernel/switch_to.S | 179 -- arch/mn10300/kernel/sys_mn10300.c | 33 - arch/mn10300/kernel/time.c | 125 -- arch/mn10300/kernel/traps.c | 615 ------- arch/mn10300/kernel/vmlinux.lds.S | 94 - arch/mn10300/lib/Makefile | 7 - arch/mn10300/lib/__ashldi3.S | 51 - arch/mn10300/lib/__ashrdi3.S | 52 - arch/mn10300/lib/__lshrdi3.S | 52 - arch/mn10300/lib/__ucmpdi2.S | 43 - arch/mn10300/lib/ashrdi3.c | 61 - arch/mn10300/lib/bitops.c | 50 - arch/mn10300/lib/checksum.c | 100 - arch/mn10300/lib/delay.c | 51 - arch/mn10300/lib/do_csum.S | 157 -- arch/mn10300/lib/internal.h | 15 - arch/mn10300/lib/lshrdi3.c | 60 - arch/mn10300/lib/memcpy.S | 135 -- arch/mn10300/lib/memmove.S | 160 -- arch/mn10300/lib/memset.S | 121 -- arch/mn10300/lib/negdi2.c | 57 - arch/mn10300/lib/usercopy.c | 142 -- arch/mn10300/mm/Kconfig.cache | 148 -- arch/mn10300/mm/Makefile | 32 - arch/mn10300/mm/cache-dbg-flush-by-reg.S | 160 -- arch/mn10300/mm/cache-dbg-flush-by-tag.S | 114 -- arch/mn10300/mm/cache-dbg-inv-by-reg.S | 69 - arch/mn10300/mm/cache-dbg-inv-by-tag.S | 120 -- arch/mn10300/mm/cache-dbg-inv.S | 47 - arch/mn10300/mm/cache-disabled.c | 21 - arch/mn10300/mm/cache-flush-by-reg.S | 308 ---- arch/mn10300/mm/cache-flush-by-tag.S | 250 --- arch/mn10300/mm/cache-flush-icache.c | 155 -- arch/mn10300/mm/cache-inv-by-reg.S | 350 ---- arch/mn10300/mm/cache-inv-by-tag.S | 276 --- arch/mn10300/mm/cache-inv-icache.c | 129 -- arch/mn10300/mm/cache-smp-flush.c | 156 -- arch/mn10300/mm/cache-smp-inv.c | 153 -- arch/mn10300/mm/cache-smp.c | 105 -- arch/mn10300/mm/cache-smp.h | 69 - arch/mn10300/mm/cache.c | 54 - arch/mn10300/mm/cache.inc | 133 -- arch/mn10300/mm/dma-alloc.c | 128 -- arch/mn10300/mm/extable.c | 26 - arch/mn10300/mm/fault.c | 414 ----- arch/mn10300/mm/init.c | 136 -- arch/mn10300/mm/misalignment.c | 966 ---------- arch/mn10300/mm/mmu-context.c | 62 - arch/mn10300/mm/pgtable.c | 174 -- arch/mn10300/mm/tlb-mn10300.S | 220 --- arch/mn10300/mm/tlb-smp.c | 213 --- arch/mn10300/oprofile/Makefile | 14 - arch/mn10300/oprofile/op_model_null.c | 22 - arch/mn10300/proc-mn103e010/Makefile | 5 - arch/mn10300/proc-mn103e010/include/proc/cache.h | 43 - arch/mn10300/proc-mn103e010/include/proc/clock.h | 16 - .../proc-mn103e010/include/proc/dmactl-regs.h | 102 -- .../proc-mn103e010/include/proc/intctl-regs.h | 30 - arch/mn10300/proc-mn103e010/include/proc/irq.h | 34 - arch/mn10300/proc-mn103e010/include/proc/proc.h | 18 - arch/mn10300/proc-mn103e010/proc-init.c | 115 -- arch/mn10300/proc-mn2ws0050/Makefile | 5 - arch/mn10300/proc-mn2ws0050/include/proc/cache.h | 49 - arch/mn10300/proc-mn2ws0050/include/proc/clock.h | 20 - .../proc-mn2ws0050/include/proc/dmactl-regs.h | 103 -- .../proc-mn2ws0050/include/proc/intctl-regs.h | 30 - arch/mn10300/proc-mn2ws0050/include/proc/irq.h | 49 - .../proc-mn2ws0050/include/proc/nand-regs.h | 120 -- arch/mn10300/proc-mn2ws0050/include/proc/proc.h | 18 - .../mn10300/proc-mn2ws0050/include/proc/smp-regs.h | 51 - arch/mn10300/proc-mn2ws0050/proc-init.c | 134 -- arch/mn10300/unit-asb2303/Makefile | 6 - arch/mn10300/unit-asb2303/flash.c | 99 - arch/mn10300/unit-asb2303/include/unit/clock.h | 24 - arch/mn10300/unit-asb2303/include/unit/leds.h | 43 - arch/mn10300/unit-asb2303/include/unit/serial.h | 141 -- arch/mn10300/unit-asb2303/include/unit/smc91111.h | 50 - arch/mn10300/unit-asb2303/include/unit/timex.h | 146 -- arch/mn10300/unit-asb2303/leds.c | 52 - arch/mn10300/unit-asb2303/smc91111.c | 53 - arch/mn10300/unit-asb2303/unit-init.c | 68 - arch/mn10300/unit-asb2305/Makefile | 8 - arch/mn10300/unit-asb2305/include/unit/clock.h | 24 - arch/mn10300/unit-asb2305/include/unit/leds.h | 51 - arch/mn10300/unit-asb2305/include/unit/serial.h | 125 -- arch/mn10300/unit-asb2305/include/unit/timex.h | 146 -- arch/mn10300/unit-asb2305/leds.c | 124 -- arch/mn10300/unit-asb2305/pci-asb2305.c | 212 --- arch/mn10300/unit-asb2305/pci-asb2305.h | 65 - arch/mn10300/unit-asb2305/pci-irq.c | 46 - arch/mn10300/unit-asb2305/pci.c | 505 ----- arch/mn10300/unit-asb2305/unit-init.c | 63 - arch/mn10300/unit-asb2364/Makefile | 12 - arch/mn10300/unit-asb2364/include/unit/clock.h | 29 - arch/mn10300/unit-asb2364/include/unit/fpga-regs.h | 53 - arch/mn10300/unit-asb2364/include/unit/irq.h | 35 - arch/mn10300/unit-asb2364/include/unit/leds.h | 54 - arch/mn10300/unit-asb2364/include/unit/serial.h | 151 -- arch/mn10300/unit-asb2364/include/unit/smsc911x.h | 171 -- arch/mn10300/unit-asb2364/include/unit/timex.h | 155 -- arch/mn10300/unit-asb2364/irq-fpga.c | 108 -- arch/mn10300/unit-asb2364/leds.c | 98 - arch/mn10300/unit-asb2364/smsc911x.c | 58 - arch/mn10300/unit-asb2364/unit-init.c | 132 -- crypto/sha3_generic.c | 2 +- drivers/input/joystick/analog.c | 2 +- drivers/net/ethernet/smsc/Kconfig | 6 +- drivers/net/ethernet/smsc/smc91x.h | 8 - drivers/rtc/Kconfig | 2 +- drivers/rtc/rtc-cmos.c | 2 +- drivers/staging/speakup/Kconfig | 2 +- drivers/video/console/Kconfig | 2 +- include/asm-generic/atomic.h | 2 - include/asm-generic/barrier.h | 2 +- include/asm-generic/exec.h | 2 +- include/asm-generic/io.h | 2 +- include/asm-generic/pci_iomap.h | 2 +- include/asm-generic/switch_to.h | 2 +- include/linux/ide.h | 2 +- init/Kconfig | 2 +- lib/Kconfig.debug | 2 +- lib/test_user_copy.c | 1 - scripts/mod/modpost.c | 7 +- tools/arch/mn10300/include/uapi/asm/bitsperlong.h | 1 - tools/arch/mn10300/include/uapi/asm/mman.h | 7 - tools/include/asm-generic/barrier.h | 2 +- 343 files changed, 21 insertions(+), 34163 deletions(-) commit cb3bee0369bc9316e47f4ad95a3c33f4e0d50a06 Author: Geliang Tang Date: Fri Mar 9 18:51:07 2018 +0800 pstore: Use crypto compress API In the pstore compression part, we use zlib/lzo/lz4/lz4hc/842 compression algorithm API to implement pstore compression backends. But there are many repeat codes in these implementations. This patch uses crypto compress API to simplify these codes. 1) rewrite allocate_buf_for_compression, free_buf_for_compression, pstore_compress, pstore_decompress functions using crypto compress API. 2) drop compress, decompress, allocate, free functions in pstore_zbackend, and add zbufsize function to get each different compress buffer size. 3) use late_initcall to call ramoops_init later, to make sure the crypto subsystem has already initialized. 4) use 'unsigned int' type instead of 'size_t' in pstore_compress, pstore_decompress functions' length arguments. 5) rename 'zlib' to 'deflate' to follow the crypto API's name convention. Signed-off-by: Geliang Tang [kees: tweaked error messages on allocation failures and Kconfig help] Signed-off-by: Kees Cook fs/pstore/Kconfig | 34 ++--- fs/pstore/platform.c | 415 +++++++++------------------------------------------ fs/pstore/ram.c | 2 +- 3 files changed, 84 insertions(+), 367 deletions(-) commit 1d49f2e546a5a3258a88f85a1c04fd6feb6def37 Author: Stefan Schake Date: Fri Mar 9 01:53:37 2018 +0100 drm/vc4: Enable background color fill when necessary Using the hint from the plane state, we turn on the background color to avoid display corruption from planes blending with the background. Changes from v1: - Use needs_bg_fill from plane state Signed-off-by: Stefan Schake Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1520556817-97297-5-git-send-email-stschake@gmail.com drivers/gpu/drm/vc4/vc4_crtc.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 823646983b5a31732ae82ffa60b74555857eb8a0 Author: Stefan Schake Date: Fri Mar 9 01:53:36 2018 +0100 drm/vc4: Move plane state to header We need to reference it from the CRTC to make a decision for enabling background color fill. Signed-off-by: Stefan Schake Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1520556817-97297-4-git-send-email-stschake@gmail.com drivers/gpu/drm/vc4/vc4_drv.h | 60 +++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/vc4/vc4_plane.c | 60 ----------------------------------------- 2 files changed, 60 insertions(+), 60 deletions(-) commit 3d67b68a6a3c2deb689c29759a20150c668c286e Author: Stefan Schake Date: Fri Mar 9 01:53:35 2018 +0100 drm/vc4: Check if plane requires background fill Considering a single plane only, we have to enable background color when the plane has an alpha format and could be blending from the background or when it doesn't cover the entire screen. Changes from v1: - Drop unrelated change - Move needs_bg_fill to plane state Signed-off-by: Stefan Schake Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1520556817-97297-3-git-send-email-stschake@gmail.com drivers/gpu/drm/vc4/vc4_plane.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 05202c241f1476d8e2b30bb2699f6780962972e8 Author: Stefan Schake Date: Fri Mar 9 01:53:34 2018 +0100 drm/vc4: Set premultiplied for alpha formats Alpha formats in DRM are assumed to be premultiplied, so we should be setting the PREMULT bit in the plane configuration for HVS. Changes from v1: - Use correct has_alpha Signed-off-by: Stefan Schake Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1520556817-97297-2-git-send-email-stschake@gmail.com drivers/gpu/drm/vc4/vc4_plane.c | 3 ++- drivers/gpu/drm/vc4/vc4_regs.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 8f94390226487bcb86c554ddc12eef0d27bdec3b Author: ShuFan Lee Date: Tue Mar 6 09:50:32 2018 +0800 staging: typec: handle vendor defined part and modify drp toggling flow Handle vendor defined behavior in tcpci_init, tcpci_set_vconn, tcpci_start_drp_toggling and export tcpci_irq. More operations can be extended in tcpci_data if needed. According to TCPCI specification, 4.4.5.2 ROLE_CONTROL, TCPC shall not start DRP toggling until subsequently the TCPM writes to the COMMAND register to start DRP toggling. DRP toggling flow is changed as following: - Write DRP = 1, Rp level and RC.CCx to Rd/Rd or Rp/Rp - Set LOOK4CONNECTION command Signed-off-by: ShuFan Lee Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpci.c | 127 +++++++++++++++++++++++++++++++++--------- drivers/staging/typec/tcpci.h | 15 +++++ 2 files changed, 116 insertions(+), 26 deletions(-) commit 811ae58e76da88106f6d28159d4ea7b163dfaa48 Author: INAGAKI Hiroshi Date: Wed Mar 7 20:33:56 2018 +0900 ARM: dts: BCM5301X: add missing LEDs for Buffalo WZR-900DHP Buffalo WZR-900DHP has 8 LEDs, but there is not LED definitions in the dts and cannot configure these LEDs. I Added missing LED definitions for WZR-900DHP. Signed-off-by: INAGAKI Hiroshi Reviewed-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts | 68 +++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit f597fbce38d230af95384f4a04e0a13a1d0ad45d Author: Joel Stanley Date: Mon Mar 5 22:17:38 2018 +1030 serial: 8250: Add Nuvoton NPCM UART The Nuvoton UART is almost compatible with the 8250 driver when probed via the 8250_of driver, however it requires some extra configuration at startup. Reviewed-by: Rob Herring Signed-off-by: Joel Stanley Cc: stable Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/8250.txt | 1 + drivers/tty/serial/8250/8250_of.c | 1 + drivers/tty/serial/8250/8250_port.c | 33 +++++++++++++++++++++++ include/uapi/linux/serial_core.h | 3 +++ 4 files changed, 38 insertions(+) commit ca7c22fc9e8d16b11b8be81254d5f59c5a9f5bcf Author: Alexey Khoroshilov Date: Sat Mar 3 01:42:01 2018 +0300 serial: mxs-auart: disable clks of Alphascale ASM9260 In case of Alphascale ASM9260 probe() enables s->clk and s->clk_ahb via mxs_get_clks(), but there is no disable of the clocks. The patch adds it to error paths and to mxs_auart_remove(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Fixes: 254da0d753fb ("serial: mxs-auart: add Alphascale ASM9260 support") Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mxs-auart.c | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) commit 7d6e2143bed7dd61dac3a00321292b36d63c2a2f Author: Andy Shevchenko Date: Thu Mar 1 13:41:29 2018 +0200 serial: 8250_dw: Switch to use acpi_dev_present() Special settings for APMC0D08 are applied when device is present in the system. To check its presence we may use acpi_dev_present() instead of current open coded variant. Cc: Feng Kan Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 9d1a50a2cceb3a8589531f7a2652f1a478df8907 Author: Uwe Kleine-König Date: Fri Mar 2 11:07:30 2018 +0100 serial: imx: consistently use imx_uart_ as prefix for all functions Having a fixed prefix helps at several places. It ensures that another driver doesn't use the same function name which confuses the linker and tools like ctags. It simplifies working with function tracing and dynamic printk() support which can filter on function names. And last but not least it helps the human source code reader to understand if a given function belongs to a driver or a more general part of the kernel. Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 426 +++++++++++++++++++++++------------------------ 1 file changed, 213 insertions(+), 213 deletions(-) commit 48669b69e3ecbabbd2936fbbe095901ba83a37f9 Author: Uwe Kleine-König Date: Fri Mar 2 11:07:29 2018 +0100 serial: imx: don't prepare to send if no data is available serial_core might call the .start_tx callback without any data being available to send. In this case return early instead of going through all the setup needed for sending which might include disabling RX in RS485 half-duplex mode. Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 3 +++ 1 file changed, 3 insertions(+) commit 1866541492641c02874bf51f9d8712b5510f2c64 Author: Uwe Kleine-König Date: Fri Mar 2 11:07:28 2018 +0100 serial: imx: Fix handling of TC irq in combination with DMA When using RS485 half duplex the Transmitter Complete irq is needed to determine the moment when the transmitter can be disabled. When using DMA this irq must only be enabled when DMA has completed to transfer all data. Otherwise the CPU might busily trigger this irq which is not properly handled and so the also pending irq for the DMA transfer cannot trigger. Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit 81ca8e8286c48df22eb798879d99aabac663b5f1 Author: Uwe Kleine-König Date: Fri Mar 2 11:07:27 2018 +0100 serial: imx: Also enable the aging timer in PIO mode This allows to increase the RX waterlevel which allows to delay the RRDY irq. The desired effect is that less irqs are needed to handle characters and so reduce irq count of the system. Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 76821e222c189b81d553b855ee7054340607eb46 Author: Uwe Kleine-König Date: Fri Mar 2 11:07:26 2018 +0100 serial: imx: ensure that RX irqs are off if RX is off Make sure that UCR1.RXDMAEN and UCR1.ATDMAEN (for the DMA case) and UCR1.RRDYEN (for the PIO case) are off iff UCR1.RXEN is disabled. This ensures that the fifo isn't read with RX disabled which results in an exception. Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 92 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 64 insertions(+), 28 deletions(-) commit dedc64e02f5da1c7bd0b4ec232341047a8b0142b Author: Uwe Kleine-König Date: Fri Mar 2 11:07:25 2018 +0100 serial: imx: Stop to receive in .stop_rx() When the UART is used in DMA mode, .stop_rx() does nothing if the port isn't suspended. This is wrong as .stop_rx() should stop receiving characters unconditionally. When the port is about to be closed the DMA channel is stopped in .shutdown(), so this isn't necessary to be in .stop_rx() here, too. Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 9 --------- 1 file changed, 9 deletions(-) commit 02b0abd3bb93ea1d9818c5c5b1fcf293f81cee37 Author: Uwe Kleine-König Date: Fri Mar 2 11:07:24 2018 +0100 serial: imx: setup fifo waterlevel before enabling aging timer The aging timer fires if there are characters in the RX fifo but the water level isn't reached yet. Make sure that the waterlevel is configured before the aging timer is enabled to trigger a DMA request (UCR1_ATDMAEN). Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4444dcf1fe7ea5af4e335658742d7c6868d91941 Author: Uwe Kleine-König Date: Fri Mar 2 11:07:23 2018 +0100 serial: imx: use u32 variables with matching names for registers The serial/imx driver is full of inconsistently named and typed variables that hold different register values. Consistently use u32 as type (matching what readl and writel use) and name the variables after the register whose value they are holding. This makes it easier to notice when UCR2_RTSEN is written to UCR1. The only difference introduced by this commit in the compiled driver is that twice the second argument to warn_slowpath_null() changed because the two WARN_ON in dma_rx_callback() pass __LINE__ to warn_slowpath_null(). Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 346 ++++++++++++++++++++++++----------------------- 1 file changed, 179 insertions(+), 167 deletions(-) commit 0c54922384c14c1794c75af07c542752ab11787d Author: Uwe Kleine-König Date: Fri Mar 2 11:07:22 2018 +0100 serial: imx: simplify check that prevents starting PIO when DMA is in use The original code looks as follows: if (sport->dma_is_enabled) { ... make sure TX DMA is running, i.e. .dma_is_txing = 1 } if (sport->dma_is_txing) return; As .dma_is_txing can only be true if .dma_is_enabled is, the return can go at the end of the first if body without an additional check. Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 686351f342fa745d10ddef08d0e930cf53b0c673 Author: Uwe Kleine-König Date: Fri Mar 2 11:07:21 2018 +0100 serial: imx: simplify some conditions related to dma Neither .dma_is_txing nor .dma_is_rxing can evaluate to true if .dma_is_enabled evaluates to false: The only function that sets .dma_is_txing to a non-zero value is imx_dma_tx() which is only called if .dma_is_enabled is true. Same for .dma_is_rxing and start_rx_dma(). And before .dma_is_enabled is set to 0 when imx_shutdown calls imx_disable_dma(), .dma_is_rxing and .dma_is_txing are reset to zero before, too. For this reason sport->dma_is_enabled && sport->dma_is_rxing has the same value as sport->dma_is_rxing which allows to simplify three if conditions. Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3a0ab62f43de5c6ec55fb9d6721168602008142a Author: Uwe Kleine-König Date: Fri Mar 2 11:07:20 2018 +0100 serial: imx: implement shadow registers for UCRx and UFCR This reduces the amount of read accesses to the register space by shadowing the values for five registers that only change on writing them. There is a single bit in UCR2 that might change without being written to it, this is handled accordingly. Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) commit 27c844261b87f85f23784e78170883092428e5a1 Author: Uwe Kleine-König Date: Fri Mar 2 11:07:19 2018 +0100 serial: imx: add wrappers for writel and readl This prepares implementing shadow copies for the control registers and additionally provides a good place to hook in debug code to trace register usage. Most of this patch was done using pattern substitution: perl -p -i -e ' s/\breadl(?:_relaxed)?\((?:sport->port\.|port->)membase \+/imx_uart_readl(sport,/; s/\bwritel(?:_relaxed)?\(([^,]*), (sport->port\.|port->)membase \+/imx_uart_writel(sport, $1,/; ' drivers/tty/serial/imx.c Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 383 ++++++++++++++++++++++++----------------------- 1 file changed, 199 insertions(+), 184 deletions(-) commit afa6b1ccfad5e72918b79461a97fe21d1c2292da Author: Palmer Dabbelt Date: Thu Mar 8 14:27:34 2018 -0800 tty: New RISC-V SBI console driver The RISC-V ISA defines a simple console that is availiable via SBI calls on all systems. The SBI console is designed to be availiable at all times, so while it's most natural to use this as an early printk target it's also possible to use this as the system console when there isn't a better one availiable. This patch adds support for the RISC-V SBI console via the HVC infastructure. It's entirely independent from our early printk support, which results in early boot messages appearing twice over the SBI console. As far as I can tell that's the fault of our early printk support (we should support earlycon) as opposed to this driver. There is one checkpatch.pl warning here: to check the MAINTAINERS file. They're all matched by the "K: riscv" line. Signed-off-by: Palmer Dabbelt Signed-off-by: Greg Kroah-Hartman drivers/tty/hvc/Kconfig | 10 +++++++ drivers/tty/hvc/Makefile | 1 + drivers/tty/hvc/hvc_riscv_sbi.c | 60 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) commit f44b1886a5f876c87b5889df463ad7b97834ba37 Merge: f5426250 b1d5e36 Author: David S. Miller Date: Fri Mar 9 13:10:06 2018 -0500 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2018-03-09 here is the current pile of qeth patches for net-next. Just the usual small updates and clean ups. Please apply. ==================== Signed-off-by: David S. Miller commit b1d5e36b418ed55eeb6d7b61bcc18a14c81475ed Author: Julian Wiedmann Date: Fri Mar 9 18:13:03 2018 +0100 s390/qeth: shrink qeth_ipaddr struct Using up 8 bytes in every ipaddr object to store SETIP/DELIP flags is rather wasteful. Except for takeover eligibility, the flag values all just depend on the address type, so determine them on demand. While at it reorder the struct to fill an alignment hole. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 6 ------ drivers/s390/net/qeth_l3.h | 11 +++++++--- drivers/s390/net/qeth_l3_main.c | 46 ++++++++++++++++++++++------------------- 3 files changed, 33 insertions(+), 30 deletions(-) commit 1617dae25e4478e0128da1bf467a18371a16e237 Author: Julian Wiedmann Date: Fri Mar 9 18:13:02 2018 +0100 s390/qeth: extract helpers for managing special IPs Reduce code duplication. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l3.h | 13 +--- drivers/s390/net/qeth_l3_main.c | 158 +++++++++++----------------------------- drivers/s390/net/qeth_l3_sys.c | 51 +++---------- 3 files changed, 57 insertions(+), 165 deletions(-) commit b9caa98c5135774dae232843ecef3c487c36a7a0 Author: Julian Wiedmann Date: Fri Mar 9 18:13:01 2018 +0100 s390/qeth: simplify card look-up on IP notification On an IP event, current code tries to determine if the netdev belongs to a L3 card by walking all qeth cards in the system, and then all of their VLAN devices too. Short-cut the whole thing by identifying a L3 device through its netdev_ops. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 2 -- drivers/s390/net/qeth_l3_main.c | 77 +++++++---------------------------------- 2 files changed, 12 insertions(+), 67 deletions(-) commit d66b1c0df3f19812a6edb69fa35a1db01a2251d5 Author: Julian Wiedmann Date: Fri Mar 9 18:13:00 2018 +0100 s390/qeth: restructure IP notification handlers Extract a helper that does the actual work & returns the right NOTIFY_* responses, and start putting the temporary ipaddr container objects on the stack rather than kmalloc'ing them. They are small, and this reduces the confusion of which objects actually get added to qeth's IP tables. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l3.h | 10 ++++ drivers/s390/net/qeth_l3_main.c | 102 +++++++++++++++------------------------- 2 files changed, 49 insertions(+), 63 deletions(-) commit 1b45c80be08d11e3f48c514a63d8c1214829fc19 Author: Julian Wiedmann Date: Fri Mar 9 18:12:59 2018 +0100 s390/qeth: reset NAPI context during queue init init_qdio_queues() resets the Input Queue's overall QDIO state, and positions the buffer cursor back to 0. So this is the obvious place to also reset the queue's NAPI context (in contrast to doing it rather randomly in the middle of the big set_online() path). No functional change. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 4 ++-- drivers/s390/net/qeth_l2_main.c | 1 - drivers/s390/net/qeth_l3_main.c | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) commit 04f673983bdb9c117b4710b5bcc712fe63486c34 Author: Julian Wiedmann Date: Fri Mar 9 18:12:58 2018 +0100 s390/qeth: reduce RX skb setup Newly-allocated skbs default to PACKET_HOST, and eth_type_trans() is smart enough to determine any other packet type from the frame's destination address. So except for the IQD sniffer case, there is no need to set up skb->pkt_type manually. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 1 - drivers/s390/net/qeth_l3_main.c | 10 +--------- 2 files changed, 1 insertion(+), 10 deletions(-) commit 37cf05d2fff52a8ad1ce977c2a485e91fe793162 Author: Julian Wiedmann Date: Fri Mar 9 18:12:57 2018 +0100 s390/qeth: allocate skb from NAPI cache napi_alloc_skb() doesn't need to disable IRQs during the allocation, and thus may save us a few cycles. Doing so requires a small fix-up in the HiperTransport path, which currently assumes a fixed NET_SKB_PAD headroom padding. napi_alloc_skb() adds an additional NET_IP_ALIGN padding, so use the proper helper for setting up the mac_header offset. Use this opportunity to convert the non-NAPI path to netdev_alloc_skb(), which means that skb->dev is now always set-up during allocation and doesn't need to be assigned manually. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 5 +++-- drivers/s390/net/qeth_l2_main.c | 1 - drivers/s390/net/qeth_l3_main.c | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) commit f0ea8bfbc1bcd0ca32011c1335f633f00d9199cf Author: Julian Wiedmann Date: Fri Mar 9 18:12:56 2018 +0100 s390/qeth: pass correct length to header_ops->create() We need to pass the *payload* length, not the L2 address length. For qeth (using eth_header()) this is merely a cosmetic change: the parameter only matters when building headers for ETH_P_802_2 or ETH_P_802_3, whereas our fake headers are built with ETH_P_IP / ETH_P_IPV6 / 0. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l3_main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit d3aacac4e47477ce26fe474c216f90baadcb2604 Author: Julian Wiedmann Date: Fri Mar 9 18:12:55 2018 +0100 s390/qeth: advertise IFF_UNICAST_FLT qeth implements HW-based Unicast Filtering (via SETVMAC) on L2 devices. Tell the stack, so it knows that receiving traffic for secondary addresses doesn't require full-blown promiscuous mode. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 1 + 1 file changed, 1 insertion(+) commit 0f34294527ed17fd0966142d6b5e754ba97f65b5 Author: Julian Wiedmann Date: Fri Mar 9 18:12:54 2018 +0100 s390/qeth: support SG for more device types NETIF_F_SG support is currently limited to OSA (and for L2 even OSD) devices. Advertise it for some more device types (OSM, L2 OSX, z/VM OSA) that share the same code paths. For now, keep it switched off by default on these devices. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 16 +++++++++------- drivers/s390/net/qeth_l3_main.c | 14 ++++++++------ 2 files changed, 17 insertions(+), 13 deletions(-) commit d857e11193a24d6623bb562e9b26cde582bd877f Author: Julian Wiedmann Date: Fri Mar 9 18:12:53 2018 +0100 s390/qeth: remove outdated portname debug msg The 'portname' attribute is deprecated and setting it has no effect. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ff5caa7a28c2c6dc1776eef36e8c9fbadfc53c1d Author: Julian Wiedmann Date: Fri Mar 9 18:12:52 2018 +0100 s390/qeth: use __ipa_cmd() for casting an IPA cmd buffer "s390/qeth: fix SETIP command handling" introduced a new helper, apply it driver-wide. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 24 +++++++++++------------- drivers/s390/net/qeth_l2_main.c | 14 ++++++-------- drivers/s390/net/qeth_l3_main.c | 14 +++++++------- 3 files changed, 24 insertions(+), 28 deletions(-) commit f5426250a6ecfd1e9b2d5e0daf07565f664aa67d Author: Paolo Abeni Date: Fri Mar 9 10:39:24 2018 +0100 net: introduce IFF_NO_RX_HANDLER Some network devices - notably ipvlan slave - are not compatible with any kind of rx_handler. Currently the hook can be installed but any configuration (bridge, bond, macsec, ...) is nonfunctional. This change allocates a priv_flag bit to mark such devices and explicitly forbid installing a rx_handler if such bit is set. The new bit is used by ipvlan slave device. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 2 ++ include/linux/netdevice.h | 3 +++ net/core/dev.c | 3 +++ 3 files changed, 8 insertions(+) commit d185efc1da089b968dfe1825329c51820d661755 Author: Ganesh Goudar Date: Fri Mar 9 13:00:52 2018 +0530 cxgb4: increase max tx rate limit to 100 Gbps T6 cards can support up to 100 G speeds. So, increase max programmable tx rate limit to 100 Gbps. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 6 +++--- drivers/net/ethernet/chelsio/cxgb4/sched.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit b27560e4d9e5240b5544c9c5650c7442e482646e Author: Kai-Heng Feng Date: Thu Mar 8 13:37:05 2018 +0800 usb: core: Add "quirks" parameter for usbcore Trying quirks in usbcore needs to rebuild the driver or the entire kernel if it's builtin. It can save a lot of time if usbcore has similar ability like "usbhid.quirks=" and "usb-storage.quirks=". Rename the original quirk detection function to "static" as we introduce this new "dynamic" function. Now users can use "usbcore.quirks=" as short term workaround before the next kernel release. Also, the quirk parameter can XOR the builtin quirks for debugging purpose. This is inspired by usbhid and usb-storage. Signed-off-by: Kai-Heng Feng Signed-off-by: Greg Kroah-Hartman Documentation/admin-guide/kernel-parameters.txt | 55 ++++++++ drivers/usb/core/quirks.c | 177 +++++++++++++++++++++++- drivers/usb/core/usb.c | 1 + drivers/usb/core/usb.h | 1 + 4 files changed, 229 insertions(+), 5 deletions(-) commit cf6e06cddf29722a4e54b9d66df24c381b231600 Author: Heikki Krogerus Date: Fri Mar 2 11:20:47 2018 +0100 usb: typec: Start using ERR_PTR In order to allow the USB Type-C Class driver take care of things like muxes and other possible dependencies for the port drivers, returning ERR_PTR instead of NULL from the registration functions in case of failure. The reason for taking over control of the muxes for example is because handling them in the port drivers would be just boilerplate. Signed-off-by: Heikki Krogerus Reviewed-by: Hans de Goede Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm.c | 16 +++++++++------- drivers/usb/typec/tps6598x.c | 15 ++++++++------- drivers/usb/typec/typec.c | 44 +++++++++++++++++++++---------------------- drivers/usb/typec/ucsi/ucsi.c | 31 ++++++++++++++++++------------ 4 files changed, 58 insertions(+), 48 deletions(-) commit ad70f937e9d0bdc580e390db3a047f9e58863b6e Author: Martin Blumenstingl Date: Sat Mar 3 22:43:09 2018 +0100 usb: core: hcd: remove support for initializing a single PHY With the new PHY wrapper in place we can now handle multiple PHYs. Remove the code which handles only one generic PHY as this is now covered (with support for multiple PHYs as well as suspend/resume support) by the new PHY wrapper. Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 37 ------------------------------------- include/linux/usb/hcd.h | 1 - 2 files changed, 38 deletions(-) commit 1255dfd18799c28b4178e91adecaffce3c1110a3 Author: Martin Blumenstingl Date: Sat Mar 3 22:43:08 2018 +0100 usb: host: ohci-platform: remove custom USB PHY handling The new PHY wrapper is now wired up in the core HCD code. This means that PHYs are now controlled (initialized, enabled, disabled, exited) without requiring any host-driver specific code. Remove the custom USB PHY handling from the ohci-platform driver as the core HCD code now handles this. Signed-off-by: Martin Blumenstingl Acked-by: Alan Stern Tested-by: Neil Armstrong Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-platform.c | 56 ++++------------------------------------ 1 file changed, 5 insertions(+), 51 deletions(-) commit 27b3df4139d5589c366196b6ade79f8ea0d32b42 Author: Martin Blumenstingl Date: Sat Mar 3 22:43:07 2018 +0100 usb: host: ehci-platform: remove custom USB PHY handling The new PHY wrapper is now wired up in the core HCD code. This means that PHYs are now controlled (initialized, enabled, disabled, exited) without requiring any host-driver specific code. Remove the custom USB PHY handling from the ehci-platform driver as the core HCD code now handles this. Signed-off-by: Martin Blumenstingl Acked-by: Alan Stern Tested-by: Neil Armstrong Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-platform.c | 55 +++------------------------------------- 1 file changed, 4 insertions(+), 51 deletions(-) commit 6ae9f5062aa6f5a301c16715c601c05bc9aa450e Author: Martin Blumenstingl Date: Sat Mar 3 22:43:06 2018 +0100 usb: host: xhci-mtk: remove custom USB PHY handling The new PHY wrapper is now wired up in the core HCD code. This means that PHYs are now controlled (initialized, enabled, disabled, exited) without requiring any host-driver specific code. Remove the custom USB PHY handling from the xhci-mtk driver as the core HCD code now handles this. Signed-off-by: Martin Blumenstingl Tested-by: Sean Wang Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 98 +-------------------------------------------- 1 file changed, 2 insertions(+), 96 deletions(-) commit 178a0bce05cbc17a27f9cba78258c5d12adc980c Author: Martin Blumenstingl Date: Sat Mar 3 22:43:05 2018 +0100 usb: core: hcd: integrate the PHY wrapper into the HCD core This integrates the PHY wrapper into the core hcd infrastructure. Multiple PHYs which are part of the HCD's device tree node are now managed (= powered on/off when needed), by the new usb_phy_roothub code. Suspend and resume is also supported, however not for runtime/auto-suspend (which is triggered for example when no devices are connected to the USB bus). This is needed on some SoCs (for example Amlogic Meson GXL) because if the PHYs are disabled during auto-suspend then devices which are plugged in afterwards are not seen by the host. One example where this is required is the Amlogic GXL and GXM SoCs: They are using a dwc3 USB controller with up to three ports enabled on the internal roothub. Each port has it's own PHY which must be enabled (if one of the PHYs is left disabled then none of the USB ports works at all). The new logic works on the Amlogic GXL and GXM SoCs because the dwc3 driver internally creates a xhci-hcd which then registers a HCD which then triggers our new PHY wrapper. USB controller drivers can opt out of this by setting "skip_phy_initialization" in struct usb_hcd to true. This is identical to how it works for a single USB PHY, so the "multiple PHY" handling is disabled for drivers that opted out of the management logic of a single PHY. Signed-off-by: Martin Blumenstingl Acked-by: Alan Stern Acked-by: Chunfeng Yun Tested-by: Yixun Lan Tested-by: Neil Armstrong Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 31 +++++++++++++++++++++++++++++++ include/linux/usb/hcd.h | 1 + 2 files changed, 32 insertions(+) commit 07dbff0ddbd86c08c42088e9f996c2650095d684 Author: Martin Blumenstingl Date: Sat Mar 3 22:43:04 2018 +0100 usb: core: add a wrapper for the USB PHYs on the HCD Many SoC platforms have separate devices for the USB PHY which are registered through the generic PHY framework. These PHYs have to be enabled to make the USB controller actually work. They also have to be disabled again on shutdown/suspend. Currently (at least) the following HCI platform drivers are using custom code to obtain all PHYs via devicetree for the roothub/controller and disable/enable them when required: - ehci-platform.c has ehci_platform_power_{on,off} - xhci-mtk.c has xhci_mtk_phy_{init,exit,power_on,power_off} - ohci-platform.c has ohci_platform_power_{on,off} With this new wrapper the USB PHYs can be specified directly in the USB controller's devicetree node (just like on the drivers listed above). This allows SoCs like the Amlogic Meson GXL family to operate correctly once this is wired up correctly. These SoCs use a dwc3 controller and require all USB PHYs to be initialized (if one of the USB PHYs it not initialized then none of USB port works at all). Signed-off-by: Martin Blumenstingl Tested-by: Yixun Lan Cc: Chunfeng Yun Tested-by: Neil Armstrong Signed-off-by: Greg Kroah-Hartman drivers/usb/core/Makefile | 2 +- drivers/usb/core/phy.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/core/phy.h | 7 ++ 3 files changed, 166 insertions(+), 1 deletion(-) commit 4e88d4c083016454f179686529ae65d70b933b58 Author: Martin Blumenstingl Date: Sat Mar 3 22:43:03 2018 +0100 usb: add a flag to skip PHY initialization to struct usb_hcd The USB HCD core driver parses the device-tree node for "phys" and "usb-phys" properties. It also manages the power state of these PHYs automatically. However, drivers may opt-out of this behavior by setting "phy" or "usb_phy" in struct usb_hcd to a non-null value. An example where this is required is the "Qualcomm USB2 controller", implemented by the chipidea driver. The hardware requires that the PHY is only powered on after the "reset completed" event from the controller is received. A follow-up patch will allow the USB HCD core driver to manage more than one PHY. Add a new "skip_phy_initialization" bitflag to struct usb_hcd so drivers can opt-out of any PHY management provided by the USB HCD core driver. This also updates the existing drivers so they use the new flag if they want to opt out of the PHY management provided by the USB HCD core driver. This means that for these drivers the new "multiple PHY" handling (which will be added in a follow-up patch) will be disabled as well. Signed-off-by: Martin Blumenstingl Acked-by: Peter Chen Tested-by: Neil Armstrong Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/host.c | 6 ++---- drivers/usb/core/hcd.c | 4 ++-- drivers/usb/host/ehci-fsl.c | 2 ++ drivers/usb/host/ehci-platform.c | 4 ++-- drivers/usb/host/ehci-tegra.c | 1 + drivers/usb/host/ohci-omap.c | 1 + drivers/usb/host/ohci-platform.c | 4 ++-- drivers/usb/host/xhci-plat.c | 1 + include/linux/usb/hcd.h | 6 ++++++ 9 files changed, 19 insertions(+), 10 deletions(-) commit 05db0dcc70c61bb51d01845e558bd43add5d55bb Author: Martin Blumenstingl Date: Sat Mar 3 22:43:02 2018 +0100 dt-bindings: usb: add the documentation for USB HCDs A USB HCD may have several PHYs which need to be configured before the the HCD starts working. This adds the documentation for such a USB HCD as well as a reference to the new "usb-hcd.txt" from all bindings that implement a USB HCD which support one USB PHY per port. Signed-off-by: Martin Blumenstingl Reviewed-by: Rob Herring Tested-by: Yixun Lan Tested-by: Neil Armstrong Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt | 5 ++++- Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 5 ++++- Documentation/devicetree/bindings/usb/usb-ehci.txt | 6 ++++-- Documentation/devicetree/bindings/usb/usb-hcd.txt | 9 +++++++++ Documentation/devicetree/bindings/usb/usb-ohci.txt | 6 ++++-- Documentation/devicetree/bindings/usb/usb-uhci.txt | 3 +++ Documentation/devicetree/bindings/usb/usb-xhci.txt | 5 +++++ 7 files changed, 33 insertions(+), 6 deletions(-) commit 7f5d465f4ddc242709a01030313e80a8d94ccaaa Author: Dave Hansen Date: Wed Mar 7 13:46:24 2018 -0800 docs: clarify security-bugs disclosure policy I think we need to soften the language a bit. It might scare folks off, especially the: We prefer to fully disclose the bug as soon as possible. which is not really the case. Linus says: It's not full disclosure, it's not coordinated disclosure, and it's not "no disclosure". It's more like just "timely open fixes". I changed a bit of the wording in here, but mostly to remove the word "disclosure" since it seems to mean very specific things to people that we do not mean here. Signed-off-by: Dave Hansen Reviewed-by: Dan Williams Reviewed-by: Greg Kroah-Hartman Acked-by: Kees Cook Cc: Thomas Gleixner Cc: Linus Torvalds Cc: Alan Cox Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Tim Chen Cc: Alexander Viro Cc: Andrew Morton Cc: Mark Rutland Signed-off-by: Jonathan Corbet Documentation/admin-guide/security-bugs.rst | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit ef7942603e35e300e6967fa7c17ebc17a0c00f59 Author: Bjorn Helgaas Date: Fri Mar 9 11:42:01 2018 -0600 PCI/portdrv: Merge pcieport_if.h into portdrv.h pcieport_if.h contained the interfaces to register port service driver, e.g., pcie_port_service_register(). portdrv.h contained internal data structures of the port driver. I don't think it's worth keeping those files separate, since both headers and their users are all inside the PCI core. Merge pcieport_if.h directly in drivers/pci/pcie/portdrv.h and update the users to include that instead. Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig drivers/pci/hotplug/pciehp.h | 2 +- drivers/pci/pcie/aer/aerdrv.h | 2 +- drivers/pci/pcie/pcie-dpc.c | 2 +- drivers/pci/pcie/pcieport_if.h | 71 ----------------------------------------- drivers/pci/pcie/pme.c | 1 - drivers/pci/pcie/portdrv.h | 61 ++++++++++++++++++++++++++++++++++- drivers/pci/pcie/portdrv_acpi.c | 1 - drivers/pci/pcie/portdrv_bus.c | 1 - drivers/pci/pcie/portdrv_core.c | 1 - drivers/pci/pcie/portdrv_pci.c | 1 - 10 files changed, 63 insertions(+), 80 deletions(-) commit fc8f7ea2d6c074baaad202c9187962bfa493ef13 Author: Adam Thomson Date: Fri Mar 9 16:25:43 2018 +0000 ASoC: da7219: Add common clock usage for providing DAI clks There is a need to use DA7219 as DAI clock master for other codecs within a system, which means that the DAI clocks are required to remain, regardless of whether the codec is actually running playback/capture. To be able to expose control of the DAI clocking the common clock framework has been employed. The current implementation adds a simple clock gate for enabling and disabling the DAI clocks, with no rate control supported (this is still handled through standard hw_params() functions as before). If DT is enabled then the clock is added to the OF providers list, otherwise a clkdev lookup is used. Signed-off-by: Adam Thomson Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/da7219.txt | 6 + include/sound/da7219.h | 2 + sound/soc/codecs/da7219.c | 129 +++++++++++++++++++-- sound/soc/codecs/da7219.h | 9 ++ 4 files changed, 138 insertions(+), 8 deletions(-) commit 01812ba34a9a7756a46a54f25ba0f02e727ff35c Author: Himanshu Jha Date: Thu Mar 8 00:08:24 2018 +0530 usb: isp1760: Use kasprintf Use kasprintf instead of combination of kmalloc and sprintf and therefore avoid unnecessary computation of string length. Also, remove the useless local variable. Signed-off-by: Himanshu Jha Reviewed-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/usb/isp1760/isp1760-udc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 161c3bc30f3a07458f91f15e35d5b2e91fa617cc Author: Alex Hung Date: Sun Mar 4 21:57:06 2018 -0800 usb: clarify ACPI spec version and section number for _UPC & _PLD ACPI spec inserts sections for new features frequently and section numbers are changed. It is easy to refer to ACPI spec if ACPI version is available in comments. There are no functional changes. Signed-off-by: Alex Hung Signed-off-by: Greg Kroah-Hartman drivers/usb/core/usb-acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 57edd462270bf2c50049b73774cb5915e2f12aa8 Author: Mathias Nyman Date: Thu Mar 1 13:15:28 2018 +0200 usb: Don't disable Latency tolerance Messaging (LTM) before port reset Disabing Latency Tolerance Messaging before port reset is unnecessary. LTM is automatically disabled at port reset. If host can't communicate with the device the LTM message will fail, and the hub driver will unnecessarily do a logical disconnect. Broken communication is ofter the reason for a reset in the first place. Additionally we can't guarantee device is in a configured state, epecially in reset-resume case when root hub lost power. LTM can't be modified unless device is in a configured state. Just remove LTM disabling before port reset. Details about LTM and port reset in USB 3 specification: USB 3 spec section 9.4.5 "The LTM Enable field can be modified by the SetFeature() and ClearFeature() requests using the LTM_ENABLE feature selector. This field is reset to zero when the device is reset." USB 3 spec section 9.4.1 "The device shall process a Clear Feature (U1_Enable or U2_Enable or LTM_Enable) only if the device is in the configured state." Signed-off-by: Mathias Nyman Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 687ca6395f10ac8a54fd5285dda91ed9efac9e23 Author: Kirill Kapranov Date: Sat Feb 17 23:01:40 2018 +0200 USB: adutux: Add waiting in transfer abortion Add waiting for an URB transmit finish that let the last URB to be sent (to be not discarded) during 'release' procedure. W/o this waiting,the last frame will be nearly always lost. A test case: an attempt of sending a single frame: echo -en "\001mk255" >/dev/adutux0 Signed-off-by: Kirill Kapranov Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/adutux.c | 2 ++ 1 file changed, 2 insertions(+) commit 092bd5c2b939e63e0e02249f7695ca828fa05049 Author: Andy Shevchenko Date: Wed Feb 14 18:08:30 2018 +0200 uwb: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/uwb/uwb-debug.c | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) commit 9e902c598b9253032dbc03f18a9af55fcd245a17 Author: Andy Shevchenko Date: Wed Feb 14 18:08:29 2018 +0200 USB: typec: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Signed-off-by: Andy Shevchenko Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/fusb302/fusb302.c | 17 +++-------------- drivers/usb/typec/tcpm.c | 17 +++-------------- 2 files changed, 6 insertions(+), 28 deletions(-) commit e23500dd34f2094e48dc6b53971b94dad5e8cfbf Author: Andy Shevchenko Date: Wed Feb 14 18:08:28 2018 +0200 USB: host: whci: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/usb/host/whci/debug.c | 48 ++++++------------------------------------- 1 file changed, 6 insertions(+), 42 deletions(-) commit 0a9e8adea7946ef5fcb9f433dad0df7b512111d9 Author: Andy Shevchenko Date: Wed Feb 14 18:08:26 2018 +0200 USB: host: isp116x: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: Olav Kongas Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/usb/host/isp116x-hcd.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 64cfe860678f0d541468872d106bc26edfe33ff8 Author: Andy Shevchenko Date: Wed Feb 14 18:08:25 2018 +0200 USB: host: imx21: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/usb/host/imx21-dbg.c | 65 ++++---------------------------------------- 1 file changed, 5 insertions(+), 60 deletions(-) commit 513f6750c433c49856490e341a9610d502607393 Author: Andy Shevchenko Date: Wed Feb 14 18:08:24 2018 +0200 USB: host: fhci: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/usb/host/fhci-dbg.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) commit 35a7e0a2efe6714f68c92fb03e760264929f6dc5 Author: Andy Shevchenko Date: Wed Feb 14 18:08:23 2018 +0200 USB: gadget: pxa27x: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: Daniel Mack Cc: Haojian Zhuang Signed-off-by: Andy Shevchenko Acked-by: Robert Jarzmik Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/pxa27x_udc.c | 42 +++---------------------------------- 1 file changed, 3 insertions(+), 39 deletions(-) commit aaabe7a8fdcae0854dd3a05f6207d90b2ba6b284 Author: Andy Shevchenko Date: Wed Feb 14 18:08:22 2018 +0200 USB: gadget: pxa25x: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: Daniel Mack Cc: Haojian Zhuang Signed-off-by: Andy Shevchenko Acked-by: Robert Jarzmik Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/pxa25x_udc.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) commit 40d2589aa45c663e46813ec1aed24d8f37501186 Author: Andy Shevchenko Date: Wed Feb 14 18:08:21 2018 +0200 USB: gadget: gr: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/gr_udc.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit b5c293982cb948104827566652023e3c9d971a0b Author: Andy Shevchenko Date: Wed Feb 14 18:08:20 2018 +0200 USB: gadget: bcm63xx: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: Kevin Cernekee Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/bcm63xx_udc.c | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) commit efb85c4d24b4a551ce9bab5b4d2d6c54c9882d90 Author: Andy Shevchenko Date: Wed Feb 14 18:08:19 2018 +0200 USB: musb: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Signed-off-by: Andy Shevchenko Acked-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_debugfs.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit fd9197ef4438a4696e13305af967b9d9ace7125d Author: Andy Shevchenko Date: Wed Feb 14 18:08:18 2018 +0200 USB: dwc2: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: John Youn Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc2/debugfs.c | 84 ++++------------------------------------------ 1 file changed, 6 insertions(+), 78 deletions(-) commit e8c56f274da4d2ac8ba55e482f41b73148d5f885 Author: Andy Shevchenko Date: Wed Feb 14 18:08:17 2018 +0200 USB: chipidea: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: Peter Chen Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/debug.c | 65 ++++---------------------------------------- 1 file changed, 5 insertions(+), 60 deletions(-) commit 02cad961cae556357e4a63b11f849e80418c1ffc Author: Adam Thomson Date: Tue Jan 2 15:50:51 2018 +0000 typec: tcpm: Add SDB header for Status message handling This commit adds a header providing definitions for handling Status messages. Currently the header only focuses on handling incoming Status messages. Signed-off-by: Adam Thomson Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman include/linux/usb/pd_ext_sdb.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 456ebb4f221e98f507cc945690a670a79682c029 Author: Adam Thomson Date: Tue Jan 2 15:50:50 2018 +0000 typec: tcpm: Add ADO header for Alert message handling This commit adds a header providing definitions for handling Alert messages. Currently the header only focuses on handling incoming alerts. Signed-off-by: Adam Thomson Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman include/linux/usb/pd_ado.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit ccefd976f921a280327b17b2896bc809baa7b672 Author: Adam Thomson Date: Tue Jan 2 15:50:49 2018 +0000 typec: tcpm: Add PD Rev 3.0 definitions to PD header This commit adds definitions for PD Rev 3.0 messages, including APDO PPS and extended message support for TCPM. Signed-off-by: Adam Thomson Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman include/linux/usb/pd.h | 185 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 174 insertions(+), 11 deletions(-) commit fc9de9a52e993829d928825d05fc9d3f41ce33fa Author: Ross Zwisler Date: Fri Mar 9 09:38:26 2018 -0700 MAINTAINERS: add coverage for drivers/block To help folks like me that use scripts/get_maintainer.pl. Signed-off-by: Ross Zwisler Signed-off-by: Jens Axboe MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit ad81b15d561692df1ce2a57dce391d39633209b1 Author: Shuah Khan Date: Wed Mar 7 13:42:26 2018 -0700 usbip: tools: change to use new error codes in server reply messages Changed usbip_network, usbip_attach, usbip_list, and usbipd to use and propagate the new error codes in server reply messages. usbip_net_recv_op_common() is changed to take a pointer to status return the status returned in the op_common.status to callers. usbip_attach and usbip_list use the common interface to print error messages to indicate why the request failed. With this change the messages say why a request failed: - when a client requests a device that is already exported: usbip attach -r server_name -b 3-10.2 usbip: error: Attach Request for 3-10.2 failed - Device busy (exported) - when a client requests a device that isn't exportable, usbip attach -r server_name -b 3-10.4 usbip: error: Attach Request for 3-10.4 failed - Device not found Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/src/usbip_attach.c | 11 +++++------ tools/usb/usbip/src/usbip_list.c | 6 ++++-- tools/usb/usbip/src/usbip_network.c | 6 +++++- tools/usb/usbip/src/usbip_network.h | 2 +- tools/usb/usbip/src/usbipd.c | 18 +++++++++--------- 5 files changed, 24 insertions(+), 19 deletions(-) commit c207a10d2f0bddf691920c0d73b7e8a83e6e2fb6 Author: Shuah Khan Date: Wed Mar 7 13:42:25 2018 -0700 usbip: usbip_host_common: Use new error codes to return request status Currently ST_OK and ST_NA are the only values used to communicate status of a request from a client. Use new error codes to clearly indicate what failed. For example, when client sends request to import a device that isn't export-able, send ST_DEV_BUSY to the client. Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/libsrc/usbip_host_common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f6bcbf2e24eb10275b6614ccd9cab3e7d93748de Author: Shuah Khan Date: Wed Mar 7 13:42:24 2018 -0700 usbip: tools: add more error codes for usbip request/reply messages Currently ST_OK and ST_NA are the only values defined to communicate status of a request from a client. Add more error codes to clearly indicate what failed. For example, when client sends request to import a device that isn't export-able, server can send a specific error code to the client. Existing defines are moved to a common header in libsrc to be included in the libusbip_la-usbip_common.o to be used by all the usbip tools. Supporting interface to print error strings is added to the common lib. Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/libsrc/usbip_common.c | 23 +++++++++++++++++++++++ tools/usb/usbip/libsrc/usbip_common.h | 11 +++++++++++ tools/usb/usbip/src/usbip_network.h | 4 +--- 3 files changed, 35 insertions(+), 3 deletions(-) commit 8fe8f5821c4ebd1c80099ff0d2b197fd17581a2c Author: Shuah Khan Date: Tue Feb 27 15:23:56 2018 -0700 usbip: tools usbip_network: Fix cryptic error messages Kernel and tool version mismatch message is cryptic. Fix it to be informative. Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/src/usbip_network.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0c60b14860fe5f7086d4d9458a7f23ea1d09fcfa Author: Shuah Khan Date: Tue Feb 27 15:23:55 2018 -0700 usbip: tools usbip_attach: Fix cryptic error messages Attach device error message is cryptic and useless. Fix it to be informative. Signed-off-by: Shuah Khan Reviewed-by: Krzysztof Opasiak Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/src/usbip_attach.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 65f4b15cf4db1d6bc7fbe5a49e48f6969af8cd2d Author: Colin Ian King Date: Fri Jan 26 15:07:12 2018 +0000 USB: wusbcore: remove redundant re-assignment to pointer 'dev' Pointer dev is initialized and then re-assigned with the same value a little later, hence the second assignment is redundant and can be removed. Cleans up clang warning: drivers/usb/wusbcore/wa-nep.c:88:17: warning: Value stored to 'dev' during its initialization is never read Signed-off-by: Colin Ian King Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/wusbcore/wa-nep.c | 1 - 1 file changed, 1 deletion(-) commit 351a8d4837ae0d61744e64262c3a80ab92ff3e42 Author: Ben Hutchings Date: Mon Jan 29 00:04:18 2018 +0000 usbip: Correct maximum value of CONFIG_USBIP_VHCI_HC_PORTS Now that usbip supports USB3, the maximum number of ports allowed on a hub is 15 (USB_SS_MAXPORTS), not 31 (USB_MAXCHILDREN). Reported-by: Gianluigi Tiesi Reported-by: Borissh1983 References: https://bugs.debian.org/878866 Fixes: 1c9de5bf4286 ("usbip: vhci-hcd: Add USB3 SuperSpeed support") Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c53439fbd15600ecd48bfec446c2018e4fa6e241 Author: Tobin C. Harding Date: Fri Mar 9 17:11:14 2018 +1100 usb: usbtest: Remove stack VLA usage The kernel would like to have all stack VLA usage removed[1]. We already have a pre-processor constant defined MAX_SGLEN. We can use this instead of the variable param-sglen. [1]: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usbtest.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f451655c722b6f8a15d152d7912ab8526a3fe8bd Author: Hans de Goede Date: Thu Feb 15 15:00:36 2018 +0100 power: supply: axp288_fuel_gauge: Fix full status reporting Commit 2b5a4b4bf222 ("power: supply: axp288_fuel_gauge: Rework get_status()"), switched from 0A current detection to using the capacity register for full detection. It turns out this fixes full reporting on some devices which keep trickle charging long after the capacity register reach 100%, but breaks it on some other devices where the charger stops charging before the capacity register reaches 100%. This commit fixes this by also checking for 0A current when the reported capacity is above 90%. Fixes: 2b5a4b4bf222 ("psy: axp288_fuel_gauge: Rework get_status()") Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_fuel_gauge.c | 47 ++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 12 deletions(-) commit 35951393bbffa1ce351438bee264b48347c8cbb7 Author: Gustavo A. R. Silva Date: Thu Mar 8 23:43:40 2018 -0600 pktgen: Remove VLA usage In preparation to enabling -Wvla, remove VLA usage and replace it with a fixed-length array instead. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/core/pktgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 597667d889517c6085d57aac92dbf1cc624cd8ae Author: Gregory CLEMENT Date: Thu Mar 1 14:18:19 2018 +0100 ARM64: dts: marvell: armada-cp110: Add apb_pclk clock for the uart nodes This extra clock is needed to access the registers of the UARTs used on CP110 component of the Armada 7K/8K SoCs. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit ff3c1b1a817d72e092fded369596dbd84e719ab8 Author: Vaibhav Murkute Date: Fri Mar 9 08:26:03 2018 +0530 drivers: vhost: vsock: fixed a brace coding style issue Fixed a coding style issue. Signed-off-by: Vaibhav Murkute Reviewed-by: Stefan Hajnoczi Signed-off-by: David S. Miller drivers/vhost/vsock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit feaf751d8d120c3a70a19b5709f4d9efe529ed4c Merge: 0623951 7a242b2 Author: David S. Miller Date: Fri Mar 9 11:33:15 2018 -0500 Merge branch 'hns3-fixes-for-configuration-lost-problems' Peng Li says: ==================== fixes for configuration lost problems This patchset refactors some functions and some bugs in order to fix the configuration loss problem when resetting and setting channel number. ==================== Signed-off-by: David S. Miller commit 7a242b232a6435a6f7ca3ce71efc56a7b3c451ba Author: Yunsheng Lin Date: Fri Mar 9 10:37:04 2018 +0800 net: hns3: fix for coal configuation lost when setting the channel This patch fixes the coalesce configuation lost problem when setting the channel number by restoring all vectors's coalesce configuation to vector 0's, because all vectors belonging to the same netdev have the same coalesce configuation for now. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 37 +++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) commit 9bc727a9d5e5c47015db118db407cbada1081a1e Author: Yunsheng Lin Date: Fri Mar 9 10:37:03 2018 +0800 net: hns3: refactor the coalesce related struct This patch refoctors the coalesce related struct by introducing the hns3_enet_coalesce struct, in order to fix the coalesce configuation lost problem when changing the channel number. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 46 +++++++++++----------- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 10 +++-- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 26 +++++++----- 3 files changed, 46 insertions(+), 36 deletions(-) commit dd38c72604dc8c49e6057010675651f3567dd3bf Author: Yunsheng Lin Date: Fri Mar 9 10:37:02 2018 +0800 net: hns3: fix for coalesce configuration lost during reset Coalesce configuration will be set to default value by hns3_nic_init_vector_data during reset, which causes the coalesce configuration loss problem. This patch fixes it by setting the default value in hns3_nic_alloc_vector_data, which will not be called in the reset process. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 156 +++++++++++++++++------- 1 file changed, 114 insertions(+), 42 deletions(-) commit 0d3e6631de9a56a56e06435f3a2c6196014a059d Author: Yunsheng Lin Date: Fri Mar 9 10:37:01 2018 +0800 net: hns3: refactor the get/put_vector function There is a get_vector function, which allocate the vectors for a client, but there is not a put_vector to free the vector. This patch introduces the put_vector function in order to fix the coalesce configuration lost problem during reset process. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 +++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 28 ++++++++++++++++------ .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 12 +++++++--- 4 files changed, 37 insertions(+), 10 deletions(-) commit ec77789032c0d5ab77c32abd762f5a8e65198e1b Author: Yunsheng Lin Date: Fri Mar 9 10:37:00 2018 +0800 net: hns3: fix for use-after-free when setting ring parameter In hns3_set_ringparam, hns3_uninit_all_ring frees the memory pointed by priv->ring_data[i].ring, and hns3_change_all_ring_bd_num use that pointer without mallocing, which will cause a use-after-free problem. The patch fixes it by not freeing the memory in hns3_uninit_all_ring, and uses hns3_put_ring_config to free it when necessary. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f31c1ba6687ea00a4149d6557820e02470e1dcb8 Author: Yunsheng Lin Date: Fri Mar 9 10:36:59 2018 +0800 net: hns3: fix for pause configuration lost during reset Pause configuration will be set to default value by hclge_tm_schd_init during reset, which causes the RSS configuration loss problem. This patch fixes it by calling hclge_tm_init_hw during reset process , which will set the pause configuration to default value. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 268f5dfade2a873cef516ce94ebfc7129af245da Author: Yunsheng Lin Date: Fri Mar 9 10:36:58 2018 +0800 net: hns3: fix for RSS configuration loss problem during reset RSS configuration will be set to default value by hclge_rss_init_hw during reset, which causes the RSS configuration loss problem. This patch fixes it by setting the default value in hclge_rss_init_cfg function, which will not be called in the reset process. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 2 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 107 ++++++++++----------- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 1 + 3 files changed, 56 insertions(+), 54 deletions(-) commit 6f2af4295553348953e91dfc0bd77749de961804 Author: Yunsheng Lin Date: Fri Mar 9 10:36:57 2018 +0800 net: hns3: refactor the hclge_get/set_rss_tuple function This patch refactors the hclge_get/set_rss_tuple function in order to fix the rss configuration loss problem during reset process. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 91 +++++++++++++--------- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 13 ++++ 2 files changed, 67 insertions(+), 37 deletions(-) commit 89523cfaa5e316ef3eec8d2c6ca44f9b5b9458d4 Author: Yunsheng Lin Date: Fri Mar 9 10:36:56 2018 +0800 net: hns3: refactor the hclge_get/set_rss function This patch refactors the hclge_get/set_rss function in order to fix the rss configuration loss problem during reset process. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 39 ++++------------------ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 2 ++ 2 files changed, 9 insertions(+), 32 deletions(-) commit 0623951eb87ce1e3aba41d27cadbb9f49398de66 Merge: 79134e6 9c5c9c5 Author: David S. Miller Date: Fri Mar 9 11:25:12 2018 -0500 Merge branch 'sched-action-events' Roman Mashak says: ==================== Fix event generation for actions batch Add/Delete mode When adding or deleting a batch of entries, the kernel sends upto TCA_ACT_MAX_PRIO entries in an event to user space. However it does not consider that the action sizes may vary and require different skb sizes. For example : % cat tc-batch.sh TC="sudo /mnt/iproute2.git/tc/tc" $TC actions flush action gact for i in `seq 1 $1`; do cmd="action pass index $i " args=$args$cmd done $TC actions add $args % % ./tc-batch.sh 32 Error: Failed to fill netlink attributes while adding TC action. We have an error talking to the kernel % This patchset introduces new callback in tc_action_ops, which calculates the action size, and passes size to tcf_add_notify()/tcf_del_notify(). The patch fixes act_gact, and the rest of actions will be updated in the follow-up patches. v3: Fixed tcf_action_fill_size() to return shared attrs length when action ->get_fill_size() isn't implemented. v2: Restructured patches to make them bisectable. ==================== Signed-off-by: David S. Miller commit 9c5c9c573700a0a4a4afa431da3e7d21f2992627 Author: Roman Mashak Date: Thu Mar 8 16:59:20 2018 -0500 net sched actions: implement get_fill_size routine in act_gact Signed-off-by: Roman Mashak Signed-off-by: David S. Miller net/sched/act_gact.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 4e76e75d6aba83f35d55b50f66a6768af1657563 Author: Roman Mashak Date: Thu Mar 8 16:59:19 2018 -0500 net sched actions: calculate add/delete event message size Introduce routines to calculate size of the shared tc netlink attributes and the full message size including netlink header and tc service header. Update add/delete action logic to have the size for event messages, the size is passed to tcf_add_notify() and tcf_del_notify() where the notification message is being allocated and constructed. Signed-off-by: Roman Mashak Signed-off-by: David S. Miller net/sched/act_api.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit a03b91b17684023c45d39b836c85579d5e535983 Author: Roman Mashak Date: Thu Mar 8 16:59:18 2018 -0500 net sched actions: add new tc_action_ops callback Add a new callback in tc_action_ops, it will be needed by the tc actions to compute its size when a ADD/DELETE notification message is constructed. This routine has to take into account optional/variable size TLVs specific per action. Signed-off-by: Roman Mashak Signed-off-by: David S. Miller include/net/act_api.h | 1 + 1 file changed, 1 insertion(+) commit d04e6990c948a3315ea8eca5979ebea48cda56f4 Author: Roman Mashak Date: Thu Mar 8 16:59:17 2018 -0500 net sched actions: update Add/Delete action API with new argument Introduce a new function argument to carry total attributes size for correct allocation of skb in event messages. Signed-off-by: Roman Mashak Signed-off-by: David S. Miller include/net/act_api.h | 3 ++- net/sched/act_api.c | 21 +++++++++++++-------- net/sched/cls_api.c | 3 ++- 3 files changed, 17 insertions(+), 10 deletions(-) commit 79134e6ce2c9d1a00eab4d98cb48f975dd2474cb Author: Eric Dumazet Date: Thu Mar 8 12:51:41 2018 -0800 net: do not create fallback tunnels for non-default namespaces fallback tunnels (like tunl0, gre0, gretap0, erspan0, sit0, ip6tnl0, ip6gre0) are automatically created when the corresponding module is loaded. These tunnels are also automatically created when a new network namespace is created, at a great cost. In many cases, netns are used for isolation purposes, and these extra network devices are a waste of resources. We are using thousands of netns per host, and hit the netns creation/delete bottleneck a lot. (Many thanks to Kirill for recent work on this) Add a new sysctl so that we can opt-out from this automatic creation. Note that these tunnels are still created for the initial namespace, to be the least intrusive for typical setups. Tested: lpk43:~# cat add_del_unshare.sh for i in `seq 1 40` do (for j in `seq 1 100` ; do unshare -n /bin/true >/dev/null ; done) & done wait lpk43:~# echo 0 >/proc/sys/net/core/fb_tunnels_only_for_init_net lpk43:~# time ./add_del_unshare.sh real 0m37.521s user 0m0.886s sys 7m7.084s lpk43:~# echo 1 >/proc/sys/net/core/fb_tunnels_only_for_init_net lpk43:~# time ./add_del_unshare.sh real 0m4.761s user 0m0.851s sys 1m8.343s lpk43:~# Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller Documentation/sysctl/net.txt | 12 ++++++++++++ include/linux/netdevice.h | 7 +++++++ include/net/ip_tunnels.h | 2 ++ net/core/sysctl_net_core.c | 12 ++++++++++++ net/ipv4/ip_tunnel.c | 20 ++++++++++++-------- net/ipv6/ip6_gre.c | 4 +++- net/ipv6/ip6_tunnel.c | 2 ++ net/ipv6/sit.c | 5 ++++- 8 files changed, 54 insertions(+), 10 deletions(-) commit 2b3905de8b3d8511aee1d4acbf063197291cdd3f Author: Brenda J. Butler Date: Thu Mar 8 15:28:03 2018 -0500 tools: tc-testing: Can pause just before post-suite With option -P, the test script will pause just before the post_suite functions are called. This allows the tester to inspect the system before it is torn down. Signed-off-by: Brenda J. Butler Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tdc.py | 9 +++++++++ 1 file changed, 9 insertions(+) commit 75291f3a6b86a53f2607658de3b8b267e306bf60 Author: Brenda J. Butler Date: Thu Mar 8 15:27:44 2018 -0500 tools: tc-testing: Can refer to $TESTID in test spec When processing the commands in the test cases, substitute the test id for $TESTID. This helps to make more flexible tests. For example, the testid can be given as a command line argument. As an example, if we wish to save the test output to a file named for the test case, we can write in the test case: "cmdUnderTest": "some test command | tee -a $TESTID.out" Signed-off-by: Brenda J. Butler Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tdc.py | 6 ++++++ 1 file changed, 6 insertions(+) commit 7638eb5666eb3c216dfdef63b573933ed9740676 Author: Carlo Caione Date: Fri Feb 16 08:26:16 2018 +0000 power: supply: axp288_fuel_gauge: Do not register FG on ECS EF20EA The ECS EF20EA laptop ships an AXP288 but it is actually using a different, separate FG chip for AC and battery monitoring. On this laptop we need to keep using the regular ACPI driver and disable the AXP288 FG to avoid reporting two batteries to userspace. Signed-off-by: Carlo Caione Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_fuel_gauge.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b19e5c1515f2ed0adf5806581ac6d0c4dc3e6dff Author: Andrew Lunn Date: Thu Mar 8 21:21:36 2018 +0100 net: dsa: mv88e6xxx: Fix irq free'ing Call the common irq free function, rather than going recursive and blowing away the stack, followed by the machine. Fixes: 294d711ee8c0 ("net: dsa: mv88e6xxx: Poll when no interrupt defined") Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8edfaf7d33983309b30564e2abaede26163764f3 Author: Roman Mashak Date: Thu Mar 8 14:56:43 2018 -0500 tc-testing: add csum tests Signed-off-by: Roman Mashak Tested-by: Davide Caratti Signed-off-by: David S. Miller .../tc-testing/tc-tests/actions/csum.json | 410 +++++++++++++++++++++ 1 file changed, 410 insertions(+) commit d85b4f7b7fae40aabacc3fe11ded95b4a2bbc49f Author: Moritz Fischer Date: Thu Feb 22 15:17:14 2018 -0800 power: reset: gpio-poweroff: Support for timeout from device property Add support for reading a timeout value from device property. Fall back to previous default of 3s if nothing is specified. Signed-off-by: Moritz Fischer Signed-off-by: Sebastian Reichel drivers/power/reset/gpio-poweroff.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 88f598725f42c8ad8c6c01c82bd3d667c250e1de Author: Moritz Fischer Date: Thu Feb 22 15:17:13 2018 -0800 dt-bindings: power: reset: gpio-poweroff: Add 'timeout-ms' property Add 'timeout-ms' property to support boards where the 3s timeout that the current driver defaults to is too short. Signed-off-by: Moritz Fischer Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/power/reset/gpio-poweroff.txt | 3 +++ 1 file changed, 3 insertions(+) commit 3f5faf3a0667ea39faf7152c5bdd4befb9e483a8 Author: Baolin Wang Date: Mon Feb 26 10:23:14 2018 +0800 power: reset: Add Spreadtrum SC27xx PMIC power off support On Spreadtrum platform, we need power off system through external SC27xx series PMICs including the SC2720, SC2721, SC2723, SC2730 and SC2731 chips. Thus this patch adds SC27xx series PMICs power-off support. Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel drivers/power/reset/Kconfig | 9 +++++ drivers/power/reset/Makefile | 1 + drivers/power/reset/sc27xx-poweroff.c | 66 +++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) commit 6ff653e3e8b9cd53cf490e8bea888e8af3e39ea7 Author: Quentin Schulz Date: Wed Feb 28 11:36:00 2018 +0100 power: supply: axp20x_battery: add support for AXP813 The X-Powers AXP813 PMIC has got some slight differences from AXP20X/AXP22X PMICs: - the maximum voltage supplied by the PMIC is 4.35 instead of 4.36/4.24 for AXP20X/AXP22X, - the constant charge current formula is different, It also has a bit to tell whether the battery percentage returned by the PMIC is valid. Signed-off-by: Quentin Schulz Reviewed-by: Chen-Yu Tsai Signed-off-by: Sebastian Reichel drivers/power/supply/axp20x_battery.c | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 99cdb0a9f5ecae5c8accc0ee65326b6e9e793725 Author: Quentin Schulz Date: Wed Feb 28 11:35:59 2018 +0100 dt-bindings: power: supply: axp20x: add AXP813 battery DT binding The AXP813 can have a battery as power supply, so let's add it to the list of compatibles. Signed-off-by: Quentin Schulz Reviewed-by: Rob Herring Acked-by: Chen-Yu Tsai Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/power/supply/axp20x_battery.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 648badd797c762a713b48afc3b67d56abdd0073b Author: Quentin Schulz Date: Wed Feb 28 11:35:58 2018 +0100 power: supply: axp20x_battery: use data struct for variant specific code We used to use IDs to select a function or a feature depending on the variant. It's easier to maintain the code by adding data structure storing the few differences between variants so that we don't add a pile of if conditions. Let's use this data structure and update the code to use it. Signed-off-by: Quentin Schulz Reviewed-by: Chen-Yu Tsai [updated POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN write property to use the introduced set_max_voltage() callback] Signed-off-by: Sebastian Reichel drivers/power/supply/axp20x_battery.c | 102 ++++++++++++++++++++++------------ 1 file changed, 67 insertions(+), 35 deletions(-) commit d47c1e4b2f51e81683b087480401b9b42b2a58fd Author: Ladislav Michl Date: Mon Mar 5 19:05:55 2018 +0100 power: supply: gpio-charger: Remove pdata from gpio_charger Platform data are now used only during probe time, so remove them from gpio_charger structure and consolidate probing function accordingly. Signed-off-by: Ladislav Michl [Replace of_property_read_string with dev_property_read_string] Signed-off-by: Sebastian Reichel drivers/power/supply/gpio-charger.c | 95 ++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 54 deletions(-) commit 8413b9e00aa33604aa661d7271c3c02c86beb994 Author: Katsuhiro Suzuki Date: Fri Mar 9 22:21:16 2018 +0900 ASoC: uniphier: add support for UniPhier PXs2 AIO This patch adds support for UniPhier AIO sound driver which is included in UniPhier PXs2 SoCs. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown .../devicetree/bindings/sound/uniphier,aio.txt | 1 + sound/soc/uniphier/Kconfig | 11 + sound/soc/uniphier/Makefile | 2 + sound/soc/uniphier/aio-ld11.c | 2 +- sound/soc/uniphier/aio-pxs2.c | 320 +++++++++++++++++++++ sound/soc/uniphier/aio.h | 2 + 6 files changed, 337 insertions(+), 1 deletion(-) commit 17aa9521d0c2856808c54ca1144d5c708e748928 Author: Vijendar Mukunda Date: Fri Mar 9 20:51:32 2018 +0530 ASoC: amd: modifications in dma stop sequence As per design, non-circular dma also need to be stopped explicitly for both playback and capture scenarios. Signed-off-by: Vijendar Mukunda Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 4 ++++ 1 file changed, 4 insertions(+) commit 654c39c7982c5314748eda50352dbc35099a2595 Merge: af40ff6 8dc1253 Author: Will Deacon Date: Fri Mar 9 15:28:43 2018 +0000 Merge tag 'acpi/iort-for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux into aarch64/for-next/core Three ACPI IORT clean-up patches aimed at v4.17 release cycle: - Removal of IORT linker script entry re-introduced by mistake by clocksource drivers refactoring (J.He) - Two ACPICA guards removal of previously introduced guards to prevent ACPICA<->kernel patches dependencies (L.Pieralisi) commit 56c4bddb970658b26da0d847a2bfb3225e2f2b13 Author: Bart Van Assche Date: Thu Mar 8 15:28:50 2018 -0800 block: Suppress kernel-doc warnings triggered by blk-zoned.c Avoid that building with W=1 causes the kernel-doc tool to complain about undocumented function arguments for the blk-zoned.c source file. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Damien Le Moal Signed-off-by: Jens Axboe block/blk-zoned.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f5fec4cc2949421af74bdd005abd99fcbaf9d0d7 Author: Ladislav Michl Date: Mon Mar 5 19:05:18 2018 +0100 power: supply: gpio-charger: Use GPIOF_ACTIVE_LOW for legacy setup Setting GPIOF_ACTIVE_LOW flag based on platform data gpio_active_low makes return value of gpiod_get_value_cansleep directly usable. Signed-off-by: Ladislav Michl Signed-off-by: Sebastian Reichel drivers/power/supply/gpio-charger.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit d433d04bb70085ceea2815cdb879d4e6fae470d9 Author: Ladislav Michl Date: Mon Mar 5 19:04:14 2018 +0100 power: supply: gpio-charger: Remove redundant dev_err call in probe function There is an error message within devm_kzalloc already. Signed-off-by: Ladislav Michl Signed-off-by: Sebastian Reichel drivers/power/supply/gpio-charger.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2bbea6e117357d17842114c65e9a9cf2d13ae8a3 Author: Maurizio Lombardi Date: Fri Mar 9 13:59:06 2018 +0100 cdrom: do not call check_disk_change() inside cdrom_open() when mounting an ISO filesystem sometimes (very rarely) the system hangs because of a race condition between two tasks. PID: 6766 TASK: ffff88007b2a6dd0 CPU: 0 COMMAND: "mount" #0 [ffff880078447ae0] __schedule at ffffffff8168d605 #1 [ffff880078447b48] schedule_preempt_disabled at ffffffff8168ed49 #2 [ffff880078447b58] __mutex_lock_slowpath at ffffffff8168c995 #3 [ffff880078447bb8] mutex_lock at ffffffff8168bdef #4 [ffff880078447bd0] sr_block_ioctl at ffffffffa00b6818 [sr_mod] #5 [ffff880078447c10] blkdev_ioctl at ffffffff812fea50 #6 [ffff880078447c70] ioctl_by_bdev at ffffffff8123a8b3 #7 [ffff880078447c90] isofs_fill_super at ffffffffa04fb1e1 [isofs] #8 [ffff880078447da8] mount_bdev at ffffffff81202570 #9 [ffff880078447e18] isofs_mount at ffffffffa04f9828 [isofs] #10 [ffff880078447e28] mount_fs at ffffffff81202d09 #11 [ffff880078447e70] vfs_kern_mount at ffffffff8121ea8f #12 [ffff880078447ea8] do_mount at ffffffff81220fee #13 [ffff880078447f28] sys_mount at ffffffff812218d6 #14 [ffff880078447f80] system_call_fastpath at ffffffff81698c49 RIP: 00007fd9ea914e9a RSP: 00007ffd5d9bf648 RFLAGS: 00010246 RAX: 00000000000000a5 RBX: ffffffff81698c49 RCX: 0000000000000010 RDX: 00007fd9ec2bc210 RSI: 00007fd9ec2bc290 RDI: 00007fd9ec2bcf30 RBP: 0000000000000000 R8: 0000000000000000 R9: 0000000000000010 R10: 00000000c0ed0001 R11: 0000000000000206 R12: 00007fd9ec2bc040 R13: 00007fd9eb6b2380 R14: 00007fd9ec2bc210 R15: 00007fd9ec2bcf30 ORIG_RAX: 00000000000000a5 CS: 0033 SS: 002b This task was trying to mount the cdrom. It allocated and configured a super_block struct and owned the write-lock for the super_block->s_umount rwsem. While exclusively owning the s_umount lock, it called sr_block_ioctl and waited to acquire the global sr_mutex lock. PID: 6785 TASK: ffff880078720fb0 CPU: 0 COMMAND: "systemd-udevd" #0 [ffff880078417898] __schedule at ffffffff8168d605 #1 [ffff880078417900] schedule at ffffffff8168dc59 #2 [ffff880078417910] rwsem_down_read_failed at ffffffff8168f605 #3 [ffff880078417980] call_rwsem_down_read_failed at ffffffff81328838 #4 [ffff8800784179d0] down_read at ffffffff8168cde0 #5 [ffff8800784179e8] get_super at ffffffff81201cc7 #6 [ffff880078417a10] __invalidate_device at ffffffff8123a8de #7 [ffff880078417a40] flush_disk at ffffffff8123a94b #8 [ffff880078417a88] check_disk_change at ffffffff8123ab50 #9 [ffff880078417ab0] cdrom_open at ffffffffa00a29e1 [cdrom] #10 [ffff880078417b68] sr_block_open at ffffffffa00b6f9b [sr_mod] #11 [ffff880078417b98] __blkdev_get at ffffffff8123ba86 #12 [ffff880078417bf0] blkdev_get at ffffffff8123bd65 #13 [ffff880078417c78] blkdev_open at ffffffff8123bf9b #14 [ffff880078417c90] do_dentry_open at ffffffff811fc7f7 #15 [ffff880078417cd8] vfs_open at ffffffff811fc9cf #16 [ffff880078417d00] do_last at ffffffff8120d53d #17 [ffff880078417db0] path_openat at ffffffff8120e6b2 #18 [ffff880078417e48] do_filp_open at ffffffff8121082b #19 [ffff880078417f18] do_sys_open at ffffffff811fdd33 #20 [ffff880078417f70] sys_open at ffffffff811fde4e #21 [ffff880078417f80] system_call_fastpath at ffffffff81698c49 RIP: 00007f29438b0c20 RSP: 00007ffc76624b78 RFLAGS: 00010246 RAX: 0000000000000002 RBX: ffffffff81698c49 RCX: 0000000000000000 RDX: 00007f2944a5fa70 RSI: 00000000000a0800 RDI: 00007f2944a5fa70 RBP: 00007f2944a5f540 R8: 0000000000000000 R9: 0000000000000020 R10: 00007f2943614c40 R11: 0000000000000246 R12: ffffffff811fde4e R13: ffff880078417f78 R14: 000000000000000c R15: 00007f2944a4b010 ORIG_RAX: 0000000000000002 CS: 0033 SS: 002b This task tried to open the cdrom device, the sr_block_open function acquired the global sr_mutex lock. The call to check_disk_change() then saw an event flag indicating a possible media change and tried to flush any cached data for the device. As part of the flush, it tried to acquire the super_block->s_umount lock associated with the cdrom device. This was the same super_block as created and locked by the previous task. The first task acquires the s_umount lock and then the sr_mutex_lock; the second task acquires the sr_mutex_lock and then the s_umount lock. This patch fixes the issue by moving check_disk_change() out of cdrom_open() and let the caller take care of it. Signed-off-by: Maurizio Lombardi Signed-off-by: Jens Axboe drivers/block/paride/pcd.c | 2 ++ drivers/cdrom/cdrom.c | 3 --- drivers/cdrom/gdrom.c | 3 +++ drivers/ide/ide-cd.c | 2 ++ drivers/scsi/sr.c | 2 ++ 5 files changed, 9 insertions(+), 3 deletions(-) commit 0ee991be4cdd88587aedbf68cdacd1765f57236a Author: Gary R Hook Date: Wed Mar 7 11:37:42 2018 -0600 crypto: ccp - Fill the result buffer only on digest, finup, and final ops Any change to the result buffer should only happen on final, finup and digest operations. Changes to the buffer for update, import, export, etc, are not allowed. Fixes: 66d7b9f6175e ("crypto: testmgr - test misuse of result in ahash") Signed-off-by: Gary R Hook Cc: Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-crypto-aes-cmac.c | 2 +- drivers/crypto/ccp/ccp-crypto-sha.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9cc16b4d32f9f91dc7000aa726605a1add1899c7 Author: Wu Fengguang Date: Sat Mar 3 04:29:46 2018 +0800 crypto: x86/des3_ede - des3_ede_skciphers[] can be static Fixes: 09c0f03bf8ce ("crypto: x86/des3_ede - convert to skcipher interface") Signed-off-by: Fengguang Wu Acked-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/des3_ede_glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95ec01ba1ef01ffe3cfa755d3d61e24c863ed9b2 Author: James Bottomley Date: Thu Mar 1 14:37:42 2018 -0800 crypto: ecdh - fix to allow multi segment scatterlists Apparently the ecdh use case was in bluetooth which always has single element scatterlists, so the ecdh module was hard coded to expect them. Now we're using this in TPM, we need multi-element scatterlists, so remove this limitation. Signed-off-by: James Bottomley Signed-off-by: Herbert Xu crypto/ecdh.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit a7d85e06ed8033f263451f3aef4159024e7dae5f Author: James Bottomley Date: Thu Mar 1 14:36:17 2018 -0800 crypto: cfb - add support for Cipher FeedBack mode TPM security routines require encryption and decryption with AES in CFB mode, so add it to the Linux Crypto schemes. CFB is basically a one time pad where the pad is generated initially from the encrypted IV and then subsequently from the encrypted previous block of ciphertext. The pad is XOR'd into the plain text to get the final ciphertext. https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#CFB Signed-off-by: James Bottomley Signed-off-by: Herbert Xu crypto/Kconfig | 8 ++ crypto/Makefile | 1 + crypto/cfb.c | 353 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 362 insertions(+) commit 6584eacb7cc7885509d4a27120a48ae1e404dc4c Author: Krzysztof Kozlowski Date: Thu Mar 1 21:50:13 2018 +0100 crypto: s5p-sss - Constify pointed data (arguments and local variables) Improve the code (safety and readability) by indicating that data passed through pointer is not modified. This adds const keyword in many places, most notably: - the driver data (pointer to struct samsung_aes_variant), - scatterlist addresses written as value to device registers, - key and IV arrays. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu drivers/crypto/s5p-sss.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit 0e477c59ba7e1f5d3c3cfea4d4c282c722b47357 Author: Krzysztof Kozlowski Date: Thu Mar 1 21:50:12 2018 +0100 crypto: s5p-sss - Remove useless check for non-null request ahash_request 'req' argument passed by the caller s5p_hash_handle_queue() cannot be NULL here because it is obtained from non-NULL pointer via container_of(). This fixes smatch warning: drivers/crypto/s5p-sss.c:1213 s5p_hash_prepare_request() warn: variable dereferenced before check 'req' (see line 1208) Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu drivers/crypto/s5p-sss.c | 3 --- 1 file changed, 3 deletions(-) commit 17f5b19952ec9ea5e266d139a9f9360fd5b7c8ee Author: Krzysztof Kozlowski Date: Thu Mar 1 21:50:11 2018 +0100 crypto: omap-sham - Fix misleading indentation Commit 8043bb1ae03c ("crypto: omap-sham - convert driver logic to use sgs for data xmit") removed the if() clause leaving the statement as is. The intention was in that case to finish the request always so the goto instruction seems sensible. Remove the indentation to fix Smatch warning: drivers/crypto/omap-sham.c:1761 omap_sham_done_task() warn: inconsistent indenting Signed-off-by: Krzysztof Kozlowski Acked-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05a02578e51b899b3a4202d58ea27ae45abe6fd7 Author: Krzysztof Kozlowski Date: Thu Mar 1 21:50:10 2018 +0100 crypto: omap-sham - Remove useless check for non-null request ahash_request 'req' argument passed by the caller omap_sham_handle_queue() cannot be NULL here because it is obtained from non-NULL pointer via container_of(). This fixes smatch warning: drivers/crypto/omap-sham.c:812 omap_sham_prepare_request() warn: variable dereferenced before check 'req' (see line 805) Signed-off-by: Krzysztof Kozlowski Acked-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 3 --- 1 file changed, 3 deletions(-) commit 80862bd66a1e933ab9dbed7637c655f8437527ad Author: Atul Gupta Date: Wed Feb 28 23:18:08 2018 +0530 crypto: chelsio - no csum offload for ipsec path The Inline IPSec driver does not offload csum. Signed-off-by: Atul Gupta Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_ipsec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b166be0044913a4ce03564e7c81f172025d78867 Author: Gregory CLEMENT Date: Wed Feb 28 15:27:23 2018 +0100 hwrng: omap - Fix clock resource by adding a register clock On Armada 7K/8K we need to explicitly enable the register clock. This clock is optional because not all the SoCs using this IP need it but at least for Armada 7K/8K it is actually mandatory. The binding documentation is updating accordingly. Signed-off-by: Gregory CLEMENT Signed-off-by: Herbert Xu Documentation/devicetree/bindings/rng/omap_rng.txt | 7 ++++++- drivers/char/hw_random/omap-rng.c | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) commit 10bc320bc9d7f335651c7740b1c6034ba4bfc4f4 Author: Gregory CLEMENT Date: Wed Feb 28 15:27:22 2018 +0100 hwrng: omap - Remove useless test before clk_disable_unprepare clk_disable_unprepare() already checks that the clock pointer is valid. No need to test it before calling it. Signed-off-by: Gregory CLEMENT Signed-off-by: Herbert Xu drivers/char/hw_random/omap-rng.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 5007387fc016db6c4330fc702e08356b2afd71ce Author: Tero Kristo Date: Tue Feb 27 15:30:39 2018 +0200 crypto: omap-aes - make queue length configurable Crypto driver queue size can now be configured from userspace. This allows optimizing the queue usage based on use case. Default queue size is still 10 entries. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-aes.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 537c62ca128e28b0f25d4635932de1e9cddae739 Author: Tero Kristo Date: Tue Feb 27 15:30:38 2018 +0200 crypto: omap-aes - make fallback size configurable Crypto driver fallback size can now be configured from userspace. This allows optimizing the DMA usage based on use case. Detault fallback size of 200 is still used. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-aes.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) commit 62f7c708ff2f45ef4e6bffb1ae2e6ee2b0fc09c6 Author: Tero Kristo Date: Tue Feb 27 15:30:37 2018 +0200 crypto: omap-sham - make queue length configurable Crypto driver queue size can now be configured from userspace. This allows optimizing the queue usage based on use case. Default queue size is still 10 entries. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit c9af5995d5a84ca191b0ec5514cc385715d89171 Author: Tero Kristo Date: Tue Feb 27 15:30:36 2018 +0200 crypto: omap-sham - make fallback size configurable Crypto driver fallback size can now be configured from userspace. This allows optimizing the DMA usage based on use case. Default fallback size of 256 is still used. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 56 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 3 deletions(-) commit 065fa2523da83c674d8533144d9c9bac986ccf80 Author: Tero Kristo Date: Tue Feb 27 15:30:35 2018 +0200 crypto: omap-crypto - Verify page zone scatterlists before starting DMA In certain platforms like DRA7xx having memory > 2GB with LPAE enabled has a constraint that DMA can be done with the initial 2GB and marks it as ZONE_DMA. But openssl when used with cryptodev does not make sure that input buffer is DMA capable. So, adding a check to verify if the input buffer is capable of DMA. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-crypto.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4c219855a595d0af599b1f9558ccfc8a0d812e2b Author: Tero Kristo Date: Tue Feb 27 15:30:34 2018 +0200 crypto: omap-sham - Verify page zone of scatterlists before starting DMA In certain platforms like DRA7xx having memory > 2GB with LPAE enabled has a constraint that DMA can be done with the initial 2GB and marks it as ZONE_DMA. But openssl when used with cryptodev does not make sure that input buffer is DMA capable. So, adding a check to verify if the input buffer is capable of DMA. Signed-off-by: Tero Kristo Reported-by: Aparna Balasubramanian Reviewed-by: Lokesh Vutla Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6a4967c3e1fc1f2fd19283e5c98076a65f7b29ff Author: LEROY Christophe Date: Mon Feb 26 17:40:06 2018 +0100 crypto: talitos - do not perform unnecessary dma synchronisation req_ctx->hw_context is mainly used only by the HW. So it is not needed to sync the HW and the CPU each time hw_context in DMA mapped. This patch modifies the DMA mapping in order to limit synchronisation to necessary situations. Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 85 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 63 insertions(+), 22 deletions(-) commit ad4cd51fb8375109edb377712b5f9c0c31ece33e Author: LEROY Christophe Date: Mon Feb 26 17:40:04 2018 +0100 crypto: talitos - don't persistently map req_ctx->hw_context and req_ctx->buf Commit 49f9783b0cea ("crypto: talitos - do hw_context DMA mapping outside the requests") introduced a persistent dma mapping of req_ctx->hw_context Commit 37b5e8897eb5 ("crypto: talitos - chain in buffered data for ahash on SEC1") introduced a persistent dma mapping of req_ctx->buf As there is no destructor for req_ctx (the request context), the associated dma handlers where set in ctx (the tfm context). This is wrong as several hash operations can run with the same ctx. This patch removes this persistent mapping. Reported-by: Horia Geanta Cc: Fixes: 49f9783b0cea ("crypto: talitos - do hw_context DMA mapping outside the requests") Fixes: 37b5e8897eb5 ("crypto: talitos - chain in buffered data for ahash on SEC1") Signed-off-by: Christophe Leroy Tested-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 132 ++++++++++++++++------------------------------- 1 file changed, 44 insertions(+), 88 deletions(-) commit cf03868711f701f83ca3c28aa086c7eacf6c010e Author: Colin Ian King Date: Mon Feb 26 14:51:19 2018 +0000 hwrng: cavium - make two functions static Functions cavium_rng_remove and cavium_rng_remove_vf are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: drivers/char/hw_random/cavium-rng-vf.c:80:7: warning: symbol 'cavium_rng_remove_vf' was not declared. Should it be static? drivers/char/hw_random/cavium-rng.c:65:7: warning: symbol 'cavium_rng_remove' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu drivers/char/hw_random/cavium-rng-vf.c | 2 +- drivers/char/hw_random/cavium-rng.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4dc5475ae0375ea4f9283dfd9b2ddc91b20d4c4b Author: Antoine Tenart Date: Mon Feb 26 14:45:12 2018 +0100 crypto: inside-secure - wait for the request to complete if in the backlog This patch updates the safexcel_hmac_init_pad() function to also wait for completion when the digest return code is -EBUSY, as it would mean the request is in the backlog to be processed later. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Suggested-by: Ofer Heifetz Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cff9a17545a3c64e91ea913245eae41d28f51d8d Author: Antoine Tenart Date: Mon Feb 26 14:45:11 2018 +0100 crypto: inside-secure - move cache result dma mapping to request In heavy traffic the DMA mapping is overwritten by multiple requests as the DMA address is stored in a global context. This patch moves this information to the per-hash request context so that it can't be overwritten. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 14 ---------- drivers/crypto/inside-secure/safexcel.h | 7 ----- drivers/crypto/inside-secure/safexcel_hash.c | 42 ++++++++++++---------------- 3 files changed, 18 insertions(+), 45 deletions(-) commit b859202722f8fd046384073e01e68a0742a5553f Author: Ofer Heifetz Date: Mon Feb 26 14:45:10 2018 +0100 crypto: inside-secure - move hash result dma mapping to request In heavy traffic the DMA mapping is overwritten by multiple requests as the DMA address is stored in a global context. This patch moves this information to the per-hash request context so that it can't be overwritten. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Signed-off-by: Ofer Heifetz [Antoine: rebased the patch, small fixes, commit message.] Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 7 +------ drivers/crypto/inside-secure/safexcel.h | 4 +--- drivers/crypto/inside-secure/safexcel_hash.c | 17 ++++++++++++----- 3 files changed, 14 insertions(+), 14 deletions(-) commit af40ff687bc9d351030685fde2f57ba45ab4fc14 Author: Dave Martin Date: Thu Mar 8 17:41:05 2018 +0000 arm64: signal: Ensure si_code is valid for all fault signals Currently, as reported by Eric, an invalid si_code value 0 is passed in many signals delivered to userspace in response to faults and other kernel errors. Typically 0 is passed when the fault is insufficiently diagnosable or when there does not appear to be any sensible alternative value to choose. This appears to violate POSIX, and is intuitively wrong for at least two reasons arising from the fact that 0 == SI_USER: 1) si_code is a union selector, and SI_USER (and si_code <= 0 in general) implies the existence of a different set of fields (siginfo._kill) from that which exists for a fault signal (siginfo._sigfault). However, the code raising the signal typically writes only the _sigfault fields, and the _kill fields make no sense in this case. Thus when userspace sees si_code == 0 (SI_USER) it may legitimately inspect fields in the inactive union member _kill and obtain garbage as a result. There appears to be software in the wild relying on this, albeit generally only for printing diagnostic messages. 2) Software that wants to be robust against spurious signals may discard signals where si_code == SI_USER (or <= 0), or may filter such signals based on the si_uid and si_pid fields of siginfo._sigkill. In the case of fault signals, this means that important (and usually fatal) error conditions may be silently ignored. In practice, many of the faults for which arm64 passes si_code == 0 are undiagnosable conditions such as exceptions with syndrome values in ESR_ELx to which the architecture does not yet assign any meaning, or conditions indicative of a bug or error in the kernel or system and thus that are unrecoverable and should never occur in normal operation. The approach taken in this patch is to translate all such undiagnosable or "impossible" synchronous fault conditions to SIGKILL, since these are at least probably localisable to a single process. Some of these conditions should really result in a kernel panic, but due to the lack of diagnostic information it is difficult to be certain: this patch does not add any calls to panic(), but this could change later if justified. Although si_code will not reach userspace in the case of SIGKILL, it is still desirable to pass a nonzero value so that the common siginfo handling code can detect incorrect use of si_code == 0 without false positives. In this case the si_code dependent siginfo fields will not be correctly initialised, but since they are not passed to userspace I deem this not to matter. A few faults can reasonably occur in realistic userspace scenarios, and _should_ raise a regular, handleable (but perhaps not ignorable/blockable) signal: for these, this patch attempts to choose a suitable standard si_code value for the raised signal in each case instead of 0. arm64 was the only arch to define a BUS_FIXME code, so after this patch nobody defines it. This patch therefore also removes the relevant code from siginfo_layout(). Cc: James Morse Reported-by: Eric W. Biederman Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/include/uapi/asm/siginfo.h | 14 ---- arch/arm64/kernel/fpsimd.c | 2 +- arch/arm64/mm/fault.c | 116 +++++++++++++++++----------------- kernel/signal.c | 4 -- 4 files changed, 59 insertions(+), 77 deletions(-) commit 6ae4b6e0578886eb36cedbf99f04031d93f9e315 Author: Shanker Donthineni Date: Wed Mar 7 09:00:08 2018 -0600 arm64: Add support for new control bits CTR_EL0.DIC and CTR_EL0.IDC The DCache clean & ICache invalidation requirements for instructions to be data coherence are discoverable through new fields in CTR_EL0. The following two control bits DIC and IDC were defined for this purpose. No need to perform point of unification cache maintenance operations from software on systems where CPU caches are transparent. This patch optimize the three functions __flush_cache_user_range(), clean_dcache_area_pou() and invalidate_icache_range() if the hardware reports CTR_EL0.IDC and/or CTR_EL0.IDC. Basically it skips the two instructions 'DC CVAU' and 'IC IVAU', and the associated loop logic in order to avoid the unnecessary overhead. CTR_EL0.DIC: Instruction cache invalidation requirements for instruction to data coherence. The meaning of this bit[29]. 0: Instruction cache invalidation to the point of unification is required for instruction to data coherence. 1: Instruction cache cleaning to the point of unification is not required for instruction to data coherence. CTR_EL0.IDC: Data cache clean requirements for instruction to data coherence. The meaning of this bit[28]. 0: Data cache clean to the point of unification is required for instruction to data coherence, unless CLIDR_EL1.LoC == 0b000 or (CLIDR_EL1.LoUIS == 0b000 && CLIDR_EL1.LoUU == 0b000). 1: Data cache clean to the point of unification is not required for instruction to data coherence. Co-authored-by: Philip Elcan Reviewed-by: Mark Rutland Signed-off-by: Shanker Donthineni Signed-off-by: Will Deacon arch/arm64/include/asm/cache.h | 4 ++++ arch/arm64/include/asm/cacheflush.h | 3 +++ arch/arm64/include/asm/cpucaps.h | 4 +++- arch/arm64/kernel/cpufeature.c | 36 ++++++++++++++++++++++++++++++------ arch/arm64/mm/cache.S | 21 ++++++++++++++++++++- 5 files changed, 60 insertions(+), 8 deletions(-) commit b2ed33a895676738dfad11cedcba1e3a0a8b6203 Author: Matt Redfearn Date: Tue Feb 20 09:58:16 2018 +0000 MIPS: pm-cps: Block system suspend when a JTAG probe is present If a JTAG probe is connected to a MIPS cluster, then the CPC detects it and latches the CPC.STAT_CONF.EJTAG_PROBE bit to 1. While set, attempting to send a power-down command to a core will be blocked, and the CPC will instead send the core to clock-off state. This can interfere with systems fully entering a low power state where all cores, CM, GIC, etc are powered down. Detect that a JTAG probe is / has been connected to the cluster and block the suspend attempt. Attempting to suspend the system while a JTAG probe is connected now yields: # echo mem > /sys/power/state [ 11.654000] PM: Syncing filesystems ... done. [ 11.658000] JTAG probe is connected - abort suspend -sh: echo: write error: Operation not permitted # To restore suspend, the JTAG probe should be disconnected or put into quiescent state. Platform code can then clear the CPC.STAT_CONF.EJTAG_PROBE bit. Reported-by: Ed Blake Signed-off-by: Matt Redfearn Cc: Ralf Baechle Cc: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18641/ Signed-off-by: James Hogan arch/mips/kernel/pm-cps.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit ca79acca273630935f2cfdfdf3fc7425ff51ce1c Author: Ard Biesheuvel Date: Tue Mar 6 17:15:35 2018 +0000 arm64/kernel: enable A53 erratum #8434319 handling at runtime Omit patching of ADRP instruction at module load time if the current CPUs are not susceptible to the erratum. Signed-off-by: Ard Biesheuvel [will: Drop duplicate initialisation of .def_scope field] Signed-off-by: Will Deacon arch/arm64/include/asm/cpucaps.h | 3 ++- arch/arm64/kernel/cpu_errata.c | 9 +++++++++ arch/arm64/kernel/module-plts.c | 3 ++- arch/arm64/kernel/module.c | 1 + 4 files changed, 14 insertions(+), 2 deletions(-) commit e8002e02abf052c07bb87b867789034bc79aac10 Author: Ard Biesheuvel Date: Tue Mar 6 17:15:34 2018 +0000 arm64/errata: add REVIDR handling to framework In some cases, core variants that are affected by a certain erratum also exist in versions that have the erratum fixed, and this fact is recorded in a dedicated bit in system register REVIDR_EL1. Since the architecture does not require that a certain bit retains its meaning across different variants of the same model, each such REVIDR bit is tightly coupled to a certain revision/variant value, and so we need a list of revidr_mask/midr pairs to carry this information. So add the struct member and the associated macros and handling to allow REVIDR fixes to be taken into account. Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 4 ++++ arch/arm64/kernel/cpu_errata.c | 21 ++++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) commit a257e02579e42703de1b7825cbd56cd7191f97b0 Author: Ard Biesheuvel Date: Tue Mar 6 17:15:33 2018 +0000 arm64/kernel: don't ban ADRP to work around Cortex-A53 erratum #843419 Working around Cortex-A53 erratum #843419 involves special handling of ADRP instructions that end up in the last two instruction slots of a 4k page, or whose output register gets overwritten without having been read. (Note that the latter instruction sequence is never emitted by a properly functioning compiler, which is why it is disregarded by the handling of the same erratum in the bfd.ld linker which we rely on for the core kernel) Normally, this gets taken care of by the linker, which can spot such sequences at final link time, and insert a veneer if the ADRP ends up at a vulnerable offset. However, linux kernel modules are partially linked ELF objects, and so there is no 'final link time' other than the runtime loading of the module, at which time all the static relocations are resolved. For this reason, we have implemented the #843419 workaround for modules by avoiding ADRP instructions altogether, by using the large C model, and by passing -mpc-relative-literal-loads to recent versions of GCC that may emit adrp/ldr pairs to perform literal loads. However, this workaround forces us to keep literal data mixed with the instructions in the executable .text segment, and literal data may inadvertently turn into an exploitable speculative gadget depending on the relative offsets of arbitrary symbols. So let's reimplement this workaround in a way that allows us to switch back to the small C model, and to drop the -mpc-relative-literal-loads GCC switch, by patching affected ADRP instructions at runtime: - ADRP instructions that do not appear at 4k relative offset 0xff8 or 0xffc are ignored - ADRP instructions that are within 1 MB of their target symbol are converted into ADR instructions - remaining ADRP instructions are redirected via a veneer that performs the load using an unaffected movn/movk sequence. Signed-off-by: Ard Biesheuvel [will: tidied up ADRP -> ADR instruction patching.] [will: use ULL suffix for 64-bit immediate] Signed-off-by: Will Deacon arch/arm64/Kconfig | 11 ++--- arch/arm64/Makefile | 5 --- arch/arm64/include/asm/module.h | 2 + arch/arm64/kernel/module-plts.c | 86 +++++++++++++++++++++++++++++++++++-- arch/arm64/kernel/module.c | 34 +++++++++++++-- arch/arm64/kernel/reloc_test_core.c | 4 +- arch/arm64/kernel/reloc_test_syms.S | 12 ++++-- 7 files changed, 130 insertions(+), 24 deletions(-) commit a265b03bd29a745d85237f47739d92cb43d214b9 Author: Alexander Monakov Date: Fri Mar 9 01:53:03 2018 +0300 regulator: 88pg86x: new i2c dual regulator chip This chip is found on Google Chromecast and Valve Steam Link devices. It provides two DC regulators with I2C voltage control, separate GPIO enable pins and one sleep mode pin. This driver does not expose GPIO functionality, but supports voltage control in 1.0-2.2V range, based on I2C register information given in Chromecast kernel driver by Jisheng Zhang. Cc: Jisheng Zhang Signed-off-by: Alexander Monakov Signed-off-by: Mark Brown drivers/regulator/88pg86x.c | 114 ++++++++++++++++++++++++++++++++++++++++++++ drivers/regulator/Kconfig | 9 ++++ drivers/regulator/Makefile | 1 + 3 files changed, 124 insertions(+) commit 2a254de29e995ea58d73f75b69016cf913a5447d Author: Alexander Monakov Date: Fri Mar 9 01:53:02 2018 +0300 regulator: 88pg86x: add DT bindings document The only device-specific node names are "buck1" and "buck2" for the two regulators present on the device. Sleep mode GPIO and per-regulator GPIO enable pins are not exposed (the driver does not support them either). Signed-off-by: Alexander Monakov Signed-off-by: Mark Brown .../devicetree/bindings/regulator/88pg86x.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 641eea3f8b95a47d5e5db28dd92a0f586cd85390 Author: Steven Eckhoff Date: Thu Mar 8 21:13:40 2018 -0600 ASoC: TSCS42xx: Add missing headers Add missing headers Signed-off-by: Steven Eckhoff Signed-off-by: Mark Brown sound/soc/codecs/tscs42xx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit f59125248a691dfef62f0450ce7b0238b63b6dbd Author: Sergei Shtylyov Date: Thu Mar 8 22:14:32 2018 +0300 pinctrl: sh-pfc: Add R8A77980 PFC support Add the PFC support for the R8A77980 SoC including pin groups for some on-chip devices such as AVB, CAN-FD, GETHER, [H]SCIF, I2C, INTC-EX, MMC, MSIOF, PWM, and VIN... Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Rob Herring Signed-off-by: Geert Uytterhoeven .../bindings/pinctrl/renesas,pfc-pinctrl.txt | 1 + drivers/pinctrl/sh-pfc/Kconfig | 5 + drivers/pinctrl/sh-pfc/Makefile | 1 + drivers/pinctrl/sh-pfc/core.c | 6 + drivers/pinctrl/sh-pfc/pfc-r8a77980.c | 2799 ++++++++++++++++++++ drivers/pinctrl/sh-pfc/sh_pfc.h | 1 + 6 files changed, 2813 insertions(+) commit c21a3e30e88bd2084891a2c4cf6278ebc5304dcb Author: Sergei Shtylyov Date: Thu Mar 8 22:12:47 2018 +0300 pinctrl: sh-pfc: Add PORT_GP_CFG_25() helper macro They follow the style of the existing PORT_GP_CFG_() macros and will be used by a follow-up patch for the R8A77980 SoC. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/sh_pfc.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f7e73b26aea58003931e2f3925d9c01f6b6c4c4d Author: Mark Brown Date: Fri Mar 9 12:46:27 2018 +0000 ASoC: core: Fix typo roup->group Signed-off-by: Mark Brown sound/soc/soc-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 07d2206ed73973916602d2b141629e04e9843c58 Author: Mikko Perttunen Date: Thu Nov 16 13:46:52 2017 +0200 arm64: defconfig: Enable CONFIG_TEGRA_BPMP_THERMAL Enable Tegra BPMP thermal sensor support by default, built as a module. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 317ccc727b06b6459fe0dd32b95b5e8c898402f6 Author: Mikko Perttunen Date: Thu Nov 16 13:46:51 2017 +0200 arm64: defconfig: Enable CONFIG_ARM_TEGRA186_CPUFREQ Enable Tegra186 CPU frequency scaling support by default. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit a9cee1764b6fa97f2b4cd0210b1a125fef2e7169 Author: Kyle Spiers Date: Thu Mar 8 17:28:43 2018 -0800 reiserfs: Remove VLA from fs/reiserfs/reiserfs.h Remove Variable Length Array from fs/reiserfs/reiserfs.h. EMPTY_DIR_SIZE is used as an array size and as it is using strlen() it need not be evaluated at compile time. Change it's definition to use sizeof() to force evaluation of array length at compile time. Signed-off-by: Kyle Spiers Signed-off-by: Jan Kara fs/reiserfs/reiserfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc0775da8e60d38c234c1e2c13470cc7c2198018 Author: Fabio Estevam Date: Tue Feb 13 16:36:49 2018 -0200 drm/etnaviv: etnaviv_sched: Staticize functions when possible etnaviv_sched_dependency() and etnaviv_sched_run_job() are only used in this file, so make them static. This fixes the following sparse warnings: drivers/gpu/drm/etnaviv/etnaviv_sched.c:30:18: warning: symbol 'etnaviv_sched_dependency' was not declared. Should it be static? drivers/gpu/drm/etnaviv/etnaviv_sched.c:81:18: warning: symbol 'etnaviv_sched_run_job' was not declared. Should it be static? Signed-off-by: Fabio Estevam Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_sched.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f8433f9e1066363582e49eda0d6ddeaa08a842ca Author: Lucas Stach Date: Mon Jan 22 12:38:52 2018 +0100 drm/etnaviv: add PTA handling to MMUv2 The Page Table Array is a new first level structure above the MTLB availabale on GPUs with the security feature. Use the PTa to set up the MMU when the security related states are handled by the kernel driver. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c | 76 +++++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) commit ce6828faeb543d00f0697997c858bd82b5905670 Author: Matt Redfearn Date: Mon Feb 26 17:02:45 2018 +0000 MIPS: VDSO: Replace __mips_isa_rev with MIPS_ISA_REV Remove the need to check that __mips_isa_rev is defined by using the newly added MIPS_ISA_REV. Signed-off-by: Matt Redfearn Cc: Ralf Baechle Cc: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18678/ Signed-off-by: James Hogan arch/mips/vdso/elf.S | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 13b8638ba09896b94c5b7eea54c8db75f13edcdb Author: Matt Redfearn Date: Mon Feb 26 17:02:44 2018 +0000 MIPS: BPF: Replace __mips_isa_rev with MIPS_ISA_REV Remove the need to check that __mips_isa_rev is defined by using the newly added MIPS_ISA_REV. Signed-off-by: Matt Redfearn Cc: Ralf Baechle Cc: Paul Burton Cc: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18677/ Signed-off-by: James Hogan arch/mips/net/bpf_jit_asm.S | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 18ba210a29d08ea96025cb9d19c2eebf65846330 Author: Matt Redfearn Date: Mon Feb 26 17:02:43 2018 +0000 MIPS: cpu-features.h: Replace __mips_isa_rev with MIPS_ISA_REV Remove the need to check that __mips_isa_rev is defined by using the newly added MIPS_ISA_REV. Signed-off-by: Matt Redfearn Cc: Ralf Baechle Cc: Paul Burton Cc: "Maciej W. Rozycki" Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18675/ Signed-off-by: James Hogan arch/mips/include/asm/cpu-features.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1690905240fd45cc04e873312df8574631c9f595 Author: Matt Redfearn Date: Mon Feb 26 17:02:42 2018 +0000 MIPS: Introduce isa-rev.h to define MIPS_ISA_REV There are multiple instances in the kernel where we need to include or exclude particular instructions based on the ISA revision of the target processor. For MIPS32 / MIPS64, the compiler exports a __mips_isa_rev define. However, when targeting MIPS I - V, this define is absent. This leads to each use of __mips_isa_rev having to check that it is defined first. To simplify this, introduce the isa-rev.h header which always exports MIPS_ISA_REV. The name is changed so as to avoid confusion with the compiler builtin and to avoid accidentally using the builtin. MIPS_ISA_REV is defined to the compilers builtin if provided, or 0, which satisfies all current usages. Suggested-by: Paul Burton Signed-off-by: Matt Redfearn Reviewed-by: Maciej W. Rozycki Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18676/ Signed-off-by: James Hogan arch/mips/include/asm/isa-rev.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 997e93d4df165202f2ee36a48f7aca172ff8b48a Author: Paul Burton Date: Wed Aug 23 13:53:16 2017 -0700 MIPS: Hang more efficiently on halt/powerdown/restart The generic MIPS implementations of halting, powering down or restarting the system all hang using a busy loop as a last resort. We have many platforms which avoid this loop by implementing their own, many using some variation upon executing a wait instruction to lower CPU power usage if we reach this point. In order to prepare for cleaning up these various custom implementations of the same thing, this patch makes the generic machine_halt(), machine_power_off() & machine_restart() functions each make use of the wait instruction to lower CPU power usage in cases where we know that the wait instruction is available. If wait isn't known to be supported then we fall back to calling cpu_wait(), and if we don't have a cpu_wait() callback then we effectively continue using a busy loop. In effect the new machine_hang() function provides a superset of the functionality that the various platforms currently provide differing subsets of. Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17178/ Signed-off-by: James Hogan arch/mips/kernel/reset.c | 68 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 6 deletions(-) commit 1137bef67a11d2e5a4f44ce87b6e4dd1fb7a0163 Author: Lucas Stach Date: Mon Jan 22 12:28:10 2018 +0100 drm/etnaviv: add function to load the initial PTA state On GPUs with the security feature the MTLB config is stored in the PTA. Add a function to trigger the initial PTA load through the FE. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 18 ++++++++++++++++++ drivers/gpu/drm/etnaviv/etnaviv_drv.h | 1 + 2 files changed, 19 insertions(+) commit c997c3df0e89f710f2d7ad9197e5e3c5e3ecc4e4 Author: Lucas Stach Date: Mon Jan 22 16:18:16 2018 +0100 drm/etnaviv: handle security states GPUs with support for the security features need some additional setup to get the frontend started. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 48 +++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 5 deletions(-) commit 007ad58dd3cd77d97b293020989298b09320fe53 Author: Lucas Stach Date: Mon Jan 22 12:35:14 2018 +0100 drm/etnaviv: add security handling mode enum With the introduction of GPU security we have 3 different modes of GPU operation: - GPU core doesn't have security features -> no handling required - the security related states are handled by the kernel driver - the security related states are handled by a TrustZone application Add a enum to differentiate between the different operation modes. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 681c19c8bf34df58e6705ba4c1a1676474ef7799 Author: Lucas Stach Date: Mon Jan 22 15:57:59 2018 +0100 drm/etnaviv: add hardware database New versions of the Vivante kernel driver don't trust the hardware feature bits anymore, but use an internal hardware database. This also includes more feature fields than are available in hardware. As we can't trust the hardware feature bits to be correct anymore, we need to replicate the HWDB in etanviv. For now only the GC7000L as found on the i.MX8M is supported. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/Makefile | 1 + drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 7 ++++ drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 1 + drivers/gpu/drm/etnaviv/etnaviv_hwdb.c | 65 ++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+) commit 0538aaf927b205662a3f3d641ecbc8b0f3236e2a Author: Lucas Stach Date: Mon Jan 22 15:56:11 2018 +0100 drm/etnaviv: add more minor features fields Newer GPU cores added yet more feature bits. Make room for them and let userspace query them. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 36 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 16 ++++++---------- include/uapi/drm/etnaviv_drm.h | 6 ++++++ 3 files changed, 48 insertions(+), 10 deletions(-) commit 059ad7316d6bb5e972002069160580ff3d0aa2fb Author: Lucas Stach Date: Mon Jan 22 12:11:16 2018 +0100 drm/etnaviv: update hardware headers from rnndb Update the state HI and common header from rnndb commit 8478eef32fd9 (rnndb: document secure GPU reset bit). Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/common.xml.h | 281 +++++++++++++++++++++++++------- drivers/gpu/drm/etnaviv/state.xml.h | 256 +++++++++++++++++++++++------ drivers/gpu/drm/etnaviv/state_3d.xml.h | 5 + drivers/gpu/drm/etnaviv/state_blt.xml.h | 52 ++++++ drivers/gpu/drm/etnaviv/state_hi.xml.h | 150 +++++++++++++++-- 5 files changed, 617 insertions(+), 127 deletions(-) commit 65f037e8e9085b9d6d76e5894c1e5353602202be Author: Lucas Stach Date: Fri Jan 19 15:05:40 2018 +0100 drm/etnaviv: add support for slave interface clock The slave interface clock is a clock input found on newer cores to gate the register interface. For now we simply ungate it when the GPU is in active state. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 13 +++++++++++++ drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 1 + 2 files changed, 14 insertions(+) commit 4df3000ebcc43af39e3312e2c0d084dcd625c758 Author: Lucas Stach Date: Fri Jan 19 12:22:30 2018 +0100 drm/etnaviv: split out and optimize MMU fault dumping Split out the fault dumping, as this will get more complex in the future. Also there is no need to read and dump the fault address from MMUs that didn't signal a fault. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit 4d73b73ff7943c92e8bcb65fece8caa70c24db87 Author: Andy Shevchenko Date: Thu Dec 21 16:40:55 2017 +0200 FIRMWARE: bcm47xx_nvram: Replace mac address parsing Replace sscanf() with mac_pton(). Signed-off-by: Andy Shevchenko Acked-by: Hauke Mehrtens Cc: David S. Miller Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17982/ Signed-off-by: James Hogan drivers/firmware/broadcom/Kconfig | 1 + drivers/firmware/broadcom/bcm47xx_sprom.c | 18 +++--------------- 2 files changed, 4 insertions(+), 15 deletions(-) commit 82b691bedf05f258f1c86c96ee574b0d7795c0a1 Author: Ingo Molnar Date: Tue Feb 27 17:48:08 2018 +0100 softirq: Consolidate common code in tasklet_[hi]_action() tasklet_action() + tasklet_hi_action() are almost identical. Move the common code from both function into __tasklet_action_common() and let both functions invoke it with different arguments. [ bigeasy: Splitted out from RT's "tasklet: Prevent tasklets from going into infinite spin in RT" and added commit message] Signed-off-by: Ingo Molnar Signed-off-by: Steven Rostedt Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Cc: Julia Cartwright Link: https://lkml.kernel.org/r/20180227164808.10093-3-bigeasy@linutronix.de kernel/softirq.c | 54 +++++++++++++++--------------------------------------- 1 file changed, 15 insertions(+), 39 deletions(-) commit 6498ddad301c7a94162915d06d1efe2e5d20f6dc Author: Ingo Molnar Date: Tue Feb 27 17:48:07 2018 +0100 softirq: Consolidate common code in __tasklet_[hi]_schedule() __tasklet_schedule() and __tasklet_hi_schedule() are almost identical. Move the common code from both function into __tasklet_schedule_common() and let both functions invoke it with different arguments. [ bigeasy: Splitted out from RT's "tasklet: Prevent tasklets from going into infinite spin in RT" and added commit message. Use this_cpu_ptr(headp) in __tasklet_schedule_common() as suggested by Julia Cartwright ] Signed-off-by: Ingo Molnar Signed-off-by: Steven Rostedt Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Cc: Julia Cartwright Link: https://lkml.kernel.org/r/20180227164808.10093-2-bigeasy@linutronix.de kernel/softirq.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit f09777fa891327ee0dd892e83619f156bf1c37e6 Author: Bartosz Golaszewski Date: Sun Mar 4 13:10:18 2018 +0100 genirq/irq_sim: Return the base of the irq range from irq_sim_init() Returning the base of the allocated interrupt range from irq_sim_init() and devm_irq_sim_init() allows users to handle the logic of associating irq numbers with any other driver-specific resources without having to use irq_sim_irqnum(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Link: https://lkml.kernel.org/r/20180304121018.640-4-brgl@bgdev.pl kernel/irq/irq_sim.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 28b6afa7d4456e759031bf83706b4be3689fba94 Author: Bartosz Golaszewski Date: Sun Mar 4 13:10:17 2018 +0100 genirq/irq_sim: Check the return value of irq_sim_init() for error codes As discussed with Marc Zyngier: irq_sim_init() and its devres variant should return the base of the allocated interrupt range on success rather than 0. Make devm_irq_sim_init() check for an error code. This is a preparatory change for modifying irq_sim_init() itself. Signed-off-by: Bartosz Golaszewski Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Link: https://lkml.kernel.org/r/20180304121018.640-3-brgl@bgdev.pl kernel/irq/irq_sim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34a866bd45d69754da1979e83a37bec6defc6295 Author: Bartosz Golaszewski Date: Sun Mar 4 13:10:16 2018 +0100 genirq/irq_sim: Explicitly include slab.h kfree() is used in the irq_sim code but slab.h is pulled in indirectly via irq.h. Include it explicitly. Signed-off-by: Bartosz Golaszewski Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Link: https://lkml.kernel.org/r/20180304121018.640-2-brgl@bgdev.pl kernel/irq/irq_sim.c | 1 + 1 file changed, 1 insertion(+) commit 4bac471da0d6bab6094c42cf82e08280f361fd31 Author: Radion Mirchevsky Date: Wed Oct 4 16:43:43 2017 +0300 thunderbolt: Add support for Intel Titan Ridge Intel Titan Ridge is the next Thunderbolt 3 controller. The ICM firmware message format in Titan Ridge differs from Falcon Ridge and Alpine Ridge somewhat because it is using route strings addressing devices. In addition to that the DMA port of 4-channel (two port) controller is in different port number than the previous controllers. There are some other minor differences as well. This patch add support for Intel Titan Ridge and the new ICM firmware message format. Signed-off-by: Radion Mirchevsky Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko drivers/thunderbolt/dma_port.c | 28 ++- drivers/thunderbolt/icm.c | 382 +++++++++++++++++++++++++++++++++++++++++ drivers/thunderbolt/nhi.c | 2 + drivers/thunderbolt/nhi.h | 5 + drivers/thunderbolt/switch.c | 3 + drivers/thunderbolt/tb_msgs.h | 141 +++++++++++++++ 6 files changed, 546 insertions(+), 15 deletions(-) commit 6fc14e1a44e53c472865252b47398346a27d600e Author: Mika Westerberg Date: Fri Dec 8 14:11:39 2017 +0300 thunderbolt: Introduce USB only (SL4) security level This new security level works so that it creates one PCIe tunnel to the connected Thunderbolt dock, removing PCIe links downstream of the dock. This leaves only the internal USB controller visible. Display Port tunnels are created normally. While there make sure security sysfs attribute returns "unknown" for any future security level. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Documentation/ABI/testing/sysfs-bus-thunderbolt | 3 +++ Documentation/admin-guide/thunderbolt.rst | 15 ++++++++++----- drivers/thunderbolt/domain.c | 7 ++++++- include/linux/thunderbolt.h | 4 ++++ 4 files changed, 23 insertions(+), 6 deletions(-) commit 9aaa3b8b4c56d24210acef37b7c800ca218c3d40 Author: Mika Westerberg Date: Sun Jan 21 12:08:04 2018 +0200 thunderbolt: Add support for preboot ACL Preboot ACL is a mechanism that allows connecting Thunderbolt devices boot time in more secure way than the legacy Thunderbolt boot support. As with the legacy boot option, this also needs to be enabled from the BIOS before booting is allowed. Difference to the legacy mode is that the userspace software explicitly adds device UUIDs by sending a special message to the ICM firmware. Only the devices listed in the boot ACL are connected automatically during the boot. This works in both "user" and "secure" security levels. We implement this in Linux by exposing a new sysfs attribute (boot_acl) below each Thunderbolt domain. The userspace software can then update the full list as needed. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Documentation/ABI/testing/sysfs-bus-thunderbolt | 23 ++++ drivers/thunderbolt/domain.c | 123 ++++++++++++++++++ drivers/thunderbolt/icm.c | 158 ++++++++++++++++++++++-- drivers/thunderbolt/tb.h | 4 + drivers/thunderbolt/tb_msgs.h | 35 +++++- include/linux/thunderbolt.h | 2 + 6 files changed, 335 insertions(+), 10 deletions(-) commit 14862ee308bbcaae0ac9927b6cbccccb51386b6c Author: Yehezkel Bernat Date: Mon Jan 22 12:50:09 2018 +0200 thunderbolt: Add 'boot' attribute for devices In various cases, Thunderbolt device can be connected by ICM on boot without waiting for approval from user. Most cases are related to OEM-specific BIOS configurations. This information is interesting for user-space as if the device isn't in SW ACL, it may create a friction in the user experience where the device is automatically authorized if it's connected on boot but requires an explicit user action if connected after OS is up. User-space can use this information to suggest adding the device to SW ACL for auto-authorization on later connections. Signed-off-by: Yehezkel Bernat Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Documentation/ABI/testing/sysfs-bus-thunderbolt | 7 +++++++ drivers/thunderbolt/icm.c | 12 ++++++++---- drivers/thunderbolt/switch.c | 14 ++++++++++++++ drivers/thunderbolt/tb.h | 2 ++ drivers/thunderbolt/tb_msgs.h | 1 + 5 files changed, 32 insertions(+), 4 deletions(-) commit 3080e197e936ab7cdcf66cacec22abe5c6c1007a Author: Mika Westerberg Date: Fri Oct 6 18:14:13 2017 +0300 thunderbolt: Move driver ready handling to struct icm Intel Titan Ridge uses slightly different format for ICM driver ready response, so add a new ->driver_ready() callback to struct icm and move the existing handling to a separate function which we then use in Falcon Ridge and Alpine Ridge. No functional changes intended. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko drivers/thunderbolt/icm.c | 42 +++++++++++++++++++++++++++++++----------- drivers/thunderbolt/tb_msgs.h | 6 ++++-- 2 files changed, 35 insertions(+), 13 deletions(-) commit 0b0a0bd06ee031b0e439a11a1b15573d9845b4be Author: Mika Westerberg Date: Sat Oct 7 10:54:09 2017 +0300 thunderbolt: Add constant for approval timeout We will be using this from Titan Ridge support code as well so make it constant. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko drivers/thunderbolt/icm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 484cb153fe5ffcd0b7cf423cf29aaeadd0e862b1 Author: Radion Mirchevsky Date: Wed Oct 4 14:53:54 2017 +0300 thunderbolt: Add tb_xdomain_find_by_route() This is needed by the new ICM interface to find xdomains by route string instead of link and depth. While there update existing tb_xdomain_find_* functions to use tb_xdomain_get() instead of open-coding the same. Signed-off-by: Radion Mirchevsky Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko drivers/thunderbolt/xdomain.c | 47 ++++++++++++++++++++++++++++++++----------- include/linux/thunderbolt.h | 13 ++++++++++++ 2 files changed, 48 insertions(+), 12 deletions(-) commit 8e9267bb3559065fddecf344cb54501704fcb68e Author: Radion Mirchevsky Date: Wed Oct 4 15:24:14 2017 +0300 thunderbolt: Add tb_switch_find_by_route() With the new ICM messaging there is need for find switch by route string instead of link and depth. Add new function that makes it possible. Signed-off-by: Radion Mirchevsky Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko drivers/thunderbolt/switch.c | 33 +++++++++++++++++++++++++++++++++ drivers/thunderbolt/tb.h | 1 + 2 files changed, 34 insertions(+) commit b6b0ea70f4254139e204870937cdb24d88dfac68 Author: Mika Westerberg Date: Wed Oct 4 15:19:20 2017 +0300 thunderbolt: Add tb_switch_get() Sometimes there is need for increasing reference count of a switch as well. This also follows what we have for xdomains. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko drivers/thunderbolt/tb.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 432019d644878dbefd8ec2482cb01ec68b8722b9 Author: Radion Mirchevsky Date: Wed Oct 4 15:07:40 2017 +0300 thunderbolt: Correct function name in kernel-doc comment Use correct name in kernel-doc of tb_switch_find_by_uuid(). Signed-off-by: Radion Mirchevsky Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko drivers/thunderbolt/switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee487dd2447a43dd318bd7ba2c54e59e707ad851 Author: Mika Westerberg Date: Wed Oct 4 14:42:20 2017 +0300 thunderbolt: Factor common ICM add and update operations out The newer ICM will not use link and depth to address devices. Instead it uses route strings. In order to take advantage of the existing code factor out common operations so that we can use the same functions with the new ICM as well. No functional changes intended. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko drivers/thunderbolt/icm.c | 136 +++++++++++++++++++++++++++++----------------- 1 file changed, 87 insertions(+), 49 deletions(-) commit cb653eecde3dc37c67d3e7297ac5445d16f7be13 Author: Mika Westerberg Date: Thu Sep 14 13:59:10 2017 +0300 thunderbolt: Handle rejected Thunderbolt devices The ICM firmware rejects devices if the maximum topology limit is exceeded (more than 6 devices are connected). If that happens just log a message to the kernel message buffer and bail out. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko drivers/thunderbolt/icm.c | 6 ++++++ drivers/thunderbolt/tb_msgs.h | 1 + 2 files changed, 7 insertions(+) commit e4be8c9b6a512e274cb6bbac4ac869d73880a8b3 Author: Mika Westerberg Date: Fri Nov 24 17:51:12 2017 +0300 thunderbolt: Wait a bit longer for ICM to authenticate the active NVM Sometimes during cold boot ICM has not yet authenticated the active NVM image leading to timeout and failing the driver probe. Allow ICM to take some more time and increase the timeout to 3 seconds before we give up. While there fix icm_firmware_init() to return the real error code without overwriting it with -ENODEV. Fixes: f67cf491175a ("thunderbolt: Add support for Internal Connection Manager (ICM)") Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Cc: stable@vger.kernel.org drivers/thunderbolt/icm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 44b51bbb16d033ac1984123349ec055bae09b623 Author: Mika Westerberg Date: Thu Sep 14 13:44:07 2017 +0300 thunderbolt: Wait a bit longer for root switch config space In some case reading root switch config space takes longer than what we are currently waiting in the driver resulting timeout and failure. Increase number of retries to allow some more time for the root switch config space to become accesssible. Also log an error if the timeout is exceeded so we know why the driver probe failed. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko drivers/thunderbolt/icm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 68a7a2ace13156b8a3d8cd6cceab6c30b52e2923 Author: Mika Westerberg Date: Fri Nov 24 17:48:25 2017 +0300 thunderbolt: Do not overwrite error code when domain adding fails If the Thunderbolt domain adding fails for some reason we currently always return -EIO instead of the real error code. To make debugging easier return the actual error code instead. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko drivers/thunderbolt/nhi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79fae987518a3aa6c3c7b2e3ad5fe1e4080c12bc Author: Mika Westerberg Date: Fri Feb 9 17:29:38 2018 +0300 thunderbolt: Handle connecting device in place of host properly If the system is suspended and user disconnects cable to another host and connects it to a Thunderbolt device instead we get a warning from driver core about adding duplicate sysfs attribute and adding the new device fails. Handle this properly so that we first remove the existing XDomain connection before adding new devices. Fixes: d1ff70241a27 ("thunderbolt: Add support for XDomain discovery protocol") Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Cc: stable@vger.kernel.org drivers/thunderbolt/icm.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit a03e828915c00ed0ea5aa40647c81472cfa7a984 Author: Mika Westerberg Date: Thu Jan 18 20:27:47 2018 +0300 thunderbolt: Serialize PCIe tunnel creation with PCI rescan We need to make sure a new PCIe tunnel is not created in a middle of previous PCI rescan because otherwise the rescan code might find too much and fail to reconfigure devices properly. This is important when native PCIe hotplug is used. In BIOS assisted hotplug there should be no such issue. Fixes: f67cf491175a ("thunderbolt: Add support for Internal Connection Manager (ICM)") Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Cc: Bjorn Helgaas Cc: stable@vger.kernel.org drivers/thunderbolt/switch.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f2a659f7d8d5da803836583aa16df06bdf324252 Author: Mika Westerberg Date: Tue Dec 19 12:44:56 2017 +0300 thunderbolt: Resume control channel after hibernation image is created The driver misses implementation of PM hook that undoes what ->freeze_noirq() does after the hibernation image is created. This means the control channel is not resumed properly and the Thunderbolt bus becomes useless in later stages of hibernation (when the image is stored or if the operation fails). Fix this by pointing ->thaw_noirq to driver nhi_resume_noirq(). This makes sure the control channel is resumed properly. Fixes: 23dd5bb49d98 ("thunderbolt: Add suspend/hibernate support") Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Cc: stable@vger.kernel.org drivers/thunderbolt/nhi.c | 1 + 1 file changed, 1 insertion(+) commit c9f0a2b87f9e95197c2f81920a82bcef6ad3db99 Author: Janosch Frank Date: Fri Feb 16 12:16:14 2018 +0100 KVM: s390: Refactor host cmma and pfmfi interpretation controls use_cmma in kvm_arch means that the KVM hypervisor is allowed to use cmma, whereas use_cmma in the mm context means cmm has been used before. Let's rename the context one to uses_cmm, as the vm does use collaborative memory management but the host uses the cmm assist (interpretation facility). Also let's introduce use_pfmfi, so we can remove the pfmfi disablement when we activate cmma and rather not activate it in the first place. Signed-off-by: Janosch Frank Message-Id: <1518779775-256056-2-git-send-email-frankja@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand Reviewed-by: Christian Borntraeger Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 1 + arch/s390/include/asm/mmu.h | 4 ++-- arch/s390/include/asm/mmu_context.h | 2 +- arch/s390/kvm/kvm-s390.c | 23 ++++++++++++----------- arch/s390/kvm/priv.c | 4 ++-- 5 files changed, 18 insertions(+), 16 deletions(-) commit c3b9e3e1ea1c1d1524b56b6734711db2a6fc2163 Author: Christian Borntraeger Date: Fri Feb 9 16:26:29 2018 +0000 KVM: s390: implement CPU model only facilities Some facilities should only be provided to the guest, if they are enabled by a CPU model. This allows us to avoid capabilities and to simply fall back to the cpumodel for deciding about a facility without enabling it for older QEMUs or QEMUs without a CPU model. Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 53 ++++++++++++++++++++++++++-------------- arch/s390/kvm/kvm-s390.h | 2 -- arch/s390/tools/gen_facilities.c | 20 +++++++++++++++ 3 files changed, 54 insertions(+), 21 deletions(-) commit 6d8cb045cde681e64a5ed80a2ab70be831a7f9b0 Author: Quentin Monnet Date: Thu Mar 8 23:46:33 2018 -0800 bpf: comment why dots in filenames under BPF virtual FS are not allowed When pinning a file under the BPF virtual file system (traditionally /sys/fs/bpf), using a dot in the name of the location to pin at is not allowed. For example, trying to pin at "/sys/fs/bpf/foo.bar" will be rejected with -EPERM. This check was introduced at the same time as the BPF file system itself, with commit b2197755b263 ("bpf: add support for persistent maps/progs"). At this time, it was checked in a function called "bpf_dname_reserved()", which made clear that using a dot was reserved for future extensions. This function disappeared and the check was moved elsewhere with commit 0c93b7d85d40 ("bpf: reject invalid names right in ->lookup()"), and the meaning of the dot ban was lost. The present commit simply adds a comment in the source to explain to the reader that the usage of dots is reserved for future usage. Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann kernel/bpf/inode.c | 3 +++ 1 file changed, 3 insertions(+) commit 75a141af68c5507727e0f4c41f8e3dd54de96fed Merge: 12ef9bd ef8ba83b Author: Daniel Borkmann Date: Fri Mar 9 10:23:00 2018 +0100 Merge branch 'bpf-tools-makefile-improvements' Jiri Benc says: ==================== Currently, 'make bpf' in the tools/ directory does not provide the standard quiet output except for bpftool (which is however listed with a wrong directory). Worse, it does not respect the build output directory. The 'make bpf_install' does not work as one would expect, either. It installs unconditionally to /usr/bin without respecting DESTDIR and prefix. This patchset improves that behavior. ==================== Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit ef8ba83b7cf6c530fbb2c83cf87f9755b8424a84 Author: Jiri Benc Date: Thu Mar 8 23:00:41 2018 +0100 tools: bpf: silence make by not deleting intermediate file Even in quiet mode, make finishes with rm tools/bpf/bpf_exp.lex.c That's because it considers the file to be intermediate. Silence that by mentioning the lex.c file instead of the lex.o file; the dependency still stays. Signed-off-by: Jiri Benc Signed-off-by: Daniel Borkmann tools/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a50b7f8c618a7953cd0bef407b390b6db60d0fc3 Author: Jiri Benc Date: Thu Mar 8 23:00:40 2018 +0100 tools: bpf: respect quiet/verbose build Default to quiet build, with V=1 enabling verbose build as is usual. Signed-off-by: Jiri Benc Signed-off-by: Daniel Borkmann tools/bpf/Makefile | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) commit 58416c37d0fe1c46aecb293283f2d558526cac19 Author: Jiri Benc Date: Thu Mar 8 23:00:39 2018 +0100 tools: bpf: call descend in Makefile Use the descend macro to properly propagate $(subdir) to bpftool. Signed-off-by: Jiri Benc Signed-off-by: Daniel Borkmann tools/bpf/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6c0710084e6bf5337c9af8075e266069b79ac2c2 Author: Jiri Benc Date: Thu Mar 8 23:00:38 2018 +0100 tools: bpf: make install should build first Make the 'install' target depend on the 'all' target to build the binaries first. Signed-off-by: Jiri Benc Signed-off-by: Daniel Borkmann tools/bpf/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fde68c5becb552ce96fcf1d123624b5c11baa187 Author: Jiri Benc Date: Thu Mar 8 23:00:37 2018 +0100 tools: bpf: consistent make bpf_install Currently, make bpf_install in tools/ does not respect DESTDIR. Moreover, it installs to /usr/bin/ unconditionally. Let it respect DESTDIR and allow prefix to be specified. Also, to be more consistent with bpftool and with the usual customs, default the prefix to /usr/local instead of /usr. Signed-off-by: Jiri Benc Signed-off-by: Daniel Borkmann tools/bpf/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 5a8997f207154826c7bf1a97acf75ffb44159c50 Author: Jiri Benc Date: Thu Mar 8 23:00:36 2018 +0100 tools: bpf: respect output directory during build Currently, the programs under tools/bpf (with the notable exception of bpftool) do not respect the output directory (make O=dir). Fix that. Signed-off-by: Jiri Benc Signed-off-by: Daniel Borkmann tools/bpf/Makefile | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit 72ab55e96ebc00d68501f5cda59478ed7cf7e484 Author: Jiri Benc Date: Thu Mar 8 23:00:35 2018 +0100 tools: bpftool: silence 'missing initializer' warnings When building bpf tool, gcc emits piles of warnings: prog.c: In function ‘prog_fd_by_tag’: prog.c:101:9: warning: missing initializer for field ‘type’ of ‘struct bpf_prog_info’ [-Wmissing-field-initializers] struct bpf_prog_info info = {}; ^ In file included from /home/storage/jbenc/git/net-next/tools/lib/bpf/bpf.h:26:0, from prog.c:47: /home/storage/jbenc/git/net-next/tools/include/uapi/linux/bpf.h:925:8: note: ‘type’ declared here __u32 type; ^ As these warnings are not useful, switch them off. Signed-off-by: Jiri Benc Signed-off-by: Daniel Borkmann tools/bpf/bpftool/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f779ca740f25c8a6a72d951334f9efc3158a318b Author: Colin Ian King Date: Thu Mar 8 08:00:20 2018 +0000 efi: Make const array 'apple' static Don't populate the const read-only array 'buf' on the stack but instead make it static. Makes the object code smaller by 64 bytes: Before: text data bss dec hex filename 9264 1 16 9281 2441 arch/x86/boot/compressed/eboot.o After: text data bss dec hex filename 9200 1 16 9217 2401 arch/x86/boot/compressed/eboot.o (GCC version 7.2.0 x86_64) Signed-off-by: Colin Ian King Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180308080020.22828-13-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/boot/compressed/eboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44612d7e0c379001460b37a29721128715bdcb02 Author: Andy Shevchenko Date: Thu Mar 8 08:00:19 2018 +0000 efi/apple-properties: Use memremap() instead of ioremap() The memory we are accessing through virtual address has no IO side effects. Moreover, for IO memory we have to use special accessors, which we don't use. Due to above, convert the driver to use memremap() instead of ioremap(). Tested-by: Lukas Wunner Signed-off-by: Andy Shevchenko Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180308080020.22828-12-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/apple-properties.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 5b4e4c3aa220d07d166d3f21f158bc9c69e3c044 Author: Ard Biesheuvel Date: Thu Mar 8 08:00:18 2018 +0000 efi: Reorder pr_notice() with add_device_randomness() call Currently, when we receive a random seed from the EFI stub, we call add_device_randomness() to incorporate it into the entropy pool, and issue a pr_notice() saying we are about to do that, e.g., [ 0.000000] efi: RNG=0x87ff92cf18 [ 0.000000] random: fast init done [ 0.000000] efi: seeding entropy pool Let's reorder those calls to make the output look less confusing: [ 0.000000] efi: seeding entropy pool [ 0.000000] efi: RNG=0x87ff92cf18 [ 0.000000] random: fast init done Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180308080020.22828-11-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f66d8d73e654c5f867daa6aa186300ecaf49d3a Author: Jia-Ju Bai Date: Thu Mar 8 08:00:14 2018 +0000 x86/efi: Replace GFP_ATOMIC with GFP_KERNEL in efi_query_variable_store() efi_query_variable_store() does an atomic kzalloc() unnecessarily, because we can never get this far when called in an atomic context, namely when nonblocking == 1. Replace it with GFP_KERNEL. This was found by the DCNS static analysis tool written by myself. Signed-off-by: Jia-Ju Bai Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180308080020.22828-7-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/platform/efi/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e611e7dbb235938fca1dd359bad5e5f86ceabcb Author: Ard Biesheuvel Date: Thu Mar 8 08:00:13 2018 +0000 efi/arm64: Check whether x18 is preserved by runtime services calls Whether or not we will ever decide to start using x18 as a platform register in Linux is uncertain, but by that time, we will need to ensure that UEFI runtime services calls don't corrupt it. So let's start issuing warnings now for this, and increase the likelihood that these firmware images have all been replaced by that time. This has been fixed on the EDK2 side in commit: 6d73863b5464 ("BaseTools/tools_def AARCH64: mark register x18 as reserved") dated July 13, 2017. Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180308080020.22828-6-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/arm64/include/asm/efi.h | 4 +++- arch/arm64/kernel/Makefile | 3 ++- arch/arm64/kernel/efi-rt-wrapper.S | 41 ++++++++++++++++++++++++++++++++++++++ arch/arm64/kernel/efi.c | 6 ++++++ 4 files changed, 52 insertions(+), 2 deletions(-) commit 1832e64162ffbbbdf7230401298550f2b624351b Author: Ard Biesheuvel Date: Thu Mar 8 08:00:11 2018 +0000 efi/arm*: Stop printing addresses of virtual mappings With the recent %p -> %px changes, we now get something like this in the kernel boot log on ARM/arm64 EFI systems: Remapping and enabling EFI services. EFI remap 0x00000087fb830000 => (ptrval) EFI remap 0x00000087fbdb0000 => (ptrval) EFI remap 0x00000087fffc0000 => (ptrval) The physical addresses of the UEFI runtime regions will also be printed when booting with the efi=debug command line option, and the virtual addresses can be inspected via /sys/kernel/debug/efi_page_tables (if enabled). So let's just remove the lines above. Signed-off-by: Ard Biesheuvel Acked-by: Leif Lindholm Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180308080020.22828-4-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/arm-runtime.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 6e98503dba64e721ba839e75dca036266ec0140f Author: Andy Shevchenko Date: Thu Mar 8 08:00:10 2018 +0000 efi/apple-properties: Remove redundant attribute initialization from unmarshal_key_value_pairs() There is no need to artificially supply a property length and fake data if property has type of boolean. Remove redundant piece of data and code. Reviewed-and-tested-by: Lukas Wunner Signed-off-by: Andy Shevchenko Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180308080020.22828-3-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/apple-properties.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 6b31a2fa1e8f7bc6c2a474b4a12dad7a145cf83d Author: Mark Rutland Date: Thu Mar 8 08:00:09 2018 +0000 efi/arm*: Only register page tables when they exist Currently the arm/arm64 runtime code registers the runtime servies pagetables with ptdump regardless of whether runtime services page tables have been created. As efi_mm.pgd is NULL in these cases, attempting to dump the efi page tables results in a NULL pointer dereference in the ptdump code: /sys/kernel/debug# cat efi_page_tables [ 479.522600] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 479.522715] Mem abort info: [ 479.522764] ESR = 0x96000006 [ 479.522850] Exception class = DABT (current EL), IL = 32 bits [ 479.522899] SET = 0, FnV = 0 [ 479.522937] EA = 0, S1PTW = 0 [ 479.528200] Data abort info: [ 479.528230] ISV = 0, ISS = 0x00000006 [ 479.528317] CM = 0, WnR = 0 [ 479.528317] user pgtable: 4k pages, 48-bit VAs, pgd = 0000000064ab0cb0 [ 479.528449] [0000000000000000] *pgd=00000000fbbe4003, *pud=00000000fb66e003, *pmd=0000000000000000 [ 479.528600] Internal error: Oops: 96000006 [#1] PREEMPT SMP [ 479.528664] Modules linked in: [ 479.528699] CPU: 0 PID: 2457 Comm: cat Not tainted 4.15.0-rc3-00065-g2ad2ee7ecb5c-dirty #7 [ 479.528799] Hardware name: FVP Base (DT) [ 479.528899] pstate: 00400009 (nzcv daif +PAN -UAO) [ 479.528941] pc : walk_pgd.isra.1+0x20/0x1d0 [ 479.529011] lr : ptdump_walk_pgd+0x30/0x50 [ 479.529105] sp : ffff00000bf4bc20 [ 479.529185] x29: ffff00000bf4bc20 x28: 0000ffff9d22e000 [ 479.529271] x27: 0000000000020000 x26: ffff80007b4c63c0 [ 479.529358] x25: 00000000014000c0 x24: ffff80007c098900 [ 479.529445] x23: ffff00000bf4beb8 x22: 0000000000000000 [ 479.529532] x21: ffff00000bf4bd70 x20: 0000000000000001 [ 479.529618] x19: ffff00000bf4bcb0 x18: 0000000000000000 [ 479.529760] x17: 000000000041a1c8 x16: ffff0000082139d8 [ 479.529800] x15: 0000ffff9d3c6030 x14: 0000ffff9d2527f4 [ 479.529924] x13: 00000000000003f3 x12: 0000000000000038 [ 479.530000] x11: 0000000000000003 x10: 0101010101010101 [ 479.530099] x9 : 0000000017e94050 x8 : 000000000000003f [ 479.530226] x7 : 0000000000000000 x6 : 0000000000000000 [ 479.530313] x5 : 0000000000000001 x4 : 0000000000000000 [ 479.530416] x3 : ffff000009069fd8 x2 : 0000000000000000 [ 479.530500] x1 : 0000000000000000 x0 : 0000000000000000 [ 479.530599] Process cat (pid: 2457, stack limit = 0x000000005d1b0e6f) [ 479.530660] Call trace: [ 479.530746] walk_pgd.isra.1+0x20/0x1d0 [ 479.530833] ptdump_walk_pgd+0x30/0x50 [ 479.530907] ptdump_show+0x10/0x20 [ 479.530920] seq_read+0xc8/0x470 [ 479.531023] full_proxy_read+0x60/0x90 [ 479.531100] __vfs_read+0x18/0x100 [ 479.531180] vfs_read+0x88/0x160 [ 479.531267] SyS_read+0x48/0xb0 [ 479.531299] el0_svc_naked+0x20/0x24 [ 479.531400] Code: 91400420 f90033a0 a90707a2 f9403fa0 (f9400000) [ 479.531499] ---[ end trace bfe8e28d8acb2b67 ]--- Segmentation fault Let's avoid this problem by only registering the tables after their successful creation, which is also less confusing when EFI runtime services are not in use. Reported-by: Will Deacon Signed-off-by: Mark Rutland Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180308080020.22828-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/arm-runtime.c | 3 +++ 1 file changed, 3 insertions(+) commit fbf8a1e12c3ba3afdf0804bc80f5f13dfec1cffe Merge: 1af22eb 2427b43 Author: Ingo Molnar Date: Fri Mar 9 08:27:55 2018 +0100 Merge tag 'perf-core-for-mingo-4.17-20180308' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: - Support to display the IPC/Cycle in 'annotate' TUI, for systems where this info can be obtained, like Intel's >= Skylake (Jin Yao) - Support wildcards on PMU name in dynamic PMU events (Agustin Vega-Frias) - Display pmu name when printing unmerged events in stat (Agustin Vega-Frias) - Auto-merge PMU events created by prefix or glob match (Agustin Vega-Frias) - Fix s390 'call' operations target function annotation (Thomas Richter) - Handle s390 PC relative load and store instruction in the augmented 'annotate', code, used so far in the TUI modes of 'perf report' and 'perf annotate' (Thomas Richter) - Provide libtraceevent with a kernel symbol resolver, so that symbols in tracepoint fields can be resolved when showing them in tools such as 'perf report' (Wang YanQing) - Refactor the cgroups code to look more like other code in tools/perf, using cgroup__{put,get} for refcount operations instead of its open-coded equivalent, breaking larger functions, etc (Arnaldo Carvalho de Melo) - Implement support for the -G/--cgroup target in 'perf trace', allowing strace like tracing (plus other events, backtraces, etc) for cgroups (Arnaldo Carvalho de Melo) - Update thread shortname in 'perf sched map' when the thread's COMM changes (Changbin Du) - refcount 'struct mem_info', for better sharing it over several users, avoid duplicating structs and fixing crashes related to use after free (Jiri Olsa) - Display perf.data version, offsets in 'perf report --header' (Jiri Olsa) - Record the machine's memory topology information in a perf.data feature section, to be used by tools such as 'perf c2c' (Jiri Olsa) - Fix output of forced groups in the header for 'perf report' --stdio and --tui (Jiri Olsa) - Better support llvm, clang, cxx make tests in the build process (Jiri Olsa) - Streamline the 'struct perf_mmap' methods, storing some info in the struct instead of passing it via various methods, shortening its signatures (Kan Liang) - Update the quipper perf.data parser library site information (Stephane Eranian) - Correct perf's man pages title markers for asciidoctor (Takashi Iwai) - Intel PT fixes and refactorings paving the way for implementing support for AUX area sampling (Adrian Hunter) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 1af22eba248efe2de25658041a80a3d40fb3e92e Author: Kan Liang Date: Mon Feb 12 14:20:35 2018 -0800 perf/x86/intel: Disable userspace RDPMC usage for large PEBS Userspace RDPMC cannot possibly work for large PEBS, which was introduced in: b8241d20699e ("perf/x86/intel: Implement batched PEBS interrupt handling (large PEBS interrupt threshold)") When the PEBS interrupt threshold is larger than one, there is no way to get exact auto-reload times and value for userspace RDPMC. Disable the userspace RDPMC usage when large PEBS is enabled. The only exception is when the PEBS interrupt threshold is 1, in which case user-space RDPMC works well even with auto-reload events. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: acme@kernel.org Fixes: b8241d20699e ("perf/x86/intel: Implement batched PEBS interrupt handling (large PEBS interrupt threshold)") Link: http://lkml.kernel.org/r/1518474035-21006-6-git-send-email-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ceb90d9e0248947839a0ff4bee98cf28695a6020 Author: Kan Liang Date: Mon Feb 12 14:20:34 2018 -0800 perf/x86/intel: Fix PMU read for auto-reload Auto-reload events needs to be specially handled in event count read. Auto-reload is only available for intel_pmu. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: acme@kernel.org Fixes: b8241d20699e ("perf/x86/intel: Implement batched PEBS interrupt handling (large PEBS interrupt threshold)") Link: http://lkml.kernel.org/r/1518474035-21006-5-git-send-email-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5bee2cc69d986e20808c93c46f7b6aef51edd827 Author: Kan Liang Date: Mon Feb 12 14:20:33 2018 -0800 perf/x86/intel/ds: Introduce ->read() function for auto-reload events and flush the PEBS buffer there There is no way to get exact auto-reload times and values which are needed for event updates unless we flush the PEBS buffer. Introduce intel_pmu_auto_reload_read() to drain the PEBS buffer for auto reload event. To prevent races with the hardware, we can only call drain_pebs() when the PMU is disabled. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: acme@kernel.org Link: http://lkml.kernel.org/r/1518474035-21006-4-git-send-email-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/ds.c | 9 +++++++++ arch/x86/events/perf_event.h | 2 ++ 2 files changed, 11 insertions(+) commit bcfbe5c41d630ce6b74da45134cea484248b515a Author: Kan Liang Date: Mon Feb 12 14:20:32 2018 -0800 perf/x86: Introduce a ->read() callback in 'struct x86_pmu' Auto-reload needs to be specially handled when reading event counts. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: acme@kernel.org Link: http://lkml.kernel.org/r/1518474035-21006-3-git-send-email-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/core.c | 2 ++ arch/x86/events/perf_event.h | 1 + 2 files changed, 3 insertions(+) commit d31fc13fdcb20e1c317f9a7dd6273c18fbd58308 Author: Kan Liang Date: Mon Feb 12 14:20:31 2018 -0800 perf/x86/intel: Fix event update for auto-reload There is a bug when reading event->count with large PEBS enabled. Here is an example: # ./read_count 0x71f0 0x122c0 0x1000000001c54 0x100000001257d 0x200000000bdc5 In fixed period mode, the auto-reload mechanism could be enabled for PEBS events, but the calculation of event->count does not take the auto-reload values into account. Anyone who reads event->count will get the wrong result, e.g x86_pmu_read(). This bug was introduced with the auto-reload mechanism enabled since commit: 851559e35fd5 ("perf/x86/intel: Use the PEBS auto reload mechanism when possible") Introduce intel_pmu_save_and_restart_reload() to calculate the event->count only for auto-reload. Since the counter increments a negative counter value and overflows on the sign switch, giving the interval: [-period, 0] the difference between two consequtive reads is: A) value2 - value1; when no overflows have happened in between, B) (0 - value1) + (value2 - (-period)); when one overflow happened in between, C) (0 - value1) + (n - 1) * (period) + (value2 - (-period)); when @n overflows happened in between. Here A) is the obvious difference, B) is the extension to the discrete interval, where the first term is to the top of the interval and the second term is from the bottom of the next interval and C) the extension to multiple intervals, where the middle term is the whole intervals covered. The equation for all cases is: value2 - value1 + n * period Previously the event->count is updated right before the sample output. But for case A, there is no PEBS record ready. It needs to be specially handled. Remove the auto-reload code from x86_perf_event_set_period() since we'll not longer call that function in this case. Based-on-code-from: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: acme@kernel.org Fixes: 851559e35fd5 ("perf/x86/intel: Use the PEBS auto reload mechanism when possible") Link: http://lkml.kernel.org/r/1518474035-21006-2-git-send-email-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/core.c | 15 +++----- arch/x86/events/intel/ds.c | 92 ++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 94 insertions(+), 13 deletions(-) commit 82d71ed0277efc45360828af8c4e4d40e1b45352 Author: Kan Liang Date: Tue Feb 20 02:11:50 2018 -0800 perf/x86/intel: Properly save/restore the PMU state in the NMI handler The PMU is disabled in intel_pmu_handle_irq(), but cpuc->enabled is not updated accordingly. This is fine in current usage because no-one checks it - but fix it for future code: for example, the drain_pebs() will be modified to fix an auto-reload bug. Properly save/restore the old PMU state. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: acme@kernel.org Cc: kernel test robot Link: http://lkml.kernel.org/r/6f44ee84-56f8-79f1-559b-08e371eaeb78@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit f605cfca8c39ffa2b98c06d2b9f30ba64f1e54e3 Author: Kan Liang Date: Thu Mar 1 12:54:54 2018 -0500 perf/x86/intel: Fix large period handling on Broadwell CPUs Large fixed period values could be truncated on Broadwell, for example: perf record -e cycles -c 10000000000 Here the fixed period is 0x2540BE400, but the period which finally applied is 0x540BE400 - which is wrong. The reason is that x86_pmu::limit_period() uses an u32 parameter, so the high 32 bits of 'period' get truncated. This bug was introduced in: commit 294fe0f52a44 ("perf/x86/intel: Add INST_RETIRED.ALL workarounds") It's safe to use u64 instead of u32: - Although the 'left' is s64, the value of 'left' must be positive when calling limit_period(). - bdw_limit_period() only modifies the lowest 6 bits, it doesn't touch the higher 32 bits. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: 294fe0f52a44 ("perf/x86/intel: Add INST_RETIRED.ALL workarounds") Link: http://lkml.kernel.org/r/1519926894-3520-1-git-send-email-kan.liang@linux.intel.com [ Rewrote unacceptably bad changelog. ] Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 2 +- arch/x86/events/perf_event.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d17067e4487adc53bedb43681b3cb5a1714ff6ca Author: gaurav jindal Date: Wed Feb 21 18:24:07 2018 +0530 sched/completions: Use bool in try_wait_for_completion() Since the return type of the function is bool, the internal 'ret' variable should be bool too. Signed-off-by: Gaurav Jindal Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180221125407.GA14292@gmail.com Signed-off-by: Ingo Molnar kernel/sched/completion.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 31e77c93e432dec79c7d90b888bbfc3652592741 Author: Vincent Guittot Date: Wed Feb 14 16:26:46 2018 +0100 sched/fair: Update blocked load when newly idle When NEWLY_IDLE load balance is not triggered, we might need to update the blocked load anyway. We can kick an ilb so an idle CPU will take care of updating blocked load or we can try to update them locally before entering idle. In the latter case, we reuse part of the nohz_idle_balance. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: brendan.jackman@arm.com Cc: dietmar.eggemann@arm.com Cc: morten.rasmussen@foss.arm.com Cc: valentin.schneider@arm.com Link: http://lkml.kernel.org/r/1518622006-16089-4-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 105 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 87 insertions(+), 18 deletions(-) commit 47ea54121e46a685aa2320df8b0f71aaeedff23f Author: Peter Zijlstra Date: Tue Feb 20 11:45:47 2018 +0100 sched/fair: Move idle_balance() We're going to want to call nohz_idle_balance() or parts thereof from idle_balance(). Since we already have a forward declaration of idle_balance() move it down such that it's below nohz_idle_balance() avoiding the need for a forward declaration for that. Signed-off-by: Peter Zijlstra (Intel) Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 228 ++++++++++++++++++++++++++-------------------------- 1 file changed, 114 insertions(+), 114 deletions(-) commit dd707247ababb685ac4b8b2c6a7bf2923725e6ac Author: Peter Zijlstra Date: Tue Feb 20 10:59:45 2018 +0100 sched/nohz: Merge CONFIG_NO_HZ_COMMON blocks Now that we have two back-to-back NO_HZ_COMMON blocks, merge them. Signed-off-by: Peter Zijlstra (Intel) Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit af3fe03c562055bc3c116eabe73f141ae31bf234 Author: Peter Zijlstra Date: Tue Feb 20 10:58:39 2018 +0100 sched/fair: Move rebalance_domains() This pure code movement results in two #ifdef CONFIG_NO_HZ_COMMON sections landing next to each other. Signed-off-by: Peter Zijlstra (Intel) Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 236 ++++++++++++++++++++++++++-------------------------- 1 file changed, 118 insertions(+), 118 deletions(-) commit 63928384faefba1b31c3bb77361965715a9fc71c Author: Peter Zijlstra Date: Tue Feb 13 16:54:17 2018 +0100 sched/nohz: Optimize nohz_idle_balance() Avoid calling update_blocked_averages() when it does not in fact have any by re-using/extending update_nohz_stats(). Signed-off-by: Peter Zijlstra (Intel) Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 1936c53ce8c8d4555e9ccad2dc8d98e0637b11f7 Author: Vincent Guittot Date: Tue Feb 13 11:31:18 2018 +0100 sched/fair: Reduce the periodic update duration Instead of using the cfs_rq_is_decayed() which monitors all *_avg and *_sum, we create a cfs_rq_has_blocked() which only takes care of util_avg and load_avg. We are only interested by these 2 values which are decaying faster than the *_sum so we can stop the periodic update earlier. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: brendan.jackman@arm.com Cc: dietmar.eggemann@arm.com Cc: morten.rasmussen@foss.arm.com Cc: valentin.schneider@arm.com Link: http://lkml.kernel.org/r/1518517879-2280-3-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit f643ea2207010db26f17fca99db031bad87c8461 Author: Vincent Guittot Date: Tue Feb 13 11:31:17 2018 +0100 sched/nohz: Stop NOHZ stats when decayed Stopped the periodic update of blocked load when all idle CPUs have fully decayed. We introduce a new nohz.has_blocked that reflect if some idle CPUs has blocked load that have to be periodiccally updated. nohz.has_blocked is set everytime that a Idle CPU can have blocked load and it is then clear when no more blocked load has been detected during an update. We don't need atomic operation but only to make cure of the right ordering when updating nohz.idle_cpus_mask and nohz.has_blocked. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: brendan.jackman@arm.com Cc: dietmar.eggemann@arm.com Cc: morten.rasmussen@foss.arm.com Cc: valentin.schneider@arm.com Link: http://lkml.kernel.org/r/1518517879-2280-2-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 116 ++++++++++++++++++++++++++++++++++++++++++--------- kernel/sched/sched.h | 1 + 2 files changed, 97 insertions(+), 20 deletions(-) commit ea14b57e8a181ac0561eba7a787e088f8c89f822 Author: Peter Zijlstra Date: Fri Feb 2 10:27:00 2018 +0100 sched/cpufreq: Provide migration hint It was suggested that a migration hint might be usefull for the CPU-freq governors. Signed-off-by: Peter Zijlstra (Intel) Cc: Juri Lelli Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: Viresh Kumar Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched/cpufreq.h | 1 + kernel/sched/fair.c | 31 +++++++++++++++++++------------ 2 files changed, 20 insertions(+), 12 deletions(-) commit 00357f5ec5d67a52a175da6f29f85c2c19d59bc8 Author: Peter Zijlstra Date: Thu Dec 21 15:06:50 2017 +0100 sched/nohz: Clean up nohz enter/exit The primary observation is that nohz enter/exit is always from the current CPU, therefore NOHZ_TICK_STOPPED does not in fact need to be an atomic. Secondary is that we appear to have 2 nearly identical hooks in the nohz enter code, set_cpu_sd_state_idle() and nohz_balance_enter_idle(). Fold the whole set_cpu_sd_state thing into nohz_balance_{enter,exit}_idle. Removes an atomic op from both enter and exit paths. Signed-off-by: Peter Zijlstra (Intel) Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched/nohz.h | 2 -- kernel/sched/core.c | 2 +- kernel/sched/fair.c | 73 +++++++++++++++++++++++----------------------- kernel/sched/sched.h | 11 ++++--- kernel/time/tick-sched.c | 7 ----- 5 files changed, 43 insertions(+), 52 deletions(-) commit e022e0d38ad475fc650f22efa3deb2fb96e62542 Author: Peter Zijlstra Date: Thu Dec 21 11:20:23 2017 +0100 sched/fair: Update blocked load from NEWIDLE Since we already iterate CPUs looking for work on NEWIDLE, use this iteration to age the blocked load. If the domain for which this is done completely spand the idle set, we can push the ILB based aging forward. Suggested-by: Brendan Jackman Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 1 + kernel/sched/fair.c | 49 +++++++++++++++++++++++++++++++++++++++++++------ kernel/sched/sched.h | 1 + 3 files changed, 45 insertions(+), 6 deletions(-) commit a4064fb614f83c0a097c5ff7fe433c4aa139c7af Author: Peter Zijlstra Date: Thu Dec 21 10:42:50 2017 +0100 sched/fair: Add NOHZ stats balancing Teach the idle balancer about the need to update statistics which have a different periodicity from regular balancing. Suggested-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) commit 4550487a993d579c7329bb5b19e516d36800c8bf Author: Peter Zijlstra Date: Thu Dec 21 10:47:48 2017 +0100 sched/fair: Restructure nohz_balance_kick() The current: if (nohz_kick_needed()) nohz_balancer_kick() is pointless complexity, fold them into a single call and avoid the various conditions at the call site. When we introduce multiple different needs to kick the ilb, the above construct also becomes a problem. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 218 ++++++++++++++++++++++++++-------------------------- 1 file changed, 111 insertions(+), 107 deletions(-) commit b7031a02ec753bf9b52a94a966b05e1abad3b7a9 Author: Peter Zijlstra Date: Thu Dec 21 10:11:09 2017 +0100 sched/fair: Add NOHZ_STATS_KICK Split the NOHZ idle balancer into doing two separate actions: - update blocked load statistic - actually load-balance Since the latter requires the former, ensure this happens. For now always tag both bits at the same time. Prepares for a future where we can toggle only the STATS bit. Suggested-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 4 ++-- kernel/sched/fair.c | 52 +++++++++++++++++++++++++++++++++++----------------- kernel/sched/sched.h | 4 ++++ 3 files changed, 41 insertions(+), 19 deletions(-) commit a22e47a4e3f5a9e50a827c5d94705ace3b1eac0b Author: Peter Zijlstra Date: Thu Dec 21 10:01:24 2017 +0100 sched/core: Convert nohz_flags to atomic_t Using atomic_t allows us to use the more flexible bitops provided there. Also its smaller. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 6 +++--- kernel/sched/fair.c | 23 +++++++++++++++-------- kernel/sched/sched.h | 11 ++++++----- 3 files changed, 24 insertions(+), 16 deletions(-) commit 8f111bc357aa811e0bb5fdfe34c4c9efdafc15b9 Author: Peter Zijlstra Date: Wed Dec 20 16:26:12 2017 +0100 cpufreq/schedutil: Rewrite CPUFREQ_RT support Instead of trying to duplicate scheduler state to track if an RT task is running, directly use the scheduler runqueue state for it. This vastly simplifies things and fixes a number of bugs related to sugov and the scheduler getting out of sync wrt this state. As a consequence we not also update the remove cfs/dl state when iterating the shared mask. Signed-off-by: Peter Zijlstra (Intel) Cc: Juri Lelli Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: Viresh Kumar Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched/cpufreq.h | 3 +- kernel/sched/cpufreq_schedutil.c | 74 ++++++++++++++++++---------------------- kernel/sched/rt.c | 9 +++-- 3 files changed, 41 insertions(+), 45 deletions(-) commit 4042d003a0792a3b05c7c424219e4c6cf1abfe76 Author: Peter Zijlstra Date: Wed Dec 20 15:37:26 2017 +0100 cpufreq/schedutil: Remove unused CPUFREQ_DL Bitrot... Signed-off-by: Peter Zijlstra (Intel) Cc: Juri Lelli Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: Viresh Kumar Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched/cpufreq.h | 3 +-- kernel/sched/deadline.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) commit 13a453c241b78934a945b1af572d0533612c9bd1 Author: Norbert Manthey Date: Tue Feb 27 08:47:40 2018 +0100 sched/fair: Add ';' after label attributes Due to using GCC defines for configuration, some labels might be unused in certain configurations. While adding a __maybe_unused to the label is fine in general, the line has to be terminated with ';'. This is also reflected in the GCC documentation, but GCC parsed the previous variant without an error message. This has been spotted while compiling with goto-cc, the compiler for the CPROVER tool suite. Signed-off-by: Norbert Manthey Signed-off-by: Michael Tautschnig Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1519717660-16157-1-git-send-email-nmanthey@amazon.de Signed-off-by: Ingo Molnar kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc4c5a3828bdba157f8ea406e1f4ceb75c13039c Merge: 14a7405 1b88acc Author: Ingo Molnar Date: Fri Mar 9 07:32:20 2018 +0100 Merge branch 'linus' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit cf29bded91f9153208c4c2145d602cd82430ad1a Author: Alexander Kurz Date: Thu Mar 8 11:19:54 2018 +0000 net: usb: asix88179_178a: de-duplicate code Remove the duplicated code for asix88179_178a bind and reset methods. Signed-off-by: Alexander Kurz Signed-off-by: David S. Miller drivers/net/usb/ax88179_178a.c | 117 +++++++++++------------------------------ 1 file changed, 31 insertions(+), 86 deletions(-) commit 84c4df40029fa8a4d126bba69bdea3b2f1bf6a70 Author: Alexander Kurz Date: Thu Mar 8 11:19:53 2018 +0000 net: usb: asix88179_178a: set permanent address once only The permanent address of asix88179_178a devices is read at probe time and should not be overwritten later. Otherwise it may be overwritten unintentionally with a configured address. Signed-off-by: Alexander Kurz Signed-off-by: David S. Miller drivers/net/usb/ax88179_178a.c | 1 - 1 file changed, 1 deletion(-) commit 9b5d5f4f96c795830a6820f8356b2980ffeb47b9 Merge: 571e677 42356d9 Author: David S. Miller Date: Thu Mar 8 21:54:52 2018 -0500 Merge branch 'ntuple-filters-with-RSS' Edward Cree says: ==================== ntuple filters with RSS This series introduces the ability to mark an ethtool steering filter to use RSS spreading, and the ability to create and configure multiple RSS contexts with different indirection tables, hash keys, and hash fields. An implementation for the sfc driver (for 7000-series and later SFC NICs) is included in patch 2/2. The anticipated use case of this feature is for steering traffic destined for a container (or virtual machine) to the subset of CPUs on which processes in the container (or the VM's vCPUs) are bound, while retaining the scalability of RSS spreading from the viewpoint inside the container. The use of both a base queue number (ring_cookie) and indirection table is intended to allow re-use of a single RSS context to target multiple sets of CPUs. For instance, if an 8-core system is hosting three containers on CPUs [1,2], [3,4] and [6,7], then a single RSS context with an equal-weight [0,1] indirection table could be used to target all three containers by setting ring_cookie to 1, 3 and 6 on the respective filters. v2: Initialised ctx in efx_ef10_filter_insert() to avoid (false positive) gcc warning. ==================== Signed-off-by: David S. Miller commit 42356d9a137bc83268e3988e9f1fdd48dbeef2ef Author: Edward Cree Date: Thu Mar 8 15:45:17 2018 +0000 sfc: support RSS spreading of ethtool ntuple filters Use a linked list to associate user-facing context IDs with FW-facing context IDs (since the latter can change after an MC reset). Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 273 ++++++++++++++++++++++------------ drivers/net/ethernet/sfc/efx.c | 65 +++++++- drivers/net/ethernet/sfc/efx.h | 12 +- drivers/net/ethernet/sfc/ethtool.c | 153 ++++++++++++++++--- drivers/net/ethernet/sfc/farch.c | 11 +- drivers/net/ethernet/sfc/filter.h | 7 +- drivers/net/ethernet/sfc/net_driver.h | 44 +++++- drivers/net/ethernet/sfc/nic.h | 2 - drivers/net/ethernet/sfc/siena.c | 26 ++-- 9 files changed, 443 insertions(+), 150 deletions(-) commit 84a1d9c4820080bebcbd413a845076dcb62f45fa Author: Edward Cree Date: Thu Mar 8 15:45:03 2018 +0000 net: ethtool: extend RXNFC API to support RSS spreading of filter matches We use a two-step process to configure a filter with RSS spreading. First, the RSS context is allocated and configured using ETHTOOL_SRSSH; this returns an identifier (rss_context) which can then be passed to subsequent invocations of ETHTOOL_SRXCLSRLINS to specify that the offset from the RSS indirection table lookup should be added to the queue number (ring_cookie) when delivering the packet. Drivers for devices which can only use the indirection table entry directly (not add it to a base queue number) should reject rule insertions combining RSS with a nonzero ring_cookie. Signed-off-by: Edward Cree Signed-off-by: David S. Miller include/linux/ethtool.h | 5 ++++ include/uapi/linux/ethtool.h | 32 +++++++++++++++++----- net/core/ethtool.c | 64 +++++++++++++++++++++++++++++++++----------- 3 files changed, 80 insertions(+), 21 deletions(-) commit 571e6776add4f499661e761e03e46ec0f6d66243 Author: kbuild test robot Date: Thu Mar 8 19:37:30 2018 +0800 rds: rds_info_from_znotifier() can be static Fixes: 9426bbc6de99 ("rds: use list structure to track information for zerocopy completion notification") Signed-off-by: Fengguang Wu Signed-off-by: David S. Miller net/rds/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 496c7f3caed5c56ba4ab6767a9cf7e7aa8bd8f41 Author: kbuild test robot Date: Thu Mar 8 18:56:14 2018 +0800 rds: rds_message_zcopy_from_user() can be static Fixes: d40a126b16ea ("rds: refactor zcopy code into rds_message_zcopy_from_user") Signed-off-by: Fengguang Wu Acked-by: Sowmini Varadhan Signed-off-by: David S. Miller net/rds/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 054f34da60dfa46457ca39dd111bb2b393575dab Author: Dan Carpenter Date: Thu Mar 8 12:36:28 2018 +0300 net/ncsi: unlock on error in ncsi_set_interface_nl() There are two error paths which are missing unlocks in this function. Fixes: 955dc68cb9b2 ("net/ncsi: Add generic netlink family") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller net/ncsi/ncsi-netlink.c | 2 ++ 1 file changed, 2 insertions(+) commit 50db64b090d0f457a3266fe80e2c841eba621b9d Author: Dan Carpenter Date: Thu Mar 8 12:36:04 2018 +0300 net/ncsi: use kfree_skb() instead of kfree() We're supposed to use kfree_skb() to free these sk_buffs. Fixes: 955dc68cb9b2 ("net/ncsi: Add generic netlink family") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller net/ncsi/ncsi-netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cecd8d81ac5a7551d70c331b7f4ef7eb2609f336 Author: Prasad Kanneganti Date: Wed Mar 7 22:23:32 2018 -0800 liquidio: avoid doing useless work Avoid doing useless work by making sure that the response_list is not empty before scheduling work to process it. Signed-off-by: Prasad Kanneganti Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/request_manager.c | 5 +++++ drivers/net/ethernet/cavium/liquidio/response_manager.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit fcbedd0f29692c0aea3a32d41c8739de7420f140 Author: Intiyaz Basha Date: Wed Mar 7 22:12:24 2018 -0800 liquidio: Resolved mbox read issue while reading more than one 64bit data Corrected length check when data received in the mbox is more than one 64 bit data value Signed-off-by: Intiyaz Basha Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit da5ff37c7ede7aa4e6883f4dd5a83b6cf8b9837f Author: Randy Dunlap Date: Sat Jan 27 16:31:45 2018 -0800 Documentation/cdrom: fix German sharp s in LaTex Apparently the LaTex abbreviation for the German "sharp s" (ß) (Unicode U+00DF) has changed from {\sz} to {\ss}. With {\sz}, I get this error at line 1016 (line number after another patch): ! Undefined control sequence. l.1016 ...nel~2.0. Further thanks to Heiko Ei{\sz }feldt, This is fixed by changing the {\sz} to {\ss}. Signed-off-by: Randy Dunlap Signed-off-by: Jens Axboe Documentation/cdrom/cdrom-standard.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a703c1f89af614d38808a4802744db6c8638762 Author: Randy Dunlap Date: Fri Jan 26 19:58:16 2018 -0800 Documentation/cdrom: update cdrom-standard.tex for kernel changes Documentation updates for Documentation/cdrom/cdrom-standard.tex: cdrom_device_ops: - add check_events() and generic_packet() cdrom_device_info: - add one 'const' modifier - correct some field descriptions - add some missing fields - drop 'kdev_t dev;' field Also drop sentence from documentation because it is not referenced anywhere in the kernel header or C files. Signed-off-by: Randy Dunlap Signed-off-by: Jens Axboe Documentation/cdrom/cdrom-standard.tex | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) commit dee5dee2a5b285d20f55a4758d3a51349691eeea Author: Bai Ping Date: Thu Mar 8 17:34:55 2018 +0800 ARM: imx: Add basic msl support for imx6sll Add basic MSL support for i.MX6SLL. The i.MX 6SoloLiteLite application processors are NXP's latest additions to a growing family of multimedia-focused products offering high-performance processing optimized for lowest power consumption. The i.MX 6SoloLiteLite processors feature NXP's advanced implementation of the ARM Cortex-A9 core, which can be interfaced with LPDDR3 and LPDDR2 DRAM memory devices. Signed-off-by: Bai Ping Signed-off-by: Shawn Guo arch/arm/mach-imx/Kconfig | 7 +++++++ arch/arm/mach-imx/Makefile | 1 + arch/arm/mach-imx/cpu.c | 3 +++ arch/arm/mach-imx/cpuidle-imx6sl.c | 7 +++++-- arch/arm/mach-imx/mach-imx6sl.c | 10 ++++++++-- arch/arm/mach-imx/mxc.h | 6 ++++++ 6 files changed, 30 insertions(+), 4 deletions(-) commit 128ccceaba8656573b8b0f86d3ab6e38094cc754 Merge: 2ec360b f6c3b60 Author: Dave Airlie Date: Fri Mar 9 10:50:45 2018 +1000 Merge branch 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-next More stuff for 4.17. Highlights: - More fixes for "wattman" like functionality (fine grained clk/voltage control) - Add more power profile infrastucture (context based dpm) - SR-IOV fixes - Add iomem debugging interface for use with umr - Powerplay and cgs cleanups - DC fixes and cleanups - ttm improvements - Misc cleanups all over * 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux: (143 commits) drm/amdgpu:Always save uvd vcpu_bo in VM Mode drm/amdgpu:Correct max uvd handles drm/amdgpu: replace iova debugfs file with iomem (v3) drm/amd/display: validate plane format on primary plane drm/amdgpu: Clean sdma wptr register when only enable wptr polling drm/amd/amdgpu: re-add missing GC 9.1 and SDMA0 4.1 sh_mask header files drm/amdgpu: give warning before sleep in kiq_r/wreg drm/amdgpu: further mitigate workaround for i915 drm/amdgpu: drop gtt->adev drm/amdgpu: add amdgpu_evict_gtt debugfs entry drm/amd/pp: Add #ifdef checks for CONFIG_ACPI drm/amd/pp: fix "Delete the wrapper layer of smu_allocate/free_memory" drm/amd/pp: Drop wrapper functions for upper/lower_32_bits drm/amdgpu: Delete cgs wrapper functions for gpu memory manager drm/amd/pp: Delete the wrapper layer of smu_allocate/free_memory drm/amd/pp: Remove cgs wrapper function for temperature update Revert "drm/amd/pp: Add a pp feature mask bit for AutoWattman feature" drm/amd/pp: Add auto power profilng switch based on workloads (v2) drm/amd/pp: Revert gfx/compute profile switch sysfs drm/amd/pp: Fix sclk in highest two levels when compute on smu7 ... commit c1da37a3177366d565d16e03b89cf81d817c4689 Author: Amit Kucheria Date: Tue Mar 6 18:35:03 2018 +0530 arm64: defconfig: enable more cpufreq governors Enable the various CPUFREQ governors and statistics to ease development. Don't change the default governor - performance governor. Signed-off-by: Amit Kucheria Signed-off-by: Andy Gross arch/arm64/configs/defconfig | 8 ++++++++ 1 file changed, 8 insertions(+) commit 52fe48c2b9bbeec6402a119f6b6be2050f5b999c Author: Amit Kucheria Date: Tue Mar 6 18:35:02 2018 +0530 arm64: defconfig: enable thermal sensor on QCOM platforms Enable the driver for the TSENS IP that is present across several QCOM SoCs. Signed-off-by: Amit Kucheria Signed-off-by: Andy Gross arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit b01aadecd5eb14a1e383d7cda8271b2f0e94a935 Author: Amit Kucheria Date: Mon Feb 12 16:33:32 2018 +0530 arm64: defconfig: Enable the APCS IPC driver on Qualcomm platforms The APCS block is present on several Qualcomm SoCs e.g. 8916, 8996. On the 8916 it is needed to enable the clock controller that in turn enables cpufreq on the platform while on the 8996 it is needed for communication with RPM. Signed-off-by: Amit Kucheria Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 90c29ed7627b6b4aeb603ee197650173c8434512 Author: Bjorn Andersson Date: Tue Feb 27 16:45:25 2018 -0800 soc: qcom: wcnss_ctrl: Fix increment in NV upload hdr.len includes both the size of the header and the fragment, so using this when stepping through the firmware causes us to skip 16 bytes every chunk of 3072 bytes; causing only the first fragment to actually be valid data. Instead use fragment size steps through the firmware blob. Fixes: ea7a1f275cf0 ("soc: qcom: Introduce WCNSS_CTRL SMD client") Reported-by: Will Newton Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/wcnss_ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa65f8045137d061134c15233d35a089cc85b87e Author: Bjorn Andersson Date: Mon Feb 12 17:37:23 2018 -0800 soc: qcom: rmtfs-mem: Add support for assigning memory to remote On some platform the remote processor's memory map is not statically configured in TrustZone, so each memory region that is to be accessed by the remote needs a call into TrustZone to set up the remote's permissions. Implement this for the rmtfs memory driver, to give the modem on 8996 access to the shared file system buffers. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/Kconfig | 1 + drivers/soc/qcom/rmtfs_mem.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit e723795c702b52cfceb3bb3faa63059eb4658313 Author: Ilia Lin Date: Tue Jan 23 09:36:18 2018 +0200 arm64: dts: qcom: Fix SPI5 config on MSM8996 Set correct clocks and interrupt values. Fixes the incorrect SPI master configuration. This is mandatory to make the SPI5 interface functional. Signed-off-by: Ilia Lin Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d46bd5ce1b3936958e2139830642fda46dd61253 Author: Rajendra Nayak Date: Thu Feb 22 11:42:06 2018 +0530 dt-bindings: qcom: Add SDM845 bindings Add a SoC string 'sdm845' for the qualcomm SDM845 SoC Signed-off-by: Rajendra Nayak Reviewed-by: Douglas Anderson Reviewed-by: Rob Herring Signed-off-by: Andy Gross Documentation/devicetree/bindings/arm/qcom.txt | 1 + 1 file changed, 1 insertion(+) commit 612123af86a4470d59bba5986c24eaa48611575f Author: Rajendra Nayak Date: Thu Feb 22 11:42:05 2018 +0530 dt-bindings: arm: Document kryo385 cpu Document the compatible string for the Kryo385 cpus found in qualcomm SoCs. Signed-off-by: Rajendra Nayak Reviewed-by: Rob Herring Reviewed-by: Douglas Anderson Signed-off-by: Andy Gross Documentation/devicetree/bindings/arm/cpus.txt | 1 + 1 file changed, 1 insertion(+) commit 15ee8f021d9bd64a124829cbe1794491ed070444 Author: Rajendra Nayak Date: Wed Mar 7 10:30:02 2018 +0530 arm64: dts: msm8916: Add cpu cooling maps Add cpu cooling maps for cpu passive trip points. The cpu cooling device states are mapped to cpufreq based scaling frequencies. Signed-off-by: Rajendra Nayak Signed-off-by: Amit Kucheria Reviewed-by: Viresh Kumar Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 68ae3d0cac449136407fca8dc7ad2078341d67de Author: Bjorn Andersson Date: Mon Feb 12 17:37:24 2018 -0800 arm64: dts: msm8996: Add rmtfs sharedmem node A 2MB shared memory region is used on MSM8996 for exchanging sector data in rmtfs. Add this chunk of reserved memory now that we have the rmtfs-mem compatible to describe it and its memory protection properties. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8996.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 65afdf458360f65cd4ddb7d165b673feece087a3 Author: Georgi Djakov Date: Mon Feb 5 16:46:51 2018 +0200 arm64: dts: qcom: msm8916: Add CPU frequency scaling support Add a CPU OPP table to allow CPU frequency scaling on msm8916 platforms. Signed-off-by: Georgi Djakov Reviewed-by: Amit Kucheria Tested-by: Amit Kucheria Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 025b995f47daece7b9856b9509748db02a0971be Author: Georgi Djakov Date: Mon Feb 5 16:46:50 2018 +0200 arm64: dts: qcom: msm8916: Add clock properties to the APCS node There are clock controller registers in the APCS block, which purpose is to control the main CPU mux and divider. Add the clock properties as part of the APCS device-tree node. Signed-off-by: Georgi Djakov Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 05e1632f62fe8da662c517cc11ff810df4a3dcab Author: Georgi Djakov Date: Mon Feb 5 16:46:49 2018 +0200 arm64: dts: qcom: msm8916: Probe the APCS mailbox driver The APCS block was exposed until now as a syscon, but now we have a proper driver for this block. Add the compatible string of the new driver to probe and register the mailbox functionality. Signed-off-by: Georgi Djakov Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d0bf04acd12f5c702ac2b21dca6729a1de1308a7 Author: Georgi Djakov Date: Mon Feb 5 16:46:48 2018 +0200 arm64: dts: qcom: msm8916: Add msm8916 A53 PLL DT node Add a device tree node for the A53 PLL, which exists on msm8916 platforms. Signed-off-by: Georgi Djakov Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 4a92b6d75bab5dab83d59f393f01b7f4ded5d07c Author: Rajendra Nayak Date: Thu Feb 1 10:00:55 2018 +0530 arm64: dts: msm8996: Fix wrong use of GIC_CPU_MASK_SIMPLE() GICv3 does not have affinity bitmap in the binding for PPI interrupts. It can be specified using a 4th cell if needed as documented in the bindings. Clean up the wrong use of the affinity bitmap using the GIC_CPU_MASK_SIMPLE() macro Reported-by: Stephen Boyd Signed-off-by: Rajendra Nayak Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8996.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c4b70883ee336645bc9841b99322f76efb3de1c4 Author: Linus Walleij Date: Wed Feb 28 11:16:58 2018 +0100 ARM: dts: add XOADC and IIO HWMON to APQ8064 This adds the PM8921 XOADC node to the PM8921 PMIC node, defines the channels and further also define an IIO HWMON node for the channels that are used for housekeeping of voltages and die temperature for the PMIC chip die. Tested on the Nexus 7 tablet: lsiio Device 000: PM8921-XOADC cd /sys/bus/iio/devices/iio:device0 cat in_voltage10_input 616461 (0.625V reference voltage) cat in_voltage11_input (1.25V reference voltage) cat temp1_input 35852 (die temperature) Cc: John Stultz Signed-off-by: Linus Walleij Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064.dtsi | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit ee2137ad99293eb892d70db9d2486b6b15e99ac0 Author: Bartosz Golaszewski Date: Wed Jan 24 22:30:30 2018 +0100 ARM: dts: use 'atmel' as at24 manufacturer for qcom-apq8064-cm-qs600 Using compatible strings without the part for at24 is now deprecated. Use a correct 'atmel,' value. Signed-off-by: Bartosz Golaszewski Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 228eac04ef18b192943abaa5b2b830ce3320e35b Author: Daniele Debernardi Date: Tue Jan 9 02:15:13 2018 +0100 ARM: dts: qcom: Add initial DTS file for Samsung Galaxy S5 phone This DTS has support for the Samsung Galaxy S5 (codenamed klte). Initial version have support just for serial console. Cc: Andy Gross Cc: Bjorn Andersson Cc: David Brown Cc: Rob Herring Cc: Mark Rutland Cc: Russell King Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Daniele Debernardi Signed-off-by: Andy Gross arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) commit 45b578fe4c3cade6f4ca1fc934ce199afd857edc Author: Richard Guy Briggs Date: Wed Feb 14 11:18:22 2018 -0500 audit: link denied should not directly generate PATH record Audit link denied events generate duplicate PATH records which disagree in different ways from symlink and hardlink denials. audit_log_link_denied() should not directly generate PATH records. See: https://github.com/linux-audit/audit-kernel/issues/21 Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 2ec360bbc319903f878135adeed85bb648ef95cf Merge: f073d78 77f59f8 Author: Dave Airlie Date: Fri Mar 9 10:22:30 2018 +1000 Merge branch 'drm/next/du' of git://linuxtv.org/pinchartl/media into drm-next - Convert LVDS support to a drm_bridge driver - Add DT bindings for the R8A77995 SoC - Add DT bindings and driver support for the R8A77970 SoC Note that the LVDS conversion depends on a patch series from Frank Rowand that will make it upstream through Rob Herring's tree. Frank has provided a stable branch based on v4.16-rc1 with the patches, and both Rob and I have merged it into our trees. This should thus generate no conflict when reaching -next. * 'drm/next/du' of git://linuxtv.org/pinchartl/media: dt-bindings: display: renesas: lvds: Document r8a77995 bindings dt-bindings: display: renesas: du: Document r8a77995 bindings drm: rcar-du: lvds: Add R8A77970 support drm: rcar-du: Add R8A77970 support dt-bindings: display: renesas: lvds: Document R8A77970 bindings dt-bindings: display: renesas: du: Document R8A77970 bindings drm: rcar-du: Convert LVDS encoder code to bridge driver drm: rcar-du: Fix legacy DT to create LVDS encoder nodes dt-bindings: display: renesas: Deprecate LVDS support in the DU bindings dt-bindings: display: renesas: Add R-Car LVDS encoder DT bindings of: improve reporting invalid overlay target path of: convert unittest overlay devicetree source to sugar syntax of: Documentation: of_overlay_apply() replaced by of_overlay_fdt_apply() of: change overlay apply input data from unflattened to FDT x86: devicetree: fix config option around x86_flattree_get_config() commit 15564ff0a16e2d994e78d62c23d227ff182ee864 Author: Richard Guy Briggs Date: Wed Feb 14 11:18:21 2018 -0500 audit: make ANOM_LINK obey audit_enabled and audit_dummy_context Audit link denied events emit disjointed records when audit is disabled. No records should be emitted when audit is disabled. See: https://github.com/linux-audit/audit-kernel/issues/21 Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.c | 3 +++ 1 file changed, 3 insertions(+) commit b56af54ac78c54a519d82813836f305d7f76ef27 Author: Dennis Wassenberg Date: Thu Mar 8 15:32:09 2018 -0800 Input: i8042 - add Lenovo ThinkPad L460 to i8042 reset list Reset i8042 before probing because of insufficient BIOS initialisation of the i8042 serial controller. This makes Synaptics touchpad detection possible. Without resetting the Synaptics touchpad is not detected because there are always NACK messages from AUX port. Signed-off-by: Dennis Wassenberg Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-x86ia64io.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 62f0f079b96d38b6c8a47a52477024b1197652f4 Author: Andrey Smirnov Date: Wed Mar 7 11:56:55 2018 -0800 Input: add RAVE SP Powerbutton driver Add driver that properly handles input event emitted by RAVE SP devices. Reviewed-by: Lucas Stach Signed-off-by: Andrey Smirnov Reviewed-by: Rob Herring Signed-off-by: Dmitry Torokhov .../bindings/input/zii,rave-sp-pwrbutton.txt | 22 +++++ drivers/input/misc/Kconfig | 9 +++ drivers/input/misc/Makefile | 1 + drivers/input/misc/rave-sp-pwrbutton.c | 94 ++++++++++++++++++++++ 4 files changed, 126 insertions(+) commit 60beeccc72cabefcb8874fec542b3142e262b6c2 Author: Sean Paul Date: Mon Mar 5 23:22:54 2018 +0100 drm/rockchip: Don't use atomic constructs for psr Instead of using timer and spinlocks, use delayed_work and mutexes for rockchip psr. This allows us to make blocking calls when enabling/disabling psr (which is sort of important given we're talking over dpcd to the display). Cc: Caesar Wang Cc: 征增 王 Cc: Stéphane Marchesin Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180305222324.5872-3-enric.balletbo@collabora.com drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 68 ++++++++++++----------------- 3 files changed, 31 insertions(+), 41 deletions(-) commit 7f3c191b17c3d449ba606c37030257b132ffae06 Author: zain wang Date: Mon Mar 5 23:22:53 2018 +0100 drm/rockchip: analogix_dp: set psr activate/deactivate when enable/disable bridge There's a race between when bridge_disable and when vop_crtc_disable are called. If the flush timer triggers a new psr work between these, we will operate eDP without power shutdowned by bridge_disable. In this case, moving activate/deactivate to enable/disable bridge to avoid it. Cc: Stéphane Marchesin Signed-off-by: zain wang Signed-off-by: Caesar Wang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180305222324.5872-2-enric.balletbo@collabora.com drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 7 +++++- drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 30 ++++++++++++++++++++----- drivers/gpu/drm/rockchip/rockchip_drm_psr.h | 4 ++-- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ---- 4 files changed, 32 insertions(+), 13 deletions(-) commit cc69c88fbeb915447b87e5179378d899d1f61554 Author: Darren Hart (VMware) Date: Tue Mar 6 18:01:04 2018 -0800 platform/x86: dell-smbios: Resolve dependency error on DCDBAS When the DELL_SMBIOS_SMM backend is enabled, the DELL_SMBIOS symbol depends on DELL_DCDBAS, and we must avoid the situation where DELL_SMBIOS=y and DCDBAS=m. Adding the conditional dependency to DELL_SMBIOS such as: depends !DELL_SMBIOS_SMM || (DCDBAS || DCDBAS=n) results in the Kconfig tooling complaining about a circular dependency, although it appears to work in practice. Avoid the errors by simplifying the dependency and forcing DELL_SMBIOS to be <= DCDBAS if DCDBAS is enabled (thanks to Greg KH for the suggestion). Cc: Mario.Limonciello@dell.com Signed-off-by: Darren Hart (VMware) drivers/platform/x86/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+) commit 8a0ac14b8da9b86cfbe7aace40c8d485ed5c5b97 Author: Bart Van Assche Date: Wed Mar 7 17:10:12 2018 -0800 block: Move the queue_flag_*() functions from a public into a private header file This patch helps to avoid that new code gets introduced in block drivers that manipulates queue flags without holding the queue lock when that lock should be held. Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk.h | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/blkdev.h | 69 -------------------------------------------------- 2 files changed, 69 insertions(+), 69 deletions(-) commit 1db2008b79a32db2ad41338c6c74c4735cf74f6d Author: Bart Van Assche Date: Wed Mar 7 17:10:11 2018 -0800 block: Complain if queue_flag_(set|clear)_unlocked() is abused Since it is not safe to use queue_flag_(set|clear)_unlocked() without holding the queue lock after the sysfs entries for a queue have been created, complain if this happens. Cc: Mike Snitzer Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe include/linux/blkdev.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 8b904b5b6b58b9a29dcf3f82d936d9e7fd69fda6 Author: Bart Van Assche Date: Wed Mar 7 17:10:10 2018 -0800 block: Use blk_queue_flag_*() in drivers instead of queue_flag_*() This patch has been generated as follows: for verb in set_unlocked clear_unlocked set clear; do replace-in-files queue_flag_${verb} blk_queue_flag_${verb%_unlocked} \ $(git grep -lw queue_flag_${verb} drivers block/bsg*) done Except for protecting all queue flag changes with the queue lock this patch does not change any functionality. Cc: Mike Snitzer Cc: Shaohua Li Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Signed-off-by: Bart Van Assche Reviewed-by: Martin K. Petersen Reviewed-by: Johannes Thumshirn Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe block/bsg-lib.c | 4 ++-- drivers/block/drbd/drbd_nl.c | 4 ++-- drivers/block/loop.c | 10 +++++----- drivers/block/nbd.c | 8 ++++---- drivers/block/null_blk.c | 6 +++--- drivers/block/rbd.c | 4 ++-- drivers/block/rsxx/dev.c | 6 +++--- drivers/block/skd_main.c | 4 ++-- drivers/block/xen-blkfront.c | 10 +++++----- drivers/block/zram/zram_drv.c | 6 +++--- drivers/ide/ide-disk.c | 4 ++-- drivers/ide/ide-probe.c | 2 +- drivers/lightnvm/pblk-init.c | 2 +- drivers/md/dm-table.c | 16 ++++++++-------- drivers/md/md-linear.c | 4 ++-- drivers/md/md.c | 4 ++-- drivers/md/raid0.c | 4 ++-- drivers/md/raid1.c | 6 +++--- drivers/md/raid10.c | 6 +++--- drivers/md/raid5.c | 4 ++-- drivers/mmc/core/queue.c | 8 ++++---- drivers/mtd/mtd_blkdevs.c | 6 +++--- drivers/nvdimm/blk.c | 2 +- drivers/nvdimm/btt.c | 2 +- drivers/nvdimm/pmem.c | 4 ++-- drivers/nvme/host/core.c | 4 ++-- drivers/nvme/host/multipath.c | 2 +- drivers/s390/block/dasd.c | 4 ++-- drivers/s390/block/dcssblk.c | 2 +- drivers/s390/block/scm_blk.c | 4 ++-- drivers/s390/block/xpram.c | 4 ++-- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +- drivers/scsi/scsi_debug.c | 2 +- drivers/scsi/scsi_lib.c | 2 +- drivers/scsi/scsi_transport_sas.c | 4 ++-- drivers/scsi/sd.c | 8 ++++---- 38 files changed, 89 insertions(+), 89 deletions(-) commit bf3a2b310ea35ae2f641bb734892574bd820d4a5 Author: Bart Van Assche Date: Wed Mar 7 17:10:09 2018 -0800 target/tcm_loop: Use blk_queue_flag_set() Use blk_queue_flag_set() instead of open-coding this function. Cc: Nicholas A. Bellinger Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe drivers/target/loopback/tcm_loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc74c33eab7590abaf7c90563089a82f62667823 Author: Bart Van Assche Date: Wed Mar 7 17:10:08 2018 -0800 iscsi: Use blk_queue_flag_set() Use blk_queue_flag_set() instead of open-coding this function. Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Acked-by: Martin K. Petersen Reviewed-by: Johannes Thumshirn Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe drivers/scsi/iscsi_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44e1ebe2a33b6cf70d6bee6beb1d5a198a841380 Author: Bart Van Assche Date: Wed Mar 7 17:10:07 2018 -0800 bcache: Use the blk_queue_flag_{set,clear}() functions Use the blk_queue_flag_{set,clear}() functions instead of open-coding these. Cc: Kent Overstreet Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Reviewed-by: Michael Lyle Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4e699cb99d08563df4587a9a667bc5936dc75e51 Author: Bart Van Assche Date: Wed Mar 7 17:10:06 2018 -0800 mtip32xx: Use the blk_queue_flag_*() functions Use the blk_queue_flag_*() functions instead of open-coding these. Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7dfdbc7367f6f789715cab2cb484b78ab45e9f3e Author: Bart Van Assche Date: Wed Mar 7 17:10:05 2018 -0800 block: Protect queue flag changes with the queue lock Since the queue flags may be changed concurrently from multiple contexts after a queue becomes visible in sysfs, make these changes safe by protecting these with the queue lock. Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Reviewed-by: Martin K. Petersen Reviewed-by: Johannes Thumshirn Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq.c | 2 +- block/blk-stat.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 8814ce8a0f680599a837af18aefdec774e5c7b97 Author: Bart Van Assche Date: Wed Mar 7 17:10:04 2018 -0800 block: Introduce blk_queue_flag_{set,clear,test_and_{set,clear}}() Introduce functions that modify the queue flags and that protect these modifications with the request queue lock. Except for moving one wake_up_all() call from inside to outside a critical section, this patch does not change any functionality. Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-core.c | 91 +++++++++++++++++++++++++++++++++++++++++--------- block/blk-mq.c | 12 ++----- block/blk-settings.c | 6 ++-- block/blk-sysfs.c | 22 ++++-------- block/blk-timeout.c | 6 ++-- include/linux/blkdev.h | 5 +++ 6 files changed, 93 insertions(+), 49 deletions(-) commit f78bac2c8e69144781e271d9771bae8dbb4e7098 Author: Bart Van Assche Date: Wed Mar 7 17:10:03 2018 -0800 block: Use the queue_flag_*() functions instead of open-coding these Except for changing the atomic queue flag manipulations that are protected by the queue lock into non-atomic manipulations, this patch does not change any functionality. Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-core.c | 2 +- block/blk-mq.c | 2 +- block/blk-settings.c | 4 ++-- block/blk-stat.c | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) commit 66f91322f39cd18a01524264464c2ff4c98c936e Author: Bart Van Assche Date: Wed Mar 7 17:10:02 2018 -0800 block: Reorder the queue flag manipulation function definitions Move the definition of queue_flag_clear_unlocked() up and move the definition of queue_in_flight() down such that all queue flag manipulation function definitions become contiguous. This patch does not change any functionality. Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe include/linux/blkdev.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 29cf1351d450f95957eb0ef2e8cc0c7765fc5785 Author: Steve Wise Date: Thu Mar 1 13:58:28 2018 -0800 RDMA/nldev: provide detailed PD information Implement the RDMA nldev netlink interface for dumping detailed PD information. Reviewed-by: Leon Romanovsky Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/core/nldev.c | 57 ++++++++++++++++++++++++++++++++++++++++ include/uapi/rdma/rdma_netlink.h | 7 +++++ 2 files changed, 64 insertions(+) commit 5292443431fff5ba20f1b48985d382dd824016eb Author: Steve Wise Date: Thu Mar 1 13:58:20 2018 -0800 mlx4_ib: zero out struct ib_pd when allocating Zero out the fields of the struct ib_pd for user mode pds so that users querying pds via nldev will not get garbage. For simplicity, use kzalloc() to allocate the mlx4_ib_pd struct. Signed-off-by: Steve Wise Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fccec5b89ac61ebe2f353feecd08a16621f2418b Author: Steve Wise Date: Thu Mar 1 13:58:13 2018 -0800 RDMA/nldev: provide detailed MR information Implement the RDMA nldev netlink interface for dumping detailed MR information. Signed-off-by: Steve Wise Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/nldev.c | 56 ++++++++++++++++++++++++++++++++++++ drivers/infiniband/core/restrack.c | 36 ++++++++++++++--------- drivers/infiniband/core/uverbs_cmd.c | 2 ++ drivers/infiniband/core/verbs.c | 3 ++ include/rdma/ib_verbs.h | 5 ++++ include/rdma/restrack.h | 4 +++ include/uapi/rdma/rdma_netlink.h | 9 ++++++ 7 files changed, 102 insertions(+), 13 deletions(-) commit e6f0330106f4aa51e377b183c759758242ccab6c Author: Steve Wise Date: Thu Mar 1 13:58:06 2018 -0800 mlx4_ib: set user mr attributes in struct ib_mr Setting iova, length, and page_size allows this information to be seen via NLDEV netlink queries, which can aid in user rdma debugging. Signed-off-by: Steve Wise Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/mr.c | 3 +++ 1 file changed, 3 insertions(+) commit 750fb1656ab7781d5d0f1cd38ca4f1f958f02f45 Author: Steve Wise Date: Thu Mar 1 13:57:58 2018 -0800 iw_cxgb4: initialize ib_mr fields for user mrs Some of the struct ib_mr fields weren't getting initialized. This was benign, but will cause problems when dumping the mr resource via nldev/restrack. Signed-off-by: Steve Wise Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/mem.c | 3 +++ 1 file changed, 3 insertions(+) commit a34fc0893eef691863b5c118df8ff8e6c9fbc7b7 Author: Steve Wise Date: Thu Mar 1 13:57:51 2018 -0800 RDMA/nldev: provide detailed CQ information Implement the RDMA nldev netlink interface for dumping detailed CQ information. Reviewed-by: Leon Romanovsky Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/core/nldev.c | 52 ++++++++++++++++++++++++++++++++++++++++ include/uapi/rdma/rdma_netlink.h | 8 +++++++ 2 files changed, 60 insertions(+) commit 00313983cda6f37f747058e58c1cb8fba02bc134 Author: Steve Wise Date: Thu Mar 1 13:57:44 2018 -0800 RDMA/nldev: provide detailed CM_ID information Implement RDMA nldev netlink interface to get detailed CM_ID information. Because cm_id's are attached to rdma devices in various work queue contexts, the pid and task information at restrak_add() time is sometimes not useful. For example, an nvme/f host connection cm_id ends up being bound to a device in a work queue context and the resulting pid at attach time no longer exists after connection setup. So instead we mark all cm_id's created via the rdma_ucm as "user", and all others as "kernel". This required tweaking the restrack code a little. It also required wrapping some rdma_cm functions to allow passing the module name string. Signed-off-by: Steve Wise Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 61 +++++++++++++-------- drivers/infiniband/core/cma_priv.h | 6 ++- drivers/infiniband/core/nldev.c | 107 +++++++++++++++++++++++++++++++++---- drivers/infiniband/core/restrack.c | 14 +++-- drivers/infiniband/core/ucma.c | 8 +-- include/rdma/rdma_cm.h | 18 +++++-- include/rdma/restrack.h | 20 +++++++ include/uapi/rdma/rdma_netlink.h | 14 +++++ 8 files changed, 205 insertions(+), 43 deletions(-) commit a3b641af72ba899991ed847556951128ef41d52f Author: Steve Wise Date: Thu Mar 1 13:57:36 2018 -0800 RDMA/CM: move rdma_id_private to cma_priv.h Move struct rdma_id_private to a new header cma_priv.h so the resource tracking services in core/nldev.c can read useful information about cm_ids. Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 41 +------------------- drivers/infiniband/core/cma_priv.h | 79 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 40 deletions(-) commit d12ff624828073f94628d49f6579e9c20acc56cd Author: Steve Wise Date: Thu Mar 1 13:57:29 2018 -0800 RDMA/nldev: common resource dumpit function Create a common dumpit function that can be used by all common resource types. This reduces code replication and simplifies the code as we add more resource types. Signed-off-by: Steve Wise Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/nldev.c | 61 +++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 18 deletions(-) commit 88831a2cfe2245822200ecf4bd7ff77abdf1499a Author: Steve Wise Date: Thu Mar 1 13:57:22 2018 -0800 RDMA/restrack: clean up res_to_dev() Simplify res_to_dev() to make it easier to read/maintain. Reviewed-by: Leon Romanovsky Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/core/restrack.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) commit fd372a7a9e5e9d8011a0222d10edd3523abcd3b1 Merge: 10c56b8 31135eb Author: David S. Miller Date: Thu Mar 8 14:43:48 2018 -0500 Merge tag 'mlx5-updates-2018-02-28-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== mlx5-updates-2018-02-28-2 (IPSec-2) This series follows our previous one to lay out the foundations for IPSec in user-space and extend current kernel netdev IPSec support. As noted in our previous pull request cover letter "mlx5-updates-2018-02-28-1 (IPSec-1)", the IPSec mechanism will be supported through our flow steering mechanism. Therefore, we need to change the initialization order. Furthermore, IPsec is also supported in both egress and ingress. Since our current flow steering is egress only, we add an empty (only implemented through FPGA steering ops) egress namespace to handle that case. We also implement the required flow steering callbacks and logic in our FPGA driver. We extend the FPGA support for ESN and modifying a xfrm too. Therefore, we add support for some new FPGA command interface that supports them. The other required bits are added too. The new features and requirements are advertised via cap bits. Last but not least, we revise our driver's accel_esp API. This API will be shared between our netdev and IB driver, so we need to have all the required functionality from both worlds. Regards, Aviad and Matan ==================== Signed-off-by: David S. Miller commit c6380ecd8e9bee7aba3d9a5a94b58168244c4a61 Merge: cdc2466 661e50b Author: Dmitry Torokhov Date: Thu Mar 8 11:07:30 2018 -0800 Merge tag 'v4.16-rc4' into next Sync up with mainline to bring in RAVE MFD device core. commit e403d00573431e1e3de1710a91c6090c60ec16af Author: Peter De Schrijver Date: Thu Jan 25 16:00:12 2018 +0200 clk: tegra: MBIST work around for Tegra210 Tegra210 has a hw bug which can cause IP blocks to lock up when ungating a domain. The reason is that the logic responsible for resetting the memory built-in self test mode can come up in an undefined state because its clock is gated by a second level clock gate (SLCG). Work around this by making sure the logic will get some clock edges by ensuring the relevant clock is enabled and temporarily override the relevant SLCGs. Unfortunately for some IP blocks, the control bits for overriding the SLCGs are not in CAR, but in the IP block itself. This means we need to map a few extra register banks in the clock code. Signed-off-by: Peter De Schrijver Reviewed-by: Jon Hunter Tested-by: Jon Hunter Tested-by: Hector Martin Tested-by: Andre Heider Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding fixup mbist drivers/clk/tegra/clk-tegra210.c | 344 ++++++++++++++++++++++++++++++++++++++- include/linux/clk/tegra.h | 1 + 2 files changed, 343 insertions(+), 2 deletions(-) commit 0922a464a621eab112486c93b14f414409f0d904 Author: Roy Pledge Date: Wed Mar 7 16:50:27 2018 -0500 staging: fsl-mc/dpio: Add missing argument identifier When running checkpatch over the DPIO code the following warning is reported: WARNING: function definition argument 'struct dpaa2_io_notification_ctx *' should also have an identifier name Add the missing identifier. Signed-off-by: Roy Pledge Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/dpaa2-io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5f370c76770c2ec7ffb400c6612777f7e8fdd4c Author: Ioana Radulescu Date: Tue Mar 6 11:43:47 2018 -0600 staging: fsl-mc/dpio: Fix incorrect masking In qbman_swp_alt_fq_state(), we need to mask the fqid value before converting it to little endian, otherwise we write a wrong value to hardware when running in big endian mode. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpio/qbman-portal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d02512fa808d080f044fdcb084a8e6f3d38c9b0 Author: Ioana Radulescu Date: Tue Mar 6 11:43:46 2018 -0600 staging: fsl-mc/dpio: Use __leXX types where needed Structures that are mapped to hardware registers should explicitly specify the expected endianness for fields larger than 1 byte. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpio/qbman-portal.c | 16 ++++++++-------- drivers/staging/fsl-mc/bus/dpio/qbman-portal.h | 24 ++++++++++++------------ 2 files changed, 20 insertions(+), 20 deletions(-) commit 0f4e6014677e8b85b8c61a6ed3707e12b6b5a59a Author: Ioana Radulescu Date: Tue Mar 6 11:43:45 2018 -0600 staging: fsl-mc/dpio: Fix cast truncate warning Sparse reports the following warning: drivers/staging/fsl-mc/include/dpaa2-fd.h:421:30: warning: cast truncates bits from constant value (ffff7fff becomes 7fff) Fix this by explicitly masking the value with 0xffff. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/dpaa2-fd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 11bc6596aaad2c30b1538c15fa5471ed283aa3e4 Author: Arushi Singhal Date: Wed Mar 7 16:09:09 2018 +0530 staging: rtl8192u: Replace printk() with more standardize output format. printk() is the raw way to print output and should be avoided. For drivers with defined "struct device object", dev_*macro() is prefer and for "struct netdevice object", netdev_*macro() is prefer over dev_*macro() to standardize the output format within the subsystem. If no "struct device object" is defined prefer pr_*macro() over printk(). This patch Replace printk having a log level with the appropriate output format according to the order of preference. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit c674f4aab45d702bdc18288646ddc6c348589d98 Author: Ioana Radulescu Date: Tue Mar 6 11:43:44 2018 -0600 staging: fsl-mc/dpio: Fix incorrect cast Move the cast in dpaa2_sg_get_addr() to the right place. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/dpaa2-fd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 819fa2a0d7493ef9610bd3babda8b6c623a4c3d7 Author: Santha Meena Ramamoorthy Date: Tue Mar 6 23:54:51 2018 -0800 staging: rtl8188eu: use __func__ instead of function name Replace occurrence of the function name in a string by reference to __func__, to improve robustness and to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 12 +++---- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 12 +++---- drivers/staging/rtl8188eu/core/rtw_mlme.c | 10 +++--- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 22 ++++++------ drivers/staging/rtl8188eu/core/rtw_recv.c | 44 +++++++++++------------ drivers/staging/rtl8188eu/core/rtw_security.c | 10 +++--- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 4 +-- drivers/staging/rtl8188eu/core/rtw_xmit.c | 50 +++++++++++++------------- 8 files changed, 82 insertions(+), 82 deletions(-) commit c9facd7fc25db75e0e0ee444cc6262d836b4fec2 Author: Santha Meena Ramamoorthy Date: Tue Mar 6 23:55:50 2018 -0800 staging: rtl8188eu: fix typo in comment Fix typo in the words 'transmitted' and 'failure' in the comment. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy Reviewed-by: Vaishali Thakkar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c92e677b20fa389e9e81e21fa96e4520a5fd0ba5 Author: Quytelda Kahja Date: Tue Mar 6 17:31:41 2018 -0800 staging: most: Remove unnecessary usage of BUG_ON(). There is no need for the calls to BUG_ON() in this driver, which are used to check if mbo or mbo->context are NULL; mbo is never NULL, and if mbo->context is NULL it would have already been dereferenced and oopsed before reaching the BUG_ON(). Signed-off-by: Quytelda Kahja Acked-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/core.c | 3 --- 1 file changed, 3 deletions(-) commit d956a1a9d32cb14673f5f03ef607d84d603a5ed4 Author: Kees Cook Date: Wed Mar 7 12:54:44 2018 -0800 staging: lustre: Remove VLA usage The kernel would like to have all stack VLA usage removed[1]. This switches to a simple kasprintf() instead, and in the process fixes an off-by-one between the allocation and the sprintf (allocation did not include NULL byte in calculation). [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Kees Cook Reviewed-by: Rasmus Villemoes Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/xattr.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 10c56b8d93863abb4dbb01a9b9f1b40c336a1c3b Merge: 46e371f 18b8d6b Author: David S. Miller Date: Thu Mar 8 12:51:46 2018 -0500 Merge branch 'ibmvnic-Clean-up-net-close-and-fix-reset-bug' Thomas Falcon says: ==================== ibmvnic: Clean up net close and fix reset bug This patch set cleans up and reorganizes the driver's net_device close function and leverages that to fix up a bug that can occur during some device resets. Some reset cases require the backing adapter to be disabled before continuing, but other cases, such as during a device failover or partition migration, do not require this step. Since the device will not be initialized at this stage and its command-processing queue is closed, do not send the request to disable the device as it could result in an error or timeout disrupting the reset. ==================== Signed-off-by: David S. Miller commit 18b8d6bbad47efd9bd1595c57271fbacc5eb0d46 Author: Thomas Falcon Date: Wed Mar 7 17:51:47 2018 -0600 ibmvnic: Do not disable device during failover or partition migration During a device failover or partition migration reset, it is not necessary to disable the backing adapter since it should not be running yet and its Command-Response Queue is closed. Sending device commands during this time could result in an error or timeout disrupting the reset process. In these cases, just halt transmissions, clean up resources, and continue with reset. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 01d9bd792d1603761dcc2644ccf4cc35a4658ab6 Author: Thomas Falcon Date: Wed Mar 7 17:51:46 2018 -0600 ibmvnic: Reorganize device close Introduce a function to halt network operations and clean up any unused or outstanding socket buffers. Then, during device close, disable backing adapter before halting all queues and performing cleanup. This ensures all backing device operations will be stopped before the driver cleans up shared resources. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit f873866a05cc4ca718e4f2fb6f2601a7869f3e12 Author: Thomas Falcon Date: Wed Mar 7 17:51:45 2018 -0600 ibmvnic: Clean up device close Remove some dead code now that RX pools are being cleaned. This was included to wait until any pending RX queue interrupts are processed, but NAPI polling should be disabled by this point. Another minor change is to use the net device parameter for any print functions instead of accessing it from the adapter structure. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 46e371f0e78a82186a83cbcb4f4b8850417c7dd5 Author: William Tu Date: Wed Mar 7 15:38:48 2018 -0800 openvswitch: fix vport packet length check. When sending a packet to a tunnel device, the dev's hard_header_len could be larger than the skb->len in function packet_length(). In the case of ip6gretap/erspan, hard_header_len = LL_MAX_HEADER + t_hlen, which is around 180, and an ARP packet sent to this tunnel has skb->len = 42. This causes the 'unsign int length' to become super large because it is negative value, causing the later ovs_vport_send to drop it due to over-mtu size. The patch fixes it by setting it to 0. Signed-off-by: William Tu Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/vport.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 55a165a77c0767292caca7d7fb51a7ba68a76074 Merge: 459d153 1fd2c55 Author: David S. Miller Date: Thu Mar 8 12:36:46 2018 -0500 Merge branch 'pernet-convert-part5' Kirill Tkhai says: ==================== Converting pernet_operations (part #5) this series continues to review and to convert pernet_operations to make them possible to be executed in parallel for several net namespaces in the same time. There are mostly netfilter operations (and they should be the last netfilter's), also there are two patches touching pktgen and xfrm. ==================== Signed-off-by: David S. Miller commit 1fd2c55705aebac31bf8f759c0750dc3c796cf47 Author: Kirill Tkhai Date: Wed Mar 7 12:41:23 2018 +0300 net: Convet ipv6_net_ops These pernet_operations are similar to ipv4_net_ops. They are safe to be async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 1 + 1 file changed, 1 insertion(+) commit e8a95ad46378162f22c9293bde276d7c4030f31e Author: Kirill Tkhai Date: Wed Mar 7 12:41:16 2018 +0300 net: Convert ipv4_net_ops These pernet_operations register and unregister bunch of nf_conntrack_l4proto. Exit method unregisters related sysctl, init method calls init_net and get_net_proto. The whole builtin_l4proto4 array has pretty simple init_net and get_net_proto methods. The first one register sysctl table, the second one is just RO memory dereference. So, these pernet_operations are safe to be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 1 + 1 file changed, 1 insertion(+) commit 8dbc6e2eaeccccecd23888bd14c10a2c384c280f Author: Kirill Tkhai Date: Wed Mar 7 12:41:07 2018 +0300 net: Convert iptable_security_net_ops These pernet_operations unregister net::ipv4::iptable_security table. Another net/pernet_operations do not send ipv4 packets to foreign net namespaces. So, we mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv4/netfilter/iptable_security.c | 1 + 1 file changed, 1 insertion(+) commit 65f828c35261c46d848e9d789ccf29c2fe7127a8 Author: Kirill Tkhai Date: Wed Mar 7 12:40:58 2018 +0300 net: Convert iptable_raw_net_ops These pernet_operations unregister net::ipv4::iptable_raw table. Another net/pernet_operations do not send ipv4 packets to foreign net namespaces. So, we mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv4/netfilter/iptable_raw.c | 1 + 1 file changed, 1 insertion(+) commit 06a8a67b5dac661a0f0b865926ceab2e62d512cd Author: Kirill Tkhai Date: Wed Mar 7 12:40:45 2018 +0300 net: Convert iptable_nat_net_ops These pernet_operations unregister net::ipv4::nat_table table. Another net/pernet_operations do not send ipv4 packets to foreign net namespaces. So, we mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv4/netfilter/iptable_nat.c | 1 + 1 file changed, 1 insertion(+) commit 7ba81869d1f6f985e64031e161b4c009cc15be99 Author: Kirill Tkhai Date: Wed Mar 7 12:40:36 2018 +0300 net: Convert iptable_mangle_net_ops These pernet_operations unregister net::ipv4::iptable_mangle table. Another net/pernet_operations do not send ipv4 packets to foreign net namespaces. So, we mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv4/netfilter/iptable_mangle.c | 1 + 1 file changed, 1 insertion(+) commit 93623f2b00297f0eb4437fc2e47ad0d4fd58a3ad Author: Kirill Tkhai Date: Wed Mar 7 12:40:28 2018 +0300 net: Convert arptable_filter_net_ops These pernet_operations unregister net::ipv4::arptable_filter. Another net/pernet_operations do not send arp packets to foreign net namespaces. So, we mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv4/netfilter/arptable_filter.c | 1 + 1 file changed, 1 insertion(+) commit 59d269731e2bcfb72d29f2e0281d6631aef1ff8e Author: Kirill Tkhai Date: Wed Mar 7 12:40:19 2018 +0300 net: Convert pg_net_ops These pernet_operations create per-net pktgen threads and /proc entries. These pernet subsys looks closed in itself, and there are no pernet_operations outside this file, which are interested in the threads. Init and/or exit methods look safe to be executed in parallel. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/core/pktgen.c | 1 + 1 file changed, 1 insertion(+) commit bd54dce0796522b669f5be45b96e02fa94738de9 Author: Kirill Tkhai Date: Wed Mar 7 12:40:09 2018 +0300 net: Convert nfnl_queue_net_ops These pernet_operations register and unregister net::nf::queue_handler and /proc entry. The handler is accessed only under RCU, so this looks safe to convert them. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/nfnetlink_queue.c | 1 + 1 file changed, 1 insertion(+) commit 74f26bbf505a8e1bb9a6ad9726d5bbe625607783 Author: Kirill Tkhai Date: Wed Mar 7 12:40:00 2018 +0300 net: Convert nfnl_log_net_ops These pernet_operations create and destroy /proc entries. Also, exit method unsets nfulnl_logger. The logger is not set by default, and it becomes bound via userspace request. So, they look safe to be made async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/nfnetlink_log.c | 1 + 1 file changed, 1 insertion(+) commit ffdf72bc1eed9a56aa266bde2d425f85b4d4ca18 Author: Kirill Tkhai Date: Wed Mar 7 12:39:51 2018 +0300 net: Convert cttimeout_ops These pernet_operations also look closed in themself. Exit method touch only per-net structures, so it's safe to execute them for several net namespaces in parallel. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/nfnetlink_cttimeout.c | 1 + 1 file changed, 1 insertion(+) commit cf51503a03f7ff89d8152a3132843330be90729e Author: Kirill Tkhai Date: Wed Mar 7 12:39:42 2018 +0300 net: Convert nfnl_acct_ops These pernet_operations look closed in themself, and there are no other users of net::nfnl_acct_list outside. They are safe to be executed for several net namespaces in parallel. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/nfnetlink_acct.c | 1 + 1 file changed, 1 insertion(+) commit 5a8e9be69d163fcd3442c4ed8fbaaaf0c7f464e6 Author: Kirill Tkhai Date: Wed Mar 7 12:39:33 2018 +0300 net: Convert nfnetlink_net_ops These pernet_operations create and destroy net::nfnl socket of NETLINK_NETFILTER code. There are no other places, where such type the socket is created, except these pernet_operations. It seem other pernet_operations depending on CONFIG_NETFILTER_NETLINK send messages to this socket. So, we mark it async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/nfnetlink.c | 1 + 1 file changed, 1 insertion(+) commit c7c5e435e44e585f84472f88b323553c794844c4 Author: Kirill Tkhai Date: Wed Mar 7 12:39:23 2018 +0300 net: Convert nf_tables_net_ops These pernet_operations looks nicely separated per-net. Exit method unregisters net's nf tables objects. We allow them be executed in parallel. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/nf_tables_api.c | 1 + 1 file changed, 1 insertion(+) commit 649b9826cc733fe410207d28d94984354e023b21 Author: Kirill Tkhai Date: Wed Mar 7 12:39:14 2018 +0300 net: Convert xfrm_user_net_ops These pernet_operations create and destroy net::xfrm::nlsk socket of NETLINK_XFRM. There is only entry point, where it's dereferenced, it's xfrm_user_rcv_msg(). There is no in-kernel senders to this socket. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/xfrm/xfrm_user.c | 1 + 1 file changed, 1 insertion(+) commit 997266a4a02de882de11c7abecad0a3a42ac84b3 Author: Kirill Tkhai Date: Wed Mar 7 12:39:06 2018 +0300 net: Convert ip6 tables pernet_operations The pernet_operations: ip6table_filter_net_ops ip6table_mangle_net_ops ip6table_nat_net_ops ip6table_raw_net_ops ip6table_security_net_ops have exit methods, which call ip6t_unregister_table(). ip6table_filter_net_ops has init method registering filter table. Since there must not be in-flight ipv6 packets at the time of pernet_operations execution and since pernet_operations don't send ipv6 packets each other, these pernet_operations are safe to be async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv6/netfilter/ip6table_filter.c | 1 + net/ipv6/netfilter/ip6table_mangle.c | 1 + net/ipv6/netfilter/ip6table_nat.c | 1 + net/ipv6/netfilter/ip6table_raw.c | 1 + net/ipv6/netfilter/ip6table_security.c | 1 + 5 files changed, 5 insertions(+) commit 459d153d9916ea48b1550bbb6f2959dc03bff011 Author: Pieter Jansen van Vuuren Date: Tue Mar 6 18:11:14 2018 +0100 net/sched: cls_flower: Add support to handle first frag as match field Allow setting firstfrag as matching option in tc flower classifier. # tc filter add dev eth0 protocol ip parent ffff: \ flower indev eth0 \ ip_flags firstfrag action mirred egress redirect dev eth1 Signed-off-by: Pieter Jansen van Vuuren Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 1 + net/sched/cls_flower.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 8ba905f1ae64928d67e807139610c1c8d68aa075 Author: Jeffy Chen Date: Fri Mar 2 18:57:56 2018 +0100 drm/rockchip: dw_hdmi: Move HDMI vpll clock enable to bind() The HDMI vpll clock should be enabled when bind() is called. So move the clk_prepare_enable of that clock to bind() function and add the missing clk_disable_unprepare() required in error handling path and unbind(). Fixes: 12b9f204e804 ("drm: bridge/dw_hdmi: add rockchip rk3288 support") Signed-off-by: Jeffy Chen Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180302175757.28192-5-enric.balletbo@collabora.com drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 028a9e5c06d82aefbe4c508e045a1ee3be414cc0 Author: Jeffy Chen Date: Fri Mar 2 18:57:55 2018 +0100 drm/rockchip: inno_hdmi: reorder clk_disable_unprepare call in unbind In bind the clk_prepare_enable of the HDMI pclk is called before adding the i2c_adapter. So it should be the other way around in unbind, first remove the i2c_adapter and then call the clk_disable_unprepare. Fixes: 412d4ae6b7a5 ("drm/rockchip: hdmi: add Innosilicon HDMI support") Signed-off-by: Jeffy Chen Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180302175757.28192-4-enric.balletbo@collabora.com drivers/gpu/drm/rockchip/inno_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61b5ff96d252853d199c6d89b43521c01b6bbdf3 Author: Jeffy Chen Date: Fri Mar 2 18:57:54 2018 +0100 drm/rockchip: inno_hdmi: Fix error handling path. Add missing error handling in bind(). Fixes: 412d4ae6b7a5 ("drm/rockchip: hdmi: add Innosilicon HDMI support") Signed-off-by: Jeffy Chen Signed-off-by: Thierry Escande [moved clk_disable_unprepare reordering in unbind to separate patch] Signed-off-by: Enric Balletbo i Serra Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180302175757.28192-3-enric.balletbo@collabora.com drivers/gpu/drm/rockchip/inno_hdmi.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit e45df2643832867c929f9c77fb17a21e12907b5c Author: Jeffy Chen Date: Fri Mar 2 18:57:53 2018 +0100 drm/rockchip: dw-mipi-dsi: Fix connector and encoder cleanup. In bind()'s error handling path call destroy functions instead of cleanup functions for encoder and connector and reorder to match how is called in bind(). In unbind() call the connector and encoder destroy functions. Signed-off-by: Jeffy Chen Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180302175757.28192-2-enric.balletbo@collabora.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d39d18e0ef738cc8614abd8bb25fb270a4c41801 Author: Andreas Gruenbacher Date: Mon Mar 5 06:24:28 2018 -0700 gfs2: Improve gfs2_block_map comment Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/bmap.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit b9e03f1861d8ee117aebb40e5d975cf355879405 Author: Bob Peterson Date: Wed Feb 14 09:32:39 2018 -0700 GFS2: Only set PageChecked for jdata pages Before this patch, GFS2 was setting the PageChecked flag for ordered write pages. This is unnecessary. The ext3 file system only does it for jdata, and it's only used in jdata circumstances. It only muddies the already murky waters of writing pages in the aops. Signed-off-by: Bob Peterson fs/gfs2/aops.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9bc980cdb9ac2fd2e6c18ba5ba18a6909971a4a2 Author: Bob Peterson Date: Fri Mar 2 06:59:44 2018 -0700 GFS2: Make function gfs2_remove_from_ail static Function gfs2_remove_from_ail is only ever used from log.c, so there is no reason to declare it extern. This patch removes the extern and declares it static. Signed-off-by: Bob Peterson fs/gfs2/log.c | 2 +- fs/gfs2/log.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 83998ccd9bfff881f04ce03f6964f8a83e6c5b54 Author: Andreas Gruenbacher Date: Wed Feb 28 12:48:53 2018 -0700 gfs2: Dirty source inode during rename Mark the source inode dirty during a rename instead of just updating the underlying buffer head. Otherwise, fsync may find the inode clean and will then skip flushing the journal. A subsequent power failure will cause the rename to be lost. This happens in command sequences like: xfs_io -f -c 'pwrite 0 4096' -c 'fsync' foo mv foo bar xfs_io -c 'fsync' bar # power failure Fixes xfstests generic/322, generic/376. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/dir.c | 13 ++----------- fs/gfs2/inode.c | 10 +--------- 2 files changed, 3 insertions(+), 20 deletions(-) commit 174d1232ebc84fcde8f5889d1171c9c7e74a10a7 Author: Andreas Gruenbacher Date: Tue Feb 20 08:03:24 2018 -0700 gfs2: Fix fallocate chunk size The chunk size of allocations in __gfs2_fallocate is calculated incorrectly. The size can collapse, causing __gfs2_fallocate to allocate one block at a time, which is very inefficient. This needs fixing in two places: In gfs2_quota_lock_check, always set ap->allowed to UINT_MAX to indicate that there is no quota limit. This fixes callers that rely on ap->allowed to be set even when quotas are off. In __gfs2_fallocate, reset max_blks to UINT_MAX in each iteration of the loop to make sure that allocation limits from one resource group won't spill over into another resource group. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/file.c | 5 +++-- fs/gfs2/quota.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) commit 9aecbc45a3ceefe57f27ddc232e26e08513c9137 Author: Ville Syrjälä Date: Tue Feb 20 15:48:16 2018 +0200 drm/nouveau: Replace the iturbt_709 prop with the standard COLOR_ENCODING prop Replace the ad-hoc iturbt_709 property with the new standard COLOR_ENCODING property. Compiles, but not tested. v2: Fix typos (Ilia) Cc: Daniel Vetter Cc: nouveau@lists.freedesktop.org Cc: Ben Skeggs Cc: Ilia Mirkin Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180220134816.15229-1-ville.syrjala@linux.intel.com Reviewed-by: Ilia Mirkin Acked-by: Ben Skeggs #irc drivers/gpu/drm/nouveau/dispnv04/overlay.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 08a24239cd46a50f8f5c8ce0cd12d7d6fbfe1807 Merge: 67ae686 cc71921 Author: David S. Miller Date: Thu Mar 8 11:23:38 2018 -0500 Merge branch 'hns3-next' Peng Li says: ==================== fix some bugs for hns3 driver This patchset fix some bugs for hns3 driver. [Patch 1/6 - Patch 3/6] fix bugs related about VF driver. [Patch 3/6 - Patch 6/6] fix the bugs about ethtool_ops.set_channels. ==================== Signed-off-by: David S. Miller commit cc719218e9539720160046a49369dc44dce1889b Author: Peng Li Date: Thu Mar 8 19:41:55 2018 +0800 net: hns3: add support for VF driver inner interface hclgevf_ops.get_tqps_and_rss_info This patch adds support for VF driver inner interface hclgevf_ops.get_tqps_and_rss_info. This interface will be used in the initialization process. Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 678335a123e98e5af8ec50e04f16b59643e2af81 Author: Peng Li Date: Thu Mar 8 19:41:54 2018 +0800 net: hns3: set the max ring num when alloc netdev HNS3 driver should alloc netdev with max support ring num, as driver support change netdev count by ethtool -L. Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 27 ++++++++++++------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 814e0274fd830c1611715ab2c1ba4a7bdb97121b Author: Peng Li Date: Thu Mar 8 19:41:53 2018 +0800 net: hns3: fix the queue id for tqp enable&&reset Command HCLGE_OPC_CFG_COM_TQP_QUEUE should use queue id in the function, but command HCLGE_OPC_RESET_TQP_QUEUE should use global queue id. This patch fixes the queue id about queue enable/disable/reset. Signed-off-by: Peng Li Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 50 +++++++++++----------- 1 file changed, 24 insertions(+), 26 deletions(-) commit f18f0d4d68096ff73eea93c80b1fe5df5514b07f Author: Peng Li Date: Thu Mar 8 19:41:52 2018 +0800 net: hns3: fix endian issue when PF get mbx message flag This patch fixes the endian issue when PF get mbx message flag. Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 090e3b5350d995c8b8d93f817dccd8c1ce9952c5 Author: Peng Li Date: Thu Mar 8 19:41:51 2018 +0800 net: hns3: set the cmdq out_vld bit to 0 after used Driver check the out_vld bit when get a new cmdq BD, if the bit is 1, the BD is valid. driver Should set the bit 0 after used and hw will set the bit 1 if get a valid BD. Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 1 + drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 1 + 2 files changed, 2 insertions(+) commit f5e084b82783baca0df3c0d27bda2926ceaa1caa Author: Peng Li Date: Thu Mar 8 19:41:50 2018 +0800 net: hns3: VF should get the real rss_size instead of rss_size_max VF driver should get the real rss_size which is assigned by host PF, not rss_size_max. Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67ae686b3e1422a819500f35152cdd74f6dab6ce Author: Arkadi Sharshevsky Date: Thu Mar 8 12:52:25 2018 +0200 devlink: Change dpipe/resource get privileges Let dpipe/resource be retrieved by unprivileged users. Signed-off-by: Arkadi Sharshevsky Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/core/devlink.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dcf1bcb6aed7785ccb098163cca5a2f9e4175663 Author: Anders Roxell Date: Thu Mar 8 11:17:23 2018 +0100 selftests/net: enable fragments for fib-onlink-tests We miss CONFIG_* fragments so test fib-onlink-tests.sh can do: ip li add lisa type vrf table 1101 ip li add veth1 type veth peer name veth2 And the follow message occurs if it isn't enabled: Configuring interfaces RTNETLINK answers: Operation not supported This enables for NET_NRF (and friends) and VETH so we can create a vrf table and veth. Fixes: 153e1b84f477 ("selftests: Add FIB onlink tests") Signed-off-by: Anders Roxell Signed-off-by: David S. Miller tools/testing/selftests/net/config | 5 +++++ 1 file changed, 5 insertions(+) commit ae5799dc7ec77fe0382d58cdcba9f6d1204157ae Author: Paolo Abeni Date: Thu Mar 8 10:29:30 2018 +0100 ipvlan: properly annotate rx_handler access The rx_handler field is rcu-protected, but I forgot to use the proper accessor while refactoring netif_is_ipvlan_port(). Such function only check the rx_handler value, so it is safe, but we need to properly read rx_handler via rcu_access_pointer() to avoid sparse warnings. Fixes: 1ec54cb44e67 ("net: unpollute priv_flags space") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f6487500326d323ea6e09464069a14a83e612f2 Author: Mikko Perttunen Date: Tue Feb 20 13:58:07 2018 +0200 arm64: defconfig: Enable NVIDIA Tegra194 support Enable NVIDIA Tegra194 support in the default 64-bit ARM configuration. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 507c655a06c8553a67122c371608b024b997b0e0 Author: Thierry Reding Date: Mon Feb 12 16:09:43 2018 +0100 soc/tegra: pmc: Pass PMC to tegra_powergate_power_up() tegra_powergate_sequence_power_up() makes up a struct tegra_powergate from scratch in order to reuse the same code as used by the generic PM domain implementation. However, subsequent patches will need to access the struct tegra_pmc * embedded in the powergate structure, so we need to make sure we always pass it in. Tested-by: Hector Martin Tested-by: Andre Heider Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/soc/tegra/pmc.c | 1 + 1 file changed, 1 insertion(+) commit a263394a096e3578eb8dd77039b961c84a7392e7 Author: Peter De Schrijver Date: Thu Jan 25 16:00:13 2018 +0200 soc/tegra: pmc: MBIST work around for Tegra210 Apply the memory built-in self test work around when ungating certain Tegra210 power domains. Signed-off-by: Peter De Schrijver Reviewed-by: Jon Hunter Tested-by: Jon Hunter Tested-by: Hector Martin Tested-by: Andre Heider Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/soc/tegra/pmc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 0c7f650e106c3f045d9f8d1c1c7eb6f5596508b8 Author: Krish Sadhukhan Date: Tue Feb 20 21:24:39 2018 -0500 KVM: nVMX: Enforce NMI controls on vmentry of L2 guests According to Intel SDM 26.2.1.1, the following rules should be enforced on vmentry: * If the "NMI exiting" VM-execution control is 0, "Virtual NMIs" VM-execution control must be 0. * If the “virtual NMIs” VM-execution control is 0, the “NMI-window exiting” VM-execution control must be 0. This patch enforces these rules when entering an L2 guest. Signed-off-by: Krish Sadhukhan Reviewed-by: Liran Alon Reviewed-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit 56327f54d95c05791fd01e59a9dc03e3a4eafd21 Author: Mikko Perttunen Date: Tue Feb 20 13:58:08 2018 +0200 soc/tegra: pmc: Add Tegra194 compatibility string The Tegra194 PMC is mostly compatible with Tegra186, including in all currently supported features. As such, add a new compatibility string but point to the existing Tegra186 SoC data for now. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/soc/tegra/pmc.c | 1 + 1 file changed, 1 insertion(+) commit 6f9ed07fde03870ec247dcaf244313fe32521545 Author: Mikko Perttunen Date: Tue Feb 20 13:58:07 2018 +0200 soc/tegra: Add Tegra194 SoC configuration option Add the configuration option to enable support for the Tegra194 system- on-chip. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/soc/tegra/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d9e575127b4169061d94c9982c4f0e8aae208c78 Author: Sylwester Nawrocki Date: Wed Mar 7 18:46:25 2018 +0100 ASoC: Use proper DT compatible string for Hardkernel Odroid boards The Odroid boards are manufactured by Hardkernel, not Samsung. New compatible string entries are added, with "hardkernel," instead of "samsung," vendor prefix. Support for the old compatible strings is going to be removed after some time. Signed-off-by: Sylwester Nawrocki Reviewed-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/samsung,odroid.txt | 6 +++--- sound/soc/samsung/odroid.c | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) commit c679fa6e3aaa5c58fc514b5b88cfa82774b8d390 Merge: bdb7013 4fd98e3 Author: Rob Herring Date: Thu Mar 8 09:21:07 2018 -0600 Merge branch 'dtc-update' into dt/next commit 4957a2f1f2205214b2ca325872a7508fa91e1096 Author: Marcel Ziswiler Date: Sat Feb 10 02:38:06 2018 +0100 ARM: tegra: apalis-tk1: Support v1.2 hardware revision Support the V1.2 hardware revision with the following pin muxing changes: Ddc_scl_pv4 and ddc_sda_pv5 previously used as Apalis GPIO3 and GPIO4 are now used as DDC pins. Gen2_i2c_scl_pt5 and gen2_i2c_sda_pt6 previously used as DDC pins are now used as USB power enable signals. Usb_vbus_en0_pn4 and usb_vbus_en1_pn5 previously used as USB power enable signals are now used as GPIO3 and GPIO4. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts | 250 +++ arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi | 2052 +++++++++++++++++++++++ 3 files changed, 2303 insertions(+) commit 0d900bbbae9b3b6a7ff0fc0d7070b8dbe163d17a Author: Marcel Ziswiler Date: Sat Feb 10 02:38:05 2018 +0100 ARM: tegra: apalis-tk1: Copyright period, spurious newlines Update the copyright period and get rid of some spurious newlines. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-apalis-eval.dts | 6 ++---- arch/arm/boot/dts/tegra124-apalis.dtsi | 11 +---------- 2 files changed, 3 insertions(+), 14 deletions(-) commit 818e8729e1038e3847a4cb2ed7ad8003a1d037ab Author: Marcel Ziswiler Date: Sat Feb 10 02:38:04 2018 +0100 ARM: tegra: apalis-tk1: Hog group for ethernet, PCIe, reset GPIOs The Apalis TK1 module uses some dedicated GPIOs as I210 gigabit Ethernet controller reset and to control RESET_MOCI aka reset module output carrier input on MXM3 pin 26. The Apalis Evaluation Board furthermore uses Apalis GPIO7 on MXM3 pin 15 as reset signal for its PLX PEX 8605 PCIe Switch. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-apalis-eval.dts | 10 ++++++++++ arch/arm/boot/dts/tegra124-apalis.dtsi | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) commit 405698f07271ee116892579c30494efa53dee333 Author: Marcel Ziswiler Date: Sat Feb 10 02:38:03 2018 +0100 ARM: tegra: apalis-tk1: Add missing as3722 gpio0 configuration As the AS3722 GPIO0 is also a not connected on our Apalis TK1 module explicitly configure it to high-impedance as well. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-apalis.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e18dc296205fca37dfdc28f10adff93c016d0410 Author: Marcel Ziswiler Date: Sat Feb 10 02:38:02 2018 +0100 ARM: tegra: apalis-tk1: Activate PWM pin muxing for pwm3 Activate PWM pin muxing for Apalis PWM3. Note that the same PWM3 is already active on pu6 being Apalis BKL1_PWM as well. Therefore exporting that one for raw sysfs access will fail and one has to revert to using the PWM backlight. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-apalis.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d174e9465d8e10f88213734b6e84d7d0676c08e7 Author: Marcel Ziswiler Date: Sat Feb 10 02:38:01 2018 +0100 ARM: tegra: apalis-tk1: Set critical trips Set "critical" trip temperatures for cpu, gpu, mem and pllx thermal zones. These trips can trigger shut down or reset. Similar to commit 40823f8e267f ("arm: tegra: set critical trips for Tegra124"). Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-apalis.dtsi | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) commit 0338753a57aaf331cb7016bbfdba6086bf93149c Author: Colin Ian King Date: Thu Mar 8 14:32:49 2018 +0100 ASoC: cygnus: remove redundant assignment to pointer 'res' The pointer res is being initialized with a value that is never read and re-assigned immediately after, hence the initialization is redundant and can be removed. Cleans up clang warning: sound/soc/bcm/cygnus-ssp.c:1284:19: warning: Value stored to 'res' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/bcm/cygnus-ssp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 563554b53e43a24fc902181e371cb27f06d8e526 Author: Marcel Ziswiler Date: Sat Feb 10 02:36:38 2018 +0100 ARM: tegra: apalis/colibri: Remove unneeded reg property As described in Documentation/devicetree/bindings/input/touchscreen/stmpe.txt there is no 'reg' property under stmpe_touchscreen, so remove it to fix the following build warning with W=1: arch/arm/boot/dts/tegra30-apalis-eval.dtb: Warning (unit_address_vs_reg): Node /i2c@7000d000/stmpe811@41/stmpe_touchscreen has a reg or ranges property, but no unit name Similar to commit 89277e8e2679 ("ARM: dts: imx6qdl-apalis: Remove unneeded reg property"). Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra30-apalis.dtsi | 1 - arch/arm/boot/dts/tegra30-colibri.dtsi | 1 - 2 files changed, 2 deletions(-) commit 29a62759b0a07047df4be0a7c32d249e20beb27c Author: Marcel Ziswiler Date: Sat Feb 10 02:36:37 2018 +0100 ARM: tegra: apalis/colibri: Use correct compatible for RTC All Toradex Carrier Boards use a st,m41t0 compatible RTC. Compared to a st,m41t00 this RTC has also an oscillator fail bit which allows to detect when the RTC lost track of time. Similar to commit c53bec16b150 ("ARM: dts: colibri/apalis: use correct compatible for RTC") covering our NXP i.MX and Vybrid based modules. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-apalis-eval.dts | 2 +- arch/arm/boot/dts/tegra30-apalis-eval.dts | 2 +- arch/arm/boot/dts/tegra30-colibri-eval-v3.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 1c3389e6cb99d36196df322dd40aa73cd06f983b Author: Marcel Ziswiler Date: Sat Feb 10 02:36:36 2018 +0100 ARM: tegra: Fix I2C bus frequencies on Apalis/Colibri Use a faster speed of 400 kbit/s for regular I2C busses. Use a slower speed of 10 kbit/s for DDC/EDID to improve reliability. Use a slower speed of 100 kbit/s for power I2C to be within specs of the LM95245 temperature sensor. While at it further annotate I2C pin usage. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-apalis-eval.dts | 5 ++--- arch/arm/boot/dts/tegra124-apalis.dtsi | 2 +- arch/arm/boot/dts/tegra20-colibri-512.dtsi | 16 +++++++++++----- arch/arm/boot/dts/tegra30-apalis-eval.dts | 2 +- arch/arm/boot/dts/tegra30-apalis.dtsi | 2 +- arch/arm/boot/dts/tegra30-colibri-eval-v3.dts | 2 +- arch/arm/boot/dts/tegra30-colibri.dtsi | 2 +- 7 files changed, 18 insertions(+), 13 deletions(-) commit 1014e895f808f144d91e06815175648b4ae14c0a Author: Marcel Ziswiler Date: Sat Feb 10 02:33:25 2018 +0100 ARM: tegra: venice2: Remove duplicate pcie-1 node Get rid of duplicate pcie-1 node. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-venice2.dts | 5 ----- 1 file changed, 5 deletions(-) commit 4e0be1be4d2c40c436b9e41562d221e1ca48377c Author: Marcel Ziswiler Date: Sat Feb 10 02:33:24 2018 +0100 ARM: tegra: beaver: Remove invalid uses of rsvd1 Remove invalid uses of rsvd1 from Beaver device tree. Replace by actual function names of pinmux option 1. Taken from https://github.com/NVIDIA/tegra-pinmux-scripts commit b0aceda108c0 ("remove invalid uses of rsvd1 from beaver config"). Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra30-beaver.dts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit b604ef9ceb113c5093841f1e9385f9ce5a3ef276 Author: Marcel Ziswiler Date: Sat Feb 10 02:33:23 2018 +0100 ARM: tegra: Use proper IRQ type definitions This switches a few interrupt definitions that were using either GPIO_ACTIVE_HIGH or GPIO_ACTIVE_LOW as IRQ type, which is invalid. This is mostly a cosmetic change, that doesn't affect any driver. Analogous to Paul's commit 38333641b6dd ("ARM: tegra: nyan: Use proper IRQ type definitions"). Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra114-dalmore.dts | 2 +- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 2 +- arch/arm/boot/dts/tegra124-venice2.dts | 4 ++-- arch/arm/boot/dts/tegra30-apalis.dtsi | 4 ++-- arch/arm/boot/dts/tegra30-beaver.dts | 2 +- arch/arm/boot/dts/tegra30-colibri-eval-v3.dts | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) commit 2c7305569296719094c9f67481249e2e61dbee6a Author: Marcel Ziswiler Date: Sat Feb 10 02:33:22 2018 +0100 dt/bindings: Fix binding examples for Tegra GMI controller Fix devicetree binding examples for the Generic Memory Interface (GMI) bus driver found on Tegra SOCs. While at it also remove double new lines as a left over from Rob's commit 4da722ca19f3 ("dt-bindings: Remove "status" from examples"). Signed-off-by: Marcel Ziswiler Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/bus/nvidia,tegra20-gmi.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 24193c5de470358d0ed70e1f8e58fdaf83823b95 Author: Borislav Petkov Date: Tue Mar 6 15:21:42 2018 +0100 x86/MCE: Cleanup and complete struct mce fields definitions The struct is part of the uapi, document that fact and all fields properly and fix formatting. No functional changes. Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: Tony Luck Link: https://lkml.kernel.org/r/20180306142143.19990-3-bp@alien8.de arch/x86/include/uapi/asm/mce.h | 52 ++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 24 deletions(-) commit 422caa5f7a455920369039d04c6070eb50d6146b Merge: 8a331f4 b3b7c47 Author: Thomas Gleixner Date: Thu Mar 8 15:52:08 2018 +0100 Merge branch 'ras/urgent' into ras/core Pick up urgent fixes to apply further development changes. commit 2427b432e63b4b911100f717c48289195b7a7d62 Author: Stephane Eranian Date: Wed Mar 7 23:59:45 2018 -0800 perf tools: Update quipper information This patch updates the links to the Quipper library. It is now available from GitHub and has been updated. Reported-by: Lakshman Annadorai Signed-off-by: Stephane Eranian Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1520495985-2147-1-git-send-email-eranian@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf.data-file-format.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 0b4b6b78a3ce07023052e44b967f5d42fa3d802c Author: Thomas Richter Date: Thu Mar 8 13:09:13 2018 +0100 perf annotate: Handle s390 PC relative load and store instruction. S390 has several load and store instructions with target operand addressing relative to the program counter, for example lrl, lgrl, strl, stgrl. These instructions are handled similar to x86. Objdump output displays those instructions as: 9595c: c4 2d 00 09 9c 54 lgrl %r7,1c8540 This output is parsed (like on x86) and perf annotate shows those lines as: lgrl %r7,mp_+0x60 This patch handles the s390 specific instruction parsing for PC relative load and store instructions. Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180308120913.14802-1-tmricht@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/s390/annotate/instructions.c | 63 ++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit bb848c14f80d93059cb10b1e1446cc6823d77142 Author: Jin Yao Date: Tue Feb 27 17:38:47 2018 +0800 perf annotate: Support to display the IPC/Cycle in TUI mode Unlike the perf report interactive annotate mode, the perf annotate doesn't display the IPC/Cycle even if branch info is recorded in perf data file. perf record -b ... perf annotate function It should show IPC/cycle, but it doesn't. This patch lets perf annotate support the displaying of IPC/Cycle if branch info is in perf data. For example, perf annotate compute_flag Percent│ IPC Cycle │ │ │ Disassembly of section .text: │ │ 0000000000400640 : │ compute_flag(): │ volatile int count; │ static unsigned int s_randseed; │ │ __attribute__((noinline)) │ int compute_flag() │ { 22.96 │1.18 584 sub $0x8,%rsp │ int i; │ │ i = rand() % 2; 23.02 │1.18 1 → callq rand@plt │ │ return i; 27.05 │3.37 mov %eax,%edx │ } │3.37 add $0x8,%rsp │ { │ int i; │ │ i = rand() % 2; │ │ return i; │3.37 shr $0x1f,%edx │3.37 add %edx,%eax │3.37 and $0x1,%eax │3.37 sub %edx,%eax │ } 26.97 │3.37 2 ← retq Note that, this patch only supports TUI mode. For stdio, now it just keeps original behavior. Will support it in a follow-up patch. $ perf annotate compute_flag --stdio Percent | Source code & Disassembly of div for cycles:ppp (7993 samples) ------------------------------------------------------------------------------ : : : : Disassembly of section .text: : : 0000000000400640 : : compute_flag(): : volatile int count; : static unsigned int s_randseed; : : __attribute__((noinline)) : int compute_flag() : { 0.29 : 400640: sub $0x8,%rsp # +100.00% : int i; : : i = rand() % 2; 42.93 : 400644: callq 400490 # -100.00% (p:100.00%) : : return i; 0.10 : 400649: mov %eax,%edx # +100.00% : } 0.94 : 40064b: add $0x8,%rsp : { : int i; : : i = rand() % 2; : : return i; 27.02 : 40064f: shr $0x1f,%edx 0.15 : 400652: add %edx,%eax 1.24 : 400654: and $0x1,%eax 2.08 : 400657: sub %edx,%eax : } 25.26 : 400659: retq # -100.00% (p:100.00%) Signed-off-by: Jin Yao Acked-by: Andi Kleen Link: http://lkml.kernel.org/r/20180223170210.GC7045@tassilo.jf.intel.com Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1519724327-7773-1-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-annotate.c | 88 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 82 insertions(+), 6 deletions(-) commit ea85ab24c502720d2eb3dec30bedb6df06d4900b Author: Wang YanQing Date: Thu Mar 8 11:28:50 2018 +0800 perf report: Provide libtraceevent with a kernel symbol resolver So that beautifiers wanting to resolve kernel function addresses to names can do its work, and when we use "perf report" for output of "perf kmem record", we will get kernel symbol output. This patch affect the output of "perf report" for the record data generated by "perf kmem record" looks like below: Before patch: 0.01% call_site=ffffffff814e5828 ptr=0x99bb000 bytes_req=3616 bytes_alloc=4096 gfp_flags=GFP_ATOMIC 0.01% call_site=ffffffff81370b87 ptr=0x428a3060 bytes_req=32 bytes_alloc=32 gfp_flags=GFP_KERNEL|GFP_ZERO After patch: 0.01% (aa_alloc_task_context+0x27) call_site=ffffffff81370b87 ptr=0x428a3060 bytes_req=32 bytes_alloc=32 gfp_flags=GFP_KERNEL|GFP_ZERO 0.01% (__tty_buffer_request_room+0x88) call_site=ffffffff814e5828 ptr=0x99bb000 bytes_req=3616 bytes_alloc=4096 gfp_flags=GFP_ATOMIC Signed-off-by: Wang YanQing Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180308032850.GA12383@udknight-ThinkPad-E550 Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-report.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5fb3d8b7b50d2101b0c15d2e90264deb7a01c2d8 Author: Jiri Olsa Date: Wed Mar 7 16:50:20 2018 +0100 perf build: Force llvm/clang test compile output to .make.output So we can see the output of feature compile in following files: tools/build/feature/test-llvm.make.output tools/build/feature/test-llvm-version.make.output tools/build/feature/test-clang.make.output Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180307155020.32613-20-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/feature/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 36f9dc33b9128b85e096f6fff83e05d49448b28e Author: Jiri Olsa Date: Wed Mar 7 16:50:19 2018 +0100 perf build: Add llvm/clang make targets to FILES So they can follow the OUTPUT variable setup as the rest of the features. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180307155020.32613-19-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/feature/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bd476684584ecc3e269167d595c6dd5375011ca0 Author: Jiri Olsa Date: Wed Mar 7 16:50:18 2018 +0100 perf build: Add llvm/clang/cxx make tests into FEATURE_TESTS_EXTRA So we can see the status when we build perf, like: $ make LIBCLANGLLVM=1 VF=1 ... cxx: [ on ] ... llvm: [ on ] ... llvm-version: [ on ] ... clang: [ on ] Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180307155020.32613-18-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile.feature | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ed3956293f2913047c622c238b5bf7ff4fe250bf Author: Jiri Olsa Date: Wed Mar 7 16:50:17 2018 +0100 perf tools: Update tags with .cpp files We have some .cpp files, make ctags/cscope aware of them. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180307155020.32613-17-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e2091cedd51bf5306bcd5dd498d2977abfe20e88 Author: Jiri Olsa Date: Wed Mar 7 16:50:08 2018 +0100 perf tools: Add MEM_TOPOLOGY feature to perf data file Adding MEM_TOPOLOGY feature to perf data file, that will carry physical memory map and its node assignments. The format of data in MEM_TOPOLOGY is as follows: 0 - version | for future changes 8 - block_size_bytes | /sys/devices/system/memory/block_size_bytes 16 - count | number of nodes For each node we store map of physical indexes for each node: 32 - node id | node index 40 - size | size of bitmap 48 - bitmap | bitmap of memory indexes that belongs to node | /sys/devices/system/node/node/memory The MEM_TOPOLOGY could be displayed with following report command: $ perf report --header-only -I ... # memory nodes (nr 1, block size 0x8000000): # 0 [7G]: 0-23,32-69 Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180307155020.32613-8-jolsa@kernel.org [ Rename 'index' to 'idx', as this breaks the build in rhel5, 6 and other systems where this is used by glibc headers ] Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/bitmap.h | 2 +- tools/perf/util/env.h | 9 ++ tools/perf/util/header.c | 305 +++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/header.h | 1 + 4 files changed, 316 insertions(+), 1 deletion(-) commit 5cedb413a63d452356aa634e0d4ffcc24f7dbcb5 Author: Jiri Olsa Date: Wed Mar 7 16:50:07 2018 +0100 perf c2c: Use mem_info refcnt logic Switch to refcnt logic instead of duplicating mem_info objects. No functional change, just saving some memory. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180307155020.32613-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 9f87498f1cb72958c6f8725eb93d2f7ef81fa11e Author: Jiri Olsa Date: Wed Mar 7 16:50:06 2018 +0100 perf tools: Add refcnt into struct mem_info It's passed along several hists entries in --hierarchy mode, so it's better we keep track of it. The current fail I see is that it gets removed in hierarchy --mem-mode mode, where it's shared in the different hierarchies, but removed from the template hist entry, so the report crashes. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180307155020.32613-6-jolsa@kernel.org [ Rename mem_info__aloc() to mem_info__new(), to fix the typo and use the convention for constructors ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 4 ++-- tools/perf/util/machine.c | 2 +- tools/perf/util/symbol.c | 22 ++++++++++++++++++++++ tools/perf/util/symbol.h | 19 ++++++++++++++++--- 4 files changed, 41 insertions(+), 6 deletions(-) commit 915b4e27f1d32b3c7de4874ac1e3fe1f801151ca Author: Jiri Olsa Date: Wed Mar 7 16:50:05 2018 +0100 perf record: Remove progname from struct record It's no longer used. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180307155020.32613-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 3 --- 1 file changed, 3 deletions(-) commit 20a8a3cf90215cebd916048e51a5bfa6c3707778 Author: Jiri Olsa Date: Wed Mar 7 16:50:04 2018 +0100 perf record: Move machine variable down the function It's used far more down to be declared on the top of the __cmd_record. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180307155020.32613-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e971a5a8399a5e84164239a5c2d59b8a51314241 Author: Jiri Olsa Date: Wed Mar 7 16:50:03 2018 +0100 perf report: Display perf.data header info Display more header info from perf.data file, following values: $ perf report -i perf.data --header-only ... # header version : 1 # data offset : 424 # data size : 3364280 # feat offset : 3364704 It's handy for debuging. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180307155020.32613-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 8ef278bb9305e1269f236013718801fe06a183d1 Author: Jiri Olsa Date: Wed Mar 7 16:50:02 2018 +0100 perf report: Fix the output for stdio events list Changing the output header for reporting forced groups via --groups option on non grouped events, like: $ perf record -e 'cycles,instructions' $ perf report --stdio --group Before: # Samples: 24 of event 'anon group { cycles:u, instructions:u }' After: # Samples: 24 of events 'cycles:u, instructions:u' Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Fixes: ad52b8cb4886 ("perf report: Add support to display group output for non group events") Link: http://lkml.kernel.org/r/20180307155020.32613-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-report.c | 17 ++++++++++++++--- tools/perf/ui/browsers/hists.c | 5 +++-- tools/perf/util/evsel.c | 20 ++++++++++++++++---- tools/perf/util/evsel.h | 1 + 4 files changed, 34 insertions(+), 9 deletions(-) commit cbfc8d0a85aa72ad66227c69b08904143dc73bbb Author: Peter De Schrijver Date: Thu Jan 25 16:00:11 2018 +0200 clk: tegra: add fence_delay for clock registers To ensure writes to clock registers have properly propagated through the clock control logic and state machines, we need to ensure the writes have been posted in the registers and wait for 1us after that. Signed-off-by: Peter De Schrijver Reviewed-by: Jon Hunter Tested-by: Jon Hunter Tested-by: Hector Martin Tested-by: Andre Heider Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/clk/tegra/clk.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 89e423c3f14c4a87d124e4a5437dc337b90b6f29 Author: Peter De Schrijver Date: Thu Jan 25 16:00:10 2018 +0200 clk: tegra: Add la clock for Tegra210 This clock is needed by the memory built-in self test work around. Signed-off-by: Peter De Schrijver Reviewed-by: Jon Hunter Tested-by: Jon Hunter Tested-by: Hector Martin Tested-by: Andre Heider Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 14 ++++++++++++++ include/dt-bindings/clock/tegra210-car.h | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) commit 4c9a27a6c66d4427f3cba4019d4ba738fe99fa87 Author: Marcel Ziswiler Date: Thu Feb 22 15:38:25 2018 +0100 ARM: tegra: Fix ULPI regression on Tegra20 Since commit f8f8f1d04494 ("clk: Don't touch hardware when reparenting during registration") ULPI has been broken on Tegra20 leading to the following error message during boot: [ 1.974698] ulpi_phy_power_on: ulpi write failed [ 1.979384] tegra-ehci c5004000.usb: Failed to power on the phy [ 1.985434] tegra-ehci: probe of c5004000.usb failed with error -110 Debugging through the changes and finally also consulting the TRM revealed that rather than the CDEV2 clock off OSC requiring such pin muxing actually the PLL_P_OUT4 clock is in use. It looks like so far it just worked by chance of that one having been enabled which Stephen's commit now changed when reparenting sclk away from pll_p_out4 leaving that one disabled. Fix this by properly assigning the PLL_P_OUT4 clock as the ULPI PHY clock. Signed-off-by: Marcel Ziswiler Reviewed-by: Dmitry Osipenko Reviewed-by: Rob Herring Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra20.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7ca2a709dbce8ef712fc829f686672d0c0256bf Author: Marcel Ziswiler Date: Thu Feb 22 15:38:25 2018 +0100 dt-bindings: phy: Clarify ULPI PHY source clock cdev2 is not actually a clock on Tegra20 but rather a pinmux pad group. PLL_P_OUT4 is the source clock for the ULPI PHY and is output to the DAP_MCLK2 pad. Signed-off-by: Marcel Ziswiler Reviewed-by: Dmitry Osipenko Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/phy/nvidia,tegra20-usb-phy.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0275e4aa9510a90de22341a79e4b21e2048b275e Author: Thierry Reding Date: Thu Mar 8 14:54:46 2018 +0100 ARM: tegra: Add unit address to VDE IRAM area Add the missing unit address for the VDE IRAM area node in accordance with the mmio-sram device tree binding. Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra20.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55f939c2eb1a50a184b96bb714d896d661b662ca Author: Dmitry Osipenko Date: Sun Feb 18 20:01:46 2018 +0300 ARM: tegra: Add video decoder node on Tegra30 Add device tree node for the Video Decoder Engine found on Tegra30 SoC's. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra30.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit ea8570362a293735461ba60704bc5db4bf3fa269 Author: Dmitry Osipenko Date: Sun Feb 18 20:01:45 2018 +0300 ARM: tegra: Add IRAM node on Tegra30 IRAM is a static RAM that consists of four contiguous 64 KiB blocks, it is currently used to store CPU resume code, utilized by the video decoder engine and could be used as a general-purpose fast memory. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra30.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit f2b9ba871beb92fd6884b957acb14621b15fbe2b Author: Ard Biesheuvel Date: Tue Mar 6 17:15:32 2018 +0000 arm64/kernel: kaslr: reduce module randomization range to 4 GB We currently have to rely on the GCC large code model for KASLR for two distinct but related reasons: - if we enable full randomization, modules will be loaded very far away from the core kernel, where they are out of range for ADRP instructions, - even without full randomization, the fact that the 128 MB module region is now no longer fully reserved for kernel modules means that there is a very low likelihood that the normal bottom-up allocation of other vmalloc regions may collide, and use up the range for other things. Large model code is suboptimal, given that each symbol reference involves a literal load that goes through the D-cache, reducing cache utilization. But more importantly, literals are not instructions but part of .text nonetheless, and hence mapped with executable permissions. So let's get rid of our dependency on the large model for KASLR, by: - reducing the full randomization range to 4 GB, thereby ensuring that ADRP references between modules and the kernel are always in range, - reduce the spillover range to 4 GB as well, so that we fallback to a region that is still guaranteed to be in range - move the randomization window of the core kernel to the middle of the VMALLOC space Note that KASAN always uses the module region outside of the vmalloc space, so keep the kernel close to that if KASAN is enabled. Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/Kconfig | 7 +++---- arch/arm64/kernel/kaslr.c | 20 ++++++++++++-------- arch/arm64/kernel/module.c | 7 ++++--- include/linux/sizes.h | 4 ++++ 4 files changed, 23 insertions(+), 15 deletions(-) commit 5e8307b9c6f40526f290663e5a4de0f78bb0446a Author: Ard Biesheuvel Date: Tue Mar 6 17:15:31 2018 +0000 arm64: module: don't BUG when exceeding preallocated PLT count When PLTs are emitted at relocation time, we really should not exceed the number that we counted when parsing the relocation tables, and so currently, we BUG() on this condition. However, even though this is a clear bug in this particular piece of code, we can easily recover by failing to load the module. So instead, return 0 from module_emit_plt_entry() if this condition occurs, which is not a valid kernel address, and can hence serve as a flag value that makes the relocation routine bail out. Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/module-plts.c | 3 ++- arch/arm64/kernel/module.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 1320f76897c5e4893aff68d0bfc1797a5ba543ff Author: Julia Lawall Date: Sat Jan 27 15:28:28 2018 +0100 firmware: tegra: adjust tested variable Check the variable that was most recently initialized. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression x, y, f, g, e, m; statement S1,S2,S3,S4; @@ x = f(...); if (\(<+...x...+>\&e\)) S1 else S2 ( x = g(...); | m = g(...,&x,...); | y = g(...); *if (e) S3 else S4 ) // Signed-off-by: Julia Lawall Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/firmware/tegra/bpmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8f3f500e09c2c457efc2fcbfe8b7f815f2e6a0e Author: Thierry Reding Date: Wed Feb 7 18:45:56 2018 +0100 drm/tegra: fb: Implement ->fb_mmap() callback This fixes hangs with legacy applications that use the mmap() syscall on the fbdev device to map framebuffer memory. The fbdev implementation for mmap() creates a mapping that conflicts with DRM usage and causes a hang when the memory is accessed through the mapping. Reported-by: Marcel Ziswiler Signed-off-by: Thierry Reding Tested-by: Stefan Agner Tested-by: Marcel Ziswiler Reported-by: Marcel Ziswiler Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/fb.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 04c0746663bd3ae3cce5e02d5b32c8ade2a833b8 Author: Thierry Reding Date: Wed Feb 7 18:45:55 2018 +0100 drm/tegra: gem: Make __tegra_gem_mmap() available more widely This function allows mapping a GEM object into a virtual memory address space, which makes it useful outside of the GEM code. While at it, rename the function so it doesn't clash with the function that implements the DRM_TEGRA_GEM_MMAP IOCTL. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/gem.c | 7 +++---- drivers/gpu/drm/tegra/gem.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) commit b6d7974d10b30bf3baed7e50d8e574f5184cfdd1 Author: Thierry Reding Date: Wed Feb 7 18:45:54 2018 +0100 drm/tegra: gem: Reshuffle declarations Move declarations in the gem.h header file into the same order as the corresponding definitions in gem.c. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/gem.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b8656c673a6bc1563604beeab802169ec437a9ea Author: Mikko Perttunen Date: Tue Feb 20 13:58:12 2018 +0200 arm64: tegra: Add device tree for the Tegra194 P2972-0000 board Add device tree files for the Tegra194 P2972-0000 development board. The board consists of the P2888 compute module and the P2822 baseboard. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/Makefile | 1 + arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 248 +++++++++++++++++++++ arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 16 ++ 3 files changed, 265 insertions(+) commit 5425fb15d8ee645314bddb305b5663c4ebfb495c Author: Mikko Perttunen Date: Tue Feb 20 13:58:11 2018 +0200 arm64: tegra: Add Tegra194 chip device tree Add the chip-level device tree, including binding headers, for the NVIDIA Tegra194 "Xavier" system-on-chip. Only a small subset of devices are initially available, enough to boot to UART console. Signed-off-by: Mikko Perttunen Reviewed-by: Rob Herring Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194.dtsi | 344 +++++++++++++++++++++++++ include/dt-bindings/clock/tegra194-clock.h | 321 +++++++++++++++++++++++ include/dt-bindings/gpio/tegra194-gpio.h | 61 +++++ include/dt-bindings/power/tegra194-powergate.h | 35 +++ include/dt-bindings/reset/tegra194-reset.h | 152 +++++++++++ 5 files changed, 913 insertions(+) commit ff0286cbccacc300f4fb47c60a9e5629889dda04 Author: Mikko Perttunen Date: Tue Feb 20 13:58:10 2018 +0200 dt-bindings: tegra: Add documentation for nvidia,tegra194-pmc The Tegra194 power management controller has one additional register aperture to be specified in the device tree node. Signed-off-by: Mikko Perttunen Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.txt | 2 ++ 1 file changed, 2 insertions(+) commit 5be2dae281e8ac9137120fdd08a62f766529e626 Author: Mikko Perttunen Date: Tue Feb 20 13:58:09 2018 +0200 dt-bindings: tegra: Add missing chips and NVIDIA boards Add compatibility strings for supported but undocumented Tegra chips (Tegra114/124/132/210/186/194) and reference boards. Signed-off-by: Mikko Perttunen Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/arm/tegra.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 1abb081e41a718d73183b0e1b76bfff66e92f7e1 Author: Mikko Perttunen Date: Tue Feb 20 13:58:06 2018 +0200 firmware: tegra: Simplify channel management The Tegra194 BPMP only implements 5 channels (4 to BPMP, 1 to CCPLEX), and they are not placed contiguously in memory. The current channel management in the BPMP driver does not support this. Simplify and refactor the channel management such that only one atomic transmit channel and one receive channel are supported, and channels are not required to be placed contiguously in memory. The same configuration also works on T186 so we end up with less code. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/firmware/tegra/bpmp.c | 142 +++++++++++++++++++----------------------- include/soc/tegra/bpmp.h | 4 +- 2 files changed, 66 insertions(+), 80 deletions(-) commit 636ba13aec8a0198d3fa4e2246e291a19694b50f Author: Chris Dickens Date: Sun Dec 31 18:59:43 2017 -0800 usb: gadget: composite: remove duplicated code in OS desc handling When the host wants to fetch OS descriptors, it sends two requests. The first is only for the header and the second for the full amount specified by the header in the first request. The OS descriptor handling code is distinguishing the header-only requests based on the wLength of the setup packet, but the same code is executed in both cases to construct the actual header. Simplify this by always constructing the header and then filling out the rest of the request if the wLength is greater than the size of the header. Also remove the duplicate code for queueing the request to ep0 by adding a goto label. Signed-off-by: Chris Dickens Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 72 +++++++++++++----------------------------- 1 file changed, 22 insertions(+), 50 deletions(-) commit 5d6ae4f0da8a64a185074dabb1b2f8c148efa741 Author: Chris Dickens Date: Sun Dec 31 18:59:42 2017 -0800 usb: gadget: composite: fix incorrect handling of OS desc requests When handling an OS descriptor request, one of the first operations is to zero out the request buffer using the wLength from the setup packet. There is no bounds checking, so a wLength > 4096 would clobber memory adjacent to the request buffer. Fix this by taking the min of wLength and the request buffer length prior to the memset. While at it, define the buffer length in a header file so that magic numbers don't appear throughout the code. When returning data to the host, the data length should be the min of the wLength and the valid data we have to return. Currently we are returning wLength, thus requests for a wLength greater than the amount of data in the OS descriptor buffer would return invalid (albeit zero'd) data following the valid descriptor data. Fix this by counting the number of bytes when constructing the data and using this when determining the length of the request. Signed-off-by: Chris Dickens Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 40 +++++++++++++++++++--------------------- include/linux/usb/composite.h | 3 +++ 2 files changed, 22 insertions(+), 21 deletions(-) commit f3768997013e1c7d625ca427150644f80eb5900e Author: Vardan Mikayelyan Date: Mon Dec 25 15:17:45 2017 +0400 usb: dwc2: eliminate irq parameter from dwc2_gadget_init The irq is available in hsotg already, so there's no need to pass it as separate function parameter. Signed-off-by: Vardan Mikayelyan Signed-off-by: Grigor Tovmasyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 4 ++-- drivers/usb/dwc2/gadget.c | 7 +++---- drivers/usb/dwc2/platform.c | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) commit 13431c60705f385b7f1c7bb749a93b84cf55c83f Author: Ladislav Michl Date: Mon Jan 22 17:05:21 2018 +0100 usb: gadget: udc: atmel: Use devm_ioremap_resource() As devm_ioremap_resource() checks for valid resource, make use of it instead of testing ourselves. As a bonus memory region is requested. Acked-by: Nicolas Ferre Signed-off-by: Ladislav Michl Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/atmel_usba_udc.c | 34 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 21 deletions(-) commit a127f4f228104d391a6aa62a9a57b2ba697f90c2 Author: Colin Ian King Date: Fri Jan 26 15:39:00 2018 +0000 USB: gadget: function: remove redundant initialization of 'tv_nexus' Pointer tv_nexus is being initialized a value and this is never read and is later being updated with the same value. Remove the redundant initialization so that the assignment to tv_nexus is performed later and more local to when it is being read. Cleans up clang warning: drivers/usb/gadget/function/f_tcm.c:1097:25: warning: Value stored to 'tv_nexus' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_tcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac87e560f7c0f91b62012e9a159c0681a373b922 Author: Wolfram Sang Date: Tue Feb 6 09:50:40 2018 +0100 usb: gadget: udc: change comparison to bitshift when dealing with a mask Due to a typo, the mask was destroyed by a comparison instead of a bit shift. Reported-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/goku_udc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6eb5ac2e99545b574b7a6422037ae790213b27ef Author: Stefan Agner Date: Mon Feb 12 00:19:11 2018 +0100 usb: phy: ab8500: use correct enum type The local variable event is of type enum usb_phy_events. Use the same enum value USB_EVENT_NONE instead of UX500_MUSB_NONE. This avoids a warning when building with clang: drivers/usb/phy/phy-ab8500-usb.c:906:30: warning: implicit conversion from enumeration type 'enum ux500_musb_vbus_id_status' to different enumeration type 'enum usb_phy_events' [-Wenum-conversion] enum usb_phy_events event = UX500_MUSB_NONE; ~~~~~ ^~~~~~~~~~~~~~~ Signed-off-by: Stefan Agner Signed-off-by: Felipe Balbi drivers/usb/phy/phy-ab8500-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9556f70c00534a0160d6456026c59d84407449f2 Author: Fabio Estevam Date: Mon Feb 12 00:24:05 2018 -0200 usb: phy: mxs: Staticize mxs_charger_secondary_detection() mxs_charger_secondary_detection() is only used in this file, so make it static. This fixes the following sparse warning: drivers/usb/phy/phy-mxs-usb.c:581:23: warning: symbol 'mxs_charger_secondary_detection' was not declared. Should it be static? Acked-by: Jun Li Signed-off-by: Fabio Estevam Signed-off-by: Felipe Balbi drivers/usb/phy/phy-mxs-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ddd05979f89cbbbd94dd4186f5ed5b2262cc1d9f Author: Souptick Joarder Date: Wed Feb 14 23:59:13 2018 +0530 usb: gadget: udc: bdc: Use dma_pool_zalloc Use dma_pool_zalloc instead of dma_pool_alloc + memset Signed-off-by: Souptick Joarder Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/bdc/bdc_ep.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6d5b53c1fd5c3d57c92667c8ff644557bcdb9656 Author: Felipe Balbi Date: Thu Feb 15 13:03:38 2018 +0200 usb: dwc3: debugfs: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Reviewed-by: Andy Shevchenko Signed-off-by: Felipe Balbi drivers/usb/dwc3/debugfs.c | 79 ++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 49 deletions(-) commit 2247276989a16f84fc00930b407ab648b0b52cf6 Author: Andy Shevchenko Date: Wed Feb 14 18:08:23 2018 +0200 USB: gadget: pxa27x: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Signed-off-by: Andy Shevchenko Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/pxa27x_udc.c | 42 +++---------------------------------- 1 file changed, 3 insertions(+), 39 deletions(-) commit 5aaa036b18709157270f762c929a70494ad09828 Author: Andy Shevchenko Date: Wed Feb 14 18:08:22 2018 +0200 USB: gadget: pxa25x: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Signed-off-by: Andy Shevchenko Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/pxa25x_udc.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) commit 688d4ca31796f53934d326363f667e897216e91d Author: Andy Shevchenko Date: Wed Feb 14 18:08:21 2018 +0200 USB: gadget: gr: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Signed-off-by: Andy Shevchenko Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/gr_udc.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 8802559e9372fb2fdc47abf35c97b460316b4d67 Author: Andy Shevchenko Date: Wed Feb 14 18:08:20 2018 +0200 USB: gadget: bcm63xx: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: Kevin Cernekee Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Signed-off-by: Andy Shevchenko Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/bcm63xx_udc.c | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) commit ec082f7021bf66ccd3028fe48b59a669730cf76d Author: Andy Shevchenko Date: Wed Feb 14 18:08:18 2018 +0200 USB: dwc2: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: John Youn Signed-off-by: Andy Shevchenko Signed-off-by: Felipe Balbi drivers/usb/dwc2/debugfs.c | 84 ++++------------------------------------------ 1 file changed, 6 insertions(+), 78 deletions(-) commit 0b58a77ca8792bd7798ef3a4d865c57694ec74fc Author: Thomas Richter Date: Wed Mar 7 14:43:25 2018 +0100 perf annotate: Fix s390 target function disassembly 'perf annotate' displays function call assembler instructions with a right arrow. Hitting enter on this line/instruction causes the browser to disassemble this target function and show it on the screen. On s390 this results in an error message 'The called function was not found.' The function call assembly line parsing does not handle the s390 bras and brasl instructions. Function call__parse expects the target as first operand: callq e9140 <__fxstat> S390 has a register number as first operand: brasl %r14,41d60 Therefore the target addresses on s390 are always zero which is an invalid address. Introduce a s390 specific call parsing function which skips the first operand on s390. Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180307134325.96106-1-tmricht@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/s390/annotate/instructions.c | 53 +++++++++++++++++++++++++++- tools/perf/util/annotate.c | 2 +- 2 files changed, 53 insertions(+), 2 deletions(-) commit 599a5beb78ad95181677e7919f54dbd64b404cf7 Author: Adrian Hunter Date: Wed Mar 7 16:02:29 2018 +0200 perf intel-pt: Adjust overlap-checking to support sampling mode Adjust overlap-checking to support sampling mode. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1520431349-30689-10-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 13f89dbafe73e56fd317c078bb1d3a45fd94ab7b Author: Adrian Hunter Date: Wed Mar 7 16:02:28 2018 +0200 perf intel-pt: Remove a check for sampling mode Intel PT code already has some preparation for AUX area sampling mode. However the implementation has changed from the first proposal and one of the side-effects is that it will not be impossible to support snapshot mode and sampling mode at the same time. Although there are no plans to support it, let validation (not yet implemented) control whether it is allowed rather than low-level functions. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1520431349-30689-9-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 3 --- 1 file changed, 3 deletions(-) commit 9c6650647de430a6ad9707c51b3342f23af0d2ee Author: Adrian Hunter Date: Wed Mar 7 16:02:27 2018 +0200 perf intel-pt: Tidy old_buffer handling in intel_pt_get_trace() intel_pt_get_trace() fixes overlaps between the current buffer and the previous buffer ('old_buffer'). However the previous buffer might not have had usable data (no PSB) so the comparison must be made against the previous buffer that had usable data. Tidy that by keeping a pointer for that purpose in struct intel_pt_queue. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1520431349-30689-8-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 1c071c80d9661c263b043969fd92305037bf9773 Author: Adrian Hunter Date: Wed Mar 7 16:02:26 2018 +0200 perf intel-pt: Get rid of intel_pt_use_buffer_pid_tid() With the new way sampling support will be implemented, intel_pt_use_buffer_pid_tid() will not be needed. Get rid of it. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1520431349-30689-7-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 39 +++------------------------------------ 1 file changed, 3 insertions(+), 36 deletions(-) commit 15d599a25c7649807a2b66f7100efcf030665068 Author: Adrian Hunter Date: Wed Mar 7 16:02:25 2018 +0200 perf intel-pt/bts: In auxtrace_record__init_intel() evlist is never NULL Tidy auxtrace_record__init_intel() slightly by recognizing that evlist is never NULL. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1520431349-30689-6-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/auxtrace.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 91d29b288aed3406caf7c454bf2b898c96cfd177 Author: Adrian Hunter Date: Wed Mar 7 16:02:24 2018 +0200 perf intel-pt: Fix timestamp following overflow timestamp_insn_cnt is used to estimate the timestamp based on the number of instructions since the last known timestamp. If the estimate is not accurate enough decoding might not be correctly synchronized with side-band events causing more trace errors. However there are always timestamps following an overflow, so the estimate is not needed and can indeed result in more errors. Suppress the estimate by setting timestamp_insn_cnt to zero. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1520431349-30689-5-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 1 + 1 file changed, 1 insertion(+) commit 1c196a6c771c47a2faa63d38d913e03284f73a16 Author: Adrian Hunter Date: Wed Mar 7 16:02:23 2018 +0200 perf intel-pt: Fix error recovery from missing TIP packet When a TIP packet is expected but there is a different packet, it is an error. However the unexpected packet might be something important like a TSC packet, so after the error, it is necessary to continue from there, rather than the next packet. That is achieved by setting pkt_step to zero. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1520431349-30689-4-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 1 + 1 file changed, 1 insertion(+) commit 63d8e38f6ae6c36dd5b5ba0e8c112e8861532ea2 Author: Adrian Hunter Date: Wed Mar 7 16:02:22 2018 +0200 perf intel-pt: Fix sync_switch sync_switch is a facility to synchronize decoding more closely with the point in the kernel when the context actually switched. The flag when sync_switch is enabled was global to the decoding, whereas it is really specific to the CPU. The trace data for different CPUs is put on different queues, so add sync_switch to the intel_pt_queue structure and use that in preference to the global setting in the intel_pt structure. That fixes problems decoding one CPU's trace because sync_switch was disabled on a different CPU's queue. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1520431349-30689-3-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit 117db4b27bf08dba412faf3924ba55fe970c57b8 Author: Adrian Hunter Date: Wed Mar 7 16:02:21 2018 +0200 perf intel-pt: Fix overlap detection to identify consecutive buffers correctly Overlap detection was not not updating the buffer's 'consecutive' flag. Marking buffers consecutive has the advantage that decoding begins from the start of the buffer instead of the first PSB. Fix overlap detection to identify consecutive buffers correctly. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1520431349-30689-2-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 62 ++++++++++------------ .../perf/util/intel-pt-decoder/intel-pt-decoder.h | 2 +- tools/perf/util/intel-pt.c | 5 +- 3 files changed, 34 insertions(+), 35 deletions(-) commit b9bae2c841b73eac6bfed510bc24a3051754ff51 Author: Kan Liang Date: Tue Mar 6 10:36:07 2018 -0500 perf mmap: Simplify perf_mmap__read_init() It isn't necessary to pass the 'start', 'end' and 'overwrite' arguments to perf_mmap__read_init(). The data is stored in the struct perf_mmap. Discard the parameters. Signed-off-by: Kan Liang Suggested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1520350567-80082-8-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/tests/perf-time-to-tsc.c | 3 +-- tools/perf/builtin-kvm.c | 3 +-- tools/perf/builtin-top.c | 3 +-- tools/perf/builtin-trace.c | 3 +-- tools/perf/tests/backward-ring-buffer.c | 3 +-- tools/perf/tests/bpf.c | 3 +-- tools/perf/tests/code-reading.c | 3 +-- tools/perf/tests/keep-tracking.c | 3 +-- tools/perf/tests/mmap-basic.c | 3 +-- tools/perf/tests/openat-syscall-tp-fields.c | 3 +-- tools/perf/tests/perf-record.c | 3 +-- tools/perf/tests/sw-clock.c | 3 +-- tools/perf/tests/switch-tracking.c | 3 +-- tools/perf/tests/task-exit.c | 3 +-- tools/perf/util/mmap.c | 10 ++-------- tools/perf/util/mmap.h | 3 +-- tools/perf/util/python.c | 3 +-- 17 files changed, 18 insertions(+), 40 deletions(-) commit 0019dc87b928380e2c85fcd8694e512079d7b580 Author: Kan Liang Date: Tue Mar 6 10:36:06 2018 -0500 perf mmap: Simplify perf_mmap__read_event() It isn't necessary to pass the 'overwrite', 'start' and 'end' argument to perf_mmap__read_event(). Discard them. Signed-off-by: Kan Liang Suggested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1520350567-80082-7-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/tests/perf-time-to-tsc.c | 2 +- tools/perf/builtin-kvm.c | 2 +- tools/perf/builtin-top.c | 2 +- tools/perf/builtin-trace.c | 2 +- tools/perf/tests/backward-ring-buffer.c | 2 +- tools/perf/tests/bpf.c | 2 +- tools/perf/tests/code-reading.c | 2 +- tools/perf/tests/keep-tracking.c | 2 +- tools/perf/tests/mmap-basic.c | 2 +- tools/perf/tests/openat-syscall-tp-fields.c | 2 +- tools/perf/tests/perf-record.c | 2 +- tools/perf/tests/sw-clock.c | 2 +- tools/perf/tests/switch-tracking.c | 2 +- tools/perf/tests/task-exit.c | 2 +- tools/perf/util/mmap.c | 5 +---- tools/perf/util/mmap.h | 4 +--- tools/perf/util/python.c | 2 +- 17 files changed, 17 insertions(+), 22 deletions(-) commit d6ace3df43049a46aa1f5596c0c8d75433321437 Author: Kan Liang Date: Tue Mar 6 10:36:05 2018 -0500 perf mmap: Simplify perf_mmap__consume() It isn't necessary to pass the 'overwrite' argument to perf_mmap__consume(). Discard it. Signed-off-by: Kan Liang Suggested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1520350567-80082-6-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/tests/perf-time-to-tsc.c | 2 +- tools/perf/builtin-kvm.c | 4 ++-- tools/perf/builtin-top.c | 2 +- tools/perf/builtin-trace.c | 2 +- tools/perf/tests/code-reading.c | 2 +- tools/perf/tests/keep-tracking.c | 2 +- tools/perf/tests/mmap-basic.c | 2 +- tools/perf/tests/openat-syscall-tp-fields.c | 2 +- tools/perf/tests/perf-record.c | 2 +- tools/perf/tests/sw-clock.c | 2 +- tools/perf/tests/switch-tracking.c | 2 +- tools/perf/tests/task-exit.c | 2 +- tools/perf/util/mmap.c | 6 +++--- tools/perf/util/mmap.h | 2 +- tools/perf/util/python.c | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) commit bdec8b2f7eed4f16b764ca258487d26f8079f5ff Author: Kan Liang Date: Tue Mar 6 10:36:04 2018 -0500 perf mmap: Use stored 'overwrite' in perf_mmap__consume() The 'overwrite' is set at allocation. It will not be changed. Using it to replace the parameter of perf_mmap__consume(). The parameters will be discarded later. No functional change. Signed-off-by: Kan Liang Suggested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1520350567-80082-5-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/mmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b9de0f6e507b2f0ee305aba338b79941deb5a461 Author: Kan Liang Date: Tue Mar 6 10:36:03 2018 -0500 perf mmap: Use the stored data in perf_mmap__read_event() Using the 'start', 'end' and 'overwrite' which are stored in struct perf_mmap to replace the parameters of perf_mmap__read_event(). The parameters will be discarded later. No functional change. Signed-off-by: Kan Liang Suggested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1520350567-80082-4-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/mmap.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 07a9461da67292ffdf3f4a02522caf475b1151d7 Author: Kan Liang Date: Tue Mar 6 10:36:02 2018 -0500 perf mmap: Use the stored scope data in perf_mmap__push() Using the 'start' and 'end' which are stored in struct perf_mmap to replace the temporary 'start' and 'end'. The temporary variables will be discarded later. It doesn't need to pass 'overwrite' to perf_mmap__push(). It's stored in struct perf_mmap. Signed-off-by: Kan Liang Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1520350567-80082-3-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 2 +- tools/perf/util/mmap.c | 24 ++++++++++++------------ tools/perf/util/mmap.h | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) commit 4fda3459e3c2e5ca35d304646aeeb811242537b2 Author: Kan Liang Date: Tue Mar 6 10:36:01 2018 -0500 perf mmap: Store mmap scope in struct perf_mmap() There is too much boilerplate in the perf_mmap__read*() interfaces. The 'start' and 'end' variables should be stored in struct perf_mmap at initialization. They will be used later. The old 'startp' and 'endp' pointers are used by perf_mmap__read_event() now. They cannot be removed. So the old 'startp/endp' and new 'md->start/md->end' will exist simultaneously now. The old one will be removed later. Signed-off-by: Kan Liang Suggested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1520350567-80082-2-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/mmap.c | 12 ++++++++---- tools/perf/util/mmap.h | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) commit 2c5f6d876b4edda8740f5a2826cf9b1a67fa76fb Author: Kan Liang Date: Tue Mar 6 10:36:00 2018 -0500 perf evlist: Store 'overwrite' in struct perf_mmap It has been determined that the map is for overwrite mode (evlist->overwrite_mmap) or non-overwrite mode (evlist->mmap) when calling perf_evlist__alloc_mmap(). Store the information in struct perf_mmap, which will be used later to simplify the perf_mmap__read*() interfaces. Signed-off-by: Kan Liang Suggested-by: Jiri Olsa Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1520350567-80082-1-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evlist.c | 8 +++++--- tools/perf/util/mmap.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) commit c199c11dce197b12ff884ac0cfcb527b1164788b Author: Agustin Vega-Frias Date: Tue Mar 6 09:04:44 2018 -0500 perf pmu: Auto-merge PMU events created by prefix or glob match Auto-merge for these events was disabled when auto-merging of non-alias events was disabled in commit 63ce844 (perf stat: Only auto-merge events that are PMU aliases). Non-merging of legacy events is preserved: $ perf stat -ag -e cache-misses,cache-misses sleep 1 Performance counter stats for 'system wide': 86,323 cache-misses 86,323 cache-misses 1.002623307 seconds time elapsed But prefix or glob matching auto-merges the events created: $ perf stat -a -e l3cache/read-miss/ sleep 1 Performance counter stats for 'system wide': 328 l3cache/read-miss/ 1.002627008 seconds time elapsed $ perf stat -a -e l3cache_0_[01]/read-miss/ sleep 1 Performance counter stats for 'system wide': 172 l3cache/read-miss/ 1.002627008 seconds time elapsed As with events created with aliases, auto-merging can be suppressed with the --no-merge option: $ perf stat -a -e l3cache/read-miss/ --no-merge sleep 1 Performance counter stats for 'system wide': 67 l3cache/read-miss/ 67 l3cache/read-miss/ 63 l3cache/read-miss/ 60 l3cache/read-miss/ 1.002622192 seconds time elapsed Signed-off-by: Agustin Vega-Frias Acked-by: Andi Kleen Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timur Tabi Cc: linux-arm-kernel@lists.infradead.org Change-Id: I0a47eed54c05e1982ca964d743b37f50f60c508c Link: http://lkml.kernel.org/r/1520345084-42646-4-git-send-email-agustinv@codeaurora.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-stat.txt | 14 +++++++++----- tools/perf/util/parse-events.c | 13 +++---------- tools/perf/util/parse-events.h | 2 +- tools/perf/util/parse-events.y | 4 ++-- 4 files changed, 15 insertions(+), 18 deletions(-) commit 8c5421c016a4ef7fd0141fe3a1ad221feba12f92 Author: Agustin Vega-Frias Date: Tue Mar 6 09:04:43 2018 -0500 perf pmu: Display pmu name when printing unmerged events in stat To simplify creation of events accross multiple instances of the same type of PMU stat supports two methods for creating multiple events from a single event specification: 1. A prefix or glob can be used in the PMU name. 2. Aliases, which are listed immediately after the Kernel PMU events by perf list, are used. When the --no-merge option is passed and these events are displayed individually the PMU name is lost and it's not possible to see which count corresponds to which pmu: $ perf stat -a -e l3cache/read-miss/ --no-merge ls > /dev/null Performance counter stats for 'system wide': 67 l3cache/read-miss/ 67 l3cache/read-miss/ 63 l3cache/read-miss/ 60 l3cache/read-miss/ 0.001675706 seconds time elapsed $ perf stat -a -e l3cache_read_miss --no-merge ls > /dev/null Performance counter stats for 'system wide': 12 l3cache_read_miss 17 l3cache_read_miss 10 l3cache_read_miss 8 l3cache_read_miss 0.001661305 seconds time elapsed This change adds the original pmu name to the event. For dynamic pmu events the pmu name is restored in the event name: $ perf stat -a -e l3cache/read-miss/ --no-merge ls > /dev/null Performance counter stats for 'system wide': 63 l3cache_0_3/read-miss/ 74 l3cache_0_1/read-miss/ 64 l3cache_0_2/read-miss/ 74 l3cache_0_0/read-miss/ 0.001675706 seconds time elapsed For alias events the name is added after the event name: $ perf stat -a -e l3cache_read_miss --no-merge ls > /dev/null Performance counter stats for 'system wide': 10 l3cache_read_miss [l3cache_0_3] 12 l3cache_read_miss [l3cache_0_1] 10 l3cache_read_miss [l3cache_0_2] 17 l3cache_read_miss [l3cache_0_0] 0.001661305 seconds time elapsed Signed-off-by: Agustin Vega-Frias Acked-by: Andi Kleen Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timur Tabi Cc: linux-arm-kernel@lists.infradead.org Change-Id: I8056b9eda74bda33e95065056167ad96e97cb1fb Link: http://lkml.kernel.org/r/1520345084-42646-3-git-send-email-agustinv@codeaurora.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 29 ++++++++++++++++++++++++++++- tools/perf/util/evsel.c | 1 + tools/perf/util/evsel.h | 1 + tools/perf/util/parse-events.c | 8 +++++++- 4 files changed, 37 insertions(+), 2 deletions(-) commit b2b9d3a3f0211c5d08c7befdf9d4adad48cda315 Author: Agustin Vega-Frias Date: Tue Mar 6 09:04:42 2018 -0500 perf pmu: Support wildcards on pmu name in dynamic pmu events Starting on v4.12 event parsing code for dynamic pmu events already supports prefix-based matching of multiple pmus when creating dynamic events. E.g., in a system with the following dynamic pmus: mypmu_0 mypmu_1 mypmu_2 mypmu_4 passing mypmu// as an event spec will result in the creation of the event in all of the pmus. This change expands this matching through the use of fnmatch so glob-like expressions can be used to create events in multiple pmus. E.g., in the system described above if a user only wants to create the event in mypmu_0 and mypmu_1, mypmu_[01]// can be passed. Signed-off-by: Agustin Vega-Frias Acked-by: Andi Kleen Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: linux-arm-kernel@lists.infradead.org Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timur Tabi Change-Id: Icb25653fc5d5239c20f3bffdfdf4ab4c9c9bb20b Link: http://lkml.kernel.org/r/1520454947-16977-1-git-send-email-agustinv@codeaurora.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-list.txt | 8 +++++++- tools/perf/Documentation/perf-stat.txt | 13 +++++++++++++ tools/perf/util/parse-events.l | 2 +- tools/perf/util/parse-events.y | 14 ++++++++++++-- 4 files changed, 33 insertions(+), 4 deletions(-) commit cf07a60f03f06d6298f4e70b3865bd5faac21c3b Author: Joonas Lahtinen Date: Thu Mar 8 14:49:39 2018 +0200 drm/i915: Update DRIVER_DATE to 20180308 Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ed5c94a85bafc541376bf7e3c8c43b3ac25233db Merge: 702791f 991ecef Author: Joonas Lahtinen Date: Thu Mar 8 14:36:10 2018 +0200 Merge tag 'gvt-next-2018-03-08' of https://github.com/intel/gvt-linux into drm-intel-next-queued gvt-next-2018-03-08 - big refactor for shadow ppgtt (Changbin) - KBL context save/restore via LRI cmd (Weinan) - misc smatch fixes (Zhenyu) - Properly unmap dma for guest page (Changbin) - other misc fixes (Xiong, etc.) Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180308023152.oi4ialn5uxetbruf@zhen-hp.sh.intel.com commit 702791f7f20473813e613b7899d2c5ba5dc86b04 Author: Weinan Li Date: Tue Mar 6 10:15:57 2018 +0800 drm/i915: add schedule out notification of preempted but completed request There is one corner case missing schedule out notification of the preempted request. The preempted request is just completed when preemption happen, then it will be canceled and won't be resubmitted later, GVT-g will lost the schedule out notification. Here add schedule out notification if found the preempted request has been completed. v2: - refine description, add completed check and notification in execlists_cancel_port_requests. (Chris) v3: - use ternary confitional, remove local variable. (Tvrtko) Cc: Chris Wilson Signed-off-by: Weinan Li Signed-off-by: Zhenyu Wang Reviewed-by: Tvrtko Ursulin Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/1520302557-25079-1-git-send-email-weinan.z.li@intel.com drivers/gpu/drm/i915/intel_lrc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit e21c963c0fe3dc6d8a5c23474eb8f560b184132a Author: Jan Kiszka Date: Wed Mar 7 08:39:18 2018 +0100 MAINTAINERS: Add entry for Jailhouse Signed-off-by: Jan Kiszka Signed-off-by: Thomas Gleixner Cc: jailhouse-dev@googlegroups.com Cc: linux-pci@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: Andy Shevchenko Cc: Bjorn Helgaas Link: https://lkml.kernel.org/r/8be8af4084d862faa43d55c7bae94af7e0da1609.1520408357.git.jan.kiszka@siemens.com MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 8364e1f8379c7f9d3e63f127a585f889906b3e10 Author: Jan Kiszka Date: Wed Mar 7 08:39:17 2018 +0100 x86/jailhouse: Allow to use PCI_MMCONFIG without ACPI Jailhouse does not use ACPI, but it does support MMCONFIG. Make sure the latter can be built without having to enable ACPI as well. Primarily, its required to make the AMD mmconf-fam10h_64 depend upon MMCONFIG and ACPI, instead of just the former. Saves some bytes in the Jailhouse non-root kernel. Signed-off-by: Jan Kiszka Signed-off-by: Thomas Gleixner Cc: jailhouse-dev@googlegroups.com Cc: linux-pci@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: Andy Shevchenko Cc: Bjorn Helgaas Link: https://lkml.kernel.org/r/788bbd5325d1922235e9562c213057425fbc548c.1520408357.git.jan.kiszka@siemens.com arch/x86/Kconfig | 6 +++++- arch/x86/kernel/Makefile | 2 +- arch/x86/kernel/cpu/amd.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) commit b45c9f3656b691ab7324c7eaefb3416bea0326d8 Author: Jan Kiszka Date: Wed Mar 7 08:39:16 2018 +0100 x86: Consolidate PCI_MMCONFIG configs Since e279b6c1d329 ("x86: start unification of arch/x86/Kconfig.*"), there exist two PCI_MMCONFIG entries, one from the original i386 and another from x86_64. Consolidate both entries into a single one. Signed-off-by: Jan Kiszka Signed-off-by: Thomas Gleixner Cc: jailhouse-dev@googlegroups.com Cc: linux-pci@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: Andy Shevchenko Cc: Bjorn Helgaas Link: https://lkml.kernel.org/r/2a0ccd51ea6f7996e07162918228e23bdc1fbb03.1520408357.git.jan.kiszka@siemens.com arch/x86/Kconfig | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 55027a7772b1a9c36fb9731fc6c847b6a59c5bef Author: Jan Kiszka Date: Wed Mar 7 08:39:15 2018 +0100 x86: Align x86_64 PCI_MMCONFIG with 32-bit variant Allow to enable PCI_MMCONFIG when only SFI is present and make this option default on. This will help consolidating both into one Kconfig statement. Signed-off-by: Jan Kiszka Signed-off-by: Thomas Gleixner Cc: jailhouse-dev@googlegroups.com Cc: linux-pci@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: Andy Shevchenko Cc: Bjorn Helgaas Link: https://lkml.kernel.org/r/a2faf78c54f340f5549149e8b679c95950dae83d.1520408357.git.jan.kiszka@siemens.com arch/x86/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6fa4a94e150be25d02547d51f03b4bc34aaec32f Author: Otavio Pontes Date: Wed Mar 7 08:39:14 2018 +0100 x86/jailhouse: Enable PCI mmconfig access in inmates Use the PCI mmconfig base address exported by jailhouse in boot parameters in order to access the memory mapped PCI configuration space. [Jan: rebased, fixed !CONFIG_PCI_MMCONFIG, used pcibios_last_bus] Signed-off-by: Otavio Pontes Signed-off-by: Jan Kiszka Signed-off-by: Thomas Gleixner Reviewed-by: Andy Shevchenko Cc: jailhouse-dev@googlegroups.com Cc: linux-pci@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: Bjorn Helgaas Link: https://lkml.kernel.org/r/2ee9e4401fa22377b3965893a558120f169be82b.1520408357.git.jan.kiszka@siemens.com arch/x86/include/asm/pci_x86.h | 2 ++ arch/x86/kernel/jailhouse.c | 8 ++++++++ arch/x86/pci/mmconfig-shared.c | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) commit 690f4304104f37e473bd5e43fc5247f5cd35b225 Author: Jan Kiszka Date: Wed Mar 7 08:39:13 2018 +0100 PCI: Scan all functions when running over Jailhouse Per PCIe r4.0, sec 7.5.1.1.9, multi-function devices are required to have a function 0. Therefore, Linux scans for devices at function 0 (devfn 0/8/16/...) and only scans for other functions if function 0 has its Multi-Function Device bit set or ARI or SR-IOV indicate there are more functions. The Jailhouse hypervisor may pass individual functions of a multi-function device to a guest without passing function 0, which means a Linux guest won't find them. Change Linux PCI probing so it scans all function numbers when running as a guest over Jailhouse. This is technically prohibited by the spec, so it is possible that PCI devices without the Multi-Function Device bit set may have unexpected behavior in response to this probe. Originally-by: Benedikt Spranger Signed-off-by: Jan Kiszka Signed-off-by: Thomas Gleixner Reviewed-by: Andy Shevchenko Acked-by: Bjorn Helgaas Cc: jailhouse-dev@googlegroups.com Cc: Benedikt Spranger Cc: linux-pci@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Link: https://lkml.kernel.org/r/06e279b2a3e06cf6689ab3975f8ab592bba02362.1520408357.git.jan.kiszka@siemens.com arch/x86/pci/legacy.c | 4 +++- drivers/pci/probe.c | 22 +++++++++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) commit 63338a38db955cb4e0352c11b78732157c78d30b Author: Jan Kiszka Date: Wed Mar 7 08:39:12 2018 +0100 jailhouse: Provide detection for non-x86 systems Implement jailhouse_paravirt() via device tree probing on architectures != x86. Will be used by the PCI core. Signed-off-by: Jan Kiszka Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Cc: jailhouse-dev@googlegroups.com Cc: Mark Rutland Cc: linux-pci@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: Andy Shevchenko Cc: Rob Herring Cc: Bjorn Helgaas Link: https://lkml.kernel.org/r/dae9fe0c6e63141c28ca90492fa5712b4c33ffb5.1520408357.git.jan.kiszka@siemens.com Documentation/devicetree/bindings/jailhouse.txt | 8 ++++++++ arch/x86/include/asm/jailhouse_para.h | 2 +- include/linux/hypervisor.h | 17 +++++++++++++++-- 3 files changed, 24 insertions(+), 3 deletions(-) commit 52586b089cc12d4878e56ee98a4d110fa801758a Author: Ralf Ramsauer Date: Wed Mar 7 17:07:34 2018 +0100 x86/cpuid: Switch to 'static const' specifier This is the only spot where the 'const static' specifier is used; everywhere else 'static const' is preferred, as static should be the first specifier. This is just a cosmetic fix that aligns this, no functional change. Signed-off-by: Ralf Ramsauer Signed-off-by: Thomas Gleixner Cc: Andi Kleen Cc: Gayatri Kammela Link: https://lkml.kernel.org/r/20180307160734.6691-1-ralf.ramsauer@oth-regensburg.de arch/x86/kernel/cpu/cpuid-deps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8dc12538dd14480ffcbcbf18b80dc641ee37e9de Author: Lorenzo Pieralisi Date: Wed Feb 28 15:11:03 2018 +0000 ACPI/IORT: Remove obsolete ACPI_IORT_SMMU_V3_CAVIUM_CN99XX define To defeat ACPICA<->kernel merge order dependencies a preprocessor define value was introduced in the IORT compilation unit according to IORT revision C, IORT_SMMU_V3_CAVIUM_CN99XX, so that even if the value was not defined in ACPICA headers the IORT kernel layer would still be able to function and use it. Since commit 0c2021c047ba ("ACPICA: IORT: Update SMMU models for revision C") finally added the define in ACPICA headers, as required by ACPICA IORT support, the preprocessor definition in the IORT kernel compilation unit has become obsolete and can be removed. Signed-off-by: Lorenzo Pieralisi Acked-by: Robin Murphy Cc: Will Deacon Cc: Hanjun Guo Cc: Sudeep Holla Cc: Catalin Marinas Cc: Robin Murphy Cc: "Rafael J. Wysocki" drivers/acpi/arm64/iort.c | 5 ----- 1 file changed, 5 deletions(-) commit 6c47506361ecd9591813bbaaca518f8a76162a3d Author: Lorenzo Pieralisi Date: Thu Feb 8 09:58:52 2018 +0000 ACPI/IORT: Remove temporary iort_get_id_mapping_index() ACPICA guard In IORT issue C SMMUv3 IORT nodes gained an additional field (DeviceID mapping index) so that the SMMUv3 can describe its MSI interrupts. Referring to it in the kernel requires ACPICA changes and in order to prevent kernel<->ACPICA dependencies kernel code depending on the SMMUv3 DeviceID mapping index field was guarded with an ACPICA version conditional. ACPICA changes introducing DeviceID mapping index in the IORT structs were integrated in the kernel with: commit 4c106aa411ee ("ACPICA: iasl: Add SMMUv3 device ID mapping index support") so the temporary ACPICA guard has become stale and can be removed. Signed-off-by: Lorenzo Pieralisi Acked-by: Hanjun Guo Cc: Will Deacon Cc: Hanjun Guo Cc: Sudeep Holla Cc: Catalin Marinas Cc: "Rafael J. Wysocki" drivers/acpi/arm64/iort.c | 7 ------- 1 file changed, 7 deletions(-) commit c38d08526bc9cadfc64065afd219090a8df97f48 Author: Jia He Date: Tue Feb 6 20:11:34 2018 -0800 ACPI/IORT: Remove linker section for IORT entries again In commit 316ca8804ea8 ("ACPI/IORT: Remove linker section for IORT entries probing"), iort entries was removed in vmlinux.lds.h. But in commit 2fcc112af37f ("clocksource/drivers: Rename clksrc table to timer"), this line was back incorrectly. It does no harm except for adding some useless symbols, so fix it. Signed-off-by: Jia He Signed-off-by: Lorenzo Pieralisi Acked-by: Daniel Lezcano include/asm-generic/vmlinux.lds.h | 1 - 1 file changed, 1 deletion(-) commit 3f127ce11353fd1071cae9b65bc13add6aec6b90 Author: Dan Carpenter Date: Thu Mar 8 04:31:00 2018 -0500 media: em28xx-cards: fix em28xx_duplicate_dev() There is a double sizeof() typo here so we don't duplicate the struct properly. Fixes: be7fd3c3a8c5 ("media: em28xx: Hauppauge DualHD second tuner functionality") Signed-off-by: Dan Carpenter drivers/media/usb/em28xx/em28xx-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78c4e0820134fdf873c8ab6660b9283bb4be5496 Author: Daniel Scheller Date: Wed Mar 7 15:07:56 2018 -0500 media: ngene: use common DVB I2C client handling helpers Like in ddbridge, get rid of all duplicated I2C client handling constructs and rather make use of the newly added dvb_module_*() helpers. Makes things more clean and removes the (cosmetic) need for some variables. The check on a valid ptr on ci->en isn't really needed since the cxd2099 driver will set it at a time where it is going to return successfully from probing. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-cards.c | 25 ++++---------------- drivers/media/pci/ngene/ngene-core.c | 43 ++++++++--------------------------- 2 files changed, 15 insertions(+), 53 deletions(-) commit c966453b1386136e47f7c45a6d3b66f4013f974d Author: Daniel Scheller Date: Wed Mar 7 15:07:55 2018 -0500 media: ddbridge: use common DVB I2C client handling helpers Instead of keeping duplicated I2C client handling construct, make use of the newly introduced dvb_module_*() helpers. This not only keeps things way cleaner and removes the need for duplicated I2C client attach code, but even allows to get rid of some variables that won't help in making things look cleaner anymore. The check on a valid ptr on port->en isn't really needed since the cxd2099 driver will set it at a time where it is going to return successfully from probing. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/ddbridge-ci.c | 33 ++++++--------------------- drivers/media/pci/ddbridge/ddbridge-core.c | 36 ++++++------------------------ 2 files changed, 14 insertions(+), 55 deletions(-) commit a31b86b17681fd2b888b11981222b472541d4a4d Author: Daniel Scheller Date: Wed Mar 7 14:23:48 2018 -0500 media: dvb-frontends/Kconfig: move the SP2 driver to the CI section The CIMaX SP2 driver is a EN50221 CI controller I2C driver similar to the cxd2099 driver. Move it's Kconfig block into the newly introduced CI subsection. Cc: Olli Salonen Cc: Antti Palosaari Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/Kconfig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit d158490ae52062411f16f7af4b45efa6620cd47c Author: Daniel Scheller Date: Wed Mar 7 14:23:47 2018 -0500 media: dvb-frontends/cxd2099: Kconfig additions The cxd2099 driver makes use of the Regmap I2C kernel API, thus add "select REGMAP_I2C" to it's Kconfig block. Also, make it default "m" if !MEDIA_SUBDRV_AUTOSELECT, just like every other dvb-frontend driver. And, while at it, remove the hyphens around the help tag. Cc: Jasmin Jessich Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 883273053607c75264d8d7bc0ecc868bb26012c7 Author: Mauro Carvalho Chehab Date: Wed Mar 7 09:51:17 2018 -0500 media: Kconfig: fix DVB dependencies If I2C is present and it is module, the DVB core should also be a module, otherwise build will now fail with: drivers/media/dvb-core/dvbdev.o: In function `dvb_module_probe': drivers/media/dvb-core/dvbdev.c:965: undefined reference to `i2c_new_device' drivers/media/dvb-core/dvbdev.c:972: undefined reference to `i2c_unregister_device' Reported-by: kbuild test robot Signed-off-by: Mauro Carvalho Chehab drivers/media/Kconfig | 1 + 1 file changed, 1 insertion(+) commit fce61d1dfd5b38529792898ba11a25e296e6d069 Author: Mauro Carvalho Chehab Date: Wed Mar 7 08:57:05 2018 -0500 media: si2168: fix a comment about firmware version There's a comment there at s82168 that it is wrong. With firmware 4.0.11, sleep/resume works well without need of download it every time. But firmware 4.0.19 needs to be downloaded again after sleep. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/si2168.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02679876b74d26ea8368d63e38998e1aa4df028d Author: Mauro Carvalho Chehab Date: Tue Dec 19 06:18:23 2017 -0500 media: v4l2-subdev: document remaining undocumented functions There are several undocumented v4l2-subdev functions that are part of kAPI. Document them. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-subdev.h | 69 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 64 insertions(+), 5 deletions(-) commit ab9bb73a0664595b76bb6e4a7ae10064aa58379f Author: Mauro Carvalho Chehab Date: Tue Dec 19 06:03:55 2017 -0500 media: v4l2-subdev: get rid of __V4L2_SUBDEV_MK_GET_TRY() macro X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com media: v4l2-subdev: get rid of __V4L2_SUBDEV_MK_GET_TRY() macro The __V4L2_SUBDEV_MK_GET_TRY() macro is used to define 3 functions that have the same arguments. The code of those functions is simple enough to just declare them, de-obfuscating the code. While here, replace BUG_ON() by WARN_ON() as there's no reason why to panic the Kernel if this fails. Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-subdev.h | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) commit 16d1cb0bc43642a4d934631a73c5210ad2499e2f Author: Borislav Petkov Date: Tue Mar 6 10:49:14 2018 +0100 x86/dumpstack: Unify show_regs() The 32-bit version uses KERN_EMERG and commit b0f4c4b32c8e ("bugs, x86: Fix printk levels for panic, softlockups and stack dumps") changed the 64-bit version to KERN_DEFAULT. The same justification in that commit that those messages do not belong in the terminal, holds true for 32-bit also, so make it so. Make code_bytes static, while at it. Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Andy Lutomirski Link: https://lkml.kernel.org/r/20180306094920.16917-4-bp@alien8.de arch/x86/include/asm/stacktrace.h | 2 -- arch/x86/kernel/dumpstack.c | 49 ++++++++++++++++++++++++++++++++++++++- arch/x86/kernel/dumpstack_32.c | 42 --------------------------------- arch/x86/kernel/dumpstack_64.c | 42 --------------------------------- 4 files changed, 48 insertions(+), 87 deletions(-) commit 9558080935e0bd744d68a7e1747a7117310623cf Author: Borislav Petkov Date: Tue Mar 6 10:49:13 2018 +0100 x86/fault: Do not print IP in show_fault_oops() ... because __show_regs() already does that. Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Andy Lutomirski Link: https://lkml.kernel.org/r/20180306094920.16917-3-bp@alien8.de arch/x86/mm/fault.c | 1 - 1 file changed, 1 deletion(-) commit 5ad751053704df3f00d2bb2dc9345c697c212150 Author: Borislav Petkov Date: Tue Mar 6 10:49:12 2018 +0100 panic: Add closing panic marker parenthesis Otherwise it looks unbalanced. Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Andy Lutomirski Link: https://lkml.kernel.org/r/20180306094920.16917-2-bp@alien8.de kernel/panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2b9430771cae7edc9927b36ce0e76a336fd952c Author: Masahiro Yamada Date: Thu Mar 8 17:09:29 2018 +0900 ASoC: uniphier: remove superfluous inclusion None of aio-compress.c depends on the syscon header. Signed-off-by: Masahiro Yamada Acked-by: Katsuhiro Suzuki Signed-off-by: Mark Brown sound/soc/uniphier/aio-compress.c | 1 - 1 file changed, 1 deletion(-) commit c822e059185585f79b2007b1d2cafacf4264e610 Author: Lionel Landwerlin Date: Tue Mar 6 12:28:57 2018 +0000 drm/i915: expose rcs topology through query uAPI With the introduction of asymmetric slices in CNL, we cannot rely on the previous SUBSLICE_MASK getparam to tell userspace what subslices are available. Here we introduce a more detailed way of querying the Gen's GPU topology that doesn't aggregate numbers. This is essential for monitoring parts of the GPU with the OA unit, because counters need to be normalized to the number of EUs/subslices/slices. The current aggregated numbers like EU_TOTAL do not gives us sufficient information. The Mesa series making use of this API is : https://patchwork.freedesktop.org/series/38795/ As a bonus we can draw representations of the GPU : https://imgur.com/a/vuqpa v2: Rename uapi struct s/_mask/_info/ (Tvrtko) Report max_slice/subslice/eus_per_subslice rather than strides (Tvrtko) Add uapi macros to read data from *_info structs (Tvrtko) v3: Use !!(v & DRM_I915_BIT()) for uapi macros instead of custom shifts (Tvrtko) v4: factorize query item writting (Tvrtko) tweak uapi struct/define names (Tvrtko) v5: Replace ALIGN() macro (Chris) v6: Updated uapi comments (Tvrtko) Moved flags != 0 checks into vfuncs (Tvrtko) v7: Use access_ok() before copying anything, to avoid overflows (Chris) Switch BUG_ON() to GEM_WARN_ON() (Tvrtko) v8: Tweak uapi comments style to match the coding style (Lionel) v9: Fix error in comment about computation of enabled subslice (Tvrtko) v10: Fix/update comments in uAPI (Sagar) v11: Drop drm_i915_query_(slice|subslice|eu)_info in favor of a single drm_i915_query_topology_info (Joonas) v12: Add subslice_stride/eu_stride in drm_i915_query_topology_info (Joonas) v13: Fix comment in uAPI (Joonas) Signed-off-by: Lionel Landwerlin Acked-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180306122857.27317-7-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/i915_query.c | 75 +++++++++++++++++++++++++++++++++++++++ include/uapi/drm/i915_drm.h | 62 ++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+) commit a446ae2c6e6555048301f2339cfd97b8eed6d0b7 Author: Lionel Landwerlin Date: Tue Mar 6 12:28:56 2018 +0000 drm/i915: add query uAPI There are a number of information that are readable from hardware registers and that we would like to make accessible to userspace. One particular example is the topology of the execution units (how are execution units grouped in subslices and slices and also which ones have been fused off for die recovery). At the moment the GET_PARAM ioctl covers some basic needs, but generally is only able to return a single value for each defined parameter. This is a bit problematic with topology descriptions which are array/maps of available units. This change introduces a new ioctl that can deal with requests to fill structures of potentially variable lengths. The user is expected fill a query with length fields set at 0 on the first call, the kernel then sets the length fields to the their expected values. A second call to the kernel with length fields at their expected values will trigger a copy of the data to the pointed memory locations. The scope of this uAPI is only to provide information to userspace, not to allow configuration of the device. v2: Simplify dispatcher code iteration (Tvrtko) Tweak uapi drm_i915_query_item structure (Tvrtko) v3: Rename pad fields into flags (Chris) Return error on flags field != 0 (Chris) Only copy length back to userspace in drm_i915_query_item (Chris) v4: Use array of functions instead of switch (Chris) v5: More comments in uapi (Tvrtko) Return query item errors in length field (All) v6: Tweak uapi comments style to match the coding style (Lionel) v7: Add i915_query.h (Joonas) v8: (Lionel) Change the behavior of the item iterator to report invalid queries into the query item rather than stopping the iteration. This enables userspace applications to query newer items on older kernels and only have failure on the items that are not supported. v9: Edit copyright headers (Joonas) v10: Typos & comments in uapi (Joonas) Signed-off-by: Lionel Landwerlin Reviewed-by: Tvrtko Ursulin Acked-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180306122857.27317-6-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/i915_query.c | 50 +++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_query.h | 15 ++++++++++++ include/uapi/drm/i915_drm.h | 46 ++++++++++++++++++++++++++++++++--- 5 files changed, 111 insertions(+), 3 deletions(-) commit cac6cfaa2fe4f9be753daeefd523ebcc0f46e331 Author: Lionel Landwerlin Date: Tue Mar 6 12:28:55 2018 +0000 drm/i915: add rcs topology to error state This might be useful information for developers looking at an error state. v2: Place topology towards the end of the error state (Chris) v3: Reuse common printing code (Michal) v4: Make this a one-liner (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Tvrtko Ursulin Acked-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180306122857.27317-5-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/i915_gpu_error.c | 1 + 1 file changed, 1 insertion(+) commit 79e9cd5f14dda3a6a47b2f0ac288e9c52d6435a9 Author: Lionel Landwerlin Date: Tue Mar 6 12:28:54 2018 +0000 drm/i915/debugfs: add rcs topology entry While the end goal is to make this information available to userspace through a new ioctl, there is no reason we can't display it in a human readable fashion through debugfs. slice0: 3 subslice(s) (0x7): subslice0: 8 EUs (0xff) subslice1: 8 EUs (0xff) subslice2: 8 EUs (0xff) subslice3: 0 EUs (0x0) slice1: 3 subslice(s) (0x7): subslice0: 8 EUs (0xff) subslice1: 8 EUs (0xff) subslice2: 8 EUs (0xff) subslice3: 0 EUs (0x0) slice2: 3 subslice(s) (0x7): subslice0: 8 EUs (0xff) subslice1: 8 EUs (0xff) subslice2: 8 EUs (0xff) subslice3: 0 EUs (0x0) v2: Reformat debugfs printing (Tvrtko) Use the new EU mask helper (Tvrtko) v3: Move printing code to intel_device_info.c to be shared with error state (Michal) v4: Bump u8 to u16 when using sseu_get_eus() (Lionel) Suggested-by: Chris Wilson Signed-off-by: Lionel Landwerlin Reviewed-by: Tvrtko Ursulin Acked-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180306122857.27317-4-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 11 +++++++++++ drivers/gpu/drm/i915/intel_device_info.c | 24 ++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_device_info.h | 2 ++ 3 files changed, 37 insertions(+) commit b3e7f866927985b11f2e483ba02404d9a3a8685c Author: Lionel Landwerlin Date: Tue Mar 6 12:28:53 2018 +0000 drm/i915/debugfs: reuse max slice/subslices already stored in sseu Now that we have that information in topology fields, let's just reuse it. v2: Style tweaks (Tvrtko) Signed-off-by: Lionel Landwerlin Reviewed-by: Tvrtko Ursulin Acked-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180306122857.27317-3-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 27 +++++++++++---------------- drivers/gpu/drm/i915/intel_device_info.c | 2 +- 2 files changed, 12 insertions(+), 17 deletions(-) commit 8cc7669355136f8952779e6f60053c1284d59c4d Author: Lionel Landwerlin Date: Tue Mar 6 12:28:52 2018 +0000 drm/i915: store all subslice masks Up to now, subslice mask was assumed to be uniform across slices. But starting with Cannonlake, slices can be asymmetric (for example slice0 has different number of subslices as slice1+). This change stores all subslices masks for all slices rather than having a single mask that applies to all slices. v2: Rework how we store total numbers in sseu_dev_info (Tvrtko) Fix CHV eu masks, was reading disabled as enabled (Tvrtko) Readability changes (Tvrtko) Add EU index helper (Tvrtko) v3: Turn ALIGN(v, 8) / 8 into DIV_ROUND_UP(v, BITS_PER_BYTE) (Tvrtko) Reuse sseu_eu_idx() for setting eu_mask on CHV (Tvrtko) Reformat debug prints for subslices (Tvrtko) v4: Change eu_mask helper into sseu_set_eus() (Tvrtko) v5: With Haswell reporting masks & counts, bump sseu_*_eus() functions to use u16 (Lionel) v6: Fix sseu_get_eus() for > 8 EUs per subslice (Lionel) v7: Change debugfs enabels for number of subslices per slice, will need a small igt/pm_sseu change (Lionel) Drop subslice_total field from sseu_dev_info, rely on sseu_subslice_total() to recompute the value instead (Lionel) v8: Remove unused function compute_subslice_total() (Lionel) Signed-off-by: Lionel Landwerlin Reviewed-by: Tvrtko Ursulin Acked-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180306122857.27317-2-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 28 +++-- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/intel_device_info.c | 208 +++++++++++++++++++++++-------- drivers/gpu/drm/i915/intel_device_info.h | 62 ++++++++- drivers/gpu/drm/i915/intel_lrc.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.h | 2 +- 6 files changed, 237 insertions(+), 67 deletions(-) commit 401d0ae326c92185f1727b0f12834197536265ae Author: Andrew Morton Date: Wed Mar 7 16:13:33 2018 -0800 drm/i915/guc: work around gcc-4.4.4 union initializer issue gcc-4.4.4 has problems with initalizers of anon unions. drivers/gpu/drm/i915/intel_guc_log.c: In function 'guc_log_control': drivers/gpu/drm/i915/intel_guc_log.c:64: error: unknown field 'logging_enabled' specified in initializer Work around this. Fixes: 35fe703c3161 ("drm/i915/guc: Change values for i915_guc_log_control") Cc: Michal Wajdeczko Cc: Sagar Arun Kamble Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Chris Wilson Signed-off-by: Andrew Morton Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180308001333.rI2vrNRTY%akpm@linux-foundation.org drivers/gpu/drm/i915/intel_guc_log.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3c13933c60338ce6fb2369bd0e93f91e52ddc17d Author: Tero Kristo Date: Tue Dec 12 10:31:15 2017 +0200 clk: keystone: sci-clk: add support for dynamically probing clocks Currently, the driver contains a large hints table for clocks that exist on a device, however, it is possible to probe the clocks from the firmware also. Add support for this, and drop the clock hints table support from the driver completely. This causes the driver to send a few extra sci-clk messages during boot, basically one extra for each device that exists on the SoC; on K2G this is approx 80. Signed-off-by: Tero Kristo Acked-by: Santosh Shilimkar drivers/clk/keystone/sci-clk.c | 380 ++++++++++------------------------------- 1 file changed, 90 insertions(+), 290 deletions(-) commit ee2fc3c5ca8dad3906dd1d578e72d5272083220c Author: Tero Kristo Date: Thu Feb 15 09:50:02 2018 +0200 clk: ti: add support for clock latching to mux clocks Latching the clock settings is needed with certain clocks, where the setting is "cached" in HW before doing the actual re-programming of the clock source. This patch adds support for clock latching to the mux clock. Signed-off-by: Tero Kristo drivers/clk/ti/clock.h | 1 + drivers/clk/ti/mux.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) commit b44a03008da5e20e24c0d11d566796fb9b0f912e Author: Tero Kristo Date: Thu Feb 15 09:49:27 2018 +0200 clk: ti: add support for clock latching to divider clocks Latching the clock settings is needed with certain clocks, where the setting is "cached" in HW before doing the actual re-programming of the clock source. This patch adds support for clock latching to the divider clock. Signed-off-by: Tero Kristo drivers/clk/ti/clock.h | 1 + drivers/clk/ti/divider.c | 26 ++++++++++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) commit e31922eda18c950d6b51450711ae459b97eae097 Author: Tero Kristo Date: Wed Jul 26 16:47:28 2017 +0300 clk: ti: add generic support for clock latching Certain clocks require latching to be done, so that the actual settings get updated on the HW that generates the clock signal. One example of such a clock is the dra76x GMAC DPLL H14 output, which requires its divider settings to be latched when updated. Signed-off-by: Tero Kristo drivers/clk/ti/clk.c | 14 ++++++++++++++ drivers/clk/ti/clock.h | 2 ++ 2 files changed, 16 insertions(+) commit 4902c2025b8ade9c230d4bca25ec5f691e91cb1f Author: Tero Kristo Date: Wed Jul 26 16:47:27 2017 +0300 clk: ti: add support for register read-modify-write low-level operation Useful for changing few bits on a register, this makes sure for example that the operation is done atomically in case of syscon. Signed-off-by: Tero Kristo drivers/clk/ti/clk.c | 24 ++++++++++++++++++++++++ include/linux/clk/ti.h | 2 ++ 2 files changed, 26 insertions(+) commit be02637f6b741875aa0779c35f31591738aa2cd9 Author: Tero Kristo Date: Thu Feb 15 09:44:52 2018 +0200 dt-bindings: clock: ti: add latching support to mux and divider clocks Certain hardware configurations, like dra76x, have some of the clock registers partitioned in a funky manner that requires the clock control setup to be latched for PRCM to be notified of the change. This is accomplished with a separate control bit under the register. Add support for this clock latching support to divider and mux clocks. Signed-off-by: Tero Kristo Reviewed-by: Rob Herring Documentation/devicetree/bindings/clock/ti/divider.txt | 3 +++ Documentation/devicetree/bindings/clock/ti/mux.txt | 3 +++ 2 files changed, 6 insertions(+) commit c996f3802006a585a6c3f8eaa73e375330efc0e7 Author: Borislav Petkov Date: Thu Mar 1 16:13:36 2018 +0100 x86/MSR: Move native_* variants to msr.h ... where they belong. No functional change. Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Reviewed-by: Darren Kenny Cc: kvm@vger.kernel.org Link: https://lkml.kernel.org/r/20180301151336.12948-1-bp@alien8.de arch/x86/include/asm/microcode.h | 14 -------------- arch/x86/include/asm/msr.h | 14 ++++++++++++++ arch/x86/kvm/svm.c | 1 - arch/x86/kvm/vmx.c | 1 - 4 files changed, 14 insertions(+), 16 deletions(-) commit 0a5169add90e43ab45ab1ba34223b8583fcaf675 Author: Ivan Gorinov Date: Wed Mar 7 11:46:53 2018 -0800 x86/devicetree: Fix device IRQ settings in DT IRQ parameters for the SoC devices connected directly to I/O APIC lines (without PCI IRQ routing) may be specified in the Device Tree. Called from DT IRQ parser, irq_create_fwspec_mapping() calls irq_domain_alloc_irqs() with a pointer to irq_fwspec structure as @arg. But x86-specific DT IRQ allocation code casts @arg to of_phandle_args structure pointer and crashes trying to read the IRQ parameters. The function was not converted when the mapping descriptor was changed to irq_fwspec in the generic irqdomain code. Fixes: 11e4438ee330 ("irqdomain: Introduce a firmware-specific IRQ specifier structure") Signed-off-by: Ivan Gorinov Signed-off-by: Thomas Gleixner Cc: Mark Rutland Cc: Rob Herring Link: https://lkml.kernel.org/r/a234dee27ea60ce76141872da0d6bdb378b2a9ee.1520450752.git.ivan.gorinov@intel.com arch/x86/kernel/devicetree.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 628df9dc5ad886b0a9b33c75a7b09710eb859ca1 Author: Ivan Gorinov Date: Wed Mar 7 11:46:29 2018 -0800 x86/devicetree: Initialize device tree before using it Commit 08d53aa58cb1 added CRC32 calculation in early_init_dt_verify() and checking in late initcall of_fdt_raw_init(), making early_init_dt_verify() mandatory. The required call to early_init_dt_verify() was not added to the x86-specific implementation, causing failure to create the sysfs entry in of_fdt_raw_init(). Fixes: 08d53aa58cb1 ("of/fdt: export fdt blob as /sys/firmware/fdt") Signed-off-by: Ivan Gorinov Signed-off-by: Thomas Gleixner Cc: Mark Rutland Cc: Rob Herring Link: https://lkml.kernel.org/r/c8c7e941efc63b5d25ebf9b6350b0f3df38f6098.1520450752.git.ivan.gorinov@intel.com arch/x86/kernel/devicetree.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 5fba4ce6ad1896ebd78cf8d4457a7383e0279265 Author: Fabio Estevam Date: Sat Mar 3 19:40:44 2018 -0300 ARM: dts: vf610m4: Remove the zero length reg property All the vf610m4 based boards include the real memory size in their dts files, so remove the the zero length reg property. Signed-off-by: Fabio Estevam Reviewed-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/vf610m4.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55cd3e8b68c6dc8bcc29a83cf65a6c3376393254 Author: Fabio Estevam Date: Sat Mar 3 19:40:43 2018 -0300 ARM: dts: vf610m4: Remove skeleton.dtsi inclusion Since commit 9c0da3cc61f1 ("ARM: dts: explicitly mark skeleton.dtsi as deprecated") the inclusion of skeleton.dtsi is deprecated, so remove it as this file will eventually go away someday. Move its content to the SoC dtsi file, so that the resultant dtb is the same. Signed-off-by: Fabio Estevam Reviewed-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/vf610m4.dtsi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 4217fcc59178a19c5472775c1fe1f489ac66cab1 Author: Fabio Estevam Date: Sat Mar 3 19:40:42 2018 -0300 ARM: dts: vf500: Remove the zero length reg property All the vf500 based boards include the real memory size in their dts files, so remove the zero length reg property. Signed-off-by: Fabio Estevam Reviewed-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/vf500.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a2f1395af9403c4921211aae5def57c9b87cef1 Author: Fabio Estevam Date: Sat Mar 3 19:40:41 2018 -0300 ARM: dts: vf: Add memory node unit name Include memory node unit name in order to fix the following W=1 warnings: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name Signed-off-by: Fabio Estevam Reviewed-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/vf500-colibri.dtsi | 2 +- arch/arm/boot/dts/vf610-colibri.dtsi | 2 +- arch/arm/boot/dts/vf610-cosmic.dts | 2 +- arch/arm/boot/dts/vf610-twr.dts | 2 +- arch/arm/boot/dts/vf610-zii-dev.dtsi | 2 +- arch/arm/boot/dts/vf610m4-colibri.dts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit c06f616d35c96e429183cfdbd755f66383862e32 Author: Fabio Estevam Date: Sat Mar 3 19:40:40 2018 -0300 ARM: dts: vf500: Remove skeleton.dtsi inclusion Since commit 9c0da3cc61f1 ("ARM: dts: explicitly mark skeleton.dtsi as deprecated") the inclusion of skeleton.dtsi is deprecated, so remove it as this file will eventually go away someday. Move its content to the SoC dtsi file, so that the resultant dtb is the same. Signed-off-by: Fabio Estevam Reviewed-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/vf500.dtsi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit de25b9bb4a40c571718180a870e6d3087da11f80 Author: Anson Huang Date: Fri Mar 2 09:59:29 2018 +0800 ARM: dts: imx7s: add temperature monitor support Add i.MX7 temperature monitor support. Signed-off-by: Anson Huang Acked-by: Dong Aisheng Reviewed-by: Rob Herring Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit b08d2fb5a6b15bd26b71b739abc68afd5ecd916b Author: Rob Herring Date: Thu Mar 1 14:25:33 2018 -0600 ARM: dts: imx: Add missing #sound-dai-cells for sgtl5000 codec dtc now warns about missing #sound-dai-cells: arch/arm/boot/dts/imx6ul-geam.dtb: Warning (sound_dai_property): /sound/simple-audio-card,codec: Missing property '#sound-dai-cells' in node /soc/aips-bus@2100000/i2c@21a0000/codec@a or bad phandle (referred from sound-dai[0]) arch/arm/boot/dts/imx6ul-isiot-emmc.dtb: Warning (sound_dai_property): /sound/simple-audio-card,codec: Missing property '#sound-dai-cells' in node /soc/aips-bus@2100000/i2c@21a0000/codec@a or bad phandle (referred from sound-dai[0]) arch/arm/boot/dts/imx6ul-isiot-nand.dtb: Warning (sound_dai_property): /sound/simple-audio-card,codec: Missing property '#sound-dai-cells' in node /soc/aips-bus@2100000/i2c@21a0000/codec@a or bad phandle (referred from sound-dai[0]) Lots of i.MX boards use the SGTL5000 codec, but not all get the warning because only some reference the codec with "sound-dai" property. However, the codec should always provide #sound-dai-cells regardless, so fix all the occurrences. Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Rob Herring Signed-off-by: Shawn Guo arch/arm/boot/dts/imx28-apx4devkit.dts | 1 + arch/arm/boot/dts/imx28-eukrea-mbmx28lc.dtsi | 1 + arch/arm/boot/dts/imx28-evk.dts | 1 + arch/arm/boot/dts/imx28-m28evk.dts | 1 + arch/arm/boot/dts/imx51-babbage.dts | 1 + arch/arm/boot/dts/imx53-m53evk.dts | 1 + arch/arm/boot/dts/imx53-ppd.dts | 1 + arch/arm/boot/dts/imx53-qsb-common.dtsi | 1 + arch/arm/boot/dts/imx53-tx53-x03x.dts | 1 + arch/arm/boot/dts/imx53-tx53-x13x.dts | 1 + arch/arm/boot/dts/imx53-voipac-bsb.dts | 1 + arch/arm/boot/dts/imx6qdl-gw560x.dtsi | 1 + arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 1 + arch/arm/boot/dts/imx6ul-geam.dts | 1 + 14 files changed, 14 insertions(+) commit cbeb1dc711348f49ac87186ae8cec357751d4f71 Author: Andrey Smirnov Date: Thu Mar 1 11:20:07 2018 -0800 ARM: dts: imx51-zii-rdu1: Add node for RAVE SP device With MFD and watchdog drivers for RAVE SP device support added by 538ee27290fa ("mfd: Add driver for RAVE Supervisory Processor") and c3bb33345721 ("watchdog: Add RAVE SP watchdog driver") add corresponding DT node for RDU. Cc: Rob Herring Cc: Mark Rutland Cc: Guenter Roeck Cc: Chris Healy Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov Reviewed-by: Fabio Estevam Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx51-zii-rdu1.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9fdd1f8356592b7bdc70ace8ff455a2eb37eedca Author: Andrey Smirnov Date: Thu Mar 1 11:20:06 2018 -0800 ARM: dts: imx6: RDU2: Add RAVE SP device With MFD and watchdog drivers for RAVE SP device support added by 538ee27290fa ("mfd: Add driver for RAVE Supervisory Processor") and c3bb33345721 ("watchdog: Add RAVE SP watchdog driver") add corresponding DT node for RDU2. Cc: Rob Herring Cc: Mark Rutland Cc: Guenter Roeck Cc: Chris Healy Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov Reviewed-by: Fabio Estevam Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit ae91a799fb3cbc6e07718da97b40eb75f782dbaf Author: Martin Blumenstingl Date: Sun Jan 28 21:22:45 2018 +0100 phy: amlogic: phy-meson-gxl-usb2: rename some of the U2P_R2 registers The U2P_R2 register provides "test mode" functionality for bits 17:0. These are only used during SoC development and should be left untouched on production SoC versions. Rename these register definitions to indicate that these are for "test mode" only. While here, also merge the definitions for U2P_R2_DATA_IN_MASK and U2P_R2_DATA_IN_EN_MASK (bits 0:7) because Amlogic's internal documentation suggests that these bits belong together. The old definition was not taken from the documentation but rather from a struct definition in the Amlogic GPL kernel sources. No functional changes. Suggested-by: Yixun Lan Signed-off-by: Martin Blumenstingl Signed-off-by: Kishon Vijay Abraham I drivers/phy/amlogic/phy-meson-gxl-usb2.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 05818862bc27255e335ee6085d6ce57b6cb01f99 Author: Martin Blumenstingl Date: Sun Jan 28 21:22:43 2018 +0100 phy: amlogic: phy-meson-gxl-usb2: default to host mode The USB2 PHY can switch between PHY_MODE_USB_HOST and PHY_MODE_USB_DEVICE. However, it cannot do it on it's own since it requires re-routing of the corresponding USB pins from dwc3 (which is used for host-mode) to dwc2 (which is used for device-mode). Thus we don't need to auto-detect the mode based on the USB controller, which simplifies the driver code. Signed-off-by: Martin Blumenstingl Signed-off-by: Kishon Vijay Abraham I drivers/phy/amlogic/Kconfig | 1 - drivers/phy/amlogic/phy-meson-gxl-usb2.c | 15 ++------------- 2 files changed, 2 insertions(+), 14 deletions(-) commit bc4a0241d4e1e2381f4c3b53ad0199324549e0a8 Author: Martin Blumenstingl Date: Sun Jan 28 21:22:42 2018 +0100 phy: amlogic: phy-meson-gxl-usb2: support the clock and reset line The Meson GXL USB2 PHYs require an additional clock (USB) which has to be enabled. If that clock is disabled then all PHY registers read 0x0. Luckily for us that clock is always enabled (either by harddware defaults, the bootrom, or any of the bootloaders before u-boot/BL3-3). The OTG capable USB2 PHY additionally has a reset line (USB_OTG, which is shared with other components, such as the USB3 PHY for example). Extend the driver so it handles this clock and the shared reset line. We only trigger the reset during the .init phase since it's a shared reset line, so triggering it during the driver's .reset implementation would effectively also only trigger it once anyways. Signed-off-by: Martin Blumenstingl Signed-off-by: Kishon Vijay Abraham I drivers/phy/amlogic/phy-meson-gxl-usb2.c | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit cba1372812fbc740e57c1982970210ab2b804226 Author: Martin Blumenstingl Date: Sun Jan 28 21:22:44 2018 +0100 phy: amlogic: phy-meson-gxl-usb2: don't log an error on -EPROBE_DEFER devm_phy_create can return -EPROBE_DEFER if the phy-supply is not ready yet. Silence this warning as the driver framework will re-attempt registering the PHY - this second try works without any errors. So only log actual errors to keep the kernel log free of misleading error messages. Signed-off-by: Martin Blumenstingl Signed-off-by: Kishon Vijay Abraham I drivers/phy/amlogic/phy-meson-gxl-usb2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d2eced94562f9d69705887e497fee0d17c3099eb Author: Martin Blumenstingl Date: Sun Jan 28 21:22:41 2018 +0100 dt-bindings: phy: meson-gxl-usb2-phy: add the reset line and clock The OTG capable USB2 PHY has a reset line (which is shared with other components, such as the USB3 PHY for example) and a clock (which are both part of different registers). Add the properties for the reset line and clocks as optional ones since not all PHYs have them (currently only the OTG capable PHY is known to use these). Signed-off-by: Martin Blumenstingl Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/meson-gxl-usb2-phy.txt | 4 ++++ 1 file changed, 4 insertions(+) commit becaf17a58473e358e056ada2642e895aae93b0e Author: Dov Levenglick Date: Fri Feb 2 18:34:50 2018 +0200 phy: fix structure documentation Add missing documentation of structure members and modify the order of documentation to match that of the structure declaration. Signed-off-by: Dov Levenglick Signed-off-by: Kishon Vijay Abraham I include/linux/phy/phy.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 95cc6e7217963bdd58f5ff737a574bea1c6f170b Author: Shawn Lin Date: Thu Jan 11 10:40:27 2018 +0800 phy: rockchip-emmc: use regmap_read_poll_timeout to poll dllrdy Just use the API instead of open-coding it, no functional change intended. Signed-off-by: Shawn Lin Reviewed-by: Brian Norris Signed-off-by: Caesar Wang Reviewed-by: Douglas Anderson Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-emmc.c | 33 +++++++++++--------------------- 1 file changed, 11 insertions(+), 22 deletions(-) commit a4781c2a74b249cad814ceea7272997bbd20051e Author: Shawn Lin Date: Thu Jan 11 10:40:26 2018 +0800 phy: rockchip-emmc: retry calpad busy trimming It turns out that 5us isn't enough for all cases, so let's retry some more times to wait for caldone. Signed-off-by: Shawn Lin Tested-by: Ziyuan Xu Signed-off-by: Caesar Wang Reviewed-by: Douglas Anderson Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-emmc.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit fee7e1d50c6e6da1d99035181ba5a5c88f5bb526 Author: Ulf Magnusson Date: Mon Feb 5 02:21:27 2018 +0100 phy: Remove SOC_EXYNOS4212 dep. from PHY_EXYNOS4X12_USB Exynos4212 support was removed by commit bca9085e0ae9 ("ARM: dts: exynos: remove Exynos4212 support (dead code)"). Remove the SOC_EXYNOS4212 dependency from PHY_EXYNOS4X12_USB. Discovered with the https://github.com/ulfalizer/Kconfiglib/blob/master/examples/list_undefined.py script. Signed-off-by: Ulf Magnusson Acked-by: Krzysztof Kozlowski Signed-off-by: Kishon Vijay Abraham I drivers/phy/samsung/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3405bd71015e87ec255f968dc9a510785ff5e0ee Author: Manu Gautam Date: Tue Jan 16 16:27:12 2018 +0530 phy: add SPDX identifier to QMP and QUSB2 PHY drivers The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Manu Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qmp.c | 11 +---------- drivers/phy/qualcomm/phy-qcom-qusb2.c | 10 +--------- 2 files changed, 2 insertions(+), 19 deletions(-) commit ac0d239936bd87d044d34037a9b581ca260269e3 Author: Manu Gautam Date: Tue Jan 16 16:27:11 2018 +0530 phy: qcom-qmp: Add support for runtime PM Disable clocks and enable PHY autonomous mode to detect wakeup events when PHY is suspended. Core driver should notify speed to PHY driver to enable LFPS and/or RX_DET interrupts. Signed-off-by: Manu Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qmp.c | 177 +++++++++++++++++++++++++++++++++++- drivers/phy/qualcomm/phy-qcom-qmp.h | 3 + 2 files changed, 179 insertions(+), 1 deletion(-) commit 891a96f65ac3b12883ddbc6d1a9adf6e54dc903c Author: Manu Gautam Date: Tue Jan 16 16:27:10 2018 +0530 phy: qcom-qusb2: Add support for runtime PM Disable clocks and enable DP/DM wakeup interrupts when suspending PHY. Core driver should notify speed to PHY driver to enable appropriate DP/DM wakeup interrupts polarity in suspend state. Signed-off-by: Manu Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qusb2.c | 176 ++++++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) commit 3b3cd24ae61b3bbe9d3cecaff33e7cb3250ce47a Author: Manu Gautam Date: Tue Jan 16 16:27:09 2018 +0530 phy: Add USB speed related PHY modes Add following USB speed related PHY modes: LS (Low Speed), FS (Full Speed), HS (High Speed), SS (Super Speed) Speed related information is required by some QCOM PHY drivers to program PHY monitor resume/remote-wakeup events in suspended state. Speed is needed in order to set correct polarity of wakeup events for detection. E.g. QUSB2 PHY monitors DP/DM line state depending on whether speed is LS or FS/HS to detect resume. Similarly QMP USB3 PHY in SS mode should monitor RX terminations attach/detach and LFPS events depending on SSPHY is active or not. Signed-off-by: Manu Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-core.c | 2 ++ include/linux/phy/phy.h | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) commit efb05a50c956b4ccd09c8401eed53bf3894d4026 Author: Manu Gautam Date: Tue Jan 16 16:27:08 2018 +0530 phy: qcom-qmp: Add support for QMP V3 USB3 PHY QMP V3 USB3 PHY is a DisplayPort (DP) and USB combo PHY with dual RX/TX lanes to support type-c. There is a separate block DP_COM for configuration related to type-c or DP. Add support for dp_com region and secondary rx/tx lanes initialization. Signed-off-by: Manu Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qmp.c | 223 +++++++++++++++++++++++++++++++++++- 1 file changed, 220 insertions(+), 3 deletions(-) commit 8587b220f05e4f09e6b2b7c0c078b9ee7f8cfd9e Author: Manu Gautam Date: Tue Jan 16 16:27:07 2018 +0530 dt-bindings: phy-qcom-qmp: Update bindings for QMP V3 USB PHY Update compatible string and clock names for QMP version V3 USB PHY. Acked-by: Rob Herring Signed-off-by: Manu Gautam Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9c7761a360df08451bf61a5ea8a7b131c611ffd2 Author: Manu Gautam Date: Tue Jan 16 16:27:06 2018 +0530 phy: qcom-qmp: Add register offsets for QMP V3 PHY Registers offsets for QMP V3 PHY are changed from previous versions (1/2), update same in header file. Signed-off-by: Manu Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qmp.h | 149 ++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) commit e2248617ec157061131c69a54e896d6a298bfe2c Author: Manu Gautam Date: Tue Jan 16 16:27:05 2018 +0530 phy: qcom-qmp: Move register offsets to header file New revision (v3) of QMP PHY uses different offsets for almost all of the registers. Hence, move these definitions to header file so that updated offsets can be added for QMP v3. Signed-off-by: Manu Gautam Reviewed-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qmp.c | 119 +-------------------------------- drivers/phy/qualcomm/phy-qcom-qmp.h | 128 ++++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+), 118 deletions(-) commit 4a705d9b3ea0947ac1e9c55830f72aaf65c17027 Author: Manu Gautam Date: Tue Jan 16 16:27:04 2018 +0530 phy: qcom-qusb2: Add support for QUSB2 V2 version Use register layout to add additional registers present on QUSB2 PHY V2 version for PHY initialization. Other than new registers on V2, following two register's offset and bit definitions are different: POWERDOWN control and PLL_STATUS. Signed-off-by: Manu Gautam Reviewed-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qusb2.c | 64 +++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit ecf66ac2a06b16c7de00361c659b123b541e5f6a Author: Manu Gautam Date: Tue Jan 16 16:27:03 2018 +0530 dt-bindings: phy-qcom-qusb2: Update binding for QUSB2 V2 version Update generic compatible string for QUSB2 V2 PHY. This will allow all targets using QUSB2 V2 use same string. Acked-by: Rob Herring Signed-off-by: Manu Gautam Reviewed-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/qcom-qusb2-phy.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c71dabf27c3ac124c87a96681e4df5d49ea59dc4 Author: Manu Gautam Date: Tue Jan 16 16:27:02 2018 +0530 phy: qcom-qusb2: Add support for different register layouts New version of QUSB2 PHY has some registers offset changed. Add support to have register layout for a target and update the same in phy_configuration. Signed-off-by: Manu Gautam Reviewed-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qusb2.c | 149 +++++++++++++++++++++++++--------- 1 file changed, 109 insertions(+), 40 deletions(-) commit 76ddd300892a7e7c957c3ce0db5958c1c4866139 Author: Manu Gautam Date: Tue Jan 16 16:27:01 2018 +0530 phy: qcom-qmp: Move SERDES/PCS START after PHY reset Driver is currently performing PHY reset after starting SERDES/PCS. As per hardware datasheet reset must be done before starting PHY. Hence, update the sequence. Signed-off-by: Manu Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qmp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c6549f0eefc4d492954af11421d359265c155a91 Author: Manu Gautam Date: Tue Jan 16 16:27:00 2018 +0530 phy: qcom-qmp: Fix PHY block reset sequence PHY block or asynchronous reset requires signal to be asserted before de-asserting. Driver is only de-asserting signal which is already low, hence reset operation is a no-op. Fix this by asserting signal first. Also, resetting requires PHY clocks to be turned ON only after reset is finished. Fix that as well. Signed-off-by: Manu Gautam Reviewed-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qmp.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 937e17f36a32fc2ec01b9f99bac5b80acf22923c Author: Manu Gautam Date: Tue Jan 16 16:26:59 2018 +0530 phy: qcom-qusb2: Power-on PHY before initialization PHY must be powered on before turning ON clocks and attempting to initialize it. Driver is exposing separate init and power_on routines for this. Apparently USB dwc3 core driver performs power-on after init. Also, poweron and init for QUSB2 PHY need to be executed together always, hence remove poweron callback from phy_ops and explicitly perform this from init, similar changes needed for poweroff. Signed-off-by: Manu Gautam Reviewed-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qusb2.c | 47 +++++++++++------------------------ 1 file changed, 15 insertions(+), 32 deletions(-) commit 717dab9d670eb0015c40f91e105c89537abd5f6a Author: Manu Gautam Date: Tue Jan 16 16:26:58 2018 +0530 phy: qcom-qmp: Power-on PHY before initialization PHY regulators which are enabled from power_on() must be ON before turning-on clocks and initializing it as part of init(). As most of the core drivers perform power_on() after init(), move PHY regulators enable to com_init() and use power_on() to only enable pipe_clk. This pipe_clk is output from PHY and some core drivers e.g. PCIe follow specific sequence after phy_init() that mandates pipe_clk to be enabled from power_on() only. On similar lines move clk_enable from init() to com_init() which executes once for multi lane PHYs. Signed-off-by: Manu Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qmp.c | 61 +++++++++++++++---------------------- 1 file changed, 24 insertions(+), 37 deletions(-) commit 10939b10741d2f022d5fc01915b264160395f32e Author: Vivek Gautam Date: Tue Jan 16 16:26:57 2018 +0530 phy: qcom-qmp: Adapt to clk_bulk_* APIs Move from using array of clocks to clk_bulk_* APIs that are available now. Signed-off-by: Vivek Gautam Signed-off-by: Manu Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qmp.c | 50 ++++++++++++------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) commit f8ba22a39e985c93e278709b1d5f20857a26b49b Author: Vivek Gautam Date: Tue Jan 16 16:26:56 2018 +0530 phy: qcom-qmp: Fix phy pipe clock gating Pipe clock comes out of the phy and is available as long as the phy is turned on. Clock controller fails to gate this clock after the phy is turned off and generates a warning. / # [ 33.048561] gcc_usb3_phy_pipe_clk status stuck at 'on' [ 33.048585] ------------[ cut here ]------------ [ 33.052621] WARNING: CPU: 1 PID: 18 at ../drivers/clk/qcom/clk-branch.c:97 clk_branch_wait+0xf0/0x108 [ 33.057384] Modules linked in: [ 33.066497] CPU: 1 PID: 18 Comm: kworker/1:0 Tainted: G W 4.12.0-rc7-00024-gfe926e34c36d-dirty #96 [ 33.069451] Hardware name: Qualcomm Technologies, Inc. DB820c (DT) ... [ 33.278565] [] clk_branch_wait+0xf0/0x108 [ 33.286375] [] clk_branch2_disable+0x28/0x34 [ 33.291761] [] clk_core_disable+0x5c/0x88 [ 33.297660] [] clk_core_disable_lock+0x20/0x34 [ 33.303129] [] clk_disable+0x1c/0x24 [ 33.309384] [] qcom_qmp_phy_poweroff+0x20/0x48 [ 33.314328] [] phy_power_off+0x80/0xdc [ 33.320492] [] dwc3_core_exit+0x94/0xa0 [ 33.325784] [] dwc3_suspend_common+0x50/0x60 [ 33.331080] [] dwc3_runtime_suspend+0x48/0x6c [ 33.336810] [] pm_generic_runtime_suspend+0x28/0x38 [ 33.342627] [] __rpm_callback+0x150/0x254 [ 33.349222] [] rpm_callback+0x24/0x78 [ 33.354604] [] rpm_suspend+0xe0/0x4e4 [ 33.359813] [] pm_runtime_work+0xdc/0xf0 [ 33.365028] [] process_one_work+0x12c/0x28c [ 33.370576] [] worker_thread+0x58/0x3b8 [ 33.376393] [] kthread+0x100/0x12c [ 33.381776] [] ret_from_fork+0x10/0x50 Fix this by disabling it as the first thing in phy_exit(). Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Signed-off-by: Vivek Gautam Signed-off-by: Manu Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 78ca8450a4d7d95775a50257f031fb85a8fe2bb2 Author: Fabio Estevam Date: Thu Mar 1 16:08:56 2018 -0300 ARM: imx_v6_v7_defconfig: Select CONFIG_SND_SOC_WM8962 explicitly Currently CONFIG_SND_SOC_WM8962 is selected via SND_SOC_IMX_WM8962 machine driver option. SND_SOC_IMX_WM8962 will be removed in the next kernel cycle, so select the codec driver directly so that it can still be used by default via the generic fsl-asoc-card machine driver. Signed-off-by: Fabio Estevam Acked-by: Nicolin Chen Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 7a33a02ffb0620b01892c6c6808bb711b3f63e9c Author: Takashi Iwai Date: Thu Mar 8 08:32:41 2018 +0100 ALSA: vmaster: Zero-clear ctl before calling slave get Use kzalloc() instead of kmalloc() so that we don't need to rely fully on the slave get() callback to clear the control value that might be copied to user-space. Signed-off-by: Takashi Iwai sound/core/vmaster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e2c177ca84aff092c3c96714b0f6a12900f3946 Author: Takashi Iwai Date: Thu Mar 8 08:26:48 2018 +0100 ALSA: vmaster: Propagate slave error In slave_update() of vmaster code ignores the error from the slave get() callback and copies the values. It's not only about the missing error code but also that this may potentially lead to a leak of uninitialized variables when the slave get() don't clear them. This patch fixes slave_update() not to copy the potentially uninitialized values when an error is returned from the slave get() callback, and to propagate the error value properly. Signed-off-by: Takashi Iwai sound/core/vmaster.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ba5c7a032c2ae66d5467820daab898e5f9048405 Author: Nobuhiro Iwamatsu Date: Wed Feb 28 11:25:52 2018 +0900 arm: dts: zynq: Add Digilent Zybo Z7 board This add a DTS for the Digilent Zybo Z7 board. This board is the successor board of Zybo, these are almost the same except for ps-clk-frequency specifications. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Rob Herring Signed-off-by: Michal Simek Documentation/devicetree/bindings/arm/xilinx.txt | 3 ++ arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/zynq-zybo-z7.dts | 58 ++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) commit 73793093ab17121620d7d409ab944060364a4ed3 Author: Michal Simek Date: Wed Jan 17 15:15:42 2018 +0100 arm: zynq: Add support for Xilinx zc770 xm013 dc4 board zc770 is based board which is extended by FMC/DC cards for SoC validation. FMCs/DCs are supposed to cover all SoC configurations. FMC/DC contains can, ethernet, i2c, qspi, spi and uart. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Documentation/devicetree/bindings/arm/xilinx.txt | 1 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/zynq-zc770-xm013.dts | 78 ++++++++++++++++++++++++ 3 files changed, 80 insertions(+) commit 0d032bb92f8d3843bcc690fd2f5c6534bf2deb1e Author: Michal Simek Date: Wed Jan 17 15:12:16 2018 +0100 arm: zynq: Add support for Xilinx zc770 xm012 dc3 board zc770 is based board which is extended by FMC/DC cards for SoC validation. FMCs/DCs are supposed to cover all SoC configurations. FMC/DC contains can, 2x i2c, nor flash, spi and uart. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Documentation/devicetree/bindings/arm/xilinx.txt | 1 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/zynq-zc770-xm012.dts | 64 ++++++++++++++++++++++++ 3 files changed, 66 insertions(+) commit 0d18af0a8f75f635651fb23817bd99318214448e Author: Michal Simek Date: Wed Jan 17 15:07:46 2018 +0100 arm: zynq: Add support for Xilinx zc770 xm011 dc2 board zc770 is based board which is extended by FMC/DC cards for SoC validation. FMCs/DCs are supposed to cover all SoC configurations. FMC/DC contains can, i2c, nand uart, spi and usb. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Documentation/devicetree/bindings/arm/xilinx.txt | 1 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/zynq-zc770-xm011.dts | 64 ++++++++++++++++++++++++ 3 files changed, 66 insertions(+) commit eac38299d21ed7bf9c774c27aec653bf7067ccfd Author: Michal Simek Date: Wed Jan 17 14:58:44 2018 +0100 arm: zynq: Add support for Xilinx zc770 xm010 dc1 board zc770 is based board which is extended by FMC/DC cards for SoC validation. FMCs/DCs are supposed to cover all SoC configurations. FMC/DC contains ethernet port, can, i2c, sd, qspi, spi, uart and usb. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Documentation/devicetree/bindings/arm/xilinx.txt | 3 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/zynq-zc770-xm010.dts | 95 ++++++++++++++++++++++++ 3 files changed, 99 insertions(+) commit c7cf9964bafdcd08480bd1d79fb0d624c12a0c78 Author: Michal Simek Date: Wed Jan 17 14:25:16 2018 +0100 arm: zynq: Add Xilinx cc108 board The board contains 7z010 with 512MB memory, ethernet, qspi, uart, usbs and sd. But board is not supporting booting from sd card. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Documentation/devicetree/bindings/arm/xilinx.txt | 5 ++ arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/zynq-cc108.dts | 75 ++++++++++++++++++++++++ 3 files changed, 81 insertions(+) commit 7d3439f9cb8c8d31322f727d10e0d32d576b0c86 Author: Michal Simek Date: Wed Jan 17 15:21:38 2018 +0100 arm: zynq: Add missing address node name in microzed board This patch is fixing issue reported by dtc: arch/arm/boot/dts/zynq-microzed.dtb: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name Signed-off-by: Michal Simek arch/arm/boot/dts/zynq-microzed.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32cda44dd60db0f3d9000041e034de107a6a99a3 Author: Michal Simek Date: Wed Nov 1 13:16:17 2017 +0100 arm: dts: zynq: Use SPDX-License-Identifier Follow trend and use the SPDX License description. Signed-off-by: Michal Simek arch/arm/boot/dts/zynq-7000.dtsi | 12 ++---------- arch/arm/boot/dts/zynq-microzed.dts | 10 +--------- arch/arm/boot/dts/zynq-parallella.dts | 10 +--------- arch/arm/boot/dts/zynq-zc702.dts | 10 +--------- arch/arm/boot/dts/zynq-zc706.dts | 10 +--------- arch/arm/boot/dts/zynq-zed.dts | 10 +--------- arch/arm/boot/dts/zynq-zybo.dts | 10 +--------- 7 files changed, 8 insertions(+), 64 deletions(-) commit 16dbf086e93329667d92ef8e241e0e1b88a0b85a Author: Michal Simek Date: Tue Feb 6 14:00:30 2018 +0100 arm: zynq: Use i2c-mux instead of i2cswitch for pca9548 i2c muxes should described like this. Signed-off-by: Michal Simek arch/arm/boot/dts/zynq-zc702.dts | 2 +- arch/arm/boot/dts/zynq-zc706.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e2fc49e19898538184191cbf2bc15f240081efad Author: Michal Simek Date: Fri Jan 19 13:15:44 2018 +0100 arm64: zynqmp: Add support for Xilinx zc1751 Xilinx zc1751 boards is used for silicon validation. Board can be extended with 5 FMCs/DCs cards to connect various IPs. Describe all these combinations. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Documentation/devicetree/bindings/arm/xilinx.txt | 3 + arch/arm64/boot/dts/xilinx/Makefile | 5 + .../boot/dts/xilinx/zynqmp-zc1751-xm015-dc1.dts | 131 +++++++++++++++ .../boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dts | 168 +++++++++++++++++++ .../boot/dts/xilinx/zynqmp-zc1751-xm017-dc3.dts | 150 +++++++++++++++++ .../boot/dts/xilinx/zynqmp-zc1751-xm018-dc4.dts | 178 +++++++++++++++++++++ .../boot/dts/xilinx/zynqmp-zc1751-xm019-dc5.dts | 125 +++++++++++++++ 7 files changed, 760 insertions(+) commit d665c7435f18871e77395e4575c0f7209c5cdc10 Author: Michal Simek Date: Fri Jan 19 13:11:01 2018 +0100 arm64: zynqmp: Add support for Xilinx zc12XX boards These 3 boards requires minimal support to get Linux up and running. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Documentation/devicetree/bindings/arm/xilinx.txt | 9 ++++ arch/arm64/boot/dts/xilinx/Makefile | 3 ++ arch/arm64/boot/dts/xilinx/zynqmp-zc1232-revA.dts | 54 +++++++++++++++++++++++ arch/arm64/boot/dts/xilinx/zynqmp-zc1254-revA.dts | 42 ++++++++++++++++++ arch/arm64/boot/dts/xilinx/zynqmp-zc1275-revA.dts | 42 ++++++++++++++++++ 5 files changed, 150 insertions(+) commit b8aee0229d1e678253e0681b7ed518aa810ad027 Author: Michal Simek Date: Fri Jan 19 13:03:56 2018 +0100 arm64: zynqmp: Add support for Xilinx zcu111-revA Xilinx zcu111 is a customer board. It is reusing some parts from zcu102. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Documentation/devicetree/bindings/arm/xilinx.txt | 3 + arch/arm64/boot/dts/xilinx/Makefile | 1 + arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts | 444 ++++++++++++++++++++++ 3 files changed, 448 insertions(+) commit 9243d4d3908d65fece5153697bda1030c405d094 Author: Michal Simek Date: Thu Jan 18 16:34:51 2018 +0100 arm64: zynqmp: Add support for Xilinx zcu106-revA Xilinx zcu106 is a customer board. It is reusing some parts from zcu102. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Documentation/devicetree/bindings/arm/xilinx.txt | 3 + arch/arm64/boot/dts/xilinx/Makefile | 1 + arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts | 522 ++++++++++++++++++++++ 3 files changed, 526 insertions(+) commit 612eac3b72fa00aebb41d1e29cbf00daaffc07ac Author: Michal Simek Date: Thu Jan 18 16:10:05 2018 +0100 arm64: zynqmp: Add support for Xilinx zcu104-revA Xilinx zcu104 is another customer board. It is sort of zcu102 clone with some differences. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Documentation/devicetree/bindings/arm/xilinx.txt | 3 + arch/arm64/boot/dts/xilinx/Makefile | 1 + arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dts | 195 ++++++++++++++++++++++ 3 files changed, 199 insertions(+) commit ef797b53705c18773b03cd7d8b60a25c904e7a4f Author: Michal Simek Date: Thu Jan 18 15:52:47 2018 +0100 arm64: zynqmp: Add support for Xilinx zcu102 This patch is adding revA, revB and rev1.0. There are also other revisions between which should be backward compatible with previous versions. Unfortunately all revs are still in use. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Documentation/devicetree/bindings/arm/xilinx.txt | 5 + arch/arm64/boot/dts/xilinx/Makefile | 3 + .../arm64/boot/dts/xilinx/zynqmp-zcu102-rev1.0.dts | 36 ++ arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts | 548 +++++++++++++++++++++ arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revB.dts | 40 ++ 5 files changed, 632 insertions(+) commit 5869ba0653b903587e2b8cfb530656a5c0441c03 Author: Michal Simek Date: Thu Jan 7 14:57:27 2016 +0530 arm64: zynqmp: Add support for Xilinx zcu100-revC This board has 2GB of memory, i2c, sd, wifi sdio, spis, uarts, display port and usbs. Board is using fixed clocks because clock driver hasn't been merged yet. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Documentation/devicetree/bindings/arm/xilinx.txt | 6 + arch/arm64/boot/dts/xilinx/Makefile | 1 + arch/arm64/boot/dts/xilinx/zynqmp-clk.dtsi | 213 ++++++++++++++++ arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts | 289 ++++++++++++++++++++++ 4 files changed, 509 insertions(+) commit a7a16068ad9da8b5d0c75449a5d80ef3a4b01fd9 Author: Michal Simek Date: Fri Feb 23 15:19:28 2018 +0100 dt-bindings: xilinx: Add description for ZynqMP Record xlnx,zynqmp compatible string. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Documentation/devicetree/bindings/arm/xilinx.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2250e0413b55f2c13bbdce3ccfde2e7d87bd77ac Author: P L Sai Krishna Date: Thu Jan 7 14:57:27 2016 +0530 arm64: zynqmp: Add 8-bit bus width property for ep108 This patch add 8-bit bus width property to eMMC node. Signed-off-by: P L Sai Krishna Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts | 1 + 1 file changed, 1 insertion(+) commit c9214380db6c773806145749fe701d570308d31e Author: Anurag Kumar Vulisha Date: Thu Nov 5 17:21:37 2015 +0530 arm64: zynqmp: Added OOB timing settings in zynqmp-ep108.dts This patch adds the sata port phy OOB timing values in the sata device-tree node. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit 720ed06c0906212cbd585cf80602035d576f207d Author: Andrew Jeffery Date: Tue Nov 7 18:00:32 2017 +1030 ARM: dts: palmetto: Request mux as per strapping configuration Prevents the error: aspeed-smc 1e630000.spi: Error applying setting, reverse things back The pinmux driver is only capable of modifying selected strapping bits that make sense to change at runtime. The SPI strapping is not currently defined modifiable, so "request" the mux as per how the board is physically strapped. Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 3 +++ 1 file changed, 3 insertions(+) commit 3b47622a36825e0a107222f76408dff46354342f Author: Joel Stanley Date: Thu Feb 22 14:32:39 2018 +1030 ARM: dts: palmetto: Enable rear UART The Palmetto BMC has a UART connected to a RS-232 transceiver designed to be used as a serial console for the host processor. It appears as a D-sub connector on the back of the chassis. Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit cd244bd0d9e5d93a9d375ad609856228a35c3c50 Author: Emmanuel Vadot Date: Fri Mar 2 22:38:52 2018 +0100 ARM: dts: sun8i: h3: Add eMMC for NanoPi M1 Plus The NanoPi-M1-Plus have a 8GB eMMC, add a node for it. This eMMC is always powered with 3.3V. Signed-off-by: Emmanuel Vadot Signed-off-by: Maxime Ripard [wens@csie.org: Fixed "mmc2_8bits_pins" label typo; added subject prefixes] Signed-off-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit bdb7013df910681f84eff27b07791d4c160cb76f Author: Dan Carpenter Date: Wed Mar 7 09:18:08 2018 +0300 of: unittest: fix an error test in of_unittest_overlay_8() We changed this from of_overlay_apply() to overlay_data_apply(). The overlay_data_apply() function returns 1 on success and 0 on error so the check for less than zero needs to be updated. Fixes: 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT") Signed-off-by: Dan Carpenter Reviewed-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/unittest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 370ed7a9b9176d68c7b13e6cef32efa6ac5b2d97 Author: Andrzej Hajda Date: Tue Feb 27 13:22:07 2018 +0100 extcon: add possibility to get extcon device by OF node Since extcon property is not allowed in DT, extcon subsystem requires another way to get extcon device. Lets try the simplest approach - get edev by of_node. Signed-off-by: Andrzej Hajda Acked-by: Chanwoo Choi Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 44 ++++++++++++++++++++++++++++++++++---------- include/linux/extcon.h | 6 ++++++ 2 files changed, 40 insertions(+), 10 deletions(-) commit e0270c8089ae65f7e5180b56a9fe1fdc7435a326 Author: Sudeep Holla Date: Tue Mar 6 11:47:49 2018 +0000 firmware: meson-sm: rework meson_sm_init to use module_platform_driver_probe Commit 3aa0582fdb82 ("of: platform: populate /firmware/ node from of_platform_default_populate_init()") takes care of populating all the devices under the /firmware/ node in of_platform_default_populate_init() This patch reworks meson_sm_init to use module_platform_driver_probe as the platform device is populated. Cc: Carlo Caione Cc: Kevin Hilman Cc: linux-amlogic@lists.infradead.org Signed-off-by: Sudeep Holla Signed-off-by: Kevin Hilman drivers/firmware/meson/meson_sm.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 6878231f252c791d160dd35eae8c779dbe780277 Author: Neil Armstrong Date: Tue Mar 6 17:17:42 2018 +0100 meson-gx-socinfo: Add package id for S905H The S905H can be found on the Wetek Hub and Play2 boards. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman drivers/soc/amlogic/meson-gx-socinfo.c | 1 + 1 file changed, 1 insertion(+) commit fb72c03e0e32068a0a2ff66c2787814142d9a211 Author: Neil Armstrong Date: Tue Mar 6 17:19:33 2018 +0100 ARM64: dts: meson-gxbb-wetek: add a wetek specific dtsi to cleanup hub and play2 This patch adds a specific wetek dtsi to handle the specific Hub and Play2 boards by no more depending on the p20x dtsi. This simplifies the hub and play2 dts and will avoid breaking these boards when adding p200 and p201 specific changes. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman .../boot/dts/amlogic/meson-gxbb-wetek-hub.dts | 43 +--- .../boot/dts/amlogic/meson-gxbb-wetek-play2.dts | 83 +------ arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 256 +++++++++++++++++++++ 3 files changed, 262 insertions(+), 120 deletions(-) commit c04ffa71ff491220cac28f55237c9aad379a8656 Author: Jerome Brunet Date: Fri Mar 2 14:44:36 2018 +0100 ARM64: dts: meson: reduce odroid-c2 eMMC maximum rate Different modules maybe installed by the user on the eMMC connector of the odroid-c2. While the red modules are working without an issue, it seems some black modules (apparently Samsung based) are having issue at 200MHz While the tuning algorithm introduced in v4.14 enables high speed modes on every other tested designs, it seems a problem remains for this particular combination of board and eMMC module. Lowering the maximum frequency of the eMMC on this board until we can figure out a better solution. Fixes: d341ca88eead ("mmc: meson-gx: rework tuning function") Suggested-by: Ellie Reeves Signed-off-by: Jerome Brunet Cc: stable@vger.kernel.org Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12ef9bda06a5536fc377bab636074848799d7749 Merge: a366e30 12fe122 Author: Daniel Borkmann Date: Thu Mar 8 02:22:34 2018 +0100 Merge branch 'bpf-perf-sample-addr' Teng Qin says: ==================== These patches add support that allows bpf programs attached to perf events to read the address values recorded with the perf events. These values are requested by specifying sample_type with PERF_SAMPLE_ADDR when calling perf_event_open(). The main motivation for these changes is to support building memory or lock access profiling and tracing tools. For example on Intel CPUs, the recorded address values for supported memory or lock access perf events would be the access or lock target addresses from PEBS buffer. Such information would be very valuable for building tools that help understand memory access or lock acquire pattern. ==================== Signed-off-by: Daniel Borkmann commit 12fe12253c56a26e591ceefbdf0998b391022003 Author: Teng Qin Date: Tue Mar 6 10:55:02 2018 -0800 samples/bpf: add example to test reading address This commit adds additional test in the trace_event example, by attaching the bpf program to MEM_UOPS_RETIRED.LOCK_LOADS event with PERF_SAMPLE_ADDR requested, and print the lock address value read from the bpf program to trace_pipe. Signed-off-by: Teng Qin Signed-off-by: Daniel Borkmann samples/bpf/trace_event_kern.c | 4 ++++ samples/bpf/trace_event_user.c | 15 +++++++++++++++ 2 files changed, 19 insertions(+) commit 95da0cdb723260362fc126a563285ac66a193da7 Author: Teng Qin Date: Tue Mar 6 10:55:01 2018 -0800 bpf: add support to read sample address in bpf program This commit adds new field "addr" to bpf_perf_event_data which could be read and used by bpf programs attached to perf events. The value of the field is copied from bpf_perf_event_data_kern.addr and contains the address value recorded by specifying sample_type with PERF_SAMPLE_ADDR when calling perf_event_open. Signed-off-by: Teng Qin Signed-off-by: Daniel Borkmann include/uapi/linux/bpf_perf_event.h | 1 + kernel/trace/bpf_trace.c | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) commit 114abfe1aa5f55b26fbaf050996a937de4b92cf2 Author: Neil Armstrong Date: Tue Feb 27 12:30:33 2018 +0100 ARM64: dts: amlogic: Convert to new-style SPDX license identifiers Move the SPDX-License-Identifier lines to the top and drop the license splat. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 3 +- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 3 +- .../arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 39 +------------------- arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 39 +------------------- .../boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 41 +--------------------- .../boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 39 +------------------- .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 39 +------------------- arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts | 39 +------------------- arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts | 39 +------------------- arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 39 +------------------- .../boot/dts/amlogic/meson-gxbb-vega-s95-meta.dts | 39 +------------------- .../boot/dts/amlogic/meson-gxbb-vega-s95-pro.dts | 39 +------------------- .../boot/dts/amlogic/meson-gxbb-vega-s95-telos.dts | 39 +------------------- .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 39 +------------------- .../boot/dts/amlogic/meson-gxbb-wetek-hub.dts | 39 +------------------- .../boot/dts/amlogic/meson-gxbb-wetek-play2.dts | 39 +------------------- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 39 +------------------- arch/arm64/boot/dts/amlogic/meson-gxl-mali.dtsi | 3 +- .../boot/dts/amlogic/meson-gxl-s905d-p230.dts | 39 +------------------- .../boot/dts/amlogic/meson-gxl-s905d-p231.dts | 39 +------------------- arch/arm64/boot/dts/amlogic/meson-gxl-s905d.dtsi | 39 +------------------- .../dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts | 3 +- .../dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 3 +- .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 3 +- .../dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 39 +------------------- .../boot/dts/amlogic/meson-gxl-s905x-p212.dts | 39 +------------------- .../boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 3 +- arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi | 39 +------------------- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 39 +------------------- .../boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 3 +- .../arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 39 +------------------- arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts | 39 +------------------- arch/arm64/boot/dts/amlogic/meson-gxm-q201.dts | 39 +------------------- arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 39 +------------------- arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts | 3 +- arch/arm64/boot/dts/amlogic/meson-gxm.dtsi | 39 +------------------- 36 files changed, 36 insertions(+), 1046 deletions(-) commit 7a6cc8be3938c322964065312d57439a92584488 Author: Martin Blumenstingl Date: Sat Feb 17 17:06:50 2018 +0100 ARM: dts: meson8b: add the I2C clocks Add the I2C clocks so the I2C busses can be used. The clock input is not device specific (the AO I2C bus uses clk81 as input, while the two I2C busses in CBUS have a separate "CLKID_I2C" gate, provided by the clock controller. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b4ff05ca9a0a3c297111c48f155e775f1811b4b4 Author: Jerome Brunet Date: Thu Feb 15 11:10:31 2018 +0100 ARM64: dts: meson-axg: fix pwm_AO_cd compatible The compatible in pwm_AO_cd is wrong and does not match anything. Correct this with the correct compatible string Fixes: 4a81e5ddfb43 ("ARM64: dts: meson-axg: add PWM DT info for Meson-Axg SoC") Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a04c18cb27cd07b897c693958c90adc873012ac0 Author: Jerome Brunet Date: Thu Feb 15 11:12:07 2018 +0100 ARM64: dts: meson-axg: add sec_AO system controller add the secure AO system controller with chipid enabled Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 31135eb3887daf2ed3e88fbefc36243357a9008f Author: Leon Romanovsky Date: Wed Feb 28 11:18:13 2018 +0200 net/mlx5: Fix wrongly assigned CQ reference counter The kernel compiled with CONFIG_REFCOUNT_FULL produces the following error. The reason to it that initial value of refcount_t is supposed to be more than 0, change it. [ 3.106634] ------------[ cut here ]------------ [ 3.107756] refcount_t: increment on 0; use-after-free. [ 3.109130] WARNING: CPU: 0 PID: 1 at lib/refcount.c:153 refcount_inc+0x27/0x30 [ 3.110085] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.16.0-rc1-00028-gf683e04bdccc #137 [ 3.110085] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org 04/01/2014 [ 3.110085] RIP: 0010:refcount_inc+0x27/0x30 [ 3.110085] RSP: 0000:ffffaa620000fba0 EFLAGS: 00010286 [ 3.110085] RAX: 0000000000000000 RBX: ffff9a6d1a1821c8 RCX: ffffffff98a50f48 [ 3.110085] RDX: 0000000000000001 RSI: 0000000000000086 RDI: 0000000000000246 [ 3.110085] RBP: ffff9a6d1ac800a0 R08: 0000000000000289 R09: 000000000000000a [ 3.110085] R10: fffff03bc0682840 R11: ffffffff9949856d R12: ffff9a6d1b4a4000 [ 3.110085] R13: 0000000000000000 R14: ffff9a6d1a0a6c00 R15: ffffaa620000fc5c [ 3.110085] FS: 0000000000000000(0000) GS:ffff9a6d1fc00000(0000) knlGS:0000000000000000 [ 3.110085] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3.110085] CR2: 0000000000000000 CR3: 000000000ba0a000 CR4: 00000000000006b0 [ 3.110085] Call Trace: [ 3.110085] mlx5_core_create_cq+0xde/0x250 [ 3.110085] ? __kmalloc+0x1ce/0x1e0 [ 3.110085] mlx5e_create_cq+0x15c/0x1e0 [ 3.110085] mlx5e_open_drop_rq+0xea/0x190 [ 3.110085] mlx5e_attach_netdev+0x53/0x140 [ 3.110085] mlx5e_attach+0x3d/0x60 [ 3.110085] mlx5e_add+0x11d/0x2f0 [ 3.110085] mlx5_add_device+0x77/0x170 [ 3.110085] mlx5_register_interface+0x74/0xc0 [ 3.110085] ? set_debug_rodata+0x11/0x11 [ 3.110085] init+0x67/0x72 [ 3.110085] ? mlx4_en_init_ptys2ethtool_map+0x346/0x346 [ 3.110085] do_one_initcall+0x98/0x147 [ 3.110085] ? set_debug_rodata+0x11/0x11 [ 3.110085] kernel_init_freeable+0x164/0x1e0 [ 3.110085] ? rest_init+0xb0/0xb0 [ 3.110085] kernel_init+0xa/0x100 [ 3.110085] ret_from_fork+0x35/0x40 [ 3.110085] Code: 00 00 00 00 e8 ab ff ff ff 84 c0 74 02 f3 c3 80 3d 3b c3 64 01 00 75 f5 48 c7 c7 68 0b 81 98 c6 05 2b c3 64 01 01 e8 79 d7 a3 ff <0f> ff c3 66 0f 1f 44 00 00 8b 06 83 f8 ff 74 39 31 c9 39 f8 89 [ 3.110085] ---[ end trace a0068e1c68438a74 ]--- Fixes: f105b45bf77c ("net/mlx5: CQ hold/put API") Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/cq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cb01008390bb0645d4728c7f8825e32d4b540a30 Author: Aviad Yehezkel Date: Thu Jan 18 16:02:17 2018 +0200 net/mlx5: IPSec, Add support for ESN Currently ESN is not supported with IPSec device offload. This patch adds ESN support to IPsec device offload. Implementing new xfrm device operation to synchronize offloading device ESN with xfrm received SN. New QP command to update SA state at the following: ESN 1 ESN 2 ESN 3 |-----------*-----------|-----------*-----------|-----------* ^ ^ ^ ^ ^ ^ ^ - marks where QP command invoked to update the SA ESN state machine. | - marks the start of the ESN scope (0-2^32-1). At this point move SA ESN overlap bit to zero and increment ESN. * - marks the middle of the ESN scope (2^31). At this point move SA ESN overlap bit to one. Signed-off-by: Aviad Yehezkel Signed-off-by: Yossef Efraim Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 118 +++++++++++++++++++-- .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 23 ++++ .../mellanox/mlx5/core/en_accel/ipsec_rxtx.c | 29 ++++- .../mellanox/mlx5/core/en_accel/ipsec_rxtx.h | 5 + .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 22 ++++ include/linux/mlx5/accel.h | 2 + include/linux/mlx5/mlx5_ifc_fpga.h | 2 + 7 files changed, 189 insertions(+), 12 deletions(-) commit 75ef3f551572822a392ca9b03486bf09163cc668 Author: Aviad Yehezkel Date: Thu Jan 18 16:31:55 2018 +0200 net/mlx5e: Added common function for to_ipsec_sa_entry New function for getting driver internal sa entry from xfrm state. All checks are done in one function. Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 29 ++++++++++++++-------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 05564d0ae075b7a73339eaa05296c3034e439c32 Author: Aviad Yehezkel Date: Sun Feb 18 15:07:20 2018 +0200 net/mlx5: Add flow-steering commands for FPGA IPSec implementation In order to add a context to the FPGA, we need to get both the software transform context (which includes the keys, etc) and the source/destination IPs (which are included in the steering rule). Therefore, we register new set of firmware like commands for the FPGA. Each time a rule is added, the steering core infrastructure calls the FPGA command layer. If the rule is intended for the FPGA, it combines the IPs information with the software transformation context and creates the respective hardware transform. Afterwards, it calls the standard steering command layer. Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/accel/ipsec.c | 7 + .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 724 +++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.h | 24 + drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 5 + drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 + include/linux/mlx5/accel.h | 5 + include/linux/mlx5/fs.h | 3 + 7 files changed, 770 insertions(+) commit d6c4f0298cec8c4c88d33aca17c066995e92fe91 Author: Aviad Yehezkel Date: Thu Jan 18 13:05:48 2018 +0200 net/mlx5: Refactor accel IPSec code The current code has one layer that executed FPGA commands and the Ethernet part directly used this code. Since downstream patches introduces support for IPSec in mlx5_ib, we need to provide some abstractions. This patch refactors the accel code into one layer that creates a software IPSec transformation and another one which creates the actual hardware context. The internal command implementation is now hidden in the FPGA core layer. The code also adds the ability to share FPGA hardware contexts. If two contexts are the same, only a reference count is taken. Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/accel/ipsec.c | 58 +-- .../net/ethernet/mellanox/mlx5/core/accel/ipsec.h | 97 ++--- .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 150 ++++---- .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 391 +++++++++++++++++++-- .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.h | 55 ++- include/linux/mlx5/accel.h | 83 ++++- include/linux/mlx5/mlx5_ifc_fpga.h | 59 ++++ 7 files changed, 668 insertions(+), 225 deletions(-) commit af9fe19d660e333ca9b0a6e1506e684a1126b9e7 Author: Aviad Yehezkel Date: Wed Jan 17 11:20:33 2018 +0200 net/mlx5: Added required metadata capability for ipsec Currently our device requires additional metadata in packet to perform ipsec crypto offload. Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 6 ++++-- include/linux/mlx5/accel.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) commit a4713c5a8d612b4a3445874a9eb8af5a92c08bd0 Author: Rodrigo Vivi Date: Wed Mar 7 14:09:12 2018 -0800 drm/i915/cnl: Add Wa_2201832410 "Clock gating bug in GWL may not clear barrier state when an EOT is received, causing a hang the next time that barrier is used." HSDES: 2201832410 Cc: Rafael Antognolli Signed-off-by: Rodrigo Vivi Reviewed-by: Rafael Antognolli Link: https://patchwork.freedesktop.org/patch/msgid/20180307220912.3681-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 5 +++++ 2 files changed, 8 insertions(+) commit 1d2005e2040b95af4c861e40cf806ff44cd7c883 Author: Aviad Yehezkel Date: Mon Jan 29 15:05:50 2018 +0200 net/mlx5: Export ipsec capabilities We will need that for ipsec verbs. Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/accel/ipsec.c | 3 +- .../net/ethernet/mellanox/mlx5/core/accel/ipsec.h | 14 +----- .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 9 ++-- .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 14 +++--- include/linux/mlx5/accel.h | 57 ++++++++++++++++++++++ 5 files changed, 73 insertions(+), 24 deletions(-) commit 65802f480008066636a43173b12388bb3fb7bd3a Author: Aviad Yehezkel Date: Tue Jan 16 16:12:22 2018 +0200 net/mlx5: IPSec, Add command V2 support This patch adds V2 command support. New fpga devices support extended features (udp encap, esn etc...), this features require new hardware sadb format therefore we have a new version of commands to manipulate it. Signed-off-by: Yossef Efraim Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/accel/ipsec.c | 9 +++- .../net/ethernet/mellanox/mlx5/core/accel/ipsec.h | 21 ++++++-- .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 60 ++++++++++------------ .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 11 ++-- .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.h | 5 +- include/linux/mlx5/mlx5_ifc_fpga.h | 4 +- 6 files changed, 66 insertions(+), 44 deletions(-) commit 788a8210764ce2977095010931959c87b60c2f51 Author: Yossi Kuperman Date: Sun Oct 22 19:45:45 2017 +0300 net/mlx5e: IPSec, Add support for ESP trailer removal by hardware Current hardware decrypts and authenticates incoming ESP packets. Subsequently, the software extracts the nexthdr field, truncates the trailer and adjusts csum accordingly. With this patch and a capable device, the trailer is being removed by the hardware and the nexthdr field is conveyed via PET. This way we avoid both the need to access the trailer (cache miss) and to compute its relative checksum, which significantly improve the performance. Experiment shows that trailer removal improves the performance by 2Gbps, (netperf). Both forwarding and host-to-host configurations. Signed-off-by: Yossi Kuperman Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/accel/ipsec.h | 2 + .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 2 + .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 1 + .../mellanox/mlx5/core/en_accel/ipsec_rxtx.c | 10 +++- .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 54 ++++++++++++++++++++++ include/linux/mlx5/mlx5_ifc_fpga.h | 13 +++++- 6 files changed, 80 insertions(+), 2 deletions(-) commit 581fdddee420cebe2cb781cb3c84c82676a86949 Author: Yossi Kuperman Date: Sun Oct 22 19:43:58 2017 +0300 net/mlx5: IPSec, Generalize sandbox QP commands The current code assume only SA QP commands. Refactor in order to pave the way for new QP commands: 1. Generic cmd response format. 2. SA cmd checks are in dedicated functions. 3. Aligned debug prints. Signed-off-by: Yossi Kuperman Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 116 ++++++++++++--------- include/linux/mlx5/mlx5_ifc_fpga.h | 16 +++ 2 files changed, 81 insertions(+), 51 deletions(-) commit d83a69c2b1b17a8aedc7a75ba8b620bfd2057e93 Author: Saeed Mahameed Date: Wed Mar 7 15:44:48 2018 -0800 net/mlx5: Use MLX5_IPSEC_DEV macro for ipsec caps Fix build break of mlx5_accel_ipsec_device_caps is not defined when MLX5_ACCEL is not selected, use MLX5_IPSEC_DEV instead which handles such case. Signed-off-by: Saeed Mahameed Reported-by: Doug Ledford drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a366e300ae9fc466d333e6d8f2bc5d58ed248041 Author: Eric Dumazet Date: Wed Mar 7 08:43:19 2018 -0800 ip6mr: remove synchronize_rcu() in favor of SOCK_RCU_FREE Kirill found that recently added synchronize_rcu() call in ip6mr_sk_done() was slowing down netns dismantle and posted a patch to use it only if the socket was found. I instead suggested to get rid of this call, and use instead SOCK_RCU_FREE We might later change IPv4 side to use the same technique and unify both stacks. IPv4 does not use synchronize_rcu() but has a call_rcu() that could be replaced by SOCK_RCU_FREE. Tested: time for i in {1..1000}; do unshare -n /bin/false;done Before : real 7m18.911s After : real 10.187s Fixes: 8571ab479a6e ("ip6mr: Make mroute_sk rcu-based") Signed-off-by: Eric Dumazet Reported-by: Kirill Tkhai Cc: Yuval Mintz Reviewed-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv6/ip6mr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d50a8a96ee663909254e2f1db9aed2414e9f45ba Author: Yishai Hadas Date: Mon Feb 26 15:02:21 2018 +0200 IB/mlx4: Move mlx4_uverbs_ex_query_device_resp to include/uapi/ This struct is involved in the user API for mlx4 and should not be hidden inside a driver header file. Fixes: 09d208b258a2 ("IB/mlx4: Add report for RSS capabilities by vendor channel") Reviewed-by: Mark Bloch Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx4/mlx4_ib.h | 14 -------------- include/uapi/rdma/mlx4-abi.h | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) commit 3f6be0ebdeb2255534664c4ececc2eac1d5dcb30 Merge: c33b3b9 9426bbc Author: David S. Miller Date: Wed Mar 7 18:05:57 2018 -0500 Merge branch 'RDS-zerocopy-code-enhancements' Sowmini Varadhan says: ==================== RDS: zerocopy code enhancements A couple of enhancements to the rds zerocop code - patch 1 refactors rds_message_copy_from_user to pull the zcopy logic into its own function - patch 2 drops the usage sk_buff to track MSG_ZEROCOPY cookies and uses a simple linked list (enhancement suggested by willemb during code review) ==================== Signed-off-by: David S. Miller commit 9426bbc6de99b8649d897b94e8f5916b58195643 Author: Sowmini Varadhan Date: Tue Mar 6 07:22:34 2018 -0800 rds: use list structure to track information for zerocopy completion notification Commit 401910db4cd4 ("rds: deliver zerocopy completion notification with data") removes support fo r zerocopy completion notification on the sk_error_queue, thus we no longer need to track the cookie information in sk_buff structures. This commit removes the struct sk_buff_head rs_zcookie_queue by a simpler list that results in a smaller memory footprint as well as more efficient memory_allocation time. Signed-off-by: Sowmini Varadhan Acked-by: Willem de Bruijn Signed-off-by: David S. Miller net/rds/af_rds.c | 6 ++--- net/rds/message.c | 77 +++++++++++++++++++++++++++++++++++-------------------- net/rds/rds.h | 23 ++++++++++++----- net/rds/recv.c | 23 ++++++++++++----- 4 files changed, 85 insertions(+), 44 deletions(-) commit d40a126b16ea851f858f97b0e214d97c8355cecb Author: Sowmini Varadhan Date: Tue Mar 6 07:22:33 2018 -0800 rds: refactor zcopy code into rds_message_zcopy_from_user Move the large block of code predicated on zcopy from rds_message_copy_from_user into a new function, rds_message_zcopy_from_user() Signed-off-by: Sowmini Varadhan Acked-by: Willem de Bruijn Signed-off-by: David S. Miller net/rds/message.c | 108 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 60 insertions(+), 48 deletions(-) commit 1abb791fcdb1a744d77ef9f3be051acba0d72a70 Merge: befd8d9 e810bf5 Author: Doug Ledford Date: Wed Mar 7 15:40:29 2018 -0500 Merge tag 'mlx5-updates-2018-02-28-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into k.o/wip/dl-for-next mlx5-updates-2018-02-28-1 (IPSec-1) This series consists of some fixes and refactors for the mlx5 drivers, especially around the FPGA and flow steering. Most of them are trivial fixes and are the foundation of allowing IPSec acceleration from user-space. We use flow steering abstraction in order to accelerate IPSec packets. When a user creates a steering rule, [s]he states that we'll carry an encrypt/decrypt flow action (using a specific configuration) for every packet which conforms to a certain match. Since currently offloading these packets is done via FPGA, we'll add another set of flow steering ops. These ops will execute the required FPGA commands and then call the standard steering ops. In order to achieve this, we need that the commands will get all the required information. Therefore, we pass the fte object and embed the flow_action struct inside the fte. In addition, we add the shim layer that will later be used for alternating between the standard and the FPGA steering commands. Some fixes, like " net/mlx5e: Wait for FPGA command responses with a timeout" are very relevant for user-space applications, as these applications could be killed, but we still want to wait for the FPGA and update the kernel's database. Regards, Aviad and Matan Signed-off-by: Doug Ledford commit befd8d98f230d911b0db308f19663ec03572e0c9 Author: Zhu Yanjun Date: Wed Mar 7 00:47:57 2018 -0500 IB/rxe: change the function rxe_init_device_param type The function rxe_init_device_param always return 0. So the function type is changed to void. CC: Srinivas Eeda CC: Junxiao Bi Signed-off-by: Zhu Yanjun Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 31f1bd14cbfe4f7a4ea1ada2d4e0dc802a258f5d Author: Zhu Yanjun Date: Tue Feb 27 06:04:33 2018 -0500 IB/rxe: remove unnecessary rxe in rxe_send In the function rxe_send, the variable rxe is not used in it. So it should be removed. CC: Srinivas Eeda CC: Junxiao Bi Signed-off-by: Zhu Yanjun Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_loc.h | 5 ++--- drivers/infiniband/sw/rxe/rxe_net.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) commit 86af617641512f4aeb78fd25dcec7e0f4bb1d5e5 Author: Zhu Yanjun Date: Tue Feb 27 06:04:32 2018 -0500 IB/rxe: remove unnecessary skb_clone In send_atomic_ack function, it is not necessary to make a skb_clone. To gain better performance (high throughput and low latency), this skb_clone is removed. The following tests are made. server client --------- --------- |1.1.1.1|<----rxe-channel--->|1.1.1.2| --------- --------- On server: rping -s -a 1.1.1.1 -v -C 1000 -S 512 On client: rping -c -a 1.1.1.1 -v -C 1000 -S 512 The kernel config CONFIG_DEBUG_KMEMLEAK is enabled on both server and client. This test runs for several hours. There is no memory leak and the whole system can work well. Based on the above network, the following tests are made. Server: ibv_rc_pingpong -d rxe0 -g 1 Client: ibv_rc_pingpong -d rxe0 -g 1 1.1.1.1 The test results on Server(10 tests are made). Before: Throughput is 137.07 Mbit/sec Latency is 517.76 usec/iter After: Throughput is 148.85 Mbit/sec Latency is 476.64 usec/iter The throughput is enhanced and the latency is reduced. CC: Srinivas Eeda CC: Junxiao Bi Signed-off-by: Zhu Yanjun Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_resp.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 63cf1a902c9dd6b0761861ea87fce3663f59403b Author: Bart Van Assche Date: Fri Mar 2 13:14:15 2018 -0800 IB/srpt: Add RDMA/CM support Add a parameter for configuring the port on which the ib_srpt driver listens for incoming RDMA/CM connections, namely /sys/kernel/config/target/srpt/discovery_auth/rdma_cm_port. The default value for this parameter is 0 which means "do not listen for incoming RDMA/CM connections". Add RDMA/CM support to all code that handles connection state changes. Modify srpt_init_nodeacl() such that ACLs can be configured for IPv4 and IPv6 addresses. Note: incoming connection requests are only accepted for ports that have been enabled. See also the "if (!sport->enabled)" code in the connection request handler. See also the following configfs attribute: /sys/kernel/config/target/srpt/$port/$port/enable. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 380 ++++++++++++++++++++++++++++------ drivers/infiniband/ulp/srpt/ib_srpt.h | 8 +- 2 files changed, 325 insertions(+), 63 deletions(-) commit df99dd9202216f54eaf672e07808e9198d868af6 Author: Linus Walleij Date: Wed Mar 7 22:58:19 2018 +0100 drm/pl111: Use max memory bandwidth for resolution We were previously selecting 1024x768 and 32BPP as the default set-up for the PL111 consumers. This does not work on elder systems: the device tree bindings support a property "max-memory-bandwidth" in bytes/second that states that if you exceed this the memory bus will saturate. The result is flickering and unstable images. Parse the "max-memory-bandwidth" and respect it when intializing the driver. On the RealView PB11MP, Versatile and Integrator/CP we get a nice console as default with this code. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180307215819.15814-1-linus.walleij@linaro.org drivers/gpu/drm/pl111/pl111_display.c | 36 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/pl111/pl111_drm.h | 1 + drivers/gpu/drm/pl111/pl111_drv.c | 6 ++++++ 3 files changed, 43 insertions(+) commit 2e7a66a8b5ebf1b04a866e5d7c981640f7f62934 Author: Linus Walleij Date: Mon Mar 5 11:17:02 2018 +0100 drm/bridge: sii902x: Retry status read after DDI I2C The following happens when connection a DVI output driven from the SiI9022 using a DVI-to-VGA adapter plug: i2c i2c-0: sendbytes: NAK bailout. i2c i2c-0: sendbytes: NAK bailout. Then no picture. Apparently the I2C engine inside the SiI9022 is not smart enough to try to fall back to DDC I2C. Or the vendor have not integrated the electronics properly. I don't know which one it is. After this, the I2C bus seems stalled and the first attempt to read the status register fails, and the code returns with negative return value, and the display fails to initialized. Instead, retry status readout five times and continue even if this fails. Tested on the ARM Versatile Express with a DVI-to-VGA connector, it now gives picture. Introduce a helper struct device *dev variable to make the code more readable. Cc: Ville Syrjälä Reviewed-by: Liviu Dudau Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180305101702.13441-1-linus.walleij@linaro.org drivers/gpu/drm/bridge/sii902x.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 20a0dfeead0512af1d194ebaa8b0abe05323bbdb Author: Linus Walleij Date: Fri Mar 2 10:09:47 2018 +0100 drm/pl111: Handle the RealView variant separately We want to cut down the default bpp to 16 on the RealView so we can have a 1024x768 framebuffer console by default. The memory bandwidth limitations makes this not work with the PL111 default of 32bpp. This builds on top of the earlier patches making the framebuffer default bpp a per-variant variable. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180302090948.6399-4-linus.walleij@linaro.org drivers/gpu/drm/pl111/pl111_versatile.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 9f8d4fe94eb4fb958fc92ee91a3ec54ab378339c Author: Linus Walleij Date: Fri Mar 2 10:09:45 2018 +0100 drm/pl111: Make the default BPP a per-variant variable The PL110, Integrator and Versatile boards strongly prefer to use 16 BPP even if other modes are supported, both to keep down memory consumption and also to easier find a good match to supported resolutions with consideration taken to the memory bandwidth of the platforms. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180302090948.6399-2-linus.walleij@linaro.org Link: https://patchwork.freedesktop.org/patch/msgid/20180307084316.23623-1-linus.walleij@linaro.org Link: https://patchwork.freedesktop.org/patch/msgid/20180307084316.23623-1-linus.walleij@linaro.org drivers/gpu/drm/pl111/pl111_drm.h | 2 ++ drivers/gpu/drm/pl111/pl111_drv.c | 4 +++- drivers/gpu/drm/pl111/pl111_versatile.c | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) commit afe09e43b4000503a50a20577d44e16050ccf6ca Author: Linus Walleij Date: Tue Feb 27 11:11:09 2018 +0100 drm: simple_kms_helper: Fix .mode_valid() documentation This fixes up the .mode_valid() vtable entry documentation by copyediting the documentation from the .mode_valid() documentation in the drm_modeset_helper_vtables.h file. Fixes: 40275dc4edb4 ("drm: simple_kms_helper: Add mode_valid() callback support") Suggested-by: Daniel Vetter Reviewed-by: Daniel Vetter Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180227101109.6088-1-linus.walleij@linaro.org include/drm/drm_simple_kms_helper.h | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) commit bbce9ad9c26136a1581fa7cc6b576353b1a76ce9 Author: Linus Walleij Date: Fri Mar 2 10:14:26 2018 +0100 bridge: Elaborate a bit on dumb VGA bridges in Kconfig It's better if we explain a bit that this pertains to non-programmable VGA DAC bridges. Reviewed-by: Laurent Pinchart Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180302091426.8463-1-linus.walleij@linaro.org drivers/gpu/drm/bridge/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b67aea2bbab780e412b8af3386cc9f78f61a4cac Merge: 661e50b 8d06c33 Author: Arnd Bergmann Date: Wed Mar 7 22:18:39 2018 +0100 Merge tag 'metag_remove_2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jhogan/metag into asm-generic Remove metag architecture These patches remove the metag architecture and tightly dependent drivers from the kernel. With the 4.16 kernel the ancient gcc 4.2.4 based metag toolchain we have been using is hitting compiler bugs, so now seems a good time to drop it altogether. * tag 'metag_remove_2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jhogan/metag: i2c: img-scb: Drop METAG dependency media: img-ir: Drop METAG dependency watchdog: imgpdc: Drop METAG dependency MAINTAINERS/CREDITS: Drop METAG ARCHITECTURE tty: Remove metag DA TTY and console driver clocksource: Remove metag generic timer driver irqchip: Remove metag irqchip drivers Drop a bunch of metag references docs: Remove remaining references to metag docs: Remove metag docs metag: Remove arch/metag/ Signed-off-by: Arnd Bergmann commit f6c3b601bd490eda08c27b03607448abd4b4841b Author: James Zhu Date: Tue Mar 6 14:52:35 2018 -0500 drm/amdgpu:Always save uvd vcpu_bo in VM Mode When UVD is in VM mode, there is not uvd handle exchanged, uvd.handles are always 0. So vcpu_bo always need save, Otherwise amdgpu driver will fail during suspend/resume. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105021 Signed-off-by: James Zhu Reviewed-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit ec7549df08c20ec7f046540f4372b646bde50fac Author: James Zhu Date: Tue Mar 6 14:43:50 2018 -0500 drm/amdgpu:Correct max uvd handles Max uvd handles should use adev->uvd.max_handles instead of AMDGPU_MAX_UVD_HANDLES here. Signed-off-by: James Zhu Reviewed-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebb043f267511a6e6ba2ee92e0146552432e8db2 Author: Tom St Denis Date: Fri Feb 23 09:46:23 2018 -0500 drm/amdgpu: replace iova debugfs file with iomem (v3) This allows access to pages allocated through the driver with optional IOMMU mapping. v2: Fix number of bytes copied and add write method v3: drop check for kmap return Original-by: Christian König Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 102 +++++++++++++++++++++++++------- 1 file changed, 81 insertions(+), 21 deletions(-) commit 65e4b49019029e7effcfc7855af822cd75f28c47 Author: Shirish S Date: Wed Mar 7 12:36:11 2018 +0530 drm/amd/display: validate plane format on primary plane In dce110, the plane configuration is such that plane 0 or the primary plane should be rendered with only RGB data. This patch adds the validation to ensure that no video data is rendered on plane 0. Signed-off-by: Shirish S Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4062119b9d958df33bcda703dc3ac646908fa861 Author: Emily Deng Date: Wed Mar 7 09:47:43 2018 +0800 drm/amdgpu: Clean sdma wptr register when only enable wptr polling The sdma wptr polling memory is not fast enough, then the sdma wptr register will be random, and not equal to sdma rptr, which will cause sdma engine hang when load driver, so clean up the sdma wptr directly to fix this issue. v2:add comment above the code and correct coding style Reviewed-by: Xiangliang Yu Reviewed-by: Christian König Signed-off-by: Emily Deng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8113cf9cab1713e8b711f195bf673206f44fa050 Author: Tom St Denis Date: Tue Mar 6 10:52:41 2018 -0500 drm/amd/amdgpu: re-add missing GC 9.1 and SDMA0 4.1 sh_mask header files These are required by umr to properly parse bitfield offsets. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../drm/amd/include/asic_reg/gc/gc_9_1_sh_mask.h | 31150 +++++++++++++++++++ .../amd/include/asic_reg/sdma0/sdma0_4_1_sh_mask.h | 1658 + 2 files changed, 32808 insertions(+) commit dccf1eff352a8803eea4a8785ed3eb7e962d196f Author: Monk Liu Date: Mon Mar 5 19:26:36 2018 +0800 drm/amdgpu: give warning before sleep in kiq_r/wreg to catch error that may schedule in atomic context early on Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 59dd47728625e6f8e77f888d00596c9fb7057540 Author: Christian König Date: Tue Feb 20 19:51:02 2018 +0100 drm/amdgpu: further mitigate workaround for i915 Disable the workaround on imported BOs as well. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit d9a1376623ef8cc7447da654a76b6b7127f9dd7b Author: Christian König Date: Wed Feb 28 09:35:39 2018 +0100 drm/amdgpu: drop gtt->adev We can use ttm->bdev instead. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 87e90c76e0d7b644edd096eb4879f1b376d7274f Author: Christian König Date: Mon Feb 19 14:47:55 2018 +0100 drm/amdgpu: add amdgpu_evict_gtt debugfs entry Allow evicting all BOs from the GTT domain. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 37a94791a0977500e4309fc03e4b2513384eaa6d Author: Rex Zhu Date: Tue Mar 6 14:42:24 2018 +0800 drm/amd/pp: Add #ifdef checks for CONFIG_ACPI Fix compiling error when CONFIG_ACPI not enabled. Change-Id: I5f901adbc799c10b30e5ea79f8f44760e749fae1 Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 2 ++ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 ++ 2 files changed, 4 insertions(+) commit 586b9a4d7de9508ef714e5e913406376ba9c9623 Author: Christian König Date: Tue Mar 6 14:56:00 2018 +0100 drm/amd/pp: fix "Delete the wrapper layer of smu_allocate/free_memory" For amdgpu_bo_create_kernel to work the handle must be NULL initialized, otherwise we only try to pin and map the BO. Signed-off-by: Christian König Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bb03c9c4a917ed602a6b9b01824dbfde5f6b9248 Author: Rex Zhu Date: Tue Mar 6 13:31:13 2018 +0800 drm/amd/pp: Drop wrapper functions for upper/lower_32_bits replace smu_upper_32_bits/smu_lower_32_bits with the standard kernel macros Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 5 ----- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 24 +++++++++++----------- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 8 ++++---- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 12 +++++------ .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 12 +++++------ 5 files changed, 28 insertions(+), 33 deletions(-) commit 819a3e9ab48d899485fdf11e6035b566a11a2eeb Author: Rex Zhu Date: Mon Mar 5 18:36:47 2018 +0800 drm/amdgpu: Delete cgs wrapper functions for gpu memory manager delete those cgs interfaces: amdgpu_cgs_alloc_gpu_mem amdgpu_cgs_free_gpu_mem amdgpu_cgs_gmap_gpu_mem amdgpu_cgs_gunmap_gpu_mem amdgpu_cgs_kmap_gpu_mem amdgpu_cgs_kunmap_gpu_mem Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 131 ------------------------------- drivers/gpu/drm/amd/include/cgs_common.h | 115 --------------------------- 2 files changed, 246 deletions(-) commit ecc124b0355cb8de070f97e04a919200925598d5 Author: Rex Zhu Date: Tue Mar 6 13:13:21 2018 +0800 drm/amd/pp: Delete the wrapper layer of smu_allocate/free_memory use amdgpu_bo_create/free_kernel instand. Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 7 - drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 84 ++++----- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.h | 5 +- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 71 ++++---- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.h | 7 +- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 64 ++++--- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.h | 5 +- drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 51 ------ .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 195 +++++++++------------ .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h | 7 +- 10 files changed, 195 insertions(+), 301 deletions(-) commit 807f93ac6a1d37498fcd8f6af28f1e5f569ad8e4 Author: Rex Zhu Date: Mon Mar 5 16:07:22 2018 +0800 drm/amd/pp: Remove cgs wrapper function for temperature update Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 13 ------------- drivers/gpu/drm/amd/include/cgs_common.h | 6 ------ drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 4 +++- 3 files changed, 3 insertions(+), 20 deletions(-) commit cdd02dda4ff94b8f86c2c478cce7218e4613dc56 Author: Rex Zhu Date: Mon Mar 5 14:42:56 2018 +0800 Revert "drm/amd/pp: Add a pp feature mask bit for AutoWattman feature" This reverts commit e429ea87b2939c4cce1b439baf6d76535a0767f2. Implement Workload Aware Dynamic power management instand of AutoWattman feature in linux. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 - 1 file changed, 1 deletion(-) commit 052fe96d93f2eb93cdb660ad7918aa0534c59c2e Author: Rex Zhu Date: Fri Mar 2 20:09:11 2018 +0800 drm/amd/pp: Add auto power profilng switch based on workloads (v2) Add power profiling mode dynamic switch based on the workloads. Currently, support Cumpute, VR, Video, 3D,power saving with Cumpute have highest prority, power saving have lowest prority. in manual dpm mode, driver will stop auto switch, just save the client's requests. user can set power profiling mode through sysfs. when exit manual dpm mode, driver will response the client's requests. switch based on the client's prority. v2: squash in fixes from Rex Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 4 +-- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 18 +----------- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 32 ++++++++++++++++++---- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 16 +++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 11 ++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 ++-- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 8 +----- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h | 3 -- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 5 ++++ 9 files changed, 66 insertions(+), 37 deletions(-) commit 9dd6ec17a8b06a75558b00c50676f847f7fa6513 Author: Shreeya Patel Date: Sun Mar 4 18:15:06 2018 +0530 Staging: iio: adis16209: Use sign_extend32 function Use sign_extend32 function instead of manually coding it. Signed-off-by: Shreeya Patel Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16209.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0df8baeab1ee2a5ccd3c725a44a431fcc63fe416 Author: Shreeya Patel Date: Sun Mar 4 18:13:12 2018 +0530 Staging: iio: adis16209: Adjust a switch statement Adjust a switch block to explicitly match channels and return -EINVAL as default case which makes the code semantically more clear. Signed-off-by: Shreeya Patel Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16209.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 1026bb35371a499f977174f9f297ce8e2dfd1efb Author: Shreeya Patel Date: Sun Mar 4 18:11:17 2018 +0530 Staging: iio: adis16209: Change some macro names Make some of the macro names according to the names given in the datasheet of the adis16209 driver. Signed-off-by: Shreeya Patel Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16209.c | 48 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit f3cfe187c8984ddcbda39fc88592d3ffc2f0e5f7 Author: Shreeya Patel Date: Sun Mar 4 18:06:22 2018 +0530 Staging: iio: adis16209: Remove and add some comments and group the definitions Remove some unnecessay comments and group the control register and register field macros together. Some of the register names does not make it's puporse very clear and hence, add some comments for more information. Also there are certain unit based comments which are not providing sufficient information, so expand those comments. Signed-off-by: Shreeya Patel Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16209.c | 132 ++++++++++------------------------ 1 file changed, 39 insertions(+), 93 deletions(-) commit c33b3b9fcfa4fe5350b5d13bdb87dab061351d77 Author: Gustavo A. R. Silva Date: Wed Mar 7 12:03:33 2018 -0600 cxgb3: remove VLA usage Remove VLA usage and change the 'len' argument to a u8 and use a 256 byte buffer on the stack. Notice that these lengths are limited by the encoding field in the VPD structure, which is a u8 [1]. [1] https://marc.info/?l=linux-netdev&m=152044354814024&w=2 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb3/t3_hw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 334e6413134bf8335ec93a9e60213cbc61ef7a62 Author: Jesus Sanchez-Palencia Date: Wed Mar 7 09:40:57 2018 -0800 sock: Fix SO_ZEROCOPY switch case Fix the SO_ZEROCOPY switch case on sock_setsockopt() avoiding the ret values to be overwritten by the one set on the default case. Fixes: 28190752c7092 ("sock: permit SO_ZEROCOPY on PF_RDS socket") Signed-off-by: Jesus Sanchez-Palencia Acked-by: Willem de Bruijn Acked-by: Sowmini Varadhan Signed-off-by: David S. Miller net/core/sock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 92dbb332a20959cde960a5acbacc0bbefdc07038 Merge: dff58a0 10fea26 Author: David S. Miller Date: Wed Mar 7 15:53:39 2018 -0500 Merge branch 'mvpp2-ucast-filter' Maxime Chevallier says: ==================== net: mvpp2: Add Unicast filtering capabilities This series adds unicast filtering support to the Marvell PPv2 controller. This is implemented using the header parser cababilities of the PPv2, which allows for generic packet filtering based on matching patterns in the packet headers. PPv2 controller only has 256 of these entries, and we need to share them with other features, such as VLAN filtering. For each interface, we have 5 entries dedicated to unicast filtering (the controller's own address, and 4 other), and 21 to multicast filtering. When this number is reached, the controller switches to unicast or multicast promiscuous mode. The first patch reworks the function that adds and removes addresses to the filter. This is preparatory work to ease UC filter implementation. The second patch adds the UC filtering feature. ==================== Signed-off-by: David S. Miller commit 10fea26ce2aaf46c4da834664fb5f8476108a783 Author: Maxime Chevallier Date: Wed Mar 7 15:18:04 2018 +0100 net: mvpp2: Add support for unicast filtering Marvell PPv2 controller can be used to implement packet filtering based on the destination MAC address. This is already used to implement multicast filtering. This patch adds support for Unicast filtering. Filtering is based on so-called "TCAM entries" to implement filtering. Due to their limited number and the fact that these are also used for other purposes, we reserve 80 entries for both unicast and multicast filters. On top of the broadcast address, and each interface's own MAC address, we reserve 25 entries per port, 4 for unicast filters, 21 for multicast. Whenever unicast or multicast range for one port is full, the filtering is disabled and port goes into promiscuous mode for the given type of addresses. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 296 +++++++++++++++++++---------------- 1 file changed, 161 insertions(+), 135 deletions(-) commit ce2a27c761acaba032f61f8322ff9447fd084671 Author: Maxime Chevallier Date: Wed Mar 7 15:18:03 2018 +0100 net: mvpp2: Simplify MAC filtering function parameters The mvpp2_prs_mac_da_accept function takes into parameter both the struct representing the controller and the port id. This is meaningful when we want to create TCAM entries for non-initialized ports, but in this case we expect the port to be initialized before starting adding or removing MAC addresses to the per-port filter. This commit changes the function so that it takes struct mvpp2_port as a parameter instead. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 0b3ce78e90fc66c50a944320d6e39fa6fdb46cdf Author: Frank Rowand Date: Sun Mar 4 16:14:47 2018 -0800 of: cache phandle nodes to reduce cost of of_find_node_by_phandle() Create a cache of the nodes that contain a phandle property. Use this cache to find the node for a given phandle value instead of scanning the devicetree to find the node. If the phandle value is not found in the cache, of_find_node_by_phandle() will fall back to the tree scan algorithm. The cache is initialized in of_core_init(). The cache is freed via a late_initcall_sync() if modules are not enabled. If the devicetree is created by the dtc compiler, with all phandle property values auto generated, then the size required by the cache could be 4 * (1 + number of phandles) bytes. This results in an O(1) node lookup cost for a given phandle value. Due to a concern that the phandle property values might not be consistent with what is generated by the dtc compiler, a mask has been added to the cache lookup algorithm. To maintain the O(1) node lookup cost, the size of the cache has been increased by rounding the number of entries up to the next power of two. The overhead of finding the devicetree node containing a given phandle value has been noted by several people in the recent past, in some cases with a patch to add a hashed index of devicetree nodes, based on the phandle value of the node. One concern with this approach is the extra space added to each node. This patch takes advantage of the phandle property values auto generated by the dtc compiler, which begin with one and monotonically increase by one, resulting in a range of 1..n for n phandle values. This implementation should also provide a good reduction of overhead for any range of phandle values that are mostly in a monotonic range. Performance measurements by Chintan Pandya of several implementations of patches that are similar to this one suggest an expected reduction of boot time by ~400ms for his test system. If the cache size was decreased to 64 entries, the boot time was reduced by ~340 ms. The measurements were on a 4.9.73 kernel for arch/arm64/boot/dts/qcom/sda670-mtp.dts, contains 2371 nodes and 814 phandle values. Reported-by: Chintan Pandya Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/base.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++--- drivers/of/of_private.h | 3 ++ drivers/of/resolver.c | 3 -- 3 files changed, 85 insertions(+), 7 deletions(-) commit f2531f1976d98a7a4328da7f3cbf31b7c1927738 Author: Kees Cook Date: Wed Mar 7 12:18:33 2018 -0800 pstore/ram: Do not use stack VLA for parity workspace Instead of using a stack VLA for the parity workspace, preallocate a memory region. The preallocation is done to keep from needing to perform allocations during crash dump writing, etc. This also fixes a missed release of librs on free. Signed-off-by: Kees Cook fs/pstore/ram_core.c | 29 ++++++++++++++++++++++------- include/linux/pstore_ram.h | 1 + 2 files changed, 23 insertions(+), 7 deletions(-) commit fe1d475888eecf1319458ee916e642e3e5e41c28 Author: Kees Cook Date: Tue Mar 6 15:57:38 2018 -0800 pstore: Select compression at runtime To allow for easier build test coverage and run-time testing, this allows multiple compression algorithms to be built into pstore. Still only one is supported to operate at a time (which can be selected at build time or at boot time, similar to how LSMs are selected). Signed-off-by: Kees Cook fs/pstore/Kconfig | 96 +++++++++++++++++++++++++----------- fs/pstore/inode.c | 2 + fs/pstore/internal.h | 3 ++ fs/pstore/platform.c | 134 ++++++++++++++++++++++++++++++--------------------- 4 files changed, 151 insertions(+), 84 deletions(-) commit dff58a09d77e152056a4803ff89b6ec3fc6c9b2c Author: Jiri Pirko Date: Wed Mar 7 13:58:00 2018 +0100 selftests: forwarding: fix flags passed to first drop rule in gact_drop_and_ok_test Fix copy&paste error and pass proper flags. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/tc_actions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c17db05ec982607121b8f01cf4ce03513964d9c Author: Jiri Pirko Date: Wed Mar 7 13:57:59 2018 +0100 selftests: forwarding: fix "ok" action test Fix the "ok" action test so it checks that packet that is okayed does not continue to be processed by other rules. Fix error message as well. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/tc_actions.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bb5441fc3cc0e11be0ff9bbc6a00a74b3d2b0153 Author: Johan Hovold Date: Wed Mar 7 10:46:58 2018 +0100 net: cdc_eem: clean up bind error path Drop bogus call to usb_driver_release_interface() from an error path in the usbnet bind() callback, which is called during interface probe. At this point the interface is not bound and usb_driver_release_interface() returns early. Also remove the bogus call to clear the interface data, which is owned by the usbnet driver and would not even have been set by the time bind() is called. Signed-off-by: Johan Hovold Acked-by: Oliver Neukum Reviewed-by: Greg Kroah-Hartman Signed-off-by: David S. Miller drivers/net/usb/cdc_eem.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 4f06717fb063ad4ef38bd5e0ec1881bc784c325b Author: Johan Hovold Date: Wed Mar 7 10:46:57 2018 +0100 net: kalmia: clean up bind error path Drop bogus call to usb_driver_release_interface() from an error path in the usbnet bind() callback, which is called during interface probe. At this point the interface is not bound and usb_driver_release_interface() returns early. Also remove the bogus call to clear the interface data, which is owned by the usbnet driver and would not even have been set by the time bind() is called. Signed-off-by: Johan Hovold Reviewed-by: Greg Kroah-Hartman Signed-off-by: David S. Miller drivers/net/usb/kalmia.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 55de2923847c3318459758931ff175996facce69 Author: Shirish S Date: Wed Mar 7 08:40:03 2018 +0530 drm/atomic: Add new reverse iterator over all plane state (V2) Add reverse iterator for_each_oldnew_plane_in_state_reverse to compliment the for_each_oldnew_plane_in_state way or reading plane states. The plane states are required to be read in reverse order for amd drivers, cause the z order convention followed in linux is opposite to how the planes are supposed to be presented to DC engine, which is in common to both windows and linux. V2: fix compile time errors due to -Werror flag. Signed-off-by: Shirish S Signed-off-by: Pratik Vishwakarma Reviewed-by: Daniel Vetter Signed-off-by: Harry Wentland Link: https://patchwork.freedesktop.org/patch/msgid/1520392203-6885-1-git-send-email-shirish.s@amd.com include/drm/drm_atomic.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 75aa306c232e0343b41eb3d8f5c39cd3124afae2 Author: Himanshu Jha Date: Mon Mar 5 13:19:21 2018 +0530 Staging: iio: accel: adis16201: Add a blank space before returns Adding a blank space before/after some returns improves readability. Signed-off-by: Himanshu Jha Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16201.c | 4 ++++ 1 file changed, 4 insertions(+) commit 189cef998c30db3ede5de5ab6f9b9ba92d490f64 Author: Himanshu Jha Date: Mon Mar 5 13:19:20 2018 +0530 Staging: iio: accel: adis16201: Prefer alphabetical sequence of header files Arrange header files in alphabetical sequence to improve readability. Signed-off-by: Himanshu Jha Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16201.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bcde6b725f156a828d129a64d82730b21de9d44f Merge: d1f1b9c e810bf5 Author: David S. Miller Date: Wed Mar 7 15:28:13 2018 -0500 Merge tag 'mlx5-updates-2018-02-28-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== mlx5-updates-2018-02-28-1 (IPSec-1) This series consists of some fixes and refactors for the mlx5 drivers, especially around the FPGA and flow steering. Most of them are trivial fixes and are the foundation of allowing IPSec acceleration from user-space. We use flow steering abstraction in order to accelerate IPSec packets. When a user creates a steering rule, [s]he states that we'll carry an encrypt/decrypt flow action (using a specific configuration) for every packet which conforms to a certain match. Since currently offloading these packets is done via FPGA, we'll add another set of flow steering ops. These ops will execute the required FPGA commands and then call the standard steering ops. In order to achieve this, we need that the commands will get all the required information. Therefore, we pass the fte object and embed the flow_action struct inside the fte. In addition, we add the shim layer that will later be used for alternating between the standard and the FPGA steering commands. Some fixes, like " net/mlx5e: Wait for FPGA command responses with a timeout" are very relevant for user-space applications, as these applications could be killed, but we still want to wait for the FPGA and update the kernel's database. Regards, Aviad and Matan ==================== Signed-off-by: David S. Miller commit 67464a54e5156ed2e5a72ffb516308b58f25e6ca Author: Rodrigo Siqueira Date: Tue Mar 6 09:02:57 2018 -0300 iio: Replace occurrences of magic number 0 by IIO_CHAN_INFO_RAW Usually, functions responsible for reading raw data typically relies on values from iio_chan_info_enum to correctly identify the type of data to be read. There is a set of a device driver that uses the magic number 0 instead of IIO_CHAN_INFO_RAW. This patch improves the readability by replaces the magic number 0 for the appropriate IIO_CHAN_INFO_RAW in six devices driver in the IIO subsystem. Signed-off-by: Rodrigo Siqueira Signed-off-by: Jonathan Cameron drivers/iio/accel/hid-sensor-accel-3d.c | 2 +- drivers/iio/dac/ad5380.c | 2 +- drivers/iio/dac/ad5764.c | 2 +- drivers/iio/gyro/hid-sensor-gyro-3d.c | 2 +- drivers/iio/light/hid-sensor-als.c | 2 +- drivers/iio/light/lm3533-als.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit f22fb87d4c3bf52daadd1184531dcbabf1a8ab60 Author: Rodrigo Siqueira Date: Tue Mar 6 21:44:26 2018 -0300 staging:iio:meter: Aligns open parenthesis This patch fixes the checkpatch.pl checks: staging/iio/meter/ade7854-spi.c:19: CHECK: Alignment should match open parenthesis staging/iio/meter/ade7854-spi.c:44: CHECK: Alignment should match open parenthesis staging/iio/meter/ade7854-spi.c:70: CHECK: Alignment should match open parenthesis staging/iio/meter/ade7854-spi.c:97: CHECK: Alignment should match open parenthesis staging/iio/meter/ade7854-spi.c:125: CHECK: Alignment should match open parenthesis ... Signed-off-by: Rodrigo Siqueira Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7758_trigger.c | 6 ++--- drivers/staging/iio/meter/ade7854-spi.c | 40 ++++++++++++++--------------- 2 files changed, 23 insertions(+), 23 deletions(-) commit b5724925da03cffca3c18c0cd10ea7e0c5dda2df Author: Rodrigo Siqueira Date: Tue Mar 6 21:44:07 2018 -0300 staging:iio:meter: Remove unused macro IIO_DEV_ATTR_CH_OFF This patch removes the macro IIO_DEV_ATTR_CH_OFF. The macro IIO_DEV_ATTR_CH_OFF is not required, due to the replace of it by the direct use of IIO_DEVICE_ATTR in files staging/iio/meter/ade7759.c and staging/iio/meter/ade7753.c. Signed-off-by: Rodrigo Siqueira Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/meter.h | 3 --- 1 file changed, 3 deletions(-) commit 75f800a7eb48de38ede855bd834dfb92effe714b Author: Rodrigo Siqueira Date: Tue Mar 6 21:43:47 2018 -0300 staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR The macro IIO_DEV_ATTR_CH_OFF is a wrapper for IIO_DEVICE_ATTR, with a tiny change in the name definition. This extra macro does not improve the readability and also creates some checkpatch errors. This patch fixes the checkpatch.pl errors: staging/iio/meter/ade7753.c:391: ERROR: Use 4 digit octal (0777) not decimal permissions staging/iio/meter/ade7753.c:395: ERROR: Use 4 digit octal (0777) not decimal permissions staging/iio/meter/ade7759.c:331: ERROR: Use 4 digit octal (0777) not decimal permissions staging/iio/meter/ade7759.c:335: ERROR: Use 4 digit octal (0777) not decimal permissions Signed-off-by: Rodrigo Siqueira Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7753.c | 18 ++++++++++-------- drivers/staging/iio/meter/ade7759.c | 18 ++++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) commit 844ed8220cd10a233bc0825f6992a2949c0c440b Author: HariPrasath Elango Date: Wed Mar 7 11:08:04 2018 +0530 staging: iio: meter: Remove reduntant __func__ from debug print dev_dbg includes the function name & line number by default when dynamic debugging is enabled. Hence__func__ is reduntant here and removed. Signed-off-by: HariPrasath Elango Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7758_trigger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd28425a307417d3bd5bdf18e819cc7f90ac1a4d Author: Arushi Singhal Date: Wed Mar 7 18:47:17 2018 +0530 staging: iio: Remove unnecessary cast on void pointer The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: Arushi Singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/ad7816.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6adb1b9538e6414ce746ade8d170d362a657ca41 Author: John Keeping Date: Thu Mar 1 10:34:47 2018 +0000 dt-bindings: rockchip-dw-mshc: use consistent clock names The names of these clocks are "ciu-drive" and "ciu-sample" as described for the clock-names property. Avoid confusion by spelling these correctly everywhere they are referenced. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Reviewed-by: Shawn Lin Signed-off-by: Rob Herring Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d1f1b9cbf34c667d06adc44136e448cade8e28d9 Author: Stefano Brivio Date: Tue Mar 6 22:16:27 2018 +0100 selftests: net: Introduce first PMTU test One single test implemented so far: test_pmtu_vti6_exception checks that the PMTU of a route exception, caused by a tunnel exceeding the link layer MTU, is affected by administrative changes of the tunnel MTU. Creation of the route exception is checked too. Requested-by: David Ahern Signed-off-by: Stefano Brivio Acked-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/Makefile | 2 +- tools/testing/selftests/net/pmtu.sh | 163 +++++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+), 1 deletion(-) commit d8c13f2271ec5178c52fbde072ec7b562651ed9d Author: Eric Dumazet Date: Tue Mar 6 11:12:53 2018 -0800 net/mlx4_en: try to use high order pages for RX rings RX rings can fit most of the time in a contiguous piece of memory, so lets use kvzalloc_node/kvfree instead of vzalloc_node/vfree Note that kvzalloc_node() automatically falls back to another node, there is no need to do the fallback ourselves. Signed-off-by: Eric Dumazet Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 7d99429afa9393968261a425b1e1b57298e48a75 Author: Fengguang Wu Date: Wed Mar 7 02:23:23 2018 +0800 enic: fix boolreturn.cocci warnings drivers/net/ethernet/cisco/enic/vnic_dev.c:1294:9-10: WARNING: return of 0/1 in function 'vnic_dev_capable_udp_rss' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Fixes: 48398b6e7065 ("enic: set UDP rss flag") CC: Govindarajulu Varadarajan Signed-off-by: Fengguang Wu Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/vnic_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1312b85012245923b5cb59ac324a5649eefefcb Author: Fengguang Wu Date: Tue Mar 6 23:54:07 2018 +0800 net: dsa: mv88e6xxx: fix boolreturn.cocci warnings drivers/net/dsa/mv88e6xxx/serdes.c:66:9-10: WARNING: return of 0/1 in function 'mv88e6352_port_has_serdes' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Fixes: eb755c3f6b7d ("net: dsa: mv88e6xxx: Add helper to determining if port has SERDES") CC: Andrew Lunn Signed-off-by: Fengguang Wu Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/serdes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6234c7bd8c14508fb76c0a4d6f01eb81c8ce9cbf Author: Jonathan Corbet Date: Wed Mar 7 10:44:08 2018 -0700 docs: ftrace: fix a few formatting issues Make sure that literal * characters are not interpreted as emphasis markers. Signed-off-by: Jonathan Corbet Documentation/trace/events.rst | 10 +++++----- Documentation/trace/ftrace.rst | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) commit 630b21a26ae02bd180aebbccad248c64daf1da4b Author: Jerome Brunet Date: Tue Mar 6 12:10:45 2018 +0100 net: phy: mdio-mux: slience probe defer error If we fail to register the mdio bus due to probe defer, we should not print an error message. Just be silent in this case. Signed-off-by: Jerome Brunet Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mdio-mux-mmioreg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1ec54cb44e6731c3cb251bcf9251d65a4b4f6306 Author: Paolo Abeni Date: Tue Mar 6 10:56:31 2018 +0100 net: unpollute priv_flags space the ipvlan device driver defines and uses 2 bits inside the priv_flags net_device field. Such bits and the related helper are used only inside the ipvlan device driver, and the core networking does not need to be aware of them. This change moves netif_is_ipvlan* helper in the ipvlan driver and re-implement them looking for ipvlan specific symbols instead of using priv_flags. Overall this frees two bits inside priv_flags - and move the following ones to avoid gaps - without any intended functional change. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan.h | 6 ++++++ drivers/net/ipvlan/ipvlan_main.c | 10 ++++++---- include/linux/netdevice.h | 32 ++++++++------------------------ 3 files changed, 20 insertions(+), 28 deletions(-) commit b2b19494b80adc9d0e1e5631a69a24af47a5502c Merge: 4d1e46a 70a55c3 Author: David S. Miller Date: Wed Mar 7 12:30:20 2018 -0500 Merge branch 'net-phy-remove-phy_error-from-phy_disable_interrupts' Heiner Kallweit says: ==================== net: phy: remove phy_error from phy_disable_interrupts All callers of phy_disable_interrupts() call phy_error() in the error case. Therefore we don't need to do this within the function too. This change also allows us to use phy_disable_interrupts() in code holding phydev->lock (because phy_error() takes this lock). Make use of this in phy_stop(). v2: - splitted into two separate patches ==================== Signed-off-by: David S. Miller commit 70a55c32ee6f3781d294d64c75380c94f4b99ae8 Author: Heiner Kallweit Date: Mon Mar 5 22:34:46 2018 +0100 net: phy: use phy_disable_interrupts in phy_stop Now that phy_disable_interrupts() can't take lock phydev->lock any longer, we can use it to simplify phy_stop(). Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/phy.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 4fff2d33c707938c537b7aeb2c511226f8a20313 Author: Heiner Kallweit Date: Mon Mar 5 22:34:27 2018 +0100 net: phy: remove phy_error from phy_disable_interrupts All callers of phy_disable_interrupts() call phy_error() in the error case. Therefore we don't need to do this within the function too. This change also allows us to use phy_disable_interrupts() in code holding phydev->lock (because phy_error() can take this lock). Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/phy.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 77f59f895da2fe5526073181c74c3fb85a7c80d1 Author: Kieran Bingham Date: Thu Feb 15 08:38:18 2018 +0000 dt-bindings: display: renesas: lvds: Document r8a77995 bindings The D3 (r8a77995) supports two LVDS channels. Extend the binding to support them. Signed-off-by: Kieran Bingham [Fixed compatible string] Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt | 1 + 1 file changed, 1 insertion(+) commit b378b3561dee6413ee9fdd70a08e17ebe9afc073 Author: Kieran Bingham Date: Thu Feb 15 08:38:17 2018 +0000 dt-bindings: display: renesas: du: Document r8a77995 bindings Document the D3 (r8a77995) SoC in the R-Car DU bindings. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Documentation/devicetree/bindings/display/renesas,du.txt | 2 ++ 1 file changed, 2 insertions(+) commit b6eb7102ad6dc7ae35c23b517809f5ae5aa5ccdd Author: Sergei Shtylyov Date: Thu Mar 1 21:10:16 2018 +0300 drm: rcar-du: lvds: Add R8A77970 support Add support for the R-Car V3M (R8A77970) SoC to the LVDS encoder driver. Note that there are some differences with the other R-Car gen3 SoCs, e.g. LVDPLLCR has the same layout as in the R-Car gen2 SoCs. Signed-off-by: Sergei Shtylyov Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_lvds.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit fe9ac01324a40e2aaf5782a1fb7038247a89c585 Author: Sergei Shtylyov Date: Fri Jan 19 00:05:59 2018 +0300 drm: rcar-du: Add R8A77970 support Add support for the R-Car V3M (R8A77970) SoC to the R-Car DU driver. Signed-off-by: Sergei Shtylyov Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_drv.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 15c12c17c573098a4829e3a8f466ec0b275de561 Author: Sergei Shtylyov Date: Fri Jan 19 21:29:20 2018 +0300 dt-bindings: display: renesas: lvds: Document R8A77970 bindings Document the R-Car V3M (R8A77970) SoC in the R-Car LVDS bindings. Signed-off-by: Sergei Shtylyov Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt | 1 + 1 file changed, 1 insertion(+) commit 1606f8d8e75bea1992a8cda35df06737b624cbe5 Author: Changbin Du Date: Sat Feb 17 13:39:50 2018 +0800 trace doc: convert trace/stm.txt to rst format This converts the plain text documentation to reStructuredText format and add it into Sphinx TOC tree. No essential content change. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/index.rst | 1 + Documentation/trace/stm.rst | 123 ++++++++++++++++++++++++++++++++++++++++++ Documentation/trace/stm.txt | 122 ----------------------------------------- 3 files changed, 124 insertions(+), 122 deletions(-) commit 6613581ecd6788f39f47c1e45be5b826a531c31a Author: Changbin Du Date: Sat Feb 17 13:39:49 2018 +0800 trace doc: convert trace/intel_th.txt to rst format This converts the plain text documentation to reStructuredText format and add it into Sphinx TOC tree. No essential content change. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/index.rst | 1 + Documentation/trace/intel_th.rst | 122 +++++++++++++++++++++++++++++++++++++++ Documentation/trace/intel_th.txt | 121 -------------------------------------- 3 files changed, 123 insertions(+), 121 deletions(-) commit 8df2d75e6ee174017318148c5c643d093043c9d6 Author: Changbin Du Date: Sat Feb 17 13:39:48 2018 +0800 trace doc: convert trace/hwlat_detector.txt to rst fromat This converts the plain text documentation to reStructuredText format and add it into Sphinx TOC tree. No essential content change. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/hwlat_detector.rst | 83 ++++++++++++++++++++++++++++++++++ Documentation/trace/hwlat_detector.txt | 79 -------------------------------- Documentation/trace/index.rst | 1 + 3 files changed, 84 insertions(+), 79 deletions(-) commit ed657c1cbcf3a7a0daa89dff9be44c4f110e6a3d Author: Changbin Du Date: Sat Feb 17 13:39:47 2018 +0800 trace doc: convert trace/mmiotrace.txt to rst format This converts the plain text documentation to reStructuredText format and add it into Sphinx TOC tree. No essential content change. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/index.rst | 1 + Documentation/trace/mmiotrace.rst | 184 ++++++++++++++++++++++++++++++++++++++ Documentation/trace/mmiotrace.txt | 164 --------------------------------- 3 files changed, 185 insertions(+), 164 deletions(-) commit 57e5f29f04860c1d4a0b21d3e35d2cf4209cf623 Author: Changbin Du Date: Sat Feb 17 13:39:46 2018 +0800 trace doc: convert trace/events-msr.txt to rst format This converts the plain text documentation to reStructuredText format and add it into Sphinx TOC tree. No essential content change. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/events-msr.rst | 40 ++++++++++++++++++++++++++++++++++++++ Documentation/trace/events-msr.txt | 37 ----------------------------------- Documentation/trace/index.rst | 1 + 3 files changed, 41 insertions(+), 37 deletions(-) commit 4d1e46a55ea9f8d693ceabe1ba4b056e55fb6625 Author: Prashant Bhole Date: Tue Mar 6 17:31:32 2018 +0900 selftests/net: fix in_netns.sh script execute the subprocess in netns using 'ip netns exec' Fixes: cc30c93fa020 ("selftests/net: ignore background traffic in psock_fanout") Signed-off-by: Prashant Bhole Acked-by: Willem de Bruijn Signed-off-by: David S. Miller tools/testing/selftests/net/in_netns.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15ba053871bfb88472d38eff8257d195ac74ceda Author: Changbin Du Date: Sat Feb 17 13:39:45 2018 +0800 trace doc: convert trace/events-nmi.txt to rst format This converts the plain text documentation to reStructuredText format and add it into Sphinx TOC tree. No essential content change. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/events-nmi.rst | 45 ++++++++++++++++++++++++++++++++++++++ Documentation/trace/events-nmi.txt | 43 ------------------------------------ Documentation/trace/index.rst | 1 + 3 files changed, 46 insertions(+), 43 deletions(-) commit 47e073d2adcc73f4ad275f17af440d72ba652c2c Author: Changbin Du Date: Sat Feb 17 13:39:44 2018 +0800 trace doc: convert trace/events-power.txt to rst format This converts the plain text documentation to reStructuredText format and add it into Sphinx TOC tree. No essential content change. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/events-power.rst | 104 +++++++++++++++++++++++++++++++++++ Documentation/trace/events-power.txt | 96 -------------------------------- Documentation/trace/index.rst | 1 + 3 files changed, 105 insertions(+), 96 deletions(-) commit 3cdd868ec6fd24b103e0c7a435a99f5bd75ba6d9 Author: Changbin Du Date: Sat Feb 17 13:39:43 2018 +0800 trace doc: convert trace/events-kmem.txt to rst format This converts the plain text documentation to reStructuredText format and add it into Sphinx TOC tree. No essential content change. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/events-kmem.rst | 119 ++++++++++++++++++++++++++++++++++++ Documentation/trace/events-kmem.txt | 107 -------------------------------- Documentation/trace/index.rst | 1 + 3 files changed, 120 insertions(+), 107 deletions(-) commit 73d9812781fcdf49f279875dd8f13d31b84ccb02 Author: Changbin Du Date: Sat Feb 17 13:39:42 2018 +0800 trace doc: convert trace/events.txt to rst format This converts the plain text documentation to reStructuredText format and add it into Sphinx TOC tree. No essential content change. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/events.rst | 2069 ++++++++++++++++++++++++++++++++++++++++ Documentation/trace/events.txt | 2066 --------------------------------------- Documentation/trace/index.rst | 1 + 3 files changed, 2070 insertions(+), 2066 deletions(-) commit 837e716de2bc7cb06323183bfdf54362f64b6110 Author: Changbin Du Date: Sat Feb 17 13:39:41 2018 +0800 trace doc: convert trace/tracepoints.txt to rst format This converts the plain text documentation to reStructuredText format and add it into Sphinx TOC tree. No essential content change. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/index.rst | 1 + Documentation/trace/tracepoints.rst | 148 ++++++++++++++++++++++++++++++++++++ Documentation/trace/tracepoints.txt | 145 ----------------------------------- 3 files changed, 149 insertions(+), 145 deletions(-) commit 00b27da349b8b6b891f8eafb3873ee82b77a61d8 Author: Changbin Du Date: Sat Feb 17 13:39:40 2018 +0800 trace doc: convert trace/uprobetracer.txt to rst format This converts the plain text documentation to reStructuredText format and add it into Sphinx TOC tree. No essential content change. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/index.rst | 1 + Documentation/trace/uprobetracer.rst | 173 +++++++++++++++++++++++++++++++++++ Documentation/trace/uprobetracer.txt | 165 --------------------------------- 3 files changed, 174 insertions(+), 165 deletions(-) commit 263ee775747d730bf584b334820700d6200b8f86 Author: Changbin Du Date: Sat Feb 17 13:39:39 2018 +0800 trace doc: convert trace/kprobetrace.txt to rst format This converts the plain text documentation to reStructuredText format and add it into Sphinx TOC tree. No essential content change. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/index.rst | 1 + Documentation/trace/kprobetrace.rst | 190 ++++++++++++++++++++++++++++++++++++ Documentation/trace/kprobetrace.txt | 182 ---------------------------------- 3 files changed, 191 insertions(+), 182 deletions(-) commit 1f198e22bc3a0af747a7cf7b444de49ff76b6869 Author: Changbin Du Date: Sat Feb 17 13:39:38 2018 +0800 trace doc: convert trace/ftrace.txt to rst format This converts the plain text documentation to reStructuredText format and add it into Sphinx TOC tree. No essential content change. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/ftrace.rst | 3332 ++++++++++++++++++++++++++++++++++++++++ Documentation/trace/ftrace.txt | 3220 -------------------------------------- Documentation/trace/index.rst | 1 + 3 files changed, 3333 insertions(+), 3220 deletions(-) commit 8fa4e720e8d919271cdf0da3c0856333246398a4 Author: Changbin Du Date: Sat Feb 17 13:39:37 2018 +0800 trace doc: convert trace/tracepoint-analysis.txt to rst format This converts the plain text documentation to reStructuredText format and add it into Sphinx TOC tree. No essential content change. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/index.rst | 1 + Documentation/trace/tracepoint-analysis.rst | 338 ++++++++++++++++++++++++++++ Documentation/trace/tracepoint-analysis.txt | 327 --------------------------- 3 files changed, 339 insertions(+), 327 deletions(-) commit b3fdd1f92c1a12b2feda08fcad8ef29a40759bd2 Author: Changbin Du Date: Sat Feb 17 13:39:36 2018 +0800 trace doc: add ftrace-uses.rst to doc tree Add ftrace-uses.rst into Sphinx TOC tree. Few format issues are fixed. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/ftrace-uses.rst | 23 ++++++++++++----------- Documentation/trace/index.rst | 1 + 2 files changed, 13 insertions(+), 11 deletions(-) commit fcdeddc9fdf934f1e9c05a2fef3ac78222767411 Author: Changbin Du Date: Sat Feb 17 13:39:35 2018 +0800 trace doc: convert trace/ftrace-design.txt to rst format This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. This documentation is not synced with current code, so mark it as out of date. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/trace/ftrace-design.rst | 419 ++++++++++++++++++++++++++++++++++ Documentation/trace/ftrace-design.txt | 393 ------------------------------- Documentation/trace/index.rst | 2 + 3 files changed, 421 insertions(+), 393 deletions(-) commit 583bc6badc3ab40c5367d3e4bc31da86f4e98733 Author: Changbin Du Date: Sat Feb 17 13:39:34 2018 +0800 Documentation: add Linux tracing to Sphinx TOC tree This just add a index.rst for trace subsystem. More docs will be added later. Cc: Steven Rostedt Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet Documentation/index.rst | 1 + Documentation/trace/index.rst | 6 ++++++ 2 files changed, 7 insertions(+) commit 6e61e10a8a9655424cf03c0fb44d282b40f402a2 Author: kbuild test robot Date: Tue Mar 6 13:05:06 2018 +0800 net: mvpp2: mvpp2_check_hw_buf_num() can be static Fixes: effbf5f58d64 ("net: mvpp2: update the BM buffer free/destroy logic") Signed-off-by: Fengguang Wu Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a21ac943240d0353b726495d08e377a257ace52 Author: Gustavo A. R. Silva Date: Mon Mar 5 16:11:54 2018 -0600 ipv6: ndisc: use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/ipv6/ndisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22936c3e6e8cdd9641fdf1362dc9369dd35246c8 Author: Brandon Streiff Date: Mon Mar 5 16:05:22 2018 -0600 dt-bindings: net: dsa: marvell: describe compatibility string There are two compatibility strings for mv88e6xxx, but it isn't clear from the documentation why only those two exist when the mv88e6xxx driver supports more than the 6085 and 6190. Briefly describe how the compatible property is used, and provide guidance on which to use. The model list comes from looking at port_base_addr values (0x0 vs 0x10) in drivers/net/dsa/mv88e6xxx/chip.c. Signed-off-by: Brandon Streiff Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/dsa/marvell.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit c9efb15a9981400c797665dc4844ab562ed3c424 Author: Gustavo A. R. Silva Date: Mon Mar 5 15:56:14 2018 -0600 tipc: bcast: use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/bcast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88fb4a0e07d1fd3e3198b892fd89292091f6bd35 Author: Sergei Shtylyov Date: Fri Jan 19 00:05:58 2018 +0300 dt-bindings: display: renesas: du: Document R8A77970 bindings Document the R-Car V3M (R8A77970) SoC in the R-Car DU bindings. Signed-off-by: Sergei Shtylyov Acked-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Documentation/devicetree/bindings/display/renesas,du.txt | 2 ++ 1 file changed, 2 insertions(+) commit b13267ba579d35640549c8d271bcc6d7fafcd0e4 Author: Aaro Koskinen Date: Sun Mar 4 22:18:14 2018 +0200 documentation: add my name to kernel driver statement Add my name to kernel driver statement. Signed-off-by: Aaro Koskinen Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/process/kernel-driver-statement.rst | 1 + 1 file changed, 1 insertion(+) commit 82d95343af409ba19c094adeb9c6260f11937d24 Author: Tobin C. Harding Date: Mon Mar 5 14:58:21 2018 +1100 docs: add Co-Developed-by docs When Co-Developed-by tag was added, docs were only added to Documention/process/5.Posting.rst and were not added to Documention/process/submitting-patches.rst Add documentation to Documention/process/submitting-patches.rst Signed-off-by: Tobin C. Harding [jc: tweaked commas in the subheading] Signed-off-by: Jonathan Corbet Documentation/process/submitting-patches.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 41387bb7d869e96df4b870e1880ad49f053cc755 Author: Matthew Wilcox Date: Fri Mar 2 10:40:14 2018 -0800 Documentation/sphinx: Fix Directive import error Sphinx 1.7 removed sphinx.util.compat.Directive so people who have upgraded cannot build the documentation. Switch to docutils.parsers.rst.Directive which has been available since docutils 0.5 released in 2009. Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1083694 Co-developed-by: Takashi Iwai Acked-by: Jani Nikula Cc: stable@vger.kernel.org Signed-off-by: Matthew Wilcox Signed-off-by: Jonathan Corbet Documentation/sphinx/kerneldoc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3eac60d173fa22855895dcef6cd2dc4ca65c2acf Merge: b5b2f33 0a6f2f0 Author: David S. Miller Date: Wed Mar 7 12:05:56 2018 -0500 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2018-03-05 This series contains updates to igb only. Corinna Vinschen adds the support for trusted VFs into the igb driver. Mika fixes an issue where PCIe device is physically unplugged can cause a kernel crash. This issue is that netif_device_detach() is called in these cases, which prevents netif_unregister() from bringing the device down properly. Christophe JAILLET fixes an issue with igb where HWTSTAMP_TX_ON was being handled like a bit mask and not a value. v2: dropped the e1000e fix from the series since I will be pushing it through David Miller's net tree. ==================== Signed-off-by: David S. Miller commit b5b2f338f685ea9e548f89b3d45aab211ca16abb Merge: 1c02e37 e8cf7c2 Author: David S. Miller Date: Wed Mar 7 11:44:43 2018 -0500 Merge branch 'lan743x-driver' Bryan Whitehead says: ==================== lan743x: Add new lan743x driver Add new lan743x driver. The lan743x from Microchip Technologies Inc, is a PCIe to Gigabit Ethernet Controller. Updates for V4: Patch 1/2 - Applied community suggestions convert to using module_pci_driver Updates for V3: Patch 1/2 - Applied community suggestions removed initialization tracking flags. converted to 64 bit statistics. converted tx clean up tasklet to napi. Updates for V2: Patch 1/2 - Applied community suggestions ==================== Signed-off-by: David S. Miller commit e8cf7c271bfc5f720e3f6ffdb96586fda8486b4c Author: Bryan Whitehead Date: Mon Mar 5 14:23:31 2018 -0500 lan743x: Update MAINTAINERS to include lan743x driver Update MAINTAINERS to include lan743x driver Signed-off-by: Bryan Whitehead Signed-off-by: David S. Miller MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 23f0703c125be490f70501b6b24ed5645775c56a Author: Bryan Whitehead Date: Mon Mar 5 14:23:30 2018 -0500 lan743x: Add main source files for new lan743x driver Add main source files for new lan743x driver Signed-off-by: Bryan Whitehead Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/microchip/Kconfig | 10 + drivers/net/ethernet/microchip/Makefile | 3 + drivers/net/ethernet/microchip/lan743x_main.c | 2781 +++++++++++++++++++++++++ drivers/net/ethernet/microchip/lan743x_main.h | 597 ++++++ 4 files changed, 3391 insertions(+) commit 100bc0d9963b506d4f1f0936c1d8ed17d214ef30 Author: Ville Syrjälä Date: Tue Mar 6 18:48:49 2018 +0200 drm: Reject bad property flag combinations Pimp drm_property_type_valid() to check for more fails with the property flags. Also make the check before adding the property, and bail out if things look bad. Since we're now chekcing for more than the type let's also change the function name to drm_property_flags_valid(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180306164849.2862-6-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_property.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) commit 51abc97658b954d357f6107885a3b069f497c7ff Author: Ville Syrjälä Date: Tue Mar 6 18:48:48 2018 +0200 drm: Make property flags u32 The property flags are part of the uabi and we have 32 bits for them. Pass them around as u32 internally as well, instead of a signed int. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180306164849.2862-5-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_property.c | 41 +++++++++++++++++++++-------------------- include/drm/drm_property.h | 24 +++++++++++++----------- 2 files changed, 34 insertions(+), 31 deletions(-) commit 58dfb24349e1d0aa6461d2b0f2811b46fe350280 Author: Shawn Guo Date: Fri Mar 2 09:12:01 2018 +0800 PCI: histb: Add an optional regulator for PCIe port power control The power supplies to PCIe port are often controlled by GPIO on some board designs. Let's add an optional regulator which can be backed by GPIO to control the power. Signed-off-by: Shawn Guo Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring .../bindings/pci/hisilicon-histb-pcie.txt | 1 + drivers/pci/dwc/pcie-histb.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) commit db0c25f8aadad8f0be1c6986cf1dcf874d40d79b Author: Shawn Guo Date: Fri Mar 2 09:12:00 2018 +0800 PCI: histb: Fix error path of histb_pcie_host_enable() If clk_prepare_enable() call fails on a particular clock, we should not call clk_disable_unprepare() on this clock, but on the clocks that succeed from clk_prepare_enable() previously. Signed-off-by: Shawn Guo Signed-off-by: Lorenzo Pieralisi drivers/pci/dwc/pcie-histb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 68e7c15ceb8d43dff8a91b6be40beac471a0c48d Author: Srinivas Kandagatla Date: Thu Feb 15 13:26:37 2018 +0000 PCI: qcom: Use regulator bulk api for apq8064 supplies This patch converts existing regulators to use regulator bulk apis, to make it consistent with msm8996 changes also cut down some redundant code. Signed-off-by: Srinivas Kandagatla Signed-off-by: Lorenzo Pieralisi Acked-by: Stanimir Varbanov drivers/pci/dwc/pcie-qcom.c | 52 +++++++++++++-------------------------------- 1 file changed, 15 insertions(+), 37 deletions(-) commit f625b1ade245ad6810909923585dd07f24391861 Author: Srinivas Kandagatla Date: Thu Feb 15 13:22:48 2018 +0000 PCI: qcom: Add missing supplies required for msm8996 This patch adds supplies that are required for msm8996. vdda is analog supply that go in to controller, and vddpe_3v3 is supply to PCIe endpoint. Without these supplies PCIe endpoints which require power supplies are not enumerated at all, as there is no one to power it up. Signed-off-by: Srinivas Kandagatla Signed-off-by: Lorenzo Pieralisi Acked-by: Stanimir Varbanov Reviewed-by: Rob Herring .../devicetree/bindings/pci/qcom,pcie.txt | 4 ++++ drivers/pci/dwc/pcie-qcom.c | 23 +++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) commit ae15d8634dca4112037652725cd974af201f1091 Author: Niklas Cassel Date: Thu Feb 1 15:02:23 2018 +0100 PCI: designware-ep: Fix typo in error message Fix typo in error message. s/deb_base2/dbi_base2/ Signed-off-by: Niklas Cassel Signed-off-by: Lorenzo Pieralisi drivers/pci/dwc/pcie-designware-ep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 147ccf931e3152e06961bd6d29a5650d25c2f156 Author: Ville Syrjälä Date: Tue Mar 6 18:48:47 2018 +0200 drm/uapi: Deprecate DRM_MODE_PROP_PENDING DRM_MODE_PROP_PENDING is not used anywhere (except printed out by libdrm proptest/modetest). This seems to be yet another thing blindly copied from xrandr. Quoting from the protocol spec: "If 'pending' is TRUE, changes made to property values with RRChangeOutputProperty will be saved in the pending property value and be automatically copied to the current value on the next RRSetCrtcConfig request involving the named output. If 'pending' is FALSE, changes are copied immediately." So it was some kind of early idea for atomic property updates. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180306164849.2862-4-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter include/uapi/drm/drm_mode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c6c2fe2f11b0f03be34efd1639ab921c8a4c163 Author: Ville Syrjälä Date: Tue Mar 6 18:48:46 2018 +0200 drm: WARN when trying to add enum value > 63 to a bitmask property Enum values >63 with a bitmask property is a programmer error. WARN when someone is attempting this. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180306164849.2862-3-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_property.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1371f2604dad70942041a7f1ed1a2029c67606b1 Author: Ville Syrjälä Date: Tue Mar 6 18:48:45 2018 +0200 drm: WARN when trying add enum values to non-enum/bitmask properties Trying to add enum values to non-enum/bitmask properties is a programmer mistake. WARN to make sure the developers notice their mistake. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180306164849.2862-2-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_property.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f881d04f3f5112e1c4e913a4bfb22bb30e0c9e0 Author: Ville Syrjälä Date: Tue Mar 6 18:48:44 2018 +0200 drm: Reject replacing property enum values If the property already has the enum value WARN and bail. Replacing enum values doesn't make sense to me. Throw out the pointless list_empty() while at it. Cc: Daniel Vetter Suggested-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180306164849.2862-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_property.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit c6a27fa41fabb35fcf0273c32a86f1424fa7de91 Author: Laurent Pinchart Date: Wed Jan 10 05:47:42 2018 +0200 drm: rcar-du: Convert LVDS encoder code to bridge driver The LVDS encoders used to be described in DT as part of the DU. They now have their own DT node, linked to the DU using the OF graph bindings. This allows moving internal LVDS encoder support to a separate driver modelled as a DRM bridge. Backward compatibility is retained as legacy DT is patched live to move to the new bindings. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund drivers/gpu/drm/rcar-du/Kconfig | 4 +- drivers/gpu/drm/rcar-du/Makefile | 3 +- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 21 +- drivers/gpu/drm/rcar-du/rcar_du_drv.h | 5 - drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 175 +--------- drivers/gpu/drm/rcar-du/rcar_du_encoder.h | 12 - drivers/gpu/drm/rcar-du/rcar_du_kms.c | 14 +- drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c | 93 ------ drivers/gpu/drm/rcar-du/rcar_du_lvdscon.h | 24 -- drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c | 238 -------------- drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.h | 64 ---- drivers/gpu/drm/rcar-du/rcar_lvds.c | 524 ++++++++++++++++++++++++++++++ 12 files changed, 561 insertions(+), 616 deletions(-) commit 81c0e3dd82927064a2f56a31a0974a0d110fcdb0 Author: Laurent Pinchart Date: Wed Jan 10 02:40:27 2018 +0200 drm: rcar-du: Fix legacy DT to create LVDS encoder nodes The internal LVDS encoders now have their own DT bindings. Before switching the driver infrastructure to those new bindings, implement backward-compatibility through live DT patching. Patching is disabled and will be enabled along with support for the new DT bindings in the DU driver. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Frank Rowand drivers/gpu/drm/rcar-du/Kconfig | 2 + drivers/gpu/drm/rcar-du/Makefile | 7 +- drivers/gpu/drm/rcar-du/rcar_du_of.c | 322 +++++++++++++++++++++ drivers/gpu/drm/rcar-du/rcar_du_of.h | 20 ++ .../gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dts | 76 +++++ .../gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dts | 50 ++++ .../gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dts | 50 ++++ .../gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dts | 50 ++++ .../gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dts | 50 ++++ 9 files changed, 626 insertions(+), 1 deletion(-) commit 6d2ca85279becdff6c12c3c25598f0aed472998e Author: Laurent Pinchart Date: Wed Jan 10 16:05:46 2018 +0200 dt-bindings: display: renesas: Deprecate LVDS support in the DU bindings The internal LVDS encoders now have their own DT bindings, representing them as part of the DU is deprecated. Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring Reviewed-by: Niklas Söderlund .../devicetree/bindings/display/renesas,du.txt | 31 ++++++++-------------- 1 file changed, 11 insertions(+), 20 deletions(-) commit 871b456040e79e651730d832c4e19728b75ef6ce Author: Laurent Pinchart Date: Wed Jan 10 16:05:46 2018 +0200 dt-bindings: display: renesas: Add R-Car LVDS encoder DT bindings The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add corresponding device tree bindings. Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring Reviewed-by: Niklas Söderlund .../bindings/display/bridge/renesas,lvds.txt | 56 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 57 insertions(+) commit 94aae1d9ff2eb05003f3c8043a3d7e5f2314a989 Merge: f073d78 e547c00 Author: Laurent Pinchart Date: Sun Mar 4 13:33:50 2018 +0200 Merge tag 'overlay_apply_fdt_v7-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/frowand/linux into drm/next/du - DT overlay applying rework (Frank Rowand) Move duplicating and unflattening of an overlay flattened devicetree (FDT) into the overlay application code. To accomplish this, of_overlay_apply() is replaced by of_overlay_fdt_apply(). commit 1c02e377e216b02c965be99338332be1b4f704ff Merge: 5c3d0fd 4910280 Author: David S. Miller Date: Wed Mar 7 10:55:30 2018 -0500 Merge branch 'sctp-add-support-for-some-msg_control-options-from-RFC6458' Xin Long says: ==================== sctp: add support for some msg_control options from RFC6458 This patchset is to add support for 3 msg_control options described in RFC6458: 5.3.7. SCTP PR-SCTP Information Structure (SCTP_PRINFO) 5.3.9. SCTP Destination IPv4 Address Structure (SCTP_DSTADDRV4) 5.3.10. SCTP Destination IPv6 Address Structure (SCTP_DSTADDRV6) one send flag described in RFC6458: SCTP_SENDALL: This flag, if set, will cause a one-to-many style socket to send the message to all associations that are currently established on this socket. For the one-to- one style socket, this flag has no effect. Note there is another msg_control option: 5.3.8. SCTP AUTH Information Structure (SCTP_AUTHINFO) It's a little complicated, I will post it in another patchset after this. ==================== Signed-off-by: David S. Miller commit 4910280503f3af2857d5aa77e35b22d93a8960a8 Author: Xin Long Date: Mon Mar 5 20:44:20 2018 +0800 sctp: add support for snd flag SCTP_SENDALL process in sendmsg This patch is to add support for snd flag SCTP_SENDALL process in sendmsg, as described in section 5.3.4 of RFC6458. With this flag, you can send the same data to all the asocs of this sk once. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/uapi/linux/sctp.h | 2 ++ net/sctp/socket.c | 35 +++++++++++++++++++++++++++++++---- 2 files changed, 33 insertions(+), 4 deletions(-) commit 2c0dbaa0c43d04d8d6daf52adb724c5789676b15 Author: Xin Long Date: Mon Mar 5 20:44:19 2018 +0800 sctp: add support for SCTP_DSTADDRV4/6 Information for sendmsg This patch is to add support for Destination IPv4/6 Address options for sendmsg, as described in section 5.3.9/10 of RFC6458. With this option, you can provide more than one destination addrs to sendmsg when creating asoc, like sctp_connectx. It's also a necessary send info for sctp_sendv. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 1 + include/uapi/linux/sctp.h | 6 ++++ net/sctp/socket.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) commit ed63afb8a318f6b3558d76afba7809daee4f28e5 Author: Xin Long Date: Mon Mar 5 20:44:18 2018 +0800 sctp: add support for PR-SCTP Information for sendmsg This patch is to add support for PR-SCTP Information for sendmsg, as described in section 5.3.7 of RFC6458. With this option, you can specify pr_policy and pr_value for user data in sendmsg. It's also a necessary send info for sctp_sendv. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 1 + include/uapi/linux/sctp.h | 15 +++++++++++++++ net/sctp/socket.c | 31 ++++++++++++++++++++++++++++++- 3 files changed, 46 insertions(+), 1 deletion(-) commit 49774d86fd485873e736470ea1cb03f84d39ce3f Merge: a7e66ff 7353c54 Author: Arnd Bergmann Date: Wed Mar 7 16:52:19 2018 +0100 Merge tag 'samsung-drivers-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/drivers Pull "Samsung soc drivers changes for v4.17" from Krzysztof Kozłowski: 1. Add SPDX license identifiers. 2. Populate children syscon nodes in PMU driver to properly model HW in DeviceTree. * tag 'samsung-drivers-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: pmu: Populate children syscon nodes soc: samsung: Add SPDX license identifiers to headers memory: samsung: Add SPDX license identifiers commit a7e66ff96beb616067b3b2b9934f5974b2dd2758 Merge: aa8f21a8 5c5f803 Author: Arnd Bergmann Date: Wed Mar 7 16:50:46 2018 +0100 Merge tag 'tee-drv-misc-for-v4.17' of https://git.linaro.org:/people/jens.wiklander/linux-tee into next/drivers Pull "Small fix and report OP-TEE revision information" from Jens Wiklander: * Adds one small fix correct max value of privileged device id allocation, this is only needed if there's more than TEE_NUM_DEVICES / 2 (16) tee drivers registered. One or two is a normal value. * Reports OP-TEE revision information (major, minro version and build id if available) * tag 'tee-drv-misc-for-v4.17' of https://git.linaro.org:/people/jens.wiklander/linux-tee: tee: optee: report OP-TEE revision information tee: optee: GET_OS_REVISION: document a2 as a build identifier tee: correct max value for id allocation commit aa8f21a8a982c882f9d4f328e197ab50bf125e06 Merge: f46f11d a817e5d Author: Arnd Bergmann Date: Wed Mar 7 16:48:44 2018 +0100 Merge tag 'soc_drivers_for_4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/drivers Pull "SOC driver changes for v4.17" from Santosh Shilimkar: - Remove redundant dev_err from probe in ti-emif-srma driver - Make use of seq_putc in emif reg show * tag 'soc_drivers_for_4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: memory: ti-emif-sram: remove redundant dev_err call in ti_emif_probe() memory-EMIF: Use seq_putc() in emif_regdump_show() commit ce290211fb1815e1519b2f0f6038533285061f62 Author: Rob Herring Date: Tue Mar 6 08:55:46 2018 -0600 MAINTAINERS: Add linux/of_*.h headers to appropriate subsystems The DeviceTree support code for specific subsystems are maintained by the respective subsystem maintainers. However, only the DT maintainers are listed for most of the linux/of_*.h headers. Fix this and add the headers to the appropriate subsystem maintainer. Reported-by: Guenter Roeck Acked-by: Vinod Koul Acked-by: Linus Walleij Acked-by: Joerg Roedel Acked-by: Bjorn Helgaas Signed-off-by: Rob Herring MAINTAINERS | 4 ++++ 1 file changed, 4 insertions(+) commit f46f11dc1e86270935041fbc3920ba71a050a5fd Merge: 819d38e 02f208c Author: Arnd Bergmann Date: Wed Mar 7 16:45:07 2018 +0100 Merge tag 'scmi-updates-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/drivers Pull "ARM SCMI support for v4.17" from Sudeep Holla: ARM System Control and Management Interface(SCMI)[1] is more flexible and easily extensible than any of the existing interfaces. Few existing as well as future ARM platforms provide micro-controllers to abstract various power and other system management tasks which have similar interfaces, both in terms of the functions that are provided by them, and in terms of how requests are communicated to them. There are quite a few protocols like ARM SCPI, TI SCI, QCOM RPM, Nvidia Tegra BPMP, and so on already. This specification is to standardize and avoid any further fragmentation in the design of such interface by various vendors. The current SCMI driver implementation is very basic and initial support. It lacks support for notifications, asynchronous/delayed response, perf/power statistics region and sensor register region. Mailbox is the only form of transport supported currently in the driver. SCMI supports interrupt based mailbox communication, where, on completion of the processing of a message, the caller receives an interrupt as well as polling for completion. SCMI is designed to minimize the dependency on the mailbox/transport hardware. So in terms of SCMI, each channel in the mailbox includes memory area, doorbell and completion interrupt. However the doorbell and completion interrupt is highly mailbox dependent which was bit of controversial as part of SCMI/mailbox discussions. Arnd and me discussed about the few aspects of SCMI and the mailbox framework: 1. Use of mailbox framework for doorbell type mailbox controller: - Such hardware may not require any data to be sent to signal the remote about the presence of a message. The channel will have in-built information on how to trigger the signal to the remote. There are few mailbox controller drivers which are purely doorbell based. e.g.QCOM IPC, STM, Tegra, ACPI PCC,..etc 2. Supporting other mailbox controller: - SCMI just needs a mechanism to signal the remote firmware. Such controller may need fixed message to be sent to trigger a doorbell. In such case we may need to get that data from DT and pass the same to the controller. It's not covered in the current DT binding, but can be extended as optional property in future. However handling notifications may be interesting on such mailbox, but again there is no way to interpret what the data field(remote message) means, it could be a bit mask or a number or don't-care. Arnd mentioned that he doesn't like the way the mailbox binding deals with doorbell-type hardware, but we do have quite a few precedent drivers already and changing the binding to add a data field would not make it any better, but could cause other problems. So he is happy with the status quo of SCMI implementation. [1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0056a/index.html * tag 'scmi-updates-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: cpufreq: scmi: add support for fast frequency switching cpufreq: add support for CPU DVFS based on SCMI message protocol hwmon: add support for sensors exported via ARM SCMI hwmon: (core) Add hwmon_max to hwmon_sensor_types enumeration clk: add support for clocks provided by SCMI firmware: arm_scmi: add device power domain support using genpd firmware: arm_scmi: add per-protocol channels support using idr objects firmware: arm_scmi: refactor in preparation to support per-protocol channels firmware: arm_scmi: add option for polling based performance domain operations firmware: arm_scmi: add support for polling based SCMI transfers firmware: arm_scmi: probe and initialise all the supported protocols firmware: arm_scmi: add initial support for sensor protocol firmware: arm_scmi: add initial support for power protocol firmware: arm_scmi: add initial support for clock protocol firmware: arm_scmi: add initial support for performance protocol firmware: arm_scmi: add scmi protocol bus to enumerate protocol devices firmware: arm_scmi: add common infrastructure and support for base protocol firmware: arm_scmi: add basic driver infrastructure for SCMI dt-bindings: arm: add support for ARM System Control and Management Interface(SCMI) protocol dt-bindings: mailbox: add support for mailbox client shared memory commit 819d38e95f8ac3fb2e26e42e5c3f19d95a07c847 Merge: e107f4b 62c60ef Author: Arnd Bergmann Date: Wed Mar 7 16:43:42 2018 +0100 Merge tag 'scpi-updates-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/drivers Pull "ARM SCPI updates/cleanups for v4.17" from Sudeep Holla: 1. Fixes to get rid of sparse warnings 2. Use of FIELD_GET and GENMASK for better subfields handling 3. Make mbox_free_channels device-managed helping in removing unnecessary code 4. Various other cleanups to simplify and improve code readability Note that similar set of changes were merged in v4.15, however got reverted through the commit 81faa5566864 ("firmware: arm_scpi: Revert updates made during v4.15 merge window") for reasons mentioned in that commit. This is the resend with the culprit patch removed. Kevin Hilman tested this series on Amlogic and reported it to be fine. * tag 'scpi-updates-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scpi: improve info message for pre-1.0 firmware firmware: arm_scpi: use FIELD_GET/_PREP to simplify macro definitions firmware: arm_scpi: remove struct sensor_capabilities firmware: arm_scpi: fix incorrect __iomem accesses using correct accessors firmware: arm_scpi: remove all single element structures firmware: arm_scpi: drop unnecessary type cast to scpi_shared_mem firmware: arm_scpi: improve struct sensor_value firmware: arm_scpi: improve handling of protocol and firmware version subfields firmware: arm_scpi: improve struct dvfs_info to make code better readable firmware: arm_scpi: make scpi_probe completely device-managed firmware: arm_scpi: make freeing mbox channels device-managed firmware: arm_scpi: remove two unneeded devm_kfree's in scpi_remove commit 5c3d0fd4b2c047cedb1cbdad6e2d6bc9abfec256 Author: Niklas Söderlund Date: Sat Mar 3 23:39:54 2018 +0100 ravb: remove erroneous comment When addressing a review comment in a early version of the offending patch a comment where left in which should have been removed. Remove the comment to keep it consistent with the code. Fixes: 75efa06f457bbed3 ("ravb: add support for changing MTU") Reported-by: Sergei Shtylyov Signed-off-by: Niklas Söderlund Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 1 - 1 file changed, 1 deletion(-) commit 36719eb15587ccb0eb7c8ee5eec379b3d438e95a Merge: e238310 6ca6203 Author: Arnd Bergmann Date: Wed Mar 7 16:37:43 2018 +0100 Merge tag 'samsung-dt64-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Pull "Samsung DTS ARM64 changes for v4.17" from Krzysztof Kozłowski: 1. Add support for HDMI audio on Exynos 5433 TM2/TM2E boards. 2. Add support for USB-MHL connector on Exynos 5433 TM2/TM2E boards. * tag 'samsung-dt64-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: add OF graph between MHL and USB connector arm64: dts: exynos: add micro-USB connector node to TM2 platforms ARM: dts: exynos: Add support for HDMI audio on Exynos 5433 TM2 board ARM: dts: exynos: Update I2S0 device node in exynos5433 ARM: dts: exynos: Add I2S1 device node to exynos5433 commit e238310c0c34a281b49539b0097975a17da3eec7 Merge: bf89bd5 6f48707 Author: Arnd Bergmann Date: Wed Mar 7 16:36:50 2018 +0100 Merge tag 'samsung-dt-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Pull "Samsung DTS ARM changes for v4.17" from Krzysztof Kozłowski: 1. Add WiFi to Artik 5 board. 2. Remove unused samsung_k3pe0e000b memory DTSI. 3. Add few remaining SPDX license identifiers. 4. Refactor Exynos4 by using labels for overriding/extending nodes and moving respective nodes under the 'soc' node. 5. Add three new Exynos4412-based boards: GT-I9300 (Samsung Galaxy S3), GT-I9305 (Samsung Galaxy S3 LTE) and GT-N7100/N7105 (Samsung Note 2). They are based heavily on existing Trats2 board. 6. Fix PMIC interrupts on Trats board. 7. Fix IOMMU for GScaler devices on Exynos5250. 8. Minor fixes in unit addresses pointed by DTC. 9. Minor cleanups from unused properties and duplicated code. * tag 'samsung-dt-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (29 commits) ARM: dts: exynos: Fix IOMMU support for GScaler devices on Exynos5250 ARM: dts: exynos: Remove unused bypass-smu property from Xyref5260 ARM: dts: exynos: Add missing interrupts property to PMIC on Trats board ARM: dts: exynos: Fix unit addresses of PDMA nodes in Exynos5410 ARM: dts: exynos: Fix address of PPMU ACP on Exynos4210 ARM: dts: exynos: Cleanup power domain nodes in exynos3250.dtsi ARM: dts: exynos: Add touchscreen node to Exynos4412 N710x ARM: dts: exynos: Add Samsung's Exynos4412-based Midas boards ARM: dts: exynos: Split Trats2 DTS in preparation for Midas boards ARM: dts: exynos: Remove "cooling-{min|max}-level" for CPU nodes dt-bindings: samsung: Document bindings for Midas family boards ARM: dts: exynos: Add soc node to exynos4412 ARM: dts: exynos: Add soc node to exynos4210 ARM: dts: exynos: Add soc node to exynos4 ARM: dts: exynos: Add soc node to exynos5440 ARM: dts: exynos: Use pmu label in exynos4412 ARM: dts: exynos: Remove duplicated inclusion of syscon restart nodes on Exynos5410 ARM: dts: exynos: Use label instead of full path in exynos4412-itop-elite ARM: dts: exynos: Use labels instead of full paths in exynos4412-trats2 ARM: dts: exynos: Use label instead of full path in exynos4412-odroid-common ... commit bf89bd5294f295f1048b745a7f241e0295a065f6 Author: Geert Uytterhoeven Date: Fri Mar 2 15:02:45 2018 +0100 ARM: dts: atlas7: Use generic uart-has-rtscts DT property As of commit 7f60830ab1511d94 ("serial: sirf: Use generic uart-has-rtscts DT property property"), the SiRF UART driver recognizes the generic "uart-has-rtscts" DT property, deprecating the vendor-specific "sirf,uart-has-rtscts" DT property. Hence replace the latter by the former in all DTS files. Signed-off-by: Geert Uytterhoeven Signed-off-by: Arnd Bergmann arch/arm/boot/dts/atlas7-evb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfbecbc7b6bcb27d809cf011df609d5d4d1c012c Merge: 0517a09 193ca00 Author: Arnd Bergmann Date: Wed Mar 7 16:34:22 2018 +0100 Merge tag 'stm32-dt-for-v4.17-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/dt Pull "STM32 DT updates for v4.17, round 1" from Alexandre Torgue: Highlights: ----------- -Add support of STM32MP157 MPU and stm32mp157c eval board -Add SD supports on F4 and F7 boards -Add leds support on stm32f469 and stm32f769 disco boards -Add push button support on stm32f469 and stm32f769 disco boards -Add EXTI, SPI, RTC, USB HS/FS support on STM32H743 MCU -Add RTC and USB OTG HS on stm32f769-disco -Use dedicated files for F7 pinctrl * tag 'stm32-dt-for-v4.17-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: (34 commits) ARM: dts: stm32: Fix sdio2 rcc hard coded value dt-bindings: mfd: Add STM32F7 SDMMC2 rcc entry ARM: dts: stm32: Enable sdio1 for stm32f769-disco ARM: dts: stm32: Enable sdio1 for stm32f746-eval ARM: dts: stm32: Enable sdio1 for stm32f746-disco ARM: dts: stm32: Add sdio pins definition for stm32f7 ARM: dts: stm32: add SPI support on STM32H743 SoC ARM: dts: stm32: enable RTC on stm32h743i-eval ARM: dts: stm32: add RTC support on STM32H743 ARM: dts: stm32: enable USB OTG HS on stm32h743i-eval ARM: dts: stm32: add USB OTG HS and FS support for STM32H743 SoC ARM: dts: stm32: enable RTC on stm32f769-disco ARM: dts: stm32: enable USB HS on stm32f769-disco ARM: dts: stm32: select otg mode for usbotg_hs on stm32746g_eval ARM: dts: stm32: add gadget fifo sizes to usbotg_hs on stm32f746 ARM: dts: stm32: Add push button to stm32f769 Discovery board ARM: dts: stm32: Add push button to stm32f469 Discovery board ARM: dts: stm32: Add leds support to stm32f769 Discovery board ARM: dts: stm32: Add leds support to stm32f469 Discovery board ARM: dts: stm32: Fix HSE clock frequency for stm32h743i-disco board ... commit 78972f51ccf8d0682edf99f03d1367b8c2ce7336 Author: Shuah Khan Date: Thu Feb 22 18:17:50 2018 -0700 selftests: futex Makefile add top level TAP header echo to RUN_TESTS Add top level TAP header echo, testname and separator line to make the output consistent with the common run_tests target. This change prevents nested TAP13 headers output from individual tests. Nested TAP13 headers could cause problems for some parsers. Signed-off-by: Shuah Khan Reviewed-by: Darren Hart (VMware) Signed-off-by: Shuah Khan tools/testing/selftests/futex/Makefile | 4 ++++ 1 file changed, 4 insertions(+) commit 242b205bb65616a5bec791af47dd521bb1774448 Merge: 3bf5c70 cc14b2b Author: Arnd Bergmann Date: Wed Mar 7 16:30:18 2018 +0100 Merge tag 'samsung-soc-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/soc Pull "Samsung mach/soc changes for v4.17" from Krzysztof Kozłowski: 1. Add few remaining SPDX license identifiers. 2. Add cpuidle support to all Midas-based boards (including new GT-I9300/GT-I9305/GT-N7100/GT-N7105). * tag 'samsung-soc-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: EXYNOS: Extend cpuidle support to Midas boards ARM: EXYNOS: Add SPDX license identifiers commit 3bf5c70d06ce1d91cc73cee68bc6c4f850192cb0 Merge: 18b4788 695eea3 Author: Arnd Bergmann Date: Wed Mar 7 16:26:43 2018 +0100 Merge tag 'omap-for-v4.17/ti-sysc-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc Pull "Driver changes for ti-sysc for v4.17" from Tony Lindgren: This series of changes enables the use device tree based sysconfig data for ti-sysc driver. As we already have SmartReflex data configured, we use that as the first driver to enable. To do that in a way where SmartReflex is not probed twice, we need to prepare the SmartReflex driver before flipping dts data on for it in the last patch of the series. To avoid regressions, we are checking the passed dts data against existing platform data since we still have it available. Then after the dts files are converted, we can simply drop the related platform data at some point in the future. * tag 'omap-for-v4.17/ti-sysc-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Enable ti-sysc to use device tree data for smartreflex PM / AVS: SmartReflex: Prepare to use device tree based probing ARM: OMAP2+: Try to parse earlycon from parent too ARM: OMAP2+: Add checks for device tree based sysconfig data ARM: OMAP2+: Add functions to allocate module data from device tree bus: ti-sysc: Handle some devices in omap_device compatible way bus: ti-sysc: Add support for platform data callbacks bus: ti-sysc: Remove unnecessary debugging statements bus: ti-sysc: Improve handling for no-reset-on-init and no-idle-on-init bus: ti-sysc: Handle stdout-path for debug console bus: ti-sysc: Add suspend and resume handling bus: ti-sysc: Add fck clock alias for children with notifier_block ARM: OMAP2+: Prepare to pass auxdata for smartreflex commit 18b4788badeae8ed3a9bd3c240d83dffe5db8f37 Merge: 6f566c4 afe761f Author: Arnd Bergmann Date: Wed Mar 7 16:21:59 2018 +0100 Merge tag 'omap-for-v4.17/am-pm-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc Pull "Add am335x and am437x PM code for v4.17" from Tony Lindgren: This series of changes from Dave Gerlach adds the PM related code to allow low-power suspend states. The code consists of the SoC specific assembly code and a related PM driver. * tag 'omap-for-v4.17/am-pm-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: soc: ti: Add pm33xx driver for basic suspend support ARM: OMAP2+: pm33xx-core: Add platform code needed for PM ARM: OMAP2+: Introduce low-level suspend code for AM43XX ARM: OMAP2+: Introduce low-level suspend code for AM33XX commit 30855ffc29b972d3316e2adcf8029c00c36fad60 Author: Kirill Tkhai Date: Thu Mar 1 15:23:28 2018 +0300 net: Make account struct net to memcg The patch adds SLAB_ACCOUNT to flags of net_cachep cache, which enables accounting of struct net memory to memcg kmem. Since number of net_namespaces may be significant, user want to know, how much there were consumed, and control. Note, that we do not account net_generic to the same memcg, where net was accounted, moreover, we don't do this at all (*). We do not want the situation, when single memcg memory deficit prevents us to register new pernet_operations. (*)Even despite there is !current process accounting already available in linux-next. See kmalloc_memcg() there for the details. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/core/net_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e9b3e74b4a184f657995cf28963f72531c7a420 Author: Marek Szyprowski Date: Mon Mar 5 09:57:41 2018 +0100 drm/bridge: analogix_dp: Don't create useless connectors If there is another bridge after analogix_dp, then the connector object should not be created. This fixes following timeouts on Exynos5420-based Chromebook2 Peach-PIT board during boot: exynos-dp 145b0000.dp-controller: AUX CH cmd reply timeout! exynos-dp 145b0000.dp-controller: AUX CH enable timeout! exynos-dp 145b0000.dp-controller: AUX CH enable timeout! exynos-dp 145b0000.dp-controller: AUX CH enable timeout! exynos-dp 145b0000.dp-controller: AUX CH enable timeout! Signed-off-by: Marek Szyprowski Tested-by: Heiko Stuebner Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20180305085741.18896-4-m.szyprowski@samsung.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 29 ++++++++++++---------- drivers/gpu/drm/exynos/exynos_dp.c | 1 + include/drm/bridge/analogix_dp.h | 1 + 3 files changed, 18 insertions(+), 13 deletions(-) commit f25c83581583eca9b1c1e6fd2914c7f8a1be22de Author: Marek Szyprowski Date: Mon Mar 5 09:57:40 2018 +0100 drm/bridge: analogix_dp: Postpone enabling runtime power management Enabling runtime power management early in analogix_dp_bind() causes following kernel NULL pointer dereference: Unable to handle kernel NULL pointer dereference at virtual address 000007d8 pgd = 28ffa2e4 [000007d8] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT SMP ARM Modules linked in: CPU: 6 PID: 69 Comm: kworker/6:1 Not tainted 4.16.0-rc1-00062-ge25751974ba8 #3622 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) Workqueue: events deferred_probe_work_func PC is at analogix_dp_resume+0x8/0xc0 LR is at pm_generic_runtime_resume+0x2c/0x38 pc : [] lr : [] psr: a0000113 sp : ee13fbd8 ip : 0000001a fp : 00000001 r10: ee0eb080 r9 : c0552bd8 r8 : c0fb1d98 r7 : eebb1010 r6 : eeae9808 r5 : 00000000 r4 : d4850415 r3 : ee0ed010 r2 : b2d05e00 r1 : 00000000 r0 : 00000000 Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 2000406a DAC: 00000051 Process kworker/6:1 (pid: 69, stack limit = 0x913205b4) Stack: (0xee13fbd8 to 0xee140000) ... [] (analogix_dp_resume) from [] (pm_generic_runtime_resume+0x2c/0x38) [] (pm_generic_runtime_resume) from [] (__genpd_runtime_resume+0x2c/0x8c) [] (__genpd_runtime_resume) from [] (genpd_runtime_resume+0x14c/0x258) [] (genpd_runtime_resume) from [] (__rpm_callback+0x134/0x214) [] (__rpm_callback) from [] (rpm_callback+0x20/0x80) [] (rpm_callback) from [] (rpm_resume+0x3a0/0x734) [] (rpm_resume) from [] (__pm_runtime_resume+0x64/0x9c) [] (__pm_runtime_resume) from [] (__device_attach+0x8c/0x134) [] (__device_attach) from [] (bus_probe_device+0x88/0x90) [] (bus_probe_device) from [] (device_add+0x3a8/0x580) [] (device_add) from [] (i2c_register_adapter+0xd4/0x3ec) [] (i2c_register_adapter) from [] (analogix_dp_bind+0x2a0/0x410) [] (analogix_dp_bind) from [] (exynos_dp_bind+0x9c/0x12c) [] (exynos_dp_bind) from [] (component_bind_all+0xfc/0x258) [] (component_bind_all) from [] (exynos_drm_bind+0x15c/0x28c) [] (exynos_drm_bind) from [] (try_to_bring_up_master+0x1b8/0x29c) [] (try_to_bring_up_master) from [] (component_add+0xa0/0x170) [] (component_add) from [] (exynos_dp_probe+0x64/0xb8) [] (exynos_dp_probe) from [] (platform_drv_probe+0x50/0xb0) [] (platform_drv_probe) from [] (driver_probe_device+0x2b8/0x4a0) [] (driver_probe_device) from [] (bus_for_each_drv+0x44/0x8c) [] (bus_for_each_drv) from [] (__device_attach+0xa0/0x134) [] (__device_attach) from [] (bus_probe_device+0x88/0x90) [] (bus_probe_device) from [] (deferred_probe_work_func+0x3c/0x168) [] (deferred_probe_work_func) from [] (process_one_work+0x1d0/0x7bc) [] (process_one_work) from [] (worker_thread+0x34/0x4dc) [] (worker_thread) from [] (kthread+0x128/0x164) [] (kthread) from [] (ret_from_fork+0x14/0x20) Exception stack(0xee13ffb0 to 0xee13fff8) ffa0: 00000000 00000000 00000000 00000000 ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 Code: e2800e37 eafee601 e92d4070 e1a05000 (e59067d8) ---[ end trace bf6046013df7cab2 ]--- This oops happens, because analogix_dp_bind() calls drm_dp_aux_register() which registers i2c adapter. I2C core tries to runtime get i2c host device during registration. This ends in analogix_dp_resume(), but dp context is NULL there. dp context is set in exynos_dp_bind() after executing analogix_dp_bind(). Fix this issue by postponing enabling runtime power management after drm_dp_aux_register(). Signed-off-by: Marek Szyprowski Tested-by: Heiko Stuebner Reviewed-by: Heiko Stuebner Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20180305085741.18896-3-m.szyprowski@samsung.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ea2a14da0f191e93c0924acb4ab8a9009e33de81 Author: zain wang Date: Mon Mar 5 09:57:39 2018 +0100 drm/bridge: analogix_dp: Don't power bridge in analogix_dp_bind The bridge does not need to be powered in analogix_dp_bind(), so remove the calls to pm_runtime_get()/phy_power_on()/analogix_dp_init_dp() as well as their power-off counterparts. Cc: Stéphane Marchesin Signed-off-by: zain wang Signed-off-by: Caesar Wang [the patch originally just removed the power_on portion, seanpaul removed the power off code as well as improved the commit message] Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Signed-off-by: Marek Szyprowski Tested-by: Heiko Stuebner Reviewed-by: Heiko Stuebner Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20180305085741.18896-2-m.szyprowski@samsung.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 10 ---------- 1 file changed, 10 deletions(-) commit 6f566c4f304de8a90d520f7ca1925b4ea7dc3581 Merge: 7b80bd2 58a54f0 Author: Arnd Bergmann Date: Wed Mar 7 16:16:07 2018 +0100 Merge tag 'omap-for-v4.17/timer-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc Pull "Move omap timer to drivers for 4.17" from Tony Lindgren: This series from Keerthy and Ladislav Michl move omap dmtimer code to drivers. As we don't want to export custom timer functions to random drivers, we also need to update the related PWM driver to pass the timer specific functions in platform data. Note that this series is based on a merge of omap1 specific timer fix and omap2+ platform data clean-up to keep things working and make the move a bit simpler. * tag 'omap-for-v4.17/timer-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: clocksource: timer-ti-dm: Check prescaler value clocksource: timer-ti-dm: Consolidate set source clocksource: timer-ti-dm: Make unexported functions static ARM: OMAP: pdata-quirks: Remove unused timer pdata pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops clocksource: timer-ti-dm: Hook device platform data if not already assigned clocksource: timer-ti-dm: Populate the timer ops to the pdata clocksource: timer-ti-dm: Add timer ops to the platform data structure ARM: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource clocksource: timer-ti-dm: Replace architecture ARM: OMAP: Move dmtimer.h out of plat-omap ARM: OMAP: timer: Wrap the inline functions under OMAP2PLUS define ARM: OMAP: dmtimer: Remove all the exports ARM: OMAP: Fix dmtimer init for omap1 commit 7b80bd29482e692a7286897f4a684ee18dee0f36 Merge: dbc7886 e33509c Author: Arnd Bergmann Date: Wed Mar 7 16:14:15 2018 +0100 Merge tag 'omap-for-v4.17/soc-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc Pull "SoC changes for omaps for v4.17" from Tony Lindgren: This series is mostly a series from Suman Anna to remove now unused platform data that is now coming from device tree. This also make it a bit simpler to move the timer code to live under drivers in a separate series of patches. There are also few minor clean-ups for omap4 PM code. * tag 'omap-for-v4.17/soc-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Fix typo for wakeup_ns_pa_addr ARM: OMAP2+: Use v7_invalidate_l1 in omap4_finish_suspend ARM: OMAP2+: Remove unused gpio header file references ARM: OMAP: Move plat/i2c.h into mach-omap1 folder ARM: OMAP2+: Cleanup omap_mcbsp_dev_attr and other legacy data ARM: OMAP2+: Cleanup omap2_spi_dev_attr and other legacy data ARM: OMAP2+: Cleanup omap_timer_capability_dev_attr usage ARM: OMAP2+: Cleanup omap_i2c_dev_attr usage ARM: OMAP2+: Cleanup omap_gpio_dev_attr usage ARM: OMAP2+: Include types.h directly for hwmod data commit dbc7886164e2d4d3e842cd818d9f8f2b28b13d5f Merge: f74ee9b 1c92d4a Author: Arnd Bergmann Date: Wed Mar 7 16:13:01 2018 +0100 Merge tag 'stm32-defconfig-for-v4.17-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/soc Pull "STM32 defconfig updates for v4.17, round 1" from Alexandre Torgue: Highlights: ---------- -Add STM32 support (for MPU) to multi-v7-defconfig -Enable MMCI and EXT3_FS support commit f74ee9b1abec995eba837de7aef9cf9fcc3032ee Merge: b34c61f 2092e3a Author: Arnd Bergmann Date: Wed Mar 7 16:10:02 2018 +0100 Merge tag 'stm32-soc-for-v4.17-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/soc Pull "STM32 SOC updates for v4.17, round 1." from Alexandre Torgue: Highlights: ---------- -Add STM32F769 MCU support -Add STM32MP157 MPU support -Add AMBA PL180 MMCI support for F4 and F7 MCUs -Move STM32 documentation to rst format * tag 'stm32-soc-for-v4.17-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: stm32: restore reboot capabilities ARM: stm32: Add AMBA support for STM32F4 and STM32F7 SoCs ARM: stm32: add initial support for STM32MP157 ARM: stm32: prepare stm32 family to welcome armv7 architecture Documentation: arm: stm32: move to rst format ARM: stm32: Fix copyright ARM: stm32: add new STM32F769 MCU ARM: stm32: Kconfig: introduce MACH_STM32F769 flag commit b34c61fc747f20855acd8c4d77fa4304dd3e86a8 Author: Chunyan Zhang Date: Thu Mar 1 16:09:15 2018 +0800 MAINTAINERS: Add Spreadtrum SoC entry Add Spreadtrum's maintainer entry and Orson, Baolin and me as maintainers. Cc: Orson Zhai Cc: Baolin Wang Signed-off-by: Chunyan Zhang Signed-off-by: Arnd Bergmann MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit de067e46eddeda9d8e58996a99e0b2cfc4f0623d Author: Geert Uytterhoeven Date: Fri Mar 2 15:04:47 2018 +0100 ARM: socfpga: PM: Drop useless check for PM_SUSPEND_STANDBY As SoCFPGA uses the standard suspend_valid_only_mem() for its platform_suspend_ops.valid() callback, its platform_suspend_ops.enter() callback will never be called with state equal to PM_SUSPEND_STANDBY. Signed-off-by: Geert Uytterhoeven Acked-by: Tony Lindgren Acked-by: Dinh Nguyen Signed-off-by: Arnd Bergmann arch/arm/mach-socfpga/pm.c | 1 - 1 file changed, 1 deletion(-) commit e2b714afee32d368e0fda825c48181626979a551 Author: Jarkko Nikula Date: Wed Mar 7 17:05:04 2018 +0200 spi: pxa2xx: Disable runtime PM if controller registration fails Don't leave runtime PM enabled in case devm_spi_register_controller() returns with an error. Otherwise runtime PM will complain when driver is reloaded: [ 693.855811] pxa2xx-spi pxa2xx-spi.13: Unbalanced pm_runtime_enable! Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 2 ++ 1 file changed, 2 insertions(+) commit 4ffb75c2dc3ae818bf8a32493e22ac632dd51558 Author: Geert Uytterhoeven Date: Fri Mar 2 14:38:05 2018 +0100 ARM: nspire: Remove unneeded nspire_map_io() nspire_map_io() just calls debug_ll_io_init(). If machine_desc.map_io is not set, devicemaps_init() in the common ARM code will call debug_ll_io_init(), so nspire_map_io() and the initialization of .map_io can be removed. Signed-off-by: Geert Uytterhoeven Reviewed-by: Vladimir Murzin Signed-off-by: Arnd Bergmann arch/arm/mach-nspire/nspire.c | 6 ------ 1 file changed, 6 deletions(-) commit 0517a0934e45d083adb31fd79ae48a49cadfa1d4 Merge: ea99a35 18aa0f4 Author: Arnd Bergmann Date: Wed Mar 7 16:05:56 2018 +0100 Merge tag 'omap-for-v4.17/dt-sdhci-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Pull "Device tree changes for dra7 sdhci for v4.17" from Tony Lindgren: This series from Sekhar Nori and Kishon Vijay Abraham I adds sdhci related nodes for dra7. To support higher transfer speeds, the iodelay pinmux controller needs to be also configured. Note that as these changes need SDHCI_OMAP to be enabled to avoid breaking booting for various systems, these changes are based on two defconfig changes to enable SDHCI_OMAP in the defconfig files. * tag 'omap-for-v4.17/dt-sdhci-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am57xx-idk: Select pull down for mmc1_clk line in default mode ARM: dts: dra71-evm: Select pull down for mmc1_clk line in default mode ARM: dts: dra71-evm: Correct evm_sd regulator max voltage ARM: dts: dra76-evm: Add "vqmmc-supply" property for mmc2 ARM: dts: am57xx-idk: Add "vqmmc-supply" property for mmc2 ARM: dts: dra7-evm: Add "vqmmc-supply" property for mmc2 ARM: dts: dra7-evm: Remove mmc specific pinmux ARM: dts: am57xx-beagle-x15: Add "vqmmc-supply" property for mmc2 ARM: dts: dra76-evm: Add pinctrl data for higher speed MMC/SD modes ARM: dts: dra76-evm: Shift to using common IOdelay data ARM: dts: dra76x: Create a common file with MMC/SD IOdelay data ARM: omap2plus_defconfig: Enable CONFIG_MMC_SDHCI_OMAP ARM: multi_v7_defconfig: Enable CONFIG_MMC_SDHCI_OMAP commit a66c51f9cc993748b8e9942382c52827d3902caa Author: Alexandre Belloni Date: Tue Feb 27 14:37:47 2018 +0100 ARM: reorder mach-*/Kconfig inclusions Reorder the mach-* inclusions so the comment about them being ordered alphabetically ends up being true. Signed-off-by: Alexandre Belloni Signed-off-by: Arnd Bergmann arch/arm/Kconfig | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 5a010a5648e5551b5b89e1a349ce1f164f656f0a Merge: 62a295b 35ba267 Author: Arnd Bergmann Date: Wed Mar 7 16:03:13 2018 +0100 Merge tag 'davinci-for-v4.17/defconfig' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc Pull "DaVinci defconfig updates for v4.17" from Sekhar Nori: Enable SYSCON_REBOOT_MODE needed for Lego EV3 and build the DaVinci watchdog driver in so reboot works even when modules are not loaded. * tag 'davinci-for-v4.17/defconfig' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci_all_defconfig: set CONFIG_DAVINCI_WATCHDOG=y ARM: davinci_all_defconfig: enable SYSCON_REBOOT_MODE commit 62a295bd823aa726e1bf1626385bd274a2b7b65c Merge: 7bffa14 96c0817 Author: Arnd Bergmann Date: Wed Mar 7 16:01:34 2018 +0100 Merge tag 'davinci-for-v4.17/soc' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc Pull "Miscellaneous DaVinci SoC support improvements for v4.17" from Sekhar Nori: * rationalization of con_id names for phy clocks to make DT conversion easy * A patch to move away from syscon as platform device. This is needed for common clock framework conversion as well as helps get rid of syscon_regmap_lookup_by_pdevname() by removing the last known user. * convert mach-davinci to use reset support available in watchdog driver * a non-critical warning fix. It has been around since beginning so not sending as a standalone fix for -rc cycle. * moving mach-davinci clock init to .init_time() for legacy boot. This is again in preparation for CCF conversion. * tag 'davinci-for-v4.17/soc' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: move davinci_clk_init() to init_time ARM: davinci: board-da830-evm: fix unused const variable warning ARM: davinci: remove watchdog reset ARM: da8xx: use platform data for CFGCHIP syscon regmap phy: da8xx-usb: rename clock con_ids commit b55dc1dc2790e69e45baf97243e28f258c6d5062 Author: Aishwarya Pant Date: Fri Mar 2 11:00:17 2018 +0530 HID: ntrig: document sysfs interface Add sysfs documentation for N-Trig touchscreens under Documentation/ABI. Descriptions have been collected from code comments. Signed-off-by: Aishwarya Pant Signed-off-by: Jiri Kosina Documentation/ABI/testing/sysfs-driver-hid-ntrig | 70 ++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit ea99a3546a0fbf926e3994d91604d69ddfcbab9b Merge: e94e5cb 07f3398 Author: Arnd Bergmann Date: Wed Mar 7 15:41:43 2018 +0100 Merge tag 'keystone_dts_for_4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/dt Pull "ARM: Keystone DTS for 4.17" from Santosh Shilimkar: - Andrew's various DTS warning fixes - clock address separator fix - EDAC support for EMIF - serial dts node unit address format fix * tag 'keystone_dts_for_4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: ARM: dts: keystone-k2g: Fix unit-address formatting for serial nodes dt-bindings: memory: ti-emif: add edac support under emif ARM: dts: keystone-k2e-clocks: Fix missing unit address separator ARM: dts: keystone-k2g: Move usb-phy nodes out of soc0 ARM: dts: keystone-k2g: Move keystone_dsp_gpio to under device-state-control ARM: dts: keystone-k2g: Move keystone_irq to under device-state-control ARM: dts: keystone-k2hk: Move keystone_dsp_gpio to under device-state-control ARM: dts: keystone-k2l: Move keystone_dsp_gpio to under device-state-control ARM: dts: keystone-k2e: Move keystone_dsp_gpio to under device-state-control ARM: dts: keystone: Move reset-controller to under device-state-control ARM: dts: keystone: Move keystone_irq to under device-state-control commit e94e5cb859293daa41e9386b3134e4c3265c1840 Merge: d5a77ec 47eee07 Author: Arnd Bergmann Date: Wed Mar 7 15:38:00 2018 +0100 Merge tag 'omap-for-v4.17/dt-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Pull "Device tree changes for omap variants for v4.17" from Tony Lindgren: This series of changes updates the device tree files for omaps: - Nokia N9 support for magnetometer - Update at24 to use atmel as manufacturer for am335x-boneblue - Add support for am33xx based PDU001 board - Update Droid 4 touchscreen for reset-gpios and add audio codec and soundcard - Remove unused dra7 cooling level nodes - A series of changes to configure am335x and am437x for PM - Add pinmuxing for i2c2 and 3 for LogicPD boards - Add EMIF interrupt infor for am437x and am335x - Add missing omap3 sound-dai-cells * tag 'omap-for-v4.17/dt-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (21 commits) ARM: dts: omap4-droid4: add soundcard ARM: dts: motorola-cpcap-mapphone: add audio-codec ARM: dts: omap3: Add missing #sound-dai-cells ARM: dts: am43xx: add emif interrupt info ARM: dts: am33xx: add emif interrupt info ARM: dts: Add pinmuxing for i2c2 and i2c3 for LogicPD SOM-LV ARM: dts: Add pinmuxing for i2c2 and i2c3 for LogicPD torpedo ARM: dts: am4372: Mark omap_l3_noc with ti,no-idle ARM: dts: am4372: Mark emif with ti,no-idle ARM: dts: am33xx: Mark emif with ti,no-idle ARM: dts: am4372: Add soc node ARM: dts: am33xx: Add pm-sram phandle to soc node ARM: dts: am4372: Update emif node ARM: dts: am33xx: Update emif node ARM: dts: am4372: Reserve pm code and data regions in ocmcram sram node ARM: dts: am33xx: Reserve pm code and data regions in ocmcram sram node ARM: dts: omap: Remove "cooling-{min|max}-level" for CPU nodes ARM: dts: omap4-droid4: update touchscreen ARM: dts: am33xx: add PDU001 board ARM: dts: use 'atmel' as at24 manufacturer in am335x-boneblue ... Signed-off-by: Arnd Bergmann commit 7ba8fc0904e3cdfe5b02aaf6fa8fcdb76ad67b0f Author: Jiri Kosina Date: Wed Mar 7 15:34:51 2018 +0100 HID: wacom: wacom_wac_collection() is local to wacom_wac.c ... and therefore should be static. Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5a77eca71d40dac9185f10722a74e988801915a Merge: 393bd5b 3f50981 Author: Arnd Bergmann Date: Wed Mar 7 15:31:07 2018 +0100 Merge tag 'juno-updates-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/dt Pull "ARMv8 Vexpress/Juno DT updates for v4.17" from Sudeep Holla: 1. Extends support for missing 3 GICv2m MSI frames 2. Fixes the incorrect GICv2m frame size(64kB instead of 4kB) * tag 'juno-updates-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno: fix size of GICv2m MSI frames arm64: dts: juno: Describe the full GICv2m region commit 393bd5b291f54b455a2a3879ac62c6a1c6382d00 Author: Rob Herring Date: Wed Feb 28 16:41:16 2018 -0600 arm64: dts: replace 'linux,stdout-path' with 'stdout-path' 'linux,stdout-path' has been deprecated for some time in favor of 'stdout-path'. Now dtc will warn on occurrences of 'linux,stdout-path'. Search and replace the one occurrence with 'stdout-path'. Signed-off-by: Rob Herring Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db543066301739052beb7b3656636df66c8ccca7 Author: Rob Herring Date: Wed Feb 28 16:41:15 2018 -0600 arm: dts: replace 'linux,stdout-path' with 'stdout-path' 'linux,stdout-path' has been deprecated for some time in favor of 'stdout-path'. Now dtc will warn on occurrences of 'linux,stdout-path'. Search and replace all the of occurrences with 'stdout-path'. Signed-off-by: Rob Herring Signed-off-by: Arnd Bergmann arch/arm/boot/dts/animeo_ip.dts | 2 +- arch/arm/boot/dts/imx51-digi-connectcore-jsk.dts | 2 +- arch/arm/boot/dts/imx6qdl-phytec-pbab01.dtsi | 2 +- arch/arm/boot/dts/orion5x-lacie-d2-network.dts | 2 +- arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts | 2 +- arch/arm/boot/dts/orion5x-linkstation.dtsi | 2 +- arch/arm/boot/dts/orion5x-lswsgl.dts | 2 +- arch/arm/boot/dts/orion5x-maxtor-shared-storage-2.dts | 2 +- arch/arm/boot/dts/orion5x-rd88f5182-nas.dts | 2 +- arch/arm/boot/dts/picoxcell-pc7302-pc3x2.dts | 2 +- arch/arm/boot/dts/picoxcell-pc7302-pc3x3.dts | 2 +- arch/arm/boot/dts/stih407-b2120.dts | 2 +- arch/arm/boot/dts/stih410-b2120.dts | 2 +- arch/arm/boot/dts/stih410-b2260.dts | 2 +- arch/arm/boot/dts/stih418-b2199.dts | 2 +- arch/arm/boot/dts/vf610m4-colibri.dts | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) commit 9f068ac878e200eb99fc5dbe1f32b1e925c3c8d5 Author: Baolin Wang Date: Wed Feb 28 18:47:10 2018 +0800 arm64: dts: Add SC2731 PMIC dts file for Spreadtrum SC9860 The Spreadtrum SC9860 platform has one SC2731 PMIC, and the SC2731 PMIC integrates all mobile handset power management, audio codec, battery management and user interface support function in a single chip. This patch adds the SC2731 dts file, as well as adding the RTC and regulator device node for this PMIC. Signed-off-by: Baolin Wang Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/sprd/sc2731.dtsi | 169 ++++++++++++++++++++++++++++++ arch/arm64/boot/dts/sprd/sp9860g-1h10.dts | 1 + 2 files changed, 170 insertions(+) commit 258e1ae63ce693e381281eb65a096d108e163aa7 Author: Baolin Wang Date: Wed Feb 28 18:47:09 2018 +0800 arm64: dts: Add DMA device node for Spreadtrum SC9860 The Spreadtrum SC9860 platform has two DMA controllers, one is located on the ap-ahb system, and another one is located on the agcp system. Signed-off-by: Baolin Wang Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/sprd/whale2.dtsi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 4f681369b98636c0563b4f106f7dd5312af7ebe2 Author: Baolin Wang Date: Wed Feb 28 18:47:08 2018 +0800 arm64: dts: Add watchdog device node for Spreadtrum SC9860 Add the watchdog device node for Spreadtrum SC9860 platform to watch the system's stability. Signed-off-by: Baolin Wang Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/sprd/whale2.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 0cb3dad02dc471f2e1cb73f5c964b40885ff29ed Author: Baolin Wang Date: Wed Feb 28 18:47:07 2018 +0800 arm64: dts: Add timer node for Spreadtrum SC9860 We will use one always-on timer to be the broadcast device, thus add the timer device node for Spreadtrum SC9860 platform. Signed-off-by: Baolin Wang Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/sprd/whale2.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit d85bcd9c6274905f5c0266d3096926a5456cc59d Author: Baolin Wang Date: Wed Feb 28 18:47:06 2018 +0800 arm64: dts: Add pin controller node for Spreadtrum SC9860 This patch adds the pin controller device node for Spreadtrum SC9860 platform. Signed-off-by: Baolin Wang Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/sprd/whale2.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit e254460a8988a44040e905234fae0fb32cfa3450 Author: Baolin Wang Date: Wed Feb 28 18:47:05 2018 +0800 arm64: dts: Add ADI device node for Spreadtrum SC9860 We will access the PMIC through ADI controller, thus this patch adds the ADI device node for Spreadtrum SC9860 platform. Signed-off-by: Baolin Wang Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/sprd/sp9860g-1h10.dts | 1 + arch/arm64/boot/dts/sprd/whale2.dtsi | 9 +++++++++ 2 files changed, 10 insertions(+) commit 6c6fbbd1ab9136dda91fa7f2648d09158759b605 Author: Baolin Wang Date: Wed Feb 28 18:47:04 2018 +0800 arm64: dts: Add hwspinlock node for Spreadtrum SC9860 The Spreadtrum SC9860 platform only has one hardware spinlock device, which is located on AON system of Spreadtrum SC9860 platform. Signed-off-by: Baolin Wang Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/sprd/whale2.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit f9b7128a30268f9484d4f75ed6349f23b57e9412 Merge: fbefc53 25c88cb Author: Arnd Bergmann Date: Wed Mar 7 15:25:14 2018 +0100 Merge tag 'davinci-for-v4.17/dt' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/dt Pull "DaVinci DT support enhancements for v4.17" from Sekhar Nori: * Lego EV3 gains firmware recovery mode support * Miscellaneous non-critical clean-up * tag 'davinci-for-v4.17/dt' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: da850-evm: add chosen and SPI alias ARM: dts: da850-lego-ev3: use a correct fallback for at24 compatible ARM: dts: da850-lego-ev3: Add node for reboot modes commit b1f466a90c516d54bd8bea7fb142a807d7800304 Author: Aaron Armstrong Skomra Date: Tue Mar 6 10:48:35 2018 -0800 HID: wacom: generic: add the "Report Valid" usage Wacom Bluetooth reports contain multiple pen frames per report. Each frame contains a flag indicating if the frame is valid. Future Wacom devices with this type of report may contain HID descriptors, add support for this usage to the generic codepath of the Wacom driver. Signed-off-by: Aaron Armstrong Skomra Reviewed-by: Ping Cheng Reviewed-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 16 +++++++++++++++- drivers/hid/wacom_wac.h | 3 ++- 2 files changed, 17 insertions(+), 2 deletions(-) commit f8b6a74719b5e003e28b2deb7ef91d7158333cbf Author: Aaron Armstrong Skomra Date: Tue Mar 6 10:48:34 2018 -0800 HID: wacom: generic: Support multiple tools per report Some Wacom devices contain contain Pen and Pad usages in the same report. Future devices of this type may utilize HID Descriptors. The generic code path of the Wacom driver previously assumed pen, touch, and pad reports were delivered in separate reports. This patch adds support for processing each collection of a report separately, in order to support reports with multiple tools. Signed-off-by: Aaron Armstrong Skomra Reviewed-by: Ping Cheng Reviewed-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 94 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 68 insertions(+), 26 deletions(-) commit 87046b6c995c50c11c8bd4a71877df83f99b3516 Author: Aaron Armstrong Skomra Date: Tue Mar 6 10:48:33 2018 -0800 HID: wacom: Add support for 3rd generation Intuos BT Use the code path that predates generic device support. Signed-off-by: Aaron Armstrong Skomra Reviewed-by: Ping Cheng Reviewed-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 113 +++++++++++++++++++++++++++++++++++++++--------- drivers/hid/wacom_wac.h | 1 + 2 files changed, 94 insertions(+), 20 deletions(-) commit fbefc5321e327c708f9162dbed2a6c4d1490a703 Merge: d6bdd00 0e04ce0 Author: Arnd Bergmann Date: Wed Mar 7 15:20:26 2018 +0100 Merge tag 'sti-dt-for-v4.17-round1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into next/dt Pull "STi dts update" from Patrice Chotard: Fix all DT dtc warnings when building with W=1 For most of implicated node, the addition of a fake reg property fixes these warnings. For others nodes, their location in device tree have been updated. * tag 'sti-dt-for-v4.17-round1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: ARM: dts: STi: Remove unused clk_ext2f_a9 clock ARM: dts: STi: Update clocks node location ARM: dts: STi: Update sound related nodes location ARM: dts: STi: Add fake reg property for usb2_picophyX nodes ARM: dts: STi: Add fake reg for restart, powerdown and picophy/softreset ARM: dts: STi: Add fake reg property for remote processors ARM: dts: STi: Add fake reg property for irq-syscfg ARM: dts: STi: Add fake reg property for miphy28lp_phy ARM: dts: STi: Add fake reg property for sti-display-subsystem ARM: dts: STi: Move leds node outside soc node ARM: dts: STi: Fix bindings notation commit c22969d70fc9253112e88da55116e04074cdeac4 Author: Hans de Goede Date: Sun Mar 4 15:36:10 2018 +0100 ASoC: Intel: bytcr_rt5651: Select RCCLK on init() When the BYT_RT5651_MCLK_EN quirk is set, we disable the MCLK from byt_rt5651_init(), we need to select the RCCLK as sysclk before doing this to make sure that jack-detect works directly after boot. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 5 +++++ 1 file changed, 5 insertions(+) commit b4b6377e07727df8292539062d9a56e6bd83ba89 Author: Hans de Goede Date: Sun Mar 4 15:36:09 2018 +0100 ASoC: Intel: bytcr_rt5651: Change defaults to enable jack-detect, analog mics Change the default quirk settings to enable jack-detect, analog mics. The old default input mapping of DMIC for non Bay Trail CR devices seems like a poor default as I'm not aware of any Intel SST + rt5651 using devices with a DMIC. All Cherry Trail devices using the bytcr_rt5651 machine driver seem to be modelled after BYT-CR devices, And the only non CR Bay Trail devices with a rt5651 codec I'm aware of are the Minnow boards for which we already have board specific quirks. So it seems better to me to use the BYT-CR defaults everywhere. This e.g. makes the Chuwi Hi8 Pro (CWI513) work ootb without needing a quirk. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit f9877eb598d5bd2e6d9b4dc28068b66c464d1e5f Author: Hans de Goede Date: Sun Mar 4 15:36:08 2018 +0100 ASoC: Intel: bytcr_rt5651: Add quirk for the VIOS LTH17 laptop Add a quirk setting up jack-detect and input routing for the VIOS LTH17 laptop. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 8a880a2014e3ab50e66252335bd71d61b0487a30 Author: Hans de Goede Date: Sun Mar 4 15:36:07 2018 +0100 ASoC: Intel: bytcr_rt5651: Add support for Bay Trail CR / SSP0 using boards Despite its name being prefixed with bytcr, before this commit the bytcr_rt5651 machine driver could not work with Bay Trail CR boards, as those only have SSP0 and it only supported SSP0-AIF1 setups. This commit adds support for this, autodetecting AIF1 vs AIF2 based on BIOS tables. While at it also add support for SSP2-AIF2 setups, as that requires only minimal extra code on top of the code adding SSP0-AIF1 / SSP0-AIF2 support. Note this code is all copy-pasted from bytcr_rt5640.c. I've looked into merging the 2 machine drivers into 1 to avoid copy-pasting, but there are enough subtile differences to make this hard *and* with all the quirks the machine driver already is full with if (variant-foo) then ... else ... constructs adding more of these is going to make the code unreadable. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 217 +++++++++++++++++++++++++++++++--- 1 file changed, 201 insertions(+), 16 deletions(-) commit f026e06317804f305d4665d266191e07e2bf6394 Author: Hans de Goede Date: Sun Mar 4 15:36:06 2018 +0100 ASoC: Intel: bytcr_rt5651: Add new IN2_HS_IN3 input map and a quirk using it Add a new IN2_HS_IN3 input map and add a quirk for the input mapping and jack-detect source for the Chuwi Vi8 Plus tablet, which uses this new map. Note the Chuwi Vi8 Plus lists an extra GPIO in its codecs ACPI resources which needs to be driven high to enable the external speaker amplifier, this is not supported yet and will be fixed in a future patch. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 7f2e2299cf169d8c517fbe2bcff3ca7bc8fa5f5c Author: Hans de Goede Date: Sun Mar 4 15:36:05 2018 +0100 ASoC: Intel: bytcr_rt5651: Rename IN3_MAP to IN1_HS_IN3_MAP All the mappings are named for where the internal mic is routed and in that sense the newly added in3_map really is the same as in1_map, what makes it different is that it maps the headset mic at IN3 rather then at IN2. Rename in3_map to in1_hs_in3_map to better reflect what it actually does. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 3fdae070e6fcd9f9ca0745fd69d40085625a45f5 Author: Hans de Goede Date: Sun Mar 4 15:36:04 2018 +0100 ASoC: Intel: bytcr_rt5651: Drop snd_soc_dai_set_bclk_ratio() call Drop the snd_soc_dai_set_bclk_ratio() call, the rt5651 dai does not have a set_bclk_ratio() op, so it is a nop (and returns -EINVAL). Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 2 -- 1 file changed, 2 deletions(-) commit aeec6cc0821573920d559f7d6297ea5dd3fbbd17 Author: Hans de Goede Date: Sun Mar 4 15:36:03 2018 +0100 ASoC: Intel: bytcr_rt5651: Configure PLL1 before using it When platform_clock_control() first selects PLL1 as sysclk the PLL_CTRL registers have not been setup yet and we effectively have an invalid clock configuration until byt_rt5651_aif1_hw_params() gets called. Add a new byt_rt5651_prepare_and_enable_pll1() helper and use that from both platform_clock_control() and byt_rt5651_aif1_hw_params() to fix this. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 73 +++++++++++++++++------------------ 1 file changed, 35 insertions(+), 38 deletions(-) commit 8ffaa6a136e6f30e053e78fb9742c7748bef8576 Author: Hans de Goede Date: Sun Mar 4 15:36:02 2018 +0100 ASoC: Intel: bytcr_rt5651: Add quirk micbias OVCD configuration Add support for setting the micbias OVCD limits device-properties through quirks. And set the limits for this to 2000uA with a scale-factor of 0.75 for the KIANO SlimNote 14.2 device, which is the only device on which jack-detection is currently enabled. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) commit aed859a2c7ac8c44ba9b3a6f82b5f08da8a0a975 Author: Hans de Goede Date: Sun Mar 4 15:36:01 2018 +0100 ASoC: Intel: bytcr_rt5651: Only create jack if we have a jack-detect source Only create the jack if we have a valid jack-detect source and properly check the snd_soc_component_set_jack() return value. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit c2f26938d2a456dcf429385617e58cfd510a64a8 Author: Hans de Goede Date: Sun Mar 4 15:36:00 2018 +0100 ASoC: Intel: bytcr_rt5651: Actually honor the DMIC_EN quirk if specified Before this commit it was possible to set the DMIC_EN quirk in the machine driver, but it would never be passed to the codec driver so it was a nop. This commit adds code to actually pass the quirk to the codec driver. Since the DMIC_EN quirk was ignored before, this commit removes it from the default quirk settings, to avoid this causing an unexpected functional change. If we really want the DMIC_EN behavior anywhere it should be specifically enabled by follow up commits. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 46058aeb6b10ab6620caa25984a3a4ee37d0fd56 Author: Hans de Goede Date: Sun Mar 4 15:35:59 2018 +0100 ASoC: Intel: bytcr_rt5651: Pass jack-src info via device-properties This commit add support for a new BYT_RT5651_JDSRC quirk, sets this quirk for the KIANO SlimNote 14.2 laptop and uses the new "realtek, jack-detect-source" property to pass this info to the codec driver. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 54 ++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 4 deletions(-) commit c9ae06deccac6097dd9260dce6762c748340d2a5 Merge: e39cacc ee68096 Author: Mark Brown Date: Wed Mar 7 14:16:00 2018 +0000 Merge branch 'topic/rt5651' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel commit 09f7fcfa727966361d576fcfdb9c5ad77ddf5092 Author: Fabio Estevam Date: Wed Mar 7 00:24:13 2018 -0300 ASoC: wm8524: Remove unit address WM8524 does not use I2C nor SPI, hence no 'reg' property is used, so remove the unit address from the bindings example to conform. This avoids users getting dtc warnings when they copy the binding example to a real dts file. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/wm8524.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea66536ab2cac7ba1553a677b8114f1b120cd9f2 Author: Takashi Iwai Date: Wed Mar 7 11:54:41 2018 +0100 perf tools: Correct title markers for asciidoctor I've tested to process the perf man pages with asciidoctor that is picker than asciidoc, and it revealed minor syntax errors in some documents. Namely, the title markers aren't aligned with the previous line, hence asciidoctor didn't recognize as titles. This patch corrects these markers to be processed properly. Signed-off-by: Takashi Iwai Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180307105441.28512-1-tiwai@suse.de Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-data.txt | 2 +- tools/perf/Documentation/perf-ftrace.txt | 2 +- tools/perf/Documentation/perf-kallsyms.txt | 2 +- tools/perf/Documentation/perf-sched.txt | 2 +- tools/perf/Documentation/perf-script-perl.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 0b8129278fdc30fa3281f435db419ab2d610085b Merge: 53ad4a7 048a466 Author: Robert Jarzmik Date: Wed Mar 7 14:22:29 2018 +0100 Merge tag 'nand/pxa3xx-removal' of git://git.infradead.org/linux-mtd into pxa/for-next Remove the pxa3xx_nand driver (replaced by marvell_nand). commit 4c4548437c5722effcaf5b2dea85abd321935627 Author: Adrian Hunter Date: Tue Mar 6 11:13:16 2018 +0200 perf auxtrace: Make auxtrace_queues__add_buffer() return buffer_ptr In preparation for supporting AUX area sampling buffers, auxtrace_queues__add_buffer() needs to be more generic. To that end, make it return buffer_ptr instead of the caller. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1520327598-1317-6-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/auxtrace.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit a356a59799d376dd8e4839f29d32f4c6a5582e6d Author: Adrian Hunter Date: Tue Mar 6 11:13:15 2018 +0200 perf auxtrace: Rename some buffer-queuing functions Rename some buffer-queuing functions in preparation for supporting AUX area sampling buffers. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1520327598-1317-5-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/auxtrace.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit b818ec613b42d679604215c188a12cf43164cab0 Author: Adrian Hunter Date: Tue Mar 6 11:13:14 2018 +0200 perf auxtrace: Add missing parameters from kernel-doc comments Add missing parameters from kernel-doc comments. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1520327598-1317-4-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/auxtrace.h | 2 ++ 1 file changed, 2 insertions(+) commit 9ea42ba4411ac502e83baa9c61bb037d0a7355a0 Author: Arnaldo Carvalho de Melo Date: Tue Mar 6 16:30:51 2018 -0300 perf trace: Support setting cgroups as targets One can set a cgroup as a default cgroup to be used by all events or set cgroups with the 'perf stat' and 'perf record' behaviour, i.e. '-G A' will be the cgroup for events defined so far in the command line. Here in my main machine, with a kvm instance running a rhel6 guinea pig I have: # ls -la /sys/fs/cgroup/perf_event/ | grep drw drwxr-xr-x. 14 root root 360 Mar 6 12:04 .. drwxr-xr-x. 3 root root 0 Mar 6 15:05 machine.slice # So I can go ahead and use that cgroup hierarchy, say lets see what syscalls are being emitted by threads in that 'machine.slice' hierarchy that are taking more than 100ms: # perf trace --duration 100 -G machine.slice 0.188 (249.850 ms): CPU 0/KVM/23744 ioctl(fd: 16, cmd: KVM_RUN) = 0 250.274 (249.743 ms): CPU 0/KVM/23744 ioctl(fd: 16, cmd: KVM_RUN) = 0 500.224 (249.755 ms): CPU 0/KVM/23744 ioctl(fd: 16, cmd: KVM_RUN) = 0 750.097 (249.934 ms): CPU 0/KVM/23744 ioctl(fd: 16, cmd: KVM_RUN) = 0 1000.244 (249.780 ms): CPU 0/KVM/23744 ioctl(fd: 16, cmd: KVM_RUN) = 0 1250.197 (249.796 ms): CPU 0/KVM/23744 ioctl(fd: 16, cmd: KVM_RUN) = 0 1500.124 (249.859 ms): CPU 0/KVM/23744 ioctl(fd: 16, cmd: KVM_RUN) = 0 1750.076 (172.900 ms): CPU 0/KVM/23744 ioctl(fd: 16, cmd: KVM_RUN) = 0 902.570 (1021.116 ms): qemu-system-x8/23667 ppoll(ufds: 0x558151e03180, nfds: 74, tsp: 0x7ffc00cd0900, sigsetsize: 8) = 1 1923.825 (305.133 ms): qemu-system-x8/23667 ppoll(ufds: 0x558151e03180, nfds: 74, tsp: 0x7ffc00cd0900, sigsetsize: 8) = 1 2000.172 (229.002 ms): CPU 0/KVM/23744 ioctl(fd: 16, cmd: KVM_RUN) = 0 ^C # If we look inside that cgroup hierarchy we get: # ls -la /sys/fs/cgroup/perf_event/machine.slice/ | grep drw drwxr-xr-x. 3 root root 0 Mar 6 15:05 . drwxr-xr-x. 2 root root 0 Mar 6 16:16 machine-qemu\x2d2\x2drhel6.sandy.scope # There is just one, but lets say there were more and we would want to see 5 seconds worth of syscall summary for the threads in that cgroup: # perf trace --summary -G machine.slice/machine-qemu\\x2d2\\x2drhel6.sandy.scope/ -a sleep 5 Summary of events: qemu-system-x86 (23667), 143858 events, 24.2% syscall calls total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- --------- --------- --------- --------- ------ ppoll 28492 4348.631 0.000 0.153 11.616 1.05% futex 19661 140.801 0.001 0.007 2.993 3.20% read 18440 68.084 0.001 0.004 1.653 4.33% ioctl 5387 24.768 0.002 0.005 0.134 1.62% CPU 0/KVM (23744), 449455 events, 75.8% syscall calls total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- --------- --------- --------- --------- ------ ioctl 148364 3401.812 0.000 0.023 11.801 1.15% futex 36131 404.127 0.001 0.011 7.377 2.63% writev 29452 339.688 0.003 0.012 1.740 1.36% write 11315 45.992 0.001 0.004 0.105 1.10% # See the documentation about how to set more than one cgroup for different events in the same command line. Cc: Adrian Hunter Cc: Alexander Shishkin Cc: David Ahern Cc: Hendrik Brueckner Cc: Jiri Olsa Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Thomas Richter Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-t126jh4occqvu0xdqlcjygex@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-trace.txt | 25 +++++++++++++++++ tools/perf/builtin-trace.c | 50 +++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) commit 3b5692864da3a8dec95d8c757147f436d19f8ff7 Author: Arnaldo Carvalho de Melo Date: Tue Mar 6 15:53:22 2018 -0300 perf cgroup: Make the cgroup name be const char * The usual thing is for a constructor to allocate space for its members, not to require that the caller pass a pre-allocated 'name' and then, at its destructor, to free something not allocated by it. Fix it by making cgroup__new() to receive a const char pointer, then allocate cgroup->name that then can continue to be freed at cgroup__delete(), balancing the alloc/free operations inside the cgroup struct methods. This eases calling evlist__findnew_cgroup() from the custom 'perf trace' cgroup parser, that will only call parse_cgroups() when the '-G cgroup' is passed on the command line after '-e event' entries, when it'll behave just like 'perf stat' and 'perf record', i.e. the previous parse_cgroup() users that mandate that -G only can come after a -e. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-4leugnuyqi10t98990o3xi1t@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cgroup.c | 24 ++++++++++++++---------- tools/perf/util/cgroup.h | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) commit 483322dda03a7ad807e82f9c25fac315a4eee1c5 Author: Arnaldo Carvalho de Melo Date: Tue Mar 6 15:48:10 2018 -0300 perf cgroup: Add evlist__add_default_cgroup() So that tools like 'perf trace' can allow the user to set a cgroup to be used for all the evsels still without a crgroup setup by parse_cgroups(), such as the one to use for the syscalls, vfs_getname and other events involved in strace like syscall tracing. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-zf9jjsbj661r3lk6qb7g8j70@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cgroup.c | 14 ++++++++++++++ tools/perf/util/cgroup.h | 2 ++ 2 files changed, 16 insertions(+) commit 69239ec81d596c57e0cf2d2f26cfe92e8cbd0929 Author: Arnaldo Carvalho de Melo Date: Tue Mar 6 15:27:08 2018 -0300 perf cgroup: Add evlist__findnew_cgroup() Similar to machine__findnew_thread(), etc, i.e. try to find, get a refcount if found and return it, otherwise return a new cgroup object. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-im1omevlihhyneiic4nl3g24@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cgroup.c | 17 ++++++++++------- tools/perf/util/cgroup.h | 4 ++++ 2 files changed, 14 insertions(+), 7 deletions(-) commit 4b5ea3bd674f707180b0e8c4f514d30e49f293b3 Author: Adrian Hunter Date: Tue Mar 6 11:13:12 2018 +0200 perf record: Combine some auxtrace initialization into a single function In preparation for adding AUX area sampling support, combine some auxtrace initialization into a single function. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1520327598-1317-2-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit 99a3c3a91382a7e5e841a98467a8409b47b540f0 Author: Changbin Du Date: Tue Mar 6 11:37:37 2018 +0800 perf sched map: Re-annotate shortname if thread comm changed This is to show the real name of thread that created via fork-exec. See below example for shortname *A0*. $ sudo ./perf sched map *A0 80393.050639 secs A0 => perf:22368 *. A0 80393.050748 secs . => swapper:0 . *. 80393.050887 secs *B0 . . 80393.052735 secs B0 => rcu_sched:8 *. . . 80393.052743 secs . *C0 . 80393.056264 secs C0 => kworker/2:1H:287 . *A0 . 80393.056270 secs . *D0 . 80393.056769 secs D0 => ksoftirqd/2:22 - . *A0 . 80393.056804 secs + . *A0 . 80393.056804 secs A0 => pi:22368 . *. . 80393.056854 secs *B0 . . 80393.060727 secs ... Signed-off-by: Changbin Du Acked-by: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1520307457-23668-3-git-send-email-changbin.du@intel.com [ Optimally pack struct thread_runtime when adding the new bool member ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-sched.c | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) commit 8640da9f4fea88c8fbb44ff63fde4000203cb7d1 Author: Changbin Du Date: Tue Mar 6 11:37:36 2018 +0800 perf sched: Move thread::shortname to thread_runtime The thread::shortname only used by sched command, so move it to sched private structure. Signed-off-by: Changbin Du Acked-by: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1520307457-23668-2-git-send-email-changbin.du@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-sched.c | 95 +++++++++++++++++++++++++++------------------- tools/perf/util/thread.h | 1 - 2 files changed, 55 insertions(+), 41 deletions(-) commit 923a0fb332f8ee49b063df07129b2686f78ec9c3 Author: Arnaldo Carvalho de Melo Date: Tue Mar 6 10:33:04 2018 -0300 perf cgroup: Introduce cgroup__new() out of open coded equivalent To follow the namespacing convention in tools/perf. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-jaalyl6bkvvji4r5u8wqw4n4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cgroup.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit b80271f76ac5fe498f8fb701b2745dcd841627cc Author: Arnaldo Carvalho de Melo Date: Tue Mar 6 10:27:00 2018 -0300 perf cgroup: Introduce find_cgroup() method To break down complexity in add_cgroup(). Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-5yqshcf5hm837n7c86u7lhjf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cgroup.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit fc9ffb9cf085c78f49d4d1a602d723504c0d9c75 Author: Arnaldo Carvalho de Melo Date: Tue Mar 6 10:18:40 2018 -0300 perf cgroup: Introduce cgroup__get() The refcount operation counterpart to cgroup__put(), use it when reusing a cgroup. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-14ynvrl7y2cz8gyuy5q5v41g@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cgroup.c | 16 ++++++++++------ tools/perf/util/cgroup.h | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) commit a53b646030ee6f65accdc49e772823b8134a37f6 Author: Arnaldo Carvalho de Melo Date: Tue Mar 6 10:10:45 2018 -0300 perf cgroup: Rename close_cgroup() to cgroup__put() It is not really closing the cgroup, but instead dropping a reference count and if it hits zero, then calling delete, which will, among other cleanup shores, close the cgroup fd. So it is really dropping a reference to that cgroup, and the method name for that is "put", so rename close_cgroup() to cgroup__put() to follow this naming convention. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-sccxpnd7bgwc1llgokt6fcey@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cgroup.c | 5 ++--- tools/perf/util/cgroup.h | 3 ++- tools/perf/util/evsel.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 9450d0d46c895cae99e922145aca20bd30533bc6 Author: Arnaldo Carvalho de Melo Date: Tue Mar 6 10:08:10 2018 -0300 perf cgroup: Introduce cgroup__delete() Just to make this code look more like other places in tools/perf. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-j3j72vvn2d5j7tenlghdy195@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cgroup.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 3ca32f69592be4d667c701763335fa496a0ede1d Author: Arnaldo Carvalho de Melo Date: Tue Mar 6 09:51:48 2018 -0300 perf cgroup: Rename 'struct cgroup_sel' to 'struct cgroup' That name isn't used, is shorter, lets switch to it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-e51yphwgvepd1y4f5fjptmjq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cgroup.c | 6 +++--- tools/perf/util/cgroup.h | 5 +++-- tools/perf/util/evsel.h | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) commit a6adc9bdf59c77ea4efb844c27f25361f0399586 Author: Arnaldo Carvalho de Melo Date: Tue Mar 6 09:31:53 2018 -0300 perf cgroup: Remove misplaced __maybe_unused The 'opt' parameter in parse_cgroups() _is_ used. The original patch used '__used' that was even more confusing :-) Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: Wang Nan Fixes: 023695d96ee0 ("perf tool: Add cgroup support") Link: https://lkml.kernel.org/n/tip-4jo2puz0empkoou6bbq460tl@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53ad4a78f6671f66938d293e21bb6b2ec4b8e828 Author: Andy Shevchenko Date: Mon Jan 29 19:37:08 2018 +0200 ARM: pxa/raumfeld: use PROPERTY_ENTRY_U32() directly Instead of using PROPERTY_ENTRY_INTEGER() with explicitly supplied type, use PROPERTY_ENTRY_U32() dedicated macro. It will help modify internals of built-in device properties API. No functional change intended. Acked-by: Robert Jarzmik Signed-off-by: Andy Shevchenko Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/raumfeld.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7a5d9a913f91775805acae18bd6bd96e36f78a48 Author: Igor Grinberg Date: Tue Dec 26 15:32:53 2017 +0200 ARM: pxa: ulpi: fix ulpi timeout and slowpath warn Both cm-x300 and pxa3xx-ulpi use the plain clk_{en,dis}able() API. With the new clocking framework this results in warnings of type: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:714 clk_core_enable+0x90/0x9c Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc5-cm-x300+ #15 Hardware name: CM-X300 module [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (__warn+0xd8/0x100) [] (__warn) from [] (warn_slowpath_null+0x3c/0x48) [] (warn_slowpath_null) from [] (clk_core_enable+0x90/0x9c) [] (clk_core_enable) from [] (clk_core_enable_lock+0x18/0x2c) [] (clk_core_enable_lock) from [] (cm_x300_u2d_init+0x4c/0xe8) [] (cm_x300_u2d_init) from [] (pxa3xx_u2d_probe+0xe0/0x244) [] (pxa3xx_u2d_probe) from [] (platform_drv_probe+0x38/0x88) ... ------------[ cut here ]------------ and alike... And finally, it results in: ------------[ cut here ]------------ pxa310_ulpi_poll: ULPI access timed out! OTG transceiver init failed ------------[ cut here ]------------ It might be that disabling the warning in kernel config would also do the job, but IMO a better solution would be to switch to clk_prepare_enable() and clk_disable_unprepare() APIs. Signed-off-by: Igor Grinberg Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/cm-x300.c | 4 ++-- arch/arm/mach-pxa/pxa3xx-ulpi.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 69a90f49372b5932852cb2f4f48b6effcf66b042 Author: Igor Grinberg Date: Tue Dec 26 14:45:36 2017 +0200 ARM: pxa: cm-x300: remove inline directive cm_x300_u2d_init() function is only used through its function pointer that is passed through platform_data structure to the driver. Therefore it can never be inlined. Remove the inline directive. Signed-off-by: Igor Grinberg Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/cm-x300.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d07f1911e545e77bd57b30590742ad9517ab323 Author: Igor Grinberg Date: Tue Dec 26 14:33:51 2017 +0200 ARM: pxa: fix static checker warning in pxa3xx-ulpi Static checker reports the following warning: arch/arm/mach-pxa/pxa3xx-ulpi.c:336 pxa3xx_u2d_probe() warn: did you mean to pass the address of 'u2d' Fix it by passing the correct pointer. Reported-by: Dan Carpenter Signed-off-by: Igor Grinberg Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/pxa3xx-ulpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a89a70a8b50d67263b83274a50d1c77deded03ee Author: Daniele Ceraolo Spurio Date: Fri Mar 2 18:15:01 2018 +0200 drm/i915/icl: Gen11 forcewake support The main difference with previous GENs is that starting from Gen11 each VCS and VECS engine has its own power well, which only exist if the related engine exists in the HW. The fallback forcewake request workaround is only needed on gen9 according to the HSDES WA entry (1604254524), so we can go back to using the simpler fw_domains_get/put functions. BSpec: 18331 v2: fix fwtable, use array to test shadow tables, create new accessors to avoid check on every access (Tvrtko) v3 (from Paulo): Rebase. v4: - Range 09400-097FF should be FORCEWAKE_ALL (Daniele) - Use the BIT macro for forcewake domains (Daniele) - Add a comment about the range ordering (Oscar) - Updated commit message (Oscar) v5: Rebased v6: Use I915_MAX_VCS/VECS (Michal) v7: translate FORCEWAKE_ALL to available domains v8: rebase, add clarification on fallback ack in commit message. v9: fix rebase issue, change check in fw_domains_init from IS_GEN11 to GEN >= 11 v10: Generate is_genX_shadowed with a macro (Daniele) Include gen11_fw_ranges in the selftest (Michel) v11: Simplify FORCEWAKE_ALL, new line between NEEDS_FORCEWAKEs (Tvrtko) Cc: Michal Wajdeczko Cc: Tvrtko Ursulin Cc: Paulo Zanoni Acked-by: Michel Thierry Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Oscar Mateo Signed-off-by: Michel Thierry Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180302161501.28594-6-mika.kuoppala@linux.intel.com Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_reg.h | 4 + drivers/gpu/drm/i915/intel_uncore.c | 157 ++++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_uncore.h | 23 +++- drivers/gpu/drm/i915/selftests/intel_uncore.c | 31 +++-- 4 files changed, 189 insertions(+), 26 deletions(-) commit fd034c77b52703c19b7b60b1bf4eb129ebfffb31 Author: Michel Thierry Date: Fri Mar 2 18:15:00 2018 +0200 drm/i915/icl: Add Indirect Context Offset for Gen11 v2: rebased to intel_lr_indirect_ctx_offset v3: rebase, move define to intel_lrc_reg.h BSpec: 11740 Signed-off-by: Michel Thierry Signed-off-by: Rodrigo Vivi Signed-off-by: Michal Wajdeczko Reviewed-by: Oscar Mateo Link: https://patchwork.freedesktop.org/patch/msgid/20180302161501.28594-5-mika.kuoppala@linux.intel.com Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/intel_lrc.c | 4 ++++ drivers/gpu/drm/i915/intel_lrc_reg.h | 1 + 2 files changed, 5 insertions(+) commit 05f0addd9b108d4dfa6853122f453a445f241c2b Author: Thomas Daniel Date: Fri Mar 2 18:14:59 2018 +0200 drm/i915/icl: Enhanced execution list support Enhanced Execlists is an upgraded version of execlists which supports up to 8 ports. The lrcs to be submitted are written to a submit queue (the ExecLists Submission Queue - ELSQ), which is then loaded on the HW. When writing to the ELSP register, the lrcs are written cyclically in the queue from position 0 to position 7. Alternatively, it is possible to write directly in the individual positions of the queue using the ELSQC registers. To be able to re-use all the existing code we're using the latter method and we're currently limiting ourself to only using 2 elements. v2: Rebase. v3: Switch from !IS_GEN11 to GEN < 11 (Daniele Ceraolo Spurio). v4: Use the elsq registers instead of elsp. (Daniele Ceraolo Spurio) v5: Reword commit, rename regs to be closer to specs, turn off preemption (Daniele), reuse engine->execlists.elsp (Chris) v6: use has_logical_ring_elsq to differentiate the new paths v7: add preemption support, rename els to submit_reg (Chris) v8: save the ctrl register inside the execlists struct, drop CSB handling updates (superseded by preempt_complete_status) (Chris) v9: s/drm_i915_gem_request/i915_request (Mika) v10: resolved conflict in inject_preempt_context (Mika) Cc: Chris Wilson Cc: Mika Kuoppala Signed-off-by: Thomas Daniel Signed-off-by: Rodrigo Vivi Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180302161501.28594-4-mika.kuoppala@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c | 3 +- drivers/gpu/drm/i915/intel_device_info.h | 1 + drivers/gpu/drm/i915/intel_lrc.c | 58 ++++++++++++++++++++++++-------- drivers/gpu/drm/i915/intel_lrc.h | 3 ++ drivers/gpu/drm/i915/intel_ringbuffer.h | 12 +++++-- 6 files changed, 62 insertions(+), 17 deletions(-) commit ac52da6af826d05f02c03fcde4a0651d070783b2 Author: Daniele Ceraolo Spurio Date: Fri Mar 2 18:14:58 2018 +0200 drm/i915/icl: new context descriptor support Starting from Gen11 the context descriptor format has been updated in the HW. The hw_id field has been considerably reduced in size and engine class and instance fields have been added. There is a slight name clashing issue because the field that we call hw_id is actually called SW Context ID in the specs for Gen11+. With the current size of the hw_id field we can have a maximum of 2k contexts at any time, but we could use the sw_counter field (which is sw defined) to increase that because the HW requirement is that engine_id + sw id + sw_counter is a unique number. GuC uses a similar method to support more contexts but does its tracking at lrc level. To avoid doing an implementation that will need to be reworked once GuC support lands, defer it for now and mark it as TODO. v2: rebased, add documentation, fix GEN11_ENGINE_INSTANCE_SHIFT v3: rebased, bring back lost code from i915_gem_context.c v4: make TODO comment more generic v5: be consistent with bit ordering, add extra checks (Chris) Cc: Oscar Mateo Cc: Chris Wilson Cc: Mika Kuoppala Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Oscar Mateo Link: https://patchwork.freedesktop.org/patch/msgid/20180302161501.28594-3-mika.kuoppala@linux.intel.com Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem_context.c | 11 ++++++++-- drivers/gpu/drm/i915/i915_reg.h | 6 ++++++ drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++ drivers/gpu/drm/i915/intel_lrc.c | 36 +++++++++++++++++++++++++++++++-- 5 files changed, 53 insertions(+), 4 deletions(-) commit 5f79e7c6754249dd71f3124c9c7604aab2880c20 Author: Oscar Mateo Date: Fri Mar 2 18:14:57 2018 +0200 drm/i915/icl: Correctly initialize the Gen11 engines Gen11 has up to 4 VCS and up to 2 VECS engines, this patch adds mmio base definitions for all of them. Bspec: 20944 Bspec: 7021 v2: Set the correct mmio_base in intel_engines_init_mmio; updating the base mmio values any later would cause incorrect reads in i915_gem_sanitize (Michel). Cc: Tvrtko Ursulin Cc: Ceraolo Spurio, Daniele Signed-off-by: Oscar Mateo Signed-off-by: Michel Thierry Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20180302161501.28594-2-mika.kuoppala@linux.intel.com Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_reg.h | 6 +++++ drivers/gpu/drm/i915/intel_engine_cs.c | 44 +++++++++++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) commit 4e9a8bef20c973f62358fbd888a38f1bd1669200 Author: Chris Wilson Date: Mon Mar 5 10:41:05 2018 +0000 drm/i915: Assert that the request is indeed complete when signaled from irq After we call dma_fence_signal(), confirm that the request was indeed complete. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180305104105.8296-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_irq.c | 1 + 1 file changed, 1 insertion(+) commit e39cacc1b7de2a6d72ce49043c9cfd7dd129135a Author: Hans de Goede Date: Sun Mar 4 15:35:58 2018 +0100 ASoC: Intel: bytcr_rt5651: Not being able to find the codec ACPI-dev is an error If we cannot find the codec ACPI-dev, then the snd-soc-core will not be able to find the codec either and snd_soc_register_card() will just keep exiting with -EPROBE_DEFER, filling the log with errors each time the probe gets retried. Instead simply log an error from the machine driver and exit with -ENODEV. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit ee68096826fa16bca2f7bb555b3e0cbbe798d330 Author: Hans de Goede Date: Sun Mar 4 15:35:57 2018 +0100 ASoC: rt5651: Rewrite jack-type detection We get the insertion event before the jack is fully inserted at which point the second ring on a TRRS connector may short the 2nd ring and sleeve contacts. Testing has shown that this short-circuit may happen as late as 500ms after the insertion event, but it never lasts longer then 300ms. This commit changes the detection algorithm to require 5 identical OVCD values in a row at 100 ms intervals to fix the jack-type sometimes getting mis-detected. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 110 +++++++++++++++++++++++++++++----------------- sound/soc/codecs/rt5651.h | 2 +- 2 files changed, 70 insertions(+), 42 deletions(-) commit 0fe9474598890b4bd8a7228c9b1872ed7fe3c2c5 Author: Hans de Goede Date: Sun Mar 4 15:35:56 2018 +0100 ASoC: rt5651: Add rt5651_jack_inserted() helper Add rt5651_jack_inserted() helper to get the jack-detect switch status, This is a preparation patch for rewriting the jack type-detection to make it more reliable. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 45 ++++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 17 deletions(-) commit 4b4a373c0212e084045530e47071374a87a3761e Author: Hans de Goede Date: Sun Mar 4 15:35:55 2018 +0100 ASoC: rt5651: Enable Platform Clock during jack-type detect When using RCCLK instead of MCLK / PLL1 the OVCD status often gets stuck at its last value, which breaks jack-type detection. This commit fixes this by force-enabling the platform clock when doing jack-type detection. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 3 +++ 1 file changed, 3 insertions(+) commit 1b1ad83539a701a6bdcb25dc9160386e71f6016e Author: Hans de Goede Date: Sun Mar 4 15:35:54 2018 +0100 ASoC: rt5651: Enable sticky mode for OVCD When the mic-gnd contacts are short-circuited by a headphones plug, the hardware periodically retries if it can apply the bias-current leading to the OVCD status flip-flopping 1-0-1 with it being 0 about 10% of the time. This commit enables the sticky bit for the OVCD status to deal with this. This commit also introduces 2 helper functions to deal with the OVCD status bit, this may seem a bit overkill now, but these will also be used in future patches. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) commit e6eb0207597afa1cdd4914a17a727b101cc859ff Author: Hans de Goede Date: Sun Mar 4 15:35:53 2018 +0100 ASoC: rt5651: Allow specifying the OVCD scale-factor through a device-property OVer-Current-Detection (OVCD) for the micbias current is used to detect if an inserted jack is a headset or headphones (mic shorted to ground). The threshold for at which current the OVCD triggers on the rt5651 is not only controlled by setting the absolute current limit, but also by setting a scale factor which applies to the limit. Testing has shown that we need to set both (depending on the board). This commit adds support for the sofar unused OVCD scale-factor register and adds support for specifying non-default values for it through the "realtek,over-current-scale-factor" device-property. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown include/sound/rt5651.h | 11 +++++++++++ sound/soc/codecs/rt5651.c | 19 +++++++++++++++++++ sound/soc/codecs/rt5651.h | 11 +++++++++++ 3 files changed, 41 insertions(+) commit 583a9debd71e21a317b1fc7b293c22c49b33d9e4 Author: Hans de Goede Date: Sun Mar 4 15:35:52 2018 +0100 ASoC: rt5651: Allow specifying over-current threshold through a device-property OVer-Current-Detection (OVCD) for the micbias current is used to detect if an inserted jack is a headset or headphones (mic shorted to ground). Some boards may need different values for the OVCD current threshold because of a resistor on the board in serial with or parallel to the jack mic contact. This commit adds support for configuring the OCVD current threshold through the "realtek,over-current-threshold-microamp" device-property. Note this commit changes the default value from 600uA to 2000uA, because testing has shown 600uA to be a poor default. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 22 +++++++++++++++++++++- sound/soc/codecs/rt5651.h | 1 + 2 files changed, 22 insertions(+), 1 deletion(-) commit f0c2a330d99ef81519dc809d8b6a7dafe39b0933 Author: Hans de Goede Date: Sun Mar 4 15:35:51 2018 +0100 ASoC: rt5651: Configure jack-detect source through a device-property Configure the jack-detect source through a device-property which can be set by code outside of the codec driver. Rather then putting platform specific DMI quirks inside the generic codec driver. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown include/sound/rt5651.h | 4 ++++ sound/soc/codecs/rt5651.c | 33 +++++++-------------------------- 2 files changed, 11 insertions(+), 26 deletions(-) commit 9db7d4b32cbccb5807e2e1f22e2fafc80034ee6d Author: Hans de Goede Date: Sun Mar 4 15:35:50 2018 +0100 ASoC: rt5651: Add devicetree-bindings for jack-detect Add new properties to the rt5651 dt-bindings for configuring the jack-detect source and over-current detect settings. Cc: devicetree@vger.kernel.org Signed-off-by: Hans de Goede Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rt5651.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 1cf5b50426136fe54380a7dd1ca7eb49973cae5a Author: Hans de Goede Date: Sun Mar 4 15:35:49 2018 +0100 ASoC: rt5651: Make rt5651_apply_properties() private The idea behind exporting rt5651_apply_properties(), was for it to be used on platforms where the platform code may need to add device-properties, rather then relying only on properties set by the firmware. The platform code could then call rt5651_apply_properties() after adding properties to make sure that the codec driver was aware of the new properties. But this is not necessary, as long as we do all property parsing from the codec component-driver's probe function (or later) then the machine driver can attach properties before calling snd_soc_register_card and calling rt5651_apply_properties() for ordering reasons is not necessary. This commit makes rt5651_apply_properties() private and adds 2 comments documenting that all property parsing must be done from the codec component-driver's probe function. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 14 ++++++++++++-- sound/soc/codecs/rt5651.h | 2 -- 2 files changed, 12 insertions(+), 4 deletions(-) commit 39ad07b7de82bff26118a69e680cda3d081392dc Author: Mauro Carvalho Chehab Date: Tue Dec 19 06:43:37 2017 -0500 media: s5c73m3-core: fix logic on a timeout condition As warned by smatch: drivers/media/i2c/s5c73m3/s5c73m3-core.c:268 s5c73m3_check_status() error: uninitialized symbol 'status'. if s5c73m3_check_status() is called too late, time_is_after_jiffies(end) will return 0, causing the while to abort before reading status. The current code will do the wrong thing here, as it will still check if status != value. The right fix here is to change the logic to ensure that it will always read the status. Suggested-by: Andrzej Hajda Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/s5c73m3/s5c73m3-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8239bac18a760249c800eb032acc3f66cba8df04 Author: Mauro Carvalho Chehab Date: Wed Mar 7 05:11:29 2018 -0500 media: cxd2880: remove unused vars drivers/media/dvb-frontends/cxd2880/cxd2880_top.c: In function ‘cxd2880_set_ber_per_period_t’: drivers/media/dvb-frontends/cxd2880/cxd2880_top.c:677:34: warning: variable ‘c’ set but not used [-Wunused-but-set-variable] struct dtv_frontend_properties *c; ^ drivers/media/dvb-frontends/cxd2880/cxd2880_top.c: In function ‘cxd2880_set_ber_per_period_t2’: drivers/media/dvb-frontends/cxd2880/cxd2880_top.c:790:34: warning: variable ‘c’ set but not used [-Wunused-but-set-variable] struct dtv_frontend_properties *c; ^ drivers/media/dvb-frontends/cxd2880/cxd2880_top.c: In function ‘cxd2880_get_frontend’: drivers/media/dvb-frontends/cxd2880/cxd2880_top.c:1799:23: warning: variable ‘priv’ set but not used [-Wunused-but-set-variable] struct cxd2880_priv *priv = NULL; ^~~~ Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2880/cxd2880_top.c | 7 ------- 1 file changed, 7 deletions(-) commit 9ca4897be5adef66b8fe384b4365ce385e83582f Author: Mauro Carvalho Chehab Date: Wed Mar 7 05:09:30 2018 -0500 media: cxd2880: don't return unitialized values drivers/media/dvb-frontends/cxd2880/cxd2880_devio_spi.c:59 cxd2880_io_spi_read_reg() error: uninitialized symbol 'ret'. drivers/media/dvb-frontends/cxd2880/cxd2880_devio_spi.c:111 cxd2880_io_spi_write_reg() error: uninitialized symbol 'ret'. drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd.c:2985 cxd2880_tnrdmd_set_cfg() error: uninitialized symbol 'ret'. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2880/cxd2880_devio_spi.c | 4 ++-- drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit e61591875b7b626085c079499ac1c4663bfe510e Author: Mauro Carvalho Chehab Date: Wed Mar 7 04:58:49 2018 -0500 media: cxd2880: Makefile: remove an include It is not needed anymore to include the dvb-core directory, as all the public headers that used to be there was moved to include/media. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2880/Makefile | 1 - 1 file changed, 1 deletion(-) commit 9dbaad428d692815f01cda36dc6ae8ae0a4e8bf4 Author: Yasunari Takiguchi Date: Thu Jan 18 03:59:42 2018 -0500 media: cxd2880: Add all Makefile, Kconfig files and Update MAINTAINERS file for the driver This is the Makefile, Kconfig files of driver and MAINTAINERS file update about the driver for the Sony CXD2880 DVB-T2/T tuner + demodulator. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki Nozawa Signed-off-by: Kota Yonezawa Signed-off-by: Toshihiko Matsumoto Signed-off-by: Satoshi Watanabe Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 9 +++++++++ drivers/media/dvb-frontends/Kconfig | 2 ++ drivers/media/dvb-frontends/Makefile | 1 + drivers/media/dvb-frontends/cxd2880/Kconfig | 8 ++++++++ drivers/media/dvb-frontends/cxd2880/Makefile | 19 +++++++++++++++++++ drivers/media/spi/Kconfig | 14 ++++++++++++++ drivers/media/spi/Makefile | 5 +++++ 7 files changed, 58 insertions(+) commit 7cbc3013f60dbc22955645443855c8f092d3c534 Author: Mauro Carvalho Chehab Date: Wed Mar 7 05:02:37 2018 -0500 media: cxd2880: Fix location of DVB headers Fix a trivial conflict, where the location of DVB headers got moved. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd.c | 2 +- drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt.c | 2 +- drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt2.c | 2 +- drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt2_mon.c | 2 +- drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt_mon.c | 2 +- drivers/media/dvb-frontends/cxd2880/cxd2880_top.c | 4 ++-- drivers/media/spi/cxd2880-spi.c | 6 +++--- 7 files changed, 10 insertions(+), 10 deletions(-) commit 415a13296a1a49639cabf9d2fe92267810caa47a Author: Gustavo A. R. Silva Date: Mon Mar 5 15:49:59 2018 -0600 xfrm_policy: use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55e13167c93896c7cac68d57c27733db6344d9cb Author: Yasunari Takiguchi Date: Thu Jan 18 03:57:01 2018 -0500 media: cxd2880: Add DVB-T2 monitor functions Provide monitor functions (DVB-T2) for the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki Nozawa Signed-off-by: Kota Yonezawa Signed-off-by: Toshihiko Matsumoto Signed-off-by: Satoshi Watanabe Signed-off-by: Mauro Carvalho Chehab .../cxd2880/cxd2880_tnrdmd_dvbt2_mon.c | 1878 ++++++++++++++++++++ .../cxd2880/cxd2880_tnrdmd_dvbt2_mon.h | 135 ++ 2 files changed, 2013 insertions(+) commit 9e049346f672bbbe14241e8ec12d4048b38b8f22 Author: Yasunari Takiguchi Date: Thu Jan 18 03:55:32 2018 -0500 media: cxd2880: Add DVB-T2 control functions for the driver Provide definitions, interfaces and functions needed for DVB-T2 of the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki Nozawa Signed-off-by: Kota Yonezawa Signed-off-by: Toshihiko Matsumoto Signed-off-by: Satoshi Watanabe Signed-off-by: Mauro Carvalho Chehab .../media/dvb-frontends/cxd2880/cxd2880_dvbt2.h | 385 +++++++ .../dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt2.c | 1217 ++++++++++++++++++++ .../dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt2.h | 65 ++ 3 files changed, 1667 insertions(+) commit cc438de9df2ce812da5c5b900f7262ea2938535d Author: Yasunari Takiguchi Date: Thu Jan 18 03:54:33 2018 -0500 media: cxd2880: Add DVB-T monitor functions Provide monitor functions (DVB-T) for the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki Nozawa Signed-off-by: Kota Yonezawa Signed-off-by: Toshihiko Matsumoto Signed-off-by: Satoshi Watanabe Signed-off-by: Mauro Carvalho Chehab .../cxd2880/cxd2880_tnrdmd_dvbt_mon.c | 775 +++++++++++++++++++++ .../cxd2880/cxd2880_tnrdmd_dvbt_mon.h | 77 ++ 2 files changed, 852 insertions(+) commit 90dc9aa75bbb2d0f8bb6178adf4de709e8463a3e Author: Yasunari Takiguchi Date: Thu Jan 18 03:53:23 2018 -0500 media: cxd2880: Add DVB-T control functions the driver Provide definitions, interfaces and functions needed for DVB-T of the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki Nozawa Signed-off-by: Kota Yonezawa Signed-off-by: Toshihiko Matsumoto Signed-off-by: Satoshi Watanabe Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2880/cxd2880_dvbt.h | 74 ++ .../dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt.c | 919 +++++++++++++++++++++ .../dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt.h | 45 + 3 files changed, 1038 insertions(+) commit 9593810cd42a6d620aa2950ea2d74f079dfa2f4e Author: Yasunari Takiguchi Date: Thu Jan 18 03:52:17 2018 -0500 media: cxd2880: Add top level of the driver This provides the main dvb frontend operation functions for the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki Nozawa Signed-off-by: Kota Yonezawa Signed-off-by: Toshihiko Matsumoto Signed-off-by: Satoshi Watanabe Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2880/cxd2880_top.c | 1954 +++++++++++++++++++++ 1 file changed, 1954 insertions(+) commit aff18712be87c0cfb735037741c0f26da287e10c Author: Yasunari Takiguchi Date: Thu Jan 18 03:51:10 2018 -0500 media: cxd2880: Add integration layer for the driver These functions monitor the driver and watch for task completion. This is part of the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki Nozawa Signed-off-by: Kota Yonezawa Signed-off-by: Toshihiko Matsumoto Signed-off-by: Satoshi Watanabe Signed-off-by: Mauro Carvalho Chehab .../media/dvb-frontends/cxd2880/cxd2880_integ.c | 72 ++++++++++++++++++++++ .../media/dvb-frontends/cxd2880/cxd2880_integ.h | 27 ++++++++ 2 files changed, 99 insertions(+) commit e5835488c26bec43eb3dea96279b92c573c6f968 Author: Yasunari Takiguchi Date: Thu Jan 18 03:50:20 2018 -0500 media: cxd2880: Add tuner part of the driver This part of the driver has the main routines to handle the tuner and demodulator functionality. The tnrdmd_mon.* files have monitor functions for the driver. This is part of the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki Nozawa Signed-off-by: Kota Yonezawa Signed-off-by: Toshihiko Matsumoto Signed-off-by: Satoshi Watanabe Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2880/cxd2880_dtv.h | 29 + .../media/dvb-frontends/cxd2880/cxd2880_tnrdmd.c | 3519 ++++++++++++++++++++ .../media/dvb-frontends/cxd2880/cxd2880_tnrdmd.h | 365 ++ .../cxd2880/cxd2880_tnrdmd_driver_version.h | 12 + .../dvb-frontends/cxd2880/cxd2880_tnrdmd_mon.c | 150 + .../dvb-frontends/cxd2880/cxd2880_tnrdmd_mon.h | 29 + 6 files changed, 4104 insertions(+) commit 4e67e6cb06cd9a43cfdd080308aeefec0dc14f2f Author: Yasunari Takiguchi Date: Thu Jan 18 03:48:58 2018 -0500 media: cxd2880: Add spi device IO routines Add functions for initializing, reading and writing to the SPI device for the Sony CXD2880 DVB-T2/T tuner + demodulator. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki Nozawa Signed-off-by: Kota Yonezawa Signed-off-by: Toshihiko Matsumoto Signed-off-by: Satoshi Watanabe Signed-off-by: Mauro Carvalho Chehab .../dvb-frontends/cxd2880/cxd2880_devio_spi.c | 129 +++++++++++++++++++++ .../dvb-frontends/cxd2880/cxd2880_devio_spi.h | 23 ++++ drivers/media/dvb-frontends/cxd2880/cxd2880_spi.h | 34 ++++++ .../dvb-frontends/cxd2880/cxd2880_spi_device.c | 113 ++++++++++++++++++ .../dvb-frontends/cxd2880/cxd2880_spi_device.h | 26 +++++ 5 files changed, 325 insertions(+) commit 1a3ef038d09e66489f95c5cd67d815670f9cabdc Author: Yasunari Takiguchi Date: Thu Jan 18 03:47:38 2018 -0500 media: cxd2880: Add common files for the driver These are common files for the driver for the Sony CXD2880 DVB-T2/T tuner + demodulator. These contains helper functions for the driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki Nozawa Signed-off-by: Kota Yonezawa Signed-off-by: Toshihiko Matsumoto Signed-off-by: Satoshi Watanabe Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2880/cxd2880.h | 29 ++++++++++ .../media/dvb-frontends/cxd2880/cxd2880_common.c | 21 +++++++ .../media/dvb-frontends/cxd2880/cxd2880_common.h | 19 +++++++ drivers/media/dvb-frontends/cxd2880/cxd2880_io.c | 66 ++++++++++++++++++++++ drivers/media/dvb-frontends/cxd2880/cxd2880_io.h | 54 ++++++++++++++++++ 5 files changed, 189 insertions(+) commit bd24fcddf6b822a6646b00cfc76a21f3f7bbc7e7 Author: Yasunari Takiguchi Date: Thu Jan 18 03:46:10 2018 -0500 media: cxd2880-spi: Add support for CXD2880 SPI interface This is the SPI adapter part of the driver for the Sony CXD2880 DVB-T2/T tuner + demodulator. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki Nozawa Signed-off-by: Kota Yonezawa Signed-off-by: Toshihiko Matsumoto Signed-off-by: Satoshi Watanabe Signed-off-by: Mauro Carvalho Chehab drivers/media/spi/cxd2880-spi.c | 670 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 670 insertions(+) commit feac8c8bb9d087c8b5d2415c00c095735799eb6c Author: Yasunari Takiguchi Date: Thu Jan 18 03:43:51 2018 -0500 media: Add document file for CXD2880 SPI I/F This is the document file for Sony CXD2880 DVB-T2/T tuner + demodulator. It contains the description of the SPI adapter binding. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki Nozawa Signed-off-by: Kota Yonezawa Signed-off-by: Toshihiko Matsumoto Signed-off-by: Satoshi Watanabe Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/spi/sony-cxd2880.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 949f7c7d5fc4277e1ca91dbee32ceb469bbb1349 Author: Maarten Lankhorst Date: Mon Mar 5 13:36:08 2018 +0100 drm/i915: Handle changing enable_fbc parameter at runtime better. If i915.enable_fbc is cleared at runtime, but FBC was previously enabled then we don't disable FBC until the next time the crtc is disabled. Make sure that if the module param is changed, we disable FBC in intel_fbc_post_update so we never have to worry about disabling. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180305123608.20665-1-maarten.lankhorst@linux.intel.com Reviewed-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_fbc.c | 62 +++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 26 deletions(-) commit 1980bfa67f19d628df30b9b5b76bca37c2a76dde Author: Mauro Carvalho Chehab Date: Wed Mar 7 04:11:50 2018 -0500 media: dvbdev: fix building on ia64 Not sure why, but, on ia64, with Linaro's gcc 7.3 compiler, using #ifdef (CONFIG_I2C) is not OK. So, replace it by IS_ENABLED(CONFIG_I2C), in order to fix the builds there. Reported-by: kbuild test robot Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 2 +- include/media/dvbdev.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 779c79d4b833ec646b0aed878da38edb45bbe156 Author: Brad Love Date: Tue Mar 6 14:15:37 2018 -0500 media: cx23885: Override 888 ImpactVCBe crystal frequency Hauppauge produced a revision of ImpactVCBe using an 888, with a 25MHz crystal, instead of using the default third overtone 50Mhz crystal. This overrides that frequency so that the cx25840 is properly configured. Without the proper crystal setup the cx25840 cannot load the firmware or decode video. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 5ceade1d97fc6687e050c44c257382c192f56276 Author: Brad Love Date: Tue Mar 6 14:15:36 2018 -0500 media: cx23885: Set subdev host data to clk_freq pointer Currently clk_freq is ignored entirely, because the cx235840 driver configures the xtal at the chip defaults. This is an issue if a board is produced with a non-default frequency crystal. If clk_freq is not zero the cx25840 will attempt to use the setting provided, or fall back to defaults otherwise. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-cards.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5da1a68227feffd65bb7f20733afbe5134da6386 Author: Brad Love Date: Tue Mar 6 14:15:35 2018 -0500 media: cx23885: change 887/888 default to 888 Proper cx2388x chip type is detected in cx25840 probe, the clock rate is untouched however in probe. The cx25840 only checks for non default clock values for 888 and provides custom settings for 25MHz 888. This change ensures that cx23888 chips with default 50MHz crystals will not get configured as if they have 25MHz crystals. A cx23887 board will continue to be configured for 25MHz crystal as there is no custom clock support included for it. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3ee9bc12342cf546313d300808ff47d7dbb8e7db Author: Brad Love Date: Tue Mar 6 14:15:34 2018 -0500 media: cx25840: Use subdev host data for PLL override The cx25840 driver currently configures 885, 887, and 888 using default divisors for each chip. This check to see if the cx23885 driver has passed the cx25840 a non-default clock rate for a specific chip. If a cx23885 board has left clk_freq at 0, the clock default values will be used to configure the PLLs. This patch only has effect on 888 boards who set clk_freq to 25M. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/cx25840/cx25840-core.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit 9cbf518efaa8eae88f5a216c2ea58987a5344989 Author: Brad Love Date: Tue Mar 6 14:15:02 2018 -0500 media: cx23885: Fix gpio on Hauppauge QuadHD PCIe cards The GPIO settings for quadHD boards are wrong. Fix them. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-cards.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a2c52cd73f78711590cab76f546d75eb712702ca Author: Brad Love Date: Tue Mar 6 14:15:01 2018 -0500 media: cx231xx: Add second i2c demod to Hauppauge 975 Hauppauge HVR-975 is a hybrid, dual frontend, single tuner USB device. It contains lgdt3306a and si2168 frontends and one si2157 tuner. The lgdt3306a frontend is currently enabled. This creates the second demodulator and attaches it to the tuner. Enables lgdt3306a|si2168 + si2157 Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-cards.c | 1 + drivers/media/usb/cx231xx/cx231xx-dvb.c | 52 +++++++++++++++++++++++++++++-- 2 files changed, 50 insertions(+), 3 deletions(-) commit 1dd2ce0e866c5ced6ba66360e24ed3b141112e26 Author: Brad Love Date: Tue Mar 6 14:15:00 2018 -0500 media: cx231xx: Use constant instead of hard code for max Nit regarding hard coded value. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-dvb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f83423094deaa12d0f9a6a82e05ea8ec66b78ef5 Author: Brad Love Date: Tue Mar 6 14:14:59 2018 -0500 media: cx231xx: Set mfe_shared if second frontend found If frontend[1] exists, then enable the dvb adapter mfe lock system. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-dvb.c | 3 +++ 1 file changed, 3 insertions(+) commit 93e5b2066a2741b3b96b5685e6207287909192fa Author: Brad Love Date: Tue Mar 6 14:14:58 2018 -0500 media: cx23885: Add tuner type and analog inputs to 1265 Add missing composite and s-video inputs. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-cards.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit b94e47055bad45a005cc62b07a5fc79bf36e3e96 Author: Brad Love Date: Tue Mar 6 14:14:57 2018 -0500 media: cx231xx: Use frontend i2c adapter with tuner Utilize the i2c mux adapter returned by the frontend. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-dvb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b234c98f7ccc5e7d46626980b582c666cfc6bf6 Author: Brad Love Date: Tue Mar 6 14:14:56 2018 -0500 media: em28xx: Change hex to lower case Coding style fix. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6618cc8b447834a8102ae6988ae45cc7835a519 Author: Brad Love Date: Tue Mar 6 14:14:55 2018 -0500 media: lgdt3306a: remove symbol count mismatch fix This symbol mismatch is handled by NULL'ing out the release callback if the driver is loaded as an i2c device. This patch reverts: - commit 94448e21cf08 ("media: lgdt3306a: Fix a double kfree on i2c device remove") - commit 835d66173a38 ("media: lgdt3306a: Fix module count mismatch on usb unplug") The symbol count mismatch is handled by: - commit 5b3a8e906973 ("media: lgdt3306a: Set fe ops.release to NULL if probed") Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/lgdt3306a.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 3f986eefc89c528bf2d398a6dc3637b743a7139e Merge: 55b4ce6 629ae2e Author: Ingo Molnar Date: Wed Mar 7 09:23:12 2018 +0100 Merge branch 'perf/urgent' into perf/core, to resolve conflict Conflicts: tools/perf/perf.h Signed-off-by: Ingo Molnar commit e810bf5e96e327500cc6334f9d56c8047aaabcff Author: Aviad Yehezkel Date: Sun Feb 18 15:00:54 2018 +0200 net/mlx5: Flow steering cmd interface should get the fte when deleting Previously, deleting a flow steering entry only got the index. Since the FPGA implementation of FTE's deletion might need to dig inside the FTE itself, we would like to get the FTE's context. Changing the interface to pass the FTE context. Signed-off-by: Aviad Yehezkel Signed-off-by: Matan Barak Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 6 +++--- drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 3346c4873733a109bea29467308a754038b886a9 Author: Boris Pismenny Date: Sun Aug 20 15:13:08 2017 +0300 {net,IB}/mlx5: Add flow steering helpers Add helper functions that check if a protocol is part of a flow steering match criteria. Signed-off-by: Boris Pismenny Signed-off-by: Matan Barak Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/main.c | 7 +- include/linux/mlx5/fs_helpers.h | 134 ++++++++++++++++++++++++++++++++++++++ include/linux/mlx5/mlx5_ifc.h | 8 ++- 3 files changed, 143 insertions(+), 6 deletions(-) commit d2ec6a35e834f953790cfea8a4f8a1415d19a431 Author: Matan Barak Date: Thu Nov 9 12:12:15 2017 +0000 net/mlx5: Embed mlx5_flow_act into fs_fte fte objects contain the match value and action. Currently, extending the actions require in adding them both to the API and fs_fte. Signed-off-by: Matan Barak Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed .../mellanox/mlx5/core/diag/fs_tracepoint.h | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 13 ++++++------ drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 24 ++++++++++------------ drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 5 +---- 4 files changed, 21 insertions(+), 25 deletions(-) commit 5f4183781a303da5ab6731b8c19328c5b9df89fa Author: Aviad Yehezkel Date: Sun Feb 18 13:17:17 2018 +0200 net/mlx5: Add empty egress namespace to flow steering core Currently, we don't support egress flow steering namespace in mlx5 flow steering core implementation. However, when we want to encrypt a packet, we model it as a flow steering rule in the egress path. To overcome this, we add an empty egress namespace to flow steering. This namespace is initialized only when ipsec support exists. In the future, this will grow to a full blown full steering implementation, resembling the ingress path. Signed-off-by: Matan Barak Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed .../mellanox/mlx5/core/diag/fs_tracepoint.c | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 28 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 2 ++ include/linux/mlx5/fs.h | 1 + include/linux/mlx5/mlx5_ifc.h | 1 + 6 files changed, 36 insertions(+) commit af76c50198d1db136bbf293f3700c80722116831 Author: Matan Barak Date: Sun Aug 20 15:46:51 2017 +0300 net/mlx5: Add shim layer between fs and cmd The shim layer allows each namespace to define possibly different functionality for add/delete/update commands. The shim layer introduced here, will be used to support flow steering with the FPGA. Signed-off-by: Matan Barak Signed-off-by: Aviad Yehezkel Signed-off-by: Boris Pismenny Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 191 ++++++++++++++++++---- drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | 72 ++++---- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 84 ++++++---- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 1 + 4 files changed, 248 insertions(+), 100 deletions(-) commit a9db0ecf1578894ea3405f3eb5a441508840d479 Author: Matan Barak Date: Wed Aug 16 09:43:48 2017 +0300 {net,IB}/mlx5: Add has_tag to mlx5_flow_act The has_tag member will indicate whether a tag action was specified in flow specification. A flow tag 0 = MLX5_FS_DEFAULT_FLOW_TAG is assumed a valid flow tag that is currently used by mlx5 RDMA driver, whereas in HW flow_tag = 0 means that the user doesn't care about flow_tag. HW always provide a flow_tag = 0 if all flow tags requested on a specific flow are 0. So we need a way (in the driver) to differentiate between a user really requesting flow_tag = 0 and a user who does not care, in order to be able to report conflicting flow tags on a specific flow. Signed-off-by: Matan Barak Reviewed-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/main.c | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +- include/linux/mlx5/fs.h | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) commit 075572d4b7aec1fcd6e1bd66ee8e0e06501f719f Author: Boris Pismenny Date: Wed Aug 16 09:33:30 2017 +0300 IB/mlx5: Pass mlx5_flow_act struct instead of multiple arguments Group and pass all function arguments of parse_flow_attr call in one common struct mlx5_flow_act. This patch passes all the action arguments of parse_flow_attr in one common struct mlx5_flow_act. It allows us to scale the number of actions without adding new arguments to the function. Signed-off-by: Matan Barak Signed-off-by: Boris Pismenny Signed-off-by: Saeed Mahameed Acked-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 04e87170b0964d22c67245b739f56c3fe12fda54 Author: Matan Barak Date: Sun Nov 19 15:51:13 2017 +0000 net/mlx5: FPGA and IPSec initialization to be before flow steering Some flow steering namespace initialization (i.e. egress namespace) might depend on FPGA capabilities. Changing the initialization order such that the FPGA will be initialized before flow steering. Flow steering fs cmds initialization might depend on IPSec capabilities. Changing the initialization order such that the IPSec will be initialized before flow steering as well. Signed-off-by: Aviad Yehezkel Signed-off-by: Matan Barak Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 39 +++++++++++++------------- 1 file changed, 20 insertions(+), 19 deletions(-) commit 1c9a10ebc77a6f123c701ba31d0c35bbf7414cde Author: Aviad Yehezkel Date: Mon Jan 29 13:09:12 2018 +0200 net/mlx5e: Removed not need synchronize_rcu This is already done by xfrm layer between state_dev_del callback to state_dev_free callback. Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dc7debec07803f52d04dbd98d8047cae04dfe8ec Author: Aviad Yehezkel Date: Sun Jan 28 17:25:35 2018 +0200 net/mlx5e: Fixed sleeping inside atomic context We can't allocate with GFP_KERNEL inside spinlock. Actually ida_simple doesn't require spinlock so remove it. Fixes: 547eede070eb ("net/mlx5e: IPSec, Innova IPSec offload infrastructure") Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit ef927a9c168722c4ab5e40838d7fe6b63f978763 Author: Aviad Yehezkel Date: Sun Feb 11 17:12:44 2018 +0200 net/mlx5e: Wait for FPGA command responses with a timeout Generally, FPGA IPSec commands must always complete. We want to wait for one minute for them to complete gracefully also when killing a process. Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 46f3ee4f3a6e84c32e554c80d6533b465de7ff99 Author: Aviad Yehezkel Date: Thu Feb 22 17:40:52 2018 +0200 net/mlx5: Fixed compilation issue when CONFIG_MLX5_ACCEL is disabled IPSec init and cleanup functions also depends on linux/mlx5/driver.h. Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c33251a3c63395ae8b0ffe5acfe206e4c8bb35ee Author: Aviad Yehezkel Date: Wed Jan 31 15:07:33 2018 +0200 IB/mlx5: Removed not used parameters Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed Acked-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 2 -- drivers/infiniband/hw/mlx5/qp.c | 3 --- 2 files changed, 5 deletions(-) commit aeef9c09740691e33aceeaa5f5b8a4457a4eab97 Author: Kees Cook Date: Tue Mar 6 14:58:10 2018 -0800 lkdtm: Add missing SPDX-License-Identifier line The refcount.c file missed the mass-addition of the SPDX lines. Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/misc/lkdtm/refcount.c | 1 + 1 file changed, 1 insertion(+) commit 039a1c42058db54692a6d4497508bd48555f29fb Author: Kees Cook Date: Tue Mar 6 14:58:09 2018 -0800 lkdtm: Relocate code to subdirectory The LKDTM modules keep expanding, and it's getting weird to have each file get a prefix. Instead, move to a subdirectory for cleaner handling. Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- drivers/misc/Makefile | 20 +- drivers/misc/lkdtm.h | 86 ------- drivers/misc/lkdtm/Makefile | 20 ++ drivers/misc/lkdtm/bugs.c | 257 +++++++++++++++++++++ drivers/misc/lkdtm/core.c | 505 ++++++++++++++++++++++++++++++++++++++++++ drivers/misc/lkdtm/heap.c | 148 +++++++++++++ drivers/misc/lkdtm/lkdtm.h | 86 +++++++ drivers/misc/lkdtm/perms.c | 203 +++++++++++++++++ drivers/misc/lkdtm/refcount.c | 400 +++++++++++++++++++++++++++++++++ drivers/misc/lkdtm/rodata.c | 11 + drivers/misc/lkdtm/usercopy.c | 339 ++++++++++++++++++++++++++++ drivers/misc/lkdtm_bugs.c | 257 --------------------- drivers/misc/lkdtm_core.c | 505 ------------------------------------------ drivers/misc/lkdtm_heap.c | 148 ------------- drivers/misc/lkdtm_perms.c | 203 ----------------- drivers/misc/lkdtm_refcount.c | 400 --------------------------------- drivers/misc/lkdtm_rodata.c | 11 - drivers/misc/lkdtm_usercopy.c | 339 ---------------------------- 19 files changed, 1971 insertions(+), 1969 deletions(-) commit 4c06619fc4da5b7aae76f1dde25bfea3246f2591 Author: James Smart Date: Mon Mar 5 10:29:03 2018 -0800 scsi: lpfc: use __raw_writeX on DPP copies Commit 1351e69fc6db ("scsi: lpfc: Add push-to-adapter support to sli4") fails compilation on some 32-bit systems as writeq() is not supported on all architectures. Additionally, it was pointed out that as writeX() does byteswapping if necessary for pci vs the cpu endianness, the code was broken on BE PPC. After discussions with Arnd Bergmann, we've resolved the issue to the following: Instead of writeX(), use __raw_writeX() - which writes to io space while preserving byte order. To use this, the code was changed to use a different buffer that lpfc prepped via sli_pcimem_bcopy() that was set to the bytestream to be written. On platforms with __raw_writeq support, use the routine, otherwise use __raw_writel() [mkp: checkpatch] Fixes: 1351e69fc6db ("scsi: lpfc: Add push-to-adapter support to sli4") Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 14217173217e021c1f354269e61f3c1d5affc42e Author: Andrzej Hajda Date: Tue Feb 27 08:11:30 2018 +0100 dt-bindings: add bindings for Samsung micro-USB 11-pin connector Samsung micro-USB 11-pin connector beside standard micro-USB pins, has pins dedicated to route MHL traffic. Signed-off-by: Andrzej Hajda Reviewed-by: Rob Herring Signed-off-by: Chanwoo Choi .../connector/samsung,usb-connector-11pin.txt | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 593aa2b405f992b59b51b30fed426510fa1a513d Author: Andrzej Hajda Date: Tue Feb 27 08:11:29 2018 +0100 dt-bindings: add bindings for USB physical connector These bindings allow to describe most known standard USB connectors and it should be possible to extend it if necessary. USB connectors, beside USB can be used to route other protocols, for example UART, Audio, MHL. In such case every device passing data through the connector should have appropriate graph bindings. Signed-off-by: Andrzej Hajda Reviewed-by: Rob Herring Signed-off-by: Chanwoo Choi .../bindings/connector/usb-connector.txt | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit 2f793a27d58f0fb302f8e162b46fe4b366bbdedd Author: Jianchao Wang Date: Sat Mar 3 09:54:09 2018 +0800 scsi: core: use blk_mq_requeue_request in __scsi_queue_insert In scsi core, __scsi_queue_insert should just put request back on the queue and retry using the same command as before. However, for blk-mq, scsi_mq_requeue_cmd is employed here which will unprepare the request. To align with the semantics of __scsi_queue_insert, use blk_mq_requeue_request with kick_requeue_list == true and put the reference of scsi_device. Cc: Christoph Hellwig Signed-off-by: Jianchao Wang Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 61b142afb2e28d4f06e158399409d181ad91949c Author: Souptick Joarder Date: Thu Feb 15 21:55:06 2018 +0530 scsi: megaraid: Use dma_pool_zalloc() Use dma_pool_zalloc() instead of dma_pool_alloc + memset Signed-off-by: Souptick Joarder Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 532ed9264da27eb3062f49e4283f9b393a8e17d0 Author: Dan Carpenter Date: Tue Mar 6 12:58:03 2018 +0300 ipmi: missing error code in try_smi_init() If platform_device_alloc() then we should return -ENOMEM instead of returning success. Signed-off-by: Dan Carpenter Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 1 + 1 file changed, 1 insertion(+) commit e8824babad2d81fcff43e02f028cc437a3f99ce5 Author: Colin Ian King Date: Fri Mar 2 14:14:51 2018 +0000 ipmi: use ARRAY_SIZE for poweroff_functions array sizing calculation Use the ARRAY_SIZE macro on a array poweroff_functions to determine size of the array. Improvement suggested by Coccinelle. Signed-off-by: Colin Ian King Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_poweroff.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 71404a2f75c1456d82eda47c3a9699770dc766c9 Author: Corey Minyard Date: Wed Feb 28 11:40:16 2018 -0600 ipmi: Consolidate cleanup code The cleanup code for an init failure and for a device removal were quite similar, consolidate all that into one function. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 164 +++++++++++++++++---------------------- 1 file changed, 70 insertions(+), 94 deletions(-) commit da18e2c6a81376ff37a326d28f16c3dcaa368f90 Author: Corey Minyard Date: Wed Feb 28 07:56:47 2018 -0600 ipmi: Remove some unnecessary initializations The data is allocated with kzalloc, no need to set things to NULL. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 5 ----- 1 file changed, 5 deletions(-) commit cc095f0ac1f7c200e51a5c2a78a43c9f42049dbb Author: Corey Minyard Date: Wed Feb 28 08:09:49 2018 -0600 ipmi: Fix some error cleanup issues device_remove_group() was called on any cleanup, even if the device attrs had not been added yet. That can occur in certain error scenarios, so add a flag to know if it has been added. Also make sure we remove the dev if we added it ourselves. Signed-off-by: Corey Minyard Cc: stable@vger.kernel.org # 4.15 Cc: Laura Abbott Tested-by: Bill Perkins drivers/char/ipmi/ipmi_si_intf.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit b0f9408b14838566b2a9b26434fab667c2afb0ea Author: Kevin Barnett Date: Mon Mar 5 09:01:00 2018 -0600 scsi: smartpqi: add in new supported controllers Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit d15e1175a9a9af967ae01245f55196acb5d5ff0f Author: Jonas Rabenstein Date: Thu Mar 1 14:26:37 2018 +0100 block: sed-opal: fix response string extraction Tokens are prefixed by a variable length of bytes. If a bytestring is not stored in an tiny or short atom, we have to skip more than one byte in order to have the actual bytes not prefixed by the bytes describing the actual length of the string. Acked-by: Jonathan Derrick Signed-off-by: Jonas Rabenstein Signed-off-by: Jens Axboe block/sed-opal.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit 555974068ee533e8e0c6093ec7ca1682057aa4c1 Author: Kees Cook Date: Tue Mar 6 15:15:24 2018 -0800 pstore: Avoid size casts for 842 compression Instead of casting, make sure we don't end up with giant values and just perform regular assignments with unsigned int instead of re-cast size_t. Signed-off-by: Kees Cook fs/pstore/platform.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 239b716199d9aff0d09444b0086e23aacd6bd445 Author: Geliang Tang Date: Tue Feb 13 14:40:39 2018 +0800 pstore: Add lz4hc and 842 compression support Currently, pstore has supported three compression algorithms: zlib, lzo and lz4. This patch added two more compression algorithms: lz4hc and 842. Signed-off-by: Geliang Tang [kees: tweaked Kconfig help text slightly] Signed-off-by: Kees Cook fs/pstore/Kconfig | 20 +++++++ fs/pstore/platform.c | 147 ++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 149 insertions(+), 18 deletions(-) commit 63231585a6167840172cf7e9045b43ced8a0b6c2 Author: Gustavo A. R. Silva Date: Mon Mar 5 17:36:47 2018 -0600 RDMA/bnxt_re/qplib_sp: Use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Acked-by: Selvin Xavier Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/bnxt_re/qplib_sp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbd36818eea88462be4176c9fb73bb7728971ff5 Author: Sergey Gorenko Date: Mon Mar 5 20:15:56 2018 +0200 IB/srp: Use the IB_DEVICE_SG_GAPS_REG HCA feature if supported If a HCA supports the SG_GAPS_REG feature then fewer memory regions are required per command. This patch reduces the number of memory regions that is allocated per SRP session. Signed-off-by: Sergey Gorenko Reviewed-by: Max Gurtovoy Tested-by: Laurence Oberman Signed-off-by: Leon Romanovsky Acked-by: Bart Van Assche Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/srp/ib_srp.c | 56 ++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 20 deletions(-) commit 41904439479e94dd61ac499312e8d8266b13f81d Author: Bart Van Assche Date: Mon Mar 5 09:58:33 2018 -0800 IB/hfi1: Add a missing rcu_read_unlock() This patch avoids that sparse reports the following: drivers/infiniband/hw/hfi1/driver.c:251:13: warning: context imbalance in 'rcv_hdrerr' - different lock contexts for basic block Signed-off-by: Bart Van Assche Cc: Mike Marciniszyn Cc: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/driver.c | 1 + 1 file changed, 1 insertion(+) commit 666fe24bbeb699c100b396095963a62c6f078b38 Author: Arushi Date: Sat Mar 3 21:54:57 2018 +0530 infiniband: hw: Drop unnecessary continue Continue at the bottom of a loop are removed. Issue found using drop_continue.cocci Coccinelle script. Signed-off-by: Arushi Singhal Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/qib/qib_init.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7e952b19eb638ffa2d511796e35c62a48ec1aef0 Author: Shiraz Saleem Date: Fri Mar 2 15:17:14 2018 -0600 i40iw: Implement get_vector_affinity API Storage ULPs (like NVMEoF) benefit from exposing affinity mapping per completion vector to find the optimal multi-queue affinity assignments. The ULPs call the verbs API ib_get_vector_affinity introduced in commit c66cd353bbe ("RDMA/core: expose affinity mappings per completion vector") to get the underlying devices affinity mappings. Add support in driver to expose the affinity masks per MSI-X completion vector. Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/i40iw/i40iw_verbs.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 7de8b3576ab88bf8b3307eac2972d3b58dc28708 Author: Shiraz Saleem Date: Fri Mar 2 15:17:13 2018 -0600 i40iw: Improve CM node lookup time on connection setup Currently all CM nodes involved in a connection are maintained in a connected_node list per dev. During connection setup, we need to search this every time we receive a packet on the iWARP LAN Queue (ILQ) and this can be pretty inefficient for large number of connections. Fix this by organizing the CM nodes in two lists - accelerated list and non-accelerated list. The search on ILQ receive would be limited to only non accelerated nodes. When a node moves to RTS, it is added to the accelerated list. Benchmarking ucmatose 16k connections shows a 20% improvement in test completion time. Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/i40iw/i40iw.h | 3 +- drivers/infiniband/hw/i40iw/i40iw_cm.c | 127 ++++++++++++++++++++++-------- drivers/infiniband/hw/i40iw/i40iw_cm.h | 5 +- drivers/infiniband/hw/i40iw/i40iw_utils.c | 2 +- 4 files changed, 100 insertions(+), 37 deletions(-) commit 6b0c549fc616a2024178fce276df80fd138f3c31 Author: Mustafa Ismail Date: Fri Mar 2 15:17:12 2018 -0600 i40iw: Refactor handling of txpend list Currently the TX pending lists for IEQ and ILQ are handled separately. The handling of both can be consolidated in i40iw_poll_completion. Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/i40iw/i40iw_puda.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 2a78cb4db487372152bed2055c038f9634d595e8 Author: Bart Van Assche Date: Thu Mar 1 14:00:30 2018 -0800 IB/srpt: Fix an out-of-bounds stack access in srpt_zerolength_write() Avoid triggering an out-of-bounds stack access by changing the type of 'wr' from ib_send_wr into ib_rdma_wr. This patch fixes the following KASAN bug report: BUG: KASAN: stack-out-of-bounds in rxe_post_send+0x7a9/0x9a0 [rdma_rxe] Read of size 8 at addr ffff880068197a48 by task kworker/2:1/44 Workqueue: ib_cm cm_work_handler [ib_cm] Call Trace: dump_stack+0x8e/0xcd print_address_description+0x6f/0x280 kasan_report+0x25a/0x380 __asan_load8+0x54/0x90 rxe_post_send+0x7a9/0x9a0 [rdma_rxe] srpt_zerolength_write+0xf0/0x180 [ib_srpt] srpt_cm_rtu_recv+0x68/0x110 [ib_srpt] srpt_rdma_cm_handler+0xbb/0x15b [ib_srpt] cma_ib_handler+0x1aa/0x4a0 [rdma_cm] cm_process_work+0x30/0x100 [ib_cm] cm_work_handler+0xa86/0x351b [ib_cm] process_one_work+0x475/0x9f0 worker_thread+0x69/0x690 kthread+0x1ad/0x1d0 ret_from_fork+0x3a/0x50 Fixes: aaf45bd83eba ("IB/srpt: Detect session shutdown reliably") Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: stable@vger.kernel.org Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/srpt/ib_srpt.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit a6544a624c3ff92a64e4aca3931fa064607bd3da Author: Bart Van Assche Date: Thu Mar 1 14:00:29 2018 -0800 RDMA/rxe: Fix an out-of-bounds read This patch avoids that KASAN reports the following when the SRP initiator calls srp_post_send(): ================================================================== BUG: KASAN: stack-out-of-bounds in rxe_post_send+0x5c4/0x980 [rdma_rxe] Read of size 8 at addr ffff880066606e30 by task 02-mq/1074 CPU: 2 PID: 1074 Comm: 02-mq Not tainted 4.16.0-rc3-dbg+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014 Call Trace: dump_stack+0x85/0xc7 print_address_description+0x65/0x270 kasan_report+0x231/0x350 rxe_post_send+0x5c4/0x980 [rdma_rxe] srp_post_send.isra.16+0x149/0x190 [ib_srp] srp_queuecommand+0x94d/0x1670 [ib_srp] scsi_dispatch_cmd+0x1c2/0x550 [scsi_mod] scsi_queue_rq+0x843/0xa70 [scsi_mod] blk_mq_dispatch_rq_list+0x143/0xac0 blk_mq_do_dispatch_ctx+0x1c5/0x260 blk_mq_sched_dispatch_requests+0x2bf/0x2f0 __blk_mq_run_hw_queue+0xdb/0x160 __blk_mq_delay_run_hw_queue+0xba/0x100 blk_mq_run_hw_queue+0xf2/0x190 blk_mq_sched_insert_request+0x163/0x2f0 blk_execute_rq+0xb0/0x130 scsi_execute+0x14e/0x260 [scsi_mod] scsi_probe_and_add_lun+0x366/0x13d0 [scsi_mod] __scsi_scan_target+0x18a/0x810 [scsi_mod] scsi_scan_target+0x11e/0x130 [scsi_mod] srp_create_target+0x1522/0x19e0 [ib_srp] kernfs_fop_write+0x180/0x210 __vfs_write+0xb1/0x2e0 vfs_write+0xf6/0x250 SyS_write+0x99/0x110 do_syscall_64+0xee/0x2b0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the page: page:ffffea0001998180 count:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x4000000000000000() raw: 4000000000000000 0000000000000000 0000000000000000 00000000ffffffff raw: dead000000000100 dead000000000200 0000000000000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff880066606d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 ffff880066606d80: f1 00 f2 f2 f2 f2 f2 f2 f2 00 00 f2 f2 f2 f2 f2 >ffff880066606e00: f2 00 00 00 00 00 f2 f2 f2 f3 f3 f3 f3 00 00 00 ^ ffff880066606e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff880066606f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Bart Van Assche Cc: Moni Shoua Cc: stable@vger.kernel.org Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_verbs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a1ae7d0345edd593d6725d3218434d903a0af95d Author: Bart Van Assche Date: Thu Mar 1 14:00:28 2018 -0800 RDMA/core: Avoid that ib_drain_qp() triggers an out-of-bounds stack access This patch fixes the following KASAN complaint: ================================================================== BUG: KASAN: stack-out-of-bounds in rxe_post_send+0x77d/0x9b0 [rdma_rxe] Read of size 8 at addr ffff880061aef860 by task 01/1080 CPU: 2 PID: 1080 Comm: 01 Not tainted 4.16.0-rc3-dbg+ #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014 Call Trace: dump_stack+0x85/0xc7 print_address_description+0x65/0x270 kasan_report+0x231/0x350 rxe_post_send+0x77d/0x9b0 [rdma_rxe] __ib_drain_sq+0x1ad/0x250 [ib_core] ib_drain_qp+0x9/0x30 [ib_core] srp_destroy_qp+0x51/0x70 [ib_srp] srp_free_ch_ib+0xfc/0x380 [ib_srp] srp_create_target+0x1071/0x19e0 [ib_srp] kernfs_fop_write+0x180/0x210 __vfs_write+0xb1/0x2e0 vfs_write+0xf6/0x250 SyS_write+0x99/0x110 do_syscall_64+0xee/0x2b0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the page: page:ffffea000186bbc0 count:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x4000000000000000() raw: 4000000000000000 0000000000000000 0000000000000000 00000000ffffffff raw: 0000000000000000 ffffea000186bbe0 0000000000000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff880061aef700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff880061aef780: 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 >ffff880061aef800: f2 f2 f2 f2 f2 f2 f2 00 00 00 00 00 f2 f2 f2 f2 ^ ffff880061aef880: f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 f2 f2 ffff880061aef900: f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== Fixes: 765d67748bcf ("IB: new common API for draining queues") Signed-off-by: Bart Van Assche Cc: Steve Wise Cc: Sagi Grimberg Cc: stable@vger.kernel.org Signed-off-by: Jason Gunthorpe drivers/infiniband/core/verbs.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 042932f7a3274126ee3bfb2516e8d8260c545b11 Author: Colin Ian King Date: Thu Mar 1 16:23:54 2018 +0000 infiniband: remove redundant assignment to pointer 'rdi' The pointer rdi is being initialized with a value that is never read and re-assigned immediately after, hence the initialization is redundant and can be removed. Cleans up clang warning: drivers/infiniband/sw/rdmavt/vt.c:94:23: warning: Value stored to 'rdi' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rdmavt/vt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edb2e5301c4489d8c99b0f3d86a074df27f6f8ff Author: Ville Syrjälä Date: Wed Jan 17 21:21:49 2018 +0200 drm/i915: Track whether the DP link is trained or not LSPCON likes to throw short HPDs during the enable seqeunce prior to the link being trained. These obviously result in the channel CR/EQ check failing and thus we schedule a pointless hotplug work to retrain the link. Avoid that by ignoring the bad CR/EQ status until we've actually initially trained the link. I've not actually investigated to see what LSPCON is trying to signal with the short pulse. But as long as it signals anything I think we're supposed to check the link status anyway, so I don't really see other good ways to solve this. I've not seen these short pulses being generated by normal DP sinks. Signed-off-by: Ville Syrjälä Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180117192149.17760-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 2 ++ drivers/gpu/drm/i915/intel_dp.c | 10 +++++++--- drivers/gpu/drm/i915/intel_dp_link_training.c | 2 ++ drivers/gpu/drm/i915/intel_drv.h | 1 + 4 files changed, 12 insertions(+), 3 deletions(-) commit 2fed7955bf4c2e87e8b3759939fd0ad961da776e Author: Ville Syrjälä Date: Wed Jan 17 21:21:48 2018 +0200 drm/i915: Nuke intel_dp->channel_eq_status intel_dp->channel_eq_status is used in exactly one function, and we don't need it to persist between calls. So just go back to using a local variable instead. Signed-off-by: Ville Syrjälä Reviewed-by: Rodrigo Vivi Reviewed-by: Lyude Paul Reviewed-by: Manasi Navare Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180117192149.17760-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_dp_link_training.c | 6 +++--- drivers/gpu/drm/i915/intel_drv.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) commit c85d200e832197e23ceeadfda9745646a242fd46 Author: Ville Syrjälä Date: Wed Jan 17 21:21:47 2018 +0200 drm/i915: Move SST DP link retraining into the ->post_hotplug() hook Doing link retraining from the short pulse handler is problematic since that might introduce deadlocks with MST sideband processing. Currently we don't retrain MST links from this code, but we want to change that. So better to move the entire thing to the hotplug work. We can utilize the new encoder->hotplug() hook for this. The only thing we leave in the short pulse handler is the link status check. That one still depends on the link parameters stored under intel_dp, so no locking around that but races should be mostly harmless as the actual retraining code will recheck the link state if we end up there by mistake. v2: Rebase due to ->post_hotplug() now being just ->hotplug() Check the connector type to figure out if we should do the HDMI thing or the DP think for DDI [pushed with whitespace changes for sparse] Cc: Manasi Navare Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Acked-by: Manasi Navare Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180117192149.17760-3-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 10 +- drivers/gpu/drm/i915/intel_dp.c | 197 ++++++++++++++++++++++----------------- drivers/gpu/drm/i915/intel_drv.h | 2 + 3 files changed, 121 insertions(+), 88 deletions(-) commit dba14b27dd3ca5ce5b3a1d538862e7dce556dba7 Author: Ville Syrjälä Date: Wed Jan 17 21:21:46 2018 +0200 drm/i915: Reinitialize sink scrambling/TMDS clock ratio on HPD The LG 4k TV I have doesn't deassert HPD when I turn the TV off, but when I turn it back on it will pulse the HPD line. By that time it has forgotten everything we told it about scrambling and the clock ratio. Hence if we want to get a picture out if it again we have to tell it whether we're currently sending scrambled data or not. Implement that via the encoder->hotplug() hook. v2: Force a full modeset to not follow the HDMI 2.0 spec more closely (Shashank) [pushed with whitespace fixes to make sparse happy] Cc: Shashank Sharma Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180117192149.17760-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_crt.c | 4 +- drivers/gpu/drm/i915/intel_ddi.c | 146 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 6 +- drivers/gpu/drm/i915/intel_hdmi.c | 1 + drivers/gpu/drm/i915/intel_hotplug.c | 25 +++--- 6 files changed, 168 insertions(+), 15 deletions(-) commit 1b2cb026dc8b6f5cc4043031896a27745ad6f898 Author: Ville Syrjälä Date: Wed Jan 17 21:21:45 2018 +0200 drm/i915: Convert intel_hpd_irq_event() into an encoder hotplug hook Allow encoders to customize their hotplug processing by moving the intel_hpd_irq_event() code into an encoder hotplug vfunc. Currently only SDVO needs this to re-enable hotplug signalling in the SDVO chip. We'll use this same hook for DP/HDMI link management later. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180117192149.17760-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_sdvo.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 470e7c6189dbce4c0d1beb8cce7e38a9bd5f5144 Author: Rodrigo Vivi Date: Mon Mar 5 17:28:12 2018 -0800 drm/i915/cnp: Document WaSouthDisplayDisablePWMCGEGating No functional change since WA is already applied. But since it has different names on different databases, let's document it here to avoid future confusion. Cc: Radhakrishna Sripada Signed-off-by: Rodrigo Vivi Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20180306012812.19779-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14941b6e86873680714aae2fee0b529024c63380 Author: Rodrigo Vivi Date: Mon Mar 5 17:20:00 2018 -0800 drm/i915/cnl: document WaVFUnitClockGatingDisable No functional change. WA is already properly applied. but in different databases it has different names. Let's document all of them to avoid future confusion. Cc: Rafael Antognolli Signed-off-by: Rodrigo Vivi Reviewed-by: Rafael Antognolli Link: https://patchwork.freedesktop.org/patch/msgid/20180306012000.18928-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_pm.c | 1 + 1 file changed, 1 insertion(+) commit c90c275c6ff4b7eca4221a302b399499239ae89e Author: Dhinakaran Pandiyan Date: Tue Mar 6 12:33:55 2018 -0800 drm/i915/psr: Update PSR2 resolution check for Cannonlake In fact, apply the Cannonlake resolution check for all >= Gen-10 platforms to be safe. v3: Update GLK too. (Ville) Longer variable names. if-else in place of ternary operator. v2: Use local variables for resolution limits and print them (Ville) Cc: Ville Syrjälä Cc: Rodrigo Vivi Cc: Elio Martinez Monroy Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180306203355.29292-1-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_psr.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 6b4f3d01052a479c7ebbe99d52a663558dc1be2a Author: Stephen Smalley Date: Fri Sep 8 12:40:01 2017 -0400 usb, signal, security: only pass the cred, not the secid, to kill_pid_info_as_cred and security_task_kill commit d178bc3a708f39cbfefc3fab37032d3f2511b4ec ("user namespace: usb: make usb urbs user namespace aware (v2)") changed kill_pid_info_as_uid to kill_pid_info_as_cred, saving and passing a cred structure instead of uids. Since the secid can be obtained from the cred, drop the secid fields from the usb_dev_state and async structures, and drop the secid argument to kill_pid_info_as_cred. Replace the secid argument to security_task_kill with the cred. Update SELinux, Smack, and AppArmor to use the cred, which avoids the need for Smack and AppArmor to use a secid at all in this hook. Further changes to Smack might still be required to take full advantage of this change, since it should now be possible to perform capability checking based on the supplied cred. The changes to Smack and AppArmor have only been compile-tested. Signed-off-by: Stephen Smalley Acked-by: Paul Moore Acked-by: Casey Schaufler Acked-by: Greg Kroah-Hartman Acked-by: John Johansen Signed-off-by: James Morris drivers/usb/core/devio.c | 10 ++-------- include/linux/lsm_hooks.h | 5 +++-- include/linux/sched/signal.h | 2 +- include/linux/security.h | 4 ++-- kernel/signal.c | 6 +++--- security/apparmor/lsm.c | 17 ++++++++++++----- security/security.c | 4 ++-- security/selinux/hooks.c | 7 +++++-- security/smack/smack_lsm.c | 12 +++++------- 9 files changed, 35 insertions(+), 32 deletions(-) commit 740c01f76ab3712a45c2f02233c800829626e9ba Author: Tony Lindgren Date: Thu Mar 1 15:06:19 2018 -0800 ARM: multi_v7_defconfig: Enable USB gadget configfs as loadable module With USB OTG now enabled, it makes sense to allow configuring the USB gadgets via configfs. Signed-off-by: Tony Lindgren arch/arm/configs/multi_v7_defconfig | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 153d751ba6781327b6e3e62df5b3ebbe0749f3c8 Author: Tony Lindgren Date: Fri Mar 2 08:39:09 2018 -0800 ARM: multi_v7_defconfig: Enable various USB PHYs found on omap variants With MUSB USB OTG controller enabled, let's now enable the USB PHYs found on omap varian SoCs. Signed-off-by: Tony Lindgren arch/arm/configs/multi_v7_defconfig | 6 ++++++ 1 file changed, 6 insertions(+) commit 4df8974b41012fc0e9db50629878db097afd7f0a Author: Tony Lindgren Date: Thu Mar 1 14:59:57 2018 -0800 ARM: multi_v7_defconfig: Enable OTG and MUSB as loadable modules We can support USB OTG with MUSB driver on many ARM SoCs. Let's enable all the SoCs with MUSB as loadable modules. And let's enable their related DMA hardware. And as MUSB is an USB OTG controller, let's enable OTG support too. Signed-off-by: Tony Lindgren arch/arm/configs/multi_v7_defconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 077e1cde78c3f9047f61506cf3a5b1abb2139e04 Author: Tony Lindgren Date: Thu Mar 1 12:41:49 2018 -0800 ARM: omap2plus_defconfig: Enable 8250_OMAP We've had 8250_OMAP working for few years now, so let's start enabling it by default. We provide users an option to warn by default with SERIAL_8250_OMAP_TTYO_FIXUP by default. That option updates the serial console to point to 8250 driver and warns about it. Users with ttyO[0123] in their /etc/inittab should update inittab to use ttyS[0123] instead. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 1 + 1 file changed, 1 insertion(+) commit 6f5eafbb2dfa5101fb135f40f14ff29a108cfbca Author: Tony Lindgren Date: Thu Mar 1 13:08:59 2018 -0800 ARM: omap2plus_defconfig: Switch to use omapdrm by default We've had omapdrm working for few years now so let's use it by default. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 39 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 19 deletions(-) commit 66fad0d0df562136fcc456accc54906a0e3a2de3 Author: Tony Lindgren Date: Thu Mar 1 13:02:10 2018 -0800 ARM: omap2plus_defconfig: Enable CEC We have CEC support available and working so let's enable it. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit d33ae255254ce35dd7ed1f4d3cdfb7abdb1d8dd4 Author: Tony Lindgren Date: Thu Mar 1 12:47:48 2018 -0800 ARM: omap2plus_defconfig: Enable am335x and am437x PM options These are needed to enable low-power suspend mode as described by Dave. Note that these depend on the am335x-pm-firmware.elf. Cc: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 7 +++++++ 1 file changed, 7 insertions(+) commit abdf5135b2441f153eec223e7364950c56ada768 Author: Tony Lindgren Date: Thu Mar 1 10:34:41 2018 -0800 ARM: omap2plus_defconfig: Drop unneeded options These are no longer needed because: - PCI_DRA7XX_HOST selects PCI_DRA7XX - USB_NET_QMI_WWAN selects USB_WDM - USB_PHY selects EXTCON - IIO_CONFIGFS selects CONFIGFS_FS - TIMER_STATS option no longer exists - CRYPTO_SHA1_ARM_NEON selects CRYPTO_SHA1_ARM Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 6 ------ 1 file changed, 6 deletions(-) commit 499ed74eb510617425a0ca1a68230464d3b9aecb Author: Tony Lindgren Date: Thu Mar 1 12:34:17 2018 -0800 ARM: omap2plus_defconfig: Add SND_OSSEMUL We have SND_MIXER_OSS and SND_PCM_OSS but they now depend on SND_OSSEMUL selecting SOUND_OSS_CORE. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 1 + 1 file changed, 1 insertion(+) commit 57625de768b1127d022c86048887dd329e70572f Author: Tony Lindgren Date: Thu Mar 1 11:01:27 2018 -0800 ARM: omap2plus_defconfig: Update LIRC options We have LIRC selected as a loadable module but it must now be built-in. Let's update that and add few interesting new options for blinking IR LEDs. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6cd7f83987ed477e448aebe696d74e03ea6eba32 Author: Tony Lindgren Date: Thu Mar 1 10:54:52 2018 -0800 ARM: omap2plus_defconfig: Select MFD_TI_LMU We have REGULATOR_LM363X selected but not MFD_TI_LMU and REGULATOR_LM363X depends on MFD_TI_LMU. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 1 + 1 file changed, 1 insertion(+) commit 1526f9e2ac1df62106c15a18fd6895258c579c90 Author: Ross Zwisler Date: Tue Feb 27 10:29:52 2018 -0700 nfit_test: prevent parsing error of nfit_test.0 When you load nfit_test you currently see the following error in dmesg: nfit_test nfit_test.0: found a zero length table '0' parsing nfit This happens because when we parse the nfit_test.0 table via acpi_nfit_init(), we specify a size of nfit_test->nfit_size. For the first pass through nfit_test.0 where (t->setup_hotplug == 0) this is the size of the entire buffer we allocated, including space for the hot plug structures, not the size that we've actually filled in. Fix this by only trying to parse the size of the structures that we've filled in. Signed-off-by: Ross Zwisler Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 9741a559971856fca61a83840b558b4f94500d89 Author: Ross Zwisler Date: Tue Feb 27 10:29:51 2018 -0700 nfit_test: fix buffer overrun, add sanity check It turns out that we were overrunning the 'nfit_buf' buffer in nfit_test0_setup() in the (t->setup_hotplug == 1) case because we failed to correctly account for all of the acpi_nfit_memory_map structures. Fix the structure count which will increase the allocation size of 'nfit_buf' in nfit_test0_alloc(). Also add some WARN_ON()s to nfit_test0_setup() and nfit_test1_setup() to catch future issues where the size of the buffer doesn't match the amount of data we're writing. Signed-off-by: Ross Zwisler Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit d7d8464dcc27dfc9d0d23c7924b2e6f4bb16c6c2 Author: Ross Zwisler Date: Tue Feb 27 10:29:50 2018 -0700 nfit_test: improve structure offset handling In nfit_test0_setup() and nfit_test1_setup() we keep an 'offset' value which we use to calculate where in our 'nfit_buf' we will place our next structure. The handling of 'offset' and the calculation of the placement of the next structure is a bit inconsistent, though. We don't update 'offset' after we insert each structure, sometimes causing us to update it for multiple structures' sizes at once. When calculating the position of the next structure we aren't always able to just use 'offset', but sometimes have to add in other structure sizes as well. Fix this by updating 'offset' after each structure insertion in a consistent way, allowing us to always calculate the position of the next structure to be inserted by just using 'nfit_buf + offset'. Signed-off-by: Ross Zwisler Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 183 +++++++++++++++++++++++---------------- 1 file changed, 109 insertions(+), 74 deletions(-) commit e03e61c3173c1079058920210ab40c458a0e0899 Author: Will Deacon Date: Tue Feb 27 14:15:49 2018 +0000 arm64: kaslr: Set TCR_EL1.NFD1 when CONFIG_RANDOMIZE_BASE=y TCR_EL1.NFD1 was allocated by SVE and ensures that fault-surpressing SVE memory accesses (e.g. speculative accesses from a first-fault gather load) which translate via TTBR1_EL1 result in a translation fault if they miss in the TLB when executed from EL0. This mitigates some timing attacks against KASLR, where the kernel address space could otherwise be probed efficiently using the FFR in conjunction with suppressed faults on SVE loads. Cc: Dave Martin Acked-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable-hwdef.h | 1 + arch/arm64/mm/proc.S | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 24153c03d4f5dc4ac0ccd446a9636c269c1d4a02 Author: Douglas Anderson Date: Mon Mar 5 15:43:09 2018 -0800 arm64/debug: Fix registers on sleeping tasks This is the equivalent of commit 001bf455d206 ("ARM: 8428/1: kgdb: Fix registers on sleeping tasks") but for arm64. Nuff said. ...well, perhaps I could also add that task_pt_regs are userspace registers and that's not what kgdb is supposed to be reporting. We're supposed to be reporting kernel registers. Signed-off-by: Douglas Anderson Signed-off-by: Will Deacon arch/arm64/kernel/kgdb.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 1212f7a16af492d59304ba3abccbcc5b5e41423e Author: Ard Biesheuvel Date: Thu Mar 1 17:19:01 2018 +0000 scripts/kallsyms: filter arm64's __efistub_ symbols On arm64, the EFI stub and the kernel proper are essentially the same binary, although the EFI stub executes at a different virtual address as the kernel. For this reason, the EFI stub is restricted in the symbols it can link to, which is ensured by prefixing all EFI stub symbols with __efistub_ (and emitting __efistub_ prefixed aliases for routines that may be shared between the core kernel and the stub) These symbols are leaking into kallsyms, polluting the namespace, so let's filter them explicitly. Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon scripts/kallsyms.c | 1 + 1 file changed, 1 insertion(+) commit 9597e74396c02c8189215dcdfc08088a9b8d8087 Author: Andrey Konovalov Date: Thu Mar 1 18:07:12 2018 +0100 kasan, arm64: clean up KASAN_SHADOW_SCALE_SHIFT usage This is a follow up patch to the series I sent recently that cleans up KASAN_SHADOW_SCALE_SHIFT usage (which value was hardcoded and scattered all over the code). This fixes the one place that I forgot to fix. The change is purely aesthetical, instead of hardcoding the value for KASAN_SHADOW_SCALE_SHIFT in arch/arm64/Makefile, an appropriate variable is declared and used. Signed-off-by: Andrey Konovalov Signed-off-by: Will Deacon arch/arm64/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 1f85b42a691cd8329ba82dbcaeec80ac1231b32a Author: Catalin Marinas Date: Wed Feb 28 18:47:20 2018 +0000 arm64: Revert L1_CACHE_SHIFT back to 6 (64-byte cache line size) Commit 97303480753e ("arm64: Increase the max granular size") increased the cache line size to 128 to match Cavium ThunderX, apparently for some performance benefit which could not be confirmed. This change, however, has an impact on the network packets allocation in certain circumstances, requiring slightly over a 4K page with a significant performance degradation. This patch reverts L1_CACHE_SHIFT back to 6 (64-byte cache line) while keeping ARCH_DMA_MINALIGN at 128. The cache_line_size() function was changed to default to ARCH_DMA_MINALIGN in the absence of a meaningful CTR_EL0.CWG bit field. In addition, if a system with ARCH_DMA_MINALIGN < CTR_EL0.CWG is detected, the kernel will force swiotlb bounce buffering for all non-coherent devices since DMA cache maintenance on sub-CWG ranges is not safe, leading to data corruption. Cc: Tirumalesh Chalamarla Cc: Timur Tabi Cc: Florian Fainelli Acked-by: Robin Murphy Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 + arch/arm64/include/asm/cache.h | 6 +++--- arch/arm64/include/asm/dma-direct.h | 43 +++++++++++++++++++++++++++++++++++++ arch/arm64/kernel/cpufeature.c | 9 ++------ arch/arm64/mm/dma-mapping.c | 17 +++++++++++++++ arch/arm64/mm/init.c | 3 ++- 6 files changed, 68 insertions(+), 11 deletions(-) commit 6b24442d68e78c57c8837920ea5dfb252571847a Author: Will Deacon Date: Fri Feb 9 13:19:47 2018 +0000 arm64: lse: Pass -fomit-frame-pointer to out-of-line ll/sc atomics In cases where x30 is used as a temporary in the out-of-line ll/sc atomics (e.g. atomic_fetch_add), the compiler tends to put out a full stackframe, which included pointing the x29 at the new frame. Since these things aren't traceable anyway, we can pass -fomit-frame-pointer to reduce the work when spilling. Since this is incompatible with -pg, we also remove that from the CFLAGS for this file. Signed-off-by: Will Deacon arch/arm64/lib/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4e829b6735475313016787ec3d256e102167b94d Author: Will Deacon Date: Tue Feb 20 15:18:13 2018 +0000 arm64: Use arm64_force_sig_info instead of force_sig_info Using arm64_force_sig_info means that printing messages about unhandled signals is dealt with for us, so use that in preference to force_sig_info and remove any homebrew printing code. Signed-off-by: Will Deacon arch/arm64/kernel/debug-monitors.c | 3 ++- arch/arm64/kernel/ptrace.c | 2 +- arch/arm64/kernel/traps.c | 9 ++------- 3 files changed, 5 insertions(+), 9 deletions(-) commit a26731d9d1e3fa93db0b5781d7e8dd9dbff1313e Author: Will Deacon Date: Tue Feb 20 15:08:51 2018 +0000 arm64: Move show_unhandled_signals_ratelimited into traps.c show_unhandled_signals_ratelimited is only called in traps.c, so move it out of its macro in the dreaded system_misc.h and into a static function in traps.c Signed-off-by: Will Deacon arch/arm64/include/asm/system_misc.h | 11 ----------- arch/arm64/kernel/traps.c | 7 +++++++ 2 files changed, 7 insertions(+), 11 deletions(-) commit f71016a8a8c5696530ec7173ee969c68e91d3719 Author: Will Deacon Date: Tue Feb 20 15:05:17 2018 +0000 arm64: signal: Call arm64_notify_segfault when failing to deliver signal If we fail to deliver a signal due to taking an unhandled fault on the stackframe, we can call arm64_notify_segfault to deliver a SEGV can deal with printing any unhandled signal messages for us, rather than roll our own printing code. A side-effect of this change is that we now deliver the frame address in si_addr along with an si_code of SEGV_{ACC,MAP}ERR, rather than an si_addr of 0 and an si_code of SI_KERNEL as before. Signed-off-by: Will Deacon arch/arm64/kernel/signal.c | 7 ++----- arch/arm64/kernel/signal32.c | 13 +++---------- 2 files changed, 5 insertions(+), 15 deletions(-) commit 92ff0674f5d8013704cbaeaceb8e3576b36754ee Author: Will Deacon Date: Tue Feb 20 14:53:22 2018 +0000 arm64: mm: Rework unhandled user pagefaults to call arm64_force_sig_info Reporting unhandled user pagefaults via arm64_force_sig_info means that __do_user_fault can be drastically simplified, since it no longer has to worry about printing the fault information and can consequently just take the siginfo as a parameter. Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 87 +++++++++++++++++++++------------------------------ 1 file changed, 36 insertions(+), 51 deletions(-) commit 1049c30871701a6533dd41e555612b31a29acb33 Author: Will Deacon Date: Tue Feb 20 14:41:02 2018 +0000 arm64: Pass user fault info to arm64_notify_die instead of printing it There's no need for callers of arm64_notify_die to print information about user faults. Instead, they can pass a string to arm64_notify_die which will be printed subject to show_unhandled_signals. Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) commit 15b67321e7e9671881c7174a651a1c7d74c59f72 Author: Will Deacon Date: Tue Feb 20 15:25:19 2018 +0000 arm64: signal: Don't print anything directly in force_signal_inject arm64_notify_die deals with printing out information regarding unhandled signals, so there's no need to roll our own code here. Signed-off-by: Will Deacon arch/arm64/kernel/traps.c | 7 ------- 1 file changed, 7 deletions(-) commit a1ece8216c41c9dbb4040f7b8b3fbcd17662c665 Author: Will Deacon Date: Tue Feb 20 13:46:05 2018 +0000 arm64: Introduce arm64_force_sig_info and hook up in arm64_notify_die In preparation for consolidating our handling of printing unhandled signals, introduce a wrapper around force_sig_info which can act as the canonical place for dealing with show_unhandled_signals. Initially, we just hook this up to arm64_notify_die. Signed-off-by: Will Deacon arch/arm64/include/asm/traps.h | 2 ++ arch/arm64/kernel/traps.c | 28 +++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) commit a7e6f1ca90354a31946873d102cfa999ddf6ecb4 Author: Will Deacon Date: Tue Feb 20 18:08:40 2018 +0000 arm64: signal: Force SIGKILL for unknown signals in force_signal_inject For signals other than SIGKILL or those with siginfo_layout(signal, code) == SIL_FAULT then force_signal_inject does not initialise the siginfo_t properly. Since the signal number is determined solely by the caller, simply WARN on unknown signals and force to SIGKILL. Reported-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/kernel/traps.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2c9120f3a86a809518ece1787d76ae07dd01e01b Author: Will Deacon Date: Tue Feb 20 14:16:29 2018 +0000 arm64: signal: Make force_signal_inject more robust force_signal_inject is a little flakey: * It only knows about SIGILL and SIGSEGV, so can potentially deliver other signals based on a partially initialised siginfo_t * It sets si_addr to point at the PC for SIGSEGV * It always operates on current, so doesn't need the regs argument This patch fixes these issues by always assigning the si_addr field to the address parameter of the function and updates the callers (including those that indirectly call via arm64_notify_segfault) accordingly. Signed-off-by: Will Deacon arch/arm64/include/asm/traps.h | 6 ++---- arch/arm64/kernel/armv8_deprecated.c | 2 +- arch/arm64/kernel/fpsimd.c | 5 ++--- arch/arm64/kernel/traps.c | 23 ++++++++++++----------- 4 files changed, 17 insertions(+), 19 deletions(-) commit 11dd2666375e191757dd4271d5020820c6d0e4a5 Author: Greg Edwards Date: Mon Mar 5 15:05:20 2018 -0700 audit: do not panic on invalid boot parameter If you pass in an invalid audit boot parameter value, e.g. "audit=off", the kernel panics very early in boot before the regular console is initialized. Unless you have earlyprintk enabled, there is no indication of what the problem is on the console. Convert the panic() calls to pr_err(), and leave auditing enabled if an invalid parameter value was passed in. Modify the parameter to also accept "on" or "off" as valid values, and update the documentation accordingly. Signed-off-by: Greg Edwards Signed-off-by: Paul Moore Documentation/admin-guide/kernel-parameters.txt | 14 +++++++------- kernel/audit.c | 21 ++++++++++++++------- 2 files changed, 21 insertions(+), 14 deletions(-) commit a5278e511dce23349e71d681dfa7e8c600d19603 Author: Rex Zhu Date: Sat Feb 24 19:53:41 2018 +0800 drm/amd/pp: Revert gfx/compute profile switch sysfs The gfx/compute profiling mode switch is only for internally test. Not a complete solution and unexpectly upstream. so revert it. Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 8 - drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 180 --------------- drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 256 --------------------- drivers/gpu/drm/amd/amdgpu/ci_dpm.h | 7 - drivers/gpu/drm/amd/include/kgd_pp_interface.h | 7 - drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 114 --------- .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 17 -- drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 2 - drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 77 ------- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 86 ------- .../gpu/drm/amd/powerplay/inc/hardwaremanager.h | 1 - drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 9 - drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 3 - drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 27 --- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 66 ------ .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 64 ------ drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 10 - .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 64 ------ 18 files changed, 998 deletions(-) commit 180a8bebdd50fc8ce4677e579d49d9b73880caa7 Author: Rex Zhu Date: Fri Feb 23 17:41:07 2018 +0800 drm/amd/pp: Fix sclk in highest two levels when compute on smu7 Compute workload tends to be "bursty", Only tune the behavior of nature dpm don't work well for most of such workloads. From test results, Fix sclk in highest two levels can get better performance. so add min sclk setting into the default cumpute workload policy on smu7. user still can change sclk range through sysfs pp_dpm_sclk for better perf/watt. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 5d24af846ee3264a0e3b2d6ee535b904e34b3fce Author: Rex Zhu Date: Wed Jan 31 14:48:14 2018 +0800 drm/amd/pp: Implement get/set_power_profile_mode on smu7 It show what parameters can be configured to tune the behavior of natural dpm for perf/watt on smu7. user can select the mode per workload, but even the default per workload settings are not bulletproof. user can configure custom settings per different use case for better perf or better perf/watt. cat pp_power_profile_mode NUM MODE_NAME SCLK_UP_HYST SCLK_DOWN_HYST SCLK_ACTIVE_LEVEL MCLK_UP_HYST MCLK_DOWN_HYST MCLK_ACTIVE_LEVEL 0 3D_FULL_SCREEN: 0 100 30 0 100 10 1 POWER_SAVING: 10 0 30 - - - 2 VIDEO: - - - 10 16 31 3 VR: 0 11 50 0 100 10 4 COMPUTE: 0 5 30 - - - 5 CUSTOM: 0 0 0 0 0 0 * CURRENT: 0 100 30 0 100 10 Under manual dpm level, user can echo "0/1/2/3/4">pp_power_profile_mode to select 3D_FULL_SCREEN/POWER_SAVING/VIDEO/VR/COMPUTE mode. echo "5 * * * * * * * *">pp_power_profile_mode to set custom settings. "5 * * * * * * * *" mean "CUSTOM enable_sclk SCLK_UP_HYST SCLK_DOWN_HYST SCLK_ACTIVE_LEVEL enable_mclk MCLK_UP_HYST MCLK_DOWN_HYST MCLK_ACTIVE_LEVEL" if the parameter enable_sclk/enable_mclk is true, driver will update the following parameters to dpm table. if false, ignore the following parameters. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 143 +++++++++++++++++++++++ 1 file changed, 143 insertions(+) commit 6dcd30aa11b84eb78d67fc9c081fd343abaaaef5 Author: Rex Zhu Date: Fri Feb 23 16:52:41 2018 +0800 drm/amd/pp: Implement update_dpm_settings on CI use SW method to update DPM settings by updating SRAM directly on CI. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 97 ++++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit fdd62a40d4f379c018895a6596ab6639b32bea50 Author: Rex Zhu Date: Fri Feb 23 16:41:20 2018 +0800 drm/amd/pp: Implement update_dpm_settings on Tonga use SW method to update DPM settings by updating SRAM directly on Tonga. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 97 ++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit 59a66424542c8e499e9d5c5c44935635b9a048fc Author: Rex Zhu Date: Fri Feb 23 16:39:59 2018 +0800 drm/amd/pp: Implement update_dpm_settings on Fiji use SW method to update DPM settings by updating SRAM directly on Fiji. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 97 ++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit 6f9e09fd6488de7661ee20efb5d8ab4e05a59735 Author: Arnd Bergmann Date: Thu Mar 1 14:07:07 2018 +0100 scsi: mpt3sas: clarify mmio pointer types The newly added code mixes up phys_addr_t/resource_size_t with dma_addr_t and void pointers, as seen from these compiler warning: drivers/scsi/mpt3sas/mpt3sas_base.c: In function '_base_get_chain_phys': drivers/scsi/mpt3sas/mpt3sas_base.c:235:21: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] base_chain_phys = (void *)ioc->chip_phys + MPI_FRAME_START_OFFSET + ^ drivers/scsi/mpt3sas/mpt3sas_base.c: In function '_clone_sg_entries': drivers/scsi/mpt3sas/mpt3sas_base.c:427:20: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] sgel->Address = (dma_addr_t)dst_addr_phys; ^ drivers/scsi/mpt3sas/mpt3sas_base.c:438:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] (dma_addr_t)buff_ptr_phys; ^ drivers/scsi/mpt3sas/mpt3sas_base.c:444:10: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] (dma_addr_t)buff_ptr_phys; Both dma_addr_t and phys_addr_t may be wider than a pointer, so we must avoid the conversion to pointer types. This also helps readability. A second problem is treating MMIO addresses from a 'struct resource' as addresses that can be used for DMA on that device. In almost all cases, those are the same, but on some of the more obscure architectures, PCI memory address 0 is mapped into the CPU address space at a nonzero offset. I don't have a good fix for that, so I'm adding a comment here, plus a WARN_ON() that triggers whenever the phys_addr_t number is outside of the low 32-bit address space and causes a straight overflow when assigned to the 32-bit sgel->Address. Fixes: 182ac784b41f ("scsi: mpt3sas: Introduce Base function for cloning.") Signed-off-by: Arnd Bergmann Acked-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 42 ++++++++++++++++++++----------------- drivers/scsi/mpt3sas/mpt3sas_base.h | 2 +- 2 files changed, 24 insertions(+), 20 deletions(-) commit 37b96a4931dba07cebbf07092e55d1562155412b Author: Stephen Hemminger Date: Mon Feb 5 10:40:27 2018 -0800 uio_hv_generic: support sub-channels Use sysfs to allow supporting sub-channels. The userspace application makes request to host to create sub-channels and the UIO kernel driver populates the sysfs per-channel directory with a binary attribute file that can be used to read/write ring. Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman Documentation/ABI/stable/sysfs-bus-vmbus | 7 +++ Documentation/driver-api/uio-howto.rst | 5 ++ drivers/uio/uio_hv_generic.c | 89 ++++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+) commit cf21be919c5960da2eb7bc91f8056adb27b56712 Author: Vitaly Kuznetsov Date: Sun Mar 4 22:17:22 2018 -0700 hv_balloon: trace post_status Hyper-V balloon driver makes non-trivial calculations to convert Linux's representation of free/used memory to what Hyper-V host expects to see. Add a tracepoint to see what's being sent and where the data comes from. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/Makefile | 1 + drivers/hv/hv_balloon.c | 6 ++++++ drivers/hv/hv_trace_balloon.h | 48 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) commit bba072d1627222325e79b7b8e6c0847e4a32d96c Author: Vitaly Kuznetsov Date: Sun Mar 4 22:17:21 2018 -0700 hv_balloon: fix bugs in num_pages_onlined accounting Our num_pages_onlined accounting is buggy: 1) In case we're offlining a memory block which was present at boot (e.g. when there was no hotplug at all) we subtract 32k from 0 and as num_pages_onlined is unsigned get a very big positive number. 2) Commit 6df8d9aaf3af ("Drivers: hv: balloon: Correctly update onlined page count") made num_pages_onlined counter accurate on onlining but totally incorrect on offlining for partly populated regions: no matter how many pages were onlined and what was actually added to num_pages_onlined counter we always subtract the full region (32k) so again, num_pages_onlined can wrap around zero. By onlining/offlining the same partly populated region multiple times we can make the situation worse. Solve these issues by doing accurate accounting on offlining: walk HAS list, check for covered range and gaps. Fixes: 6df8d9aaf3af ("Drivers: hv: balloon: Correctly update onlined page count") Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_balloon.c | 82 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 69 insertions(+), 13 deletions(-) commit 4f098af514d2608b74025a27faecc24cce238b71 Author: Vitaly Kuznetsov Date: Sun Mar 4 22:17:20 2018 -0700 hv_balloon: simplify hv_online_page()/hv_page_online_one() Instead of doing pfn_to_page() and continuosly casting page to unsigned long just cache the pfn of the page with page_to_pfn(). Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_balloon.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) commit 223e1e4d2c16fed4ce7d0a092316eff1ba706988 Author: Vitaly Kuznetsov Date: Sun Mar 4 22:17:19 2018 -0700 hv_balloon: fix printk loglevel We have a mix of different ideas of which loglevel should be used. Unify on the following: - pr_info() for normal operation - pr_warn() for 'strange' host behavior - pr_err() for all errors. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_balloon.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 248e742a396e7f00b283f1c56e14b1bef6e3ec56 Author: Michael Kelley Date: Sun Mar 4 22:17:18 2018 -0700 Drivers: hv: vmbus: Implement Direct Mode for stimer0 The 2016 version of Hyper-V offers the option to operate the guest VM per-vcpu stimer's in Direct Mode, which means the timer interupts on its own vector rather than queueing a VMbus message. Direct Mode reduces timer processing overhead in both the hypervisor and the guest, and avoids having timer interrupts pollute the VMbus interrupt stream for the synthetic NIC and storage. This patch enables Direct Mode by default on stimer0 when running on a version of Hyper-V that supports it. In prep for coming support of Hyper-V on ARM64, the arch independent portion of the code contains calls to routines that will be populated on ARM64 but are not needed and do nothing on x86. Signed-off-by: Michael Kelley Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/entry/entry_32.S | 3 ++ arch/x86/entry/entry_64.S | 3 ++ arch/x86/include/asm/hardirq.h | 1 + arch/x86/include/asm/irq_vectors.h | 3 +- arch/x86/include/asm/mshyperv.h | 13 +++++++++ arch/x86/include/uapi/asm/hyperv.h | 3 ++ arch/x86/kernel/cpu/mshyperv.c | 40 ++++++++++++++++++++++++++ arch/x86/kernel/irq.c | 7 +++++ drivers/hv/hv.c | 59 ++++++++++++++++++++++++++++++++++++-- drivers/hv/hyperv_vmbus.h | 4 ++- 10 files changed, 131 insertions(+), 5 deletions(-) commit ce767047b1b731a1899a528338644f2bfdab8b36 Author: Haiyang Zhang Date: Sun Mar 4 22:17:17 2018 -0700 hv_vmbus: Correct the stale comments regarding cpu affinity The comments doesn't match what the current code does, also have a typo. This patch corrects them. Signed-off-by: Haiyang Zhang Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 6 ++---- include/linux/hyperv.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) commit aba8a53264963514917e462f3fbbb66b3de79951 Author: Olaf Hering Date: Sun Mar 4 22:17:15 2018 -0700 tools: hv: include string.h in hv_fcopy_daemon The usage of strchr requires inclusion of string.h. Fixes: 0c38cda64aec ("tools: hv: remove unnecessary header files and netlink related code") Signed-off-by: Olaf Hering Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman tools/hv/hv_fcopy_daemon.c | 1 + 1 file changed, 1 insertion(+) commit 1330fc35327f3ecdfa1aa645e7321ced7349b2cd Author: Dexuan Cui Date: Sun Mar 4 22:17:14 2018 -0700 tools: hv: fix compiler warnings about major/target_fname This patch fixes the below warnings with new glibc and gcc: hv_vss_daemon.c:100:13: warning: In the GNU C Library, "major" is defined by . For historical compatibility, it is currently defined by as well, but we plan to remove this soon. To use "major", include directly. hv_fcopy_daemon.c:42:2: note: 'snprintf' output between 2 and 1040 bytes into a destination of size 260 Signed-off-by: Dexuan Cui Cc: Stephen Hemminger Cc: K. Y. Srinivasan Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman tools/hv/hv_fcopy_daemon.c | 3 ++- tools/hv/hv_vss_daemon.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 68cb8117132c0f18a9ed7f25a51a90cf6d45dbf5 Author: Joe Perches Date: Sun Mar 4 22:17:13 2018 -0700 hv: Synthetic typo correction Just a trivial tyop fix. Signed-off-by: Joe Perches Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 597ff72f3de850c3b93b41eca21732715d6ffc60 Author: Jia-Ju Bai Date: Sun Mar 4 22:17:12 2018 -0700 hyper-v: use GFP_KERNEL for hv_context.hv_numa_map The kzalloc function is called with GFP_ATOMIC. But according to driver call graph, it is not in atomic context, namely no spinlock is held nor in an interrupt handler. This GFP_ATOMIC is unnecessary, and replace with GFP_KERNEL. Signed-off-by: Jia-Ju Bai Reviewed-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ba6341286f20d3b300a8f159aa2a61eca0f4b17 Author: Haiyang Zhang Date: Sun Mar 4 22:17:11 2018 -0700 tools/hv: Fix IP reporting by KVP daemon with SRIOV On Hyper-V the VF NIC has the same MAC as the related synthetic NIC. VF NIC can work under the synthetic NIC transparently, without its own IP address. The existing KVP daemon only gets IP from the first NIC matching a MAC address, and may not be able to find the IP in this case. This patch fixes the problem by searching the NIC matching the MAC, and having an IP address. So, the IP address will be found and reported to the host successfully. Signed-off-by: Haiyang Zhang Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman tools/hv/hv_kvp_daemon.c | 138 ++++++++++++++++++++++------------------------- 1 file changed, 65 insertions(+), 73 deletions(-) commit 60d0bbec5965590d72b1a2091ec7a2cc589cb8e0 Author: Daniel Scheller Date: Tue Mar 6 12:46:37 2018 -0500 media: ngene: compensate for TS buffer offset shifts A possible hardware bug was discovered when using CA addon hardware attached to the ngene hardware, in that the TS input buffer much likely will shift and thus become unaligned to 188 byte blocks (a full TS frame) when things like CA module initialisation (which happens via differing communication paths) take place. This causes the TS NULL removal in tsin_exchange() to fail to detect this previously inserted data and thus causes userspace applications to receive data they didn't sent beforehand and ultimately cause troubles. On driver load with an inserted CAM, buffers are fine at first (note that the driver has to keep the communication running from/to the card by inserting TS NULL frames, this is done in tsout_exchange() via FillTSBuffer() - that data is simply sent back by the hardware): offset | 0 1 2 3 4 5 .... 188 189 190 191 192 193 .... 376 data | 47 1f ff 10 6f 6f .... 47 1f ff 10 6f 6f .... 47 After a few seconds, the CA module is recognised and initialised, which is signalled by dvb_ca_en50221: dvb_ca adapter X: DVB CAM detected and initialised successfully This is where the first shift happens (this is always four bytes), buffer becomes like this: offset | 0 1 2 3 4 5 .... 188 189 190 191 192 193 .... 376 data | 6f 6f 6f 6f 47 1f .... 6f 6f 6f 6f 47 1f .... 6f Next, VDR, TVHeadend or any other CI aware application is started, buffers will shift by even more bytes. It is believed this is due to the hardware not handling control and data bytes properly distinct, and control data having an influence on the actual data stream, which we cannot properly detect at the driver level. Workaround this hardware quirk by adding a detection for the TS sync byte 0x47 before each TS frame copy, scan for a new SYNC byte and a TS NULL packet if buffers become unaligned, take note of that offset and apply that when copying data to the DVB ring buffers. The last <188 bytes from the hardware buffers are stored in a temp buffer (tsin_buffer), for which the remainder will be in the beginning of the next hardware buffer (next iteration of tsin_exchange()). That remainder will be appended to the temp buffer and finally sent to the DVB ring buffer. The resulting TS stream is perfectly fine, and the TS NULL packets inserted by the driver which are sent back are properly removed. The resulting offset is being clamped to 188 byte segments (one TS packet). Though this can result in a repeated TS packet if the overall offset grows beyond this (and it will grow only on CA initialisation), this is still way better than unaligned TS frames and data sent to userspace that just isn't supposed to be there. This compensation can be toggled by the ci_tsfix modparam, which defaults to 1 (enabled). In the case of problems, this can be turned off by setting the parameter to 0 to restore the old behaviour. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-dvb.c | 91 ++++++++++++++++++++++++++++++++++++- drivers/media/pci/ngene/ngene.h | 3 ++ 2 files changed, 93 insertions(+), 1 deletion(-) commit e5fc6767ea4705b1b50de2eb73a99481f5cc1e96 Author: Daniel Scheller Date: Tue Mar 6 12:46:36 2018 -0500 media: ngene: move the tsin_exchange() stripcopy block into a function Move the copy logic that will skip previously inserted TS NULL frames when moving data to the DVB ring buffers into an own function. This is done to not duplicate code all over the place with the following TS offset shift fixup patch. While we're touching this part of the code, get rid of the DEBUG_CI_XFER debug-ifdeffery. This could be toggleable either by a Kconfig or a module param, but in the end this will accidentally be enabled and cause lots of kernel log messages, and such devel debug shouldn't be there anyway. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-dvb.c | 39 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) commit 88cfc33f557241fc0ab415fac37cff0a1d6bbb59 Author: Arushi Singhal Date: Sun Mar 4 10:48:27 2018 -0500 media: staging: media: Replace "dont" with "don't" Replace "dont" with "don't". "Dont" is not same as "Do not" or "Don't". Signed-off-by: Arushi Singhal Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a6e3023c9974a4ef7b847f9820c0a54a3353ec5 Author: Arushi Singhal Date: Sun Mar 4 10:48:25 2018 -0500 media: staging: media: Replace "be be" with "be" This patch replace "be be" with "be". Signed-off-by: Arushi Singhal Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d128679cb33db24ad51ea15992d268eb573a2f62 Author: Arushi Singhal Date: Sat Mar 3 14:26:29 2018 -0500 media: staging: media: Remove unnecessary semicolon Remove unnecessary semicolon found using semicolon.cocci Coccinelle script. Signed-off-by: Arushi Singhal Acked-by: Julia Lawall Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 564246fd3ff41afd3234c18ae28bc4ad9d815f79 Author: Tomoki Sekiyama Date: Sat Mar 3 13:20:56 2018 -0500 media: siano: Fix coherent memory allocation failure on arm64 On some architectures such as arm64, siano chip based TV-tuner USB devices are not recognized correctly due to coherent memory allocation failure with the following error: [ 663.556135] usbcore: deregistering interface driver smsusb [ 683.624809] smsusb:smsusb_probe: board id=18, interface number 0 [ 683.633530] smsusb:smsusb_init_device: smscore_register_device(...) failed, rc -12 [ 683.641501] smsusb:smsusb_probe: Device initialized with return code -12 [ 683.652978] smsusb: probe of 1-1:1.0 failed with error -12 This is caused by dma_alloc_coherent(NULL, ...) returning NULL in smscoreapi.c. To fix this error, allocate the buffer memory for the USB devices via kmalloc() and let the USB core do the DMA mapping and free. Signed-off-by: Tomoki Sekiyama Signed-off-by: Mauro Carvalho Chehab drivers/media/common/siano/smscoreapi.c | 33 ++++++++++++++++++++++----------- drivers/media/common/siano/smscoreapi.h | 2 ++ drivers/media/usb/siano/smsusb.c | 4 ++-- 3 files changed, 26 insertions(+), 13 deletions(-) commit cc9debf84ab359aae2becfb4bc9341f7574fe97b Author: Kirill Kapranov Date: Sat Feb 17 23:02:10 2018 +0200 USB: adutux: Delete a misleading comment Delete a misleading comment to an obvious definition. Signed-off-by: Kirill Kapranov Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/adutux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4c4835171a537d7acb66b21c6f6a046409aa586 Author: Marcus Folkesson Date: Thu Mar 1 08:55:53 2018 +0100 usb: usb-skeleton: make MODULE_LICENSE and SPDX tag match GPL v2 is the original license according to the old license text. See f64cdd0e94f1faf3b7f2b03af71f70dc6d8da0c2. Signed-off-by: Marcus Folkesson Signed-off-by: Greg Kroah-Hartman drivers/usb/usb-skeleton.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1389309c811b0c954bf3b591b761d79b1700283d Author: Paolo Bonzini Date: Mon Feb 26 13:40:09 2018 +0100 KVM: nVMX: expose VMX capabilities for nested hypervisors to userspace Use the new MSR feature framework to tell userspace which VMX capabilities are available for nested hypervisors. Before, these were only accessible with the KVM_GET_MSR VCPU ioctl, after VCPUs had been created. Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 26 +++++++++++++++++++++----- arch/x86/kvm/x86.c | 19 +++++++++++++++++++ 2 files changed, 40 insertions(+), 5 deletions(-) commit 6677f3dad8747a5a84a2e7f67a35444fc9be895a Author: Paolo Bonzini Date: Mon Feb 26 13:40:08 2018 +0100 KVM: nVMX: introduce struct nested_vmx_msrs Move the MSRs to a separate struct, so that we can introduce a global instance and return it from the /dev/kvm KVM_GET_MSRS ioctl. Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 352 +++++++++++++++++++++++++++-------------------------- 1 file changed, 178 insertions(+), 174 deletions(-) commit 6beacf74c25711d5ee83412a3abc839af8ce6697 Author: Wanpeng Li Date: Tue Feb 13 09:05:42 2018 +0800 KVM: X86: Don't use PV TLB flush with dedicated physical CPUs vCPUs are very unlikely to get preempted when they are the only task running on a CPU. PV TLB flush is slower that the native flush in that case, so disable it. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Eduardo Habkost Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kernel/kvm.c | 2 ++ 1 file changed, 2 insertions(+) commit b2798ba0b8769b42f00899b44a538b5fcecb480d Author: Wanpeng Li Date: Tue Feb 13 09:05:41 2018 +0800 KVM: X86: Choose qspinlock when dedicated physical CPUs are available Waiman Long mentioned that: > Generally speaking, unfair lock performs well for VMs with a small > number of vCPUs. Native qspinlock may perform better than pvqspinlock > if there is vCPU pinning and there is no vCPU over-commitment. This patch uses the KVM_HINTS_DEDICATED performance hint, which is provided by the hypervisor admin, to choose the qspinlock algorithm when a dedicated physical CPU is available. PV_DEDICATED = 1, PV_UNHALT = anything: default is qspinlock PV_DEDICATED = 0, PV_UNHALT = 1: default is Hybrid PV queued/unfair lock PV_DEDICATED = 0, PV_UNHALT = 0: default is tas Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Eduardo Habkost Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kernel/kvm.c | 5 +++++ 1 file changed, 5 insertions(+) commit a4429e53c9b3082b05e51224c3d58dbdd39306c5 Author: Wanpeng Li Date: Tue Feb 13 09:05:40 2018 +0800 KVM: Introduce paravirtualization hints and KVM_HINTS_DEDICATED This patch introduces kvm_para_has_hint() to query for hints about the configuration of the guests. The first hint KVM_HINTS_DEDICATED, is set if the guest has dedicated physical CPUs for each vCPU (i.e. pinning and no over-commitment). This allows optimizing spinlocks and tells the guest to avoid PV TLB flush. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Eduardo Habkost Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář Documentation/virtual/kvm/cpuid.txt | 15 +++++++++++++-- arch/mips/include/asm/kvm_para.h | 5 +++++ arch/powerpc/include/asm/kvm_para.h | 5 +++++ arch/s390/include/asm/kvm_para.h | 5 +++++ arch/x86/include/asm/kvm_para.h | 6 ++++++ arch/x86/include/uapi/asm/kvm_para.h | 8 ++++++-- arch/x86/kernel/kvm.c | 5 +++++ include/asm-generic/kvm_para.h | 5 +++++ include/linux/kvm_para.h | 5 +++++ 9 files changed, 55 insertions(+), 4 deletions(-) commit d4c67a7a54f12cb8d267284212f1072c95917e5a Author: Gal Hammer Date: Tue Jan 16 15:34:41 2018 +0200 kvm: use insert sort in kvm_io_bus_register_dev function The loading time of a VM is quite significant with a CPU usage reaching 100% when loading a VM that its virtio devices use a large amount of virt-queues (e.g. a virtio-serial device with max_ports=511). Most of the time is spend in re-sorting the kvm_io_bus kvm_io_range array when a new eventfd is registered. The patch replaces the existing method with an insert sort. Reviewed-by: Marcel Apfelbaum Reviewed-by: Uri Lublin Signed-off-by: Gal Hammer Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář virt/kvm/kvm_main.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 01643c51bfcf2460b530854046f62ce1b29713ab Author: Ken Hofsass Date: Wed Jan 31 16:03:36 2018 -0800 KVM: x86: KVM_CAP_SYNC_REGS This commit implements an enhanced x86 version of S390 KVM_CAP_SYNC_REGS functionality. KVM_CAP_SYNC_REGS "allow[s] userspace to access certain guest registers without having to call SET/GET_*REGS”. This reduces ioctl overhead which is particularly important when userspace is making synchronous guest state modifications (e.g. when emulating and/or intercepting instructions). Originally implemented upstream for the S390, the x86 differences follow: - userspace can select the register sets to be synchronized with kvm_run using bit-flags in the kvm_valid_registers and kvm_dirty_registers fields. - vcpu_events is available in addition to the regs and sregs register sets. Signed-off-by: Ken Hofsass Reviewed-by: David Hildenbrand [Removed wrapper around check for reserved kvm_valid_regs. - Radim] Signed-off-by: Radim Krčmář Documentation/virtual/kvm/api.txt | 40 +++++++++++++++ arch/x86/include/uapi/asm/kvm.h | 19 ++++++- arch/x86/kvm/x86.c | 102 ++++++++++++++++++++++++++++++++------ 3 files changed, 145 insertions(+), 16 deletions(-) commit 7b7e39522a61f402d41dd9a67f3fa2133ef9d4e8 Author: Ken Hofsass Date: Wed Jan 31 16:03:35 2018 -0800 KVM: x86: add SYNC_REGS_SIZE_BYTES #define. Replace hardcoded padding size value for struct kvm_sync_regs with #define SYNC_REGS_SIZE_BYTES. Also update the value specified in api.txt from outdated hardcoded value to SYNC_REGS_SIZE_BYTES. Signed-off-by: Ken Hofsass Reviewed-by: David Hildenbrand Acked-by: Christian Borntraeger Signed-off-by: Radim Krčmář Documentation/virtual/kvm/api.txt | 2 +- include/uapi/linux/kvm.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit faeb7833eee0d6afe0ecb6bdfa6042556c2c352e Author: Roman Kagan Date: Thu Feb 1 16:48:32 2018 +0300 kvm: x86: hyperv: guest->host event signaling via eventfd In Hyper-V, the fast guest->host notification mechanism is the SIGNAL_EVENT hypercall, with a single parameter of the connection ID to signal. Currently this hypercall incurs a user exit and requires the userspace to decode the parameters and trigger the notification of the potentially different I/O context. To avoid the costly user exit, process this hypercall and signal the corresponding eventfd in KVM, similar to ioeventfd. The association between the connection id and the eventfd is established via the newly introduced KVM_HYPERV_EVENTFD ioctl, and maintained in an (srcu-protected) IDR. Signed-off-by: Roman Kagan Reviewed-by: David Hildenbrand [asm/hyperv.h changes approved by KY Srinivasan. - Radim] Signed-off-by: Radim Krčmář Documentation/virtual/kvm/api.txt | 32 ++++++++++++ arch/x86/include/asm/kvm_host.h | 2 + arch/x86/include/uapi/asm/hyperv.h | 2 + arch/x86/kvm/hyperv.c | 103 ++++++++++++++++++++++++++++++++++++- arch/x86/kvm/hyperv.h | 1 + arch/x86/kvm/x86.c | 10 ++++ include/uapi/linux/kvm.h | 15 ++++++ 7 files changed, 164 insertions(+), 1 deletion(-) commit 66231ad3e2886ba99fbf440cea44cab547e5163f Author: Ming Lei Date: Tue Mar 6 12:07:13 2018 +0800 block: null_blk: fix 'Invalid parameters' when loading module On ARM64, the default page size has been 64K on some distributions, and we should allow ARM64 people to play null_blk. This patch fixes the issue by extend page bitmap size for supporting other non-4KB PAGE_SIZE. Cc: Bart Van Assche Cc: Shaohua Li Cc: Kyungchan Koh , Cc: weiping zhang Cc: Yi Zhang Reported-by: Yi Zhang Signed-off-by: Ming Lei Signed-off-by: Jens Axboe drivers/block/null_blk.c | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) commit 2380ca5f1f46412d08c96ebea996e049548829bd Author: Biju Das Date: Tue Nov 14 09:59:03 2017 +0000 dt-bindings: PCI: rcar: Add device tree support for r8a7743 Add support for r8a7743. The Renesas RZ/G1M(R8A7743)PCIe controller is identical to the R-Car Gen2 family. No driver change is needed due to the fallback compatible value "renesas,pcie-rcar-gen2". Adding the SoC-specific compatible values here has three purposes: 1. Document which SoCs have this hardware module, 2. Allow checkpatch to validate compatible values. 3. Allow the driver to support SoC specific implementations in future as necessary. Signed-off-by: Biju Das Signed-off-by: Lorenzo Pieralisi Reviewed-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Acked-by: Simon Horman Documentation/devicetree/bindings/pci/rcar-pci.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e97c19074f282f20625d4522da184647a5c9b52c Author: Luca Ceresoli Date: Fri Mar 2 04:37:20 2018 -0500 media: doc: poll: fix links to dual-ioctl sections Links like :ref:`VIDIOC_STREAMON` expand to "ioctl VIDIOC_STREAMON, VIDIOC_STREAMOFF". Thus our reader will think we are talking about STREAMON _and_ STREAMOFF, but only one of the two actually applies in some cases. Fix by adding a link title, so the reader will read only the correct ioctl name. Signed-off-by: Luca Ceresoli Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/func-poll.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f41d19beccfebb84abc729e2d8ece0c368b2152f Author: Chris Wilson Date: Tue Mar 6 13:01:43 2018 +0000 drm/i915: Flush waiters on seqno wraparound Previously, we would spin waiting for all waiters to wake up and notice their request had completed before we would reset the seqno upon wraparound. However, we can mark their waits as complete and wake them up directly using the existing machinery for handling the flushing of missed wakeups when idling. Suggested-by: Joonas Lahtinen Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180306130143.13312-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_request.c | 6 ++---- drivers/gpu/drm/i915/intel_breadcrumbs.c | 19 ------------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 - 3 files changed, 2 insertions(+), 24 deletions(-) commit 93eef7d65329b62cf8a6db918fe5ca5d84eedf50 Author: Chris Wilson Date: Tue Mar 6 13:01:42 2018 +0000 drm/i915: Stop kicking the signaling thread on seqno wraparound Since commit fd10e2ce9905 ("drm/i915/breadcrumbs: Ignore unsubmitted signalers"), we cancel the signaler when retiring the request and so upon wraparound, where we wait for all requests to be retired, we no longer need to spin waiting for the signaling thread to release its references to the in-flight requests, and so we can assert that the signaler is idle. References: fd10e2ce9905 ("drm/i915/breadcrumbs: Ignore unsubmitted signalers") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180306130143.13312-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_request.c | 2 ++ drivers/gpu/drm/i915/intel_breadcrumbs.c | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) commit f68e68d2923069fd9b21aa1e7ed445cda2f6db05 Author: Dan Carpenter Date: Thu Mar 1 05:07:14 2018 -0500 media: ov5695: Off by one in ov5695_enum_frame_sizes() The ">" should be ">=" so that we don't read one element beyond the end of the array. Fixes: 8a77009be4be ("media: ov5695: add support for OV5695 sensor") Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5695.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 186ca446aea19e49d2e1433dd170c6e1c211a52a Author: Christian König Date: Tue Feb 27 12:49:57 2018 +0100 drm/prime: make the pages array optional for drm_prime_sg_to_page_addr_arrays Most of the time we only need the dma addresses. Signed-off-by: Christian König Reviewed-by: Roger He Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20180227115000.4105-2-christian.koenig@amd.com Link: https://patchwork.freedesktop.org/patch/msgid/20180227115000.4105-3-christian.koenig@amd.com Link: https://patchwork.freedesktop.org/patch/msgid/20180227115000.4105-4-christian.koenig@amd.com Link: https://patchwork.freedesktop.org/patch/msgid/20180227115000.4105-5-christian.koenig@amd.com Link: https://patchwork.freedesktop.org/patch/msgid/BN6PR12MB18262C0DE9B5F07B9A42EAE7F2C60@BN6PR12MB1826.namprd12.prod.outlook.com drivers/gpu/drm/drm_prime.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 67f2219ce1d11a0e160f6aa0b463aee1614f0b9c Author: Shunqian Zheng Date: Thu Mar 1 03:44:16 2018 -0500 media: ov2685: Not delay latch for gain Update the register 0x3503 to use 'no delay latch' for gain. This makes sensor to output the first frame as normal rather than a very dark one. Signed-off-by: Shunqian Zheng Reviewed-by: Tomasz Figa Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2685.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 997ef6b2627c54f5404c2f444e52c7140d1b6d01 Author: Arnd Bergmann Date: Wed Feb 28 18:19:37 2018 -0500 media: renesas-ceu: mark PM functions as __maybe_unused The PM runtime operations are unused when CONFIG_PM is disabled, leading to a harmless warning: drivers/media/platform/renesas-ceu.c:1003:12: error: 'ceu_runtime_suspend' defined but not used [-Werror=unused-function] static int ceu_runtime_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~ drivers/media/platform/renesas-ceu.c:987:12: error: 'ceu_runtime_resume' defined but not used [-Werror=unused-function] static int ceu_runtime_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~ This adds a __maybe_unused annotation to shut up the warning. Fixes: 32e5a70dc8f4 ("media: platform: Add Renesas CEU driver") Signed-off-by: Arnd Bergmann Reviewed-by: Simon Horman Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/renesas-ceu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 681066ec1d41e4b299146bada52cef846b323c04 Author: Christian König Date: Tue Feb 27 12:49:56 2018 +0100 drm/prime: fix potential race in drm_gem_map_detach Unpin the GEM object only after freeing the sg table. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Acked-by: Roger He Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20180227115000.4105-1-christian.koenig@amd.com drivers/gpu/drm/drm_prime.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit cbc0236a4b3e6a64f5b8bee27b530c7f8bee8d56 Author: Roman Kagan Date: Thu Feb 1 16:48:31 2018 +0300 kvm: x86: factor out kvm.arch.hyperv (de)init Move kvm.arch.hyperv initialization and cleanup to separate functions. For now only a mutex is inited in the former, and the latter is empty; more stuff will go in there in a followup patch. Signed-off-by: Roman Kagan Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/hyperv.c | 9 +++++++++ arch/x86/kvm/hyperv.h | 3 +++ arch/x86/kvm/x86.c | 3 ++- 3 files changed, 14 insertions(+), 1 deletion(-) commit 309131594016651ab44753ea447a36987e8f4c23 Author: Jacopo Mondi Date: Tue Feb 27 12:32:52 2018 -0500 media: platform: renesas-ceu: Fix CSTRST_CPON mask The CSTRST_CPON mask was wrongly assigned to BIT(1) instead of BIT(0). Fix that by changing the mask opportunely. Reported-by: Dylan Laduranty Signed-off-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/renesas-ceu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c87867872318632c7ba440147e32f0f8c735e9c Author: Jasmin Jessich Date: Tue Mar 6 11:39:13 2018 -0500 media: MAINTAINERS: add entry for cxd2099 The cxd2099 driver is now maintained and being taken care of by * Jasmin Jessich Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7bb02ee380c7463746bd71be5e6e69ef751fd809 Author: Daniel Scheller Date: Tue Mar 6 11:39:12 2018 -0500 media: dvb-frontends/cxd2099: remove remainders from old attach way As all drivers using the cxd2099 are converted to handle attach/detach the generic I2C client way, the static inline cxd2099_attach isn't required anymore. Thus cleanup cxd2099.h from the remainders, the adr struct member also isn't used anymore. Signed-off-by: Daniel Scheller Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2099.h | 10 ---------- 1 file changed, 10 deletions(-) commit 643f06fbe01730359b525b382f85dae906d6f2df Author: Daniel Scheller Date: Tue Mar 6 11:39:11 2018 -0500 media: ngene: add I2C_FUNC_I2C to the I2C interface functionality Report I2C_FUNC_I2C in .functionality() as well. The I2C interface can handle this fine and even is required for all I2C client drivers that utilise the regmap API which are used from within the ngene driver. Signed-off-by: Daniel Scheller Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5eaf6f88b9deac71f6985fa5f84dcd68087a64c Author: Daniel Scheller Date: Tue Mar 6 11:39:10 2018 -0500 media: ddbridge: adapt cxd2099 attach to new i2c_client way Change the way the cxd2099 hardware is being attached to the new I2C client interface way. Signed-off-by: Daniel Scheller Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/ddbridge-ci.c | 62 +++++++++++++++++++++++++++++--- drivers/media/pci/ddbridge/ddbridge.h | 1 + 2 files changed, 58 insertions(+), 5 deletions(-) commit d6bdd009c21db3f677dd1d1bbb8c20bc819074bc Author: Brendan Higgins Date: Thu Aug 17 07:20:09 2017 -0700 arm: dts: add Nuvoton NPCM750 device tree Add a common device tree for all Nuvoton NPCM750 BMCs and a board specific device tree for the NPCM750 (Poleg) evaluation board. Signed-off-by: Brendan Higgins Reviewed-by: Tomer Maimon Reviewed-by: Avi Fishman Reviewed-by: Joel Stanley Reviewed-by: Rob Herring Tested-by: Tomer Maimon Tested-by: Avi Fishman Tested-by: Joel Stanley Signed-off-by: Arnd Bergmann .../arm/cpu-enable-method/nuvoton,npcm750-smp | 42 ++++++ .../devicetree/bindings/arm/npcm/npcm.txt | 6 + arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 35 +++++ arch/arm/boot/dts/nuvoton-npcm750.dtsi | 165 +++++++++++++++++++++ 5 files changed, 250 insertions(+) commit e107f4bb65e4ab55cf6a43af51254cd3e9c66066 Merge: e9c112c 1d7592f Author: Arnd Bergmann Date: Tue Mar 6 18:00:50 2018 +0100 Merge tag 'reset-for-4.17' of git://git.pengutronix.de/git/pza/linux into next/drivers Pull "Reset controller changes for v4.17" from Philipp Zabel: This enables level resets on Meson8b SoCs. Level resets have been previously implemented for the newer Meson GX SoCs, so this removes the distinction between the two families in the meson-reset driver. Also enables the ASPEED LPC reset controller on ASPEED AST2400 and AST2500 SoCs, by adding compatibles to the simple-reset driver. * tag 'reset-for-4.17' of git://git.pengutronix.de/git/pza/linux: reset: simple: Enable for ASPEED systems dt-bindings: aspeed-lpc: Add reset controller reset: meson: enable level reset support on Meson8b commit 27a48feac025f121414e6953912312c395f6a7f9 Author: Jacopo Mondi Date: Fri Mar 2 09:46:43 2018 -0500 media: ov772x: Unregister async subdevice As the media subdevice is registered with 'v4l2_async_register_subdev()' unregister it at module removal time with 'v4l2_async_unregister_subdev()' Signed-off-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov772x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9c70bbd39a5b076e1eaa88d53530d0219f7630e Author: Jacopo Mondi Date: Fri Mar 2 09:46:42 2018 -0500 media: ov772x: Replace msleep(1) with usleep_range msleep() can sleep up to 20ms. As suggested by Documentation/timers/timers_howto.txt replace it with usleep_range() with up to 5ms delay. Signed-off-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov772x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0853a4324ad48ea5dd40720227270e7e0464006 Author: Jacopo Mondi Date: Fri Mar 2 09:46:40 2018 -0500 media: ov772x: Empty line before end-of-function return Add an empty line before return at the end of functions. Signed-off-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov772x.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2a2f21e38aa6d11ffbcdde22defc7b06f3d1fe53 Author: Jacopo Mondi Date: Fri Mar 2 09:46:39 2018 -0500 media: ov772x: Re-organize in-code comments A lot of comments that would fit a single line were spread on two or more lines. Also fix capitalization and punctuation where appropriate. Signed-off-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov772x.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) commit eee34d8b784a4203863908f3ab67aa0830f18c8c Author: Jacopo Mondi Date: Fri Mar 2 09:46:38 2018 -0500 media: ov772x: Align function parameters Align all function parameters to first open brace when declaring functions. Signed-off-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov772x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7bd8c4f2e8006972c8d4b17f5c5b632334912980 Author: Jacopo Mondi Date: Fri Mar 2 09:46:37 2018 -0500 media: tw9910: Replace msleep(1) with usleep_range msleep() can sleep up to 20ms. As suggested by Documentation/timers/timers_howto.txt replace it with usleep_range() with up to 5ms delay. Signed-off-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tw9910.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7470230a43c5a60a8c9d8d89000f401197ea6d64 Author: Jacopo Mondi Date: Fri Mar 2 09:46:36 2018 -0500 media: tw9910: Sort includes alphabetically Sort include directives alphabetically to ease maintenance. Signed-off-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tw9910.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5d1787e75ee23af00bd7c7d28a07c5671a1543c1 Author: Jacopo Mondi Date: Fri Mar 2 09:46:35 2018 -0500 media: tw9910: Mixed style fixes Two minor style fixes, align function parameter and remove un-necessary spaces. Signed-off-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tw9910.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cb5fd12afd9af8d40b330e45665d46dca6feeef2 Author: Joe Perches Date: Thu Mar 1 07:01:22 2018 -0500 media: tw9910: Miscellaneous neatening Yet more whitespace and style neatening o Add blank lines before returns o Reverse a logic test and return early on error o Move formats to same line as dev_ calls o Remove an unnecessary period from a logging message Signed-off-by: Joe Perches Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tw9910.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit d6fdad5541922edd0f40c1cc0a86990b94229069 Author: Joe Perches Date: Thu Mar 1 06:50:22 2018 -0500 media: tw9910: Whitespace alignment Update multiline statements to open parenthesis. Update a ?: to a single line. Signed-off-by: Joe Perches Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tw9910.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 99b010b66f0d60173f1c83d33d9ec1d14c62db26 Author: Jacopo Mondi Date: Fri Mar 2 09:46:34 2018 -0500 media: tw9910: Re-organize in-code comments A lot of comments that would fit a single line were spread on two or more lines. Also fix capitalization and punctuation where appropriate. Signed-off-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tw9910.c | 44 +++++++++++++------------------------------- 1 file changed, 13 insertions(+), 31 deletions(-) commit 7bffa14c9aed5f788d3126271f0fd8758fbd129e Author: Brendan Higgins Date: Wed Aug 16 12:18:39 2017 -0700 arm: npcm: add basic support for Nuvoton BMCs Adds basic support for the Nuvoton NPCM750 BMC. Signed-off-by: Brendan Higgins Reviewed-by: Tomer Maimon Reviewed-by: Avi Fishman Tested-by: Tomer Maimon Tested-by: Avi Fishman Signed-off-by: Arnd Bergmann arch/arm/Kconfig | 2 ++ arch/arm/Makefile | 1 + arch/arm/mach-npcm/Kconfig | 48 ++++++++++++++++++++++++++ arch/arm/mach-npcm/Makefile | 3 ++ arch/arm/mach-npcm/headsmp.S | 17 ++++++++++ arch/arm/mach-npcm/npcm7xx.c | 20 +++++++++++ arch/arm/mach-npcm/platsmp.c | 81 ++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 172 insertions(+) commit 6a498e06ba22872d3a27cc0dae77b9314b1de48b Author: Brendan Higgins Date: Thu Aug 17 09:44:32 2017 -0700 MAINTAINERS: Add entry for the Nuvoton NPCM architecture Add maintainers and reviewers for the Nuvoton NPCM architecture. Signed-off-by: Brendan Higgins Reviewed-by: Tomer Maimon Reviewed-by: Avi Fishman Signed-off-by: Arnd Bergmann MAINTAINERS | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 6daaca522ab464d32419aea61dd1b41dc1c71dba Author: Dan Williams Date: Mon Mar 5 16:40:05 2018 -0800 device-dax: remove redundant __func__ in dev_dbg Dynamic debug can be instructed to add the function name to the debug output using the +f switch, so there is no need for the dax modules to do it again. If a user decides to add the +f switch for the dax modules' dynamic debug this results in double prints of the function name. Reported-by: Johannes Thumshirn Reported-by: Ross Zwisler Reviewed-by: Ross Zwisler Signed-off-by: Dan Williams drivers/dax/device.c | 38 +++++++++++++++++--------------------- drivers/dax/pmem.c | 6 +++--- 2 files changed, 20 insertions(+), 24 deletions(-) commit 6ca620371ab2dab89a7645fc363453d2e26c992e Author: Andrzej Hajda Date: Tue Feb 27 08:11:32 2018 +0100 arm64: dts: exynos: add OF graph between MHL and USB connector OF graph describes MHL data lanes between MHL and respective USB connector. Signed-off-by: Andrzej Hajda Signed-off-by: Krzysztof Kozlowski .../boot/dts/exynos/exynos5433-tm2-common.dtsi | 31 +++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit 37b93304589887698640d76330235c3cf95c06cb Author: Andrzej Hajda Date: Tue Feb 27 08:11:31 2018 +0100 arm64: dts: exynos: add micro-USB connector node to TM2 platforms Since USB connector bindings are available we can describe it on TM2(e). Signed-off-by: Andrzej Hajda Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 426824d63b77bde61422ed6e19ac7c62c1f06fca Author: Dan Williams Date: Mon Mar 5 16:39:31 2018 -0800 libnvdimm: remove redundant __func__ in dev_dbg Dynamic debug can be instructed to add the function name to the debug output using the +f switch, so there is no need for the libnvdimm modules to do it again. If a user decides to add the +f switch for libnvdimm's dynamic debug this results in double prints of the function name. Reported-by: Johannes Thumshirn Reported-by: Ross Zwisler Signed-off-by: Dan Williams drivers/nvdimm/btt_devs.c | 21 ++++++++--------- drivers/nvdimm/bus.c | 13 +++++------ drivers/nvdimm/claim.c | 2 +- drivers/nvdimm/core.c | 6 ++--- drivers/nvdimm/dax_devs.c | 5 ++-- drivers/nvdimm/dimm_devs.c | 7 +++--- drivers/nvdimm/label.c | 51 +++++++++++++++++++---------------------- drivers/nvdimm/namespace_devs.c | 38 +++++++++++++----------------- drivers/nvdimm/pfn_devs.c | 25 ++++++++++---------- drivers/nvdimm/pmem.c | 2 +- 10 files changed, 77 insertions(+), 93 deletions(-) commit 1796483fcdfbd657f10464bb988da57eaf6b37d3 Author: Niklas Cassel Date: Wed Feb 21 10:00:00 2018 +0100 ARM: dts: artpec: add node for hardware crypto accelerator Add node for the hardware crypto acceleration used in the artpec6 SoC. Signed-off-by: Niklas Cassel Signed-off-by: Arnd Bergmann arch/arm/boot/dts/artpec6.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 870e0ecc31f4d55efea75f82808da58cb7b930db Author: Niklas Cassel Date: Wed Feb 21 09:59:59 2018 +0100 ARM: dts: artpec: add disabled node for PCIe endpoint mode The PCIe controller in the artpec6 SoC supports both root complex and endpoint mode, however, the controller can only be used in one of the modes. Both pci nodes are disabled by default. A DTS file can enable one of them, depending on what mode it wants to run. Signed-off-by: Niklas Cassel Signed-off-by: Arnd Bergmann arch/arm/boot/dts/artpec6.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit e4202ef7b96e488628c30b2da3b3bd2c1eed542b Author: Niklas Cassel Date: Wed Feb 21 09:59:58 2018 +0100 ARM: dts: artpec: add and utilize nbpfaxi DMA controllers Add nodes for the nbpfaxi DMA controllers used in the artpec6 SoC, and start using them for the exising UARTs. Signed-off-by: Niklas Cassel Signed-off-by: Arnd Bergmann arch/arm/boot/dts/artpec6.dtsi | 58 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 3745d19b929b9a3404e54c787720d580b3a5fb23 Author: Niklas Cassel Date: Wed Feb 21 09:59:57 2018 +0100 ARM: dts: artpec: add and utilize artpec6 pin controller Add node for the pin controller used in the artpec6 SoC, and start using it for the exising UARTs. Signed-off-by: Niklas Cassel Signed-off-by: Arnd Bergmann arch/arm/boot/dts/artpec6.dtsi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit b49de2dfcf207e763a3b1fe63630a22183706842 Author: Niklas Cassel Date: Wed Feb 21 09:59:56 2018 +0100 ARM: dts: artpec: migrate ethernet to stmmac binding The snps,dwc-qos-ethernet binding is still supported as a glue layer in the stmmac driver. However, since the snps,dwc-qos-ethernet binding is now deprecated, migrate to stmmac's native binding. At the same time, enable features supported by the stmmac driver, such as PTP, LPI, and an additional tx queue. Signed-off-by: Niklas Cassel Signed-off-by: Arnd Bergmann arch/arm/boot/dts/artpec6-devboard.dts | 1 + arch/arm/boot/dts/artpec6.dtsi | 42 ++++++++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 7 deletions(-) commit 60bed798408f91b066d9ac02e78a9a65b37eb3b0 Author: Niklas Cassel Date: Wed Feb 21 09:59:55 2018 +0100 ARM: dts: artpec: remove 0x prefix from clkctrl unit address Remove 0x prefix from clkctrl unit address. This silences the following dtc warning: Warning (unit_address_format): Node /clkctrl@0xf8000000 unit name should not have leading "0x" Signed-off-by: Niklas Cassel Signed-off-by: Arnd Bergmann arch/arm/boot/dts/artpec6.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f659e12eb7ded8a0083328b77bf13fa609e4a1b8 Author: Niklas Cassel Date: Wed Feb 21 09:59:54 2018 +0100 ARM: dts: artpec: use 1 GiB RAM There has never been an artpec6 devboard produced with less than 1 GiB RAM. Increase the default value to 1 GiB RAM, so that we can netboot with large initramfs without going OOM. Signed-off-by: Niklas Cassel Signed-off-by: Arnd Bergmann arch/arm/boot/dts/artpec6-devboard.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0fc123744e8fbe6dd933b5ef2892e4c70d2f2fb3 Author: Niklas Cassel Date: Wed Feb 21 09:59:53 2018 +0100 ARM: dts: artpec: disable Accelerator Coherency Port Accesses via 0x80000000 go through the ACP instead of using the DDR directly. Unfortunately the ACP has proven to be the cause of complete system hangs. Disabling the ACP makes these problems go away. Signed-off-by: Niklas Cassel Signed-off-by: Arnd Bergmann arch/arm/boot/dts/artpec6.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit edcefb96fb07f6742fd47ac60915e76c1b77768e Author: Marek Szyprowski Date: Tue Mar 6 15:33:10 2018 +0100 clk: samsung: exynos5250: Move PD-dependent clocks to Exynos5 sub-CMU Clocks related to DISP1 block require special handling for power domain turn on/off sequences. Till now this was handled by Exynos power domain driver, but that approach was limited only to some special cases. This patch moves handling of those operations to clock controller driver. This gives more flexibility and allows fine tune values of some clock-specific registers. This patch moves handling of those mentioned clocks to Exynos5 sub-CMU driver instantiated from Exynos5250 driver. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/Makefile | 1 + drivers/clk/samsung/clk-exynos5-subcmu.c | 1 + drivers/clk/samsung/clk-exynos5250.c | 51 ++++++++++++++++++++++---------- drivers/soc/samsung/pm_domains.c | 1 + 4 files changed, 38 insertions(+), 16 deletions(-) commit ec4016ff6e60fffab2e34fe87578c6362147cb98 Author: Marek Szyprowski Date: Tue Mar 6 15:33:09 2018 +0100 clk: samsung: exynos5420: Move PD-dependent clocks to Exynos5 sub-CMU Clocks related to DISP, GSC and MFC blocks require special handling for power domain turn on/off sequences. Till now this was handled by Exynos power domain driver, but that approach was limited only to some special cases. This patch moves handling of those operations to clock controller driver. This gives more flexibility and allows fine tune values of some clock-specific registers. This patch moves handling of those mentioned clocks to Exynos5 sub-CMU driver instantiated from Exynos5420 driver. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/Makefile | 1 + drivers/clk/samsung/clk-exynos5-subcmu.c | 2 + drivers/clk/samsung/clk-exynos5420.c | 121 ++++++++++++++++++++++++------- drivers/soc/samsung/pm_domains.c | 2 + 4 files changed, 100 insertions(+), 26 deletions(-) commit b06a532bf1fa99af0d9364e5dfb8654fa78d490b Author: Marek Szyprowski Date: Tue Mar 6 15:33:08 2018 +0100 clk: samsung: Add Exynos5 sub-CMU clock driver Exynos5250/5420/5800 have only one clock controller, but some of their clock depends on respective power domains. Handling integration of clock controller and power domain can be done using runtime PM feature of CCF framework. This however needs a separate struct device for each power domain. This patch adds such separate driver for a group of such clocks, which can be instantiated more than once, each time for a different power domain. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5-subcmu.c | 186 +++++++++++++++++++++++++++++++ drivers/clk/samsung/clk-exynos5-subcmu.h | 26 +++++ 2 files changed, 212 insertions(+) commit 9fb1636c213541fbb3cd0a4491891bd5c5399406 Merge: 1d5013f af8d30a Author: Sylwester Nawrocki Date: Tue Mar 6 17:37:16 2018 +0100 Merge branch 'for-v4.17/power_domains' into for-v4.17/next commit af8d30ac64e1ddef50981dc039f5773f57338b1a Author: Marek Szyprowski Date: Wed Feb 21 11:15:22 2018 +0100 soc: samsung: pm_domains: Add blacklisting clock handling Handling of clock reparenting will be move to clock controller driver, so add possibility to blacklist clock handling on systems, where the clock controller already does all needed operations. This is needed to avoid potential deadlock on clock reparenting during power domain on/off procedure. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/soc/samsung/pm_domains.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit e9c112c94b014b581380d370d3fa2f1d23d07cc0 Author: Robin Murphy Date: Thu Feb 15 18:51:46 2018 +0000 perf/arm-cci: Untangle global cci_ctrl_base Depending directly on the bus driver's global cci_ctrl_base variable is a little unpleasant, and exporting it to allow the PMU driver to be modular would be even more so. Let's make things a little better abstracted by adding the control register block to the cci_pmu instance data alongside the PMU register block, and communicating the mapped address from the bus driver via platform data. It's not practical to try the same thing for the bus driver itself, given that the globals are entangled with the hairy assembly code for port control, so we leave them be there. It would however be prudent to move them to the __ro_after_init section in passing, since the addresses really should never be changing once set. Signed-off-by: Robin Murphy Signed-off-by: Arnd Bergmann drivers/bus/arm-cci.c | 17 +++++++++++++---- drivers/perf/arm-cci.c | 47 ++++++++++++++++++++++++----------------------- 2 files changed, 37 insertions(+), 27 deletions(-) commit 32837954db462ecc28051923109ef6e4a221f2b2 Author: Robin Murphy Date: Thu Feb 15 18:51:45 2018 +0000 perf/arm-cci: Clean up model discovery Since I am the self-appointed of_device_get_match_data() police, it's only right that I should clean up this driver while I'm otherwise touching it. This also reveals that we're passing around a struct platform_device in places where we only ever care about its regular device, so straighten that out in the process. Acked-by: Punit Agrawal Acked-by: Will Deacon Signed-off-by: Robin Murphy Signed-off-by: Arnd Bergmann drivers/perf/arm-cci.c | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) commit 3ee5e821f3a1affd406ff1031f4cf6d7b4f81ab3 Author: Robin Murphy Date: Thu Feb 15 18:51:44 2018 +0000 bus/arm-cci: Streamline devicetree handling a bit Rather than iterating over child nodes explicitly testing for availability, we can just use the other helper which already subsumes that check. Also, the availability check is already NULL-safe, so get rid of a redundant check in cci_probe(), too. Acked-by: Punit Agrawal Acked-by: Will Deacon Signed-off-by: Robin Murphy Signed-off-by: Arnd Bergmann drivers/bus/arm-cci.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 03057f2626e955ebea88a668a6d7d699f836e5c0 Author: Robin Murphy Date: Thu Feb 15 18:51:43 2018 +0000 perf/arm-cci: Simplify CPU hotplug Realistically, systems with multiple CCIs are unlikely to ever exist, and since the driver only actually supports a single instance anyway there's really no need to do the multi-instance hotplug state dance. Take the opportunity to simplify the hotplug-related code all over, addressing the context-migration TODO in the process for good measure. Acked-by: Punit Agrawal Acked-by: Will Deacon Signed-off-by: Robin Murphy Signed-off-by: Arnd Bergmann drivers/perf/arm-cci.c | 56 +++++++++++++++++--------------------------------- 1 file changed, 19 insertions(+), 37 deletions(-) commit 3de6be7a3dd8934e59d85fc60a170d4ab2f0a0f2 Author: Robin Murphy Date: Thu Feb 15 18:51:42 2018 +0000 drivers/bus: Split Arm CCI driver The arm-cci driver is really two entirely separate drivers; one for MCPM port control and the other for the performance monitors. Since they are already relatively self-contained, let's take the plunge and move the PMU parts out to drivers/perf where they belong these days. For non-MCPM systems this leaves a small dependency on the remaining "bus" stub for initial probing and discovery, but we end up with something that still fits the general pattern of its fellow system PMU drivers to ease future maintenance. Moving code to a new file also offers a perfect excuse to modernise the license/copyright headers and clean up some funky linewraps on the way. Cc: Lorenzo Pieralisi Reviewed-by: Suzuki Poulose Acked-by: Punit Agrawal Signed-off-by: Robin Murphy Signed-off-by: Arnd Bergmann drivers/bus/Kconfig | 28 - drivers/bus/arm-cci.c | 1745 +---------------------------------------------- drivers/perf/Kconfig | 26 + drivers/perf/Makefile | 1 + drivers/perf/arm-cci.c | 1747 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 1776 insertions(+), 1771 deletions(-) commit 1888d3ddc3d6a2511be86045cfb2e7ea5fc67c44 Author: Robin Murphy Date: Thu Feb 15 18:51:41 2018 +0000 drivers/bus: Move Arm CCN PMU driver The arm-ccn driver is purely a perf driver for the CCN PMU, not a bus driver in the sense of the other residents of drivers/bus/, so let's move it to the appropriate place for SoC PMU drivers. Not to mention moving the documentation accordingly as well. Acked-by: Pawel Moll Acked-by: Will Deacon Signed-off-by: Robin Murphy Signed-off-by: Arnd Bergmann Documentation/arm/CCN.txt | 59 - Documentation/devicetree/bindings/arm/ccn.txt | 22 - Documentation/devicetree/bindings/perf/arm-ccn.txt | 22 + Documentation/perf/arm-ccn.txt | 59 + drivers/bus/Kconfig | 8 - drivers/bus/Makefile | 2 - drivers/bus/arm-ccn.c | 1597 -------------------- drivers/perf/Kconfig | 7 + drivers/perf/Makefile | 1 + drivers/perf/arm-ccn.c | 1597 ++++++++++++++++++++ 10 files changed, 1686 insertions(+), 1688 deletions(-) commit 6294513dbe61ba0ab1d9201cd3b283fe1cfc7617 Author: Daniel Scheller Date: Sun Feb 25 12:06:56 2018 -0500 media: ngene: add proper polling to the dvbdev_ci file ops Implement the poll callback for the dvbdev_ci file ops. The ts_poll() function queries the DVB ring buffers for available data and space, and reports this as appropriate. Also, set the dvb_device readers, writers and users to proper values (one reader, one writer, two users). This fixes the raw CI TS transport in conjunction with TVheadend's DDCI functionality. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-dvb.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 30314c33a52fa675bd3404772fd2aa03fe7b39f2 Author: Ard Biesheuvel Date: Wed Feb 14 09:26:37 2018 +0000 arm64: defconfig: add support for Socionext SynQuacer based platforms Enable support in arm64's defconfig for Socionext SynQuacer based platforms, by enabling the arch Kconfig symbol, and enabling builtin support for the ethernet, GPIO and SDHCI controllers Signed-off-by: Ard Biesheuvel Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 4 ++++ 1 file changed, 4 insertions(+) commit b1bdf5084e88acdab7f9f8084e308f7cd8eed3a0 Author: Ard Biesheuvel Date: Wed Feb 14 09:26:36 2018 +0000 arm64: defconfig: add newly added accelerated crypto modules New crypto drivers have been introduced in v4.16 that implement the SHA-512, SHA3 and SM3 secure hash algorithms using ARMv8.2 optional instructions. Add these drivers to arm64's defconfig as modules. Signed-off-by: Ard Biesheuvel Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 96c7bc8c7e9ddbc3887e6f9dc3079d5ab896a3a3 Author: Daniel Scheller Date: Sun Feb 25 07:31:38 2018 -0500 media: ngene: don't treat non-existing demods as error When probing the I2C busses in cineS2_probe(), it's no error when there's no hardware connected to the probed expansion connector, so print this informal message with info severity. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e39b8e945eb749d3bef21b38309f84de8f7a3007 Author: Daniel Scheller Date: Sun Feb 25 07:31:37 2018 -0500 media: ngene: check for CXD2099AR presence before attaching Currently, if there's no CXD2099AR attached to any expansion connector of the ngene hardware, it will complain with this on every module load: cxd2099 1-0040: No CXD2099AR detected at 0x40 cxd2099: probe of 1-0040 failed with error -5 ngene 0000:02:00.0: CXD2099AR attach failed This happens due to the logic assuming such hardware is always there and blindly tries to attach the cxd2099 I2C driver. Rather add a probe function (in ngene-cards.c with a prototype in ngene.h) to check for the existence of such hardware before probing, and don't try further if no CXD2099 was found. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-cards.c | 19 +++++++++++++++++++ drivers/media/pci/ngene/ngene-core.c | 14 ++++++++++++++ drivers/media/pci/ngene/ngene.h | 3 +++ 3 files changed, 36 insertions(+) commit ee93340e98bc9026dedf6e7483f9f092d1765582 Author: Daniel Scheller Date: Sun Feb 25 07:31:36 2018 -0500 media: ngene: deduplicate I2C adapter evaluation The I2C adapter evaluation (based on chan->number) is duplicated at several places (tuner_attach_() functions, demod_attach_stv0900() and cineS2_probe()). Clean this up by wrapping that construct in a separate function which all users of that can pass the ngene_channel pointer and get the correct I2C adapter from. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-cards.c | 41 +++++++++++++---------------------- 1 file changed, 15 insertions(+), 26 deletions(-) commit 3262831b4a9a6c0441c94a7d1c378751f462ac92 Author: Daniel Scheller Date: Sun Feb 25 07:31:35 2018 -0500 media: ngene: add support for DuoFlex S2 V4 addon modules Add support for the STV0910/STV6111/LNBH25 based DuoFlex S2 V4 DVB-S2 addon modules by recognizing them from their XO2 type value and using the auxiliary stv0910, stv6111 and lnbh25 driver to form a complete DVB frontend. This also adds autoselection (if MEDIA_SUBDRV_AUTOSELECT) of the STV0910, STV6111 and LNBH25 demod/tuner/LNB-IC drivers to Kconfig. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/Kconfig | 3 ++ drivers/media/pci/ngene/ngene-cards.c | 83 +++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) commit 42b6515fd55d5c4dbeb8183ad18b289182e80456 Author: Daniel Scheller Date: Sun Feb 25 07:31:34 2018 -0500 media: ngene: add support for Sony CXD28xx-based DuoFlex modules Recognize (probe) and support (attach) all Sony CXD28xx based DuoFlex addon modules/cards, namely the DuoFlex CT2 (CXD2837), ISDB-T (CXD2838), C2T2 (CXD2843) and C2T2I (CXD2854). Since all these modules are equipped with a MachXO2 interface, that support is required for the hardware to work. This functionality utilises the auxiliary cxd2841er and tda18212 drivers. This also adds autoselection (if MEDIA_SUBDRV_AUTOSELECT) of the CXD2841ER demod driver to Kconfig. The __maybe_unused annotation can now be removed from the xo2names array. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/Kconfig | 1 + drivers/media/pci/ngene/ngene-cards.c | 63 ++++++++++++++++++++++++++++++++--- 2 files changed, 59 insertions(+), 5 deletions(-) commit 5ebbb5b4d424e030b7d240ce71767c4145c7f26e Author: Ville Syrjälä Date: Fri Mar 2 16:03:00 2018 +0200 drm: Check property/enum name length Reject requests to add properties/enums with an overly long name. Previously we would have just silently truncated the string and exposed it userspace. v2: drm_property_create() returns a pointer Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180302140300.31110-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_property.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8e5e83ad8250043c8d5cc8f2bf672e64c43f948a Author: Ville Syrjälä Date: Fri Mar 2 15:25:42 2018 +0200 drm: Don't create properties without names Creating a property that doesn't have a name makes no sense to me. Don't allow it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180302132544.12491-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_property.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 7d5397d47f90f0a89c60f163177862a22d5c9685 Author: Daniel Scheller Date: Sun Feb 25 07:31:33 2018 -0500 media: ngene: add XO2 module support Detect and initialise modules equipped with XO2 interfaces (Lattice MachXO2). This requires a few more I2C transfer functions which this adds as well. Defines for the different possible (available) module types are added to ngene.h. The support for the actual tuners contained on these addon modules is kept separate from this commit and is being added with the next commits. The xo2names array is temporarily marked __maybe_unused to silence a corresponding compiler warning at this stage. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-cards.c | 144 +++++++++++++++++++++++++++++++++- drivers/media/pci/ngene/ngene.h | 12 +++ 2 files changed, 155 insertions(+), 1 deletion(-) commit 1c2ad82e537d735863030e153769c900edb01d8f Author: Daniel Scheller Date: Sun Feb 25 07:31:32 2018 -0500 media: ngene: support STV0367 DVB-C/T DuoFlex addons Add support for STV0367+TDA18212 based DuoFlex CT addon modules. For this, add a demod probe function and all necessary demod/tuner attach functions which use existing auxiliary drivers (stv0367 and tda18212) to support this hardware. As tda18212 is an I2C client driver, proper cleanup code is added to the deregistration sequence in ngene-core. To not cause use- after-free situations when there's a CXD2099 I2C client connected, which is rather freed in ngene-core.c:cxd_detach(), add i2c_client_fe to struct ngene_channel to keep track if the i2c_client was allocated by a frontend driver, rather than the CI code paths. Also move the I2C access functions to the top of the file and add the required read_regs() function for the tda18212 ping to work. This adds autoselection (if MEDIA_SUBDRV_AUTOSELECT) of the STV0367 demod driver and TDA18212 tuner driver to Kconfig aswell. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/Kconfig | 2 + drivers/media/pci/ngene/ngene-cards.c | 194 ++++++++++++++++++++++++++++++---- drivers/media/pci/ngene/ngene-core.c | 12 +++ drivers/media/pci/ngene/ngene.h | 2 + 4 files changed, 191 insertions(+), 19 deletions(-) commit 66a4c0c749cf9b3ce363085709219cc325d2a647 Author: Daniel Scheller Date: Sun Feb 25 07:31:31 2018 -0500 media: ngene: use defines to identify the demod_type Make it more clear which demod_type is used for which hardware by having defines for the possible demod_type values. With that, change the demod_type evaluation in tuner_attach_probe() to a switch-case instead of an if() for each possible value. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-cards.c | 11 +++++++---- drivers/media/pci/ngene/ngene.h | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) commit 6795bf6264829b6678f646164d5ab5e335a99fb1 Author: Daniel Scheller Date: Sun Feb 25 07:31:30 2018 -0500 media: ngene: convert kernellog printing from printk() to dev_*() macros Convert all printk() and pr_*() kernel log printing to rather use the dev_*() macros. Not only is it discouraged to use printk() (checkpatch even complains about that), but also this helps identifying the exact PCI device for any printed event, and it makes almost all printing shorter in terms of code style since there's no need to use KERN_* DEVICE_NAME any more (dev_*() will take care of this). Since the dprintk macro define isn't used anymore, remove it. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-cards.c | 75 ++++++++++++++++++++--------------- drivers/media/pci/ngene/ngene-core.c | 75 +++++++++++++++++------------------ drivers/media/pci/ngene/ngene-dvb.c | 4 +- 3 files changed, 84 insertions(+), 70 deletions(-) commit 37a59823788af2388a9fe9fbd370579d80116178 Author: Daniel Scheller Date: Sun Feb 25 07:31:29 2018 -0500 media: ngene: add two additional PCI IDs Add two more device IDs for cards supported by the ngene driver. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-cards.c | 2 ++ 1 file changed, 2 insertions(+) commit 1aebed3289582c4fdbcfd81197bfb25fbbf311b8 Author: Daniel Scheller Date: Sat Feb 24 09:55:57 2018 -0500 media: dvb_ca_en50221: fix severity of successful CAM init log message A successful CA module initialisation isn't an error. Change the log print to info severity accordingly. Cc: Jasmin Jessich Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_ca_en50221.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9aa4d4ea244481fe98eb181ec5d7a9f7cb86f076 Author: Markus Elfring Date: Thu Feb 22 15:45:47 2018 -0500 media: usb: don't initialize vars if not needed Some local variables will be set to an appropriate value before usage. Thus omit explicit initialisations at the beginning of these functions. Signed-off-by: Markus Elfring Acked-by: Alexey Klimov Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/radio-mr800.c | 2 +- drivers/media/radio/radio-wl1273.c | 2 +- drivers/media/radio/si470x/radio-si470x-usb.c | 2 +- drivers/media/usb/cx231xx/cx231xx-cards.c | 2 +- drivers/media/usb/cx231xx/cx231xx-dvb.c | 2 +- drivers/media/usb/go7007/snd-go7007.c | 2 +- drivers/media/usb/tm6000/tm6000-cards.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit 7b69f2cb91319abdacf37be501db2eae45112a09 Author: Mauro Carvalho Chehab Date: Tue Mar 6 10:34:44 2018 -0500 media: ov772x: constify ov772x_frame_intervals The values on this array never changes. Make it const. Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov772x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c17a7476e4c41884d82e3675c25ceae982c07a63 Author: Benjamin Tissoires Date: Fri Dec 8 15:29:44 2017 +0100 HID: core: rewrite the hid-generic automatic unbind We actually can have the unbind/rebind logic in hid-core.c, leaving only the match function in hid-generic. This makes hid-generic simpler and the whole logic simpler too. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 35 ++++++++++++++++++++++++----------- drivers/hid/hid-generic.c | 33 --------------------------------- include/linux/hid.h | 4 ---- 3 files changed, 24 insertions(+), 48 deletions(-) commit 59dd2a85040103e95b1c87b1b920d357ee91dada Author: Fabio Estevam Date: Mon Mar 5 23:13:04 2018 -0300 regmap: debugfs: Improve warning message on debugfs_create_dir() failure Currently when debugfs_create_dir() fails we receive a warning message that provides no indication as to what was the directory entry that failed to be created. Improve the warning message by printing the directory name that failed in order to help debugging. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown drivers/base/regmap/regmap-debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1f319cb0538a10339d1ca73ee124331d611b43bf Author: Gustavo Pimentel Date: Tue Mar 6 11:54:55 2018 +0000 PCI: dwc: Expand maximum number of MSI IRQs from 32 to 256 The Synopsys PCIe Root Complex supports up to MSI 256 IRQs distributed over 8 controller registers, therefore the maximum number of MSI IRQs can be changed to 256. The number of controllers can be calculated based on the number of vectors used by the specific SoC driver. Update the dwc host bridge driver maximum number of supported MSI IRQs. Signed-off-by: Gustavo Pimentel Signed-off-by: Lorenzo Pieralisi Tested-by: Niklas Cassel Tested-by: Shawn Guo Acked-by: Marc Zyngier drivers/pci/dwc/pcie-designware-host.c | 12 ++++++++---- drivers/pci/dwc/pcie-designware.h | 10 +++------- 2 files changed, 11 insertions(+), 11 deletions(-) commit 3f43ccc4ea1b912ff24679576b4278fafbb190b3 Author: Gustavo Pimentel Date: Tue Mar 6 11:54:54 2018 +0000 PCI: dwc: Remove old MSI IRQs API Remove the unused old MSI IRQs API from pcie-designware based on struct msi_controller that should now be considered obsolete. Signed-off-by: Gustavo Pimentel Signed-off-by: Lorenzo Pieralisi Tested-by: Niklas Cassel Tested-by: Shawn Guo Acked-by: Marc Zyngier drivers/pci/dwc/pci-keystone-dw.c | 2 +- drivers/pci/dwc/pci-keystone.h | 3 +- drivers/pci/dwc/pci-layerscape.c | 3 +- drivers/pci/dwc/pcie-designware-host.c | 190 +-------------------------------- drivers/pci/dwc/pcie-designware.h | 2 +- 5 files changed, 5 insertions(+), 195 deletions(-) commit 7c5925afbc58c6d6b384e1dc051bb992969bf787 Author: Gustavo Pimentel Date: Tue Mar 6 11:54:53 2018 +0000 PCI: dwc: Move MSI IRQs allocation to IRQ domains hierarchical API Implement a multiplexed IRQ domain hierarchy API in the pcie-designware host bridge driver that funnels all MSI IRQs into a single parent interrupt, moving away from the obsolete struct msi_controller based API. Although the old implementation API is still available, pcie-designware will now use the multiplexed IRQ domains hierarchical API. Remove all existing dwc based host bridges MSI IRQs handlers, in that the hierarchical API now handles MSI IRQs through the hierarchical/chained MSI domain implementation. Signed-off-by: Gustavo Pimentel Signed-off-by: Lorenzo Pieralisi Tested-by: Niklas Cassel Tested-by: Shawn Guo Acked-by: Jingoo Han Acked-by: Marc Zyngier drivers/pci/dwc/pci-exynos.c | 18 -- drivers/pci/dwc/pci-imx6.c | 18 -- drivers/pci/dwc/pci-keystone-dw.c | 89 +--------- drivers/pci/dwc/pci-keystone.c | 1 + drivers/pci/dwc/pci-keystone.h | 1 + drivers/pci/dwc/pcie-artpec6.c | 18 -- drivers/pci/dwc/pcie-designware-host.c | 294 +++++++++++++++++++++++++++++---- drivers/pci/dwc/pcie-designware-plat.c | 16 -- drivers/pci/dwc/pcie-designware.h | 18 ++ drivers/pci/dwc/pcie-histb.c | 15 -- drivers/pci/dwc/pcie-qcom.c | 16 -- 11 files changed, 290 insertions(+), 214 deletions(-) commit b7289cb1cf99d432c894b9da7a54e24f73ae4c93 Author: Todd Kelner Date: Sat Feb 17 16:47:10 2018 -0700 HID: sony: Add touchpad support for NSG-MR5U and NSG-MR7U remotes Sony's NSG-MR5U and NSG-MR7U remote controls have a full keyboard and a touchpad. The keyboard is already supported by the existing Linux kernel and drivers but the touchpad is not recognized. This patch adds the coded needed to bring full functionality to the touchpad. Note that these remotes use the vendor code for SMK even though they are Sony branded. Known limitations - The built-in accelerometers are not supported by these changes - When the Drag (Fn) key is used as a mouse button, the button is automatically released when the key begins repeating. There are two workarounds for this 1) Use the button behind the touchpad instead of the Drag (Fn) key or 2) Disable the key repeat functionality or increase the key repeat delay. Signed-off-by: Todd Kelner Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 3 ++ drivers/hid/hid-quirks.c | 2 + drivers/hid/hid-sony.c | 131 ++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 130 insertions(+), 6 deletions(-) commit 17cf46cfe975f1dd04db6bd38398923846512d49 Author: Jeffy Chen Date: Tue Mar 6 19:04:03 2018 +0800 regmap: debugfs: Free map->debugfs_name when debugfs_create_dir() failed Free map->debugfs_name when debugfs_create_dir() failed to avoid memory leak. Signed-off-by: Jeffy Chen Signed-off-by: Mark Brown drivers/base/regmap/regmap-debugfs.c | 3 +++ 1 file changed, 3 insertions(+) commit 2172a33279bc2162656f473f5a1256618169b249 Author: Gustavo A. R. Silva Date: Mon Mar 5 17:53:39 2018 -0600 spi: tegra20-slink: use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Acked-by: Laxman Dewangan Signed-off-by: Mark Brown drivers/spi/spi-tegra20-slink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 001fab49dd4fcf64b1b8ccecb8656baa3f3f1a9a Author: Gustavo A. R. Silva Date: Mon Mar 5 18:10:46 2018 -0600 HID: hid-multitouch: Use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04230f46025536896b15af22d8fae7fa519f9740 Author: Gustavo A. R. Silva Date: Mon Mar 5 18:06:24 2018 -0600 HID: hid-ntrig: use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jiri Kosina drivers/hid/hid-ntrig.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 09f3fe40f501278dbcb93882ac6c017b01621e99 Author: Aishwarya Pant Date: Fri Mar 2 18:46:53 2018 +0530 HID: logitech-hidpp: document sysfs interface Descriptions have been collected from git commit logs. Signed-off-by: Aishwarya Pant Signed-off-by: Jiri Kosina .../ABI/testing/sysfs-driver-hid-logitech-hidpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit fbb77e88f08ce04daa9b1ff2381be7ebc9f24b6f Author: Tomasz Kramkowski Date: Thu Mar 1 17:22:24 2018 +0000 HID: elecom: add support for EX-G M-XT4DRBK trackball This patch enables the 6th button on the ELECOM EX-G M-XT4DRBK trackball mouse. This is a left handed EX-G variant which only comes in a wireless (D) model. It has a total of 6 buttons but one of these is not available because of how the HID descriptor is configured. Signed-off-by: Tomasz Kramkowski Signed-off-by: Jiri Kosina drivers/hid/hid-elecom.c | 4 +++- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-quirks.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) commit 79837eded640501206a60fb68e76ad2d027457ec Author: Tomasz Kramkowski Date: Thu Mar 1 17:22:23 2018 +0000 HID: elecom: refer to trackballs by model name instead of series This patch changes all references to ELECOM trackballs using their series name to refer to them by their model name. ELECOM provides multiple series of mice such as EX-G, HUGE, and DEFT. Although it has not caused conflicts in the driver, there can be more than one iteration of mice in each series. For example, there are 7 variants of EX-G trackballs but only three (M-XT3URBK, M-XT3DRBK, and M-XT4DRBK) need a driver to work correctly. There are also 4 DEFT series trackballs but two of them have the same VID:PID as the other two. I picked the earlier model for the naming of the PID macros. Signed-off-by: Tomasz Kramkowski Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 6 +++--- drivers/hid/hid-elecom.c | 30 +++++++++++++++--------------- drivers/hid/hid-ids.h | 12 ++++++------ drivers/hid/hid-quirks.c | 12 ++++++------ 4 files changed, 30 insertions(+), 30 deletions(-) commit 1844f49861cbd5dd8c289d3c4c8b4a76a4fe2d37 Author: Brad Love Date: Mon Feb 12 15:19:04 2018 -0500 media: si2168: change ts bus control logic Move the ts bus control function moved higher, enabling it after configuring frontend and removeing ts_bus_ctrl callback. While here, also add an error checking and re-add a comment that were removed by commit 445877742ce3 ("media: si2168: Add ts bus coontrol, turn off bus on sleep"). [mchehab@s-opensource.com: I ended by applying the first version, instead of the right one. So, this patch contains the diff and the v2 changelog instead] Fixes: 445877742ce3 ("media: si2168: Add ts bus coontrol, turn off bus on sleep") Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/si2168.c | 60 ++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 27 deletions(-) commit da2cf18ff883b6130b1a6e4a3e9402abcb9f5bc0 Author: Daniel Scheller Date: Fri Feb 9 13:22:49 2018 -0500 media: dvb-frontends/stv0910: rework and fix DiSEqC send Rework both DiSEqC send functions (send_master_cmd() and send_burst()) to utilise the new SET_REG() and SET_FIELD() macros. Esp. due to SET_FIELD(), this makes sure that not all bits (with unrelated purposes) are always rewritten, but only those needed for sending DiSEqC commands. In send_burst(), this makes sure that DISEQC_MODE isn't changed from 3 to 2 inbetween when sending SEC_MINI_A. Also, change both functions to write DISEQC_MODE first before setting DIS_PRECHARGE. This makes diseqc control work more reliable for "fullblown" DiSEqC strings in VDR's diseqc.conf in combination with certain multiswitches. Fixes: 448461af0e19 ("media: dvb-frontends/stv0910: implement diseqc_send_burst") Reported-by: Helmut Auer Cc: Ralph Metzler Signed-off-by: Daniel Scheller Tested-by: Helmut Auer Tested-by: Richard Scobie Tested-by: Dietmar Spingler Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0910.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 15f757bb5ab237a123a2d5a8140cece1bc7bb617 Author: Daniel Scheller Date: Thu Feb 8 14:53:17 2018 -0500 media: cxd2099: move driver out of staging into dvb-frontends According to the TODO file, this driver only landed in staging because of the way device nodes and data transfers are handled. Besides that this way (use of secX devices) has become sort of standard to date (ie. VDR supports this literally since ages via the ddci plugin, TVHeadend received this functionality lately, and minisatip being currently worked on regarding this), most importantly this I2C client only driver isn't even responsible for setting up device nodes, not for handling data transfer and so on, but only serves as interface for the dvb_ca_en50221 subsystem, just like every other DVB card out in the wild, with hard-wired or such flexible CA interfaces. And, it would even work with cards having the cxd2099 controller hard-wired. Also, this driver received quite some love and even is a proper I2C client driver by now. So, as this driver acts as a EN50221 frontend device, move it to dvb-frontends. There is no need to keep it buried in staging. This commit also updates all affected Kconfig and Makefile's, and adds MEDIA_AUTOSELECT depends to ddbridge and ngene. Signed-off-by: Daniel Scheller Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/Kconfig | 12 + drivers/media/dvb-frontends/Makefile | 1 + drivers/media/dvb-frontends/cxd2099.c | 704 ++++++++++++++++++++++++++++++++ drivers/media/dvb-frontends/cxd2099.h | 42 ++ drivers/media/pci/ddbridge/Kconfig | 1 + drivers/media/pci/ddbridge/Makefile | 3 - drivers/media/pci/ngene/Kconfig | 1 + drivers/media/pci/ngene/Makefile | 3 - drivers/staging/media/Kconfig | 2 - drivers/staging/media/Makefile | 1 - drivers/staging/media/cxd2099/Kconfig | 12 - drivers/staging/media/cxd2099/Makefile | 4 - drivers/staging/media/cxd2099/TODO | 12 - drivers/staging/media/cxd2099/cxd2099.c | 704 -------------------------------- drivers/staging/media/cxd2099/cxd2099.h | 42 -- 15 files changed, 761 insertions(+), 783 deletions(-) commit d19e3a72a6cec187a35aed9abf03fc4730eded76 Author: Daniel Scheller Date: Thu Feb 8 14:53:15 2018 -0500 media: ngene: adapt cxd2099 attach to the new i2c_client way Change the way the cxd2099 hardware is being attached to the new I2C client interface way. Signed-off-by: Daniel Scheller Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ngene/ngene-core.c | 41 ++++++++++++++++++++++++++++++++---- drivers/media/pci/ngene/ngene.h | 1 + 2 files changed, 38 insertions(+), 4 deletions(-) commit 81a705914b77e700ce142892c1f839488200099d Author: Daniel Scheller Date: Sat Feb 17 10:03:23 2018 -0500 media: staging/cxd2099: convert to regmap API Convert the cxd2099 driver to use regmap for I2C accesses, removing all own i2c_*() functions. With that, make the driver a proper I2C client driver. This also adds the benefit of having a proper cleanup function (cxd2099_remove() in this case) that takes care of resource cleanup upon I2C client deregistration. At this point, keep the static inline declared cxd2099_attach() function so that drivers using the legacy/proprietary style attach way still compile, albeit lacking the cxd2099 driver functionality. This is taken care of in the next two patches. Signed-off-by: Daniel Scheller Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/cxd2099/cxd2099.c | 209 ++++++++++++++++---------------- drivers/staging/media/cxd2099/cxd2099.h | 11 +- 2 files changed, 108 insertions(+), 112 deletions(-) commit 9403f089bfa0536dbad1a28419aff037dc575c3d Author: Daniel Scheller Date: Thu Feb 8 14:53:12 2018 -0500 media: ddbridge/ci: further deduplicate code/logic in ddb_ci_attach() Deduplicate the checks for a valid ptr in port->en, and also handle the default case to also catch eventually yet unsupported CI hardware. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/ddbridge-ci.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit e2ce49468a14d5c1543bfd60385ff47b8aebfb0c Author: Wolfram Sang Date: Mon Feb 5 15:10:00 2018 -0500 media: v4l: dvb-frontends: stb0899: fix comparison to bitshift when dealing with a mask Due to a typo, the mask was destroyed by a comparison instead of a bit shift. Signed-off-by: Wolfram Sang Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stb0899_reg.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2f4a75b70bb113f549cfc38be6a9679178b28ac6 Author: Ulf Magnusson Date: Sun Feb 4 20:21:29 2018 -0500 media: sec: Remove PLAT_S5P dependency The PLAT_S5P symbol was removed in commit d78c16ccde96 ("ARM: SAMSUNG: Remove remaining legacy code"). Remove the PLAT_S5P dependency from VIDEO_SAMSUNG_S5P_CEC. Discovered with the https://github.com/ulfalizer/Kconfiglib/blob/master/examples/list_undefined.py script. Signed-off-by: Ulf Magnusson Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16532baa6ba4add370bcbf1673d7d2e35526085d Author: Corentin Labbe Date: Sun Jan 28 15:06:18 2018 -0500 media: mantis: remove mantis_vp3028.c/mantis_vp3028.h Thoses files are unused since commit b3b961448f70 ("V4L/DVB (13795): [Mantis/Hopper] Code overhaul, add Hopper devices into the PCI ID list") 8 year after, we could remove it. Signed-off-by: Corentin Labbe Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/mantis/mantis_vp3028.c | 38 -------------------------------- drivers/media/pci/mantis/mantis_vp3028.h | 33 --------------------------- 2 files changed, 71 deletions(-) commit 948aaf788f876bea7764291f5b391165577a632b Author: Corentin Labbe Date: Fri Jan 26 15:14:05 2018 -0500 media: drx-j remove bsp_i2c.h bsp_i2c.h is unused since commit ffe7c4f92183 ("[media] drx-j: Get rid of drx39xyj/bsp_tuner.h") Remove it from tree. Signed-off-by: Corentin Labbe Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/drx39xyj/bsp_i2c.h | 139 ------------------------- 1 file changed, 139 deletions(-) commit bd0b5a35aac5315cf4f6d296dee2f23fb28b827d Author: Dan Carpenter Date: Thu Jan 25 09:15:25 2018 -0500 media: sr030pc30: prevent array underflow in try_fmt() Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/sr030pc30.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8f0aa38292f212a74cb37026d160d946602e76f2 Author: Peter Ujfalusi Date: Fri Jan 19 08:34:34 2018 -0500 media: v4l: omap_vout: vrfb: Use the wrapper for prep_interleaved_dma() Instead of directly accessing to dmadev->device_prep_interleaved_dma() use the dmaengine_prep_interleaved_dma() wrapper instead. Signed-off-by: Peter Ujfalusi Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap/omap_vout_vrfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 309d4c4cc989312a660c77a45b304710825f1ff7 Author: Brad Love Date: Wed Jan 17 16:32:36 2018 -0500 media: em28xx: Enable inversion for Solo/Dual HD DVB models Hauppauge Solo/Dual HD DVB models use a si2157 tuner, which is set to produce inverted spectrum. This configures the si2168 DVB demod for inverted spectrum on both affected models. [mchehab@s-opensource.com: rebased on the top of upstream] Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-dvb.c | 2 ++ 1 file changed, 2 insertions(+) commit d4c779bc91d1faef76351ccd6d326f729cdfcb1e Author: Brad Love Date: Wed Jan 17 17:31:58 2018 -0500 media: si2168: Add spectrum inversion property Some tuners produce inverted spectrum, but the si2168 is not currently set up to accept it. This adds an optional parameter to set the frontend up to receive inverted spectrum. Parameter is optional and only boards who enable inversion will utilize this. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/si2168.c | 3 +++ drivers/media/dvb-frontends/si2168.h | 3 +++ drivers/media/dvb-frontends/si2168_priv.h | 1 + 3 files changed, 7 insertions(+) commit a398e043637a4819a0e96467bfecaabf3224dd62 Author: Arnd Bergmann Date: Tue Jan 16 16:52:15 2018 -0500 media: s3c-camif: fix out-of-bounds array access While experimenting with older compiler versions, I ran into a warning that no longer shows up on gcc-4.8 or newer: drivers/media/platform/s3c-camif/camif-capture.c: In function '__camif_subdev_try_format': drivers/media/platform/s3c-camif/camif-capture.c:1265:25: error: array subscript is below array bounds This is an off-by-one bug, leading to an access before the start of the array, while newer compilers silently assume this undefined behavior cannot happen and leave the loop at index 0 if no other entry matches. As Sylvester explains, we actually need to ensure that the value is within the range, so this reworks the loop to be easier to parse correctly, and an additional check to fall back on the first format value for any unexpected input. I found an existing gcc bug for it and added a reduced version of the function there. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69249#c3 Fixes: babde1c243b2 ("[media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface") Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s3c-camif/camif-capture.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 3061df060fcaeebd77e183283f70fdc4349eef83 Author: Brad Love Date: Fri Jan 12 11:19:40 2018 -0500 media: si2168: Announce frontend creation failure The driver outputs on success, but is silent on failure. Give one message that probe failed. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/si2168.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7f4d7516aa3ed912946fdf3863be8d1489fd836 Author: Brad Love Date: Fri Jan 12 11:19:41 2018 -0500 media: lgdt3306a: Announce successful creation The driver is near silent, this adds a simple announcement at the end of probe after the chip has been detected and upgrades a debug message to error if probe has failed. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/lgdt3306a.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 445877742ce302979fd92bcda1eb372bb708c003 Author: Brad Love Date: Fri Jan 12 11:19:39 2018 -0500 media: si2168: Add ts bus coontrol, turn off bus on sleep Includes a function to set TS MODE property os si2168. The function either disables the TS output bus, or sets mode to config option. When going to sleep the TS bus is turned off, this makes the driver compatible with multiple frontend usage. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/si2168.c | 38 ++++++++++++++++++++++++++++-------- drivers/media/dvb-frontends/si2168.h | 1 + 2 files changed, 31 insertions(+), 8 deletions(-) commit 08c5e116569549d07d69b0839f944d8188b1c4b4 Author: Thomas Avery Date: Mon Mar 5 14:33:49 2018 -0500 staging: lustre: Remove yield() call Remove yield() call. In this case it's use is considered broken, since it is being assumed that yield() will let another process run that will make the event true. Signed-off-by: Thomas Avery Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/obd_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9f83a65f18105d74e8806c3869fb1ac17469c61 Author: Valentin Vidic Date: Mon Mar 5 08:02:19 2018 +0100 staging: pi433: fix CamelCase for paRamp enum Fixes checkpatch warning: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/Documentation/pi433.txt | 2 +- drivers/staging/pi433/pi433_if.h | 2 +- drivers/staging/pi433/rf69.c | 4 ++-- drivers/staging/pi433/rf69.h | 2 +- drivers/staging/pi433/rf69_enum.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit d9a74d5f1eee238b54adccf835120670c7eb6034 Author: Valentin Vidic Date: Mon Mar 5 08:02:18 2018 +0100 staging: pi433: fix CamelCase for Address variables Fixes checkpatch warnings: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.c | 8 ++++---- drivers/staging/pi433/rf69.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit cd9d5291bb1839865c04f23686c205a013ec4d0d Author: Valentin Vidic Date: Mon Mar 5 08:02:17 2018 +0100 staging: pi433: fix CamelCase for address_filtering enum Fixes checkpatch warnings: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/Documentation/pi433.txt | 12 ++++++------ drivers/staging/pi433/pi433_if.c | 6 +++--- drivers/staging/pi433/rf69.c | 6 +++--- drivers/staging/pi433/rf69_enum.h | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) commit 53e0b83d01c3bcafed968101531c903a86c4efbd Author: Valentin Vidic Date: Mon Mar 5 08:02:16 2018 +0100 staging: pi433: fix CamelCase for afterSyncInterrupt Fixes checkpatch warning: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/pi433_if.c | 2 +- drivers/staging/pi433/rf69.c | 2 +- drivers/staging/pi433/rf69_enum.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 1cd41fc3f32b18a2a82135ed74b0107bc7ce1523 Author: Valentin Vidic Date: Mon Mar 5 08:02:15 2018 +0100 staging: pi433: fix CamelCase for flag enum Fixes checkpatch warnings: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/pi433_if.c | 4 ++-- drivers/staging/pi433/rf69.c | 18 +++++++++--------- drivers/staging/pi433/rf69_enum.h | 18 +++++++++--------- 3 files changed, 20 insertions(+), 20 deletions(-) commit c436ef3b9abfcdb3b6db0c87f3d11d628cd0d426 Author: Valentin Vidic Date: Mon Mar 5 08:02:14 2018 +0100 staging: pi433: fix CamelCase for packetFormat enum Fixes checkpatch warnings: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/pi433_if.c | 8 ++++---- drivers/staging/pi433/rf69.c | 8 ++++---- drivers/staging/pi433/rf69.h | 2 +- drivers/staging/pi433/rf69_enum.h | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) commit e0c12b6fff5864c05bee509ed47fa8ba2d9eb43c Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 Revert "staging: Disable lustre file system for MIPS, SH, and XTENSA" This reverts commit 16f1eeb660bd2bfd223704ee6350706b39c55a7a. The reason for this patch was that lustre used copy_from_user_page. Commit 76133e66b141 ("staging/lustre: Replace jobid acquiring with per node setting") removed that usage. So the arch restrictions can go. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 184ecc5ceb379b43b29fc373f497fca88c73ad38 Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: allow monolithic builds Remove restriction the lustre must be built as modules. It now works as a monolithic build. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/Kconfig | 2 +- drivers/staging/lustre/lustre/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 26f7a294e5ecd46856cb9f5b718e995f1ec46779 Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: ptlrpc: move thread creation out of module initialization When the ptlrpc module is loaded, it starts the pinger thread and calls LNetNIInit which starts various threads. We don't need these threads until the module is actually being used, such as when a lustre filesystem is mounted. So move the thread creation into new ptlrpc_inc_ref() (modeled on ptlrpcd_inc_ref()), and call that when needed, such as at mount time. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_net.h | 3 ++ drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 12 ++++- drivers/staging/lustre/lustre/llite/llite_lib.c | 18 +++++-- .../staging/lustre/lustre/ptlrpc/ptlrpc_module.c | 56 ++++++++++++++-------- 4 files changed, 65 insertions(+), 24 deletions(-) commit 165020462d26d6925cbd2d25dfbd4ff1a8fba103 Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: change sai_thread to sai_task. Rather than allocating a ptlrpc_thread for the stat-ahead thread, just use the task_struct provided by kthreads directly. As nothing ever waits for the sai_task, it must call do_exit() directly rather than simply return from the function. Also it cannot use kthread_should_stop() to know when to stop. There is one caller which can ask it to stop so we need a simple signaling mechanism. I've chosen to set ->sai_task to NULL when the thread should finish up. The thread notices this and cleans up and exits. lli_sa_lock is used to avoid races between waking up the process and the process exiting. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/statahead.c | 118 +++++++++------------ 2 files changed, 54 insertions(+), 66 deletions(-) commit c044fb0f835c6afe10d10b6cf4f2c5a154b1489d Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: remove 'ptlrpc_thread usage' for sai_agl_thread Lustre has a 'struct ptlrpc_thread' which provides control functionality wrapped around kthreads. None of the functionality used in statahead.c requires ptlrcp_thread - it can all be done directly with kthreads. So discard the ptlrpc_thread and just use a task_struct directly. One particular change worth noting is that in the current code, the thread performs some start-up actions and then signals that it is ready to go. In the new code, the thread is first created, then the startup actions are perform, then the thread is woken up. This means there is no need to wait any more than kthread_create() already waits. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/statahead.c | 78 ++++++++-------------- 2 files changed, 28 insertions(+), 52 deletions(-) commit 147760d4c1b41c7a8b654b0f8e608b1f8b20bd87 Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: remove unused flag from ptlrpc_thread SVC_EVENT is no longer used. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_net.h | 11 ----------- 1 file changed, 11 deletions(-) commit be3c64da248b1ada2bbcfc3855f07536d8087acb Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: ptlrpc: use workqueue for pinger lustre has a "Pinger" kthread which periodically pings peers to ensure all hosts are functioning. This can more easily be done using a work queue. As maintaining contact with other peers is import for keeping the filesystem running, and as the filesystem might be involved in freeing memory, it is safest to have a separate WQ_MEM_RECLAIM workqueue. The SVC_EVENT functionality to wake up the thread can be replaced with mod_delayed_work(). Also use round_jiffies_up_relative() rather than setting a minimum of 1 second delay. The PING_INTERVAL is measured in seconds so this meets the need is allow the workqueue to keep wakeups synchronized. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/pinger.c | 81 ++++++++------------------- 1 file changed, 24 insertions(+), 57 deletions(-) commit 236b4fcd5df73ab8d3c8d24aa6c1f9670db11ea4 Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: ptlrpc: use delayed_work in sec_gc The garbage collection for security contexts currently has a dedicated kthread which wakes up every 30 minutes to discard old garbage. Replace this with a simple delayed_work item on the system work queue. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/sec_gc.c | 90 +++++++++------------------ 1 file changed, 28 insertions(+), 62 deletions(-) commit c91664c83f463cefef128006ee0af6276fd1e613 Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: ldlm: use delayed_work for pools_recalc ldlm currenty has a kthread which wakes up every so often and calls ldlm_pools_recalc(). The thread is started and stopped, but no other external interactions happen. This can trivially be replaced by a delayed_work if we have ldlm_pools_recalc() reschedule the work rather than just report when to do that. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 99 +++----------------------- 1 file changed, 11 insertions(+), 88 deletions(-) commit 1a6cc3b1a903b6a133467dccb05ad938c852680c Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: obdclass: use workqueue for zombie management. obdclass currently maintains two lists of data structures (imports and exports), and a kthread which will free anything on either list. The thread is woken whenever anything is added to either list. This is exactly the sort of thing that workqueues exist for. So discard the zombie kthread and the lists and locks, and create a single workqueue. Each obd_import and obd_export gets a work_struct to attach to this workqueue. This requires a small change to import_sec_validate_get() which was testing if an obd_import was on the zombie list. This cannot have every safely found it to be on the list (as it could be freed asynchronously) so it must be dead code. We could use system_wq instead of creating a dedicated zombie_wq, but as we occasionally want to flush all pending work, it is a little nicer to only have to wait for our own work items. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/include/lustre_export.h | 2 + .../staging/lustre/lustre/include/lustre_import.h | 4 +- drivers/staging/lustre/lustre/obdclass/genops.c | 193 +++------------------ drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +- 4 files changed, 30 insertions(+), 175 deletions(-) commit f8b1c4a8d83cbb80222e4b51cc55f37b5a9087de Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: ptlrpc: change GFP_NOFS to GFP_KERNEL These allocations are performed during initialization, so they don't need GFP_NOFS. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/service.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 9f0e4c2b823b0cf5744a448d3b23cd618b86db41 Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: get entropy from nid when nid set. When the 'lustre' module is loaded, it gets a list of net devices and uses the node ids to add entropy to the prng. This means that the network interfaces need to be configured before the module is loaded, which prevents the module from being compiled into a monolithic kernel. So move this entropy addition to the moment when the interface is imported to LNet and the node id is first known. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/api-ni.c | 7 +++++++ drivers/staging/lustre/lustre/llite/super25.c | 17 +---------------- 2 files changed, 8 insertions(+), 16 deletions(-) commit 2e20a07f3b577af0498095193252a8d20489dfc9 Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: lnet: keep ln_nportals consistent ln_nportals should be zero when no portals have been allocated. This ensures that memory allocation failure is handled correctly elsewhere. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/lib-ptl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3ab19e61b3adf550fd280fd6e0604da82368bd73 Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: obdclass: don't require lct_owner to be non-NULL. Some places in lu_object.c allow lct_owner to be NULL, implying that the code is built in to the kernel (not a module), but two places don't. This prevents us from building lustre into the kernel. So remove the requirement and always allow lct_owner to be NULL. This requires removing an "assert" that the module count is positive, but this is redundant as module_put() already does the necessary test. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/lu_object.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit f689c72d7dbc7bab1cc20440ceccf2c240530d5b Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: statahead: remove incorrect test on agl_list_empty() Including agl_list_empty() in the wait_event_idle() condition is pointless as the body of the loop doesn't do anything about the agl list. So if the list wasn't empty, the while loop would spin indefinitely. The test was removed in the lustre-release commit 672ab0e00d61 ("LU-3270 statahead: small fixes and cleanup"), but not in the Linux commit 5231f7651c55 ("staging: lustre: statahead: small fixes and cleanup"). Fixes: 5231f7651c55 ("staging: lustre: statahead: small fixes and cleanup") Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/statahead.c | 1 - 1 file changed, 1 deletion(-) commit 2fab9faf9b27298c4536c1c1b14072ab18b8f80b Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: fix bug in osc_enter_cache_try The lustre-release patch commit bdc5bb52c554 ("LU-4933 osc: Automatically increase the max_dirty_mb") changed - if (cli->cl_dirty + PAGE_CACHE_SIZE <= cli->cl_dirty_max && + if (cli->cl_dirty_pages < cli->cl_dirty_max_pages && When this patch landed in Linux a couple of years later, it landed as - if (cli->cl_dirty + PAGE_SIZE <= cli->cl_dirty_max && + if (cli->cl_dirty_pages <= cli->cl_dirty_max_pages && which is clearly different ('<=' vs '<'), and allows cl_dirty_pages to increase beyond cl_dirty_max_pages - which causes a latter assertion to fails. Fixes: 3147b268400a ("staging: lustre: osc: Automatically increase the max_dirty_mb") Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 2 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 436630983b006e3fd3ada042da70a11052318d42 Author: NeilBrown Date: Fri Mar 2 10:31:25 2018 +1100 staging: lustre: obd_mount: use correct niduuid suffix. Commit 4f016420d368 ("Staging: lustre: obdclass: Use kasprintf") moved some sprintf() calls earlier in the code to combine them with memory allocation and create kasprintf() calls. In one case, this code movement moved the sprintf to a location where the values being formatter were different. In particular sprintf(niduuid, "%s_%x", mgcname, i); was move from *after* the line i = 0; to a location where the value of 'i' was at least 1. This cause the wrong name to be formatted, and triggers CERROR("del MDC UUID %s failed: rc = %d\n", niduuid, rc); at unmount time. So use '0' instead of 'i'. Fixes: 4f016420d368 ("Staging: lustre: obdclass: Use kasprintf") Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 899821135cb1316752a31f57bd66fbf943ee1ca9 Author: Santha Meena Ramamoorthy Date: Sat Feb 24 14:56:36 2018 -0800 staging: lustre: remove else after return statement Remove else after a return statement as it is not useful. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/llite_lib.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 8bae455e57f1d44fff891a7334d19328b0203e4c Author: Anders Roxell Date: Tue Mar 6 10:11:50 2018 +0100 staging: fsl-mc/dpio: remove unused function gcc warns that function 'qbman_pull_desc_set_token' is not used. drivers/staging/fsl-mc/bus/dpio/qbman-portal.c:525:13: warning: ‘qbman_pull_desc_set_token’ defined but not used [-Wunused-function] In the current code we remove that function. Fixes: 321eecb06bfb ("bus: fsl-mc: dpio: add QBMan portal APIs for DPAA2") Signed-off-by: Anders Roxell Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpio/qbman-portal.c | 5 ----- 1 file changed, 5 deletions(-) commit 9792e213a4c9b16b814c0865ea0cc5d5125e052b Author: Chris Wilson Date: Thu Feb 22 09:25:45 2018 +0000 drm/i915/breadcrumbs: Assert all missed breadcrumbs were signaled When parking the engines and their breadcrumbs, if we have waiters left then they missed their wakeup. Verify that each waiter's seqno did complete. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180222092545.17216-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 2 ++ 1 file changed, 2 insertions(+) commit cd46c545b7db2a9ac14f6db66944b017cbf21faf Author: Chris Wilson Date: Thu Feb 22 09:25:44 2018 +0000 drm/i915/breadcrumbs: Reduce signaler rbtree to a sorted list The goal here is to try and reduce the latency of signaling additional requests following the wakeup from interrupt by reducing the list of to-be-signaled requests from an rbtree to a sorted linked list. The original choice of using an rbtree was to facilitate random insertions of request into the signaler while maintaining a sorted list. However, if we assume that most new requests are added when they are submitted, we see those new requests in execution order making a insertion sort fast, and the reduction in overhead of each signaler iteration significant. Since commit 56299fb7d904 ("drm/i915: Signal first fence from irq handler if complete"), we signal most fences directly from notify_ring() in the interrupt handler greatly reducing the amount of work that actually needs to be done by the signaler kthread. All the thread is then required to do is operate as the bottom-half, cleaning up after the interrupt handler and preparing the next waiter. This includes signaling all later completed fences in a saturated system, but on a mostly idle system we only have to rebuild the wait rbtree in time for the next interrupt. With this de-emphasis of the signaler's role, we want to rejig it's datastructures to reduce the amount of work we require to both setup the signal tree and maintain it on every interrupt. References: 56299fb7d904 ("drm/i915: Signal first fence from irq handler if complete") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180222092545.17216-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_request.h | 2 +- drivers/gpu/drm/i915/intel_breadcrumbs.c | 261 +++++++++++++------------------ drivers/gpu/drm/i915/intel_ringbuffer.h | 4 +- 3 files changed, 116 insertions(+), 151 deletions(-) commit e7893674d6f29a41d6faeda59c30767e4a03f1b0 Author: Ajay Singh Date: Fri Mar 2 19:52:49 2018 +0530 staging: wilc1000: rename u16DummyReasonCode to avoid camelCase Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3b9ccd3bdb4736625e27a3058f39a7f776abca90 Author: Ajay Singh Date: Fri Mar 2 19:52:48 2018 +0530 staging: wilc1000: fix line over 80 char in handle_rcvd_ntwrk_info() Fix 'line over 80 character' issues found by checkpatch.pl script by use of temporary variable and avoided leading tab. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 66 +++++++++++++++---------------- 1 file changed, 33 insertions(+), 33 deletions(-) commit 87ae3a5bd13026cdc2181eda98dab9756b0b518e Author: Ajay Singh Date: Fri Mar 2 19:52:47 2018 +0530 staging: wilc1000: rename handle_connect_timeout() variables to avoid camelCase Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 697346817ed8f0219e6d5904e8b6c6753b943cb3 Author: Ajay Singh Date: Fri Mar 2 19:52:46 2018 +0530 staging: wilc1000: fix line over 80 char in wilc_scan_complete_received() Fix 'line over 80 character' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fab6b7234482003e095ab92d5c299e807be3fcaa Author: Ajay Singh Date: Fri Mar 2 19:52:45 2018 +0530 staging: wilc1000: fix line over 80 char in wilc_del_allstation() & wilc_deinit() Fix 'line over 80 characters' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 83ff39d99b95507b632a9cc02a2f00055fd1e671 Author: Ajay Singh Date: Fri Mar 2 19:52:44 2018 +0530 staging: wilc1000: fix line over 80 char in wilc_add_ptk() Fix 'line over 80 characters' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8007f00092c91f8b823048b667518f682bda848b Author: Ajay Singh Date: Fri Mar 2 19:52:43 2018 +0530 staging: wilc1000: rename pstrHostIFkeyAttr to avoid camelCase issue Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 119 +++++++++++++++--------------- 1 file changed, 59 insertions(+), 60 deletions(-) commit 172148b8ba1ee4ba7dcad6d3cf7d54c1dbd7ae1d Author: Ajay Singh Date: Fri Mar 2 19:52:42 2018 +0530 staging: wilc1000: fix line over 80 char in host_int_parse_join_bss_param() Fix 'line over 80 characters' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 216 +++++++++++++++--------------- 1 file changed, 108 insertions(+), 108 deletions(-) commit 4262d2fc077720673586958c06db477a4aed66f6 Author: Ajay Singh Date: Fri Mar 2 19:52:41 2018 +0530 staging: wilc1000: fix line over 80 char for wilc_gnrl_async_info_received() Fix 'line over 80 char' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 05141a62bb1bde177e36f7d54ce2fc34d4e50ffa Author: Ajay Singh Date: Fri Mar 2 19:52:40 2018 +0530 staging: wilc1000: fix line over 80 char in wilc_network_info_received() Fix 'line over 80 character' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2f90a5da7c7400472fbf201be4a9971599ff6d11 Author: Ajay Singh Date: Fri Mar 2 19:52:39 2018 +0530 staging: wilc1000: fix line over 80 char in handle_cfg_param() Fix 'line over 80 char' issues found by checkpatch.pl script in handle_cfg_param(). Rename variables and used temporary variables to fix the line over 80 characters issue. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 175 +++++++++++++++++------------- 1 file changed, 98 insertions(+), 77 deletions(-) commit 38b39d3240f059fedc0e74bba075bc042025b65e Author: Ajay Singh Date: Fri Mar 2 19:52:38 2018 +0530 staging: wilc1000: remove always 'true' check from 'if' statement Fix few smatch warning related to 'warn: always true condition'. handle_cfg_param() warn: always true condition '(cfg_param_attr->auth_timeout < 65536) => (0-u16max < 65536)' handle_cfg_param() warn: always true condition '(cfg_param_attr->rts_threshold < 65536) => (0-u16max < 65536)' handle_cfg_param() warn: always true condition '(cfg_param_attr->beacon_interval < 65536) => (0-u16max < 65536)' handle_cfg_param() warn: always true condition '(cfg_param_attr->site_survey_scan_time < 65536) => (0-u16max < 65536)' handle_cfg_param() warn: always true condition '(cfg_param_attr->active_scan_time < 65536) => (0-u16max < 65536)' handle_cfg_param() warn: always true condition '(cfg_param_attr->passive_scan_time < 65536) => (0-u16max < 65536)' Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit cd1ce6ebd9eb991b72526dfc95b8681e700a488d Author: Ajay Singh Date: Fri Mar 2 19:52:37 2018 +0530 staging: wilc1000: rename enuEvent to avoid camelCase Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 4c1f0e3aff805c3ae7616779bbf92983c1f394f2 Author: Ajay Singh Date: Fri Mar 2 19:47:20 2018 +0530 staging: wilc1000: fix line over 80 char in wilc_wlan_handle_rxq() Refactor wilc_wlan_handle_rxq() to fix line over 80 character issue found by checkpatch.pl script. Added a new function to split 'wilc_wlan_handle_rxq' function code. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan.c | 114 +++++++++++++++++++---------------- 1 file changed, 63 insertions(+), 51 deletions(-) commit e03aec251bfe09509f2156d87de453d86211fcda Author: Ajay Singh Date: Fri Mar 2 19:47:19 2018 +0530 staging: wilc1000: fix line over 80 char in wilc_wlan_cfg_set() Fix 'line over 80 characters' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan.c | 37 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit 967c4bc3b5fb44f1b6a24d8df39cfac095f2147c Author: Ajay Singh Date: Fri Mar 2 19:47:18 2018 +0530 staging: wilc1000: fix open parenthesis mismatch in wilc_wlan_cfg_get() Fix 'Alignment should match open parenthesis' issue found by checkpatch.pl script. Reduce the leading tab, to make space for open parenthesis match. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 92d01a5615482778759a343c7494cc07ad5deacc Author: Quytelda Kahja Date: Tue Mar 6 01:34:08 2018 -0800 staging: most: Indent function parameter. Indent the parameters for a function call that extends past 80 characters. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/most/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ed49a3bd56c798c7172035d9bd1e3c97270d994b Author: Quytelda Kahja Date: Tue Mar 6 01:18:02 2018 -0800 staging: most: Add a blank line. Use a blank line after components_show() function declaration. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/most/core.c | 1 + 1 file changed, 1 insertion(+) commit 33f328f7ab6d7e38164f80f3d784448a7ba94d8c Author: Quytelda Kahja Date: Tue Mar 6 02:00:04 2018 -0800 staging: ks7010: Replace literal with constant. Replace literal bytestring with CIPHER_ID_WPA_WEP40 constant. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 716003bb8bc4a54a48721b0206e22fa471176b18 Author: Dan Carpenter Date: Tue Mar 6 13:03:56 2018 +0300 staging: emxx_udc: Remove unnecessary NULL checks These pointers can't be NULL so I have removed the checks. The checking was sort of problematic as well because it didn't make sense. In _nbu2ss_read_request_data() the && should have been ||. In nbu2ss_gad_get_frame() we know that "pgadget" is non-NULL and "udc" is an offset from "pgadget" so it can't be NULL. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/emxx_udc/emxx_udc.c | 8 -------- 1 file changed, 8 deletions(-) commit 2af04244342f03a4e82f376eea36ebfef82a30af Author: Brad Love Date: Fri Jan 12 11:19:37 2018 -0500 media: cx231xx: Add second i2c demod client Include ability to add a i2c device style frontend to cx231xx USB bridge. All current boards set to use frontend[0]. Changes are backwards compatible with current behaviour. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-dvb.c | 45 ++++++++++++++++++--------------- drivers/media/usb/cx231xx/cx231xx.h | 1 + 2 files changed, 26 insertions(+), 20 deletions(-) commit bdaacc32e9b265946d76df3e98a90ae9508df4e4 Author: Brad Love Date: Fri Jan 12 11:19:36 2018 -0500 media: cx231xx: Add second frontend option Include ability to add a second dvb attach style frontend to cx231xx USB bridge. All current boards set to use frontend[0]. Changes are backwards compatible with current behaviour. [mchehab@s-opensource.com: fix some coding style issues] Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-dvb.c | 173 ++++++++++++++++++-------------- 1 file changed, 97 insertions(+), 76 deletions(-) commit 0defb439fc24e102d27960d1e462341cff2d496a Author: Eric Anholt Date: Mon Mar 5 12:28:02 2018 -0800 staging: vc04_services: Remove dead FRAGMENTS_T It's not used in-tree, or in the downstream tree. Signed-off-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_pagelist.h | 5 ----- 1 file changed, 5 deletions(-) commit 7de2258b5c71631216e2ea968980d6a78bb752d3 Author: Santha Meena Ramamoorthy Date: Mon Mar 5 10:56:13 2018 -0800 staging: rtl8188eu: replace NULL comparison with variable Replace NULL comparison of the variable with the variable name or !variable to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 4 +-- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 2 +- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 50 +++++++++++++------------- drivers/staging/rtl8188eu/core/rtw_recv.c | 20 +++++------ drivers/staging/rtl8188eu/core/rtw_security.c | 4 +-- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 6 ++-- drivers/staging/rtl8188eu/core/rtw_xmit.c | 20 +++++------ 7 files changed, 53 insertions(+), 53 deletions(-) commit c41cd503d70df654672a1e9a1b50ca8220f8a174 Author: Santha Meena Ramamoorthy Date: Mon Mar 5 10:37:59 2018 -0800 staging: rtl8188eu: place constant on the right side of test Place constants on the right side of the test during comparisons to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 2 +- drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 2 +- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 8 ++++---- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) commit 2dcce8ed6633e7da1c1439d4948e19278954e7ef Author: Arushi Singhal Date: Sun Mar 4 02:41:42 2018 +0530 staging: rtl8723bs: Replace memset with eth_zero_addr Use eth_zero_addr to assign zero address to the given address array instead of memset when the second argument in memset is address of zero. Coccinelle was used to do the replacement and add the header file linux/etherdevice.h if not already present. The Coccinelle semantic patch that makes this change is as follows: @header@ @@ #include @r1@ expression e; @@ -memset(e,0x00,ETH_ALEN); +eth_zero_addr(e); @includeheader depends on r1 && !header@ @@ + #include #include <...> Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme.c | 3 ++- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 3 ++- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 9 +++++---- 3 files changed, 9 insertions(+), 6 deletions(-) commit c3ecca4b2d75305b69593ed11bab15f5842bc1e7 Author: Arushi Singhal Date: Sun Mar 4 00:47:26 2018 +0530 staging: rtl8723bs: Remove unnecessary semicolon. Remove unnecessary semicolon using semicolon.cocci Coccinelle script. Signed-off-by: Arushi Singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5ea2d82035fce73ca0d2cb8e3868fc738e7a2a90 Author: Dafna Hirschfeld Date: Fri Mar 2 15:09:58 2018 +0200 staging: rtl8192e: Add spaces around operators. Add spaces around arithmetic and bitwise operators to improve readability of the code. Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 01808309495e22b559ca854014b507e89a49cddb Author: Dafna Hirschfeld Date: Fri Mar 2 15:09:57 2018 +0200 staging: rtl8192e: Remove unnecessary parentheses Remove unnecessary parentheses between 'address-of' operators and a struct members. Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 330d7c503b52b4ef8abcbbd1294f6d7f754b01bc Author: Dafna Hirschfeld Date: Fri Mar 2 15:09:56 2018 +0200 staging: rtl8192e: Fix issues regarding blank lines Fix multiple blank lines and blank lines after braces. Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 27 --------------------------- 1 file changed, 27 deletions(-) commit 500320b7332317e7cdb35d65e50e6d13807bce4f Author: Arushi Singhal Date: Sat Mar 3 11:02:36 2018 +0530 staging: rtl8712: remove unnecessary parentheses Remove unnecessary parentheses around variables to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Arushi Singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/recv_linux.c | 4 +- drivers/staging/rtl8712/rtl8712_cmd.c | 8 ++-- drivers/staging/rtl8712/rtl8712_led.c | 70 +++++++++++++++++------------------ 3 files changed, 41 insertions(+), 41 deletions(-) commit a51935a5b9ee8c265c95ea02bb2c9e7e5d103d0a Author: Arushi Singhal Date: Sat Mar 3 11:02:35 2018 +0530 staging: rtl8712: Add spaces around '|' Add spaces around '|' to conform to the Linux kernel coding style. Issue found using checkpatch. CHECK: spaces preferred around that '|'. Signed-off-by: Arushi Singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h | 2 +- drivers/staging/rtl8712/rtl8712_gp_bitdef.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bb462e0ebdb91890d5c4a8c8b459687f804f405a Author: Arushi Singhal Date: Sat Mar 3 11:02:34 2018 +0530 staging: rtl8712: Added spaces around '+' Add spaces around arithmetic operator '+', to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Arushi Singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_cmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0e2bbf657ab29e5f8194760fcca3e0fe1c59c26d Author: Arushi Singhal Date: Sat Mar 3 11:02:33 2018 +0530 staging: rtl8712: Remove multiple blank line(s) Remove extra blank line(s) to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Arushi Singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/os_intfs.c | 1 - drivers/staging/rtl8712/rtl8712_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_cmdctrl_regdef.h | 2 -- drivers/staging/rtl8712/rtl8712_debugctrl_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_debugctrl_regdef.h | 2 -- drivers/staging/rtl8712/rtl8712_fifoctrl_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_fifoctrl_regdef.h | 2 -- drivers/staging/rtl8712/rtl8712_gp_regdef.h | 1 - drivers/staging/rtl8712/rtl8712_interrupt_bitdef.h | 1 - 9 files changed, 12 deletions(-) commit 3b210964865497b947da8752e762717f37549b1d Author: Arushi Singhal Date: Sat Mar 3 11:02:32 2018 +0530 staging: rtl8712: match alignment with open parenthesis Delete/Add tabs and spaces to align the code to fix the checkpatch issue: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/mlme_linux.c | 2 +- drivers/staging/rtl8712/os_intfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4cacc002569adfd370172aa4e8139c064d375b68 Author: Arushi Singhal Date: Sat Mar 3 11:02:31 2018 +0530 staging: rtl8712: Fixed 'tabstop' coding style warning Replace a mix of tabs and spaces indentation by tabs only. Fixed checkpatch warning "Statements should start on a tabstop". Signed-off-by: Arushi Singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/drv_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 951c16bf48676c90c526fafeec3bb6d1ba87ff0b Author: Nishka Dasgupta Date: Sun Mar 4 00:42:44 2018 +0530 staging: vc04_services: bcm2835-audio: Change to unsigned int * Change 'unsigned *' to 'unsigned int *'. Issue found with checkpatch. Signed-off-by: Nishka Dasgupta Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3e3a2b50a1a6336f62de7976cd6af5c37226a3b Author: Nishka Dasgupta Date: Sun Mar 4 00:24:28 2018 +0530 staging: vc04_services: bcm2835-audio Format multiline comment Format multiline comment by moving '*/' to a new line. Issue found with checkpatch. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0b444fb750f2db7355c7c789cdd84e7e4aa0dd81 Author: Nishka Dasgupta Date: Fri Mar 2 01:08:27 2018 +0530 staging: vc04_services: bcm2835-audio: Add blank line after declaration Add blank line after declaration. Issue found with checkpatch. Signed-off-by: Nishka Dasgupta Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 1 + 1 file changed, 1 insertion(+) commit 314af4f77cdb2463d51e4128c37b2bfa4be1de5e Author: Arushi Singhal Date: Sun Mar 4 00:39:13 2018 +0530 staging: rtlwifi: Remove nonessential semicolon Remove non-essential semicolon after 'else' and 'switch' statements. Issue found using semicolon.cocci Coccinelle script. Signed-off-by: Arushi Singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/base.c | 6 +++--- drivers/staging/rtlwifi/phydm/phydm_rainfo.c | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) commit 3334a76c3a726689f9c859d0e8600ed9d04b53f9 Author: Santha Meena Ramamoorthy Date: Fri Mar 2 06:14:39 2018 -0800 staging: rtlwifi: remove unneeded semicolon Remove unneeded semicolon after 'while' and 'switch' statements. Issue found using semicolon.cocci Coccinelle script. Signed-off-by: Santha Meena Ramamoorthy Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/phydm/rtl8822b/phydm_iqk_8822b.c | 2 +- drivers/staging/rtlwifi/rtl8822be/phy.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 537da5127842c7297ccaba04a23c38f507cd5b5c Author: Santha Meena Ramamoorthy Date: Fri Mar 2 02:34:03 2018 -0800 staging: rtlwifi: remove condition where it has no effect Remove condition where if and else branch are identical. Issue found using cond_no_effect.cocci Coccinelle script. Signed-off-by: Santha Meena Ramamoorthy Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/btcoexist/halbtc8822b2ant.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit c51afd2d87fe709faf7cfee0ceae5ea3fc6a8aeb Author: Rinkle Jain Date: Sun Mar 4 12:52:25 2018 +0530 staging: vt6655: Fix style violation for line ending in '(' Replace line ending with '(' with function parameters to resolve style issue found by checkpath. Signed-off-by: Rinkle Jain Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/baseband.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 6089735a5f749950c22e96ab90e1341674a015f0 Author: Santha Meena Ramamoorthy Date: Fri Mar 2 06:05:52 2018 -0800 staging: vt6655: remove unnecessary parentheses Remove unnecessary parentheses around variables to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 14a313c772b68e568f177c18aa8ebe28d60970a7 Author: Dafna Hirschfeld Date: Sun Mar 4 22:09:34 2018 +0200 staging: lustre: obdclass: Replace 'unsigned' with 'unsigned int' Replace 'unsigned' with 'unsigned int' to improve readability. Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 +- drivers/staging/lustre/lustre/obdclass/lu_object.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 57c194028650178533c90d909f640da6801b86a7 Author: Dafna Hirschfeld Date: Sun Mar 4 22:09:33 2018 +0200 staging: lustre: obdclass: Add 'const' to char* array Replace 'const char*' arrays with 'const char * const' since the values in the arrays are not changed. Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/cl_lock.c | 2 +- drivers/staging/lustre/lustre/obdclass/cl_object.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e4dea99bfa35ccc3e5d45ca844665b253c168349 Author: Dafna Hirschfeld Date: Sun Mar 4 22:09:32 2018 +0200 staging: lustre: obdclass: Fix comparison to NULL Replace comparison to NULL with a 'not' operator. Issue found with checkpatch. Signed-off-by: Dafna Hirschfeld Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d576b9fe9865eaf7e762de5ff246a606c02dc015 Author: Arushi Singhal Date: Sun Mar 4 19:46:08 2018 +0530 staging: lustre: Replace "dont" with "don't" Replace "dont" with "don't". "Dont" is not same as "Do not" or "Don't". Signed-off-by: Arushi Singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fld/fld_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c51e9b0927d92b5d6dd25e97a205a0ca03319de Author: Arushi Singhal Date: Sun Mar 4 19:46:07 2018 +0530 staging: lustre: Replace "to to" with "to" This patch replace "to to" with "to". Signed-off-by: Arushi Singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce92575bd45322e61f36bb7be27c5d2e13412717 Author: Arushi Singhal Date: Sun Mar 4 19:46:06 2018 +0530 staging: lustre: Replace "be be" with "be" This patch replace "be be" with "be". Signed-off-by: Arushi Singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/libcfs/debug.c | 2 +- drivers/staging/lustre/lustre/include/lprocfs_status.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 471c3615e5633a37db1aab44e81ae7c770a8b64c Author: Arushi Singhal Date: Mon Mar 5 09:58:08 2018 +0530 staging: comedi: Replace "dont" with "don't Replace "dont" with "don't". "Dont" is not same as "Do not" or "Don't". Signed-off-by: Arushi Singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/cb_pcidas64.c | 2 +- drivers/staging/comedi/drivers/das16.c | 2 +- drivers/staging/comedi/drivers/das16m1.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit accb9343f58c6750c328645ca4b87fdf0fef3623 Author: Santha Meena Ramamoorthy Date: Mon Mar 5 09:34:13 2018 -0800 staging: speakup: match alignment with open parenthesis Match alignment with the open parenthesis to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy Acked-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/speakup_decpc.c | 6 +++--- drivers/staging/speakup/speakup_dectlk.c | 4 ++-- drivers/staging/speakup/speakup_keypc.c | 4 ++-- drivers/staging/speakup/spk_ttyio.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) commit a3ca831249ca8c4c226e4ceafee04e280152e59d Author: Qi Hou Date: Tue Mar 6 09:13:37 2018 +0800 dmaengine: pl330: fix a race condition in case of threaded irqs When booting up with "threadirqs" in command line, all irq handlers of the DMA controller pl330 will be threaded forcedly. These threads will race for the same list, pl330->req_done. Before the callback, the spinlock was released. And after it, the spinlock was taken. This opened an race window where another threaded irq handler could steal the spinlock and be permitted to delete entries of the list, pl330->req_done. If the later deleted an entry that was still referred to by the former, there would be a kernel panic when the former was scheduled and tried to get the next sibling of the deleted entry. The scenario could be depicted as below: Thread: T1 pl330->req_done Thread: T2 | | | | -A-B-C-D- | Locked | | | | Waiting Del A | | | -B-C-D- | Unlocked | | | | Locked Waiting | | | | Del B | | | | -C-D- Unlocked Waiting | | | Locked | get C via B \ - Kernel panic The kernel panic looked like as below: Unable to handle kernel paging request at virtual address dead000000000108 pgd = ffffff8008c9e000 [dead000000000108] *pgd=000000027fffe003, *pud=000000027fffe003, *pmd=0000000000000000 Internal error: Oops: 96000044 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 85 Comm: irq/59-66330000 Not tainted 4.8.24-WR9.0.0.12_standard #2 Hardware name: Broadcom NS2 SVK (DT) task: ffffffc1f5cc3c00 task.stack: ffffffc1f5ce0000 PC is at pl330_irq_handler+0x27c/0x390 LR is at pl330_irq_handler+0x2a8/0x390 pc : [] lr : [] pstate: 800001c5 sp : ffffffc1f5ce3d00 x29: ffffffc1f5ce3d00 x28: 0000000000000140 x27: ffffffc1f5c530b0 x26: dead000000000100 x25: dead000000000200 x24: 0000000000418958 x23: 0000000000000001 x22: ffffffc1f5ccd668 x21: ffffffc1f5ccd590 x20: ffffffc1f5ccd418 x19: dead000000000060 x18: 0000000000000001 x17: 0000000000000007 x16: 0000000000000001 x15: ffffffffffffffff x14: ffffffffffffffff x13: ffffffffffffffff x12: 0000000000000000 x11: 0000000000000001 x10: 0000000000000840 x9 : ffffffc1f5ce0000 x8 : ffffffc1f5cc3338 x7 : ffffff8008ce2020 x6 : 0000000000000000 x5 : 0000000000000000 x4 : 0000000000000001 x3 : dead000000000200 x2 : dead000000000100 x1 : 0000000000000140 x0 : ffffffc1f5ccd590 Process irq/59-66330000 (pid: 85, stack limit = 0xffffffc1f5ce0020) Stack: (0xffffffc1f5ce3d00 to 0xffffffc1f5ce4000) 3d00: ffffffc1f5ce3d80 ffffff80080f09d0 ffffffc1f5ca0c00 ffffffc1f6f7c600 3d20: ffffffc1f5ce0000 ffffffc1f6f7c600 ffffffc1f5ca0c00 ffffff80080f0998 3d40: ffffffc1f5ce0000 ffffff80080f0000 0000000000000000 0000000000000000 3d60: ffffff8008ce202c ffffff8008ce2020 ffffffc1f5ccd668 ffffffc1f5c530b0 3d80: ffffffc1f5ce3db0 ffffff80080f0d70 ffffffc1f5ca0c40 0000000000000001 3da0: ffffffc1f5ce0000 ffffff80080f0cfc ffffffc1f5ce3e20 ffffff80080bf4f8 3dc0: ffffffc1f5ca0c80 ffffff8008bf3798 ffffff8008955528 ffffffc1f5ca0c00 3de0: ffffff80080f0c30 0000000000000000 0000000000000000 0000000000000000 3e00: 0000000000000000 0000000000000000 0000000000000000 ffffff80080f0b68 3e20: 0000000000000000 ffffff8008083690 ffffff80080bf420 ffffffc1f5ca0c80 3e40: 0000000000000000 0000000000000000 0000000000000000 ffffff80080cb648 3e60: ffffff8008b1c780 0000000000000000 0000000000000000 ffffffc1f5ca0c00 3e80: ffffffc100000000 ffffff8000000000 ffffffc1f5ce3e90 ffffffc1f5ce3e90 3ea0: 0000000000000000 ffffff8000000000 ffffffc1f5ce3eb0 ffffffc1f5ce3eb0 3ec0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 3ee0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 3f00: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 3f20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 3f40: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 3f60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 3f80: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 3fa0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 3fc0: 0000000000000000 0000000000000005 0000000000000000 0000000000000000 3fe0: 0000000000000000 0000000000000000 0000000275ce3ff0 0000000275ce3ff8 Call trace: Exception stack(0xffffffc1f5ce3b30 to 0xffffffc1f5ce3c60) 3b20: dead000000000060 0000008000000000 3b40: ffffffc1f5ce3d00 ffffff80084cb694 0000000000000008 0000000000000e88 3b60: ffffffc1f5ce3bb0 ffffff80080dac68 ffffffc1f5ce3b90 ffffff8008826fe4 3b80: 00000000000001c0 00000000000001c0 ffffffc1f5ce3bb0 ffffff800848dfcc 3ba0: 0000000000020000 ffffff8008b15ae4 ffffffc1f5ce3c00 ffffff800808f000 3bc0: 0000000000000010 ffffff80088377f0 ffffffc1f5ccd590 0000000000000140 3be0: dead000000000100 dead000000000200 0000000000000001 0000000000000000 3c00: 0000000000000000 ffffff8008ce2020 ffffffc1f5cc3338 ffffffc1f5ce0000 3c20: 0000000000000840 0000000000000001 0000000000000000 ffffffffffffffff 3c40: ffffffffffffffff ffffffffffffffff 0000000000000001 0000000000000007 [] pl330_irq_handler+0x27c/0x390 [] irq_forced_thread_fn+0x38/0x88 [] irq_thread+0x140/0x200 [] kthread+0xd8/0xf0 [] ret_from_fork+0x10/0x40 Code: f2a00838 f9405763 aa1c03e1 aa1503e0 (f9000443) ---[ end trace f50005726d31199c ]--- Kernel panic - not syncing: Fatal exception in interrupt SMP: stopping secondary CPUs SMP: failed to stop secondary CPUs 0-1 Kernel Offset: disabled Memory Limit: none ---[ end Kernel panic - not syncing: Fatal exception in interrupt To fix this, re-start with the list-head after dropping the lock then re-takeing it. Reviewed-by: Frank Mori Hess Tested-by: Frank Mori Hess Signed-off-by: Qi Hou Signed-off-by: Vinod Koul drivers/dma/pl330.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1bbab525b6f414ace53f56fc0a51d8f15dcbae78 Author: Stefan Brüns Date: Tue Jan 9 18:33:39 2018 -0500 media: cxusb: restore RC_MAP for MyGica T230 Commit f8585ce655e9 ("[media] dvb-usb-cxusb: Geniatech T230C support") sneaked in an unrelated change for the older T230 (not C) model. As the commit was reverted this change was reverted too, although likely correct. Fixes: f8585ce655e9 ("[media] dvb-usb-cxusb: Geniatech T230C support") Signed-off-by: Stefan Brüns Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/cxusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c20ffbfe085ff3e3082e4987c2126a461bafbc6a Author: Evgeny Plehov Date: Tue Jan 9 18:33:38 2018 -0500 media: dvb-usb-cxusb: Geniatech T230C support This reverts commit f8585ce655e9cdeabc38e8e2580b05735110e4a5. The T230C is handled by the dvb-usb-v2/dvbsky.c driver, which should be preferred over a dvb-usb (v1) driver. Signed-off-by: Stefan Brüns Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/cxusb.c | 139 +------------------------------------- 1 file changed, 1 insertion(+), 138 deletions(-) commit 19fbf1ba2e609e8bc6dad943de4e1314ca7c436d Author: Brad Love Date: Tue Jan 9 11:44:26 2018 -0500 media: cx231xx: Add support for Hauppauge HVR-975 Hauppauge HVR-975 is hybrid NTSC/PAL, QAM/ATSC, and DVB-C/T/T2 usb device. Only ATSC/QAM front end is initially active. Second frontend support is work in progress. CX23102 + LG3306A/Si2168(WiP) + Si2157 Changes since v1: - removed double semicolon Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-cards.c | 42 ++++++++++++++++++ drivers/media/usb/cx231xx/cx231xx-dvb.c | 74 +++++++++++++++++++++++++++++++ drivers/media/usb/cx231xx/cx231xx.h | 1 + 3 files changed, 117 insertions(+) commit c5bef50e52b2cdc8ee757220aae21083451f5f8d Author: Brad Love Date: Tue Jan 9 11:38:35 2018 -0500 media: cx231xx: Add support for Hauppauge HVR-935C HVR-935C is hybrid PAL, DVB-C/T/T2 usb device. CX23102 + Si2168 + Si2157 Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-cards.c | 42 +++++++++++++++++ drivers/media/usb/cx231xx/cx231xx-dvb.c | 75 +++++++++++++++++++++++++++++++ drivers/media/usb/cx231xx/cx231xx.h | 1 + 3 files changed, 118 insertions(+) commit b312598dd48ddf22a0d144ca08b898da605a9f1f Author: Xiongfeng Wang Date: Mon Jan 8 07:52:34 2018 -0500 media: dibx000_common: use strlcpy() instead of strncpy() gcc-8 reports drivers/media/dvb-frontends/dibx000_common.c: In function 'i2c_adapter_init': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 48 equals destination size [-Wstringop-truncation] We need to use strlcpy() to make sure the dest string is nul-terminated. Signed-off-by: Xiongfeng Wang Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/dibx000_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79d6e6e6581cc5397cb179dd2a442d18e423897a Author: Colin Ian King Date: Sat Jan 6 11:03:27 2018 -0500 media: exynos4-is: make array 'cmd' static, shrinks object size Don't populate the const read-only array 'cmd' on the stack but instead make it static. Makes the object code smaller by 38 bytes: Before: text data bss dec hex filename 4950 868 0 5818 16ba fimc-is-regs.o After: text data bss dec hex filename 4824 956 0 5780 1694 fimc-is-regs.o (gcc version 7.2.0 x86_64) Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-is-regs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c00ba2c1230042e2c46f1466c20f395cab0d9b11 Author: Brad Love Date: Fri Jan 5 19:48:22 2018 -0500 media: cx23885: Add support for new Hauppauge QuadHD (885) Add new QuadHD digital only PCIe boards to driver list. Differentiate them from 888 digital/analog QuadHD models. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-cards.c | 42 ++++++++++++++++++++++--------- drivers/media/pci/cx23885/cx23885-core.c | 8 ++++++ drivers/media/pci/cx23885/cx23885-dvb.c | 6 +++++ drivers/media/pci/cx23885/cx23885.h | 2 ++ 4 files changed, 46 insertions(+), 12 deletions(-) commit 16fad6743245df4e385817d74ee6e981d43a71bc Author: Brad Love Date: Fri Jan 5 19:48:21 2018 -0500 media: cx23885: Add support for Hauppauge PCIe Starburst2 Add new PCIe DVB-S/S2. A single port Hauppauge HVR-5525 cx23885 + a8293 + m88rs6000t Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-cards.c | 11 +++++++++++ drivers/media/pci/cx23885/cx23885-dvb.c | 18 ++++++++++-------- drivers/media/pci/cx23885/cx23885.h | 1 + 3 files changed, 22 insertions(+), 8 deletions(-) commit 94f115188e4546a26ac4f267d22e0a66e57af5f7 Author: Brad Love Date: Fri Jan 5 19:48:20 2018 -0500 media: cx23885: Add support for Hauppauge PCIe HVR1265 K4 Add new PCIe board to driver list and board register/configure functions cx23885 + lgdt3306a + si2157 digital/analog Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-cards.c | 27 ++++++++++++++++++ drivers/media/pci/cx23885/cx23885-dvb.c | 46 +++++++++++++++++++++++++++++++ drivers/media/pci/cx23885/cx23885-input.c | 3 ++ drivers/media/pci/cx23885/cx23885-video.c | 5 +++- drivers/media/pci/cx23885/cx23885.h | 1 + 5 files changed, 81 insertions(+), 1 deletion(-) commit 8177733af1f1639005f532ac2cf2f5c1cce7b8e6 Author: Brad Love Date: Fri Jan 5 19:48:19 2018 -0500 media: cx23885: Enable new Hauppauge PCIe ImpactVCBe variant Add ID of new card revision to driver list Analog PAL/NTSC capture. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-cards.c | 4 ++++ 1 file changed, 4 insertions(+) commit f9fe90a46d12509d8551d215119ccf561eedaa39 Author: Mauro Carvalho Chehab Date: Sat Mar 3 14:49:09 2018 -0500 media: em28xx-video: fix most coding style issues There are a number of coding style issues at em28xx-video. Fix most of them, by using checkpatch in strict mode to point for it. Automatic fixes were made with --fix-inplace, but those were complemented by manual work. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-video.c | 277 ++++++++++++++++++-------------- 1 file changed, 158 insertions(+), 119 deletions(-) commit 08cc05e4e737c1a4df194624f45bdb1eeae90762 Author: Mauro Carvalho Chehab Date: Sat Mar 3 14:26:13 2018 -0500 media: em28xx-input: fix most coding style issues There are a number of coding style issues at em28xx-input. Fix most of them, by using checkpatch in strict mode to point for it. Automatic fixes were made with --fix-inplace, but those were complemented by manual work. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-input.c | 121 +++++++++++++++++++------------- 1 file changed, 74 insertions(+), 47 deletions(-) commit 8adbc7d68a21bc0bb584100adba326f4fa865878 Author: Mauro Carvalho Chehab Date: Sat Mar 3 14:15:57 2018 -0500 media: em28xx-i2c: fix most coding style issues There are a number of coding style issues at em28xx-i2c. Fix most of them, by using checkpatch in strict mode to point for it. Automatic fixes were made with --fix-inplace, but those were complemented by manual work. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-i2c.c | 90 +++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 42 deletions(-) commit 349ac5bba1f5862b3baf79183d5583dc9d48731e Author: Mauro Carvalho Chehab Date: Sat Mar 3 13:43:34 2018 -0500 media: em28xx-core: fix most coding style issues There are a number of coding style issues at em28xx-core. Fix most of them, by using checkpatch in strict mode to point for it. Automatic fixes were made with --fix-inplace, but those were complemented by manual work. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-core.c | 123 ++++++++++++++++----------------- 1 file changed, 60 insertions(+), 63 deletions(-) commit 4a089668ef22c295ed4997289cc48446c849249c Author: Mauro Carvalho Chehab Date: Sat Mar 3 13:11:11 2018 -0500 media: em28xx-cards: rework the em28xx probing code There is a complex loop there with identifies the em28xx endpoints. It has lots of identations inside, and big names, making harder to understand. Simplify it by moving the main logic into a static function. While here, rename "interface" var to "intf". Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 283 +++++++++++++++++--------------- 1 file changed, 149 insertions(+), 134 deletions(-) commit 0086085b30937416d8b04a8ece698adcba8ef497 Author: Mauro Carvalho Chehab Date: Sat Mar 3 12:41:32 2018 -0500 media: em28xx-cards: fix most coding style issues There are a number of coding style issues, pointed by checkpatch on strict mode. Fix the ones that don't require code refactor here. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 321 +++++++++++++++++++------------- 1 file changed, 189 insertions(+), 132 deletions(-) commit 04964eb0eb0b6869c3d5d2a95afcc2d192094556 Author: Mauro Carvalho Chehab Date: Sat Mar 3 12:17:54 2018 -0500 media: em28xx-camera: fix coding style issues There are some coding style issues at em28xx-camera. Fix them, by using checkpatch in strict mode to point for it. Automatic fixes with --fix-inplace were complemented by manual work. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-camera.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 9f90f5371f52b44ff7d5251e5d54c15ab91fc3de Author: Mauro Carvalho Chehab Date: Sat Mar 3 12:14:02 2018 -0500 media: em28xx-audio: fix coding style issues There are a number of coding style issues at em28xx-audio. Fix them, by using checkpatch in strict mode to point for it. Automatic fixes with --fix-inplace were complemented by manual work. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-audio.c | 70 +++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 30 deletions(-) commit 2e1e84c587d792c4ad0abfbaed22201d9aac7b72 Author: Mauro Carvalho Chehab Date: Sat Mar 3 11:54:19 2018 -0500 media: em28xx-reg.h: Fix coding style issues Use BIT() macros and fix one comment that is not following the Kernel coding style. It should be noticed that the registers bit masks should be casted to unsigned char, as, otherwise, it would produce warnings like: drivers/media/usb/em28xx/em28xx-cards.c:81:33: warning: large integer implicitly truncated to unsigned type [-Woverflow] {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10}, ^ Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-reg.h | 47 ++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 23 deletions(-) commit c69ce6156341e5d24d04689dc429c419fe7c0f9d Author: Mauro Carvalho Chehab Date: Sat Mar 3 11:49:27 2018 -0500 media: em28xx.h: Fix most coding style issues There used to have a lot of coding style issues there. The ones detected by checkpatch, in strict mode, got fixed. Still, we need to work more on it, in order to document all struct fields using kernel-doc macros, but this will be done on some future patch. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx.h | 310 ++++++++++++++++++++++---------------- 1 file changed, 181 insertions(+), 129 deletions(-) commit f22e9e7133ab42d790604c21afc38632e616fc63 Author: Mauro Carvalho Chehab Date: Sat Mar 3 10:43:14 2018 -0500 media: em28xx: Add SPDX license tags where needed Most of the files there are missing a SPDX license tag. Add. While here fix some DRIVER_LICENSE macro in order to reflect the source file license, as some of the headers are GPL v2 only. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-audio.c | 46 ++++++++++++++-------------- drivers/media/usb/em28xx/em28xx-camera.c | 36 ++++++++++------------ drivers/media/usb/em28xx/em28xx-cards.c | 44 ++++++++++++--------------- drivers/media/usb/em28xx/em28xx-core.c | 44 ++++++++++++--------------- drivers/media/usb/em28xx/em28xx-dvb.c | 46 ++++++++++++++-------------- drivers/media/usb/em28xx/em28xx-i2c.c | 43 ++++++++++++-------------- drivers/media/usb/em28xx/em28xx-input.c | 42 ++++++++++++-------------- drivers/media/usb/em28xx/em28xx-reg.h | 5 +++ drivers/media/usb/em28xx/em28xx-v4l.h | 27 +++++++++-------- drivers/media/usb/em28xx/em28xx-vbi.c | 39 +++++++++++------------- drivers/media/usb/em28xx/em28xx-video.c | 52 +++++++++++++++----------------- drivers/media/usb/em28xx/em28xx.h | 41 ++++++++++++------------- 12 files changed, 220 insertions(+), 245 deletions(-) commit fe8d54f0e9aa12e2f032dadc2c6df87a0c3b57be Author: Mauro Carvalho Chehab Date: Sat Mar 3 09:49:42 2018 -0500 media: em28xx-dvb: do some coding style improvements As we're touching a lot on this file, let's solve several Coding Style issues there using checkpatch --fix-inline --strict, and manually adjusting the results. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-dvb.c | 181 ++++++++++++++++++---------------- 1 file changed, 97 insertions(+), 84 deletions(-) commit 9c305eb442f3b371fc722ade827bbf673514123e Author: Neil Armstrong Date: Fri Feb 23 12:44:37 2018 +0100 drm: bridge: dw-hdmi: Fix overflow workaround for Amlogic Meson GX SoCs The Amlogic Meson GX SoCs, embedded the v2.01a controller, has been also identified needing this workaround. This patch adds the corresponding version to enable a single iteration for this specific version. Fixes: be41fc55f1aa ("drm: bridge: dw-hdmi: Handle overflow workaround based on device version") Acked-by: Archit Taneja [narmstrong: s/identifies/identified and rebased against Jernej's change] Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1519386277-25902-1-git-send-email-narmstrong@baylibre.com drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 +++ 1 file changed, 3 insertions(+) commit ad05ff091f004b621da1bb17f66181ef0ef4da0c Author: Mauro Carvalho Chehab Date: Sat Mar 3 09:53:32 2018 -0500 media: s5h14*.h: fix typos for CONTINUOUS There is a typo at the several s5h14*.h headers: continuous were spelled incorrectly. Fix it with this script: for i in $(git grep -l S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK); do sed s,S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,S5H1409_MPEGTIMING_CONTINUOUS_NONINVERTING_CLOCK,g -i $i done for i in $(git grep -l -i continous drivers/media); do sed s,CONTINOUS,CONTINUOUS,g -i $i; done Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/s5h1409.c | 8 ++++---- drivers/media/dvb-frontends/s5h1409.h | 8 ++++---- drivers/media/dvb-frontends/s5h1411.c | 8 ++++---- drivers/media/dvb-frontends/s5h1411.h | 8 ++++---- drivers/media/dvb-frontends/s5h1432.h | 8 ++++---- drivers/media/pci/cx18/cx18-dvb.c | 4 ++-- drivers/media/pci/cx23885/cx23885-dvb.c | 16 ++++++++-------- drivers/media/pci/cx88/cx88-dvb.c | 8 ++++---- drivers/media/pci/saa7134/saa7134-dvb.c | 2 +- drivers/media/pci/saa7164/saa7164-dvb.c | 2 +- drivers/media/usb/cx231xx/cx231xx-dvb.c | 6 +++--- drivers/media/usb/dvb-usb/dib0700_devices.c | 2 +- drivers/media/usb/em28xx/em28xx-dvb.c | 2 +- 13 files changed, 41 insertions(+), 41 deletions(-) commit ad32495b1513fe8cbab717411b9cd8d2d285de30 Author: Mauro Carvalho Chehab Date: Fri Mar 2 09:23:04 2018 -0500 media: em28xx-dvb: simplify DVB module probing logic The module probing logic there is a way more complex than it should be, and requires some special magic to avoid stack overflows when KASAN is enabled. Solve it by creating ancillary functions to setup the platform data and request module. Now, the probing functions are cleaner and easier to understand. As a side effect, the size of the module was reduced by about 9.7% on x86_64: Before this patch: text data bss dec hex filename 51090 14192 96 65378 ff62 drivers/media/usb/em28xx/em28xx-dvb.o After this patch: text data bss dec hex filename 44743 14192 96 59031 e697 drivers/media/usb/em28xx/em28xx-dvb.o Tested with a PCTV 461e device. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-dvb.c | 546 +++++++++------------------------- 1 file changed, 145 insertions(+), 401 deletions(-) commit 5c5f80307ab27c53b56569245a0b12f4e3b577de Author: Jérôme Forissier Date: Fri Nov 24 15:47:18 2017 +0100 tee: optee: report OP-TEE revision information When the driver initializes, report the following information about the OP-TEE OS: - major and minor version, - build identifier (if available). Signed-off-by: Jerome Forissier Reviewed-by: Matthias Brugger Signed-off-by: Jens Wiklander drivers/tee/optee/core.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 6e112de0427874500fb9c373595481653ae4078d Author: Jérôme Forissier Date: Fri Nov 24 15:47:17 2017 +0100 tee: optee: GET_OS_REVISION: document a2 as a build identifier In the OPTEE_SMC_CALL_GET_OS_REVISION request, the previously reserved parameter a2 is now documented as being an optional build identifier (such as an SCM revision or commit ID, for instance). A new structure optee_smc_call_get_os_revision_result is introduced to be used when querying the secure OS version, instead of re-using the struct defined for OPTEE_SMC_CALLS_REVISION. Signed-off-by: Jerome Forissier Reviewed-by: Matthias Brugger Signed-off-by: Jens Wiklander drivers/tee/optee/optee_smc.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 7dd003aec2016e90d33f25f90ad4cebb12224a8a Author: Peng Fan Date: Mon Jan 15 17:27:35 2018 +0800 tee: correct max value for id allocation The privileged dev id range is [TEE_NUM_DEVICES / 2, TEE_NUM_DEVICES). The non-privileged dev id range is [0, TEE_NUM_DEVICES / 2). So when finding a slot for them, need to use different max value. Signed-off-by: Peng Fan Signed-off-by: Jens Wiklander drivers/tee/tee_core.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 8f569c0b4e6b6bd5db1d09551b2df87d912f124e Author: Mauro Carvalho Chehab Date: Fri Mar 2 10:21:16 2018 -0500 media: dvb-core: add helper functions for I2C binding The dvb_attach()/dvb_detach() methods are ugly hacks designed to keep using the I2C low-level API. The proper way is to do I2C bus bindings instead. Several modules were already converted to use it. Yet, it is painful to use it, as lots of code need to be duplicated. Make it easier by providing two new helper functions: - dvb_module_probe() - dvb_module_release() Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 48 ++++++++++++++++++++++++++++++ include/media/dvbdev.h | 65 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 111 insertions(+), 2 deletions(-) commit f410b4093fdd4d8f4644d3d486afe3040eceef7b Author: Arnd Bergmann Date: Mon Dec 11 07:05:02 2017 -0500 media: em28xx: split up em28xx_dvb_init to reduce stack size With CONFIG_KASAN, the init function uses a large amount of kernel stack: drivers/media/usb/em28xx/em28xx-dvb.c: In function 'em28xx_dvb_init.part.4': drivers/media/usb/em28xx/em28xx-dvb.c:2061:1: error: the frame size of 3232 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Using gcc-7 with -fsanitize-address-use-after-scope makes this even worse: drivers/media/usb/em28xx/em28xx-dvb.c: In function 'em28xx_dvb_init': drivers/media/usb/em28xx/em28xx-dvb.c:2069:1: error: the frame size of 4280 bytes is larger than 3072 bytes [-Werror=frame-larger-than=] By splitting out each part of the switch/case statement that has its own local variables into a separate function, no single one of them uses more than 500 bytes, and with a noinline_for_stack annotation we can ensure that they are not merged back together. [mchehab@s-opensource.com: fix conflict with changeset be7fd3c3a8c5 ("media: em28xx: Hauppauge DualHD second tuner functionality")] Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab <> Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-dvb.c | 971 ++++++++++++++++++---------------- 1 file changed, 520 insertions(+), 451 deletions(-) commit 2d74187d5b4e29776e151ffcc09bdaedfd46e002 Author: Peter Rosin Date: Mon Jan 22 08:40:02 2018 +0100 i2c: mux: pca954x: verify the device id of the pca984x chips Make sure to not disallow the chips on adapters that are not capable of reading the device id, but also make sure to check the device id before writing to the chip. Tested-by: Adrian Fiergolski Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-pca954x.c | 55 +++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 6 deletions(-) commit dde67eb1beebcd8493e7b30e74a80f0865ab7e36 Author: Peter Rosin Date: Mon Jan 22 08:32:01 2018 +0100 i2c: add i2c_get_device_id() to get the standard i2c device id Can be used during probe to double check that the probed device is what is expected. Loosely based on code from Adrian Fiergolski . Tested-by: Adrian Fiergolski Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin drivers/i2c/i2c-core-base.c | 33 +++++++++++++++++++++++++++++++++ include/linux/i2c.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) commit cf68c22f106369f6124342c58c4a50f07edd2174 Author: Mauro Carvalho Chehab Date: Thu Mar 1 12:54:06 2018 -0500 media: em28xx: adjust I2C timeout according with I2C speed If the I2C speed is too slow, it should wait more for an answer. While here, change disconnected type from char to unsigned int, just like all other bitmask fields there at em28xx struct. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 2 ++ drivers/media/usb/em28xx/em28xx-i2c.c | 36 ++++++++++++++++++++++++++++++--- drivers/media/usb/em28xx/em28xx.h | 19 ++--------------- 3 files changed, 37 insertions(+), 20 deletions(-) commit 0108ae7fd2972707cde3fafa6fec555c50c64e28 Author: Mauro Carvalho Chehab Date: Thu Mar 1 10:34:34 2018 -0500 media: em28xx: constify most static structs There are several em28xx static structs that can now be constified. That caused a significant reduction at data segment: Before: text data bss dec hex filename 85017 59588 576 145181 2371d drivers/media/usb/em28xx/em28xx.o After: text data bss dec hex filename 112345 32292 576 145213 2373d drivers/media/usb/em28xx/em28xx.o Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 106 ++++++++++++++++---------------- drivers/media/usb/em28xx/em28xx-core.c | 2 +- drivers/media/usb/em28xx/em28xx-input.c | 6 +- drivers/media/usb/em28xx/em28xx.h | 16 ++--- 4 files changed, 66 insertions(+), 64 deletions(-) commit aa62980be47e1fe1f40cbaf0a80589193faa7ab9 Author: Mauro Carvalho Chehab Date: Thu Mar 1 10:08:42 2018 -0500 media: em28xx: stop rewriting device's struct Writing at the device's struct is evil, as two em28xx devices may be using it. So, stop abusing it, storing the values inside struct em28xx_dev. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 14 ++++++++------ drivers/media/usb/em28xx/em28xx-core.c | 4 ++-- drivers/media/usb/em28xx/em28xx-video.c | 26 +++++++++++++------------- drivers/media/usb/em28xx/em28xx.h | 2 ++ 4 files changed, 25 insertions(+), 21 deletions(-) commit 6cda90b63edd1d2b1446793e0fcb8b4a725f8ac5 Author: Mauro Carvalho Chehab Date: Thu Mar 1 09:59:28 2018 -0500 media: em28xx: improve the logic with sets Xclk and I2C speed The logic there should be called on two places. Also, ideally, it should not be modifying the device struct. So, change the logic accordingly. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 45 +++++++++++++++++---------------- 1 file changed, 23 insertions(+), 22 deletions(-) commit d571b592c6206d33731f41aa710fa0f69ac8611b Author: Mauro Carvalho Chehab Date: Tue Feb 27 06:08:09 2018 -0500 media: em28xx: don't use coherent buffer for DMA transfers While coherent memory is cheap on x86, it may cause performance impacts on other archs. As we don't have any good reason to use it, let's change the logic by allocating memory via kmalloc() and letting the USB core to do the DMA mapping and memory free for us. While here, also fixes an issue that it was not de-allocating memories if something gets wrong during memory block allocation. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-core.c | 51 +++++++++++++++------------------- drivers/media/usb/em28xx/em28xx.h | 2 +- 2 files changed, 24 insertions(+), 29 deletions(-) commit 94448e21cf08b10f7dc7acdaca387594370396b0 Author: Brad Love Date: Fri Jan 5 09:57:13 2018 -0500 media: lgdt3306a: Fix a double kfree on i2c device remove Both lgdt33606a_release and lgdt3306a_remove kfree state, but _release is called first, then _remove operates on states members before kfree'ing it. This can lead to random oops/GPF/etc on USB disconnect. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/lgdt3306a.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 835d66173a38538c072a7c393d02360dcfac8582 Author: Brad Love Date: Fri Jan 5 09:57:12 2018 -0500 media: lgdt3306a: Fix module count mismatch on usb unplug When used as an i2c device there is a module usage count mismatch on removal, preventing the driver from being used thereafter. dvb_attach increments the usage count so it is properly balanced on removal. On disconnect of Hauppauge SoloHD/DualHD before: lsmod | grep lgdt3306a lgdt3306a 28672 -1 i2c_mux 16384 1 lgdt3306a On disconnect of Hauppauge SoloHD/DualHD after: lsmod | grep lgdt3306a lgdt3306a 28672 0 i2c_mux 16384 1 lgdt3306a Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/lgdt3306a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4966c0c5c61c0c3a5fb0ebfed7495df02027205f Author: Brad Love Date: Thu Jan 4 19:04:19 2018 -0500 media: lgdt3306a: Add QAM AUTO support As configured currently, modulation in the driver is set to auto detect, no matter what the user sets modulation to. This leads to both QAM64 and QAM256 having the same effect. QAM AUTO is explicitly added here for compatibility with scanning software who can use AUTO instead of doing essentially the same scan twice. Also included is a module option to enforce a specific QAM modulation if desired. The true modulation is read before calculating the snr. Changes are backwards compatible with current behaviour. Signed-off-by: Brad Love Reviewed-by: Michael Ira Krufky Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/lgdt3306a.c | 42 ++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 9 deletions(-) commit 4c7c3f9b1a85d26ffd4a8a31dd661856c7482357 Author: Brad Love Date: Thu Jan 4 20:30:24 2018 -0500 media: lgdt3306a: QAM streaming improvement Add some register updates required for stable viewing on Cablevision in NY. Does not adversely affect other providers. Changes since v1: - Change upper case hex to lower case. Signed-off-by: Brad Love Reviewed-by: Michael Ira Krufky Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/lgdt3306a.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 5b3a8e906973540b61dbf402c6b6f8d64d4ae119 Author: Brad Love Date: Thu Jan 4 19:04:17 2018 -0500 media: lgdt3306a: Set fe ops.release to NULL if probed If release is part of frontend ops then it is called in the course of dvb_frontend_detach. The process also decrements the module usage count. The problem is if the lgdt3306a driver is reached via i2c_new_device, then when it is eventually destroyed remove is called, which further decrements the module usage count to negative. After this occurs the driver is in a bad state and no longer works. Also fixed by NULLing out the release callback is a double kfree of state, which introduces arbitrary oopses/GPF. This problem is only currently reachable via the em28xx driver. On disconnect of Hauppauge SoloHD before: lsmod | grep lgdt3306a lgdt3306a 28672 -1 i2c_mux 16384 1 lgdt3306a On disconnect of Hauppauge SoloHD after: lsmod | grep lgdt3306a lgdt3306a 28672 0 i2c_mux 16384 1 lgdt3306a Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/lgdt3306a.c | 1 + 1 file changed, 1 insertion(+) commit cc4406d919d25f2d8667a0eebab179dadaaa1cb5 Author: Brad Love Date: Thu Jan 4 19:04:16 2018 -0500 media: em28xx: Enable Hauppauge SoloHD rebranded 292e SE Add a missing device to the driver table. Signed-off-by: Brad Love Reviewed-by: Michael Ira Krufky Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 2 ++ 1 file changed, 2 insertions(+) commit 7cc62d0b8e257fbac8e2972074351bc766b96853 Author: Daniele Ceraolo Spurio Date: Mon Mar 5 14:21:22 2018 -0800 drm/i915/error: capture uc_state after gen_state error->device_info.has_guc, which we check in capture_uc_state, is set in capture_gen_state, so the latter needs to be performed first. v2: rebased Reported-by: Vinay Belgaumkar Fixes: 7d41ef3479a6 (drm/i915: Add Guc/HuC firmware details to error state) Cc: Vinay Belgaumkar Cc: Michal Wajdeczko Cc: Chris Wilson Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180305222122.3547-3-daniele.ceraolospurio@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2a326c928cca1f5e36a3dceaf66e8c6b34e9cb8 Author: Brad Love Date: Thu Jan 4 19:04:15 2018 -0500 media: em28xx: Add Hauppauge SoloHD/DualHD bulk models Add additional pids to driver list Signed-off-by: Brad Love Reviewed-by: Michael Ira Krufky Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 53b725c7db127d16d1a83ed5dfd601d65fe976fb Author: Daniele Ceraolo Spurio Date: Mon Mar 5 14:21:21 2018 -0800 drm/i915/error: standardize function style in error capture some of the static functions used from capture() have the "i915_" prefix while other don't; most of them take i915 as a parameter, but one of them derives it internally from error->i915. Let's be consistent by avoiding prefix for static functions and by getting i915 from error->i915. While at it, s/dev_priv/i915 in functions that don't perform register reads. v2: take i915 from error->i915 (Michal), s/dev_priv/i915, update commit message Cc: Michal Wajdeczko Cc: Chris Wilson Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Michel Thierry Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180305222122.3547-2-daniele.ceraolospurio@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gpu_error.c | 84 ++++++++++++++++------------------- 1 file changed, 39 insertions(+), 45 deletions(-) commit 618d87d783adc86db5989c25eab54780f21314d9 Author: Daniele Ceraolo Spurio Date: Mon Mar 5 14:21:20 2018 -0800 drm/i915/error: remove unused gen8_engine_sync_index Leftover from Gen8 ringbuffer support removal Cc: Chris Wilson Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180305222122.3547-1-daniele.ceraolospurio@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gpu_error.c | 21 --------------------- 1 file changed, 21 deletions(-) commit 48efbc370eb2a9857cf65aec675c122302207dbc Author: Brad Love Date: Thu Jan 4 19:04:14 2018 -0500 media: em28xx: Increase max em28xx boards to max dvb adapters Maximum 4 em28xx boards is too low, this can be maxed out by two devices. This allows all the dvb adapters in the system to be em28xx if so desired. Signed-off-by: Brad Love Reviewed-by: Michael Ira Krufky Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7c7e8d7803406daa21e96d00c357de8b77b6764 Author: Brad Love Date: Thu Jan 4 19:04:13 2018 -0500 media: em28xx: USB bulk packet size fix Hauppauge em28xx bulk devices exhibit continuity errors and corrupted packets, when run in VMWare virtual machines. Unknown if other manufacturers bulk models exhibit the same issue. KVM/Qemu is unaffected. According to documentation the maximum packet multiplier for em28xx in bulk transfer mode is 256 * 188 bytes. This changes the size of bulk transfers to maximum supported value and have a bonus beneficial alignment. Before: After: This sets up USB to expect just as many bytes as the em28xx is set to emit. Successful usage under load afterwards natively and in both VMWare and KVM/Qemu virtual machines. Signed-off-by: Brad Love Reviewed-by: Michael Ira Krufky Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b5f69f5b94489343d939700a50a0a841a16f97d Author: Brad Love Date: Thu Feb 1 17:04:37 2018 -0500 media: em28xx: Bulk transfer implementation fix Set appropriate bulk/ISOC transfer multiplier on capture start. This sets ISOC transfer to USB endpoint configuration This sets bulk transfer to 48128 bytes (188 * 256) The bulk multiplier is maximum allowed according to Empia. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-core.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 0eeb232f5aadc2e258e3963aeacaf405ca842e78 Author: Mauro Carvalho Chehab Date: Tue Mar 6 04:30:22 2018 -0500 media: em28xx: constify a new function em28xx_duplicate_dev() is static. This were supposed to be merged on the last patch, but somehow, I forgot "-a" when I called git commit --amend. Fixes: be7fd3c3a8c5 ("media: em28xx: Hauppauge DualHD second tuner functionality") Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be7fd3c3a8c5e9acbc69f887ca961df5e68cf6f0 Author: Brad Love Date: Thu Jan 4 19:04:11 2018 -0500 media: em28xx: Hauppauge DualHD second tuner functionality Implement use of secondary TS port on em28xx. Adds has_dual_ts field, allows secondary demod/tuner to be added to a single em28xx device. Hauppauge DualHD models are configured to use this feature. [mchehab@s-opensource.com: em28xx_duplicate_dev() should be static] Signed-off-by: Brad Love Reviewed-by: Michael Ira Krufky Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 126 +++++++++++++++++++++++++++++++- drivers/media/usb/em28xx/em28xx-core.c | 42 +++++++++-- drivers/media/usb/em28xx/em28xx-dvb.c | 33 +++++++-- drivers/media/usb/em28xx/em28xx.h | 12 +++ 4 files changed, 196 insertions(+), 17 deletions(-) commit 7aa92c4229fefff0cab6930cf977f4a0e3e606d8 Author: Dan Gopstein Date: Mon Dec 25 16:16:14 2017 -0500 media: ABS macro parameter parenthesization Replace usages of the locally defined ABS() macro with calls to the canonical abs() from kernel.h and remove the old definitions of ABS() This change was originally motivated by two local definitions of the ABS (absolute value) macro that fail to parenthesize their parameter properly. This can lead to a bad expansion for low-precedence expression arguments. For example: ABS(1-2) currently expands to ((1-2) < 0 ? (-1-2) : (1-2)) which evaluates to -3. But the correct expansion would be ((1-2) < 0 ? -(1-2) : (1-2)) which evaluates to 1. Signed-off-by: Dan Gopstein Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/dib0090.c | 4 ++-- drivers/media/dvb-frontends/dib7000p.c | 2 +- drivers/media/dvb-frontends/dib8000.c | 2 +- drivers/media/dvb-frontends/dibx000_common.h | 2 -- drivers/media/dvb-frontends/mb86a16.c | 8 +++----- drivers/media/dvb-frontends/stv0367_priv.h | 1 - drivers/media/dvb-frontends/stv0900_priv.h | 1 - drivers/media/dvb-frontends/stv0900_sw.c | 6 +++--- 8 files changed, 10 insertions(+), 16 deletions(-) commit 2efa83920c7f4fb214517437c730afdaa4e28391 Author: Baruch Siach Date: Thu Feb 22 21:22:50 2018 +0200 drm: of: simplify component probe code Use positive logic for better readability. This also eliminates one of_node_put() call, making the code shorter. Signed-off-by: Baruch Siach Reviewed-by: Philipp Zabel Tested-by: Philipp Zabel Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/61c56895d44117d80e7d82f04e729e29c60fadbd.1519327370.git.baruch@tkos.co.il drivers/gpu/drm/drm_of.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 4f9a4cd66c1201ce2b26ba895b2be63b8b38bb68 Author: Linus Walleij Date: Tue Mar 6 09:04:15 2018 +0100 gpio: mockup: Update Bamvors mail address Bamvor changed his mail so let's updat his mail address everywhere. Cc: Bamvor Jian Zhang Signed-off-by: Linus Walleij MAINTAINERS | 2 +- drivers/gpio/gpio-mockup.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 3bd07ccd27622d598fd9d87f3032dd457ad62083 Author: Joe Moriarty Date: Tue Feb 20 14:11:57 2018 -0500 drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem The Parfait (version 2.1.0) static code analysis tool found the following NULL pointer dereference problem. - drivers/gpu/drm/drm_drv.c Any calls to drm_minor_get_slot() could result in the return of a NULL pointer when an invalid DRM device type is encountered. The return of NULL was removed with BUG() from drm_minor_get_slot(). Signed-off-by: Joe Moriarty Reviewed-by: Steven Sistare Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180220191157.100960-3-joe.moriarty@oracle.com drivers/gpu/drm/drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ffb8deeed58b75dd1a23580845233b6ce0dca6c Author: Joe Moriarty Date: Tue Feb 20 14:11:56 2018 -0500 drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem The Parfait (version 2.1.0) static code analysis tool found the following NULL pointer derefernce problem. - drivers/gpu/drm/drm_vblank.c Null pointer checks were added to return values from calls to drm_crtc_from_index(). There is a possibility, however minute, that crtc->index may not be found when trying to find the struct crtc from it's assigned index given in drm_crtc_init_with_planes(). 3 return checks for NULL where added with a call to WARN_ON(!crtc). Signed-off-by: Joe Moriarty Reviewed-by: Steven Sistare Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180220191157.100960-2-joe.moriarty@oracle.com drivers/gpu/drm/drm_vblank.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 991ecefbdd4b81719597d6c406df8d26ef5c1546 Author: Xiong Zhang Date: Tue Mar 6 06:07:28 2018 +0800 drm/i915/gvt: Return error at the failure of finding page_track In XenGT, ioreq copy is used to trap mmio write and ppgtt write. Both of them are memory write, ioreq handler couldn't distinguish them. So ioreq handler probe the ppgtt write handler, if it is succuess, this ioreq is ppgtt write, otherwise it is mmio write. So ppgtt write handler should return an error at the failure of finding page track, it is fatal to implement ioreq handler in XenGT. Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/page_track.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7e60946feb4287111dc61a13ee66ea4295f4f6b4 Author: Xiong Zhang Date: Tue Mar 6 06:07:27 2018 +0800 drm/i915/gvt: Release gvt->lock at the failure of finding page track page_track_handler take lock at the beginning, the lock should be released at the failure of finding page track. Otherwise deadlock will happen. Fixes: e502a2af4c35 ("drm/i915/gvt: Provide generic page_track infrastructure for write-protected page") Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/page_track.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 55b4ce61a2a1608881ef7eab8a4e3fab3718dc4d Merge: 8af3136 6afad54 Author: Ingo Molnar Date: Tue Mar 6 07:34:04 2018 +0100 Merge tag 'perf-core-for-mingo-4.17-20180305' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: - Be more robust when drawing arrows in the annotation TUI, avoiding a segfault when jump instructions have as a target addresses in functions other that the one currently being annotated. The full fix will come in the following days, when jumping to other functions will work as call instructions (Arnaldo Carvalho de Melo) - Allow asking for the maximum allowed sample rate in 'top' and 'record', i.e. 'perf record -F max' will read the kernel.perf_event_max_sample_rate sysctl and use it (Arnaldo Carvalho de Melo) - When the user specifies a freq above kernel.perf_event_max_sample_rate, Throttle it down to that max freq, and warn the user about it, add as well --strict-freq so that the previous behaviour of not starting the session when the desired freq can't be used can be selected (Arnaldo Carvalho de Melo) - Find 'call' instruction target symbol at parsing time, used so far in the TUI, part of the infrastructure changes that will end up allowing for jumps to navigate to other functions, just like 'call' instructions. (Arnaldo Carvalho de Melo) - Use xyarray dimensions to iterate fds in 'perf stat' (Andi Kleen) - Ignore threads for which the current user hasn't permissions when enabling system-wide --per-thread (Jin Yao) - Fix some backtrace perf test cases to use 'perf record' + 'perf script' instead, till 'perf trace' starts using ordered_events or equivalent to avoid symbol resolving artifacts due to reordering of PERF_RECORD_MMAP events (Jiri Olsa) - Fix crash in 'perf record' pipe mode, it needs to allocate the ID array even for a single event, unlike non-pipe mode (Jiri Olsa) - Make annoying fallback message on older kernels with newer 'perf top' binaries trying to use overwrite mode and that not being present in the older kernels (Kan Liang) - Switch last users of old APIs to the newer perf_mmap__read_event() one, then discard those old mmap read forward APIs (Kan Liang) - Fix the usage on the 'perf kallsyms' man page (Sangwon Hong) - Simplify cgroup arguments when tracking multiple events (weiping zhang) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 8af31363cda93724c237b6ffb24380f4441d2f8d Merge: ddc4bec 661e50b Author: Ingo Molnar Date: Tue Mar 6 07:30:22 2018 +0100 Merge tag 'v4.16-rc4' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 0f3e9c97eb5a97972b0c0076a5cc01bb142f8e70 Merge: ef3f6c2 ce38061 Author: David S. Miller Date: Tue Mar 6 00:53:44 2018 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net All of the conflicts were cases of overlapping changes. In net/core/devlink.c, we have to make care that the resouce size_params have become a struct member rather than a pointer to such an object. Signed-off-by: David S. Miller commit 6846dfeb87a623e0bf31df4b6a7041d70277b0e5 Author: Changbin Du Date: Mon Mar 5 15:30:34 2018 +0800 drm/i915/kvmgt: Add kvmgt debugfs entry nr_cache_entries under vgpu Add a new debugfs entry kvmgt_nr_cache_entries under vgpu which shows the number of entry in dma cache. $ cat /sys/kernel/debug/gvt/vgpu1/kvmgt_nr_cache_entries 10101 v3: fix compiling error for some configuration. (Xiong Zhang ) v2: keep debugfs layout flat. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 1 + drivers/gpu/drm/i915/gvt/kvmgt.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) commit cf4ee73fd9b6d31fa7530f72cff5cc97b94f1272 Author: Changbin Du Date: Thu Mar 1 15:49:59 2018 +0800 drm/i915/gvt: Fix guest vGPU hang caused by very high dma setup overhead The implementation of current kvmgt implicitly setup dma mapping at MPT API gfn_to_mfn. First this design against the API's original purpose. Second, there is no unmap hit in this design. The result is that the dma mapping keep growing larger and larger. For mutl-vm case, they will consume IOMMU IOVA low 4GB address space quickly and so tons of rbtree entries crated in the IOMMU IOVA allocator. Finally, single IOVA allocation can take as long as ~70ms. Such latency is intolerable. To address both above issues, this patch introduced two new MPT API: o dma_map_guest_page - setup dma map for guest page o dma_unmap_guest_page - cancel dma map for guest page The kvmgt implements these 2 API. And to reduce dma setup overhead for duplicated pages (eg. scratch pages), two caches are used: one is for mapping gfn to struct gvt_dma, another is for mapping dma addr to struct gvt_dma. With these 2 new API, the gtt now is able to cancel dma mapping when page table is invalidated. The dma mapping is not in a gradual increase now. v2: follow the old logic for VFIO_IOMMU_NOTIFY_DMA_UNMAP at this point. Cc: Hang Yuan Cc: Xiong Zhang Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 50 ++++-- drivers/gpu/drm/i915/gvt/gvt.h | 9 +- drivers/gpu/drm/i915/gvt/hypercall.h | 5 + drivers/gpu/drm/i915/gvt/kvmgt.c | 288 ++++++++++++++++++++--------------- drivers/gpu/drm/i915/gvt/mpt.h | 28 ++++ 5 files changed, 246 insertions(+), 134 deletions(-) commit b52646fd5bb40422be4ba8e1c3f46c23de6965a3 Author: Zhenyu Wang Date: Thu Feb 22 15:16:18 2018 +0800 drm/i915/gvt: Fix check error on hws_pga_write() fail message Fix below check error by using proper failure message output. drivers/gpu/drm/i915//gvt/handlers.c:1392 hws_pga_write() error: 'vgpu' dereferencing possible ERR_PTR() drivers/gpu/drm/i915//gvt/handlers.c:1402 hws_pga_write() error: 'vgpu' dereferencing possible ERR_PTR() Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 253fe56ea96546bda371d2397443dfe9ee978557 Author: Zhenyu Wang Date: Thu Feb 22 15:16:17 2018 +0800 drm/i915/gvt: Fix one indent error Fix below warning: drivers/gpu/drm/i915//gvt/handlers.c:323 gdrst_mmio_write() warn: inconsistent indenting Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c39bca4e0467acce30b46aae4567bf6369be4068 Author: Zhenyu Wang Date: Thu Feb 22 15:16:16 2018 +0800 drm/i915/gvt: Fix check error on fence mmio handler Fix below error with minor code refactor. CHECK drivers/gpu/drm/i915//gvt/handlers.c drivers/gpu/drm/i915//gvt/handlers.c:203 sanitize_fence_mmio_access() error: 'vgpu' dereferencing possible ERR_PTR() Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 64c066a911b7ec14654d04ad1d5e1b2b8f2feef3 Author: Zhenyu Wang Date: Thu Feb 22 15:16:14 2018 +0800 drm/i915/gvt: Fix check error of vgpu create failure message Fix check error at CHECK drivers/gpu/drm/i915//gvt/kvmgt.c drivers/gpu/drm/i915//gvt/kvmgt.c:455 intel_vgpu_create() error: we previously assumed 'vgpu' could be null (see line 454) For failed vgpu create, just show error return in failure message. Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/kvmgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9803984581de2b09290338687a3d21a7cd16685b Author: Zhenyu Wang Date: Thu Feb 22 15:16:13 2018 +0800 drm/i915/gvt: Fix vGPU sched timeslice calculation warning Fix below warning by using proper ktime helper to calculate timeslice. CHECK drivers/gpu/drm/i915//gvt/sched_policy.c drivers/gpu/drm/i915//gvt/sched_policy.c:108 gvt_balance_timeslice() debug: sval_binop_signed: invalid divide LLONG_MIN/-1 drivers/gpu/drm/i915//gvt/sched_policy.c:108 gvt_balance_timeslice() debug: sval_binop_signed: invalid divide LLONG_MIN/-1 Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/sched_policy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0102d0d9227ae7412e3419973c8cefa69369a9a7 Author: Zhenyu Wang Date: Thu Feb 22 15:16:12 2018 +0800 drm/i915/gvt: remove gvt max port definition Remove GVT-g private max port definition but use i915 one. Fix error caused by: drivers/gpu/drm/i915//gvt/handlers.c:871 dp_aux_ch_ctl_mmio_write() error: buffer overflow 'display->ports' 5 <= 5 Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7e534ac985d419c011190bc1aa14affdff4ce2e2 Author: Zhenyu Wang Date: Thu Feb 22 15:16:11 2018 +0800 drm/i915/gvt: Fix one gvt_vgpu_error() use in dmabuf.c Fix below warning with proper usage. CHECK drivers/gpu/drm/i915//gvt/dmabuf.c drivers/gpu/drm/i915//gvt/dmabuf.c:462 intel_vgpu_get_dmabuf() error: 'vgpu' dereferencing possible ERR_PTR() Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/dmabuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd7e61b93d068a80bfe6cb55bf00f17332d831a1 Author: Weinan Li Date: Fri Feb 23 14:46:45 2018 +0800 drm/i915/gvt: init mmio by lri command in vgpu inhibit context There is one issue relates to Coarse Power Gating(CPG) on KBL NUC in GVT-g, vgpu can't get the correct default context by updating the registers before inhibit context submission. It always get back the hardware default value unless the inhibit context submission happened before the 1st time forcewake put. With this wrong default context, vgpu will run with incorrect state and meet unknown issues. The solution is initialize these mmios by adding lri command in ring buffer of the inhibit context, then gpu hardware has no chance to go down RC6 when lri commands are right being executed, and then vgpu can get correct default context for further use. v3: - fix code fault, use 'for' to loop through mmio render list(Zhenyu) v4: - save the count of engine mmio need to be restored for inhibit context and refine some comments. (Kevin) v5: - code rebase Cc: Kevin Tian Cc: Zhenyu Wang Signed-off-by: Weinan Li Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 5 +- drivers/gpu/drm/i915/gvt/mmio_context.c | 172 +++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/gvt/mmio_context.h | 3 + drivers/gpu/drm/i915/gvt/scheduler.c | 5 + 4 files changed, 181 insertions(+), 4 deletions(-) commit 64f46f55bb30aebf146ae3cd2c2a4e2a06bcea04 Author: Weinan Li Date: Tue Feb 13 13:24:32 2018 +0800 drm/i915/gvt: add interface to check if context is inhibit No functional change, just for easy to use. v4: - refine comment (Kevin) Signed-off-by: Weinan Li Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/mmio_context.c | 24 ++++++++++++++---------- drivers/gpu/drm/i915/gvt/mmio_context.h | 2 ++ 2 files changed, 16 insertions(+), 10 deletions(-) commit f9a651c05d7ae492185027f6acde25e2bc54edd9 Author: Weinan Li Date: Tue Feb 13 13:24:31 2018 +0800 drm/i915/gvt: add define GEN9_MOCS_SIZE No functional change. This defination will also be used in future patchesi. v4: - refine patch description (Kevin) Signed-off-by: Weinan Li Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/mmio_context.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 420fba78d9b10cf81c04bbf7a6048333cadc2658 Author: Changbin Du Date: Tue Jan 30 19:19:55 2018 +0800 drm/i915/gvt: Define PTE addr mask with GENMASK_ULL Define the masks better. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b6c126a39345f7286bb25135efd9154419127427 Author: Changbin Du Date: Tue Jan 30 19:19:54 2018 +0800 drm/i915/gvt: Manage shadow pages with radix tree We don't know how many page tables will be shadowed. It varies considerably corresponding to guest load. Radix tree is a better choice for us. Since Page Frame Number is used as key so most of the bits are common. Here is some performance data (duration in us) of looking up a element: Before: (aka. ppgtt_find_shadow_page) 0.308 0.292 0.246 0.432 0.143 ... 0.311 0.225 0.382 0.199 0.325 After: (aka. intel_vgpu_find_spt_by_mfn) 0.106 0.106 0.107 0.106 0.105 0.107 ... 0.107 0.109 0.105 0.108 This time I didn't get the early data of hash table. The data is measured when desktop is shown. As last change, the overall benchmark almost is not changed, but we get better scalability. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 50 ++++++++++++++++++++++-------------------- drivers/gpu/drm/i915/gvt/gtt.h | 4 +--- 2 files changed, 27 insertions(+), 27 deletions(-) commit e502a2af4c358d14ecf8fce51bf4988ebb4d10b4 Author: Changbin Du Date: Tue Jan 30 19:19:53 2018 +0800 drm/i915/gvt: Provide generic page_track infrastructure for write-protected page This patch provide generic page_track infrastructure for write-protected guest page. The old page_track logic gets rewrote and now stays in a new standalone page_track.c. This page track infrastructure can be both used by vGUC and GTT shadowing. The important change is that it uses radix tree instead of hash table. We don't have a predictable number of pages that will be tracked. Here is some performance data (duration in us) of looking up a element: Before: (aka. intel_vgpu_find_tracked_page) 0.091 0.089 0.090 ... 0.093 0.091 0.087 ... 0.292 0.285 0.292 0.291 After: (aka. intel_vgpu_find_page_track) 0.104 0.105 0.100 0.102 0.102 0.100 ... 0.101 0.101 0.105 0.105 The hash table has good performance at beginning, but turns bad with more pages being tracked even no 3D applications are running. As expected, radix tree has stable duration and very quick. The overall benchmark (tested with Heaven Benchmark) marginally improved since this is not the bottleneck. What we benefit more from this change is scalability. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/Makefile | 2 +- drivers/gpu/drm/i915/gvt/gtt.c | 119 +++++----------------- drivers/gpu/drm/i915/gvt/gtt.h | 14 --- drivers/gpu/drm/i915/gvt/gvt.c | 2 +- drivers/gpu/drm/i915/gvt/gvt.h | 2 + drivers/gpu/drm/i915/gvt/page_track.c | 181 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/gvt/page_track.h | 56 +++++++++++ drivers/gpu/drm/i915/gvt/vgpu.c | 1 + 8 files changed, 266 insertions(+), 111 deletions(-) commit 0947572849cb3ca7028d9daa3958158639ae4d69 Author: Changbin Du Date: Tue Jan 30 19:19:52 2018 +0800 drm/i915/gvt: Don't extend page_track to mpt layer Don't extend page_track to mpt layer. Keep MPT simple and clean. Meanwhile remove gtt.n_tracked_guest_page which doesn't make much sense. v2: clean up gtt.n_tracked_guest_page. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 54 +++++++++++++++++++++++------------------- drivers/gpu/drm/i915/gvt/mpt.h | 34 +++++--------------------- 2 files changed, 36 insertions(+), 52 deletions(-) commit f66e5ff706038d03e8ef6d012e3aec7824442418 Author: Changbin Du Date: Tue Jan 30 19:19:51 2018 +0800 drm/i915/gvt: Rename mpt api {set, unset}_wp_page to {enable, disable}_page_track The kvmgt's implementation of mpt api {set,unset}_wp_page is not real write-protection - the data get written before invoke this two api. As discussed, change the mpt api to match the real behavior. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/hypercall.h | 4 ++-- drivers/gpu/drm/i915/gvt/kvmgt.c | 8 ++++---- drivers/gpu/drm/i915/gvt/mpt.h | 9 ++++----- 3 files changed, 10 insertions(+), 11 deletions(-) commit d87f5ff35f3fc10a4abe13db6b1af9613f20519d Author: Changbin Du Date: Tue Jan 30 19:19:50 2018 +0800 drm/i915/gvt: Rename shadow_page to short name spt The target structure of some functions is struct intel_vgpu_ppgtt_spt and their names are xxx_shadow_page. It should be xxx_shadow_page_table. Let's use short name 'spt' instead to reduce the length. As well as the hash table name. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 56 +++++++++++++++++++++--------------------- drivers/gpu/drm/i915/gvt/gtt.h | 2 +- 2 files changed, 29 insertions(+), 29 deletions(-) commit 44b467338094d86586d3ec351d8594a6cef0842a Author: Changbin Du Date: Tue Jan 30 19:19:49 2018 +0800 drm/i915/gvt: Rework shadow page management code This is a another big one and the GVT shadow page management code is heavily refined. The new code only use struct intel_vgpu_ppgtt_spt to represent a vgpu shadow page table - w/ or wo/ a guest page associated with. A pure shadow page (no guest page associated) will be used to shadow splited 2M huge gtt. In this case, the spt.guest_page.gfn should be a zero. To search a existed shadow page table, we have two new interfaces: - intel_vgpu_find_spt_by_gfn(), find a spt by guest gfn. It must not be a pure spt. - intel_vgpu_find_spt_by_mfn, Find the spt using shadow page mfn in shadowed PTE. The oos_page management is remained as what is was. v2: Split some changes into small standalone patches. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 470 +++++++++++++++------------------------ drivers/gpu/drm/i915/gvt/gtt.h | 51 ++--- drivers/gpu/drm/i915/gvt/trace.h | 2 +- 3 files changed, 203 insertions(+), 320 deletions(-) commit 72f03d7ea16794c3ac4b7ae945510cf0015d3c3c Author: Changbin Du Date: Tue Jan 30 19:19:48 2018 +0800 drm/i915/gvt: Refine pte shadowing process Make the shadow PTE population code clear. Later we will add huge gtt support based on this. v2: - rebase to latest code. Signed-off-by: Changbin Du Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 173 ++++++++++++++++++++++------------------- 1 file changed, 94 insertions(+), 79 deletions(-) commit d861ca237df8f1ef7b6380cd61f403edfcfc2be1 Author: Changbin Du Date: Tue Jan 30 19:19:47 2018 +0800 drm/i915/gvt: Use standard pte bit definition GTT entry has similar format with the CPU PTE. We'd prefer named macro instead of hardcode. Signed-off-by: Changbin Du Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit e6e9c46fd2351a07f31b3bf3101c57170c13aeab Author: Changbin Du Date: Tue Jan 30 19:19:46 2018 +0800 drm/i915/gvt: Factor out intel_vgpu_{get, put}_ppgtt_mm interface Factor out these two interfaces so we can kill some duplicated code in scheduler.c. v2: - rename to intel_vgpu_{get,put}_ppgtt_mm - refine handle_g2v_notification Signed-off-by: Changbin Du Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 23 ++++++++--------------- drivers/gpu/drm/i915/gvt/gtt.h | 4 ++-- drivers/gpu/drm/i915/gvt/handlers.c | 23 ++++++++--------------- drivers/gpu/drm/i915/gvt/scheduler.c | 16 ++++------------ 4 files changed, 22 insertions(+), 44 deletions(-) commit a143cef7dbefc1cb9853d990c18b16347ecceb39 Author: Changbin Du Date: Tue Jan 30 19:19:45 2018 +0800 drm/i915/gvt: Rename ggtt related functions to be more specific Accurate names help to avoid confusing so improve readability. Signed-off-by: Changbin Du Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 22 +++++++++++----------- drivers/gpu/drm/i915/gvt/gtt.h | 4 ++-- drivers/gpu/drm/i915/gvt/mmio.c | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) commit bc37ab56790fdd57da36fd98aca2dacfb6453d3d Author: Changbin Du Date: Tue Jan 30 19:19:44 2018 +0800 drm/i915/gvt: Add verbose gtt shadow logs This add a new macro gvt_vdbg_mm() to print more verbose logs for gtt shadowing. The added verbose logs are very useful for debugging. gvt_vdbg_mm() only comes into effect if VERBOSE_DEBUG is defined by the developer. Signed-off-by: Changbin Du Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit b0c766bf2911ad5d16affa0d34cf00c246a3c47a Author: Changbin Du Date: Tue Jan 30 19:19:43 2018 +0800 drm/i915/gvt: Refine ggtt_set_shadow_entry Less code and use existed helper ggtt_set_host_entry. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 3aff35128025baa58c0676e501eb4597687ca80f Author: Changbin Du Date: Tue Jan 30 19:19:42 2018 +0800 drm/i915/gvt: Refine ggtt and ppgtt root entry ops Separate ggtt and ppgtt since they are different. A little more code but straightforward. And move these helpers to gtt.c since that is the only client. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 97 ++++++++++++++++++++++++++++++++---------- drivers/gpu/drm/i915/gvt/gtt.h | 34 --------------- 2 files changed, 75 insertions(+), 56 deletions(-) commit 1bc258519dc72070f21291cdd37aeaa192082abd Author: Changbin Du Date: Tue Jan 30 19:19:41 2018 +0800 drm/i915/gvt: Refine the intel_vgpu_mm reference management If we manage an object with a reference count, then its life cycle must flow the reference count operations. Meanwhile, change the operation functions to generic name *put* and *get*. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 12 ++++++------ drivers/gpu/drm/i915/gvt/gtt.h | 28 +++++++++++++++++----------- drivers/gpu/drm/i915/gvt/scheduler.c | 4 ++-- 3 files changed, 25 insertions(+), 19 deletions(-) commit ede9d0cfcb789b6fd86ecb71b4721a19c53956e6 Author: Changbin Du Date: Tue Jan 30 19:19:40 2018 +0800 drm/i915/gvt: Rework shadow graphic memory management code This is a big one and the GVT shadow graphic memory management code is heavily refined. The new code is more straightforward with less code. The struct intel_vgpu_mm is restructured to be clearly defined, use accurate names and some of the original fields are removed which are really redundant. Now we only manage ppgtt mm object with mm->ppgtt_mm.lru_list. No need to mix ppgtt and ggtt together, since one vGPU only has one ggtt object. v4: Don't invoke ppgtt_free_all_shadow_page before intel_vgpu_destroy_all_ppgtt_mm. v3: Add GVT_RING_CTX_NR_PDPS to avoid confusing about the PDPs. v2: Split some changes into small standalone patches. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 520 +++++++++++++++-------------------- drivers/gpu/drm/i915/gvt/gtt.h | 80 +++--- drivers/gpu/drm/i915/gvt/handlers.c | 15 +- drivers/gpu/drm/i915/gvt/mmio.c | 5 +- drivers/gpu/drm/i915/gvt/scheduler.c | 27 +- drivers/gpu/drm/i915/gvt/trace.h | 8 +- 6 files changed, 299 insertions(+), 356 deletions(-) commit 4fd98e374fd377ae0458a9dc44aa779cf9631ddd Author: Rob Herring Date: Wed Feb 28 08:09:45 2018 -0600 scripts: turn off some new dtc warnings by default The latest dtc update adds some new noisy warnings, so turn them off by default. Disable 'avoid_unnecessary_addr_size' and 'alias_paths'. They can be re-enabled by building with 'W=1'. Signed-off-by: Rob Herring scripts/Makefile.lib | 2 ++ 1 file changed, 2 insertions(+) commit 9130ba884640328bb78aaa4840e5ddf06ccafb1c Author: Rob Herring Date: Tue Feb 27 17:40:38 2018 -0600 scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987 This adds the following commits from upstream: aadd0b65c987 checks: centralize printing of property names in failure messages 88960e398907 checks: centralize printing of node path in check_msg f1879e1a50eb Add limited read-only support for older (V2 and V3) device tree to libfdt. 37dea76e9700 srcpos: drop special handling of tab 65893da4aee0 libfdt: overlay: Add missing license 962a45ca034d Avoid installing pylibfdt when dependencies are missing cd6ea1b2bea6 Makefile: Split INSTALL out into INSTALL_{PROGRAM,LIB,DATA,SCRIPT} 51b3a16338df Makefile.tests: Add LIBDL make(1) variable for portability sake 333d533a8f4d Attempt to auto-detect stat(1) being used if not given proper invocation e54388015af1 dtc: Bump version to v1.4.6 a1fe86f380cb fdtoverlay: Switch from using alloca to malloc c8d5472de3ff tests: Improve compatibility with other platforms c81d389a10cc checks: add chosen node checks e671852042a7 checks: add aliases node checks d0c44ebe3f42 checks: check for #{size,address}-cells without child nodes 18a3d84bb802 checks: add string list check for *-names properties 8fe94fd6f19f checks: add string list check 6c5730819604 checks: add a string check for 'label' property a384191eba09 checks: fix sound-dai phandle with arg property check b260c4f610c0 Fix ambiguous grammar for devicetree rule fe667e382bac tests: Add some basic tests for the pci_bridge checks 7975f6422260 Fix widespread incorrect use of strneq(), replace with new strprefixeq() fca296445eab Add strstarts() helper function cc392f089007 tests: Check non-matching cases for fdt_node_check_compatible() bba26a5291c8 livetree: avoid assertion of orphan phandles with overlays c8f8194d76cc implement strnlen for systems that need it c8b38f65fdec libfdt: Remove leading underscores from identifiers 3b62fdaebfe5 Remove leading underscores from identifiers 2d45d1c5c65e Replace FDT_VERSION() with stringify() 2e6fe5a107b5 Fix some errors in comments b0ae9e4b0ceb tests: Correct warning in sw_tree1.c Commit c8b38f65fdec upstream ("libfdt: Remove leading underscores from identifiers") changed the multiple inclusion define protection, so the kernel's libfdt_env.h needs the corresponding update. Signed-off-by: Rob Herring include/linux/libfdt_env.h | 6 +- scripts/dtc/checks.c | 439 +++++++++++++++++++++++------------ scripts/dtc/dtc-parser.y | 17 +- scripts/dtc/dtc.c | 7 +- scripts/dtc/dtc.h | 11 +- scripts/dtc/flattree.c | 2 +- scripts/dtc/libfdt/fdt.c | 13 +- scripts/dtc/libfdt/fdt.h | 6 +- scripts/dtc/libfdt/fdt_overlay.c | 51 ++++ scripts/dtc/libfdt/fdt_ro.c | 132 ++++++++--- scripts/dtc/libfdt/fdt_rw.c | 90 +++---- scripts/dtc/libfdt/fdt_sw.c | 24 +- scripts/dtc/libfdt/fdt_wip.c | 10 +- scripts/dtc/libfdt/libfdt.h | 37 +-- scripts/dtc/libfdt/libfdt_env.h | 33 ++- scripts/dtc/libfdt/libfdt_internal.h | 32 +-- scripts/dtc/livetree.c | 10 +- scripts/dtc/srcpos.c | 5 - scripts/dtc/srcpos.h | 6 +- scripts/dtc/util.h | 9 +- scripts/dtc/version_gen.h | 2 +- 21 files changed, 622 insertions(+), 320 deletions(-) commit e039139be8c25145b103ab365ff1bd4a540066a3 Author: Rob Herring Date: Tue Feb 27 17:28:47 2018 -0600 scripts/dtc: generate lexer and parser during build instead of shipping Now that the kernel build supports flex and bison, remove the _shipped files and generate them during the build instead. Based on Masahiro's original patch. Reviewed-by: Masahiro Yamada Signed-off-by: Rob Herring scripts/dtc/Makefile | 6 +- scripts/dtc/dtc-lexer.lex.c_shipped | 2259 --------------------------------- scripts/dtc/dtc-parser.tab.c_shipped | 2321 ---------------------------------- scripts/dtc/dtc-parser.tab.h_shipped | 125 -- scripts/dtc/update-dtc-source.sh | 7 +- 5 files changed, 5 insertions(+), 4713 deletions(-) commit a54b81ea242309a098162c3284ed964074bee72a Author: Rob Herring Date: Thu Mar 1 08:57:40 2018 -0600 powerpc: boot: add strrchr function libfdt gained a new dependency on strrchr, so copy the implementation from lib/string.c. Most of the string functions are in assembly, but stdio.c already has strnlen, so add strrchr there. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Acked-by: Michael Ellerman Signed-off-by: Rob Herring arch/powerpc/boot/stdio.c | 10 ++++++++++ arch/powerpc/boot/string.h | 1 + 2 files changed, 11 insertions(+) commit 44f013522c3abbfb86e940026e3409dbb6e4317d Author: Shuah Khan Date: Wed Feb 21 17:25:55 2018 -0700 selftests: Makefile set KSFT_TAP_LEVEL to prevent nested TAP headers Export KSFT_TAP_LEVEL and add TAP Header echo to the run_kselftest.sh script from emit_tests target handling. Signed-off-by: Shuah Khan tools/testing/selftests/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 771cbc3bcbb59084766a501772853f2de7009534 Author: Shuah Khan Date: Wed Feb 21 17:22:08 2018 -0700 selftests: lib.mk set KSFT_TAP_LEVEL to prevent nested TAP headers Set KSFT_TAP_LEVEL before running tests to prevent nested TAP header printing from tests. Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 1 + 1 file changed, 1 insertion(+) commit 10f531f6748228583b8c4244216e9e3f34d47379 Author: Shuah Khan Date: Wed Feb 21 17:11:54 2018 -0700 selftests: kselftest framework: add handling for TAP header level Introduce environment variable KSFT_TAP_LEVEL to avoid printing nested TAP headers for each test. lib.mk run_tests target prints TAP header before invoking the test program or test script. Tests need a way to suppress TAP headers if it is already printed out. This new environment variable adds a way for ksft_print_header() print TAP header only when KSFT_TAP_LEVEL isn't set. lib.mk run_tests and test program should print TAP header and set KSFT_TAP_LEVEL to avoid a second TAP header to be printed. selftests Makefile should export KSFT_TAP_LEVEL and add TAP Header echo to the run_kselftest.sh script from emit_tests target handling. Signed-off-by: Shuah Khan tools/testing/selftests/kselftest.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ac93f7046a5371ff08268965c9a696bf97bec105 Author: Laura Abbott Date: Thu Feb 15 17:24:45 2018 -0800 selftests: ion: Add simple test with the vgem driver Ion is designed to be a framework used by other clients who perform operations on the buffer. Use the DRM vgem client as a simple consumer. In conjunction with the dma-buf sync ioctls, this tests the full attach/map path for the system heap. Signed-off-by: Laura Abbott Reviewed-by: Daniel Vetter Signed-off-by: Shuah Khan tools/testing/selftests/android/ion/Makefile | 3 +- tools/testing/selftests/android/ion/config | 1 + tools/testing/selftests/android/ion/ionmap_test.c | 136 ++++++++++++++++++++++ 3 files changed, 139 insertions(+), 1 deletion(-) commit 829dd7d642c90b641f14aed03a722a4d3e058083 Author: Laura Abbott Date: Thu Feb 15 17:24:44 2018 -0800 selftests: ion: Remove some prints There's no need to print messages each time we alloc and free. Remove them. Signed-off-by: Laura Abbott Signed-off-by: Shuah Khan tools/testing/selftests/android/ion/ionutils.c | 6 ------ 1 file changed, 6 deletions(-) commit b68c2575810521e470466b5faf4b79e796d12d74 Author: Jaedon Shin Date: Fri Nov 17 11:19:44 2017 +0900 MIPS: BMIPS: Add Broadcom STB watchdog nodes Adds watchdog device nodes to BCM7xxx MIPS based SoCs. Signed-off-by: Jaedon Shin Reviewed-by: Florian Fainelli Cc: Ralf Baechle Cc: Rob Herring Cc: Kevin Cernekee Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17729/ Signed-off-by: James Hogan arch/mips/boot/dts/brcm/bcm7125.dtsi | 7 +++++++ arch/mips/boot/dts/brcm/bcm7346.dtsi | 7 +++++++ arch/mips/boot/dts/brcm/bcm7358.dtsi | 7 +++++++ arch/mips/boot/dts/brcm/bcm7360.dtsi | 7 +++++++ arch/mips/boot/dts/brcm/bcm7362.dtsi | 7 +++++++ arch/mips/boot/dts/brcm/bcm7420.dtsi | 7 +++++++ arch/mips/boot/dts/brcm/bcm7425.dtsi | 7 +++++++ arch/mips/boot/dts/brcm/bcm7435.dtsi | 7 +++++++ arch/mips/boot/dts/brcm/bcm97125cbmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97346dbsmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97358svmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97360svmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97362svmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97420c.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97425svmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97435svmb.dts | 4 ++++ 16 files changed, 88 insertions(+) commit e84442c12bbfc8cf2d7a33905e9d0e1a693b4356 Author: Jaedon Shin Date: Fri Nov 17 11:19:43 2017 +0900 MIPS: BMIPS: Add Broadcom STB wake-up timer nodes Adds wake-up timer device nodes to BCM7xxx MIPS based SoCs. Signed-off-by: Jaedon Shin Reviewed-by: Florian Fainelli Cc: Ralf Baechle Cc: Rob Herring Cc: Kevin Cernekee Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17728/ Signed-off-by: James Hogan arch/mips/boot/dts/brcm/bcm7346.dtsi | 10 ++++++++++ arch/mips/boot/dts/brcm/bcm7358.dtsi | 10 ++++++++++ arch/mips/boot/dts/brcm/bcm7360.dtsi | 10 ++++++++++ arch/mips/boot/dts/brcm/bcm7362.dtsi | 10 ++++++++++ arch/mips/boot/dts/brcm/bcm7425.dtsi | 10 ++++++++++ arch/mips/boot/dts/brcm/bcm7435.dtsi | 10 ++++++++++ arch/mips/boot/dts/brcm/bcm97346dbsmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97358svmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97360svmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97362svmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97425svmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97435svmb.dts | 4 ++++ 12 files changed, 84 insertions(+) commit c7146a2b5892ce97b71a66a47b0f6106a4a444e3 Author: Jaedon Shin Date: Fri Nov 17 11:19:42 2017 +0900 MIPS: BMIPS: Add Broadcom STB power management nodes Adds power management nodes to BCM7xxx MIPS based SoCs. Signed-off-by: Jaedon Shin Reviewed-by: Florian Fainelli Cc: Ralf Baechle Cc: Rob Herring Cc: Kevin Cernekee Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17727/ Signed-off-by: James Hogan arch/mips/boot/dts/brcm/bcm7346.dtsi | 45 ++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7360.dtsi | 45 ++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7362.dtsi | 45 ++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7425.dtsi | 72 ++++++++++++++++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7435.dtsi | 72 ++++++++++++++++++++++++++++++++++++ 5 files changed, 279 insertions(+) commit a817e5d82a2dc5daaa0a8a66cfab268fdf2f6bb6 Author: Wei Yongjun Date: Mon Mar 5 16:21:31 2018 -0800 memory: ti-emif-sram: remove redundant dev_err call in ti_emif_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun Signed-off-by: Santosh Shilimkar drivers/memory/ti-emif-pm.c | 1 - 1 file changed, 1 deletion(-) commit d363a88b31fc03268eada426f5940ef685b8df21 Author: SF Markus Elfring Date: Mon Mar 5 16:21:26 2018 -0800 memory-EMIF: Use seq_putc() in emif_regdump_show() A single character (line break) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Santosh Shilimkar drivers/memory/emif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07f3398d38da44e1c3741280791c2b62dc9ac785 Author: Suman Anna Date: Mon Mar 5 16:18:49 2018 -0800 ARM: dts: keystone-k2g: Fix unit-address formatting for serial nodes The unit addresses on couple of serial nodes have a leading 0 resulting in couple of warning messages around simple-bus unit address format errors when compiled with W=1. Fix the same. Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eae3c955bbe37f075035765716b948a8491c46b1 Author: Tero Kristo Date: Mon Mar 5 16:18:49 2018 -0800 dt-bindings: memory: ti-emif: add edac support under emif Certain revisions of the TI EMIF IP contain ECC support in them. Reflect this in the DT binding. Also, add interrupts property as a required property for the emif controller, as all revisions of the emif IP contain interrupt support; this might remain unused by the kernel driver though. Reviewed-by: Rob Herring Signed-off-by: Tero Kristo Signed-off-by: Santosh Shilimkar .../devicetree/bindings/memory-controllers/ti/emif.txt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 5a3a03905a433216f517babd0a343ae7265e9ca1 Author: Suman Anna Date: Mon Mar 5 16:18:49 2018 -0800 ARM: dts: keystone-k2e-clocks: Fix missing unit address separator Commit 95d8b41c765b ("ARM: dts: keystone-k2e-clocks: Add missing unit name to clock nodes that have regs") fixed the unit names on various clock nodes but missed out adding the unit address separator on the clkhyperlink0 clock node. Fix the same. Fixes: 95d8b41c765b ("ARM: dts: keystone-k2e-clocks: Add missing unit name to clock nodes that have regs") Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2e-clocks.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eadbe9fa2dc1da4a9a8fdbb3d4cdc1318a9bf94e Author: Andrew F. Davis Date: Mon Mar 5 16:18:48 2018 -0800 ARM: dts: keystone-k2g: Move usb-phy nodes out of soc0 The two usb-phy nodes are not memory-mapped devices on the SoC but rather dummy phys for SoCs with transparent autonomous NOP phys. Move these to outside soc0 to their own node like done elsewhere. Signed-off-by: Andrew F. Davis Acked-by: Nishanth Menon Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 4c4a3b8e2cdc778f42f28ce6fbdc3906e5695271 Author: Andrew F. Davis Date: Mon Mar 5 16:18:48 2018 -0800 ARM: dts: keystone-k2g: Move keystone_dsp_gpio to under device-state-control The keystone_irq node describes a device that is a member of the device state control module address space. As such, it should not be a member of soc0 bus but instead a sub-node of device-state-control. This move also fixes a warning about not having a reg property. Now that this is a sub-node of device-state-control, a syscon type node, we add this reg property but relative to the syscon base, this way when the dt-binding/driver are updated we can drop the non-standard gpio,syscon-dev property completely and simply use get_resource() in the driver. Signed-off-by: Andrew F. Davis Acked-by: Nishanth Menon Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 10c5bd2d8e0795cd95de565c434e51bf1b2cfe84 Author: Andrew F. Davis Date: Mon Mar 5 16:18:48 2018 -0800 ARM: dts: keystone-k2g: Move keystone_irq to under device-state-control The keystone_irq node describes a device that is a member of the device state control module address space. As such, it should not be a member of soc0 bus but instead a sub-node of device-state-control. This move also fixes a warning about not having a reg property. Now that this is a sub-node of device-state-control, a syscon type node, we add this reg property but relative to the syscon base, this way when the dt-binding/driver are updated we can drop the non-standard ti,syscon-dev property completely and simply use get_resource() in the driver. Signed-off-by: Andrew F. Davis Acked-by: Nishanth Menon Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 40ce21e293c4553b232fc0b549bb0962db3ce8d8 Author: Andrew F. Davis Date: Mon Mar 5 16:18:48 2018 -0800 ARM: dts: keystone-k2hk: Move keystone_dsp_gpio to under device-state-control The keystone_irq node describes a device that is a member of the device state control module address space. As such, it should not be a member of soc0 bus but instead a sub-node of device-state-control. This move also fixes warnings about not having a reg property. Now that this is a sub-node of device-state-control, a syscon type node, we add this reg property but relative to the syscon base, this way when the dt-binding/driver are updated we can drop the non-standard gpio,syscon-dev property completely and simply use get_resource() in the driver. Signed-off-by: Andrew F. Davis Acked-by: Nishanth Menon Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2hk.dtsi | 104 +++++++++++++++++++---------------- 1 file changed, 57 insertions(+), 47 deletions(-) commit 80570ce847b8dae1edd67e79de4403c77f488540 Author: Andrew F. Davis Date: Mon Mar 5 16:18:48 2018 -0800 ARM: dts: keystone-k2l: Move keystone_dsp_gpio to under device-state-control The keystone_irq node describes a device that is a member of the device state control module address space. As such, it should not be a member of soc0 bus but instead a sub-node of device-state-control. This move also fixes warnings about not having a reg property. Now that this is a sub-node of device-state-control, a syscon type node, we add this reg property but relative to the syscon base, this way when the dt-binding/driver are updated we can drop the non-standard gpio,syscon-dev property completely and simply use get_resource() in the driver. Signed-off-by: Andrew F. Davis Acked-by: Nishanth Menon Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2l.dtsi | 52 +++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 23 deletions(-) commit 056a3ccb8492ebf2d121660d182b4f86076bb739 Author: Andrew F. Davis Date: Mon Mar 5 16:18:48 2018 -0800 ARM: dts: keystone-k2e: Move keystone_dsp_gpio to under device-state-control The keystone_irq node describes a device that is a member of the device state control module address space. As such, it should not be a member of soc0 bus but instead a sub-node of device-state-control. This move also fixes a warning about not having a reg property. Now that this is a sub-node of device-state-control, a syscon type node, we add this reg property but relative to the syscon base, this way when the dt-binding/driver are updated we can drop the non-standard gpio,syscon-dev property completely and simply use get_resource() in the driver. Signed-off-by: Andrew F. Davis Acked-by: Nishanth Menon Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2e.dtsi | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 274abd4a65a7a721135a1c57750107ae2607a9d3 Author: Andrew F. Davis Date: Mon Mar 5 16:18:48 2018 -0800 ARM: dts: keystone: Move reset-controller to under device-state-control The keystone_irq node describes a device that is a member of the device state control module address space. As such, it should not be a member of soc0 bus but instead a sub-node of device-state-control. This move also fixes a warning about not having a reg property. Now that this is a sub-node of device-state-control, a syscon type node, we add this reg property but relative to the syscon base, this way when the dt-binding/driver are updated we can drop the non-standard ti,syscon-dev property completely and simply use get_resource() in the driver. Signed-off-by: Andrew F. Davis Acked-by: Nishanth Menon Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone.dtsi | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 4c30bb58f542254837bb4c2bcafca7b0b874e2b5 Author: Andrew F. Davis Date: Mon Mar 5 16:18:47 2018 -0800 ARM: dts: keystone: Move keystone_irq to under device-state-control The keystone_irq node describes a device that is a member of the device state control module address space. As such, it should not be a member of soc0 bus but instead a sub-node of device-state-control. This move also fixes a warning about not having a reg property. Now that this is a sub-node of device-state-control, a syscon type node, we add this reg property but relative to the syscon base, this way when the dt-binding/driver are updated we can drop the non-standard ti,syscon-dev property completely and simply use get_resource() in the driver. Signed-off-by: Andrew F. Davis Acked-by: Nishanth Menon Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone.dtsi | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit b814735f5ca477a6d4f446f00d16da4a18e33bf5 Author: Johannes Thumshirn Date: Fri Mar 2 13:20:49 2018 +0100 acpi, nfit: remove redundant __func__ in dev_dbg Dynamic debug can be instructed to add the function name to the debug output using the +f switch, so there is no need for the nfit module to do it again. If a user decides to add the +f switch for nfit's dynamic debug this results in double prints of the function name like the following: [ 2391.935383] acpi_nfit_ctl: nfit ACPI0012:00: acpi_nfit_ctl:nmem8 cmd: 10: func: 1 input length: 0 Thus remove the stray __func__ printing. Signed-off-by: Johannes Thumshirn Reviewed-by: Ross Zwisler Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 75 +++++++++++++++++++++++------------------------- drivers/acpi/nfit/mce.c | 5 ++-- 2 files changed, 38 insertions(+), 42 deletions(-) commit c715e4345581bdb475ae4fb378a243aee72579ba Author: Darren Hart (VMware) Date: Fri Mar 2 17:40:32 2018 -0800 platform/x86: Allow for SMBIOS backend defaults Avoid accidental configurations by setting default y for DELL_SMBIOS backends. Avoid this impacting the default build size, by making them dependent on DELL_SMBIOS, so they only appear when DELL_SMBIOS is manually selected, or by DELL_LAPTOP or DELL_WMI. While DELL_SMBIOS does have a prompt, it does not have any dependencies. Keeping DELL_SMBIOS visible, despite being "select"ed by DELL_LAPTOP and DELL_WMI, is a deliberate choice to provide context for the WMI and SMM backends, which would otherwise appear to float without context within the menu. Signed-off-by: Darren Hart (VMware) drivers/platform/x86/Kconfig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4bd13772eeb2b9989789e8dbc183026867168db4 Author: Christophe Leroy Date: Thu Feb 22 15:27:30 2018 +0100 powerpc/8xx: Increase number of slices to 64 On the 8xx, the minimum slice size is the size of the area covered by a single PMD entry, ie 4M in 4K pages mode and 64M in 16K pages mode. This patch increases the number of slices from 16 to 64 on the 8xx. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/nohash/32/slice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15472423ce47d6397d08d48daaae8590c9f9f242 Author: Christophe Leroy Date: Thu Feb 22 15:27:28 2018 +0100 powerpc/mm/slice: Allow up to 64 low slices While the implementation of the "slices" address space allows a significant amount of high slices, it limits the number of low slices to 16 due to the use of a single u64 low_slices_psize element in struct mm_context_t On the 8xx, the minimum slice size is the size of the area covered by a single PMD entry, ie 4M in 4K pages mode and 64M in 16K pages mode. This means we could have at least 64 slices. In order to override this limitation, this patch switches the handling of low_slices_psize to char array as done already for high_slices_psize. Signed-off-by: Christophe Leroy Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu.h | 3 +- arch/powerpc/include/asm/mmu-8xx.h | 7 +++- arch/powerpc/include/asm/paca.h | 2 +- arch/powerpc/kernel/paca.c | 3 +- arch/powerpc/mm/hash_utils_64.c | 13 ++++---- arch/powerpc/mm/slb_low.S | 8 +++-- arch/powerpc/mm/slice.c | 57 +++++++++++++++++--------------- 7 files changed, 52 insertions(+), 41 deletions(-) commit aa0ab02ba992eb956934b21373e0138211486ddd Author: Christophe Leroy Date: Thu Feb 22 15:27:26 2018 +0100 powerpc/mm/slice: Fix hugepage allocation at hint address on 8xx On the 8xx, the page size is set in the PMD entry and applies to all pages of the page table pointed by the said PMD entry. When an app has some regular pages allocated (e.g. see below) and tries to mmap() a huge page at a hint address covered by the same PMD entry, the kernel accepts the hint allthough the 8xx cannot handle different page sizes in the same PMD entry. 10000000-10001000 r-xp 00000000 00:0f 2597 /root/malloc 10010000-10011000 rwxp 00000000 00:0f 2597 /root/malloc mmap(0x10080000, 524288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x40000, -1, 0) = 0x10080000 This results the app remaining forever in do_page_fault()/hugetlb_fault() and when interrupting that app, we get the following warning: [162980.035629] WARNING: CPU: 0 PID: 2777 at arch/powerpc/mm/hugetlbpage.c:354 hugetlb_free_pgd_range+0xc8/0x1e4 [162980.035699] CPU: 0 PID: 2777 Comm: malloc Tainted: G W 4.14.6 #85 [162980.035744] task: c67e2c00 task.stack: c668e000 [162980.035783] NIP: c000fe18 LR: c00e1eec CTR: c00f90c0 [162980.035830] REGS: c668fc20 TRAP: 0700 Tainted: G W (4.14.6) [162980.035854] MSR: 00029032 CR: 24044224 XER: 20000000 [162980.036003] [162980.036003] GPR00: c00e1eec c668fcd0 c67e2c00 00000010 c6869410 10080000 00000000 77fb4000 [162980.036003] GPR08: ffff0001 0683c001 00000000 ffffff80 44028228 10018a34 00004008 418004fc [162980.036003] GPR16: c668e000 00040100 c668e000 c06c0000 c668fe78 c668e000 c6835ba0 c668fd48 [162980.036003] GPR24: 00000000 73ffffff 74000000 00000001 77fb4000 100fffff 10100000 10100000 [162980.036743] NIP [c000fe18] hugetlb_free_pgd_range+0xc8/0x1e4 [162980.036839] LR [c00e1eec] free_pgtables+0x12c/0x150 [162980.036861] Call Trace: [162980.036939] [c668fcd0] [c00f0774] unlink_anon_vmas+0x1c4/0x214 (unreliable) [162980.037040] [c668fd10] [c00e1eec] free_pgtables+0x12c/0x150 [162980.037118] [c668fd40] [c00eabac] exit_mmap+0xe8/0x1b4 [162980.037210] [c668fda0] [c0019710] mmput.part.9+0x20/0xd8 [162980.037301] [c668fdb0] [c001ecb0] do_exit+0x1f0/0x93c [162980.037386] [c668fe00] [c001f478] do_group_exit+0x40/0xcc [162980.037479] [c668fe10] [c002a76c] get_signal+0x47c/0x614 [162980.037570] [c668fe70] [c0007840] do_signal+0x54/0x244 [162980.037654] [c668ff30] [c0007ae8] do_notify_resume+0x34/0x88 [162980.037744] [c668ff40] [c000dae8] do_user_signal+0x74/0xc4 [162980.037781] Instruction dump: [162980.037821] 7fdff378 81370000 54a3463a 80890020 7d24182e 7c841a14 712a0004 4082ff94 [162980.038014] 2f890000 419e0010 712a0ff0 408200e0 <0fe00000> 54a9000a 7f984840 419d0094 [162980.038216] ---[ end trace c0ceeca8e7a5800a ]--- [162980.038754] BUG: non-zero nr_ptes on freeing mm: 1 [162985.363322] BUG: non-zero nr_ptes on freeing mm: -1 In order to fix this, this patch uses the address space "slices" implemented for BOOK3S/64 and enhanced to support PPC32 by the preceding patch. This patch modifies the context.id on the 8xx to be in the range [1:16] instead of [0:15] in order to identify context.id == 0 as not initialised contexts as done on BOOK3S This patch activates CONFIG_PPC_MM_SLICES when CONFIG_HUGETLB_PAGE is selected for the 8xx Alltough we could in theory have as many slices as PMD entries, the current slices implementation limits the number of low slices to 16. This limitation is not preventing us to fix the initial issue allthough it is suboptimal. It will be cured in a subsequent patch. Fixes: 4b91428699477 ("powerpc/8xx: Implement support of hugepages") Signed-off-by: Christophe Leroy Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu-8xx.h | 6 ++++++ arch/powerpc/kernel/setup-common.c | 2 ++ arch/powerpc/mm/8xx_mmu.c | 2 +- arch/powerpc/mm/hugetlbpage.c | 2 ++ arch/powerpc/mm/mmu_context_nohash.c | 18 ++++++++++++++++-- arch/powerpc/platforms/Kconfig.cputype | 1 + 6 files changed, 28 insertions(+), 3 deletions(-) commit db3a528db41caaa6dfd4c64e9f5efb1c81a80467 Author: Christophe Leroy Date: Thu Feb 22 15:27:24 2018 +0100 powerpc/mm/slice: Enhance for supporting PPC32 In preparation for the following patch which will fix an issue on the 8xx by re-using the 'slices', this patch enhances the 'slices' implementation to support 32 bits CPUs. On PPC32, the address space is limited to 4Gbytes, hence only the low slices will be used. The high slices use bitmaps. As bitmap functions are not prepared to handle bitmaps of size 0, this patch ensures that bitmap functions are called only when SLICE_NUM_HIGH is not nul. Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/nohash/32/slice.h | 18 +++++++++++++++ arch/powerpc/include/asm/slice.h | 4 +++- arch/powerpc/mm/slice.c | 37 +++++++++++++++++++++++------- 3 files changed, 50 insertions(+), 9 deletions(-) commit a3286f05bc5a5bc7fc73a9783ec89de78fcd07f8 Author: Christophe Leroy Date: Thu Feb 22 15:27:22 2018 +0100 powerpc/mm/slice: create header files dedicated to slices In preparation for the following patch which will enhance 'slices' for supporting PPC32 in order to fix an issue on hugepages on 8xx, this patch takes out of page*.h all bits related to 'slices' and put them into newly created slice.h header files. While common parts go into asm/slice.h, subarch specific parts go into respective books3s/64/slice.c and nohash/64/slice.c 'slices' Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/slice.h | 27 ++++++++++++++ arch/powerpc/include/asm/nohash/64/slice.h | 12 ++++++ arch/powerpc/include/asm/page.h | 1 + arch/powerpc/include/asm/page_64.h | 59 ------------------------------ arch/powerpc/include/asm/slice.h | 40 ++++++++++++++++++++ 5 files changed, 80 insertions(+), 59 deletions(-) commit 326691ad4f179e6edc7eb1271e618dd673e4736d Author: Christophe Leroy Date: Thu Feb 22 15:27:20 2018 +0100 powerpc/mm/slice: Remove intermediate bitmap copy bitmap_or() and bitmap_andnot() can work properly with dst identical to src1 or src2. There is no need of an intermediate result bitmap that is copied back to dst in a second step. Signed-off-by: Christophe Leroy Reviewed-by: Aneesh Kumar K.V Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 51d42f0f5fd6c74144d19bf6a663521e2ea99765 Author: Segher Boessenkool Date: Wed Feb 28 17:02:49 2018 -0800 powerpc: Keep const vars out of writable .sdata Newer gcc will support "-mno-readonly-in-sdata"[1], which makes sure that the optimization on PPC32 for variables getting moved into the .sdata section will not apply to const variables (which must be in .rodata). This was originally noticed in mm/rodata_test.c when rodata_test_data was not static: c0695034 g O .data 00000004 rodata_test_data After this patch with an updated compiler, this is correctly in .rodata. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82411 Reported-by: Christophe Leroy Signed-off-by: Segher Boessenkool Signed-off-by: Kees Cook Signed-off-by: Michael Ellerman arch/powerpc/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 010eacd968a73ddcb8592b14c1607e1004120ede Author: Geert Uytterhoeven Date: Fri Mar 2 14:59:54 2018 +0100 netfilter: xt_limit: Spelling s/maxmum/maximum/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_limit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3427b2ab63faccafe774ea997fc2da7faf690c5a Author: Cong Wang Date: Thu Mar 1 18:58:38 2018 -0800 netfilter: make xt_rateest hash table per net As suggested by Eric, we need to make the xt_rateest hash table and its lock per netns to reduce lock contentions. Cc: Florian Westphal Cc: Eric Dumazet Cc: Pablo Neira Ayuso Signed-off-by: Cong Wang Reviewed-by: Eric Dumazet Signed-off-by: Pablo Neira Ayuso include/net/netfilter/xt_rateest.h | 4 +- net/netfilter/xt_RATEEST.c | 91 +++++++++++++++++++++++++++----------- net/netfilter/xt_rateest.c | 10 ++--- 3 files changed, 72 insertions(+), 33 deletions(-) commit 0d7df906a0e78079a02108b06d32c3ef2238ad25 Author: Florian Westphal Date: Tue Feb 27 19:42:37 2018 +0100 netfilter: x_tables: ensure last rule in base chain matches underflow/policy Harmless from kernel point of view, but again iptables assumes that this is true when decoding ruleset coming from kernel. If a (syzkaller generated) ruleset doesn't have the underflow/policy stored as the last rule in the base chain, then iptables will abort() because it doesn't find the chain policy. libiptc assumes that the policy is the last rule in the basechain, which is only true for iptables-generated rulesets. Unfortunately this needs code duplication -- the functions need the struct layout of the rule head, but that is different for ip/ip6/arptables. NB: pr_warn could be pr_debug but in case this break rulesets somehow its useful to know why blob was rejected. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/arp_tables.c | 17 ++++++++++++++++- net/ipv4/netfilter/ip_tables.c | 17 ++++++++++++++++- net/ipv6/netfilter/ip6_tables.c | 17 ++++++++++++++++- 3 files changed, 48 insertions(+), 3 deletions(-) commit 89370860686a54fc0642c7ae68213cc1fc6d8e04 Author: Florian Westphal Date: Tue Feb 27 19:42:36 2018 +0100 netfilter: x_tables: make sure compat af mutex is held Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7d7d7e02111e9a4dc9d0658597f528f815d820fd Author: Florian Westphal Date: Tue Feb 27 19:42:35 2018 +0100 netfilter: compat: reject huge allocation requests no need to bother even trying to allocating huge compat offset arrays, such ruleset is rejected later on anyway becaus we refuse to allocate overly large rule blobs. However, compat translation happens before blob allocation, so we should add a check there too. This is supposed to help with fuzzing by avoiding oom-killer. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 9782a11efc072faaf91d4aa60e9d23553f918029 Author: Florian Westphal Date: Tue Feb 27 19:42:34 2018 +0100 netfilter: compat: prepare xt_compat_init_offsets to return errors should have no impact, function still always returns 0. This patch is only to ease review. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/x_tables.h | 2 +- net/bridge/netfilter/ebtables.c | 10 ++++++++-- net/ipv4/netfilter/arp_tables.c | 10 +++++++--- net/ipv4/netfilter/ip_tables.c | 8 ++++++-- net/ipv6/netfilter/ip6_tables.c | 10 +++++++--- net/netfilter/x_tables.c | 4 +++- 6 files changed, 32 insertions(+), 12 deletions(-) commit c84ca954ac9fa67a6ce27f91f01e4451c74fd8f6 Author: Florian Westphal Date: Tue Feb 27 19:42:33 2018 +0100 netfilter: x_tables: add counters allocation wrapper allows to have size checks in a single spot. This is supposed to reduce oom situations when fuzz-testing xtables. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/x_tables.h | 1 + net/ipv4/netfilter/arp_tables.c | 2 +- net/ipv4/netfilter/ip_tables.c | 2 +- net/ipv6/netfilter/ip6_tables.c | 2 +- net/netfilter/x_tables.c | 15 +++++++++++++++ 5 files changed, 19 insertions(+), 3 deletions(-) commit 9d5c12a7c08f67999772065afd50fb222072114e Author: Florian Westphal Date: Tue Feb 27 19:42:32 2018 +0100 netfilter: x_tables: limit allocation requests for blob rule heads This is a very conservative limit (134217728 rules), but good enough to not trigger frequent oom from syzkaller. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 3 +++ 1 file changed, 3 insertions(+) commit 19926968ea86a286aa6fbea16ee3f2e7442f10f0 Author: Florian Westphal Date: Tue Feb 27 19:42:31 2018 +0100 netfilter: x_tables: cap allocations at 512 mbyte Arbitrary limit, however, this still allows huge rulesets (> 1 million rules). This helps with automated fuzzer as it prevents oom-killer invocation. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e816a2ce49e49e3906f614009c919334a0c6ba6a Author: Florian Westphal Date: Tue Feb 27 19:42:30 2018 +0100 netfilter: x_tables: enforce unique and ascending entry points Harmless from kernel point of view, but iptables assumes that this is true when decoding a ruleset. iptables walks the dumped blob from kernel, and, for each entry that creates a new chain it prints out rule/chain information. Base chains (hook entry points) are thus only shown when they appear in the rule blob. One base chain that is referenced multiple times in hook blob is then only printed once. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit 1b293e30f759b03f246baae862bdf35e57b2c39e Author: Florian Westphal Date: Tue Feb 27 19:42:29 2018 +0100 netfilter: x_tables: move hook entry checks into core Allow followup patch to change on location instead of three. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/x_tables.h | 2 ++ net/ipv4/netfilter/arp_tables.c | 13 +++---------- net/ipv4/netfilter/ip_tables.c | 13 +++---------- net/ipv6/netfilter/ip6_tables.c | 13 +++---------- net/netfilter/x_tables.c | 29 +++++++++++++++++++++++++++++ 5 files changed, 40 insertions(+), 30 deletions(-) commit 472ebdcd15ebdb8ebe20474ef1ce09abcb241e7d Author: Florian Westphal Date: Tue Feb 27 19:42:28 2018 +0100 netfilter: x_tables: check error target size too Check that userspace ERROR target (custom user-defined chains) match expected format, and the chain name is null terminated. This is irrelevant for kernel, but iptables itself relies on sane input when it dumps rules from kernel. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 07a9da51b4b6aece8bc71e0b1b601fc4c3eb8b64 Author: Florian Westphal Date: Tue Feb 27 19:42:27 2018 +0100 netfilter: x_tables: check standard verdicts in core Userspace must provide a valid verdict to the standard target. The verdict can be either a jump (signed int > 0), or a return code. Allowed return codes are either RETURN (pop from stack), NF_ACCEPT, DROP and QUEUE (latter is allowed for legacy reasons). Jump offsets (verdict > 0) are checked in more detail later on when loop-detection is performed. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/arp_tables.c | 5 ----- net/ipv4/netfilter/ip_tables.c | 5 ----- net/ipv6/netfilter/ip6_tables.c | 5 ----- net/netfilter/x_tables.c | 49 ++++++++++++++++++++++++++++++++++++----- 4 files changed, 43 insertions(+), 21 deletions(-) commit f31e5f1a891f989f107e8caa6b49dd4df0e12265 Author: Xin Long Date: Fri Feb 16 18:04:56 2018 +0800 netfilter: unlock xt_table earlier in __do_replace Now it's doing cleanup_entry for oldinfo under the xt_table lock, but it's not really necessary. After the replacement job is done in xt_replace_table, oldinfo is not used elsewhere any more, and it can be freed without xt_table lock safely. The important thing is that rtnl_lock is called in some xt_target destroy, which means rtnl_lock, a big lock is used in xt_table lock, a smaller one. It usually could be the reason why a dead lock may happen. Besides, all xt_target/match checkentry is called out of xt_table lock. It's better also to move all cleanup_entry calling out of xt_table lock, just as do_replace_finish does for ebtables. Signed-off-by: Xin Long Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/arp_tables.c | 3 ++- net/ipv4/netfilter/ip_tables.c | 3 ++- net/ipv6/netfilter/ip6_tables.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit 2db3fec507bd822ed81c031221b97701238949dc Author: Gustavo A. R. Silva Date: Tue Feb 13 08:25:57 2018 -0600 netfilter: ipt_ah: return boolean instead of integer Return statements in functions returning bool should use true/false instead of 1/0. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/ipt_ah.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 433029ecc62788296cacca50ceb24db90c17a4a2 Author: Taehee Yoo Date: Sun Feb 11 23:28:18 2018 +0900 netfilter: nf_conntrack_broadcast: remove useless parameter parameter protoff in nf_conntrack_broadcast_help is not used anywhere. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_helper.h | 3 +-- net/netfilter/nf_conntrack_broadcast.c | 1 - net/netfilter/nf_conntrack_netbios_ns.c | 5 +++-- net/netfilter/nf_conntrack_snmp.c | 5 +++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit 580c7d9e4cc69802189b872ad2df0d704c649441 Author: Taehee Yoo Date: Sun Feb 11 22:57:29 2018 +0900 netfilter: xt_cluster: get rid of xt_cluster_ipv6_is_multicast If use the ipv6_addr_is_multicast instead of xt_cluster_ipv6_is_multicast, then we can reduce code size. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_cluster.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit cceae76ef3a1181242e4f7b559a7bfc904a9855c Author: Taehee Yoo Date: Sun Feb 11 19:17:20 2018 +0900 netfilter: nfnetlink_acct: remove useless parameter parameter skb in nfnl_acct_overquota is not used anywhere. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/nfnetlink_acct.h | 3 +-- net/netfilter/nfnetlink_acct.c | 3 +-- net/netfilter/xt_nfacct.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) commit b89dae1852869d6bb3e4a8e3c6bdaf86dc2ef9da Author: Frank Rowand Date: Mon Feb 26 14:01:23 2018 -0800 of: overlay: do not include path in full_name of added nodes Struct device_node full_name no longer includes the full path name when the devicetree is created from a flattened device tree (FDT). The overlay node creation code was not modified to reflect this change. Fix the node full_name generated by overlay code to contain only the basename. Unittests call an overlay internal function to create new nodes. Fix up these calls to provide basename only instead of the full path. Fixes: a7e4cfb0a7ca ("of/fdt: only store the device node basename in full_name") Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/dynamic.c | 21 ++++++++++----------- drivers/of/of_private.h | 3 ++- drivers/of/overlay.c | 18 +++++++++++++++--- drivers/of/unittest.c | 6 +++--- 4 files changed, 30 insertions(+), 18 deletions(-) commit a4f91f0de905dd6f91ab12dd8bfda10317fa43eb Author: Frank Rowand Date: Mon Feb 26 14:01:22 2018 -0800 of: unittest: clean up changeset test In preparation for fixing __of_node_dup(), clean up the unittest function that calls it. Devicetree nodes created from a flattened device tree have a name property. Follow this convention for nodes added by a changeset. For node added by changeset, remove incorrect initialization of child node pointer. Add an additional node pointer 'changeset' to more naturally reflect where in the tree the changeset is added. Make changeset add property error messages unique. Add whitespace to break apart logic blocks. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/unittest.c | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) commit ae0662f84b105776734cb089703a7bf834bac195 Author: kbuild test robot Date: Sat Jan 20 04:27:58 2018 +0800 netfilter: nf_tables: nf_tables_obj_lookup_byhandle() can be static Fixes: 3ecbfd65f50e ("netfilter: nf_tables: allocate handle and delete objects via handle") Signed-off-by: Fengguang Wu Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a97fc4e4524cda15e0176ee8853038f6b3920a9a Author: Alex Deucher Date: Thu Mar 1 11:05:31 2018 -0500 drm/amdgpu: fix KV harvesting Always set the graphics values to the max for the asic type. E.g., some 1 RB chips are actually 1 RB chips, others are actually harvested 2 RB chips. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99353 Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) commit dcd9f100071799416a5bc9d2bc4d66837810306b Author: Alex Deucher Date: Thu Mar 1 11:03:27 2018 -0500 drm/radeon: fix KV harvesting Always set the graphics values to the max for the asic type. E.g., some 1 RB chips are actually 1 RB chips, others are actually harvested 2 RB chips. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99353 Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/cik.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) commit 2107f580909f96abe82df0ca164006b3454e983b Author: Rex Zhu Date: Wed Jan 24 17:15:37 2018 +0800 drm/amd/pp: Implement update_dpm_settings on Polaris v2: lock dpm level when update pptable by SW method use SW method to update DPM settings by updating SRAM directly on Polaris. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 97 ++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit 40cee3b9e50fd725e4fb3338814762cbf5013fbc Author: Rex Zhu Date: Fri Feb 23 16:32:55 2018 +0800 drm/amd/pp: Add a helper to set field in u32 Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 2 ++ 2 files changed, 18 insertions(+) commit 31bc45de132a2af9861622eb36764bf375c68cb4 Author: Rex Zhu Date: Wed Jan 24 14:48:17 2018 +0800 drm/amd/pp: Add common interface in smu for update dpm setting it is used for adjust part of dpm settigs per workloads to change the natural dpm behavior for better perf or perf/watt. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 8 ++++++++ 3 files changed, 10 insertions(+) commit 15826fbfef16a20799fa7c990df758b455bf7b62 Author: Rex Zhu Date: Fri Mar 2 13:50:59 2018 +0800 drm/amd/pp: Add PCC feature support on Vega This features controls vega peak current protection to allow for a wider compatibility with power supplies. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 34 ++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h | 1 + drivers/gpu/drm/amd/powerplay/inc/vega10_ppsmc.h | 1 + 3 files changed, 36 insertions(+) commit cc1bb66fbc26c29d360fab4b8d66fb7f278a2564 Author: Rex Zhu Date: Fri Mar 2 10:52:25 2018 +0800 drm/amd/pp: Export new smu message for PCC feature on Vega10 used to set PccThrottleLevel and PccResidencyThreshold Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu9.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ada6770e956b7f7d298bfef56fed457ade5bad9e Author: Rex Zhu Date: Tue Feb 27 19:15:08 2018 +0800 drm/amd/pp: Remove cgs_query_system_info Get gpu info through adev directly in powerplay Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 59 ---------------------- drivers/gpu/drm/amd/include/cgs_common.h | 34 ------------- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 22 ++++---- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 54 ++++++-------------- .../amd/powerplay/hwmgr/smu7_clockpowergating.c | 17 ++----- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 57 ++++++--------------- .../gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 9 +--- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 18 ++----- .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 28 +++------- .../amd/powerplay/hwmgr/vega10_processpptables.c | 13 ++--- drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 14 ++--- .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 7 +-- .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 13 ++--- .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 13 ++--- 14 files changed, 72 insertions(+), 286 deletions(-) commit 6848d73e889bb29cfede51df8c1d0496c9787454 Author: Rex Zhu Date: Tue Feb 27 18:28:54 2018 +0800 drm/amd/pp: Remove the wrap functions for acpi in powerplay Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 212 -------------------------- drivers/gpu/drm/amd/include/cgs_common.h | 44 ------ drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/pp_acpi.c | 114 -------------- drivers/gpu/drm/amd/powerplay/inc/pp_acpi.h | 26 ---- 5 files changed, 1 insertion(+), 397 deletions(-) commit e1deba285156fb4023bb48f22068de5b60e34e15 Author: Rex Zhu Date: Tue Feb 27 18:27:54 2018 +0800 drm/amd/pp: Use amdgpu acpi helper functions in powerplay Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 4 +--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 +++---- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 1 - 3 files changed, 4 insertions(+), 8 deletions(-) commit 589941e1a2d65f5425c91a5859a5454df64b6982 Author: Rex Zhu Date: Tue Feb 27 18:20:53 2018 +0800 drm/amdgpu: Notify sbios device ready before send request it is required if a platform supports PCIe root complex core voltage reduction. After receiving this notification, SBIOS can apply default PCIe root complex power policy. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 +++ 1 file changed, 3 insertions(+) commit 65ad7cac3866f5fa80dcef3e5048a839046d6a46 Author: Rex Zhu Date: Tue Feb 27 14:09:40 2018 +0800 drm/amd/pp: Refine powerplay instance Include adev in powerplay instance. so can visit adev directly instand of through cgs interface. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 6 ++---- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 7 ++++--- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + drivers/gpu/drm/amd/powerplay/inc/pp_instance.h | 8 +++----- 4 files changed, 10 insertions(+), 12 deletions(-) commit a2c120ce6b686c753968b7b1293c7bb878440b7f Author: Rex Zhu Date: Mon Feb 26 19:58:49 2018 +0800 drm/amd/pp: Simplify the create of powerplay instance use adev as input parameter to create powerplay instance directly. delete cgs wrap layer for power play create. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 22 ----------------- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 4 +-- drivers/gpu/drm/amd/include/cgs_common.h | 7 ------ drivers/gpu/drm/amd/include/kgd_pp_interface.h | 8 ------ drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 30 ++++++++++++++--------- drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 2 +- 6 files changed, 20 insertions(+), 53 deletions(-) commit 2eeb3a839954616d6faa024da69d2990374995f0 Author: Rex Zhu Date: Mon Feb 26 19:47:54 2018 +0800 drm/amd/dc: Use forward declaration instand of include header file avoid build error: drivers/gpu/drm/amd/amdgpu/../powerplay/inc/smu9_driver_if.h:342:3: error: redeclaration of enumerator ‘WM_COUNT’ WM_COUNT, ^ In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:32:0, from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35, from drivers/gpu/drm/amd/amdgpu/../display/modules/inc/mod_freesync.h:57, from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:48, from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:55, from drivers/gpu/drm/amd/amdgpu/../powerplay/inc/amd_powerplay.h:33, from drivers/gpu/drm/amd/amdgpu/../powerplay/inc/smumgr.h:26, from drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vega10_smumgr.c:24: drivers/gpu/drm/amd/amdgpu/../display/dc/dm_pp_smu.h:43:2: note: previous definition of ‘WM_COUNT’ was here WM_COUNT, Reviewed-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dm_services_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b58f0c81e9ab40ebed723ac71c34d87769540ad2 Author: Shirish S Date: Wed Feb 28 12:14:58 2018 +0530 drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2) The below commit "drm/atomic: Try to preserve the crtc enabled state in drm_atomic_remove_fb, v2" introduces a slight behavioral change to rmfb. Instead of disabling a crtc when the primary plane is disabled, it now preserves it. This change leads to BUG hit while performing atomic commit on amd driver. As a fix this patch ensures that we disable the CRTC's with NULL FB by returning -EINVAL and hence triggering fall back to the old behavior and turning off the crtc in atomic_remove_fb(). V2: Added error check for plane_state and removed sanity check for crtc. Signed-off-by: Shirish S Signed-off-by: Pratik Vishwakarma Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 16a6620c32b0cffe7171181fa7cb57125235c107 Author: Rex Zhu Date: Fri Mar 2 18:41:41 2018 +0800 drm/amd/pp: Fix incorrect return value in smu7_check_clk_voltage_valid Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a44f8626603292c40bb88e11db0a50bb8c9a900a Author: Michel Dänzer Date: Fri Feb 23 12:29:04 2018 +0100 drm/amdgpu/dce6: Use DRM_DEBUG instead of DRM_INFO for HPD IRQ info For consistency with other DCE generations. HPD IRQs appear to be working fine. Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81988f9c3d9907d7df0ea97e8e4842064b88b7b8 Author: Christian König Date: Thu Mar 1 11:09:15 2018 +0100 drm/amdgpu: use separate status for buffer funcs availability v2 The ring status can change during GPU reset, but we still need to be able to schedule TTM buffer moves in the meantime. Otherwise we can ran into problems because of aborted move/fill operations during GPU resets. v2: still check if ring is available during direct submit. Signed-off-by: Christian König Acked-by: Chunming zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 21 +++++++++++---------- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 1 + 2 files changed, 12 insertions(+), 10 deletions(-) commit 380383f23594790be97639ea220e8d3e86afff85 Author: Christian König Date: Thu Mar 1 11:03:27 2018 +0100 drm/amdgpu: ignore changes of buffer function status because of GPU resets When we reset the GPU we also disable/enable the SDMA, but we don't want to change TTM idea of the VRAM size in the middle of that. Signed-off-by: Christian König Acked-by: Chunming zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bf59902b50012b1dddeeaa23b217d9c4956cdda Author: Shawn Lin Date: Mon Mar 5 11:25:58 2018 +0800 clk: rockchip: Prevent calculating mmc phase if clock rate is zero The MMC sample and drv clock for rockchip platforms are derived from the bus clock output to the MMC/SDIO card. So it should never happens that the clk rate is zero given it should inherits the clock rate from its parent. If something goes wrong and makes the clock rate to be zero, the calculation would be wrong but may still make the mmc tuning process work luckily. However it makes people harder to debug when the following data transfer is unstable. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-mmc-phase.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 57adc4cef617d7284ac7676e14533268e73e3699 Author: Christian König Date: Thu Mar 1 11:01:52 2018 +0100 drm/amdgpu: change amdgpu_ttm_set_active_vram_size Instead of setting the active VRAM size directly provide a the info if we can use the buffer functions or not. Signed-off-by: Christian König Acked-by: Chunming zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 23 +++++++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 3 ++- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/si_dma.c | 4 ++-- 7 files changed, 29 insertions(+), 17 deletions(-) commit c396ef9bf3172fd57e86df4529b11d563f9ff801 Author: Christian König Date: Thu Mar 1 10:41:46 2018 +0100 drm/amdgpu: move some functions into amdgpu_ttm.h Those belong to the TTM handling. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) commit ea74e15fb547483f9f86088443f2d3c9f518de8b Author: Harry Wentland Date: Tue Feb 20 13:36:23 2018 -0500 drm/amd/display: Default HDMI6G support to true. Log VBIOS table error. There have been many reports of Ellesmere and Baffin systems not being able to drive HDMI 4k60 due to the fact that we check the HDMI_6GB_EN bit from VBIOS table. Windows seems to not have this issue. On some systems we fail to the encoder cap info from VBIOS. In that case we should default to enabling HDMI6G support. This was tested by dwagner on https://bugs.freedesktop.org/show_bug.cgi?id=102820 Signed-off-by: Harry Wentland Reviewed-by: Roman Li Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit a05bcff10426841351010e8648e4d9d95e9b65a1 Author: Shirish S Date: Tue Feb 13 14:15:17 2018 +0530 drm/amd/display: update plane params before validation This patch updates the dc's plane state with the parameters set by the user side. This is needed to validate the plane capabilities with the parameters user space wants to set. Signed-off-by: Shirish S Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+) commit c827206f7f78a33eff9496201c4122c246c87db3 Author: Harry Wentland Date: Tue Feb 13 11:07:43 2018 -0500 drm/amd/display: Don't blow up if TG is NULL in dce110_vblank_set Signed-off-by: Harry Wentland Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 080589737c13a079bb0355377815b0c0c1cdf779 Author: Shirish S Date: Tue Feb 13 14:11:37 2018 +0530 drm/amd/display: validate plane in dce110 for scaling CZ & ST support uptil a limit 2:1 downscaling, this patch adds validate_plane hook, that shall be used to validate the plane attributes sent by the user space based on dce110 capabilities. Signed-off-by: Shirish S Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c21b68c5ebd9b0267d59c7a899ee4c6a7e0668fc Author: Shirish S Date: Fri Feb 16 11:44:22 2018 +0530 drm/amd/display: defer modeset check in dm_update_planes_state amdgpu_dm_atomic_check() is used to validate the entire configuration of planes and crtc's that the user space wants to commit. However amdgpu_dm_atomic_check() depends upon DRM_MODE_ATOMIC_ALLOW_MODESET flag else its mostly dummy. Its not mandatory for the user space to set DRM_MODE_ATOMIC_ALLOW_MODESET, and in general its not set either along with DRM_MODE_ATOMIC_TEST_ONLY. Considering its importantance, this patch defers the allow_modeset check in dm_update_planes_state(), so that there shall be scope to validate the configuration sent from user space, without impacting the population of dc/dm related data structures. Signed-off-by: Shirish S Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 33f2d94ecd0ebb9c9c651691b4535332aac40edf Author: Harry Wentland Date: Tue Feb 13 11:07:07 2018 -0500 drm/amd/display: Clean up formatting in irq_service_dce110.c Signed-off-by: Harry Wentland Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/irq/dce110/irq_service_dce110.c | 62 +++++++++------------- 1 file changed, 26 insertions(+), 36 deletions(-) commit a0e30392dd03727c069d1cf93ee6582473dd3dd6 Author: Harry Wentland Date: Tue Feb 13 11:03:01 2018 -0500 drm/amd/display: Return success when enabling interrupt Signed-off-by: Harry Wentland Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- drivers/gpu/drm/amd/display/dc/core/dc.c | 6 +++--- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) commit 589d2739332db0b8e17e0fc827525311c211a410 Author: Harry Wentland Date: Tue Feb 13 10:54:26 2018 -0500 drm/amd/display: Use crtc enable/disable_vblank hooks Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 5dd0bb34edc160cf725f8e00e3bc3c8be883842e Author: Tony Cheng Date: Wed Feb 21 16:40:50 2018 -0500 drm/amd/display: dal 3.1.37 Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc3ca53332de2b347c45262fcfb162fc186fa247 Author: Harry Wentland Date: Fri Feb 9 16:52:15 2018 -0500 drm/amd/display: Remove duplicate dm_pp_power_level enum This is really just a copy of dm_pp_clocks_state, so just use that one. Thanks to Matthias Kaehlke for spotting this. Signed-off-by: Harry Wentland Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dm_services_types.h | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) commit f215a57dca691c0ba1c96a8905c46c1168b66ad3 Author: Eric Yang Date: Wed Feb 21 16:37:16 2018 -0500 drm/amd/display: update infoframe after dig fe is turned on Before dig fe is enabled, infoframe can't be programmed. So in suspend resume case our infoframe programmming was not going through. This change changes the sequence so that infoframe is programmed after. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/dce110/dce110_hw_sequencer.c | 23 ++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 28d4175413efe4ec4e6db1a197ab66d4b89c0a93 Author: Dmytro Laktyushkin Date: Wed Feb 21 15:10:02 2018 -0500 drm/amd/display: fix dcn1 dppclk when min dispclk patch applies Applying min dispclk patch would result in incorrect dppclk divider without this change Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1296423bf23c7a58133970e223b1f47ec6570308 Author: Bhawanpreet Lakha Date: Tue Feb 20 17:42:50 2018 -0500 drm/amd/display: define DC_LOGGER for logger Created a DC_LOGGER define. This is used to pass the logger into the macros. Anywhere we need to use the logger we need to define DC_LOGGER Signed-off-by: Bhawanpreet Lakha Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 6 +- .../gpu/drm/amd/display/dc/bios/command_table2.c | 11 ++-- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 11 ++-- drivers/gpu/drm/amd/display/dc/core/dc.c | 11 ++-- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 53 +++++++---------- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 53 ++++++----------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 7 ++- drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 5 +- drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 17 +++--- .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 32 +++++----- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 8 +-- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 22 +++---- .../drm/amd/display/dc/dce/dce_stream_encoder.c | 7 +-- drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 11 ++-- .../drm/amd/display/dc/dce110/dce110_compressor.c | 14 ++--- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 20 ++++--- .../drm/amd/display/dc/dce110/dce110_resource.c | 6 +- .../display/dc/dce110/dce110_timing_generator_v.c | 17 +++--- .../drm/amd/display/dc/dce110/dce110_transform_v.c | 5 +- .../drm/amd/display/dc/dce112/dce112_compressor.c | 11 +--- .../drm/amd/display/dc/dce112/dce112_resource.c | 5 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 68 ++++++++-------------- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 21 ++++--- drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c | 6 +- .../dc/i2caux/dce110/i2c_hw_engine_dce110.c | 6 +- .../amd/display/dc/irq/dce110/irq_service_dce110.c | 11 ++-- drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 10 ++-- drivers/gpu/drm/amd/display/include/logger_types.h | 64 ++++++++++---------- 28 files changed, 230 insertions(+), 288 deletions(-) commit 2f3fd67a8af25f5b4d549c3e9cc515dbf1839ffc Author: Bhawanpreet Lakha Date: Fri Feb 16 13:57:42 2018 -0500 drm/amd/display: Use MACROS instead of dm_logger Created MACROS for all log levels. Also Replaced usage of dm_logger_write to the defined MACROS Signed-off-by: Bhawanpreet Lakha Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 2 +- .../gpu/drm/amd/display/dc/bios/command_table2.c | 6 +-- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 6 +-- drivers/gpu/drm/amd/display/dc/core/dc.c | 8 ++-- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 32 ++++++++-------- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 34 ++++++++--------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 10 ++--- .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 24 ++++++------ drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 4 +- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 10 ++--- .../drm/amd/display/dc/dce/dce_stream_encoder.c | 6 +-- drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 6 +-- .../drm/amd/display/dc/dce110/dce110_compressor.c | 12 +++--- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 16 ++++---- .../drm/amd/display/dc/dce110/dce110_resource.c | 6 +-- .../display/dc/dce110/dce110_timing_generator_v.c | 10 ++--- .../drm/amd/display/dc/dce110/dce110_transform_v.c | 2 +- .../drm/amd/display/dc/dce112/dce112_compressor.c | 32 ++++++++-------- .../drm/amd/display/dc/dce112/dce112_resource.c | 6 +-- .../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 44 +++++++++++----------- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 28 +++++++------- drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c | 4 +- .../dc/i2caux/dce110/i2c_hw_engine_dce110.c | 4 +- .../amd/display/dc/irq/dce110/irq_service_dce110.c | 8 ++-- drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 8 ++-- drivers/gpu/drm/amd/display/include/logger_types.h | 33 ++++++++++++++++ 28 files changed, 199 insertions(+), 166 deletions(-) commit 44c6f2e59ee815711a966a82b7d19dbab2110f4a Author: Vitaly Prosyak Date: Tue Feb 13 13:18:43 2018 -0600 drm/amd/display: Handle HDR use cases. Implementation of de-gamma, blnd-gamma, shaper and 3d lut's. Removed memory allocations in transfer functions. Refactor color module. Signed-off-by: Vitaly Prosyak Reviewed-by: Krunoslav Kovac Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c | 153 +++++++++++++++++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.h | 5 + drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 2 + .../drm/amd/display/modules/color/color_gamma.c | 143 +++++++++---------- 4 files changed, 227 insertions(+), 76 deletions(-) commit aef5f5237beded4cbe197aedfc03fceed7f9b7da Author: Eric Bernstein Date: Fri Feb 16 17:46:54 2018 -0500 drm/amd/display: Fix DAL surface change test Signed-off-by: Eric Bernstein Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1d8ba6e0a1c34811afe7f881207062227d81872 Author: Tony Cheng Date: Sat Feb 17 01:34:42 2018 -0500 drm/amd/display: dal 3.1.36 Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15cf3974eb06e7b6be1f8f02581759b5f3d9f1e4 Author: Dmytro Laktyushkin Date: Tue Feb 13 14:41:51 2018 -0500 drm/amd/display: add diags clock programming Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 5 +++++ drivers/gpu/drm/amd/display/dc/dc.h | 11 +++++++++++ drivers/gpu/drm/amd/display/dc/dm_helpers.h | 3 +++ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 15 ++------------- 4 files changed, 21 insertions(+), 13 deletions(-) commit f553e6810259d8bd31a4b9ac3001cfcde7f8fb7e Author: Dmytro Laktyushkin Date: Mon Feb 12 15:19:20 2018 -0500 drm/amd/display: add per pipe dppclk v2: Fix commit title Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 13 +++++++------ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 6 ++---- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 9 +++++---- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 15 +++++++++++++-- 5 files changed, 28 insertions(+), 17 deletions(-) commit 8ff15a8fcc5862c1edfc0d149aaafaf35fa3569f Author: Dmytro Laktyushkin Date: Wed Jan 17 17:40:16 2018 -0500 drm/amd/display: Update DCN OPTC registers Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 +++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) commit 0e5916ffb8b1f0158651f5867c150ceea3d06991 Author: Shirish S Date: Tue Feb 20 14:34:16 2018 +0530 drm/amd/display: allocate fbc buffer in AMDGPU_GEM_DOMAIN_GTT Currently the FBC buffer is allocated in VRAM, since VRAM usage is dedicatedly for scanouts, by allocating FBC back buffer in GTT shall help in conserving VRAM for other purposes. Signed-off-by: Shirish S Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8acad1a18a78b5ec09b8a02eb26e6ded1404e8b0 Author: Leo (Sunpeng) Li Date: Tue Feb 20 13:30:47 2018 -0500 drm/amd/display: Add regamma lut write mask to SOC base Mask and shift values for DCP0_REGAMMA_LUT_WRITE_EN_MASK were missing from XFM_COMMON_MASK_SH_LIST_SOC_BASE. Add it. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 1 + 1 file changed, 1 insertion(+) commit 94405cf63884e364ec560d99af47084cb1b47b5f Author: Wenjing Liu Date: Fri Feb 16 14:04:16 2018 -0500 drm/amd/display: Update Link Training Fallback logic [Description] When CR fails to minimum link rate, we should reduce lane count to the number lowest cr_done lanes. [Code Review] Jun Lei Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 98 ++++++++++++++++------ drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 1 + .../drm/amd/display/include/link_service_types.h | 5 +- 3 files changed, 79 insertions(+), 25 deletions(-) commit 85075fa04287dce81397dab75af0992274727b82 Author: Xingyue Tao Date: Fri Feb 16 16:29:13 2018 -0500 drm/amd/display: add psr_version to stream Brightness could not be changed for some panels whose DPCD_version is below 1.2 Now psr_version is added into stream, and it copies from the displayTarget's psr_version. It checks if the stream's psr_versio is non-zero and sets the vsc info packet revision now. Signed-off-by: Xingyue Tao Reviewed-by: Tony Cheng Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dc_stream.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit f03628232fe93ce7af18079ce69c2dfd4c95d70f Author: Yongqiang Sun Date: Wed Feb 14 17:12:39 2018 -0500 drm/amd/display: Clear dmps off for eDP when resume. This patch fixed secondary screen only S4 resume, eDP is unintentionally light up due to incorrect dpms off flag. When entering S4, dpms off flags are set to true via set power state. During resume, eDP is light up by vbios, so the flags should be changed to false to match the real state. By change the flag properly, eDP is able to be turned off properly as per OS request. This change may affect S3/S4 Shut down resume IOIC, need to verify those cases. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++++ drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) commit ea7ea2a8cac1ae7224022b55dcafd51321474ad7 Author: Eric Yang Date: Thu Feb 15 15:55:31 2018 -0500 drm/amd/display: fix missing az disable in reset backend Optimization in reset backend skips disable stream if it is already done in dc_stream_set_dpms. However that path does not disable az in order to prevent audio from toggling between internal and external displays. This still need to be done. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e9df99303a7badd1b2a98e8887be9a1b5e955e35 Author: Tony Cheng Date: Fri Feb 2 01:17:34 2018 -0500 drm/amd/display: dal 3.1.35 Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf1df90f35ac8f8625ef3df1baf8c57fb5582e72 Author: Hersen Wu Date: Tue Feb 13 16:23:12 2018 -0500 drm/amd/display: Check DCN PState ASSERT failure [Description] ASIC change debug register definition Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 9 ++++++--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) commit 3d53f424796b05b4dfd287d034357f0e19e36c9e Author: Yue Hin Lau Date: Mon Feb 12 17:43:19 2018 -0500 drm/amd/display: update cur_clock correctly within set bandwidth Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 086247a4b2fba49800b27807f22bb894cd8363fb Author: Leo (Sunpeng) Li Date: Mon Feb 12 13:20:56 2018 -0500 drm/amd/display: Use 4096 lut entries Points in the DRM LUT are spaced linearly. Points in hardware are spaced exponentially, with greater density towards 0. To maintain low-end accuracy in hardware when sampling the DRM LUT, more points are needed. However, X doesn't seem to play with legacy LUTs of such size. Therefore, check for legacy lut when updating DC states, and update accordingly. v2: Use a macro for the maximum drm LUT value. v3: Update commit to reflect that this does not map 1-1 to HW Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 4 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 77 ++++++++++++++++------ 3 files changed, 61 insertions(+), 22 deletions(-) commit 11fffe45b76d2849a684f2d769bc76901ba0d301 Author: John Barberiz Date: Fri Feb 9 17:48:18 2018 -0500 drm/amd/display: Add passive dongle support for HPD Rearch Add HPD delay timer support to 1. Single/dual link DVI. 2. DP to HDMI passive dongle 3. DP to DVI passive dongle. Signed-off-by: John Barberiz Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 7 +++++-- drivers/gpu/drm/amd/display/dc/dc_link.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) commit 88ac3ddab12e2b04dca2958e0bc8b90c703e0397 Author: Roman Li Date: Fri Feb 9 16:57:38 2018 -0500 drm/amd/display: Fix active dongle hotplug Clean fake sink flag after detecting link on downstream port. Fixing display light-up after "hot-unplug&plug again" downstream of an active dongle. Signed-off-by: Roman Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ 1 file changed, 4 insertions(+) commit fd92ac1b4658bd1c9650f720e1094fa29fbfd995 Author: Hersen Wu Date: Fri Feb 9 16:35:14 2018 -0500 drm/amd/display: move MST branch initialize to before link training some MST capable scaler doesn't like recieving CLEAR_PAYLOAD_ID_TABLE after link training. move branch initialize to before link training Signed-off-by: Hersen Wu Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 9 +++++++++ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +++ drivers/gpu/drm/amd/display/dc/dm_helpers.h | 7 +++++++ 3 files changed, 19 insertions(+) commit 46589e9c753b7c905e8671a89cbb9728f3b99855 Author: Mark Brown Date: Mon Mar 5 20:26:51 2018 +0000 regmap: debugfs: Don't leak dummy names When allocating dummy names we need to store a pointer to the string we allocate so that we don't leak it on free. Signed-off-by: Mark Brown drivers/base/regmap/regmap-debugfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 62474660fb2d92bb3f419769912517cccac2cf96 Author: Daniel Scheller Date: Wed Dec 20 11:29:48 2017 -0500 media: dvb-frontend/mxl5xx: add support for physical layer scrambling The MaxLinear MxL5xx has support for physical layer scrambling, which was recently added to the DVB core via the new scrambling_sequence_index property. Add required bits to the mxl5xx driver. Picked up from dddvb master, commit 5c032058b9ba ("add support for PLS") by Ralph Metzler , adapted to the different naming of the pls property (pls vs. scrambling_sequence_index). Cc: Ralph Metzler Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/mxl5xx.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit fdfb69a72522e97f9105a6d39a5be0a465951ed8 Author: Rob Herring Date: Thu Mar 1 10:12:07 2018 -0600 arm64/efi: Make strrchr() available to the EFI namespace libfdt gained a new dependency on strrchr, so make it available to the EFI namespace before we update libfdt. Thanks to Ard for providing this fix. Cc: Catalin Marinas Acked-by: Ard Biesheuvel Acked-by: Will Deacon Signed-off-by: Rob Herring arch/arm64/kernel/image.h | 1 + arch/arm64/lib/strrchr.S | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit b46c78661c42cb8b07eb213104c79cbab8ea7e0d Merge: c11e6f0 e547c00 Author: Rob Herring Date: Mon Mar 5 13:29:46 2018 -0600 Merge tag 'overlay_apply_fdt_v7-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/frowand/linux into dt/next DT overlay applying rework from Frank Rowand: "Move duplicating and unflattening of an overlay flattened devicetree (FDT) into the overlay application code. To accomplish this, of_overlay_apply() is replaced by of_overlay_fdt_apply()." commit a430ab205d29e7d1537b220fcf989b8080d8267f Author: Fabio Estevam Date: Mon Mar 5 15:52:09 2018 -0300 regmap: debugfs: Disambiguate dummy debugfs file name Since commit 9b947a13e7f6 ("regmap: use debugfs even when no device") allows the usage of regmap debugfs even when there is no device associated, which causes several warnings like this: (NULL device *): Failed to create debugfs directory This happens when the debugfs file name is 'dummy'. The first dummy debugfs creation works fine, but subsequent creations fail as they have all the same name. Disambiguate the 'dummy' debugfs file name by adding a suffix entry, so that the names become dummy0, dummy1, dummy2, etc. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown drivers/base/regmap/regmap-debugfs.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 81af63a4af82e739aaa391d1fbb97e02c58ea6a1 Author: Ville Syrjälä Date: Tue Jan 23 19:08:57 2018 +0200 drm: Don't pass clip to drm_atomic_helper_check_plane_state() Move the plane clip rectangle handling into drm_atomic_helper_check_plane_state(). Drivers no longer have to worry about such mundane details. v2: Convert armada, rcar, and sun4i as well v3: Resolve simple_kms_helper conflict Cc: Liviu Dudau Cc: Brian Starkey Cc: Mali DP Maintainers Cc: Daniel Vetter Cc: Gustavo Padovan Cc: Sean Paul Cc: Philipp Zabel Cc: CK Hu Cc: Neil Armstrong Cc: Rob Clark Cc: Ben Skeggs Cc: Laurent Pinchart Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Maxime Ripard Cc: Thierry Reding Cc: VMware Graphics Cc: Sinclair Yeh Cc: Thomas Hellstrom Cc: Shawn Guo Cc: Archit Taneja Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Cc: linux-renesas-soc@vger.kernel.org Cc: linux-tegra@vger.kernel.org Cc: Russell King Suggested-by: Daniel Vetter Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter Reviewed-by: Thierry Reding Reviewed-by: Archit Taneja #msm Link: https://patchwork.freedesktop.org/patch/msgid/20180123170857.13818-5-ville.syrjala@linux.intel.com Acked-by: Liviu Dudau #hdlcd,malidp Acked-by: Philipp Zabel #imx,mtk Reviewed-by: Laurent Pinchart Reviewed-by: Sinclair Yeh #vmwgfx Acked-by: Neil Armstrong #meson Acked-by: Shawn Guo #zte drivers/gpu/drm/arm/hdlcd_crtc.c | 7 +------ drivers/gpu/drm/arm/malidp_planes.c | 7 +------ drivers/gpu/drm/armada/armada_crtc.c | 8 ++------ drivers/gpu/drm/armada/armada_overlay.c | 8 ++------ drivers/gpu/drm/drm_atomic_helper.c | 12 +++++++----- drivers/gpu/drm/drm_plane_helper.c | 11 +++-------- drivers/gpu/drm/drm_simple_kms_helper.c | 4 ---- drivers/gpu/drm/i915/intel_display.c | 12 ------------ drivers/gpu/drm/imx/ipuv3-plane.c | 7 +------ drivers/gpu/drm/mediatek/mtk_drm_plane.c | 7 +------ drivers/gpu/drm/meson/meson_plane.c | 7 +------ drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 14 ++------------ drivers/gpu/drm/nouveau/nv50_display.c | 12 ------------ drivers/gpu/drm/rcar-du/rcar_du_plane.c | 7 +------ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 7 +------ drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 7 +------ drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 7 +------ drivers/gpu/drm/tegra/plane.c | 7 +------ drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 7 +------ drivers/gpu/drm/zte/zx_plane.c | 13 +------------ include/drm/drm_atomic_helper.h | 1 - include/drm/drm_plane_helper.h | 1 - 22 files changed, 28 insertions(+), 145 deletions(-) commit b1271993aa3855bda5073c6061a095fd6e6febc6 Author: Jeffy Chen Date: Mon Mar 5 17:17:22 2018 +0800 soc: rockchip: power-domain: Add a sanity check on pd->num_clks The of_count_phandle_with_args() can fail and return error(for example, rk3399 pd_vio doesn't have clocks). That would break the pd probe. Add a sanity check on pd->num_clks to avoid that. Fixes: 65084121d59d ("soc: rockchip: power-domain: use clk_bulk APIs") Reported-by: Shawn Lin Signed-off-by: Jeffy Chen Tested-by: Shawn Lin Signed-off-by: Heiko Stuebner drivers/soc/rockchip/pm_domains.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit d909072d0521a84e67fbe5cce602d7befffabf7e Author: Jeffy Chen Date: Wed Feb 28 20:41:43 2018 +0800 soc: rockchip: power-domain: use clk_bulk APIs Use clk_bulk APIs, and also add error handling for clk enable. Signed-off-by: Jeffy Chen Signed-off-by: Heiko Stuebner drivers/soc/rockchip/pm_domains.c | 90 ++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 48 deletions(-) commit 6e61c891a0bbe3cede4157b4ecdfbd1617098b5a Author: Xiao Yao Date: Thu Jan 18 17:56:45 2018 +0800 soc: rockchip: disable jtag switching for RK3128 SoCs Disable IO function switching between sdmmc and jtag for RK3128 SoCs. Signed-off-by: Xiao Yao Reviewed-by: Shawn Lin Signed-off-by: Heiko Stuebner drivers/soc/rockchip/grf.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit bf817d0cf719d07d642837de00160ad03ec5fe9a Author: Ville Syrjälä Date: Tue Jan 23 19:08:56 2018 +0200 drm/armada: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. Since armada isn't atomic we'll use crtc->enabled and crtc->mode instead of the stuff under crtc_state. Once everyone agrees on how the clip rectangle gets set up we can move the code into drm_atomic_helper_check_plane_state(). Cc: Dave Airlie Cc: Russell King Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180123170857.13818-4-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Acked-by: Dave Airlie drivers/gpu/drm/armada/armada_crtc.c | 9 +++++---- drivers/gpu/drm/armada/armada_overlay.c | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) commit 57270b8191a9d3d15d8c77287733ba1ce5213937 Author: Ville Syrjälä Date: Tue Jan 23 19:08:55 2018 +0200 drm/armada: Construct a temporary crtc state for plane checks As armada isn't an atomic driver trying to pass a non-populated crtc->state to drm_atomic_helper_check_plane_state() will end in tears. Construct a temporary crtc state a la drm_plane_helper_check_update() and pass that instead. For now we just really need crtc_state->enable to be there. Cc: Dave Airlie Cc: Russell King Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180123170857.13818-3-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Acked-by: Dave Airlie drivers/gpu/drm/armada/armada_crtc.c | 6 +++++- drivers/gpu/drm/armada/armada_overlay.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) commit 3126bf79586aa0fcd27422af3bba2d0539ee9e18 Author: Matthias Kaehlcke Date: Wed Feb 28 14:17:03 2018 -0800 drm/radeon/mkregtable: Delete unused list functions and macros The util mkregtable includes a copy of the kernel API for linked lists, only a small subset of it is used. Delete the unused functions and macros. Reviewed-by: Guenter Roeck Signed-off-by: Matthias Kaehlcke Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/mkregtable.c | 433 ------------------------------------ 1 file changed, 433 deletions(-) commit 0bf6718537cf1112cbe2d7c4349188d7e89be90c Author: Alex Deucher Date: Mon Feb 26 11:05:10 2018 -0500 drm/amdgpu: used cached pcie gen info for SI (v2) Rather than querying it every time we need it. Also fixes a crash in VM pass through if there is no root bridge because the cached value fetch already checks this properly. v2: fix includes Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=105244 Acked-by: Christian König Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/si.c | 22 ++++++++-------- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 50 ++++++++++--------------------------- 2 files changed, 23 insertions(+), 49 deletions(-) commit d8eb9de42320a0d02bd12118a8ac51d14bcaf5e1 Author: Stefan Wahren Date: Sat Feb 24 13:38:14 2018 +0100 drm/vc4: Replace long HDMI udelay with usleep_range Since we aren't in atomic context replace this long udelay with a usleep_range. Signed-off-by: Stefan Wahren Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1519475894-11701-1-git-send-email-stefan.wahren@i2se.com drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 423ad7b3cbd1158d080e20119a7a5f93a085a486 Author: Daniel Stone Date: Tue Aug 8 17:44:48 2017 +0100 drm/vc4: Advertise supported modifiers for planes The IN_FORMATS blob allows the kernel to advertise to userspace which format/modifier combinations are supported, per plane. Use this to advertise that we support both T_TILED and linear. v2: - Only advertise T_TILED for RGB (Eric) - Actually turn on allow_fb_modifiers (Eric) Signed-off-by: Daniel Stone Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/170828/ drivers/gpu/drm/vc4/vc4_kms.c | 1 + drivers/gpu/drm/vc4/vc4_plane.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) commit 6f4870753f29edf7dc39444246f9e39987b8b158 Author: Marek Szyprowski Date: Fri Mar 2 17:07:42 2018 +0100 ARM: dts: exynos: Fix IOMMU support for GScaler devices on Exynos5250 The proper name for the property, which assign given device to IOMMU is 'iommus', not 'iommu'. Fix incorrect name and let all GScaler devices to be properly handled when IOMMU support is enabled. Reported-by: Andrzej Hajda Signed-off-by: Marek Szyprowski Fixes: 6cbfdd73a94f ("ARM: dts: add sysmmu nodes for exynos5250") Cc: # v4.8+ Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5250.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 146bc69b488564b502ed21873f3b7082827ee5f4 Author: Krzysztof Kozlowski Date: Thu Mar 1 21:34:59 2018 +0100 ARM: dts: exynos: Remove unused bypass-smu property from Xyref5260 The bypass-smu property is neither used nor documented in bindings. Remove it from Xyref5260 board DTS. Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5260-xyref5260.dts | 1 - 1 file changed, 1 deletion(-) commit ef3f6c256f0b4711a3ef1489797b95820be5ab01 Merge: 8eb1a85 576193f Author: David S. Miller Date: Mon Mar 5 12:55:55 2018 -0500 Merge branch 'mvpp2-jumbo-frames-support' Antoine Tenart says: ==================== net: mvpp2: jumbo frames support This series enable jumbo frames support in the Marvell PPv2 driver. The first 2 patches rework the buffer management, then two patches prepare for the final patch which adds the jumbo frames support into the driver. This is based on top of net-next, and was tested on a mcbin. Thanks! Antoine Since v1: - Improved the Tx FIFO initialization comment. - Improved the pool sanity check in mvpp2_bm_pool_use(). - Fixed pool related comments. - Cosmetic fixes (used BIT() whenever possible). ==================== Signed-off-by: David S. Miller commit 576193f2d57904cb78454d7b73eecfcac74fdf22 Author: Stefan Chulski Date: Mon Mar 5 15:16:54 2018 +0100 net: mvpp2: jumbo frames support This patch adds the support for jumbo frames in the Marvell PPv2 driver. A third buffer pool is added with 10KB buffers, which is used if the MTU is higher than 1518B for packets larger than 1518B. Please note only the port 0 supports hardware checksum offload due to the Tx FIFO size limitation. Signed-off-by: Stefan Chulski [Antoine: cosmetic cleanup, commit message] Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 98 +++++++++++++++++++++++++++--------- 1 file changed, 75 insertions(+), 23 deletions(-) commit 381c56712db43af1112a21cce6bdc37281890cdb Author: Antoine Tenart Date: Mon Mar 5 15:16:53 2018 +0100 net: mvpp2: enable UDP/TCP checksum over IPv6 This patch adds the NETIF_F_IPV6_CSUM to the driver's features to enable UDP/TCP checksum over IPv6. No extra configuration of the engine is needed on top of the IPv4 counterpart, which already is in the features list (NETIF_F_IP_CSUM). Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 93ff130f1c2bae00c0378f065e441e988b0cd1e7 Author: Yan Markman Date: Mon Mar 5 15:16:52 2018 +0100 net: mvpp2: use a data size of 10kB for Tx FIFO on port 0 This patch sets the Tx FIFO data size on port 0 to 10kB. This prepares the PPv2 driver for the Jumbo frame support addition as the hardware will need big enough Tx FIFO buffers when dealing with frames going through an interface with an MTU of 9000. Signed-off-by: Yan Markman [Antoine: commit message, small reworks.] Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit effbf5f58d64b1d1f93cb687d9797b42f291d5fd Author: Stefan Chulski Date: Mon Mar 5 15:16:51 2018 +0100 net: mvpp2: update the BM buffer free/destroy logic The buffer free routine is updated to release only given a number of buffers, and the destroy routine now checks the actual number of buffers in the (BPPI and BPPE) HW counters before draining the pools. This change helps getting jumbo frames support. Signed-off-by: Stefan Chulski [Antoine: cosmetic cleanup, commit message] Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 45 ++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 7 deletions(-) commit 01d049366529544f1df44139f5ca225d4c36ec31 Author: Stefan Chulski Date: Mon Mar 5 15:16:50 2018 +0100 net: mvpp2: use the same buffer pool for all ports This patch configures the buffer manager long pool for all ports part of the same CP. Long pool separation between ports is redundant since there are no performance improvement when different pools are used. Signed-off-by: Stefan Chulski [Antoine: cosmetic cleanup, commit message] Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 76 ++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 39 deletions(-) commit 8eb1a8590f5ca114fabf16ebb26a4bce0255ace9 Author: Jonathan Neuschäfer Date: Sun Mar 4 03:29:53 2018 +0100 net: core: dst: Add kernel-doc for 'net' parameter This fixes the following kernel-doc warning: ./include/net/dst.h:366: warning: Function parameter or member 'net' not described in 'skb_tunnel_rx' Fixes: ea23192e8e57 ("tunnels: harmonize cleanup done on skb on rx path") Signed-off-by: Jonathan Neuschäfer Signed-off-by: David S. Miller include/net/dst.h | 1 + 1 file changed, 1 insertion(+) commit 4c1342d967cb556ea1c0f34271b125deeb25f0f8 Author: Jonathan Neuschäfer Date: Sun Mar 4 03:29:52 2018 +0100 net: core: dst_cache_set_ip6: Rename 'addr' parameter to 'saddr' for consistency The other dst_cache_{get,set}_ip{4,6} functions, and the doc comment for dst_cache_set_ip6 use 'saddr' for their source address parameter. Rename the parameter to increase consistency. This fixes the following kernel-doc warnings: ./include/net/dst_cache.h:58: warning: Function parameter or member 'addr' not described in 'dst_cache_set_ip6' ./include/net/dst_cache.h:58: warning: Excess function parameter 'saddr' description in 'dst_cache_set_ip6' Fixes: 911362c70df5 ("net: add dst_cache support") Signed-off-by: Jonathan Neuschäfer Signed-off-by: David S. Miller include/net/dst_cache.h | 2 +- net/core/dst_cache.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 76b12974a3981db2a1ae60d62f55dd839d07ac85 Author: Jonathan Neuschäfer Date: Sun Mar 4 03:29:51 2018 +0100 net: core: dst_cache: Fix a typo in a comment Signed-off-by: Jonathan Neuschäfer Signed-off-by: David S. Miller include/net/dst_cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a6f2f05a2f50cdfea863887ffc3ad315fa4daf1 Author: Christophe JAILLET Date: Tue Feb 6 20:47:59 2018 +0100 igb: Fix a test with HWTSTAMP_TX_ON 'HWTSTAMP_TX_ON' should be handled as a value, not as a bit mask. The modified code should behave the same, because HWTSTAMP_TX_ON is 1 and no other possible values of 'tx_type' would match the test. However, this is more future-proof, should other values be allowed one day. See 'struct hwtstamp_config' in 'include/uapi/linux/net_tstamp.h' This fixes a warning reported by smatch: igb_xmit_frame_ring() warn: bit shifter 'HWTSTAMP_TX_ON' used for logical '&' Fixes: 26bd4e2db06be ("igb: protect TX timestamping from API misuse") Signed-off-by: Christophe JAILLET Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17a0b9add6e954b0a6c0108775df6584886b3b21 Author: Mika Westerberg Date: Tue Jan 23 13:28:41 2018 +0300 igb: Do not call netif_device_detach() when PCIe link goes missing When the driver notices that PCIe link is gone by reading 0xffffffff from a register it clears hw->hw_addr and then calls netif_device_detach(). This happens when the PCIe device is physically unplugged for example the user disconnected the Thunderbolt cable. However, netif_device_detach() prevents netif_unregister() from bringing the device down properly including tearing down MSI-X vectors. This triggers following crash during the driver removal: igb 0000:0b:00.0 enp11s0f0: PCIe link lost, device now detached ------------[ cut here ]------------ kernel BUG at drivers/pci/msi.c:352! invalid opcode: 0000 [#1] PREEMPT SMP PTI ... Call Trace: pci_disable_msix+0xc9/0xf0 igb_reset_interrupt_capability+0x58/0x60 [igb] igb_remove+0x90/0x100 [igb] pci_device_remove+0x31/0xa0 device_release_driver_internal+0x152/0x210 pci_stop_bus_device+0x78/0xa0 pci_stop_bus_device+0x38/0xa0 pci_stop_bus_device+0x38/0xa0 pci_stop_bus_device+0x26/0xa0 pci_stop_bus_device+0x38/0xa0 pci_stop_and_remove_bus_device+0x9/0x20 trim_stale_devices+0xee/0x130 ? _raw_spin_unlock_irqrestore+0xf/0x30 trim_stale_devices+0x8f/0x130 ? _raw_spin_unlock_irqrestore+0xf/0x30 trim_stale_devices+0xa1/0x130 ? get_slot_status+0x8b/0xc0 acpiphp_check_bridge.part.7+0xf9/0x140 acpiphp_hotplug_notify+0x170/0x1f0 ... To prevent the crash do not call netif_device_detach() in igb_rd32(). This should be fine because hw->hw_addr is set to NULL preventing future hardware access of the now missing device. Link: https://bugzilla.kernel.org/show_bug.cgi?id=198181 Reported-by: Ferenc Boldog Reported-by: Nikolay Bogoychev Signed-off-by: Mika Westerberg Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 12af5004145a3fa53246cca4cbb2c57d18dde202 Author: Abhijeet Kumar Date: Sun Mar 4 01:16:39 2018 +0530 ASoC: Intel: Skylake: Fix typo Spelling mistake in state. So fixing it. Signed-off-by: Abhijeet Kumar Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b8b062a99dc76ba55b3ded97e90717768da47a9 Author: Corinna Vinschen Date: Wed Jan 17 11:53:39 2018 +0100 igb: add VF trust infrastructure * Add a per-VF value to know if a VF is trusted, by default don't trust VFs. * Implement netdev op to trust VFs (igb_ndo_set_vf_trust) and add trust status to ndo_get_vf_config output. * Allow a trusted VF to change MAC and MAC filters even if MAC has been administratively set. Signed-off-by: Corinna Vinschen Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb.h | 1 + drivers/net/ethernet/intel/igb/igb_main.c | 30 +++++++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) commit 8d06c3302635f0ab426937f2bb10e9b9c34087e4 Author: James Hogan Date: Wed Feb 21 15:54:54 2018 +0000 i2c: img-scb: Drop METAG dependency Now that arch/metag/ has been removed, remove the METAG dependency from the IMG SCB I2C device driver. The hardware is also present on MIPS SoCs so the driver still has value. Signed-off-by: James Hogan Acked-by: Wolfram Sang Cc: linux-i2c@vger.kernel.org Cc: linux-metag@vger.kernel.org drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43e951e744462bf10c2dc8548263095ed4aa9e7d Author: James Hogan Date: Wed Feb 21 16:02:10 2018 +0000 media: img-ir: Drop METAG dependency Now that arch/metag/ has been removed, remove the METAG dependency from the IMG IR device driver. The hardware is also present on MIPS SoCs so the driver still has value. Signed-off-by: James Hogan Acked-by: Sean Young Cc: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Cc: linux-metag@vger.kernel.org drivers/media/rc/img-ir/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9b2909093ede6f0cea2beff201264f431504de3 Author: James Hogan Date: Wed Feb 21 16:38:06 2018 +0000 watchdog: imgpdc: Drop METAG dependency Now that arch/metag/ has been removed, remove the METAG dependency from the IMG IR device driver. The hardware is also present on MIPS SoCs so the driver still has value. Signed-off-by: James Hogan Acked-by: Guenter Roeck Cc: Wim Van Sebroeck Cc: linux-watchdog@vger.kernel.org Cc: linux-metag@vger.kernel.org drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b658a1e9a58bdbe4863256a02f0b19f42de7acc Author: James Hogan Date: Tue Oct 24 13:12:51 2017 +0100 MAINTAINERS/CREDITS: Drop METAG ARCHITECTURE The core Meta architecture support has now been removed, so drop the MAINTAINERS entry and add an entry to CREDITS. Signed-off-by: James Hogan Cc: linux-metag@vger.kernel.org CREDITS | 5 +++++ MAINTAINERS | 14 -------------- 2 files changed, 5 insertions(+), 14 deletions(-) commit 5ba484e79f1370fda5e43cd0da1f2a2a59895e81 Author: James Hogan Date: Wed Feb 21 15:37:54 2018 +0000 tty: Remove metag DA TTY and console driver Now that arch/metag/ has been removed, remove the metag DA TTY and console driver. It is of no value without the architecture code. Signed-off-by: James Hogan Acked-by: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-metag@vger.kernel.org drivers/tty/Kconfig | 13 - drivers/tty/Makefile | 1 - drivers/tty/metag_da.c | 665 ------------------------------------------------- 3 files changed, 679 deletions(-) commit a83aeb3836b1cd65770b20eafefbef7467972fa2 Author: Russell King Date: Tue Feb 27 16:01:57 2018 +0000 ARM: dts: armada388-clearfog: increase speed of i2c0 to 400kHz All the devices on I2C0 support fast mode, so increase the bus speed to match. The Armada 388 is known to have a timing issue when in standard mode, which we believe causes the ficticious device at 0x64 to appear. [gregory.clement@bootlin.com: Note that since the commit fbffee74986c ("ARM: dts: Fix I2C repeated start issue on Armada-38x") in 4.14, the timing issue is managed for the Armada 38x SoCs.] Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dtsi | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 229952d192abca88e05f8f5fbe5a9831b948559f Merge: 190f887 c29babb Author: David S. Miller Date: Mon Mar 5 10:48:29 2018 -0500 Merge branch 'convert-pernet_operations-part4' Kirill Tkhai says: ==================== Converting pernet_operations (part #4) this series continues to review and to convert pernet_operations to make them possible to be executed in parallel for several net namespaces in the same time. The patches touch mostly netfilter, also there are small number of changes in other places. ==================== Signed-off-by: David S. Miller commit c29babb7fe26e1507e8c236abbfed6e944e42651 Author: Kirill Tkhai Date: Mon Mar 5 14:32:23 2018 +0300 net: Convert proto_gre_net_ops These pernet_operations register and unregister sysctl. nf_conntrack_l4proto_gre4->init_net is simple memory initializer. Also, exit method removes gre keymap_list, which is per-net. This looks safe to be executed in parallel with other pernet_operations. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/nf_conntrack_proto_gre.c | 1 + 1 file changed, 1 insertion(+) commit b04a3d098c4ca176849ee579880c63c052ce6776 Author: Kirill Tkhai Date: Mon Mar 5 14:32:15 2018 +0300 net: Convert ctnetlink_net_ops These pernet_operations register and unregister two conntrack notifiers, and they seem to be safe to be executed in parallel. General/not related to async pernet_operations JFI: ctnetlink_net_exit_batch() actions are grouped in batch, and this could look like there is synchronize_rcu() is forgotten. But there is synchronize_rcu() on module exit patch (in ctnetlink_exit()), so this batch may be reworked as simple .exit method. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/nf_conntrack_netlink.c | 1 + 1 file changed, 1 insertion(+) commit 467d14b3073960645902ea0d18c1cbe645013638 Author: Kirill Tkhai Date: Mon Mar 5 14:32:06 2018 +0300 net: Convert nf_conntrack_net_ops These pernet_operations register and unregister sysctl and /proc entries. Exit batch method also waits till all per-net conntracks are dead. Thus, they are safe to be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/nf_conntrack_standalone.c | 1 + 1 file changed, 1 insertion(+) commit a5a179b6dff15ae0b89cb601b0a0242cff60b8e3 Author: Kirill Tkhai Date: Mon Mar 5 14:31:55 2018 +0300 net: Convert ip_set_net_ops These pernet_operations initialize and destroy net_generic(net, ip_set_net_id)-related data. Since ip_set is under CONFIG_IP_SET, it's easy to watch drivers, which depend on this config. All of them are in net/netfilter/ipset directory, except of net/netfilter/xt_set.c. There are no more drivers, which use ip_set, and all of the above don't register another pernet_operations. Also, there are is no indirect users, as header file include/linux/netfilter/ipset/ip_set.h does not define indirect users by something like this: #ifdef CONFIG_IP_SET extern func(void); #else static inline func(void); #endif So, there are no more pernet operations, dereferencing net_generic(net, ip_set_net_id). ip_set_net_ops are OK to be executed in parallel for several net, so we mark them as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/ipset/ip_set_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6c6c566e6dd80bec6f5bbb9c36e397ed9b109cdb Author: Kirill Tkhai Date: Mon Mar 5 14:31:47 2018 +0300 net: Convert fou_net_ops These pernet_operations initialize and destroy pernet net_generic(net, fou_net_id) list. The rest of net_generic(net, fou_net_id) accesses may happen after netlink message, and in-tree pernet_operations do not send FOU_GENL_NAME messages. So, these pernet_operations are safe to be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv4/fou.c | 1 + 1 file changed, 1 insertion(+) commit 16b0c0c4d9a799979b0d3f387821c93bcc301f79 Author: Kirill Tkhai Date: Mon Mar 5 14:31:37 2018 +0300 net: Convert dccp_v6_ops These pernet_operations looks similar to dccp_v4_ops, and they are also safe to be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/dccp/ipv6.c | 1 + 1 file changed, 1 insertion(+) commit 5368bd72cd7aacd0e3f80f61e9b2a096fc81cc10 Author: Kirill Tkhai Date: Mon Mar 5 14:31:28 2018 +0300 net: Convert dccp_v4_ops These pernet_operations create and destroy net::dccp::v4_ctl_sk. It looks like another pernet_operations don't want to send dccp packets to dying or creating net. Batch method similar to ipv4/ipv6 sockets and it has to be safe to be executed in parallel with anything else. So, we mark them as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/dccp/ipv4.c | 1 + 1 file changed, 1 insertion(+) commit 111da7adc1276d44d20c3973f4b39d62f83df056 Author: Kirill Tkhai Date: Mon Mar 5 14:31:19 2018 +0300 net: Convert cangw_pernet_ops These pernet_operations have a deal with cgw_list, and the rest of accesses are made under rtnl_lock(). The only exception is cgw_dump_jobs(), which is accessed under rcu_read_lock(). cgw_dump_jobs() is called on netlink request, and it does not seem, foreign pernet_operations want to send a net such the messages. So, we mark them as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/can/gw.c | 1 + 1 file changed, 1 insertion(+) commit d217472410a033cdef5b8fba4393b466ee3c3bbc Author: Kirill Tkhai Date: Mon Mar 5 14:31:10 2018 +0300 net: Convert caif_net_ops Init method just allocates memory for new cfg, and assigns net_generic(net, caif_net_id). Despite there is synchronize_rcu() on error path in cfcnfg_create(), in real this function does not use global lists, so it looks like this synchronize_rcu() is some legacy inheritance. Exit method removes caif devices under rtnl_lock(). There could be a problem, if someone from foreign net pernet_operations dereference caif_net_id of this net. It's dereferenced in get_cfcnfg() and caif_device_list(). get_cfcnfg() is used from netdevice notifiers, where they are called under rtnl_lock(). The notifiers can't be called from foreign nets pernet_operations. Also, it's used from caif_disconnect_client() and from caif_connect_client(). The both of the functions work with caif socket, and there is the only possibility to have a socket, when the net is dead. This may happen only of the socket was created as kern using sk_alloc(). Grep by PF_CAIF shows we do not create kern caif sockets, so get_cfcnfg() is safe. caif_device_list() is used in netdevice notifiers and exit method under rtnl lock. Also, from caif_get() used in the netdev notifiers and in caif_flow_cb(). The last item is skb destructor. Since there are no kernel caif sockets nobody can send net a packet in parallel with init/exit, so this is also safe. So, these pernet_operations are safe to be async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/caif/caif_dev.c | 1 + 1 file changed, 1 insertion(+) commit c60a246cd366b5da5a12cc972a25e41bc536706f Author: Kirill Tkhai Date: Mon Mar 5 14:31:00 2018 +0300 net: Convert arp_tables_net_ops and ip6_tables_net_ops These pernet_operations call xt_proto_init() and xt_proto_fini(), which just register and unregister /proc entries. They are safe to be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv4/netfilter/arp_tables.c | 1 + net/ipv6/netfilter/ip6_tables.c | 1 + 2 files changed, 2 insertions(+) commit 3822034569ac8ae39556e50fa165dc7d4276f452 Author: Kirill Tkhai Date: Mon Mar 5 14:30:50 2018 +0300 net: Convert log pernet_operations These pernet_operations use nf_log_set() and nf_log_unset() in their methods: nf_log_bridge_net_ops nf_log_arp_net_ops nf_log_ipv4_net_ops nf_log_ipv6_net_ops nf_log_netdev_net_ops Nobody can send such a packet to a net before it's became registered, nobody can send a packet after all netdevices are unregistered. So, these pernet_operations are able to be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/bridge/netfilter/nf_log_bridge.c | 1 + net/ipv4/netfilter/nf_log_arp.c | 1 + net/ipv4/netfilter/nf_log_ipv4.c | 1 + net/ipv6/netfilter/nf_log_ipv6.c | 1 + net/netfilter/nf_log_netdev.c | 1 + 5 files changed, 5 insertions(+) commit ec012f3b85159102662264bb5c3436c849d2b1b9 Author: Kirill Tkhai Date: Mon Mar 5 14:30:41 2018 +0300 net: Convert broute_net_ops, frame_filter_net_ops and frame_nat_net_ops These pernet_operations use ebt_register_table() and ebt_unregister_table() to act on the tables, which are used as argument in ebt_do_table(), called from ebtables hooks. Since there are no net-related bridge packets in-flight, when the init and exit methods are called, these pernet_operations are safe to be executed in parallel with any other. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/bridge/netfilter/ebtable_broute.c | 1 + net/bridge/netfilter/ebtable_filter.c | 1 + net/bridge/netfilter/ebtable_nat.c | 1 + 3 files changed, 3 insertions(+) commit 190f887c3cd0d07e53a7d44162c951451f4f5528 Author: David Ahern Date: Sun Mar 4 17:37:47 2018 -0800 selftests: forwarding: Add suppport to create veth interfaces For tests using veth interfaces, the test infrastructure can create the netdevs if they do not exist. Arguably this is a preferred approach since the tests require p$N and p$(N+1) to be pairs. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller .../net/forwarding/forwarding.config.sample | 5 ++++ tools/testing/selftests/net/forwarding/lib.sh | 35 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) commit 955dc68cb9b23b42999cafe6df3684309bc686c6 Author: Samuel Mendoza-Jonas Date: Mon Mar 5 11:39:05 2018 +1100 net/ncsi: Add generic netlink family Add a generic netlink family for NCSI. This supports three commands; NCSI_CMD_PKG_INFO which returns information on packages and their associated channels, NCSI_CMD_SET_INTERFACE which allows a specific package or package/channel combination to be set as the preferred choice, and NCSI_CMD_CLEAR_INTERFACE which clears any preferred setting. Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller include/uapi/linux/ncsi.h | 115 +++++++++++++ net/ncsi/Makefile | 2 +- net/ncsi/internal.h | 3 + net/ncsi/ncsi-manage.c | 30 +++- net/ncsi/ncsi-netlink.c | 421 ++++++++++++++++++++++++++++++++++++++++++++++ net/ncsi/ncsi-netlink.h | 20 +++ 6 files changed, 586 insertions(+), 5 deletions(-) commit be631892948060f44b1ceee3132be1266932071e Author: Priyaranjan Jha Date: Sun Mar 4 10:38:36 2018 -0800 tcp: add ca_state stat in SCM_TIMESTAMPING_OPT_STATS This patch adds TCP_NLA_CA_STATE stat into SCM_TIMESTAMPING_OPT_STATS. It reports ca_state of socket, when timestamp is generated. Signed-off-by: Priyaranjan Jha Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/uapi/linux/tcp.h | 1 + net/ipv4/tcp.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 87ecc95d81d951b0984f2eb9c5c118cb68d0dce8 Author: Priyaranjan Jha Date: Sun Mar 4 10:38:35 2018 -0800 tcp: add send queue size stat in SCM_TIMESTAMPING_OPT_STATS This patch adds TCP_NLA_SENDQ_SIZE stat into SCM_TIMESTAMPING_OPT_STATS. It reports no. of bytes present in send queue, when timestamp is generated. Signed-off-by: Priyaranjan Jha Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/uapi/linux/tcp.h | 1 + net/ipv4/tcp.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 200066a5bdcc2d4527562ee3760d405b6ec5b5d5 Author: Arkadi Sharshevsky Date: Sun Mar 4 16:35:26 2018 +0200 selftests: Extend the tc action test for action mirror Currently the tc action test is used only to test mirred redirect action. This patch extends it for mirred mirror. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: Arkadi Sharshevsky Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/tc_actions.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit e6c6a92905210484a84a0cae5b013570b7a67b6f Author: Gal Pressman Date: Sun Mar 4 14:12:04 2018 +0200 net: Make RX-FCS and LRO mutually exclusive LRO and RX-FCS offloads cannot be enabled at the same time since it is not clear what should happen to the FCS of each coalesced packet. The FCS is not really part of the TCP payload, hence cannot be merged into one big packet. On the other hand, providing one big LRO packet with one FCS contradicts the RX-FCS feature goal. Use the fix features mechanism in order to prevent intersection of the features and drop LRO in case RX-FCS is requested. Enabling RX-FCS while LRO is enabled will result in: $ ethtool -K ens6 rx-fcs on Actual changes: large-receive-offload: off [requested on] rx-fcs: on Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller net/core/dev.c | 6 ++++++ 1 file changed, 6 insertions(+) commit af503716ac1444db61d80cb6d17cfe62929c21df Author: Javier Martinez Canillas Date: Sun Dec 3 22:40:50 2017 +0100 i2c: core: report OF style module alias for devices registered via OF The buses should honor the firmware interface used to register the device, but the I2C core reports a MODALIAS of the form i2c: even for I2C devices registered via OF. This means that user-space will never get an OF stype uevent MODALIAS even when the drivers modules contain aliases exported from both the I2C and OF device ID tables. For example, an Atmel maXTouch Touchscreen registered by a DT node with compatible "atmel,maxtouch" has the following module alias: $ cat /sys/class/i2c-adapter/i2c-8/8-004b/modalias i2c:maxtouch So udev won't be able to auto-load a module for an OF-only device driver. Many OF-only drivers duplicate the OF device ID table entries in an I2C ID table only has a workaround for how the I2C core reports the module alias. This patch changes the I2C core to report an OF related MODALIAS uevent if the device was registered via OF. So for the previous example, after this patch, the reported MODALIAS for the Atmel maXTouch will be the following: $ cat /sys/class/i2c-adapter/i2c-8/8-004b/modalias of:NtrackpadTCatmel,maxtouch NOTE: This patch may break out-of-tree drivers that were relying on this behavior, and only had an I2C device ID table even when the device was registered via OF. There are no remaining drivers in mainline that do this, but out-of-tree drivers have to be fixed and define a proper OF device ID table to have module auto-loading working. Signed-off-by: Javier Martinez Canillas Tested-by: Dmitry Mastykin Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit e574c0eec56a746445cab3f8f7b9a0302dd101f5 Author: Intiyaz Basha Date: Fri Mar 2 18:29:04 2018 -0800 liquidio: Corrected Rx bytes counting Corrected stats mismatch between Host Tx and its peer Rx stats Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d143b9e3055358e160d8d5975d889ce5c149625a Author: Roman Mashak Date: Fri Mar 2 20:52:01 2018 -0500 net sched actions: corrected extack message Signed-off-by: Roman Mashak Signed-off-by: David S. Miller net/sched/act_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cccd0b9a72d27f681c2e45da0c263a46e5c63926 Author: James Hogan Date: Fri Feb 9 16:11:58 2018 +0000 MIPS: Expand help text to list generic defconfigs Expand the MIPS Makefile help text to list generic board names, generic defconfigs, and legacy defconfigs which have been converted to generic and are still usable. Here's a snippet of the new "make ARCH=mips help" output: ... If you are targeting a system supported by generic kernels you may configure the kernel for a given architecture target like so: {micro32,32,64}{r1,r2,r6}{el,}_defconfig Where BOARDS is some subset of the following: boston ni169445 ranchu sead-3 xilfpga Specifically the following generic default configurations are supported: 32r1_defconfig - Build generic kernel for MIPS32 r1 32r1el_defconfig - Build generic kernel for MIPS32 r1 little endian 32r2_defconfig - Build generic kernel for MIPS32 r2 32r2el_defconfig - Build generic kernel for MIPS32 r2 little endian 32r6_defconfig - Build generic kernel for MIPS32 r6 32r6el_defconfig - Build generic kernel for MIPS32 r6 little endian 64r1_defconfig - Build generic kernel for MIPS64 r1 64r1el_defconfig - Build generic kernel for MIPS64 r1 little endian 64r2_defconfig - Build generic kernel for MIPS64 r2 64r2el_defconfig - Build generic kernel for MIPS64 r2 little endian 64r6_defconfig - Build generic kernel for MIPS64 r6 64r6el_defconfig - Build generic kernel for MIPS64 r6 little endian micro32r2_defconfig - Build generic kernel for microMIPS32 r2 micro32r2el_defconfig - Build generic kernel for microMIPS32 r2 little endian The following legacy default configurations have been converted to generic and can still be used: sead3_defconfig - Build 32r2el_defconfig BOARDS=sead-3 sead3micro_defconfig - Build micro32r2el_defconfig BOARDS=sead-3 xilfpga_defconfig - Build 32r2el_defconfig BOARDS=xilfpga ... Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Paul Burton Cc: Matt Redfearn Cc: linux-mips@linux-mips.org Cc: linux-kbuild@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/18598/ arch/mips/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit d4ccceb055912c2e5e15ec488cee3378ee4ca73c Author: Tvrtko Ursulin Date: Fri Mar 2 18:14:56 2018 +0200 drm/i915/icl: Ringbuffer interrupt handling On Gen11 interrupt masks need to be clear to allow C6 entry. We keep them all enabled knowing that we generate extra interrupts. v2: Rebase. v3: Remove gen 11 extra check in logical_render_ring_init. v4: Rebase fixes. v5: Rebase/refactor. v6: Rebase. v7: Rebase. v8: Update comment and commit message (Daniele) Signed-off-by: Tvrtko Ursulin Signed-off-by: Rodrigo Vivi Cc: Daniele Ceraolo Spurio Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180302161501.28594-1-mika.kuoppala@linux.intel.com drivers/gpu/drm/i915/intel_breadcrumbs.c | 16 ++++++++++------ drivers/gpu/drm/i915/intel_lrc.c | 13 +++++++++++-- 2 files changed, 21 insertions(+), 8 deletions(-) commit be20f6b063f51cd77d071b803ee24f23200dc559 Author: KarimAllah Ahmed Date: Wed Jan 17 19:30:29 2018 +0100 PCI/IOV: Skip INTx config reads for VFs Per PCIe r4.0, sec 9.2.1.4, VFs can not implement INTX, and their Interrupt Line and Interrupt Pin registers must be RO Zero. Some devices have thousands of VFs, so skip reading the registers as an optimization. Signed-off-by: KarimAllah Ahmed Signed-off-by: Jan H. Schönherr [bhelgaas: changelog, comment] Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6b2f1351af567110cec80d7c067314c633a14f50 Author: Sinan Kaya Date: Tue Feb 27 14:14:12 2018 -0600 PCI: Wait for device to become ready after secondary bus reset Setting Secondary Bus Reset of a downstream port sends a hot reset. PCIe r4.0, sec 2.3.1, Request Handling Rules, indicates that a device can return CRS Completion Status following such a reset. Wait until the device becomes ready in that situation. Signed-off-by: Sinan Kaya Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01fd61c0b9bd85ab41fb60fbd781d44882ee6887 Author: Sinan Kaya Date: Tue Feb 27 14:14:11 2018 -0600 PCI: Add a return type for pci_reset_bridge_secondary_bus() Add a return value to pci_reset_bridge_secondary_bus() so we can return an error if the device doesn't become ready after the reset. Signed-off-by: Sinan Kaya Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig drivers/pci/pci.c | 4 +++- include/linux/pci.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) commit abbcf0e2a99d55433b2ee44794e6f875fc36aae2 Author: Sinan Kaya Date: Tue Feb 27 14:14:10 2018 -0600 PCI: Wait for device to become ready after a power management reset PCIe r4.0, sec 2.3.1, Request Handling Rules, indicates that a device can return CRS Completion Status following a D3hot to D0 transition. Wait until the device becomes ready in that situation. Signed-off-by: Sinan Kaya Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2746e2c389f9d50043d21e2204270403efb9d62f Author: Thierry Bultel Date: Mon Mar 5 14:27:18 2018 +0100 dmaengine: imx-sdma: fix pagefault when channel is disabled during interrupt Add a spinlock and a 'enabled' boolean on channel descriptor, to avoid using buffer descriptors in the interrupt context, when sdma_disable_channel is called meanwhile. Signed-off-by: Thierry Bultel Signed-off-by: Vinod Koul drivers/dma/imx-sdma.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 6afad54d2f0ddebacfcf3b829147d7fed8dab298 Author: Kan Liang Date: Thu Mar 1 18:09:11 2018 -0500 perf mmap: Discard legacy interfaces for mmap read forward Discards legacy interfaces perf_evlist__mmap_read_forward(), perf_evlist__mmap_read() and perf_evlist__mmap_consume(). No tools use them. Signed-off-by: Kan Liang Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1519945751-37786-14-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evlist.c | 25 +------------------------ tools/perf/util/evlist.h | 4 ---- tools/perf/util/mmap.c | 21 +-------------------- 3 files changed, 2 insertions(+), 48 deletions(-) commit 759487307625cd44ac4aa241ee547b52b72bc4ad Author: Kan Liang Date: Thu Mar 1 18:09:10 2018 -0500 perf test: Switch to new perf_mmap__read_event() interface for task-exit The perf test 'task-exit' still use the legacy interface. No functional change. Committer notes: Testing it: # perf test exit 21: Number of exit events of a simple workload : Ok # Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1519945751-37786-13-git-send-email-kan.liang@linux.intel.com [ Changed bool parameters from 0 to 'false', as per Jiri comment ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/task-exit.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit ee4024ff858211316c4824b16bea446f08765ae8 Author: Kan Liang Date: Thu Mar 1 18:09:09 2018 -0500 perf test: Switch to new perf_mmap__read_event() interface for switch-tracking The perf test 'switch-tracking' still use the legacy interface. No functional change. Committer testing: # perf test switch 32: Track with sched_switch : Ok # Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1519945751-37786-12-git-send-email-kan.liang@linux.intel.com [ Changed bool parameters from 0 to 'false', as per Jiri comment ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/switch-tracking.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 5d0007cdfc6612788badceb276156d6ccb30b6de Author: Kan Liang Date: Thu Mar 1 18:09:08 2018 -0500 perf test: Switch to new perf_mmap__read_event() interface for sw-clock The perf test 'sw-clock' still use the legacy interface. No functional change. Committer testing: # perf test clock 22: Software clock events period values : Ok # Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1519945751-37786-11-git-send-email-kan.liang@linux.intel.com [ Changed bool parameters from 0 to 'false', as per Jiri comment ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/sw-clock.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 9dfb85dfaffe6bc38f0c9f8a8622e2a7ca333e58 Author: Kan Liang Date: Thu Mar 1 18:09:07 2018 -0500 perf test: Switch to new perf_mmap__read_event() interface for time-to-tsc The perf test 'time-to-tsc' still use the legacy interface. No functional change. Commiter notes: Testing it: # perf test tsc 57: Convert perf time to TSC : Ok # Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1519945751-37786-10-git-send-email-kan.liang@linux.intel.com [ Changed bool parameters from 0 to 'false', as per Jiri comment ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/tests/perf-time-to-tsc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 88e37a4bbe6e05fd5ad103738c542658b81e76ea Author: Kan Liang Date: Thu Mar 1 18:09:06 2018 -0500 perf test: Switch to new perf_mmap__read_event() interface for perf-record The perf test 'perf-record' still use the legacy interface. No functional change. Committer notes: Testing it: # perf test PERF_RECORD 8: PERF_RECORD_* events & perf_sample fields : Ok # Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1519945751-37786-9-git-send-email-kan.liang@linux.intel.com [ Changed bool parameters from 0 to 'false', as per Jiri comment ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/perf-record.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 1d1b5632ed0b797721a409bbed718d85384168a2 Author: Kan Liang Date: Thu Mar 1 18:09:05 2018 -0500 perf test: Switch to new perf_mmap__read_event() interface for tp fields The perf test 'syscalls:sys_enter_openat event fields' still use the legacy interface. No functional change. Committer notes: Testing it: # perf test sys_enter_openat 15: syscalls:sys_enter_openat event fields : Ok # Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1519945751-37786-8-git-send-email-kan.liang@linux.intel.com [ Changed bool parameters from 0 to 'false', as per Jiri comment ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/openat-syscall-tp-fields.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 334f823e2ab58b3c0e58fa71321680382c5f60ff Author: Kan Liang Date: Thu Mar 1 18:09:04 2018 -0500 perf test: Switch to new perf_mmap__read_event() interface for mmap-basic The perf test 'mmap-basic' still use the legacy interface. No functional change. Committer notes: Testing it: # perf test "mmap interface" 4: Read samples using the mmap interface : Ok # Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1519945751-37786-7-git-send-email-kan.liang@linux.intel.com [ Changed bool parameters from 0 to 'false', as per Jiri comment ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/mmap-basic.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 693d32aebf857ef1d1803b08ef1b631990ae3747 Author: Kan Liang Date: Thu Mar 1 18:09:03 2018 -0500 perf test: Switch to new perf_mmap__read_event() interface for "keep tracking" test The perf test 'keep tracking' still use the legacy interface. No functional change. Committer testing: # perf test tracking 25: Use a dummy software event to keep tracking : Ok # Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1519945751-37786-6-git-send-email-kan.liang@linux.intel.com [ Changed bool parameters from 0 to 'false', as per Jiri comment ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/keep-tracking.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 00fc2460e735fa0f6add802c7426273e7dbc2b27 Author: Kan Liang Date: Thu Mar 1 18:09:02 2018 -0500 perf test: Switch to new perf_mmap__read_event() interface for 'code reading' test The perf test 'object code reading' still use the legacy interface. No functional change. Committer notes: Testing: # perf test reading 23: Object code reading: Ok # Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1519945751-37786-5-git-send-email-kan.liang@linux.intel.com [ Changed bool parameters from 0 to 'false', as per Jiri comment ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/code-reading.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 2f54f3a4733c0cd857992d793af5e8321b281012 Author: Kan Liang Date: Thu Mar 1 18:09:01 2018 -0500 perf test: Switch to new perf_mmap__read_event() interface for bpf The perf test 'bpf' still use the legacy interface. No functional change. Committer notes: Tested with: # perf test bpf 39: BPF filter : 39.1: Basic BPF filtering : Ok 39.2: BPF pinning : Ok 39.3: BPF prologue generation : Ok 39.4: BPF relocation checker : Ok # Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1519945751-37786-4-git-send-email-kan.liang@linux.intel.com [ Changed bool parameters from 0 to 'false', as per Jiri comment ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/bpf.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 35b7cdc6379ea8300161f0f80fe8aad083a1c5d0 Author: Kan Liang Date: Thu Mar 1 18:09:00 2018 -0500 perf python: Switch to new perf_mmap__read_event() interface The perf python binding still use the legacy interface. No functional change. Committer notes: Tested before and after with: [root@jouet perf]# export PYTHONPATH=/tmp/build/perf/python [root@jouet perf]# tools/perf/python/twatch.py cpu: 0, pid: 1183, tid: 6293 { type: exit, pid: 1183, ppid: 1183, tid: 6293, ptid: 6293, time: 17886646588257} cpu: 2, pid: 13820, tid: 13820 { type: fork, pid: 13820, ppid: 13820, tid: 6306, ptid: 13820, time: 17886869099529} cpu: 1, pid: 13820, tid: 6306 { type: comm, pid: 13820, tid: 6306, comm: TaskSchedulerFo } ^CTraceback (most recent call last): File "tools/perf/python/twatch.py", line 68, in main() File "tools/perf/python/twatch.py", line 40, in main evlist.poll(timeout = -1) KeyboardInterrupt [root@jouet perf]# No problems found. Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1519945751-37786-3-git-send-email-kan.liang@linux.intel.com [ Changed bool parameters from 0 to 'false', as per Jiri comment ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/python.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit e662e70fa41985d258ba82f47bb248d2433c52e0 Author: Rob Herring Date: Thu Mar 1 14:25:37 2018 -0600 arm: dts: kirkwood: fix error in #sound-dai-cells size dtc now gives the following warning: arch/arm/boot/dts/kirkwood-t5325.dtb: Warning (sound_dai_property): /sound/simple-audio-card,cpu:sound-dai: property size (4) too small for cell size 1 The binding documentation gives no indication what the cell size should be (which should be fixed too), so just assume 0 is fine as that is what the consumer has. Cc: Jason Cooper Cc: Andrew Lunn Cc: Gregory Clement Cc: Sebastian Hesselbarth Signed-off-by: Rob Herring Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7f55c62e63461c4071afe8730851e406935d960 Author: Kan Liang Date: Thu Mar 1 18:08:59 2018 -0500 perf trace: Switch to new perf_mmap__read_event() interface The 'perf trace' utility still use the legacy interface. Switch to the new perf_mmap__read_event() interface. No functional change. Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1519945751-37786-2-git-send-email-kan.liang@linux.intel.com [ Changed bool parameters from 0 to 'false', as per Jiri comment ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 53172f9057e92c9b27f0bbf2a46827d87f12b0d2 Author: Kan Liang Date: Thu Mar 1 18:08:58 2018 -0500 perf kvm: Switch to new perf_mmap__read_event() interface The perf kvm still use the legacy interface. Switch to the new perf_mmap__read_event() interface for perf kvm. No functional change. Committer notes: Tested before and after running: # perf kvm stat record On a machine with a kvm guest, then used: # perf kvm stat report Before/after results match and look like: # perf kvm stat record -a sleep 5 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 2.132 MB perf.data.guest (1828 samples) ] # perf kvm stat report Analyze events for all VMs, all VCPUs: VM-EXIT Samples Samples% Time% Min Time Max Time Avg time IO_INSTRUCTION 258 40.06% 0.08% 3.51us 122.54us 14.87us (+- 6.76%) MSR_WRITE 178 27.64% 0.01% 0.47us 6.34us 2.18us (+- 4.80%) EPT_MISCONFIG 148 22.98% 0.03% 3.76us 65.60us 11.22us (+- 8.14%) HLT 47 7.30% 99.88% 181.69us 249988.06us 102061.36us (+-13.49%) PAUSE_INSTRUCTION 5 0.78% 0.00% 0.38us 0.79us 0.47us (+-17.05%) MSR_READ 4 0.62% 0.00% 1.14us 3.33us 2.67us (+-19.35%) EXTERNAL_INTERRUPT 2 0.31% 0.00% 2.15us 2.17us 2.16us (+- 0.30%) PENDING_INTERRUPT 1 0.16% 0.00% 2.56us 2.56us 2.56us (+- 0.00%) PREEMPTION_TIMER 1 0.16% 0.00% 3.21us 3.21us 3.21us (+- 0.00%) Total Samples:644, Total events handled time:4802790.72us. # Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1519945751-37786-1-git-send-email-kan.liang@linux.intel.com [ Changed bool parameters from 0 to 'false', as per Jiri comment ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kvm.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 669b710e5e30328bc41de88aaab5422913a39074 Author: Philippe CORNU Date: Sun Feb 4 22:36:24 2018 +0100 drm/bridge/synopsys: dsi: readl_poll_timeout return value clean up The readl_poll_timeout() return value is 0 in case of success so it is better to detect errors without taking care of the return value sign. Signed-off-by: Philippe Cornu Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20180204213624.18288-1-philippe.cornu@st.com drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ad46e48c65fa1f204fa29eaff1b91174d314a94b Author: Jiri Olsa Date: Fri Mar 2 17:13:54 2018 +0100 perf record: Fix crash in pipe mode Currently we can crash perf record when running in pipe mode, like: $ perf record ls | perf report # To display the perf.data header info, please use --header/--header-only options. # perf: Segmentation fault Error: The - file has no samples! The callstack of the crash is: 0x0000000000515242 in perf_event__synthesize_event_update_name 3513 ev = event_update_event__new(len + 1, PERF_EVENT_UPDATE__NAME, evsel->id[0]); (gdb) bt #0 0x0000000000515242 in perf_event__synthesize_event_update_name #1 0x00000000005158a4 in perf_event__synthesize_extra_attr #2 0x0000000000443347 in record__synthesize #3 0x00000000004438e3 in __cmd_record #4 0x000000000044514e in cmd_record #5 0x00000000004cbc95 in run_builtin #6 0x00000000004cbf02 in handle_internal_command #7 0x00000000004cc054 in run_argv #8 0x00000000004cc422 in main The reason of the crash is that the evsel does not have ids array allocated and the pipe's synthesize code tries to access it. We don't force evsel ids allocation when we have single event, because it's not needed. However we need it when we are in pipe mode even for single event as a key for evsel update event. Fixing this by forcing evsel ids allocation event for single event, when we are in pipe mode. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180302161354.30192-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 9 +++++++++ tools/perf/perf.h | 1 + tools/perf/util/record.c | 8 ++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) commit 696703af37a28892db89ff6a6d0cdfde6fb803ab Author: Arnaldo Carvalho de Melo Date: Fri Mar 2 11:59:36 2018 -0300 perf annotate: Find 'call' instruction target symbol at parsing time So that we do it just once, not everytime we press enter or -> on a 'call' instruction line. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-uysyojl1e6nm94amzzzs08tf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 17 +++++------------ tools/perf/util/annotate.c | 38 +++++++++++++++++++++----------------- tools/perf/util/annotate.h | 1 + 3 files changed, 27 insertions(+), 29 deletions(-) commit b09c2364a4dc2a67e640c2b839d936302815693f Author: Arnaldo Carvalho de Melo Date: Thu Mar 1 14:52:50 2018 -0300 perf record: Throttle user defined frequencies to the maximum allowed # perf record -F 200000 sleep 1 warning: Maximum frequency rate (15,000 Hz) exceeded, throttling from 200,000 Hz to 15,000 Hz. The limit can be raised via /proc/sys/kernel/perf_event_max_sample_rate. The kernel will lower it when perf's interrupts take too long. Use --strict-freq to disable this throttling, refusing to record. [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.019 MB perf.data (15 samples) ] # perf evlist -v cycles:ppp: size: 112, { sample_period, sample_freq }: 15000, sample_type: IP|TID|TIME|PERIOD, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1 For those wanting that it fails if the desired frequency can't be used: # perf record --strict-freq -F 200000 sleep 1 error: Maximum frequency rate (15,000 Hz) exceeded. Please use -F freq option with a lower value or consider tweaking /proc/sys/kernel/perf_event_max_sample_rate. # Suggested-by: Ingo Molnar Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-oyebruc44nlja499nqkr1nzn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 7 ++++++- tools/perf/builtin-record.c | 2 ++ tools/perf/perf.h | 1 + tools/perf/util/record.c | 20 +++++++++++++++----- 4 files changed, 24 insertions(+), 6 deletions(-) commit 7831bf236505bcb2a0a1255e7f3e902a0cb732d6 Author: Arnaldo Carvalho de Melo Date: Thu Mar 1 14:25:56 2018 -0300 perf top: Allow asking for the maximum allowed sample rate Add the handy '-F max' shortcut, just introduced to 'perf record', to reading and using the kernel.perf_event_max_sample_rate value as the user supplied sampling frequency: Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-hz04f296zccknnb5at06a6q0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-top.txt | 4 +++- tools/perf/builtin-top.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit a9980a6dbb9efd154b032ad729c869784302f361 Author: Arnaldo Carvalho de Melo Date: Thu Mar 1 14:22:12 2018 -0300 perf top browser: Show sample_freq in browser title line The '--stdio' 'perf top' UI shows it, so lets remove this UI difference and show it too in '--tui', will be useful for 'perf top --tui -F max'. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-n3wd8n395uo4y9irst29pjic@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 67230479b2304be99e9451ee171aa288a112ea16 Author: Arnaldo Carvalho de Melo Date: Thu Mar 1 13:46:23 2018 -0300 perf record: Allow asking for the maximum allowed sample rate Add the handy '-F max' shortcut to reading and using the kernel.perf_event_max_sample_rate value as the user supplied sampling frequency: # perf record -F max sleep 1 info: Using a maximum frequency rate of 15,000 Hz [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.019 MB perf.data (14 samples) ] # sysctl kernel.perf_event_max_sample_rate kernel.perf_event_max_sample_rate = 15000 # perf evlist -v cycles:ppp: size: 112, { sample_period, sample_freq }: 15000, sample_type: IP|TID|TIME|PERIOD, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1 # perf record -F 10 sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.019 MB perf.data (4 samples) ] # perf evlist -v cycles:ppp: size: 112, { sample_period, sample_freq }: 10, sample_type: IP|TID|TIME|PERIOD, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1 # Suggested-by: Ingo Molnar Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-4y0tiuws62c64gp4cf0hme0m@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 4 +++- tools/perf/builtin-record.c | 7 ++++++- tools/perf/perf.h | 2 ++ tools/perf/util/record.c | 23 +++++++++++++++++++++++ 4 files changed, 34 insertions(+), 2 deletions(-) commit 4f67336870f641daa485ea504777486e24a9aece Author: Jiri Olsa Date: Thu Mar 1 17:52:15 2018 +0100 perf tests: Rename trace+probe_libc_inet_pton to record+probe_libc_inet_pton Because the test is no longer using perf trace but perf record instead. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180301165215.6780-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo .../tests/shell/record+probe_libc_inet_pton.sh | 62 ++++++++++++++++++++++ .../perf/tests/shell/trace+probe_libc_inet_pton.sh | 62 ---------------------- 2 files changed, 62 insertions(+), 62 deletions(-) commit a18ee796f8af5569628c324700b9a34b88884488 Author: Jiri Olsa Date: Thu Mar 1 17:52:14 2018 +0100 perf tests: Switch trace+probe_libc_inet_pton to use record There's a problem with relying on backtrace data from 'perf trace' the way the trace+probe_libc_inet_pton does. This test inserts uprobe within ping binary and checks that it gets its sample using 'perf trace'. It also checks it gets proper backtrace from sample and that's where the issue is. The 'perf trace' does not sort events (by definition) so it can happen that it processes the event sample before the ping binary memory map event. This can (very rarely) happen as proved by this events dump output (from custom added debug output): ... 7680/7680: [0x7f4e29718000(0x204000) @ 0 fd:00 33611321 4230892504]: r-xp /usr/lib64/libdl-2.17.so 7680/7680: [0x7f4e29502000(0x216000) @ 0 fd:00 33617257 2606846872]: r-xp /usr/lib64/libz.so.1.2.7 (IP, 0x2): 7680/7680: 0x7f4e29c2ed60 period: 1 addr: 0 7680/7680: [0x564842ef0000(0x233000) @ 0 fd:00 83 1989280200]: r-xp /usr/bin/ping 7680/7680: [0x7f4e2aca2000(0x224000) @ 0 fd:00 33611308 1219144940]: r-xp /usr/lib64/ld-2.17.so ... In this case 'perf trace' fails to resolve the last callchain IP (within the ping binary) because it does not know about the ping binary memory map yet and the test fails like this: PING ::1(::1) 56 data bytes 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.037 ms --- ::1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.037/0.037/0.037/0.000 ms 0.000 probe_libc:inet_pton:(7f4e29c2ed60)) __GI___inet_pton (/usr/lib64/libc-2.17.so) getaddrinfo (/usr/lib64/libc-2.17.so) [0] ([unknown]) FAIL: expected backtrace entry 8 ".*\(.*/bin/ping.*\)$" got "[0] ([unknown])" Switching the test to use 'perf record' and 'perf script' instead of 'perf trace'. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180301165215.6780-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo .../perf/tests/shell/trace+probe_libc_inet_pton.sh | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 9c04409d7f5c325233961673356ea8aced6a4ef3 Author: Arnaldo Carvalho de Melo Date: Thu Mar 1 11:33:59 2018 -0300 perf annotate browser: Be more robust when drawing jump arrows This first happened with a gcc function, _cpp_lex_token, that has the usual jumps: │1159e6c: ↓ jne 115aa32 <_cpp_lex_token@@Base+0xf92> I.e. jumps to a label inside that function (_cpp_lex_token), and those works, but also this kind: │1159e8b: ↓ jne c469be I.e. jumps to another function, outside _cpp_lex_token, which are not being correctly handled generating as a side effect references to ab->offset[] entries that are set to NULL, so to make this code more robust, check that here. A proper fix for will be put in place, looking at the function name right after the '<' token and probably treating this like a 'call' instruction. For now just don't draw the arrow. Reported-by: Ingo Molnar Reported-by: Linus Torvalds Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: Jin Yao Cc: Kan Liang Link: https://lkml.kernel.org/n/tip-5tzvb875ep2sel03aeefgmud@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 76bf7087fb2118aee16370821975f8a58febf68a Merge: e3e389f 661e50b Author: Mauro Carvalho Chehab Date: Mon Mar 5 07:39:06 2018 -0500 Merge commit 'v4.16-rc4~0' into patchwork * commit 'v4.16-rc4~0': (900 commits) Linux 4.16-rc4 memremap: fix softlockup reports at teardown libnvdimm: re-enable deep flush for pmem devices via fsync() MAINTAINERS: take over Kconfig maintainership vfio: disable filesystem-dax page pinning kconfig: fix line number in recursive inclusion error message Coccinelle: memdup: Fix typo in warning messages i2c: octeon: Prevent error message on bus error parisc: Reduce irq overhead when run in qemu parisc: Use cr16 interval timers unconditionally on qemu parisc: Check if secondary CPUs want own PDC calls parisc: Hide virtual kernel memory layout parisc: Fix ordering of cache and TLB flushes kconfig: Update ncurses package names for menuconfig kbuild/kallsyms: trivial typo fix kbuild: test --build-id linker flag by ld-option instead of cc-ldoption kbuild: drop superfluous GCC_PLUGINS_CFLAGS assignment kconfig: Don't leak choice names during parsing sh: fix build error for empty CONFIG_BUILTIN_DTB_SOURCE kconfig: set SYMBOL_AUTO to the symbol marked with defconfig_list ... commit 7509702bd8bd0975cc42a7272221446a897be950 Author: Chris Wilson Date: Mon Mar 5 10:33:12 2018 +0000 drm/i915: Unwind vma pinning for intel_pin_and_fence_fb_obj error path If we fail to acquire a fence when we must, we must unwind before reporting the error. Otherwise, we lose tracking of the vma pinning and eventually hit a bug like <3>[ 46.163202] i915_vma_unpin:333 GEM_BUG_ON(!i915_vma_is_pinned(vma)) <4>[ 46.163424] ------------[ cut here ]------------ <2>[ 46.163429] kernel BUG at drivers/gpu/drm/i915/i915_vma.h:333! <4>[ 46.163444] invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI <0>[ 46.163451] Dumping ftrace buffer: <0>[ 46.163457] --------------------------------- <0>[ 46.163630] <...>-84 1.... 46260767us : i915_gem_object_unpin_from_display_plane: i915_vma_unpin:333 GEM_BUG_ON(!i915_vma_is_pinned(vma)) <0>[ 46.163635] --------------------------------- <4>[ 46.163638] Modules linked in: vgem i915 snd_hda_codec_analog snd_hda_codec_generic coretemp snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm lpc_ich mei_me e1000e mei prime_numbers <4>[ 46.163667] CPU: 1 PID: 84 Comm: kworker/u16:1 Tainted: G U 4.16.0-rc3-gc07ef2c77d14-kasan_18+ #1 <4>[ 46.163671] Hardware name: Dell Inc. OptiPlex 755 /0PU052, BIOS A08 02/19/2008 <4>[ 46.163743] Workqueue: events_unbound intel_atomic_commit_work [i915] <4>[ 46.163809] RIP: 0010:i915_gem_object_unpin_from_display_plane+0x253/0x2f0 [i915] <4>[ 46.163813] RSP: 0018:ffff8800624cfb48 EFLAGS: 00010286 <4>[ 46.163818] RAX: 000000000000000c RBX: ffff880064446c40 RCX: ffff8800653135b8 <4>[ 46.163822] RDX: dffffc0000000000 RSI: 0000000000000054 RDI: ffff8800651e30d0 <4>[ 46.163825] RBP: 00000000000003d0 R08: 0000000000000001 R09: ffff8800651e3158 <4>[ 46.163829] R10: 0000000000000000 R11: ffff8800651e30f0 R12: 0000000000000001 <4>[ 46.163832] R13: ffff880054c58620 R14: 0000000000000000 R15: dffffc0000000000 <4>[ 46.163836] FS: 0000000000000000(0000) GS:ffff880066040000(0000) knlGS:0000000000000000 <4>[ 46.163840] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4>[ 46.163843] CR2: 00007f1fc6fb0000 CR3: 00000000526fe000 CR4: 00000000000006e0 <4>[ 46.163846] Call Trace: <4>[ 46.163918] intel_unpin_fb_vma+0xbd/0x300 [i915] <4>[ 46.163990] intel_cleanup_plane_fb+0x99/0xc0 [i915] <4>[ 46.163998] drm_atomic_helper_cleanup_planes+0x166/0x280 <4>[ 46.164071] intel_atomic_commit_tail+0x1594/0x33a0 [i915] <4>[ 46.164081] ? process_one_work+0x66e/0x1460 <4>[ 46.164151] ? skl_update_crtcs+0x9c0/0x9c0 [i915] <4>[ 46.164157] ? lock_acquire+0x13d/0x390 <4>[ 46.164161] ? lock_acquire+0x13d/0x390 <4>[ 46.164169] process_one_work+0x71a/0x1460 <4>[ 46.164175] ? __schedule+0x838/0x1e50 <4>[ 46.164182] ? pwq_dec_nr_in_flight+0x2b0/0x2b0 <4>[ 46.164188] ? _raw_spin_lock_irq+0xa/0x40 <4>[ 46.164194] worker_thread+0xdf/0xf60 <4>[ 46.164204] ? process_one_work+0x1460/0x1460 <4>[ 46.164209] kthread+0x2cf/0x3c0 <4>[ 46.164213] ? _kthread_create_on_node+0xa0/0xa0 <4>[ 46.164218] ret_from_fork+0x3a/0x50 <4>[ 46.164227] Code: e8 78 d9 cd e8 48 8b 35 cc 9e 47 00 49 c7 c0 c0 31 84 c0 b9 4d 01 00 00 48 c7 c2 e0 80 84 c0 48 c7 c7 0e bb 57 c0 e8 5d 4b df e8 <0f> 0b 48 c7 c1 c0 30 84 c0 ba 4e 01 00 00 48 c7 c6 e0 80 84 c0 <1>[ 46.164368] RIP: i915_gem_object_unpin_from_display_plane+0x253/0x2f0 [i915] RSP: ffff8800624cfb48 Fixes: 85798ac9b35f ("drm/i915: Fail if we can't get a fence for gen2/3 tiled scanout") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180305103312.29492-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_display.c | 1 + 1 file changed, 1 insertion(+) commit e0f6429dc1c0aeac8439e16a0c8e2539f401190f Author: Kees Cook Date: Wed Feb 21 10:18:22 2018 -0800 arm64: cpufeature: Remove redundant "feature" in reports The word "feature" is repeated in the CPU features reporting. This drops it for improved readability. Before (redundant "feature" word): SMP: Total of 4 processors activated. CPU features: detected feature: 32-bit EL0 Support CPU features: detected feature: Kernel page table isolation (KPTI) CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching CPU: All CPU(s) started at EL2 After: SMP: Total of 4 processors activated. CPU features: detected: 32-bit EL0 Support CPU features: detected: Kernel page table isolation (KPTI) CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching CPU: All CPU(s) started at EL2 Signed-off-by: Kees Cook Acked-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e6f549fe91344999ef3e479ec9fbd039614f2e5 Author: Kees Cook Date: Wed Feb 21 10:18:21 2018 -0800 arm64: cpufeature: Relocate PAN emulation report The PAN emulation notification was only happening for non-boot CPUs if CPU capabilities had already been configured. This seems to be the wrong place, as it's system-wide and isn't attached to capabilities, so its reporting didn't normally happen. Instead, report it once from the boot CPU. Before (missing PAN emulation report): SMP: Total of 4 processors activated. CPU features: detected feature: 32-bit EL0 Support CPU features: detected feature: Kernel page table isolation (KPTI) CPU: All CPU(s) started at EL2 After: SMP: Total of 4 processors activated. CPU features: detected feature: 32-bit EL0 Support CPU features: detected feature: Kernel page table isolation (KPTI) CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching CPU: All CPU(s) started at EL2 Signed-off-by: Kees Cook Acked-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6141ac1c274741ea8a47dfda759071f1c2eb5573 Author: Ard Biesheuvel Date: Wed Jan 17 16:11:27 2018 +0000 arm64/kernel: kaslr: drop special Image placement logic Now that the early kernel mapping logic can tolerate placements of Image that cross swapper table boundaries, we can remove the logic that adjusts the offset if the dice roll produced an offset that puts the kernel right on top of one. Reviewed-by: Steve Capper Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/kaslr.c | 15 --------------- 1 file changed, 15 deletions(-) commit 532826f3712b607256eb30f92f23d1c604d3fa34 Author: Michael Weiser Date: Thu Feb 1 23:13:37 2018 +0100 arm64: Mirror arm for unimplemented compat syscalls Mirror arm behaviour for unimplemented syscalls: Below 2048 return -ENOSYS, above 2048 raise SIGILL. Signed-off-by: Michael Weiser [will: Tweak die string to identify as compat syscall] Signed-off-by: Will Deacon arch/arm64/kernel/sys_compat.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 611d059f1a136dcb76a68eb715dc5c66d8a0a3fd Merge: 966580a c715160 Author: Ulf Hansson Date: Mon Mar 5 13:04:37 2018 +0100 Merge branch 'fixes' into next commit 966580ad236e825483abd956c99edbdc0b06476c Author: Sean Wang Date: Mon Mar 5 15:03:20 2018 +0800 mmc: mediatek: add support for MT7622 SoC Just applying the existing logic and adding its own characteristics into the space pointed by an extra entry of struct of_device_id to have support of MT7622 SoC. Signed-off-by: Chaotian Jing Signed-off-by: Sean Wang Tested-by: Jumin Li Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit df1d7c8d45a50aa0441b413bbd8f4d51438038a8 Author: Sean Wang Date: Mon Mar 5 15:03:19 2018 +0800 mmc: dt-bindings: add support for MT7622 SoC Add the devicetree binding for MT7622 SoC Signed-off-by: Sean Wang Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/mtk-sd.txt | 1 + 1 file changed, 1 insertion(+) commit d56ee1ff30860b12d6a072676114abb9d63f03b9 Author: Adrian Hunter Date: Tue Feb 27 14:51:26 2018 +0200 mmc: sdhci-pci: Respect PM flags when enabling card detect GPIO IRQ wakeup Commit 03dbaa04a2e5 ("mmc: slot-gpio: Add support to enable irq wake on cd_irq") enabled wakeup at initialization. However, users also want to control it from sysfs power/wakeup attribute. That means the driver needs to check the PM flags before enabling it in the suspend callback. Add support for that in sdhci-pci, which is the only driver presently using the MMC_CAP_CD_WAKE flag, and remove the enabling in mmc_gpiod_request_cd_irq() Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/core/slot-gpio.c | 2 -- drivers/mmc/host/sdhci-pci-core.c | 23 +++++++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) commit 36f1d7e817a5540f6624ce1007339688bd443308 Author: Adrian Hunter Date: Tue Feb 27 14:51:25 2018 +0200 mmc: slot-gpio: Add a function to enable/disable card detect IRQ wakeup Commit 03dbaa04a2e5 ("mmc: slot-gpio: Add support to enable irq wake on cd_irq") enabled wakeup at initialization. However drivers may wish to enable and disable based on different criteria. Add a helper function mmc_gpio_set_cd_wake() to make it easy for drivers to do that. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 3 +-- drivers/mmc/core/slot-gpio.c | 21 +++++++++++++++++++++ include/linux/mmc/slot-gpio.h | 1 + 3 files changed, 23 insertions(+), 2 deletions(-) commit d5d568fad9a52ac4eba5d9a080a5cddb8498fa5e Author: Adrian Hunter Date: Tue Feb 27 14:51:24 2018 +0200 mmc: sdhci: Do not unnecessarily enable wakeup for SDIO card interrupt Do not enable wakeup for SDIO card interrupt unless the SDIO function driver has requested it which is indicated by mmc_card_wake_sdio_irq(). Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 9c316b38b7801e5dabfc41ab700a0caf743e38b4 Author: Adrian Hunter Date: Tue Feb 27 14:51:23 2018 +0200 mmc: sdhci: Do not unnecessarily enable wakeup for card detect interrupt Do not unnecessarily enable card detect wakeup in the cases that the card is not removable or a GPIO is used for card detect. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 7b7d57fd1b773d25d8358c6017592b4928bf76ce Author: Adrian Hunter Date: Wed Feb 14 15:57:44 2018 +0200 mmc: sdhci-pci: Get rid of glk_cqe_enable() Now that tuning no longer leaves the Buffer Read Enable bit set (refer intel_execute_tuning()), glk_cqe_enable() is no longer needed. Get rid of it. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) commit 129d21ce15af027696864b2798b41f4514f1c8c2 Author: Shawn Lin Date: Sun Feb 25 09:37:36 2018 +0800 mmc: ushc: Remove bogus check of usb_submit_urb Not sure why it was there in the first place, but it's obviously useless check, so let's remove it. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/ushc.c | 2 -- 1 file changed, 2 deletions(-) commit 4b514fa28760cc8f2b415fb0da72be79ccb5a5fd Author: Alexey Roslyakov Date: Fri Feb 23 02:45:25 2018 +0700 mmc: dw_mmc: update kernel-doc comments for dw_mci cur_slot and num_slots has been removed from struct dw_mci in 42f989c002f2. Unfortunately, inline documentation was not updated so far. Fix @lock field documentation in Locking section. Move @mrq field of struct dw_mci_slot mention closer to it description, so no one could miss this slightest detail. Couple of code style fixes as a bonus. Signed-off-by: Alexey Roslyakov Reviewed-by: Shawn Lin Acked-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit ec10ab572e4060f6ef586952196ef80f3b3b7f3b Author: Shawn Lin Date: Fri Feb 23 10:23:16 2018 +0800 mmc: dw_mmc: Remove prev_state and state assignment for STATE_SENDING_CMD Clang reports a compile warning: drivers/mmc/host/dw_mmc.c:2124:5: warning: Value stored to 'prev_state' is never read By checking the code, prev_state and state assignment for STATE_SENDING_CMD is indeed never used after jumping to unlock tag. So remove it. Signed-off-by: Shawn Lin Acked-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 1 - 1 file changed, 1 deletion(-) commit 64c1412b77d08df1bc4ddea1187eb8a76df1186c Author: Shawn Lin Date: Fri Feb 23 16:47:26 2018 +0800 mmc: dw_mmc: Convert to use DEFINE_SHOW_ATTRIBUTE Use the newly added macro to simply to the code. Signed-off-by: Shawn Lin Reviewed-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) commit 871cfe05f40b52ebb692c56eecd1d27b673d8a21 Author: Andy Shevchenko Date: Wed Feb 14 17:45:12 2018 +0200 mmc: core: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Signed-off-by: Andy Shevchenko Reviewed-by: Avri Altman Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/debugfs.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit c9b929edf4e1f96c550584fe8445755b6d600e71 Author: Masahiro Yamada Date: Thu Jan 18 01:28:16 2018 +0900 mmc: tmio: remove useless TMIO_MASK_CMD handling in tmio_mmc_host_probe() TMIO_MASK_CMD is properly enabled in tmio_mmc_start_command(). We have no reason to set it up in tmio_mmc_host_probe(). (If we really wanted to set it in the probe, we would have to do likewise when resuming.) Even worse, the following code is extremely confusing: _host->sdcard_irq_mask &= ~irq_mask; The logic is opposite between "->sdcard_irq_mask" and "irq_mask". The intention is not clear at a glance. Signed-off-by: Masahiro Yamada Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 3 --- 1 file changed, 3 deletions(-) commit 9b3ab55dbabd8bc8ac226a603f02ad39e6202521 Author: Masahiro Yamada Date: Thu Jan 18 01:28:15 2018 +0900 mmc: tmio: clear force_pio flag before starting data transfer Currently, force_pio is cleared when the driver exits. Then, it resulted in clearing it in multiple places since MMC drivers in general have multiple exit points. tmio_mmc_reset_work - bails out on timeout tmio_process_mrq - error out when it cannot send a command tmio_mmc_finish_request - successful exit This is error-prone since we may miss to cover all bail-out points. To simplify the code, the data structure should be initialized just before used since we have a single entrance. force_pio is only used for data transfer, so tmio_mmc_start_data() will be a suitable place to clear this flag. Signed-off-by: Masahiro Yamada Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b12a7a28f860c3ab078ae306e13a659ec70b3c33 Author: Masahiro Yamada Date: Thu Jan 18 01:28:14 2018 +0900 mmc: tmio: move TMIO_MASK_{READOP, WRITEOP} handling to correct place As far as I tested the IP on UniPhier SoCs, TMIO_STAT_{RXRDY,TXRQ} are asserted for DMA mode as well as for PIO. I need to disable the those IRQs in dma_ops->start hook, otherwise the DMA transfer fails with the following error message: PIO IRQ in DMA mode! Renesas chips are the same cases since I see their dma_ops->start hooks explicitly clear TMIO_STAT_{RXRDY,TXRQ} (with nice comment!). If we do this sanity check in TMIO MMC core, RXRDY/TXRQ handling should be entirely moved to the core. tmio_mmc_cmd_irq() will be a suitable place to disable them. The probe function sets TMIO_MASK_{READOP,WRITEOP} but this is odd. /* Unmask the IRQs we want to know about */ if (!_host->chan_rx) irq_mask |= TMIO_MASK_READOP; if (!_host->chan_tx) irq_mask |= TMIO_MASK_WRITEOP; At this point, _host->{chan_rx,chan_tx} are _always_ NULL because tmio_mmc_request_dma() is called after this code. Consequently, TMIO_MASK_{READOP,WRITEOP} are set here whether DMA is used or not. Remove this pointless code. Signed-off-by: Masahiro Yamada Signed-off-by: Ulf Hansson Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang drivers/mmc/host/renesas_sdhi_internal_dmac.c | 6 ------ drivers/mmc/host/renesas_sdhi_sys_dmac.c | 4 ---- drivers/mmc/host/tmio_mmc_core.c | 20 ++++++++++---------- 3 files changed, 10 insertions(+), 20 deletions(-) commit c7cd630a9751b9ec8bba37edbba06a29e7d9a14b Author: Masahiro Yamada Date: Thu Jan 18 01:28:13 2018 +0900 mmc: tmio: fix never-detected card insertion bug The TMIO mmc cannot detect the card insertion in native_hotplug mode if the driver is probed without a card inserted. The reason is obvious; all IRQs are disabled by tmio_mmc_host_probe(), as follows: tmio_mmc_disable_mmc_irqs(_host, TMIO_MASK_ALL); The card event IRQs are first enabled by tmio_mmc_start_command() as follows: if (!host->native_hotplug) irq_mask &= ~(TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT); tmio_mmc_enable_mmc_irqs(host, irq_mask); If the driver is probed without a card, tmio_mmc_start_command() is never called in the first place. So, the card is never detected. The card event IRQs must be enabled in probe/resume functions. Signed-off-by: Masahiro Yamada Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson Tested-by: Wolfram Sang drivers/mmc/host/tmio_mmc_core.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 497d1f965c207f1d670066e9c87a2ffad1ce4e5e Author: Masahiro Yamada Date: Thu Jan 18 01:28:12 2018 +0900 mmc: tmio: support IP-builtin card detection logic A card detect GPIO is set up only for platforms with "cd-gpios" DT property or TMIO_MMC_USE_GPIO_CD flag. However, the driver core always uses mmc_gpio_get_cd, which just fails with -ENOSYS if ctx->cd_gpio is unset. The bit 5 of the status register provides the current signal level of the CD line. Allow to use it if the GPIO is unused. Signed-off-by: Masahiro Yamada Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson Tested-by: Wolfram Sang drivers/mmc/host/tmio_mmc_core.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit bda4d21b6e5d423e3f21a6c49d3d5283592e3b65 Author: Markus Elfring Date: Thu Feb 15 16:40:38 2018 +0100 ARM: cpuidle: Drop memory allocation error message from arm_idle_init_cpu() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle-arm.c | 1 - 1 file changed, 1 deletion(-) commit 1179c2aeb4c3dbf85693ed2b3d9d3dfecab972b8 Merge: 0f55551 5c8b262 0373ca7 Author: Rafael J. Wysocki Date: Mon Mar 5 12:37:06 2018 +0100 Merge cpufreq fixes from v4.16-rc4. commit 3e081628d510b2ddbe493371d9c574d9275da17e Author: Yoshihiro Shimoda Date: Fri Feb 2 19:05:15 2018 +0900 dmaengine: rcar-dmac: Check the done lists in rcar_dmac_chan_get_residue() This patch fixes an issue that a race condition happens between a client driver and the rcar-dmac driver: - The rcar_dmac_isr_transfer_end() is called. - The done list appears, and desc.running is the next active list. - rcar_dmac_chan_get_residue() is called by a client driver before rcar_dmac_isr_channel_thread() is called. - The rcar_dmac_chan_get_residue() will not find any descriptors. - And, the following WARNING happens: WARN(1, "No descriptor for cookie!"); The sh-sci driver with HSCIF (921,600bps) on R-Car H3 can cause this situation. So, this patch checks the done lists in rcar_dmac_chan_get_residue() and returns zero if the done lists has the argument cookie. Tested-by: Nguyen Viet Dung Signed-off-by: Yoshihiro Shimoda Signed-off-by: Vinod Koul drivers/dma/sh/rcar-dmac.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3d2011cfa41faf4981f72b050f0891c528c09f52 Author: Mahesh Kumar Date: Tue Feb 6 11:38:55 2018 +0530 drm/i915/icl: remove port A/E lane sharing limitation. Platforms before Gen11 were sharing lanes between port-A & port-E. This limitation is no more there. Changes since V1: - optimize the code (Shashank/Jani) - create helper function to get max lanes (ville) Changes since V2: - Include BIOS fail fix-up in same helper function (ville) Changes since V3: - remove confusing if/else (jani) - group intel_encoder initialization Signed-off-by: Mahesh Kumar Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180206060855.30026-1-mahesh1.kumar@intel.com drivers/gpu/drm/i915/intel_ddi.c | 85 ++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 46 deletions(-) commit c490b28f36ac225799df3f36eca03b4801bd0eec Author: Takeshi Kihara Date: Tue Feb 27 17:08:02 2018 +0900 pinctrl: sh-pfc: r8a77965: Add USB3.0 host pins, groups and functions This patch adds USB30 (USB3.0 host) pin, group and function to the R8A77965 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Shimoda Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 0d75f8dae3e1a086f72a887b2053dfd0de70c9cd Author: Takeshi Kihara Date: Tue Feb 27 17:08:01 2018 +0900 pinctrl: sh-pfc: r8a77965: Add USB2.0 host pins, groups and functions This patch adds USB{0,1} (USB2.0 host) pins, groups and functions to the R8A77965 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Shimoda Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 1f267a572b573b0b155022750cba93001f4367a8 Author: Joonas Lahtinen Date: Mon Mar 5 11:56:15 2018 +0200 drm/i915: Update DRIVER_DATE to 20180305 Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5fcdc9d9816266c575ef21586327ba04d7db5c2c Author: Maarten Lankhorst Date: Wed Feb 21 16:23:31 2018 +0100 drm/atomic: Call ww_acquire_done after drm_modeset_lock_all After we acquired all generic modeset locks in drm_modeset_lock_all, it's unsafe acquire any other so just mark acquisition as done. Atomic drivers shouldn't use drm_modeset_lock_all. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180221152331.9212-1-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter Acked-by: Harry Wentland drivers/gpu/drm/drm_modeset_lock.c | 1 + 1 file changed, 1 insertion(+) commit 2092e3adc323695255bd06d65f14c89afb5727ae Author: Benjamin Gaignard Date: Tue Feb 27 15:36:00 2018 +0100 ARM: stm32: restore reboot capabilities To be able to reboot the platform we need to use armv7m_restart for STM32 SoCs using ARMv7 cores. Fixes: e0644101bd2f ("ARM: mach-stm32: prepare stm32 family to welcome armv7 architecture) Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue arch/arm/mach-stm32/board-dt.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 788778b0d21a6d5cd5bc6c880591119e17932327 Author: Masahiro Yamada Date: Thu Jan 18 01:28:11 2018 +0900 mmc: tmio: deprecate "toshiba, mmc-wrprotect-disable" DT property This property is equivalent to "disable-wp" defined in Documentation/devicetree/bindings/mmc/mmc.txt The TMIO MMC core calls mmc_of_parse(), and it sets MMC_CAP2_NO_WRITE_PROTECT if "disable-wp" property is present. We do not need a vendor-specific property to do the same thing. Let's remove the description from the dt-binding to prevent new boards from using it. I am keeping the driver code for existing DT files, but added comments that this is deprecated. Signed-off-by: Masahiro Yamada Acked-by: Rob Herring Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson Tested-by: Wolfram Sang Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 1 - drivers/mmc/host/tmio_mmc_core.c | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 218f6024abec04ec78e56b6761f70d404bab8637 Author: Masahiro Yamada Date: Thu Jan 18 01:28:10 2018 +0900 mmc: tmio: remove TMIO_MMC_WRPROTECT_DISABLE The use of this flag has been replaced with MMC_CAP2_NO_WRITE_PROTECT. No platform defines this flag any more. Remove. Signed-off-by: Masahiro Yamada Acked-by: Lee Jones Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson Tested-by: Wolfram Sang drivers/mmc/host/tmio_mmc_core.c | 5 ++--- include/linux/mfd/tmio.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) commit 7c53b79766a463a97dd013715a1cc8a2802f6448 Author: Masahiro Yamada Date: Thu Jan 18 01:28:09 2018 +0900 mmc: tmio: use MMC_CAP2_NO_WRITE_PROTECT instead of TMIO own flag TMIO_MMC_WRPROTECT_DISABLE is equivalent to MMC_CAP2_NO_WRITE_PROTECT. Only the difference is the TMIO_... makes tmio_mmc_get_ro() return 0 (i.e. it does not affect mmc_gpio_get_ro() at all), while MMC_CAP2_... returns 0 before calling ->get_ro() hook (i.e. it affects both IP own logic and GPIO detection). The TMIO MMC drivers do not set-up gpio_ro by themselves. Only the possibility, if any, would be DT specifies "wp-gpios" property, and gpio_ro is set by mmc_gpiod_request_ro() called from mmc_of_parse(). However, it does not make sense to specify "wp-gpios" property and "toshiba,mmc-wrprotect-disable" at the same time. I checked under arch/arm/boot/dts/ and arch/arm64/boot/dts/renesas/, and I did not see any Renesas boards with "wp-gpios". So, this conversion should be safe. Signed-off-by: Masahiro Yamada Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson Tested-by: Wolfram Sang drivers/mmc/host/tmio_mmc_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3ca1507b5b3bba2a7d610659fb93c666282f83e5 Author: Masahiro Yamada Date: Thu Jan 18 01:28:08 2018 +0900 sh: kfr2r09: use MMC_CAP2_NO_WRITE_PROTECT instead of TMIO own flag TMIO_MMC_WRPROTECT_DISABLE is equivalent to MMC_CAP2_NO_WRITE_PROTECT. The flag is propagated as follows: tmio_mmc_data::capabilities2 -> mmc_host::caps2 Only the difference is the TMIO_... makes tmio_mmc_get_ro() return 0 (i.e. it does not affect mmc_gpio_get_ro() at all), while MMC_CAP2_... returns 0 before calling ->get_ro() hook (i.e. it affects both IP own logic and GPIO detection). The TMIO MMC drivers do not set-up gpio_ro by themselves, so gpio_ro is obviously unused by legacy boards like this. So, this conversion should be safe. Signed-off-by: Masahiro Yamada Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson Tested-by: Wolfram Sang arch/sh/boards/mach-kfr2r09/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abdd50e96de86b433fbed0ea2fa3a7b0eb004c59 Author: Patrice Chotard Date: Thu Jan 18 15:34:00 2018 +0100 ARM: stm32: Add AMBA support for STM32F4 and STM32F7 SoCs As both STM32F4 and STM32F7 SoCs embeds an AMBA PL180 mmci IP, we need to enable AMBA support in mach-stm32. Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue arch/arm/mach-stm32/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit f7dcb04475b24e8c655aa8f285450ada17c16ebf Author: Ludovic Barre Date: Tue Jan 16 15:56:00 2018 +0100 ARM: stm32: add initial support for STM32MP157 This patch adds initial support of STM32MP157 microprocessor (MPU) based on Arm Cortex-A7. New Cortex-A infrastructure (gic, timer,...) are selected if ARCH_MULTI_V7 is defined. Signed-off-by: Ludovic Barre Signed-off-by: Alexandre Torgue Documentation/arm/stm32/stm32mp157-overview.rst | 19 +++++++++++++++++++ arch/arm/mach-stm32/Kconfig | 11 +++++++++++ arch/arm/mach-stm32/board-dt.c | 1 + 3 files changed, 31 insertions(+) commit 3ed71f8ad98a07803299693481b03fa6391e094f Author: Ludovic Barre Date: Tue Feb 27 09:05:18 2018 +0100 ARM: stm32: prepare stm32 family to welcome armv7 architecture This patch prepares the STM32 machine for the integration of Cortex-A based microprocessor (MPU), on top of the existing Cortex-M microcontroller family (MCU). Since both MCUs and MPUs are sharing common hardware blocks we can keep using ARCH_STM32 flag for most of them. If a hardware block is specific to one family we can use either ARM_SINGLE_ARMV7M or ARCH_MULTI_V7 flag. Signed-off-by: Ludovic Barre Signed-off-by: Alexandre Torgue Documentation/arm/stm32/overview.rst | 15 +++++++++------ arch/arm/mach-stm32/Kconfig | 28 +++++++++++++++------------- arch/arm/mach-stm32/board-dt.c | 2 -- 3 files changed, 24 insertions(+), 21 deletions(-) commit 40fed8d0e3833200f4b9f7cd057e37d0450a5044 Author: Ludovic Barre Date: Mon Feb 26 14:39:52 2018 +0100 Documentation: arm: stm32: move to rst format This patch rewrites stm32 documentation to rst (ReStructuredText) format. Signed-off-by: Ludovic Barre Signed-off-by: Alexandre Torgue Documentation/arm/stm32/overview.rst | 31 ++++++++++++++++++++++ Documentation/arm/stm32/overview.txt | 33 ----------------------- Documentation/arm/stm32/stm32f429-overview.rst | 26 +++++++++++++++++++ Documentation/arm/stm32/stm32f429-overview.txt | 22 ---------------- Documentation/arm/stm32/stm32f746-overview.rst | 33 +++++++++++++++++++++++ Documentation/arm/stm32/stm32f746-overview.txt | 34 ------------------------ Documentation/arm/stm32/stm32f769-overview.rst | 35 +++++++++++++++++++++++++ Documentation/arm/stm32/stm32f769-overview.txt | 36 -------------------------- Documentation/arm/stm32/stm32h743-overview.rst | 34 ++++++++++++++++++++++++ Documentation/arm/stm32/stm32h743-overview.txt | 30 --------------------- 10 files changed, 159 insertions(+), 155 deletions(-) commit 61ea291cff9e8cc4b35d84c73b2659b628d4ff9b Author: Benjamin Gaignard Date: Thu Nov 30 09:49:00 2017 +0100 ARM: stm32: Fix copyright Uniformize STMicroelectronics copyrights header Add SPDX identifier Signed-off-by: Benjamin Gaignard CC: Maxime Coquelin Acked-by: Maxime Coquelin Signed-off-by: Alexandre Torgue arch/arm/mach-stm32/board-dt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 85beb77f87f750b3b363ddc427708338522f3909 Author: Alexandre Torgue Date: Mon Dec 11 09:54:00 2017 +0100 ARM: stm32: add new STM32F769 MCU Add new st,stm32f769 compatible machine name for STM32F769 MCU and update documentation. Signed-off-by: Alexandre Torgue Documentation/arm/stm32/stm32f769-overview.txt | 36 ++++++++++++++++++++++++++ arch/arm/mach-stm32/board-dt.c | 1 + 2 files changed, 37 insertions(+) commit 550987be94aa41fe973b709b904f12545aa99635 Author: Alexandre Torgue Date: Mon Dec 11 09:54:00 2017 +0100 ARM: stm32: Kconfig: introduce MACH_STM32F769 flag This patch introduces the MACH_STM32F769 to make possible to only select STM32F769 pinctrl driver. By default, all the MACH_STM32Fxxx flags will be set with STM32 defconfig. Signed-off-by: Alexandre Torgue arch/arm/mach-stm32/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) commit 2ad1db059b9a4874b05bac49dba22c8b8e68afd4 Author: Masahiro Yamada Date: Thu Jan 18 01:28:07 2018 +0900 mmc: renesas_sdhi: use MMC_CAP2_NO_WRITE_PROTECT instead of TMIO own flag TMIO_MMC_WRPROTECT_DISABLE is equivalent to MMC_CAP2_NO_WRITE_PROTECT. The flag is propagated as follows: renesas_sdhi_of_data::capabilities2 -> tmio_mmc_data::capabilities2 -> mmc_host::caps2 Only the difference is the TMIO_... makes tmio_mmc_get_ro() return 0 (i.e. it does not affect mmc_gpio_get_ro() at all), while MMC_CAP2_... returns 0 before calling ->get_ro() hook (i.e. it affects both IP own logic and GPIO detection). The TMIO MMC drivers do not set-up gpio_ro by themselves. Only the possibility, if any, would be DT specifies "wp-gpios" property, and gpio_ro is set by mmc_gpiod_request_ro() called from mmc_of_parse(). However, it does not make sense to specify "wp-gpios" property and TMIO_MMC_WRPROTECT_DISABLE at the same time. I checked under arch/arm/boot/dts/ and arch/arm64/boot/dts/renesas/, and I did not see any Renesas boards with "wp-gpios". So, this conversion should be safe. Signed-off-by: Masahiro Yamada Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson Tested-by: Wolfram Sang drivers/mmc/host/renesas_sdhi_internal_dmac.c | 6 +++--- drivers/mmc/host/renesas_sdhi_sys_dmac.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) commit 193ca00b820c9d95955ba36e3882f4a060e2559e Author: Patrice Chotard Date: Thu Mar 1 11:53:00 2018 +0100 ARM: dts: stm32: Fix sdio2 rcc hard coded value Replace sdio2 rcc hard coded clock value by its macro. Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f746.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f932423c6f0041211509d519db8825a300ae36cf Author: Patrice Chotard Date: Thu Mar 1 11:53:00 2018 +0100 dt-bindings: mfd: Add STM32F7 SDMMC2 rcc entry STM32F769 SoC provides 2 SDMMC instances, add missing RCC SDMMC2 entry for it. Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue include/dt-bindings/mfd/stm32f7-rcc.h | 1 + 1 file changed, 1 insertion(+) commit cc6adf89f9a057653fc03f4c0ba001b7db0261e9 Author: Patrice Chotard Date: Thu Mar 1 11:53:00 2018 +0100 ARM: dts: stm32: Enable sdio1 for stm32f769-disco Adds SDIO related DT nodes for stm32f769-disco board. broken-cd property is needed as it misses a pullup on board (resistor R76 is missing). Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f769-disco.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 70093fe230a563fa67a69109de18b3e6f53a092d Author: Patrice Chotard Date: Thu Mar 1 11:53:00 2018 +0100 ARM: dts: stm32: Enable sdio1 for stm32f746-eval Adds SDIO related DT nodes for stm32f746-eval board. broken-cd property is needed as card detect signal is connected to a GPIO expander which is not yet supported in kernel linux. Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32746g-eval.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 91f2c5e8df035ff89fe77fbe0a7d57fac36a1e22 Author: Patrice Chotard Date: Thu Mar 1 11:53:00 2018 +0100 ARM: dts: stm32: Enable sdio1 for stm32f746-disco Adds SDIO related DT nodes for stm32f746-disco board. Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f746-disco.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 46ea3e80e1e841b822c7e38ec984f8284a69d5ea Author: Patrice Chotard Date: Thu Mar 1 11:53:00 2018 +0100 ARM: dts: stm32: Add sdio pins definition for stm32f7 Add sdio pins definition for the 2 sdio instances embeds in stm32f746. Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f7-pinctrl.dtsi | 62 ++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 7f7a385d0a7c5091a85de5b78d550f27b81dfc37 Author: Stefan Wahren Date: Mon Feb 12 21:02:44 2018 +0100 mmc: sdhci-iproc: Disable preset values for BCM2835 According to the BCM2835 datasheet there are no preset value registers. This wasn't an issue before, because we didn't propagate 1.8V support. Signed-off-by: Stefan Wahren Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-iproc.c | 1 + 1 file changed, 1 insertion(+) commit b305882fbc878f10ad089348da147987c330a2ee Author: Sergio Valverde Date: Thu Feb 8 11:41:43 2018 -0600 mmc: core: optimize mmc_calc_max_discard If the max_discard value is zero, the conditional branch that checks the trim capabilities will never update this value with max_trim. Change the condition statement to also check the max_discard value in order to avoid an unnecessary call to mmc_do_calc_max_discard. Signed-off-by: Sergio Valverde Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a871bf081dd7915ed7b9942a5484ff0c742e2cc Author: Wolfram Sang Date: Mon Feb 5 14:28:22 2018 +0100 mmc: sh_mmcif: remove some cruft The TODO section from 2010 is obsolete. We have DMA and PM meanwhile and we always want to handle errors better, if possible. Also DRIVER_VERSION is not used anymore these days. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson drivers/mmc/host/sh_mmcif.c | 8 -------- 1 file changed, 8 deletions(-) commit e0b2dbcfaacd1c1662fd3facdd75805a95505054 Author: Kishon Vijay Abraham I Date: Mon Feb 5 18:20:20 2018 +0530 mmc: sdhci_omap: Fix sdhci-omap quirks Add SDHCI_QUIRK2_PRESET_VALUE_BROKEN quirk as setting preset values loads incorrect CLKD values (for UHS modes). Remove SDHCI_QUIRK2_NO_1_8_V quirk as sdhci-omap now supports UHS modes. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-omap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d20b2eae6c47b09552364afa20511aa43f2367c Author: Kishon Vijay Abraham I Date: Mon Feb 5 18:20:19 2018 +0530 mmc: sdhci_omap: Add support to set IODELAY values The data manual of J6/J6 Eco recommends to set different IODELAY values depending on the mode in which the MMC/SD is enumerated in order to ensure IO timings are met. Add support to set the IODELAY values depending on the various MMC modes using the pinctrl APIs. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-omap.c | 148 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) commit 7d33c3581536b8193b9788a63a68e7bfc22cdc31 Author: Kishon Vijay Abraham I Date: Mon Feb 5 18:20:18 2018 +0530 mmc: sdhci-omap: Workaround for Errata i802 Errata i802 in AM572x Sitara Processors Silicon Revision 2.0, 1.1 (SPRZ429K July 2014–Revised March 2017 [1]) mentions DCRC error interrupts (MMCHS_STAT[21] DCRC=0x1) can occur during the tuning procedure and it has to be disabled during the tuning procedure Implement workaround for Errata i802 here.. [1] -> http://www.ti.com/lit/er/sprz429k/sprz429k.pdf Signed-off-by: Kishon Vijay Abraham I Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-omap.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 9fc2cd76125cab476ec6fd86fac7f9a780e34dcf Author: Kishon Vijay Abraham I Date: Mon Feb 5 18:20:17 2018 +0530 mmc: sdhci-omap: Add tuning support MMC tuning procedure is required to support SD card UHS1-SDR104 mode and EMMC HS200 mode. SDR104/HS200 DLL Tuning Procedure for AM572x platform is mentioned in Figure 25-51. SDR104/HS200 DLL Tuning Procedure of AM572x Sitara Processors Silicon Revision 2.0, 1.1 TRM (SPRUHZ6I - October 2014–Revised April 2017 [1]). The tuning function sdhci_omap_execute_tuning() will only be called by the MMC/SD core if the corresponding speed modes are supported by the OMAP silicon which is set in the mmc host "caps" field. [1] -> http://www.ti.com/lit/ug/spruhz6i/spruhz6i.pdf Signed-off-by: Kishon Vijay Abraham I Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-omap.c | 130 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) commit 27ceb7e0b0ae08cada8e790a84cfd912c1002783 Author: Kishon Vijay Abraham I Date: Mon Feb 5 18:20:16 2018 +0530 mmc: sdhci-omap: Add custom set_uhs_signaling sdhci_host ops UHS-1 DDR50 and MMC DDR52 mode require DDR bit to be set in the configuration register (MMCHS_CON). Add sdhci-omap specific set_uhs_signaling ops to set this bit. Also while setting the UHSMS bit, clock should be disabled. Signed-off-by: Kishon Vijay Abraham I Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-omap.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 20ea26a1e3a513dadafcd35531c6d289820f60cb Author: Kishon Vijay Abraham I Date: Mon Feb 5 18:20:15 2018 +0530 mmc: sdhci-omap: Add card_busy host ops Add card_busy host ops in sdhci_omap to check card busy status. The voltage switching sequence for AM572x platform is mentioned in Figure 25-48. eMMC/SD/SDIO Power Switching Procedure of AM572x Sitara Processors Silicon Revision 2.0, 1.1 TRM (SPRUHZ6I - October 2014–Revised April 2017 [1]). In the voltage switching sequence, CLKEXTFREE bit in MMCHS_CON should also be set after switching to 1.8v which is also taken care in the card_busy ops. [1] -> http://www.ti.com/lit/ug/spruhz6i/spruhz6i.pdf Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-omap.c | 52 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 300df508c806c0b0446f075bc7658f0fefa1b701 Author: Kishon Vijay Abraham I Date: Mon Feb 5 18:20:14 2018 +0530 mmc: sdhci-omap: Update 'power_mode' outside sdhci_omap_init_74_clocks Updating 'power_mode' in sdhci_omap_init_74_clocks results in 'power_mode' never updated to MMC_POWER_OFF during card removal. This results in initialization sequence not sent to the card during re-insertion. Fix it here by adding sdhci_omap_set_power_mode to update power_mode. This function can also be used later to perform operations that are specific to a power mode (e.g, disable tuning during power off). Signed-off-by: Kishon Vijay Abraham I Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-omap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 1fe23843d5d6e412a88dc277d608aef65b30f344 Author: Amelie Delaunay Date: Wed Feb 28 11:36:00 2018 +0100 ARM: dts: stm32: add SPI support on STM32H743 SoC This patch adds all SPI instances of the STM32H743 SoC. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32h743.dtsi | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit a20d1390c1daac4b8ae1e544e1e49dfd386125a8 Author: Geert Uytterhoeven Date: Fri Mar 2 13:27:46 2018 +0100 ARM: shmobile: defconfig: Disable CONFIG_EMBEDDED CONFIG_EXPERT exposes too many config options that do not matter for development. E.g. it prohibits using the default values for the various SH_SCI options. However, CONFIG_EMBEDDED selects CONFIG_EXPERT, so it cannot be disabled. Hence disable CONFIG_EMBEDDED, and compensate for the loss of CONFIG_DEBUG_KERNEL by enabling the latter. Actual impact, all harmless: - CONFIG_NAMESPACES=y (plus a few related CONFIG_*_NS options), - CONFIG_SYSCTL_SYSCALL=n, - CONFIG_SERIAL_SH_SCI_NR_UARTS changed from 20 to 18, - Some HID support became enabled, - CONFIG_DEBUG_MEMORY_INIT=y, Refresh the result. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/configs/shmobile_defconfig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit c7b6b600a23473748d5e82e814c6ebbbcf37b006 Author: Geert Uytterhoeven Date: Fri Mar 2 13:27:45 2018 +0100 ARM: shmobile: defconfig: Refresh - CONFIG_AEABI is enabled since commit 494609701e06a004 ("ARM: always enable AEABI for ARMv6+"), - CONFIG_SERIAL_SH_SCI_CONSOLE is enabled since commit c5bb576d5e21e91a ("tty: serial: sh-sci: Hide serial console config question"), - CONFIG_SERIAL_SH_SCI_DMA is enabled since commit be7e251d20e6c800 ("tty: serial: sh-sci: Hide DMA config question"). Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/configs/shmobile_defconfig | 3 --- 1 file changed, 3 deletions(-) commit db1de9dd83341382f00ed1872d82b266e9137657 Author: Yoshihiro Shimoda Date: Tue Feb 27 14:54:56 2018 +0900 dmaengine: usb-dmac: add binding for r8a77965 This patch adds binding for r8a77965 (R-Car M3-N). Signed-off-by: Yoshihiro Shimoda Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/renesas,usb-dmac.txt | 1 + 1 file changed, 1 insertion(+) commit ca435f88c102e051207a95d769a1b37cc471d875 Merge: 3518e40 a163dc2 Author: David S. Miller Date: Sun Mar 4 18:45:39 2018 -0500 Merge tag 'batadv-next-for-davem-20180302' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - bump copyright years, by Sven Eckelmann - fix macro indendation for checkpatch, by Sven Eckelmann - fix comparison operator for bool returning functions, by Sven Eckelmann - assume 2-byte packet alignments for all packet types, by Matthias Schiffer ==================== Signed-off-by: David S. Miller commit 3518e40b3cd8ebce52edaad417ecd1d560f15f1b Author: Paolo Abeni Date: Fri Mar 2 16:03:32 2018 +0100 ipvlan: forbid vlan devices on top of ipvlan Currently we allow the creation of 8021q devices on top of ipvlan, but such devices are nonfunctional, as the underlying ipvlan rx_hanlder hook can't match the relevant traffic. Be explicit and forbid the creation of such nonfunctional devices. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51568d69407d939e898a150b13cf48d226f53303 Author: Jason Wang Date: Fri Mar 2 17:29:14 2018 +0800 virtio-net: re enable XDP_REDIRECT for mergeable buffer XDP_REDIRECT support for mergeable buffer was removed since commit 7324f5399b06 ("virtio_net: disable XDP_REDIRECT in receive_mergeable() case"). This is because we don't reserve enough tailroom for struct skb_shared_info which breaks XDP assumption. So this patch fixes this by reserving enough tailroom and using fixed size of rx buffer. Signed-off-by: Jason Wang Acked-by: Jesper Dangaard Brouer Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/virtio_net.c | 54 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 12 deletions(-) commit 053533fc7577ddbe14b2a7c4a8fc70ce3fbb3547 Author: Prashant Bhole Date: Fri Mar 2 11:22:20 2018 +0900 selftests: rtnetlink: remove testns on test fail This patch removes testns after test failure so that next test can continue with clean ns Signed-off-by: Prashant Bhole Acked-by: William Tu Signed-off-by: David S. Miller tools/testing/selftests/net/rtnetlink.sh | 6 ++++++ 1 file changed, 6 insertions(+) commit faa083bbe3223f49785a75ea22021dbb81bdbfd8 Merge: a56cd50 5f280b6 Author: David S. Miller Date: Sun Mar 4 18:35:02 2018 -0500 Merge branch 'gre-seq-collect_md' William Tu says: ==================== gre: add sequence number for collect md mode. Currently GRE sequence number can only be used in native tunnel mode. The first patch adds sequence number support for gre collect metadata mode, and the second patch tests it using BPF. RFC2890 defines GRE sequence number to be specific to the traffic flow identified by the key. However, this patch does not implement per-key seqno. The sequence number is shared in the same tunnel device. That is, different tunnel keys using the same collect_md tunnel share single sequence number. A new BFP uapi tunnel flag 'BPF_F_SEQ_NUMBER' is added. -- v1->v2: rename BPF_F_GRE_SEQ to BPF_F_SEQ_NUMBER suggested by Daniel ==================== Signed-off-by: David S. Miller commit 5f280b60d26fe6379a8179d70d932ec73b77411b Author: William Tu Date: Thu Mar 1 13:49:58 2018 -0800 samples/bpf: add gre sequence number test. The patch adds tests for GRE sequence number support for metadata mode tunnel. Signed-off-by: William Tu Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/tcbpf2_kern.c | 6 ++++-- samples/bpf/test_tunnel_bpf.sh | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) commit 77a5196a804e34ce5e215ef84d5e1de332e9c529 Author: William Tu Date: Thu Mar 1 13:49:57 2018 -0800 gre: add sequence number for collect md mode. Currently GRE sequence number can only be used in native tunnel mode. This patch adds sequence number support for gre collect metadata mode. RFC2890 defines GRE sequence number to be specific to the traffic flow identified by the key. However, this patch does not implement per-key seqno. The sequence number is shared in the same tunnel device. That is, different tunnel keys using the same collect_md tunnel share single sequence number. Signed-off-by: William Tu Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 1 + net/core/filter.c | 4 +++- net/ipv4/ip_gre.c | 7 +++++-- net/ipv6/ip6_gre.c | 13 ++++++++----- 4 files changed, 17 insertions(+), 8 deletions(-) commit a56cd508e7134e25ebe09e82bfddc0875f093e5d Merge: 129fbee 5de0c02 Author: David S. Miller Date: Sun Mar 4 18:19:26 2018 -0500 Merge branch 'enic-update' Govindarajulu Varadarajan says: ==================== enic update This series adds support for IPv6 vxlan offload and UDP rss along with a bug fix in filling the rq ring. ==================== Signed-off-by: David S. Miller commit 5de0c022f1b0bce073cb04dd69ed7982805e5763 Author: Govindarajulu Varadarajan Date: Thu Mar 1 11:07:24 2018 -0800 enic: set IG desc cache flag in open New adapter needs CMD_OPENF_IG_DESCCACHE flag to be set. If this flag is not set, fw flushes the global IG desc cache. This flag is nop in older adapter. Also increment driver version Signed-off-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic.h | 2 +- drivers/net/ethernet/cisco/enic/enic_main.c | 3 ++- drivers/net/ethernet/cisco/enic/vnic_devcmd.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) commit e8588e268509292550634d9a35f2723a207683b2 Author: Govindarajulu Varadarajan Date: Thu Mar 1 11:07:23 2018 -0800 enic: enable rq before updating rq descriptors rq should be enabled before posting the buffers to rq desc. If not hw sees stale value and casuses DMAR errors. Signed-off-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic_main.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 48398b6e7065691011b09f34d6c31d74013090b6 Author: Govindarajulu Varadarajan Date: Thu Mar 1 11:07:22 2018 -0800 enic: set UDP rss flag New hardware needs UDP flag set to enable UDP L4 rss hash. Add ethtool get option to display supported rss flow hash. Signed-off-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic_ethtool.c | 36 ++++++++++++++++++++++++++ drivers/net/ethernet/cisco/enic/enic_main.c | 4 ++- drivers/net/ethernet/cisco/enic/vnic_dev.c | 17 ++++++++++++ drivers/net/ethernet/cisco/enic/vnic_dev.h | 1 + drivers/net/ethernet/cisco/enic/vnic_nic.h | 1 + 5 files changed, 58 insertions(+), 1 deletion(-) commit 7e24c64253ed134a3c699cceda6963ac1fa6f4c8 Author: Govindarajulu Varadarajan Date: Thu Mar 1 11:07:21 2018 -0800 enic: Check if hw supports multi wq with vxlan offload Some adaptors do not support vxlan offload when multi wq is configured. If hw supports multi wq, BIT(2) is set in a1. Signed-off-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic_main.c | 5 +++++ drivers/net/ethernet/cisco/enic/vnic_devcmd.h | 1 + 2 files changed, 6 insertions(+) commit d11790941dd315e2c82bce7c228807329dcf0be4 Author: Govindarajulu Varadarajan Date: Thu Mar 1 11:07:20 2018 -0800 enic: Add vxlan offload support for IPv6 pkts New adaptors supports vxlan offload for inner IPv6 and outer IPv6 vxlan pkts. Fw sets BIT(0) & BIT(1) in a1 if hw supports ipv6 inner & outer pkt offload. Signed-off-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic.h | 1 + drivers/net/ethernet/cisco/enic/enic_main.c | 44 +++++++++++++++++++++------ drivers/net/ethernet/cisco/enic/vnic_dev.c | 5 ++- drivers/net/ethernet/cisco/enic/vnic_dev.h | 2 +- drivers/net/ethernet/cisco/enic/vnic_devcmd.h | 3 ++ 5 files changed, 42 insertions(+), 13 deletions(-) commit 4a464a2b06cebf7ba5b387fcdadf790cdeb36ac9 Author: Govindarajulu Varadarajan Date: Thu Mar 1 11:07:19 2018 -0800 enic: Check inner ip proto for pseudo header csum To compute pseudo IP header csum, we need to check the inner header for encap pkt, not outer IP header. Also add pseudo csum for IPv6 inner pkt. Signed-off-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic_main.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 129fbeecbccdeaa4f89aaea5d1698aae44ae4b4b Author: Colin Ian King Date: Thu Mar 1 16:42:40 2018 +0000 net: amd8111e: remove redundant assignment to 'tx_index' The variable tx_index is being initialized with a value that is never read and re-assigned a little later, hence the initialization is redundant and can be removed. Cleans up clang warning: drivers/net/ethernet/amd/amd8111e.c:652:6: warning: Value stored to 'tx_index' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/amd/amd8111e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93a00d4d613fb6363c618c941b0283c2df6bd64e Author: Andy Shevchenko Date: Thu Mar 1 13:27:35 2018 +0200 r8169: switch to device-managed functions in probe (part 2) This is a follow up to the commit 4c45d24a759d ("r8169: switch to device-managed functions in probe") to move towards managed resources even more. Cc: Heiner Kallweit Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 1ef7286e7f36020e655ebeb82386911b617c5aee Author: Andy Shevchenko Date: Thu Mar 1 13:27:34 2018 +0200 r8169: Dereference MMIO address immediately before use There is no need to dereference struct rtl8169_private to get mmio_addr in almost every function in the driver. Replace it by using pointer to struct rtl8169_private directly. No functional change intended. Next step might be a conversion of RTL_Wxx() / RTL_Rxx() macros to inline functions for sake of type checking. Cc: Heiner Kallweit Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 865 ++++++++++++++--------------------- 1 file changed, 335 insertions(+), 530 deletions(-) commit cc1122b00d624ef551b6ff92e57240cbffb7d62a Author: Colin Ian King Date: Thu Mar 1 10:23:03 2018 +0000 net: phy: Fix spelling mistake: "advertisment"-> "advertisement" Trivial fix to spelling mistake in comments and error message text. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/phy/bcm7xxx.c | 2 +- drivers/net/phy/marvell.c | 2 +- drivers/net/phy/marvell10g.c | 2 +- drivers/net/phy/phy-c45.c | 8 ++++---- drivers/net/phy/phy-core.c | 4 ++-- drivers/net/phy/phylink.c | 12 ++++++------ 6 files changed, 15 insertions(+), 15 deletions(-) commit 0913667ab3ad9e6c1797384410a0755757bcee55 Author: Arjun Vynipadath Date: Thu Mar 1 15:01:04 2018 +0530 cxgb4vf: Forcefully link up virtual interfaces The Virtual Interfaces are connected to an internal switch on the chip which allows VIs attached to the same port to talk to each other even when the port link is down. As a result, we generally want to always report a VI's link as being "up". Based on the original work by: Casey Leedom Signed-off-by: Arjun Vynipadath Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 6b2536039f653e35c96e7461a7456d2246331462 Author: Linus Lüssing Date: Sun Mar 4 21:02:18 2018 +0100 batman-adv: Avoid redundant multicast TT entries If a node signals that it wants all traffic for a specific protocol family then there is no need to announce individual multicast addresses via TT. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/multicast.c | 56 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 4 deletions(-) commit 413033149c65421ced8760a89ed807a8934439a8 Merge: efab163 cda9f4a Author: David S. Miller Date: Sun Mar 4 13:34:19 2018 -0500 Merge branch 'dsa-serdes-stats' Andrew Lunn says: ==================== Export SERDES stats via ethtool -S The mv88e6352 family has a SERDES interface which can be used for example to connect to SFF/SFP modules. This interface has a couple of statistics counters. Add support for including these counters in the output of ethtool -S. ==================== Signed-off-by: David S. Miller commit cda9f4aae3dceed192442807b70a5d34a13c478b Author: Andrew Lunn Date: Thu Mar 1 02:02:31 2018 +0100 net: dsa: mv88e6xxx: Get mv88e6352 SERDES statistics Add support for reading the SERDES statistics of the mv88e8352, using the standard ethtool -S option. The SERDES interface can be mapped to either port 4 or 5, so only return statistics on those ports, if the SERDES interface is in use. The counters are reset on read, so need to be accumulated. Add a per port structure to hold the stats counters. The 6352 only has a single SERDES interface and so only one port will using the newly added array. However the 6390 family has as many SERDES interfaces as ports, each with statistics counters. Also, PTP has a number of counters per port which will also need accumulating. Signed-off-by: Andrew Lunn Tested-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 7 +++- drivers/net/dsa/mv88e6xxx/chip.h | 10 ++++- drivers/net/dsa/mv88e6xxx/serdes.c | 84 ++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/serdes.h | 6 ++- 4 files changed, 103 insertions(+), 4 deletions(-) commit eb755c3f6b7deb22ed19e2d3cc4418d3ae510196 Author: Andrew Lunn Date: Thu Mar 1 02:02:30 2018 +0100 net: dsa: mv88e6xxx: Add helper to determining if port has SERDES Refactor the existing code. This helper will be used for SERDES statistics. Signed-off-by: Andrew Lunn Tested-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/serdes.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 436fe17d273bed9fd8b7bdf4172ea6d9eac0b703 Author: Andrew Lunn Date: Thu Mar 1 02:02:29 2018 +0100 net: dsa: mv88e6xxx: Allow the SERDES interfaces to have statistics When gettting the number of statistics, the strings and the actual statistics, call the SERDES ops if implemented. This means the stats code needs to return the number of strings/stats they have placed into the data, so that the SERDES strings/stats can follow on. Signed-off-by: Andrew Lunn Tested-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 76 +++++++++++++++++++++++++++------------- drivers/net/dsa/mv88e6xxx/chip.h | 13 +++++-- 2 files changed, 62 insertions(+), 27 deletions(-) commit c6c8cd5e3ce494419d8894d6a96aa17375b83ca2 Author: Andrew Lunn Date: Thu Mar 1 02:02:28 2018 +0100 net: dsa: mv88e6xxx: Hold mutex while doing stats operations Until now, there has been no need to hold the reg mutex while getting the count of statistics, or the strings, because the hardware was not accessed. When adding support for SERDES statistics, it is necessary to access the hardware, to determine if a port is using the SERDES interface. So add mutex lock/unlocks. Signed-off-by: Andrew Lunn Tested-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 88c060549a4c555d59965801d1e811b71614c2b7 Author: Andrew Lunn Date: Thu Mar 1 02:02:27 2018 +0100 dsa: Pass the port to get_sset_count() By passing the port, we allow different ports to have different statistics. This is useful since some ports have SERDES interfaces with their own statistic counters. Signed-off-by: Andrew Lunn Tested-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 2 +- drivers/net/dsa/b53/b53_priv.h | 2 +- drivers/net/dsa/dsa_loop.c | 2 +- drivers/net/dsa/lan9303-core.c | 2 +- drivers/net/dsa/microchip/ksz_common.c | 2 +- drivers/net/dsa/mt7530.c | 2 +- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/dsa/qca8k.c | 2 +- include/net/dsa.h | 2 +- net/dsa/master.c | 4 ++-- net/dsa/slave.c | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) commit efab163bbc19e5dbd2b7756c1f26defc9c27d6ba Author: Brenda J. Butler Date: Wed Feb 28 15:36:19 2018 -0500 tools: tc-testing: Add notap option Add a command line arg to suppress tap output. Handy in case all the tap output is being supplied by the plugins. Signed-off-by: Brenda J. Butler Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tdc.py | 34 +++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 11 deletions(-) commit b33cc2cec9e2e58ec5d220e26f1111117ea782d9 Merge: e871cae 91a5c1e Author: David S. Miller Date: Sun Mar 4 13:04:24 2018 -0500 Merge branch 'net-ipv6-Add-support-for-path-selection-using-hash-of-5-tuple' David Ahern says: ==================== net/ipv6: Add support for path selection using hash of 5-tuple Hardware supports multipath selection using the standard L4 5-tuple instead of just L3 and the flow label. In addition, some network operators prefer IPv6 path selection to use the 5-tuple. To that end, add support to IPv6 for multipath hash policy similar to bf4e0a3db97eb ("net: ipv4: add support for ECMP hash policy choice"). The default is still L3 which covers source and destination addresses along with flow label and IPv6 protocol. This gives users a choice in hash algorithms if they believe L3 only and the IPv6 flow label are not sufficient for their use case. A separate sysctl is added for IPv6, allowing IPv4 and IPv6 to use different algorithms if desired. The first 3 patches modify the IPv4 variant so that at the end of the patch set the ipv4 and ipv6 implementations are direct parallels. Patch 4 refactors the existing rt6_multipath_hash in preparation for adding the policy option. Patch 5 renames the existing netevent to have IPv4 in the name so ipv4 changes can be distinguished from IPv6 if the netevent handler cares. Patch 6 adds the skb as an argument through the FIB lookup functions to the multipath selection. Needed for the forwarding case. Patch 7 adds the L4 hash support. Patch 8 adds the hook for the netevent to the spectrum driver to update the ASIC. Patch 9 removes no longer used code. Patch 10 adds a testcase for IPv6 multipath with L4 hash. v3 - comments from Ido: - removed fib_info arg in patch 1; left by mistake on rebase to net-next - removed __get_hash_from_flowi4 declaration - line wrap change to spectrum_router.c to maintain 80 chars v2 - rebased to top of tree - added refactor of fib_multipath_hash following recent change - plumb skb through lookup functions to multipath selection - fix sysctl setting; was missing the data set in ipv6_sysctl_net_init - added test case RFC to v1: - rebase to top of net-next - fix addr_type in hash_keys and removed flow label as noticed by Ido - added a comment to cover letter about choice in algorithms based on use case per Or's comments ==================== Signed-off-by: David S. Miller commit 91a5c1ecba9f23f247b3772e6d54aabfebc0e300 Author: David Ahern Date: Fri Mar 2 08:32:21 2018 -0800 selftests: forwarding: Add multipath test for L4 hashing Add IPv6 multipath test using L4 hashing. Created with inputs from Ido Schimmel. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: David S. Miller .../selftests/net/forwarding/router_multipath.sh | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit de7a0f871fabe74fff7481caf7d3efe03b58fe58 Author: David Ahern Date: Fri Mar 2 08:32:20 2018 -0800 net: Remove unused get_hash_from_flow functions __get_hash_from_flowi6 is still used for flowlabels, but the IPv4 variant and the wrappers to both are not used. Remove them. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/net/flow.h | 16 ---------------- net/core/flow_dissector.c | 16 ---------------- 2 files changed, 32 deletions(-) commit 5e18b9c550397e4796bdca0f4cb8880fcc127dfe Author: David Ahern Date: Fri Mar 2 08:32:19 2018 -0800 mlxsw: spectrum_router: Add support for ipv6 hash policy update Similar to 28678f07f127d ("mlxsw: spectrum_router: Update multipath hash parameters upon netevents") for IPv4, make sure the kernel and asic are using the same hash algorithm for path selection. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit b4bac172e90ce4a93df8adf44eb70d91b9d611eb Author: David Ahern Date: Fri Mar 2 08:32:18 2018 -0800 net/ipv6: Add support for path selection using hash of 5-tuple Some operators prefer IPv6 path selection to use a standard 5-tuple hash rather than just an L3 hash with the flow the label. To that end add support to IPv6 for multipath hash policy similar to bf4e0a3db97eb ("net: ipv4: add support for ECMP hash policy choice"). The default is still L3 which covers source and destination addresses along with flow label and IPv6 protocol. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 7 ++++ include/net/ip6_route.h | 4 +- include/net/netevent.h | 1 + include/net/netns/ipv6.h | 1 + net/ipv6/icmp.c | 2 +- net/ipv6/route.c | 68 ++++++++++++++++++++++++++-------- net/ipv6/sysctl_net_ipv6.c | 27 ++++++++++++++ 7 files changed, 91 insertions(+), 19 deletions(-) commit b75cc8f90f07342467b3bd51dbc0054f185032c9 Author: David Ahern Date: Fri Mar 2 08:32:17 2018 -0800 net/ipv6: Pass skb to route lookup IPv6 does path selection for multipath routes deep in the lookup functions. The next patch adds L4 hash option and needs the skb for the forward path. To get the skb to the relevant FIB lookup functions it needs to go through the fib rules layer, so add a lookup_data argument to the fib_lookup_arg struct. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller drivers/infiniband/core/cma.c | 2 +- drivers/net/ipvlan/ipvlan_core.c | 3 +- drivers/net/vrf.c | 7 ++-- include/net/fib_rules.h | 1 + include/net/ip6_fib.h | 4 ++- include/net/ip6_route.h | 11 +++--- net/ipv6/anycast.c | 2 +- net/ipv6/fib6_rules.c | 8 +++-- net/ipv6/icmp.c | 3 +- net/ipv6/ip6_fib.c | 3 +- net/ipv6/ip6_gre.c | 2 +- net/ipv6/ip6_tunnel.c | 4 +-- net/ipv6/ip6_vti.c | 2 +- net/ipv6/mcast.c | 4 +-- net/ipv6/netfilter/ip6t_rpfilter.c | 2 +- net/ipv6/netfilter/nft_fib_ipv6.c | 3 +- net/ipv6/route.c | 72 +++++++++++++++++++++++--------------- net/ipv6/seg6_local.c | 4 +-- 18 files changed, 83 insertions(+), 54 deletions(-) commit 3192dac64c73d8c0eb4274a3da23d829fb5177af Author: David Ahern Date: Fri Mar 2 08:32:16 2018 -0800 net: Rename NETEVENT_MULTIPATH_HASH_UPDATE Rename NETEVENT_MULTIPATH_HASH_UPDATE to NETEVENT_IPV4_MPATH_HASH_UPDATE to denote it relates to a change in the IPv4 hash policy. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +- include/net/netevent.h | 2 +- net/ipv4/sysctl_net_ipv4.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 9a2a537acc75dfd19c4358bc9cb6042bdc60698c Author: David Ahern Date: Fri Mar 2 08:32:15 2018 -0800 net/ipv6: Make rt6_multipath_hash similar to fib_multipath_hash Make rt6_multipath_hash more of a direct parallel to fib_multipath_hash and reduce stack and overhead in the process: get_hash_from_flowi6 is just a wrapper around __get_hash_from_flowi6 with another stack allocation for flow_keys. Move setting the addresses, protocol and label into rt6_multipath_hash and allow it to make the call to flow_hash_from_keys. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/ipv6/route.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit ec7127a5d53d891b77a11433026dca72c57eaf88 Author: David Ahern Date: Fri Mar 2 08:32:14 2018 -0800 net/ipv4: Simplify fib_multipath_hash with optional flow keys As of commit e37b1e978bec5 ("ipv6: route: dissect flow in input path if fib rules need it") fib_multipath_hash takes an optional flow keys. If non-NULL it means the skb has already been dissected. If not set, then fib_multipath_hash needs to call skb_flow_dissect_flow_keys. Simplify the logic by setting flkeys to the local stack variable keys. Simplifies fib_multipath_hash by only have 1 set of instructions setting hash_keys. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/ipv4/route.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 6f74b6c259158d89ad258cda8e86240e01052884 Author: David Ahern Date: Fri Mar 2 08:32:13 2018 -0800 net: Align ip_multipath_l3_keys and ip6_multipath_l3_keys Symmetry is good and allows easy comparison that ipv4 and ipv6 are doing the same thing. To that end, change ip_multipath_l3_keys to set addresses at the end after the icmp compares, and move the initialization of ipv6 flow keys to rt6_multipath_hash. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/ipv4/route.c | 20 +++++++++++--------- net/ipv6/route.c | 4 ++-- 2 files changed, 13 insertions(+), 11 deletions(-) commit 7efc0b6b666d757e07417f59397e7f5f340e74e0 Author: David Ahern Date: Fri Mar 2 08:32:12 2018 -0800 net/ipv4: Pass net to fib_multipath_hash instead of fib_info fib_multipath_hash only needs net struct to check a sysctl. Make it clear by passing net instead of fib_info. In the end this allows alignment between the ipv4 and ipv6 versions. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/net/ip_fib.h | 2 +- net/ipv4/fib_semantics.c | 2 +- net/ipv4/route.c | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) commit e871cae7927ba5d86508066a5f4bec0ea1d7eb95 Merge: e4e31cf 0a3920d Author: David S. Miller Date: Sun Mar 4 13:00:58 2018 -0500 Merge branch 'sctp-clean-up-sctp_sendmsg' Xin Long says: ==================== sctp: clean up sctp_sendmsg This cleanup mostly does three things: - extract some codes into functions to make sendmsg more readable. - tidy up some codes to avoid the unnecessary checks. - adjust some logic so that it will be easier to add the send flags and cmsgs features that I will post after this. To make it easy to review and to check if the code is compatible with before, this patchset is to do it step by step in 9 patches. NOTE: There will be a conflict when merging Commit 2277c7cd75e3 ("sctp: Add LSM hooks") from selinux tree, the solution is to: 1. remove all the lines in [B]: <<<<<<< HEAD [A] ======= [B] >>>>>>> 2277c7c... sctp: Add LSM hooks 2. and apply the following diff-output: diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 980621e..d6803c8 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -1686,6 +1686,7 @@ static int sctp_sendmsg_new_asoc(struct sock *sk, __u16 sflags, struct net *net = sock_net(sk); struct sctp_association *asoc; enum sctp_scope scope; + struct sctp_af *af; int err = -EINVAL; *tp = NULL; @@ -1711,6 +1712,22 @@ static int sctp_sendmsg_new_asoc(struct sock *sk, __u16 sflags, scope = sctp_scope(daddr); + /* Label connection socket for first association 1-to-many + * style for client sequence socket()->sendmsg(). This + * needs to be done before sctp_assoc_add_peer() as that will + * set up the initial packet that needs to account for any + * security ip options (CIPSO/CALIPSO) added to the packet. + */ + af = sctp_get_af_specific(daddr->sa.sa_family); + if (!af) + return -EINVAL; + + err = security_sctp_bind_connect(sk, SCTP_SENDMSG_CONNECT, + (struct sockaddr *)daddr, + af->sockaddr_len); + if (err < 0) + return err; + asoc = sctp_association_new(ep, sk, scope, GFP_KERNEL); if (!asoc) return -ENOMEM; ==================== Acked-by: Neil Horman Signed-off-by: David S. Miller commit 0a3920d28b5490e6c90110156135dbc12c7fc413 Author: Xin Long Date: Thu Mar 1 23:05:18 2018 +0800 sctp: adjust some codes in a better order in sctp_sendmsg sctp_sendmsg_new_asoc and SCTP_ADDR_OVER check is only necessary when daddr is set, so move them up to if (daddr) statement. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/socket.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 007b7e18be74a49b61f89664966ac1477e1c9608 Author: Xin Long Date: Thu Mar 1 23:05:17 2018 +0800 sctp: improve some variables in sctp_sendmsg This patch mostly is to: - rename sinfo_flags as sflags, to make the indents look better, and also keep consistent with other sctp_sendmsg_xx functions. - replace new_asoc with bool new, no need to define a pointer here, as if new_asoc is set, it must be asoc. - rename the 'out_nounlock:' as 'out', shorter and nicer. - remove associd, only one place is using it now, just use sinfo->sinfo_assoc_id directly. - remove 'cmsgs' initialization in sctp_sendmsg, as it will be done in sctp_sendmsg_parse. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/socket.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 8e87c6eb18f9d7427054f28a284d495c174d9970 Author: Xin Long Date: Thu Mar 1 23:05:16 2018 +0800 sctp: remove the unnecessary transport looking up from sctp_sendmsg Now sctp_assoc_lookup_paddr can only be called only if daddr has been set. But if daddr has been set, sctp_endpoint_lookup_assoc would be done, where it could already have the transport. So this unnecessary transport looking up should be removed, but only reset transport as NULL when SCTP_ADDR_OVER is not set for UDP type socket. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/socket.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit d42cb06e5b542cabea88c9074b2abf90d43757f7 Author: Xin Long Date: Thu Mar 1 23:05:15 2018 +0800 sctp: factor out sctp_sendmsg_update_sinfo from sctp_sendmsg This patch is to move the codes for trying to get sinfo from asoc into sctp_sendmsg_update_sinfo. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/socket.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 204f817fb9ab1b42c34c27d593cad2992d575f71 Author: Xin Long Date: Thu Mar 1 23:05:14 2018 +0800 sctp: factor out sctp_sendmsg_parse from sctp_sendmsg This patch is to move the codes for parsing msghdr and checking sk into sctp_sendmsg_parse. Note that different from before, 'sinfo' in sctp_sendmsg won't be NULL any more. It gets the value either from cmsgs->srinfo, cmsgs->sinfo or asoc. With it, the 'sinfo' and 'fill_sinfo_ttl' check can be removed from sctp_sendmsg. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/socket.c | 172 ++++++++++++++++++++++-------------------------------- 1 file changed, 69 insertions(+), 103 deletions(-) commit becef9b1e249c849ca15889586e02668d6d723a2 Author: Xin Long Date: Thu Mar 1 23:05:13 2018 +0800 sctp: factor out sctp_sendmsg_get_daddr from sctp_sendmsg This patch is to move the codes for trying to get daddr from msg->msg_name into sctp_sendmsg_get_daddr. Note that after adding 'daddr', 'to' and 'msg_name' can be deleted. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/socket.c | 58 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 24 deletions(-) commit c2666de1fde3a02583c2c4d4af4bc54f7252e891 Author: Xin Long Date: Thu Mar 1 23:05:12 2018 +0800 sctp: factor out sctp_sendmsg_check_sflags from sctp_sendmsg This patch is to move the codes for checking sinfo_flags on one asoc after this asoc has been found into sctp_sendmsg_check_sflags. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/socket.c | 72 +++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) commit 2bfd80f9edbfc18c6247be929df3b348329141a0 Author: Xin Long Date: Thu Mar 1 23:05:11 2018 +0800 sctp: factor out sctp_sendmsg_new_asoc from sctp_sendmsg This patch is to move the codes for creating a new asoc if no asoc was found into sctp_sendmsg_new_asoc. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/socket.c | 201 +++++++++++++++++++++++------------------------------- 1 file changed, 86 insertions(+), 115 deletions(-) commit f84af33138a827dbdf7ee0df2ed82377b43cd1cc Author: Xin Long Date: Thu Mar 1 23:05:10 2018 +0800 sctp: factor out sctp_sendmsg_to_asoc from sctp_sendmsg This patch is to move the codes for checking and sending on one asoc after this asoc has been found or created into sctp_sendmsg_to_asoc. Note that 'err != -ESRCH' check is for the case that asoc is freed when waiting for tx buffer in sctp_sendmsg_to_asoc. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/socket.c | 230 +++++++++++++++++++++++------------------------------- 1 file changed, 99 insertions(+), 131 deletions(-) commit 14a7405b2e814221a951bd7a76ce4a8d24c1b3be Author: Ingo Molnar Date: Sat Mar 3 16:32:24 2018 +0100 sched/core: Undefine tracepoint creation at the end of core.c Make it easier to concatenate all the scheduler .c files for single-module compilation. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Thomas Gleixner Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 02d8ec9456f47b8865f1ff3fbb532e12a760d3b5 Author: Ingo Molnar Date: Sat Mar 3 16:27:54 2018 +0100 sched/deadline, rt: Rename queue_push_tasks/queue_pull_task to create separate namespace There are similarly named functions in both of these modules: kernel/sched/deadline.c:static inline void queue_push_tasks(struct rq *rq) kernel/sched/deadline.c:static inline void queue_pull_task(struct rq *rq) kernel/sched/deadline.c:static inline void queue_push_tasks(struct rq *rq) kernel/sched/deadline.c:static inline void queue_pull_task(struct rq *rq) kernel/sched/deadline.c: queue_push_tasks(rq); kernel/sched/deadline.c: queue_pull_task(rq); kernel/sched/deadline.c: queue_push_tasks(rq); kernel/sched/deadline.c: queue_pull_task(rq); kernel/sched/rt.c:static inline void queue_push_tasks(struct rq *rq) kernel/sched/rt.c:static inline void queue_pull_task(struct rq *rq) kernel/sched/rt.c:static inline void queue_push_tasks(struct rq *rq) kernel/sched/rt.c: queue_push_tasks(rq); kernel/sched/rt.c: queue_pull_task(rq); kernel/sched/rt.c: queue_push_tasks(rq); kernel/sched/rt.c: queue_pull_task(rq); ... which makes it harder to grep for them. Prefix them with deadline_ and rt_, respectively. Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Thomas Gleixner Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 16 ++++++++-------- kernel/sched/rt.c | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) commit a92057e14beb233e8c891f4de075f2a468c71f15 Author: Ingo Molnar Date: Sat Mar 3 15:44:39 2018 +0100 sched/idle: Merge kernel/sched/idle.c and kernel/sched/idle_task.c Merge these two small .c modules as they implement two aspects of idle task handling. Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/Makefile | 5 +- kernel/sched/idle.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++- kernel/sched/idle_task.c | 117 -------------------------------------------- 3 files changed, 125 insertions(+), 120 deletions(-) commit 325ea10c0809406ce23f038602abbc454f3f761d Author: Ingo Molnar Date: Sat Mar 3 12:20:47 2018 +0100 sched/headers: Simplify and clean up header usage in the scheduler Do the following cleanups and simplifications: - sched/sched.h already includes , so no need to include it in sched/core.c again. - order the headers alphabetically - add all headers to kernel/sched/sched.h - remove all unnecessary includes from the .c files that are already included in kernel/sched/sched.h. Finally, make all scheduler .c files use a single common header: #include "sched.h" ... which now contains a union of the relied upon headers. This makes the various .c files easier to read and easier to handle. Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched/deadline.h | 6 --- kernel/sched/autogroup.c | 9 ++--- kernel/sched/autogroup.h | 4 -- kernel/sched/clock.c | 14 +------ kernel/sched/completion.c | 5 +-- kernel/sched/core.c | 40 +++++++------------- kernel/sched/cpuacct.c | 13 +------ kernel/sched/cpudeadline.c | 5 +-- kernel/sched/cpudeadline.h | 2 - kernel/sched/cpufreq.c | 1 - kernel/sched/cpufreq_schedutil.c | 8 +--- kernel/sched/cpupri.c | 6 +-- kernel/sched/cpupri.h | 1 - kernel/sched/cputime.c | 10 ++--- kernel/sched/deadline.c | 3 -- kernel/sched/debug.c | 11 +----- kernel/sched/fair.c | 16 +------- kernel/sched/idle.c | 15 +------- kernel/sched/idle_task.c | 5 +-- kernel/sched/isolation.c | 7 ---- kernel/sched/loadavg.c | 4 -- kernel/sched/membarrier.c | 9 +---- kernel/sched/rt.c | 4 -- kernel/sched/sched.h | 81 ++++++++++++++++++++++++++-------------- kernel/sched/stats.c | 13 +++---- kernel/sched/swait.c | 3 +- kernel/sched/topology.c | 4 -- kernel/sched/wait.c | 9 +---- kernel/sched/wait_bit.c | 5 +-- 29 files changed, 94 insertions(+), 219 deletions(-) commit e547c0031697a0cb5ff7f4a66754fb3e082754ff Author: Frank Rowand Date: Mon Feb 12 00:25:04 2018 -0800 of: improve reporting invalid overlay target path Errors while developing the patch to create of_overlay_fdt_apply() exposed inadequate error messages to debug problems when overlay devicetree fragment nodes contain an invalid target path. Improve the messages in find_target_node() to remedy this. Signed-off-by: Frank Rowand drivers/of/overlay.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit db2f3762d609318ebef601dcaf8630032587c13a Author: Frank Rowand Date: Mon Feb 12 00:23:45 2018 -0800 of: convert unittest overlay devicetree source to sugar syntax The unittest-data overlays have been pulled into proper overlay devicetree source files without changing their format. The next step is to convert them to use sugar syntax instead of hand coding overlay fragments structure. A few of the overlays can not be converted because they test absolute target paths in the overlay fragment. dtc does not generate this type of target: overlay_0.dts overlay_1.dts overlay_12.dts overlay_13.dts Two pre-existing unittest overlay devicetree source files are also converted: overlay_bad_phandle.dts overlay_bad_symbol.dts Signed-off-by: Frank Rowand drivers/of/unittest-data/overlay.dts | 101 ++++++++++------------- drivers/of/unittest-data/overlay_10.dts | 39 ++++----- drivers/of/unittest-data/overlay_11.dts | 40 ++++----- drivers/of/unittest-data/overlay_15.dts | 41 ++++----- drivers/of/unittest-data/overlay_2.dts | 11 +-- drivers/of/unittest-data/overlay_3.dts | 11 +-- drivers/of/unittest-data/overlay_4.dts | 23 ++---- drivers/of/unittest-data/overlay_5.dts | 11 +-- drivers/of/unittest-data/overlay_6.dts | 13 +-- drivers/of/unittest-data/overlay_7.dts | 13 +-- drivers/of/unittest-data/overlay_8.dts | 13 +-- drivers/of/unittest-data/overlay_9.dts | 13 +-- drivers/of/unittest-data/overlay_bad_phandle.dts | 23 ++---- drivers/of/unittest-data/overlay_bad_symbol.dts | 25 ++---- drivers/of/unittest-data/tests-overlay.dtsi | 4 +- 15 files changed, 148 insertions(+), 233 deletions(-) commit 93a6039000b5acab0dba31784f2e305bc5d0661e Author: Frank Rowand Date: Mon Feb 12 00:21:44 2018 -0800 of: Documentation: of_overlay_apply() replaced by of_overlay_fdt_apply() Signed-off-by: Frank Rowand Documentation/devicetree/overlay-notes.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 39a751a4cb7e4798f0ce1169ec92de4a1aae39e3 Author: Frank Rowand Date: Mon Feb 12 00:19:42 2018 -0800 of: change overlay apply input data from unflattened to FDT Move duplicating and unflattening of an overlay flattened devicetree (FDT) into the overlay application code. To accomplish this, of_overlay_apply() is replaced by of_overlay_fdt_apply(). The copy of the FDT (aka "duplicate FDT") now belongs to devicetree code, which is thus responsible for freeing the duplicate FDT. The caller of of_overlay_fdt_apply() remains responsible for freeing the original FDT. The unflattened devicetree now belongs to devicetree code, which is thus responsible for freeing the unflattened devicetree. These ownership changes prevent early freeing of the duplicated FDT or the unflattened devicetree, which could result in use after free errors. of_overlay_fdt_apply() is a private function for the anticipated overlay loader. Update unittest.c to use of_overlay_fdt_apply() instead of of_overlay_apply(). Move overlay fragments from artificial locations in drivers/of/unittest-data/tests-overlay.dtsi into one devicetree source file per overlay. This led to changes in drivers/of/unitest-data/Makefile and drivers/of/unitest.c. - Add overlay directives to the overlay devicetree source files so that dtc will compile them as true overlays into one FDT data chunk per overlay. - Set CFLAGS for drivers/of/unittest-data/testcases.dts so that symbols will be generated for overlay resolution of overlays that are no longer artificially contained in testcases.dts - Unflatten and apply each unittest overlay FDT using of_overlay_fdt_apply(). - Enable the of_resolve_phandles() check for whether the unflattened overlay is detached. This check was previously disabled because the overlays from tests-overlay.dtsi were not unflattened into detached trees. - Other changes to unittest.c infrastructure to manage multiple test FDTs built into the kernel image (access by name instead of arbitrary number). - of_unittest_overlay_high_level(): previously unused code to add properties from the overlay_base devicetree to the live tree was triggered by the restructuring of tests-overlay.dtsi and thus testcases.dts. This exposed two bugs: (1) the need to dup a property before adding it, and (2) property 'name' is auto-generated in the unflatten code and thus will be a duplicate in the __symbols__ node - do not treat this duplicate as an error. Signed-off-by: Frank Rowand drivers/of/Kconfig | 1 + drivers/of/overlay.c | 112 ++++++++++- drivers/of/resolver.c | 6 - drivers/of/unittest-data/Makefile | 28 ++- drivers/of/unittest-data/overlay_0.dts | 14 ++ drivers/of/unittest-data/overlay_1.dts | 14 ++ drivers/of/unittest-data/overlay_10.dts | 34 ++++ drivers/of/unittest-data/overlay_11.dts | 34 ++++ drivers/of/unittest-data/overlay_12.dts | 14 ++ drivers/of/unittest-data/overlay_13.dts | 14 ++ drivers/of/unittest-data/overlay_15.dts | 35 ++++ drivers/of/unittest-data/overlay_2.dts | 14 ++ drivers/of/unittest-data/overlay_3.dts | 14 ++ drivers/of/unittest-data/overlay_4.dts | 23 +++ drivers/of/unittest-data/overlay_5.dts | 14 ++ drivers/of/unittest-data/overlay_6.dts | 15 ++ drivers/of/unittest-data/overlay_7.dts | 15 ++ drivers/of/unittest-data/overlay_8.dts | 15 ++ drivers/of/unittest-data/overlay_9.dts | 15 ++ drivers/of/unittest-data/tests-overlay.dtsi | 213 -------------------- drivers/of/unittest.c | 300 ++++++++++++++-------------- include/linux/of.h | 6 +- 22 files changed, 562 insertions(+), 388 deletions(-) commit 581e929018ce078d0ce0b02780de2f61e858903b Author: Frank Rowand Date: Fri Mar 2 20:00:31 2018 -0800 x86: devicetree: fix config option around x86_flattree_get_config() x86_flattree_get_config() is incorrectly protected by ifdef CONFIG_OF_FLATTREE. It uses of_get_flat_dt_size(), which only exists if CONFIG_OF_EARLY_FLATTREE. This issue has not been exposed previously because OF_FLATTREE did not occur unless it was selected by OF_EARLY_FLATTREE. A devicetree overlay change is selecting OF_FLATTREE directly instead of indirectly enabling it by selecting OF_EARLY_FLATTREE. This problem was exposed by a randconfig generated by the kbuild test robot, where Platform OLPC was enabled. OLPC selects OF_PROMTREE instead of OF_EARLY_FLATREE. The only other x86 platform that selects OF is X86_INTEL_CE, which does select OF_EARLY_FLATTREE. Signed-off-by: Frank Rowand Acked-by: Thomas Gleixner arch/x86/kernel/devicetree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 755ae842782037b35742e759aa0601b3c5834111 Author: Jerry Hoemann Date: Sun Feb 25 20:22:27 2018 -0700 watchdog: hpwdt: Update driver version. Update driver version number to reflect changes. Signed-off-by: Jerry Hoemann Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/hpwdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ccfd69213d806fb4f1de3268776287109e9821f5 Author: Jerry Hoemann Date: Sun Feb 25 20:22:26 2018 -0700 watchdog: hpwdt: Add dynamic debug Add a few dynamic debug messages to aid in module level debug. Signed-off-by: Jerry Hoemann Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/hpwdt.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 0458f403fee348edd3457530dee57c0f946a0df6 Author: Jerry Hoemann Date: Sun Feb 25 20:22:25 2018 -0700 watchdog: hpwdt: Programable Pretimeout NMI Make whether or not the hpwdt watchdog delivers a pretimeout NMI programable by the user. The underlying iLO hardware is programmable as to whether or not a pre-timeout NMI is delivered to the system before the iLO resets the system. However, the iLO does not allow for programming the length of time that NMI is delivered before the system is reset. By watchdog API, in hpwdt_set_pretimeout a val == 0 disables the NMI. When val != 0, hpwdt_set_pretimeout will enable the pretimeout NMI provided the current timeout is greator than the HW specified pretimeout length. Otherwise an error is returned. In set_timeout, if the new timeout is <= an already established pretimeout, the pretimeout is canceled. This matches the action watchdog_set_timeout in the watchdog core would do if an hpwdt specific set_timeout function wasn't specified. Signed-off-by: Jerry Hoemann Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/hpwdt.c | 53 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 4 deletions(-) commit 703fc3df91eacdaee8bf63996fb3a76de55dbb5e Author: Jerry Hoemann Date: Sun Feb 25 20:22:24 2018 -0700 watchdog: hpwdt: remove allow_kdump module parameter. The intent of this parameter is unclear and it sets up a race between the reset of the system by ASR and crashdump. The length of time between receipt of the pretimeout NMI and the ASR reset of the system is fixed by hardware. Turning the parameter off doesn't necessairly prevent a crash dump. Also, having the ASR reset occur while the system is crash dumping doesn't imply that the dump was hung given the short duration between the NMI and the reset. This parameter is not a substitute for having a architected watchdog crashdump hang detection paridigm. Signed-off-by: Jerry Hoemann Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/hpwdt.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit a6c24733d29315fd2d8dd7140f83e834658c62d5 Author: Jerry Hoemann Date: Sun Feb 25 20:22:23 2018 -0700 watchdog: hpwdt: condition early return of NMI handler on iLO5 Modify prior change to not claim an NMI unless originated from iLO to apply only to iLO5 and later going forward. This restores hpwdt traditional behavior of calling panic if the NMI is NMI_IO_CHECK, NMI_SERR, or NMI_UNKNOWN for legacy hardware. Signed-off-by: Jerry Hoemann Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/hpwdt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d0a4027f2789d7682afce2cea066d32c85e3d8c4 Author: Jerry Hoemann Date: Sun Feb 25 20:22:22 2018 -0700 watchdog: hpwdt: Modify to use watchdog core. Follow Documentation/watchdog/convert_drivers_to_kernel_api.txt to convert hpwdt from legacy watchdog driver to use the watchdog core. Removed functions: hpwdt_open, hpwdt_release, hpwdt_write, hpwdt_ioctl Removed data structures: hpwdt_fops, hpwdt_miscdev, watchdog_device Modified functions: hpwdt_start, hpwdt_stop, hpwdt_ping, hpwdt_gettimeleft Added functions: hpwdt_settimeout Added structures: watchdog_device Update Kconfig file to show that hpwdt now selects WATCHDOG_CORE. Signed-off-by: Jerry Hoemann Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 1 + drivers/watchdog/hpwdt.c | 216 +++++++++++------------------------------------ 2 files changed, 48 insertions(+), 169 deletions(-) commit a042229a18acb0422dca08cf92cf940695b5fcb7 Author: Jerry Hoemann Date: Sun Feb 25 20:22:21 2018 -0700 watchdog: hpwdt: Update nmi_panic message. Include the nmistat in the nmi_panic message to give support an indication why the NMI was called (e.g. a timeout or generate nmi button.) Signed-off-by: Jerry Hoemann Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/hpwdt.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 9a46fc4ec98701b4e87eac57f34594b9aed50511 Author: Jerry Hoemann Date: Sun Feb 25 20:22:19 2018 -0700 watchdog: hpwdt: Update Module info and copyright. Update Copyright and Module description to reflect branding changes. Signed-off-by: Jerry Hoemann Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/hpwdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c829f47e33eb0398a9a14e357a05199a7be0277 Author: Alexey Khoroshilov Date: Sat Feb 10 13:17:27 2018 +0300 watchdog: asm9260_wdt: fix error handling in asm9260_wdt_probe() If devm_reset_control_get_exclusive() fails, asm9260_wdt_probe() returns immediately. But clks has been already enabled at that point, so it is required to disable them or to move the code around. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/asm9260_wdt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8d039d4d3d387d15e6c9bb7a406c6689efdb8540 Author: Marcus Folkesson Date: Sat Feb 10 10:27:01 2018 +0100 watchdog: coh901327: make license text and module licence match Licence text is specifying "GPLv2" but the MODULE_LICENSE is set to "GPLv2 or later". See include/linux/module.h: "GPL" [GNU Public License v2 or later] "GPL v2" [GNU Public License v2] When on it, add SPDX identifier tag. Signed-off-by: Marcus Folkesson Reviewed-by: Philippe Ombredanne Reviewed-by: Guenter Roeck Reviewed-by: Linus Walleij Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/coh901327_wdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit df6af78275f6af4a794378ea4d08a4959f959388 Author: Marcus Folkesson Date: Sat Feb 10 21:36:23 2018 +0100 watchdog: lpc18xx: remove assignment of unused ret-value Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/lpc18xx_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65adfa22f5fc3542fc6776275f08c52975b82217 Author: Marcus Folkesson Date: Sat Feb 10 21:36:22 2018 +0100 watchdog: gpio: change order for setting default timeout watchdog_init_timeout() will preserve wdd->timeout value if no parameter nor timeout-secs dt property is set. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/gpio_wdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1253730ef6142a095ca39a19fb5d300ca03a4439 Author: Marcus Folkesson Date: Sat Feb 10 21:36:21 2018 +0100 watchdog: omap_wdt: change order for setting default timeout watchdog_init_timeout() will preserve wdd->timeout value if no parameter nor timeout-secs dt property is set. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/omap_wdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63089396179fdc9e40a4e4a951744db3c0d48d7d Author: Marcus Folkesson Date: Sat Feb 10 21:36:20 2018 +0100 watchdog: uniphier: change order for setting default timeout watchdog_init_timeout() will preserve wdd->timeout value if no parameter nor timeout-secs dt property is set. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Acked-by: Keiji Hayashibara Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/uniphier_wdt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 321390d9bdd9e0481bde19bd965d019855c1ec74 Author: Marcus Folkesson Date: Sun Feb 11 21:08:47 2018 +0100 watchdog: coh901327: make use of timeout-secs provided in devicetree watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. Following best practice described in Documentation/watchdog/watchdog-kernel-api.txt to make use of the parameter logic. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Reviewed-by: Linus Walleij Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/coh901327_wdt.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 4590d62cb16bebdc36b951067eeeaef02ea213c3 Author: Marcus Folkesson Date: Sun Feb 11 21:08:46 2018 +0100 watchdog: meson: allow setting timeout in devicetree watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. By following best practice described in Documentation/watchdog/watchdog-kernel-api.txt, it also let us to set timout-sec property in devicetree. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 4 ++++ drivers/watchdog/meson_wdt.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit b82e6953acf46466b97bc592492f206b719f58b5 Author: Marcus Folkesson Date: Sun Feb 11 21:08:45 2018 +0100 watchdog: mtk: allow setting timeout in devicetree watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. By following best practice described in Documentation/watchdog/watchdog-kernel-api.txt, it also let us to set timout-sec property in devicetree. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Acked-by: Matthias Brugger Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 4 ++++ drivers/watchdog/mtk_wdt.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit d956aa7875166f1df2256c23a2bba143322f3c8f Author: Marcus Folkesson Date: Sun Feb 11 21:08:44 2018 +0100 watchdog: pnx4008: make use of timeout-secs provided in devicetree watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. Following best practice described in Documentation/watchdog/watchdog-kernel-api.txt to make use of the parameter logic. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pnx4008_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f70b14540aecf09a158734c2c3db11bf9557b34f Author: Marcus Folkesson Date: Sun Feb 11 21:08:43 2018 +0100 watchdog: sirfsoc: allow setting timeout in devicetree watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. By following best practice described in Documentation/watchdog/watchdog-kernel-api.txt, it also let us to set timout-sec property in devicetree. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Reviewed-by: Rob Herring Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt | 4 ++++ drivers/watchdog/sirfsoc_wdt.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 1d1dedc2169416198a48cd43cee9bdd1a9c939ac Author: Marcus Folkesson Date: Sun Feb 11 21:08:42 2018 +0100 watchdog: sunxi: allow setting timeout in devicetree watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. By following best practice described in Documentation/watchdog/watchdog-kernel-api.txt, it also let us to set timout-sec property in devicetree. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Reviewed-by: Rob Herring Reviewed-by: Chen-Yu Tsai Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 4 ++++ drivers/watchdog/sunxi_wdt.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 976932e40036179d71d40c76fc559b4b19912bac Author: Marcus Folkesson Date: Sun Feb 11 21:08:41 2018 +0100 watchdog: sama5d4: make use of timeout-secs provided in devicetree watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. Following best practice described in Documentation/watchdog/watchdog-kernel-api.txt to make use of the parameter logic. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Acked-by: Nicolas Ferre Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sama5d4_wdt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2b77f0083a7c2e57ecc38d82b11213dc51f733c8 Author: Marcus Folkesson Date: Thu Feb 8 14:11:08 2018 +0100 watchdog: imx2_wdt: allow setting timeout in devicetree By following best practice described in Documentation/watchdog/watchdog-kernel-api.txt, it also let us to set timout-sec property in devicetree. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Reviewed-by: Rob Herring Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt | 2 ++ drivers/watchdog/imx2_wdt.c | 8 ++------ 2 files changed, 4 insertions(+), 6 deletions(-) commit 200905fdf08ab8168826b6ce43406d0638de22bf Author: Shreeya Patel Date: Fri Mar 2 18:55:56 2018 +0530 Staging: iio: adis16209: Add _REG postfix for registers The defined names for registers does not make it very clear that they are registers and hence, add _REG postfix. This improves the readability of the code. Signed-off-by: Shreeya Patel Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16209.c | 85 ++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 42 deletions(-) commit c97712c41f7419c98723581a1b9566cd84cad44c Author: Shreeya Patel Date: Fri Mar 2 18:53:41 2018 +0530 Staging: iio: adis16209: Change the definition name The change in the definition name makes it then obvious what the units are throughout the driver and there will be no need of the comment. Signed-off-by: Shreeya Patel Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16209.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5824d0938dab99503b9a5c18f1ed8ad04a13b62a Author: Shreeya Patel Date: Fri Mar 2 18:49:23 2018 +0530 Staging: iio: adis16209: Arrange headers in alphabetical order Arrange the headers in alphabetical order for cleanup purpose. Signed-off-by: Shreeya Patel Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16209.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5def839c481712f2f0a3a34755ee6b27279e7cbe Author: Rodrigo Siqueira Date: Tue Feb 27 11:47:55 2018 -0300 iio:magnetometer: Replace magic number 0 by IIO_CHAN_INFO_RAW The function magn_3d_read_raw has a switch statement handling multiple cases per channel. The first case statement uses the magic number 0, which means IIO_CHAN_INFO_RAW. Additionally, the iio_chan_spec for magn_3d_channels is configured to be IIO_CHAN_INFO_RAW. Therefore, this patch replaces the magic number 0 for the appropriate IIO_CHAN_INFO_RAW. Signed-off-by: Rodrigo Siqueira Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/hid-sensor-magn-3d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5556dfe54be421b1b2897513adf61d9b6d3ab271 Author: Rodrigo Siqueira Date: Tue Feb 27 10:47:06 2018 -0300 iio:dummy: Add extra paragraphs on Kconfig This patch fixes the checkpatch.pl warning: drivers/iio/dummy/Kconfig:21: WARNING: please write a paragraph that describes the config symbol fully drivers/iio/dummy/Kconfig:27: WARNING: please write a paragraph that describes the config symbol fully This patch expands the explanation about IIO_DUMMY_EVGEN by using the code documentation found in iio/dummy/iio_dummy_evgen.c. In the same way, the information related to IIO_SIMPLE_DUMMY_BUFFER was extracted from file iio_simple_dummy_buffer.c. Signed-off-by: Rodrigo Siqueira Reviewed-by: Daniel Baluta Signed-off-by: Jonathan Cameron drivers/iio/dummy/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+) commit a34a3ed73ca067bedbc8194ab20b959c65ea71a4 Author: Rodrigo Siqueira Date: Tue Feb 27 10:46:51 2018 -0300 iio: dummy: Add correct tabs and spaces to Kconfig Kconfig from iio/dummy does not follow the coding style recommendations. According to the coding-style, Lines under a config definition are indented with one tab, while help text is indented an additional two spaces. This patch adds the proper tabulation and space. Signed-off-by: Rodrigo Siqueira Reviewed-by: Daniel Baluta Signed-off-by: Jonathan Cameron drivers/iio/dummy/Kconfig | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 0f079547150a8669da28720a4b9e3f767512ea6f Author: Jeff LaBundy Date: Mon Feb 26 20:11:51 2018 -0600 iio: light: lv0104cs: Add support for LV0104CS light sensor This patch adds support for the On Semiconductor LV0104CS ambient light sensor. Signed-off-by: Jeff LaBundy Signed-off-by: Jonathan Cameron drivers/iio/light/Kconfig | 10 + drivers/iio/light/Makefile | 1 + drivers/iio/light/lv0104cs.c | 531 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 542 insertions(+) commit b61d8e630a8577600813acb2d0ce43ced8e9d107 Author: Andy Shevchenko Date: Mon Feb 26 21:37:35 2018 +0200 iio: proximity: sx9500: Add GPIO ACPI mapping table In order to satisfy GPIO ACPI library requirements convert users of gpiod_get_index() to correctly behave when there no mapping is provided by firmware. Here we add explicit mapping between _CRS GpioIo() resources and their names used in the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron drivers/iio/proximity/sx9500.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit c0879ed6188789c6252e91cedabf46236cfa1d42 Author: Fabrice Gasnier Date: Fri Feb 23 12:11:00 2018 +0100 dt-bindings: iio: adc: stm32-dfsdm: fix types, add missing pinctrl - Add missing pinctrl description. Support is made optional as dfsdm may use internal sources (e.g. via registers) - Fix typo in IIO STM32 DFSDM filter "MANCH_F" description. Basically, this should be "falling edge = logic 0", not "1" that applies to "MANCH_R". BTW, make the description complete by describing both rising/falling edges as described in reference manuals. Fixes: 6c82f947fc97 ("IIO: add DT bindings for stm32 DFSDM filter") Signed-off-by: Fabrice Gasnier Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0dad1eceeb9c7497e7e2a592900ddac79b128c56 Author: Gwendal Grignou Date: Wed Feb 21 16:11:09 2018 +0100 iio: cros_ec: Relax sampling frequency before suspending If an application set a tight sampling frequency, given the interrupt use is a wakeup source, suspend will not happen: the kernel will receive a wake up interrupt and will cancel the suspend process. Given cros_ec sensors type is non wake up, this patch adds prepare and complete callbacks to set 1s sampling period just before suspend. This ensures the sensor hub will not be a source of interrupt during the suspend process. Signed-off-by: Gwendal Grignou Signed-off-by: Enric Balletbo i Serra Acked-by: Jonathan Cameron Signed-off-by: Jonathan Cameron .../iio/common/cros_ec_sensors/cros_ec_sensors.c | 1 + .../common/cros_ec_sensors/cros_ec_sensors_core.c | 49 ++++++++++++++++++++++ .../common/cros_ec_sensors/cros_ec_sensors_core.h | 2 + drivers/iio/light/cros_ec_light_prox.c | 1 + 4 files changed, 53 insertions(+) commit 97fb7a0a8944bd6d2c5634e1e0fa689a5c40bc22 Author: Ingo Molnar Date: Sat Mar 3 14:01:12 2018 +0100 sched: Clean up and harmonize the coding style of the scheduler code base A good number of small style inconsistencies have accumulated in the scheduler core, so do a pass over them to harmonize all these details: - fix speling in comments, - use curly braces for multi-line statements, - remove unnecessary parentheses from integer literals, - capitalize consistently, - remove stray newlines, - add comments where necessary, - remove invalid/unnecessary comments, - align structure definitions and other data types vertically, - add missing newlines for increased readability, - fix vertical tabulation where it's misaligned, - harmonize preprocessor conditional block labeling and vertical alignment, - remove line-breaks where they uglify the code, - add newline after local variable definitions, No change in functionality: md5: 1191fa0a890cfa8132156d2959d7e9e2 built-in.o.before.asm 1191fa0a890cfa8132156d2959d7e9e2 built-in.o.after.asm Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/autogroup.c | 12 +- kernel/sched/autogroup.h | 8 +- kernel/sched/clock.c | 22 +- kernel/sched/core.c | 6 +- kernel/sched/cpuacct.c | 20 +- kernel/sched/cpudeadline.c | 13 +- kernel/sched/cpudeadline.h | 27 +- kernel/sched/cpufreq_schedutil.c | 129 +++++----- kernel/sched/cpupri.c | 9 +- kernel/sched/cpupri.h | 24 +- kernel/sched/cputime.c | 48 ++-- kernel/sched/deadline.c | 51 ++-- kernel/sched/debug.c | 88 +++---- kernel/sched/fair.c | 183 +++++++------- kernel/sched/idle.c | 6 +- kernel/sched/idle_task.c | 3 +- kernel/sched/isolation.c | 2 +- kernel/sched/loadavg.c | 30 +-- kernel/sched/membarrier.c | 18 +- kernel/sched/rt.c | 25 +- kernel/sched/sched.h | 529 ++++++++++++++++++++------------------- kernel/sched/stats.c | 7 +- kernel/sched/stats.h | 86 +++---- kernel/sched/stop_task.c | 3 +- kernel/sched/swait.c | 3 + kernel/sched/topology.c | 42 ++-- kernel/sched/wait.c | 4 + kernel/sched/wait_bit.c | 18 +- 28 files changed, 706 insertions(+), 710 deletions(-) commit c2e513821d5df5e772287f6d0c23fd17b7c2bb1a Author: Mario Leinweber Date: Fri Mar 2 13:20:07 2018 -0500 sched/deadline: Clean up various coding style details - Fixed style error: Missing space before the open parenthesis - Fixed style warnings: 2x Missing blank line after declaration One warning left: else after return (I don't feel comfortable fixing that without side effects) Signed-off-by: Mario Leinweber Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/20180302182007.28691-1-marioleinweber@web.de Signed-off-by: Ingo Molnar kernel/sched/cpudeadline.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e4e31cf07d0ca0722530681a491023ade5571a28 Merge: b72c8a7 c51a637 Author: David S. Miller Date: Fri Mar 2 21:53:11 2018 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2018-03-03 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Extend bpftool to build up CFG information of eBPF programs and add an option to dump this in DOT format such that this can later be used with DOT graphic tools (xdot, graphviz, etc) to visualize it. Part of the analysis performed is sub-program detection and basic-block partitioning, from Jiong. 2) Multiple enhancements for bpftool's batch mode, more specifically the parser now understands comments (#), continuation lines (\), and arguments enclosed between quotes. Also, allow to read from stdin via '-' as input file, all from Quentin. 3) Improve BPF kselftests by i) unifying the rlimit handling into a helper that is then used by all tests, and ii) add support for testing tail calls to test_verifier plus add tests covering all corner cases. The latter is especially useful for testing JITs, from Daniel. 4) Remove x64 JIT's bpf_flush_icache() since flush_icache_range() is a noop on x64, from Daniel. 5) Fix one more occasion in BPF samples where we do not detach the BPF program from the cgroup after completion, from Prashant. ==================== Signed-off-by: David S. Miller commit 41e36f2f85af758fd2f4be76112ebe649d07a801 Author: Mario Limonciello Date: Tue Feb 27 12:23:04 2018 -0600 platform/x86: dell-smbios: Link all dell-smbios-* modules together Some race conditions were raised due to dell-smbios and its backends not being ready by the time that a consumer would call one of the exported methods. To avoid this problem, guarantee that all initialization has been done by linking them all together and running init for them all. As part of this change the Kconfig needs to be adjusted so that CONFIG_DELL_SMBIOS_SMM and CONFIG_DELL_SMBIOS_WMI are boolean rather than modules. CONFIG_DELL_SMBIOS is a visually selectable option again and both CONFIG_DELL_SMBIOS_WMI and CONFIG_DELL_SMBIOS_SMM are optional. Signed-off-by: Mario Limonciello [dvhart: Update prompt and help text for DELL_SMBIOS_* backends] Signed-off-by: Darren Hart (VMware) drivers/platform/x86/Kconfig | 15 ++++++++++----- drivers/platform/x86/Makefile | 4 ++-- drivers/platform/x86/dell-smbios-base.c | 21 ++++++++++++++++++++- drivers/platform/x86/dell-smbios-smm.c | 18 ++++-------------- drivers/platform/x86/dell-smbios-wmi.c | 14 ++++---------- drivers/platform/x86/dell-smbios.h | 27 ++++++++++++++++++++++++++- 6 files changed, 66 insertions(+), 33 deletions(-) commit ec34fe385984b447f62ef6763638874e6fbd1f43 Author: Mario Limonciello Date: Tue Feb 27 12:23:03 2018 -0600 platform/x86: dell-smbios: Rename dell-smbios source to dell-smbios-base This is being done to faciliate a later change to link all the dell-smbios drivers together. Signed-off-by: Mario Limonciello Signed-off-by: Darren Hart (VMware) drivers/platform/x86/Makefile | 1 + drivers/platform/x86/dell-smbios-base.c | 629 ++++++++++++++++++++++++++++++++ drivers/platform/x86/dell-smbios.c | 629 -------------------------------- 3 files changed, 630 insertions(+), 629 deletions(-) commit 98c76a3904261a7b7612821de8b99f0e3b41677c Author: Mario Limonciello Date: Tue Feb 27 12:23:02 2018 -0600 platform/x86: dell-smbios: Correct some style warnings WARNING: function definition argument 'struct calling_interface_buffer *' should also have an identifier name + int (*call_fn)(struct calling_interface_buffer *); WARNING: Block comments use * on subsequent lines + /* 4 bytes of table header, plus 7 bytes of Dell header, plus at least + 6 bytes of entry */ WARNING: Block comments use a trailing */ on a separate line + 6 bytes of entry */ Signed-off-by: Mario Limonciello Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-smbios.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 7b026763cff902debe1184ef4e0609dc148338ad Author: Michal Wajdeczko Date: Fri Mar 2 13:37:17 2018 +0000 drm/i915/huc: Mark firmware as failed on auth failure If we fail to authenticate HuC firmware, we should change its load status to FAIL. While around, print HUC_STATUS on firmware verification failure. v2: keep the variables sorted by length (Chris) Signed-off-by: Michal Wajdeczko Cc: Rodrigo Vivi Cc: Anusha Srivatsa Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180302133718.1260-1-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_huc.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 7cfca4afd656f0aa6f136d8a1260d994abc96a0c Author: Michal Wajdeczko Date: Fri Mar 2 11:15:49 2018 +0000 drm/i915/uc: Introduce intel_uc_suspend|resume We want to use higher level 'uc' functions as the main entry points to the GuC/HuC code to hide some details and keep code layered. While here, move call to disable_guc_interrupts after sending suspend action to the GuC to allow it work also with CTB as comm mechanism. v2: update commit msg (Sagar) Signed-off-by: Michal Wajdeczko Cc: Sagar Arun Kamble Cc: Chris Wilson Reviewed-by: Sagar Arun Kamble Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180302111550.21328-1-michal.wajdeczko@intel.com drivers/gpu/drm/i915/i915_drv.c | 6 +++--- drivers/gpu/drm/i915/i915_gem.c | 4 ++-- drivers/gpu/drm/i915/intel_guc.c | 42 +++++++++++++------------------------ drivers/gpu/drm/i915/intel_guc.h | 4 ++-- drivers/gpu/drm/i915/intel_uc.c | 45 ++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uc.h | 2 ++ 6 files changed, 68 insertions(+), 35 deletions(-) commit a3e3883646c05828f96369f7809436f1b3247234 Author: Chris Wilson Date: Fri Mar 2 14:32:45 2018 +0000 drm/i915/execlists: Split spinlock from its irq disabling side-effect During reset/wedging, we have to clean up the requests on the timeline and flush the pending interrupt state. Currently, we are abusing the irq disabling of the timeline spinlock to protect the irq state in conjunction to the engine's timeline requests, but this is accidental and conflates the spinlock with the irq state. A baffling state of affairs for the reader. Instead, explicitly disable irqs over the critical section, and separate modifying the irq state from the timeline's requests. Suggested-by: Mika Kuoppala Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20180302143246.2579-4-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_lrc.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) commit aebbc2d7b3887202c9b02e69e2a470901d0eda71 Author: Chris Wilson Date: Fri Mar 2 13:12:46 2018 +0000 drm/i915/execlists: Move irq state manipulation inside irq disabled region Although this state (execlists->active and engine->irq_posted) itself is not protected by the engine->timeline spinlock, it does conveniently ensure that irqs are disabled. We can use this to protect our manipulation of the state and so ensure that the next IRQ to arrive sees consistent state and (hopefully) ignores the reset engine. Suggested-by: Mika Kuoppala Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Michel Thierry Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180302131246.22036-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 963ddd63c314e9b5d9cd999873d473a93aed5380 Author: Chris Wilson Date: Fri Mar 2 11:33:24 2018 +0000 drm/i915: Suspend submission tasklets around wedging After staring hard at sequences like [ 28.199013] systemd-1 2..s. 26062228us : execlists_submission_tasklet: rcs0 cs-irq head=0 [0?], tail=1 [1?] [ 28.199095] systemd-1 2..s. 26062229us : execlists_submission_tasklet: rcs0 csb[1]: status=0x00000018:0x00000000, active=0x1 [ 28.199177] systemd-1 2..s. 26062230us : execlists_submission_tasklet: rcs0 out[0]: ctx=0.1, seqno=3, prio=-1024 [ 28.199258] systemd-1 2..s. 26062231us : execlists_submission_tasklet: rcs0 completed ctx=0 [ 28.199340] gem_eio-829 1..s1 26066853us : execlists_submission_tasklet: rcs0 in[0]: ctx=1.1, seqno=1, prio=0 [ 28.199421] -0 2..s. 26066863us : execlists_submission_tasklet: rcs0 cs-irq head=1 [1?], tail=2 [2?] [ 28.199503] -0 2..s. 26066865us : execlists_submission_tasklet: rcs0 csb[2]: status=0x00000001:0x00000000, active=0x1 [ 28.199585] gem_eio-829 1..s1 26067077us : execlists_submission_tasklet: rcs0 in[1]: ctx=3.1, seqno=2, prio=0 [ 28.199667] gem_eio-829 1..s1 26067078us : execlists_submission_tasklet: rcs0 in[0]: ctx=1.2, seqno=1, prio=0 [ 28.199749] -0 2..s. 26067084us : execlists_submission_tasklet: rcs0 cs-irq head=2 [2?], tail=3 [3?] [ 28.199830] -0 2..s. 26067085us : execlists_submission_tasklet: rcs0 csb[3]: status=0x00008002:0x00000001, active=0x1 [ 28.199912] -0 2..s. 26067086us : execlists_submission_tasklet: rcs0 out[0]: ctx=1.2, seqno=1, prio=0 [ 28.199994] gem_eio-829 2..s. 28246084us : execlists_submission_tasklet: rcs0 cs-irq head=3 [3?], tail=4 [4?] [ 28.200096] gem_eio-829 2..s. 28246088us : execlists_submission_tasklet: rcs0 csb[4]: status=0x00000014:0x00000001, active=0x5 [ 28.200178] gem_eio-829 2..s. 28246089us : execlists_submission_tasklet: rcs0 out[0]: ctx=0.0, seqno=0, prio=0 [ 28.200260] gem_eio-829 2..s. 28246127us : execlists_submission_tasklet: execlists_submission_tasklet:886 GEM_BUG_ON(buf[2 * head + 1] != port->context_id) the conclusion is that the only place where the ports are reset to zero, is from engine->cancel_requests called during i915_gem_set_wedged(). The race is horrible as it results from calling set-wedged on active HW (the GPU reset failed) and as such we need to be careful as the HW state changes beneath us. Fortunately, it's the same scary conditions as affect normal reset, so we can reuse the same machinery to disable state tracking as we clobber it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104945 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Michel Thierry Fixes: af7a8ffad9c5 ("drm/i915: Use rcu instead of stop_machine in set_wedged") Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180302113324.23189-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 6 +++++- drivers/gpu/drm/i915/intel_lrc.c | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) commit 3383fb35c9b886e54d04796964cae2cd757a11d8 Merge: d8757f4 048a466 Author: Boris Brezillon Date: Fri Mar 2 22:57:43 2018 +0100 Merge tag 'nand/pxa3xx-removal' of git://git.infradead.org/linux-mtd into nand/next Remove the pxa3xx_nand driver (replaced by marvell_nand). commit 048a4663a2a4b1b784f1c284d30873901148f009 Author: Miquel Raynal Date: Mon Feb 19 23:35:57 2018 +0100 MAINTAINERS: remove entry for deleted pxa3xx_nand driver The driver pxa3xx_nand.c has been replaced everywhere by its rework called marvell_nand.c so this entry can now be removed. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon MAINTAINERS | 6 ------ 1 file changed, 6 deletions(-) commit 0f436ad64bf95781a7f0cdd3a988c8db86d9c081 Author: Miquel Raynal Date: Mon Feb 19 23:35:56 2018 +0100 arm: dts: pxa: use reworked NAND controller driver Use the new bindings of the reworked Marvell NAND controller driver. Signed-off-by: Miquel Raynal Acked-by: Robert Jarzmik Signed-off-by: Boris Brezillon arch/arm/boot/dts/pxa3xx.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 68741a8adab900fafb407532e6bae0887f14fbe0 Author: Richard Haines Date: Fri Mar 2 19:54:34 2018 +0000 selinux: Fix ltp test connect-syscall failure Fix the following error when running regression tests using LTP as follows: cd /opt/ltp/ cat runtest/syscalls |grep connect01>runtest/connect-syscall ./runltp -pq -f connect-syscall Running tests....... connect01 1 TPASS : bad file descriptor successful connect01 2 TPASS : invalid socket buffer successful connect01 3 TPASS : invalid salen successful connect01 4 TPASS : invalid socket successful connect01 5 TPASS : already connected successful connect01 6 TPASS : connection refused successful connect01 7 TFAIL : connect01.c:146: invalid address family ; returned -1 (expected -1), errno 22 (expected 97) INFO: ltp-pan reported some tests FAIL LTP Version: 20180118 Reported-by: Anders Roxell Signed-off-by: Richard Haines Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: Paul Moore security/selinux/hooks.c | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) commit 47eee072bf90374ce98a15668e6b450de313100a Author: Sebastian Reichel Date: Fri Feb 23 21:02:54 2018 +0100 ARM: dts: omap4-droid4: add soundcard Add sound support to Motorola Droid 4 using simple-soundcard and CPCAP's audio codec. This does not yet correctly represent the whole audio routing, since McBSP3 is also connected to Bluetooth and MDM6600 modem (and probably also 4G modem). These extra DAI links are not yet supported and have not been tested. Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 78 ++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) commit 1f64d431b147605731fe33a1691e925acd8299ae Author: Sebastian Reichel Date: Fri Feb 23 21:02:53 2018 +0100 ARM: dts: motorola-cpcap-mapphone: add audio-codec Add node for audio-codec to its DT file. Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit e3e44549163539b51056b569013ec69c47b1be0a Author: Miquel Raynal Date: Mon Feb 19 23:35:55 2018 +0100 dt-bindings: mtd: remove pxa3xx NAND controller documentation The deprecated pxa3xx_nand.c driver does not exist anymore, it has been replaced by marvell_nand.c which has its own up-to-date documentation. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Tested-by: Robert Jarzmik Signed-off-by: Boris Brezillon .../devicetree/bindings/mtd/pxa3xx-nand.txt | 50 ---------------------- 1 file changed, 50 deletions(-) commit 7576594c8e69f5a9e08c5b952d5139bb43574bbc Author: Miquel Raynal Date: Mon Feb 19 23:35:54 2018 +0100 mtd: nand: remove useless fields from pxa3xx NAND platform data The "enable arbiter" bit is available only for pxa3xx based platforms but it was experimentally shown that even if this bit is reserved, some Marvell platforms (64-bit) actually need it to be set. The driver always set this bit regardless of this property, which is harmless. Then this property is not needed. The "num_cs" field is always 1 and for a good reason, the old driver (pxa3xx_nand.c) could only handle one. The new driver that replaces it (marvell_nand.c) can handle more, but better use device tree for such description. As there is only one available chip select, there is no need for an array of partitions neither an array of partition numbers. Signed-off-by: Miquel Raynal Acked-by: Robert Jarzmik Signed-off-by: Boris Brezillon arch/arm/mach-mmp/aspenite.c | 6 ++-- arch/arm/mach-mmp/ttc_dkb.c | 5 +--- arch/arm/mach-pxa/cm-x300.c | 6 ++-- arch/arm/mach-pxa/colibri-pxa3xx.c | 6 ++-- arch/arm/mach-pxa/littleton.c | 6 ++-- arch/arm/mach-pxa/mxm8x10.c | 6 ++-- arch/arm/mach-pxa/raumfeld.c | 6 ++-- arch/arm/mach-pxa/zylonite.c | 6 ++-- drivers/mtd/nand/marvell_nand.c | 3 +- include/linux/platform_data/mtd-nand-pxa3xx.h | 43 ++++++++------------------- 10 files changed, 28 insertions(+), 65 deletions(-) commit 5dd2fe5bcf4e52b75c821a68594140467526fadc Author: Rob Herring Date: Thu Mar 1 14:25:34 2018 -0600 ARM: dts: omap3: Add missing #sound-dai-cells dtc now gives the following warnings: arch/arm/boot/dts/omap3-gta04a3.dtb: Warning (sound_dai_property): /sound_telephony/simple-audio-card,cpu: Missing property '#sound-dai-cells' in node /ocp@68000000/mcbsp@49026000 or bad phandle (referred from sound-dai[0]) arch/arm/boot/dts/omap3-gta04a4.dtb: Warning (sound_dai_property): /sound_telephony/simple-audio-card,cpu: Missing property '#sound-dai-cells' in node /ocp@68000000/mcbsp@49026000 or bad phandle (referred from sound-dai[0]) arch/arm/boot/dts/omap3-gta04a5.dtb: Warning (sound_dai_property): /sound_telephony/simple-audio-card,cpu: Missing property '#sound-dai-cells' in node /ocp@68000000/mcbsp@49026000 or bad phandle (referred from sound-dai[0]) Add the missing #sound-dai-cells property. Cc: "Benoît Cousson" Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3.dtsi | 1 + 1 file changed, 1 insertion(+) commit e5a5ca96a42ca7eee19cf8694377308771350950 Author: Paul Moore Date: Thu Mar 1 17:38:30 2018 -0500 selinux: rename the {is,set}_enforcing() functions Rename is_enforcing() to enforcing_enabled() and enforcing_set() to set_enforcing(). Signed-off-by: Paul Moore security/selinux/avc.c | 2 +- security/selinux/hooks.c | 4 ++-- security/selinux/include/security.h | 8 ++++---- security/selinux/selinuxfs.c | 6 +++--- security/selinux/ss/services.c | 6 +++--- security/selinux/ss/status.c | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) commit ce99319a182fe766be67f96338386f3ec73e321c Author: Maxime Chevallier Date: Fri Mar 2 15:55:09 2018 +0100 spi: Fix scatterlist elements size in spi_map_buf When SPI transfers can be offloaded using DMA, the SPI core need to build a scatterlist to make sure that the buffer to be transferred is dma-able. This patch fixes the scatterlist entry size computation in the case where the maximum acceptable scatterlist entry supported by the DMA controller is less than PAGE_SIZE, when the buffer is vmalloced. For each entry, the actual size is given by the minimum between the desc_len (which is the max buffer size supported by the DMA controller) and the remaining buffer length until we cross a page boundary. Fixes: 65598c13fd66 ("spi: Fix per-page mapping of unaligned vmalloc-ed buffer") Signed-off-by: Maxime Chevallier Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 23ea8b63a1e2e15199da4461eb303f642fa04f60 Author: Brijesh Singh Date: Thu Feb 15 13:34:45 2018 -0600 include: psp-sev: Capitalize invalid length enum Commit 1d57b17c60ff ("crypto: ccp: Define SEV userspace ioctl and command id") added the invalid length enum but we missed capitalizing it. Fixes: 1d57b17c60ff (crypto: ccp: Define SEV userspace ioctl ...) Cc: Herbert Xu Cc: Borislav Petkov Cc: Tom Lendacky CC: Gary R Hook Signed-off-by: Brijesh Singh Acked-by: Gary R Hook Signed-off-by: Herbert Xu include/uapi/linux/psp-sev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e385b5b787c86ed16fb414139e7068395327a254 Author: Brijesh Singh Date: Thu Feb 15 13:34:44 2018 -0600 crypto: ccp - Fix sparse, use plain integer as NULL pointer Fix sparse warning: Using plain integer as NULL pointer. Replaces assignment of 0 to pointer with NULL assignment. Fixes: 200664d5237f (Add Secure Encrypted Virtualization ...) Cc: Borislav Petkov Cc: Herbert Xu Cc: Gary Hook Cc: Tom Lendacky Signed-off-by: Brijesh Singh Acked-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/psp-dev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 32078b727ded0231b6265c6694ff49b0f76c27a0 Author: Ville Syrjälä Date: Thu Feb 22 23:28:02 2018 +0200 drm/i915: Deduplicate the code to fill the aux message header We have two instances of the code to fill out the header for the aux message. Pull it into a small helper. v2: Rebase due to txbuf[] changes Cc: Sean Paul Cc: Ramalingam C Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180222212802.4826-1-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C drivers/gpu/drm/i915/intel_dp.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit 8159c796b6d7919bd77c84b8b9a4aa2e76f45491 Author: Ville Syrjälä Date: Thu Feb 22 23:27:32 2018 +0200 drm/i915: Keep the AKSV details in intel_dp_hdcp_write_an_aksv() Let's try to keep the details on the AKSV stuff concentrated in one place. So move the control bit and +5 data size handling there. v2: Increase txbuf[] to include the payload which intel_dp_aux_xfer() will still load into the registers even though the hardware will ignore it Cc: Sean Paul Cc: Ramalingam C Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180222212732.4665-1-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C drivers/gpu/drm/i915/intel_dp.c | 42 +++++++++++++---------------------------- 1 file changed, 13 insertions(+), 29 deletions(-) commit f76062651823bf7318f0bc9c104f86853c1d9046 Author: Ville Syrjälä Date: Thu Feb 22 20:10:34 2018 +0200 drm/i915: s/intel_dp_aux_ch/intel_dp_aux_xfer/ Rename intel_dp_aux_ch() to intel_dp_aux_xfer() to better convey what it actually does. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180222181036.15251-6-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson #irc drivers/gpu/drm/i915/intel_dp.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 928c4a5ce8684d2c8a37543b3361cfc12d83b167 Author: Leo Yan Date: Tue Jan 9 12:32:42 2018 +0800 arm64: dts: Hi3660: Remove 'CPU_NAP' idle state Thanks a lot for Vincent Guittot careful work to find bug for 'CPU_NAP' idle state. At early time, the CPU CA73 CPU_NAP idle state has been supported on Hikey960. Later we found the system has the hang issue and for resolving this issue Hisilicon released new MCU firmware, but unfortunately the new MCU firmware has side effect and results in the CA73 CPU cannot really enter CPU_NAP state and roll back to WFI state. After discussion we cannot see the possibility to enable CA73 CPU_NAP state anymore on Hikey960, based on this conclusion we should remove this state from DT binding. Cc: Daniel Lezcano Cc: Kevin Wang Cc: Vincent Guittot Signed-off-by: Leo Yan Tested-by: Vincent Guittot Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 32 ++++--------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) commit 6bbec98e91e688bc7513508992a537d743cb61c3 Author: Dmitry Shmidt Date: Thu Mar 1 20:18:47 2018 +0800 arm64: dts: hi6220: enable watchdog This patch is to add watchdog binding for Hi6220 on Hikey board. Signed-off-by: Dmitry Shmidt Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 183879d8c6a6b4d8904330b21de4f27fb121179a Author: Viresh Kumar Date: Fri Feb 9 14:28:05 2018 +0530 ARM64: dts: hi6220: Remove "cooling-{min|max}-level" for CPU nodes The "cooling-min-level" and "cooling-max-level" properties are not parsed by any part of the kernel currently and the max cooling state of a CPU cooling device is found by referring to the cpufreq table instead. Moreover, the entries are incorrect here as min level is 4 and the max level is 0. Remove the unused properties from the CPU nodes. Signed-off-by: Viresh Kumar Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 2 -- 1 file changed, 2 deletions(-) commit abd7d0972a192ee653efc7b151a6af69db58f2bb Author: oscardagrach Date: Wed Jan 17 14:35:30 2018 -0600 arm64: dts: hikey: Enable HS200 mode on eMMC According to the hi6220 datasheet, the MMC controller is JEDEC eMMC 4.5 compliant, in addition to supporting a clock of up to 150MHz. The Hikey schematic also indicates the device utilizes 1.8v signaling. Define these parameters in the device tree to enable HS200 mode. Signed-off-by: Ryan Grachek Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 2 ++ 1 file changed, 2 insertions(+) commit 17f21343d7a0affc77b6cc1433cffa503433bbe6 Author: Shameerali Kolothum Thodi Date: Thu Dec 14 16:09:57 2017 +0000 arm64: dts: hisi: Disable hisilicon smmu node on hip06/hip07 The HiSilicon erratum 161010801 describes the limitation of HiSilicon platforms hip06/hip07 to support the SMMUv3 mappings for MSI transactions. PCIe controller on these platforms has to differentiate the MSI payload against other DMA payload and has to modify the MSI payload. This makes it difficult for these platforms to have SMMU translation for MSI. In order to workaround this, ARM SMMUv3 driver requires a quirk to treat the MSI regions separately. Such a quirk is currently missing for DT based systems and therefore we need to explicitly disable the hip06/hip07 smmu entries in dts. Signed-off-by: Shameer Kolothum Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hip06.dtsi | 56 ++++++++++++++++++++++++++++++++ arch/arm64/boot/dts/hisilicon/hip07.dtsi | 25 ++++++++++++++ 2 files changed, 81 insertions(+) commit 0a9eb80e643064266868bd2fb2cd608e669309b0 Author: Maciej S. Szmigiero Date: Sat Feb 24 17:03:21 2018 +0100 crypto: ccp - return an actual key size from RSA max_size callback rsa-pkcs1pad uses a value returned from a RSA implementation max_size callback as a size of an input buffer passed to the RSA implementation for encrypt and sign operations. CCP RSA implementation uses a hardware input buffer which size depends only on the current RSA key length, so it should return this key length in the max_size callback, too. This also matches what the kernel software RSA implementation does. Previously, the value returned from this callback was always the maximum RSA key size the CCP hardware supports. This resulted in this huge buffer being passed by rsa-pkcs1pad to CCP even for smaller key sizes and then in a buffer overflow when ccp_run_rsa_cmd() tried to copy this large input buffer into a RSA key length-sized hardware input buffer. Signed-off-by: Maciej S. Szmigiero Fixes: ceeec0afd684 ("crypto: ccp - Add support for RSA on the CCP") Cc: stable@vger.kernel.org Acked-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-crypto-rsa.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 79eb382b5e06a6dca5806465d7195d686a463ab0 Author: Sebastian Andrzej Siewior Date: Fri Feb 23 23:33:07 2018 +0100 crypto: ccp - don't disable interrupts while setting up debugfs I don't why we need take a single write lock and disable interrupts while setting up debugfs. This is what what happens when we try anyway: |ccp 0000:03:00.2: enabling device (0000 -> 0002) |BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:69 |in_atomic(): 1, irqs_disabled(): 1, pid: 3, name: kworker/0:0 |irq event stamp: 17150 |hardirqs last enabled at (17149): [<0000000097a18c49>] restore_regs_and_return_to_kernel+0x0/0x23 |hardirqs last disabled at (17150): [<000000000773b3a9>] _raw_write_lock_irqsave+0x1b/0x50 |softirqs last enabled at (17148): [<0000000064d56155>] __do_softirq+0x3b8/0x4c1 |softirqs last disabled at (17125): [<0000000092633c18>] irq_exit+0xb1/0xc0 |CPU: 0 PID: 3 Comm: kworker/0:0 Not tainted 4.16.0-rc2+ #30 |Workqueue: events work_for_cpu_fn |Call Trace: | dump_stack+0x7d/0xb6 | ___might_sleep+0x1eb/0x250 | down_write+0x17/0x60 | start_creating+0x4c/0xe0 | debugfs_create_dir+0x9/0x100 | ccp5_debugfs_setup+0x191/0x1b0 | ccp5_init+0x8a7/0x8c0 | ccp_dev_init+0xb8/0xe0 | sp_init+0x6c/0x90 | sp_pci_probe+0x26e/0x590 | local_pci_probe+0x3f/0x90 | work_for_cpu_fn+0x11/0x20 | process_one_work+0x1ff/0x650 | worker_thread+0x1d4/0x3a0 | kthread+0xfe/0x130 | ret_from_fork+0x27/0x50 If any locking is required, a simple mutex will do it. Cc: Gary R Hook Signed-off-by: Sebastian Andrzej Siewior Acked-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-debugfs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 5d804a5157dbaa64872a675923ae87161165c66b Author: Antoine Tenart Date: Fri Feb 23 10:01:40 2018 +0100 crypto: atmel-aes - fix the keys zeroing on errors The Atmel AES driver uses memzero_explicit on the keys on error, but the variable zeroed isn't the right one because of a typo. Fix this by using the right variable. Fixes: 89a82ef87e01 ("crypto: atmel-authenc - add support to authenc(hmac(shaX), Y(aes)) modes") Signed-off-by: Antoine Tenart Reviewed-by: Tudor Ambarus Signed-off-by: Herbert Xu drivers/crypto/atmel-aes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 699e491bac84a2069c7abeacf2f4367ecb19fa9c Author: Rui Miguel Silva Date: Thu Feb 22 14:22:48 2018 +0000 crypto: caam - do not use mem and emi_slow clock for imx7x I.MX7x only use two clocks for the CAAM module, so make sure we do not try to use the mem and the emi_slow clock when running in that imx7d and imx7s machine type. Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: "David S. Miller" Cc: Lukas Auer Signed-off-by: Rui Miguel Silva Signed-off-by: Herbert Xu drivers/crypto/caam/ctrl.c | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) commit b85149f6f5d5a9279f29a73b2e95342f4d465e73 Author: Rui Miguel Silva Date: Thu Feb 22 14:22:47 2018 +0000 crypto: caam - Fix null dereference at error path caam_remove already removes the debugfs entry, so we need to remove the one immediately before calling caam_remove. This fix a NULL dereference at error paths is caam_probe fail. Fixes: 67c2315def06 ("crypto: caam - add Queue Interface (QI) backend support") Tested-by: Ryan Harkin Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: "David S. Miller" Cc: Lukas Auer Cc: # 4.12+ Reviewed-by: Horia Geantă Signed-off-by: Rui Miguel Silva Signed-off-by: Herbert Xu drivers/crypto/caam/ctrl.c | 3 --- 1 file changed, 3 deletions(-) commit 716c7c32eae4b8a45c4f5602b50453865929b670 Author: Brijesh Singh Date: Wed Feb 21 08:41:39 2018 -0600 crypto: ccp - add check to get PSP master only when PSP is detected Paulian reported the below kernel crash on Ryzen 5 system: BUG: unable to handle kernel NULL pointer dereference at 0000000000000073 RIP: 0010:.LC0+0x41f/0xa00 RSP: 0018:ffffa9968003bdd0 EFLAGS: 00010002 RAX: ffffffffb113b130 RBX: 0000000000000000 RCX: 00000000000005a7 RDX: 00000000000000ff RSI: ffff8b46dee651a0 RDI: ffffffffb1bd617c RBP: 0000000000000246 R08: 00000000000251a0 R09: 0000000000000000 R10: ffffd81f11a38200 R11: ffff8b52e8e0a161 R12: ffffffffb19db220 R13: 0000000000000007 R14: ffffffffb17e4888 R15: 5dccd7affc30a31e FS: 0000000000000000(0000) GS:ffff8b46dee40000(0000) knlGS:0000000000000000 CR2: 0000000000000073 CR3: 000080128120a000 CR4: 00000000003406e0 Call Trace: ? sp_get_psp_master_device+0x56/0x80 ? map_properties+0x540/0x540 ? psp_pci_init+0x20/0xe0 ? map_properties+0x540/0x540 ? sp_mod_init+0x16/0x1a ? do_one_initcall+0x4b/0x190 ? kernel_init_freeable+0x19b/0x23c ? rest_init+0xb0/0xb0 ? kernel_init+0xa/0x100 ? ret_from_fork+0x22/0x40 Since Ryzen does not support PSP/SEV firmware hence i->psp_data will NULL in all sp instances. In those cases, 'i' will point to the list head after list_for_each_entry(). Dereferencing the head will cause kernel crash. Add check to call get master device only when PSP/SEV is detected. Reported-by: Paulian Bogdan Marinca Cc: Borislav Petkov Cc: Tom Lendacky CC: Gary R Hook Cc: linux-kernel@vger.kernel.org Signed-off-by: Brijesh Singh Signed-off-by: Herbert Xu drivers/crypto/ccp/sp-dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0e145b477dea594ee5b588feb7cb0f531e2d263d Author: Eric Biggers Date: Mon Feb 19 23:48:28 2018 -0800 crypto: ablk_helper - remove ablk_helper All users of ablk_helper have been converted over to crypto_simd, so remove ablk_helper. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/Kconfig | 4 -- crypto/Makefile | 1 - crypto/ablk_helper.c | 150 ------------------------------------------- include/crypto/ablk_helper.h | 32 --------- 4 files changed, 187 deletions(-) commit 75d8a5532fc6db34e5aa712ec8117c9f9cb83088 Author: Eric Biggers Date: Mon Feb 19 23:48:27 2018 -0800 crypto: x86/glue_helper - rename glue_skwalk_fpu_begin() There are no users of the original glue_fpu_begin() anymore, so rename glue_skwalk_fpu_begin() to glue_fpu_begin() so that it matches glue_fpu_end() again. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/cast5_avx_glue.c | 4 ++-- arch/x86/crypto/glue_helper.c | 21 +++++++++------------ arch/x86/include/asm/crypto/glue_helper.h | 7 +++---- 3 files changed, 14 insertions(+), 18 deletions(-) commit 0d87d0f4254cc581d3fac51d1e11b51b2549e42a Author: Eric Biggers Date: Mon Feb 19 23:48:26 2018 -0800 crypto: x86/glue_helper - remove blkcipher_walk functions Now that all glue_helper users have been switched from the blkcipher interface over to the skcipher interface, remove the versions of the glue_helper functions that handled the blkcipher interface. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/glue_helper.c | 344 ------------------------------ arch/x86/include/asm/crypto/glue_helper.h | 62 ------ 2 files changed, 406 deletions(-) commit 217afccf65064709fb032652ee17cc0a8f68b7b5 Author: Eric Biggers Date: Mon Feb 19 23:48:25 2018 -0800 crypto: lrw - remove lrw_crypt() Now that all users of lrw_crypt() have been removed in favor of the LRW template wrapping an ECB mode algorithm, remove lrw_crypt(). Also remove crypto/lrw.h as that is no longer needed either; and fold 'struct lrw_table_ctx' into 'struct priv', lrw_init_table() into setkey(), and lrw_free_table() into exit_tfm(). Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/glue_helper.c | 1 - crypto/lrw.c | 152 +++++++++++------------------------------- include/crypto/lrw.h | 44 ------------ 3 files changed, 39 insertions(+), 158 deletions(-) commit eb66ecd56107e563de65121866990ec07142245d Author: Eric Biggers Date: Mon Feb 19 23:48:24 2018 -0800 crypto: xts - remove xts_crypt() Now that all users of xts_crypt() have been removed in favor of the XTS template wrapping an ECB mode algorithm, remove xts_crypt(). Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/xts.c | 72 ---------------------------------------------------- include/crypto/xts.h | 17 ------------- 2 files changed, 89 deletions(-) commit 44893bc2962363417ff9bed7876e0e58741e4f76 Author: Eric Biggers Date: Mon Feb 19 23:48:23 2018 -0800 crypto: x86/camellia-aesni-avx, avx2 - convert to skcipher interface Convert the AESNI AVX and AESNI AVX2 implementations of Camellia from the (deprecated) ablkcipher and blkcipher interfaces over to the skcipher interface. Note that this includes replacing the use of ablk_helper with crypto_simd. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/camellia_aesni_avx2_glue.c | 313 +++++++++------------------- arch/x86/crypto/camellia_aesni_avx_glue.c | 321 +++++++++-------------------- arch/x86/include/asm/crypto/camellia.h | 4 +- crypto/Kconfig | 13 +- 4 files changed, 208 insertions(+), 443 deletions(-) commit 1af6d03710126392e7333417fcaf2427bfc8f169 Author: Eric Biggers Date: Mon Feb 19 23:48:22 2018 -0800 crypto: x86/camellia - convert to skcipher interface Convert the x86 asm implementation of Camellia from the (deprecated) blkcipher interface over to the skcipher interface. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/camellia_glue.c | 162 ++++++++++++++++++++-------------------- crypto/Kconfig | 2 +- 2 files changed, 80 insertions(+), 84 deletions(-) commit 451cc493246e59e265715dd9d2f8e1a25b23b83d Author: Eric Biggers Date: Mon Feb 19 23:48:21 2018 -0800 crypto: x86/camellia - remove XTS algorithm The XTS template now wraps an ECB mode algorithm rather than the block cipher directly. Therefore it is now redundant for crypto modules to wrap their ECB code with generic XTS code themselves via xts_crypt(). Remove the xts-camellia-asm algorithm which did this. Users who request xts(camellia) and previously would have gotten xts-camellia-asm will now get xts(ecb-camellia-asm) instead, which is just as fast. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/camellia_aesni_avx_glue.c | 22 ++++++ arch/x86/crypto/camellia_glue.c | 111 ------------------------------ arch/x86/include/asm/crypto/camellia.h | 3 +- crypto/Kconfig | 1 - 4 files changed, 24 insertions(+), 113 deletions(-) commit 6043d341f0b57034ec92e26d353ccb450563d18e Author: Eric Biggers Date: Mon Feb 19 23:48:20 2018 -0800 crypto: x86/camellia - remove LRW algorithm The LRW template now wraps an ECB mode algorithm rather than the block cipher directly. Therefore it is now redundant for crypto modules to wrap their ECB code with generic LRW code themselves via lrw_crypt(). Remove the lrw-camellia-asm algorithm which did this. Users who request lrw(camellia) and previously would have gotten lrw-camellia-asm will now get lrw(ecb-camellia-asm) instead, which is just as fast. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/camellia_glue.c | 85 +--------------------------------- arch/x86/include/asm/crypto/camellia.h | 10 ---- crypto/Kconfig | 1 - 3 files changed, 1 insertion(+), 95 deletions(-) commit 44c9b75409819707a94b377e69ff7948928e4b1b Author: Eric Biggers Date: Mon Feb 19 23:48:19 2018 -0800 crypto: x86/camellia-aesni-avx2 - remove LRW algorithm The LRW template now wraps an ECB mode algorithm rather than the block cipher directly. Therefore it is now redundant for crypto modules to wrap their ECB code with generic LRW code themselves via lrw_crypt(). Remove the lrw-camellia-aesni-avx2 algorithm which did this. Users who request lrw(camellia) and previously would have gotten lrw-camellia-aesni-avx2 will now get lrw(ecb-camellia-aesni-avx2) instead, which is just as fast. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/camellia_aesni_avx2_glue.c | 180 +---------------------------- crypto/Kconfig | 1 - 2 files changed, 1 insertion(+), 180 deletions(-) commit 6fcb81b562cf5b75c543a9e29fea30d439af3560 Author: Eric Biggers Date: Mon Feb 19 23:48:18 2018 -0800 crypto: x86/camellia-aesni-avx - remove LRW algorithm The LRW template now wraps an ECB mode algorithm rather than the block cipher directly. Therefore it is now redundant for crypto modules to wrap their ECB code with generic LRW code themselves via lrw_crypt(). Remove the lrw-camellia-aesni algorithm which did this. Users who request lrw(camellia) and previously would have gotten lrw-camellia-aesni will now get lrw(ecb-camellia-aesni) instead, which is just as fast. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/camellia_aesni_avx_glue.c | 168 +----------------------------- arch/x86/include/asm/crypto/camellia.h | 1 + crypto/Kconfig | 1 - 3 files changed, 2 insertions(+), 168 deletions(-) commit 09c0f03bf8ce9304e0d17131c46690b2c95209f4 Author: Eric Biggers Date: Mon Feb 19 23:48:17 2018 -0800 crypto: x86/des3_ede - convert to skcipher interface Convert the x86 asm implementation of Triple DES from the (deprecated) blkcipher interface over to the skcipher interface. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/des3_ede_glue.c | 238 ++++++++++++++++++++-------------------- crypto/Kconfig | 2 +- 2 files changed, 120 insertions(+), 120 deletions(-) commit c1679171c61c2998a16dc4cc8b0ed0569db1fba9 Author: Eric Biggers Date: Mon Feb 19 23:48:16 2018 -0800 crypto: x86/blowfish: convert to skcipher interface Convert the x86 asm implementation of Blowfish from the (deprecated) blkcipher interface over to the skcipher interface. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/blowfish_glue.c | 230 ++++++++++++++++++++-------------------- crypto/Kconfig | 2 +- 2 files changed, 114 insertions(+), 118 deletions(-) commit 4bd969243143e224d5aa450fdea1c882a75aa58e Author: Eric Biggers Date: Mon Feb 19 23:48:15 2018 -0800 crypto: x86/cast6-avx - convert to skcipher interface Convert the AVX implementation of CAST6 from the (deprecated) ablkcipher and blkcipher interfaces over to the skcipher interface. Note that this includes replacing the use of ablk_helper with crypto_simd. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/cast6_avx_glue.c | 311 +++++++++++++-------------------------- crypto/Kconfig | 9 +- 2 files changed, 104 insertions(+), 216 deletions(-) commit f51a1fa43972c93e08a608df51182d90ab8d7594 Author: Eric Biggers Date: Mon Feb 19 23:48:14 2018 -0800 crypto: x86/cast6-avx - remove LRW algorithm The LRW template now wraps an ECB mode algorithm rather than the block cipher directly. Therefore it is now redundant for crypto modules to wrap their ECB code with generic LRW code themselves via lrw_crypt(). Remove the lrw-cast6-avx algorithm which did this. Users who request lrw(cast6) and previously would have gotten lrw-cast6-avx will now get lrw(ecb-cast6-avx) instead, which is just as fast. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/cast6_avx_glue.c | 180 +-------------------------------------- crypto/Kconfig | 1 - 2 files changed, 1 insertion(+), 180 deletions(-) commit 1e63183a203dba8333677c9490455df48f937ea0 Author: Eric Biggers Date: Mon Feb 19 23:48:13 2018 -0800 crypto: x86/cast5-avx - convert to skcipher interface Convert the AVX implementation of CAST5 from the (deprecated) ablkcipher and blkcipher interfaces over to the skcipher interface. Note that this includes replacing the use of ablk_helper with crypto_simd. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/cast5_avx_glue.c | 351 ++++++++++++++------------------------- crypto/Kconfig | 7 +- 2 files changed, 130 insertions(+), 228 deletions(-) commit 8f461b1e02ed546fbd0f11611138da67fd85a30f Author: Eric Biggers Date: Mon Feb 19 23:48:12 2018 -0800 crypto: x86/cast5-avx - fix ECB encryption when long sg follows short one With ecb-cast5-avx, if a 128+ byte scatterlist element followed a shorter one, then the algorithm accidentally encrypted/decrypted only 8 bytes instead of the expected 128 bytes. Fix it by setting the encryption/decryption 'fn' correctly. Fixes: c12ab20b162c ("crypto: cast5/avx - avoid using temporary stack buffers") Cc: # v3.8+ Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/cast5_avx_glue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0e6ab46dadb0ec7b76ab3aa41eae3920cdd4d82b Author: Eric Biggers Date: Mon Feb 19 23:48:11 2018 -0800 crypto: x86/twofish-avx - convert to skcipher interface Convert the AVX implementation of Twofish from the (deprecated) ablkcipher and blkcipher interfaces over to the skcipher interface. Note that this includes replacing the use of ablk_helper with crypto_simd. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/twofish_avx_glue.c | 315 ++++++++++++------------------------- crypto/Kconfig | 6 +- 2 files changed, 102 insertions(+), 219 deletions(-) commit 876e9f0c12778bcdc64040031974e0dcf1d99bd5 Author: Eric Biggers Date: Mon Feb 19 23:48:10 2018 -0800 crypto: x86/twofish-avx - remove LRW algorithm The LRW template now wraps an ECB mode algorithm rather than the block cipher directly. Therefore it is now redundant for crypto modules to wrap their ECB code with generic LRW code themselves via lrw_crypt(). Remove the lrw-twofish-avx algorithm which did this. Users who request lrw(twofish) and previously would have gotten lrw-twofish-avx will now get lrw(ecb-twofish-avx) instead, which is just as fast. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/twofish_avx_glue.c | 189 +------------------------------------ crypto/Kconfig | 1 - 2 files changed, 1 insertion(+), 189 deletions(-) commit 37992fa47f9ac7e42650eec748d50da0398afa70 Author: Eric Biggers Date: Mon Feb 19 23:48:09 2018 -0800 crypto: x86/twofish-3way - convert to skcipher interface Convert the 3-way implementation of Twofish from the (deprecated) blkcipher interface over to the skcipher interface. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/twofish_glue_3way.c | 151 ++++++++++++++++-------------------- crypto/Kconfig | 2 +- 2 files changed, 68 insertions(+), 85 deletions(-) commit ebeea983dd185a29e237ce1a5217fa7196cf64ad Author: Eric Biggers Date: Mon Feb 19 23:48:08 2018 -0800 crypto: x86/twofish-3way - remove XTS algorithm The XTS template now wraps an ECB mode algorithm rather than the block cipher directly. Therefore it is now redundant for crypto modules to wrap their ECB code with generic XTS code themselves via xts_crypt(). Remove the xts-twofish-3way algorithm which did this. Users who request xts(twofish) and previously would have gotten xts-twofish-3way will now get xts(ecb-twofish-3way) instead, which is just as fast. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/twofish_avx_glue.c | 25 ++++++++ arch/x86/crypto/twofish_glue_3way.c | 109 ---------------------------------- arch/x86/include/asm/crypto/twofish.h | 8 --- crypto/Kconfig | 1 - 4 files changed, 25 insertions(+), 118 deletions(-) commit 68bfc4924b536ed052198121aef01c525ff6831d Author: Eric Biggers Date: Mon Feb 19 23:48:07 2018 -0800 crypto: x86/twofish-3way - remove LRW algorithm The LRW template now wraps an ECB mode algorithm rather than the block cipher directly. Therefore it is now redundant for crypto modules to wrap their ECB code with generic LRW code themselves via lrw_crypt(). Remove the lrw-twofish-3way algorithm which did this. Users who request lrw(twofish) and previously would have gotten lrw-twofish-3way will now get lrw(ecb-twofish-3way) instead, which is just as fast. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/twofish_avx_glue.c | 26 +++++++++++ arch/x86/crypto/twofish_glue_3way.c | 81 +---------------------------------- arch/x86/include/asm/crypto/twofish.h | 11 ----- crypto/Kconfig | 1 - 4 files changed, 27 insertions(+), 92 deletions(-) commit e16bf974b3d965edc9bd76fc645c3ee2c40c33b8 Author: Eric Biggers Date: Mon Feb 19 23:48:06 2018 -0800 crypto: x86/serpent-avx,avx2 - convert to skcipher interface Convert the AVX and AVX2 implementations of Serpent from the (deprecated) ablkcipher and blkcipher interfaces over to the skcipher interface. Note that this includes replacing the use of ablk_helper with crypto_simd. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/serpent_avx2_glue.c | 304 +++++++++----------------- arch/x86/crypto/serpent_avx_glue.c | 343 ++++++++++-------------------- arch/x86/include/asm/crypto/serpent-avx.h | 7 +- crypto/Kconfig | 11 +- 4 files changed, 219 insertions(+), 446 deletions(-) commit 340b83032634c37f10626be7388052583a9a4d95 Author: Eric Biggers Date: Mon Feb 19 23:48:05 2018 -0800 crypto: x86/serpent-avx - remove LRW algorithm The LRW template now wraps an ECB mode algorithm rather than the block cipher directly. Therefore it is now redundant for crypto modules to wrap their ECB code with generic LRW code themselves via lrw_crypt(). Remove the lrw-serpent-avx algorithm which did this. Users who request lrw(serpent) and previously would have gotten lrw-serpent-avx will now get lrw(ecb-serpent-avx) instead, which is just as fast. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/serpent_avx_glue.c | 177 +----------------------------- arch/x86/include/asm/crypto/serpent-avx.h | 10 -- crypto/Kconfig | 1 - 3 files changed, 1 insertion(+), 187 deletions(-) commit e5f382e643811dce87d0f47f87e8bd1102a0feb5 Author: Eric Biggers Date: Mon Feb 19 23:48:04 2018 -0800 crypto: x86/serpent-avx2 - remove LRW algorithm The LRW template now wraps an ECB mode algorithm rather than the block cipher directly. Therefore it is now redundant for crypto modules to wrap their ECB code with generic LRW code themselves via lrw_crypt(). Remove the lrw-serpent-avx2 algorithm which did this. Users who request lrw(serpent) and previously would have gotten lrw-serpent-avx2 will now get lrw(ecb-serpent-avx2) instead, which is just as fast. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/serpent_avx2_glue.c | 176 +----------------------------------- crypto/Kconfig | 1 - 2 files changed, 1 insertion(+), 176 deletions(-) commit e0f409dcb82e463663affa461342d54a23ac8456 Author: Eric Biggers Date: Mon Feb 19 23:48:03 2018 -0800 crypto: x86/serpent-sse2 - convert to skcipher interface Convert the SSE2 implementation of Serpent from the (deprecated) ablkcipher and blkcipher interfaces over to the skcipher interface. Note that this includes replacing the use of ablk_helper with crypto_simd. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/serpent_sse2_glue.c | 221 ++++++++++++------------------------ crypto/Kconfig | 10 +- 2 files changed, 74 insertions(+), 157 deletions(-) commit 8bab4e3cd51f2143a10d5ca6b0ae5b8fc08c72bd Author: Eric Biggers Date: Mon Feb 19 23:48:02 2018 -0800 crypto: x86/serpent-sse2 - remove XTS algorithm The XTS template now wraps an ECB mode algorithm rather than the block cipher directly. Therefore it is now redundant for crypto modules to wrap their ECB code with generic XTS code themselves via xts_crypt(). Remove the xts-serpent-sse2 algorithm which did this. Users who request xts(serpent) and previously would have gotten xts-serpent-sse2 will now get xts(ecb-serpent-sse2) instead, which is just as fast. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/serpent_sse2_glue.c | 172 ------------------------------------ crypto/Kconfig | 2 - 2 files changed, 174 deletions(-) commit 2a05cfc35f5e251479c4fa86538461c1e4139e46 Author: Eric Biggers Date: Mon Feb 19 23:48:01 2018 -0800 crypto: x86/serpent-sse2 - remove LRW algorithm The LRW template now wraps an ECB mode algorithm rather than the block cipher directly. Therefore it is now redundant for crypto modules to wrap their ECB code with generic LRW code themselves via lrw_crypt(). Remove the lrw-serpent-sse2 algorithm which did this. Users who request lrw(serpent) and previously would have gotten lrw-serpent-sse2 will now get lrw(ecb-serpent-sse2) instead, which is just as fast. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/serpent_sse2_glue.c | 130 +----------------------------------- crypto/Kconfig | 2 - 2 files changed, 1 insertion(+), 131 deletions(-) commit f15f2a2542839adc45d5f216ddd9a895062707fe Author: Eric Biggers Date: Mon Feb 19 23:48:00 2018 -0800 crypto: x86/glue_helper - add skcipher_walk functions Add ECB, CBC, and CTR functions to glue_helper which use skcipher_walk rather than blkcipher_walk. This will allow converting the remaining x86 algorithms from the blkcipher interface over to the skcipher interface, after which we'll be able to remove the blkcipher_walk versions of these functions. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/glue_helper.c | 207 ++++++++++++++++++++++++++++++ arch/x86/include/asm/crypto/glue_helper.h | 12 ++ 2 files changed, 219 insertions(+) commit d14f0a1fc488af563ec3b3767383190d2b331b5e Author: Eric Biggers Date: Mon Feb 19 23:47:59 2018 -0800 crypto: simd - allow registering multiple algorithms at once Add a function to crypto_simd that registers an array of skcipher algorithms, then allocates and registers the simd wrapper algorithms for them. It assumes the naming scheme where the names of the underlying algorithms are prefixed with two underscores. Also add the corresponding 'unregister' function. Most of the x86 crypto modules will be able to use these. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/simd.c | 50 ++++++++++++++++++++++++++++++++++++++++++ include/crypto/internal/simd.h | 7 ++++++ 2 files changed, 57 insertions(+) commit d800e3430e51e3450d8fa25b2eb2a50e5e413f29 Author: Gilad Ben-Yossef Date: Mon Feb 19 14:51:24 2018 +0000 crypto: ccree - replace memset+kfree with kzfree Replace memset to 0 followed by kfree with kzfree for simplicity. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu drivers/crypto/ccree/cc_request_mgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 27b3b22dd98caef023cbaa4871b356e4596a81af Author: Gilad Ben-Yossef Date: Mon Feb 19 14:51:23 2018 +0000 crypto: ccree - add support for older HW revs Add support for the legacy CryptoCell 630 and 710 revs. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 6 +- drivers/crypto/ccree/cc_aead.c | 34 ++++++-- drivers/crypto/ccree/cc_cipher.c | 25 +++++- drivers/crypto/ccree/cc_crypto_ctx.h | 16 ---- drivers/crypto/ccree/cc_driver.c | 68 ++++++++++++--- drivers/crypto/ccree/cc_driver.h | 23 ++++- drivers/crypto/ccree/cc_fips.c | 13 ++- drivers/crypto/ccree/cc_hash.c | 149 ++++++++++++++++---------------- drivers/crypto/ccree/cc_hash.h | 12 +-- drivers/crypto/ccree/cc_host_regs.h | 3 + drivers/crypto/ccree/cc_hw_queue_defs.h | 2 +- drivers/crypto/ccree/cc_kernel_regs.h | 1 + drivers/crypto/ccree/cc_request_mgr.c | 6 +- drivers/crypto/ccree/cc_sram_mgr.c | 14 +++ 14 files changed, 237 insertions(+), 135 deletions(-) commit 9d3a45ea209fd1daf3bb9e66a07caf59bf7da9fc Author: Gilad Ben-Yossef Date: Mon Feb 19 14:51:22 2018 +0000 dt-bindings: Add DT bindings for ccree 710 and 630p Add device tree bindings for Arm CryptoCell 710 and 630p hardware revisions. Signed-off-by: Gilad Ben-Yossef Reviewed-by: Rob Herring Signed-off-by: Herbert Xu Documentation/devicetree/bindings/crypto/arm-cryptocell.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 613713922896cd46b09a94da6372374e252764b5 Author: Gilad Ben-Yossef Date: Mon Feb 19 14:51:21 2018 +0000 crypto: ccree - remove unused definitions Remove enum definition which are not used by the REE interface driver. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu drivers/crypto/ccree/cc_crypto_ctx.h | 20 -------------------- 1 file changed, 20 deletions(-) commit c42bd6335b4854965ef7d32992183b43bf97fb4a Author: Robin Murphy Date: Mon Feb 19 13:55:36 2018 +0000 crypto: marvell/cesa - Clean up redundant #include The inclusion of dma-direct.h was only needed temporarily to prevent breakage from the DMA API rework, since the actual CESA fix making it redundant was merged in parallel. Now that both have landed, it can go. Signed-off-by: Robin Murphy Signed-off-by: Herbert Xu drivers/crypto/marvell/cesa.c | 1 - 1 file changed, 1 deletion(-) commit 279f4f8f2f67b7a2dbb916738667a633b223efde Author: lionel.debieve@st.com Date: Thu Feb 15 14:03:12 2018 +0100 hwrng: stm32 - rework read timeout calculation Increase timeout delay to support longer timing linked to rng initialization. Measurement is based on timer instead of instructions per iteration which is not powerful on all targets. Signed-off-by: Lionel Debieve Signed-off-by: Herbert Xu drivers/char/hw_random/stm32-rng.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit a888df9b89b785c6dc6fcbf886f0ccda57f98b3a Author: lionel.debieve@st.com Date: Thu Feb 15 14:03:11 2018 +0100 dt-bindings: rng: add clock detection error for stm32 Add optional property to enable the clock detection error on rng block. It is used to allow slow clock source which give correct entropy for rng. Signed-off-by: Lionel Debieve Signed-off-by: Herbert Xu Documentation/devicetree/bindings/rng/st,stm32-rng.txt | 1 + 1 file changed, 1 insertion(+) commit 529571ed8d8cc293c112a2061f130a3f8d458954 Author: lionel.debieve@st.com Date: Thu Feb 15 14:03:10 2018 +0100 hwrng: stm32 - allow disable clock error detection Add a new property that allow to disable the clock error detection which is required when the clock source selected is out of specification (which is not mandatory). Signed-off-by: Lionel Debieve Signed-off-by: Herbert Xu drivers/char/hw_random/stm32-rng.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 695788fd1b41938e86b9fba9670f751599836b2d Author: lionel.debieve@st.com Date: Thu Feb 15 14:03:09 2018 +0100 dt-bindings: rng: add reset node for stm32 Adding optional resets property for rng. Signed-off-by: Lionel Debieve Signed-off-by: Herbert Xu Documentation/devicetree/bindings/rng/st,stm32-rng.txt | 3 +++ 1 file changed, 3 insertions(+) commit 326ed382256475aa4b8b7eae8a2f60689fd25e78 Author: lionel.debieve@st.com Date: Thu Feb 15 14:03:08 2018 +0100 hwrng: stm32 - add reset during probe Avoid issue when probing the RNG without reset if bad status has been detected previously Signed-off-by: Lionel Debieve Signed-off-by: Herbert Xu drivers/char/hw_random/stm32-rng.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5fc990703e8663b00741f6f86990d33093510302 Author: John Garry Date: Tue Jan 30 21:22:57 2018 +0800 arm64: defconfig: enable IOSCHED_DEADLINE For certain workloads the deadline IO scheduler offers particular advantages over other schedulers and has shown to perform better, so enable it. The default IO scheduler is unaffected by this change, and currently is CFQ. Signed-off-by: John Garry Signed-off-by: Wei Xu arch/arm64/configs/defconfig | 1 - 1 file changed, 1 deletion(-) commit fee0fddc1dc114039bf9aed9fdeeecdc1949cdc7 Author: Imre Deak Date: Thu Mar 1 15:44:57 2018 +0200 drm/i915/gen9, gen10: Disable FBC on planes with a misaligned Y-offset Enabling FBC on a plane having a Y-offset that isn't divisible by 4 may cause pipe FIFO underruns and flickers, so disable FBC on such a config. I tried the followings to work around the issue: - enable each HW work around in ILK_DPFC_CHICKEN - disable each compression algorithm in ILK_DPFC_CONTROL - disable low-power watermarks None of the above got rid of the problem. I haven't found this issue in the Bspec/WA database either. Besides the igt testcase below (yet to be merged) an easy way to reproduce the issue is to enable a plane with FBC and a plane Y-offset not aligned to 4 and then just enable/disable FBC in a loop, keeping the plane enabled. I could trigger the problem on BXT/GLK/SKL/CNL, so assume for now that it's only present on GEN9 and GEN10. v2: (Ville) - Run the test/apply the WA on CNL as well. - Use IS_GEN() instead of INTEL_GEN(). - Fix spelling. Cc: Paulo Zanoni Cc: Ville Syrjälä Testcase: igt/kms_plane/plane-clipping-pipe-A-planes Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180301134457.13974-1-imre.deak@intel.com drivers/gpu/drm/i915/intel_fbc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 45cc842d5b75ba8f9a958f2dd12b95c6dd0452bd Author: Huazhong Tan Date: Thu Jan 18 20:31:37 2018 +0800 arm64: dts: hisi: add hns-dsaf cpld control for the hip07 SoC Add cpld-syscon node to support the cpld control for hns-dsaf on the hip07 SoC. Signed-off-by: Huazhong Tan Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hip07.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit b72c8a7e2ca8c4c085c76d17005241eca2edf93a Author: Colin Ian King Date: Fri Mar 2 13:42:39 2018 +0000 net/usb/kalmia: use ARRAY_SIZE for various array sizing calculations Use the ARRAY_SIZE macro on a couple of arrays to determine size of the arrays. Also fix up alignment to clean up a checkpatch warning. Improvement suggested by Coccinelle. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/usb/kalmia.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3c34cb9defb0d454be20287c1c7c7417ebce7bb3 Author: Ganesh Goudar Date: Fri Mar 2 15:57:07 2018 +0530 cxgb4: Add TP Congestion map entry for single-port Add TP Congestion Map entry for single-port T6 cards. Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 1 + 1 file changed, 1 insertion(+) commit 731cb7e05f376c2e61baff730eaff52f99d3e4b5 Merge: ad0bff0 2e75bb2 Author: David S. Miller Date: Fri Mar 2 09:50:21 2018 -0500 Merge tag 'mac80211-next-for-davem-2018-03-02' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Only a few new things: * hwsim net namespace stuff from Kirill Tkhai * A-MSDU support in fast-RX * 4-addr mode support in fast-RX * support for a spec quirk in Add-BA negotiation ==================== Signed-off-by: David S. Miller commit ad0bff0570727620840c4005992946cce1dff693 Author: Ganesh Goudar Date: Fri Mar 2 14:35:49 2018 +0530 cxgb4: remove dead code when allocating filter Error code is already returned earlier if filter exists at specified location. So, remove dead code trying to free existing filter. Reported-by: Dan Carpenter Signed-off-by: Ganesh Goudar Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 6 ------ 1 file changed, 6 deletions(-) commit 785dffe1daf95c176504dea3069c9df11af7ff15 Author: Chengguang Xu Date: Sun Feb 25 21:25:07 2018 +0800 udf: fix potential refcnt problem of nls module When specifiying iocharset multiple times in a mount or once/multiple in a remount, current option parsing may cause inaccurate refcount of nls module. Also, in the failure cleanup of option parsing, the condition of calling unload_nls is not sufficient. Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara fs/udf/super.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit d09099051057bbae5e1a887167ad6189ac8bfca4 Author: Chengguang Xu Date: Mon Feb 26 17:45:12 2018 +0800 ext2: change return code to -ENOMEM when failing memory allocation Change return code to -ENOMEM from -EINVAL when failing memory allocation in fill_super(), meanwhile delete redundant initial assignment of variable err. Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara fs/ext2/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b72e632c6c7e29343651b0e26539b2e01444dfe6 Author: Jan Kara Date: Tue Feb 27 18:55:31 2018 +0100 udf: Do not mark possibly inconsistent filesystems as closed If logical volume integrity descriptor contains non-closed integrity type when mounting the volume, there are high chances that the volume is not consistent (device was detached before the filesystem was unmounted). Don't touch integrity type of such volume so that fsck can recognize it and check such filesystem. Reported-by: Pali Rohár Reviewed-by: Pali Rohár Signed-off-by: Jan Kara fs/udf/super.c | 8 ++++++-- fs/udf/udf_sb.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) commit b3e9c3f0d98135d8b9991c2a34e42627c20664a4 Author: Ladislav Michl Date: Fri Mar 2 14:11:00 2018 +0100 ASoC: max9867: Drop probe function Driver probe function has no use and can be deleted. Signed-off-by: Ladislav Michl Signed-off-by: Mark Brown sound/soc/codecs/max9867.c | 10 ---------- sound/soc/codecs/max9867.h | 1 - 2 files changed, 11 deletions(-) commit 6f0a45c6d466bfcc94a66ea944babe75629252d4 Merge: 79e1397 91880a6 Author: Mark Brown Date: Fri Mar 2 13:16:52 2018 +0000 Merge branch 'topic/wm9867' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-max9867 commit c39bbb903ce337a3f6a7fe0ac8d30e0876699fc2 Author: Laurent Pinchart Date: Thu Mar 1 22:02:30 2018 +0200 drm: omapdrm: displays: panel-dsi-cm: Fix field access before set The driver accesses the ddata->in field before it gets set in the dsicm_connect() function. Use the local in pointer variable instead. Fixes: 7877632b4cd0 ("drm: omapdrm: displays: Get panel source at connect time") Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2ba08d75eb77a59e8476801b734ff9981c3492b6 Author: Manivannan Sadhasivam Date: Fri Mar 2 09:20:36 2018 +0530 dt-bindings: pinctrl: Add bindings for Actions S900 SoC Add pinctrl bindings for Actions Semi S900 SoC Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/pinctrl/actions,s900-pinctrl.txt | 178 +++++++++++++++++++++ 1 file changed, 178 insertions(+) commit c8624ede3ed3b9f46364f5239c402393ec853e00 Author: Ville Syrjälä Date: Wed Feb 14 21:23:27 2018 +0200 drm/i915: Add support for the YCbCr COLOR_RANGE property Add support for the COLOR_RANGE property on planes. This property selects whether the input YCbCr data is to treated as limited range or full range. On most platforms this is a matter of setting the "YUV range correction disable" bit, and on VLV/CHV we'll just have to program the color correction logic to pass the data through unmodified. v2: Rebase Cc: Harry Wentland Cc: Daniel Vetter Cc: Daniel Stone Cc: Russell King - ARM Linux Cc: Ilia Mirkin Cc: Hans Verkuil Cc: Uma Shankar Cc: Shashank Sharma Cc: Jyri Sarha Reviewed-by: Shashank Sharma Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180214192327.3250-9-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_reg.h | 4 ++++ drivers/gpu/drm/i915/intel_display.c | 9 ++++++++- drivers/gpu/drm/i915/intel_sprite.c | 12 ++++++++++-- 3 files changed, 22 insertions(+), 3 deletions(-) commit 23b280890a140b0cf1e8f61c252936c2fb77f718 Author: Ville Syrjälä Date: Wed Feb 14 21:23:26 2018 +0200 drm/i915: Change the COLOR_ENCODING prop default value to BT.709 Bring us forward from the stone age and switch our default YCbCr->RGB conversion matrix to BT.709 from BT.601. I would expect most matrial to be BT.709 these days. Cc: Harry Wentland Cc: Daniel Vetter Cc: Daniel Stone Cc: Russell King - ARM Linux Cc: Ilia Mirkin Cc: Hans Verkuil Cc: Uma Shankar Cc: Shashank Sharma Cc: Jyri Sarha Acked-by: Shashank Sharma Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180214192327.3250-8-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_sprite.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b0f5c0badc5b54cc6308f21a65f6ebf69087d557 Author: Ville Syrjälä Date: Wed Feb 14 21:23:25 2018 +0200 drm/i915: Add support for the YCbCr COLOR_ENCODING property Add support for the COLOR_ENCODING plane property which selects the matrix coefficients used for the YCbCr->RGB conversion. Our hardware can generally handle BT.601 and BT.709. CHV pipe B sprites have a fully programmable matrix, so in theory we could handle anything, but it doesn't seem all that useful to expose anything beyond BT.601 and BT.709 at this time. GLK can supposedly do BT.2020, but let's leave enabling that for the future as well. v2: Rename bit defines to match the spec more closely (Shashank) Cc: Harry Wentland Cc: Daniel Vetter Cc: Daniel Stone Cc: Russell King - ARM Linux Cc: Ilia Mirkin Cc: Hans Verkuil Cc: Uma Shankar Cc: Shashank Sharma Cc: Jyri Sarha Reviewed-by: Shashank Sharma Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180214192327.3250-7-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_reg.h | 5 ++- drivers/gpu/drm/i915/intel_display.c | 19 +++++++++-- drivers/gpu/drm/i915/intel_sprite.c | 61 +++++++++++++++++++++++++++--------- 3 files changed, 67 insertions(+), 18 deletions(-) commit 38f24f21ae9bb0f2b7ebb42e828f7f8fe5190d89 Author: Ville Syrjälä Date: Wed Feb 14 21:23:24 2018 +0200 drm/i915: Fix plane YCbCr->RGB conversion for GLK On GLK the plane CSC controls moved into the COLOR_CTL register. Update the code to progam the YCbCr->RGB CSC mode correctly when faced with an YCbCr framebuffer. The spec is rather confusing as it calls the mode "YUV601 to RGB709". I'm going to assume that just means it's going to use the YCbCr->RGB matrix as specified in BT.601 and doesn't actually change the gamut. Cc: Harry Wentland Cc: Daniel Vetter Cc: Daniel Stone Cc: Russell King - ARM Linux Cc: Ilia Mirkin Cc: Hans Verkuil Cc: Uma Shankar Cc: Shashank Sharma Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180214192327.3250-6-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/i915_reg.h | 5 +++++ drivers/gpu/drm/i915/intel_display.c | 3 +++ drivers/gpu/drm/i915/intel_drv.h | 2 ++ drivers/gpu/drm/i915/intel_sprite.c | 10 +++++----- 4 files changed, 15 insertions(+), 5 deletions(-) commit 5deae9191130db6b617c94fb261804597cf9b508 Author: Ville Syrjälä Date: Wed Feb 14 21:23:23 2018 +0200 drm/i915: Correctly handle limited range YCbCr data on VLV/CHV Turns out the VLV/CHV fixed function sprite CSC expects full range data as input. We've been feeding it limited range data to it all along. To expand the data out to full range we'll use the color correction registers (brightness, contrast, and saturation). On CHV pipe B we were actually doing the right thing already because we progammed the custom CSC matrix to do expect limited range input. Now that well pre-expand the data out with the color correction unit, we need to change the CSC matrix to operate with full range input instead. This should make the sprite output of the other pipes match the sprite output of pipe B reasonably well. Looking at the resulting pipe CRCs, there can be a slight difference in the output, but as I don't know the formula used by the fixed function CSC of the other pipes, I don't think it's worth the effort to try to match the output exactly. It might not even be possible due to difference in internal precision etc. One slight caveat here is that the color correction registers are single bufferred, so we should really be updating them during vblank, but we still don't have a mechanism for that, so just toss in another FIXME. v2: Rebase v3: s/bri/brightness/ s/con/contrast/ (Shashank) v4: Clarify the constants and math (Shashank) Cc: Harry Wentland Cc: Daniel Vetter Cc: Daniel Stone Cc: Russell King - ARM Linux Cc: Ilia Mirkin Cc: Hans Verkuil Cc: Shashank Sharma Cc: Uma Shankar Cc: Jyri Sarha Cc: "Tang, Jun" Reported-by: "Tang, Jun" Cc: stable@vger.kernel.org Fixes: 7f1f3851feb0 ("drm/i915: sprite support for ValleyView v4") Reviewed-by: Shashank Sharma Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180214192327.3250-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_reg.h | 10 +++++ drivers/gpu/drm/i915/intel_sprite.c | 81 ++++++++++++++++++++++++++++--------- 2 files changed, 73 insertions(+), 18 deletions(-) commit 56dbbaff0fc739c573ccd351028c49066e938363 Author: Ville Syrjälä Date: Mon Feb 19 22:28:46 2018 +0200 drm/atomic: Include color encoding/range in plane state dump Include color_enconding and color_range in the plane state dump. v2: Add kerneldoc (danvet) Cc: Harry Wentland Cc: Daniel Vetter Cc: Daniel Stone Cc: Russell King - ARM Linux Cc: Ilia Mirkin Cc: Hans Verkuil Cc: Uma Shankar Cc: Shashank Sharma Cc: Jyri Sarha Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180219202846.10628-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Acked-by: Harry Wentland drivers/gpu/drm/drm_atomic.c | 4 ++++ drivers/gpu/drm/drm_color_mgmt.c | 30 ++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_crtc_internal.h | 2 ++ 3 files changed, 36 insertions(+) commit e024484a8684a0bffb2d384bbcfbb827f986f7ab Merge: 8b1b2dc a8ab4f2 Author: Linus Walleij Date: Fri Mar 2 13:38:12 2018 +0100 Merge tag 'sh-pfc-for-v4.17-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.17 - Add DU and VIN pin groups on R-Car D3, - Add HDMI, TMU, and VIN pin groups on R-Car H3 and M3-W, - Add support for the new R-Car M3-N SoC, - Small fixes and cleanups. commit 662b94c3195654c225174c680094555c0d750d41 Author: Manikanta Maddireddy Date: Wed Feb 28 15:30:33 2018 +0530 PCI: tegra: Add loadable kernel module support Implement remove callback function for Tegra PCIe driver to add loadable kernel module support. Per PCIe r3.0, sec 5.3.3.2.1, PCIe root port should broadcast PME_Turn_Off message before PCIe link goes to L2. PME_Turn_Off broadcast mechanism is implemented in AFI module. Each Tegra PCIe root port has its own PME_Turn_Off and PME_TO_Ack bitmap in AFI_PME register, program this register to broadcast PME_Turn_Off message. Once PME_TO_Ack is recieved driver will turn OFF PCIe clock, power gate PCIe partition and turn OFF regulators. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding Tested-by: Thierry Reding drivers/pci/host/pci-tegra.c | 103 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 100 insertions(+), 3 deletions(-) commit 527557a44cf21d7555082cd7e94b9dc60fc3d51a Author: Manikanta Maddireddy Date: Wed Feb 28 15:30:32 2018 +0530 PCI: tegra: Free resources on probe failure tegra_pcie_probe() can fail in multiple instances, this patch takes care of freeing the resources which are allocated before probe fail. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding Tested-by: Thierry Reding drivers/pci/host/pci-tegra.c | 99 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 79 insertions(+), 20 deletions(-) commit 80f690e9e3a60f628de61748be4dd2fd6baf5cc8 Author: Jyri Sarha Date: Mon Feb 19 22:28:23 2018 +0200 drm: Add optional COLOR_ENCODING and COLOR_RANGE properties to drm_plane Add a standard optional properties to support different non RGB color encodings in DRM planes. COLOR_ENCODING select the supported non RGB color encoding, for instance ITU-R BT.709 YCbCr. COLOR_RANGE selects the value ranges within the selected color encoding. The properties are stored to drm_plane object to allow different set of supported encoding for different planes on the device. v2: Add/fix kerneldocs, verify bitmasks (danvet) Cc: Harry Wentland Cc: Daniel Vetter Cc: Daniel Stone Cc: Russell King - ARM Linux Cc: Ilia Mirkin Cc: Hans Verkuil Cc: Uma Shankar Cc: Shashank Sharma Reviewed-by: Ville Syrjälä Signed-off-by: Jyri Sarha [vsyrjala v2: Add/fix kerneldocs, verify bitmasks] Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180219202823.10508-1-ville.syrjala@linux.intel.com Acked-by: Harry Wentland Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_atomic.c | 8 +++ drivers/gpu/drm/drm_color_mgmt.c | 103 +++++++++++++++++++++++++++++++++++++++ include/drm/drm_color_mgmt.h | 19 ++++++++ include/drm/drm_plane.h | 32 ++++++++++++ 4 files changed, 162 insertions(+) commit 94337b72618eacc1756eba4765a15b3748f80fbc Author: Baruch Siach Date: Fri Mar 2 11:47:01 2018 +0200 gpio: raspberrypi-exp: explain Kconfig dependency Commit 7ed915059c3001 (gpio: raspberrypi-ext: fix firmware dependency) fixed the Kconfig dependency to ensure that gpio-raspberrypi-exp is not built-in when the firmware is a module. But the Kconfig syntax for doing so is cryptic. Add a comment to make it a little easier. Cc: Arnd Bergmann Signed-off-by: Baruch Siach Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit c27557ab56bc943c59ea353bfcb6fc37a6f7b728 Author: Tvrtko Ursulin Date: Wed Feb 28 17:18:44 2018 +0000 drm/i915: Wedged engine mask makes more sense in hex In decimal its just a weird big number, while in hex can actually log which engines were requested to be wedged. Signed-off-by: Tvrtko Ursulin Reviewed-by: Michel Thierry Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180228171844.20006-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3bf045d15f52529e8abe26543dbe22af44efb41a Author: John Hsu Date: Fri Mar 2 10:45:14 2018 +0800 ASoC: Intel: fix argument error in nau8824 machine Fix the error: passing argument 1 of 'nau8824_enable_jack_detect' from incompatible pointer type nau8824_enable_jack_detect(codec, jack); ^~~~~ Which expects 'struct snd_soc_component *' but argument is of type 'struct snd_soc_codec *' Reported-by: Stephen Rothwell Signed-off-by: John Hsu Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_nau8824.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e9d09d97af7c8047959fcaae4217d80c26b2949c Author: Jean Delvare Date: Thu Mar 1 09:04:13 2018 +0100 i2c: scmi: Use standard device message logging functions ACPI_ERROR and ACPI_DEBUG_PRINT are not intended to be used by device drivers. Use acpi_handle message logging functions instead. As a nice side effect, it removes the following compiler warnings which were printed when ACPI debug is disabled: drivers/i2c/busses/i2c-scmi.c: In function "acpi_smbus_cmi_add_cap": drivers/i2c/busses/i2c-scmi.c:328:39: warning: suggest braces around empty body in an "else" statement [-Wempty-body] drivers/i2c/busses/i2c-scmi.c:338:12: warning: suggest braces around empty body in an "else" statement [-Wempty-body] Suggested-by: "Rafael J. Wysocki" Signed-off-by: Jean Delvare Reviewed-by: Rafael J. Wysocki Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-scmi.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit 04b6fcaba346e1ce76321ba9b0fd549da4c37ac2 Author: Guenter Roeck Date: Mon Feb 26 12:46:53 2018 -0800 i2c: piix4: Use request_muxed_region Accesses to SB800_PIIX4_SMB_IDX can occur from multiple drivers. One example for another driver is the sp5100_tco driver. Use request_muxed_region() to ensure synchronization. Signed-off-by: Guenter Roeck Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-piix4.c | 55 +++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 30 deletions(-) commit 0e89b2fec748177899c1f9ebfbe87714ffa248eb Author: Guenter Roeck Date: Mon Feb 26 12:46:52 2018 -0800 i2c: piix4: Use usleep_range() The piix4 i2c driver is extremely slow. Replacing msleep() with usleep_range() increases its speed substantially. Use sleep ranges similar to those used in the i2c-801 driver to keep things simple. Signed-off-by: Guenter Roeck Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-piix4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8fd4bc8a15b218165c45f44eba1b33a3c7181dfb Author: Colin Ian King Date: Thu Mar 1 14:40:19 2018 +0000 ieee802154: remove unused variable 'val' Variable 'val' is not being initialized and is later being logically or'd with DAR_PHY_CTRL4_PROMISCUOUS. Considering this variable is never being read anyway we may as well remove val altogether. Cleans up error detected by cppcheck: drivers/net/ieee802154/mcr20a.c:732: (error) Uninitialized variable: val Fixes: 8c6ad9cc5157 ("ieee802154: Add NXP MCR20A IEEE 802.15.4 transceiver driver") Signed-off-by: Colin Ian King Signed-off-by: Stefan Schmidt drivers/net/ieee802154/mcr20a.c | 2 -- 1 file changed, 2 deletions(-) commit 8b1b2dc7b4d20cd10f1d1ad1bc7b311b27909deb Author: Richard Fitzgerald Date: Fri Feb 23 13:43:52 2018 +0000 pinctrl: core: Add missing EXPORT on pinctrl_register_mappings Systems that don't have devicetree need pinctrl_register_mappings. It should be EXPORT_SYMBOL_GPL so that it can be called from pinctrl drivers built as modules. Signed-off-by: Richard Fitzgerald Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 1 + 1 file changed, 1 insertion(+) commit 9a3821c2bb47d2582b0c8f053d4c3bed7bd8d3d1 Author: Baolin Wang Date: Sat Feb 24 10:07:18 2018 +0800 gpio: Add GPIO driver for Spreadtrum SC9860 platform The Spreadtrum SC9860 platform GPIO controller contains 16 groups and each group contains 16 GPIOs. Each GPIO can set input/output and has the interrupt capability. Signed-off-by: Baolin Wang Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 8 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-sprd.c | 290 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 299 insertions(+) commit c910d6ad2f0af58a0754ac74f3934200a050ac2c Author: Baolin Wang Date: Sat Feb 24 10:07:17 2018 +0800 dt-bindings: gpio: Add Spreadtrum GPIO controller documentation This patch adds the device tree bindings for the Spreadtrum GPIO controller. The gpios will be supported by the GPIO generic library. Signed-off-by: Baolin Wang Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/gpio-sprd.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 55af415b427a68a750df37fb167ca71e3fa51890 Author: Martin Blumenstingl Date: Sun Feb 25 12:38:53 2018 +0100 pinctrl: meson: meson8b: fix requesting GPIOs greater than GPIOZ_3 Meson8b is a cost reduced variant of the Meson8 SoC. It's package size is smaller than Meson8. Unfortunately there are a few key differences which cannot be seen without close inspection of the code and the public S805 datasheet: - the GPIOX bank is missing the GPIOX_12, GPIOX_13, GPIOX_14 and GPIOX_15 GPIOs - the GPIOY bank is missing the GPIOY_2, GPIOY_4, GPIOY_5, GPIOY_15 and GPIOY_16 GPIOs - the GPIODV bank is missing all GPIOs except GPIODV_9, GPIODV_24, GPIODV_25, GPIODV_26, GPIODV_27, GPIODV_28 and GPIODV_29 - the GPIOZ bank is missing completely - there is a new GPIO bank called "DIF" This means that Meson8b only has 83 actual GPIO lines. Without any holes there would be 130 GPIO lines in total (120 are inherited from Meson8 plus 10 new from the DIF bank). GPIOs greater GPIOZ_3 (whose ID is 83 - as a reminder: this is exactly the number of actual GPIO lines on Meson8b and also the value of meson8b_cbus_pinctrl_data.num_pins) cannot berequested. Using CARD_6 (which used ID 100 prior to this patch, "base of the GPIO controller was 382) as an example: $ echo 482 > /sys/class/gpio/export export_store: invalid GPIO 482 This removes all non-existing pins from to dt-bindings header file (include/dt-bindings/gpio/meson8b-gpio.h). This allows us to have a consecutive numbering for the GPIO #defines (GPIOY_2 doesn't exist for example, so previously the GPIOY_3 ID was "GPIOY_1 + 2", after this patch it is "GPIOY_1 + 1"). As a nice side-effect this means that we get compile-time (instead of runtime) errors if Meson8b .dts uses a pin that only exists on Meson8. Additionally the pinctrl-meson8b driver has to be updated to handle this new GPIO numbering. By default a struct meson_bank only handles GPIO banks where the pins are numbered consecutively because it calculates the bit offsets based on the GPIO IDs. This is solved by taking the original BANK() definition and splitting it into consecutive subsets (X0..11 and X16..21). The bit offsets for each new bank includes the skipped GPIOs (the definition of the "X0..11" bank is identical to the old "X" bank apart from the "last IRQ" field, the definition of the new, split "X16..21" bank takes the original "X" bank and adds 16 - the start of the new split bank - to the "first IRQ", pullen bit, pull bit, dir bit, out bit and in bit). Commit 984cffdeaeb7ea ("pinctrl: Fix gpio/pin mapping for Meson8b") fixed the same issue by setting "ngpio" (of the gpio_chip) to 130. Unfortunately this broke in db80f0e158e621 ("pinctrl: meson: get rid of unneeded domain structures"). The solution from this patch was considered to be better than the previous attempt at fixing this because it provides compile-time error checking for the GPIOs that exist on Meson8 but don't exist on Meson8b. The following pins were tested on an Odroid-C1 using the sysfs GPIO interface checking that their value (high or low) could be read: - GPIOX_0, GPIOX_1, GPIOX_2, GPIOX_3, GPIOX_4, GPIOX_5, GPIOX_6, GPIOX_7, GPIOX_8, GPIOX_9, GPIOX_10, GPIOX_11, GPIOX_18, GPIOX_19, GPIOX_20, GPIOX_21 - GPIOY_3, GPIOY_7, GPIOY_8 (some of these had to be pulled up because they were low by default, others were high by default so these had to be pulled down) Reported-by: Linus Lüssing Suggested-by: Jerome Brunet Signed-off-by: Martin Blumenstingl Reviewed-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson8b.c | 20 +++--- include/dt-bindings/gpio/meson8b-gpio.h | 121 ++++++++++++++++++++++++++++---- 2 files changed, 120 insertions(+), 21 deletions(-) commit 2282197547d5373644e702f7f49c2aa92ef15817 Author: Jernej Skrabec Date: Thu Mar 1 22:34:42 2018 +0100 ARM64: dts: sun50i: h5: Enable HDMI output on H5 boards Enable HDMI output on all boards with HDMI connector. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard .../boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 25 ++++++++++++++++++++++ .../dts/allwinner/sun50i-h5-orangepi-prime.dts | 25 ++++++++++++++++++++++ .../allwinner/sun50i-h5-orangepi-zero-plus2.dts | 25 ++++++++++++++++++++++ 3 files changed, 75 insertions(+) commit f0842bc5637c45dec92b0c911d586279267559bf Author: Jernej Skrabec Date: Thu Mar 1 22:34:41 2018 +0100 ARM: dts: sun8i: h3: Enable HDMI output on H3 boards Enable HDMI output on all boards which have HDMI connector. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 25 ++++++++++++++++++++++ arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 25 ++++++++++++++++++++++ arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts | 25 ++++++++++++++++++++++ arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts | 25 ++++++++++++++++++++++ arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 25 ++++++++++++++++++++++ arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts | 25 ++++++++++++++++++++++ arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 24 +++++++++++++++++++++ arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 25 ++++++++++++++++++++++ 8 files changed, 199 insertions(+) commit cb34d8256e0155f12b1c55b198d392a10131493f Author: Jernej Skrabec Date: Thu Mar 1 22:34:40 2018 +0100 ARM: dts: sunxi: h3/h5: Add HDMI pipeline This commit adds all entries needed for HDMI to function properly. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard arch/arm/boot/dts/sunxi-h3-h5.dtsi | 108 +++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) commit 24f421b73918741666b57933316c711b0063ca84 Author: Alexandre Belloni Date: Wed Feb 21 00:25:18 2018 +0100 rtc: rx8581: remove useless message It is not necessary to print a message when the time is invalid as userspace will already get an error (and an optional dev_dbg message). Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx8581.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 02d289975a3bd0b8dbc924893d15e7859ae41625 Author: Alexandre Belloni Date: Wed Feb 21 00:23:31 2018 +0100 rtc: rx4581: remove useless message It is not necessary to print a message when the time is invalid as userspace will already get an error (and an optional dev_dbg message). Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx4581.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit b1b8394edc3b9b4093f3a2a6b98b8d76ac46dc7e Author: Alexandre Belloni Date: Wed Feb 21 00:10:41 2018 +0100 rtc: pm8xxx: remove useless message It is not necessary to print a message when the time is invalid as userspace will already get an error (and an optional dev_dbg message). Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pm8xxx.c | 6 ------ 1 file changed, 6 deletions(-) commit fbfd36fdd26cab41844f0b869de0cf120017c15c Author: Alexandre Belloni Date: Tue Feb 20 23:42:27 2018 +0100 rtc: abx80x: remove useless message It is not necessary to print a message when the time is invalid as userspace will already get an error (and an optional dev_dbg message). Signed-off-by: Alexandre Belloni drivers/rtc/rtc-abx80x.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c4f2eafe52aab77f9481595b180d8ae01903a07c Author: Alexandre Belloni Date: Wed Feb 21 11:03:49 2018 +0100 rtc: tegra: stop validating rtc_time in .set_time The RTC core is always validating the rtc_time struct before calling .set_time. It is not necessary to do it again in .set_time. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tegra.c | 4 ---- 1 file changed, 4 deletions(-) commit 9fb7aa7501b0293b44405f1b8053727266436dc6 Author: Alexandre Belloni Date: Wed Feb 21 11:23:19 2018 +0100 rtc: spear: stop validating rtc_time in .set_time and .set_alarm The RTC core is always validating the rtc_time struct before calling .set_time or .set_alarm. It is not necessary to do it again. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-spear.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 7ddc153d5f9442124cc083b15489932e45202661 Author: Alexandre Belloni Date: Wed Feb 21 11:33:37 2018 +0100 rtc: omap: stop validating rtc_time in .set_time and .set_alarm The RTC core is always validating the rtc_time struct before calling .set_time or .set_alarm. It is not necessary to do it again. Also, rtc_time_to_tm never generates an invalid rtc_tm (it can be out of range though). Signed-off-by: Alexandre Belloni drivers/rtc/rtc-omap.c | 3 --- 1 file changed, 3 deletions(-) commit e115a2bf14266bb4fe0ec75cd770a0a5eb77091e Author: Alexandre Belloni Date: Wed Feb 21 00:05:20 2018 +0100 rtc: max77686: stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it just before returning from the callback. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-max77686.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3d809cedae7e83c8968f8f994186324283766cb7 Author: Alexandre Belloni Date: Wed Feb 21 00:02:08 2018 +0100 rtc: m41t93: stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it just before returning from the callback. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t93.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 143d92bea3dcda36a2233fa30737b1f818ea4ca3 Author: Alexandre Belloni Date: Tue Feb 20 23:55:40 2018 +0100 rtc: isl12022: remove useless indirection isl12022_get_datetime and isl12022_set_datetime are only used after casting dev to an i2c_client. Remove that useless indirection. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-isl12022.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 66b32fc54c8e04079102ad356b88a448aad4cb81 Author: Alexandre Belloni Date: Mon Feb 19 16:24:19 2018 +0100 rtc: sc27xx: stop validating rtc_time in .read_time rtc_time64_to_tm never generates an invalid tm. It is not necessary to validate it. Also, the RTC core is always calling rtc_valid_tm after the read_time callback. Reviewed-by: Baolin Wang Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sc27xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50a9a35ac6a6466814c23e6178d9babefbfca71f Author: Alexandre Belloni Date: Wed Feb 21 00:18:23 2018 +0100 rtc: r7301: stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it just before returning from the callback. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-r7301.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6cb398444bd64d28f7f25516148842913ef6594 Author: Alexandre Belloni Date: Wed Feb 21 11:27:10 2018 +0100 rtc: nuc900: stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it before returning from the callback. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-nuc900.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit bb54be134a363f57d698b0c2887df36e468f3077 Author: Alexandre Belloni Date: Fri Mar 2 10:08:47 2018 +0100 rtc: diasemi: stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it before returning from the callback. Acked-by: Steve Twiss Signed-off-by: Alexandre Belloni drivers/rtc/rtc-da9052.c | 3 +-- drivers/rtc/rtc-da9055.c | 2 +- drivers/rtc/rtc-da9063.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) commit 35a2112377a626033d3067d126a3f79092fcfc36 Author: Alexandre Belloni Date: Mon Feb 19 16:23:57 2018 +0100 rtc: cpcap: stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it just before returning from the callback. Reviewed-by: Sebastian Reichel Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cpcap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce2e5a7613c64ac919d403fd957a472a0f12360e Author: Alexandre Belloni Date: Mon Feb 19 16:23:54 2018 +0100 rtc: ab-b5ze-s3: stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it just before returning from the callback. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ab-b5ze-s3.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 22652ba72453d35c8a637d5c0f06b3dc29ff9eb0 Author: Alexandre Belloni Date: Mon Feb 19 16:23:56 2018 +0100 rtc: stop validating rtc_time in .read_time The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it just before returning from the callback. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ac100.c | 2 +- drivers/rtc/rtc-au1xxx.c | 2 +- drivers/rtc/rtc-bq32k.c | 2 +- drivers/rtc/rtc-ds1216.c | 2 +- drivers/rtc/rtc-ds1286.c | 2 +- drivers/rtc/rtc-ds1302.c | 3 +-- drivers/rtc/rtc-ds1305.c | 3 +-- drivers/rtc/rtc-ds1307.c | 3 +-- drivers/rtc/rtc-ds1343.c | 2 +- drivers/rtc/rtc-ds1347.c | 2 +- drivers/rtc/rtc-ds1390.c | 2 +- drivers/rtc/rtc-ds1685.c | 2 +- drivers/rtc/rtc-ds1742.c | 2 +- drivers/rtc/rtc-ds2404.c | 2 +- drivers/rtc/rtc-ds3232.c | 2 +- drivers/rtc/rtc-efi.c | 2 +- drivers/rtc/rtc-fm3130.c | 3 +-- drivers/rtc/rtc-isl12022.c | 2 +- drivers/rtc/rtc-lpc24xx.c | 2 +- drivers/rtc/rtc-m41t80.c | 2 +- drivers/rtc/rtc-m41t94.c | 3 +-- drivers/rtc/rtc-m48t35.c | 2 +- drivers/rtc/rtc-m48t59.c | 2 +- drivers/rtc/rtc-m48t86.c | 2 +- drivers/rtc/rtc-max6902.c | 2 +- drivers/rtc/rtc-max6916.c | 2 +- drivers/rtc/rtc-max8997.c | 2 +- drivers/rtc/rtc-max8998.c | 2 +- drivers/rtc/rtc-mcp795.c | 2 +- drivers/rtc/rtc-mrst.c | 2 +- drivers/rtc/rtc-msm6242.c | 2 +- drivers/rtc/rtc-mt7622.c | 2 +- drivers/rtc/rtc-mv.c | 2 +- drivers/rtc/rtc-pcf2123.c | 2 +- drivers/rtc/rtc-pcf2127.c | 2 +- drivers/rtc/rtc-pcf50633.c | 2 +- drivers/rtc/rtc-pcf8523.c | 2 +- drivers/rtc/rtc-pic32.c | 2 +- drivers/rtc/rtc-r9701.c | 2 +- drivers/rtc/rtc-rp5c01.c | 2 +- drivers/rtc/rtc-rx6110.c | 2 +- drivers/rtc/rtc-rx8010.c | 2 +- drivers/rtc/rtc-rx8025.c | 2 +- drivers/rtc/rtc-s3c.c | 2 +- drivers/rtc/rtc-s5m.c | 2 +- drivers/rtc/rtc-sh.c | 2 +- drivers/rtc/rtc-sun6i.c | 2 +- drivers/rtc/rtc-sunxi.c | 2 +- 48 files changed, 48 insertions(+), 53 deletions(-) commit 57312eaacd9b6c560032b9c9a755e0165f48ce52 Author: Sagar Arun Kamble Date: Thu Mar 1 22:15:45 2018 +0530 drm/i915/uc: Make GuC/HuC fw fetch and loading functions/file structure symmetric GuC load function is named intel_guc_fw_upload() and HuC load function is named intel_huc_init_hw(). Make them consistent intel_*_fw_upload. Also move HuC fw loading functions and declarations to separate files intel_huc_fw.c|h like GuC. While at this, do below changes 1. Update kernel-doc comment for intel_*_fw_upload() functions 2. s/huc_ucode_xfer/huc_fw_xfer 3. Introduce intel_huc_fw_init_early() v2: Changed patch to update HuC functions instead of changing guc_fw_upload and update file structure. (Michal Wajdeczko) v3: Added SPDX License identifier to huc_fw.c|h. (Michal Wajdeczko) Signed-off-by: Sagar Arun Kamble Cc: Michal Winiarski Cc: Michal Wajdeczko Cc: Chris Wilson Cc: Anusha Srivatsa Reviewed-by: Michal Wajdeczko Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1519922745-25441-1-git-send-email-sagar.a.kamble@intel.com drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/intel_guc_fw.c | 10 +-- drivers/gpu/drm/i915/intel_huc.c | 154 +-------------------------------- drivers/gpu/drm/i915/intel_huc.h | 2 +- drivers/gpu/drm/i915/intel_huc_fw.c | 166 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_huc_fw.h | 15 ++++ drivers/gpu/drm/i915/intel_uc.c | 2 +- 7 files changed, 191 insertions(+), 161 deletions(-) commit 2e75bb2f8b8928aa01d91219a90df1e6fbc7cdd4 Author: Kirill Tkhai Date: Thu Mar 1 14:30:17 2018 +0300 net: Convert hwsim_net_ops These pernet_operations allocate and destroy IDA identifier, and these actions are synchronized by IDA subsystem locks. Exit method removes mac80211_hwsim_data enteries from the lists, and this is synchronized by hwsim_radio_lock with the rest parallel pernet_operations. Also it queues destroy_radio() work, and these work already may be executed in parallel with any pernet_operations (as it's a work :). So, we may mark these pernet_operations as async. Signed-off-by: Kirill Tkhai Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 1 + 1 file changed, 1 insertion(+) commit 03695549aa76e877d596df188c266f06257b6a23 Author: Kirill Tkhai Date: Thu Mar 1 14:30:09 2018 +0300 mac80211_hwsim: Make hwsim_netgroup IDA hwsim_netgroup counter is declarated as int, and it is incremented every time a new net is created. After sizeof(int) net are created, it will overflow, and different net namespaces will have the same identifier. This patch fixes the problem by introducing IDA instead of int counter. IDA guarantees, all the net namespaces have the uniq identifier. Note, that after we do ida_simple_remove() in hwsim_exit_net(), and we destroy the ID, later there may be executed destroy_radio() from the workqueue. But destroy_radio() does not use the ID, so it's OK. Out of bounds of this patch, just as a report to wireless subsystem maintainer, destroy_radio() increaments hwsim_radios_generation without hwsim_radio_lock, so this may need one more patch to fix. Signed-off-by: Kirill Tkhai Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 7ed915059c3001ddebfc2aa993cc172d10123806 Author: Arnd Bergmann Date: Wed Feb 28 14:48:08 2018 +0100 gpio: raspberrypi-ext: fix firmware dependency When the firmware driver is a loadable module, the gpio driver cannot be built-in: drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_set': gpio-raspberrypi-exp.c:(.text+0xb4): undefined reference to `rpi_firmware_property' drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_get': gpio-raspberrypi-exp.c:(.text+0x1ec): undefined reference to `rpi_firmware_property' drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_get_direction': gpio-raspberrypi-exp.c:(.text+0x360): undefined reference to `rpi_firmware_property' drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_get_polarity': gpio-raspberrypi-exp.c:(.text+0x4d4): undefined reference to `rpi_firmware_property' drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_dir_out': gpio-raspberrypi-exp.c:(.text+0x670): undefined reference to `rpi_firmware_property' drivers/gpio/gpio-raspberrypi-exp.o:gpio-raspberrypi-exp.c:(.text+0x7fc): more undefined references to `rpi_firmware_property' follow drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_dir_in': drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_probe': gpio-raspberrypi-exp.c:(.text+0x93c): undefined reference to `rpi_firmware_get' We already have a Kconfig dependency for it, but when compile-testing, it is disregarded. This changes the dependency so that compile-testing is only done when the firmware driver is completely disabled. Fixes: a98d90e7d588 ("gpio: raspberrypi-exp: Driver for RPi3 GPIO expander via mailbox service") Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c51a63797acc159ead1e7b136119b18865e909c3 Merge: 56b112f 668da74 Author: Daniel Borkmann Date: Fri Mar 2 09:46:41 2018 +0100 Merge branch 'bpf-bpftool-batch-improvements' Quentin Monnet says: ==================== Several enhancements for bpftool batch mode are introduced in this series. More specifically, input files for batch mode gain support for: * comments (starting with '#'), * continuation lines (after a line ending with '\'), * arguments enclosed between quotes. Also, make bpftool able to read from standard input when "-" is provided as input file name. ==================== Signed-off-by: Daniel Borkmann commit 668da745af3c29d5742238ef278a1b2055c97e51 Author: Quentin Monnet Date: Thu Mar 1 20:20:11 2018 -0800 tools: bpftool: add support for quotations in batch files Improve argument parsing from batch input files in order to support arguments enclosed between single (') or double quotes ("). For example, this command can now be parsed in batch mode: bpftool prog dump xlated id 1337 file "/tmp/my file with spaces" The function responsible for parsing command arguments is copied from its counterpart in lib/utils.c in iproute2 package. Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/main.c | 65 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 14 deletions(-) commit 416656bbaa57a5be75514498491b7e24c58537c1 Author: Quentin Monnet Date: Thu Mar 1 20:20:10 2018 -0800 tools: bpftool: read from stdin when batch file name is "-" Make bpftool read its command list from standard input when the name if the input file is a single dash. Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 65d538dde625d93359ca4e33d2311f8598f423a6 Author: Quentin Monnet Date: Thu Mar 1 20:20:09 2018 -0800 tools: bpftool: support continuation lines in batch files Add support for continuation lines, such as in the following example: prog show prog dump xlated \ id 1337 opcodes This patch is based after the code for support for continuation lines from file lib/utils.c from package iproute2. "Lines" in error messages are renamed as "commands", as we count the number of commands (but we ignore empty lines, comments, and do not add continuation lines to the count). Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/main.c | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) commit 06cc7fe7c2951e64cd5e73ea447791c7e6bc3852 Author: Quentin Monnet Date: Thu Mar 1 20:20:08 2018 -0800 tools: bpftool: support comments in batch files Replace '#' by '\0' in commands read from batch files in order to avoid processing the remaining part of the line, thus allowing users to use comments in the files. Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/main.c | 5 +++++ 1 file changed, 5 insertions(+) commit b89405b6102fcc3746f43697b826028caa94c823 Author: Richard Fitzgerald Date: Wed Feb 28 15:53:06 2018 +0000 pinctrl: devicetree: Fix dt_to_map_one_config handling of hogs When dt_to_map_one_config() is called with a pinctrl_dev passed in, it should only be using this if the node being looked up is a hog. The code was always using the passed pinctrl_dev without checking whether the dt node referred to it. A pin controller can have pinctrl-n dependencies on other pin controllers in these cases: - the pin controller hardware is external, for example I2C, so needs other pin controller(s) to be setup to communicate with the hardware device. - it is a child of a composite MFD so its of_node is shared with the parent MFD and other children of that MFD. Any part of that MFD could have dependencies on other pin controllers. Because of this, dt_to_map_one_config() can't assume that if it has a pinctrl_dev passed in then the node it looks up must be a hog. It could be a reference to some other pin controller. Signed-off-by: Richard Fitzgerald Signed-off-by: Linus Walleij drivers/pinctrl/devicetree.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fd3cbbfb76a422a5b0f85649b677477a308866db Author: Shawn Lin Date: Wed Feb 28 14:56:48 2018 +0800 clk: rockchip: Free the memory on the error path rockchip_clk_register_branch() and rockchip_clk_register_frac_branch() should free the memory internally when seeing any failure. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 9ffef62f226ceefe8a8415462a797ae688a6251e Author: Jernej Skrabec Date: Thu Mar 1 22:34:39 2018 +0100 drm/sun4i: Allow building on arm64 64-bit ARM SoCs from Allwinner have DE2/TCON/HDMI periphery which is compatible to 32-bit SoCs, so allow building DRM driver for arm64 architecture. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180301213442.16677-14-jernej.skrabec@siol.net drivers/gpu/drm/sun4i/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f86e81748fe230b9cf82a7fd69884c7a08ba9d1 Author: Jernej Skrabec Date: Thu Mar 1 22:34:38 2018 +0100 drm/sun4i: Add support for H3 HDMI PHY variant While A83T HDMI PHY seems to be just customized Synopsys HDMI PHY, H3 HDMI PHY is completely custom PHY. However, they still have many things in common like clock and reset setup, setting sync polarity and more. Add support for H3 HDMI PHY variant. While documentation exists for this PHY variant, it doesn't go in great details. Because of that, almost all settings are copied from BSP linux 4.4. Interestingly, those settings are slightly different to those found in a older BSP with Linux 3.4. For now, no user visible difference was found between them. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180301213442.16677-13-jernej.skrabec@siol.net drivers/gpu/drm/sun4i/Makefile | 1 + drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 6 + drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 264 ++++++++++++++++++++++++++++- drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c | 132 +++++++++++++++ 4 files changed, 400 insertions(+), 3 deletions(-) commit 9d5a1f2ca6618bffd79c834d3e090a086fe35e6a Author: Wang Dongsheng Date: Tue Feb 27 00:12:13 2018 -0800 gpiolib: friendly debug information for consumer "failed" maybe makes observer confuse when a consumer can not lookup, so change to a friendly information. Signed-off-by: Wang Dongsheng Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6876b160b70eeab5c7e0c3888f4907502a1df4a7 Author: Jernej Skrabec Date: Thu Mar 1 22:34:37 2018 +0100 drm/sun4i: Move and expand DW HDMI PHY register macros DW HDMI PHY macros are moved to header file and expanded with the registers present on newer SoCs like H3 and H5. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180301213442.16677-12-jernej.skrabec@siol.net drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 131 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 17 ----- 2 files changed, 131 insertions(+), 17 deletions(-) commit 6fd903102c9d9e1c2807d5fbbf011b44f122b20d Author: Jernej Skrabec Date: Thu Mar 1 22:34:36 2018 +0100 drm/sun4i: Add support for variants to DW HDMI PHY There are multiple variants of DW HDMI PHYs in Allwinner SoCs. While some things like clock and reset setup are the same, PHY configuration differs a lot. Split out code which is PHY specific to separate functions and create a structure which holds pointers to those functions. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180301213442.16677-11-jernej.skrabec@siol.net drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 20 ++++++-- drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 89 +++++++++++++++++++++++----------- 2 files changed, 76 insertions(+), 33 deletions(-) commit e420ccd66d36e4ac2035620286495ce13a40b7f7 Author: Jernej Skrabec Date: Thu Mar 1 22:34:35 2018 +0100 drm/sun4i: Fix polarity configuration for DW HDMI PHY Current polarity configuration code is cleary wrong since it compares same flag two times. However, even if flag name is fixed, it won't work well for resolutions which have one polarity positive and another negative. Fix that by properly set each bit according to each polarity. Since those two bits are not described in any documentation, relationships were obtained by experimentation. Fixes: b7c7436a5ff0 ("drm/sun4i: Implement A83T HDMI driver") Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180301213442.16677-10-jernej.skrabec@siol.net drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit e679f4a13f0fd1da4ef5b9c59c78404cd421c61b Author: Jernej Skrabec Date: Thu Mar 1 22:34:34 2018 +0100 drm/sun4i: Add support for H3 mixer 0 This mixer supports 1 VI plane, 3 UI plane and HW scaling on all planes. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180301213442.16677-9-jernej.skrabec@siol.net drivers/gpu/drm/sun4i/sun8i_mixer.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 1ceb5f1b7d699c8e891ca5bd9c6b89b256c540f0 Author: Jernej Skrabec Date: Thu Mar 1 22:34:33 2018 +0100 drm/sun4i: Add support for H3 display engine H3 display engine has two mixers which are connected to HDMI and TV output. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180301213442.16677-8-jernej.skrabec@siol.net drivers/gpu/drm/sun4i/sun4i_drv.c | 1 + 1 file changed, 1 insertion(+) commit ea750c41467d9f42f9e358f85ab1a39c3baebac6 Author: Jernej Skrabec Date: Thu Mar 1 22:34:31 2018 +0100 dt-bindings: display: sun4i-drm: Add compatibles for H3 HDMI pipeline Add missing compatibles for H3 HDMI pipeline. These compatibles can also be used with H5 SoC. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180301213442.16677-6-jernej.skrabec@siol.net Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 536836d32cbc96af91f15add43f8960ffdac5569 Author: Sean Wang Date: Fri Feb 23 18:16:23 2018 +0800 dt-bindings: pinctrl: mediatek: add bindings for I2C2 and SPI2 on MT7623 Add missing pinctrl binding about I2C2 and SPI2 which would be used in devicetree related files. Signed-off-by: Sean Wang Cc: Rob Herring Cc: Mark Rutland Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij include/dt-bindings/pinctrl/mt7623-pinfunc.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit fc471710c62f28942aef5950384e0bffd224f249 Author: Sean Wang Date: Fri Feb 23 18:16:21 2018 +0800 dt-bindings: pinctrl: mediatek: use - instead of _ in examples It should be good that no use "_" is in examples. Consequently, those nodes in certain files which have an inappropriate name containing "_" are all being replaced with "-". Signed-off-by: Sean Wang Cc: Linus Walleij Cc: Rob Herring Cc: Mark Rutland Cc: linux-gpio@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 55de0f31df1a31b346edfe98d061f11162ff1ad4 Author: Jernej Skrabec Date: Thu Mar 1 22:34:30 2018 +0100 clk: sunxi-ng: h3: h5: export CLK_PLL_VIDEO CLK_PLL_VIDEO needs to be referenced in HDMI DT entry as a possible PHY clock parent. Export it so it can be used later in DT. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-h3.h | 4 +++- include/dt-bindings/clock/sun8i-h3-ccu.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit b1a1ad4b75b876ccf200f2351ae61364bf856613 Author: Jernej Skrabec Date: Thu Mar 1 22:34:29 2018 +0100 clk: sunxi-ng: h3: h5: Allow some clocks to set parent rate Some units have to be able to set it's own clock precisely to work correctly. Allow them to do so by adding CLK_SET_RATE_PARENT flag. Add this flag to DE, TCON and HDMI clocks. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 4fd8ae912f9829c4324fa85d945cc0288c218bc5 Author: Jernej Skrabec Date: Thu Mar 1 22:34:28 2018 +0100 clk: sunxi-ng: h3: h5: Add minimal rate for video PLL Although user manuals for H3 and H5 SoCs state that minimal rate supported by video PLL is around 30 MHz, it seems that in reality minimal rate is around 192 MHz. Experiments showed that any rate below 96 MHz doesn't produce any video output at all. Even at this frequency, stable output depends on right factors. For example, when N = 4 and M = 1, output is stable and when N = 8 and M = 2, it's not. BSP clock driver suggest that minimum stable frequency is 192 MHz. That would also be in line with A64 SoC, which has similar periphery. Set minimal video PLL rate for H3/H5 to 192 MHz. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 2d2b61c13a4b39c8ba6b9c1daa79d5891689864e Author: Jernej Skrabec Date: Thu Mar 1 22:34:27 2018 +0100 clk: sunxi-ng: Add check for minimal rate to NM PLLs Some NM PLLs doesn't work well when their output clock rate is set below certain rate. Add support for that constrain. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_nm.c | 7 +++++++ drivers/clk/sunxi-ng/ccu_nm.h | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit 430a2a5945501888665989ea71af15fd507a7058 Author: Radoslaw Pietrzyk Date: Fri Feb 23 09:31:45 2018 +0100 pinctrl: stm32: Optimizes and enhances stm32gpio irqchip - removes unneeded irq_chip.irq_eoi callback - adds irq_chip.irq_set_wake callback for possible in the future GPIO wakeup - adds irq_chip.irq_ack callback Signed-off-by: Radoslaw Pietrzyk Reviewed-by: Ludovic Barre Tested-by: Ludovic Barre Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 928af2247785f7a1aec21e82a3ceba7c0c85f593 Author: Niklas Cassel Date: Thu Feb 22 16:22:47 2018 +0100 pinctrl: artpec6: dt: add smaller groups for uarts Add group configuration for uarts that are cut down variants, the standard being full, i.e. all signals, flow control, i.e. rx/tx and cts/rts, and rx/tx only. This allows us to be more precise in which pins we're actually using. Unfortunately the existing naming scheme leaves things to be desired, e.g. uart3grp0 means RX/TX and CTS/RTS, yet uart0grp0 means all pins. Since the exising suffixes have different meaning for different uarts, and the fact that we cannot change the name of existing groups, makes it hard to use a descriptive name for the newly added groups. Signed-off-by: Niklas Cassel Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/axis,artpec6-pinctrl.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 7e065fb9ccce89fe667fdbd9a177eaec59a359fc Author: Niklas Cassel Date: Thu Feb 22 16:22:46 2018 +0100 pinctrl: artpec6: dt: add missing pin group uart5nocts Add missing pin group uart5nocts (all pins except cts), which has been supported by the artpec6 pinctrl driver since its initial submission. Fixes: 00df0582eab1 ("pinctrl: Add pincontrol driver for ARTPEC-6 SoC") Signed-off-by: Niklas Cassel Reviewed-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/axis,artpec6-pinctrl.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 23e19fd4fb07eebf96909a86b8545bc4aa682e54 Merge: 7797dc4 71abf46 Author: David S. Miller Date: Thu Mar 1 21:44:29 2018 -0500 Merge branch 'tcp_bbr-more-GSO-work' Eric Dumazet says: ==================== tcp_bbr: more GSO work Playing with r8152 USB 1Gbit NIC, on both USB2 and USB3 slots, I found that BBR was performing poorly, because of TSO being limited to 16KB This patch series makes sure BBR is not under estimating number of packets that are needed to fill the pipe when a device has suboptimal TSO limits. ==================== Signed-off-by: David S. Miller commit 71abf467bb630c7e2f4ef33267d98fb7d10d3ce9 Author: Eric Dumazet Date: Wed Feb 28 14:40:47 2018 -0800 tcp_bbr: remove bbr->tso_segs_goal Its value is computed then immediately used, there is no need to store it. Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_bbr.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit dcb8c9b4373a583451b1b8a3e916d33de273633d Author: Eric Dumazet Date: Wed Feb 28 14:40:46 2018 -0800 tcp_bbr: better deal with suboptimal GSO (II) This is second part of dealing with suboptimal device gso parameters. In first patch (350c9f484bde "tcp_bbr: better deal with suboptimal GSO") we dealt with devices having low gso_max_segs Some devices lower gso_max_size from 64KB to 16 KB (r8152 is an example) In order to probe an optimal cwnd, we want BBR being not sensitive to whatever GSO constraint a device can have. This patch removes tso_segs_goal() CC callback in favor of min_tso_segs() for CC wanting to override sysctl_tcp_min_tso_segs Next patch will remove bbr->tso_segs_goal since it does not have to be persistent. Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Signed-off-by: David S. Miller include/net/tcp.h | 6 ++---- net/ipv4/tcp_bbr.c | 23 +++++++++++++---------- net/ipv4/tcp_output.c | 15 ++++++++------- 3 files changed, 23 insertions(+), 21 deletions(-) commit 56b112f17e8ab1ded40d00ed9a0af63b69b021ef Merge: c8745e0 d96fc832 Author: Alexei Starovoitov Date: Thu Mar 1 18:29:50 2018 -0800 Merge branch 'bpftool-visualization' Jakub Kicinski says: ==================== Jiong says: This patch set is an application of CFG information on eBPF program visualization. It presents some initial code for building CFG information from eBPF instruction sequences. After we get eBPF program bytecode, we do sub-program detection and basic-block partition. These information then are visualized into DOT graph. The user could use any DOT graphic tools (xdot, graphviz etc) to view it. For example: bpftool prog dump xlated id 2 visual &>output.dot [xdot | dotty] output.dot dot -Tpng -o output.png This initial patch set hasn't tuned much on the dot description layout nor decoration, we could improve them later once the direction of the patch set is agreed on. We could also visualize some static analysis performance data. v2 (Jakub): - update license headers and add SPDX tags. ==================== Acked-by: David S. Miller Signed-off-by: Alexei Starovoitov commit d96fc832bcb6269d96e33d506f33033d7ed08598 Author: Quentin Monnet Date: Thu Mar 1 18:01:23 2018 -0800 tools: bpftool: add bash completion for CFG dump Add bash completion for the "visual" keyword used for dumping the CFG of eBPF programs with bpftool. Make sure we only complete with this keyword when we dump "xlated" (and not "jited") instructions. Acked-by: Jiong Wang Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/bash-completion/bpftool | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit b6c1cedb4935a99d315827b990b23230b0eb13f5 Author: Jiong Wang Date: Thu Mar 1 18:01:22 2018 -0800 tools: bpftool: new command-line option and documentation for 'visual' This patch adds new command-line option for visualizing the xlated eBPF sequence. Documentations are updated accordingly. Usage: bpftool prog dump xlated id 2 visual Reviewed-by: Quentin Monnet Signed-off-by: Jiong Wang Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/Documentation/bpftool-prog.rst | 18 ++++++++++++------ tools/bpf/bpftool/prog.c | 12 +++++++++++- 2 files changed, 23 insertions(+), 7 deletions(-) commit efcef17a6d6575dacca22bce69e139354c5a2170 Author: Jiong Wang Date: Thu Mar 1 18:01:21 2018 -0800 tools: bpftool: generate .dot graph from CFG information This patch let bpftool print .dot graph file into stdout. This graph is generated by the following steps: - iterate through the function list. - generate basic-block(BB) definition for each BB in the function. - draw out edges to connect BBs. This patch is the initial support, the layout and decoration of the .dot graph could be improved. Also, it will be useful if we could visualize some performance data from static analysis. Signed-off-by: Jiong Wang Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/cfg.c | 93 +++++++++++++++++++++++++++++++++++++++ tools/bpf/bpftool/xlated_dumper.c | 52 ++++++++++++++++++++++ tools/bpf/bpftool/xlated_dumper.h | 2 + 3 files changed, 147 insertions(+) commit 6e9eb7e3f8705e5e3f1a6a2b47450ec606ab012b Author: Jiong Wang Date: Thu Mar 1 18:01:20 2018 -0800 tools: bpftool: add out edges for each basic-block This patch adds out edges for each basic-block. We will need these out edges to finish the .dot graph drawing. Signed-off-by: Jiong Wang Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/cfg.c | 162 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 160 insertions(+), 2 deletions(-) commit 0824611f9b38d556327916ed0702a7323a88c58b Author: Jiong Wang Date: Thu Mar 1 18:01:19 2018 -0800 tools: bpftool: partition basic-block for each function in the CFG This patch partition basic-block for each function in the CFG. The algorithm is simple, we identify basic-block head in a first traversal, then second traversal to identify the tail. We could build extended basic-block (EBB) in next steps. EBB could make the graph more readable when the eBPF sequence is big. Signed-off-by: Jiong Wang Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/cfg.c | 118 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 117 insertions(+), 1 deletion(-) commit 80331752e990e3f13df1c1d45496424d8eccc29b Author: Jiong Wang Date: Thu Mar 1 18:01:18 2018 -0800 tools: bpftool: detect sub-programs from the eBPF sequence This patch detect all sub-programs from the eBPF sequence and keep the information in the new CFG data structure. The detection algorithm is basically the same as the one in verifier except we need to use insn->off instead of insn->imm to get the pc-relative call offset. Because verifier has modified insn->off/insn->imm during finishing the verification. Also, we don't need to do some sanity checks as verifier has done them. Signed-off-by: Jiong Wang Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/cfg.c | 147 ++++++++++++++++++++++++++++++++++++++++++++++++ tools/bpf/bpftool/cfg.h | 43 ++++++++++++++ 2 files changed, 190 insertions(+) commit 73bb5b4f8f1468f7e433a30d8fbe820b24578991 Author: Jiong Wang Date: Thu Mar 1 18:01:17 2018 -0800 tools: bpftool: factor out xlated dump related code into separate file This patch factors out those code of dumping xlated eBPF instructions into xlated_dumper.[h|c]. They are quite independent dumper functions, so better to be kept separately. New dumper support will be added in later patches in this set. Signed-off-by: Jiong Wang Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/prog.c | 255 +-------------------------------- tools/bpf/bpftool/xlated_dumper.c | 286 ++++++++++++++++++++++++++++++++++++++ tools/bpf/bpftool/xlated_dumper.h | 62 +++++++++ 3 files changed, 349 insertions(+), 254 deletions(-) commit 3197239d24dcecef1dbc260733b377ade731b748 Author: Jiong Wang Date: Thu Mar 1 18:01:16 2018 -0800 tools: bpftool: remove unnecessary 'if' to reduce indentation It is obvious we could use 'else if' instead of start a new 'if' in the touched code. Signed-off-by: Jiong Wang Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/prog.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) commit 7797dc41417eb0e03f39fc4356f7635bcdef108e Author: Soheil Hassas Yeganeh Date: Tue Feb 27 18:22:40 2018 -0500 socket: skip checking sk_err for recvmmsg(MSG_ERRQUEUE) recvmmsg does not call ___sys_recvmsg when sk_err is set. That is fine for normal reads but, for MSG_ERRQUEUE, recvmmsg should always call ___sys_recvmsg regardless of sk->sk_err to be able to clear error queue. Otherwise, users are not able to drain the error queue using recvmmsg. Signed-off-by: Soheil Hassas Yeganeh Reviewed-by: Eric Dumazet Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/socket.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 18d595bf9de99a0f092d8522da42df8b09ef5c2f Author: Weiping Zhang Date: Mon Feb 26 22:08:28 2018 +0800 scsi: sd: Documentation: add sd-parameters.txt Add a file for documenting SCSI sd module parameters and describe the cache_type setting. [mkp: tweaked text a bit] Signed-off-by: Weiping Zhang Signed-off-by: Martin K. Petersen Documentation/scsi/sd-parameters.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 96dbdc5d8c48d438bb372fc3662c9a34fb44b498 Merge: 5697b3e 5684770 Author: David S. Miller Date: Thu Mar 1 21:23:42 2018 -0500 Merge branch 'net-phy-Reduce-duplication' Florian Fainelli says: ==================== net: phy: Reduce duplication This patch series reduces the duplication among 10G PHY drivers that just essentially stub most functions, but do that while replicating what the existing generic functions do. Changes in v3: - removed unused "reg" variable in teranetics.c - fixed subject for patch 5 since we actually use gen10g_no_soft_reset() Changes in v2: - rename gen10g_soft_reset() to gen10g_no_soft_reset() to better illustrate what it does (or does not) - removed stray comment in marvell10g.c ==================== Signed-off-by: David S. Miller commit 568477045f800ee1c68cb18f1e6e800c4365615c Author: Florian Fainelli Date: Thu Mar 1 16:08:59 2018 -0800 net: phy: marvell10g: Utilize gen10g_no_soft_reset() We do the same thing as the generic function: nothing, so utilize it. Signed-off-by: Florian Fainelli drivers/net/phy/marvell10g.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 0adfdb667ab5a4c05765d0f3272afee82b2abf93 Author: Florian Fainelli Date: Thu Mar 1 16:08:58 2018 -0800 net: phy: cortina: Utilize generic functions cortina_soft_reset() does the same thing as gen10g_soft_reset(), and cortina_config_aneg() is actually doing what gen10g_config_init() does for 10G capable PHYs. Signed-off-by: Florian Fainelli drivers/net/phy/cortina.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit aebc78a40b8862e27f374fc7016cd9b4654488ed Author: Florian Fainelli Date: Thu Mar 1 16:08:57 2018 -0800 net: phy: teranetics: Utilize generic functions Update teranetics_aneg_done() to use genphy_c45_aneg_done() instead of duplicating that code, and switch to gen10g_* functions where appropriate instead of maintaining identical copies doing nothing. Signed-off-by: Florian Fainelli drivers/net/phy/teranetics.c | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) commit e8a714e086e42972fd0e2d59e90c28eb2d839429 Author: Florian Fainelli Date: Thu Mar 1 16:08:56 2018 -0800 net: phy: Export gen10g_* functions In order to remove a fair amount of duplication in the different 10G PHY drivers, export all gen10g_* functions to be able to make use of those. While we are at it, rename gen10g_soft_reset() to gen10g_no_soft_reset() to illustrate what it does. Signed-off-by: Florian Fainelli drivers/net/phy/phy-c45.c | 20 +++++++++++++------- include/linux/phy.h | 8 ++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) commit 6ed33d3a06e6ded784a9fe2780b33d6cd2ba2df7 Author: Florian Fainelli Date: Thu Mar 1 16:08:55 2018 -0800 net: phy: aquantia: Utilize genphy_c45_aneg_done() The driver duplicates what the generic function does, so use the generic function intead. Signed-off-by: Florian Fainelli drivers/net/phy/aquantia.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 5697b3e1445387e5fa190a4e6833e3f7da43c3f2 Merge: e6cce7b 5a3b750 Author: David S. Miller Date: Thu Mar 1 21:21:36 2018 -0500 Merge branch 'mac89x0-fixes-and-cleanups' Finn Thain says: ==================== Fixes, cleanup and modernization for mac89x0 driver Changes since v4 of combined patch series: - Removed redundant and non-portable MACH_IS_MAC tests. - Added acked-by tags from Geert Uytterhoeven. - Omitted patches unrelated to mac89x0 driver. ==================== Signed-off-by: David S. Miller commit 5a3b7504c493c71efee722f871299a0abe19b484 Author: Finn Thain Date: Thu Mar 1 18:29:28 2018 -0500 net/mac89x0: Replace custom debug logging with netif_* calls Adopt the conventional style of debug logging because it is both shorter and more flexible. Remove the 'version_printed' flag as the version will be printed only once anyway (when the module loads). Signed-off-by: Finn Thain Signed-off-by: David S. Miller drivers/net/ethernet/cirrus/mac89x0.c | 47 +++++++++++------------------------ 1 file changed, 15 insertions(+), 32 deletions(-) commit 86c2666eac0e68f0cd21659c7888c95b029761d1 Author: Finn Thain Date: Thu Mar 1 18:29:28 2018 -0500 net/mac89x0: Fix and modernize log messages Fix log message fragments that no longer produce the desired output since the behaviour of printk() was changed. Add missing printk severity levels. Drop deprecated "out of memory" message as per checkpatch advice. Signed-off-by: Finn Thain Signed-off-by: David S. Miller drivers/net/ethernet/cirrus/mac89x0.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 43bf2e6d69dd6c2cea7a28763893a3dff34b7873 Author: Finn Thain Date: Thu Mar 1 18:29:28 2018 -0500 net/mac89x0: Convert to platform_driver Apparently these Dayna cards don't have a pseudoslot declaration ROM which means they can't be probed like NuBus cards. Cc: Geert Uytterhoeven Signed-off-by: Finn Thain Acked-by: Geert Uytterhoeven Signed-off-by: David S. Miller arch/m68k/mac/config.c | 4 +++ drivers/net/Space.c | 3 -- drivers/net/ethernet/cirrus/mac89x0.c | 68 +++++++++++++++-------------------- include/net/Space.h | 1 - 4 files changed, 33 insertions(+), 43 deletions(-) commit c967226b1c6caf6888af0f54ea08cb79384cef86 Author: Finn Thain Date: Thu Mar 1 18:29:28 2018 -0500 net/mac89x0: Remove redundant code Signed-off-by: Finn Thain Signed-off-by: David S. Miller drivers/net/ethernet/cirrus/mac89x0.c | 32 -------------------------------- 1 file changed, 32 deletions(-) commit e6cce7bb87dcdbd7f9cdfce4065947067a6270bb Merge: 5f6f845 36b4c0a Author: David S. Miller Date: Thu Mar 1 21:19:03 2018 -0500 Merge branch 'forwarding-selftest-fixes' David Ahern says: ==================== selftests: forwarding: misc bug fixes and enhancements Bug fixes and an enhancement for the recent forwarding tests: - only check tc version on tc tests - handle multipath tests failing with 0 packet count - fix ping command for IPv6 on Debian jessie - improve summary of multipath tests v2 - add CHECK_TC to bridge_vlan_aware.sh (Ido) - dropped patch 2; always check for mz given its use - fixed commit message for the last patch (Multipath: was dropped) ==================== Signed-off-by: David S. Miller commit 36b4c0adad2662464a5a392b592311524bd3a854 Author: David Ahern Date: Thu Mar 1 13:49:33 2018 -0800 selftests: forwarding: Add description to the multipath tests Add a better description to the summary for multipath tests. e.g., INFO: Running IPv6 multipath tests TEST: ECMP [PASS] INFO: Expected ratio 1.00 Measured ratio 1.02 TEST: Weighted MP 2:1 [PASS] INFO: Expected ratio 2.00 Measured ratio 2.02 TEST: Weighted MP 11:45 [PASS] INFO: Expected ratio 4.09 Measured ratio 4.03 Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller .../selftests/net/forwarding/router_multipath.sh | 37 ++++++++++++---------- 1 file changed, 20 insertions(+), 17 deletions(-) commit 993d337c242e292dca89de4558dd8ebfc216fc83 Author: David Ahern Date: Thu Mar 1 13:49:32 2018 -0800 selftests: forwarding: Use PING6 instead of ping for ipv6 multipath test On Debian jessie ping can not handle IPv6 addresses so the command fails. Use PING6 which is set to ping6. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/router_multipath.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ee0902a0d584bd765165448fec8bb1409d5d027 Author: David Ahern Date: Thu Mar 1 13:49:31 2018 -0800 selftests: forwarding: Handle 0 for packet difference in multipath tests If the packet stats have a difference of 0, the test output shows: INFO: Expected ratio 2.00 Measured ratio Runtime error (func=(main), adr=9): Divide by zero (standard_in) 2: syntax error (standard_in) 1: syntax error ./router_multipath.sh: line 187: test: : integer expression expected TEST: Multipath [FAIL] Too large discrepancy between expected and measured ratios Handle the 0 and display a cleaner message: INFO: Running IPv6 multipath tests TEST: Multipath [FAIL] Packet difference is 0 Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/router_multipath.sh | 7 +++++++ 1 file changed, 7 insertions(+) commit 198979be6c16aa62025d5a47680f2c7849b7e64c Author: David Ahern Date: Thu Mar 1 13:49:30 2018 -0800 selftests: forwarding: Only check tc version for tc tests Capabilities of tc command are irrelevant for router tests: $ ./router.sh SKIP: iproute2 too old, missing shared block support Add a CHECK_TC flag and only check tc capabilities if set. Add flag to tc_common.sh and have it sourced before lib.sh Also, if the command lacks some feature the test should exit non-0. Signed-off-by: David Ahern Signed-off-by: David S. Miller .../selftests/net/forwarding/bridge_vlan_aware.sh | 1 + tools/testing/selftests/net/forwarding/lib.sh | 29 ++++++++++++++-------- .../testing/selftests/net/forwarding/tc_actions.sh | 2 +- .../testing/selftests/net/forwarding/tc_chains.sh | 2 +- .../testing/selftests/net/forwarding/tc_common.sh | 2 ++ .../testing/selftests/net/forwarding/tc_flower.sh | 2 +- .../selftests/net/forwarding/tc_shblocks.sh | 2 +- 7 files changed, 25 insertions(+), 15 deletions(-) commit 5f6f845b608a3fa13e5da0584eea5803710cf708 Author: Roopa Prabhu Date: Thu Mar 1 17:55:37 2018 -0800 fib_rules: FRA_GENERIC_POLICY updates for ip proto, sport and dport attrs Fixes: bfff4862653b ("net: fib_rules: support for match on ip_proto, sport and dport") Reported-by: Eric Dumazet Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller include/net/fib_rules.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 29e79e0fa9b86535c2f1442d080c8cb5dec8606b Author: Dan Carpenter Date: Wed Feb 14 15:02:31 2018 +0300 scsi: atp870u: 64 bit bug in atp885_init() On 64 bit CPUs there is a memory corruption bug on probe(). It should be a u32 pointer instead of an unsigned long pointer or we write past the end of the setupdata[] array. Signed-off-by: Dan Carpenter Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/atp870u.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e75fba9c0668b3767f608ea07485f48d33c270cf Author: Wilfried Weissmann Date: Fri Feb 23 20:52:34 2018 +0100 scsi: mvsas: fix wrong endianness of sgpio api This patch fixes the byte order of the SGPIO api and brings it back in sync with ledmon v0.80 and above. [mkp: added missing SoB and fixed whitespace] Signed-off-by: Wilfried Weissmann Signed-off-by: Martin K. Petersen drivers/scsi/mvsas/mv_94xx.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 8aa29f192ca675746ab4f39e46a5fd712a76faa6 Author: Bart Van Assche Date: Thu Mar 1 15:07:20 2018 -0800 scsi: ufs: Fix kernel-doc errors and warnings Avoid that the kernel-doc tool complains about mismatches between kernel-doc headers and function definitions. Avoid that errors like the following are reported when building the UFS driver with W=1: drivers/scsi/ufs/tc-dwc-g210-pci.c:60: error: Cannot parse struct or union! drivers/scsi/ufs/tc-dwc-g210-pltfrm.c:26: warning: cannot understand function prototype: 'struct ufs_hba_variant_ops tc_dwc_g210_20bit_pltfm_hba_vops = ' Signed-off-by: Bart Van Assche Cc: Vivek Gautam Cc: Stanislav Nijnikov Signed-off-by: Martin K. Petersen drivers/scsi/ufs/tc-dwc-g210-pci.c | 4 +- drivers/scsi/ufs/tc-dwc-g210-pltfrm.c | 2 +- drivers/scsi/ufs/ufshcd-pci.c | 7 ++- drivers/scsi/ufs/ufshcd.c | 94 +++++++++++++++++------------------ 4 files changed, 52 insertions(+), 55 deletions(-) commit e0b14a4ad57801063065cfe2129b0ea9ad95e59a Author: Bart Van Assche Date: Thu Mar 1 15:07:19 2018 -0800 scsi: sd_zbc: Fix sd_zbc_get_seq_zones() kernel-doc header Avoid that the kernel-doc tool complains about a mismatch between the kernel-doc header and the function argument list. Signed-off-by: Bart Van Assche Cc: Damien Le Moal Cc: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/sd_zbc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8c58f73c48e517f8be7349ef915da871a95641b9 Author: Maarten Lankhorst Date: Wed Feb 21 10:28:08 2018 +0100 drm/i915: Check for I915_MODE_FLAG_INHERITED before drm_atomic_helper_check_modeset Moving the check upwards will mean we we no longer have to add planes and connectors manually, because everything is handled correctly by drm_atomic_helper_check_modeset() as intended. [applied with whitespace changes to make sparse happy] Signed-off-by: Maarten Lankhorst Cc: Lyude Paul Cc: Daniel Vetter Reviewed-by: Daniel Vetter Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180221092808.30060-1-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit aa8e712cee93d520e96a2ca8e3a20f807c937e3f Author: Stephen Smalley Date: Thu Mar 1 18:48:02 2018 -0500 selinux: wrap global selinux state Define a selinux state structure (struct selinux_state) for global SELinux state and pass it explicitly to all security server functions. The public portion of the structure contains state that is used throughout the SELinux code, such as the enforcing mode. The structure also contains a pointer to a selinux_ss structure whose definition is private to the security server and contains security server specific state such as the policy database and SID table. This change should have no effect on SELinux behavior or APIs (userspace or LSM). It merely wraps SELinux state and passes it explicitly as needed. Signed-off-by: Stephen Smalley [PM: minor fixups needed due to collisions with the SCTP patches] Signed-off-by: Paul Moore security/selinux/avc.c | 16 +- security/selinux/hooks.c | 214 ++++--- security/selinux/ibpkey.c | 3 +- security/selinux/include/avc.h | 6 - security/selinux/include/avc_ss.h | 6 - security/selinux/include/conditional.h | 11 +- security/selinux/include/objsec.h | 2 - security/selinux/include/security.h | 228 +++++-- security/selinux/netif.c | 2 +- security/selinux/netlabel.c | 14 +- security/selinux/netnode.c | 4 +- security/selinux/netport.c | 2 +- security/selinux/selinuxfs.c | 145 +++-- security/selinux/ss/avtab.c | 9 +- security/selinux/ss/avtab.h | 3 - security/selinux/ss/ebitmap.c | 7 +- security/selinux/ss/ebitmap.h | 3 - security/selinux/ss/hashtab.c | 8 +- security/selinux/ss/hashtab.h | 4 - security/selinux/ss/mls.c | 72 ++- security/selinux/ss/mls.h | 38 +- security/selinux/ss/services.c | 1078 ++++++++++++++++++-------------- security/selinux/ss/services.h | 24 +- security/selinux/ss/status.c | 47 +- security/selinux/xfrm.c | 6 +- 25 files changed, 1155 insertions(+), 797 deletions(-) commit c8745e07d5d676b2cb49f90baec1ac5e66cb7383 Author: Prashant Bhole Date: Thu Mar 1 14:47:40 2018 +0900 samples/bpf: detach prog from cgroup test_cgrp2_sock.sh and test_cgrp2_sock2.sh tests keep the program attached to cgroup even after completion. Using detach functionality of test_cgrp2_sock in both scripts. Signed-off-by: Prashant Bhole Acked-by: David Ahern Signed-off-by: Daniel Borkmann samples/bpf/test_cgrp2_sock.sh | 1 + samples/bpf/test_cgrp2_sock2.sh | 3 +++ 2 files changed, 4 insertions(+) commit a80ea4cb944efc38e490a172e7afe635b2800db3 Author: Bartlomiej Zolnierkiewicz Date: Thu Mar 1 12:16:00 2018 +0100 pata_bk3710: clarify license version and use SPDX header - clarify license version (it should be GPL 2.0) - use SPDX header Acked-by: Sekhar Nori Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Tejun Heo drivers/ata/pata_bk3710.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 7f1d5c9dea8a641bd4a8d600c5feb98ae842c5da Author: Bartlomiej Zolnierkiewicz Date: Thu Mar 1 12:13:35 2018 +0100 pata_falcon: clarify license version and use SPDX header - clarify license version (it should be GPL 2.0) - use SPDX header Cc: Michael Schmitz Acked-by: Geert Uytterhoeven Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Tejun Heo drivers/ata/pata_falcon.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit a1f362d806b29669725c4c29b591b0a1bf9081cb Merge: f7a9f77 03a0dde Author: Mark Brown Date: Thu Mar 1 19:55:59 2018 +0000 Merge branch 'topic/component-platform' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel commit f7a9f77256e7fbd6150651bfab44f60c39f0b7a2 Author: Sriram Periyasamy Date: Sat Jan 27 09:50:24 2018 +0530 ASoC: Intel: Skylake: Find module id from UUID for bind params Module id is a property of firmware manifest and can vary across platforms. So use the uuid to find module id dynamically for bind params like kpb post bind params. Signed-off-by: Sriram Periyasamy Signed-off-by: Guneshwor Singh Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 2 + sound/soc/intel/skylake/skl-topology.c | 83 +++++++++++++++++++++++++++++++++- sound/soc/intel/skylake/skl-topology.h | 13 +++++- 3 files changed, 96 insertions(+), 2 deletions(-) commit 8913f97d2317f363d4d525fdbff5817942bda6d1 Author: Pawse, GuruprasadX Date: Sat Jan 27 09:50:23 2018 +0530 ASoC: Intel: board: Add BE DAI link for WoV and update DAPM machine map. Create BE DAI link for WoV and accordingly update the DAPM machine map Signed-off-by: Pawse, GuruprasadX Signed-off-by: Guneshwor Singh Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_rt298.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 66b4860641cd459cd5e189ed5db6e9f339c31a0f Author: Pawse, GuruprasadX Date: Sat Jan 27 09:50:22 2018 +0530 ASoC: Intel: Skylake: Add BE DAI for WoV usecase Currently DMIC capture and WoV usecase uses same BE DAI but operate at different sampling rates, this results in config mismatch for WoV when DMIC is already running in parallel. DMIC has two slots which can operate with some constraints, so add BE DAI for DMICvoice pin which can used for WoV usecases to capture 4ch, 16KHz, 16bit data. Signed-off-by: Pawse, GuruprasadX Signed-off-by: Guneshwor Singh Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit cb1f904d91c52bc4e03e11eb161288c40c655095 Author: Guneshwor Singh Date: Sat Jan 27 09:50:21 2018 +0530 ASoC: Intel: Skylake: Refine skl widget type check The current check is not effective when all the widgets of a card are involved since other widgets also can be of same type. So, make widget type check more stringent by checking dev pointer additionally. Signed-off-by: Guneshwor Singh Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 890861aa85043cc9d99a01e1bd26883722e95243 Author: Geert Uytterhoeven Date: Tue Jan 30 14:19:43 2018 +0100 ASoC: rt5514: Fix uninitialized calibration value With gcc-4.1.2, if CONFIG_SND_SOC_RT5514_SPI is not set: sound/soc/codecs/rt5514.c: In function ‘rt5514_dsp_voice_wake_up_put’: sound/soc/codecs/rt5514.c:363: warning: ‘buf[0]’ is used uninitialized in this function sound/soc/codecs/rt5514.c:363: warning: ‘buf[1]’ is used uninitialized in this function sound/soc/codecs/rt5514.c:363: warning: ‘buf[2]’ is used uninitialized in this function sound/soc/codecs/rt5514.c:363: warning: ‘buf[3]’ is used uninitialized in this function Fix this by initializing the buffer with zeroes, to avoid random bits being written to the calibration register later. Fixes: fc9cab05837639ce ("ASoC: rt5514: The DSP clock can be calibrated by the other clock source") Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown sound/soc/codecs/rt5514.c | 1 + 1 file changed, 1 insertion(+) commit 29838a5c1e77ed93d41fb9837390e243b9b73518 Author: Geert Uytterhoeven Date: Tue Jan 30 14:19:42 2018 +0100 ASoC: rt5514: Fix rt5514_spi_burst_read() buffer passing rt5514_dsp_voice_wake_up_put() passes "(u8 *)&buf" to rt5514_spi_burst_read(), where the cast is needed to silence a compiler warning: sound/soc/codecs/rt5514.c: In function ‘rt5514_dsp_voice_wake_up_put’: sound/soc/codecs/rt5514.c:357: warning: passing argument 2 of ‘rt5514_spi_burst_read’ from incompatible pointer type However, as the variable is declared as an array ("u8 buf[8]"), the function should just pass "buf" instead. Fixes: fc9cab05837639ce ("ASoC: rt5514: The DSP clock can be calibrated by the other clock source") Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown sound/soc/codecs/rt5514.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f1088d4b813fb4d20fc9e8e8db5ca252923f25eb Author: Hans de Goede Date: Sun Feb 25 11:46:57 2018 +0100 ASoC: rt5651: Always keep OVCD enabled OVCD is not only useful for jack-type detection, but is also useful to protect against over-current faults in general, so always keep OVCD enabled, instead of only enabling it for jack-type detection. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 9e1795925d0e967d2a0191b1487b5caf0693f2ae Author: Hans de Goede Date: Sun Feb 25 11:46:56 2018 +0100 ASoC: rt5651: Only configure OVCD once at set_jack time Only configure OVCD once at set_jack time, rather then configuring it on every jack-insertion event and switch to using bit field defines instead of hardcoding a magic value. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 1310e737a68741c9b06cf63be0084bae6018b308 Author: Hans de Goede Date: Sun Feb 25 11:46:55 2018 +0100 ASoC: rt5651: Enable LDO and micbias1 supplies for jack-type detection To determine if a plugged in jack is a headset (speakers + mic) or headphones (mic contact shorted to ground) we use the micbias1 OVer Current Detect (OVCD) functionality. For this to work we need to have a micbias current to actually cause an overcurrent condition when headphones are plugged in, so jack-type detection requires both the LDO and micbias1 supplies to be on. Before this commit there were 2 issues with the handling of this: 1) The LDO supply was force-enabled twice and never disabled again even though it only needs to be forced on when doing jack-type detection 2) micbias1 was not force-enabled, and thus may be off when doing jack-type detection This commit fixes both by force-enabling the LDO and micbias1 supplies before checking for an overcurrent condition and disabling them afterwards. Note that both supplies will still get turned on normally (and OVCD will protect against overcurrent) when the micbias1 is enabled normally because the user has activated a sound stream recording from the mic. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) commit 57d9d7c32fc24ca4de49392fec1fdd3db1f58e92 Author: Hans de Goede Date: Sun Feb 25 11:46:54 2018 +0100 ASoC: rt5651: Remove "JD Power" dapm supply Remove the "JD power" dapm supply which gets force-enabled once when using jack-detect and never gets disabled again. Since the PWR_JD_M bit simply needs to be always on when using jack-detect there is no need to have it tracked by dapm, instead we can simply set it to 1 once when initializing the jack-detection. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 3d7719d3cc8efe88be4c72cb7cbb0d866ed7d1b2 Author: Hans de Goede Date: Sun Feb 25 11:46:53 2018 +0100 ASoC: rt5651: Only configure LDO voltage once at boot Now that rt5651_set_bias_level(BIAS_OFF) no longer modifies the LDO voltage selection bits, there is no need to set them each time we move to standby. Instead configure them once at component-probe() time. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a25fe11746846f5dd3286cf690b470e3d049797f Author: Hans de Goede Date: Sun Feb 25 11:46:52 2018 +0100 ASoC: rt5651: Remove programming of PWR regs before force_bias_level() call Remove the setup of the PWR_ANLG1 reg which was done directly before calling snd_soc_component_force_bias_level(SND_SOC_BIAS_OFF), as the latter will override any settings done to PWR_ANLG1 immediately anyways. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 10 ---------- 1 file changed, 10 deletions(-) commit 887fcc6f0514380f17d5016dd8cdfc4d9a4437ee Author: Hans de Goede Date: Sun Feb 25 11:46:51 2018 +0100 ASoC: rt5651: Do not modify jd and PLL power bits from set_bias_level() rt5651_set_bias_level(BIAS_OFF) used to unconditionally clear the entire register, including the jack-detect and PLL power bits. When jack-detection support was introduced a special case for jack-detect was added which hard-codes a register value to keep both on. This commit removes the jack-detect special case, instead simply leaving these bits as is on BIAS_OFF. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit bba4e685dae8643469ca6fac22f10ca81554586e Author: Hans de Goede Date: Sun Feb 25 11:46:50 2018 +0100 ASoC: rt5651: Do not modify the LDO voltage control bits from set_bias_level() The PWR_ANLG1 reg not only contains various power on/off bits, it also contains 2 bits which select if the LDO generates 1.0, 1.1 or 1.2V. Note there is a separate on/off bit for the LDO. rt5651_set_bias_level(BIAS_OFF) used to unconditionally clear the entire register, when jack-detection support was introduced a special case for jack-detect was added which hard-codes a register value to keep the LDO voltage at 1.2 volt. This commit removes the jack-detect special case, instead simply always leaving the LDO voltage control bits as is on BIAS_OFF. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 984c803f9a2ad6f1d2bea0b7ef2e3c18d69fbdfd Author: Hans de Goede Date: Sun Feb 25 11:46:49 2018 +0100 ASoC: rt5651: Fix bias_level confusion The rt5651_set_bias_level() function was turning everything off at SND_SOC_BIAS_STANDBY, rather then at SND_SOC_BIAS_OFF, requiring the bias- level to be raised to SND_SOC_BIAS_PREPARE before turning anything on. This is not how the bias-levels are supposed to work, this commit fixes this by turning everything off at the SND_SOC_BIAS_OFF level and enabling the pwr-bits needed for minimum functionality at SND_SOC_BIAS_STANDBY. This fixes the minimum set of pwr-bits not getting enabled when force-enabling some dapm-supplies (e.g. for jack type detection), which raises the bias-level to standby. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit d082174c99e77beb06a51c90ac61934554e516e1 Author: Hans de Goede Date: Sun Feb 25 11:46:48 2018 +0100 ASoC: rt5651: Remove is_sys_clk_from_pll() is_sys_clk_from_pll() is used as a snd_soc_dapm_route.connected callback, checking RT5651_GBL_CLK to determine if the sys-clk is PLL1 and thus the PWR_PLL bit in reg PWR_ANLG2 must be set. RT5651_GBL_CLK is changed by rt5651_set_dai_sysclk(), which gets called by the pre_pmu / post_pmd functions of the "Platform Clock" dapm-supply. This creates an ordering issue, during a dapm transition first all connected() callbacks are called to build a list of supplies to enable and then the complete list is walked to enable the supplies. Since the connected() check happens before enabling any supplies, is_sys_clk_from_pll() ends up deciding if the PWR_PLL bit should be set based on the state the "Platform Clock" supply had *before* the transition. This sometimes results in PWR_PLL being off, even though *after* the transition PLL1 is configured as sys-clk. This commit removes is_sys_clk_from_pll() instead simply setting / clearing PWR_PLL in rt5651_set_dai_sysclk() based on the selected sys-clk, which fixes this and as a bonus results in a nice cleanup. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) commit 9df1c6ecbf172fedb1f4f76585338860595b9bf7 Author: Shawn Lin Date: Thu Mar 1 09:26:55 2018 +0800 PCI: Fix NULL pointer dereference in of_pci_bus_find_domain_nr() If the "parent" pointer passed to of_pci_bus_find_domain_nr() is NULL, don't dereference it. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1deb88ba1058817b830dd57102ed857c7895568e Author: Tony Lindgren Date: Thu Mar 1 10:47:35 2018 -0800 ARM: omap2plus_defconfig: Add SERIAL_DEV for bluetooth We now have SERIAL_DEV that at least TI WLAN devices can use. We want SERIAL_DEV built-in, so we can also enable the option for SERIAL_DEV_CTRL_TTYPORT. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit f1c02cfb7b30f5c9d9f4e383260abf89d89c3341 Author: Sabrina Dubroca Date: Wed Feb 28 16:40:08 2018 +0100 ipv6: allow userspace to add IFA_F_OPTIMISTIC addresses According to RFC 4429 (section 3.1), adding new IPv6 addresses as optimistic addresses is acceptable, as long as the implementation follows some rules: * Optimistic DAD SHOULD only be used when the implementation is aware that the address is based on a most likely unique interface identifier (such as in [RFC2464]), generated randomly [RFC3041], or by a well-distributed hash function [RFC3972] or assigned by Dynamic Host Configuration Protocol for IPv6 (DHCPv6) [RFC3315]. Optimistic DAD SHOULD NOT be used for manually entered addresses. Thus, it seems reasonable to allow userspace to set the optimistic flag when adding new addresses. We must not let userspace set NODAD + OPTIMISTIC, since if the kernel is not performing DAD we would never clear the optimistic flag. We must also ignore userspace's request to add OPTIMISTIC flag to addresses that have already completed DAD (addresses that don't have the TENTATIVE flag, or that have the DADFAILED flag). Then we also need to clear the OPTIMISTIC flag on permanent addresses when DAD fails. Otherwise, IFA_F_OPTIMISTIC addresses added by userspace can still be used after DAD has failed, because in ipv6_chk_addr_and_flags(), IFA_F_OPTIMISTIC overrides IFA_F_TENTATIVE. Setting IFA_F_OPTIMISTIC from userspace is conditional on CONFIG_IPV6_OPTIMISTIC_DAD and the optimistic_dad sysctl. Signed-off-by: Sabrina Dubroca Reviewed-by: Stefano Brivio Signed-off-by: David S. Miller net/ipv6/addrconf.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit d8c85d238d6b9b1d8a854fabe34b238736528317 Author: Bogdan Purcareata Date: Thu Mar 1 11:47:10 2018 -0600 staging: fsl-mc: Cleanup dpbp and dpcon API Some functions and associated structures are not used by current code, so remove them. Signed-off-by: Bogdan Purcareata Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpbp-cmd.h | 10 ------ drivers/staging/fsl-mc/bus/dpbp.c | 67 ----------------------------------- drivers/staging/fsl-mc/include/dpbp.h | 10 ------ 3 files changed, 87 deletions(-) commit 3a053b1a30dcb4e39569bcce2f4357509260db75 Author: Gal Pressman Date: Wed Feb 28 15:59:15 2018 +0200 net: Fix spelling mistake "greater then" -> "greater than" Fix trivial spelling mistake "greater then" -> "greater than". Signed-off-by: Gal Pressman Signed-off-by: David S. Miller include/net/sch_generic.h | 2 +- net/core/dev.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a5e13ea741b6bcbc95c2f8ff6e87bace3e0b4299 Author: Tony Lindgren Date: Thu Mar 1 10:29:08 2018 -0800 ARM: omap2plus_defconfig: Update for moved options Just move the options around to make applying patches against omap2plus_defconfig easier after making make savedefconfig. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit e31a6f9067e3c30da1bea26ce2d1355af9577d13 Author: Richard Cochran Date: Fri Feb 23 07:25:46 2018 -0800 net: phylink: Remove redundant netdev.phydev assignment As a part of working on MII time stamping infrastructure, I was trying to figure out how netdev->phydev gets assigned, and I stumbled across this. Ever since the new phylink code came in, the field is assigned twice. The function, phylink_connect_phy(), calls phy_attach_direct() phylink_bringup_phy() and phy_attach_direct() sets dev->phydev = phydev; but phylink_bringup_phy() then sets the same field again: pl->netdev->phydev = phy; Similarly, the function, phylink_of_phy_connect(), calls of_phy_attach() phy_attach_direct() phylink_bringup_phy() The removal code is also duplicated: phylink_disconnect_phy() pl->netdev->phydev = NULL; phy_disconnect() phy_detach() phydev->attached_dev->phydev = NULL; This patch removes the redundant assignments, restricting manipulation of the netdev.phydev field to phy_attach_direct() and phy_detach(). Signed-off-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 2 -- 1 file changed, 2 deletions(-) commit f270bf9dce82dfa0317ffd47ecfe4f304accffe8 Author: Tero Kristo Date: Mon Feb 26 17:05:00 2018 +0200 ARM: dts: am43xx: add emif interrupt info The EMIF instance on am43xx supports interrupts, so add the info for completeness sake. Right now, the driver does not use this for anything, but it is possible it would be used in future. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/am4372.dtsi | 1 + 1 file changed, 1 insertion(+) commit ba6078081caae5bebbd34844ee2cf6c52aa7daec Merge: 3c5aa0b 9651b93 Author: David S. Miller Date: Thu Mar 1 13:21:32 2018 -0500 Merge branch 'smc-link-layer-control-enhancements' Ursula Braun says: ==================== net/smc: Link Layer Control enhancements here is a series of smc patches enabling SMC communication with peers supporting more than one link per link group. The first three patches are preparing code cleanups. ==================== Signed-off-by: David S. Miller commit 9651b9346f5bc85a4fef96789c756748483d9ee2 Author: Karsten Graul Date: Thu Mar 1 13:51:33 2018 +0100 net/smc: prevent new connections on link group When the processing of a DELETE LINK message has started, new connections should not be added to the link group that is about to terminate. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 9 --------- net/smc/smc_core.c | 19 ++++++++++--------- net/smc/smc_core.h | 1 + net/smc/smc_llc.c | 1 + 4 files changed, 12 insertions(+), 18 deletions(-) commit 52bedf37bafe1d3bc36d1513ad059d9fd28b3c3f Author: Karsten Graul Date: Thu Mar 1 13:51:32 2018 +0100 net/smc: process add/delete link messages Add initial support for the LLC messages ADD LINK and DELETE LINK. Introduce a link state field. Extend the initial LLC handshake with ADD LINK processing. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 42 ++++++++++++++ net/smc/smc_core.c | 3 + net/smc/smc_core.h | 10 ++++ net/smc/smc_llc.c | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++--- net/smc/smc_llc.h | 7 +++ 5 files changed, 223 insertions(+), 7 deletions(-) commit 75d320d611d8569ebe4e42718de035fcc79f8069 Author: Karsten Graul Date: Thu Mar 1 13:51:31 2018 +0100 net/smc: do not allow eyecatchers in rmbe SMC does not support eyecatchers in RMB elements, decline peers requesting this support. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 11 +++++++++-- net/smc/smc_clc.h | 1 + net/smc/smc_core.h | 2 ++ net/smc/smc_llc.c | 16 +++++++++++++++- 4 files changed, 27 insertions(+), 3 deletions(-) commit 4ed75de58e9191c011e318dc98b4b157dc633444 Author: Karsten Graul Date: Thu Mar 1 13:51:30 2018 +0100 net/smc: process confirm/delete rkey messages Process and respond to CONFIRM RKEY and DELETE RKEY messages. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/smc_core.c | 48 ++++++++++++++---- net/smc/smc_core.h | 2 + net/smc/smc_llc.c | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_llc.h | 3 ++ 4 files changed, 186 insertions(+), 10 deletions(-) commit 313164da55da0fb24191e729f989f4b2c2793ead Author: Karsten Graul Date: Thu Mar 1 13:51:29 2018 +0100 net/smc: respond to test link messages Add TEST LINK message responses, which also serves as preparation for support of sockopt TCP_KEEPALIVE. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/smc_llc.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- net/smc/smc_llc.h | 3 +++ 2 files changed, 56 insertions(+), 1 deletion(-) commit be6d467b997f9e32aa9b27add06e7b0c8627a566 Author: Karsten Graul Date: Thu Mar 1 13:51:28 2018 +0100 net/smc: remove unused fields from smc structures The daddr field holds the destination IPv4 address. The field was set but never used and can be removed. The addr field was a left-over from an earlier version of non-blocking connects and can be removed. The result of the call to kernel_getpeername is not used, the call can be removed. Non-blocking connects are working, so remove restriction comment. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 15 ++++----------- net/smc/smc.h | 3 +-- net/smc/smc_core.c | 7 +++---- net/smc/smc_core.h | 1 - 4 files changed, 8 insertions(+), 18 deletions(-) commit 696cd3016975d31e3499c49a7a747d7615a16b3b Author: Karsten Graul Date: Thu Mar 1 13:51:27 2018 +0100 net/smc: move netinfo function to file smc_clc.c The function smc_netinfo_by_tcpsk() belongs to CLC handling. Move it to smc_clc.c and rename to smc_clc_netinfo_by_tcpsk. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 42 +----------------------------------------- net/smc/smc.h | 2 -- net/smc/smc_clc.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- net/smc/smc_clc.h | 2 ++ 4 files changed, 45 insertions(+), 45 deletions(-) commit 0f6271264afd975bc599d6f30f3693e9aea57036 Author: Stefan Raspl Date: Thu Mar 1 13:51:26 2018 +0100 net/smc: cleanup smc_llc.h and smc_clc.h headers Remove structures used internal only from headers. And remove an extra function parameter. Signed-off-by: Stefan Raspl Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 8 ++++---- net/smc/smc_clc.c | 3 +++ net/smc/smc_clc.h | 6 ------ net/smc/smc_llc.c | 30 ++++++++++++++++++++++++++++++ net/smc/smc_llc.h | 28 ---------------------------- 5 files changed, 37 insertions(+), 38 deletions(-) commit 1f5ffc934bfe9521c8045fb995eb5faa07f6371c Author: Tero Kristo Date: Mon Feb 26 17:04:59 2018 +0200 ARM: dts: am33xx: add emif interrupt info The EMIF instance on am33xx supports interrupts, so add the info for completeness sake. Right now, the driver does not use this for anything, but it is possible it would be used in future. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx.dtsi | 1 + 1 file changed, 1 insertion(+) commit 3c5aa0bc9c0063b4c462cce4d07f88aa3fbeaea3 Merge: a25724b 7b0db85 Author: David S. Miller Date: Thu Mar 1 13:13:24 2018 -0500 Merge branch 'ipv4-ipv6-mcast-align' Yuval Mintz says: ==================== ipmr, ip6mr: Align multicast routing for IPv4 & IPv6 Historically ip6mr was based [cut-n-paste] on ipmr and the two have not diverged too much. Apparently as ipv4 multicast routing is more common than its ipv6 brethren modifications since then are mostly one-way, affecting ipmr while leaving ip6mr unchanged. This series is meant to re-factor both ipmr and ip6mr into having common structures [and some functionality], adding 2 new common files - mroute_base.h and ipmr_base.c. The series begins by bringing ip6mr up to speed to some of the changes applied in the past to ipmr [#2, #3]. It is then possible to re-factor a lot of the common structures - vif devices [#1], mr_table [#4] mfc_cache [#6], and use the common structures in both ipmr and ip6mr. The rest of the patches re-factor some choice flows used by both ipmr and ip6mr and eliminates duplicity. This series would later allow for easy extension of ipmr offloading to support ip6mr offloading as well, as almost all structures related to the offloading would be shared between the two protocols. Changes from previous versions ------------------------------ v2: - #6 Corrected reporting logic when hitting an unresolved cache - #7 Addressed kernel doc style [Thanks Nikolay] RFC -> v1: - Corrected support for CONFIG_IP{,V6}_MROUTE_MULTIPLE_TABLES - Addressed a couple of kbuild test robot issues ==================== Signed-off-by: David S. Miller commit 7b0db85737db3f4d76b2a412e4f19eae59b8b494 Author: Yuval Mintz Date: Wed Feb 28 23:29:39 2018 +0200 ipmr, ip6mr: Unite dumproute flows The various MFC entries are being held in the same kind of mr_tables for both ipmr and ip6mr, and their traversal logic is identical. Also, with the exception of the addresses [and other small tidbits] the major bulk of the nla setting is identical. Unite as much of the dumping as possible between the two. Notice this requires creating an mr_table iterator for each, as the for-each preprocessor macro can't be used by the common logic. Signed-off-by: Yuval Mintz Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute_base.h | 29 ++++++++ net/ipv4/ipmr.c | 161 +++++++++++--------------------------------- net/ipv4/ipmr_base.c | 123 +++++++++++++++++++++++++++++++++ net/ipv6/ip6mr.c | 156 +++++++++++------------------------------- 4 files changed, 230 insertions(+), 239 deletions(-) commit 889cd83cbe411dda854429f3223ab2d31a860a4a Author: Yuval Mintz Date: Wed Feb 28 23:29:38 2018 +0200 ip6mr: Remove MFC_NOTIFY and refactor flags MFC_NOTIFY exists in ip6mr, probably as some legacy code [was already removed for ipmr in commit 06bd6c0370bb ("net: ipmr: remove unused MFC_NOTIFY flag and make the flags enum"). Remove it from ip6mr as well, and move the enum into a common file; Notice MFC_OFFLOAD is currently only used by ipmr. Signed-off-by: Yuval Mintz Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute.h | 9 --------- include/linux/mroute6.h | 3 --- include/linux/mroute_base.h | 9 +++++++++ net/ipv6/ip6mr.c | 3 --- 4 files changed, 9 insertions(+), 15 deletions(-) commit 3feda6b46f734704840685a62b645cbe4efb810c Author: Yuval Mintz Date: Wed Feb 28 23:29:37 2018 +0200 ipmr, ip6mr: Unite vif seq functions Same as previously done with the mfc seq, the logic for the vif seq is refactored to be shared between ipmr and ip6mr. Signed-off-by: Yuval Mintz Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute_base.h | 33 ++++++++++++++++++++++++++++++ net/ipv4/ipmr.c | 49 +++++--------------------------------------- net/ipv4/ipmr_base.c | 33 ++++++++++++++++++++++++++++++ net/ipv6/ip6mr.c | 50 +++++---------------------------------------- 4 files changed, 76 insertions(+), 89 deletions(-) commit c8d6196803265484f7e1cdd1b00a188dc59a5988 Author: Yuval Mintz Date: Wed Feb 28 23:29:36 2018 +0200 ipmr, ip6mr: Unite mfc seq logic With the exception of the final dump, ipmr and ip6mr have the exact same seq logic for traversing a given mr_table. Refactor that code and make it common. Signed-off-by: Yuval Mintz Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute_base.h | 69 ++++++++++++++++++++++++++++++++ net/ipv4/ipmr.c | 93 +++---------------------------------------- net/ipv4/ipmr_base.c | 62 +++++++++++++++++++++++++++++ net/ipv6/ip6mr.c | 97 ++++----------------------------------------- 4 files changed, 143 insertions(+), 178 deletions(-) commit 845c9a7ae7f5342ba42280c3a2f2aa92bce641d7 Author: Yuval Mintz Date: Wed Feb 28 23:29:35 2018 +0200 ipmr, ip6mr: Unite logic for searching in MFC cache ipmr and ip6mr utilize the exact same methods for searching the hashed resolved connections, difference being only in the construction of the hash comparison key. In order to unite the flow, introduce an mr_table operation set that would contain the protocol specific information required for common flows, in this case - the hash parameters and a comparison key representing a (*,*) route. Signed-off-by: Yuval Mintz Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute_base.h | 52 +++++++++++++++++++++++++++++-- net/ipv4/ipmr.c | 71 ++++++++++--------------------------------- net/ipv4/ipmr_base.c | 54 +++++++++++++++++++++++++++++++-- net/ipv6/ip6mr.c | 74 +++++++++++---------------------------------- 4 files changed, 134 insertions(+), 117 deletions(-) commit 494fff56379c4ad5b8fe36a5b7ffede4044ca7bb Author: Yuval Mintz Date: Wed Feb 28 23:29:34 2018 +0200 ipmr, ip6mr: Make mfc_cache a common structure mfc_cache and mfc6_cache are almost identical - the main difference is in the origin/group addresses and comparison-key. Make a common structure encapsulating most of the multicast routing logic - mr_mfc and convert both ipmr and ip6mr into using it. For easy conversion [casting, in this case] mr_mfc has to be the first field inside every multicast routing abstraction utilizing it. Signed-off-by: Yuval Mintz Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | 21 +- include/linux/mroute.h | 45 +--- include/linux/mroute6.h | 23 +- include/linux/mroute_base.h | 45 ++++ net/ipv4/ipmr.c | 233 ++++++++++---------- net/ipv6/ip6mr.c | 248 +++++++++++----------- 6 files changed, 312 insertions(+), 303 deletions(-) commit 0bbbf0e7d0e7ea8267836986346a9b3a35b74e4e Author: Yuval Mintz Date: Wed Feb 28 23:29:33 2018 +0200 ipmr, ip6mr: Unite creation of new mr_table Now that both ipmr and ip6mr are using the same mr_table structure, we can have a common function to allocate & initialize a new instance. Signed-off-by: Yuval Mintz Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute_base.h | 17 +++++++++++++++++ net/ipv4/ipmr.c | 27 ++++++++++----------------- net/ipv4/ipmr_base.c | 27 +++++++++++++++++++++++++++ net/ipv6/ip6mr.c | 30 ++++++++++-------------------- 4 files changed, 64 insertions(+), 37 deletions(-) commit b70432f7319eb75b24ca57dde8146c5e27244780 Author: Yuval Mintz Date: Wed Feb 28 23:29:32 2018 +0200 mroute*: Make mr_table a common struct Following previous changes to ip6mr, mr_table and mr6_table are basically the same [up to mr6_table having additional '6' suffixes to its variable names]. Move the common structure definition into a common header; This requires renaming all references in ip6mr to variables that had the distinct suffix. Signed-off-by: Yuval Mintz Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute.h | 21 ---- include/linux/mroute6.h | 1 - include/linux/mroute_base.h | 46 +++++++ include/net/netns/ipv6.h | 2 +- net/ipv4/ipmr.c | 2 - net/ipv6/ip6mr.c | 301 ++++++++++++++++++++------------------------ 6 files changed, 186 insertions(+), 187 deletions(-) commit 87c418bf1323d57140f4b448715f64de3fbb7e91 Author: Yuval Mintz Date: Wed Feb 28 23:29:31 2018 +0200 ip6mr: Align hash implementation to ipmr Since commit 8fb472c09b9d ("ipmr: improve hash scalability") ipmr has been using rhashtable as a basis for its mfc routes, but ip6mr is currently still using the old private MFC hash implementation. Align ip6mr to the current ipmr implementation. Signed-off-by: Yuval Mintz Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute6.h | 30 ++--- net/ipv6/ip6mr.c | 313 ++++++++++++++++++++++++++---------------------- 2 files changed, 184 insertions(+), 159 deletions(-) commit 8571ab479a6e1ef46ead5ebee567e128a422767c Author: Yuval Mintz Date: Wed Feb 28 23:29:30 2018 +0200 ip6mr: Make mroute_sk rcu-based In ipmr the mr_table socket is handled under RCU. Introduce the same for ip6mr. Signed-off-by: Yuval Mintz Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute6.h | 6 +++--- net/ipv6/ip6_output.c | 2 +- net/ipv6/ip6mr.c | 45 +++++++++++++++++++++++++++------------------ 3 files changed, 31 insertions(+), 22 deletions(-) commit 6853f21f764b04e58df5e44629fec1fb8f3cbf2e Author: Yuval Mintz Date: Wed Feb 28 23:29:29 2018 +0200 ipmr,ipmr6: Define a uniform vif_device The two implementations have almost identical structures - vif_device and mif_device. As a step toward uniforming the mr_tables, eliminate the mif_device and relocate the vif_device definition into a new common header file. Also, introduce a common initializing function for setting most of the vif_device fields in a new common source file. This requires modifying the ipv{4,6] Kconfig and ipv4 makefile as we're introducing a new common config option - CONFIG_IP_MROUTE_COMMON. Signed-off-by: Yuval Mintz Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute.h | 13 +----------- include/linux/mroute6.h | 11 +--------- include/linux/mroute_base.h | 52 +++++++++++++++++++++++++++++++++++++++++++++ net/ipv4/Kconfig | 5 +++++ net/ipv4/Makefile | 1 + net/ipv4/ipmr.c | 32 +++++++++++++--------------- net/ipv4/ipmr_base.c | 28 ++++++++++++++++++++++++ net/ipv6/Kconfig | 1 + net/ipv6/ip6mr.c | 37 ++++++++++++-------------------- 9 files changed, 117 insertions(+), 63 deletions(-) commit 1f598e6861ab1d3cc46d6eff155c0a0a6736de38 Author: Ladislav Michl Date: Thu Mar 1 14:37:31 2018 +0100 ASoC: atmel: Remove redundant dev_err() call in probe function There is an error message within devm_ioremap_resource already, so remove the redundant dev_err() call. Signed-off-by: Ladislav Michl Acked-by: Nicolas Ferre Acked-by: Alexandre Belloni Signed-off-by: Mark Brown sound/soc/atmel/atmel-classd.c | 7 ++----- sound/soc/atmel/atmel-pdmic.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) commit 60c03a0448c7144d01ef437aae0a1c7e2367b4ba Author: Rob Herring Date: Thu Mar 1 09:18:22 2018 -0600 ARM: boot: add strrchr function libfdt gained a new dependency on strrchr, so copy the implementation from lib/string.c. Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring arch/arm/boot/compressed/string.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f26e93812a4f74d255fa6d548af5a303457f390b Author: Rob Herring Date: Wed Feb 28 17:03:47 2018 -0600 scripts: re-enable some now fixed dtc warnings We can re-enable some dtc warnings that have been completely or mostly fixed. There are a few remaining ones in arm64 dts files which crept in recently. Signed-off-by: Rob Herring scripts/Makefile.lib | 3 --- 1 file changed, 3 deletions(-) commit b8fc5b2157b10dadb2dcd01a95b8be83f1fbf72b Author: Rob Herring Date: Tue Feb 27 17:49:57 2018 -0600 kbuild: add dtc as dependency on .dtb files If dtc is rebuilt, we should rebuild .dtb files with the new dtc. Acked-by: Masahiro Yamada Signed-off-by: Rob Herring scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e71de5ee08dcb053da860f96d46cb1fb0ddfb0c6 Author: Rob Herring Date: Tue Feb 27 17:26:41 2018 -0600 kbuild: remove remaining use of undefined YACC_PREFIX Commit eea199b445f6 ("kbuild: remove unnecessary LEX_PREFIX and YACC_PREFIX") removed YACC_PREFIX definition, but left one use of it. There was not any build error since there is no user of "cmd_bison_h" currently. Remove the last remaining occurrence of YACC_PREFIX. Fixes: eea199b445f6 ("kbuild: remove unnecessary LEX_PREFIX and YACC_PREFIX") Acked-by: Masahiro Yamada Signed-off-by: Rob Herring scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 501f7e52de8a7b910154740958ce8d902258bf72 Author: Joe Perches Date: Thu Mar 1 08:08:23 2018 -0800 platform/x86: wmi: Fix misuse of vsprintf extension %pULL %pULL doesn't officially exist but %pUL does. Miscellanea: o Add missing newlines to a couple logging messages Signed-off-by: Joe Perches Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 79e139744508105bd749300f364563934bff23f2 Author: Ladislav Michl Date: Thu Mar 1 15:21:30 2018 +0100 ASoC: max9867: DSP mode Add configuration for DSP mode. Signed-off-by: Ladislav Michl Signed-off-by: Mark Brown sound/soc/codecs/max9867.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit e6ceb922ca802711db4b48639a9c73f9dc412f87 Author: Ladislav Michl Date: Thu Mar 1 15:20:56 2018 +0100 ASoC: max9867: Fix codec capabilities Codes is stereo only with playback and capture streams bind to the same rate. Signed-off-by: Ladislav Michl Signed-off-by: Mark Brown sound/soc/codecs/max9867.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8b9c716aada77e72e2fe82320aba5a95b75ca400 Author: Ladislav Michl Date: Thu Mar 1 15:19:53 2018 +0100 ASoC: max9867: Improve error logging Tell user what are clock rate limits and reindent log messages. Signed-off-by: Ladislav Michl Signed-off-by: Mark Brown sound/soc/codecs/max9867.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 3ac9ce8858ae3c6fef308692dc4580c164adc96b Author: Ladislav Michl Date: Thu Mar 1 15:19:23 2018 +0100 ASoC: max9867: Show Kconfig entry Allow codec to be selected. Signed-off-by: Ladislav Michl Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ffed7bd23641b1a724f7fa49aa3781aa0ccbd9a0 Author: Chris Wilson Date: Thu Mar 1 10:33:38 2018 +0000 drm/i915: Replace open-coded wait-for loop Now that we can pass arbitrary commands into the base __wait_for() macro, we can reimplement the open-coded wait-for inside i915_gem_idle_work_handler() using the new macro. This means that instead of using ktime, we now use jiffies, and benefit from the exponential sleep backoff that allows a fast response if the HW settles quickly. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180301103338.5380-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 5f293d4354f8aae3c8617f83a3cbd30047676b4d Author: Hans de Goede Date: Sun Feb 25 11:46:46 2018 +0100 ASoC: rt5651: Add rt5651_apply_properties() helper function Move the applying of the differential input and dmic properties to a new rt5651_apply_properties() helper function. This new function can be called by platform code which attaches properties after probe() has run to apply these new properties. Note this also moves the time when we apply these properties for DT platforms from i2c-probe to snd-component-probe time, this should not result in any functional difference. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 22 ++++++++++++++-------- sound/soc/codecs/rt5651.h | 2 ++ 2 files changed, 16 insertions(+), 8 deletions(-) commit 6f0b819ae2b36614a514824c622ac0e02650b718 Author: Hans de Goede Date: Sun Feb 25 11:46:45 2018 +0100 ASoC: rt5651: Use standard component set_jack callback Use the standard component set_jack callback instead of defining a codec private API for this. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 6 +++--- sound/soc/codecs/rt5651.h | 2 -- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) commit d8b8c878e86593ad8bd86676a2a4c2be58a8b889 Author: Hans de Goede Date: Sun Feb 25 11:46:44 2018 +0100 ASoC: rt5651: Move 2 functions higher up in rt5651.c Move 2 functions higher up in rt5651.c, this is a preparation patch to avoid needing forward declarations when moving over from a codec private function to the standard snd_soc_component_set_jack(). This commit purely moves these 2 functions up, not a single line is changed. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 154 +++++++++++++++++++++++----------------------- 1 file changed, 77 insertions(+), 77 deletions(-) commit f06da4fdb5fc2b78d52f62c32aec65b7819178b0 Author: Hans de Goede Date: Sun Feb 25 11:46:43 2018 +0100 ASoC: rt5651: Move all jack-detect initialization to rt5651_set_jack_detect Move all jack-detect initialization to rt5651_set_jack_detect. The main reason to do this is so that platform code can setup jack-detect properties after the device has been probed, which unfortunately is necessary on some platforms. This has 2 additional advantages: 1) Grouping all jack-detect init together makes it easier to follow what is happening and results in a small reduction in the number of loc. 2) Before we would register the irq handler before rt5651->hp_jack was assigned, leading to a potential NULL deref if the jack_detect work runs before the machine driver has called set_jack. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 119 ++++++++++++++++++++++------------------------ sound/soc/codecs/rt5651.h | 1 + 2 files changed, 58 insertions(+), 62 deletions(-) commit 54e3a3a152a6f466f3a94b28be10f08b86905bc0 Author: Hans de Goede Date: Sun Feb 25 11:46:42 2018 +0100 ASoC: rt5651: Remove unused rt5651_platform_data There are no in tree users of platform-data for the rt5651 codec driver, so lets remove support for it. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown include/sound/rt5651.h | 8 -------- sound/soc/codecs/rt5651.c | 47 +++++++++-------------------------------------- sound/soc/codecs/rt5651.h | 2 +- 3 files changed, 10 insertions(+), 47 deletions(-) commit 9c5c71bbed4132a3a5f200064914db768c88302a Author: Tom St Denis Date: Thu Mar 1 09:39:57 2018 -0500 drm/amd/amdgpu: Mask rptr as well in ring debugfs The read/write pointers on sdma4 devices increment beyond the ring size and should be masked. Tested on my Ryzen 2400G. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a22144a58f784265fe8140724a7390443f63ef53 Author: Monk Liu Date: Mon Dec 25 15:59:30 2017 +0800 drm/amdgpu: try again kiq access if not in IRQ(v4) sometimes GPU is switched to other VFs and won't swich back soon, so the kiq reg access will not signal within a short period, instead of busy waiting a long time(MAX_KEQ_REG_WAIT) and returning TMO we can istead sleep 5ms and try again later (non irq context) And since the waiting in kiq_r/weg is busy wait, so MAX_KIQ_REG_WAIT shouldn't set to a long time, set it to 10ms is more appropriate. if gpu already in reset state, don't retry the KIQ reg access otherwise it would always hang because KIQ was already die usually. v2: replace schedule() with msleep() for the wait v3: use while loop for the wait repeating use macros for the sleep period more description for it v4: drop unused variable Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 64 ++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 11 deletions(-) commit c41d1cf62d3615294c1dee291b05ee3220a4de6c Author: Monk Liu Date: Mon Dec 25 11:59:27 2017 +0800 drm/amdgpu: cleanups for vram lost handling 1)create a routine "handle_vram_lost" to do the vram recovery, and put it into amdgpu_device_reset/reset_sriov, this way no need of the extra paramter to hold the VRAM LOST information and the related macros can be removed. 3)show vram_recover failure if time out, and set TMO equal to lockup_timeout if vram_recover is under SRIOV runtime mode. 4)report error if any ip reset failed for SR-IOV Signed-off-by: Monk Liu Acked-by: Christian König Acked-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 137 +++++++++++++++-------------- 2 files changed, 72 insertions(+), 69 deletions(-) commit 711826656bebb09b814349fac21cb13f88f92665 Author: Monk Liu Date: Mon Dec 25 15:14:58 2017 +0800 drm/amdgpu: stop all rings before doing gpu recover found recover_vram_from_shadow sometimes get executed in paralle with SDMA scheduler, should stop all schedulers before doing gpu reset/recover Signed-off-by: Monk Liu Reviewed-by: Christian König Tested-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 40 +++++++++++------------------- 1 file changed, 15 insertions(+), 25 deletions(-) commit 5b00ce63e07fac692400db80d3e1fbd1f1f65701 Author: John Hsu Date: Tue Feb 6 15:02:43 2018 +0800 ASoC: Intel: add nau8824 sound card Create sound card with NAU88L24 codec in Intel Cherryview-based platforms, Cherrytrail and Braswell. Signed-off-by: John Hsu Signed-off-by: Mark Brown sound/soc/intel/boards/Kconfig | 11 + sound/soc/intel/boards/Makefile | 2 + sound/soc/intel/boards/cht_bsw_nau8824.c | 282 ++++++++++++++++++++++ sound/soc/intel/common/soc-acpi-intel-cht-match.c | 9 + 4 files changed, 304 insertions(+) commit 9851bc77e62499957567e7c39a5beba7d6de6296 Author: Cornelia Huck Date: Thu Feb 22 15:35:43 2018 +0100 vfio-ccw: fence off transport mode vfio-ccw only supports command mode for channel programs, not transport mode. User space is supposed to already take care of that and pass us command-mode ORBs only, but better make sure and return an error to the caller instead of trying to process tcws as ccws. Reviewed-by: Dong Jia Shi Acked-by: Halil Pasic Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_fsm.c | 5 +++++ 1 file changed, 5 insertions(+) commit 58060d000469a1bb148ae2cb41d7486f9d263704 Author: Quytelda Kahja Date: Wed Feb 28 21:19:11 2018 -0800 staging: ks7010: Replace local frame type constants with kernel constants. This driver defined constants FRAME_TYPE_* to represent frame control field codes; however, these constants are already defined in the header 'linux/ieee80211.h' as IEEE80211_STYPE_*. This change removes the locally defined constants and substitutes the kernel's constants. Signed-off-by: Quytelda Kahja Reviewed-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) commit c468d584cd687386c33f730b7c5114501f731e85 Author: Quytelda Kahja Date: Wed Feb 28 21:19:10 2018 -0800 staging: ks7010: Replace local capability constants with kernel constants. This driver defined constants BSS_CAP_* to represent WLAN capability codes; however, these constants are already defined in the header 'linux/ieee80211.h' as WLAN_CAPABILITY_*. This change removes the locally defined constants and substitutes the kernel's constants. Signed-off-by: Quytelda Kahja Reviewed-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 8 ++++---- drivers/staging/ks7010/ks_hostif.h | 10 ---------- drivers/staging/ks7010/ks_wlan_net.c | 6 +++--- 3 files changed, 7 insertions(+), 17 deletions(-) commit ecad5e1e2012b0986ac398d506379265eb436ba2 Author: Quytelda Kahja Date: Wed Feb 28 21:19:09 2018 -0800 staging: ks7010: Factor out repeated code into function 'ks_wlan_cap()'. The code that generates a WLAN capability mask is repeated in five functions. This change refactors that code into a new function, which is called now in each of those functions. Signed-off-by: Quytelda Kahja Reviewed-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 88 ++++++++++---------------------------- 1 file changed, 23 insertions(+), 65 deletions(-) commit 15b6d73eaa7c35f52feb797e3e35a6477b41a624 Author: Quytelda Kahja Date: Wed Feb 28 21:19:08 2018 -0800 staging: ks7010: Replace SSID_MAX_SIZE with IEEE80211_MAX_SSID_LEN. SSID_MAX_SIZE is a constant defined locally in ks_hostif.h, but it should be replaced with IEEE80211_MAX_SSID_LEN from the kernel's 802.11 header, of which it is just a copy. Signed-off-by: Quytelda Kahja Reviewed-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 4 ++-- drivers/staging/ks7010/ks_hostif.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) commit dc13498ab47fdfae3cda4df712beb2e4244b3fe0 Author: Quytelda Kahja Date: Wed Feb 28 21:19:07 2018 -0800 staging: ks7010: Use constants from ieee80211_eid instead of literal ints. The case statement in get_ap_information() should not use literal integers to parse information element IDs when these values are provided by name in 'enum ieee80211_eid' in the header 'linux/ieee80211.h'. Signed-off-by: Quytelda Kahja Reviewed-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 31 +++++++++++++++---------------- drivers/staging/ks7010/ks_hostif.h | 1 + 2 files changed, 16 insertions(+), 16 deletions(-) commit 6bd082af7e36cfeeaf2434a3cd0dbb3331cf6e1a Author: Ivan Safonov Date: Fri Feb 23 17:57:42 2018 +0300 staging:r8188eu: use lib80211 CCMP decrypt Custom AES decrypt implementation replaced with lib80211 library. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/Kconfig | 1 + drivers/staging/rtl8188eu/core/rtw_security.c | 266 +++++--------------------- 2 files changed, 51 insertions(+), 216 deletions(-) commit a3d2ae043f6453aff68b617aabfc6710b1fa675d Author: Colin Ian King Date: Fri Feb 23 15:00:08 2018 +0000 staging: rtl8723bs: fix u8 less than zero check The error variable ret is currently a u8 and so two comparisons to see if an error return is less than zero will always be false because ret is unsigned. Fix this by making ret an int. Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a12129d8e321fe9f84bae6f96afd0e2c7a2a86b Author: Jeremy Fertic Date: Fri Feb 23 17:55:52 2018 -0700 staging: vt6655: remove unnecessary blank lines Remove unnecessary blank lines found using checkpatch.pl script. Signed-off-by: Jeremy Fertic Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/rxtx.c | 5 ----- 1 file changed, 5 deletions(-) commit 69cfd92ea4289b16be6e77960f5d0ab2ddc540a7 Author: Cornelia Huck Date: Thu Jan 11 17:58:43 2018 +0100 vfio-ccw: update documentation The vfio-ccw documentation comes from the cover letter of the original patch submission, which shows in some parts. Give it some love; in particular: - Remove/rework statements that make sense in a cover letter, but not in regular documentation. - Fix some typos. - Describe the current limitations in more detail. Acked-by: Halil Pasic Reviewed-by: Dong Jia Shi Signed-off-by: Cornelia Huck Documentation/s390/vfio-ccw.txt | 79 ++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 41 deletions(-) commit 7c979b473121251aaf59e2521a508ea50551fa66 Author: Fengguang Wu Date: Wed Feb 28 10:55:50 2018 +0800 staging: fsl-mc/dpio: qbman_pull_desc_set_token() can be static Fixes: 1628e2e4dc76 ("staging: fsl-mc/dpio: allow the driver to compile multi-arch") Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpio/qbman-portal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75c583ab9709692a60871d4719006391cde8dc1d Author: Ioana Radulescu Date: Mon Feb 26 10:28:06 2018 -0600 staging: fsl-dpaa2/eth: Fix incorrect casts The DPAA2 Ethernet driver incorrectly assumes virtual addresses are always 64b long, which causes compiler errors when building for a 32b platform. Fix this by using explicit casts to uintptr_t where necessary. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 43c3c14d703fa5f7b94bc83c272e9279ef414c64 Author: Ioana Radulescu Date: Mon Feb 26 10:28:05 2018 -0600 staging: fsl-mc/dpio: allow the driver to compile multi-arch Drop dependency on ARCH_LAYERSCAPE (which in turn depends on ARM64), thus allowing this driver to compile on all architectures supported by the fsl-mc bus driver. This was compile tested on: - powerpc (corenet_basic_defconfig, ppc64_defconfig) - x86 (i386_defconfig, x86_64_defconfig, needs CONFIG_OF) - arm64 (defconfig) Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0540bccdb5afe856958ed57b20e8e9a75ff9c3b7 Author: Greg Kroah-Hartman Date: Thu Mar 1 17:27:50 2018 +0100 staging: fsl-mc: dpio: remove foolish -Werror Makefile addtion With the zillion different compilers out there, never use -Werror, otherwise your code will end up breaking the build for odd reasons. Like now, if this driver is enabled, it breaks the build due to a function that could be marked static. So it's obvious no one is even paying attention to this driver :( Cc: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpio/Makefile | 2 -- 1 file changed, 2 deletions(-) commit a4c4f360316ce0684335d2bf15b364b10b23c35a Author: Ioana Radulescu Date: Mon Feb 26 10:28:04 2018 -0600 staging: fsl-mc/dpio: Fix incorrect casts The DPIO driver incorrectly assumes virtual addresses are always 64b long, which causes compiler errors when building for a 32b platform. Fix this by using explicit casts to uintptr_t where necessary. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 4 ++-- drivers/staging/fsl-mc/bus/dpio/qbman-portal.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit e1a7418529e33bc4efc346324557251a16a3e79b Author: Colin Ian King Date: Wed Feb 28 11:28:49 2018 +0000 staging: rtl8192u: return -ENOMEM on failed allocation of priv->oldaddr Currently the allocation of priv->oldaddr is not null checked which will lead to subsequent errors when accessing priv->oldaddr. Fix this with a null pointer check and a return of -ENOMEM on allocation failure. Detected with Coccinelle: drivers/staging/rtl8192u/r8192U_core.c:1708:2-15: alloc with no test, possible model on line 1723 Fixes: 8fc8598e61f6 ("Staging: Added Realtek rtl8192u driver to staging") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_core.c | 2 ++ 1 file changed, 2 insertions(+) commit 256ac58a7ea343600bd6d0e3df3eb7eebb2d65e0 Author: Naveen Manohar Date: Mon Feb 19 08:15:02 2018 +0530 ASoC: Intel: kbl: Enable mclk and ssp sclk early for rt5663 rt5663 requires mclk/sclk early to synchronize its internal clocks. Enable these clocks early. Signed-off-by: Naveen Manohar Signed-off-by: Kevin Cheng Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_max98927.c | 5 +++++ 1 file changed, 5 insertions(+) commit bf642bf57398572327072d306e26e38aebd94fa7 Author: Hans de Goede Date: Sun Feb 18 23:01:43 2018 +0100 ASoC: Intel: sst: Free streams on suspend, re-alloc on resume The Bay Trail SST-DSP firmware version looses track of all streams over a suspend/resume, failing any attempts to resume and/or free streams, with a SST_ERR_INVALID_STREAM_ID error. This commit adds support for free-ing the streams on suspend and re-allocating them on resume, fixing suspend/resume issues on devices using this firmware version. This new behavior gets triggered by a new flag in sst_platform_info which only gets set on Bay Trail platforms. This has been tested on the following devices: -Asus T100TA, Bay Trail + ALC5642 codec -Ployer MOMO7W, Bay Trail CR + ALC5652 codec Tested-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Mark Brown arch/x86/include/asm/platform_sst_audio.h | 1 + sound/soc/intel/atom/sst/sst.c | 24 +++++++++++++++++++++++- sound/soc/intel/atom/sst/sst.h | 4 ++++ sound/soc/intel/atom/sst/sst_acpi.c | 3 ++- sound/soc/intel/atom/sst/sst_stream.c | 24 +++++++++++++++++++++++- 5 files changed, 53 insertions(+), 3 deletions(-) commit 473858cad1ea3d4e6c287bad23961cd5fb7382d9 Author: Hans de Goede Date: Sun Feb 18 23:01:42 2018 +0100 ASoC: Intel: sst: Add sst_realloc_stream() function Move the struct snd_sst_alloc_mrfld alloc parameters from the stack into struct stream_info and add a new sst_realloc_stream() function which can re-alloc a stream with the same parameters as before. This is a preparation patch for fixing suspend/resume issues with some SST / DSP firmware versions. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst.h | 3 ++ sound/soc/intel/atom/sst/sst_stream.c | 88 +++++++++++++++++++++-------------- 2 files changed, 56 insertions(+), 35 deletions(-) commit de9833476de7eb1d4b8bdc599cbbd616fb0e1a28 Author: Hans de Goede Date: Sun Feb 18 23:01:41 2018 +0100 ASoC: Intel: sst: Remove unused STREAM_DECODE and STREAM_RESET states STREAM_DECODE is completely unused, status == STREAM_RESET was checked for, but never set, remove both. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst.h | 4 +--- sound/soc/intel/atom/sst/sst_drv_interface.c | 19 ------------------- 2 files changed, 1 insertion(+), 22 deletions(-) commit 8cf732bbd8d6bc9a28ac48c7bac0ccc9f55cb151 Author: Hans de Goede Date: Sun Feb 18 23:01:40 2018 +0100 ASoC: Intel: sst: Remove unnecessary sst_init_stream() function sst_init_stream() has only one caller and all its function arguments are unused. Inline it on the one call site and remove it. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst.h | 2 -- sound/soc/intel/atom/sst/sst_pvt.c | 7 ------- sound/soc/intel/atom/sst/sst_stream.c | 5 ++--- 3 files changed, 2 insertions(+), 12 deletions(-) commit bd47469c9985b50831a55bdda5a36f4672452764 Author: Hans de Goede Date: Sun Feb 18 23:01:39 2018 +0100 ASoC: Intel: sst: Remove 2 unused members from stream_info struct Remove the unused ops and str_id members from the stream_info struct. While at it also remove some kernel-doc comments for members which have already been removed in the past. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst.h | 7 ------- sound/soc/intel/atom/sst/sst_pvt.c | 1 - 2 files changed, 8 deletions(-) commit 6f5062773747b3d3eb9f957030ac1be98e983ac2 Author: Hans de Goede Date: Sun Feb 18 23:01:38 2018 +0100 ASoC: Intel: sst: Fix error-code check in sst_pause_stream() The value returned by sst_prepare_and_post_msg() is a negated SST_ERR_* value, so we must check for -SST_ERR_INVALID_STREAM_ID. Note that sst_pause_resume() already has the correct check. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44b4709c5386e054a402ad612966bfbbf9ccc81c Author: Ajay Singh Date: Mon Feb 26 22:01:59 2018 +0530 staging: wilc1000: rename WILC_WFI_mgmt_rx() to avoid camelCase Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- drivers/staging/wilc1000/wilc_wlan.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 8544b8098a2cf69574764f7c178647b8872ec202 Author: Ajay Singh Date: Mon Feb 26 22:01:58 2018 +0530 staging: wilc1000: move multiple definition of same macro to common header Move the same #define from multiple '.c' files to common header file. Instead of having same macro in different '.c' files, now kept in common '.h' file. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/linux_mon.c | 3 --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 3 --- drivers/staging/wilc1000/wilc_wlan.c | 4 ---- drivers/staging/wilc1000/wilc_wlan.h | 5 +++++ 4 files changed, 5 insertions(+), 10 deletions(-) commit 82059dcec99e50a334b486c65b5f1b87c1acd690 Author: Ajay Singh Date: Mon Feb 26 22:01:57 2018 +0530 staging: wilc1000: fix line over 80 char in wilc_wlan_handle_txq() Refactor wilc_wlan_handle_txq() to fix 'line over 80 char' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan.c | 76 ++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 37 deletions(-) commit 588bf3c116260446e53700923957b5aa4f89558a Author: Ajay Singh Date: Mon Feb 26 22:01:56 2018 +0530 staging: wilc1000: rename label _end_ in wilc_wlan_handle_txq() Rename label name starting with '_' to follow as per linux coding style. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 891256180aea96edb17e14c363cc0b87c13e29b5 Author: Ajay Singh Date: Mon Feb 26 22:01:55 2018 +0530 staging: wilc1000: remove unnecessary while(0) in wilc_wlan_handle_txq() Refactor wilc_wlan_handle_txq() by removing unnecessary while(0) loop. "Line over 80 char" issues in wilc_wlan_handle_txq() are fix by reducing extra leading tab. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan.c | 295 +++++++++++++++++------------------ 1 file changed, 141 insertions(+), 154 deletions(-) commit c8d4e2e18d5292cf8a888362f9f196aaeb540bba Author: Quytelda Kahja Date: Fri Feb 23 23:58:35 2018 -0800 staging: most: Fix missing identifier in function definition argument. The function pointer 'complete' in 'struct mbo' should use an identifier for its argument. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/most/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 275efcfa93d5000de13c326f5afa06b4943c5a5d Author: Quytelda Kahja Date: Fri Feb 23 23:58:34 2018 -0800 staging: most: Remove unnecessary OOM messages. It isn't necessary for the driver to log out-of-memory errors, so these have been removed and the functions simply return -ENOMEM. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/most/core.c | 2 -- 1 file changed, 2 deletions(-) commit 1b873bd4ead85b9f89a673b9d83ce7fa0d555e4b Author: Santha Meena Ramamoorthy Date: Wed Feb 28 12:40:48 2018 -0800 staging: rtl8192e: move logical continuation to previous line Move logical continuation '&&' to the previous line to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_rx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0f2dc64fb64703dfa5422a6979151e696dba6c17 Author: Santha Meena Ramamoorthy Date: Wed Feb 28 14:51:12 2018 -0800 staging: vt6655: replace NULL comparison with variable Replace NULL comparison of the variable with just the variable name to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/rxtx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 87bb7f5c31286d35ed25b37e25517462de0420d7 Author: Santha Meena Ramamoorthy Date: Wed Feb 28 11:45:05 2018 -0800 staging: lustre: fix block comment style Add trailing */ on a separate line for block comments to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lov/lov_object.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 2d42ac21efe4a191f992ffd2d004b0a4e052102e Author: Dafna Hirschfeld Date: Tue Feb 27 23:44:27 2018 +0200 staging: rtl8723bs: use kmemdup for allocation and copy Use kmemdup instead of kzalloc and memcpy to simplify the code. Issue found with coccicheck. Signed-off-by: Dafna Hirschfeld Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 41e009b2b5dd4e3b03227a62b911a79441f400f2 Author: Jesper Nilsson Date: Thu Feb 22 14:27:05 2018 +0100 pinctrl: artpec-6: Add smaller groups for uarts Add group configuration for uarts that are cut down variants, the standard being full, i.e. all signals, flow control, i.e. rx/tx and cts/rts, and rx/tx only. This allows us to be more precise in which pins we're actually using. Signed-off-by: Jesper Nilsson Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-artpec6.c | 66 +++++++++++++++++++++++++++++---------- 1 file changed, 50 insertions(+), 16 deletions(-) commit d8e7e73e66d0566a82cb91642680ec0d1f77eda6 Author: Jeffy Chen Date: Thu Mar 1 16:25:58 2018 +0100 drm/rockchip: analogix_dp: reorder psr_unregister call in unbind In bind the psr handler gets registered first before the core analogix_dp_bind() gets called. So it should be the other way around in unbind, first unbind the analogix_dp and then unregister the psr. Signed-off-by: Jeffy Chen Signed-off-by: Thierry Escande Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/76025075.yWNtk1v57f@phil drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5d013bc09e9e76df9cdc85c2598486ba9a5b9b6 Author: Arnd Bergmann Date: Thu Mar 1 11:31:29 2018 +0100 staging: rts5208: rename SG_END macro A change to the generic scatterlist code caused a conflict with the rtsx card reader driver: In file included from drivers/staging/rts5208/rtsx.h:180, from drivers/staging/rts5208/rtsx.c:28: drivers/staging/rts5208/rtsx_chip.h:343: error: "SG_END" redefined [-Werror] This changes one instance of the driver to prefix SG_END and related constants. Fixes: 723fbf563a6a ("lib/scatterlist: Add SG_CHAIN and SG_END macros for LSB encodings") Cc: Anshuman Khandual Reviewed-by: Andy Shevchenko Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe drivers/staging/rts5208/rtsx_chip.h | 12 ++++++------ drivers/staging/rts5208/rtsx_transport.c | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) commit f16ee7c7ec0fa5f0322bd64d5ee183a28ed1ec08 Author: Arnd Bergmann Date: Thu Mar 1 11:31:28 2018 +0100 misc: rtsx: rename SG_END macro A change to the generic scatterlist code caused a conflict with the rtsx card reader driver: In file included from drivers/misc/cardreader/rtsx_pcr.c:32: include/linux/rtsx_pci.h:40: error: "SG_END" redefined [-Werror] This changes one instance of the driver to prefix SG_END and related constants. Fixes: 723fbf563a6a ("lib/scatterlist: Add SG_CHAIN and SG_END macros for LSB encodings") Cc: Anshuman Khandual Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe drivers/misc/cardreader/rtsx_pcr.c | 4 ++-- include/linux/rtsx_pci.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) commit c8c045142125e7c054f66241d9f3b3151bb70daf Author: Jeffy Chen Date: Wed Jan 10 17:23:43 2018 +0100 drm/rockchip: analogix_dp: Add a sanity check for rockchip_drm_psr_register() The rockchip_drm_psr_register() can fail, so add a sanity check for that. Signed-off-by: Jeffy Chen Signed-off-by: Thierry Escande [moved psr_unregister reordering in unbind to separate patch] Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180110162348.22765-4-thierry.escande@collabora.com drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 338e17d3f58e9868a12af7deb1edcfb40bd588b2 Author: Joey Pabalinas Date: Thu Mar 1 04:17:07 2018 -1000 ALSA: ice1712: replace strcpy() with strlcpy() Replace unsafe usages of strcpy() to copy the name argument into the sid.name buffer with strlcpy() to guard against possible buffer overflows. Signed-off-by: Joey Pabalinas Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai sound/pci/ice1712/juli.c | 8 ++++---- sound/pci/ice1712/quartet.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit 7fe201cd55bb3527c4b7152fc099a3c5fb9054c3 Author: Jeffy Chen Date: Wed Jan 10 17:23:42 2018 +0100 drm/bridge: analogix_dp: Fix connector and encoder cleanup Since we are initing connector in the core driver and encoder in the plat driver, let's clean them up in the right places. Signed-off-by: Jeffy Chen Signed-off-by: Thierry Escande Reviewed-by: Andrzej Hajda Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180110162348.22765-3-thierry.escande@collabora.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 -- drivers/gpu/drm/exynos/exynos_dp.c | 7 +++++-- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 12 +++++------- 3 files changed, 10 insertions(+), 11 deletions(-) commit af7b9b7983c4bae7ca931f3d18c10ae572b5673c Author: Ryder Lee Date: Wed Feb 14 11:27:58 2018 +0800 dt-bindings: PCI: MediaTek: fix dtc warnings dtc recently added PCI bus checks. Fix these warnings: Warning (pci_bridge): Node /pcie@1a140000/pcie@0,0 missing bus-range for PCI bridge Warning (pci_bridge): Node /pcie@1a140000/pcie@1,0 missing bus-range for PCI bridge Warning (pci_bridge): Node /pcie@1a140000/pcie@2,0 missing bus-range for PCI bridge Warning (unit_address_format): Failed prerequisite 'pci_bridge' Warning (pci_device_reg): Failed prerequisite 'pci_bridge' Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' Signed-off-by: Ryder Lee Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Documentation/devicetree/bindings/pci/mediatek-pcie.txt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 6b2d8fd98d051f8697c45f96249dca73842a2362 Author: Jeffy Chen Date: Wed Jan 10 17:23:41 2018 +0100 drm/bridge: analogix: Do not use device's drvdata The driver that instantiates the bridge should own the drvdata, as all driver model callbacks (probe, remove, shutdown, PM ops, etc.) are also owned by its driver struct. Moreover, storing two different pointer types in driver data depending on driver initialization status is barely a good practice and in fact has led to many bugs in this driver. Let's clean up this mess and change Analogix entry points to simply accept some opaque struct pointer, adjusting their users at the same time to avoid breaking the compilation. Signed-off-by: Tomasz Figa Signed-off-by: Jeffy Chen Signed-off-by: Thierry Escande Reviewed-by: Andrzej Hajda Reviewed-by: Sean Paul Acked-by: Jingoo Han Acked-by: Archit Taneja Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180110162348.22765-2-thierry.escande@collabora.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 50 +++++++++------------- drivers/gpu/drm/exynos/exynos_dp.c | 26 ++++++----- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 48 ++++++++++++--------- include/drm/bridge/analogix_dp.h | 19 ++++---- 4 files changed, 74 insertions(+), 69 deletions(-) commit 4a7cba71ca77be885f5861623dfb35317061ac0d Author: James Hogan Date: Wed Feb 21 23:38:21 2018 +0000 pinctrl: Drop TZ1090 drivers Now that arch/metag/ has been removed, along with TZ1090 SoC support, remove the TZ1090 pinctrl drivers. They are of no value without the architecture and SoC platform code. Signed-off-by: James Hogan Cc: linux-gpio@vger.kernel.org Cc: linux-metag@vger.kernel.org Signed-off-by: Linus Walleij .../bindings/pinctrl/img,tz1090-pdc-pinctrl.txt | 127 -- .../bindings/pinctrl/img,tz1090-pinctrl.txt | 227 --- drivers/pinctrl/Kconfig | 12 - drivers/pinctrl/Makefile | 2 - drivers/pinctrl/pinctrl-tz1090-pdc.c | 989 ---------- drivers/pinctrl/pinctrl-tz1090.c | 2005 -------------------- 6 files changed, 3362 deletions(-) commit 41d3fdcd15d5ecf29cc73e8b79c2327ebb54b960 Author: Lionel Landwerlin Date: Thu Mar 1 11:06:13 2018 +0000 drm/i915/perf: fix perf stream opening lock We're seeing on CI that some contexts don't have the programmed OA period timer that directs the OA unit on how often to write reports. The issue is that we're not holding the drm lock from when we edit the context images down to when we set the exclusive_stream variable. This leaves a window for the deferred context allocation to call i915_oa_init_reg_state() that will not program the expected OA timer value, because we haven't set the exclusive_stream yet. v2: Drop need_lock from gen8_configure_all_contexts() (Matt) Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld Reviewed-by: Chris Wilson Fixes: 701f8231a2f ("drm/i915/perf: prune OA configs") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102254 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103715 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103755 Link: https://patchwork.freedesktop.org/patch/msgid/20180301110613.1737-1-lionel.g.landwerlin@intel.com Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Cc: # v4.14+ drivers/gpu/drm/i915/i915_perf.c | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) commit 8f6d3b01477e09fc3e53a4935eba095b2357306f Author: James Hogan Date: Wed Feb 21 23:38:22 2018 +0000 gpio: Drop TZ1090 drivers Now that arch/metag/ has been removed, along with TZ1090 SoC support, remove the TZ1090 GPIO drivers. They are of no value without the architecture and SoC platform code. Signed-off-by: James Hogan Cc: linux-gpio@vger.kernel.org Cc: linux-metag@vger.kernel.org Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/gpio-tz1090-pdc.txt | 45 -- .../devicetree/bindings/gpio/gpio-tz1090.txt | 88 --- drivers/gpio/Kconfig | 15 - drivers/gpio/Makefile | 2 - drivers/gpio/gpio-tz1090-pdc.c | 231 -------- drivers/gpio/gpio-tz1090.c | 602 --------------------- 6 files changed, 983 deletions(-) commit 03fd11b0336239b7c8c5dac07cef3a71fe33b16b Author: Anders Roxell Date: Wed Feb 21 22:33:34 2018 +0100 tools/gpio/gpio-event-mon: fix warning PRIu64 is defined in user space to match libc's uint64_t definition. However, gpioevent_data structure in the kernel is defined using the kernel's own __u64 type. gpio-event-mon.c: In function ‘monitor_device’: gpio-event-mon.c:102:19: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘__u64 {aka long long unsigned int}’ [-Wformat=] fprintf(stdout, "GPIO EVENT %" PRIu64 ": ", event.timestamp); ^~~~~~~~~~~~~~ LD /tmp/kselftest/gpiogpio-event-mon-in.o LINK /tmp/kselftest/gpiogpio-event-mon Fix is to replace PRIu64 with llu, which we know is what the kernel uses for __u64. Signed-off-by: Anders Roxell Tested-by: Daniel Díaz Signed-off-by: Linus Walleij tools/gpio/gpio-event-mon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce91d373d870b69b5dbbac033d8411ef0c16ac6f Author: Jeffy Chen Date: Fri Feb 23 14:22:50 2018 +0800 drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale() Currently we are calling scl_vop_cal_scale() to get vskiplines for yrgb and cbcr. So the cbcr's vskiplines might be an unexpected value if the second scl_vop_cal_scale() didn't update it. Init vskiplines in scl_vop_cal_scale() to avoid that. Signed-off-by: Jeffy Chen Reviewed-by: Sean Paul Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180223062250.10470-1-jeffy.chen@rock-chips.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7d4e981d41e3338699d43803bf28d21b087cbbea Author: Jeffy Chen Date: Wed Feb 7 18:53:09 2018 +0100 drm/rockchip: Add device links for master and components Since we are trying to access components' resources in the master's suspend/resume PM callbacks(e.g. panel), add device links to correct the suspend/resume and shutdown ordering. Signed-off-by: Jeffy Chen Signed-off-by: Enric Balletbo i Serra Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20180207175309.21095-1-enric.balletbo@collabora.com drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 51951ae7ed0088cd1c6eb71f39217ac1b1aa9c5d Author: Mika Kuoppala Date: Wed Feb 28 12:11:53 2018 +0200 drm/i915/icl: Interrupt handling v2: Rebase. v3: * Remove DPF, it has been removed from SKL+. * Fix -internal rebase wrt. execlists interrupt handling. v4: Rebase. v5: * Updated for POR changes. (Daniele Ceraolo Spurio) * Merged with irq handling fixes by Daniele Ceraolo Spurio: * Simplify the code by using gen8_cs_irq_handler. * Fix interrupt handling for the upstream kernel. v6: * Remove early bringup debug messages (Tvrtko) * Add NB about arbitrary spin wait timeout (Tvrtko) v7 (from Paulo): * Don't try to write RO bits to registers. * Don't check for PCH types that don't exist. PCH interrupts are not here yet. v9: * squashed in selector and shared register handling (Daniele) * skip writing of irq if data is not valid (Daniele) * use time_after32 (Chris) * use I915_MAX_VCS and I915_MAX_VECS (Daniele) * remove fake pm interrupt handling for later patch (Mika) v10: * Direct processing of banks. clear banks early (Chris) * remove poll on valid bit, only clear valid bit (Mika) * use raw accessors, better naming (Chris) v11: * adapt to raw_reg_[read|write] * bring back polling the valid bit (Daniele) v12: * continue if unset intr_dw (Daniele) * comment the usage of gen8_de_irq_handler bits (Daniele) Cc: Tvrtko Ursulin Cc: Daniele Ceraolo Spurio Cc: Chris Wilson Cc: Oscar Mateo Signed-off-by: Tvrtko Ursulin Signed-off-by: Rodrigo Vivi Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Oscar Mateo Signed-off-by: Paulo Zanoni Signed-off-by: Mika Kuoppala Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20180228101153.7224-2-mika.kuoppala@linux.intel.com drivers/gpu/drm/i915/i915_irq.c | 235 ++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_pm.c | 7 +- 2 files changed, 241 insertions(+), 1 deletion(-) commit 022d3093a9102a8b8b7a3796a8aba5a9c4e40ec7 Author: Tvrtko Ursulin Date: Wed Feb 28 12:11:52 2018 +0200 drm/i915/icl: Prepare for more rings Gen11 will add more VCS and VECS rings so prepare the infrastructure to support that. Bspec: 7021 v2: Rebase. v3: Rebase. v4: Rebase. v5: Rebase. v6: - Update for POR changes. (Daniele Ceraolo Spurio) - Add provisional guc engine ids - to be checked and confirmed. v7: - Rebased. - Added the new ring masks. - Added the new HW ids. v8: - Introduce I915_MAX_VCS/VECS to avoid magic numbers (Michal) v9: increase MAX_ENGINE_INSTANCE to 3 Cc: Michal Wajdeczko Signed-off-by: Tvrtko Ursulin Signed-off-by: Rodrigo Vivi Signed-off-by: Oscar Mateo Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Oscar Mateo Signed-off-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180228101153.7224-1-mika.kuoppala@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/i915_gem.h | 2 +- drivers/gpu/drm/i915/i915_reg.h | 5 ++++- drivers/gpu/drm/i915/intel_device_info.c | 3 +++ drivers/gpu/drm/i915/intel_device_info.h | 4 +++- drivers/gpu/drm/i915/intel_ringbuffer.h | 9 ++++++++- 6 files changed, 22 insertions(+), 4 deletions(-) commit 50ee106137f2947958b2931de853010582e9d719 Author: Rolf Evers-Fischer Date: Wed Feb 28 18:32:20 2018 +0100 PCI: endpoint: Remove goto labels in pci_epf_create() Remove the pci_epf_create() goto labels completely and handle the errors at the respective call site to simplify the function error handling. Signed-off-by: Rolf Evers-Fischer Signed-off-by: Lorenzo Pieralisi drivers/pci/endpoint/pci-epf-core.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) commit 9eef6a5c3b0bf90eb292d462ea267bcb6ad1c334 Author: Rolf Evers-Fischer Date: Wed Feb 28 18:32:19 2018 +0100 PCI: endpoint: Fix kernel panic after put_device() 'put_device()' calls the relase function 'pci_epf_dev_release()', which already frees 'epf->name' and 'epf'. Therefore we must not free them again after 'put_device()'. Fixes: 5e8cb4033807 ("PCI: endpoint: Add EP core layer to enable EP controller and EP functions") Signed-off-by: Rolf Evers-Fischer Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I Reviewed-by: Andy Shevchenko drivers/pci/endpoint/pci-epf-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36cc14ac14c0d49d33820a82dab52a7edc802fef Author: Rolf Evers-Fischer Date: Wed Feb 28 18:32:18 2018 +0100 PCI: endpoint: Simplify name allocation for EPF device This commit replaces allocating and freeing the intermediate 'buf'/'func_name' with a combination of 'kstrndup()' and 'len'. 'len' is the required length of 'epf->name'. 'epf->name' should be either the first part of 'name' preceding the '.' or the complete 'name', if there is no '.' in the name. Signed-off-by: Rolf Evers-Fischer Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I Reviewed-by: Andy Shevchenko drivers/pci/endpoint/pci-epf-core.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit ab62670e57174c547abbecacf6df78d3dcf03f26 Author: Alexandre Belloni Date: Mon Feb 19 16:23:55 2018 +0100 rtc: stop validating rtc_time after rtc_time_to_tm rtc_time_to_tm never generates an invalid tm. It is not necessary to validate it. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ab8500.c | 2 +- drivers/rtc/rtc-coh901331.c | 2 +- drivers/rtc/rtc-jz4740.c | 2 +- drivers/rtc/rtc-lpc32xx.c | 2 +- drivers/rtc/rtc-ls1x.c | 2 +- drivers/rtc/rtc-mpc5121.c | 2 +- drivers/rtc/rtc-pcap.c | 2 +- drivers/rtc/rtc-ps3.c | 2 +- drivers/rtc/rtc-starfire.c | 2 +- drivers/rtc/rtc-tps6586x.c | 2 +- drivers/rtc/rtc-tx4939.c | 2 +- drivers/rtc/rtc-wm831x.c | 2 +- drivers/rtc/rtc-xgene.c | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) commit 146d21bd9dc167d75bed4c0fdfe790db7565e99b Author: Alexandre Belloni Date: Mon Feb 19 16:23:55 2018 +0100 rtc: stop validating rtc_time after rtc_time64_to_tm rtc_time64_to_tm never generates an invalid tm. It is not necessary to validate it. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ab3100.c | 2 +- drivers/rtc/rtc-mc13xxx.c | 2 +- drivers/rtc/rtc-zynqmp.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit bd7f4e7598921506c2ae343954fdbb764840921b Author: Alexandre Belloni Date: Sun Feb 18 23:36:18 2018 +0100 rtc: stk17ta8: let the core handle invalid time Returning a valid time when the time is invalid is a bad practice, because then userspace is not able to react on the information. Also, it doesn't make sense to return epoch because it is already the default time. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-stk17ta8.c | 4 ---- 1 file changed, 4 deletions(-) commit bff11e3aa9ccfce1a66ef05871d01c1da533f896 Author: Alexandre Belloni Date: Wed Feb 21 00:20:43 2018 +0100 rtc: rs5c348: let the core handle invalid time Returning a valid time when the time is invalid is a bad practice, because then userspace is not able to react on the information. Also, it doesn't make sense to return epoch because it is already the default time. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rs5c348.c | 5 ----- 1 file changed, 5 deletions(-) commit 812318a094d0715194d9f686b22ee67e7dc59d93 Author: Alexandre Belloni Date: Wed Feb 21 11:44:26 2018 +0100 rtc: cmos: let the core handle invalid time Setting the rtc to a valid time when the time is invalid is a bad practice, because then userspace doesn't know it shouldn't trust the RTC. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 12 ------------ 1 file changed, 12 deletions(-) commit 7d1bd37ff06b9e7c49dc033fce4069f69ad6e564 Author: Alexandre Belloni Date: Tue Feb 20 23:43:09 2018 +0100 rtc: ds1553: let the core handle invalid time Returning a valid time when the time is invalid is a bad practice, because then userspace is not able to react on the information. Also, it doesn't make sense to return epoch because it is already the default time. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1553.c | 4 ---- 1 file changed, 4 deletions(-) commit 1c90d9f1c80ba28ddb61c3dbdc55ac686c073d75 Author: Alexandre Belloni Date: Tue Feb 20 22:05:29 2018 +0100 rtc: ds1511: let the core handle invalid time Returning a valid time when the time is invalid is a bad practice, because then userspace is not able to react on the information. Also, it doesn't make sense to return epoch because it is already the default time. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1511.c | 4 ---- 1 file changed, 4 deletions(-) commit 347876ad47b9923ce26e686173bbf46581802ffa Author: Colin Ian King Date: Thu Feb 15 19:36:14 2018 +0000 rtc: tx4939: avoid unintended sign extension on a 24 bit shift The shifting of buf[5] by 24 bits to the left will be promoted to a 32 bit signed int and then sign-extended to an unsigned long. If the top bit of buf[5] is set then all then all the upper bits sec end up as also being set because of the sign-extension. Fix this by casting buf[5] to an unsigned long before the shift. Detected by CoverityScan, CID#1465292 ("Unintended sign extension") Fixes: 0e1492330cd2 ("rtc: add rtc-tx4939 driver") Signed-off-by: Colin Ian King Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tx4939.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e6a0b0f4085c9a56fa50c9666ee662d197c4707d Author: Alexandre Belloni Date: Fri Feb 16 11:06:00 2018 +0100 MAINTAINERS: rtc: update my email address Free Electrons is now Bootlin. Signed-off-by: Alexandre Belloni MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e7002a70e4294a093b3cacf2346af33aeefd265 Author: Alexandre Belloni Date: Tue Feb 6 23:12:26 2018 +0100 char: rtc: remove unused rtc_control() API Since commit 34ce71a96dcb ("ALSA: timer: remove legacy rtctimer"), the rtc_register/rtc_control/rtc_unregister API is unused. As it is highly unlikely to be needed again, remove it. Acked-by: Greg Kroah-Hartman Acked-by: Arnd Bergmann Signed-off-by: Alexandre Belloni drivers/char/rtc.c | 83 ----------------------------------------------------- include/linux/rtc.h | 4 --- 2 files changed, 87 deletions(-) commit 588519ff16552c5a6f6a189767692db6689cadad Author: Fabio Estevam Date: Mon Feb 12 00:38:46 2018 -0200 rtc: mxc_v2: Fix _iomem pointer notation Fix the iomem pointer notation in order to fix the following sparse warnings: drivers/rtc/rtc-mxc_v2.c:280:18: warning: incorrect type in argument 1 (different address spaces) drivers/rtc/rtc-mxc_v2.c:280:18: expected void const volatile [noderef] *addr drivers/rtc/rtc-mxc_v2.c:280:18: got void *[noderef] ioaddr drivers/rtc/rtc-mxc_v2.c:329:44: warning: incorrect type in argument 1 (different address spaces) drivers/rtc/rtc-mxc_v2.c:329:44: expected void *[noderef] ioaddr drivers/rtc/rtc-mxc_v2.c:329:44: got void [noderef] * drivers/rtc/rtc-mxc_v2.c:339:44: warning: incorrect type in argument 1 (different address spaces) drivers/rtc/rtc-mxc_v2.c:339:44: expected void *[noderef] ioaddr drivers/rtc/rtc-mxc_v2.c:339:44: got void [noderef] * Signed-off-by: Fabio Estevam Signed-off-by: Alexandre Belloni drivers/rtc/rtc-mxc_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b9fc795f90c0c509a24ba1f64d0d960f09e40da Author: Denis Osterland Date: Tue Jan 23 13:17:58 2018 +0100 rtc: isl1208: Fix unintended clear of SR bits After successful sr = isl1208_i2c_set_regs(client, 0, regs, ISL1208_RTC_SECTION_LEN); sr will be 0. As a result sr = i2c_smbus_write_byte_data(client, ISL1208_REG_SR, sr & ~ISL1208_REG_SR_WRTC); is equal to sr = i2c_smbus_write_byte_data(client, ISL1208_REG_SR, 0); which clears all flags in SR. Add an additional read of SR, to have value of SR in sr again. Signed-off-by: Denis Osterland Signed-off-by: Michael Grzeschik Signed-off-by: Alexandre Belloni drivers/rtc/rtc-isl1208.c | 5 +++++ 1 file changed, 5 insertions(+) commit dd888c61c9d4ef54d5a9884226989e3cceaacbd3 Author: Alexandre Belloni Date: Mon Feb 12 23:47:59 2018 +0100 rtc: tx4939: use generic nvmem Instead of adding a binary sysfs attribute from the driver, use the core to register an nvmem device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tx4939.c | 59 +++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 33 deletions(-) commit a2fa9b8e5abc7d16d5617996638f796fbd61cbb2 Author: Alexandre Belloni Date: Mon Feb 12 23:47:58 2018 +0100 rtc: tx4939: fix possible race condition The probe function is not allowed to fail after registering the RTC. Call rtc_register_device() at the end. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tx4939.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 68981fd1515de16f8effdd39e81f9a6084a895f7 Author: Alexandre Belloni Date: Mon Feb 12 23:47:57 2018 +0100 rtc: tx4939: switch to rtc_register_device This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tx4939.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit faec5f7bcca3a2e81aa7bd8412b22e808df508c3 Author: Alexandre Belloni Date: Mon Feb 12 23:47:56 2018 +0100 rtc: tx4939: extend test coverage The rtc-tx4939 driver now compiles correctly on other architectures, add COMPILE_TEST to improve code coverage. Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0151062ead35b3cc100a2b99b5c87b700ee52c0 Author: Alexandre Belloni Date: Mon Feb 12 23:47:55 2018 +0100 rtc: tx4939: remove arch/mips dependency Copy RTC definitions from arch/mips/include/asm/txx9/tx4939.h to the RTC driver so it doesn't depend on arch/mips anymore. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tx4939.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit d7ca4299d7c035969652596f0daa76407f6cfbdd Author: Alexandre Belloni Date: Mon Feb 12 23:47:54 2018 +0100 rtc: stk17ta8: use generic nvmem Instead of adding a binary sysfs attribute from the driver, use the core to register an nvmem device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-stk17ta8.c | 64 +++++++++++++++++----------------------------- 1 file changed, 24 insertions(+), 40 deletions(-) commit 8d3e6b55cedaeadd1216d4b548f346c169099f1f Author: Alexandre Belloni Date: Mon Feb 12 23:47:53 2018 +0100 rtc: stk17ta8: fix possible race condition The probe function is not allowed to fail after registering the RTC. Call rtc_register_device() at the end. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-stk17ta8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 91cb6774f6355eff527544181d2bfad1b7d054cf Author: Alexandre Belloni Date: Mon Feb 12 23:47:52 2018 +0100 rtc: stk17ta8: switch to rtc_register_device This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-stk17ta8.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 8f21092d65fd83e7a227c3aa88b79b3ec33a9b6e Author: Alexandre Belloni Date: Mon Feb 12 23:47:51 2018 +0100 rtc: stk17ta8: make alarms useful Currently, the IRQs are disabled when the rtc driver is removed (e.g. when shutting down the platform). This means that the RTC will be unable to wakeup the platform. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-stk17ta8.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 7335fb9be32409c43d81c806c14220d4fcb0227f Author: Alexandre Belloni Date: Mon Feb 12 23:47:50 2018 +0100 rtc: rp5c01: use generic nvmem Instead of adding a binary sysfs attribute from the driver, use the core to register an nvmem device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rp5c01.c | 65 ++++++++++++++++++------------------------------ 1 file changed, 24 insertions(+), 41 deletions(-) commit bcdd559268039d8340d38fa58668393596e29fdc Author: Alexandre Belloni Date: Mon Feb 12 23:47:49 2018 +0100 rtc: rp5c01: fix possible race condition The probe function is not allowed to fail after registering the RTC because the following may happen: CPU0: CPU1: sys_load_module() do_init_module() do_one_initcall() cmos_do_probe() rtc_device_register() __register_chrdev() cdev->owner = struct module* open("/dev/rtc0") rtc_device_unregister() module_put() free_module() module_free(mod->module_core) /* struct module *module is now freed */ chrdev_open() spin_lock(cdev_lock) cdev_get() try_module_get() module_is_live() /* dereferences already freed struct module* */ Switch to devm_rtc_allocate_device/rtc_register_device to register the rtc as late as possible. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rp5c01.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 87c78d9512cb85c286de5a8941eaeda8ca6f7bac Author: Alexandre Belloni Date: Mon Feb 12 23:47:48 2018 +0100 rtc: ds1742: use generic nvmem Instead of adding a binary sysfs attribute from the driver (which suffers from a race condition as the attribute appears after the device), use the core to register an nvmem device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1742.c | 67 +++++++++++++++++++----------------------------- 1 file changed, 26 insertions(+), 41 deletions(-) commit 1358e7b2b3312372ba231f6c94902a8dbfc7d2db Author: Alexandre Belloni Date: Mon Feb 12 23:47:47 2018 +0100 rtc: ds1742: switch to rtc_register_device This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1742.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 8b5b7958fd1cac54bdca62ec5552c6be0b38def4 Author: Alexandre Belloni Date: Mon Feb 12 23:47:46 2018 +0100 rtc: cmos: use generic nvmem Instead of adding a binary sysfs attribute from the driver, use the core to register an nvmem device. This allows to use the in-kernel interface to access the nvram. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 73 +++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 43 deletions(-) commit 53d29e0a3afe0567db9e4360e8523b092eb2d4e4 Author: Alexandre Belloni Date: Mon Feb 12 23:47:45 2018 +0100 rtc: cmos: fix possible race condition The probe function is not allowed to fail after registering the RTC because the following may happen: CPU0: CPU1: sys_load_module() do_init_module() do_one_initcall() cmos_do_probe() rtc_device_register() __register_chrdev() cdev->owner = struct module* open("/dev/rtc0") rtc_device_unregister() module_put() free_module() module_free(mod->module_core) /* struct module *module is now freed */ chrdev_open() spin_lock(cdev_lock) cdev_get() try_module_get() module_is_live() /* dereferences already freed struct module* */ Switch to devm_rtc_allocate_device/rtc_register_device to register the rtc as late as possible. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 1af7068d2a19d333e9280f8a43bc7215c90bfb91 Author: Alexandre Belloni Date: Mon Feb 12 23:47:44 2018 +0100 rtc: ds1553: make alarms useful Currently, the IRQs are disabled when the rtc driver is removed (e.g. when shutting down the platform). This means that the RTC will be unable to wakeup the platform. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1553.c | 10 ---------- 1 file changed, 10 deletions(-) commit 3a9a06d44bf75a1e0752e2de686729fb2a85ad22 Author: Alexandre Belloni Date: Mon Feb 12 23:47:43 2018 +0100 rtc: ds1553: use generic nvmem Instead of adding a binary sysfs attribute from the driver (which suffers from a race condition as the attribute appears after the device), use the core to register an nvmem device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1553.c | 55 +++++++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 31 deletions(-) commit 18c88cc9b0483c78562a0192779ec4d7ddc5dcf5 Author: Alexandre Belloni Date: Mon Feb 12 23:47:42 2018 +0100 rtc: ds1553: switch to rtc_register_device This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1553.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 11ad0b613d35f74dd8453d09b71dc2f0af7cf3e0 Author: Alexandre Belloni Date: Mon Feb 12 23:47:41 2018 +0100 rtc: sirfsoc: remove useless sirfsoc_rtc_ioctl sirfsoc_rtc_ioctl() doesn't implement any actual ioctl, remove it. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sirfsoc.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 0ff3565d88cde06c4ce20c55e7ce23050e1d6a0d Author: Alexandre Belloni Date: Mon Feb 12 23:47:40 2018 +0100 rtc: m48t59: use generic nvmem Instead of adding a binary sysfs attribute from the driver (which suffers from a race condition as the attribute appears after the device), use the core to register an nvmem device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m48t59.c | 56 +++++++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 32 deletions(-) commit affb842b84a27d12ab7fd0a86cefda0a343f0941 Author: Alexandre Belloni Date: Mon Feb 12 23:47:39 2018 +0100 rtc: m48t59: switch to rtc_register_device This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m48t59.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit d7501f709410f6813e84ecd5a28e7dc8f47ff792 Author: Alexandre Belloni Date: Mon Feb 12 23:47:38 2018 +0100 rtc: ds1343: use generic nvmem Instead of adding a binary sysfs attribute from the driver (which suffers from a race condition as the attribute appears after the device), use the core to register an nvmem device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1343.c | 66 +++++++++++++++--------------------------------- 1 file changed, 20 insertions(+), 46 deletions(-) commit ab392864039e7319d0be4f4fb4bbe20a8f8b544f Author: Alexandre Belloni Date: Mon Feb 12 23:47:37 2018 +0100 rtc: ds1343: remove undocumented and useless sysfs files A documented ABI already exists to get information about the alarm. It is the only one that is used. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1343.c | 96 +----------------------------------------------- 1 file changed, 1 insertion(+), 95 deletions(-) commit 1536f6dc9d3b9d265c0333970e3a52874144b10f Author: Alexandre Belloni Date: Mon Feb 12 23:47:36 2018 +0100 rtc: ds1343: switch to rtc_register_device This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1343.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit b5086150a685dcf8a3a2943eb7677a5fc4186782 Author: Alexandre Belloni Date: Mon Feb 12 23:47:35 2018 +0100 rtc: ds1343: simplify regmap initialization Avoid using memset as gcc can properly initialize structures. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1343.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 0391df74a608e4e65c29ddf80e704edfa8f8ef25 Author: Alexandre Belloni Date: Mon Feb 12 23:47:34 2018 +0100 rtc: remove nvmem_config Because nvmem_config is only used and copied at nvmem registration, remove it from struct rtc_device. All the rtc drivers using nvmem are now calling rtc_nvmem_register directly. Signed-off-by: Alexandre Belloni drivers/rtc/class.c | 2 -- include/linux/rtc.h | 1 - 2 files changed, 3 deletions(-) commit ce1ae8eb83bee42c5a0dbcc01346e41c6e85da43 Author: Alexandre Belloni Date: Mon Feb 12 23:47:33 2018 +0100 rtc: rv8803: fix possible race condition The probe function is not allowed to fail after registering the RTC. Call rtc_register_device() at the end. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv8803.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit c07fd9dea2fab9f4b1f246b766e124606cef187f Author: Alexandre Belloni Date: Mon Feb 12 23:47:32 2018 +0100 rtc: rv8803: put struct nvmem_config on the stack Avoid allocating memory for struct nvmem_config. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv8803.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 88d3aadea0c72bc9bfaec2504b331134056e9bce Author: Alexandre Belloni Date: Mon Feb 12 23:47:31 2018 +0100 rtc: rv8803: call rtc_nvmem_register() Call rtc_nvmem_register instead of letting the core do it and stop using the nvmem_config member of struct rtc_device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv8803.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0e7a412fa24c021cba7feebbc82878a44f58b33a Author: Alexandre Belloni Date: Mon Feb 12 23:47:30 2018 +0100 rtc: pcf85363: put struct nvmem_config on the stack Avoid allocating memory for struct nvmem_config. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85363.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 24849d177c63e3f9b2bd92eb5c17c7ee0da4d798 Author: Alexandre Belloni Date: Mon Feb 12 23:47:29 2018 +0100 rtc: pcf85363: call rtc_nvmem_register() Call rtc_nvmem_register instead of letting the core do it and stop using the nvmem_config member of struct rtc_device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85363.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ce603842c282a68191022aa3361ae18fc50a7f82 Author: Alexandre Belloni Date: Mon Feb 12 23:47:28 2018 +0100 rtc: omap: call rtc_nvmem_register() Call rtc_nvmem_register instead of letting the core do it and stop using the nvmem_config member of struct rtc_device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-omap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e3f51c0d29164b2e4cf3c72c962f3a4891412e9b Author: Alexandre Belloni Date: Mon Feb 12 23:47:27 2018 +0100 rtc: m48t86: put m48t86_nvmem_cfg on the stack Move m48t86_nvmem_cfg to the stack of m48t86_rtc_probe. This results in a very small code size reduction and make it safer on systems with two similar RTCs: text data bss dec hex filename 1733 164 0 1897 769 drivers/rtc/rtc-m48t86.o.before 1793 100 0 1893 765 drivers/rtc/rtc-m48t86.o.after Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m48t86.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 3c1bb61fad370d7c440b8f81df76cbb4d52a9b6f Author: Alexandre Belloni Date: Mon Feb 12 23:47:26 2018 +0100 rtc: m48t86: call rtc_nvmem_register() Call rtc_nvmem_register instead of letting the core do it and stop using the nvmem_config member of struct rtc_device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m48t86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 71e19c5e25792db5f46d525eb5743186b148326d Author: Alexandre Belloni Date: Mon Feb 12 23:47:25 2018 +0100 rtc: ds1511: put ds1511_nvmem_cfg on the stack Move ds1511_nvmem_cfg to the stack of ds1511_rtc_probe. This results in a very small code size reduction and make it safer on systems with two similar RTCs: text data bss dec hex filename 2128 164 4 2296 8f8 drivers/rtc/rtc-ds1511.o.before 2175 100 4 2279 8e7 drivers/rtc/rtc-ds1511.o.after Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1511.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 16fef391428e95b08e2c6ef9770f0d1185de770e Author: Alexandre Belloni Date: Mon Feb 12 23:47:24 2018 +0100 rtc: ds1511: call rtc_nvmem_register() Call rtc_nvmem_register instead of letting the core do it and stop using the nvmem_config member of struct rtc_device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1511.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 409baf1785db703583a5f0b51c0d0b114e14f4fb Author: Alexandre Belloni Date: Mon Feb 12 23:47:23 2018 +0100 rtc: ds1307: put struct nvmem_config on the stack Avoid allocating memory for struct nvmem_config as it is only necessary at the nvmem registration. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit e9fb7682fa22b16175b6cabcc481ec53ba696c43 Author: Alexandre Belloni Date: Mon Feb 12 23:47:22 2018 +0100 rtc: ds1307: call rtc_nvmem_register() Call rtc_nvmem_register instead of letting the core do it and stop using the nvmem_config member of struct rtc_device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit eed9d7a335d67f8d61286fb3bbacce9c61c6dc52 Author: Alexandre Belloni Date: Mon Feb 12 23:47:21 2018 +0100 rtc: ds1305: put ds1305_nvmem_cfg on the stack This makes to code safer on system using two similar RTCs. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1305.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 6910614f1e2806f43d0237a3566f83bfbee33440 Author: Alexandre Belloni Date: Mon Feb 12 23:47:20 2018 +0100 rtc: ds1305: call rtc_nvmem_register() Call rtc_nvmem_register instead of letting the core do it and stop using the nvmem_config member of struct rtc_device. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1305.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fd5cd21d995e67f87b3eb4adf938be85fe83ef4b Author: Alexandre Belloni Date: Mon Feb 12 23:47:19 2018 +0100 rtc: export rtc_nvmem_register() to drivers Export rtc_nvmem_register() so it can be called from drivers instead of only the core. Signed-off-by: Alexandre Belloni drivers/rtc/nvmem.c | 3 +-- drivers/rtc/rtc-core.h | 13 ------------- include/linux/rtc.h | 13 +++++++++++++ 3 files changed, 14 insertions(+), 15 deletions(-) commit ac75779b72fd52741d7446ad27cf6d58c006c643 Author: Alexandre Belloni Date: Wed Feb 28 21:58:02 2018 +0100 rtc: nvmem: allow registering the nvmem device before the rtc Switch the parent of the nvmem device to the parent of the rtc device so it can be registered before the RTC. This is a small change in the ABI as the nvmem moves out of the /sys/class/rtc/rtcX folder to be under the parent device folder (that is where the previous nvram files where registered). However, it is still available under its correct location, /sys/bus/nvmem/devices which is the one that should be used by userspace applications. The other benefit is that the nvmem device can stay registered even if the rtc registration fails. Or it is possible to not register the rtc if the nvmem registration failed. Finally, it makes a lot of sense for devices that actually have different i2c or spi addresses for the RTC and the EEPROM. That is basically how it would end up when using MFD or even completely separate devices. Signed-off-by: Alexandre Belloni Documentation/ABI/testing/sysfs-class-rtc | 8 -------- drivers/rtc/class.c | 5 +++-- drivers/rtc/nvmem.c | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) commit bba73071b6f71be0a101658d7c13866e30b264a6 Merge: c71b53c f073d78 Author: Joonas Lahtinen Date: Thu Mar 1 11:14:24 2018 +0200 Merge drm-next into drm-intel-next-queued (this time for real) To pull in the HDCP changes, especially wait_for changes to drm/i915 that Chris wants to build on top of. Signed-off-by: Joonas Lahtinen commit 8f1561680f42a5491b371b513f1ab8197f31fd62 Author: Dou Liyang Date: Thu Mar 1 13:59:30 2018 +0800 x86/apic: Drop logical_smp_processor_id() inline The logical_smp_processor_id() inline which is only called in setup_local_APIC() on x86_32 systems has no real value. Drop it and directly use GET_APIC_LOGICAL_ID() at the call site and use a more suitable variable name for readability Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: andy.shevchenko@gmail.com Cc: bhe@redhat.com Cc: ebiederm@xmission.com Link: https://lkml.kernel.org/r/20180301055930.2396-4-douly.fnst@cn.fujitsu.com arch/x86/include/asm/smp.h | 10 ---------- arch/x86/kernel/apic/apic.c | 10 +++++----- 2 files changed, 5 insertions(+), 15 deletions(-) commit 3ea9e7ae1a2038b9fdff729861c9b4af0087024f Author: Dou Liyang Date: Thu Mar 1 13:59:29 2018 +0800 x86/apic: Modernize the pending interrupt code The pending interrupt check code is old, update the following: - Use for_each_set_bit() instead of open coding it - Replace printk() with pr_err() - Get rid of printk line breaks - Make curly braces balanced Suggested-by: Andy Shevchenko Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Reviewed-by: Andy Shevchenko Cc: bhe@redhat.com Cc: ebiederm@xmission.com Link: https://lkml.kernel.org/r/20180301055930.2396-3-douly.fnst@cn.fujitsu.com arch/x86/kernel/apic/apic.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 9b217f33017715903d0956dfc58f82d2a2d00e63 Author: Dou Liyang Date: Thu Mar 1 13:59:28 2018 +0800 x86/apic: Move pending interrupt check code into it's own function The pending interrupt check code is mixed with the local APIC setup code, that looks messy. Extract the related code, move it into a new function named apic_pending_intr_clear(). Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Reviewed-by: Andy Shevchenko Cc: bhe@redhat.com Cc: ebiederm@xmission.com Link: https://lkml.kernel.org/r/20180301055930.2396-2-douly.fnst@cn.fujitsu.com arch/x86/kernel/apic/apic.c | 100 ++++++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 45 deletions(-) commit 5b4a68952a89e7decf4ff5e86406975cc730575d Author: Srinivas Kandagatla Date: Thu Feb 15 12:25:11 2018 +0000 dmaengine: qcom: bam_dma: disable runtime pm on remote controlled Remotely controlled BAM instance should not do any power management from CPU side, as cpu can not reliably say if the BAM is busy or not. Disable it for such instances. Signed-off-by: Srinivas Kandagatla Signed-off-by: Vinod Koul drivers/dma/qcom/bam_dma.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 54eb5e26cbb72ba77588098385bf5f492b8323ae Author: Srinivas Kandagatla Date: Thu Feb 15 12:25:10 2018 +0000 dmaengine: qcom: bam_dma: do not write to global regs in remote mode BAM_DESC_CNT_TRSHLD register is global register, which can only be written when BAM is in master mode, So check the mode of operation before writing it. Without this check SOC's xPU would catch such access and crash the system. First noticed on DB820c while testing SLIMBus BAM. Signed-off-by: Srinivas Kandagatla Signed-off-by: Vinod Koul drivers/dma/qcom/bam_dma.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 48d163b1aa6e7f650c0b7a4f9c61c387a6def868 Author: Srinivas Kandagatla Date: Thu Feb 15 12:25:09 2018 +0000 dmaengine: qcom: bam_dma: get num-channels and num-ees from dt When Linux is master of BAM, it can directly read registers to know number of supported channels, however when its remotely controlled reading these registers would trigger a crash if the BAM is not yet initialized or powered up on the remote side. This patch allows driver to read num-channels and num-ees from Device Tree for remotely controlled BAM. Signed-off-by: Srinivas Kandagatla Signed-off-by: Vinod Koul drivers/dma/qcom/bam_dma.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit d545afc907fa66b779699b88ec24f7fe7498cbba Author: Srinivas Kandagatla Date: Thu Feb 15 12:25:08 2018 +0000 dt-bindings: dmaengine: bam_dma: add remote controlled bindings This patch adds 2 new properties for remote controlled bam dt bindings. 1. num-channels to indicate number of dma channels. 2. qcom,num-ees to indicate number of Execution Environments. Signed-off-by: Srinivas Kandagatla Reviewed-by: Rob Herring Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/qcom_bam_dma.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 9d31821fa9ca9a12e22e1238901ab12e295eec86 Author: Srinivas Kandagatla Date: Thu Feb 15 12:25:07 2018 +0000 dmaengine: qcom: bam_dma: make bam clk optional When BAM is remotely controlled it does not sound correct to control its clk on Linux side. Make it optional, so that its not mandatory for remote controlled BAM instances. Signed-off-by: Srinivas Kandagatla Signed-off-by: Vinod Koul drivers/dma/qcom/bam_dma.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c71b53cc66c5053ff3524a6132f8fc8199d618c3 Author: Manasi Navare Date: Wed Feb 28 14:31:50 2018 -0800 drm/i915/dp: Add HBR3 rate (8.1 Gbps) to dp_rates array dp_rates[] array is a superset of all the link rates supported by sink devices. DP 1.3 specification adds HBR3 (8.1Gbps) link rate to the set of link rates supported by sink. This patch adds this rate to dp_rates[] array that gets used to populate the sink_rates[] array limited by max rate obtained from DP_MAX_LINK_RATE DPCD register. v2: * Rebased on top of Jani's localized rates patch Cc: Jani Nikula Cc: Ville Syrjälä Signed-off-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1519857110-26916-1-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cba7071b70de271415a4d9e8bfb1e420d5942b1 Author: Tomi Valkeinen Date: Mon Sep 12 10:00:15 2016 +0300 drm/omap: cleanup color space conversion The setup code for color space conversion is a bit messy. This patch cleans it up. For some reason the TRM uses values in YCrCb order, which is also used in the current driver, whereas everywhere else it's YCbCr (which also matches YUV order). This patch changes the tables to use the common order to avoid confusion. The tables are split into separate lines, and comments added for clarity. WB color conversion registers are similar but different than non-WB, but the same function was used to write both. It worked fine because the coef table was adjusted accordingly, but that was rather confusing. This patch adds a separate function to write the WB values so that the coef table can be written in an understandable way. Recalculation also showed that 'bcb' value in yuv-to-rgb conversion had been rounded wrongly, and it should be 516 instead of 517. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 59 +++++++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 15 deletions(-) commit c1899cb368c1d280af48661c6edaa975cf653533 Author: Jyri Sarha Date: Thu Mar 16 12:05:04 2017 +0200 drm/omap: Allow HDMI audio setup even if we do not have video configured Allow HDMI audio setup even if we do not have video configured. Audio will get configured at the same time with video if the video is configured soon enough. If it is not the audio DMA will timeout in couple of seconds and audio playback will be aborted. Signed-off-by: Jyri Sarha Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/hdmi4.c | 33 ++++++++++++++------------------- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 37 ++++++++++++++++--------------------- 2 files changed, 30 insertions(+), 40 deletions(-) commit 1915d7fa93397b3dc8bf9c6973d8662c0a661daf Author: Tomi Valkeinen Date: Wed Jan 10 11:31:18 2018 +0200 drm/omap: fix maximum sizes We define max width and height in mode_config to 2048. These maximums affect many things, which are independent and depend on platform. We need to do more fine grained checks in the code paths for each component, and so the maximum values in mode_config should just be "big enough" to cover all use cases. Change the maximum width & height to 8192. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 7c00985109f95474a7fe31f03022126e23e355ff Author: Tomi Valkeinen Date: Tue Nov 10 17:59:50 2015 -0600 drm/omap: add writeback funcs to dispc_ops Add writeback specific dispc functions to dispc_ops so that omapdrm can use them. Also move 'enum dss_writeback_channel' to the public omapdss.h for omapdrm. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 19 +++++++++++++++---- drivers/gpu/drm/omapdrm/dss/dss.h | 21 --------------------- drivers/gpu/drm/omapdrm/dss/omapdss.h | 20 ++++++++++++++++++++ 3 files changed, 35 insertions(+), 25 deletions(-) commit 13bb1601c721f395d272d58438c9e747317f7c1a Author: Tomi Valkeinen Date: Tue Dec 22 15:45:20 2015 -0600 drm/omap: fix scaling limits for WB WB has additional scaling limits when the output color format is one of the YUV formats. These limits are not handled at the moment, causing bad scaling and/or NULL dereference crash. This patchs adds the check so that dispc returns an error for bad scaling request. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 1317ef2113a14b631df15c9d09ce1283836c1456 Author: Tomi Valkeinen Date: Thu Oct 26 14:40:13 2017 +0300 drm/omap: fix WB height with interlace When using WB capture from interlaced source, we need to halve the picture heights correctly. Unfortunately the current dispc_ovl_setup_common() doesn't deal with interlace very neatly, so the end result is a bit messy. Signed-off-by: Tomi Valkeinen Acked-by: Benoit Parrot drivers/gpu/drm/omapdrm/dss/dispc.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit b994e53c2c6437689873af4ff61803bef78a2330 Author: Tomi Valkeinen Date: Thu Oct 26 14:40:12 2017 +0300 drm/omap: fix WBDELAYCOUNT with interlace Vertical blanking needs to be halved on interlace modes. WBDELAYCOUNT was calculated without such halving, resulting in WBUNCOMPLETE errors. Signed-off-by: Tomi Valkeinen Acked-by: Benoit Parrot drivers/gpu/drm/omapdrm/dss/dispc.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 46a930418544a5c28abec8dc3e0899d53381814a Author: Tomi Valkeinen Date: Fri Jun 3 13:29:59 2016 +0300 drm/omap: fix WBDELAYCOUNT for HDMI For HDMI, WBDELAYCOUNT starts counting at the start of vsync, not at the start of vfp. This patch adjusts the wbdelay for HDMI accordingly. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9f7853ae751849f50486759197d86993551663c2 Author: Tomi Valkeinen Date: Tue Jan 9 15:36:47 2018 +0200 drm/omap: set WB channel-in in wb_setup() We need to know the WB channel-in in wb_setup() to be able to configure WB properly for capture mode. At the moment channel-in is set separately. This patch moves channel-in to wb_setup(). Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 12 +++--------- drivers/gpu/drm/omapdrm/dss/dss.h | 3 ++- 2 files changed, 5 insertions(+), 10 deletions(-) commit 9deb5ad3c47ead2b3c63e44435e9eff0f6f38835 Author: Benoit Parrot Date: Mon May 16 16:42:50 2016 -0500 drm/omap: Add pclk setting case when channel is DSS_WB In dispc_set_ovl_common() we need to initialize pclk to a valid value when we use WB in capture mode (i.e. mem_2_mem is false). Otherwise dispc_ovl_calc_scaling() fails. Signed-off-by: Benoit Parrot Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 4 ++++ 1 file changed, 4 insertions(+) commit b5d025eff5206300be0f59bfe10c5b9e1c895af4 Author: Benoit Parrot Date: Wed Jun 22 12:59:50 2016 -0500 drm/omap: dispc: disp_wb_setup to check return code When dispc_wb_setup() calls dispc_ovl_setup_common() it does not check for failure but instead keeps on partially setting up WB. This causes the WB H/W to be partially initialized and yield unexpected behavior. Make sure return code is successful before proceeding. Signed-off-by: Benoit Parrot Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 249e3da9b087f7691efbf1fd6691da69a4c1857d Author: Tomi Valkeinen Date: Fri Jan 27 09:28:47 2017 +0200 drm/omap: remove leftover enums A few enums are not used anywhere, so remove them. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/omapdss.h | 15 --------------- 1 file changed, 15 deletions(-) commit 3a5d0729dc0d16a8f00bf1c7961b27af859d01a2 Author: Tomi Valkeinen Date: Fri Dec 15 16:08:22 2017 +0200 dt-bindings: display: add HPD gpio to DVI connector Add hpd-gpios property to dvi-connector.txt. Signed-off-by: Tomi Valkeinen Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Documentation/devicetree/bindings/display/connector/dvi-connector.txt | 1 + 1 file changed, 1 insertion(+) commit 588fd85d2706619b88cf287d89d8bee26b4e9f31 Author: Tomi Valkeinen Date: Fri Dec 15 16:08:23 2017 +0200 drm/omap: add HPD support to connector-dvi Add HPD support to the DVI connector driver. The code is almost identical to the HPD code in the HDMI connector driver. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/displays/connector-dvi.c | 118 +++++++++++++++++++++++ 1 file changed, 118 insertions(+) commit da77772172059e609ef5135881df55e3e6c5c808 Author: Peter Ujfalusi Date: Fri Dec 15 16:08:31 2017 +0200 drm/omap: Init fbdev emulation only when we have displays Do not try to init the fbdev if either num_crtcs or num_connectors is 0. In this case we do not have display so the fbdev init would fail anyways. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_fbdev.c | 3 +++ 1 file changed, 3 insertions(+) commit efd1f06be004a6a384f0482ef76c12bc202e1b8e Author: Tomi Valkeinen Date: Fri Feb 9 09:36:23 2018 +0200 drm/omap: cleanup fbdev init/free omap_fbdev_init() and omap_fbdev_free() use priv->fbdev directly. However, omap_fbdev_init() returns the fbdev, and omap_drv.c also assigns the return value to priv->fbdev. This is slightly confusing. Clean this up by removing the omap_fbdev_init() return value, as we don't care whether fbdev init succeeded or not. Also change omap_drv.c to call omap_fbdev_free() always, and omap_fbdev_free() does the check if fbdev was initialized. While at it, rename omap_fbdev_free() to omap_fbdev_fini() to better match the "init" counterpart. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_drv.c | 9 ++++----- drivers/gpu/drm/omapdrm/omap_fbdev.c | 18 ++++++++---------- drivers/gpu/drm/omapdrm/omap_fbdev.h | 9 ++++----- 3 files changed, 16 insertions(+), 20 deletions(-) commit e6204a58b9e9ad01ab9c6d4b8b2b8b9c4e38bbba Author: Tomi Valkeinen Date: Fri Feb 9 09:30:44 2018 +0200 drm/omap: fix omap_fbdev_free() when omap_fbdev_create() wasn't called If we have no crtcs/connectors, fbdev init goes fine, but omap_fbdev_create() is never called. This means that omap_fbdev->bo is NULL and omap_fbdev_free() crashes. Add a check to omap_fbdev_free() to handle the NULL case. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_fbdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f9b34a0fa4e25d9c0b72f124680c37c0c38f9934 Author: Tomi Valkeinen Date: Mon Feb 12 09:55:45 2018 +0200 drm/omap: fbdev: avoid double initializer entry Fix sparse warning: drivers/gpu/drm/omapdrm/omap_fbdev.c:83:9: warning: Initializer entry defined twice drivers/gpu/drm/omapdrm/omap_fbdev.c:91:10: also defined here Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_fbdev.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 5db08a7e487a8a8e4e667b63fa37fec14f185e64 Author: Tomi Valkeinen Date: Mon Feb 12 09:52:57 2018 +0200 drm/omap: fbdev: use 'screen_buffer' field Fix sparse warning: drivers/gpu/drm/omapdrm/omap_fbdev.c:191:26: warning: incorrect type in assignment (different address spaces) drivers/gpu/drm/omapdrm/omap_fbdev.c:191:26: expected char [noderef] *screen_base drivers/gpu/drm/omapdrm/omap_fbdev.c:191:26: got void * Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45bfdabf6fa501f05d65d43229f550dc09198ab1 Author: Tomi Valkeinen Date: Mon Feb 12 09:19:52 2018 +0200 drm/omap: acx565akm: use __be32 when reading status Fix sparse warning: drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c:224:23: warning: cast to restricted __be32 Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fe6b503910e9d794d64e6dd311f4d5c80514069f Author: Tomi Valkeinen Date: Mon Feb 12 09:16:08 2018 +0200 drm/omap: reorganize locking in mgr_fld_write Fix sparse warning: drivers/gpu/drm/omapdrm/dss/dispc.c:387:9: warning: context imbalance in 'mgr_fld_write' - different lock contexts for basic block Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 663ac57b285d0176cacb85899b7f79d83f825353 Author: Laurent Pinchart Date: Tue Feb 13 14:00:48 2018 +0200 drm: omapdrm: venc: Allocate the venc private data structure dynamically The venc private data structure is currently stored as a global variable. While no platform with multiple VENC encoders currently exists nor is planned, this doesn't comply with the kernel device model and should thus be fixed. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/venc.c | 442 ++++++++++++++++++++----------------- 1 file changed, 238 insertions(+), 204 deletions(-) commit 24aac6011f704d69b5f34514923413f85669f282 Author: Laurent Pinchart Date: Tue Feb 13 14:00:47 2018 +0200 drm: omapdrm: sdi: Allocate the sdi private data structure dynamically The sdi private data structure is currently stored as a global variable. While no platform with multiple SDI encoders currently exists nor is planned, this doesn't comply with the kernel device model and should thus be fixed. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/sdi.c | 151 ++++++++++++++++++++++---------------- 1 file changed, 86 insertions(+), 65 deletions(-) commit c44991ce21bef5831b28b36f1da87dceb85bef75 Author: Laurent Pinchart Date: Tue Feb 13 14:00:46 2018 +0200 drm: omapdrm: hdmi5: Allocate the omap_hdmi data structure dynamically The omap_hdmi private data structure is currently stored as a global variable. While no platform with multiple HDMI5 encoders currently exists nor is planned, this doesn't comply with the kernel device model and should thus be fixed. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/hdmi5.c | 364 +++++++++++++++++++----------------- 1 file changed, 196 insertions(+), 168 deletions(-) commit ac7674567c6204185d31aca828f9d1e6ad64f40b Author: Laurent Pinchart Date: Tue Feb 13 14:00:45 2018 +0200 drm: omapdrm: hdmi4: Allocate the omap_hdmi data structure dynamically The omap_hdmi private data structure is currently stored as a global variable. While no platform with multiple HDMI4 encoders currently exists nor is planned, this doesn't comply with the kernel device model and should thus be fixed. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/hdmi.h | 2 + drivers/gpu/drm/omapdrm/dss/hdmi4.c | 356 +++++++++++++++++-------------- drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c | 4 +- drivers/gpu/drm/omapdrm/dss/hdmi4_core.h | 4 +- 4 files changed, 200 insertions(+), 166 deletions(-) commit 1f6b6b6267ebe6f36f3640bccb93d54e9699c131 Author: Laurent Pinchart Date: Tue Feb 13 14:00:44 2018 +0200 drm: omapdrm: dispc: Allocate the dispc private data structure dynamically The dispc private data structure is currently stored as a global variable. While no platform with multiple DISPC currently exists nor is planned, this doesn't comply with the kernel device model and should thus be fixed. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dispc.c | 1934 +++++++++++++++++++---------------- 1 file changed, 1039 insertions(+), 895 deletions(-) commit 8a7eda7686675b73d74c22c0d5b83059f9d783f6 Author: Laurent Pinchart Date: Tue Feb 13 14:00:43 2018 +0200 drm: omapdrm: dispc: Pass DISPC pointer to remaining dispc API functions This removes the need to access the global DISPC private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DISPC private data dynamically). Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dispc.c | 102 ++++++++++++++++++++---------------- drivers/gpu/drm/omapdrm/dss/dpi.c | 12 +++-- drivers/gpu/drm/omapdrm/dss/dsi.c | 22 ++++---- drivers/gpu/drm/omapdrm/dss/dss.c | 14 ++--- drivers/gpu/drm/omapdrm/dss/dss.h | 74 ++++++++++++++------------ drivers/gpu/drm/omapdrm/dss/hdmi4.c | 4 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 4 +- drivers/gpu/drm/omapdrm/dss/sdi.c | 9 ++-- drivers/gpu/drm/omapdrm/dss/venc.c | 2 +- 9 files changed, 133 insertions(+), 110 deletions(-) commit 50638ae569dc097a95218eb70140e68aa213b07c Author: Laurent Pinchart Date: Tue Feb 13 14:00:42 2018 +0200 drm: omapdrm: dispc: Pass DISPC pointer to dispc_ops operations This removes the need to access the global DISPC private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DISPC private data dynamically). In order to allow the omapdrm side to call the dispc_ops with a DISPC pointer, we also introduce a new function dss_get_dispc() to retrieve the DISPC corresponding to the DSS. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/base.c | 6 + drivers/gpu/drm/omapdrm/dss/dispc.c | 223 ++++++++++++++++++---------------- drivers/gpu/drm/omapdrm/dss/dpi.c | 6 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 4 +- drivers/gpu/drm/omapdrm/dss/dss.h | 6 +- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 7 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 7 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 95 +++++++++------ drivers/gpu/drm/omapdrm/dss/sdi.c | 6 +- drivers/gpu/drm/omapdrm/dss/venc.c | 4 +- drivers/gpu/drm/omapdrm/omap_crtc.c | 31 +++-- drivers/gpu/drm/omapdrm/omap_drv.c | 13 +- drivers/gpu/drm/omapdrm/omap_drv.h | 1 + drivers/gpu/drm/omapdrm/omap_irq.c | 32 ++--- drivers/gpu/drm/omapdrm/omap_plane.c | 12 +- 15 files changed, 257 insertions(+), 196 deletions(-) commit d3541ca81dbddeefa0c42df448211a9dbaef0843 Author: Laurent Pinchart Date: Tue Feb 13 14:00:41 2018 +0200 drm: omapdrm: dss: Store dispc ops in dss_device structure Remove the global dispc ops variable by storing it in the dss_device structure. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/base.c | 13 ++++--------- drivers/gpu/drm/omapdrm/dss/dispc.c | 6 ++++-- drivers/gpu/drm/omapdrm/dss/dss.h | 2 ++ drivers/gpu/drm/omapdrm/dss/omapdss.h | 3 +-- drivers/gpu/drm/omapdrm/omap_crtc.c | 4 +--- drivers/gpu/drm/omapdrm/omap_drv.c | 5 ++--- 6 files changed, 14 insertions(+), 19 deletions(-) commit 72877cf38b4b78fbb3a852f2288d7f2a7af0db22 Author: Laurent Pinchart Date: Tue Feb 13 14:00:40 2018 +0200 drm: omapdrm: dss: Store DSS device pointer in the omapdrm private data The dss_device is the top-level component in the omapdss driver. Give the omapdrm driver access to the dss_device pointer in order to obtain pointers to all other components from it. This requires a new global variable in the omapdss driver that will be removed when merging the omapdrm and omapdss drivers, but will already allow removal of several other global variables. As this partly duplicates the omapdss_is_initialized() API, reimplement it as an inline function wrapping omapdss_get_dss(). Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/base.c | 14 +++++++------- drivers/gpu/drm/omapdrm/dss/dss.c | 5 +++-- drivers/gpu/drm/omapdrm/dss/omapdss.h | 10 +++++++--- drivers/gpu/drm/omapdrm/omap_drv.c | 1 + drivers/gpu/drm/omapdrm/omap_drv.h | 1 + 5 files changed, 19 insertions(+), 12 deletions(-) commit 64cb81797f8b56e1806d67024de561b60944d1a5 Author: Laurent Pinchart Date: Tue Feb 13 14:00:39 2018 +0200 drm: omapdrm: dss: Pass omap_drm_private pointer to dss_mgr_ops The dss_mgr_ops operations implemented by the omapdrm side have to look up the omap_crtc objects from global variables as they are only passed a channel number. In order to remove global variables in the omapdrm driver pass the omap_drm_private pointer to the dss_mgr_ops. This requires storing a pointer to the omap_drm_private in a global variable on the DSS side as a temporary measure until the omapdrm and omapdss drivers get merged. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/omapdss.h | 41 ++++++++++++++++++++++------------- drivers/gpu/drm/omapdrm/dss/output.c | 28 +++++++++++++++--------- drivers/gpu/drm/omapdrm/omap_crtc.c | 31 +++++++++++++++----------- drivers/gpu/drm/omapdrm/omap_crtc.h | 2 +- drivers/gpu/drm/omapdrm/omap_drv.c | 2 +- 5 files changed, 64 insertions(+), 40 deletions(-) commit 28d79f3e56b2c1d5ff0fd363da3229be0962cc85 Author: Laurent Pinchart Date: Tue Feb 13 14:00:38 2018 +0200 drm: omapdrm: dss: Pass omap_dss_device pointer to dss_mgr_*() functions The dss_mgr_*() functions take a channel argument to identify the channel they operate on. This prevents the functions from accessing driver data structures without resorting to global variables. In an effort to remove global variables, pass the omap_dss_device pointer associated with the channel instead. This will be used to look up the omap_drm_private data structure to pass to the dss_mgr_ops. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dpi.c | 32 ++++++++++---------------- drivers/gpu/drm/omapdrm/dss/dsi.c | 30 +++++++++++-------------- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 20 ++++++----------- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 20 ++++++----------- drivers/gpu/drm/omapdrm/dss/omapdss.h | 22 +++++++++--------- drivers/gpu/drm/omapdrm/dss/output.c | 42 ++++++++++++++++++----------------- drivers/gpu/drm/omapdrm/dss/sdi.c | 28 +++++++++-------------- drivers/gpu/drm/omapdrm/dss/venc.c | 18 +++++---------- 8 files changed, 88 insertions(+), 124 deletions(-) commit f81b0fd4701c6c25481a81f8ec279ddb9fa2c27a Author: Laurent Pinchart Date: Tue Feb 13 14:00:37 2018 +0200 drm: omapdrm: dsi: Don't pass channel to dispc init/uninit functions The dsi_display_init_dispc() and dsi_display_uninit_dispc() functions take a channel argument that is reduntant as it is always identical to the dsi->output.dispc_channel. Remove the argument and use the field directly in the functions to avoid misuse. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dsi.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 4600ea9c49cc494fd7fb65d4f659e9f7b27b56e8 Author: Laurent Pinchart Date: Tue Feb 13 14:00:36 2018 +0200 drm: omapdrm: dsi: Store the struct device pointer in struct dsi_data The dsi_data structure stores a pointer to a struct platform_device. The driver only uses the dev member of the platform device structure. Store the struct device pointer instead and use it directly. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dsi.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit c7963f5f13dfecb3e5d375b4d807927272bf28d0 Author: Laurent Pinchart Date: Tue Feb 13 14:00:35 2018 +0200 drm: omapdrm: dsi: Use dev pointer directly in dsi_bind() function The dsi_bind() function receives a pointer to a struct device that it casts to a struct platform_device, only to use the platform device's dev field through the code. Use the dev pointer directly. While at it rename the struct platform_device pointer dsidev to pdev to make it more explicit. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dsi.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit c068408ef386e151e566ab96dd9e3103b264189b Author: Laurent Pinchart Date: Tue Feb 13 14:00:34 2018 +0200 drm: omapdrm: dsi: Combine two commonly used inline functions The dsi_get_dsidrv_data() and dsi_get_dsidev_from_dssdev() inline functions convert a struct omap_dss_device pointer to the corresponding struct platform_device, and a struct platform_device pointer to the corresponding struct dsi_data. They are nearly always called together without any use of the intermediate platform_device, so combine them into a single function. In the three locations where only dsi_get_dsidrv_data() is used, call dev_get_drvdata() directly. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dsi.c | 90 +++++++++++++-------------------------- 1 file changed, 30 insertions(+), 60 deletions(-) commit 7093d6cd1fb39efbc014f209eab0bc7a21e08811 Author: Laurent Pinchart Date: Tue Feb 13 14:00:33 2018 +0200 drm: omapdrm: dsi: Pass the dsi_data pointer to internal functions Internal dsi functions take a pointer to the DSI platform_device and then cast it to a dsi_data pointer. That's pointless as the caller already has the dsi_data pointer. Pass it directly instead of the platform_device pointer. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dsi.c | 1228 +++++++++++++++++-------------------- 1 file changed, 564 insertions(+), 664 deletions(-) commit b40d0ed647a2d96da38760d0429450936030fd85 Author: Laurent Pinchart Date: Tue Feb 13 14:00:32 2018 +0200 drm: omapdrm: dss: Don't unnecessarily cast to dev to pdev and back The dss_unbind() function casts the struct device pointer to a struct platform_device, only to later use the struct device pointer from platform_device. Don't cast at all. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dss.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1c4b92ee00734766967f5aa425767923c747f9c6 Author: Laurent Pinchart Date: Tue Feb 13 14:00:31 2018 +0200 drm: omapdrm: dss: Store the debugfs root directory in struct dss_device As part of an effort to remove the usage of global variables in the driver, store the debugfs root directory in the dss_device structure instead of a global variable. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dispc.c | 2 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 8 ++++---- drivers/gpu/drm/omapdrm/dss/dss.c | 38 ++++++++++++++++++------------------- drivers/gpu/drm/omapdrm/dss/dss.h | 9 ++++++--- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 3 ++- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 3 ++- drivers/gpu/drm/omapdrm/dss/venc.c | 3 ++- 7 files changed, 36 insertions(+), 30 deletions(-) commit 798957aedbde21c6418c419708b765b102b341c7 Author: Laurent Pinchart Date: Tue Feb 13 14:00:30 2018 +0200 drm: omapdrm: dss: Store the registered plls array in struct dss_device As part of an effort to remove the usage of global variables in the driver, store the registered plls array in the dss_device structure instead of a global variable. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dispc.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/dpi.c | 17 +++++++------- drivers/gpu/drm/omapdrm/dss/dsi.c | 3 +-- drivers/gpu/drm/omapdrm/dss/dss.h | 8 ++++--- drivers/gpu/drm/omapdrm/dss/hdmi_pll.c | 3 +-- drivers/gpu/drm/omapdrm/dss/pll.c | 40 +++++++++++++++++---------------- drivers/gpu/drm/omapdrm/dss/video-pll.c | 3 +-- 7 files changed, 40 insertions(+), 38 deletions(-) commit f33656e1fe5aba0ac0d35e18d90121dd894611ca Author: Laurent Pinchart Date: Tue Feb 13 14:00:29 2018 +0200 drm: omapdrm: dss: Support passing private data to debugfs show handlers To simplify implementation of debugfs seq_file show handlers, the driver passes the pointer to the show function through the debugfs_create_file data pointer. This prevents using the pointer to pass driver private data to the show handler, and requires all handlers to use global variables to access private data. To prepare for the removal of global private data in the driver, rework the debugfs infrastructure to allow passing a private data pointer to show handlers. The price to pay is explicit removal of debugfs files to free the internally allocated memory. This is desirable anyway as debugfs entries should be removed when a component driver is unbound, otherwise crashes will occur due to access to freed memory when the components will be dynamically allocated instead of stored in global variables. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dispc.c | 13 ++++-- drivers/gpu/drm/omapdrm/dss/dsi.c | 40 ++++++++++++----- drivers/gpu/drm/omapdrm/dss/dss.c | 89 ++++++++++++++++++++++++------------- drivers/gpu/drm/omapdrm/dss/dss.h | 31 ++++++++----- drivers/gpu/drm/omapdrm/dss/hdmi.h | 2 + drivers/gpu/drm/omapdrm/dss/hdmi4.c | 9 ++-- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 9 ++-- drivers/gpu/drm/omapdrm/dss/venc.c | 11 +++-- 8 files changed, 141 insertions(+), 63 deletions(-) commit 360c21533ce79981bd9802622dd0b7a0dcd81395 Author: Laurent Pinchart Date: Tue Feb 13 14:00:28 2018 +0200 drm: omapdrm: dss: Allocate the DSS private data structure dynamically The DSS private data structure is currently stored as a global variable. While no platform with multiple DSS devices currently exists nor is planned, this doesn't comply with the kernel device model and should thus be fixed. Allocate the DSS private data structure dynamically for each DSS instance and remove the global variable. All code that need access to the structure now retrieves it dynamically so we can remove the global variable. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dss.c | 341 +++++++++++++++++++++----------------- 1 file changed, 186 insertions(+), 155 deletions(-) commit 1ef904e1e4f05d32331783d413e341c6353ae9aa Author: Laurent Pinchart Date: Tue Feb 13 14:00:27 2018 +0200 drm: omapdrm: dss: Pass DSS pointer to remaining dss functions This removes the need to access the global DSS private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DSS device dynamically). Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dispc.c | 2 +- drivers/gpu/drm/omapdrm/dss/dss.c | 9 +++++---- drivers/gpu/drm/omapdrm/dss/dss.h | 7 ++++--- drivers/gpu/drm/omapdrm/dss/venc.c | 11 +++++++---- 4 files changed, 17 insertions(+), 12 deletions(-) commit 60f9c59fc1e2ced4a02e91088c367395edacc7fe Author: Laurent Pinchart Date: Tue Feb 13 14:00:26 2018 +0200 drm: omapdrm: dss: Pass DSS pointer to dss clock functions This removes the need to access the global DSS private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DSS device dynamically). Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dispc.c | 8 ++++---- drivers/gpu/drm/omapdrm/dss/dpi.c | 14 ++++++++------ drivers/gpu/drm/omapdrm/dss/dss.c | 37 ++++++++++++++++++------------------- drivers/gpu/drm/omapdrm/dss/dss.h | 10 +++++----- drivers/gpu/drm/omapdrm/dss/sdi.c | 5 +++-- 5 files changed, 38 insertions(+), 36 deletions(-) commit 3cc62aadf414102785adbfc3dd2f2f3be85d60db Author: Laurent Pinchart Date: Tue Feb 13 14:00:25 2018 +0200 drm: omapdrm: dss: Pass DSS pointer to dss_get_*_clk_source() This removes the need to access the global DSS private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DSS device dynamically). Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dispc.c | 11 +++++++---- drivers/gpu/drm/omapdrm/dss/dsi.c | 8 +++++--- drivers/gpu/drm/omapdrm/dss/dss.c | 18 ++++++++++-------- drivers/gpu/drm/omapdrm/dss/dss.h | 8 +++++--- 4 files changed, 27 insertions(+), 18 deletions(-) commit 8aea8e6a79e77f4c4af4edc45db744f28f6fe008 Author: Laurent Pinchart Date: Tue Feb 13 14:00:24 2018 +0200 drm: omapdrm: dss: Pass DSS pointer to dss_ops operations This removes the need to access the global DSS private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DSS device dynamically). Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dpi.c | 12 ++++--- drivers/gpu/drm/omapdrm/dss/dsi.c | 18 +++++----- drivers/gpu/drm/omapdrm/dss/dss.c | 68 ++++++++++++++++++++++--------------- drivers/gpu/drm/omapdrm/dss/dss.h | 25 ++++++++------ drivers/gpu/drm/omapdrm/dss/hdmi.h | 1 + drivers/gpu/drm/omapdrm/dss/hdmi4.c | 3 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 3 +- 7 files changed, 77 insertions(+), 53 deletions(-) commit d7157dfe0460fb003d41c1a5c36788de9b639ecb Author: Laurent Pinchart Date: Tue Feb 13 14:00:23 2018 +0200 drm: omapdrm: dss: Pass DSS pointer to dss_sdi_*() functions This removes the need to access the global DSS private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DSS device dynamically). Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dss.c | 8 ++++---- drivers/gpu/drm/omapdrm/dss/dss.h | 14 ++++++++------ drivers/gpu/drm/omapdrm/dss/sdi.c | 13 ++++++++----- 3 files changed, 20 insertions(+), 15 deletions(-) commit 2726099921caab2473dca91c9ddc4f4a108f4c15 Author: Laurent Pinchart Date: Tue Feb 13 14:00:22 2018 +0200 drm: omapdrm: dss: Pass PLL pointer to dss_ctrl_pll_enable() This will allow accessing the PLL data to get the DSS device pointer, removing the need to access the global DSS private data. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dss.c | 13 +++++++------ drivers/gpu/drm/omapdrm/dss/dss.h | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi_pll.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/video-pll.c | 6 +++--- 4 files changed, 13 insertions(+), 12 deletions(-) commit 7b295257a13d827dac8c71af70e633c7ba722cfe Author: Laurent Pinchart Date: Tue Feb 13 14:00:21 2018 +0200 drm: omapdrm: dss: Pass DSS private structure to runtime PM functions To prepare for the removal of the global variable storing DSS private data, pass its pointer to the dss_runtime_{get,put}() functions. As this requires getting hold of the dss_device structure in the callers, we add a new dss_get_device() function to retrieve it. The function currently returns a pointer to the global data structure, and will later be updated to get the pointer from device driver data when the DSS private structure will be allocated dynamically. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dsi.c | 7 +++-- drivers/gpu/drm/omapdrm/dss/dss.c | 47 +++++++++++++++++++-------------- drivers/gpu/drm/omapdrm/dss/dss.h | 12 ++++++--- drivers/gpu/drm/omapdrm/dss/hdmi.h | 6 +++-- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 3 ++- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 3 ++- drivers/gpu/drm/omapdrm/dss/hdmi_pll.c | 10 ++++--- drivers/gpu/drm/omapdrm/dss/video-pll.c | 12 +++++---- 8 files changed, 61 insertions(+), 39 deletions(-) commit 0e546dfd3fa82c0d78cc12d04af9ee8d7cb07c29 Author: Laurent Pinchart Date: Tue Feb 13 14:00:20 2018 +0200 drm: omapdrm: dss: Expose DSS data in a dss_device structure The anoonymous dss structure in dss.c is the top-level component in the omapdss driver. As such it should store all internal instance-specific data that is currently stored in global variables. This however requires both naming the structure to pass it around functions, and accessing it from various locations in the omapdss driver. While we could implement get and set functions for every field that needs to be accessed outside of dss.c, that would introduce overhead and complexity that we could avoid by exposing the structure to internal components of the omapdss driver. Do so to prepare for removal of global variables. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/dss/dss.c | 29 +---------------------------- drivers/gpu/drm/omapdrm/dss/dss.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 28 deletions(-) commit a82f034765fa3e9db73b8ca99e8830f3bb31ac90 Author: Laurent Pinchart Date: Tue Feb 13 14:00:19 2018 +0200 drm: omapdrm: Split init and cleanup from probe and remove functions When merging the omapdrm and omapdss drivers there will be not omapdrm platform device anymore, and thus no associated probe and remove functions. To prepare for that, split all the initialization code from the probe function to make it usable without a platform device. Similarly, split the cleanup code from the remove function. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel drivers/gpu/drm/omapdrm/omap_drv.c | 83 +++++++++++++++++++++++--------------- drivers/gpu/drm/omapdrm/omap_drv.h | 2 + 2 files changed, 53 insertions(+), 32 deletions(-) commit bafa89fcac4fa4950ffde0b4f565482290176450 Author: Laurent Pinchart Date: Sun Feb 11 15:07:47 2018 +0200 drm: omapdrm: dsi: Make wait_for_bit_change() return a status The wait_for_bit_change() function returns the value of the bit it polls. This requires the caller to compare the return value to the expected bit value. As all the existing callers need is to check whether the bit has reached the expected value, it's easier to return a boolean status from the function. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dsi.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit eab7579e3570efb1c23cd82ad4559503e5b031f8 Author: Laurent Pinchart Date: Sun Feb 11 15:07:46 2018 +0200 drm: omapdrm: dss: Remove unused functions prototypes The omap_dss_register_driver(), omap_dss_unregister_driver() and dispc_enable_gamma_table() functions don't exist anymore, remove their prototypes. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dss.h | 1 - 1 file changed, 1 deletion(-) commit c581d16fc22d53a44017426399afb4d211d60d16 Author: Laurent Pinchart Date: Sun Feb 11 15:07:45 2018 +0200 drm: omapdrm: dss: Remove dss_get_hdmi_venc_clk_source() function The function is unused, remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dss.c | 14 -------------- drivers/gpu/drm/omapdrm/dss/dss.h | 1 - 2 files changed, 15 deletions(-) commit 215003b4ae1d47035092fef73b6a22aa82037091 Author: Laurent Pinchart Date: Sun Feb 11 15:07:44 2018 +0200 drm: omapdrm: dss: Move initialization code from component bind to probe There's no reason to delay initialization of most of the driver (such as mapping memory I/O, getting clocks or enabling runtime PM) to the component master bind handler. This additionally fixes a real PM issue caused enabling runtime PM in the bind handler. The bind handler performs the following sequence of PM operations: pm_runtime_enable(dev); pm_runtime_get_sync(dev); ... (access the hardware to read the device revision) ... pm_runtime_put_sync(dev); If a failure occurs at this point, the error path calls pm_runtime_disable() to balance the pm_runtime_enable() call. To understand the problem, it should be noted that the bind handler is called when one of the component registers itself, which happens in the component's probe handler. Furthermore, as the components are children of the DSS, the device core calls pm_runtime_get_sync() on the DSS platform device before calling the component's probe handler. This increases the DSS power usage count but doesn't runtime resume the device, as runtime PM is disabled at that point. The bind handler is thus called with runtime PM disabled, with the device runtime suspended, but with the power usage count larger than 0. The pm_runtime_get_sync() call will thus further increase the power usage count and runtime resume the device. The pm_runtime_put_sync() handler will decrease the power usage count to a non-zero value and will thus not suspend the device. Finally, the pm_runtime_disable() call will disable runtime PM, preventing the pm_runtime_put() call in the device core from runtime suspending the device. The DSS device is thus left powered on. To fix this, move the initialization code from the bind handler to the probe handler. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dss.c | 193 ++++++++++++++++++++------------------ 1 file changed, 104 insertions(+), 89 deletions(-) commit 00b8cb88e1c2f4df71d0ddcdaf9589c38c5659b3 Author: Laurent Pinchart Date: Sun Feb 11 15:07:43 2018 +0200 drm: omapdrm: dss: Don't export functions internal to omapdss-base A few functions defined in omapdss-base are internal to the module. Don't export them. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dss-of.c | 2 -- drivers/gpu/drm/omapdrm/dss/output.c | 1 - 2 files changed, 3 deletions(-) commit 8a9a5ac919ae8af9803b41f1693fa1ae636b261b Author: Laurent Pinchart Date: Sun Feb 11 15:07:42 2018 +0200 drm: omapdrm: dss: Make omapdss_default_get_timings static The function isn't used outside of its compilation unit, make it static. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/display.c | 5 ++--- drivers/gpu/drm/omapdrm/dss/omapdss.h | 3 --- 2 files changed, 2 insertions(+), 6 deletions(-) commit e28cea0feeda57ce49a8ca84db883814544460d2 Author: Laurent Pinchart Date: Sun Feb 11 15:07:41 2018 +0200 drm: omapdrm: displays: Get encoder source at connect time The encoder drivers need a handle to the source they are connected to in order to control the source. All drivers get that handle at probe time, resulting in probe deferral when the source hasn't been probed yet. However they don't need the handle until their connect handler is called. Move retrieval of the source handle to the connect handler to avoid probe deferrals. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/encoder-opa362.c | 35 ++++++------ drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c | 36 ++++++------ .../gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 66 ++++++++-------------- 3 files changed, 54 insertions(+), 83 deletions(-) commit 2f8c4a8a9d4b65d296fd5ccd0c5ba7ad5cbcb931 Author: Laurent Pinchart Date: Sun Feb 11 15:07:40 2018 +0200 drm: omapdrm: displays: Get panel source at connect time The connector drivers need a handle to the source they are connected to in order to control the source. All drivers get that handle at probe time, resulting in probe deferral when the source hasn't been probed yet. However they don't need the handle until their connect handler is called. Move retrieval of the source handle to the connect handler to avoid probe deferrals. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 34 +++++++--------- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 27 +++++++------ .../omapdrm/displays/panel-lgphilips-lb035q02.c | 35 +++++++--------- .../drm/omapdrm/displays/panel-nec-nl8048hl11.c | 39 ++++++++---------- .../drm/omapdrm/displays/panel-sharp-ls037v7dw01.c | 35 +++++++--------- .../drm/omapdrm/displays/panel-sony-acx565akm.c | 26 ++++++------ .../drm/omapdrm/displays/panel-tpo-td028ttec1.c | 46 +++++++--------------- .../drm/omapdrm/displays/panel-tpo-td043mtea1.c | 29 +++++++------- 8 files changed, 119 insertions(+), 152 deletions(-) commit b47e6dcb58becb3e5b0b4f3e05ff3626d5b77437 Author: Laurent Pinchart Date: Sun Feb 11 15:07:39 2018 +0200 drm: omapdrm: displays: Get connector source at connect time The connector drivers need a handle to the source they are connected to in order to control the source. All drivers get that handle at probe time, resulting in probe deferral when the source hasn't been probed yet. However they don't need the handle until their connect handler is called. Move retrieval of the source handle to the connect handler to avoid probe deferrals. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen .../gpu/drm/omapdrm/displays/connector-analog-tv.c | 45 ++++++++-------------- drivers/gpu/drm/omapdrm/displays/connector-dvi.c | 31 +++++++-------- drivers/gpu/drm/omapdrm/displays/connector-hdmi.c | 37 ++++++++---------- 3 files changed, 46 insertions(+), 67 deletions(-) commit 6b06df832f82946825aa1d81e1e64041d33570f0 Author: Laurent Pinchart Date: Sun Feb 11 15:07:38 2018 +0200 drm: omapdrm: displays: Remove OF node check in panel drivers No panel is instantiated through platform data anymore, there is no need to check for OF node presence. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 3 --- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 3 --- drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c | 3 --- drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c | 3 --- drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c | 3 --- drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c | 3 --- drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c | 3 --- drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c | 3 --- 8 files changed, 24 deletions(-) commit 1a5d98a7de05fe6181aae60ce82591d711f08bc2 Author: Laurent Pinchart Date: Sun Feb 11 15:07:37 2018 +0200 drm: omapdrm: displays: Remove OF node check in encoder drivers No encoder is instantiated through platform data anymore, there is no need to check for OF node presence. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/encoder-opa362.c | 5 ----- drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c | 3 --- drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 3 --- 3 files changed, 11 deletions(-) commit ae9f7a57964ecac3314947b26dbf8da20bafe5b3 Author: Laurent Pinchart Date: Sun Feb 11 15:07:36 2018 +0200 drm: omapdrm: displays: Remove OF node check in connector drivers No connector is instantiated through platform data anymore, there is no need to check for OF node presence. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c | 3 --- drivers/gpu/drm/omapdrm/displays/connector-dvi.c | 3 --- drivers/gpu/drm/omapdrm/displays/connector-hdmi.c | 3 --- 3 files changed, 9 deletions(-) commit 8cd175778b17bb76b535d13b6e9a1720b35bc474 Author: Laurent Pinchart Date: Sun Feb 11 15:07:35 2018 +0200 drm: omapdrm: connector-analog-tv: Remove tvc_of_match forward declaration The tvc_of_match variable is never referenced before its definition. Remove the forward declaration. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c | 2 -- 1 file changed, 2 deletions(-) commit d11e5c827a4dbbb4174087669e3c7d231570985b Author: Laurent Pinchart Date: Sun Feb 11 15:07:34 2018 +0200 drm: omapdrm: Use unsigned int type The kernel favours 'unsigned int' over plain 'unsigned'. Replace all occurences of the latter by the former. This avoid lots of checkpatch complaints in patches that touch lines where a plain 'unsigned' is used. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 8 +- .../drm/omapdrm/displays/panel-sony-acx565akm.c | 6 +- drivers/gpu/drm/omapdrm/dss/dispc.c | 25 +++--- drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 98 +++++++++++----------- drivers/gpu/drm/omapdrm/dss/dss.c | 12 +-- drivers/gpu/drm/omapdrm/dss/dss.h | 12 +-- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 24 +++--- drivers/gpu/drm/omapdrm/dss/hdmi_phy.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi_wp.c | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 4 +- drivers/gpu/drm/omapdrm/dss/pll.c | 4 +- 14 files changed, 102 insertions(+), 101 deletions(-) commit dfe9cfccb264889b025e443ca20e2fbb401295c2 Author: Laurent Pinchart Date: Sun Feb 11 15:07:33 2018 +0200 drm: omapdrm: Use kernel integer types The standard kernel integer types are [us]{8,16,32}. Use them instead of the u?int{8,16,32}_t types. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 12 ++++----- drivers/gpu/drm/omapdrm/omap_crtc.h | 2 +- drivers/gpu/drm/omapdrm/omap_dmm_priv.h | 10 +++---- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 46 ++++++++++++++++---------------- drivers/gpu/drm/omapdrm/omap_dmm_tiler.h | 22 +++++++-------- drivers/gpu/drm/omapdrm/omap_drv.h | 4 +-- drivers/gpu/drm/omapdrm/omap_fb.c | 18 ++++++------- drivers/gpu/drm/omapdrm/omap_gem.c | 41 +++++++++++++++------------- drivers/gpu/drm/omapdrm/omap_gem.h | 16 +++++------ drivers/gpu/drm/omapdrm/omap_irq.c | 6 ++--- drivers/gpu/drm/omapdrm/omap_irq.h | 2 +- drivers/gpu/drm/omapdrm/omap_plane.c | 4 +-- drivers/gpu/drm/omapdrm/tcm-sita.c | 12 ++++----- drivers/gpu/drm/omapdrm/tcm.h | 4 +-- 14 files changed, 101 insertions(+), 98 deletions(-) commit f073d78eeb8efd85718e611c15f9a78647751dea Merge: 0feeb10 fed81658 Author: Dave Airlie Date: Thu Mar 1 14:07:22 2018 +1000 Merge tag 'drm-intel-next-2018-02-21' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Driver Changes: - Lift alpha_support protection from Cannonlake (Rodrigo) * Meaning the driver should mostly work for the hardware we had at our disposal when testing * Used to be preliminary_hw_support - Add missing Cannonlake PCI device ID of 0x5A4C (Rodrigo) - Cannonlake port register fix (Mahesh) - Fix Dell Venue 8 Pro black screen after modeset (Hans) - Fix for always returning zero out-fence from execbuf (Daniele) - Fix HDMI audio when no no relevant video output is active (Jani) - Fix memleak of VBT data on driver_unload (Hans) - Fix for KASAN found locking issue (Maarten) - RCU barrier consolidation to improve igt/gem_sync/idle (Chris) - Optimizations to IRQ handlers (Chris) - vblank tracking improvements (64-bit resolution, PM) (Dhinakaran) - Pipe select bit corrections (Ville) - Reduce runtime computed device_info fields (Chris) - Tune down some WARN_ONs to GEM_BUG_ON now that CI has good coverage (Chris) - A bunch of kerneldoc warning fixes (Chris) * tag 'drm-intel-next-2018-02-21' of git://anongit.freedesktop.org/drm/drm-intel: (113 commits) drm/i915: Update DRIVER_DATE to 20180221 drm/i915/fbc: Use PLANE_HAS_FENCE to determine if the plane is fenced drm/i915/fbdev: Use the PLANE_HAS_FENCE flags from the time of pinning drm/i915: Move the policy for placement of the GGTT vma into the caller drm/i915: Also check view->type for a normal GGTT view drm/i915: Drop WaDoubleCursorLP3Latency:ivb drm/i915: Set the primary plane pipe select bits on gen4 drm/i915: Don't set cursor pipe select bits on g4x+ drm/i915: Assert that we don't overflow frontbuffer tracking bits drm/i915: Track number of pending freed objects drm/i915/: Initialise trans_min for skl_compute_transition_wm() drm/i915: Clear the in-use marker on execbuf failure drm/i915: Prune gen8_gt_irq_handler drm/i915: Track GT interrupt handling using the master iir drm/i915: Remove WARN_ONCE for failing to pm_runtime_if_in_use drm: intel_dpio_phy: fix kernel-doc comments at nested struct drm/i915: Release connector iterator on a digital port conflict. drm/i915/execlists: Remove too early assert drm/i915: Assert that we always complete a submission to guc/execlists drm: move read_domains and write_domain into i915 ... commit 0feeb106c79532074b370c3cb45f742ef4302cc6 Merge: 8bb5b22 7f78c3d Author: Dave Airlie Date: Thu Mar 1 14:04:30 2018 +1000 Merge tag 'tilcdc-4.17' of https://github.com/jsarha/linux into drm-next drm/tilcdc changes to v4.17 * tag 'tilcdc-4.17' of https://github.com/jsarha/linux: drm/tilcdc: tilcdc_panel: Rename device from "panel" to "tilcdc-panel" drm/tilcdc: Add support for drm panels drm/tilcdc: panel: Use common error handling code in of_get_panel_info() drm/tilcdc: Delete an error message for a failed memory allocation in seven functions commit 695eea3d2c7f3e70e852226c338d464a6251c70b Author: Tony Lindgren Date: Thu Feb 22 14:05:31 2018 -0800 ARM: OMAP2+: Enable ti-sysc to use device tree data for smartreflex Let's enable ti-sysc probing of child devices. So far we have only used ti-sysc to probe interconnect target modules to idle them for cases where the SoC does not have any child devices configured for the module, such as smartreflex on dra7. As we have smartreflex driver configured in the device tree for some SoCs, we need to flip things on with a single patch to prevent both omap_device and ti-sysc to probe smartreflex. So let's stop probing smartreflex with omap_device and probe it with ti-sysc by enabling passing the auxdata. Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_device.c | 5 +++++ arch/arm/mach-omap2/pdata-quirks.c | 1 + arch/arm/mach-omap2/sr_device.c | 25 ++++++++++++++----------- 3 files changed, 20 insertions(+), 11 deletions(-) commit a25724b05af0e38232764fc0d0f984254e4b5c41 Merge: 2927499 5e5d6fe Author: David S. Miller Date: Wed Feb 28 22:45:05 2018 -0500 Merge branch 'fib_rules-support-sport-dport-and-proto-match' Roopa Prabhu says: ==================== fib_rules: support sport, dport and proto match This series extends fib rule match support to include sport, dport and ip proto match (to complete the 5-tuple match support). Common use-cases of Policy based routing in the data center require 5-tuple match. The last 2 patches in the series add a call to flow dissect in the fwd path if required by the installed fib rules (controlled by a flag). v1: - Fix errors reported by kbuild and feedback on RFC - extend port match uapi to accomodate port ranges v2: - address comments from Nikolay, David Ahern and Paolo (Thanks!) Pending things I will submit separate patches for: - extack for fib rules - fib rules test (as requested by david ahern) ==================== Signed-off-by: David S. Miller commit 5e5d6fed374155ba1a7a5ca5f12fbec2285d06a2 Author: Roopa Prabhu Date: Wed Feb 28 22:43:22 2018 -0500 ipv6: route: dissect flow in input path if fib rules need it Dissect flow in fwd path if fib rules require it. Controlled by a flag to avoid penatly for the common case. Flag is set when fib rules with sport, dport and proto match that require flow dissect are installed. Also passes the dissected hash keys to the multipath hash function when applicable to avoid dissecting the flow again. icmp packets will continue to use inner header for hash calculations. Signed-off-by: Roopa Prabhu Acked-by: Paolo Abeni Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/net/ip6_fib.h | 25 +++++++++++++++++++++++++ include/net/ip6_route.h | 4 +++- include/net/netns/ipv6.h | 3 ++- net/ipv6/fib6_rules.c | 16 ++++++++++++++++ net/ipv6/icmp.c | 2 +- net/ipv6/route.c | 34 +++++++++++++++++++++++++--------- 6 files changed, 72 insertions(+), 12 deletions(-) commit e37b1e978bec5334dc379d8c2423d063af207430 Author: Roopa Prabhu Date: Wed Feb 28 22:42:41 2018 -0500 ipv6: route: dissect flow in input path if fib rules need it Dissect flow in fwd path if fib rules require it. Controlled by a flag to avoid penatly for the common case. Flag is set when fib rules with sport, dport and proto match that require flow dissect are installed. Also passes the dissected hash keys to the multipath hash function when applicable to avoid dissecting the flow again. icmp packets will continue to use inner header for hash calculations (Thanks to Nikolay Aleksandrov for some review here). Signed-off-by: Roopa Prabhu Acked-by: Paolo Abeni Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/net/ip_fib.h | 27 ++++++++++++++++++++++++++- include/net/netns/ipv4.h | 1 + net/ipv4/fib_rules.c | 8 ++++++++ net/ipv4/fib_semantics.c | 2 +- net/ipv4/route.c | 43 +++++++++++++++++++++++++++++-------------- 5 files changed, 65 insertions(+), 16 deletions(-) commit bb0ad1987e963e47a02cc53b8275ffe2b38d4b70 Author: Roopa Prabhu Date: Wed Feb 28 22:41:37 2018 -0500 ipv6: fib6_rules: support for match on sport, dport and ip proto support to match on src port, dst port and ip protocol. Signed-off-by: Roopa Prabhu Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/ipv6/fib6_rules.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 4a2d73a4fb36ed4d73967bd3892cfab014a52ab2 Author: Roopa Prabhu Date: Wed Feb 28 22:41:06 2018 -0500 ipv4: fib_rules: support match on sport, dport and ip proto support to match on src port, dst port and ip protocol. Signed-off-by: Roopa Prabhu Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/ipv4/fib_rules.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit bfff4862653bb96001ab57c1edd6d03f48e5f035 Author: Roopa Prabhu Date: Wed Feb 28 22:40:16 2018 -0500 net: fib_rules: support for match on ip_proto, sport and dport uapi for ip_proto, sport and dport range match in fib rules. Signed-off-by: Roopa Prabhu Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/net/fib_rules.h | 36 ++++++++++++++++- include/uapi/linux/fib_rules.h | 8 ++++ net/core/fib_rules.c | 92 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 133 insertions(+), 3 deletions(-) commit c08be1ad96ccdb7df63c7c9146ce1808bec20d2f Author: Fabio Estevam Date: Tue Feb 27 23:13:35 2018 -0300 ARM: dts: imx5: Pass the memory unit-address Pass the memory unit-address to fix the following build warnings with W=1: arch/arm/boot/dts/imx51-zii-rdu1.dtb: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name arch/arm/boot/dts/imx53-tx53-x03x.dtb: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name arch/arm/boot/dts/imx53-tx53-x13x.dtb: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name In theses cases an empty memory node is passed, which will be filled by the bootloader. Passing the memory base address still allows the bootloader to fill the memory size. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx51-zii-rdu1.dts | 4 ++-- arch/arm/boot/dts/imx53-tx53.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 2ad1ec0d2fddcb9cf17632dacf4d70c81a0c49e7 Author: Tony Lindgren Date: Fri Feb 23 10:03:28 2018 -0800 PM / AVS: SmartReflex: Prepare to use device tree based probing We are currently probing smartreflex with omap_device while we are already probing smartreflex related interconnect target module with ti-sysc driver and dts data. Before we can flip things on for ti-sysc, we need to prepare the smartreflex driver a bit: 1. The smartreflex clock is really for the whole interconnect target module. So it may be configured at the parent device level with ti-sysc 2. With ti-sysc, we have the child device manage interconnect target module directly if pm_runtime_irq_safe() is set and there is only one child. In that case nobody else is going to call pm_runtime_get and put, so we need to add these calls to idle smartreflex properly after probe if not fully configured 3. With ti-sysc, the parent driver may rebind. So we want to use platform_driver_register() and don't want probe to be __init Note that this patch depends on the related changes to ti-sysc driver and omap_device probing to prevent both ti-sysc and omap_device to try to probe smartreflex. Cc: linux-pm@vger.kernel.org Cc: Rafael J. Wysocki Acked-by: Kevin Hilman Signed-off-by: Tony Lindgren drivers/power/avs/smartreflex.c | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) commit 15618256224769621b2c2300f66ad9513135ffaa Author: Tony Lindgren Date: Thu Feb 22 14:04:25 2018 -0800 ARM: OMAP2+: Try to parse earlycon from parent too With ti-sysc driver the "ti,hwmods" property will be moved to the interconnect target module instead of the child device. To keep earlycon working, we need to match against the interconnect target module in the ti-sysc case. Cc: Paul Walmsley Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a88443068572aaa79048bc19c741e0edae17faa7 Author: Tony Lindgren Date: Fri Feb 23 08:59:23 2018 -0800 ARM: OMAP2+: Add checks for device tree based sysconfig data We can check the device tree based sysconfig data against the existing platform data to make sure we're not introducing regressions. Then at some point after the sysconfig data comes from device tree, we can just drop the related platform data. Cc: Paul Walmsley Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod.c | 109 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 106 insertions(+), 3 deletions(-) commit 8c87970543b17adfbd829ec1541c72a7da518acf Author: Tony Lindgren Date: Thu Feb 22 14:04:56 2018 -0800 ARM: OMAP2+: Add functions to allocate module data from device tree We can have ti-sysc driver manage the interconnect target module via platform data callback functions to hwmod code. This allows initializing and idling the devices using dts data instead of the legacy static data for interconnect target modules. Let's add functions to configure the module sysconfig data with platform callbacks from ti-sysc driver. Cc: Paul Walmsley Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod.c | 309 ++++++++++++++++++++++++++++++++++++++- arch/arm/mach-omap2/omap_hwmod.h | 7 + 2 files changed, 315 insertions(+), 1 deletion(-) commit 80836d3c273275e49f722cc2c7e20252e7d2a348 Author: Shawn Guo Date: Sat Feb 24 14:59:29 2018 +0800 arm64: dts: ls1046a: add a dummy memory 'reg' property The memory node in fsl-ls1046a.dtsi has no 'reg' property, and causes the dtc warning below. Warning (unit_address_vs_reg): Node /memory@80000000 has a unit name, but no reg property Let's add a 'reg' property with dummy memory size, since bootloader will need to fill the correct one per board memory configuration anyway. Cc: Mingkai Hu Signed-off-by: Shawn Guo Acked-by: Li Yang arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit b716aad97eb5119e73cec351179c3a23f96c7aaa Author: Anson Huang Date: Thu Jan 4 01:09:21 2018 +0800 clk: imx: imx7d: correct video pll clock tree There is a test divider and post divider in video PLL, test divider is placed before post divider, all clocks that can select parent from video PLL should be from post divider, NOT from pll_video_main, below are clock tree dump before and after this patch: Before: pll_video_main pll_video_main_bypass pll_video_main_clk lcdif_pixel_src lcdif_pixel_cg lcdif_pixel_pre_div lcdif_pixel_post_div lcdif_pixel_root_clk After: pll_video_main pll_video_main_bypass pll_video_main_clk pll_video_test_div pll_video_post_div lcdif_pixel_src lcdif_pixel_cg lcdif_pixel_pre_div lcdif_pixel_post_div lcdif_pixel_root_clk Signed-off-by: Anson Huang Reviewed-by: Fabio Estevam Acked-by: Dong Aisheng Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx7d.c | 84 ++++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 40 deletions(-) commit 5e747dd9be54be190dd6ebeebf4a4a01ba765625 Author: Rasmus Villemoes Date: Thu Mar 1 00:22:47 2018 +0100 drivers/char/random.c: remove unused dont_count_entropy Ever since "random: kill dead extract_state struct" [1], the dont_count_entropy member of struct timer_rand_state has been effectively unused. Since it hasn't found a new use in 12 years, it's probably safe to finally kill it. [1] Pre-git, https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/?id=c1c48e61c251f57e7a3f1bf11b3c462b2de9dcb5 Signed-off-by: Rasmus Villemoes Signed-off-by: Theodore Ts'o drivers/char/random.c | 53 ++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 28 deletions(-) commit 437fe668ab5ecdfd312605b0da15cf9138101d3f Merge: 7928b2c bb9d91a4 Author: Florian Fainelli Date: Wed Feb 28 15:36:51 2018 -0800 Merge tag 'bcm2835-defconfig-next-2018-02-28' into defconfig/next This pull request enables several recent drivers for the Raspberry Pi family in the defconfigs (thermal, BT, aux serial). Signed-off-by: Florian Fainelli commit 4a78f71c329ebfa59fa5a051eecf32fea7c8cbb5 Merge: 7928b2c bcc76c4 Author: Florian Fainelli Date: Wed Feb 28 15:34:49 2018 -0800 Merge tag 'bcm2835-dt-next-2018-02-28' into devicetree/next This pull request adds automatic BT probing to the Pi Zero W, OTG mode for the Zero W, the GPIO expander on the Pi3, and fixes I2S probe (which is disabled by default, but often used downstream) Signed-off-by: Florian Fainelli commit 46e15a2a71e5c6252859e4ade38b7fdbb897a7a1 Author: David Woodhouse Date: Mon Feb 19 13:02:33 2018 +0000 xtensa/PCI: Use generic pci_mmap_resource_range() Commit f719582435 ("PCI: Add pci_mmap_resource_range() and use it for ARM64") added this generic function with the intent of using it everywhere and ultimately killing the old arch-specific implementations. Remove the xtensa-specific pci_mmap_page_range() and use the generic pci_mmap_resource_range() instead. Xtensa can mmap I/O port space, so supply the xtensa-specific pci_iobar_pfn() required to make that work. Signed-off-by: David Woodhouse [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Acked-by: Max Filippov arch/xtensa/include/asm/pci.h | 7 ++-- arch/xtensa/kernel/pci.c | 94 ++++--------------------------------------- 2 files changed, 12 insertions(+), 89 deletions(-) commit e8e8a2e47db6bb85bb0cb21e77b5c6aaedf864b4 Author: Andi Kleen Date: Wed Feb 28 13:43:28 2018 -0800 random: optimize add_interrupt_randomness add_interrupt_randomess always wakes up code blocking on /dev/random. This wake up is done unconditionally. Unfortunately this means all interrupts take the wait queue spinlock, which can be rather expensive on large systems processing lots of interrupts. We saw 1% cpu time spinning on this on a large macro workload running on a large system. I believe it's a recent regression (?) Always check if there is a waiter on the wait queue before waking up. This check can be done without taking a spinlock. 1.06% 10460 [kernel.vmlinux] [k] native_queued_spin_lock_slowpath | ---native_queued_spin_lock_slowpath | --0.57%--_raw_spin_lock_irqsave | --0.56%--__wake_up_common_lock credit_entropy_bits add_interrupt_randomness handle_irq_event_percpu handle_irq_event handle_edge_irq handle_irq do_IRQ common_interrupt Signed-off-by: Andi Kleen Signed-off-by: Theodore Ts'o drivers/char/random.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 25e3fca492035a2e1d4ac6e3b1edd9c1acd48897 Author: Jason A. Donenfeld Date: Sun Feb 4 23:07:46 2018 +0100 random: always fill buffer in get_random_bytes_wait In the unfortunate event that a developer fails to check the return value of get_random_bytes_wait, or simply wants to make a "best effort" attempt, for whatever that's worth, it's much better to still fill the buffer with _something_ rather than catastrophically failing in the case of an interruption. This is both a defense in depth measure against inevitable programming bugs, as well as a means of making the API a bit more useful. Signed-off-by: Jason A. Donenfeld Signed-off-by: Theodore Ts'o include/linux/random.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5fe3c0fa0d54877c65e7c9b4442aeeb25cdf469a Author: Adam Ford Date: Thu Feb 15 08:25:56 2018 -0600 ARM: dts: Add pinmuxing for i2c2 and i2c3 for LogicPD SOM-LV Since I2C1 and I2C4 have explicit pinmuxing set, let's be on the safe side and set the pin muxing for I2C2 and I2C3. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-som-lv.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 9f886f4d1d292442b2f22a0a33321eae821bde40 Author: Theodore Ts'o Date: Sat Feb 25 18:21:33 2017 -0400 random: use a tighter cap in credit_entropy_bits_safe() This fixes a harmless UBSAN where root could potentially end up causing an overflow while bumping the entropy_total field (which is ignored once the entropy pool has been initialized, and this generally is completed during the boot sequence). This is marginal for the stable kernel series, but it's a really trivial patch, and it fixes UBSAN warning that might cause security folks to get overly excited for no reason. Signed-off-by: Theodore Ts'o Reported-by: Chen Feng Cc: stable@vger.kernel.org drivers/char/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a135a392acbec7ecda782981788e8c03767a1571 Author: Adam Ford Date: Thu Feb 15 08:25:55 2018 -0600 ARM: dts: Add pinmuxing for i2c2 and i2c3 for LogicPD torpedo Since I2C1 and I2C4 have explicit pinmuxing set, let's be on the safe side and set the pin muxing for I2C2 and I2C3. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e33509c19da5931e4363c85f6e83bd11803ba121 Author: Tony Lindgren Date: Fri Feb 9 09:43:38 2018 -0800 ARM: OMAP2+: Fix typo for wakeup_ns_pa_addr This is in bank1, not in bank3. Cc: Tero Kristo Cc: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap4-sar-layout.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2402ff05c6e6ba21ddc7938f21464f2a0b66e744 Author: Tony Lindgren Date: Fri Feb 9 09:40:19 2018 -0800 ARM: OMAP2+: Use v7_invalidate_l1 in omap4_finish_suspend We can use just v7_invalidate_l1 here instead of v7_flush_dcache_all like the comments say. Cc: Tero Kristo Cc: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/mach-omap2/sleep44xx.S | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 18aa0f4bca701cb078a6d58a3ed804aa6a4690c7 Author: Kishon Vijay Abraham I Date: Tue Feb 6 18:28:04 2018 +0530 ARM: dts: am57xx-idk: Select pull down for mmc1_clk line in default mode During a short period when the bus voltage is switched from 3.3v to 1.8v, (to enumerate UHS mode), the mmc module is disabled and the mmc IO lines are kept in a state according to the programmed pad mux pull type. According to 4.2.4.2 Timing to Switch Signal Voltage in "SD Specifications Part 1 Physical Layer Specification Version 5.00 February 22, 2016", the host should hold CLK low for at least 5ms. In order to keep the card line low during voltage switch, the pad mux of mmc1_clk line should be configured to pull down. This is specific to am57xx-idk (and not all dra72/dra74 based boards) since mmc1_clk line in am57xx-idk is not connected to an external pullup. While at that change the order of header files in am571x-idk.dts and am572x-idk.dts so that the modified pinctrl values in am57xx-idk-common could take effect. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/boot/dts/am571x-idk.dts | 2 +- arch/arm/boot/dts/am572x-idk.dts | 3 +-- arch/arm/boot/dts/am57xx-idk-common.dtsi | 11 +++++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) commit 0e43884cca77218d2eccc331396e8cc1f41262a4 Author: Kishon Vijay Abraham I Date: Tue Feb 6 18:28:03 2018 +0530 ARM: dts: dra71-evm: Select pull down for mmc1_clk line in default mode During a short period when the bus voltage is switched from 3.3v to 1.8v, (to enumerate UHS mode), the mmc module is disabled and the mmc IO lines are kept in a state according to the programmed pad mux pull type. According to 4.2.4.2 Timing to Switch Signal Voltage in "SD Specifications Part 1 Physical Layer Specification Version 5.00 February 22, 2016", the host should hold CLK low for at least 5ms. In order to keep the card line low during voltage switch, the pad mux of mmc1_clk line should be configured to pull down. This is specific only to dra71-evm (and not all dra72 based boards) since mmc1_clk line in dra71-evm is not connected to an external pullup. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra71-evm.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit f4aa1bd5b4fc80f5f4ecd184caad832fd62c25f7 Author: Ravikumar Kattekola Date: Tue Feb 6 18:28:02 2018 +0530 ARM: dts: dra71-evm: Correct evm_sd regulator max voltage Correct vpo_sd_1v8_3v3 regulator max voltage to 3.3V Fixes: 9868bc585ae2 ("ARM: dts: Add support for dra718-evm") Signed-off-by: Ravikumar Kattekola Signed-off-by: Sekhar Nori Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra71-evm.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1eab48f376c781806d41772bfb55e4c0a84af392 Author: Kishon Vijay Abraham I Date: Tue Feb 6 18:28:01 2018 +0530 ARM: dts: dra76-evm: Add "vqmmc-supply" property for mmc2 Add "vqmmc-supply" property for mmc2 to indicate the supply connected to the IO lines. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra76-evm.dts | 1 + 1 file changed, 1 insertion(+) commit 4dd7f7a71dbcd9d7a0a8a9a4fceadca40567928d Author: Kishon Vijay Abraham I Date: Tue Feb 6 18:28:00 2018 +0530 ARM: dts: am57xx-idk: Add "vqmmc-supply" property for mmc2 Add "vqmmc-supply" property for mmc2 to indicate the supply connected to the IO lines. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-idk-common.dtsi | 1 + 1 file changed, 1 insertion(+) commit a9aa4e6e4f4fdd6bb7299f61efa8b4ea9ded4462 Author: Kishon Vijay Abraham I Date: Tue Feb 6 18:27:59 2018 +0530 ARM: dts: dra7-evm: Add "vqmmc-supply" property for mmc2 Add "vqmmc-supply" property for mmc2 to indicate the supply connected to the IO lines. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7-evm.dts | 1 + 1 file changed, 1 insertion(+) commit bcce7918e66c53426a5dd286ab709f351e7483d7 Author: Kishon Vijay Abraham I Date: Tue Feb 6 18:27:58 2018 +0530 ARM: dts: dra7-evm: Remove mmc specific pinmux mmc specific pinmux is selected from dra74x-mmc-iodelay.dtsi, so remove it in dra7-evm.dts Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7-evm.dts | 27 --------------------------- 1 file changed, 27 deletions(-) commit 3df7e0f3981a81263992f82ce67253d430b58feb Author: Kishon Vijay Abraham I Date: Tue Feb 6 18:27:57 2018 +0530 ARM: dts: am57xx-beagle-x15: Add "vqmmc-supply" property for mmc2 Add "vqmmc-supply" property for mmc2 to indicate the supply connected to the IO lines. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 1 + 1 file changed, 1 insertion(+) commit 0ec76a63e54e1537765f4db9874fd22c632f0bde Author: Sekhar Nori Date: Tue Feb 6 18:27:56 2018 +0530 ARM: dts: dra76-evm: Add pinctrl data for higher speed MMC/SD modes The SD card interface on DRA76x EVM can support high speed SD cards. The eMMC onboard can support upto HS200 mode. Enable support for these higher speed modes in the device-tree file. Signed-off-by: Sekhar Nori Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra76-evm.dts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d48bea57328b8aa3e0b7b95c6dc1e73d25febdeb Author: Sekhar Nori Date: Tue Feb 6 18:27:55 2018 +0530 ARM: dts: dra76-evm: Shift to using common IOdelay data Now that we have a device-tree include file with common MMC/SD IOdelay data for DRA76x SoC, shift the EVM device-tree file to using that. Tested-by: Jean-Jacques Hiblot Signed-off-by: Sekhar Nori Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra76-evm.dts | 41 +---------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) commit 008599e2af823930ba9d19ffa6eedf0979ca644a Author: Sekhar Nori Date: Tue Feb 6 18:27:54 2018 +0530 ARM: dts: dra76x: Create a common file with MMC/SD IOdelay data Add a common device-tree include file with MMC/SD IOdelay data for DRA76x SoC. In the most common case, IOdelay data available in datamanual can directly be used. This file caters to that common case. Data is based on DRA76x datamanual, SPRS993A, revised July 2017. Tested-by: Jean-Jacques Hiblot Signed-off-by: Sekhar Nori Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra76x-mmc-iodelay.dtsi | 285 ++++++++++++++++++++++++++++++ 1 file changed, 285 insertions(+) commit 5bfd9c8e7bfcba36bfbe24e967bf42de83c7f56c Author: Kishon Vijay Abraham I Date: Tue Feb 6 18:27:53 2018 +0530 ARM: omap2plus_defconfig: Enable CONFIG_MMC_SDHCI_OMAP Enable CONFIG_MMC_SDHCI_OMAP so that TI's dra7 based SoC's can use sdhci-omap driver for eMMC/SD/SDIO controller. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 1b75c1934a65df63cec158e6af47cf85b34dfcdd Author: Kishon Vijay Abraham I Date: Tue Feb 6 18:27:52 2018 +0530 ARM: multi_v7_defconfig: Enable CONFIG_MMC_SDHCI_OMAP Enable CONFIG_MMC_SDHCI_OMAP so that TI's dra7/k2g based SoC's can use sdhci-omap for eMMC/SD/SDIO controller.. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 28f8f1833be700c95cf9cb198c788649db0b3b65 Author: David Woodhouse Date: Mon Feb 19 12:59:51 2018 +0000 powerpc/pci: Use generic pci_mmap_resource_range() Commit f719582435 ("PCI: Add pci_mmap_resource_range() and use it for ARM64") added this generic function with the intent of using it everywhere and ultimately killing the old arch-specific implementations. Remove the powerpc-specific pci_mmap_page_range() and use the generic pci_mmap_resource_range() instead. Powerpc can mmap I/O port space, so supply the powerpc-specific pci_iobar_pfn() required to make that work. Signed-off-by: David Woodhouse [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas arch/powerpc/include/asm/pci.h | 9 ++-- arch/powerpc/kernel/pci-common.c | 106 ++++----------------------------------- 2 files changed, 15 insertions(+), 100 deletions(-) commit 58a54f03e73d67432216931854363e4ba15839b9 Author: Ladislav Michl Date: Fri Feb 23 11:15:01 2018 +0100 clocksource: timer-ti-dm: Check prescaler value Invalid value silently disables use of the prescaler. Use -1 explicitely for that purpose and error out on invalid value. Signed-off-by: Ladislav Michl Signed-off-by: Tony Lindgren drivers/clocksource/timer-ti-dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ad6e4b6fdc99ebbd520d2faf3c6d48198c74a99b Author: Ladislav Michl Date: Fri Feb 23 11:14:22 2018 +0100 clocksource: timer-ti-dm: Consolidate set source Reorder omap_dm_timer_set_source internals to get source verification more straightforward. Signed-off-by: Ladislav Michl Signed-off-by: Tony Lindgren drivers/clocksource/timer-ti-dm.c | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) commit 592ea6bd1fad6068fb7d813d36cfd832313f4421 Author: Ladislav Michl Date: Wed Feb 28 08:25:19 2018 +0100 clocksource: timer-ti-dm: Make unexported functions static As dmtimer no longer exports functions, make those previously exported static (this requires few functions to be moved around as their prototypes were deleted). Signed-off-by: Ladislav Michl Signed-off-by: Tony Lindgren drivers/clocksource/timer-ti-dm.c | 224 +++++++++++++++++++------------------- include/clocksource/timer-ti-dm.h | 33 ------ 2 files changed, 115 insertions(+), 142 deletions(-) commit 229675d5c0384c170c665387c2fec75a2ddcb61a Author: Jani Nikula Date: Tue Feb 27 12:59:11 2018 +0200 drm/i915/dp: move link rate arrays where they're used Localize link rate arrays by moving them to the functions where they're used. Further clarify the distinction between source and sink capabilities. Split pre and post Haswell arrays, and get rid of the array size arithmetics. Use a direct rate value in the paranoia case of no common rates find. Cc: Manasi Navare Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180227105911.4485-1-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dp.c | 44 +++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 17 deletions(-) commit 04875177dbe034055f23960981ecf6fb8ea1d638 Author: Sinan Kaya Date: Mon Jan 22 15:12:01 2018 -0500 PCI/ASPM: Don't warn if already in common clock mode Previously we emitted a warning if we tried to configure common clock mode the link was already configured to common clock mode by the UEFI BIOS. Bail out silently in that case instead of emitting the warning: pci 0004:00:00.0: ASPM: Could not configure common clock Signed-off-by: Sinan Kaya [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas drivers/pci/pcie/aspm.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit c33bab622d47b7db55b387096c1a5c8e02f5bf37 Author: Hernán Gonzalez Date: Tue Feb 27 19:07:58 2018 -0300 IB/rxe: Remove unused variable (char *rxe_qp_state_name[]) Note: This is compile only tested as I have no access to the hw. This variable was not used anywhere in the code. Removing it saves 24 bytes. add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-24 (-24) Function old new delta rxe_qp_state_name 24 - -24 Total: Before=3348732, After=3348708, chg -0.00% Signed-off-by: Hernán Gonzalez Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_qp.c | 9 --------- drivers/infiniband/sw/rxe/rxe_verbs.h | 2 -- 2 files changed, 11 deletions(-) commit 7f566a91b126075953949dbfe28a7221e9703aff Author: Hernán Gonzalez Date: Tue Feb 27 19:05:43 2018 -0300 IB/qib: Move char *qib_sdma_state_names[] and constify while there. Note: This is compile only tested as I have no access to the hw. This variable was not used in qib_sdma.c but in qib_iba7322.c. Declaring it there, as static, saves 56 bytes. add/remove: 0/2 grow/shrink: 0/0 up/down: 0/-144 (-144) Function old new delta qib_sdma_state_names 56 - -56 qib_sdma_event_names 88 - -88 Total: Before=2874565, After=2874421, chg -0.01% Signed-off-by: Hernán Gonzalez Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/qib/qib.h | 2 -- drivers/infiniband/hw/qib/qib_iba7322.c | 10 ++++++++++ drivers/infiniband/hw/qib/qib_sdma.c | 10 ---------- 3 files changed, 10 insertions(+), 12 deletions(-) commit 4f1d58343210cf52f2cb96c2499c81e2ae8d62c5 Author: Hernán Gonzalez Date: Tue Feb 27 19:05:42 2018 -0300 IB/qib: Remove unused variable (char *qib_sdma_event_names[]) Note: This is compile only tested as I have no access to the hw. This variable was not used anywhere in the code. Removing it saves 88 bytes. add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-88 (-88) Function old new delta qib_sdma_event_names 88 - -88 Total: Before=2874565, After=2874477, chg -0.00% Signed-off-by: Hernán Gonzalez Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/qib/qib.h | 1 - drivers/infiniband/hw/qib/qib_sdma.c | 14 -------------- 2 files changed, 15 deletions(-) commit 7da09af91d51561f373bedcd7a9d521ac79ee695 Author: Bart Van Assche Date: Fri Feb 23 14:09:26 2018 -0800 IB/srp: Use %pIS instead of inet_ntop() Except for a minor log message change, this patch does not change any functionality. For the introduction of %pIS, see also commit 1067964305df ("lib: vsprintf: add IPv4/v6 generic %p[Ii]S[pfs] format specifier"). Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/srp/ib_srp.c | 52 +++++++------------------------------ 1 file changed, 10 insertions(+), 42 deletions(-) commit c74ff7501e8dda9e9542a1fcabb2233776c1d19d Author: Bart Van Assche Date: Fri Feb 23 14:09:25 2018 -0800 Revert "IB/srp: Avoid that a cable pull can trigger a kernel crash" The caller of srp_ib_lookup_path() is responsible for holding a reference on the SCSI host. That means that commit 8a0d18c62121 was not necessary. Hence revert it. Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/srp/ib_srp.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) commit e68088e78d82920632eba112b968e49d588d02a2 Author: Bart Van Assche Date: Fri Feb 23 14:09:24 2018 -0800 IB/srp: Fix srp_abort() Before commit e494f6a72839 ("[SCSI] improved eh timeout handler") it did not really matter whether or not abort handlers like srp_abort() called .scsi_done() when returning another value than SUCCESS. Since that commit however this matters. Hence only call .scsi_done() when returning SUCCESS. Signed-off-by: Bart Van Assche Cc: stable@vger.kernel.org Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/srp/ib_srp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a8ed748708ba9c9976fb0d7b4844f4c2fa5ecb34 Author: Arnd Bergmann Date: Tue Feb 20 21:56:27 2018 +0100 infiniband: bnxt_re: use BIT_ULL() for 64-bit bit masks On 32-bit targets, we otherwise get a warning about an impossible constant integer expression: In file included from include/linux/kernel.h:11, from include/linux/interrupt.h:6, from drivers/infiniband/hw/bnxt_re/ib_verbs.c:39: drivers/infiniband/hw/bnxt_re/ib_verbs.c: In function 'bnxt_re_query_device': include/linux/bitops.h:7:24: error: left shift count >= width of type [-Werror=shift-count-overflow] #define BIT(nr) (1UL << (nr)) ^~ drivers/infiniband/hw/bnxt_re/bnxt_re.h:61:34: note: in expansion of macro 'BIT' #define BNXT_RE_MAX_MR_SIZE_HIGH BIT(39) ^~~ drivers/infiniband/hw/bnxt_re/bnxt_re.h:62:30: note: in expansion of macro 'BNXT_RE_MAX_MR_SIZE_HIGH' #define BNXT_RE_MAX_MR_SIZE BNXT_RE_MAX_MR_SIZE_HIGH ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/infiniband/hw/bnxt_re/ib_verbs.c:149:25: note: in expansion of macro 'BNXT_RE_MAX_MR_SIZE' ib_attr->max_mr_size = BNXT_RE_MAX_MR_SIZE; ^~~~~~~~~~~~~~~~~~~ Fixes: 872f3578241d ("RDMA/bnxt_re: Add support for MRs with Huge pages") Signed-off-by: Arnd Bergmann Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/bnxt_re/bnxt_re.h | 4 ++-- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit e5d6574ded7c3a15d02341253929780bc4ee1408 Author: Arnd Bergmann Date: Tue Feb 20 21:56:26 2018 +0100 infiniband: qplib_fp: fix pointer cast Building for a 32-bit target results in a couple of warnings from casting between a 32-bit pointer and a 64-bit integer: drivers/infiniband/hw/bnxt_re/qplib_fp.c: In function 'bnxt_qplib_service_nq': drivers/infiniband/hw/bnxt_re/qplib_fp.c:333:23: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] bnxt_qplib_arm_srq((struct bnxt_qplib_srq *)q_handle, ^ drivers/infiniband/hw/bnxt_re/qplib_fp.c:336:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] (struct bnxt_qplib_srq *)q_handle, ^ In file included from include/linux/byteorder/little_endian.h:5, from arch/arm/include/uapi/asm/byteorder.h:22, from include/asm-generic/bitops/le.h:6, from arch/arm/include/asm/bitops.h:342, from include/linux/bitops.h:38, from include/linux/kernel.h:11, from include/linux/interrupt.h:6, from drivers/infiniband/hw/bnxt_re/qplib_fp.c:39: drivers/infiniband/hw/bnxt_re/qplib_fp.c: In function 'bnxt_qplib_create_srq': include/uapi/linux/byteorder/little_endian.h:31:43: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] #define __cpu_to_le64(x) ((__force __le64)(__u64)(x)) ^ include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ drivers/infiniband/hw/bnxt_re/qplib_fp.c:569:19: note: in expansion of macro 'cpu_to_le64' req.srq_handle = cpu_to_le64(srq); Using a uintptr_t as an intermediate works on all architectures. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Signed-off-by: Arnd Bergmann Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/bnxt_re/qplib_fp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c7ec83772a08d84e5e6a774a7c49ec1d6dc2dd88 Author: Markus Elfring Date: Sat Jan 27 21:48:01 2018 +0100 RDMA/iwpm: Delete an error message for a failed memory allocation in iwpm_create_nlmsg() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Jason Gunthorpe drivers/infiniband/core/iwpm_util.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b7c5bc73680dfcb1bdc3a1c77c0344f045ac017d Author: Markus Elfring Date: Sat Jan 27 20:06:59 2018 +0100 IB/usnic: Delete an error message for a failed memory allocation in usnic_transport_init() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/usnic/usnic_transport.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f51af8a63c5f633b572d00319ecdfa31f266b8fb Author: Gustavo A. R. Silva Date: Tue Feb 27 17:19:52 2018 -0600 PCI/ASPM: Declare threshold_ns as u32, not u64 aspm_calc_l1ss_info() computes l1_2_threshold in microseconds as: l1_2_threshold = 2 + 4 + t_common_mode + t_power_on; where t_common_mode is at most 255us: PCI_L1SS_CAP_CM_RESTORE_TIME 0x0000ff00 <-- 8 bits; <256us and t_power_on is at most 31 * 100us = 3100us: PCI_L1SS_CAP_P_PWR_ON_VALUE 0x00f80000 <-- 5 bits; <32 PCI_L1SS_CAP_P_PWR_ON_SCALE 0x00030000 <-- *2us, *10us, or *100us So l1_2_threshold is at most 2 + 4 + 255 + 3100 = 3361, which means threshold_ns is at most 3361 * 1000 = 3361000, which easily fits in a u32. Declare threshold_ns as u32, not u64. This fixes a Coverity warning. Addresses-Coverity-ID: 1462501 Signed-off-by: Gustavo A. R. Silva [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko drivers/pci/pcie/aspm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d869ae092e39022c2bba81ea498abe74249a338c Author: Alex Deucher Date: Tue Feb 27 11:44:31 2018 -0500 drm/amdgpu: fix module parameter descriptions Some were missing the close parens around options. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8f4b9a679e52298b14358db22c37a135e7086ec Author: Amber Lin Date: Tue Feb 27 10:01:59 2018 -0500 drm/amdgpu: Map all visible VRAM at startup When using CPU to update page table, we need to kmap all the PDs/PTs after they are allocated and that requires a TLB shot down on each CPU, which is quite heavy. Instead, we map the whole visible VRAM to a kernel address at once. Pages can be obtained from the offset. v2: move the mapping base from gmc to amdgpu_mman structure, and the implementation in amdgpu_ttm_* functions Signed-off-by: Amber Lin Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 17 +++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 1 + 2 files changed, 18 insertions(+) commit 5d447f09b8d8346c64f4c952a67c61f7ce88d3c1 Author: Shirish S Date: Wed Feb 21 16:10:33 2018 +0530 drm/amd/display: check for ipp before calling cursor operations Currently all cursor related functions are made to all pipes that are attached to a particular stream. This is not applicable to pipes that do not have cursor plane initialised like underlay. Hence this patch allows cursor related operations on a pipe only if ipp in available on that particular pipe. The check is added to set_cursor_position & set_cursor_attribute. Signed-off-by: Shirish S Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cc195141133ac3e767d930bedd8294ceebf1f10b Author: Shirish S Date: Fri Feb 23 16:10:13 2018 +0530 drm/amd/display: make dm_dp_aux_transfer return payload bytes instead of size The drm layer expects aux->transfer() to return the payload bytes read. Currently dm_dp_aux_transfer() returns the payload size which does not gets updated during the read, hence not giving the right data for the drm layer to pars edid. This leads to the drm layer to conclude as the edid is BAD and hence some monitors/devices dont get detected properly. This patch changes the return type of dm_dp_aux_transfer() to actual bytes read during DP_AUX_NATIVE_READ & DP_AUX_I2C_READ. Signed-off-by: Shirish S Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 9 +++++---- drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 7 ++++--- drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c | 15 ++------------- drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c | 1 + drivers/gpu/drm/amd/display/dc/inc/dc_link_ddc.h | 2 +- 5 files changed, 13 insertions(+), 21 deletions(-) commit 205adda79a408f4a2945f636e1c076f7db3b2045 Author: Shawn Lin Date: Sun Feb 25 10:01:42 2018 +0800 PCI: cpqphp: Fix possible NULL pointer dereference Check io_node for NULL before dereferencing it. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/hotplug/cpqphp_ctrl.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 55de9a77daf3064e4f49296260d975885b574663 Author: Leon Romanovsky Date: Sun Feb 25 13:39:52 2018 +0200 RDMA/mlx5: Refactor QP type check to be as early as possible Perform QP type check in one place and fail as early as possible. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/qp.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 7628166d5e2883e4cdd142b99863d29d411a81b2 Author: Arnd Bergmann Date: Wed Feb 28 14:40:48 2018 +0100 tinydrm: add backlight dependency Calling devm_of_find_backlight directly means we get a link failure without CONFIG_BACKLIGHT_CLASS_DEVICE: drivers/gpu/drm/tinydrm/mi0283qt.o: In function `mi0283qt_probe': mi0283qt.c:(.text+0x684): undefined reference to `devm_of_find_backlight' This adds an explicit Kconfig dependency for it. While I did not observe that failure for st7735r, I assume the same change is needed there for the same reason. Fixes: d1a2e7004b5e ("drm/tinydrm: Replace tinydrm_of_find_backlight with of_find_backlight") Signed-off-by: Arnd Bergmann Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180228134111.2042877-1-arnd@arndb.de drivers/gpu/drm/tinydrm/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 74630e8204f3f00671b9b3cdf4101b8deadae42b Author: Leon Romanovsky Date: Wed Feb 28 08:29:56 2018 +0200 mailmap: Map Leon Romanovsky's emails Update .mailmap file to point to my primary open-source related e-mail address. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe .mailmap | 2 ++ 1 file changed, 2 insertions(+) commit 8efe991e8bd07c415ffe1174853d81c14812a42b Author: Jason Gunthorpe Date: Tue Feb 13 12:18:39 2018 +0200 IB/uverbs: Tidy uverbs_uobject_add Maintaining the uobjects list is mandatory, hoist it into the common rdma_alloc_commit_uobject() function and inline it as there is now only one caller. Signed-off-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/core/rdma_core.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 292749915743758013e290c994f41de196d47498 Author: Heiner Kallweit Date: Wed Feb 28 20:43:38 2018 +0100 r8169: fix interrupt number after adding support for MSI-X interrupts In case of MSI-X the interrupt number may differ from pcidev->irq. Fix this by using pci_irq_vector(). Fixes: 6c6aa15fdea5 ("r8169: improve interrupt handling") Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a063057d7c731cffa7d10740e8ebc2970df8dbb3 Author: Bart Van Assche Date: Wed Feb 28 10:15:33 2018 -0800 block: Fix a race between request queue removal and the block cgroup controller Avoid that the following race can occur: blk_cleanup_queue() blkcg_print_blkgs() spin_lock_irq(lock) (1) spin_lock_irq(blkg->q->queue_lock) (2,5) q->queue_lock = &q->__queue_lock (3) spin_unlock_irq(lock) (4) spin_unlock_irq(blkg->q->queue_lock) (6) (1) take driver lock; (2) busy loop for driver lock; (3) override driver lock with internal lock; (4) unlock driver lock; (5) can take driver lock now; (6) but unlock internal lock. This change is safe because only the SCSI core and the NVME core keep a reference on a request queue after having called blk_cleanup_queue(). Neither driver accesses any of the removed data structures between its blk_cleanup_queue() and blk_put_queue() calls. Reported-by: Joseph Qi Signed-off-by: Bart Van Assche Reviewed-by: Joseph Qi Cc: Jan Kara Signed-off-by: Jens Axboe block/blk-core.c | 31 +++++++++++++++++++++++++++++++ block/blk-sysfs.c | 7 ------- 2 files changed, 31 insertions(+), 7 deletions(-) commit 498f6650aec864e331cae7575fec5f07781d0bf3 Author: Bart Van Assche Date: Wed Feb 28 10:15:32 2018 -0800 block: Fix a race between the cgroup code and request queue initialization Initialize the request queue lock earlier such that the following race can no longer occur: blk_init_queue_node() blkcg_print_blkgs() blk_alloc_queue_node (1) q->queue_lock = &q->__queue_lock (2) blkcg_init_queue(q) (3) spin_lock_irq(blkg->q->queue_lock) (4) q->queue_lock = lock (5) spin_unlock_irq(blkg->q->queue_lock) (6) (1) allocate an uninitialized queue; (2) initialize queue_lock to its default internal lock; (3) initialize blkcg part of request queue, which will create blkg and then insert it to blkg_list; (4) traverse blkg_list and find the created blkg, and then take its queue lock, here it is the default *internal lock*; (5) *race window*, now queue_lock is overridden with *driver specified lock*; (6) now unlock *driver specified lock*, not the locked *internal lock*, unlock balance breaks. The changes in this patch are as follows: - Move the .queue_lock initialization from blk_init_queue_node() into blk_alloc_queue_node(). - Only override the .queue_lock pointer for legacy queues because it is not useful for blk-mq queues to override this pointer. - For all all block drivers that initialize .queue_lock explicitly, change the blk_alloc_queue() call in the driver into a blk_alloc_queue_node() call and remove the explicit .queue_lock initialization. Additionally, initialize the spin lock that will be used as queue lock earlier if necessary. Reported-by: Joseph Qi Signed-off-by: Bart Van Assche Reviewed-by: Joseph Qi Cc: Christoph Hellwig Cc: Philipp Reisner Cc: Ulf Hansson Cc: Kees Cook Signed-off-by: Jens Axboe block/blk-core.c | 24 ++++++++++++++++-------- drivers/block/drbd/drbd_main.c | 3 +-- drivers/block/umem.c | 7 +++---- 3 files changed, 20 insertions(+), 14 deletions(-) commit 5ee0524ba137fe928a88b440d014e3c8451fb32c Author: Bart Van Assche Date: Wed Feb 28 10:15:31 2018 -0800 block: Add 'lock' as third argument to blk_alloc_queue_node() This patch does not change any functionality. Signed-off-by: Bart Van Assche Reviewed-by: Joseph Qi Cc: Christoph Hellwig Cc: Philipp Reisner Cc: Ulf Hansson Cc: Kees Cook Signed-off-by: Jens Axboe block/blk-core.c | 7 ++++--- block/blk-mq.c | 2 +- drivers/block/null_blk.c | 3 ++- drivers/ide/ide-probe.c | 2 +- drivers/lightnvm/core.c | 2 +- drivers/md/dm.c | 2 +- drivers/nvdimm/pmem.c | 2 +- drivers/nvme/host/multipath.c | 2 +- drivers/scsi/scsi_lib.c | 2 +- include/linux/blkdev.h | 3 ++- 10 files changed, 15 insertions(+), 12 deletions(-) commit 392db38058eb47250a9d0cc737af37e78a7e443d Author: Bart Van Assche Date: Wed Feb 28 10:15:30 2018 -0800 zram: Delete gendisk before cleaning up the request queue Remove the disk, partition and bdi sysfs attributes before cleaning up the request queue associated with the disk. Signed-off-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Joseph Qi Reviewed-by: Ming Lei Cc: Minchan Kim Cc: Nitin Gupta Cc: Sergey Senozhatsky Signed-off-by: Jens Axboe drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8115c35bf3ee575cfc9c51ac9853f58a21a43dc Author: Bart Van Assche Date: Wed Feb 28 10:15:29 2018 -0800 md: Delete gendisk before cleaning up the request queue Remove the disk, partition and bdi sysfs attributes before cleaning up the request queue associated with the disk. Signed-off-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Joseph Qi Reviewed-by: Ming Lei Cc: Shaohua Li Signed-off-by: Jens Axboe drivers/md/md.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0fa8ebdd4244b8e652cc5341c3d5b4b06f84a637 Author: Bart Van Assche Date: Wed Feb 28 10:15:28 2018 -0800 block/loop: Delete gendisk before cleaning up the request queue Remove the disk, partition and bdi sysfs attributes before cleaning up the request queue associated with the disk. Signed-off-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Joseph Qi Reviewed-by: Ming Lei Cc: Josef Bacik Cc: Shaohua Li Cc: Omar Sandoval Cc: Hannes Reinecke Signed-off-by: Jens Axboe drivers/block/loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24941b90e639df2bf467531601a15d792eaa6d6b Author: Jens Axboe Date: Wed Feb 28 09:18:57 2018 -0700 null_blk: add 'requeue' fault attribute Similarly to the support we have for testing/faking timeouts for null_blk, this adds support for triggering a requeue condition. Considering the issues around restart we've been seeing, this should be a useful addition to the testing arsenal to ensure that we are handling requeue conditions correctly. This works for queue mode 1 (legacy request_fn based path) and 2 (blk-mq path), as there's no good way to do requeue with a bio based driver. This is similar to the timeout path. For the blk-mq path, we alternate between passing back BLK_STS_RESOURCE and manually calling blk_mq_requeue_request() in the driver. The former will hit the core requeue path, while the latter exercises the IO scheduler requeue path. Reviewed-by: Bart Van Assche Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/null_blk.c | 67 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 12 deletions(-) commit 4ace53f1ed40a5cfee4bdd7614c8a8b2798227ad Author: Omar Sandoval Date: Tue Feb 27 16:56:43 2018 -0800 sbitmap: use test_and_set_bit_lock()/clear_bit_unlock() sbitmap_queue_get()/sbitmap_queue_clear() are used for allocating/freeing a resource, so they should provide acquire/release barrier semantics, respectively. sbitmap_get() currently contains a full barrier, which is unnecessary, so use test_and_set_bit_lock() instead of test_and_set_bit() (these are equivalent on x86_64). sbitmap_clear_bit() does not imply any barriers, which is incorrect, as accesses of the resource (e.g., request) could potentially get reordered to after the clear_bit(). Introduce sbitmap_clear_bit_unlock() and use it for sbitmap_queue_clear() (this only adds a compiler barrier on x86_64). The other existing user of sbitmap_clear_bit() (the blk-mq software queue pending map) is serialized through a spinlock and does not need this. Reported-by: Tejun Heo Acked-by: Tejun Heo Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe include/linux/sbitmap.h | 8 ++++++++ lib/sbitmap.c | 10 +++++----- 2 files changed, 13 insertions(+), 5 deletions(-) commit e9a99a638800af25c7ed006c96fd1dabb99254b7 Author: Omar Sandoval Date: Tue Feb 27 16:56:42 2018 -0800 block: clear ctx pending bit under ctx lock When we insert a request, we set the software queue pending bit while holding the software queue lock. However, we clear it outside of the lock, so it's possible that a concurrent insert could reset the bit after we clear it but before we empty the request list. Afterwards, the bit would still be set but the software queue wouldn't have any requests in it, leading us to do a spurious run in the future. This is mostly a benign/theoretical issue, but it makes the following change easier to justify. Signed-off-by: Omar Sandoval Acked-by: Tejun Heo Signed-off-by: Jens Axboe block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18bc42308699522b57fd599401c03ad561f422ef Author: Bart Van Assche Date: Tue Feb 27 16:32:14 2018 -0800 blk-mq-debugfs: Show zone locking information When debugging the ZBC code in the mq-deadline scheduler it is very important to know which zones are locked and which zones are not locked. Hence this patch that exports the zone locking information through debugfs. Cc: Omar Sandoval Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 1209cb7fa4afcd7f652a70e1d2028686ec28a7a5 Author: Bart Van Assche Date: Tue Feb 27 16:32:13 2018 -0800 blk-mq-debugfs: Reorder queue show and store methods Make sure that the queue show and store methods are contiguous and also that these appear in alphabetical order. Signed-off-by: Bart Van Assche Cc: Omar Sandoval Cc: Damien Le Moal Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 130 ++++++++++++++++++++++++------------------------- 1 file changed, 65 insertions(+), 65 deletions(-) commit 025aecd8bdfed9ee1325d3f21d0f84b3622bdda5 Author: Jiufei Xue Date: Wed Feb 28 13:44:18 2018 +0800 writeback: remove dead code in wb_blkcg/memcg_offline Signed-off-by: Jiufei Xue Acked-by: Tejun Heo Signed-off-by: Jens Axboe mm/backing-dev.c | 2 -- 1 file changed, 2 deletions(-) commit 723fbf563a6a9cefbd3c58e95694583ad1cb8704 Author: Anshuman Khandual Date: Thu Feb 15 09:03:56 2018 +0530 lib/scatterlist: Add SG_CHAIN and SG_END macros for LSB encodings This replaces scatterlist->page_link LSB encodings with SG_CHAIN and SG_END definitions without any functional change. Signed-off-by: Anshuman Khandual Signed-off-by: Jens Axboe include/linux/scatterlist.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 9f0178fb67699992d38601cb923b434f9986dd68 Author: Monk Liu Date: Mon Jan 29 19:24:32 2018 +0800 drm/amdgpu: disable GFX ring and disable PQ wptr in hw_fini otherwise there will be DMAR reading error comes out from CP since GFX is still alive and CPC's WPTR_POLL is still enabled, which would lead to DMAR read error. fix: we can hault CPG after hw_fini, but cannot halt CPC becaues KIQ stil need to be alive to let RLCV invoke, but its WPTR_POLL could be disabled. Signed-off-by: Monk Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit bffe07b8b97d7faaf3d291129aafef2ee8a80e90 Author: Monk Liu Date: Fri Jan 26 16:57:25 2018 +0800 drm/amdgpu: cleanup SA inti and fini(v2) should use bo_create_kernel instead of split to two function that create and pin the SA bo issue: before this patch, there are DMAR read error in host side when running SRIOV test, the DMAR address dropped in the range of SA bo. fix: after this cleanups of SA init and fini, above DMAR eror gone. v2: keep sa_bo's fini instead of suspend, to keep reporting error Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 - drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | 62 ++++++------------------------ 3 files changed, 11 insertions(+), 59 deletions(-) commit 6f31fe6ec6ee77a82dafc4f72efba6272f279b9f Author: Emily Deng Date: Wed Feb 7 16:17:16 2018 +0800 drm/amdgpu: Correct sdma_v4 get_wptr(v2) the original method will change the wptr value in wb. v2: furthur cleanup Signed-off-by: Emily Deng Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit dbf797655a43c6318ebb90b899e6583fcadc6472 Author: Monk Liu Date: Tue Jan 23 18:26:20 2018 +0800 drm/amdgpu: adjust timeout for ib_ring_tests(v2) issue: sometime GFX/MM ib test hit timeout under SRIOV env, root cause is that engine doesn't come back soon enough so the current IB test considered as timed out. fix: for SRIOV GFX IB test wait time need to be expanded a lot during SRIOV runtimei mode since it couldn't really begin before GFX engine come back. for SRIOV MM IB test it always need more time since MM scheduling is not go together with GFX engine, it is controled by h/w MM scheduler so no matter runtime or exclusive mode MM IB test always need more time. v2: use ring type instead of idx to judge Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 14a8032aac5f6c5e903dcb22e177132c15c51c25 Author: Monk Liu Date: Fri Jan 19 20:29:17 2018 +0800 drm/amdgpu: don't use MM idle_work for SRIOV(v2) SRIOV doesn't give VF cg/pg feature so the MM's idle_work is skipped for SR-IOV v2: remove superfluous changes since idle_work is not scheduled for SR-IOV so the condition check for SR-IOV inside idle_work also can be dropped v3: drop the SRIOV check in amdgpu_vce/uvd_suspend Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 9 ++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 6 ++---- 2 files changed, 6 insertions(+), 9 deletions(-) commit 63b2b08b57d978833db36a047179404c40a52b09 Author: Rex Zhu Date: Sat Feb 24 14:29:12 2018 +0800 drm/amd/pp: Print more smu failed info on Vega10 Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0a73b950d0b2618690488ad067f96ab703e05c2 Author: Eric Huang Date: Mon Feb 26 17:36:19 2018 -0500 drm/amd/powerplay: fix power over limit on Fiji power containment disabled only on Fiji and compute power profile. It violates PCIe spec and may cause power supply failed. Enabling it will fix the issue, even the fix will drop performance of some compute tests. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 ------- 1 file changed, 7 deletions(-) commit 60b431b5c165514729ad0a47e18b0f99783dfc38 Author: James Zhu Date: Tue Feb 27 09:55:17 2018 -0500 drm/amdgpu:Fixed wrong emit frame size for enc Emit frame size should match with corresponding function, uvd_v6_0_enc_ring_emit_vm_flush has 5 amdgpu_ring_write Signed-off-by: James Zhu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe19b862f18ec09c34dc09e8134e08dbfd601876 Author: Monk Liu Date: Tue Jan 23 19:17:56 2018 +0800 drm/amdgpu: increase gart size to 512MB 256MB is too small consider PTE/PDE shadow and TTM eviction activity Signed-off-by: Monk Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c12aba3acde52e2ae7807e4e263dfba34fcdbb0c Author: Monk Liu Date: Wed Jan 24 12:20:32 2018 +0800 drm/amdgpu: move WB_FREE to correct place WB_FREE should be put after all engines's hw_fini done, otherwise the invalid wptr/rptr_addr would still be used by engines which trigger abnormal bugs. This fixes couple DMAR reading error in host side for SRIOV after guest kmd is unloaded. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit ed9324afc0ec1ebe5dcef632eee6381f6ebf8fd5 Author: Monk Liu Date: Tue Jan 23 18:29:22 2018 +0800 drm/amdgpu: change gfx9 ib test to use WB two reasons to switch SCRATCH reg method to WB method: 1)Because when doing IB test we don't want to involve KIQ health status affect, and since SCRATCH register access is go through KIQ that way GFX IB test would failed due to KIQ fail. 2)acccessing SCRATCH register cost much more time than WB method because SCRATCH register access runs through KIQ which at least could begin after GPU world switch back to current Guest VF Signed-off-by: Monk Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 107 ++++++++++++++++++---------------- 1 file changed, 57 insertions(+), 50 deletions(-) commit 113890ee99575a5340ab8729b207e48aaac2eb06 Author: Monk Liu Date: Fri Jan 19 19:06:31 2018 +0800 drm/amdgpu: cond_exec only for schedule with a job issue: under SR-IOV sometimes the iB test will fail on gfx ring fix: with cond_exec inserted in RB the gfx engine would skip part packets if RLCV issue PREEMPT on gfx engine if gfx engine is prior to COND_EXEC packet, this is okay for regular command from UMD, but for the ib test since the whole dma format doesn't support PREEMPT so must remove the COND_EXEC from it. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ec956f5f57e81523a787eede9d82357465d639e Author: Monk Liu Date: Fri Jan 19 19:02:16 2018 +0800 drm/amdgpu: only flush hotplug work without DC since hotplug_work is initialized under the case of no dc support Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7b6cbae2b15b13378995aa8ec049083713d4fbcc Author: Monk Liu Date: Thu Jan 18 16:58:04 2018 +0800 drm/amdgpu: skip ECC for SRIOV in gmc late_init Signed-off-by: Monk Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73469585510d5161368c899b7eacd58c824b2b24 Author: Monk Liu Date: Fri Dec 29 17:06:41 2017 +0800 drm/amdgpu: fix&cleanups for wb_clear fix: should do right shift on wb before clearing cleanups: 1,should memset all wb buffer 2,set max wb number to 128 (total 4KB) is big enough Signed-off-by: Monk Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 1d1ab1ae69701d813993af40cf3ee39781ec4d6f Merge: 87915bf ec9c2fb Author: Doug Ledford Date: Wed Feb 28 13:37:39 2018 -0500 Merge tag 'mlx5-updates-2018-02-23' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into k.o/wip/dl-for-next mlx5-update-2018-02-23 (IB representors) From: Mark Bloch ========= Add IB representor when in switchdev mode The following series adds support for an IB (RAW Ethernet only) device representor which is created when the user switches to switchdev mode. Today when switching to switchdev mode the only representors which are created are net devices. Each netdev is a representor of a virtual function and any data sent via the representor is received on the virtual function, and any data sent via the virtual function is received by the representor. For the mlx5 driver the main use of this functionality is to be able to use Open vSwitch on the hypervisor in order to manage/control traffic from/to the virtual functions. Open vSwitch can also work with DPDK devices and not just net devices, this series exposes an IB device, which Mellanox PMD driver uses, which then can be used by Open vSwitch DPDK. An IB device representor exposes only RAW Ethernet QP capabilities and the ability to create flow rules to direct traffic to its RX queues. The state of the IB device (ACTIVE/DOWN etc..) is based on the state of the corresponding net device representor. No other RDMA/RoCE functionality is currently supported and no GID table is exposed. ========= Signed-off-by: Doug Ledford commit a6a8f0196d85ef81e44ceace6803b0195d122e17 Merge: 5407492 e9d328d Author: David S. Miller Date: Wed Feb 28 12:34:20 2018 -0500 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2018-02-28 This series contains updates to fm10k only. Jake provides all the changes in this series, starting with making the function header comments consistent and to align with how the kernel documentation expects it. Also cleaned up code comment as well as bump the driver version. ==================== Signed-off-by: David S. Miller commit 58c442f34c77ad80941e3da85cc0738e8e21d4f3 Author: José Bollo Date: Tue Feb 27 17:06:21 2018 +0100 Smack: Handle CGROUP2 in the same way that CGROUP The new file system CGROUP2 isn't actually handled by smack. This changes makes Smack treat equally CGROUP and CGROUP2 items. Signed-off-by: José Bollo Signed-off-by: Casey Schaufler security/smack/smack_lsm.c | 2 ++ 1 file changed, 2 insertions(+) commit 540749293a5f6bd804c0a35eb8d0f71dc3b39fc4 Merge: 8230819 4908e24 Author: David S. Miller Date: Wed Feb 28 12:25:49 2018 -0500 Merge branch 'selftests-forwarding-Add-VRF-based-tests' Ido Schimmel says: ==================== selftests: forwarding: Add VRF-based tests One of the nice things about network namespaces is that they allow one to easily create and test complex environments. Unfortunately, these namespaces can not be used with actual switching ASICs, as their ports can not be migrated to other network namespaces (NETIF_F_NETNS_LOCAL) and most of them probably do not support the L1-separation provided by namespaces. However, a similar kind of flexibility can be achieved by using VRFs and by looping the switch ports together. For example: br0 + vrf-h1 | vrf-h2 + +---+----+ + | | | | 192.0.2.1/24 + + + + 192.0.2.2/24 swp1 swp2 swp3 swp4 + + + + | | | | +--------+ +--------+ The VRFs act as lightweight namespaces representing hosts connected to the switch. This approach for testing switch ASICs has several advantages over the traditional method that requires multiple physical machines, to name a few: 1. Only the device under test (DUT) is being tested without noise from other system. 2. Ability to easily provision complex topologies. Testing bridging between 4-ports LAGs or 8-way ECMP requires many physical links that are not always available. With the VRF-based approach one merely needs to loopback more ports. These tests are written with switch ASICs in mind, but they can be run on any Linux box using veth pairs to emulate physical loopbacks. v2: * Order local variables declaration according to function arguments order (Petr) v1: * Change location to net/forwarding instead of forwarding/ * Add ability to pause on failure * Add ability to pause on cleanup * Make configuration file optional * Make ping/ping6/mz configurable * Add more tc tests ==================== Signed-off-by: David S. Miller commit 4908e24b812d74d0534e8b33edd58417aefa93d0 Author: Jiri Pirko Date: Wed Feb 28 12:25:19 2018 +0200 selftests: forwarding: Introduce basic shared blocks tests Test shared block infrastructure. This is a basic test that shares TC block in between 2 clsact qdiscs. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/lib.sh | 6 + .../selftests/net/forwarding/tc_shblocks.sh | 122 +++++++++++++++++++++ 2 files changed, 128 insertions(+) commit b13f245e844d1535597298ac0f0f0a94f56c239b Author: Jiri Pirko Date: Wed Feb 28 12:25:18 2018 +0200 selftests: forwarding: Introduce basic tc chains tests Tests chains matching and goto chain action. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../testing/selftests/net/forwarding/tc_chains.sh | 122 +++++++++++++++++++++ 1 file changed, 122 insertions(+) commit bc13af291ebba244226b12e75d36a6eb6373a5d6 Author: Jiri Pirko Date: Wed Feb 28 12:25:17 2018 +0200 selftests: forwarding: Introduce tc actions tests Add first part of actions tests. This patch only contains tests of gact ok/drop/trap and mirred redirect egress. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../testing/selftests/net/forwarding/tc_actions.sh | 195 +++++++++++++++++++++ 1 file changed, 195 insertions(+) commit 07e5c75184a11c46eddb08f2435ba4f3e7152e62 Author: Jiri Pirko Date: Wed Feb 28 12:25:16 2018 +0200 selftests: forwarding: Introduce tc flower matching tests Add first part of flower tests. This patch only contains dst/src ip/mac matching. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../testing/selftests/net/forwarding/tc_common.sh | 23 +++ .../testing/selftests/net/forwarding/tc_flower.sh | 196 +++++++++++++++++++++ 2 files changed, 219 insertions(+) commit 781fe631fafda37402abdbc4647698a107e2284d Author: Jiri Pirko Date: Wed Feb 28 12:25:15 2018 +0200 selftests: forwarding: Allow to get netdev interfaces names from commandline Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/lib.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 4e4272d2a68dcdd2555774dba9d8b237fe0eb63d Author: Jiri Pirko Date: Wed Feb 28 12:25:14 2018 +0200 selftests: forwarding: Add MAC get helper Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/lib.sh | 7 +++++++ 1 file changed, 7 insertions(+) commit 2f19f2125d824fc607359f6d9248bd765edf7183 Author: Jiri Pirko Date: Wed Feb 28 12:25:13 2018 +0200 selftests: forwarding: Add tc offload check helper Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/lib.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 4fb20ae13711ee05fba6e5dd2b81a83d9e5b5249 Author: Ido Schimmel Date: Wed Feb 28 12:25:12 2018 +0200 selftests: forwarding: Test IPv6 weighted nexthops Have one host generate 16K IPv6 echo requests with a random flow label and check that they are distributed between both multipath links according to the provided weights. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../selftests/net/forwarding/router_multipath.sh | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 3d578d879517a97f4af867e6a8a021baf15e5101 Author: Ido Schimmel Date: Wed Feb 28 12:25:11 2018 +0200 selftests: forwarding: Test IPv4 weighted nexthops Use different weights for the multipath route configured on the first router and check that the different flows generated by the first host are distributed according to the provided weights. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/lib.sh | 14 ++++ .../selftests/net/forwarding/router_multipath.sh | 77 ++++++++++++++++++++++ 2 files changed, 91 insertions(+) commit 937eeb3482748bb85486070e10b5fbeb6b973f63 Author: Ido Schimmel Date: Wed Feb 28 12:25:10 2018 +0200 selftests: forwarding: Create test topology for multipath routing Create a topology with two hosts, each directly connected to a different router. Both routers are connected using two links, enabling multipath routing. Test IPv4 and IPv6 ping using default MTU and large MTU. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../selftests/net/forwarding/router_multipath.sh | 209 +++++++++++++++++++++ 1 file changed, 209 insertions(+) commit 7b7bc875559c0c06406d77a7f71e3c0e289a60be Author: Ido Schimmel Date: Wed Feb 28 12:25:09 2018 +0200 selftests: forwarding: Add a test for basic IPv4 and IPv6 routing Configure two hosts which are directly connected to the same router and test IPv4 and IPv6 ping. Use a large MTU and check that ping is unaffected. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/lib.sh | 15 +++ tools/testing/selftests/net/forwarding/router.sh | 125 +++++++++++++++++++++++ 2 files changed, 140 insertions(+) commit 236dd50bf67a2ab5fd39d82e712d1fafdd4c602d Author: Ido Schimmel Date: Wed Feb 28 12:25:08 2018 +0200 selftests: forwarding: Add a test for flooded traffic Add test cases for unknown unicast and unregistered multicast flooding. For each traffic type, turn off flooding on one bridged port and inject a packet of the specified type through the second bridged port. Make sure the packet was not received by checking the ACL counters on the other end. Later, turn on flooding and make sure the packet was received. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../selftests/net/forwarding/bridge_vlan_aware.sh | 1 + tools/testing/selftests/net/forwarding/lib.sh | 89 ++++++++++++++++++++++ 2 files changed, 90 insertions(+) commit d4deb01467ec9ed33fe0f4b4fa4632c94f2dd8c9 Author: Ido Schimmel Date: Wed Feb 28 12:25:07 2018 +0200 selftests: forwarding: Add a test for FDB learning Send a packet with a specific destination MAC, make sure it was learned on the ingress port and then aged-out. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../selftests/net/forwarding/bridge_vlan_aware.sh | 5 +- tools/testing/selftests/net/forwarding/lib.sh | 92 ++++++++++++++++++++++ 2 files changed, 96 insertions(+), 1 deletion(-) commit 73bae6736b6b577b52fbba2d4b71a5a3e9920fb5 Author: Ido Schimmel Date: Wed Feb 28 12:25:06 2018 +0200 selftests: forwarding: Add initial testing framework Add initial framework to test packet forwarding functionality. The tests can run on actual devices using loop-backed cables or using veth pairs. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/.gitignore | 1 + tools/testing/selftests/net/forwarding/README | 56 ++++ .../selftests/net/forwarding/bridge_vlan_aware.sh | 83 ++++++ tools/testing/selftests/net/forwarding/config | 12 + .../net/forwarding/forwarding.config.sample | 31 +++ tools/testing/selftests/net/forwarding/lib.sh | 282 +++++++++++++++++++++ 6 files changed, 465 insertions(+) commit 8230819494b3bf284ca7262ac5f877333147b937 Author: Paolo Abeni Date: Wed Feb 28 10:59:27 2018 +0100 ipvlan: use per device spinlock to protect addrs list updates This changeset moves ipvlan address under RCU protection, using a per ipvlan device spinlock to protect list mutation and RCU read access to protect list traversal. Also explicitly use RCU read lock to traverse the per port ipvlans list, so that we can now perform a full address lookup without asserting the RTNL lock. Overall this allows the ipvlan driver to check fully for duplicate addresses - before this commit ipv6 addresses assigned by autoconf via prefix delegation where accepted without any check - and avoid the following rntl assertion failure still in the same code path: RTNL: assertion failed at drivers/net/ipvlan/ipvlan_core.c (124) WARNING: CPU: 15 PID: 0 at drivers/net/ipvlan/ipvlan_core.c:124 ipvlan_addr_busy+0x97/0xa0 [ipvlan] Modules linked in: ipvlan(E) ixgbe CPU: 15 PID: 0 Comm: swapper/15 Tainted: G E 4.16.0-rc2.ipvlan+ #1782 Hardware name: Dell Inc. PowerEdge R730/072T6D, BIOS 2.1.7 06/16/2016 RIP: 0010:ipvlan_addr_busy+0x97/0xa0 [ipvlan] RSP: 0018:ffff881ff9e03768 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff881fdf2a9000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 00000000000000f6 RDI: 0000000000000300 RBP: ffff881fdf2a8000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: ffff881ff9e034c0 R12: ffff881fe07bcc00 R13: 0000000000000001 R14: ffffffffa02002b0 R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff881ff9e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fc5c1a4f248 CR3: 000000207e012005 CR4: 00000000001606e0 Call Trace: ipvlan_addr6_event+0x6c/0xd0 [ipvlan] notifier_call_chain+0x49/0x90 atomic_notifier_call_chain+0x6a/0x100 ipv6_add_addr+0x5f9/0x720 addrconf_prefix_rcv_add_addr+0x244/0x3c0 addrconf_prefix_rcv+0x2f3/0x790 ndisc_router_discovery+0x633/0xb70 ndisc_rcv+0x155/0x180 icmpv6_rcv+0x4ac/0x5f0 ip6_input_finish+0x138/0x6a0 ip6_input+0x41/0x1f0 ipv6_rcv+0x4db/0x8d0 __netif_receive_skb_core+0x3d5/0xe40 netif_receive_skb_internal+0x89/0x370 napi_gro_receive+0x14f/0x1e0 ixgbe_clean_rx_irq+0x4ce/0x1020 [ixgbe] ixgbe_poll+0x31a/0x7a0 [ixgbe] net_rx_action+0x296/0x4f0 __do_softirq+0xcf/0x4f5 irq_exit+0xf5/0x110 do_IRQ+0x62/0x110 common_interrupt+0x91/0x91 v1 -> v2: drop unneeded in_softirq check in ipvlan_addr6_validator_event() Fixes: e9997c2938b2 ("ipvlan: fix check for IP addresses in control path") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan.h | 1 + drivers/net/ipvlan/ipvlan_core.c | 30 ++++++++++++-------- drivers/net/ipvlan/ipvlan_main.c | 60 ++++++++++++++++++++++++---------------- 3 files changed, 56 insertions(+), 35 deletions(-) commit cccc200fcaf04cff4342036a72e51d6adf6c98c1 Author: Paolo Abeni Date: Wed Feb 28 11:43:27 2018 +0100 ipvlan: egress mcast packets are not exceptional Currently, if IPv6 is enabled on top of an ipvlan device in l3 mode, the following warning message: Dropped {multi|broad}cast of type= [86dd] is emitted every time that a RS is generated and dmseg is soon filled with irrelevant messages. Replace pr_warn with pr_debug, to preserve debuggability, without scaring the sysadmin. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d61e2944b6364006e3d7a0152aaafda741c8c876 Author: Andy Shevchenko Date: Mon Feb 26 17:50:43 2018 +0200 genirq: Add wakeup sysfs node to show IRQ wakeup state Surprisingly there is no simple way to see if the IRQ line in question is wakeup source or not. Note that wakeup might be an OOB (out-of-band) source like GPIO line which makes things slightly more complicated. Add a sysfs node to cover this case. Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Tested-by: Tony Lindgren Cc: Grygorii Strashko Cc: "Rafael J . Wysocki" Link: https://lkml.kernel.org/r/20180226155043.67937-1-andriy.shevchenko@linux.intel.com Documentation/ABI/testing/sysfs-kernel-irq | 7 +++++++ kernel/irq/irqdesc.c | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) commit 30bbb983d896081b8bec12e84d5a8a1d483bb7fd Merge: 56beda3 32dc5ef Author: David S. Miller Date: Wed Feb 28 12:06:02 2018 -0500 Merge branch 'mlxsw-mq-red-offload' Jiri Pirko says: ==================== mlxsw: Offload multi-queue RED support Nogah says: Support a two level hierarchy of offloaded qdiscs in mlxsw, with sch_prio being the root qdisc and sch_red as the children. +----------+ | sch_prio | +----+-----+ | | +----------------------------------+ | | | | | | | | | +---v---+ +----v---+ +-----v--+ |sch_red| |sch_red | |sch_red | +-------+ +--------+ +--------+ When setting sch_prio as the root qdisc on a physical port, mlxsw will offload it. When adding it with sch_red as a child qdisc, it will offload it as well. Relocating child qdisc or connecting them to more then one child will result in unoffloading them. Relocating child qdisc more then once is highly unrecommended and might cause a miss match between the kernel configuration and the offloaded one. The offloaded configuration will be aligned with the one shown in the show command. Changing the priomap parameter of sch_prio might cause a band that its configuration was changed and it has offloaded sch_red set on it, to lose some stats data as if sch_red was unoffloaded and offloaded again. However, it won't affect the data on this band that will have sch_red continuously. Patch 1 adds support for setting RED as the child of root qdisc. Patches 2-4 add support for RED bstasts for offloaded child qdiscs. Patches 5-6 handle backlog related changes for offloaded child qdiscs. Patches 7-8 update PRIO in mlxsw to be able to have RED as child on its bands. Patch 9 adds offload handles for PRIO graft operations. In mlxsw it will cause the driver to stop offloading the child in question. ==================== Signed-off-by: David S. Miller commit 32dc5efc6cb40dea9ee0797b7c237efc470e0c35 Author: Nogah Frankel Date: Wed Feb 28 10:45:07 2018 +0100 mlxsw: spectrum: qdiscs: prio: Handle graft command Handle graft command for an offloaded sch_prio. Grafting a qdisc to any place other than under its original parent is not supported by mlxsw and will cause the grafted qdisc to stop being offloaded. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit b9c7a7acc749f3d0667a2ab44ea38110d5a1f286 Author: Nogah Frankel Date: Wed Feb 28 10:45:06 2018 +0100 net: sch: prio: Add offload ability for grafting a child Offload sch_prio graft command for capable drivers. Warn in case of a failure, unless the graft was done as part of a destroy operation (the new qdisc is a noop) or if all the qdiscs (the parent, the old child, and the new one) are not offloaded. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/pkt_cls.h | 8 ++++++++ net/sched/sch_prio.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) commit 98ceb7b6d64552f995973be1a0ee9af0bf85fb3d Author: Nogah Frankel Date: Wed Feb 28 10:45:05 2018 +0100 mlxsw: spectrum: qdiscs: prio: Delete child qdiscs when removing bands When the number the bands of sch_prio is decreased, child qdiscs on the deleted bands would get deleted as well. This change and deletions are being done under sch_tree_lock of the sch_prio qdisc. Part of the destruction of qdisc is unoffloading it, if it is offloaded. Un-offloading can't be done inside this lock. Move the offload command to be done before reducing the number of bands, so unoffloading of the qdiscs that are about to be deleted could be done outside of the lock. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 7 ++++++- net/sched/sch_prio.c | 13 ++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) commit 23f2b4048cc49d786c452f681dd5d8920ca095a7 Author: Nogah Frankel Date: Wed Feb 28 10:45:04 2018 +0100 mlxsw: spectrum: Update sch_prio stats to include sch_red related drops sch_prio as root qdisc should count all the drops its children have. Since it is possible for it to have sch_red children, it needs to count RED early drops. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fd5ac14a1aae63ef95b22cc2eb23e3a25b3436be Author: Nogah Frankel Date: Wed Feb 28 10:45:03 2018 +0100 net: sch: Don't warn on missmatching qlen and backlog for offloaded qdiscs Offloaded qdiscs are allowed to expose only parts of their statistics. It means that if backlog is being exposed and qlen is not, it might trigger a warning in qdisc_tree_reduce_backlog. Do not warn in case the qdisc that was removed was an offloaded one. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/sch_api.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit cc6e5c13af8b592cfed49f4854eddddbb58c6949 Author: Nogah Frankel Date: Wed Feb 28 10:45:02 2018 +0100 mlxsw: spectrum: qdiscs: Update backlog handling of a child qdiscs When removing a child qdisc its backlog will be decreased from the parent backlog. The driver backlog count should do the same. When the parent changes its configuration, the child might need to clean its stats. However, the backlog can't be cleaned with the rest of the stats, because it reflects a momentary value that needs to be synced with the core, not the history of the qdisc. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 04cc0bf5d6ceb0ff19e8636fb39695620e587b06 Author: Nogah Frankel Date: Wed Feb 28 10:45:01 2018 +0100 mlxsw: spectrum: qdiscs: Collect stats for sch_red based on priomap Priority counters count packets according to their packet priority. Collect the stats for sch_red based on these counters, so the qdisc bstats will be the sum of counters matching the priorities marked in the qdisc priomap. Changing the mapping of the priorities to bands while traffic is running can result in losing the stats of the bands qdiscs from their last dump call to this change, as if the qdisc was unoffloaded and re-offloaded. It will not affect the traffic behaviour according to sch_red. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 69 ++++++++++++++++------ 1 file changed, 50 insertions(+), 19 deletions(-) commit 1631ab2e8d31577d65f4cf857f609ef3131ff61e Author: Nogah Frankel Date: Wed Feb 28 10:45:00 2018 +0100 mlxsw: spectrum: qdiscs: Add priority map per qdisc Add priority map per qdisc, to indicate which priorities are being directed through this qdisc. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 2f88047ec42cc0cc8228247033a8f83960ce7f81 Author: Nogah Frankel Date: Wed Feb 28 10:44:59 2018 +0100 mlxsw: spectrum: Add priority counters Add TX packets and bytes counters per switch priority per port. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 10 ++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 ++ 2 files changed, 12 insertions(+) commit eed4baeb040aa41323d0091c18d36cc5a895792d Author: Nogah Frankel Date: Wed Feb 28 10:44:58 2018 +0100 mlxsw: spectrum: qdiscs: Support qdisc per tclass Add the option to set a qdisc per tclass. Match the qdisc to the tclass by parent ID. Supported currently for sch_red only. It allows offloading sch_prio as root qdisc and sch_red as its child. (However, doing so might corrupt the stats for both parent and child.) Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 62 ++++++++++++++++++---- 2 files changed, 53 insertions(+), 10 deletions(-) commit 56beda3db6020428885f0589a0ac16768ea94543 Author: Maxime Chevallier Date: Wed Feb 28 10:14:13 2018 +0100 net: mvpp2: Add hardware offloading for VLAN filtering Marvell PPv2 controller allows for generic packet filtering. This commit adds entries to implement VLAN filtering. The approach taken is : - Filter entries that would match on the presence of the VLAN tag (existing VLAN detection, DSA / EDSA detection) will set the next lookup ID to be for the VID. - For each VLAN existing on a given port, we add an entry that matches this specific VID. If the incoming packet matches the VID entry, it is set for the next lookup in the chain (LU_L2). - A Guard entry is added for each port, that will match if the incoming packet didn't match any of the above VID entries. This entry tags the packet to be dropped. Due to this design, and the fact that the total 256 filter entries are also used for other purposes, we have a limit of 10 VLANs per port. To accommodate the case where we would need more VLANS on one port, this patch implements the ndo_set_features to allow for disabling of VLAN filtering using ethtool. The default config has VLAN filtering disabled. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 414 ++++++++++++++++++++++++++++++++--- 1 file changed, 380 insertions(+), 34 deletions(-) commit 14967f94972c0388f455625e7109ab7651429014 Author: Heiner Kallweit Date: Wed Feb 28 07:55:20 2018 +0100 r8169: convert remaining feature flag and remove enum features Now that only one feature flag is left we can convert it and remove enum features. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 64ec1acdff21bf95ed565218d8ce38cb39d30cca Merge: 82695b3 1e9b9a8 Author: David S. Miller Date: Wed Feb 28 12:00:28 2018 -0500 Merge branch 'macmace-cleanups' Finn Thain says: ==================== Fixes, cleanup and modernization for macmace driver Changes since v4 of combined patch series: - Removed redundant and non-portable MACH_IS_MAC tests. - Omitted patches unrelated to macmace driver. ==================== Signed-off-by: David S. Miller commit 1e9b9a8bbdbb7d472a2a203f658b38f0b2d99333 Author: Finn Thain Date: Tue Feb 27 23:22:33 2018 -0500 net/macmace: Drop redundant MACH_IS_MAC test The MACH_IS_MAC test is redundant here because the platform device won't get registered unless MACH_IS_MAC. Adopt module_platform_driver() convention. Cc: Geert Uytterhoeven Signed-off-by: Finn Thain Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/apple/macmace.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 66e19689f57b61a2f347ea79c16c6b3cb92f090e Author: Finn Thain Date: Tue Feb 27 23:22:33 2018 -0500 net/macmace: Fix and clean up log messages Don't log the unexpanded "eth%d" format string. Log the chip revision in the probe message (consistent with mace.c). Drop redundant debug messages for FIFO events recorded in the interface statistics (also consistent with mace.c). Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller drivers/net/ethernet/apple/macmace.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 3f5098135b2cd23941e5573a3f0abaf75b0e1d0a Author: Sudeep Holla Date: Mon Feb 26 12:21:11 2018 +0000 arm64: dts: juno: fix size of GICv2m MSI frames Currently the size of GICv2m MSI frames are listed as 4kB while the Juno TRM specifies 64kB for each of these MSI frames. Though the devices connected themselves might just use the first 4kB, to be consistent with the general practice of 64kB boundary alignment to all the devices, let's keep the size as 64kB. This might also help in avoiding any surprise when passing the device to a VM. This patch increases the size of each GICv2m MSI frames from 4kB to 64kB as per the specification. Cc: Liviu Dudau Acked-by: Marc Zyngier Reviewed-by: Robin Murphy Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-base.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit db89ed14a2f2fcaa157a57fe3dd32cdb48459e2b Author: Gustavo A. R. Silva Date: Fri Jan 19 21:26:51 2018 -0600 PCI: altera: Fix bool initialization in tlp_read_packet() Bool variables should be initialized only through true and false values; update tlp_read_packet() code to comply. Detected using the Coccinelle tool. Fixes: eaa6111b70a7 ("PCI: altera: Add Altera PCIe host controller driver") Signed-off-by: Gustavo A. R. Silva [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Ley Foon Tan drivers/pci/host/pcie-altera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82695b30ffeeab665f41416c6f5015dea3147bd5 Author: Stephen Hemminger Date: Tue Feb 27 15:48:21 2018 -0800 inet: whitespace cleanup Ran simple script to find/remove trailing whitespace and blank lines at EOF because that kind of stuff git whines about and editors leave behind. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller include/net/ethoc.h | 1 - include/net/flow.h | 2 +- include/net/inet_connection_sock.h | 10 +++++----- include/net/ip.h | 12 ++++++------ include/net/ip_fib.h | 2 +- include/net/ipv6.h | 10 +++++----- include/net/xfrm.h | 14 +++++++------- net/ipv4/fib_semantics.c | 2 +- net/ipv4/proc.c | 1 - net/ipv4/tunnel4.c | 2 +- net/ipv4/xfrm4_policy.c | 1 - net/ipv6/anycast.c | 1 - net/ipv6/exthdrs_core.c | 1 - net/ipv6/ipv6_sockglue.c | 1 - net/ipv6/proc.c | 1 - net/ipv6/xfrm6_state.c | 1 - 16 files changed, 27 insertions(+), 35 deletions(-) commit 262c9740159ab0286663b46b00e20845fed05e57 Author: Hernán Gonzalez Date: Tue Feb 27 19:29:23 2018 -0300 emulex/benet: Constify *be_misconfig_evt_port_state[] Note: This is compile only tested as I have no access to the hw. No benefit gained except for some self-documenting. add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0 (0) Function old new delta Total: Before=2757703, After=2757703, chg +0.00% Signed-off-by: Hernán Gonzalez Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_cmds.c | 2 +- drivers/net/ethernet/emulex/benet/be_cmds.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4f4aaa1720a3dac0e7afb51bf1177eb66d9c2172 Author: Hernán Gonzalez Date: Tue Feb 27 19:31:34 2018 -0300 qlogic/qed: Constify *pkt_type_str[] Note: This is compile only tested as I have no access to the hw. Constifying and declaring as static saves 24 bytes. add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-24 (-24) Function old new delta pkt_type_str 24 - -24 Total: Before=3599256, After=3599232, chg -0.00% Signed-off-by: Hernán Gonzalez Acked-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02f208c5c60549039445402505dea284e15f0f4f Author: Sudeep Holla Date: Thu Jul 20 14:43:07 2017 +0100 cpufreq: scmi: add support for fast frequency switching The cpufreq core provides option for drivers to implement fast_switch callback which is invoked for frequency switching from interrupt context. This patch adds support for fast_switch callback in SCMI cpufreq driver by making use of polling based SCMI transfer. It also sets the flag fast_switch_possible. Cc: linux-pm@vger.kernel.org Acked-by: Rafael J. Wysocki Acked-by: Viresh Kumar Signed-off-by: Sudeep Holla drivers/cpufreq/scmi-cpufreq.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 99d6bdf3387734d75e3e34e94a58b8a355b7a9c8 Author: Sudeep Holla Date: Sun Jun 18 09:38:11 2017 +0100 cpufreq: add support for CPU DVFS based on SCMI message protocol On some ARM based systems, a separate Cortex-M based System Control Processor(SCP) provides the overall power, clock, reset and system control including CPU DVFS. SCMI Message Protocol is used to communicate with the SCP. This patch adds a cpufreq driver for such systems using SCMI interface to drive CPU DVFS. Cc: linux-pm@vger.kernel.org Acked-by: Rafael J. Wysocki Acked-by: Viresh Kumar Signed-off-by: Sudeep Holla MAINTAINERS | 2 +- drivers/cpufreq/Kconfig.arm | 11 ++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/scmi-cpufreq.c | 246 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 259 insertions(+), 1 deletion(-) commit b23688aefb8b2c5dd024c172f3143e8a99d2cf17 Author: Sudeep Holla Date: Thu Jun 15 10:53:17 2017 +0100 hwmon: add support for sensors exported via ARM SCMI Create a driver to add support for SoC sensors exported by the System Control Processor (SCP) via the System Control and Management Interface (SCMI). The supported sensor types is one of voltage, temperature, current, and power. The sensor labels and values provided by the SCP are exported via the hwmon sysfs interface. Cc: linux-hwmon@vger.kernel.org Acked-by: Guenter Roeck Signed-off-by: Sudeep Holla drivers/hwmon/Kconfig | 12 +++ drivers/hwmon/Makefile | 1 + drivers/hwmon/scmi-hwmon.c | 225 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 238 insertions(+) commit d57538004b2e57be6a5d8583b65d1b049245abf7 Author: Sudeep Holla Date: Wed Sep 27 16:20:50 2017 +0100 hwmon: (core) Add hwmon_max to hwmon_sensor_types enumeration It's useful to know the maximum types of sensor supported by hwmon framework. It can be used to allocate some data structures when sorting the monitors based on their type. This will be used by scmi hwmon support. Cc: linux-hwmon@vger.kernel.org Acked-by: Guenter Roeck Signed-off-by: Sudeep Holla include/linux/hwmon.h | 1 + 1 file changed, 1 insertion(+) commit 6d6a1d82eaef705f150c441350559bf5daccb533 Author: Sudeep Holla Date: Tue Jun 13 17:19:36 2017 +0100 clk: add support for clocks provided by SCMI On some ARM based systems, a separate Cortex-M based System Control Processor(SCP) provides the overall power, clock, reset and system control. System Control and Management Interface(SCMI) Message Protocol is defined for the communication between the Application Cores(AP) and the SCP. This patch adds support for the clocks provided by SCP using SCMI protocol. Cc: linux-clk@vger.kernel.org Cc: Michael Turquette Acked-by: Stephen Boyd Signed-off-by: Sudeep Holla MAINTAINERS | 2 +- drivers/clk/Kconfig | 10 +++ drivers/clk/Makefile | 1 + drivers/clk/clk-scmi.c | 202 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 214 insertions(+), 1 deletion(-) commit 898216c97ed2ebfffda659ce12388da43534de6c Author: Sudeep Holla Date: Wed Jun 14 13:48:26 2017 +0100 firmware: arm_scmi: add device power domain support using genpd This patch hooks up the support for device power domain provided by SCMI using the Linux generic power domain infrastructure. Cc: Kevin Hilman Reviewed-by: Ulf Hansson Signed-off-by: Sudeep Holla drivers/firmware/Kconfig | 13 +++ drivers/firmware/arm_scmi/Makefile | 1 + drivers/firmware/arm_scmi/scmi_pm_domain.c | 129 +++++++++++++++++++++++++++++ 3 files changed, 143 insertions(+) commit 907b6d14911db047e6e29979895d29daf2ec1e5f Author: Sudeep Holla Date: Mon Jul 31 15:43:27 2017 +0100 firmware: arm_scmi: add per-protocol channels support using idr objects In order to maintain the channel information per protocol, we need some sort of list or hashtable to hold all this information. IDR provides sparse array mapping of small integer ID numbers onto arbitrary pointers. In this case the arbitrary pointers can be pointers to the channel information. This patch adds support for per-protocol channels using those idr objects. Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/driver.c | 54 +++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 12 deletions(-) commit fbc4d81ad28545714a1e367963aaf2ffd9be5239 Author: Sudeep Holla Date: Mon Jul 31 15:25:32 2017 +0100 firmware: arm_scmi: refactor in preparation to support per-protocol channels In order to support per-protocol channels if available, we need to factor out all the mailbox channel information(Tx/Rx payload and channel handle) out of the main SCMI instance information structure. This patch refactors the existing channel information into a separate chan_info structure. Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/driver.c | 90 ++++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 34 deletions(-) commit 5c4ba3cc85296398855d621bf90b78866ea80444 Author: Sudeep Holla Date: Fri Jul 21 11:42:24 2017 +0100 firmware: arm_scmi: add option for polling based performance domain operations In order to implement fast CPU DVFS switching, we need to perform all DVFS operations atomically. Since SCMI transfer already provide option to choose between pooling vs interrupt driven(default), we can opt for polling based transfers for set,get performance domain operations. This patch adds option to choose between polling vs interrupt driven SCMI transfers for set,get performance level operations. Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/perf.c | 19 +++++++++++-------- include/linux/scmi_protocol.h | 8 ++++---- 2 files changed, 15 insertions(+), 12 deletions(-) commit d4c3751a8de2deeaae546b97650f895b62bbd1b4 Author: Sudeep Holla Date: Thu Jul 20 14:39:57 2017 +0100 firmware: arm_scmi: add support for polling based SCMI transfers It would be useful to have options to perform some SCMI transfers atomically by polling for the completion flag instead of interrupt driven. The SCMI specification has option to disable the interrupt and poll for the completion flag in the shared memory. This patch adds support for polling based SCMI transfers using that option. This might be used for uninterrupted/atomic DVFS operations from the scheduler context. Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/driver.c | 55 ++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 8 deletions(-) commit bc40081d9825c7ed34501ebfc0a533047a07b16c Author: Sudeep Holla Date: Tue Jun 6 11:39:08 2017 +0100 firmware: arm_scmi: probe and initialise all the supported protocols Now that we have basic support for all the protocols in the specification, let's probe them individually and initialise them. Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/driver.c | 51 +++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) commit 5179c523c1eae4b80fbafe9656bc24a375217cac Author: Sudeep Holla Date: Tue Jun 6 11:38:10 2017 +0100 firmware: arm_scmi: add initial support for sensor protocol The sensor protocol provides functions to manage platform sensors, and provides the commands to describe the protocol version and the various attribute flags. It also provides commands to discover various sensors implemented and managed by the platform, read any sensor synchronously or asynchronously as allowed by the platform, program sensor attributes and/or configurations, if applicable. This patch adds support for most of the above features. Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/Makefile | 2 +- drivers/firmware/arm_scmi/sensors.c | 291 ++++++++++++++++++++++++++++++++++++ include/linux/scmi_protocol.h | 46 ++++++ 3 files changed, 338 insertions(+), 1 deletion(-) commit 76a6550990e296a7acbb4d33201c9740be912a8c Author: Sudeep Holla Date: Tue Jun 6 11:32:24 2017 +0100 firmware: arm_scmi: add initial support for power protocol The power protocol is intended for management of power states of various power domains. The power domain management protocol provides commands to describe the protocol version, discover the implementation specific attributes, set and get the power state of a domain. This patch adds support for the above mention features of the protocol. Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Sudeep Holla -- drivers/firmware/arm_scmi/Makefile | 2 +- drivers/firmware/arm_scmi/power.c | 242 +++++++++++++++++++++++++++++++++++++ include/linux/scmi_protocol.h | 28 +++++ 3 files changed, 271 insertions(+), 1 deletion(-) create mode 100644 drivers/firmware/arm_scmi/power.c drivers/firmware/arm_scmi/Makefile | 2 +- drivers/firmware/arm_scmi/power.c | 221 +++++++++++++++++++++++++++++++++++++ include/linux/scmi_protocol.h | 28 +++++ 3 files changed, 250 insertions(+), 1 deletion(-) commit 5f6c6430e904d21bfe5d0076b1ff3e8b9ed94ba0 Author: Sudeep Holla Date: Tue Jun 6 11:27:57 2017 +0100 firmware: arm_scmi: add initial support for clock protocol The clock protocol is intended for management of clocks. It is used to enable or disable clocks, and to set and get the clock rates. This protocol provides commands to describe the protocol version, discover various implementation specific attributes, describe a clock, enable and disable a clock and get/set the rate of the clock synchronously or asynchronously. This patch adds initial support for the clock protocol. Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/Makefile | 2 +- drivers/firmware/arm_scmi/clock.c | 342 +++++++++++++++++++++++++++++++++++++ include/linux/scmi_protocol.h | 44 +++++ 3 files changed, 387 insertions(+), 1 deletion(-) commit a9e3fbfaa0ff885aacafe6f33e72448a2993d072 Author: Sudeep Holla Date: Tue Jun 6 11:22:51 2017 +0100 firmware: arm_scmi: add initial support for performance protocol The performance protocol is intended for the performance management of group(s) of device(s) that run in the same performance domain. It includes even the CPUs. A performance domain is defined by a set of devices that always have to run at the same performance level. For example, a set of CPUs that share a voltage domain, and have a common frequency control, is said to be in the same performance domain. The commands in this protocol provide functionality to describe the protocol version, describe various attribute flags, set and get the performance level of a domain. It also supports discovery of the list of performance levels supported by a performance domain, and the properties of each performance level. This patch adds basic support for the performance protocol. Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/Makefile | 2 +- drivers/firmware/arm_scmi/common.h | 1 + drivers/firmware/arm_scmi/perf.c | 478 +++++++++++++++++++++++++++++++++++++ include/linux/scmi_protocol.h | 42 ++++ 4 files changed, 522 insertions(+), 1 deletion(-) commit 933c504424a2bc784fdb4cd5c318049d55da20e0 Author: Sudeep Holla Date: Mon Oct 30 18:33:30 2017 +0000 firmware: arm_scmi: add scmi protocol bus to enumerate protocol devices The SCMI specification encompasses various protocols. However, not every protocol has to be present on a given platform/implementation as not every protocol is relevant for it. Furthermore, the platform chooses which protocols it exposes to a given agent. The only protocol that must be implemented is the base protocol. The base protocol is used by an agent to discover which protocols are available to it. In order to enumerate the discovered implemented protocols, this patch adds support for a separate scmi protocol bus. It also adds mechanism to register support for different protocols. Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/Makefile | 3 +- drivers/firmware/arm_scmi/bus.c | 221 +++++++++++++++++++++++++++++++++++++ drivers/firmware/arm_scmi/common.h | 1 + include/linux/scmi_protocol.h | 64 +++++++++++ 4 files changed, 288 insertions(+), 1 deletion(-) commit b6f20ff8bd94ad34032804a60bab5ee56752007e Author: Sudeep Holla Date: Tue Jun 6 11:16:15 2017 +0100 firmware: arm_scmi: add common infrastructure and support for base protocol The base protocol describes the properties of the implementation and provide generic error management. The base protocol provides commands to describe protocol version, discover implementation specific attributes and vendor/sub-vendor identification, list of protocols implemented and the various agents are in the system including OSPM and the platform. It also supports registering for notifications of platform errors. This protocol is mandatory. This patch adds support for the same along with some basic infrastructure to add support for other protocols. Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/Makefile | 3 +- drivers/firmware/arm_scmi/base.c | 253 +++++++++++++++++++++++++++++++++++++ drivers/firmware/arm_scmi/common.h | 37 ++++++ drivers/firmware/arm_scmi/driver.c | 53 ++++++++ include/linux/scmi_protocol.h | 37 ++++++ 5 files changed, 382 insertions(+), 1 deletion(-) commit aa4f886f3893f88146e8e02fd1e9c5c9e43cbcc1 Author: Sudeep Holla Date: Tue Mar 28 11:36:07 2017 +0100 firmware: arm_scmi: add basic driver infrastructure for SCMI The SCMI is intended to allow OSPM to manage various functions that are provided by the hardware platform it is running on, including power and performance functions. SCMI provides two levels of abstraction, protocols and transports. Protocols define individual groups of system control and management messages. A protocol specification describes the messages that it supports. Transports describe the method by which protocol messages are communicated between agents and the platform. This patch adds basic infrastructure to manage the message allocation, initialisation, packing/unpacking and shared memory management. Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Sudeep Holla MAINTAINERS | 3 +- drivers/firmware/Kconfig | 21 ++ drivers/firmware/Makefile | 1 + drivers/firmware/arm_scmi/Makefile | 2 + drivers/firmware/arm_scmi/common.h | 66 ++++ drivers/firmware/arm_scmi/driver.c | 678 +++++++++++++++++++++++++++++++++++++ include/linux/scmi_protocol.h | 16 + 7 files changed, 786 insertions(+), 1 deletion(-) commit fe7be8b297b279189260f8ce084ea16fab0c2be0 Author: Sudeep Holla Date: Mon Jun 5 17:27:11 2017 +0100 dt-bindings: arm: add support for ARM System Control and Management Interface(SCMI) protocol This patch adds devicetree binding for System Control and Management Interface (SCMI) Message Protocol used between the Application Cores(AP) and the System Control Processor(SCP). The MHU peripheral provides a mechanism for inter-processor communication between SCP's M3 processor and AP. SCP offers control and management of the core/cluster power states, various power domain DVFS including the core/cluster, certain system clocks configuration, thermal sensors and many others. SCMI protocol is developed as better replacement to the existing SCPI which is not flexible and easily extensible. Cc: Mark Rutland Acked-by: Rob Herring Signed-off-by: Sudeep Holla Documentation/devicetree/bindings/arm/arm,scmi.txt | 179 +++++++++++++++++++++ MAINTAINERS | 4 +- 2 files changed, 181 insertions(+), 2 deletions(-) commit 07455e4e4321129af0053c61191707ccf8289fc7 Author: Sudeep Holla Date: Mon Jun 26 16:02:39 2017 +0100 dt-bindings: mailbox: add support for mailbox client shared memory Many users of the mailbox controllers depend on the shared memory between the two end points to exchange the main data while using simple doorbell mechanism to alert the end points of the presence of a message. This patch defines device tree bindings to represent such shared memory in a generic way. Cc: Mark Rutland Acked-by: Rob Herring Signed-off-by: Sudeep Holla .../devicetree/bindings/mailbox/mailbox.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 449059a9692c5f01305bffcca72befc4621f6dbb Author: Ville Syrjälä Date: Thu Feb 22 20:10:33 2018 +0200 drm/i915: Consult aux_ch instead of port in ->get_aux_clock_divider() While it seems totally unlikely that any system would mix a cpu/north aux channel with a pch/south port (or vice versa) we should still consult intel_dp->aux_ch rather than encoder->port when figuring out which clock is actually used by the aux ch. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180222181036.15251-5-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson #irc drivers/gpu/drm/i915/intel_dp.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 2824db741b650fc22f066924a2bfa3fb47054b6d Merge: 44d15d9 3bb3526 Author: David S. Miller Date: Wed Feb 28 11:07:12 2018 -0500 Merge branch 'SFP-updates' Russell King says: ==================== SFP updates Included in this series are a further few updates for SFP support: - Adding support for Fiberstore's non-standard BiDi modules operating at 1310nm/1550nm wavelengths rather than the 1000BASE-BX standard of 1310nm/1490nm. - Adding support for negotiating the PHY interface mode with the MAC, so that modules supporting faster speeds and Gigabit ethernet work with Gigabit-only MACs. - Adding support for high power (>1W) SFP modules. ==================== Signed-off-by: David S. Miller commit 3bb35261c74e394aa42d0c636d2608093a1e3309 Author: Jon Nettleton Date: Tue Feb 27 15:53:12 2018 +0000 sfp: add high power module support This patch is the result of work by both Jon Nettleton and Russell King. Jon wrote the original patch, adding support for SFP modules which require a power level greater than '1'. Russell's changes: - Fix the power levels for big-endian, and make the code flow better. - Convert to use device_property_read_u8() - Warn for power levels exceeding host level SFF-8431 says: "To avoid exceeding system power supply limits and cooling capacity, all modules at power up by default shall operate with up to 1.0 W. Hosts supporting Power Level II or III operation may enable a Power Level II or III module through the 2-wire interface. Power Level II or III modules shall assert the power level declaration bit of SFF-8472." Print a warning for modules that exceed the host power level, and leave them operating in power level 1. - Fix i2c write The first byte of any write after the bus address is always the device address. In order to write a value to device D, address I, value V, we need to generate on the bus: S DDDDDDDD A IIIIIIII A VVVVVVVV A P where S = start, R = restart, A = ack, P = stop. Splitting this as two: S DDDDDDDD A IIIIIIII A R DDDDDDDD A VVVVVVVV A P results in the device's address register being written first by I and then by V - the addressed register within the device is not written. - Avoid power mode switching if 0xa2 is not implemented Some modules indicate that they support power level II or power level III, but do not implement address 0xa2, meaning that the bit to set them to high power mode is not accessible. These modules appear to have the sff8472_compliance field set to zero, and also do not implement diagnostics. Detect this, but also ensure that the module does not require the address switching mode, which we do not implement. - Use mW for power level rather than power level number. - Fix high power mode transition We must not switch to SFP_MOD_PRESENT state until we have finished initialising, because the remaining state machines check for that state. Add SFP_MOD_HPOWER as an intermediate state. - Use definition for I2C register address rather than constant. Signed-off-by: Jon Nettleton Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/sfp.c | 150 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 132 insertions(+), 18 deletions(-) commit 66f5325ce93a2e6fd726fca31fea91baf36a392e Author: Russell King Date: Tue Feb 27 15:53:07 2018 +0000 dt-bindings: add maximum power level to SFP binding Add the new maximum power level property to the SFP binding. Signed-off-by: Russell King Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/sff,sfp.txt | 5 +++++ 1 file changed, 5 insertions(+) commit a9c79364df324a69ba1b71accd5b8a3155e570ac Author: Russell King Date: Tue Feb 27 15:53:02 2018 +0000 phylink,sfp: negotiate interface format with MAC Negotiate the interface format with the MAC rather than requiring it to be a fixed type specified solely by the SFP module. This allows modules that can work with several different interface signalling formats to select a format compatible with the MAC - for example, a Fiber module supporing Gigabit ethernet and faster connected to a Gigabit only MAC needs to select the 1000BASE-X mode. Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 33 ++++++++------- drivers/net/phy/sfp-bus.c | 101 ++++++++++++++++++---------------------------- include/linux/sfp.h | 18 +++++---- 3 files changed, 68 insertions(+), 84 deletions(-) commit 03145864bd0fcac29e33442f39d67d4f28b0777c Author: Russell King Date: Tue Feb 27 15:52:57 2018 +0000 sfp: support 1G BiDi (eg, FiberStore SFP-GE-BX) modules Some BiDi modules (eg, FiberStore SFP-GE-BX) are not compliant with 1000BASE-BX as they use different wavelengths from the 1000BASE-BX standard (eg, 1310nm/1550nm rather than 1310nm/1490nm). These modules support 1000BASE-X ethernet, so detect them by a failure to find any other support, the 8B10B encoding and a bit rate that falls within the 1Gbps window. Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/sfp-bus.c | 61 +++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 23 deletions(-) commit 44d15d930bb8463d10b05bbed45e881e5055495a Author: Ido Schimmel Date: Tue Feb 27 17:38:08 2018 +0200 team: Use extack to report enslavement failures Use extack inside team's enslavement function and also propagate it to the netdevice notifier to allow enslaved ports to report the failure reason. Example: $ teamd -t team0 -d -c '{"runner": {"name": "lacp"}}' $ ip link set dev lo master team0 Error: Loopback device can't be added as a team port. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Acked-by: David Ahern Signed-off-by: David S. Miller drivers/net/team/team.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit e9d328d3b753d6f9c75653107fc0689a8e681b16 Author: Jacob Keller Date: Thu Jan 18 09:18:57 2018 -0800 fm10k: bump version number We're aligned with latest version released on SourceForge, so update the version number to match. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7d6707a9daa8f491923406d37e86b55384c6b9fb Author: Jacob Keller Date: Tue Jan 16 11:20:52 2018 -0800 fm10k: fix incorrect warning for function prototype Recent kernels now complain about incorrect function prototype comments, in order to ensure comments are accurate to the function. However, it incorrectly associates the comment above the fm10k_pci_tbl[] as a function header comment. Fix this by removing the extra "*" in the comment. This normally indicates that the function is a doxygen style function header comment. Once removed, the logic no longer kicks in and the following warning is fixed: warning: cannot understand function prototype: 'const struct pci_device_id fm10k_pci_tbl[] = ' Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 363656eb5e574b6dab513a10b7166f08783fa3e3 Author: Jacob Keller Date: Tue Jan 16 11:20:51 2018 -0800 fm10k: fix function doxygen comments Several function header comments had incorrect function parameter definitions. Recent versions of the upstream kernel have started to warn about these issues. Fix up the comments which do not match in order to resolve these new warnings. While fixing these, update the copyright year also. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_common.c | 5 +++-- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 10 +++++----- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 11 ++++++----- drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 4 ++-- drivers/net/ethernet/intel/fm10k/fm10k_tlv.c | 7 ++++--- 5 files changed, 20 insertions(+), 17 deletions(-) commit ed08b63c8b3e23dfc8a32f0b450a23a35a3d91b4 Author: Nicolas Ferre Date: Wed Feb 28 15:56:43 2018 +0100 ARM: at91: Kconfig: Update company to Microchip Update AT91 Kconfig text and help to move from Atmel to Microchip. The AT91 wording is kept in the title for historical reasons. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/mach-at91/Kconfig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 8255c6b78c46b88badef15768762c7cdb914b8ee Author: Nicolas Ferre Date: Wed Feb 28 15:56:42 2018 +0100 Documentation: at91: Update Microchip SoC documentation We move the former Atmel wording to the the new Microchip name for this SoC family. With the name of the directory we also change the content in relation with the update of the MAINTAINERS file. The Datasheet links now point to real documents instead of 404s. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni Documentation/arm/Atmel/README | 171 ------------------------------------- Documentation/arm/Microchip/README | 169 ++++++++++++++++++++++++++++++++++++ 2 files changed, 169 insertions(+), 171 deletions(-) commit 41ad9232f2e68e0c86ffebb91efb4d8c071502b6 Author: Nicolas Ferre Date: Wed Feb 28 15:56:41 2018 +0100 MAINTAINERS: ARM: at91: update entry for ARM/Microchip Change the entry name and move it to its alphabetical location. We move to ARM/Microchip instead of ARM/ATMEL to reflect the merger that is now nearly 2 years old. AT91 is kept as the identity of our community. The atmel pattern is obviously kept as well. I removed the names of the different SoCs as they are better exposed in the arch/arm/mach-at91/Kconfig entries. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni MAINTAINERS | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit fee05843801c37e527dbe2c5eeb3fb3b15bc9919 Author: Lorenzo Bianconi Date: Fri Feb 16 23:30:01 2018 +0100 mt7601u: make write with mask access atomic Introduce __mt7601u_rr and __mt7601u_vendor_single_wr routines in order to make mt7601u_rmw and mt7601u_rmc atomic. This patch does not fix a reported issue but makes the usb access more robust to concurrent operations on the same register since it is theoretically possible that read and write accesses of mt7601u_rmw/mt7601u_rmc can be interleaved with a different write operation on the same register. Moreover using __mt7601u_rr and __mt7601u_vendor_single_wr in mt7601u_rmw/mt7601u_rmc allows to grab vendor_req_mutex mutex once instead of twice Signed-off-by: Lorenzo Bianconi Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt7601u/mt7601u.h | 3 +- drivers/net/wireless/mediatek/mt7601u/usb.c | 52 ++++++++++++++++++------- 2 files changed, 39 insertions(+), 16 deletions(-) commit 7972326a26b5bf8dc2adac575c4e03ee7e9d193a Author: Sudhir Sreedharan Date: Thu Feb 15 12:52:45 2018 +0530 rtl8187: Fix NULL pointer dereference in priv->conf_mutex This can be reproduced by bind/unbind the driver multiple times in AM3517 board. Analysis revealed that rtl8187_start() was invoked before probe finishes(ie. before the mutex is initialized). INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 0 PID: 821 Comm: wpa_supplicant Not tainted 4.9.80-dirty #250 Hardware name: Generic AM3517 (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (register_lock_class+0x4f4/0x55c) [] (register_lock_class) from [] (__lock_acquire+0x74/0x1938) [] (__lock_acquire) from [] (lock_acquire+0xfc/0x23c) [] (lock_acquire) from [] (mutex_lock_nested+0x50/0x3b0) [] (mutex_lock_nested) from [] (rtl8187_start+0x2c/0xd54) [] (rtl8187_start) from [] (drv_start+0xa8/0x320) [] (drv_start) from [] (ieee80211_do_open+0x2bc/0x8e4) [] (ieee80211_do_open) from [] (__dev_open+0xb8/0x120) [] (__dev_open) from [] (__dev_change_flags+0x88/0x14c) [] (__dev_change_flags) from [] (dev_change_flags+0x18/0x48) [] (dev_change_flags) from [] (devinet_ioctl+0x738/0x840) [] (devinet_ioctl) from [] (sock_ioctl+0x164/0x2f4) [] (sock_ioctl) from [] (do_vfs_ioctl+0x8c/0x9d0) [] (do_vfs_ioctl) from [] (SyS_ioctl+0x6c/0x7c) [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x1c) Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = cd1ec000 [00000000] *pgd=8d1de831, *pte=00000000, *ppte=00000000 Internal error: Oops: 817 [#1] PREEMPT ARM Modules linked in: CPU: 0 PID: 821 Comm: wpa_supplicant Not tainted 4.9.80-dirty #250 Hardware name: Generic AM3517 (Flattened Device Tree) task: ce73eec0 task.stack: cd1ea000 PC is at mutex_lock_nested+0xe8/0x3b0 LR is at mutex_lock_nested+0xd0/0x3b0 Cc: stable@vger.kernel.org Signed-off-by: Sudhir Sreedharan Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 032a552e8dc9d2147e34157bb3b0b23e8f418e43 Author: Lorenzo Bianconi Date: Thu Feb 8 23:08:09 2018 +0100 mt7601u: set device mac address in mt7601u_add_interface() If mac80211 adds a vif with a different mac address respect to the eeprom one, the device will not be able to connect to the ap since the hw address has not been updated. Fix the issue updating hw mac address in mt7601u_add_interface routine BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1516935 Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt7601u/main.c | 3 +++ 1 file changed, 3 insertions(+) commit e96826bde3db15d37ebb7905c24a071d457e9132 Author: Lorenzo Bianconi Date: Thu Feb 8 23:08:08 2018 +0100 mt7601u: move mt7601u_set_macaddr in mac related code Remove static qualifier from mt7601u_set_macaddr routine and move it in mac related code in order to be used to properly support vif with different mac address respect to the default one Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt7601u/eeprom.c | 24 ++---------------------- drivers/net/wireless/mediatek/mt7601u/mac.c | 16 ++++++++++++++++ drivers/net/wireless/mediatek/mt7601u/mac.h | 1 + 3 files changed, 19 insertions(+), 22 deletions(-) commit fb66cb0775609852b812c9bc2bd1589374317410 Merge: 3f5a683 ec9c2fb Author: David S. Miller Date: Wed Feb 28 09:54:54 2018 -0500 Merge tag 'mlx5-updates-2018-02-23' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: mlx5-update-2018-02-23 (IB representors) From: Mark Bloch ========= Add IB representor when in switchdev mode The following series adds support for an IB (RAW Ethernet only) device representor which is created when the user switches to switchdev mode. Today when switching to switchdev mode the only representors which are created are net devices. Each netdev is a representor of a virtual function and any data sent via the representor is received on the virtual function, and any data sent via the virtual function is received by the representor. For the mlx5 driver the main use of this functionality is to be able to use Open vSwitch on the hypervisor in order to manage/control traffic from/to the virtual functions. Open vSwitch can also work with DPDK devices and not just net devices, this series exposes an IB device, which Mellanox PMD driver uses, which then can be used by Open vSwitch DPDK. An IB device representor exposes only RAW Ethernet QP capabilities and the ability to create flow rules to direct traffic to its RX queues. The state of the IB device (ACTIVE/DOWN etc..) is based on the state of the corresponding net device representor. No other RDMA/RoCE functionality is currently supported and no GID table is exposed. ========= Signed-off-by: David S. Miller commit 09e93f28aa8d37a07d0c2ad742d085a21d845cda Author: Lorenzo Bianconi Date: Thu Feb 1 01:27:36 2018 +0100 mt76x2: remove warnings in mt76x2_mac_write_txwi() Fix following sparse warnings in mt76x2_mac_write_txwi: - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:201:26: warning: incorrect type in assignment (different base types) - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:201:26: expected restricted __le32 [usertype] iv - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:201:26: got unsigned int [unsigned] [usertype] - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:202:27: warning: incorrect type in assignment (different base types) - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:202:27: expected restricted __le32 [usertype] eiv - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:202:27: got unsigned int [unsigned] [usertype] Fixes: 23405236460b ("mt76: fix transmission of encrypted management frames") Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt76/mt76x2_mac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 882164a4a928bcaa53280940436ca476e6b1db8e Author: Matt Redfearn Date: Fri Jan 12 14:25:59 2018 +0000 ssb: Prevent build of PCI host features in module Attempting to build ssb.ko with CONFIG_SSB_DRIVER_PCICORE=y results in a build error due to use of symbols not exported from vmlinux: ERROR: "pcibios_enable_device" [drivers/ssb/ssb.ko] undefined! ERROR: "register_pci_controller" [drivers/ssb/ssb.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1 To prevent this, don't allow the host mode feature to be built if CONFIG_SSB=m Signed-off-by: Matt Redfearn Signed-off-by: Kalle Valo drivers/ssb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 985324a16efb5a1b002c057ff457e28fb3f7480e Author: Denis 'GNUtoo' Carikli Date: Thu Feb 8 17:25:42 2018 +0100 bcma: add HP Stream Notebook In this laptop we have the following PCI device: 02:00.0 Network controller [0280]: Broadcom Limited BCM43142 802.11b/g/n [14e4:4365] (rev 01) Subsystem: Hewlett-Packard Company BCM43142 802.11b/g/n [103c:804a] [...] Region 0: Memory at 91000000 (64-bit, non-prefetchable) [size=32K] [...] With this patch, we can now see its WiFi chip: bcma: bus0: Found chip with id 43142, rev 0x01 and package 0x08 bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x28, class 0x0) bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x21, class 0x0) bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x16, class 0x0) bcma: bus0: Core 3 found: UNKNOWN (manuf 0x43B, id 0x368, rev 0x00, class 0x0) bcma: bus0: Found rev 15 PMU (capabilities 0x518C5E0F) bcma: bus0: SPROM offset 0x840 bcma: bus0: Found SPROM revision 10 bcma: bus0: Workarounds unknown or not needed for device 0xA886 bcma: bus0: Bus registered But it not yet supported by brcmsmac so it won't work for now: brcmsmac bcma0:1: brcms_b_attach wl0: vendor 0x14e4 device 0x4365 brcmsmac: unknown device id 4365 Signed-off-by: Denis 'GNUtoo' Carikli Signed-off-by: Kalle Valo drivers/bcma/host_pci.c | 1 + 1 file changed, 1 insertion(+) commit 6aed2a885041f75ee9fdaa54a5d16134c1f83e51 Author: Uwe Kleine-König Date: Tue Feb 27 22:44:56 2018 +0100 serial: imx: document functions that are called with port.lock taken Consistently indicate being called with irqs off and the port lock taken for all functions that this applies to. Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 302e8dcc3f78261f7f8fdd3baa452944c515a219 Author: Uwe Kleine-König Date: Tue Feb 27 22:44:55 2018 +0100 serial: imx: Rename register fields to match newer reference manuals Only the reference manual for the i.MX1 (I have MC9328MX1RM/D Rev 5 from 2004) uses TDMAEN and RDMAEN for these. All reference manuals for the newer chips use TXDMAEN and RXDMAEN. Update to the newer name with the assumption that most imx users don't use an imx1 any more. Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit aad76f2c48b70d993706580c254a89326ad4d7de Author: Andy Shevchenko Date: Fri Feb 2 18:46:36 2018 +0200 serial, pci_ids: Move duplicate IDs to PCI IDs database PCI ID database is for IDs used across several drivers. Here is the case for SUNIX combo cards. No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_serial.c | 3 --- drivers/tty/serial/8250/8250_pci.c | 3 --- include/linux/pci_ids.h | 3 +++ 3 files changed, 3 insertions(+), 6 deletions(-) commit e7d75e18d0fc3f7193b65282b651f980c778d935 Author: Geert Uytterhoeven Date: Fri Feb 23 14:38:37 2018 +0100 serial: xuartps: Fix out-of-bounds access through DT alias The cdns_uart_port[] array is indexed using a value derived from the "serialN" alias in DT, which may lead to an out-of-bounds access. Fix this by adding a range check. Fixes: 928e9263492069ee ("tty: xuartps: Initialize ports according to aliases") Signed-off-by: Geert Uytterhoeven Reviewed-by: Michal Simek Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96c611c2b7bc897a6d16d58c76751f48707a4ac5 Author: Geert Uytterhoeven Date: Fri Feb 23 14:38:36 2018 +0100 serial: sirf: Fix out-of-bounds access through DT alias The sirf_ports[] array is indexed using a value derived from the "serialN" alias in DT, which may lead to an out-of-bounds access. Fix this by adding a range check. Fixes: a6ffe8966acbb66b ("serial: sirf: use dynamic method allocate uart structure") Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sirfsoc_uart.c | 5 +++++ 1 file changed, 5 insertions(+) commit 090fa4b0dccfa3d04e1c5ab0fe4eba16e6713895 Author: Geert Uytterhoeven Date: Fri Feb 23 14:38:35 2018 +0100 serial: sh-sci: Fix out-of-bounds access through DT alias The sci_ports[] array is indexed using a value derived from the "serialN" alias in DT, which may lead to an out-of-bounds access. Fix this by adding a range check. Note that the array size is defined by a Kconfig symbol (CONFIG_SERIAL_SH_SCI_NR_UARTS), so this can even be triggered using a legitimate DTB. Fixes: 97ed9790c514066b ("serial: sh-sci: Remove unused platform data capabilities field") Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 4 ++++ 1 file changed, 4 insertions(+) commit 49ee23b71877831ac087d6083f6f397dc19c9664 Author: Geert Uytterhoeven Date: Fri Feb 23 14:38:34 2018 +0100 serial: samsung: Fix out-of-bounds access through serial port index The s3c24xx_serial_ports[] array is indexed using a value derived from the "serialN" alias in DT, or from an incrementing probe index, which may lead to an out-of-bounds access. Fix this by adding a range check. Note that the array size is defined by a Kconfig symbol (CONFIG_SERIAL_SAMSUNG_UARTS), so this can even be triggered using a legitimate DTB or legitimate board code. Fixes: 13a9f6c64fdc55eb ("serial: samsung: Consider DT alias when probing ports") Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/samsung.c | 4 ++++ 1 file changed, 4 insertions(+) commit afc7851fab8329eddcf321c9e0a58c893f351dd6 Author: Geert Uytterhoeven Date: Fri Feb 23 14:38:33 2018 +0100 serial: pxa: Fix out-of-bounds access through serial port index The serial_pxa_ports[] array is indexed using a value derived from the "serialN" alias in DT, or from platform data, which may lead to an out-of-bounds access. Fix this by adding a range check. Fixes: 699c20f3e6310aa2 ("serial: pxa: add OF support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/pxa.c | 4 ++++ 1 file changed, 4 insertions(+) commit dd345a31bfdec350d2593e6de5964e55c7f19c76 Author: Geert Uytterhoeven Date: Fri Feb 23 14:38:32 2018 +0100 serial: mxs-auart: Fix out-of-bounds access through serial port index The auart_port[] array is indexed using a value derived from the "serialN" alias in DT, or from platform data, which may lead to an out-of-bounds access. Fix this by adding a range check. Fixes: 1ea6607d4cdc9179 ("serial: mxs-auart: Allow device tree probing") Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mxs-auart.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5673444821406dda5fc25e4b52aca419f8065a19 Author: Geert Uytterhoeven Date: Fri Feb 23 14:38:31 2018 +0100 serial: imx: Fix out-of-bounds access through serial port index The imx_ports[] array is indexed using a value derived from the "serialN" alias in DT, or from platform data, which may lead to an out-of-bounds access. Fix this by adding a range check. Fixes: ff05967a07225ab6 ("serial/imx: add of_alias_get_id() reference back") Signed-off-by: Geert Uytterhoeven Reviewed-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ffab87fdecc655cc676f8be8dd1a2c5e22bd6d47 Author: Geert Uytterhoeven Date: Fri Feb 23 14:38:30 2018 +0100 serial: fsl_lpuart: Fix out-of-bounds access through DT alias The lpuart_ports[] array is indexed using a value derived from the "serialN" alias in DT, which may lead to an out-of-bounds access. Fix this by adding a range check. Fixes: c9e2e946fb0ba5d2 ("tty: serial: add Freescale lpuart driver support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 4 ++++ 1 file changed, 4 insertions(+) commit f9f5786987e81d166c60833edcb7d1836aa16944 Author: Geert Uytterhoeven Date: Fri Feb 23 14:38:29 2018 +0100 serial: arc_uart: Fix out-of-bounds access through DT alias The arc_uart_ports[] array is indexed using a value derived from the "serialN" alias in DT, which may lead to an out-of-bounds access. Fix this by adding a range check. Note that the array size is defined by a Kconfig symbol (CONFIG_SERIAL_ARC_NR_PORTS), so this can even be triggered using a legitimate DTB. Fixes: ea28fd56fcde69af ("serial/arc-uart: switch to devicetree based probing") Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/arc_uart.c | 5 +++++ 1 file changed, 5 insertions(+) commit 42afa627c338e22bbde06c95bd7b46f960c91f79 Author: Uwe Kleine-König Date: Sun Feb 18 22:02:46 2018 +0100 serial: imx: drop check for enabled dma in .startup imx_shutdown() calls imx_disable_dma if .dma_is_enabled. So after imx_shudown() completes, .dma_is_enabled is zero. For this reason .dma_is_enabled is also zero when imx_startup() is called. So the check for this variable being zero can be dropped. Signed-off-by: Uwe Kleine-König Reviewed-by: Shawn Guo Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4238c00bb154be840c11540a81c5e99faa06a631 Author: Uwe Kleine-König Date: Sun Feb 18 22:02:45 2018 +0100 serial: imx: simplify tracking of dma being initialized The .dma_is_inited member is only set to a value != 0 when the port's startup function calls imx_uart_dma_init(). On shutdown of the port imx_uart_dma_exit is called which sets the value back to 0. So .dma_is_inited is always 0 when imx_startup() is called (assuming .startup() and .shutdown() are correctly balanced) and the check for !sport->dma_is_inited can go away. This allows to replace .dma_is_inited by a variable local to imx_startup. Signed-off-by: Uwe Kleine-König Reviewed-by: Shawn Guo Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 437768962f754d9501e5ba4d98b1f2a89dc62028 Author: Uwe Kleine-König Date: Sun Feb 18 22:02:44 2018 +0100 serial: imx: Only handle irqs that are actually enabled Handling an irq that isn't enabled can have some undesired side effects. Some of these are mentioned in the newly introduced code comment. Some of the irq sources already had their handling right, some don't. Handle them all in the same consistent way. The change for USR1_RRDY and USR1_AGTIM drops the check for dma_is_enabled. This is correct as UCR1_RRDYEN and UCR2_ATEN are always off if dma is enabled. Signed-off-by: Uwe Kleine-König Reviewed-by: Shawn Guo Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) commit 0399fd6147143ed9260041c9b466b67e60e1939e Author: Uwe Kleine-König Date: Sun Feb 18 22:02:43 2018 +0100 serial: imx: rename variables to match the register names Now the variable holding the value of register USR1 is called usr1 instead of sts which is more straight forward. The same is also done for sts2 which is called usr2 now. Signed-off-by: Uwe Kleine-König Reviewed-by: Shawn Guo Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 135ccb0129952966715074398f422c1517f2e7ad Author: Uwe Kleine-König Date: Sun Feb 18 22:02:42 2018 +0100 serial: imx: drop if that always evaluates to true The check sts & USR1_DTRD was just evaluated to true two lines above. So this change doesn't have any effect on the semantic of the driver. Fixes: 27e16501052e ("serial: imx: implement DSR irq handling for DTE mode") Signed-off-by: Uwe Kleine-König Reviewed-by: Shawn Guo Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6d049db7d3dc6a59facf4bb57b8ef555b66be3b7 Author: Quentin Schulz Date: Wed Feb 28 14:11:21 2018 +0100 ARM: dts: sun8i: a711: set regulator for each cluster of CPUs The Allwinner A83T is a SoC with two clusters of 4 A7 which have a different clock and regulator. Set the CPU regulator. Signed-off-by: Quentin Schulz Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2db639d8c1663d7543c9ab5323383d94c8a76c63 Author: Quentin Schulz Date: Wed Feb 28 14:11:22 2018 +0100 ARM: dts: sun8i: a83t: add stable OPP tables and CPUfreq The Allwinner A83T is an octacore A7 divided in two clusters of 4 A7, each cluster having its own regulator and clock. The operating points were found in Allwinner BSP and fex files. Note that there are a few OPPs that are missing: 1608000000Hz with 920000mV 1800000000Hz with 1000000mV 2016000000Hz with 1080000mV These OPPs are pretty unstable but it might be due to the SoC quickly overheating (till the board completely shuts down). It seems impossible to reach those frequencies with none or passive cooling, so better leave them out by default. It's still possible to add those OPPs on a per-board basis though. Signed-off-by: Quentin Schulz [maxime: Reordered the nodes alphabetically] Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t.dtsi | 118 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) commit 04860d48a8aba5b21ae5ba1f86b0d4e3bc628fff Author: Borislav Petkov Date: Mon Feb 26 14:49:26 2018 +0100 locking/lockdep: Show unadorned pointers Show unadorned pointers in lockdep reports - lockdep is a debugging facility and hashing pointers there doesn't make a whole lotta sense. Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/20180226134926.23069-1-bp@alien8.de kernel/locking/lockdep.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit d4cbbb16915ba85aebe2386adc590ff6c9049635 Author: Quentin Schulz Date: Wed Feb 28 14:11:20 2018 +0100 ARM: dts: sun8i: a83t: add cpu0 and cpu100 labels The Allwinner A83T is a SoC with two clusters of 4 A7, each cluster having its own regulator and clock. The regulators are board-specific, thus we need labels for cpu0 and cpu100 so that we can use references to these nodes from the board header file. Signed-off-by: Quentin Schulz Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ae8d1d0061ad7996c2c5e769e809a593544fa145 Author: Tom Lendacky Date: Mon Feb 26 17:25:54 2018 -0600 x86/mm/sme: Disable stack protection for mem_encrypt_identity.c Stack protection is not compatible with early boot code. All of the early SME boot code is now isolated in a separate file, mem_encrypt_identity.c, so arch/x86/mm/Makefile can be updated to turn off stack protection for the entire file. This eliminates the need to worry about other functions within the file being instrumented with stack protection (as was seen when a newer version of GCC instrumented sme_encrypt_kernel() where an older version hadn't). It also allows removal of the __nostackprotector attribute from individual functions. Signed-off-by: Tom Lendacky Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Acked-by: Kirill A. Shutemov Cc: Linus Torvalds Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20180226232554.14108.16881.stgit@tlendack-t1.amdoffice.net arch/x86/mm/Makefile | 1 + arch/x86/mm/mem_encrypt_identity.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 367a35a6c6c7ea84fe3f47825668ca017cb566ed Author: Chris Wilson Date: Wed Feb 28 09:47:32 2018 +0000 drm/i915: Don't deref request->ctx inside unlocked print_request() Although we protect the request itself, we don't lock inside intel_engine_dump() and so the request maybe retired as we peek into it. One consequence is that the request->ctx may be freed before we dereference it, leading to a use-after-free. Replace the hw_id we are peeking from inside request->ctx with the request->fence.context, with which we can still track from which context the request originated (although to tie to HW reports requires a little more legwork, but is good enough to follow the GEM traces). [52640.729670] general protection fault: 0000 [#2] SMP [52640.729694] Dumping ftrace buffer: [52640.729701] (ftrace buffer empty) [52640.729705] Modules linked in: vgem snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_\ temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul snd_hda_intel snd_hda_codec snd_hwdep gha\ sh_clmulni_intel snd_hda_core snd_pcm mei_me mei i915 r8169 mii prime_numbers i2c_hid [52640.729748] CPU: 2 PID: 4335 Comm: gem_exec_schedu Tainted: G UD W 4.16.0-rc3+ #7 [52640.729759] Hardware name: Acer Aspire E5-575G/Ironman_SK , BIOS V1.12 08/02/2016 [52640.729803] RIP: 0010:print_request+0x2b/0xb0 [i915] [52640.729811] RSP: 0018:ffffc90001453c18 EFLAGS: 00010206 [52640.729820] RAX: 6b6b6b6b6b6b6b6b RBX: ffff8801e0292d40 RCX: 0000000000000006 [52640.729829] RDX: ffffc90001453c60 RSI: ffff8801e0292d40 RDI: 0000000000000003 [52640.729838] RBP: ffffc90001453d80 R08: 0000000000000000 R09: 0000000000000001 [52640.729847] R10: ffffc90001453bd0 R11: ffffc90001453c73 R12: ffffc90001453c60 [52640.729856] R13: ffffc90001453d80 R14: ffff8801d5a683c8 R15: ffff8801e0292d40 [52640.729866] FS: 00007f1ee50548c0(0000) GS:ffff8801e8200000(0000) knlGS:0000000000000000 [52640.729876] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [52640.729884] CR2: 00007f1ee5077000 CR3: 00000001d9411004 CR4: 00000000003606e0 [52640.729893] Call Trace: [52640.729922] intel_engine_print_registers+0x623/0x890 [i915] [52640.729948] intel_engine_dump+0x4a3/0x590 [i915] [52640.729957] ? seq_printf+0x3a/0x50 [52640.729977] i915_engine_info+0xb8/0xe0 [i915] [52640.729984] ? drm_mode_gamma_get_ioctl+0xf0/0xf0 [52640.729990] seq_read+0xd5/0x410 [52640.729997] full_proxy_read+0x4b/0x70 [52640.730004] __vfs_read+0x1e/0x120 [52640.730009] ? do_sys_open+0x134/0x220 [52640.730015] ? kmem_cache_free+0x174/0x2b0 [52640.730021] vfs_read+0xa1/0x150 [52640.730026] SyS_read+0x40/0xa0 [52640.730032] do_syscall_64+0x65/0x1a0 [52640.730038] entry_SYSCALL_64_after_hwframe+0x42/0xb7 Reported-by: Mika Kuoppala Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180228094732.28462-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 60fc75bdf5b1b8ed3e0a372b7b35f27726ff542b Author: Geert Uytterhoeven Date: Wed Feb 28 10:13:00 2018 +0100 ARM: shmobile: rcar-gen2: Fix error check in regulator quirk On systems with two regulators, a bogus error message is printed on success: i2c 6-0058: i2c error 2 While adding support for Stout, the number of messages to send was made variable, but the corresponding return value check of i2c_transfer() wasn't updated. Fixes: ff938cd14d67a704 ("ARM: shmobile: stout: enable R-Car Gen2 regulator quirk") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5857c0d4256a0eba999d1760a91b0e6a968da6fe Author: Ville Syrjälä Date: Thu Feb 22 23:42:32 2018 +0200 drm/i915: Don't mangle the CTM on pre-HSW On pre-HSW we have dedicated hardware for the RGB limited range handling, and so we don't want to compress with the CSC matrix. Toss in a FIXME about gamma LUT vs. limited range using the CSC. Cc: Johnson Lin Cc: Uma Shankar Cc: Shashank Sharma Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180222214232.6064-4-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar drivers/gpu/drm/i915/intel_color.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 27263e8dc0f6fe27540a843611ec14a000591c41 Author: Baolin Wang Date: Wed Jan 17 14:01:30 2018 +0800 clocksource: Use ATTRIBUTE_GROUPS Use ATTRIBUTE_GROUPS instead of manually creating the individual device files. Signed-off-by: Baolin Wang Signed-off-by: Thomas Gleixner Cc: arnd@arndb.de Cc: sboyd@codeaurora.org Cc: broonie@kernel.org Cc: john.stultz@linaro.org Link: https://lkml.kernel.org/r/d80dccb981dc2461781ebb8d71a32ccdc1b0e6f9.1516167691.git.baolin.wang@linaro.org kernel/time/clocksource.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit e87821d18cf4db19d634a04061c0a1b7eb9c0e65 Author: Baolin Wang Date: Wed Jan 17 14:01:29 2018 +0800 clocksource: Use DEVICE_ATTR_RW/RO/WO to define device attributes Convert DEVICE_ATTR to DEVICE_ATTR_RW/RO/WO which is the preferred and simpler way of implementation. Signed-off-by: Baolin Wang Signed-off-by: Thomas Gleixner Cc: arnd@arndb.de Cc: sboyd@codeaurora.org Cc: broonie@kernel.org Cc: john.stultz@linaro.org Link: https://lkml.kernel.org/r/8f35c77e753e957b61187e8e7b2e4a3d61e4a72b.1516167691.git.baolin.wang@linaro.org kernel/time/clocksource.c | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) commit 7f852afe448c95691ead6b57bae5f37562d060b5 Author: Baolin Wang Date: Wed Jan 17 14:01:28 2018 +0800 clocksource: Don't walk the clocksource list for empty override If the override clocksource name is empty there is no point in walking the clocksource list for a match. Signed-off-by: Baolin Wang Signed-off-by: Thomas Gleixner Cc: arnd@arndb.de Cc: sboyd@codeaurora.org Cc: broonie@kernel.org Cc: john.stultz@linaro.org Link: https://lkml.kernel.org/r/069ce2a605546bcad6552968cff755f0a03f9f10.1516167691.git.baolin.wang@linaro.org kernel/time/clocksource.c | 4 ++++ 1 file changed, 4 insertions(+) commit c35e8a25dfda24b7fc4c2c48cddecd4a5e3297d8 Author: Ville Syrjälä Date: Thu Feb 22 23:42:31 2018 +0200 drm/i915: Rename pipe CSC to use ilk_ prefix The pipe CSC was introduced by ILK, so change everything related to use ilk_ as the prefix. Cc: Johnson Lin Cc: Uma Shankar Cc: Shashank Sharma Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180222214232.6064-3-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar drivers/gpu/drm/i915/intel_color.c | 39 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 20 deletions(-) commit db61d160b3ed36b9fc2f65b416e02cc453043fef Author: Ville Syrjälä Date: Thu Feb 22 23:42:30 2018 +0200 drm/i915: Remove the pointless 1:1 matrix copy If we don't have to frob with the user provided ctm matrix there's no point in copying it over. Just point at the user ctm directly. Also the matrix gets fully populated by ctm_mult_by_limited() so no need to zero initialize it. Cc: Johnson Lin Cc: Uma Shankar Cc: Shashank Sharma Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180222214232.6064-2-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar drivers/gpu/drm/i915/intel_color.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 0ef5a6e09b99c39439d09a957bd40dd3154b51ba Author: Colin Ian King Date: Fri Feb 23 14:14:51 2018 +0000 serial: mvebu-uart: remove duplicated bit-wise or of STAT_FRM_ERR Bit pattern STAT_FRM_ERR is being bit-wise or'd twice; remove the redundant 2nd STAT_FRM_ERR Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45ca673e81df80f24a575e0a9a4e33c1f865ad08 Author: Troy Kisky Date: Fri Feb 23 18:27:50 2018 -0800 tty: serial: imx: allow breaks to be received when using dma This allows me to login after sending a break when service serial-getty@ttymxc0.service is running The "tty_insert_flip_char(port, 0, TTY_BREAK)" in clear_rx_errors fixes this by allowing the higher layers to see a break. Also, call uart_handle_break to handle possible "secure attention key." FYI: Martin said the ROM sdma firmware works with this patch, but external sdma firmware still does not send breaks on a i.mx6UL Signed-off-by: Troy Kisky Tested-by: Martin Hicks Reviewed-by: Fabio Estevam Acked-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 914eaf935ec78d3a3ce03751b1e0f8395035d94a Author: Joshua Scott Date: Fri Feb 9 10:59:56 2018 +1300 serial: 8250_dw: Allow TX FIFO to drain before writing to UART_LCR An issue has been observed on the Marvell Armada 38x serial port. Writes to UART_LCR can result in characters that are currently held in the TX FIFO being lost rather than sent, even if the userspace process has attempted to flush them. This is most visible when using the "resize" command (tested on Busybox), where we have observed the escape code for restoring cursor position becoming mangled. Signed-off-by: Joshua Scott Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit b96408b47480f9947eee933fcce35ed4ae74cc9a Author: Ulrich Hecht Date: Thu Feb 15 13:02:41 2018 +0100 serial: sh-sci: use hrtimer for receive timeout High latencies of classic timers cause performance issues for high- speed serial transmissions. This patch transforms rx_timer into an hrtimer to reduce the minimum latency. Signed-off-by: Ulrich Hecht Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 47 +++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 17 deletions(-) commit 08fb00c64f3401b4ecc18a7395cf302b8d8e12fd Author: Vignesh R Date: Thu Feb 8 18:25:42 2018 +0530 serial: 8250: 8250_omap: Fix throttling when DMA is enabled omap_8250_throttle() is called when tty RX buffer is about to overflow and can no longer keep up with the rate at which UART is receiving data. So, the expectation of this callback, is that UART stops RX and asserts HW flow control to signal the sender to stop sending more data. omap_8250_throttle() disables RX FIFO interrupts thus FIFO is no longer serviced, leading to assertion of flow control once RX FIFO is full. But, this does not work when DMA is enabled as driver keeps queuing new RX DMA request in completion handler without brothering about throttling request made by the higher layer. This patch introduces a flag that can be used to determine whether or not to queue next RX DMA request based on throttling request. Without this patch, tty buffer overflows are reported at higher baudrates. Signed-off-by: Vignesh R Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_omap.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 2e9fe539108320820016f78ca7704a7342788380 Author: Vignesh R Date: Thu Feb 8 18:25:41 2018 +0530 serial: 8250: Don't service RX FIFO if interrupts are disabled Currently, data in RX FIFO is read based on UART_LSR register state even if RDI and RLSI interrupts are disabled in UART_IER register. This is because when IRQ handler is called due to TX FIFO empty event, RX FIFO is serviced based on UART_LSR register status instead of UART_IIR status. This defeats the purpose of disabling UART RX FIFO interrupts during throttling(see, omap_8250_throttle()) as IRQ handler continues to drain UART RX FIFO resulting in overflow of buffer at tty layer. Fix this by making sure that driver drains UART RX FIFO only when UART_IIR_RDI is set along with UART_LSR_BI or UART_LSR_DR bits. Signed-off-by: Vignesh R Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 890fb16b4cdbc625b9213487c547793a775ad991 Author: Sergei Shtylyov Date: Thu Feb 1 22:36:20 2018 +0300 DT: serial: renesas,sci-serial: document R8A77980 bindings R-Car V3H (R8A77980) SoC has the R-Car gen3 compatible SCIF and HSCIF ports, so document the SoC specific bindings. Signed-off-by: Sergei Shtylyov Reviewed-by: Rob Herring Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 2 ++ 1 file changed, 2 insertions(+) commit 1a9ab351fb5d68f40936233c471c53567b82fea1 Author: Jan Kundrát Date: Fri Jan 26 20:02:00 2018 +0100 gpio: serial: max310x: Use HW type for gpio_chip's label Some debugging tools (/sys/kernel/debug/gpio, `lsgpio`) use the gpio_chip's label for displaying an additional context. Right now, the information duplicates stuff which is already available from the parent's device. This is how e.g. `lsgpio`'s output looks like: GPIO chip: gpiochip2, "spi1.2", 16 GPIO lines Comparing the output of other GPIO expanders that I have available: gpiochip4: GPIOs 464-479, parent: spi/spi1.1, mcp23s17, can sleep: gpiochip5: GPIOs 448-463, parent: i2c/0-0020, pca9555, can sleep: gpiochip2: GPIOs 496-511, parent: spi/spi1.2, spi1.2, can sleep: This patch ensures that the type of the real HW device is shown instead of duplicating the SPI path: gpiochip2: GPIOs 496-511, parent: spi/spi1.2, MAX14830, can sleep: Signed-off-by: Jan Kundrát Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eefadcbca7f394fb9248384f2c759ebbe81e20c7 Author: Uwe Kleine-König Date: Thu Jan 25 14:30:45 2018 +0100 serial: altera: set RRDY flag also without irq The UART can be operated without an irq. In this case a timer is setup that regularily calls altera_uart_interrupt(). The receiving part depends on pp->imr having the bit ALTERA_UART_STATUS_RRDY_MSK set, otherwise altera_uart_rx_chars() is never called. So ensure that the bit gets set (disguised as ALTERA_UART_CONTROL_RRDY_MSK) by not returning early from altera_uart_startup() if port->irq is 0. This doesn't affect the hardware as the ALTERA_UART_CONTROL_RRDY_MSK bit isn't actually written to the control register. Signed-off-by: Uwe Kleine-König Acked-by: Tobias Klauser Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/altera_uart.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 2ea6ad8bc60f66a5d323ca7e93fddf2363c3ed80 Author: Uwe Kleine-König Date: Thu Jan 25 14:30:44 2018 +0100 serial: altera: don't enable any irq if the device doesn't feature an irq If the irq line of an altera UART device isn't used to report interrupts for this device the driver better ensures that this device doesn't pull this line to active state and so disturb the whatever might be connected to this line. Signed-off-by: Uwe Kleine-König Acked-by: Tobias Klauser Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/altera_uart.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 0e254963b6ba4d63ac911e79537fea38dd03dc50 Author: Uwe Kleine-König Date: Thu Jan 25 14:30:43 2018 +0100 serial: altera: ensure port->regshift is honored consistently Most register accesses in the altera driver honor port->regshift by using altera_uart_writel(). There are a few accesses however that were missed when the driver was converted to use port->regshift and some others were added later in commit 4d9d7d896d77 ("serial: altera_uart: add earlycon support"). Fixes: 2780ad42f5fe ("tty: serial: altera_uart: Use port->regshift to store bus shift") Signed-off-by: Uwe Kleine-König Acked-by: Tobias Klauser Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/altera_uart.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 356b57752c91cffb35356abe6647065bf0edcad1 Author: Rafael J. Wysocki Date: Wed Feb 28 12:10:59 2018 +0100 platform/x86: intel-hid: Reset wakeup capable flag on removal The intel-hid device will not be able to wake up the system any more after removing the notify handler provided by its driver, so make its sysfs attributes reflect that. Fixes: ef884112e55c (platform: x86: intel-hid: Wake up the system from suspend-to-idle) Signed-off-by: Rafael J. Wysocki Signed-off-by: Andy Shevchenko drivers/platform/x86/intel-hid.c | 1 + 1 file changed, 1 insertion(+) commit 250b044e1a584887c06e6ba79446e523ffa3cc9c Author: Rafael J. Wysocki Date: Wed Feb 28 12:09:56 2018 +0100 platform/x86: intel-vbtn: Reset wakeup capable flag on removal The intel-vbtn device will not be able to wake up the system any more after removing the notify handler provided by its driver, so make its sysfs attributes reflect that. Fixes: 91f9e850d465 (platform: x86: intel-vbtn: Wake up the system from suspend-to-idle) Signed-off-by: Rafael J. Wysocki Signed-off-by: Andy Shevchenko drivers/platform/x86/intel-vbtn.c | 1 + 1 file changed, 1 insertion(+) commit f54450ad1942287cc76b38021c0441fc4901d2de Author: Kees Cook Date: Tue Feb 27 13:11:21 2018 -0800 console: Drop added "static" for newport_con Commit 4fe505119778 ("console: Expand dummy functions for CFI") accidentally added "static" to newport_con instance of struct consw, while trying to normalize the declarations. This, however, needed to stay non-static as it has an extern. Reported-by: kbuild test robot Fixes: 4fe505119778 ("console: Expand dummy functions for CFI") Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/video/console/newport_con.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68824bb59d4892457401cdcd89e9bb3eef3ea780 Author: Ville Syrjälä Date: Thu Feb 22 23:42:29 2018 +0200 drm/uapi: The ctm matrix uses sign-magnitude representation The documentation for the ctm matrix suggests a two's complement format, but at least the i915 implementation is using sign-magnitude instead. And looks like malidp is doing the same. Change the docs to match the current implementation, and change the type from __s64 to __u64 to drive the point home. Cc: dri-devel@lists.freedesktop.org Cc: Mihail Atanassov Cc: Liviu Dudau Cc: Brian Starkey Cc: Mali DP Maintainers Cc: Johnson Lin Cc: Uma Shankar Cc: Shashank Sharma Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180222214232.6064-1-ville.syrjala@linux.intel.com Reviewed-by: Harry Wentland include/uapi/drm/drm_mode.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f074037a2eb1ff21e258a27a6270bae126ded062 Merge: 73c0fca b8a89f5 Author: Joonas Lahtinen Date: Wed Feb 28 12:12:03 2018 +0200 Merge drm-next into drm-intel-next-queued To pull in the HDCP changes, especially wait_for changes to drm/i915 that Chris wants to build on top of. Signed-off-by: Joonas Lahtinen commit 7f78c3d69df03674644b724cdf4f01d67962beb4 Author: Jyri Sarha Date: Wed Feb 21 18:38:24 2018 +0200 drm/tilcdc: tilcdc_panel: Rename device from "panel" to "tilcdc-panel" Rename the bundled tilcdc_panel driver from just "panel" to "tilcdc-panel" to avoid noisy error messages from the driver trying to probe all device nodes named "panel". Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen drivers/gpu/drm/tilcdc/tilcdc_panel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 544f7377d92c9dcd7578e5e376bbc2ec96478b37 Author: Jyri Sarha Date: Sun Feb 18 19:48:32 2018 +0200 drm/tilcdc: Add support for drm panels Add support for drm panels to tilcdc. Adding the support on top of the existing bridge support needs only couple of lines of code when using using the drm panel bridge helpers. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen drivers/gpu/drm/tilcdc/Kconfig | 2 ++ drivers/gpu/drm/tilcdc/tilcdc_external.c | 29 ++++++++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) commit 73c0fcac97bf7f4a6a61b825b205d1cf127cfca7 Author: Mustamin B Mustaffa Date: Tue Feb 27 11:07:34 2018 +0800 drm/i915: Enable VBT based BL control for DP Currently, BXT_PP is hardcoded with value '0'. It practically disabled eDP backlight on MRB (BXT) platform. This patch will tell which BXT_PP registers (there are two set of PP_CONTROL in the spec) to be used as defined in VBT (Video Bios Timing table) and this will enabled eDP backlight controller on MRB (BXT) platform. v2: - Remove unnecessary information in commit message. - Assign vbt.backlight.controller to a backlight_controller variable and return the variable value. v3: - Rebased to latest code base. - updated commit title. Signed-off-by: Mustamin B Mustaffa Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180227030734.37901-1-mustamin.b.mustaffa@intel.com drivers/gpu/drm/i915/intel_dp.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 128326a10c8d098d82af6a5d1c903dbe4b041ff4 Author: Chris Wilson Date: Tue Feb 27 21:18:16 2018 +0000 drm/i915: Repeat the GEM_BUG_ON message in the ftrace log As the ftrace log is overflowing the pstore capture, we lose the last gasps from dmesg which includes the GEM_BUG_ON function:line and condition that failed. Vital information for tracking down the bug, so append it to the frace log as well. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180227211816.5546-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b225e742542d944c883f578a5c0106157ff4fb7f Author: Markus Elfring Date: Tue Feb 6 22:10:11 2018 +0100 drm/tilcdc: panel: Use common error handling code in of_get_panel_info() Add a jump target so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_panel.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 3366ba38cad887e587b28b7ab83a01e1c59a8466 Author: Markus Elfring Date: Tue Feb 6 21:51:15 2018 +0100 drm/tilcdc: Delete an error message for a failed memory allocation in seven functions Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 4 +--- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 4 +--- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 9 ++------- drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 8 ++------ 4 files changed, 6 insertions(+), 19 deletions(-) commit a8ab4f2bd8a5298679dabe16910322625a0df247 Author: Takeshi Kihara Date: Mon Feb 26 16:30:11 2018 +0100 pinctrl: sh-pfc: r8a77965: Add support for INTC-EX IRQ pins Most pins on the R8A77965 SoC can be configured in GPIO mode for interrupt and GPIO functionality, while a couple of them can also be routed to the INTC-EX hardware block (formerly known as IRQC). On R8A77965 the INTC-EX hardware handles pins IRQ0 -> IRQ5 and this patch adds support for them to the PFC driver as "intc_ex_irqN". Based on a similar patch for the R8A7795 PFC driver by Magnus Damm . Signed-off-by: Takeshi Kihara Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit dd5f313be0d4d7a46f0e82c42aed4fbc784699ea Author: Richard Fitzgerald Date: Tue Feb 27 17:29:54 2018 +0000 ALSA: control: Fix a bunch of whitespace errors Remove a bunch of trailing whitespace errors. They are fairly annoying if you have your editor set to strip trailing whitespace because you find you've introduced more changes than you were trying to make. Signed-off-by: Richard Fitzgerald Signed-off-by: Takashi Iwai sound/core/control.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 3b8bd500c9953c59e892c41edffeef1f5099e189 Merge: ef21e17 5a23699 Author: Takashi Iwai Date: Wed Feb 28 08:17:38 2018 +0100 Merge branch 'for-linus' into for-next Back-merge for applying a cleanup to core/control Signed-off-by: Takashi Iwai commit 8efaff50f1a6dba74aa8a2a47dd5962fb098021b Author: Stefan Agner Date: Tue Feb 27 17:30:49 2018 +0100 ARM: dts: imx7s: add spba-bus abstraction According to the i.MX 7Solo/Dual Application Processor Reference Manual the ECSPI1/2/3, UART1/2/3 and SAI1/2/3 peripherals are connected through the SPBA bus. Other similar SoCs such as i.MX 6UL add this bus abstraction. This adds the bus also to the i.MX 7 device tree. The i.MX SDMA driver uses this abstraction to configure watermark levels slightly differently, so this might change behavior slightly. There have no issues been observed before or after the patch. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s.dtsi | 214 ++++++++++++++++++++++--------------------- 1 file changed, 111 insertions(+), 103 deletions(-) commit 303aa1bf077711248bd5a75cab3f7355cad8c264 Author: Stefan Agner Date: Tue Feb 27 17:05:44 2018 +0100 ARM: dts: imx7s: add Keypad Port module Add the Keypad Port module. Add it disabled by default since only some boards use it. Boards which do need to specify additional properties as documented in the device tree bindings. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0eeabcad7da55e02597b400efb4e8f3af746e936 Author: Rui Miguel Silva Date: Thu Feb 22 14:22:50 2018 +0000 ARM: dts: imx7s: add CAAM device node Add CAAM device node to the i.MX7s device tree. Cc: Sascha Hauer Cc: devicetree@vger.kernel.org Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: "David S. Miller" Cc: Lukas Auer Signed-off-by: Rui Miguel Silva Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s.dtsi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit ec2a844ef7c168af4d93b2171ca385aaf25a7dd1 Author: Anson Huang Date: Tue Jan 9 17:52:06 2018 +0800 ARM: dts: imx7s: add snvs rtc clock Add i.MX7 SNVS RTC clock. Signed-off-by: Anson Huang Acked-by: Dong Aisheng Reviewed-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/crypto/fsl-sec4.txt | 17 +++++++++++++++++ arch/arm/boot/dts/imx7s.dtsi | 2 ++ 2 files changed, 19 insertions(+) commit 09bea76aad76058d7d1dae8f5804751a017967c1 Author: Geert Uytterhoeven Date: Mon Feb 26 19:03:44 2018 +0100 dt-bindings: arm: Document Renesas R-Car M3-N-based Salvator-X board The Renesas Salvator-X development board can be equipped with an R-Car H3, M3-W, or M3-N SiP, which are pin-compatible. Document board part number and compatible values for the version with R-Car M3-N. The board part number was extracted from a big patch by Takeshi Kihara in the BSP. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+) commit b604e4a008fe3e5956c5a07139a8168cbe22f46a Author: Geert Uytterhoeven Date: Mon Feb 26 19:03:45 2018 +0100 dt-bindings: arm: Document Renesas R-Car M3-N-based Salvator-XS board The Renesas Salvator-XS development board can be equipped with an R-Car H3, M3-W, or M3-N SiP, which are pin-compatible. Document board part number and compatible values for the version with R-Car M3-N. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+) commit 04db44132bc544e12f8c7693db35a080edded6ee Author: Geert Uytterhoeven Date: Mon Feb 26 19:03:43 2018 +0100 dt-bindings: arm: Document Renesas V3MSK and Wheat board part numbers The DT binding documentation for the Renesas V3MSK and Wheat boards lacked board part numbers. Signed-off-by: Geert Uytterhoeven [simon: corrected Wheat part number] Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1691cc375a39d13a70829cabdd87ca9116a16907 Author: Stefan Agner Date: Tue Feb 27 17:05:43 2018 +0100 clk: imx: imx7d: add the Keypad Port module clock According to the i.MX7D Reference Manual, the Keypad Port module (KPP) requires this clock gate to be enabled. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx7d.c | 1 + include/dt-bindings/clock/imx7d-clock.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 2f953ee928f24bf05659331b7f220903dd1738fd Author: Shyam Saini Date: Tue Feb 27 21:29:03 2018 +0530 ARM: dts: imx6dl-icore-rqs: Fix invalid PHY address assignment for ethernet Add "reg" property for ethernet to fix this issue. Errors in boot logs: mdio_bus 2188000.ethernet-1: /soc/aips-bus@02100000/ethernet@02188000/mdio/ethernet-phy has invalid PHY address mdio_bus 2188000.ethernet-1: scan phy ethernet-phy at address 0 mdio_bus 2188000.ethernet-1: scan phy ethernet-phy at address 1 mdio_bus 2188000.ethernet-1: scan phy ethernet-phy at address 2 mdio_bus 2188000.ethernet-1: scan phy ethernet-phy at address 3 Reported-by: Shyam Saini Suggested-by: Michael Trimarchi Signed-off-by: Shyam Saini Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit fa2f2576cdc5b0968103dee4211296b552c9dfaa Author: Jörg Krause Date: Sun Feb 25 02:24:46 2018 +0100 ARM: dts: imx6ul: add wdog3 node The i.MX6UL(L) has a WDOG3 located at start address 0x021E0000 in the AIPS-2 memory region [1]. [1] i.MX 6UltraLite Applications Processor Reference Manual, Rev. 1, 04/2016, Table-2-3 AIPS-2 memory map, p. 166 Signed-off-by: Jörg Krause Reviewed-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 40114bde9773ccaf9ad77233ac2cc9039f0f2941 Author: Suganath Prabu S Date: Wed Feb 14 02:16:37 2018 -0800 scsi: mpt3sas: Do not use 32-bit atomic request descriptor for Ventura controllers. Sending I/O through 32 bit descriptors to Ventura series of controller results in IO timeout on certain conditions. This error only occurs on systems with high I/O activity. Changes in this patch will prevent driver from using 32 bit descriptor and use 64 bit Descriptors Signed-off-by: Suganath Prabu S Reviewed-by: Tomas Henzl Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 169 ++++--------------------------- drivers/scsi/mpt3sas/mpt3sas_base.h | 11 +- drivers/scsi/mpt3sas/mpt3sas_config.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 22 ++-- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 20 ++-- drivers/scsi/mpt3sas/mpt3sas_transport.c | 8 +- 6 files changed, 54 insertions(+), 178 deletions(-) commit b4472d7180894c96b6133ef5ff3df50836591eaa Author: Suganath Prabu Subramani Date: Wed Feb 7 02:51:50 2018 -0800 scsi: mpt3sas: Introduce function to clone mpi reply. If the posted request has an error of any type, the IOC writes a Reply message into a host-based system reply message frame. This functions clone it in the BAR0 mapped region. Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) commit e5747439366c1079257083f231f5dd9a84bf0fd7 Author: Suganath Prabu Subramani Date: Wed Feb 7 02:51:49 2018 -0800 scsi: mpt3sas: Introduce function to clone mpi request. 1) Added function _base_clone_mpi_to_sys_mem to clone MPI request into system BAR0 mapped region. 2) Separate out MPI Endpoint IO submissions to function _base_put_smid_mpi_ep_scsi_io. 3) MPI EP requests are submitted in two 32 bit MMIO writes. from _base_mpi_ep_writeq. For 32 bit Arch,_base_writeq function is identical to _base_mpi_ep_writeq, Removed duplicate code as suggested. Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 140 ++++++++++++++++++++++++++++++++---- 1 file changed, 125 insertions(+), 15 deletions(-) commit 182ac784b41faee02e8b44cd7149575258ad6858 Author: Suganath Prabu Subramani Date: Wed Feb 7 02:51:48 2018 -0800 scsi: mpt3sas: Introduce Base function for cloning. All scsi IO's and config request's data buffer and sgl are cloned to system memory in _clone_sg_entries before submitting it to firmware. Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 215 +++++++++++++++++++++++++++++++++- drivers/scsi/mpt3sas/mpt3sas_base.h | 3 + drivers/scsi/mpt3sas/mpt3sas_config.c | 1 + 3 files changed, 218 insertions(+), 1 deletion(-) commit 22ae5a3c2599381cf7aaa5aca25c515a3166adcc Author: Suganath Prabu Subramani Date: Wed Feb 7 02:51:47 2018 -0800 scsi: mpt3sas: Introduce API to get BAR0 mapped buffer address For MPI Endpoint/Mcpu, driver should double buffer data buffer/SGLs. This is normally copied from host to internal memory of IOC by DMA engine of PCI device. Since the interface to DMA from host to mCPU is not present for Mcpu/MPI Endpoint device, driver does double copy of those buffers directly to the mCPU memory region via BAR0 region. Introduced API to calculate and return BAR0 mapped host buffer's physical and virtual address for the provided smid. Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 93 +++++++++++++++++++++++++++++++++++++ drivers/scsi/mpt3sas/mpt3sas_base.h | 2 + 2 files changed, 95 insertions(+) commit 0448f0195124e33f11d15b7d1e1cab959989eee7 Author: Suganath Prabu Subramani Date: Wed Feb 7 02:51:46 2018 -0800 scsi: mpt3sas: Configure reply post queue depth, DMA and sgl tablesize. This configures shost max sector to 128, single reply descriptor post queue, sgl table size to 16 and 32 bit DMA for MPI Endpoint and it supports 64K as max IO. Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 47 +++++++++++++++++++++++------------- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 40 ++++++++++++++++++------------ 2 files changed, 54 insertions(+), 33 deletions(-) commit c520691b38cde1d94f53e5782feba892f5645043 Author: Suganath Prabu Subramani Date: Wed Feb 7 02:51:45 2018 -0800 scsi: mpt3sas: Add PCI device ID for Andromeda. Add device ID and flag for Andromeda/MPI Endpoint. [mkp: typo] Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 1 + drivers/scsi/mpt3sas/mpt3sas_base.h | 1 + drivers/scsi/mpt3sas/mpt3sas_scsih.c | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) commit 8ef7fe4b2bee7ba88dd24d781f82e98b0b461bbc Author: Jianchao Wang Date: Mon Feb 26 15:59:16 2018 +0800 scsi: core: fix two wrong indentation cases No functional changes. Just fix two wrong indentation cases in scsi_finish_command and scsi_decide_disposition. Signed-off-by: Jianchao Wang Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi.c | 2 +- drivers/scsi/scsi_error.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a934a5834d59d8529da228aec1f3f89d1be225e9 Author: Stefan Agner Date: Tue Feb 27 16:16:10 2018 +0100 ARM: dts: imx7: add CPU PMU support Enable support for ARM Performance Monitoring Units available on the Cortex-A7 CPU. There is only a single interrupt for the PMU in both variants of the family, i.MX 7Solo and 7Dual. Tested with perf on a i.MX 7Dual: hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available Signed-off-by: Stefan Agner Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit f10acffc550ddf651968330b2b4d08b9c1aa75a9 Author: Stefan Agner Date: Tue Feb 27 09:00:23 2018 +0100 ARM: dts: imx6dl-colibri-eval-v3: Add chosen node Add Colibri UART_A as default serial console. Signed-off-by: Stefan Agner Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 258172f96fcfa491c172312773ddd89d8504bc57 Author: Fabio Estevam Date: Fri Feb 23 22:42:04 2018 -0300 ARM: imx: pm-imx6: Return the error directly Simplify the error path by returning the error code directly rather than jumping to a label. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/mach-imx/pm-imx6.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit edd066a10090773e18a2095455ad793c73d022b4 Author: Arnd Bergmann Date: Mon Feb 26 10:44:14 2018 +0100 scsi: qedi: fix build regression A bugfix I did caused a build regression in some other randconfig builds in a rare combination of options: In file included from drivers/scsi/qedi/qedi_fw.c:16: drivers/scsi/qedi/qedi_gbl.h:26:38: error: array type has incomplete element type 'struct qedi_debugfs_ops' extern const struct qedi_debugfs_ops qedi_debugfs_ops[]; ^~~~~~~~~~~~~~~~ This removes the useless #ifdef around the declarations in qedi_dbg.h to make it always build. Fixes: 779936faf4f1 ("scsi: qedi: fix building with LTO") Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_dbg.h | 2 -- 1 file changed, 2 deletions(-) commit 121246ae93a1ef37b358da43155c1cc4f33eab37 Author: Bart Van Assche Date: Thu Feb 22 13:49:59 2018 -0800 scsi: libsas: Fix kernel-doc headers Avoid that building with W=1 causes the kernel-doc tool to complain about function arguments that have not been documented in the libsas kernel-doc headers. Avoid that the short description starts with a hyphen by changing "--" into "-" in the first line of the kernel-doc headers. Signed-off-by: Bart Van Assche Cc: John Garry Reviewed-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_ata.c | 2 +- drivers/scsi/libsas/sas_discover.c | 13 +++++++------ drivers/scsi/libsas/sas_expander.c | 29 +++++++++++++++-------------- drivers/scsi/libsas/sas_init.c | 2 +- drivers/scsi/libsas/sas_port.c | 5 +++-- 5 files changed, 27 insertions(+), 24 deletions(-) commit f81d7af7957539b7808961f929f945381530acb9 Author: Shawn Guo Date: Sat Feb 24 14:42:25 2018 +0800 arm64: dts: fsl: fix ifc simple-bus unit address format warnings It fixes LS family SoCs device tree dtc warning in IFC child nodes. Warning (simple_bus_reg): Node /soc/ifc@1530000/nor@0,0 simple-bus unit address format error, expected "0" Warning (simple_bus_reg): Node /soc/ifc@1530000/nand@1,0 simple-bus unit address format error, expected "100000000" Warning (simple_bus_reg): Node /soc/ifc@1530000/board-control@2,0 simple-bus unit address format error, expected "200000000" Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts | 6 +++--- arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 6 +++--- arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts | 6 +++--- arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts | 4 ++-- arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts | 6 +++--- arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts | 4 ++-- arch/arm64/boot/dts/freescale/fsl-ls208xa-qds.dtsi | 6 +++--- 7 files changed, 19 insertions(+), 19 deletions(-) commit edc05819786fd5eee330b89bd5892dad1199effc Author: Fabio Estevam Date: Thu Feb 22 14:16:35 2018 -0300 ARM: dts: imx6: Pass memory unit-adress Pass the memory unit-adress to fix the following build warnings with W=1: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name There are cases where dts passes an empty memory node, which will be filled by the bootloader. Passing the memory base address still allows the bootloader to fill the memory size. Signed-off-by: Fabio Estevam Acked-By: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts | 4 ++-- arch/arm/boot/dts/imx6dl-dfi-fs700-m60.dts | 4 ++-- arch/arm/boot/dts/imx6dl-ts4900.dts | 4 ++-- arch/arm/boot/dts/imx6dl-ts7970.dts | 4 ++-- arch/arm/boot/dts/imx6q-dfi-fs700-m60.dts | 4 ++-- arch/arm/boot/dts/imx6q-h100.dts | 4 ++-- arch/arm/boot/dts/imx6q-novena.dts | 4 ++-- arch/arm/boot/dts/imx6q-ts4900.dts | 4 ++-- arch/arm/boot/dts/imx6q-ts7970.dts | 4 ++-- arch/arm/boot/dts/imx6q-zii-rdu2.dts | 4 ++-- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 4 ++-- arch/arm/boot/dts/imx6qdl-cubox-i.dtsi | 4 ++-- arch/arm/boot/dts/imx6qdl-hummingboard.dtsi | 4 ++-- arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 4 ++-- arch/arm/boot/dts/imx6qdl-tx6.dtsi | 4 ++-- arch/arm/boot/dts/imx6qp-zii-rdu2.dts | 4 ++-- arch/arm/boot/dts/imx6ul-tx6ul.dtsi | 4 ++-- arch/arm/boot/dts/imx6ull-colibri-nonwifi.dtsi | 2 +- arch/arm/boot/dts/imx6ull-colibri-wifi.dtsi | 2 +- 19 files changed, 36 insertions(+), 36 deletions(-) commit 8bb5b22255dac09cd74eae9f86333b474d69fbbe Merge: 727edc7 9aff8b2 Author: Dave Airlie Date: Wed Feb 28 11:44:29 2018 +1000 Merge branch 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-next - Expose thermal thresholds through hwmon properly - Rework HDP flushing for rings and CPU - Improved dual-link DVI handling in DC - Lots of code clean up - Additional DC clean up - Allow scanout from system memory on CZ/BR/ST - Improved PASID/VM integration - Expose GPU voltage and power via hwmon - Initial wattman-like support - Initial power profiles for use-case optimized performance - Rework GPUVM TLB flushing - Rework IP offset handling for SOC15 asics - Add CRC support in DC - Fixes for mmhub powergating - Initial regamma/degamma/CTM support in DC - ttm cleanups and simplifications - ttm OOM avoidance fixes * 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux: (348 commits) Revert "drm/radeon/pm: autoswitch power state when in balanced mode" drm/radeon: use drm_gem_private_object_init drm/amdgpu: use drm_gem_private_object_init drm/amdgpu: mitigate workaround for i915 drm/amdgpu: implement amdgpu_gem_map_(attach/detach) drm/amdgpu/powerplay/smu7: drop refresh rate checks for mclk switching drm/amdgpu/cgs: add refresh rate checking to non-DC display code drm/amd/powerplay/smu7: allow mclk switching with no displays drm/amd/powerplay/vega10: allow mclk switching with no displays drm/amd/powerplay: use PP_CAP macro for disable_mclk_switching_for_frame_lock drm/amd/powerplay: remove unused headers drm/amdgpu_gem: fix error handling path in amdgpu_gem_va_update_vm drm/amdgpu: update the PASID mapping only on demand drm/amdgpu: separate PASID mapping from VM flush v2 drm/amd/display: Fix increment when sampling OTF in DCE drm/amd/display: De PQ implementation drm/amd/display: Remove unused dm_pp_ interfaces drm/amd/display: Add logging for aux DPCD access drm/amd/display: Set vsc pack revision when DPCD revision is >= 1.2 drm/amd/display: provide an interface to query firmware version ... commit baf15cbf54d6b91b230faf67398fa6c43d1ffed2 Author: Rui Miguel Silva Date: Thu Feb 22 14:22:49 2018 +0000 clk: imx7d: add CAAM clock Add CAAM clock so that we could use the Cryptographic Acceleration and Assurance Module (CAAM) hardware block. Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: "David S. Miller" Cc: Lukas Auer Reviewed-by: Fabio Estevam Signed-off-by: Rui Miguel Silva Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx7d.c | 1 + include/dt-bindings/clock/imx7d-clock.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 9b454d16e57d7c80b11c555fe8f79ff695fe3feb Author: Martin Kaiser Date: Tue Feb 27 22:29:15 2018 +0100 ARM: imx: avic: set low-power interrupt mask for imx25 imx25 contains two registers (LPIMR0 and 1) to define which interrupts are enabled in low-power mode. As of today, those two registers are configured to enable all interrupts. Before going to low-power mode, the AVIC's INTENABLEH and INTENABLEL registers are configured to enable only those interrupts which are used as wakeup sources. It turned out that this approach is not sufficient if we want the imx25 to go into stop mode during suspend-to-ram. (Stop mode is the low-power mode that consumes the least power. The peripheral master clock is switched off in this mode). For stop mode to work, the LPIMR0 and 1 registers have to be configured with the set of interrupts that are allowed in low-power mode. Fortunately, the bits in the LPIMR registers are assigned to the same interrupts as the bits in INTENABLEH and INTENABLEL. However, LPIMR uses 1 to mask an interrupt whereas the INTENABLE registers use 1 to enable an interrupt. This patch sets the LPIMR registers to the inverted bitmask of the INTENABLE registers during suspend and goes back to "all interrupts masked" when we wake up again. We also make this the default at startup. As far as I know, the other supported imx architectures have no similar mechanism. Since the LPIMR registers are part of the CCM module, we query the device tree for an imx25 ccm node in order to detect if we're running on imx25. Signed-off-by: Martin Kaiser Signed-off-by: Shawn Guo arch/arm/mach-imx/avic.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit d66047e4a582103d4c6a884692f402b905032f26 Author: Rodrigo Vivi Date: Thu Feb 22 12:05:35 2018 -0800 drm/i915/cnl: Add WaRsDisableCoarsePowerGating Old Wa added now forever on CNL all steppings. With CPU P states enabled along with RC6, dispatcher hangs can happen. Cc: Rafael Antognolli Signed-off-by: Rodrigo Vivi Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20180222200535.9290-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 5 +++-- drivers/gpu/drm/i915/intel_guc.c | 2 +- drivers/gpu/drm/i915/intel_pm.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) commit c4932d7956d8226e20c0c44b04fe9a2cbfcd8f51 Author: Rodrigo Vivi Date: Tue Feb 27 13:29:13 2018 -0800 drm/i915/psr: Don't avoid PSR when PSR2 conditions are not met. We can still use PSR1 when PSR2 conditions are not met. So, let's split the check in a way that we make sure has_psr gets set independently of PSR2 criteria. v2: Duh! Handle proper return to avoid breaking PSR2. v3: (DK): - better name for psr2 conditions check function - Don't remove FIXME block and psr2.support check. - Add a debug message to show us what PSR or PSR2 is getting enabled now we have ways to enabled PSR on PSR2 panels. - s/PSR2 disabled/PSR2 not enabled Cc: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20180227212913.14083-2-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_psr.c | 64 +++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 27 deletions(-) commit 8cef3e5c0d1927926a95a6a72dc00d39048ecb12 Author: Rodrigo Vivi Date: Tue Feb 27 13:29:12 2018 -0800 drm/i915/psr2: Fix max resolution supported. According to spec: "PSR2 is supported for pipe active sizes up to 3640 pixels wide and 2304 lines tall." BSpec: 7713 Cc: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20180227212913.14083-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_psr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 06d058e1a008e202addc3bff9ab025fbcb23040f Author: Dhinakaran Pandiyan Date: Mon Feb 26 19:27:23 2018 -0800 drm/i915/psr: Check for power state control capability. eDP spec says - "If PSR/PSR2 is supported, the SET_POWER_CAPABLE bit in the EDP_GENERAL_CAPABILITY_1 register (DPCD Address 00701h, bit d7) must be set to 1." Reject PSR on panels without this cap bit set as such panels cannot be controlled via SET_POWER & SET_DP_PWR_VOLTAGE register and the DP source needs to be able to do that for PSR. Thanks to Nathan for debugging this. Panel cap checks like this can be done just once, let's fix this when PSR dpcd init movement lands. Cc: Nathan D Ciobanu Cc: Rodrigo Vivi Signed-off-by: Dhinakaran Pandiyan Tested-by: Nathan Ciobanu Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180227032723.15474-1-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_psr.c | 5 +++++ 1 file changed, 5 insertions(+) commit a2758b6b8fdba5f1045f571fdb39d9bdb8ba0813 Author: Sinan Kaya Date: Tue Feb 27 14:14:10 2018 -0600 PCI: Rename pci_flr_wait() to pci_dev_wait() and make it generic PCIe r4.0, sec 2.3.1, Request Handling Rules, says: Valid reset conditions after which a device is permitted to return CRS are: * Cold, Warm, and Hot Resets, * FLR * A reset initiated in response to a D3hot to D0 uninitialized Try to reuse FLR implementation towards other reset types. Signed-off-by: Sinan Kaya Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 48 +++++++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 17 deletions(-) commit 91295d79d65892eabd02a2a75fd4ac88197d17a1 Author: Sinan Kaya Date: Tue Feb 27 14:14:08 2018 -0600 PCI: Handle FLR failure and allow other reset types pci_flr_wait() and pci_af_flr() functions assume graceful return even though the device is inaccessible under error conditions. Return -ENOTTY in error cases so that __pci_reset_function_locked() can try other reset types if AF_FLR/FLR reset fails. Signed-off-by: Sinan Kaya Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig drivers/pci/pci.c | 18 ++++++++++-------- include/linux/pci.h | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) commit cb5e0d060fb1f3136e96acecbd4001a7f0cbac94 Author: Sinan Kaya Date: Tue Feb 27 14:14:08 2018 -0600 PCI: Protect restore with device lock to be consistent Commit b014e96d1abb ("PCI: Protect pci_error_handlers->reset_notify() usage with device_lock()") added protection around pci_dev_restore() function so a device-specific remove callback does not cause a race condition with hotplug. pci_dev_lock() usage has been forgotten in two places. Add locks for pci_slot_restore() and moving pci_dev_restore() inside the locks for pci_try_reset_function(). Signed-off-by: Sinan Kaya Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig drivers/pci/pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3975f0aaa30371d711dc8d572f679314c415a58c Author: Dhinakaran Pandiyan Date: Fri Feb 23 14:15:20 2018 -0800 drm/i915/dp: Move comment about hw timeout to the right place. No functional change. Signed-off-by: Dhinakaran Pandiyan Reviewed-by: David Weinehall Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180223221520.18464-6-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_dp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 62d5ac27f4562b3a69dc42107200f315561bdc30 Author: Dhinakaran Pandiyan Date: Fri Feb 23 14:15:19 2018 -0800 drm/i915/dp: Remove redundant sleep after AUX transaction length check. The core already takes care of the delay before retrying. The delay now changes to (500, 600)us instead of (500 + 1000, 600 + 1500)us. Cc: Rodrigo Vivi Signed-off-by: Dhinakaran Pandiyan Reviewed-by: David Weinehall Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180223221520.18464-5-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_dp.c | 8 -------- 1 file changed, 8 deletions(-) commit e2770e2e0509e8b1189e2471af3012d68ca511a2 Author: Dhinakaran Pandiyan Date: Fri Feb 23 14:15:18 2018 -0800 drm/i915/psr: Check for the specific AUX_FRAME_SYNC cap bit. The cap check should be specifically for bit 0 instead of any bit. Cc: Rodrigo Vivi Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Fixes: 474d1ec4a3d7 ("drm/i915/skl: Enabling PSR2 SU with frame sync") Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180223221520.18464-4-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_psr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77fe36ff04707bc03aeb88f110e76283d570a631 Author: Dhinakaran Pandiyan Date: Fri Feb 23 14:15:17 2018 -0800 drm/i915/psr: Extract PSR DPCD initialization and move it to intel_psr.c intel_edp_init_dpcd() is cluttered with PSR specific DPCD checks and intel_dp.c is huge. No functional change intended. v2: Rebased. Cc: Rodrigo Vivi Signed-off-by: Dhinakaran Pandiyan Reviewed-by: David Weinehall Acked-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180223221520.18464-3-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_dp.c | 64 +------------------------------------ drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_psr.c | 68 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 63 deletions(-) commit 51e98eb851616ecd9ae5017d606c5e4e8e5be79d Author: Dhinakaran Pandiyan Date: Fri Feb 23 14:15:16 2018 -0800 drm/i915/frontbuffer: Mark frontbuffer flush and invalidate with might_sleep() Frontbuffer flush and invalidate call psr, fbc and drrs functions that use mutexes but they can be called in atomic contexts in the fbdev path. The point where the spinlocks are acquired is up in the call stack that is not entirely easy to spot, so annotate with might_sleep(). Cc: Rodrigo Vivi Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180223221520.18464-2-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_frontbuffer.c | 2 ++ 1 file changed, 2 insertions(+) commit b891d5e46c96b0a41a5b09024794c631ee77c37b Author: Dhinakaran Pandiyan Date: Fri Feb 23 14:15:15 2018 -0800 drm/i915/psr: New power domain for AUX IO. PSR on CNL requires AUX IO wells to be kept on and the existing AUX domain for AUX-A enables DC_OFF well too. This is not required, so add a new AUX_IO_A domain for AUX-A to allow DC states to remain enabled. Other AUX channels re-use the existing AUX domains. v4: Reword comment (Rodrigo and Ville) Rename _get and _put functions to include aux_io substring(Rodrigo) Remove unnecessary diff that got included. v3: Extract aux domain selection into a function (Ville) v2: Add AUX IO domain only for AUX-A Rebased on top of Ville's AUX series. Cc: Imre Deak Cc: Rodrigo Vivi Cc: Ville Syrjälä Suggested-by: Imre Deak Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180223221520.18464-1-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_display.h | 1 + drivers/gpu/drm/i915/intel_psr.c | 41 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_runtime_pm.c | 3 +++ 3 files changed, 45 insertions(+) commit 3f5a68300a40fed52c02ba4f614c291028aa06cd Merge: 431c7ec a970d8d Author: David S. Miller Date: Tue Feb 27 14:53:27 2018 -0500 Merge branch 'mlx4-misc' Tariq Toukan says: ==================== mlx4_en misc for 4.17 This patchset contains misc enhancements from the team to the mlx4 Eth driver. Patch 1 by Eran adds physical layer counters. Patch 2 by Eran cleans-up a redundant warn print. Patch 3 combines the checks of two end cases into a single if statement. Patch 4 takes common code structures out of the #ifdef, following your comment on a previous patch. Series generated against net-next commit: f74290fdb363 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net ==================== Signed-off-by: David S. Miller commit a970d8dba5dab199218d13080dcad4e22cbaf8b5 Author: Tariq Toukan Date: Tue Feb 27 16:17:22 2018 +0200 net/mlx4_en: RX csum, pre-define enabled protocols for IP status masking Pre-define a mask for IP status of a completion, that tests the MLX4_CQE_STATUS_IPV6 only in case CONFIG_IPV6 is enabled. Use it for IP status testing upon completion, instead of separating the datapath into two flows. This takes common code structures (such as closing parenthesis) back to their original place, and makes code more readable. Signed-off-by: Tariq Toukan Suggested-by: David S. Miller Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 1cb8b1216c427ddbec51b8c3e77459dd44f85bcc Author: Tariq Toukan Date: Tue Feb 27 16:17:21 2018 +0200 net/mlx4_en: Combine checks of end-cases in RX completion function Combine two end-cases in the same if statement with a single return value. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 4f32e1c4a9bbb30028406c582419d0b4c8aa5af5 Author: Eran Ben Elisha Date: Tue Feb 27 16:17:20 2018 +0200 net/mlx4_en: Remove unnecessary warn print in reset config In mlx4_en_reset_config, there was a redundant warn print that was left from previous versions of this function. No warn is needed anymore. This warn can be confusing when RX-FCS is changed: Turn OFF RX-FCS: mlx4_en: eth1: Changing device configuration rx filter(0) rx vlan(1) Turn ON RX-FCS: mlx4_en: eth1: Changing device configuration rx filter(0) rx vlan(1) Signed-off-by: Eran Ben Elisha Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 4 ---- 1 file changed, 4 deletions(-) commit f26d0d2543cb34680393d9993eea4150a153c3fa Author: Eran Ben Elisha Date: Tue Feb 27 16:17:19 2018 +0200 net/mlx4_en: Add physical RX/TX bytes/packets counters Add physical RX/TX packets/bytes counters into ethtool output to monitor all traffic that was received and transmitted on the port. These counters are available only for none Virtual Function. Signed-off-by: Eran Ben Elisha Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 14 +++++++++ drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 4 +++ drivers/net/ethernet/mellanox/mlx4/en_port.c | 38 ++++++++++++++++--------- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 + drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h | 10 ++++++- 5 files changed, 53 insertions(+), 14 deletions(-) commit 431c7ec3b3bac0136c61dd38814d51519db6eee6 Merge: 63d6380 8f08a52 Author: David S. Miller Date: Tue Feb 27 14:46:28 2018 -0500 Merge branch 'mlxsw-Offloading-encapsulated-SPAN' Jiri Pirko says: ==================== mlxsw: Offloading encapsulated SPAN Petr says: This patch series introduces support for mirroring with GRE encapsulation. It offloads tc action mirred mirror from a mlxsw port to either a gretap or an ip6gretap netdevice. Spectrum hardware needs to know all the details of the requested encapsulation: source and destination MAC and IP addresses, details of VLAN tagging, etc. The only variables are the encapsulated packet itself, and TOS field, which may be inherited. To that end, mlxsw driver resolves the route that encapsulated packets would take, queries the corresponding neighbor, and with that configuration in hand, configures the mirroring in the hardware. The driver also hooks into event handlers for netdevice changes, FIB and neighbor events, and reconsiders the configuration on each such change. When the new configuration differs from the currently-offloaded one, the existing offload is removed and replaced with a new one. It is possible to mirror to {ip6,}gretap from a matchall rule as well as from a flower match. ** Note that with this patch set, mlxsw build depends on NET_IPGRE and IPV6_GRE. Current limitations: - There has to be a route that directs packets to an mlxsw port. We intend to extend the logic to support other netdevice types in the future, but the eventual egress netdevice will have to be an mlxsw port in any case. - Offload reconfiguration due to changes in netdevice configuration creates a window of time where packets are not mirrored. Under some circumstances this can be prevented by configuring an unused port analyzer and migrating mirrors over to that. However that's currently not implemented. - Remote address of a tunnel device needs to be set, there may not be a GRE key, checksumming or sequence numbers, and TTL needs to be fixed (non-inherit). These are hard requirements imposed by the underlying hardware. - TOS of a tunnel device needs to be "inherit". The hardware supports a fixed TOS, but that's currently not implemented. The series start with two patches, #1 and #2, that publish one function and add support for querying IPv6 tunnel parameters. In patches #3 and #4, we introduce helpers to GRE and tunneling code that we will use later in the patchset from the SPAN code. Patches #5 and #6 introduce support for encapsulated SPAN in reg.h. The following seven patches, #7-#13, then prepare the SPAN codebase for introduction of mirroring to netdevices that don't correspond to front panel ports. Then #14 and #15 pull all this together to implement mirroring to {ip6,}gretap netdevices. ==================== Signed-off-by: David S. Miller commit 8f08a528de5eaded034c5480588722e7dc167540 Author: Petr Machata Date: Tue Feb 27 14:53:49 2018 +0100 mlxsw: spectrum_span: Support mirror to ip6gretap Similarly to mirror-to-gretap, this enables mirroring to IPv6 gretap netdevice. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Kconfig | 2 + .../net/ethernet/mellanox/mlxsw/spectrum_span.c | 101 +++++++++++++++++++++ 2 files changed, 103 insertions(+) commit 27cf76fe60ec6fbe2ba8844261b90a6aecbc42f0 Author: Petr Machata Date: Tue Feb 27 14:53:48 2018 +0100 mlxsw: spectrum_span: Support mirror to gretap When a user requests mirror from a mlxsw physical port (possibly based on an ACL match) to a gretap netdevice, the driver needs to resolve the request to a particular physical port that the mirrored packets will egress through, and a suite of configuration keys (importantly, IP and MAC addresses). That means calling into routing and neighbor kernel code to simulate the decisions made by the system for packets passing through a gretap netdevice. Add a new instance of mlxsw_sp_span_entry_ops to support this. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Kconfig | 2 + .../net/ethernet/mellanox/mlxsw/spectrum_span.c | 167 ++++++++++++++++++++- .../net/ethernet/mellanox/mlxsw/spectrum_span.h | 8 + 3 files changed, 175 insertions(+), 2 deletions(-) commit 52a6444cda7d1b6fc6f6ff84e2d23cdb71c84102 Author: Petr Machata Date: Tue Feb 27 14:53:47 2018 +0100 mlxsw: Move a mirroring check to mlxsw_sp_span_entry_create The check for whether a mirror port (which is a mlxsw front panel port) belongs to the same mlxsw instance as the mirrored port, is currently only done in spectrum_acl, even though it's applicable for the matchall case as well. Thus move it to mlxsw_sp_span_entry_create(). Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 4 ---- drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) commit 803335acbe3371f1c0e9dd02f318b16f5abc22f4 Author: Petr Machata Date: Tue Feb 27 14:53:46 2018 +0100 mlxsw: Handle config changes pertinent to SPAN For some netdevices, for which mlxsw offloads mirroring, may have a complex relationship between the declared intent and low-level device configuration. Trying to accurately track which changes might influence offloading decisions is finicky and error-prone. Instead, this patch introduces a function mlxsw_sp_span_entry_respin, which re-queries the configuration anew and, if different, removes the existing offloads and installs new ones. Call this function strategically at event handlers that might influence the mirroring configuration. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 29 +++++++++++++--------- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 7 ++++++ .../net/ethernet/mellanox/mlxsw/spectrum_span.c | 24 ++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_span.h | 1 + 4 files changed, 49 insertions(+), 12 deletions(-) commit 169b5d95c15e01e08e1665bd8ceaff9bf8331c33 Author: Petr Machata Date: Tue Feb 27 14:53:45 2018 +0100 mlxsw: spectrum_span: Generalize SPAN support To support mirroring to different device types, the functions that partake in configuring the port analyzer need to be extended to admit non-trivial SPAN types. Create a structure where all details of SPAN configuration are kept, struct mlxsw_sp_span_parms. Also create struct mlxsw_sp_span_entry_ops to keep per-SPAN-type operations. Instantiate the latter once for MLXSW_REG_MPAT_SPAN_TYPE_LOCAL_ETH, and once for a suite of NOP callbacks used for invalidated SPAN entry. Put the formet as a sole member of a new array mlxsw_sp_span_entry_types, where all known SPAN types are kept. Introduce a new function, mlxsw_sp_span_entry_ops(), to look up the right ops suite given a netdevice. Change mlxsw_sp_span_mirror_add() to use both parms and ops structures. Change mlxsw_sp_span_entry_get() and mlxsw_sp_span_entry_create() to take these as arguments. Modify mlxsw_sp_span_entry_configure() and mlxsw_sp_span_entry_deconfigure() to dispatch to ops. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 5 - drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 3 - .../net/ethernet/mellanox/mlxsw/spectrum_span.c | 155 +++++++++++++++++---- .../net/ethernet/mellanox/mlxsw/spectrum_span.h | 17 +++ 4 files changed, 147 insertions(+), 33 deletions(-) commit 079c9f393b8d467995516c4716557373edefaa89 Author: Petr Machata Date: Tue Feb 27 14:53:44 2018 +0100 mlxsw: spectrum: Keep mirror netdev in mlxsw_sp_span_entry Currently the only mirror action supported by mlxsw is mirror to another mlxsw physical port. Correspondingly, span_entry, which tracks each mlxsw mirror in the system, currently holds a u8 number of the destination port. To extend this system to mirror to gretap and ip6gretap netdevices, have struct mlxsw_sp_span_entry actually hold the destination netdevice itself. This change then trickles down in obvious manner to SPAN module API and mirror-related interfaces in struct mlxsw_afa_ops. To prevent use of invalid pointer, NETDEV_UNREGISTER needs to be hooked and the corresponding SPAN entry invalidated. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../mellanox/mlxsw/core_acl_flex_actions.c | 13 ++++---- .../mellanox/mlxsw/core_acl_flex_actions.h | 7 ++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 11 ++++-- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 2 +- .../mellanox/mlxsw/spectrum_acl_flex_actions.c | 8 ++--- .../net/ethernet/mellanox/mlxsw/spectrum_span.c | 39 ++++++++++++++-------- .../net/ethernet/mellanox/mlxsw/spectrum_span.h | 10 ++++-- 7 files changed, 56 insertions(+), 34 deletions(-) commit 7b2ef81fd2bd4d01fc4890fb22c4dcfe76dd8c77 Author: Petr Machata Date: Tue Feb 27 14:53:43 2018 +0100 mlxsw: spectrum_span: Extract mlxsw_sp_span_entry_{de, }configure() Configuring the hardware for encapsulated SPAN involves more code than the simple mirroring case. Extract the related code to a separate function to separate it from the rest of SPAN entry creation. Extract deconfigure as well for symmetry, even though disablement is the same regardless of SPAN type. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_span.c | 43 +++++++++++++++------- 1 file changed, 29 insertions(+), 14 deletions(-) commit 3546b03ffcdb0a70b0d7302d7e139f096a613e9f Author: Petr Machata Date: Tue Feb 27 14:53:42 2018 +0100 mlxsw: spectrum_span: Initialize span_entry.id eagerly It is known statically ahead of time which SPAN entry will have which ID. Just initialize it eagerly in mlxsw_sp_span_init(), don't wait until the entry is actually created. This simplifies some code in mlxsw_sp_span_entry_create() Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 98977089d8eef337608272699f4197c631d447b8 Author: Petr Machata Date: Tue Feb 27 14:53:41 2018 +0100 mlxsw: span: Remove span_entry by span_id Instead of removing span_entry by the port number, allow removing by SPAN id. That simplifies some code right here, and for mirroring to soft netdevices, avoids problems with netdevice pointer invalidation and reuse. Rename mlxsw_sp_span_entry_find() to mlxsw_sp_span_entry_find_by_port() and keep it--follow-up patches will make use of it. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../mellanox/mlxsw/core_acl_flex_actions.c | 6 ++--- .../mellanox/mlxsw/core_acl_flex_actions.h | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 5 ++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 +- .../mellanox/mlxsw/spectrum_acl_flex_actions.c | 27 ++++---------------- .../net/ethernet/mellanox/mlxsw/spectrum_span.c | 29 ++++++++++++++++------ .../net/ethernet/mellanox/mlxsw/spectrum_span.h | 7 +++--- 7 files changed, 37 insertions(+), 41 deletions(-) commit 1da93eb466dc6f8a92e0316fd983ee8a3338db4c Author: Petr Machata Date: Tue Feb 27 14:53:40 2018 +0100 mlxsw: reg: Extend mlxsw_reg_mpat_pack() To support encapsulated SPAN, extend mlxsw_reg_mpat_pack() with a field to set the SPAN type. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 4 +++- drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) commit 0d6cd3fcbc0222234c7f91c7f3e57d34fc009714 Author: Petr Machata Date: Tue Feb 27 14:53:39 2018 +0100 mlxsw: reg: Add SPAN encapsulation to MPAT register MPAT Register is used to query and configure the Switch Port Analyzer Table. To configure Port Analyzer to encapsulate mirrored packets, additional fields need to be specified for the MPAT register. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 141 +++++++++++++++++++++++++++++- 1 file changed, 139 insertions(+), 2 deletions(-) commit b0066da52ea53bae2b4ceed3f47d488df27dab66 Author: Petr Machata Date: Tue Feb 27 14:53:38 2018 +0100 ip_tunnel: Rename & publish init_tunnel_flow Initializing struct flowi4 is useful for drivers that need to emulate routing decisions made by a tunnel interface. Publish the function (appropriately renamed) so that the drivers in question don't need to cut'n'paste it around. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/ip_tunnels.h | 16 ++++++++++++++++ net/ipv4/ip_tunnel.c | 40 ++++++++++++---------------------------- 2 files changed, 28 insertions(+), 28 deletions(-) commit d1b2a6c4bed99fc7e8a11e7abcff19293d1974f5 Author: Petr Machata Date: Tue Feb 27 14:53:37 2018 +0100 net: GRE: Add is_gretap_dev, is_ip6gretap_dev Determining whether a device is a GRE device is easily done by inspecting struct net_device.type. However, for the tap variants, the type is just ARPHRD_ETHER. Therefore introduce two predicate functions that use netdev_ops to tell the tap devices. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/gre.h | 3 +++ net/ipv4/ip_gre.c | 6 ++++++ net/ipv6/ip6_gre.c | 6 ++++++ 3 files changed, 15 insertions(+) commit 8897207c89156a5d05dc5bf1a80dede21e768f0a Author: Petr Machata Date: Tue Feb 27 14:53:36 2018 +0100 mlxsw: spectrum_ipip: Support decoding IPv6 tunnel addresses To support mirroring to ip6gretap, the SPAN module needs to be able to decode IPv6 addresses specified at that tunnel. Extend mlxsw_sp_ipip_netdev_saddr() and mlxsw_sp_ipip_netdev_daddr() to support IPv6 addresses. To that end, add and publish a support function mlxsw_sp_ipip_netdev_parms6(). Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_ipip.c | 29 ++++++++++++++++++++-- .../net/ethernet/mellanox/mlxsw/spectrum_ipip.h | 2 ++ 2 files changed, 29 insertions(+), 2 deletions(-) commit 7e58a6c6627c8083a21351ef6bbc60ad0eaae1de Author: Petr Machata Date: Tue Feb 27 14:53:35 2018 +0100 mlxsw: spectrum_ipip: Extract mlxsw_sp_l3addr_is_zero Extract the logic for determining whether a given IPv4/IPv6 address is all-zeroes from mlxsw_sp_ipip_tunnel_complete to a separate function. Make that function public within the module. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c | 16 +++++++++++----- drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h | 6 ++++-- 2 files changed, 15 insertions(+), 7 deletions(-) commit 63d638012e78ed2eb7bf484c30d2cc3263c3b5a1 Merge: 51846bf 20a8ab7 Author: David S. Miller Date: Tue Feb 27 14:31:20 2018 -0500 Merge branch 'ibmvnic-Miscellaneous-driver-fixes-and-enhancements' Thomas Falcon says: ==================== ibmvnic: Miscellaneous driver fixes and enhancements There is not a general theme to this patch set other than that it fixes a few issues with the ibmvnic driver. I will just give a quick summary of what each patch does here. "ibmvnic: Fix TX descriptor tracking again" resolves a race condition introduced in an earlier fix to track outstanding transmit descriptors. This condition can throw off the tracking counter to the point that a transmit queue will halt forever. "ibmvnic: Allocate statistics buffers during probe" allocates queue statistics buffers on device probe to avoid a crash when accessing statistics of an unopened interface. "ibmvnic: Harden TX/RX pool cleaning" includes additional checks to avoid a bad access when cleaning RX and TX buffer pools during a device reset. "ibmvnic: Report queue stops and restarts as debug output" changes TX queue state notifications from informational to debug messages. This information is not necessarily useful to a user and under load can result in a lot of log output. "ibmvnic: Do not attempt to login if RX or TX queues are not allocated" checks that device queues have been allocated successfully before attempting device login. This resolves a panic that could occur if a user attempted to configure a device after a failed reset. Thanks for your attention. ==================== Signed-off-by: David S. Miller commit 20a8ab744ff799ccedd35aba0d3139782f341bed Author: Thomas Falcon Date: Mon Feb 26 18:10:59 2018 -0600 ibmvnic: Do not attempt to login if RX or TX queues are not allocated If a device reset fails for some reason, TX and RX queue resources could be released. If a user attempts to open the device in this scenario, it may result in a kernel panic as the driver tries to access this memory. To fix this, include a check before device login that TX/RX queues are still there before enabling the device. In addition, return a value that can be checked in case of any errors to avoid waiting for a completion that will never come. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 0aecb13ce3abe1372c7306c7d1b86ff748296abb Author: Thomas Falcon Date: Mon Feb 26 18:10:58 2018 -0600 ibmvnic: Report queue stops and restarts as debug output It's not necessary to report each time a queue is stopped and restarted as an informational message. Change that to be a debug message so that it can be observed if needed but not printed by default. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 637f81d164a5347ee3325f106f815c7969c032b5 Author: Thomas Falcon Date: Mon Feb 26 18:10:57 2018 -0600 ibmvnic: Harden TX/RX pool cleaning If the driver releases resources after a failed reset or some other error, the driver might attempt to clean up and free memory that isn't there anymore. Include some additional checks that RX/TX queues along with their associated structures are still there before cleaning. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 53cc7721fdf12e649994cfb7d8f562acb0e4510b Author: Thomas Falcon Date: Mon Feb 26 18:10:56 2018 -0600 ibmvnic: Allocate statistics buffers during probe Currently, buffers holding individual queue statistics are allocated when the device is opened. If an ibmvnic interface is hotplugged or initialized but never opened, an attempt to get statistics with ethtool will result in a kernel panic. Since the driver allocates a constant number, the maximum supported queues, of buffers, these can be allocated during device probe and freed when the device is hot-unplugged or the module is removed. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit ecba616e041e64840d14e294b089ca355614b7fb Author: Thomas Falcon Date: Mon Feb 26 18:10:55 2018 -0600 ibmvnic: Fix TX descriptor tracking again Sorry, the previous change introduced a race condition between transmit completion processing and tracking TX descriptors. If a completion is received before the number of descriptors is logged, the number of descriptors will be add but not removed. After enough times, this could halt the transmit queue forever. Log the number of descriptors used by a transmit before sending. I stress tested the fix on two different systems running over the weekend without any issues. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 51846bfef65951ee6148e03217d31acff8d039a6 Merge: f4155ef 1e88f6e Author: David S. Miller Date: Tue Feb 27 14:28:11 2018 -0500 Merge branch 'stmmac-barrier-fixes-and-cleanup' Niklas Cassel says: ==================== stmmac barrier fixes and cleanup ==================== Signed-off-by: David S. Miller commit 1e88f6e01bc094c9fc7021cc1944d14a63257703 Author: Niklas Cassel Date: Mon Feb 26 22:47:09 2018 +0100 net: stmmac: make dwmac4_release_tx_desc() clear all descriptor fields Make dwmac4_release_tx_desc() clear all descriptor fields, not just TDES2 and TDES3. I'm suspecting that TDES0 and TDES1 wasn't cleared because the DMA engine uses them to store the tx hardware timestamp (if PTP is enabled). However, stmmac_tx_clean() calls stmmac_get_tx_hwtstamp(), which reads and saves the timestamp, before it calls release_tx_desc(), so this is not an issue. stmmac_xmit() and stmmac_tso_xmit() both always overwrite TDES0, however, stmmac_tso_xmit() sometimes sets TDES1, and since neither stmmac_xmit() nor stmmac_tso_xmit() explicitly clears TDES1, both functions might reuse a DMA descriptor with old TDES1 data. I haven't observed any misbehavior even though TDES1 sometimes point to an old skb, however, explicitly clearing both TDES0 and TDES1 in dwmac4_release_tx_desc() minimizes the chances of undefined behavior. Signed-off-by: Niklas Cassel Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 2 ++ 1 file changed, 2 insertions(+) commit a6b25da5e7ba212af5826a662e6a035a79bffabd Author: Niklas Cassel Date: Mon Feb 26 22:47:08 2018 +0100 net: stmmac: ensure that the device has released ownership before reading data According to Documentation/memory-barriers.txt, we need to use a dma_rmb() after reading the status/own bit, to ensure that all descriptor fields are read after reading the own bit. This way, we ensure that the DMA engine is done with the DMA descriptor before we read the other descriptor fields, e.g. reading the tx hardware timestamp (if PTP is enabled). Signed-off-by: Niklas Cassel Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +++++ 1 file changed, 5 insertions(+) commit 95eb930a40a0973f9b984d87a4986bb81f897ede Author: Niklas Cassel Date: Mon Feb 26 22:47:07 2018 +0100 net: stmmac: use correct barrier between coherent memory and MMIO The last memory barrier in stmmac_xmit()/stmmac_tso_xmit() is placed between a coherent memory write and a MMIO write: The own bit is written in First Desc (TSO: MSS desc or First Desc). The DMA engine is started by a write to the tx desc tail pointer/ enable dma transmission register, i.e. a MMIO write. This barrier cannot be a simple dma_wmb(), since a dma_wmb() is only used to guarantee the ordering, with respect to other writes, to cache coherent DMA memory. To guarantee that the cache coherent memory writes have completed before we attempt to write to the cache incoherent MMIO region, we need to use the more heavyweight barrier wmb(). Signed-off-by: Niklas Cassel Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 15d2ee42a3087089e73ad52fd8c1b37ab496b87c Author: Niklas Cassel Date: Mon Feb 26 22:47:06 2018 +0100 net: stmmac: ensure that the MSS desc is the last desc to set the own bit A dma_wmb() is used to guarantee the ordering, with respect to other writes, to cache coherent DMA memory. There is a dma_wmb() in prepare_tx_desc()/prepare_tso_tx_desc() which ensures that TDES0/1/2 is written before TDES3 (which contains the own bit), for First Desc. However, in the rare case that MSS changes, there will be a MSS context descriptor in front of the regular DMA descriptors: <- DMA Next Descriptor Thus, for this special case, we need a dma_wmb() after prepare_tso_tx_desc()/before writing the own bit to the MSS desc, so that we flush the write to TDES3 for First Desc, in order to ensure that the MSS descriptor is the last descriptor to set the own bit. Signed-off-by: Niklas Cassel Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit f4155eff1f27076467826cf9bf77723277ead2ec Merge: c1de13b 6f3899e Author: David S. Miller Date: Tue Feb 27 14:19:11 2018 -0500 Merge branch 'RDS-optimized-notification-for-zerocopy-completion' Sowmini Varadhan says: ==================== RDS: optimized notification for zerocopy completion Resending with acked-by additions: previous attempt does not show up in Patchwork. This time with a new mail Message-Id. RDS applications use predominantly request-response, transacation based IPC, so that ingress and egress traffic are well-balanced, and it is possible/desirable to reduce system-call overhead by piggybacking the notifications for zerocopy completion response with data. Moreover, it has been pointed out that socket functions block if sk_err is non-zero, thus if the RDS code does not plan/need to use sk_error_queue path for completion notification, it is preferable to remove the sk_errror_queue related paths in RDS. Both of these goals are implemented in this series. v2: removed sk_error_queue support v3: incorporated additional code review comments (details in each patch) ==================== Signed-off-by: David S. Miller commit 6f3899e602b0f4ec3d62ff385bb805e7109defa4 Author: Sowmini Varadhan Date: Tue Feb 27 09:52:44 2018 -0800 selftests/net: reap zerocopy completions passed up as ancillary data. PF_RDS sockets pass up cookies for zerocopy completion as ancillary data. Update msg_zerocopy to reap this information. Signed-off-by: Sowmini Varadhan Acked-by: Willem de Bruijn Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller tools/testing/selftests/net/msg_zerocopy.c | 65 ++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 8 deletions(-) commit 401910db4cd425899832a093539222b6174f92a2 Author: Sowmini Varadhan Date: Tue Feb 27 09:52:43 2018 -0800 rds: deliver zerocopy completion notification with data This commit is an optimization over commit 01883eda72bd ("rds: support for zcopy completion notification") for PF_RDS sockets. RDS applications are predominantly request-response transactions, so it is more efficient to reduce the number of system calls and have zerocopy completion notification delivered as ancillary data on the POLLIN channel. Cookies are passed up as ancillary data (at level SOL_RDS) in a struct rds_zcopy_cookies when the returned value of recvmsg() is greater than, or equal to, 0. A max of RDS_MAX_ZCOOKIES may be passed with each message. This commit removes support for zerocopy completion notification on MSG_ERRQUEUE for PF_RDS sockets. Signed-off-by: Sowmini Varadhan Acked-by: Willem de Bruijn Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller include/uapi/linux/errqueue.h | 2 -- include/uapi/linux/rds.h | 7 +++++++ net/rds/af_rds.c | 7 +++++-- net/rds/message.c | 38 ++++++++++++++++---------------------- net/rds/rds.h | 2 ++ net/rds/recv.c | 31 ++++++++++++++++++++++++++++++- 6 files changed, 60 insertions(+), 27 deletions(-) commit 67490e34ba2b1c02fb554a8059cd6ce12b47ccfb Author: Sowmini Varadhan Date: Tue Feb 27 09:52:42 2018 -0800 selftests/net: revert the zerocopy Rx path for PF_RDS In preparation for optimized reception of zerocopy completion, revert the Rx side changes introduced by Commit dfb8434b0a94 ("selftests/net: add zerocopy support for PF_RDS test case") Signed-off-by: Sowmini Varadhan Acked-by: Willem de Bruijn Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller tools/testing/selftests/net/msg_zerocopy.c | 67 ------------------------------ 1 file changed, 67 deletions(-) commit c1de13bb9374ae6b8f4278add102fc33e94c463b Merge: 6c6aa15 5dd3691 Author: David S. Miller Date: Tue Feb 27 12:56:36 2018 -0500 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2018-02-26 This series contains updates to i40e and i40evf only. Mariusz adds a new ethtool private flag for forcing true link state with the requested changes from Jakub Kicinski. Paweł fixes an issue where we were double locking the same resource which would generate a kernel panic after bringing an interface up for i40evf. Alan modifies both drivers to use software values to determine if there are packets stalled on the ring with the added benefit of being less CPU intensive since we do not need to reach into the hardware to get the values. Colin Ian King provides a few fixes detected by Coverity, first was to pass a struct by reference versus by value to be more efficient. Then verify the VSI pointer is not NULL before trying to dereference it. Cleaned up redundant checks that always return true. Dan Carpenter fixes over indented lines of code. ==================== Signed-off-by: David S. Miller commit 2ac54194ce5ff0f32b72f0ee2c78bdf878fd2cec Author: Dave Gerlach Date: Sun Feb 18 21:35:05 2018 -0600 ARM: dts: am4372: Mark omap_l3_noc with ti,no-idle We can never idle the l3_main hwmod so mark the omap_l3_noc node with ti,no-idle. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/boot/dts/am4372.dtsi | 1 + 1 file changed, 1 insertion(+) commit f3ca5dffb02c18ac3ad43143c82a9ad9a8745167 Author: Dave Gerlach Date: Sun Feb 18 21:35:04 2018 -0600 ARM: dts: am4372: Mark emif with ti,no-idle We can never idle the emif hwmod from within the HLOS so mark the emif node with ti,no-idle. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/boot/dts/am4372.dtsi | 1 + 1 file changed, 1 insertion(+) commit 819cb953227291709b8cc1add52b1057852938ef Author: Dave Gerlach Date: Sun Feb 18 21:35:03 2018 -0600 ARM: dts: am33xx: Mark emif with ti,no-idle We can never idle the emif hwmod from within the HLOS so mark the emif node with ti,no-idle. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx.dtsi | 1 + 1 file changed, 1 insertion(+) commit 39dd21a25faffe582dff8a9172869cae99a7b08b Author: Dave Gerlach Date: Sun Feb 18 21:35:02 2018 -0600 ARM: dts: am4372: Add soc node Add soc node for am4372 with pm-sram phandle to both pm-sram-code and pm-sram-data regions. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/boot/dts/am4372.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a77419a28fae48bee44cb938ea95e8ea1bca7c71 Author: Dave Gerlach Date: Sun Feb 18 21:35:01 2018 -0600 ARM: dts: am33xx: Add pm-sram phandle to soc node Add a phandle to point to both the pm-sram-code and pm-sram-data nodes so that the pm code can locate the sram regions needed to copy low level PM code. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 16df2216c3dcce2d952466f9745e9a3c7a0de253 Author: Dave Gerlach Date: Sun Feb 18 21:35:00 2018 -0600 ARM: dts: am4372: Update emif node Now that we will use ti-emif-sram driver for am4372 PM, update the emif DT node with the required sram property. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/boot/dts/am4372.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit b08a966ae21f0240358983b1af07bc0d2dd7a4de Author: Dave Gerlach Date: Sun Feb 18 21:34:59 2018 -0600 ARM: dts: am33xx: Update emif node Now that we will use ti-emif-sram driver for am335x PM, update the emif DT node with the required sram property. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 590e1d5ec6da4c493d1bde71894109cbee29dfcc Author: Dave Gerlach Date: Sun Feb 18 21:34:58 2018 -0600 ARM: dts: am4372: Reserve pm code and data regions in ocmcram sram node Add a 'pm_sram_code' reserved region to the ocmcram node to be exposed by the mmio-sram driver as a pool but also mark it protect-exec so that it can run code copied to it using sram_exec_copy. Add another 'pm_sram_data' reserved region to the ocmcram node to act as the data space for any code running from the 'pm_sram_code' region that is exposed as a regular pool. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/boot/dts/am4372.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 31ffe020af5d1048fddfa6b3f0002da9f5042cc0 Author: Dave Gerlach Date: Sun Feb 18 21:34:57 2018 -0600 ARM: dts: am33xx: Reserve pm code and data regions in ocmcram sram node Add a 'pm_sram_code' reserved region to the ocmcram node to be exposed by the mmio-sram driver as a pool but also mark it protect-exec so that it can run code copied to it using sram_exec_copy. Add another 'pm_sram_data' reserved region to the ocmcram node to act as the data space for any code running from the 'pm_sram_code' region that is exposed as a regular pool. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 0f555518eaee4f3855ffa9e8237b938af186df55 Author: Markus Elfring Date: Thu Feb 15 20:14:32 2018 +0100 cpufreq: powernow-k8: Drop unnecessary return statements from two functions The script "checkpatch.pl" pointed information out like the following. WARNING: void function return statements are not generally useful Thus remove such a statement in the affected functions. Signed-off-by: Markus Elfring Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/powernow-k8.c | 2 -- 1 file changed, 2 deletions(-) commit 7f3a1d66df044709238ec674138dfff23b4712ff Author: Markus Elfring Date: Thu Feb 15 20:00:23 2018 +0100 cpufreq: powernow-k8: Drop memory allocation error messages from three functions Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/powernow-k8.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit d6b96e4706df9791f7c4915a567c498b0aafb659 Author: Markus Elfring Date: Thu Feb 15 18:00:37 2018 +0100 cpufreq: qoriq: Drop memory allocation error messages from qoriq_cpufreq_cpu_init() Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/qoriq-cpufreq.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit d430fb998451eb99f5592c003598e8324976f0cd Author: Markus Elfring Date: Thu Feb 15 17:28:40 2018 +0100 cpufreq: s3c24xx: Drop memory allocation error messages from two functions Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/s3c24xx-cpufreq.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 3e3b507ef60cb53c209ef8f5d0fef48ddff1b3f4 Author: Viresh Kumar Date: Thu Feb 22 15:24:57 2018 +0530 cpufreq: tegra186: Break after initialization is done for policy->cpu There are two clusters (2 + 4 CPUs) on this platform and a separate cpufreq policy is available for each of the CPUs. The loop in tegra186_cpufreq_init() tries to find the structure for the right CPU and finish initialization. But it is missing a `break` statement at the end, which forces it to restart the loop even when the CPU already matched and initialization is done. Fix that by adding the missing `break` statement. Signed-off-by: Viresh Kumar Reviewed-by: Mikko Perttunen Signed-off-by: Rafael J. Wysocki drivers/cpufreq/tegra186-cpufreq.c | 1 + 1 file changed, 1 insertion(+) commit d417e0691ac00d35c4e6b90fc3fc85631a7865ad Author: Viresh Kumar Date: Thu Feb 22 11:29:44 2018 +0530 cpufreq: Validate frequency table in the core By design, cpufreq drivers are responsible for calling cpufreq_frequency_table_cpuinfo() from their ->init() callbacks to validate the frequency table. However, if a cpufreq driver is buggy and fails to do so properly, it lead to unexpected behavior of the driver or the cpufreq core at a later point in time. It would be better if the core could validate the frequency table during driver initialization. To that end, introduce cpufreq_table_validate_and_sort() and make the cpufreq core call it right after invoking the ->init() callback of the driver and destroy the cpufreq policy if the table is invalid. For the time being the validation of the table happens twice, once from the driver and then from the core. The individual drivers will be updated separately to drop table validation if they don't need it for other reasons. The frequency table is marked "sorted" or "unsorted" by the new helper now instead of in cpufreq_table_validate_and_show(), as it should only be done after validating the table (which the drivers won't do going forward). Signed-off-by: Viresh Kumar [ rjw: Subject/changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 13 +++++++++---- drivers/cpufreq/freq_table.c | 16 +++++++++++++++- include/linux/cpufreq.h | 1 + 3 files changed, 25 insertions(+), 5 deletions(-) commit b24b6478e65f140610ab1ffaadc7bc6bf0be8aad Author: Viresh Kumar Date: Thu Feb 22 11:29:43 2018 +0530 cpufreq: Reorder cpufreq_online() error code path Ideally the de-allocation of resources should happen in the exact opposite order in which they were allocated. It helps maintain the code in long term, even if nothing really breaks with incorrect ordering. That wasn't followed in cpufreq_online() and it has some inconsistencies. For example, the symlinks were created from within the locked region while they are removed only after putting the locks. Also ->exit() should have been called only after the symlinks are removed and the lock is dropped, as that was the case when ->init() was first called. Signed-off-by: Viresh Kumar [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cb8bd2ff1528a3f0234ec04b667bf91a3be7ac30 Author: Viresh Kumar Date: Thu Feb 22 11:26:31 2018 +0530 cpufreq: mediatek: Convert pr_warn() to pr_debug() With multi-platform build images, this shows a message on non mediatek platforms, which is unnecessary. Convert pr_warn() to pr_debug() here. Signed-off-by: Viresh Kumar Acked-by: Sean Wang Signed-off-by: Rafael J. Wysocki drivers/cpufreq/mediatek-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71d22d58b6e507147a9008ce2fd690cf311c97f9 Author: Daniel Borkmann Date: Mon Feb 26 22:13:52 2018 +0100 bpf, x64: remove bpf_flush_icache Unlike other archs flush_icache_range() is a noop on x64, therefore remove the JIT's bpf_flush_icache() altogether since not needed. Reported-by: Linus Torvalds Signed-off-by: Daniel Borkmann Cc: Eric Dumazet Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov arch/x86/net/bpf_jit_comp.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit ead18c23c263374ed098a7d955b29b4a466d4573 Author: Lukas Wunner Date: Sat Feb 10 19:27:12 2018 +0100 driver core: Introduce device links reference counting If device_link_add() is invoked multiple times with the same supplier and consumer combo, it will create the link on first addition and return a pointer to the already existing link on all subsequent additions. The semantics for device_link_del() are quite different, it deletes the link unconditionally, so multiple invocations are not allowed. In other words, this snippet ... struct device *dev1, *dev2; struct device_link *link1, *link2; link1 = device_link_add(dev1, dev2, 0); link2 = device_link_add(dev1, dev2, 0); device_link_del(link1); device_link_del(link2); ... causes the following crash: WARNING: CPU: 4 PID: 2686 at drivers/base/power/runtime.c:1611 pm_runtime_drop_link+0x40/0x50 [...] list_del corruption, 0000000039b800a4->prev is LIST_POISON2 (00000000ecf79852) kernel BUG at lib/list_debug.c:50! The issue isn't as arbitrary as it may seem: Imagine a device link which is added in both the supplier's and the consumer's ->probe hook. The two drivers can't just call device_link_del() in their ->remove hook without coordination. Fix by counting multiple additions and dropping the device link only when the last addition is unwound. Signed-off-by: Lukas Wunner [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki drivers/base/core.c | 25 +++++++++++++++++-------- include/linux/device.h | 2 ++ 2 files changed, 19 insertions(+), 8 deletions(-) commit 319ce21acca613eac051ace5437cf02a6020d81e Author: Viresh Kumar Date: Fri Feb 9 14:28:09 2018 +0530 dt-bindings: cpufreq-dt: Remove "cooling-{min|max}-level" properties The "cooling-min-level" and "cooling-max-level" properties are not parsed by any part of kernel currently and the max cooling state of a CPU cooling device is found by referring to the cpufreq table instead. Remove the unused bindings. Signed-off-by: Viresh Kumar Reviewed-by: Rob Herring Signed-off-by: Rafael J. Wysocki Documentation/devicetree/bindings/cpufreq/cpufreq-dt.txt | 4 ---- 1 file changed, 4 deletions(-) commit 5b22419ef4d7c39b40fac6a8e0ad40d1e03cbb2a Author: Viresh Kumar Date: Fri Feb 9 14:28:03 2018 +0530 ARM: dts: mt7623: Remove "cooling-{min|max}-level" for CPU nodes The "cooling-min-level" and "cooling-max-level" properties are not parsed by any part of the kernel currently and the max cooling state of a CPU cooling device is found by referring to the cpufreq table instead. Remove the unused properties from the CPU nodes. Signed-off-by: Viresh Kumar Reviewed-by: Rob Herring Signed-off-by: Rafael J. Wysocki Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt | 4 ---- arch/arm/boot/dts/mt7623.dtsi | 2 -- 2 files changed, 6 deletions(-) commit afe761f8d3e99155b76833421e76553a3ac69577 Author: Dave Gerlach Date: Fri Feb 23 09:43:57 2018 -0600 soc: ti: Add pm33xx driver for basic suspend support AM335x and AM437x support various low power modes as documented in section 8.1.4.3 of the AM335x Technical Reference Manual and section 6.4.3 of the AM437x Technical Reference Manual. DeepSleep0 mode offers the lowest power mode with limited wakeup sources without a system reboot and is mapped as the suspend state in the kernel. In this state, MPU and PER domains are turned off with the internal RAM held in retention to facilitate the resume process. As part of the boot process, the assembly code is copied over to OCMCRAM so it can be executed to turn of the EMIF and put DDR into self refresh. Both platforms have a Cortex-M3 (WKUP_M3) which assists the MPU in DeepSleep0 entry and exit. WKUP_M3 takes care of the clockdomain and powerdomain transitions based on the intended low power state. MPU needs to load the appropriate WKUP_M3 binary onto the WKUP_M3 memory space before it can leverage any of the PM features like DeepSleep. This loading is handled by the remoteproc driver wkup_m3_rproc. Communication with the WKUP_M3 is handled by a wkup_m3_ipc driver that exposes the specific PM functionality to be used the PM code. In the current implementation when the suspend process is initiated, MPU interrupts the WKUP_M3 to let it know about the intent of entering DeepSleep0 and waits for an ACK. When the ACK is received MPU continues with its suspend process to suspend all the drivers and then jumps to assembly in OCMC RAM. The assembly code puts the external RAM in self-refresh mode, gates the MPU clock, and then finally executes the WFI instruction. Execution of the WFI instruction with MPU clock gated triggers another interrupt to the WKUP_M3 which then continues with the power down sequence wherein the clockdomain and powerdomain transition takes place. As part of the sleep sequence, WKUP_M3 unmasks the interrupt lines for the wakeup sources. WFI execution on WKUP_M3 causes the hardware to disable the main oscillator of the SoC and from here system remains in sleep state until a wake source brings the system into resume path. When a wakeup event occurs, WKUP_M3 starts the power-up sequence by switching on the power domains and finally enabling the clock to MPU. Since the MPU gets powered down as part of the sleep sequence in the resume path ROM code starts executing. The ROM code detects a wakeup from sleep and then jumps to the resume location in OCMC which was populated in one of the IPC registers as part of the suspend sequence. Code is based on work by Vaibhav Bedia. Signed-off-by: Dave Gerlach Acked-by: Santosh Shilimkar Signed-off-by: Tony Lindgren Documentation/devicetree/bindings/arm/omap/mpu.txt | 16 + drivers/soc/ti/Kconfig | 9 + drivers/soc/ti/Makefile | 1 + drivers/soc/ti/pm33xx.c | 349 +++++++++++++++++++++ 4 files changed, 375 insertions(+) commit 41d9d44d725808f27b53f266733e6d17d83020ba Author: Dave Gerlach Date: Fri Feb 23 09:43:56 2018 -0600 ARM: OMAP2+: pm33xx-core: Add platform code needed for PM Most of the PM code needed for am335x and am437x can be moved into a module under drivers but some core code must remain in mach-omap2 at the moment. This includes some internal clockdomain APIs and low-level ARM APIs which are also not exported for use by modules. Implement a few functions that handle these low-level platform operations can be passed to the pm33xx module through the use of platform data. In addition to this, to be able to share data structures between C and the sleep33xx and sleep43xx assembly code, we can automatically generate all of the C struct member offsets and sizes as macros by processing pm-asm-offsets.c into assembly code and then extracting the relevant data as is done for the generated platform asm-offsets.h files. Finally, add amx3_common_pm_init to create a dummy platform_device for pm33xx so that our soon to be introduced pm33xx module can probe on am335x and am437x platforms to enable basic suspend to mem and standby support. Signed-off-by: Dave Gerlach Acked-by: Santosh Shilimkar Signed-off-by: Tony Lindgren arch/arm/mach-omap2/Kconfig | 1 + arch/arm/mach-omap2/Makefile | 16 +++ arch/arm/mach-omap2/common.h | 7 ++ arch/arm/mach-omap2/io.c | 2 + arch/arm/mach-omap2/pm-asm-offsets.c | 31 ++++++ arch/arm/mach-omap2/pm.h | 3 + arch/arm/mach-omap2/pm33xx-core.c | 189 +++++++++++++++++++++++++++++++++++ arch/arm/mach-omap2/sleep33xx.S | 2 + arch/arm/mach-omap2/sleep43xx.S | 2 + include/linux/platform_data/pm33xx.h | 42 ++++++++ 10 files changed, 295 insertions(+) commit 41d37e61372fdaf4d7e381580c0c3bf88972f7da Author: Dave Gerlach Date: Fri Feb 23 09:43:55 2018 -0600 ARM: OMAP2+: Introduce low-level suspend code for AM43XX Although similar to AM33XX, introduce a new low-level asm file for suspend containing new context save and restore paths for EMIF and l2 cache disabling and enabling. Signed-off-by: Dave Gerlach Acked-by: Santosh Shilimkar Signed-off-by: Tony Lindgren arch/arm/mach-omap2/sleep43xx.S | 385 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 385 insertions(+) commit 8a94cd7ec05e2be9224c77497f4b3591b3ec05e2 Author: Dave Gerlach Date: Fri Feb 23 09:43:54 2018 -0600 ARM: OMAP2+: Introduce low-level suspend code for AM33XX In preparation for suspend-resume support for AM33XX, add the assembly file with the code which is copied to internal memory (OCMC RAM) during bootup and runs from there. As part of the low power entry (DeepSleep0 mode in AM33XX TRM), the code running from OCMC RAM does the following 1. Calls routine to store the EMIF configuration 2. Calls routine to place external memory in self-refresh 3. Disables EMIF clock 4. Executes WFI after writing to MPU_CLKCTRL register. If no interrupts have come, WFI execution on MPU gets registered as an interrupt with the WKUP-M3. WKUP-M3 takes care of disabling some clocks which MPU should not (L3, L4, OCMC RAM etc) and takes care of clockdomain and powerdomain transitions as part of the DeepSleep0 mode entry. In case a late interrupt comes in, WFI ends up as a NOP and MPU continues execution from internal memory. The 'abort path' code undoes whatever was done as part of the low power entry and indicates a suspend failure by passing a non-zero value to the cpu_resume routine. The 'resume path' code is similar to the 'abort path' with the key difference of MMU being enabled in the 'abort path' but being disabled in the 'resume path' due to MPU getting powered off. Signed-off-by: Dave Gerlach Acked-by: Santosh Shilimkar Signed-off-by: Tony Lindgren arch/arm/mach-omap2/sleep33xx.S | 212 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) commit 3a3b745f1eaeb5c9f876bcc7849f6e35fbc87397 Author: Lior David Date: Mon Feb 26 20:12:18 2018 +0200 wil6210: add debugfs 'mids' file Added a new debugfs file 'mids' to print the list of virtual interfaces by MAC ID (MID). Allows mapping between the internal MID used by FW and the actual network interface used by the VIF. This is needed by debugging tools. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/debugfs.c | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 5bd6098252104f1007882805e9d7c36924ff6a81 Author: Lior David Date: Mon Feb 26 20:12:17 2018 +0200 wil6210: multiple VIFs support for connections and data path Track the connection status per-VIF. The data path code is also updated to support multiple VIFs. This includes RX and TX VRING management, NAPI poll loops, RX reordering and related code. Power management code used to check if the main interface is up or based on connection state of the main interface, adapt this code to take all VIFs into account. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 32 +++---- drivers/net/wireless/ath/wil6210/debugfs.c | 20 +++- drivers/net/wireless/ath/wil6210/interrupt.c | 2 +- drivers/net/wireless/ath/wil6210/main.c | 78 ++++++++++----- drivers/net/wireless/ath/wil6210/netdev.c | 46 ++++++++- drivers/net/wireless/ath/wil6210/pcie_bus.c | 18 ++-- drivers/net/wireless/ath/wil6210/pm.c | 131 ++++++++++++++++++-------- drivers/net/wireless/ath/wil6210/rx_reorder.c | 36 ++++--- drivers/net/wireless/ath/wil6210/txrx.c | 79 ++++++++++------ drivers/net/wireless/ath/wil6210/txrx.h | 22 ++++- drivers/net/wireless/ath/wil6210/wil6210.h | 25 +++-- drivers/net/wireless/ath/wil6210/wmi.c | 9 +- 12 files changed, 347 insertions(+), 151 deletions(-) commit 404bbb3cca3c269ef392017053a8d4cb83e0cc77 Author: Lior David Date: Mon Feb 26 20:12:16 2018 +0200 wil6210: rename p2p_wdev_mutex to vif_mutex As more support is added for multiple VIFs, there is a need to protect the wil6210_vif structure from access while it is deleted (mainly from del_virtual_intf operation). Instead of adding another mutex, use p2p_wdev_mutex and rename it to vif_mutex to reflect the added role. Its existing roles are similar so it extends nicely (for example it protects the scan_request member which is also a member of wil6210_vif). Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 22 +++++++++---------- drivers/net/wireless/ath/wil6210/main.c | 16 +++++++------- drivers/net/wireless/ath/wil6210/p2p.c | 34 ++++++++++++++--------------- drivers/net/wireless/ath/wil6210/wil6210.h | 2 +- drivers/net/wireless/ath/wil6210/wmi.c | 8 +++---- 5 files changed, 41 insertions(+), 41 deletions(-) commit 3ada9314b4ea06e656ebb8f5806ff97596a3d548 Author: Lior David Date: Mon Feb 26 20:12:15 2018 +0200 wil6210: multiple VIFs support for start/stop AP Add support for multiple VIFs in the cfg80211 operations start_ap, stop_ap and change_beacon. This change allows starting multiple APs using virtual interfaces. The data path and most other operations are still working only on the main interface. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 49 +++++++++++++++++++---------- drivers/net/wireless/ath/wil6210/main.c | 14 ++++++++- drivers/net/wireless/ath/wil6210/netdev.c | 22 +++++++------ drivers/net/wireless/ath/wil6210/pcie_bus.c | 2 +- drivers/net/wireless/ath/wil6210/wil6210.h | 9 +++--- drivers/net/wireless/ath/wil6210/wmi.c | 8 +++++ 6 files changed, 71 insertions(+), 33 deletions(-) commit 4aebd3bdbd8a26ebcd2398289e2379472d17825f Author: Lior David Date: Mon Feb 26 20:12:14 2018 +0200 wil6210: add support for adding and removing virtual interfaces Add generic support in cfg80211 operations add_virtual_intf and del_virtual_intf for adding/removing VIFs of any interface type, and fix change_virtual_intf to allow changing the interface type of a VIF. Previously these operations only worked for the P2P_DEVICE interface which is not a real VIF(it is management-only and shares radio with the main interface). Currently the interface combination is validated, the VIF is added/removed in the firmware and the appropriate net/wireless device is also added/removed. Added minimal support for proper interface up/down and module unload but most operations still work only on the main interface. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 209 ++++++++++++++++++++++++---- drivers/net/wireless/ath/wil6210/main.c | 34 +++++ drivers/net/wireless/ath/wil6210/netdev.c | 163 +++++++++++++++++++--- drivers/net/wireless/ath/wil6210/pcie_bus.c | 39 +++++- drivers/net/wireless/ath/wil6210/wil6210.h | 21 ++- drivers/net/wireless/ath/wil6210/wmi.c | 111 ++++++++++++++- 6 files changed, 518 insertions(+), 59 deletions(-) commit e00243fab84b4efd5a250d1c47a4ddcca4c666ce Author: Lior David Date: Mon Feb 26 20:12:13 2018 +0200 wil6210: infrastructure for multiple virtual interfaces Simple infrastructure changes for supporting multiple virtual interfaces (multiple VIFs). It is still not possible to add new VIFs so the only VIF belongs to the main interface. Main changes: 1. Add MAC ID(mid) argument to wmi_send and wmi_call to allow invoking WMI commands on different VIFs. 2. Similarly, in WMI event handler look at the mid reported by FW and extract VIF structure (currently only for main interface). All WMI event handlers operate on wil6210_vif structure so they know on which VIF they were called. 3. Trivial changes to use wil6210_vif structure and MID throughout the code. 4. Various changes to logging to report MID. More complete multiple VIFs support will be added gradually in next patches. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 341 +++++++++++++++----------- drivers/net/wireless/ath/wil6210/debug.c | 9 +- drivers/net/wireless/ath/wil6210/debugfs.c | 62 +++-- drivers/net/wireless/ath/wil6210/ethtool.c | 4 +- drivers/net/wireless/ath/wil6210/interrupt.c | 6 +- drivers/net/wireless/ath/wil6210/main.c | 207 +++++++--------- drivers/net/wireless/ath/wil6210/netdev.c | 102 +++++++- drivers/net/wireless/ath/wil6210/p2p.c | 145 +++++------ drivers/net/wireless/ath/wil6210/pcie_bus.c | 4 +- drivers/net/wireless/ath/wil6210/pm.c | 9 +- drivers/net/wireless/ath/wil6210/pmc.c | 8 +- drivers/net/wireless/ath/wil6210/rx_reorder.c | 13 +- drivers/net/wireless/ath/wil6210/txrx.c | 106 ++++---- drivers/net/wireless/ath/wil6210/wil6210.h | 150 ++++++----- drivers/net/wireless/ath/wil6210/wmi.c | 326 ++++++++++++++---------- 15 files changed, 877 insertions(+), 615 deletions(-) commit 7bfe9e22e487b0cb14bc3bd03e6e987d9789756b Author: Lior David Date: Mon Feb 26 20:12:12 2018 +0200 wil6210: support concurrency record in FW file New FW which supports multiple virtual interfaces, reports its allowed interface combinations using a special comment record in the FW file. The format of the interface combinations is similar to the kernel wiphy->iface_combinations. When parsing FW file during module initialization, also parse and validate the concurrency record, and initialize wiphy->n_iface_combinations and wiphy->iface_combinations accordingly. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 69 +++++++++++++++++++++++++++++ drivers/net/wireless/ath/wil6210/fw.h | 38 +++++++++++++++- drivers/net/wireless/ath/wil6210/fw_inc.c | 52 ++++++++++++++++++++-- drivers/net/wireless/ath/wil6210/wil6210.h | 4 ++ 4 files changed, 158 insertions(+), 5 deletions(-) commit 41d63e45eccb832851bb88d3635fed2b7b13328a Author: Miquel Raynal Date: Mon Feb 19 23:20:45 2018 +0100 arm64: dts: marvell: use reworked NAND controller driver on Armada 8K Use the new bindings of the reworked Marvell NAND controller driver. Also adapt the nand controller node organization to distinguish which property is relevant for the controller, and which one is NAND chip specific. Expose the partitions as a subnode of the NAND chip. Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as the driver activates the arbiter by default for all boards (either needed or harmless). Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8040-db.dts | 46 +++++++++++++++----------- 1 file changed, 27 insertions(+), 19 deletions(-) commit 9f38f28624555af82a2909c9716688367d7297b1 Author: Lior David Date: Mon Feb 26 20:12:11 2018 +0200 wil6210: add wil6210_vif structure for per-VIF data For supporting multiple virtual interfaces in the future, introduce a wil6210_vif structure which will hold per-VIF data. Change the module initialization so wil6210_vif will be part of net_device structure, and wireless_dev will be embedded inside the wil6210_vif structure. This will allow us to find the appropriate wil6210_vif structure when we only have access to wireless_dev or net_device. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 57 ++++++++++-------- drivers/net/wireless/ath/wil6210/netdev.c | 93 ++++++++++++++++++----------- drivers/net/wireless/ath/wil6210/wil6210.h | 22 +++++-- 3 files changed, 107 insertions(+), 65 deletions(-) commit 1e09a73f321ca67d0d8cfdc5cd156367bc6e0604 Author: Miquel Raynal Date: Mon Feb 19 23:20:44 2018 +0100 arm64: dts: marvell: use reworked NAND controller driver on Armada 7K Use the new bindings of the reworked Marvell NAND controller driver. Also adapt the nand controller node organization to distinguish which property is relevant for the controller, and which one is NAND chip specific. Expose the partitions as a subnode of the NAND chip. Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as the driver activates the arbiter by default for all boards (either needed or harmless). Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-7040-db.dts | 52 ++++++++++++++++---------- arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 8 ++-- 2 files changed, 36 insertions(+), 24 deletions(-) commit 9bfd05e35ac3519c26ffa0bfb1ab8933c8f00c74 Author: Loic Poulain Date: Thu Feb 15 12:08:28 2018 +0100 wcn36xx: Fix warning due to duplicate scan_completed notification The wcn36xx_cancel_hw_scan method stops the hw scan and notify the scan completion via ieee80211_scan_completed. However, on scan offload cancellation, firmware sends a scan complete indication, triggering a new call to ieee80211_scan_completed. This leads to kernel warn since the scan has already been completed. Signed-off-by: Loic Poulain Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/main.c | 9 +++------ drivers/net/wireless/ath/wcn36xx/smd.c | 2 ++ 2 files changed, 5 insertions(+), 6 deletions(-) commit c137ba9b41c739ae7992921182ba94b0b7d52e82 Author: Gregory CLEMENT Date: Thu Feb 15 14:44:23 2018 +0100 ARM64: dts: marvell: armada-cp110: Add registers clock for sata node This extra clock is needed to access the registers of the AHCI SATA controller used on the Armada 7K/8K SoCs. The ahci drivers was already designed to support up to 5 clocks so there is only need to update the device tree to use it. It was not noticed until now because of wrong assumption in the clock drivers, but as this IP really needs 2 clocks, we had to declare both of them. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6c6aa15fdea52aa4a19cc0b5478884af591c9351 Author: Heiner Kallweit Date: Sat Feb 24 16:53:23 2018 +0100 r8169: improve interrupt handling This patch improves few aspects of interrupt handling: - update to current interrupt allocation API (use pci_alloc_irq_vectors() instead of deprecated pci_enable_msi()) - this implicitly will allocate a MSI-X interrupt if available - get rid of flag RTL_FEATURE_MSI - remove some dead code, intentionally disabling (unreliable) MSI being partially available on old PCI chips. The patch works fine on a RTL8168evl (chip version 34) and on a RTL8169SB (chip version 04). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 48 ++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 27 deletions(-) commit 52c528ffaf1d4697e35c433a6a2ff81c469c967a Author: Wojciech Dubowik Date: Tue Feb 20 15:42:00 2018 +0100 ath9k: Fix ack SIFS time for quarter/half channels Ack timing generation has to be adapted for 5/10 MHz channels. Do it by properly initializing ack shift field in TXSIFS register. Ack shift assumes channel width of 2.5 Mhz so value zero means 2.5 MHz, 1 is 5 MHz and so on. Signed-off-by: Wojciech Dubowik Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/hw.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 91f1ee65d999a36241cb43bc820b1b59050bc79e Author: Wojciech Dubowik Date: Tue Feb 20 15:41:43 2018 +0100 ath9k: Fix airtime calculation for quarter/half channels The bitrate value for airtime calculation is specified for full rates. We need to divide it for 5 and 10MHz channels to get correct result. Signed-off-by: Wojciech Dubowik Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/hw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2571c081cb43c156f63b735dfb952119775324f4 Author: Colin Ian King Date: Thu Feb 1 18:03:27 2018 +0000 ath5k: remove duplicated re-assignment to pointer 'tq' Pointer tq is initialized with &ah->ah_txq[queue] and then a few lines later is re-assigned the same value, hence this duplicate assignment is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/ath/ath5k/qcu.c:326:25: warning: Value stored to 'tq' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath5k/qcu.c | 2 -- 1 file changed, 2 deletions(-) commit fc8b92635f79cfc4dd3015384bebafada0b08f19 Author: Ryan Hsu Date: Thu Feb 8 16:20:31 2018 -0800 ath10k: update the IRAM bank number for QCA9377 Preparation for a new QCA9377 firmware release. The new firmware release requires more IRAM banks, hence update that on ath10k. The IRAM banks promotion won't break any backwards compatibility, as those IRAM banks were not getting used in previous firmware releases. Signed-off-by: Ryan Hsu Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a52b839752aab7063c38c1cb7b8e63efc54e3c30 Author: David Ahern Date: Mon Feb 26 09:53:15 2018 -0800 selftests: Add fib-onlink-tests.sh to TEST_PROGS Fixes: 153e1b84f477 ("selftests: Add FIB onlink tests") Reported-by: Ido Schimmel Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf0d37aecc06801d4847fb36740da4a5690d9d45 Author: Govind Singh Date: Mon Feb 5 09:41:34 2018 +0530 ath10k: fix log message for hif power on failure HIF power-on failure is applicable to each underlying bus type. Fix log message for hif power on failure. Signed-off-by: Govind Singh Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b17db8c0a1c4fc4f488745ff3e14ff1928715852 Merge: afdd6ae c893238 Author: David S. Miller Date: Tue Feb 27 11:40:04 2018 -0500 Merge branch 'DPAA-Ethernet-fixes' Madalin Bucur says: ==================== DPAA Ethernet fixes Fixed an issue on the Tx path that was visible in netperf TCP_SENDFILE tests. Addressed another issue with Rx errors not being always counted. Adding control for allmulti. v2: rephrased commit message, reduced changes in the SG mapping fix ==================== Signed-off-by: David S. Miller commit c893238e5d9b279be4c73d7fdf0dc8986a6c118f Author: Radu Bulie Date: Mon Feb 26 11:24:04 2018 -0600 dpaa_eth: Add allmulti option This patch adds allmulticast option for memac, dtsec and 10GEC controllers. Signed-off-by: Radu Bulie Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 10 +++++++ drivers/net/ethernet/freescale/fman/fman_dtsec.c | 19 ++++++++++++++ drivers/net/ethernet/freescale/fman/fman_dtsec.h | 1 + drivers/net/ethernet/freescale/fman/fman_memac.c | 32 +++++++++++++++++++++-- drivers/net/ethernet/freescale/fman/fman_memac.h | 1 + drivers/net/ethernet/freescale/fman/fman_tgec.c | 33 +++++++++++++++++++++--- drivers/net/ethernet/freescale/fman/fman_tgec.h | 1 + drivers/net/ethernet/freescale/fman/mac.c | 3 +++ drivers/net/ethernet/freescale/fman/mac.h | 2 ++ 9 files changed, 97 insertions(+), 5 deletions(-) commit 056a01ba9453258a56993e8645b7b922e55be81c Author: Madalin Bucur Date: Mon Feb 26 11:24:03 2018 -0600 dpaa_eth: refactor frag count checking Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 81084b354782b56267b94415420b47e5aedd01cb Author: Madalin Bucur Date: Mon Feb 26 11:24:02 2018 -0600 dpaa_eth: make sure all Rx errors are counted Simplify the code and avoid some Rx errors not being accounted. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 120d75ecf043044554abbba8507f6d22e4715beb Author: Madalin Bucur Date: Mon Feb 26 11:24:01 2018 -0600 dpaa_eth: fix SG mapping An issue in the code mapping the skb fragments into scatter-gather frames was evidentiated by netperf TCP_SENDFILE tests. The size was set wrong for all fragments but the first, affecting the transmission of any skb with more than one fragment. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit e28adf9ae63c257c630057ad93491b6eb2ad7211 Author: Ping-Ke Shih Date: Tue Feb 27 09:57:24 2018 +0800 rtlwifi: btcoex: fix argument typo of if-statement found by Coccinelle This was detected with static analysis using Coccinelle: ./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c:1107:5-18: duplicated argument to && or || Reported-by: Colin Ian King Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47c8a3956a60b2f47389420b1814ad07e4306cea Author: Colin Ian King Date: Fri Feb 23 13:36:22 2018 +0000 brcmsmac: remove duplicated bit-wise or of IEEE80211_CHAN_NO_IR Bit pattern IEEE80211_CHAN_NO_IR is being bit-wise or'd twice; remove the redundant 2nd IEEE80211_CHAN_NO_IR Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c | 1 - 1 file changed, 1 deletion(-) commit 64d1519edc959f5b8f86a66a51c40971c215e4ec Author: Johannes Berg Date: Mon Feb 19 13:30:45 2018 +0100 brcmfmac: reject too long PSK nl80211 already allows specifying 48 bytes, but brcmfmac only supports 32. Reject keys that are too long. Signed-off-by: Johannes Berg Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +++ 1 file changed, 3 insertions(+) commit 2d6edad4b2da1991f74e7b02053eeb4a043b887f Author: Arend Van Spriel Date: Tue Feb 20 00:14:25 2018 +0100 brcmfmac: remove duplicate pointer variable from brcmf_sdio_firmware_callback() In brcmf_sdio_firmware_callback() two pointer variables were used pointing to the same construct. Get rid of sdiodev variable. Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 37 +++++++++++----------- 1 file changed, 18 insertions(+), 19 deletions(-) commit d678296bfb9a630d0000222fc21f4ed0d0d65332 Author: Arend Van Spriel Date: Tue Feb 20 00:14:24 2018 +0100 brcmfmac: change log level for some low-level sdio functions Reducing the number of trace level messages in sdio code giving them sdio log level instead. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit de2a3027f6f15e2f6558dc4d178282ccc1f054db Author: Arend Van Spriel Date: Tue Feb 20 00:14:23 2018 +0100 brcmfmac: remove brcmf_bus_started() from bus api No longer needed to call this in bus layer so make it static and call it in the last phase of brcmf_attach() instead. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 1 - .../wireless/broadcom/brcm80211/brcmfmac/core.c | 14 +++++++---- .../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 20 +--------------- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 10 ++------ .../net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 28 ++++------------------ 5 files changed, 16 insertions(+), 57 deletions(-) commit 0542503c4c164c65cd1567b0f2b3f887af6c81eb Author: Arend Van Spriel Date: Tue Feb 20 00:14:22 2018 +0100 brcmfmac: move brcmf_attach() function in core.c Moving the function in preparation of subsequent patch. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/core.c | 98 +++++++++++----------- 1 file changed, 49 insertions(+), 49 deletions(-) commit a7f4a80c0070b673d4a4ce94b99979ea6d0c6296 Author: Arend Van Spriel Date: Tue Feb 20 00:14:21 2018 +0100 brcmfmac: usb: call brcmf_usb_up() during brcmf_bus_preinit() By calling brcmf_usb_up() during brcmf_bus_preinit() it does not need to be called in brcmf_usb_bus_setup(). Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 262f2b53f67936b59cc8dfc6f3899ab8905bf1ed Author: Arend Van Spriel Date: Tue Feb 20 00:14:20 2018 +0100 brcmfmac: call brcmf_attach() just before calling brcmf_bus_started() Now we can move brcmf_attach() until after the firmware has been downloaded to the device. Make the call just before brcmf_bus_started(). Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/core.c | 6 ++++ .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 34 +++++++++++----------- 2 files changed, 23 insertions(+), 17 deletions(-) commit 4b5adc736828dc25ca33e263ad8c0b9dcd3bf325 Author: Arend Van Spriel Date: Tue Feb 20 00:14:19 2018 +0100 brcmfmac: move allocation of control rx buffer to brcmf_sdio_bus_preinit() Allocate the control rx buffer needed for firmware control interface during brcmf_sdio_bus_preinit(). This relies on common layer setting struct brcmf_bus::maxctl during brcmf_attach(). By moving the allocation we can move brcmf_attach() in subsequent change. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 26 ++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) commit da472385a29f1fddcac7cfa0499482704310bd16 Author: Arend Van Spriel Date: Tue Feb 20 00:14:18 2018 +0100 brcmfmac: move brcmf_bus_preinit() call just after changing bus state Moving the brcmf_bus_preinit() call allows the bus code to do some required initialization before handling firmware control messages. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 3 --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) commit 864164683678e27c931b5909c72a001b1b943f36 Author: Xinming Hu Date: Tue Feb 13 14:10:15 2018 +0800 mwifiex: set different mac address for interfaces with same bss type Multiple interfaces with same bss type could affect each other if they are sharing the same mac address. In this patch, different mac address is assigned to new interface which have same bss type with exist interfaces. Signed-off-by: Xinming Hu Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 24 +++++++++++++++++++----- drivers/net/wireless/marvell/mwifiex/main.h | 13 +++++++++++++ 2 files changed, 32 insertions(+), 5 deletions(-) commit c3b2f7ca4186cad3584915eba10d2085c3eed029 Author: Sergey Matyukevich Date: Sat Feb 10 17:04:19 2018 +0300 qtnfmac: implement asynchronous firmware loading In pci probe() function start firmware loading, protocol handshake and driver core initialization, and not wait for completion. Signed-off-by: Sergei Maksimenko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/bus.h | 3 +- .../net/wireless/quantenna/qtnfmac/pearl/pcie.c | 375 ++++++++++----------- 2 files changed, 180 insertions(+), 198 deletions(-) commit a34d7bcb73f553f1ea65eeff744c66e77b167175 Author: Sergei Maksimenko Date: Sat Feb 10 17:04:18 2018 +0300 qtnfmac: enable reloading of qtnfmac kernel modules This patch enables rmmod/insmod for qtnfmac kernel modules: - do not 'pin' pci device in order to disable it on module unload - implement card reset procedure - restore PCI bar addresses for restarted wireless card Signed-off-by: Sergei Maksimenko Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c | 15 ++++++++++++++- drivers/net/wireless/quantenna/qtnfmac/pearl/pcie_ipc.h | 1 + .../wireless/quantenna/qtnfmac/pearl/pcie_regs_pearl.h | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) commit 1d5e3b90ab0160375d15dd8f322c1bfdb8a83e1e Author: Sergey Matyukevich Date: Sat Feb 10 17:04:17 2018 +0300 qtnfmac: fix releasing Tx/Rx data buffers Add missing PCI unmap for Tx buffers and release all buffers explicitly. Managed release using devm_add_action is not suitable for qtnfmac Tx/Rx data buffers. The reason is in ordering and dependencies: buffers should be released after transmission is stopped but before PCI device resources and DMA allocations are released. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo .../net/wireless/quantenna/qtnfmac/pearl/pcie.c | 30 +++++++++++++--------- 1 file changed, 18 insertions(+), 12 deletions(-) commit dcdd54c2bcae086a5834d3f823914d7535843b17 Author: Arnd Bergmann Date: Fri Feb 9 14:24:41 2018 +0100 rtlwifi: rtl8192cu: remove pointless memcpy gcc-8 points out that source and destination of the memcpy() are always the same pointer, so the effect of memcpy() is undefined here (its arguments must not overlap): drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c: In function '_rtl_rx_process': drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c:430:2: error: 'memcpy' source argument is the same as destination [-Werror=restrict] Most likely this is harmless, but it's easy to just remove the line and get rid of the warning. Signed-off-by: Arnd Bergmann Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c | 1 - 1 file changed, 1 deletion(-) commit fb239c1209bb0f0b4830cc72507cc2f2d63fadbd Author: Matthias Kaehlcke Date: Thu Feb 8 16:57:12 2018 -0800 rtlwifi: rtl8192cu: Remove variable self-assignment in rf.c In _rtl92c_get_txpower_writeval_by_regulatory() the variable writeVal is assigned to itself in an if ... else statement, apparently only to document that the branch condition is handled and that a previously read value should be returned unmodified. The self-assignment causes clang to raise the following warning: drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c:304:13: error: explicitly assigning value of variable of type 'u32' (aka 'unsigned int') to itself [-Werror,-Wself-assign] writeVal = writeVal; Delete the branch with the self-assignment. Signed-off-by: Matthias Kaehlcke Acked-by: Larry Finger Reviewed-by: Guenter Roeck Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c | 3 --- 1 file changed, 3 deletions(-) commit a20136a67a995cd5b74e8c0fcb3b2f2e5b2848dd Author: Laszlo Toth Date: Sat Feb 24 10:20:15 2018 +0100 ACPI: battery: do not export degraded capacity values over 100 With a degraded battery, full_charge_capacity can be less than design_capacity, however it's not sure that capacity_now's max will follow. Example from an affected machine: /sys/class/power_supply/BAT0/charge_full -> 4290000 /sys/class/power_supply/BAT0/charge_full_design -> 5900000 /sys/class/power_supply/BAT0/charge_now -> 5900000 /sys/class/power_supply/BAT0/capacity -> 137 The battery is a degraded one with a full charge, and charge_now is the value of charge_full_design instead of charge_full. Added a new quirk to test and correct this, and a new function to check if the battery is a degraded one or not. This keeps the possibility to be over 100 if it's really the case. Signed-off-by: Laszlo Toth Signed-off-by: Rafael J. Wysocki drivers/acpi/battery.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 76d1f95983a0903eaff857ba1e4ec0ac9febf225 Author: Colin Ian King Date: Tue Jan 30 18:25:37 2018 +0000 wireless: zd1211rw: remove redundant assignment of pointer 'q' Pointer q is initialized and then almost immediately afterwards being re-assigned the same value. Remove the second redundant assignment. Cleans up clang warning: drivers/net/wireless/zydas/zd1211rw/zd_mac.c:503:23: warning: Value stored to 'q' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 1 - 1 file changed, 1 deletion(-) commit 92d1b381f677cbd2d4370dc3b8d0679b7f0ace32 Author: Alex Hung Date: Thu Feb 22 21:43:44 2018 -0800 ACPI / PCI: pci_link: Allow the absence of _PRS and change log level In recent Intel hardware the IRQs become non-configurable after BIOS initializes them in PEI phase and _PRS objects are no longer included in ASL. This is the same as "static (non-configurable) devices do not specify a _PRS object" in ACPI spec. As a result, error messages saying "ACPI Exception: AE_NOT_FOUND, Evaluating _PRS" does not need to be in kernel messenges all the time but only when debug is enabled, and acpi_pci_link_get_possible should not return -ENODEV when _PRS is absent. Signed-off-by: Alex Hung Acked-by: Bjorn Helgaas Signed-off-by: Rafael J. Wysocki drivers/acpi/pci_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 94907e8d135b61011d157097c92c9f28983d96ea Author: Ping-Ke Shih Date: Mon Jan 29 11:26:41 2018 +0800 rtlwifi: btcoex: Add 8822be btcoex supported files for wifi only The wifi only btcoex is used to solo card (without BT), and it is also useful to exclude the interference with BT to make debug easier. There are only four ops for wifi only btcoex to initialze antenna and switch the settings while band is changed. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo .../rtlwifi/btcoexist/halbtc8822bwifionly.c | 55 ++++++++++++++++++++++ .../rtlwifi/btcoexist/halbtc8822bwifionly.h | 25 ++++++++++ 2 files changed, 80 insertions(+) commit d7297a86fc86d1e373c2f26e3c1cfcf7b6129217 Author: Ping-Ke Shih Date: Mon Jan 29 11:26:40 2018 +0800 rtlwifi: btcoex: add routine to set default port id Tell wifi and BT firmware the default port ID to set multiports' state properly, but only 8822be needs this function currently. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 22 ++++++++++++++++++++++ .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 2 ++ drivers/net/wireless/realtek/rtlwifi/wifi.h | 5 +++++ 3 files changed, 29 insertions(+) commit 2cdd634e7e364af7104901d9f81065cddfcb96de Author: Ping-Ke Shih Date: Mon Jan 29 11:26:39 2018 +0800 rtlwifi: add efuse ops for other components The new component phydm need to access efuse content, so we prepare ops for reference. Signed-off-by: Tsang-Shian Lin Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/efuse.c | 13 +++++++++++++ drivers/net/wireless/realtek/rtlwifi/efuse.h | 2 +- drivers/net/wireless/realtek/rtlwifi/pci.c | 1 + drivers/net/wireless/realtek/rtlwifi/wifi.h | 7 +++++++ 4 files changed, 22 insertions(+), 1 deletion(-) commit ed979a1ed46ba98307ce624f114056b138fbe600 Author: Ping-Ke Shih Date: Mon Jan 29 11:26:38 2018 +0800 rtlwifi: add definition radio_mask for RF and maximum bandwidth Add rf mask definition (BIT 0, BIT 1, BIT 2, ...) that is different from rf path definition (0, 1, 2, ...), and then combinations of rf path are possible. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/wifi.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 50da5da1562b0bb54c537b0d218dcbbdd9843775 Author: Ping-Ke Shih Date: Mon Jan 29 11:26:37 2018 +0800 rtlwifi: Fix VHT NSS in RC NSS is a argument of highest rate in RC, and it occupies bit 4-7 so use ieee80211_rate_set_vht() to fill the values. Since it got correct rate index, we don't need to check chips to assign NSS in set function anymore. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rc.c | 55 ++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 9 deletions(-) commit 81b813ed2fde96fd28cee477281b724ea4a28dcc Author: Ping-Ke Shih Date: Mon Jan 29 11:26:36 2018 +0800 rtlwifi: Add rate section and its related definition and comment Add comments to make it to be easier to understand, and add compile time assertions. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 3 +++ drivers/net/wireless/realtek/rtlwifi/wifi.h | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) commit 4a7093b914aaee8d6fd7da75789a075745bc2d29 Author: Ping-Ke Shih Date: Mon Jan 29 11:26:35 2018 +0800 rtlwifi: Extend tx_power_by_rate_offset size for newer IC In older design, the TX power is grouped into rate section (smaller array size), but new design groups them into rate (larger array size). Thus, we extend the size for both cases, and add compile time assertion. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 2 ++ drivers/net/wireless/realtek/rtlwifi/wifi.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 5f380ceff5f5c84039cd399120c5cb11f39376a8 Author: Ping-Ke Shih Date: Mon Jan 29 11:26:34 2018 +0800 rtlwifi: Use 6 bits as sequence number of TX report In new design, SW_DEFINE[1:0] of tx desc are used by firmware, and the TX report only contains SW_DEFINE[7:0]. To satisfy with all cases, driver uses SW_DEFINE[7:2] as sequence number. Besides, the format of tx report have been changed, so a new flag RTL_SPEC_EXT_C2H is used to access report. Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 22 ++++++++++++++++++---- drivers/net/wireless/realtek/rtlwifi/wifi.h | 8 ++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) commit 1ca72c3047aa1146fe22b1e79be713ac90572827 Author: Ping-Ke Shih Date: Mon Jan 29 11:26:33 2018 +0800 rtlwifi: Add Support VHT to spec_ver We are going to add 8822be, which is a VHT 2x2 wifi chip, so add VHT flag to replace enumeration of chips. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 6 ++++-- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 1 + drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) commit 6942bdc4bf577e6fedff03111d10763a07622734 Author: Ping-Ke Shih Date: Mon Jan 29 11:26:32 2018 +0800 rtlwifi: enable mac80211 fast-tx support Enable the mac80211 fast-tx feature, since our driver already support hw_flags required by fast-tx and is able to let mac80211 stack to transmit packet through fast-xmit path. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 1 + 1 file changed, 1 insertion(+) commit afdd6ae352527b83a3e13c040b22f455fe6537db Merge: 23363b8 8c6ad9c Author: David S. Miller Date: Tue Feb 27 11:14:57 2018 -0500 Merge branch 'ieee802154-for-davem-2018-02-26' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next Stefan Schmidt says: ==================== pull-request: ieee802154-next 2018-02-26 An update from ieee802154 for *net-next* Alexander corrected a setting which got lost during some 6lowpan rework a while back and Xue Liu provided us with a new driver for the MCR20A transceiver. If there are any issues let me know. If not, please pull. ==================== Signed-off-by: David S. Miller commit bd42cd022e44c68254cedf5e04cbcc781dcceed8 Author: Gustavo A. R. Silva Date: Thu Jan 18 17:54:28 2018 -0600 ssb: return boolean instead of integer in ssb_dma_translation_special_bit Return statements in functions returning bool should use true/false instead of 1/0. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo drivers/ssb/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 514bcc5dfa69d64f7772cb6442721b9d1b83504d Author: Colin Ian King Date: Fri Feb 23 16:32:55 2018 +0000 ACPI: battery: make function __battery_hook_unregister() static The function __battery_hook_unregister is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: drivers/acpi/battery.c:654:6: warning: symbol '__battery_hook_unregister' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/acpi/battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23363b87a80a2eeb366c9b5b93248b7d73125ba8 Merge: 7f897db 3edbccf Author: David S. Miller Date: Tue Feb 27 11:01:40 2018 -0500 Merge branch 'pernet_operations-convert-part-3' Kirill Tkhai says: ==================== Converting pernet_operations (part #3) This patchset continues to review and to convert pernet_operations to async. Where it is possible, they are grouped by type of actions init/exit methods ([1/28], for example). I hope this will make the review a little bit easier. The changes are tree-wide: in net, fs, drivers and security. ==================== Signed-off-by: David S. Miller commit 3edbccf96d2de30e7b986ceae090becfc07d3573 Author: Kirill Tkhai Date: Mon Feb 26 16:04:02 2018 +0300 net: Convert smack_net_ops These pernet_operations only register and unregister nf hooks. So, they are able to be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller security/smack/smack_netfilter.c | 1 + 1 file changed, 1 insertion(+) commit 79a4fb084326638b5e71e58e2207abffdf3ec031 Author: Kirill Tkhai Date: Mon Feb 26 16:03:55 2018 +0300 net: Convert selinux_net_ops These pernet_operations only register and unregister nf hooks. So, they are able to be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller security/selinux/hooks.c | 1 + 1 file changed, 1 insertion(+) commit 9532ce17f7d59d1129165949076491c06f89d1b0 Author: Kirill Tkhai Date: Mon Feb 26 16:03:45 2018 +0300 net: Convert defrag6_net_ops These pernet_operations only unregister nf hooks. So, they are able to be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | 1 + 1 file changed, 1 insertion(+) commit afd7b3eb13463693250e82d19f8605312bb5c04d Author: Kirill Tkhai Date: Mon Feb 26 16:03:36 2018 +0300 net: Convert ila_net_ops These pernet_operations register and unregister nf hooks. Also they populate and depopulate ila_net_id-pointed hash table. The table is changed by hooks during skb processing and via netlink request. It looks impossible for another net pernet_operations to force the table reading or writing, so, they are able to be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv6/ila/ila_xlat.c | 1 + 1 file changed, 1 insertion(+) commit e5b2ae93b523304461b2e4ddb59be47f4d4ed1b0 Author: Kirill Tkhai Date: Mon Feb 26 16:03:15 2018 +0300 net: Convert defrag4_net_ops These pernet_operations only unregister nf hooks. So, they are able to be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv4/netfilter/nf_defrag_ipv4.c | 1 + 1 file changed, 1 insertion(+) commit f95978b7ad0972610b14c65f13f69b3093ff9101 Author: Kirill Tkhai Date: Mon Feb 26 16:03:05 2018 +0300 net: Convert clusterip_net_ops These pernet_operations register and unregister nf hooks, and populate and destroy /proc entry. So, they are able to be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv4/netfilter/ipt_CLUSTERIP.c | 1 + 1 file changed, 1 insertion(+) commit 7ca9e67febb1441baa0481fbd46745288338afe6 Author: Kirill Tkhai Date: Mon Feb 26 16:02:56 2018 +0300 net: Convert brnf_net_ops These pernet_operations only unregister nf hooks. So, they are able to be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/bridge/br_netfilter_hooks.c | 1 + 1 file changed, 1 insertion(+) commit 68eabe8b660c4210f8a6dc1dbc1ae1cac5543a68 Author: Kirill Tkhai Date: Mon Feb 26 16:02:48 2018 +0300 net: Convert ipvlan_net_ops These pernet_operations unregister ipvlan net hooks. nf_unregister_net_hooks() removes hooks one-by-one, and then frees the memory via rcu. This looks similar to that happens, when a new hooks is added: allocation of bigger memory region, copy of old content, and rcu freeing the old memory. So, all of net code should be well with this behavior. Also at the time of hook unregistering, there are no packets, and foreign net pernet_operations are not interested in others hooks. So, we mark them as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 1 + 1 file changed, 1 insertion(+) commit f17c9bf07f9cde430e5c566a5383875ffba104cf Author: Kirill Tkhai Date: Mon Feb 26 16:02:37 2018 +0300 net: Convert cfg802154_pernet_ops These pernet_operations have only exit method, which moves devices from cfg802154_rdev_list to init_net. This may occur in any time from nl802154_wpan_phy_netns(), so we are nice with rtnl_lock() synchronization. Signed-off-by: Kirill Tkhai Acked-by: Stefan Schmidt Signed-off-by: David S. Miller net/ieee802154/core.c | 1 + 1 file changed, 1 insertion(+) commit 989d9812b7cabbda2e82f47e52dbc48ed4e40ce5 Author: Kirill Tkhai Date: Mon Feb 26 16:02:27 2018 +0300 net: Convert sit_net_ops These pernet_operations are similar to ip6_tnl_net_ops. Exit method unregisters all net sit devices, and it looks like another pernet_operations are not interested in foreign net sit list. Init method registers netdevice. So, it's possible to mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv6/sit.c | 1 + 1 file changed, 1 insertion(+) commit 5ecc29550add41a0f077b07840501d7a3abfc9db Author: Kirill Tkhai Date: Mon Feb 26 16:02:19 2018 +0300 net: Convert vti6_net_ops These pernet_operations are similar to ip6_tnl_net_ops. Exit method unregisters all net vti6 tunnels, and it looks like another pernet_operations are not interested in foreign net vti6 list. Init method registers netdevice. So, it's possible to mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv6/ip6_vti.c | 1 + 1 file changed, 1 insertion(+) commit 66997ba0834ac1b3f22873d349614405e48c69d7 Author: Kirill Tkhai Date: Mon Feb 26 16:02:11 2018 +0300 net: Convert ip6_tnl_net_ops These pernet_operations are similar to ip6gre_net_ops. Exit method unregisters all net ip6_tnl tunnels, and it looks like another pernet_operations are not interested in foreign net tunnels list. So, it's possible to mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 1 + 1 file changed, 1 insertion(+) commit 5c155c50244a0c6e1a7778ae7b4d2753e5e1f617 Author: Kirill Tkhai Date: Mon Feb 26 16:02:03 2018 +0300 net: Convert ip6gre_net_ops These pernet_operations are similar to bond_net_ops. Exit method unregisters all net ip6gre devices, and it looks like another pernet_operations are not interested in foreign net ip6gre list or net_generic()->tunnels_wc. Init method registers net device. So, it's possible to mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 1 + 1 file changed, 1 insertion(+) commit 31502104b301c0dcacd5df8e92fba9dcf20dfccb Author: Kirill Tkhai Date: Mon Feb 26 16:01:52 2018 +0300 net: Convert ipgre_net_ops, ipgre_tap_net_ops, erspan_net_ops, vti_net_ops and ipip_net_ops These pernet_operations are similar to bond_net_ops. Exit methods unregisters all net ipgre/ipgre_tap/erspan/vti/ipip devices, and it looks like another pernet_operations are not interested in foreign net ipgre/ipgre_tap/erspan/vti/ipip list. Init method also does not intersect with something pernet-specific. So, it's possible to mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 3 +++ net/ipv4/ip_vti.c | 1 + net/ipv4/ipip.c | 1 + 3 files changed, 5 insertions(+) commit 3cec5fb3476e07833fea9a1e2d5f6c629078b4ae Author: Kirill Tkhai Date: Mon Feb 26 16:01:43 2018 +0300 net: Convert br_net_ops These pernet_operations are similar to bond_net_ops. Exit method unregisters all net bridge devices, and it looks like another pernet_operations are not interested in foreign net bridge list. So, it's possible to mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/bridge/br.c | 1 + 1 file changed, 1 insertion(+) commit ef74c07cf17958d90bfda34a42b54a132fbee57e Author: Kirill Tkhai Date: Mon Feb 26 16:01:34 2018 +0300 net: Convert vxlan_net_ops These pernet_operations are similar to bond_net_ops. Exit method unregisters all net vlanx devices, and it looks like another pernet_operations are not interested in foreign net vlanx list. So, it's possible to mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller drivers/net/vxlan.c | 1 + 1 file changed, 1 insertion(+) commit cd59b28ce9491243a14947376332689de6ec568a Author: Kirill Tkhai Date: Mon Feb 26 16:01:25 2018 +0300 net: Convert ppp_net_ops These pernet_operations are similar to bond_net_ops. Exit method unregisters all net ppp devices, and it looks like another pernet_operations are not interested in foreign net ppp list. So, it's possible to mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 1 + 1 file changed, 1 insertion(+) commit 9e7674519151646b1f36b2bf9d5fbdccba6711d2 Author: Kirill Tkhai Date: Mon Feb 26 16:01:16 2018 +0300 net: Convert gtp_net_ops These pernet_operations are similar to bond_net_ops. Exit method unregisters all net gtp devices, and it looks like another pernet_operations are not interested in foreign net gtp list. So, it's possible to mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller drivers/net/gtp.c | 1 + 1 file changed, 1 insertion(+) commit f60f33460a8cc690398f3e978851271c20364aa3 Author: Kirill Tkhai Date: Mon Feb 26 16:00:48 2018 +0300 net: Convert geneve_net_ops These pernet_operations are similar to bond_net_ops. Exit method unregisters all net geneve devices, and it looks like another pernet_operations are not interested in foreign net geneve list. So, it's possible to mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller drivers/net/geneve.c | 1 + 1 file changed, 1 insertion(+) commit 6963ad69cee28d3b2011ee9ff7d4f0abe20e52b9 Author: Kirill Tkhai Date: Mon Feb 26 16:00:40 2018 +0300 net: Convert bond_net_ops These pernet_operations populate/depopulate /proc and /sys entries. Exit method unregisters all net bond devices, and it seems another pernet_operations are not interested in foreign net bond list. So, it's possible to mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 1 + 1 file changed, 1 insertion(+) commit 685ecfb19888963f61c6085c17c254dbf665e9da Author: Kirill Tkhai Date: Mon Feb 26 16:00:31 2018 +0300 net: Convert tc_action_net_init() and tc_action_net_exit() based pernet_operations These pernet_operations are from net/sched directory, and they call only tc_action_net_init() and tc_action_net_exit(): bpf_net_ops connmark_net_ops csum_net_ops gact_net_ops ife_net_ops ipt_net_ops xt_net_ops mirred_net_ops nat_net_ops pedit_net_ops police_net_ops sample_net_ops simp_net_ops skbedit_net_ops skbmod_net_ops tunnel_key_net_ops vlan_net_ops 1)tc_action_net_init() just allocates and initializes per-net memory. 2)There should not be in-flight packets at the time of tc_action_net_exit() call, or another pernet_operations send packets to dying net (except netlink). So, it seems they can be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/sched/act_bpf.c | 1 + net/sched/act_connmark.c | 1 + net/sched/act_csum.c | 1 + net/sched/act_gact.c | 1 + net/sched/act_ife.c | 1 + net/sched/act_ipt.c | 2 ++ net/sched/act_mirred.c | 1 + net/sched/act_nat.c | 1 + net/sched/act_pedit.c | 1 + net/sched/act_police.c | 1 + net/sched/act_sample.c | 1 + net/sched/act_simple.c | 1 + net/sched/act_skbedit.c | 1 + net/sched/act_skbmod.c | 1 + net/sched/act_tunnel_key.c | 1 + net/sched/act_vlan.c | 1 + 16 files changed, 17 insertions(+) commit 5fcc85843d94e40ac1633d18d9651f69d9f16770 Author: Kirill Tkhai Date: Mon Feb 26 16:00:22 2018 +0300 net: Convert sysctl creating and destroying pernet_operations These pernet_operations create and destroy sysctl tables, and they are able to be executed in parallel with any others: ip_vs_lblc_ops ip_vs_lblcr_ops Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/ipvs/ip_vs_lblc.c | 1 + net/netfilter/ipvs/ip_vs_lblcr.c | 1 + 2 files changed, 2 insertions(+) commit 25354866e03d416ad0e9395ce46d38912ddcae87 Author: Kirill Tkhai Date: Mon Feb 26 16:00:12 2018 +0300 net: Convert cma_pernet_operations These pernet_operations just create and destroy IDR. So, we mark them as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller drivers/infiniband/core/cma.c | 1 + 1 file changed, 1 insertion(+) commit 02df428ca291f20285f04c25a7efd664a5d83551 Author: Kirill Tkhai Date: Mon Feb 26 15:59:56 2018 +0300 net: Convert simple pernet_operations These pernet_operations make pretty simple actions like variable initialization on init, debug checks on exit, and so on, and they obviously are able to be executed in parallel with any others: vrf_net_ops lockd_net_ops grace_net_ops xfrm6_tunnel_net_ops kcm_net_ops tcf_net_ops Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller drivers/net/vrf.c | 1 + fs/lockd/svc.c | 1 + fs/nfs_common/grace.c | 1 + net/ipv6/xfrm6_tunnel.c | 1 + net/kcm/kcmsock.c | 1 + net/sched/cls_api.c | 1 + 6 files changed, 6 insertions(+) commit 7300bd94e622a44277a72b82f848db4d961d02e6 Author: Kirill Tkhai Date: Mon Feb 26 15:59:47 2018 +0300 net: Convert nfs_net_ops These pernet_operations just create and destroy /proc entries and net_generic()->cb_ident_idr IDR. So, we are able to mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller fs/nfs/inode.c | 1 + 1 file changed, 1 insertion(+) commit f0aad8e340eace8a13736277a0e8c040a879740c Author: Kirill Tkhai Date: Mon Feb 26 15:59:37 2018 +0300 net: Convert synproxy_net_ops These pernet_operations create and destroy /proc entries and allocate extents to template ct, which depend on global nf_ct_ext_types[] array. So, we are able to mark them async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/nf_synproxy_core.c | 1 + 1 file changed, 1 insertion(+) commit 47d63a01797be8de142beeb0090704501701eafa Author: Kirill Tkhai Date: Mon Feb 26 15:59:28 2018 +0300 net: Convert hashlimit_net_ops and recent_net_ops These pernet_operations just create and destroy /proc entries. Also, new /proc entries also may come after new nf rules are added, but this is not possible, when net isn't alive. So, they are safe to be marked as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/netfilter/xt_hashlimit.c | 1 + net/netfilter/xt_recent.c | 1 + 2 files changed, 2 insertions(+) commit c80afa026a7f6eb01f5431760cd894526153d4a8 Author: Kirill Tkhai Date: Mon Feb 26 15:59:19 2018 +0300 net: Convert /proc creating and destroying pernet_operations These pernet_operations just create and destroy /proc entries, and they can safely marked as async: pppoe_net_ops vlan_net_ops canbcm_pernet_ops kcm_net_ops pfkey_net_ops pppol2tp_net_ops phonet_net_ops Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller drivers/net/ppp/pppoe.c | 1 + net/8021q/vlan.c | 1 + net/can/bcm.c | 1 + net/kcm/kcmproc.c | 1 + net/key/af_key.c | 1 + net/l2tp/l2tp_ppp.c | 1 + net/phonet/pn_dev.c | 1 + 7 files changed, 7 insertions(+) commit 7f897db37b76235d50151dfea7d543568d54535a Author: Arnd Bergmann Date: Mon Feb 26 10:41:30 2018 +0100 ipvlan: fix building with modular IPV6 We no longer depend on IPV6, but that now causes a link error with CONFIG_IPV6=m and CONFIG_IPVLAN=y: drivers/net/ipvlan/ipvlan_core.o: In function `ipvlan_queue_xmit': ipvlan_core.c:(.text+0x1440): undefined reference to `ip6_route_output_flags' drivers/net/ipvlan/ipvlan_core.o: In function `ipvlan_l3_rcv': ipvlan_core.c:(.text+0x1818): undefined reference to `ip6_route_input_lookup' This adds back the dependency on IPV6, with the option of building without IPV6, but forcing IPVLAN to be a module when IPV6 is a module. Fixes: 94333fac44d1 ("ipvlan: drop ipv6 dependency") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/Kconfig | 1 + 1 file changed, 1 insertion(+) commit be36ced8a7c9aa03df4c34653e22ad6890a94ad6 Author: Amelie Delaunay Date: Fri Feb 16 14:16:00 2018 +0100 ARM: dts: stm32: enable RTC on stm32h743i-eval This patch enables RTC on stm32h743i-eval. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32h743i-eval.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 732e7a6ee4386d83d35089ae5e58c27f4d0c70d3 Author: Amelie Delaunay Date: Fri Feb 16 14:16:00 2018 +0100 ARM: dts: stm32: add RTC support on STM32H743 This patch adds support for RTC on STM32H743 SoC. It also adds dt-bindings/interrupt-controller/irq.h include and uses it to configure RTC alarm interrupt. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32h743.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 832e4e1f76b8a84991e9db56fdcef1ebce839b8b Author: Thomas Vincent-Cross Date: Tue Feb 27 20:20:36 2018 +1100 PCI: Add function 1 DMA alias quirk for Marvell 88SE9220 Add Marvell 88SE9220 DMA quirk as found and tested on bug 42679. Link: https://bugzilla.kernel.org/show_bug.cgi?id=42679 Signed-off-by: Thomas Vincent-Cross Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 3 +++ 1 file changed, 3 insertions(+) commit 98bbfc5285fca72151d8758d7124bee4b24fa606 Author: Amelie Delaunay Date: Mon Feb 19 09:46:00 2018 +0100 ARM: dts: stm32: enable USB OTG HS on stm32h743i-eval This patch enables USB HS on stm32h743i-eval in OTG (DRD) mode. The USB connector used will determine the role of USB OTG controller. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32h743-pinctrl.dtsi | 20 ++++++++++++++++++++ arch/arm/boot/dts/stm32h743i-eval.dts | 16 ++++++++++++++++ 2 files changed, 36 insertions(+) commit e3fa5054744f1aed8a0cbc2f45c5b0071476355c Author: Amelie Delaunay Date: Tue Feb 27 15:36:56 2018 +0100 ARM: dts: stm32: add USB OTG HS and FS support for STM32H743 SoC This patch adds support for USB OTG HS and FS on STM32H743 SoC: -USB OTG HS controller is the same than the one used on STM32F7 SoCs. -USB OTG FS controller is the same than the one used on STM32F4 SoCs. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32h743.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit ab6c79b819f5a50cf41a11ebec17bef63b530333 Author: Jin Yao Date: Tue Jan 16 23:43:08 2018 +0800 perf stat: Ignore error thread when enabling system-wide --per-thread If we execute 'perf stat --per-thread' with non-root account (even set kernel.perf_event_paranoid = -1 yet), it reports the error: jinyao@skl:~$ perf stat --per-thread Error: You may not have permission to collect system-wide stats. Consider tweaking /proc/sys/kernel/perf_event_paranoid, which controls use of the performance events system by unprivileged users (without CAP_SYS_ADMIN). The current value is 2: -1: Allow use of (almost) all events by all users Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK >= 0: Disallow ftrace function tracepoint by users without CAP_SYS_ADMIN Disallow raw tracepoint access by users without CAP_SYS_ADMIN >= 1: Disallow CPU event access by users without CAP_SYS_ADMIN >= 2: Disallow kernel profiling by users without CAP_SYS_ADMIN To make this setting permanent, edit /etc/sysctl.conf too, e.g.: kernel.perf_event_paranoid = -1 Perhaps the ptrace rule doesn't allow to trace some processes. But anyway the global --per-thread mode had better ignore such errors and continue working on other threads. This patch will record the index of error thread in perf_evsel__open() and remove this thread before retrying. For example (run with non-root, kernel.perf_event_paranoid isn't set): jinyao@skl:~$ perf stat --per-thread ^C Performance counter stats for 'system wide': vmstat-3458 6.171984 cpu-clock:u (msec) # 0.000 CPUs utilized perf-3670 0.515599 cpu-clock:u (msec) # 0.000 CPUs utilized vmstat-3458 1,163,643 cycles:u # 0.189 GHz perf-3670 40,881 cycles:u # 0.079 GHz vmstat-3458 1,410,238 instructions:u # 1.21 insn per cycle perf-3670 3,536 instructions:u # 0.09 insn per cycle vmstat-3458 288,937 branches:u # 46.814 M/sec perf-3670 936 branches:u # 1.815 M/sec vmstat-3458 15,195 branch-misses:u # 5.26% of all branches perf-3670 76 branch-misses:u # 8.12% of all branches 12.651675247 seconds time elapsed Signed-off-by: Jin Yao Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1516117388-10120-1-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 14 +++++++++++++- tools/perf/util/evsel.c | 3 +++ tools/perf/util/thread_map.c | 1 + tools/perf/util/thread_map.h | 1 + 4 files changed, 18 insertions(+), 1 deletion(-) commit 4a884163a3430bce7e8283793750c9f2d9d2c370 Author: Amelie Delaunay Date: Fri Feb 16 14:47:00 2018 +0100 ARM: dts: stm32: enable RTC on stm32f769-disco This patch enables RTC on stm32f769-disco. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f769-disco.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 851d54f06cbb9bdc989f82f3f6e589a8f6e4337e Author: Amelie Delaunay Date: Thu Feb 15 16:54:00 2018 +0100 ARM: dts: stm32: enable USB HS on stm32f769-disco This patch enables USB HS on stm32f749-disco in OTG (DRD) mode. The USB connector used will determine the role of USB OTG controller. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f769-disco.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7dcf834660822ad1e837b1fdf93bcbc437642cfa Author: Amelie Delaunay Date: Thu Feb 15 16:54:00 2018 +0100 ARM: dts: stm32: select otg mode for usbotg_hs on stm32746g_eval Configure USB OTG HS in OTG (DRD) mode on STM32746G_eval. The USB connector used will determine the role of USB OTG controller. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32746g-eval.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3058b69bf9a92b857340cd0331ee2d43d9b1831b Author: Amelie Delaunay Date: Thu Feb 15 16:54:00 2018 +0100 ARM: dts: stm32: add gadget fifo sizes to usbotg_hs on stm32f746 USB OTG HS on STM32F746 can also be used as Peripheral (gadget), so this patch adds DWC2 gadget mode fifo sizes bindings. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f746.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 4798836c206134731e6d8ec153f09b9b186acca3 Author: Benjamin Gaignard Date: Tue Feb 27 14:47:10 2018 +0100 ARM: dts: stm32: Add push button to stm32f769 Discovery board Add node for user push button. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f769-disco.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 02050da4a9a21e68131e3086a8a21b5bd806226d Author: Benjamin Gaignard Date: Tue Feb 27 15:00:41 2018 +0100 ARM: dts: stm32: Add push button to stm32f469 Discovery board Add node for user push button. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f469-disco.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 9581329eff9db72ab4fbb46a594fd7fdda3c51b0 Author: Eugen Hristev Date: Tue Feb 27 12:25:07 2018 +0200 spi: atmel: init FIFOs before spi enable The datasheet recommends initializing FIFOs before SPI enable. If we do not do it like this, there may be a strange behavior. We noticed that DMA does not work properly with FIFOs if we do not clear them beforehand or enable them before SPIEN. Signed-off-by: Eugen Hristev Acked-by: Nicolas Ferre Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-atmel.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 28dd6726e7bb85add8a8fe61438ed2d483acc1f7 Author: Rasmus Villemoes Date: Tue Feb 20 16:09:12 2018 +0100 EDAC, layerscape: Allow building for LS1021A The LS1021A has a memory controller supported by this driver. It builds just fine, and I've done some rudimentary testing using the error injection facility, which suggests that it is indeed working. Signed-off-by: Rasmus Villemoes Acked-by: York Sun Cc: Alexander Stein Cc: linux-edac Link: http://lkml.kernel.org/r/20180220150912.2954-1-rasmus.villemoes@prevas.dk Signed-off-by: Borislav Petkov drivers/edac/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 639f8ff1130cde363410ff5a5a341e72ae2c05f8 Author: Benjamin Gaignard Date: Tue Feb 27 14:43:56 2018 +0100 ARM: dts: stm32: Add leds support to stm32f769 Discovery board Add nodes for the two user leds. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f769-disco.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6ce12a74632e5583d8cf07fbf1b935c75de36bd3 Author: Benjamin Gaignard Date: Tue Feb 27 14:53:43 2018 +0100 ARM: dts: stm32: Add leds support to stm32f469 Discovery board Add nodes for the four user leds. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f469-disco.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 8100091d02487ff267af0d410ceb9eefebc8ea03 Author: Jia-Ju Bai Date: Sat Jan 27 00:38:35 2018 +0800 bcma: Replace mdelay with usleep_range in bcma_pmu_resources_init After checking all possible call chains to bcma_pmu_resources_init() here, my tool finds that this function is never called in atomic context, namely never in an interrupt handler or holding a spinlock. Thus mdelay can be replaced with usleep_range to avoid busy wait. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/bcma/driver_chipcommon_pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3142467fc15ba19a327dcedafcf913bc7832f6d1 Author: Pali Rohár Date: Fri Nov 10 00:38:26 2017 +0100 wl1251: Set generated MAC address back to NVS data In case there is no valid MAC address kernel generates random one. This patch propagate this generated MAC address back to NVS data which will be uploaded to wl1251 chip. So HW would have same MAC address as linux kernel uses. This should not change any functionality, but it is better to tell wl1251 correct mac address since beginning of chip usage. Signed-off-by: Pali Rohár Signed-off-by: Kalle Valo drivers/net/wireless/ti/wl1251/main.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 4f507d588d08429126530988f657a7a7ca3e6180 Author: Pali Rohár Date: Fri Nov 10 00:38:25 2017 +0100 wl1251: Parse and use MAC address from supplied NVS data This patch implements parsing MAC address from NVS data which are sent to wl1251 chip. Calibration NVS data could contain valid MAC address and it will be used instead of randomly generated one. This patch also moves code for requesting NVS data from userspace to driver initialization code to make sure that NVS data will be there at time when permanent MAC address is needed. Calibration NVS data for wl1251 are device specific. Every device with wl1251 chip should have been calibrated in factory and needs to provide own calibration data. Default example file wl1251-nvs.bin, found in linux-firmware repository, contains MAC address 00:00:20:07:03:09. So this MAC address is marked as invalid as it is not real device specific address, just example one. Format of calibration NVS data can be found at: http://notaz.gp2x.de/misc/pnd/wl1251/nvs_map.txt Signed-off-by: Pali Rohár Signed-off-by: Kalle Valo drivers/net/wireless/ti/wl1251/main.c | 55 ++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 8 deletions(-) commit 562da3a39cb78ffaba44511ec39d8c245023a02f Author: Pali Rohár Date: Fri Nov 10 00:38:24 2017 +0100 wl1251: Generate random MAC address only if driver does not have valid Before this patch, driver generated random MAC address every time it was initialized. After that random MAC address could be overwritten with fixed one, if provided. This patch changes order. First it tries to read fixed MAC address and if it fails then driver generates random MAC address. Signed-off-by: Pali Rohár Acked-by: Pavel Machek Signed-off-by: Kalle Valo drivers/net/wireless/ti/wl1251/main.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit f63b4c971f5fb1310f145785c3b2b77651ef129e Author: Pali Rohár Date: Fri Nov 10 00:38:23 2017 +0100 wl1251: Update wl->nvs_len after wl->nvs is valid If kmemdup fails, then wl->nvs_len will contain invalid non-zero size. Signed-off-by: Pali Rohár Acked-by: Pavel Machek Signed-off-by: Kalle Valo drivers/net/wireless/ti/wl1251/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bafc56491bf3ec090994fc3a2451ec3c68d5bc1b Author: NeilBrown Date: Fri Feb 23 09:09:33 2018 +1100 staging: lustre: lnet/selftest: don't ignore status from lstcon_test_add If lstcon_test_add sets 'ret' (passed by reference) to 1, then lst_test_add_ioctl() ignores the return value. This isn't justified - the return value must be zero for 'ret' to be meaningful. Signed-off-by: NeilBrown Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/conctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17556cdbe6ed70a6a20e597b228628f7f34387f8 Author: NeilBrown Date: Fri Feb 23 09:09:33 2018 +1100 staging: lustre: lmv: correctly iput lmo_root Commit 8f18c8a48b73 ("staging: lustre: lmv: separate master object with master stripe") changed how lmo_root inodes were managed, particularly when LMV_HASH_FLAG_MIGRATION is not set. Previously lsm_md_oinfo[0].lmo_root was always a borrowed inode reference and didn't need to by iput(). Since the change, that special case only applies when LMV_HASH_FLAG_MIGRATION is set In the upstream (lustre-release) version of this patch [Commit 60e07b972114 ("LU-4690 lod: separate master object with master stripe")] the for loop in the lmv_unpack_md() was changed to count from 0 and to ignore entry 0 if LMV_HASH_FLAG_MIGRATION is set. In the patch that got applied to Linux, that change was missing, so lsm_md_oinfo[0].lmo_root is never iput(). This results in a "VFS: Busy inodes" warning at unmount. Fixes: 8f18c8a48b73 ("staging: lustre: lmv: separate master object with master stripe") Signed-off-by: NeilBrown Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01220025b14ab6be3d41313b45e87be332f217e4 Author: NeilBrown Date: Fri Feb 23 09:09:33 2018 +1100 staging: lustre: lov: use correct env in lov_io_data_version_end() lov - the logical object volume manager - is responsible for striping data across multiple volumes. So when it is given a request, it creates one or more sub-requests, one for each target volume. Each sub_io request has a sub_env environment which it operates in. When lov_io_data_version_end() calls lov_io_end_wrapper() to wait for and close off a sub_io, it passes the wrong environment. This causes an LINVRNT() to fail in cl2osc_io(), and may cause other problems. This patch changes the call to use ->sub_env, much like other code in the same file. Fixes: f0cf21abcccc ("staging: lustre: clio: add CIT_DATA_VERSION and remove IOC_LOV_GETINFO") Signed-off-by: NeilBrown Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lov/lov_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 243ac21035176ac9692c1308a9f3b8f6a4e5d733 Author: Corey Minyard Date: Tue Feb 20 07:30:22 2018 -0600 ipmi: Add or fix SPDX-License-Identifier in all files And get rid of the license text that is no longer necessary. Signed-off-by: Corey Minyard Cc: Kees Cook Cc: Alistair Popple Cc: Jeremy Kerr Cc: Joel Stanley Cc: Rocky Craig drivers/char/ipmi/bt-bmc.c | 6 +----- drivers/char/ipmi/ipmi_bt_sm.c | 22 ++-------------------- drivers/char/ipmi/ipmi_devintf.c | 22 +--------------------- drivers/char/ipmi/ipmi_dmi.c | 2 +- drivers/char/ipmi/ipmi_dmi.h | 2 +- drivers/char/ipmi/ipmi_kcs_sm.c | 22 +--------------------- drivers/char/ipmi/ipmi_msghandler.c | 22 +--------------------- drivers/char/ipmi/ipmi_powernv.c | 6 +----- drivers/char/ipmi/ipmi_poweroff.c | 22 +--------------------- drivers/char/ipmi/ipmi_si.h | 1 + drivers/char/ipmi/ipmi_si_hardcode.c | 1 + drivers/char/ipmi/ipmi_si_hotmod.c | 1 + drivers/char/ipmi/ipmi_si_intf.c | 22 +--------------------- drivers/char/ipmi/ipmi_si_mem_io.c | 1 + drivers/char/ipmi/ipmi_si_parisc.c | 1 + drivers/char/ipmi/ipmi_si_pci.c | 1 + drivers/char/ipmi/ipmi_si_platform.c | 1 + drivers/char/ipmi/ipmi_si_port_io.c | 1 + drivers/char/ipmi/ipmi_si_sm.h | 22 +--------------------- drivers/char/ipmi/ipmi_smic_sm.c | 24 ++---------------------- drivers/char/ipmi/ipmi_ssif.c | 6 +----- drivers/char/ipmi/ipmi_watchdog.c | 22 +--------------------- include/linux/ipmi-fru.h | 3 +-- include/linux/ipmi.h | 21 +-------------------- include/linux/ipmi_smi.h | 21 +-------------------- include/uapi/linux/ipmi.h | 20 -------------------- include/uapi/linux/ipmi_msgdefs.h | 20 -------------------- 27 files changed, 27 insertions(+), 288 deletions(-) commit 662e8aff5b9289d231308f0982770b1c941ae531 Author: Greg Kroah-Hartman Date: Tue Feb 27 14:42:14 2018 +0100 Revert "Staging: bcm2048: Fix function argument alignment in radio-bcm2048.c." This reverts commit 444634f5ed6f0179cd63ff09bea62c03963ad0f9. Should not be going through my tree, sorry about that. Reported-by: Hans Verkuil Cc: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/media/bcm2048/radio-bcm2048.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 9137b8498c6252e0548eb2f61913ed7a03bd2cd9 Author: Patrice Chotard Date: Fri Jan 26 17:23:00 2018 +0100 ARM: dts: stm32: Fix HSE clock frequency for stm32h743i-disco board The HSE oscillator frequency was wrongly set to 125MHz instead of 25MHz. Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32h743i-disco.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3e389f931a14ddf43089c7db92fc5d74edf93a4 Author: Sean Young Date: Wed Feb 14 10:26:17 2018 -0500 media: rc: fix race condition in ir_raw_event_store_edge() handling There is a possible race condition between the IR timeout being generated from the timer, and new IR arriving. This could result in the timeout being added to the kfifo after new IR arrives. On top of that, there is concurrent write access to the kfifo from ir_raw_event_store_edge() and the timer. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-core-priv.h | 5 +++-- drivers/media/rc/rc-ir-raw.c | 24 +++++++++++++++++++++--- 2 files changed, 24 insertions(+), 5 deletions(-) commit 5817b3d15e67f8a7280e06e0dfb2c7ede5897cd3 Author: Sean Young Date: Tue Feb 13 06:11:35 2018 -0500 media: rc: no need to announce major number Since commit a60d64b15c20 ("media: lirc: lirc interface should not be a raw decoder"), the message in the documentation is incorrect as the module name is rc_core, not lirc_dev. Since the message is not useful, just make the message debug and remove it from the documentation. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/rc/lirc-dev-intro.rst | 1 - drivers/media/rc/lirc_dev.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) commit be5b928038ba1906f064290affb35bcd3bc74844 Author: Wolfram Sang Date: Mon Feb 26 22:17:53 2018 +0100 i2c: reformat comments around i2c_smbus_xfer_emulated() Use Kernel coding style for better readability. Signed-off-by: Wolfram Sang Reviewed-by: Peter Rosin drivers/i2c/i2c-core-smbus.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 84cb55c422816d96e8871f7663194949eca98fa6 Author: Geert Uytterhoeven Date: Mon Feb 26 16:26:43 2018 +0100 dt-bindings: i2c: sh_mobile: Document R-Car M3-N support Document support for the IIC Bus Interface for DVFS (IIC for DVFS) in the Renesas M3-N (r8a77965) SoC. No driver update is needed. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt | 1 + 1 file changed, 1 insertion(+) commit bead21687f293cb1e1365703f11cf1cc6aaaf833 Author: Colin Ian King Date: Tue Jan 16 17:44:04 2018 +0000 i2c-stm32f4: remove redundant initialization of pointer reg The pointer reg is assigned a value that is never read, it is later overwritten with a new value, hence the redundant initialization can be removed. Cleans up clang warning: drivers/i2c/busses/i2c-stm32f4.c:352:16: warning: Value stored to 'reg' during its initialization is never read Signed-off-by: Colin Ian King Acked-by: Alexandre TORGUE Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-stm32f4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 939c5a46e5cac7524b327d43ae826fd6941fa2aa Author: Andrzej Hajda Date: Tue Feb 27 08:19:00 2018 +0100 i2c: exynos5: rework HSI2C_MASTER_ST_LOSE state handling HSI2C_MASTER_ST_LOSE state is not documented properly, extensive tests show that hardware is usually able to recover from this state without interrupting the transfer. Moreover documentation says that such state can be caused by slave clock stretching, and should not be treated as an error during transaction. The only place it indicates an error is just before starting transaction. In such case bus recovery procedure should be performed - master should pulse SCL line nine times and then send STOP condition, it can be repeated until SDA goes high. The procedure can be performed using manual commands HSI2C_CMD_READ_DATA and HSI2C_CMD_SEND_STOP. Signed-off-by: Andrzej Hajda Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-exynos5.c | 63 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 6 deletions(-) commit 24bba078eca099b5bd25e17e97b485f013589f8c Author: Felix Fietkau Date: Tue Feb 27 13:03:07 2018 +0100 mac80211: support A-MSDU in fast-rx Only works if the IV was stripped from packets. Create a smaller variant of ieee80211_rx_h_amsdu, which bypasses checks already done within the fast-rx context. In order to do so, update cfg80211's ieee80211_data_to_8023_exthdr() to take the offset between header and snap. Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg include/net/cfg80211.h | 6 ++- net/mac80211/rx.c | 124 +++++++++++++++++++++++++++++-------------------- net/wireless/util.c | 5 +- 3 files changed, 80 insertions(+), 55 deletions(-) commit a163dc22d515d17844435c8217ff66193d35b3fa Author: Matthias Schiffer Date: Wed Jan 24 12:21:37 2018 +0100 batman-adv: always assume 2-byte packet alignment NIC drivers generally try to ensure that the "network header" is aligned to a 4-byte boundary. This is not always possible: When Ethernet frames are encapsulated in other packets with 4-byte aligned headers, the inner Ethernet header will have 4-byte alignment, and in consequence, the inner network header is aligned to 2, but not to 4 bytes. Most parts of batman-adv only care about 2-byte alignment; in particular, no unaligned accesses occur in performance-critical paths that handle actual payload data. This is not true for OGM handling: the seqno and crc fields are accessed as 32-bit values. To avoid these unaligned accesses, this patch reduces the expected packet alignment to 2 bytes for all of batadv's packet types. As no unaligned accesses existed on the performance-critical paths anyways, this chance does have any (positive or negative) effect on performance, but it still makes sense to avoid these accesses to prevent log noise when examining other unaligned accesses in the kernel while batman-adv is active. Signed-off-by: Matthias Schiffer Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich include/uapi/linux/batadv_packet.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit d7625f9f72dc148b4f25d9bc5014b710e1024b15 Author: Sven Eckelmann Date: Tue Feb 20 12:08:10 2018 +0100 batman-adv: Avoid relation operator comparison with bool commit 785ea1144182 ("batman-adv: Distributed ARP Table - create DHT helper functions") introduced a return check of batadv_compare_eth which uses a boolean return value since commit 16af73458aca ("batman-adv: main, batadv_compare_eth return bool"). A relational (<, >, <= or >=) operator is not the right one for such a check. Reported-by: David Binderman Signed-off-by: Sven Eckelmann Acked-by: Antonio Quartulli Signed-off-by: Simon Wunderlich net/batman-adv/distributed-arp-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84d0a394808621619a4b319c6eed16e3b389e214 Author: Sven Eckelmann Date: Fri Jan 5 09:54:32 2018 +0100 batman-adv: Fix indentation of batadv_seq_before Also multiline macros should have their statements start on a tabstop. This was detected by checkpatch.pl after commit a134f8de9f40 ("checkpatch: improve the TABSTOP test to include declarations"). Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/main.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit f6cdf2d3445d73f5b27ec8e620b8fe7a1f5c0ea1 Author: Sebastian Reichel Date: Fri Feb 23 21:02:51 2018 +0100 ASoC: cpcap: new codec Motorola CPCAP is a PMIC with audio functionality, that can be found on Motorola Droid 4 and probably a few other phones from Motorola's Droid series. The driver has been written from scratch using Motorola's Android driver, register dumps from running Android and datasheet for NXP MC13783UG (which is similar to Motorola CPCAP, but not the same). The chip provides two audio interfaces, that can be muxed to two different audio codecs. One provides support for stereo output (named StDAC or HiFi), while the other only provides mono output (named Voice). Only the Voice codec provides a Capture interface. Signed-off-by: Sebastian Reichel Acked-by: Tony Lindgren Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 4 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/cpcap.c | 1568 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1574 insertions(+) commit e51acdb0308b6f2339e5e48636ce452baab5201b Author: Ludovic Barre Date: Tue Jan 16 15:56:00 2018 +0100 dt-bindings: stm32: add support of STM32MP157 This patch adds STM32MP157 SoC bindings. Signed-off-by: Ludovic Barre Reviewed-by: Rob Herring Signed-off-by: Alexandre Torgue Documentation/devicetree/bindings/arm/stm32.txt | 1 + 1 file changed, 1 insertion(+) commit f6d4b052175d84c6f2b73e884f3ab8c83c5f4d45 Author: Katsuhiro Suzuki Date: Fri Feb 23 10:17:17 2018 +0900 ASoC: support ROHM BD28623 codec This patch adds support of the ROHM BD28623MUV Class D speaker amplifier for Flat-panel TVs. This IC delivers an output power of 20W + 20W. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 8 ++ sound/soc/codecs/Makefile | 2 + sound/soc/codecs/bd28623.c | 242 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 252 insertions(+) commit f5ca3ab9bc1b160966c1e5cc7bf831f7b8ec31e5 Author: Katsuhiro Suzuki Date: Fri Feb 23 10:17:16 2018 +0900 ASoC: add DT bindings documentation for ROHM BD28623 codec This patch adds DT bindings documentation for ROHM BD28623MUV class D speaker amplifier. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown .../devicetree/bindings/sound/rohm,bd28623.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 790d631dcfec6b073b04bb6809bce4c09baf198a Author: Fabio Estevam Date: Mon Feb 26 22:24:49 2018 -0300 ASoC: imx-wm8962: Remove machine driver fsl-asoc-card machine driver also handles wm8962, so there is really no need for keeping the dedicated imx-wm8962 driver anymore. Remove the imx-wm8962 machine driver. Suggested-by: Nicolin Chen Signed-off-by: Fabio Estevam Acked-by: Nicolin Chen Reviewed-by: Daniel Baluta Signed-off-by: Mark Brown .../devicetree/bindings/sound/fsl-asoc-card.txt | 1 - .../devicetree/bindings/sound/imx-audio-wm8962.txt | 53 ---- sound/soc/fsl/Kconfig | 11 - sound/soc/fsl/Makefile | 2 - sound/soc/fsl/imx-wm8962.c | 312 --------------------- 5 files changed, 379 deletions(-) commit 5028a4fb7d8d93438e2c6c1b15140ca44b1f647d Author: Michał Winiarski Date: Mon Feb 26 17:37:59 2018 +0100 drm/i915/guc: Fill preempt context once at init time Since we're inhibiting context save of preempt context, we're no longer tracking the position of HEAD/TAIL. With GuC, we're adding a new breadcrumb for each preemption, which means that the HW will do more and more breadcrumb writes. Eventually the ring is filled, and we're submitting the preemption context with HEAD==TAIL==0, which won't result in breadcrumb write, but will trigger hangcheck instead. Instead of writing a new preempt breadcrumb for each preemption, let's just fill the ring once at init time (which also saves a couple of instructions in the tasklet). v2: Assert that context save restore is inhibited, don't assert on ring alignment. (Chris) v3: Cleanup checkpatch. Fixes: 517aaffe0c1b ("drm/i915/execlists: Inhibit context save/restore for the fake preempt context") Signed-off-by: Michał Winiarski Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Cc: Michel Thierry Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180226163800.21745-1-michal.winiarski@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_guc_submission.c | 96 +++++++++++++++++++++-------- 1 file changed, 69 insertions(+), 27 deletions(-) commit 21b7022f13fb038b3e204a892c7cc42749754f7f Author: Ilan Peer Date: Mon Feb 19 14:48:44 2018 +0200 mac80211: agg-rx: Accept ADDBA request update if timeout did not change As there is no support for updating an existing ADDBA session with a peer, we decline the request (while keeping the session active). However, in case that the timeout did not change, there is no need to decline the request, so modify the code to reply with status success in such a case (this is useful for interoperability with APs that send an ADDBA request update without changing the timeout value). Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/agg-rx.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 9251a4736ee360d3850644ddaaa1a61dcec96238 Author: Felix Fietkau Date: Fri Feb 23 13:55:50 2018 +0100 mac80211: support station 4-addr mode fast-rx Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/rx.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 1d870162418a826905161d2276c912986d3b9d9a Author: Felix Fietkau Date: Fri Feb 23 10:06:05 2018 +0100 mac80211: support fast-rx with incompatible PS capabilities when PS is disabled When powersave is disabled for the interface, we can do fast-rx anyway. Signed-off-by: Felix Fietkau [fixed indentation on one line] Signed-off-by: Johannes Berg net/mac80211/cfg.c | 1 + net/mac80211/rx.c | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) commit 59cae5b9d6d39db2804ed5f0330eb5507d40c34c Author: Felix Fietkau Date: Fri Feb 23 10:06:04 2018 +0100 mac80211: support AP 4-addr mode fast-rx Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/rx.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1c92d4a0edcfff0fee78ade27eb41ce3fc0d071a Author: Patrice Chotard Date: Tue Feb 27 11:00:38 2018 +0100 ARM: configs: stm32: Enable MMC_ARMMMCI and EXT3_FS support -Enable MMC_ARMMCI support to add SDIO support for STM32F4 and STM32F7 SoCs family -Enable EXT3_FS support to be able to read rootfs from MMC partition formatted in EXT2/3/4 Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue arch/arm/configs/stm32_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit ba1c06a5727b59b4ac118a91cc9fe82c123acbab Author: Manasi Navare Date: Mon Feb 26 19:11:15 2018 -0800 drm/i915/dp: Fix the order of platforms for setting DP source rates The usual if ladder order should be from newest to oldest platform. However the CNL conditional statement was misplaced. This patch sets the DP source for platforms starting from the newest to oldest. Suggested-by: Jani Nikula Cc: Rodrigo Vivi Cc: Jani Nikula Signed-off-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1519701075-9894-1-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/i915/intel_dp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5211fcfb8110f77ff9f389e476563345817f61a5 Author: Shannon Nelson Date: Mon Feb 26 14:28:19 2018 -0800 esp: check the NETIF_F_HW_ESP_TX_CSUM bit before segmenting If I understand correctly, we should not be asking for a checksum offload on an ipsec packet if the netdev isn't advertising NETIF_F_HW_ESP_TX_CSUM. In that case, we should clear the NETIF_F_CSUM_MASK bits. Signed-off-by: Shannon Nelson Signed-off-by: Steffen Klassert net/ipv4/esp4_offload.c | 2 ++ net/ipv6/esp6_offload.c | 2 ++ 2 files changed, 4 insertions(+) commit f8c3d0dda4b09e05ad8781764cbe153815c1bf23 Author: Alexey Dobriyan Date: Sat Feb 24 21:21:38 2018 +0300 xfrm: mark kmem_caches as __ro_after_init Kmem caches aren't relocated once set up. Signed-off-by: Alexey Dobriyan Signed-off-by: Steffen Klassert net/xfrm/xfrm_input.c | 3 ++- net/xfrm/xfrm_policy.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit e84984f8a44196d5bd51e0c5d6162a311c8dfe72 Author: Patrice Chotard Date: Thu Jan 18 15:34:00 2018 +0100 ARM: dts: stm32: Enable SDIO controller on stm32429i-eval board This patch adds SDIO related DT nodes for stm32429i-eval board. Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32429i-eval.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 64348d9f939fed776b5f0ae76b76169701ec51c9 Author: Patrice Chotard Date: Tue Feb 27 10:35:43 2018 +0100 ARM: dts: stm32: Enable SDIO controller on stm32f469 disco board This patch adds SDIO-related DT nodes required by stm32f469 board There is a hardware issue on these boards, it misses a pullup on the GPIO line used as card detect to allow correct SD card detection. To allow correct card detection "broken-cd" property is used. Signed-off-by: Andrea Merello Signed-off-by: Alexandre TORGUE Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f469-disco.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 7b1f641776e0c8b824fb10135168e4b683a9e2ba Author: Jan Kara Date: Wed Feb 21 15:07:52 2018 +0100 fsnotify: Let userspace know about lost events due to ENOMEM Currently if notification event is lost due to event allocation failing we ENOMEM, we just silently continue (except for fanotify permission events where we deny the access). This is undesirable as userspace has no way of knowing whether the notifications it got are complete or not. Treat lost events due to ENOMEM the same way as lost events due to queue overflow so that userspace knows something bad happened and it likely needs to rescan the filesystem. Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fanotify/fanotify.c | 9 ++++++++- fs/notify/inotify/inotify_fsnotify.c | 8 +++++++- fs/notify/notification.c | 3 ++- include/linux/fsnotify_backend.h | 6 ++++++ 4 files changed, 23 insertions(+), 3 deletions(-) commit 1f5eaa90010ed7cf0ae90a526c48657d02c6086f Author: Jan Kara Date: Wed Feb 21 14:10:59 2018 +0100 fanotify: Avoid lost events due to ENOMEM for unlimited queues Fanotify queues of unlimited length do not expect events can be lost. Since these queues are used for system auditing and other security related tasks, loosing events can even have security implications. Currently, since the allocation is small (32-bytes), it cannot fail however when we start accounting events in memcgs, allocation can start failing. So avoid loosing events due to failure to allocate memory by making event allocation use __GFP_NOFAIL. Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fanotify/fanotify.c | 19 ++++++++++++++----- fs/notify/fanotify/fanotify.h | 3 ++- fs/notify/fanotify/fanotify_user.c | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) commit f0c4a81711cb773b60cb8f90173e6491e67bf74f Author: Jan Kara Date: Thu Feb 22 14:33:04 2018 +0100 udf: Remove never implemented mount options Signed-off-by: Jan Kara Documentation/filesystems/udf.txt | 8 -------- fs/udf/super.c | 28 +--------------------------- 2 files changed, 1 insertion(+), 35 deletions(-) commit 6ccd5194a0f42b0f01a3f9d0c6de536940d04bad Author: Jan Kara Date: Thu Feb 22 10:52:34 2018 +0100 udf: Update mount option documentation Update documentation of uid and gid mount options. Reviewed-by: Pali Rohár Signed-off-by: Jan Kara Documentation/filesystems/udf.txt | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 116e5258e4115aca0c64ac0bf40ded3b353ed626 Author: Jan Kara Date: Thu Feb 22 10:39:52 2018 +0100 udf: Provide saner default for invalid uid / gid Currently when UDF filesystem is recorded without uid / gid (ids are set to -1), we will assign INVALID_[UG]ID to vfs inode unless user uses uid= and gid= mount options. In such case filesystem could not be modified in any way as VFS refuses to modify files with invalid ids (even by root). This is confusing to users and not very useful default since such media mode is generally used for removable media. Use overflow[ug]id instead so that at least root can modify the filesystem. Reported-by: Steve Kenton Reviewed-by: Pali Rohár Signed-off-by: Jan Kara fs/udf/super.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0c9850f4d4c5d645125869fe0fa206fb662bd98b Author: Jan Kara Date: Thu Feb 22 10:28:52 2018 +0100 udf: Clean up handling of invalid uid/gid Current code relies on the fact that invalid uid/gid as defined by UDF 2.60 3.3.3.1 and 3.3.3.2 coincides with invalid uid/gid as used by the user namespaces implementation. Since this is only lucky coincidence, clean this up to avoid future surprises in case user namespaces implementation changes. Also this is more robust in presence of valid (from UDF point of view) uids / gids which do not map into current user namespace. Reviewed-by: Pali Rohár Signed-off-by: Jan Kara fs/udf/inode.c | 21 +++++++++++++-------- fs/udf/udfdecl.h | 2 ++ 2 files changed, 15 insertions(+), 8 deletions(-) commit ecd10aa42819cd5dcf639d25575e95a5bda8d08a Author: Jan Kara Date: Wed Feb 21 17:59:31 2018 +0100 udf: Apply uid/gid mount options also to new inodes & chown Currently newly created files belong to current user despite uid= / gid= mount options. This is confusing to users (as owner of the file will change after remount / eviction from cache) and also inconsistent with e.g. FAT with the same mount option. So apply uid= and gid= also to newly created inodes and similarly as FAT disallow to change owner of the file in this case. Reported-by: Steve Kenton Reviewed-by: Pali Rohár Signed-off-by: Jan Kara fs/udf/file.c | 10 ++++++++++ fs/udf/ialloc.c | 4 ++++ 2 files changed, 14 insertions(+) commit 70260e44750356fecb40ff5fcb0f91bcc911ab5f Author: Jan Kara Date: Wed Feb 21 17:27:44 2018 +0100 udf: Ignore [ug]id=ignore mount options Currently uid=ignore and gid=ignore make no sense without uid= and gid= respectively as they result in all files having invalid uid / gid which then doesn't allow even root to modify files and thus causes confusion. And since commit ca76d2d8031f "UDF: fix UID and GID mount option ignorance" (from over 10 years ago) uid= overrides all uids on disk as uid=ignore does. So just silently ignore uid=ignore mount option. Reviewed-by: Pali Rohár Signed-off-by: Jan Kara fs/udf/inode.c | 2 -- fs/udf/super.c | 10 ++-------- fs/udf/udf_sb.h | 14 ++++++-------- 3 files changed, 8 insertions(+), 18 deletions(-) commit 7b78fd02fb19530fd101ae137a1f46aa466d9bb6 Author: Jan Kara Date: Fri Feb 9 15:56:34 2018 +0100 udf: Fix handling of Partition Descriptors Current handling of Partition Descriptors in Volume Descriptor Sequence is buggy in several ways. Firstly, it does not take descriptor sequence numbers into account at all, thus any volume making serious use of them would be unmountable. Secondly, it does not handle Volume Descriptor Pointers or Volume Descriptor Sequence without Terminating Descriptor. Fix these problems by properly remembering all Partition Descriptors in the Volume Descriptor Sequence and their sequence numbers. This is made more complicated by the fact that we don't know number of partitions in advance and sequence numbers have to be tracked on per-partition basis. Reported-by: Pali Rohár Acked-by: Pali Rohár Signed-off-by: Jan Kara fs/udf/super.c | 105 +++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 73 insertions(+), 32 deletions(-) commit 18cf4781c9e5dc1067dd50a8f8f321c70142461f Author: Jan Kara Date: Fri Feb 9 15:15:39 2018 +0100 udf: Unify common handling of descriptors When scanning Volume Descriptor Sequence, several descriptors have exactly the same handling. Unify it. Acked-by: Pali Rohár Signed-off-by: Jan Kara fs/udf/super.c | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) commit c396a5bf457fb60159dcedbd4f48d53a62be030a Author: Kees Cook Date: Mon Feb 26 16:04:20 2018 -0800 console: Expand dummy functions for CFI This expands the no-op dummy functions into full prototypes to avoid indirect call mismatches when running under Control Flow Integrity checking, like with Clang's -fsanitize=cfi. Co-Developed-by: Sami Tolvanen Signed-off-by: Sami Tolvanen Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/sisusbvga/sisusb_con.c | 67 +++++++++++++++++++++++++------- drivers/video/console/dummycon.c | 69 +++++++++++++++++++++++++-------- drivers/video/console/newport_con.c | 10 ++--- drivers/video/console/vgacon.c | 20 +++++----- drivers/video/fbdev/core/fbcon.c | 3 +- 5 files changed, 121 insertions(+), 48 deletions(-) commit 209f668cd29d2b6b9f39a0b9f179ee40f47c2014 Author: Kees Cook Date: Mon Feb 26 16:04:19 2018 -0800 console: Fill in struct consw argument names Reading the function declarations for the console callbacks lacks any hints as to what the arguments are. Instead of going and digging around in various implementations that may each only have a subset of the callbacks, name all the arguments in the declaration. This has no functional change. Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman include/linux/console.h | 58 +++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 26 deletions(-) commit ea92110bc048848967bd2a046675a006005c4f06 Author: Kees Cook Date: Mon Feb 26 16:04:18 2018 -0800 console: SisUSB2VGA: Drop dummy con_font_get() As done in commit: 724ba8b30b04 ("console/dummy: leave .con_font_get set to NULL") This drops the dummy .con_font_get(), as it could leave arguments uninitialized. Cc: Thomas Winischhofer Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/sisusbvga/sisusb_con.c | 1 - 1 file changed, 1 deletion(-) commit e888a32c7172abbe0a3509a89e910d62152e857d Author: Andrea Merello Date: Thu Jan 18 15:34:00 2018 +0100 ARM: dts: stm32: Add pin map for SDIO controller on stm32f4 This patch adds the pin configuration for SDIO controller on stm32f4. Signed-off-by: Andrea Merello Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f4-pinctrl.dtsi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 3c47586683bd7107e3365ad30d9e0e197428ce5b Author: Patrice Chotard Date: Thu Jan 18 15:34:00 2018 +0100 ARM: dts: stm32: Add SDIO controller for stm32f429 stm32f429 embeds ARM_PL180 sdi IP, adds SDIO controller node to allow MMC support. Signed-off-by: Andrea Merello Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f429.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c1947fd27b47037a45e241fd462772cbc7345fc0 Author: Patrice Chotard Date: Tue Feb 27 10:03:57 2018 +0100 ARM: dts: stm32: Add SDIO controller for stm32f746 stm32f746 embeds ARM_PL180 sdio IP, adds SDIO controller nodes to allow MMC support. Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f746.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit ef21e1750158558d8369067e94d02d285011c37e Author: Jaejoong Kim Date: Tue Feb 27 11:15:59 2018 +0900 ALSA: Use scnprintf() instead of snprintf() for show The show() method should use scnprintf() not snprintf() because snprintf() may returns a value that exceeds its second argument. Signed-off-by: Jaejoong Kim Signed-off-by: Takashi Iwai sound/core/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4a4b0f176b848e5050d75cacbdcf9aa86bef7848 Author: Geert Uytterhoeven Date: Mon Feb 26 19:03:42 2018 +0100 dt-bindings: arm: Document SoC compatible value for Armadillo-800 EVA The compatible property of the root node in a DTS for Atmark Techno Armadillo-800 EVA should include the compatible value for the R-Mobile A1 SoC, too. Fixes: d2c2a0776899ba2d ("ARM: shmobile: Add platform device tree bindings documentation") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbe37dc31c7177f60518320e8f92cb337ad107dc Author: Rodrigo Siqueira Date: Thu Feb 22 21:01:10 2018 -0300 drm/virtio: Add spaces around operators This patch fixes the checkpatch.pl check: virtgpu_ioctl.c:535: CHECK: spaces preferred around that '|' (ctx:VxV) virtgpu_vq.c:277: CHECK: spaces preferred around that '+' (ctx:VxV) ... Signed-off-by: Rodrigo Siqueira Reviewed-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/8402b55696b44483ba2e1f6aaeb53bf709ffbfe7.1519343668.git.rodrigosiqueiramelo@gmail.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_ioctl.c | 18 +++++++++--------- drivers/gpu/drm/virtio/virtgpu_vq.c | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) commit 601030e262c3840200178139b2fff99f9cfca151 Author: Rodrigo Siqueira Date: Thu Feb 22 21:00:57 2018 -0300 drm/virtio: Remove multiple blank lines This patch fixes the checkpatch.pl check: virtgpu_drv.c:116: CHECK: Please don't use multiple blank lines virtgpu_vq.c:599: CHECK: Please don't use multiple blank lines virtgpu_prime.c:42: CHECK: Please don't use multiple blank lines Signed-off-by: Rodrigo Siqueira Reviewed-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/c43a006f2ed93a16fe824b4a2686a2d5e2ef56f5.1519343668.git.rodrigosiqueiramelo@gmail.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_drv.c | 1 - drivers/gpu/drm/virtio/virtgpu_prime.c | 1 - drivers/gpu/drm/virtio/virtgpu_vq.c | 1 - 3 files changed, 3 deletions(-) commit dc31b3b76c8a7be9728cd0771a1f17fb896f85b8 Author: Rodrigo Siqueira Date: Thu Feb 22 21:00:45 2018 -0300 drm/virtio: Replace 'unsigned' for 'unsigned int' This patch fixes the checkpatch.pl warning: drivers/gpu/drm/virtio/virtgpu_display.c:64: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' ... Signed-off-by: Rodrigo Siqueira Reviewed-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/ac9c4110785e6519801d44c57d4f05c3e0cdad53.1519343668.git.rodrigosiqueiramelo@gmail.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_display.c | 4 ++-- drivers/gpu/drm/virtio/virtgpu_drv.h | 2 +- drivers/gpu/drm/virtio/virtgpu_fb.c | 2 +- drivers/gpu/drm/virtio/virtgpu_ttm.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 1a5019f125038817b585f1703823cac256c11a66 Author: Rodrigo Siqueira Date: Thu Feb 22 21:00:33 2018 -0300 drm/virtio: Remove return from void function This patch fixes the checkpatch.pl warning: virtgpu_ttm.c:181: WARNING: void function return statements are not generally useful ... Signed-off-by: Rodrigo Siqueira Reviewed-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/fd8dc6599c81c7aec6753c8552c1cabb7baa7577.1519343668.git.rodrigosiqueiramelo@gmail.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_ttm.c | 2 -- 1 file changed, 2 deletions(-) commit 5d883850dc23a52960b3633ca119dcf2413477ae Author: Rodrigo Siqueira Date: Thu Feb 22 21:00:17 2018 -0300 drm/virtio: Add */ in block comments to separate line This patch fixes the checkpatch.pl warning: virtgpu_ioctl.c:551: WARNING: Block comments use a trailing */ on a separate line ... Signed-off-by: Rodrigo Siqueira Reviewed-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/f0bd4104a7d26bf7561c3a2b4632041c5411f1f2.1519343668.git.rodrigosiqueiramelo@gmail.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_ioctl.c | 3 ++- drivers/gpu/drm/virtio/virtgpu_prime.c | 3 ++- drivers/gpu/drm/virtio/virtgpu_vq.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit 9d492b6bece4ecce096894153005fa2bb31f911f Author: Rodrigo Siqueira Date: Thu Feb 22 21:00:00 2018 -0300 drm/virtio: Add blank line after variable declarations This patch fixes the checkpatch.pl warnings: virtgpu_drv.c:57: WARNING: Missing a blank line after declarations virtgpu_display.c:99: WARNING: Missing a blank line after declarations ... Signed-off-by: Rodrigo Siqueira Reviewed-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/41767852ff9dc584c825e32db6222b9a311603b9.1519343668.git.rodrigosiqueiramelo@gmail.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_display.c | 1 + drivers/gpu/drm/virtio/virtgpu_drv.c | 1 + drivers/gpu/drm/virtio/virtgpu_fb.c | 4 ++++ drivers/gpu/drm/virtio/virtgpu_gem.c | 1 + drivers/gpu/drm/virtio/virtgpu_ioctl.c | 2 ++ drivers/gpu/drm/virtio/virtgpu_vq.c | 3 +++ 6 files changed, 12 insertions(+) commit 1858b85606ccf6705018452873600f3aa2948906 Author: Rodrigo Siqueira Date: Thu Feb 22 20:59:47 2018 -0300 drm/virtio: Add tabs at the start of a line This patch fixes the checkpatch.pl errors: drivers/gpu/drm/virtio/virtgpu_drv.h:371: ERROR: code indent should use tabs where possible ... Signed-off-by: Rodrigo Siqueira Reviewed-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/1c77c233d4454ee2bdb85beaf17d413e310fac0a.1519343668.git.rodrigosiqueiramelo@gmail.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_display.c | 2 +- drivers/gpu/drm/virtio/virtgpu_drv.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 5628683cf77bc8dad3336a9b254e55f728f7c70e Author: Stefan Haberland Date: Thu Feb 8 16:55:28 2018 +0100 s390/dasd: set timestamps unconditionally Set the XRC timestamps even if XRC is not supported by the storage server to help debugging the storage server firmware. Do not advertise valid time stamps if the system time could not be obtained. Reviewed-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_eckd.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit a1fc8181eb7858400d39bff42e9d31a2e8b80c83 Author: Stefan Haberland Date: Mon Feb 19 12:24:39 2018 +0100 s390/dasd: remove unneeded sanity check Reported by smatch that the usage of cqr->block is inconsistent. The sanity check is not needed because _dasd_requeue_request already checks for a valid cqr->block pointer and all referenced ERP requests have a valid cqr->block pointer as well since it is copied during ERP process. Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5e725c570eaa405eb5b1a557e7c6831ac56c3088 Author: Julian Wiedmann Date: Mon Feb 26 09:46:02 2018 +0100 s390: fix typo in irb description s/sene/sense Signed-off-by: Julian Wiedmann Signed-off-by: Martin Schwidefsky arch/s390/include/asm/cio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0aa099c18e83ce6983270da36349e3d52179335 Author: Vasily Gorbik Date: Tue Feb 20 11:31:34 2018 +0100 s390: set bzImage as default image for packaging Even though s390 compressed kernel support has been introduced long ago, by default uncompressed kernel image is used by packaging targets like: "make rpm-pkg", "make deb-pkg" as well as "make image_name". At the same time "make install" would use compressed bzImage by default. To avoid ambiguity, set bzImage as default image for packaging. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 320d9555cb9d2f42cf933c7f59468998933f6cc7 Author: Vasily Gorbik Date: Tue Feb 20 13:28:33 2018 +0100 s390: unify linker symbols usage Common code defines linker symbols which denote sections start/end in a form of char []. Referencing those symbols as _symbol or &_symbol yields the same result, but "_symbol" form is more widespread across newly written code. Convert s390 specific code to this style. Also removes unused _text symbol definition in boot/compressed/misc.c. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/boot/compressed/misc.c | 10 +++++----- arch/s390/kernel/early.c | 2 +- arch/s390/kernel/setup.c | 20 ++++++++++---------- arch/s390/kernel/suspend.c | 4 ++-- arch/s390/mm/dump_pagetables.c | 4 ++-- 5 files changed, 20 insertions(+), 20 deletions(-) commit 3ad6b250130de368066c5d6d7ebfdc328f655118 Author: Vasily Gorbik Date: Tue Feb 20 11:12:30 2018 +0100 s390/decompressor: discard __ex_table section Exception table (__ex_table section) is not used during the decompressor phase and could be discarded to save the memory. It is currently generated due to sclp_service_call function (sclp_early_core.c). An assumption is that decompressor usage of sclp_service_call via sclp_early_printk should never trigger exceptions. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/boot/compressed/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) commit 6f1b5a2b58d8470e5a8b25ab29f5fdb4616ffff8 Merge: 3808b51 b33eb73 Author: Alexei Starovoitov Date: Mon Feb 26 20:11:23 2018 -0800 Merge branch 'bpf-kselftest-improvements' Daniel Borkmann says: ==================== First one unifies the often repeated rlimit handling and the second one enables and adds run-time tests for BPF tail calls which provides useful coverage in particular for JITs. ==================== Signed-off-by: Alexei Starovoitov commit b33eb735836224e55cd8182aff9bbb7ddc17f38b Author: Daniel Borkmann Date: Mon Feb 26 22:34:33 2018 +0100 bpf: add tail call tests to test_verifier One of the downsides of the test_bpf module was that since being in kernel space, it couldn't test-run tail calls. Now that the test_verifier has the ability to perform run-time tests, populate the prog array so we actually jump into other BPF programs and can check all corner cases. Most useful in combination with JITs. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/test_verifier.c | 117 ++++++++++++++++++++++++++-- 1 file changed, 110 insertions(+), 7 deletions(-) commit fe8d662aef26394388bfcd3b96ce123b6d33044b Author: Daniel Borkmann Date: Mon Feb 26 22:34:32 2018 +0100 bpf: unify rlimit handling in selftests Unify memlock handling into bpf_rlimit.h and replace all occurences in BPF kselftests with it. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/bpf_rlimit.h | 28 +++++++++++++++++++++++++ tools/testing/selftests/bpf/test_align.c | 6 +----- tools/testing/selftests/bpf/test_dev_cgroup.c | 6 +----- tools/testing/selftests/bpf/test_lpm_map.c | 14 +++---------- tools/testing/selftests/bpf/test_lru_map.c | 6 ++---- tools/testing/selftests/bpf/test_maps.c | 7 ++----- tools/testing/selftests/bpf/test_progs.c | 7 ++----- tools/testing/selftests/bpf/test_tag.c | 4 +--- tools/testing/selftests/bpf/test_tcpbpf_user.c | 6 +----- tools/testing/selftests/bpf/test_verifier.c | 6 +----- tools/testing/selftests/bpf/test_verifier_log.c | 8 ++----- 11 files changed, 44 insertions(+), 54 deletions(-) commit 2e7cbbbcf9a0c3492a919bf25921437c9e1342db Author: Alex Deucher Date: Mon Feb 26 13:34:13 2018 -0500 drm/amdgpu/powerplay/smu7: use proper dep table for mclk For mclk od, use the vdd dependency on mclk table. Looks like a cut and paste typo. Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 585b7f161c85bd5ca675b97580faf21c506541e3 Author: Tom St Denis Date: Mon Feb 26 09:09:26 2018 -0500 drm/amd/amdgpu: Correct VRAM width for APUs with GMC9 DDR4 has a 64-bit width not 128-bits. It was reporting twice the width. Tested with my Ryzen 2400G. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 45a9d154f61519b64c95bf27ef341e0b50931998 Author: Christian König Date: Thu Feb 22 08:54:57 2018 +0100 drm/ttm: cleanup ttm_tt_create Cleanup ttm_tt_create a bit. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Reviewed-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_tt.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit 97b7e1b8b55d5696093b4ebddb9dad63813bdcf2 Author: Christian König Date: Thu Feb 22 08:54:57 2018 +0100 drm/ttm: move ttm_tt_create into ttm_tt.c v2 Rename ttm_bo_add_ttm to ttm_tt_create and move it into ttm_tt.c. v2: separate the cleanup. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Reviewed-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 50 ++--------------------------------------- drivers/gpu/drm/ttm/ttm_tt.c | 46 +++++++++++++++++++++++++++++++++++++ include/drm/ttm/ttm_bo_driver.h | 11 +++++++++ 3 files changed, 59 insertions(+), 48 deletions(-) commit ec3fe391bdb321b1629cfb0ddbb9fcc114b579bc Author: Roger He Date: Mon Feb 5 17:57:07 2018 +0800 drm/ttm: check if free mem space is under the lower limit the free mem space and the lower limit both include two parts: system memory and swap space. For the OOM triggered by TTM, that is the case as below: first swap space is full of swapped out pages and soon system memory also is filled up with ttm pages. and then any memory allocation request will run into OOM. to cover two cases: a. if no swap disk at all or free swap space is under swap mem limit but available system mem is bigger than sys mem limit, allow TTM allocation; b. if the available system mem is less than sys mem limit but free swap space is bigger than swap mem limit, allow TTM allocation. v2: merge two memory limit(swap and system) into one v3: keep original behavior except ttm_opt_ctx->flags with TTM_OPT_FLAG_FORCE_ALLOC v4: always set force_alloc as tx->flags & TTM_OPT_FLAG_FORCE_ALLOC v5: add an attribute for lower_mem_limit v6: set lower_mem_limit as 0 to keep original behavior Signed-off-by: Roger He Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_memory.c | 93 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/ttm/ttm_page_alloc.c | 3 ++ drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 3 ++ include/drm/ttm/ttm_memory.h | 5 ++ 4 files changed, 104 insertions(+) commit 724daa4fd65d927e406f2cc0661c9a329876267b Author: Christian König Date: Thu Feb 22 15:52:31 2018 +0100 drm/ttm: drop persistent_swap_storage from ttm_bo_init and co Never used as parameter, the only driver actually using this is nouveau and there it is initialized after the BO is initialized. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- drivers/gpu/drm/ast/ast_ttm.c | 2 +- drivers/gpu/drm/bochs/bochs_mm.c | 2 +- drivers/gpu/drm/cirrus/cirrus_ttm.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 2 +- drivers/gpu/drm/mgag200/mgag200_ttm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +- drivers/gpu/drm/qxl/qxl_object.c | 2 +- drivers/gpu/drm/radeon/radeon_object.c | 4 ++-- drivers/gpu/drm/ttm/ttm_bo.c | 9 ++------- drivers/gpu/drm/virtio/virtgpu_object.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_mob.c | 5 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 4 ++-- drivers/staging/vboxvideo/vbox_ttm.c | 2 +- include/drm/ttm/ttm_bo_api.h | 16 +--------------- 16 files changed, 21 insertions(+), 41 deletions(-) commit 231cdafc75434015f3925d6662a1821fcfef16b7 Author: Christian König Date: Wed Feb 21 20:34:13 2018 +0100 drm/ttm: drop ttm->dummy_read_page Only used by the AGP backend and there it can be easily accessed using ttm->bdev->glob. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 ++--- drivers/gpu/drm/ast/ast_ttm.c | 5 ++--- drivers/gpu/drm/bochs/bochs_mm.c | 5 ++--- drivers/gpu/drm/cirrus/cirrus_ttm.c | 5 ++--- drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 5 ++--- drivers/gpu/drm/mgag200/mgag200_ttm.c | 5 ++--- drivers/gpu/drm/nouveau/nouveau_bo.c | 6 +++--- drivers/gpu/drm/nouveau/nouveau_sgdma.c | 5 ++--- drivers/gpu/drm/nouveau/nouveau_ttm.h | 3 +-- drivers/gpu/drm/qxl/qxl_ttm.c | 6 ++---- drivers/gpu/drm/radeon/radeon_ttm.c | 7 +++---- drivers/gpu/drm/ttm/ttm_agp_backend.c | 8 ++++---- drivers/gpu/drm/ttm/ttm_bo.c | 6 ++---- drivers/gpu/drm/ttm/ttm_tt.c | 8 ++------ drivers/gpu/drm/virtio/virtgpu_ttm.c | 6 ++---- drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | 9 +++------ drivers/staging/vboxvideo/vbox_ttm.c | 5 ++--- include/drm/ttm/ttm_bo_driver.h | 17 ++++------------- 18 files changed, 42 insertions(+), 74 deletions(-) commit 3231a7696e22538529e9ee3500f2116a40a22734 Author: Christian König Date: Wed Feb 21 19:02:06 2018 +0100 drm/ttm: drop ttm->glob The pointer is available as ttm->bdev->glob as well. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 +++--- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 11 ++++++----- drivers/gpu/drm/ttm/ttm_tt.c | 2 -- include/drm/ttm/ttm_bo_driver.h | 1 - 4 files changed, 9 insertions(+), 11 deletions(-) commit 38392633627c60ca8a1e90106055c85b5215a494 Author: Christian König Date: Wed Feb 21 17:26:45 2018 +0100 drm/ttm: drop bo->glob The pointer is available as bo->bdev->glob as well. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/qxl/qxl_release.c | 2 +- drivers/gpu/drm/ttm/ttm_bo.c | 23 ++++++++++++----------- drivers/gpu/drm/ttm/ttm_bo_util.c | 2 +- drivers/gpu/drm/ttm/ttm_execbuf_util.c | 6 +++--- include/drm/ttm/ttm_bo_api.h | 3 ++- include/drm/ttm/ttm_bo_driver.h | 4 ++-- 6 files changed, 21 insertions(+), 19 deletions(-) commit 886a16b3582d256c7bc93cdb773678c26632b987 Author: Christian König Date: Thu Feb 22 14:53:42 2018 +0100 staging: vboxvideo: remove ttm_pool_* wrappers TTM calls the default implementation now. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Signed-off-by: Alex Deucher drivers/staging/vboxvideo/vbox_ttm.c | 13 ------------- 1 file changed, 13 deletions(-) commit 95bbb6d35d0b182968d7ce803a0cdc27e6e5fcb5 Author: Christian König Date: Thu Feb 22 12:12:41 2018 +0100 drm/bochs: remove the default ttm_tt_populate callbacks TTM calls the default implementation now. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/bochs/bochs_mm.c | 2 -- 1 file changed, 2 deletions(-) commit e55b33f8ab0d04172206d7b409321226c2ef0001 Author: Christian König Date: Thu Feb 22 12:11:25 2018 +0100 drm/cirrus: remove ttm_pool_* wrappers TTM calls the default implementation now. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/cirrus/cirrus_ttm.c | 13 ------------- 1 file changed, 13 deletions(-) commit 2a7b464f846aa49ab7f585d0ff2257d269fc2147 Author: Christian König Date: Thu Feb 22 12:06:59 2018 +0100 drm/qxl: remove ttm_pool_* wrappers TTM calls the default implementation now. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/qxl/qxl_ttm.c | 22 ---------------------- 1 file changed, 22 deletions(-) commit a29f0ca0c9313e4efde2c0af0bac1109b7f498a9 Author: Christian König Date: Thu Feb 22 12:05:09 2018 +0100 drm/ast: remove ttm_pool_* wrappers TTM calls the default implementation now. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/ast/ast_ttm.c | 13 ------------- 1 file changed, 13 deletions(-) commit 401fedc21890f4e6e1fb82a3ffd7280736872920 Author: Christian König Date: Thu Feb 22 12:03:58 2018 +0100 drm/hisilicon: remove ttm_pool_* wrappers TTM calls the default implementation now. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 13 ------------- 1 file changed, 13 deletions(-) commit b31925a83f0aa172562a35b6161501559b1367aa Author: Christian König Date: Thu Feb 22 12:02:36 2018 +0100 drm/mgag200: remove ttm_pool_* wrappers TTM calls the default implementation now. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/mgag200/mgag200_ttm.c | 13 ------------- 1 file changed, 13 deletions(-) commit b3afc7989fd814704ee09a8cf99998f9d790b1c0 Author: Christian König Date: Thu Feb 22 12:01:38 2018 +0100 drm/virtio: remove ttm_pool_* wrappers TTM calls the default implementation now. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/virtio/virtgpu_ttm.c | 16 ---------------- 1 file changed, 16 deletions(-) commit e44fcf71f4092121f24b0d1b0c613a4e9c1e84e6 Author: Christian König Date: Thu Feb 22 12:00:05 2018 +0100 drm/ttm: add default implementations for ttm_tt_(un)populate Use ttm_pool_populate/ttm_pool_unpopulate if the driver doesn't provide a function. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_tt.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit cd277585d69394507137b513b51f40d2590abda4 Author: Rex Zhu Date: Thu Feb 22 20:46:49 2018 +0800 drm/amd/pp: Move common dpm check functions to hardwaremanager.c Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 9 --------- drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 10 ++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 10 ---------- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 10 ---------- 4 files changed, 10 insertions(+), 29 deletions(-) commit e21148ecbac33b854156a2741d35c33892c2ac34 Author: Rex Zhu Date: Fri Feb 23 13:13:13 2018 +0800 drm/amd/pp: Cleaning up vega10_enable_dpm_tasks function 1. move display num initialize out of dpm enable tasks. 2. do not set/restore smc telemetry if dpm is runing. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit af264d0245271822bb56145c4633a50fd730d0ab Author: Rex Zhu Date: Thu Feb 22 20:27:07 2018 +0800 drm/amd/pp: Refine code in powerplay for Cz/Vega10 Add dpm check functions on CZ/Vega10 to smu backend function table. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 27 ++-------------------- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.h | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 15 ++---------- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 24 +++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.h | 2 ++ .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 13 +++++++++++ 6 files changed, 43 insertions(+), 39 deletions(-) commit d246cd53fd6a6bffc9e4dcf045d8031f445353fb Author: Rex Zhu Date: Thu Feb 22 17:20:53 2018 +0800 drm/amd/pp: Remove dead error checking code on Vega10 when smu failed, print out the error info immediately for debug. smum_send_msg_to_smu always return true, so no need to check return value. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 122 ++++++--------------- .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 22 ++-- .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 10 +- .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 55 ++++------ 4 files changed, 67 insertions(+), 142 deletions(-) commit baeb7721b1a60ab86164ed746db522591c4540cb Author: Rex Zhu Date: Thu Feb 22 16:50:57 2018 +0800 drm/amd/pp: Add debug info when smu failed on Vega10 When smu msssage failed, print out return value in dmesg. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit bd58c48c1045728f80e6322636662aee99ab5fcd Author: Rex Zhu Date: Thu Feb 22 16:33:05 2018 +0800 drm/amd/pp: Remove duplicated vega10_is_smc_ram_running calls Avoid conflicts in reading the same register mmPCIE_INDEX2 with other clients Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 103a4b1d48cccb161796eda79a3547ce6616d260 Author: Corentin Labbe Date: Thu Feb 22 08:21:49 2018 +0000 drm/amd: Remove inclusion of non-existing include directories This patch fix the following build warnings: CC [M] drivers/gpu/drm/amd/amdgpu/amdgpu_drv.o cc1: warning: ../display/: No such file or directory [-Wmissing-include-dirs] cc1: warning: ../display/include: No such file or directory [-Wmissing-include-dirs] CC [M] drivers/gpu/drm/amd/amdgpu/amdgpu_device.o cc1: warning: ../display/: No such file or directory [-Wmissing-include-dirs] cc1: warning: ../display/include: No such file or directory [-Wmissing-include-dirs] [...] This warning is shown for each file in amdgpu directory, so it spams a lot. Acked-by: Christian König Signed-off-by: Corentin Labbe Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/Makefile | 2 -- 1 file changed, 2 deletions(-) commit fbb31562186e26ba2d930141286332ef94104cd2 Author: Corentin Labbe Date: Thu Feb 22 08:21:48 2018 +0000 drm/amd: remove inclusion of non-existing scheduler directory The scheduler directory was removed via commit 1b1f42d8fde4 ("drm: move amd_gpu_scheduler into common location") Remove it from include path. Reviewed-by: Christian König Signed-off-by: Corentin Labbe Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 1 - 1 file changed, 1 deletion(-) commit bcb0b981c5571744ac446a6c906aa05a28d21446 Author: Ben Crocker Date: Thu Feb 22 17:52:19 2018 -0500 drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE In radeon_device_init, set the need_dma32 flag for Cedar chips (e.g. FirePro 2270). This fixes, or at least works around, a bug on PowerPC exposed by last year's commits 8e3f1b1d8255105f31556aacf8aeb6071b00d469 (Russell Currey) and 253fd51e2f533552ae35a0c661705da6c4842c1b (Alistair Popple) which enabled the 64-bit DMA iommu bypass. This caused the device to freeze, in some cases unrecoverably, and is the subject of several bug reports internal to Red Hat. Signed-off-by: Ben Crocker Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit 421334a8476fe53b147139e1221cf7b368dd7c6e Author: Thierry Reding Date: Tue Feb 20 11:44:50 2018 +0100 drm/amdgpu: Remove duplicate setting of ->need_swiotlb There's no need to set this before the number of DMA bits has been properly determined. Signed-off-by: Thierry Reding Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 1 - 1 file changed, 1 deletion(-) commit 3214e02199f0c1c5db6de2fa3eb8240e08f4e17d Author: Rex Zhu Date: Thu Feb 22 17:45:11 2018 +0800 drm/amd/pp: Add a pp feature mask bit for AutoWattman feature Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + 1 file changed, 1 insertion(+) commit 3d2fc0813f91a908f5c61ac0d08d89f802030d03 Author: Rex Zhu Date: Thu Feb 22 17:39:22 2018 +0800 drm/amdgpu: Change default value of module parameter amdgpu_pp_feature_mask Currently all pp features are enabled by default except OVERDRIVE Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 472c89fcd5c2505c7d5d785ea3a78b2e71ff8723 Author: Eric Huang Date: Thu Feb 22 12:00:35 2018 -0500 drm/amd/powerplay: fix thermal interrupts on vega10 a bug in programming thermal interrupt register masks out interrupts and driver cannot receive interrupts. Setting 0 to mask bits will fix it. Signed-off-by: Eric Huang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit eda9a4eb15e89e4d452ae8dbdc7fd6868c79c605 Author: Rex Zhu Date: Thu Feb 8 15:57:10 2018 +0800 drm/amdgpu: Add query vram width in CGS query system info powerplay need vram width to set default mclk optimization settings(uphyst/downhyst/activity threshold) Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 +++ drivers/gpu/drm/amd/include/cgs_common.h | 1 + 2 files changed, 4 insertions(+) commit 92e71b0676447fff40c1e747b2585a9d11c5fca2 Author: Christian König Date: Thu Feb 22 08:35:11 2018 +0100 drm/amdgpu: use the TTM dummy page instead of allocating one We have a global dummy page in TTM, use that one instead of allocating a new one. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 10 +--------- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 29 +++++++++++++---------------- drivers/gpu/drm/amd/amdgpu/cik_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/cz_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 2 +- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 2 +- 13 files changed, 30 insertions(+), 41 deletions(-) commit a02497b73218f10f237d98fb10d34d0baed607a0 Author: Rex Zhu Date: Fri Feb 9 16:47:53 2018 +0800 drm/amd/pp: Fix bug that dpm level was not really locked Lock the dpm levels when we use SW method to modify the dpm tables directly to avoid a possible race with the smu. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 952e5daa2565fc842d90192d2254f3bc1a88920c Author: Rex Zhu Date: Sun Feb 11 12:38:58 2018 +0800 drm/amd/pp: Fix error handling when smu return failed on Vega10. Clamp the clock index to a valid range when reading it back Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) commit 40d5250dbb468ecf1d4a1aa5f5597358e33de95c Author: Roger He Date: Tue Feb 6 15:00:06 2018 +0800 drm/ttm: set TTM_OPT_FLAG_FORCE_ALLOC in ttm_bo_force_list_clean Because ttm_bo_force_list_clean() is only called on two occasions: 1. By ttm_bo_evict_mm() during suspend. 2. By ttm_bo_clean_mm() when the driver unloads. On both cases we absolutely don't want any memory allocation failure. Signed-off-by: Roger He Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit aa7662b67bf6f56cd0d678da6732e26f1b4bf0ed Author: Roger He Date: Wed Jan 17 15:07:23 2018 +0800 drm/ttm: add bit flag TTM_OPT_FLAG_FORCE_ALLOC set TTM_OPT_FLAG_FORCE_ALLOC when we are servicing for page fault routine. for ttm_mem_global_reserve if in page fault routine, allow the gtt pages reservation always. because page fault routing already grabbed system memory and the allowance of this exception is harmless. Otherwise, it will trigger OOM killer. will be used later. v2: set the FORCE_ALLOC always v3: minor refine Signed-off-by: Roger He Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo_vm.c | 4 +++- include/drm/ttm/ttm_bo_api.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit d330fca11500bebaf7f25b60b7b087bbe8ad0b7f Author: Roger He Date: Tue Feb 6 11:22:57 2018 +0800 drm/ttm: use bit flag to replace allow_reserved_eviction in ttm_operation_ctx for saving memory and more bit flag can be used in future Signed-off-by: Roger He Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- drivers/gpu/drm/ttm/ttm_bo.c | 3 ++- include/drm/ttm/ttm_bo_api.h | 7 +++++-- 4 files changed, 11 insertions(+), 7 deletions(-) commit c02216acf4177c4411d33735c81cad687790fa59 Author: Arnd Bergmann Date: Fri Feb 16 16:26:57 2018 +0100 radeon: hide pointless #warning when compile testing In randconfig testing, we sometimes get this warning: drivers/gpu/drm/radeon/radeon_object.c: In function 'radeon_bo_create': drivers/gpu/drm/radeon/radeon_object.c:242:2: error: #warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance thanks to write-combining [-Werror=cpp] #warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance \ This is rather annoying since almost all other code produces no build-time output unless we have found a real bug. We already fixed this in the amdgpu driver in commit 31bb90f1cd08 ("drm/amdgpu: shut up #warning for compile testing") by adding a CONFIG_COMPILE_TEST check last year and agreed to do the same here, but both Michel and I then forgot about it until I came across the issue again now. For stable kernels, as this is one of very few remaining randconfig warnings in 4.14. Cc: stable@vger.kernel.org Link: https://patchwork.kernel.org/patch/9550009/ Signed-off-by: Arnd Bergmann Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ec92937056db2ca3acb11929d68b95b6ab421653 Author: Christian König Date: Thu Feb 1 14:52:50 2018 +0100 drm/ttm: set page mapping during allocation To aid debugging set the page mapping during allocation instead of during VM faults. Signed-off-by: Christian König Reviewed-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo_vm.c | 1 - drivers/gpu/drm/ttm/ttm_tt.c | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) commit 3808b51911fe1a2bf8d6f4f2836d4c51aa29a6fd Merge: 08009a7 93a6a37 Author: David S. Miller Date: Mon Feb 26 20:58:25 2018 -0500 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2018-02-26 This series contains updates to ixgbe and ixgbevf only. Colin Ian King cleans up redundant variable assignments. Tonghao Zhang updates ixgbe to avoid writing to the hardware when the redirection table has not changed. Jake fixes the driver logic for checking and clearing receive timestamp hangs so that when the PTP_RX_TIMESTAMP_IN_REGISTER flag is set, we no longer need to check for receive timestamp hangs, which in turn will stop the spurious log messages. Emil updates ixgbevf with several features and improvements done in other drivers, starting with the handling of page addresses so that we always refer to them using a void pointer. Added a 'legacy-rx' flag to allow switching between the old and new receive code paths. Added support for using 3K buggers in order 1 page. Updated the driver to ensure that calls to ixgbevf_open() are rtnl lock protected and improved the error handling when setting up multiple queues. Added support for providing a buffer with head room and tail room to allow for shared info, NET_SKB_PAD, and NET_IP_ALIGN, so that we can start using build_skb to build frames instead of using memcpy() the headers. Updated the logic of handling rings closer to ixgbe. Consolidated the receive paths to reduce duplication when we expand them in the future. Added build_skb() support to ixgbevf. ==================== Signed-off-by: David S. Miller commit 80f8ce589517c478abdae07a758b37b362886cb2 Author: Jianguo Sun Date: Wed Jan 24 19:48:27 2018 +0800 clk: hi3798cv200: add COMBPHY0 clock support The clock COMBPHY1 has already been supported by hi3798cv200 driver, but COMBPHY0 is missing. It adds COMBPHY0 clock support. Since the mux table is being shared by COMBPHY0 and COMBPHY1, it renames comphy1_mux_p and comphy1_mux_table a bit to drop instance number '1' from there. Signed-off-by: Jianguo Sun Signed-off-by: Shawn Guo drivers/clk/hisilicon/crg-hi3798cv200.c | 15 +++++++++++---- include/dt-bindings/clock/histb-clock.h | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) commit a44d1f531a39da8cd6497372e713f5998b2d67af Author: Shawn Guo Date: Wed Jan 24 19:48:26 2018 +0800 clk: hi3798cv200: fix define indentation It's a coding-style fix, which corrects the indentation for all those clock definitions, so that the code looks nicer and new definitions can be added with a recommended indentation. Signed-off-by: Shawn Guo drivers/clk/hisilicon/crg-hi3798cv200.c | 48 ++++++++++++++--------------- include/dt-bindings/clock/histb-clock.h | 54 ++++++++++++++++----------------- 2 files changed, 51 insertions(+), 51 deletions(-) commit 50fd588ae4a6808d9ecd09c3ffe587e306bfa6a9 Author: Shawn Guo Date: Wed Jan 24 19:48:25 2018 +0800 clk: hi3798cv200: add support for HISTB_USB2_OTG_UTMI_CLK The clock HISTB_USB2_OTG_UTMI_CLK is defined by device tree bindings in include/dt-bindings/clock/histb-clock.h, but hasn't been supported by hi3798cv200 clock driver. Let's add the support for it. Signed-off-by: Shawn Guo drivers/clk/hisilicon/crg-hi3798cv200.c | 2 ++ 1 file changed, 2 insertions(+) commit 47629f676518f1808dc98c5740a31d8d23c940c7 Author: Younian Wang Date: Wed Jan 24 19:48:24 2018 +0800 clk: hi3798cv200: correct IR clock parent The IR clock is sourced from '24m' rather than '100m'. Correct it. Signed-off-by: Younian Wang Signed-off-by: Shawn Guo drivers/clk/hisilicon/crg-hi3798cv200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 055d56891ea7a6bb39444db58ea30eafa5a1cb40 Author: Shawn Guo Date: Wed Jan 24 19:48:23 2018 +0800 clk: hi3798cv200: fix unregister call sequence in error path The unregister call sequence in error path of function hi3798cv200_clk_register() should be opposite to the order of register calls. Let's reverse the call sequence to fix the problem. Signed-off-by: Shawn Guo drivers/clk/hisilicon/crg-hi3798cv200.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit bb9d91a4e5c87cabfa2c9d35761374aa11150c2d Author: Stefan Wahren Date: Sun Feb 25 16:38:09 2018 +0100 ARM: multi_v7_defconfig: Enable thermal driver for RPi 2/3 This turns on the CONFIG_BCM2835_THERMAL as module for Raspberry Pi 2 and 3. Signed-off-by: Stefan Wahren Signed-off-by: Eric Anholt arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 4e46a8583b508e9dc105f1efbd03b67918291939 Author: Stefan Wahren Date: Sun Feb 25 15:10:55 2018 +0100 ARM: bcm2385_defconfig: Enable BT support for BCM43438 The Raspberry Pi Zero W has an onboard BT chip (BCM43438). So enable the necessary HCI UART driver (requires serial device bus). Signed-off-by: Stefan Wahren Signed-off-by: Eric Anholt arch/arm/configs/bcm2835_defconfig | 4 ++++ 1 file changed, 4 insertions(+) commit bcc76c4014dce4e3834dbd5b7f6593cbcfbfebe0 Author: Stefan Wahren Date: Sat Feb 24 14:47:08 2018 +0100 ARM: dts: bcm2835-rpi-zero-w: Enable OTG mode Since commit 9273083a1530 ("usb: dwc2: Fix TxFIFOn sizes and total TxFIFO size issues") we could use the OTG mode again. Signed-off-by: Stefan Wahren Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa181326b9a08e34b5c5d4bc79836168d9d4b003 Author: Stefan Wahren Date: Sun Feb 25 15:10:54 2018 +0100 ARM: dts: bcm2835-rpi-zero-w: Add bcm43438 serial slave Add BCM43438 (bluetooth) as a serdev slave device of uart0 (pl011/ttyAMA0). This allows to automatically insert the bcm43438 to the bluetooth subsystem instead of relying on patched userspace helpers (hciattach). In order to keep a debug UART we need to switch to uart1. Signed-off-by: Stefan Wahren Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit a166ae400d703acb3a456e2974cc1ca4ad003487 Author: Stefan Wahren Date: Sun Feb 25 15:10:53 2018 +0100 ARM: dts: bcm283x: Apply pull settings to Zero W relevant groups Instead of keeping the firmware's pull settings, we better apply them via the devicetree pin control. Start with the RPi Zero W relevant first to keep the effort low. Signed-off-by: Stefan Wahren Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm283x.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 2572f5b4245abf2b4e5a86cabf65a50efda09aac Author: Arnd Bergmann Date: Fri Feb 23 22:12:09 2018 +0100 selinux: fix typo in selinux_netlbl_sctp_sk_clone declaration A missing 'struct' keyword caused a build error when CONFIG_NETLABEL is disabled: In file included from security/selinux/hooks.c:99: security/selinux/include/netlabel.h:135:66: error: unknown type name 'sock' static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk, sock *newsk) ^~~~ security/selinux/hooks.c: In function 'selinux_sctp_sk_clone': security/selinux/hooks.c:5188:2: error: implicit declaration of function 'selinux_netlbl_sctp_sk_clone'; did you mean 'selinux_netlbl_inet_csk_clone'? [-Werror=implicit-function-declaration] Fixes: db97c9f9d312 ("selinux: Add SCTP support") Signed-off-by: Arnd Bergmann Signed-off-by: Paul Moore security/selinux/include/netlabel.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d452930fd3b9031e59abfeddb2fa383f1403d61a Author: Richard Haines Date: Tue Feb 13 20:57:18 2018 +0000 selinux: Add SCTP support The SELinux SCTP implementation is explained in: Documentation/security/SELinux-sctp.rst Signed-off-by: Richard Haines Signed-off-by: Paul Moore Documentation/security/SELinux-sctp.rst | 157 ++++++++++++++++++ security/selinux/hooks.c | 280 +++++++++++++++++++++++++++++--- security/selinux/include/classmap.h | 2 +- security/selinux/include/netlabel.h | 21 ++- security/selinux/include/objsec.h | 4 + security/selinux/netlabel.c | 133 +++++++++++++-- 6 files changed, 565 insertions(+), 32 deletions(-) commit 2277c7cd75e39783eeb7512a6c35f8b4abbe1039 Author: Richard Haines Date: Tue Feb 13 20:56:24 2018 +0000 sctp: Add LSM hooks Add security hooks allowing security modules to exercise access control over SCTP. Signed-off-by: Richard Haines Signed-off-by: Paul Moore include/net/sctp/structs.h | 10 ++++++++ include/uapi/linux/sctp.h | 1 + net/sctp/sm_make_chunk.c | 12 +++++++++ net/sctp/sm_statefuns.c | 18 ++++++++++++++ net/sctp/socket.c | 62 +++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 102 insertions(+), 1 deletion(-) commit b7e10c25b839c0c7579b2b402afc9883c107e09f Author: Richard Haines Date: Sat Feb 24 16:18:51 2018 +0000 sctp: Add ip option support Add ip option support to allow LSM security modules to utilise CIPSO/IPv4 and CALIPSO/IPv6 services. Signed-off-by: Richard Haines Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner Signed-off-by: Paul Moore include/net/sctp/sctp.h | 4 +++- include/net/sctp/structs.h | 2 ++ net/sctp/chunk.c | 10 +++++++--- net/sctp/ipv6.c | 45 ++++++++++++++++++++++++++++++++++++++------- net/sctp/output.c | 34 +++++++++++++++++++++------------- net/sctp/protocol.c | 43 +++++++++++++++++++++++++++++++++++++++++++ net/sctp/socket.c | 11 ++++++++--- 7 files changed, 122 insertions(+), 27 deletions(-) commit da997b22c40473b7db60bde6ea188d35565d10c8 Author: Tony Lindgren Date: Thu Feb 8 08:30:10 2018 -0800 PM / wakeirq: Add wakeup name to dedicated wake irqs This makes it easy to grep :wakeup /proc/interrupts. Suggested-by: Jeffy Chen Signed-off-by: Tony Lindgren Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/base/power/power.h | 1 + drivers/base/power/wakeirq.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) commit a885f0fe209f262efa2c1cac9278a5774e5f7a80 Author: Tony Lindgren Date: Thu Feb 22 14:03:48 2018 -0800 bus: ti-sysc: Handle some devices in omap_device compatible way Now that ti-sysc can manage child devices, we must also be backwards compatible with the current omap_device code. With omap_device, we assume that the child device manages the interconnect target module directly. The drivers needing special handling are the ones that still set pm_runtime_irq_safe(). In the long run we want to update those drivers as otherwise they will cause problems with genpd as a permanent PM runtime usage count is set on the parent device. We can handle omap_device these devices by improving the ti-sysc quirk handling to detect the devices needing special handling based on register map and revision register if usable. We also need to implement dev_pm_domain for these child devices just like omap_device does. Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 226 +++++++++++++++++++++++++++++++++- include/linux/platform_data/ti-sysc.h | 1 + 2 files changed, 224 insertions(+), 3 deletions(-) commit ef70b0bdeaf893dd6d9c3a8d05d9b65d395506c0 Author: Tony Lindgren Date: Thu Feb 22 14:00:25 2018 -0800 bus: ti-sysc: Add support for platform data callbacks We want to pass the device tree configuration for interconnect target modules from ti-sysc driver to the existing platform hwmod code. This allows us to first validate the dts data against the existing platform data before we start dropping the platform data in favor of device tree data. To do this, let's add platform data callbacks for PM runtime functions to call for the interconnect target modules if platform data is available. Note that as ti-sysc driver can rebind, omap_auxdata_lookup and related functions can no longer be __init. Signed-off-by: Tony Lindgren arch/arm/mach-omap2/board-n8x0.c | 4 +- arch/arm/mach-omap2/pdata-quirks.c | 40 ++++++++++++++- drivers/bus/ti-sysc.c | 96 ++++++++++++++++++++++++++++++----- include/linux/platform_data/ti-sysc.h | 49 ++++++++++++++++++ 4 files changed, 172 insertions(+), 17 deletions(-) commit dd57ac1e5c1c6dac90564c69e57d5ba4a132969e Author: Tony Lindgren Date: Thu Feb 22 14:09:57 2018 -0800 bus: ti-sysc: Remove unnecessary debugging statements We already show the status for the interconnect target module when debugging is enabled, there's no need to be more verbose about that. So let's just cut down the noise and remove the extra debug statements. Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 76f0f772e4691dd59ef93a6c2c583a0435357ca0 Author: Tony Lindgren Date: Fri Feb 23 08:28:45 2018 -0800 bus: ti-sysc: Improve handling for no-reset-on-init and no-idle-on-init At least earlycon needs a delayed idle before the 8250 driver probes to avoid glitches in the console output. Let's handle the delayed idle for devices tagged with ti,no-reset-on-init and ti,no-idle-on-init with delayed_work. Others don't need it, and there should be no need to use runtime PM autosuspend for the interconnect target driver as it's the child device drivers that should configure it. Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit 3bb37c8e6e6a6191233c97f294cecba10bb5fc50 Author: Tony Lindgren Date: Thu Feb 22 14:05:14 2018 -0800 bus: ti-sysc: Handle stdout-path for debug console If we have stdout-path specified for earlycon, we must prevent the debug console from idling until runtime PM kicks in. Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 62020f231232215df73ca54669e38fe3f1d1b29a Author: Tony Lindgren Date: Thu Feb 22 13:59:44 2018 -0800 bus: ti-sysc: Add suspend and resume handling This allows us to idle the module on suspend after the children are suspended. Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 2c355ff6b6ca6e0153cc6845aa004b9f5212d81e Author: Tony Lindgren Date: Thu Feb 22 13:58:03 2018 -0800 bus: ti-sysc: Add fck clock alias for children with notifier_block The functional clock is used by several child device drivers to query the rate for the child device internal configuration. The functional clock is really for the whole interconnect target module, and not just for the child device, and can also be shared across multiple children. At least the timers, i2c and mmc driver query the fck for rate. So let's just create a clock alias for the child fck if it does not yet exits. We can do this with the BUS_NOTIFY_ADD_DEVICE before the child is probed. Note that we need to now also remove the legacy mode check for getting the dts clocks in ti-sysc driver. Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 87 insertions(+), 4 deletions(-) commit c5b240916485c1350c94b6583701d7e6680fff13 Author: Andy Shevchenko Date: Mon Jan 22 14:56:21 2018 +0200 ipmi: Re-use existing macros for built-in properties Replace home grown set_prop_entry() macro by generic PROPERTY_ENTRY_INTEGER()-like ones. Cc: Corey Minyard Signed-off-by: Andy Shevchenko Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_dmi.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 5dd3691c9828abd2e479cc9339d964d76e318c3b Author: Dan Carpenter Date: Wed Feb 21 15:53:53 2018 +0300 i40e: remove some stray indenting These two lines are indented too far. Signed-off-by: Dan Carpenter Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit deb9a9ad3ec100fa7169d0ddfbd24b1520bf26a3 Author: Colin Ian King Date: Mon Feb 19 10:23:30 2018 +0000 i40evf: remove redundant array comparisons to 0 checks The checks to see if key->dst.s6_addr and key->src.s6_addr are null pointers are redundant because these are constant size arrays and so the checks always return true. Fix this by removing the redundant checks. Also replace filter->f with vf, allowing wide lines to be condensed and to rejoin some split wide lines. Detected by CoverityScan, CID#1465279 ("Array compared to 0") Signed-off-by: Colin Ian King Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 61 ++++++++++--------------- 1 file changed, 25 insertions(+), 36 deletions(-) commit 46345b38e917bd2f27b3730adaa67e4160e1d94d Author: Colin Ian King Date: Thu Feb 15 19:50:52 2018 +0000 i40e: check that pointer VSI is not null before dereferencing it Function i40e_find_vsi_from_id can potentially return null, hence VSI may be null, so defensively check it is non-null before dereferencing it to check the seid. Fixes: e284fc280473 ("i40e: Add and delete cloud filter") Signed-off-by: Colin Ian King Acked-by: Avinash Dayanand Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e85c1b8234e65134ccf801938f98352a43263a9f Author: Colin Ian King Date: Thu Feb 15 19:26:05 2018 +0000 i40evf: pass struct virtchnl_filter by reference rather than by value Passing struct virtchnl_filter f by value requires a 272 byte copy on x86_64, so instead pass it by reference is much more efficient. Also adjust some lines that are over 80 chars. Detected by CoverityScan, CID#1465285 ("Big parameter passed by value") Signed-off-by: Colin Ian King Acked-by: Harshitha Ramamurthy Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher .../net/ethernet/intel/i40evf/i40evf_virtchnl.c | 32 ++++++++++++---------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 04d4105174349dceccf9545a3e5e421c18f2cc56 Author: Alan Brady Date: Mon Feb 12 09:16:59 2018 -0500 i40e/i40evf: use SW variables for hang detection The i40e_detect_recover_hung function uses the i40e_get_tx_pending function to determine if there are packets stalled on the ring. i40e_get_tx_pending calculates the pending packets using the head writeback value and HW tail. If the queue is stopped and we lose the interrupt to update our next_to_clean then we a) won't get another interrupt to clean because queue is stopped b) we won't catch the problem with i40e_detect_recover_hung because the HW values look like there's no packets waiting to be transmitted. Using the SW values we can catch the issue because next_to_clean will be out of sync with head writeback. This has the added benefit being less CPU intensive because we don't need to reach into the hardware to get the values. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 16 +++++++++++----- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 2 +- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) commit 8cd5fe62cc5a2aca1c698c28baa46ac6931ba11f Author: Paweł Jabłoński Date: Mon Feb 5 13:03:36 2018 -0800 i40evf: Fix double locking the same resource Removes the locking of adapter->mac_vlan_list_lock resource in i40evf_add_filter(). The locking part is moved above i40evf_add_filter(). i40evf_add_filter(), called by i40evf_addr_sync(), was trying to lock the resource again and double locking generated a kernel panic after bringing an interface up. Fixes: 8946b56354b7 ("i40evf: use __dev_[um]c_sync routines in .set_rx_mode") Signed-off-by: Paweł Jabłoński Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 41b1d4de96323e84c0a902e7e4b2c0f367e77f92 Author: George Cherian Date: Thu Jan 18 05:39:22 2018 +0000 i2c: xlp9xx: Handle transactions with I2C_M_RECV_LEN properly In case of transaction with I2C_M_RECV_LEN set, make sure the driver reads the first byte and then updates the RX fifo with the expected length. Set threshold to 1 byte so that driver gets an interrupt on receiving the first byte. After which the transfer length is updated depending on the received length. Also report SMBus block read functionality. Signed-off-by: George Cherian Tested-by: dann frazier Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xlp9xx.c | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) commit c2a3b3cce8df1cafeda2ab03563d7e703c51a4ac Author: Dmitry Bazhenov Date: Thu Jan 18 05:39:21 2018 +0000 i2c: xlp9xx: return ENXIO on slave address NACK Fix the driver violation of the common practice to return ENXIO error on a slave address NACK. Signed-off-by: Dmitry Bazhenov Signed-off-by: George Cherian Tested-by: dann frazier Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xlp9xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 08009a760213cf6125af9453a51203f4ae108ba1 Author: Alexey Dobriyan Date: Sat Feb 24 21:20:33 2018 +0300 net: make kmem caches as __ro_after_init All kmem caches aren't reallocated once set up. Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller net/core/net_namespace.c | 2 +- net/core/skbuff.c | 4 ++-- net/ipv4/fib_trie.c | 5 +++-- net/ipv4/inetpeer.c | 3 ++- net/ipv4/ipmr.c | 3 ++- net/socket.c | 2 +- 6 files changed, 11 insertions(+), 8 deletions(-) commit d0adf769df210248f60d33e62b1d4d14df271c02 Author: Ulrich Hecht Date: Mon Jan 29 16:45:47 2018 +0100 dt-bindings: i2c: document R8A77995 bindings R-Car D3 (R8A77995) SoC has a R-Car Gen3-compatible I2C controller. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 1 + 1 file changed, 1 insertion(+) commit b84acf44d5b86597cebcb6aca16e7dd9ca2b0294 Author: Fabio Estevam Date: Mon Feb 26 15:55:25 2018 -0300 ASoC: Revert "ASoC: soc-generic-dmaengine-pcm: Fix error handling" This reverts commit f91b1e73ccde71d4bc69ae10d475196df38844ab. As explained by Lars-Peter Clausen: "This creates a resource leak. dmaengine_pcm_request_chan_of() requests bothtransmit and receive channels. It might return with an error if one of them fails, but the other one succeeded. In this case we need to call dmaengine_pcm_release_chan() to free the requested channel" So revert the commit. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/soc-generic-dmaengine-pcm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c3880bd159d431d06b687b0b5ab22e24e6ef0070 Author: Mariusz Stachura Date: Tue Nov 14 07:00:50 2017 -0500 i40e: link_down_on_close private flag support This patch introduces new ethtool private flag used for forcing true link state. Function i40e_force_link_state that implements this functionality was added, it sets phy_type = 0 in order to work-around firmware's LESM. False positive error messages were suppressed. The ndo_open() should not succeed if there were issues with forcing link state to be UP. Added I40E_PHY_TYPES_BITMASK define with all phy types OR-ed together in one bitmask. Added after phy type definition, so it will be hard to forget to include new phy types to the bitmask. Signed-off-by: Mariusz Stachura Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 37 +++++++++++ drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 + drivers/net/ethernet/intel/i40e/i40e_main.c | 75 +++++++++++++++++++++++ 3 files changed, 114 insertions(+) commit a1671af2863376abb9f200c5db3c9097c0490e87 Author: Wolfram Sang Date: Thu Jan 18 13:11:33 2018 +0100 i2c: of: simplify reading the "reg" property of_get_property() is a bit cumbersome to use. Replace it with the newer of_property_read_u32() for more readable code. Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-of.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 4f3ae38acb3c93cbd8aab9a9fb76d5f661ab578d Author: Wolfram Sang Date: Thu Jan 18 13:11:32 2018 +0100 i2c: of: remove duplicated check for valid address The very same check is done when calling i2c_new_device(). Remove it here to avoid code duplication. Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-of.c | 6 ------ 1 file changed, 6 deletions(-) commit c49b0e077594b2cb5531eacd88664badb2635e7f Author: Wolfram Sang Date: Thu Jan 18 13:11:31 2018 +0100 i2c: of: rename variable to meet expectations 'result' is mostly used in the kernel as int for functions returning errno on failure. Here it is a pointer to the client struct, so let's call it this way (as the parent function does, too). Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-of.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e6db2d3278ac2fff9e0e33e9cc4274ae7f14d9f2 Author: Wolfram Sang Date: Thu Jan 18 13:11:30 2018 +0100 i2c: of: make ref counting more visible When debugging a ref counting problem, I overlooked this snipplet a few times. Might be taste, but I think the new location is visually easier recognizable. Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1c87ceb02912201dff70e58fd15761292951b09 Author: Wolfram Sang Date: Thu Jan 18 13:11:29 2018 +0100 i2c: of: change log level of failed device creation If we cannot create a device, this is an error, not a warning. Fix the log level. Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb31232a9c6e30e2fedbd92694b749f484d519d8 Merge: a94cf2a 995b2a6 Author: David S. Miller Date: Mon Feb 26 14:40:03 2018 -0500 Merge branch 'sonic-ethernet-cleanups' Finn Thain says: ==================== Fixes, cleanup and modernization for SONIC ethernet drivers Changes since v4 of combined patch series: - Removed redundant and non-portable MACH_IS_MAC tests. - Omitted patches unrelated to SONIC drivers. - Dropped changes to the 'version_printed' logic and debug message text. ==================== Signed-off-by: David S. Miller commit 995b2a65232f9bd54d8e41a7669436a93698bf01 Author: Finn Thain Date: Sat Feb 24 18:27:25 2018 -0500 net/sonic: Replace custom debug logging with netif_* calls Eliminate duplicated debug code by moving it into the core driver. Don't log the only valid silicon revision number (it's in the source). Cc: Thomas Bogendoerfer Cc: Chris Zankel Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller drivers/net/ethernet/natsemi/jazzsonic.c | 19 +----- drivers/net/ethernet/natsemi/macsonic.c | 25 ++------ drivers/net/ethernet/natsemi/sonic.c | 99 ++++++++++++++++---------------- drivers/net/ethernet/natsemi/sonic.h | 2 + drivers/net/ethernet/natsemi/xtsonic.c | 19 +----- 5 files changed, 61 insertions(+), 103 deletions(-) commit bbc2f23a8f32cb403136d20cbed5fd056c1f6a7b Author: Finn Thain Date: Sat Feb 24 18:27:25 2018 -0500 net/sonic: Clean up and modernize log messages Add missing printk severity levels by adopting pr_foo() calls for the platform_driver and dev_foo() calls for the nubus_driver. Avoid KERN_CONT usage as per advice from checkpatch. Avoid #ifdef around printk calls. Don't log driver probe messages after calling register_netdev(). Cc: Thomas Bogendoerfer Cc: Chris Zankel Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller drivers/net/ethernet/natsemi/jazzsonic.c | 13 ++++----- drivers/net/ethernet/natsemi/macsonic.c | 49 ++++++++++++++------------------ drivers/net/ethernet/natsemi/xtsonic.c | 11 +++---- 3 files changed, 33 insertions(+), 40 deletions(-) commit 3d16bada58b2bdd15a840be09c04f49b40641838 Author: Finn Thain Date: Sat Feb 24 18:27:25 2018 -0500 net/macsonic: Drop redundant MACH_IS_MAC test The MACH_IS_MAC test is redundant here because the platform device won't get registered unless MACH_IS_MAC. Cc: Geert Uytterhoeven Signed-off-by: Finn Thain Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/natsemi/macsonic.c | 3 --- 1 file changed, 3 deletions(-) commit 0d12c6870dc4dc9067cb103c20cdb35c89f841e3 Author: Finn Thain Date: Sat Feb 24 18:27:25 2018 -0500 net/macsonic: Convert to nubus_driver This resolves an old issue preventing any NuBus SONIC NICs from working in a Mac with an on-board SONIC device. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller drivers/net/ethernet/natsemi/macsonic.c | 173 ++++++++++++++++++++++---------- 1 file changed, 119 insertions(+), 54 deletions(-) commit 853745f5e6d95faaae6381c9a01dbd43de992fb3 Author: Kan Liang Date: Mon Feb 26 10:17:10 2018 -0800 perf top: Fix annoying fallback message on older kernels On older (e.g. v4.4) kernels, an annoying fallback message can be observed in 'perf top': ┌─Warning:──────────────────────┐ │fall back to non-overwrite mode│ │ │ │ │ │Press any key... │ └───────────────────────────────┘ The 'perf top' utility has been changed to overwrite mode since commit ebebbf082357 ("perf top: Switch default mode to overwrite mode"). For older kernels which don't have overwrite mode support, 'perf top' will fall back to non-overwrite mode and print out the fallback message using ui__warning(), which needs user's input to close. The fallback message is not critical for end users. Turning it to debug message which is printed when running with -vv. Reported-by: Ingo Molnar Signed-off-by: Kan Liang Cc: Kan Liang Fixes: ebebbf082357 ("perf top: Switch default mode to overwrite mode") Link: http://lkml.kernel.org/r/1519669030-176549-1-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a94cf2a614f8bc5b2b33c708626ce695bf71e424 Author: Sergei Shtylyov Date: Sat Feb 24 22:41:45 2018 +0300 sh_eth: fix TSU init on SH7734/R8A7740 It appears that the single port Ether controllers having TSU (like SH7734/ R8A7740) need the same kind of treating in sh_eth_tsu_init() as R7S72100 currently has -- they also don't have the TSU registers related e.g. to passing the frames between ports. Add the 'sh_eth_cpu_data::dual_port' flag and use it as a new criterion for taking a "short path" in the TSU init sequence in order to avoid writing to the non-existent registers... Fixes: f0e81fecd4f8 ("net: sh_eth: Add support SH7734") Fixes: 73a0d907301e ("net: sh_eth: add support R8A7740") Signed-off-by: Sergei Shtylyov Tested-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 6 +++++- drivers/net/ethernet/renesas/sh_eth.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) commit 4869a1476df5ef2d09fa52acc9cfcc21b47194c5 Author: Sergei Shtylyov Date: Sat Feb 24 20:28:16 2018 +0300 sh_eth: TSU_QTAG0/1 registers the same as TSU_QTAGM0/1 The TSU_QTAG0/1 registers found in the Gigabit Ether controllers actually have the same long name as the TSU_QTAGM0/1 registers in the early Ether controllers: Qtag Addition/Deletion Set Register (Port 0/1 to 1/0); thus there's no need to make a difference in sh_eth_tsu_init() between those controllers. Unfortunately, we can't just remove TSU_QTAG0/1 from the register *enum* because that would break the ethtool register dump... Fixes: b0ca2a21f769 ("sh_eth: Add support of SH7763 to sh_eth") Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 15 ++++----------- drivers/net/ethernet/renesas/sh_eth.h | 4 ++-- 2 files changed, 6 insertions(+), 13 deletions(-) commit ad2575f8600d068edb10a9bef7f945482e3c5ca9 Author: Corey Minyard Date: Mon Feb 26 12:46:26 2018 -0600 ipmi:pci: Make the PCI defines consistent with normal Linux ones Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_pci.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit 3adc1c63e288c3f60b1bdee461a0b15447901bcc Author: BTaskaya Date: Fri Feb 23 22:57:35 2018 +0300 tc: python3, string formattings This patch converts old type string formattings to new type string formattings for adapting Linux Traffic Control (tc) unit testing suite python3. Linux Traffic Control (tc) unit testing suite's code quality improved is improved with this patch. According to python documentation; "The built-in string class provides the ability to do complex variable substitutions and value formatting via the format() method described in PEP 3101. " but the project was using old type formattings and new type string formattings together, this patch's main purpose is converting all old types to new types. Following files changed: 1. tools/testing/selftests/tc-testing/tdc.py 2. tools/testing/selftests/tc-testing/tdc_batch.py Following PEP rules applied: 1. PEP8 - Code Styling 2. PEP3101 - Advanced Code Formatting Signed-off-by: Batuhan Osman Taskaya Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tdc.py | 2 +- tools/testing/selftests/tc-testing/tdc_batch.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 93a6a37c6982ac39206da2fa05dcf5868049a378 Author: Colin Ian King Date: Thu Feb 1 18:35:39 2018 +0000 ixgbevf: remove redundant initialization of variable 'dma' Variable dma is initialized with a value that is never read, later on it is re-assigned a new value, hence the initialization is redundant and can be removed. Cleans up clang warning: drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:584:13: warning: Value stored to 'dma' during its initialization is never read Signed-off-by: Colin Ian King Acked-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d9c02171a8081f3746ea8cf7c67b0063a2272db Author: Emil Tantilov Date: Tue Jan 30 16:51:54 2018 -0800 ixgbevf: add build_skb support Add support for build_skb() similar to: commit 6f429223b31c ("ixgbe: Add support for build_skb") Signed-off-by: Emil Tantilov Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 41 +++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 925f5690ff5d5a1d9ec027e938d37b539e3fd186 Author: Emil Tantilov Date: Tue Jan 30 16:51:49 2018 -0800 ixgbevf: break out Rx buffer page management Based on commit e014272672b9 ("igb: Break out Rx buffer page management") Consolidate Rx code paths to reduce duplication when we expand them in the future. Signed-off-by: Emil Tantilov Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 227 +++++++++++----------- 1 file changed, 114 insertions(+), 113 deletions(-) commit 21c046e448616529a181a35445d9f6d60352e01f Author: Emil Tantilov Date: Tue Jan 30 16:51:43 2018 -0800 ixgbevf: allocate the rings as part of q_vector Make it so that all rings allocations are made as part of q_vector. The advantage to this is that we can keep all of the memory related to a single interrupt in one page. The goal is to bring the logic of handling rings closer to ixgbe. Signed-off-by: Emil Tantilov Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 7 +- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 392 ++++++++++------------ 2 files changed, 182 insertions(+), 217 deletions(-) commit 5cc0f1c0dc56404a46e8bccd6c96e63cde257268 Author: Emil Tantilov Date: Tue Jan 30 16:51:38 2018 -0800 ixgbevf: make sure all frames fit minimum size requirements Similar to commit a50c29dd09ed ("ixgbe: Make certain that all frames fit minimum size requirements") Make sure that any packet we attempt to transmit will meet minimum size requirements. Signed-off-by: Emil Tantilov Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 30 +++++++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) commit 1ab37e12e365c139fc595d7dccddfd13e9ca34c8 Author: Emil Tantilov Date: Tue Jan 30 16:51:33 2018 -0800 ixgbevf: add support for padding packet Following the logic from commit 2de6aa3a666e ("ixgbe: Add support for padding packet") Add support for providing a buffer with headroom and tail room to allow for shared info, NET_SKB_PAD, and NET_IP_ALIGN. With this combined with the DMA changes we can start using build_skb to build frames around an incoming Rx buffer instead of having to memcpy the headers. Signed-off-by: Emil Tantilov Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 11 ++++++++ drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 32 ++++++++++++++++++++--- 2 files changed, 39 insertions(+), 4 deletions(-) commit f2d00eca279fda3ddc9ff7cfffac58144c9b95c0 Author: Emil Tantilov Date: Tue Jan 30 16:51:27 2018 -0800 ixgbevf: setup queue counts Add calls for netif_set_real_num_t/rx_queues() in ixgbevf_open(). Make sure that calls to ixgbevf_open() are rtnl protected and improve the error handling when setting up multiple queues. Signed-off-by: Emil Tantilov Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 44 +++++++++++++++-------- 1 file changed, 29 insertions(+), 15 deletions(-) commit f15c5ba5b6cdf27c8e75f5a3b57c06c9ac4e515d Author: Emil Tantilov Date: Tue Jan 30 16:51:22 2018 -0800 ixgbevf: add support for using order 1 pages to receive large frames Based on commit 8649aaef4044 ("igb: Add support for using order 1 pages to receive large frames") Add support for using 3K buffers in order 1 page. We are reserving 1K for now to have space available for future tail room and head room when we enable build_skb support. Signed-off-by: Emil Tantilov Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 52 +++++++++++++++--- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 64 +++++++++++++++++------ 2 files changed, 92 insertions(+), 24 deletions(-) commit bc04347f5b4ad22ec831131f8b97384e40edc354 Author: Emil Tantilov Date: Tue Jan 30 16:51:17 2018 -0800 ixgbevf: add ethtool private flag for legacy Rx Introduce legacy-rx private flag that will allow switching between the old and new (build_skb based) Rx code paths. The implementation is the same as in commit e08912985b29 ("igb: Add support for ethtool private flag to allow use of legacy Rx") This provides a means of validating the legacy Rx path in the event that we are forced to fall back. At some point in the future when we are convinced we don't need it anymore we might be able to drop the legacy-rx flag. Signed-off-by: Emil Tantilov Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ethtool.c | 48 ++++++++++++++++++++++++++++ drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 2 ++ 2 files changed, 50 insertions(+) commit 9913db03d76bc27add1afea2c3c43e5705497529 Author: Emil Tantilov Date: Tue Jan 30 16:51:12 2018 -0800 ixgbevf: use page_address offset from page Based on commit 3456fd53421e ("igb: Use page_address offset from page instead of masking virtual address") Update the handling of page addresses so that we always refer to them using a void pointer, and try to use the consistent name of va indicating we are working with a virtual address. Signed-off-by: Emil Tantilov Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 6704a3abf4cf4181a1ee64f5db4969347b88ca1d Author: Jacob Keller Date: Mon Jan 29 15:57:48 2018 -0800 ixgbe: prevent ptp_rx_hang from running when in FILTER_ALL mode On hardware which supports timestamping all packets, the timestamps are recorded in the packet buffer, and the driver no longer uses or reads the registers. This makes the logic for checking and clearing Rx timestamp hangs meaningless. If we run the ixgbe_ptp_rx_hang() function in this case, then the driver will continuously spam the log output with "Clearing Rx timestamp hang". These messages are spurious, and confusing to end users. The original code in commit a9763f3cb54c ("ixgbe: Update PTP to support X550EM_x devices", 2015-12-03) did have a flag PTP_RX_TIMESTAMP_IN_REGISTER which was intended to be used to avoid the Rx timestamp hang check, however it did not actually check the flag before calling the function. Do so now in order to stop the checks and prevent the spurious log messages. Fixes: a9763f3cb54c ("ixgbe: Update PTP to support X550EM_x devices", 2015-12-03) Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 60f4b645492592501868c4b7a361f3f972b73196 Author: Tonghao Zhang Date: Sun Jan 28 03:53:37 2018 -0800 ixgbe: Avoid to write the RETA table when unnecessary If indir == 0 in the ixgbe_set_rxfh(), it is unnecessary to write the HW. Because redirection table is not changed. Signed-off-by: Tonghao Zhang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6d6a33dabe1f5cb01fb83c7b5ab07c1314421b07 Author: Marek Szyprowski Date: Mon Feb 26 15:45:41 2018 +0100 ARM: dts: exynos: Add missing interrupts property to PMIC on Trats board PMIC node requires external interrupts for proper operation, but property defining them was missing. This was probably caused by a limited support for interrupts from more than one parent, which was not possible to define when support for this board was added. Fix this by adding 'interrupt-extended' property and properly define interrupt lines for PMIC node. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4210-trats.dts | 1 + 1 file changed, 1 insertion(+) commit 11d9d51d77224dd7a5651dac1f1aefea13e37e82 Author: Krzysztof Kozlowski Date: Thu Feb 22 20:11:11 2018 +0100 ARM: dts: exynos: Fix unit addresses of PDMA nodes in Exynos5410 Fix the unit addresses of PDMA nodes in Exynos5410 (the reg property is correct) to get rid of DTC warnings like: arch/arm/boot/dts/exynos5410-odroidxu.dtb: Warning (simple_bus_reg): Node /soc/amba/pdma@12680000 simple-bus unit address format error, expected "121a0000" Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi arch/arm/boot/dts/exynos5410.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 12ec7b34f15a3c746578f6c01e0779c629fe657c Author: Krzysztof Kozlowski Date: Thu Feb 22 20:11:10 2018 +0100 ARM: dts: exynos: Fix address of PPMU ACP on Exynos4210 Typo in unit address of PPMU ACP caused DTC warnings: arch/arm/boot/dts/exynos4412-odroidu3.dtb: Warning (simple_bus_reg): Node /soc/ppmu_acp@10ae0000 simple-bus unit address format error, expected "106e0000" PPMU ACP (under 0x10ae0000 address) is present only in Exynos4210 so move this node to exynos4210.dtsi with fixing the reg address to proper one. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi arch/arm/boot/dts/exynos4.dtsi | 6 ------ arch/arm/boot/dts/exynos4210.dtsi | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) commit 6b1aea8cf2c8618146edaf6b35775ab55f7cafe5 Author: Sven Eckelmann Date: Mon Jan 1 00:00:00 2018 +0100 batman-adv: Update copyright years for 2018 Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich include/uapi/linux/batadv_packet.h | 2 +- include/uapi/linux/batman_adv.h | 2 +- net/batman-adv/Kconfig | 2 +- net/batman-adv/Makefile | 2 +- net/batman-adv/bat_algo.c | 2 +- net/batman-adv/bat_algo.h | 2 +- net/batman-adv/bat_iv_ogm.c | 2 +- net/batman-adv/bat_iv_ogm.h | 2 +- net/batman-adv/bat_v.c | 2 +- net/batman-adv/bat_v.h | 2 +- net/batman-adv/bat_v_elp.c | 2 +- net/batman-adv/bat_v_elp.h | 2 +- net/batman-adv/bat_v_ogm.c | 2 +- net/batman-adv/bat_v_ogm.h | 2 +- net/batman-adv/bitarray.c | 2 +- net/batman-adv/bitarray.h | 2 +- net/batman-adv/bridge_loop_avoidance.c | 2 +- net/batman-adv/bridge_loop_avoidance.h | 2 +- net/batman-adv/debugfs.c | 2 +- net/batman-adv/debugfs.h | 2 +- net/batman-adv/distributed-arp-table.c | 2 +- net/batman-adv/distributed-arp-table.h | 2 +- net/batman-adv/fragmentation.c | 2 +- net/batman-adv/fragmentation.h | 2 +- net/batman-adv/gateway_client.c | 2 +- net/batman-adv/gateway_client.h | 2 +- net/batman-adv/gateway_common.c | 2 +- net/batman-adv/gateway_common.h | 2 +- net/batman-adv/hard-interface.c | 2 +- net/batman-adv/hard-interface.h | 2 +- net/batman-adv/hash.c | 2 +- net/batman-adv/hash.h | 2 +- net/batman-adv/icmp_socket.c | 2 +- net/batman-adv/icmp_socket.h | 2 +- net/batman-adv/log.c | 2 +- net/batman-adv/log.h | 2 +- net/batman-adv/main.c | 2 +- net/batman-adv/main.h | 2 +- net/batman-adv/multicast.c | 2 +- net/batman-adv/multicast.h | 2 +- net/batman-adv/netlink.c | 2 +- net/batman-adv/netlink.h | 2 +- net/batman-adv/network-coding.c | 2 +- net/batman-adv/network-coding.h | 2 +- net/batman-adv/originator.c | 2 +- net/batman-adv/originator.h | 2 +- net/batman-adv/routing.c | 2 +- net/batman-adv/routing.h | 2 +- net/batman-adv/send.c | 2 +- net/batman-adv/send.h | 2 +- net/batman-adv/soft-interface.c | 2 +- net/batman-adv/soft-interface.h | 2 +- net/batman-adv/sysfs.c | 2 +- net/batman-adv/sysfs.h | 2 +- net/batman-adv/tp_meter.c | 2 +- net/batman-adv/tp_meter.h | 2 +- net/batman-adv/translation-table.c | 2 +- net/batman-adv/translation-table.h | 2 +- net/batman-adv/tvlv.c | 2 +- net/batman-adv/tvlv.h | 2 +- net/batman-adv/types.h | 2 +- 61 files changed, 61 insertions(+), 61 deletions(-) commit 7e81c55ee94338e4fe5bdd87e5fb15dbf040156f Author: Simon Wunderlich Date: Tue Feb 27 17:56:10 2018 +0100 batman-adv: Start new development cycle Signed-off-by: Simon Wunderlich net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f391d4b5d78eae140918662b72be662a3b74adc Author: Ludovic Barre Date: Mon Feb 26 17:45:12 2018 +0100 ARM: configs: multi_v7: add stm32 support This patch adds stm32 support to multi_v7_defconfig Signed-off-by: Ludovic Barre Signed-off-by: Alexandre Torgue arch/arm/configs/multi_v7_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit ed820f47bc5f9336840a43b3542c0281812bec03 Author: Colin Ian King Date: Fri Feb 23 17:16:57 2018 +0000 xen-netback: make function xenvif_rx_skb static The function xenvif_rx_skb is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: drivers/net/xen-netback/rx.c:422:6: warning: symbol 'xenvif_rx_skb' was not declared. Should it be static? Signed-off-by: Colin Ian King Acked-by: Wei Liu Signed-off-by: David S. Miller drivers/net/xen-netback/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e25b6f52a3cefe3c5152591346fd79825ebabd8 Merge: 9baeb5e f9b63a1 Author: David S. Miller Date: Mon Feb 26 11:36:11 2018 -0500 Merge branch 'tools-tc-testing-better-error-reporting' Brenda J. Butler says: ==================== tools: tc-testing: better error reporting This patch set contains a bit of cleanup and better error reporting, esp. in pre- and post-suite, and pre- and post-case commands. ==================== Signed-off-by: David S. Miller commit f9b63a1c91d4d2b4fcac5c786cdd7de1242c162b Author: Brenda J. Butler Date: Fri Feb 23 12:16:38 2018 -0500 tools: tc-testing: better error reporting Do a better job with error handling - in pre- and post-suite, in pre- and post-case. Show a traceback for errors. Signed-off-by: Brenda J. Butler Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tdc.py | 84 +++++++++++++++++++++++++------ 1 file changed, 70 insertions(+), 14 deletions(-) commit 6a7b75f7c16d85f782ae86c71f0f31f72a61602f Author: Brenda J. Butler Date: Fri Feb 23 12:16:37 2018 -0500 tools: tc-testing: Fix indentation Signed-off-by: Brenda J. Butler Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tdc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9baeb5eb1f83b8c64a80ee9926204909e275b5cc Author: Colin Ian King Date: Fri Feb 23 14:00:56 2018 +0000 sfc: falcon: remove duplicated bit-wise or of LOOPBACK_SGMII Bit pattern LOOPBACK_SGMII is being bit-wise or'd twice; remove the redundant 2nd LOOPBACK_SGMII Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/sfc/falcon/enum.h | 1 - 1 file changed, 1 deletion(-) commit ed2da6270ed9ea37d39e9ab597fc5b3b4215ae2a Author: Arnd Bergmann Date: Fri Feb 23 14:15:32 2018 +0100 mlxsw: spectrum_kvdl: avoid uninitialized variable warning gcc warns that 'resource_id' is not initialized if we don't come though any of the three 'case' statements before: drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c: In function 'mlxsw_sp_kvdl_part_init': drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:275:8: error: 'resource_id' may be used uninitialized in this function [-Werror=maybe-uninitialized] In the current code, that won't happen, but it's more robust to explicitly handle this by returning a failure from mlxsw_sp_kvdl_part_init. Fixes: 887839e6960d ("mlxsw: spectrum_kvdl: Add support for dynamic partition set") Signed-off-by: Arnd Bergmann Acked-by: Arkadi Sharshevsky Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 2 ++ 1 file changed, 2 insertions(+) commit b89c7695b14f58686ac89d5add861f1f6d3fd4da Author: Arnd Bergmann Date: Fri Feb 23 14:15:31 2018 +0100 mlxsw: spectrum_kvdl: use div_u64() for 64-bit division Calculating the number of entries now uses 64-bit arithmetic that causes a link error on 32-bit architectures: drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.o: In function `mlxsw_sp_kvdl_init': spectrum_kvdl.c:(.text+0x51c): undefined reference to `__aeabi_uldivmod' We could probably use a 32-bit division here as before, but since this is not in a performance critical path, div_u64() seems cleaner here. Fixes: 887839e6960d ("mlxsw: spectrum_kvdl: Add support for dynamic partition set") Signed-off-by: Arnd Bergmann Acked-by: Arkadi Sharshevsky Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f611fb046126eeee4a768a6ad50956f2aea9194 Author: Colin Ian King Date: Tue Jan 16 12:48:09 2018 +0000 ixgbe: remove redundant initialization of 'pool' Variable pool is being assigned zero and then in the following for-loop is it being set to zero again. Remove the redundant first assignment. Cleans up clang warning: drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c:61:2: warning: Value stored to 'pool' is never read Signed-off-by: Colin Ian King Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 1 - 1 file changed, 1 deletion(-) commit 25ab47ef48bceeac9371cb291199244484932857 Merge: 65b53bf f8c193c Author: David S. Miller Date: Mon Feb 26 11:28:11 2018 -0500 Merge branch 'mv88e6xxx-Poll-when-no-interrupt-defined' Andrew Lunn says: ==================== mv88e6xxx: Poll when no interrupt defined Not all boards using the mv88e6xxx switches have the interrupt output connected to a GPIO. On these boards phylib has to poll the PHYs, rather than use interrupts. Have the driver poll the interrupt status register, which is more efficient than having phylib do it. And it enables other switch interrupts to be services. The Armada 370RD is such a board without a interrupt GPIO. Now that interrupts work, wire up the PHYs to make use if them. ==================== Signed-off-by: David S. Miller commit f8c193ca1f7d3b69c031970815d14e09de396ee8 Author: Andrew Lunn Date: Thu Feb 22 22:58:33 2018 +0100 arm: mvebu: 370-rd: Enable PHY interrupt handling The Ethernet switch has an embedded interrupt controller. Interrupts from the embedded PHYs are part of this interrupt controller. Explicitly list the MDIO bus the embedded PHYs are on, and wire up the interrupts. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller arch/arm/boot/dts/armada-370-rd.dts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 294d711ee8c04fb2baa704cae15a7d039bb50615 Author: Andrew Lunn Date: Thu Feb 22 22:58:32 2018 +0100 net: dsa: mv88e6xxx: Poll when no interrupt defined Not all boards have the interrupt output from the switch connected to a GPIO line. In such cases, phylib has to poll the internal PHYs, rather than receive an interrupt when there is a change in the link state. phylib polls once per second, and per PHY reads around 4 words. With a switch typically having 4 internal PHYs, this means 16 MDIO transactions per second. Rather than performing this phylib level polling, have the driver poll the interrupt status register. If the status register indicates an interrupt condition processing of interrupts in the same way as if a GPIO was used. Polling 10 times a second places less load on the MDIO bus. But rather than taking on average 0.5s to detect a link change, it takes less than 0.05s. Additionally, other interrupts, such as the watchdog, ATU and VTU violations will be reported. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 146 +++++++++++++++++++++++++++------------ drivers/net/dsa/mv88e6xxx/chip.h | 3 + 2 files changed, 106 insertions(+), 43 deletions(-) commit 65b53bfd497b052277f89afb3839ace38190974c Author: Ido Schimmel Date: Tue Feb 20 08:45:12 2018 +0100 mlxsw: spectrum_switchdev: Allow port enslavement to a VLAN-unaware bridge Up until now we only allowed VLAN devices to be put in a VLAN-unaware bridge, but some users need the ability to enslave physical ports as well. This is achieved by mapping the port and VID 1 to the bridge's vFID, instead of the port and the VID used by the VLAN device. The above is valid because as long as the port is not enslaved to a bridge, VID 1 is guaranteed to be configured as PVID and egress untagged. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Tested-by: David Ahern Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit bcc4f4e118e46ba86a8ddd448d318c5bd8fada5d Author: Ludovic Barre Date: Mon Feb 26 16:49:18 2018 +0100 ARM: dts: stm32: add initial support of stm32mp157c eval board Add support of stm32mp157c evaluation board (part number: STM32MP157C-EV1) split in 2 elements: -Daughter board (part number: STM32MP157C-ED1) which includes CPU, memory and power supply -Mother board (part number: STM32MP157C-EM1) which includes external peripherals (like display, camera,...) and extension connectors. The daughter board can run alone, this is why the device tree files are split in two layers, for the complete evaluation board (ev1) and for the daughter board alone (ed1). Signed-off-by: Ludovic Barre Signed-off-by: Alexandre Torgue arch/arm/boot/dts/Makefile | 6 ++++-- arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 13 +++++++++++++ arch/arm/boot/dts/stm32mp157c-ed1.dts | 32 +++++++++++++++++++++++++++++++ arch/arm/boot/dts/stm32mp157c-ev1.dts | 21 ++++++++++++++++++++ 4 files changed, 70 insertions(+), 2 deletions(-) commit 3b6d082f0dfc2b7b9def494d2ab67fd4d3862ea1 Author: Haiyue Wang Date: Mon Feb 26 23:48:14 2018 +0800 ipmi: kcs_bmc: coding-style fixes and use new poll type Many for coding-style fixes, and update the poll API with the new type '__poll_t', this is new commit from linux-4.16-rc1. Signed-off-by: Haiyue Wang Signed-off-by: Corey Minyard drivers/char/ipmi/kcs_bmc.c | 32 +++++++++++++++++--------------- drivers/char/ipmi/kcs_bmc.h | 36 +++++++++++++++++++----------------- drivers/char/ipmi/kcs_bmc_aspeed.c | 9 +++++---- include/uapi/linux/ipmi_bmc.h | 8 +++++--- 4 files changed, 46 insertions(+), 39 deletions(-) commit 364993a95888916b8906f655c8654aa60877a35b Author: Aishwarya Pant Date: Sat Feb 24 14:36:45 2018 +0530 char/ipmi: add documentation for sysfs interface This is an attempt to document the sysfs interface for the IPMI drivers. Descriptions were collected from v2.0 of the IPMI specification and from code comments. Signed-off-by: Aishwarya Pant Signed-off-by: Corey Minyard .../ABI/testing/sysfs-devices-platform-ipmi | 238 +++++++++++++++++++++ 1 file changed, 238 insertions(+) commit f6d25e1ccf2e72d87bb9d7327847ce5d9e7062ed Author: Ville Syrjälä Date: Mon Feb 26 16:24:23 2018 +0200 drm: Include the header with the prototype for drm_get_panel_orientation_quirk() sparse complains: drivers/gpu/drm/drm_panel_orientation_quirks.c:133:5: warning: symbol 'drm_get_panel_orientation_quirk' was not declared. Should it be static? Cc: Hans de Goede Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180226142423.26439-1-ville.syrjala@linux.intel.com Reviewed-by: Hans de Goede drivers/gpu/drm/drm_panel_orientation_quirks.c | 1 + 1 file changed, 1 insertion(+) commit 15ea2df9143729a2b722d4ca2b52cfa14a819d8e Author: Arnd Bergmann Date: Mon Feb 26 09:18:04 2018 -0500 media: ov2685: mark PM functions as __maybe_unused Without CONFIG_PM, we get a harmless build warning: drivers/media/i2c/ov2685.c:516:12: error: 'ov2685_runtime_suspend' defined but not used [-Werror=unused-function] static int ov2685_runtime_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/ov2685.c:507:12: error: 'ov2685_runtime_resume' defined but not used [-Werror=unused-function] static int ov2685_runtime_resume(struct device *dev) This marks the affected functions as __maybe_unused. Fixes: e3861d9118c8 ("media: ov2685: add support for OV2685 sensor") Signed-off-by: Arnd Bergmann [hans.verkuil@cisco.com: fixed typo in Subject: was ov5695] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2685.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 94d4a1a671ec4887e8052badb34fb06312ce3158 Author: Arnd Bergmann Date: Mon Feb 26 09:18:03 2018 -0500 media: ov5695: mark PM functions as __maybe_unused Without CONFIG_PM, we get a harmless build warning: drivers/media/i2c/ov5695.c:1033:12: error: 'ov5695_runtime_suspend' defined but not used [-Werror=unused-function] static int ov5695_runtime_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/ov5695.c:1024:12: error: 'ov5695_runtime_resume' defined but not used [-Werror=unused-function] static int ov5695_runtime_resume(struct device *dev) This marks the affected functions as __maybe_unused. Fixes: 8a77009be4be ("media: ov5695: add support for OV5695 sensor") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5695.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 15001033f4149162359de0ca2d74b39933358fc3 Author: Arnd Bergmann Date: Fri Feb 23 08:13:26 2018 -0500 media: i2c: TDA1997x: add CONFIG_SND dependency Without CONFIG_SND, we get a link error: ERROR: "snd_soc_register_codec" [drivers/media/i2c/tda1997x.ko] undefined! ERROR: "snd_soc_unregister_codec" [drivers/media/i2c/tda1997x.ko] undefined! ERROR: "snd_pcm_hw_constraint_minmax" [drivers/media/i2c/tda1997x.ko] undefined! This adds the same Kconfig dependency that we have in other media drivers, using 'select SND_PCM' to ensure that we have can call snd_pcm_hw_constraint_minmax, while depending on CONFIG_SND_SOC for registering the codec. Fixes: 9ac0038db9a7 ("media: i2c: Add TDA1997x HDMI receiver driver") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit ba6056a41cb09575a5ffe2fcfa9a0afb1b60eb92 Merge: f74290f c535077 Author: David S. Miller Date: Mon Feb 26 10:37:24 2018 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2018-02-26 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Various improvements for BPF kselftests: i) skip unprivileged tests when kernel.unprivileged_bpf_disabled sysctl knob is set, ii) count the number of skipped tests from unprivileged, iii) when a test case had an unexpected error then print the actual but also the unexpected one for better comparison, from Joe. 2) Add a sample program for collecting CPU state statistics with regards to how long the CPU resides in cstate and pstate levels. Based on cpu_idle and cpu_frequency trace points, from Leo. 3) Various x64 BPF JIT optimizations to further shrink the generated image size in order to make it more icache friendly. When tested on the Cilium generated programs, image size reduced by approx 4-5% in best case mainly due to how LLVM emits unsigned 32 bit constants, from Daniel. 4) Improvements and fixes on the BPF sockmap sample programs: i) fix the sockmap's Makefile to include nlattr.o for libbpf, ii) detach the sock ops programs from the cgroup before exit, from Prashant. 5) Avoid including xdp.h in filter.h by just forward declaring the struct xdp_rxq_info in filter.h, from Jesper. 6) Fix the BPF kselftests Makefile for cgroup_helpers.c by only declaring it a dependency for test_dev_cgroup.c but not every other test case where it is not needed, from Jesper. 7) Adjust rlimit RLIMIT_MEMLOCK for test_tcpbpf_user selftest since the default is insufficient for creating the 'global_map' used in the corresponding BPF program, from Yonghong. 8) Likewise, for the xdp_redirect sample, Tushar ran into the same when invoking xdp_redirect and xdp_monitor at the same time, therefore in order to have the sample generically work bump the limit here, too. Fix from Tushar. 9) Avoid an unnecessary NULL check in BPF_CGROUP_RUN_PROG_INET_SOCK() since sk is always guaranteed to be non-NULL, from Yafang. ==================== Signed-off-by: David S. Miller commit 8471a20253ebf01a646cf790e98d870a55216ded Author: Ludovic Barre Date: Mon Feb 26 16:35:40 2018 +0100 ARM: dts: stm32: add stm32mp157c initial support Add stm32mp157c initial support with: -Dual Cortex-A7 -Arm psci, timer, gic -Pinctrl -Uart Signed-off-by: Ludovic Barre Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 172 ++++++++++++++++++++++++++ arch/arm/boot/dts/stm32mp157c.dtsi | 194 ++++++++++++++++++++++++++++++ 2 files changed, 366 insertions(+) commit 8df1d2ac9cf17ba3db237f369a1e58f3c247a9f5 Author: Steve Longerbeam Date: Fri Feb 16 20:54:34 2018 -0500 media: imx.rst: Fix formatting errors Fix a few formatting errors. Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/imx.rst | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 2b75d1ec9a54498e8be4e4595e3024bac995e9a9 Author: Hans Verkuil Date: Thu Feb 15 10:54:44 2018 -0500 media: imx/Kconfig: add depends on HAS_DMA Add missing dependency. Signed-off-by: Hans Verkuil Acked-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 9517382ddf0dfa5939e27803ea4f79982c0ee98e Author: Parthiban Nallathambi Date: Thu Feb 15 04:25:45 2018 -0500 media: imx: capture: reformat line to 80 chars or less This is a cleanup patch to fix line length issue found by checkpatch.pl script. In this patch, line 144 have been wrapped. Signed-off-by: Parthiban Nallathambi Acked-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-capture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a5f04589ee1a9ea3f94ea15ae199ac01952a1388 Author: Steve Longerbeam Date: Sun Feb 11 13:51:09 2018 -0500 media: imx: mipi csi-2: Fix set_fmt try csi2_set_fmt() was setting the try_fmt only on the first pad, and pad index was ignored. Fix by introducing __csi2_get_fmt(). Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx6-mipi-csi2.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 46c121e03d9448ced2467e384d02f22c3f9c51ec Author: Steve Longerbeam Date: Sun Feb 11 13:29:34 2018 -0500 media: staging/imx: Implement init_cfg subdev pad op Implement the init_cfg pad op in all imx-media subdevices. The try formats are initialized to the current active formats on all pads. Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-ic-prp.c | 1 + drivers/staging/media/imx/imx-ic-prpencvf.c | 1 + drivers/staging/media/imx/imx-media-csi.c | 1 + drivers/staging/media/imx/imx-media-utils.c | 29 +++++++++++++++++++++++++++++ drivers/staging/media/imx/imx-media-vdic.c | 1 + drivers/staging/media/imx/imx-media.h | 2 ++ drivers/staging/media/imx/imx6-mipi-csi2.c | 1 + 7 files changed, 36 insertions(+) commit 3b4bf692e54ef9f2fd32ccd0434d5c396537596f Author: Fabio Estevam Date: Sat Feb 10 09:38:50 2018 -0500 media: imx-ic-prpencvf: Use empty initializer to clear all struct members {0} only cleans the first member of the structure. Use {} instead, which cleans all the members of the structure. Reported-by: Steve Longerbeam Signed-off-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-ic-prpencvf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f31c76a94861fb8d11c713c13c22fcd76bb715a3 Author: Fabio Estevam Date: Fri Feb 9 18:11:16 2018 -0500 media: imx-media-internal-sd: Use empty initializer When building with W=1 the following warning shows up: drivers/staging/media/imx/imx-media-internal-sd.c:274:49: warning: Using plain integer as NULL pointer Fix this problem by using an empty initializer, which guarantees that all struct members are zero-cleared. Signed-off-by: Fabio Estevam Acked-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-internal-sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aebd90aa3244e3539001919dcfbf00027d5ab63c Author: Hugues Fruchet Date: Thu Feb 8 06:00:45 2018 -0500 media: stm32-dcmi: add g/s_parm framerate support Add g/s_parm framerate support by calling subdev g/s_frame_interval ops. This allows user to control sensor framerate by calling ioctl G/S_PARM. Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/stm32/stm32-dcmi.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit e0019f71011dff4228175d1e30c1ba7fd6da41de Author: Kieran Bingham Date: Wed Feb 7 16:11:35 2018 -0500 media: i2c: adv748x: Fix cleanup jump on chip identification The error handling for the adv748x_identify_chip() call erroneously jumps to the err_cleanup_clients label before the clients have been established. Correct this by jumping to the next (and correct) label in the cleanup code: err_cleanup_dt. Fixes: 3e89586a64df ("media: i2c: adv748x: add adv748x driver") Signed-off-by: Kieran Bingham Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv748x/adv748x-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c737e9c29b1fb7e585470c8247b9ec8ba5285c4 Author: Hugues Fruchet Date: Wed Feb 7 12:35:36 2018 -0500 media: stm32-dcmi: improve error trace points Fix some missing "\n". Trace error returned by subdev streamon/streamoff. Remove extra "0x" unneeded with %pad formatter. Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/stm32/stm32-dcmi.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit ffb1bdc225d125e41f548fa268ca1a687ec4cecc Author: Hugues Fruchet Date: Wed Feb 7 12:35:35 2018 -0500 media: stm32-dcmi: remove redundant clear of interrupt flags It is already cleared in dcmi_irq_callback(). Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/stm32/stm32-dcmi.c | 2 -- 1 file changed, 2 deletions(-) commit 2a18115d43b209cf8f6b9a4deb735c4786478625 Author: Hugues Fruchet Date: Wed Feb 7 12:35:34 2018 -0500 media: stm32-dcmi: remove redundant capture enable Remove redundant capture enable already done in dcmi_start_capture(). Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/stm32/stm32-dcmi.c | 3 --- 1 file changed, 3 deletions(-) commit 7f43ff953f4009655a8b19a6f2fd1f665f4d7c2e Author: Sergei Shtylyov Date: Thu Jan 18 09:05:51 2018 -0500 media: v4l: vsp1: Fix video output on R8A77970 Commit d455b45f8393 ("v4l: vsp1: Add support for new VSP2-BS, VSP2-DL, and VSP2-D instances") added support for the VSP2-D found in the R-Car V3M (R8A77970) but the video output that VSP2-D sends to DU has a greenish garbage-like line repeated every 8 screen rows. It turns out that R-Car V3M has the LIF0 buffer attribute register that you need to set to a non- default value in order to get rid of the output artifacts. Based on the original (and large) patch by Daisuke Matsushita . Fixes: d455b45f8393 ("v4l: vsp1: Add support for new VSP2-BS, VSP2-DL and VSP2-D instances") [Removed braces, added VI6_IP_VERSION_MASK to improve readabiliy] Signed-off-by: Sergei Shtylyov Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_lif.c | 12 ++++++++++++ drivers/media/platform/vsp1/vsp1_regs.h | 6 ++++++ 2 files changed, 18 insertions(+) commit 06227008670afddd5eb66cc6a85c27fd5e72f41e Author: Wolfram Sang Date: Mon Feb 5 15:09:58 2018 -0500 media: v4l: vsp1: Fix mask creation for MULT_ALPHA_RATIO Due to a typo, the mask was destroyed by a comparison instead of a bit shift. No regression since the mask has not been used yet. Signed-off-by: Wolfram Sang Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b78f0361caec7e2b809af35facd767da1b9030d Author: Laurent Pinchart Date: Sat Dec 2 14:39:51 2017 -0500 media: v4l: vsp1: Print the correct blending unit name in debug messages The DRM pipelines can use either the BRU or the BRS for blending. Make sure the right name is used in debugging messages to avoid confusion. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drm.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 613928e85317b945c863bb893f5737d2f22f5425 Author: Kieran Bingham Date: Fri Feb 9 09:50:34 2018 -0500 media: v4l: vsp1: Fix header display list status check in continuous mode To allow dual pipelines utilising two WPF entities when available, the VSP was updated to support header-mode display list in continuous pipelines. A small bug in the status check of the command register causes the second pipeline to be directly afflicted by the running of the first; appearing as a perceived performance issue with stuttering display. Fix the vsp1_dl_list_hw_update_pending() call to ensure that the read comparison corresponds to the correct pipeline. Fixes: eaf4bfad6ad8 ("v4l: vsp1: Add support for header display lists in continuous mode") Cc: "Stable v4.14+" Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_dl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5e3e4cb5e24b92773b194aa90066170b12133bc6 Author: Laurent Pinchart Date: Sun Dec 3 05:06:57 2017 -0500 media: v4l: vsp1: Fix display stalls when requesting too many inputs Make sure we don't accept more inputs than the hardware can handle. This is a temporary fix to avoid display stall, we need to instead allocate the BRU or BRS to display pipelines dynamically based on the number of planes they each use. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drm.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit aaf1bbe90a36a6d11dbedc4a99b24096963280c8 Author: Gustavo A. R. Silva Date: Wed Feb 14 11:30:29 2018 -0600 ipmi: kcs_bmc: mark expected switch fall-through in kcs_bmc_handle_data In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1465255 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Cc: Haiyue Wang Signed-off-by: Corey Minyard drivers/char/ipmi/kcs_bmc.c | 1 + 1 file changed, 1 insertion(+) commit be2ed207e3745392478e85afa0bb02acdf44c966 Author: Haiyue Wang Date: Fri Feb 2 10:16:11 2018 +0800 ipmi: add an Aspeed KCS IPMI BMC driver The KCS (Keyboard Controller Style) interface is used to perform in-band IPMI communication between a server host and its BMC (BaseBoard Management Controllers). This driver exposes the KCS interface on ASpeed SOCs (AST2400 and AST2500) as a character device. Such SOCs are commonly used as BMCs and this driver implements the BMC side of the KCS interface. Signed-off-by: Haiyue Wang Signed-off-by: Corey Minyard .../devicetree/bindings/ipmi/aspeed-kcs-bmc.txt | 25 ++ drivers/char/ipmi/Kconfig | 12 + drivers/char/ipmi/Makefile | 1 + drivers/char/ipmi/kcs_bmc_aspeed.c | 319 +++++++++++++++++++++ 4 files changed, 357 insertions(+) commit 20d60f61c58e8c937f3653819816dd203e6e3cb4 Author: Haiyue Wang Date: Fri Feb 2 10:16:10 2018 +0800 ipmi: add a KCS IPMI BMC driver Provides a device driver for the KCS (Keyboard Controller Style) IPMI interface which meets the requirement of the BMC (Baseboard Management Controllers) side for handling the IPMI request from host system software. Signed-off-by: Haiyue Wang [Removed the selectability of IPMI_KCS_BMC, as it doesn't do much good to have it by itself.] Signed-off-by: Corey Minyard drivers/char/ipmi/Kconfig | 3 + drivers/char/ipmi/Makefile | 1 + drivers/char/ipmi/kcs_bmc.c | 464 ++++++++++++++++++++++++++++++++++++++++++ drivers/char/ipmi/kcs_bmc.h | 106 ++++++++++ include/uapi/linux/ipmi_bmc.h | 14 ++ 5 files changed, 588 insertions(+) commit ed3056f015de90a53127d05c34d49fe3e04675a4 Author: Hans Verkuil Date: Mon Feb 5 06:19:00 2018 -0500 media: media.h: reorganize header to make it easier to understand The media.h public header is very messy. It mixes legacy and 'new' defines and it is not easy to figure out what should and what shouldn't be used. It also contains confusing comment that are either out of date or completely uninteresting for anyone that needs to use this header. The patch groups all entity functions together, including the 'old' defines based on the old range base. The reader just wants to know about the available functions and doesn't care about what range is used. All legacy defines are moved to the end of the header, so it is easier to locate them and just ignore them. The legacy structs in the struct media_entity_desc are put under also a much more effective signal to the reader that they shouldn't be used compared to the old method of relying on '#if 1' followed by a comment. The unused MEDIA_INTF_T_ALSA_* defines are also moved to the end of the header in the legacy area. They are also dropped from intf_type() in media-entity.c. All defines are also aligned at the same tab making the header easier to read. Signed-off-by: Hans Verkuil [mchehab@s-opensource.com: removed lots of spaces before tabs; typo changes ->change ] Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 16 -- include/uapi/linux/media.h | 347 ++++++++++++++++++++----------------------- 2 files changed, 164 insertions(+), 199 deletions(-) commit 77b83829ebf6b57eacd0c57a3cb238096ddc86fc Author: Colin Ian King Date: Mon Feb 26 12:17:06 2018 +0200 wil6210: fix spelling mistake: "preperation"-> "preparation" Trivial fix to spelling mistake in debug error message text. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84694edcae195bd3b0dadd9df176a01ae5912621 Author: Hans Verkuil Date: Sat Feb 3 13:26:07 2018 -0500 media: media-ioc-enum-entities/links.rst: document reserved fields These structures have reserved fields that were never documented. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../media/uapi/mediactl/media-ioc-enum-entities.rst | 19 +++++++++++++++---- .../media/uapi/mediactl/media-ioc-enum-links.rst | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) commit ccac77dc716530a408fc6b9fc4fa66d8dd780d62 Author: Hans Verkuil Date: Sat Feb 3 13:06:01 2018 -0500 media: document the reservedX fields in media_v2_topology The MEDIA_IOC_G_TOPOLOGY documentation didn't document the reservedX fields. Related to that was that the documented type of the num_* fields was also wrong. Fix both. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/uapi/mediactl/media-ioc-g-topology.rst | 52 +++++++++++++++++----- 1 file changed, 42 insertions(+), 10 deletions(-) commit baa9e9101512499ecb8b524e586ca2b6fd6c73d6 Author: Hans Verkuil Date: Sat Feb 3 13:06:01 2018 -0500 media: zero reservedX fields in media_v2_topology The MEDIA_IOC_G_TOPOLOGY implementation did not zero the reservedX fields. Fix this. Found with v4l2-compliance. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 4 ++++ 1 file changed, 4 insertions(+) commit ea6430324da47faec9f68da3275628dbdc53d80c Author: Dafna Hirschfeld Date: Sat Feb 24 12:27:26 2018 +0200 staging: wilc1000: merge 'if' statements that test the same condition Merge the instructions of two 'if' statements that test the same condition and move a 'memcpy' instruction related to a different variable. Issue found with coccicheck. Signed-off-by: Dafna Hirschfeld Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 3294a9c58ac5f658b423cce78343b19dd1eee61d Author: Santha Meena Ramamoorthy Date: Sat Feb 24 13:46:33 2018 -0800 staging: rtl8192e: use struct pointer to get the size of the struct Use pointer to the structure to get the size of the structure in order to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_wx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 57352e12971e537ac641b0bf64709c958c6c7e78 Author: Santha Meena Ramamoorthy Date: Sat Feb 24 15:25:49 2018 -0800 staging: speakup: add braces around else statement Add braces {} around else statement to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy Acked-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit abe9dbd85bbc9f0ab16b200ad4b58da86a827767 Author: Dafna Hirschfeld Date: Sun Feb 25 22:19:36 2018 +0200 staging: rtl8192u: Fix alignments in 'if' statements Fix alignments in two 'if' statements and break lines to avoid over 80 characters lines. Issues found with coccicheck. Signed-off-by: Dafna Hirschfeld Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 81e0989e2ff411b3bb40098730830f16f707bd42 Author: Hans Verkuil Date: Mon Feb 5 04:30:48 2018 -0500 media: media.h: fix confusing typo in comment Subdevs are initialized with MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN, not MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/media.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcab757396b29b72e76c66d0216c923094ff69fc Author: Hans Verkuil Date: Sat Feb 3 13:46:05 2018 -0500 media: media-device.c: zero reserved fields MEDIA_IOC_SETUP_LINK didn't zero the reserved field of the media_link_desc struct. Do so in media_device_setup_link(). MEDIA_IOC_ENUM_LINKS didn't zero the reserved field of the media_links_enum struct. Do so in media_device_enum_links(). Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 3 +++ 1 file changed, 3 insertions(+) commit dfa2e02e011a239a160466e6bf794cb131790c0d Author: Alexandre Courbot Date: Sun Feb 4 21:24:02 2018 -0500 media: media-types.rst: fix typo with -> which Signed-off-by: Alexandre Courbot Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/mediactl/media-types.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28aeead6c4a97c29746f7bb63c42bf5396dd455f Author: Hans Verkuil Date: Sun Feb 4 08:40:37 2018 -0500 media: media-types.rst: fix type, small improvements data conector -> connector ... -> etc. '...' looked odd when my browser put the ... by itself on the next line, 'etc.' is clearer IMHO. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/mediactl/media-types.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit afd1179d565b28406f24555dcf6d08eab8eef50c Author: Hans Verkuil Date: Sat Feb 3 14:18:38 2018 -0500 media: media-ioc-g-topology.rst: fix interface-to-entity link description The source_id and sink_id descriptions were the same for interface-to-entity links. The source_id is the interface ID, not the entity ID. Fix this. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/mediactl/media-ioc-g-topology.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abb374fe84606ba48cf6c31c14460dfbfb4959e0 Author: Ignacio Nunez Hernanz Date: Mon Feb 26 12:16:46 2018 +0200 ath10k: make ath10k report discarded packets to mac80211 Whenever ath10k firmware discards a packet (HTT_TX_COMPL_STATE_DISCARD flag), the skb is freed and mac80211 does not get feedback through ieee80211_tx_status(). Instead, make sure that the IEEE80211_TX_STAT_ACK flag is disabled and let the packet go through, like ath9k does. Signed-off-by: Ignacio Nunez Hernanz [kvalo@codeaurora.org: rebase patch manually] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/txrx.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 134d1fd44221614d7de994d07ef92a6111952e1c Merge: b382a5c 4a3928c Author: Greg Kroah-Hartman Date: Mon Feb 26 15:39:01 2018 +0100 Merge 4.16-rc3 into usb-next We want the USB fixes in here. Signed-off-by: Greg Kroah-Hartman commit 02a0e77b2409650a68781f4ac1df0e2cfcccad8e Author: Stephen Rothwell Date: Fri Feb 23 13:28:36 2018 +1100 staging: fsl-mc: merge fix for CONFIG_FSL_MC_BUS moving Signed-off-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman drivers/bus/fsl-mc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f437a7cb87b2814bba4f334fe97d0f02e7ed6079 Author: Hans Verkuil Date: Sat Feb 3 08:24:44 2018 -0500 media: v4l2-subdev: implement VIDIOC_DBG_G_CHIP_INFO ioctl The VIDIOC_DBG_G/S_REGISTER ioctls imply that VIDIOC_DBG_G_CHIP_INFO is also present, since without that you cannot use v4l2-dbg. Just like the implementation in v4l2-ioctl.c this can be implemented in the core and no drivers need to be modified. It also makes it possible for v4l2-compliance to properly test the VIDIOC_DBG_G/S_REGISTER ioctls. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-subdev.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 3103c7b4ad08d813ec5c8187f7a9ddea55acf027 Author: Hans Verkuil Date: Fri Feb 2 08:05:23 2018 -0500 media: v4l2-subdev: without controls return -ENOTTY If the subdev did not define any controls, then return -ENOTTY if userspace attempts to call these ioctls. The control framework functions will return -EINVAL, not -ENOTTY if vfh->ctrl_handler is NULL. Several of these framework functions are also called directly from drivers, so I don't want to change the error code there. Found with vimc and v4l2-compliance. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-subdev.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 36e9f7203e05090031a5356be043a9be342e383c Merge: 721dfe4 4a3928c Author: Greg Kroah-Hartman Date: Mon Feb 26 15:32:00 2018 +0100 Merge 4.16-rc3 into staging-next We want the IIO/Staging fixes in here, and to resolve a merge problem with the move of the fsl-mc code. Signed-off-by: Greg Kroah-Hartman commit 1ceda32bf3f2f5542af805a70c6b59123e3c76c9 Author: Hans Verkuil Date: Wed Feb 7 12:06:30 2018 -0500 media: vimc: use correct subdev functions Instead of calling everything a MEDIA_ENT_F_ATV_DECODER, pick the correct functions for these blocks. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-debayer.c | 2 +- drivers/media/platform/vimc/vimc-scaler.c | 2 +- drivers/media/platform/vimc/vimc-sensor.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 3da7ee94f3fe9a58c9a7ddd6f5c892524068780c Author: Hans Verkuil Date: Fri Feb 2 08:00:32 2018 -0500 media: vimc: fix control event handling The sensor subdev didn't handle control events. Add support for this. Found with v4l2-compliance. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-common.c | 4 +++- drivers/media/platform/vimc/vimc-sensor.c | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit 9f91280febf718ef5dc089a6be06bb48fcc89729 Author: Ville Syrjälä Date: Fri Dec 22 21:22:31 2017 +0200 drm/i915: Remove the pipe/plane ID checks from skl_check_ccs_aux_surface() The core now checks that the plane supports the fb's format+modifier combination, so we can drop the related checks from skl_check_ccs_aux_surface(). These checks were specific to SKL/KBL/BXT anyway. Cc: Ben Widawsky Cc: Jason Ekstrand Cc: Daniel Stone Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171222192231.17981-9-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola drivers/gpu/drm/i915/intel_display.c | 8 -------- 1 file changed, 8 deletions(-) commit 23163a7d4b032489d375099d56571371c0456980 Author: Ville Syrjälä Date: Fri Dec 22 21:22:30 2017 +0200 drm: Check that the plane supports the request format+modifier combo Currently we only check that the plane supports the pixel format of the fb we're about to feed to it. Extend it to check also the modifier, and more specifically that the combination of the format and modifier is supported. Cc: dri-devel@lists.freedesktop.org Cc: Ben Widawsky Cc: Jason Ekstrand Cc: Daniel Stone Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171222192231.17981-8-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_atomic.c | 10 ++++++---- drivers/gpu/drm/drm_crtc.c | 10 ++++++---- drivers/gpu/drm/drm_crtc_internal.h | 4 ++-- drivers/gpu/drm/drm_plane.c | 33 ++++++++++++++++++++++++++------- 4 files changed, 40 insertions(+), 17 deletions(-) commit 876e32e5dd6e08320288862440e3e8a9542b5d9b Author: Mauro Carvalho Chehab Date: Mon Feb 26 09:25:26 2018 -0500 media: tw9910: solve coding style issues As we're adding this as a new driver, make checkpatch happier by solving several style issues, using --fix-inplace at strict mode. Some issues required manual work. Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tw9910.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 054d8830ac07d865c2973971af29b7caad593914 Author: Mauro Carvalho Chehab Date: Mon Feb 26 09:23:32 2018 -0500 media: ov772x: fix whitespace issues As we're adding this as a new driver, make checkpatch happier by solving some whitespace issues, using --fix-inplace. Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov772x.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 186c446f4b840bd77b79d3dc951ca436cb8abe79 Author: Jacopo Mondi Date: Wed Feb 21 12:48:04 2018 -0500 media: arch: sh: migor: Use new renesas-ceu camera driver Migo-R platform uses sh_mobile_ceu camera driver, which is now being replaced by a proper V4L2 camera driver named 'renesas-ceu'. Move Migo-R platform to use the v4l2 renesas-ceu camera driver interface and get rid of soc_camera defined components used to register sensor drivers and of platform specific enable/disable routines. Register clock source and GPIOs for sensor drivers, so they can use clock and gpio APIs. Also, memory for CEU video buffers is now reserved with membocks APIs, and need to be declared as dma_coherent during machine initialization to remove that architecture specific part from CEU driver. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab arch/sh/boards/mach-migor/setup.c | 225 +++++++++++++++------------------ arch/sh/kernel/cpu/sh4a/clock-sh7722.c | 2 +- 2 files changed, 101 insertions(+), 126 deletions(-) commit a57ffa46dc70ad593c79169053002088519340f3 Author: Jacopo Mondi Date: Thu Feb 22 04:47:19 2018 -0500 media: MAINTAINERS: Add entry for Techwell TW9910 Add entry for Techwell TW9910 video decoder. The driver is currently orphaned. Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 7b20f325a566df27737c795176a9ae519ecc486d Author: Jacopo Mondi Date: Wed Feb 21 12:48:03 2018 -0500 media: i2c: tw9910: Remove soc_camera dependencies Remove soc_camera framework dependencies from tw9910 sensor driver. - Handle clock and gpios - Register async subdevice - Remove soc_camera specific g/s_mbus_config operations - Add kernel doc to driver interface header file - Adjust build system This commit does not remove the original soc_camera based driver as long as other platforms depends on soc_camera-based CEU driver. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 9 +++ drivers/media/i2c/Makefile | 1 + drivers/media/i2c/tw9910.c | 162 ++++++++++++++++++++++++++++----------------- include/media/i2c/tw9910.h | 9 +++ 4 files changed, 120 insertions(+), 61 deletions(-) commit e0d76c3842ee4ac417792393e7140858ae5d3b93 Author: Jacopo Mondi Date: Wed Feb 21 12:48:02 2018 -0500 media: i2c: Copy tw9910 soc_camera sensor driver Copy the soc_camera based driver in v4l2 sensor driver directory. This commit just copies the original file without modifying it. No modification to KConfig and Makefile as soc_camera framework dependencies need to be removed first in next commit. Signed-off-by: Jacopo Mondi Acked-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tw9910.c | 999 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 999 insertions(+) commit 41a7418f09299a61c65f84aa7a9014bf69cdcceb Author: Jacopo Mondi Date: Thu Feb 22 04:47:18 2018 -0500 media: MAINTAINERS: Add entry for Omnivision OV772x Add entry for Omnivision OV772x image sensor listing myself as maintainer for 'Odd fixes' only, as I currently have access to a platform for testing. Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 350894918ee932f70034e485cb91e6fdd00152bb Author: Jacopo Mondi Date: Wed Feb 21 12:48:01 2018 -0500 media: i2c: ov772x: Support frame interval handling Add support to ov772x driver for frame intervals handling and enumeration. Tested with 10MHz and 24MHz input clock at VGA and QVGA resolutions for 10, 15 and 30 frame per second rates. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov772x.c | 213 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 196 insertions(+), 17 deletions(-) commit 762c28121d7cf183db6ef70988d3b47bb60e4869 Author: Jacopo Mondi Date: Wed Feb 21 12:48:00 2018 -0500 media: i2c: ov772x: Remove soc_camera dependencies Remove soc_camera framework dependencies from ov772x sensor driver. - Handle clock and gpios - Register async subdevice - Remove soc_camera specific g/s_mbus_config operations - Change image format colorspace from JPEG to SRGB as the two use the same colorspace information but JPEG makes assumptions on color components quantization that do not apply to the sensor - Remove sizes crop from get_selection as driver can't scale - Add kernel doc to driver interface header file - Adjust build system This commit does not remove the original soc_camera based driver as long as other platforms depends on soc_camera-based CEU driver. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 11 +++ drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov772x.c | 172 ++++++++++++++++++++++++++++++--------------- include/media/i2c/ov772x.h | 6 +- 4 files changed, 133 insertions(+), 57 deletions(-) commit 1112babde21483d86ed3fbad1320b0ddf9ab2ece Author: Jacopo Mondi Date: Wed Feb 21 12:47:59 2018 -0500 media: i2c: Copy ov772x soc_camera sensor driver Copy the soc_camera based driver in v4l2 sensor driver directory. This commit just copies the original file without modifying it. No modification to KConfig and Makefile as soc_camera framework dependencies need to be removed first in next commit. Signed-off-by: Jacopo Mondi Acked-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov772x.c | 1124 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1124 insertions(+) commit 200e3e1738d6a014d32629cb5fec2c0e7c67ab6b Author: Jacopo Mondi Date: Thu Feb 22 04:47:17 2018 -0500 media: MAINTAINERS: Add entry for Renesas CEU Add entry for Renesas Capture Engine Interface listing myself as maintainer. Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 32e5a70dc8f4e9813c61e5465d72d2e9830ba0ff Author: Jacopo Mondi Date: Thu Feb 22 05:37:19 2018 -0500 media: platform: Add Renesas CEU driver Add driver for Renesas Capture Engine Unit (CEU). The CEU interface supports capturing 'data' (YUV422) and 'images' (NV[12|21|16|61]). This driver aims to replace the soc_camera-based sh_mobile_ceu one. Tested with ov7670 camera sensor, providing YUYV_2X8 data on Renesas RZ platform GR-Peach. Tested with ov7725 camera sensor on SH4 platform Migo-R. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil [hans.verkuil@cisco.com: added two 'fall-through' comments] Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 9 + drivers/media/platform/Makefile | 1 + drivers/media/platform/renesas-ceu.c | 1677 ++++++++++++++++++++++++++++++++++ 3 files changed, 1687 insertions(+) commit 20b5605240a8a650185c623065eadc1d04017a86 Author: Jacopo Mondi Date: Wed Feb 21 12:47:56 2018 -0500 media: include: media: Add Renesas CEU driver interface Add renesas-ceu header file. Do not remove the existing sh_mobile_ceu.h one as long as the original driver does not go away. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/drv-intf/renesas-ceu.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit a444e5184f329738691b06ed31addaa0edb6aa01 Author: Jacopo Mondi Date: Wed Feb 21 12:47:55 2018 -0500 media: dt-bindings: media: Add Renesas CEU bindings Add bindings documentation for Renesas Capture Engine Unit (CEU). Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/renesas,ceu.txt | 81 ++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit 52e17089d1850774d2ef583cdef2b060b84fca8c Author: Mauro Carvalho Chehab Date: Mon Feb 26 08:33:41 2018 -0500 media: imx: Don't initialize vars that won't be used As reported by gcc: + drivers/staging/media/imx/imx-media-csi.c: warning: variable 'input_fi' set but not used [-Wunused-but-set-variable]: => 671:33 + drivers/staging/media/imx/imx-media-csi.c: warning: variable 'pinctrl' set but not used [-Wunused-but-set-variable]: => 1742:18 input_fi is not used, so just remove it. However, pinctrl should be used, as it devm_pinctrl_get_select_default() is declared with attribute warn_unused_result. What's missing there is an error handling code, in case it fails. Add it. Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-csi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 225fe212a2d58c7113aa2781a3594ae8d9827ea9 Author: Mauro Carvalho Chehab Date: Mon Feb 26 08:31:28 2018 -0500 media: tvp541x: fix some kernel-doc parameters Solve the following warnings: + drivers/media/i2c/tvp514x.c: warning: Excess function parameter 'a' description in 'tvp514x_g_frame_interval': => 759 + drivers/media/i2c/tvp514x.c: warning: Excess function parameter 'a' description in 'tvp514x_s_frame_interval': => 784 + drivers/media/i2c/tvp514x.c: warning: Function parameter or member 'ival' not described in 'tvp514x_g_frame_interval': => 759 + drivers/media/i2c/tvp514x.c: warning: Function parameter or member 'ival' not described in 'tvp514x_s_frame_interval': => 784 Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tvp514x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 00d9da502565e97fcca3805eec98db6df3594ec0 Author: Mauro Carvalho Chehab Date: Mon Feb 26 08:28:22 2018 -0500 media: ov7740: remove an unused var Fix this warning regression: drivers/media/i2c/ov7740.c: warning: variable 'ret' set but not used [-Wunused-but-set-variable]: => 276:6 Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov7740.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f564184e6cc21a86c26bab920afac1bab7653ff Author: Kieran Bingham Date: Mon Jan 8 13:14:04 2018 -0500 media: i2c: adv748x: fix HDMI field heights The ADV748x handles interlaced media using V4L2_FIELD_ALTERNATE field types. The correct specification for the height on the mbus is the image height, in this instance, the field height. The AFE component already correctly adjusts the height on the mbus, but the HDMI component got left behind. Adjust the mbus height to correctly describe the image height of the fields when processing interlaced video for HDMI pipelines. Fixes: 3e89586a64df ("media: i2c: adv748x: add adv748x driver") Reviewed-by: Niklas Söderlund Signed-off-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv748x/adv748x-hdmi.c | 3 +++ 1 file changed, 3 insertions(+) commit 0018147c964e73cb6ee0d463cad534fb4309e286 Author: Kieran Bingham Date: Mon Jan 8 12:55:23 2018 -0500 media: v4l: doc: Clarify v4l2_mbus_fmt height definition The v4l2_mbus_fmt width and height corresponds directly with the v4l2_pix_format definitions, yet the differences in documentation make it ambiguous what to do in the event of field heights. Clarify this using the same text as is provided for the v4l2_pix_format which is explicit on the matter, and by matching the terminology of 'image height' rather than the misleading 'frame height'. Signed-off-by: Kieran Bingham Acked-by: Sakari Ailus Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/subdev-formats.rst | 8 ++++++-- include/uapi/linux/v4l2-mediabus.h | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit c32678eac48ad3c0ecad47f8879f9017390e358a Author: Antonio Cardace Date: Mon Feb 12 13:35:25 2018 -0500 media: gspca: dtcs033: use %*ph to print small buffer Use %*ph format to print small buffer as hex string. Remove newline at the end of the format string as it would be duplicated by the one supplied as last argument. Suggested-by: Andy Shevchenko Signed-off-by: Antonio Cardace Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/dtcs033.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ed356f110403f6acc64dcbbbfdc38662ab9b06c2 Author: Hans Verkuil Date: Mon Feb 12 06:45:32 2018 -0500 media: vivid: check if the cec_adapter is valid If CEC is not enabled for the vivid driver, then the adap pointer is NULL and 'adap->phys_addr' will fail. Cc: # for v4.12 and up Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-vid-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 290ef7d846b35205975786296388c082e50d4319 Author: Antonio Cardace Date: Fri Feb 9 09:13:26 2018 -0500 media: em28xx: use %*phC to print small buffers Use %*phC format to print small buffers as hex strings Suggested-by: Andy Shevchenko Signed-off-by: Antonio Cardace Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-i2c.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1b3963509a469c70b965c2211db4eb3427c4ef86 Author: Hans Verkuil Date: Thu Feb 8 11:55:48 2018 -0500 media: cec: improve debugging cec_transmit_msg_fh() first checked the message for errors, and only after the message was found to be valid did it log the message contents. However, that makes it hard to associate an error in the kernel log with the message since the message contents was never logged in that case. So swap the order: first log the message (once some very basic checks are done), and only after that check for errors. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit 47b934875b00fefe16a2b8a9daa88eb82be169a8 Author: Corentin Labbe Date: Thu Feb 8 03:31:07 2018 -0500 media: ivtv: remove ivtv-alsa-mixer ivtv-alsa-mixer functions was introduced in commit 269c11fbac4f ("[media] ivtv, ivtv-alsa: Add initial ivtv-alsa interface driver for ivtv") But according to commit message, ivtv-alsa-mixer.c was already dead code. 5 years after, we should remove it. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil [hans.verkuil@cisco.com: removed forgotten ivtv-alsa-mixer.h include] Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ivtv/ivtv-alsa-main.c | 11 +-- drivers/media/pci/ivtv/ivtv-alsa-mixer.c | 165 ------------------------------- drivers/media/pci/ivtv/ivtv-alsa-mixer.h | 18 ---- 3 files changed, 1 insertion(+), 193 deletions(-) commit 26a6181f3453ea108baa3e6242196d791df6e666 Author: Corentin Labbe Date: Thu Feb 8 03:26:14 2018 -0500 media: cx18: remove unused cx18-alsa-mixer cx18-alsa-mixer functions are not used since commit 4cb565cc2700 ("V4L/DVB: cx18: make it so cx18-alsa-main.c compiles") 9 year later, let's just remove them. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx18/cx18-alsa-main.c | 1 - drivers/media/pci/cx18/cx18-alsa-mixer.c | 170 ------------------------------- drivers/media/pci/cx18/cx18-alsa-mixer.h | 18 ---- 3 files changed, 189 deletions(-) commit fc49d3d7dc26a43f8d3b1874c7ddb975a49e8a8c Author: Gustavo A. R. Silva Date: Tue Feb 6 11:53:44 2018 -0500 media: platform: vivid-cec: use 64-bit arithmetic instead of 32-bit Add suffix ULL to constant 10 in order to give the compiler complete information about the proper arithmetic to use. Notice that this constant is used in a context that expects an expression of type u64 (64 bits, unsigned). The expression len * 10 * CEC_TIM_DATA_BIT_TOTAL is currently being evaluated using 32-bit arithmetic. Also, remove unnecessary parentheses and add a code comment to make it clear what is the reason of the code change. Addresses-Coverity-ID: 1454996 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-cec.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit eb64311ffc693e6e7b646a9b53631194f79b77c3 Author: Gustavo A. R. Silva Date: Tue Feb 6 11:52:24 2018 -0500 media: platform: sh_veu: use 64-bit arithmetic instead of 32-bit Cast left and top to dma_addr_t in order to give the compiler complete information about the proper arithmetic to use. Notice that these variables are being used in contexts that expect expressions of type dma_addr_t (64 bit, unsigned). Such expressions are currently being evaluated using 32-bit arithmetic. Also, move the expression (((dma_addr_t)left * veu->vfmt_out.fmt->depth) >> 3) at the end in order to avoid a line wrapping checkpatch.pl warning. Addresses-Coverity-ID: 1056807 ("Unintentional integer overflow") Addresses-Coverity-ID: 1056808 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sh_veu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8328ad0f8274d7e432124d84622c06a286b81177 Author: Gustavo A. R. Silva Date: Tue Feb 6 11:51:18 2018 -0500 media: rockchip/rga: use 64-bit arithmetic instead of 32-bit Cast p to dma_addr_t in order to avoid a potential integer overflow. This variable is being used in a context that expects an expression of type dma_addr_t (u64). The expression p << PAGE_SHIFT is currently being evaluated using 32-bit arithmetic. Addresses-Coverity-ID: 1458347 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rga/rga-buf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 07837433ca4d7cf1bfd27d4776956cc7a7bf921d Author: Gustavo A. R. Silva Date: Tue Feb 6 11:49:04 2018 -0500 media: pci: cx88-input: use 64-bit arithmetic instead of 32-bit Add suffix LL to constant 1000000 in order to give the compiler complete information about the proper arithmetic to use. Notice that this constant is used in a context that expects an expression of type ktime_t (64 bits, signed). The expression ir->polling * 1000000 is currently being evaluated using 32-bit arithmetic. Addresses-Coverity-ID: 1392628 ("Unintentional integer overflow") Addresses-Coverity-ID: 1392630 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx88/cx88-input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a2603d1748fddaa44b70b027737ba077145f261c Author: Gustavo A. R. Silva Date: Tue Feb 6 11:47:37 2018 -0500 media: i2c: max2175: use 64-bit arithmetic instead of 32-bit Add suffix LL to constant 2 in order to give the compiler complete information about the proper arithmetic to use. Notice that this constant is used in a context that expects an expression of type s64 (64 bits, signed). The expression 2 * (clock_rate - abs_nco_freq) is currently being evaluated using 32-bit arithmetic. Addresses-Coverity-ID: 1446589 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/max2175.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91e0c0c1b05230d703395965d4bf298705819641 Author: Gustavo A. R. Silva Date: Tue Feb 6 11:47:09 2018 -0500 media: dvb-frontends: ves1820: use 64-bit arithmetic instead of 32-bit Add suffix ULL to constant 10 in order to give the compiler complete information about the proper arithmetic to use. Notice that this constant is used in a context that expects an expression of type u64 (64 bits, unsigned). The expression fpxin = state->config->xin * 10 is currently being evaluated using 32-bit arithmetic. Addresses-Coverity-ID: 200604 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/ves1820.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ae207fa7b70e7bd3bc0f3e5e3704edf55e45b68 Author: Gustavo A. R. Silva Date: Tue Feb 6 11:46:59 2018 -0500 media: rtl2832: use 64-bit arithmetic instead of 32-bit in rtl2832_set_frontend Add suffix ULL to constant 7 in order to give the compiler complete information about the proper arithmetic to use. Notice that this constant is used in a context that expects an expression of type u64 (64 bits, unsigned). The expression dev->pdata->clk * 7 is currently being evaluated using 32-bit arithmetic. Addresses-Coverity-ID: 1271223 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/rtl2832.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d13a0139d7874a0577b5955d6eed895517d23b72 Author: Masami Hiramatsu Date: Tue Feb 6 03:02:23 2018 -0500 media: vb2: Fix videobuf2 to map correct area Fixes vb2_vmalloc_get_userptr() to ioremap correct area. Since the current code does ioremap the page address, if the offset > 0, it does not do ioremap the last page and results in kernel panic. This fixes to pass the size + offset to ioremap so that ioremap can map correct area. Also, this uses __pfn_to_phys() to get the physical address of given PFN. Signed-off-by: Masami Hiramatsu Reported-by: Takao Orito Reported-by: Fumihiro ATSUMI Reviewed-by: Marek Szyprowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/videobuf2/videobuf2-vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14351d44830ec00b8c66b44c8c866944da678c33 Author: Alexandre Courbot Date: Sun Feb 4 21:33:04 2018 -0500 media: v4l2_fh.h: add missing kconfig.h include v4l2_fh.h uses the IS_ENABLED() macro and thus should include kconfig.h. Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-fh.h | 1 + 1 file changed, 1 insertion(+) commit ac09b2ad5c291792586c81e877eaa3e7a4f1203b Author: Alexandre Courbot Date: Sun Feb 4 21:24:43 2018 -0500 media: v4l: vidioc-prepare-buf.rst: fix link to VIDIOC_QBUF The description for VIDIOC_PREPARE_BUF results in the following sentence: "...before actually enqueuing it, using the ioctl VIDIOC_QBUF, VIDIOC_DQBUF ioctl...". The intent is to only refer to VIDIOC_QBUF though, so fix this. Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-prepare-buf.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97eee23a25f9d6b53b575bee59fea74f69d3ca3e Author: Hans Verkuil Date: Sat Feb 3 08:18:14 2018 -0500 media: v4l2-ctrls.h: fix wrong copy-and-paste comment The __v4l2_ctrl_modify_range is the unlocked variant, so the comment about taking a lock is obviously wrong. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-ctrls.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 03703ed1debf777ea845aa9b50ba2e80a5e7dd3c Author: Sakari Ailus Date: Fri Feb 2 05:08:59 2018 -0500 media: vb2: core: Finish buffers at the end of the stream If buffers were prepared or queued and the buffers were released without starting the queue, the finish mem op (corresponding to the prepare mem op) was never called to the buffers. Before commit a136f59c0a1f there was no need to do this as in such a case the prepare mem op had not been called yet. Address the problem by explicitly calling finish mem op when the queue is stopped if the buffer is in either prepared or queued state. Fixes: a136f59c0a1f ("[media] vb2: Move buffer cache synchronisation to prepare from queue") Cc: stable@vger.kernel.org # for v4.13 and up Signed-off-by: Sakari Ailus Tested-by: Devin Heitmueller Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/videobuf2/videobuf2-core.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 65243386f41d38460bfd4375d231a7c0346d0401 Author: Hans Verkuil Date: Thu Feb 1 02:36:33 2018 -0500 media: vivid: fix incorrect capabilities for radio The vivid driver has two custom controls that change the behavior of RDS. Depending on the control setting the V4L2_CAP_READWRITE capability is toggled. However, after an earlier commit the capability was no longer set correctly. This is now fixed. Fixes: 9765a32cd8 ("vivid: set device_caps in video_device") Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-ctrls.c | 2 ++ 1 file changed, 2 insertions(+) commit 67300abdbe9f1717532aaf4e037222762716d0f6 Author: Colin Ian King Date: Wed Jan 31 12:33:09 2018 -0500 media: cx25821: prevent out-of-bounds read on array card Currently an out of range dev->nr is detected by just reporting the issue and later on an out-of-bounds read on array card occurs because of this. Fix this by checking the upper range of dev->nr with the size of array card (removes the hard coded size), move this check earlier and also exit with the error -ENOSYS to avoid the later out-of-bounds array read. Detected by CoverityScan, CID#711191 ("Out-of-bounds-read") Fixes: commit 02b20b0b4cde ("V4L/DVB (12730): Add conexant cx25821 driver") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil [hans.verkuil@cisco.com: %ld -> %zd] Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx25821/cx25821-core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 7b73ce9d4cd851b81e43025b44813de9920d0b7d Author: Niklas Söderlund Date: Thu Jan 25 08:08:52 2018 -0500 media: v4l2-dev.h: fix symbol collision in media_entity_to_video_device() A recent change to the media_entity_to_video_device() macro breaks some use-cases for the macro due to a symbol collision. Before the change this worked: vdev = media_entity_to_video_device(link->sink->entity); While after the change it results in a compiler error "error: 'struct video_device' has no member named 'link'; did you mean 'lock'?". While the following still works after the change. struct media_entity *entity = link->sink->entity; vdev = media_entity_to_video_device(entity); Fix the collision by renaming the macro argument to '__entity'. Fixes: 69b925c5fc36d8f1 ("media: v4l2-dev.h: add kernel-doc to two macros") Signed-off-by: Niklas Söderlund Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-dev.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d2d476b705b4930427d2efc38cfe0ea0c5d1cb4c Author: Christopher Díaz Riveros Date: Wed Jan 24 16:40:43 2018 -0500 media: s2255drv: Remove unneeded if else blocks Given the following definitions from s2255drv.c #define LINE_SZ_4CIFS_NTSC 640 #define LINE_SZ_2CIFS_NTSC 640 #define LINE_SZ_1CIFS_NTSC 320 and #define LINE_SZ_4CIFS_PAL 704 #define LINE_SZ_2CIFS_PAL 704 #define LINE_SZ_1CIFS_PAL 352 f->fmt.pix.width possible values can be reduced to LINE_SZ_4CIFS_NTSC or LINE_SZ_1CIFS_NTSC. This patch removes unneeded if else blocks in vidioc_try_fmt_vid_cap function. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Díaz Riveros Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/s2255/s2255drv.c | 8 -------- 1 file changed, 8 deletions(-) commit b605687cf517ee2b900f63f7bd99b67555531b10 Author: Gustavo A. R. Silva Date: Tue Jan 23 19:43:40 2018 -0500 media: staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR Fix inconsistent IS_ERR and PTR_ERR in vdic_get_ipu_resources. The proper pointer to be passed as argument is ch. This issue was detected with the help of Coccinelle. Fixes: 0b2e9e7947e7 ("media: staging/imx: remove confusing IS_ERR_OR_NULL usage") Signed-off-by: Gustavo A. R. Silva Acked-by: Steve Longerbeam Acked-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-vdic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee9568aa5830f607edc4c21b80b82b0e0fd1be77 Author: Gustavo A. R. Silva Date: Tue Jan 23 12:54:53 2018 -0500 media: venus: hfi: use true for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/hfi_msgs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 59e18d7c508351b9c0a4e84fa0699be163337a8e Author: Gustavo Padovan Date: Mon Jan 22 07:32:18 2018 -0500 media: buffer.rst: fix link text of VIDIOC_QBUF The link was showing both VIDIOC_QBUF, VIDIOC_DQBUF while it should show only VIDIOC_QBUF in this case. Signed-off-by: Gustavo Padovan Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/buffer.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 648f828c1fd028dc0426dfcbd2c407b412b27691 Author: Wei Yongjun Date: Wed Jan 17 06:24:52 2018 -0500 media: rcar_drif: fix error return code in rcar_drif_alloc_dmachannels() Fix to return error code -ENODEV from the dma_request_slave_channel() error handling case instead of 0, as done elsewhere in this function. rc can be overwrite to 0 by dmaengine_slave_config() in the for loop. Signed-off-by: Wei Yongjun Reviewed-by: Geert Uytterhoeven Reviewed-by: Ramesh Shanmugasundaram Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar_drif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8a695a6cfabec094bb4281b3d47c2f7d021713c3 Author: Ian Douglas Scott Date: Sun Jan 14 19:27:55 2018 -0500 media: usbtv: Add USB ID 1f71:3306 to the UTV007 driver Add support for a new USB ID in this driver. Signed-off-by: Ian Douglas Scott [hans.verkuil@cisco.com: add commit message] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/usbtv/usbtv-core.c | 1 + 1 file changed, 1 insertion(+) commit f61c7bd9c9aff16cb727305769e1eeff732d9f28 Author: Shuah Khan Date: Thu Jan 11 17:26:22 2018 -0500 media: v4l2-core: v4l2-mc: Add SPDX license identifier Replace GPL license statement with SPDX GPL-2.0 license identifier. Signed-off-by: Shuah Khan Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-mc.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit c2e0e1ba6c5c25e45ff3da1f16e013c5910bee58 Author: Tomasz Figa Date: Tue Jan 9 03:42:47 2018 -0500 media: mtk-vcodec: Always signal source change event on format change Currently the driver signals the source change event only in case of a midstream resolution change, however the initial format detection is also defined as a source change by the V4L2 codec API specification. Fix this by signaling the event after the initial header is parsed as well. Signed-off-by: Tomasz Figa Reviewed-by: Wu-Cheng Li Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 2 ++ 1 file changed, 2 insertions(+) commit 20fd17ff35106d60f278c78bb783994c6747866b Author: Robin Murphy Date: Wed Feb 7 14:32:55 2018 +0000 arm64: dts: juno: Describe the full GICv2m region Juno's GICv2m implementation consists of four frames providing 32 interrupts each. Since it is possible to plug in enough PCIe endpoints to consume more than 32 MSIs, and the driver already has a bodge to handle multiple frames, let's expose the other three as well. Signed-off-by: Robin Murphy Signed-off-by: Marc Zyngier Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-base.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 50e7044535537b2a54c7ab798cd34c7f6d900bd2 Author: Oliver Neukum Date: Mon Jan 8 09:21:07 2018 -0500 media: usbtv: prevent double free in error case Quoting the original report: It looks like there is a double-free vulnerability in Linux usbtv driver on an error path of usbtv_probe function. When audio registration fails, usbtv_video_free function ends up freeing usbtv data structure, which gets freed the second time under usbtv_video_fail label. usbtv_audio_fail: usbtv_video_free(usbtv); => v4l2_device_put(&usbtv->v4l2_dev); => v4l2_device_put => kref_put => v4l2_device_release => usbtv_release (CALLBACK) => kfree(usbtv) (1st time) usbtv_video_fail: usb_set_intfdata(intf, NULL); usb_put_dev(usbtv->udev); kfree(usbtv); (2nd time) So, as we have refcounting, use it Reported-by: Yavuz, Tuba Signed-off-by: Oliver Neukum CC: stable@vger.kernel.org Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/usbtv/usbtv-core.c | 2 ++ 1 file changed, 2 insertions(+) commit 81b9de43599c59a3d5bd3e6e8645cb20b87840bc Author: Xiongfeng Wang Date: Mon Jan 8 07:40:59 2018 -0500 media: media-device: use strlcpy() instead of strncpy() gcc-8 reports drivers/media/media-device.c: In function 'media_device_get_topology': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 64 equals destination size [-Wstringop-truncation] We need to use strlcpy() to make sure the dest string is nul-terminated. Signed-off-by: Xiongfeng Wang Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 664878184f831c87031988a03078cb7bc0a990d2 Author: Philipp Zabel Date: Thu Jan 4 10:58:55 2018 -0500 media: coda: bump maximum number of internal framebuffers to 19 While the h.264 standard only allows up to 16 reference frames, the CODA firmware needs two more buffers: one to hold the currently decoded frame and one for the display frame. Adding the framebuffer needed by the driver for VDOA operation brings the total to a maximum of 19 internal framebuffers. Lift the current maximum of 17 internal framebuffers to allow playback of high profile streams that require more than 14 reference frames. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5f3f1047e57aa1e2c9a66df6b86c5c802023b6f Author: Arnd Bergmann Date: Thu Jan 4 08:43:50 2018 -0500 media: au0828: fix VIDEO_V4L2 dependency After the move of videobuf2 into the common directory, selecting the au0828 driver with CONFIG_V4L2 disabled started causing a link failure, as we now attempt to build videobuf2 but it still requires v4l2: ERROR: "v4l2_event_pending" [drivers/media/common/videobuf/videobuf2-v4l2.ko] undefined! ERROR: "v4l2_fh_release" [drivers/media/common/videobuf/videobuf2-v4l2.ko] undefined! ERROR: "video_devdata" [drivers/media/common/videobuf/videobuf2-v4l2.ko] undefined! ERROR: "__tracepoint_vb2_buf_done" [drivers/media/common/videobuf/videobuf2-core.ko] undefined! ERROR: "__tracepoint_vb2_dqbuf" [drivers/media/common/videobuf/videobuf2-core.ko] undefined! ERROR: "v4l_vb2q_enable_media_source" [drivers/media/common/videobuf/videobuf2-core.ko] undefined! We want to be able to build the core au0828 support without V4L2, so this makes the 'select' conditional on V4L2, and refines the dependencies in VIDEO_AU0828_V4L2 so it can only be enabled in the exact conditions that have VIDEOBUF2_VMALLOC reachable. Fixes: 03fbdb2fc2b8 ("media: move videobuf2 to drivers/media/common") Fixes: 05439b1a3693 ("[media] media: au0828 - convert to use videobuf2") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c7b7187b4626e8a52248699e1dc7e4ff50a5aa6e Author: Wei Yongjun Date: Fri Dec 22 20:57:04 2017 -0500 media: atmel-isc: Make local symbol fmt_configs_list static Fixes the following sparse warning: drivers/media/platform/atmel/atmel-isc.c:338:19: warning: symbol 'fmt_configs_list' was not declared. Should it be static? Signed-off-by: Wei Yongjun Acked-by: Wenyou Yang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8943c7a18fb7b7b2dde2ffe384c3889372826456 Author: Philipp Zabel Date: Tue Dec 19 06:42:32 2017 -0500 media: imx: allow to build with COMPILE_TEST Allow building this driver for other platforms under COMPILE_TEST. Suggested-by: Mauro Carvalho Chehab Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1d1ca23bcbf84b8c169733ebe7ed8eb69330be31 Author: Philipp Zabel Date: Mon Dec 18 05:16:29 2017 -0500 media: coda: Add i.MX51 (CodaHx4) support Add support for the CodaHx4 VPU used on i.MX51. Decoding h.264, MPEG-4, and MPEG-2 video works, as well as encoding h.264. MPEG-4 encoding is not enabled, it currently produces visual artifacts. Signed-off-by: Philipp Zabel Reviewed-by: Fabio Estevam Signed-off-by: Hans Verkuil [hans.verkuil@cisco.com: fix (bogus) sparse warning about uninited me_bits] Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 46 +++++++++++++++++++++++-------- drivers/media/platform/coda/coda-common.c | 44 ++++++++++++++++++++++++++--- drivers/media/platform/coda/coda.h | 1 + 3 files changed, 75 insertions(+), 16 deletions(-) commit 9f57ccdcf4ab86c5d0149d39458ccce2a229c9ec Author: Philipp Zabel Date: Mon Dec 18 05:16:28 2017 -0500 media: dt-bindings: coda: Add compatible for CodaHx4 on i.MX51 Add a compatible for the CodaHx4 VPU used on i.MX51. Signed-off-by: Philipp Zabel Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/coda.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8d0f6e13f9e5bacbd62ae0e8b16ab2e21728efd3 Author: Benjamin Gaignard Date: Tue Dec 5 09:51:07 2017 -0500 media: platform: stm32: Adopt SPDX identifier Add SPDX identifiers to files under stm32 directory Signed-off-by: Benjamin Gaignard Acked-by: Philippe Ombredanne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/stm32/stm32-cec.c | 5 +---- drivers/media/platform/stm32/stm32-dcmi.c | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) commit 6eb17d70932b5fbe25d9e7fc6d45d29d7a6cdf94 Author: Olivier Moysan Date: Mon Feb 19 16:00:37 2018 +0100 ASoC: stm32: sai: Add support of S/PDIF playback Add support of S/PDIF iec60958 playback on STM32 SAI. Signed-off-by: olivier moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_sai.c | 2 + sound/soc/stm/stm32_sai.h | 2 + sound/soc/stm/stm32_sai_sub.c | 153 +++++++++++++++++++++++++++++++++++------- 3 files changed, 133 insertions(+), 24 deletions(-) commit 994f46610bafd75a5881544bce9dd3acdbe3626a Author: Olivier Moysan Date: Mon Feb 19 16:00:35 2018 +0100 ASoC: stm32: Add S/PDIF to SAI bindings Add S/PDIF IEC6958 protocol support to STM32 SAI bindings. Signed-off-by: olivier moysan Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/st,stm32-sai.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 8596c5c36c0473ca086dc851e5bd90452b3355d9 Merge: 037002b 7864809 Author: Mark Brown Date: Mon Feb 26 11:18:36 2018 +0000 Merge branch 'topic/generic-dmaengine' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-stm32 commit 78648092ef46255e6dc6685202164199c86cf930 Author: Olivier Moysan Date: Mon Feb 19 16:00:36 2018 +0100 ASoC: dmaengine_pcm: add processing support Allow dmaengine client to optionally register a processing callback. This callback is intended to apply processing on samples in buffer copied from/to user space, before/after DMA transfer. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown include/sound/dmaengine_pcm.h | 3 ++ sound/soc/soc-generic-dmaengine-pcm.c | 62 +++++++++++++++++++++++++++++++++-- 2 files changed, 63 insertions(+), 2 deletions(-) commit 31895662f9ba81e8ea9ef05abf8edcb29d4b9c18 Author: Maxime Ripard Date: Wed Feb 21 10:20:25 2018 +0100 regmap: mmio: Add function to attach a clock regmap_init_mmio_clk allows to specify a clock that needs to be enabled while accessing the registers. However, that clock is retrieved through its clock ID, which means it will lookup that clock based on the current device that registers the regmap, and, in the DT case, will only look in that device OF node. This might be problematic if the clock to enable is stored in another node. Let's add a function that allows to attach a clock that has already been retrieved to a regmap in order to fix this. Signed-off-by: Maxime Ripard Signed-off-by: Mark Brown drivers/base/regmap/regmap-mmio.c | 24 ++++++++++++++++++++++++ include/linux/regmap.h | 3 +++ 2 files changed, 27 insertions(+) commit 7ed310bd51bec0b440a551fc4da1993c7f6cd231 Author: Fabio Estevam Date: Thu Feb 22 16:02:22 2018 -0300 ASoC: soc-generic-dmaengine-pcm: Fix sparse warnings Currently the following sparse warnings are observed: sound/soc/soc-generic-dmaengine-pcm.c:185:34: warning: restricted snd_pcm_format_t degrades to integer sound/soc/soc-generic-dmaengine-pcm.c:186:66: warning: incorrect type in argument 1 (different base types) sound/soc/soc-generic-dmaengine-pcm.c:186:66: expected restricted snd_pcm_format_t [usertype] format sound/soc/soc-generic-dmaengine-pcm.c:186:66: got int [signed] [assigned] i Fix it by changing the loop variable to be of 'snd_pcm_format_t'. Also introduce a SNDRV_PCM_FORMAT_FIRST label, which corresponds to the first member (index 0) of the snd_pcm_format_t formats. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown include/uapi/sound/asound.h | 1 + sound/soc/soc-generic-dmaengine-pcm.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit f91b1e73ccde71d4bc69ae10d475196df38844ab Author: Fabio Estevam Date: Thu Feb 22 16:02:21 2018 -0300 ASoC: soc-generic-dmaengine-pcm: Fix error handling When dmaengine_pcm_request_chan_of() fails it should release the previously acquired resources, which in this case is to call kfree(pcm), so jump to the correct point in the error path. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/soc-generic-dmaengine-pcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4e3630101261f6ef8bf7ae171ace957d5753d093 Merge: f0b3bdb 03a0dde Author: Mark Brown Date: Mon Feb 26 11:05:04 2018 +0000 Merge branch 'topic/component-platform' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into HEAD commit f3768b0bc2e924477b6ca20c2293e8d51d948431 Author: Simon Horman Date: Fri Feb 23 09:51:15 2018 +0100 arm64: defconfig: enable R8A77965 SoC Enable the Renesas R-Car M3-N (R8A77965) SoC in the ARM64 defconfig. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit fb44f3cec35c6e71865012fa281ba6d4ff50a99a Author: Charles Keepax Date: Thu Feb 22 12:59:14 2018 +0000 regmap: Merge redundant handling in regmap_bulk_write The handling for the first two cases in regmap_bulk_write is essentially identical. The first case is just a better implementation of the second, supporting 8 byte registers and doing the locking manually to avoid bouncing the lock for each register. Drop some redundant code by removing the second of these cases and allowing both situations to be handled by the same code. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 39 +++------------------------------------ 1 file changed, 3 insertions(+), 36 deletions(-) commit 364e378b8d1679f91a29a9537a881bba17931cfb Author: Charles Keepax Date: Thu Feb 22 12:59:13 2018 +0000 regmap: Tidy up regmap_raw_write chunking code Raw writes may need to be split into small chunks if max_raw_write is set. Tidy up the code implementing this, the new code is slightly clearer, slightly shorter and slightly more efficient. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) commit 7ef2c6b8689a084954cffbd102ee49c2fb72cbd4 Author: Charles Keepax Date: Thu Feb 22 12:59:12 2018 +0000 regmap: Move the handling for max_raw_write into regmap_raw_write Currently regmap_bulk_write will split a write into chunks before calling regmap_raw_write if max_raw_write is set. It is more logical for this handling to be inside regmap_raw_write itself, as this removes the need to keep re-implementing the chunking code, which would be the same for all users of regmap_raw_write. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 117 ++++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 63 deletions(-) commit b4ecfec5ee3f282a4ac0876de332876fec9b488c Author: Charles Keepax Date: Thu Feb 22 12:59:11 2018 +0000 regmap: Remove unnecessary printk for failed allocation Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0812d8ffa9955251ba0077488d4408d8987ec091 Author: Charles Keepax Date: Thu Feb 22 12:59:10 2018 +0000 regmap: Format data for raw write in regmap_bulk_write In the case were the bulk transaction is split up into smaller chunks data is passed directly to regmap_raw_write. However regmap_bulk_write uses data in host endian and regmap_raw_write expects data in device endian. As such if the host and device differ in endian the wrong data will be written to the device. Correct this issue using a similar approach to the single raw write case below it, duplicate the data into a new buffer and use parse_inplace to format the data correctly. Fixes: adaac459759d ("regmap: Introduce max_raw_read/write for regmap_bulk_read/write") Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 2936e846c4e6df2df0dd6bcade3d269e17a707d1 Merge: 186ba2e f00e710 Author: Mark Brown Date: Mon Feb 26 11:00:14 2018 +0000 Merge branch 'fix/core' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into regmap-bulk commit 61fc060c40e6b92350c08a210619fc7d93c61e42 Author: Charles Keepax Date: Mon Feb 26 10:49:47 2018 +0000 ASoC: wm_adsp: Support streams which can start/stop with DSP active Clear the buffer data structure on each trigger start such that the buffer is in a sensible state even if the DSP itself didn't restart. This is necessary to support voice control streams which can trigger multiple times without reloading the firmware. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit b995ff3b3017073f5251be9d525b3741e631c30f Author: Maciej S. Szmigiero Date: Fri Feb 23 15:55:17 2018 +0100 Revert "gpio: winbond: fix ISA_BUS_API dependency" This reverts commit 92a8046c9d952a2a7d21dfcd3afadc72a0bc0f72. Now that the patch series changing ISA_BUS_API dependency to selection was merged this reversion will do the same for gpio-winbond driver to make it consistent with other ISA bus gpio drivers. Signed-off-by: Maciej S. Szmigiero Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b597ff47053c9f53384a3a26dcc4c4316a375e5 Author: Colin Ian King Date: Fri Feb 23 14:37:38 2018 +0000 ASoC: pxa: remove duplicated bit-wise or of SNDRV_PCM_FMTBIT_S24_LE Bit pattern SNDRV_PCM_FMTBIT_S24_LE is being bit-wise or'd twice; remove the redundant 2nd SNDRV_PCM_FMTBIT_S24_LE Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/pxa/mmp-sspa.c | 1 - 1 file changed, 1 deletion(-) commit f49f49aa1541615f1f77bf2c62f184459825ed92 Author: Colin Ian King Date: Fri Feb 23 12:41:17 2018 +0000 ASoC: sirf: remove duplicated bit-wise or of USP_RXFIFO_THD_INT Bit pattern USP_RXFIFO_THD_INT is being bit-wise or'd twice; remove the redundant 2nd USP_RXFIFO_THD_INT Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/sirf/sirf-usp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 398fa30bf138fd4b928dc11422abfe5486aaa8fe Author: Katsuhiro Suzuki Date: Fri Feb 23 21:17:01 2018 +0900 ASoC: uniphier: fix broken sound if use SRC in replay This patch fixes settings for ports with SRC. These ports need to set the fixed audio rate and clock. If not, the SRC outputs broken sound. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown sound/soc/uniphier/aio-core.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit c53507778998d45543b27266742d04cd384de356 Author: Leo Yan Date: Mon Feb 26 09:19:12 2018 +0800 samples/bpf: Add program for CPU state statistics CPU is active when have running tasks on it and CPUFreq governor can select different operating points (OPP) according to different workload; we use 'pstate' to present CPU state which have running tasks with one specific OPP. On the other hand, CPU is idle which only idle task on it, CPUIdle governor can select one specific idle state to power off hardware logics; we use 'cstate' to present CPU idle state. Based on trace events 'cpu_idle' and 'cpu_frequency' we can accomplish the duration statistics for every state. Every time when CPU enters into or exits from idle states, the trace event 'cpu_idle' is recorded; trace event 'cpu_frequency' records the event for CPU OPP changing, so it's easily to know how long time the CPU stays in the specified OPP, and the CPU must be not in any idle state. This patch is to utilize the mentioned trace events for pstate and cstate statistics. To achieve more accurate profiling data, the program uses below sequence to insure CPU running/idle time aren't missed: - Before profiling the user space program wakes up all CPUs for once, so can avoid to missing account time for CPU staying in idle state for long time; the program forces to set 'scaling_max_freq' to lowest frequency and then restore 'scaling_max_freq' to highest frequency, this can ensure the frequency to be set to lowest frequency and later after start to run workload the frequency can be easily to be changed to higher frequency; - User space program reads map data and update statistics for every 5s, so this is same with other sample bpf programs for avoiding big overload introduced by bpf program self; - When send signal to terminate program, the signal handler wakes up all CPUs, set lowest frequency and restore highest frequency to 'scaling_max_freq'; this is exactly same with the first step so avoid to missing account CPU pstate and cstate time during last stage. Finally it reports the latest statistics. The program has been tested on Hikey board with octa CA53 CPUs, below is one example for statistics result, the format mainly follows up Jesper Dangaard Brouer suggestion. Jesper reminds to 'get printf to pretty print with thousands separators use %' and setlocale(LC_NUMERIC, "en_US")', tried three different arm64 GCC toolchains (5.4.0 20160609, 6.2.1 20161016, 6.3.0 20170516) but all of them cannot support printf flag character %' on arm64 platform, so go back print number without grouping mode. CPU states statistics: state(ms) cstate-0 cstate-1 cstate-2 pstate-0 pstate-1 pstate-2 pstate-3 pstate-4 CPU-0 767 6111 111863 561 31 756 853 190 CPU-1 241 10606 107956 484 125 646 990 85 CPU-2 413 19721 98735 636 84 696 757 89 CPU-3 84 11711 79989 17516 909 4811 5773 341 CPU-4 152 19610 98229 444 53 649 708 1283 CPU-5 185 8781 108697 666 91 671 677 1365 CPU-6 157 21964 95825 581 67 566 684 1284 CPU-7 125 15238 102704 398 20 665 786 1197 Cc: Daniel Lezcano Cc: Vincent Guittot Signed-off-by: Leo Yan Signed-off-by: Daniel Borkmann samples/bpf/Makefile | 4 + samples/bpf/cpustat_kern.c | 281 +++++++++++++++++++++++++++++++++++++++++++++ samples/bpf/cpustat_user.c | 219 +++++++++++++++++++++++++++++++++++ 3 files changed, 504 insertions(+) commit 250be9d61cf8898b1eea140fa31fe7713c49e989 Author: Shanker Donthineni Date: Mon Feb 19 09:38:07 2018 -0600 KVM: arm/arm64: No need to zero CNTVOFF in kvm_timer_vcpu_put() for VHE In AArch64/AArch32, the virtual counter uses a fixed virtual offset of zero in the following situations as per ARMv8 specifications: 1) HCR_EL2.E2H is 1, and CNTVCT_EL0/CNTVCT are read from EL2. 2) HCR_EL2.{E2H, TGE} is {1, 1}, and either: — CNTVCT_EL0 is read from Non-secure EL0 or EL2. — CNTVCT is read from Non-secure EL0. So, no need to zero CNTVOFF_EL2/CNTVOFF for VHE case. Acked-by: Marc Zyngier Acked-by: Christoffer Dall Signed-off-by: Shanker Donthineni Signed-off-by: Christoffer Dall virt/kvm/arm/arch_timer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b9fb17395b956079e2c3961a310f6a961a7de6e6 Author: Jérémy Fanguède Date: Tue Feb 13 11:41:16 2018 +0100 KVM: arm: Enable emulation of the physical timer Set the handlers to emulate read and write operations for CNTP_CTL, CNTP_CVAL and CNTP_TVAL registers in such a way that VMs can use the physical timer. Signed-off-by: Jérémy Fanguède Signed-off-by: Christoffer Dall arch/arm/kvm/coproc.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit eac137b4a9d66d1ef2f1963b7c1dd6ab5ca57d4f Author: Jérémy Fanguède Date: Thu Feb 8 12:57:19 2018 +0100 KVM: arm64: Enable the EL1 physical timer for AArch32 guests Some 32bits guest OS can use the CNTP timer, however KVM does not handle the accesses, injecting a fault instead. Use the proper handlers to emulate the EL1 Physical Timer (CNTP) register accesses of AArch32 guests. Signed-off-by: Jérémy Fanguède Signed-off-by: Alvise Rigo Signed-off-by: Christoffer Dall arch/arm64/kvm/sys_regs.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 005781be127fced5f2dd83134c3a99b2bfc7151e Author: Dave Martin Date: Fri Dec 1 15:19:40 2017 +0000 arm64: KVM: Move CPU ID reg trap setup off the world switch path The HCR_EL2.TID3 flag needs to be set when trapping guest access to the CPU ID registers is required. However, the decision about whether to set this bit does not need to be repeated at every switch to the guest. Instead, it's sufficient to make this decision once and record the outcome. This patch moves the decision to vcpu_reset_hcr() and records the choice made in vcpu->arch.hcr_el2. The world switch code can then load this directly when switching to the guest without the need for conditional logic on the critical path. Signed-off-by: Dave Martin Suggested-by: Christoffer Dall Cc: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_emulate.h | 8 ++++++++ arch/arm64/kvm/hyp/switch.c | 4 ---- 2 files changed, 8 insertions(+), 4 deletions(-) commit cc33c4e20185a391766ed5e78e2acc97e17ba511 Author: Mark Rutland Date: Tue Feb 13 13:39:23 2018 +0000 arm64/kvm: Prohibit guest LOR accesses We don't currently limit guest accesses to the LOR registers, which we neither virtualize nor context-switch. As such, guests are provided with unusable information/controls, and are not isolated from each other (or the host). To prevent these issues, we can trap register accesses and present the illusion LORegions are unssupported by the CPU. To do this, we mask ID_AA64MMFR1.LO, and set HCR_EL2.TLOR to trap accesses to the following registers: * LORC_EL1 * LOREA_EL1 * LORID_EL1 * LORN_EL1 * LORSA_EL1 ... when trapped, we inject an UNDEFINED exception to EL1, simulating their non-existence. As noted in D7.2.67, when no LORegions are implemented, LoadLOAcquire and StoreLORelease must behave as LoadAcquire and StoreRelease respectively. We can ensure this by clearing LORC_EL1.EN when a CPU's EL2 is first initialized, as the host kernel will not modify this. Signed-off-by: Mark Rutland Cc: Vladimir Murzin Cc: Catalin Marinas Cc: Christoffer Dall Cc: Marc Zyngier Cc: Will Deacon Cc: kvmarm@lists.cs.columbia.edu Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_arm.h | 4 +++- arch/arm64/include/asm/sysreg.h | 6 ++++++ arch/arm64/kernel/head.S | 7 +++++++ arch/arm64/kvm/sys_regs.c | 20 ++++++++++++++++++++ 4 files changed, 36 insertions(+), 1 deletion(-) commit fbd452aeb49e552e7278c25c63198caa918deb04 Author: Ulrich Hecht Date: Thu Feb 15 13:01:30 2018 +0100 pinctrl: sh-pfc: r8a77995: Add VIN4 pins, groups and function This patch adds VIN4 pins, groups and function for the R8A77995 (D3) SoC. Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 192 ++++++++++++++++++++++++++++++++++ 1 file changed, 192 insertions(+) commit 6b4de408105fc51e85e55937e049503f30f8c633 Author: Ulrich Hecht Date: Thu Feb 15 13:01:29 2018 +0100 pinctrl: sh-pfc: r8a7795: Add VIN4, VIN5 pins, groups and functions This patch adds VIN4 and VIN5 pins, groups and functions for the R8A7795 SoC. Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 454 +++++++++++++++++++++++++++++++++++ 1 file changed, 454 insertions(+) commit 8db6cbabac4f2a02ccbce1dbf6845245f38d11f4 Author: Ulrich Hecht Date: Thu Feb 15 13:01:28 2018 +0100 pinctrl: sh-pfc: r8a7796: Add VIN4, VIN5 pins, groups and functions This patch adds VIN4 and VIN5 pins, groups and functions for the R8A7796 SoC. Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 454 +++++++++++++++++++++++++++++++++++ 1 file changed, 454 insertions(+) commit 7ce36da900c0a2ff4777d9ba51c4f1cb74205463 Author: Jacopo Mondi Date: Tue Feb 20 16:12:03 2018 +0100 clk: renesas: cpg-mssr: Add support for R-Car M3-N Initial support for R-Car M3-N (r8a77965), including core and module clocks. Based on Table 8.2d of "R-Car Series, 3rd Generation User's Manual: Hardware (Rev. 0.80, Oct 31, 2017)". Signed-off-by: Jacopo Mondi Signed-off-by: Geert Uytterhoeven .../devicetree/bindings/clock/renesas,cpg-mssr.txt | 5 +- drivers/clk/renesas/Kconfig | 5 + drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/r8a77965-cpg-mssr.c | 334 +++++++++++++++++++++ drivers/clk/renesas/renesas-cpg-mssr.c | 6 + drivers/clk/renesas/renesas-cpg-mssr.h | 1 + include/dt-bindings/clock/r8a77965-cpg-mssr.h | 62 ++++ 7 files changed, 412 insertions(+), 2 deletions(-) commit 1ea4fe84973854a7302e4d1c479f10ae25a93e4a Merge: ef61f8a 4440977 Author: Ingo Molnar Date: Mon Feb 26 08:45:20 2018 +0100 Merge branch 'x86/boot' into x86/mm, to unify branches Both x86/mm and x86/boot contain 5-level paging related patches, unify them to have a single tree to work against. Signed-off-by: Ingo Molnar commit ef61f8a340fd6d49df6b367785743febc47320c1 Author: Jan H. Schönherr Date: Sat Feb 3 00:10:20 2018 +0100 x86/boot/e820: Implement a range manipulation operator Add a more versatile memmap= operator, which -- in addition to all the things that were possible before -- allows you to: - redeclare existing ranges -- before, you were limited to adding ranges; - drop any range -- like a mem= for any location; - use any e820 memory type -- not just some predefined ones. The syntax is: memmap=%-+ Size and offset work as usual. The "-" and "+" are optional and their existence determine the behavior: The command works on the specified range of memory limited to type (if specified). This memory is then configured to show up as . If is not specified, the memory is removed from the e820 map. Signed-off-by: Jan H. Schönherr Cc: Andy Lutomirski Cc: Andy Shevchenko Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180202231020.15608-1-jschoenh@amazon.de Signed-off-by: Ingo Molnar Documentation/admin-guide/kernel-parameters.txt | 9 +++++++++ arch/x86/kernel/e820.c | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) commit 672c0ae09b33a11d8f31fc61526632e96301164c Author: Jan Beulich Date: Fri Feb 23 01:27:37 2018 -0700 x86/mm: Consider effective protection attributes in W+X check Using just the leaf page table entry flags would cause a false warning in case _PAGE_RW is clear or _PAGE_NX is set in a higher level entry. Hand through both the current entry's flags as well as the accumulated effective value (the latter as pgprotval_t instead of pgprot_t, as it's not an actual entry's value). This in particular eliminates the false W+X warning when running under Xen, as commit: 2cc42bac1c ("x86-64/Xen: eliminate W+X mappings") had to make the necessary adjustment in L2 rather than L1 (the reason is explained there). I.e. _PAGE_RW is clear there in L1, but _PAGE_NX is set in L2. Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Dmitry Vyukov Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/5A8FDE8902000078001AABBB@prv-mh.provo.novell.com Signed-off-by: Ingo Molnar arch/x86/mm/dump_pagetables.c | 94 ++++++++++++++++++++++++++----------------- 1 file changed, 58 insertions(+), 36 deletions(-) commit c46dacb75cd59a50a2380dcba5e7edf4fde86845 Author: Juergen Gross Date: Wed Feb 21 10:42:32 2018 +0100 x86/boot: Make the x86_init noop functions static Make the noop functions in x86_init.c static in case they are used locally only. Reported-by: kbuild test robot Signed-off-by: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180221094232.23462-1-jgross@suse.com Signed-off-by: Ingo Molnar arch/x86/kernel/x86_init.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b17d9d1df3c33a4f1d2bf397e2257aecf9dc56d4 Author: Juergen Gross Date: Mon Feb 19 11:09:06 2018 +0100 x86/xen: Add pvh specific rsdp address retrieval function Add pvh_get_root_pointer() for Xen PVH guests to communicate the address of the RSDP table given to the kernel via Xen start info. This makes the kernel boot again in PVH mode after on recent Xen the RSDP was moved to higher addresses. So up to that change it was pure luck that the legacy method to locate the RSDP was working when running as PVH mode. Signed-off-by: Juergen Gross Reviewed-by: Andy Shevchenko Acked-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Cc: Borislav Petkov Cc: Eric Biederman Cc: H. Peter Anvin Cc: Kees Cook Cc: Kirill A. Shutemov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: boris.ostrovsky@oracle.com Cc: lenb@kernel.org Cc: linux-acpi@vger.kernel.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20180219100906.14265-4-jgross@suse.com Signed-off-by: Ingo Molnar arch/x86/xen/enlighten_pvh.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 038bac2b02989acf1fc938cedcb7944c02672b9f Author: Juergen Gross Date: Mon Feb 19 11:09:05 2018 +0100 x86/acpi: Add a new x86_init_acpi structure to x86_init_ops Add a new struct x86_init_acpi to x86_init_ops. For now it contains only one init function to get the RSDP table address. Signed-off-by: Juergen Gross Reviewed-by: Andy Shevchenko Acked-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Cc: Borislav Petkov Cc: Eric Biederman Cc: H. Peter Anvin Cc: Kees Cook Cc: Kirill A. Shutemov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: boris.ostrovsky@oracle.com Cc: lenb@kernel.org Cc: linux-acpi@vger.kernel.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20180219100906.14265-3-jgross@suse.com Signed-off-by: Ingo Molnar arch/x86/include/asm/acpi.h | 7 +++++++ arch/x86/include/asm/x86_init.h | 9 +++++++++ arch/x86/kernel/x86_init.c | 5 +++++ 3 files changed, 21 insertions(+) commit dfc9327ab7c99bc13e12106448615efba833886b Author: Juergen Gross Date: Mon Feb 19 11:09:04 2018 +0100 acpi: Introduce acpi_arch_get_root_pointer() for getting rsdp address Add an architecture specific function to get the address of the RSDP table. Per default it will just return 0 indicating falling back to the current mechanism. Signed-off-by: Juergen Gross Reviewed-by: Andy Shevchenko Acked-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Cc: Borislav Petkov Cc: Eric Biederman Cc: H. Peter Anvin Cc: Kees Cook Cc: Kirill A. Shutemov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: boris.ostrovsky@oracle.com Cc: lenb@kernel.org Cc: linux-acpi@vger.kernel.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20180219100906.14265-2-jgross@suse.com Signed-off-by: Ingo Molnar drivers/acpi/osl.c | 5 ++++- include/linux/acpi.h | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit 3f7df3efeb415610d27aecc282ff96d4a22f0168 Merge: 39b9552 4a3928c Author: Ingo Molnar Date: Mon Feb 26 08:39:26 2018 +0100 Merge tag 'v4.16-rc3' into x86/mm, to pick up fixes Signed-off-by: Ingo Molnar commit 25c88cb1c05856f365484c6647d8e17bfd7f3363 Author: Adam Ford Date: Mon Sep 4 17:12:04 2017 -0500 ARM: dts: da850-evm: add chosen and SPI alias This patch will add the chosen container to point stdout-path to serial2 and set the alias for spi0 to spi1 since the SPI NOR flash exists on SPI1. Suggested-by: Sekhar Nori Signed-off-by: Adam Ford Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-evm.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 35ba26772c827dbfc03be8adc3af8ff0d294b38f Author: David Lechner Date: Mon Jan 15 11:29:31 2018 -0600 ARM: davinci_all_defconfig: set CONFIG_DAVINCI_WATCHDOG=y This changes CONFIG_DAVINCI_WATCHDOG from a module to a compiled-in option. Since the reset function has been moved out of the mach code in commit 94f2e94514e5 ("ARM: davinci: remove watchdog reset") and into the watchdog driver, devices cannot reboot unless the watchdog driver is loaded, so make it a compiled-in option so that we can always reboot, even when modules are not loaded. Cc: Sekhar Nori Suggested-by: Adam Ford Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95571b3bb51662bebc9ba7832ebc5466ac03d060 Author: Bartosz Golaszewski Date: Mon Jan 22 13:55:05 2018 +0100 ARM: dts: da850-lego-ev3: use a correct fallback for at24 compatible We now require all at24 users to use the "atmel," fallback in device tree for different manufacturers. Reviewed-by: David Lechner Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lego-ev3.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a22f1d801ad4987508b8c1b701c4926f733ac18b Author: Thierry Reding Date: Tue Feb 20 11:29:03 2018 +0100 drm/pl111: Remove reverse dependency on DRM_DUMB_VGA_DAC DRM_DUMB_VGA_DAC is a user-visible symbol. Selecting it can cause unmet direct dependencies such as this (on i386, randconfig): warning: (DRM_PL111) selects DRM_DUMB_VGA_DAC which has unmet direct dependencies (HAS_IOMEM && DRM && DRM_BRIDGE && OF) This is because DRM_DUMB_VGA_DAC depends on OF while DRM_PL111 does not. It does indirectly depend on OF via the ARM and ARM64 dependencies, but since it can also be enabled under COMPILE_TEST, randconfig can find a case where DRM_PL111 is selected without pulling in OF and not meeting the dependency for DRM_DUMB_VGA_DAC. Since select is "heavy handed", DRM_DUMB_VGA_DAC is going to be enabled regardless of the above warning and causes the following build error: ../drivers/gpu/drm/bridge/dumb-vga-dac.c: In function 'dumb_vga_probe': ../drivers/gpu/drm/bridge/dumb-vga-dac.c:207:13: error: 'struct drm_bridge' has no member named 'of_node' vga->bridge.of_node = pdev->dev.of_node; See Documentation/kbuild/kconfig-language.txt, "reverse dependencies". Fixes: 49f81d80ab84 ("drm/pl111: Support handling bridge timings") Reported-by: Randy Dunlap Reviewed-by: Eric Anholt Cc: Laurent Pinchart Cc: Archit Taneja Cc: Eric Anholt Signed-off-by: Thierry Reding Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20180220102903.27787-1-thierry.reding@gmail.com drivers/gpu/drm/pl111/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 6ce5ae7977c89f2a09092954396a66c90e8213f2 Author: Randy Dunlap Date: Sat Feb 24 21:22:12 2018 -0800 mutex: Drop linkage.h from mutex.h does not use nor need , so drop that one header file from mutex.h. is currently #included in around 1250 C source files (oops, I didn't count other header files that #include it), making it the 27th most-used header file. Build tested on i386 and x86_64 * (allnoconfig, tiny.config, defconfig, allyesconfig, and allmodconfig) and x64_64 allmodconfig + SMP=disabled. Signed-off-by: Randy Dunlap Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/582b3892-4e4c-06b2-a368-5c2d439de7fc@infradead.org include/linux/mutex.h | 1 - 1 file changed, 1 deletion(-) commit e69c61dd050e410d78363e5fe6e56a9f719abdf5 Author: Randy Dunlap Date: Sat Feb 24 21:22:18 2018 -0800 genirq: Drop 5 #included header files from irq.h does not use nor need several of its #included files, so drop those header files from irq.h. is currently #included in around 1135 C source files (oops, I didn't count other header files that #include it), making it the 29th most-used header file. Build tested on i386 and x86_64 * (allnoconfig, tiny.config, defconfig, allyesconfig, and allmodconfig) and x64_64 allmodconfig + SMP=disabled. Signed-off-by: Randy Dunlap Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/02745e91-c117-74b5-d043-dceb3d4bb4e0@infradead.org include/linux/irq.h | 5 ----- 1 file changed, 5 deletions(-) commit 027d50ccd6a01c6ca8969b49e69f26d64a8f94b2 Author: Mario Limonciello Date: Thu Feb 22 13:58:42 2018 -0600 platform/x86: intel-vbtn: Only activate tablet mode switch on 2-in-1's Some laptops such as the XPS 9360 support the intel-vbtn INT33D6 interface but don't initialize the bit that intel-vbtn uses to represent switching tablet mode. By running this only on real 2-in-1's it shouldn't cause false positives. Fixes: 30323fb6d5 ("Support tablet mode switch") Reported-by: Jeremy Cline Signed-off-by: Mario Limonciello Tested-by: Jeremy Cline Tested-by: Darren Hart (VMware) Signed-off-by: Darren Hart (VMware) drivers/platform/x86/intel-vbtn.c | 46 ++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 17 deletions(-) commit 819cddae7cfa9b7673c24c338199274ba175e2b3 Author: Michał Kępień Date: Tue Feb 20 06:24:54 2018 +0100 platform/x86: fujitsu-laptop: Clean up constants Align all constant values defined in the module to a common indentation. Rename ACPI_FUJITSU_NOTIFY_CODE1 to ACPI_FUJITSU_NOTIFY_CODE as there is only one ACPI notification code used throughout the driver. Define all bitmasks using the BIT() macro. Clean up comments. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 66 ++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 32 deletions(-) commit 2f60efa1e48884b8d83f1ea94433b871814543ee Author: Michał Kępień Date: Tue Feb 20 06:24:53 2018 +0100 platform/x86: fujitsu-laptop: Define constants for backlight power control Use named constants instead of integers in call_fext_func() invocations related to backlight power control in order to more clearly convey the intent of each call. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 7e6f97959abedcf75d1f11989eca43a3ddc4965d Author: Michał Kępień Date: Sun Feb 11 22:07:25 2018 +0100 platform/x86: fujitsu-laptop: Do not include linux/slab.h Do not include linux/slab.h as all module code now uses managed memory allocations and thus neither k*alloc() nor kfree() is used. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 1 - 1 file changed, 1 deletion(-) commit 6cb1192f5615fdfc4d4cb8ab4d911e4e758689f4 Author: Michał Kępień Date: Sun Feb 11 22:07:24 2018 +0100 platform/x86: fujitsu-laptop: Clearly distinguish module parameters In order to improve code clarity, move declarations of variables that are module parameters higher up and add a comment. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7f83d410440e63b173a91c65bb2515fa38501092 Author: Michał Kępień Date: Sun Feb 11 22:07:23 2018 +0100 platform/x86: fujitsu-laptop: Simplify error paths Replace the last few lines of acpi_fujitsu_bl_add() with a simple return in order to improve code readability without changing the logic. As acpi_fujitsu_laptop_add() uses a managed memory allocation for device-specific data, it is fine to just return immediately upon kfifo allocation failure. Do that instead of jumping to the end of the function to improve code readability. Running out of memory while allocating the kfifo does not seem probable enough to warrant logging an error message, so do not do it. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit a7a1ccbee3b61bdb044d3bbee958a3082cf8f9f9 Author: Michał Kępień Date: Sun Feb 11 22:07:22 2018 +0100 platform/x86: fujitsu-laptop: Defer input device registration Only register input devices after the device-specific data structures they access are fully initialized. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 14966e0277d48e6c4cfa5af06e77831b10b9f8ae Author: Michał Kępień Date: Sun Feb 11 22:07:21 2018 +0100 platform/x86: fujitsu-laptop: Unify local variable naming Different functions in the module use varying names (error, result, status) for a local variable storing the return value of a function call that has to be checked for errors. Use a common name (ret) for all these local variables to improve code consistency. Merge integer variable declarations in acpi_fujitsu_laptop_add() into one line. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 85 +++++++++++++++++------------------ 1 file changed, 41 insertions(+), 44 deletions(-) commit 6de543e31d187a6cc4944c76b6234aa1c8f79383 Author: Rodrigo Siqueira Date: Wed Feb 21 16:54:35 2018 -0300 staging:iio:meter: Add name to function definition arguments This patch fixes the checkpatch.pl warning: drivers/staging/iio/meter/ade7854.h:157: WARNING: function definition argument 'struct device *' should also have an identifier name... This commit adds arguments names to the signature declared in the ade7854_state struct. For consistency reason, It also renames all arguments in function definitions. Signed-off-by: Rodrigo Siqueira Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7754.c | 6 +++--- drivers/staging/iio/meter/ade7854-i2c.c | 28 ++++++++++++++-------------- drivers/staging/iio/meter/ade7854-spi.c | 28 ++++++++++++++-------------- drivers/staging/iio/meter/ade7854.h | 28 ++++++++++++++-------------- 4 files changed, 45 insertions(+), 45 deletions(-) commit c50fadeff758d4cc6e1ed196f776ae3016b3e021 Author: Dan Carpenter Date: Thu Feb 22 12:14:53 2018 +0300 iio temperature/mlx90632: silence a static checker warning This shouldn't affect runtime at all, but Smatch complains that we should check if mlx90632_read_ambient_raw() otherwise we "ambient_new_raw" can be uninitialized. drivers/iio/temperature/mlx90632.c:509 mlx90632_calc_ambient_dsp105() error: uninitialized symbol 'ambient_new_raw'. Signed-off-by: Dan Carpenter Acked-by: Crt Mori Signed-off-by: Jonathan Cameron drivers/iio/temperature/mlx90632.c | 2 ++ 1 file changed, 2 insertions(+) commit 1b3079a721106a441dcbd14c55908ab406324c66 Author: Andy Shevchenko Date: Thu Feb 22 20:58:58 2018 +0200 iio: accel: bmc150: Remove redundant __func__ in dev_dbg() Dynamic debug has a run time knob to enable function name printing. Remove this from dev_dbg() calls. Furthermore, functional tracing when enabled can show what function is called, therefore remove empty dev_dbg() calls. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron drivers/iio/accel/bmc150-accel-core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit adc18ba9061eade402b8d84c6bbcb5ca87add8da Author: Quentin Schulz Date: Mon Feb 19 13:47:36 2018 +0100 iio: adc: axp20x_adc: remove !! in favor of ternary condition !!'s behaviour isn't that obvious and sparse complained about it, so let's replace it with a ternary condition. Signed-off-by: Quentin Schulz Signed-off-by: Jonathan Cameron drivers/iio/adc/axp20x_adc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 4c73b809a99fc4df39fb18664288921b052f9649 Author: Richard Lai Date: Wed Feb 14 01:08:35 2018 +0000 iio: chemical: ccs811: Renamed resistance member in ccs811_reading struct The resistance member in ccs811_reading struct is an unsigned 16-bit integer variable used to store RAW_DATA register bytes read from CCS811. It is kind of misleading to name this struct member as resistance. About the RAW_DATA register bytes, the CCS811 datasheet states that: ----- Two byte read only register which contains the latest readings from the sense resistor. The most significant 6 bits of the Byte 0 contain the value of the current through the sensor (0μA to 63μA). The lower 10 bits contain (as computed from the ADC) the readings of the voltage across the sensor with the selected current (1023 = 1.65V)" ----- Hence, the RAW_DATA register byte contains information about electric current and voltage of the CCS811 sensor. Calling this struct member 'resistance' is kind of misleading, although both electric current and voltage are needed to calculate the electrical resistance of the sensor using Ohm's law, V = I x R, in which a new channel type of IIO_RESISTANCE may be added to the driver in the future. Signed-off-by: Richard Lai Signed-off-by: Jonathan Cameron drivers/iio/chemical/ccs811.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0f01b91f42bf6bca0edc72dd0472d54d2826477c Author: Lothar Waßmann Date: Mon Feb 19 11:47:05 2018 +0100 ARM: dts: imx6dl: remove 'lcdif' node According to the "i.MX 6Solo/6DualLite Applications Processor Reference Manual" Rev. 3, 09/2017 there is no LCDIF unit on the i.MX6DL. Signed-off-by: Lothar Waßmann Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl.dtsi | 5 ----- 1 file changed, 5 deletions(-) commit c256bc42bcf932749cfef41a866a7f8ffe8a610d Author: Baruch Siach Date: Mon Feb 19 09:56:45 2018 +0200 ARM: dts: hummingboard: Remove mention of nonexistent node There is no pinctrl_usbotg_2 node in current Hummingboard dts files. Drop reference to that. Signed-off-by: Baruch Siach Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-hummingboard.dtsi | 3 +-- arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 67de124caa5733238d0cac57faac8b153d3a684d Author: Jon Nettleton Date: Mon Feb 19 09:56:44 2018 +0200 ARM: dts: imx6qdl-hummingboard: fix USBOTG-ID pin Fix the USBOTG-ID pin to the correct definition. The top USB port stays in device-mode without this change. Signed-off-by: Jon Nettleton Signed-off-by: Baruch Siach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-hummingboard.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5bcbceeb5de08e4bd562e0a593f5bb37f9b5d884 Author: Fabio Estevam Date: Sat Feb 17 13:41:43 2018 -0200 ARM: dts: imx28-tx28: Pass the memory unit name Pass the memory unit name in order to fix the following dtc warning with W=1: arch/arm/boot/dts/imx28-tx28.dtb: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name Signed-off-by: Fabio Estevam Acked-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx28-tx28.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6b77284c4e0e7f623c589e7f121c5607381b94b8 Author: Fabio Estevam Date: Wed Feb 14 15:12:19 2018 -0200 ARM: imx_v6_v7_defconfig: Re-sync defconfig Re-sync the defconfig by doing: make savedefconfig cp defconfig arch/arm/configs/imx_v6_v7_defconfig Checked that all the removed options are still enabled by Kconfig logic. The exception is CONFIG_SOC_CAMERA_OV2640, which is only used by some mx31 machines. As the mx3_camera driver has been removed from the kernel tree, removing CONFIG_SOC_CAMERA_OV2640 is not an issue. So keep it in sync to help further changes in defconfig. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 6578ced6e0cb49b9ce0aea3a92dbbdc2e28d11c1 Author: Lucas Stach Date: Mon Feb 12 16:57:52 2018 +0100 ARM: dts: imx6: remove GPU subsystem nodes They aren't needed by the etnaviv driver anymore and have been removed from the binding. Signed-off-by: Lucas Stach Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl.dtsi | 5 ----- arch/arm/boot/dts/imx6q.dtsi | 5 ----- arch/arm/boot/dts/imx6sx.dtsi | 5 ----- 3 files changed, 15 deletions(-) commit 69cd58fa04bbbb191eb03761952238e2130ba2aa Author: Lucas Stach Date: Mon Feb 12 14:08:18 2018 +0100 ARM: dts: imx6: RDU2: detail USDHC description None of the slots support 1.8V signaling or SDIO. There is no point in probing for a SD card on the eMMC controller. Signed-off-by: Lucas Stach Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit d7ab663a9558e18d9bda40a284bc1c358976c085 Author: Ken Lin Date: Sat Feb 10 05:55:15 2018 +0800 ARM: dts: imx: Add support for Advantech DMS-BA16 Add support for Advantech DMS-BA16 board, which uses the Advantech BA-16 module. Signed-off-by: Ken Lin Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6q-dms-ba16.dts | 139 +++++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+) commit 69ea29b033f161c551a03c725c8b347e37c94dd9 Author: Yuantian Tang Date: Thu Feb 8 15:54:36 2018 +0800 arm64: dts: fsl: update the cpu idle node According to PSCI standard v0.2, for CPU_SUSPEND call, which is used by cpu idle framework, bit[16] of state parameter must be 0. So update bit[16] of property 'arm,psci-suspend-param', which is used as state parameter, to 0. Signed-off-by: Tang Yuantian Signed-off-by: Ran Wang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 3fd366d8cbb372386c14b7dbf86b05885e04b482 Author: Yuantian Tang Date: Thu Feb 8 15:54:35 2018 +0800 arm64: dts: ls1043a: add cpu idle support Signed-off-by: Tang Yuantian Signed-off-by: Ran Wang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 9b4eefcb70ca79d7dbd3a2a2d29ef9682762eeeb Author: Yuantian Tang Date: Thu Feb 8 15:54:34 2018 +0800 arm64: dts: ls1012a: add cpu idle support Signed-off-by: Tang Yuantian Signed-off-by: Ran Wang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 7d72637eb39f8336d8a07f1583fcc1dffce413e5 Merge: ee07862 23d191a Author: Alexei Starovoitov Date: Fri Feb 23 22:50:41 2018 -0800 Merge branch 'x86-jit' Daniel Borkmann says: ==================== Couple of minor improvements to the x64 JIT I had still around from pre merge window in order to shrink the image size further. Added test cases for kselftests too as well as running Cilium workloads on them w/o issues. ==================== Signed-off-by: Alexei Starovoitov commit 23d191a82c133c31bb85aa4b4b26851cd4a4b4ac Author: Daniel Borkmann Date: Sat Feb 24 01:08:03 2018 +0100 bpf: add various jit test cases Add few test cases that check the rnu-time results under JIT. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/test_verifier.c | 89 +++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit 0869175220b339b81de48872c8198c3ed75782e3 Author: Daniel Borkmann Date: Sat Feb 24 01:08:02 2018 +0100 bpf, x64: save 5 bytes in prologue when ebpf insns came from cbpf While it's rather cumbersome to reduce prologue for cBPF->eBPF migrations wrt spill/fill for r15 which is callee saved register due to bpf_error path in bpf_jit.S that is both used by migrations as well as native eBPF, we can still trivially save 5 bytes in prologue for the former since tail calls can never be used there. cBPF->eBPF migrations also have their own custom prologue in BPF asm that xors A and X reg anyway, so it's fine we skip this here. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov arch/x86/net/bpf_jit_comp.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 4c38e2f386b4fc5fd95d1203c74819948e2e903d Author: Daniel Borkmann Date: Sat Feb 24 01:08:01 2018 +0100 bpf, x64: save few bytes when mul is in alu32 Add a generic emit_mov_reg() helper in order to reuse it in BPF multiplication to load the src into rax, we can save a few bytes in alu32 while doing so. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov arch/x86/net/bpf_jit_comp.c | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) commit d806a0cf2a1ddb97c91d902ef1c8219e1e2b2c4c Author: Daniel Borkmann Date: Sat Feb 24 01:08:00 2018 +0100 bpf, x64: save several bytes when mul dest is r0/r3 anyway Instead of unconditionally performing push/pop on rax/rdx in case of multiplication, we can save a few bytes in case of dest register being either BPF r0 (rax) or r3 (rdx) since the result is written in there anyway. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov arch/x86/net/bpf_jit_comp.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 6fe8b9c1f41dfe3209dabc5bd0726e003a065288 Author: Daniel Borkmann Date: Sat Feb 24 01:07:59 2018 +0100 bpf, x64: save several bytes by using mov over movabsq when possible While analyzing some of the more complex BPF programs from Cilium, I found that LLVM generally prefers to emit LD_IMM64 instead of MOV32 BPF instructions for loading unsigned 32-bit immediates into a register. Given we cannot change the current/stable LLVM versions that are already out there, lets optimize this case such that the JIT prefers to emit 'mov %eax, imm32' over 'movabsq %rax, imm64' whenever suitable in order to reduce the image size by 4-5 bytes per such load in the typical case, reducing image size on some of the bigger programs by up to 4%. emit_mov_imm32() and emit_mov_imm64() have been added as helpers. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov arch/x86/net/bpf_jit_comp.c | 125 ++++++++++++++++++++++++++------------------ 1 file changed, 74 insertions(+), 51 deletions(-) commit 88e69a1fcc1e67dec3025af64736a84532528242 Author: Daniel Borkmann Date: Sat Feb 24 01:07:58 2018 +0100 bpf, x64: save one byte per shl/shr/sar when imm is 1 When we shift by one, we can use a different encoding where imm is not explicitly needed, which saves 1 byte per such op. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov arch/x86/net/bpf_jit_comp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f74290fdb363665538743d14c4f00aeacdb68d87 Merge: 1b71af6 9cb9c07 Author: David S. Miller Date: Sat Feb 24 00:04:20 2018 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit 338c46403f169dd76bff8ed58fd0be0d600e7aba Merge: ad7c946 6308f34 85ba6bf Author: Paul E. McKenney Date: Fri Feb 23 15:15:41 2018 -0800 Merge branches 'fixes.2018.02.23a', 'srcu.2018.02.20a' and 'torture.2018.02.20a' into HEAD fixes.2018.02.23a: Miscellaneous fixes srcu.2018.02.20a: SRCU updates torture.2018.02.20a: Torture-test updates commit ad7c946b35ad455417fdd4bc0e17deda4011841b Author: Paul E. McKenney Date: Mon Jan 8 14:35:52 2018 -0800 rcu: Create RCU-specific workqueues with rescuers RCU's expedited grace periods can participate in out-of-memory deadlocks due to all available system_wq kthreads being blocked and there not being memory available to create more. This commit prevents such deadlocks by allocating an RCU-specific workqueue_struct at early boot time, and providing it with a rescuer to ensure forward progress. This uses the shiny new init_rescuer() function provided by Tejun (but indirectly). This commit also causes SRCU to use this new RCU-specific workqueue_struct. Note that SRCU's use of workqueues never blocks them waiting for readers, so this should be safe from a forward-progress viewpoint. Note that this moves SRCU from system_power_efficient_wq to a normal workqueue. In the unlikely event that this results in measurable degradation, a separate power-efficient workqueue will be creates for SRCU. Reported-by: Prateek Sood Reported-by: Tejun Heo Signed-off-by: Paul E. McKenney Acked-by: Tejun Heo kernel/rcu/rcu.h | 1 + kernel/rcu/srcutree.c | 8 +++----- kernel/rcu/tree.c | 6 ++++++ kernel/rcu/tree_exp.h | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) commit cc396436c24de8ae28b3c0bee795a19bffea815b Author: Miquel Raynal Date: Mon Feb 19 23:35:53 2018 +0100 mtd: nand: remove deprecated pxa3xx_nand driver All board files and defconfig files have been moved to use the new marvell_nand driver instead of pxa3xx_nand, so we can safely remove this file now. People should use the new driver which is supposed to behave exactly like the old one. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/Kconfig | 11 - drivers/mtd/nand/Makefile | 1 - drivers/mtd/nand/pxa3xx_nand.c | 2105 ---------------------------------------- 3 files changed, 2117 deletions(-) commit 349dfe6c85266eb2ddec7587553934169aa5755f Author: Miquel Raynal Date: Mon Feb 19 23:35:52 2018 +0100 mtd: nand: use Marvell reworked NAND controller driver with all platforms Compile marvell_nand.c instead of pxa3xx_nand.c with all PXA based SoCs. Convert all board files and defconfigs so that the new driver is used everywhere instead of the old one. Board files using CONFIG_MTD_NAND_PXA3xx now use CONFIG_MTD_NAND_MARVELL instead. Signed-off-by: Miquel Raynal Tested-by: Robert Jarzmik Signed-off-by: Boris Brezillon arch/arm/configs/cm_x300_defconfig | 2 +- arch/arm/configs/pxa3xx_defconfig | 3 +-- arch/arm/configs/pxa_defconfig | 2 +- arch/arm/configs/raumfeld_defconfig | 2 +- arch/arm/mach-mmp/ttc_dkb.c | 4 ++-- arch/arm/mach-pxa/cm-x300.c | 2 +- arch/arm/mach-pxa/colibri-pxa3xx.c | 2 +- arch/arm/mach-pxa/colibri.h | 2 +- arch/arm/mach-pxa/littleton.c | 4 ++-- arch/arm/mach-pxa/mxm8x10.c | 4 ++-- arch/arm/mach-pxa/zylonite.c | 4 ++-- 11 files changed, 15 insertions(+), 16 deletions(-) commit 1b71af6053af1bd2f849e9fda4f71c1e3f145dcf Author: Donald Sharp Date: Fri Feb 23 14:01:52 2018 -0500 net: fib_rules: Add new attribute to set protocol For ages iproute2 has used `struct rtmsg` as the ancillary header for FIB rules and in the process set the protocol value to RTPROT_BOOT. Until ca56209a66 ("net: Allow a rule to track originating protocol") the kernel rules code ignored the protocol value sent from userspace and always returned 0 in notifications. To avoid incompatibility with existing iproute2, send the protocol as a new attribute. Fixes: cac56209a66 ("net: Allow a rule to track originating protocol") Signed-off-by: Donald Sharp Signed-off-by: David S. Miller drivers/net/vrf.c | 5 ++++- include/net/fib_rules.h | 3 ++- include/uapi/linux/fib_rules.h | 5 +++-- net/core/fib_rules.c | 15 +++++++++++---- 4 files changed, 20 insertions(+), 8 deletions(-) commit ec9c2fb8ceb5b514c4820f732537cb2982de0620 Author: Mark Bloch Date: Mon Jan 15 13:11:37 2018 +0000 IB/mlx5: Disable self loopback check when in switchdev mode When in switchdev mode, there is no need to do self loopback checks as we can't receive those packets, we insert steering rules to the eswitch that make sure packets can't be looped back. Signed-off-by: Mark Bloch Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/qp.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c5447c70594b6a8e1e62a9dd9373813cb38f1c69 Author: Mark Bloch Date: Tue Jan 23 11:24:13 2018 +0000 net/mlx5: E-Switch, Reload IB interface when switching devlink modes Up until this point it wasn't possible to activate IB representors when switching to switchdev mode, remove this limitation. We trigger reload of the PF IB interface in order to make sure that already allocated resources are invalid and new resources will be opened correctly with all the limitations of switchdev mode applied (only raw packet capabilities, without RoCE). We also move the remove/add to a place where the E-Switch mode is set/unset to better control when to trigger this action, this will allow the IB side to start in the correct mode. For better code reuse, create a function which reloads an interface and export it. Signed-off-by: Mark Bloch Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/dev.c | 8 ++++++++ drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 17 +++++++++++++++-- .../net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 17 ++--------------- drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h | 1 + 4 files changed, 26 insertions(+), 17 deletions(-) commit b5ca15ad7e6189f39dff73d786e41d2a507f7b8b Author: Mark Bloch Date: Tue Jan 23 11:16:30 2018 +0000 IB/mlx5: Add proper representors support This commit adds full support for IB representor: 1) Representors profile, We add two new profiles: nic_rep_profile - This profile will be used to create an IB device that represents the PF/UPLINK. rep_profile - This profile will be used to create an IB device that represents VFs. Each VF will be its own representor. 2) Proper load/unload callbacks, Those are called by the E-Switch when moving to/from switchdev mode. 3) Different flow DB handling for when we in switchdev mode. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/ib_rep.c | 65 ++++++++++++++++++ drivers/infiniband/hw/mlx5/ib_rep.h | 7 ++ drivers/infiniband/hw/mlx5/main.c | 125 ++++++++++++++++++++++++++--------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 25 +++++++ 4 files changed, 192 insertions(+), 30 deletions(-) commit b96c9dde17359520d6a5a8eb6d56d91f22c5a413 Author: Mark Bloch Date: Mon Jan 29 10:40:37 2018 +0000 IB/mlx5: E-Switch, Add rule to forward traffic to vport In order to forward traffic from representor's SQ to the right virtual function, every time an SQ is created also add the corresponding flow rule to the FDB. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/ib_rep.c | 20 ++++++++++++++++++++ drivers/infiniband/hw/mlx5/ib_rep.h | 8 ++++++++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + drivers/infiniband/hw/mlx5/qp.c | 16 ++++++++++++++++ 4 files changed, 45 insertions(+) commit 72afcf82477a58f40d748271a4a78755983203ef Author: Mark Bloch Date: Mon Jan 22 15:29:44 2018 +0000 IB/mlx5: Don't expose MR cache in switchdev mode When enabling many VFs and switching to switchdev mode, the total amount of mkeys we try to allocate when loading representors is very large and may cause timeouts on allocations, the same issues was observed on VFs and we employ the same fix that was done for them. We avoid allocating the full MR cache on load but still allow it to be manipulated once the IB device is loaded. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/mr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8e6efa3a31f4a81a4d8817d68110446df383d049 Author: Mark Bloch Date: Mon Nov 6 12:22:13 2017 +0000 IB/mlx5: When in switchdev mode, expose only raw packet capabilities Currently in switchdev mode we allow only for raw packet QPs. Expose the right capabilities and set the gid table length to 0, also make sure we don't try to enable RoCE, so split the function to enable RoCE so representors can enable only the notifier needed for net device events. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/main.c | 153 ++++++++++++++++++++++++++++------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + 2 files changed, 124 insertions(+), 30 deletions(-) commit bcf87f1dbbec0d9abaf89073dd761a41876bc6c1 Author: Mark Bloch Date: Tue Jan 16 15:02:36 2018 +0000 IB/mlx5: Listen to netdev register/unresiter events in switchdev mode Currently we listen to netdev register/unregister event based on PCI device. When in switchdev mode PF and representors share the same PCI device, so in order to pair ib device and netdev in switchdev mode compare the netdev that triggered the event to that of the representor. Expose a function that lets you receive the netdev associated what a given representor. Signed-off-by: Mark Bloch Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/ib_rep.h | 8 ++++++++ drivers/infiniband/hw/mlx5/main.c | 15 ++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) commit 018a94eec0efc04c678f694f903e621622fd0bcf Author: Mark Bloch Date: Tue Jan 16 14:44:29 2018 +0000 IB/mlx5: Add match on vport when in switchdev mode When we point to a representor, it means we are in switchdev mode. The flow db is shared between PF and virtual function representors so each rule created needs to have a match on its specific source port. Signed-off-by: Mark Bloch Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 9a4ca38d77054febf35cd568cd86aa41c6477301 Author: Mark Bloch Date: Tue Jan 16 14:42:35 2018 +0000 IB/mlx5: Allocate flow DB only on PF IB device A flow DB is a shared resource between PF and representors, need to allocate it only when creating the PF IB device. Once we add IB representors, they will use the flow db which was created by the PF. Signed-off-by: Mark Bloch Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/main.c | 45 +++++++++++++++++++++++++----------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 ++- 2 files changed, 34 insertions(+), 14 deletions(-) commit fc385b7ac48089ed1c6866cdc0dceb4ae1fa54de Author: Mark Bloch Date: Tue Jan 16 14:34:48 2018 +0000 IB/mlx5: Add basic regiser/unregister representors code Create the basic infrastructure of registering and unregistering IB representors. The load/unload callbacks are left empty and proper implementation will be introduced in following patches. Signed-off-by: Mark Bloch Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/Makefile | 1 + drivers/infiniband/hw/mlx5/ib_rep.c | 104 +++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/mlx5/ib_rep.h | 49 +++++++++++++++++ drivers/infiniband/hw/mlx5/main.c | 13 +++++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 + 5 files changed, 169 insertions(+) commit 5e65b02c00900155833008b7992bbbbc7f0df2ac Author: Mark Bloch Date: Tue Jan 16 14:13:46 2018 +0000 net/mlx5: E-Switch, Add definition of IB representor Create a new representor type: REP_IB. which will be initialized by an IB device that is used as a logical representor of a eswitch vport (VF or uplink) just like we have a net device today in switchdev mode. Signed-off-by: Mark Bloch Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed include/linux/mlx5/eswitch.h | 1 + 1 file changed, 1 insertion(+) commit f80be5436de78d0231cfb79b368edb9b90c3b057 Author: Mark Bloch Date: Tue Jan 30 10:46:34 2018 +0000 net/mlx5: E-Switch, Optimize HW steering tables in switchdev mode Under switchdev mode we insert an eswitch miss rule causing any unmatched traffic to be sent towards the PF vport. This miss rule can be optimized if we break it to two, one case is for multicast traffic and the other for unicast. Breaking the miss rule into two (unicast and multicast) allows the firmware to program the hardware in a more efficient way. Using ConncetX-5 Ex with IXIA and testpmd (which use IB representors): IXIA -> NIC -> PF -> IB representor -> NIC -> VF: - Without this optimization: 9.2 MPPS. - With this optimization: 18 MPPS. VF -> NIC -> IB representor-> PF -> NIC -> IXIA: - Without this optimization: 17 MPPS. - With this optimization: 23.4 MPPS. Signed-off-by: Mark Bloch Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 3 +- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 48 +++++++++++++++++++--- 2 files changed, 44 insertions(+), 7 deletions(-) commit cd3d07e7db69456beaeb90529270a95c7692f4b3 Author: Mark Bloch Date: Tue Jan 23 11:19:12 2018 +0000 net/mlx5: E-Switch, Increase number of FTEs in FDB in switchdev mode The max FTE number should be the max number of SQs that can be opened. Ethernet representors open one SQ each. Once we add IB representor this will increase (depends on the user). For now lets start with 31 per IB representor and if needed increase in the future. This increase only affects the number of FTEs in the slow path FDB, offloaded rules (done via TC on the fast path portion of the FDB) aren't affected. Signed-off-by: Mark Bloch Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 57cbd893c4c575a24594fa6c0835247506ce26e2 Author: Mark Bloch Date: Tue Jan 16 14:04:14 2018 +0000 net/mlx5: E-Switch, Move representors definition to a global scope In preparation for IB representors, move representors structs to a global scope, also expose functions needed for registration, unregistration, eswitch mode and creating a flow rule to direct traffic from SQs to the right VF. Signed-off-by: Mark Bloch Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 6 +++ drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 44 +---------------- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 12 +++++ .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 6 --- include/linux/mlx5/driver.h | 6 +++ include/linux/mlx5/eswitch.h | 57 ++++++++++++++++++++++ 6 files changed, 82 insertions(+), 49 deletions(-) commit 22215908d81f61d293e8b128e819a8437f37cc20 Author: Mark Bloch Date: Wed Sep 27 07:24:18 2017 +0000 net/mlx5: E-Switch, Add callback to get representor device Add a callback interface to get a protocol device (per representor type). The Ethernet representors will expose their netdev via this interface. This functionality can be later used by IB representor in order to find the corresponding net device representor. Signed-off-by: Mark Bloch Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 11 ++++++++++ drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 5 +++++ .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 24 ++++++++++++++++++++++ 3 files changed, 40 insertions(+) commit cc30c93fa020e13c91f5076e20062df33f944cdc Author: Willem de Bruijn Date: Fri Feb 23 11:56:20 2018 -0500 selftests/net: ignore background traffic in psock_fanout The packet fanout test generates UDP traffic and reads this with a pair of packet sockets, testing the various fanout algorithms. Avoid non-determinism from reading unrelated background traffic. Fanout decisions are made before unrelated packets can be dropped with a filter, so that is an insufficient strategy [*]. Run the packet socket tests in a network namespace, similar to msg_zerocopy. It it still good practice to install a filter on a packet socket before accepting traffic. Because this is example code, demonstrate that pattern. Open the socket initially bound to no protocol, install a filter, and only then bind to ETH_P_IP. Another source of non-determinism is hash collisions in FANOUT_HASH. The hash function used to select a socket in the fanout group includes the pseudorandom number hashrnd, which is not visible from userspace. To work around this, the test tries to find a pair of UDP source ports that do not collide. It gives up too soon (5 times, every 32 runs) and output is confusing. Increase tries to 20 and revise the error msg. [*] another approach would be to add a third socket to the fanout group and direct all unexpected traffic here. This is possible only when reimplementing methods like RR or HASH alongside this extra catch-all bucket, using the BPF fanout method. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller tools/testing/selftests/net/in_netns.sh | 23 +++++++++++++++++++ tools/testing/selftests/net/psock_fanout.c | 32 ++++++++++++++++++++++----- tools/testing/selftests/net/run_afpackettests | 4 ++-- 3 files changed, 51 insertions(+), 8 deletions(-) commit 3c69f79233e7c8424abb38bbd0ae9fd9010014af Author: Colin Ian King Date: Fri Feb 23 12:22:52 2018 +0000 atm: idt77252: remove redundant bit-wise or'ing of zero Zero is being bit-wise or'd in a calculation twice; these are redundant and can be removed. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/atm/idt77252.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 79a5b9727a1cceacd49921b78425ebda91836bd6 Author: Sowmini Varadhan Date: Thu Feb 22 13:40:27 2018 -0800 rds: rds_msg_zcopy should return error of null rm->data.op_mmp_znotifier if either or both of MSG_ZEROCOPY and SOCK_ZEROCOPY have not been specified, the rm->data.op_mmp_znotifier allocation will be skipped. In this case, it is invalid ot pass down a cmsghdr with RDS_CMSG_ZCOPY_COOKIE, so return EINVAL from rds_msg_zcopy for this case. Reported-by: syzbot+f893ae7bb2f6456dfbc3@syzkaller.appspotmail.com Fixes: 0cebaccef3ac ("rds: zerocopy Tx support.") Signed-off-by: Sowmini Varadhan Acked-by: Willem de Bruijn Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/send.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9dbe7896d95af114fcb5554b53cf796ca9293b13 Author: Heiner Kallweit Date: Thu Feb 22 21:37:48 2018 +0100 r8169: simplify and improve check for dash r8168_check_dash() returns false anyway for all chip versions not supporting dash. So we can simplify the check conditions. In addition change the check functions to return bool instead of int, because they actually return a bool value. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 39 +++++++++--------------------------- 1 file changed, 9 insertions(+), 30 deletions(-) commit 7edf6d314cd061e1d0a1b7bc0b511d64322c3f72 Author: Heiner Kallweit Date: Thu Feb 22 21:22:40 2018 +0100 r8169: disable WOL per default Currently, if BIOS enables WOL in the chip, settings are inconsistent because the device isn't marked as wakeup-enabled (if not done explicitly via userspace tools). This causes issues with suspend/ resume because mdio_bus_phy_may_suspend() checks whether device is wakeup-enabled. In detail MDIO bus access in phy_suspend() can fail because the MDIO bus is disabled. In the history of the driver we find two competing approaches: 8f9d5138035d "r8169: remember WOL preferences on driver load" prefers to preserve what the BIOS may have set, whilst bde135a672bf "r8169: only enable PCI wakeups when WOL is active" disabled PCI wakeup per default to work around a bug on one platform. Seems like nobody complained after the latter patch about non-working WOL, what makes me think that nobody uses WOL w/o configuring it explicitly. My opinion: Vast majority of users doesn't use WOL even if the BIOS enables it in the chip. And having WOL being active keeps the PHY(s) from powering down if being idle. If somebody needs WOL, he can enable it during boot, e.g. by configuring systemd.link/WakeOnLan. Therefore, to make WOL consistent again, disable it per default. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5488bfdf9f1929347fdf9ba391be4513f9f7c56f Author: Hans de Goede Date: Thu Feb 22 11:18:38 2018 +0100 platform/x86: silead_dmi: Add DMI match for the I.T.Works TW701 tablet The I.T.Works TW701 7" tablet is a differently branded version of the same generic 7" Windows tablet as the Trekstor ST70416-6. Add a DMI match-table entry for it pointing to the Trekstor's touchscreen info. Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko drivers/platform/x86/silead_dmi.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1019b9371247eff2b3349a065b7e5e7b0ab10b18 Author: Guillaume Douézan-Grard Date: Wed Feb 21 18:01:04 2018 +0100 platform/x86: topstar-laptop: replace licence text with SPDX tag Replace verbatim GPLv2 license copy with SPDX identifier. Signed-off-by: Guillaume Douézan-Grard Signed-off-by: Andy Shevchenko drivers/platform/x86/topstar-laptop.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 7a580200d69fa19809335f950c08e77528b7abe2 Author: Guillaume Douézan-Grard Date: Wed Feb 21 18:00:54 2018 +0100 platform/x86: topstar-laptop: update copyright and fix some comments Add myself as an author of the driver. Signed-off-by: Guillaume Douézan-Grard Signed-off-by: Andy Shevchenko drivers/platform/x86/topstar-laptop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bf8f65da31ca46ae41ba7d932d9f9849d1781b0d Author: Guillaume Douézan-Grard Date: Wed Feb 21 18:00:45 2018 +0100 platform/x86: topstar-laptop: add Topstar U931/RVP7 WLAN LED workaround Topstar U931 laptops provide a LED synced with the WLAN adapter hard-blocking state. Unfortunately, some models seem to be defective, making impossible to hard-block the adapter with the WLAN switch and thus the LED is useless. An ACPI method is available to programmatically control this switch and it indirectly allows to control the LED. This commit registers the LED within the corresponding subsystem, making possible for instance to use an rfkill-based trigger to synchronize the LED with the device state. This workaround is enabled automatically for Topstar U931/RVP7 laptops based on a DMI check. Signed-off-by: Guillaume Douézan-Grard Signed-off-by: Andy Shevchenko drivers/platform/x86/Kconfig | 2 + drivers/platform/x86/topstar-laptop.c | 108 ++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) commit 2c531437dd446306999528a122b14d7ef2acd768 Author: Guillaume Douézan-Grard Date: Wed Feb 21 18:00:35 2018 +0100 platform/x86: topstar-laptop: add platform device * add a platform device to support further addition of a led subsystem, * register the existing input device to this platform device. Signed-off-by: Guillaume Douézan-Grard Signed-off-by: Andy Shevchenko drivers/platform/x86/topstar-laptop.c | 61 +++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 3 deletions(-) commit 3093ced23640fdeabacbcb691c97af207fdb5a6d Author: Guillaume Douézan-Grard Date: Wed Feb 21 18:00:26 2018 +0100 platform/x86: topstar-laptop: split ACPI events and input handling * get the `acpi_device` from the `topstar_laptop` struct, * split input registering and `sparse_keymap` events from ACPI events handling, * use notify, init and exit functions for ACPI and input handling Signed-off-by: Guillaume Douézan-Grard Signed-off-by: Andy Shevchenko drivers/platform/x86/topstar-laptop.c | 109 ++++++++++++++++++++++------------ 1 file changed, 71 insertions(+), 38 deletions(-) commit 66aa0d606b5025409bf71a23b5ae683346f1795a Author: Guillaume Douézan-Grard Date: Wed Feb 21 18:00:16 2018 +0100 platform/x86: topstar-laptop: use consistent naming scheme * use module prefix naming scheme for functions and programming constructs, * consistent label names Signed-off-by: Guillaume Douézan-Grard Signed-off-by: Andy Shevchenko drivers/platform/x86/topstar-laptop.c | 82 +++++++++++++++++------------------ 1 file changed, 41 insertions(+), 41 deletions(-) commit 82acad40ca97f309ff066864ae63cbe68812f983 Author: Guillaume Douézan-Grard Date: Wed Feb 21 18:00:06 2018 +0100 platform/x86: topstar-laptop: revert "convert to module_acpi_driver()" Revert commit 15165594da65 ("topstar-laptop: convert to module_acpi_driver()") to later add a platform device. Signed-off-by: Guillaume Douézan-Grard Signed-off-by: Andy Shevchenko drivers/platform/x86/topstar-laptop.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit cedb3b2a7d7cb059b3646db14dfe2f833bf4d52d Author: Andy Shevchenko Date: Mon Feb 19 17:02:28 2018 +0200 platform/x86: wmi: Replace list_for_each() by list_for_each_entry() In all cases list_for_each() followed by list_entry(), so, replace them by list_for_each_entry() macro. Signed-off-by: Andy Shevchenko Reviewed-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit f6322eddaff7662e81178a28730e420bf934a512 Author: Chris Wilson Date: Thu Feb 22 14:22:29 2018 +0000 drm/i915/preemption: Allow preemption between submission ports Sometimes we need to boost the priority of an in-flight request, which may lead to the situation where the second submission port then contains a higher priority context than the first and so we need to inject a preemption event. To do so we must always check inside execlists_dequeue() whether there is a priority inversion between the ports themselves as well as the head of the priority sorted queue, and we cannot just skip dequeuing if the queue is empty. As Michał noted, this doesn't simply extend to handling more than 2-port submission, as we may need to reorder within the array of executing requests which themselves are lower priority than the first. A task for later! Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Michel Thierry Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180222142229.14517-1-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_engine_cs.c | 2 + drivers/gpu/drm/i915/intel_guc_submission.c | 17 +-- drivers/gpu/drm/i915/intel_lrc.c | 161 ++++++++++++++++------------ drivers/gpu/drm/i915/intel_ringbuffer.h | 10 ++ 4 files changed, 112 insertions(+), 78 deletions(-) commit e532be8971c606869ba420e34e85762a947d53cb Author: Michel Thierry Date: Thu Feb 22 09:24:05 2018 -0800 drm/i915: Update missing parts after the rename to i915_request Mostly doc/print messages that were not updated after commit e61e0f51ba79 ("drm/i915: Rename drm_i915_gem_request to i915_request"). Signed-off-by: Michel Thierry Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180222172405.11386-1-michel.thierry@intel.com drivers/gpu/drm/i915/i915_gem_context.h | 2 +- drivers/gpu/drm/i915/i915_request.c | 4 ++-- drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit ce423631ce1f20564f818e7de6bc0eee0c01badd Author: Paul Moore Date: Tue Feb 20 09:52:38 2018 -0500 audit: track the owner of the command mutex ourselves Evidently the __mutex_owner() function was never intended for use outside the core mutex code, so build a thing locking wrapper around the mutex code which allows us to track the mutex owner. One, arguably positive, side effect is that this allows us to hide the audit_cmd_mutex inside of kernel/audit.c behind the lock/unlock functions. Reported-by: Peter Zijlstra Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.c | 66 ++++++++++++++++++++++++++++++++++++++++++++--------- kernel/audit.h | 3 ++- kernel/audit_tree.c | 8 +++---- 3 files changed, 61 insertions(+), 16 deletions(-) commit 91e939aef02fa30f7ec14fa12749f6af0b3e35ff Author: Ville Syrjälä Date: Thu Feb 22 20:10:32 2018 +0200 drm/i915: Collect aux ch vfunc setup into intel_dp_aux_init() Collect all the aux ch vfunc assignments into intel_dp_aux_init() instead of having it spread around. Reviewed-by: Chris Wilson Reviewed-by: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180222181036.15251-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_dp.c | 53 +++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 29 deletions(-) commit c7899551ff3a999361e4270e99accc7fec408988 Author: Aishwarya Pant Date: Fri Jan 19 18:01:47 2018 +0530 Documentation: rapidio: move sysfs interface to ABI Right now, the description of the rapidio sysfs interfaces is in Documentation/rapidio/sysfs.txt. Since these are a part of the ABI, they should be in Documentation/ABI along with the rest. Signed-off-by: Aishwarya Pant Acked-by: Alexandre Bounine Signed-off-by: Jonathan Corbet Documentation/ABI/testing/sysfs-bus-rapidio | 198 ++++++++++++++++++++++++++ Documentation/ABI/testing/sysfs-class-rapidio | 55 +++++++ Documentation/rapidio/sysfs.txt | 161 +-------------------- 3 files changed, 256 insertions(+), 158 deletions(-) commit 4904fa66f72d06b2a0a7a57e9196fb3102db0840 Author: Ville Syrjälä Date: Thu Feb 22 20:10:31 2018 +0200 drm/i915: Nuke aux regs from intel_dp Just store function pointers that give us the correct register offsets instead of storing the register offsets themselves. Slightly less efficient perhaps but saves a few bytes and better matches how we do things elsewhere. v2: Keep a local array of data registers (Chris) Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180222181036.15251-3-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_dp.c | 85 ++++++++++++++++++++-------------------- drivers/gpu/drm/i915/intel_drv.h | 5 ++- 2 files changed, 45 insertions(+), 45 deletions(-) commit bdabdb635010a3bb973ace5590a61008291d5bd5 Author: Ville Syrjälä Date: Thu Feb 22 20:10:30 2018 +0200 drm/i915: Add enum aux_ch and clean up the aux init to use it Since we no longer have a 1:1 correspondence between ports and AUX channels, let's give AUX channels their own enum. Makes it easier to tell the apples from the oranges, and we get rid of the port E AUX power domain FIXME since we now derive the power domain from the actual AUX CH. v2: Rebase due to AUX F v3: Split out the power domain fix (Rodrigo) Reviewed-by: Rodrigo Vivi #v2 Reviewed-by: Chris Wilson #v2 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180222181036.15251-2-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_reg.h | 8 +- drivers/gpu/drm/i915/intel_display.h | 11 ++ drivers/gpu/drm/i915/intel_dp.c | 236 +++++++++++++++++------------------ drivers/gpu/drm/i915/intel_drv.h | 1 + 4 files changed, 131 insertions(+), 125 deletions(-) commit ee07862f7b4594d390b978f6636a6a6191632ab3 Author: Yafang Shao Date: Fri Feb 23 14:58:41 2018 +0800 bpf: NULL pointer check is not needed in BPF_CGROUP_RUN_PROG_INET_SOCK sk is already allocated in inet_create/inet6_create, hence when BPF_CGROUP_RUN_PROG_INET_SOCK is executed sk will never be NULL. The logic is as bellow, sk = sk_alloc(); if (!sk) goto out; BPF_CGROUP_RUN_PROG_INET_SOCK(sk); Signed-off-by: Yafang Shao Signed-off-by: Daniel Borkmann include/linux/bpf-cgroup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff63861c15ecf451db34a47daa75b463ed4293f8 Author: Ville Syrjälä Date: Thu Feb 22 20:10:29 2018 +0200 drm/i915: Use the correct power domain for aux ch Select the aux power domain based on the aux ch rather than based on the port. Now we can rid ourselves of the port E FIXME as well. v2: Split from the enum aux_ch patch (Rodrigo) Reviewed-by: Rodrigo Vivi #v1 Reviewed-by: Chris Wilson #v1 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180222181036.15251-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_dp.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit e55ee9349f7b473c92bae6fe37eba878a15e2326 Author: Aishwarya Pant Date: Tue Feb 6 13:11:12 2018 +0530 backlight: adp8860: document sysfs attributes Add documentation for sysfs interface of adp8860 series backlight devices by reading through code and git commits. Signed-off-by: Aishwarya Pant Acked-by: Michael Hennerich Acked-by: Daniel Thompson Signed-off-by: Jonathan Corbet .../ABI/testing/sysfs-class-backlight-adp8860 | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 9671a7f1319a793c5dc728f29f5a62c564f806ea Author: Aishwarya Pant Date: Tue Feb 6 13:10:26 2018 +0530 backlight: adp5520: document sysfs attributes Add documentation for sysfs interface of adp5520/adp5501 analog devices backlight driver by reading code and looking through git commit logs. Signed-off-by: Aishwarya Pant Acked-by: Michael Hennerich Acked-by: Daniel Thompson Signed-off-by: Jonathan Corbet .../ABI/testing/sysfs-class-backlight-adp5520 | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 24f4c6c890e69fa805cfc3112b3c7bfe75a88805 Author: Aishwarya Pant Date: Tue Feb 6 13:09:42 2018 +0530 backlight: lm3639: document sysfs attributes Add documentation for sysfs interfaces of Texas Instruments lm3639 backlight + flash led driver chip by looking through git commits and reading code. Signed-off-by: Aishwarya Pant Acked-by: Daniel Thompson Signed-off-by: Jonathan Corbet Documentation/ABI/testing/sysfs-class-backlight-lm3639 | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 2d39f681bc67662f43046106f3274e9b8ca27383 Author: Aishwarya Pant Date: Sat Feb 17 11:43:04 2018 +0530 block/loop: add documentation for sysfs interface Documentation has been compiled from git logs and by reading through code. Signed-off-by: Aishwarya Pant Signed-off-by: Jonathan Corbet Documentation/ABI/testing/sysfs-block-loop | 50 ++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 3bd640b735d0dbfa4c34c283c7e9bcd5dc18fb43 Author: Aishwarya Pant Date: Sat Feb 10 13:11:04 2018 +0530 Documentation/ABI: update infiniband sysfs interfaces Add documentation for core and hardware specific infiniband interfaces. The descriptions have been collected from git commit logs, reading through code and data sheets. Some drivers have incomplete doc and are annotated with the comment '[to be documented]'. Signed-off-by: Aishwarya Pant Reviewed-by: Hal Rosenstock Signed-off-by: Jonathan Corbet Documentation/ABI/stable/sysfs-class-infiniband | 818 +++++++++++++++++++++++ Documentation/ABI/testing/sysfs-class-infiniband | 16 - Documentation/infiniband/sysfs.txt | 129 +--- 3 files changed, 820 insertions(+), 143 deletions(-) commit 017ac5caefa0eadd5c78265f0ceec8bf10e528a8 Author: Aishwarya Pant Date: Mon Feb 19 23:46:53 2018 +0530 aoe: document sysfs interface Documentation has been compiled from git commit logs and descriptions in Documentation/aoe/aoe.txt. This should be useful for scripting and tracking changes in the ABI. Signed-off-by: Aishwarya Pant Signed-off-by: Jonathan Corbet Documentation/ABI/testing/sysfs-block-aoe | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 088103021f74b427857cae6dfb16dfdb637e4ede Author: Aishwarya Pant Date: Fri Feb 23 18:53:52 2018 +0530 Documentation/ABI: add sysfs interface for s6e63m0 lcd driver Document sysfs attributes of s6e63m0 lcd panel driver by looking through git logs and reading code. Signed-off-by: Aishwarya Pant Signed-off-by: Jonathan Corbet Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 62c60efb63c868c1b1e54a1138c3295deae76eda Author: Heiner Kallweit Date: Tue Dec 5 23:17:19 2017 +0100 firmware: arm_scpi: improve info message for pre-1.0 firmware On legacy pre-1.0 firmware versions so far the following message is printed which may cause some confusion: SCP Protocol 0.0 Firmware 0.0.0 version Therefore replace the message with the following if firmware doesn't provide usable version information: SCP Protocol legacy pre-1.0 firmware Tested-by: Kevin Hilman Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 96fe77b6d4762604ba034d57319ad6c4ef071205 Author: Heiner Kallweit Date: Tue Dec 5 23:17:15 2017 +0100 firmware: arm_scpi: use FIELD_GET/_PREP to simplify macro definitions Macro definitions can be simplified by making use of the FIELD_GET/_PREP bitfield macros. Tested-by: Kevin Hilman Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) commit 17431b787460d5c365d81224f95bf88b4685588b Author: Heiner Kallweit Date: Tue Dec 5 23:17:13 2017 +0100 firmware: arm_scpi: remove struct sensor_capabilities One more single-element struct was left, remove it. Tested-by: Kevin Hilman Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 5204abd35243760116efcf565b55880915452bab Author: Heiner Kallweit Date: Tue Dec 5 23:17:11 2017 +0100 firmware: arm_scpi: fix incorrect __iomem accesses using correct accessors At several positions in the code sparse complains about incorrect access to __iomem annotated memory. Fix this and make sparse happy. Tested-by: Kevin Hilman Signed-off-by: Heiner Kallweit [Sudeep Holla: changed the patch title to describe the change] Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit c10bd41ab0b2508a98651ab3e4e9fbc85425eaad Author: Sudeep Holla Date: Tue Dec 5 23:17:09 2017 +0100 firmware: arm_scpi: remove all single element structures Both clk_get_value and sensor_value structures contains a single element and hence needs no packing making the whole structure defination unnecessary. This patch gets rid of both those unnecessary structures. Tested-by: Kevin Hilman Reviewed-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit 27901cccf8dd7b9e8d77c2637a2b306d731e567d Author: Sudeep Holla Date: Tue Dec 5 23:17:03 2017 +0100 firmware: arm_scpi: drop unnecessary type cast to scpi_shared_mem This patch drops the only present type cast of the SCPI payload pointer to scpi_shared_mem inorder to align with other occurrences, IOW for consistency. Tested-by: Kevin Hilman Reviewed-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83a6060c0cd07cafdf8baa08e26c602a06977a2c Author: Heiner Kallweit Date: Tue Dec 5 23:16:58 2017 +0100 firmware: arm_scpi: improve struct sensor_value lo_val and hi_val together in this order are a little endian 64 bit value. Therefore we can simplify struct sensor_value and the code by defining it as a __le64 value and by using le64_to_cpu. Tested-by: Kevin Hilman Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 7cd49a264594251d87e504fe07dcb1fe2c99bbef Author: Heiner Kallweit Date: Tue Dec 5 23:16:55 2017 +0100 firmware: arm_scpi: improve handling of protocol and firmware version subfields By using FIELD_GET and proper masks we can avoid quite some shifting and masking macro magic and make the code better readable. Tested-by: Kevin Hilman Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) commit a963d7c5264eaa544837ac8182a9eea55007a669 Author: Heiner Kallweit Date: Tue Dec 5 23:16:52 2017 +0100 firmware: arm_scpi: improve struct dvfs_info to make code better readable Making the header subfields members of struct dvfs_info allows to make the code better readable and avoids some macro magic. In addition remove a useless statement using info->latency. Tested-by: Kevin Hilman Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 5abc7935ed5bf70aa69a6001eee8495df43a17c7 Author: Heiner Kallweit Date: Tue Dec 5 23:16:48 2017 +0100 firmware: arm_scpi: make scpi_probe completely device-managed Replace two remaining functions in probe with their devm versions. Tested-by: Kevin Hilman Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit c14f1db41d0af210986468637f555dfdc72b0d57 Author: Heiner Kallweit Date: Tue Dec 5 23:16:42 2017 +0100 firmware: arm_scpi: make freeing mbox channels device-managed Make freeing the mbox channels device-managed, thus further simplifying scpi_remove and and one further step to get rid of scpi_remove. Tested-by: Kevin Hilman Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) commit cd6f0602d2950efb488290571c2ae2ca92befe53 Author: Heiner Kallweit Date: Tue Dec 5 23:16:35 2017 +0100 firmware: arm_scpi: remove two unneeded devm_kfree's in scpi_remove Both memory areas are free'd anyway when the device is destroyed, so we don't have to do it manually. Tested-by: Kevin Hilman Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 2 -- 1 file changed, 2 deletions(-) commit 9b58eae4019ad5ba61b60c678f46d096c4791598 Author: Aishwarya Pant Date: Fri Feb 23 18:46:32 2018 +0530 Documentation/ABI: clean up sysfs-class-pktcdvd Clean up the sysfs documentation such that it is in the same format as described in Documentation/ABI/README. Mainly, the patch moves the attribute names to the 'What:' field. This might be useful for scripting and tracking changes in the ABI. Signed-off-by: Aishwarya Pant Signed-off-by: Jonathan Corbet Documentation/ABI/testing/sysfs-class-pktcdvd | 129 +++++++++++++++----------- 1 file changed, 75 insertions(+), 54 deletions(-) commit 8fcce5803afd4615188fb7017f1d4c6404ca647e Author: Mike Rapoport Date: Tue Feb 20 20:36:25 2018 +0200 doc-guide: kernel-doc: add comment about formatting verification Currently there is no automated checking for kernel-doc comments except running 'kernel-doc -v -none '. Mention the possibility to run kernel-doc to verify formatting of the comments in the kernel-doc guide. Signed-off-by: Mike Rapoport Signed-off-by: Jonathan Corbet Documentation/doc-guide/kernel-doc.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 29b26ae47031e5c8d6cd4ad20b3eaac79c3bf017 Author: Philipp Hahn Date: Mon Feb 19 10:39:02 2018 +0100 doc: module-signing.rst: Fix reST formatting Move the _if_ outside the verbatim string. Make key ring name as a verbatim string. Signed-off-by: Philipp Hahn Signed-off-by: Jonathan Corbet Documentation/admin-guide/module-signing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dddc7231b9ee253c9e7d23a3bd9d1e3b55613dcb Author: Philipp Hahn Date: Mon Feb 19 10:39:01 2018 +0100 doc: Rename .system_keyring to .builtin_trusted_keys Commit d3bfe84129f65e0af2450743ebdab33d161d01c9 changed the name but did not update the documentation. Fixes: d3bfe84129f65e0af2450743ebdab33d161d01c9 Signed-off-by: Philipp Hahn Signed-off-by: Jonathan Corbet Documentation/admin-guide/module-signing.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bf79cd635db50fab2319add2462cf803ff76d346 Author: Jacopo Mondi Date: Tue Feb 20 16:12:04 2018 +0100 soc: renesas: rcar-rst: Add support for R-Car M3-N Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman Documentation/devicetree/bindings/reset/renesas,rst.txt | 1 + drivers/soc/renesas/Kconfig | 4 ++-- drivers/soc/renesas/rcar-rst.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) commit b9c7468279e2b414676c8309d1f5f41fce26fd18 Author: Michal Simek Date: Wed Jan 17 16:07:11 2018 +0100 arm64: zynqmp: Add SPDX license identifier Add SPDX identifier as was done by for example by: "License cleanup: add SPDX GPL-2.0 license identifier to files with no license" (commit ) Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/Makefile | 1 + arch/arm64/boot/dts/xilinx/zynqmp-ep108-clk.dtsi | 1 + arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts | 1 + arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 1 + 4 files changed, 4 insertions(+) commit 0f780ca012f2dc616a4ed3eb51a42170a39de1c3 Author: Michal Simek Date: Wed Jan 17 16:02:26 2018 +0100 arm64: zynqmp: Fix alignment in dts files Trivial changes. Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts | 2 +- arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 33af509fc69d1723ca766d4961fcc6cb87c96351 Author: Michal Simek Date: Wed Jan 17 15:57:18 2018 +0100 arm64: zynqmp: Use zynqmp specific compatible string for macb The patch "devicetree: Add compatible string for Zynq Ultrascale+ MPSoC" (commit <988d6f07fc0a29e392035ba56e3bcfaf7b397d95>) introduced specific compatible string for ZynqMP which should be used first. Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b79a732504ad2d6552458eaf72b4ed807da88340 Author: James Hogan Date: Wed Feb 21 15:42:32 2018 +0000 clocksource: Remove metag generic timer driver Now that arch/metag/ has been removed, remove the metag generic per-thread timer driver. It is of no value without the architecture code. Signed-off-by: James Hogan Acked-by: Daniel Lezcano Cc: Thomas Gleixner Cc: linux-metag@vger.kernel.org drivers/clocksource/Kconfig | 5 -- drivers/clocksource/Makefile | 1 - drivers/clocksource/metag_generic.c | 161 ------------------------------------ include/clocksource/metag_generic.h | 21 ----- include/linux/cpuhotplug.h | 1 - 5 files changed, 189 deletions(-) commit df46bb1909d92eedccd4216c88e43f75cb0b2901 Author: James Hogan Date: Wed Feb 21 15:31:32 2018 +0000 irqchip: Remove metag irqchip drivers Now that arch/metag/ has been removed, remove the two metag irqchip drivers. They are of no value without the architecture code. - irq-metag: Meta internal (HWSTATMETA) interrupt code. - irq-metag-ext: Meta External interrupt code. Signed-off-by: James Hogan Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: linux-metag@vger.kernel.org drivers/irqchip/Makefile | 2 - drivers/irqchip/irq-metag-ext.c | 871 -------------------------------------- drivers/irqchip/irq-metag.c | 343 --------------- include/linux/irqchip/metag-ext.h | 34 -- include/linux/irqchip/metag.h | 25 -- 5 files changed, 1275 deletions(-) commit 5f171577b4f35b44795a73bde8cf2c49b4073925 Author: James Hogan Date: Tue Oct 24 16:52:32 2017 +0100 Drop a bunch of metag references Now that arch/metag/ has been removed, drop a bunch of metag references in various codes across the whole tree: - VM_GROWSUP and __VM_ARCH_SPECIFIC_1. - MT_METAG_* ELF note types. - METAG Kconfig dependencies (FRAME_POINTER) and ranges (MAX_STACK_SIZE_MB). - metag cases in tools (checkstack.pl, recordmcount.c, perf). Signed-off-by: James Hogan Acked-by: Steven Rostedt (VMware) Acked-by: Peter Zijlstra (Intel) Reviewed-by: Guenter Roeck Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-mm@kvack.org Cc: linux-metag@vger.kernel.org include/linux/cpuhotplug.h | 1 - include/linux/mm.h | 2 -- include/trace/events/mmflags.h | 2 +- include/uapi/linux/elf.h | 3 --- lib/Kconfig.debug | 2 +- mm/Kconfig | 7 +++---- scripts/checkstack.pl | 4 ---- scripts/recordmcount.c | 20 -------------------- tools/perf/perf-sys.h | 4 ---- 9 files changed, 5 insertions(+), 40 deletions(-) commit ca34b4f0bed802e1c8612ef08456b20992aeb02a Author: Rajmohan Mani Date: Tue Feb 20 15:54:08 2018 -0800 gpio: tps68470: Update to SPDX license identifier Remove the GPL v2 license boilerplate and update with the SPDX license identifier. Signed-off-by: Rajmohan Mani Signed-off-by: Linus Walleij drivers/gpio/gpio-tps68470.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 1d5013f1b64dbd692975be5db0e42bac291c6de9 Author: Andrzej Hajda Date: Tue Feb 20 08:05:39 2018 +0100 clk: samsung: Add compile time PLL rate validators Rates declared in PLL rate tables should match exactly rates calculated from PLL coefficients. To avoid possible mistakes we can use compile time validation. The patch introduces such validators and expands all initializers with additional input frequency parameter, required to validate rates. Since S3C24xx PLLs requires different validators two new macros have been introduced to deal with it. Also, since PLLs 4502 and 4508 have different formulas PLL_45XX_RATE has been replaced with PLL_4508_RATE. As the patch adds only compile time validators it should not have impact on compiled code. Signed-off-by: Andrzej Hajda Acked-by: Krzysztof Kozlowski Acked-by: Tomasz Figa Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos3250.c | 114 +++++++++++++++++----------------- drivers/clk/samsung/clk-exynos4.c | 102 +++++++++++++++--------------- drivers/clk/samsung/clk-exynos5250.c | 54 ++++++++-------- drivers/clk/samsung/clk-exynos5260.c | 90 +++++++++++++-------------- drivers/clk/samsung/clk-exynos5410.c | 20 +++--- drivers/clk/samsung/clk-exynos5420.c | 62 +++++++++---------- drivers/clk/samsung/clk-exynos5433.c | 116 +++++++++++++++++------------------ drivers/clk/samsung/clk-exynos7.c | 2 +- drivers/clk/samsung/clk-pll.h | 48 ++++++++++++--- drivers/clk/samsung/clk-s3c2410.c | 108 ++++++++++++++++---------------- 10 files changed, 372 insertions(+), 344 deletions(-) commit 179db533c08431f509a3823077549773d519358b Author: Andrzej Hajda Date: Fri Feb 16 15:57:53 2018 +0100 clk: samsung: s3c2410: Fix PLL rates Rates declared in PLL rate tables should match exactly rates calculated from the PLL coefficients. If that is not the case, rate of the PLL's child clock might be set not as expected. For instance, if in the PLL rates table we have a 393216000 Hz entry and the real value as returned by the PLL's recalc_rate callback is 393216003, after setting PLL's clk rate to 393216000 clk_get_rate will return 393216003. If we now attempt to set rate of a PLL's child divider clock to 393216000/2 its rate will be 131072001, rather than 196608000. That is, the divider will be set to 3 instead of 2, because 393216003/2 is greater than 196608000. To fix this issue declared rates are changed to exactly match rates generated by the PLL, as calculated from the P, M, S, K coefficients. Signed-off-by: Andrzej Hajda Acked-by: Tomasz Figa Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-s3c2410.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 7e4db0c2836e892766565965207eee051c8037b9 Author: Andrzej Hajda Date: Fri Feb 16 15:57:52 2018 +0100 clk: samsung: exynos7: Fix PLL rates Rates declared in PLL rate tables should match exactly rates calculated from the PLL coefficients. If that is not the case, rate of the PLL's child clock might be set not as expected. For instance, if in the PLL rates table we have a 393216000 Hz entry and the real value as returned by the PLL's recalc_rate callback is 393216003, after setting PLL's clk rate to 393216000 clk_get_rate will return 393216003. If we now attempt to set rate of a PLL's child divider clock to 393216000/2 its rate will be 131072001, rather than 196608000. That is, the divider will be set to 3 instead of 2, because 393216003/2 is greater than 196608000. To fix this issue declared rates are changed to exactly match rates generated by the PLL, as calculated from the P, M, S, K coefficients. Signed-off-by: Andrzej Hajda Acked-by: Tomasz Figa Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab0447845cffc0fd752df2ccd6b4e34006000ce4 Author: Andrzej Hajda Date: Fri Feb 16 15:57:51 2018 +0100 clk: samsung: exynos5433: Fix PLL rates Rates declared in PLL rate tables should match exactly rates calculated from the PLL coefficients. If that is not the case, rate of the PLL's child clock might be set not as expected. For instance, if in the PLL rates table we have a 393216000 Hz entry and the real value as returned by the PLL's recalc_rate callback is 393216003, after setting PLL's clk rate to 393216000 clk_get_rate will return 393216003. If we now attempt to set rate of a PLL's child divider clock to 393216000/2 its rate will be 131072001, rather than 196608000. That is, the divider will be set to 3 instead of 2, because 393216003/2 is greater than 196608000. To fix this issue declared rates are changed to exactly match rates generated by the PLL, as calculated from the P, M, S, K coefficients. Signed-off-by: Andrzej Hajda Acked-by: Tomasz Figa Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5433.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cdb68fbd4e7962be742c4f29475220c5bf28d8a5 Author: Andrzej Hajda Date: Fri Feb 16 15:57:50 2018 +0100 clk: samsung: exynos5260: Fix PLL rates Rates declared in PLL rate tables should match exactly rates calculated from the PLL coefficients. If that is not the case, rate of the PLL's child clock might be set not as expected. For instance, if in the PLL rates table we have a 393216000 Hz entry and the real value as returned by the PLL's recalc_rate callback is 393216003, after setting PLL's clk rate to 393216000 clk_get_rate will return 393216003. If we now attempt to set rate of a PLL's child divider clock to 393216000/2 its rate will be 131072001, rather than 196608000. That is, the divider will be set to 3 instead of 2, because 393216003/2 is greater than 196608000. To fix this issue declared rates are changed to exactly match rates generated by the PLL, as calculated from the P, M, S, K coefficients. Signed-off-by: Andrzej Hajda Acked-by: Tomasz Figa Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5260.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ac051eeabaa411ef89ae7cd5bb8e60cb41ad780 Author: Andrzej Hajda Date: Fri Feb 16 15:57:49 2018 +0100 clk: samsung: exynos5250: Fix PLL rates Rates declared in PLL rate tables should match exactly rates calculated from PLL coefficients. If that is not the case, rate of the PLL's child clock might be set not as expected. For instance, if in the PLL rates table we have a 393216000 Hz entry and the real value as returned by the PLL's recalc_rate callback is 393216003, after setting PLL's clk rate to 393216000 clk_get_rate will return 393216003. If we now attempt to set rate of a PLL's child divider clock to 393216000/2 its rate will be 131072001, rather than 196608000. That is, the divider will be set to 3 instead of 2, because 393216003/2 is greater than 196608000. To fix this issue declared rates are changed to exactly match rates generated by the PLL, as calculated from the P, M, S, K coefficients. Signed-off-by: Andrzej Hajda Acked-by: Chanwoo Choi Acked-by: Tomasz Figa Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5250.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a8321e7887410a2b2e80ab89d1ef7b30562658ea Author: Andrzej Hajda Date: Fri Feb 16 15:57:48 2018 +0100 clk: samsung: exynos3250: Fix PLL rates Rates declared in PLL rate tables should match exactly rates calculated from PLL coefficients. If that is not the case, rate of the PLL's child clock might be set not as expected. For instance, if in the PLL rates table we have a 393216000 Hz entry and the real value as returned by the PLL's recalc_rate callback is 393216003, after setting PLL's clk rate to 393216000 clk_get_rate will return 393216003. If we now attempt to set rate of a PLL's child divider clock to 393216000/2 its rate will be 131072001, rather than 196608000. That is, the divider will be set to 3 instead of 2, because 393216003/2 is greater than 196608000. To fix this issue declared rates are changed to exactly match rates generated by the PLL, as calculated from the P, M, S, K coefficients. In this patch an erroneous P value for 74176002 output frequency is also corrected. Signed-off-by: Andrzej Hajda Acked-by: Chanwoo Choi Acked-by: Tomasz Figa Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos3250.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 38b35992b7d2729095a6e78a0f06f2f04c5a4e90 Author: Colin Ian King Date: Fri Feb 23 12:29:49 2018 +0000 PCI: rcar-gen2: Remove duplicated bit-wise or of RCAR_PCI_INT_SIGRETABORT Bit pattern RCAR_PCI_INT_SIGRETABORT is being bit-wise or'd twice; remove the redundant 2nd RCAR_PCI_INT_SIGRETABORT. Signed-off-by: Colin Ian King Signed-off-by: Lorenzo Pieralisi Reviewed-by: Geert Uytterhoeven drivers/pci/host/pci-rcar-gen2.c | 1 - 1 file changed, 1 deletion(-) commit 6238030cc2b6b3a7af9a9bff8bf9903970d79537 Author: David Lechner Date: Thu Jan 11 20:29:51 2018 -0600 ARM: davinci_all_defconfig: enable SYSCON_REBOOT_MODE This enables SYSCON_REBOOT_MODE as a module. This is used by LEGO MINDSTORMS EV3 to reboot into a special firmware update mode. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 1 + 1 file changed, 1 insertion(+) commit 7d7eff8f1afcf33bd643786364f4e0bda08877fe Author: David Lechner Date: Thu Jan 11 20:29:50 2018 -0600 ARM: dts: da850-lego-ev3: Add node for reboot modes This adds a new node for reboot modes on LEGO MINDSTORMS EV3. The EV3's bootloader looks for a magic number in the ARM local RAM and if found, it will boot into a special firmware update mode where the flash memory can be written via USB. This has been testing working using the command: # systemctl reboot loader Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lego-ev3.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 08622940b5cd2c8799992ca69e368caf1608af8d Author: Ulf Magnusson Date: Tue Feb 6 23:11:06 2018 +0100 PCI: vmd: Fix malformed Kconfig default 'default N' should be 'default n', though they happen to have the same effect here, due to undefined symbols (N in this case) evaluating to n in a tristate sense. Remove the default instead of changing it. bool and tristate symbols implicitly default to n. Signed-off-by: Ulf Magnusson [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas drivers/pci/host/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 721dfe4133a9a41e4b4a74e5b41089b7dac8f539 Author: Santha Meena Ramamoorthy Date: Thu Feb 22 10:15:11 2018 -0800 staging: speakup: remove space after a cast Remove blank space after a cast to conform to Linux kernel coding style. Problem found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/speakup_dtlk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6222d13d9e2a074475d07c89f9dbc463e845ab9 Author: Santha Meena Ramamoorthy Date: Thu Feb 22 10:15:10 2018 -0800 staging: speakup: match alignment with open parenthesis Match alignment with open parenthesis to conform to Linux kernel coding style. Problem found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/speakup_dtlk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0f7be57c057cb24056f80dd270e8a55db4af458d Author: Santha Meena Ramamoorthy Date: Thu Feb 22 10:15:09 2018 -0800 staging: speakup: add spaces around arithmetic operators Add space around arithmetic operators ('+', '-' and '*') to conform to Linux kernel coding style. Problem found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/speakup_dtlk.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit ba3d01560b0b514a73bf51c5ff547ee6c4953d1d Author: Quytelda Kahja Date: Thu Feb 22 17:33:01 2018 -0800 Staging: gdm724x: LTE: Refactor gdm_lte_pdn_table(). Mostly this change just reverses the primary conditional so most of the code can be pulled back a tab, which fixes some code style warnings. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_lte.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 1b5e56ece3f50197e1c2748802963ba3d8363770 Author: Quytelda Kahja Date: Thu Feb 22 17:33:00 2018 -0800 Staging: gdm724x: Simplify the struct gdm_endian to a variable. Since the testing for host endianness and in-driver conversion were removed in 77e8a50149a2, the gdm_endian struct contains only one member, and can therefore be simplified to a single u8 variable. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_endian.c | 24 ++++++++---------------- drivers/staging/gdm724x/gdm_endian.h | 13 ++++--------- drivers/staging/gdm724x/gdm_lte.c | 7 +++---- drivers/staging/gdm724x/gdm_lte.h | 2 +- drivers/staging/gdm724x/gdm_usb.c | 30 +++++++++++++++--------------- drivers/staging/gdm724x/gdm_usb.h | 2 +- 6 files changed, 32 insertions(+), 46 deletions(-) commit 8db3656310f6eca749e4672ed6dba20c356a7c4c Author: Quytelda Kahja Date: Thu Feb 22 17:30:50 2018 -0800 Staging: gdm724x: LTE: Fix trailing open parentheses. Fix lines with a trailing open parenthesis, which is a coding style issue. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_lte.c | 44 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 23 deletions(-) commit 879659bb87a87a7a23b190e211d33bdd6763c746 Author: Benjamin Gaignard Date: Wed Jan 31 09:05:08 2018 +0100 drm/stm: check pitch and size calculations even if !CONFIG_MMU In all cases we have to check pitch and size calculations to speed up data transfer. Fixes: 21f815bf773c ("drm/stm: drv: Improve data transfers") Signed-off-by: Benjamin Gaignard Tested-by: Philippe Cornu Reviewed-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20180131080508.14356-1-benjamin.gaignard@linaro.org drivers/gpu/drm/stm/drv.c | 2 -- 1 file changed, 2 deletions(-) commit a7bc5773cd166032e35e343dfb6067a93d8402d1 Author: Mauro Carvalho Chehab Date: Fri Feb 23 03:15:42 2018 -0500 ov13858: fix endiannes warnings 3 warning regressions: + drivers/media/i2c/ov13858.c: warning: cast to restricted __be32: => 1093:16 + drivers/media/i2c/ov13858.c: warning: incorrect type in assignment (different base types): => 1111:13 + drivers/media/i2c/ov13858.c: warning: incorrect type in initializer (different base types): => 1071:27 Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov13858.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 3b498424002755b06a86d56acf9e4c8e5e5085ff Author: Hugues Fruchet Date: Thu Feb 8 07:22:14 2018 -0500 media: ov5640: fix framerate update After a framerate update through s_frame_interval(), the new framerate was not taken into account when streaming, but was taken into account on next session. This was due to sensor->current_mode not updated accordingly to new framerate setting in ov5640_s_frame_interval(). Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 2 ++ 1 file changed, 2 insertions(+) commit 8670d70a4286fc9be47f4c9654e071bce97111f2 Author: Hugues Fruchet Date: Tue Feb 6 08:24:09 2018 -0500 media: ov5640: fix virtual_channel parameter permissions Fix module_param(virtual_channel) permissions. This problem was detected by checkpatch: $ scripts/checkpatch.pl -f drivers/media/i2c/ov5640.c ERROR: Use 4 digit octal (0777) not decimal permissions +module_param(virtual_channel, int, 0); Also add an error trace in case of virtual_channel not in the valid range of values. Signed-off-by: Hugues Fruchet Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 41d8d7f517126fa104a67c2b0cc23cf5c12fadc4 Author: Hugues Fruchet Date: Thu Feb 1 03:44:06 2018 -0500 media: ov5640: various typo & style fixes Various typo & style fixes either detected by code review or checkpatch. Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 3924c62383ade455d6242f2b017cb67b92aa50a7 Author: Hugues Fruchet Date: Wed Jan 31 07:46:17 2018 -0500 media: ov5640: add error trace in case of i2c read failure Add an error trace in ov5640_read_reg() in case of i2c_transfer() failure. Uniformize error traces using dev_err instead v4l2_err. Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d47c412639f0d283f377ff01d9e6a9cfa44f2adc Author: Hugues Fruchet Date: Wed Jan 31 04:08:10 2018 -0500 media: ov5640: add JPEG support Add YUV422 encoded JPEG support. Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) commit 01b8444828fc04b27b90bfebb50006219e930433 Author: Jacopo Mondi Date: Wed Jan 24 04:30:50 2018 -0500 media: v4l2: i2c: ov7670: Implement OF mbus configuration ov7670 driver supports two optional properties supplied through platform data, but currently does not support any standard video interface property. Add support through OF parsing for 2 generic properties (vsync and hsync polarities) and for one custom property already supported through platform data to suppress pixel clock output during horizontal blanking. While at there, check return value of register writes in set_fmt function and rationalize spacings. Signal polarities and pixel clock blanking verified through scope and image capture. Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 1 + drivers/media/i2c/ov7670.c | 98 +++++++++++++++++++++++++++++++++++++++------- 2 files changed, 85 insertions(+), 14 deletions(-) commit 622b2d10fc28616add3e253ed80010136f272235 Author: Jacopo Mondi Date: Wed Jan 24 04:30:49 2018 -0500 media: dt-bindings: Add OF properties to ov7670 Describe newly introduced OF properties for ov7670 image sensor. The driver supports two standard properties to configure synchronism signals polarities and one custom property already supported as platform data options to suppress pixel clock during horizontal blankings. Re-phrase child nodes description while at there. Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/i2c/ov7670.txt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 36e49ffb978ef7284ae235b915a7bd6713aa20de Author: Gustavo A. R. Silva Date: Mon Jan 29 19:32:01 2018 -0500 media: i2c: ov9650: fix potential integer overflow in __ov965x_set_frame_interval Cast fi->interval.numerator to u64 in order to avoid a potential integer overflow. This variable is being used in a context that expects an expression of type u64. Addresses-Coverity-ID: 1324146 ("Unintentional integer overflow") [Sakari Ailus: use do_div() to make this work on 32-bit systems] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9650.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b1f5d0ae930d92bfddb74e99324542456083141a Author: Akinobu Mita Date: Sun Jan 21 10:14:14 2018 -0500 media: ov9650: support device tree probing The ov9650 driver currently only supports legacy platform data probe. This change adds device tree probing. There has been an attempt to add device tree support for ov9650 driver by Hugues Fruchet as a part of the patchset that adds support of OV9655 camera (http://www.spinics.net/lists/linux-media/msg117903.html), but it wasn't merged into mainline because creating a separate driver for OV9655 is preferred. This is very similar to Hugues's patch, but not supporting new device. Cc: Jacopo Mondi Cc: H. Nikolaus Schaller Cc: Hugues Fruchet Cc: Mauro Carvalho Chehab Cc: Rob Herring Reviewed-by: Sylwester Nawrocki Signed-off-by: Akinobu Mita Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9650.c | 130 ++++++++++++++++++++++++++++++++------------- 1 file changed, 92 insertions(+), 38 deletions(-) commit 7b05db639edb650ba46d67ca300635ae89b7320c Author: Akinobu Mita Date: Sun Jan 21 10:14:16 2018 -0500 media: ov9650: add device tree binding Now the ov9650 driver supports device tree probing. So this adds a device tree binding documentation. Cc: Sylwester Nawrocki Cc: Jacopo Mondi Cc: H. Nikolaus Schaller Cc: Hugues Fruchet Cc: Mauro Carvalho Chehab Reviewed-by: Rob Herring Signed-off-by: Akinobu Mita Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/ov9650.txt | 36 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 37 insertions(+) commit be5f18ce3a9635f4bbdc351f07710560d09dc1c9 Author: Akinobu Mita Date: Sun Jan 21 10:14:15 2018 -0500 media: MAINTAINERS: add entry for ov9650 driver This adds an entry to the MAINTAINERS file for ov9650 driver. The following persons are added in this entry. * Sakari as a person who looks after media sensor driver patches * Sylwester as a module author * Myself as a person who has the hardware and can test the patches Cc: Jacopo Mondi Cc: H. Nikolaus Schaller Cc: Hugues Fruchet Cc: Mauro Carvalho Chehab Cc: Rob Herring Signed-off-by: Akinobu Mita Reviewed-by: Jacopo Mondi Acked-by: Sylwester Nawrocki Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit f4b32c292aa66788ba7d4db54a76b4a08f60784a Author: Gustavo A. R. Silva Date: Tue Jan 23 12:49:29 2018 -0500 media: ov13858: Use false for boolean value Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov13858.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d365bc92475205312c0064e92398ead059156bd9 Author: Chiranjeevi Rapolu Date: Wed Jan 24 23:34:39 2018 -0500 media: ov13858: Avoid possible null first frame Previously, the sensor, with default settings, was outputting SOF without data. This results in frame sync error on the receiver side. Now, configure the sensor to output SOF with MIPI data for all frames. This avoids possible null first frame on the bus. Signed-off-by: Chiranjeevi Rapolu Signed-off-by: Tianshu Qiu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov13858.c | 4 ++++ 1 file changed, 4 insertions(+) commit c723001f3b5951bd017b2a24360ad188f488e994 Author: Sakari Ailus Date: Fri Jan 19 05:49:02 2018 -0500 media: ov2685: Assign ret in default case in s_ctrl callback Assign ret in the default case for s_ctrl callback. This can't happen but still may result in compiler warnings. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2685.c | 1 + 1 file changed, 1 insertion(+) commit e3861d9118c815c4cf1ef2f7365005205c07c65a Author: Shunqian Zheng Date: Tue Jan 16 04:22:01 2018 -0500 media: ov2685: add support for OV2685 sensor This patch adds driver for Omnivision's ov2685 sensor. Though the ov2685 can output yuv data, this driver only supports the raw bayer format, including the following features: - output 1600x1200 at 30fps - test patterns - manual exposure/gain control - vblank and hblank - media controller - runtime pm [Sakari Ailus: trivial: ov5695_of_match -> ov2685_of_match] Signed-off-by: Shunqian Zheng Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 + drivers/media/i2c/Kconfig | 12 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov2685.c | 845 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 865 insertions(+) commit 36125eec01f4e82726013b13ecad908829da0e46 Author: Shunqian Zheng Date: Tue Jan 16 04:22:00 2018 -0500 media: dt-bindings: media: Add bindings for OV2685 Add device tree binding documentation for the OV2685 sensor. Signed-off-by: Shunqian Zheng Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/ov2685.txt | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 8a77009be4bed02dc00c0a84841c98e320ad2ecf Author: Shunqian Zheng Date: Tue Jan 16 04:21:59 2018 -0500 media: ov5695: add support for OV5695 sensor This patch adds driver for Omnivision's ov5695 sensor, the driver supports following features: - supported resolutions + 2592x1944 at 30fps + 1920x1080 at 30fps + 1296x972 at 60fps + 1280x720 at 30fps + 640x480 at 120fps - test patterns - manual exposure/gain(analog and digital) control - vblank and hblank - media controller - runtime pm Signed-off-by: Shunqian Zheng Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 + drivers/media/i2c/Kconfig | 11 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov5695.c | 1399 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1418 insertions(+) commit a327fb0c1a89452195bf6f29359923401a5978ed Author: Shunqian Zheng Date: Tue Jan 16 04:21:58 2018 -0500 media: dt-bindings: media: Add bindings for OV5695 Add device tree binding documentation for the OV5695 sensor. Signed-off-by: Shunqian Zheng Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/ov5695.txt | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 40de44bbe09bcb9cc7b8dd648ca2cacf752796ec Author: Hans Verkuil Date: Tue Jan 16 06:02:45 2018 -0500 media: mt9t031: deprecate, move to staging This driver is unused and depends on the deprecated soc-camera framework. Move it to staging in preparation for being removed unless someone does the work to convert it to a proper V4L2 subdev driver. Signed-off-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/Kconfig | 6 - drivers/media/i2c/soc_camera/Makefile | 1 - drivers/media/i2c/soc_camera/mt9t031.c | 858 -------------------------------- drivers/staging/media/Kconfig | 2 + drivers/staging/media/Makefile | 1 + drivers/staging/media/mt9t031/Kconfig | 11 + drivers/staging/media/mt9t031/Makefile | 1 + drivers/staging/media/mt9t031/TODO | 5 + drivers/staging/media/mt9t031/mt9t031.c | 858 ++++++++++++++++++++++++++++++++ 9 files changed, 878 insertions(+), 865 deletions(-) commit 0f966bec710fd3f113a44e521e796cd225278fd4 Author: Hans Verkuil Date: Tue Jan 16 06:02:44 2018 -0500 media: imx074: deprecate, move to staging This driver is unused and depends on the deprecated soc-camera framework. Move it to staging in preparation for being removed unless someone does the work to convert it to a proper V4L2 subdev driver. Signed-off-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/Kconfig | 6 - drivers/media/i2c/soc_camera/Makefile | 1 - drivers/media/i2c/soc_camera/imx074.c | 497 ---------------------------------- drivers/staging/media/Kconfig | 2 + drivers/staging/media/Makefile | 1 + drivers/staging/media/imx074/Kconfig | 5 + drivers/staging/media/imx074/Makefile | 1 + drivers/staging/media/imx074/TODO | 5 + drivers/staging/media/imx074/imx074.c | 497 ++++++++++++++++++++++++++++++++++ 9 files changed, 511 insertions(+), 504 deletions(-) commit b39082e2bea6539819432293c0deb23620cb8a2a Author: Yong Zhi Date: Fri Feb 16 18:48:34 2018 -0500 media: intel-ipu3: cio2: Use SPDX license headers Adopt SPDX license headers for ipu3 cio2 driver. Signed-off-by: Yong Zhi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/intel/ipu3/ipu3-cio2.c | 12 ++---------- drivers/media/pci/intel/ipu3/ipu3-cio2.h | 14 ++------------ 2 files changed, 4 insertions(+), 22 deletions(-) commit d69a5a2cd197344f552c1c620300d479e98877ef Author: Yong Zhi Date: Thu Feb 8 19:14:24 2018 -0500 media: intel-ipu3: cio2: Disable and sync irq before stream off This is to avoid pending interrupts to be handled during stream off, in which case, the ready buffer will be removed from buffer list, thus not all buffers can be returned to VB2 as expected. Disable CIO2 irq at cio2_hw_exit() so no new interrupts are generated. Signed-off-by: Yong Zhi Signed-off-by: Tianshu Qiu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/intel/ipu3/ipu3-cio2.c | 4 ++++ 1 file changed, 4 insertions(+) commit 43df6ea0c6ae85ae81edda3261d8d257d88a78a2 Author: Jasmin Jessich Date: Sun Jan 14 05:21:43 2018 -0500 media: uvcvideo: Fixed ktime_t to ns conversion Commit 828ee8c71950 ("media: uvcvideo: Use ktime_t for timestamps") changed to use ktime_t for timestamps. Older Kernels use a struct for ktime_t, which requires the conversion function ktime_to_ns to be used on some places. With this patch it will compile now also for older Kernel versions. Signed-off-by: Jasmin Jessich Acked-by: Arnd Bergmann Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_video.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f14d4988c28e5243e43ba792ee34994951240b0f Author: Laurent Pinchart Date: Tue Jan 16 12:45:36 2018 -0500 media: uvcvideo: Use parentheses around sizeof operand While the sizeof is an operator and not a function, the preferred coding style in the kernel is to enclose its operand in parentheses. To avoid mixing multiple coding styles in the driver, use parentheses around all sizeof operands. While at it replace a kmalloc() with a kmalloc_array() to silence a checkpatch warning triggered by this patch. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_ctrl.c | 6 ++--- drivers/media/usb/uvc/uvc_driver.c | 53 +++++++++++++++++++------------------- drivers/media/usb/uvc/uvc_v4l2.c | 12 ++++----- drivers/media/usb/uvc/uvc_video.c | 2 +- 4 files changed, 37 insertions(+), 36 deletions(-) commit 2c6b222cee2d68e30f059b8ca9194532416bb3f4 Author: Laurent Pinchart Date: Tue Jan 16 12:45:36 2018 -0500 media: uvcvideo: Use internal kernel integer types Replace the __[su]{8,16,32} variant of integer types with the non-underscored types as the code is internal to the driver, not exposed to userspace. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_ctrl.c | 56 ++++++------ drivers/media/usb/uvc/uvc_driver.c | 36 ++++---- drivers/media/usb/uvc/uvc_isight.c | 6 +- drivers/media/usb/uvc/uvc_status.c | 4 +- drivers/media/usb/uvc/uvc_v4l2.c | 62 ++++++------- drivers/media/usb/uvc/uvc_video.c | 40 ++++---- drivers/media/usb/uvc/uvcvideo.h | 182 ++++++++++++++++++------------------- 7 files changed, 193 insertions(+), 193 deletions(-) commit ac95090a0440be1b17aa1b5d9462d9c67146ce0b Author: Andy Shevchenko Date: Thu Feb 22 14:59:23 2018 +0200 pci: Simplify code by using the new dmi_get_bios_year() helper ...instead of open coding its functionality. No changes in functionality. Signed-off-by: Andy Shevchenko Cc: Bjorn Helgaas Cc: Jean Delvare Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: linux-acpi@vger.kernel.org Cc: linux-pci@vger.kernel.org Link: http://lkml.kernel.org/r/20180222125923.57385-4-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar drivers/pci/pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 9c0a30b67bd916a7da1a7101dbf3115e5f10d852 Author: Andy Shevchenko Date: Thu Feb 22 14:59:22 2018 +0200 ACPI/sleep: Simplify code by using the new dmi_get_bios_year() helper ...instead of open coding its functionality. No changes in functionality. Signed-off-by: Andy Shevchenko Cc: Bjorn Helgaas Cc: Jean Delvare Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: linux-acpi@vger.kernel.org Cc: linux-pci@vger.kernel.org Link: http://lkml.kernel.org/r/20180222125923.57385-3-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar drivers/acpi/sleep.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 69c42d493db452ea87c1ac56e83c978512f4e6ec Author: Andy Shevchenko Date: Thu Feb 22 14:59:21 2018 +0200 x86/pci: Simplify code by using the new dmi_get_bios_year() helper ...instead of open coding its functionality. No changes in functionality. Signed-off-by: Andy Shevchenko Cc: Bjorn Helgaas Cc: Jean Delvare Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: linux-acpi@vger.kernel.org Cc: linux-pci@vger.kernel.org Link: http://lkml.kernel.org/r/20180222125923.57385-2-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/pci/acpi.c | 8 ++------ arch/x86/pci/direct.c | 5 ++--- arch/x86/pci/mmconfig-shared.c | 9 ++------- 3 files changed, 6 insertions(+), 16 deletions(-) commit 492a1abd61e4b4f78c1c5804840a304a9e32da04 Author: Andy Shevchenko Date: Thu Feb 22 14:59:20 2018 +0200 dmi: Introduce the dmi_get_bios_year() helper function The pattern to only extract the year portion of date is used in several places and more users may come. By using this helper they may create slightly cleaner code. Signed-off-by: Andy Shevchenko [ Minor stylistic cleanup. ] Cc: Bjorn Helgaas Cc: Jean Delvare Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: linux-acpi@vger.kernel.org Cc: linux-pci@vger.kernel.org Link: http://lkml.kernel.org/r/20180222125923.57385-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar include/linux/dmi.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 24e8db62c135e142e23bec597adb135bd6a8828f Merge: a66b86f 91ab883 Author: Ingo Molnar Date: Fri Feb 23 08:20:18 2018 +0100 Merge tag 'v4.16-rc2' into x86/platform, to pick up fixes Signed-off-by: Ingo Molnar commit 1e304c47ef12d442ef02d94bdbaed8b1f0adec3c Author: Laurent Pinchart Date: Tue Jan 16 12:35:17 2018 -0500 media: uvcvideo: Use kernel integer types Replace the uint_{8,16,32} types with the corresponding native kernel types u{8,16,32}. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_driver.c | 16 ++++++++-------- drivers/media/usb/uvc/uvc_v4l2.c | 2 +- drivers/media/usb/uvc/uvcvideo.h | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) commit cb9cd6c5c30b6032507aadde5d5d71221b19c3d7 Author: Laurent Pinchart Date: Tue Jan 16 12:32:54 2018 -0500 media: uvcvideo: Drop extern keyword in function declarations The extern keyword isn't needed to declare functions in header files. Drop it. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvcvideo.h | 144 +++++++++++++++++++-------------------- 1 file changed, 70 insertions(+), 74 deletions(-) commit 07b7d9fc2ab5b510bfae51b9ccf29c9ec7fcb4cd Author: Philipp Zabel Date: Thu Jan 4 17:51:29 2018 -0500 media: uvcvideo: Support multiple frame descriptors with the same dimensions The Microsoft HoloLens Sensors device has two separate frame descriptors with the same dimensions, each with a single different frame interval: VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 1 bmCapabilities 0x00 Still image unsupported wWidth 1280 wHeight 481 dwMinBitRate 147763200 dwMaxBitRate 147763200 dwMaxVideoFrameBufferSize 615680 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 2 bmCapabilities 0x00 Still image unsupported wWidth 1280 wHeight 481 dwMinBitRate 443289600 dwMaxBitRate 443289600 dwMaxVideoFrameBufferSize 615680 dwDefaultFrameInterval 111111 bFrameIntervalType 1 dwFrameInterval( 0) 111111 Skip duplicate dimensions in enum_framesizes, let enum_frameintervals list the intervals from both frame descriptors. Change set_streamparm to switch to the correct frame index when changing the interval. This enables 90 fps capture on a Lenovo Explorer Windows Mixed Reality headset. [laurent.pinchart@ideasonboard.com: Renamed tmp_ival to ival] Signed-off-by: Philipp Zabel Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_v4l2.c | 71 +++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 16 deletions(-) commit 859086ae3636eae0bf9f0fbbce2daf4d41ae9474 Author: Edgar Thier Date: Thu Oct 12 03:54:17 2017 -0400 media: uvcvideo: Apply flags from device to actual properties Use flags the device exposes for UVC controls. This allows the device to define which property flags are set. Since some cameras offer auto-adjustments for properties (e.g. auto-gain), the values of other properties (e.g. gain) can change in the camera. Examining the flags ensures that the driver is aware of such properties. Signed-off-by: Edgar Thier Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_ctrl.c | 52 ++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 13 deletions(-) commit 87915bf82eeaaf8c103e61dffe267ff18ffd4021 Author: Leon Romanovsky Date: Wed Feb 21 18:12:44 2018 +0200 RDMA/verbs: Return proper error code for not supported system call The proper return error is -EOPNOTSUPP and not -ENOSYS, so update all places in verbs.c to match this semantics. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 46 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 372e15c5db5f3f15423a2e6e6a71b77b39026ecf Author: Leon Romanovsky Date: Wed Feb 21 18:12:43 2018 +0200 RDMA/uverbs: Reduce number of command header flags checks Simplify the code by directly checking the availability of extended command flog instead of doing multiple shift operations. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 11 ++--------- include/uapi/rdma/ib_user_verbs.h | 5 +---- 2 files changed, 3 insertions(+), 13 deletions(-) commit cd35cf4b40f351fc9e53c2e2877a56da87dcd46d Author: Leon Romanovsky Date: Wed Feb 21 18:12:42 2018 +0200 RDMA/uverbs: Replace user's types with kernel's types The internal to kernel variable declarations don't need to be declared with user types. This patch converts such occurrences appeared in ib_uverbs_write(). Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6284380a97a60cbe827904dc454a835bc309c248 Author: Leon Romanovsky Date: Wed Feb 21 18:12:41 2018 +0200 RDMA/uverbs: Refactor the header validation logic Move all header validation logic to be performed before SRCU read lock. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 90 ++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 43 deletions(-) commit e21719fbbd1786c09132e0483c72c136a61b79ed Author: Leon Romanovsky Date: Wed Feb 21 18:12:40 2018 +0200 RDMa/uverbs: Copy ex_hdr outside of SRCU read lock The SRCU read lock protects the IB device pointer and doesn't need to be called before copying user provided header. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 491d5c6a3023e303cc693b91d9b3a4d54471c944 Author: Leon Romanovsky Date: Wed Feb 21 18:12:39 2018 +0200 RDMA/uverbs: Move uncontext check before SRCU read lock There is no need to take SRCU lock before checking file->ucontext, so move it do it before it. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit eb455e329bf65c75372da65a6a268c519f489183 Author: Leon Romanovsky Date: Wed Feb 21 18:12:38 2018 +0200 RDMA/uverbs: Properly check command supported mask The check based on index is not sufficient because IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ and IB_USER_VERBS_CMD_CREATE_CQ <= IB_USER_VERBS_CMD_OPEN_QP, so if we execute IB_USER_VERBS_EX_CMD_CREATE_CQ this code checks ib_dev->uverbs_cmd_mask not ib_dev->uverbs_ex_cmd_mask. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 77833b8a48084cb17e4bd631360b0093dd245a31 Author: Leon Romanovsky Date: Wed Feb 21 18:12:37 2018 +0200 RDMA/uverbs: Refactor command header processing Move all command header processing into separate function and perform those checks before acquiring SRCU read lock. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 62 ++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 30 deletions(-) commit f2630ce2fb93eab5f50aa00dac7ae24a3b4ce17f Author: Leon Romanovsky Date: Wed Feb 21 18:12:36 2018 +0200 RDMA/uverbs: Unify return values of not supported command The non-existing command is supposed to return -EOPNOTSUPP, but the current code returns different errors for different flows for the same failure. This patch unifies those flows. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit a9ed5b38aad704bbc250f9df2e9a29ee54388829 Author: Leon Romanovsky Date: Wed Feb 21 18:12:35 2018 +0200 RDMA/uverbs: Return not supported error code for unsupported commands Command that doesn't exist means that it is not supported, so update code to return -EOPNOTSUPP in case of failure. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43ae95130db8fb70010f09b734c7c606eb9e61ce Author: Leon Romanovsky Date: Wed Feb 21 18:12:34 2018 +0200 RDMA/uverbs: Fail as early as possible if not enough header data was provided Fail as early as possible if not enough header data was provided. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit a6c4a66ae923eb780ef693a6841cbff7a025cbf9 Author: Leon Romanovsky Date: Wed Feb 21 18:12:33 2018 +0200 RDMA/uverbs: Refactor flags checks and update return value Since commit f21519b23c1b ("IB/core: extended command: an improved infrastructure for uverbs commands"), the uverbs supports extra flags as an input to the command interface. However actually, there is only one flag available and used, so it is better to refactor the code, so the resolution and report to the users is done as early as possible. As part of this change, we changed the return value of failure case from ENOSYS to be EINVAL to be consistent with the rest flags checks. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 08f0e161636d940ff6c8f78863ce62361291e74b Author: Leon Romanovsky Date: Wed Feb 21 18:12:32 2018 +0200 RDMA/uverbs: Update sizeof users Update sizeof() users to be consistent with coding style. Reviewed-by: Dennis Dalessandro Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b5bc59818614a9d6d1fa2347b14dd52c4774fb70 Author: Leon Romanovsky Date: Wed Feb 21 18:12:31 2018 +0200 RDMA/uverbs: Convert command mask validity check function to be bool The function validate_command_mask() returns only two results: success or failure, so convert it to return bool instead of 0 and -1. Reported-by: Noa Osherovich Reviewed-by: Matan Barak Reviewed-by: Dennis Dalessandro Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4bb46608ed78758c89c77ae5d1163dce3df95950 Merge: f76a5c7 f457658 Author: Doug Ledford Date: Thu Feb 22 22:27:20 2018 -0500 Merge branch 'k.o/for-rc' into k.o/wip/dl-for-next There is a 14 patch series waiting to come into for-next that has a dependecy on code submitted into this kernel's for-rc series. So, merge the for-rc branch into the current for-next in order to make the patch series apply cleanly. Signed-off-by: Doug Ledford commit f76a5c75d93b0e9c14aa4d4422e7e7f8382a7ecb Merge: 3a14889 388ca8b Author: Doug Ledford Date: Thu Feb 22 20:52:28 2018 -0500 Merge tag 'mlx5-updates-2018-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into k.o/wip/dl-for-next mlx5-updates-2018-02-21 This series includes shared code updates for mlx5 core driver for both netdev and rdma subsystems. By Saeed, First six patches of the series are meant to address a performance issue and should provide a performance boost for multi core IRQ interrupt hungry workloads. The issue is fixed in the first patch, all other patches are meant to refactor the code in light of this fix. The problem it comes to fix, is a shared spinlock accessed across all HCA IRQs which protects the CQ database. To solve this we simply move the CQ database and its spinlock to be per EQ (IRQ), thus per core. By Yonatan, Fragmented completion queue (CQ) for RDMA, core driver implementation to create fragmented CQ buffers rather than one large contiguous memory buffer, the implementation scheme already exist and used by the netdev CQs, the patch shares that code with the rdma CQ creation flow and makes use of the new API in mlx5_ib driver. Thanks, Saeed. Merged into rdma-next tree as well as net-next tree to prevent conflicts in future patches between the two trees. Signed-off-by: Doug Ledford commit cf8037f8d08a078d263a9b725e3ae7603ad0d42e Author: James Smart Date: Thu Feb 22 08:18:52 2018 -0800 scsi: lpfc: Change Copyright of 12.0.0.0 modified files to 2018 Updated Copyright in files updated as part of 12.0.0.0 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_bsg.c | 2 +- drivers/scsi/lpfc/lpfc_ct.c | 2 +- drivers/scsi/lpfc/lpfc_debugfs.c | 2 +- drivers/scsi/lpfc/lpfc_debugfs.h | 2 +- drivers/scsi/lpfc/lpfc_hw.h | 2 +- drivers/scsi/lpfc/lpfc_ids.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 6efb23804153fac93bc49ef6e76707f35fbe2163 Author: James Smart Date: Thu Feb 22 08:18:51 2018 -0800 scsi: lpfc: update driver version to 12.0.0.0 Update the driver version to 12.0.0.0 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e565cf04138fca6ffeb884044febf922b2306d0 Author: James Smart Date: Thu Feb 22 08:18:50 2018 -0800 scsi: lpfc: Work around NVME cmd iu SGL type The hardware offload for NVME commands was created when the FC-NVME standard was setting SGL Descriptor Type to SGL Data Block Descriptor (0h) and SGL Descriptor Sub Type to Address (0h). A late change in NVMe-over-Fabrics obsoleted these values, creating a transport SGL descriptor type with new values to go into these fields. For initial hardware support, in order to be compliant to the spec, use host-supplied cmd IU buffers instead of the adapter generated values. Later hardware will correct this. Add a module parameter to override this offload disablement if looking for lowest latency. This is reasonable as nothing in FC-NVME uses the SQE SGL values. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 1 + drivers/scsi/lpfc/lpfc_attr.c | 14 ++++++++++++ drivers/scsi/lpfc/lpfc_hw4.h | 1 + drivers/scsi/lpfc/lpfc_init.c | 4 ++-- drivers/scsi/lpfc/lpfc_nvme.c | 51 ++++++++++++++++++++++++++++++------------- drivers/scsi/lpfc/lpfc_sli.c | 15 +++++++++++++ 6 files changed, 69 insertions(+), 17 deletions(-) commit 63452e144662a90b77fcdb27bd33c8b43655b850 Author: James Smart Date: Thu Feb 22 08:18:49 2018 -0800 scsi: lpfc: Fix nvme embedded io length on new hardware Newer hardware more strictly enforces buffer lenghts, causing an mis-set value to be identified. Older hardware won't catch it. The difference is benign on old hardware. Set the right embedded buffer length for nvme ios. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bc2b7c5317bd51df571e9d1131547901215f6c9 Author: James Smart Date: Thu Feb 22 08:18:48 2018 -0800 scsi: lpfc: Add embedded data pointers for enhanced performance The current driver isn't taking advantage of a performance hint whereby the initial data buffer descriptor can be placed in the WQE as well as the SGL. Add the logic to detect support for the feature and to use it when supported. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 2 ++ drivers/scsi/lpfc/lpfc_hw4.h | 3 +++ drivers/scsi/lpfc/lpfc_init.c | 20 ++++++++++++++++++++ drivers/scsi/lpfc/lpfc_nvme.c | 18 ++++++++++++++++++ drivers/scsi/lpfc/lpfc_nvmet.c | 24 ++++++++++++++++++++++++ drivers/scsi/lpfc/lpfc_scsi.c | 8 ++++++-- drivers/scsi/lpfc/lpfc_sli.c | 25 +++++++++++++++++++++---- 7 files changed, 94 insertions(+), 6 deletions(-) commit 1feb8204a12ed7987bffa75311754edc1367680f Author: James Smart Date: Thu Feb 22 08:18:47 2018 -0800 scsi: lpfc: Enable fw download on if_type=6 devices Current code is very explicit in what it allows to be downloaded. The driver checking prevented G7 firmware download. The driver checking is unnecessary as the device will validate what it receives. Revise the firmware download interface checking. Added a little debug support in case there is still a failure. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_hw4.h | 5 +---- drivers/scsi/lpfc/lpfc_init.c | 44 ++++++++++++++++++++++++++++++------------- drivers/scsi/lpfc/lpfc_sli.c | 1 + 3 files changed, 33 insertions(+), 17 deletions(-) commit 7365f6fdbba559f7e814519fafe6e4956f68b6be Author: James Smart Date: Thu Feb 22 08:18:46 2018 -0800 scsi: lpfc: Add if_type=6 support for cycling valid bits Traditional SLI4 required the driver to clear Valid bits on EQEs and CQEs after consuming them. The new if_type=6 hardware will cycle the value for what is valid on each queue itteration. The driver no longer has to touch the valid bits. This also means all the cpu cache dirtying and perhaps flush/refill's done by the hardware in accessing the EQ/CQ elements is eliminated. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_hw4.h | 18 ++++++++-- drivers/scsi/lpfc/lpfc_init.c | 11 +++++++ drivers/scsi/lpfc/lpfc_sli.c | 77 +++++++++++++++++++++++++++++++++++-------- drivers/scsi/lpfc/lpfc_sli4.h | 3 ++ 4 files changed, 92 insertions(+), 17 deletions(-) commit fbd8a6ba65443a8a79183edd9c2e1ad302339063 Author: James Smart Date: Thu Feb 22 08:18:45 2018 -0800 scsi: lpfc: Add 64G link speed support The G7 adapter supports 64G link speeds. Add support to the driver. In addition, a small cleanup to replace the odd bitmap logic with a switch case. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 14 +++------ drivers/scsi/lpfc/lpfc_attr.c | 62 ++++++++++++++++++++++++++++------------ drivers/scsi/lpfc/lpfc_ct.c | 5 ++++ drivers/scsi/lpfc/lpfc_els.c | 5 ++++ drivers/scsi/lpfc/lpfc_hbadisc.c | 1 + drivers/scsi/lpfc/lpfc_hw.h | 12 ++++++++ drivers/scsi/lpfc/lpfc_hw4.h | 3 ++ drivers/scsi/lpfc/lpfc_init.c | 17 +++++++++-- drivers/scsi/lpfc/lpfc_mbox.c | 4 +++ 9 files changed, 93 insertions(+), 30 deletions(-) commit c238b9b6eae399e81d36382b09c2e969c154b7ee Author: James Smart Date: Thu Feb 22 08:18:44 2018 -0800 scsi: lpfc: Add PCI Ids for if_type=6 hardware Add PCI ids for the new G7 adapter Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_hw.h | 1 + drivers/scsi/lpfc/lpfc_ids.h | 2 ++ drivers/scsi/lpfc/lpfc_init.c | 3 +++ 3 files changed, 6 insertions(+) commit 1351e69fc6db30e186295f1c9495d03cef6a01a2 Author: James Smart Date: Thu Feb 22 08:18:43 2018 -0800 scsi: lpfc: Add push-to-adapter support to sli4 New if_type=6 adapters support an additional BAR that provides apertures to allow direct WQE to adapter push support - termed Direct Packet Push (DPP). WQ creation differs slightly to ask for a WQ to be DPP-ized. When submitting a WQE to a DPP WQ, it is submitted to the host memory for the WQ normally, but is also written by the host cpu directly to a BAR aperture. Write buffer coalescing in hardware is (hopefully) turned on, enabling single pci write operation support. The doorbell is thing rung to indicate the WQE is available and was pushed to the aperture. This patch: - Updates the WQ Create commands for the DPP options - Adds the bar mapping for if_type=6 DPP bar - Adds the WQE pushing to the DDP aperture received from WQ create - Adds a new module parameter to disable DPP operation if desired. Default is enabled. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 3 +- drivers/scsi/lpfc/lpfc_attr.c | 10 ++ drivers/scsi/lpfc/lpfc_hw4.h | 31 ++++++ drivers/scsi/lpfc/lpfc_init.c | 18 ++++ drivers/scsi/lpfc/lpfc_sli.c | 229 +++++++++++++++++++++++++++--------------- drivers/scsi/lpfc/lpfc_sli4.h | 16 ++- 6 files changed, 220 insertions(+), 87 deletions(-) commit 27d6ac0a6e830043bd5db89fee8adddb41ada2f7 Author: James Smart Date: Thu Feb 22 08:18:42 2018 -0800 scsi: lpfc: Add SLI-4 if_type=6 support to the code base New hardware supports a SLI-4 interface, but with a new if_type variant of 6. If_type=6 has a different PCI BAR map, separate EQ/CQ doorbells, and some changes in doorbell formats. Add the changes for the if_type into headers, adapter initialization and control flows. Add new eq and cq handlers. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_bsg.c | 4 +- drivers/scsi/lpfc/lpfc_hw4.h | 54 ++++++++++++++++++- drivers/scsi/lpfc/lpfc_init.c | 120 +++++++++++++++++++++++++++++++++++------- drivers/scsi/lpfc/lpfc_sli.c | 120 ++++++++++++++++++++++++++++++++++++++++-- drivers/scsi/lpfc/lpfc_sli4.h | 3 ++ 5 files changed, 275 insertions(+), 26 deletions(-) commit 9dd35425a50c667ae2b6c2cda201425ed2d3fd25 Author: James Smart Date: Thu Feb 22 08:18:41 2018 -0800 scsi: lpfc: Rework sli4 doorbell infrastructure Up until now, all SLI-4 devices had the same doorbells at the same bar locations. With newer hardware, there are now independent EQ and CQ doorbells and the bar locations differ. Prepare the code for new hardware by separating the eq/cq doorbell into separate components. The components can be set based on if_type. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_debugfs.c | 20 ++++++++++++++------ drivers/scsi/lpfc/lpfc_debugfs.h | 11 ++++++----- drivers/scsi/lpfc/lpfc_init.c | 9 ++++++--- drivers/scsi/lpfc/lpfc_sli.c | 8 ++++---- drivers/scsi/lpfc/lpfc_sli4.h | 3 ++- 5 files changed, 32 insertions(+), 19 deletions(-) commit b71413dd01bbf302236cfb61df44702ea838dd75 Author: James Smart Date: Thu Feb 22 08:18:40 2018 -0800 scsi: lpfc: Rework lpfc to allow different sli4 cq and eq handlers Up until now, an SLI-4 device had no variance in the way it handled its EQs and CQs. With newer hardware, there are now differences in doorbells and some differences in how entries are valid. Prepare the code for new hardware by creating a sli4-based callout table that can be set based on if_type. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 7 +++++ drivers/scsi/lpfc/lpfc_sli.c | 63 ++++++++++++++++++++++--------------------- drivers/scsi/lpfc/lpfc_sli4.h | 5 ++++ 3 files changed, 44 insertions(+), 31 deletions(-) commit 501017f6d4e1feaa9ce3ff49c1190bc0588b3f02 Author: Souptick Joarder Date: Thu Feb 15 01:40:38 2018 +0530 scsi: qla2xxx: Use dma_pool_zalloc() Use dma_pool_zalloc() instead of dma_pool_alloc + memset Signed-off-by: Souptick Joarder Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_bsg.c | 3 +-- drivers/scsi/qla2xxx/qla_iocb.c | 10 ++-------- drivers/scsi/qla2xxx/qla_target.c | 7 +------ 3 files changed, 4 insertions(+), 16 deletions(-) commit 727edc744098e2a3d2f9f9ce53edb49cb7817ea1 Merge: e53a207 2b91e3c Author: Dave Airlie Date: Fri Feb 23 11:12:52 2018 +1000 Merge tag 'drm-misc-next-2018-02-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 4.17: Cross-subsystem Changes: - Backlight helpers to enable/disable and find devices in dt (Meghana) Core Changes: - Documentation improvements (Chris/Daniel/Jani) - simple_kms_helper: Add mode_valid() support (Linus) - mm: Fix bug in interval_tree causing nodes to be out-of-order (Chris) Driver Changes: - tinydrm/panel: Use the new backlight helpers (Meghana) - rockchip: Support gem_prime_import_sg_table + some fixes (Various) - sun4i: Add A83T HDMI support using dw-hdmi (Jernej) Cc: Meghana Madhyastha Cc: Jani Nikula Cc: Daniel Vetter Cc: Chris Wilson Cc: Linus Walleij Cc: Heiko Stuebner Cc: Jernej Skrabec * tag 'drm-misc-next-2018-02-21' of git://anongit.freedesktop.org/drm/drm-misc: (41 commits) drm/omapdrm: Use of_find_backlight helper drm/panel: Use of_find_backlight helper drm/omapdrm: Use backlight_enable/disable helpers drm/panel: Use backlight_enable/disable helpers drm/tinydrm: Call devres version of of_find_backlight drm/tinydrm: Replace tinydrm_of_find_backlight with of_find_backlight drm/tinydrm: Convert tinydrm_enable/disable_backlight to backlight_enable/disable drm: add documentation for tv connector state margins drm/doc: Use new substruct support drm/doc: Polish for drm_mode_parse_command_line_for_connector drm/docs: Document "scaling mode" property better drm/docs: Align layout of optional plane blending properties drm/docs: Discourage adding more to kms-properties.csv drm: simple_kms_helper: Add mode_valid() callback support drm/todo: Add idr_init_base todo drm: Use idr_init_base(1) when using id==0 for invalid drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem dma-buf/sw_sync: Fix kerneldoc warnings drm: Fix kerneldoc warnings for drm_lease ... commit 4ef76ad0462cf25ce948541c8724eaa8a8365e1d Author: Feng Kan Date: Tue Feb 20 19:19:27 2018 -0800 PCI: Add ACS quirk for Ampere root ports The Ampere Computing PCIe root port does not support ACS at this point. However, the hardware provides isolation and source validation through the SMMU. The stream ID generated by the PCIe ports contain both the bus/device/function number as well as the port ID in its 3 most significant bits. Turn on ACS but disable all the peer-to-peer features. APM is being rebranded to Ampere. The Vendor and Device IDs change, but the functionality stays the same. Signed-off-by: Feng Kan Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 9 +++++++++ include/linux/pci_ids.h | 1 + 2 files changed, 10 insertions(+) commit c37e627f9565368ed7bd1f3cf59a2d223ddba85a Author: Frederick Lawler Date: Tue Feb 13 21:52:18 2018 -0600 PCI/portdrv: Move pcieport_if.h to drivers/pci/pcie/ Move pcieport_if.h from include/linux to drivers/pci/pcie/pcieport_if.h because the interfaces there are only used by the PCI core. Replace all uses of #include with relative paths to the new file location, e.g., #include "../pcieport_if.h" Signed-off-by: Frederick Lawler Signed-off-by: Bjorn Helgaas drivers/pci/hotplug/pciehp.h | 3 +- drivers/pci/pcie/aer/aerdrv.c | 1 - drivers/pci/pcie/aer/aerdrv.h | 3 +- drivers/pci/pcie/pcie-dpc.c | 3 +- drivers/pci/pcie/pcieport_if.h | 71 +++++++++++++++++++++++++++++++++++++++++ drivers/pci/pcie/pme.c | 2 +- drivers/pci/pcie/portdrv_acpi.c | 2 +- drivers/pci/pcie/portdrv_bus.c | 2 +- drivers/pci/pcie/portdrv_core.c | 2 +- drivers/pci/pcie/portdrv_pci.c | 2 +- include/linux/pcieport_if.h | 71 ----------------------------------------- 11 files changed, 82 insertions(+), 80 deletions(-) commit fd9b503dec9b533afa49ac105ce65f87419b5528 Author: Linus Walleij Date: Sun Feb 11 11:38:40 2018 +0100 drm/panel: Fix ARM Versatile panel clocks These clocks are in kHz not in Hz, oops. Fix it so my new bandwidth calculations patch starts working with these panels. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180211103840.18764-1-linus.walleij@linaro.org drivers/gpu/drm/panel/panel-arm-versatile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3ecac020d6dd09259414f423b577347ebee9f533 Author: Michael Ellerman Date: Thu Feb 8 23:20:35 2018 +1100 PCI/AER: Move pci_uevent_ers() out of pci.h There's no reason pci_uevent_ers() needs to be inline in pci.h, so move it out to a C file. Given it's used by AER the obvious location would be somewhere in drivers/pci/pcie/aer, but because it's also used by powerpc EEH code unfortunately that doesn't work in the case where EEH is enabled but PCIEPORTBUS is not. So for now put it in pci-driver.c, next to pci_uevent(), with an appropriate #ifdef so it's not built if AER and EEH are both disabled. While we're moving it also fix up the kernel doc comment for @pdev to be accurate. Reported-by: Linus Torvalds Signed-off-by: Michael Ellerman Signed-off-by: Bjorn Helgaas Reviewed-by: Bryant G. Ly drivers/pci/pci-driver.c | 36 ++++++++++++++++++++++++++++++++++++ include/linux/pci.h | 38 +++----------------------------------- 2 files changed, 39 insertions(+), 35 deletions(-) commit 66444f460e68d641a63f0787627bac6c1ee340b5 Author: rajmohan.mani@intel.com Date: Tue Feb 20 15:54:09 2018 -0800 ACPI / PMIC: Replace license boilerplate with SPDX license identifier Remove the GPL v2 license boilerplate and update with the SPDX license identifier. Signed-off-by: Rajmohan Mani Signed-off-by: Rafael J. Wysocki drivers/acpi/pmic/tps68470_pmic.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit d060b40523dcd91428c7fb2aaa307de37887484a Author: Tony Lindgren Date: Thu Feb 22 13:57:30 2018 -0800 ARM: OMAP2+: Prepare to pass auxdata for smartreflex We are still initializing smartreflex with platform data using omap_device_build(). We can instead pass the platform data in with auxdata in pdata-quirks.c and make the driver use that in later patches. Note that we cannot enable the auxdata use yet, this is done in the last patch of the series. Signed-off-by: Tony Lindgren arch/arm/mach-omap2/pdata-quirks.c | 13 +++++++++++++ arch/arm/mach-omap2/sr_device.c | 2 ++ include/linux/power/smartreflex.h | 10 +++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) commit d29abc836843b8c9537b4d778eb2d429a804a5ed Author: George Cherian Date: Tue Feb 20 11:16:03 2018 +0000 ACPI / CPPC: Update all pr_(debug/err) messages to log the susbspace id CPPC dirver is aware of multiple PCC subspace IDs. Enhance the debug and error messages in the driver to print the subspace id. In case of error it will be helpful to find which particular subspace is failing. Signed-off-by: George Cherian Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit dbdd0f58fd2cdde5cf945c9da67a2d52d32ba550 Author: Rafael J. Wysocki Date: Wed Feb 21 13:24:16 2018 +0100 PCMCIA / PM: Avoid noirq suspend aborts during suspend-to-idle There is a problem with PCMCIA system resume callbacks with respect to suspend-to-idle in which the ->suspend_noirq() callback may be invoked after the ->resume_noirq() one without resuming the system entirely in some cases. This doesn't work for PCMCIA because of the lack of symmetry between its system suspend and system resume "noirq" callbacks. The system resume handling in PCMCIA is split between socket_early_resume() and socket_late_resume() which are called in different phases of system resume and both need to run for socket_suspend() (invoked by the system suspend "noirq" callback) to work. Specifically, socket_suspend() returns an error when called after socket_early_resume() without socket_late_resume(), so if the suspend-to-idle core detects a spurious wakeup event and attempts to put the system back to sleep, that is aborted by the error coming from socket_suspend(). Avoid that by using a new socket state flag, SOCKET_IN_RESUME, to indicate that socket_early_resume() has already run for the socket in which case socket_suspend() will do minimum handling and return 0. This change has been tested on my venerable Toshiba Portege R500 (which is where the problem has been discovered in the first place), but admittedly I have no PCMCIA cards to test along with the socket itself. Fixes: 33e4f80ee69b (ACPI / PM: Ignore spurious SCI wakeups from suspend-to-idle) Signed-off-by: Rafael J. Wysocki [linux@dominikbrodowski.net: follow same codepaths for both suspend variants; call ->suspend()] Signed-off-by: Dominik Brodowski drivers/pcmcia/cs.c | 10 +++++++--- drivers/pcmcia/cs_internal.h | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) commit 24bada7991d9f1d412f9bfca36716e8457cb4f90 Author: Dan Williams Date: Fri Dec 8 08:29:25 2017 -0800 ACPI: add NFIT and HMAT to the initrd override list These tables, NFIT and HMAT, are essential for describing next-generation platform memory topologies and performance characteristics. Allow them to be overridden for debug and test and purposes. Signed-off-by: Dan Williams Reviewed-by: Ross Zwisler Signed-off-by: Rafael J. Wysocki drivers/acpi/tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04148187aa9df3626168f7429d2287997787e387 Author: Arnd Bergmann Date: Thu Feb 22 16:52:58 2018 +0100 debugobjects: Fix debug_objects_freed accounting The removal of the batched object freeing has caused the debug_objects_freed to become read-only, and the reading is inside an ifdef, so gcc warns that it is completely unused without CONFIG_DEBUG_FS: lib/debugobjects.c:71:14: error: 'debug_objects_freed' defined but not used [-Werror=unused-variable] Assuming we are still interested in this number, this adds back code to keep track of the freed objects. Fixes: 636e1970fd7d ("debugobjects: Use global free list in free_object()") Suggested-by: Waiman Long Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Acked-by: Yang Shi Acked-by: Waiman Long Link: https://lkml.kernel.org/r/20180222155335.1647466-1-arnd@arndb.de lib/debugobjects.c | 1 + 1 file changed, 1 insertion(+) commit 46182452cf5abe95782e100f0719b7497641d263 Author: Arnd Bergmann Date: Thu Feb 22 12:44:40 2018 +0100 dsa: ptp: mark dummy helpers as 'inline' Declaring a static function in a header leads to a warning every time that header gets included without the function being used: In file included from drivers/net/dsa/mv88e6xxx/chip.c:42: drivers/net/dsa/mv88e6xxx/ptp.h:92:13: error: 'mv88e6xxx_hwtstamp_work' defined but not used [-Werror=unused-function] static long mv88e6xxx_hwtstamp_work(struct ptp_clock_info *ptp) In file included from drivers/net/dsa/mv88e6xxx/chip.c:38: drivers/net/dsa/mv88e6xxx/global2.h:355:12: error: 'mv88e6xxx_g2_wait' defined but not used [-Werror=unused-function] static int mv88e6xxx_g2_wait(struct mv88e6xxx_chip *chip, int reg, u16 mask) ^~~~~~~~~~~~~~~~~ drivers/net/dsa/mv88e6xxx/global2.h:350:12: error: 'mv88e6xxx_g2_update' defined but not used [-Werror=unused-function] static int mv88e6xxx_g2_update(struct mv88e6xxx_chip *chip, int reg, u16 update) ^~~~~~~~~~~~~~~~~~~ drivers/net/dsa/mv88e6xxx/global2.h:345:12: error: 'mv88e6xxx_g2_write' defined but not used [-Werror=unused-function] static int mv88e6xxx_g2_write(struct mv88e6xxx_chip *chip, int reg, u16 val) ^~~~~~~~~~~~~~~~~~ drivers/net/dsa/mv88e6xxx/global2.h:340:12: error: 'mv88e6xxx_g2_read' defined but not used [-Werror=unused-function] static int mv88e6xxx_g2_read(struct mv88e6xxx_chip *chip, int reg, u16 *val) This marks all such functions in dsa inline to make sure we don't warn about them. Fixes: c6fe0ad2c349 ("net: dsa: mv88e6xxx: add rx/tx timestamping support") Fixes: 0d632c3d6fe3 ("net: dsa: mv88e6xxx: add accessors for PTP/TAI registers") Signed-off-by: Arnd Bergmann Reviewed-by: Andrew Lunn Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.h | 8 ++++---- drivers/net/dsa/mv88e6xxx/ptp.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 4a9be940551ab664918ac089b92c47d74e6cb8e7 Author: Linus Walleij Date: Thu Feb 22 08:45:21 2018 +0100 power: gemini-poweroff: Avoid spurious poweroff On the D-Link DIR-685 we get spurious poweroff from infrared. Since that block (CIR) doesn't even have a driver this can be safely ignored, we can revisit this code once we have a device supporting CIR. On the D-Link DNS-313 we get spurious poweroff from the power button. This appears to be an initialization issue: we need to enable the block (start the state machine) before we clear any dangling IRQ. This patch fixes both issues. Fixes: f7a388d6cd1c ("power: reset: Add a driver for the Gemini poweroff") Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel drivers/power/reset/gemini-poweroff.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit dde5953f05a89eb63a0d666ffe51d447b2ac3e05 Author: Ladislav Michl Date: Thu Feb 22 18:21:36 2018 +0100 power: supply: ltc2941-battery-gauge: Fix temperature units Temperature is measured in tenths of degree Celsius. Fixes: 085bc24d1553 ("Add LTC2941/LTC2943 Battery Gauge Driver") Signed-off-by: Ladislav Michl Signed-off-by: Sebastian Reichel drivers/power/supply/ltc2941-battery-gauge.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8e88262b03da94e9e4cbb991acbbaa7c8b3dc156 Merge: 60772e4 70271da Author: David S. Miller Date: Thu Feb 22 15:22:51 2018 -0500 Merge branch 'nfp-build-and-FW-initramfs-updates' Jakub Kicinski says: ==================== nfp: build and FW initramfs updates This set brings empty makefiles to allow building single object files (useful for build-testing), Kbuild does not cater to this use case too well. There are two ethernet drivers right now which suffer from this (nfp, aquantia), both are fixed. Dirk adds an uncommon FW image name to the list of firmware files module may request. ==================== Signed-off-by: David S. Miller commit 70271dadee110adea33d1f32e7793b17c54bc7c4 Author: Dirk van der Merwe Date: Wed Feb 21 19:50:07 2018 -0800 nfp: advertise firmware for mixed 10G/25G mode The AMDA0099-0001 platform can support the 1x10G + 1x25G mixed mode operation. Recently, firmware has been added for this configuration mode. Signed-off-by: Dirk van der Merwe Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 1 + 1 file changed, 1 insertion(+) commit 420b93589977ac16018ae5bc0041c0d080f588e8 Author: Jakub Kicinski Date: Wed Feb 21 19:50:06 2018 -0800 aquantia: add Makefiles to all directories To be able to build separate objects we need to provide Kbuild with a Makefile in each directory. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/hw_atl/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit f7308991bfeea3f6a4c6281c64fc1ba9dc6e56b3 Author: Jakub Kicinski Date: Wed Feb 21 19:50:05 2018 -0800 nfp: add Makefiles to all directories To be able to build separate objects we need to provide Kbuild with a Makefile in each directory. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/Makefile | 2 ++ drivers/net/ethernet/netronome/nfp/flower/Makefile | 2 ++ drivers/net/ethernet/netronome/nfp/nfpcore/Makefile | 2 ++ drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000/Makefile | 2 ++ drivers/net/ethernet/netronome/nfp/nic/Makefile | 2 ++ 5 files changed, 10 insertions(+) commit 60772e48ec417c5455ff04454b94fd68466f2c73 Merge: 82e3be3 94ba927 Author: David S. Miller Date: Thu Feb 22 15:18:28 2018 -0500 Merge tag 'mac80211-next-for-davem-2018-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Various updates across wireless. One thing to note: I've included a new ethertype that wireless uses (ETH_P_PREAUTH) in if_ether.h. ==================== Signed-off-by: David S. Miller commit 725ddd070f4b5953d2897c31c57493c157f1a338 Author: Tuomas Tynkkynen Date: Wed Feb 7 02:53:09 2018 +0200 ARM: multi_v7_defconfig: Enable serial console on RPi 3 The Raspberry Pi 3 uses the 8250-based auxilary UART of the BCM2837 SoC as the primary serial console of the board, so enable it in the multiplatform defconfig. Signed-off-by: Tuomas Tynkkynen Reviewed-by: Eric Anholt Signed-off-by: Eric Anholt arch/arm/configs/multi_v7_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 94ba92713f8329c96e0a8e2880b3c1a785d1c95c Author: Ilan Peer Date: Mon Feb 19 14:48:41 2018 +0200 mac80211: Call mgd_prep_tx before transmitting deauthentication In multi channel scenarios, when disassociating from the AP before a beacon was heard from the AP, it is not guaranteed that the virtual interface is granted air time for the transmission of the deauthentication frame. This in turn can lead to various issues as the AP might never get the deauthentication frame. To mitigate such possible issues, add a HW flag indicating that the driver requires mac80211 to call the mgd_prep_tx() driver callback to make sure that the virtual interface is granted immediate airtime to be able to transmit the frame, in case that no beacon was heard from the AP. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/mac80211.h | 13 +++++++++++++ net/mac80211/debugfs.c | 1 + net/mac80211/mlme.c | 16 +++++++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) commit a1f2ba04cc92414b6b933289365eab878b0b2bf4 Author: Sara Sharon Date: Mon Feb 19 14:48:40 2018 +0200 mac80211: add get TID helper Extracting the TID from the QOS header is common enough to justify helper. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/linux/ieee80211.h | 12 ++++++++++++ net/mac80211/iface.c | 3 +-- net/mac80211/michael.c | 2 +- net/mac80211/mlme.c | 2 +- net/mac80211/rc80211_minstrel_ht.c | 2 +- net/mac80211/rx.c | 6 ++---- net/mac80211/tx.c | 9 ++------- net/mac80211/wpa.c | 8 +++----- 8 files changed, 23 insertions(+), 21 deletions(-) commit 7299d6f7bfd1921c0cfb5e202155f1a5cfdb57d0 Author: Johannes Berg Date: Mon Feb 19 14:48:39 2018 +0200 mac80211: support reporting A-MPDU EOF bit value/known Support getting the EOF bit value reported from hardware and writing it out to radiotap. Signed-off-by: Johannes Berg include/net/ieee80211_radiotap.h | 2 ++ include/net/mac80211.h | 5 +++++ net/mac80211/rx.c | 4 ++++ 3 files changed, 11 insertions(+) commit 4fe0de5b143762d327bfaf1d7be7c5b58041a18c Author: Denis Kenzior Date: Wed Jan 31 19:04:15 2018 -0600 uapi: Add 802.11 Preauthentication to if_ether This adds 0x88c7 protocol type to if_ether. Signed-off-by: Denis Kenzior Signed-off-by: Johannes Berg include/uapi/linux/if_ether.h | 1 + 1 file changed, 1 insertion(+) commit 82e3be320d1e38a5e91a79d0eb451954c87ab7fe Author: Nathan Fontenot Date: Wed Feb 21 21:33:56 2018 -0600 ibmvnic: Split counters for scrq/pools/napi The approach of one counter to rule them all when tracking the number of active sub-crqs, pools, and napi has problems handling some failover scenarios. This is due to the split in initializing the sub crqs, pools and napi in different places and the placement of updating the active counts. This patch simplifies this by having a counter for tx and rx sub-crqs, pools, and napi. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 38 +++++++++++++++++--------------------- drivers/net/ethernet/ibm/ibmvnic.h | 7 +++++-- 2 files changed, 22 insertions(+), 23 deletions(-) commit 72e89f50084c6dbc58a00aeedf92c450dc1a8b1c Author: Richard Haines Date: Tue Feb 13 20:53:21 2018 +0000 security: Add support for SCTP security hooks The SCTP security hooks are explained in: Documentation/security/LSM-sctp.rst Signed-off-by: Richard Haines Signed-off-by: Paul Moore Documentation/security/LSM-sctp.rst | 175 ++++++++++++++++++++++++++++++++++++ include/linux/lsm_hooks.h | 36 ++++++++ include/linux/security.h | 25 ++++++ security/security.c | 22 +++++ 4 files changed, 258 insertions(+) commit 2510babcfaf04d50d69946df31f0e9690c518144 Author: Andrew Lunn Date: Thu Feb 22 01:51:49 2018 +0100 net: dsa: mv88e6xxx: scratch registers and external MDIO pins MV88E6352 and later switches support GPIO control through the "Scratch & Misc" global2 register. Two of the pins controlled this way on the mv88e6390 family are the external MDIO pins. They can either by used as part of the MII interface for port 0, GPIOs, or MDIO. Add a function to configure them for MDIO, if possible, and call it when registering the external MDIO bus. Suggested-by: Russell King Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 9 +++++ drivers/net/dsa/mv88e6xxx/global2.h | 14 ++++++++ drivers/net/dsa/mv88e6xxx/global2_scratch.c | 51 +++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) commit aa9029479ef3fb88145cad3220e24a110c6ae723 Author: Thomas Falcon Date: Wed Feb 21 18:21:10 2018 -0600 ibmvnic: Fix TX descriptor tracking With the recent change, transmissions that only needed one descriptor were being missed. The result is that such packets were tracked as outstanding transmissions but never removed when its completion notification was received. Fixes: ffc385b95adb ("ibmvnic: Keep track of supplementary TX descriptors") Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4af1db48b20bb49152e19f1b6ed42e3275d8075 Merge: 0ea5f58 388ca8b Author: David S. Miller Date: Thu Feb 22 14:38:38 2018 -0500 Merge tag 'mlx5-updates-2018-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== mlx5-updates-2018-02-21 This series includes shared code updates for mlx5 core driver for both netdev and rdma subsystems. By Saeed, First six patches of the series are meant to address a performance issue and should provide a performance boost for multi core IRQ interrupt hungry workloads. The issue is fixed in the first patch, all other patches are meant to refactor the code in light of this fix. The problem it comes to fix, is a shared spinlock accessed across all HCA IRQs which protects the CQ database. To solve this we simply move the CQ database and its spinlock to be per EQ (IRQ), thus per core. By Yonatan, Fragmented completion queue (CQ) for RDMA, core driver implementation to create fragmented CQ buffers rather than one large contiguous memory buffer, the implementation scheme already exist and used by the netdev CQs, the patch shares that code with the rdma CQ creation flow and makes use of the new API in mlx5_ib driver. ==================== Signed-off-by: David S. Miller commit 4d5b2eaf3ca80c56a59f230208c4ff11e3f68d55 Author: Baruch Siach Date: Tue Feb 20 14:19:35 2018 +0200 ARM: dts: bcm2837-rpi-3-b: add GPIO expander Add a description of the RPi3 GPIO expander that the VC4 firmware controls. Acked-by: Stefan Wahren Signed-off-by: Baruch Siach Reviewed-by: Linus Walleij Reviewed-by: Eric Anholt Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit b0c07c5af6d286f3d3b907743998e9d41f6ab042 Author: Baruch Siach Date: Tue Feb 20 14:19:34 2018 +0200 ARM: dts: bcm2835: make the firmware node into a bus This allows adding devices for which the firmware exposes control interface via the mailbox. An example of such device is the GPIO expander. Signed-off-by: Baruch Siach Reviewed-by: Linus Walleij Reviewed-by: Eric Anholt Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm2835-rpi.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 79c81facdc0b43b1cef37b8d5689a8c8b78f8be0 Author: Stefan Wahren Date: Fri Feb 16 11:55:34 2018 +0100 ARM: dts: bcm283x: Fix probing of bcm2835-i2s Since 517e7a1537a ("ASoC: bcm2835: move to use the clock framework") the bcm2835-i2s requires a clock as DT property. Unfortunately the necessary DT change has never been applied. While we are at it also fix the first PCM register range to cover the PCM_GRAY register. Fixes: 517e7a1537a ("ASoC: bcm2835: move to use the clock framework") Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Tested-by: Matthias Reichl Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm283x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7eab96f386549efcbdf25a5258576fa924242aac Author: Stefan Wahren Date: Fri Feb 16 11:55:33 2018 +0100 dt-bindings: bcm283x: Fix register ranges of bcm2835-i2s Since 517e7a1537a ("ASoC: bcm2835: move to use the clock framework") the bcm2835-i2s requires a clock as DT property. Unfortunately the necessary DT change has never been applied. While we are at it also fix the first PCM register range to cover the PCM_GRAY register. This patch only fixes the affected dt-bindings. Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Reviewed-by: Rob Herring Signed-off-by: Eric Anholt Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) commit 1a012cb2569f2031b3636232c3ab21c20c92d281 Author: Henry Zhang Date: Wed Jan 17 18:41:33 2018 -0800 ARM: dts: bcm283x: Fix pin function of JTAG pins BCM2835 ARM Peripherals doc shows gpio pins 4, 5, 6, 12 and 13 carry altenate function, ALT5 for ARM JTAG Fixes: 21ff843931b2 ("ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.") Signed-off-by: Henry Zhang Acked-by: Stefan Wahren Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm283x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 304ec482f562885b178b370cd50340447585d1c0 Author: Al Viro Date: Thu Feb 22 14:28:50 2018 -0500 get rid of pointless includes of fs_struct.h Signed-off-by: Al Viro arch/arc/kernel/troubleshoot.c | 1 - drivers/staging/lustre/lnet/libcfs/linux/linux-curproc.c | 1 - drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c | 1 - fs/ceph/dir.c | 1 - fs/nfs/nfs4xdr.c | 1 - fs/orangefs/acl.c | 1 - kernel/exec_domain.c | 1 - security/loadpin/loadpin.c | 1 - 8 files changed, 8 deletions(-) commit ac30751df953c298ee86e4f97a61347544833de8 Author: Keerthy Date: Thu Feb 15 11:31:51 2018 +0530 ARM: OMAP: pdata-quirks: Remove unused timer pdata Remove unused timer pdata. Signed-off-by: Keerthy Reviewed-by: Sebastian Reichel Tested-by: Ladislav Michl Signed-off-by: Tony Lindgren arch/arm/mach-omap2/pdata-quirks.c | 32 -------------------------------- 1 file changed, 32 deletions(-) commit b7290cf6ff7869ec12070aa146c370728cab62c2 Author: Keerthy Date: Thu Feb 15 11:31:50 2018 +0530 pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops Adapt driver to utilize dmtimer pdata ops instead of pdata-quirks. Signed-off-by: Keerthy Acked-by: Neil Armstrong Reviewed-by: Claudiu Beznea Signed-off-by: Tony Lindgren drivers/pwm/pwm-omap-dmtimer.c | 68 ++++++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 26 deletions(-) commit 1a3acad26613fff7c7590ab32ff21f8c2a10fba9 Author: Ladislav Michl Date: Thu Feb 15 11:31:49 2018 +0530 clocksource: timer-ti-dm: Hook device platform data if not already assigned In the case of device tree boot the device platform data is usually NULL so hook the platform data obtained from the match. As part of un-constify the platform_data pointer. Signed-off-by: Ladislav Michl Signed-off-by: Keerthy Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren drivers/clocksource/timer-ti-dm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 76234f7c074ca18c0bfe0b5a608973f9b43c7ebd Author: Keerthy Date: Thu Feb 15 11:31:48 2018 +0530 clocksource: timer-ti-dm: Populate the timer ops to the pdata Add the timer ops to the platform data Signed-off-by: Keerthy Reviewed-by: Sebastian Reichel Tested-by: Ladislav Michl Signed-off-by: Tony Lindgren drivers/clocksource/timer-ti-dm.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit a7f249e33a44432de30d50f3c57868bc00a8f362 Author: Keerthy Date: Thu Feb 15 11:31:47 2018 +0530 clocksource: timer-ti-dm: Add timer ops to the platform data structure Add timer ops to the platform data structure Signed-off-by: Keerthy Reviewed-by: Sebastian Reichel Tested-by: Ladislav Michl Signed-off-by: Tony Lindgren include/linux/platform_data/dmtimer-omap.h | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit af04aa856e932876e11e0c6d21d82281824e1b11 Author: Keerthy Date: Thu Feb 15 11:31:46 2018 +0530 ARM: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource Move the dmtimer driver out of plat-omap to clocksource. So that non-omap devices also could use this. No Code changes done to the driver file only renamed to timer-ti-dm.c. Also removed the config dependencies for OMAP_DM_TIMER. Signed-off-by: Keerthy Reviewed-by: Sebastian Reichel Tested-by: Ladislav Michl [tony@atomide.com: add select omap_dm_timer for omap16xx] Signed-off-by: Tony Lindgren arch/arm/mach-omap1/Kconfig | 1 + arch/arm/plat-omap/Kconfig | 6 - arch/arm/plat-omap/Makefile | 1 - arch/arm/plat-omap/dmtimer.c | 973 -------------------------------------- drivers/clocksource/Kconfig | 3 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-ti-dm.c | 973 ++++++++++++++++++++++++++++++++++++++ 7 files changed, 978 insertions(+), 980 deletions(-) commit f7bda9eec007ee3a200a31bfa6825e2612840f34 Author: Keerthy Date: Thu Feb 15 11:31:45 2018 +0530 clocksource: timer-ti-dm: Replace architecture Replace architecture specific guard with clocksource guard. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren include/clocksource/timer-ti-dm.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 5ca467c40c2e557af5675b6a6cf0e7d326349751 Author: Keerthy Date: Thu Feb 15 11:31:44 2018 +0530 ARM: OMAP: Move dmtimer.h out of plat-omap The header file is currently under plat-omap directory under arch/omap. Move this out to an accessible place. No Code changes done to the header file and renamed to timer-ti-dm.h. Signed-off-by: Keerthy Reviewed-by: Sebastian Reichel Tested-by: Ladislav Michl Signed-off-by: Tony Lindgren arch/arm/mach-omap1/pm.c | 2 +- arch/arm/mach-omap1/timer.c | 2 +- arch/arm/mach-omap2/pdata-quirks.c | 2 +- arch/arm/mach-omap2/timer.c | 2 +- arch/arm/plat-omap/dmtimer.c | 2 +- arch/arm/plat-omap/include/plat/dmtimer.h | 429 ------------------------------ include/clocksource/timer-ti-dm.h | 429 ++++++++++++++++++++++++++++++ 7 files changed, 434 insertions(+), 434 deletions(-) commit b65d12480c5eb80fe93b312fa1516edc1dad8677 Author: Keerthy Date: Thu Feb 15 11:31:43 2018 +0530 ARM: OMAP: timer: Wrap the inline functions under OMAP2PLUS define Wrap the inline functions under OMAP2PLUS/OMAP1 defines. This patch also inlines omap_dm_timer_get_fclk function for non OMAP1 Config. Signed-off-by: Keerthy Tested-by: Ladislav Michl Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/plat-omap/include/plat/dmtimer.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 6891227b40e5deca508192d44d5e15c6b3fa8b6d Author: Marek Szyprowski Date: Wed Feb 21 11:25:15 2018 +0100 ARM: dts: exynos: Cleanup power domain nodes in exynos3250.dtsi Device nodes in device tree should use generic names, so rename all existing power domains to "power-domain". To keep readable domain names in debug logs, use label property, which has been introduce by commit b13b2330aab5 ("soc: samsung: pm_domains: Read domain name from the new label property"); Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos3250.dtsi | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit fc6db34d2021f175f7a431b2b5a5de6f9cf160fe Author: Keerthy Date: Thu Feb 15 11:31:42 2018 +0530 ARM: OMAP: dmtimer: Remove all the exports Remove all the unwanted exports from the driver Signed-off-by: Keerthy Reviewed-by: Sebastian Reichel Tested-by: Ladislav Michl Signed-off-by: Tony Lindgren arch/arm/plat-omap/dmtimer.c | 27 --------------------------- 1 file changed, 27 deletions(-) commit 2fdc82776ac2ac49c5ee666d834718ac36420e49 Merge: 1ff4cb6 ba68878 Author: Tony Lindgren Date: Thu Feb 22 10:46:47 2018 -0800 Merge branch 'omap-for-v.16/dmtimer-fix' into omap-for-v4.17/timer commit 1e46eb3cbacde81ceb93f140f69834c9893235de Author: Simon Shields Date: Tue Feb 20 19:12:33 2018 +1100 ARM: dts: exynos: Add touchscreen node to Exynos4412 N710x This adds support for the MMS152 found on N710x boards. Signed-off-by: Simon Shields Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412-n710x.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 4395fb475a27ddcb33c27380e132ef5354ff67c6 Author: Mauro Carvalho Chehab Date: Thu Feb 22 12:54:28 2018 -0500 tda1997x: get rid of an unused var 1 warning regressions: + drivers/media/i2c/tda1997x.c: warning: variable 'last_irq_status' set but not used [-Wunused-but-set-variable]: => 1421:17 Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tda1997x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9ac0038db9a7e10fc8f425010ec98b7afc2ff621 Author: Tim Harvey Date: Thu Feb 15 12:55:34 2018 -0500 media: i2c: Add TDA1997x HDMI receiver driver Add support for the TDA1997x HDMI receivers. Signed-off-by: Tim Harvey Signed-off-by: Hans Verkuil [hans.verkuil@cisco.com: fix type 'testin' -> 'testing'] Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 9 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/tda1997x.c | 2820 +++++++++++++++++++++++++++++++++++++ drivers/media/i2c/tda1997x_regs.h | 641 +++++++++ include/media/i2c/tda1997x.h | 42 + 5 files changed, 3513 insertions(+) commit 10c1d542c7e871865bca381842fd04a92d2b95ec Author: Tim Harvey Date: Thu Feb 15 12:55:33 2018 -0500 media: dt-bindings: Add bindings for TDA1997X Define the device tree bindings for the TDA1997X. Acked-by: Rob Herring Acked-by: Sakari Ailus Signed-off-by: Tim Harvey Signed-off-by: Hans Verkuil [hans.verkuil@cisco.com: make a proper commit message] Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/tda1997x.txt | 178 +++++++++++++++++++++ include/dt-bindings/media/tda1997x.h | 74 +++++++++ 2 files changed, 252 insertions(+) commit 4cd9659ee9688760cb1d388a91396f9db83da905 Author: Tim Harvey Date: Thu Feb 15 12:55:32 2018 -0500 media: MAINTAINERS: add entry for NXP TDA1997x driver Add new MAINTAINERS entry. Signed-off-by: Tim Harvey Signed-off-by: Hans Verkuil [hans.verkuil@cisco.com: make a proper commit message] Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5271a98cd8baae39bb0415f8002aa1bd331f9aa3 Author: Tim Harvey Date: Thu Feb 15 12:55:31 2018 -0500 media: add digital video decoder entity functions Add a new media entity function definition for digital TV decoders: MEDIA_ENT_F_DTV_DECODER Signed-off-by: Tim Harvey Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/mediactl/media-types.rst | 11 +++++++++++ include/uapi/linux/media.h | 5 +++++ 2 files changed, 16 insertions(+) commit c4455c265edbe8822e88ea8c8b0d78b5aee494e2 Author: Tim Harvey Date: Thu Feb 15 12:55:30 2018 -0500 media: v4l-ioctl: fix clearing pad for VIDIOC_DV_TIMINGS_CAP The pad field was inadvertently cleared. Fix this. It's needed for subdevs. Signed-off-by: Tim Harvey Signed-off-by: Hans Verkuil [hans.verkuil@cisco.com: make a proper commit message] Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 357a856a6ceba0fac54623aef483ca99906c4747 Author: Hans Verkuil Date: Thu Feb 15 12:55:29 2018 -0500 media: v4l2-dv-timings: add v4l2_hdmi_colorimetry() Add the v4l2_hdmi_colorimetry() function so we have a single function that determines the colorspace, YCbCr encoding, quantization range and transfer function from the InfoFrame data. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-dv-timings.c | 141 ++++++++++++++++++++++++++++++ include/media/v4l2-dv-timings.h | 21 +++++ 2 files changed, 162 insertions(+) commit bd2a0f082b0cc7bab0104d83a15e36a5b29de54f Author: Hans Verkuil Date: Mon Jan 22 05:02:19 2018 -0500 media: vidioc-g-parm.rst: also allow _MPLANE buffer types The specification mentions that type can be V4L2_BUF_TYPE_VIDEO_CAPTURE, but the v4l2 core implementation also allows the _MPLANE variant. Document this. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-g-parm.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8180b4f4f589ee34d698d30ae6ad7042bf7ff1a0 Author: Hans Verkuil Date: Fri Jan 19 08:57:44 2018 -0500 media: v4l2-subdev.h: remove obsolete g/s_parm Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-subdev.h | 6 ------ 1 file changed, 6 deletions(-) commit 34c0dffad66c5bfa52ff5f39a505edc06941754b Author: Sakari Ailus Date: Sun Jan 21 16:49:47 2018 -0500 media: staging: atomisp: Drop g_parm and s_parm subdev ops use The s_parm and g_parm did nothing. Remove them. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../staging/media/atomisp/pci/atomisp2/atomisp_file.c | 16 ---------------- drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c | 14 -------------- 2 files changed, 30 deletions(-) commit b0840deade102ad4d5b1930f8ac319b9a7604e74 Author: Sakari Ailus Date: Sun Jan 21 16:48:45 2018 -0500 media: staging: atomisp: mt9m114: Drop empty s_parm callback The s_parm callback in mt9m114 driver did nothing, remove it. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 6 ------ 1 file changed, 6 deletions(-) commit f6c773b470f362bbd10940fd1b87e38390e9354e Author: Sakari Ailus Date: Sun Jan 21 16:47:29 2018 -0500 media: staging: atomisp: i2c: Drop g_parm support in sensor drivers These drivers already support g_frame_interval. Therefore just dropping g_parm is enough. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 27 ---------------------- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 27 ---------------------- drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 27 ---------------------- drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 27 ---------------------- .../media/atomisp/i2c/ov5693/atomisp-ov5693.c | 27 ---------------------- 5 files changed, 135 deletions(-) commit 718df0a814b6d71ad9b55ef0ffe6c0c13371a272 Author: Sakari Ailus Date: Mon Feb 19 08:27:19 2018 -0500 media: staging: atomisp: i2c: Disable non-preview configurations These sensor drivers have use case specific mode lists. This is currently not used nor there is a standard API for selecting the mode list. Disable configurations for non-preview modes until configuration selection is improved so that all the configurations are always usable. Signed-off-by: Sakari Ailus [hans.verkuil@cisco.com: clarify that this functionality it currently unused] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/gc2235.h | 6 ++++++ drivers/staging/media/atomisp/i2c/ov2722.h | 6 ++++++ drivers/staging/media/atomisp/i2c/ov5693/ov5693.h | 6 ++++++ 3 files changed, 18 insertions(+) commit f97b8e6baa10c5b891cb65491f457274f5788717 Author: Sakari Ailus Date: Sun Jan 21 16:43:42 2018 -0500 media: staging: atomisp: Kill subdev s_parm abuse Remove sensor driver's interface for setting the use case specific mode list as well as the mode lists that are related to other than CI_MODE_PREVIEW. This removes s_parm abuse in using driver specific values in v4l2_streamparm.capture.capturemode. The drivers already support [gs]_frame_interval so removing support for [gs]_parm is enough. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 26 --------- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 26 --------- drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 29 --------- drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 26 --------- drivers/staging/media/atomisp/i2c/gc0310.h | 43 -------------- drivers/staging/media/atomisp/i2c/gc2235.h | 1 - drivers/staging/media/atomisp/i2c/ov2680.h | 68 ---------------------- .../media/atomisp/i2c/ov5693/atomisp-ov5693.c | 27 --------- .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 9 +-- .../media/atomisp/pci/atomisp2/atomisp_subdev.c | 12 +--- 10 files changed, 3 insertions(+), 264 deletions(-) commit 4471109e3894f500079d21fea4bc4d58bbdc4045 Author: Hans Verkuil Date: Mon Jan 22 04:00:45 2018 -0500 media: convert g/s_parm to g/s_frame_interval in subdevs Convert all g/s_parm calls to g/s_frame_interval. This allows us to remove the g/s_parm ops since those are a duplicate of g/s_frame_interval. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9v011.c | 29 ++++++------------- drivers/media/i2c/ov6650.c | 33 ++++++++-------------- drivers/media/i2c/ov7670.c | 22 ++++++--------- drivers/media/i2c/ov7740.c | 29 ++++++------------- drivers/media/i2c/tvp514x.c | 37 ++++++++----------------- drivers/media/i2c/vs6624.c | 27 ++++++------------ drivers/media/platform/atmel/atmel-isc.c | 10 ++----- drivers/media/platform/atmel/atmel-isi.c | 12 ++------ drivers/media/platform/blackfin/bfin_capture.c | 14 +++------- drivers/media/platform/marvell-ccic/mcam-core.c | 12 ++++---- drivers/media/platform/soc_camera/soc_camera.c | 10 ++++--- drivers/media/platform/via-camera.c | 4 +-- drivers/media/usb/em28xx/em28xx-video.c | 36 ++++++++++++++++++++---- 13 files changed, 110 insertions(+), 165 deletions(-) commit 672de9a79cd34c864f5eca7de5264b2645212605 Author: Hans Verkuil Date: Mon Jan 22 03:58:36 2018 -0500 media: v4l2-common: create v4l2_g/s_parm_cap helpers Create helpers to handle VIDIOC_G/S_PARM by querying the g/s_frame_interval v4l2_subdev ops. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-common.c | 48 +++++++++++++++++++++++++++++++++++ include/media/v4l2-common.h | 26 +++++++++++++++++++ 2 files changed, 74 insertions(+) commit 7c8a940a5ea0b0861a566f02b67be75d8d86df36 Author: Hans Verkuil Date: Sat Feb 3 08:20:21 2018 -0500 media: v4l2-subdev: clear reserved fields Clear the reserved fields for these ioctls according to the specification: VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL VIDIOC_SUBDEV_ENUM_FRAME_SIZE VIDIOC_SUBDEV_ENUM_MBUS_CODE VIDIOC_SUBDEV_G_CROP, VIDIOC_SUBDEV_S_CROP VIDIOC_SUBDEV_G_FMT, VIDIOC_SUBDEV_S_FMT VIDIOC_SUBDEV_G_FRAME_INTERVAL, VIDIOC_SUBDEV_S_FRAME_INTERVAL VIDIOC_SUBDEV_G_SELECTION, VIDIOC_SUBDEV_S_SELECTION Found with v4l2-compliance. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-subdev.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 6c7d091008d0d095adb3f65d667a234d372f4472 Author: Oleksandr Andrushchenko Date: Mon Feb 12 10:52:54 2018 +0200 drm/pl111: Do not use deprecated drm_driver.{enable|disable)_vblank Do not use deprecated drm_driver.{enable|disable)_vblank callbacks, but use drm_simple_kms_helpe's pipe callbacks instead. Signed-off-by: Oleksandr Andrushchenko Cc: Eric Anholt Reviewed-by: Eric Anholt Tested-by: Eric Anholt Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1518425574-32671-5-git-send-email-andr2000@gmail.com drivers/gpu/drm/pl111/pl111_display.c | 15 ++++++++++++--- drivers/gpu/drm/pl111/pl111_drm.h | 2 -- drivers/gpu/drm/pl111/pl111_drv.c | 5 ----- 3 files changed, 12 insertions(+), 10 deletions(-) commit df91972fe32ee5054cef8851169c4dff83793cd3 Author: Oleksandr Andrushchenko Date: Mon Feb 12 10:52:53 2018 +0200 drm/tve200: Do not use deprecated drm_driver.{enable|disable)_vblank Do not use deprecated drm_driver.{enable|disable)_vblank callbacks, but use drm_simple_kms_helpe's pipe callbacks instead. Signed-off-by: Oleksandr Andrushchenko Cc: Linus Walleij Reviewed-by: Linus Walleij Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1518425574-32671-4-git-send-email-andr2000@gmail.com drivers/gpu/drm/tve200/tve200_display.c | 10 ++++++++-- drivers/gpu/drm/tve200/tve200_drm.h | 2 -- drivers/gpu/drm/tve200/tve200_drv.c | 3 --- 3 files changed, 8 insertions(+), 7 deletions(-) commit 989c48e6c2d1bfca604cf2d9e7e026e0a19d856c Author: Oleksandr Andrushchenko Date: Mon Feb 12 10:52:52 2018 +0200 drm/mxsfb: Do not use deprecated drm_driver.{enable|disable)_vblank Do not use deprecated drm_driver.{enable|disable)_vblank callbacks, but use drm_simple_kms_helpe's pipe callbacks instead. Signed-off-by: Oleksandr Andrushchenko Cc: Marek Vasut Reviewed-by: Marek Vasut Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1518425574-32671-3-git-send-email-andr2000@gmail.com drivers/gpu/drm/mxsfb/mxsfb_drv.c | 54 ++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 26 deletions(-) commit ac86cba96e2a439883d452772013049f54df2042 Author: Oleksandr Andrushchenko Date: Mon Feb 12 10:52:51 2018 +0200 drm/simple_kms_helper: Add {enable|disable}_vblank callback support If simple_kms_helper based driver needs to work with vblanks, then it has to provide drm_driver.{enable|disable}_vblank callbacks, because drm_simple_kms_helper.drm_crtc_funcs does not provide any. At the same time drm_driver.{enable|disable}_vblank callbacks are marked as deprecated and shouldn't be used by new drivers. Fix this by extending drm_simple_kms_helper.drm_crtc_funcs to provide the missing callbacks. Signed-off-by: Oleksandr Andrushchenko Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1518425574-32671-2-git-send-email-andr2000@gmail.com drivers/gpu/drm/drm_simple_kms_helper.c | 24 ++++++++++++++++++++++++ include/drm/drm_simple_kms_helper.h | 18 ++++++++++++++++++ 2 files changed, 42 insertions(+) commit 588717061002778158f7e4772b3dfc645612983d Author: Arnd Bergmann Date: Thu Feb 22 12:47:51 2018 +0100 drm: fix drm_get_max_iomem type mismatch When comparing two variables with min()/max(), they should be the same type: drivers/gpu/drm/drm_memory.c: In function 'drm_get_max_iomem': include/linux/kernel.h:821:16: error: comparison of distinct pointer types lacks a cast [-Werror] (void) (&max1 == &max2); This makes the local variable in drm_get_max_iomem make the type from resource->end. Fixes: 82626363a217 ("drm: add func to get max iomem address v2") Signed-off-by: Arnd Bergmann Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180222114804.1394300-1-arnd@arndb.de drivers/gpu/drm/drm_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4751cf733a1170876dd5ac46f225f5a25f59a67f Author: Oleksandr Andrushchenko Date: Thu Feb 22 08:09:19 2018 +0200 drm/simple_kms_helper: Fix NULL pointer dereference with no active CRTC It is possible that drm_simple_kms_plane_atomic_check called with no CRTC set, e.g. when user-space application sets CRTC_ID/FB_ID to 0 before doing any actual drawing. This leads to NULL pointer dereference because in this case new CRTC state is NULL and must be checked before accessing. Signed-off-by: Oleksandr Andrushchenko Reviewed-by: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1519279759-7803-1-git-send-email-andr2000@gmail.com drivers/gpu/drm/drm_simple_kms_helper.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 61b8b359d02e33aa8b378fdb974c2e2a8fb932dc Author: Ville Syrjälä Date: Wed Feb 21 18:02:35 2018 +0200 drm/i915: Add a FIXME about FBC vs. fence. 90/270 degree rotation Currently the FBC code doesn't handle the 90/270 degree rotated case correctly. We would need the GTT tracking to monitor the fence on the normal GTT view (the rotated view doesn't even have a fence). Not quite sure how we should program the fence Y offset etc. in that case. For now we'll end up disabling FBC with 90/270 degree rotation. Add a FIXME to remind people about this fact. v2: Reword the text (Chris) Move the FIXME to the fbc code Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180221160235.11134-7-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_fbc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ef1a19146827b11d0c8024f9401774703bcb3a48 Author: Ville Syrjälä Date: Wed Feb 21 18:02:34 2018 +0200 drm/i915: Extract intel_plane_{pin,unpin}_fb() We've replicated the fb pin/unpin code in a few places. Pull it into convenint helpers. Slight change in locking behaviour as intel_cleanup_plane_fb() now grab struct_mutex unconditionally. v2: Change the locking to be symmetric between pin and unpin Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180221160235.11134-6-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 96 +++++++++++++++++------------------- 1 file changed, 45 insertions(+), 51 deletions(-) commit 32febd91951eb40d9e9437f10b967c87715d8ef5 Author: Ville Syrjälä Date: Wed Feb 21 18:02:33 2018 +0200 drm/i915: Require fence only for FBC capable planes As only a subset of primary planes are FBC capable there's no need to waste fences on all of them. So let's skip the fence if the plane isn't even fbc capable. In the future we might extend this to skip the fence even for FBC capable planes if the crtc and/or plane state isn't suitable for FBC. Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180221160235.11134-5-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf1805e65802cf77243e2cdcf1b265240f70eda2 Author: Ville Syrjälä Date: Wed Feb 21 19:31:01 2018 +0200 drm/i915: Clean up fbc vs. plane checks Let's record the information whether a plane can do fbc or not under struct inte_plane. v2: Rebase due to i9xx_plane_id Handle BDW/HSW correctly v3: Move inte_fbc_init() back since we depend on it happening even with i915.disable_display, and populate fbc->possible_framebuffer_bits directly from the plane init code instead v4: Add note about plane A being tied to pipe A on HSW+ Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180221173101.19385-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180221160235.11134-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 41 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_fbc.c | 26 ++--------------------- 3 files changed, 44 insertions(+), 24 deletions(-) commit f7a02ad7d16b24908b9fddbd6176b1c1a2b35058 Author: Ville Syrjälä Date: Wed Feb 21 20:48:07 2018 +0200 drm/i915: Only pin the fence for primary planes (and gen2/3) Currently we pin a fence on every plane doing tiled scanout. The number of planes we have available is fast apporaching the number of fences so we really should stop wasting them. Only FBC needs the fence on gen4+, so let's use fences only for the primary planes on those platforms. v2: drop the tiling check from plane_uses_fence() as the obj is NULL during initial_plane_config() and we don't rally need the check since i915_vma_pin_fence() does the check anyway Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180221184807.577-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 14 +++++++++++++- drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_fbdev.c | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) commit 85798ac9b35f8cc7608a4a798d0b0626f0d54d61 Author: Ville Syrjälä Date: Wed Feb 21 18:02:30 2018 +0200 drm/i915: Fail if we can't get a fence for gen2/3 tiled scanout Gen2/3 display engine depends on the fence for tiled scanout. So if we fail to get a fence fail the entire operation. Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180221160235.11134-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit db9c06dfff43b2a040ba2b4f2300c30e454dd930 Author: Johnson Lin Date: Tue Jan 30 21:21:29 2018 +0530 drm/i915: Fix Limited Range Color Handling Some panels support limited range output (16-235) compared to full range RGB values (0-255). Also userspace can control the RGB range using "Broadcast RGB" property. Currently the code to handle full range to limited range is broken. This patch fixes the same by properly scaling down all the full range co-efficients with limited range scaling factor. v2: Fixed Ville's review comments. v3: Changed input to const and used correct data types as suggested by Ville v4: Fixed some missing data type corrections. Signed-off-by: Johnson Lin Signed-off-by: Uma Shankar Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1517327489-26128-1-git-send-email-uma.shankar@intel.com drivers/gpu/drm/i915/intel_color.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 35152d1159dbb0277b18ae664dfb5b11c27fdefa Author: Maxime Ripard Date: Fri Feb 16 18:39:36 2018 +0100 drm/sun4i: backend: Remove ARGB spoofing We've had some code for quite some time to prevent the alpha bug from happening on the lowest primary plane. Since we now check for this in our atomic_check, we can simply remove it. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/965180afd8169ccaa848f061d16a2c1a9ec4d289.1518802627.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/sun4i/sun4i_backend.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit ded4f346ac168e45b9d25a08a069915699bce1df Author: Maxime Ripard Date: Fri Feb 16 18:39:34 2018 +0100 drm/sun4i: backend: Make zpos configurable Now that we have everything in place, we can make zpos configurable now. Change the zpos property from an immutable one to a regular. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/0ab187956855db86972d936e6751181649e0d035.1518802627.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/sun4i/sun4i_layer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 70d2850ee39d3be86b484cd1f15545e0038109ff Author: Maxime Ripard Date: Fri Feb 16 18:39:33 2018 +0100 drm/sun4i: Remove the plane description structure The plane description structure was mostly needed to differentiate the formats usable on the primary plane (because of its lowest position), and assign the pipes. Now that both are dynamically checked and assigned, we can remove the static definition. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/6b09e3698e692c3338f70a5ae1e5a580f9dd08ee.1518802627.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/sun4i/sun4i_layer.c | 44 +++++++------------------------------ 1 file changed, 8 insertions(+), 36 deletions(-) commit 8f1f25534fff09f54d75ea8fac4ea8f35fb385d6 Author: Maxime Ripard Date: Fri Feb 16 18:39:32 2018 +0100 drm/sun4i: backend: Assign the pipes automatically Since we now have a way to enforce the zpos, check for the number of alpha planes, the only missing part is to assign our pipe automatically instead of hardcoding it. The algorithm is quite simple, but requires two iterations over the list of planes. In the first one (which is the same one that we've had to check for alpha, the frontend usage, and so on), we order the planes by their zpos. We can then do a second iteration over that array by ascending zpos starting with the pipe 0. When and if we encounter our alpha plane, we put it and all the other subsequent planes in the second pipe. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/e9caf21d831438d36a3ccc7cef229c9a7ea7f69f.1518802627.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/sun4i/sun4i_backend.c | 40 +++++++++++++++++++++++++++++++++-- drivers/gpu/drm/sun4i/sun4i_layer.c | 6 ------ drivers/gpu/drm/sun4i/sun4i_layer.h | 1 + 3 files changed, 39 insertions(+), 8 deletions(-) commit 424529fb7954616dc65e64111a6505c4d5db7d3f Author: William Breathitt Gray Date: Fri Dec 29 15:14:59 2017 -0500 pc104: Add EXPERT dependency for PC104 Kconfig option PC/104 device driver Kconfig options previously had an implicit EXPERT dependency by way of an explicit ISA_BUS_API dependency. Now that these driver Kconfig options select ISA_BUS_API rather than depend on it, the PC104 Kconfig option should have an explicit EXPERT dependency. The PC/104 form factor and bus architecture are common in embedded and specialized systems, but uncommon in typical desktop setups. For this reason, it is best to mask these devices and configurations via the EXPERT Kconfig option because the majority of users will never need to concern themselves with PC/104. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17a2a129b309d502d638164b2c515ff205c148df Author: William Breathitt Gray Date: Fri Dec 29 15:14:46 2017 -0500 isa: Remove ISA_BUS_API selection for ISA_BUS ISA_BUS_API is selected by drivers themselves when necessary. The ISA_BUS Kconfig option is now simply a mask for true ISA device drivers and relevant configuration. For now, the ISA_BUS Kconfig option is only available for X86, but may be added for other arch builds in the future if the need arises. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij arch/x86/Kconfig | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 35decc803c8ad9a84de890c1fea0ba1768666390 Author: William Breathitt Gray Date: Fri Dec 29 15:13:46 2017 -0500 gpio: Change ISA_BUS_API dependency to selection The ISA_BUS_API Kconfig option enables the compilation of the ISA bus driver. The ISA bus driver does not perform any hardware interaction, and is instead just a thin layer of software abstraction to eliminate boilerplate code common to ISA-style device drivers. Since ISA_BUS_API has no dependencies and does not jeopardize the integrity of the system when enabled, drivers should select it when the ISA bus driver functionality is needed. Cc: Linus Walleij Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit ccfe35eac21e2f3f99f44c6f4e1bd4d3ba20fe3b Author: William Breathitt Gray Date: Fri Dec 29 15:13:34 2017 -0500 watchdog: Change ISA_BUS_API dependency to selection The ISA_BUS_API Kconfig option enables the compilation of the ISA bus driver. The ISA bus driver does not perform any hardware interaction, and is instead just a thin layer of software abstraction to eliminate boilerplate code common to ISA-style device drivers. Since ISA_BUS_API has no dependencies and does not jeopardize the integrity of the system when enabled, drivers should select it when the ISA bus driver functionality is needed. Cc: Wim Van Sebroeck Acked-by: Guenter Roeck Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/watchdog/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1f8f93683da36a64109178344aee0dddd594bc7f Author: William Breathitt Gray Date: Fri Dec 29 15:13:19 2017 -0500 iio: Change ISA_BUS_API dependency to selection The ISA_BUS_API Kconfig option enables the compilation of the ISA bus driver. The ISA bus driver does not perform any hardware interaction, and is instead just a thin layer of software abstraction to eliminate boilerplate code common to ISA-style device drivers. Since ISA_BUS_API has no dependencies and does not jeopardize the integrity of the system when enabled, drivers should select it when the ISA bus driver functionality is needed. Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Signed-off-by: William Breathitt Gray Acked-by: Jonathan Cameron Signed-off-by: Linus Walleij drivers/iio/adc/Kconfig | 3 ++- drivers/iio/counter/Kconfig | 3 ++- drivers/iio/dac/Kconfig | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit fa2b7fae8426e2cd690278e514abcc09e4f89a8f Author: Phil Reid Date: Mon Feb 19 17:25:20 2018 +0800 pinctrl: mcp23s08: add open drain configuration for irq output The mcp23s08 series device can be configured for wired and interrupts using an external pull-up and open drain output via the IOCON_ODR bit. And "drive-open-drain" property to enable this. Reviewed-by: Sebastian Reichel Signed-off-by: Phil Reid Reviewed-by: Jan Kundrát Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 39aba4714da62946ef9d081ab6e41462517ccb34 Author: Phil Reid Date: Mon Feb 19 17:25:19 2018 +0800 dt-bindings: pinctrl: mcp23s08: add documentation for drive-open-drain This flag set the mcp23s08 device irq type to open drain active low. Acked-by: Rob Herring Signed-off-by: Phil Reid Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-mcp23s08.txt | 2 ++ 1 file changed, 2 insertions(+) commit d9f50048dc8004091a022e93312846175a5ffe7f Author: Phil Reid Date: Mon Feb 19 17:25:18 2018 +0800 pinctrl: mcp23s08: fix probing of mcp23s18 one_regmap_config is always null if mcp type is MCP_TYPE_S18. Remove the null check so that the mcp23s18 will probe. Fixes: 1781af563aef66c2eb7cda ("pinctrl: mcp23s08: spi: Fix duplicate pinctrl debugfs entries") Signed-off-by: Phil Reid Reviewed-by: Jan Kundrát Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 2 -- 1 file changed, 2 deletions(-) commit 12b10f47e56ac94afa4d7ec5a22f67ccdfe2b90e Author: Daniel Kurtz Date: Fri Feb 16 12:12:43 2018 -0700 pinctrl/amd: add get_direction handler On boot, gpiochip_add_data() initializes the FLAG_IS_OUT bit in desc->flags iff its gpio_chip does not have ->direction_input() handler, else it is initialized to 0, which implies the GPIO is an "input". Later, the sysfs "direction" handler will use gpiod_get_direction() to get the current direction, but if no ->get_direction() handler is installed, the result will just be the current (initial) value of flags, which will always be OUT irregardless of the initial register value. Add a get_direction() handler to pinctrl-amd to fix this and always provide the correct value for direction. Signed-off-by: Daniel Kurtz Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 51750fb167a054684a18c20e0e78f7f65b12c985 Author: Hien Dang Date: Mon Feb 5 04:15:02 2018 +0900 gpio: gpio-rcar: Support S2RAM This patch adds an implementation that saves and restores the state of GPIO configuration on suspend and resume. Signed-off-by: Hien Dang Signed-off-by: Takeshi Kihara [Modify structure of the bank info to simplify a saving registers] [Remove DEV_PM_OPS macro] Signed-off-by: Yoshihiro Kaneko Tested-by: Nguyen Viet Dung Reviewed-by: Simon Horman Signed-off-by: Linus Walleij drivers/gpio/gpio-rcar.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit b5520891a3491cd545e698c03874693aded56c1e Author: Andy Shevchenko Date: Sat Feb 17 17:25:11 2018 +0200 pinctrl: Re-use DEFINE_SHOW_ATTRIBUTE() macro ...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 90 +++++++------------------------------------------- 1 file changed, 12 insertions(+), 78 deletions(-) commit b35fe61df4bf10c7e164a416ff8241e42f3991aa Author: Cornelia Huck Date: Thu Feb 22 13:14:16 2018 +0100 s390: fix comment for scsw_cmd_is_valid_sctl This function is checking for the suspend control, not the function control. Signed-off-by: Cornelia Huck Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/include/asm/scsw.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8f6e27c1a79359091f16d3a3e9fc8b07c70d7c2 Author: Claudio Imbrenda Date: Tue Jan 23 16:54:11 2018 +0100 s390/sclp: 64 bit event mask Change the size of the sclp mask to 64 bits. Reviewed-by: Heiko Carstens Signed-off-by: Claudio Imbrenda Signed-off-by: Martin Schwidefsky drivers/s390/char/sclp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b0d1173d8aef75e821c0cceedb0e8178834ec1b Author: Claudio Imbrenda Date: Tue Jan 23 16:50:43 2018 +0100 s390/sclp: 32 bit event mask compatibility mode Qemu before version 2.11 does not implement the architecture correctly, and does not allow for a mask size of size different than 4. This patch introduces a compatibility mode for such systems, forcing the mask sizes to 4. Since the mask size is currently still 4 anyway, this patch should have no impact whatsoever by itself, but it will be needed when the mask size is increased to 64 bits in the next patch. Reviewed-by: Heiko Carstens Signed-off-by: Claudio Imbrenda Signed-off-by: Martin Schwidefsky drivers/s390/char/sclp.c | 23 ++++++++++++++++------- drivers/s390/char/sclp.h | 3 +++ drivers/s390/char/sclp_early_core.c | 15 ++++++++++++++- 3 files changed, 33 insertions(+), 8 deletions(-) commit b843563518c1e06521c446b9a043b7d352df02e0 Author: Claudio Imbrenda Date: Tue Jan 23 16:41:38 2018 +0100 s390/sclp: generic event mask accessors Switch the layout of the event masks to be a generic buffer, and implement accessors to retrieve the values of the masks. This will be needed in the next patches, where we will eventually switch the mask size to 64 bits. Reviewed-by: Heiko Carstens Signed-off-by: Claudio Imbrenda Signed-off-by: Martin Schwidefsky drivers/s390/char/sclp.c | 29 ++++++++++++---------- drivers/s390/char/sclp.h | 48 +++++++++++++++++++++++++++++++++---- drivers/s390/char/sclp_early.c | 2 +- drivers/s390/char/sclp_early_core.c | 19 +++++++++++---- 4 files changed, 75 insertions(+), 23 deletions(-) commit 0ee5f8dcd69d3db8d4e63e79f2962d328c48531f Author: Claudio Imbrenda Date: Tue Jan 23 15:07:09 2018 +0100 s390/sclp: clean up, use sccb_mask_t where appropriate Replace hardcoded instances where 32 or unsigned int (or long) is used for SCLP event masks, and replace with sizeof(sccb_mask_t) and sccb_mask_t respectively. This improves readability and prepares for when we will increase sccb_mask_t to 64 bits. Reviewed-by: Heiko Carstens Signed-off-by: Claudio Imbrenda Signed-off-by: Martin Schwidefsky drivers/s390/char/sclp.c | 6 +++--- drivers/s390/char/sclp.h | 6 +++--- drivers/s390/char/sclp_early_core.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit ddc1c9453550eabd6284021b167f708982df3ca9 Author: Stefan Haberland Date: Tue Dec 19 16:18:38 2017 +0100 s390/dasd: configurable IFCC handling Make the behavior in case of constant IFCC/CCC errors configurable. Add a sysfs attribute to switch between path disabled after threshold exceeded (default) and message only. Reviewed-by: Jan Hoeppner Reviewed-by: Sebastian Ott Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky arch/s390/include/uapi/asm/dasd.h | 38 +++++++++++++++++---------------- drivers/s390/block/dasd_3990_erp.c | 17 +++++++++++++-- drivers/s390/block/dasd_devmap.c | 43 +++++++++++++++++++++++++++++++++++++- 3 files changed, 77 insertions(+), 21 deletions(-) commit 66aec647216f129b8560dba738303a8486481c53 Author: Peter Oberparleiter Date: Mon Feb 13 13:38:17 2017 +0100 s390/sclp: Add support for Store Data SCLP interface Add functions to retrieve data associated with an SCLP Store Data entity. Automatically retrieve data for the "config" entity during boot and make that data available to user-space via sysfs: /sys/firmware/sclp_sd/config/data Reading from this file will return config data contents. /sys/firmware/sclp_sd/config/reload Writing to this file will cause the latest version of data related to the config entity to be read from the SCLP interface. Generate a KOBJ_CHANGE whenever new data is retrieved. Signed-off-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/char/Makefile | 2 +- drivers/s390/char/sclp.h | 2 + drivers/s390/char/sclp_sd.c | 569 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 572 insertions(+), 1 deletion(-) commit 1caf170df9bac49bb198c424aee45f5ecced076a Author: Heiko Carstens Date: Tue Jun 13 14:46:18 2017 +0200 s390/mm: provide base_asce_alloc() / base_asce_free() helper functions Provide base_asce_alloc() and base_asce_free() helper functions which can be used to allocate an ASCE and all required region, segment and page tables required to access memory regions of the virtual kernel address space. Both, the ASCE and all tables, do not use any features that correspond to e.g. enhanced DAT features. This is required for some I/O functions that pass an ASCE, like e.g. some service call requests, but which may not use any enhanced features. Acked-by: Peter Oberparleiter Acked-by: Janosch Frank Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pgalloc.h | 3 + arch/s390/mm/pgalloc.c | 293 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 295 insertions(+), 1 deletion(-) commit 62c16234bbfd2758ec2fdd1a716d13418c58044d Author: Linus Walleij Date: Thu Feb 8 18:00:05 2018 +0100 gpio: dwapb: Call directly into the gpiochip to read value We were going out through the (legacy) gpio API to read the value of a line to set up polarity inversion. This is abusive. Do something less abusive by looking up the actual struct gpio_chip * instance and calling .get() directly on it. Acked-by: Hoan Tran Signed-off-by: Linus Walleij drivers/gpio/gpio-dwapb.c | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) commit 89f99feb9c73d823d15f40599d998eb11a228465 Author: Linus Walleij Date: Thu Feb 8 17:03:58 2018 +0100 gpio: dwapb: Use "stride" rather than "size" for register distance This terminology is more precise. Also cut the stride calculation in the preprocessor, it confuses more than it helps when reading the driver. Acked-by: Hoan Tran Signed-off-by: Linus Walleij drivers/gpio/gpio-dwapb.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 63f2dc0a76120e07c7482c7c95b2254fad39b343 Author: Linus Walleij Date: Thu Feb 8 17:57:43 2018 +0100 gpio: include consumer header in gpiolib.h We are forward-declaring enum gpiod_flags, but this is not referenced by pointer, it is a real struct member, so we need to actually include it to compile anything including the local gpiolib.h header. Signed-off-by: Linus Walleij drivers/gpio/gpiolib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75f8f5af0c2b633352baabd288eff419eb921106 Author: Markus Elfring Date: Sun Feb 11 21:56:42 2018 +0100 gpio-intel-mid: Delete an error message Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-intel-mid.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2773eb2f98011b398fcf8f6cc12c4981a00ed452 Author: Axel Lin Date: Mon Feb 12 22:01:57 2018 +0800 gpio: tegra: Convert to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Axel Lin Signed-off-by: Linus Walleij drivers/gpio/gpio-tegra.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 4b7edaef795c1bc848cab3b3b6a5b42f2d64db29 Author: Markus Elfring Date: Sun Feb 11 13:30:14 2018 +0100 gpio: merrifield: Delete an error message Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-merrifield.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4aed95793f9bd492380e6165fa6d3b02263017c4 Author: Markus Elfring Date: Sat Feb 10 22:27:15 2018 +0100 gpio-ml-ioh: Delete an error message Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Linus Walleij drivers/gpio/gpio-ml-ioh.c | 1 - 1 file changed, 1 deletion(-) commit f97364c9b89ea0e60f3fa2e9d6e7bdf9627b891b Author: Markus Elfring Date: Sat Feb 10 21:49:22 2018 +0100 gpio: omap: Improve a size determination Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9117d40b5dec65fb4b1320cbad54c9c9e067de00 Author: Markus Elfring Date: Sat Feb 10 21:46:30 2018 +0100 gpio: omap: Delete an error message Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b382a5c3c592a53cdf0097e314dc9936f7eae16d Author: Kees Cook Date: Fri Feb 16 20:55:30 2018 -0800 USB: chaoskey: Use kasprintf() over strcpy()/strcat() Instead of kmalloc() with manually calculated values followed by multiple strcpy()/strcat() calls, just fold it all into a single kasprintf() call. Signed-off-by: Kees Cook Reviewed-by: Keith Packard Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/chaoskey.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 22072e83ebd510fb6a090aef9d65ccfda9b1e7e4 Author: Souptick Joarder Date: Wed Feb 14 23:18:48 2018 +0530 usb: host: ehci: Use dma_pool_zalloc() Use dma_pool_zalloc() instead of dma_pool_alloc + memset Signed-off-by: Souptick Joarder Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-mem.c | 3 +-- drivers/usb/host/ehci-sched.c | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) commit 017457061e07852b7173e6a2578c129b49033204 Author: Fengguang Wu Date: Fri Feb 16 00:40:13 2018 +0800 crypto: ccree - fix memdup.cocci warnings drivers/crypto/ccree/cc_cipher.c:629:15-22: WARNING opportunity for kmemdep Use kmemdup rather than duplicating its implementation Generated by: scripts/coccinelle/api/memdup.cocci Fixes: 63ee04c8b491 ("crypto: ccree - add skcipher support") CC: Gilad Ben-Yossef Signed-off-by: Fengguang Wu Signed-off-by: Herbert Xu drivers/crypto/ccree/cc_cipher.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0268483992a23a9185e41b060cca71bfd7582788 Author: Markus Elfring Date: Thu Feb 15 11:38:30 2018 +0100 crypto: atmel - Delete error messages for a failed memory allocation in six functions Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Tudor Ambarus Signed-off-by: Herbert Xu drivers/crypto/atmel-aes.c | 6 +----- drivers/crypto/atmel-sha.c | 9 ++------- drivers/crypto/atmel-tdes.c | 9 ++------- 3 files changed, 5 insertions(+), 19 deletions(-) commit 72e8d3f895946720c9151d4c2c7155cf4a592f48 Author: Markus Elfring Date: Wed Feb 14 22:05:11 2018 +0100 crypto: bcm - Delete an error message for a failed memory allocation in do_shash() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu drivers/crypto/bcm/util.c | 1 - 1 file changed, 1 deletion(-) commit 5471f2e2b5ea97504b6358b673372297c7f8c967 Author: Markus Elfring Date: Wed Feb 14 21:34:54 2018 +0100 crypto: bfin_crc - Delete an error message for a failed memory allocation in bfin_crypto_crc_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu drivers/crypto/bfin_crc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 41b3316e75ee5e8aec7234c9d631582b13a38c7d Author: Eric Biggers Date: Wed Feb 14 10:42:23 2018 -0800 crypto: speck - add test vectors for Speck64-XTS Add test vectors for Speck64-XTS, generated in userspace using C code. The inputs were borrowed from the AES-XTS test vectors, with key lengths adjusted. xts-speck64-neon passes these tests. However, they aren't currently applicable for the generic XTS template, as that only supports a 128-bit block size. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/testmgr.c | 9 + crypto/testmgr.h | 671 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 680 insertions(+) commit c3bb521bb6ac3023ae236a3a361f951f8d78ecc4 Author: Eric Biggers Date: Wed Feb 14 10:42:22 2018 -0800 crypto: speck - add test vectors for Speck128-XTS Add test vectors for Speck128-XTS, generated in userspace using C code. The inputs were borrowed from the AES-XTS test vectors. Both xts(speck128-generic) and xts-speck128-neon pass these tests. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/testmgr.c | 9 + crypto/testmgr.h | 687 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 696 insertions(+) commit ede9622162fac42eacde231d64e94c926f4be45d Author: Eric Biggers Date: Wed Feb 14 10:42:21 2018 -0800 crypto: arm/speck - add NEON-accelerated implementation of Speck-XTS Add an ARM NEON-accelerated implementation of Speck-XTS. It operates on 128-byte chunks at a time, i.e. 8 blocks for Speck128 or 16 blocks for Speck64. Each 128-byte chunk goes through XTS preprocessing, then is encrypted/decrypted (doing one cipher round for all the blocks, then the next round, etc.), then goes through XTS postprocessing. The performance depends on the processor but can be about 3 times faster than the generic code. For example, on an ARMv7 processor we observe the following performance with Speck128/256-XTS: xts-speck128-neon: Encryption 107.9 MB/s, Decryption 108.1 MB/s xts(speck128-generic): Encryption 32.1 MB/s, Decryption 36.6 MB/s In comparison to AES-256-XTS without the Cryptography Extensions: xts-aes-neonbs: Encryption 41.2 MB/s, Decryption 36.7 MB/s xts(aes-asm): Encryption 31.7 MB/s, Decryption 30.8 MB/s xts(aes-generic): Encryption 21.2 MB/s, Decryption 20.9 MB/s Speck64/128-XTS is even faster: xts-speck64-neon: Encryption 138.6 MB/s, Decryption 139.1 MB/s Note that as with the generic code, only the Speck128 and Speck64 variants are supported. Also, for now only the XTS mode of operation is supported, to target the disk and file encryption use cases. The NEON code also only handles the portion of the data that is evenly divisible into 128-byte chunks, with any remainder handled by a C fallback. Of course, other modes of operation could be added later if needed, and/or the NEON code could be updated to handle other buffer sizes. The XTS specification is only defined for AES which has a 128-bit block size, so for the GF(2^64) math needed for Speck64-XTS we use the reducing polynomial 'x^64 + x^4 + x^3 + x + 1' given by the original XEX paper. Of course, when possible users should use Speck128-XTS, but even that may be too slow on some processors; Speck64-XTS can be faster. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/arm/crypto/Kconfig | 6 + arch/arm/crypto/Makefile | 2 + arch/arm/crypto/speck-neon-core.S | 432 ++++++++++++++++++++++++++++++++++++++ arch/arm/crypto/speck-neon-glue.c | 288 +++++++++++++++++++++++++ 4 files changed, 728 insertions(+) commit c8c36413ca8ccbf7a0afe71247fc4617ee2dfcfe Author: Eric Biggers Date: Wed Feb 14 10:42:20 2018 -0800 crypto: speck - export common helpers Export the Speck constants and transform context and the ->setkey(), ->encrypt(), and ->decrypt() functions so that they can be reused by the ARM NEON implementation of Speck-XTS. The generic key expansion code will be reused because it is not performance-critical and is not vectorizable, while the generic encryption and decryption functions are needed as fallbacks and for the XTS tweak encryption. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/speck.c | 90 +++++++++++++++++++++++++++----------------------- include/crypto/speck.h | 62 ++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 41 deletions(-) commit da7a0ab5b4babbe5d7a46f852582be06a00a28f0 Author: Eric Biggers Date: Wed Feb 14 10:42:19 2018 -0800 crypto: speck - add support for the Speck block cipher Add a generic implementation of Speck, including the Speck128 and Speck64 variants. Speck is a lightweight block cipher that can be much faster than AES on processors that don't have AES instructions. We are planning to offer Speck-XTS (probably Speck128/256-XTS) as an option for dm-crypt and fscrypt on Android, for low-end mobile devices with older CPUs such as ARMv7 which don't have the Cryptography Extensions. Currently, such devices are unencrypted because AES is not fast enough, even when the NEON bit-sliced implementation of AES is used. Other AES alternatives such as Twofish, Threefish, Camellia, CAST6, and Serpent aren't fast enough either; it seems that only a modern ARX cipher can provide sufficient performance on these devices. This is a replacement for our original proposal (https://patchwork.kernel.org/patch/10101451/) which was to offer ChaCha20 for these devices. However, the use of a stream cipher for disk/file encryption with no space to store nonces would have been much more insecure than we thought initially, given that it would be used on top of flash storage as well as potentially on top of F2FS, neither of which is guaranteed to overwrite data in-place. Speck has been somewhat controversial due to its origin. Nevertheless, it has a straightforward design (it's an ARX cipher), and it appears to be the leading software-optimized lightweight block cipher currently, with the most cryptanalysis. It's also easy to implement without side channels, unlike AES. Moreover, we only intend Speck to be used when the status quo is no encryption, due to AES not being fast enough. We've also considered a novel length-preserving encryption mode based on ChaCha20 and Poly1305. While theoretically attractive, such a mode would be a brand new crypto construction and would be more complicated and difficult to implement efficiently in comparison to Speck-XTS. There is confusion about the byte and word orders of Speck, since the original paper doesn't specify them. But we have implemented it using the orders the authors recommended in a correspondence with them. The test vectors are taken from the original paper but were mapped to byte arrays using the recommended byte and word orders. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/Kconfig | 14 +++ crypto/Makefile | 1 + crypto/speck.c | 299 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ crypto/testmgr.c | 18 ++++ crypto/testmgr.h | 128 ++++++++++++++++++++++++ 5 files changed, 460 insertions(+) commit e845520707f85c539ce04bb73c6070e9441480be Author: Dave Watson Date: Wed Feb 14 09:40:58 2018 -0800 crypto: aesni - Update aesni-intel_glue to use scatter/gather Add gcmaes_crypt_by_sg routine, that will do scatter/gather by sg. Either src or dst may contain multiple buffers, so iterate over both at the same time if they are different. If the input is the same as the output, iterate only over one. Currently both the AAD and TAG must be linear, so copy them out with scatterlist_map_and_copy. If first buffer contains the entire AAD, we can optimize and not copy. Since the AAD can be any size, if copied it must be on the heap. TAG can be on the stack since it is always < 16 bytes. Only the SSE routines are updated so far, so leave the previous gcmaes_en/decrypt routines, and branch to the sg ones if the keysize is inappropriate for avx, or we are SSE only. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_glue.c | 133 +++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) commit fb8986e6430a6b226917ec5370c2be06a72803eb Author: Dave Watson Date: Wed Feb 14 09:40:47 2018 -0800 crypto: aesni - Introduce scatter/gather asm function stubs The asm macros are all set up now, introduce entry points. GCM_INIT and GCM_COMPLETE have arguments supplied, so that the new scatter/gather entry points don't have to take all the arguments, and only the ones they need. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_asm.S | 116 ++++++++++++++++++++++++++++--------- arch/x86/crypto/aesni-intel_glue.c | 16 +++++ 2 files changed, 106 insertions(+), 26 deletions(-) commit 933d6aefd54e4b49c347eb1a6cf8f8785814e90e Author: Dave Watson Date: Wed Feb 14 09:40:31 2018 -0800 crypto: aesni - Add fast path for > 16 byte update We can fast-path any < 16 byte read if the full message is > 16 bytes, and shift over by the appropriate amount. Usually we are reading > 16 bytes, so this should be faster than the READ_PARTIAL macro introduced in b20209c91e2 for the average case. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_asm.S | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit ae952c5ec655b2b8bb337acb554d53481b0e01bc Author: Dave Watson Date: Wed Feb 14 09:40:19 2018 -0800 crypto: aesni - Introduce partial block macro Before this diff, multiple calls to GCM_ENC_DEC will succeed, but only if all calls are a multiple of 16 bytes. Handle partial blocks at the start of GCM_ENC_DEC, and update aadhash as appropriate. The data offset %r11 is also updated after the partial block. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_asm.S | 151 +++++++++++++++++++++++++++++++++++++- 1 file changed, 150 insertions(+), 1 deletion(-) commit 1476db2d129d5e4fc59e93a7abd22edcb26b52f5 Author: Dave Watson Date: Wed Feb 14 09:40:10 2018 -0800 crypto: aesni - Move HashKey computation from stack to gcm_context HashKey computation only needs to happen once per scatter/gather operation, save it between calls in gcm_context struct instead of on the stack. Since the asm no longer stores anything on the stack, we can use %rsp directly, and clean up the frame save/restore macros a bit. Hashkeys actually only need to be calculated once per key and could be moved to when set_key is called, however, the current glue code falls back to generic aes code if fpu is disabled. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_asm.S | 205 ++++++++++++++++++++------------------ 1 file changed, 106 insertions(+), 99 deletions(-) commit e2e34b0856463727292498d756308cba957fe477 Author: Dave Watson Date: Wed Feb 14 09:39:55 2018 -0800 crypto: aesni - Move ghash_mul to GCM_COMPLETE Prepare to handle partial blocks between scatter/gather calls. For the last partial block, we only want to calculate the aadhash in GCM_COMPLETE, and a new partial block macro will handle both aadhash update and encrypting partial blocks between calls. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_asm.S | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 9660474b0e635196628a86a43e205d37e8936587 Author: Dave Watson Date: Wed Feb 14 09:39:45 2018 -0800 crypto: aesni - Fill in new context data structures Fill in aadhash, aadlen, pblocklen, curcount with appropriate values. pblocklen, aadhash, and pblockenckey are also updated at the end of each scatter/gather operation, to be carried over to the next operation. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_asm.S | 51 ++++++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 12 deletions(-) commit c594c5408552ed8d735b402f5a69b45be7d44ae3 Author: Dave Watson Date: Wed Feb 14 09:39:36 2018 -0800 crypto: aesni - Split AAD hash calculation to separate macro AAD hash only needs to be calculated once for each scatter/gather operation. Move it to its own macro, and call it from GCM_INIT instead of INITIAL_BLOCKS. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_asm.S | 71 ++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 28 deletions(-) commit 9ee4a5df220919c0b62165cb2813d63a7bdcb83d Author: Dave Watson Date: Wed Feb 14 09:39:23 2018 -0800 crypto: aesni - Introduce gcm_context_data Introduce a gcm_context_data struct that will be used to pass context data between scatter/gather update calls. It is passed as the second argument (after crypto keys), other args are renumbered. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_asm.S | 115 +++++++++++++++++++++---------------- arch/x86/crypto/aesni-intel_glue.c | 81 ++++++++++++++++++-------- 2 files changed, 121 insertions(+), 75 deletions(-) commit ba45833e3e76aac409b7ebc3a428515a1b53ebda Author: Dave Watson Date: Wed Feb 14 09:39:10 2018 -0800 crypto: aesni - Merge encode and decode to GCM_ENC_DEC macro Make a macro for the main encode/decode routine. Only a small handful of lines differ for enc and dec. This will also become the main scatter/gather update routine. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_asm.S | 293 +++++++++++++++----------------------- 1 file changed, 114 insertions(+), 179 deletions(-) commit adcadab3698d5104e68899c6d2a2230399780807 Author: Dave Watson Date: Wed Feb 14 09:38:57 2018 -0800 crypto: aesni - Add GCM_COMPLETE macro Merge encode and decode tag calculations in GCM_COMPLETE macro. Scatter/gather routines will call this once at the end of encryption or decryption. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_asm.S | 172 ++++++++++++++------------------------ 1 file changed, 63 insertions(+), 109 deletions(-) commit 7af964c2fc7f415b334eb9d2e52ebdf258df662e Author: Dave Watson Date: Wed Feb 14 09:38:45 2018 -0800 crypto: aesni - Add GCM_INIT macro Reduce code duplication by introducting GCM_INIT macro. This macro will also be exposed as a function for implementing scatter/gather support, since INIT only needs to be called once for the full operation. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_asm.S | 84 +++++++++++++++------------------------ 1 file changed, 33 insertions(+), 51 deletions(-) commit 6c2c86b3e05822abec2fc0d7a5c31637b57cb126 Author: Dave Watson Date: Wed Feb 14 09:38:35 2018 -0800 crypto: aesni - Macro-ify func save/restore Macro-ify function save and restore. These will be used in new functions added for scatter/gather update operations. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_asm.S | 53 ++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 29 deletions(-) commit e1fd316fbae104f96cc9c36073fe102d298f8576 Author: Dave Watson Date: Wed Feb 14 09:38:12 2018 -0800 crypto: aesni - Merge INITIAL_BLOCKS_ENC/DEC Use macro operations to merge implemetations of INITIAL_BLOCKS, since they differ by only a small handful of lines. Use macro counter \@ to simplify implementation. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_asm.S | 298 ++++++-------------------------------- 1 file changed, 48 insertions(+), 250 deletions(-) commit 8c48db9a63e1ef9045a4de9ccc004a306dc3b932 Author: Markus Elfring Date: Wed Feb 14 17:05:13 2018 +0100 crypto: nx-842 - Delete an error message for a failed memory allocation in nx842_pseries_init() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Dan Streetman Signed-off-by: Herbert Xu drivers/crypto/nx/nx-842-pseries.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a8bc22f35c347d81aa6108cc9b19ccc05560e3a9 Author: Markus Elfring Date: Wed Feb 14 14:14:05 2018 +0100 crypto: sahara - Improve a size determination in sahara_probe() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu drivers/crypto/sahara.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d576d9239ede072d977b7e35f9fe16336208379 Author: Markus Elfring Date: Wed Feb 14 14:10:03 2018 +0100 crypto: sahara - Delete an error message for a failed memory allocation in sahara_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu drivers/crypto/sahara.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0c704bf044606f579599143173b3bbed53c920d5 Author: Markus Elfring Date: Wed Feb 14 10:56:38 2018 +0100 crypto: ux500 - Delete two unnecessary variable initialisations in ux500_cryp_probe() Two local variables will eventually be set to appropriate pointers a bit later. Thus omit their explicit initialisation at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu drivers/crypto/ux500/cryp/cryp_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9dea69413503c7a963e7dd48e9cbfd8a54f3eddd Author: Markus Elfring Date: Wed Feb 14 10:47:31 2018 +0100 crypto: ux500 - Adjust an error message in ux500_cryp_probe() Replace the function name in this error message so that the same name is mentioned according to what was called before. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu drivers/crypto/ux500/cryp/cryp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50ca524d7c9914f451b52c6aa9fbf153494d4b98 Author: Markus Elfring Date: Wed Feb 14 10:38:44 2018 +0100 crypto: ux500 - Adjust two condition checks in ux500_cryp_probe() The local variable "cryp_error" was used only for two condition checks. * Check the return values from these function calls directly instead. * Delete this variable which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu drivers/crypto/ux500/cryp/cryp_core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit dbbd5d1efffa97508e70e444a79dc059588b07fd Author: Markus Elfring Date: Wed Feb 14 10:12:38 2018 +0100 crypto: ux500 - Delete an error message for a failed memory allocation in ux500_cryp_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu drivers/crypto/ux500/cryp/cryp_core.c | 1 - 1 file changed, 1 deletion(-) commit 333e18c5cc74438f8940c7f3a8b3573748a371f9 Author: Conor McLoughlin Date: Tue Feb 13 08:29:56 2018 +0000 crypto: testmgr - Fix incorrect values in PKCS#1 test vector The RSA private key for the first form should have version, prime1, prime2, exponent1, exponent2, coefficient values 0. With non-zero values for prime1,2, exponent 1,2 and coefficient the Intel QAT driver will assume that values are provided for the private key second form. This will result in signature verification failures for modules where QAT device is present and the modules are signed with rsa,sha256. Cc: Signed-off-by: Giovanni Cabiddu Signed-off-by: Conor McLoughlin Reviewed-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/testmgr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 57240a78be90d0ecdf6956e925d673bbcced5c32 Author: Antoine Tenart Date: Tue Feb 13 09:26:57 2018 +0100 crypto: inside-secure - unmap the result in the hash send error path This patch adds a label to unmap the result buffer in the hash send function error path. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Suggested-by: Ofer Heifetz Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f7268c538b3d84e8d4c02ccf4cae0637b81853b1 Author: Antoine Tenart Date: Tue Feb 13 09:26:56 2018 +0100 crypto: inside-secure - keep the requests push/pop synced This patch updates the Inside Secure SafeXcel driver to avoid being out-of-sync between the number of requests sent and the one being completed. The number of requests acknowledged by the driver can be different than the threshold that was configured if new requests were being pushed to the h/w in the meantime. The driver wasn't taking those into account, and the number of remaining requests to handled (to reconfigure the interrupt threshold) could be out-of sync. This patch fixes it by not taking in account the number of requests left, but by taking in account the total number of requests being sent to the hardware, so that new requests are being taken into account. Fixes: dc7e28a3286e ("crypto: inside-secure - dequeue all requests at once") Suggested-by: Ofer Heifetz Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 28 +++++++++++++--------------- drivers/crypto/inside-secure/safexcel.h | 6 ++---- 2 files changed, 15 insertions(+), 19 deletions(-) commit b7007dbccd92f7b8c00e590020bee542a48c6a2c Author: Antoine Tenart Date: Tue Feb 13 09:26:55 2018 +0100 crypto: inside-secure - fix the invalidation step during cra_exit When exiting a transformation, the cra_exit() helper is called in each driver providing one. The Inside Secure SafeXcel driver has one, which is responsible of freeing some areas and of sending one invalidation request to the crypto engine, to invalidate the context that was used during the transformation. We could see in some setups (when lots of transformations were being used with a short lifetime, and hence lots of cra_exit() calls) NULL pointer dereferences and other weird issues. All these issues were coming from accessing the tfm context. The issue is the invalidation request completion is checked using a wait_for_completion_interruptible() call in both the cipher and hash cra_exit() helpers. In some cases this was interrupted while the invalidation request wasn't processed yet. And then cra_exit() returned, and its caller was freeing the tfm instance. Only then the request was being handled by the SafeXcel driver, which lead to the said issues. This patch fixes this by using wait_for_completion() calls in these specific cases. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_cipher.c | 2 +- drivers/crypto/inside-secure/safexcel_hash.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 95831ceafc0de7d94a5fe86ebb1c2042317cc2cd Author: Antoine Tenart Date: Tue Feb 13 09:26:54 2018 +0100 crypto: inside-secure - do not process request if no command was issued This patch adds a check in the SafeXcel dequeue function, to avoid processing request further if no hardware command was issued. This can happen in certain cases where the ->send() function caches all the data that would have been send. Fixes: 809778e02cd4 ("crypto: inside-secure - fix hash when length is a multiple of a block") Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 666a9c70b04fccabde5cea5e680ae1ae92460a62 Author: Antoine Tenart Date: Tue Feb 13 09:26:53 2018 +0100 crypto: inside-secure - fix the cache_len computation This patch fixes the cache length computation as cache_len could end up being a negative value. The check between the queued size and the block size is updated to reflect the caching mechanism which can cache up to a full block size (included!). Fixes: 809778e02cd4 ("crypto: inside-secure - fix hash when length is a multiple of a block") Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1a8fa6e240ed4b99778d48ab790743565cb61c8 Author: Antoine Tenart Date: Tue Feb 13 09:26:52 2018 +0100 crypto: inside-secure - fix the extra cache computation This patch fixes the extra cache computation when the queued data is a multiple of a block size. This fixes the hash support in some cases. Fixes: 809778e02cd4 ("crypto: inside-secure - fix hash when length is a multiple of a block") Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e1d24c0bb76648cdf789b168defb6e31adb0b1b1 Author: Antoine Tenart Date: Tue Feb 13 09:26:51 2018 +0100 crypto: inside-secure - do not overwrite the threshold value This patch fixes the Inside Secure SafeXcel driver not to overwrite the interrupt threshold value. In certain cases the value of this register, which controls when to fire an interrupt, was overwritten. This lead to packet not being processed or acked as the driver never was aware of their completion. This patch fixes this behaviour by not setting the threshold when requests are being processed by the engine. Fixes: dc7e28a3286e ("crypto: inside-secure - dequeue all requests at once") Suggested-by: Ofer Heifetz Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c4ecc8f0bdced702ae502529f9fb70545fe556a5 Author: Antoine Tenart Date: Tue Feb 13 09:26:50 2018 +0100 MAINTAINERS: update the Inside Secure maintainer email Free Electrons became Bootlin. Update my email accordingly. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b4c5d30d0bd2b22c09d4d993a76e0973a873891 Author: Stefan Wahren Date: Mon Feb 12 21:11:36 2018 +0100 hwrng: bcm2835 - Handle deferred clock properly In case the probe of the clock is deferred, we would assume it is optional. This is wrong, so defer the probe of this driver until the clock is available. Fixes: 791af4f4907a ("hwrng: bcm2835 - Manage an optional clock") Signed-off-by: Stefan Wahren Acked-by: Florian Fainelli Signed-off-by: Herbert Xu drivers/char/hw_random/bcm2835-rng.c | 2 ++ 1 file changed, 2 insertions(+) commit 4ff8b1dd814ba4c2dc4a8ce3cf77274e01bd1c93 Author: Jinbum Park Date: Mon Feb 12 22:52:37 2018 +0900 crypto: arm/aes-cipher - move S-box to .rodata section Move the AES inverse S-box to the .rodata section where it is safe from abuse by speculation. Signed-off-by: Jinbum Park Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/aes-cipher-core.S | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 7c73cf4cc2ac16465f5102437dc0a12d66671bd6 Author: Peter Robinson Date: Sun Feb 11 23:15:37 2018 +0000 crypto: sunxi-ss - Add MODULE_ALIAS to sun4i-ss The MODULE_ALIAS is required to enable the sun4i-ss driver to load automatically when built at a module. Tested on a Cubietruck. Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator") Signed-off-by: Peter Robinson Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-core.c | 1 + 1 file changed, 1 insertion(+) commit 2c3087e1649fe4391b565fc31f588670e11fc4d4 Author: Markus Elfring Date: Sat Feb 10 21:13:28 2018 +0100 gpio: timberdale: Improve a size determination Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Linus Walleij drivers/gpio/gpio-timberdale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4552f50a439c36fd5f8c6f1ec2d5ba7c8574ce97 Author: Tvrtko Ursulin Date: Thu Feb 22 11:16:58 2018 +0000 drm/i915: Move page sizes out of the 8-bit sandwich Slightly smaller code and a bit more logical layout. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180222111658.4999-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_device_info.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 587ca5ed56679f7697919b90eeb0ea8a87d55368 Author: Markus Elfring Date: Sat Feb 10 21:09:08 2018 +0100 gpio: timberdale: Delete an error message Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Linus Walleij drivers/gpio/gpio-timberdale.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7afe031c1a49c3630e39ec8d964334d0032fe6da Author: Bogdan Purcareata Date: Mon Feb 5 08:07:43 2018 -0600 staging: fsl-mc: Move irqchip code out of staging Now that the fsl-mc bus core infrastructure is out of staging, the remaining irqchip glue code used (irq-gic-v3-its-fsl-mc-msi.c) goes to drivers/irqchip. Create new Kconfig option for irqchip code that depends on FSL_MC_BUS and ARM_GIC_V3_ITS. This ensures irqchip code only gets built on ARM64 platforms. We can now remove #ifdef GENERIC_MSI_DOMAIN_OPS as it was only needed for x86. Signed-off-by: Stuart Yoder [rebased, add dpaa2_eth and dpio #include updates] Signed-off-by: Laurentiu Tudor [rebased, split irqchip to separate patch] Signed-off-by: Bogdan Purcareata [add Kconfig dependency on ARM_GIC_V3_ITS] Signed-off-by: Ioana Radulescu Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Signed-off-by: Greg Kroah-Hartman drivers/irqchip/Kconfig | 6 ++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c | 98 ++++++++++++++++++++ drivers/staging/fsl-mc/bus/Makefile | 3 +- .../staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 100 --------------------- 5 files changed, 106 insertions(+), 102 deletions(-) commit 6bd067c48efed50ac0200c4a83a415bd524254e0 Author: Bogdan Purcareata Date: Mon Feb 5 08:07:42 2018 -0600 staging: fsl-mc: Move core bus out of staging Move the source files out of staging into their final locations: -mc.h include file in drivers/staging/fsl-mc/include go to include/linux/fsl -source files in drivers/staging/fsl-mc/bus go to drivers/bus/fsl-mc -overview.rst, providing an overview of DPAA2, goes to Documentation/networking/dpaa2/overview.rst Update or delete other remaining staging files -- Makefile, Kconfig, TODO. Update dpaa2_eth and dpio staging drivers. Add integration bits for the documentation build system. Signed-off-by: Stuart Yoder [rebased, add dpaa2_eth and dpio #include updates] Signed-off-by: Laurentiu Tudor [rebased, split irqchip to separate patch] Signed-off-by: Bogdan Purcareata Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Signed-off-by: Greg Kroah-Hartman Documentation/networking/dpaa2/index.rst | 8 + Documentation/networking/dpaa2/overview.rst | 404 +++++++++ Documentation/networking/index.rst | 1 + MAINTAINERS | 3 +- drivers/bus/Kconfig | 2 + drivers/bus/Makefile | 4 + drivers/bus/fsl-mc/Kconfig | 16 + drivers/bus/fsl-mc/Makefile | 16 + drivers/bus/fsl-mc/dpmcp.c | 99 +++ drivers/bus/fsl-mc/dprc-driver.c | 809 ++++++++++++++++++ drivers/bus/fsl-mc/dprc.c | 532 ++++++++++++ drivers/bus/fsl-mc/fsl-mc-allocator.c | 648 ++++++++++++++ drivers/bus/fsl-mc/fsl-mc-bus.c | 948 +++++++++++++++++++++ drivers/bus/fsl-mc/fsl-mc-msi.c | 285 +++++++ drivers/bus/fsl-mc/fsl-mc-private.h | 475 +++++++++++ drivers/bus/fsl-mc/mc-io.c | 268 ++++++ drivers/bus/fsl-mc/mc-sys.c | 296 +++++++ drivers/staging/fsl-dpaa2/ethernet/README | 2 +- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 2 +- drivers/staging/fsl-dpaa2/ethernet/dpni.c | 2 +- drivers/staging/fsl-mc/TODO | 18 - drivers/staging/fsl-mc/bus/Kconfig | 10 - drivers/staging/fsl-mc/bus/Makefile | 16 +- drivers/staging/fsl-mc/bus/dpbp.c | 2 +- drivers/staging/fsl-mc/bus/dpcon.c | 2 +- drivers/staging/fsl-mc/bus/dpio/dpio-driver.c | 2 +- drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 2 +- drivers/staging/fsl-mc/bus/dpio/dpio.c | 2 +- drivers/staging/fsl-mc/bus/dpmcp.c | 99 --- drivers/staging/fsl-mc/bus/dprc-driver.c | 809 ------------------ drivers/staging/fsl-mc/bus/dprc.c | 531 ------------ drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 648 -------------- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 948 --------------------- drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 284 ------ drivers/staging/fsl-mc/bus/fsl-mc-private.h | 475 ----------- .../staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 2 +- drivers/staging/fsl-mc/bus/mc-io.c | 268 ------ drivers/staging/fsl-mc/bus/mc-sys.c | 296 ------- drivers/staging/fsl-mc/include/mc.h | 454 ---------- drivers/staging/fsl-mc/overview.rst | 404 --------- include/linux/fsl/mc.h | 454 ++++++++++ 41 files changed, 5279 insertions(+), 5267 deletions(-) commit 281377cc66137febf3051bf70c506aca99bbc508 Author: Ajay Singh Date: Tue Feb 20 20:28:01 2018 +0530 staging: wilc1000: rename _WPARxGtk_end_case_ label to avoid camelCase Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 90261dd94ab2d04a34de5abfc62bf38bded8a46b Author: Ajay Singh Date: Tue Feb 20 20:28:00 2018 +0530 staging: wilc1000: rename _WPAPtk_end_case_ label to avoid camelCase Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e87bbe0a91f7777cdb11727dbaf73a388e5f909f Author: Ajay Singh Date: Tue Feb 20 20:27:59 2018 +0530 staging: wilc1000: rename pstrStationParam to avoid camelCase Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 46 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 24 deletions(-) commit 47daf8621862d1848383d17758aa3c3855febd45 Author: Ajay Singh Date: Tue Feb 20 20:27:58 2018 +0530 staging: wilc1000: rename pstrDelStaParam to avoid camelCase Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8a7c5bd34649873a72caf0f3fb566531d8eddf9a Author: Ajay Singh Date: Tue Feb 20 20:27:57 2018 +0530 staging: wilc1000: rename strDisconnectNotifInfo to avoid camelCase Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit fcc70105f61a868dd0bc86c33d4af4528347d6c3 Author: Ajay Singh Date: Tue Feb 20 20:27:56 2018 +0530 staging: wilc1000: rename pstrStatistics to avoid camelCase Fix "Avoid caseCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 66ba14fc62a5c89d67908f8b3b51fb6b53b9a836 Author: Ajay Singh Date: Tue Feb 20 20:27:55 2018 +0530 staging: wilc1000: rename pstrSetBeaconParam to avoid camelCase Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 51 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 26 deletions(-) commit ecf8d3d66b93fcc1f6db16dd148c63d9e3b5fffc Author: Ajay Singh Date: Tue Feb 20 20:27:54 2018 +0530 staging: wilc1000: rename Handle_SetMulticastFilter to avoid camelCase Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f53df85694c72cc73c655a70034b3b5cc9e4b1e4 Author: Ajay Singh Date: Tue Feb 20 20:27:53 2018 +0530 staging: wilc1000: rename pu32InactiveTime to avoid camelCase Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b5f9ce64618910f28ae74c9906cabea935554001 Author: Ajay Singh Date: Tue Feb 20 20:27:52 2018 +0530 staging: wilc1000: rename variables using camelCase in handle_rcvd_ntwrk_info() Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 45 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 23 deletions(-) commit 24701563ec60775a1d41e04f44ad54fa5c14959a Author: Ajay Singh Date: Tue Feb 20 20:27:51 2018 +0530 staging: wilc1000: rename ptstrJoinBssParam to avoid camelCase Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 78 +++++++++++++++---------------- 1 file changed, 39 insertions(+), 39 deletions(-) commit 07407dc79af3474262ab1d77c0fb969de482ef6d Author: Ajay Singh Date: Tue Feb 20 20:27:50 2018 +0530 staging: wilc1000: rename pu8HdnNtwrksWidVal to avoid camelCase Fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a139834ed6ce795691106e35d287226c95c75866 Author: Dan Carpenter Date: Thu Feb 22 12:15:34 2018 +0300 staging: lustre: selftest: freeing an error pointer We should just return directly if memdup_user() fails. The current code tries to free "param" which is an error pointer so it will Oops. Fixes: 2baddf262e98 ("staging: lustre: use memdup_user to allocate memory and copy from user") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/conctl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 52edc44ffbd05a3f6f6a8db2b07e2d3c6cb81db3 Author: NeilBrown Date: Tue Feb 20 13:23:38 2018 +1100 staging: lustre: socklnd: simplify ksnc_rx_iov_space ksnc_rx_iov_space is currently a union of two arrays, one of 'struct kvec', the other of 'struct bio_vec'. The 'struct bio_vec' option is never used. The array of kvec is used to read in a packet header, or to read data that needs to be skipped so as to synchronize with a packet boundary. In each case the target memory location is a virtual address, never a page, so 'struct bio_vec' is never needed. When we read into a page, different code steps up a separate array of 'struct bio_vec'. So remove the bio_vec option, and remove the union ksock_rxiovspace.. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h | 11 +---------- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 4 ++-- 2 files changed, 3 insertions(+), 12 deletions(-) commit 5955572b19f64bdaddd778079f95fb3cafaadfda Author: NeilBrown Date: Tue Feb 20 13:23:38 2018 +1100 staging: lustre: fid: perform sanity checks before commiting When fid fetches a new range from the server, it commits to it (*output = *out) *before* performing sanity checks. This looks backwards. Don't commit to a value until it has been found to be sane. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fid/fid_request.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8689a5027c7cfb8ee25318127262fbc974662d26 Author: NeilBrown Date: Tue Feb 20 13:23:38 2018 +1100 staging: lustre: fid: fix up debugfs access to ->lcs_space lcs_space can change while the lock is not held if an RPC in underway. This can be detected by seq->ls_update being set. In this case, reading or writing the value should return -EBUSY. Also, the D_INFO CDEBUG() which reports the lcs_space being updated never fires, as it tests the wrong value - ldebugfs_fid_write_common() returns 'count' on success. Finally, this return value should be returned from ldebugfs_fid_space_seq_write(), rather than always returning 'count', so that errors can be detected. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fid/lproc_fid.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 8ede253133d45d510dacfde86ba836fd301e8c06 Author: NeilBrown Date: Tue Feb 20 13:23:38 2018 +1100 staging: lustre: fid: remove seq_fid_alloc_fini() and simplify seq_fid_alloc_fini() is tiny and only called from two places in the one function. We can move both those calls earlier and merge them so only one call is needed. At that point, there is no value added by having a separate function. Also instead of using ++ and -- on ->lcs_update to toggle between 0 and 1, explicitly set to 0 or 1 as appropriate. Moving the locking earlier means that the code which updates seq->lcs_fid is now protected, so ldebugfs_fid_fid_seq_show() now cannot see a torn value. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fid/fid_request.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 40f5bd35015501c2964cb3450b52273c1ae36ba2 Author: NeilBrown Date: Tue Feb 20 13:23:38 2018 +1100 staging: lustre: fid: use wait_event_cmd() Rather than open-coding a wait event loop twice, use wait_event_cmd() to wait, dropping the spinlock over schedule(). This does require duplicating part of the wait condition, but that is just three tests on values that are in registers or in cache, so the cost is small and the increased readability is large. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fid/fid_request.c | 68 ++++++++----------------- 1 file changed, 20 insertions(+), 48 deletions(-) commit daa5611c716a6dbd234c7ebe4ed2c05eeb96b538 Author: NeilBrown Date: Tue Feb 20 13:23:38 2018 +1100 staging: lustre: fid: convert lcs_mutex to a spinlock There is only one place where this lock is held while the task might sleep - in ldebugfs_fid_space_seq_write() while ldebugfs_fid_write_common() is called. This call can easily be taken out of the locked region by asking it to parse the user data into a local variable, and then copying that variable into ->lcs_space while holding the lock. Note that ldebugfs_gid_write_common returns >0 on success, so use that to gate updating ->lcs_space. So make that change, and convert lcs_mutex to a spinlock named lcs_lock. spinlocks are slightly cheaper than mutexes and using one makes is clear that the lock is only held for a short time. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fid/fid_request.c | 24 +++++++++--------- drivers/staging/lustre/lustre/fid/lproc_fid.c | 29 ++++++++++++---------- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- 3 files changed, 29 insertions(+), 26 deletions(-) commit ef8e5dbbb09035a0c41aa47a328e6248702d4d2b Author: NeilBrown Date: Tue Feb 20 13:23:38 2018 +1100 staging: lustre: ptlrpc: list_for_each improvements. 1/ use list_for_each_entry_safe() instead of list_for_each_safe() and similar. 2/ use list_first_entry() and list_last_entry() where appropriate. 3/ When removing everything from a list, use while ((x = list_first_entry_or_null()) { as it makes the intent clear 4/ No need to take a spinlock in a structure that is about to be freed - we must have exclusive access at this stage. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/client.c | 89 ++++++++------------------ drivers/staging/lustre/lustre/ptlrpc/import.c | 34 ++++------ drivers/staging/lustre/lustre/ptlrpc/pinger.c | 8 +-- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 15 ++--- drivers/staging/lustre/lustre/ptlrpc/recover.c | 26 ++++---- drivers/staging/lustre/lustre/ptlrpc/service.c | 13 ++-- 6 files changed, 59 insertions(+), 126 deletions(-) commit 9ee15880018008194c6187d0fda99dc059c41d51 Author: NeilBrown Date: Wed Feb 21 07:42:20 2018 +1100 staging: lustre: fix assorted checkpatch errors Possibly the most interesting is the for-loop with no body. Rearranging and initializing end_dirent on each iteration of the outer while, makes the intent clearer. Reviewed-by: "Eremin, Dmitry" Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 2 +- drivers/staging/lustre/lustre/include/obd_class.h | 8 ++++---- drivers/staging/lustre/lustre/include/obd_support.h | 2 +- drivers/staging/lustre/lustre/llite/dcache.c | 2 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- drivers/staging/lustre/lustre/lov/lov_request.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 11 ++++++----- drivers/staging/lustre/lustre/ptlrpc/layout.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/recover.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/service.c | 2 +- 11 files changed, 19 insertions(+), 18 deletions(-) commit d0efa68ae779c4dcc62cd03937b09c4d9d460314 Author: NeilBrown Date: Tue Feb 20 13:23:38 2018 +1100 staging: lustre: remove phantom struct cfs_crypto_hash_desc There is no "struct cfs_crypto_hash_desc" structure. There are only pointers to this structure, which are cast back and forth to struct ahash_request. So discard cfs_crypto_hash_desc, and just use ahash_request directly. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman .../lustre/include/linux/libcfs/libcfs_crypto.h | 11 +++----- .../lustre/lnet/libcfs/linux/linux-crypto.c | 29 ++++++++++------------ drivers/staging/lustre/lustre/osc/osc_request.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 2 +- 4 files changed, 19 insertions(+), 25 deletions(-) commit c90e17185722edb75ada5775f560279ab1d32b70 Author: NeilBrown Date: Tue Feb 20 13:23:37 2018 +1100 staging: lustre: discard libcfs_kvzalloc and linux-mem.c The only interesting difference between libcfs_kvzalloc() and kvzalloc() is that the former appears to work with GFP_NOFS, which the latter gives a WARN_ON_ONCE() when that is attempted. Each libcfs_kvzalloc() should really be analysed and either converted to a kzalloc() call if the size is never more than a page, or to use GFP_KERNEL if no locks are held. If there is ever a case where locks are held and a large allocation is needed, then some other technique should be used. It might be nice to not always blindly zero pages too... For now, just convert libcfs_kvzalloc() calls to kvzalloc(), and let the warning remind us that there is work to do. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/libcfs/libcfs.h | 2 - drivers/staging/lustre/lnet/libcfs/Makefile | 1 - .../staging/lustre/lnet/libcfs/linux/linux-mem.c | 44 ---------------------- drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 4 +- drivers/staging/lustre/lustre/lov/lov_ea.c | 2 +- drivers/staging/lustre/lustre/lov/lov_io.c | 2 +- drivers/staging/lustre/lustre/lov/lov_lock.c | 2 +- drivers/staging/lustre/lustre/lov/lov_object.c | 4 +- drivers/staging/lustre/lustre/lov/lov_pack.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- .../lustre/lustre/obdclass/linux/linux-module.c | 2 +- drivers/staging/lustre/lustre/obdclass/llog.c | 4 +- .../lustre/lustre/obdclass/lustre_handles.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_null.c | 8 ++-- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 8 ++-- drivers/staging/lustre/lustre/ptlrpc/service.c | 4 +- 20 files changed, 28 insertions(+), 75 deletions(-) commit 033085ff96a1615b08e80fd4327f2608ff7408cb Author: NeilBrown Date: Tue Feb 20 13:23:37 2018 +1100 staging: lustre: improve some libcfs_kvzalloc calls. Using vmalloc with GFP_NOFS is not supported as vmalloc performs some internal allocations with GFP_KERNEL. So in cases where the size passed to libcfs_kvzalloc() is clearly at most 1 page, convert to kzalloc(). In cases where the call clearly doesn't hold any filesystem locks, convert to GFP_KERNEL. Unfortunately there are many more that are not easy to fix. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 2 +- drivers/staging/lustre/lustre/llite/file.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 2 +- drivers/staging/lustre/lustre/obdclass/llog.c | 2 +- drivers/staging/lustre/lustre/obdclass/lustre_handles.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) commit c23d6d0e54117212ed69da2a0b380187462cf0fd Author: NeilBrown Date: Tue Feb 20 13:23:37 2018 +1100 staging: lustre: discard lu_buf allocation library. This library code is unnecessarily generic, but also not generic enough. Library code that performs allocations should always take a gfp_flags argument. So discard the library and in the one file where it is used, just use kzalloc or krealloc as needed. In this context, it is clear that vmalloc is never needed. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lu_object.h | 7 --- drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- drivers/staging/lustre/lustre/obdclass/linkea.c | 16 +++-- drivers/staging/lustre/lustre/obdclass/lu_object.c | 70 ---------------------- 4 files changed, 12 insertions(+), 83 deletions(-) commit 9a7383c13044a9d67d18ffc72b5d1d8eb0c7c6d2 Author: NeilBrown Date: Tue Feb 20 13:23:37 2018 +1100 staging: lustre: discard libcfs_kvzalloc_cpt() This function is used precisely once, and is sufficiently trivial that it may as well be open-coded. Doing so helpfully highlights the similarity between the new kvzalloc_node() call and the already existing kzalloc_node() call in the same function. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/libcfs/libcfs.h | 2 -- drivers/staging/lustre/lnet/libcfs/linux/linux-mem.c | 7 ------- drivers/staging/lustre/lustre/ptlrpc/service.c | 8 ++++---- 3 files changed, 4 insertions(+), 13 deletions(-) commit 6b7936ceefa7ed1d7c0576ed9660cc6cb90d61df Author: NeilBrown Date: Tue Feb 20 13:23:37 2018 +1100 staging: lustre: make signal-blocking functions inline cfs_block_sigsinv() and cfs_restore_sigs() are now simple enough to inline them. This means we can discard linux-prim.c Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/libcfs/libcfs.h | 20 +++++-- drivers/staging/lustre/lnet/libcfs/Makefile | 2 +- .../staging/lustre/lnet/libcfs/linux/linux-prim.c | 62 ---------------------- 3 files changed, 16 insertions(+), 68 deletions(-) commit 84e07b9d0ac8728b1865b23498d746861a8ab4c2 Author: NeilBrown Date: Tue Feb 20 13:23:37 2018 +1100 staging: lustre: improve API and implementation of blocking signals. According to comment for set_current_blocked() in kernel/signal.c, changing ->blocked directly is wrong. sigprocmask() should be called instead. So change cfs_block_sigsinv() and cfs_restore_sigs() to use sigprocmask(). For consistency, change them to pass the sigset_t by reference rather than by value. Also fix cfs_block_sigsinv() so that it correctly blocks signals above 32 on a 32bit host. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/libcfs/libcfs.h | 4 ++-- .../staging/lustre/lnet/libcfs/linux/linux-prim.c | 24 +++++++--------------- drivers/staging/lustre/lustre/include/lustre_lib.h | 18 ++++++++-------- drivers/staging/lustre/lustre/llite/llite_mmap.c | 8 ++++---- 4 files changed, 22 insertions(+), 32 deletions(-) commit 99c1ffc99a570c68cef906d9763edb47b316ea1a Author: NeilBrown Date: Tue Feb 20 13:23:37 2018 +1100 staging: lustre: simplify linux-prim.c cfs_block_sigs() is never used. cfs_clear_sigpending() is never used. cfs_block_allsigs() is no longer used. So those three functions can go. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/libcfs/libcfs.h | 3 -- .../staging/lustre/lnet/libcfs/linux/linux-prim.c | 41 ---------------------- 2 files changed, 44 deletions(-) commit 2a4b68812580f407493d2fbe4d374aaac413dd48 Author: NeilBrown Date: Tue Feb 20 13:23:37 2018 +1100 staging: lustre: lnet: remove cfs_block_allsigs calls. Both places that cfs_block_allsigs() is used here, the goal is to turn an interruptible wait into an uninterruptible way. So instead of blocking the signals, change TASK_INTERRUPTIBLE to TASK_NOLOAD. In each case, no other functions called while signals are blocked will sleep - just the one that has been fixed. In one case, an extra 'interruptible' flag needs to be passed down so the waiting decision can be made at the right place. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/api.h | 1 + drivers/staging/lustre/lnet/lnet/api-ni.c | 15 +++------------ drivers/staging/lustre/lnet/lnet/lib-eq.c | 10 +++++++--- 3 files changed, 11 insertions(+), 15 deletions(-) commit 1b2dad1459e480028a2714439048d8a634132857 Author: NeilBrown Date: Tue Feb 20 13:23:37 2018 +1100 staging: lustre: remove unnecessary cfs_block_allsigs() calls Threads started by kthread_run() ignore all signals, as kthreadd() calls ignore_signals(), and this is inherited by all children. So there is no need to call cfs_block_allsigs() in functions that are only run from kthread_run(). Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 6 ------ drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 6 ------ drivers/staging/lustre/lnet/lnet/acceptor.c | 2 -- drivers/staging/lustre/lnet/lnet/router.c | 2 -- drivers/staging/lustre/lnet/selftest/timer.c | 2 -- 5 files changed, 18 deletions(-) commit 37d3b407dc14a13ec8bba3a4d7737c92f996e9c0 Author: NeilBrown Date: Tue Feb 20 13:23:37 2018 +1100 staging: lustre: remove linux-curproc.c The only functionality remaining here is cfs_curproc_cap_pack(), and it can be trivially implemented as an inline in curproc.h. So do that and remove the file. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/libcfs/curproc.h | 6 +- drivers/staging/lustre/lnet/libcfs/Makefile | 1 - .../lustre/lnet/libcfs/linux/linux-curproc.c | 78 ---------------------- 3 files changed, 5 insertions(+), 80 deletions(-) commit cc738c1a69da27be8ff7885b4069fa02e45c75c1 Author: NeilBrown Date: Tue Feb 20 13:23:37 2018 +1100 staging: lustre: opencode cfs_cap_{raise, lower, raised} Each of these functions is used precisely once, so having a separate exported function seems like overkill. cfs_cap_raised() is trivial - one line. cfs_cap_raise() and cfs_cap_lower() are used as a pair which is more effectively implemented with override_cred() / revert_creds(). Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/libcfs/curproc.h | 3 --- .../lustre/lnet/libcfs/linux/linux-curproc.c | 30 ---------------------- drivers/staging/lustre/lustre/obdclass/llog.c | 18 ++++++++----- 3 files changed, 12 insertions(+), 39 deletions(-) commit 5ebaa2d14850205e44757c4d5fdd4097712d01ef Author: NeilBrown Date: Tue Feb 20 13:23:37 2018 +1100 staging: lustre: replace all CFS_CAP_* macros with CAP_* Lustre defines a few CFS_CAP_* macros which are exactly the same as the corresponding CAP_* macro, with one exception. CFS_CAP_SYS_BOOT is 23 CAP_SYS_BOOT is 22. CFS_CAP_SYS_BOOT is only used through CFS_CAP_FS_MASK and causes capability 23 (CAP_SYS_NICE) to be dropped in certain circumstances. It is probable that the intention was to drop CAP_SYS_BOOT, and this is what is now done. CFS_CAP_CHOWN_MASK and CFS_CAP_SYS_RESOURCE_MASK are never used, so they have been removed. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/libcfs/curproc.h | 28 +++++++--------------- drivers/staging/lustre/lustre/include/lustre_sec.h | 3 --- drivers/staging/lustre/lustre/llite/dir.c | 8 +++---- drivers/staging/lustre/lustre/llite/file.c | 6 ++--- drivers/staging/lustre/lustre/llite/llite_lib.c | 4 ++-- drivers/staging/lustre/lustre/llite/xattr.c | 2 +- .../lustre/lustre/obdclass/linux/linux-module.c | 2 +- drivers/staging/lustre/lustre/obdclass/llog.c | 6 ++--- .../staging/lustre/lustre/obdecho/echo_client.c | 8 +++---- drivers/staging/lustre/lustre/osc/osc_cache.c | 4 ++-- drivers/staging/lustre/lustre/osc/osc_page.c | 2 +- 11 files changed, 30 insertions(+), 43 deletions(-) commit f23ccf8630b7917d8fd4442d842d2ee2f62e36c2 Author: Christopher Diaz Riveros Date: Tue Feb 20 11:37:22 2018 -0500 staging: rtl8188eu: Remove unneeded cast Fix Coccinelle alert: drivers/staging//rtl8188eu/os_dep/usb_intf.c:336:13-27: WARNING: casting value returned by memory allocation function to (struct adapter *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Diaz Riveros Acked-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2bd27b932ac23a423a72d17dfeb247b131521e22 Author: Christopher Diaz Riveros Date: Tue Feb 20 11:35:53 2018 -0500 staging: emxx_udc: Remove unneeded cast Fix Coccinelle alert: drivers/staging//emxx_udc/emxx_udc.c:2689:19-21: WARNING: casting value returned by memory allocation function to (u8 *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Diaz Riveros Signed-off-by: Greg Kroah-Hartman drivers/staging/emxx_udc/emxx_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b6c7a347d5655efcbea905a6d02e9f670cf365a Author: Christopher Diaz Riveros Date: Tue Feb 20 11:33:54 2018 -0500 staging: rtl8723bs: Remove unneeded cast Fix Coccinelle alert: drivers/staging//rtl8723bs/os_dep/sdio_intf.c:340:13-27: WARNING: casting value returned by memory allocation function to (struct adapter *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Diaz Riveros Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5841b903371e830fb5b75dc917998277ca7d4ee6 Author: Christopher Diaz Riveros Date: Tue Feb 20 11:30:33 2018 -0500 staging: net: netlogic: Remove unneeded cast Fix Coccinelle alert: drivers/staging//netlogic/xlr_net.c:996:12-30: WARNING: casting value returned by memory allocation function to (struct xlr_adapter *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Diaz Riveros Signed-off-by: Greg Kroah-Hartman drivers/staging/netlogic/xlr_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 444634f5ed6f0179cd63ff09bea62c03963ad0f9 Author: Quytelda Kahja Date: Mon Feb 19 22:53:04 2018 -0800 Staging: bcm2048: Fix function argument alignment in radio-bcm2048.c. Fix a coding style problem. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/media/bcm2048/radio-bcm2048.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit b8ec759e6f1c6da0418238df066a0f1ef8fd2075 Author: Lionel Landwerlin Date: Wed Feb 21 20:49:02 2018 +0000 drm/i915/hsw: add missing disabled EUs registers reads It turns out that HSW has a register that tells us how many EUs are disabled per half-slice (roughly a similar notion to subslice). We didn't read those registers so far as most userspace drivers didn't need those values prior to Gen8, but an internal library would like to have access to this. Since we already have the getparam interface, there is no harm in exposing this. v2: Rename bits value (Joonas) v3: s/GEM_BUG_ON/MISSING_CASE/ (Joonas) v4: s/GEM_BUG_ON/MISSING_CASE/ again... (Lionel) Signed-off-by: Lionel Landwerlin Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180221204902.23084-1-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/i915_reg.h | 7 ++++ drivers/gpu/drm/i915/intel_device_info.c | 57 +++++++++++++++++++++++++++++++- 2 files changed, 63 insertions(+), 1 deletion(-) commit b6520468c4078ca25c0cda43e3e543112d87c98a Author: Quytelda Kahja Date: Mon Feb 19 22:35:38 2018 -0800 Staging: ks7010: hostif: Convert the ps_confirm_wait_inc() macro to a real function. Convert the unsafe macro into an inline function. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e4281f385b28d716493f6666db13e61849d6f798 Author: Quytelda Kahja Date: Mon Feb 19 22:35:37 2018 -0800 Staging: ks7010: hostif: Convert SME queue macros to real functions. Convert the unsafe macros into inline functions. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 2ec999e5545598df373dd00d32527bb11e7070c0 Author: Quytelda Kahja Date: Mon Feb 19 22:35:36 2018 -0800 Staging: ks7010: sdio: Convert RX/TX queue macros into real functions. Convert the unsafe macros into inline functions. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 46 ++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 13 deletions(-) commit 1646ff6c6618b04929823f8bfe9b3e505e28fe0e Author: Dafna Hirschfeld Date: Thu Feb 22 09:10:12 2018 +0200 staging: wilc1000: remove 'if' on field address Remove 'if' statements testing struct's field address. Since such statements always return true, they are redundant. Signed-off-by: Dafna Hirschfeld Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/linux_wlan.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit e69a0500f23dc643bf974e04386c6f1a427c6448 Author: Valentin Vidic Date: Tue Feb 20 15:13:07 2018 +0100 staging: pi433: fix CamelCase for addressFiltering Fixes checkpatch warning: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/pi433_if.c | 4 ++-- drivers/staging/pi433/pi433_if.h | 2 +- drivers/staging/pi433/rf69.c | 4 ++-- drivers/staging/pi433/rf69.h | 2 +- drivers/staging/pi433/rf69_enum.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit b52a5b79367ccbe4f1c9d89e21e4405e7fa0e6dc Author: Valentin Vidic Date: Tue Feb 20 15:03:30 2018 +0100 staging: pi433: fix CamelCase for thresholdDecrement Fixes checkpatch warning: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/Documentation/pi433.txt | 2 +- drivers/staging/pi433/pi433_if.h | 2 +- drivers/staging/pi433/rf69.c | 4 ++-- drivers/staging/pi433/rf69.h | 2 +- drivers/staging/pi433/rf69_enum.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit 6252016c8697c4597cd16628c2d3081b8d4a22e6 Author: Valentin Vidic Date: Tue Feb 20 14:56:45 2018 +0100 staging: pi433: fix CamelCase for txStartCondition Fixes checkpatch warning: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/pi433_if.h | 2 +- drivers/staging/pi433/rf69.c | 4 ++-- drivers/staging/pi433/rf69.h | 2 +- drivers/staging/pi433/rf69_enum.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 38614ed80220f74c08333fb5e9b2c98a2fe9cacc Author: Eisha Chen-yen-su Date: Tue Feb 20 10:05:25 2018 +0100 staging: comedi: Use '"%s:", __func__' instead of function name Replace all occurrences of functions' names in strings by a reference to __func__, to improve robustness. Problem found with checkpatch. Signed-off-by: Eisha Chen-yen-su Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_mio_common.c | 8 +++++--- drivers/staging/comedi/drivers/quatech_daqp_cs.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) commit 4f7b006ff1f8f31f27d7591fb5a768e8339fac31 Author: Eisha Chen-yen-su Date: Tue Feb 20 10:05:24 2018 +0100 staging: comedi: Remove a "tracing" call Remove a "tracing" call as it is not needed anymore because there is an in-kernel function for that. Signed-off-by: Eisha Chen-yen-su Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 1 - 1 file changed, 1 deletion(-) commit 81286d3e31b71c94207c6ccd0c486fdb2f93eda2 Author: Yisheng Xie Date: Thu Feb 22 18:58:40 2018 +0800 staging: android: ion: Remove check of idev->debug_root We will go on initial idev if failed to create debug_root, and it does not matter to check the return value of this debugfs call, just remove it. Signed-off-by: Yisheng Xie Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 3 --- 1 file changed, 3 deletions(-) commit 6a1b0b33cb174ed17f35b2cb6e5b9ee15f25e580 Author: Yisheng Xie Date: Thu Feb 22 18:58:39 2018 +0800 staging: android: ion: Remove check of debug_file There's no need to check the return value of debug_file for it is just a debugfs and we will go on the following process if we failed to create debug_file. So just remove it. Signed-off-by: Yisheng Xie Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 25f72f9ed88d5be86c92432fc779e2725e3506cd Author: weiping zhang Date: Mon Jan 29 23:48:09 2018 +0800 perf cgroup: Simplify arguments when tracking multiple events When using -G with one cgroup and -e with multiple events, only the first event gets the correct cgroup setting, all events from the second onwards will track system-wide events. If the user wants to track multiple events for a specific cgroup, the user must give parameters like the following: $ perf stat -e e1 -e e2 -e e3 -G test,test,test This patch simplify this case, just type one cgroup: $ perf stat -e e1 -e e2 -e e3 -G test $ mkdir -p /sys/fs/cgroup/perf_event/empty_cgroup $ perf stat -e cycles -e cache-misses -a -I 1000 -G empty_cgroup Before: 1.001007226 cycles empty_cgroup 1.001007226 7,506 cache-misses After: 1.000834097 cycles empty_cgroup 1.000834097 cache-misses empty_cgroup Signed-off-by: weiping zhang Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180129154805.GA6284@localhost.didichuxing.com [ Improved the doc text a bit, providing an example for cgroup + system wide counting ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 6 +++++- tools/perf/Documentation/perf-stat.txt | 6 +++++- tools/perf/util/cgroup.c | 17 ++++++++++++++++- 3 files changed, 26 insertions(+), 3 deletions(-) commit ce3e7f0ee9a3d0c0ad5a88e21b7f8cdad3f2c156 Author: Colin Ian King Date: Thu Feb 8 14:24:37 2018 +0000 pinctrl: ocelot: make function ocelot_pinctrl_probe static The function ocelot_pinctrl_probe is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: drivers/pinctrl/pinctrl-ocelot.c:465:5: warning: symbol 'ocelot_pinctrl_probe' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-ocelot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f55fed3c98ced66fff21a41e57fd1784f4fd723 Author: Jonathan Neuschäfer Date: Fri Feb 9 13:07:29 2018 +0100 gpio: Add GPIO driver for Nintendo Wii The Nintendo Wii's chipset (called "Hollywood") has a GPIO controller that supports a configurable number of pins (up to 32), interrupts, and some special mechanisms to share the controller between the system's security processor (an ARM926) and the PowerPC CPU. Pin multiplexing is not supported. This patch adds a basic driver for this GPIO controller. Interrupt support will come in a later patch. This patch is based on code developed by Albert Herranz and the GameCube Linux Team, file arch/powerpc/platforms/embedded6xx/hlwd-gpio.c, available at https://github.com/DeltaResero/GC-Wii-Linux-Kernels, but has grown quite dissimilar. v3: - Do some style cleanups, as suggest by Andy Shevchenko v2: - Change hlwd_gpio_driver.driver.name to "gpio-hlwd" to match the filename (was "hlwd_gpio") - Remove unnecessary include of linux/of_gpio.h, as suggested by Linus Walleij. - Add struct device pointer to context struct to make it possible to use dev_info(hlwd->dev, "..."), as suggested by Linus Walleij - Use the GPIO_GENERIC library to reduce code size, as suggested by Linus Walleij - Use iowrite32be instead of __raw_writel for big-endian MMIO access, as suggested by Linus Walleij - Remove commit message paragraph suggesting to diff against the original driver, because it's so different now Signed-off-by: Jonathan Neuschäfer Cc: Albert Herranz Reviewed-by: Segher Boessenkool Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 9 ++++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-hlwd.c | 115 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 125 insertions(+) commit a98d90e7d588045716c3c85d63f93dc3f15a079b Author: Dave Stevenson Date: Tue Feb 20 14:19:33 2018 +0200 gpio: raspberrypi-exp: Driver for RPi3 GPIO expander via mailbox service Pi3 and Compute Module 3 have a GPIO expander that the VPU communicates with. There is a mailbox service that now allows control of this expander, so add a kernel driver that can make use of it. Reviewed-by: Stefan Wahren Signed-off-by: Dave Stevenson Signed-off-by: Baruch Siach Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 9 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-raspberrypi-exp.c | 252 ++++++++++++++++++++++++++++++++++++ 3 files changed, 262 insertions(+) commit 9777d8099a4a9df1625b4caaee1388c0158478c5 Author: Baruch Siach Date: Tue Feb 20 14:19:32 2018 +0200 dt-bindings: gpio: add raspberry pi GPIO expander binding The Raspberry Pi 3 GPIO expander is controlled by the VC4 firmware over I2C. The firmware mailbox interface allows the ARM core to control the GPIO lines. Signed-off-by: Baruch Siach Reviewed-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/gpio/raspberrypi,firmware-gpio.txt | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 08af112e79cab22f318ca0ad1a48187eee5ac2f0 Author: Baruch Siach Date: Tue Feb 20 14:19:31 2018 +0200 soc: bcm2835: sync firmware properties with downstream Add latest firmware property tags from the latest Raspberry Pi downstream kernel. This is needed for the GPIO tags, so we can control the GPIO multiplexor lines. Acked-by: Stefan Wahren Signed-off-by: Baruch Siach Signed-off-by: Linus Walleij include/soc/bcm2835/raspberrypi-firmware.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit d8757f4c59c9fafe5a1ce75a237164f268904b18 Author: Boris Brezillon Date: Fri Feb 16 11:44:49 2018 +0100 Update Boris Brezillon email address Free Electrons is now Bootlin. Signed-off-by: Boris Brezillon .mailmap | 6 +++--- MAINTAINERS | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) commit 645be665a5932829239eea151c042dd5a6481e62 Author: Miquel Raynal Date: Mon Feb 19 23:57:59 2018 +0100 MAINTAINERS: Update email address for Miquel Raynal Free Electrons is now Bootlin. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon .mailmap | 1 + MAINTAINERS | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit f0b3bdbd5c63c3f69f3b6a869355c676d22fd348 Author: Fabio Estevam Date: Wed Feb 21 14:57:33 2018 -0300 ASoC: soc-generic-dmaengine-pcm: Add a DMA debugfs_prefix entry After the conversion from platform to component the following warnings are seen: fsl-ssi-dai 2028000.ssi: ASoC: Failed to create component debugfs directory fsl-spdif-dai 2004000.spdif: ASoC: Failed to create component debugfs directory As explained by Mark Brown: "It's a legit warning - we shouldn't really be creating two components for the same device. However this is a bit of a corner case as it's the dmaengine platform driver which is kind of a virtual device, it's not really the device that we use with DMA that's being represented but rather the link between that and the DMA controller." Disambiguate the DMA component name by adding a "dma" debugfs_prefix entry. Suggested-by: Mark Brown Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/soc-generic-dmaengine-pcm.c | 3 +++ 1 file changed, 3 insertions(+) commit 24745dca8e7e17c20b6cf2bfb94a9acd09dce1b9 Author: Katsuhiro Suzuki Date: Thu Feb 22 08:42:32 2018 +0900 ASoC: uniphier: evea: fix lisence comment style This patch changes lisence comment style from C to C++. And use SPDX instead of boiler plate of GPLv2, as same as other audio codec drivers. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown sound/soc/uniphier/evea.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit 6a7676852ec9ed1ea80e262076c7a915923108c3 Author: James Hogan Date: Tue Oct 24 16:35:09 2017 +0100 docs: Remove remaining references to metag Remove any remaining references to the Meta architecture in Documentation/, primarily from Documentation/features/. Signed-off-by: James Hogan Cc: Jonathan Corbet Cc: linux-metag@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/dev-tools/kmemleak.rst | 2 +- Documentation/features/core/BPF-JIT/arch-support.txt | 1 - Documentation/features/core/generic-idle-thread/arch-support.txt | 1 - Documentation/features/core/jump-labels/arch-support.txt | 1 - Documentation/features/core/tracehook/arch-support.txt | 1 - Documentation/features/debug/KASAN/arch-support.txt | 1 - Documentation/features/debug/gcov-profile-all/arch-support.txt | 1 - Documentation/features/debug/kgdb/arch-support.txt | 1 - Documentation/features/debug/kprobes-on-ftrace/arch-support.txt | 1 - Documentation/features/debug/kprobes/arch-support.txt | 1 - Documentation/features/debug/kretprobes/arch-support.txt | 1 - Documentation/features/debug/optprobes/arch-support.txt | 1 - Documentation/features/debug/stackprotector/arch-support.txt | 1 - Documentation/features/debug/uprobes/arch-support.txt | 1 - Documentation/features/debug/user-ret-profiler/arch-support.txt | 1 - Documentation/features/io/dma-api-debug/arch-support.txt | 1 - Documentation/features/io/dma-contiguous/arch-support.txt | 1 - Documentation/features/io/sg-chain/arch-support.txt | 1 - Documentation/features/lib/strncasecmp/arch-support.txt | 1 - Documentation/features/locking/cmpxchg-local/arch-support.txt | 1 - Documentation/features/locking/lockdep/arch-support.txt | 1 - Documentation/features/locking/queued-rwlocks/arch-support.txt | 1 - Documentation/features/locking/queued-spinlocks/arch-support.txt | 1 - Documentation/features/locking/rwsem-optimized/arch-support.txt | 1 - Documentation/features/perf/kprobes-event/arch-support.txt | 1 - Documentation/features/perf/perf-regs/arch-support.txt | 1 - Documentation/features/perf/perf-stackdump/arch-support.txt | 1 - Documentation/features/sched/membarrier-sync-core/arch-support.txt | 1 - Documentation/features/sched/numa-balancing/arch-support.txt | 1 - Documentation/features/seccomp/seccomp-filter/arch-support.txt | 1 - Documentation/features/time/arch-tick-broadcast/arch-support.txt | 1 - Documentation/features/time/clockevents/arch-support.txt | 1 - Documentation/features/time/context-tracking/arch-support.txt | 1 - Documentation/features/time/irq-time-acct/arch-support.txt | 1 - Documentation/features/time/modern-timekeeping/arch-support.txt | 1 - Documentation/features/time/virt-cpuacct/arch-support.txt | 1 - Documentation/features/vm/ELF-ASLR/arch-support.txt | 1 - Documentation/features/vm/PG_uncached/arch-support.txt | 1 - Documentation/features/vm/THP/arch-support.txt | 1 - Documentation/features/vm/TLB/arch-support.txt | 1 - Documentation/features/vm/huge-vmap/arch-support.txt | 1 - Documentation/features/vm/ioremap_prot/arch-support.txt | 1 - Documentation/features/vm/numa-memblock/arch-support.txt | 1 - Documentation/features/vm/pte_special/arch-support.txt | 1 - 44 files changed, 1 insertion(+), 44 deletions(-) commit 298910619d13e9c04680e923fef1e5bbc1790d10 Author: James Hogan Date: Tue Oct 24 13:14:50 2017 +0100 docs: Remove metag docs Now that arch/metag/ has been removed, remove Meta architecture specific documentation from the Documentation/ directory. Signed-off-by: James Hogan Cc: Jonathan Corbet Cc: linux-metag@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/00-INDEX | 2 - Documentation/admin-guide/kernel-parameters.txt | 4 - Documentation/devicetree/bindings/metag/meta.txt | 30 --- Documentation/metag/00-INDEX | 4 - Documentation/metag/kernel-ABI.txt | 256 ----------------------- 5 files changed, 296 deletions(-) commit bb6fb6dfcc17cddac11ac295861f7608194447a7 Author: James Hogan Date: Tue Oct 24 13:07:54 2017 +0100 metag: Remove arch/metag/ The earliest Meta architecture port of Linux I have a record of was an import of a Meta port of Linux v2.4.1 in February 2004, which was worked on significantly over the next few years by Graham Whaley, Will Newton, Matt Fleming, myself and others. Eventually the port was merged into mainline in v3.9 in March 2013, not long after Imagination Technologies bought MIPS Technologies and shifted its CPU focus over to the MIPS architecture. As a result, though the port was maintained for a while, kept on life support for a while longer, and useful for testing a few specific drivers for which I don't have ready access to the equivalent MIPS hardware, it is now essentially dead with no users. It is also stuck using an out-of-tree toolchain based on GCC 4.2.4 which is no longer maintained, now struggles to build modern kernels due to toolchain bugs, and doesn't itself build with a modern GCC. The latest buildroot port is still using an old uClibc snapshot which is no longer served, and the latest uClibc doesn't build with GCC 4.2.4. So lets call it a day and drop the Meta architecture port from the kernel. RIP Meta. Signed-off-by: James Hogan Link: https://lkml.kernel.org/r/95906b76-6ce1-3f84-eaba-c29b4ae952eb@roeck-us.net Reviewed-by: Guenter Roeck Acked-by: Peter Zijlstra (Intel) Acked-by: Graham Whaley Cc: linux-metag@vger.kernel.org arch/metag/Kconfig | 287 ------ arch/metag/Kconfig.debug | 34 - arch/metag/Kconfig.soc | 69 -- arch/metag/Makefile | 89 -- arch/metag/boot/.gitignore | 3 - arch/metag/boot/Makefile | 68 -- arch/metag/boot/dts/Makefile | 16 - arch/metag/boot/dts/skeleton.dts | 10 - arch/metag/boot/dts/skeleton.dtsi | 15 - arch/metag/boot/dts/tz1090.dtsi | 108 --- arch/metag/boot/dts/tz1090_generic.dts | 10 - arch/metag/configs/meta1_defconfig | 39 - arch/metag/configs/meta2_defconfig | 40 - arch/metag/configs/meta2_smp_defconfig | 41 - arch/metag/configs/tz1090_defconfig | 42 - arch/metag/include/asm/Kbuild | 33 - arch/metag/include/asm/atomic.h | 49 -- arch/metag/include/asm/atomic_lnkget.h | 204 ----- arch/metag/include/asm/atomic_lock1.h | 157 ---- arch/metag/include/asm/barrier.h | 85 -- arch/metag/include/asm/bitops.h | 127 --- arch/metag/include/asm/bug.h | 13 - arch/metag/include/asm/cache.h | 24 - arch/metag/include/asm/cacheflush.h | 251 ------ arch/metag/include/asm/cachepart.h | 43 - arch/metag/include/asm/checksum.h | 93 -- arch/metag/include/asm/clock.h | 59 -- arch/metag/include/asm/cmpxchg.h | 64 -- arch/metag/include/asm/cmpxchg_irq.h | 43 - arch/metag/include/asm/cmpxchg_lnkget.h | 87 -- arch/metag/include/asm/cmpxchg_lock1.h | 49 -- arch/metag/include/asm/core_reg.h | 36 - arch/metag/include/asm/cpu.h | 15 - arch/metag/include/asm/da.h | 44 - arch/metag/include/asm/delay.h | 30 - arch/metag/include/asm/div64.h | 13 - arch/metag/include/asm/dma-mapping.h | 12 - arch/metag/include/asm/elf.h | 126 --- arch/metag/include/asm/fixmap.h | 69 -- arch/metag/include/asm/ftrace.h | 24 - arch/metag/include/asm/global_lock.h | 101 --- arch/metag/include/asm/highmem.h | 62 -- arch/metag/include/asm/hugetlb.h | 75 -- arch/metag/include/asm/hwthread.h | 41 - arch/metag/include/asm/io.h | 170 ---- arch/metag/include/asm/irq.h | 38 - arch/metag/include/asm/irqflags.h | 94 -- arch/metag/include/asm/l2cache.h | 259 ------ arch/metag/include/asm/linkage.h | 8 - arch/metag/include/asm/mach/arch.h | 86 -- arch/metag/include/asm/metag_isa.h | 81 -- arch/metag/include/asm/metag_mem.h | 1109 ----------------------- arch/metag/include/asm/metag_regs.h | 1184 ------------------------- arch/metag/include/asm/mman.h | 12 - arch/metag/include/asm/mmu.h | 78 -- arch/metag/include/asm/mmu_context.h | 115 --- arch/metag/include/asm/mmzone.h | 43 - arch/metag/include/asm/module.h | 38 - arch/metag/include/asm/page.h | 129 --- arch/metag/include/asm/perf_event.h | 4 - arch/metag/include/asm/pgalloc.h | 83 -- arch/metag/include/asm/pgtable-bits.h | 105 --- arch/metag/include/asm/pgtable.h | 270 ------ arch/metag/include/asm/processor.h | 201 ----- arch/metag/include/asm/ptrace.h | 61 -- arch/metag/include/asm/setup.h | 10 - arch/metag/include/asm/smp.h | 28 - arch/metag/include/asm/sparsemem.h | 14 - arch/metag/include/asm/spinlock.h | 19 - arch/metag/include/asm/spinlock_lnkget.h | 213 ----- arch/metag/include/asm/spinlock_lock1.h | 165 ---- arch/metag/include/asm/spinlock_types.h | 21 - arch/metag/include/asm/stacktrace.h | 21 - arch/metag/include/asm/string.h | 14 - arch/metag/include/asm/switch.h | 21 - arch/metag/include/asm/syscall.h | 104 --- arch/metag/include/asm/syscalls.h | 40 - arch/metag/include/asm/tbx.h | 1420 ------------------------------ arch/metag/include/asm/tcm.h | 31 - arch/metag/include/asm/thread_info.h | 141 --- arch/metag/include/asm/tlb.h | 37 - arch/metag/include/asm/tlbflush.h | 78 -- arch/metag/include/asm/topology.h | 28 - arch/metag/include/asm/traps.h | 48 - arch/metag/include/asm/uaccess.h | 213 ----- arch/metag/include/asm/unistd.h | 12 - arch/metag/include/asm/user_gateway.h | 45 - arch/metag/include/uapi/asm/Kbuild | 31 - arch/metag/include/uapi/asm/byteorder.h | 2 - arch/metag/include/uapi/asm/ech.h | 16 - arch/metag/include/uapi/asm/ptrace.h | 114 --- arch/metag/include/uapi/asm/sigcontext.h | 32 - arch/metag/include/uapi/asm/siginfo.h | 16 - arch/metag/include/uapi/asm/swab.h | 27 - arch/metag/include/uapi/asm/unistd.h | 24 - arch/metag/kernel/.gitignore | 1 - arch/metag/kernel/Makefile | 40 - arch/metag/kernel/asm-offsets.c | 15 - arch/metag/kernel/cachepart.c | 132 --- arch/metag/kernel/clock.c | 110 --- arch/metag/kernel/core_reg.c | 118 --- arch/metag/kernel/da.c | 25 - arch/metag/kernel/devtree.c | 57 -- arch/metag/kernel/dma.c | 588 ------------- arch/metag/kernel/ftrace.c | 121 --- arch/metag/kernel/ftrace_stub.S | 62 -- arch/metag/kernel/head.S | 66 -- arch/metag/kernel/irq.c | 293 ------ arch/metag/kernel/kick.c | 110 --- arch/metag/kernel/machines.c | 21 - arch/metag/kernel/metag_ksyms.c | 55 -- arch/metag/kernel/module.c | 284 ------ arch/metag/kernel/perf/Makefile | 3 - arch/metag/kernel/perf/perf_event.c | 879 ------------------ arch/metag/kernel/perf/perf_event.h | 106 --- arch/metag/kernel/perf_callchain.c | 97 -- arch/metag/kernel/process.c | 448 ---------- arch/metag/kernel/ptrace.c | 427 --------- arch/metag/kernel/setup.c | 622 ------------- arch/metag/kernel/signal.c | 336 ------- arch/metag/kernel/smp.c | 668 -------------- arch/metag/kernel/stacktrace.c | 187 ---- arch/metag/kernel/sys_metag.c | 181 ---- arch/metag/kernel/tbiunexp.S | 23 - arch/metag/kernel/tcm.c | 152 ---- arch/metag/kernel/time.c | 26 - arch/metag/kernel/topology.c | 78 -- arch/metag/kernel/traps.c | 992 --------------------- arch/metag/kernel/user_gateway.S | 98 --- arch/metag/kernel/vmlinux.lds.S | 74 -- arch/metag/lib/Makefile | 23 - arch/metag/lib/ashldi3.S | 34 - arch/metag/lib/ashrdi3.S | 34 - arch/metag/lib/checksum.c | 167 ---- arch/metag/lib/clear_page.S | 18 - arch/metag/lib/cmpdi2.S | 33 - arch/metag/lib/copy_page.S | 21 - arch/metag/lib/delay.c | 57 -- arch/metag/lib/div64.S | 109 --- arch/metag/lib/divsi3.S | 101 --- arch/metag/lib/ip_fast_csum.S | 33 - arch/metag/lib/lshrdi3.S | 34 - arch/metag/lib/memcpy.S | 186 ---- arch/metag/lib/memmove.S | 346 -------- arch/metag/lib/memset.S | 87 -- arch/metag/lib/modsi3.S | 39 - arch/metag/lib/muldi3.S | 45 - arch/metag/lib/ucmpdi2.S | 28 - arch/metag/lib/usercopy.c | 1257 -------------------------- arch/metag/mm/Kconfig | 147 ---- arch/metag/mm/Makefile | 20 - arch/metag/mm/cache.c | 521 ----------- arch/metag/mm/extable.c | 15 - arch/metag/mm/fault.c | 247 ------ arch/metag/mm/highmem.c | 122 --- arch/metag/mm/hugetlbpage.c | 251 ------ arch/metag/mm/init.c | 408 --------- arch/metag/mm/ioremap.c | 90 -- arch/metag/mm/l2cache.c | 193 ---- arch/metag/mm/maccess.c | 69 -- arch/metag/mm/mmu-meta1.c | 157 ---- arch/metag/mm/mmu-meta2.c | 208 ----- arch/metag/mm/numa.c | 82 -- arch/metag/oprofile/Makefile | 18 - arch/metag/oprofile/backtrace.c | 63 -- arch/metag/oprofile/backtrace.h | 7 - arch/metag/oprofile/common.c | 66 -- arch/metag/tbx/Makefile | 22 - arch/metag/tbx/tbicore.S | 136 --- arch/metag/tbx/tbictx.S | 366 -------- arch/metag/tbx/tbictxfpu.S | 190 ---- arch/metag/tbx/tbidefr.S | 175 ---- arch/metag/tbx/tbidspram.S | 161 ---- arch/metag/tbx/tbilogf.S | 48 - arch/metag/tbx/tbipcx.S | 451 ---------- arch/metag/tbx/tbiroot.S | 87 -- arch/metag/tbx/tbisoft.S | 237 ----- arch/metag/tbx/tbistring.c | 114 --- arch/metag/tbx/tbitimer.S | 207 ----- 179 files changed, 25078 deletions(-) commit d931ba53e001cd3cea909070bf3c971ed217fa7d Author: Anson Huang Date: Tue Jan 9 17:52:05 2018 +0800 clk: imx: imx7d: add the snvs clock According to the i.MX7D Reference Manual, SNVS block has a clock gate, accessing SNVS block would need this clock gate to be enabled, add it into clock tree so that SNVS module driver can operate this clock gate. Signed-off-by: Anson Huang Acked-by: Dong Aisheng Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx7d.c | 1 + include/dt-bindings/clock/imx7d-clock.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 80d893501bb6b28d838b8d45ec47ed0de8482736 Author: Tvrtko Ursulin Date: Tue Feb 20 17:37:53 2018 +0200 drm/i915/icl: Show interrupt registers in debugfs Show GEN11 specific interrupt registers in debugfs v2: Update for POR changes. (Daniele Ceraolo Spurio) v3: get runtime pm ref. unify common parts with gen8 (Daniele) Cc: Ceraolo Spurio, Daniele Signed-off-by: Tvrtko Ursulin Signed-off-by: Rodrigo Vivi Signed-off-by: Mika Kuoppala Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20180220153755.13509-2-mika.kuoppala@linux.intel.com drivers/gpu/drm/i915/i915_debugfs.c | 139 ++++++++++++++++++++++++------------ 1 file changed, 95 insertions(+), 44 deletions(-) commit d55cb4fa2cf0105bfb16b60a2846737b91fdc173 Author: Paulo Zanoni Date: Tue Feb 20 17:37:52 2018 +0200 drm/i915/icl: Add the ICL PCI IDs This is the current PCI ID list in our documentation. Let's leave the _gt#_ part out for now since our current documentation is not 100% clear and we don't need this info now anyway. v2: Use the new ICL_11 naming (Kelvin Gardiner). v3: Latest IDs as per BSpec (Oscar). v4: Make it compile (Paulo). v5: Remove comments (Lucas). v6: Multile rebases (Paulo). v7: Rebase (Mika) Reviewed-by: Anuj Phogat (v1) Signed-off-by: Paulo Zanoni Signed-off-by: Oscar Mateo Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi Signed-off-by: Mika Kuoppala Reviewed-by: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20180220153755.13509-1-mika.kuoppala@linux.intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + include/drm/i915_pciids.h | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit e084039b5840ee6822b65167766cdfc47536964e Author: Chris Wilson Date: Wed Feb 21 15:23:01 2018 +0000 drm/i915/execlists: Move the GEM_BUG_ON context matches CSB later Print out the current request/context before doing the GEM_BUG_ON, so that we can inspect the values in the ftrace. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180221152301.9178-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 65cb8c0f040bd791b9adb761be2710adcd9df00f Author: Chris Wilson Date: Wed Feb 21 15:15:53 2018 +0000 drm/i915/execlists: Add a GEM_TRACE to show when the context is completed Include a GEM_TRACE to show when the context is complete and we advance the ELSP port. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180221151553.9054-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 3 +++ 1 file changed, 3 insertions(+) commit 756a08c360ee68d33c7c5ac6f3dba3264e5529b7 Author: Anson Huang Date: Wed Jan 24 22:31:21 2018 +0800 clk: imx: imx6sx: update cko mux options According to latest reference manual (Rev.2, 9/2017), previous CKO1/2's mux options are incorrect, update them. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx6sx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 8d35a9dc42448c4f3cd208f8f4d5c5e72af83309 Author: Souptick Joarder Date: Thu Feb 15 00:30:20 2018 +0530 scsi: qla4xxx: Use dma_pool_zalloc() Use dma_pool_zalloc() instead of dma_pool_alloc + memset Signed-off-by: Souptick Joarder Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qla4xxx/ql4_mbx.c | 6 ++---- drivers/scsi/qla4xxx/ql4_os.c | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) commit d0d7a6fe427c95178e37bbec40fe6da9753dad8d Author: Rick Chen Date: Mon Dec 11 15:51:31 2017 +0800 dt-bindings: timer: Add andestech atcpit100 timer binding doc Add a document to describe Andestech atcpit100 timer and binding information. Signed-off-by: Rick Chen Signed-off-by: Greentime Hu Acked-by: Rob Herring Acked-by: Arnd Bergmann .../bindings/timer/andestech,atcpit100-timer.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit ea4625c3860ba002c83b1dffc528e1a4f0a89cf5 Author: Rick Chen Date: Tue Dec 12 13:12:21 2017 +0800 clocksource/drivers/atcpit100: VDSO support VDSO needs real-time cycle count to ensure the time accuracy. Unlike others, nds32 architecture does not define clock source, hence VDSO needs atcpit100 offering real-time cycle count to derive the correct time. Signed-off-by: Vincent Chen Signed-off-by: Rick Chen Signed-off-by: Greentime Hu drivers/clocksource/timer-atcpit100.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 35dbb74aa752cff90e8dac1a24ed2a452aed0251 Author: Rick Chen Date: Mon Dec 11 15:53:15 2017 +0800 clocksource/drivers/atcpit100: Add andestech atcpit100 timer ATCPIT100 is often used on the Andes architecture, This timer provide 4 PIT channels. Each PIT channel is a multi-function timer, can be configured as 32,16,8 bit timers or PWM as well. For system timer it will set channel 1 32-bit timer0 as clock source and count downwards until underflow and restart again. It also set channel 0 32-bit timer0 as clock event and count downwards until condition match. It will generate an interrupt for handling periodically. Signed-off-by: Rick Chen Signed-off-by: Greentime Hu Reviewed-by: Linus Walleij Add andestech atcpit100 timer drivers/clocksource/Kconfig | 9 ++ drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-atcpit100.c | 248 ++++++++++++++++++++++++++++++++++ 3 files changed, 258 insertions(+) commit eac8173e7b99b215a386391dc95f5e4d7e4d7085 Author: Greentime Hu Date: Wed Oct 25 15:55:04 2017 +0800 net: faraday add nds32 support. This patch is used to support nds32 architecture to use these faraday mac IP. Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann drivers/net/ethernet/faraday/Kconfig | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit abe45fd9f1b0ff0fbc537242a6c691083e9d3ac6 Author: Greentime Hu Date: Wed Oct 25 15:42:51 2017 +0800 irqchip: Andestech Internal Vector Interrupt Controller driver This patch adds the Andestech Internal Vector Interrupt Controller driver. You can find the spec here. Ch4.9 of AndeStar SPA V3 Manual. http://www.andestech.com/product.php?cls=9 Signed-off-by: Rick Chen Signed-off-by: Greentime Hu Reviewed-by: Marc Zyngier drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-ativic32.c | 107 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) commit ba7cbe51bfbd30176e0d9123552663b5136d48c5 Author: Greentime Hu Date: Wed Oct 25 15:38:09 2017 +0800 dt-bindings: interrupt-controller: Andestech Internal Vector Interrupt Controller This patch adds an irqchip driver document for the Andestech Internal Vector Interrupt Controller. Signed-off-by: Rick Chen Signed-off-by: Greentime Hu Reviewed-by: Rob Herring Acked-by: Arnd Bergmann .../interrupt-controller/andestech,ativic32.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 68d87861029a60425e6f1b27c8986e9d39d5b0c7 Author: Greentime Hu Date: Mon Dec 4 11:26:02 2017 +0800 dt-bindings: nds32 SoC Bindings This patch adds nds32 SoC(AE3XX and AG101P) binding documents. Signed-off-by: Greentime Hu Reviewed-by: Rob Herring Acked-by: Arnd Bergmann .../devicetree/bindings/nds32/andestech-boards | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 8f7726d251f381bfad185d3e7a2d60e0bff48acc Author: Greentime Hu Date: Thu Dec 28 17:49:33 2017 +0800 dt-bindings: nds32 L2 cache controller Bindings This patch adds nds32 L2 cache controller binding documents. Signed-off-by: Greentime Hu Reviewed-by: Rob Herring Acked-by: Arnd Bergmann Documentation/devicetree/bindings/nds32/atl2c.txt | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 939c09ca7db29ef2aed3db49be41cb519eb4a55c Author: Greentime Hu Date: Wed Oct 25 15:52:31 2017 +0800 dt-bindings: nds32 CPU Bindings This patch adds nds32 CPU binding documents. Signed-off-by: Vincent Chen Signed-off-by: Rick Chen Signed-off-by: Zong Li Signed-off-by: Greentime Hu Reviewed-by: Rob Herring Documentation/devicetree/bindings/nds32/cpus.txt | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 8fda152e3d28fcc5c537fe1d1b88820ff2e5b0cd Author: Greentime Hu Date: Wed Oct 25 15:45:35 2017 +0800 MAINTAINERS: Add nds32 Add a maintainer information for the nds32(Andes) architecture. Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann MAINTAINERS | 11 +++++++++++ 1 file changed, 11 insertions(+) commit e71ea3badae55a69a44b8fcb46ae7b547529b376 Author: Greentime Hu Date: Wed Oct 25 15:03:49 2017 +0800 nds32: Build infrastructure This patch adds Makefile, Kconfig and vmlinux.lds.S files required for building an nds32 kernel. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/Kconfig | 103 ++++++++++++++++++++++ arch/nds32/Kconfig.cpu | 174 +++++++++++++++++++++++++++++++++++++ arch/nds32/Makefile | 66 ++++++++++++++ arch/nds32/boot/Makefile | 15 ++++ arch/nds32/include/asm/Kbuild | 55 ++++++++++++ arch/nds32/include/uapi/asm/Kbuild | 29 +++++++ arch/nds32/kernel/Makefile | 23 +++++ arch/nds32/kernel/vmlinux.lds.S | 57 ++++++++++++ arch/nds32/mm/Makefile | 7 ++ 9 files changed, 529 insertions(+) commit a06d4298d4d82f6a7ea6c67aa46dbdb873530320 Author: Greentime Hu Date: Wed Oct 25 15:00:50 2017 +0800 nds32: defconfig This patch adds nds32 defconfig. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/configs/defconfig | 104 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) commit 5c86fa7f7f8568e85a934f064721d355ec7f486c Author: Greentime Hu Date: Wed Oct 25 14:58:32 2017 +0800 nds32: Miscellaneous header files This patch introduces some miscellaneous header files. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/delay.h | 39 +++++++++++++++++++++++++++++++++ arch/nds32/include/asm/linkage.h | 11 ++++++++++ arch/nds32/include/uapi/asm/byteorder.h | 13 +++++++++++ 3 files changed, 63 insertions(+) commit beebdeaa1d39125ef5a38818024e93b365621a3b Author: Greentime Hu Date: Wed Oct 25 14:46:21 2017 +0800 nds32: Device tree support This patch adds support for device tree. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/boot/dts/Makefile | 8 ++++ arch/nds32/boot/dts/ae3xx.dts | 85 +++++++++++++++++++++++++++++++++++++++++++ arch/nds32/kernel/devtree.c | 19 ++++++++++ 3 files changed, 112 insertions(+) commit e2f8b5c028f3eb81ed0507ed1a3b05ec6013ce56 Author: Greentime Hu Date: Wed Oct 25 14:39:57 2017 +0800 nds32: Generic timers support This patch adds support for timer. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Reviewed-by: Linus Walleij Acked-by: Arnd Bergmann arch/nds32/kernel/time.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c9a4a8da6baae475994974398ff2eba8e92971d1 Author: Greentime Hu Date: Wed Oct 25 14:37:17 2017 +0800 nds32: Loadable modules This patch adds support for loadable modules. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/module.h | 11 ++ arch/nds32/kernel/module.c | 278 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 289 insertions(+) commit 3af6e29254cb5edf7cb1982081fce05797541633 Author: Greentime Hu Date: Wed Oct 25 14:34:56 2017 +0800 nds32: L2 cache support This patch adds L2 cache support. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/l2_cache.h | 137 ++++++++++++++++++++++++++++++++++++++ arch/nds32/kernel/atl2c.c | 64 ++++++++++++++++++ 2 files changed, 201 insertions(+) commit e9d0704aa134de05b21085e6e9dab863e7ab38f7 Author: Greentime Hu Date: Wed Oct 25 14:32:12 2017 +0800 nds32: Debugging support This patch adds ptrace support. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/uapi/asm/ptrace.h | 25 ++++++++ arch/nds32/kernel/ptrace.c | 119 +++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) commit ace02e2badd12e34d781780517614c42dbbf8068 Author: Greentime Hu Date: Wed Oct 25 14:27:22 2017 +0800 nds32: Library functions This patch add support for various library functions. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/string.h | 17 +++ arch/nds32/include/asm/swab.h | 35 +++++ arch/nds32/include/asm/uaccess.h | 283 +++++++++++++++++++++++++++++++++++++++ arch/nds32/kernel/nds32_ksyms.c | 31 +++++ arch/nds32/lib/Makefile | 3 + arch/nds32/lib/clear_user.S | 42 ++++++ arch/nds32/lib/copy_from_user.S | 45 +++++++ arch/nds32/lib/copy_template.S | 69 ++++++++++ arch/nds32/lib/copy_to_user.S | 45 +++++++ arch/nds32/lib/memcpy.S | 30 +++++ arch/nds32/lib/memmove.S | 70 ++++++++++ arch/nds32/lib/memset.S | 33 +++++ arch/nds32/lib/memzero.S | 18 +++ 13 files changed, 721 insertions(+) commit 7ecbac743a58ae2ed9851aa7ec81d4bf2ca2cffe Author: Greentime Hu Date: Wed Oct 25 11:23:21 2017 +0800 nds32: Signal handling support This patch adds support for signal handling. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu arch/nds32/include/uapi/asm/sigcontext.h | 60 ++++++ arch/nds32/kernel/signal.c | 324 +++++++++++++++++++++++++++++++ 2 files changed, 384 insertions(+) commit eefacd1dfe38a3334d2e1c44fee0d7b0fdd5d252 Author: Greentime Hu Date: Wed Oct 25 11:16:56 2017 +0800 nds32: VDSO support This patch adds VDSO support. The VDSO code is currently used for sys_rt_sigreturn() and optimised gettimeofday() (using the SoC timer counter). Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/vdso.h | 24 +++ arch/nds32/include/asm/vdso_datapage.h | 36 ++++ arch/nds32/include/asm/vdso_timer_info.h | 14 ++ arch/nds32/kernel/vdso.c | 230 ++++++++++++++++++++++++ arch/nds32/kernel/vdso/Makefile | 82 +++++++++ arch/nds32/kernel/vdso/datapage.S | 21 +++ arch/nds32/kernel/vdso/gen_vdso_offsets.sh | 15 ++ arch/nds32/kernel/vdso/gettimeofday.c | 270 +++++++++++++++++++++++++++++ arch/nds32/kernel/vdso/note.S | 11 ++ arch/nds32/kernel/vdso/sigreturn.S | 19 ++ arch/nds32/kernel/vdso/vdso.S | 18 ++ arch/nds32/kernel/vdso/vdso.lds.S | 76 ++++++++ 12 files changed, 816 insertions(+) commit 1932fbe36e02f54223ac4c6779b92269ca8b9b60 Author: Greentime Hu Date: Wed Oct 25 10:37:49 2017 +0800 nds32: System calls handling This patch adds support for system calls. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Reviewed-by: Arnd Bergmann arch/nds32/include/asm/syscall.h | 188 +++++++++++++++++++++++++++++++++++ arch/nds32/include/asm/syscalls.h | 13 +++ arch/nds32/include/asm/unistd.h | 6 ++ arch/nds32/include/uapi/asm/unistd.h | 11 ++ arch/nds32/kernel/ex-scall.S | 98 ++++++++++++++++++ arch/nds32/kernel/sys_nds32.c | 50 ++++++++++ arch/nds32/kernel/syscall_table.c | 17 ++++ 7 files changed, 383 insertions(+) commit 3172c605eb3b611f118ff08e60b50e08bfdcc2a6 Author: Greentime Hu Date: Wed Oct 25 10:31:28 2017 +0800 nds32: ELF definitions This patch adds definitions for the ELF format, relocation types, vdso locations and EXEC_PAGESIZE. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/elf.h | 171 +++++++++++++++++++++++++++++++++++ arch/nds32/include/uapi/asm/auxvec.h | 12 +++ arch/nds32/include/uapi/asm/param.h | 11 +++ 3 files changed, 194 insertions(+) commit 80081b33910f417310921430dbfb5c8bf20e86aa Author: Greentime Hu Date: Tue Oct 24 16:22:35 2017 +0800 nds32: DMA mapping API This patch adds support for the DMA mapping API. It uses dma_map_ops for flexibility. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/dma-mapping.h | 14 + arch/nds32/kernel/dma.c | 477 +++++++++++++++++++++++++++++++++++ 2 files changed, 491 insertions(+) commit 4a64f68dbda6fb0eb5be23616ee2f09023c6fdc5 Author: Greentime Hu Date: Tue Oct 24 16:21:01 2017 +0800 nds32: Device specific operations This patch introduces ioremap implementations. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/io.h | 83 +++++++++++++++++++++++++++++++++++++++++++++ arch/nds32/mm/ioremap.c | 62 +++++++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+) commit 484367b6a9225ec6830ae3fb4a3adbdd724cb93a Author: Greentime Hu Date: Wed Oct 25 16:49:38 2017 +0800 nds32: Atomic operations This patch includes the atomic and futex operations. Many atomic operations use the load-lock word(llw) and store-condition word(scw) operations. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/barrier.h | 15 ++++++ arch/nds32/include/asm/futex.h | 103 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) commit f13c34b9066745910bd96f94bd35895af2d4f2b8 Author: Greentime Hu Date: Tue Oct 24 15:50:45 2017 +0800 nds32: IRQ handling This patch includes irq related functions and irqchip_init(). Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/irqflags.h | 36 ++++++++++++++++++++++++++++++++++++ arch/nds32/kernel/irq.c | 9 +++++++++ 2 files changed, 45 insertions(+) commit a15e9ffa877852e529db33cc615c132bad2fc60a Author: Greentime Hu Date: Tue Oct 24 15:47:50 2017 +0800 nds32: Process management This patch includes copy_thread(), start_thread() implementation and cpu_context structure definition. nds32 uses $r25 to get current task_struct. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/current.h | 12 ++ arch/nds32/include/asm/processor.h | 103 +++++++++++++++++ arch/nds32/include/asm/thread_info.h | 76 +++++++++++++ arch/nds32/kernel/process.c | 208 +++++++++++++++++++++++++++++++++++ 4 files changed, 399 insertions(+) commit 7de9cf474083bfbba469f72dc208f7b51747632d Author: Greentime Hu Date: Tue Oct 24 15:40:25 2017 +0800 nds32: Cache and TLB routines This patch contains cache and TLB maintenance functions. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/cache.h | 12 + arch/nds32/include/asm/cache_info.h | 13 + arch/nds32/include/asm/cacheflush.h | 44 +++ arch/nds32/include/asm/mmu_context.h | 68 +++++ arch/nds32/include/asm/proc-fns.h | 44 +++ arch/nds32/include/asm/tlb.h | 28 ++ arch/nds32/include/asm/tlbflush.h | 47 +++ arch/nds32/include/uapi/asm/cachectl.h | 14 + arch/nds32/kernel/cacheinfo.c | 49 +++ arch/nds32/mm/cacheflush.c | 322 ++++++++++++++++++++ arch/nds32/mm/proc.c | 533 +++++++++++++++++++++++++++++++++ arch/nds32/mm/tlb.c | 50 ++++ 12 files changed, 1224 insertions(+) commit 664eec400bf8f3ab4d41279d6fb674a66ff3ba94 Author: Greentime Hu Date: Tue Oct 24 15:25:00 2017 +0800 nds32: MMU fault handling and page table management This patch includes page fault handler, mmap and fixup implementations. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/lib/copy_page.S | 37 ++++ arch/nds32/mm/extable.c | 16 ++ arch/nds32/mm/fault.c | 410 +++++++++++++++++++++++++++++++++++++++++++++ arch/nds32/mm/mmap.c | 73 ++++++++ 4 files changed, 536 insertions(+) commit 59fd53cd5ca0a6930accf53db34cbeef8fcbc195 Author: Greentime Hu Date: Tue Oct 24 15:05:47 2017 +0800 nds32: MMU initialization This patch includes memory initializations and highmem supporting. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/mm/highmem.c | 79 ++++++++++++++ arch/nds32/mm/init.c | 277 +++++++++++++++++++++++++++++++++++++++++++++++ arch/nds32/mm/mm-nds32.c | 90 +++++++++++++++ 3 files changed, 446 insertions(+) commit 2e1aecb970b7662cf3d53d2d18a54c17f1eb55b8 Author: Greentime Hu Date: Tue Oct 24 14:53:31 2017 +0800 nds32: MMU definitions This patch includes virtual memory layout, PHYS_OFFSET is defined as 0x0. It also includes the 4KB/8KB page size configurations and pte operations. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/fixmap.h | 29 +++ arch/nds32/include/asm/highmem.h | 65 ++++++ arch/nds32/include/asm/memory.h | 105 ++++++++++ arch/nds32/include/asm/mmu.h | 12 ++ arch/nds32/include/asm/page.h | 67 +++++++ arch/nds32/include/asm/pgalloc.h | 96 +++++++++ arch/nds32/include/asm/pgtable.h | 409 ++++++++++++++++++++++++++++++++++++++ arch/nds32/include/asm/shmparam.h | 19 ++ 8 files changed, 802 insertions(+) commit 2923f5ea7738cb9f5372bb9d7ac9886cf4193003 Author: Greentime Hu Date: Tue Oct 24 14:42:02 2017 +0800 nds32: Exception handling This patch includes the exception/interrupt entries, pt_reg structure and related accessors. /* Unaligned accessing handling*/ Andes processors cannot load/store information which is not naturally aligned on the bus, i.e., loading a 4 byte data whose start address must be divisible by 4. If unaligned data accessing is happened, data unaligned exception will be triggered and user will get SIGSEGV or kernel oops according to the unaligned address. In order to make user be able to load/store data from an unaligned address, software load/store emulation is implemented in arch/nds32/mm/alignment.c to address data unaligned exception. Unaligned accessing handling is disabled by default because it is not a normal case. User can enable this feature by following steps. A. Compile time: 1. Enable kernel config CONFIG_ALIGNMENT_TRAP B. Run time: 1. Enter /proc/sys/nds32/unaligned_acess folder 2. Write 1 to file enable_mode to enable unaligned accessing handling. User can disable it by writing 0 to this file. 3. Write 1 to file debug to show which unaligned address is under processing. User can disable it by writing 0 to this file. However, unaligned accessing handler cannot work if this unaligned address is not accessible such as protection violation. On this condition, the default behaviors for addressing data unaligned exception still happen Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/ptrace.h | 77 ++++++ arch/nds32/kernel/ex-entry.S | 157 +++++++++++ arch/nds32/kernel/ex-exit.S | 184 +++++++++++++ arch/nds32/kernel/stacktrace.c | 47 ++++ arch/nds32/kernel/traps.c | 442 ++++++++++++++++++++++++++++++ arch/nds32/mm/alignment.c | 576 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 1483 insertions(+) commit 001d953ede35dfb135e636af4b41d5dd20a09471 Author: Greentime Hu Date: Tue Oct 24 14:33:30 2017 +0800 nds32: Kernel booting and initialization This patch includes the kernel startup code. It can get dtb pointer passed from bootloader. It will create a temp mapping by tlb instructions at beginning and goto start_kernel. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/kernel/head.S | 188 ++++++++++++++++++++++++ arch/nds32/kernel/setup.c | 363 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 551 insertions(+) commit e1d82de681fd79e65f86912c7b231d88180ac8a4 Author: Greentime Hu Date: Tue Oct 24 14:19:11 2017 +0800 nds32: Assembly macros and definitions This patch includes assembly macros, bit field definitions used in .S files across arch/nds32/. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann arch/nds32/include/asm/assembler.h | 39 ++ arch/nds32/include/asm/bitfield.h | 963 +++++++++++++++++++++++++++++++++++++ arch/nds32/include/asm/nds32.h | 81 ++++ arch/nds32/kernel/asm-offsets.c | 28 ++ 4 files changed, 1111 insertions(+) commit 2312dbf7462bdc04b4dc26aef66c8413125c77f0 Author: Greentime Hu Date: Tue Jan 23 13:38:30 2018 +0800 drivers/video/concole: add negative dependency for VGA_CONSOLE on nds32 nds32 does not support VGA console, so prevent that kconfig symbol from being enabled for nds32, thus fixing these build errors: drivers/video/console/vgacon.o: In function `vgacon_save_screen': /NOBACKUP/sqa2/greentime/contrib/src_pkg/linux-nds32/drivers/video/console/vgacon.c:1327: undefined reference to `screen_info' /NOBACKUP/sqa2/greentime/contrib/src_pkg/linux-nds32/drivers/video/console/vgacon.c:1327: undefined reference to `screen_info' /NOBACKUP/sqa2/greentime/contrib/src_pkg/linux-nds32/drivers/video/console/vgacon.c:1328: undefined reference to `screen_info' /NOBACKUP/sqa2/greentime/contrib/src_pkg/linux-nds32/drivers/video/console/vgacon.c:1328: undefined reference to `screen_info' drivers/video/console/vgacon.o: In function `vgacon_init': /NOBACKUP/sqa2/greentime/contrib/src_pkg/linux-nds32/drivers/video/console/vgacon.c:591: undefined reference to `screen_info' drivers/video/console/vgacon.o:/NOBACKUP/sqa2/greentime/contrib/src_pkg/linux-nds32/drivers/video/console/vgacon.c:591: more undefined references to `screen_info' follow make: *** [vmlinux] Error 1 Signed-off-by: Greentime Hu drivers/video/console/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f572a034d9e07157dd07d2b6be3a1459b5574b58 Author: Greentime Hu Date: Thu Nov 16 19:33:35 2017 +0800 earlycon: add reg-offset to physical address before mapping It will get the wrong virtual address because port->mapbase is not added the correct reg-offset yet. We have to update it before earlycon_map() is called Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann Acked-by: Rob Herring Cc: Peter Hurley Cc: stable@vger.kernel.org Fixes: 088da2a17619 ("of: earlycon: Initialize port fields from DT properties") drivers/tty/serial/earlycon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b3ada9d0ce8d286c8bbbb02fdbddec5036242b42 Author: Greentime Hu Date: Wed Nov 22 18:57:46 2017 +0800 asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU It allows some architectures to use this generic macro instead of defining theirs. sparc: io: To use the define of ioremap_[nocache|wc|wb] in asm-generic/io.h It will move the ioremap_nocache out of the CONFIG_MMU ifdef. This means that in order to suppress re-definition errors we need to remove the #define in arch/sparc/include/asm/io_32.h. Also, the change adds a prototype for ioremap where size is size_t and offset is phys_addr_t so fix that as well. Signed-off-by: Greentime Hu arch/sparc/include/asm/io_32.h | 5 ----- arch/sparc/kernel/ioport.c | 4 ++-- include/asm-generic/io.h | 18 +++++++++--------- 3 files changed, 11 insertions(+), 16 deletions(-) commit 94bc61ead46c3d9943bd35a4536e61d4ea9f1e66 Author: Greentime Hu Date: Wed Feb 21 14:21:23 2018 +0800 xtensa: add ioremap_nocache declaration before include asm-generic/io.h. A future commit for the nds32 architecture bootstrap("asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU") will move the ioremap_nocache out of the CONFIG_MMU ifdef. This means that in order to suppress re-definition errors we need to setup #define's before importing asm-generic/io.h. Signed-off-by: Greentime Hu arch/xtensa/include/asm/io.h | 1 + 1 file changed, 1 insertion(+) commit b934e8eb483354bbadf1eee0a54e9487f50d6c5b Author: Greentime Hu Date: Fri Dec 22 22:18:40 2017 +0800 openrisc: add ioremap_nocache declaration before include asm-generic/io.h and sync ioremap prototype with it. A future commit for the nds32 architecture bootstrap("asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU") will move the ioremap_nocache out of the CONFIG_MMU ifdef. This means that in order to suppress re-definition errors we need to setup #define's before importing asm-generic/io.h. Also, the change adds a prototype for ioremap where size is size_t so fix that as well. Signed-off-by: Greentime Hu Acked-by: Stafford Horne arch/openrisc/include/asm/io.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 23138ead270045f1b3e912e667967b6094244999 Author: Richard Guy Briggs Date: Wed Feb 21 04:30:07 2018 -0500 audit: return on memory error to avoid null pointer dereference If there is a memory allocation error when trying to change an audit kernel feature value, the ignored allocation error will trigger a NULL pointer dereference oops on subsequent use of that pointer. Return instead. Passes audit-testsuite. See: https://github.com/linux-audit/audit-kernel/issues/76 Signed-off-by: Richard Guy Briggs [PM: not necessary (other funcs check for NULL), but a good practice] Signed-off-by: Paul Moore kernel/audit.c | 2 ++ 1 file changed, 2 insertions(+) commit 204f4afa7ae50239c39adb13af42f5720fe7e9a5 Author: Bjorn Helgaas Date: Fri Feb 16 15:22:39 2018 -0600 PCI: Remove redundant probes for device reset support We probe every device for whether it supports reset so we can tell whether to create a sysfs "reset" file for it. We do that probe in pci_init_capabilities() during enumeration and save the result in dev->reset_fn. The result doesn't depend on any other devices on the bus and shouldn't change after boot, so we don't need to do the probe again. Remove the pci_probe_reset_function() calls and rely on the dev->reset_fn we found during enumeration. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki drivers/pci/pci.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 700abc90f07b7f60e512c5d5b7cb33bdc207e47c Author: Todd E Brandt Date: Tue Jan 30 00:17:20 2018 -0800 pm-graph: AnalyzeSuspend v5.0 - add -cgskip option to reduce callgraph output size - add -cgfilter option to focus on a list of devices - add -result option for exporting batch test results - removed all phoronix hooks, use -result to enable batch testing - change -usbtopo to -devinfo, now prints all devices - add -gzip option to read/write logs in gz format - add -bufsize option to manually control ftrace buffer size - add -sync option to run filesystem sync prior to test - add -display option to enable/disable the display prior to test - add -rs option to enable/disable runtime suspend on all devices for test - add installed config files to search path - add kernel error/warning links into the timeline - fix callgraph trace to better handle interrupts - include command string and kernel params in timeline output header Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki tools/power/pm-graph/sleepgraph.8 | 47 +- tools/power/pm-graph/sleepgraph.py | 1625 ++++++++++++++++++++++-------------- 2 files changed, 1053 insertions(+), 619 deletions(-) commit d83a76a8ec34b3c52e9aadafadb370ebd82cf79a Author: Todd E Brandt Date: Tue Jan 30 00:17:19 2018 -0800 pm-graph: AnalyzeBoot v2.2 - add -cgskip option to reduce callgraph output size - add -cgfilter option to focus on a list of devices - add -result option for exporting batch test results - removed all phoronix hooks, use -result to enable batch testing - changed argument -f to match sleegraph, -f = -callgraph - use -fstat for function status instead of -f - add -verbose option to print out timeline stats and kernel options - include command string and kernel params in timeline output header Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki tools/power/pm-graph/bootgraph.8 | 18 +++- tools/power/pm-graph/bootgraph.py | 219 +++++++++++++++++++++++++------------- 2 files changed, 160 insertions(+), 77 deletions(-) commit a6fbdbb2b852c2208156f21747b270931fd0d427 Author: Todd E Brandt Date: Tue Jan 30 00:17:18 2018 -0800 pm-graph: config files and installer - name change: analyze_boot.py to bootgraph.py - name change: analyze_suspend.py to sleepgraph.py - added config files for easier sleepgraph usage - added example.cfg which describes all config options - added cgskip.txt definition for slimmer callgraphs Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki tools/power/pm-graph/Makefile | 29 +- tools/power/pm-graph/analyze_boot.py | 1012 ---- tools/power/pm-graph/analyze_suspend.py | 5533 -------------------- tools/power/pm-graph/bootgraph.py | 1012 ++++ tools/power/pm-graph/config/cgskip.txt | 65 + .../pm-graph/config/custom-timeline-functions.cfg | 205 + tools/power/pm-graph/config/example.cfg | 133 + tools/power/pm-graph/config/freeze-callgraph.cfg | 94 + tools/power/pm-graph/config/freeze-dev.cfg | 93 + tools/power/pm-graph/config/freeze.cfg | 93 + tools/power/pm-graph/config/standby-callgraph.cfg | 94 + tools/power/pm-graph/config/standby-dev.cfg | 93 + tools/power/pm-graph/config/standby.cfg | 93 + tools/power/pm-graph/config/suspend-callgraph.cfg | 98 + tools/power/pm-graph/config/suspend-dev.cfg | 93 + tools/power/pm-graph/config/suspend-x2-proc.cfg | 93 + tools/power/pm-graph/config/suspend.cfg | 93 + tools/power/pm-graph/sleepgraph.py | 5533 ++++++++++++++++++++ 18 files changed, 7907 insertions(+), 6552 deletions(-) commit 147a7d9d25ca2551aab15071cb1f048ecd9b7953 Author: Rafael J. Wysocki Date: Tue Feb 20 12:10:32 2018 +0100 ACPI / PM: Do not reconfigure GPEs for suspend-to-idle It is reported that commit 235d81a630ca (ACPI / PM: Clean up device wakeup enable/disable code) broke wakeup from suspend-to-idle on some platforms. That is due to the acpi_enable_all_wakeup_gpes() in acpi_s2idle_prepare() which needs acpi_enable_wakeup_devices() to be called before it as the latter sets up the GPE masks used by the former and commit 235d81a630ca removed acpi_enable_wakeup_devices() invocation from the suspend-to-idle path. However, acpi_enable_wakeup_devices() does more than just setting the GPE masks and the remaining part of it is not necessary for suspend-to-idle. Moreover, non-wakeup GPEs are disabled on suspend- to-idle entry to avoid spurious wakeups, but that should not be strictly necessary any more after commit 33e4f80ee69b (ACPI / PM: Ignore spurious SCI wakeups from suspend-to-idle) which prevents spurious GPE wakeups from resuming the system. The only consequence of leaving non-wakeup GPEs enabled may be more interrupt-related activity while suspended, which is not ideal (more energy is used if that happens), but it is not critical too. For this reason, drop the GPE reconfiguration from the suspend-to-idle path entirely. This change also allows Dells XPS13 9360 blacklisted by commit 71630b7a832f (ACPI / PM: Blacklist Low Power S0 Idle _DSM for Dell XPS13 9360) to use the power button for waking up from suspend- to-idle and it helps at least one other older Dell system (the wakeup button GPE on that one is not listed in _PRW for any devices, so it is not regarded as a wakeup one and gets disabled on suspend-to-idle entry today). Fixes: 235d81a630ca (ACPI / PM: Clean up device wakeup enable/disable code) Reported-by: Du Wenkai Tested-by: Du Wenkai Signed-off-by: Rafael J. Wysocki drivers/acpi/sleep.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 074eb22ec4aaf2d0609151d9605bc2d04ece43bb Author: Bob Moore Date: Thu Feb 15 13:09:32 2018 -0800 ACPICA: Update version to 20180209 ACPICA commit 6e3468837f9f32f64c7d0a6e20bf0d2579411d43 Version 20180209. Link: https://github.com/acpica/acpica/commit/6e346883 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 959c38a7e128856cefaade7e7c2422939d5ad2da Author: Bob Moore Date: Thu Feb 15 13:09:31 2018 -0800 ACPICA: Add option to disable Package object name resolution errors ACPICA commit a6c3c725c44dd44ad9d3f2b2a64351fdbe6e0014 For the kernel-resident ACPICA, optionally be silent about the NOT_FOUND case. Although this is potentially a serious problem, it can generate a lot of noise/errors on platforms whose firmware carries around a bunch of unused Package objects. To disable these errors, define ACPI_IGNORE_PACKAGE_RESOLUTION_ERRORS in the OS-specific header. Link: https://bugzilla.kernel.org/show_bug.cgi?id=198167 Link: https://github.com/acpica/acpica/commit/a6c3c725 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dspkginit.c | 38 +++++++++++++++++++++++++++++++------- include/acpi/platform/aclinux.h | 1 + 2 files changed, 32 insertions(+), 7 deletions(-) commit 5a8361f7ecceaed64b4064000d16cb703462be49 Author: Schmauss, Erik Date: Thu Feb 15 13:09:30 2018 -0800 ACPICA: Integrate package handling with module-level code ACPICA commit 8faf6fca445eb7219963d80543fb802302a7a8c7 This change completes the integration of the recent changes to package object handling with the module-level code support. For acpi_exec, the -ep flag is removed. This change allows table load to behave as if it were a method invocation. Before this, the definition block definition below would have loaded all named objects at the root scope. After loading, it would execute the if statements at the root scope. DefinitionBlock (...) { Name(OBJ1, 0) if (1) { Device (DEV1) { Name (_HID,0x0) } } Scope (DEV1) { Name (OBJ2) } } The above code would load OBJ1 to the namespace, defer the execution of the if statement and attempt to add OBJ2 within the scope of DEV1. Since DEV1 is not in scope, this would incur an AE_NOT_FOUND error. After this error is emitted, the if block is invoked and DEV1 and its _HID is added to the namespace. This commit changes the behavior to execute the if block in place rather than deferring it until all tables are loaded. The new behavior is as follows: insert OBJ1 in the namespace, invoke the if statement and add DEV1 and its _HID to the namespace, add OBJ2 to the scope of DEV1. Bug report links: Link: https://bugs.acpica.org/show_bug.cgi?id=963 Link: https://bugzilla.kernel.org/show_bug.cgi?id=153541 Link: https://bugzilla.kernel.org/show_bug.cgi?id=196165 Link: https://bugzilla.kernel.org/show_bug.cgi?id=192621 Link: https://bugzilla.kernel.org/show_bug.cgi?id=197207 Link: https://bugzilla.kernel.org/show_bug.cgi?id=198051 Link: https://bugzilla.kernel.org/show_bug.cgi?id=198515 ACPICA repo: Link: https://github.com/acpica/acpica/commit/8faf6fca Tested-by: Kai-Heng Feng Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dspkginit.c | 128 ++++++++++++++++++++++------------------ drivers/acpi/acpica/dswexec.c | 6 +- drivers/acpi/acpica/nsparse.c | 5 +- drivers/acpi/acpica/pstree.c | 1 + include/acpi/acpixf.h | 8 ++- 5 files changed, 85 insertions(+), 63 deletions(-) commit 7decc66df940fc0b128a642df9ac3d917f1b0c1f Author: Bob Moore Date: Thu Feb 15 13:17:04 2018 -0800 ACPICA: Revert "Fix for implicit result conversion for the To____ functions" ACPICA commit 0e44fee13434766ebbb4d156e3ed45604508d7c3 This reverts commit e1342c9f2dde37a67e916099658b65984ef8a434. Implicit conversion should in fact be disabled for the "explicit conversion" operators. This is stated in the ACPI specification. The operators affected are: to_integer to_string to_buffer to_decimal_string to_hex_string to_BCD from_BCD Link: https://github.com/acpica/acpica/commit/0e44fee1 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acopcode.h | 14 +++++++------- drivers/acpi/acpica/amlcode.h | 20 +++----------------- drivers/acpi/acpica/exconvrt.c | 1 + drivers/acpi/acpica/exresop.c | 1 + 4 files changed, 12 insertions(+), 24 deletions(-) commit 1ef6323148174798b55024d5442a02fea416ce21 Author: Bob Moore Date: Thu Feb 15 13:09:28 2018 -0800 ACPICA: Update for some debug output. No functional change ACPICA commit 3a08436fe3bff297a6de162252964e955946c7d3 Improve/simplify some of the debug messages. Link: https://github.com/acpica/acpica/commit/3a08436f Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dsargs.c | 1 + drivers/acpi/acpica/dsopcode.c | 4 ++-- drivers/acpi/acpica/dswload.c | 2 +- drivers/acpi/acpica/exnames.c | 7 ++----- drivers/acpi/acpica/nsinit.c | 7 ++++++- drivers/acpi/acpica/nsnames.c | 3 +++ drivers/acpi/acpica/nsparse.c | 9 ++++++--- drivers/acpi/acpica/psloop.c | 4 ++-- drivers/acpi/acpica/psparse.c | 2 +- drivers/acpi/acpica/utcache.c | 7 ++++--- drivers/acpi/acpica/utdelete.c | 20 ++++++++++++-------- 11 files changed, 40 insertions(+), 26 deletions(-) commit d82847acd400fca0404517d19fd5c0740e6e42db Author: Bob Moore Date: Thu Feb 15 13:09:27 2018 -0800 ACPICA: Update error message, no functional change ACPICA commit 0787fda3b224a78369e26ac6046658beb2b64c12 Clarify error when an attempt is made to evaluate things like devices, events, etc. -- these objects have no data and cannot be "evaluated". Link: https://github.com/acpica/acpica/commit/0787fda3 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/nseval.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 0ea5f58ebc83edfd13b0b254fbbc4ac191351c18 Merge: cac5620 218798f Author: David S. Miller Date: Wed Feb 21 17:51:04 2018 -0500 Merge branch 'ipvlan-deps' Matteo Croce says: ==================== Remove IPVlan module dependencies on IPv6 and L3 Master dev The IPVlan module currently depends on IPv6 and L3 Master dev. Refactor the code to allow building IPVlan module regardless of the value of CONFIG_IPV6 as done in other drivers like VxLAN or GENEVE. Also change the CONFIG_NET_L3_MASTER_DEV dependency into a select, since compiling L3 Master device alone has little sense. $ grep -wE 'CONFIG_(IPV6|IPVLAN)' .config CONFIG_IPV6=y CONFIG_IPVLAN=m $ ll drivers/net/ipvlan/ipvlan.ko 48K drivers/net/ipvlan/ipvlan.ko $ grep -wE 'CONFIG_(IPV6|IPVLAN)' .config CONFIG_IPVLAN=m $ ll drivers/net/ipvlan/ipvlan.ko 44K drivers/net/ipvlan/ipvlan.ko ==================== Signed-off-by: David S. Miller commit 218798f407875e8a1ce9164f5e0c50f02105dc64 Author: Matteo Croce Date: Wed Feb 21 01:31:14 2018 +0100 ipvlan: selects master_l3 device instead of depending on it The L3 Master device is just a glue between the core networking code and device drivers, so it should be selected automatically rather than requiring to be enabled explicitly. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller drivers/net/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94333fac44d1da19ebdf41704780c1af3cabea61 Author: Matteo Croce Date: Wed Feb 21 01:31:13 2018 +0100 ipvlan: drop ipv6 dependency IPVlan has an hard dependency on IPv6, refactor the ipvlan code to allow compiling it with IPv6 disabled, move duplicate code into addr_equal() and refactor series of if-else into a switch. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller drivers/net/Kconfig | 1 - drivers/net/ipvlan/ipvlan_core.c | 72 ++++++++++++++++++++++++++++++---------- drivers/net/ipvlan/ipvlan_main.c | 48 +++++++++++++++++---------- 3 files changed, 85 insertions(+), 36 deletions(-) commit cac56209a66ea3b0be67aa2966b2c628b944da1e Author: Donald Sharp Date: Tue Feb 20 08:55:58 2018 -0500 net: Allow a rule to track originating protocol Allow a rule that is being added/deleted/modified or dumped to contain the originating protocol's id. The protocol is handled just like a routes originating protocol is. This is especially useful because there is starting to be a plethora of different user space programs adding rules. Allow the vrf device to specify that the kernel is the originator of the rule created for this device. Signed-off-by: Donald Sharp Signed-off-by: David S. Miller drivers/net/vrf.c | 1 + include/net/fib_rules.h | 3 ++- include/uapi/linux/fib_rules.h | 2 +- net/core/fib_rules.c | 7 ++++++- 4 files changed, 10 insertions(+), 3 deletions(-) commit e62f8227851da39068dcfea5e6e7aa745d295e89 Author: Erik Schmauss Date: Thu Feb 15 13:09:26 2018 -0800 ACPICA: Restructure ACPI table files ACPICA commit a025731aec31745b775f7bdcd850c57d0a08298d Split/restructure: Table headers (actbl1*.h) disassembler table info files (dmtbinfo*.c) disassembler table dump files (dmtbdump*.c) Adds 6 new files. Link: https://github.com/acpica/acpica/commit/a025731a Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki include/acpi/actbl1.h | 1638 ++++++++++++++++++++--------------------- include/acpi/actbl2.h | 1964 ++++++++++++++++++++++++++----------------------- include/acpi/actbl3.h | 1016 +++++++++++-------------- 3 files changed, 2305 insertions(+), 2313 deletions(-) commit 4f1c29d0dc7bde6df1c485f139fd8ee1d10b3485 Author: Aishwarya Pant Date: Wed Feb 14 00:24:10 2018 +0530 ACPI: sysfs: Update device object sysfs documentation Add documentation for two attributes, status and hrv, in Documentation/ABI/testing/sysfs-bus-acpi. Compiled from git logs and the ACPI specification. Signed-off-by: Aishwarya Pant [ rjw: Minor changes ] Signed-off-by: Rafael J. Wysocki Documentation/ABI/testing/sysfs-bus-acpi | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 91eea70e5e5ce12eb1c7cd922e561fab43e201bd Author: Ognjen Galic Date: Wed Feb 7 15:59:36 2018 +0100 ACPI: battery: Add the ThinkPad "Not Charging" quirk The EC/ACPI firmware on Lenovo ThinkPads used to report a status of "Unknown" when the battery is between the charge start and charge stop thresholds. On Windows, it reports "Not Charging" so the quirk has been added to also report correctly. Now the "status" attribute returns "Not Charging" when the battery on ThinkPads is not physicaly charging. Reviewed-by: Andy Shevchenko Signed-off-by: Ognjen Galic Signed-off-by: Rafael J. Wysocki drivers/acpi/battery.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 2801b9683f740012863f7f0b1f0bc770c417fe72 Author: Ognjen Galic Date: Wed Feb 7 15:58:44 2018 +0100 thinkpad_acpi: Add support for battery thresholds 1) Charge start threshold /sys/class/power_supply/BATN/charge_start_threshold Valid values are [0, 99]. A value of 0 turns off the start threshold wear control. 2) Charge stop threshold /sys/class/power_supply/BATN/charge_stop_threshold Valid values are [1, 100]. A value of 100 turns off the stop threshold wear control. This must be configured first. Signed-off-by: Ognjen Galic Acked-by: Henrique de Moraes Holschuh Signed-off-by: Rafael J. Wysocki drivers/platform/x86/Kconfig | 1 + drivers/platform/x86/thinkpad_acpi.c | 389 ++++++++++++++++++++++++++++++++++- 2 files changed, 389 insertions(+), 1 deletion(-) commit 285995d15d3b1725d021a8a274e55f2ce30ccfa0 Author: Ognjen Galic Date: Wed Feb 7 15:58:27 2018 +0100 power: add to_power_supply macro to the API This patch adds the to_power_supply macro to upcast a device to a power_supply struct. This is needed because the same piece of code using container_of is used in various other places, so we abstract away such low-level operations via a macro. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Ognjen Galic Reviewed-by: Sebastian Reichel Signed-off-by: Rafael J. Wysocki drivers/power/supply/ds2780_battery.c | 5 ----- drivers/power/supply/ds2781_battery.c | 5 ----- drivers/power/supply/power_supply_core.c | 2 +- include/linux/power_supply.h | 2 ++ 4 files changed, 3 insertions(+), 11 deletions(-) commit fa93854f7a7ed63d054405bf3779247d5300edd3 Author: Ognjen Galic Date: Wed Feb 7 15:58:13 2018 +0100 battery: Add the battery hooking API This is a patch that implements a generic hooking API for the generic ACPI battery driver. With this new generic API, drivers can expose platform specific behaviour via sysfs attributes in /sys/class/power_supply/BATn/ in a generic way. A perfect example of the need for this API are Lenovo ThinkPads. Lenovo ThinkPads have a ACPI extension that allows the setting of start and stop charge thresholds in the EC and battery firmware via ACPI. The thinkpad_acpi module can use this API to expose sysfs attributes that it controls inside the ACPI battery driver sysfs tree, under /sys/class/power_supply/BATN/. The file drivers/acpi/battery.h has been moved to include/acpi/battery.h and the includes inside ac.c, sbs.c, and battery.c have been adjusted to reflect that. When drivers hooks into the API, the API calls add_battery() for each battery in the system that passes it a acpi_battery struct. Then, the drivers can use device_create_file() to create new sysfs attributes with that struct and identify the batteries for per-battery attributes. Signed-off-by: Ognjen Galic Signed-off-by: Rafael J. Wysocki drivers/acpi/ac.c | 2 +- drivers/acpi/battery.c | 147 ++++++++++++++++++++++++++++++++++++++++++++++++- drivers/acpi/battery.h | 11 ---- drivers/acpi/sbs.c | 2 +- include/acpi/battery.h | 21 +++++++ 5 files changed, 167 insertions(+), 16 deletions(-) commit ff938cd14d67a7040258759b46e3d5b4548f4c2c Author: Marek Vasut Date: Thu Feb 15 12:33:50 2018 +0100 ARM: shmobile: stout: enable R-Car Gen2 regulator quirk Regulator setup is suboptimal on H2 Stout too. The Stout newly has two DA9210 regulators, so the quirk is extended to handle another DA9210 at i2c address 0x70. Signed-off-by: Marek Vasut Signed-off-by: Simon Horman arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c | 23 +++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit a527709b78b3c9979fb47ddd4c3d3fd96182b504 Author: Jacopo Mondi Date: Tue Feb 20 16:12:06 2018 +0100 soc: renesas: rcar-sysc: Add R-Car M3-N support Add support for R-Car M3-N (R8A77965) power areas. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman .../bindings/power/renesas,rcar-sysc.txt | 1 + drivers/soc/renesas/Kconfig | 5 +++ drivers/soc/renesas/Makefile | 1 + drivers/soc/renesas/r8a77965-sysc.c | 37 ++++++++++++++++++++++ drivers/soc/renesas/rcar-sysc.c | 3 ++ drivers/soc/renesas/rcar-sysc.h | 1 + include/dt-bindings/power/r8a77965-sysc.h | 30 ++++++++++++++++++ 7 files changed, 78 insertions(+) commit 561210706cd00f83f14af124edb3a5ff1b732912 Author: Chris Wilson Date: Wed Feb 21 13:32:36 2018 +0000 drm/i915/execlists: Remove the ring advancement under preemption Load an empty ringbuffer for preemption, ignoring the lite-restore workaround as we know the preempt context is always idle before preemption. Note that after some digging by Michal Winiarski, we found that RING_HEAD is no longer being updated (due to inhibiting context save restore) so this patch is already in effect! Signed-off-by: Chris Wilson Cc: Michal Winiarski Cc: Michel Thierry Cc: Michal Wajdeczko Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20180221133236.29402-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 7 ------- 1 file changed, 7 deletions(-) commit e61e0f51ba7974bb575cdc23220b573e5cd4ff2a Author: Chris Wilson Date: Wed Feb 21 09:56:36 2018 +0000 drm/i915: Rename drm_i915_gem_request to i915_request We want to de-emphasize the link between the request (dependency, execution and fence tracking) from GEM and so rename the struct from drm_i915_gem_request to i915_request. That is we may implement the GEM user interface on top of requests, but they are an abstraction for tracking execution rather than an implementation detail of GEM. (Since they are not tied to HW, we keep the i915 prefix as opposed to intel.) In short, the spatch: @@ @@ - struct drm_i915_gem_request + struct i915_request A corollary to contracting the type name, we also harmonise on using 'rq' shorthand for local variables where space if of the essence and repetition makes 'request' unwieldy. For globals and struct members, 'request' is still much preferred for its clarity. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Mika Kuoppala Cc: Tvrtko Ursulin Cc: Michał Winiarski Cc: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20180221095636.6649-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala Reviewed-by: Michał Winiarski Acked-by: Joonas Lahtinen drivers/gpu/drm/i915/Makefile | 2 +- drivers/gpu/drm/i915/gvt/scheduler.c | 16 +- drivers/gpu/drm/i915/gvt/scheduler.h | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 6 +- drivers/gpu/drm/i915/i915_drv.c | 6 +- drivers/gpu/drm/i915/i915_drv.h | 26 +- drivers/gpu/drm/i915/i915_gem.c | 88 +- drivers/gpu/drm/i915/i915_gem_batch_pool.c | 2 +- drivers/gpu/drm/i915/i915_gem_context.c | 18 +- drivers/gpu/drm/i915/i915_gem_context.h | 2 +- drivers/gpu/drm/i915/i915_gem_evict.c | 4 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 60 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 38 +- drivers/gpu/drm/i915/i915_gem_gtt.h | 5 +- drivers/gpu/drm/i915/i915_gem_object.h | 2 +- drivers/gpu/drm/i915/i915_gem_render_state.c | 2 +- drivers/gpu/drm/i915/i915_gem_render_state.h | 4 +- drivers/gpu/drm/i915/i915_gem_request.c | 1397 ------------------- drivers/gpu/drm/i915/i915_gem_request.h | 730 ---------- drivers/gpu/drm/i915/i915_gem_shrinker.c | 4 +- drivers/gpu/drm/i915/i915_gem_timeline.h | 4 +- drivers/gpu/drm/i915/i915_gpu_error.c | 18 +- drivers/gpu/drm/i915/i915_irq.c | 8 +- drivers/gpu/drm/i915/i915_perf.c | 28 +- drivers/gpu/drm/i915/i915_request.c | 1411 ++++++++++++++++++++ drivers/gpu/drm/i915/i915_request.h | 738 ++++++++++ drivers/gpu/drm/i915/i915_trace.h | 128 +- drivers/gpu/drm/i915/i915_vma.c | 3 +- drivers/gpu/drm/i915/i915_vma.h | 2 +- drivers/gpu/drm/i915/intel_breadcrumbs.c | 31 +- drivers/gpu/drm/i915/intel_display.c | 8 +- drivers/gpu/drm/i915/intel_drv.h | 3 +- drivers/gpu/drm/i915/intel_engine_cs.c | 26 +- drivers/gpu/drm/i915/intel_guc_submission.c | 27 +- drivers/gpu/drm/i915/intel_lrc.c | 115 +- drivers/gpu/drm/i915/intel_mocs.c | 28 +- drivers/gpu/drm/i915/intel_mocs.h | 2 +- drivers/gpu/drm/i915/intel_overlay.c | 82 +- drivers/gpu/drm/i915/intel_pm.c | 4 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 196 ++- drivers/gpu/drm/i915/intel_ringbuffer.h | 78 +- drivers/gpu/drm/i915/selftests/huge_pages.c | 6 +- .../gpu/drm/i915/selftests/i915_gem_coherency.c | 8 +- drivers/gpu/drm/i915/selftests/i915_gem_context.c | 8 +- drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 6 +- drivers/gpu/drm/i915/selftests/i915_gem_object.c | 6 +- drivers/gpu/drm/i915/selftests/i915_gem_request.c | 868 ------------ .../gpu/drm/i915/selftests/i915_live_selftests.h | 2 +- .../gpu/drm/i915/selftests/i915_mock_selftests.h | 2 +- drivers/gpu/drm/i915/selftests/i915_request.c | 865 ++++++++++++ drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 117 +- drivers/gpu/drm/i915/selftests/mock_engine.c | 10 +- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +- drivers/gpu/drm/i915/selftests/mock_request.c | 10 +- drivers/gpu/drm/i915/selftests/mock_request.h | 8 +- 55 files changed, 3633 insertions(+), 3639 deletions(-) commit af9090c2375e6a4a7b3059c9a3d36cb363c35d42 Author: Nathan Fontenot Date: Tue Feb 20 11:04:18 2018 -0600 ibmvnic: Correct goto target for tx irq initialization failure When a failure occurs during initialization of the tx sub crq irqs, we should branch to the cleanup of the tx irqs. The current code branches to the rx irq cleanup and attempts to cleanup the rx irqs which have not been initialized. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a823fed03b5d940e4d57271222a0b959fc2ab201 Author: Yafang Shao Date: Tue Feb 20 21:28:31 2018 +0800 tcp: remove the hardcode in the definition of TCPF Macro TCPF_ macro depends on the definition of TCP_ macro. So it is better to define them with TCP_ marco. Signed-off-by: Yafang Shao Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tcp_states.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 53e20678a1eb12fdae615a018919d137d7e9cfa2 Merge: 960103f 98be9b1 Author: David S. Miller Date: Wed Feb 21 14:24:15 2018 -0500 Merge branch 'tcp-remove-non-GSO-code' Eric Dumazet says: ==================== tcp: remove non GSO code Switching TCP to GSO mode, relying on core networking layers to perform eventual adaptation for dumb devices was overdue. 1) Most TCP developments are done with TSO in mind. 2) Less high-resolution timers needs to be armed for TCP-pacing 3) GSO can benefit of xmit_more hint 4) Receiver GRO is more effective (as if TSO was used for real on sender) -> less ACK packets and overhead. 5) Write queues have less overhead (one skb holds about 64KB of payload) 6) SACK coalescing just works. (no payload in skb->head) 7) rtx rb-tree contains less packets, SACK is cheaper. 8) Removal of legacy code. Less maintenance hassles. Note that I have left the sendpage/zerocopy paths, but they probably can benefit from the same strategy. Thanks to Oleksandr Natalenko for reporting a performance issue for BBR/fq_codel, which was the main reason I worked on this patch series. ==================== Signed-off-by: David S. Miller commit 98be9b12096fb46773b4a509d3822fd17c82218e Author: Eric Dumazet Date: Mon Feb 19 11:56:52 2018 -0800 tcp: remove dead code after CHECKSUM_PARTIAL adoption Since all skbs in write/rtx queues have CHECKSUM_PARTIAL, we can remove dead code. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 13 +++---------- net/ipv4/tcp_output.c | 38 +++++--------------------------------- 2 files changed, 8 insertions(+), 43 deletions(-) commit 4a64fd6ccf127973d1e2b2fc2f8024e550130617 Author: Eric Dumazet Date: Mon Feb 19 11:56:51 2018 -0800 tcp: remove dead code from tcp_set_skb_tso_segs() We no longer have skbs with skb->ip_summed == CHECKSUM_NONE in TCP write queues. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65ec60973af97dab72094490b4d2e9b8e169456c Author: Eric Dumazet Date: Mon Feb 19 11:56:50 2018 -0800 tcp: tcp_sendmsg() only deals with CHECKSUM_PARTIAL We no longer have skbs with skb->ip_summed == CHECKSUM_NONE in TCP write queues. We can remove dead code in tcp_sendmsg(). Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit dead7cdb0daec58490891e59f4fae0c5c76fa5f3 Author: Eric Dumazet Date: Mon Feb 19 11:56:49 2018 -0800 tcp: remove sk_check_csum_caps() Since TCP relies on GSO, we do not need this helper anymore. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/sock.h | 9 --------- net/ipv4/tcp.c | 11 +++-------- 2 files changed, 3 insertions(+), 17 deletions(-) commit 74d4a8f8d378ddbe7caf3331804c3d5a276a9b1a Author: Eric Dumazet Date: Mon Feb 19 11:56:48 2018 -0800 tcp: remove sk_can_gso() use After previous commit, sk_can_gso() is always true. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp.c | 34 ++++++++-------------------------- net/ipv4/tcp_input.c | 3 --- 2 files changed, 8 insertions(+), 29 deletions(-) commit 0a6b2a1dc2a2105f178255fe495eb914b09cb37a Author: Eric Dumazet Date: Mon Feb 19 11:56:47 2018 -0800 tcp: switch to GSO being always on Oleksandr Natalenko reported performance issues with BBR without FQ packet scheduler that were root caused to lack of SG and GSO/TSO on his configuration. In this mode, TCP internal pacing has to setup a high resolution timer for each MSS sent. We could implement in TCP a strategy similar to the one adopted in commit fefa569a9d4b ("net_sched: sch_fq: account for schedule/timers drifts") or decide to finally switch TCP stack to a GSO only mode. This has many benefits : 1) Most TCP developments are done with TSO in mind. 2) Less high-resolution timers needs to be armed for TCP-pacing 3) GSO can benefit of xmit_more hint 4) Receiver GRO is more effective (as if TSO was used for real on sender) -> Lower ACK traffic 5) Write queues have less overhead (one skb holds about 64KB of payload) 6) SACK coalescing just works. 7) rtx rb-tree contains less packets, SACK is cheaper. This patch implements the minimum patch, but we can remove some legacy code as follow ups. Tested: On 40Gbit link, one netperf -t TCP_STREAM BBR+fq: sg on: 26 Gbits/sec sg off: 15.7 Gbits/sec (was 2.3 Gbit before patch) BBR+pfifo_fast: sg on: 24.2 Gbits/sec sg off: 14.9 Gbits/sec (was 0.66 Gbit before patch !!! ) BBR+fq_codel: sg on: 24.4 Gbits/sec sg off: 15 Gbits/sec (was 0.66 Gbit before patch !!! ) Signed-off-by: Eric Dumazet Reported-by: Oleksandr Natalenko Signed-off-by: David S. Miller include/net/sock.h | 1 + net/core/sock.c | 2 +- net/ipv4/tcp.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 960103ff8dd176511d3735d22c14fb0a5ce3183e Merge: f905311 abcae54 Author: David S. Miller Date: Wed Feb 21 14:21:56 2018 -0500 Merge branch 'ibmvnic-Make-driver-resources-dynamic' Nathan Fontenot says: ==================== ibmvnic: Make driver resources dynamic The ibmvnic driver needs to be able to handle the number of tx/rx sub-crqs changing during a reset of the driver. To do this several changes need to be made. First the num_active_[tx|rx]_pools counters need to be re-named to num_active_[tc|rx]_scrqs, and updated after resource initialization. With this change we can now release and init the sub crqs and napi (for rx sub crqs) when the number of sub crqs change. Lastly, the stats buffer allocation is updated to always allocate the maximum number of sub-crqs count of stats buffers. -Nathan --- Updates for V3: Patch 3/5 - Make do_h_free parameter a bool Updates for V2: Patch 3/5 - Use correct queue count when driver is in probed state for releasing sub crqs. ==================== Signed-off-by: David S. Miller commit abcae546f7b49f02f4b73d6cc8b33c2fc5f2f8a4 Author: Nathan Fontenot Date: Mon Feb 19 13:30:47 2018 -0600 ibmvnic: Allocate max queues stats buffers To avoid losing any stats when the number of sub-crqs change, allocate the max number of stats buffers so a stats buffer exists all possible sub-crqs. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 86f669b2b7491b5697d9e63538c960ad7e94c6cc Author: Nathan Fontenot Date: Mon Feb 19 13:30:39 2018 -0600 ibmvnic: Make napi usage dynamic In order to handle the number of rx sub crqs changing during a driver reset, the ibmvnic driver also needs to update the number of napi. To do this the code to init and free napi's is moved to their own routines so they can be called during the reset process. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 70 ++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 25 deletions(-) commit d7c0ef36bde03af0d119d895bba4cc0362e79dbb Author: Nathan Fontenot Date: Mon Feb 19 13:30:31 2018 -0600 ibmvnic: Free and re-allocate scrqs when tx/rx scrqs change When the driver resets it is possible that the number of tx/rx sub-crqs can change. This patch handles this so that the driver does not try to access non-existent sub-crqs. The count for releasing sub crqs depends on the adapter state. The active queue count is not set in probe, so if we are relasing in probe state we use the request queue count. Additionally, a parameter is added to release_sub_crqs() so that we know if the h_call to free the sub-crq needs to be made. In the reset path we have to do a reset of the main crq, which is a free followed by a register of the main crq. The free of main crq results in all of the sub crq's being free'ed. When updating sub-crq count in the reset path we do not want to h_free the sub-crqs, they are already free'ed. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 78 +++++++++++++++++++++++++------------- 1 file changed, 52 insertions(+), 26 deletions(-) commit d9043c102e73b9abc01f2120d47ba8195823172a Author: Nathan Fontenot Date: Mon Feb 19 13:30:14 2018 -0600 ibmvnic: Move active sub-crq count settings Inpreparation for using the active scrq count to track more active resources, move the setting of the active count to after initialization occurs in initial driver init and during driver reset. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 8862541de781329b3e1e553bd936cecf998dc565 Author: Nathan Fontenot Date: Mon Feb 19 13:30:05 2018 -0600 ibmvnic: Rename active queue count variables Rename the tx/rx active pool variables to be tx/rx active scrq counts. The tx/rx pools are per sub-crq so this is a more appropriate name. This also is a preparatory step for using thiese variables for handling updates to sub-crqs and napi based on the active count. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 16 ++++++++-------- drivers/net/ethernet/ibm/ibmvnic.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) commit f905311356ecb9c88aceeb4fa63ee0a244fc2d72 Author: Gustavo A. R. Silva Date: Mon Feb 19 12:10:20 2018 -0600 rds: send: mark expected switch fall-through in rds_rm_size In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1465362 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Acked-by: Sowmini Varadhan Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/send.c | 2 ++ 1 file changed, 2 insertions(+) commit aa00d40b2e0b28d9cc9642518f07985d044c2b70 Merge: 4be83e5 4a1b27c Author: David S. Miller Date: Wed Feb 21 14:14:05 2018 -0500 Merge branch '8390-cleanups' Finn Thain says: ==================== Fixes, cleanup and modernization for 8390 ethernet drivers Changes since v4 of combined patch series: - Removed redundant and non-portable MACH_IS_MAC tests. - Added acked-by tags from Geert Uytterhoeven. - Omitted patches unrelated to 8390 drivers. ==================== Signed-off-by: David S. Miller commit 4a1b27c9e32c3993bb2c9efd8776117ca7eefa78 Author: Finn Thain Date: Sun Feb 18 21:39:17 2018 -0500 net/mac8390: Fix log messages Use dev_foo() to log the slot number instead of the unexpanded "eth%d" format string. Disambiguate the two identical "Card type %s is unsupported" messages. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller drivers/net/ethernet/8390/mac8390.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) commit 494a973e22954249d35152cce1dcfba6d10c52e4 Author: Finn Thain Date: Sun Feb 18 21:39:17 2018 -0500 net/mac8390: Convert to nubus_driver This resolves an old bug that constrained this driver to no more than one card. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller drivers/net/Space.c | 3 - drivers/net/ethernet/8390/mac8390.c | 139 +++++++++++++++++------------------- include/net/Space.h | 1 - 3 files changed, 67 insertions(+), 76 deletions(-) commit 646fe03b0d5fb678f0901e25eb184ae8860744fa Author: Finn Thain Date: Sun Feb 18 21:39:17 2018 -0500 net/8390: Fix msg_enable patch snafu The lib8390 module parameter 'msg_enable' doesn't do anything useful: it causes an ancient version string to be logged. Remove redundant code that logs the same string. In ne.c and wd.c, the value of ei_local->msg_enable is used before being assigned. Use ne_msg_enable and wd_msg_enable, respectively. Most of the other 8390 drivers never assign ei_local->msg_enable. Use the 'msg_enable' module parameter from lib8390 as the default value. Eliminate the pointless static and local variables. Clean up an indentation mistake. All of these issues originated from the same patch. Cc: Russell King Fixes: c45f812f0280 ("8390 : Replace ei_debug with msg_enable/NETIF_MSG_* feature") Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller drivers/net/ethernet/8390/ax88796.c | 3 --- drivers/net/ethernet/8390/axnet_cs.c | 2 -- drivers/net/ethernet/8390/etherh.c | 17 ----------------- drivers/net/ethernet/8390/hydra.c | 4 ---- drivers/net/ethernet/8390/lib8390.c | 2 ++ drivers/net/ethernet/8390/mac8390.c | 8 -------- drivers/net/ethernet/8390/mcf8390.c | 4 ---- drivers/net/ethernet/8390/ne.c | 2 +- drivers/net/ethernet/8390/pcnet_cs.c | 4 ---- drivers/net/ethernet/8390/wd.c | 2 +- drivers/net/ethernet/8390/zorro8390.c | 5 ----- 11 files changed, 4 insertions(+), 49 deletions(-) commit 73219de29486637c82925e963380bda020e4edfb Author: Finn Thain Date: Sun Feb 18 21:39:17 2018 -0500 net/8390: Remove redundant make dependencies The hydra, zorro8390 and mcf8390 drivers all #include "lib8390.c" and have no need for 8390.o. modinfo confirms no dependency on 8390.ko. Drop the redundant dependency from the Makefile. objdump confirms that this patch has no effect on the module binaries. The superfluous additions of 8390.o were introduced in commit 644570b83026 ("8390: Move the 8390 related drivers"). Cc: Greg Ungerer Cc: Geert Uytterhoeven Signed-off-by: Finn Thain Acked-by: Geert Uytterhoeven Acked-by: Greg Ungerer Signed-off-by: David S. Miller drivers/net/ethernet/8390/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ea3f0ef37c56641779519c18bab7f60cf9eb9a15 Author: Dhinakaran Pandiyan Date: Tue Feb 20 23:39:08 2018 -0800 drm/doc: Fix documentation for _vblank_restore(). No code changes, fixes doc build warnings and polish some doc text. Reported-by: Daniel Vetter Cc: Rodrigo Vivi Cc: Daniel Vetter Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180221073908.4500-1-dhinakaran.pandiyan@intel.com drivers/gpu/drm/drm_vblank.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 7b3b61b62a58b7be8af838aa7d726720e38087ee Author: Daniel Vetter Date: Tue Feb 20 14:20:17 2018 +0100 drm/todo: i915 could use device_link_add Noticed while reading some unrelated patches. Unfortunately Imre's patch to add our early/late hooks predated the device_link infrastructure by 2 years. Cc: Imre Deak Cc: Takashi Iwai Acked-by: Imre Deak Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180220132017.30719-1-daniel.vetter@ffwll.ch Documentation/gpu/todo.rst | 7 +++++++ 1 file changed, 7 insertions(+) commit 4be83e5aa21e667b0c25e2e87e5bb9bf260d870d Author: Heiner Kallweit Date: Tue Feb 20 07:30:16 2018 +0100 r8169: remove not needed PHY soft reset in rtl8168e_2_hw_phy_config rtl8169_init_phy() resets the PHY anyway after applying the chip-specific PHY configuration. So we don't need to soft-reset the PHY as part of the chip-specific configuration. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 2 -- 1 file changed, 2 deletions(-) commit ccc007e4a746bb592d3e72106f00241f81d51410 Author: Eyal Birger Date: Thu Feb 15 19:42:43 2018 +0200 net: sched: add em_ipt ematch for calling xtables matches The commit a new tc ematch for using netfilter xtable matches. This allows early classification as well as mirroning/redirecting traffic based on logic implemented in netfilter extensions. Current supported use case is classification based on the incoming IPSec state used during decpsulation using the 'policy' iptables extension (xt_policy). The module dynamically fetches the netfilter match module and calls it using a fake xt_action_param structure based on validated userspace provided parameters. As the xt_policy match does not access skb->data, no skb modifications are needed on match. Signed-off-by: Eyal Birger Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 3 +- include/uapi/linux/tc_ematch/tc_em_ipt.h | 20 +++ net/sched/Kconfig | 12 ++ net/sched/Makefile | 1 + net/sched/em_ipt.c | 257 +++++++++++++++++++++++++++++++ 5 files changed, 292 insertions(+), 1 deletion(-) commit 8091788f3d3856a0b6eabebf4e34cfecb38cfe96 Author: Sergei Shtylyov Date: Fri Feb 16 21:38:31 2018 +0300 arm64: dts: renesas: condor: add EtherAVB support Define the Condor board dependent part of the EtherAVB device node. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77980-condor.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b9edbce9155c718a1eeed535e88f88d4b6ef7783 Author: Sergei Shtylyov Date: Fri Feb 16 21:35:22 2018 +0300 arm64: dts: renesas: initial Condor board device tree Add the initial device tree for the R8A77980 SoC based Condor board. The board has 1 debug serial port (SCIF0); include support for it, so that the serial console can work. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven [simon: correct memory size to 0x78000000 (2GiB)] Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/Makefile | 1 + arch/arm64/boot/dts/renesas/r8a77980-condor.dts | 45 +++++++++++++++++++++++++ 2 files changed, 46 insertions(+) commit bf6f90832f81710ee944dce05ecbef04d1943664 Author: Sergei Shtylyov Date: Fri Feb 16 21:32:54 2018 +0300 arm64: dts: renesas: r8a77980: add EtherAVB support Define the generic R8A77980 part of the EtherAVB device node. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77980.dtsi | 44 +++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 3601d98ceab56e3d04c9c5e029903bee0337cb94 Author: Sergei Shtylyov Date: Fri Feb 16 21:30:23 2018 +0300 arm64: dts: renesas: r8a77980: add [H]SCIF support Describe [H]SCIF ports in the R8A77980 device tree. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77980.dtsi | 151 ++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) commit bfd8398339ccd824a3c5dfaee2a2b489a85b132f Author: Jacopo Mondi Date: Tue Feb 20 16:12:05 2018 +0100 soc: renesas: Identify R-Car M3-N Add support for indentifying R-Car M3-N (R8A77965) SoC. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman drivers/soc/renesas/renesas-soc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a02633e9b13dcb9b1a656b08f81bc8ba2d4d2294 Merge: d21bd68 91ab883 Author: James Morris Date: Wed Feb 21 08:21:41 2018 -0800 Merge tag 'v4.16-rc2' into next-general Sync to Linux 4.16-rc2 for developers to work against. commit 5cb300ce806bfe3273bb94d373d43ca35c33ffdf Author: Yoshihiro Shimoda Date: Wed Feb 21 14:57:16 2018 +0900 arm64: defconfig: Enable PWM and USB for R-Car Enables PWM controller, USB-DMAC that is used by HS-USB, USB 3.0 peripheral controller and USB 3.0 PHY for R-Car SoCs. Signed-off-by: Yoshihiro Shimoda Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/configs/defconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 8a331f4a0863bea758561c921b94b4d28f7c4029 Author: Yazen Ghannam Date: Wed Feb 21 11:19:00 2018 +0100 x86/mce/AMD: Carve out SMCA get_block_address() code Carve out the SMCA code in get_block_address() into a separate helper function. No functional change. Signed-off-by: Yazen Ghannam [ Save an indentation level. ] Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20180215210943.11530-4-Yazen.Ghannam@amd.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce_amd.c | 57 ++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 26 deletions(-) commit 27bd59502702fe51d9eb00450a75b727ec6bfcb4 Author: Yazen Ghannam Date: Wed Feb 21 11:18:59 2018 +0100 x86/mce/AMD: Get address from already initialized block The block address is saved after the block is initialized when threshold_init_device() is called. Use the saved block address, if available, rather than trying to rediscover it. This will avoid a call trace, when resuming from suspend, due to the rdmsr_safe_on_cpu() call in get_block_address(). The rdmsr_safe_on_cpu() call issues an IPI but we're running with interrupts disabled. This triggers: WARNING: CPU: 0 PID: 11523 at kernel/smp.c:291 smp_call_function_single+0xdc/0xe0 Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: # 4.14.x Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20180221101900.10326-8-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce_amd.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 68627a697c195937672ce07683094c72b1174786 Author: Yazen Ghannam Date: Wed Feb 21 11:18:58 2018 +0100 x86/mce/AMD, EDAC/mce_amd: Enumerate Reserved SMCA bank type Currently, bank 4 is reserved on Fam17h, so we chose not to initialize bank 4 in the smca_banks array. This means that when we check if a bank is initialized, like during boot or resume, we will see that bank 4 is not initialized and try to initialize it. This will cause a call trace, when resuming from suspend, due to rdmsr_*on_cpu() calls in the init path. The rdmsr_*on_cpu() calls issue an IPI but we're running with interrupts disabled. This triggers: WARNING: CPU: 0 PID: 11523 at kernel/smp.c:291 smp_call_function_single+0xdc/0xe0 ... Reserved banks will be read-as-zero, so their MCA_IPID register will be zero. So, like the smca_banks array, the threshold_banks array will not have an entry for a reserved bank since all its MCA_MISC* registers will be zero. Enumerate a "Reserved" bank type that matches on a HWID_MCATYPE of 0,0. Use the "Reserved" type when checking if a bank is reserved. It's possible that other bank numbers may be reserved on future systems. Don't try to find the block address on reserved banks. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: # 4.14.x Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20180221101900.10326-7-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/include/asm/mce.h | 1 + arch/x86/kernel/cpu/mcheck/mce_amd.c | 7 +++++++ drivers/edac/mce_amd.c | 11 +++++++---- 3 files changed, 15 insertions(+), 4 deletions(-) commit e5d6a126d4c473499f354254a15ca0c2d8c84ca3 Author: Yazen Ghannam Date: Wed Feb 21 11:18:57 2018 +0100 x86/mce/AMD: Pass the bank number to smca_get_bank_type() Pass the bank number to smca_get_bank_type() since that's all we need. Also, we should compare the bank number to MAX_NR_BANKS (size of the smca_banks array) not the number of bank types. Bank types are reused for multiple banks, so the number of types can be different from the number of banks in a system and thus we could return an invalid bank type. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: # 4.14.x Cc: # 4.14.x: 11cf887728a3 x86/MCE/AMD: Define a function to get SMCA bank type Cc: # 4.14.x: c6708d50f166 x86/MCE: Report only DRAM ECC as memory errors on AMD systems Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20180221101900.10326-6-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce_amd.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 4b1e84276a6172980c5bf39aa091ba13e90d6dad Author: Borislav Petkov Date: Wed Feb 21 11:18:56 2018 +0100 x86/mce/AMD: Collect error info even if valid bits are not set The MCA banks log error info into MCA_ADDR, MCA_MISC0, and MCA_SYND even if the corresponding valid bits are not set: "Error handlers should save the values in MCA_ADDR, MCA_MISC0, and MCA_SYND even if MCA_STATUS[AddrV], MCA_STATUS[MiscV], and MCA_STATUS[SyndV] are zero." Do so by setting those bits so that code down the MCE processing path doesn't need to be changed. Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20180221101900.10326-5-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit b2fbf6f282147b42d669a4bd4a7b1de2e2d6a792 Author: Borislav Petkov Date: Wed Feb 21 11:18:55 2018 +0100 x86/mce: Issue the 'mcelog --ascii' message only on !AMD mcelog cannot decode AMD MCEs. Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20180221101900.10326-4-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 09933946643bcc8e0a9bd4ede192ed854e22db8f Author: Borislav Petkov Date: Wed Feb 21 11:18:54 2018 +0100 x86/mce: Convert 'struct mca_config' bools to a bitfield ... to save space when future flags are added. No functionality change. Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20180221101900.10326-3-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce-internal.h | 13 ++++++++----- arch/x86/kernel/cpu/mcheck/mce.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 13 deletions(-) commit a189c03235639a31343215f82b83b49985c55336 Author: Borislav Petkov Date: Wed Feb 21 11:18:53 2018 +0100 x86/mce: Put private structures and definitions into the internal header ... because they don't need to be exported outside of MCE. Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20180221101900.10326-2-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/include/asm/mce.h | 52 ---------------------------- arch/x86/kernel/cpu/mcheck/mce-internal.h | 56 +++++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 54 deletions(-) commit 42811d509d6e0b0118918ce6be346be54d8e8801 Author: Andi Kleen Date: Thu Oct 5 19:00:28 2017 -0700 perf stat: Use xyarray dimensions to iterate fds Now that the xyarray stores the dimensions we can use those to iterate over the FDs for a evsel. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20171006020029.13339-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 158863fb50968c0ae85e87a401221425c941b9f0 Author: Tvrtko Ursulin Date: Tue Feb 20 10:47:42 2018 +0000 drm/i915: Make global seqno known in i915_gem_request_execute tracepoint Commit fe49789fab97 ("drm/i915: Deconstruct execute fence") re-arranged the code and moved the i915_gem_request_execute tracepoint to before the global seqno is assigned to the request. We need to move the tracepoint a bit later so this information is once again available. Signed-off-by: Tvrtko Ursulin Fixes: fe49789fab97 ("drm/i915: Deconstruct execute fence") Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180220104742.565-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_gem_request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fed8165851e262575585b22055ff5dba7d91b0e5 Author: Joonas Lahtinen Date: Wed Feb 21 15:21:30 2018 +0200 drm/i915: Update DRIVER_DATE to 20180221 Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c4f509a53cbcd968677c7f15c07260dd6c2276c Author: Nicolin Chen Date: Mon Feb 12 14:03:25 2018 -0800 ASoC: fsl_ssi: Use ssi->streams instead of reading register Since ssi->streams is being updated along with SCR register and its SSIEN bit, it's simpler to use it instead. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 76f3845110d7d40eb60c12bc64cdfe431a985947 Author: Nicolin Chen Date: Mon Feb 12 14:03:24 2018 -0800 ASoC: fsl_ssi: Move DT related code to a separate probe() This patch cleans up probe() function by moving all Device Tree related code into a separate function. It allows the probe() to be Device Tree independent. This will be very useful for future integration of imx-ssi driver which has similar functionalities while exists only because it supports non-DT cases. This patch also moves symmetric_channels of AC97 from the probe to the structure snd_soc_dai_driver for simplification. Additionally, since PowerPC and AC97 use the same pdev pointer to register a platform device, this patch also unifies related code. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 219 +++++++++++++++++++++++++++--------------------- 1 file changed, 124 insertions(+), 95 deletions(-) commit badc9595bc15686be3b01e3554421647de348df0 Author: Nicolin Chen Date: Mon Feb 12 14:03:23 2018 -0800 ASoC: fsl_ssi: Add bool synchronous to mark synchronous mode Using symmetric_rates in the cpu_dai_drv is a bit implicit, so this patch adds a bool synchronous instead. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 26b31f4f7d7905f67b6faa52ef147595341134c5 Author: Nicolin Chen Date: Mon Feb 12 14:03:22 2018 -0800 ASoC: fsl_ssi: Clean up _fsl_ssi_set_dai_fmt() The _fsl_ssi_set_dai_fmt() is a helper function being called from fsl_ssi_set_dai_fmt() as an ASoC operation and fsl_ssi_hw_init() mainly for AC97 format initialization. This patch cleans the _fsl_ssi_set_dai_fmt() in following ways: * Removing *dev pointer in the parameters as it's included in the *ssi pointer of struct fsl_ssi. * Using regmap_update_bits() instead of regmap_read() with masking the value manually. * Moving baudclk check to the switch-case routine to skip the I2S master check. And moving SxCCR.DC settings after baudclk check. * Adding format settings for SND_SOC_DAIFMT_AC97 like others. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 74 +++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 39 deletions(-) commit 37ac30a4bdc397cf1311111264ac35dc8473e1de Author: Nicolin Chen Date: Mon Feb 12 14:03:21 2018 -0800 ASoC: fsl_ssi: Setup AC97 in fsl_ssi_hw_init() AC97 configures most of registers earlier to start a communication with CODECs in order to successfully initialize CODEC. Currently, _fsl_ssi_set_dai_fmt() and fsl_ssi_setup_ac97() are called to get all SSI registers properly set. Since now the driver has a fsl_ssi_hw_init() to handle all register initial settings, this patch moves those register settings of AC97 to the fsl_ssi_hw_init() as well. Meanwhile it applies _fsl_ssi_set_dai_fmt() call to AC97 only since other formats would be configured via normal set_dai_fmt() directly. This patch also adds fsl_ssi_hw_clean() to cleanup control bits for AC97 in the platform remote() function. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) commit a1d154ac2765cf982be0d4d378bc6ba342c467a3 Author: Nicolin Chen Date: Mon Feb 12 14:03:20 2018 -0800 ASoC: fsl_ssi: Move one-time configurations to probe() The probe() could handle some one-time configurations since they will not be changed once being configured. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) commit 40f2563377006b14b94a4f5e9547b8e4498125af Author: Nicolin Chen Date: Mon Feb 12 14:03:19 2018 -0800 ASoC: fsl_ssi: Use snd_soc_init_dma_data instead Since there is a helper function, use it to help readability. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 702d7965e402a8dcd88e964fd5bba6f5f159d625 Author: Nicolin Chen Date: Mon Feb 12 14:03:18 2018 -0800 ASoC: fsl_ssi: Set xFEN0 and xFEN1 together It'd be safer to enable both FIFOs for TX or RX at the same time. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 501bc1d70cf5ba8ccd9775ce987c90485034464e Author: Nicolin Chen Date: Mon Feb 12 14:03:17 2018 -0800 ASoC: fsl_ssi: Clean up fsl_ssi_setup_regvals() This patch cleans fsl_ssi_setup_regvals() by following changes: 1) Moving DBG bits to the first lines. 2) Setting SSIE, RE/TE as default and cleaning it for AC97 Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit b6c93f7f60a0d0b61c1fce2872b9d4f7263d6ec2 Author: Nicolin Chen Date: Mon Feb 12 14:03:16 2018 -0800 ASoC: fsl_ssi: Add DAIFMT define for AC97 The _fsl_ssi_set_dai_fmt() bypasses an undefined format for AC97 mode. However, it's not really necessary if AC97 has its complete format defined. So this patch adds a DAIFMT macro of complete format including a clock direction and polarity. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 7d67bcb669bc92d5de037c7dadcebaf0c8f5ad24 Author: Nicolin Chen Date: Mon Feb 12 14:03:15 2018 -0800 ASoC: fsl_ssi: Clean up helper functions of trigger() The trigger() calls fsl_ssi_tx_config() and fsl_ssi_rx_config(), and both of them jump to fsl_ssi_config(). And fsl_ssi_config() later calls another fsl_ssi_rxtx_config(). However, the whole routine, especially fsl_ssi_config() function, is too complicated because of the folowing reasons: 1) It has to handle the concern of the opposite stream. 2) It has to handle cases of offline configurations support. 3) It has to handle enable and disable operations while they're mostly different. Since the enable and disable routines have more differences than TX and RX rountines, this patch simplifies these helper functions with the following changes: - Changing to two helper functions of enable and disable instead of TX and RX. - Removing fsl_ssi_rxtx_config() by separately integrating it to two newly introduced enable & disable functions. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 256 +++++++++++++++++++++++------------------------- 1 file changed, 122 insertions(+), 134 deletions(-) commit 2e1327403b2543bc4dd639571b84bf6174212cee Author: Nicolin Chen Date: Mon Feb 12 14:03:14 2018 -0800 ASoC: fsl_ssi: Clear FIFO directly in fsl_ssi_config() The FIFO clear helper function is just one line of code now. So it could be cleaned up by removing it and calling regmap directly. Meanwhile, FIFO clear could be applied to all use cases, not confined to AC97. So this patch also moves FIFO clear in the trigger() to fsl_ssi_config() and removes the AC97 check. Note that SOR register is safe from offline_config HW limit. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) commit 06a994540505a9ce7028d9e801c52f967654b836 Author: Nicolin Chen Date: Mon Feb 12 14:03:13 2018 -0800 ASoC: fsl_ssi: Rename fsl_ssi_disable_val macro The define of fsl_ssi_disable_val is not so clear as it mixes two steps of calculations together. And those parameter names are also a bit long to read. Since it just tries to exclude the shared bits from the regvals of current stream while the opposite stream is active, it's better to use something like ssi_excl_shared_bits. This patch also bisects fsl_ssi_disable_val into two macros of two corresponding steps and then shortens its parameter names. It also updates callers in the fsl_ssi_config() accordingly. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 55 +++++++++++++++++++++---------------------------- 1 file changed, 23 insertions(+), 32 deletions(-) commit e0582731abe004163e78ad2dac4cd1196db0908f Author: Nicolin Chen Date: Mon Feb 12 14:03:12 2018 -0800 ASoC: fsl_ssi: Maintain a mask of active streams Checking TE and RE bits in SCR register doesn't work for AC97 mode which enables SSIEN, TE and RE in the fsl_ssi_setup_ac97() that's called during probe(). So when running into the trigger(), it will always get the result of both TE and RE being enabled already, even if actually there is no active stream. This patch fixes this issue by adding a variable to log the active streams manually. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 09947634829ccc5568a80ac02c3395a8b77276c1 Author: Nicolin Chen Date: Mon Feb 12 14:03:11 2018 -0800 ASoC: fsl_ssi: Clean up set_dai_tdm_slot() This patch replaces the register read with ssi->i2s_net for simplification. It also removes masking SSIEN from scr value since it's handled later by regmap_update_bits() to set this scr value back. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ebf08ae3bc906fc5dd33d02977efa5d4b9831517 Author: Nicolin Chen Date: Mon Feb 12 14:03:10 2018 -0800 ASoC: fsl_ssi: Keep ssi->i2s_net updated The hw_params() overwrites i2s_net settings for special cases like mono-channel support, however, it doesn't update ssi->i2s_net as set_dai_fmt() does. This patch removes the local i2s_net variable and directly updates ssi->i2s_net in the hw_params() so that the driver can simply look up the ssi->i2s_net instead of reading the register. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1476105c3f4a6b8f0c6c1fe07295fc85cbffbd83 Author: Nicolin Chen Date: Mon Feb 12 14:03:09 2018 -0800 ASoC: fsl_ssi: Redefine RX and TX macros The RX and TX macros were defined implicitly and there was a potential risk if someone changes their values. Since they were defined to index the array ssi->regvals[2], this patch moves these two macros to fsl_ssi.c, closer to its owner ssi->regvals. And it also puts some comments here to limit their value within [0, 1]. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 4 ++++ sound/soc/fsl/fsl_ssi.h | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) commit de7112868829b3286def38297848d5d2592b4a70 Author: Sangwon Hong Date: Mon Feb 12 04:37:44 2018 +0900 perf kallsyms: Fix the usage on the man page First, all man pages highlight only perf and subcommands except 'perf kallsyms', which includes the full usage. Fix it for commands to monopolize underlines. Second, options can be ommited when executing 'perf kallsyms', so add square brackets between $( Signed-off-by: Alexei Starovoitov samples/bpf/xdp_redirect_user.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 46347502b099d9cff0b635a2eb33c27de9b80b80 Author: Matthew Wilcox Date: Tue Feb 13 13:15:37 2018 -0800 Restructure kernel-doc.rst I found the layout confusing with multiple introductions to what kernel-doc is and how to use it. I made the following changes: - Moved the 'Including kernel-doc comments' section to the end of the document -- we should explain what it *is* before we explain how to integrate it. - Moved the 'Recommendations' subsection to the top. We want people to know what to document before telling them how to do it. - Rewrite the 'Writing kernel-doc comments' section, integrating the 'Recommendations' subsection and a paragraph from 'How to format kernel-doc comments'. - Remove the paragraph about the kernel-doc script; we're supposed to be teaching people how to use punctuation to write pretty documentation, not documenting the build tooling. - Split the 'Parameters and member arguments' section into 'Function parameters' and 'Members'. Structure members are not commonly referred to as arguments. - Integrate the 'private:' and 'public:' tag descriptions into the 'Members' section. - Move the 'In-line member documentation comments' subsection up to be with the 'Members' section. Signed-off-by: Matthew Wilcox Signed-off-by: Jonathan Corbet Documentation/doc-guide/kernel-doc.rst | 476 +++++++++++++++------------------ 1 file changed, 217 insertions(+), 259 deletions(-) commit 9831e5548a5632572555f3855fb1e23b0b1580a5 Author: Matthew Wilcox Date: Tue Feb 13 13:15:36 2018 -0800 Fix whitespace in example Line up the second line in the way that the example purports to be showing. Signed-off-by: Matthew Wilcox Signed-off-by: Jonathan Corbet Documentation/doc-guide/kernel-doc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b229fbec89b90f73d1829e022163d9b896dc94c Author: Matthew Wilcox Date: Tue Feb 13 13:15:35 2018 -0800 Add scripts/split-man.pl Instead of asking the user to copy and paste a small perl script from the documentation, just distribute the perl script in the scripts directory. Signed-off-by: Matthew Wilcox Signed-off-by: Jonathan Corbet Documentation/doc-guide/kernel-doc.rst | 30 ++---------------------------- scripts/split-man.pl | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 28 deletions(-) commit dcb50d979ecc80e1f2d90acb7734d7bcd0e44672 Author: Matthew Wilcox Date: Tue Feb 13 13:15:34 2018 -0800 Minor fixes to kernel-doc.rst The author clearly meant to use the word 'which' here. Also replace some tabs with spaces which fixes the syntax highlighting in my editor. Signed-off-by: Matthew Wilcox Signed-off-by: Jonathan Corbet Documentation/doc-guide/kernel-doc.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit da70b8c47515ea408e3ab7fd97307ef16d3b9ff1 Author: Matthew Wilcox Date: Tue Feb 13 13:15:33 2018 -0800 Add documentation for Context section This section is mentioned in scripts/kernel-doc, so we should mention it in doc-guide/kernel-doc.rst. There are close to 500 comments using the Context section already, and almost 300 using a Locking section which fulfills much the same purpose (and should probably be converted for consistency). Signed-off-by: Matthew Wilcox Signed-off-by: Jonathan Corbet Documentation/doc-guide/kernel-doc.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit e474785a12b46230ecf9f3663166b0de1175bcdc Author: Dominik Brodowski Date: Sat Feb 10 13:55:15 2018 +0100 Documentation/process: Co-developed-by instead of Co-Developed-by Up to now, all commit messages have used the "d" in lower case. Signed-off-by: Dominik Brodowski Signed-off-by: Jonathan Corbet Documentation/process/5.Posting.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2532e438aecf328e510a6d72fd5bbb49199f6b2 Author: Xiongwei Song Date: Sun Feb 4 18:14:24 2018 +0800 tracing: Fix incorrect file name There is no file named 'enabled' in the directory tracing/events. It should be the file 'enable'. Signed-off-by: Xiongwei Song Signed-off-by: Jonathan Corbet Documentation/trace/events.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5134d2fd9fe1278ecb309421275d88b6c80ebddd Author: Colin Ian King Date: Tue Jan 23 10:17:27 2018 +0000 rtc: ds1302: remove redundant initializations of pointer bp Pointe bp is being initialized and this value is never read, it is being updated to the same value later just before it is going to be used. Remove the initialization as it is never read and keep the setting of bp closer to the use of bp. Cleans up clang warnings: drivers/rtc/rtc-ds1302.c:115:7: warning: Value stored to 'bp' during its initialization is never read drivers/rtc/rtc-ds1302.c:46:7: warning: Value stored to 'bp' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1302.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 82d632b85eb89f97051530f556cb49ee1c04bde7 Author: James Hogan Date: Tue Jan 16 14:45:21 2018 +0000 rtc: goldfish: Add missing MODULE_LICENSE Fix the following warning in MIPS allmodconfig by adding a MODULE_LICENSE() at the end of rtc-goldfish.c, based on the file header comment which says GNU General Public License version 2: WARNING: modpost: missing MODULE_LICENSE() in drivers/rtc/rtc-goldfish.o Fixes: f22d9cdcb5eb ("rtc: goldfish: Add RTC driver for Android emulator") Signed-off-by: James Hogan Cc: Miodrag Dinic Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: linux-rtc@vger.kernel.org Signed-off-by: Alexandre Belloni drivers/rtc/rtc-goldfish.c | 2 ++ 1 file changed, 2 insertions(+) commit 36d46cdb43efea74043e29e2a62b13e9aca31452 Author: Baolin Wang Date: Mon Dec 25 19:10:37 2017 +0800 rtc: Fix overflow when converting time64_t to rtc_time If we convert one large time values to rtc_time, in the original formula 'days * 86400' can be overflowed in 'unsigned int' type to make the formula get one incorrect remain seconds value. Thus we can use div_s64_rem() function to avoid this situation. Signed-off-by: Baolin Wang Acked-by: Arnd Bergmann Signed-off-by: Alexandre Belloni drivers/rtc/rtc-lib.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 29a1f599c0cc37004f92ba455d1ccda3db0b6a94 Author: Baolin Wang Date: Thu Dec 14 13:31:43 2017 +0800 rtc: Add tracepoints for RTC system It will be more helpful to add some tracepoints to track RTC actions when debugging RTC driver. Below sample is that we set/read the RTC time, then set 2 alarms, so we can see the trace logs: set/read RTC time: kworker/0:1-67 [000] 21.814245: rtc_set_time: UTC (1510301580) (0) kworker/0:1-67 [000] 21.814312: rtc_read_time: UTC (1510301580) (0) set the first alarm timer: kworker/0:1-67 [000] 21.829238: rtc_timer_enqueue: RTC timer:(ffffffc15eb49bc8) expires:1510301700000000000 period:0 kworker/0:1-67 [000] 22.018279: rtc_set_alarm: UTC (1510301700) (0) set the second alarm timer: kworker/0:1-67 [000] 22.230284: rtc_timer_enqueue: RTC timer:(ffffff80088e6430) expires:1510301820000000000 period:0 the first alarm timer was expired: kworker/0:1-67 [000] 145.155584: rtc_timer_dequeue: RTC timer:(ffffffc15eb49bc8) expires:1510301700000000000 period:0 kworker/0:1-67 [000] 145.155593: rtc_timer_fired: RTC timer:(ffffffc15eb49bc8) expires:1510301700000000000 period:0 kworker/0:1-67 [000] 145.172504: rtc_set_alarm: UTC (1510301820) (0) the second alarm timer was expired: kworker/0:1-67 [000] 269.102353: rtc_timer_dequeue: RTC timer:(ffffff80088e6430) expires:1510301820000000000 period:0 kworker/0:1-67 [000] 269.102360: rtc_timer_fired: RTC timer:(ffffff80088e6430) expires:1510301820000000000 period:0 disable alarm irq: kworker/0:1-67 [000] 269.102469: rtc_alarm_irq_enable: disable RTC alarm IRQ (0) Signed-off-by: Baolin Wang Signed-off-by: Alexandre Belloni drivers/rtc/interface.c | 30 +++++++ include/trace/events/rtc.h | 206 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 236 insertions(+) commit 153e1b84f477f716bc3f81e6cfae1a3d941fc7ec Author: David Ahern Date: Tue Feb 13 08:44:06 2018 -0800 selftests: Add FIB onlink tests Add test cases verifying FIB onlink commands work as expected in various conditions - IPv4, IPv6, main table, and VRF. Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/fib-onlink-tests.sh | 375 ++++++++++++++++++++++++ 1 file changed, 375 insertions(+) commit 693acdd0f18b4b2a52439804dd756db8397044da Author: Harshitha Ramamurthy Date: Mon Jan 22 12:00:39 2018 -0500 i40evf: Make VF reset warning message more clear When the PF resets the VF, the VF puts out a warning message indicating that the VF received a reset message from the PF. Make this message more clear so that we do not mistakenly think that the PF is undergoing a reset. Signed-off-by: Harshitha Ramamurthy Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8946b56354b71b1f75b9551aeb33f19c8d792065 Author: Jacob Keller Date: Mon Jan 22 12:00:38 2018 -0500 i40evf: use __dev_[um]c_sync routines in .set_rx_mode Similar to changes done to the PF driver in commit 6622f5cdbaf3 ("i40e: make use of __dev_uc_sync and __dev_mc_sync"), replace our home-rolled method for updating the internal status of MAC filters with __dev_uc_sync and __dev_mc_sync. These new functions use internal state within the netdev struct in order to efficiently break the question of "which filters in this list need to be added or removed" into singular "add this filter" and "delete this filter" requests. This vastly improves our handling of .set_rx_mode especially with large number of MAC filters being added to the device, and even results in a simpler .set_rx_mode handler. Under some circumstances, such as when attached to a bridge, we may receive a request to delete our own permanent address. Prevent deletion of this address during i40evf_addr_unsync so that we don't accidentally stop receiving traffic. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 95 +++++++++++++++---------- 1 file changed, 56 insertions(+), 39 deletions(-) commit 7b63435a5035621baa4de8d15ca1b4440c3b4d12 Author: Dave Ertman Date: Mon Jan 22 12:00:37 2018 -0500 i40e: i40e: Change ethtool check from MAC to HW flag The MAC, FW Version and NPAR check used to determine if shutting off the FW LLDP engine is supported is not using the usual feature check mechanism. This patch fixes the problem by moving the feature check to i40e_sw_init in order to set a flag in pf->hw_features that ethtool will use for priv_flags disable operation. Signed-off-by: Dave Ertman Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 12 ++---------- drivers/net/ethernet/intel/i40e/i40e_main.c | 10 ++++++++++ 3 files changed, 13 insertions(+), 10 deletions(-) commit 7363115efb0452d2ec5b69ae18378a173ac2cf7f Author: Alan Brady Date: Mon Jan 22 12:00:36 2018 -0500 i40e: do not force filter failure in overflow promiscuous Broadcast filters can now cause overflow promiscuous to trigger when adding "too many" VLANs to all the ports of a device and the driver needs a way to exit overflow promiscuous once triggered. Currently the driver looks to see if there are "too many" filters and/or we have any failed filters to determine when it is safe to exit overflow promiscuous. If we trigger overflow promiscuous with broadcast filters, any new filters added will be "auto-failed" until we exit overflow promiscuous. Since the user can't manually remove the failed broadcast filters for VLANs (nor should we expect the user to do such), there is no way to exit overflow promiscuous without reloading the driver. The easiest way to do this is to remove the shortcut to "auto-fail" filters in overflow promiscuous. If the user removes the VLANs, the failed filters will be removed and since we're no longer "auto-failing" new filters, we'll eventually get a good set of filters and exit overflow promiscuous. This has the side benefit of making filter state more explicit in that if a filter says it's failed we know for a fact it failed and not just assuming it will if we're in overflow promiscuous. This is nice because if the user removes some filters and then adds some, even if we're in overflow promiscuous, the filter might succeed; we were just assuming it won't because the user hasn't rectified other existing failed filters. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit cc6a96a41991de1961cfd712a83df21456607d30 Author: Alan Brady Date: Mon Jan 22 12:00:35 2018 -0500 i40e: refactor promisc_changed in i40e_sync_vsi_filters This code here is quite complex and easy to screw up. Let's see if we can't improve the readability and maintainability a bit. This refactors out promisc_changed into two variables 'old_overflow' and 'new_overflow' which makes it a bit clearer when we're concerned about when and how overflow promiscuous is changed. This also makes so that we no longer need to pass a boolean pointer to i40e_aqc_add_filters. Instead we can simply check if we changed the overflow promiscuous flag since the function start. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 42 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit fbd5eb54c28ce314e0cca1505d2261a8a84ebc44 Author: Harshitha Ramamurthy Date: Mon Jan 22 12:00:34 2018 -0500 i40evf: Use an iterator of the same type as the list When iterating through the linked list of VLAN filters, make the iterator the same type as that of the linked list. Signed-off-by: Harshitha Ramamurthy Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit a48350c29be1bde064d1135e05c64c84098a030d Author: Alan Brady Date: Mon Jan 22 12:00:33 2018 -0500 i40e: broadcast filters can trigger overflow promiscuous When adding a bunch of VLANs to all the ports on a device, it's possible to run out of space for broadcast filters. The driver should trigger overflow promiscuous in this circumstance to prevent traffic from being unexpectedly dropped. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7be78aa444794d4d242f8192c627df57e2cc2e98 Author: Mitch Williams Date: Mon Jan 22 12:00:32 2018 -0500 i40e: don't leak memory addresses Could a Bad Person do Bad Things to a server if they found these addresses printed in the log? Who knows? But let's not take that risk. Remove pointers from a bunch of printks. In some cases, I was able to adjust the message to indicate whether or not the value was null. In others, I just removed the entire message as there was really no hope of saving it. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 40 ++++---------------------- drivers/net/ethernet/intel/i40e/i40e_main.c | 13 ++++----- 2 files changed, 12 insertions(+), 41 deletions(-) commit 03f431b33a6486680ff4e43b059176720bb41972 Author: Wei Yongjun Date: Fri Jan 12 02:27:13 2018 +0000 i40evf: use GFP_ATOMIC under spin lock A spin lock is taken here so we should use GFP_ATOMIC. Fixes: 504398f0a78e ("i40evf: use spinlock to protect (mac|vlan)_filter_list") Signed-off-by: Wei Yongjun Acked-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3758d2c74d67be946b623f3736118e5f59c0d504 Author: Wei Yongjun Date: Wed Jan 10 07:13:51 2018 +0000 i40e: Make local function i40e_get_link_speed static Fixes the following sparse warning: drivers/net/ethernet/intel/i40e/i40e_main.c:5440:5: warning: symbol 'i40e_get_link_speed' was not declared. Should it be static? Signed-off-by: Wei Yongjun Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b95367e3bd8eaf2d88d7b7a7ab2847f5a6e70321 Merge: 8c2ceab e2ba732 Author: David S. Miller Date: Tue Feb 13 14:34:29 2018 -0500 Merge branch 'selftests-fib_tests-simplifications-verbosity-and-a-race' David Ahern says: ==================== selftests: fib_tests: simplifications, verbosity and a race Improve efficiency of fib_tests.sh and make the test result more verbose, from this summary: $ fib_tests.sh is failing in a VM: $ fib_tests.sh Running netdev unregister tests PASS: unicast route test PASS: multipath route test Running netdev down tests PASS: unicast route test PASS: multipath route test Running netdev carrier change tests PASS: local route carrier test FAIL: unicast route carrier test where a single entry actually corresponds to many checks to a much more verbse output that clarifies test cases: $fib_tests.sh Single path route carrier test .... Carrier down IPv4 fibmatch [ OK ] IPv6 fibmatch [ OK ] IPv4 linkdown flag set [FAIL] IPv6 linkdown flag set [FAIL] Second address added with carrier down IPv4 fibmatch [ OK ] IPv6 fibmatch [ OK ] IPv4 linkdown flag set [FAIL] IPv6 linkdown flag set [ OK ] And then fix the race in changing carrier down on dummy device to checking the corresponding routes. ==================== Signed-off-by: David S. Miller commit e2ba732a1681d907a6dffbaf9802aebcac233099 Author: David Ahern Date: Tue Feb 13 08:37:36 2018 -0800 selftests: fib_tests: sleep after changing carrier sleep for a second after setting carrier down to allow linkwatch to propagate the change to the routing stack via netdev_state_change. As it stands there is a race setting carrier down on the dummy device and then checking the linkdown flag in the routes. Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/fib_tests.sh | 1 + 1 file changed, 1 insertion(+) commit ee395a5e722c8c7e85641c3017de8f64209ff04f Author: David Ahern Date: Tue Feb 13 08:37:35 2018 -0800 selftests: fib_tests: Move admin of dummy0 to helpers Move setup and teardown of testns and dummy0 to helpers. Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/fib_tests.sh | 100 +++++++++++-------------------- 1 file changed, 34 insertions(+), 66 deletions(-) commit 1056691b26809e838da67bc2a61761017d20cfda Author: David Ahern Date: Tue Feb 13 08:37:34 2018 -0800 selftests: fib_tests: Make test results more verbose fib_tests.sh is failing in a VM: $ fib_tests.sh Running netdev unregister tests PASS: unicast route test PASS: multipath route test Running netdev down tests PASS: unicast route test PASS: multipath route test Running netdev carrier change tests PASS: local route carrier test FAIL: unicast route carrier test The last test corresponds to fib_carrier_unicast_test which 12 places that could be failing. Be more verbose in the output so a failure is easier to track down and separate test setup failures with set -e and set +e pairs. With the verbose logging it is easier to see which checks are failing: $fib_tests.sh Single path route carrier test .... Carrier down IPv4 fibmatch [ OK ] IPv6 fibmatch [ OK ] IPv4 linkdown flag set [FAIL] IPv6 linkdown flag set [FAIL] Second address added with carrier down IPv4 fibmatch [ OK ] IPv6 fibmatch [ OK ] IPv4 linkdown flag set [FAIL] IPv6 linkdown flag set [ OK ] Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/fib_tests.sh | 248 +++++++++++++++++-------------- 1 file changed, 135 insertions(+), 113 deletions(-) commit 07f4e62f1c704f583740e6dd59c223819feb03ec Author: David Ahern Date: Tue Feb 13 08:37:33 2018 -0800 selftests: fib_tests: simplify ip commands in a namespace 'ip netns exec testns ip' is more efficiently handled using 'ip -netns'; runs the ip command after switching the namespace and avoids an exec. Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/fib_tests.sh | 210 +++++++++++++++---------------- 1 file changed, 105 insertions(+), 105 deletions(-) commit 8c2ceabe99e04005cadba739856eed6953a8a3af Author: David Ahern Date: Tue Feb 13 08:12:12 2018 -0800 net/ipv4: Unexport fib_multipath_hash and fib_select_path Do not export fib_multipath_hash or fib_select_path; both are only used by core ipv4 code. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 1 - net/ipv4/route.c | 1 - 2 files changed, 2 deletions(-) commit 0d876f2c6de5b1b00c2fd38bb4f4692e720207b1 Author: David Ahern Date: Tue Feb 13 08:11:34 2018 -0800 net/ipv4: Simplify fib_select_path If flow oif is set and it is not an l3mdev, then fib_select_path can jump to the source address check. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 3174a944761d70e466444e81d5a3b80247596568 Merge: 6c67775 6f68dc9 Author: David S. Miller Date: Tue Feb 13 13:56:32 2018 -0500 Merge branch 'sctp-rename-sctp-diag-file-and-add-file-comments-for-it' Xin Long says: ==================== sctp: rename sctp diag file and add file comments for it This patchset is to remove the sctp_ prefix for sctp diag file, and also to add the missing file comments for it. v1->v2: split them into two patches as Marcelo suggested. ==================== Acked-by: Neil Horman Signed-off-by: David S. Miller commit 6f68dc993afce0b580b9b1a9edadcd4b178cbb06 Author: Xin Long Date: Tue Feb 13 19:33:21 2018 +0800 sctp: add file comments in diag.c This patch is to add the missing file comments for sctp diag file. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/diag.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit ff22b5bf78fe2a9f2a26950cc2ea180180bef47f Author: Xin Long Date: Tue Feb 13 19:33:20 2018 +0800 sctp: rename sctp_diag.c as diag.c Remove 'sctp_' prefix for diag file, to keep consistent with other files' names. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/Makefile | 2 + net/sctp/diag.c | 526 +++++++++++++++++++++++++++++++++++++++++++++++++++ net/sctp/sctp_diag.c | 526 --------------------------------------------------- 3 files changed, 528 insertions(+), 526 deletions(-) commit 1bc3d3cce8c3b44c2b5ac6cee98c830bb40e6b0f Author: Chunming Zhou Date: Fri Feb 9 10:44:10 2018 +0800 drm/radeon: only enable swiotlb path when need v2 swiotlb expands our card accessing range, but its path always is slower than ttm pool allocation. So add condition to use it. v2: move a bit later Signed-off-by: Chunming Zhou Reviewed-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20180209024410.1469-3-david1.zhou@amd.com drivers/gpu/drm/radeon/radeon.h | 1 + drivers/gpu/drm/radeon/radeon_device.c | 2 ++ drivers/gpu/drm/radeon/radeon_ttm.c | 6 +++--- 3 files changed, 6 insertions(+), 3 deletions(-) commit fd5fd480dd8fe4910546e7b080b3ae345e57fe9f Author: Chunming Zhou Date: Fri Feb 9 10:44:09 2018 +0800 drm/amdgpu: only enable swiotlb alloc when need v2 get the max io mapping address of system memory to see if it is over our card accessing range. v2: move checking later Signed-off-by: Chunming Zhou Reviewed-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20180209024410.1469-2-david1.zhou@amd.com drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 ++ 6 files changed, 13 insertions(+), 3 deletions(-) commit 193e67c00e33e188d68815fb78806317c77f156c Author: Vivek Gautam Date: Mon Feb 5 23:29:19 2018 +0530 iommu/io-pgtable: Use size_t return type for all foo_unmap Unmap returns a size_t all throughout the IOMMU framework. Make io-pgtable match this convention. Moreover, there isn't a need to have a signed int return type as we return 0 in case of failures. Signed-off-by: Vivek Gautam Acked-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/io-pgtable-arm-v7s.c | 21 +++++++++++---------- drivers/iommu/io-pgtable-arm.c | 24 ++++++++++++------------ drivers/iommu/io-pgtable.h | 4 ++-- 3 files changed, 25 insertions(+), 24 deletions(-) commit c5611a8751e67595e4e7d3feaff3c900b92094b9 Author: Suravee Suthikulpanit Date: Mon Feb 5 05:45:53 2018 -0500 iommu: Do not return error code for APIs with size_t return type Currently, iommu_unmap, iommu_unmap_fast and iommu_map_sg return size_t. However, some of the return values are error codes (< 0), which can be misinterpreted as large size. Therefore, returning size 0 instead to signify failure to map/unmap. Cc: Joerg Roedel Cc: Alex Williamson Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 2 +- drivers/iommu/iommu.c | 6 +++--- include/linux/iommu.h | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) commit cd6f55457eb449a388e793abd676e3a5b73510bc Author: Viresh Kumar Date: Fri Feb 9 14:28:01 2018 +0530 ARM: dts: exynos: Remove "cooling-{min|max}-level" for CPU nodes The "cooling-min-level" and "cooling-max-level" properties are not parsed by any part of the kernel currently and the max cooling state of a CPU cooling device is found by referring to the cpufreq table instead. Remove the unused properties from the CPU nodes. Signed-off-by: Viresh Kumar Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4210.dtsi | 2 -- arch/arm/boot/dts/exynos4412.dtsi | 2 -- arch/arm/boot/dts/exynos5250.dtsi | 2 -- arch/arm/boot/dts/exynos5420-cpus.dtsi | 16 ---------------- arch/arm/boot/dts/exynos5422-cpus.dtsi | 16 ---------------- 5 files changed, 38 deletions(-) commit bd010d6066ba3267909bf8a318e0d2f2eaf3fb53 Author: Simon Shields Date: Thu Feb 8 11:01:34 2018 +1100 dt-bindings: samsung: Document bindings for Midas family boards Document GT-I9300, GT-I9305, GT-N7100, and GT-N7105 bindings, along with the shared "midas" binding. Signed-off-by: Simon Shields Reviewed-by: Rob Herring Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt | 4 ++++ 1 file changed, 4 insertions(+) commit cd109198ad056f298a77340f4945c1e63b24c7fc Author: Maciej Purski Date: Tue Feb 6 12:29:42 2018 +0100 ARM: dts: exynos: Add soc node to exynos4412 Soc nodes are used in other exynos DTS. Exynos4412 boards should use them as well. Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412.dtsi | 772 +++++++++++++++++++------------------- 1 file changed, 389 insertions(+), 383 deletions(-) commit 9a8665ab920be393c5dbdd30628477bf176f47e8 Author: Maciej Purski Date: Tue Feb 6 12:29:41 2018 +0100 ARM: dts: exynos: Add soc node to exynos4210 Soc nodes are used in other exynos DTS. Exynos4210 boards should use them as well. Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4210.dtsi | 513 +++++++++++++++++++------------------- 1 file changed, 258 insertions(+), 255 deletions(-) commit 73a901d09a2156d77a8ba2944f51faea127c31b5 Author: Maciej Purski Date: Tue Feb 6 12:29:40 2018 +0100 ARM: dts: exynos: Add soc node to exynos4 Soc nodes are used in other exynos DTS. Exynos4 boards should use them as well. Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4.dtsi | 1727 ++++++++++++++++++++-------------------- 1 file changed, 872 insertions(+), 855 deletions(-) commit ca42d8d86ca25a291852c4f235e9cc871dced598 Author: Maciej Purski Date: Tue Feb 6 12:31:50 2018 +0100 ARM: dts: exynos: Add soc node to exynos5440 The exynos5440 device tree is the only one left, which does not use "soc" node. Add a "soc" node to exynos5440.dtsi in order to make it consistent with other exynos DTS. Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5440.dtsi | 514 +++++++++++++++++++------------------- 1 file changed, 261 insertions(+), 253 deletions(-) commit 9097b4bd9fceae342afce480f4c1379b9f67052e Author: Maciej Purski Date: Tue Feb 6 12:25:52 2018 +0100 ARM: dts: exynos: Use pmu label in exynos4412 In order to use soc node, we need to reference soc child nodes by label in exynos4412. Define pmu label in exynos4.dtsi. Use it in exynos4412 instead of redefining the node by full path. Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4.dtsi | 2 +- arch/arm/boot/dts/exynos4412.dtsi | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) commit 7353c54620732797dcc3b4b1fc6f3cc0c0d9b6ef Author: Krzysztof Kozlowski Date: Tue Jan 30 22:18:16 2018 +0100 soc: samsung: pmu: Populate children syscon nodes The syscon poweroff and restart nodes logically belong to the Power Management Unit so populate possible children. This also requires providing compatibles for Exynos5410 and Exynos7 so the PMU device and its children will be instantiated for them as well. Just like Exynos5433, these chipsets are not yet supported by the PMU driver. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Tested-by: Marek Szyprowski Documentation/devicetree/bindings/arm/samsung/pmu.txt | 6 ++++++ drivers/soc/samsung/exynos-pmu.c | 7 +++++++ 2 files changed, 13 insertions(+) commit 32d8a836154fb90771c4dd2674f4c7a2c1d92112 Author: Krzysztof Kozlowski Date: Tue Jan 30 22:18:17 2018 +0100 ARM: dts: exynos: Remove duplicated inclusion of syscon restart nodes on Exynos5410 The exynos-syscon-restart.dtsi is already included by exynos5.dtsi (through exynos54xx.dtsi). Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski arch/arm/boot/dts/exynos5410.dtsi | 1 - 1 file changed, 1 deletion(-) commit de67509a65cee5bf90877521c3eee65d2566586c Author: Maciej Purski Date: Mon Feb 5 08:57:08 2018 +0100 ARM: dts: exynos: Use label instead of full path in exynos4412-itop-elite Extend camera node by label, not by full path in Exynos 4412 Itop Elite. This avoids error-prone redefinition of nodes. Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412-itop-elite.dts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 8ce5c46d02300e4632140d0e9d560c0a164ba9ff Author: Maciej Purski Date: Mon Feb 5 08:57:07 2018 +0100 ARM: dts: exynos: Use labels instead of full paths in exynos4412-trats2 Extend camera and i2c1_isp nodes by labels, not by full path in Exynos 4412 Trats2. This avoids error-prone redefinition of nodes. Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412-trats2.dts | 73 ++++++++++++++++----------------- 1 file changed, 36 insertions(+), 37 deletions(-) commit 47c7df789eb0c7f4447c22cef2572361784706f8 Author: Maciej Purski Date: Mon Feb 5 08:57:06 2018 +0100 ARM: dts: exynos: Use label instead of full path in exynos4412-odroid-common Extend camera node by label, not by full path in Exynos 4412 Odroid boards. This avoids error-prone redefinition of nodes. Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8cc347de3650cb2f46bf2b0fe4882a6aa14a10d6 Author: Maciej Purski Date: Mon Feb 5 08:57:05 2018 +0100 ARM: dts: exynos: Use label instead of full path in exynos4412 Extend camera node by label, not by full path in Exynos 4412 DTSI. This avoids error-prone redefinition of nodes. Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412.dtsi | 172 +++++++++++++++++++------------------- 1 file changed, 86 insertions(+), 86 deletions(-) commit 7eba413cb741b1b39fabea72ccf1913f1b71087c Author: Maciej Purski Date: Mon Feb 5 08:57:04 2018 +0100 ARM: dts: exynos: Use labels instead of full paths in exynos4210-universal_c210 Extend camera, fimc, mct and sysram nodes by labels, not by full path in Exynos 4210 Universal C210 board. This avoids error-prone redefinition of nodes. Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4210-universal_c210.dts | 115 ++++++++++++------------ 1 file changed, 58 insertions(+), 57 deletions(-) commit 0f895e4ef75d36f6e1f05bbd4c075fac869c9b9d Author: Maciej Purski Date: Mon Feb 5 08:57:03 2018 +0100 ARM: dts: exynos: Use labels instead of full paths in exynos4210-trats Extend camera and fimc nodes by labels, not by full path in Exynos 4210 Trats board. This avoids error-prone redefinition of nodes. Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4210-trats.dts | 73 +++++++++++++++++----------------- 1 file changed, 37 insertions(+), 36 deletions(-) commit e030be47ac48aa4f832d0dc2d5614eeb8627a59d Author: Maciej Purski Date: Mon Feb 5 08:57:02 2018 +0100 ARM: dts: exynos: Use labels instead of full paths in exynos4210 Extend camera, mixer and tmu nodes by labels, not by full path in Exynos 4210 DTSI. This avoids error-prone redefinition of nodes. Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4.dtsi | 6 ++- arch/arm/boot/dts/exynos4210.dtsi | 98 +++++++++++++++++++-------------------- 2 files changed, 52 insertions(+), 52 deletions(-) commit e58864515240bcb657ee77c3ad27da1929b83914 Author: Maciej Purski Date: Mon Feb 5 08:57:01 2018 +0100 ARM: dts: exynos: Use pinctrl labels in exynos4412-pinctrl Define pinctrl labels in exynos4412.dtsi and use them in exynos4412-pinctrl.dtsi, as it is done in other Exynos DTSes. Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412-pinctrl.dtsi | 1914 ++++++++++++++--------------- arch/arm/boot/dts/exynos4412.dtsi | 65 +- 2 files changed, 990 insertions(+), 989 deletions(-) commit 6c677750f22db3bb466a95f08b91a1cca8323146 Author: Arkadi Sharshevsky Date: Tue Feb 13 11:29:05 2018 +0100 mlxsw: spectrum: Use NL_SET_ERR_MSG_MOD Use NL_SET_ERR_MSG_MOD helper which adds the module name instead of specifying the prefix each time. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 28 ++++++++-------------- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 6 ++--- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++--- 3 files changed, 16 insertions(+), 24 deletions(-) commit d520d58124e6c1eaa1e53cd834e53b14af8a7f2d Merge: 439ccd8 a629ef2 Author: David S. Miller Date: Tue Feb 13 12:26:26 2018 -0500 Merge branch 'mlxsw-SPAN-cleanups' Jiri Pirko says: ==================== mlxsw: SPAN cleanups In patch one of this short series, a misplaced pointer star is moved to the correct place. In the second patch, we observe that if SPAN entries carry their reference count anyway, it's redundant to also carry a "used" flag. In the third patch, SPAN support code is moved to a separate module. ==================== Signed-off-by: David S. Miller commit a629ef210d890bc279280d5f53ef72e10ad8a523 Author: Petr Machata Date: Tue Feb 13 11:27:48 2018 +0100 mlxsw: spectrum: Move SPAN code to separate module For the upcoming work on SPAN, it makes sense to move the current code to a module of its own. It already has a well-defined API boundary to the mirror management (which is used from matchall and ACL code). A couple more functions need to be exported for the functions that spectrum.c needs to use for MTU handling and subsystem init/fini. Signed-off-by: Petr Machata Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Makefile | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 320 +----------------- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 29 +- .../mellanox/mlxsw/spectrum_acl_flex_actions.c | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_span.c | 356 +++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_span.h | 73 +++++ 6 files changed, 433 insertions(+), 348 deletions(-) commit ce470b44e256a5c25ae1f45a3086e6838fe52ecd Author: Petr Machata Date: Tue Feb 13 11:27:47 2018 +0100 mlxsw: spectrum: Drop struct span_entry.used The member ref_count already determines whether a given SPAN entry is used, and is as easy to use as a dedicated boolean. Signed-off-by: Petr Machata Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 6 ++---- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) commit 306a934e5b39aac34910296764f96293fff34a96 Author: Petr Machata Date: Tue Feb 13 11:27:46 2018 +0100 mlxsw: spectrum: Fix a coding style nit Signed-off-by: Petr Machata Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 439ccd8ce9eeb4c44632404a0ba38f947e97caba Merge: d75de7b e437f3b Author: David S. Miller Date: Tue Feb 13 12:24:28 2018 -0500 Merge branch 'mlxsw-IPIP-cleanups' Jiri Pirko says: ==================== mlxsw: IPIP cleanups In the first patch, a forgotten #include is added. Even though the code compiles as-is, the include is necessary for modules that should include spectrum_ipip.h. The second patch corrects an assumption that IPv6 tunnels use struct ip_tunnel_parm to store tunnel parameters. ==================== Signed-off-by: David S. Miller commit e437f3b62d0844c4073c9e13263413748fa69093 Author: Petr Machata Date: Tue Feb 13 11:26:09 2018 +0100 mlxsw: spectrum: Distinguish between IPv4/6 tunnels struct ip_tunnel_parm, where GRE and several other tunnel types hold information, is IPv4-specific. The current router / ipip code in mlxsw however uses it as if it were generic. Make it clear that it's not. Rename many functions from _params_ to _params4_. mlxsw_sp_ipip_parms_saddr() and _daddr() take a proto argument to dispatch on it. Move the dispatch logic to mlxsw_sp_ipip_netdev_saddr() and _daddr(), and replace with single-protocol functions. In struct mlxsw_sp_ipip_entry, move the "parms" field to a (for the time being, singleton) union. Update users throughout. Signed-off-by: Petr Machata Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_ipip.c | 141 ++++++++------------- .../net/ethernet/mellanox/mlxsw/spectrum_ipip.h | 6 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 16 ++- 3 files changed, 72 insertions(+), 91 deletions(-) commit fe735a3d2c41f9ed2b706ce328c2b5d2b988d60b Author: Petr Machata Date: Tue Feb 13 11:26:08 2018 +0100 mlxsw: spectrum_ipip: Add a forgotten include struct ip_tunnel_parm, which is used in spectrum_ipip.h, is defined in if_tunnel.h. However, the former neglects to include the latter. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h | 1 + 1 file changed, 1 insertion(+) commit d75de7b6e737148863705f3523f9575d10429815 Author: Jake Moroni Date: Mon Feb 12 19:23:43 2018 -0500 dpaa_eth: fix incorrect comment The comment stated that a thread was started, but that is not the case. Signed-off-by: Jake Moroni Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82626363a217d79128c447ab296777b461e9f050 Author: Chunming Zhou Date: Fri Feb 9 10:44:08 2018 +0800 drm: add func to get max iomem address v2 it will be used to check if the driver needs swiotlb v2: Don't use inline, instead, move function to drm_memory.c (Michel Daenzer ) Signed-off-by: Chunming Zhou Reviewed-by: Monk Liu Reviewed-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20180209024410.1469-1-david1.zhou@amd.com drivers/gpu/drm/drm_memory.c | 13 +++++++++++++ include/drm/drm_cache.h | 2 ++ 2 files changed, 15 insertions(+) commit b1d03c1d12abbfa7de127772f281b309cf1650c3 Author: Dmitry Safonov Date: Mon Feb 12 16:48:21 2018 +0000 iommu/vt-d: Clean/document fault status flags So one could decode them without opening the specification. Signed-off-by: Dmitry Safonov Signed-off-by: Joerg Roedel include/linux/intel-iommu.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d15a339eaca6fd6eb00ebc36edf3c289b65000fe Author: Dmitry Safonov Date: Mon Feb 12 16:48:20 2018 +0000 iommu/vt-d: Add __init for dmar_register_bus_notifier() It's called only from intel_iommu_init(), which is init function. Signed-off-by: Dmitry Safonov Signed-off-by: Joerg Roedel drivers/iommu/dmar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16c5055a5ff5e1ff13c5211e44514a2b1d2c1dae Author: Alexey Dobriyan Date: Sat Jan 13 22:06:48 2018 +0300 x86/asm: Trim clear_page.S includes After alternatives were shifted to the call site, only 2 headers are necessary. Signed-off-by: Alexey Dobriyan Reviewed-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180113190648.GB23111@avx2 Signed-off-by: Ingo Molnar arch/x86/lib/clear_page_64.S | 2 -- 1 file changed, 2 deletions(-) commit 1acdbf7ea8a80706561013346d281d282a3c00f9 Author: Alexey Dobriyan Date: Sat Jan 13 21:50:48 2018 +0300 x86/asm: Clobber flags in clear_page() All clear_page() implementations use XOR which resets flags. Judging by allyesconfig disassembly no code is affected. Signed-off-by: Alexey Dobriyan Reviewed-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180113185048.GA23111@avx2 Signed-off-by: Ingo Molnar arch/x86/include/asm/page_64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ccf5355d05cd891522267f04b2723002e7f061de Author: Dou Liyang Date: Wed Jan 17 15:37:48 2018 +0800 x86/apic: Simplify init_bsp_APIC() usage Since CONFIG_X86_64 selects CONFIG_X86_LOCAL_APIC, the following condition: #if defined(CONFIG_X86_64) || defined(CONFIG_X86_LOCAL_APIC) is equivalent to: #if defined(CONFIG_X86_LOCAL_APIC) ... and we can eliminate that #ifdef by providing an empty init_bsp_APIC() stub in the !CONFIG_X86_LOCAL_APIC case. Also add some comments to explain why we call init_bsp_APIC(). Signed-off-by: Dou Liyang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: mroos@linux.ee Cc: ville.syrjala@linux.intel.com Link: http://lkml.kernel.org/r/20180117073748.23905-1-douly.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/include/asm/apic.h | 1 + arch/x86/kernel/irqinit.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 817cc07918232e0c3b4cf2926c1a08c8d08edc33 Author: Tvrtko Ursulin Date: Thu Feb 8 16:00:36 2018 +0000 drm/i915: Handle RC6 counter wrap We can implement limited RC6 counter wrap-around protection under the assumption that clients will be reading this value more frequently than the wrap period on a given platform. With the typical wrap-around period being ~90 minutes, even with the exception of Baytrail which wraps every 13 seconds, this sounds like a reasonable assumption. Implementation works by storing a 64-bit software copy of a hardware RC6 counter, along with the previous HW counter snapshot. This enables it to detect wrap is polled frequently enough and keep the software copy monotonically incrementing. v2: * Missed GEN6_GT_GFX_RC6_LOCKED when considering slot sizing and indexing. * Fixed off-by-one in wrap-around handling. (Chris Wilson) v3: * Simplify index checking by using unsigned int. (Chris Wilson) * Expand the comment to explain why indexing works. v4: * Use __int128 if supported. v5: * Use mul_u64_u32_div. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94852 Cc: Chris Wilson Reviewed-by: Chris Wilson # v3 Cc: Ville Syrjälä Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180208160036.29919-1-tvrtko.ursulin@linux.intel.com Acked-by: Ville Syrjälä drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_pm.c | 64 ++++++++++++++++++++++++++++++++++------- 2 files changed, 56 insertions(+), 10 deletions(-) commit 62b5ed1f35d7f6f140cc9de818991df4f11adc69 Author: Tvrtko Ursulin Date: Tue Feb 13 14:18:33 2018 +0000 drm/i915: Fix i915_gem_context.h header Header uses I915_NUM_ENGINES so needs to include i915.gem.h, and also it uses requests so we can forward declare struct drm_i915_gem_request. Signed-off-by: Tvrtko Ursulin Suggested-by: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180213141833.17012-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_gem_context.h | 3 +++ 1 file changed, 3 insertions(+) commit afed7d172091040f38c75a2927fed170ea11585f Author: Dou Liyang Date: Wed Jan 17 11:45:43 2018 +0800 x86/x2apic: Mark set_x2apic_phys_mode() as __init set_x2apic_phys_mode() is only called as part of early_param() initialization - so mark it as __init. Signed-off-by: Dou Liyang Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180117034543.26723-1-douly.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/x2apic_phys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5beaf4d7ce9e842c7198a00616c2061ca4e46016 Author: Geert Uytterhoeven Date: Tue Feb 13 15:15:32 2018 +0100 ARM: dts: kirkwood: Fix "debounce-interval" property misspelling "debounce_interval" was never supported. Signed-off-by: Geert Uytterhoeven Cc: Jason Cooper Cc: Andrew Lunn Cc: Gregory Clement Cc: Sebastian Hesselbarth Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-pogoplug-series-4.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fa65edf87886f85a18680ed7bdedc15cb810065 Author: Bartosz Golaszewski Date: Wed Jan 24 22:29:09 2018 +0100 ARM: dts: at91: use 'atmel' as at24 manufacturer for at91sam9263ek Using compatible strings without the part for at24 is now deprecated. Use a correct 'atmel,' value. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9263ek.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 282e8874e4af45ccc52fbd450fea76c1d0d6646a Author: Bartosz Golaszewski Date: Wed Jan 24 22:26:56 2018 +0100 ARM: dts: at91: use 'atmel' as at24 manufacturer for at91-sama5d2_ptc_ek Using compatible strings without the part for at24 is now deprecated. Use a correct 'atmel,' value. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2f24db37968477b33d97c82becaba7886cb0a12 Author: Bartosz Golaszewski Date: Wed Jan 24 22:25:44 2018 +0100 ARM: dts: at91: use 'atmel' as at24 manufacturer for at91sam9g20ek Using compatible strings without the part for at24 is now deprecated. Use a correct 'atmel,' value. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3a5ce64502a9c0662162d71dd944c3d893a0028 Author: Bartosz Golaszewski Date: Wed Jan 24 22:25:01 2018 +0100 ARM: dts: at91: use 'atmel' as at24 manufacturer for at91sam9260ek Using compatible strings without the part for at24 is now deprecated. Use a correct 'atmel,' value. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9260ek.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f5243cb54fe0e5486ee5c3a10ad7bfcf23c492c Author: Bartosz Golaszewski Date: Wed Jan 24 22:23:46 2018 +0100 ARM: dts: at91: use 'atmel' as at24 manufacturer for sama5d34ek Using compatible strings without the part for at24 is now deprecated. Use a correct 'atmel,' value. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni arch/arm/boot/dts/sama5d34ek.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a06757dcc8509c162ac00488c8c82fc98e04227 Author: Santiago Esteban Date: Thu Jan 18 15:38:47 2018 +0100 ARM: dts: at91: sama5d4: fix pinctrl compatible string The compatible string is incorrect. Add atmel,sama5d3-pinctrl since it's the appropriate compatible string. Remove the atmel,at91rm9200-pinctrl compatible string, this fallback is useless, there are too many changes. Signed-off-by: Santiago Esteban Signed-off-by: Ludovic Desroches Cc: stable@vger.kernel.org #v3.18 Signed-off-by: Alexandre Belloni arch/arm/boot/dts/sama5d4.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b97da49cc3401233d72b10adea1f09e4651f355 Author: Peter Rosin Date: Thu Jan 18 12:46:16 2018 +0100 ARM: dts: at91: tse850: make the sound dai cell count explicit The node is referred to as a DAI from the sound node and should therefore have a #sound-dai-cells property. Fixes: 21dd0ece34c2 ("ARM: dts: at91: add devicetree for the Axentia TSE-850") Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-tse850-3.dts | 1 + 1 file changed, 1 insertion(+) commit 2f8bd78412ed5807350ec0c1bb56488d9b7993cf Author: Peter Rosin Date: Thu Jan 18 12:46:15 2018 +0100 ARM: dts: at91: nattis: add lvds-encoder The lvds encoder chip was omitted by oversight. Add it. Fixes: 0e4323899973 ("ARM: dts: at91: add devicetree for the Axentia Nattis with Natte power") Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-nattis-2-natte-2.dts | 31 ++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit cf438f51c6af8c4d0030d681d14c3a59f0ec5d93 Author: Peter Rosin Date: Thu Jan 18 12:46:14 2018 +0100 ARM: dts: at91: nattis: use up-to-date mtd partitions The nattis currently relies on the cmdline to correctly configure the MTD partition table, and the one given in the device tree is simply ignored. Which is fortunate, since the device tree partition table is bonkers and does not match reality. So, in order to avoid confusion, fix the device tree partition table to match what is expected (i.e. what is normally provided on the cmdline). In particular, the rootfs partition should be mtd6. Fixes: 0e4323899973 ("ARM: dts: at91: add devicetree for the Axentia Nattis with Natte power") Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-nattis-2-natte-2.dts | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 7981190fb5dd710dea08c2613cee3d05e795ca5e Author: Peter Rosin Date: Tue Jan 16 17:06:18 2018 +0100 ARM: dts: at91: tse850: use the correct compatible for the eeprom The used part does contain an eeprom compatible with an Atmel 24c02 chip and it is from NXP, but it is not called 24c02. It's actually a se97b chip. Adjust the compatible accordingly. Fixes: 21dd0ece34c2 ("ARM: dts: at91: add devicetree for the Axentia TSE-850") Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-tse850-3.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b65933008a6bbe5ff79a344b41175826848682d Author: Peter Rosin Date: Tue Jan 16 17:06:17 2018 +0100 ARM: dts: at91: nattis: use the correct compatible for the eeprom The used part does contain an eeprom compatible with an Atmel 24c02 chip and it is from NXP, but it is not called 24c02. It's actually a se97b chip. Adjust the compatible accordingly. Fixes: 0e4323899973 ("ARM: dts: at91: add devicetree for the Axentia Nattis with Natte power") Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-nattis-2-natte-2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 983cfd77d70557cf83582f96f1dd946128c0abd9 Author: Alexandre Belloni Date: Tue Feb 13 17:14:55 2018 +0100 ARM: dts: at91: sam9rl: Properly assign copyright The copyright holder for this work is Microchip (formerly Atmel) Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9rl.dtsi | 3 ++- arch/arm/boot/dts/at91sam9rlek.dts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit bd1de6a3c6926945a19c4cc691241e26d1f2ac4c Author: Alexandre Belloni Date: Sat Feb 10 07:41:30 2018 +0100 ARM: dts: armada: netgear-rn*: fix rtc node name The node name should be generic and must not contain the part number. Signed-off-by: Alexandre Belloni Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-370-netgear-rn102.dts | 2 +- arch/arm/boot/dts/armada-370-netgear-rn104.dts | 2 +- arch/arm/boot/dts/armada-xp-netgear-rn2120.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 885842d89a9ba619dce05537f0fe107d250e600b Merge: cf19e5e b86b47a Author: David S. Miller Date: Tue Feb 13 10:36:10 2018 -0500 Merge branch 'Replacing-net_mutex-with-rw_semaphore' Kirill Tkhai says: ==================== Replacing net_mutex with rw_semaphore this is the third version of the patchset introducing net_sem instead of net_mutex. The patchset adds net_sem in addition to net_mutex and allows pernet_operations to be "async". This flag means, the pernet_operations methods are safe to be executed with any other pernet_operations (un)initializing another net. If there are only async pernet_operations in the system, net_mutex is not used either for setup_net() or for cleanup_net(). The pernet_operations converted in this patchset allow to create minimal .config to have network working, and the changes improve the performance like you may see below: %for i in {1..10000}; do unshare -n bash -c exit; done *before* real 1m40,377s user 0m9,672s sys 0m19,928s *after* real 0m17,007s user 0m5,311s sys 0m11,779 (5.8 times faster) In the future, when all pernet_operations become async, we'll just remove this "async" field tree-wide. All the new logic is concentrated in patches [1-5/32]. The rest of patches converts specific operations: review, rationale of they can be converted, and setting of async flag. Kirill v3: Improved patches descriptions. Added comment into [5/32]. Added [32/32] converting netlink_tap_net_ops (new pernet operations introduced in 2018). v2: Single patch -> patchset with rationale of every conversion ==================== Signed-off-by: David S. Miller commit b86b47a39598cdf17e0e826ebe1be21c798112cf Author: Kirill Tkhai Date: Tue Feb 13 12:31:01 2018 +0300 net: Convert netlink_tap_net_ops These pernet_operations init just allocated net memory, and they obviously can be executed in parallel in any others. v3: New Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/netlink/af_netlink.c | 1 + 1 file changed, 1 insertion(+) commit 59a513587ac09359875d6074778f21a3c01754e0 Author: Kirill Tkhai Date: Tue Feb 13 12:30:52 2018 +0300 net: Convert diag_net_ops These pernet operations just create and destroy netlink socket. The socket is pernet and else operations don't touch it. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/core/sock_diag.c | 1 + 1 file changed, 1 insertion(+) commit 2608e6b7adc8b07194b855e2102d6f1a277e3f03 Author: Kirill Tkhai Date: Tue Feb 13 12:30:42 2018 +0300 net: Convert default_device_ops These pernet operations consist of exit() and exit_batch() methods. default_device_exit() moves not-local and virtual devices to init_net. There is nothing exciting, because this may happen in any time on a working system, and rtnl_lock() and synchronize_net() protect us from all cases of external dereference. The same for default_device_exit_batch(). Similar unregisteration may happen in any time on a system. Here several lists (like todo_list), which are accessed under rtnl_lock(). After rtnl_unlock() and netdev_run_todo() all the devices are flushed. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/core/dev.c | 1 + 1 file changed, 1 insertion(+) commit 9a4d105de78488526d8b0d6cdc5f2c22f122ca4a Author: Kirill Tkhai Date: Tue Feb 13 12:30:35 2018 +0300 net: Convert loopback_net_ops These pernet_operations have only init() method. It allocates memory for net_device, calls register_netdev() and assigns net::loopback_dev. register_netdev() is allowed be used without additional locks, as it's synchronized on rtnl_lock(). There are many examples of using this functon directly from ioctl(). The only difference, compared to ioctl(), is that net is not completely alive at this moment. But it looks like, there is no way for parallel pernet_operations to dereference the net_device, as the most of struct net_device lists, where it's linked, are related to net, and the net is not liked. The exceptions are net_device::unreg_list, close_list, todo_list, used for unregistration, and ::link_watch_list, where net_device may be linked to global lists. Unregistration of loopback_dev obviously can't happen, when loopback_net_init() is executing, as the net as alive. It occurs in default_device_ops, which currently requires net_mutex, and it behaves as a barrier at the moment. It will be considered in next patch. Speaking about link_watch_list, it seems, there is no way for loopback_dev at time of registration to be linked in lweventlist and be available for another pernet_operations. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller drivers/net/loopback.c | 1 + 1 file changed, 1 insertion(+) commit 0bc9be67185ec90feedc971af6e7b84ab932703a Author: Kirill Tkhai Date: Tue Feb 13 12:30:27 2018 +0300 net: Convert addrconf_ops These pernet_operations (un)register sysctl, which are not touched by anybody else. So, it's safe to make them async. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/ipv6/addrconf.c | 1 + 1 file changed, 1 insertion(+) commit 22769a2a6e93a17d08e1cd7a2de2749088887b87 Author: Kirill Tkhai Date: Tue Feb 13 12:30:18 2018 +0300 net: Convert ipv4_sysctl_ops These pernet_operations create and destroy sysctl, which are not touched by anybody else. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/ipv4/sysctl_net_ipv4.c | 1 + 1 file changed, 1 insertion(+) commit cb5e3400e78598e1eb872954516a02ba85926d84 Author: Kirill Tkhai Date: Tue Feb 13 12:30:08 2018 +0300 net: Convert packet_net_ops These pernet_operations just create and destroy /proc entry, and another operations do not touch it. Also, nobody else are interested in foreign net::packet::sklist. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/packet/af_packet.c | 1 + 1 file changed, 1 insertion(+) commit 167f7ac723e5b4ea22c44a0bd8e357bb76a68cd2 Author: Kirill Tkhai Date: Tue Feb 13 12:30:00 2018 +0300 net: Convert unix_net_ops These pernet_operations are just create and destroy /proc and sysctl entries, and are not touched by foreign pernet_operations. So, we are able to make them async. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/unix/af_unix.c | 1 + 1 file changed, 1 insertion(+) commit f84c6821aa540342360067604ad156e3d53a67ed Author: Kirill Tkhai Date: Tue Feb 13 12:29:52 2018 +0300 net: Convert pernet_subsys, registered from inet_init() arp_net_ops just addr/removes /proc entry. devinet_ops allocates and frees duplicate of init_net tables and (un)registers sysctl entries. fib_net_ops allocates and frees pernet tables, creates/destroys netlink socket and (un)initializes /proc entries. Foreign pernet_operations do not touch them. ip_rt_proc_ops only modifies pernet /proc entries. xfrm_net_ops creates/destroys /proc entries, allocates/frees pernet statistics, hashes and tables, and (un)initializes sysctl files. These are not touched by foreigh pernet_operations xfrm4_net_ops allocates/frees private pernet memory, and configures sysctls. sysctl_route_ops creates/destroys sysctls. rt_genid_ops only initializes fields of just allocated net. ipv4_inetpeer_ops allocated/frees net private memory. igmp_net_ops just creates/destroys /proc files and socket, noone else interested in. tcp_sk_ops seems to be safe, because tcp_sk_init() does not depend on any other pernet_operations modifications. Iteration over hash table in inet_twsk_purge() is made under RCU lock, and it's safe to iterate the table this way. Removing from the table happen from inet_twsk_deschedule_put(), but this function is safe without any extern locks, as it's synchronized inside itself. There are many examples, it's used in different context. So, it's safe to leave tcp_sk_exit_batch() unlocked. tcp_net_metrics_ops is synchronized on tcp_metrics_lock and safe. udplite4_net_ops only creates/destroys pernet /proc file. icmp_sk_ops creates percpu sockets, not touched by foreign pernet_operations. ipmr_net_ops creates/destroys pernet fib tables, (un)registers fib rules and /proc files. This seem to be safe to execute in parallel with foreign pernet_operations. af_inet_ops just sets up default parameters of newly created net. ipv4_mib_ops creates and destroys pernet percpu statistics. raw_net_ops, tcp4_net_ops, udp4_net_ops, ping_v4_net_ops and ip_proc_ops only create/destroy pernet /proc files. ip4_frags_ops creates and destroys sysctl file. So, it's safe to make the pernet_operations async. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/ipv4/af_inet.c | 2 ++ net/ipv4/arp.c | 1 + net/ipv4/devinet.c | 1 + net/ipv4/fib_frontend.c | 1 + net/ipv4/icmp.c | 1 + net/ipv4/igmp.c | 1 + net/ipv4/ip_fragment.c | 1 + net/ipv4/ipmr.c | 1 + net/ipv4/ping.c | 1 + net/ipv4/proc.c | 1 + net/ipv4/raw.c | 1 + net/ipv4/route.c | 4 ++++ net/ipv4/tcp_ipv4.c | 2 ++ net/ipv4/tcp_metrics.c | 1 + net/ipv4/udp.c | 1 + net/ipv4/udplite.c | 1 + net/ipv4/xfrm4_policy.c | 1 + net/xfrm/xfrm_policy.c | 1 + 18 files changed, 23 insertions(+) commit 232cf06c611f57ccb8e321de3fd850f21215ede8 Author: Kirill Tkhai Date: Tue Feb 13 12:29:42 2018 +0300 net: Convert sysctl_core_ops These pernet_operations register and destroy sysctl directory, and it's not interesting for foreign pernet_operations. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/core/sysctl_net_core.c | 1 + 1 file changed, 1 insertion(+) commit 6c0075d0f6ccf5be4527408830852106808ab2bb Author: Kirill Tkhai Date: Tue Feb 13 12:29:33 2018 +0300 net: Convert wext_pernet_ops These pernet_operations initialize and purge net::wext_nlevents queue, and are not touched by foreign pernet_operations. Mark them async. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/wireless/wext-core.c | 1 + 1 file changed, 1 insertion(+) commit 83caf62c867bed2637d4f3713839b0c414d6d966 Author: Kirill Tkhai Date: Tue Feb 13 12:29:23 2018 +0300 net: Convert genl_pernet_ops This pernet_operations create and destroy net::genl_sock. Foreign pernet_operations don't touch it. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/netlink/genetlink.c | 1 + 1 file changed, 1 insertion(+) commit 13da199c38ee7f33a1c42db62647118f9f9f527c Author: Kirill Tkhai Date: Tue Feb 13 12:29:13 2018 +0300 net: Convert subsys_initcall() registered pernet_operations from net/sched psched_net_ops only creates and destroyes /proc entry, and safe to be executed in parallel with any foreigh pernet_operations. tcf_action_net_ops initializes and destructs tcf_action_net::egdev_ht, which is not touched by foreign pernet_operations. So, make them async. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/sched/act_api.c | 1 + net/sched/sch_api.c | 1 + 2 files changed, 2 insertions(+) commit 86b63418fd382b095fdac4408fd565aa5da4b036 Author: Kirill Tkhai Date: Tue Feb 13 12:29:03 2018 +0300 net: Convert fib_* pernet_operations, registered via subsys_initcall Both of them create and initialize lists, which are not touched by another foreing pernet_operations. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/core/fib_notifier.c | 1 + net/core/fib_rules.c | 1 + 2 files changed, 2 insertions(+) commit 88b8ffebdb4d0f4da4e9a8383c8478c32372b42b Author: Kirill Tkhai Date: Tue Feb 13 12:28:54 2018 +0300 net: Convert pernet_subsys ops, registered via net_dev_init() There are: 1)dev_proc_ops and dev_mc_net_ops, which create and destroy pernet proc file and not interesting for another net namespaces; 2)netdev_net_ops, which creates pernet hashes, which are not touched by another pernet_operations. So, make them async. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/core/dev.c | 1 + net/core/net-procfs.c | 2 ++ 2 files changed, 3 insertions(+) commit 36b0068e6c9892aa4757d4fa08fd14fbba72b3b3 Author: Kirill Tkhai Date: Tue Feb 13 12:28:44 2018 +0300 net: Convert proto_net_ops This patch starts to convert pernet_subsys, registered from subsys initcalls. It seems safe to be executed in parallel with others, as it's only creates/destoyes proc entry, which nobody else is not interested in. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/core/sock.c | 1 + 1 file changed, 1 insertion(+) commit 15898a011b3d0390869f31167c4403835bc04954 Author: Kirill Tkhai Date: Tue Feb 13 12:28:33 2018 +0300 net: Convert uevent_net_ops uevent_net_init() and uevent_net_exit() create and destroy netlink socket, and these actions serialized in netlink code. Parallel execution with other pernet_operations makes the socket disappear earlier from uevent_sock_list on ->exit. As userspace can't be interested in broadcast messages of dying net, and, as I see, no one in kernel listen them, we may safely make uevent_net_ops async. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller lib/kobject_uevent.c | 1 + 1 file changed, 1 insertion(+) commit 906f63ec1d1b4941d36eee18121e68749c9e3279 Author: Kirill Tkhai Date: Tue Feb 13 12:28:24 2018 +0300 net: Convert audit_net_ops This patch starts to convert pernet_subsys, registered from postcore initcalls. audit_net_init() creates netlink socket, while audit_net_exit() destroys it. The rest of the pernet_list are not interested in the socket, so we make audit_net_ops async. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller kernel/audit.c | 1 + 1 file changed, 1 insertion(+) commit 46456675ec1b7f93dadd2b1b4b58d763c3ae9266 Author: Kirill Tkhai Date: Tue Feb 13 12:28:15 2018 +0300 net: Convert rtnetlink_net_ops rtnetlink_net_init() and rtnetlink_net_exit() create and destroy netlink socket net::rtnl. The socket is used to send rtnl notification via rtnl_net_notifyid(). There is no a problem to create and destroy it in parallel with other pernet operations, as we link net in setup_net() after the socket is created, and destroy in cleanup_net() after net is unhashed from all the lists and there is no RCU references on it. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 + 1 file changed, 1 insertion(+) commit 194b95d2166661f890dca5ef3b952c73622eb4e5 Author: Kirill Tkhai Date: Tue Feb 13 12:28:00 2018 +0300 net: Convert netlink_net_ops The methods of netlink_net_ops create and destroy "netlink" file, which are not interesting for foreigh pernet_operations. So, netlink_net_ops may safely be made async. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/netlink/af_netlink.c | 1 + 1 file changed, 1 insertion(+) commit ff291d005a988aaa7d73daf44c3d04585e9f0637 Author: Kirill Tkhai Date: Tue Feb 13 12:27:51 2018 +0300 net: Convert net_defaults_ops net_defaults_ops introduce only net_defaults_init_net method, and it acts on net::core::sysctl_somaxconn, which is not interesting for the rest of pernet_subsys and pernet_device lists. Then, make them async. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/core/net_namespace.c | 1 + 1 file changed, 1 insertion(+) commit 604da74e4fc1c2afc50dc7a1850acfd9aff2b58d Author: Kirill Tkhai Date: Tue Feb 13 12:27:41 2018 +0300 net: Convert net_inuse_ops net_inuse_ops methods expose statistics in /proc. No one from the rest of pernet_subsys or pernet_device lists touch net::core::inuse. So, it's safe to make net_inuse_ops async. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/core/sock.c | 1 + 1 file changed, 1 insertion(+) commit c9d8fb91351fe1514731b7f6d24d4decc0028978 Author: Kirill Tkhai Date: Tue Feb 13 12:27:31 2018 +0300 net: Convert nf_log_net_ops The pernet_operations would have had a problem in parallel execution with others, if init_net had been able to released. But it's not, and the rest is safe for that. There is memory allocation, which nobody else interested in, and sysctl registration. So, we make them async. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/netfilter/nf_log.c | 1 + 1 file changed, 1 insertion(+) commit 9549929923738d14dc450f0427a4b98ac3e8aff2 Author: Kirill Tkhai Date: Tue Feb 13 12:27:23 2018 +0300 net: Convert netfilter_net_ops Methods netfilter_net_init() and netfilter_net_exit() initialize net::nf::hooks and change net-related proc directory of net. Another pernet_operations are not interested in forein net::nf::hooks or proc entries, so it's safe to make them executed in parallel with methods of other pernet operations. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/netfilter/core.c | 1 + 1 file changed, 1 insertion(+) commit 93d230fe0762bf129fb4debc944af3e1c1e8f40e Author: Kirill Tkhai Date: Tue Feb 13 12:27:13 2018 +0300 net: Convert sysctl_pernet_ops This patch starts to convert pernet_subsys, registered from core initcalls. Methods sysctl_net_init() and sysctl_net_exit() initialize net::sysctls table of a namespace. pernet_operations::init()/exit() methods from the rest of the list do not touch net::sysctls of strangers, so it's safe to execute sysctl_pernet_ops's methods in parallel with any other pernet_operations. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/sysctl_net.c | 1 + 1 file changed, 1 insertion(+) commit 3fc3b827f0c4397c74d4b8a8a06d71b903a4982f Author: Kirill Tkhai Date: Tue Feb 13 12:27:03 2018 +0300 net: Convert net_ns_ops methods This patch starts to convert pernet_subsys, registered from pure initcalls. net_ns_ops::net_ns_net_init/net_ns_net_init, methods use only ida_simple_* functions, which are not need a synchronization. They are synchronized by idr subsystem. So, net_ns_ops methods are able to be executed in parallel with methods of other pernet operations. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/core/net_namespace.c | 1 + 1 file changed, 1 insertion(+) commit f039e184bc45227553e645fb1c7021d69a5262b4 Author: Kirill Tkhai Date: Tue Feb 13 12:26:52 2018 +0300 net: Convert proc_net_ns_ops This patch starts to convert pernet_subsys, registered before initcalls. proc_net_ns_ops::proc_net_ns_init()/proc_net_ns_exit() {un,}register pernet net->proc_net and ->proc_net_stat. Constructors and destructors of another pernet_operations are not interested in foreign net's proc_net and proc_net_stat. Proc filesystem privitives are synchronized on proc_subdir_lock. So, proc_net_ns_ops methods are able to be executed in parallel with methods of any other pernet operations. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller fs/proc/proc_net.c | 1 + 1 file changed, 1 insertion(+) commit 447cd7a0d7d1e5b4486e99cce289654fec9951e3 Author: Kirill Tkhai Date: Tue Feb 13 12:26:44 2018 +0300 net: Allow pernet_operations to be executed in parallel This adds new pernet_operations::async flag to indicate operations, which ->init(), ->exit() and ->exit_batch() methods are allowed to be executed in parallel with the methods of any other pernet_operations. When there are only asynchronous pernet_operations in the system, net_mutex won't be taken for a net construction and destruction. Also, remove BUG_ON(mutex_is_locked()) from net_assign_generic() without replacing with the equivalent net_sem check, as there is one more lockdep assert below. v3: Add comment near net_mutex. Suggested-by: Eric W. Biederman Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller include/net/net_namespace.h | 6 ++++++ net/core/net_namespace.c | 30 ++++++++++++++++++++---------- 2 files changed, 26 insertions(+), 10 deletions(-) commit bcab1ddd9b2b105390712a9c1605bdb20a7f9a03 Author: Kirill Tkhai Date: Tue Feb 13 12:26:33 2018 +0300 net: Move mutex_unlock() in cleanup_net() up net_sem protects from pernet_list changing, while ops_free_list() makes simple kfree(), and it can't race with other pernet_operations callbacks. So we may release net_mutex earlier then it was. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/core/net_namespace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1a57feb847c56d6193f67d0e892c24e71f9e3ab1 Author: Kirill Tkhai Date: Tue Feb 13 12:26:23 2018 +0300 net: Introduce net_sem for protection of pernet_list Currently, the mutex is mostly used to protect pernet operations list. It orders setup_net() and cleanup_net() with parallel {un,}register_pernet_operations() calls, so ->exit{,batch} methods of the same pernet operations are executed for a dying net, as were used to call ->init methods, even after the net namespace is unlinked from net_namespace_list in cleanup_net(). But there are several problems with scalability. The first one is that more than one net can't be created or destroyed at the same moment on the node. For big machines with many cpus running many containers it's very sensitive. The second one is that it's need to synchronize_rcu() after net is removed from net_namespace_list(): Destroy net_ns: cleanup_net() mutex_lock(&net_mutex) list_del_rcu(&net->list) synchronize_rcu() <--- Sleep there for ages list_for_each_entry_reverse(ops, &pernet_list, list) ops_exit_list(ops, &net_exit_list) list_for_each_entry_reverse(ops, &pernet_list, list) ops_free_list(ops, &net_exit_list) mutex_unlock(&net_mutex) This primitive is not fast, especially on the systems with many processors and/or when preemptible RCU is enabled in config. So, all the time, while cleanup_net() is waiting for RCU grace period, creation of new net namespaces is not possible, the tasks, who makes it, are sleeping on the same mutex: Create net_ns: copy_net_ns() mutex_lock_killable(&net_mutex) <--- Sleep there for ages I observed 20-30 seconds hangs of "unshare -n" on ordinary 8-cpu laptop with preemptible RCU enabled after CRIU tests round is finished. The solution is to convert net_mutex to the rw_semaphore and add fine grain locks to really small number of pernet_operations, what really need them. Then, pernet_operations::init/::exit methods, modifying the net-related data, will require down_read() locking only, while down_write() will be used for changing pernet_list (i.e., when modules are being loaded and unloaded). This gives signify performance increase, after all patch set is applied, like you may see here: %for i in {1..10000}; do unshare -n bash -c exit; done *before* real 1m40,377s user 0m9,672s sys 0m19,928s *after* real 0m17,007s user 0m5,311s sys 0m11,779 (5.8 times faster) This patch starts replacing net_mutex to net_sem. It adds rw_semaphore, describes the variables it protects, and makes to use, where appropriate. net_mutex is still present, and next patches will kick it out step-by-step. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller include/linux/rtnetlink.h | 1 + net/core/net_namespace.c | 39 ++++++++++++++++++++++++++------------- net/core/rtnetlink.c | 4 ++-- 3 files changed, 29 insertions(+), 15 deletions(-) commit 5ba049a5cc8e24a1643df75bbf65b4efa070fa74 Author: Kirill Tkhai Date: Tue Feb 13 12:26:13 2018 +0300 net: Cleanup in copy_net_ns() Line up destructors actions in the revers order to constructors. Next patches will add more actions, and this will be comfortable, if there is the such order. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/core/net_namespace.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 98f6c533a3e98f21305575f0cf87cdb6c2210c43 Author: Kirill Tkhai Date: Tue Feb 13 12:26:02 2018 +0300 net: Assign net to net_namespace_list in setup_net() This patch merges two repeating pieces of code in one, and they will live in setup_net() now. The only change is that assignment: init_net_initialized = true; becomes reordered with: list_add_tail_rcu(&net->list, &net_namespace_list); The order does not have visible effect, and it is a simple cleanup because of: init_net_initialized is used in !CONFIG_NET_NS case to order proc_net_ns_ops registration occuring at boot time: start_kernel()->proc_root_init()->proc_net_init(), with net_ns_init()->setup_net(&init_net, &init_user_ns) also occuring in boot time from the same init_task. When there are no another tasks to race with them, for the single task it does not matter, which order two sequential independent loads should be made. So we make them reordered. Signed-off-by: Kirill Tkhai Acked-by: Andrei Vagin Signed-off-by: David S. Miller net/core/net_namespace.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 817175040e7f92daac22b1b537ae09148e24de28 Author: Jani Nikula Date: Mon Feb 5 19:31:39 2018 +0200 drm/i915: introduce INTEL_PCH_ID() and use it Cleanup similar to INTEL_PCH_TYPE(). No functional changes. Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/798893c24728a1c766cb21c57ae0943e5859c897.1517851783.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 40ace64b1ece1b8a29f86e6e2bc6fb91f7f0e537 Author: Jani Nikula Date: Mon Feb 5 19:31:38 2018 +0200 drm/i915: have virtual PCH detection return a PCH id Simplify intel_virt_detect_pch() by making it return a PCH id rather than returning the PCH type and setting PCH id for some PCHs. Map the PCH id to PCH type using the shared routine. This gives us sanity check on the supported combinations also in the virtualized setting. Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/197cf635261a1c628371ffaaee90e8647493af4d.1517851783.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.c | 66 ++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 31 deletions(-) commit 435ad2c009429157cb65ce8a6221038235cc0501 Author: Jani Nikula Date: Mon Feb 5 19:31:37 2018 +0200 drm/i915: abstract virtual PCH id detection Make the code slightly more pleasant to look at. No functional changes. Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/38ee1ac06c6724e888679eb287af36c221bd399b.1517851783.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit da6c10c23a904d8ada1a9bf94ee26422f4cd4be0 Author: Jani Nikula Date: Mon Feb 5 19:31:36 2018 +0200 drm/i915: abstract PCH type detection from PCH id Make the logic in intel_detect_pch() easier to follow, and make the PCH id to type mapping reusable. No functional changes. Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/3bd4ffcd284cdbd4e8dc77ab02d97ded422e0c21.1517851783.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.c | 148 ++++++++++++++++++++-------------------- 1 file changed, 73 insertions(+), 75 deletions(-) commit 116fef6408599dd6ff6996235c50aa692e9b5631 Author: Andy Lutomirski Date: Wed Jan 31 07:56:22 2018 -0800 x86/mm/dump_pagetables: Add the EFI pagetable to the debugfs 'page_tables' directory EFI is complicated enough that being able to view its pagetables is quite helpful. Rather than requiring users to fish it out of dmesg on an appropriately configured kernel, let users view it in debugfs as well. Signed-off-by: Andy Lutomirski Acked-by: Ard Biesheuvel Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/ba158a93f3250e6fca752cff2cfb1fcdd9f2b50c.1517414050.git.luto@kernel.org [ Fixed trivial whitespace damage and fixed missing export. ] Signed-off-by: Ingo Molnar arch/x86/mm/debug_pagetables.c | 32 ++++++++++++++++++++++++++++++++ arch/x86/platform/efi/efi_64.c | 4 +++- 2 files changed, 35 insertions(+), 1 deletion(-) commit 1070730c1ad2bd49b0d11112728f1f4390137728 Author: Kirill A. Shutemov Date: Wed Jan 31 16:54:04 2018 +0300 x86/mm/encrypt: Simplify sme_pgtable_calc() sme_pgtable_calc() is unnecessary complex. It can be re-written in a more stream-lined way. As a side effect, we would get the code ready to boot-time switching between paging modes. Tested-by: Tom Lendacky Signed-off-by: Kirill A. Shutemov Reviewed-by: Tom Lendacky Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180131135404.40692-4-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/mem_encrypt_identity.c | 42 +++++++++++--------------------------- 1 file changed, 12 insertions(+), 30 deletions(-) commit aad983913d77af2c3394f29b88d7bb75ebd7d172 Author: Kirill A. Shutemov Date: Wed Jan 31 16:54:03 2018 +0300 x86/mm/encrypt: Simplify sme_populate_pgd() and sme_populate_pgd_large() sme_populate_pgd() and sme_populate_pgd_large() operate on the identity mapping, which means they want virtual addresses to be equal to physical one, without PAGE_OFFSET shift. We also need to avoid paravirtualization call there. Getting this done is tricky. We cannot use usual page table helpers. It forces us to open-code a lot of things. It makes code ugly and hard to modify. We can get it work with the page table helpers, but it requires few preprocessor tricks. - Define __pa() and __va() to be compatible with identity mapping. - Undef CONFIG_PARAVIRT and CONFIG_PARAVIRT_SPINLOCKS before including any file. This way we can avoid paravirtualization calls. Now we can user normal page table helpers just fine. Tested-by: Tom Lendacky Signed-off-by: Kirill A. Shutemov Reviewed-by: Tom Lendacky Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180131135404.40692-3-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/mem_encrypt_identity.c | 159 +++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 87 deletions(-) commit 1cd9c22fee3ac21db52a0997d08cf2f065d2c0c0 Author: Kirill A. Shutemov Date: Wed Jan 31 16:54:02 2018 +0300 x86/mm/encrypt: Move page table helpers into separate translation unit There are bunch of functions in mem_encrypt.c that operate on the identity mapping, which means they want virtual addresses to be equal to physical one, without PAGE_OFFSET shift. We also need to avoid paravirtualizaion call there. Getting this done is tricky. We cannot use usual page table helpers. It forces us to open-code a lot of things. It makes code ugly and hard to modify. We can get it work with the page table helpers, but it requires few preprocessor tricks. These tricks may have side effects for the rest of the file. Let's isolate such functions into own translation unit. Tested-by: Tom Lendacky Signed-off-by: Kirill A. Shutemov Reviewed-by: Tom Lendacky Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180131135404.40692-2-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/mem_encrypt.h | 1 + arch/x86/mm/Makefile | 14 +- arch/x86/mm/mem_encrypt.c | 578 +---------------------------------- arch/x86/mm/mem_encrypt_identity.c | 597 +++++++++++++++++++++++++++++++++++++ 4 files changed, 608 insertions(+), 582 deletions(-) commit 515ab7c41306aad1f80a980e1936ef635c61570c Author: Nadav Amit Date: Wed Jan 31 13:19:12 2018 -0800 x86/mm: Align TLB invalidation info The TLB invalidation info is allocated on the stack, which might cause it to be unaligned. Since this information may be transferred to different cores for TLB shootdown, this may cause an additional cache line to become shared. While the overhead is likely to be small, the fix is simple. We do not use __cacheline_aligned() since it also defines the section, which is inappropriate for stack variables. Signed-off-by: Nadav Amit Acked-by: Andy Lutomirski Cc: Dave Hansen Cc: Linus Torvalds Cc: Nadav Amit Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180131211912.52064-1-namit@vmware.com Signed-off-by: Ingo Molnar arch/x86/mm/tlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3e827d73ed454053d2ce6a4bf021b5adde3ac54 Author: Yong Wu Date: Fri Jan 26 15:11:28 2018 +0800 iommu/mediatek: Move attach_device after iommu-group is ready for M4Uv1 In the commit 05f80300dc8b ("iommu: Finish making iommu_group support mandatory"), the iommu framework has supposed all the iommu drivers have their owner iommu-group, it get rid of the FIXME workarounds while the group is NULL. But the flow of Mediatek M4U gen1 looks a bit trick that it will hang at this case: ========================================== Unable to handle kernel NULL pointer dereference at virtual address 00000030 pgd = c0004000 [00000030] *pgd=00000000 PC is at mutex_lock+0x28/0x54 LR is at iommu_attach_device+0xa4/0xd4 pc : [] lr : [] psr: 60000013 sp : df0edbb8 ip : df0edbc8 fp : df0edbc4 r10: c114da14 r9 : df2a3e40 r8 : 00000003 r7 : df27a210 r6 : df2a90c4 r5 : 00000030 r4 : 00000000 r3 : df0f8000 r2 : fffff000 r1 : df29c610 r0 : 00000030 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none xxx (mutex_lock) from [] (iommu_attach_device+0xa4/0xd4) (iommu_attach_device) from [] (__arm_iommu_attach_device+0x28/0x90) (__arm_iommu_attach_device) from [] (arm_iommu_attach_device+0x1c/0x30) (arm_iommu_attach_device) from [] (mtk_iommu_add_device+0xfc/0x214) (mtk_iommu_add_device) from [] (add_iommu_group+0x3c/0x68) (add_iommu_group) from [] (bus_for_each_dev+0x78/0xac) (bus_for_each_dev) from [] (bus_set_iommu+0xb0/0xec) (bus_set_iommu) from [] (mtk_iommu_probe+0x328/0x368) (mtk_iommu_probe) from [] (platform_drv_probe+0x5c/0xc0) (platform_drv_probe) from [] (driver_probe_device+0x2f4/0x4d8) (driver_probe_device) from [] (__driver_attach+0x10c/0x128) (__driver_attach) from [] (bus_for_each_dev+0x78/0xac) (bus_for_each_dev) from [] (driver_attach+0x2c/0x30) (driver_attach) from [] (bus_add_driver+0x1e0/0x278) (bus_add_driver) from [] (driver_register+0x88/0x108) (driver_register) from [] (__platform_driver_register+0x50/0x58) (__platform_driver_register) from [] (m4u_init+0x24/0x28) (m4u_init) from [] (do_one_initcall+0xf0/0x17c) ========================= The root cause is that the device's iommu-group is NULL while arm_iommu_attach_device is called. This patch prepare a new iommu-group for the iommu consumer devices to fix this issue. CC: Robin Murphy CC: Honghui Zhang Fixes: 05f80300dc8b ("iommu: Finish making iommu_group support mandatory") Reported-by: Ryder Lee Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu_v1.c | 54 +++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 33 deletions(-) commit 6d7cf02a8660cf5570b20017df4b14a2ddbd1694 Author: Robin Murphy Date: Wed Jan 24 14:22:09 2018 +0000 iommu/exynos: Use generic group callback Since iommu_group_get_for_dev() already tries iommu_group_get() and will not call ops->device_group if the group is already non-NULL, the check in get_device_iommu_group() is always redundant and it reduces to a duplicate of the generic version; let's just use that one instead. Signed-off-by: Robin Murphy Tested-by: Marek Szyprowski Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 01ee04badefd296eb7a4430497373be9b7b16783 Author: Scott Wood Date: Sun Jan 28 14:22:19 2018 -0600 iommu/amd: Don't use dev_data in irte_ga_set_affinity() search_dev_data() acquires a non-raw lock, which can't be done from atomic context on PREEMPT_RT. There is no need to look at dev_data because guest_mode should never be set if use_vapic is not set. Signed-off-by: Scott Wood Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 27790398c2aed917828dc3c6f81240d57f1584c9 Author: Scott Wood Date: Sun Jan 21 03:28:54 2018 -0600 iommu/amd: Use raw locks on atomic context paths Several functions in this driver are called from atomic context, and thus raw locks must be used in order to be safe on PREEMPT_RT. This includes paths that must wait for command completion, which is a potential PREEMPT_RT latency concern but not easily avoidable. Signed-off-by: Scott Wood Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 30 +++++++++++++++--------------- drivers/iommu/amd_iommu_init.c | 2 +- drivers/iommu/amd_iommu_types.h | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) commit 60aa80460da115216070082b4ab686b9e37c86ef Author: Colin Ian King Date: Tue Jan 30 14:53:48 2018 +0000 esp4: remove redundant initialization of pointer esph Pointer esph is being assigned a value that is never read, esph is re-assigned and only read inside an if statement, hence the initialization is redundant and can be removed. Cleans up clang warning: net/ipv4/esp4.c:657:21: warning: Value stored to 'esph' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Steffen Klassert net/ipv4/esp4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 416a1ae673db0918fbe6707c7d6f4459598e2c65 Author: Ladislav Michl Date: Wed Jan 17 21:31:49 2018 +0100 power: supply: gpio-charger: use helper variable to access device info Using explicit struct device variable makes code a bit more readable. Signed-off-by: Ladislav Michl Signed-off-by: Sebastian Reichel drivers/power/supply/gpio-charger.c | 42 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit 419cac572b79eda70f796c452895fefeee86a79a Author: Ladislav Michl Date: Wed Jan 17 21:31:14 2018 +0100 power: supply: gpio-charger: Drop driver remove function Simplify error unwinding using devm_* allocators. This also makes driver remove function empty, so remove it. Signed-off-by: Ladislav Michl Signed-off-by: Sebastian Reichel drivers/power/supply/gpio-charger.c | 43 ++++++------------------------------- 1 file changed, 7 insertions(+), 36 deletions(-) commit 015df4f54e2c3891859200bfc052895423bcce8b Author: Chris Wilson Date: Tue Feb 13 12:09:40 2018 +0000 drm/i915/selftests: Report setup errors for igt_partial_tiling igt_partial_tiling managed to fail with an -EBUSY. This usually means a pin leak, but that should be impossible given the test setup. Add a couple of error messages to help identify the path that failed. References: https://bugs.freedesktop.org/show_bug.cgi?id=105073 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180213120940.21579-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_object.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 0e04ce02e6a2ac30d21294d8bb2aeceb8489e52b Author: Patrice Chotard Date: Mon Feb 12 14:58:01 2018 +0100 ARM: dts: STi: Remove unused clk_ext2f_a9 clock This clock node is unused, remove it. This allows to fix the following warnings when compiling dtb with W=1 option : arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /clocks/clockgen-c0 missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /clocks/clockgen-c0 missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /clocks/clockgen-c0 missing or empty reg/ranges property Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-clock.dtsi | 11 ----------- arch/arm/boot/dts/stih410-clock.dtsi | 11 ----------- arch/arm/boot/dts/stih418-clock.dtsi | 11 ----------- 3 files changed, 33 deletions(-) commit cb10ca8107c2ccc9dc58858471652de67db1fa0e Author: Patrice Chotard Date: Tue Feb 13 12:59:51 2018 +0100 ARM: dts: STi: Update clocks node location Move: _ arm_periph_clk node as child of clockgen-a9@92b0000 node _ clk_m_a9_ext2f_div2 node as child of clk_s_c0_flexgen node _ clk-tmdsout-hdmi node outiside soc node This allows to fix the following warnings when compiling dtb with W=1 option : arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /clocks/clk-m-a9-periphs missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /clocks/clk-m-a9-ext2f-div2s missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /clocks/clk-tmdsout-hdmi missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /clocks/clk-tmdsout-hdmi missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /clocks/clk-m-a9-periphs missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /clocks/clk-m-a9-ext2f-div2s missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /clocks/clk-tmdsout-hdmi missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /clocks/clk-tmdsout-hdmi missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /clocks/clk-m-a9-periphs missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /clocks/clk-m-a9-ext2f-div2s missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /clocks/clk-tmdsout-hdmi missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /clocks/clk-tmdsout-hdmi missing or empty reg/ranges property Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-clock.dtsi | 79 +++++++++++++++++----------------- arch/arm/boot/dts/stih410-clock.dtsi | 83 ++++++++++++++++++------------------ arch/arm/boot/dts/stih418-clock.dtsi | 82 +++++++++++++++++------------------ 3 files changed, 122 insertions(+), 122 deletions(-) commit 2b5803b95977d60f6e3c88672969b1da024fc3e8 Author: Kuninori Morimoto Date: Tue Feb 13 02:02:39 2018 +0000 ASoC: uniphier: aio-dma: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Tested-by: Katsuhiro Suzuki Signed-off-by: Mark Brown sound/soc/uniphier/aio-dma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 45abcc556721a6d18e4af82e20e164044f0a3e36 Author: Charles Keepax Date: Mon Feb 12 18:15:47 2018 +0000 regmap: Use helper function for register offset As a helper function exists for calculating register offsets lets use that rather than open coding with the reg_stride. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ae27a8d1f3ebff09191fb8cb1341414547293b2 Author: Charles Keepax Date: Mon Feb 12 18:15:46 2018 +0000 regmap: Don't use format_val in regmap_bulk_read A bulk read can be implemented either through regmap_raw_read, or by reading each register individually using regmap_read. Both regmap_read and regmap_bulk_read should return values in native endian. In the individual case the current implementation calls format_val to put the data into the output array, which can cause endian issues. The regmap_read will have already converted the data into native endian, if the hosts endian differs from the device then format_val will switch the endian back again. Rather than using format_val simply use the code that is called if there is no format_val function. This code supports all cases except 24-bit but there don't appear to be any users of regmap_bulk_read for 24-bit. Additionally, it would have to be a big endian host for the old code to actually function correctly anyway. Fixes: 15b8d2c41fe5 ("regmap: Fix regmap_bulk_read in BE mode") Reported-by: David Rhodes Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 55 ++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 32 deletions(-) commit 71df179363a5a733a8932e9afb869760d7559383 Author: Charles Keepax Date: Mon Feb 12 18:15:44 2018 +0000 regmap: Correct comparison in regmap_cached The cache pointer points to the actual memory used by the cache, as the comparison here is looking for the type of the cache it should check against cache_type. Fixes: 1ea975cf1ef5 ("regmap: Add a function to check if a regmap register is cached") Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8f9a03b741ddfdde4aa8b607fa7d88eb63a6338 Author: Charles Keepax Date: Mon Feb 12 18:15:45 2018 +0000 regmap: Correct offset handling in regmap_volatile_range The current implementation is broken for regmaps that have a reg_stride, since it doesn't take the stride into account. Correct this by using the helper function to calculate the register offset. Fixes: f01ee60fffa4 ("regmap: implement register striding") Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3cc39c539d46be73ee032d2ff1b3f8fe44d4483 Author: Mahesh Kumar Date: Mon Feb 5 15:21:31 2018 -0200 drm/i915/icl: program mbus during pipe enable This patch program default values of MBus credit during pipe enable. Changes Since V1: - Add WARN_ON (Paulo) - Remove TODO comment - Program 0 during pipe disable - Rebase Changes since V2: - We don't need to do anything when disabling the pipe Changes since V3 (from Paulo): - Remove WARN() that we'll never be able to trigger (Ville). Cc: Ville Syrjälä Reviewed-by: Paulo Zanoni Reviewed-by: James Ausmus Signed-off-by: Mahesh Kumar Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180205172131.20255-1-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_display.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 4cb4585e5a7f780726ab18ab12b547d9331d4acd Author: Mahesh Kumar Date: Mon Feb 5 13:40:45 2018 -0200 drm/i915/icl: initialize MBus during display init This patch initializes MBus during display initialization. Changes since V2 (from Paulo): - Don't forget to remove the WARN_ON(1) call. Changes since V1: - Rebase to use function like Macros Reviewed-by: Paulo Zanoni Reviewed-by: James Ausmus Signed-off-by: Mahesh Kumar Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180205154046.11485-6-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 746edf8f66ed8aa6aeba90b301530a16461844e8 Author: Mahesh Kumar Date: Mon Feb 5 13:40:44 2018 -0200 drm/i915/icl: Enable both DBuf slices during init ICL has 2 slices of DBuf, enable both the slices during display init. Ideally we should only enable the second slice when needed in order to save power, but while we're not there yet, adopt the simpler solution to keep us bug-free. v2 (from Paulo): - Add the TODO comment. - Reorganize where things are defined. - Fix indentation. - Remove unnecessary POSTING_READ() calls. - Improve the commit message. Reviewed-by: Paulo Zanoni Signed-off-by: Mahesh Kumar Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180205154046.11485-5-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_runtime_pm.c | 34 +++++++++++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) commit ad186f3fd98a958d38cd6cf642b21b603bee1b36 Author: Paulo Zanoni Date: Mon Feb 5 13:40:43 2018 -0200 drm/i915/icl: implement the display init/uninit sequences This code is similar enough to the CNL code that I considered just adding ICL support to the CNL function, but I think it's still different enough, and having a function specific to ICL allows us to more easily adapt code in case the spec changes more later. We're still missing the power wells and the mbus code, so leave those pieces with a FIXME comment while they're not here yet. v2: Don't use _PICK, don't WARN_ON(1), don't forget the chicken bits. v3: Use _MMIO_PORT() (Ville). Reviewed-by: James Ausmus (v2) Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180205154046.11485-4-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_reg.h | 16 ++++++- drivers/gpu/drm/i915/intel_runtime_pm.c | 82 ++++++++++++++++++++++++++++++++- 2 files changed, 94 insertions(+), 4 deletions(-) commit 186a277e317a14dcba5a2d709f2fbd8c078dfa6f Author: Paulo Zanoni Date: Tue Feb 6 17:33:46 2018 -0200 drm/i915/icl: add the main CDCLK functions This commit adds the basic CDCLK functions, but it's still missing pieces of the display initialization sequence. v2: - Implement the voltage levels. - Rebase. v3: - Adjust to the new "bypass" clock (Imre). - Call intel_dump_cdclk_state() too. - Rename a variable to avoid confusion. - Simplify the DVFS part. v4: - Remove wrong bit definition (James). - Also drive-by fix the coding style for the register definition we touched. v5: - Comment style (checkpatch). Cc: James Ausmus Cc: Imre Deak Reviewed-by: James Ausmus Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180206193346.18272-1-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_reg.h | 35 +++--- drivers/gpu/drm/i915/intel_cdclk.c | 237 ++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_drv.h | 2 + 3 files changed, 257 insertions(+), 17 deletions(-) commit 62d4a5e149552ef1f1757197652ae7be4fc9f3a3 Author: Paulo Zanoni Date: Mon Feb 5 13:40:41 2018 -0200 drm/i915/icl: add ICL support to cnl_set_procmon_ref_values On ICL we have two sets of registers: one for port A and another for port B. The set of port A registers is the same as the CNL registers. Since the procmon table on ICL is the same we want to reuse the CNL function. To do that we add a port argument and make CNL always call the function passing port A. This way, we'll be able to easily reuse the function on ICL when we add icl_display_core_init(). v2: Don't use _PICK() when you can use a ternary operator. v3: Don't use a ternary operation when you can use _MMIO_PORT (Ville). Add an extra comment about why we're passing PORT_A (James). Reviewed-by: James Ausmus Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180205154046.11485-2-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_reg.h | 22 ++++++++++++++++++++++ drivers/gpu/drm/i915/intel_runtime_pm.c | 22 +++++++++++++++------- 2 files changed, 37 insertions(+), 7 deletions(-) commit a06cc94f3f8dfab74fe7fac3a6e9f15d77566d00 Author: Cao jin Date: Thu Feb 8 14:38:57 2018 +0800 x86/build: Drop superfluous ALIGN from the linker script ALIGN(8) is superfluous since macro TEXT_TEXT already has one. bonus cleanups: - indentation fix - spaces -> tab. Signed-off-by: Cao jin Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180208063857.15197-1-caoj.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/kernel/vmlinux.lds.S | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ac6267e34abfb322d2c408598866560922fccc22 Author: Kuninori Morimoto Date: Mon Jan 29 04:26:20 2018 +0000 ASoC: ad1980: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ad1980.c | 87 ++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 47 deletions(-) commit 28f898499f3306274c900ad85b579435f9e4c8b5 Author: Kuninori Morimoto Date: Mon Jan 29 03:10:29 2018 +0000 ASoC: wm9705: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm9705.c | 83 ++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 45 deletions(-) commit b5b410de5550b0417f8648ccbf267192d8fc2272 Author: Kuninori Morimoto Date: Mon Jan 29 04:38:18 2018 +0000 ASoC: stac9766: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/stac9766.c | 77 +++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 41 deletions(-) commit be4b1c09765c91897ecbfdb8d4e1c8239d5e0650 Author: Kuninori Morimoto Date: Mon Jan 29 04:26:41 2018 +0000 ASoC: ad73311: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ad73311.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 8ea99bc6619a0bf61931ed642fb35aeffdd0936f Author: Kuninori Morimoto Date: Mon Jan 29 03:11:03 2018 +0000 ASoC: wm9713: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm9713.c | 201 ++++++++++++++++++++++------------------------ 1 file changed, 97 insertions(+), 104 deletions(-) commit 143b44845d87042c0d49243ac32af92bce35a0d9 Author: Kuninori Morimoto Date: Mon Jan 29 03:10:45 2018 +0000 ASoC: wm9712: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm9712.c | 109 ++++++++++++++++++++++------------------------ 1 file changed, 51 insertions(+), 58 deletions(-) commit 1417c5fa3962d768bb8f18f4725a5fc039dbbb0e Author: Kuninori Morimoto Date: Tue Feb 13 02:54:58 2018 +0000 ASoC: wm9081: fixup wm9081_digital_mute() reg read commit 48c338764296 ("ASoC: wm9081: replace codec to component") replaced codec to component, but it didn't keep WM9081_DAC_DIGITAL_2 value to reg. This patch fixup it. Reported-by: kbuild test robot Reported-by: Stephen Rothwell Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm9081.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fa0b7fdf8bd16b6cdda8516793989511c9322ed Author: Wu Fengguang Date: Tue Feb 13 01:16:06 2018 +0800 ASoC: rt5659: rt5659_intel_hd_header_probe_setup() can be static Fixes: 041e74b71491 ("ASoC: rt5659: Add the support of Intel HDA Header") Signed-off-by: Fengguang Wu Signed-off-by: Mark Brown sound/soc/codecs/rt5659.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d732d89b154af23946180bf785b7b0ec42275b49 Author: Wu Fengguang Date: Tue Feb 13 01:53:10 2018 +0800 ASoC: uniphier: aiodma_rb_get_rp() can be static Fixes: f37fe2f9987b ("ASoC: uniphier: add support for UniPhier AIO common driver") Signed-off-by: Fengguang Wu Signed-off-by: Mark Brown sound/soc/uniphier/aio-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f6e920faae065fa8e6985b99ec86899bc3308de Author: Kuninori Morimoto Date: Tue Feb 13 02:09:14 2018 +0000 ASoC: rsnd: suppress rsnd_dai_call() debug message rsnd_dai_call() is using dev_dbg(), but its message is sometimes blocks nessesary other messages. If RSND_DEBUG_NO_DAI_CALL was defined it will be suppressed by this patch. Reported-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 11 ++++++++++- sound/soc/sh/rcar/rsnd.h | 10 ++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) commit 2b62786951ca38cc9fd0bd9273de0aae1b45134d Author: Kuninori Morimoto Date: Tue Feb 13 02:08:53 2018 +0000 ASoC: rsnd: indicate IRQ error status for debug SSI/SRC have under/over flow error handling, and its status is useful for debuging. But sometimes it might be too much message, and it might blocks necessity other information. To avoid such situation, basically this patch indicates interrupt status debug message if DEBUG was defined, but it will be suppressed if RSND_DEBUG_NO_IRQ_STATUS was defined. Reported-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/rsnd.h | 10 ++++++++++ sound/soc/sh/rcar/src.c | 22 ++++++++++++++++++++-- sound/soc/sh/rcar/ssi.c | 16 +++++++++++++++- 3 files changed, 45 insertions(+), 3 deletions(-) commit 5d16b9e33804076b8ead97a0f4cce7446db5b267 Author: Patrice Chotard Date: Tue Feb 13 12:53:43 2018 +0100 ARM: dts: STi: Update sound related nodes location Move sound node outside soc node and sti_sasg_codec node as child of syscfg_core node. This allows to fix the following warning when compiling dtb with W=1 option: arch/arm/boot/dts/stih407-b2120.dtb: Warning (unit_address_vs_reg): Node /soc/sound/simple-audio-card,dai-link@0 has a unit name, but no reg property arch/arm/boot/dts/stih407-b2120.dtb: Warning (unit_address_vs_reg): Node /soc/sound/simple-audio-card,dai-link@1 has a unit name, but no reg property arch/arm/boot/dts/stih407-b2120.dtb: Warning (unit_address_vs_reg): Node /soc/sound/simple-audio-card,dai-link@2 has a unit name, but no reg property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/sti-sasg-codec missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (unit_address_vs_reg): Node /soc/sound/simple-audio-card,dai-link@0 has a unit name, but no reg property arch/arm/boot/dts/stih410-b2120.dtb: Warning (unit_address_vs_reg): Node /soc/sound/simple-audio-card,dai-link@1 has a unit name, but no reg property arch/arm/boot/dts/stih410-b2120.dtb: Warning (unit_address_vs_reg): Node /soc/sound/simple-audio-card,dai-link@2 has a unit name, but no reg property arch/arm/boot/dts/stih407-b2120.dtb: Warning (simple_bus_reg): Node /soc/sound missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/sti-sasg-codec missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (unit_address_vs_reg): Node /soc/sound/simple-audio-card,dai-link@0 has a unit name, but no reg property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /soc/sti-sasg-codec missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /soc/sound missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /soc/sti-sasg-codec missing or empty reg/ranges property Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-family.dtsi | 14 ++--- arch/arm/boot/dts/stih410-b2260.dts | 38 +++++++------- arch/arm/boot/dts/stihxxx-b2120.dtsi | 98 ++++++++++++++++++----------------- 3 files changed, 77 insertions(+), 73 deletions(-) commit 9ae65654996e06bf84a765388a62659a61aa72d8 Author: Chen-Yu Tsai Date: Wed Jan 3 14:28:44 2018 +0800 ARM: dts: sun8i: a83t: bananapi-m3: Add LED device nodes The Bananapi M3 has two controllable LEDs, blue and green, that are tied to the PMIC's two GPIO pins. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 52b5f53f4b60fe645f3203e2e85df2189275def3 Author: Viresh Kumar Date: Fri Feb 9 14:28:04 2018 +0530 ARM: dts: sun[4-7]i: Remove "cooling-{min|max}-level" for CPU nodes The "cooling-min-level" and "cooling-max-level" properties are not parsed by any part of the kernel currently and the max cooling state of a CPU cooling device is found by referring to the cpufreq table instead. Remove the unused properties from the CPU nodes. Signed-off-by: Viresh Kumar Signed-off-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 1 - arch/arm/boot/dts/sun4i-a10.dtsi | 2 -- arch/arm/boot/dts/sun5i-a13.dtsi | 2 -- arch/arm/boot/dts/sun6i-a31.dtsi | 2 -- arch/arm/boot/dts/sun7i-a20.dtsi | 2 -- 5 files changed, 9 deletions(-) commit 254adb06bfd112fca8a6355dc74a925ec423f984 Author: Marcus Cooper Date: Thu Feb 1 09:37:37 2018 +0100 ARM: dts: sun6i: a31: Enable HDMI support on the Mele I7 The Mele I7 has an HDMI connector wired to the HDMI pins on the SoC. Enable the display pipeline and HDMI output. Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard [wens@csie.org: Added "dts" prefix] Signed-off-by: Chen-Yu Tsai arch/arm/boot/dts/sun6i-a31-i7.dts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 1ea9b98b007a662e402551a41a4413becad40a65 Author: Yang Shi Date: Tue Feb 6 07:18:28 2018 +0800 debugobjects: Use global free list in __debug_check_no_obj_freed() __debug_check_no_obj_freed() iterates over the to be freed memory region in chunks and iterates over the corresponding hash bucket list for each chunk. This can accumulate to hundred thousands of checked objects. In the worst case this can trigger the soft lockup detector: NMI watchdog: BUG: soft lockup - CPU#15 stuck for 22s! CPU: 15 PID: 110342 Comm: stress-ng-getde Call Trace: [] debug_check_no_obj_freed+0x13e/0x220 [] __free_pages_ok+0x1f1/0x5c0 [] __free_pages+0x25/0x40 [] __free_slab+0x19b/0x270 [] discard_slab+0x39/0x50 [] __slab_free+0x207/0x270 [] ___cache_free+0xa6/0xb0 [] qlist_free_all+0x47/0x80 [] quarantine_reduce+0x159/0x190 [] kasan_kmalloc+0xaf/0xc0 [] kasan_slab_alloc+0x12/0x20 [] kmem_cache_alloc+0xfa/0x360 [] ? getname_flags+0x4f/0x1f0 [] getname_flags+0x4f/0x1f0 [] getname+0x12/0x20 [] do_sys_open+0xf9/0x210 [] SyS_open+0x1e/0x20 [] entry_SYSCALL_64_fastpath+0x1f/0xc2 The code path might be called in either atomic or non-atomic context, but in_atomic() can't tell if the current context is atomic or not on a PREEMPT=n kernel, so cond_resched() can't be used to prevent the softlockup. Utilize the global free list to shorten the loop execution time. [ tglx: Massaged changelog ] Suggested-by: Thomas Gleixner Signed-off-by: Yang Shi Signed-off-by: Thomas Gleixner Cc: longman@redhat.com Link: https://lkml.kernel.org/r/1517872708-24207-5-git-send-email-yang.shi@linux.alibaba.com lib/debugobjects.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 636e1970fd7deaa0d0ee0dfb6ac65fbd690b32d2 Author: Yang Shi Date: Tue Feb 6 07:18:27 2018 +0800 debugobjects: Use global free list in free_object() The newly added global free list allows to avoid lengthy pool_list iterations in free_obj_work() by putting objects either into the pool list when the fill level of the pool is below the maximum or by putting them on the global free list immediately. As the pool is now guaranteed to never exceed the maximum fill level this allows to remove the batch removal from pool list in free_obj_work(). Split free_object() into two parts, so the actual queueing function can be reused without invoking schedule_work() on every invocation. [ tglx: Remove the batch removal from pool list and massage changelog ] Suggested-by: Thomas Gleixner Signed-off-by: Yang Shi Signed-off-by: Thomas Gleixner Cc: longman@redhat.com Link: https://lkml.kernel.org/r/1517872708-24207-4-git-send-email-yang.shi@linux.alibaba.com lib/debugobjects.c | 63 +++++++++++++++++++----------------------------------- 1 file changed, 22 insertions(+), 41 deletions(-) commit 36c4ead6f6dfbbe777d3d7e9cc8702530b71a94f Author: Yang Shi Date: Tue Feb 6 07:18:26 2018 +0800 debugobjects: Add global free list and the counter free_object() adds objects to the pool list and schedules work when the pool list is larger than the pool size. The worker handles the actual kfree() of the object by iterating the pool list until the pool size is below the maximum pool size again. To iterate the pool list, pool_lock has to be held and the objects which should be freed() need to be put into temporary storage so pool_lock can be dropped for the actual kmem_cache_free() invocation. That's a pointless and expensive exercise if there is a large number of objects to free. In such a case its better to evaulate the fill level of the pool in free_objects() and queue the object to free either in the pool list or if it's full on a separate global free list. The worker can then do the following simpler operation: - Move objects back from the global free list to the pool list if the pool list is not longer full. - Remove the remaining objects in a single list move operation from the global free list and do the kmem_cache_free() operation lockless from the temporary list head. In fill_pool() the global free list is checked as well to avoid real allocations from the kmem cache. Add the necessary list head and a counter for the number of objects on the global free list and export that counter via sysfs: max_chain :79 max_loops :8147 warnings :0 fixups :0 pool_free :1697 pool_min_free :346 pool_used :15356 pool_max_used :23933 on_free_list :39 objs_allocated:32617 objs_freed :16588 Nothing queues objects on the global free list yet. This happens in a follow up change. [ tglx: Simplified implementation and massaged changelog ] Suggested-by: Thomas Gleixner Signed-off-by: Yang Shi Signed-off-by: Thomas Gleixner Cc: longman@redhat.com Link: https://lkml.kernel.org/r/1517872708-24207-3-git-send-email-yang.shi@linux.alibaba.com lib/debugobjects.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) commit bd9dcd046509cd5355605e43791eacee8bf5e40f Author: Yang Shi Date: Tue Feb 6 07:18:25 2018 +0800 debugobjects: Export max loops counter __debug_check_no_obj_freed() can be an expensive operation depending on the size of memory freed. It already exports the maximum chain walk length via debugfs, but this only records the maximum of a single memory chunk. Though there is no information about the total number of objects inspected for a __debug_check_no_obj_freed() operation, which might be significantly larger when a huge memory region is freed. Aggregate the number of objects inspected for a single invocation of __debug_check_no_obj_freed() and export it via sysfs. The resulting output of /sys/kernel/debug/debug_objects/stats looks like: max_chain :121 max_checked :543267 warnings :0 fixups :0 pool_free :1764 pool_min_free :341 pool_used :86438 pool_max_used :268887 objs_allocated:6068254 objs_freed :5981076 [ tglx: Renamed the variable to max_checked and adjusted changelog ] Signed-off-by: Yang Shi Signed-off-by: Thomas Gleixner Cc: longman@redhat.com Link: https://lkml.kernel.org/r/1517872708-24207-2-git-send-email-yang.shi@linux.alibaba.com lib/debugobjects.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 387f77cc8249c847b4fa4d8c93694818b79efee3 Author: Vincent Guittot Date: Tue Feb 13 09:59:42 2018 +0100 sched/fair: Remove stray space in #ifdef Remove a useless space in # ifdef and align it with others. Signed-off-by: Vincent Guittot Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1518512382-29426-1-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 75af6fa42dc68b730e85f51034512c61e52eb0c0 Author: Corentin Labbe Date: Fri Jan 19 15:19:06 2018 +0100 clk: sunxi-ng: remove select on obsolete SUNXI_CCU_X kconfig name The following symbols: SUNXI_CCU_DIV SUNXI_CCU_MULT SUNXI_CCU_NK SUNXI_CCU_NKM SUNXI_CCU_NM SUNXI_CCU_MP SUNXI_CCU_PHASE were removed with the commit 06e226c7fb23 ("clk: sunxi-ng: Move all clock types to a library") So selecting them is useless. Fixes: c84f5683f6e9 ("clk: sunxi-ng: Add sun4i/sun7i CCU driver") Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Kconfig | 7 ------- 1 file changed, 7 deletions(-) commit 2f9d5a7bbc191d9e10c23d02650544d76d5c36d3 Author: Marcus Cooper Date: Thu Feb 1 09:37:00 2018 +0100 ARM: dts: sun7i: Enable HDMI support on the Olimex EVB Enable the display pipeline and HDMI output on the Olimex A20-SOM-EVB. Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit fd25ab90121864f29bef47018872173e50094dd6 Author: Giulio Benetti Date: Wed Jan 31 20:31:26 2018 +0100 ARM: dts: sun7i: include correct ccu clock header Including sun4i header instead of sun7i prevents using sun7i specific defines. Substitute header inclusion in sun7i-a20.dtsi using right one. Signed-off-by: Giulio Benetti Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8edf68ef0dbd5829cf839245a5daebbced5861ca Author: Stefan Mavrodiev Date: Mon Jan 29 15:56:40 2018 +0200 ARM: dts: sunxi: Add Olimex A20-SOM204-EVB-eMMC board A20-SOM204 board has option with onboard 16GB eMMC. The chip is wired to MMC2 slot. Signed-off-by: Stefan Mavrodiev Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + .../boot/dts/sun7i-a20-olimex-som204-evb-emmc.dts | 36 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit a84e0d636d64e863700f5cd7cd7b6994800f5dd1 Author: Stefan Mavrodiev Date: Mon Jan 29 15:56:39 2018 +0200 ARM: dts: sunxi: Add Olimex A20-SOM204-EVB board This is new System-On-Module platform with universal dimm socket for easy insertation. The EVB board is designed to be universal with future modules. Product page is located here [1]. There are two dts files - one for base model and another for eMMC variant. Base features of A20-SOM204 board includes: * 1GB DDR3 RAM * AXP209 PMU * KSZ9031 Gigabit PHY * AT24C16 EEPROM * Status LED * LCD connector * GPIO connector There will be variants with the following options: * Second LAN8710A Megabit PHY * 16MB SPI Flash memory * eMMC card * ATECC508 crypto device The EVB board has: * Debug UART * MicroSD card connector * USB-OTG connector * Two USB host * RTL8723BS WiFi/BT combo * IrDA transceiver/receiver * HDMI connector * VGA connector * Megabit ethernet transceiver * Gigabit ethernet transceiver * SATA connector * CAN driver * CSI camera * MIC and HP connectors * PCIe x4 connector * USB3 connector * Two UEXT connectors * Two user LEDs Some of the features are multiplexed and cannot be used the same time: CAN and Megabit PHY. Others are not usable with A20 SoC: PCIe and USB3. [1] https://www.olimex.com/Products/SOM204/ Signed-off-by: Stefan Mavrodiev Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun7i-a20-olimex-som204-evb.dts | 335 ++++++++++++++++++++++ 2 files changed, 336 insertions(+) commit a816d946285a31d3336ddf61e9e2d119cfa96fae Author: Marcus Cooper Date: Tue Jan 30 19:32:54 2018 +0100 ARM: dts: sun4i: Enable HDMI support on the MK802 Enable the display pipeline and HDMI output. Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10-mk802.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 0d059d325746811ff3b3ca5e466f5d5d3ea04a8a Author: Marcus Cooper Date: Mon Jan 29 10:23:10 2018 +0100 ARM: dts: sun7i: Enable HDMI support on the MK808C Enable the display pipeline and HDMI output Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-mk808c.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 45e01f401a2a16a8d7ca910fe01c124451980bd8 Author: Tuomas Tynkkynen Date: Fri Dec 22 22:57:37 2017 +0200 ARM: dts: sunxi: Switch MMC nodes away from cd-inverted property Using the cd-inverted property is not useful when GPIOs are used as card detects since the polarity can be specified with the usual GPIO_ACTIVE_(HIGH|LOW) GPIO flags. It has also caused confusion for U-Boot developers, so migrate all sunxi boards away from cd-inverted. Signed-off-by: Tuomas Tynkkynen Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10-a1000.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-dserve-dsrv9703c.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-hackberry.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-hyundai-a7hd.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-inet1.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-inet97fv2.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-itead-iteaduino-plus.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-marsboard.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-mini-xplus.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-mk802.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-mk802ii.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-pcduino.dts | 3 +-- arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts | 3 +-- arch/arm/boot/dts/sun5i-a10s-auxtek-t003.dts | 3 +-- arch/arm/boot/dts/sun5i-a10s-auxtek-t004.dts | 3 +-- arch/arm/boot/dts/sun5i-a10s-mk802.dts | 3 +-- arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 6 ++---- arch/arm/boot/dts/sun5i-a10s-r7-tv-dongle.dts | 3 +-- arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts | 3 +-- arch/arm/boot/dts/sun5i-a13-empire-electronix-d709.dts | 3 +-- arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 3 +-- arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 3 +-- arch/arm/boot/dts/sun5i-a13-olinuxino.dts | 3 +-- arch/arm/boot/dts/sun5i-gr8-evb.dts | 3 +-- arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi | 3 +-- arch/arm/boot/dts/sun6i-a31-colombus.dts | 3 +-- arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 3 +-- arch/arm/boot/dts/sun6i-a31-i7.dts | 3 +-- arch/arm/boot/dts/sun6i-a31-m9.dts | 3 +-- arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts | 3 +-- arch/arm/boot/dts/sun6i-a31s-primo81.dts | 3 +-- arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 3 +-- arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 3 +-- arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | 3 +-- arch/arm/boot/dts/sun6i-reference-design-tablet.dtsi | 3 +-- arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-bananapi.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-bananapro.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-hummingbird.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-icnova-swac.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-itead-ibox.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-m3.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-mk808c.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts | 6 ++---- arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 6 ++---- arch/arm/boot/dts/sun7i-a20-orangepi-mini.dts | 6 ++---- arch/arm/boot/dts/sun7i-a20-orangepi.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-pcduino3.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 3 +-- arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts | 3 +-- arch/arm/boot/dts/sun8i-a23-evb.dts | 3 +-- arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 3 +-- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 3 +-- arch/arm/boot/dts/sun8i-a83t-allwinner-h8homlet-v2.dts | 3 +-- arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 3 +-- arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts | 3 +-- arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 3 +-- arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 3 +-- arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 3 +-- arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts | 3 +-- arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts | 3 +-- arch/arm/boot/dts/sun8i-h3-nanopi.dtsi | 3 +-- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 3 +-- arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts | 3 +-- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 3 +-- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 3 +-- arch/arm/boot/dts/sun8i-r16-bananapi-m2m.dts | 3 +-- arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 3 +-- arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi | 3 +-- arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 3 +-- arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 3 +-- arch/arm/boot/dts/sun9i-a80-optimus.dts | 3 +-- 86 files changed, 90 insertions(+), 180 deletions(-) commit 88c23c05ef18f543fad7b26c95a3acc0ffb378cc Author: Jelle van der Waa Date: Tue Jan 23 15:58:44 2018 -0800 ARM: dts: nanopi-neo-air: Add WiFi / eMMC Enable the WiFi (AP6212) chip and eMMC support for the NanoPi NEO Air. This patch was originally submitted by Jelle van der Waa. Martin Kelly modified it to compile on the latest kernel, fixed up some review comments from Maxime Ripard, and re-tested the patch. Cc: Maxime Ripard Cc: linux-sunxi@googlegroups.com Cc: devicetree@vger.kernel.org Signed-off-by: Jelle van der Waa Signed-off-by: Martin Kelly Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit f90d738ef6718b35ac7267b05a2e027c90e19f4d Author: Jacopo Mondi Date: Fri Feb 9 18:34:18 2018 +0100 ARM: shmobile: Enable RZA1 pin controller Enable PINCTRL_RZA1 option in shmobile_defconfig Signed-off-by: Jacopo Mondi Tested-by: Simon Horman Signed-off-by: Simon Horman arch/arm/configs/shmobile_defconfig | 1 + 1 file changed, 1 insertion(+) commit 31bded67ad215be592deda0c9ee8acdfe2067243 Author: Sergei Shtylyov Date: Fri Nov 10 23:02:20 2017 +0300 arm64: dts: renesas: eagle: add SCIF0 pins Add the (previously omitted) SCIF0 pin data to the Eagle board's device tree. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 15981bab23cc1caf7070fa10ac39efa5d928dee9 Author: Sergei Shtylyov Date: Fri Nov 10 23:02:19 2017 +0300 arm64: dts: renesas: r8a77970: add PFC support Define the generic R8A77970 part of the PFC device node. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 5da2bd5ad50671a76bbbf41ca797ccfae1f71214 Author: Linus Walleij Date: Mon Feb 12 22:54:06 2018 +0100 pinctrl: nomadik: add USB functions for STn8815 The MUSB block in the Nomadik has two pin settings: high speed or full speed. These correspond to two unique pin group settings: all pins set to function B for high speed and all set to function C for full speed. Full speed uses more pins than high speed. Signed-off-by: Linus Walleij drivers/pinctrl/nomadik/pinctrl-nomadik-stn8815.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 69a87f290b46228c2ff1cc942326a90c468a2a68 Author: Linus Walleij Date: Mon Feb 12 22:40:23 2018 +0100 gpio: ftgpio010: Fix some more registers There is a register for "bypass" which seems to not be used for anything in some silicon designs, but may be used in others, and there is both a raw and masked interrupt status register. Define them all for clarity, no semantic changes. Signed-off-by: Linus Walleij drivers/gpio/gpio-ftgpio010.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3758d96808b9942de9272079d5a24c6c0d2b6c7a Author: David Weinehall Date: Fri Feb 9 15:07:55 2018 +0200 drm/i915: Fix incorrect comment While the comment singles out Port A or B, the code says Port A or *D*. Looking at the history it seems that the comment was added after the code, so it seems likely that the code is correct, not the comment. CC: Jani Nikula CC: Rodrigo Vivi Signed-off-by: David Weinehall Reviewed-by: James Ausmus Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180209130755.11893-1-david.weinehall@linux.intel.com drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 842891be96bd2b90f0e7d44192d45f61bab17926 Author: Bjorn Andersson Date: Mon Jun 26 09:02:28 2017 -0700 samples: Introduce Qualcomm QMI sample client Introduce a sample driver that register for server notifications and spawn clients for each available test service (service 15). The spawned clients implements the interface for encoding "ping" and "data" requests and decode the responses from the remote. Acked-By: Chris Lew Signed-off-by: Bjorn Andersson samples/Kconfig | 9 + samples/Makefile | 2 +- samples/qmi/Makefile | 1 + samples/qmi/qmi_sample_client.c | 622 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 633 insertions(+), 1 deletion(-) commit 1fb82ee806d170b92315f424eac9b5b34b9ead64 Author: Bjorn Andersson Date: Sun Aug 27 21:51:38 2017 -0700 remoteproc: qcom: Introduce sysmon The sysmon client communicates either via a dedicated SMD/GLINK channel or via QMI encoded messages over IPCROUTER with remote processors in order to perform graceful shutdown and inform about other remote processors shutting down. Acked-By: Chris Lew Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 17 ++ drivers/remoteproc/Makefile | 1 + drivers/remoteproc/qcom_adsp_pil.c | 12 + drivers/remoteproc/qcom_common.h | 21 ++ drivers/remoteproc/qcom_q6v5_pil.c | 3 + drivers/remoteproc/qcom_sysmon.c | 579 +++++++++++++++++++++++++++++++++++++ drivers/remoteproc/qcom_wcnss.c | 4 + 7 files changed, 637 insertions(+) commit 880f5b388252fedb26c70bb80ad1d7c8abbc0607 Author: Bjorn Andersson Date: Mon Oct 30 23:11:14 2017 -0700 remoteproc: Pass type of shutdown to subdev remove remoteproc instances can be stopped either by invoking shutdown or by an attempt to recover from a crash. For some subdev types it's expected to clean up gracefully during a shutdown, but are unable to do so during a crash - so pass this information to the subdev remove functions. Acked-By: Chris Lew Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_common.c | 6 +++--- drivers/remoteproc/remoteproc_core.c | 18 +++++++++--------- include/linux/remoteproc.h | 7 ++++--- 3 files changed, 16 insertions(+), 15 deletions(-) commit cf19e5e2054f5172c07a152f9e04eb3bae3d86dd Merge: 9b2c45d a0073a4 Author: David S. Miller Date: Mon Feb 12 19:55:33 2018 -0500 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2018-02-12 This series contains updates to i40e and i40evf. Alan fixes a spelling mistake in code comments. Fixes an issue on older firmware versions or NPAR enabled PFs which do not support the I40E_FLAG_DISABLE_FW_LLDP flag and would get into a situation where any attempt to change any priv flag would be forbidden. Alex got busy with the ITR code and made several cleanups and fixes so that we can more easily understand what is going on. The fixes included a computational fix when determining the register offset, as well as a fix for unnecessarily toggling the CLEARPBA bit which could lead to potential lost events if auto-masking is not enabled. Filip adds a necessary delay to recover after a EMP reset when using firmware version 4.33. Paweł adds a warning message for MFP devices when the link-down-on-close flag is set because it may affect other partitions. ==================== Signed-off-by: David S. Miller commit 1b8c90985f59ccd8a1adb723b58b42628b36e668 Author: Alexey Khoroshilov Date: Sat Feb 10 01:28:36 2018 +0300 mtd: nand: vf610: check mtd_device_register() return code vf610_nfc_probe() misses error handling of mtd_device_register(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Reviewed-by: Stefan Agner Signed-off-by: Boris Brezillon drivers/mtd/nand/vf610_nfc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 196644fd09ab7bf47040c0bdd1b48fc3c2bc08a6 Author: Alexey Khoroshilov Date: Sat Feb 10 01:28:35 2018 +0300 mtd: nand: vf610: improve readability of error label Use clearer error labels as Boris Brezillon suggested. Signed-off-by: Alexey Khoroshilov Reviewed-by: Stefan Agner Signed-off-by: Boris Brezillon drivers/mtd/nand/vf610_nfc.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit f5a666bdd585b47bea60cec3cb5f4d9fbbc6e409 Author: Alexey Khoroshilov Date: Sat Feb 10 01:28:34 2018 +0300 mtd: nand: vf610: remove the unnecessary of_node_put() Calling of_node_put() in vf610_nfc_probe() is wrong because nothing in this code retains a reference to the DT node. Signed-off-by: Alexey Khoroshilov Reviewed-by: Stefan Agner Signed-off-by: Boris Brezillon drivers/mtd/nand/vf610_nfc.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 532a1cf9a0f22f1a8699284e74aecf0bda3ffd29 Author: Stefan Agner Date: Fri Feb 9 00:59:19 2018 +0100 mtd: nand: vf610_nfc: remove unused function The function count_written_bits has been replaced by the generic nand_check_erased_ecc_chunk() function with commit 48c25cf44118 ("mtd: nand: vf610_nfc: use nand_check_erased_ecc_chunk() helper"). Remove the unused function. Signed-off-by: Stefan Agner Signed-off-by: Boris Brezillon drivers/mtd/nand/vf610_nfc.c | 15 --------------- 1 file changed, 15 deletions(-) commit 07ad5a7214841704e71540493a00041fd7f4e3af Author: Miquel Raynal Date: Wed Jan 17 00:19:34 2018 +0100 mtd: nand: add ->setup_data_interface() support for Marvell NFCv1 First generation of Marvell NAND flash controllers (eg. embedded in PXA boards) did not make use of the NAND core hook ->setup_data_interface() to setup controller timings. Add support for it. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/marvell_nand.c | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) commit 68dc8e41fdffcc26db8185dd336ee1ff91872770 Author: Sascha Hauer Date: Wed Jan 17 12:32:13 2018 +0100 mtd: nand: mxc: remove now unused code Since we now have our own read_page/write_page functions mxc_nand_command() will no longer be called with NAND_CMD_READ0, NAND_CMD_READOOB, NAND_CMD_SEQIN and NAND_CMD_PAGEPROG. Remove the code handling these commands. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/mxc_nand.c | 51 --------------------------------------------- 1 file changed, 51 deletions(-) commit cd8b4655332d45b1507a7cf1db025b869d0eb89a Author: Sascha Hauer Date: Wed Jan 17 12:32:12 2018 +0100 mtd: nand: mxc: Drop now unnecessary functions Since we have our own read_page/write_page functions correct_data and calculate are no longer needed. Remove them. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/mxc_nand.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) commit 6811c4642aa0b40e3199aa7fb86053be1ee10ad8 Author: Sascha Hauer Date: Wed Jan 17 12:32:11 2018 +0100 mtd: nand: mxc: Add own write_page Now that we have our own read_page function add a write_page function for consistency aswell. This can be a lot easier than the generic function since we do not have to iterate over subpages but can write the whole page at once. Also add write_page_raw and write_oob for proper raw and oob write support. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/mxc_nand.c | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 5039fc9f2d6db603cba48c770e29251d661ce4e2 Author: Sascha Hauer Date: Wed Jan 17 12:32:10 2018 +0100 mtd: nand: mxc: Fix failed/corrected values for v1 controllers The v1 controller code has several flaws: - We do not forward the number of corrected bitflips to the upper layers - For 2k page NAND chips only the status results from the fourth subpage read are evaluated, so ECC failures in the other subpages remain uncovered - When there are uncorrectable errors we have to increase the statistics counter, but still have to return successfully. Currently we return an error This patch fixes this by introducing a v1 specific read_page function. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/mxc_nand.c | 77 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 60 insertions(+), 17 deletions(-) commit 67b87f66cae0bca0dd6602739383381c10b0c9c4 Author: Sascha Hauer Date: Wed Jan 17 12:32:09 2018 +0100 mtd: nand: mxc: Fix failed/corrected values for v2/v3 controllers Currently nand_read_page_hwecc() from nand_base calls mxc_nand_correct_data_v2_v3() for each subpage, but in this function we return the corrected/failed results for the whole page instead of a single subpage. On a 2k page size Nand this leads to results which are 4 times too high. The whole ecc.calculate/ecc.correct mechanism used by nand_read_page_hwecc() is not suitable for devices which correct the data in hardware, so fix this by using a driver specific read_page function which does the right thing. Also add read_page_raw and read_oob For proper raw and oob read support. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/mxc_nand.c | 86 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 77 insertions(+), 9 deletions(-) commit 1af0b3147448954c50e555496b80d94a0800a5e4 Author: Sascha Hauer Date: Wed Jan 17 12:32:08 2018 +0100 mtd: nand: mxc: Add buffer argument to copy_spare With following patches we will have to copy the spare data to/from other buffers, so add the buffer as argument to copy_spare(). Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/mxc_nand.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 040bd3f6a3aa51a7182bba4243428e9df8507146 Author: Sascha Hauer Date: Wed Jan 17 12:32:07 2018 +0100 mtd: nand: mxc: Add function to control hardware ECC For proper raw read/write support need to be able to control the hardware ECC engine. Add a function to enable/disable it. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/mxc_nand.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 1549333167edcbab5e8170ae45fbee99eeb4ddb1 Author: Sascha Hauer Date: Wed Jan 17 12:32:06 2018 +0100 mtd: nand: mxc: reorder functions to avoid forward declarations We'll call copy_spare() and mxc_do_addr_cycle() from another place during the next patches, so move functions up to avoid forward declarations. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/mxc_nand.c | 206 ++++++++++++++++++++++---------------------- 1 file changed, 103 insertions(+), 103 deletions(-) commit 266c157de3b21b6da3e015085dda48cfa9f0f76d Author: Jerome Brunet Date: Wed Jan 3 16:54:52 2018 +0100 arm64: defconfig: enable MESON EFUSE Enable nvmem meson efuse driver as a module Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 01517dfc819f003855c1893d9382581cafe2877b Author: weiyongjun (A) Date: Wed Jan 10 14:19:48 2018 +0000 meson-gx-socinfo: make local function meson_gx_socinfo_init static Fixes the following sparse warnings: drivers/soc/amlogic/meson-gx-socinfo.c:100:12: warning: symbol 'meson_gx_socinfo_init' was not declared. Should it be static? Signed-off-by: Wei Yongjun Acked-by: Neil Armstrong Signed-off-by: Kevin Hilman drivers/soc/amlogic/meson-gx-socinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82a759c91801d1f9851196d73516a504064e472c Author: weiyongjun (A) Date: Wed Jan 10 14:19:40 2018 +0000 meson-mx-socinfo: Make local function meson_mx_socinfo_init() static Fixes the following sparse warnings: drivers/soc/amlogic/meson-mx-socinfo.c:107:12: warning: symbol 'meson_mx_socinfo_init' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Kevin Hilman drivers/soc/amlogic/meson-mx-socinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87f88732d25e6175cb4faa8070658f604660d720 Author: Heiner Kallweit Date: Thu Dec 21 20:41:02 2017 +0100 soc: amlogic: meson-gx-pwrc-vpu: fix error on shutdown when domain is powered off When operating the system headless headless, the domain is never powered on, leaving the clocks disabled. The shutdown function then tries to disable the already disabled clocks, resulting in errors. Therefore call meson_gx_pwrc_vpu_power_off() only if domain is powered on. This patch fixes the described issue on my system (Odorid-C2). Fixes: 339cd0ea0822 "soc: amlogic: meson-gx-pwrc-vpu: fix power-off when powered by bootloader" Signed-off-by: Heiner Kallweit Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman drivers/soc/amlogic/meson-gx-pwrc-vpu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3a2ad7bd3151cc282f06d18948dfb7a0e1138fb2 Author: Heiner Kallweit Date: Thu Dec 21 20:40:52 2017 +0100 soc: amlogic: meson-gx-pwrc-vpu: don't print error message on probe deferral The error message may be misleading in case of probe deferral (happens on my Odroid-C2). Therefore don't print it in this case. Fixes: 75fcb5ca4b46 "soc: amlogic: add Meson GX VPU Domains driver" Signed-off-by: Heiner Kallweit Acked-by: Neil Armstrong Signed-off-by: Kevin Hilman drivers/soc/amlogic/meson-gx-pwrc-vpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 059a58fcd53a78b898f26c26a1c37816ba306933 Author: Jorge Ramirez-Ortiz Date: Wed Jan 17 11:56:27 2018 +0100 ARM64: dts: meson: accept MAC addr from u-boot environment Extend configuring the MAC address from u-boot to all meson boards. I didn't test this changeset but having checked libretech's u-boot tree I believe it should just work. Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 1 + arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 1 + arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 1 + arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 1 + arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 1 + arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 1 + arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts | 1 + arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 1 + arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 1 + arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 1 + arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 1 + arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 1 + 12 files changed, 12 insertions(+) commit f7c36209c46c4d162202b65eed2e66962ad8c3c1 Author: Jorge Ramirez-Ortiz Date: Wed Jan 17 11:55:43 2018 +0100 ARM64: dts: meson s905x: accept MAC addr from u-boot environment With the adequate configuration settings, u-boot will loop through the list of aliases looking for "ethernetX". By adding an ethernet alias, u-boot can fixup the local-mac-address property in the kernel's device tree using a value held in its environment variable ethaddr. Tested-by: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 1 + 1 file changed, 1 insertion(+) commit 3e5925c622d7debf429b36d47d8904af4d387fc6 Author: Yixun Lan Date: Thu Jan 11 10:34:01 2018 +0800 ARM64: dts: meson-axg: enable the UART_A controller The UART_A is connected to a BT module on the S400 board. Acked-by: Jerome Brunet Signed-off-by: Yixun Lan Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit e496c415a311a28a7d42679d172db6d3737c2f28 Author: Yixun Lan Date: Thu Jan 11 10:34:00 2018 +0800 ARM64: dts: meson-axg: complete the pinctrl info for UART_AO_A Explictly request the pinctrl info for the UART_AO_A controller, otherwise we may need to rely on bootloader for the initialization. Acked-by: Jerome Brunet Signed-off-by: Yixun Lan Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 2 ++ 1 file changed, 2 insertions(+) commit 4eae66a6928b5d5d35e0e4b9604aaa5b8d5538e1 Author: Yixun Lan Date: Thu Jan 11 10:33:59 2018 +0800 ARM64: dts: meson-axg: uart: Add the pinctrl info description Describe the pinctrl info for the UART controller which is found in the Meson-AXG SoCs. Signed-off-by: Yixun Lan [khilman: s/uart_ao_b_gpioz/uart_ao_b_z/ ] Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 96 ++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) commit 58662130226c82b520c0a71b110f1248521f6797 Author: Yixun Lan Date: Thu Jan 11 10:33:58 2018 +0800 ARM64: dts: meson-axg: uart: drop legacy compatible name from EE UART When update the clock info for the UART controller in the EE domain, the driver explicitly require 'pclk' in order to work properly. With current logic of the code, the driver will go for the legacy clock probe routine if it find current compatible string match to 'amlogic,meson-uart', which result in not requesting the 'pclk' clock, thus break the driver in the end. Acked-by: Jerome Brunet Signed-off-by: Yixun Lan Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 777fa58db6224c931aad6e8a6bb6f361d0448a93 Author: Yixun Lan Date: Thu Jan 11 11:04:11 2018 +0800 ARM64: dts: meson-axg: add RMII pins for ethernet controller Comparing to RGMII interface, the RMII interface require few pins. So it's worth describing them here. Signed-off-by: Yixun Lan Acked-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 7d6d8a2053e6c0c83168ccc876b18bc652b65efc Author: Jian Hu Date: Mon Nov 20 22:54:15 2017 +0800 ARM64: dts: meson-axg: enable I2C Master-1 for the audio speaker In the S400 board, The I2C master-1 is connecting to the audio speaker daughter board. Signed-off-by: Jian Hu Signed-off-by: Yixun Lan Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 8a7669a53e6ad623aadfc716d233cd8d4901d1ef Author: Jian Hu Date: Mon Nov 20 22:54:14 2017 +0800 ARM64: dts: meson-axg: describe pin DT info for I2C controller Describe all the pin mux for the I2C controller which found in Meson-AXG SoC. Signed-off-by: Jian Hu Signed-off-by: Yixun Lan Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 64 ++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit dc6f858e26909ae7349daf19f9ddaa0dd8f0adaa Author: Jian Hu Date: Mon Nov 20 22:54:13 2017 +0800 ARM64: dts: meson-axg: add I2C DT info for Meson-AXG SoC There are four I2C masters in EE domain, and one I2C Master in AO domain, the DT info here should describe them all. Signed-off-by: Jian Hu Signed-off-by: Yixun Lan Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 59 ++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit eafd53d3154af57d31a1307d9be356fdcfe642b6 Author: Jerome Brunet Date: Mon Dec 18 12:35:46 2017 +0100 ARM64: meson-axg: enable hardware rng Enable the hardware random generator Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 9c15795a4f96cb4f82a0e1503b46621251644bc2 Author: Emiliano Ingrassia Date: Fri Jan 19 02:49:17 2018 +0100 ARM: dts: meson8b-odroidc1: ethernet support The Odroid-C1+ board is equipped with an RTL8211F ethernet PHY which supports 10/100/1000 Mbps ethernet. The PHY reset and interrupt lines are controlled by the SoC via two GPIO lines (GPIOH_4 and GPIOH_3 respectively). The PHY energy efficient ethernet (eee) mode is marked as broken using "eee-broken-1000t" because, during tests, high packet losses were experienced without it. Signed-off-by: Emiliano Ingrassia Tested-by: Linus Lüssing Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b-odroidc1.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit b96446541d8390ec22e6dc579282770453ec98a4 Author: Emiliano Ingrassia Date: Fri Jan 19 02:48:00 2018 +0100 ARM: dts: meson8b: extend ethernet controller description Enable S805 (aka Meson8b) ethernet pin multiplexing and extend the controller description. The programmable ethernet (PRG_ETHERNET) register address value (0xc1108108), contained in meson.dtsi, is overridden according to the value found in S805 SoC manual. This also required to switch to "amlogic,meson8b-dwmac" compatible to correctly configure that register. The two clock sources "clkin0" and "clkin1" are both equals to MPLL2 because, as reported in bit 9-7 register description, that is the only Meson8b ethernet clock source. Signed-off-by: Emiliano Ingrassia Tested-by: Linus Lüssing Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b.dtsi | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) commit e1fa57dfd7e28b30d6419b7c309b4a890ff4410a Author: Martin Blumenstingl Date: Sun Jan 21 23:14:14 2018 +0100 ARM: dts: meson8: add the USB reset line Now that we support the reset controller on Meson8 we can add the reset line to the USB PHYs (just like on Meson8b). Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit e3087187e5f18231e48450e602220eb65c409b59 Author: Martin Blumenstingl Date: Sun Jan 21 23:14:13 2018 +0100 ARM: dts: meson8: add the reset controller Meson8 uses the same reset controller as Meson8b. Add the node along with the #include for the reset lines to meson8.dtsi so we can use it from there as well. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit a2730ed3e0f39c528014673cb96807bb16a8ce35 Author: Martin Blumenstingl Date: Sun Jan 21 23:14:12 2018 +0100 ARM: dts: meson8b: grow the reset controller memory zone The reset controller in the Meson8b SoCs also supports level resets. These use the same defines (from dt-bindings/reset/amlogic,meson8b-reset.h) as the reset pulses. The reset-meson driver internally handles the difference if a consumer requests a reset pulse or a level reset. However, for this to work we must extend the memory zone of the reset controller. Suggested-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0073a4b8b5906b2a7eab5e9d4a91759b56bc96f Author: Alexander Duyck Date: Fri Dec 29 08:52:19 2017 -0500 i40e/i40evf: Add support for new mechanism of updating adaptive ITR This patch replaces the existing mechanism for determining the correct value to program for adaptive ITR with yet another new and more complicated approach. The basic idea from a 30K foot view is that this new approach will push the Rx interrupt moderation up so that by default it starts in low latency and is gradually pushed up into a higher latency setup as long as doing so increases the number of packets processed, if the number of packets drops to 4 to 1 per packet we will reset and just base our ITR on the size of the packets being received. For Tx we leave it floating at a high interrupt delay and do not pull it down unless we start processing more than 112 packets per interrupt. If we start exceeding that we will cut our interrupt rates in half until we are back below 112. The side effect of these patches are that we will be processing more packets per interrupt. This is both a good and a bad thing as it means we will not be blocking processing in the case of things like pktgen and XDP, but we will also be consuming a bit more CPU in the cases of things such as network throughput tests using netperf. One delta from this versus the ixgbe version of the changes is that I have made the interrupt moderation a bit more aggressive when we are in bulk mode by moving our "goldilocks zone" up from 48 to 96 to 56 to 112. The main motivation behind moving this is to address the fact that we need to update less frequently, and have more fine grained control due to the separate Tx and Rx ITR times. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 3 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 15 +- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 362 ++++++++++++++++-------- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 17 +- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 362 ++++++++++++++++-------- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 17 +- drivers/net/ethernet/intel/i40evf/i40evf.h | 3 +- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 +- 8 files changed, 528 insertions(+), 257 deletions(-) commit 6204f03d3f5428254ecb6c6e813a7244c8707346 Author: Pavel Machek Date: Thu Feb 1 21:26:34 2018 +0100 leds: Clarify supported chips by LM355x driver Clarify which controllers are supported by which driver. Reported-by: Andy Shevchenko Signed-off-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/leds/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8f886de18a39d714989a74bfb1f96da4b4263772 Author: Vadim Pasternak Date: Thu Feb 1 08:10:34 2018 +0000 leds: leds-mlxcpld: Allow compilation for 32 bit arch It makes leds-mlxcpld available for 32 bit architecture. Signed-off-by: Vadim Pasternak Reported-by: Jiri Pirko Signed-off-by: Jacek Anaszewski drivers/leds/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 556fdfd6e6ffcab9d03c942df06a5591c84ca637 Author: Alexander Duyck Date: Fri Dec 29 08:51:25 2017 -0500 i40e/i40evf: Split container ITR into current_itr and target_itr This patch is mostly prep-work for replacing the current approach to programming the dynamic aka adaptive ITR. Specifically here what we are doing is splitting the Tx and Rx ITR each into two separate values. The first value current_itr represents the current value of the register. The second value target_itr represents the desired value of the register. The general plan by doing this is to allow for deferring the update of the ITR value under certain circumstances. For now we will work with what we have, but in the future I hope to change the behavior so that we always only update one ITR at a time using some simple logic to determine which ITR requires an update. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 13 +++-- drivers/net/ethernet/intel/i40e/i40e_main.c | 22 ++++--- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 68 +++++++++++++--------- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 3 +- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 68 +++++++++++++--------- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 3 +- drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 14 ++--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 10 ++-- 8 files changed, 115 insertions(+), 86 deletions(-) commit d4942d581afb3d7d8dd1baa881a58d03a36ee25d Author: Alexander Duyck Date: Fri Dec 29 08:51:20 2017 -0500 i40evf: Correctly populate rxitr_idx and txitr_idx While testing code for the recent ITR changes I found that updating the Tx ITR appeared to have no effect with everything defaulting to the Rx ITR. A bit of digging narrowed it down the fact that we were asking the PF to associate all causes with ITR 0 as we weren't populating the itr_idx values for either Rx or Tx. To correct it I have added the configuration for these values to this patch. In addition I did some minor clean-up to just add a local pointer for the vector map instead of dereferencing it based off of the index repeatedly. In my opinion this makes the resultant code a bit more readable and saves us a few characters. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher .../net/ethernet/intel/i40evf/i40evf_virtchnl.c | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 92418fb14750c2baeebddf5903e3105cd11da90c Author: Alexander Duyck Date: Fri Dec 29 08:51:08 2017 -0500 i40e/i40evf: Use usec value instead of reg value for ITR defines Instead of using the register value for the defines when setting up the ring ITR we can just use the actual values and avoid the use of shifts and macros to translate between the values we have and the values we want. This helps to make the code more readable as we can quickly translate from one value to the other. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 12 +++--- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 11 +++++- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 45 ++++++++++++---------- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 11 +++++- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 44 +++++++++++---------- drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 12 +++--- 6 files changed, 79 insertions(+), 56 deletions(-) commit 9b2c45d479d0fb8647c9e83359df69162b5fbe5f Author: Denys Vlasenko Date: Mon Feb 12 20:00:20 2018 +0100 net: make getname() functions return length rather than use int* parameter Changes since v1: Added changes in these files: drivers/infiniband/hw/usnic/usnic_transport.c drivers/staging/lustre/lnet/lnet/lib-socket.c drivers/target/iscsi/iscsi_target_login.c drivers/vhost/net.c fs/dlm/lowcomms.c fs/ocfs2/cluster/tcp.c security/tomoyo/network.c Before: All these functions either return a negative error indicator, or store length of sockaddr into "int *socklen" parameter and return zero on success. "int *socklen" parameter is awkward. For example, if caller does not care, it still needs to provide on-stack storage for the value it does not need. None of the many FOO_getname() functions of various protocols ever used old value of *socklen. They always just overwrite it. This change drops this parameter, and makes all these functions, on success, return length of sockaddr. It's always >= 0 and can be differentiated from an error. Tests in callers are changed from "if (err)" to "if (err < 0)", where needed. rpc_sockname() lost "int buflen" parameter, since its only use was to be passed to kernel_getsockname() as &buflen and subsequently not used in any way. Userspace API is not changed. text data bss dec hex filename 30108430 2633624 873672 33615726 200ef6e vmlinux.before.o 30108109 2633612 873672 33615393 200ee21 vmlinux.o Signed-off-by: Denys Vlasenko CC: David S. Miller CC: linux-kernel@vger.kernel.org CC: netdev@vger.kernel.org CC: linux-bluetooth@vger.kernel.org CC: linux-decnet-user@lists.sourceforge.net CC: linux-wireless@vger.kernel.org CC: linux-rdma@vger.kernel.org CC: linux-sctp@vger.kernel.org CC: linux-nfs@vger.kernel.org CC: linux-x25@vger.kernel.org Signed-off-by: David S. Miller drivers/infiniband/hw/usnic/usnic_transport.c | 5 ++-- drivers/isdn/mISDN/socket.c | 5 ++-- drivers/net/ppp/pppoe.c | 6 ++--- drivers/net/ppp/pptp.c | 6 ++--- drivers/scsi/iscsi_tcp.c | 14 +++++------ drivers/soc/qcom/qmi_interface.c | 3 +-- drivers/staging/ipx/af_ipx.c | 6 ++--- drivers/staging/irda/net/af_irda.c | 8 +++--- drivers/staging/lustre/lnet/lnet/lib-socket.c | 7 +++--- drivers/target/iscsi/iscsi_target_login.c | 18 +++++++------- drivers/vhost/net.c | 7 +++--- fs/dlm/lowcomms.c | 7 +++--- fs/ocfs2/cluster/tcp.c | 6 ++--- include/linux/net.h | 8 +++--- include/net/inet_common.h | 2 +- include/net/ipv6.h | 2 +- include/net/sock.h | 2 +- net/appletalk/ddp.c | 5 ++-- net/atm/pvc.c | 5 ++-- net/atm/svc.c | 5 ++-- net/ax25/af_ax25.c | 4 +-- net/bluetooth/hci_sock.c | 4 +-- net/bluetooth/l2cap_sock.c | 5 ++-- net/bluetooth/rfcomm/sock.c | 5 ++-- net/bluetooth/sco.c | 5 ++-- net/can/raw.c | 6 ++--- net/core/sock.c | 5 ++-- net/decnet/af_decnet.c | 6 ++--- net/ipv4/af_inet.c | 5 ++-- net/ipv6/af_inet6.c | 5 ++-- net/iucv/af_iucv.c | 5 ++-- net/l2tp/l2tp_ip.c | 5 ++-- net/l2tp/l2tp_ip6.c | 5 ++-- net/l2tp/l2tp_ppp.c | 5 ++-- net/llc/af_llc.c | 5 ++-- net/netlink/af_netlink.c | 5 ++-- net/netrom/af_netrom.c | 9 ++++--- net/nfc/llcp_sock.c | 5 ++-- net/packet/af_packet.c | 10 +++----- net/phonet/socket.c | 5 ++-- net/qrtr/qrtr.c | 5 ++-- net/rds/af_rds.c | 5 ++-- net/rds/tcp.c | 7 ++---- net/rose/af_rose.c | 5 ++-- net/sctp/ipv6.c | 8 +++--- net/smc/af_smc.c | 11 ++++----- net/socket.c | 35 +++++++++++++-------------- net/sunrpc/clnt.c | 6 ++--- net/sunrpc/svcsock.c | 13 ++++++---- net/sunrpc/xprtsock.c | 3 +-- net/tipc/socket.c | 5 ++-- net/unix/af_unix.c | 10 ++++---- net/vmw_vsock/af_vsock.c | 4 +-- net/x25/af_x25.c | 4 +-- security/tomoyo/network.c | 5 ++-- 55 files changed, 159 insertions(+), 203 deletions(-) commit dcb57ed43d9ec5e16628c337143cd6b387f42778 Author: Sarangdhar Joshi Date: Fri Jan 5 16:04:20 2018 -0800 remoteproc: qcom: Register segments for core dump Register MDT segments with the remoteproc core dump functionality in order to include them in a core dump, in case of a recovery of the remote processor. Signed-off-by: Sarangdhar Joshi Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_adsp_pil.c | 1 + drivers/remoteproc/qcom_common.c | 44 ++++++++++++++++++++++++++++++++++++++ drivers/remoteproc/qcom_common.h | 2 ++ drivers/remoteproc/qcom_wcnss.c | 1 + 4 files changed, 48 insertions(+) commit 4dd27f544c84c4d079049dd716beee192fcc7e03 Author: Bjorn Andersson Date: Fri Jan 5 16:04:19 2018 -0800 soc: qcom: mdt-loader: Return relocation base In order to implement support for grabbing core dumps in remoteproc it's necessary to know the relocated base of the image, as the offsets from the virtual memory base might not be based on the physical address. Return the adjusted physical base address to the caller. Acked-by: Andy Gross Signed-off-by: Bjorn Andersson drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 4 ++-- drivers/media/platform/qcom/venus/firmware.c | 2 +- drivers/remoteproc/qcom_adsp_pil.c | 4 +++- drivers/remoteproc/qcom_wcnss.c | 3 ++- drivers/soc/qcom/mdt_loader.c | 7 ++++++- include/linux/soc/qcom/mdt_loader.h | 3 ++- 6 files changed, 16 insertions(+), 7 deletions(-) commit c1d35c1ab4242464a0e5953ae69de8aa78156c6c Author: Bjorn Andersson Date: Fri Jan 5 16:04:18 2018 -0800 remoteproc: Rename "load_rsc_table" to "parse_fw" The resource table is just one possible source of information that can be extracted from the firmware file. Generalize this interface to allow drivers to override this with parsers of other types of information. Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 6 +++--- drivers/remoteproc/remoteproc_internal.h | 7 +++---- include/linux/remoteproc.h | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) commit 2666ca9197e3d352f43b02d7dfb7c6dd72e7c614 Author: Sarangdhar Joshi Date: Fri Jan 5 16:04:17 2018 -0800 remoteproc: Add remote processor coredump support As the remoteproc framework restarts the remote processor after a fatal event, it's useful to be able to acquire a coredump of the remote processor's state, for post mortem debugging. This patch introduces a mechanism for extracting the memory contents after the remote has stopped and before the restart sequence has begun in the recovery path. The remoteproc framework builds the core dump in memory and use devcoredump to expose this to user space. Signed-off-by: Sarangdhar Joshi [bjorn: Use vmalloc instead of composing the ELF on the fly] Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 1 + drivers/remoteproc/remoteproc_core.c | 128 +++++++++++++++++++++++++++++++++++ include/linux/remoteproc.h | 18 +++++ 3 files changed, 147 insertions(+) commit 88c166cec136135b0b74f1887bd97f5870f20dea Author: Maciej Purski Date: Mon Feb 5 08:57:00 2018 +0100 ARM: dts: exynos: Use pinctrl labels in exynos4210-pinctrl Labels for pinctrl's are defined in exynos4210.dtsi. Use them in exynos4210-pinctrl instead of full names, as it is done in other Exynos DTSes. Signed-off-by: Maciej Purski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4210-pinctrl.dtsi | 1680 ++++++++++++++--------------- arch/arm/boot/dts/exynos4210.dtsi | 3 +- 2 files changed, 841 insertions(+), 842 deletions(-) commit 0cfec8ed07f765893df08686d1ecdf49e0f1e968 Author: Krzysztof Kozlowski Date: Sun Feb 4 17:46:45 2018 +0100 ARM: dts: exynos: Add SPDX license identifiers Few files missed recent conversion of GPL v2.0 license statements to SPDX identifiers Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos-mfc-reserved-memory.dtsi | 5 +---- arch/arm/boot/dts/exynos-syscon-restart.dtsi | 5 +---- arch/arm/boot/dts/exynos4412-tiny4412.dts | 7 ++----- arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi | 6 +----- arch/arm/boot/dts/exynos4412-trats2.dts | 7 ++----- arch/arm/boot/dts/exynos5800-peach-pi.dts | 5 +---- arch/arm/boot/dts/exynos5800.dtsi | 5 +---- 7 files changed, 9 insertions(+), 31 deletions(-) commit 4ff17929e6031bf3377233331223f617015e4ef3 Author: Alexander Duyck Date: Fri Dec 29 08:50:55 2017 -0500 i40e/i40evf: Don't bother setting the CLEARPBA bit The CLEARPBA bit in the dynamic interrupt control register actually has no effect either way on the hardware. As per errata 28 in the XL710 specification update the interrupt is actually cleared any time the register is written with the INTENA_MSK bit set to 0. As such the act of toggling the enable bit actually will trigger the interrupt being cleared and could lead to potential lost events if auto-masking is not enabled. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 11 ++++++++++- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) commit bcb41a53b0b075600cb821302e7177ca5ab62efd Author: Krzysztof Kozlowski Date: Tue Jan 9 19:29:56 2018 +0100 soc: samsung: Add SPDX license identifiers to headers Replace GPL license statements with SPDX GPL-2.0 license identifiers. Signed-off-by: Krzysztof Kozlowski include/linux/soc/samsung/exynos-pmu.h | 5 +---- include/linux/soc/samsung/exynos-regs-pmu.h | 6 +----- 2 files changed, 2 insertions(+), 9 deletions(-) commit f12bb91624f9511c1ee87e7c358e4dc11fb44ab3 Author: Krzysztof Kozlowski Date: Tue Jan 9 19:29:55 2018 +0100 memory: samsung: Add SPDX license identifiers Replace GPL license statements with SPDX GPL-2.0 license identifiers. Signed-off-by: Krzysztof Kozlowski drivers/memory/samsung/Kconfig | 1 + drivers/memory/samsung/Makefile | 1 + drivers/memory/samsung/exynos-srom.c | 18 +++++++----------- drivers/memory/samsung/exynos-srom.h | 7 ++----- 4 files changed, 11 insertions(+), 16 deletions(-) commit f947153f92afcd957476b765dc4ac75d2680b17b Author: Krzysztof Kozlowski Date: Tue Jan 9 19:29:54 2018 +0100 ARM: EXYNOS: Add SPDX license identifiers Replace GPL license statements with SPDX GPL-2.0 and GPL-2.0+ license identifiers. Signed-off-by: Krzysztof Kozlowski arch/arm/include/debug/exynos.S | 7 ++----- arch/arm/include/debug/samsung.S | 10 +++------- include/linux/serial_s3c.h | 17 ++--------------- 3 files changed, 7 insertions(+), 27 deletions(-) commit 8b99b1179c27958f51ecfc489af5f459f9408d96 Author: Alexander Duyck Date: Fri Dec 29 08:50:44 2017 -0500 i40e/i40evf: Clean-up of bits related to using q_vector->reg_idx This patch is a further clean-up related to the change over to using q_vector->reg_idx when accessing the ITR registers. Specifically the code appears to have several other spots where we were computing the register offset manually and this resulted in errors in a few spots. Specifically in the i40evf functions for mapping queues to vectors it appears we may have had an off by 1 error since (v_idx - 1) for the first q_vector with an index of 0 would result in us returning -1 if I am not mistaken. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 12 ++++++------ drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 12 +++++------- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 ++++-- 3 files changed, 15 insertions(+), 15 deletions(-) commit fe09ed0ee1f57a818e4d7e41b25f16744487e678 Author: Alan Brady Date: Fri Dec 29 08:50:34 2017 -0500 i40e: use changed_flags to check I40E_FLAG_DISABLE_FW_LLDP Currently in i40e_set_priv_flags we use new_flags to check for the I40E_FLAG_DISABLE_FW_LLDP flag. This is an issue for a few a reasons. DISABLE_FW_LLDP is persistent across reboots/driver reloads. This means we need some way to detect if FW LLDP is enabled on init. We do this by trying to init_dcb and if it fails with EPERM we know LLDP is disabled in FW. This could be a problem on older FW versions or NPAR enabled PFs because there are situations where the FW could disable LLDP, but they do _not_ support using this flag to change it. If we do end up in this situation, the flag will be set, then when the user tries to change any priv flags, the driver thinks the user is trying to disable FW LLDP on a FW that doesn't support it and essentially forbids any priv flag changes. The fix is simple, instead of checking if this flag is set, we should be checking if the user is trying to _change_ the flag on unsupported FW versions. This patch also adds a comment explaining that the cmpxchg is the point of no return. Once we put the new flags into pf->flags we can't back out. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 767ad239a658405116ec0dc91d8eccd6d0a75234 Author: Krzysztof Kozlowski Date: Tue Jan 9 18:42:23 2018 +0100 ARM: dts: samsung: Remove unused samsung_k3pe0e000b The only user of DTSI for Samsung K3PE0E000B memory was removed in commit fa63d037283a ("ARM: dts: omap5: Make uevm as the official board and deprecate sevm support") so get rid of this DTSI as well. Signed-off-by: Krzysztof Kozlowski MAINTAINERS | 1 - arch/arm/boot/dts/samsung_k3pe0e000b.dtsi | 68 ------------------------------- 2 files changed, 69 deletions(-) commit 17b4d25c12abc9c9e9e111ad00968997b246b1c9 Author: Paweł Jabłoński Date: Fri Dec 29 08:50:20 2017 -0500 i40e: Warn when setting link-down-on-close while in MFP This patch adds a warning message when the link-down-on-close flag is setting on. The warning is printed only on MFP devices Signed-off-by: Paweł Jabłoński Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1fa51a650e1deb50410677f1bd6c0ce17aa48a49 Author: Filip Sadowski Date: Fri Dec 29 08:50:05 2017 -0500 i40e: Add delay after EMP reset for firmware to recover This patch adds necessary delay for 4.33 firmware to recover after EMP reset. Without this patch driver occasionally reinitializes structures too quickly to communicate with firmware after EMP reset causing AdminQ to timeout. Signed-off-by: Filip Sadowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 71dc371993625b4b1ae26214af74427765bfa3a2 Author: Alexander Duyck Date: Fri Dec 29 08:49:53 2017 -0500 i40e/i40evf: Clean up logic for adaptive ITR The logic for dynamic ITR update is confusing at best as there were odd paths chosen for how to find the rings associated with a given queue based on the vector index and other inconsistencies throughout the code. This patch is an attempt to clean up the logic so that we can more easily understand what is going on. Specifically if there is a Rx or Tx ring that is enabled in dynamic mode on the q_vector it is allowed to override the other side of the interrupt moderation. While it isn't correct all this patch is doing is cleaning up the logic for now so that when we come through and fix it we can more easily identify that this is wrong. The other big change made here is that we replace references to: vsi->rx_rings[q_vector->v_idx]->itr_setting with: q_vector->rx.ring->itr_setting The general idea is we can avoid the long pointer chase since just accessing q_vector->rx.ring is a single pointer access versus having to chase down vsi->rx_rings, and then finding the pointer in the array, and finally chasing down the itr_setting from there. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 55 +++++++------------------ drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 59 +++++++-------------------- 2 files changed, 28 insertions(+), 86 deletions(-) commit 978e47cc8f8a9a5879fdf455ce5315f574e662a6 Author: Maxime Ripard Date: Mon Jan 22 10:25:27 2018 +0100 ARM: dts: sun8i: a33 Enable our display frontend The display frontend can be used to do hardware scaling, colorspaces conversion or to implement the buffer format output by the Cedar VPU. Since we're starting to have some support for it in the DRM driver, let's enable its DT node. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33.dtsi | 1 - 1 file changed, 1 deletion(-) commit 70f4ce3b4ee263a3ace0e4d70fd7542ab388070b Author: Hauke Mehrtens Date: Thu Jan 11 22:53:55 2018 +0100 ARM: dts: sun8i: activate SPI on Orange Pi R1 This board has a SPI flash, activate it also in device tree by default. Signed-off-by: Hauke Mehrtens Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h2-plus-orangepi-r1.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2d02d158047643060b7d6e0829fcc81518ce663d Author: Jitendra Sharma Date: Thu Feb 8 17:11:02 2018 +0530 remoteproc: Remove null character write of shared mem remoteproc is writing '\0' in the shared mem region. This region is shared among multiple clients that are also trying to read. Hence they miss first character. Remove this null character write, as this mem area is supposed to be Read only. Further during every subsystem reboot, this region is initialized with default, hence no need to write this region. Signed-off-by: Jitendra Sharma Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_adsp_pil.c | 3 --- drivers/remoteproc/qcom_q6v5_pil.c | 6 ------ drivers/remoteproc/qcom_wcnss.c | 3 --- 3 files changed, 12 deletions(-) commit 40588ca6513729e4de60e49896aab0a7ee09df19 Author: Alexander Duyck Date: Fri Dec 29 08:49:28 2017 -0500 i40e/i40evf: Only track one ITR setting per ring instead of Tx/Rx The rings are already split out into Tx and Rx rings so it doesn't make sense to have any single ring store both a Tx and Rx itr_setting value. Since that is the case drop the pair in favor of storing just a single ITR value. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 12 ++++---- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 32 +++++++++++----------- drivers/net/ethernet/intel/i40e/i40e_main.c | 14 +++++----- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 6 ++-- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 3 +- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 6 ++-- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 3 +- drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 24 ++++++++-------- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 8 +++--- 9 files changed, 53 insertions(+), 55 deletions(-) commit e9594acf821df249b458c5aa9fb173eec44db216 Author: Michael Lyle Date: Thu Feb 1 13:16:56 2018 -0800 ARM: dts: exynos: Add support for wlan to Artik 5 On the Artik 520 module, there is a bcm4354 attached to mshc_1. Enable it and turn on the regulator used for it, so that both WiFi & Bluetooth will work. Verified to work on the Artik 520 evaluation board. Signed-off-by: Michael Lyle Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos3250-artik5.dtsi | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 11a350c965cc5ac2f5d0ed1fb336735a0c1a6344 Author: Alan Brady Date: Fri Dec 29 08:48:33 2017 -0500 i40e: fix typo in function description 'bufer' should be 'buffer' Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e53792f44d8bde64022093cfc3f39db0e7d39212 Author: Chris Wilson Date: Mon Feb 12 13:31:18 2018 +0000 drm/i915: Replace open-coded memset_p() When initialising the page directories, we set the GTT entries and the tree to the scratch page. We have already replaced the DMA fill with memset64(), but we can similarly use memset_p() to set the pointer array. References: 4dd504f7d98a ("drm/i915: Use memset64() to prefill the GTT page") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Matthew Auld Cc: Mika Kuoppala Reviewed-by: Matthew Auld Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180212133118.16443-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 34e81f7a720d8a638f46b18b35678712dbafb42d Author: Hannes Reinecke Date: Wed Jan 24 09:07:58 2018 +0100 scsi: raid_class: Add 'JBOD' RAID level Not a real RAID level, but some HBAs support JBOD in addition to the 'classical' RAID levels. Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/raid_class.c | 1 + include/linux/raid_class.h | 1 + 2 files changed, 2 insertions(+) commit 2db6228d9cd13bc3bb83bf3436998ea82b0d56ae Author: Bart Van Assche Date: Tue Jan 23 16:33:51 2018 -0800 scsi: qla2xxx: Fix function argument descriptions Bring the kernel-doc headers in sync with the function argument lists. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_dbg.c | 4 +- drivers/scsi/qla2xxx/qla_gs.c | 78 +++++++++++++++++++-------------------- drivers/scsi/qla2xxx/qla_init.c | 33 +++++++++-------- drivers/scsi/qla2xxx/qla_inline.h | 1 + drivers/scsi/qla2xxx/qla_iocb.c | 15 ++++++-- drivers/scsi/qla2xxx/qla_isr.c | 23 +++++++----- drivers/scsi/qla2xxx/qla_mbx.c | 5 ++- drivers/scsi/qla2xxx/qla_mr.c | 36 ++++++++++-------- drivers/scsi/qla2xxx/qla_nx.c | 7 ++-- drivers/scsi/qla2xxx/qla_nx2.c | 19 +++++----- drivers/scsi/qla2xxx/qla_sup.c | 1 + drivers/scsi/qla2xxx/qla_target.c | 7 ++-- 12 files changed, 125 insertions(+), 104 deletions(-) commit bb83e59dae2fd41d0b15dede7fa882c3089f78b0 Author: Bart Van Assche Date: Tue Jan 23 16:33:50 2018 -0800 scsi: qla4xxx: Move an array from a .h into a .c file This patch does not change any functionality but slightly reduces the size of the compiled kernel module. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla4xxx/ql4_nx.c | 2 ++ drivers/scsi/qla4xxx/ql4_nx.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit 454d0d41d2718f6dbc4b447c732040c0e4636c73 Author: Bart Van Assche Date: Tue Jan 23 16:33:49 2018 -0800 scsi: qla4xxx: Remove unused symbols Remove a few preprocessor macros that are not used anywhere. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla4xxx/ql4_nx.h | 5 ----- 1 file changed, 5 deletions(-) commit 7843327a236c4cf103a8b1d5da2b27e7bace0260 Author: Bart Van Assche Date: Tue Jan 23 16:33:48 2018 -0800 scsi: qla2xxx: Remove unused symbols Remove a few preprocessor macros that are not used anywhere. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_nx2.h | 4 ---- 1 file changed, 4 deletions(-) commit da4704d941766ef61f125d57162eee4ba7f2deda Author: Bart Van Assche Date: Tue Jan 23 16:33:47 2018 -0800 scsi: qla2xxx: Use %p for printing pointers Using %p instead of %lx to print a pointer allows to remove a cast. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 128bddacc4dd7c86070e1e0534687e3083a89d52 Author: James Smart Date: Tue Jan 30 15:59:03 2018 -0800 scsi: lpfc: Update 11.4.0.7 modified files for 2018 Copyright Updated Copyright in files updated 11.4.0.7 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 2 +- drivers/scsi/lpfc/lpfc_attr.c | 2 +- drivers/scsi/lpfc/lpfc_crtn.h | 2 +- drivers/scsi/lpfc/lpfc_els.c | 2 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 2 +- drivers/scsi/lpfc/lpfc_hw4.h | 2 +- drivers/scsi/lpfc/lpfc_init.c | 2 +- drivers/scsi/lpfc/lpfc_mbox.c | 2 +- drivers/scsi/lpfc/lpfc_mem.c | 2 +- drivers/scsi/lpfc/lpfc_nportdisc.c | 4 ++-- drivers/scsi/lpfc/lpfc_nvme.c | 2 +- drivers/scsi/lpfc/lpfc_nvmet.c | 2 +- drivers/scsi/lpfc/lpfc_nvmet.h | 2 +- drivers/scsi/lpfc/lpfc_scsi.c | 2 +- drivers/scsi/lpfc/lpfc_sli.c | 3 +-- drivers/scsi/lpfc/lpfc_sli4.h | 2 +- drivers/scsi/lpfc/lpfc_version.h | 6 +++--- 17 files changed, 20 insertions(+), 21 deletions(-) commit 6e9d2f1667ea12bd2f997a7529fb41cce8e0036d Author: James Smart Date: Tue Jan 30 15:59:02 2018 -0800 scsi: lpfc: update driver version to 11.4.0.7 Update the driver version to 11.4.0.7 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 815a9c437617e221842d12b3366ff6911b3df628 Author: James Smart Date: Tue Jan 30 15:59:01 2018 -0800 scsi: lpfc: Fix nonrecovery of NVME controller after cable swap. In a test that is doing large numbers of cable swaps on the target, the nvme controllers wouldn't reconnect. During the cable swaps, the targets n_port_id would change. This information was passed to the nvme-fc transport, in the new remoteport registration. However, the nvme-fc transport didn't update the n_port_id value in the remoteport struct when it reused an existing structure. Later, when a new association was attempted on the remoteport, the driver's NVME LS routine would use the stale n_port_id from the remoteport struct to address the LS. As the device is no longer at that address, the LS would go into never never land. Separately, the nvme-fc transport will be corrected to update the n_port_id value on a re-registration. However, for now, there's no reason to use the transports values. The private pointer points to the drivers node structure and the node structure is up to date. Therefore, revise the LS routine to use the drivers data structures for the LS. Augmented the debug message for better debugging in the future. Also removed a duplicate if check that seems to have slipped in. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 45634a86ca6e98dbcaddb763f8e90ad243057789 Author: James Smart Date: Tue Jan 30 15:59:00 2018 -0800 scsi: lpfc: Treat SCSI Write operation Underruns as an error Currently, write underruns (mismatch of amount transferred vs scsi status and its residual) detected by the adapter are not being flagged as an error. Its expected the target controls the data transfer and would appropriately set the RSP values. Only read underruns are treated as errors. Revise the SCSI error handling to treat write underruns as an error as well. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_scsi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 8d731d1aa993c44fcf4de0dbd42059e00cf37102 Author: James Smart Date: Tue Jan 30 15:58:59 2018 -0800 scsi: lpfc: Fix header inclusion in lpfc_nvmet The driver was inappropriately pulling in the nvme host's nvme.h header. What it really needed was the standard header. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20aefac3a9a23b56db43f1fe1b3ae72c87e39137 Author: James Smart Date: Tue Jan 30 15:58:58 2018 -0800 scsi: lpfc: Validate adapter support for SRIU option When using the special option to suppress the response iu, ensure the adapter fully supports the feature by checking feature flags from the adapter and validating the support when formatting the WQE. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_hw4.h | 3 +++ drivers/scsi/lpfc/lpfc_init.c | 13 ++++++++++++- drivers/scsi/lpfc/lpfc_nvmet.c | 7 ++++--- 3 files changed, 19 insertions(+), 4 deletions(-) commit c1dd9111b7f78a90bccd2e4abb9b9bb6319a4c64 Author: James Smart Date: Tue Jan 30 15:58:57 2018 -0800 scsi: lpfc: Fix SCSI io host reset causing kernel crash During SCSI error handling escalation to host reset, the SCSI io routines were moved off the txcmplq, but the individual io's ON_CMPLQ flag wasn't cleared. Thus, a background thread saw the io and attempted to access it as if on the txcmplq. Clear the flag upon removal. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 4 ++++ drivers/scsi/lpfc/lpfc_sli.c | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) commit a5ff06817eb86d022bc11993850a42732d7e6979 Author: James Smart Date: Tue Jan 30 15:58:56 2018 -0800 scsi: lpfc: Indicate CONF support in NVMe PRLI Revise the NVME PRLI to indicate CONF support. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 3 ++- drivers/scsi/lpfc/lpfc_hw4.h | 6 +++--- drivers/scsi/lpfc/lpfc_nportdisc.c | 3 --- 3 files changed, 5 insertions(+), 7 deletions(-) commit 2289e9598dde9705400559ca2606fb8c145c34f0 Author: James Smart Date: Tue Jan 30 15:58:55 2018 -0800 scsi: lpfc: Fix issue_lip if link is disabled The driver ignored checks on whether the link should be kept administratively down after a link bounce. Correct the checks. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 5 +++++ 1 file changed, 5 insertions(+) commit 161df4f09987ae2e9f0f97f0b38eee298b4a39ff Author: James Smart Date: Tue Jan 30 15:58:54 2018 -0800 scsi: lpfc: Fix soft lockup in lpfc worker thread during LIP testing During link bounce testing in a point-to-point topology, the host may enter a soft lockup on the lpfc_worker thread: Call Trace: lpfc_work_done+0x1f3/0x1390 [lpfc] lpfc_do_work+0x16f/0x180 [lpfc] kthread+0xc7/0xe0 ret_from_fork+0x3f/0x70 The driver was simultaneously setting a combination of flags that caused lpfc_do_work()to effectively spin between slow path work and new event data, causing the lockup. Ensure in the typical wq completions, that new event data flags are set if the slow path flag is running. The slow path will eventually reschedule the wq handling. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_hbadisc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 64bf009933bc84a7fb44ff50f86af0201b8be0c3 Author: James Smart Date: Tue Jan 30 15:58:53 2018 -0800 scsi: lpfc: Allow set of maximum outstanding SCSI cmd limit for a target Make the attribute writeable. Remove the ramp up to logic as its unnecessary, simply set depth. Add debug message if depth changed, possibly reducing limit, yet our outstanding count has yet to catch up with it. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 4 ++-- drivers/scsi/lpfc/lpfc_scsi.c | 39 ++++++++++++++++++++++++++++----------- 2 files changed, 30 insertions(+), 13 deletions(-) commit 411de511c6943554cdc4173c3f522029db2f75c7 Author: James Smart Date: Tue Jan 30 15:58:52 2018 -0800 scsi: lpfc: Fix RQ empty firmware trap When nvme target deferred receive logic waits for exchange resources, the corresponding receive buffer is not replenished with the hardware. This can result in a lack of asynchronous receive buffer resources in the hardware, resulting in a "2885 Port Status Event: ... error 1=0x52004a01 ..." message. Correct by replenishing the buffer whenenver the deferred logic kicks in. Update corresponding debug messages and statistics as well. [mkp: applied by hand] Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 6 ++++++ drivers/scsi/lpfc/lpfc_mem.c | 10 +++++++--- drivers/scsi/lpfc/lpfc_nvmet.c | 31 +++++++++++++++++++++---------- drivers/scsi/lpfc/lpfc_nvmet.h | 7 +++++-- drivers/scsi/lpfc/lpfc_sli.c | 12 ++++++++++++ 5 files changed, 51 insertions(+), 15 deletions(-) commit 91455b850956bc13708a074bd1400f54aae74890 Author: James Smart Date: Tue Jan 30 15:58:51 2018 -0800 scsi: lpfc: Fix IO failure during hba reset testing with nvme io. A stress test repeatedly resetting the adapter while performing io would eventually report I/O failures and missing nvme namespaces. The driver was setting the nvmefc_fcp_req->private pointer to NULL during the IO completion routine before upcalling done(). If the transport was also running an abort for that IO, the driver would fail the abort with message 6140. Failing the abort is not allowed by the nvme-fc transport, as it mandates that the io must be returned back to the transport. As that does not happen, the transport controller delete has an outstanding reference and can't complete teardown. The NULL-ing of the private pointer should be done only when the io is considered complete. It's complete when the adapter returns the exchange with the "exchange busy" flag clear. Move the NULL'ing of the structure to the done case. This leaves the io contexts set while it is busy and until the subsequent XRI_ABORTED completion which returns the exchange is received. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c3b2a8f652566c5b35d945f0c8146555d2062ec Author: James Smart Date: Tue Jan 30 15:58:50 2018 -0800 scsi: lpfc: Fix PRLI handling when topology type changes The lpfc driver does not discover a target when the topology changes from switched-fabric to direct-connect. The target rejects the PRLI from the initiator in direct-connect as the driver is using the old S_ID from the switched topology. The driver was inappropriately clearing the VP bit to register the VPI, which is what is associated with the S_ID. Fix by leaving the VP bit set (it was set earlier) and as the VFI is being re-registered, set the UPDT bit. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_mbox.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6e8e1c14c61e54253098521127cd5ac0b959dd32 Author: James Smart Date: Tue Jan 30 15:58:49 2018 -0800 scsi: lpfc: Add WQ Full Logic for NVME Target I/O conditions on the nvme target may have the driver submitting to a full hardware wq. The hardware wq is a shared resource among all nvme controllers. When the driver hit a full wq, it failed the io posting back to the nvme-fc transport, which then escalated it into errors. Correct by maintaining a sideband queue within the driver that is added to when the WQ full condition is hit, and drained from as soon as new WQ space opens up. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_crtn.h | 1 + drivers/scsi/lpfc/lpfc_nvmet.c | 116 +++++++++++++++++++++++++++++++++++++++++ drivers/scsi/lpfc/lpfc_nvmet.h | 1 + drivers/scsi/lpfc/lpfc_sli.c | 3 ++ drivers/scsi/lpfc/lpfc_sli4.h | 5 +- 5 files changed, 125 insertions(+), 1 deletion(-) commit 8ae337013674d5c1e803429356b85cba2ce12067 Author: James Smart Date: Tue Jan 30 15:58:48 2018 -0800 scsi: lpfc: correct debug counters for abort Existing code was using the wrong field for the completion status when comparing whether to increment abort statistics Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 281d61902ffbab47901f8616a38a45144627dd9e Author: James Smart Date: Tue Jan 30 15:58:47 2018 -0800 scsi: lpfc: move placement of target destroy on driver detach Ensure nvme localports/targetports are torn down before dismantling the adapter sli interface on driver detachment. This aids leaving interfaces live while nvme may be making callbacks to abort it. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit c176ffa0841c632593c5007f1d1c9ed126481daa Author: James Smart Date: Tue Jan 30 15:58:46 2018 -0800 scsi: lpfc: Increase CQ and WQ sizes for SCSI Increased CQ and WQ sizes for SCSI FCP, matching those used for NVMe development. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 1 + drivers/scsi/lpfc/lpfc_hw4.h | 3 +++ drivers/scsi/lpfc/lpfc_init.c | 36 +++++++++++++++++++++++++----------- drivers/scsi/lpfc/lpfc_sli.c | 3 ++- drivers/scsi/lpfc/lpfc_sli4.h | 5 +++++ 5 files changed, 36 insertions(+), 12 deletions(-) commit 04673e38f56b30cd39b1fa0f386137d818b17781 Author: James Smart Date: Tue Jan 30 15:58:45 2018 -0800 scsi: lpfc: Fix frequency of Release WQE CQEs The driver controls when the hardware sends completions that communicate consumption of elements from the WQ. This is done by setting a WQEC bit on a WQE. The current driver sets it on every Nth WQE posting. However, the driver isn't clearing the bit if the WQE is reused. Thus, if the queue depth isn't evenly divisible by N, with enough time, it can be set on every element, creating a lot of overhead and risking CQ full conditions. Correct by clearing the bit when not setting it on an Nth element. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 2 ++ 1 file changed, 2 insertions(+) commit 51cc9adef064c8cf3df6d24e8662e9151529decf Author: Imre Deak Date: Thu Feb 8 19:41:02 2018 +0200 drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it On BXT/GLK GEN6_PCODE_READ_RC6VIDS fails with MAILBOX_P24C_CC_ILLEGAL_CMD, so don't try to do the query on these platforms. Do it only on SNB, IVB and HSW, where we use this command anyway for RC6 enabling. Based on my tests the command also succeeds on all LLC platforms, but it's not clear if it's really supported on those (it returns 0 aka 245mv for all RC6 states everywhere except on SNB). BSpec lists the command as supported on SKL+ (see P24C_PCODE_MAILBOX_INTERFACE) but that's clearly incorrect, since on SKL/KBL the same command ID is used for SKL_PCODE_LOAD_HDCP_KEYS. Since the command fails on BXT/GLK, the BSpec command list is also incorrect for those platforms (see P_CR_P24C_PCODE_MAILBOX_INTERFACE_0_2_0_GTTMMADR). I filed a request to update that info in Bspec, but for now let's assume a minimal set of platforms where the command is supported. References: https://bugs.freedesktop.org/show_bug.cgi?id=103337 Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180208174102.10240-1-imre.deak@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 246774d17fc05a9b33c769c937003cc73d258674 Author: Lucas Stach Date: Wed Jan 24 15:30:29 2018 +0100 drm/etnaviv: remove the need for a gpu-subsystem DT node The module autoloading can be triggered through the GPU core nodes and the necessary platform device for the DRM toplevel device will be instantiated on module init. Suggested-by: Rob Herring Signed-off-by: Lucas Stach Reviewed-by: Rob Herring .../bindings/display/etnaviv/etnaviv-drm.txt | 20 ------------ drivers/gpu/drm/etnaviv/etnaviv_drv.c | 36 ++++++++++++---------- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 1 + 3 files changed, 20 insertions(+), 37 deletions(-) commit 0b3650bd39ad599741cda151582c5e0a876ed6e8 Author: Lucas Stach Date: Fri Jan 19 12:59:44 2018 +0100 dt-bindings: etnaviv: add slave interface clock Newer GPU cores added a new clock input, which allows to gate the slave (AHB) interface independently from other parts of the GPU. Add it to the supported clocks. Signed-off-by: Lucas Stach Reviewed-by: Rob Herring Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ba5a42196b3e73a734f934e479e573a4dfd40dc5 Author: Lucas Stach Date: Thu Jan 18 12:14:14 2018 +0100 drm/etnaviv: use correct format specifier for size_t Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6d7a20c0776036115c6e22bc673d645d524c4b8a Author: Lucas Stach Date: Wed Dec 6 10:53:27 2017 +0100 drm/etnaviv: replace hangcheck with scheduler timeout This replaces the etnaviv internal hangcheck logic with the job timeout handling provided by the DRM scheduler. This simplifies the driver further and allows to replay jobs after a GPU reset, so only minimal state is lost. This introduces a user-visible change in that we don't allow jobs to run indefinitely as long as they make progress anymore, as this introduces quality of service issues when multiple processes are using the GPU. Userspace is now responsible to flush jobs in a way that the finish in a reasonable time, where reasonable is currently defined as less than 500ms. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_dump.c | 21 ++++++- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 1 - drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 89 ++++------------------------ drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 11 +--- drivers/gpu/drm/etnaviv/etnaviv_sched.c | 43 +++++++------- 5 files changed, 51 insertions(+), 114 deletions(-) commit e0580254ae5c70f9fad3e24c20b92287ad817d8e Author: Lucas Stach Date: Tue Dec 5 10:55:02 2017 +0100 drm/etnaviv: lock BOs after all other submit work is done Populating objects, adding them to the GPU VM and patching/validating the command stream might take a lot of CPU time. There is no reason to hold all object reservations during that time. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 683da226f88dde7bf68940c21418995b63baae2f Author: Lucas Stach Date: Mon Dec 4 19:24:06 2017 +0100 drm/etnaviv: move dependency handling to scheduler Move the fence dependency handling to the scheduler where it belongs. Jobs with unsignaled dependencies just get to sit in the scheduler queue without holding any locks. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gem.h | 3 ++ drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 38 ++++++++++++---------- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 48 ---------------------------- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 3 -- drivers/gpu/drm/etnaviv/etnaviv_sched.c | 45 ++++++++++++++++++++++++++ 5 files changed, 69 insertions(+), 68 deletions(-) commit e93b6deeb45a781489f4ceaa97f9545a3cbebb81 Author: Lucas Stach Date: Mon Dec 4 18:41:58 2017 +0100 drm/etnaviv: hook up DRM GPU scheduler This hooks in the DRM GPU scheduler. No improvement yet, as all the dependency handling is still done in etnaviv_gem_submit. This just replaces the actual GPU submit by passing through the scheduler. Allows to get rid of the retire worker, as this is now driven by the scheduler. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/Kconfig | 1 + drivers/gpu/drm/etnaviv/Makefile | 3 +- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 16 ++++ drivers/gpu/drm/etnaviv/etnaviv_drv.h | 7 +- drivers/gpu/drm/etnaviv/etnaviv_gem.h | 1 + drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 11 ++- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 113 +++++++++--------------- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 14 +-- drivers/gpu/drm/etnaviv/etnaviv_sched.c | 125 +++++++++++++++++++++++++++ drivers/gpu/drm/etnaviv/etnaviv_sched.h | 35 ++++++++ 10 files changed, 235 insertions(+), 91 deletions(-) commit 8bc4d885bd42e9a1d47a53aa4efbb818597ef9a0 Author: Lucas Stach Date: Wed Nov 29 14:49:04 2017 +0100 drm/etnaviv: track fences by IDR instead of seqno This moves away from using the internal seqno as the userspace fence reference. By moving to a generic ID, we can later replace the internal fence by something different than the etnaviv seqno fence. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel drivers/gpu/drm/etnaviv/etnaviv_gem.h | 1 + drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 56 +++++++++++++++++++--------- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 1 + 4 files changed, 42 insertions(+), 18 deletions(-) commit 3d9fc6428434e534893b5f3a2c1f86c7660eac11 Author: Lucas Stach Date: Thu Jan 4 13:50:14 2018 +0100 drm/etnaviv: add missing major features field to debugfs This can be useful when dealing with a new GPU core. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 ++ 1 file changed, 2 insertions(+) commit c09d7f7911aa35570b29674f72077e1342260970 Author: Lucas Stach Date: Thu Jan 4 13:40:03 2018 +0100 drm/etnaviv: don't fail to build on arches without PHYS_OFFSET Some architecture ports like ARC don't provide the PHYS_OFFSET symbol. Define it to 0 in that case, which is the most conservative default in the usage context of the etnaviv driver. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 ++++ 1 file changed, 4 insertions(+) commit f121e7d87e00d71ecf47630be2a6d95a82c1ea7a Author: Wei Yongjun Date: Thu Jan 11 11:34:59 2018 +0000 drm/etnaviv: make local symbols static Fixes the following sparse warnings: drivers/gpu/drm/etnaviv/etnaviv_iommu.c:161:39: warning: symbol 'etnaviv_iommuv1_ops' was not declared. Should it be static? drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c:239:39: warning: symbol 'etnaviv_iommuv2_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c11e6f0f04dbc5e0384e7d530b024b2e3ae4bb17 Author: Stephen Boyd Date: Tue Jan 30 18:36:18 2018 -0800 gpio: Support gpio nexus dt bindings Platforms like 96boards have a standardized connector/expansion slot that exposes signals like GPIOs to expansion boards in an SoC agnostic way. We'd like the DT overlays for the expansion boards to be written once without knowledge of the SoC on the other side of the connector. This avoids the unscalable combinatorial explosion of a different DT overlay for each expansion board and SoC pair. Now that we have nexus support in the OF core let's change the function call here that parses the phandle lists of gpios to use the nexus variant. This allows us to remap phandles and their arguments through any number of nexus nodes and end up with the actual gpio provider being used. Cc: Pantelis Antoniou Acked-by: Linus Walleij Cc: Mark Brown Signed-off-by: Stephen Boyd Signed-off-by: Rob Herring drivers/gpio/gpiolib-of.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 357aa4b61c82b59a40caf5a65d22e636a3639144 Author: Stephen Boyd Date: Tue Jan 30 18:36:17 2018 -0800 of: unittest: Add phandle remapping test Test the functionality of of_parse_phandle_with_args_map(). Cc: Pantelis Antoniou Cc: Linus Walleij Cc: Mark Brown Signed-off-by: Stephen Boyd Signed-off-by: Rob Herring drivers/of/unittest-data/tests-phandle.dtsi | 25 ++++++ drivers/of/unittest.c | 120 ++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+) commit bd6f2fd5a1d52198468c5cdc3c2472362dff5aaa Author: Stephen Boyd Date: Tue Jan 30 18:36:16 2018 -0800 of: Support parsing phandle argument lists through a nexus node Platforms like 96boards have a standardized connector/expansion slot that exposes signals like GPIOs to expansion boards in an SoC agnostic way. We'd like the DT overlays for the expansion boards to be written once without knowledge of the SoC on the other side of the connector. This avoids the unscalable combinatorial explosion of a different DT overlay for each expansion board and SoC pair. We need a way to describe the GPIOs routed through the connector in an SoC agnostic way. Let's introduce nexus property parsing into the OF core to do this. This is largely based on the interrupt nexus support we already have. This allows us to remap a phandle list in a consumer node (e.g. reset-gpios) through a connector in a generic way (e.g. via gpio-map). Do this in a generic routine so that we can remap any sort of variable length phandle list. Taking GPIOs as an example, the connector would be a GPIO nexus, supporting the remapping of a GPIO specifier space to multiple GPIO providers on the SoC. DT would look as shown below, where 'soc_gpio1' and 'soc_gpio2' are inside the SoC, 'connector' is an expansion port where boards can be plugged in, and 'expansion_device' is a device on the expansion board. soc { soc_gpio1: gpio-controller1 { #gpio-cells = <2>; }; soc_gpio2: gpio-controller2 { #gpio-cells = <2>; }; }; connector: connector { #gpio-cells = <2>; gpio-map = <0 0 &soc_gpio1 1 0>, <1 0 &soc_gpio2 4 0>, <2 0 &soc_gpio1 3 0>, <3 0 &soc_gpio2 2 0>; gpio-map-mask = <0xf 0x0>; gpio-map-pass-thru = <0x0 0x1> }; expansion_device { reset-gpios = <&connector 2 GPIO_ACTIVE_LOW>; }; The GPIO core would use of_parse_phandle_with_args_map() instead of of_parse_phandle_with_args() and arrive at the same type of result, a phandle and argument list. The difference is that the phandle and arguments will be remapped through the nexus node to the underlying SoC GPIO controller node. In the example above, we would remap 'reset-gpios' from <&connector 2 GPIO_ACTIVE_LOW> to <&soc_gpio1 3 GPIO_ACTIVE_LOW>. Cc: Pantelis Antoniou Cc: Linus Walleij Cc: Mark Brown Signed-off-by: Stephen Boyd Signed-off-by: Rob Herring drivers/of/base.c | 184 +++++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/of.h | 12 ++++ 2 files changed, 196 insertions(+) commit 2580b1ceb7b0969e33e08ce17929aad3667bdd36 Author: Markus Elfring Date: Sat Jan 6 21:50:20 2018 +0100 pinctrl: sh-pfc: Use seq_puts() in sh_pfc_pin_dbg_show() A string which did not contain a data format specification should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pinctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edc4e74d96982ef9304dc7239a294e3e0ac2144a Author: Geert Uytterhoeven Date: Tue Dec 19 15:38:12 2017 +0100 dt-bindings: pinctrl: sh-pfc: Correct SoC family name for R8A7778 R8A7778 is R-Car (not R-Mobile) M1. Signed-off-by: Geert Uytterhoeven Acked-by: Simon Horman Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d91958fbe11d11a0c982e12616ed23f935852f1 Author: Patrice Chotard Date: Fri Jan 19 11:18:19 2018 +0100 ARM: dts: STi: Add fake reg property for usb2_picophyX nodes Add fake reg property for usb2_picophy nodes. This allows to fix the following warning when compiling dtb with W=1 option : arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/phy2 missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/phy3 missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/phy2 missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/phy3 missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /soc/phy2 missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /soc/phy3 missing or empty reg/ranges property Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-family.dtsi | 3 ++- arch/arm/boot/dts/stih410-b2120.dts | 4 ++-- arch/arm/boot/dts/stih410-b2260.dts | 4 ++-- arch/arm/boot/dts/stih410.dtsi | 6 ++++-- arch/arm/boot/dts/stih418.dtsi | 6 ++++-- 5 files changed, 14 insertions(+), 9 deletions(-) commit a388871750f63e93b26cc475bf8a64309dc95031 Author: Patrice Chotard Date: Fri Jan 19 09:57:39 2018 +0100 ARM: dts: STi: Add fake reg for restart, powerdown and picophy/softreset Add fake reg property for restart, powerdown, picophyreset and softreset. This allows to fix the following warning when compiling dtb with W=1 option: arch/arm/boot/dts/stih407-b2120.dtb: Warning (simple_bus_reg): Node /soc/restart missing or empty reg/ranges property arch/arm/boot/dts/stih407-b2120.dtb: Warning (simple_bus_reg): Node /soc/powerdown-controller missing or empty reg/ranges property arch/arm/boot/dts/stih407-b2120.dtb: Warning (simple_bus_reg): Node /soc/softreset-controller missing or empty reg/ranges property arch/arm/boot/dts/stih407-b2120.dtb: Warning (simple_bus_reg): Node /soc/picophyreset-controller missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/restart missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/powerdown-controller missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/softreset-controller missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/picophyreset-controller missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /soc/restart missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /soc/powerdown-controller missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /soc/softreset-controller missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /soc/picophyreset-controller missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /soc/restart missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /soc/powerdown-controller missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /soc/softreset-controller missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /soc/picophyreset-controller missing or empty reg/ranges property Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-family.dtsi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 5eccdffb61570de0bdaebc19dfbe963f3eaabe4b Author: Patrice Chotard Date: Fri Jan 19 09:09:05 2018 +0100 ARM: dts: STi: Add fake reg property for remote processors As st231-gp0, st231-delta are part of SoC, we add a fake reg property instead of moving all these nodes outside soc node. This allows to fix the following warning when compiling dtb with W=1 option: arch/arm/boot/dts/stih407-b2120.dtb: Warning (simple_bus_reg): Node /soc/st231-gp0 missing or empty reg/ranges property arch/arm/boot/dts/stih407-b2120.dtb: Warning (simple_bus_reg): Node /soc/st231-delta missing or empty reg/ranges property arch/arm/boot/dts/stih407-b2120.dtb: Warning (simple_bus_reg): Node /soc/delta0 missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/st231-gp0 missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/st231-delta missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/delta0 missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /soc/st231-gp0 missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /soc/st231-delta missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /soc/delta0 missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /soc/st231-gp0 missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /soc/st231-delta missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /soc/delta0 missing or empty reg/ranges property Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-family.dtsi | 9 ++++++--- arch/arm/boot/dts/stih410.dtsi | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) commit 07c5e5c1b198f05690bce7586b6872f159c438d1 Author: Patrice Chotard Date: Thu Jan 18 17:48:01 2018 +0100 ARM: dts: STi: Add fake reg property for irq-syscfg Add fake reg property to irq-syscfg node. This allows to fix the following warning when compiling dtb with W=1 option: arch/arm/boot/dts/stih407-b2120.dtb: Warning (simple_bus_reg): Node /soc/irq-syscfg missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/irq-syscfg missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /soc/irq-syscfg missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /soc/irq-syscfg missing or empty reg/ranges property Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-family.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b2d81762ce896e488e79abe292b8700b8ba1a303 Author: Patrice Chotard Date: Thu Jan 18 17:34:59 2018 +0100 ARM: dts: STi: Add fake reg property for miphy28lp_phy Add fake reg property to miphy28lp_phy. This allows to fix the following warning when compiling dtb with W=1 option: arch/arm/boot/dts/stih407-b2120.dtb: Warning (simple_bus_reg): Node /soc/miphy28lp missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/miphy28lp missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2260.dtb: Warning (simple_bus_reg): Node /soc/miphy28lp missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /soc/miphy28lp missing or empty reg/ranges property Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-family.dtsi | 3 ++- arch/arm/boot/dts/stih410-b2260.dts | 2 +- arch/arm/boot/dts/stih418-b2199.dts | 2 +- arch/arm/boot/dts/stihxxx-b2120.dtsi | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) commit 0b09a91a0d053c78429a0f0ffd169d7afcba70a7 Author: Patrice Chotard Date: Tue Jan 9 17:47:47 2018 +0100 ARM: dts: STi: Add fake reg property for sti-display-subsystem As sti-display-subsystem sub-nodes (sti-compositor, sti-tvout sti-hdmi, sti-hda and sti-hqvdp) are SoC's IP, we add a fake reg property. This allows to fix the following warning when compiling dtb with W=1 option: arch/arm/boot/dts/stih410-b2120.dtb: Warning (unit_address_vs_reg): Node /soc/sti-display-subsystem/sti-hda@8d02000 has a unit name, but no reg property Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407.dtsi | 4 ++-- arch/arm/boot/dts/stih410-b2120.dts | 2 +- arch/arm/boot/dts/stih410.dtsi | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) commit 7aef6b3a2179a4ad536831b343a820a4b7221c33 Author: Patrice Chotard Date: Tue Jan 9 16:38:57 2018 +0100 ARM: dts: STi: Move leds node outside soc node Leds are not part of soc, so nove them outside soc node. This allows to fix the following warnings when compiling dtb with W=1 option : arch/arm/boot/dts/stih407-b2120.dtb: Warning (simple_bus_reg): Node /soc/leds missing or empty reg/ranges property arch/arm/boot/dts/stih410-b2120.dtb: Warning (simple_bus_reg): Node /soc/leds missing or empty reg/ranges property arch/arm/boot/dts/stih418-b2199.dtb: Warning (simple_bus_reg): Node /soc/leds missing or empty reg/ranges property Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih410-b2260.dts | 49 ++++++++++++++++++------------------ arch/arm/boot/dts/stih418-b2199.dts | 26 +++++++++---------- arch/arm/boot/dts/stihxxx-b2120.dtsi | 26 +++++++++---------- 3 files changed, 50 insertions(+), 51 deletions(-) commit d6d854cc1c2a055afdf5d22ee4aee0d20a59968c Author: Patrice Chotard Date: Mon Jan 8 11:20:42 2018 +0100 ARM: dts: STi: Fix bindings notation Remove leading 0x and 0s from bindings notation Add missing unit-address and remove some which are useless. This allows to fix several warnings like : Warning (unit_address_vs_reg): Node XXXX has a reg or ranges property, but no unit name Warning (simple_bus_reg): Node XXXX simple-bus unit address format error, expected "123456" Warning (unit_address_vs_reg): Node XXXX has a unit name, but no reg property Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-b2120.dts | 2 +- arch/arm/boot/dts/stih407-clock.dtsi | 4 ++-- arch/arm/boot/dts/stih407-family.dtsi | 8 ++++---- arch/arm/boot/dts/stih407-pinctrl.dtsi | 10 +++++----- arch/arm/boot/dts/stih410-b2120.dts | 2 +- arch/arm/boot/dts/stih410-b2260.dts | 4 ++-- arch/arm/boot/dts/stih410-clock.dtsi | 4 ++-- arch/arm/boot/dts/stih410-pinctrl.dtsi | 2 +- arch/arm/boot/dts/stih410.dtsi | 2 +- arch/arm/boot/dts/stih418-b2199.dts | 4 ++-- arch/arm/boot/dts/stih418-clock.dtsi | 4 ++-- arch/arm/boot/dts/stihxxx-b2120.dtsi | 4 ++-- 12 files changed, 25 insertions(+), 25 deletions(-) commit c50378efa9aa16acfe16d7313d29a874c2c86e5e Author: Takeshi Kihara Date: Mon Jan 29 19:01:54 2018 +0100 clk: renesas: r8a7796: Add Z2 clock This patch adds Z2 clock for R8A7796 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit 72f2a6b31544da1978ab9fb032d0e17ded4af4a7 Author: Takeshi Kihara Date: Mon Jan 29 19:01:53 2018 +0100 clk: renesas: r8a7796: Add Z clock This patch adds Z clock for R8A7796 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit 1eadca3557f77afbb64100e077f48ac338d731dc Author: Takeshi Kihara Date: Mon Jan 29 19:01:52 2018 +0100 clk: renesas: r8a7795: Add Z2 clock This patch adds Z2 clock for r8a7795 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7795-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit 4003508b4f233104a17150463604dc9c36833815 Author: Takeshi Kihara Date: Mon Jan 29 19:01:51 2018 +0100 clk: renesas: r8a7795: Add Z clock This patch adds Z clock for R8A7795 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7795-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit 41ceeb5fef7719474a17a5a6052cae5b6c9e37c0 Author: Takeshi Kihara Date: Mon Jan 29 19:01:50 2018 +0100 clk: renesas: rcar-gen3: Add Z2 clock divider support This patch adds Z2 clock divider support for R-Car Gen3 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/rcar-gen3-cpg.c | 22 ++++++++++++++++------ drivers/clk/renesas/rcar-gen3-cpg.h | 1 + 2 files changed, 17 insertions(+), 6 deletions(-) commit 3391891fa9c82fd14bcddec2f422299b57ce8091 Author: Takeshi Kihara Date: Mon Jan 29 19:01:49 2018 +0100 clk: renesas: rcar-gen3: Add Z clock divider support This patch adds Z clock divider support for R-Car Gen3 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/rcar-gen3-cpg.c | 133 ++++++++++++++++++++++++++++++++++++ drivers/clk/renesas/rcar-gen3-cpg.h | 1 + 2 files changed, 134 insertions(+) commit f1a2879c1c57eb40747db3ff1b7b80cb9041e11b Author: Geert Uytterhoeven Date: Tue Apr 25 14:04:35 2017 +0200 clk: renesas: Stop enabling legacy DT clock support by default Since v4.15-rc1, the DTS files for all R-Car Gen2 SoCs have been converted to the new CPG/MSSR bindings. Hence it is now safe to no longer enable legacy DT clock support by default. Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dd5bdb797f0a6e0d3d2aa86af60f92b094705d24 Author: Heiko Stuebner Date: Mon Dec 25 17:36:00 2017 +0100 clk: rockchip: document hdmi_phy external input for rk3328 The hdmi-phy block inside the soc also loops its pll output back into the clock controller, so document that already used input clock. Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring Documentation/devicetree/bindings/clock/rockchip,rk3328-cru.txt | 1 + 1 file changed, 1 insertion(+) commit 36ec03618c12ad3308f7a80994ee4b2129a1e381 Author: Zheng Yang Date: Thu May 25 18:00:24 2017 +0800 clk: rockchip: add flags for rk3328 dclk_lcdc dclk_lcdc can be sourced from a general pll source as well as the hdmiphy's pll output. We will want to set this source by hand (to the system-pll-source in most cases) and also want rate changes to this clock to be able to also touch the pll source clock if needed, so add CLK_SET_RATE_PARENT and CLK_SET_RATE_NO_REPARENT for dclk_lcdc. Signed-off-by: Zheng Yang [ammended commit message] Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3328.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f872cb362d312b0b75975441b3717253e323b81 Author: Heiko Stuebner Date: Sat Dec 23 16:30:19 2017 +0100 clk: rockchip: remove ignore_unused flag from rk3328 vio_h2p clocks These are already marked as critical, so there is no need for an additional ignore_unused flag. Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3328.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51a70dbf689c913ad6e8efc6917aa669bd57d339 Author: Heiko Stuebner Date: Tue Dec 12 22:49:11 2017 +0100 clk: rockchip: protect all remaining rk3328 interconnect clocks NIU clocks are supplying the interconnect connections to specific peripherals and are currently not controlled in any way. So to prevent things falling apart at strange moments, mark all niu clocks as critical. Most of them where marked as CLK_IGNORE_UNUSED, but that doesn't help if a parent clock then gets disabled. Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3328.c | 56 ++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 19 deletions(-) commit 1d334427c924b849d590ea1aea4adaaa43c5fa7f Author: Heiko Stuebner Date: Mon Dec 11 01:11:14 2017 +0100 clk: rockchip: export sclk_hdmi_sfc on rk3328 This clock is one of the dw-hdmi supplying clocks and thus needs to be exported. Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3328.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 224a63844173944817a7f7b966c14466abd2010f Author: Heiko Stuebner Date: Sun Dec 10 20:07:38 2017 +0100 clk: rockchip: remove HCLK_VIO from rk3328 dt header This clock is not hclk_vio but hclk_vio_niu, the clock for the interconnect output. The clock got fixed and the id was never used in this incorrect form, so remove it. Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3328-cru.h | 1 - 1 file changed, 1 deletion(-) commit a377f681324a33bfa58ab88f7bb894cf515b2489 Author: Heiko Stuebner Date: Sun Dec 10 20:03:19 2017 +0100 clk: rockchip: fix hclk_vio_niu on rk3328 The clock wrongly was called hclk_vio and exported, while it actually is a clock of the interconnect-vio connection and should therefore be always on till we actually model the interconnect. So fix that and don't export it as HCLK_VIO. Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3328.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3ceda3a4a856336c5c902a6cfbacff2c4effaa21 Author: Chris Wilson Date: Mon Feb 12 10:24:15 2018 +0000 drm/i915: Hold rpm wakeref for printing the engine's register state When dumping the engine, we print out the current register values. This requires the rpm wakeref. If the device is alseep, we can assume the engine is asleep (and the register state is uninteresting) so skip and only acquire the rpm wakeref if the device is already awake. Reported-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180212102415.24246-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_engine_cs.c | 162 ++++++++++++++++++-------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 6 +- 2 files changed, 94 insertions(+), 74 deletions(-) commit c2e4987e0e02095ed3d19e958b3891954ef38243 Author: Stefan Agner Date: Tue Feb 6 17:49:03 2018 +0100 ARM: dts: imx6ull: add Toradex Colibri iMX6ULL support Add support for the Computer on Module Colibri iMX6ULL and its Bluetooth/Wifi variant along with the development/evaluation carrier board device trees. Follow the usual hierarchic include model, maintaining shared configuration in imx6ull-colibri.dtsi and imx6ull-colibri-eval-v3.dtsi respectively. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 4 +- arch/arm/boot/dts/imx6ull-colibri-eval-v3.dts | 14 + arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi | 157 ++++++ arch/arm/boot/dts/imx6ull-colibri-nonwifi.dtsi | 23 + arch/arm/boot/dts/imx6ull-colibri-wifi-eval-v3.dts | 14 + arch/arm/boot/dts/imx6ull-colibri-wifi.dtsi | 65 +++ arch/arm/boot/dts/imx6ull-colibri.dtsi | 553 +++++++++++++++++++++ 7 files changed, 829 insertions(+), 1 deletion(-) commit 0a929d9784ffb6f3a9d73ab59d9e3a9b10e2f719 Author: Jörg Krause Date: Mon Feb 5 21:47:59 2018 +0100 ARM: dts: imx6ul: rename mux mode name REF_CLK_32K to OSC32K_32K_OUT This is a rebased version of patch [0]. The 32 kHz reference clock on the i.MX6UL(L) can be output by setting the external signal XTALOSC_REF_CLK_32K in one of the following ways [1]: |----------------------------------------------------------| | Signal | Pad | Mode | Direction | |----------------------------------------------------------| | XTALOSC_REF_CLK_32K | ENET1_RX_EN | ALT2 | O | | | GPIO1_IO03 | ALT3 | | | | JTAG_TCK | ALT6 | | |----------------------------------------------------------| Before patch [2] the mux mode for the external reference clock was missing. The patch named the mux mode as used in the NXP Linux 4.9.11_1.0.0 release, but the Reference Manual uses the name OSC32K_32K_OUT, e.g. in [3]. As Philipp and Shawn suggest the name from the RM should be used instead. [0] https://patchwork.kernel.org/patch/10172187/ [1] IMX6ULRM, Rev. 1, 04/2016, Table 58-1, p. 3649 [2] https://patchwork.kernel.org/patch/10156121/ [3] IMX6ULRM, Rev. 1, 04/2016, 30.5.47 SW_MUX_CTL_PAD_ENET1_RX_EN SW MUX Control Register (IOMUXC_SW_MUX_CTL_PAD_ENET1_RX_EN), p. 1357 Signed-off-by: Jörg Krause Reviewed-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-pinfunc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7d77b8505aa941f326fc2df519f15437f0b0a85b Author: Lothar Waßmann Date: Thu Feb 8 15:07:37 2018 +0800 ARM: dts: imx6ull: fix the imx6ull-14x14-evk configuration imx6ull-14x14-evk.dts currently includes the imx6ul.dtsi file for an i.MX6ULL SoC which is plain wrong. Rename the current imx6ul-14x14-evk.dts to .dtsi and include it from imx6ul-14x14-evk.dts and imx6ull-14x14-evk.dts, so that both can include the appropriate SoC specific (imx6ul.dtsi/imx6ull.dtsi) file. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-14x14-evk.dts | 491 +------------------------------ arch/arm/boot/dts/imx6ul-14x14-evk.dtsi | 499 ++++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx6ull-14x14-evk.dts | 5 +- 3 files changed, 504 insertions(+), 491 deletions(-) commit 10fff25906d84255b31027c8f4d3a31c8adbf6d9 Author: Peter Senna Tschudin Date: Mon Feb 5 18:08:40 2018 +0100 ARM: dts: imx6q-bx50v3: Enable secure-reg-access Enable secure debug enable register access for Bx50v3 devices to enable PMU and hardware counters for perf. Signed-off-by: Peter Senna Tschudin Signed-off-by: Sebastian Reichel Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-bx50v3.dtsi | 4 ++++ arch/arm/boot/dts/imx6qdl.dtsi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 7d926e118e0d937e9a78b3c7aa944bba10931df6 Author: Fabio Estevam Date: Fri Feb 2 21:26:39 2018 -0200 ARM: dts: imx27-eukrea-cpuimx27: Put the clock node directly into root Put the UART clock node directly under root with a unique node name and drop unit-address in order to fix the following build warning with W=1: arch/arm/boot/dts/imx27-eukrea-mbimxsd27-baseboard.dtb: Warning (simple_bus_reg): Node /clocks/osc26m missing or empty reg/ranges property Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx27-eukrea-cpuimx27.dtsi | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 2bada7ac1fdcbf79a9689bd2ff65fa515ca7a31f Author: Aapo Vienamo Date: Wed Jan 31 14:34:07 2018 +0000 ARM: dts: imx7d: cl-som-imx7: fix pinctrl_enet The missing last digit of the CONFIG values is added. Looks like a typo of some sort when comparing to the downstream dt. This fixes intermittent behavior behaviour of the ethernet controllers. Signed-off-by: Aapo Vienamo Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 52 ++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit ce3afb6aca353edc68f6aa331c823ec344a326c9 Author: Benoît Thébaudeau Date: Wed Jan 31 22:35:44 2018 +0100 ARM: dts: imx25-pinfunc: Always set SION for eSDHC CMD The eSDHC does not work properly if the SION bit is not set for the bidirectional CMD signal, whatever the eSDHC instance and the selected pad. Therefore, setting SION is mandatory for all eSDHC CMD ports. Do this for MX25_PAD_*__ESDHCn_CMD in imx25-pinfunc.h in order to enforce this behavior for all boards. This had already been done for eSDHC1, but not for eSDHC2. Also, define MX25_PAD_FEC_MDC__ESDHC2_CMD so that all the possible cases are covered from now on. Signed-off-by: Benoît Thébaudeau Reviewed-by: Fabio Estevam Acked-by: Uwe Kleine-König Reviewed-by: Rob Herring Signed-off-by: Shawn Guo arch/arm/boot/dts/imx25-pinfunc.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit d1bf7b4468bc88a190efc396c10d27981119b175 Author: Benoît Thébaudeau Date: Wed Jan 31 22:35:43 2018 +0100 ARM: dts: imx25-pinfunc: Use consistent naming for eSDHC This file had several naming inconsistencies for eSDHC: - the instances were named sometimes SDn, sometimes SDHCn, whereas they are named ESDHCn in the reference manual, e.g.: MX25_PAD_SD1_CMD__SD1_CMD MX25_PAD_D15__SDHC1_DAT7 - the data ports were named sometimes DATAn, sometimes DATn like in the reference manual, e.g.: MX25_PAD_SD1_DATA0__SD1_DATA0 MX25_PAD_D15__SDHC1_DAT7 - in one case, the clock port was named DAT_CLK instead of CLK: MX25_PAD_CSI_D7__SDHC2_DAT_CLK This change: - introduces new definitions using the naming from the reference manual, - keeps definitions using the legacy naming in order not to break compatibility for out-of-tree users (they can be removed later), - updates the in-tree files that were using the legacy naming. Signed-off-by: Benoît Thébaudeau Acked-by: Uwe Kleine-König Reviewed-by: Fabio Estevam Reviewed-by: Rob Herring Signed-off-by: Shawn Guo .../boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts | 12 ++-- arch/arm/boot/dts/imx25-pdk.dts | 12 ++-- arch/arm/boot/dts/imx25-pinfunc.h | 72 ++++++++++++++-------- 3 files changed, 60 insertions(+), 36 deletions(-) commit 7e9c1a4fb4efbc855f0e1b272d39c59293f163aa Author: Bartosz Golaszewski Date: Wed Jan 24 22:31:48 2018 +0100 ARM: dts: fix the at24 compatible string in imx6q-h100 Using 'at24' as fallback is now deprecated - use the full 'atmel,' string. Signed-off-by: Bartosz Golaszewski Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-h100.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c37c2089ff1a7500112853240dda81466798124b Author: Bartosz Golaszewski Date: Wed Jan 24 22:31:16 2018 +0100 ARM: dts: use 'atmel' as at24 manufacturer for imx6qdl-rex Using 'at' as the part of the compatible string is now deprecated. Use a correct string: 'atmel,'. Signed-off-by: Bartosz Golaszewski Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-rex.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55071b0aaa6540beb268cc507b087bf0d92b3fbc Author: Bartosz Golaszewski Date: Wed Jan 24 22:28:23 2018 +0100 ARM: dts: use 'atmel' as at24 manufacturer for imx6qdl-zii-rdu2 Using 'at' as the part of the compatible string is now deprecated. Use a correct string: 'atmel,'. Signed-off-by: Bartosz Golaszewski Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad00e080eb756b7823c81789dd65f1b75c702d6d Author: Marco Franchi Date: Wed Jan 24 11:22:14 2018 -0200 ARM: dts: imx: Add memory node unit name Fix the following warnings from dtc by adding the unit name to memory nodes: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name Converted using the following command: perl -p0777i -e 's/memory \{\n\t\treg = \<0x+([0-9a-f])/memory\@$1$\0000000 \{\n\t\treg = <0x$1/m' `find ./arch/arm/boot/dts -name "imx*"` The files below were manually fixed: -imx1-ads.dts -imx1-apf9328.dts -imx6q-pistachio.dts Signed-off-by: Marco Franchi Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx1-ads.dts | 2 +- arch/arm/boot/dts/imx1-apf9328.dts | 2 +- arch/arm/boot/dts/imx23-evk.dts | 2 +- arch/arm/boot/dts/imx23-olinuxino.dts | 2 +- arch/arm/boot/dts/imx23-sansa.dts | 2 +- arch/arm/boot/dts/imx23-stmp378x_devb.dts | 2 +- arch/arm/boot/dts/imx23-xfi3.dts | 2 +- arch/arm/boot/dts/imx25-eukrea-cpuimx25.dtsi | 2 +- arch/arm/boot/dts/imx25-karo-tx25.dts | 2 +- arch/arm/boot/dts/imx25-pdk.dts | 2 +- arch/arm/boot/dts/imx27-apf27.dts | 2 +- arch/arm/boot/dts/imx27-eukrea-cpuimx27.dtsi | 2 +- arch/arm/boot/dts/imx27-pdk.dts | 2 +- arch/arm/boot/dts/imx27-phytec-phycard-s-som.dtsi | 2 +- arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi | 2 +- arch/arm/boot/dts/imx28-apf28.dts | 2 +- arch/arm/boot/dts/imx28-apx4devkit.dts | 2 +- arch/arm/boot/dts/imx28-cfa10036.dts | 2 +- arch/arm/boot/dts/imx28-duckbill-2-485.dts | 2 +- arch/arm/boot/dts/imx28-duckbill-2-enocean.dts | 2 +- arch/arm/boot/dts/imx28-duckbill-2-spi.dts | 2 +- arch/arm/boot/dts/imx28-duckbill-2.dts | 2 +- arch/arm/boot/dts/imx28-duckbill.dts | 2 +- arch/arm/boot/dts/imx28-eukrea-mbmx283lc.dts | 2 +- arch/arm/boot/dts/imx28-eukrea-mbmx287lc.dts | 2 +- arch/arm/boot/dts/imx28-evk.dts | 2 +- arch/arm/boot/dts/imx28-m28.dtsi | 2 +- arch/arm/boot/dts/imx28-m28cu3.dts | 2 +- arch/arm/boot/dts/imx28-sps1.dts | 2 +- arch/arm/boot/dts/imx28-ts4600.dts | 2 +- arch/arm/boot/dts/imx31-bug.dts | 2 +- arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi | 2 +- arch/arm/boot/dts/imx35-pdk.dts | 2 +- arch/arm/boot/dts/imx50-evk.dts | 2 +- arch/arm/boot/dts/imx51-apf51.dts | 2 +- arch/arm/boot/dts/imx51-babbage.dts | 2 +- arch/arm/boot/dts/imx51-digi-connectcore-som.dtsi | 2 +- arch/arm/boot/dts/imx51-eukrea-cpuimx51.dtsi | 2 +- arch/arm/boot/dts/imx51-ts4800.dts | 2 +- arch/arm/boot/dts/imx53-ard.dts | 2 +- arch/arm/boot/dts/imx53-cx9020.dts | 2 +- arch/arm/boot/dts/imx53-m53.dtsi | 2 +- arch/arm/boot/dts/imx53-qsb-common.dtsi | 2 +- arch/arm/boot/dts/imx53-smd.dts | 2 +- arch/arm/boot/dts/imx53-tqma53.dtsi | 2 +- arch/arm/boot/dts/imx53-usbarmory.dts | 2 +- arch/arm/boot/dts/imx6dl-apf6dev.dts | 2 +- arch/arm/boot/dts/imx6dl-aristainetos2_4.dts | 2 +- arch/arm/boot/dts/imx6dl-aristainetos2_7.dts | 2 +- arch/arm/boot/dts/imx6dl-aristainetos_4.dts | 2 +- arch/arm/boot/dts/imx6dl-aristainetos_7.dts | 2 +- arch/arm/boot/dts/imx6dl-phytec-pfla02.dtsi | 2 +- arch/arm/boot/dts/imx6dl-rex-basic.dts | 2 +- arch/arm/boot/dts/imx6dl-riotboard.dts | 2 +- arch/arm/boot/dts/imx6dl-wandboard-revb1.dts | 2 +- arch/arm/boot/dts/imx6dl-wandboard-revd1.dts | 2 +- arch/arm/boot/dts/imx6dl-wandboard.dts | 2 +- arch/arm/boot/dts/imx6q-apf6dev.dts | 2 +- arch/arm/boot/dts/imx6q-arm2.dts | 2 +- arch/arm/boot/dts/imx6q-ba16.dtsi | 2 +- arch/arm/boot/dts/imx6q-cm-fx6.dts | 2 +- arch/arm/boot/dts/imx6q-display5.dtsi | 2 +- arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts | 2 +- arch/arm/boot/dts/imx6q-evi.dts | 2 +- arch/arm/boot/dts/imx6q-gk802.dts | 2 +- arch/arm/boot/dts/imx6q-gw5400-a.dts | 2 +- arch/arm/boot/dts/imx6q-marsboard.dts | 2 +- arch/arm/boot/dts/imx6q-mccmon6.dts | 2 +- arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi | 2 +- arch/arm/boot/dts/imx6q-pistachio.dts | 2 +- arch/arm/boot/dts/imx6q-rex-pro.dts | 2 +- arch/arm/boot/dts/imx6q-sbc6x.dts | 2 +- arch/arm/boot/dts/imx6q-tbs2910.dts | 2 +- arch/arm/boot/dts/imx6q-wandboard-revb1.dts | 2 +- arch/arm/boot/dts/imx6q-wandboard-revd1.dts | 2 +- arch/arm/boot/dts/imx6q-wandboard.dts | 2 +- arch/arm/boot/dts/imx6qdl-gw51xx.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-gw551x.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-gw552x.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-gw553x.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-gw5903.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-gw5904.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-icore.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-nit6xlite.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-udoo.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-var-dart.dtsi | 2 +- arch/arm/boot/dts/imx6qp-wandboard-revd1.dts | 2 +- arch/arm/boot/dts/imx6sl-evk.dts | 2 +- arch/arm/boot/dts/imx6sl-warp.dts | 2 +- arch/arm/boot/dts/imx6sx-nitrogen6sx.dts | 2 +- arch/arm/boot/dts/imx6sx-sabreauto.dts | 2 +- arch/arm/boot/dts/imx6sx-sdb.dtsi | 2 +- arch/arm/boot/dts/imx6sx-softing-vining-2000.dts | 2 +- arch/arm/boot/dts/imx6sx-udoo-neo-basic.dts | 2 +- arch/arm/boot/dts/imx6sx-udoo-neo-extended.dts | 2 +- arch/arm/boot/dts/imx6sx-udoo-neo-full.dts | 2 +- arch/arm/boot/dts/imx6ul-14x14-evk.dts | 2 +- arch/arm/boot/dts/imx6ul-geam.dts | 2 +- arch/arm/boot/dts/imx6ul-isiot.dtsi | 2 +- arch/arm/boot/dts/imx6ul-litesom.dtsi | 2 +- arch/arm/boot/dts/imx6ul-opos6ul.dtsi | 2 +- arch/arm/boot/dts/imx6ul-pico-hobbit.dts | 2 +- arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 2 +- arch/arm/boot/dts/imx7d-colibri-emmc.dtsi | 2 +- arch/arm/boot/dts/imx7d-colibri.dtsi | 2 +- arch/arm/boot/dts/imx7d-nitrogen7.dts | 2 +- arch/arm/boot/dts/imx7d-pico.dtsi | 2 +- arch/arm/boot/dts/imx7d-sdb.dts | 2 +- arch/arm/boot/dts/imx7s-colibri.dtsi | 2 +- arch/arm/boot/dts/imx7s-warp.dts | 2 +- 121 files changed, 121 insertions(+), 121 deletions(-) commit 7f08e6aabdb46c095f5f32d5b252c05bdd4e5fd6 Author: Marco Franchi Date: Wed Jan 24 11:22:13 2018 -0200 ARM: dts: imx: Remove empty memory size nodes Remove the empty reg property from the SoC dtsi files in order to avoid duplicate memory nodes when the correct size is passed in board dts files. Signed-off-by: Marco Franchi Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx1.dtsi | 2 +- arch/arm/boot/dts/imx23.dtsi | 2 +- arch/arm/boot/dts/imx25.dtsi | 2 +- arch/arm/boot/dts/imx27.dtsi | 2 +- arch/arm/boot/dts/imx28.dtsi | 2 +- arch/arm/boot/dts/imx31.dtsi | 2 +- arch/arm/boot/dts/imx35.dtsi | 2 +- arch/arm/boot/dts/imx50.dtsi | 2 +- arch/arm/boot/dts/imx51.dtsi | 2 +- arch/arm/boot/dts/imx53.dtsi | 2 +- arch/arm/boot/dts/imx6qdl.dtsi | 2 +- arch/arm/boot/dts/imx6sl.dtsi | 2 +- arch/arm/boot/dts/imx6sx.dtsi | 2 +- arch/arm/boot/dts/imx6ul.dtsi | 2 +- arch/arm/boot/dts/imx7s.dtsi | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) commit 6de57233aa24ccadb909f86ec6fd53ff25e6e2e0 Author: Marco Franchi Date: Wed Jan 24 11:22:12 2018 -0200 ARM: dts: imx: Pass empty memory size on board dts In preparation for removing 'reg = <0 0>;' from the dtsi SoC files, pass 'reg = <0 0 >;' to the dts/dtsi board files that do not pass the memory size. Signed-off-by: Marco Franchi Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx51-zii-rdu1.dts | 5 +++++ arch/arm/boot/dts/imx53-tx53.dtsi | 5 +++++ arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts | 5 +++++ arch/arm/boot/dts/imx6dl-dfi-fs700-m60.dts | 5 +++++ arch/arm/boot/dts/imx6dl-ts4900.dts | 5 +++++ arch/arm/boot/dts/imx6dl-ts7970.dts | 5 +++++ arch/arm/boot/dts/imx6q-dfi-fs700-m60.dts | 5 +++++ arch/arm/boot/dts/imx6q-h100.dts | 5 +++++ arch/arm/boot/dts/imx6q-novena.dts | 5 +++++ arch/arm/boot/dts/imx6q-ts4900.dts | 5 +++++ arch/arm/boot/dts/imx6q-ts7970.dts | 5 +++++ arch/arm/boot/dts/imx6q-zii-rdu2.dts | 5 +++++ arch/arm/boot/dts/imx6qdl-apalis.dtsi | 5 +++++ arch/arm/boot/dts/imx6qdl-cubox-i.dtsi | 5 +++++ arch/arm/boot/dts/imx6qdl-hummingboard.dtsi | 5 +++++ arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 5 +++++ arch/arm/boot/dts/imx6qp-zii-rdu2.dts | 5 +++++ 17 files changed, 85 insertions(+) commit bf4556703b0cd789a2e4f22ac09b0d54cc8a4f67 Author: Anson Huang Date: Wed Jan 24 00:42:14 2018 +0800 ARM: dts: imx6sx: add ARM power domain support Add ARM power domain in PGC. Signed-off-by: Anson Huang Reviewed-by: Lucas Stach Acked-by: Dong Aisheng Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 7a485590960dff9f4cac42d9a197c7f9fbfae376 Author: Anson Huang Date: Tue Jan 23 23:12:23 2018 +0800 ARM: dts: imx6sx: add pu power domain support Add PU power domain support, GPU is the only module inside PU power domain, and PU power is supplied by LDO_SOC. Signed-off-by: Anson Huang Acked-by: Dong Aisheng Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9acb15e1dcd54ef32b94e7a03ad70fc0a8ad69f4 Author: Ryan Harkin Date: Tue Jan 23 12:37:30 2018 +0000 ARM: dts: imx7s-warp: enable uart6 on mikroBus This patch configures the board to output UART6 to the mikroBus. The NXP WaRP7 board can route UART6 to the mikroBus, where an RS232 click board can be plugged in to get an additional serial port. Signed-off-by: Ryan Harkin Reviewed-by: Rui Miguel Silva Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s-warp.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 9e5b2e9be15d6ac5210b14a787c6e9936e10ed77 Author: Ian Ray Date: Mon Jan 8 13:29:01 2018 +0200 ARM: dts: imx6q-bx50v3: disable SD card Default boot medium must be internal eMMC, we don't want the SDIO to be used for these devices. This commit disables the SD card interface for GE Healthcare Bx50v3 devices. Signed-off-by: Ian Ray Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-bx50v3.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 1022c489a76eaad0b82a7166a1038a4506fb2a36 Author: Sebastian Reichel Date: Mon Jan 15 15:28:20 2018 +0100 ARM: dts: imx53-ppd: use PMIC's TSI pins in adc mode PPD uses the PMIC's TSI pins in general purpose ADC mode. Signed-off-by: Sebastian Reichel Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-ppd.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 68b09c864143d8c7d664d4369fd9710f5b119640 Author: Martyn Welch Date: Mon Jan 15 15:24:52 2018 +0100 ARM: dts: imx53-ppd: Add touchscreen reset line Utilise new support in Atmel MaxTouch driver to drive the touchscreen controllers reset line correctly. Signed-off-by: Martyn Welch Signed-off-by: Sebastian Reichel Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-ppd.dts | 1 + 1 file changed, 1 insertion(+) commit 71a0febaa443fa5506ba00622047237949b9129d Author: Stefan Agner Date: Wed Jan 10 22:04:53 2018 +0100 ARM: dts: imx6ull: add UART8 support In i.MX 6ULL UART8 is part of the AIPS-3 memory map instead of AIPS-1. Clocks and interrupts remain the same. Signed-off-by: Stefan Agner Reviewed-by: Rob Herring Acked-by: Dong Aisheng Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ull.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit c28bb160662604478d21b744c9525df62445eaf5 Author: Stefan Agner Date: Wed Jan 10 22:04:52 2018 +0100 ARM: dts: imx6ull: add IOMUXC SNVS instance The i.MX 6ULL features another IOMUX Controller called IOMUXC SNVS which allows to control BOOT_MODE and TAMPER pins. Add the controller to the i.MX 6ULL specific imx6ull.dtsi device tree. Signed-off-by: Stefan Agner Reviewed-by: Rob Herring Acked-by: Dong Aisheng Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ull.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit cff1ce712ff5a74317800596c5e7e524b9a1b5cf Author: Stefan Agner Date: Wed Jan 10 22:04:51 2018 +0100 ARM: dts: imx6ul: add ARM architected timer Add per-core ARM architected timer. Unfortunately bootloaders (U-Boot) currently do not make the necessary initialization. Also specifing the clock manually using the clock-frequency property seems not to help. Therefor leave the timer disabled by default for now. Signed-off-by: Stefan Agner Reviewed-by: Rob Herring Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 8dc72265c5f9f8583513a2c30c25eefee3458985 Author: Stefan Agner Date: Wed Jan 10 22:04:50 2018 +0100 ARM: dts: imx6ul: add interrupt of virt-capable GIC The Cortex-A7 and its GIC support virtualization extensions. To make use of them the CPU private interrupt needs to be specified. Signed-off-by: Stefan Agner Reviewed-by: Rob Herring Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit bc6805f20bd5982bc1bbc747268fdd567e6b9ee6 Author: Bai Ping Date: Wed Jan 10 22:04:49 2018 +0100 ARM: dts: imx6ull: add additional pinfunc defines for i.MX 6ULL On i.MX 6ULL, the pin MUX and CTRL register of BOOT_MODEx and TAMPERx pins are available through IOMUXC_SNVS. Add additional pinfunc defines. Signed-off-by: Bai Ping Signed-off-by: Stefan Agner Reviewed-by: Rob Herring Acked-by: Dong Aisheng Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ull-pinfunc-snvs.h | 26 ++++++++++++++++++++++++++ arch/arm/boot/dts/imx6ull.dtsi | 1 + 2 files changed, 27 insertions(+) commit 64b8cd3cfa6b1bd8831bb652712e48be3031a181 Author: Fugang Duan Date: Wed Jan 10 22:04:48 2018 +0100 ARM: dts: imx6ul: update i.MX 6UltraLite iomux headers Add previously missing daisy chain configurations and several additional pinmux options. Synchronized with NXP Linux 4.9.11_1.0.0 release. Signed-off-by: Fugang Duan Signed-off-by: Stefan Agner Reviewed-by: Rob Herring Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-pinfunc.h | 169 +++++++++++++++++++++---------------- 1 file changed, 97 insertions(+), 72 deletions(-) commit e56d8d729df7abb47449fedbafa657bf77c87f47 Author: Enrico Scholz Date: Tue Jan 9 17:09:59 2018 +0100 ARM: dts: imx6: Add support for phyBOARD-Mira with i.MX 6QuadPlus Add support for the PHYTEC phyBOARD-Mira with i.MX 6QuadPlus with NAND. It is based on the phyBOARD-Mira with i.MX 6Quad/Dual and supports the same interfaces. Signed-off-by: Enrico Scholz Signed-off-by: Stefan Lengfeld Signed-off-by: Christian Hemp Signed-off-by: Stefan Riedmueller Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6qp-phytec-mira-rdk-nand.dts | 72 +++++++++++++++++++++++ 2 files changed, 73 insertions(+) commit 685991a27db24c83eca51b2038c13d768191cb5a Author: Christian Hemp Date: Tue Jan 9 17:09:58 2018 +0100 ARM: dts: imx6: Add support for phyBOARD-Mira i.MX 6 DualLight/Solo RDK Add support for the PHYTEC phyBOARD-Mira Low-Cost Rapid Development Kit with i.MX 6DualLight/Solo with NAND. Following interfaces are supported: - 100 MBit Ethernet - USB Host - RS232 - HDMI Signed-off-by: Christian Hemp Signed-off-by: Stefan Christ Signed-off-by: Stefan Riedmueller Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6dl-phytec-mira-rdk-nand.dts | 64 +++++++++++++++++++++++ 2 files changed, 65 insertions(+) commit f5b65bd5c45b94282a5d9929bebcb09f6e3b812a Author: Christian Hemp Date: Tue Jan 9 17:09:57 2018 +0100 ARM: dts: imx6: Add support for phyBOARD-Mira i.MX 6Quad/Dual RDK Add support for the PHYTEC phyBOARD-Mira Rapid Development Kit with i.MX 6Quad/Dual with eMMC or NAND. Following interfaces are supported: - Gigabit Ethernet - USB Host - CAN - RS232 - PCIe - LVDS - HDMI Signed-off-by: Christian Hemp Signed-off-by: Stefan Christ Signed-off-by: Stefan Riedmueller Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/imx6q-phytec-mira-rdk-emmc.dts | 72 ++++++++++++++++++++++++ arch/arm/boot/dts/imx6q-phytec-mira-rdk-nand.dts | 72 ++++++++++++++++++++++++ 3 files changed, 146 insertions(+) commit 800d595151bbd8b42667c69d62af793290454817 Author: Stefan Riedmueller Date: Tue Jan 9 17:09:56 2018 +0100 ARM: dts: imx6: Add initial support for phyBOARD-Mira This patch adds basic support for PHYTEC phyBOARD-Mira as carrier board for PHYTEC phyCORE-i.MX 6. Signed-off-by: Christian Hemp Signed-off-by: Stefan Christ Signed-off-by: Christoph Fritz Signed-off-by: Stefan Riedmueller Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-phytec-mira.dtsi | 390 +++++++++++++++++++++++++++++ 1 file changed, 390 insertions(+) commit ddec5d1c00475630457c59c81392846d27d10455 Author: Stefan Riedmueller Date: Tue Jan 9 17:09:55 2018 +0100 ARM: dts: imx6: Add initial support for phyCORE-i.MX 6 SOM This patch adds basic support for PHYTEC phyCORE-i.MX 6 SOM with i.MX 6Quad/Dual or i.MX 6DualLight/Solo. Signed-off-by: Christian Hemp Signed-off-by: Stefan Christ Signed-off-by: Christoph Fritz Signed-off-by: Stefan Riedmueller Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-phytec-phycore-som.dtsi | 279 ++++++++++++++++++++++ 1 file changed, 279 insertions(+) commit dc5c632596f47bc528f38ea84621d3908637a71f Author: Marco Franchi Date: Tue Jan 9 09:46:25 2018 -0200 ARM: dts: imx7d-sdb: Add support for mpl3115 sensor The i.MX 7D SDB has a MPL3115 Pressure sensor. Add support for this sensor, which is included in the trivial i2c devices and according to the bindings documentation, just need a compatible field and an address. Signed-off-by: Marco Franchi Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-sdb.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 256909a47871a5ff2456ce3d2ec30a75e1236090 Author: Marco Franchi Date: Tue Jan 9 09:46:23 2018 -0200 ARM: dts: imx6ul-evk: Add support for mag3110 sensor The i.MX 6UL EVK has a MAG3110 Magnetometer sensor in its base board. Add support for this sensor, which is included in the trivial i2c devices and according to the bindings documentation, just need a compatible field and an address. Signed-off-by: Marco Franchi Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-14x14-evk.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 7055f714032c03a7747fae9526802aab9ace1110 Author: Lucas Stach Date: Wed Jan 3 11:32:37 2018 -0800 ARM: dts: imx6: RDU2: disable internal watchdog The system has an external watchdog in the environment processor so the internal watchdog is of no use. Cc: Sascha Hauer Cc: Rob Herring Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: cphealy@gmail.com Reviewed-by: Fabio Estevam Signed-off-by: Lucas Stach Signed-off-by: Andrey Smirnov Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 4a7459bc5a3dd1f25f7a9d50083824f8dad8ebd7 Author: Anson Huang Date: Wed Jan 3 19:22:14 2018 +0800 ARM: dts: imx6ul: remove unnecessary clocks for cpu-freq Remove unnecessary clocks for cpu-freq driver to avoid confusion. Signed-off-by: Anson Huang Reviewed-by: Fabio Estevam Acked-by: Dong Aisheng Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 081e0653ec05a362111017697517f3eea616c1d7 Author: Fabio Estevam Date: Wed Dec 27 14:23:23 2017 -0200 ARM: dts: imx27-eukrea-mbimxsd27-baseboard: Pass missing unit address ads7846 is connected to SPI chip select 0, so pass the unit address accordingly to fix the following build warning with W=1: arch/arm/boot/dts/imx27-eukrea-mbimxsd27-baseboard.dtb: Warning (unit_address_vs_reg): Node /soc/aipi@10000000/cspi@1000e000/ads7846 has a reg or ranges property, but no unit name Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx27-eukrea-mbimxsd27-baseboard.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 142ee3366940f186d8e5b7a09ee2932010c88565 Author: Fabio Estevam Date: Wed Dec 27 12:04:38 2017 -0200 ARM: dts: imx28-cfa10049: Move i2cmux out of bus node Move i2cmux node from soc node to root node. i2cmux node does not have any register properties and thus shouldn't be placed on the bus. This fixes the following build warnings with W=1: arch/arm/boot/dts/imx28-cfa10049.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbx@80040000/i2cmux missing or empty reg/ranges property Signed-off-by: Fabio Estevam Acked-by: Maxime Ripard Signed-off-by: Shawn Guo arch/arm/boot/dts/imx28-cfa10049.dts | 130 +++++++++++++++++------------------ 1 file changed, 65 insertions(+), 65 deletions(-) commit 5022427870b9a9b682989d10a188c81b568a7c20 Author: Fabio Estevam Date: Wed Dec 27 12:04:37 2017 -0200 ARM: dts: imx28-apx4devkit: Pass unit address and reg to IOMUX node Pass unit address and reg to IOMUX node to fix the following build warning with W=1: arch/arm/boot/dts/imx28-apx4devkit.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/mmc2-sck-cfg-apx4 missing or empty reg/ranges property Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx28-apx4devkit.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d039e25342cb7192320bf8849fe6be98e26ec995 Author: Fabio Estevam Date: Wed Dec 27 12:04:36 2017 -0200 ARM: dts: imx28-tx28: Pass unit address and reg to IOMUX node Pass unit address and reg to IOMUX node to fix the following build warning with W=1: arch/arm/boot/dts/imx28-tx28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/tx28-edt-ft5x06-pins missing or empty reg/ranges property arch/arm/boot/dts/imx28-tx28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/tx28-flexcan-xcvr-pins missing or empty reg/ranges property arch/arm/boot/dts/imx28-tx28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/tx28-lcdif-23bit missing or empty reg/ranges property arch/arm/boot/dts/imx28-tx28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/tx28-lcdif-ctrl missing or empty reg/ranges property arch/arm/boot/dts/imx28-tx28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/tx28-mac0-gpio-pins missing or empty reg/ranges property arch/arm/boot/dts/imx28-tx28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/tx28-pca9554-pins missing or empty reg/ranges property arch/arm/boot/dts/imx28-tx28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/spi-gpiogrp missing or empty reg/ranges property arch/arm/boot/dts/imx28-tx28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/tx28-tsc2007-pins missing or empty reg/ranges property arch/arm/boot/dts/imx28-tx28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/tx28-usbphy0-pins missing or empty reg/ranges property arch/arm/boot/dts/imx28-tx28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/tx28-usbphy1-pins missing or empty reg/ranges property Signed-off-by: Fabio Estevam Acked-By: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx28-tx28.dts | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 497b90db5e4643fc41dc5761e01198c50b7d9954 Author: Fabio Estevam Date: Wed Dec 27 12:04:35 2017 -0200 ARM: dts: imx28: Pass unit address and reg to IOMUX node Pass unit address and reg to IOMUX node to fix the following build warning with W=1: arch/arm/boot/dts/imx28-apf28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/gpmi-status-cfg missing or empty reg/ranges property arch/arm/boot/dts/imx28-apf28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/mmc0-cd-cfg missing or empty reg/ranges property arch/arm/boot/dts/imx28-apf28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/mmc0-sck-cfg missing or empty reg/ranges property arch/arm/boot/dts/imx28-apf28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/mmc1-cd-cfg missing or empty reg/ranges property arch/arm/boot/dts/imx28-apf28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/mmc1-sck-cfg missing or empty reg/ranges property arch/arm/boot/dts/imx28-apf28.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/mmc2-cd-cfg missing or empty reg/ranges property Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx28.dtsi | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 74aeda3557db99a2eb1af5cd1cdf6f5322a4a4f4 Author: Fabio Estevam Date: Wed Dec 27 12:04:34 2017 -0200 ARM: dts: imx23: Pass unit address and reg to IOMUX node Pass unit address and reg to IOMUX node to fix the following build warning with W=1: arch/arm/boot/dts/imx23-evk.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/gpmi-pins-fixup missing or empty reg/ranges property arch/arm/boot/dts/imx23-evk.dtb: Warning (simple_bus_reg): Node /apb@80000000/apbh@80000000/pinctrl@80018000/mmc0-pins-fixup missing or empty reg/ranges property Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx23.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 35090321a297942a2817e1dc2eaf0c25009fb4b0 Author: Rasmus Villemoes Date: Wed Jan 3 16:45:45 2018 +0100 ARM: dts: ls1021a: add nodes for on-chip ram Although the two nodes constitute one contiguous 128K region, still describe them separately: - That's how they are described in the reference manual: "Each OCRAM occupies a 64 KB of address region...", and the names ocram1 and ocram2 are also as used in the manual. - The two areas are treated differently by the boot ROM code: OCRAM2 is zero-initialized, while, again quoting the RM, "software must perform the zero initialization of OCRAM1." Signed-off-by: Rasmus Villemoes Signed-off-by: Shawn Guo arch/arm/boot/dts/ls1021a.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit bafeca673f04ecd54cbb6b87faf8d525a886d481 Merge: 1dcb185 3b5b899 Author: Takashi Iwai Date: Mon Feb 12 14:00:48 2018 +0100 Merge branch 'topic/hda-sync-power' into for-next Pull the HD-audio power sync fix. This is shared with ASoC. Signed-off-by: Takashi Iwai commit 3b5b899ca67db07a4c4825911072221f99e157e2 Author: Abhijeet Kumar Date: Tue Jan 23 23:00:52 2018 +0530 ALSA: hda: Make use of core codec functions to sync power state Since sync_power_state is moved to core it's better to use the helper function to ensure the actual power state reaches target instead of using the local helper functions already exsisting in hda code. Signed-off-by: Abhijeet Kumar Signed-off-by: Takashi Iwai sound/pci/hda/hda_codec.c | 28 +--------------------------- sound/pci/hda/hda_local.h | 6 +++++- 2 files changed, 6 insertions(+), 28 deletions(-) commit 09787492537462e3c7b8f67b30ff9704062f97cc Author: Abhijeet Kumar Date: Tue Jan 23 23:00:51 2018 +0530 ALSA: hda: Copying sync power state helper to core The current sync_power_state is local to hda code, moving it core so that other users apart from hda legacy can use it. The helper function ensures the actual state reaches the target state. Signed-off-by: Abhijeet Kumar Signed-off-by: Takashi Iwai include/sound/hdaudio.h | 2 ++ sound/hda/hdac_device.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit fa3d4c67dfe920515a3d840de983a2b3e77d3b94 Author: Geert Uytterhoeven Date: Tue Feb 6 14:05:54 2018 +0100 arm64: dts: renesas: r8a77995: Remove non-existing STBE region R-Car D3 does not have the Stream Buffer for EtherAVB-IF (STBE). Note that the RAVB driver does not use this region. Fixes: f9ba0c4cfe6169b7 ("arm64: dts: renesas: r8a77995: Add EthernetAVB device node") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0d2ad1ff6e379a8ca6c8e814433e54637fb1516 Author: Geert Uytterhoeven Date: Tue Feb 6 14:05:53 2018 +0100 arm64: dts: renesas: r8a77970: Remove non-existing STBE region R-Car V3M does not have the Stream Buffer for EtherAVB-IF (STBE). Note that the RAVB driver does not use this region. Fixes: bea2ab136eaacec2 ("arm64: dts: renesas: r8a77970: add EtherAVB support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00d3375f918d503326bc4e4550b023d1a71e8d29 Author: Sergei Shtylyov Date: Fri Feb 2 21:36:16 2018 +0300 arm64: dts: renesas: r8a77980: add SYS-DMAC support Describe SYS-DMAC1/2 in the R8A77980 device tree. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77980.dtsi | 68 +++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit f3a54d6c17f5ec826ff81e4f9f35a11e63211c53 Author: Sergei Shtylyov Date: Fri Feb 2 21:33:39 2018 +0300 arm64: dts: renesas: initial R8A77980 SoC device tree The initial R8A77980 SoC device tree including Cortex-A53 CPU, GIC, timer, CPG, RST, and SYSC. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77980.dtsi | 122 ++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) commit b85e1f77d9e285e61f8aa5a3a7e2bc46431d07ee Author: Sergei Shtylyov Date: Wed Jan 31 22:59:03 2018 +0300 arm64: add Renesas R8A77980 support Add a configuration option for the R-Car V3H (R8A77980) SoC. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/Kconfig.platforms | 6 ++++++ 1 file changed, 6 insertions(+) commit 41337aa1556a38a0b6861447ba7861c3a34bc204 Author: Ulrich Hecht Date: Mon Jan 29 16:45:46 2018 +0100 arm64: dts: renesas: draak: enable I2C controller 1 No devices to add, I2C1 has an external connector only. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 86e7a972adec5093e24e888ae3a949ee185dc533 Author: Ulrich Hecht Date: Mon Jan 29 16:45:45 2018 +0100 arm64: dts: renesas: draak: enable I2C controller 0 and EEPROM Enables EEPROM on I2C0 on the Draak board. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit ffcd060fd51682d2695da7334aa607a807e3838e Author: Ulrich Hecht Date: Mon Jan 29 16:45:44 2018 +0100 arm64: dts: renesas: r8a77995: add I2C support Defines R-Car D3 I2C controllers 0-3. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Acked-by: Wolfram Sang Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995.dtsi | 67 +++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit a052d934a4e03a81e1f6cf1c63ac693b04e9a441 Author: Niklas Söderlund Date: Fri Jan 5 16:54:47 2018 +0100 arm64: dts: renesas: r8a7796: update register size for thermal To be able to read fused calibration values from hardware the size of the register resource of TSC1 needs to be incremented to cover one more register which holds the information if the calibration values have been fused or not. Instead of increasing TSC1 size to the value from the datasheet update all TSC's size to the smallest granularity of the address decoder circuitry. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cd8325dc194d6fa0707c9d5b427ca1fed6893b53 Author: Niklas Söderlund Date: Fri Jan 5 16:54:46 2018 +0100 arm64: dts: renesas: r8a7795: update register size for thermal To be able to read fused calibration values from hardware the size of the register resource of TSC1 needs to be incremented to cover one more register which holds the information if the calibration values have been fused or not. Instead of increasing TSC1 size to the value from the datasheet update all TSC's size to the smallest granularity of the address decoder circuitry Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f320eead5dad37f296201bbcc00a88188a63a7da Author: Simon Horman Date: Wed Dec 20 13:24:42 2017 +0100 arm64: dts: renesas: r8a77995: move nodes which have no reg property out of bus Move pmu_a53 and timer nodes from soc node to root node. The nodes that have been moved do not have any register properties and thus shouldn't be placed on the bus. This problem is flagged by the compiler as follows: $ make W=1 ... arch/arm64/boot/dts/renesas/r8a77995-draak.dtb: Warning (simple_bus_reg): Node /soc/timer missing or empty reg/ranges property arch/arm64/boot/dts/renesas/r8a77995-draak.dtb: Warning (simple_bus_reg): Node /soc/pmu_a53 missing or empty reg/ranges property Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995.dtsi | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit 7569d1ee01c75b8581521bc67e595a575a7eafce Author: Simon Horman Date: Wed Dec 20 13:25:49 2017 +0100 arm64: dts: renesas: r8a77970: move node which has no reg property out of bus Move timer node from soc node to root node. The node that have been moved do not have any register properties and thus shouldn't be placed on the bus. This problem is flagged by the compiler as follows: $ make W=1 ... DTC arch/arm64/boot/dts/renesas/r8a77970-eagle.dtb arch/arm64/boot/dts/renesas/r8a77970-eagle.dtb: Warning (simple_bus_reg): Node /soc/timer missing or empty reg/ranges property DTC arch/arm64/boot/dts/renesas/r8a77970-v3msk.dtb arch/arm64/boot/dts/renesas/r8a77970-v3msk.dtb: Warning (simple_bus_reg): Node /soc/timer missing or empty reg/ranges property Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970.dtsi | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit ece30287af4e08e681f27c3d58853b68cdde658b Author: Wolfram Sang Date: Fri Dec 22 21:11:46 2017 +0100 arm64: dts: renesas: salvator-common: add GPIO extender We need to configure its GPIOs later. Signed-off-by: Wolfram Sang Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/salvator-common.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 0c38c54ef9bc2a1062900adb01833e0b824f8462 Author: Niklas Söderlund Date: Thu Jan 4 17:03:19 2018 +0100 arm64: dts: renesas: r8a7795: add thermal cooling management Add nodes and properties for thermal cooling management support. Signed-off-by: Niklas Söderlund Acked-by: Eduardo Valentin Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 479e5d70a9cee635d0feda260eed3719fb565ca8 Author: Niklas Söderlund Date: Thu Jan 4 17:03:20 2018 +0100 arm64: dts: renesas: r8a7796: add thermal cooling management Add nodes and properties for thermal cooling management support. Signed-off-by: Niklas Söderlund Acked-by: Eduardo Valentin Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit da7e3113344fda50b10f1ad2c633abaaaf25d21b Author: Dien Pham Date: Wed Jan 3 13:41:05 2018 +0100 arm64: dts: renesas: r8a7796: Add OPPs table for cpu devices Define OOP tables for all CPUs. This allows CPUFreq to function. Based in part on work by Hien Dang. Signed-off-by: Dien Pham Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Tested-by: Niklas Söderlund arch/arm64/boot/dts/renesas/r8a7796.dtsi | 62 ++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit dd149e851ace00a7832846e46ddefc6b181522c2 Author: Dien Pham Date: Wed Jan 3 13:41:04 2018 +0100 arm64: dts: renesas: r8a7795: Add OPPs table for cpu devices Define OOP tables for all CPUs. This allows CPUFreq to function. Based in part on work by Hien Dang. Signed-off-by: Dien Pham Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Tested-by: Niklas Söderlund arch/arm64/boot/dts/renesas/r8a7795.dtsi | 61 ++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 1c6c924a49e0cd8f908409fb2a68570d9a4b2998 Author: Simon Horman Date: Wed Jan 3 13:41:03 2018 +0100 arm64: dts: renesas: r8a7795: move scif node into alphabetical order Move scif node so that sub-nodes of the root node are in alphabetical order. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Tested-by: Niklas Söderlund arch/arm64/boot/dts/renesas/r8a7795.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 9ab5977d472b3c63f99c23c2c4ec3a9820c50faf Author: Simon Horman Date: Tue Feb 6 14:20:45 2018 +0100 arm64: defconfig: enable R8A77980 SoC Enable the Renesas R-Car V3H (R8A77980) SoC in the ARM64 defconfig. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit f15092f8482b63b91d7ca7f4bd7090da7f9f2f24 Author: Sergei Shtylyov Date: Wed Jan 31 22:56:47 2018 +0300 dt-bindings: arm: document R8A77980 SoC bindings Document the R-Car V3H (R8A77980) SoC device tree bindings. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+) commit 931bc7ec2d43f85c0b05aacb31bd1bd187ed7f65 Author: Wolfram Sang Date: Tue Feb 6 23:29:58 2018 +0100 ARM: dts: gose: use demuxer for I2C4 Make it possible to fallback to GPIO for I2C4 on the EXIO-E connector. This is based on reference work for the I2C0 core of the lager/r8a7790 by Wolfram Sang. Signed-off-by: Simon Horman [wsa: rebased, corrected board name in subject, fixed aliases, switched to named GPIOs, fixed pinmux for I2C4] Signed-off-by: Wolfram Sang arch/arm/boot/dts/r8a7793-gose.dts | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 786ef2eeb04cca41d6382556f1409f37f64c4a0c Author: Wolfram Sang Date: Tue Feb 6 23:29:57 2018 +0100 ARM: dts: gose: use demuxer for I2C2 Create a separate bus for HDMI related I2C2 and provide fallback to GPIO. Based on work for the r8a7790/lager by Wolfram Sang. Signed-off-by: Simon Horman [wsa: rebased, corrected board name in subject, fixed aliases, switched to named GPIOs] Signed-off-by: Wolfram Sang arch/arm/boot/dts/r8a7793-gose.dts | 218 ++++++++++++++++++++----------------- 1 file changed, 121 insertions(+), 97 deletions(-) commit d4c1ce2813942407cead7adb86d1dd9dfc46f74c Author: Wolfram Sang Date: Tue Feb 6 23:29:56 2018 +0100 ARM: dts: silk: use demuxer for I2C1 Create a separate bus for HDMI related I2C1 and provide fallback to GPIO. Based on work for the r8a7790/lager by Wolfram Sang. Signed-off-by: Simon Horman [wsa: rebased, fixed aliases, switched to named GPIOs] Signed-off-by: Wolfram Sang arch/arm/boot/dts/r8a7794-silk.dts | 128 ++++++++++++++++++++++--------------- 1 file changed, 75 insertions(+), 53 deletions(-) commit 61866d7fdc7007acfca2107f7d9fcb05ed0c6203 Author: Wolfram Sang Date: Tue Feb 6 23:29:55 2018 +0100 ARM: dts: alt: use demuxer for I2C1 Create a separate bus for HDMI related I2C1 and provide fallback to GPIO. Based on work for the r8a7790/lager by Wolfram Sang. Signed-off-by: Simon Horman [wsa: rebased, fixed aliases, switched to named GPIOs] Signed-off-by: Wolfram Sang arch/arm/boot/dts/r8a7794-alt.dts | 53 +++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 16 deletions(-) commit 12937bffd64f5b9970589d0b946305d14cc45e6a Author: Wolfram Sang Date: Tue Feb 6 23:29:54 2018 +0100 ARM: dts: porter: use demuxer for I2C2 Create a separate bus for HDMI related I2C2 and provide fallback to GPIO. Based on work for the r8a7790/lager by Wolfram Sang. Signed-off-by: Simon Horman [wsa: rebased, fixed aliases, switched to named GPIOs] Signed-off-by: Wolfram Sang arch/arm/boot/dts/r8a7791-porter.dts | 128 ++++++++++++++++++++--------------- 1 file changed, 75 insertions(+), 53 deletions(-) commit be93275c4dade2d089d495f38a09e62712ea4e39 Author: Wolfram Sang Date: Tue Feb 6 23:29:53 2018 +0100 ARM: dts: koelsch: use demuxer for I2C4 Make it possible to fallback to GPIO for I2C4 on the EXIO-E connector. This is based on reference work for the I2C0 core of the lager/r8a7790 by Wolfram Sang. Signed-off-by: Simon Horman [wsa: rebased, fixed aliases, switched to named GPIOS, fixed pinmux for I2C4] Signed-off-by: Wolfram Sang arch/arm/boot/dts/r8a7791-koelsch.dts | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 168a70999401e516fdf63dca742218bab04996a4 Author: Wolfram Sang Date: Tue Feb 6 23:29:52 2018 +0100 ARM: dts: koelsch: use demuxer for I2C2 Create a separate bus for HDMI related I2C2 and provide fallback to GPIO. Based on work for the r8a7790/lager by Wolfram Sang. Signed-off-by: Simon Horman [wsa: rebased, fixed aliases, switched to named GPIOs, sorted by SCL pins] Signed-off-by: Wolfram Sang arch/arm/boot/dts/r8a7791-koelsch.dts | 200 +++++++++++++++++++--------------- 1 file changed, 111 insertions(+), 89 deletions(-) commit e6081b21a19156c982f757cb1b6753cfb7e93ebc Author: Wolfram Sang Date: Tue Feb 6 23:29:51 2018 +0100 ARM: dts: lager: use demuxer for IIC3/I2C3 Create a separate bus for da9063 PMIC and da9210 regulator related I2C slaves. Based on similar work for HDMI by Wolfram Sang. Signed-off-by: Simon Horman [wsa: rebased, corrected chip name in commit msg, updated aliases] Signed-off-by: Wolfram Sang arch/arm/boot/dts/r8a7790-lager.dts | 84 +++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 31 deletions(-) commit 4e65e1b6721aafca073a308ae7f32e1cdddfdcd8 Author: Wolfram Sang Date: Tue Feb 6 23:29:50 2018 +0100 ARM: dts: lager: use demuxer for IIC2/I2C2 Create a separate bus for HDMI related I2C slaves. Based on work by Wolfram Sang. Signed-off-by: Simon Horman [wsa: rebased, removed typo in comment, fixed aliases, switched to named GPIOS, sort SCL pins first] Signed-off-by: Wolfram Sang arch/arm/boot/dts/r8a7790-lager.dts | 213 +++++++++++++++++++++--------------- 1 file changed, 124 insertions(+), 89 deletions(-) commit 76a2577d97f0b221245e56a17a70bb10a3a97419 Author: Biju Das Date: Wed Jan 24 16:11:52 2018 +0000 ARM: dts: r8a7745: Add VSP support Add VSP support to SoC DT. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 0565605aa9887a3d6423fb08c0cbb0de3a22f838 Author: Biju Das Date: Wed Jan 24 16:11:51 2018 +0000 ARM: dts: r8a7743: Add VSP support Add VSP support to SoC DT. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 0dcba3de58354e35c91a31dafe597e81e7c22294 Author: Biju Das Date: Wed Jan 24 15:42:02 2018 +0000 ARM: dts: r8a7745: Add IPMMU DT nodes Add the six IPMMU instances found in the r8a7745 to DT with a disabled status. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 58 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit bbb44da0b5958e05cba96b36a354d5e9be46b1a8 Author: Biju Das Date: Wed Jan 24 15:42:01 2018 +0000 ARM: dts: r8a7743: Add IPMMU DT nodes Add the six IPMMU instances found in the r8a7743 to DT with a disabled status. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 58 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 28c07001db756d5542a80be4441c0d2be0f114c8 Author: Simon Horman Date: Fri Jan 26 10:40:52 2018 +0100 ARM: dts: r8a7745: sort subnodes of soc node Sort the subnodes of the soc node to improve maintainability. The sort key is the address on the bus with instances of the same IP block grouped together and sorted alphabetically. Minor whitespace and line-wrapping changes are also made to match the formatting of R-Car Gen2 SoCs. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7745.dtsi | 1138 ++++++++++++++++++++-------------------- 1 file changed, 567 insertions(+), 571 deletions(-) commit 8eccafe92d100d836dfee541c3337b42d818533c Author: Simon Horman Date: Fri Jan 26 10:40:51 2018 +0100 ARM: dts: r8a7743: sort subnodes of soc node Sort the subnodes of the soc node to improve maintainability. The sort key is the address on the bus with instances of the same IP block grouped together and sorted alphabetically. Minor whitespace and line-wrapping changes are also made to match the formatting of R-Car Gen2 SoCs. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7743.dtsi | 1327 ++++++++++++++++++++-------------------- 1 file changed, 662 insertions(+), 665 deletions(-) commit 77b1e3d230e5e42bbde3f11923b34382832a8415 Author: Simon Horman Date: Fri Jan 26 10:36:35 2018 +0100 ARM: dts: r8a7793: consistently use single space before = Consistently use a single space before a =. This patch fixes instances where a tab is used instead. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7793.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c57c1b7ce8c6743ca745a577e7ac6b81a59a2479 Author: Simon Horman Date: Fri Jan 26 10:36:34 2018 +0100 ARM: dts: r8a7791: consistently use single space before = Consistently use a single space before a =. This patch fixes instances where a tab is used instead. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7791.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5a63226206ce2313badee0b6ffec47f7a305c8ae Author: Simon Horman Date: Fri Jan 26 10:36:33 2018 +0100 ARM: dts: r8a7790: consistently use single space before = Consistently use a single space before a =. This patch fixes instances where a tab is used instead. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7790.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 807eeaf95e2647277f89284d91d1785c2280c2c6 Author: Simon Horman Date: Wed Jan 17 17:17:17 2018 +0100 ARM: dts: r8a7794: sort subnodes of root node Sort the subnodes of the soc node to improve maintainability. The sort key is the address on the bus with instances of the same IP block grouped together. Also re-align comment of audio_clka to match other R-Car SoCs. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7794.dtsi | 90 +++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 45 deletions(-) commit f217f7bbb0fe5b446d5ad44ae6792e35eab4362e Author: Simon Horman Date: Wed Jan 17 17:17:16 2018 +0100 ARM: dts: r8a7794: sort subnodes of soc node Sort the subnodes of the soc node to improve maintainability. The sort key is the address on the bus with instances of the same IP block grouped together. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7794.dtsi | 1525 ++++++++++++++++++++-------------------- 1 file changed, 762 insertions(+), 763 deletions(-) commit 0f2901d74a99e2e6c0aea2ef9b1820c7d0ed88e1 Author: Simon Horman Date: Wed Jan 17 17:17:15 2018 +0100 ARM: dts: r8a7794: add soc node Add soc node to represent the bus and move all nodes with a base address into this node. This is consistent with handling of R-Car Gen3, RZ/G1, and R-Car V2H (R8A77920) SoCs upstream. It is intended to migrate other R-Car Gen2 SoCs to this scheme. The ordering is derived from simply moving each node with an address up to before any nodes without a base address that occur before the soc node. To improve maintainability follow-up patches will sort subnodes of both the new soc node and the root node. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7794.dtsi | 2358 ++++++++++++++++++++-------------------- 1 file changed, 1205 insertions(+), 1153 deletions(-) commit b190cce35ff90e392f89a3d45e0814cdbfd7434c Author: Simon Horman Date: Wed Jan 17 17:17:14 2018 +0100 ARM: dts: r8a7794: consistently use single space after = Consistently use a single space after a =. This patch removes instances where a tab is used instead. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7794.dtsi | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit ac24c5e52285154cca1c34488348e62f5288d6dc Author: Simon Horman Date: Wed Jan 17 17:17:13 2018 +0100 ARM: dts: r8a7793: sort subnodes of root node Sort the subnodes of the soc node to improve maintainability. The sort key is the address on the bus with instances of the same IP block grouped together. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7793.dtsi | 90 +++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 45 deletions(-) commit 40ed6d16cf06fd8b1320c74cb6669356caf8daa9 Author: Simon Horman Date: Wed Jan 17 17:17:12 2018 +0100 ARM: dts: r8a7793: sort subnodes of soc node Sort the subnodes of the soc node to improve maintainability. The sort key is the address on the bus with instances of the same IP block grouped together. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7793.dtsi | 872 ++++++++++++++++++++--------------------- 1 file changed, 436 insertions(+), 436 deletions(-) commit bff8f8c2feb7898e5dcdf451678041a1477cc9a2 Author: Simon Horman Date: Wed Jan 17 17:17:11 2018 +0100 ARM: dts: r8a7793: add soc node Add soc node to represent the bus and move all nodes with a base address into this node. This is consistent with handling of R-Car Gen3, RZ/G1, and R-Car V2H (R8A77920) SoCs upstream. It is intended to migrate other R-Car Gen2 SoCs to this scheme. The ordering is derived from simply moving each node with an address up to before any nodes without a base address that occur before the soc node. To improve maintainability follow-up patches will sort subnodes of both the new soc node and the root node. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7793.dtsi | 2325 +++++++++++++++++++++------------------- 1 file changed, 1193 insertions(+), 1132 deletions(-) commit 93a4a46fa1a6b2cf51cfbdd2e46572e5d4dad57d Author: Simon Horman Date: Wed Jan 17 17:17:10 2018 +0100 ARM: dts: r8a7793: consistently use single space after = Consistently use a single space after a =. This patch removes instances where a tab is used instead. It also avoids running over 80 columns in width in one of the lines where whitespace is updated. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7793.dtsi | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 3758e51b4b1e9cfd98be29b32b374582a00873c3 Author: Simon Horman Date: Wed Jan 17 17:17:09 2018 +0100 ARM: dts: r8a7792: sort subnodes of soc node Sort the subnodes of the soc node to improve maintainability. The sort key is the address on the bus with instances of the same IP block grouped together. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7792.dtsi | 498 ++++++++++++++++++++--------------------- 1 file changed, 249 insertions(+), 249 deletions(-) commit 21b05c52abe355e205eb133f2fe3dbc2520edeed Author: Simon Horman Date: Wed Jan 17 17:17:08 2018 +0100 ARM: dts: r8a7791: sort subnodes of root node Sort subnodes of root node to aid maintenance. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7791.dtsi | 134 ++++++++++++++++++++--------------------- 1 file changed, 67 insertions(+), 67 deletions(-) commit bb21803ea44076525a97e8a247acfa442b2bf115 Author: Simon Horman Date: Wed Jan 17 17:17:07 2018 +0100 ARM: dts: r8a7791: add soc node Add soc node to represent the bus and move all nodes with a base address into this node. This is consistent with handling of R-Car Gen3, RZ/G1, and R-Car V2H (R8A77920) SoCs upstream. It is intended to migrate other R-Car Gen2 SoCs to this scheme. The ordering is derived from simply moving each node with an address up to before any nodes without a base address that occur before the soc node. To improve maintainability follow-up patches will sort subnodes of both the new soc node and the root node. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7791.dtsi | 2909 ++++++++++++++++++++-------------------- 1 file changed, 1489 insertions(+), 1420 deletions(-) commit 5025c78b3b69914d4da8e75cf2390329cf04ca95 Author: Simon Horman Date: Wed Jan 17 17:17:06 2018 +0100 ARM: dts: r8a7791: consistently use single space after = Consistently use a single space after a =. This patch removes instances where a tab or multiple spaces are used instead. It also avoids running over 80 columns in width in one of the lines where whitespace is updated. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7791.dtsi | 75 +++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 37 deletions(-) commit 003d2d68b2a6fbf242506d4d579f3b5506224c88 Author: Simon Horman Date: Wed Jan 17 17:17:05 2018 +0100 ARM: dts: r8a7790: sort subnodes of root node Sort subnodes of root node to aid maintenance. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7790.dtsi | 104 ++++++++++++++++++++--------------------- 1 file changed, 52 insertions(+), 52 deletions(-) commit 5923abc19cd76b63652401f2851b863b8f5deffa Author: Simon Horman Date: Wed Jan 17 17:17:04 2018 +0100 ARM: dts: r8a7790: sort subnodes of soc node Sort the subnodes of the soc node to improve maintainability. The sort key is the addresss on the bus with instances of the same IP block grouped together. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7790.dtsi | 1592 ++++++++++++++++++++-------------------- 1 file changed, 796 insertions(+), 796 deletions(-) commit 4bdb7aa7dcd0cbf49298dc73adf27639bf792161 Author: Simon Horman Date: Wed Jan 17 17:17:03 2018 +0100 ARM: dts: r8a7790: add soc node Add soc node to represent the bus and move all nodes with a base address into this node. This is consistent with handling of R-Car Gen3, RZ/G1, and R-Car V2H (R8A77920) SoCs upstream. It is intended to migrate other R-Car Gen2 SoCs to this scheme. The ordering is derived from simply moving each node with an address up to before any nodes without a base address that occur before the soc node. To improve maintainability follow-up patches will sort subnodes of both the new soc node and the root node. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7790.dtsi | 2794 ++++++++++++++++++++-------------------- 1 file changed, 1432 insertions(+), 1362 deletions(-) commit 41b3568dc4f11e555aecf37fff5a08f398f97a03 Author: Simon Horman Date: Wed Jan 17 17:17:02 2018 +0100 ARM: dts: r8a7790: consistently use single space after = Consistently use a single space after a =. This patch removes instances where a tab or multiple spaces are used instead. It also avoids running over 80 columns in width in one of the lines where whitespace is updated. This patch should not introduce any functional change. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7790.dtsi | 75 +++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 37 deletions(-) commit d4b78db6ac3e084e2bdc57d5518bd247c727f396 Author: Laurent Pinchart Date: Sat Jan 13 01:14:23 2018 +0200 ARM: dts: porter: Fix HDMI output routing The HDMI encoder is connected to the RGB output of the DU, which is port@0, not port@1. Fix the incorrect DT description. Fixes: c5af8a4248d3 ("ARM: dts: porter: add DU DT support") Signed-off-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791-porter.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d1671828696650db6123ab1d7a592a0bbf42ff2 Author: Fabrizio Castro Date: Thu Jan 11 20:59:39 2018 +0000 ARM: dts: iwg22m: Enable cmt0 This patch enables cmt0 support from within the iwg22m SoM dtsi. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745-iwg22m.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit cbeb319b9f220982acc2f533ffee5042a6763c39 Author: Fabrizio Castro Date: Thu Jan 11 20:59:38 2018 +0000 ARM: dts: iwg20m: Enable cmt0 This patch enables cmt0 support from within the iwg20m SoM dtsi. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743-iwg20m.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit c5aa87977626e778e1ee3bd03b14a300d9338a3a Author: Niklas Söderlund Date: Tue Jan 9 17:49:04 2018 +0100 ARM: dts: lager: Add CEC clock for HDMI transmitter The adv7511 on the Lager board has a 12 MHz fixed clock for the CEC block. Specify this in the dts to enable CEC support. Based on a similar patch for Koelsch by Hans Verkuil. Signed-off-by: Niklas Söderlund Tested-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790-lager.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1cfe2186c708c8f954097086e3da0cffd1e75f4e Author: Simon Horman Date: Wed Dec 20 13:14:45 2017 +0100 ARM: dts: r8a7793: Reduce size of thermal registers Reduce size of thermal registers in DT for r8a7793 (R-Car M3-N) SoC. According to the "User's Manual: Hardware" v2.00 the registers at base 0xe61f0000 extend to an offset of 0x10, rather than 0x14 which is the case on the r8a73a4 (R-Mobile APE6). This should not have any runtime affect as mapping granularity is PAGE_SIZE. Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7793.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f599906744ecc2ece7ed0418a5822348000c0e2 Author: Simon Horman Date: Wed Dec 20 13:14:44 2017 +0100 ARM: dts: r8a7791: Reduce size of thermal registers Reduce size of thermal registers in DT for r8a7791 (R-Car M3-W) SoC. According to the "User's Manual: Hardware" v2.00 the registers at base 0xe61f0000 extend to an offset of 0x10, rather than 0x14 which is the case on the r8a73a4 (R-Mobile APE6). This should not have any runtime affect as mapping granularity is PAGE_SIZE. Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61ad2b1ab4b1ce4e495854c4faa75ca95e5e8ecd Author: Simon Horman Date: Wed Dec 20 13:14:43 2017 +0100 ARM: dts: r8a7790: Reduce size of thermal registers Reduce size of thermal registers in DT for r8a7790 (R-Car H2) SoC. According to the "User's Manual: Hardware" v2.00 the registers at base 0xe61f0000 extend to an offset of 0x10, rather than 0x14 which is the case on the r8a73a4 (R-Mobile APE6). This should not have any runtime affect as mapping granularity is PAGE_SIZE. Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d7b619e16d420b723d6618c60a0aaf0ba4e3666 Author: Sergei Shtylyov Date: Fri Feb 2 21:27:01 2018 +0300 soc: renesas: rcar-rst: add R8A77980 support Add support for R-Car V3H (R8A77980) to the R-Car RST driver -- this driver is needed for the clock driver to work. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman Documentation/devicetree/bindings/reset/renesas,rst.txt | 1 + drivers/soc/renesas/Kconfig | 2 +- drivers/soc/renesas/rcar-rst.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 8447756d1e582a401cdae33c9ed5d68fdb6e0410 Author: Sergei Shtylyov Date: Fri Feb 2 21:22:14 2018 +0300 soc: renesas: identify R-Car V3H Add support for identifying the R-Car V3H (R8A77980) SoC. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman drivers/soc/renesas/renesas-soc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 707aa45d2612778e2f3b6c5e1950ed9fa48974aa Author: Geert Uytterhoeven Date: Tue Dec 19 16:54:44 2017 +0100 soc: renesas: rcar-sysc: Mark rcar_sysc_matches[] __initconst rcar_sysc_matches[] is used only by rcar_sysc_pd_init(), which is __init. Hence mark rcar_sysc_matches[] __initconst. This frees another 1764 bytes (arm32/shmobile_defconfig) or 1000 bytes (arm64/renesas_defconfig) of memory after kernel init. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman drivers/soc/renesas/rcar-sysc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db4cb3d04eba91db48da0032c44b83ed7185973c Author: Katsuhiro Suzuki Date: Fri Jan 19 18:25:33 2018 +0900 ASoC: uniphier: add support for UniPhier LD11/LD20 AIO driver This patch adds support for UniPhier AIO sound driver which is included in UniPhier LD11/LD20 SoCs. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown sound/soc/uniphier/Kconfig | 11 ++ sound/soc/uniphier/Makefile | 2 + sound/soc/uniphier/aio-ld11.c | 431 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 444 insertions(+) commit e98131222ff931a670739cede00d1fb9d6f83763 Author: Katsuhiro Suzuki Date: Fri Jan 19 18:25:32 2018 +0900 ASoC: uniphier: add support for UniPhier AIO compress audio This patch adds support of UniPhier AIO compress audio. For passing through compress audio to S/PDIF. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown sound/soc/uniphier/Kconfig | 1 + sound/soc/uniphier/Makefile | 2 +- sound/soc/uniphier/aio-compress.c | 440 ++++++++++++++++++++++++++++++++++++++ sound/soc/uniphier/aio-dma.c | 1 + sound/soc/uniphier/aio.h | 1 + 5 files changed, 444 insertions(+), 1 deletion(-) commit 139a342002330e2e9730a564766ec04bd028d511 Author: Katsuhiro Suzuki Date: Fri Jan 19 18:25:31 2018 +0900 ASoC: uniphier: add support for UniPhier AIO CPU DAI driver This patch adds CPU DAI driver for UniPhier AIO audio sound system. This module provides PCM devices for all input/output port of AIO such as I2S, S/PDIF. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown sound/soc/uniphier/Makefile | 2 +- sound/soc/uniphier/aio-cpu.c | 570 +++++++++++++++++++++++++++++++++++++++++++ sound/soc/uniphier/aio.h | 9 + 3 files changed, 580 insertions(+), 1 deletion(-) commit caa3e443aef6308abfe0710e8d8f602a75bed0ed Author: Katsuhiro Suzuki Date: Fri Jan 19 18:25:30 2018 +0900 ASoC: uniphier: add support for UniPhier AIO DMA driver This patch adds supports for UniPhier AIO DMA. This module shared register area with all sound devices for I2S, S/PDIF and so on. Since the AIO has mixed register map for those I/Os, it is hard to split register areas for each sound devices. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown sound/soc/uniphier/Makefile | 2 +- sound/soc/uniphier/aio-dma.c | 317 +++++++++++++++++++++++++++++++++++++++++++ sound/soc/uniphier/aio.h | 2 + 3 files changed, 320 insertions(+), 1 deletion(-) commit f37fe2f9987b0460f25a87b1380f8e97a5959121 Author: Katsuhiro Suzuki Date: Fri Jan 19 18:25:29 2018 +0900 ASoC: uniphier: add support for UniPhier AIO common driver This patch adds common functions for UniPhier AIO audio sound system. This provides commonly used APIs for input/output control registers for UniPhier AIO. This module provides all sound devices for I2S, S/PDIF and so on. Since the AIO has mixed register map for those I/Os, it is hard to split register areas for each sound devices. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown sound/soc/uniphier/Kconfig | 10 + sound/soc/uniphier/Makefile | 4 + sound/soc/uniphier/aio-core.c | 1104 +++++++++++++++++++++++++++++++++++++++++ sound/soc/uniphier/aio-reg.h | 462 +++++++++++++++++ sound/soc/uniphier/aio.h | 343 +++++++++++++ 5 files changed, 1923 insertions(+) commit 28fb53de064b24eed55540ddeccab517e4babca3 Author: Katsuhiro Suzuki Date: Fri Jan 19 18:25:28 2018 +0900 ASoC: uniphier: add DT bindings documentation for UniPhier AIO This patch adds DT binding documentation for UniPhier AIO audio subsystem. Acked-by: Rob Herring Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown .../devicetree/bindings/sound/uniphier,aio.txt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 0dbe4ea78d69756efeb0bba0764f6bd4a9ee9567 Author: Rafał Miłecki Date: Tue Jan 16 16:45:42 2018 +0100 mtd: get rid of the mtd_add_device_partitions() This simplifies code a bit by: 1) Avoiding an extra (tiny) function 2) Checking for amount of parsed (found) partitions just once 3) Avoiding clearing/filling struct mtd_partitions manually With this commit proper functions are called directly from the mtd_device_parse_register(). It doesn't need to use minor tricks like memsetting struct to 0 to trigger an expected mtd_add_device_partitions() behavior. Signed-off-by: Rafał Miłecki Signed-off-by: Boris Brezillon drivers/mtd/mtdcore.c | 43 ++++++++++++------------------------------- 1 file changed, 12 insertions(+), 31 deletions(-) commit 2c77c57d22adb05b21cdb333a0c42bdfa0e19835 Author: Rafał Miłecki Date: Tue Jan 16 16:45:41 2018 +0100 mtd: move code adding master MTD out of mtd_add_device_partitions() This change is a small cleanup of mtd_device_parse_register(). When using MTD_PARTITIONED_MASTER it makes sure a master MTD is registered before dealing with partitions. The advantage of this is not mixing code handling master MTD with code handling partitions. This commit doesn't change any behavior except from a slightly different failure code path. The new code may need to call del_mtd_device when something goes wrong. Signed-off-by: Rafał Miłecki Signed-off-by: Boris Brezillon drivers/mtd/mtdcore.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 4bb83cf0a034cbe83c413a69705d315f5660bdb9 Author: Kuninori Morimoto Date: Mon Jan 29 04:11:56 2018 +0000 ASoC: adau1701: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/adau1701.c | 101 ++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 55 deletions(-) commit 30966861a7a2051457be8c49466887d78cc47e97 Author: Christophe JAILLET Date: Fri Jan 26 23:13:44 2018 +0100 regulator: of: Add a missing 'of_node_put()' in an error handling path of 'of_regulator_match()' If an unlikely failure in 'of_get_regulator_init_data()' occurs, we must release the reference on the current 'child' node before returning. Signed-off-by: Christophe JAILLET Signed-off-by: Mark Brown drivers/regulator/of_regulator.c | 1 + 1 file changed, 1 insertion(+) commit 037002b14b7ae217aa79b260228ba51afc516a8c Author: olivier moysan Date: Wed Jan 31 17:47:03 2018 +0100 ASoC: stm32: spdifrx: Use default dai name Use dai name provided by framework from dev_name() function. Signed-off-by: olivier moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_spdifrx.c | 1 - 1 file changed, 1 deletion(-) commit b9aa4716281247960e009dd55c38bcc4c2e4cb94 Author: olivier moysan Date: Wed Jan 31 17:47:02 2018 +0100 ASoC: stm32: spdifrx: fix typo in function name. Fix function name prefix for naming consistency. Signed-off-by: olivier moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_spdifrx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3cc7b0e35745ae4e153f174038df34a79a385b32 Author: Jarkko Nikula Date: Thu Feb 1 17:17:30 2018 +0200 spi: pxa2xx: Convert to generalized SPI controller API Convert to generalized SPI controller API introduced by the commit 8caab75fd2c2 ("spi: Generalize SPI "master" to "controller""). Inside driver variable name "master" is still used to indicate the driver is master only. While at it, change "unsigned cs" to "unsigned int cs" in pxa2xx_spi_fw_translate_cs() to suppress checkpatch warning. Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx-dma.c | 4 ++-- drivers/spi/spi-pxa2xx.c | 40 ++++++++++++++++++++++------------------ drivers/spi/spi-pxa2xx.h | 2 +- 3 files changed, 25 insertions(+), 21 deletions(-) commit 721483e28889431426a15fe906f48aacd17f0999 Author: Jarkko Nikula Date: Thu Feb 1 17:17:29 2018 +0200 spi: dw: Convert to generalized SPI controller API Convert to generalized SPI controller API introduced by the commit 8caab75fd2c2 ("spi: Generalize SPI "master" to "controller""). Inside driver variable name "master" is still used to indicate the driver is master only. Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown drivers/spi/spi-dw-mid.c | 6 +++--- drivers/spi/spi-dw.c | 26 +++++++++++++------------- drivers/spi/spi-dw.h | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) commit 6b49087912e311bc884d36874592595508630b88 Author: Martin Hundebøll Date: Thu Feb 1 11:09:41 2018 +0100 ASoC: soc-core: remove error due to probe deferral Deferred probes shouldn't cause error messages in the boot log, so change the dev_err() to the more harmless dev_info(). Signed-off-by: Martin Hundebøll Signed-off-by: Mark Brown sound/soc/soc-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 20ebbd2f89a9b2c61c4d432aa1156fc09e37f37c Author: Bard Liao Date: Mon Jan 29 19:15:38 2018 +0800 ASoC: rt5665: remove rt5668 support Remove rt5668 support from rt5665 codec driver since rt5668 will not go into mass production. Signed-off-by: Bard Liao Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rt5665.txt | 4 ++-- sound/soc/codecs/rt5665.c | 5 ----- sound/soc/codecs/rt5665.h | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) commit e0b9f3aa45fcfce1873503e5ff85d919697427cb Author: Corentin Labbe Date: Mon Jan 29 12:28:54 2018 +0000 ASoC: sn95031: remove dead makefile about sn95031 All sn95031 stuff was removed in commit 987da3fe1759 ("ASoC: sn95031: remove this code") Since SND_SOC_SN95031 was gone, remove makefile about it. Signed-off-by: Corentin Labbe Signed-off-by: Mark Brown sound/soc/codecs/Makefile | 1 - 1 file changed, 1 deletion(-) commit beff23ff26db0c1df2eaabc0dfe877bcbf05f6db Author: Corentin Labbe Date: Mon Jan 29 12:26:16 2018 +0000 ASoC: samsung: clean makefile about inexistant files Clean makefile rules about inexistant files. Thoses files were removed in commit a076d418235f ("ASoC: samsung: Drop AC97 drivers") Signed-off-by: Corentin Labbe Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mark Brown sound/soc/samsung/Makefile | 3 --- 1 file changed, 3 deletions(-) commit 03a0ddeda7ebafea8e99078581a50d856e3587a4 Author: Kuninori Morimoto Date: Mon Jan 29 02:58:01 2018 +0000 ASoC: soc-utils: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-utils.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 66bf428e555cdbf77c5a9cffefd8fca4af76ce9d Author: Kuninori Morimoto Date: Mon Jan 29 02:51:58 2018 +0000 ASoC: stm: stm32_adfsdm: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/stm/stm32_adfsdm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f1b5bf07365d4d6599ce90f49ef96dd8833fbd90 Author: Kuninori Morimoto Date: Mon Jan 29 02:51:42 2018 +0000 ASoC: mt2701/mt8173: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Tested-by: Garlic Tseng Signed-off-by: Mark Brown sound/soc/mediatek/common/mtk-afe-fe-dai.c | 16 ++++--- .../soc/mediatek/common/mtk-afe-platform-driver.c | 9 ++-- .../soc/mediatek/common/mtk-afe-platform-driver.h | 3 +- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 50 ++++++++++++++-------- sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 42 ++++++++++-------- 5 files changed, 73 insertions(+), 47 deletions(-) commit e049cf4e6adcb14e34c37123a67158a7e671d000 Author: Kuninori Morimoto Date: Mon Jan 29 02:51:26 2018 +0000 ASoC: txx9aclc: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/txx9/txx9aclc.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit bab9dc53d5bfbfa057e02c5edd97787829ee0b31 Author: Kuninori Morimoto Date: Mon Jan 29 02:51:09 2018 +0000 ASoC: nuc900-pcm: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/nuc900/nuc900-pcm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 781a9fcccae535d3f46cd05177366c7e67aa01ef Author: Kuninori Morimoto Date: Mon Jan 29 02:50:54 2018 +0000 ASoC: au1x: dma: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/au1x/dma.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit abf33c7a536f97b78cce6d016768af2253810a15 Author: Kuninori Morimoto Date: Mon Jan 29 02:50:37 2018 +0000 ASoC: au1x: dbdma2: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/au1x/dbdma2.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 703c13e447f84a7ed8315938719540ea05ad5045 Author: Kuninori Morimoto Date: Mon Jan 29 02:50:19 2018 +0000 ASoC: omap-pcm: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/omap/omap-pcm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit abd5ef092aeec03e5c3ce8b20945c6df634b3726 Author: Kuninori Morimoto Date: Mon Jan 29 02:50:02 2018 +0000 ASoC: blackfin: bf5xx-i2s-pcm: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/blackfin/bf5xx-i2s-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 825f90183bdb6cf02a818a699137191806e088a2 Author: Kuninori Morimoto Date: Mon Jan 29 02:49:43 2018 +0000 ASoC: blackfin: bf5xx-ac97-pcm: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/blackfin/bf5xx-ac97-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 80f23c295b0bb64a65cd19aa5f09104d21bfa165 Author: Kuninori Morimoto Date: Mon Jan 29 02:49:25 2018 +0000 ASoC: xtfpga-i2s: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/xtensa/xtfpga-i2s.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 17d619da7b4e6ee2b5b54a9e3e321679963afa4d Author: Kuninori Morimoto Date: Mon Jan 29 02:49:08 2018 +0000 ASoC: samsung: idma: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/idma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 121de3b4bee60a817aee2e61df26108ccd6dd6c6 Author: Kuninori Morimoto Date: Mon Jan 29 02:48:52 2018 +0000 ASoC: qcom: lpass-platform: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/qcom/lpass-platform.c | 42 ++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit 0717e66f404123be9c58d8a6559e975acc17fcdd Author: Kuninori Morimoto Date: Mon Jan 29 02:48:35 2018 +0000 ASoC: pxa: pxa2xx: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/pxa2xx-pcm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 797d16971a2a4fc3aafc4e5ff13c7ebfae4bf91b Author: Kuninori Morimoto Date: Mon Jan 29 02:48:18 2018 +0000 ASoC: pxa: mmp: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/mmp-pcm.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit f98fc0f8154ed17a00a588f1a95f02cb3e33b0d0 Author: Kuninori Morimoto Date: Mon Jan 29 02:48:03 2018 +0000 ASoC: kirkwood: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/kirkwood/kirkwood-dma.c | 3 ++- sound/soc/kirkwood/kirkwood-i2s.c | 20 ++------------------ sound/soc/kirkwood/kirkwood.h | 4 +++- 3 files changed, 7 insertions(+), 20 deletions(-) commit ddce03ceea3c84bbfca6f465853b543b32184ec2 Author: Kuninori Morimoto Date: Mon Jan 29 02:47:38 2018 +0000 ASoC: dwc-pcm: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/dwc/dwc-pcm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 60bceb8029e26c49549a276d5d67198cdfb57b5d Author: Kuninori Morimoto Date: Mon Jan 29 02:47:19 2018 +0000 ASoC: fsl: mpc5200: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/mpc5200_dma.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 1d0a01f2d4051bc62ba5e0d73ed99272414045ba Author: Kuninori Morimoto Date: Mon Jan 29 02:47:02 2018 +0000 ASoC: fsl: imx: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/imx-pcm-fiq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7f1106616ab634c6b827ce7abf1331a2a817de40 Author: Kuninori Morimoto Date: Mon Jan 29 02:46:46 2018 +0000 ASoC: fsl: asrc: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Tested-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc.c | 10 ---------- sound/soc/fsl/fsl_asrc.h | 3 ++- sound/soc/fsl/fsl_asrc_dma.c | 14 +++++++++----- 3 files changed, 11 insertions(+), 16 deletions(-) commit 4cb1ea925e66a2a04bcaf880f62bce425ddb9f94 Author: Kuninori Morimoto Date: Mon Jan 29 02:46:22 2018 +0000 ASoC: fsl: dma: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/fsl_dma.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit a49cb31cc7c84eab032c790df476f57ad14c8eeb Author: Kuninori Morimoto Date: Mon Jan 29 02:46:04 2018 +0000 ASoC: davinci-i2s: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/davinci/davinci-i2s.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit a20863256f88513b3ba97484179911c2b9aa5dfd Author: Kuninori Morimoto Date: Mon Jan 29 02:45:48 2018 +0000 ASoC: wm5102: replace platform to component Now platform can be replaced to component, let's do it. This patch merges wm5102_compr_platform into soc_codec_dev_wm5102 Signed-off-by: Kuninori Morimoto Acked-by: Charles Keepax Tested-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm5102.c | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) commit 0a2b051bf63916a5f567cbdbeb86b1da6e28c4d2 Author: Kuninori Morimoto Date: Mon Jan 29 02:45:30 2018 +0000 ASoC: wm5110: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Acked-by: Charles Keepax Tested-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm5110.c | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) commit 9fe3b2bac02c6d06724d526b0245568bca49349f Author: Kuninori Morimoto Date: Mon Jan 29 02:45:13 2018 +0000 ASoC: rt5514-spi: replace platform to component Now platform can be replaced to component, let's do it. This patch merges rt5514_spi_dai_component into rt5514_spi_component Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5514-spi.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) commit 48102b0426f6d134ebd9f2624d5d42d9e7a8a9fd Author: Kuninori Morimoto Date: Mon Jan 29 02:44:44 2018 +0000 ASoC: cs47l24: replace platform to component Now platform can be replaced to component, let's do it. This patch merges cs47l24_compr_platform into soc_codec_dev_cs47l24 Signed-off-by: Kuninori Morimoto Acked-by: Charles Keepax Tested-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/cs47l24.c | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) commit a1042a42bc5cc03969be40521c0e163be187ec8f Author: Kuninori Morimoto Date: Mon Jan 29 02:44:23 2018 +0000 ASoC: amd: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Tested-by: Mukunda,Vijendar Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 6dea9df84aa2c2c1c645fac933adf1c4e0c20ac7 Author: Kuninori Morimoto Date: Mon Jan 29 02:44:05 2018 +0000 ASoC: atmel: replace platform to component Now platform can be replaced to component, let's do it. To avoid complex operation, this patch adds device pointer to atmel_classd. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/atmel-classd.c | 4 +++- sound/soc/atmel/atmel-pcm-pdc.c | 6 +++--- sound/soc/atmel/atmel-pdmic.c | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) commit be3eabe99803b2526f8829b7c7225763f0703b1f Author: Kuninori Morimoto Date: Mon Jan 29 02:43:45 2018 +0000 ASoC: sh: siu: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/siu.h | 2 +- sound/soc/sh/siu_dai.c | 10 +--------- sound/soc/sh/siu_pcm.c | 9 ++++++--- 3 files changed, 8 insertions(+), 13 deletions(-) commit f5a82fa6016ad1c2a3f45a4d44eab2ac48daf130 Author: Kuninori Morimoto Date: Mon Jan 29 02:43:26 2018 +0000 ASoC: sh: fsi: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/fsi.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) commit eb5d510c869b95d3e219d4b01156f9095ec162f6 Author: Kuninori Morimoto Date: Mon Jan 29 02:43:10 2018 +0000 ASoC: sh: dma-sh7760: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/dma-sh7760.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 019ea01b7c510803d2f1ca8315916084887463c9 Author: Kuninori Morimoto Date: Mon Jan 29 02:42:53 2018 +0000 ASoC: sh: rsnd: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit 540b925af4c0456adf220dea991d91bf05ad77c0 Author: Kuninori Morimoto Date: Mon Jan 29 02:42:37 2018 +0000 ASoC: bcm: cygnus: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/bcm/cygnus-pcm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2ee178dbeb3974676b23751d602f79cc276f46e4 Author: Kuninori Morimoto Date: Mon Jan 29 02:42:21 2018 +0000 ASoC: intel: haswell: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/bdw-rt5677.c | 3 +- sound/soc/intel/boards/broadwell.c | 3 +- sound/soc/intel/boards/haswell.c | 3 +- sound/soc/intel/haswell/sst-haswell-ipc.h | 2 + sound/soc/intel/haswell/sst-haswell-pcm.c | 118 +++++++++++++----------------- 5 files changed, 60 insertions(+), 69 deletions(-) commit 81dc5f3d806ad50283b4b58abebd08ef65817f87 Author: Kuninori Morimoto Date: Mon Jan 29 02:42:02 2018 +0000 ASoC: intel: baytrail: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/baytrail/sst-baytrail-pcm.c | 66 +++++++++++------------------ 1 file changed, 25 insertions(+), 41 deletions(-) commit 56b03b4c4f5e8e1a44328b2df75bfb31fc4c3609 Author: Kuninori Morimoto Date: Mon Jan 29 02:41:43 2018 +0000 ASoC: intel: skylake: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Tested-by: "Kp, Jeeja" Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-debug.c | 2 +- sound/soc/intel/skylake/skl-pcm.c | 52 ++++++++++++---------------------- sound/soc/intel/skylake/skl-topology.c | 26 ++++++++--------- sound/soc/intel/skylake/skl-topology.h | 2 +- sound/soc/intel/skylake/skl.h | 2 +- 5 files changed, 34 insertions(+), 50 deletions(-) commit 6840962b0a19c2716f01f4274f24e153c8ca045c Author: Kuninori Morimoto Date: Mon Jan 29 02:41:28 2018 +0000 ASoC: intel: atom: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Tested-by: "Kp, Jeeja" Signed-off-by: Mark Brown sound/soc/intel/atom/sst-atom-controls.c | 36 +++++++++++------------ sound/soc/intel/atom/sst-mfld-platform-compress.c | 4 +-- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 32 ++++++-------------- sound/soc/intel/atom/sst-mfld-platform.h | 4 ++- 4 files changed, 32 insertions(+), 44 deletions(-) commit be7ee5f32a9a4eba881d18e85d58e9a03a9cca99 Author: Kuninori Morimoto Date: Mon Jan 29 02:41:09 2018 +0000 ASoC: soc-generic-dmaengine-pcm: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/dmaengine_pcm.h | 2 ++ sound/soc/soc-generic-dmaengine-pcm.c | 55 +++++++++++++++++++++-------------- 2 files changed, 35 insertions(+), 22 deletions(-) commit 2d59ebd3e2531c48298e7bee6e621e04fccc4a72 Author: Kuninori Morimoto Date: Mon Jan 29 02:40:52 2018 +0000 ASoC: soc-utils: replace platform to component Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bbf4d71aa9e21e8ee05e16cbb2cd2999252ce930 Author: Kuninori Morimoto Date: Mon Jan 29 02:40:28 2018 +0000 ASoC: remove rtd->platform checck Now, we are ready to replace rtd->platform to rtdcom list. From this patch, rtd->platform check is no longer needed. It will be replaced into rtdcom. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 5 ----- 1 file changed, 5 deletions(-) commit 00a6941c841205fbdade825219a828c81008149b Author: Kuninori Morimoto Date: Mon Jan 29 03:12:21 2018 +0000 ASoC: wm8993/wm8994/wm8958: replace codec to component Now we can replace Codec to Component. Let's do it. Becase wm8993/wm8994/wm8958 are using wm_hubs feature, we need to update these all related drivers in same time. Otherwise compile error/warning happen wm8993: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 wm8994: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8958-dsp2.c | 278 +++++++------- sound/soc/codecs/wm8993.c | 237 ++++++------ sound/soc/codecs/wm8994.c | 810 +++++++++++++++++++++-------------------- sound/soc/codecs/wm8994.h | 8 +- sound/soc/codecs/wm_hubs.c | 254 ++++++------- sound/soc/codecs/wm_hubs.h | 18 +- sound/soc/samsung/littlemill.c | 8 +- 7 files changed, 809 insertions(+), 804 deletions(-) commit 79223bf190919199652441d9f455cb0deabc75f5 Author: Kuninori Morimoto Date: Mon Jan 29 03:49:31 2018 +0000 ASoC: rt5645/rt5677: replace codec to component Now we can replace Codec to Component. Let's do it. Because Intel/Mediatek platforms are using rt5645/rt5677, we need to update these all related drivers in same time. Otherwise compile error/warning happen rt5645: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 rt5677: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/amd/acp-rt5645.c | 4 +- sound/soc/codecs/rt5645.c | 370 +++++++++++------------ sound/soc/codecs/rt5645.h | 4 +- sound/soc/codecs/rt5677.c | 205 +++++++------ sound/soc/codecs/rt5677.h | 4 +- sound/soc/intel/boards/bdw-rt5677.c | 38 +-- sound/soc/intel/boards/cht_bsw_rt5645.c | 8 +- sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c | 6 +- sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c | 12 +- sound/soc/mediatek/mt8173/mt8173-rt5650.c | 12 +- sound/soc/rockchip/rockchip_rt5645.c | 8 +- 11 files changed, 331 insertions(+), 340 deletions(-) commit 4510112217116d97df02121d3e1442858efb4897 Author: Kuninori Morimoto Date: Mon Jan 29 04:36:54 2018 +0000 ASoC: hdac_hdmi/nau8825/rt286/rt298/rt5663/da7219: replace codec to component Now we can replace Codec to Component. Let's do it. Because intal/rockchip boards are using multi-codecs in 1 driver, we need to update these all related drivers in same time. Otherwise compile error/warning happen Note: hdac_hdmi xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 nau8825 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 rt286 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 rt298 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 rt5663 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 da7219 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/da7219-aad.c | 236 ++++---- sound/soc/codecs/da7219-aad.h | 12 +- sound/soc/codecs/da7219.c | 307 +++++------ sound/soc/codecs/da7219.h | 2 +- sound/soc/codecs/hdac_hdmi.c | 47 +- sound/soc/codecs/hdac_hdmi.h | 2 +- sound/soc/codecs/nau8825.c | 107 ++-- sound/soc/codecs/nau8825.h | 2 +- sound/soc/codecs/rt286.c | 198 ++++--- sound/soc/codecs/rt286.h | 2 +- sound/soc/codecs/rt298.c | 210 ++++---- sound/soc/codecs/rt298.h | 2 +- sound/soc/codecs/rt5663.c | 600 ++++++++++----------- sound/soc/codecs/rt5663.h | 4 +- sound/soc/intel/boards/broadwell.c | 14 +- sound/soc/intel/boards/bxt_da7219_max98357a.c | 12 +- sound/soc/intel/boards/bxt_rt298.c | 12 +- sound/soc/intel/boards/kbl_rt5663_max98927.c | 14 +- .../soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 14 +- sound/soc/intel/boards/skl_nau88l25_max98357a.c | 12 +- sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 12 +- sound/soc/intel/boards/skl_rt286.c | 12 +- sound/soc/rockchip/rk3399_gru_sound.c | 4 +- 23 files changed, 914 insertions(+), 923 deletions(-) commit 1e8ba922c0fca2586cc43a4884e071f8c5446e49 Author: Kuninori Morimoto Date: Mon Jan 29 04:27:39 2018 +0000 ASoC: atmel-classd: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/atmel-classd.c | 54 +++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 716c5223171e94a4dd28c6e8891b8ed9921c93a7 Author: Kuninori Morimoto Date: Mon Jan 29 04:27:08 2018 +0000 ASoC: atmel-pdmic: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/atmel-pdmic.c | 56 +++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit fbf3c936d8cfa7d754e5f782e26dd9caa4cba191 Author: Kuninori Morimoto Date: Mon Jan 29 04:48:04 2018 +0000 ASoC: tas6424: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tas6424.c | 99 ++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 51 deletions(-) commit c044cfdaf26866d5d31cb715d24fb75bf93ef703 Author: Kuninori Morimoto Date: Mon Jan 29 04:47:46 2018 +0000 ASoC: pcm186x: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/pcm186x-i2c.c | 8 --- sound/soc/codecs/pcm186x-spi.c | 8 --- sound/soc/codecs/pcm186x.c | 143 ++++++++++++++++++++--------------------- sound/soc/codecs/pcm186x.h | 1 - 4 files changed, 68 insertions(+), 92 deletions(-) commit f12df6614bee36c11ba0b3fb2d74b7d47b955434 Author: Kuninori Morimoto Date: Mon Jan 29 04:47:19 2018 +0000 ASoC: uniphier: evea: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/uniphier/evea.c | 67 +++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 34 deletions(-) commit 7c8d90592165601fc7f133e72f06d7348d476579 Author: Kuninori Morimoto Date: Mon Jan 29 04:46:16 2018 +0000 ASoC: ics43432: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ics43432.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 2ab7fb08fb0bd24841bd05a4e51a44b4672b34f9 Author: Kuninori Morimoto Date: Mon Jan 29 04:45:43 2018 +0000 ASoC: uda134x: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/uda134x.c | 78 +++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 42 deletions(-) commit 8fcfe24c2345678000fab25bbd214025becf1154 Author: Kuninori Morimoto Date: Mon Jan 29 04:45:14 2018 +0000 ASoC: si476x: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/si476x.c | 42 +++++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 23 deletions(-) commit a9886cd02af5df2a93af178123194bf638cead03 Author: Kuninori Morimoto Date: Mon Jan 29 04:44:35 2018 +0000 ASoC: ml26124: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ml26124.c | 103 +++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 54 deletions(-) commit b40822d9e8bc7fe43de1c68ab3ea5a485ba6a4fa Author: Kuninori Morimoto Date: Mon Jan 29 04:44:09 2018 +0000 ASoC: uda1380: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/uda1380.c | 160 ++++++++++++++++++++++----------------------- 1 file changed, 77 insertions(+), 83 deletions(-) commit b48e6ef3a1db8527d0c99e578f3dd3ee40a2d573 Author: Kuninori Morimoto Date: Mon Jan 29 04:43:36 2018 +0000 ASoC: jz4740: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/jz4740.c | 50 +++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) commit 4f404f38c92b13815722dd6e808dde24cd65eed5 Author: Kuninori Morimoto Date: Mon Jan 29 04:42:49 2018 +0000 ASoC: cq93vc: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cq93vc.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit f5d5240e087556991b6f33eca6124f3b8f9da703 Author: Kuninori Morimoto Date: Mon Jan 29 04:42:27 2018 +0000 ASoC: lm49453: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/lm49453.c | 65 +++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 33 deletions(-) commit 8dc906d3ae088668ab9c0f4e0fa2314a8cd8fcaa Author: Kuninori Morimoto Date: Mon Jan 29 04:42:01 2018 +0000 ASoC: pistachio: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/img/pistachio-internal-dac.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 5783994b9afa8d37e9766b3cfbb594c1ae26087c Author: Kuninori Morimoto Date: Mon Jan 29 04:41:42 2018 +0000 ASoC: 88pm860x: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/88pm860x-codec.c | 166 +++++++++++++++++++------------------- sound/soc/codecs/88pm860x-codec.h | 4 +- sound/soc/pxa/ttc-dkb.c | 6 +- 3 files changed, 88 insertions(+), 88 deletions(-) commit 993709b83cb1276614974b25f130b8a73215e196 Author: Kuninori Morimoto Date: Mon Jan 29 04:41:22 2018 +0000 ASoC: gtm601: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/gtm601.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit 049c1bfc30f3a5c09dcb83f2edb8c3707fdb17fd Author: Kuninori Morimoto Date: Mon Jan 29 04:40:56 2018 +0000 ASoC: sti-sas: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/sti-sas.c | 84 ++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 44 deletions(-) commit 6d6c3946d877adf1e73c6292f947bbb687452ed5 Author: Kuninori Morimoto Date: Mon Jan 29 04:40:29 2018 +0000 ASoC: dmic: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/dmic.c | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) commit 064f6682f93898d55e6024a536dc1fad3843fa12 Author: Kuninori Morimoto Date: Mon Jan 29 04:39:54 2018 +0000 ASoC: tfa9879: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tfa9879.c | 50 ++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) commit f572634c90586fb5426d514e7c584b0b6b5028c0 Author: Kuninori Morimoto Date: Mon Jan 29 04:39:30 2018 +0000 ASoC: isabelle: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/isabelle.c | 57 ++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 32 deletions(-) commit 40aa60a2e9ab5242593101bb6270563ee5acdf46 Author: Kuninori Morimoto Date: Mon Jan 29 04:39:10 2018 +0000 ASoC: inno_rk3036: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/inno_rk3036.c | 70 +++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit 4218bcf3e7572891eebed3389e2a9f004ff6d2b6 Author: Kuninori Morimoto Date: Mon Jan 29 04:38:39 2018 +0000 ASoC: sirf-audio: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/sirf-audio-codec.c | 58 ++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 30 deletions(-) commit 2f8b31880008c3c2f8401fe5de51288456db9c1a Author: Kuninori Morimoto Date: Mon Jan 29 04:37:53 2018 +0000 ASoC: sgtl5000: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/sgtl5000.c | 173 +++++++++++++++++++++----------------------- 1 file changed, 84 insertions(+), 89 deletions(-) commit 78c97ec04b108d3fff70526e6bdb5bc2ebebe4bd Author: Kuninori Morimoto Date: Mon Jan 29 04:37:36 2018 +0000 ASoC: mc13783: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/mc13783.c | 68 ++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 35 deletions(-) commit 74d00d28a15c8452f65de0a9477b52d95639cc63 Author: Chris Wilson Date: Mon Feb 12 09:39:28 2018 +0000 drm/i915: Don't wake the device up to check if the engine is asleep If the entire device is powered off, we can safely assume that the engine is also asleep (and idle). Reported-by: Tvrtko Ursulin Fixes: a091d4ee931b ("drm/i915: Hold a wakeref for probing the ring registers") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180212093928.6005-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_engine_cs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e6e620f0e15e3bc4b3bc3078c9f3285830f2fd3c Author: Boris Brezillon Date: Mon Jan 22 10:38:01 2018 +0100 mtd: Make sure the device supports erase operations in mtd_erase() Some devices do not implement ->_erase() or have an invalid ->erasesize value. In this case, mtd_erase() should return -ENOTSUPP. Note that the test is not done on the MTD_NO_ERASE flag because this flag means 'erasing a block before writing to it is unnecessary', not 'the erase operation is not supported'. Actually, some drivers are setting the MTD_NO_ERASE flag but still implementing the ->_erase() hook and setting a valid ->erasesize value. Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/mtdcore.c | 4 ++++ 1 file changed, 4 insertions(+) commit ad5169070713cee0be9f533a8f39b2903b7833d8 Author: Chris Wilson Date: Fri Feb 9 11:40:56 2018 +0000 drm/i915: Move the final intel_gpu_reset() to after declaring wedged If we fail to reset the GPU (i915_reset()), we do one final intel_gpu_reset() attempt as we mark the device wedged. The idea here is even though the GPU has proven unreliable (and so we want to stop using it for the time being), we don't want it spinning away in the background whilst the driver idles so we try to reset it one more time. However, we want to dump the i915_gem_set_wedged() debugging info before we do, so that we can see the accurate state of the GPU when it failed. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180209114056.9957-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3bf4e03d199f7f2871919e33e7bfc6e3d4c3368f Author: Ladislav Michl Date: Wed Jan 17 20:48:54 2018 +0100 power: supply: ltc2941-battery-gauge: Add charge empty and full properties Add properties for charge empty and charge full thresholds. Signed-off-by: Ladislav Michl Signed-off-by: Sebastian Reichel drivers/power/supply/ltc2941-battery-gauge.c | 59 +++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 9 deletions(-) commit 6ab739bc1d00bfd10ed87a2f1fdc00ebdc0d7ff1 Author: Alexandre Belloni Date: Tue Jan 16 11:12:35 2018 +0100 power: reset: Add a driver for the Microsemi Ocelot reset The Microsemi Ocelot SoC has a register allowing to reset the MIPS core. Unfortunately, the syscon-reboot driver can't be used directly (but almost) as the reset control may be disabled using another register. Cc: linux-pm@vger.kernel.org Signed-off-by: Alexandre Belloni Signed-off-by: Sebastian Reichel drivers/power/reset/Kconfig | 7 +++ drivers/power/reset/Makefile | 1 + drivers/power/reset/ocelot-reset.c | 88 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+) commit 5e195f120138a7ab8245a5e64296c16f8e48527f Author: Alexandre Belloni Date: Tue Jan 16 11:12:34 2018 +0100 dt-bindings: power: reset: Document ocelot-reset binding Add binding documentation for the Microsemi Ocelot reset block. Cc: devicetree@vger.kernel.org Cc: linux-pm@vger.kernel.org Signed-off-by: Alexandre Belloni Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel .../devicetree/bindings/power/reset/ocelot-reset.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 559ab3977633e5822712c6f44bd06e7f3200f9fe Author: Kuninori Morimoto Date: Mon Jan 29 04:36:21 2018 +0000 ASoC: wl1273: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wl1273.c | 93 +++++++++++++++++++++++------------------------ sound/soc/codecs/wl1273.h | 2 +- 2 files changed, 47 insertions(+), 48 deletions(-) commit 755d440bcfdf5ff38a14a326d6dd78126466ef1f Author: Kuninori Morimoto Date: Mon Jan 29 04:35:34 2018 +0000 ASoC: zx_aud96p22: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/zx_aud96p22.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 635b1c185ee9cae61a740264d09095a7d20c019a Author: Kuninori Morimoto Date: Mon Jan 29 04:35:04 2018 +0000 ASoC: vc4_hdmi: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown drivers/gpu/drm/vc4/vc4_hdmi.c | 47 ++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 32 deletions(-) commit 90e678d2e1a50b913f23a897851caa3d190690b1 Author: Kuninori Morimoto Date: Mon Jan 29 04:34:42 2018 +0000 ASoC: bt-sco: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/bt-sco.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit d20aa608f4244868139b0a25a8afc89c5a6bf422 Author: Kuninori Morimoto Date: Mon Jan 29 04:34:21 2018 +0000 ASoC: hdmi-codec: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit fd7c728de88eaea0d740b0d92ef73bbe8527a55d Author: Kuninori Morimoto Date: Mon Jan 29 04:34:01 2018 +0000 ASoC: alc5623: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/alc5623.c | 147 ++++++++++++++++++++++----------------------- 1 file changed, 72 insertions(+), 75 deletions(-) commit c778b7715f66c97f6b41077c72a16ad3553817ff Author: Kuninori Morimoto Date: Mon Jan 29 04:33:31 2018 +0000 ASoC: alc5632: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/alc5632.c | 138 ++++++++++++++++++++++----------------------- 1 file changed, 66 insertions(+), 72 deletions(-) commit da4ce5607149ace4bb61af4a4910bab1dcf20a19 Author: Kuninori Morimoto Date: Mon Jan 29 04:32:55 2018 +0000 ASoC: es8328: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/es8328-i2c.c | 7 -- sound/soc/codecs/es8328-spi.c | 7 -- sound/soc/codecs/es8328.c | 147 +++++++++++++++++++++--------------------- 3 files changed, 73 insertions(+), 88 deletions(-) commit 02009eea07c8d7f277f12400ba7dc8524dbf9498 Author: Kuninori Morimoto Date: Mon Jan 29 04:32:37 2018 +0000 ASoC: es7134: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/es7134.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 2ff52976788bae279d031632ad9c22df0f829fa2 Author: Kuninori Morimoto Date: Mon Jan 29 04:32:16 2018 +0000 ASoC: es8316: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/es8316.c | 80 +++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 44 deletions(-) commit 415bc3a0bfb26c934daa4a16a8a4f589c018bdaa Author: Kuninori Morimoto Date: Mon Jan 29 04:31:51 2018 +0000 ASoC: nau8540: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/nau8540.c | 79 +++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 43 deletions(-) commit 61cf1c47e479ca0905d5ae54c1aa93065f69bf3e Author: Kuninori Morimoto Date: Mon Jan 29 04:31:36 2018 +0000 ASoC: nau8810: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/nau8810.c | 73 +++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 40 deletions(-) commit 12a72f91a28eb302e1431ef0bb68b5f83e35a891 Author: Kuninori Morimoto Date: Mon Jan 29 04:31:19 2018 +0000 ASoC: nau8824: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/nau8824.c | 113 +++++++++++++++++++++------------------------ sound/soc/codecs/nau8824.h | 2 +- 2 files changed, 54 insertions(+), 61 deletions(-) commit 2be04bab74d8c2f6493af9da37098208cb2fc44f Author: Kuninori Morimoto Date: Mon Jan 29 04:31:00 2018 +0000 ASoC: tas571x: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tas571x.c | 55 +++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 28 deletions(-) commit 459bc024b7f2360f656b03562ec02ee5945bd033 Author: Kuninori Morimoto Date: Mon Jan 29 04:30:43 2018 +0000 ASoC: tas5086: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tas5086.c | 94 +++++++++++++++++++++++----------------------- 1 file changed, 47 insertions(+), 47 deletions(-) commit 895577874dc8340fbc7dca7402870d3f18d92109 Author: Kuninori Morimoto Date: Mon Jan 29 04:30:16 2018 +0000 ASoC: sta529: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/sta529.c | 69 +++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 38 deletions(-) commit ee18359078d017b066bd99efc6e071a3de782844 Author: Kuninori Morimoto Date: Mon Jan 29 04:29:57 2018 +0000 ASoC: sta32x: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/sta32x.c | 134 ++++++++++++++++++++++------------------------ 1 file changed, 64 insertions(+), 70 deletions(-) commit 1f6440c596fef81acfb1c2d7e64254449ab2e428 Author: Kuninori Morimoto Date: Mon Jan 29 04:29:31 2018 +0000 ASoC: sta350: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/sta350.c | 117 +++++++++++++++++++++++----------------------- 1 file changed, 58 insertions(+), 59 deletions(-) commit 17875fe49216b701fa08f0288ea19e608e3bb787 Author: Kuninori Morimoto Date: Mon Jan 29 04:29:08 2018 +0000 ASoC: ssm2518: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ssm2518.c | 57 ++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 32 deletions(-) commit ad4771ef9d45b8db72318d2cd85024bd7b5f5e95 Author: Kuninori Morimoto Date: Mon Jan 29 04:28:41 2018 +0000 ASoC: ssm2602: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ssm2602-i2c.c | 7 ---- sound/soc/codecs/ssm2602-spi.c | 7 ---- sound/soc/codecs/ssm2602.c | 77 +++++++++++++++++++++--------------------- 3 files changed, 39 insertions(+), 52 deletions(-) commit b63aecbdbcf393e13c71497edb6c8b772f11c773 Author: Kuninori Morimoto Date: Mon Jan 29 04:28:10 2018 +0000 ASoC: ssm4567: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ssm4567.c | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) commit 463c5f87a3af88ba81ed581860d445137a7ff01c Author: Kuninori Morimoto Date: Mon Jan 29 04:26:41 2018 +0000 ASoC: ad73311: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ad73311.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 683adc821182c148ce973c2cc0a9a508e26545ec Author: Kuninori Morimoto Date: Mon Jan 29 04:25:54 2018 +0000 ASoC: ad1836: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ad1836.c | 68 +++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 37 deletions(-) commit 89cea5c9a9f3dc487f39997801ff5191f2375369 Author: Kuninori Morimoto Date: Mon Jan 29 04:25:29 2018 +0000 ASoC: ad193x: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ad193x-i2c.c | 7 ------- sound/soc/codecs/ad193x-spi.c | 7 ------- sound/soc/codecs/ad193x.c | 46 ++++++++++++++++++++++--------------------- 3 files changed, 24 insertions(+), 36 deletions(-) commit aeb90fd2e1cbc17a336c8e76d8e75d57722de932 Author: Kuninori Morimoto Date: Mon Jan 29 04:25:12 2018 +0000 ASoC: ab8500: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ab8500-codec.c | 295 ++++++++++++++++++++-------------------- 1 file changed, 144 insertions(+), 151 deletions(-) commit 9310161754511c212dbb6728860376a5afcbbcc8 Author: Kuninori Morimoto Date: Mon Jan 29 04:24:44 2018 +0000 ASoC: ads117x: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ads117x.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 7ec9b872f975a7ab7a466fdb63da9509bc2c9085 Author: Kuninori Morimoto Date: Mon Jan 29 04:24:17 2018 +0000 ASoC: sun8i: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 77f4be16e6bf781e05a5ea95b98259c93ccf1fa2 Author: Kuninori Morimoto Date: Mon Jan 29 04:23:46 2018 +0000 ASoC: sun4i: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 71 ++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 34 deletions(-) commit 79a4ad1e0f4ae040daac3a7d7c6bddd3332d7baf Author: Kuninori Morimoto Date: Mon Jan 29 04:23:20 2018 +0000 ASoC: tas2552: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 1 -> .use_pmdown_time = 0 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tas2552.c | 178 ++++++++++++++++++++++----------------------- 1 file changed, 87 insertions(+), 91 deletions(-) commit a06919f517001a7bc746f4d5922d2cbac2b3d0c0 Author: Kuninori Morimoto Date: Mon Jan 29 04:23:00 2018 +0000 ASoC: tas5720: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tas5720.c | 151 +++++++++++++++++++++------------------------ 1 file changed, 70 insertions(+), 81 deletions(-) commit 8c6086b8b5e7e50519b6d439ec51ac06a956c656 Author: Kuninori Morimoto Date: Mon Jan 29 04:22:25 2018 +0000 ASoC: spdif_receiver: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/spdif_receiver.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 3860978c5bf48720d1bab68ffa49e153fb9c01e8 Author: Kuninori Morimoto Date: Mon Jan 29 04:21:55 2018 +0000 ASoC: spdif_transmitter: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/spdif_transmitter.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 2eec0a15e8d7e2a08acff56701cbd98e24a41097 Author: Kuninori Morimoto Date: Mon Jan 29 04:21:38 2018 +0000 ASoC: msm8916-wcd-digital: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/msm8916-wcd-digital.c | 115 +++++++++++++++++---------------- 1 file changed, 58 insertions(+), 57 deletions(-) commit 732ae454bdebdc2afa133150655277551a77ede4 Author: Kuninori Morimoto Date: Mon Jan 29 04:21:15 2018 +0000 ASoC: msm8916-wcd-analog: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/msm8916-wcd-analog.c | 207 +++++++++++++++++----------------- 1 file changed, 104 insertions(+), 103 deletions(-) commit c68e7f5ba4fad7962e193414ad55749cbc008a17 Author: Kuninori Morimoto Date: Mon Jan 29 04:20:49 2018 +0000 ASoC: twl4030: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/twl4030.c | 383 ++++++++++++++++++++++----------------------- 1 file changed, 187 insertions(+), 196 deletions(-) commit 7480389fb0d873ed78619542bf5d2717a7ad7786 Author: Kuninori Morimoto Date: Mon Jan 29 04:20:09 2018 +0000 ASoC: twl6040: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 1 -> .use_pmdown_time = 0 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/twl6040.c | 269 ++++++++++++++++++-------------------- sound/soc/codecs/twl6040.h | 10 +- sound/soc/omap/omap-abe-twl6040.c | 8 +- 3 files changed, 139 insertions(+), 148 deletions(-) commit 29751c1cdf3098380b44c52d2027dd3ba1baadf0 Author: Kuninori Morimoto Date: Mon Jan 29 04:19:39 2018 +0000 ASoC: pcm3168a: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/pcm3168a.c | 51 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 26 deletions(-) commit d5e90bad6faa0ea93a14f88aaae62fb58e968a0a Author: Kuninori Morimoto Date: Mon Jan 29 04:19:05 2018 +0000 ASoC: pcm5102a: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/pcm5102a.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 5bdef14a35bb99e792951113487043f95f579a05 Author: Kuninori Morimoto Date: Mon Jan 29 04:18:32 2018 +0000 ASoC: pcm512x: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/pcm512x.c | 162 ++++++++++++++++++++++----------------------- 1 file changed, 80 insertions(+), 82 deletions(-) commit 7dbbaa5180cb380ac28f023dda8663d8dd3b8b56 Author: Kuninori Morimoto Date: Mon Jan 29 04:18:12 2018 +0000 ASoC: pcm1681: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/pcm1681.c | 62 ++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 33 deletions(-) commit d66827daf16d8ceb46d985b2dc423f3c3136bce0 Author: Kuninori Morimoto Date: Mon Jan 29 04:17:53 2018 +0000 ASoC: pcm3008: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/pcm3008.c | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) commit db0a11d00220cf84bec2047fe698004813096926 Author: Kuninori Morimoto Date: Mon Jan 29 04:16:56 2018 +0000 ASoC: pcm179x: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Reviewed-by: Michael Trimarchi Signed-off-by: Mark Brown sound/soc/codecs/pcm179x-i2c.c | 6 ------ sound/soc/codecs/pcm179x-spi.c | 6 ------ sound/soc/codecs/pcm179x.c | 45 +++++++++++++++++++----------------------- sound/soc/codecs/pcm179x.h | 1 - 4 files changed, 20 insertions(+), 38 deletions(-) commit 4e46c228c793d1a537deb1d26ed31a9b0543a20f Author: Kuninori Morimoto Date: Mon Jan 29 04:16:23 2018 +0000 ASoC: tscs42xx: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tscs42xx.c | 222 +++++++++++++++++++++----------------------- 1 file changed, 108 insertions(+), 114 deletions(-) commit d0fdfe34080c64127b2e57525a84e3fb3cc29d87 Author: Kuninori Morimoto Date: Mon Jan 29 04:15:57 2018 +0000 ASoC: cx20442: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cx20442.c | 89 +++++++++++++++++++++------------------------- sound/soc/omap/ams-delta.c | 20 +++++------ 2 files changed, 51 insertions(+), 58 deletions(-) commit f2e6f95b4b1381fe81cdbdb70d2c50a85b770d8b Author: Kuninori Morimoto Date: Mon Jan 29 04:15:27 2018 +0000 ASoC: tlv320aic31xx: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic31xx.c | 240 +++++++++++++++++++-------------------- 1 file changed, 116 insertions(+), 124 deletions(-) commit b154dc5d7631c0bd32e42992867953cfd05bffd9 Author: Kuninori Morimoto Date: Mon Jan 29 04:14:49 2018 +0000 ASoC: tlv320aic32x4: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic32x4.c | 207 +++++++++++++++++++-------------------- 1 file changed, 103 insertions(+), 104 deletions(-) commit cd21ac8c161ac2a88422387298b30e33ab29012c Author: Kuninori Morimoto Date: Mon Jan 29 04:14:21 2018 +0000 ASoC: tlv320dac33: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/codecs/tlv320dac33.c | 402 ++++++++++++++++++++--------------------- 1 file changed, 199 insertions(+), 203 deletions(-) commit 749ad545e3735270036c65e1199b8f3b8cda09e6 Author: Kuninori Morimoto Date: Mon Jan 29 04:13:54 2018 +0000 ASoC: tlv320aic3x: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic3x.c | 293 ++++++++++++++++++++--------------------- 1 file changed, 145 insertions(+), 148 deletions(-) commit 1514613a7a4480e40f40a2d41527292fece8b362 Author: Kuninori Morimoto Date: Mon Jan 29 04:13:13 2018 +0000 ASoC: tlv320aic26: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic26.c | 83 ++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 44 deletions(-) commit ff06ac2a0489cfe913215d424667b52ad6c0fba1 Author: Kuninori Morimoto Date: Mon Jan 29 04:12:48 2018 +0000 ASoC: tlv320aic23: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic23-i2c.c | 7 --- sound/soc/codecs/tlv320aic23-spi.c | 7 --- sound/soc/codecs/tlv320aic23.c | 120 +++++++++++++++++++------------------ 3 files changed, 61 insertions(+), 73 deletions(-) commit dd08102a9ff8aec720946f2b229a076b48bc8cf0 Author: Kuninori Morimoto Date: Mon Jan 29 04:12:24 2018 +0000 ASoC: adau17x1/adau1761/adau1781: replace codec to component Now we can replace Codec to Component. Let's do it. Because there are many drivers which are using adau17x1, we need to update these all related drivers in same time. Otherwise compile error/warning happen adau1761: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 adau1781: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/adau1761.c | 88 +++++++++++++++++++++++---------------------- sound/soc/codecs/adau1781.c | 51 +++++++++++++------------- sound/soc/codecs/adau17x1.c | 67 +++++++++++++++++----------------- sound/soc/codecs/adau17x1.h | 8 ++--- 4 files changed, 108 insertions(+), 106 deletions(-) commit f305fe81ab8f9e21388d416ebe03a901273ad0f2 Author: Kuninori Morimoto Date: Mon Jan 29 04:11:29 2018 +0000 ASoC: adau1977: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/adau1977-i2c.c | 7 ----- sound/soc/codecs/adau1977-spi.c | 7 ----- sound/soc/codecs/adau1977.c | 59 ++++++++++++++++++++--------------------- 3 files changed, 29 insertions(+), 44 deletions(-) commit d5bc548469dae9cd83f6553437637b0d0b7d5c5c Author: Kuninori Morimoto Date: Mon Jan 29 04:11:10 2018 +0000 ASoC: adau7002: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/adau7002.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 0d12540cd83c111cfa3ed9a17bf981134187d8c3 Author: Kuninori Morimoto Date: Mon Jan 29 04:10:39 2018 +0000 ASoC: adau1373: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/adau1373.c | 84 ++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 46 deletions(-) commit a05655877f8f514431158a3f406ae10b4b6c4af3 Author: Kuninori Morimoto Date: Mon Jan 29 04:10:06 2018 +0000 ASoC: adav80x: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/adav801.c | 7 --- sound/soc/codecs/adav803.c | 7 --- sound/soc/codecs/adav80x.c | 130 ++++++++++++++++++++++----------------------- 3 files changed, 65 insertions(+), 79 deletions(-) commit 41572b5455be5da603b671a04be267cb4bd8633b Author: Kuninori Morimoto Date: Mon Jan 29 04:09:48 2018 +0000 ASoC: max98373: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max98373.c | 75 ++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 41 deletions(-) commit 4b51e9f1c386dbd7bd7bc5a342a6ac90a6c54904 Author: Kuninori Morimoto Date: Mon Jan 29 04:09:20 2018 +0000 ASoC: max98357a: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max98357a.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit ec4bf5acbb32f298029c14283f02b409d7354fb9 Author: Kuninori Morimoto Date: Mon Jan 29 04:09:04 2018 +0000 ASoC: max98927: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max98927.c | 82 +++++++++++++++++++++------------------------ sound/soc/codecs/max98927.h | 2 +- 2 files changed, 40 insertions(+), 44 deletions(-) commit cf9cb34eeba71acc80f9019aac46b2ffd13081b3 Author: Kuninori Morimoto Date: Mon Jan 29 04:08:29 2018 +0000 ASoC: max98925: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max98925.c | 72 +++++++++++++++++++++------------------------ sound/soc/codecs/max98925.h | 2 +- 2 files changed, 35 insertions(+), 39 deletions(-) commit 3f64507697e32c2f491224f9f0656be5ae5d6d15 Author: Kuninori Morimoto Date: Mon Jan 29 04:07:45 2018 +0000 ASoC: max98088: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max98088.c | 314 +++++++++++++++++++++----------------------- 1 file changed, 153 insertions(+), 161 deletions(-) commit 6f2b5d0db19a0e428dd7fc3abf326ebbc0726693 Author: Kuninori Morimoto Date: Mon Jan 29 04:06:51 2018 +0000 ASoC: max98926: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max98926.c | 56 +++++++++++++++++++++------------------------ sound/soc/codecs/max98926.h | 2 +- 2 files changed, 27 insertions(+), 31 deletions(-) commit 4c66b9d165e0994b9be1ff3233037e614fae22af Author: Kuninori Morimoto Date: Mon Jan 29 04:05:59 2018 +0000 ASoC: max98090: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max98090.c | 319 ++++++++++++++-------------- sound/soc/codecs/max98090.h | 4 +- sound/soc/mediatek/mt8173/mt8173-max98090.c | 4 +- 3 files changed, 164 insertions(+), 163 deletions(-) commit 2dd1637f5a7c602a2d32d95821b0cef13fff175a Author: Kuninori Morimoto Date: Mon Jan 29 04:05:45 2018 +0000 ASoC: max98095: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max98095.c | 448 ++++++++++++++++++++++---------------------- sound/soc/codecs/max98095.h | 2 +- 2 files changed, 222 insertions(+), 228 deletions(-) commit 1ae91ac7f787ee4078d93147d633ce3377ece748 Author: Kuninori Morimoto Date: Mon Jan 29 04:05:15 2018 +0000 ASoC: max98371: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max98371.c | 43 +++++++++++++++++++------------------------ sound/soc/codecs/max98371.h | 1 - 2 files changed, 19 insertions(+), 25 deletions(-) commit 0b3eda289c5cf84b7b1a5245812370accece2f19 Author: Kuninori Morimoto Date: Mon Jan 29 04:04:34 2018 +0000 ASoC: max9850: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max9850.c | 80 +++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 43 deletions(-) commit fbf60d9727d544c5c9676b5e9a1baab0704cc9ed Author: Kuninori Morimoto Date: Mon Jan 29 04:04:07 2018 +0000 ASoC: max9860: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max9860.c | 70 ++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 36 deletions(-) commit 35fc975bc7efdc82447f5cc69d401e185779f4b0 Author: Kuninori Morimoto Date: Mon Jan 29 04:03:34 2018 +0000 ASoC: da9055: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/da9055.c | 186 ++++++++++++++++++++++------------------------ 1 file changed, 90 insertions(+), 96 deletions(-) commit 2918d9ccc46a408707bc8939ba1777f7211798c3 Author: Kuninori Morimoto Date: Mon Jan 29 04:03:13 2018 +0000 ASoC: da7213: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/da7213.c | 328 +++++++++++++++++++++++----------------------- 1 file changed, 161 insertions(+), 167 deletions(-) commit bc596c4256507040743d9bbbf2b78fc82ec45893 Author: Kuninori Morimoto Date: Mon Jan 29 04:01:46 2018 +0000 ASoC: da7218: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/da7218.c | 498 +++++++++++++++++++++++----------------------- sound/soc/codecs/da7218.h | 2 +- 2 files changed, 246 insertions(+), 254 deletions(-) commit d06f33aed85cf73703555879157bf33866f8af05 Author: Kuninori Morimoto Date: Mon Jan 29 04:01:06 2018 +0000 ASoC: da7210: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/da7210.c | 181 +++++++++++++++++++++------------------------- 1 file changed, 84 insertions(+), 97 deletions(-) commit 192ce2fb1a4052b4a2ee01f1cad2f39c0eebeb48 Author: Kuninori Morimoto Date: Mon Jan 29 04:00:47 2018 +0000 ASoC: da732x: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/da732x.c | 241 +++++++++++++++++++++++----------------------- 1 file changed, 121 insertions(+), 120 deletions(-) commit 534cf41c0c09e5c7b7aee706abcd3812ef17ae89 Author: Kuninori Morimoto Date: Mon Jan 29 04:00:28 2018 +0000 ASoC: cs53l30: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs53l30.c | 57 ++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 30 deletions(-) commit 97b566066ffc2f35940450b408c5f4afa997e4a7 Author: Kuninori Morimoto Date: Mon Jan 29 04:00:02 2018 +0000 ASoC: cs43130: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs43130.c | 243 +++++++++++++++++++++++---------------------- sound/soc/codecs/cs43130.h | 2 +- 2 files changed, 123 insertions(+), 122 deletions(-) commit c92614022c6d375e7759a0142a985b4bbfd9046b Author: Kuninori Morimoto Date: Mon Jan 29 03:59:27 2018 +0000 ASoC: cs42l42: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 1 -> .use_pmdown_time = 0 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs42l42.c | 154 ++++++++++++++++++++++----------------------- sound/soc/codecs/cs42l42.h | 2 +- 2 files changed, 76 insertions(+), 80 deletions(-) commit 1fa49856cbc8f4ada62f62f30c3c96038d08f24c Author: Kuninori Morimoto Date: Mon Jan 29 03:59:02 2018 +0000 ASoC: cs42l51: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs42l51-i2c.c | 8 ----- sound/soc/codecs/cs42l51.c | 81 +++++++++++++++++++++--------------------- 2 files changed, 41 insertions(+), 48 deletions(-) commit e48f7466f9d93232da3f33ca722aa23a0a892f9e Author: Kuninori Morimoto Date: Mon Jan 29 03:58:25 2018 +0000 ASoC: cs42l56: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs42l56.c | 158 ++++++++++++++++++++++----------------------- 1 file changed, 78 insertions(+), 80 deletions(-) commit a7aa75a2a7dba32594291a71c3704000a2fd7089 Author: Bjorn Andersson Date: Sun Jan 28 16:59:48 2018 -0800 pinctrl: msm: Use dynamic GPIO numbering The base of the TLMM gpiochip should not be statically defined as 0, fix this to not artificially restrict the existence of multiple pinctrl-msm devices. Fixes: f365be092572 ("pinctrl: Add Qualcomm TLMM driver") Reported-by: Timur Tabi Signed-off-by: Bjorn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-msm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1781af563aef66c2eb7cda65d754d2228321a260 Author: Jan Kundrát Date: Fri Jan 26 16:06:37 2018 +0100 pinctrl: mcp23s08: spi: Fix duplicate pinctrl debugfs entries This is a bit more involved because the pinctrl core so far always assumed that one device (with a unique dev_name) only contains a single pinctrl thing. This is not true for the mcp23s08 driver for chips connected over SPI. They have a "logical address" which means that several chips can share one physical CS signal. A downside of this patch are some possibly ugly names for the debugfs entries, such as "spi1.1-mcp23xxx-pinctrl.2", etc. Signed-off-by: Jan Kundrát Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 18 ++++++++++++++++-- drivers/pinctrl/pinctrl-mcp23s08.c | 9 ++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) commit ed231751413d4f33403f0bf0d5a957b41824f940 Author: Jan Kundrát Date: Fri Jan 26 20:16:47 2018 +0100 pinctrl: mcp23s08: spi: Add HW address to gpio_chip.label When several devices are sharing one hardware SPI CS, there is no visual clue in `lsgpio` or in /sys/kernel/debug/gpio about which one is which one. Stuff depends on the enumeration order, and therefore lower chip addresses always go first, but that's just an implementation detail. This change includes the device-specific address in the debug output: gpiochip4: GPIOs 464-479, parent: spi/spi1.1, mcp23s17.2, can sleep: gpiochip3: GPIOs 480-495, parent: spi/spi1.1, mcp23s17.1, can sleep: Signed-off-by: Jan Kundrát Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9b3e4207661e67f04c72af15e29f74cd944f5964 Author: Jan Kundrát Date: Thu Jan 25 18:29:15 2018 +0100 pinctrl: mcp23s08: spi: Fix regmap debugfs entries The SPI version of this chip allows several devices to be present on the same SPI bus via a local address. If this is in action and if the kernel has debugfs, however, the code attempts to create duplicate entries for the regmap's debugfs: mcp23s08 spi1.1: Failed to create debugfs directory This patch simply assigns a local name matching the device logical address to the `struct regmap_config`. No changes are needed for MCP23S18 because that device does not support any logical addressing. Similarly, I2C devices do not need any action, either, because they are already different in their I2C address. A similar problem is present for the pinctrl debugfs instance, but that one is not addressed by this patch. Signed-off-by: Jan Kundrát Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) commit 184f3448f65f9d478a5dfec736c0a7c973637ce6 Author: Kyle Yan Date: Wed Jan 10 22:00:04 2018 -0800 pinctrl: qcom: Add sdm845 pinctrl driver This adds the pinctrl definitions for the TLMM of SDM845. Signed-off-by: Kyle Yan Signed-off-by: Rajendra Nayak Signed-off-by: Bjorn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/Kconfig | 9 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-sdm845.c | 1323 +++++++++++++++++++++++++++++++++ 3 files changed, 1333 insertions(+) commit f51237829c8688cfc5af11ccaa1f90126870e3c6 Author: Bjorn Andersson Date: Wed Jan 10 22:00:03 2018 -0800 dt-bindings: pinctrl: Add Qualcomm SDM845 TLMM binding This adds the DeviceTree binding for the Qualcomm SDM845 TLMM block. Signed-off-by: Bjorn Andersson Reviewed-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/pinctrl/qcom,sdm845-pinctrl.txt | 176 +++++++++++++++++++++ 1 file changed, 176 insertions(+) commit 9665a74944b321d060ca626b9a8bee579466ba29 Author: Kuninori Morimoto Date: Mon Jan 29 03:57:55 2018 +0000 ASoC: cs42l52: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs42l52.c | 146 +++++++++++++++++++++------------------------ 1 file changed, 69 insertions(+), 77 deletions(-) commit 092631bf863d6c632afc1ec935c3acb7b45a8622 Author: Kuninori Morimoto Date: Mon Jan 29 03:57:25 2018 +0000 ASoC: cs42l73: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs42l73.c | 122 +++++++++++++++++++++------------------------ 1 file changed, 58 insertions(+), 64 deletions(-) commit 99a9f452093e40f82e51a2f49d95ee3c04ad298b Author: Kuninori Morimoto Date: Mon Jan 29 03:56:58 2018 +0000 ASoC: cs42xx8: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs42xx8-i2c.c | 1 - sound/soc/codecs/cs42xx8.c | 57 +++++++++++++++++++++--------------------- 2 files changed, 28 insertions(+), 30 deletions(-) commit 8a6e7dd6f07d7f537b10b0e61165c06d15dcc1f2 Author: Kuninori Morimoto Date: Mon Jan 29 03:56:25 2018 +0000 ASoC: cs35l34: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs35l34.c | 127 ++++++++++++++++++++++----------------------- 1 file changed, 63 insertions(+), 64 deletions(-) commit 86c2eddfba351824cffccdd5182954c1cf0b9a8a Author: Kuninori Morimoto Date: Mon Jan 29 03:55:56 2018 +0000 ASoC: cs35l35: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs35l35.c | 104 +++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 56 deletions(-) commit cefcf59421fe18d4b6491df635cda08518d32863 Author: Kuninori Morimoto Date: Mon Jan 29 03:55:16 2018 +0000 ASoC: cs35l33: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs35l33.c | 186 ++++++++++++++++++++++----------------------- 1 file changed, 91 insertions(+), 95 deletions(-) commit fa643703a8776cb8987843ea81c765fdf2419383 Author: Kuninori Morimoto Date: Mon Jan 29 03:54:19 2018 +0000 ASoC: cs35l32: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs35l32.c | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) commit aebbf9cc42d6001dcf8872600e55df6e5bd3d406 Author: Kuninori Morimoto Date: Mon Jan 29 03:53:51 2018 +0000 ASoC: cs4265: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs4265.c | 98 ++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 52 deletions(-) commit 0ec65b677c255204d8a26efea400fd7a37771476 Author: Kuninori Morimoto Date: Mon Jan 29 03:53:32 2018 +0000 ASoC: cs4349: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs4349.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) commit 70c9a803fbcc41cb323ae3bfda9f047eb5f73967 Author: Kuninori Morimoto Date: Mon Jan 29 03:51:09 2018 +0000 ASoC: cs4270: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs4270.c | 124 ++++++++++++++++++++-------------------------- 1 file changed, 55 insertions(+), 69 deletions(-) commit fab70c273d75102a3f2593730b49d94ed3f87cff Author: Kuninori Morimoto Date: Mon Jan 29 03:49:03 2018 +0000 ASoC: rt5665: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 345 ++++++++++++++++++++++------------------------ sound/soc/codecs/rt5665.h | 2 +- 2 files changed, 169 insertions(+), 178 deletions(-) commit 46295e5e7ae53bf3c508892589b269576cd62bc3 Author: Kuninori Morimoto Date: Mon Jan 29 03:48:05 2018 +0000 ASoC: rt5631: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5631.c | 324 +++++++++++++++++++++++----------------------- 1 file changed, 163 insertions(+), 161 deletions(-) commit ca04dd8a9b4d350d473675c0f777ff8c213aa0a9 Author: Kuninori Morimoto Date: Mon Jan 29 03:47:20 2018 +0000 ASoC: rt5660: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5660.c | 145 ++++++++++++++++++++++------------------------ sound/soc/codecs/rt5660.h | 2 +- 2 files changed, 70 insertions(+), 77 deletions(-) commit 5ba04c66d592d53d889dc29281bb2db9471d3122 Author: Kuninori Morimoto Date: Mon Jan 29 03:46:46 2018 +0000 ASoC: rt5670: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5670.c | 295 ++++++++++++++++---------------- sound/soc/codecs/rt5670.h | 10 +- sound/soc/intel/boards/cht_bsw_rt5672.c | 18 +- 3 files changed, 160 insertions(+), 163 deletions(-) commit de86a33253d07675abbb1fa294ffb4f3df6f219e Author: Kuninori Morimoto Date: Mon Jan 29 03:45:50 2018 +0000 ASoC: rt5659: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5659.c | 307 ++++++++++++++++++++++------------------------ sound/soc/codecs/rt5659.h | 4 +- 2 files changed, 151 insertions(+), 160 deletions(-) commit 04e8262ac8c3f59599ea6dfe5cd1a039828ea4ad Author: Kuninori Morimoto Date: Mon Jan 29 03:45:07 2018 +0000 ASoC: rt5514: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5514-spi.c | 4 +- sound/soc/codecs/rt5514.c | 124 ++++++++++++++++++++---------------------- sound/soc/codecs/rt5514.h | 2 +- 3 files changed, 61 insertions(+), 69 deletions(-) commit 17b52010b50b505fc083ce3b8fb4978e6b543411 Author: Kuninori Morimoto Date: Mon Jan 29 03:44:39 2018 +0000 ASoC: rt5651: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 220 +++++++++++++++++----------------- sound/soc/codecs/rt5651.h | 4 +- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- 3 files changed, 113 insertions(+), 113 deletions(-) commit d5a41b5d5f883b659e2f5bac13867e0b75837e70 Author: Kuninori Morimoto Date: Mon Jan 29 03:42:46 2018 +0000 ASoC: rt5640: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5640.c | 260 ++++++++++++++++------------------ sound/soc/codecs/rt5640.h | 6 +- sound/soc/intel/boards/byt-rt5640.c | 4 +- sound/soc/intel/boards/bytcr_rt5640.c | 8 +- 4 files changed, 135 insertions(+), 143 deletions(-) commit 01f8902fe45173c516da1f5e13e9792e8cbb8230 Author: Kuninori Morimoto Date: Mon Jan 29 03:42:18 2018 +0000 ASoC: rt5616: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5616.c | 219 +++++++++++++++++++++++----------------------- 1 file changed, 109 insertions(+), 110 deletions(-) commit f548dd4f871b827763479e15654c7f0b935e28ee Author: Kuninori Morimoto Date: Mon Jan 29 03:15:08 2018 +0000 ASoC: rt274: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt274.c | 206 +++++++++++++++++++++++------------------------ 1 file changed, 102 insertions(+), 104 deletions(-) commit 5aea27d59f764e346cb93923b0af6a94567cb95b Author: Kuninori Morimoto Date: Mon Jan 29 03:14:50 2018 +0000 ASoC: ak4554: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4554.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 2b5c3e43cb0c5d9f6ab66baabb3dc08ee9f23e7b Author: Kuninori Morimoto Date: Mon Jan 29 03:14:32 2018 +0000 ASoC: ak4641: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4641.c | 91 ++++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 45 deletions(-) commit d229c0bedc6117b71419250bfebbcd83c161daa6 Author: Kuninori Morimoto Date: Mon Jan 29 03:14:17 2018 +0000 ASoC: ak4535: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4535.c | 78 ++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 42 deletions(-) commit 61feead8d78fe103dd18dba5d9acb3a67dce2567 Author: Kuninori Morimoto Date: Mon Jan 29 03:14:01 2018 +0000 ASoC: ak4104: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4104.c | 68 +++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 38 deletions(-) commit 57188d8875894b14f6cdd21c7ee6e96ab66c1f2b Author: Kuninori Morimoto Date: Mon Jan 29 03:13:39 2018 +0000 ASoC: ak4671: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4671.c | 67 ++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 36 deletions(-) commit 12132de654bbcd16f6e4e9c0bf2947356756f773 Author: Kuninori Morimoto Date: Mon Jan 29 03:13:23 2018 +0000 ASoC: ak5386: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak5386.c | 62 +++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 34 deletions(-) commit 43c5d0f05ec55aa71680744ffcaa1aa6fd8a9bab Author: Kuninori Morimoto Date: Mon Jan 29 03:13:07 2018 +0000 ASoC: ak4642: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4642.c | 105 ++++++++++++++++++++++------------------------ 1 file changed, 50 insertions(+), 55 deletions(-) commit 9123ea9ff5bcdfdb89f7ad6f8efc56f2ca55a071 Author: Kuninori Morimoto Date: Mon Jan 29 03:12:39 2018 +0000 ASoC: ak4613: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4613.c | 73 ++++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 36 deletions(-) commit 39506cf83bb1b4df80dee1492f8cebc26cec355e Author: Kuninori Morimoto Date: Mon Jan 29 03:12:02 2018 +0000 ASoC: wm1250-ev1: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm1250-ev1.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 91880a6b6ba398c74420b4b0d0ef6fc3005f71ca Author: Kuninori Morimoto Date: Mon Jan 29 03:11:46 2018 +0000 ASoC: wm9867: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max9867.c | 65 +++++++++++++++++++++------------------------- sound/soc/codecs/max9867.h | 2 +- 2 files changed, 31 insertions(+), 36 deletions(-) commit 2822e66bb812489aff9c41f4b265fcc2d8613989 Author: Kuninori Morimoto Date: Mon Jan 29 03:10:09 2018 +0000 ASoC: wm9090: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm9090.c | 109 ++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 56 deletions(-) commit 48c3387642967d62fc47aff4ad0e3816bf8292e3 Author: Kuninori Morimoto Date: Mon Jan 29 03:09:52 2018 +0000 ASoC: wm9081: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = true -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm9081.c | 228 +++++++++++++++++++++++----------------------- 1 file changed, 112 insertions(+), 116 deletions(-) commit 46a9100c8a94a01bb2d6780b19c9258e9aec323c Author: Kuninori Morimoto Date: Mon Jan 29 03:09:37 2018 +0000 ASoC: wm8904: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8904.c | 355 +++++++++++++++++++++++----------------------- 1 file changed, 174 insertions(+), 181 deletions(-) commit 78e89b825c5a3df34be58b8bbbc5c7e4589a761c Author: Kuninori Morimoto Date: Mon Jan 29 03:09:18 2018 +0000 ASoC: wm8940: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8940.c | 159 ++++++++++++++++++++++------------------------ 1 file changed, 76 insertions(+), 83 deletions(-) commit ce8d1015a2b8d1301c98f7e6b774fb1c28220cea Author: Kuninori Morimoto Date: Mon Jan 29 03:09:02 2018 +0000 ASoC: wm8961: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8961.c | 241 ++++++++++++++++++++++------------------------ 1 file changed, 117 insertions(+), 124 deletions(-) commit 708ebb3beb93813c58dc359d00665ad660917b1f Author: Kuninori Morimoto Date: Mon Jan 29 03:08:45 2018 +0000 ASoC: wm8995: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8995.c | 286 ++++++++++++++++++++++------------------------ 1 file changed, 135 insertions(+), 151 deletions(-) commit bf338e5b6c00859a259ce3f56b9f04a3f0bb075b Author: Kuninori Morimoto Date: Mon Jan 29 03:08:29 2018 +0000 ASoC: wm8991: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8991.c | 167 ++++++++++++++++++++++------------------------ 1 file changed, 80 insertions(+), 87 deletions(-) commit 5d61ef8b07db82746f61927628730ce0407b8897 Author: Kuninori Morimoto Date: Mon Jan 29 03:08:15 2018 +0000 ASoC: wm8996: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8996.c | 401 +++++++++++++++++++++---------------------- sound/soc/codecs/wm8996.h | 4 +- sound/soc/samsung/speyside.c | 12 +- 3 files changed, 206 insertions(+), 211 deletions(-) commit f4ee271709f05ed62e752557ef2f032aea8258bc Author: Kuninori Morimoto Date: Mon Jan 29 03:07:59 2018 +0000 ASoC: wm8962: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8962.c | 397 +++++++++++++++++++++--------------------- sound/soc/codecs/wm8962.h | 2 +- sound/soc/samsung/tobermory.c | 6 +- 3 files changed, 202 insertions(+), 203 deletions(-) commit e3a68fd8a8d19454bbff08bc14b959645601a48d Author: Kuninori Morimoto Date: Mon Jan 29 03:07:43 2018 +0000 ASoC: wm8983: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8983.c | 170 +++++++++++++++++++++------------------------- 1 file changed, 79 insertions(+), 91 deletions(-) commit ab38ff38bc77330c009f918680501b9dc37a9b3e Author: Kuninori Morimoto Date: Mon Jan 29 03:07:26 2018 +0000 ASoC: wm8988: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8988.c | 127 +++++++++++++++++++++------------------------- 1 file changed, 57 insertions(+), 70 deletions(-) commit 51bef5c65b293152e4a189e0d3d6805ae5db9965 Author: Kuninori Morimoto Date: Mon Jan 29 03:07:09 2018 +0000 ASoC: wm8990: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8990.c | 179 ++++++++++++++++++++++------------------------ 1 file changed, 86 insertions(+), 93 deletions(-) commit 3e32a3ff800b71c84796a89479a6ea89eee0803e Author: Kuninori Morimoto Date: Mon Jan 29 03:06:52 2018 +0000 ASoC: wm8974: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8974.c | 143 ++++++++++++++++++++++------------------------ 1 file changed, 68 insertions(+), 75 deletions(-) commit 98020a71c2c135b7c24e8fa8c2b3e947fe465909 Author: Kuninori Morimoto Date: Mon Jan 29 03:06:37 2018 +0000 ASoC: wm8978: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8978.c | 185 ++++++++++++++++++++++------------------------ 1 file changed, 89 insertions(+), 96 deletions(-) commit 58a6597ea0e6f310e568c0db6224b586a5bf7c7c Author: Kuninori Morimoto Date: Mon Jan 29 03:06:22 2018 +0000 ASoC: wm8971: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8971.c | 108 ++++++++++++++++++++++------------------------ 1 file changed, 51 insertions(+), 57 deletions(-) commit cbc23b742464357c25eef77f63ed86d24a12ff27 Author: Kuninori Morimoto Date: Mon Jan 29 03:06:06 2018 +0000 ASoC: wm8985: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8985.c | 201 ++++++++++++++++++++++------------------------ 1 file changed, 94 insertions(+), 107 deletions(-) commit e075fc17b70813fede562cc0f7751bc7ca426c49 Author: Kuninori Morimoto Date: Mon Jan 29 03:05:45 2018 +0000 ASoC: wm8960: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8960.c | 249 +++++++++++++++++++++++----------------------- 1 file changed, 126 insertions(+), 123 deletions(-) commit 69b626e68207cf78015ec13f0077af174d710f97 Author: Kuninori Morimoto Date: Mon Jan 29 03:05:28 2018 +0000 ASoC: wm8955: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8955.c | 189 ++++++++++++++++++++++------------------------ 1 file changed, 91 insertions(+), 98 deletions(-) commit 58bd2934923b7339e7320b1cbe87f13287c57c31 Author: Kuninori Morimoto Date: Mon Jan 29 03:05:11 2018 +0000 ASoC: wm8903: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8903.c | 211 ++++++++++++++++++++--------------------- sound/soc/codecs/wm8903.h | 2 +- sound/soc/tegra/tegra_wm8903.c | 8 +- 3 files changed, 110 insertions(+), 111 deletions(-) commit 825a52aa768352920b631208cd03250869609936 Author: Kuninori Morimoto Date: Mon Jan 29 03:04:55 2018 +0000 ASoC: wm8900: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8900.c | 251 +++++++++++++++++++++++----------------------- 1 file changed, 125 insertions(+), 126 deletions(-) commit 22d15fc51ea79e0554cfa1c9ca78af0a8d5cd20b Author: Kuninori Morimoto Date: Mon Jan 29 03:04:21 2018 +0000 ASoC: wm8753: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8753.c | 289 ++++++++++++++++++++++------------------------ 1 file changed, 138 insertions(+), 151 deletions(-) commit 9b6a00f753ddb6fbc7e7b105bf4b9ddfef92b75c Author: Kuninori Morimoto Date: Mon Jan 29 03:04:06 2018 +0000 ASoC: wm8741: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8741.c | 133 ++++++++++++++++++++-------------------------- 1 file changed, 59 insertions(+), 74 deletions(-) commit 6b41308015b28658d28584bc174aab45e8202fa6 Author: Kuninori Morimoto Date: Mon Jan 29 03:03:32 2018 +0000 ASoC: wm8728: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8728.c | 82 ++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 48 deletions(-) commit d6ae5c166ab77245ba5d8c7f57518ce00945d05f Author: Kuninori Morimoto Date: Mon Jan 29 03:03:17 2018 +0000 ASoC: wm8782: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8782.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit cde596c7c07343789e3e0f1c09fc7d3c756c88d0 Author: Kuninori Morimoto Date: Mon Jan 29 03:03:01 2018 +0000 ASoC: wm8731: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8731.c | 101 +++++++++++++++++++++++----------------------- 1 file changed, 50 insertions(+), 51 deletions(-) commit e5ac140d98b640e3a9c3d6b1a1eb4320d86e60da Author: Kuninori Morimoto Date: Mon Jan 29 03:02:45 2018 +0000 ASoC: wm8727: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8727.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) commit 502cb3a293be22f95737480902ed3450c06b276a Author: Kuninori Morimoto Date: Mon Jan 29 03:02:29 2018 +0000 ASoC: wm8770: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8770.c | 131 ++++++++++++++++++++++------------------------ 1 file changed, 64 insertions(+), 67 deletions(-) commit 51e42c952e872ebcdbbb2418f652e9c678612072 Author: Kuninori Morimoto Date: Mon Jan 29 03:02:13 2018 +0000 ASoC: wm8776: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8776.c | 105 ++++++++++++++++++++-------------------------- 1 file changed, 46 insertions(+), 59 deletions(-) commit 840680dcc29e2d9b49aee0f2910e8e22cfdf0709 Author: Kuninori Morimoto Date: Mon Jan 29 03:01:57 2018 +0000 ASoC: wm8737: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8737.c | 109 ++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 62 deletions(-) commit f081a227aeeb081bf0a886d59d5dd78f35882575 Author: Kuninori Morimoto Date: Mon Jan 29 03:01:40 2018 +0000 ASoC: wm8750: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8750.c | 115 ++++++++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 64 deletions(-) commit 56fc4d2a2a26c39900aca01673f47e06a847e26d Author: Kuninori Morimoto Date: Mon Jan 29 03:01:25 2018 +0000 ASoC: wm8711: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8711.c | 116 ++++++++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 65 deletions(-) commit 4bf8ae8356c982847ef5bd5f613b87311f9024ec Author: Kuninori Morimoto Date: Mon Jan 29 03:01:09 2018 +0000 ASoC: wm8523: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8523.c | 98 ++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 52 deletions(-) commit 51bf02cc505fb4bc0c5913e64db12c6b7e464f23 Author: Kuninori Morimoto Date: Mon Jan 29 03:00:54 2018 +0000 ASoC: wm8510: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8510.c | 149 +++++++++++++++++++++------------------------- 1 file changed, 68 insertions(+), 81 deletions(-) commit 3b60cf1024e0f3c94851ce97baa8a7f31bb73955 Author: Kuninori Morimoto Date: Mon Jan 29 03:00:38 2018 +0000 ASoC: wm8524: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8524.c | 56 +++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 31 deletions(-) commit 8f5a59354c64e7e4305e8029d9f3ba1f0df5d444 Author: Kuninori Morimoto Date: Mon Jan 29 03:00:20 2018 +0000 ASoC: wm8580: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8580.c | 150 ++++++++++++++++++++++------------------------ 1 file changed, 71 insertions(+), 79 deletions(-) commit 10dc44c6462db0a4b60efa3add18684205088583 Author: Kuninori Morimoto Date: Mon Jan 29 03:00:04 2018 +0000 ASoC: wm8400: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8400.c | 211 ++++++++++++++++++++++------------------------ 1 file changed, 102 insertions(+), 109 deletions(-) commit 2621a9a4a28b37fa066a1c08aecdd6a44a083e56 Author: Kuninori Morimoto Date: Mon Jan 29 02:59:50 2018 +0000 ASoC: wm8350: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8350.c | 183 ++++++++++++++++++++++----------------------- sound/soc/codecs/wm8350.h | 4 +- sound/soc/fsl/wm1133-ev1.c | 6 +- 3 files changed, 93 insertions(+), 100 deletions(-) commit 6119583847faf8db0a31a0894a537596e564ab9d Author: Kuninori Morimoto Date: Mon Jan 29 02:59:35 2018 +0000 ASoC: wm5100: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm5100.c | 260 ++++++++++++++++++++++---------------------- sound/soc/codecs/wm5100.h | 2 +- sound/soc/samsung/lowland.c | 12 +- 3 files changed, 134 insertions(+), 140 deletions(-) commit 908b530863d4ae570e8005056f408ecae4862494 Author: Kuninori Morimoto Date: Mon Jan 29 02:59:19 2018 +0000 ASoC: wm2200: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 1 -> .use_pmdown_time = 0 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm2200.c | 157 ++++++++++++++++++++++------------------------ 1 file changed, 76 insertions(+), 81 deletions(-) commit e5449affbf96cceaa042e33b0d1e5db0bd6ecf3c Author: Kuninori Morimoto Date: Mon Jan 29 02:59:05 2018 +0000 ASoC: wm2000: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm2000.c | 78 ++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 42 deletions(-) commit cac308fcd767a077e1119901d8bdd69e31189f67 Author: Kuninori Morimoto Date: Mon Jan 29 03:50:28 2018 +0000 ASoC: cs4271: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs4271-i2c.c | 7 --- sound/soc/codecs/cs4271-spi.c | 7 --- sound/soc/codecs/cs4271.c | 105 +++++++++++++++++++++--------------------- 3 files changed, 52 insertions(+), 67 deletions(-) commit cf73dce9bc4947a777cc07b7fb7b9ff11f1e3b68 Author: Kuninori Morimoto Date: Mon Jan 29 03:04:37 2018 +0000 ASoC: wm8804: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8804.c | 100 +++++++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 51 deletions(-) commit b5311eede823588b9c33774a1c4dc51843a42a41 Author: Kuninori Morimoto Date: Mon Jan 29 02:58:43 2018 +0000 ASoC: wm0010: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm0010.c | 181 +++++++++++++++++++++++----------------------- 1 file changed, 89 insertions(+), 92 deletions(-) commit c95869e5c04fb0000370e7310dc892b417b8128a Author: Kuninori Morimoto Date: Mon Jan 29 02:58:25 2018 +0000 ASoC: ac97: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 To keep compatibilty, this patch adds snd_soc_xxx_ac97_codec() macro. These will be removed when all codec code was removed. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 13 ++++++-- sound/soc/codecs/ac97.c | 46 +++++++++++++-------------- sound/soc/soc-ac97.c | 84 ++++++++++++++++++++++++++----------------------- 3 files changed, 77 insertions(+), 66 deletions(-) commit 647d04f8e07afc7c3b7a42b3ee01a8b28db29631 Author: Sylwester Nawrocki Date: Mon Feb 5 16:43:56 2018 +0100 ASoC: samsung: i2s: Ensure the RCLK rate is properly determined If the RCLK mux clock configuration is specified in DT and no set_sysclk() callback is used in the sound card driver the sclk_srcrate field will remain set to 0, leading to an incorrect PSR divider setting. To fix this the frequency value is retrieved from the CLK_I2S_RCLK_SRC clock, so the actual RCLK mux selection is taken into account. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Signed-off-by: Mark Brown sound/soc/samsung/i2s.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit e3d001a0c29d6c9a87dd9e86bcb84fc66c2ddbe8 Author: Ulf Magnusson Date: Thu Feb 8 23:00:16 2018 +0100 spi: kconfig: Remove AVR32 dep. from SPI_ATMEL The AVR32 symbol was removed in commit 26202873bb51 ("avr32: remove support for AVR32 architecture"). Signed-off-by: Ulf Magnusson Signed-off-by: Mark Brown drivers/spi/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b44483eff7fb3b8c96ee763fe4e84c7933882709 Author: oder_chiou@realtek.com Date: Mon Feb 5 18:29:55 2018 +0800 ASoC: rt5659: Remove the routing path of the power widget "LDO2" This patch removes the routing path of the power widget "LDO2", and it should be depended on the hardware design. The power widget "LDO2" should add the routing path with the MICBIAS in the machine driver that is reasonable. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5659.c | 5 ----- 1 file changed, 5 deletions(-) commit 04ff40a983e864b586f189b4c3503b6f61263643 Author: Richard Fitzgerald Date: Mon Feb 5 11:38:17 2018 +0000 ASoC: wm_adsp: Don't init cache from DSP memory if control is write-only For controls marked write-only don't initialize the cache from the content of the DSP memory. We stil need the cache for any new data that is written to this control, and we need to return something for a read of the ALSA control because most user-side code assumes all ALSA controls are readable. The cache is already created zero- filled so the only change needed is to skip populating it from DSP memory if the control isn't readable. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 29c5b8fd8c07a42b07383c5fac47173d882f74b2 Author: Colin Ian King Date: Thu Feb 8 14:35:30 2018 +0000 ASoC: Intel: Skylake: make function skl_clk_round_rate static The function skl_clk_round_rate is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: sound/soc/intel/skylake/skl-ssp-clk.c:250:6: warning: symbol 'skl_clk_round_rate' was not declared. Should it be static? Signed-off-by: Colin Ian King Reviewed-by: Takashi Sakamoto Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-ssp-clk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit da18bcf72291bd4324ba249f881d7d0c205fd00a Author: Fabio Estevam Date: Sun Feb 11 19:53:21 2018 -0200 ASoC: fsl_ssi: Use 'const _be *' type for iprop The 'iprop' variable is passed as an argument to the be32_to_cpup() function, which expects a 'const _be *' type. Change the iprop variable type so that the following build warnings with W=1 are gone: sound/soc/fsl/fsl_ssi.c:1463:48: warning: incorrect type in argument 1 (different base types) sound/soc/fsl/fsl_ssi.c:1463:48: expected restricted __be32 const [usertype] *p sound/soc/fsl/fsl_ssi.c:1463:48: got unsigned int const [usertype] *[assigned] iprop Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb3981b6a64e1353b4f8ee70f97583f59c9772d0 Author: Fabio Estevam Date: Sun Feb 11 19:53:20 2018 -0200 ASoC: fsl_utils: Use 'const _be *' type for iprop The 'iprop' variable is passed as an argument to the be32_to_cpup() function, which expects a 'const _be *' type. Change the iprop variable type so that the following build warnings with W=1 are gone: sound/soc/fsl/fsl_utils.c:72:40: warning: incorrect type in argument 1 (different base types) sound/soc/fsl/fsl_utils.c:72:40: expected restricted __be32 const [usertype] *p sound/soc/fsl/fsl_utils.c:72:40: got unsigned int const [usertype] *[assigned] iprop sound/soc/fsl/fsl_utils.c:80:32: warning: incorrect type in argument 1 (different base types) sound/soc/fsl/fsl_utils.c:80:32: expected restricted __be32 const [usertype] *p sound/soc/fsl/fsl_utils.c:80:32: got unsigned int const [usertype] *[assigned] iprop Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0600b3e101b718557c1851c4a3ff456aa18e4956 Author: Fabio Estevam Date: Sun Feb 11 19:53:19 2018 -0200 ASoC: fsl_esai: Use 'const _be *' type for iprop The 'iprop' variable is passed as an argument to the be32_to_cpup() function, which expects a 'const _be *' type. Change the iprop variable type so that the following build warnings with W=1 are gone: sound/soc/fsl/fsl_esai.c:860:54: warning: incorrect type in argument 1 (different base types) sound/soc/fsl/fsl_esai.c:860:54: expected restricted __be32 const [usertype] *p sound/soc/fsl/fsl_esai.c:860:54: got unsigned int const [usertype] *[assigned] iprop Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl_esai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc734c244ab5bad427baa57e2e729d2a623b2fa1 Author: Fabio Estevam Date: Sun Feb 11 19:53:18 2018 -0200 ASoC: fsl-asoc-card: Use 'snd_pcm_format_t' type when appropriate A better suited type for 'sample_format' and 'asrc_format' is 'snd_pcm_format_t'. Change the type so that the following build warnings with W=1 are gone: sound/soc/fsl/fsl-asoc-card.c:153:29: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl-asoc-card.c:153:29: expected unsigned int [unsigned] [usertype] sample_format sound/soc/fsl/fsl-asoc-card.c:153:29: got restricted snd_pcm_format_t sound/soc/fsl/fsl-asoc-card.c:258:44: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl-asoc-card.c:525:29: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl-asoc-card.c:525:29: expected unsigned int [unsigned] [usertype] sample_format sound/soc/fsl/fsl-asoc-card.c:525:29: got restricted snd_pcm_format_t [usertype] sound/soc/fsl/fsl-asoc-card.c:680:43: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl-asoc-card.c:680:43: expected unsigned int [unsigned] [usertype] asrc_format sound/soc/fsl/fsl-asoc-card.c:680:43: got restricted snd_pcm_format_t [usertype] sound/soc/fsl/fsl-asoc-card.c:682:43: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl-asoc-card.c:682:43: expected unsigned int [unsigned] [usertype] asrc_format sound/soc/fsl/fsl-asoc-card.c:682:43: got restricted snd_pcm_format_t [usertype] Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl-asoc-card.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 104e51af79a0dbb80627d4db5e1421dd2a2f590c Author: Jarkko Nikula Date: Fri Feb 9 16:31:07 2018 +0200 spi: pxa2xx: Move SSP idle waiting to cs_deassert() Move SSP idle waiting before CS deassert from error and end of message handling function giveback() to cs_deassert(). This ensures idle waiting is done also if there is CS change between transfers. Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 041e74b71491acadad74b275e8b05add165d92b4 Author: oder_chiou@realtek.com Date: Mon Feb 5 18:29:56 2018 +0800 ASoC: rt5659: Add the support of Intel HDA Header The patch adds the support of Intel HDA Header. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown include/sound/rt5659.h | 1 + sound/soc/codecs/rt5659.c | 118 ++++++++++++++++++++++++++++++++++++++++++++-- sound/soc/codecs/rt5659.h | 3 +- 3 files changed, 117 insertions(+), 5 deletions(-) commit 6c00e7b76021fcf4ddb64191ccdf62c722adf0d1 Author: Jerome Brunet Date: Fri Jan 19 16:42:36 2018 +0100 clk: meson: add axg misc bit to the mpll driver On axg, the rate of the mpll is stuck as if sdm value was 4 and could not change (expect for mpll2 strangely). Looking at the vendor kernel, it turns out a new magic bit from the undocumented HHI_PLL_TOP_MISC register is required. Setting this bit solves the problem and the mpll rates are back to normal Fixes: 78b4af312f91 ("clk: meson-axg: add clock controller drivers") Signed-off-by: Jerome Brunet drivers/clk/meson/axg.c | 20 ++++++++++++++++++++ drivers/clk/meson/clk-mpll.c | 7 +++++++ drivers/clk/meson/clkc.h | 1 + 3 files changed, 28 insertions(+) commit 2fa9b361e500a0e092a9525afbd6a3a363ffa5f0 Author: Yixun Lan Date: Fri Jan 19 10:09:26 2018 +0800 clk: meson: axg: fix the od shift of the sys_pll According to the datasheet, the od shift of sys_pll is actually 16. Fixes: 78b4af312f91 ('clk: meson-axg: add clock controller drivers') Signed-off-by: Yixun Lan [fixed commit message] Signed-off-by: Jerome Brunet drivers/clk/meson/axg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b71aceceb09918daf37a40a1221077599040be3 Author: Jerome Brunet Date: Fri Jan 19 16:55:29 2018 +0100 clk: meson: axg: add the fractional part of the fixed_pll The fixed_pll also has a fractional part. On axg s400 board, without this parameter, the calculated rate is off by ~8Mhz (0,4%). The fixed_pll being the root of the peripheral clock tree, this error is propagated to the rest of the clocks Adding the definition of the parameter fixes the problem Fixes: 78b4af312f91 ("clk: meson-axg: add clock controller drivers") Signed-off-by: Jerome Brunet drivers/clk/meson/axg.c | 5 +++++ 1 file changed, 5 insertions(+) commit 07f45e2ecc1ba1ce75d80768caf2267256cd135d Author: Jerome Brunet Date: Fri Jan 19 16:55:28 2018 +0100 clk: meson: gxbb: add the fractional part of the fixed_pll The fixed_pll of gxbb and gxl also has a fractional parameter. This has not been a problem so far because the fractional part is actually set to 0 on these platforms, so the rate remains correct when it is ignored. Still, it is better represent the pll the way it is, so add the frac parameter now Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3c4fe763d64db93c0c8ec359cf394cfc491f91f3 Author: Jerome Brunet Date: Fri Jan 19 16:55:27 2018 +0100 clk: meson: fix rate calculation of plls with a fractional part The rate of the parent should not be multiplied by 2 when the pll has a fractional part. This is making the rate calculation of the gxl_hdmi_pll wrong (and others as well). This multiplication is specific to the hdmi_pll of gxbb and is most likely due to a multiplier sitting in front of this particular pll. Add a fixed factor clock in front on the gxbb pll and remove this constant from the calculation to fix the problem Fixes: 4a47295144dd ("clk: meson: fractional pll support") Signed-off-by: Jerome Brunet drivers/clk/meson/clk-pll.c | 1 - drivers/clk/meson/gxbb.c | 14 +++++++++++++- drivers/clk/meson/gxbb.h | 3 ++- 3 files changed, 15 insertions(+), 3 deletions(-) commit 69d92293274b3ae60c54271bf6e029e3d1d582e8 Author: Jerome Brunet Date: Fri Jan 19 16:55:26 2018 +0100 clk: meson: add the gxl hdmi pll The hdmi pll used in the gxl family is actually different from the gxbb one. The register layout is completely different, which explain why the hdmi pll rate has always been rubbish on the gxl family. Adding the correct register field is the first part of the fix to get a correct rate out the hdmi pll Fixes: 0d48fc558d01 ("clk: meson-gxbb: Add GXL/GXM GP0 Variant") Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) commit 7d3142e5d64a2bdcd382dac979407f6afc83d685 Author: Jerome Brunet Date: Fri Jan 19 16:55:25 2018 +0100 clk: meson: add od3 to the pll driver Some meson plls, such as the hdmi pll, are using a 3rd od parameter, which is yet another "power of 2" post divider. Add it to fix the calculation of the hdmi_pll rate Fixes: 738f66d3211d ("clk: gxbb: add AmLogic GXBB clk controller driver") Signed-off-by: Jerome Brunet drivers/clk/meson/clk-pll.c | 19 ++++++++++++++++--- drivers/clk/meson/clkc.h | 2 ++ drivers/clk/meson/gxbb.c | 5 +++++ 3 files changed, 23 insertions(+), 3 deletions(-) commit 4c5f67b7ea329ed8b3cf708fde4656b2d3b27dbf Author: Jerome Brunet Date: Fri Jan 19 16:55:24 2018 +0100 clk: meson: use the frac parameter width instead of a constant Use the fractional part width in the calculation instead of 12, which happens to be the witdh right now. This is safer in case the field width ever change in the future Signed-off-by: Jerome Brunet drivers/clk/meson/clk-pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94aa8a41f1bc807db78567e7031d75998c166150 Author: Jerome Brunet Date: Fri Jan 19 16:55:23 2018 +0100 clk: meson: remove unnecessary rounding in the pll clock The pll driver performs the rate calculation in Mhz, which adds an unnecessary rounding down to the Mhz of the rate. Use 64bits long integers to perform this calculation safely on meson8b and perform the calculation in Hz instead Fixes: 7a29a869434e ("clk: meson: Add support for Meson clock controller") Signed-off-by: Jerome Brunet drivers/clk/meson/clk-pll.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 4ed98e9572ad24a5286d80d71221372b55fa9df5 Author: Jerome Brunet Date: Fri Jan 19 16:55:22 2018 +0100 clk: meson: remove useless pll rate params tables Read-only plls don't need param table to recalculate the rate. Providing them with a param table is just a waste of memory. Remove the useless tables from sys_pll on gxbb and axg. Signed-off-by: Jerome Brunet drivers/clk/meson/axg.c | 94 ------------------------------------------------ drivers/clk/meson/gxbb.c | 94 ------------------------------------------------ 2 files changed, 188 deletions(-) commit 840e1a73ccbb2096d1286d72c18ccadd3956b0ae Author: Jerome Brunet Date: Fri Jan 19 16:55:21 2018 +0100 clk: meson: check pll rate param table before using it Make sure the rate param table is available before using it. Some read-only plls don't provide it, which is ok since the table is not used by read-only clocks. R/W clocks are supposed to provide it, but it does not hurt check it. Signed-off-by: Jerome Brunet drivers/clk/meson/clk-pll.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0efaf807839375b3a20366b8a057694c0ccad37b Author: Klaus Goger Date: Sat Feb 3 16:50:15 2018 +0100 arm64: dts: rockchip: add i2s0-2ch-bus pins on rk3399 Add pin definition for I2S0 if used as a 2-channel only bus. Signed-off-by: Klaus Goger Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 32c79915e081c82dce4e0ae8fc92d4169a829bff Author: Klaus Goger Date: Tue Jan 30 11:15:55 2018 +0100 arm64: dts: rockchip: enable tsadc on rk3399-puma Enable the SoC thermal sensor on RK3399-Q7 (Puma). As we want to do do a full board reset instead of just a SoC one, set hw-tshut-mode to GPIO. Signed-off-by: Klaus Goger Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 2171f4fdac060e05826f9972a19bfdb569f5dcfe Author: Levin Du Date: Tue Jan 23 10:10:17 2018 +0800 arm64: dts: rockchip: add roc-rk3328-cc board The roc-rk3328-cc is a credit card size single board computer using the Rockchip RK3328 Quad-Core ARM Cortex A53 64-Bit Processor and supporting up to 2GB 2133MHz LPDDR4 memory. It provides eMMC module socket, MicroSD Card slot, USB 2.0/3.0, Gigabit Ethernet, HDMI/CVBS, Infrared Receiver, SPDIF/I2S, and SPI/I2C/UART/PWM interfaces. The devicetree currently supports basic peripherals. Signed-off-by: Levin Du Reviewed-by: Rob Herring Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.txt | 4 + arch/arm64/boot/dts/rockchip/Makefile | 1 + arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 267 +++++++++++++++++++++ 3 files changed, 272 insertions(+) commit ba2b043e90f264df1969c4428bc89d7121e475e8 Author: Shunqian Zheng Date: Tue Jan 9 09:42:21 2018 +0800 arm64: dts: rockchip: Add cif test clocks for rk3399 There are three pins can act as cif test clock for rk3399. They're sourced from 24M and output 24M by default and some boards may use them as camera 24M xvclk. Signed-off-by: Shunqian Zheng Reviewed-by: Brian Norris Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 692f492f66585aa625efa70bef7c25f1cfd7408b Author: Shawn Lin Date: Wed Feb 7 14:20:02 2018 +0800 ARM: dts: rockchip: add "rockchip,rk3228-grf" compatible for rk322x grf node rockchip,rk3228-grf is used both for rk3228 and rk3229. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk322x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99435889bd4a71c0ac04ce3af6911d8b05c62196 Author: Brian Norris Date: Fri Jan 5 16:47:55 2018 -0800 ARM: dts: rockchip: drop veyron's nonstandard 'backlight-boot-off' This was used out-of-tree as a hack for resolving issues where some systems expect the backlight to turn on automatically at boot, while others expect to manage the backlight status via a DRM/panel driver. Those issues have since been fixed upstream in pwm_bl.c without device tree hacks, and so this un-documented property should no longer be useful. Signed-off-by: Brian Norris Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi | 1 - 1 file changed, 1 deletion(-) commit e17ee5f08b9849b9f80fadab96364121c6bdd207 Author: Shawn Lin Date: Wed Feb 7 14:20:03 2018 +0800 soc: rockchip: disable jtag switching for RK3228/RK3229 SoCs Disable IO function switching between sdmmc and jtag for RK3228 and RK3229 SoCs. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner drivers/soc/rockchip/grf.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 3c87d7c874b2119c1cff4eee5586b9a6bc0b7fe9 Author: David Lechner Date: Sun Jan 21 17:09:40 2018 -0600 gpio: davinci: add support for pinmux gpio ranges This adds support for the pinmux gpio ranges feature to the DaVinci gpio driver. Only device tree is supported since the non-DT boards don't use a generic pinmux controller. Cc: Keerthy Cc: Linus Walleij Signed-off-by: David Lechner Signed-off-by: Linus Walleij drivers/gpio/gpio-davinci.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4760b6fa442276783aa4294e131b72fea8c5a18a Author: Jonathan Neuschäfer Date: Mon Jan 22 06:04:09 2018 +0100 dt-bindings: gpio: Add binding for Wii GPIO controller The Nintendo Wii game console has a GPIO controller, which is used for the optical disk slot LED, buttons, poweroff, etc. This patch adds a binding for this GPIO controller. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/gpio/nintendo,hollywood-gpio.txt | 27 ++++++++++++++++++++++ .../devicetree/bindings/powerpc/nintendo/wii.txt | 9 +------- 2 files changed, 28 insertions(+), 8 deletions(-) commit b5cd7802dd7c10c5be388c8820d8e753f4f8fce7 Author: Markus Elfring Date: Fri Jan 12 21:30:09 2018 +0100 gpio-wm831x: Use seq_putc() in wm831x_gpio_dbg_show() A single character (line break) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Charles Keepax Signed-off-by: Linus Walleij drivers/gpio/gpio-wm831x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e98bbbf3bd59d5283750e8f56031bd1cc2feafd8 Author: David Lechner Date: Tue Jan 23 12:14:43 2018 -0600 phy: da8xx-usb: rename clock con_ids This renames the clock con_ids in the DA8XX USB PHY driver as well as the matching names in the mach clock registration code. This is in preparation for using device tree clocks where these names will become part of the device tree bindings. The new names more closely match the names used in the USB clock diagram in the SoC TRM. Acked-by: Kishon Vijay Abraham I Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/mach-davinci/usb-da8xx.c | 12 ++++++------ drivers/phy/ti/phy-da8xx-usb.c | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) commit 261b350367d729bbfdd4aa92a9e48cfd6500b6ba Author: Bai Ping Date: Fri Feb 2 16:06:27 2018 +0800 ARM: imx: Improve the soc revision calculation flow On our i.MX6 SOC, the DIGPROG register is used for representing the SOC ID and silicon revision. The revision has two part: MAJOR and MINOR. each is represented in 8 bits in the register. bits [15:8]: reflect the MAJOR part of the revision; bits [7:0]: reflect the MINOR part of the revision; In our linux kernel, the soc revision is represented in 8 bits. MAJOR part and MINOR each occupy 4 bits. previous method does NOT take care about the MAJOR part in DIGPROG register. So reformat the revision read from the HW to be compatible with the revision format used in kernel. Signed-off-by: Bai Ping Acked-by: Dong Aisheng Tested-by: Christoph Fritz Signed-off-by: Shawn Guo arch/arm/mach-imx/anatop.c | 56 ++++++++++++++++------------------------------ 1 file changed, 19 insertions(+), 37 deletions(-) commit 49a1a99c530c297aad4e40af8cffa3195f4e1b58 Author: Stefan Agner Date: Wed Jan 10 22:04:47 2018 +0100 ARM: imx: add timer stop flag to ARM power off state When the CPU is in ARM power off state the ARM architected timers are stopped. The flag is already present in the higher power WAIT mode. This allows to use the ARM generic timer on i.MX 6UL/6ULL SoC. Without the flag the kernel freezes when the timer enters the first time ARM power off mode. Note: The default timer on i.MX6SX is the i.MX GPT timer which is not disabled during CPU idle. However, the timer is not affected by the CPUIDLE_FLAG_TIMER_STOP flag. The flag only affects CPU local timers. Cc: Anson Huang Signed-off-by: Stefan Agner Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/mach-imx/cpuidle-imx6sx.c | 1 + 1 file changed, 1 insertion(+) commit 1f9d1311a3a98e8f5db509a4ff7bf84f7d6a4ca9 Author: Fabio Estevam Date: Tue Jan 9 13:24:43 2018 -0200 ARM: imx: Remove epit support Currently there is no user of EPIT, so remove such unused code. If someone wants to add EPIT support back, then the person needs to create a proper support into drivers/clocksource/ and add device tree support, proper bindings, etc. Signed-off-by: Fabio Estevam Acked-by: Sascha Hauer Signed-off-by: Shawn Guo arch/arm/mach-imx/Kconfig | 13 --- arch/arm/mach-imx/Makefile | 1 - arch/arm/mach-imx/epit.c | 228 --------------------------------------------- 3 files changed, 242 deletions(-) commit 8acb019209a646db73934c52a57d4021e533f679 Author: Fabio Estevam Date: Mon Feb 5 16:45:38 2018 -0200 arm64: dts: ls208xa-qds: Fix the 'reg' property The 'reg' property should match the corresponding @ address, so fix it accordingly. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls208xa-qds.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c1f3d95f7b7a1c0a52e148523a411d153e82c48 Author: Fabio Estevam Date: Mon Feb 5 16:45:37 2018 -0200 arm64: dts: ls208xa-qds: Pass unit name to dspi child nodes Pass unit name to dspi child nodes to fix the following build warnings with W=1: arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dtb: Warning (unit_address_vs_reg): Node /soc/dspi@2100000/n25q128a has a reg or ranges property, but no unit name arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dtb: Warning (unit_address_vs_reg): Node /soc/dspi@2100000/sst25wf040b has a reg or ranges property, but no unit name arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dtb: Warning (unit_address_vs_reg): Node /soc/dspi@2100000/en25s64 has a reg or ranges property, but no unit name Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls208xa-qds.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dc7eda93318474115dd722c6d3bc49b77e9c9304 Author: Fabio Estevam Date: Mon Feb 5 16:45:36 2018 -0200 arm64: dts: ls208xa: Move cpu_thermal out of bus node Move cpu_thermal node from soc node to root node. cpu_thermal node does not have any register properties and thus shouldn't be placed on the bus. This fixes the following build warnings with W=1: arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dtb: Warning (simple_bus_reg): Node /soc/thermal-zones missing or empty reg/ranges property Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 98 +++++++++++++------------- 1 file changed, 49 insertions(+), 49 deletions(-) commit 85530a7a765335289393a31d4ad1ef9209e8e568 Author: Fabio Estevam Date: Mon Feb 5 16:45:35 2018 -0200 arm64: dts: ls1088a: Move cpu_thermal out of bus node Move cpu_thermal node from soc node to root node. cpu_thermal node does not have any register properties and thus shouldn't be placed on the bus. This fixes the following build warnings with W=1: arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dtb: Warning (simple_bus_reg): Node /soc/thermal-zones missing or empty reg/ranges property Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 76 +++++++++++++------------- 1 file changed, 38 insertions(+), 38 deletions(-) commit e8567b10f5d212d19decb6441d8af68aaaab0c7b Author: Fabio Estevam Date: Mon Feb 5 16:45:34 2018 -0200 arm64: dts: ls1046a: Move cpu_thermal out of bus node Move cpu_thermal node from soc node to root node. cpu_thermal node does not have any register properties and thus shouldn't be placed on the bus. This fixes the following build warnings with W=1: arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dtb: Warning (simple_bus_reg): Node /soc/thermal-zones missing or empty reg/ranges property Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 62 +++++++++++++------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit 0abe2a16aa24b9dc705334d9aada5f762bf580d8 Author: Fabio Estevam Date: Mon Feb 5 16:45:33 2018 -0200 arm64: dts: ls1043a: Move cpu_thermal out of bus node Move cpu_thermal node from soc node to root node. cpu_thermal node does not have any register properties and thus shouldn't be placed on the bus. This fixes the following build warnings with W=1: arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dtb: Warning (simple_bus_reg): Node /soc/thermal-zones missing or empty reg/ranges property Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 62 +++++++++++++------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit 3c0b186ec515071b6872cdafa64a5a6044444fd4 Author: Fabio Estevam Date: Mon Feb 5 16:45:32 2018 -0200 arm64: dts: ls1012a: Move cpu_thermal out of bus node Move cpu_thermal node from soc node to root node. cpu_thermal node does not have any register properties and thus shouldn't be placed on the bus. This fixes the following build warnings with W=1: arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dtb: Warning (simple_bus_reg): Node /soc/thermal-zones missing or empty reg/ranges property Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 62 +++++++++++++------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit b3a151ce1b7bc805eea29fdd2479b8565a889ef5 Author: Roy Pledge Date: Mon Jan 29 16:07:21 2018 -0500 arm64: dts: Add DPAA QBMan portal 9 ARM DPAA1 (LS1043 and LS1046) have 10 QBMan portals (indexed 0-9) Enable the one that is missing in the device trees. Signed-off-by: Roy Pledge Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/qoriq-bman-portals.dtsi | 6 ++++++ arch/arm64/boot/dts/freescale/qoriq-qman-portals.dtsi | 7 +++++++ 2 files changed, 13 insertions(+) commit cc223282a41f57d304369c596707dc99beec8825 Author: Zhang Ying-22455 Date: Wed Dec 27 10:41:51 2017 +0800 arm64: dts: ls1088a: add DT node of watchdog There are eight cores in ls1088a and each core has an watchdog, ls1088a can use sp805-wdt driver, so we just add DT node for it. Signed-off-by: Zhang Ying-22455 Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 56 ++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit f40a1e3705be23e845fbeec66acf3a6582524145 Author: Anson Huang Date: Wed Jan 24 00:42:13 2018 +0800 soc: imx: gpc: ARM power domain should be always-on ARM power domain does NOT support runtime off, always-on flag should be set to avoid incorrect power state in pm_genpd_summary: Before: root@imx6qpdlsolox:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary domain status slaves /device runtime status ---------------------------------------------------------------------- ARM off-0 After: root@imx6qpdlsolox:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary domain status slaves /device runtime status ---------------------------------------------------------------------- ARM on Signed-off-by: Anson Huang Reviewed-by: Lucas Stach Acked-by: Dong Aisheng Signed-off-by: Shawn Guo drivers/soc/imx/gpc.c | 1 + 1 file changed, 1 insertion(+) commit 44c6d823c18aa0c0b41a9e7f3d03973ab82093cb Author: Stefan Riedmueller Date: Fri Feb 2 10:34:04 2018 +0100 ARM: imx_v6_v7_defconfig: Enable Dialog Semiconductor DA9062 driver The phyCORE-i.MX 6 uses the DA9062/63 PMIC, RTC and Watchdog driver. Enable these options by default. Signed-off-by: Stefan Riedmueller Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 41346d9ef80a6c015485b6710ad38b94da85b180 Author: Fabio Estevam Date: Thu Jan 18 10:45:27 2018 -0200 ARM: imx_v6_v7_defconfig: Enable AC97 codec support imx6qdl udoo board has an AC97 codec. Add support for it by default. Signed-off-by: Fabio Estevam Acked-by: Maciej S. Szmigiero Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 6648b2efbc52caefdc959e3f83d60818bb58e143 Author: Marco Franchi Date: Tue Jan 9 09:46:24 2018 -0200 ARM: imx: Update imx_v6_v7_defconfig for mag3110 support The i.MX 6UL EVK has support for the MAG3110 Magnetometer sensor, included in its base board by default. So add support for this Magnetometer in the imx_v6_v7_defconfig. Signed-off-by: Marco Franchi Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 83bd0aaa3b9d1d1bd72d0687ef6716c25f23305b Author: Peng Fan Date: Fri Jan 5 17:40:35 2018 +0800 ARM: imx_v6_v7_defconfig: enable OP-TEE This patch enables configs for Trusted Execution Environment(TEE) and Open Portable Trusted Execution Environment(OP-TEE). With Linux running in Trustzone non-secure world, OP-TEE OS runs in secure world, linux could use secure services provided by OP-TEE. With TEE/OP-TEE options selected, use the bindings in Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt to let the driver probe work. On i.MX6/7, now the bootflow is U-Boot->OP-TEE->Linux, OP-TEE will automatically create that node. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 4af185038652d69038e5b19db6988f44cf10fdb1 Author: Anson Huang Date: Fri Jan 5 03:51:44 2018 +0800 ARM: imx_v6_v7_defconfig: select the CONFIG_CPUFREQ_DT Select CONFIG_CPUFREQ_DT by default to enable cpu-freq driver for i.MX7D. Signed-off-by: Anson Huang Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 9bfda6636edd5db9b3cdbb2df6483ceb7618ec6a Author: Sergei Shtylyov Date: Thu Feb 1 22:09:25 2018 +0300 DT: dmaengine: renesas,rcar-dmac: document R8A77980 support Renesas R-Car V3H SoC has the R-Car gen3 compatible DMA controllers. Document R-Car V3H (also known as R8A77980) SoC bindings. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt | 1 + 1 file changed, 1 insertion(+) commit 0c0eb4caf03bb6d3d92c70560e0530c8fdf62284 Author: Zi Yan Date: Mon Jan 8 10:50:50 2018 -0500 dmaengine: avoid map_cnt overflow with CONFIG_DMA_ENGINE_RAID When CONFIG_DMA_ENGINE_RAID is enabled, unmap pool size can reach to 256. But in struct dmaengine_unmap_data, map_cnt is only u8, wrapping to 0, if the unmap pool is maximally used. This triggers BUG() when struct dmaengine_unmap_data is freed. Use u16 to fix the problem. Signed-off-by: Zi Yan Signed-off-by: Vinod Koul include/linux/dmaengine.h | 4 ++++ 1 file changed, 4 insertions(+) commit 2e67a0875b11b800f63d19e06d0254bbd8892188 Author: Yang Shunyong Date: Fri Feb 2 17:51:09 2018 +0800 dmaengine: dmatest: add norandom option Existing option noverify disables both random src/dst address offset setup and data verification. Sometimes, we need to control random src/dst address setup and verification separately, such as disabling random to make sure that test covers addresses in all interleaving banks, but data verification is still performed. This patch adds option norandom to disable random offset setup. Option noverify has been changed to disable data verification only. Cc: Joey Zheng Signed-off-by: Yang Shunyong Signed-off-by: Vinod Koul drivers/dma/dmatest.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 907f84990924bf3a8d248c040dabeb5127ae6938 Author: Alex Lu Date: Sun Feb 11 12:24:33 2018 -0600 Bluetooth: btrtl: Add RTL8723D and RTL8821C devices The Bluetooth parts of RTL8723D and RTL8723B share the same lmp subversion, thus we need to check both lmp subversion and hci revision to distinguish the two. The same situation is true for RTL8821A and RTL8821C. Accordingly, the selection code is revised. To improve maintainability, a new id_table struct is defined, and an array of such structs is constructed. Adding a new device can thus be as simple as adding another value to the table. Signed-off-by: Alex Lu Signed-off-by: Larry Finger Signed-off-by: Marcel Holtmann drivers/bluetooth/btrtl.c | 119 +++++++++++++++++++++++++++++++++------------- 1 file changed, 85 insertions(+), 34 deletions(-) commit fed03fe7e55b7dc16077f672bd9d7bbe92b3a691 Author: Larry Finger Date: Sun Feb 11 12:24:32 2018 -0600 Bluetooth: btusb: Add device ID for RTL8822BE The Asus Z370-I contains a Realtek RTL8822BE device with an associated BT chip using a USB ID of 0b05:185c. This device is added to the driver. Signed-off-by: Hon Weng Chong Signed-off-by: Larry Finger Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 3 +++ 1 file changed, 3 insertions(+) commit 4440977be1347d43503f381716e4918413b5a6f0 Author: Kirill A. Shutemov Date: Fri Feb 9 17:22:26 2018 +0300 x86/boot/compressed/64: Introduce paging_prepare() Rename l5_paging_required() to paging_prepare() and change the interface of the function. This is a preparation for the next patch, which would make the function also allocate memory for the 32-bit trampoline. The function now returns a 128-bit structure. RAX would return trampoline memory address (zero for now) and RDX would indicate if we need to enable 5-level paging. Signed-off-by: Kirill A. Shutemov [ Typo fixes and general clarification. ] Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Cyrill Gorcunov Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180209142228.21231-3-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/head_64.S | 41 ++++++++++++++++------------------- arch/x86/boot/compressed/pgtable_64.c | 25 ++++++++++----------- 2 files changed, 31 insertions(+), 35 deletions(-) commit 7cc4eb1bdd8b082f3d889daccd9412aa10e56165 Author: Kirill A. Shutemov Date: Fri Feb 9 17:22:25 2018 +0300 x86/boot/compressed/64: Rename pagetable.c to kaslr_64.c The name of the file -- pagetable.c -- is misleading: it only contains helpers used for KASLR in 64-bit mode. Let's rename the file to reflect its content. Signed-off-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Cyrill Gorcunov Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180209142228.21231-2-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/Makefile | 2 +- arch/x86/boot/compressed/kaslr_64.c | 157 +++++++++++++++++++++++++++++++++++ arch/x86/boot/compressed/pagetable.c | 157 ----------------------------------- 3 files changed, 158 insertions(+), 158 deletions(-) commit ac65ddad4a23d46529f921fdf8f7b7b6d14a15d8 Author: Mathieu Desnoyers Date: Fri Feb 9 15:30:56 2018 -0500 Documentation/features, membarriers: Document membarrier-sync-core architecture support Ensure we gather architecture requirements about each architecture supporting the "sync_core" membarrier command in a single file under Documentation/features. Signed-off-by: Mathieu Desnoyers Cc: Andrea Parri Cc: Andrew Hunter Cc: Andy Lutomirski Cc: Avi Kivity Cc: Benjamin Herrenschmidt Cc: Boqun Feng Cc: Dave Watson Cc: David Sehr Cc: Greg Hackmann Cc: Jonathan Corbet Cc: Linus Torvalds Cc: Maged Michael Cc: Michael Ellerman Cc: Paul E. McKenney Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Russell King Cc: Thomas Gleixner Cc: Will Deacon Cc: linux-api@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/1518208256-22034-1-git-send-email-mathieu.desnoyers@efficios.com Signed-off-by: Ingo Molnar .../sched/membarrier-sync-core/arch-support.txt | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 26be459c9c4431984ad4b576f975ce6d3184d71d Author: Mathieu Desnoyers Date: Sat Feb 10 12:00:58 2018 -0500 Documentation/features: Allow comments in arch features files The list-arch.sh script considers lines beginning with "#" as match for the feature table. Given that those tables are never in lines beginning with "#", add a reverse grep on "^#" when matching the "ok/TODO" state of the architecture. This allows adding comments within the feature files, for instance describing the architecture requirements for the feature in each architecture. Signed-off-by: Mathieu Desnoyers Cc: Jonathan Corbet Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/1518282058-24226-1-git-send-email-mathieu.desnoyers@efficios.com Signed-off-by: Ingo Molnar Documentation/features/list-arch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65101d8c9108201118efa7e08f4e2c57f438deb9 Author: Boris Brezillon Date: Fri Jan 12 10:09:26 2018 +0100 drm/vc4: Expose performance counters to userspace The V3D engine has various hardware counters which might be interesting to userspace performance analysis tools. Expose new ioctls to create/destroy a performance monitor object and query the counter values of this perfmance monitor. Note that a perfomance monitor is given an ID that is only valid on the file descriptor it has been allocated from. A performance monitor can be attached to a CL submission and the driver will enable HW counters for this request and update the performance monitor values at the end of the job. Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180112090926.12538-1-boris.brezillon@free-electrons.com drivers/gpu/drm/vc4/Makefile | 1 + drivers/gpu/drm/vc4/vc4_drv.c | 26 ++++++ drivers/gpu/drm/vc4/vc4_drv.h | 68 ++++++++++++++ drivers/gpu/drm/vc4/vc4_gem.c | 48 +++++++++- drivers/gpu/drm/vc4/vc4_irq.c | 40 +++++++- drivers/gpu/drm/vc4/vc4_perfmon.c | 188 ++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/vc4/vc4_regs.h | 35 +------ drivers/gpu/drm/vc4/vc4_v3d.c | 64 ++++++------- include/uapi/drm/vc4_drm.h | 76 +++++++++++++++ 9 files changed, 474 insertions(+), 72 deletions(-) commit 9c950e468cb5913d223282a05e6cd22fecce5ac8 Author: Eric Anholt Date: Tue Jan 30 13:56:43 2018 -0800 drm: Print the pid when debug logging an ioctl error. When we debug print what ioctl we're calling into, we include the pid. If you have multiple processes rendering simulataneously, the error return also needs the pid so you can see which of the ioctl calls was the one to fail. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180130215643.11016-1-eric@anholt.net Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62ebdc25c4002e5fc104ab536ce7d99ba76be03f Author: Łukasz Rymanowski Date: Fri Feb 9 18:26:02 2018 +0100 Bluetooth: Fix incorrect bits for LE states This patch fixes incorrect checks for LE states. Issues found when doing mgmt tests for scenario when Linux Kernel should do connectable advertising while connected. Signed-off-by: Łukasz Rymanowski Signed-off-by: Marcel Holtmann net/bluetooth/hci_request.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 79e8a32d2aa9e98b1560cbe107e750f07807d8c7 Author: Phil Reid Date: Fri Feb 9 08:57:27 2018 +0800 iio: ad5272: Add support for Analog Devices digital potentiometers Add implementation for Analog Devices AD5272 and AD5274 digital potentiometer devices. Signed-off-by: Phil Reid Signed-off-by: Jonathan Cameron drivers/iio/potentiometer/Kconfig | 10 ++ drivers/iio/potentiometer/Makefile | 1 + drivers/iio/potentiometer/ad5272.c | 231 +++++++++++++++++++++++++++++++++++++ 3 files changed, 242 insertions(+) commit 8730e267a17a56e9aea8d8daa15da4f2fb98c8e4 Author: Phil Reid Date: Fri Feb 9 08:57:26 2018 +0800 dt-bindings: ad5272: Add bindings for Analog Devices digital potentiometers Add binding documentation for Analog Devices AD5272 and AD5274 digital potentiometer devices. Signed-off-by: Phil Reid Signed-off-by: Jonathan Cameron .../bindings/iio/potentiometer/ad5272.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 0bd39455b14475e94ccedefabe202fb49460211b Author: Shreeya Patel Date: Tue Feb 6 22:31:57 2018 +0530 Staging: iio: ade7758: Expand buf_lock to cover both buffer and state protection iio_dev->mlock is to be used only by the IIO core for protecting device mode changes between INDIO_DIRECT and INDIO_BUFFER. This patch replaces the use of mlock with the already established buf_lock mutex. Introducing 'unlocked' forms of read and write registers. The read/write frequency functions now require buf_lock to be held. That's not obvious so avoid this but moving the locking inside the functions where it is then clear that they are taking the unlocked forms of the register read/write. It isn't readily apparent that write frequency function requires the locks to be taken, so move it inside the function to where it is required to protect. Also, the read raw does not require iio_dev->mlock for reads. It can run concurrently as resource protection is handled by buf_lock in read register. Signed-off-by: Shreeya Patel Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7758.h | 2 +- drivers/staging/iio/meter/ade7758_core.c | 52 +++++++++++++++++++++++--------- 2 files changed, 39 insertions(+), 15 deletions(-) commit 0f550a21247f6029bba036c06fef8de78dddaa69 Author: Tvrtko Ursulin Date: Fri Feb 9 21:58:47 2018 +0000 drm/i915: Replace some negative Gen checks Instead of INTEL_GEN != x use !IS_GENx for more optimisation opportunities. Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180208130606.15556-16-tvrtko.ursulin@linux.intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180209215847.6660-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c56b89f16dd0e7d979399bfe94b4056103dd16a8 Author: Tvrtko Ursulin Date: Fri Feb 9 21:58:46 2018 +0000 drm/i915: Use INTEL_GEN everywhere Coccinelle patch: @@ identifier p; @@ -INTEL_INFO(p)->gen +INTEL_GEN(p) Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180208130606.15556-12-tvrtko.ursulin@linux.intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180209215847.6660-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_fence_reg.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- drivers/gpu/drm/i915/intel_audio.c | 2 +- drivers/gpu/drm/i915/intel_bios.c | 2 +- drivers/gpu/drm/i915/intel_cdclk.c | 2 +- drivers/gpu/drm/i915/intel_ddi.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 12 ++++++------ drivers/gpu/drm/i915/intel_dp.c | 4 ++-- drivers/gpu/drm/i915/intel_lvds.c | 2 +- drivers/gpu/drm/i915/intel_mocs.c | 2 +- drivers/gpu/drm/i915/intel_panel.c | 2 +- drivers/gpu/drm/i915/intel_pm.c | 8 ++++---- drivers/gpu/drm/i915/intel_psr.c | 4 ++-- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- drivers/gpu/drm/i915/intel_uncore.c | 6 +++--- 18 files changed, 31 insertions(+), 31 deletions(-) commit 21f606610502ef56f9180b1529fc7e02957564c8 Author: John Johansen Date: Sat Nov 18 19:43:13 2017 -0800 apparmor: improve overlapping domain attachment resolution Overlapping domain attachments using the current longest left exact match fail in some simple cases, and with the fix to ensure consistent behavior by failing unresolvable attachments it becomes important to do a better job. eg. under the current match the following are unresolvable where the alternation is clearly a better match under the most specific left match rule. /** /{bin/,}usr/ Use a counting match that detects when a loop in the state machine is enter, and return the match count to provide a better specific left match resolution. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 1 + security/apparmor/domain.c | 30 ++++++---- security/apparmor/include/match.h | 19 ++++++ security/apparmor/match.c | 122 +++++++++++++++++++++++++++++++++++++- 4 files changed, 158 insertions(+), 14 deletions(-) commit 73f488cd903938e78979d50e081a0314ad142351 Author: John Johansen Date: Tue Dec 12 15:28:05 2017 -0800 apparmor: convert attaching profiles via xattrs to use dfa matching This converts profile attachment based on xattrs to a fixed extended conditional using dfa matching. This has a couple of advantages - pattern matching can be used for the xattr match - xattrs can be optional for an attachment or marked as required - the xattr attachment conditional will be able to be combined with other extended conditionals when the flexible extended conditional work lands. The xattr fixed extended conditional is appended to the xmatch conditional. If an xattr attachment is specified the profile xmatch will be generated regardless of whether there is a pattern match on the executable name. Signed-off-by: John Johansen Acked-by: Seth Arnold security/apparmor/apparmorfs.c | 5 ++++ security/apparmor/domain.c | 52 ++++++++++++++++++++++++++------------ security/apparmor/include/policy.h | 2 -- security/apparmor/policy.c | 6 +---- security/apparmor/policy_unpack.c | 35 +------------------------ 5 files changed, 43 insertions(+), 57 deletions(-) commit 8e51f9087f4024d20f70f4d9831e1f45d8088331 Author: Matthew Garrett Date: Thu Feb 8 12:37:19 2018 -0800 apparmor: Add support for attaching profiles via xattr, presence and value Make it possible to tie Apparmor profiles to the presence of one or more extended attributes, and optionally their values. An example usecase for this is to automatically transition to a more privileged Apparmor profile if an executable has a valid IMA signature, which can then be appraised by the IMA subsystem. Signed-off-by: Matthew Garrett Signed-off-by: John Johansen security/apparmor/domain.c | 152 +++++++++++++++++++++++++++++++------ security/apparmor/include/policy.h | 6 ++ security/apparmor/policy.c | 8 ++ security/apparmor/policy_unpack.c | 85 ++++++++++++++++++--- 4 files changed, 217 insertions(+), 34 deletions(-) commit a0781209cb894e5115bb00c269b1d94c4b632d6a Author: John Johansen Date: Mon Feb 5 18:26:46 2018 +0100 apparmor: cleanup: simplify code to get ns symlink name ns_get_name() is called in only one place and can be folded in. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) commit cf91600071a973c28cebf314e618610a20ec4d6d Author: John Johansen Date: Mon Feb 5 09:58:29 2018 +0100 apparmor: cleanup create_aafs() error path Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) commit d901d6a298dc6e9105b9dc091d65b043e9f8c9a6 Author: John Johansen Date: Tue Aug 8 13:01:01 2017 -0700 apparmor: dfa split verification of table headers separate the different types of verification so they are logically separate and can be reused separate of each other. Signed-off-by: John Johansen security/apparmor/match.c | 116 +++++++++++++++++++++++++++------------------- 1 file changed, 68 insertions(+), 48 deletions(-) commit 031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3 Author: John Johansen Date: Tue Aug 8 12:10:50 2017 -0700 apparmor: dfa add support for state differential encoding State differential encoding can provide better compression for apparmor policy, without having significant impact on match time. Signed-off-by: John Johansen security/apparmor/include/match.h | 4 ++++ security/apparmor/match.c | 26 +++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) commit 074c1cd798cb0b481d7eaa749b64aa416563c053 Author: John Johansen Date: Tue Aug 8 11:58:33 2017 -0700 apparmor: dfa move character match into a macro Signed-off-by: John Johansen security/apparmor/match.c | 74 +++++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 47 deletions(-) commit 9fcf78cca198600b27c44b4e50f00f8af3927f17 Author: John Johansen Date: Sun Oct 8 18:26:19 2017 -0700 apparmor: update domain transitions that are subsets of confinement at nnp Domain transition so far have been largely blocked by no new privs, unless the transition has been provably a subset of the previous confinement. There was a couple problems with the previous implementations, - transitions that weren't explicitly a stack but resulted in a subset of confinement were disallowed - confinement subsets were only calculated from the previous confinement instead of the confinement being enforced at the time of no new privs, so transitions would have to get progressively tighter. Fix this by detecting and storing a reference to the task's confinement at the "time" no new privs is set. This reference is then used to determine whether a transition is a subsystem of the confinement at the time no new privs was set. Unfortunately the implementation is less than ideal in that we have to detect no new privs after the fact when a task attempts a domain transition. This is adequate for the currently but will not work in a stacking situation where no new privs could be conceivably be set in both the "host" and in the container. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 1 + security/apparmor/domain.c | 163 +++++++++++++++++++++++---------------- security/apparmor/include/task.h | 4 + security/apparmor/task.c | 7 ++ 4 files changed, 110 insertions(+), 65 deletions(-) commit d8889d49e414b371eb235c08c3a759ab3e0cfa51 Author: John Johansen Date: Wed Oct 11 01:04:48 2017 -0700 apparmor: move context.h to cred.h Now that file contexts have been moved into file, and task context fns() and data have been split from the context, only the cred context remains in context.h so rename to cred.h to better reflect what it deals with. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 2 +- security/apparmor/capability.c | 2 +- security/apparmor/domain.c | 2 +- security/apparmor/file.c | 2 +- security/apparmor/include/context.h | 176 ------------------------------------ security/apparmor/include/cred.h | 176 ++++++++++++++++++++++++++++++++++++ security/apparmor/ipc.c | 2 +- security/apparmor/label.c | 2 +- security/apparmor/lsm.c | 2 +- security/apparmor/mount.c | 2 +- security/apparmor/policy.c | 2 +- security/apparmor/policy_ns.c | 2 +- security/apparmor/policy_unpack.c | 2 +- security/apparmor/procattr.c | 2 +- security/apparmor/resource.c | 2 +- security/apparmor/task.c | 2 +- 16 files changed, 190 insertions(+), 190 deletions(-) commit de62de59c27881c59c7df2e535cb9e1275cd52cc Author: John Johansen Date: Sun Oct 8 00:43:02 2017 -0700 apparmor: move task related defines and fns to task.X files Signed-off-by: John Johansen security/apparmor/Makefile | 2 +- security/apparmor/context.c | 221 ------------------------------------ security/apparmor/domain.c | 4 +- security/apparmor/include/context.h | 40 +------ security/apparmor/include/task.h | 90 +++++++++++++++ security/apparmor/lsm.c | 6 +- security/apparmor/task.c | 176 ++++++++++++++++++++++++++++ 7 files changed, 273 insertions(+), 266 deletions(-) commit d065f2f56522b9240acb8c5ea35e9ee25f1b33e6 Author: John Johansen Date: Sun Oct 8 00:25:27 2017 -0700 apparmor: cleanup, drop unused fn __aa_task_is_confined() Signed-off-by: John Johansen security/apparmor/include/context.h | 11 ----------- 1 file changed, 11 deletions(-) commit e1a03f627b5254fa1ee83bd0761490f31ea2e382 Author: John Johansen Date: Fri Jan 27 04:36:47 2017 -0800 apparmor: cleanup fixup description of aa_replace_profiles Signed-off-by: John Johansen security/apparmor/policy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f175221af35bedf99b201d861a0fe54e19ef36c2 Author: John Johansen Date: Fri Jan 27 04:09:40 2017 -0800 apparmor: rename tctx to ctx now that cred_ctx has been removed we can rename task_ctxs from tctx without causing confusion. Signed-off-by: John Johansen security/apparmor/context.c | 25 ++++++++++++------------- security/apparmor/domain.c | 16 ++++++++-------- security/apparmor/lsm.c | 18 +++++++++--------- 3 files changed, 29 insertions(+), 30 deletions(-) commit d9087c49d4388e3f35f09a5cf7ed6e09c9106604 Author: John Johansen Date: Fri Jan 27 03:53:53 2017 -0800 apparmor: drop cred_ctx and reference the label directly With the task domain change information now stored in the task->security context, the cred->security context only stores the label. We can get rid of the cred_ctx and directly reference the label, removing a layer of indirection, and unneeded extra allocations. Signed-off-by: John Johansen security/apparmor/context.c | 83 ++++++++++--------------------------- security/apparmor/domain.c | 14 +++---- security/apparmor/include/context.h | 24 +++-------- security/apparmor/lsm.c | 55 +++++++----------------- 4 files changed, 47 insertions(+), 129 deletions(-) commit 3b529a7600d834f450ac244f43a7c082687284b4 Author: John Johansen Date: Fri Jan 20 01:59:25 2017 -0800 apparmor: move task domain change info to task security The task domain change info is task specific and its and abuse of the cred to store the information in there. Now that a task->security field exists store it in the proper place. Signed-off-by: John Johansen security/apparmor/context.c | 91 +++++++++++++++++++++++++------------ security/apparmor/domain.c | 14 +++--- security/apparmor/include/context.h | 31 +++++++++---- security/apparmor/lsm.c | 48 ++++++++++++++++--- 4 files changed, 132 insertions(+), 52 deletions(-) commit 4d2f8ba3e3b76e34f84ae1de456934713e9e59af Author: John Johansen Date: Thu Jan 19 14:08:36 2017 -0800 apparmor: rename task_ctx to the more accurate cred_ctx Signed-off-by: John Johansen security/apparmor/context.c | 38 ++++++++++++++++++------------------- security/apparmor/domain.c | 6 +++--- security/apparmor/include/context.h | 19 +++++++++---------- security/apparmor/lsm.c | 26 ++++++++++++------------- security/apparmor/policy.c | 2 +- 5 files changed, 45 insertions(+), 46 deletions(-) commit 3acfd5f54ca16c15c36ac2f218357f2707b7edb8 Author: John Johansen Date: Thu Feb 1 12:32:02 2018 +0100 apparmor: audit unknown signal numbers Allow apparmor to audit the number of a signal that it does not provide a mapping for and is currently being reported only as unknown. Signed-off-by: John Johansen security/apparmor/include/audit.h | 5 ++++- security/apparmor/include/sig_names.h | 1 + security/apparmor/ipc.c | 10 +++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) commit 3dc6b1ce6861ebf40b68ab4b752a05584a1f99bf Author: John Johansen Date: Tue Dec 12 01:02:13 2017 -0800 apparmor: make signal label match work when matching stacked labels Given a label with a profile stack of A//&B or A//&C ... A ptrace rule should be able to specify a generic trace pattern with a rule like signal send A//&**, however this is failing because while the correct label match routine is called, it is being done post label decomposition so it is always being done against a profile instead of the stacked label. To fix this refactor the cross check to pass the full peer label in to the label_match. Signed-off-by: John Johansen security/apparmor/ipc.c | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) commit 1d6583d9c6723d78e446dd203ffd974f6b85ab76 Author: Pravin Shedge Date: Wed Dec 6 23:05:59 2017 +0530 security: apparmor: remove duplicate includes These duplicate includes have been found with scripts/checkincludes.pl but they have been removed manually to avoid removing false positives. Signed-off-by: Pravin Shedge Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 1 - 1 file changed, 1 deletion(-) commit 475bdda1f00074783e18403f3f38a36dd3488430 Author: John Johansen Date: Fri Sep 8 01:13:41 2017 -0700 apparmor: root view labels should not be under user control The root view of the label parse should not be exposed to user control. Signed-off-by: John Johansen Acked-by: Seth Arnold security/apparmor/label.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 71fa373b784e13eb8d68f41b68b9482241e5288c Author: John Johansen Date: Mon Sep 11 12:57:39 2017 -0700 apparmor: cleanup add proper line wrapping to nulldfa.in nulldfa.in makes for a very long unwrapped line, which certain tools do not like. So add line breaks. Signed-off-by: John Johansen security/apparmor/nulldfa.in | 108 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 1 deletion(-) commit 95652cac83605d96cf3849e80e3e3f4dce74f5da Author: John Johansen Date: Wed Sep 6 16:33:56 2017 -0700 apparmor: provide a bounded version of label_parse some label/context sources might not be guaranteed to be null terminiated provide a size bounded version of label parse to deal with these. Signed-off-by: John Johansen Acked-by: Seth Arnold security/apparmor/include/label.h | 3 +++ security/apparmor/label.c | 35 ++++++++++++++++++++++++----------- 2 files changed, 27 insertions(+), 11 deletions(-) commit 6e0654d20ed9679cbf75a0ff7cd786e364f7f09a Author: John Johansen Date: Wed Sep 6 14:57:59 2017 -0700 apparmor: use the dfa to do label parse string splitting The current split scheme is actually wrong in that it splits ///& where that is invalid and should fail. Use the dfa to do a proper bounded split without having to worry about getting the string processing right in code. Signed-off-by: John Johansen Acked-by: Seth Arnold security/apparmor/include/label.h | 25 ++++++++ security/apparmor/include/match.h | 1 + security/apparmor/label.c | 12 ++-- security/apparmor/match.c | 29 ++++++++-- security/apparmor/stacksplitdfa.in | 114 +++++++++++++++++++++++++++++++++++++ 5 files changed, 170 insertions(+), 11 deletions(-) commit cf65fabc2a2c8c12031678d86a2bd4a660865011 Author: John Johansen Date: Wed Sep 6 02:53:15 2017 -0700 apparmor: add first substr match to dfa Signed-off-by: John Johansen Acked-by: Seth Arnold security/apparmor/include/match.h | 4 ++ security/apparmor/match.c | 120 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+) commit a6a52579e52b55448326db88bd9a5740e7c1a037 Author: John Johansen Date: Sat Feb 3 20:08:28 2018 +0100 apparmor: split load data into management struct and data blob Splitting the management struct from the actual data blob will allow us in the future to do some sharing and other data reduction techniques like replacing the the raw data with compressed data. Prepare for this by separating the management struct from the data blob. Signed-off-by: John Johansen security/apparmor/include/policy_unpack.h | 2 +- security/apparmor/policy_unpack.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) commit 98cf5bbff413eadf1b9cb195a7b80cc61c72a50e Author: John Johansen Date: Thu Feb 1 11:24:10 2018 +0100 apparmor: fix logging of the existence test for signals The existence test is not being properly logged as the signal mapping maps it to the last entry in the named signal table. This is done to help catch bugs by making the 0 mapped signal value invalid so that we can catch the signal value not being filled in. When fixing the off-by-one comparision logic the reporting of the existence test was broken, because the logic behind the mapped named table was hidden. Fix this by adding a define for the name lookup and using it. Cc: Stable Fixes: f7dc4c9a855a1 ("apparmor: fix off-by-one comparison on MAXMAPPED_SIG") Signed-off-by: John Johansen security/apparmor/include/sig_names.h | 4 +++- security/apparmor/ipc.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) commit b5beb07ad32ab533027aa988d96a44965ec116f7 Author: John Johansen Date: Fri Feb 9 04:57:39 2018 -0800 apparmor: fix resource audit messages when auditing peer Resource auditing is using the peer field which is not available when the rlim data struct is used, because it is a different element of the same union. Accessing peer during resource auditing could cause garbage log entries or even oops the kernel. Move the rlim data block into the same struct as the peer field so they can be used together. CC: Fixes: 86b92cb782b3 ("apparmor: move resource checks to using labels") Signed-off-by: John Johansen security/apparmor/include/audit.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 040d9e2bce0a5b321c402b79ee43a8e8d2fd3b06 Author: John Johansen Date: Tue Jan 23 01:47:42 2018 -0800 apparmor: fix display of .ns_name for containers The .ns_name should not be virtualized by the current ns view. It needs to report the ns base name as that is being used during startup as part of determining apparmor policy namespace support. BugLink: http://bugs.launchpad.net/bugs/1746463 Fixes: d9f02d9c237aa ("apparmor: fix display of ns name") Cc: Stable Reported-by: Serge Hallyn Tested-by: Serge Hallyn Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6a20fe7b17cd7ecd4b75dd82cfa6664780d6f923 Author: Ville Syrjälä Date: Wed Feb 7 18:48:41 2018 +0200 drm/i915: Give all ioctl functions an _ioctl suffix Most of our ioctl functions have an _ioctl suffix in the name. I like that idea since it makes it easy to figure out how the function is going to get called. Rename the handful of exceptions to follow the same pattern. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180207164841.19431-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.c | 14 +++++++------- drivers/gpu/drm/i915/i915_drv.h | 8 ++++---- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 8 ++++---- drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 8 ++++---- drivers/gpu/drm/i915/intel_sprite.c | 4 ++-- 6 files changed, 23 insertions(+), 23 deletions(-) commit 89746e790ae5840d23f244c98cab6f45625463b4 Author: Ville Syrjälä Date: Tue Feb 6 22:43:33 2018 +0200 drm/i915: Reject undefined colorkey flags Check that userspace isn't passing in garbage in the colorkey ioctl flags. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180206204333.4399-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_sprite.c | 3 +++ 1 file changed, 3 insertions(+) commit 928f0cd0eb0511e19b416e34a030ebff6785fa52 Author: Imre Deak Date: Thu Feb 8 13:23:31 2018 +0200 drm/i915/snb+: Remove incorrect forcewake check in debugfs/i915_drpc_info FORCEWAKE_ACK is depricated by BSpec at least starting from BDW, referring to the multi-threaded version of it instead. Accessing FORCEWAKE_ACK triggers an unclaimed register access error - at least on GLK - see the Reference: below. The correct registers to use would be FORCEWAKE_MT_ACK on IVB+ and FORCEWAKE_ACK_RENDER_GEN9 on SKL+ like it's done elsewhere in the driver. The forcewake check itself is inconsistent and redundant, since there could be other forcewake requesters besides the kernel (being the multithreaded version of the register) and the kernel's per-domain forcewake counters are shown anyway at the end of the file. So let's just remove the check. Suggested-by: Chris Wilson Cc: Ville Syrjälä Cc: Chris Wilson Cc: Mika Kuoppala Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103337 Signed-off-by: Imre Deak Tested-by: Lionel Landwerlin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180208112331.12986-1-imre.deak@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 13 ------------- 1 file changed, 13 deletions(-) commit 8e47b4b65bbd646b4d8be28e1ffff7a684f60fe6 Author: Chris Wilson Date: Thu Feb 8 15:12:24 2018 +0000 drm/i915: Remove redundant check on execlists interrupt Since commit 4a118ecbe99c ("drm/i915: Filter out spurious execlists context-switch interrupts") we probe execlists->active, and no longer have to peek at the execlist interrupt to determine if the tasklet still needs to be run to drain the ELSP. References: 4a118ecbe99c ("drm/i915: Filter out spurious execlists context-switch interrupts") Signed-off-by: Chris Wilson Cc: Michal Winiarski Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180208151224.16285-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_engine_cs.c | 4 ---- 1 file changed, 4 deletions(-) commit 2927e4211f76893249cfa8e7ac5fe1c73ae791c1 Author: Chris Wilson Date: Thu Feb 8 16:39:39 2018 +0000 drm/i915/crt: Silence compiler warning for uninitialised status clang is confused by our if-else-chain that abruptly exits before a final else: drivers/gpu/drm/i915/intel_crt.c:821:11: warning: variable 'status' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] else if (ret < 0) ^~~~~~~ drivers/gpu/drm/i915/intel_crt.c:826:9: note: uninitialized use occurs here return status; ^~~~~~ drivers/gpu/drm/i915/intel_crt.c:821:7: note: remove the 'if' if its condition is always true else if (ret < 0) ^~~~~~~~~~~~ drivers/gpu/drm/i915/intel_crt.c:761:12: note: initialize the variable 'status' to silence this warning int status, ret; In this case, we can reduce the final else-if clause to an unconditional else. Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180208163939.27030-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_crt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f0fa739a3448e48b75e96c962853b73b1a11d6e1 Author: Chris Wilson Date: Sat Dec 9 22:21:33 2017 +0000 drm/i915: Avoid leaking lpe audio platdev.data The struct platform_device memdups the provided data pointer requiring us to free the template we construct during lpe_audio_platdev_create(): unreferenced object 0xffff88026eafe400 (size 512): comm "insmod", pid 6850, jiffies 4295060179 (age 22.300s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<000000008e4a834c>] intel_audio_init+0x9/0x30 [i915] [<000000001360e195>] i915_driver_load+0x802/0x14e0 [i915] [<00000000ab3f0e99>] i915_pci_probe+0x29/0x70 [i915] [<0000000016330ee5>] pci_device_probe+0x9c/0x120 [<000000000257d054>] driver_probe_device+0x307/0x470 [<000000009f0a6cb6>] __driver_attach+0x98/0xe0 [<0000000031b46e58>] bus_for_each_dev+0x57/0x80 [<000000000e28239d>] bus_add_driver+0x1bd/0x260 [<00000000abbe5161>] driver_register+0x52/0xc0 [<000000005c6e23d4>] do_one_initcall+0x36/0x150 [<00000000a55002f4>] do_init_module+0x56/0x1d7 [<00000000e48f2217>] load_module+0x23c8/0x2910 [<000000002b60bf61>] SyS_finit_module+0xb8/0xd0 [<0000000041cbad96>] entry_SYSCALL_64_fastpath+0x17/0x70 [<000000009f1d37ab>] 0xffffffffffffffff Signed-off-by: Chris Wilson Cc: Takashi Iwai Cc: Pierre-Louis Bossart Cc: Ville Syrjälä Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20171209222133.31880-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lpe_audio.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 6a05d290046447fca311022004a4725f3f627dc9 Author: Chris Wilson Date: Thu Feb 8 16:16:39 2018 +0000 drm/i915: Disable unused-but-set compiler warning The unused-but-set warning enabled by W=1 catches out a lot of the atomic helper iterator macros and drown us in their noise (or trip over Werror and die). Path of least resistance is to ignore the warning. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180208161639.27511-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/Makefile | 1 + 1 file changed, 1 insertion(+) commit 40f46095db0691bc39f5ce916eab9c3e6136c912 Author: Chris Wilson Date: Thu Feb 8 11:42:24 2018 +0000 drm/i915: Fix kerneldoc warnings for i915_gem_internal drivers/gpu/drm/i915/i915_gem_internal.c:183: warning: No description found for parameter 'i915' drivers/gpu/drm/i915/i915_gem_internal.c:183: warning: No description found for parameter 'size' Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180208114224.27271-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_internal.c | 4 ++++ 1 file changed, 4 insertions(+) commit 86effbe0d198aaf57459ec9ad3855e88e29ecb1c Author: Dan Carpenter Date: Thu Feb 8 10:25:28 2018 +0300 regmap-i2c: Off by one in regmap_i2c_smbus_i2c_read/write() The commit message says that we are allowed to read and write up to 32 bytes but the code only allows us to write 31 bytes. In other words, the ">=" should be changed to ">". But this is already checked in regmap_raw_read()/write() so we can just remove the if statemetents. Fixes: 29332534e2b6 ("regmap-i2c: Add smbus i2c block support") Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown drivers/base/regmap/regmap-i2c.c | 4 ---- 1 file changed, 4 deletions(-) commit f00e71091ab92eba52122332586c6ecaa9cd1a56 Author: Dan Carpenter Date: Thu Feb 8 10:23:44 2018 +0300 regmap: Fix reversed bounds check in regmap_raw_write() We're supposed to be checking that "val_len" is not too large but instead we check if it is smaller than the max. The only function affected would be regmap_i2c_smbus_i2c_write() in drivers/base/regmap/regmap-i2c.c. Strangely that function has its own limit check which returns an error if (count >= I2C_SMBUS_BLOCK_MAX) so it doesn't look like it has ever been able to do anything except return an error. Fixes: c335931ed9d2 ("regmap: Add raw_write/read checks for max_raw_write/read sizes") Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/base/regmap/regmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 204bcfef60d082f88dcb12051f5740cc92ed4dc9 Author: Chris Wilson Date: Thu Feb 8 11:39:17 2018 +0000 drm/i915: Fix kerneldoc warnings in i915_gem_execbuffer drivers/gpu/drm/i915/i915_gem_execbuffer.c:1983: warning: No description found for parameter 'dev_priv' drivers/gpu/drm/i915/i915_gem_execbuffer.c:1983: warning: No description found for parameter 'file' Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180208113917.8439-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb8269b54d75e4742fbe3ae994fb2f69b7283b40 Author: Chris Wilson Date: Thu Feb 8 10:54:49 2018 +0000 drm/i915: Fix kerneldoc parameter markup drivers/gpu/drm/i915/i915_syncmap.c:92: warning: No description found for parameter 'root' drivers/gpu/drm/i915/i915_syncmap.c:155: warning: No description found for parameter 'root' drivers/gpu/drm/i915/i915_syncmap.c:155: warning: No description found for parameter 'id' drivers/gpu/drm/i915/i915_syncmap.c:155: warning: No description found for parameter 'seqno' drivers/gpu/drm/i915/i915_syncmap.c:354: warning: No description found for parameter 'root' drivers/gpu/drm/i915/i915_syncmap.c:354: warning: No description found for parameter 'id' drivers/gpu/drm/i915/i915_syncmap.c:354: warning: No description found for parameter 'seqno' drivers/gpu/drm/i915/i915_syncmap.c:396: warning: No description found for parameter 'root' Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180208105449.29880-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_syncmap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 34e07e42c55aeaa78e93b057a6664e2ecde3fadb Author: Chris Wilson Date: Thu Feb 8 10:54:48 2018 +0000 drm/i915: Add missing kerneldoc for 'ent' in i915_driver_init_early drivers/gpu/drm/i915/i915_drv.c:891: warning: No description found for parameter 'ent' Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180208105449.29880-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 1 + 1 file changed, 1 insertion(+) commit 3d4b7caf2ba2773e9beda85c5e031dfffc6644af Author: Chris Wilson Date: Thu Feb 8 11:15:59 2018 +0000 drm/i915: Remove lost comment from i915_gem_context The comment is very old and quite misleading now. drivers/gpu/drm/i915/i915_gem_context.c:349: warning: No description found for parameter 'dev_priv' drivers/gpu/drm/i915/i915_gem_context.c:349: warning: No description found for parameter 'file_priv' Signed-off-by: Chris Wilson Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20180208111559.32663-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 5 ----- 1 file changed, 5 deletions(-) commit d8802126da6869c2fc3a51e7475846e9c54f3ffb Author: Chris Wilson Date: Thu Feb 8 11:14:53 2018 +0000 drm/i915: Fix kerneldoc warnings for i915_gem_request drivers/gpu/drm/i915/i915_gem_request.c:941: warning: No description found for parameter 'write' Signed-off-by: Chris Wilson Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20180208111453.32567-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5a5ae2abe3ba776da8c384e362dc0d2b7dc93d7 Author: Chris Wilson Date: Thu Feb 8 11:13:28 2018 +0000 drm/i915: Fix kerneldoc warnings for i915_gem_userptr drivers/gpu/drm/i915/i915_gem_userptr.c:761: warning: No description found for parameter 'dev' drivers/gpu/drm/i915/i915_gem_userptr.c:761: warning: No description found for parameter 'data' drivers/gpu/drm/i915/i915_gem_userptr.c:761: warning: No description found for parameter 'file' Signed-off-by: Chris Wilson Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20180208111328.32422-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_userptr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 179f402550cf0f5ba9338297469be56f823a2331 Author: Chris Wilson Date: Thu Feb 8 11:12:20 2018 +0000 drm/i915: Fix kerneldoc warnings for intel_ringbuffer drivers/gpu/drm/i915/intel_ringbuffer.c:179: warning: No description found for parameter 'req' drivers/gpu/drm/i915/intel_ringbuffer.c:741: warning: No description found for parameter 'req' drivers/gpu/drm/i915/intel_ringbuffer.c:741: warning: No description found for parameter 'cs' Signed-off-by: Chris Wilson Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20180208111220.32293-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_ringbuffer.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit d03133a82dc2abd4aa3852ea35570ba82ea36201 Author: Chris Wilson Date: Thu Feb 8 11:11:05 2018 +0000 drm/i915: Fix kerneldoc warnings for i915_gpu_error drivers/gpu/drm/i915/i915_gpu_error.c:1815: warning: No description found for parameter 'dev_priv' drivers/gpu/drm/i915/i915_gpu_error.c:1815: warning: No description found for parameter 'engine_mask' drivers/gpu/drm/i915/i915_gpu_error.c:1815: warning: No description found for parameter 'error_msg' drivers/gpu/drm/i915/i915_gpu_error.c:1815: warning: Excess function parameter 'dev' description in 'i915_capture_error_state' Signed-off-by: Chris Wilson Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20180208111105.32149-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gpu_error.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 097114aa6eb2aa206c8cf136de77ebffe424234c Author: Dave Young Date: Sat Jan 27 12:11:29 2018 +0800 print kdump kernel loaded status in stack dump It is useful to print kdump kernel loaded status in dump_stack() especially when panic happens so that we can differenciate kdump kernel early hang and a normal panic in a bug report. Link: http://lkml.kernel.org/r/20180127041129.GA29016@dhcp-128-65.nay.redhat.com To: Steven Rostedt To: Andi Kleen To: kexec@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org Cc: kexec@lists.infradead.org Signed-off-by: Dave Young Reviewed-by: Sergey Senozhatsky Reviewed-by: Simon Horman Signed-off-by: Petr Mladek kernel/printk/printk.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a1ab7dcf634f9e5f8e8d25fec4cc4d46602c146c Author: Chris Wilson Date: Wed Feb 7 22:28:24 2018 +0000 drm/i915: Wait for gen3 reset status to be asserted After we assert the reset request (and wait for 20us), when the device has been fully reset it asserts the reset-status bit. Before we stop requesting the reset and allow the device to return to normal, we should wait for the reset to be completed. (Similar to how we wait for the device to return to normal after deasserting the reset request.) v2: Rename i915_reset_completed() probe to not cause as much confusion. Signed-off-by: Chris Wilson Cc: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180207222824.29864-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_uncore.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit bc8f2f5db9d75e7f990fb8362c28a8d2a7f33c9c Author: Chris Wilson Date: Thu Feb 8 07:28:00 2018 +0000 drm/i915: Be paranoid and post the writes to stop the rings Although the mmio are uncached and so should be flushed on every write, be paranoid and do a mmio read after setting the ring head/tail to be sure they have taken effect before moving on. v2: post tail to be pleasing to the eye Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180208072800.595-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_uncore.c | 2 ++ 1 file changed, 2 insertions(+) commit 0d73e7a095f768fad5a002bf6732c675e2aee44b Author: Chris Wilson Date: Wed Feb 7 15:13:50 2018 +0000 drm/i915: Mark the device as wedged from the beginning of set-wedged Reduce the window of opportunity for set-wedged being called concurrently with reset (after i915_reset() has performed the i915_gem_unset_wedged()) by moving the set_bit(I915_WEDGED) to before we complete the inflight requests. When i915_reset() is being blocked on a request, such completion may allow it to start and beginning resetting the GPU before i915_gem_set_wedged() has finished (and so before set-wedge will have marked the device as wedged). As such, i915_gem_init_hw() may see a wedged device even from inside i915_reset(). References: 36703e79a982 ("drm/i915: Break modeset deadlocks on reset") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180207151350.20883-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 11a18f631959fd1ca10856c836a827683536770c Author: Chris Wilson Date: Thu Feb 8 08:51:51 2018 +0000 drm/i915: Avoid truncation before clamping userspace's priority value Userspace provides a 64b value for the priority, we need to be careful to preserve the full range before validation to prevent truncation (and letting an illegal value pass). Reported-by: Antonio Argenziano Fixes: ac14fbd460d0 ("drm/i915/scheduler: Support user-defined priorities") Signed-off-by: Chris Wilson Cc: Antonio Argenziano Cc: Michal Winiarski Cc: Mika Kuoppala Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180208085151.11480-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 253a281727d552200c4cddb0cc08cb2e95939603 Author: Chris Wilson Date: Tue Feb 6 14:31:37 2018 +0000 drm/i915: Remove superfluous worker wakeups when RPS is already boosted We only need to wake up the RPS worker once when initially enabling the client boost, it remains in effect then until the last client no longer requires the boost. References: https://bugs.freedesktop.org/show_bug.cgi?id=102250 References: 7b92c1bd0540 ("drm/i915: Avoid keeping waitboost active for signaling threads") Signed-off-by: Chris Wilson Cc: Michał Winiarski Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180206143137.15509-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 6 ++++-- drivers/gpu/drm/i915/intel_pm.c | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) commit 020580ff8edd50e64ae1bf47e560c61e5e2f29fc Author: Chris Wilson Date: Thu Feb 8 10:24:03 2018 +0000 drm/i915/perf: Fix compiler warning for string truncation drivers/gpu/drm/i915/i915_oa_cnl.c: In function ‘i915_perf_load_test_config_cnl’: drivers/gpu/drm/i915/i915_oa_cnl.c:99:2: error: ‘strncpy’ output truncated before terminating nul copying 36 bytes from a string of the same length [-Werror=stringop-truncation] v2: strlcpy Fixes: 95690a02fb5d ("drm/i915/perf: enable perf support on CNL") Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Matthew Auld Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20180208102403.5587-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_oa_cnl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 43df81d324cdd7056ad0ce3df709aff8dce856b7 Author: Chris Wilson Date: Thu Feb 8 10:24:02 2018 +0000 drm/i915/perf: Fix compiler warning for string truncation drivers/gpu/drm/i915/i915_oa_cflgt3.c: In function ‘i915_perf_load_test_config_cflgt3’: drivers/gpu/drm/i915/i915_oa_cflgt3.c:87:2: error: ‘strncpy’ output truncated before terminating nul copying 36 bytes from a string of the same length [-Werror=stringop-truncation] v2: strlcpy Fixes: 4407eaa9b0cc ("drm/i915/perf: add support for Coffeelake GT3") Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Matthew Auld Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20180208102403.5587-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_oa_cflgt3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9569002a39cdc17b11f415f16215ec2428dad902 Author: Philippe CORNU Date: Thu Feb 1 11:42:43 2018 +0100 drm/stm: ltdc: remove non-alpha color formats on layer 2 for older hw Hw older versions support non-alpha color formats derived from native alpha color formats only on the primary layer. For instance, RG16 native format without alpha works fine on 2nd layer but XR24 (derived color format from AR24) does not work on 2nd layer. Signed-off-by: Philippe Cornu Reviewed-by: Yannick Fertré Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20180201104243.20726-3-philippe.cornu@st.com drivers/gpu/drm/stm/ltdc.c | 20 ++++++++++++++++++++ drivers/gpu/drm/stm/ltdc.h | 1 + 2 files changed, 21 insertions(+) commit aefa830199c3d07e198d44f55aa781f119937854 Author: Philippe CORNU Date: Thu Feb 1 11:42:42 2018 +0100 drm/stm: ltdc: add non-alpha color formats ltdc supports natively some color formats with alpha (like ARGB8888, ARGB1555, ARGB4444...). Related non-alpha formats are supported too (ARGB8888->XRGB8888, ARGB4444->XRGB4444...) by adjusting ltdc blending factors. Note: Wayland/Weston requests by default the non-alpha XRGB8888 color format. Signed-off-by: Philippe Cornu Reviewed-by: Yannick Fertré Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20180201104243.20726-2-philippe.cornu@st.com drivers/gpu/drm/stm/ltdc.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) commit ce1599a40da20b0e5e4175fe3ef647d2862cbf41 Author: Daniele Ceraolo Spurio Date: Wed Feb 7 13:24:40 2018 -0800 drm/i915: do not stop engines on sanitize if i915.reset=0 Since commit 5896a5c8c9c0 (drm/i915: Always stop the rings before a missing GPU reset) we attempt to stop the engines during gem_sanitize even if reset=0 and nothing bad happened on the gpu. The specs says that the STOP_RINGS bit needs to be cleared to resume normal operation, but for some reason the value of the bit seems to be changing without us writing to it (maybe rc6 entry/exit?), so normal operation resumes correctly. However, it still feels incorrect to stop the engines if there hasn't been any issue so skip the whole reset call in gem_sanitize if i915.reset=0 Cc: Chris Wilson Cc: Mika Kuoppala Signed-off-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20180207212440.13438-1-daniele.ceraolospurio@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d63763749127b483ba042b2939ba39fd79792330 Author: Chris Wilson Date: Wed Feb 7 21:05:44 2018 +0000 drm/i915: Only allocate preempt context when required If we remove some hardcoded assumptions about the preempt context having a fixed id, reserved from use by normal user contexts, we may only allocate the i915_gem_context when required. Then the subsequent decisions on using preemption reduce to having the preempt context available. v2: Include an assert that we don't allocate the preempt context twice. Signed-off-by: Chris Wilson Cc: Michal Winiarski Cc: Tvrtko Ursulin Cc: Arkadiusz Hiler Cc: Mika Kuoppala Cc: Daniele Ceraolo Spurio Acked-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20180207210544.26351-3-chris@chris-wilson.co.uk Reviewed-by: Michel Thierry drivers/gpu/drm/i915/i915_gem_context.c | 31 ++++++++++++------------ drivers/gpu/drm/i915/intel_engine_cs.c | 6 ++--- drivers/gpu/drm/i915/intel_guc_submission.c | 24 +++++++++--------- drivers/gpu/drm/i915/intel_lrc.c | 17 ++++++++----- drivers/gpu/drm/i915/intel_ringbuffer.h | 5 ++++ drivers/gpu/drm/i915/selftests/mock_gem_device.c | 6 ----- 6 files changed, 48 insertions(+), 41 deletions(-) commit 3fed180812edebac7d04b94a69da33b4f8532907 Author: Chris Wilson Date: Wed Feb 7 21:05:43 2018 +0000 drm/i915: Move the scheduler feature bits into the purview of the engines Rather than having the high level ioctl interface guess the underlying implementation details, having the implementation declare what capabilities it exports. We define an intel_driver_caps, similar to the intel_device_info, which instead of trying to describe the HW gives details on what the driver itself supports. This is then populated by the engine backend for the new scheduler capability field for use elsewhere. v2: Use caps.scheduler for validating CONTEXT_PARAM_SET_PRIORITY (Mika) One less assumption of engine[RCS] \o/ Signed-off-by: Chris Wilson Cc: Tomasz Lis Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Michal Wajdeczko Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Reviewed-by: Tomasz Lis Link: https://patchwork.freedesktop.org/patch/msgid/20180207210544.26351-2-chris@chris-wilson.co.uk Reviewed-by: Michel Thierry drivers/gpu/drm/i915/i915_debugfs.c | 1 + drivers/gpu/drm/i915/i915_drv.c | 8 +------- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gem.c | 3 +++ drivers/gpu/drm/i915/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 7 +++++-- drivers/gpu/drm/i915/intel_device_info.c | 6 ++++++ drivers/gpu/drm/i915/intel_device_info.h | 7 +++++++ drivers/gpu/drm/i915/intel_lrc.c | 6 ++++++ 9 files changed, 32 insertions(+), 10 deletions(-) commit e78c91754d6cc6708db139822166b6708c0b172f Author: Chris Wilson Date: Wed Feb 7 21:05:42 2018 +0000 drm/i915/guc: Allow preempt-client to be NULL In the next patch, we may only conditionally allocate the preempt-client if there is a global preempt context and so we need to be prepared in case the preempt-client itself is NULL. v2: Grep for more preempt_client. Signed-off-by: Chris Wilson Cc: Michal Winiarski Cc: Arkadiusz Hiler Cc: Daniele Ceraolo Spurio Cc: Michel Thierry Cc: Michal Wajdeczko Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180207210544.26351-1-chris@chris-wilson.co.uk Reviewed-by: Michel Thierry drivers/gpu/drm/i915/i915_debugfs.c | 8 +++++--- drivers/gpu/drm/i915/intel_guc_submission.c | 27 +++++++++++++++++---------- drivers/gpu/drm/i915/selftests/intel_guc.c | 20 +++++++++++--------- 3 files changed, 33 insertions(+), 22 deletions(-) commit f03e19579c501accb26f273883962c29d11e977e Author: Philippe Cornu Date: Tue Feb 6 09:42:51 2018 +0100 drm/bridge/synopsys: dsi: Add 1.31 version support Add support for the Synopsys DesignWare MIPI DSI version 1.31 Two registers need to be updated/added for supporting 1.31: * PHY_TMR_CFG 0x9c (updated) 1.30 [31:24] phy_hs2lp_time [23:16] phy_lp2hs_time [14: 0] max_rd_time 1.31 [25:16] phy_hs2lp_time [ 9: 0] phy_lp2hs_time * PHY_TMR_RD_CFG 0xf4 (new) 1.31 [14: 0] max_rd_time Signed-off-by: Philippe Cornu Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20180206084251.303-1-philippe.cornu@st.com drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit a009c53e8dead27f4917b389c3d7ea528dcb67fb Author: Philippe Cornu Date: Sun Feb 4 22:31:04 2018 +0100 drm/bridge/synopsys: dsi: Add read feature This patch adds the DCS/GENERIC DSI read feature. Signed-off-by: Philippe Cornu Reviewed-by: Andrzej Hajda Reviewed-by: Brian Norris Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20180204213104.17834-1-philippe.cornu@st.com drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 58 +++++++++++++++++++++------ 1 file changed, 45 insertions(+), 13 deletions(-) commit 05273c950a3c93c5f96be8807eaf24f2cc9f1c1e Author: Chris Wilson Date: Wed Feb 7 16:04:28 2018 +0000 drm/i915/pmu: Fix building without CONFIG_PM As we peek inside struct device to query members guarded by CONFIG_PM, so must be the code. Reported-by: kbuild test robot Fixes: 1fe699e30113 ("drm/i915/pmu: Fix sleep under atomic in RC6 readout") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180207160428.17015-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_pmu.c | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) commit 1fe699e30113ed6f6e853ff44710d256072ea627 Author: Tvrtko Ursulin Date: Tue Feb 6 18:33:11 2018 +0000 drm/i915/pmu: Fix sleep under atomic in RC6 readout We are not allowed to call intel_runtime_pm_get from the PMU counter read callback since the former can sleep, and the latter is running under IRQ context. To workaround this, we record the last known RC6 and while runtime suspended estimate its increase by querying the runtime PM core timestamps. Downside of this approach is that we can temporarily lose a chunk of RC6 time, from the last PMU read-out to runtime suspend entry, but that will eventually catch up, once device comes back online and in the presence of PMU queries. Also, we have to be careful not to overshoot the RC6 estimate, so once resumed after a period of approximation, we only update the counter once it catches up. With the observation that RC6 is increasing while the device is suspended, this should not pose a problem and can only cause slight inaccuracies due clock base differences. v2: Simplify by estimating on top of PM core counters. (Imre) Signed-off-by: Tvrtko Ursulin Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104943 Fixes: 6060b6aec03c ("drm/i915/pmu: Add RC6 residency metrics") Testcase: igt/perf_pmu/rc6-runtime-pm Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: Imre Deak Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: David Airlie Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180206183311.17924-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_pmu.c | 93 ++++++++++++++++++++++++++++++++++------- drivers/gpu/drm/i915/i915_pmu.h | 6 +++ 2 files changed, 84 insertions(+), 15 deletions(-) commit 8177e1125235a40c1af110e37febf6bb1e7b3f81 Author: Chris Wilson Date: Wed Feb 7 11:15:45 2018 +0000 drm/i915: Tidy up some error messages around reset failure On blb and pnv, we are seeing sporadic i915 0000:00:02.0: Resetting chip after gpu hang [drm:intel_gpu_reset [i915]] rcs0: timed out on STOP_RING [drm:i915_reset [i915]] *ERROR* Failed hw init on reset -5 which notably lack the actual root cause of the error. Ostensibly it should be the init_ring_common() that failed, but it's error paths are covered by DRM_ERROR. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180207111545.17078-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 6 ++++-- drivers/gpu/drm/i915/i915_gem.c | 11 ++++++++--- drivers/gpu/drm/i915/intel_ringbuffer.c | 18 +++++++++--------- 3 files changed, 21 insertions(+), 14 deletions(-) commit c22b355ff7fd60378c55d1401530287fea4e3a96 Author: Chris Wilson Date: Wed Feb 7 08:43:49 2018 +0000 drm/i915: Trim the retired request queue after submitting If we submit a request and see that the previous request on this timeline was already signaled, we first do not need to add the dependency tracker for that completed request and secondly we know that we there is then a large backlog in retiring requests affecting this timeline. Given that we just submitted more work to the HW, now would be a good time to catch up on those retirements. v2: Try to sum up the compromises involved in flushing the retirement queue after submission. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180207084350.3929-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 8ac71d1db1f8ebc68540cda131492927f46f334c Author: Chris Wilson Date: Wed Feb 7 08:43:50 2018 +0000 drm/i915: Skip request serialisation if the timeline is already complete If the last request on the timeline is already complete, we do not need to emit the serialisation barriers. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180207084350.3929-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 31dade7df4605b4b40f2c026f15aa188916ea420 Author: Maarten Lankhorst Date: Mon Feb 5 11:58:41 2018 +0100 drm/i915: Ignore minimum lines for level 0 in skl_compute_plane_wm, v2. According to bspec, result_lines > 31 is only a maximum for latency level 1 through 7. For level 0 the number of lines is ignored, so always write 0 there to prevent overflowing the 5 bits value. This is required to make NV12 work. Changes since v1: - Rebase on top of GEN11 wm changes. It seems to use res_lines for level 0 limit calculations, but still doesn't appear to program it. Signed-off-by: Maarten Lankhorst Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20180205105841.31634-1-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/intel_pm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fd10e2ce9905030d922e179a8047a4d50daffd8e Author: Chris Wilson Date: Tue Feb 6 09:46:33 2018 +0000 drm/i915/breadcrumbs: Ignore unsubmitted signalers When a request is preempted, it is unsubmitted from the HW queue and removed from the active list of breadcrumbs. In the process, this however triggers the signaler and it may see the clear rbtree with the old, and still valid, seqno, or it may match the cleared seqno with the now zero rq->global_seqno. This confuses the signaler into action and signaling the fence. Fixes: d6a2289d9d6b ("drm/i915: Remove the preempted request from the execution queue") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: # v4.12+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180206094633.30181-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit 06633ee14d5c9bff3b46be67be2824138c75594a Author: Jia-Ju Bai Date: Sat Jan 27 18:03:52 2018 +0800 Bluetooth: hci_ll: Replace mdelay with msleep in download_firmware download_firmware() is never called from atomic context. It is only called by ll_setup() that is called only via function pointer "->setup" used in hci_uart_setup() in drivers/bluetooth/hci_serdev.c and drivers/bluetooth/hci_ldisc.c. hci_uart_setup() is called only via function pointer "->setup" used in hci_dev_do_open() in net/bluetooth/hci_core.c. All of the above functions do not enter atomic context. Besides, ll_setup() calls msleep() and hci_dev_do_open calls mutex_lock(). So it indicates that all the above functions call functions that can sleep. Despite never getting called from atomic context, download_firmware() calls mdelay() for busy wait. That is not necessary and can be replaced with msleep to avoid busy wait. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ebbf046273e50cf3cbf2ec13d520dc74ab454d4 Author: Jia-Ju Bai Date: Fri Jan 26 23:57:01 2018 +0800 Bluetooth: btmrvl_main: Replace GFP_ATOMIC with GFP_KERNEL in btmrvl_send_sync_cmd After checking all possible call chains to btmrvl_send_sync_cmd(), my tool finds that this function is never called in atomic context, namely never in an interrupt handler or holding a spinlock. And it calls wait_event_interruptible_timeout() after bt_skb_alloc(), so it indicates that btmrvl_send_sync_cmd() can call function which can sleep. Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 688d6240e0646a56ff8bdffb2310dcdeca354814 Author: Jia-Ju Bai Date: Sat Jan 27 18:17:38 2018 +0800 Bluetooth: hci_ath: Replace mdelay with msleep in ath_wakeup_ar3k ath_wakeup_ar3k() is never called from atomic context. It is only called by ath_hci_uart_work() that is only called in ath_open() via INIT_WORK(). All of the above functions do not enter atomic context along the way. Despite never getting called from atomic context, ath_wakeup_ar3k() calls mdelay() for busy wait. That is not necessary and can be replaced with msleep to avoid busy wait. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ath.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a21963aacfe88fdbfe6166781d4ccd159197bd6 Author: Maxim Zhukov Date: Mon Feb 5 00:09:47 2018 +0300 Bluetooth: ath3k: fix checkpatch warning This patch fixed warning: WARNING: Prefer using '"%s...", __func__' to using 'ath3k_disconnect', this function's name, in a string #568: FILE: drivers/bluetooth/ath3k.c:568: + BT_DBG("ath3k_disconnect intf %p", intf); Signed-off-by: Maxim Zhukov Signed-off-by: Marcel Holtmann drivers/bluetooth/ath3k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d08f43c73c4144517e31f3cf7564f98e81fd28f Author: Maxim Zhukov Date: Mon Feb 5 00:09:46 2018 +0300 Bluetooth: ath3k: Fix warning: quoted string split across lines This patch avoided the warning: WARNING: quoted string split across lines #355: FILE: drivers/bluetooth/ath3k.c:355: + BT_ERR("Error in firmware loading err = %d," + "len = %d, size = %d", err, len, size); This patch fix this issue. Signed-off-by: Maxim Zhukov Signed-off-by: Marcel Holtmann drivers/bluetooth/ath3k.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit f13b3d7e81bd8b40a42c2fe5304b2fc53d638378 Author: Maxim Zhukov Date: Mon Feb 5 00:09:45 2018 +0300 Bluetooth: ath3k: remove blank line after if Removed blank line after if. Signed-off-by: Maxim Zhukov Signed-off-by: Marcel Holtmann drivers/bluetooth/ath3k.c | 1 - 1 file changed, 1 deletion(-) commit b3baa2428dece073f7158b2eb616dc69a759ea8e Author: Maxim Zhukov Date: Mon Feb 5 00:09:44 2018 +0300 Bluetooth: ath3k: do not init variables Do not need to initialize variables, because further on the code they fall into the snprintf. Signed-off-by: Maxim Zhukov Signed-off-by: Marcel Holtmann drivers/bluetooth/ath3k.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8b077bdba66d1d606eb1bdce3db87ff605aa7f1c Author: Maxim Zhukov Date: Mon Feb 5 00:09:43 2018 +0300 Bluetooth: ath3k: replace hardcode numbers with define Replaced the numbers with a readable define. Signed-off-by: Maxim Zhukov Signed-off-by: Marcel Holtmann drivers/bluetooth/ath3k.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 1ce0cec1c14cda7e514fa21b36c0f035203b447d Author: Tedd Ho-Jeong An Date: Mon Feb 5 14:20:36 2018 -0800 Bluetooth: btusb: Add support for Intel Bluetooth device 22560 [8087:0026] The Intel Bluetooth device 22560 family (HarrisonPeak, QnJ, and IcyPeak) use the same firmware loading mechanism as previous generation, so include new USB product ID and whitelist the hardware variant. T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 16 Spd=12 MxCh= 0 D: Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=8087 ProdID=0026 Rev= 0.01 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms Signed-off-by: Tedd Ho-Jeong An Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3b6ec458578bf065e102e8bb4b9e61dbc0caf5a4 Author: Linus Walleij Date: Tue Feb 6 10:35:40 2018 +0100 drm/pl111: Support multiple endpoints on the CLCD The Versatile PL110 implementations use multiple endpoints: from the PL111 port, the lines are routed through a PLD, and from there forked so the same lines go to a VGA DAC and an external TFT panel connector. This is discrete wireing so there is no way to turn of one output, i.e. this is really two endpoints, not two ports. We model this with multiple endpoints, so we need to loop over the available endpoints, check for panel or bridge on each and accumulate the result before continuing. The code already will give the panel preference over the bridge, if present, so the output will be sent to the panel if both a panel and a bridge is present on two endpoints of the same port. If they all return -EPROBE_DEFER we return -EPROBE_DEFER as well. If just one endpoint is present on the port, the behaviour is the same as before. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180206093540.8147-5-linus.walleij@linaro.org drivers/gpu/drm/pl111/pl111_drv.c | 62 +++++++++++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 6 deletions(-) commit 08e3211251e36a506ff6b0c31620e362b5800f47 Author: Linus Walleij Date: Tue Feb 6 10:35:39 2018 +0100 drm/pl111: Support variants with broken VBLANK The early Integrator CLCD synthesized in the Integrator CP and IM-PD1 FPGAs are broken: their vertical and next base interrupts are not functional. Support these variants by simply disabling the use of the vblank interrupt on these variants. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180206093540.8147-4-linus.walleij@linaro.org drivers/gpu/drm/pl111/pl111_display.c | 6 ++++-- drivers/gpu/drm/pl111/pl111_drm.h | 2 ++ drivers/gpu/drm/pl111/pl111_drv.c | 19 +++++++++++-------- drivers/gpu/drm/pl111/pl111_versatile.c | 1 + 4 files changed, 18 insertions(+), 10 deletions(-) commit eedd6033b4c88d559afd7c8ac8a76fefcd9834a6 Author: Linus Walleij Date: Tue Feb 6 10:35:38 2018 +0100 drm/pl111: Support variants with broken clock divider The early Integrator CLCD synthesized in the Integrator CP and IM-PD1 FPGAs are broken: their clock dividers do not work properly. Support disabling the clock divider and drive the clock directly from the parent under these circumstances. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180206093540.8147-3-linus.walleij@linaro.org drivers/gpu/drm/pl111/pl111_display.c | 8 ++++++++ drivers/gpu/drm/pl111/pl111_drm.h | 3 +++ drivers/gpu/drm/pl111/pl111_versatile.c | 1 + 3 files changed, 12 insertions(+) commit 6470b7ddec69dc2edd4bcb01eab3cf71ead5f794 Author: Linus Walleij Date: Tue Feb 6 10:35:37 2018 +0100 drm/pl111: Handle the Versatile RGB/BGR565 mode The ARM Versatile series can do RGB/BGR565 with an external "PLD" (Programmable Logical Device). However the CLCD does not have control bits for this, so it needs to be set into the ordinary 16BPP mode, then the RGB/BGR565 handling of the pixel data is handled by configuring the PLD through the external register. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180206093540.8147-2-linus.walleij@linaro.org drivers/gpu/drm/pl111/pl111_display.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 3d95f76a11afdcbc9aa6d09a9eaac70e057e7be3 Author: Linus Walleij Date: Tue Feb 6 10:35:36 2018 +0100 drm/pl111: Properly detect the ARM PL110 variants With a bit of refactoring we can contain the variant data for the strange PL110 versions that is feature-incomplete PL110 for the ARM Integrator/CP and somewhere inbetween PL110 and PL111 for the ARM Versatile AB and Versatile PB. We also accomodate for the custom duct-taped RGB565/BGR565 support in the Versatile variant. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180206093540.8147-1-linus.walleij@linaro.org drivers/gpu/drm/pl111/pl111_drm.h | 3 ++ drivers/gpu/drm/pl111/pl111_drv.c | 37 ++++----------- drivers/gpu/drm/pl111/pl111_versatile.c | 84 +++++++++++++++++++++++++-------- 3 files changed, 78 insertions(+), 46 deletions(-) commit f40f5b87d974655984ce545515e5c9e57b371b3c Author: Linus Walleij Date: Mon Feb 5 20:20:13 2018 +0100 drm/panel: Add support for ARM Versatile panels The ARM reference designs "Versatile AB" and "Versatile PB" contain panel connectors with autodetection of the connected panel type. This adds a small driver utilizing the MFD syscon look-up to read the autodetection register and set up the corresponding panel appropriately. In the source file there is a bit of elaboration of the panel types and interfaces on these boards. This was tested with the PL111 DRM driver on the ARM Versatile AB with the IB2 daughterboard. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180205192013.5349-2-linus.walleij@linaro.org MAINTAINERS | 7 + drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-arm-versatile.c | 377 ++++++++++++++++++++++++++++ 4 files changed, 395 insertions(+) commit 98ae3b26e408d7efd4d9bfa1456a61d62a9be018 Author: Linus Walleij Date: Mon Feb 5 20:20:12 2018 +0100 drm/panel: Device tree bindings for ARM Versatile panels This adds a pretty simple set of device tree bindings for ARM Versatile panels appearing as child nodes of a system controller. Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180205192013.5349-1-linus.walleij@linaro.org .../display/panel/arm,versatile-tft-panel.txt | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 312924d3bc60fda4cb79d70a5c1c5b2b02aaa274 Author: Linus Walleij Date: Mon Jan 29 10:55:31 2018 +0100 drm/bridge: Rename argument from crtc to bridge Why is the argument to ->mode_valid() called "crtc"? I guess a copy/paste error. Fix it. Reviewed-by: Laurent Pinchart Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20180129095531.4557-1-linus.walleij@linaro.org include/drm/drm_bridge.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f2f2db86d63605b1f57780ead21d4968e9d0bf3 Author: Joonas Lahtinen Date: Wed Feb 7 09:26:04 2018 +0200 drm/i915: Update DRIVER_DATE to 20180207 Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a11024457d348672b26b3d4581ed19c793399b48 Author: Felix Kuehling Date: Tue Feb 6 20:32:46 2018 -0500 uapi: Fix type used in ioctl parameter structures Use __u32 and __u64 instead of POSIX types that may not be defined in user mode builds. Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay include/uapi/linux/kfd_ioctl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 26103436da003327017af325483b6150a3b855cc Author: Felix Kuehling Date: Tue Feb 6 20:32:45 2018 -0500 drm/amdkfd: Implement KFD process eviction/restore When the TTM memory manager in KGD evicts BOs, all user mode queues potentially accessing these BOs must be evicted temporarily. Once user mode queues are evicted, the eviction fence is signaled, allowing the migration of the BO to proceed. A delayed worker is scheduled to restore all the BOs belonging to the evicted process and restart its queues. During suspend/resume of the GPU we also evict all processes to allow KGD to save BOs in system memory, since VRAM will be lost. v2: * Account for eviction when updating of q->is_active in MQD manager Signed-off-by: Harish Kasiviswanathan Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_device.c | 65 +++++- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 219 ++++++++++++++++++++- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 9 + drivers/gpu/drm/amd/amdkfd/kfd_module.c | 2 + drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 9 +- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 6 +- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 32 ++- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 213 ++++++++++++++++++++ 8 files changed, 547 insertions(+), 8 deletions(-) commit 403575c44e61722ae443b47df66e188b367d7324 Author: Felix Kuehling Date: Tue Feb 6 20:32:44 2018 -0500 drm/amdkfd: Add GPUVM virtual address space to PDD Create/destroy the GPUVM context during PDD creation/destruction. Get VM page table base and program it during process registration (HWS) or VMID allocation (non-HWS). v2: * Used dev instead of pdd->dev in kfd_flush_tlb Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 20 +++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 13 +++++++++ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 33 ++++++++++++++++++++++ 3 files changed, 66 insertions(+) commit 4252bf686622f6c71958c4fabbcb6a64deba1cf7 Author: Harish Kasiviswanathan Date: Tue Feb 6 20:32:42 2018 -0500 drm/amdkfd: Remove unaligned memory access Unaligned atomic operations can cause problems on some CPU architectures. Use simpler bitmask operations instead. Atomic bit manipulations are not necessary since dqm->lock is held during these operations. Signed-off-by: Harish Kasiviswanathan Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 25 ++++++++-------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit 4b20f44e41b421be608756c395ccf4fcb1305824 Author: Sylwester Nawrocki Date: Mon Feb 5 18:05:00 2018 +0100 ASoC: samsung: Add the DT binding files entry to MAINTAINERS This patch adds missing DT binding files to the Samsung ASoC drivers entry. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Signed-off-by: Mark Brown MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit b2f78cda260bc6a1a2d382b1d85a29e69b5b3724 Author: Tvrtko Ursulin Date: Mon Feb 5 09:34:48 2018 +0000 drm/i915/pmu: Fix PMU enable vs execlists tasklet race Commit 99e48bf98dd0 ("drm/i915: Lock out execlist tasklet while peeking inside for busy-stats") added a tasklet_disable call in busy stats enabling, but we failed to understand that the PMU enable callback runs as an hard IRQ (IPI). Consequence of this is that the PMU enable callback can interrupt the execlists tasklet, and will then deadlock when it calls intel_engine_stats_enable->tasklet_disable. To fix this, I realized it is possible to move the engine stats enablement and disablement to PMU event init and destroy hooks. This allows for much simpler implementation since those hooks run in normal context (can sleep). v2: Extract engine_event_destroy. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Fixes: 99e48bf98dd0 ("drm/i915: Lock out execlist tasklet while peeking inside for busy-stats") Testcase: igt/perf_pmu/enable-race-* Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180205093448.13877-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_pmu.c | 98 ++++++++++++--------------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 14 ----- 2 files changed, 34 insertions(+), 78 deletions(-) commit 33ea4b24277b06dbc55d7f5772a46f029600255e Author: Song Liu Date: Wed Dec 6 14:45:16 2017 -0800 perf/core: Implement the 'perf_uprobe' PMU This patch adds perf_uprobe support with similar pattern as previous patch (for kprobe). Two functions, create_local_trace_uprobe() and destroy_local_trace_uprobe(), are created so a uprobe can be created and attached to the file descriptor created by perf_event_open(). Signed-off-by: Song Liu Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Yonghong Song Reviewed-by: Josef Bacik Cc: Cc: Cc: Cc: Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171206224518.3598254-7-songliubraving@fb.com Signed-off-by: Ingo Molnar include/linux/trace_events.h | 4 ++ kernel/events/core.c | 48 ++++++++++++++++++++++- kernel/trace/trace_event_perf.c | 53 +++++++++++++++++++++++++ kernel/trace/trace_probe.h | 4 ++ kernel/trace/trace_uprobe.c | 86 +++++++++++++++++++++++++++++++++++++---- 5 files changed, 186 insertions(+), 9 deletions(-) commit e12f03d7031a977356e3d7b75a68c2185ff8d155 Author: Song Liu Date: Wed Dec 6 14:45:15 2017 -0800 perf/core: Implement the 'perf_kprobe' PMU A new PMU type, perf_kprobe is added. Based on attr from perf_event_open(), perf_kprobe creates a kprobe (or kretprobe) for the perf_event. This kprobe is private to this perf_event, and thus not added to global lists, and not available in tracefs. Two functions, create_local_trace_kprobe() and destroy_local_trace_kprobe() are added to created and destroy these local trace_kprobe. Signed-off-by: Song Liu Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Yonghong Song Reviewed-by: Josef Bacik Cc: Cc: Cc: Cc: Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171206224518.3598254-6-songliubraving@fb.com Signed-off-by: Ingo Molnar include/linux/trace_events.h | 4 ++ kernel/events/core.c | 142 ++++++++++++++++++++++++++++++---------- kernel/trace/trace_event_perf.c | 49 ++++++++++++++ kernel/trace/trace_kprobe.c | 91 ++++++++++++++++++++++--- kernel/trace/trace_probe.h | 7 ++ 5 files changed, 250 insertions(+), 43 deletions(-) commit 0d8dd67be013727ae57645ecd3ea2c36365d7da8 Author: Song Liu Date: Wed Dec 6 14:45:14 2017 -0800 perf/headers: Sync new perf_event.h with the tools/include/uapi version perf_event.h is updated in previous patch, this patch applies the same changes to the tools/ version. This is part is put in a separate patch in case the two files are back ported separately. Signed-off-by: Song Liu Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Yonghong Song Reviewed-by: Josef Bacik Acked-by: Alexei Starovoitov Cc: Cc: Cc: Cc: Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171206224518.3598254-5-songliubraving@fb.com Signed-off-by: Ingo Molnar tools/include/uapi/linux/perf_event.h | 4 ++++ 1 file changed, 4 insertions(+) commit 65074d43fc77bcae32776724b7fa2696923c78e4 Author: Song Liu Date: Wed Dec 6 14:45:13 2017 -0800 perf/core: Prepare perf_event.h for new types: 'perf_kprobe' and 'perf_uprobe' Two new perf types, perf_kprobe and perf_uprobe, will be added to allow creating [k,u]probe with perf_event_open. These [k,u]probe are associated with the file decriptor created by perf_event_open(), thus are easy to clean when the file descriptor is destroyed. kprobe_func and uprobe_path are added to union config1 for pointers to function name for kprobe or binary path for uprobe. kprobe_addr and probe_offset are added to union config2 for kernel address (when kprobe_func is NULL), or [k,u]probe offset. Signed-off-by: Song Liu Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Yonghong Song Reviewed-by: Josef Bacik Acked-by: Alexei Starovoitov Cc: Cc: Cc: Cc: Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171206224518.3598254-4-songliubraving@fb.com Signed-off-by: Ingo Molnar include/uapi/linux/perf_event.h | 4 ++++ 1 file changed, 4 insertions(+) commit 4b6ce6810a5dc0af387a238e8c852e0d3822381f Author: Rafael Antognolli Date: Mon Feb 5 15:33:30 2018 -0800 drm/i915/cnl: WaPipeControlBefore3DStateSamplePattern This workaround should prevent a bug that can be hit on a context restore. To avoid the issue, we must emit a PIPE_CONTROL with CS stall (0x7a000004 0x00100000 0x00000000 0x00000000) followed by 12DW's of NOOP(0x0) in the indirect context batch buffer, to ensure the engine is idle prior to programming 3DSTATE_SAMPLE_PATTERN. It's also not clear whether we should add those extra dwords because of the workaround itself, or if that's just padding for the WA BB (and next commands could come right after the PIPE_CONTROL). We keep them for now. References: HSD#1939868 v2: More descriptive changelog and comments. v3: Explain that PIPE_CONTROL is actually 6 dwords, and that we advance 10 more dwords because of that. Signed-off-by: Rafael Antognolli Cc: Chris Wilson Acked-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180205233330.14973-1-rafael.antognolli@intel.com drivers/gpu/drm/i915/intel_lrc.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) commit 3aec7f871c65eb5f76b4125fda432593c834a6f2 Author: Michal Srb Date: Mon Feb 5 16:04:38 2018 +0000 drm/i915/cmdparser: Do not check past the cmd length. The command MEDIA_VFE_STATE checks bits at offset +2 dwords. However, it is possible to have MEDIA_VFE_STATE command with length = 0 + LENGTH_BIAS = 2. In that case check_cmd will read bits from the following command, or even past the end of the buffer. If the offset ends up outside of the command length, reject the command. Fixes: 351e3db2b363 ("drm/i915: Implement command buffer parsing logic") Signed-off-by: Michal Srb Link: https://patchwork.freedesktop.org/patch/msgid/20180205151745.29292-1-msrb@suse.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180205160438.3267-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_cmd_parser.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2f265fad9756a40c09e3f4dcc62d5d7fa73a9fb2 Author: Michal Srb Date: Mon Feb 5 16:04:37 2018 +0000 drm/i915/cmdparser: Check reg_table_count before derefencing. The find_reg function was assuming that there is always at least one table in reg_tables. It is not always true. In case of VCS or VECS, the reg_tables is NULL and reg_table_count is 0, implying that no register-accessing commands are allowed. However, the command tables include commands such as MI_STORE_REGISTER_MEM. When trying to check such command, the find_reg would dereference NULL pointer. Now it will just return NULL meaning that the register was not found and the command will be rejected. Fixes: 76ff480ec963 ("drm/i915/cmdparser: Use binary search for faster register lookup") Signed-off-by: Michal Srb Link: https://patchwork.freedesktop.org/patch/msgid/20180205142916.27092-2-msrb@suse.com Cc: Chris Wilson Cc: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180205160438.3267-1-chris@chris-wilson.co.uk register lookup") drivers/gpu/drm/i915/i915_cmd_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6ec5bd348934887494541bcc9b53d621b1f2962c Author: Ville Syrjälä Date: Fri Feb 2 22:42:31 2018 +0200 drm/i915: Deprecate I915_SET_COLORKEY_NONE Deprecate the silly I915_SET_COLORKEY_NONE flag. The obvious way to disable colorkey is to just set flags to 0, which is exactly what the intel ddx has been doing all along. Currently when userspace sets the flags to 0, we end up in a funny state where colorkey is disabled, but various colorkey vs. scaling checks still consider colorkey to be enabled, and thus we don't allow plane scaling to kick in. In case there is some other userspace out there that actually uses this flag (unlikely as this is an i915 specific uapi) we'll keep on accepting it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180202204231.27905-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_atomic_plane.c | 1 - drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_sprite.c | 5 ++++- include/uapi/drm/i915_drm.h | 4 +++- 4 files changed, 9 insertions(+), 5 deletions(-) commit 2834d9dfaf0276e197158be6af8e1a1d59e58289 Author: Ramalingam C Date: Sat Feb 3 03:39:10 2018 +0530 drm/i915: fix misalignment in HDCP register def This patch aligns all definitions of hdcp registers and their bits. v2: No changes. Added reviewed-by tag. v3: No change. Signed-off-by: Ramalingam C Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1517609350-10698-9-git-send-email-ramalingam.c@intel.com drivers/gpu/drm/i915/i915_reg.h | 58 ++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) commit 6d983946513b05102e1c41ea195ce7f7a65e7047 Author: Ramalingam C Date: Sat Feb 3 03:39:09 2018 +0530 drm/i915: Reauthenticate HDCP on failure Incase of HDCP authentication failure, HDCP spec expects reauthentication. Hence this patch adds the reauthentications to be compliance with spec. v2: do-while to for loop for simplicity. [Seanpaul] v3: positioning the logs effectively. [Seanpaul] Signed-off-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1517609350-10698-8-git-send-email-ramalingam.c@intel.com drivers/gpu/drm/i915/intel_hdcp.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 791a98dd9bcfd214d8ef51d248f377354a9ea683 Author: Ramalingam C Date: Sat Feb 3 03:39:08 2018 +0530 drm/i915: Detect panel's hdcp capability DP HDCP1.4 spec mandates that An can be written to panel only after detecting the panel's hdcp capability. For DP 0th Bit of Bcaps register indicates the panel's hdcp capability For HDMI valid BKSV indicates the panel's hdcp capability. For HDMI it is optional to detect the panel's hdcp capability before An Write. v2: Added comments explaining the need for action [Seanpaul]. Made panel's hdcp capability detection optional for hdmi [Seanpaul]. Defined a func for reading bcaps for DP [Seanpaul]. v3: Removed the NULL initialization [Seanpaul]. Signed-off-by: Ramalingam C Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1517609350-10698-7-git-send-email-ramalingam.c@intel.com drivers/gpu/drm/i915/intel_dp.c | 39 +++++++++++++++++++++++++++++++++++---- drivers/gpu/drm/i915/intel_drv.h | 4 ++++ drivers/gpu/drm/i915/intel_hdcp.c | 18 +++++++++++++++++- 3 files changed, 56 insertions(+), 5 deletions(-) commit 7ee5798829d2dd95451d844ee8d3cb9a610a0363 Author: Ramalingam C Date: Sat Feb 3 03:39:07 2018 +0530 drm/i915: Optimize HDCP key load HDCP key need not be cleared on each hdcp disable. And HDCP key Load is skipped if key is already loaded. v2: No change. Added Reviewed-by tag. v3: No change. Signed-off-by: Ramalingam C Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1517609350-10698-6-git-send-email-ramalingam.c@intel.com drivers/gpu/drm/i915/intel_hdcp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f622a71d39069e3a0485da436e29ab18eac00b59 Author: Ramalingam C Date: Mon Feb 5 23:02:02 2018 +0530 drm/i915: Retry HDCP bksv read HDCP specification says that when bksv is identified as invalid (not with 20 1s), bksv should be re-read and verified. This patch adds the above mentioned re-read for bksv. v2: Rephrased the commit msg [Seanpaul] v3: do-while to for-loop [Seanpaul] v4: retry only if bksv is invalid and no error msg on each attempt [Seanpaul] v5: Correcting the return value [Seanpaul]. Signed-off-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1517851922-30547-1-git-send-email-ramalingam.c@intel.com drivers/gpu/drm/i915/intel_hdcp.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit cb340bf37173d6d85aa6be881d927352fad382f9 Author: Ramalingam C Date: Sat Feb 3 03:39:05 2018 +0530 drm/i915: Connector info in HDCP debug msgs When HDCP authentication is triggered on multiple connector, having connector name and ID in debug message will be more informative. v2: Added logs with connector info at the start of en/disable [Seanpaul] Added the connector info into Check link failure msgs too. v3: No Changes. Added Reviewed-by tag. Signed-off-by: Ramalingam C Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1517609350-10698-4-git-send-email-ramalingam.c@intel.com drivers/gpu/drm/i915/intel_hdcp.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit f179a2fc2e23ff623344717eec3b8a443a57222a Author: Ramalingam C Date: Sat Feb 3 03:39:04 2018 +0530 drm/i915: Stop encryption for repeater with no sink If a HDCP repeater is detected with zero downstream devices, HDCP spec approves either of below actions: 1. Dont continue on second stage authentication. Disable encryption. 2. Continue with second stage authentication excluding the KSV list and on success, continue encryption. Since disable encryption is agreed, repeater is not expected to have its own display. So there is no consumption of the display content in such setup. Hence, incase of repeater with zero device count, this patch fails the HDCP authentication and stops the HDCP encryption. v2: Rephrased commit msg and added comments in code [Seanpaul] v3: No changes. Added Reviewed-by tag. Signed-off-by: Ramalingam C Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1517609350-10698-3-git-send-email-ramalingam.c@intel.com drivers/gpu/drm/i915/intel_hdcp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit a01244967d4311afb1a8e068184c2a30202025f5 Author: Ramalingam C Date: Sat Feb 3 03:39:03 2018 +0530 drm/i915: Handle failure from 2nd stage HDCP auth We enable the HDCP encryption as a part of first stage authentication. So when second stage authentication fails, we need to disable the HDCP encryption and signalling. This patch ensures that, when hdcp authentication fails, HDCP encryption and signalling is turned off. v2: Dropped connector ref passing to auth [Seanpaul] Moved the call to disable_hdcp() to enable_hdcp() [Seanpaul] v3: No Changes. Added the Reveiwed-by tag. Signed-off-by: Ramalingam C Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1517609350-10698-2-git-send-email-ramalingam.c@intel.com drivers/gpu/drm/i915/intel_hdcp.c | 3 +++ 1 file changed, 3 insertions(+) commit 01b8fdc5222007bdfc905941173f82576898a7f7 Author: Chris Wilson Date: Mon Feb 5 15:24:31 2018 +0000 drm/i915: Skip post-reset request emission if the engine is not idle Since commit 7b6da818d86f ("drm/i915: Restore the kernel context after a GPU reset on an idle engine") we submit a request following the engine reset. The intent is that we don't submit a request if the engine is busy (as it will restart active by itself) but we only checked to see if there were remaining requests in flight on the hardware and skipped checking to see if there were any ready requests that would be immediately submitted on restart (the same time as our new request would be). Having convinced the engine to appear idle in the previous patch, we can use intel_engine_is_idle() as a better test to only submit a new request if there are no pending requests. As it happens, this is tripping up igt/drv_selftest/live_hangcheck in CI as we overfill the kernel_context ringbuffer trigger an infinite recursion from within the reset. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104786 References: 7b6da818d86f ("drm/i915: Restore the kernel context after a GPU reset on an idle engine") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Michel Thierry Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180205152431.12163-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e840130a25a7fbe1520f32b6113e0fd68af0fb54 Author: Chris Wilson Date: Mon Feb 5 15:24:30 2018 +0000 drm/i915/execlists: Move the reset bits to a more natural home In preparation for the next patch, we want the engine to appear idle after a reset (if there are no requests in flight). For execlists, this entails clearing the active status on reset, it will be regenerated on restarting the engine after the reset. In the process, note that a couple of other status flags and checks could be moved into the describing function. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180205152431.12163-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 8ec21a7c4b52165211b47932c665ab2e9ca488ee Author: Chris Wilson Date: Mon Feb 5 15:24:29 2018 +0000 drm/i915/selftests: Use a sacrificial context for hang testing Avoid injecting hangs in to the i915->kernel_context in case the GPU reset leaves corruption in the context image in its wake (leading to continual failures and system hangs after the selftests are ostensibly complete). Use a sacrificial kernel_context instead. v2: Closing a context is tricky; export a function (for selftests) from i915_gem_context.c to get it right. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Michel Thierry Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180205152431.12163-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 39 +++++++++++++----------- drivers/gpu/drm/i915/selftests/mock_context.c | 11 +++++++ drivers/gpu/drm/i915/selftests/mock_context.h | 3 ++ 3 files changed, 36 insertions(+), 17 deletions(-) commit a8b66f2c2f3e03b70a5e72cb5034f8aff669bf34 Author: Chris Wilson Date: Mon Feb 5 15:24:28 2018 +0000 drm/i915/selftests: Flush old resets between engines When injecting rapid resets, we must be careful to at least wait for the previous reset to have taken effect and the engine restarted. If we perform a second reset before that has happened, we will notice that the engine hasn't recovered and declare it lost, wedging the device and failing. In practice, since we wait for each hanging batch to start before injecting the reset, this too-fast-reset condition can only be triggered when moving onto the next engine in the test, so we need only wait for the existing reset to complete before switching engines. v2: Wrap up the wait inside a safety net to bail out in case of angry hw. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Michel Thierry Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180205152431.12163-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 66 ++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 3 deletions(-) commit b7a3f33bd5abfb0b693831d3b5230851f508e330 Author: Chris Wilson Date: Sat Feb 3 10:19:14 2018 +0000 drm/i915/breadcrumbs: Drop request reference for the signaler thread If we remember to cancel the signaler on a request when retiring it (after we know that the request has been signaled), we do not need to carry an additional request in the signaler itself. This prevents an issue whereby the signaler threads may be delayed and hold on to thousands of request references, causing severe memory fragmentation and premature oom (most noticeable on 32b snb due to the limited GFP_KERNEL and frequent use of inter-engine fences). v2: Rename first_signal(), document reads outside of locks. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180203101914.24880-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_request.c | 6 +- drivers/gpu/drm/i915/intel_breadcrumbs.c | 150 +++++++++++++++++-------------- 2 files changed, 86 insertions(+), 70 deletions(-) commit 24eae08d442eb6e9046a6d07abaa3e419bf429d8 Author: Chris Wilson Date: Mon Feb 5 09:22:01 2018 +0000 drm/i915: Remove unbannable context spam from reset During testing, we trigger a lot of resets on an unbannable context leading to massive amounts of irrelevant debug spam. Remove the ban_score accounting and message for the unbannable context so that we improve the signal:noise in the log messages for when the unexpected occurs. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180205092201.19476-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 073988d1023276277a3fe148a7a87c8ef3860a98 Author: Chris Wilson Date: Mon Feb 5 09:22:00 2018 +0000 drm/i915/execlists: Remove the startup spam Execlists is now enabled by default and included in the list of capabilities printed out to dmesg and beyond. We do not need to mention it again, every time we restart the engine, so kill the spam. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180205092201.19476-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 1 - 1 file changed, 1 deletion(-) commit 559e040f1f083b6478011f2961db230da8047119 Author: Chris Wilson Date: Mon Feb 5 09:21:59 2018 +0000 drm/i915: Show the GPU state when declaring wedged Dump each engine state when i915_gem_set_wedged() is called to give us some more clues as to why we had to terminate the GPU. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180205092201.19476-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4beb3b40ae7f994af01200323441df13f8f5b241 Author: Maarten Lankhorst Date: Fri Feb 2 15:27:43 2018 +0100 drm/crc: Add support for polling on the data fd. This will make it possible for userspace to know whether reading will block, without blocking on the fd. This makes it possible to drain all queued CRC's in blocking mode, without having to reopen the fd. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180202142743.68527-1-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä [mlankhorst: Use POLLIN|POLLRDNORM, based on Ville's suggestion] drivers/gpu/drm/drm_debugfs_crc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 4a3d1e0f9d42c7c16b0498641fbbe879a19ff1f6 Author: Chris Wilson Date: Thu Jan 25 22:41:22 2018 +0000 drm/i915: Always update the no_fbc_reason when disabling Provide the reason why we call intel_fbc_deactivate() so that debugging issues with FBC being delayed is clearer. Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180125224122.27480-1-chris@chris-wilson.co.uk Reviewed-by: Jani Nikula drivers/gpu/drm/i915/intel_fbc.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 9e519bc8b98c4a07e1f8c42fcde23f3c2d2d7b0e Author: Chris Wilson Date: Mon Feb 5 10:06:18 2018 +0000 drm/i915: Add some newlines to intel_engine_dump() headers The headers should be on a separate line for consistency, so add the missing trailing newline in a few intel_engine_dump() callers. Reported-by: Mika Kuoppala Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180205100618.11001-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/intel_hangcheck.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 302e55d7be959502058878e9edb1d369a73598d4 Author: Chris Wilson Date: Mon Feb 5 09:41:39 2018 +0000 drm/i915: Report if an unbannable context is involved in a GPU hang Since unbannable contexts are special and supposed not to be causing GPU hangs in the first place, make it clear when they are implicated in said hang. In practice, most unbannable contexts are those created by igt for the express purpose of throwing untold thousands of hangs at the GPU and wish to keep doing so to finish the test. Normally they are cleaned up, but it's when they or the other unbannable kernel contexts stay stuck in an erroneous state that we need to worry and so need highlighting. Suggested-by: Mika Kuoppala Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180205094139.10671-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) commit 2cf2f0d5b91fd1b06a6ae260462fc7945ea84add Author: Arnd Bergmann Date: Fri Feb 2 15:59:40 2018 +0100 kdb: use memmove instead of overlapping memcpy gcc discovered that the memcpy() arguments in kdbnearsym() overlap, so we should really use memmove(), which is defined to handle that correctly: In function 'memcpy', inlined from 'kdbnearsym' at /git/arm-soc/kernel/debug/kdb/kdb_support.c:132:4: /git/arm-soc/include/linux/string.h:353:9: error: '__builtin_memcpy' accessing 792 bytes at offsets 0 and 8 overlaps 784 bytes at offset 8 [-Werror=restrict] return __builtin_memcpy(p, q, size); Signed-off-by: Arnd Bergmann Signed-off-by: Jason Wessel kernel/debug/kdb/kdb_support.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c87742abfc80b3f80c4f7a546193ad78e4fed9b6 Author: Crt Mori Date: Thu Jan 11 11:20:23 2018 +0100 iio: temperature: Adding support for MLX90632 Melexis has just released Infra Red temperature sensor MLX90632 used for contact-less temperature measurement. Driver provides basic functionality for reporting object (and ambient) temperature with support for object emissivity. Signed-off-by: Crt Mori Signed-off-by: Jonathan Cameron MAINTAINERS | 7 + drivers/iio/temperature/Kconfig | 12 + drivers/iio/temperature/Makefile | 1 + drivers/iio/temperature/mlx90632.c | 750 +++++++++++++++++++++++++++++++++++++ 4 files changed, 770 insertions(+) commit a8062aa116aa6b25cbd4d1617162fa77f5414883 Author: Crt Mori Date: Thu Jan 11 11:20:10 2018 +0100 dt-bindings: iio: temperature: add MLX90632 device bindings Add device tree bindings for MLX90632 IR temperature sensor. Signed-off-by: Crt Mori Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron .../bindings/iio/temperature/mlx90632.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 47a361634821dc66cefbfa70b9d10a91269d7f7d Author: Crt Mori Date: Thu Jan 11 11:19:57 2018 +0100 lib: Add strongly typed 64bit int_sqrt There is no option to perform 64bit integer sqrt on 32bit platform. Added stronger typed int_sqrt64 enables the 64bit calculations to be performed on 32bit platforms. Using same algorithm as int_sqrt() with strong typing provides enough precision also on 32bit platforms, but it sacrifices some performance. In case values are smaller than ULONG_MAX the standard int_sqrt is used for calculation to maximize the performance due to more native calculations. Signed-off-by: Crt Mori Acked-by: Joe Perches Signed-off-by: Jonathan Cameron include/linux/kernel.h | 9 +++++++++ lib/int_sqrt.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) commit cdc2466df40f26af60f6b18123069bd52336a80c Author: Dmitry Torokhov Date: Mon Apr 3 16:54:04 2017 -0700 Input: synaptics - handle errors from input_mt_init_slots() input_mt_init_slots() may fail, we need to handle this condition. Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit 29aa619408adc1f88745feed02265acfbc0b8fea Author: Dmitry Torokhov Date: Mon Apr 3 16:37:24 2017 -0700 Input: synaptics - switch to using input_set_capability Instead of manipulating capability bits directly, use input_set_capability(). Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 49 ++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 25 deletions(-) commit 3aceaa34d7723c2556555b05ad04a89ce2d66374 Author: Dmitry Torokhov Date: Thu Jan 4 22:52:55 2018 -0800 Input: trackpoint - combine calls to ps2_command() We do not need to call ps2_command() several times in a row, transmitting every byte as it were a command byte, we can often pack it all in a single command. Also, now that ps2_command() handles retransmission, we do not need to do it ourselves in trackpoint_power_on_reset(). Signed-off-by: Dmitry Torokhov drivers/input/mouse/trackpoint.c | 60 ++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 36 deletions(-) commit 29acc42e8e10a4721757af9ed8aec569d30ce39b Author: Dmitry Torokhov Date: Wed Jan 17 12:00:24 2018 -0800 Input: libps2 - relax command byte ACK handling When we probe PS/2 devices we first issue "Get ID" command and only if we receive what we consider a valid keyboard or mouse ID we disable the device and continue with protocol detection. That means that the device may be transmitting motion or keystroke data, while we expect ACK response. Instead of signaling failure if we see anything but ACK/NAK let's ignore "garbage" response until we see ACK for the command byte (first byte). The checks for subsequent ACKs of command parameters will continue be strict. Signed-off-by: Dmitry Torokhov drivers/input/serio/libps2.c | 25 ++++++++++++++++++++++--- include/linux/libps2.h | 1 + 2 files changed, 23 insertions(+), 3 deletions(-) commit b99e1f2a1a3f4158bed9b9e9e97ac46678d8c2ac Author: Dmitry Torokhov Date: Thu Jan 4 22:01:43 2018 -0800 Input: libps2 - support retransmission of command data The devices are allowed to respond to either command byte or command parameter with a NAK (0xfe), and the host is supposed to resend the "correct" byte. The device then will either respond with ACK or ERR (0xfc). Let's teach libps2 to handle the NAK responses properly, so that individual drivers do not need to handle them. Signed-off-by: Dmitry Torokhov drivers/input/serio/libps2.c | 103 +++++++++++++++++++++++++++++-------------- 1 file changed, 71 insertions(+), 32 deletions(-) commit 147b903da65daedc90dbeb66a75dd608a6a41ef2 Author: Dmitry Torokhov Date: Tue Jan 2 12:21:49 2018 -0800 Input: libps2 - add debugging statements Debugging via i8042.debug and analyzing raw PS/2 data stream may be cumbersome as you need to locate the boundaries of commands, decipher the sliced commands, etc, etc. Let's add a bit more high level debug statements for ps2_sendbyte(), ps2_command(), and ps2_sliced_command(). We do not introduce a new module parameter, but rater rely on the kernel having dynamic debug facility enabled (which most everyone has nowadays). Enable with: echo "file libps2.c +pf" > /sys/kernel/debug/dynamic_debug/control or add "libps2.dyndbg=+pf" to the kernel command line. Signed-off-by: Dmitry Torokhov drivers/input/serio/libps2.c | 52 +++++++++++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 13 deletions(-) commit 08be954b7a7de6742d3d47e4dc20e3b086410761 Author: Dmitry Torokhov Date: Tue Jan 2 12:03:02 2018 -0800 Input: psmouse - move sliced command implementation to libps2 In preparation to adding some debugging statements to PS/2 control sequences let's move psmouse_sliced_command() into libps2 and rename it to ps2_sliced_command(). Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 12 ++++++------ drivers/input/mouse/logips2pp.c | 2 +- drivers/input/mouse/psmouse-base.c | 26 -------------------------- drivers/input/mouse/psmouse.h | 1 - drivers/input/mouse/synaptics.c | 8 ++++---- drivers/input/serio/libps2.c | 32 ++++++++++++++++++++++++++++++++ include/linux/libps2.h | 3 +++ 7 files changed, 46 insertions(+), 38 deletions(-) commit 3a92dd331f90a33e0f0962b981577eb5078419c4 Author: Dmitry Torokhov Date: Thu Jan 4 11:27:05 2018 -0800 Input: libps2 - use BIT() for bitmask constants Let's explicitly document bit numbers with BIT() macro. Signed-off-by: Dmitry Torokhov include/linux/libps2.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit b28bad65c1fec47076ebee88b51b0dafa31f5065 Author: Dmitry Torokhov Date: Thu Jan 4 10:58:48 2018 -0800 Input: libps2 - use u8 for byte data Instead of using unsigned char for the byte data switch to using u8. Also use unsigned int for the command codes and timeouts, and have ps2_handle_ack() and ps2_handle_response() return bool instead of int, as they do not return error codes but rather signal whether a byte was handled or not handled. ps2_is_keyboard_id() now returns bool as well. Signed-off-by: Dmitry Torokhov drivers/input/serio/libps2.c | 31 ++++++++++++++++--------------- include/linux/libps2.h | 23 +++++++++++++---------- 2 files changed, 29 insertions(+), 25 deletions(-) commit d5e0d9187abd5e3ce23884c375c4b36f403e42be Author: Dmitry Torokhov Date: Thu Jan 4 11:05:30 2018 -0800 Input: libps2 - fix switch statement formatting Individual labels of switch statements should have the same indentation level as the switch statement itself. Signed-off-by: Dmitry Torokhov drivers/input/serio/libps2.c | 131 +++++++++++++++++++++---------------------- 1 file changed, 65 insertions(+), 66 deletions(-) commit 4c711ef62892e7d11af6cfadab33ad815e040d48 Author: Stephen Lyons Date: Wed Mar 22 23:20:54 2017 -0700 Input: psmouse - add support for 2nd wheel on A4Tech Dual-Scroll wheel mice This Far-Eastern company's PS/2 mice use a deviant format for the data relating to movement of the scroll wheels for, at least, their dual wheel mice, such as their "Optical GreatEye Wheelmouse" model "WOP-35". This product has five "buttons" (one of which is the click action on the first wheel) and TWO scroll wheels. However for a byte comprising d0-d7 instead of setting one of d6-7 in the forth byte of the mouse data packet and a twos complement number of scroll steps in the remaining d5-d0 (or d3-d0 should there be a fourth (BTN_SIDE - d4) or fifth (BTN_EXTRA - d5) button to report; they only report a single +/- event for each wheel and use a bit pattern that corresponds to +/-1 for the first wheel and +/- 2 for the second in the lower nibble of the fourth byte. The effect with existing code is that the second mouse wheel merely repeats the effect of the first but providing two steps per click rather than the one of the first wheel - so there is no HORIZONTAL scroll wheel movement detected from the device as far as the rest of the kernel sees it. This patch, if enabled by the "a4tech_workaround" module parameter modifies the handling just for mice of type PSMOUSE_IMEX so that the second scroll wheel movement gets correctly reported as REL_HWHEEL events. Should this module parameter be activated for other mice of the same PSMOUSE_IMEX type then it is possible that at the point where the mouse reports more than a single movement step the user may start seeing horizontal rather than vertical wheel events, but should the movement steps get to be more than two at a time the hack will get immediately deactivated and the behaviour will revert to the past code. This was discussed around *fifteen* *years* *ago* on the LKML and the best summary is in post https://lkml.org/lkml/2002/7/18/111 "Re: PS2 Input Core Support" by Vojtech Pavlik. I was not able to locate any discussion later than this on this topic. Given that most users of the "psmouse" module will NOT want this additional feature enabled I have taken the apparently erroneous step of defaulting the module parameter that enables it to be "disabled" - this functionality may interfere with the operation of "normal" mice of this type (until a large enough scroll wheel movement is detected) so I cannot see how it would want to be enabled for "normal" users - i.e. everyone without this brand of mouse. I am using this patch at the moment and I can confirm that it is working for me as both a module and compiled into the kernel for my mouse that is of the type (WOP-35) described - I note that it is still available from certain on-line retailers and that the manufacturers site does not list GNU/Linux as being supported on the product page - this patch however does enable full use of this product: http://www.a4tech.com/product.asp?cid=3D1&scid=3D8&id=3D22 Signed-off-by: Stephen Lyons Signed-off-by: Dmitry Torokhov drivers/input/mouse/psmouse-base.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit c13b418685bbadaef3a79273095c7217f7941fdf Author: Dmitry Torokhov Date: Wed Mar 22 15:18:28 2017 -0700 Input: lifebook - clean up code - use u8 instead of unsigned char for byte data - use input_set_capability() instead of manipulating capabilities bits directly - do not abuse -1 as error code, propagate errors from various calls. Signed-off-by: Dmitry Torokhov drivers/input/mouse/lifebook.c | 50 ++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 21 deletions(-) commit 592c352b95db8db9c0d71795183ec1f6ee5c4213 Author: Dmitry Torokhov Date: Wed Mar 22 15:27:53 2017 -0700 Input: logips2pp - clean up code - switch to using BIT() macros - use u8 instead of unsigned char for byte data - use input_set_capability() instead of manipulating capabilities bits directly - use sign_extend32() when extracting wheel data. - do not abuse -1 as error code, propagate errors from various calls. Signed-off-by: Dmitry Torokhov drivers/input/mouse/logips2pp.c | 142 +++++++++++++++++++++++----------------- 1 file changed, 83 insertions(+), 59 deletions(-) commit ba667650c568d55f6b80be54951b098f86939f2d Author: Dmitry Torokhov Date: Wed Mar 22 16:28:48 2017 -0700 Input: psmouse - clean up code - switch to using BIT() macros - use u8 instead of unsigned char for byte data - use input_set_capability() instead of manipulating capabilities bits directly - use sign_extend32() when extracting wheel data. - do not abuse -1 as error code, propagate errors from various calls. Signed-off-by: Dmitry Torokhov drivers/input/mouse/psmouse-base.c | 140 ++++++++++++++++++++----------------- 1 file changed, 77 insertions(+), 63 deletions(-) commit 1ef8580539d0b9282b726a2c9b7aa25057040cfe Author: Dmitry Torokhov Date: Tue Feb 7 17:07:44 2017 -0800 Input: psmouse - create helper for reporting standard buttons/motion Many protocol driver re-implement code to parse buttons or motion data from the standard PS/2 protocol. Let's split the parsing into separate functions and reuse them in protocol drivers. Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 30 +++++++----------------------- drivers/input/mouse/elantech.c | 28 ++++++++++------------------ drivers/input/mouse/lifebook.c | 12 ++++-------- drivers/input/mouse/logips2pp.c | 10 ++++------ drivers/input/mouse/psmouse-base.c | 26 ++++++++++++++++++++------ drivers/input/mouse/psmouse.h | 4 ++++ drivers/input/mouse/sentelic.c | 11 +---------- 7 files changed, 50 insertions(+), 71 deletions(-) commit 55ef72f24fae5d41febe6b6ebf7304f9a2cb9471 Author: Chris Wilson Date: Fri Feb 2 15:34:48 2018 +0000 drm/i915: Remove spurious DRM_ERROR for cancelled interrupts As we ourselves cancel interrupts during reset by clearing the GTIIR, it is possible for the master IIR to indicate a pending IRQ for which we have already cleared from the GTIIR. In this case, the DRM_ERROR are intended and should not be flagged as an error. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Ville Syrjälä Cc: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180202153448.23908-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_irq.c | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) commit 274de876065a34ca1ff093bfacb62e440a4491be Author: Chris Wilson Date: Fri Feb 2 14:54:55 2018 +0000 drm/i915/execlists: Flush GTIIR on clearing CS interrupts during reset Be paranoid and flush the GTIIR after clearing the CS interrupt to be sure it has taken before we re-enable the interrupt handler. We still see early interrupts following reset, the tasklet handling the mmio read before it has been written by the CS. This hopefully reduces the frequency to 0... References: https://bugs.freedesktop.org/show_bug.cgi?id=104262 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Michel Thierry Cc: Tvrtko Ursulin Acked-by: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20180202145455.29876-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit d67c0ac19f9a3d900fbdf84924cb4d3aea934310 Author: Jani Nikula Date: Fri Feb 2 15:04:16 2018 +0200 drm/i915: reduce indent in pch detection Save some horizontal space. Reviewed-by: David Weinehall Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180202130416.18233-1-jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.c | 189 ++++++++++++++++++++-------------------- 1 file changed, 96 insertions(+), 93 deletions(-) commit bc4fde30e5906a047848339a8eddcc4e7277abc3 Author: Ville Syrjälä Date: Tue Jan 23 19:08:54 2018 +0200 drm/sun4i: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. Note that this replaces crtc_state->adjusted_mode usage with crtc_state->mode. The latter is the correct choice since that's the mode the user provided and it matches the plane crtc coordinates the user also provided. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). Cc: Maxime Ripard Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180123170857.13818-2-ville.syrjala@linux.intel.com Reviewed-by: Maxime Ripard #irc drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 9 ++++----- drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) commit b46a24bcc2b4c4e8b3cbd8c804ecd987a1354d03 Author: Ville Syrjälä Date: Tue Jan 23 19:08:53 2018 +0200 drm/rcar-du: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. No functional changes as the code already uses crtc_state->mode to populate the clip, which is also what drm_mode_get_hv_timing() uses. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). Cc: Laurent Pinchart Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180123170857.13818-1-ville.syrjala@linux.intel.com Reviewed-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_plane.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit fae919f07610c52ad93915b54c5baeb111c6ea0d Author: Michal Wajdeczko Date: Thu Feb 1 17:32:48 2018 +0000 drm/i915: Enable inject_load_failure only in DEBUG config We're using i915_inject_load_failure() to inject dummy faults during driver load, but since this is debug utility we shouldn't expose it in default config as it consumes both code and data. add/remove: 0/1 grow/shrink: 0/2 up/down: 0/-302 (-302) Function old new delta __i915_inject_load_failure 61 - -61 i915_gem_init 1331 1268 -63 i915_driver_load 5923 5745 -178 Total: Before=1177454, After=1177152, chg -0.03% add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-4 (-4) Data old new delta i915_load_fail_count 4 - -4 Total: Before=56762, After=56758, chg -0.01% add/remove: 4/8 grow/shrink: 0/1 up/down: 245/-591 (-346) RO Data old new delta __param_str_inject_load_failure 20 - -20 __UNIQUE_ID_inject_load_failuretype200 34 - -34 __param_inject_load_failure 40 - -40 __func__ 4998 4896 -102 __UNIQUE_ID_inject_load_failure201 150 - -150 Total: Before=119095, After=118749, chg -0.29% Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180201173248.3912-1-michal.wajdeczko@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.c | 6 ++++++ drivers/gpu/drm/i915/i915_drv.h | 4 ++++ drivers/gpu/drm/i915/i915_params.c | 2 ++ 3 files changed, 12 insertions(+) commit 99b91bda84060bac061d1649fad0e3bddcf67ce6 Author: Jani Nikula Date: Thu Feb 1 13:03:43 2018 +0200 drm/i915/dp: limit DP link rate based on VBT on CNL+ We have the max DP link rate info available in VBT since BDB version 216, included in child device config since commit c4fb60b9aba9 ("drm/i915/bios: add DP max link rate to VBT child device struct"). Parse it and use it. Cc: Ville Syrjälä Cc: Rodrigo Vivi Cc: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/a8b1364d1f2394fba3062b6ad11b474744ea4366.1517482774.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_bios.c | 21 +++++++++++++++++++++ drivers/gpu/drm/i915/intel_dp.c | 9 ++++++++- drivers/gpu/drm/i915/intel_vbt_defs.h | 5 +++++ 4 files changed, 35 insertions(+), 1 deletion(-) commit 4ba285d4154ab587cc00bf9bd04bb8c7b19b595a Author: Jani Nikula Date: Thu Feb 1 13:03:42 2018 +0200 drm/i915/dp: clean up source rate limiting for cnl Make the limiting rate based instead of messing with the array size. Cc: Ville Syrjälä Cc: Rodrigo Vivi Cc: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/cb03b9419191a7d6359bf371aacb2d3725c746de.1517482774.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_dp.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 10ebb736960cd90eeec7239da2c2b3e8c8a24ef6 Author: Jani Nikula Date: Thu Feb 1 13:03:41 2018 +0200 drm/i915/dp: abstract rate array length limiting This will be useful later on. Also move the functions around to not need forward declarations in subsequent patches. No functional changes. Cc: Ville Syrjälä Cc: Rodrigo Vivi Cc: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/40f37f08cad33234cd86337d39e823ac6e55805f.1517482774.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_dp.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit ff62981136ec2fc81fddc7f6eb8427c4ed78f2ac Author: Daniel Vetter Date: Wed Jan 31 11:21:56 2018 +0100 MAINTAINERS: Maarten for drm-misc co-maintainer I'm stepping down, also handing all the drm-misc stuff to the new team. Plan is that Sean handles 4.17, and Maarten then has fun with 4.18 as his first release. Cc: Maarten Lankhorst Cc: David Airlie Cc: Gustavo Padovan Cc: Sean Paul Acked-by: Sean Paul Acked-by: Maarten Lankhorst Acked-by: Gustavo Padovan Acked-by: Jani Nikula Signed-off-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180131102156.25634-1-daniel.vetter@ffwll.ch MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 006bb4ccac3901d790b56ed4729cd4080a77a895 Author: Imre Deak Date: Tue Jan 30 16:29:39 2018 +0200 drm/i915/bxt, glk: Avoid long atomic poll during CDCLK change There is no requirement for doing the PCODE request polling atomically, so do that only for a short time switching to sleeping poll afterwards. The specification requires a 150usec timeout for the change notification, so let's use that for the atomic poll. Do the extra 2ms poll - needed as a workaround on BXT/GLK - in sleeping mode. v2: - rebase on v2 of patchset dropping the sandybridge_pcode_read/write refactoring (Chris) Cc: Chris Wilson Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180130142939.17983-2-imre.deak@intel.com drivers/gpu/drm/i915/i915_drv.h | 5 +++-- drivers/gpu/drm/i915/intel_cdclk.c | 4 ++-- drivers/gpu/drm/i915/intel_pm.c | 6 ++++-- 3 files changed, 9 insertions(+), 6 deletions(-) commit e76019a81921e87a4d9e7b3d86102bc708a6c227 Author: Imre Deak Date: Tue Jan 30 16:29:38 2018 +0200 drm/i915/bxt, glk: Increase PCODE timeouts during CDCLK freq changing Currently we see sporadic timeouts during CDCLK changing both on BXT and GLK as reported by the Bugzilla: ticket. It's easy to reproduce this by changing the frequency in a tight loop after blanking the display. The upper bound for the completion time is 800us based on my tests, so increase it from the current 500us to 2ms; with that I couldn't trigger the problem either on BXT or GLK. Note that timeouts happened during both the change notification and the voltage level setting PCODE request. (For the latter one BSpec doesn't require us to wait for completion before further HW programming.) This issue is similar to commit 2c7d0602c815 ("drm/i915/gen9: Fix PCODE polling during CDCLK change notification") but there the PCODE request does complete (as shown by the mbox busy flag), only the reply we get from PCODE indicates a failure. So there we keep resending the request until a success reply, here we just have to increase the timeout for the one PCODE request we send. v2: - s/snb_pcode_request/sandybridge_pcode_write_timeout/ (Ville) Cc: Chris Wilson Cc: Ville Syrjälä Cc: # v4.4+ Acked-by: Chris Wilson (v1) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103326 Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20180130142939.17983-1-imre.deak@intel.com drivers/gpu/drm/i915/i915_drv.h | 6 +++++- drivers/gpu/drm/i915/intel_cdclk.c | 22 +++++++++++++++++----- drivers/gpu/drm/i915/intel_pm.c | 6 +++--- 3 files changed, 25 insertions(+), 9 deletions(-) commit 424c3f05e1673b684881b487771d38d276750b3d Author: Tomeu Vizoso Date: Mon Nov 27 15:21:25 2017 +0100 drm/virtio: Don't return invalid caps on timeout If the wait timeouts, the caps are probably invalid and we shouldn't be passing them to userspace. Signed-off-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20171127142126.25765-1-tomeu.vizoso@collabora.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_ioctl.c | 2 ++ 1 file changed, 2 insertions(+) commit 28647b52ec0e20f84eb1b5e13095134e2b371759 Author: Michal Wajdeczko Date: Wed Jan 31 17:32:39 2018 +0000 drm/i915/guc: Don't try to create log runtime if there is no log In case of GuC initialization failure we may continue with driver load, but we wrongly assume that GuC is fully functional. This leads to the BUG as we attempt to access non-existing log vma. [26386.121085] BUG: unable to handle kernel NULL pointer dereference at 00000000000000a0 [26386.121225] IP: guc_log_runtime_create+0x23/0xe0 [i915] [26386.121763] Call Trace: [26386.121870] guc_log_late_setup+0xfd/0x140 [i915] [26386.121969] i915_driver_load+0x7ab/0x1730 [i915] [26386.122069] i915_pci_probe+0x2d/0x90 [i915] [26386.122089] pci_device_probe+0x9c/0x120 [26386.122107] driver_probe_device+0x2a9/0x490 [26386.122126] __driver_attach+0xd9/0xe0 [26386.122143] ? driver_probe_device+0x490/0x490 [26386.122158] bus_for_each_dev+0x57/0x90 [26386.122175] bus_add_driver+0x1eb/0x260 [26386.122190] ? 0xffffffffa069a000 [26386.122206] driver_register+0x52/0xc0 [26386.122220] ? 0xffffffffa069a000 [26386.122234] do_one_initcall+0x39/0x170 [26386.122252] ? kmem_cache_alloc_trace+0x1fd/0x2e0 [26386.122273] do_init_module+0x56/0x1ec [26386.122289] load_module+0x219e/0x2550 [26386.122309] ? vfs_read+0x121/0x140 [26386.122331] ? SyS_finit_module+0xa5/0xe0 [26386.122346] SyS_finit_module+0xa5/0xe0 [26386.122371] entry_SYSCALL_64_fastpath+0x22/0x8f Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Michal Winiarski Cc: Daniele Ceraolo Spurio Cc: Sagar Arun Kamble Link: https://patchwork.freedesktop.org/patch/msgid/20180131173241.19704-4-michal.wajdeczko@intel.com Reviewed-by: Sagar Arun Kamble Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_guc_log.c | 3 +++ 1 file changed, 3 insertions(+) commit bf67ce62a0758f6001355530a47cd37d3dca3de6 Author: Michal Wajdeczko Date: Wed Jan 31 17:32:37 2018 +0000 drm/i915/guc: Don't forget to free GuC error log We're freeing GuC error log in uc_fini_hw() that matches corresponding uc_init_hw() but we missed the point that this log object is copied on error path and in case of failure in uc_init_hw() we will leak this object as uc_fini_hw() is never called. If we free this log object as part of the late uC cleanup, where we also release other firmware objects, we can avoid this BUG: [70841.001413] BUG drm_i915_gem_object (Tainted: G U W ): Objects remaining in drm_i915_gem_object on __kmem_cache_shutdown() [70841.001436] INFO: Slab 0x00000000c94e41af objects=21 used=1 fp=0x000000001d60c40a flags=0x8000000000008100 [70841.001466] Call Trace: [70841.001471] dump_stack+0x5e/0x8e [70841.001476] slab_err+0x99/0xb0 [70841.001483] ? __slab_alloc.isra.24.constprop.29+0x62/0x70 [70841.001491] ? __kmalloc+0x1f5/0x320 [70841.001497] __kmem_cache_shutdown+0x18b/0x400 [70841.001505] shutdown_cache+0x13/0x1c0 [70841.001511] kmem_cache_destroy+0x1c2/0x240 [70841.001517] ? __mutex_unlock_slowpath+0x38/0x270 [70841.001559] i915_gem_load_cleanup+0xbc/0x130 [i915] [70841.001595] i915_driver_cleanup_early+0x11/0x60 [i915] [70841.001630] i915_driver_load+0x708/0x1720 [i915] [70841.001638] ? trace_hardirqs_on_caller+0xe2/0x1c0 [70841.001673] i915_pci_probe+0x2d/0x90 [i915] [70841.001680] pci_device_probe+0x9c/0x120 [70841.001687] driver_probe_device+0x2a9/0x490 [70841.001694] __driver_attach+0xd9/0xe0 [70841.001700] ? driver_probe_device+0x490/0x490 [70841.001705] bus_for_each_dev+0x57/0x90 [70841.001712] bus_add_driver+0x1eb/0x260 [70841.001717] ? 0xffffffffa0685000 [70841.001723] driver_register+0x52/0xc0 [70841.001728] ? 0xffffffffa0685000 [70841.001733] do_one_initcall+0x39/0x170 [70841.001739] ? rcu_read_lock_sched_held+0x6f/0x80 [70841.001746] ? kmem_cache_alloc_trace+0x27b/0x2e0 [70841.001753] do_init_module+0x56/0x1ec [70841.001759] load_module+0x219e/0x2550 [70841.001766] ? vfs_read+0x121/0x140 [70841.001774] ? SyS_finit_module+0xa5/0xe0 [70841.001779] SyS_finit_module+0xa5/0xe0 [70841.001788] entry_SYSCALL_64_fastpath+0x22/0x8f [70841.001806] INFO: Object 0x00000000eab7ed96 @offset=6208 [70841.001850] INFO: Allocated in i915_gem_object_create.part.32+0x1f/0x260 [i915] age=38 cpu=0 pid=2708 [70841.001861] kmem_cache_alloc+0x23d/0x2d0 [70841.001897] i915_gem_object_create.part.32+0x1f/0x260 [i915] [70841.001937] intel_guc_allocate_vma+0x15/0x100 [i915] [70841.001977] intel_guc_log_create+0x34/0x1c0 [i915] [70841.002014] intel_guc_init+0x5a/0x100 [i915] [70841.002051] intel_uc_init+0x3e/0xb0 [i915] [70841.002089] i915_gem_init+0x18e/0x540 [i915] [70841.002123] i915_driver_load+0xa7a/0x1720 [i915] [70841.002159] i915_pci_probe+0x2d/0x90 [i915] [70841.002165] pci_device_probe+0x9c/0x120 [70841.002171] driver_probe_device+0x2a9/0x490 [70841.002177] __driver_attach+0xd9/0xe0 [70841.002182] bus_for_each_dev+0x57/0x90 [70841.002188] bus_add_driver+0x1eb/0x260 [70841.002193] driver_register+0x52/0xc0 [70841.002198] do_one_initcall+0x39/0x170 [70841.002462] kmem_cache_destroy drm_i915_gem_object: Slab cache still has objects [70841.002491] Call Trace: [70841.002497] dump_stack+0x5e/0x8e [70841.002503] kmem_cache_destroy+0x1e0/0x240 [70841.002509] ? __mutex_unlock_slowpath+0x38/0x270 [70841.002551] i915_gem_load_cleanup+0xbc/0x130 [i915] [70841.002586] i915_driver_cleanup_early+0x11/0x60 [i915] [70841.002621] i915_driver_load+0x708/0x1720 [i915] [70841.002629] ? trace_hardirqs_on_caller+0xe2/0x1c0 [70841.002664] i915_pci_probe+0x2d/0x90 [i915] [70841.002671] pci_device_probe+0x9c/0x120 [70841.002678] driver_probe_device+0x2a9/0x490 [70841.002684] __driver_attach+0xd9/0xe0 [70841.002690] ? driver_probe_device+0x490/0x490 [70841.002696] bus_for_each_dev+0x57/0x90 [70841.002702] bus_add_driver+0x1eb/0x260 [70841.002708] ? 0xffffffffa0685000 [70841.002713] driver_register+0x52/0xc0 [70841.002719] ? 0xffffffffa0685000 [70841.002724] do_one_initcall+0x39/0x170 [70841.002731] ? rcu_read_lock_sched_held+0x6f/0x80 [70841.002737] ? kmem_cache_alloc_trace+0x27b/0x2e0 [70841.002745] do_init_module+0x56/0x1ec [70841.002751] load_module+0x219e/0x2550 [70841.002758] ? vfs_read+0x121/0x140 [70841.002766] ? SyS_finit_module+0xa5/0xe0 [70841.002772] SyS_finit_module+0xa5/0xe0 [70841.002781] entry_SYSCALL_64_fastpath+0x22/0x8f Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Sagar Arun Kamble Cc: Michal Winiarski Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180131173241.19704-2-michal.wajdeczko@intel.com Reviewed-by: Sagar Arun Kamble Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_uc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 10a558374f3751cf4eb55143008975641dfc2cf4 Merge: fafef98 d8a5b80 Author: Dmitry Torokhov Date: Thu Feb 1 00:41:33 2018 -0800 Merge tag 'v4.15' into next Sync with mainline to get in trackpoint updates and other changes. commit fe215c8bc42695621bbeee92ed5ebe7c5a2f4f86 Author: Matthew Auld Date: Wed Jan 31 21:44:40 2018 +0000 drm/i915/selftests: add missing gtt shrinker test Try to catch a bug we've seen in the wild where the shrinker purges the pd/pdp from under us while allocating our paging structures. References: https://bugs.freedesktop.org/show_bug.cgi?id=104773 Signed-off-by: Matthew Auld Cc: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180131191453.12676-1-matthew.auld@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180131214440.7141-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 84 +++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) commit b715a2f0c7714a399e7f8e951cc8dea9cd4eeb4b Author: Chris Wilson Date: Wed Jan 31 21:44:39 2018 +0000 drm/i915/ppgtt: Pin page directories before allocation Commit e2b763caa6eb ("drm/i915: Remove bitmap tracking for used-pdpes") believed that because it did not insert its freshly allocated page directory into the pd tree, it was safe from the shrinker. I failed to heed the lesson learnt from commit dd19674bacba ("drm/i915: Remove bitmap tracking for used-ptes") that we need to pin all the levels in the tree before hitting the shrinker or else the shrinker may free an upper layer as we proceed to allocate the tree. Thus leaving dangling pointers everywhere and a GPF should we hit direct reclaim at just the wrong moment. CPU: 0 PID: 7374 Comm: chromium Tainted: P O 4.14.13-1-ARCH #1 Hardware name: Apple Inc. MacBookPro12,1/Mac-E43C1C25D4880AD6, BIOS MBP121.88Z.0167.B33.1706181928 06/18/2017 task: ffff994f696c2c40 task.stack: ffffb1a789d4c000 RIP: 0010:gen8_ppgtt_set_pde.isra.40+0x48/0x70 [i915] RSP: 0018:ffffb1a789d4f940 EFLAGS: 00010206 RAX: 81c1788cc4f68138 RBX: ffff994f54db8000 RCX: ffff994f696c2c40 RDX: 000000023bc73003 RSI: ffff994d598b6b80 RDI: ffff994f54db8000 RBP: ffff994d598b6b80 R08: 0000000000000000 R09: 0000000000000000 R10: ffffb1a789d4f550 R11: ffff994eaf3c3208 R12: 0000000000000027 R13: 0000000000005000 R14: 0000000004e8f000 R15: ffff994f54dba000 FS: 00007f585886aa00(0000) GS:ffff994faec00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000004ac8e8 CR3: 00000002552c8004 CR4: 00000000003606f0 Call Trace: gen8_ppgtt_alloc_pdp+0x178/0x320 [i915] gen8_ppgtt_alloc_4lvl+0x5f/0x150 [i915] ppgtt_bind_vma+0x30/0x70 [i915] i915_vma_bind+0x68/0xd0 [i915] __i915_vma_do_pin+0x2d6/0x3a0 [i915] eb_lookup_vmas+0x7a2/0xb50 [i915] i915_gem_do_execbuffer+0x4d7/0x10e0 [i915] ? sock_wfree+0x34/0x60 ? unix_stream_read_generic+0x1f9/0x7e0 ? import_iovec+0x37/0xd0 ? i915_gem_execbuffer2+0x5d/0x390 [i915] i915_gem_execbuffer2+0x1b7/0x390 [i915] ? i915_gem_execbuffer+0x2d0/0x2d0 [i915] drm_ioctl_kernel+0x59/0xb0 [drm] drm_ioctl+0x2d5/0x370 [drm] ? i915_gem_execbuffer+0x2d0/0x2d0 [i915] ? __seccomp_filter+0x3b/0x260 do_vfs_ioctl+0xa1/0x610 ? syscall_trace_enter+0xdb/0x2b0 SyS_ioctl+0x74/0x80 do_syscall_64+0x55/0x110 entry_SYSCALL64_slow_path+0x25/0x25 RIP: 0033:0x7f584fa82d27 RSP: 002b:00007ffee14a7828 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000003b0126a1030 RCX: 00007f584fa82d27 RDX: 00007ffee14a7870 RSI: 0000000040406469 RDI: 0000000000000080 RBP: 00007ffee14a7870 R08: 0000000000000002 R09: 0000000000000077 R10: 00007f5839f2b780 R11: 0000000000000246 R12: 0000000040406469 R13: 0000000000000080 R14: 00007f5842b00040 R15: 0000000000000000 Code: 01 00 83 81 58 0a 00 00 01 48 2b 05 13 9d fd c9 48 c1 f8 06 48 c1 e0 0c 48 8d 04 d0 48 8b 56 08 48 03 05 0c 9d fd c9 48 83 ca 03 <48> 89 10 83 a9 58 0a 00 00 01 65 ff 0d 37 03 fb 3e 74 02 f3 c3 RIP: gen8_ppgtt_set_pde.isra.40+0x48/0x70 [i915] RSP: ffffb1a789d4f940 Reported-by: Eric Blau Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104773 Fixes: e2b763caa6eb ("drm/i915: Remove bitmap tracking for used-pdpes") References: dd19674bacba ("drm/i915: Remove bitmap tracking for used-ptes") Testcase: igt/drv_selftest/live_gtt (igt_ppgtt_shrink_boom) Signed-off-by: Chris Wilson Cc: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180131214440.7141-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/i915_gem_gtt.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 40b90efeae9be8702d387dbcbb3aadc57033d4db Author: Baolin Wang Date: Mon Jan 29 10:22:51 2018 +0800 kdb: use ktime_get_mono_fast_ns() instead of ktime_get_ts() The kdb code will print the monotonic time by ktime_get_ts(), but the ktime_get_ts() will be protected by a sequence lock, that will introduce one deadlock risk if the lock was already held in the context from which we entered the debugger. Thus we can use the ktime_get_mono_fast_ns() to get the monotonic time, which is NMI safe access to clock monotonic. Moreover we can remove the 'struct timespec', which is not y2038 safe. Signed-off-by: Baolin Wang Reviewed-by: Daniel Thompson Reviewed-by: Arnd Bergmann Signed-off-by: Jason Wessel kernel/debug/kdb/kdb_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 164daaf23c97d949ff6642584c1770b1f9b8974a Author: Paulo Zanoni Date: Tue Jan 30 11:49:18 2018 -0200 drm/i915/icl: allow the reg_read ioctl to read the RCS TIMESTAMP register This enables the Mesa driver to advertise support for ARB_timer_query, and thus an OpenGL version higher than 3.2. Based on the CNL patch by Nanley Chery. v2: Rebase. Cc: Anuj Phogat Cc: Nanley Chery Cc: Rodrigo Vivi Requested-by: Anuj Phogat Tested-by: Anuj Phogat Reviewed-by: Rodrigo Vivi Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180130134918.32283-10-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_uncore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 225701fc20ef9c0219a1119a9495c39c30797a4b Author: Kelvin Gardiner Date: Tue Jan 30 11:49:17 2018 -0200 drm/i915/icl: Set graphics mode register for gen11 This patch clears a single bit. The bit is 0 by default but expected not to be set. Explicitly clearing the bit in this patch is intended to indicate some thinking has occurred, and that we want this bit cleared and we are not just excepting the default value. We also stop setting GFX_RUN_LIST_ENABLE, which is correct since that bit is gone. v2 (from Paulo): fix indentation. v3: Changed GEN check to >= 11. Corrected author name. v4 (from Paulo): improve commit message (Daniele). Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Kelvin Gardiner Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180130134918.32283-9-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_lrc.c | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) commit b597277643fef8f2eab35a6c812b6f98094a0de1 Author: James Ausmus Date: Tue Jan 30 11:49:16 2018 -0200 drm/i915/icl: Handle expanded PLANE_CTL_FORMAT field ICL+ adds changes the PLANE_CTL_FORMAT field from [27:24] to [27:23], however, all existing PLANE_CTL_FORMAT_* definitions still map to the correct values. Add an ICL_PLANE_CTL_FORMAT_MASK definition, and use that for masking for the conversion to fourcc. v2: No changes v3: Change new definition name, drop comment (Rodrigo) Cc: Rodrigo Vivi Reviewed-by: Paulo Zanoni Signed-off-by: James Ausmus Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180130134918.32283-8-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_reg.h | 6 ++++++ drivers/gpu/drm/i915/intel_display.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 4357ce07e6bff1809f25eaae485fac4989296816 Author: Paulo Zanoni Date: Tue Jan 30 11:49:15 2018 -0200 drm/i915/gen11: fix the SAGV block time for gen11 It's 10us for gen 11. Reviewed-by: Mahesh Kumar Reviewed-by: James Ausmus Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180130134918.32283-7-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_pm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 7800549716f48ea585be9694633ec02bbc8c32a3 Author: Mahesh Kumar Date: Tue Jan 30 11:49:14 2018 -0200 drm/i915/icl: Introduce MBus related registers This patch introduce MBus control registers and their bit-fields MBUS_ABOX_CTL MBUS_BBOX_CTL MBUS_DBOX_CTL MBUS_UBOX_CTL Changes Since V1: - Use function like macros (Paulo) - fix copy-paste error (Paulo) Reviewed-by: Paulo Zanoni Reviewed-by: James Ausmus Signed-off-by: Mahesh Kumar Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180130134918.32283-6-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_reg.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 234059da0f336fff315746ea34d4cf04a36d7c01 Author: Mahesh Kumar Date: Tue Jan 30 11:49:13 2018 -0200 drm/i915/icl: NV12 y-plane ddb is not in same plane We don't have planar pixel format support implemented for ICL yet. ICL require 2 display planes to be allocated for Planar formats unlike previous GEN. So ICL/GEN11 doesn't require to write Y-plane ddb data in NV12_BUF_CFG register and PLANE_NV12_BUF_CFG register is removed in ICL. This patch removes the PLANE_NV12_BUF_CFG write for ICL. Changes Since V1: - Improve commit message as per Paulo's comment Reviewed-by: Paulo Zanoni Reviewed-by: James Ausmus Signed-off-by: Mahesh Kumar Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180130134918.32283-5-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_pm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5b695aff3af5606c4128eba6a64c33c7d74d4f49 Author: Mahesh Kumar Date: Tue Jan 30 11:49:12 2018 -0200 drm/i915/icl: Fail flip if ddb allocated are less than min display buffer needed ICL require DDB allocation of plane to be more than "minimum display buffer needed" for each level in order to enable WM level. This patch implements and consider the same while allocating DDB and enabling WM. Changes Since V1: - rebase Changes Since V2: - Remove extra parentheses - Use FP16.16 only when absolutely necessary (Paulo) Changes Since V3: - Rebase Changes since v4 (from Paulo): - Coding style issue. Changes since v5 (from Paulo): - Do the final checks according to BSpec. Reviewed-by: Paulo Zanoni Signed-off-by: Mahesh Kumar Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180130134918.32283-4-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_pm.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit df8ee19087d24ca00c4f76b3a28c793b661b4b1e Author: Mahesh Kumar Date: Tue Jan 30 11:49:11 2018 -0200 drm/i915/icl: Do not fix dbuf block size to 512 GEN9/10 had fixed DBuf block size of 512. Dbuf block size is not a fixed number anymore in GEN11, it varies according to bits per pixel and tiling. If 8bpp & Yf-tile surface, block size = 256 else block size = 512 This patch addresses the same. v2 (from Paulo): - Make it compile. - Fix a few coding style issues. v3: - Rebase on top of upstream patches v4 (from Paulo): - Bikeshed if statements (James). Reviewed-by: Paulo Zanoni Reviewed-by: James Ausmus Signed-off-by: Mahesh Kumar Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180130134918.32283-3-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 24 +++++++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) commit 9a9e3dfd6f8bff68434b9c5e1a3aa88f83a612ad Author: Mahesh Kumar Date: Tue Jan 30 11:49:10 2018 -0200 drm/i915/icl: Don't allocate fixed bypass path blocks for ICL GEN9 onwards bypass path allocation of 4 blocks was needed, as per hardware design. ICL doesn't require bypass path allocation of 4 DDB blocks, handling the same in this patch. v2 (from Paulo): - No need for a comment that says what the code already says. Reviewed-by: Paulo Zanoni Reviewed-by: James Ausmus Signed-off-by: Mahesh Kumar Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180130134918.32283-2-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ff84e7bfe1763982e1ada390386dbe4739cee1e2 Author: tamizhr@codeaurora.org Date: Wed Jan 31 16:24:50 2018 +0530 mac80211: Add support to notify ht/vht opmode modification. This will add support to send an event to a userspace application whenever station advertise its ht/vht opmode modification through an action frame. Signed-off-by: Tamizh chelvam Signed-off-by: Johannes Berg net/mac80211/rx.c | 14 ++++++++++++++ net/mac80211/vht.c | 9 +++++++++ 2 files changed, 23 insertions(+) commit 466b9936bf93b7ec3bce1dcd493262ff0a8a4f44 Author: tamizhr@codeaurora.org Date: Wed Jan 31 16:24:49 2018 +0530 cfg80211: Add support to notify station's opmode change to userspace ht/vht action frames will be sent to AP from station to notify change of its ht/vht opmode(max bandwidth, smps mode or nss) modified values. Currently these valuse used by driver/firmware for rate control algorithm. This patch introduces NL80211_CMD_STA_OPMODE_CHANGED command to notify those modified/current supported values(max bandwidth, smps mode, max nss) to userspace application. This will be useful for the application like steering, which closely monitoring station's capability changes. Since the application has taken these values during station association. Signed-off-by: Tamizh chelvam Signed-off-by: Johannes Berg include/net/cfg80211.h | 43 ++++++++++++++++++++++++++++++++++ include/uapi/linux/nl80211.h | 12 ++++++++++ net/wireless/nl80211.c | 55 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) commit 25b0ba7ebbc5ffa5a64d752b85af78e6e517e3b2 Author: Ben Greear Date: Fri Jan 26 17:14:19 2018 -0800 mac80211: Add txq flags to debugfs Might help one figure out why aqm drivers may fail to transmit frames sometimes. Signed-off-by: Ben Greear Signed-off-by: Johannes Berg net/mac80211/debugfs_sta.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 10773a7c09b327d02144c7d181e6544b7015ffc7 Author: Srinivas Dasari Date: Thu Jan 25 17:13:39 2018 +0200 nl80211: Allow SAE Authentication for NL80211_CMD_CONNECT This commit allows SAE Authentication for NL80211_CMD_CONNECT interface, provided host driver advertises the support. Host drivers may offload the SAE authentication to user space through NL80211_CMD_EXTERNAL_AUTH interface and thus expect the user space to advertise support to handle offload through NL80211_ATTR_EXTERNAL_AUTH_SUPPORT in NL80211_CMD_CONNECT request. Such drivers should reject the connect request on no offload support from user space. Signed-off-by: Srinivas Dasari Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg net/wireless/nl80211.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 40cbfa90218bc570a7959b436b9d48a18c361041 Author: Srinivas Dasari Date: Thu Jan 25 17:13:38 2018 +0200 cfg80211/nl80211: Optional authentication offload to userspace This interface allows the host driver to offload the authentication to user space. This is exclusively defined for host drivers that do not define separate commands for authentication and association, but rely on userspace SME (e.g., in wpa_supplicant for the ~WPA_DRIVER_FLAGS_SME case) for the authentication to happen. This can be used to implement SAE without full implementation in the kernel/firmware while still being able to use NL80211_CMD_CONNECT with driver-based BSS selection. Host driver sends NL80211_CMD_EXTERNAL_AUTH event to start/abort authentication to the port on which connect is triggered and status of authentication is further indicated by user space to host driver through the same command response interface. User space entities advertise this capability through the NL80211_ATTR_EXTERNAL_AUTH_SUPP flag in the NL80211_CMD_CONNECT request. Host drivers shall look at this capability to offload the authentication. Signed-off-by: Srinivas Dasari Signed-off-by: Jouni Malinen [add socket connection ownership check] Signed-off-by: Johannes Berg include/net/cfg80211.h | 54 +++++++++++++++++++++++-- include/uapi/linux/nl80211.h | 47 ++++++++++++++++++++++ net/wireless/nl80211.c | 94 ++++++++++++++++++++++++++++++++++++++++++++ net/wireless/rdev-ops.h | 15 +++++++ net/wireless/trace.h | 23 +++++++++++ 5 files changed, 230 insertions(+), 3 deletions(-) commit 5037a00992e5fcb3d8509964313565a3dab6697c Author: Sunil Dutt Date: Thu Jan 25 17:13:37 2018 +0200 nl80211: Introduce scan flags to emphasize requested scan behavior This commit defines new scan flags (LOW_SPAN, LOW_POWER, HIGH_LATENCY) to emphasize the requested scan behavior for the driver. These flags are optional and are mutually exclusive. The implementation of the respective functionality can be driver/hardware specific. These flags can be used to control the compromise between how long a scan takes, how much power it uses, and high accurate/complete the scan is in finding the BSSs. Signed-off-by: Sunil Dutt Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 28 +++++++++++++++++++++++++++- net/wireless/nl80211.c | 13 +++++++++++-- 2 files changed, 38 insertions(+), 3 deletions(-) commit 6335698e24ec11e1324b916177da6721df724dd8 Author: Benjamin Beichler Date: Mon Jan 22 18:04:37 2018 +0100 mac80211_hwsim: add generation count for netlink dump operation Make the dump operation aware of changes on radio list and corresponding inconsistent dumps. Changed variable name for better understanding. Signed-off-by: Benjamin Beichler [compress ternary operator] Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 301b04040c3ea2512b8936f419efbbaef2645ccb Author: Benjamin Beichler Date: Mon Jan 22 18:04:36 2018 +0100 mac80211_hwsim: add nl_err_msg in hwsim_new_radio in netlink case Add a NL_ERR_MSG in case of creating a radio by a netlink message to give clear output to the creating process instead of creating only a debug message in kernel log. The same function is used for the creation while module load, so keep the old message, although it should never be thrown while load, because the module controls all mac addresses. Signed-off-by: Benjamin Beichler [remove message, add missing braces] Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit cb1a5bae568450b96c6828f235589cb42ce1dc81 Author: Benjamin Beichler Date: Mon Jan 22 18:04:35 2018 +0100 mac80211_hwsim: add permanent mac address option for new radios If simulation needs predictable permanent mac addresses of hwsim wireless phy, this patch add the ability to create a new radio with a user defined permanent mac address. Allowed mac addresses needs to be locally administrated mac addresses (as also the former fixed 42:* and 02:* were). To do not break the operation with legacy software using hwsim, the new address is set twice. The problem here is, the netlink call backs use wiphy->addresses[1] as identification of a radio and not the proposed permanent address (wiphy->addresses[0]). This design decision is not documented in the kernel repo, therefore this patch simply reproduces this, but with the same address. Signed-off-by: Benjamin Beichler [make pointer const] Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 43 +++++++++++++++++++++++++++-------- drivers/net/wireless/mac80211_hwsim.h | 9 +++++++- 2 files changed, 42 insertions(+), 10 deletions(-) commit 5b364bec5cbfd6c23505952a40150b053ec551d1 Author: Chris Wilson Date: Tue Jan 30 16:44:57 2018 +0000 drm/i915: Flush ggtt writes through the old fenced vma before changing fences This is a precautionary measure as I have no evidence to suggest we've hit a bug here (I was hoping this might explain gdg's odd behaviour, but alas), but given that we have a function to flush the ggtt writes it seems prudent to use it prior to changing the fence register. Due to the intrinsic nature of the GTT often operating as an independent mmio path, we should not just rely on the write to the fence acting as a full flush for GTT writes. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180130164457.14037-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_fence_reg.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b1852d362f31ac0c233e7c7b040f7c58bd381267 Author: Sagar Arun Kamble Date: Wed Jan 31 11:44:37 2018 +0530 drm/i915/guc: Fix return from guc_log_relay_file_create guc_log_relay_file_create will return -EEXIST if we invoke relay_late_setup_files multiple times as part of i915_guc_log_control. However this is to be not cosidered as fail and need to return 0. This was mistakenly introduced in the below commit. Fix it. Fixes: 70deeaddc6e6 "drm/i915/guc: Fix lockdep due to log relay channel handling under struct_mutex" Signed-off-by: Sagar Arun Kamble Cc: Chris Wilson Cc: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/1517379279-12967-1-git-send-email-sagar.a.kamble@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_guc_log.c | 2 ++ 1 file changed, 2 insertions(+) commit 889230489b6b138ba97ba2f13fc9644a3d16d0d2 Author: Chris Wilson Date: Mon Jan 29 14:41:04 2018 +0000 drm/i915: Always run hangcheck while the GPU is busy Previously, we relied on only running the hangcheck while somebody was waiting on the GPU, in order to minimise the amount of time hangcheck had to run. (If nobody was watching the GPU, nobody would notice if the GPU wasn't responding -- eventually somebody would care and so kick hangcheck into action.) However, this falls apart from around commit 4680816be336 ("drm/i915: Wait first for submission, before waiting for request completion"), as not all waiters declare themselves to hangcheck and so we could switch off hangcheck and miss GPU hangs even when waiting under the struct_mutex. If we enable hangcheck from the first request submission, and let it run until the GPU is idle again, we forgo all the complexity involved with only enabling around waiters. We just have to remember to be careful that we do not declare a GPU hang when idly waiting for the next request to be come ready, as we will run hangcheck continuously even when the engines are stalled waiting for external events. This should be true already as we should only be tracking requests submitted to hardware for execution as an indicator that the engine is busy. Fixes: 4680816be336 ("drm/i915: Wait first for submission, before waiting for request completion" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104840 Signed-off-by: Chris Wilson Cc: Chris Wilson Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180129144104.3921-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 7 +++---- drivers/gpu/drm/i915/i915_gem_request.c | 2 ++ drivers/gpu/drm/i915/intel_breadcrumbs.c | 11 ----------- drivers/gpu/drm/i915/intel_hangcheck.c | 7 +------ 4 files changed, 6 insertions(+), 21 deletions(-) commit 7246a966b6784a9a72f3d8bcc2784cddee459967 Merge: 72906f3 1c27b64 Author: Ingo Molnar Date: Wed Jan 31 09:28:45 2018 +0100 Merge branch 'lkmm-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into locking/urgent Pull the "Linux kernel memory model" tooling implementation from Paul E. McKenney: 'This pull request contains a single commit that adds a memory model to the tools directory. This memory model can (roughly speaking) be thought of as an automated version of memory-barriers.txt. It is written in the "cat" language, which is executable by the externally provided "herd7" simulator, which exhaustively explores the state space of small litmus tests.' Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra commit 213451076bd370e55a70ff07f6575b1451ba1a9f Author: Lorenzo Bianconi Date: Sat Jan 13 18:57:56 2018 +0100 iio: imu: st_lsm6dsx: add hw timestamp support Introduce hw timestamp support instead of compute sample timestamps according to interrupt rate and configured watermark. LSM6DSx based devices are able to queue in hw FIFO the time reference of data sampling Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 29 +++-- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 161 ++++++++++++++++--------- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 104 +++++++++++++++- 3 files changed, 224 insertions(+), 70 deletions(-) commit 54033f19d8f51f75ae263aefb3893f5708cba88b Author: Milan Stevanovic Date: Sun Jan 14 21:32:40 2018 +0100 iio: adc: change license description Using an SPDX tag. Remove a license notice to keep the whole purpose of using an SPDx id. Signed-off-by: Milan Stevanovic Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7476.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4d2b6d8c0ae831ba91608f605ce25171bd2d4a4b Author: Milan Stevanovic Date: Sun Jan 14 21:32:39 2018 +0100 iio: adc: driver for ti adc081s/adc101s/adc121s Add Linux device driver for TI single-channel CMOS 8/10/12-bit analog-to-digital converter with a high-speed serial interface. Signed-off-by: Milan Stevanovic Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7476.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit ea9170e57689082fabc5787521774533bbd4a5a9 Author: Randy Dunlap Date: Sun Jan 14 21:11:05 2018 -0800 iio/adc: depend on SYSFS instead of selecting it Drivers should not 'select' a subsystem. Instead they should depend on it. If the subsystem is disabled, the user probably did that for a purpose and one driver shouldn't be changing that. This also makes all IIO drivers consistent w.r.t depending on SYSFS instead of selecting it. Signed-off-by: Randy Dunlap Cc: Jonathan Cameron Cc: linux-iio@vger.kernel.org Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1a3f6755649dd419d9e01cbc38e116e2c70acb73 Author: Quentin Schulz Date: Mon Jan 15 11:33:41 2018 +0100 iio: adc: axp20x_adc: add support for AXP813 ADC The X-Powers AXP813 PMIC is really close to what is already done for AXP20X/AXP22X. There are two pairs of bits to set the rate (one for Voltage and Current measurements and one for TS/GPIO0 voltage measurements) instead of one. The register to set the ADC rates is different from the one for AXP20X/AXP22X. GPIO0 can be used as an ADC (measuring Volts) unlike for AXP22X. The scales to apply to the different inputs are unlike the ones from AXP20X and AXP22X. Signed-off-by: Quentin Schulz Acked-by: Jonathan Cameron Signed-off-by: Jonathan Cameron drivers/iio/adc/axp20x_adc.c | 123 +++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/axp20x.h | 2 + 2 files changed, 125 insertions(+) commit 359163d786e2b05f3e3bd2db7f1629d7150d6dd2 Author: Quentin Schulz Date: Mon Jan 15 11:33:37 2018 +0100 iio: adc: axp20x_adc: make it possible to probe from DT To prepare for a future patch that will add a DT node for the ADC, make axp20x_adc able to probe from DT and get the per-variant data from of_device_id.data since platform_device_id.driver_data won't be set when probing by DT. Leave the ability to probe via platform for driver compatibility with old DTs. Signed-off-by: Quentin Schulz Signed-off-by: Jonathan Cameron drivers/iio/adc/axp20x_adc.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 22042a6e694db118cdb27e8a9ead21df046458df Author: Quentin Schulz Date: Mon Jan 15 11:33:36 2018 +0100 dt-bindings: iio: adc: add binding for X-Powers AXP PMICs ADC X-Powers PMICs have several ADC channels that can be used for different purposes, e.g. PMIC internal temperature, battery voltage or AC current. This is the documentation for AXP209, AXP221/223 and AXP813 ADC bindings. Signed-off-by: Quentin Schulz Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/axp20x_adc.txt | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 0659ecb5dfc10e4bb771d72e8b1b5c429f612082 Author: Quentin Schulz Date: Mon Jan 15 11:33:35 2018 +0100 iio: adc: axp20x_adc: put ADC rate setting in a per-variant function To prepare for a new comer that set a different register with different values, move rate setting in a function that is specific to each AXP variant. Signed-off-by: Quentin Schulz Signed-off-by: Jonathan Cameron drivers/iio/adc/axp20x_adc.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 64eb8a15a439b56243697237bab6e2c48281138c Author: Alexandru Ardelean Date: Thu Jan 18 16:57:40 2018 +0200 staging: iio: adc: ad7192: disable burnout currents on misconfig The burnout currents can be enabled only if buffer is enabled and CHOP is disabled. So, if neither of these conditions are met, then we should disable the burnout currents in the driver as well, and warn the user. This change doesn't fix anything. The burnout currents simply won't work if CHOP is enabled or buffer is disabled. The intent is to provide the user with some feedback instead of silently not working inside the chip. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/ad7192.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2a7fa90a9aef19ee6a959356be53bbd6ed851304 Author: Wei Yongjun Date: Wed Jan 17 11:30:00 2018 +0000 iio: ep93xx: remove redundant return value check of platform_get_resource() Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun Signed-off-by: Jonathan Cameron drivers/iio/adc/ep93xx_adc.c | 4 ---- 1 file changed, 4 deletions(-) commit 56154dac338a96c37713b2320d57b76d624a245c Author: Lorenzo Bianconi Date: Mon Jan 8 23:12:31 2018 +0100 iio: humidity: hts221: remove unnecessary get_unaligned_le16() Remove unnecessary unaligned access routine in hts221_read_oneshot() and the related include Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/humidity/hts221_core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 621779220bfc5d2f3e3790e491ae9f91372a12e7 Author: Lorenzo Bianconi Date: Mon Jan 8 23:12:30 2018 +0100 iio: humidity: hts221: add regmap API support Introduce regmap API support to access to i2c/spi bus instead of using a custom support. Remove lock mutex since concurrency is already managed by regmap API Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/humidity/Kconfig | 2 + drivers/iio/humidity/hts221.h | 21 +------ drivers/iio/humidity/hts221_buffer.c | 37 +++++------ drivers/iio/humidity/hts221_core.c | 115 +++++++++++++---------------------- drivers/iio/humidity/hts221_i2c.c | 64 ++++++------------- drivers/iio/humidity/hts221_spi.c | 81 ++++++------------------ 6 files changed, 103 insertions(+), 217 deletions(-) commit b62c4a96a6627793b2ac2ad3530e37a1cec29559 Author: Lorenzo Bianconi Date: Mon Jan 8 23:12:29 2018 +0100 iio: humidity: hts221: remove trailing whitespace from a comment Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/humidity/hts221_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf388e3a9429b9a477ba9487c29fcf91c504d8d9 Author: Lorenzo Bianconi Date: Mon Jan 8 23:12:28 2018 +0100 iio: humidity: hts221: remove warnings in hts221_parse_{temp,rh}_caldata() Remove following sparse warnings in hts221_parse_temp_caldata() and in hts221_parse_rh_caldata(): drivers/iio/humidity/hts221_core.c:302:19: warning: cast to restricted __le16 drivers/iio/humidity/hts221_core.c:314:18: warning: cast to restricted __le16 drivers/iio/humidity/hts221_core.c:320:18: warning: cast to restricted __le16 drivers/iio/humidity/hts221_core.c:355:18: warning: cast to restricted __le16 drivers/iio/humidity/hts221_core.c:361:18: warning: cast to restricted __le16 Fixes: e4a70e3e7d84 ("iio: humidity: add support to hts221 rh/temp combo device") Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/humidity/hts221_core.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit cb60610af54b143a74991c70448157baf5bfc345 Author: Xiongfeng Wang Date: Fri Jan 12 15:45:38 2018 +0800 iio: accel: use strlcpy() instead of strncpy() gcc-8 reports drivers/iio/accel/st_accel_i2c.c: In function 'st_accel_i2c_probe': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 20 equals destination size [-Wstringop-truncation] The compiler require that the length of the dest string is greater than the length we want to copy to make sure the dest string is nul-terminated. We can just use strlcpy() to avoid this warning. Signed-off-by: Xiongfeng Wang Signed-off-by: Jonathan Cameron drivers/iio/accel/st_accel_i2c.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 53ddb3cdb063d7be74aa22ed831cad8aa5ee0863 Author: Rodrigo Vivi Date: Mon Jan 29 15:22:23 2018 -0800 drm/i915/cnl: Fix DP max rate for Cannonlake with port F. On CNL SKUs that uses port F, max DP rate is 8.1G for all ports when we have the elevated voltage (higher than 0.85V). v2: Make commit message more generic. v3: Move conditions to a helper to get easier to read. (Ville). v4: Add a mention to the numerical voltage on commit message per Manasi request. v5: Thanks CI! "error: control reaches end of non-void function" Cc: Ville Syrjälä Cc: Lucas De Marchi Cc: Manasi Navare Signed-off-by: Rodrigo Vivi Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20180129232223.766-10-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_dp.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 9787e835fa98bbcd9abf90eff90c6f603d25d416 Author: Rodrigo Vivi Date: Mon Jan 29 15:22:22 2018 -0800 drm/i915/cnl: Enable DDI-F on Cannonlake. Now let's finish the Port-F support by adding the proper port F detection, irq and power well support. v2: Rebase v3: Use BIT_ULL v4: Cover missed case on ddi init. v5: Update commit message. v6: Rebase on top of display headers rework. v7: Squash power-well handling related to DDI F to this patch to avoid warns as pointed out by DK. v8: Introduce DDI_F_LANES to PG2. (DK) v9: Squash in the PORT_F case for enabling DP MST encoder. (DK) Cc: Dhinakaran Pandiyan Cc: Manasi Navare Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: David Weinehall Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20180129232223.766-9-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_ddi.c | 4 ++++ drivers/gpu/drm/i915/intel_display.c | 6 +++++- drivers/gpu/drm/i915/intel_display.h | 2 ++ drivers/gpu/drm/i915/intel_dp.c | 3 ++- drivers/gpu/drm/i915/intel_runtime_pm.c | 20 +++++++++++++++++--- 6 files changed, 32 insertions(+), 5 deletions(-) commit cf53902f48c3c7a34c6955f79c8800d1746de52c Author: Rodrigo Vivi Date: Mon Jan 29 15:22:21 2018 -0800 drm/i915/cnl: Add HPD support for Port F. On CNP boards that are using DDI F, bit 25 (SDE_PORTE_HOTPLUG_SPT) is representing the Digital Port F hotplug line when the Digital Port F hotplug detect input is enabled. v2: Reuse all existent structure instead of adding a new HPD_PORT_F pointing to pin of port E. v3: Use IS_CNL_WITH_PORT_F so we can start upstreaming this right now. If that SKU ever get a proper name we come back and update it. v4: Rebase on top of digital connected port using encoder instead of port. v5: Moved IS_CNL_WITH_PORT_F definition to the PCI IDs patch. Cc: Lucas De Marchi Cc: Manasi Navare Cc: Dhinakaran Pandiyan Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180129232223.766-8-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 6 ++++-- drivers/gpu/drm/i915/i915_irq.c | 35 +++++++++++++++++++---------------- drivers/gpu/drm/i915/intel_dp.c | 4 +++- drivers/gpu/drm/i915/intel_hdmi.c | 2 +- drivers/gpu/drm/i915/intel_hotplug.c | 19 +++++++++++++++---- 5 files changed, 42 insertions(+), 24 deletions(-) commit 7533eb4f89f70f9efb81171bcfa528f51d3d2618 Author: Rodrigo Vivi Date: Mon Jan 29 15:22:20 2018 -0800 drm/i915: For HPD connected port use hpd_pin instead of port. Let's try to simplify this mapping to hpd_pin -> bit instead using port. So for CNL with port F where we have this port using hdp_pin and bits of other ports we don't need to duplicated the mapping. But for now this is only a re-org with no functional change expected. v2: Add missing lines and nuke @port reference from code documentation. (Ville) Cc: Lucas De Marchi Suggested-by: Ville Syrjälä Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180129232223.766-7-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_dp.c | 150 ++++++++++++++++++------------------ drivers/gpu/drm/i915/intel_drv.h | 3 +- drivers/gpu/drm/i915/intel_lspcon.c | 3 +- 3 files changed, 77 insertions(+), 79 deletions(-) commit 3a2a59ccb11c93e778f83548b6963e4d061f5810 Author: Rodrigo Vivi Date: Mon Jan 29 15:22:19 2018 -0800 drm/i915/cnl: Add right GMBUS pin number for HDMI on Port F. On CNP Pin 3 is for misc of Port F usage depending on the configuration. For CNL that uses Port F, pin 3 is the one. v2: Make it more generic and update commit message. Cc: Anusha Srivatsa Cc: Lucas De Marchi Cc: Manasi Navare Signed-off-by: Rodrigo Vivi Reviewed-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180129232223.766-6-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_hdmi.c | 3 +++ 1 file changed, 3 insertions(+) commit 376faf8a3b2ff497b1f1583ab4b23bc650711764 Author: Rodrigo Vivi Date: Mon Jan 29 15:22:18 2018 -0800 drm/i915: Fix DPLCLKA_CFGCR0 bits for Port F. Since when it got introduced with commit '555e38d27317 ("drm/i915/cnl: DDI - PLL mapping")' the support for Port F was wrong, because Port F bits are far from bits used for A to E. Since Port F is not used so far we don't need to propagate Fixes back there. v2: Reuse _SHIFT definition to avoid complicated duplication (DK). Cc: Dhinakaran Pandiyan Cc: Lucas De Marchi Cc: Manasi Navare Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20180129232223.766-5-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 8f942ed00efe9f6626031521c439070cca47b364 Author: Rodrigo Vivi Date: Mon Jan 29 15:22:17 2018 -0800 drm/i915/cnl: Fix _CNL_PORT_TX_DW2_LN0_F definition. This was wrong since its introduction on commit '04416108ccea ("drm/i915/cnl: Add registers related to voltage swing sequences.")' But since no Port F was needed so far we don't need to propagate fixes back there. Cc: Lucas De Marchi Cc: Manasi Navare Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20180129232223.766-4-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1ae6a8b7a85e830a6831cc76e33350e6a58437a Author: Rodrigo Vivi Date: Mon Jan 29 15:22:16 2018 -0800 drm/i915/cnl: Extend Wa 1178 to Aux F. We also need to extend this WA to Aux F. Cc: Dhinakaran Pandiyan Cc: Lucas De Marchi Signed-off-by: Rodrigo Vivi Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20180129232223.766-3-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 4 +++- drivers/gpu/drm/i915/intel_runtime_pm.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) commit a324fcaca314cafccda77a68ef1f7f6a1355de2c Author: Rodrigo Vivi Date: Mon Jan 29 15:22:15 2018 -0800 drm/i915/cnl: Add AUX-F support On some Cannonlake SKUs we have a dedicated Aux for port F, that is only the full split between port A and port E. There is still no Aux E for Port E, as in previous platforms, because port_E still means shared lanes with port A. v2: Rebase. v3: Add couple missed PORT_F cases on intel_dp. v4: Rebase and fix commit message. v5: Squash Imre's "drm/i915: Add missing AUX_F power well string" v6: Rebase on top of display headers rework. v7: s/IS_CANNONLAKE/IS_CNL_WITH_PORT_F (DK) v8: Fix Aux bits for Port F (DK) v9: Fix VBT definition of Port F (DK). v10: Squash power well addition to this patch to avoid warns as pointed by DK. v11: Clean up squashed commit message. (David) v12: Remove unnecessary handling for older platforms (DK) Adding AUX_F to PG2 following other existent ones. (DK) Cc: David Weinehall Cc: Dhinakaran Pandiyan Cc: Lucas De Marchi Cc: Imre Deak Cc: Manasi Navare Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: David Weinehall Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20180129232223.766-2-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_irq.c | 6 ++++++ drivers/gpu/drm/i915/i915_reg.h | 9 +++++++++ drivers/gpu/drm/i915/intel_display.h | 1 + drivers/gpu/drm/i915/intel_dp.c | 6 ++++++ drivers/gpu/drm/i915/intel_runtime_pm.c | 22 ++++++++++++++++++++++ 6 files changed, 45 insertions(+) commit 3f43031b169361fefe032c13ebf644d17f3d76d6 Author: Rodrigo Vivi Date: Mon Jan 29 15:22:14 2018 -0800 drm/i915/cnl: Add Cannonlake PCI IDs for another SKU. The only difference is that this SKUs has the full Port A/E split named as Port F. But since SKUs differences don't matter on the platform definition group and ids, let's merge all off them together. v2: Really include the PCI IDs to the picidlist[]; v3: Add the PCI Id for another SKU (Anusha). v4: Update IDs, really include to pciidlists again. v5: Unify all GT2 IDs. v6: Unify in a way that we don't break early-quirks.c v7: Remove GT reference since it doesn't matter here (Paulo) Also move IS_CNL_WITH_PORT_F macro to this patch to make it easier for review this part and also to get used sooner. v8: Rebased on top of commit 5db47e37b387 ("Revert "drm/i915: mark all device info struct with __initconst"") Cc: Dhinakaran Pandiyan Cc: Paulo Zanoni Cc: Lucas De Marchi Signed-off-by: Anusha Srivatsa Signed-off-by: Rodrigo Vivi Reviewed-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180129232223.766-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c | 5 ++--- include/drm/i915_pciids.h | 18 +++++++----------- 3 files changed, 11 insertions(+), 14 deletions(-) commit c2925bde829a748265a69aef128f0a88d82cb689 Author: Gustavo A. R. Silva Date: Tue Jan 30 04:05:28 2018 -0600 drm/edid: use true and false for boolean values Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180130100528.GA7154@training drivers/gpu/drm/drm_edid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9eb8d7a93c81fdff68189979caff22a058891d15 Author: Dan Carpenter Date: Thu Jan 25 17:26:55 2018 +0300 drm/mgag200: fix a test in mga_vga_mode_valid() The parentheses are in the wrong place here so we pass the bits per pixel as zero. Fixes: abbee6238775 ("drm/mgag200: Added resolution and bandwidth limits for various G200e products.") Signed-off-by: Dan Carpenter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180125142655.GA23885@mwanda drivers/gpu/drm/mgag200/mgag200_mode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b46310eecd9e23ec140ee2e1004f9335e776da82 Author: Daniel Vetter Date: Wed Jan 17 15:17:55 2018 +0100 drm/arcpgu: remove drm_encoder_slave drm_encoder_slave is the old way to write bridge drivers, for i2c bridges only. It's deprecated, and definitely should not be used in new drivers. This has absolutely nothing to do with the new bridge driver infrastructure implemented by drm_bridge. What's even strange is that arcpgu doesn't even use any of this, it really only wants a plain normal drm_encoder. Nuke all the surplus real estate. v2: Actually git add after compile testing ... v3: Clarify commit message and stop including drm_encoder_slave.h. Cc: Laurent Pinchart Cc: Alexey Brodkin Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180117141755.16933-1-daniel.vetter@ffwll.ch drivers/gpu/drm/arc/arcpgu_hdmi.c | 3 ++- drivers/gpu/drm/arc/arcpgu_sim.c | 16 ++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) commit e56a0fbd5251b43cc11bf2be30b8f45d7a847903 Author: Shawn Guo Date: Mon Jan 15 11:47:59 2018 +0800 dma-buf/sw_sync: fix document of sw_sync_create_fence_data The structure should really be sw_sync_create_fence_data rather than sw_sync_ioctl_create_fence which is the function name. Signed-off-by: Shawn Guo Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1515988079-8677-1-git-send-email-shawn.guo@linaro.org drivers/dma-buf/sw_sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 363932b43dddfaba8095984e2b57674937323f1f Author: Sean Paul Date: Tue Jan 30 09:47:01 2018 -0500 drm/i915: Downgrade hdcp logs from INFO to DEBUG_KMS HDCP was a bit too chatty to get along with the rest of the i915 driver. Suggested-by: Daniel Vetter Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180130144707.171657-1-seanpaul@chromium.org drivers/gpu/drm/i915/intel_hdcp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit bb68922f100e78982515e7593de9fd23b58172d8 Author: Sean Paul Date: Tue Jan 30 09:29:34 2018 -0500 drm/i915: Restore HDCP DRM_INFO when with no downstream The commit below returned earlier than before, but failed to move the info message when authenticating without downstream devices. This patch restores the message on authentication success. Changes in v2: - s/no downstream devices/no repeater present/ (Ram) Fixes: 87eb3ec818fa ("drm/i915: II stage HDCP auth for repeater only") Cc: Ramalingam C Cc: Sean Paul Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180130142943.168314-1-seanpaul@chromium.org Link: https://patchwork.freedesktop.org/patch/msgid/20180130142943.168314-1-seanpaul@chromium.org drivers/gpu/drm/i915/intel_hdcp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fa5aaeecf524ecbcae9755ee3d34b7b8ba412583 Author: Maarten Lankhorst Date: Tue Jan 30 11:27:04 2018 +0100 drm/atomic: Remove WARN_ON for invalid plane configuration. Userspace can set a FB_ID on a plane without setting CRTC_ID, which will fail with -EINVAL, but the kernel shouldn't warn about that. Same for !FB_ID and CRTC_ID being set. Signed-off-by: Maarten Lankhorst Acked-by: Daniel Vetter Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180130102704.28016-1-maarten.lankhorst@linux.intel.com Reviewed-by: Harry Wentland drivers/gpu/drm/drm_atomic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 394676f05bee6ddea67e9aafc978a7b9afb72528 Author: Imre Deak Date: Tue Jan 16 13:24:15 2018 +0200 drm/i915: Add WA for planes ending close to left screen edge While running the kms_plane clipping test I noticed a similar problem to the one described in Display WA #1175. In this case, similarly for planes other than the cursor, with 1 or 3 pixels visible from the left edge of the screen to the end of the plane and an odd plane X offset used for clipping causes the same kind of underflow and display corruption as described for WA #1175. Fix this in a similar way as that WA rejecting planes ending <4 pixels from the left screen edge. v2: - Rebase on v2 of patch 1/1. Testcase: igt/kms_plane/plane-clipping-pipe-*-planes Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180116112415.22060-2-imre.deak@intel.com drivers/gpu/drm/i915/intel_display.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit c322c649529f9a827f09f19ab5c2fbd9361b6020 Author: Imre Deak Date: Tue Jan 16 13:24:14 2018 +0200 drm/i915: Add display WA #1175 for planes ending close to right screen edge As described in the WA on GLK and CNL planes on the right edge of the screen that have less than 4 pixels visible from the beginning of the plane to the edge of the screen can cause FIFO underflow and display corruption. On GLK/CNL I could trigger the problem only if the plane was at the same time also aligned to the top edge of the screen (after clipping) and there were exactly 2 pixels visible from the start of the plane to the right edge of the screen (so couldn't trigger it with 1 or 3 pixels visible). Nevertheless, to be sure, I also applied the WA for these cases. I also couldn't see any problem with the cursor plane and later Art confirmed that it's not affected, so the WA is applied only for the other plane types. v2: - Use -ERANGE instead of -EINVAL. (Chris) Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180116112415.22060-1-imre.deak@intel.com drivers/gpu/drm/i915/intel_display.c | 28 ++++++++++++++++++++++++---- drivers/gpu/drm/i915/intel_drv.h | 3 ++- drivers/gpu/drm/i915/intel_sprite.c | 2 +- 3 files changed, 27 insertions(+), 6 deletions(-) commit 1a1c130cca78c77209cd795282d93297640fb63e Author: Philippe Cornu Date: Thu Jan 25 11:38:00 2018 +0100 drm/bridge/synopsys: dsi: Fix dsi_host_transfer() return value The dw_mipi_dsi_host_transfer() must return the number of bytes transmitted/received on success instead of 0. Note: As the read feature is not implemented, only the transmitted number of bytes is returned for the moment. Reviewed-by: Brian Norris Signed-off-by: Philippe Cornu Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20180125103800.1999-3-philippe.cornu@st.com drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 4cda6e8e1ea0e7bc80028fa4fe196357a2799d05 Author: Philippe Cornu Date: Thu Jan 25 11:37:59 2018 +0100 drm/bridge/synopsys: dsi: Add a warning msg on dsi read requests The dcs/generic dsi read feature is not yet implemented so it is important to warn the host_transfer() caller in case of read operation requests. Reviewed-by: Brian Norris Signed-off-by: Philippe Cornu Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20180125103800.1999-2-philippe.cornu@st.com drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 21f815bf773c1f7dc278060eb49d7651c3175148 Author: Philippe Cornu Date: Tue Jan 30 11:42:00 2018 +0100 drm/stm: drv: Improve data transfers To optimize data transfers, align pitch on 128 bytes & height on 4 bytes. This optimization is not applicable on hw without MMU. Signed-off-by: Yannick Fertre Signed-off-by: Vincent Abriou Signed-off-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20180130104200.21602-1-philippe.cornu@st.com drivers/gpu/drm/stm/drv.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 023f34890199dc16c6b4451fa30b7b1ced54113c Author: Philippe CORNU Date: Mon Jan 22 17:46:28 2018 +0100 drm/stm: dsi: Add 1.31 version support Add support for the stm dsi phy/wrapper version 1.31. Only lane capabilities need to be modified. Signed-off-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20180122164628.24728-1-philippe.cornu@st.com drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 39 +++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 9 deletions(-) commit f35b55565a4932739350065bce57ec0f67fcd54b Author: Philippe CORNU Date: Mon Jan 22 16:35:47 2018 +0100 dt-bindings: display: stm32: correct clock-names in dsi panel example In the dsi panel example, clock names in the "clock-names" field have been swapped: * "pclk" (peripheral clock) is <&rcc 1 CLK_F469_DSI> on stm32f4 * "ref" (dsi phy pll ref clock) is <&clk_hse> on stm32f4 Signed-off-by: Philippe Cornu Reviewed-by: Rob Herring Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20180122153547.23470-1-philippe.cornu@st.com Documentation/devicetree/bindings/display/st,stm32-ltdc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c6ceeee6ebbcdf9839dbce00719162591180524 Author: Leo (Sunpeng) Li Date: Wed Jan 17 12:51:08 2018 +0100 drm/atomic: Fix memleak on ERESTARTSYS during non-blocking commits During a non-blocking commit, it is possible to return before the commit_tail work is queued (-ERESTARTSYS, for example). Since a reference on the crtc commit object is obtained for the pending vblank event when preparing the commit, the above situation will leave us with an extra reference. Therefore, if the commit_tail worker has not consumed the event at the end of a commit, release it's reference. Changes since v1: - Also check for state->event->base.completion being set, to handle the case where stall_checks() fails in setup_crtc_commit(). Changes since v2: - Add a flag to drm_crtc_commit, to prevent dereferencing a freed event. i915 may unreference the state in a worker. Fixes: 24835e442f28 ("drm: reference count event->completion") Cc: # v4.11+ Signed-off-by: Leo (Sunpeng) Li Acked-by: Harry Wentland #v1 Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180117115108.29608-1-maarten.lankhorst@linux.intel.com Reviewed-by: Sean Paul drivers/gpu/drm/drm_atomic_helper.c | 15 +++++++++++++++ include/drm/drm_atomic.h | 9 +++++++++ 2 files changed, 24 insertions(+) commit 3393ce1ed8fc43dbdb83952facaf04e644ca1d54 Author: Rodrigo Vivi Date: Thu Jan 25 14:25:24 2018 -0800 drm/i915/cnp: Properly handle VBT ddc pin out of bounds. If the table result is out of bounds on the array map there is something really wrong with VBT pin so we don't return that vbt_pin, but only return 0 instead. This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")' Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.") v2: Do in a way that we don't break other platforms. (Jani) v3: Keep debug message (Jani) v4: Don't mess with 0 mapping was noticed by Jani and addressed with a simple solution suggested by Lucas that makes this even simpler. Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.") Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.") Cc: Radhakrishna Sripada Cc: Jani Nikula Cc: Kai Heng Feng Cc: Lucas De Marchi Suggested-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi Reviewed-by: Lucas De Marchi Tested-by: Kai-Heng Feng Link: https://patchwork.freedesktop.org/patch/msgid/20180125222524.22059-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_bios.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e995ca0b8139c5f6807095464e969931b443f55a Author: Ville Syrjälä Date: Tue Nov 14 20:32:58 2017 +0200 drm/i915: Provide a device level .mode_valid() hook We never support certain mode flags etc. Reject those early on in the mode_config.mode_valid() hook. That allows us to remove some duplicated checks from the connector .mode_valid() hooks, and it guarantees that we never see those flags even from user mode as the mode_config.mode_valid() hooks gets executed for those as well. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171114183258.16976-11-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_crt.c | 3 --- drivers/gpu/drm/i915/intel_display.c | 27 +++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_dsi.c | 5 ----- drivers/gpu/drm/i915/intel_dvo.c | 3 --- drivers/gpu/drm/i915/intel_fbc.c | 3 +-- drivers/gpu/drm/i915/intel_hdmi.c | 3 --- drivers/gpu/drm/i915/intel_sdvo.c | 3 --- 7 files changed, 28 insertions(+), 19 deletions(-) commit 75a655e0a26cf0bfbaaa8df0ff5a9d1807bb1f4e Author: Ville Syrjälä Date: Tue Nov 14 20:32:57 2017 +0200 drm/modes: Provide global mode_valid hook Allow drivers to provide a device wide .mode_valid() hook in addition to the already existing crtc/encoder/bridge/connector hooks. This can be used to validate device/driver wide constraings without having to add those to the other hooks. And since we call this hook also for user modes later on in the modeset we don't have to worry about anything the hook has already rejected. I also have some further ideas for this hook. Eg. we could replace the drm_mode_set_crtcinfo(HALVE_V) call in drm_mode_convert_umode()/etc. with a driver specific variant via this hook. At least on i915 we would like to pass CRTC_STEREO_DOUBLE to that function instead, and then we could safely use the crtc_ timings in all our .mode_valid() hooks, which would allow us to reuse those hooks for validating the adjusted_mode during a modeset. v2: Fix the language fails in the kernel docs (Daniel) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171114183258.16976-10-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_atomic.c | 2 +- drivers/gpu/drm/drm_crtc.c | 2 +- drivers/gpu/drm/drm_modes.c | 48 +++++++++++++++++++++++++++----------- drivers/gpu/drm/drm_probe_helper.c | 2 +- include/drm/drm_mode_config.h | 12 ++++++++++ include/drm/drm_modes.h | 6 +++-- 6 files changed, 53 insertions(+), 19 deletions(-) commit b7245cc536b95167d67b53e27adff964400045f1 Author: Ville Syrjälä Date: Wed Nov 15 17:45:04 2017 +0200 drm/uapi: Deprecate nonsense kms mode types BUILTIN, CRTC_C, CLOCK_C, and DEFULT mode types are unused. Let's refuse to generate them or accept them from userspace either. A cursory check didn't reveal any userspace code that would depend on these. v2: Recommend DRIVER instead of BUILTIN (ajax) Cc: Jose Abreu Cc: Adam Jackson Cc: Keith Packard Signed-off-by: Ville Syrjälä Reviewed-by: Adam Jackson Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20171115154504.14338-1-ville.syrjala@linux.intel.com Reviewed-by: Jose Abreu include/drm/drm_modes.h | 7 ++++--- include/uapi/drm/drm_mode.h | 14 +++++--------- 2 files changed, 9 insertions(+), 12 deletions(-) commit 538af6cbdf9df485dc0ef43817d4195f11b4e9ac Author: Ville Syrjälä Date: Tue Nov 14 20:32:55 2017 +0200 drm/modes: Kill DRM_MODE_TYPE_CLOCK_CRTC_C define No idea what the DRM_MODE_TYPE_CLOCK_CRTC_C define is supposed to achieve. Totally unused so kill if off. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171114183258.16976-8-ville.syrjala@linux.intel.com Reviewed-by: Alex Deucher include/drm/drm_modes.h | 3 --- 1 file changed, 3 deletions(-) commit 4f09c77b5c3b7779d6de05dc1bec501d5b4c6bcd Author: Ville Syrjälä Date: Tue Nov 14 20:32:54 2017 +0200 drm/modes: Kill off the oddball DRM_MODE_TYPE_CRTC_C vs. DRM_MODE_TYPE_BUILTIN handling For some reason drm_mode_set_crtcinfo() does nothing if the mode has the DRM_MODE_TYPE_BUILTIN flag set without the other bit from DRM_MODE_TYPE_CRTC_C also set. I have zero idea what that is supposed to achieve, but since we have no users for neither flag bit let's kill this nonsense off. v2: Fix typo in commit message Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171114183258.16976-7-ville.syrjala@linux.intel.com Reviewed-by: Alex Deucher drivers/gpu/drm/drm_modes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5f26476ab534596f2a3c16cb3b3955ea8bf6380 Author: Ville Syrjälä Date: Tue Nov 14 20:32:53 2017 +0200 drm/modes: Fix description of DRM_MODE_TYPE_USERDEF These days DRM_MODE_TYPE_USERDEF is used to flag modes defined via the kernel command line. Update the docs to reflect that fact. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171114183258.16976-6-ville.syrjala@linux.intel.com Acked-by: Alex Deucher include/drm/drm_modes.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 05ebac0980543cf93dbd4a29e6b03c1c9b883c70 Author: Ville Syrjälä Date: Tue Nov 14 20:32:52 2017 +0200 drm/uapi: Deprecate DRM_MODE_FLAG_BCAST Reject any mode with DRM_MODE_FLAG_BCAST. We have no code that even checks for this flag hence it can't possibly do any good. I think this maybe originated from fbdev where it was supposed to indicate PAL/NTSC broadcast timings. I have no idea why those would have to be identified by a flag rather than by just the timings themselves. And then I assume it got copied into xfree86 for fbdevhw, and later on it leaked into the randr protocol and kms uapi. Since kms fbdev emulation never uses the corresponding fbdev flag there should be no sane way for this to come back into kms via userspace either. Cc: Jose Abreu Cc: Adam Jackson Cc: Keith Packard Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171114183258.16976-5-ville.syrjala@linux.intel.com Reviewed-by: Alex Deucher Reviewed-by: Jose Abreu include/drm/drm_modes.h | 2 +- include/uapi/drm/drm_mode.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit d15f40c84cdd2c4ac717d3c1e0146c07b5996d18 Author: Ville Syrjälä Date: Tue Nov 14 20:32:51 2017 +0200 drm/uapi: Deprecate DRM_MODE_FLAG_PIXMUX Reject any mode with DRM_MODE_FLAG_PIXMUX. We have no code that even checks for this flag hence it can't possibly do any good. Looks like this flag had something to do the the controller<->ramdac interface with some ancient S3 graphics adapters. Why someone though it would be a good idea to expose it directly to users I don't know. And later on it got copied into the randr protocol and kms uapi. Cc: Jose Abreu Cc: Adam Jackson Cc: Keith Packard Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171114183258.16976-4-ville.syrjala@linux.intel.com Reviewed-by: Alex Deucher Reviewed-by: Jose Abreu include/drm/drm_modes.h | 2 +- include/uapi/drm/drm_mode.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit c6ed6dad5cfb76d72d8f9accba9b9f8d572c518c Author: Ville Syrjälä Date: Wed Nov 15 17:49:13 2017 +0200 drm/uapi: Validate the mode flags/type Currently userspace is allowed to feed in any king of garbage in the high bits of the mode flags/type, as are drivers when probing modes. Reject any mode with bogus flags/type. Hopefully this won't break any current userspace... v2: Split the type and flags checks to separates ifs (Chris) Cc: Chris Wilson Cc: Jose Abreu Cc: Adam Jackson Cc: Keith Packard Signed-off-by: Ville Syrjälä Reviewed-by: Adam Jackson Link: https://patchwork.freedesktop.org/patch/msgid/20171115154913.23827-1-ville.syrjala@linux.intel.com Reviewed-by: Alex Deucher drivers/gpu/drm/drm_modes.c | 6 ++++++ include/uapi/drm/drm_mode.h | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+) commit 064a3e6e8e4b01e7bcbf4de6564ab52530e86d92 Author: Ville Syrjälä Date: Tue Nov 14 20:32:49 2017 +0200 drm/modes: Move 3D stereo flag check into drm_mode_validate_basic() Currently we don't sanity check the 3D stereo flags for modes filled out by the kernel. Move the check from drm_mode_convert_umode() into drm_mode_validate_basic() so that we get the same check going both ways. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171114183258.16976-2-ville.syrjala@linux.intel.com Reviewed-by: Alex Deucher drivers/gpu/drm/drm_modes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2a8d3eac3d6e11638893ec3c4ba8bc5884db2ef9 Author: Ville Syrjälä Date: Thu Jan 25 15:30:20 2018 +0200 drm: Warn if plane/crtc/encoder/connector index exceeds our 32bit bitmasks We use 32bit bitmasks to track planes/crtcs/encoders/connectors. Naturally we can only do that if the index of those objects stays below 32. Issue a warning whenever we exceed that limit, hopefully prompting someone to fix the problem. For connectors the issue is a bit more complicated as they can be created/destroyed at runtime due to MST. So the problem is no longer a purely theoretical programmer error. As the connector indexes are allocated via ida, we can simply limit the maximum value the ida is allowed to hand out. The error handling is already in place. v2: Return an error to the caller (Harry) v3: Print a debug message so that we know what happened (Maarten) Cc: Harry Wentland Cc: Maarten Lankhorst Cc: Daniel Vetter Reviewed-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180125133020.23845-1-ville.syrjala@linux.intel.com Reviewed-by: Harry Wentland drivers/gpu/drm/drm_connector.c | 9 +++++++-- drivers/gpu/drm/drm_crtc.c | 4 ++++ drivers/gpu/drm/drm_encoder.c | 4 ++++ drivers/gpu/drm/drm_plane.c | 4 ++++ 4 files changed, 19 insertions(+), 2 deletions(-) commit c7cc144d8f625cfb8f338e66d875d0ec42fc399a Author: Chris Wilson Date: Mon Jan 29 09:49:12 2018 +0000 drm/i915: Assert that we do not try to unsubmit a completed request Assert that we do not try to unsubmit a completed request, as should we try to resubmit it later, the ring is already past the request's breadcrumb and the breadcrumb will not be updated. Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180129094912.14428-1-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/i915_gem_request.c | 2 ++ 1 file changed, 2 insertions(+) commit 7fb9ee5db24a5892d3af8487de39d7b4a7fc2ea8 Author: Chris Wilson Date: Mon Jan 29 10:28:40 2018 +0000 drm/i915: Simplify guard logic for setup_scratch_page() Older gcc is complaining it can't follow the guards and thinks that addr may be used uninitialised In the process, we can simplify down to one loop, add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-131 (-131) Function old new delta setup_scratch_page 545 414 -131 Reported-by: Geert Uytterhoeven Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180129102840.19901-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 69 ++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 36 deletions(-) commit 2e4ef3347b4a4eb65c4fd950d94bbd75fed4d798 Author: Meghana Madhyastha Date: Wed Jan 24 16:37:23 2018 +0000 video: backlight: Add devres versions of of_find_backlight Add devm_of_find_backlight and the corresponding release function because some drivers use devres versions of functions for acquiring device resources. Acked-by: Daniel Thompson Reviewed-by: Noralf Trønnes Reviewed-by: Sean Paul Signed-off-by: Meghana Madhyastha Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/021f8fecfa3f374dc5dcb70fb07a6f6b019bea7b.1516810725.git.meghana.madhyastha@gmail.com drivers/video/backlight/backlight.c | 30 ++++++++++++++++++++++++++++++ include/linux/backlight.h | 7 +++++++ 2 files changed, 37 insertions(+) commit c2adda27d202fa8f70a5d6e8b0c12b449c8868b8 Author: Meghana Madhyastha Date: Wed Jan 24 16:35:30 2018 +0000 video: backlight: Add of_find_backlight helper in backlight.c Add of_find_backlight, a helper function which is a generic version of tinydrm_of_find_backlight that can be used by other drivers to avoid repetition of code and simplify things. Acked-by: Daniel Thompson Reviewed-by: Noralf Trønnes Reviewed-by: Sean Paul Reviewed-by: Thierry Reding Signed-off-by: Meghana Madhyastha Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/116d160ba78be2e6dcbdcb6855622bce67da9472.1516810725.git.meghana.madhyastha@gmail.com drivers/video/backlight/backlight.c | 43 +++++++++++++++++++++++++++++++++++++ include/linux/backlight.h | 19 ++++++++++++++++ 2 files changed, 62 insertions(+) commit 5b698be0497d8be986e2050e9b1c145b2e0603c2 Author: Meghana Madhyastha Date: Wed Jan 24 16:34:07 2018 +0000 video: backlight: Add helpers to enable and disable backlight Add helper functions backlight_enable and backlight_disable to enable/disable a backlight device. These helper functions can then be used by different drm and tinydrm drivers to avoid repetition of code and also to enforce a uniform and consistent way to enable/disable a backlight device. Acked-by: Daniel Thompson Reviewed-by: Noralf Trønnes Reviewed-by: Sean Paul Signed-off-by: Meghana Madhyastha Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/39b5bf0a02008a8072d910bdf8231c431e9ef504.1516810725.git.meghana.madhyastha@gmail.com include/linux/backlight.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 65f7fa3a3fcbdb67940a58ce24516d62aaec12b7 Author: Maxime Ripard Date: Mon Jun 26 22:51:15 2017 +0200 drm/sun4i: backend: Check for the number of alpha planes Due to the way the composition is done in hardware, we can only have a single alpha-enabled plane active at a time, placed in the second (highest priority) pipe. Make sure of that in our atomic_check to not end up in an impossible scenario. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/7371f62a1385f2cbe3ed75dfca2e746338eb2286.1516617243.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_backend.c | 51 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/sun4i/sun4i_backend.h | 2 ++ drivers/gpu/drm/sun4i/sun4i_layer.c | 24 ++--------------- 3 files changed, 55 insertions(+), 22 deletions(-) commit 47a05f4a68f91c09d89d2a0231b7b8c7ebb808ca Author: Maxime Ripard Date: Mon May 1 10:52:32 2017 +0200 drm/sun4i: backend: Add support for zpos Our various planes have a configurable zpos, that combined with the pipes allow to configure the composition. Since the interaction between the pipes, zpos and alphas framebuffers is not trivial, let's just enable the zpos as an immutable property for now, and use that zpos in our atomic_update part. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/b006853e908bd06661c5bc1f2191121523bce0e4.1516617243.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_backend.c | 15 +++++++++++++++ drivers/gpu/drm/sun4i/sun4i_backend.h | 2 ++ drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 4 ++++ drivers/gpu/drm/sun4i/sun4i_layer.c | 3 +++ 4 files changed, 24 insertions(+) commit 2bebcc4564470b03b0220bdc6836bbead750e875 Author: Maxime Ripard Date: Sun Dec 17 17:32:21 2017 +0100 drm/sun4i: backend: Set a default zpos in our reset hook The plane state zpos value will be set only if there's an existing state attached to the plane when creating the property. However, this is not the case during the probe, and we therefore need to put our default value in our reset hook. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/b6a183234f0ad5a9a58c780c9cabbe29cbf40888.1516617243.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_layer.c | 2 ++ 1 file changed, 2 insertions(+) commit 098b338afef9a8d0f5346b1fe8e1c6c3226fa602 Author: Maxime Ripard Date: Sun Dec 17 17:34:26 2017 +0100 drm/sun4i: backend: Move the coord function in the shared part The function supposed to update a plane's coordinates is called in both branches of our function. Let's move it out the if statement. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/2cd57bcf13652109da7bd5bbe12fa1d29429f02f.1516617243.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_layer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b8f1230dd3bf99a77b74ea87a57d45422a5981cf Author: Maxime Ripard Date: Sun Dec 17 18:06:05 2017 +0100 drm/sun4i: framebuffer: Add a custom atomic_check In order to support normalized zpos, we need to call drm_atomic_normalize_zpos in our driver's drm_mode_config_funcs' atomic_check. Let's duplicate the definition of drm_atomic_helper_check for now. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/67cb4ca9889e6bf29314db37127ff15eed279c53.1516617243.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 1184e09e019c3ebc657c2a9cfe51edcb19d9de10 Author: Maxime Ripard Date: Sun Apr 30 23:36:54 2017 +0200 drm/sun4i: backend: Fix define typo There was a typo in the width spelling of the (unused) SUN4I_BACKEND_IYUVLINEWITDTH_REG macro. Fix it. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/6b2e872b611b733a98a38902a2197b70c725e0b9.1516617243.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_backend.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 185f1143b20978635fdeb57f50b8ba7e80e6272a Author: Maxime Ripard Date: Sun Apr 30 15:45:14 2017 +0200 drm/sun4i: backend: Fix structure indentation The sun4i_plane_desc structure was somehow indented to two tabulations instead of one as we shoud do. Fix that. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/8a6714bddb865adfcfe2b792e406a2f10bb819bc.1516617243.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_layer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 124e5dac9a596aa9e8533e46ae6957edbe6758eb Author: Maxime Ripard Date: Fri Dec 22 15:31:27 2017 +0100 drm/vc4: Use the alpha format field in drm_format_info Now that the drm_format_info has a alpha field to tell if a format embeds an alpha component in it, let's use it. Cc: Eric Anholt Reviewed-by: Daniel Vetter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/38d4d0a085634a0b8308e819c846b9173d4d93df.1516617243.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/vc4/vc4_plane.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 1f072d6a4c637b4e068537864938b844c8190472 Author: Maxime Ripard Date: Fri Dec 22 15:31:27 2017 +0100 drm/rockchip: Use the alpha format field in drm_format_info Now that the drm_format_info has a alpha field to tell if a format embeds an alpha component in it, let's use it. Acked-by: Sandy huang Reviewed-by: Daniel Vetter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/5a217e8c93eea6f0a7f6bc5883424b47dbb6c664.1516617243.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit c89e1d27f77ec47fb7517c3689442765a60be991 Author: Maxime Ripard Date: Fri Dec 22 15:31:27 2017 +0100 drm/atmel-exynos: Use the alpha format field in drm_format_info Now that the drm_format_info has a alpha field to tell if a format embeds an alpha component in it, let's use it. Cc: Joonyoung Shim Cc: Kyungmin Park Cc: Seung-Woo Kim Acked-by: Inki Dae Reviewed-by: Daniel Vetter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/cb1bdfbb481419a17cc4f6c8a1f07930136ac13f.1516617243.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/exynos/exynos_mixer.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit e2e287fa4ad136c6375ec1c55ecae7c7e8cc969a Author: Maxime Ripard Date: Fri Dec 22 15:31:27 2017 +0100 drm/atmel-hlcdc: Use the alpha format field in drm_format_info Now that the drm_format_info has a alpha field to tell if a format embeds an alpha component in it, let's use it. Acked-by: Boris Brezillon Reviewed-by: Daniel Vetter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/23518426a46320dd884465cebec0961f839f2972.1516617243.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) commit 4cc4e1b40f3ff5227c9f326542b75947b464a635 Author: Maxime Ripard Date: Fri Dec 22 15:29:26 2017 +0100 drm/fourcc: Add a alpha field to drm_format_info There's a bunch of drivers that duplicate the same function to know if a particular format embeds an alpha component or not. Let's create a field in the drm_format_info to avoid duplicating that logic and looking up formats all the time. Cc: Eric Anholt Cc: Inki Dae Cc: Joonyoung Shim Cc: Kyungmin Park Cc: Laurent Pinchart Cc: Mark Yao Cc: Seung-Woo Kim Reviewed-by: Boris Brezillon Reviewed-by: Daniel Vetter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/9cd9951d147ff810c1f6f68d79e7983361ed6b68.1516617243.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/drm_fourcc.c | 50 ++++++++++++++++++++++---------------------- include/drm/drm_fourcc.h | 2 ++ 2 files changed, 27 insertions(+), 25 deletions(-) commit 1a32a938b6438afe70c0a2a6dd666f4a49f6c384 Author: Philippe CORNU Date: Thu Jan 25 17:01:01 2018 +0100 drm/stm: ltdc: use crtc_mode_fixup to update adjusted_mode clock There is a difference between the panel/bridge requested pixel clock value and the real one due to the hw platform clock preciseness (pll, dividers...). This patch updates the adjusted_mode clock value with the real hw clock value so then attached encoder & connector can use it for precise timing computations. Signed-off-by: Philippe Cornu Reviewed-by: Yannick Fertré Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20180125160101.9102-1-philippe.cornu@st.com drivers/gpu/drm/stm/ltdc.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) commit 74c0167f8bcf02af8ff9f2677b2d85070ba7236d Merge: 5db47e3 559f17b Author: Joonas Lahtinen Date: Mon Jan 29 11:51:57 2018 +0200 Merge drm-next into drm-intel-next-queued Pull 4.15 into drm-intel-next-queued for next feature pull. Signed-off-by: Joonas Lahtinen commit 5db47e37b38755c5e26e6b8fbc1a32ce73495940 Author: Lionel Landwerlin Date: Mon Jan 29 08:33:46 2018 +0000 Revert "drm/i915: mark all device info struct with __initconst" This reverts commit 5b54eddd3920e9f6f1a6d972454baf350cbae77e. Conflicts: drivers/gpu/drm/i915/i915_pci.c Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104805 Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson Fixes: 5b54eddd3920 ("drm/i915: mark all device info struct with __initconst") Link: https://patchwork.freedesktop.org/patch/msgid/20180129083346.29173-1-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/i915_pci.c | 96 ++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 48 deletions(-) commit e0a663f24d532c7ad9ff34cc1aa96bf94c75ef44 Merge: b10f47f c6766aa Author: Mark Brown Date: Fri Jan 26 15:27:56 2018 +0000 Merge remote-tracking branch 'asoc/topic/wm8998' into asoc-next commit b10f47faa4ad94b8b26780a873ed8756cee51120 Merge: eeb58f1 40b8488 74c7649 017b9b3 5a81eb5 1e4a36a Author: Mark Brown Date: Fri Jan 26 15:27:53 2018 +0000 Merge remote-tracking branches 'asoc/topic/wm8350', 'asoc/topic/wm8400', 'asoc/topic/wm8903', 'asoc/topic/wm8994' and 'asoc/topic/wm8997' into asoc-next commit eeb58f1eed5e8e503f12e4b84a3f27b3d21a40eb Merge: 3cad9ed 1783c9d 316c85c3d bf0842b 2d6e28c 893d7cb Author: Mark Brown Date: Fri Jan 26 15:27:49 2018 +0000 Merge remote-tracking branches 'asoc/topic/ux500', 'asoc/topic/wm0010', 'asoc/topic/wm2000', 'asoc/topic/wm5102' and 'asoc/topic/wm5110' into asoc-next commit 3cad9eda9bf8f11d4574399b68dd04405d1cafb3 Merge: fcf9403 7604d80 576f8f4 494665a Author: Mark Brown Date: Fri Jan 26 15:27:47 2018 +0000 Merge remote-tracking branches 'asoc/topic/uda1380', 'asoc/topic/uniphier' and 'asoc/topic/utils' into asoc-next commit fcf9403a18a77f887c8a7034d53fc39f2f44f549 Merge: e193dde 3d3dd0d af0f6c5 3511108 Author: Mark Brown Date: Fri Jan 26 15:27:44 2018 +0000 Merge remote-tracking branches 'asoc/topic/tlv320dac33', 'asoc/topic/ts3a227e' and 'asoc/topic/tscs42xx' into asoc-next commit e193ddead848f3da380c4f85bf78af9f34ba94f2 Merge: 01813e8 157b68b a73be94 0ce918c 9245f64 025f844 Author: Mark Brown Date: Fri Jan 26 15:27:41 2018 +0000 Merge remote-tracking branches 'asoc/topic/tas6424', 'asoc/topic/tfa9879', 'asoc/topic/tlv320aic31xx', 'asoc/topic/tlv320aic32x4' and 'asoc/topic/tlv320aic3x' into asoc-next commit 01813e837ff00dbf27e5b87790f646be23bc1935 Merge: 5a477f3 2ff739b eda85d1 5a0cf02 574d31d d5eb436 Author: Mark Brown Date: Fri Jan 26 15:27:37 2018 +0000 Merge remote-tracking branches 'asoc/topic/sun4i-i2s', 'asoc/topic/sun8i-codec', 'asoc/topic/sunxi', 'asoc/topic/symmetry' and 'asoc/topic/tas5720' into asoc-next commit 5a477f39532a06532e05b5b1391f3d1393577180 Merge: 2aa5cad 3047ec5 ef42e35 eb73336 166a5a3 512d1bb Author: Mark Brown Date: Fri Jan 26 15:27:34 2018 +0000 Merge remote-tracking branches 'asoc/topic/si476x', 'asoc/topic/simple', 'asoc/topic/spdif', 'asoc/topic/st-dfsdm' and 'asoc/topic/stm32' into asoc-next commit 2aa5cad2e8daf9f5a75bd55351fc71963a8da90d Merge: a451d4e 5954c4a edefc8f 2efb8a8 f4a2be1 da689e0 Author: Mark Brown Date: Fri Jan 26 15:27:31 2018 +0000 Merge remote-tracking branches 'asoc/topic/rt5645', 'asoc/topic/sam9g20_wm8731', 'asoc/topic/sam9x5_wm8731', 'asoc/topic/samsung' and 'asoc/topic/sgtl5000' into asoc-next commit a451d4e0c23b096bcfe5ec494fce7e5125bc4dd3 Merge: 7cf143c 790dde2 fc9cab0 Author: Mark Brown Date: Fri Jan 26 15:27:28 2018 +0000 Merge remote-tracking branches 'asoc/topic/rl6231' and 'asoc/topic/rt5514' into asoc-next commit 7cf143ca596da8e5e4091f622315b269bba82508 Merge: 19c2d84 fa25b4f 65a12b3 Author: Mark Brown Date: Fri Jan 26 15:27:26 2018 +0000 Merge remote-tracking branches 'asoc/topic/nau8825' and 'asoc/topic/nuc900' into asoc-next commit 19c2d84997beaf06327e392071c2dbe98602c56b Merge: 5e1b944 dc2a17f 949293d d04c413 fe83b1b 080f773 Author: Mark Brown Date: Fri Jan 26 15:27:22 2018 +0000 Merge remote-tracking branches 'asoc/topic/mtk', 'asoc/topic/mxs', 'asoc/topic/mxs-sgtl5000', 'asoc/topic/nau8540' and 'asoc/topic/nau8824' into asoc-next commit 5e1b94471344c5415e8fa61f07c6cedbaf242bbc Merge: 92730ec 866b9c8 68fea7c 33953d8 42e193c d6e2c4f Author: Mark Brown Date: Fri Jan 26 15:27:18 2018 +0000 Merge remote-tracking branches 'asoc/topic/max98926', 'asoc/topic/max98927', 'asoc/topic/mc13783', 'asoc/topic/msm8916' and 'asoc/topic/mt8173' into asoc-next commit 92730ec723b3f089a6c4d84984ca940d498be792 Merge: 4390057 5fb6e0a 769e40f 1175d0f 180cad3 Author: Mark Brown Date: Fri Jan 26 15:27:15 2018 +0000 Merge remote-tracking branches 'asoc/topic/hdac_hdmi', 'asoc/topic/hisilicon', 'asoc/topic/iio' and 'asoc/topic/max98373' into asoc-next commit 43900579c34d58f5feb67de2bd8733ae3585e79a Merge: 6c6afea 8f1a1df 845f80c a5a86a7 d1b726a Author: Mark Brown Date: Fri Jan 26 15:27:12 2018 +0000 Merge remote-tracking branches 'asoc/topic/eukrea-tlv320', 'asoc/topic/fsl', 'asoc/topic/fsl-ssi' and 'asoc/topic/fsl_asrc' into asoc-next commit 6c6afea22d0ab6294f596712cfc49198e2ef38f7 Merge: f3ae09c d43c17d 700c17c df53218 35b84bf 8d6fb0b Author: Mark Brown Date: Fri Jan 26 15:27:09 2018 +0000 Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/debugfs', 'asoc/topic/disconnect', 'asoc/topic/dmic' and 'asoc/topic/ep93xx' into asoc-next commit f3ae09ce60c425d2e66591c7135a291196fa6739 Merge: c710f11 ba8dd49 3c89724 8080699a 392b79e 4855f6a Author: Mark Brown Date: Fri Jan 26 15:27:06 2018 +0000 Merge remote-tracking branches 'asoc/topic/cs47l24', 'asoc/topic/cx20442', 'asoc/topic/da7213', 'asoc/topic/da7218' and 'asoc/topic/dai-drv' into asoc-next commit c710f11f3a1662490d6f5516c877dcd4d9c5948b Merge: 9c5e920 b28ad41 7f9f3ab cd9e0b8 e8d8b98 ef3d687 Author: Mark Brown Date: Fri Jan 26 15:27:02 2018 +0000 Merge remote-tracking branches 'asoc/topic/cs35l32', 'asoc/topic/cs35l34', 'asoc/topic/cs42l52', 'asoc/topic/cs42l56' and 'asoc/topic/cs42l73' into asoc-next commit 9c5e920ecb753a8ce72165c01fddf00673aa3b2a Merge: dbfd547 8d5737a 7fb59e9 141dfc9 60e1780 Author: Mark Brown Date: Fri Jan 26 15:27:00 2018 +0000 Merge remote-tracking branches 'asoc/topic/bcm2835', 'asoc/topic/codecs', 'asoc/topic/compress' and 'asoc/topic/cq93vc' into asoc-next commit dbfd5475617435d3e881577e5e1c71aa63d25de2 Merge: 8dbdc94 79b4885 03bbf9f 7afa535 4b95227 123af90 Author: Mark Brown Date: Fri Jan 26 15:26:56 2018 +0000 Merge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/ak4613', 'asoc/topic/amd', 'asoc/topic/atmel' and 'asoc/topic/au1x' into asoc-next commit 8dbdc9468a4ef463097d6ce5692efbae0a10345a Merge: bc47d18 8146acf Author: Mark Brown Date: Fri Jan 26 15:26:54 2018 +0000 Merge remote-tracking branch 'asoc/topic/twl-breakage' into asoc-next commit bc47d183c0745bdb93dcf4c17cd78cc59e27d024 Merge: ef179a7 fde7f9d Author: Mark Brown Date: Fri Jan 26 15:26:53 2018 +0000 Merge remote-tracking branch 'asoc/topic/rockchip' into asoc-next commit ef179a742d1f4146d139b5e0a82e613ceea3eba4 Merge: a69fbd7 2ca69d7 Author: Mark Brown Date: Fri Jan 26 15:26:51 2018 +0000 Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next commit a69fbd719d584344b17cf2ba4c1c909d0b251d80 Merge: 9c07389 96e1b9e Author: Mark Brown Date: Fri Jan 26 15:26:49 2018 +0000 Merge remote-tracking branch 'asoc/topic/qcom' into asoc-next commit 9c07389723e794b632b5d6e6177dc8a97655f419 Merge: 7a633e4 0cab20c Author: Mark Brown Date: Fri Jan 26 15:26:48 2018 +0000 Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-next commit 7a633e47f9c64800f2440643a6448f1a2ec20b0c Merge: f63968e dce231a Author: Mark Brown Date: Fri Jan 26 15:26:47 2018 +0000 Merge remote-tracking branch 'asoc/topic/pcm186x' into asoc-next commit f63968e79a390838dba2a27457b552dbf9587e98 Merge: 70fff74 72c3818 Author: Mark Brown Date: Fri Jan 26 15:26:45 2018 +0000 Merge remote-tracking branch 'asoc/topic/pcm' into asoc-next commit 70fff7438b049cdd66f26a50d016baffdc719095 Merge: 5b813ec f7f61e0 Author: Mark Brown Date: Fri Jan 26 15:26:44 2018 +0000 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next commit 5b813ecaa48720c20d1320ca100d8b1462c2afbb Merge: b872617 971da24 Author: Mark Brown Date: Fri Jan 26 15:26:42 2018 +0000 Merge remote-tracking branch 'asoc/topic/core' into asoc-next commit b872617c09843ee6a9dba7818b56f96232dfe62d Merge: 52fe54e 290df4d3 dd6bb9b Author: Mark Brown Date: Fri Jan 26 15:26:39 2018 +0000 Merge remote-tracking branches 'asoc/fix/compress' and 'asoc/fix/mtk' into asoc-linus commit 52fe54ef3fe25ae7d8bce738a6558eab8383e19d Merge: 18e63b3 c66234c Author: Mark Brown Date: Fri Jan 26 15:26:38 2018 +0000 Merge remote-tracking branch 'asoc/fix/rockchip' into asoc-linus commit 18e63b355e523a19eb4d81f8c1e5c747204e129b Merge: 3c4cb8b 845ab40 Author: Mark Brown Date: Fri Jan 26 15:26:36 2018 +0000 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit 3c4cb8b20a0f93dcb85dcba3ddc9f4e63c1750fc Merge: 0c5b9b5 f30a4c3 Author: Mark Brown Date: Fri Jan 26 15:26:35 2018 +0000 Merge remote-tracking branch 'asoc/fix/core' into asoc-linus commit 1d2a19c2567c74ff3c50fa1a0823052adee9c49f Author: Chris Wilson Date: Fri Jan 26 12:18:46 2018 +0000 drm/i915/lrc: Remove superfluous WARN_ON Remove the WARN_ON(ce->state) inside the static function only called when ce->state == NULL and downgrade the w/a batch setup warning into a developer only mode (GEM_WARN_ON). v2: Move the deferred alloc guard into the callee, eliminating the need for the WARN_ON: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-1 (-1) Function old new delta execlists_context_pin 1819 1818 -1 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180126121846.12007-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 41d2f5fa89e3fa772ea27c0e1b7bf0e7c6f295b1 Author: Manasi Navare Date: Mon Jan 22 14:43:11 2018 -0800 drm/dp: Add definitions for TPS4 bits and macros to check the support DP 1.4 spec adds a TPS4 training pattern sequence required for HBR3. This patch adds the corresponding bit definitions in MAX_DOWNSPREAD register and TRAINING_PATTERN_SET and inline functions to check if this bit is set and for selecting a proper TRAINING_PATTERN_MASK that changed to 0x7 on DP spec 1.4 Cc: Rodrigo Vivi Cc: Jani Nikula Cc: dri-devel@lists.freedesktop.org Signed-off-by: Manasi Navare Reviewed-by: Harry Wentland Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1516660991-20697-2-git-send-email-manasi.d.navare@intel.com include/drm/drm_dp_helper.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit e0bd878a959008f02a1280b1dd2c128324586af3 Author: Manasi Navare Date: Mon Jan 22 14:43:10 2018 -0800 drm/dp: Add HBR3 support in existing DRM DP helpers Existing helpers add support upto HBR2. This patch adds support for HBR3 rate (8.1 Gbps) introduced as part of DP 1.4 specification. Cc: Rodrigo Vivi Cc: Jani Nikula Cc: dri-devel@lists.freedesktop.org Signed-off-by: Manasi Navare Reviewed-by: Harry Wentland Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1516660991-20697-1-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/drm_dp_helper.c | 4 ++++ drivers/gpu/drm/drm_dp_mst_topology.c | 3 +++ include/drm/drm_dp_helper.h | 1 + 3 files changed, 8 insertions(+) commit 09b1a4e4b583b4c54c819563717949807fdbb640 Author: Chris Wilson Date: Thu Jan 25 11:24:42 2018 +0000 drm/i915/lrc: Clear context restore/save inhibit flags for new contexts CTX_CONTEXT_CONTROL (CTX_SR_CTL) operates as a masked register and so will only apply the bits that are selected by the upper half. In the case of selectively enabling sr inhibit, this may mean the context keeps the current setting (so forgetting to save the context later, eventually leading to a very upset GPU!). Fixes: 517aaffe0c1b ("drm/i915/execlists: Inhibit context save/restore for the fake preempt context") Signed-off-by: Chris Wilson Cc: Michal Winiarski Cc: Michel Thierry Cc: Michal Wajdeczko Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180125112443.12745-1-chris@chris-wilson.co.uk Reviewed-by: Michel Thierry drivers/gpu/drm/i915/intel_lrc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 33f765f698895527acd69faf5d54ab07f02683ff Author: Randy Dunlap Date: Fri Dec 8 10:19:28 2017 -0800 kdb: bl: don't use tab character in output The "bl" (list breakpoints) command prints a '\t' (tab) character in its output, but on a console (video device), that just prints some odd graphics character. Instead of printing a tab character, just align the output with spaces. Signed-off-by: Randy Dunlap Cc: Daniel Thompson Cc: Jason Wessel Cc: kgdb-bugreport@lists.sourceforge.net Signed-off-by: Jason Wessel kernel/debug/kdb/kdb_bp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b0f73bc7f1793997eb48bd14e3db51c3c95e2098 Author: Randy Dunlap Date: Fri Dec 8 10:19:23 2017 -0800 kdb: drop newline in unknown command output When an unknown command is entered, kdb prints "Unknown kdb command:" and then the unknown text, including the newline character. This causes the ending single-quote mark to be printed on the next line by itself, so just change the ending newline character to a null character (end of string) so that it won't be "printed." Signed-off-by: Randy Dunlap Cc: Daniel Thompson Cc: Jason Wessel Cc: kgdb-bugreport@lists.sourceforge.net Signed-off-by: Jason Wessel kernel/debug/kdb/kdb_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 1e0ce03bf142454f38a5fc050bf4fd698d2d36d8 Author: Randy Dunlap Date: Fri Dec 8 10:19:19 2017 -0800 kdb: make "mdr" command repeat The "mdr" command should repeat (continue) when only Enter/Return is pressed, so make it do so. Signed-off-by: Randy Dunlap Cc: Daniel Thompson Cc: Jason Wessel Cc: kgdb-bugreport@lists.sourceforge.net Signed-off-by: Jason Wessel kernel/debug/kdb/kdb_main.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit 6909e29fdefbb7aa643021279daef6ed10c81528 Author: Arnd Bergmann Date: Thu Oct 12 16:06:11 2017 +0200 kdb: use __ktime_get_real_seconds instead of __current_kernel_time kdb is the only user of the __current_kernel_time() interface, which is not y2038 safe and should be removed at some point. The kdb code also goes to great lengths to print the time in a human-readable format from 'struct timespec', again using a non-y2038-safe re-implementation of the generic time_to_tm() code. Using __current_kernel_time() here is necessary since the regular accessors that require a sequence lock might hang when called during the xtime update. However, this is safe in the particular case since kdb is only interested in the tv_sec field that is updated atomically. In order to make this y2038-safe, I'm converting the code to the generic time64_to_tm helper, but that introduces the problem that we have no interface like __current_kernel_time() that provides a 64-bit timestamp in a lockless, safe and architecture-independent way. I have multiple ideas for how to solve that: - __ktime_get_real_seconds() is lockless, but can return incorrect results on 32-bit architectures in the special case that we are in the process of changing the time across the epoch, either during the timer tick that overflows the seconds in 2038, or while calling settimeofday. - ktime_get_real_fast_ns() would work in this context, but does require a call into the clocksource driver to return a high-resolution timestamp. This may have undesired side-effects in the debugger, since we want to limit the interactions with the rest of the kernel. - Adding a ktime_get_real_fast_seconds() based on tk_fast_mono plus tkr->base_real without the tk_clock_read() delta. Not sure about the value of adding yet another interface here. - Changing the existing ktime_get_real_seconds() to use tk_fast_mono on 32-bit architectures rather than xtime_sec. I think this could work, but am not entirely sure if this is an improvement. I picked the first of those for simplicity here. It's technically not correct but probably good enough as the time is only used for the debugging output and the race will likely never be hit in practice. Another downside is having to move the declaration into a public header file. Let me know if anyone has a different preference. Cc: Andy Shevchenko Link: https://patchwork.kernel.org/patch/9775309/ Signed-off-by: Arnd Bergmann Signed-off-by: Jason Wessel include/linux/timekeeping.h | 1 + kernel/debug/kdb/kdb_main.c | 45 +++++--------------------------------- kernel/time/timekeeping_internal.h | 2 -- 3 files changed, 6 insertions(+), 42 deletions(-) commit 0296c248b440fe0ae3f08c5c2fcded795c59353e Author: Daniel Thompson Date: Tue Dec 12 12:10:36 2017 +0000 misc: kgdbts: Display progress of asynchronous tests kgdbts includes a couple of different "thrashing" style tests that may have long runtimes (especially on simulated platforms) and which run asynchronously. This is uncomfortable for interactive use and makes setting timeouts tricky for automatic use. Fix by providing a optional means to show progress during these tests. Selecting 100 is somewhat arbitrary but it matches the step used on the synchronous tests, is large enough to keep the call to printk from invalidating the testing and is human enough to "feel about right". Signed-off-by: Daniel Thompson Signed-off-by: Jason Wessel drivers/misc/kgdbts.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1c27b644c0fdbc61e113b8faee14baeb8df32486 Author: Paul E. McKenney Date: Thu Jan 18 19:58:55 2018 -0800 Automate memory-barriers.txt; provide Linux-kernel memory model There is some reason to believe that Documentation/memory-barriers.txt could use some help, and a major purpose of this patch is to provide that help in the form of a design-time tool that can produce all valid executions of a small fragment of concurrent Linux-kernel code, which is called a "litmus test". This tool's functionality is roughly similar to a full state-space search. Please note that this is a design-time tool, not useful for regression testing. However, we hope that the underlying Linux-kernel memory model will be incorporated into other tools capable of analyzing large bodies of code for regression-testing purposes. The main tool is herd7, together with the linux-kernel.bell, linux-kernel.cat, linux-kernel.cfg, linux-kernel.def, and lock.cat files added by this patch. The herd7 executable takes the other files as input, and all of these files collectively define the Linux-kernel memory memory model. A brief description of each of these other files is provided in the README file. Although this tool does have its limitations, which are documented in the README file, it does improve on the version reported on in the LWN series (https://lwn.net/Articles/718628/ and https://lwn.net/Articles/720550/) by supporting locking and arithmetic, including a much wider variety of read-modify-write atomic operations. Please note that herd7 is not part of this submission, but is freely available from http://diy.inria.fr/sources/index.html (and via "git" at https://github.com/herd/herdtools7). A second tool is klitmus7, which converts litmus tests to loadable kernel modules for direct testing. As with herd7, the klitmus7 code is freely available from http://diy.inria.fr/sources/index.html (and via "git" at https://github.com/herd/herdtools7). Of course, litmus tests are not always the best way to fully understand a memory model, so this patch also includes Documentation/explanation.txt, which describes the memory model in detail. In addition, Documentation/recipes.txt provides example known-good and known-bad use cases for those who prefer working by example. This patch also includes a few sample litmus tests, and a great many more litmus tests are available at https://github.com/paulmckrcu/litmus. This patch was the result of a most excellent collaboration founded by Jade Alglave and also including Alan Stern, Andrea Parri, and Luc Maranget. For more details on the history of this collaboration, please refer to the Linux-kernel memory model presentations at 2016 LinuxCon EU, 2016 Kernel Summit, 2016 Linux Plumbers Conference, 2017 linux.conf.au, or 2017 Linux Plumbers Conference microconference. However, one aspect of the history does bear repeating due to weak copyright tracking earlier in this project, which extends back to early 2015. This weakness came to light in late 2017 after an LKMM presentation by Paul in which an audience member noted the similarity of some LKMM code to code in early published papers. This prompted a copyright review. From Alan Stern: To say that the model was mine is not entirely accurate. Pieces of it (especially the Scpv and Atomic axioms) were taken directly from Jade's models. And of course the Happens-before and Propagation relations and axioms were heavily based on Jade and Luc's work, even though they weren't identical to the earlier versions. Only the RCU portion was completely original. . . . One can make a much better case that I wrote the bulk of lock.cat. However, it was inspired by Luc's earlier version (and still shares some elements in common), and of course it benefited from feedback and testing from all members of our group. The model prior to Alan's was Luc Maranget's. From Luc: I totally agree on Alan Stern's account of the linux kernel model genesis. I thank him for his acknowledgments of my participation to previous model drafts. I'd like to complete Alan Stern's statement: any bell cat code I have written has its roots in discussions with Jade Alglave and Paul McKenney. Moreover I have borrowed cat and bell code written by Jade Alglave freely. This copyright review therefore resulted in late adds to the copyright statements of several files. Discussion of v1 has raised several issues, which we do not believe should block acceptance given that this level of change will be ongoing, just as it has been with memory-barriers.txt: o Under what conditions should ordering provided by pure locking be seen by CPUs not holding the relevant lock(s)? In particular, should the message-passing pattern be forbidden? o Should examples involving C11 release sequences be forbidden? Note that this C11 is still a moving target for this issue: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0735r0.html o Some details of the handling of internal dependencies for atomic read-modify-write atomic operations are still subject to debate. o Changes recently accepted into mainline greatly reduce the need to handle DEC Alpha as a special case. These changes add an smp_read_barrier_depends() to READ_ONCE(), thus causing Alpha to respect ordering of dependent reads. If these changes stick, the memory model can be simplified accordingly. o Will changes be required to accommodate RISC-V? Differences from v1: (http://lkml.kernel.org/r/20171113184031.GA26302@linux.vnet.ibm.com) o Add SPDX notations to .bell and .cat files, replacing textual license statements. o Add reference to upcoming ASPLOS paper to .bell and .cat files. o Updated identifier names in .bell and .cat files to match those used in the ASPLOS paper. o Updates to READMEs and other documentation based on review feedback. o Added a memory-ordering cheatsheet. o Update sigs to new Co-Developed-by and add acks and reviewed-bys. o Simplify rules detecting nested RCU read-side critical sections. o Update copyright statements as noted above. Co-Developed-by: Alan Stern Co-Developed-by: Andrea Parri Co-Developed-by: Jade Alglave Co-Developed-by: Luc Maranget Co-Developed-by: "Paul E. McKenney" Signed-off-by: Alan Stern Signed-off-by: Andrea Parri Signed-off-by: Jade Alglave Signed-off-by: Luc Maranget Signed-off-by: "Paul E. McKenney" Reviewed-by: Boqun Feng Acked-by: Will Deacon Acked-by: Peter Zijlstra Acked-by: Nicholas Piggin Acked-by: David Howells Acked-by: "Reshetova, Elena" Acked-by: Michal Hocko Acked-by: Akira Yokosawa Cc: tools/memory-model/Documentation/cheatsheet.txt | 30 + tools/memory-model/Documentation/explanation.txt | 1840 ++++++++++++++++++++ tools/memory-model/Documentation/recipes.txt | 570 ++++++ tools/memory-model/Documentation/references.txt | 107 ++ tools/memory-model/MAINTAINERS | 15 + tools/memory-model/README | 220 +++ tools/memory-model/linux-kernel.bell | 53 + tools/memory-model/linux-kernel.cat | 124 ++ tools/memory-model/linux-kernel.cfg | 21 + tools/memory-model/linux-kernel.def | 108 ++ .../litmus-tests/CoRR+poonceonce+Once.litmus | 19 + .../litmus-tests/CoRW+poonceonce+Once.litmus | 18 + .../litmus-tests/CoWR+poonceonce+Once.litmus | 18 + .../litmus-tests/CoWW+poonceonce.litmus | 11 + .../litmus-tests/IRIW+mbonceonces+OnceOnce.litmus | 35 + .../litmus-tests/IRIW+poonceonces+OnceOnce.litmus | 33 + .../litmus-tests/ISA2+poonceonces.litmus | 28 + ...cerelease+poacquirerelease+poacquireonce.litmus | 28 + .../litmus-tests/LB+ctrlonceonce+mbonceonce.litmus | 23 + .../LB+poacquireonce+pooncerelease.litmus | 21 + .../litmus-tests/LB+poonceonces.litmus | 21 + .../litmus-tests/MP+onceassign+derefonce.litmus | 25 + tools/memory-model/litmus-tests/MP+polocks.litmus | 24 + .../litmus-tests/MP+poonceonces.litmus | 20 + .../MP+pooncerelease+poacquireonce.litmus | 20 + .../memory-model/litmus-tests/MP+porevlocks.litmus | 24 + .../litmus-tests/MP+wmbonceonce+rmbonceonce.litmus | 22 + .../memory-model/litmus-tests/R+mbonceonces.litmus | 21 + .../memory-model/litmus-tests/R+poonceonces.litmus | 19 + tools/memory-model/litmus-tests/README | 125 ++ .../memory-model/litmus-tests/S+poonceonces.litmus | 19 + .../S+wmbonceonce+poacquireonce.litmus | 20 + .../litmus-tests/SB+mbonceonces.litmus | 23 + .../litmus-tests/SB+poonceonces.litmus | 21 + .../litmus-tests/WRC+poonceonces+Once.litmus | 27 + .../WRC+pooncerelease+rmbonceonce+Once.litmus | 28 + .../Z6.0+pooncelock+poonceLock+pombonce.litmus | 33 + .../Z6.0+pooncelock+pooncelock+pombonce.litmus | 32 + ...ooncerelease+poacquirerelease+mbonceonce.litmus | 28 + tools/memory-model/lock.cat | 99 ++ 40 files changed, 3973 insertions(+) commit 2fcf06805cb063085127d7e3f4ed7842682b3fff Author: Sagar Arun Kamble Date: Wed Jan 24 21:17:00 2018 +0530 drm/i915/guc: Fix comments style in intel_guc_log.c Use consistent multi-line comment style as per guideline. v2: Reverted comments prefix update to kernel-doc comment. (Chris) Suggested-by: Michal Wajdeczko Signed-off-by: Sagar Arun Kamble Cc: Michal Wajdeczko Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1516808821-3638-5-git-send-email-sagar.a.kamble@intel.com drivers/gpu/drm/i915/intel_guc_log.c | 45 ++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 15 deletions(-) commit 065dd5ad6c94fde283477016ecb9525e30622431 Author: Sagar Arun Kamble Date: Wed Jan 24 21:16:59 2018 +0530 drm/i915/guc: Update name and prototype of i915_guc_log_control i915_guc_log_control is GuC interface and GuC APIs that are not user facing should be named with "intel_guc" prefix hence we change name to intel_guc_log_control. Also changed the parameter to intel_guc struct. v2: Move log vma check to intel_guc_log_control (Michal) Return -ENODEV when log isn't initialized. (Chris) Suggested-by: Michal Wajdeczko Signed-off-by: Sagar Arun Kamble Cc: Michal Wajdeczko Cc: Chris Wilson Reviewed-by: Michal Wajdeczko Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1516808821-3638-4-git-send-email-sagar.a.kamble@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 5 +---- drivers/gpu/drm/i915/intel_guc_log.c | 7 +++++-- drivers/gpu/drm/i915/intel_guc_log.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit 70deeaddc6e6c51bb5e2b088dd92bb5a0e5b8d8a Author: Sagar Arun Kamble Date: Wed Jan 24 21:16:58 2018 +0530 drm/i915/guc: Fix lockdep due to log relay channel handling under struct_mutex This patch fixes lockdep issue due to circular locking dependency of struct_mutex, i_mutex_key, mmap_sem, relay_channels_mutex. For GuC log relay channel we create debugfs file that requires i_mutex_key lock and we are doing that under struct_mutex. So we introduced newer dependency as: &dev->struct_mutex --> &sb->s_type->i_mutex_key#3 --> &mm->mmap_sem However, there is dependency from mmap_sem to struct_mutex. Hence we separate the relay create/destroy operation from under struct_mutex. Also added runtime check of relay buffer status. Reviewed-by: Chris Wilson ====================================================== WARNING: possible circular locking dependency detected 4.15.0-rc6-CI-Patchwork_7614+ #1 Not tainted ------------------------------------------------------ debugfs_test/1388 is trying to acquire lock: (&dev->struct_mutex){+.+.}, at: [<00000000d5e1d915>] i915_mutex_lock_interruptible+0x47/0x130 [i915] but task is already holding lock: (&mm->mmap_sem){++++}, at: [<0000000029a9c131>] __do_page_fault+0x106/0x560 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&mm->mmap_sem){++++}: _copy_to_user+0x1e/0x70 filldir+0x8c/0xf0 dcache_readdir+0xeb/0x160 iterate_dir+0xdc/0x140 SyS_getdents+0xa0/0x130 entry_SYSCALL_64_fastpath+0x1c/0x89 -> #2 (&sb->s_type->i_mutex_key#3){++++}: start_creating+0x59/0x110 __debugfs_create_file+0x2e/0xe0 relay_create_buf_file+0x62/0x80 relay_late_setup_files+0x84/0x250 guc_log_late_setup+0x4f/0x110 [i915] i915_guc_log_register+0x32/0x40 [i915] i915_driver_load+0x7b6/0x1720 [i915] i915_pci_probe+0x2e/0x90 [i915] pci_device_probe+0x9c/0x120 driver_probe_device+0x2a3/0x480 __driver_attach+0xd9/0xe0 bus_for_each_dev+0x57/0x90 bus_add_driver+0x168/0x260 driver_register+0x52/0xc0 do_one_initcall+0x39/0x150 do_init_module+0x56/0x1ef load_module+0x231c/0x2d70 SyS_finit_module+0xa5/0xe0 entry_SYSCALL_64_fastpath+0x1c/0x89 -> #1 (relay_channels_mutex){+.+.}: relay_open+0x12c/0x2b0 intel_guc_log_runtime_create+0xab/0x230 [i915] intel_guc_init+0x81/0x120 [i915] intel_uc_init+0x29/0xa0 [i915] i915_gem_init+0x182/0x530 [i915] i915_driver_load+0xaa9/0x1720 [i915] i915_pci_probe+0x2e/0x90 [i915] pci_device_probe+0x9c/0x120 driver_probe_device+0x2a3/0x480 __driver_attach+0xd9/0xe0 bus_for_each_dev+0x57/0x90 bus_add_driver+0x168/0x260 driver_register+0x52/0xc0 do_one_initcall+0x39/0x150 do_init_module+0x56/0x1ef load_module+0x231c/0x2d70 SyS_finit_module+0xa5/0xe0 entry_SYSCALL_64_fastpath+0x1c/0x89 -> #0 (&dev->struct_mutex){+.+.}: __mutex_lock+0x81/0x9b0 i915_mutex_lock_interruptible+0x47/0x130 [i915] i915_gem_fault+0x201/0x790 [i915] __do_fault+0x15/0x70 __handle_mm_fault+0x677/0xdc0 handle_mm_fault+0x14f/0x2f0 __do_page_fault+0x2d1/0x560 page_fault+0x4c/0x60 other info that might help us debug this: Chain exists of: &dev->struct_mutex --> &sb->s_type->i_mutex_key#3 --> &mm->mmap_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mm->mmap_sem); lock(&sb->s_type->i_mutex_key#3); lock(&mm->mmap_sem); lock(&dev->struct_mutex); *** DEADLOCK *** 1 lock held by debugfs_test/1388: #0: (&mm->mmap_sem){++++}, at: [<0000000029a9c131>] __do_page_fault+0x106/0x560 stack backtrace: CPU: 2 PID: 1388 Comm: debugfs_test Not tainted 4.15.0-rc6-CI-Patchwork_7614+ #1 Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./J4205-ITX, BIOS P1.10 09/29/2016 Call Trace: dump_stack+0x5f/0x86 print_circular_bug.isra.18+0x1d0/0x2c0 __lock_acquire+0x14ae/0x1b60 ? lock_acquire+0xaf/0x200 lock_acquire+0xaf/0x200 ? i915_mutex_lock_interruptible+0x47/0x130 [i915] __mutex_lock+0x81/0x9b0 ? i915_mutex_lock_interruptible+0x47/0x130 [i915] ? i915_mutex_lock_interruptible+0x47/0x130 [i915] ? i915_mutex_lock_interruptible+0x47/0x130 [i915] i915_mutex_lock_interruptible+0x47/0x130 [i915] ? __pm_runtime_resume+0x4f/0x80 i915_gem_fault+0x201/0x790 [i915] __do_fault+0x15/0x70 ? _raw_spin_unlock+0x29/0x40 __handle_mm_fault+0x677/0xdc0 handle_mm_fault+0x14f/0x2f0 __do_page_fault+0x2d1/0x560 ? page_fault+0x36/0x60 page_fault+0x4c/0x60 v2: Added lock protection to guc->log.runtime.relay_chan (Chris) Fixed locking inside guc_flush_logs uncovered by new lockdep. v3: Locking guc_read_update_log_buffer entirely with relay_lock. (Chris) Prepared intel_guc_init_early. Moved relay_lock inside relay_create relay_destroy, relay_file_create, guc_read_update_log_buffer. (Michal) Removed struct_mutex lock around guc_log_flush and removed usage of guc_log_has_relay() from runtime_create path as it needs struct_mutex lock. v4: Handle NULL relay sub buffer pointer earlier in read_update_log_buffer (Chris). Fixed comment suffix **/. (Michal) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104693 Testcase: igt/debugfs_test/read_all_entries # with enable_guc=1 and guc_log_level=1 Signed-off-by: Sagar Arun Kamble Cc: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Marta Lofstedt Cc: Michal Winiarski Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1516808821-3638-3-git-send-email-sagar.a.kamble@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 12 +-- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/i915_gem.c | 4 +- drivers/gpu/drm/i915/intel_guc.c | 7 +- drivers/gpu/drm/i915/intel_guc_log.c | 171 ++++++++++++++++++++++++++--------- drivers/gpu/drm/i915/intel_guc_log.h | 12 +++ drivers/gpu/drm/i915/intel_uc.c | 26 +++++- drivers/gpu/drm/i915/intel_uc.h | 4 +- 8 files changed, 172 insertions(+), 66 deletions(-) commit 1ed21cb4142bccd23d988e2b47541c302f4d09fb Author: Sagar Arun Kamble Date: Wed Jan 24 21:16:57 2018 +0530 drm/i915/guc: Enable interrupts before resuming GuC during runtime resume GuC log streaming needs interrupts enabled prior to GuC resume but runtime pm interrupt setup was happening post GuC resume. Fix it. While at it, fix the unwinding of steps in the runtime suspend path. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104695 Signed-off-by: Sagar Arun Kamble Cc: Chris Wilson Cc: Michal Wajdeczko Cc: Michał Winiarski Cc: Joonas Lahtinen Cc: Marta Lofstedt Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1516808821-3638-2-git-send-email-sagar.a.kamble@intel.com drivers/gpu/drm/i915/i915_drv.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 1be333d34e22db8fd07dca7efa78b93189eddf6b Author: Sagar Arun Kamble Date: Wed Jan 24 21:16:56 2018 +0530 drm/i915/guc: Grab RPM wakelock while disabling GuC interrupts Disabling GuC interrupts involves access to GuC IRQ control registers hence ensure device is RPM awake. v1-v2: old changelog 1: Add comment about need to synchronize flush work and log runtime destroy 2: Moved patch earlier in the series and removed comment about future work. (Tvrtko) v3: Added assert_rpm_wakelock_held() to gen9_*_guc_interrupts. (Chris) Signed-off-by: Sagar Arun Kamble Cc: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1516808821-3638-1-git-send-email-sagar.a.kamble@intel.com drivers/gpu/drm/i915/i915_irq.c | 6 ++++++ drivers/gpu/drm/i915/intel_guc_log.c | 3 +++ 2 files changed, 9 insertions(+) commit 16af25faae8ef72b4ff2feeca65f6e864c3ef929 Author: Ville Syrjälä Date: Fri Jan 19 16:41:52 2018 +0200 drm/i915: Add a comment exlaining CCS hsub/vsub Let's document why we claim hsub==8,vsub==16 for CCS. v2: Replace my explanation with Jason's Cc: Daniel Vetter Cc: Ben Widawsky Cc: Jason Ekstrand Cc: Daniel Stone Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180119144152.17224-1-ville.syrjala@linux.intel.com Reviewed-by: Jason Ekstrand drivers/gpu/drm/i915/intel_display.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 0519c102f5285476d7868a387bdb6c58385e4074 Author: Ville Syrjälä Date: Mon Jan 22 19:41:31 2018 +0200 drm/i915: Implement display w/a #1143 Apparently SKL/KBL/CFL need some manual help to get the programmed HDMI vswing to stick. Implement the relevant workaround (display w/a #1143). Note that the relevant chicken bits live in a transcoder register even though the bits affect a specific DDI port rather than a specific transcoder. Hence we must pick the correct transcoder register instance based on the port rather than based on the cpu_transcoder. Also note that for completeness I included support for DDI A/E in the code even though we never have HDMI on those ports. v2: CFL needs the w/a as well (Rodrigo and Art) Cc: Rodrigo Vivi Cc: Art Runyan Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180122174131.28046-1-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_reg.h | 8 ++++++-- drivers/gpu/drm/i915/intel_ddi.c | 42 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) commit c19e1124e7e8cb1f8fbb685fd9b7d0a42087bd62 Author: Ville Syrjälä Date: Tue Jan 23 20:33:43 2018 +0200 drm/i915: Use enum plane_id for frontbuffer tracking Replace the ad-hoc plane indexing scheme used by the frontbuffer tracking with enum plane_id. The old video overlay not being part of the plane_id namespace will just be given the high bit. v2: Drop the unintended whitespace change (Chris) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180123183343.9181-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 11 +++-------- drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_fbc.c | 2 +- drivers/gpu/drm/i915/intel_sprite.c | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) commit 84a1074920523430f9dc30ff907f4801b4820072 Author: Chris Wilson Date: Wed Jan 24 11:36:08 2018 +0000 drm/i915: Shrink the GEM kmem_caches upon idling When we finally decide the gpu is idle, that is a good time to shrink our kmem_caches. v3: Defer until an rcu grace period after we idle. v4: Think about epoch wraparound and how likely that is. v5: Use I915_EPOCH_INVALID magic. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180124113608.14909-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 79 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit 6f56103d7e95f96568a460493ff6c0ced45f538b Author: Chris Wilson Date: Wed Jan 24 11:36:07 2018 +0000 drm/i915: Track the number of times we have woken the GPU up By counting the number of times we have woken up, we have a very simple means of defining an epoch, which will come in handy if we want to perform deferred tasks at the end of an epoch (i.e. while we are going to sleep) without imposing on the next activity cycle. v2: No reason to specify precise number of bits here. v3: Take Tvrtko's advice and reserve 0 as an invalid epoch. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180124113608.14909-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 7 ++++--- drivers/gpu/drm/i915/i915_drv.h | 6 ++++++ drivers/gpu/drm/i915/i915_gem_request.c | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) commit 517aaffe0c1b54b4f732e872a89681c650d3527f Author: Chris Wilson Date: Tue Jan 23 21:04:12 2018 +0000 drm/i915/execlists: Inhibit context save/restore for the fake preempt context We only use the preempt context to inject an idle point into execlists. We never need to reference its logical state, so tell the GPU never to load it or save it. v2: BIT(2) for save-inhibit. N.B. Daniele mentioned this bit mbz for ICL, and has been moved into the submission process rather than the context image. Suggested-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Cc: Michal Winiarski Cc: Michel Thierry Cc: Michal Wajdeczko Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Daniele Ceraolo Spurio Reviewed-by: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20180123210412.17653-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 4 ++++ drivers/gpu/drm/i915/intel_lrc.h | 1 + 2 files changed, 5 insertions(+) commit 578f1ac689b185b602a0e02613714419a2a45e67 Author: Michel Thierry Date: Tue Jan 23 16:43:49 2018 -0800 drm/i915: Move LRC register offsets to a header file Newer platforms may have subtle offset changes, which will increase the number of defines, so it is probably better to start moving them to its own header file. Also move the macros used while setting the reg state. v2: Rename to intel_lrc_reg.h, to be consistent with i915_reg.h and intel_guc_reg.h (Chris) v3: License notice shenanigans. v4: Documentation/process/coding-style.rst is always right (Chris) v5: Rebase. Signed-off-by: Michel Thierry Cc: Michal Wajdeczko Cc: Lucas De Marchi Cc: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180124004349.22126-2-michel.thierry@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_lrc.c | 55 +---------------------------- drivers/gpu/drm/i915/intel_lrc_reg.h | 67 ++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 54 deletions(-) commit 751d115302466113ab757db5771d1e9e74d1b0b7 Author: Michel Thierry Date: Tue Jan 23 16:43:48 2018 -0800 drm/i915/lrc: Update reg_state macros to pass checkpatch The macros we use to init the reg_state had the following issues reported by checkpatch --strict. Macro argument reuse 'reg_state' - possible side-effects Macro argument reuse 'pos' - possible side-effects Macro argument reuse 'ppgtt' - possible side-effects spaces preferred around that '+' (ctx:VxV) So fix these issues before they are moved to a new header file. Suggested-by: Chris Wilson Signed-off-by: Michel Thierry Cc: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180124004349.22126-1-michel.thierry@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_lrc.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 8810bc5609117aad1dd01c1c8c4cd3847ec2fd3e Author: Tvrtko Ursulin Date: Tue Jan 23 13:45:58 2018 +0000 drm/i915/pmu: Fix sysfs exported counter config We need to generate the event config value using the uAPI class and not the driver internal one. Signed-off-by: Tvrtko Ursulin Fixes: 109ec558370f ("drm/i915/pmu: Only enumerate available counters in sysfs") Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180123134558.3222-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c559c2a071ff01a3b8b9ce38d3b09d3f403cff10 Author: Rodrigo Vivi Date: Tue Jan 23 13:52:45 2018 -0800 drm/i915/cnl: Fix aux selection for WA 1178 Current code always select _CNL_AUX_ANAOVRD1_B register regardless the pw in use. CNL_DISP_PW_AUX_B = 9 CNL_DISP_PW_AUX_C = 10 CNL_DISP_PW_AUX_D = 11 And for pick we want B = 0 C = 1 D = 2 Fixes: ddd39e4b3f8f ("drm/i915/cnl: apply Display WA #1178 to fix type C dongles") Cc: Lucas De Marchi Signed-off-by: Rodrigo Vivi Acked-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20180123215245.24026-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8e6f3888b05c1e7b685800a3371ce050720368f Author: Rodrigo Vivi Date: Tue Jan 23 09:40:50 2018 -0800 drm/i915/cnp: Ignore VBT request for know invalid DDC pin. Let's ignore VBT request if the pin is clearly wrong. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104139 Cc: Kai Heng Feng Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180123174050.4261-1-rodrigo.vivi@intel.com Reviewed-by: Radhakrishna Sripada drivers/gpu/drm/i915/intel_bios.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit a35f2f34b5b4ea079abefb644ac4f828c30e9a5d Author: Christian König Date: Wed Jan 10 13:53:41 2018 +0100 dma-buf: make returning the exclusive fence optional Change reservation_object_get_fences_rcu to make the exclusive fence pointer optional. If not specified the exclusive fence is put into the fence array as well. This is helpful for a couple of cases where we need all fences in a single array. Reviewed-by: Chunming Zhou Acked-by: Daniel Vetter Signed-off-by: Christian König Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20180110125341.3618-1-christian.koenig@amd.com drivers/dma-buf/reservation.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) commit c60c4af36d56ce3ae4f3c3fa5250a41caa991506 Author: Ville Syrjälä Date: Thu Nov 23 21:05:01 2017 +0200 drm/zte: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. Note that this replaces crtc_state->adjusted_mode usage with crtc_state->mode. The latter is the correct choice since that's the mode the user provided and it matches the plane crtc coordinates the user also provided. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). Cc: Laurent Pinchart Cc: Shawn Guo Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123190502.28449-15-ville.syrjala@linux.intel.com Acked-by: Shawn Guo Reviewed-by: Thierry Reding drivers/gpu/drm/zte/zx_plane.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 4f4becef17d693746cc9f14decc841a60fcb1b48 Author: Ville Syrjälä Date: Thu Nov 23 21:05:00 2017 +0200 drm/vmwgfx: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. Note that this replaces crtc_state->adjusted_mode usage with crtc_state->mode. The latter is the correct choice since that's the mode the user provided and it matches the plane crtc coordinates the user also provided. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). Cc: Laurent Pinchart Cc: VMware Graphics Cc: Sinclair Yeh Cc: Thomas Hellstrom Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123190502.28449-14-ville.syrjala@linux.intel.com Reviewed-by: Sinclair Yeh Reviewed-by: Thierry Reding drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit a7d08ff19c14a717fe82769eaa3083aac5cf9db4 Author: Ville Syrjälä Date: Thu Nov 23 21:04:59 2017 +0200 drm/tegra/dc: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. No functional changes as the code already uses crtc_state->mode to populate the clip, which is also what drm_mode_get_hv_timing() uses. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). v2: Rebase due to tegra_plane_state_add() relocating to plane.c Cc: Laurent Pinchart Cc: Thierry Reding Cc: linux-tegra@vger.kernel.org Signed-off-by: Ville Syrjälä Acked-by: Thierry Reding Reviewed-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20171123190502.28449-13-ville.syrjala@linux.intel.com drivers/gpu/drm/tegra/plane.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit c2d6e243ff3301284087b603d2b9fb6c38568bfe Author: Ville Syrjälä Date: Thu Nov 23 21:04:58 2017 +0200 drm/rockchip: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. Note that this replaces crtc_state->adjusted_mode usage with crtc_state->mode. The latter is the correct choice since that's the mode the user provided and it matches the plane crtc coordinates the user also provided. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). Cc: Laurent Pinchart Cc: Mark Yao Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123190502.28449-12-ville.syrjala@linux.intel.com Reviewed-by: Thierry Reding drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 07579ed1532cb49c8cf9d76700e107e0084855eb Author: Ville Syrjälä Date: Thu Nov 23 21:04:57 2017 +0200 drm/nouveau/kms/nv50: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. No functional changes as the code already uses crtc_state->mode to populate the clip, which is also what drm_mode_get_hv_timing() uses. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). Cc: Laurent Pinchart Cc: Ben Skeggs Cc: nouveau@lists.freedesktop.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123190502.28449-11-ville.syrjala@linux.intel.com Reviewed-by: Thierry Reding drivers/gpu/drm/nouveau/nv50_display.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit e489c7953f7b45d0303a94179453201d5122bd7f Author: Ville Syrjälä Date: Thu Nov 23 21:04:56 2017 +0200 drm/msm/mdp5: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. Note that this replaces crtc_state->adjusted_mode usage with crtc_state->mode. The latter is the correct choice since that's the mode the user provided and it matches the plane crtc coordinates the user also provided. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). Cc: Laurent Pinchart Cc: Rob Clark Cc: Archit Taneja Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123190502.28449-10-ville.syrjala@linux.intel.com Reviewed-by: Archit Taneja Reviewed-by: Thierry Reding drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 13eff9ae5210b3858e462cc73c3133b41ac261dc Author: Ville Syrjälä Date: Thu Nov 23 21:04:55 2017 +0200 drm/meson: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. No functional changes as the code already uses crtc_state->mode to populate the clip, which is also what drm_mode_get_hv_timing() uses. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). Cc: Laurent Pinchart Cc: Neil Armstrong Cc: linux-amlogic@lists.infradead.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123190502.28449-9-ville.syrjala@linux.intel.com Reviewed-by: Thierry Reding drivers/gpu/drm/meson/meson_plane.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bd6120dbcb56a668401a2a3835aab46934bbb701 Author: Ville Syrjälä Date: Thu Nov 23 21:04:54 2017 +0200 drm/mediatek: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. No functional changes as the code already uses crtc_state->mode to populate the clip, which is also what drm_mode_get_hv_timing() uses. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). Cc: Laurent Pinchart Cc: CK Hu Cc: Philipp Zabel Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123190502.28449-8-ville.syrjala@linux.intel.com Acked-by: Philipp Zabel Reviewed-by: Thierry Reding drivers/gpu/drm/mediatek/mtk_drm_plane.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 06edb0a0cf5b2abc5d36bbb8039eab04fb1006f0 Author: Ville Syrjälä Date: Thu Nov 23 21:04:53 2017 +0200 drm/imx: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. Note that this replaces crtc_state->adjusted_mode usage with crtc_state->mode. The latter is the correct choice since that's the mode the user provided and it matches the plane crtc coordinates the user also provided. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). Cc: Laurent Pinchart Cc: Philipp Zabel Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123190502.28449-7-ville.syrjala@linux.intel.com Acked-by: Philipp Zabel Reviewed-by: Thierry Reding drivers/gpu/drm/imx/ipuv3-plane.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bb4dd71a755e733a1523523139f6ad7781c99655 Author: Ville Syrjälä Date: Thu Nov 23 21:04:52 2017 +0200 drm/simple_kms_helper: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. Note that this replaces crtc_state->adjusted_mode usage with crtc_state->mode. The latter is the correct choice since that's the mode the user provided and it matches the plane crtc coordinates the user also provided. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). Cc: Laurent Pinchart Cc: Noralf Trønnes Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123190502.28449-6-ville.syrjala@linux.intel.com Reviewed-by: Thierry Reding drivers/gpu/drm/drm_simple_kms_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit de9f422e30112c9f7a7eaf094f3bca736bb63aa9 Author: Ville Syrjälä Date: Thu Nov 23 21:04:51 2017 +0200 drm/arm/mali-dp: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. Note that this replaces crtc_state->adjusted_mode usage with crtc_state->mode. The latter is the correct choice since that's the mode the user provided and it matches the plane crtc coordinates the user also provided. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). Cc: Laurent Pinchart Cc: Liviu Dudau Cc: Brian Starkey Cc: Mali DP Maintainers Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123190502.28449-5-ville.syrjala@linux.intel.com Acked-by: Liviu Dudau Reviewed-by: Thierry Reding drivers/gpu/drm/arm/malidp_planes.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 872d20dfbd91b296ebcd0b222f5fa3da89e0d1cf Author: Ville Syrjälä Date: Thu Nov 23 21:04:50 2017 +0200 drm/arm/hdlcd: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. Note that this replaces crtc_state->adjusted_mode usage with crtc_state->mode. The latter is the correct choice since that's the mode the user provided and it matches the plane crtc coordinates the user also provided. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). Cc: Laurent Pinchart Cc: Liviu Dudau Cc: Brian Starkey Cc: Mali DP Maintainers Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123190502.28449-4-ville.syrjala@linux.intel.com Acked-by: Liviu Dudau Reviewed-by: Thierry Reding drivers/gpu/drm/arm/hdlcd_crtc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a2936e3d9a9cb2ce192455cdec3a8cfccc26b486 Author: Ville Syrjälä Date: Thu Nov 23 21:04:49 2017 +0200 drm/i915: Use drm_mode_get_hv_timing() to populate plane clip rectangle Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. No functional changes since pipe_src_w/h are already filled via drm_mode_get_hv_timing(). Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). Cc: Laurent Pinchart Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123190502.28449-3-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Reviewed-by: Thierry Reding drivers/gpu/drm/i915/intel_atomic_plane.c | 8 -------- drivers/gpu/drm/i915/intel_display.c | 14 ++++++++++++-- drivers/gpu/drm/i915/intel_drv.h | 1 - drivers/gpu/drm/i915/intel_sprite.c | 8 ++++++-- 4 files changed, 18 insertions(+), 13 deletions(-) commit 0574bd882efd3c2dba4a3cfe3f10e214c08eb92d Author: Ville Syrjälä Date: Thu Nov 23 21:04:48 2017 +0200 drm/i915: Reject odd pipe source width with double wide/dual link In order to guarantee that pipe_src_w/h matches the user mode h/vdisplay we must not adjust pipe_src_w to accommodate double wide/dual link. Instead just reject the mode outright. This will allows us to rely on crtc_state->mode for plane clipping. Cc: Laurent Pinchart Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123190502.28449-2-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Reviewed-by: Thierry Reding drivers/gpu/drm/i915/intel_display.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit a63b8e7958783098a4bcff1af3f4ac2ad45df57d Author: Sean Paul Date: Mon Jan 22 12:42:59 2018 -0500 drm/sun4i: Fix build warnings in sunxi_engine.h Fixes the following build warnings: In file included from ../drivers/gpu/drm/sun4i/sun8i_mixer.h:18:0, from ../drivers/gpu/drm/sun4i/sun8i_vi_scaler.h:13, from ../drivers/gpu/drm/sun4i/sun8i_vi_scaler.c:12: ../drivers/gpu/drm/sun4i/sunxi_engine.h:36:16: warning: ‘struct drm_crtc_state’ declared inside parameter list will not be visible outside of this definition or declaration struct drm_crtc_state *old_state); ^~~~~~~~~~~~~~ ../drivers/gpu/drm/sun4i/sunxi_engine.h:53:15: warning: ‘struct drm_crtc_state’ declared inside parameter list will not be visible outside of this definition or declaration struct drm_crtc_state *state); ^~~~~~~~~~~~~~ In file included from ../drivers/gpu/drm/sun4i/sun8i_mixer.h:18:0, from ../drivers/gpu/drm/sun4i/sun8i_ui_scaler.h:12, from ../drivers/gpu/drm/sun4i/sun8i_ui_scaler.c:12: ../drivers/gpu/drm/sun4i/sunxi_engine.h:36:16: warning: ‘struct drm_crtc_state’ declared inside parameter list will not be visible outside of this definition or declaration struct drm_crtc_state *old_state); ^~~~~~~~~~~~~~ ../drivers/gpu/drm/sun4i/sunxi_engine.h:53:15: warning: ‘struct drm_crtc_state’ declared inside parameter list will not be visible outside of this definition or declaration struct drm_crtc_state *state); ^~~~~~~~~~~~~~ Fixes: 6b8562c86e24 ("drm/sun4i: engine: Create an atomic_begin callback") Fixes: 656e5f654903 ("drm/sun4i: engine: Add a custom crtc atomic_check") Cc: Chen-Yu Tsai Cc: Neil Armstrong Cc: Maxime Ripard Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Sean Paul Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180122174306.231609-1-seanpaul@chromium.org drivers/gpu/drm/sun4i/sunxi_engine.h | 1 + 1 file changed, 1 insertion(+) commit bb5db7e1601b368e7aad5e4ceded75de70f6fddb Author: Chris Wilson Date: Mon Jan 22 10:07:14 2018 +0000 drm/i915/execlists: Skip forcewake for ELSP submission Now that we can read the CSB from the HWSP, we may avoid having to perform mmio reads entirely and so forgo the rigmarole of the forcewake dance. v2: Include forcewake hint for GEM_TRACE readback of mmio. If we don't hold fw ourselves, the reads may return garbage. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180122100714.15137-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit c1beabcf143c72ecdfe76bf50aa6e385a6192d08 Author: Chris Wilson Date: Mon Jan 22 13:55:41 2018 +0000 drm/i915: Increase render/media power gating hysteresis for gen9+ On gen9+, after an idle period the HW will disable the entire power well to conserve power (by preventing current leakage). It takes around a 100 microseconds to bring the power well back online afterwards. With the current hysteresis value of 25us (really 25 * 1280ns), we do not have sufficient time to respond to an interrupt and schedule the next execution before the HW powers itself down. (At present, we prevent this by grabbing the forcewake for prolonged periods of time, but that overkill fixed in the next patch.) The minimum we want to set the power gating hysteresis to is the length of time it takes us to service the GPU, which across a broad spectrum of machines is about 250us. (Note this also brings guc latency into the same ballpark as execlists.) v2: Include some notes on where I plucked the numbers from. Testcase: igt/gem_exec_nop/sequential Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Michal Wajdeczko Cc: Sagar Arun Kamble Cc: Michel Thierry Cc: Michal Winiarski Reviewed-by: Sagar Arun Kamble Link: https://patchwork.freedesktop.org/patch/msgid/20180122135541.32222-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_pm.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit 4ac511165b0426c692365f8694333b6648c1046d Author: Sean Paul Date: Wed Jan 17 16:37:43 2018 -0500 drm/panel: panasonic-vvx10f034n00: More return value fixes A couple more return value fixes which Philippe brought up during our previous review. Suggested-by: Philippe CORNU Reviewed-by: Philippe Cornu Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180117213751.54668-1-seanpaul@chromium.org drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 10bde236eff901407bdbcad2e605edaf7ba23bdb Author: Tvrtko Ursulin Date: Fri Jan 19 10:00:04 2018 +0000 drm/i915: Per-engine scratch VMA is mandatory We fail engine initialization if the scratch VMA cannot be created so there is no point in error handle it later. If the initialization ordering gets messed up, we can explode during development just as well. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20180119100005.9072-2-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_lrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae504be2e0099986d678405301e93a739e9f59a7 Author: Tvrtko Ursulin Date: Fri Jan 19 10:00:03 2018 +0000 drm/i915: Downgrade incorrect engine constructor usage warnings to development Render engine constructor helpers must only be called from the render engine constructors, but there is no need to burden the production binaries with warnings which can only be triggered during development. Signed-off-by: Tvrtko Ursulin Cc: Michel Thierry Reviewed-by: Chris Wilson Reviewed-by: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20180119100005.9072-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_engine_cs.c | 3 ++- drivers/gpu/drm/i915/intel_lrc.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit c0cfb10d9e1de490e36d3b9d4228c0ea0ca30677 Author: Manasi Navare Date: Thu Oct 12 12:13:38 2017 -0700 drm/i915/edp: Do not do link training fallback or prune modes on EDP In case of eDP because the panel has a fixed mode, the link rate and lane count at which it is trained corresponds to the link BW required to support the native resolution of the panel. In case of panles with lower resolutions where fewer lanes are hooked up internally, that number is reflected in the MAX_LANE_COUNT DPCD register of the panel. So it is pointless to fallback to lower link rate/lane count in case of link training failure on eDP connector since the lower link BW will not support the native resolution of the panel and we cannot prune the preferred mode on the eDP connector. In case of Link training failure on the eDP panel, something is wrong in the HW internally and hence driver errors out with a loud and clear DRM_ERROR message. v2: * Fix the DEBUG_ERROR and add {} in else (Ville Syrjala) Cc: Clinton Taylor Cc: Jim Bride Cc: Jani Nikula Cc: Ville Syrjala Cc: Dave Airlie Cc: Daniel Vetter Signed-off-by: Manasi Navare Reviewed-by: Ville Syrjala Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103369 Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/1507835618-23051-1-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/i915/intel_dp_link_training.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit dd63250c55bf26a814c957f6772e8f8683b70077 Author: Maxime Ripard Date: Mon Jan 22 10:25:26 2018 +0100 drm/sun4i: backend: Make sure we don't have a commit pending If we try to read the backend registers while it fetches the new values, we end up with the value of some random register instead of the one we asked for. In order to prevent that, let's make sure that the very first thing we do during our atomic modesetting is to let the commit bit come to a rest. We don't have to worry about anything else since the only time we will trigger a new transaction is during the atomic_commit which comes much later. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/35604307e5bde2b85c674de79fa7c4d55700f085.1516613040.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_backend.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5d68be9185c8870669f050e37bc3ec8bee753ea4 Author: Maxime Ripard Date: Mon Jan 22 10:25:25 2018 +0100 drm/sun4i: backend: Use runtime_pm variant of atomic_commit_tail During a hardware commit, the commit bit in the backend will only be cleared if the TCON is enabled. Use the runtime_pm variant of the atomic_commit_tail hook that makes sure that the CRTC, our TCON, is enabled when we perform an atomic_commit. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/bde95faff2078f63e9af99c3abee5360b9050fd1.1516613040.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 96180dde23b799272ab2e7d47210c8840799d0d2 Author: Maxime Ripard Date: Mon Jan 22 10:25:24 2018 +0100 drm/sun4i: backend: Add a custom atomic_check for the frontend Now that we have everything in place, we can start enabling the frontend. This is more difficult than one would assume since there can only be one plane using the frontend per-backend. We therefore need to make sure that the userspace will not try to setup multiple planes using it, since that would be impossible. In order to prevent that, we can create an atomic_check callback that will check that only one plane will effectively make use of the frontend in a given configuration, and will toggle the switch in that plane state so that the proper setup function can do their role. Reviewed-by: Chen-Yu Tsai Reviewed-by: Neil Armstrong Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/278e6c514a8311750fe627c7f28d58b3e2cbd825.1516613040.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_backend.c | 65 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/sun4i/sun4i_backend.h | 2 ++ 2 files changed, 67 insertions(+) commit ca07b210bc5c124cc194d0c7b91354c636e36394 Author: Maxime Ripard Date: Mon Jan 22 10:25:23 2018 +0100 drm/sun4i: backend: Wire in the frontend Now that we have a driver, we can make use of it. This is done by adding a flag to our custom plane state that will trigger whether we should use the frontend on that particular plane or not. The rest is just plumbing to set up the backend to not perform the DMA but receive its data from the frontend. Note that we're still not making any use of the frontend itself, as no one is setting the flag yet. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/cdffc25eab2d817820cc78cbd24f1f4b99902014.1516613040.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_backend.c | 90 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/sun4i/sun4i_backend.h | 8 ++++ drivers/gpu/drm/sun4i/sun4i_crtc.c | 1 + drivers/gpu/drm/sun4i/sun4i_layer.c | 33 +++++++++++-- drivers/gpu/drm/sun4i/sun4i_layer.h | 1 + 5 files changed, 130 insertions(+), 3 deletions(-) commit dd0421f47505bbbe30a4ce37b51a5c127b8754dc Author: Maxime Ripard Date: Mon Jan 22 10:25:22 2018 +0100 drm/sun4i: Add a driver for the display frontend The display frontend is an hardware block that can be used to implement some more advanced features like hardware scaling or colorspace conversions. It can also be used to implement the output format of the VPU. Let's create a minimal driver for it that will only enable the hardware scaling features. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/029cdc3478bf89d422f5e8d9e600baf5e48ce4db.1516613040.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/Makefile | 3 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 27 ++- drivers/gpu/drm/sun4i/sun4i_drv.h | 1 + drivers/gpu/drm/sun4i/sun4i_frontend.c | 389 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/sun4i/sun4i_frontend.h | 99 +++++++++ 5 files changed, 514 insertions(+), 5 deletions(-) commit 6b8562c86e249b6d46d3c1f02afe570368b01e67 Author: Maxime Ripard Date: Mon Jan 22 10:25:21 2018 +0100 drm/sun4i: engine: Create an atomic_begin callback We have to implement some display engine specific behaviours in atomic_begin. Let's add a function for that. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/44110951ae0cc13767fefc7fc1d9e2ec782d0a40.1516613040.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_crtc.c | 6 +++++- drivers/gpu/drm/sun4i/sunxi_engine.h | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) commit 3004f75fd4732a67ba1bd069a209957f3b3394d2 Author: Maxime Ripard Date: Mon Jan 22 10:25:20 2018 +0100 drm/sun4i: engine: Add a VBLANK quirk callback In some cases, the display engine needs to apply some quirks during the VBLANK event. In the Display Engine 1.0 case for example, we can only disable the frontend once the backend has been, which is at VBLANK. Let's introduce a callback that can be implemented by the various engines. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/7c298d43aa1500196aa5d15d7a7c0f228c7a6f3c.1516613040.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++++ drivers/gpu/drm/sun4i/sunxi_engine.h | 13 +++++++++++++ 2 files changed, 17 insertions(+) commit 656e5f6549031d31a7c42f9abbbf7c22dfa9348c Author: Maxime Ripard Date: Mon Jan 22 10:25:19 2018 +0100 drm/sun4i: engine: Add a custom crtc atomic_check We have some restrictions on what the planes and CRTC can provide that are tied to only one generation of display engines. For example, on the first generation, we can only have one YUV plane or one plane that uses the frontend output. Let's allow our engines to provide an atomic_check callback to validate the current configuration. Reviewed-by: Chen-Yu Tsai Reviewed-by: Neil Armstrong Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/e5f5f144e5c20d348cdb29933ae876c105bec017.1516613040.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_crtc.c | 14 ++++++++++++++ drivers/gpu/drm/sun4i/sunxi_engine.h | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) commit d540f82adf3577fd4116b0dc8fef5102def26d2e Author: Maxime Ripard Date: Mon Jan 22 10:25:18 2018 +0100 drm/sun4i: backend: Add a custom plane state We will need to store some additional data in the future to the state. Create a custom plane state that will embed those data, in order to store the pipe or whether or not that plane should use the frontend. Reviewed-by: Chen-Yu Tsai Reviewed-by: Neil Armstrong Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/88dd9c2b0caa550595e7b2ff37dc9d0af2c78609.1516613040.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_layer.c | 50 ++++++++++++++++++++++++++++++++++--- drivers/gpu/drm/sun4i/sun4i_layer.h | 10 ++++++++ 2 files changed, 57 insertions(+), 3 deletions(-) commit 9f4ebf670d0ac92545548a6a8c74c3a980d52cfb Author: Maxime Ripard Date: Mon Jan 22 10:25:17 2018 +0100 drm/sun4i: backend: Allow a NULL plane pointer to retrieve the format The function converting the DRM format to its equivalent in the backend registers was assuming that we were having a plane. However, we might want to use that function when setting up a plane using the frontend, in which case we will not have a plane associated to the backend's layer. Yet, we still need to setup the format to the one output by the frontend. Test for NULL plane pointers before referencing them, so that we can work around it. Reviewed-by: Neil Armstrong Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/bfbe4c2e8525a7542526b648d59a8f3546e905f1.1516613040.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4c7c72e5c7aa56e6e8527aea3a79e6242282d8c Author: Maxime Ripard Date: Mon Jan 22 10:25:16 2018 +0100 drm/sun4i: backend: Document the engine operations Our operations were missing some documentation to explain what was expected from them. Let's make that clearer. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/fdcd8ec3ae9ecd73ef089ede5218d3a41b49be05.1516613040.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sunxi_engine.h | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit f5870879e9d6519c90bb530257b3b4a2ac25a8b1 Author: Maxime Ripard Date: Mon Jan 22 10:25:15 2018 +0100 drm/sun4i: backend: Move line stride setup to buffer setup function Setup the line stride in the buffer setup function, since it's tied to the buffer itself, and is not needed when we do not set the buffer in the backend. This is for example the case when using the frontend and then routing its output to the backend. Reviewed-by: Chen-Yu Tsai Reviewed-by: Neil Armstrong Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/cbec84125bc0d5a6cf1d856b8291fbf77b138881.1516613040.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_backend.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 073cd7816685ac77c6d8b4d321a5586c9177b76a Author: Chris Wilson Date: Sun Jan 21 17:31:43 2018 +0000 drm/i915: Protect WC stash allocation against direct reclaim As we attempt to allocate pages for use in a new WC stash, direct reclaim may run underneath us and fill up the WC stash. We have to be careful then not to overflow the pvec. Fixes: 66df1014efba ("drm/i915: Keep a small stash of preallocated WC pages") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103109 Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180121173143.17090-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit 861023e0b6c44d6373abb3e63f853592adda0e3b Author: Dhinakaran Pandiyan Date: Wed Dec 20 12:10:21 2017 -0800 drm/i915/psr: Don't name status or debug registers like control registers. Avoids some typo pitfalls. Cc: Chris Wilson Cc: Rodrigo Vivi Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20171220201021.17619-1-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 4 ++-- drivers/gpu/drm/i915/i915_reg.h | 6 +++--- drivers/gpu/drm/i915/intel_psr.c | 24 ++++++++++++------------ 3 files changed, 17 insertions(+), 17 deletions(-) commit f0111b04ff43ec237fb4419f164a7d1ed1d02bcf Author: Chris Wilson Date: Fri Jan 19 14:46:57 2018 +0000 drm/i915: Shrink the request kmem_cache on allocation error If we fail to allocate a new request, make sure we recover the pages that are in the process of being freed by inserting an RCU barrier. v2: Comment before the shrink and barrier in the error path. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180119144657.22606-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit bd724318b682587ad2f989ab8e0f7b3d4486ced5 Author: Michal Wajdeczko Date: Fri Jan 19 12:49:26 2018 +0000 drm/i915/guc: Keep GuC log disabled by default It looks that GuC log functionality is not fully functional yet and causes issues when enabled by auto(-1) modparam on debug builds. For example, but not limited to: [ 30.062893] ====================================================== [ 30.062894] WARNING: possible circular locking dependency detected [ 30.062895] 4.15.0-rc8-CI-CI_DRM_3648+ #1 Tainted: G U [ 30.062896] ------------------------------------------------------ [ 30.062897] debugfs_test/1268 is trying to acquire lock: [ 30.062898] (&dev->struct_mutex){+.+.}, at: [<00000000e4213449>] i915_mutex_lock_interruptible+0x47/0x130 [i915] [ 30.062921] but task is already holding lock: [ 30.062921] (&mm->mmap_sem){++++}, at: [<00000000dd7adc93>] __do_page_fault+0x106/0x560 [ 30.062924] which lock already depends on the new lock. References: 0ed87953532652 ("drm/i915/guc: Redefine guc_log_level modparam values") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104693 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104694 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104695 Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Jani Saarinen Cc: Tomi Sarvela Cc: Marta Lofstedt Cc: Michal Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180119124926.29844-1-michal.wajdeczko@intel.com Reviewed-by: Michal Winiarski Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_params.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b86aa4458ac6e8be44dfb281b8019fc7822f5538 Author: Tvrtko Ursulin Date: Thu Jan 11 14:55:07 2018 -0800 drm/i915/icl: Gen11 render context size Gen11 removes the Resource Streamer, which frees up a big chunk of the context image. BSpec indicates 12544 DWORDs (13 pages), plus one page for PPHWSP. Please notice that, when looking at the BSpec context image table, the right filter has to be applied as some rows are excluded for specific GENs. Also, some rows apply per-subslice (for the calculation above, we have supposed I915_MAX_SUBSLICES = 8). v2: Rebase. v3: Use the right size as per the BSpec. v4: - Rebased on top of the default context size (Rodrigo) - Clarify in the commit message where the subslice calculation comes from. v5: s/12538/12544/ (Daniele) BSpec: 18907 Cc: Rodrigo Vivi Acked-by: Ben Widawsky (older version) Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Tvrtko Ursulin Signed-off-by: Oscar Mateo Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/1515711307-28979-2-git-send-email-oscar.mateo@intel.com drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++ 1 file changed, 3 insertions(+) commit 7ab4adbd921f9ab69bbe10cc1354a9fb59085a71 Author: Oscar Mateo Date: Thu Jan 11 14:55:06 2018 -0800 drm/i915: Return a default RCS context size Instead of returning whatever size the latest GEN used. This is because context sizes for new GENs can go up or down, but the only safe thing to do for missing cases is to use the largest known one, whatever that is. Suggested-by: Rodrigo Vivi Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Oscar Mateo Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/1515711307-28979-1-git-send-email-oscar.mateo@intel.com drivers/gpu/drm/i915/intel_engine_cs.c | 2 ++ 1 file changed, 2 insertions(+) commit a6358dda29a2caa7967833698e690684a031f10d Author: Tvrtko Ursulin Date: Tue Jan 9 21:23:13 2018 -0200 drm/i915/icl: Icelake interrupt register addresses and bits MMIO addresses and register definition for the new interrupt registers in Gen11. v2: Removed spelt out VCS and VECS bit definitions. (Daniel Vetter) v3: Adjust VCS and VECS. (Daniele Ceraolo Spurio) v4: Bikeshedding (Paulo). Cc: Daniele Ceraolo Spurio Reviewed-by: Paulo Zanoni Signed-off-by: Tvrtko Ursulin Signed-off-by: Rodrigo Vivi Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180109232336.11029-5-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_reg.h | 63 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 5c8ea01830b1e5a29b6a949e6b69eb606d335fa9 Author: Anusha Srivatsa Date: Thu Jan 11 16:00:10 2018 -0200 drm/i915/icp: Add the ID for ICL PCH - ICP Add the PCI ID for the ICL PCH - ICP. v2: rebased. v3: rebased. v4: fix ICP name. v5: fix the ID mask (Fei Li). v6 (from Paulo): bikesheds. Cc: Li, Fei Reviewed-by: Paulo Zanoni Signed-off-by: Anusha Srivatsa Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180111180010.24357-9-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_drv.c | 4 ++++ drivers/gpu/drm/i915/i915_drv.h | 1 + 2 files changed, 5 insertions(+) commit 5c749c522faca5124d849c3327b5bfa668b122ca Author: Anusha Srivatsa Date: Thu Jan 11 16:00:09 2018 -0200 drm/i915/icp: add ICP gmbus and gpio support In ICP, there are three TC ports and 3 DDI ports. v2: - Correct Pin mapping. v3: - Update pin mapping into per platform implementation rather than previous approach of port wise mapping. v4: - Update GMBUS_NUM_PINS (Paulo) v5: - rebase. v6: - Update function name, GMBUS_PIN_NUM (Paulo) v7 (from Paulo): - Make it apply. v8 (from Paulo): - Maintain consistent if ladder ordering. Suggested by: Ville Syrjala Cc: Jani Nikula Reviewed-by: Paulo Zanoni Signed-off-by: Anusha Srivatsa Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180111180010.24357-8-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_reg.h | 7 ++++++- drivers/gpu/drm/i915/intel_hdmi.c | 33 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_i2c.c | 17 +++++++++++++++-- 3 files changed, 54 insertions(+), 3 deletions(-) commit ccf6e0d9774657892e6715d519ea1c48c692158a Author: Anusha Srivatsa Date: Fri Jan 19 16:48:12 2018 -0200 drm/i915/icp: Add backlight Support for ICP ICP has two backlight controllers - similar to previous platforms like BXT -, but we only use one controller for now, so we can just reuse the CNP code. v2: Remove the usage of ICP_SECOND_PPS_BACKLIGHT register.(Jani) Reuse CNP code since it is very similar.(Ville) v3 (from Paulo): Rebase. v4 (from Paulo): adjust commit message (James) and comment (Rodrigo). Cc: Jani Nikula Cc: Ville Syrjala Acked-by: Rodrigo Vivi Acked-by: James Ausmus Reviewed-by: Paulo Zanoni Signed-off-by: Anusha Srivatsa Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180119184812.2888-1-paulo.r.zanoni@intel.com Signed-off-by: Paulo Zanoni drivers/gpu/drm/i915/intel_panel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b0d6a0f27e2ce77dc48527404d3a15ebf1b5d26d Author: Anusha Srivatsa Date: Thu Jan 11 16:00:07 2018 -0200 drm/i915/icp: Add Panel Power Sequencing Support ICP, like BXT, has has two panel power sequencers. v2: Simplify the code. Remove unwanted register definitions. Make code as close to BXT style as possible. (Ville) Also, remove the use of ICP_SECOND_PPS_BACKLIGHT for now. Moving forward, if we are sure we need to set this register, we can access it. v3: Use INTEL_GEN(dev_priv), make code more readeable. (Ville) v4 (from Paulo): - Coding style fixes. - Add a missing HAS_PCH_CNP -> gen10+ check. - Rebase. v5: Use per platform checks rather than INTEL_GEN(). v4 of this patch breaks on CoffeeLake, since CFL uses CNP and per platform check makes sense in that case. v6 (from Paulo): - v5 was a patch on top of v4, not a new version. Now v6 is correctly a new version of the original patch. Cc: Ville Syrjala Reviewed-by: Paulo Zanoni Signed-off-by: Anusha Srivatsa Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180111180010.24357-6-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_dp.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 4ef99abd07ef3ceb014b4359ec4a977d7ae8a8f9 Author: Anusha Srivatsa Date: Thu Jan 11 16:00:06 2018 -0200 drm/i915/icp: Get/set proper Raw clock frequency on ICP Add register definitions for setting the rawclock. Set the numerator,denominator and divider values. v2: Simplify the commit message. Simplify the math. Add register bits for numerator. (Paulo) v3 (from Paulo): coding style bikesheds. Reviewed-by: Paulo Zanoni Signed-off-by: Anusha Srivatsa Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180111180010.24357-5-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_cdclk.c | 29 +++++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) commit 0b58436f2d9ad20a4622e96a7a024e6f196f127e Author: Anusha Srivatsa Date: Thu Jan 11 16:00:05 2018 -0200 drm/i915/icp: Introduce Ice Lake PCH Add the enum additions to ICP PCH. v2 (from Paulo): don't set any platforms to it yet since ICP support is incomplete. v3 (from Rodrigo): Fix ICP name. Reviewed-by: Paulo Zanoni Signed-off-by: Anusha Srivatsa Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180111180010.24357-4-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 ++ 1 file changed, 2 insertions(+) commit 412310019a20d30e7205c98c314d1f0325922cb4 Author: Rodrigo Vivi Date: Thu Jan 11 16:00:04 2018 -0200 drm/i915/icl: Add initial Icelake definitions. Icelake is an Intel® Processor containing an Intel® Graphics Controller. This is just an initial Icelake definition. PCI IDs, Icelake support and new features coming in following patches. v2: Add .ddb_size and .has_guc (Michal Wajdeczko). v3: Add the ICL_FEATURES macro (Kelvin Gardiner). v4 (from Paulo): Add missing __initconst (Paulo) and say "graphics controller" instead of something that looks like an official marketing name but isn't (Chris). Reviewed-by: Rodrigo Vivi Reviewed-by: Paulo Zanoni Signed-off-by: Rodrigo Vivi Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180111180010.24357-3-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c | 13 +++++++++++++ drivers/gpu/drm/i915/intel_device_info.c | 1 + drivers/gpu/drm/i915/intel_device_info.h | 2 ++ 4 files changed, 18 insertions(+) commit 841b5ed7aaec4578cd7303fb7f456f01b90dd313 Author: Rodrigo Vivi Date: Thu Jan 11 16:00:03 2018 -0200 drm/i915/cnl: Add Port F definition. Some Cannonlake SKUs will come with a full split between port A and port E. This will be called port F although it is not a 6th port, but only a split. Note this patch alone is not sufficient for port F enabling, it's just the first step. v2: Fix size of dvo_ports found by Ander. v3: Adding missing cases from intel_bios.c for Port_F v4: Adding other missing cases and fix the commit message. v5: Rebase on top of display headers rework. v6 (from Paulo): improve commit message, bikeshed bit definitions. Cc: Lucas De Marchi Cc: Manasi Navare Acked-by: Rodrigo Vivi Reviewed-by: Paulo Zanoni Signed-off-by: Rodrigo Vivi Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180111180010.24357-2-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_bios.c | 9 +++++++++ drivers/gpu/drm/i915/intel_display.h | 1 + drivers/gpu/drm/i915/intel_dp.c | 2 ++ drivers/gpu/drm/i915/intel_vbt_defs.h | 2 ++ include/drm/i915_component.h | 3 +-- 5 files changed, 15 insertions(+), 2 deletions(-) commit 54156da8937c9f5f84b4215e239a61ecc7c29275 Merge: f7a71b0 4a6cc7a Author: Sean Paul Date: Fri Jan 19 12:32:05 2018 -0500 Merge airlied/drm-next into drm-misc-next It's been a while since we've backmerged drm-next. Dave just brought back 4.15-rc8, so now's a good time to freshen things up around here. Signed-off-by: Sean Paul commit f7a71b0cf9e36c1b0edbfe89ce028a01164b864d Author: Samuel Li Date: Thu Jan 18 16:44:20 2018 -0500 drm: add kernel doc for exported gem dmabuf_ops Signed-off-by: Samuel Li Reviewed-by: Daniel Vetter Reviewed-by: Christian König Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/1516311860-24949-1-git-send-email-Samuel.Li@amd.com drivers/gpu/drm/drm_prime.c | 88 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) commit 0b7029b7e43fda1304c181a3ade0b429b9edcd9d Author: Mika Kahola Date: Mon Dec 18 10:04:03 2017 +0200 drm/i915: Check for fused or unused pipes We may have fused or unused pipes in our system. Let's check that the pipe in question is within limits of accessible pipes. In case, that we are not able to access the pipe, we return early with a warning. v2: Rephrasing of the commit message (Jani) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103206 Reported-by: Thomas Gleixner Tested-by: Jaswinder Singh Rajput Suggested-by: Jani Nikula Reviewed-by: Jani Nikula Signed-off-by: Mika Kahola Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1513584243-12607-1-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/intel_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a97bbcce8c416063b2bdec978d3b242a59de9fb Author: Ville Syrjälä Date: Fri Dec 22 21:22:29 2017 +0200 drm/i915: Allow up to 32KB stride on SKL+ "sprites" SKL+ "sprites" no longer have 16KB max stride limit that earlier platforms had. Bump up the limit to 32KB. Cc: Ben Widawsky Cc: Jason Ekstrand Cc: Daniel Stone Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171222192231.17981-7-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_sprite.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 77064e2eb83ac6a50563b80c5de3d434d3cf8b34 Author: Ville Syrjälä Date: Fri Dec 22 21:22:28 2017 +0200 drm/i915: Add CCS capability for sprites Allow sprites to scan out compressed framebuffers. Since different platforms have a different set of planes that support CCS let's add a small helper to determine whether a specific plane supports CCS or not. Currently that information is spread around in many places, and not all the pieces of code even agree with each other. In addition to allowing sprites to scan out compressed fbs, the other fix here is that we stop rejecting them on pipe C on CNL. Cc: Ben Widawsky Cc: Jason Ekstrand Cc: Daniel Stone Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171222192231.17981-6-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola drivers/gpu/drm/i915/intel_display.c | 25 ++++-------------- drivers/gpu/drm/i915/intel_drv.h | 2 ++ drivers/gpu/drm/i915/intel_sprite.c | 50 ++++++++++++++++++++++++++---------- 3 files changed, 44 insertions(+), 33 deletions(-) commit c21f7904c7d2d89f82dffb5e5b72e698ebfa86a2 Author: Ville Syrjälä Date: Fri Dec 22 21:22:27 2017 +0200 drm/i915: Clean up the sprite modifier checks Split the g4x and snb cases into separate functions to match how we deal with all other platforms. Also sort the switch cases to match the format lists we've declared earlier, to ease comparisons. Cc: Ben Widawsky Cc: Jason Ekstrand Cc: Daniel Stone Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171222192231.17981-5-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_sprite.c | 48 ++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 19 deletions(-) commit 74ac160b3f9585300bd79e52d560c2da896d6078 Author: Ville Syrjälä Date: Fri Dec 22 21:22:26 2017 +0200 drm/i915: Add the missing Y/Yf modifiers for SKL+ sprites Y/Yf were dropped out from the SKL+ sprite modifier list on account of some watermark issues Daniel Stone was having. My subsequent testing seemed to indicate that things work better now, so add the modifiers back in. v2: Update the commit message with a better explanation Cc: Ben Widawsky Cc: Jason Ekstrand Cc: Daniel Stone Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171222192231.17981-4-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_sprite.c | 2 ++ 1 file changed, 2 insertions(+) commit e13a3183dae4f511821c4ad1e317a2b132051d4c Author: Ville Syrjälä Date: Fri Dec 22 21:22:25 2017 +0200 drm/i915: Nuke a pointless unreachable() The unreachable() is very much unreachable and the compiler knows that, so there's no point in having it. Cc: Ben Widawsky Cc: Jason Ekstrand Cc: Daniel Stone Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171222192231.17981-3-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 2 -- 1 file changed, 2 deletions(-) commit 3019062905533ccd71b535f6e5c3ed7e9bb195e0 Author: Abdiel Janulgue Date: Fri Dec 15 12:20:55 2017 +0200 drm/i915: Ignore TMDS clock limit for DP++ when EDID override is set 4K modes testing by using dummy EDID data has never been working properly on boxes with DP++ (dual-mode) adaptors. The reason for this is that those modes got pruned during hdmi mode validation. intel_hdmi_mode_valid returns CLOCK_HIGH because the pixel clock reported by the 4k mode is higher than dual port TMDS clock limit. However 4k injection does work properly on machines that don't have DP++ adapters because the mode is never validated against the DP++ TMDS clock limit. v2: Don't detect the DP++ limits when we're testing using overridden EDIDs. Make sure to check for the override condition after respecting the value of drm_dp_dual_mode_detect (Jani Nikula). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101649 Cc: Ville Syrjälä Cc: Jani Nikula Cc: Daniel Vetter Signed-off-by: Abdiel Janulgue Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20171215102055.11729-1-abdiel.janulgue@linux.intel.com drivers/gpu/drm/i915/intel_hdmi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a4dd90b1cb6f9f761753f72b4208feee4bf4d946 Author: Jani Nikula Date: Fri Dec 29 14:55:47 2017 +0200 drm/i915: remove redundant ELD connector type update drm_edid_to_eld() sets ELD connector type since commit 1d1c36650752 ("drm/edid: set ELD connector type in drm_edid_to_eld()"). Remove the redundant update. (Commit c945b8c14bb7 ("drm/edid: build ELD in drm_add_edid_modes()") and commit d471ed04b487 ("drm/drivers: drop redundant drm_edid_to_eld() calls") are also related.) v2: Rebase, update commit message with commit references. Reviewed-by: Ville Syrjälä Reviewed-by: Alex Deucher Acked-by: Thierry Reding Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20171229125547.28672-1-jani.nikula@intel.com drivers/gpu/drm/i915/intel_modes.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 3cfd32654b47c040c3d66d9a7e66f50cf895acd5 Author: Jani Nikula Date: Thu Jan 18 17:06:13 2018 +0200 drm/i915: vbt defs typo fixes No more sing-a-ling. Reported-by: Adam Jackson You're-my-ding-a-ling-by: Chris Wilson Reviewed-by: David Weinehall Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180118150613.26140-1-jani.nikula@intel.com drivers/gpu/drm/i915/intel_vbt_defs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 49d85d034268ab9d9156ff6f81cc07d4caad03f6 Author: Ramalingam C Date: Thu Jan 18 11:18:08 2018 +0530 drm/i915: Check for downstream topology errors HDCP compliant Repeaters can support max of 127 devices and max depth of 7 for downstream topology. If these max limits are exceeded, repeater will set the topology error flags MAX_CASCADE_EXCEEDED and/or MAX_DEVS_EXCEEDED in Bstatus followed by asserting READY/CP_IRQ for HDCP transmitter. This patch check for these error flags as soon as READY bit is asserted. Signed-off-by: Ramalingam C [seanpaul fixed checkpatch alignment issue] Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1516254488-4971-5-git-send-email-ramalingam.c@intel.com drivers/gpu/drm/i915/intel_hdcp.c | 6 ++++++ include/drm/drm_hdcp.h | 2 ++ 2 files changed, 8 insertions(+) commit 24b42cbadb73e0b9ac67c2d619073b394bc146bd Author: Ramalingam C Date: Thu Jan 18 11:18:07 2018 +0530 drm/i915: Start repeater auth on READY/CP_IRQ Second stage of HDCP authentication starts at CP_IRQ or at the assertion of READY bit from Repeater. Till then repeater will be authenticating with its downstream devices. So authenticated device count, depth and ksv_list readable from repeaters are valid only after assertion of READY/CP_IRQ. This patch makes sure that READY is polled before reading any topology information. Signed-off-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1516254488-4971-4-git-send-email-ramalingam.c@intel.com drivers/gpu/drm/i915/intel_hdcp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 87eb3ec818fa57bc49ce419785c56d72d9da1faa Author: Ramalingam C Date: Thu Jan 18 11:18:06 2018 +0530 drm/i915: II stage HDCP auth for repeater only Second stage of HDCP authentication required only if the HDCP sink is a repeater. This patch imposes above condition on second stage HDCP authentication. Signed-off-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1516254488-4971-3-git-send-email-ramalingam.c@intel.com drivers/gpu/drm/i915/intel_hdcp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fdddd08c4875db0799defd8cad318a68f564e7e5 Author: Ramalingam C Date: Thu Jan 18 11:18:05 2018 +0530 drm/i915: Extending HDCP for HSW, BDW and BXT+ This patch extends the Key load process and hdcp initialization for few more capable intel platforms i.e. HSW, BDW and BXT+. Signed-off-by: Ramalingam C [seanpaul fixed checkpatch issues] Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1516254488-4971-2-git-send-email-ramalingam.c@intel.com drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_dp.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_hdcp.c | 40 ++++++++++++++++++++++++++++++++------- drivers/gpu/drm/i915/intel_hdmi.c | 3 +-- 5 files changed, 37 insertions(+), 10 deletions(-) commit c4fb60b9aba9f939d3f8575df23fd8d5958ec6ed Author: Jani Nikula Date: Thu Jan 18 17:33:10 2018 +0200 drm/i915/bios: add DP max link rate to VBT child device struct Update VBT defs to reflect revision 216. While at it, default the expected child device struct size to sizeof the size rather than a hardcoded value. v2: Fix bit order (David) Cc: Rodrigo Vivi Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180118153310.32437-1-jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 8 +++++--- drivers/gpu/drm/i915/intel_vbt_defs.h | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) commit ddd39e4b3f8fb9b69c4dd41019cbe30b049af5ed Author: Lucas De Marchi Date: Tue Nov 28 14:05:53 2017 -0800 drm/i915/cnl: apply Display WA #1178 to fix type C dongles Display WA #1178 is meant to fix Aux channel voltage swing too low with some type C dongles. Although it is for type C, HW engineers reported that it can be applied to all external ports even if they are not going to type C. For CNL we apply the workaround every time Aux B, C and D are powering up since they will lose the configuration when powered down. v2: Use common tag for WA Cc: Rodrigo Vivi Cc: Arthur J Runyan Cc: Ville Syrjälä Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20171128220553.22435-1-lucas.demarchi@intel.com drivers/gpu/drm/i915/i915_reg.h | 11 +++++++++++ drivers/gpu/drm/i915/intel_runtime_pm.c | 9 +++++++++ 2 files changed, 20 insertions(+) commit 1edf6958c195146973fd78c82fadea8330becfd0 Author: Michel Thierry Date: Thu Jan 18 17:52:28 2018 +0000 drm/i915: Use the engine name directly in the error_state file Instead of using local string names that we will have to keep maintaining, use the engine->name directly. v2: Better invalid engine_id handling, capture_bo will not be able know the engine_id and end up with -1 (Michal). Suggested-by: Michal Wajdeczko Signed-off-by: Michel Thierry Cc: Michal Wajdeczko Cc: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180110012151.28261-1-michel.thierry@intel.com [ickle: minor massaging of function names] Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180118175228.2830-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gpu_error.c | 36 ++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) commit 35fe703c3161ac9e723c845d425814a02cfda140 Author: Michal Wajdeczko Date: Thu Jan 11 15:24:41 2018 +0000 drm/i915/guc: Change values for i915_guc_log_control Today we have format mismatch between read/write operations of i915_guc_log_control entry. For read we return (0, 1..4) that represents disable/verbosity levels, but for write we force user to follow internal structure format (0,1,9,11,13). Let's hide internals from the user and accept same values as we support for read and related guc_log_level modparam. Signed-off-by: Michal Wajdeczko Cc: Sagar Arun Kamble Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180111152441.21676-2-michal.wajdeczko@intel.com Reviewed-by: Sagar Arun Kamble Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_guc_log.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 0ed8795353265259b3c891d0626fed5f257dc527 Author: Michal Wajdeczko Date: Thu Jan 11 15:24:40 2018 +0000 drm/i915/guc: Redefine guc_log_level modparam values We used value -1 to indicate "disabled" and values 0..3 to indicate "enabled", but most of our other modparams are using -1 for "auto" mode and 0 for "disable". For consistency let's change our log level values to: -1: auto (depends on platform and Kconfig.debug settings) 0: disabled 1: enabled (severity level 0 = min) 2: enabled (severity level 1) 3: enabled (severity level 2) 4: enabled (severity level 3 = max) v2: fix commit message (Sagar) display sanitized modparam value (Sagar) unify sanitize messages (Sagar/Michal) Signed-off-by: Michal Wajdeczko Cc: Sagar Arun Kamble Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180111152441.21676-1-michal.wajdeczko@intel.com Reviewed-by: Sagar Arun Kamble Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_params.c | 3 +- drivers/gpu/drm/i915/intel_guc.c | 22 ++++++++----- drivers/gpu/drm/i915/intel_guc_log.c | 47 +++++++++++++--------------- drivers/gpu/drm/i915/intel_uc.c | 60 ++++++++++++++++++++++++++++++++---- 4 files changed, 93 insertions(+), 39 deletions(-) commit e9af4ea2b9e7e5d3caa6354be14de06b678ed0fa Author: Chris Wilson Date: Thu Jan 18 13:16:09 2018 +0000 drm/i915: Avoid waitboosting on the active request Watching a light workload on Baytrail (running glxgears and a 1080p decode), instead of the system remaining at low frequency, the glxgears would regularly trigger waitboosting after which it would have to spend a few seconds throttling back down. In this case, the waitboosting is counter productive as the minimal wait for glxgears doesn't prevent it from functioning correctly and delivering frames on time. In this case, glxgears happens to almost always be waiting on the current request, which we already expect to complete quickly (see i915_spin_request) and so avoiding the waitboost on the active request and spinning instead provides the best latency without overcommitting to upclocking. However, if the system falls behind we still force the waitboost. Similarly, we will also trigger upclocking if we detect the system is not delivering frames on time - again using a mechanism that tries to detect a miss and not preemptively upclock. v2: Also skip boosting for after missed vblank if the desired request is already active. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Radoslaw Szwichtenberg Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180118131609.16574-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 7 +++---- drivers/gpu/drm/i915/i915_gem_request.h | 13 +++++++++++++ drivers/gpu/drm/i915/intel_display.c | 8 +++++++- 3 files changed, 23 insertions(+), 5 deletions(-) commit b7fc1a9b7e62dcae40d51e83390cbb678ae5c6c2 Author: Chris Wilson Date: Thu Jan 18 16:10:25 2018 +0000 drm/i915/dp: Fix compilation of intel_dp_hdcp_check_link drivers/gpu/drm/i915/intel_dp.c: In function ‘intel_dp_hdcp_check_link’: drivers/gpu/drm/i915/intel_dp.c:5191:26: error: ?: using integer constants in boolean context [-Werror=int-in-bool-context] return ret >= 0 ? -EIO : ret; Fixes: 20f24d776d1b ("drm/i915: Implement HDCP for DisplayPort") Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Ramalingam C Cc: Sean Paul Cc: Jani Nikula Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180118161025.22700-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_dp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e1ca774b3e06228ad75a2e4afc7f3a4cb45eef64 Author: Andy Shevchenko Date: Tue Oct 31 16:21:42 2017 +0200 drm/i2c: tda998x: Remove duplicate NULL check Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Cc: Russell King Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Signed-off-by: Andy Shevchenko Link: https://patchwork.freedesktop.org/patch/msgid/20171031142149.32512-8-andriy.shevchenko@linux.intel.com Acked-by: Russell King Signed-off-by: Ville Syrjälä drivers/gpu/drm/i2c/tda998x_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c4880be79c0655fb17dbcf29b95fc840ff3a4c22 Author: Andy Shevchenko Date: Tue Oct 31 16:21:41 2017 +0200 drm/i2c/sil164: Remove duplicate NULL check Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Signed-off-by: Andy Shevchenko Link: https://patchwork.freedesktop.org/patch/msgid/20171031142149.32512-7-andriy.shevchenko@linux.intel.com Signed-off-by: Ville Syrjälä drivers/gpu/drm/i2c/sil164_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0173bfd421d36464ec91c6c2c76db82e0bcb7699 Author: Andy Shevchenko Date: Tue Oct 31 16:21:40 2017 +0200 drm/bridge: analogix-anx78xx: Remove duplicate NULL check Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Cc: Archit Taneja Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Signed-off-by: Andy Shevchenko Link: https://patchwork.freedesktop.org/patch/msgid/20171031142149.32512-6-andriy.shevchenko@linux.intel.com Signed-off-by: Ville Syrjälä drivers/gpu/drm/bridge/analogix-anx78xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b6c51c3e2872b2d133293dd94245b5f39126aaf7 Author: Imre Deak Date: Wed Jan 17 19:25:08 2018 +0200 drm/i915: Add tracking for CDCLK bypass frequency The CDCLK bypass frequency can vary on upcoming platforms, so prepare for that now by tracking its value in the CDCLK state. Currently on BDW+ the bypass frequency is always the reference clock and I didn't bother with earlier platforms since it's not all that clear what's the bypass clock on those. I also didn't bother adding support for changing this frequency, since atm I don't see any need for it. Suggested-by: Ville Syrjälä Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180117172508.15993-1-imre.deak@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_cdclk.c | 35 ++++++++++++++++++----------------- 2 files changed, 19 insertions(+), 18 deletions(-) commit 29d384e34c55d696cf37bd4159e05f4b14d45da0 Author: Chris Wilson Date: Mon Jan 15 21:24:46 2018 +0000 drm/i915: Only attempt to scan the requested number of shrinker slabs Since commit 4e773c3a8a69 ("drm/i915: Wire up shrinkctl->nr_scanned"), we track the number of objects we scan and do not wish to exceed that as it will overly penalise our own slabs under mempressure. Given that we now know the target number of objects to scan, use that as our guide for deciding to shrink as opposed to the number of objects we manage to shrink (which doesn't correspond to the numbers we report to shrinkctl). Fixes: 4e773c3a8a69 ("drm/i915: Wire up shrinkctl->nr_scanned") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180115212455.24046-2-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_shrinker.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c6270dbce9b01b465875ee4200623887f9399a21 Author: Arnd Bergmann Date: Wed Jan 17 16:48:53 2018 +0100 drm: i915: remove timeval users struct timeval is deprecated because it cannot represent times past 2038. In this driver, the only use of this structure is to capture debug information. This is easily changed to ktime_t, which we then format as needed when printing it later. Reviewed-by: Chris Wilson Signed-off-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/20180117154916.219273-1-arnd@arndb.de Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 6 +++--- drivers/gpu/drm/i915/i915_gpu_error.c | 25 ++++++++++++++----------- 2 files changed, 17 insertions(+), 14 deletions(-) commit 739ebf51a92c67ce7e26e348d8effb9a55eb96c3 Author: Sean Paul Date: Tue Jan 16 17:22:10 2018 -0500 drm/panel: panasonic-vvx10f034n00: Fix wuxga_nt_panel_disable() return value Return value for mipi_dsi_shutdown_peripheral() is unchecked. Check it and return any errors if they come up. Even if mipi_dsi_shutdown_peripheral() fails, continue attempting to disable. Cc: Philippe Cornu Reviewed-by: Philippe Cornu Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180116222217.240939-1-seanpaul@chromium.org drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ba02f4c26b37102ab030aa81d42d8021c81a43ab Author: Chris Wilson Date: Wed Jan 17 13:57:13 2018 +0000 drm/i915/selftests: Wait for the dma-fence timeout When testing that the timeout fired, we need to be sure we have waited just long enough for the timeout to have occurred and for the softirq (on another cpu) to have completed. Sleeping for an arbitrary amount is prone to error, so wait for the timeout instead and complain if it was too late. v2: Use wait_event_timeout to provide an upper bound v3: Fix inverted check for wait_event_timeout timing out v4: Restore the check that the fences aren't signalled too early, by inspecting them before the expected timeout. References: https://bugs.freedesktop.org/show_bug.cgi?id=104670 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180117135713.2324-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_sw_fence.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 3f5b933e60506452ea4f83d8a436607cb1c8fa24 Author: Maarten Lankhorst Date: Tue Jan 16 16:53:31 2018 +0100 drm/i915: Do not WARN_ON with small framebuffers. It's perfectly legal to create a fb with stride < 512, and one of the kms_plane_scaling subtests creates a very small fb. Downgrade the WARN_ON to a simple check check, and because this function is potentially called on every atomic update/pageflip, downgrade the other WARN_ON to a WARN_ON_ONCE, and do the right thing here. Cc: Paulo Zanoni Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20180116155331.75175-1-maarten.lankhorst@linux.intel.com Reviewed-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_fbc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 6ac69290289821b80c2fcf9e3f2c137346c4239f Author: Philippe Cornu Date: Fri Jan 12 15:48:47 2018 +0100 drm/dsi: Fix improper use of mipi_dsi_device_transfer() return value The function mipi_dsi_device_transfer() returns the number of transmitted or received bytes on success or a negative error code on failure. The functions mipi_dsi_shutdown_peripheral(), mipi_dsi_turn_on_peripheral() & mipi_dsi_set_maximum_return_packet_size() use improperly this returned value in case of success: 0 should be returned instead of the number of transmitted bytes. Signed-off-by: Philippe Cornu Reviewed-by: Andrzej Hajda Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180112144847.18810-1-philippe.cornu@st.com drivers/gpu/drm/drm_mipi_dsi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit ac25dfed15d470d7f23dd817e965b54aa3f94a1e Author: Maarten Lankhorst Date: Tue Jan 16 16:53:24 2018 +0100 drm/i915: Always call to intel_display_set_init_power() in resume_early. intel_power_domains_init_hw() calls set_init_power, but when using runtime power management this call is skipped. This prevents hw readout from taking place. Signed-off-by: Maarten Lankhorst Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104172 Link: https://patchwork.freedesktop.org/patch/msgid/20180116155324.75120-1-maarten.lankhorst@linux.intel.com Fixes: bc87229f323e ("drm/i915/skl: enable PC9/10 power states during suspend-to-idle") Cc: Nivedita Swaminathan Cc: Imre Deak Cc: Patrik Jakobsson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: # v4.5+ Reviewed-by: Imre Deak drivers/gpu/drm/i915/i915_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 2ef1e729c7f0fbad9706848f5fe5cff84f5b6d24 Author: Chris Wilson Date: Mon Jan 15 20:57:59 2018 +0000 drm/i915: Rewrite some comments around RCU-deferred object free Tvrtko noticed that the comments describing the interaction of RCU and the deferred worker for freeing drm_i915_gem_object were a little confusing, so attempt to bring some sense to them. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180115205759.13884-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 2aa472c8279a0eea4649283fd1266cb629b8a5d3 Author: Chris Wilson Date: Mon Jan 15 20:43:48 2018 +0000 drm/i915/selftests: Test i915_sw_fence/dma_fence interop Check that we can successfully wait upon a dma_fence using the i915_sw_fence, including the optional timeout mechanism. v2: Account for the rounding up of the timeout to the next second. Unfortunately, the minimum delay is then 1 second. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180115204348.8480-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/selftests/i915_sw_fence.c | 136 +++++++++++++++++++++++++ 1 file changed, 136 insertions(+) commit fd2cb71bbc383edbfe73ce3770569c7259cfb939 Author: Brian Norris Date: Tue Jan 9 12:32:48 2018 -0800 drm/bridge/synopsys: dsi: handle endianness correctly in dw_mipi_dsi_write() We're filling the "remainder" word with little-endian data, then writing it out to IO registers with endian-correcting writel(). That probably won't work on big-endian systems. Let's mark the "remainder" variable as LE32 (since we fill it with memcpy()) and do the swapping explicitly. Some of this function could be done more easily without memcpy(), but the unaligned "remainder" case is a little hard to do without potentially overrunning 'tx_buf', so I just applied the same solution in all cases (memcpy() + le32_to_cpu()). Tested only on a little-endian system. Signed-off-by: Brian Norris Reviewed-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20180109203248.139249-2-briannorris@chromium.org drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit ad95dc86e67ec8c044b560891576d8eea87251aa Author: Brian Norris Date: Tue Jan 9 12:32:47 2018 -0800 drm/bridge/synopsys: dsi: use common mipi_dsi_create_packet() This takes care of 2 TODOs in this driver, by using the common DSI packet-marshalling code instead of our custom short/long write code. This both saves us some duplicated code and gets us free support for command types that weren't already part of our switch block (e.g., MIPI_DSI_GENERIC_LONG_WRITE). The code logic stays mostly intact, except that it becomes unnecessary to split the short/long write functions, and we have to copy data a bit more. Along the way, I noticed that loop bounds were a little odd: while (DIV_ROUND_UP(len, pld_data_bytes)) This really was just supposed to be 'len != 0', so I made that more clear. Tested on RK3399 with some pending refactoring patches by Nickey Yang, to make the Rockchip DSI driver wrap this common driver. Signed-off-by: Brian Norris Reviewed-by: Philippe Cornu Tested-by: Philippe Cornu Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20180109203248.139249-1-briannorris@chromium.org drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 78 ++++++--------------------- 1 file changed, 16 insertions(+), 62 deletions(-) commit 552de1bf4daea12eb3aec69763da8f4ad9d87258 Author: Brian Norris Date: Tue Jan 9 12:33:19 2018 -0800 drm/bridge/synopsys: dsi: make dw_mipi_dsi_bridge_mode_set() static sparse complains: drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:703:6: warning: symbol 'dw_mipi_dsi_bridge_mode_set' was not declared. Should it be static? Reviewed-by: Philippe Cornu Signed-off-by: Brian Norris Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20180109203319.139520-1-briannorris@chromium.org drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit beacbd16158a583dc22104d59ea9ac0a808be73f Author: Chris Wilson Date: Mon Jan 15 12:28:45 2018 +0000 drm/i915: Use our singlethreaded wq for freeing objects As freeing the objects require serialisation on struct_mutex, we should prefer to use our singlethreaded driver wq that is dedicated to work requiring struct_mutex (hence serialised).The benefit should be less clutter on the system wq, allowing it to make progress even when the driver/struct_mutex is heavily contended. Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180115122846.15193-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10399b22c1a0e0bbbf56460447e7e602737b0058 Author: Noralf Trønnes Date: Wed Jan 10 19:59:40 2018 +0100 drm/tinydrm/mipi-dbi: Change reset active time The MIPI DBI spec states that reset active/low time should be more than 9us. Change from 20ms to 20us. Signed-off-by: Noralf Trønnes Reviewed-by: David Lechner Tested-by: David Lechner Link: https://patchwork.freedesktop.org/patch/msgid/20180110185940.53841-8-noralf@tronnes.org drivers/gpu/drm/tinydrm/mipi-dbi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe4be3b8f3e6345b398bf3f44b50676e471e1c37 Author: Noralf Trønnes Date: Wed Jan 10 19:59:39 2018 +0100 drm/tinydrm: Embed the mode in tinydrm_connector Embed the mode in tinydrm_connector instead of doing an devm_ allocation. Remove unnecessary use of ret variable at the end of tinydrm_display_pipe_init(). Signed-off-by: Noralf Trønnes Reviewed-by: David Lechner Link: https://patchwork.freedesktop.org/patch/msgid/20180110185940.53841-7-noralf@tronnes.org drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 34 +++++++++++------------------ 1 file changed, 13 insertions(+), 21 deletions(-) commit f730eceb42fa0bf60006d45e93c52207cb8a65be Author: Noralf Trønnes Date: Wed Jan 10 19:59:38 2018 +0100 drm/tinydrm/mi0283qt: Let the display pipe handle power It's better to leave power handling and controller init to the modesetting machinery using the simple pipe .enable and .disable callbacks. Remove unused mipi_dbi_pipe_enable(). Signed-off-by: Noralf Trønnes Reviewed-by: David Lechner Link: https://patchwork.freedesktop.org/patch/msgid/20180110185940.53841-6-noralf@tronnes.org drivers/gpu/drm/tinydrm/mi0283qt.c | 47 ++++++++------------------------------ drivers/gpu/drm/tinydrm/mipi-dbi.c | 32 ++++---------------------- include/drm/tinydrm/mipi-dbi.h | 2 -- 3 files changed, 15 insertions(+), 66 deletions(-) commit 070ab1283a57d7bfff5cce9ce58be64b90173a8f Author: Noralf Trønnes Date: Wed Jan 10 19:59:37 2018 +0100 drm/tinydrm/mipi-dbi: Add poweron-reset functions Split out common poweron-reset functionality. Signed-off-by: Noralf Trønnes Reviewed-by: David Lechner Tested-by: David Lechner Link: https://patchwork.freedesktop.org/patch/msgid/20180110185940.53841-5-noralf@tronnes.org drivers/gpu/drm/tinydrm/mi0283qt.c | 22 ++---------- drivers/gpu/drm/tinydrm/mipi-dbi.c | 73 ++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/tinydrm/st7586.c | 9 ++--- drivers/gpu/drm/tinydrm/st7735r.c | 9 ++--- include/drm/tinydrm/mipi-dbi.h | 2 ++ 5 files changed, 83 insertions(+), 32 deletions(-) commit 22edc8d38ba5e912d0fd0d4d23ed268ae152c5ee Author: Noralf Trønnes Date: Wed Jan 10 19:59:36 2018 +0100 drm/tinydrm/mipi-dbi: Add mipi_dbi_enable_flush() Add and use a function for enabling, flushing and turning on backlight. Signed-off-by: Noralf Trønnes Reviewed-by: David Lechner Link: https://patchwork.freedesktop.org/patch/msgid/20180110185940.53841-4-noralf@tronnes.org drivers/gpu/drm/tinydrm/ili9225.c | 6 +----- drivers/gpu/drm/tinydrm/mipi-dbi.c | 20 ++++++++++++++++++++ drivers/gpu/drm/tinydrm/st7586.c | 6 +----- drivers/gpu/drm/tinydrm/st7735r.c | 2 +- include/drm/tinydrm/mipi-dbi.h | 1 + 5 files changed, 24 insertions(+), 11 deletions(-) commit 24e05e7a82454019fbf3b20c3006c19939571acd Author: Noralf Trønnes Date: Wed Jan 10 19:59:35 2018 +0100 drm/tinydrm/mi0283qt: Remove ili9341.h No need for a public header file for the command macros. Just include the necessary ones in the driver. Also use the MIPI_DCS_PIXEL_FMT_16BIT macro. Signed-off-by: Noralf Trønnes Reviewed-by: David Lechner Link: https://patchwork.freedesktop.org/patch/msgid/20180110185940.53841-3-noralf@tronnes.org drivers/gpu/drm/tinydrm/mi0283qt.c | 28 ++++++++++++++++++-- include/drm/tinydrm/ili9341.h | 54 -------------------------------------- 2 files changed, 26 insertions(+), 56 deletions(-) commit 2a678996d885e8464875710f6101d6c80e86ab14 Author: Noralf Trønnes Date: Wed Jan 10 19:59:34 2018 +0100 drm/tinydrm/mi0283qt: Use common include order Include linux headers before drm headers as it's commonly done. Signed-off-by: Noralf Trønnes Reviewed-by: David Lechner Link: https://patchwork.freedesktop.org/patch/msgid/20180110185940.53841-2-noralf@tronnes.org drivers/gpu/drm/tinydrm/mi0283qt.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 99e48bf98dd036090b480a12c39e8b971731247e Author: Chris Wilson Date: Mon Jan 15 09:20:41 2018 +0000 drm/i915: Lock out execlist tasklet while peeking inside for busy-stats In order to prevent a race condition where we may end up overaccounting the active state and leaving the busy-stats believing the GPU is 100% busy, lock out the tasklet while we reconstruct the busy state. There is no direct spinlock guard for the execlists->port[], so we need to utilise tasklet_disable() as a synchronous barrier to prevent it, the only writer to execlists->port[], from running at the same time as the enable. Fixes: 4900727d35bb ("drm/i915/pmu: Reconstruct active state on starting busy-stats") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180115092041.13509-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_engine_cs.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit f255c1e91e333ba0bd177120748f4caf294b812b Author: Chris Wilson Date: Mon Jan 15 09:06:43 2018 +0000 drm/i915/fence: Separate timeout mechanism for awaiting on dma-fences As the timeout mechanism has grown more and more complicated, using multiple deferred tasks and more than doubling the size of our struct, split the two implementations to streamline the simpler no-timeout callback variant. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180115090643.26696-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_sw_fence.c | 61 +++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 21 deletions(-) commit c32164b1f6a2eafa0658bbf33d02b2da41c72e5a Author: Chris Wilson Date: Mon Jan 15 09:06:42 2018 +0000 drm/i915: Only defer freeing of fence callback when also using the timer Without an accompanying timer (for internal fences), we can free the fence callback immediately as we do not need to employ the RCU barrier to serialise with the timer. By avoiding the RCU delay, we can avoid the extra mempressure under heavy inter-engine request utilisation. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180115090643.26696-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_sw_fence.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit c9ef291a7e79ebc9fb1723090c12fae626e74c46 Author: Dhinakaran Pandiyan Date: Wed Jan 3 13:38:24 2018 -0800 drm/i915/psr: Avoid initializing PSR if there is no sink support. DPCD read for the eDP is complete by the time intel_psr_init() is called, which means we can avoid initializing PSR structures and state if there is no sink support. Cc: Rodrigo Vivi Cc: Ville Syrjälä Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180103213824.1405-3-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 7 ++++++- drivers/gpu/drm/i915/intel_psr.c | 9 +++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) commit 4371d89601c301fdbbdb9616c887ae77b38f6404 Author: Dhinakaran Pandiyan Date: Wed Jan 3 13:38:23 2018 -0800 drm/i915/psr: CAN_PSR() macro to check for PSR source and sink support. The global variable dev_priv->psr.sink_support is set if an eDP sink supports PSR. Use this instead of redoing the check with is_edp_psr(). Combine source and sink support checks into a macro that can be used to return early from psr_{invalidate, single_frame_update, flush}. Cc: Rodrigo Vivi Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180103213824.1405-2-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_psr.c | 19 ++++--------------- 2 files changed, 5 insertions(+), 15 deletions(-) commit 457f1e5f47024793c7b4095e6647ce48ea0bf697 Author: Dhinakaran Pandiyan Date: Wed Jan 3 13:38:22 2018 -0800 drm/i915/psr: Kill psr.source_ok flag. This flag has become redundant since commit 4d90f2d507ab ("drm/i915: Start tracking PSR state in crtc state") It is set at the same place as psr.enabled, which is also exposed via debugfs. Cc: Rodrigo Vivi Cc: Ville Syrjälä Signed-off-by: Dhinakaran Pandiyan Acked-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180103213824.1405-1-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 1 - drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/intel_psr.c | 2 -- 3 files changed, 4 deletions(-) commit dd5fec87efdd54db6870b5d24c1fd3cda94f4510 Author: Tvrtko Ursulin Date: Fri Jan 12 17:03:40 2018 +0000 drm/i915/pmu: Use kcalloc instead of kzalloc kcalloc is preffered for allocating arrays. Signed-off-by: Tvrtko Ursulin Suggested-by: Ville Syrjälä Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180112170340.5387-2-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_pmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4c501230846b99ad78435637500471caa77a65c8 Author: Fengguang Wu Date: Fri Jan 12 17:03:39 2018 +0000 drm/i915/pmu: fix noderef.cocci warnings drivers/gpu/drm/i915/i915_pmu.c:795:34-40: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci Fixes: 109ec558370f ("drm/i915/pmu: Only enumerate available counters in sysfs") Signed-off-by: Fengguang Wu Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180112170340.5387-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49f81d80ab8496c400dee63b31530723a390911f Author: Linus Walleij Date: Fri Jan 12 08:48:54 2018 +0100 drm/pl111: Support handling bridge timings If the bridge has a too strict setup time for the incoming signals, we may not be fast enough and then we need to compensate by outputting the signal on the inverse clock edge so it is for sure stable when the bridge samples it. Since bridges in difference to panels does not expose their connectors, make the connector optional in the display setup code. Acked-by: Laurent Pinchart Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20180112074854.9560-4-linus.walleij@linaro.org drivers/gpu/drm/pl111/Kconfig | 1 + drivers/gpu/drm/pl111/pl111_display.c | 35 +++++++++++++++++++++++++++++++---- drivers/gpu/drm/pl111/pl111_drv.c | 20 +++++++++++--------- 3 files changed, 43 insertions(+), 13 deletions(-) commit 88dda5b4789f26d773563005567c69f85e1f08f5 Author: Linus Walleij Date: Fri Jan 12 08:48:53 2018 +0100 drm/bridge: Add timing support to dumb VGA DAC This extends the dumb VGA DAC bridge to handle the THS8134A and THS8134B VGA DACs in addition to those already handled. We assign the proper timing data to the pointer inside the bridge struct so display controllers that need to align their timings to the bridge can pick it up and work from there. Cc: Bartosz Golaszewski Cc: Maxime Ripard Reviewed-by: Laurent Pinchart Signed-off-by: Linus Walleij Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20180112074854.9560-3-linus.walleij@linaro.org drivers/gpu/drm/bridge/dumb-vga-dac.c | 59 +++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 3 deletions(-) commit 36a776df6e088a0cec2303aacd2fe762830b2457 Author: Linus Walleij Date: Fri Jan 12 08:48:52 2018 +0100 drm/bridge: Provide a way to embed timing info in bridges After some discussion and failed patch sets trying to convey the right timing information between the display engine and a bridge using the connector, I try instead to use an optional timing information container in the bridge itself, so that display engines can retrieve it from any bridge and use it to determine how to drive outputs. Signed-off-by: Linus Walleij Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20180112074854.9560-2-linus.walleij@linaro.org include/drm/drm_bridge.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 85d0875a4f0e59887307e7a435999132836a8717 Author: Linus Walleij Date: Fri Jan 12 08:48:51 2018 +0100 drm/bridge: Add bindings for TI THS8134 This adds device tree bindings for the Texas Instruments THS8134, THS8134A and THS8134B VGA DACs by extending and renaming the existing bindings for THS8135. These DACs are used for the VGA outputs on the ARM reference designs such as Integrator, Versatile and RealView. Cc: devicetree@vger.kernel.org Cc: Bartosz Golaszewski Acked-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Linus Walleij Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20180112074854.9560-1-linus.walleij@linaro.org .../bindings/display/bridge/ti,ths8135.txt | 46 ------------------- .../bindings/display/bridge/ti,ths813x.txt | 51 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 46 deletions(-) commit 937f3acc605397ccfce28c835f0bf9d6da589060 Author: Noralf Trønnes Date: Wed Jan 3 23:21:04 2018 +0100 drm/ioctl: Remove trailing whitespace Remove a couple of trailing spaces. Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20180103222110.45855-3-noralf@tronnes.org drivers/gpu/drm/drm_ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4900727d35bb20028f9bd83146ec4bf78afffe30 Author: Chris Wilson Date: Thu Jan 11 07:30:31 2018 +0000 drm/i915/pmu: Reconstruct active state on starting busy-stats We have a hole in our busy-stat accounting if the pmu is enabled during a long running batch, the pmu will not start accumulating busy-time until the next context switch. This then fails tests that are only sampling a single batch. v2: Count each active port just once (context in/out events are only on the first and last assignment to a port). v3: Avoid hardcoding knowledge of 2 submission ports Fixes: 30e17b7847f5 ("drm/i915: Engine busy time tracking") Testcase: igt/perf_pmu/busy-start Testcase: igt/perf_pmu/busy-double-start Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180111073031.14614-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_engine_cs.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 2bbba4e94eb987701abcacae241929fd13a196b2 Author: Chris Wilson Date: Thu Jan 11 14:04:02 2018 +0000 drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep As we kmalloc our dynamic sysfs attributes, we have to give them an external static lock_class_key for them to use with lockdep. Fixes: 109ec558370f ("drm/i915/pmu: Only enumerate available counters in sysfs") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180111140402.3984-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_pmu.c | 2 ++ 1 file changed, 2 insertions(+) commit 109ec558370f78143509d9ebb6c26e19de1f1fb9 Author: Tvrtko Ursulin Date: Thu Jan 11 08:35:25 2018 +0000 drm/i915/pmu: Only enumerate available counters in sysfs Switch over to dynamically creating device attributes, which are in turn used by the perf core to expose available counters in sysfs. This way we do not expose counters which are not avaiable on the current platform, and are so more consistent between what we reply to open attempts via the perf_event_open(2), and what is discoverable in sysfs. v2: * Simplify attribute pointer freeing loop. * Changed attr init from macro to function. * More common error unwind. (Chris Wilson) * Rename some locals. (Chris Wilson) v3: * Fixed double semi-colon. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180111083525.32394-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_pmu.c | 321 ++++++++++++++++++++++++++++++---------- drivers/gpu/drm/i915/i915_pmu.h | 8 + 2 files changed, 251 insertions(+), 78 deletions(-) commit 6e7a3f5244356ce079457cb3cfbc58ca01c00a2e Author: Tvrtko Ursulin Date: Thu Jan 11 08:24:17 2018 +0000 drm/i915: Apply headless DMC workaround for CNL With firmware 1.07 having fixed the state corruption issue, we can enable the headless GT performance workaround for CNL as well. (Equivalent to b68763741aa2 ("drm/i915: Restore GT performance in headless mode with DMC loaded") on other affected platforms.) Signed-off-by: Tvrtko Ursulin Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100572 Testcase: igt/gem_exec_nop/headless Cc: Imre Deak Cc: Chris Wilson Cc: Dmitry Rogozhkin Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20180111082417.795-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 1 + 1 file changed, 1 insertion(+) commit 5a3f58dfd1420347be838546e00a4a9e847bda30 Author: Oscar Mateo Date: Fri Dec 22 14:38:49 2017 -0800 drm/i915: Stop getting the fault address from RING_FAULT_REG This register does not contain it. Instead, we have to look into FAULT_TLB_DATA0 & 1 (where, by the way, we can also get the address space). v2: Right formatting v3: - Use 12 (as per the register format) instead of PAGE_SIZE (Chris) - s/BITS_44_TO_47/HIGHBITS (Chris) - Right formatting, this time for real Fixes: b03ec3d67ab8 ("drm/i915: There is only one fault register from GEN8 onwards") Signed-off-by: Oscar Mateo Cc: Michel Thierry Cc: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1513982329-32191-1-git-send-email-oscar.mateo@intel.com Reviewed-by: Michel Thierry Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_gtt.c | 15 +++++++++++++-- drivers/gpu/drm/i915/i915_reg.h | 2 ++ 2 files changed, 15 insertions(+), 2 deletions(-) commit da943b5ab071584fcb9cfa896dc8c643d376f362 Author: Sagar Arun Kamble Date: Wed Jan 10 18:24:16 2018 +0530 drm/i915/guc: Add uc_fini_wq in gem_init unwind path While moving code around for solving lockdep issue for GuC log relay, spotted that uc_fini_wq is not being called in failure path in gem_init. Missed in the below commit. Add it. v2: Removed GEM_BUG_ON(!HAS_GUC()) from intel_uc_fini_wq as init happens only based on enable_guc module parameter and does not consider has_guc capability. (Michal) Signed-off-by: Sagar Arun Kamble Fixes: 3176ff49bc3e ("drm/i915/guc: Move GuC workqueue allocations outside of the mutex") Cc: Michał Winiarski Cc: Chris Wilson Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/1515588857-10283-1-git-send-email-sagar.a.kamble@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem.c | 2 ++ drivers/gpu/drm/i915/intel_uc.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit 60ccc38f53ad50128bf33616f4e1745947eb726c Author: Maarten Lankhorst Date: Wed Jan 10 10:32:18 2018 +0100 Revert "drm/atomic: Fix memleak on ERESTARTSYS during non-blocking commits" This reverts commit a10195bbe7f4e6ba540083ba13126ef745116cae. This commit needs some more thought, and is currently crashing kms_flip tests. Until we figure out what's going wrong it's better to revert, and also next time apply it to drm-misc-fixes. Testcase: kms_flip Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104566 References: https://patchwork.freedesktop.org/series/36185/ References: https://patchwork.freedesktop.org/series/36250/ Reported-by: Marta Löfstedt Acked-by: Daniel Vetter Signed-off-by: Maarten Lankhorst drivers/gpu/drm/drm_atomic_helper.c | 9 --------- 1 file changed, 9 deletions(-) commit 01468d6c711a31a9fe333d072afa8a4730ef3bf9 Author: Sean Paul Date: Tue Jan 9 13:53:13 2018 -0500 drm/i915: Only disable HDCP when it's active Instead of always trying to disable HDCP. Only run hdcp_disable when the state is not UNDESIRED. This will catch cases where it's enabled and also cases where enable failed and the state is left in DESIRED mode. Note that things won't blow up if disable is attempted while already disabled, it's just bad form. Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180109185330.16853-1-seanpaul@chromium.org drivers/gpu/drm/i915/intel_hdcp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 2f4498a4ac2f77671587faa99e38c3342d666114 Author: Sean Paul Date: Tue Jan 9 13:53:51 2018 -0500 drm/i915: Don't allow HDCP on PORT E/F Port E doesn't have HDCP support, and Port F is disabled. Don't setup the hdcp shim on those. Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180109185401.16911-1-seanpaul@chromium.org drivers/gpu/drm/i915/intel_hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c308279f87988a1582a52f25fa7903974f0f4a12 Author: Samuel Li Date: Thu Jan 4 16:12:14 2018 -0500 drm: export gem dmabuf_ops for drivers to reuse Signed-off-by: Samuel Li Reviewed-by: Christian König Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/1515100334-6845-1-git-send-email-Samuel.Li@amd.com drivers/gpu/drm/drm_prime.c | 53 ++++++++++++++++++++++++++------------------- include/drm/drm_prime.h | 22 +++++++++++++++++++ 2 files changed, 53 insertions(+), 22 deletions(-) commit a10195bbe7f4e6ba540083ba13126ef745116cae Author: Leo (Sunpeng) Li Date: Thu Jan 4 14:47:33 2018 -0500 drm/atomic: Fix memleak on ERESTARTSYS during non-blocking commits During a non-blocking commit, it is possible to return before the commit_tail work is queued (-ERESTARTSYS, for example). Since a reference on the crtc commit object is obtained for the pending vblank event when preparing the commit, the above situation will leave us with an extra reference. Therefore, if the commit_tail worker has not consumed the event at the end of a commit, release it's reference. Signed-off-by: Leo (Sunpeng) Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/1515095253-29817-1-git-send-email-sunpeng.li@amd.com drivers/gpu/drm/drm_atomic_helper.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 17bd6e66d8f677b1b250d098097fbed6e70175ef Author: Imre Deak Date: Tue Jan 9 14:20:40 2018 +0200 drm/i915: Fix using BIT_ULL() vs. BIT() for power domain masks The power domain masks are 64 bit wide, so we need BIT_ULL() when setting bits in them, these ones were missed during converting from 32 to 64 bit masks. All 3 enums are <32 atm, so this didn't cause a real problem. Fixes: d8fc70b7367b ("drm/i915: Make power domain masks 64 bit long") Cc: Joonas Lahtinen Reported-by: Fengguang Wu Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180109122040.19425-1-imre.deak@intel.com drivers/gpu/drm/i915/intel_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8242ecbd597dac1375f6b80e0c0574189afc9a17 Author: Brian Norris Date: Mon Nov 27 17:05:38 2017 -0800 drm/bridge/synopsys: stop clobbering drvdata Bridge drivers/helpers shouldn't be clobbering the drvdata, since a parent driver might need to own this. Instead, let's return our 'dw_mipi_dsi' object and have callers pass that back to us for removal. Signed-off-by: Brian Norris Reviewed-by: Matthias Kaehlcke Reviewed-by: Archit Taneja Acked-by: Philippe Cornu Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20171128010538.119114-1-briannorris@chromium.org drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 36 ++++++++++----------------- drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 14 +++++++---- include/drm/bridge/dw_mipi_dsi.h | 17 ++++++++----- 3 files changed, 33 insertions(+), 34 deletions(-) commit b706a25eaed083a54afd113db86ee9747cc2f28b Author: Philippe CORNU Date: Thu Oct 26 13:17:46 2017 +0200 drm/stm: ltdc: add clut mode support Add the 8-bit clut mode support at crtc level. Useful for low memory footprint user interfaces but also for 8-bit old games (including color shifting visual effects). Tested with fbdev FBIOPUTCMAP & drm DRM_IOCTL_MODE_SETGAMMA ioctls. Signed-off-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1509016666-18927-1-git-send-email-philippe.cornu@st.com drivers/gpu/drm/stm/ltdc.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit c4712f27be5159819a735d7d294103040cf60477 Author: Sylwester Nawrocki Date: Tue Dec 12 12:20:37 2017 +0100 drm/bridge: analogix: Remove unreachable code from analogic_dp_core.c This patch removes an unreachable code found by the SVACE static analysis: UNREACHABLE_CODE: This statement in the source code might be unreachable during program execution. [unreachable] unreachable at drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:787 retval != 0 is always false because at this program point the variable retval is always equal to 0 at drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:786 Signed-off-by: Sylwester Nawrocki Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20171212112037.13107-1-s.nawrocki@samsung.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit cfb926e148e99acc02351d72e8b85e32b5f786ef Author: Stefan Brüns Date: Sun Dec 31 23:34:54 2017 +0100 drm/i915: Try EDID bitbanging on HDMI after failed read The ACK/NACK implementation as found in e.g. the G965 has the falling clock edge and the release of the data line after the ACK for the received byte happen at the same time. This is conformant with the I2C specification, which allows a zero hold time, see footnote [3]: "A device must internally provide a hold time of at least 300 ns for the SDA signal (with respect to the V IH(min) of the SCL signal) to bridge the undefined region of the falling edge of SCL." Some HDMI-to-VGA converters apparently fail to adhere to this requirement and latch SDA at the falling clock edge, so instead of an ACK sometimes a NACK is read and the slave (i.e. the EDID ROM) ends the transfer. The bitbanging releases the data line for the ACK only 1/4 bit time after the falling clock edge, so a slave will see the correct value no matter if it samples at the rising or the falling clock edge or in the center. Fallback to bitbanging is already done for the CRT connector. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92685 Signed-off-by: Stefan Brüns Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/a39f080b-81a5-4c93-b3f7-7cb0a58daca3@rwthex-w2-a.rwth-ad.de drivers/gpu/drm/i915/intel_hdmi.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 20f24d776d1be6ecf353f21a158e7b716143e523 Author: Sean Paul Date: Mon Jan 8 14:55:43 2018 -0500 drm/i915: Implement HDCP for DisplayPort This patch adds HDCP support for DisplayPort connectors by implementing the intel_hdcp_shim. Most of this is straightforward read/write from/to DPCD registers. One thing worth pointing out is the Aksv output bit. It wasn't easily separable like it's HDMI counterpart, so it's crammed in with the rest of it. Changes in v2: - Moved intel_hdcp_check_link out of intel_dp_check_link and only call it on short pulse. Since intel_hdcp_check_link does its own locking, this ensures we don't deadlock when intel_dp_check_link is called holding connection_mutex. - Rebased on drm-intel-next Changes in v3: - Initialize new worker Changes in v4: - Use intel_hdcp_init (Daniel) - Check for reauth requests in check_link (Ram) Changes in v5: - None Changes in v6: - Fix build warnings when printing ssize_t Cc: Daniel Vetter Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180108195545.218615-10-seanpaul@chromium.org drivers/gpu/drm/i915/intel_dp.c | 244 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 237 insertions(+), 7 deletions(-) commit 2320175feb74a11d3b287eead09bb5c0953cf27f Author: Sean Paul Date: Mon Jan 8 14:55:42 2018 -0500 drm/i915: Implement HDCP for HDMI This patch adds HDCP support for HDMI connectors by implementing the intel_hdcp_shim. Nothing too special, just a bunch of DDC reads/writes. Changes in v2: - Rebased on drm-intel-next Changes in v3: - Initialize new worker Changes in v4: - Remove SKL_ prefix from most register names (Daniel) - Wrap sanity checks in WARN_ON (Daniel) - Consolidate the enable/disable functions into one toggle fn - Use intel_hdcp_init (Daniel) Changes in v5: - checkpatch whitespace nits Changes in v6: - None Cc: Daniel Vetter Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180108195545.218615-9-seanpaul@chromium.org drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_ddi.c | 29 +++++ drivers/gpu/drm/i915/intel_drv.h | 2 + drivers/gpu/drm/i915/intel_hdmi.c | 250 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 282 insertions(+) commit 07e17a75922a593393b7eb8f73622723b76d3706 Author: Sean Paul Date: Mon Jan 8 14:55:41 2018 -0500 drm/i915: Add function to output Aksv over GMBUS Once the Aksv is available in the PCH, we need to get it on the wire to the receiver via DDC. The hardware doesn't allow us to read the value directly, so we need to tell GMBUS to source the Aksv internally and send it to the right offset on the receiver. The way we do this is to initiate an indexed write where the index is the Aksv register offset. We write dummy values to GMBUS3 as if we were sending the key, and the hardware slips in the "real" values when it goes out. Changes in v2: - None Changes in v3: - Uses new index write feature (Ville) Changes in v4: - None Changes in v5: - checkpatch whitespace fix Changes in v6: - None Cc: Ville Syrjälä Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180108195545.218615-8-seanpaul@chromium.org drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_i2c.c | 47 +++++++++++++++++++++++++++++++++++++--- 3 files changed, 46 insertions(+), 3 deletions(-) commit d02cf0a4f4db3bdbf1f7fa6915db0a96bd98ed9e Author: Sean Paul Date: Mon Jan 8 14:55:40 2018 -0500 drm/i915: Make use of indexed write GMBUS feature This patch enables the indexed write feature of the GMBUS to concatenate 2 consecutive messages into one. The criteria for an indexed write is that both messages are writes, the first is length == 1, and the second is length > 0. The first message is sent out by the GMBUS as the slave command, and the second one is sent via the GMBUS FIFO as usual. Changes in v3: - Added to series Changes in v4: - Combine indexed reads and writes (Ville) Changes in v5: - checkpatch whitespace nits Changes in v6: - None Reviewed-by: Daniel Vetter Suggested-by: Ville Syrjälä Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180108195545.218615-7-seanpaul@chromium.org drivers/gpu/drm/i915/intel_i2c.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) commit ee5e5e7a5e0fdeca5add8de6314b1f0a62604bdf Author: Sean Paul Date: Mon Jan 8 14:55:39 2018 -0500 drm/i915: Add HDCP framework + base implementation This patch adds the framework required to add HDCP support to intel connectors. It implements Aksv loading from fuse, and parts 1/2/3 of the HDCP authentication scheme. Note that without shim implementations, this does not actually implement HDCP. That will come in subsequent patches. Changes in v2: - Don't open code wait_fors (Chris) - drm_hdcp.c under MIT license (Daniel) - Move intel_hdcp_disable() call above ddi_disable (Ram) - Fix // comments (I wore a cone of shame for 12 hours to atone) (Daniel) - Justify intel_hdcp_shim with comments (Daniel) - Fixed async locking issues by adding hdcp_mutex (Daniel) - Don't alter connector_state in enable/disable (Daniel) Changes in v3: - Added hdcp_mutex/hdcp_value to make async reasonable - Added hdcp_prop_work to separate link checking & property setting - Added new helper for atomic_check state tracking (Daniel) - Moved enable/disable into atomic_commit with matching helpers - Moved intel_hdcp_check_link out of all locks when called from dp - Bumped up ksv_fifo timeout (noticed failure on one of my dongles) Changes in v4: - Remove SKL_ prefix from most register names (Daniel) - Move enable/disable back to modeset path (Daniel) - s/get_random_long/get_random_u32/ (Daniel) - Remove mode_config.mutex lock in prop_work (Daniel) - Add intel_hdcp_init to handle init of conn components (Daniel) - Actually check return value of attach_property - Check Bksv is valid before trying to authenticate (Ram) Changes in v5: - checkpatch whitespace changes - s/DRM_MODE_CONTENT_PROTECTION_OFF/DRM_MODE_CONTENT_PROTECTION_UNDESIRED/ - Fix ksv list wait timeout (actually wait 5s) - Increase the R0 timeout to 300ms (Ram) Changes in v6: - SPDX license Cc: Chris Wilson Reviewed-by: Ramalingam C Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180108195545.218615-6-seanpaul@chromium.org drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_reg.h | 83 ++++ drivers/gpu/drm/i915/intel_atomic.c | 2 + drivers/gpu/drm/i915/intel_ddi.c | 7 + drivers/gpu/drm/i915/intel_display.c | 4 + drivers/gpu/drm/i915/intel_drv.h | 85 ++++ drivers/gpu/drm/i915/intel_hdcp.c | 723 +++++++++++++++++++++++++++++++++++ 7 files changed, 905 insertions(+) commit 495eb7f877ab3789355c6ab5a0dbbd5277a88d69 Author: Sean Paul Date: Mon Jan 8 14:55:38 2018 -0500 drm: Add some HDCP related #defines In preparation for implementing HDCP in i915, add some HDCP related register offsets and defines. The dpcd register offsets will go in drm_dp_helper.h whereas the ddc offsets along with generic HDCP stuff will get stuffed in drm_hdcp.h, which is new. Changes in v2: - drm_hdcp.h gets MIT license (Daniel) Changes in v3: - None Changes in v4: - None Changes in v5: - None Changes in v6: - SPDX license Cc: Daniel Vetter Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180108195545.218615-5-seanpaul@chromium.org include/drm/drm_dp_helper.h | 17 +++++++++++++++++ include/drm/drm_hdcp.h | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) commit 24557865c8b1a6d0eaccaac47aabd9b23badf8fd Author: Sean Paul Date: Mon Jan 8 14:55:37 2018 -0500 drm: Add Content Protection property This patch adds a new optional connector property to allow userspace to enable protection over the content it is displaying. This will typically be implemented by the driver using HDCP. The property is a tri-state with the following values: - OFF: Self explanatory, no content protection - DESIRED: Userspace requests that the driver enable protection - ENABLED: Once the driver has authenticated the link, it sets this value The driver is responsible for downgrading ENABLED to DESIRED if the link becomes unprotected. The driver should also maintain the desiredness of protection across hotplug/dpms/suspend. If this looks familiar, I posted [1] this 3 years ago. We have been using this in ChromeOS across exynos, mediatek, and rockchip over that time. Changes in v2: - Pimp kerneldoc for content_protection_property (Daniel) - Drop sysfs attribute Changes in v3: - None Changes in v4: - Changed kerneldoc to recommend userspace polling (Daniel) - Changed kerneldoc to briefly describe how to attach the property (Daniel) Changes in v5: - checkpatch whitespace noise - Change DRM_MODE_CONTENT_PROTECTION_OFF to DRM_MODE_CONTENT_PROTECTION_UNDESIRED Changes in v6: - None Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul [1] https://lists.freedesktop.org/archives/dri-devel/2014-December/073336.html Link: https://patchwork.freedesktop.org/patch/msgid/20180108195545.218615-4-seanpaul@chromium.org drivers/gpu/drm/drm_atomic.c | 8 +++++ drivers/gpu/drm/drm_connector.c | 78 +++++++++++++++++++++++++++++++++++++++++ include/drm/drm_connector.h | 16 +++++++++ include/uapi/drm/drm_mode.h | 4 +++ 4 files changed, 106 insertions(+) commit 23fdbdd7ed3f18f56773c6cbef5d3f1d68befd69 Author: Sean Paul Date: Mon Jan 8 14:55:36 2018 -0500 drm/i915: Add more control to wait_for routines This patch adds a little more control to a couple wait_for routines such that we can avoid open-coding read/wait/timeout patterns which: - need the value of the register after the wait_for - run arbitrary operation for the read portion This patch also chooses the correct sleep function (based on timers-howto.txt) for the polling interval the caller specifies. Changes in v2: - Added to the series Changes in v3: - Rebased on drm-intel-next-queued and the new Wmin/max _wait_for - Removed msleep option Changes in v4: - Removed ; for OP in _wait_for (Chris) - Moved reg_value definition above ret (Chris) Changes in v4: - checkpatch whitespace fix Changes in v5: - None Changes in v6: - None Suggested-by: Chris Wilson Reviewed-by: Daniel Vetter Reviewed-by: Chris Wilson Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180108195545.218615-3-seanpaul@chromium.org drivers/gpu/drm/i915/intel_drv.h | 17 ++++++++++------- drivers/gpu/drm/i915/intel_uncore.c | 23 ++++++++++++++++------- drivers/gpu/drm/i915/intel_uncore.h | 14 +++++++++++++- 3 files changed, 39 insertions(+), 15 deletions(-) commit 716719a3e6c67da6ecfa4bd6963b5d8729415453 Author: Sean Paul Date: Mon Jan 8 14:55:35 2018 -0500 drm: Fix link-status kerneldoc line lengths I'm adding some stuff below it and it's killing my editor's vibe. Changes in v2: - Added to the series Changes in v3: - None Changes in v4: - None Changes in v5: - None Changes in v6: - None Cc: Manasi Navare Acked-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20180108195545.218615-2-seanpaul@chromium.org drivers/gpu/drm/drm_connector.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c218ee03b9315073ce43992792554dafa0626eb8 Author: Chris Wilson Date: Sat Jan 6 10:56:18 2018 +0000 drm/i915: Don't adjust priority on an already signaled fence When we retire a signaled fence, we free the dependency tree. However, we skip clearing the list so that if we then try to adjust the priority of the signaled fence, we may walk the list of freed dependencies. [ 3083.156757] ================================================================== [ 3083.156806] BUG: KASAN: use-after-free in execlists_schedule+0x199/0x660 [i915] [ 3083.156810] Read of size 8 at addr ffff8806bf20f400 by task Xorg/831 [ 3083.156815] CPU: 0 PID: 831 Comm: Xorg Not tainted 4.15.0-rc6-no-psn+ #1 [ 3083.156817] Hardware name: Notebook N24_25BU/N24_25BU, BIOS 5.12 02/17/2017 [ 3083.156818] Call Trace: [ 3083.156823] dump_stack+0x5c/0x7a [ 3083.156827] print_address_description+0x6b/0x290 [ 3083.156830] kasan_report+0x28f/0x380 [ 3083.156872] ? execlists_schedule+0x199/0x660 [i915] [ 3083.156914] execlists_schedule+0x199/0x660 [i915] [ 3083.156956] ? intel_crtc_atomic_check+0x146/0x4e0 [i915] [ 3083.156997] ? execlists_submit_request+0xe0/0xe0 [i915] [ 3083.157038] ? i915_vma_misplaced.part.4+0x25/0xb0 [i915] [ 3083.157079] ? __i915_vma_do_pin+0x7c8/0xc80 [i915] [ 3083.157121] ? intel_atomic_state_alloc+0x44/0x60 [i915] [ 3083.157130] ? drm_atomic_helper_page_flip+0x3e/0xb0 [drm_kms_helper] [ 3083.157145] ? drm_mode_page_flip_ioctl+0x7d2/0x850 [drm] [ 3083.157159] ? drm_ioctl_kernel+0xa7/0xf0 [drm] [ 3083.157172] ? drm_ioctl+0x45b/0x560 [drm] [ 3083.157211] i915_gem_object_wait_priority+0x14c/0x2c0 [i915] [ 3083.157251] ? i915_gem_get_aperture_ioctl+0x150/0x150 [i915] [ 3083.157290] ? i915_vma_pin_fence+0x1d8/0x320 [i915] [ 3083.157331] ? intel_pin_and_fence_fb_obj+0x175/0x250 [i915] [ 3083.157372] ? intel_rotation_info_size+0x60/0x60 [i915] [ 3083.157413] ? intel_link_compute_m_n+0x80/0x80 [i915] [ 3083.157428] ? drm_dev_printk+0x1b0/0x1b0 [drm] [ 3083.157443] ? drm_dev_printk+0x1b0/0x1b0 [drm] [ 3083.157485] intel_prepare_plane_fb+0x2f8/0x5a0 [i915] [ 3083.157527] ? intel_crtc_get_vblank_counter+0x80/0x80 [i915] [ 3083.157536] drm_atomic_helper_prepare_planes+0xa0/0x1c0 [drm_kms_helper] [ 3083.157587] intel_atomic_commit+0x12e/0x4e0 [i915] [ 3083.157605] drm_atomic_helper_page_flip+0xa2/0xb0 [drm_kms_helper] [ 3083.157621] drm_mode_page_flip_ioctl+0x7d2/0x850 [drm] [ 3083.157638] ? drm_mode_cursor2_ioctl+0x10/0x10 [drm] [ 3083.157652] ? drm_lease_owner+0x1a/0x30 [drm] [ 3083.157668] ? drm_mode_cursor2_ioctl+0x10/0x10 [drm] [ 3083.157681] drm_ioctl_kernel+0xa7/0xf0 [drm] [ 3083.157696] drm_ioctl+0x45b/0x560 [drm] [ 3083.157711] ? drm_mode_cursor2_ioctl+0x10/0x10 [drm] [ 3083.157725] ? drm_getstats+0x20/0x20 [drm] [ 3083.157729] ? timerqueue_del+0x49/0x80 [ 3083.157732] ? __remove_hrtimer+0x62/0xb0 [ 3083.157735] ? hrtimer_try_to_cancel+0x173/0x210 [ 3083.157738] do_vfs_ioctl+0x13b/0x880 [ 3083.157741] ? ioctl_preallocate+0x140/0x140 [ 3083.157744] ? _raw_spin_unlock_irq+0xe/0x30 [ 3083.157746] ? do_setitimer+0x234/0x370 [ 3083.157750] ? SyS_setitimer+0x19e/0x1b0 [ 3083.157752] ? SyS_alarm+0x140/0x140 [ 3083.157755] ? __rcu_read_unlock+0x66/0x80 [ 3083.157757] ? __fget+0xc4/0x100 [ 3083.157760] SyS_ioctl+0x74/0x80 [ 3083.157763] entry_SYSCALL_64_fastpath+0x1a/0x7d [ 3083.157765] RIP: 0033:0x7f6135d0c6a7 [ 3083.157767] RSP: 002b:00007fff01451888 EFLAGS: 00003246 ORIG_RAX: 0000000000000010 [ 3083.157769] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f6135d0c6a7 [ 3083.157771] RDX: 00007fff01451950 RSI: 00000000c01864b0 RDI: 000000000000000c [ 3083.157772] RBP: 00007f613076f600 R08: 0000000000000001 R09: 0000000000000000 [ 3083.157773] R10: 0000000000000060 R11: 0000000000003246 R12: 0000000000000000 [ 3083.157774] R13: 0000000000000060 R14: 000000000000001b R15: 0000000000000060 [ 3083.157779] Allocated by task 831: [ 3083.157783] kmem_cache_alloc+0xc0/0x200 [ 3083.157822] i915_gem_request_await_dma_fence+0x2c4/0x5d0 [i915] [ 3083.157861] i915_gem_request_await_object+0x321/0x370 [i915] [ 3083.157900] i915_gem_do_execbuffer+0x1165/0x19c0 [i915] [ 3083.157937] i915_gem_execbuffer2+0x1ad/0x550 [i915] [ 3083.157950] drm_ioctl_kernel+0xa7/0xf0 [drm] [ 3083.157962] drm_ioctl+0x45b/0x560 [drm] [ 3083.157964] do_vfs_ioctl+0x13b/0x880 [ 3083.157966] SyS_ioctl+0x74/0x80 [ 3083.157968] entry_SYSCALL_64_fastpath+0x1a/0x7d [ 3083.157971] Freed by task 831: [ 3083.157973] kmem_cache_free+0x77/0x220 [ 3083.158012] i915_gem_request_retire+0x72c/0xa70 [i915] [ 3083.158051] i915_gem_request_alloc+0x1e9/0x8b0 [i915] [ 3083.158089] i915_gem_do_execbuffer+0xa96/0x19c0 [i915] [ 3083.158127] i915_gem_execbuffer2+0x1ad/0x550 [i915] [ 3083.158140] drm_ioctl_kernel+0xa7/0xf0 [drm] [ 3083.158153] drm_ioctl+0x45b/0x560 [drm] [ 3083.158155] do_vfs_ioctl+0x13b/0x880 [ 3083.158156] SyS_ioctl+0x74/0x80 [ 3083.158158] entry_SYSCALL_64_fastpath+0x1a/0x7d [ 3083.158162] The buggy address belongs to the object at ffff8806bf20f400 which belongs to the cache i915_dependency of size 64 [ 3083.158166] The buggy address is located 0 bytes inside of 64-byte region [ffff8806bf20f400, ffff8806bf20f440) [ 3083.158168] The buggy address belongs to the page: [ 3083.158171] page:00000000d43decc4 count:1 mapcount:0 mapping: (null) index:0x0 [ 3083.158174] flags: 0x17ffe0000000100(slab) [ 3083.158179] raw: 017ffe0000000100 0000000000000000 0000000000000000 0000000180200020 [ 3083.158182] raw: ffffea001afc16c0 0000000500000005 ffff880731b881c0 0000000000000000 [ 3083.158184] page dumped because: kasan: bad access detected [ 3083.158187] Memory state around the buggy address: [ 3083.158190] ffff8806bf20f300: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 3083.158192] ffff8806bf20f380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 3083.158195] >ffff8806bf20f400: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 3083.158196] ^ [ 3083.158199] ffff8806bf20f480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 3083.158201] ffff8806bf20f500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 3083.158203] ================================================================== Reported-by: Alexandru Chirvasitu Reported-by: Mike Keehan Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104436 Fixes: 1f181225f8ec ("drm/i915/execlists: Keep request->priority for its lifetime") Signed-off-by: Chris Wilson Cc: Alexandru Chirvasitu Cc: Michał Winiarski Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Tested-by: Alexandru Chirvasitu Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180106105618.13532-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit ab062639edb0412daf6de540725276b9a5d217f9 Author: Kenneth Graunke Date: Fri Jan 5 00:59:05 2018 -0800 drm/i915: Whitelist SLICE_COMMON_ECO_CHICKEN1 on Geminilake. Geminilake requires the 3D driver to select whether barriers are intended for compute shaders, or tessellation control shaders, by whacking a "Barrier Mode" bit in SLICE_COMMON_ECO_CHICKEN1 when switching pipelines. Failure to do this properly can result in GPU hangs. Unfortunately, this means it needs to switch mid-batch, so only userspace can properly set it. To facilitate this, the kernel needs to whitelist the register. The workarounds page currently tags this as applying to Broxton only, but that doesn't make sense. The documentation for the register it references says the bit userspace is supposed to toggle only exists on Geminilake. Empirically, the Mesa patch to toggle this bit appears to fix intermittent GPU hangs in tessellation control shader barrier tests on Geminilake; we haven't seen those hangs on Broxton. v2: Mention WA #0862 in the comment (it doesn't have a name). Signed-off-by: Kenneth Graunke Acked-by: Rodrigo Vivi Cc: stable@vger.kernel.org Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180105085905.9298-1-kenneth@whitecape.org drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_engine_cs.c | 5 +++++ 2 files changed, 7 insertions(+) commit fe9a9da61c3ec33c7d3ad305c2c535edbcae1ddb Author: Anusha Srivatsa Date: Thu Jan 4 15:51:42 2018 -0800 drm/i915/dmc: DMC 1.07 for Cannonlake There is a new version of DMC available for CNL. The release notes mentions: 1. Fix for the issue where DC_STATE was getting enabled even when disabled by driver causing data corruption v2: Since the firmware is merged to linux-firmware.git, add MODULE_FIRMWARE. v3: rebased. Correct commit message(Jani) Cc: Jani Saarinen Cc: Rodrigo Vivi Signed-off-by: Anusha Srivatsa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1515109902-14076-1-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/intel_csr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a76050a4837860fcadb6ca11d69d41e08f4090d8 Author: Anusha Srivatsa Date: Wed Jan 3 11:03:45 2018 -0800 drm/i915/glk: Disable Guc and HuC on GLK Since the firmwares are not yet released to public repo, disable them on Geminilake. v2: Remove the firmware versions (Michal) v3: Remove unwanted defines (Rodrigo) Correct commit message (Michal) Cc: Michal Wajdeczko Cc: Rodrigo Vivi Cc: Signed-off-by: Anusha Srivatsa Fixes: 90f192c8241e ("drm/i915/GuC/GLK: Load GuC on GLK") Fixes: db5ba0d8931e ("drm/i915/GLK/HuC: Load HuC on GLK") Reviewed-by: Michal Wajdeczko Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1515006225-13003-1-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/intel_guc_fw.c | 9 --------- drivers/gpu/drm/i915/intel_huc.c | 11 ----------- 2 files changed, 20 deletions(-) commit 82e07602d22ab45cd90e31b62a87f0fa37ca428f Author: Chris Wilson Date: Thu Jan 4 16:38:42 2018 +0000 drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg() In some iommu, e.g. swiotlb, the available space can be quite limited. So we employ a trial-and-error approach to seeing if our large contiguous chunks can fit, and if that fails we try again with smaller chunks after trying to free our own lazily allocated blobs. As we use a trial-and-error approach, we do not want dma_map_sg() to emit a WARN of its own accord, we want to gracefully report the error back to the caller instead. Note that our noisy culprit, swiotlb, doesn't honour the flag, yet. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180104163842.11635-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c68ce69910e3b292afc138e12725399d3b0fb347 Author: Chris Wilson Date: Tue Jan 2 19:25:00 2018 +0000 drm/i915: Assert we do not try to wait on an invalid seqno We should never insert the invalid seqno into the wait tree, so assert we do not. Signed-off-by: Chris Wilson Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180102192500.20364-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 2 ++ 1 file changed, 2 insertions(+) commit 6f25d0be180f5b4713c6fb5a6619fe11dd1dacd9 Author: Sujaritha Sundaresan Date: Tue Jan 2 13:20:25 2018 -0800 drm/i915/guc : GEM_BUG_ON on invoking GuC reset function Instead of returning -EINVAL, GEM_BUG_ON when GuC reset is invoked for platforms not supporting as we don't expect to invoke it. v2: re-wording commit message and subject (Sagar) Signed-off-by: Sujaritha Sundaresan Cc: Chris Wilson Cc: Michal Wajdeczko Cc: Sagar Arun Kamble Reviewed-by: Sagar Arun Kamble Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1514928025-29659-2-git-send-email-sujaritha.sundaresan@intel.com drivers/gpu/drm/i915/intel_uncore.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c24f0c1de481c1c0f914e937f409bac2c90b90b3 Author: Sujaritha Sundaresan Date: Tue Jan 2 13:20:24 2018 -0800 drm/i915/guc : Decoupling ADS and logs from submission The Additional Data Struct (ADS) contains objects that are required by GuC post FW load and are not necessarily submission-only. Even with submission disabled we may require something inside the ADS, so it makes more sense for them to be always created. Similarly, we need to access GuC logs and even if GuC submission is disabled, to debug issues with GuC loading or with whatever we're using GuC for. v2: re-wording commit message (Sagar) Signed-off-by: Sujaritha Sundaresan Cc: Chris Wilson Cc: Michal Wajdeczko Cc: Sagar Arun Kamble Reviewed-by: Sagar Arun Kamble Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1514928025-29659-1-git-send-email-sujaritha.sundaresan@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/intel_guc.c | 18 ++++ drivers/gpu/drm/i915/intel_guc_ads.c | 151 ++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_guc_ads.h | 33 ++++++ drivers/gpu/drm/i915/intel_guc_submission.c | 134 ------------------------ 5 files changed, 203 insertions(+), 134 deletions(-) commit 2221c5b7ddfae1ed1ca8b21a9092d0878281293a Author: Chris Wilson Date: Tue Jan 2 15:12:27 2018 +0000 drm/i915/execlists: Reduce list_for_each_safe+list_safe_reset_next After staring at the list_for_each_safe macros for a bit, our current invocation of list_safe_reset_next in execlists_schedule() simply reduces to list_for_each. Signed-off-by: Chris Wilson Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180102151235.3949-11-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ce01b173773a09e2b5d3007c26d11cbd7737c3fe Author: Chris Wilson Date: Tue Jan 2 15:12:26 2018 +0000 drm/i915/execlists: Assert there are no simple cycles in the dependencies The dependency chain must be an acyclic graph. This is checked by the swfence, but for sanity, also do a simple check that we do not corrupt our list iteration in execlists_schedule() by a shallow dependency cycle. Signed-off-by: Chris Wilson Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180102151235.3949-10-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 83cc84c5a848748d4bb190bc179a7620491a925f Author: Chris Wilson Date: Tue Jan 2 15:12:25 2018 +0000 drm/i915: Assert all signalers we depended on did indeed signal Back up our comment that all signalers should have been signaled before we ourselves were retired with an assert to that effect. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180102151235.3949-9-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 9 ++++++++- drivers/gpu/drm/i915/i915_gem_request.h | 8 ++++++++ drivers/gpu/drm/i915/intel_lrc.c | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) commit 65c475c6dd607226159a774d7c3d7ff4b6e00255 Author: Chris Wilson Date: Tue Jan 2 15:12:31 2018 +0000 drm/i915: Hold rpm wakeref for modifying the global seqno To modify the global seqno may require rewriting a few registers, which requires us to hold the rpm wakeref. We must therefore take it around the call to i915_gem_set_global_seqno() in debugfs, on behalf of the user. Signed-off-by: Chris Wilson Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180102151235.3949-15-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 3 +++ 1 file changed, 3 insertions(+) commit f3c9d4075771b4fbaa0d793d2c875c61e2e1cb12 Author: Chris Wilson Date: Tue Jan 2 15:12:34 2018 +0000 drm/i915/execlists: Tidy enabling execlists Move the register settings for enabling execlists into its own function for clarity. Signed-off-by: Chris Wilson Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180102151235.3949-18-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 693cfbf0589040536c673d6ed3d262ea3ecf9aea Author: Chris Wilson Date: Tue Jan 2 15:12:33 2018 +0000 drm/i915/execlists: Record elsp offset during engine setup Currently, we record the elsp register offset inside init-hw but we only need to do it once during engine setup (after we know the mmio iomapping). Signed-off-by: Chris Wilson Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180102151235.3949-17-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 42232213614ddbef854ef368092e39c4e8347877 Author: Chris Wilson Date: Tue Jan 2 15:12:32 2018 +0000 drm/i915/execlists: Clear context-switch interrupt earlier in the reset Move the clearing of the CS-interrupt into the engine reset phase, before the current init-hw phase. This helps clarify that we clear the pending interrupts prior to any restarting of the execlists. Signed-off-by: Chris Wilson Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180102151235.3949-16-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) commit 27ec1843169973fbdf224d831e2a40f441407ab0 Author: Chris Wilson Date: Tue Jan 2 15:12:17 2018 +0000 drm/i915: Delete defunct i915_gem_request_assign() i915_gem_request_assign() is not used since commit 77f0d0e925e8 ("drm/i915/execlists: Pack the count into the low bits of the port.request"), so remove the defunct code References: 77f0d0e925e8 ("drm/i915/execlists: Pack the count into the low bits of the port.request") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180102151235.3949-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.h | 12 ------------ 1 file changed, 12 deletions(-) commit 9861b6682804a9db82600e0adf592bfa6deec377 Author: Chris Wilson Date: Sat Dec 23 11:04:07 2017 +0000 drm/i915/selftests: Allow random array allocation to fail In the selftests, we don't want to force an oom and would rather ENOMEM be reported. In this case, we would rather the allocation for the random array to fail. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20171223110407.21402-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_random.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 85a9c0bc0888be8b140de06ae6486208bc1424f9 Author: Chris Wilson Date: Sat Dec 23 11:04:06 2017 +0000 drm/i915/selftests: Tweak igt_ggtt_page to speed it up Reduce the number of GGTT PTE operations to speed the test up, but we reduce the likelihood of spotting a coherency error in those operations. However, Broxton is sporadically timing on this test, presumably because its GGTT operations are all uncached. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20171223110407.21402-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 30 +++++++++++++-------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit ce6e21370d5cacff3cd06c997af65316e7bba577 Author: C, Ramalingam Date: Mon Nov 20 09:53:47 2017 +0530 i915/drrs/debugfs: psr status info addition Existing debugfs entry i915_drrs_status is updated with whether PSR is the cause for DRRS disabled state. [v2]: Dropped the module parameter details as ctl moved from module parameter to debugfs. [Rodrigo] [v3]: Crtc ID information is dropped as there is no immediate usecase. [Rodrigo]. Signed-off-by: C, Ramalingam Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1511151827-6596-1-git-send-email-ramalingam.c@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 35954e88bc5091ef82134e8c99c5bcc3b4c6772a Author: C, Ramalingam Date: Wed Nov 8 00:08:23 2017 +0530 drm/i915: Runtime disable for eDP DRRS Debugfs called i915_drrs_ctl is added to enable and disable the eDP DRRS. Writing 0 will disable the feature, whereas non-zero will enable the feature. Possibility of disabling the DRRS, enables the testing of the frontbuffer tracking based features (FBC, DRRS and PSR) as standalone or any combination of the set. [v2]: ctl interface is moved from module parameter to debugfs [Rodrigo] Signed-off-by: C, Ramalingam Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1510079903-29441-1-git-send-email-ramalingam.c@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 43 ++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) commit c8dae55a8ced625038d52d26e48273707fab2688 Author: Hans de Goede Date: Wed Dec 20 11:50:17 2017 +0100 drm/i915/vlv: Add cdclk workaround for DSI At least on the Chuwi Vi8 (non pro/plus) the LCD panel will show an image shifted aprox. 20% to the left (with wraparound) and sometimes also wrong colors, showing that the panel controller is starting with sampling the datastream somewhere mid-line. This happens after the first blanking and re-init of the panel. After looking at drm.debug output I noticed that initially we inherit the cdclk of 333333 KHz set by the GOP, but after the re-init we picked 266667 KHz, which turns out to be the cause of this problem, a quick hack to hard code the cdclk to 333333 KHz makes the problem go away. I've tested this on various Bay Trail devices, to make sure this not does cause regressions on other devices and the higher cdclk does not cause any problems on the following devices: -GP-electronic T701 1024x600 333333 KHz cdclk after this patch -PEAQ C1010 1920x1200 333333 KHz cdclk after this patch -PoV mobii-wintab-800w 800x1280 333333 KHz cdclk after this patch -Asus Transformer-T100TA 1368x768 320000 KHz cdclk after this patch Also interesting wrt this is the comment in vlv_calc_cdclk about the existing workaround to avoid 200 Mhz as clock because that causes issues in some cases. This commit extends the "do not use 200 Mhz" workaround with an extra check to require atleast 320000 KHz (avoiding 266667 KHz) when a DSI panel is active. Changes in v2: -Change the commit message and the code comment to not treat the GOP as a reference, the GOP should not be treated as a reference Acked-by: Ville Syrjälä Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20171220105017.11259-1-hdegoede@redhat.com drivers/gpu/drm/i915/intel_cdclk.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 53421c2fe99ce16838639ad89d772d914a119a49 Author: Lucas De Marchi Date: Mon Dec 4 15:22:10 2017 -0800 drm/i915: Apply Display WA #1183 on skl, kbl, and cfl Display WA #1183 was recently added to workaround "Failures when enabling DPLL0 with eDP link rate 2.16 or 4.32 GHz and CD clock frequency 308.57 or 617.14 MHz (CDCLK_CTL CD Frequency Select 10b or 11b) used in this enabling or in previous enabling." This workaround was designed to minimize the impact only to save the bad case with that link rates. But HW engineers indicated that it should be safe to apply broadly, although they were expecting the DPLL0 link rate to be unchanged on runtime. We need to cover 2 cases: when we are in fact enabling DPLL0 and when we are just changing the frequency with small differences. This is based on previous patch by Rodrigo Vivi with suggestions from Ville Syrjälä. Cc: Arthur J Runyan Cc: Ville Syrjälä Cc: Rodrigo Vivi Cc: stable@vger.kernel.org Signed-off-by: Lucas De Marchi Reviewed-by: Ville Syrjälä Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20171204232210.4958-1-lucas.demarchi@intel.com drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_cdclk.c | 35 ++++++++++++++++++++++++--------- drivers/gpu/drm/i915/intel_runtime_pm.c | 10 ++++++++++ 3 files changed, 38 insertions(+), 9 deletions(-) commit 64d1c3a43a6fb5cef32a085bc17cbbe31945a651 Author: Felix Kuehling Date: Fri Dec 8 19:22:12 2017 -0500 drm/amdkfd: Centralize IOMMUv2 code and make it conditional dGPUs work without IOMMUv2. Make IOMMUv2 initialization dependent on ASIC information. Also allow building KFD without IOMMUv2 support. This is still useful for dGPUs and prepares for enabling KFD on architectures that don't support AMD IOMMUv2. v2: * Centralize IOMMUv2 code to avoid #ifdefs in too many places v3: * Imply AMD_IOMMU_V2 in Kconfig Signed-off-by: Felix Kuehling Acked-by: Christian Konig Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/Kconfig | 3 +- drivers/gpu/drm/amd/amdkfd/Makefile | 4 + drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 14 +- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 127 +++-------- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 3 + drivers/gpu/drm/amd/amdkfd/kfd_iommu.c | 357 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_iommu.h | 78 +++++++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 14 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 138 +----------- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 16 +- drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 6 +- 11 files changed, 495 insertions(+), 265 deletions(-) commit 4c660c8fbbf7b0d65a402f51e5f30a246cf3c44c Author: Felix Kuehling Date: Tue Feb 6 20:32:39 2018 -0500 drm/amdgpu: Add submit IB function for KFD This can be used for flushing caches when not using the HWS. Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 55 +++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 4 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 1 + drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 8 ++++ 5 files changed, 69 insertions(+) commit a46a2cd103a863724d668c86dca86bd0d93a19e4 Author: Felix Kuehling Date: Tue Feb 6 20:32:38 2018 -0500 drm/amdgpu: Add GPUVM memory management functions for KFD v2: * Removed unused flags from struct kgd_mem * Updated some comments * Added a check to unmap_memory_from_gpu whether BO was mapped v3: add mutex_destroy in relevant places Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay MAINTAINERS | 1 + drivers/gpu/drm/amd/amdgpu/Makefile | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 91 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 66 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 67 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 1506 +++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 + drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 + drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 77 ++ 11 files changed, 1819 insertions(+), 4 deletions(-) commit 3c728d3aa1fd5c7c2461835a93ac8fad57813db6 Author: Felix Kuehling Date: Tue Feb 6 20:32:37 2018 -0500 drm/amdgpu: add amdgpu_sync_clone Cloning a sync object is useful for waiting for a sync object without locking the original structure indefinitely, blocking other threads. Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 35 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h | 1 + 2 files changed, 36 insertions(+) commit 155494dbbbf4d6d6512b8bc2dc6bc483e47e1c71 Author: Felix Kuehling Date: Tue Feb 6 20:32:36 2018 -0500 drm/amdgpu: Update kgd2kfd_shared_resources for dGPU support Add GPUVM size and DRM render node. Also add function to query the VMID mask to avoid hard-coding it in multiple places later. v2: cut off GPUVM size at the VA hole Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 20 ++++++++++++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 ++ drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 6 ++++++ 3 files changed, 26 insertions(+), 2 deletions(-) commit d8d019ccffb838bb0dd98e583b5c25ccc0bc6ece Author: Felix Kuehling Date: Tue Feb 6 20:32:35 2018 -0500 drm/amdgpu: Add KFD eviction fence This fence is used by KFD to keep memory resident while user mode queues are enabled. Trying to evict memory will trigger the enable_signaling callback, which starts a KFD eviction, which involves preempting user mode queues before signaling the fence. There is one such fence per process. v2: * Grab a reference to mm_struct * Dereference fence after NULL check * Simplify fence release, no need to signal without anyone waiting * Added signed-off-by Harish, who is the original author of this code v3: * update MAINTAINERS file * change amd_kfd_ prefix to amdkfd_ * remove useless initialization of variable to NULL v4: * set amdkfd_fence_ops to be static * Suggested by: Fengguang Wu Signed-off-by: Harish Kasiviswanathan Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay MAINTAINERS | 1 + drivers/gpu/drm/amd/amdgpu/Makefile | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 15 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c | 179 +++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 21 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 18 +++ drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 6 + 8 files changed, 242 insertions(+), 4 deletions(-) commit 1029a3f33678afb8978285209ec5cfe153fe44ef Author: Felix Kuehling Date: Tue Feb 6 20:32:34 2018 -0500 drm/amdgpu: Remove unused kfd2kgd interface Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 9 --------- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 10 ---------- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 2 -- 3 files changed, 21 deletions(-) commit 2f901c25eb35a1b24a6006b9b668ad8bf88da582 Author: Felix Kuehling Date: Tue Feb 6 20:32:33 2018 -0500 drm/amdgpu: Fix wrong mask in get_atc_vmid_pasid_mapping_pasid Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 61b100e98f16e02df44862bba7798c7654b565f2 Author: Felix Kuehling Date: Tue Feb 6 20:32:32 2018 -0500 drm/amdgpu: Fix header file dependencies Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 + 2 files changed, 2 insertions(+) commit 473fee476a3c39f50bae07354972dd1cefaf79e9 Author: Yong Zhao Date: Tue Feb 6 20:32:31 2018 -0500 drm/amdgpu: Replace kgd_mem with amdgpu_bo for kernel pinned gtt mem The extra fields in struct kgd_mem aren't actually needed. This struct will be used for GPUVM allocations later. Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 47 +++++++++++++++--------------- 1 file changed, 23 insertions(+), 24 deletions(-) commit fa72d66198c90668723bb25ec23639a012bee99b Author: Felix Kuehling Date: Tue Feb 6 20:32:30 2018 -0500 drm/amdgpu: remove useless BUG_ONs Dereferencing NULL pointers will cause a BUG anyway. No need to do an explicit check. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 6 ------ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 2 -- 3 files changed, 10 deletions(-) commit 30d13424fba9236b741887eabb016279519c6ac4 Author: Felix Kuehling Date: Thu Jan 4 17:17:48 2018 -0500 drm/amdgpu: Enable KFD initialization on dGPUs Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 5 +++++ 1 file changed, 5 insertions(+) commit a3084e6c522f94130c9dfc26fe6458c353dbc0c9 Author: Felix Kuehling Date: Thu Jan 4 17:17:47 2018 -0500 drm/amdkfd: Add dGPU device IDs and device info v2: remove needs_iommu field as it doesn't exists CC: linux-pci@vger.kernel.org Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_device.c | 145 +++++++++++++++++++++++++++++++- 1 file changed, 143 insertions(+), 2 deletions(-) commit 1d63669885ebc8fca13e44864f7199c3ff50cea3 Author: Felix Kuehling Date: Thu Jan 4 17:17:46 2018 -0500 drm/amdkfd: Add dGPU support to kernel_queue_init Recognize dGPU ASIC families. Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 5 +++++ 1 file changed, 5 insertions(+) commit ee04955af6b851a4f133d2472bc65c5d8b9aa692 Author: Felix Kuehling Date: Thu Jan 4 17:17:45 2018 -0500 drm/amdkfd: Add dGPU support to the MQD manager On dGPUs don't set ATC addressing bits and use MTYPE_UC for coherent memory. Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 7 +++++ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 35 ++++++++++++++++++++++-- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 21 ++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 4 +++ 4 files changed, 64 insertions(+), 3 deletions(-) commit 97672cbe3de809ef8c4ea66cce675f5da3d3df44 Author: Felix Kuehling Date: Thu Jan 4 17:17:44 2018 -0500 drm/amdkfd: Add dGPU support to the device queue manager GFXv7 and v8 dGPUs use a different addressing mode for KFD compared to APUs (GPUVM64 vs HSA64). And dGPUs don't support MTYPE_CC. They use MTYPE_UC instead for memory that requires coherency. Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 11 +++ .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 4 + .../drm/amd/amdkfd/kfd_device_queue_manager_cik.c | 56 +++++++++++++ .../drm/amd/amdkfd/kfd_device_queue_manager_vi.c | 93 ++++++++++++++++++++++ 4 files changed, 164 insertions(+) commit d146c5a7196b4c2c2586569971a55392b501b93b Author: Felix Kuehling Date: Thu Jan 4 17:17:43 2018 -0500 drm/amdkfd: Make sched_policy a per-device setting Some dGPUs don't support HWS. Allow them to use a per-device sched_policy that may be different from the global default. Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 3 ++- drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c | 3 ++- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 2 +- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 26 +++++++++++++++++----- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 1 + .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 ++- 6 files changed, 29 insertions(+), 9 deletions(-) commit 3ee2d00cfb6c0b44aeb9575c20ad8d1abf09be0f Author: Felix Kuehling Date: Thu Jan 4 17:17:41 2018 -0500 drm/amdkfd: Conditionally enable PCIe atomics This will be needed for most dGPUs. CC: linux-pci@vger.kernel.org Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_device.c | 17 +++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + 2 files changed, 18 insertions(+) commit 3f866f5f04d3645970662409d2bdff3dca58b1a3 Author: Gustavo A. R. Silva Date: Thu Jan 18 18:39:55 2018 -0600 drm/amdkfd: Use ARRAY_SIZE macro in kfd_build_sysfs_node_entry Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Felix Kuehling Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4518cd28d81fa4d2872268e4f8f7b35f387642cc Author: Oded Gabbay Date: Mon Jan 29 17:31:40 2018 +0200 dma-fence: add comment for WARN_ON in dma_fence_release() In dma_fence_release() there is a WARN_ON which could be triggered by several cases of wrong dma-fence usage. This patch adds a comment to explain two use-cases to help driver developers that use dma-fence and trigger that WARN_ON to better understand the reasons for it. v2: change to a more generic, one-liner comment Reviewed-by: Daniel Vetter Signed-off-by: Oded Gabbay drivers/dma-buf/dma-fence.c | 1 + 1 file changed, 1 insertion(+) commit 4ded097bed1663b307f353a0dd6ad931e345834e Author: NeilBrown Date: Fri Oct 20 11:41:17 2017 +1100 constify more dcache.h inlined helpers. const struct pointers in commit f0d3b3ded999 ("constify dcache.c inlined helpers where possible"). This patch allows 'const' in a couple that were added since then. Signed-off-by: NeilBrown Signed-off-by: Al Viro include/linux/dcache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa7c1d5080f6e7dc4428210b6eac60271f899908 Author: Mateusz Guzik Date: Tue Oct 3 18:17:40 2017 +0200 vfs: factor sb iteration out of do_emergency_remount The intent is to reduce code duplication with other code iterating the list. No functional changes. Signed-off-by: Mateusz Guzik Signed-off-by: Al Viro fs/super.c | 61 ++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 25 deletions(-)